bt-core-app 2.2.5 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/VCheckbox.sass.mjs +1 -0
- package/dist/_virtual/VChip.sass.mjs +1 -0
- package/dist/_virtual/VChipGroup.sass.mjs +1 -0
- package/dist/_virtual/VColorPicker.sass.mjs +1 -0
- package/dist/_virtual/VColorPickerCanvas.sass.mjs +1 -0
- package/dist/_virtual/VColorPickerEdit.sass.mjs +1 -0
- package/dist/_virtual/VColorPickerPreview.sass.mjs +1 -0
- package/dist/_virtual/VColorPickerSwatches.sass.mjs +1 -0
- package/dist/_virtual/VCombobox.sass.mjs +1 -0
- package/dist/_virtual/VContainer.sass.mjs +1 -0
- package/dist/_virtual/VCounter.sass.mjs +1 -0
- package/dist/_virtual/VDialog.sass.mjs +1 -0
- package/dist/_virtual/VField.sass.mjs +1 -0
- package/dist/_virtual/VGrid.sass.mjs +1 -0
- package/dist/_virtual/VInput.sass.mjs +1 -0
- package/dist/_virtual/VLabel.sass.mjs +1 -0
- package/dist/_virtual/VMessages.sass.mjs +1 -0
- package/dist/_virtual/VNavigationDrawer.sass.mjs +1 -0
- package/dist/_virtual/VPagination.sass.mjs +1 -0
- package/dist/_virtual/VPicker.sass.mjs +1 -0
- package/dist/_virtual/VRating.sass.mjs +1 -0
- package/dist/_virtual/VSelect.sass.mjs +1 -0
- package/dist/_virtual/VSelectionControl.sass.mjs +1 -0
- package/dist/_virtual/VSelectionControlGroup.sass.mjs +1 -0
- package/dist/_virtual/VSheet.sass.mjs +1 -0
- package/dist/_virtual/VSlideGroup.sass.mjs +1 -0
- package/dist/_virtual/VSlider.sass.mjs +1 -0
- package/dist/_virtual/VSliderThumb.sass.mjs +1 -0
- package/dist/_virtual/VSliderTrack.sass.mjs +1 -0
- package/dist/_virtual/VSpacer.sass.mjs +1 -0
- package/dist/_virtual/VSwitch.sass.mjs +1 -0
- package/dist/_virtual/VTab.sass.mjs +1 -0
- package/dist/_virtual/VTable.sass.mjs +1 -0
- package/dist/_virtual/VTabs.sass.mjs +1 -0
- package/dist/_virtual/VTextField.sass.mjs +1 -0
- package/dist/_virtual/VTextarea.sass.mjs +1 -0
- package/dist/_virtual/VVirtualScroll.sass.mjs +1 -0
- package/dist/_virtual/VWindow.sass.mjs +1 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VBtnToggle/VBtnToggle.mjs +14 -14
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCheckbox/VCheckbox.mjs +74 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCheckbox/VCheckboxBtn.mjs +53 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VChip/VChip.mjs +263 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VChipGroup/VChipGroup.mjs +87 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VColorPicker/VColorPicker.mjs +161 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VColorPicker/VColorPickerCanvas.mjs +166 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VColorPicker/VColorPickerEdit.mjs +97 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VColorPicker/VColorPickerPreview.mjs +123 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VColorPicker/VColorPickerSwatches.mjs +72 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VColorPicker/util/index.mjs +193 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCombobox/VCombobox.mjs +501 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCounter/VCounter.mjs +51 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VDialog/VDialog.mjs +103 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VField/VField.mjs +295 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VField/VFieldLabel.mjs +28 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VForm/VForm.mjs +53 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VGrid/VCol.mjs +98 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VGrid/VContainer.mjs +41 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VGrid/VRow.mjs +104 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VGrid/VSpacer.mjs +6 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VHover/VHover.mjs +41 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VInput/InputIcon.mjs +40 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VInput/VInput.mjs +154 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VLabel/VLabel.mjs +36 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VMessages/VMessages.mjs +55 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +247 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VNavigationDrawer/sticky.mjs +44 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VNavigationDrawer/touch.mjs +100 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VPagination/VPagination.mjs +315 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VRating/VRating.mjs +217 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSelect/VSelect.mjs +475 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSelect/useScrolling.mjs +57 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSelectionControl/VSelectionControl.mjs +183 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +106 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSheet/VSheet.mjs +61 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSlideGroup/VSlideGroup.mjs +287 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSlideGroup/helpers.mjs +54 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSlider/VSlider.mjs +159 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSlider/VSliderThumb.mjs +176 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSlider/VSliderTrack.mjs +109 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSlider/slider.mjs +242 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VSwitch/VSwitch.mjs +172 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTable/VTable.mjs +66 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTabs/VTab.mjs +126 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTabs/VTabs.mjs +153 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTabs/VTabsWindow.mjs +48 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTabs/VTabsWindowItem.mjs +29 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTabs/shared.mjs +4 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTextField/VTextField.mjs +204 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VTextarea/VTextarea.mjs +258 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VToolbar/VToolbarItems.mjs +38 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VVirtualScroll/VVirtualScroll.mjs +106 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VVirtualScroll/VVirtualScrollItem.mjs +47 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VWindow/VWindow.mjs +211 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VWindow/VWindowItem.mjs +93 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/transitions/index.mjs +20 -19
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/autocomplete.mjs +21 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/autofocus.mjs +14 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/display.mjs +21 -12
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/filter.mjs +125 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/focus.mjs +31 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/focusGroups.mjs +54 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/form.mjs +112 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/goto.mjs +86 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/icons.mjs +4 -4
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/layout.mjs +43 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/list-items.mjs +92 -5
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/menuActivator.mjs +24 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/nested/nested.mjs +1 -1
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/refs.mjs +15 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/touch.mjs +73 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/validation.mjs +139 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/virtual.mjs +164 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/directives/touch/index.mjs +89 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/labs/VPicker/VPicker.mjs +77 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/labs/VPicker/VPickerTitle.mjs +5 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/labs/rules/rules.mjs +15 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/color/transformSRGB.mjs +16 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/colorUtils.mjs +133 -50
- package/dist/bt-core/core/node_modules/vuetify/lib/util/easing.mjs +20 -4
- package/dist/bt-core/core/node_modules/vuetify/lib/util/globals.mjs +2 -1
- package/dist/bt-core/core/node_modules/vuetify/lib/util/helpers.mjs +248 -141
- package/dist/components/BT-Assistant-Menu.vue.mjs +226 -211
- package/dist/components/BT-Avatar.vue.mjs +31 -31
- package/dist/components/BT-Background-Task.vue.mjs +52 -52
- package/dist/components/BT-Blade-Item.vue.mjs +110 -100
- package/dist/components/BT-Blade-Items.vue.mjs +2 -2
- package/dist/components/BT-Blade-Items.vue2.mjs +411 -399
- package/dist/components/BT-Blade-Steps.vue.mjs +2 -2
- package/dist/components/BT-Blade-Steps.vue2.mjs +641 -626
- package/dist/components/BT-Blade.vue.mjs +190 -192
- package/dist/components/BT-Btn.vue.mjs +23 -25
- package/dist/components/BT-Camera-Overlay.vue.mjs +144 -142
- package/dist/components/BT-Col.vue.mjs +17 -19
- package/dist/components/BT-Color-Picker-Menu.vue.mjs +51 -49
- package/dist/components/BT-Cosmetics-Menu.vue.mjs +180 -173
- package/dist/components/BT-Cron.vue.mjs +264 -249
- package/dist/components/BT-Date-Select.vue.mjs +46 -47
- package/dist/components/BT-Demo-Profile-Select.vue.mjs +40 -40
- package/dist/components/BT-Dialog-Confirm.vue.mjs +39 -39
- package/dist/components/BT-Dialog-Date.vue.mjs +22 -19
- package/dist/components/BT-Dialog-Number.vue.mjs +125 -121
- package/dist/components/BT-Dialog-Select.vue.mjs +96 -85
- package/dist/components/BT-Divider.vue.mjs +20 -21
- package/dist/components/BT-Drag-Counter.vue.mjs +2 -2
- package/dist/components/BT-Drag-Counter.vue2.mjs +89 -89
- package/dist/components/BT-Entity.vue.mjs +82 -82
- package/dist/components/BT-Error.vue.mjs +26 -27
- package/dist/components/BT-Field-Checkbox.vue.mjs +30 -31
- package/dist/components/BT-Field-Date.vue.mjs +87 -84
- package/dist/components/BT-Field-Entity.vue.mjs +20 -16
- package/dist/components/BT-Field-Select-Simple.vue.mjs +24 -26
- package/dist/components/BT-Field-Select.vue.mjs +32 -34
- package/dist/components/BT-Field-String.vue.mjs +54 -52
- package/dist/components/BT-Field-Switch.vue.mjs +44 -43
- package/dist/components/BT-Field-Tags.vue.mjs +57 -55
- package/dist/components/BT-Field-Textarea.vue.mjs +44 -43
- package/dist/components/BT-Field-Trigger.vue.mjs +276 -270
- package/dist/components/BT-Field.vue.mjs +39 -38
- package/dist/components/BT-Form-Builder.vue.mjs +346 -325
- package/dist/components/BT-Form-Field.vue.mjs +88 -81
- package/dist/components/BT-Form.vue.mjs +280 -269
- package/dist/components/BT-Header-Option.vue.mjs +21 -19
- package/dist/components/BT-Image-Select.vue.mjs +186 -177
- package/dist/components/BT-Json.vue.mjs +29 -30
- package/dist/components/BT-Loader.vue.mjs +32 -31
- package/dist/components/BT-Nav-Sidebar.vue.mjs +130 -124
- package/dist/components/BT-Number.vue.mjs +2 -2
- package/dist/components/BT-Number.vue2.mjs +17 -19
- package/dist/components/BT-Numpad.vue.mjs +147 -144
- package/dist/components/BT-Select-List-Box.vue.mjs +287 -276
- package/dist/components/BT-Select-Simple.vue.mjs +21 -23
- package/dist/components/BT-Select.vue.mjs +36 -37
- package/dist/components/BT-Signature-Overlay.vue.mjs +113 -112
- package/dist/components/BT-Signature.vue.mjs +96 -96
- package/dist/components/BT-Slider.vue.mjs +109 -103
- package/dist/components/BT-Square-Check.vue.mjs +65 -65
- package/dist/components/BT-Status-Item.vue.mjs +18 -16
- package/dist/components/BT-Tags.vue.mjs +21 -22
- package/dist/components/BT-Tour.vue.mjs +69 -65
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { HSVtoRGB as h, RGBtoHSV as f, HSVtoHSL as b, HSLtoHSV as x, HSVtoHex as c, HexToHSV as y } from "../../../util/colorUtils.mjs";
|
|
2
|
+
import { has as r } from "../../../util/helpers.mjs";
|
|
3
|
+
function V(e, t) {
|
|
4
|
+
if (t) {
|
|
5
|
+
const {
|
|
6
|
+
a: l,
|
|
7
|
+
...a
|
|
8
|
+
} = e;
|
|
9
|
+
return a;
|
|
10
|
+
}
|
|
11
|
+
return e;
|
|
12
|
+
}
|
|
13
|
+
function M(e, t) {
|
|
14
|
+
if (t == null || typeof t == "string") {
|
|
15
|
+
const l = typeof e.a == "number" && e.a < 1;
|
|
16
|
+
if (t != null && t.startsWith("rgb(")) {
|
|
17
|
+
const {
|
|
18
|
+
r: o,
|
|
19
|
+
g: s,
|
|
20
|
+
b: n,
|
|
21
|
+
a: u
|
|
22
|
+
} = h(e);
|
|
23
|
+
return `rgb(${o} ${s} ${n}` + (l ? ` / ${u})` : ")");
|
|
24
|
+
} else if (t != null && t.startsWith("hsl(")) {
|
|
25
|
+
const {
|
|
26
|
+
h: o,
|
|
27
|
+
s,
|
|
28
|
+
l: n,
|
|
29
|
+
a: u
|
|
30
|
+
} = b(e);
|
|
31
|
+
return `hsl(${o} ${Math.round(s * 100)} ${Math.round(n * 100)}` + (l ? ` / ${u})` : ")");
|
|
32
|
+
}
|
|
33
|
+
const a = c(e);
|
|
34
|
+
return e.a === 1 ? a.slice(0, 7) : a;
|
|
35
|
+
}
|
|
36
|
+
if (typeof t == "object") {
|
|
37
|
+
let l;
|
|
38
|
+
return r(t, ["r", "g", "b"]) ? l = h(e) : r(t, ["h", "s", "l"]) ? l = b(e) : r(t, ["h", "s", "v"]) && (l = e), V(l, !r(t, ["a"]) && e.a === 1);
|
|
39
|
+
}
|
|
40
|
+
return e;
|
|
41
|
+
}
|
|
42
|
+
const S = {
|
|
43
|
+
h: 0,
|
|
44
|
+
s: 0,
|
|
45
|
+
v: 0,
|
|
46
|
+
a: 1
|
|
47
|
+
}, g = {
|
|
48
|
+
inputProps: {
|
|
49
|
+
type: "number",
|
|
50
|
+
min: 0
|
|
51
|
+
},
|
|
52
|
+
inputs: [{
|
|
53
|
+
label: "R",
|
|
54
|
+
max: 255,
|
|
55
|
+
step: 1,
|
|
56
|
+
getValue: (e) => Math.round(e.r),
|
|
57
|
+
getColor: (e, t) => ({
|
|
58
|
+
...e,
|
|
59
|
+
r: Number(t)
|
|
60
|
+
}),
|
|
61
|
+
localeKey: "redInput"
|
|
62
|
+
}, {
|
|
63
|
+
label: "G",
|
|
64
|
+
max: 255,
|
|
65
|
+
step: 1,
|
|
66
|
+
getValue: (e) => Math.round(e.g),
|
|
67
|
+
getColor: (e, t) => ({
|
|
68
|
+
...e,
|
|
69
|
+
g: Number(t)
|
|
70
|
+
}),
|
|
71
|
+
localeKey: "greenInput"
|
|
72
|
+
}, {
|
|
73
|
+
label: "B",
|
|
74
|
+
max: 255,
|
|
75
|
+
step: 1,
|
|
76
|
+
getValue: (e) => Math.round(e.b),
|
|
77
|
+
getColor: (e, t) => ({
|
|
78
|
+
...e,
|
|
79
|
+
b: Number(t)
|
|
80
|
+
}),
|
|
81
|
+
localeKey: "blueInput"
|
|
82
|
+
}, {
|
|
83
|
+
label: "A",
|
|
84
|
+
max: 1,
|
|
85
|
+
step: 0.01,
|
|
86
|
+
getValue: (e) => {
|
|
87
|
+
let {
|
|
88
|
+
a: t
|
|
89
|
+
} = e;
|
|
90
|
+
return t != null ? Math.round(t * 100) / 100 : 1;
|
|
91
|
+
},
|
|
92
|
+
getColor: (e, t) => ({
|
|
93
|
+
...e,
|
|
94
|
+
a: Number(t)
|
|
95
|
+
}),
|
|
96
|
+
localeKey: "alphaInput"
|
|
97
|
+
}],
|
|
98
|
+
to: h,
|
|
99
|
+
from: f
|
|
100
|
+
};
|
|
101
|
+
var p;
|
|
102
|
+
const d = {
|
|
103
|
+
...g,
|
|
104
|
+
inputs: (p = g.inputs) == null ? void 0 : p.slice(0, 3)
|
|
105
|
+
}, m = {
|
|
106
|
+
inputProps: {
|
|
107
|
+
type: "number",
|
|
108
|
+
min: 0
|
|
109
|
+
},
|
|
110
|
+
inputs: [{
|
|
111
|
+
label: "H",
|
|
112
|
+
max: 360,
|
|
113
|
+
step: 1,
|
|
114
|
+
getValue: (e) => Math.round(e.h),
|
|
115
|
+
getColor: (e, t) => ({
|
|
116
|
+
...e,
|
|
117
|
+
h: Number(t)
|
|
118
|
+
}),
|
|
119
|
+
localeKey: "hueInput"
|
|
120
|
+
}, {
|
|
121
|
+
label: "S",
|
|
122
|
+
max: 1,
|
|
123
|
+
step: 0.01,
|
|
124
|
+
getValue: (e) => Math.round(e.s * 100) / 100,
|
|
125
|
+
getColor: (e, t) => ({
|
|
126
|
+
...e,
|
|
127
|
+
s: Number(t)
|
|
128
|
+
}),
|
|
129
|
+
localeKey: "saturationInput"
|
|
130
|
+
}, {
|
|
131
|
+
label: "L",
|
|
132
|
+
max: 1,
|
|
133
|
+
step: 0.01,
|
|
134
|
+
getValue: (e) => Math.round(e.l * 100) / 100,
|
|
135
|
+
getColor: (e, t) => ({
|
|
136
|
+
...e,
|
|
137
|
+
l: Number(t)
|
|
138
|
+
}),
|
|
139
|
+
localeKey: "lightnessInput"
|
|
140
|
+
}, {
|
|
141
|
+
label: "A",
|
|
142
|
+
max: 1,
|
|
143
|
+
step: 0.01,
|
|
144
|
+
getValue: (e) => {
|
|
145
|
+
let {
|
|
146
|
+
a: t
|
|
147
|
+
} = e;
|
|
148
|
+
return t != null ? Math.round(t * 100) / 100 : 1;
|
|
149
|
+
},
|
|
150
|
+
getColor: (e, t) => ({
|
|
151
|
+
...e,
|
|
152
|
+
a: Number(t)
|
|
153
|
+
}),
|
|
154
|
+
localeKey: "alphaInput"
|
|
155
|
+
}],
|
|
156
|
+
to: b,
|
|
157
|
+
from: x
|
|
158
|
+
}, H = {
|
|
159
|
+
...m,
|
|
160
|
+
inputs: m.inputs.slice(0, 3)
|
|
161
|
+
}, i = {
|
|
162
|
+
inputProps: {
|
|
163
|
+
type: "text"
|
|
164
|
+
},
|
|
165
|
+
inputs: [{
|
|
166
|
+
label: "HEXA",
|
|
167
|
+
getValue: (e) => e,
|
|
168
|
+
getColor: (e, t) => t,
|
|
169
|
+
localeKey: "hexaInput"
|
|
170
|
+
}],
|
|
171
|
+
to: c,
|
|
172
|
+
from: y
|
|
173
|
+
}, C = {
|
|
174
|
+
...i,
|
|
175
|
+
inputs: [{
|
|
176
|
+
label: "HEX",
|
|
177
|
+
getValue: (e) => e.slice(0, 7),
|
|
178
|
+
getColor: (e, t) => t,
|
|
179
|
+
localeKey: "hexInput"
|
|
180
|
+
}]
|
|
181
|
+
}, N = {
|
|
182
|
+
rgb: d,
|
|
183
|
+
rgba: g,
|
|
184
|
+
hsl: H,
|
|
185
|
+
hsla: m,
|
|
186
|
+
hex: C,
|
|
187
|
+
hexa: i
|
|
188
|
+
};
|
|
189
|
+
export {
|
|
190
|
+
M as extractColor,
|
|
191
|
+
N as modes,
|
|
192
|
+
S as nullColor
|
|
193
|
+
};
|
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
import { ref as P, shallowRef as A, toRef as Ue, computed as w, nextTick as _, watch as B, createVNode as d, mergeProps as S, createElementVNode as F, Fragment as J, normalizeClass as je, normalizeStyle as qe, createTextVNode as He } from "vue";
|
|
2
|
+
import "../../../../../../../_virtual/VCombobox.sass.mjs";
|
|
3
|
+
import { useInputIcon as Ge } from "../VInput/InputIcon.mjs";
|
|
4
|
+
import { makeSelectProps as We } from "../VSelect/VSelect.mjs";
|
|
5
|
+
import { makeVTextFieldProps as Je, VTextField as ie } from "../VTextField/VTextField.mjs";
|
|
6
|
+
import { useScrolling as Qe } from "../VSelect/useScrolling.mjs";
|
|
7
|
+
import { useTextColor as Xe } from "../../composables/color.mjs";
|
|
8
|
+
import { makeFilterProps as Ye, useFilter as Ze, highlightResult as el } from "../../composables/filter.mjs";
|
|
9
|
+
import { useFocusGroups as ll } from "../../composables/focusGroups.mjs";
|
|
10
|
+
import { useForm as tl } from "../../composables/form.mjs";
|
|
11
|
+
import { forwardRefs as al } from "../../composables/forwardRefs.mjs";
|
|
12
|
+
import { useItems as nl, transformItem as L } from "../../composables/list-items.mjs";
|
|
13
|
+
import { useLocale as ul } from "../../composables/locale.mjs";
|
|
14
|
+
import { useMenuActivator as ol } from "../../composables/menuActivator.mjs";
|
|
15
|
+
import { useProxiedModel as re } from "../../composables/proxiedModel.mjs";
|
|
16
|
+
import { VMenu as il } from "../VMenu/VMenu.mjs";
|
|
17
|
+
import { VSheet as rl } from "../VSheet/VSheet.mjs";
|
|
18
|
+
import { VList as sl } from "../VList/VList.mjs";
|
|
19
|
+
import { VListItem as se } from "../VList/VListItem.mjs";
|
|
20
|
+
import { VVirtualScroll as cl } from "../VVirtualScroll/VVirtualScroll.mjs";
|
|
21
|
+
import { VDivider as vl } from "../VDivider/VDivider.mjs";
|
|
22
|
+
import { VListSubheader as fl } from "../VList/VListSubheader.mjs";
|
|
23
|
+
import { VCheckboxBtn as dl } from "../VCheckbox/VCheckboxBtn.mjs";
|
|
24
|
+
import { VAvatar as ml } from "../VAvatar/VAvatar.mjs";
|
|
25
|
+
import { VIcon as ce } from "../VIcon/VIcon.mjs";
|
|
26
|
+
import { VChip as ve } from "../VChip/VChip.mjs";
|
|
27
|
+
import { VDefaultsProvider as pl } from "../VDefaultsProvider/VDefaultsProvider.mjs";
|
|
28
|
+
import { omit as hl, ensureValidVNode as bl, noop as gl, wrapInArray as yl, checkPrintable as fe, isComposingIgnoreKey as xl, escapeForRegex as Vl } from "../../util/helpers.mjs";
|
|
29
|
+
import { propsFactory as kl } from "../../util/propsFactory.mjs";
|
|
30
|
+
import { genericComponent as Cl } from "../../util/defineComponent.mjs";
|
|
31
|
+
import { deepEqual as de } from "../../util/deepEqual.mjs";
|
|
32
|
+
import { IN_BROWSER as wl } from "../../util/globals.mjs";
|
|
33
|
+
import { useRender as Il } from "../../util/useRender.mjs";
|
|
34
|
+
const Dl = kl({
|
|
35
|
+
alwaysFilter: Boolean,
|
|
36
|
+
autoSelectFirst: {
|
|
37
|
+
type: [Boolean, String]
|
|
38
|
+
},
|
|
39
|
+
clearOnSelect: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !0
|
|
42
|
+
},
|
|
43
|
+
delimiters: Array,
|
|
44
|
+
...Ye({
|
|
45
|
+
filterKeys: ["title"]
|
|
46
|
+
}),
|
|
47
|
+
...We({
|
|
48
|
+
hideNoData: !0,
|
|
49
|
+
returnObject: !0
|
|
50
|
+
}),
|
|
51
|
+
...hl(Je({
|
|
52
|
+
modelValue: null,
|
|
53
|
+
role: "combobox"
|
|
54
|
+
}), ["validationValue", "dirty"])
|
|
55
|
+
}, "VCombobox"), ot = Cl()({
|
|
56
|
+
name: "VCombobox",
|
|
57
|
+
props: Dl(),
|
|
58
|
+
emits: {
|
|
59
|
+
"update:focused": (l) => !0,
|
|
60
|
+
"update:modelValue": (l) => !0,
|
|
61
|
+
"update:search": (l) => !0,
|
|
62
|
+
"update:menu": (l) => !0
|
|
63
|
+
},
|
|
64
|
+
setup(l, me) {
|
|
65
|
+
var te;
|
|
66
|
+
let {
|
|
67
|
+
emit: pe,
|
|
68
|
+
slots: a
|
|
69
|
+
} = me;
|
|
70
|
+
const {
|
|
71
|
+
t: he
|
|
72
|
+
} = ul(), b = P(), g = A(!1), I = A(!0), q = A(!1), H = P(), N = P(), i = A(-1);
|
|
73
|
+
let K = !1;
|
|
74
|
+
const {
|
|
75
|
+
items: Q,
|
|
76
|
+
transformIn: be,
|
|
77
|
+
transformOut: ge
|
|
78
|
+
} = nl(l), {
|
|
79
|
+
textColorClasses: ye,
|
|
80
|
+
textColorStyles: xe
|
|
81
|
+
} = Xe(() => {
|
|
82
|
+
var e;
|
|
83
|
+
return (e = b.value) == null ? void 0 : e.color;
|
|
84
|
+
}), {
|
|
85
|
+
InputIcon: Ve
|
|
86
|
+
} = Ge(l), u = re(l, "modelValue", [], (e) => be(yl(e)), (e) => {
|
|
87
|
+
const t = ge(e);
|
|
88
|
+
return l.multiple ? t : t[0] ?? null;
|
|
89
|
+
}), R = tl(l), X = Ue(() => l.closableChips && !R.isReadonly.value && !R.isDisabled.value), O = w(() => !!(l.chips || a.chip)), D = w(() => O.value || !!a.selection), y = A(!l.multiple && !D.value ? ((te = u.value[0]) == null ? void 0 : te.title) ?? "" : ""), T = A(null), f = w({
|
|
90
|
+
get: () => y.value,
|
|
91
|
+
set: async (e) => {
|
|
92
|
+
var t;
|
|
93
|
+
if (y.value = e ?? "", e === null || e === "" && !l.multiple && !D.value ? u.value = [] : !l.multiple && !D.value && (u.value = [L(l, e)], _(() => {
|
|
94
|
+
var n;
|
|
95
|
+
return (n = N.value) == null ? void 0 : n.scrollToIndex(0);
|
|
96
|
+
})), e && l.multiple && ((t = l.delimiters) != null && t.length)) {
|
|
97
|
+
const n = ee(e);
|
|
98
|
+
n.length > 1 && (le(n), y.value = "");
|
|
99
|
+
}
|
|
100
|
+
e || (i.value = -1), I.value = !e;
|
|
101
|
+
}
|
|
102
|
+
}), ke = w(() => typeof l.counterValue == "function" ? l.counterValue(u.value) : typeof l.counterValue == "number" ? l.counterValue : l.multiple ? u.value.length : f.value.length), {
|
|
103
|
+
filteredItems: z,
|
|
104
|
+
getMatches: Ce
|
|
105
|
+
} = Ze(l, Q, () => T.value ?? (l.alwaysFilter || !I.value ? f.value : "")), x = w(() => l.hideSelected && T.value === null ? z.value.filter((e) => !u.value.some((t) => t.value === e.value)) : z.value), $ = w(() => l.hideNoData && !x.value.length || R.isReadonly.value || R.isDisabled.value), G = re(l, "menu"), c = w({
|
|
106
|
+
get: () => G.value,
|
|
107
|
+
set: (e) => {
|
|
108
|
+
var t;
|
|
109
|
+
G.value && !e && ((t = H.value) != null && t.ΨopenChildren.size) || e && $.value || (G.value = e);
|
|
110
|
+
}
|
|
111
|
+
}), {
|
|
112
|
+
menuId: we,
|
|
113
|
+
ariaExpanded: Ie,
|
|
114
|
+
ariaControls: De
|
|
115
|
+
} = ol(l, c);
|
|
116
|
+
B(y, (e) => {
|
|
117
|
+
K ? _(() => K = !1) : g.value && !c.value && (c.value = !0), pe("update:search", e);
|
|
118
|
+
}), B(u, (e) => {
|
|
119
|
+
var t;
|
|
120
|
+
!l.multiple && !D.value && (y.value = ((t = e[0]) == null ? void 0 : t.title) ?? "");
|
|
121
|
+
});
|
|
122
|
+
const Se = w(() => u.value.map((e) => e.value)), M = w(() => x.value.find((e) => e.type === "item" && !e.props.disabled)), W = w(() => {
|
|
123
|
+
var t;
|
|
124
|
+
return (l.autoSelectFirst === !0 || l.autoSelectFirst === "exact" && f.value === ((t = M.value) == null ? void 0 : t.title)) && x.value.length > 0 && !I.value && !q.value;
|
|
125
|
+
}), E = P(), Y = P(), Z = P(), Fe = Qe(E, b), {
|
|
126
|
+
onTabKeydown: Re
|
|
127
|
+
} = ll({
|
|
128
|
+
groups: [{
|
|
129
|
+
type: "element",
|
|
130
|
+
contentRef: Y
|
|
131
|
+
}, {
|
|
132
|
+
type: "list",
|
|
133
|
+
contentRef: E,
|
|
134
|
+
displayItemsCount: () => x.value.length
|
|
135
|
+
}, {
|
|
136
|
+
type: "element",
|
|
137
|
+
contentRef: Z
|
|
138
|
+
}],
|
|
139
|
+
onLeave: () => {
|
|
140
|
+
var e;
|
|
141
|
+
c.value = !1, (e = b.value) == null || e.focus();
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
function Pe(e) {
|
|
145
|
+
K = !0, _(() => K = !1), l.openOnClear && (c.value = !0);
|
|
146
|
+
}
|
|
147
|
+
function Ae() {
|
|
148
|
+
$.value || (c.value = !0);
|
|
149
|
+
}
|
|
150
|
+
function Te(e) {
|
|
151
|
+
$.value || (g.value && (e.preventDefault(), e.stopPropagation()), c.value = !c.value);
|
|
152
|
+
}
|
|
153
|
+
function Me(e) {
|
|
154
|
+
var t, n;
|
|
155
|
+
e.key === "Tab" && Re(e), (t = E.value) != null && t.$el.contains(e.target) && (fe(e) || e.key === "Backspace") && ((n = b.value) == null || n.focus());
|
|
156
|
+
}
|
|
157
|
+
function Ee(e) {
|
|
158
|
+
var v, m, p, o;
|
|
159
|
+
if (xl(e) || R.isReadonly.value)
|
|
160
|
+
return;
|
|
161
|
+
const t = (v = b.value) == null ? void 0 : v.selectionStart, n = u.value.length;
|
|
162
|
+
if (["Enter", "ArrowDown", "ArrowUp"].includes(e.key) && e.preventDefault(), ["Enter", "ArrowDown"].includes(e.key) && (c.value = !0), ["Escape"].includes(e.key) && (c.value = !1), W.value && ["Enter", "Tab"].includes(e.key) && M.value && !u.value.some((r) => {
|
|
163
|
+
let {
|
|
164
|
+
value: k
|
|
165
|
+
} = r;
|
|
166
|
+
return k === M.value.value;
|
|
167
|
+
}) && V(M.value), e.key === "ArrowDown" && W.value && ((m = E.value) == null || m.focus("next")), e.key === "Enter" && f.value && (V(L(l, f.value), !0, !0), D.value && (y.value = "")), ["Backspace", "Delete"].includes(e.key)) {
|
|
168
|
+
if (!l.multiple && D.value && u.value.length > 0 && !f.value)
|
|
169
|
+
return V(u.value[0], !1);
|
|
170
|
+
if (~i.value) {
|
|
171
|
+
e.preventDefault();
|
|
172
|
+
const r = i.value;
|
|
173
|
+
V(u.value[i.value], !1), i.value = r >= n - 1 ? n - 2 : r;
|
|
174
|
+
} else
|
|
175
|
+
e.key === "Backspace" && !f.value && (i.value = n - 1);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (l.multiple)
|
|
179
|
+
if (e.key === "ArrowLeft") {
|
|
180
|
+
if (i.value < 0 && t && t > 0)
|
|
181
|
+
return;
|
|
182
|
+
const r = i.value > -1 ? i.value - 1 : n - 1;
|
|
183
|
+
u.value[r] ? i.value = r : (i.value = -1, (p = b.value) == null || p.setSelectionRange(f.value.length, f.value.length));
|
|
184
|
+
} else if (e.key === "ArrowRight") {
|
|
185
|
+
if (i.value < 0)
|
|
186
|
+
return;
|
|
187
|
+
const r = i.value + 1;
|
|
188
|
+
u.value[r] ? i.value = r : (i.value = -1, (o = b.value) == null || o.setSelectionRange(0, 0));
|
|
189
|
+
} else
|
|
190
|
+
~i.value && fe(e) && (i.value = -1);
|
|
191
|
+
}
|
|
192
|
+
function _e(e) {
|
|
193
|
+
var v;
|
|
194
|
+
const t = ((v = e == null ? void 0 : e.clipboardData) == null ? void 0 : v.getData("Text")) ?? "", n = ee(t);
|
|
195
|
+
n.length > 1 && l.multiple && (e.preventDefault(), le(n));
|
|
196
|
+
}
|
|
197
|
+
function Be() {
|
|
198
|
+
var e;
|
|
199
|
+
l.eager && ((e = N.value) == null || e.calculateVisibleItems());
|
|
200
|
+
}
|
|
201
|
+
function Le() {
|
|
202
|
+
var e;
|
|
203
|
+
g.value && ((e = b.value) == null || e.focus()), I.value = !0, T.value = null;
|
|
204
|
+
}
|
|
205
|
+
function V(e) {
|
|
206
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
207
|
+
if (!(!e || e.props.disabled))
|
|
208
|
+
if (l.multiple) {
|
|
209
|
+
const v = u.value.findIndex((p) => (l.valueComparator || de)(p.value, e.value)), m = t ?? !~v;
|
|
210
|
+
if (~v) {
|
|
211
|
+
const p = m ? [...u.value, e] : [...u.value];
|
|
212
|
+
p.splice(v, 1), u.value = p;
|
|
213
|
+
} else
|
|
214
|
+
m && (u.value = [...u.value, e]);
|
|
215
|
+
l.clearOnSelect && (f.value = "");
|
|
216
|
+
} else {
|
|
217
|
+
const v = t !== !1;
|
|
218
|
+
u.value = v ? [e] : [], (!I.value || l.alwaysFilter) && y.value && (T.value = y.value), y.value = v && !D.value ? e.title : "", _(() => {
|
|
219
|
+
c.value = n, I.value = !0;
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
function ee(e) {
|
|
224
|
+
const n = [`
|
|
225
|
+
`, ...l.delimiters ?? []].map(Vl).join("|");
|
|
226
|
+
return e.split(new RegExp(`(?:${n})+`));
|
|
227
|
+
}
|
|
228
|
+
async function le(e) {
|
|
229
|
+
for (let t of e)
|
|
230
|
+
t = t.trim(), t && (V(L(l, t)), await _());
|
|
231
|
+
}
|
|
232
|
+
function Ne(e) {
|
|
233
|
+
g.value = !0, setTimeout(() => {
|
|
234
|
+
q.value = !0;
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
function Ke(e) {
|
|
238
|
+
q.value = !1;
|
|
239
|
+
}
|
|
240
|
+
function Oe(e) {
|
|
241
|
+
var n;
|
|
242
|
+
const t = (n = H.value) == null ? void 0 : n.contentEl;
|
|
243
|
+
t != null && t.contains(e.relatedTarget) && (g.value = !0);
|
|
244
|
+
}
|
|
245
|
+
return B(g, (e, t) => {
|
|
246
|
+
if (!(e || e === t) && (i.value = -1, c.value = !1, f.value)) {
|
|
247
|
+
if (l.multiple) {
|
|
248
|
+
V(L(l, f.value));
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
if (!D.value)
|
|
252
|
+
return;
|
|
253
|
+
u.value.some((n) => {
|
|
254
|
+
let {
|
|
255
|
+
title: v
|
|
256
|
+
} = n;
|
|
257
|
+
return v === f.value;
|
|
258
|
+
}) ? y.value = "" : V(L(l, f.value));
|
|
259
|
+
}
|
|
260
|
+
}), B(c, (e) => {
|
|
261
|
+
if (!l.hideSelected && e && u.value.length && I.value) {
|
|
262
|
+
const t = x.value.findIndex((n) => u.value.some((v) => (l.valueComparator || de)(v.value, n.value)));
|
|
263
|
+
wl && window.requestAnimationFrame(() => {
|
|
264
|
+
var n;
|
|
265
|
+
t >= 0 && ((n = N.value) == null || n.scrollToIndex(t));
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
e && (T.value = null);
|
|
269
|
+
}), B(Q, (e, t) => {
|
|
270
|
+
c.value || g.value && !t.length && e.length && (c.value = !0);
|
|
271
|
+
}), Il(() => {
|
|
272
|
+
const e = !!(!l.hideNoData || x.value.length || a["prepend-item"] || a["append-item"] || a["no-data"]), t = u.value.length > 0, n = ie.filterProps(l), v = {
|
|
273
|
+
search: f,
|
|
274
|
+
filteredItems: z.value
|
|
275
|
+
};
|
|
276
|
+
return d(ie, S({
|
|
277
|
+
ref: b
|
|
278
|
+
}, n, {
|
|
279
|
+
modelValue: f.value,
|
|
280
|
+
"onUpdate:modelValue": (m) => f.value = m,
|
|
281
|
+
focused: g.value,
|
|
282
|
+
"onUpdate:focused": (m) => g.value = m,
|
|
283
|
+
validationValue: u.externalValue,
|
|
284
|
+
counterValue: ke.value,
|
|
285
|
+
dirty: t,
|
|
286
|
+
class: ["v-combobox", {
|
|
287
|
+
"v-combobox--active-menu": c.value,
|
|
288
|
+
"v-combobox--chips": !!l.chips,
|
|
289
|
+
"v-combobox--selection-slot": !!D.value,
|
|
290
|
+
"v-combobox--selecting-index": i.value > -1,
|
|
291
|
+
[`v-combobox--${l.multiple ? "multiple" : "single"}`]: !0
|
|
292
|
+
}, l.class],
|
|
293
|
+
style: l.style,
|
|
294
|
+
readonly: R.isReadonly.value,
|
|
295
|
+
placeholder: t ? void 0 : l.placeholder,
|
|
296
|
+
"onClick:clear": Pe,
|
|
297
|
+
"onMousedown:control": Ae,
|
|
298
|
+
onKeydown: Ee,
|
|
299
|
+
onPaste: _e,
|
|
300
|
+
onBlur: Oe,
|
|
301
|
+
"aria-expanded": Ie.value,
|
|
302
|
+
"aria-controls": De.value
|
|
303
|
+
}), {
|
|
304
|
+
...a,
|
|
305
|
+
default: (m) => {
|
|
306
|
+
let {
|
|
307
|
+
id: p
|
|
308
|
+
} = m;
|
|
309
|
+
return F(J, null, [d(il, S({
|
|
310
|
+
id: we.value,
|
|
311
|
+
ref: H,
|
|
312
|
+
modelValue: c.value,
|
|
313
|
+
"onUpdate:modelValue": (o) => c.value = o,
|
|
314
|
+
activator: "parent",
|
|
315
|
+
contentClass: "v-combobox__content",
|
|
316
|
+
disabled: $.value,
|
|
317
|
+
eager: l.eager,
|
|
318
|
+
maxHeight: 310,
|
|
319
|
+
openOnClick: !1,
|
|
320
|
+
closeOnContentClick: !1,
|
|
321
|
+
onAfterEnter: Be,
|
|
322
|
+
onAfterLeave: Le
|
|
323
|
+
}, l.menuProps), {
|
|
324
|
+
default: () => [d(rl, {
|
|
325
|
+
onFocusin: Ne,
|
|
326
|
+
onKeydown: Me
|
|
327
|
+
}, {
|
|
328
|
+
default: () => [a["menu-header"] && F("header", {
|
|
329
|
+
ref: Y
|
|
330
|
+
}, [a["menu-header"](v)]), e && d(sl, S({
|
|
331
|
+
key: "combobox-list",
|
|
332
|
+
ref: E,
|
|
333
|
+
filterable: !0,
|
|
334
|
+
selected: Se.value,
|
|
335
|
+
selectStrategy: l.multiple ? "independent" : "single-independent",
|
|
336
|
+
onMousedown: (o) => o.preventDefault(),
|
|
337
|
+
selectable: !!x.value.length,
|
|
338
|
+
onFocusout: Ke,
|
|
339
|
+
tabindex: "-1",
|
|
340
|
+
"aria-live": "polite",
|
|
341
|
+
"aria-labelledby": `${p.value}-label`,
|
|
342
|
+
"aria-multiselectable": l.multiple,
|
|
343
|
+
color: l.itemColor ?? l.color
|
|
344
|
+
}, Fe, l.listProps), {
|
|
345
|
+
default: () => {
|
|
346
|
+
var o, r, k;
|
|
347
|
+
return [(o = a["prepend-item"]) == null ? void 0 : o.call(a), !x.value.length && !l.hideNoData && (((r = a["no-data"]) == null ? void 0 : r.call(a)) ?? d(se, {
|
|
348
|
+
key: "no-data",
|
|
349
|
+
title: he(l.noDataText)
|
|
350
|
+
}, null)), d(cl, {
|
|
351
|
+
ref: N,
|
|
352
|
+
renderless: !0,
|
|
353
|
+
items: x.value,
|
|
354
|
+
itemKey: "value"
|
|
355
|
+
}, {
|
|
356
|
+
default: (U) => {
|
|
357
|
+
var ne, ue, oe;
|
|
358
|
+
let {
|
|
359
|
+
item: s,
|
|
360
|
+
index: C,
|
|
361
|
+
itemRef: h
|
|
362
|
+
} = U;
|
|
363
|
+
const ae = S(s.props, {
|
|
364
|
+
ref: h,
|
|
365
|
+
key: s.value,
|
|
366
|
+
active: W.value && s === M.value ? !0 : void 0,
|
|
367
|
+
onClick: () => V(s, null),
|
|
368
|
+
"aria-posinset": C + 1,
|
|
369
|
+
"aria-setsize": x.value.length
|
|
370
|
+
});
|
|
371
|
+
return s.type === "divider" ? ((ne = a.divider) == null ? void 0 : ne.call(a, {
|
|
372
|
+
props: s.raw,
|
|
373
|
+
index: C
|
|
374
|
+
})) ?? d(vl, S(s.props, {
|
|
375
|
+
key: `divider-${C}`
|
|
376
|
+
}), null) : s.type === "subheader" ? ((ue = a.subheader) == null ? void 0 : ue.call(a, {
|
|
377
|
+
props: s.raw,
|
|
378
|
+
index: C
|
|
379
|
+
})) ?? d(fl, S(s.props, {
|
|
380
|
+
key: `subheader-${C}`
|
|
381
|
+
}), null) : ((oe = a.item) == null ? void 0 : oe.call(a, {
|
|
382
|
+
item: s,
|
|
383
|
+
index: C,
|
|
384
|
+
props: ae
|
|
385
|
+
})) ?? d(se, S(ae, {
|
|
386
|
+
role: "option"
|
|
387
|
+
}), {
|
|
388
|
+
prepend: (j) => {
|
|
389
|
+
let {
|
|
390
|
+
isSelected: ze
|
|
391
|
+
} = j;
|
|
392
|
+
return F(J, null, [l.multiple && !l.hideSelected ? d(dl, {
|
|
393
|
+
key: s.value,
|
|
394
|
+
modelValue: ze,
|
|
395
|
+
ripple: !1,
|
|
396
|
+
tabindex: "-1",
|
|
397
|
+
"aria-hidden": !0,
|
|
398
|
+
onClick: ($e) => $e.preventDefault()
|
|
399
|
+
}, null) : void 0, s.props.prependAvatar && d(ml, {
|
|
400
|
+
image: s.props.prependAvatar
|
|
401
|
+
}, null), s.props.prependIcon && d(ce, {
|
|
402
|
+
icon: s.props.prependIcon
|
|
403
|
+
}, null)]);
|
|
404
|
+
},
|
|
405
|
+
title: () => {
|
|
406
|
+
var j;
|
|
407
|
+
return I.value ? s.title : el("v-combobox", s.title, (j = Ce(s)) == null ? void 0 : j.title);
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
}), (k = a["append-item"]) == null ? void 0 : k.call(a)];
|
|
412
|
+
}
|
|
413
|
+
}), a["menu-footer"] && F("footer", {
|
|
414
|
+
ref: Z
|
|
415
|
+
}, [a["menu-footer"](v)])]
|
|
416
|
+
})]
|
|
417
|
+
}), u.value.map((o, r) => {
|
|
418
|
+
function k(h) {
|
|
419
|
+
h.stopPropagation(), h.preventDefault(), V(o, !1);
|
|
420
|
+
}
|
|
421
|
+
const U = S(ve.filterProps(o.props), {
|
|
422
|
+
"onClick:close": k,
|
|
423
|
+
onKeydown(h) {
|
|
424
|
+
h.key !== "Enter" && h.key !== " " || (h.preventDefault(), h.stopPropagation(), k(h));
|
|
425
|
+
},
|
|
426
|
+
onMousedown(h) {
|
|
427
|
+
h.preventDefault(), h.stopPropagation();
|
|
428
|
+
},
|
|
429
|
+
modelValue: !0,
|
|
430
|
+
"onUpdate:modelValue": void 0
|
|
431
|
+
}), s = O.value ? !!a.chip : !!a.selection, C = s ? bl(O.value ? a.chip({
|
|
432
|
+
item: o,
|
|
433
|
+
index: r,
|
|
434
|
+
props: U
|
|
435
|
+
}) : a.selection({
|
|
436
|
+
item: o,
|
|
437
|
+
index: r
|
|
438
|
+
})) : void 0;
|
|
439
|
+
if (!(s && !C))
|
|
440
|
+
return F("div", {
|
|
441
|
+
key: o.value,
|
|
442
|
+
class: je(["v-combobox__selection", r === i.value && ["v-combobox__selection--selected", ye.value]]),
|
|
443
|
+
style: qe(r === i.value ? xe.value : {})
|
|
444
|
+
}, [O.value ? a.chip ? d(pl, {
|
|
445
|
+
key: "chip-defaults",
|
|
446
|
+
defaults: {
|
|
447
|
+
VChip: {
|
|
448
|
+
closable: X.value,
|
|
449
|
+
size: "small",
|
|
450
|
+
text: o.title
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}, {
|
|
454
|
+
default: () => [C]
|
|
455
|
+
}) : d(ve, S({
|
|
456
|
+
key: "chip",
|
|
457
|
+
closable: X.value,
|
|
458
|
+
size: "small",
|
|
459
|
+
text: o.title,
|
|
460
|
+
disabled: o.props.disabled
|
|
461
|
+
}, U), null) : C ?? F("span", {
|
|
462
|
+
class: "v-combobox__selection-text"
|
|
463
|
+
}, [o.title, l.multiple && r < u.value.length - 1 && F("span", {
|
|
464
|
+
class: "v-combobox__selection-comma"
|
|
465
|
+
}, [He(",")])])]);
|
|
466
|
+
})]);
|
|
467
|
+
},
|
|
468
|
+
"append-inner": function() {
|
|
469
|
+
var r, k;
|
|
470
|
+
for (var m = arguments.length, p = new Array(m), o = 0; o < m; o++)
|
|
471
|
+
p[o] = arguments[o];
|
|
472
|
+
return F(J, null, [(r = a["append-inner"]) == null ? void 0 : r.call(a, ...p), (!l.hideNoData || l.items.length) && l.menuIcon ? d(ce, {
|
|
473
|
+
class: "v-combobox__menu-icon",
|
|
474
|
+
color: (k = b.value) == null ? void 0 : k.fieldIconColor,
|
|
475
|
+
icon: l.menuIcon,
|
|
476
|
+
onMousedown: Te,
|
|
477
|
+
onClick: gl,
|
|
478
|
+
"aria-hidden": !0,
|
|
479
|
+
tabindex: "-1"
|
|
480
|
+
}, null) : void 0, l.appendInnerIcon && d(Ve, {
|
|
481
|
+
key: "append-icon",
|
|
482
|
+
name: "appendInner",
|
|
483
|
+
color: p[0].iconColor.value
|
|
484
|
+
}, null)]);
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
}), al({
|
|
488
|
+
isFocused: g,
|
|
489
|
+
isPristine: I,
|
|
490
|
+
menu: c,
|
|
491
|
+
search: f,
|
|
492
|
+
selectionIndex: i,
|
|
493
|
+
filteredItems: z,
|
|
494
|
+
select: V
|
|
495
|
+
}, b);
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
export {
|
|
499
|
+
ot as VCombobox,
|
|
500
|
+
Dl as makeVComboboxProps
|
|
501
|
+
};
|