-
+
+
+
@@ -55,7 +61,8 @@ import { ref, onMounted } from 'vue';
import { NodeService } from './service/NodeService';
const nodes = ref(null);
-const selectedValue = ref({});
+const selectedValue1 = ref({});
+const selectedValue2 = ref({});
onMounted(() => {
NodeService.getTreeNodes().then((data) => (nodes.value = data));
diff --git a/apps/showcase/pages/treeselect/index.vue b/apps/showcase/pages/treeselect/index.vue
index 3b40295cc..bde6487ab 100644
--- a/apps/showcase/pages/treeselect/index.vue
+++ b/apps/showcase/pages/treeselect/index.vue
@@ -60,6 +60,11 @@ export default {
label: 'Filter',
component: FilterDoc
},
+ {
+ id: 'filled',
+ label: 'Filled',
+ component: FilledDoc
+ },
{
id: 'floatlabel',
label: 'Float Label',
@@ -70,11 +75,6 @@ export default {
label: 'Ifta Label',
component: IftaLabelDoc
},
- {
- id: 'filled',
- label: 'Filled',
- component: FilledDoc
- },
{
id: 'invalid',
label: 'Invalid',
diff --git a/packages/primevue/src/treeselect/style/TreeSelectStyle.js b/packages/primevue/src/treeselect/style/TreeSelectStyle.js
index f0671fd40..0ca19b801 100644
--- a/packages/primevue/src/treeselect/style/TreeSelectStyle.js
+++ b/packages/primevue/src/treeselect/style/TreeSelectStyle.js
@@ -31,6 +31,10 @@ const theme = ({ dt }) => `
background: ${dt('treeselect.filled.background')};
}
+.p-treeselect.p-variant-filled:not(.p-disabled):hover {
+ background: ${dt('treeselect.filled.hover.background')};
+}
+
.p-treeselect.p-variant-filled.p-focus {
background: ${dt('treeselect.filled.focus.background')};
}
diff --git a/packages/themes/src/presets/material/treeselect/index.js b/packages/themes/src/presets/material/treeselect/index.js
index fb63191d2..817ef88d9 100644
--- a/packages/themes/src/presets/material/treeselect/index.js
+++ b/packages/themes/src/presets/material/treeselect/index.js
@@ -3,6 +3,7 @@ export default {
background: '{form.field.background}',
disabledBackground: '{form.field.disabled.background}',
filledBackground: '{form.field.filled.background}',
+ filledHoverBackground: '{form.field.filled.hover.background}',
filledFocusBackground: '{form.field.filled.focus.background}',
borderColor: '{form.field.border.color}',
hoverBorderColor: '{form.field.hover.border.color}',
@@ -43,5 +44,49 @@ export default {
},
chip: {
borderRadius: '{border.radius.sm}'
- }
+ },
+ style: ({ dt }) => `
+.p-treeselect.p-variant-filled {
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+ border: 1px solid transparent;
+ background: ${dt('treeselect.filled.background')} no-repeat;
+ background-image: linear-gradient(to bottom, ${dt('treeselect.focus.border.color')}, ${dt('treeselect.focus.border.color')}), linear-gradient(to bottom, ${dt('treeselect.border.color')}, ${dt('treeselect.border.color')});
+ background-size: 0 2px, 100% 1px;
+ background-position: 50% 100%, 50% 100%;
+ background-origin: border-box;
+ transition: background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1);
+}
+
+.p-treeselect.p-variant-filled:not(.p-disabled):hover {
+ background: ${dt('treeselect.filled.hover.background')} no-repeat;
+ background-image: linear-gradient(to bottom, ${dt('treeselect.focus.border.color')}, ${dt('treeselect.focus.border.color')}), linear-gradient(to bottom, ${dt('treeselect.hover.border.color')}, ${dt('treeselect.hover.border.color')});
+ background-size: 0 2px, 100% 1px;
+ background-position: 50% 100%, 50% 100%;
+ background-origin: border-box;
+ border-color: transparent;
+}
+
+.p-treeselect.p-variant-filled:not(.p-disabled).p-focus {
+ outline: 0 none;
+ background: ${dt('treeselect.filled.focus.background')} no-repeat;
+ background-image: linear-gradient(to bottom, ${dt('treeselect.focus.border.color')}, ${dt('treeselect.focus.border.color')}), linear-gradient(to bottom, ${dt('treeselect.border.color')}, ${dt('treeselect.border.color')});
+ background-size: 100% 2px, 100% 1px;
+ background-position: 50% 100%, 50% 100%;
+ background-origin: border-box;
+ border-color: transparent;
+}
+
+.p-treeselect.p-variant-filled:not(.p-disabled).p-focus:hover {
+ background-image: linear-gradient(to bottom, ${dt('treeselect.focus.border.color')}, ${dt('treeselect.focus.border.color')}), linear-gradient(to bottom, ${dt('treeselect.hover.border.color')}, ${dt('treeselect.hover.border.color')});
+}
+
+.p-treeselect.p-variant-filled.p-invalid {
+ background-image: linear-gradient(to bottom, ${dt('treeselect.invalid.border.color')}, ${dt('treeselect.invalid.border.color')}), linear-gradient(to bottom, ${dt('treeselect.invalid.border.color')}, ${dt('treeselect.invalid.border.color')});
+}
+
+.p-treeselect.p-variant-filled.p-invalid:not(.p-disabled).p-focus {
+ background-image: linear-gradient(to bottom, ${dt('treeselect.invalid.border.color')}, ${dt('treeselect.invalid.border.color')}), linear-gradient(to bottom, ${dt('treeselect.invalid.border.color')}, ${dt('treeselect.invalid.border.color')});
+}
+`
};