@skewedaspect/sleekspace-ui 0.5.1 → 0.6.0
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/components/Card/SkCard.vue.d.ts +13 -1
- package/dist/components/Panel/SkPanel.vue.d.ts +15 -1
- package/dist/components/Panel/types.d.ts +1 -0
- package/dist/components/Select/SkSelect.vue.d.ts +61 -0
- package/dist/components/Select/SkSelectItem.vue.d.ts +134 -0
- package/dist/components/Select/SkSelectSeparator.vue.d.ts +2 -0
- package/dist/components/Select/index.d.ts +4 -0
- package/dist/components/Select/types.d.ts +3 -0
- package/dist/components/Sidebar/SkSidebar.vue.d.ts +8 -1
- package/dist/components/Sidebar/types.d.ts +1 -0
- package/dist/components/Skeleton/SkSkeleton.vue.d.ts +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/sleekspace-ui.css +444 -34
- package/dist/sleekspace-ui.es.js +2014 -283
- package/dist/sleekspace-ui.umd.js +2013 -282
- package/package.json +1 -1
- package/src/components/Card/SkCard.vue +17 -1
- package/src/components/Panel/SkPanel.vue +29 -4
- package/src/components/Panel/types.ts +3 -0
- package/src/components/Select/SkSelect.vue +210 -0
- package/src/components/Select/SkSelectItem.vue +112 -0
- package/src/components/Select/SkSelectSeparator.vue +40 -0
- package/src/components/Select/index.ts +10 -0
- package/src/components/Select/types.ts +10 -0
- package/src/components/Sidebar/SkSidebar.vue +39 -2
- package/src/components/Sidebar/types.ts +2 -0
- package/src/global.d.ts +2 -0
- package/src/index.ts +10 -0
- package/src/styles/components/_card.scss +45 -9
- package/src/styles/components/_index.scss +1 -0
- package/src/styles/components/_listbox.scss +1 -0
- package/src/styles/components/_panel.scss +119 -13
- package/src/styles/components/_select.scss +439 -0
- package/src/styles/components/_sidebar.scss +83 -4
- package/web-types.json +148 -1
|
@@ -781,6 +781,44 @@
|
|
|
781
781
|
function cloneFnJSON(source) {
|
|
782
782
|
return JSON.parse(JSON.stringify(source));
|
|
783
783
|
}
|
|
784
|
+
function useResizeObserver(target, callback, options = {}) {
|
|
785
|
+
const { window: window2 = defaultWindow, ...observerOptions } = options;
|
|
786
|
+
let observer;
|
|
787
|
+
const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
|
|
788
|
+
const cleanup = () => {
|
|
789
|
+
if (observer) {
|
|
790
|
+
observer.disconnect();
|
|
791
|
+
observer = void 0;
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
const targets = vue.computed(() => {
|
|
795
|
+
const _targets = vue.toValue(target);
|
|
796
|
+
return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
|
|
797
|
+
});
|
|
798
|
+
const stopWatch = vue.watch(
|
|
799
|
+
targets,
|
|
800
|
+
(els) => {
|
|
801
|
+
cleanup();
|
|
802
|
+
if (isSupported.value && window2) {
|
|
803
|
+
observer = new ResizeObserver(callback);
|
|
804
|
+
for (const _el of els) {
|
|
805
|
+
if (_el)
|
|
806
|
+
observer.observe(_el, observerOptions);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
},
|
|
810
|
+
{ immediate: true, flush: "post" }
|
|
811
|
+
);
|
|
812
|
+
const stop = () => {
|
|
813
|
+
cleanup();
|
|
814
|
+
stopWatch();
|
|
815
|
+
};
|
|
816
|
+
tryOnScopeDispose(stop);
|
|
817
|
+
return {
|
|
818
|
+
isSupported,
|
|
819
|
+
stop
|
|
820
|
+
};
|
|
821
|
+
}
|
|
784
822
|
const EVENT_FOCUS_IN = "focusin";
|
|
785
823
|
const EVENT_FOCUS_OUT = "focusout";
|
|
786
824
|
const PSEUDO_CLASS_FOCUS_WITHIN = ":focus-within";
|
|
@@ -2925,7 +2963,7 @@
|
|
|
2925
2963
|
});
|
|
2926
2964
|
var FocusScope_default = FocusScope_vue_vue_type_script_setup_true_lang_default;
|
|
2927
2965
|
const ITEM_SELECT = "menu.itemSelect";
|
|
2928
|
-
const SELECTION_KEYS = ["Enter", " "];
|
|
2966
|
+
const SELECTION_KEYS$1 = ["Enter", " "];
|
|
2929
2967
|
const FIRST_KEYS = [
|
|
2930
2968
|
"ArrowDown",
|
|
2931
2969
|
"PageUp",
|
|
@@ -2938,8 +2976,8 @@
|
|
|
2938
2976
|
];
|
|
2939
2977
|
const FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
|
|
2940
2978
|
const SUB_OPEN_KEYS = {
|
|
2941
|
-
ltr: [...SELECTION_KEYS, "ArrowRight"],
|
|
2942
|
-
rtl: [...SELECTION_KEYS, "ArrowLeft"]
|
|
2979
|
+
ltr: [...SELECTION_KEYS$1, "ArrowRight"],
|
|
2980
|
+
rtl: [...SELECTION_KEYS$1, "ArrowLeft"]
|
|
2943
2981
|
};
|
|
2944
2982
|
const SUB_CLOSE_KEYS = {
|
|
2945
2983
|
ltr: ["ArrowLeft"],
|
|
@@ -4265,7 +4303,7 @@ For more information, see https://www.reka-ui.com/docs/components/${componentLin
|
|
|
4265
4303
|
}
|
|
4266
4304
|
});
|
|
4267
4305
|
var PopperAnchor_default = PopperAnchor_vue_vue_type_script_setup_true_lang_default;
|
|
4268
|
-
const _hoisted_1$
|
|
4306
|
+
const _hoisted_1$C = {
|
|
4269
4307
|
key: 0,
|
|
4270
4308
|
d: "M0 0L6 6L12 0"
|
|
4271
4309
|
};
|
|
@@ -4310,7 +4348,7 @@ For more information, see https://www.reka-ui.com/docs/components/${componentLin
|
|
|
4310
4348
|
viewBox: _ctx.asChild ? void 0 : "0 0 12 6",
|
|
4311
4349
|
preserveAspectRatio: _ctx.asChild ? void 0 : "none"
|
|
4312
4350
|
}), {
|
|
4313
|
-
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default", {}, () => [!_ctx.rounded ? (vue.openBlock(), vue.createElementBlock("path", _hoisted_1$
|
|
4351
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default", {}, () => [!_ctx.rounded ? (vue.openBlock(), vue.createElementBlock("path", _hoisted_1$C)) : (vue.openBlock(), vue.createElementBlock("path", _hoisted_2$i))])]),
|
|
4314
4352
|
_: 3
|
|
4315
4353
|
}, 16, [
|
|
4316
4354
|
"width",
|
|
@@ -6494,12 +6532,12 @@ For more information, see https://www.reka-ui.com/docs/components/${componentLin
|
|
|
6494
6532
|
}
|
|
6495
6533
|
});
|
|
6496
6534
|
var ComboboxAnchor_default = ComboboxAnchor_vue_vue_type_script_setup_true_lang_default;
|
|
6497
|
-
function valueComparator(value, currentValue, comparator) {
|
|
6535
|
+
function valueComparator$1(value, currentValue, comparator) {
|
|
6498
6536
|
if (value === void 0) return false;
|
|
6499
|
-
else if (Array.isArray(value)) return value.some((val) => compare(val, currentValue, comparator));
|
|
6500
|
-
else return compare(value, currentValue, comparator);
|
|
6537
|
+
else if (Array.isArray(value)) return value.some((val) => compare$1(val, currentValue, comparator));
|
|
6538
|
+
else return compare$1(value, currentValue, comparator);
|
|
6501
6539
|
}
|
|
6502
|
-
function compare(value, currentValue, comparator) {
|
|
6540
|
+
function compare$1(value, currentValue, comparator) {
|
|
6503
6541
|
if (value === void 0 || currentValue === void 0) return false;
|
|
6504
6542
|
if (typeof value === "string") return value === currentValue;
|
|
6505
6543
|
if (typeof comparator === "function") return comparator(value, currentValue);
|
|
@@ -6593,7 +6631,7 @@ For more information, see https://www.reka-ui.com/docs/components/${componentLin
|
|
|
6593
6631
|
isUserAction.value = true;
|
|
6594
6632
|
if (props.multiple) {
|
|
6595
6633
|
const modelArray = Array.isArray(modelValue.value) ? [...modelValue.value] : [];
|
|
6596
|
-
const index = modelArray.findIndex((i) => compare(i, val, props.by));
|
|
6634
|
+
const index = modelArray.findIndex((i) => compare$1(i, val, props.by));
|
|
6597
6635
|
if (props.selectionBehavior === "toggle") {
|
|
6598
6636
|
index === -1 ? modelArray.push(val) : modelArray.splice(index, 1);
|
|
6599
6637
|
modelValue.value = modelArray;
|
|
@@ -6601,7 +6639,7 @@ For more information, see https://www.reka-ui.com/docs/components/${componentLin
|
|
|
6601
6639
|
modelValue.value = [val];
|
|
6602
6640
|
firstValue.value = val;
|
|
6603
6641
|
}
|
|
6604
|
-
} else if (props.selectionBehavior === "toggle") if (compare(modelValue.value, val, props.by)) modelValue.value = void 0;
|
|
6642
|
+
} else if (props.selectionBehavior === "toggle") if (compare$1(modelValue.value, val, props.by)) modelValue.value = void 0;
|
|
6605
6643
|
else modelValue.value = val;
|
|
6606
6644
|
else modelValue.value = val;
|
|
6607
6645
|
setTimeout(() => {
|
|
@@ -6629,7 +6667,7 @@ For more information, see https://www.reka-ui.com/docs/components/${componentLin
|
|
|
6629
6667
|
function highlightItem(value) {
|
|
6630
6668
|
if (isVirtual.value) virtualHighlightHook.trigger(value);
|
|
6631
6669
|
else {
|
|
6632
|
-
const item = getItems().find((i) => compare(i.value, value, props.by));
|
|
6670
|
+
const item = getItems().find((i) => compare$1(i.value, value, props.by));
|
|
6633
6671
|
if (item) {
|
|
6634
6672
|
highlightedElement.value = item.ref;
|
|
6635
6673
|
changeHighlight(item.ref);
|
|
@@ -7008,7 +7046,7 @@ For more information, see https://www.reka-ui.com/docs/components/${componentLin
|
|
|
7008
7046
|
const { forwardRef, currentElement } = useForwardExpose();
|
|
7009
7047
|
const rootContext = injectListboxRootContext();
|
|
7010
7048
|
const isHighlighted = vue.computed(() => currentElement.value === rootContext.highlightedElement.value);
|
|
7011
|
-
const isSelected = vue.computed(() => valueComparator(rootContext.modelValue.value, props.value, rootContext.by));
|
|
7049
|
+
const isSelected = vue.computed(() => valueComparator$1(rootContext.modelValue.value, props.value, rootContext.by));
|
|
7012
7050
|
const disabled = vue.computed(() => rootContext.disabled.value || props.disabled);
|
|
7013
7051
|
async function handleSelect2(ev) {
|
|
7014
7052
|
emits("select", ev);
|
|
@@ -8558,7 +8596,7 @@ For more information, see https://www.reka-ui.com/docs/components/${componentLin
|
|
|
8558
8596
|
onKeydown: _cache[2] || (_cache[2] = async (event) => {
|
|
8559
8597
|
const isTypingAhead = vue.unref(contentContext).searchRef.value !== "";
|
|
8560
8598
|
if (_ctx.disabled || isTypingAhead && event.key === " ") return;
|
|
8561
|
-
if (vue.unref(SELECTION_KEYS).includes(event.key)) {
|
|
8599
|
+
if (vue.unref(SELECTION_KEYS$1).includes(event.key)) {
|
|
8562
8600
|
event.currentTarget.click();
|
|
8563
8601
|
event.preventDefault();
|
|
8564
8602
|
}
|
|
@@ -11971,167 +12009,1626 @@ Defaulting to \`null\`.`);
|
|
|
11971
12009
|
}
|
|
11972
12010
|
});
|
|
11973
12011
|
var RadioGroupIndicator_default = RadioGroupIndicator_vue_vue_type_script_setup_true_lang_default;
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
if (totalValues > 2) return `Value ${index + 1} of ${totalValues}`;
|
|
11987
|
-
else if (totalValues === 2) return ["Minimum", "Maximum"][index];
|
|
11988
|
-
else return void 0;
|
|
11989
|
-
}
|
|
11990
|
-
function getClosestValueIndex(values, nextValue) {
|
|
11991
|
-
if (values.length === 1) return 0;
|
|
11992
|
-
const distances = values.map((value) => Math.abs(value - nextValue));
|
|
11993
|
-
const closestDistance = Math.min(...distances);
|
|
11994
|
-
return distances.indexOf(closestDistance);
|
|
11995
|
-
}
|
|
11996
|
-
function getThumbInBoundsOffset(width, left, direction) {
|
|
11997
|
-
const halfWidth = width / 2;
|
|
11998
|
-
const halfPercent = 50;
|
|
11999
|
-
const offset2 = linearScale([0, halfPercent], [0, halfWidth]);
|
|
12000
|
-
return (halfWidth - offset2(left) * direction) * direction;
|
|
12001
|
-
}
|
|
12002
|
-
function getStepsBetweenValues(values) {
|
|
12003
|
-
return values.slice(0, -1).map((value, index) => values[index + 1] - value);
|
|
12004
|
-
}
|
|
12005
|
-
function hasMinStepsBetweenValues(values, minStepsBetweenValues) {
|
|
12006
|
-
if (minStepsBetweenValues > 0) {
|
|
12007
|
-
const stepsBetweenValues = getStepsBetweenValues(values);
|
|
12008
|
-
const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues);
|
|
12009
|
-
return actualMinStepsBetweenValues >= minStepsBetweenValues;
|
|
12010
|
-
}
|
|
12011
|
-
return true;
|
|
12012
|
-
}
|
|
12013
|
-
function linearScale(input, output) {
|
|
12014
|
-
return (value) => {
|
|
12015
|
-
if (input[0] === input[1] || output[0] === output[1]) return output[0];
|
|
12016
|
-
const ratio = (output[1] - output[0]) / (input[1] - input[0]);
|
|
12017
|
-
return output[0] + ratio * (value - input[0]);
|
|
12018
|
-
};
|
|
12012
|
+
const OPEN_KEYS = [
|
|
12013
|
+
" ",
|
|
12014
|
+
"Enter",
|
|
12015
|
+
"ArrowUp",
|
|
12016
|
+
"ArrowDown"
|
|
12017
|
+
];
|
|
12018
|
+
const SELECTION_KEYS = [" ", "Enter"];
|
|
12019
|
+
const CONTENT_MARGIN = 10;
|
|
12020
|
+
function valueComparator(value, currentValue, comparator) {
|
|
12021
|
+
if (value === void 0) return false;
|
|
12022
|
+
else if (Array.isArray(value)) return value.some((val) => compare(val, currentValue, comparator));
|
|
12023
|
+
else return compare(value, currentValue, comparator);
|
|
12019
12024
|
}
|
|
12020
|
-
function
|
|
12021
|
-
|
|
12025
|
+
function compare(value, currentValue, comparator) {
|
|
12026
|
+
if (value === void 0 || currentValue === void 0) return false;
|
|
12027
|
+
if (typeof value === "string") return value === currentValue;
|
|
12028
|
+
if (typeof comparator === "function") return comparator(value, currentValue);
|
|
12029
|
+
if (typeof comparator === "string") return value?.[comparator] === currentValue?.[comparator];
|
|
12030
|
+
return isEqual(value, currentValue);
|
|
12022
12031
|
}
|
|
12023
|
-
function
|
|
12024
|
-
|
|
12025
|
-
return Math.round(value * rounder) / rounder;
|
|
12032
|
+
function shouldShowPlaceholder(value) {
|
|
12033
|
+
return value === void 0 || value === null || value === "" || Array.isArray(value) && value.length === 0;
|
|
12026
12034
|
}
|
|
12027
|
-
const
|
|
12028
|
-
|
|
12029
|
-
"
|
|
12030
|
-
"ArrowDown",
|
|
12031
|
-
"ArrowLeft",
|
|
12032
|
-
"ArrowRight"
|
|
12033
|
-
];
|
|
12034
|
-
const BACK_KEYS = {
|
|
12035
|
-
"from-left": [
|
|
12036
|
-
"Home",
|
|
12037
|
-
"PageDown",
|
|
12038
|
-
"ArrowDown",
|
|
12039
|
-
"ArrowLeft"
|
|
12040
|
-
],
|
|
12041
|
-
"from-right": [
|
|
12042
|
-
"Home",
|
|
12043
|
-
"PageDown",
|
|
12044
|
-
"ArrowDown",
|
|
12045
|
-
"ArrowRight"
|
|
12046
|
-
],
|
|
12047
|
-
"from-bottom": [
|
|
12048
|
-
"Home",
|
|
12049
|
-
"PageDown",
|
|
12050
|
-
"ArrowDown",
|
|
12051
|
-
"ArrowLeft"
|
|
12052
|
-
],
|
|
12053
|
-
"from-top": [
|
|
12054
|
-
"Home",
|
|
12055
|
-
"PageUp",
|
|
12056
|
-
"ArrowUp",
|
|
12057
|
-
"ArrowLeft"
|
|
12058
|
-
]
|
|
12035
|
+
const _hoisted_1$B = {
|
|
12036
|
+
key: 0,
|
|
12037
|
+
value: ""
|
|
12059
12038
|
};
|
|
12060
|
-
const [
|
|
12061
|
-
var
|
|
12062
|
-
|
|
12039
|
+
const [injectSelectRootContext, provideSelectRootContext] = createContext("SelectRoot");
|
|
12040
|
+
var SelectRoot_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
12041
|
+
inheritAttrs: false,
|
|
12042
|
+
__name: "SelectRoot",
|
|
12063
12043
|
props: {
|
|
12044
|
+
open: {
|
|
12045
|
+
type: Boolean,
|
|
12046
|
+
required: false,
|
|
12047
|
+
default: void 0
|
|
12048
|
+
},
|
|
12049
|
+
defaultOpen: {
|
|
12050
|
+
type: Boolean,
|
|
12051
|
+
required: false
|
|
12052
|
+
},
|
|
12053
|
+
defaultValue: {
|
|
12054
|
+
type: null,
|
|
12055
|
+
required: false
|
|
12056
|
+
},
|
|
12057
|
+
modelValue: {
|
|
12058
|
+
type: null,
|
|
12059
|
+
required: false,
|
|
12060
|
+
default: void 0
|
|
12061
|
+
},
|
|
12062
|
+
by: {
|
|
12063
|
+
type: [String, Function],
|
|
12064
|
+
required: false
|
|
12065
|
+
},
|
|
12064
12066
|
dir: {
|
|
12065
12067
|
type: String,
|
|
12066
12068
|
required: false
|
|
12067
12069
|
},
|
|
12068
|
-
|
|
12069
|
-
type:
|
|
12070
|
-
required:
|
|
12070
|
+
multiple: {
|
|
12071
|
+
type: Boolean,
|
|
12072
|
+
required: false
|
|
12071
12073
|
},
|
|
12072
|
-
|
|
12073
|
-
type:
|
|
12074
|
-
required:
|
|
12074
|
+
autocomplete: {
|
|
12075
|
+
type: String,
|
|
12076
|
+
required: false
|
|
12075
12077
|
},
|
|
12076
|
-
|
|
12078
|
+
disabled: {
|
|
12077
12079
|
type: Boolean,
|
|
12078
|
-
required:
|
|
12080
|
+
required: false
|
|
12081
|
+
},
|
|
12082
|
+
name: {
|
|
12083
|
+
type: String,
|
|
12084
|
+
required: false
|
|
12085
|
+
},
|
|
12086
|
+
required: {
|
|
12087
|
+
type: Boolean,
|
|
12088
|
+
required: false
|
|
12079
12089
|
}
|
|
12080
12090
|
},
|
|
12081
|
-
emits: [
|
|
12082
|
-
"slideEnd",
|
|
12083
|
-
"slideStart",
|
|
12084
|
-
"slideMove",
|
|
12085
|
-
"homeKeyDown",
|
|
12086
|
-
"endKeyDown",
|
|
12087
|
-
"stepKeyDown"
|
|
12088
|
-
],
|
|
12091
|
+
emits: ["update:modelValue", "update:open"],
|
|
12089
12092
|
setup(__props, { emit: __emit }) {
|
|
12090
12093
|
const props = __props;
|
|
12091
12094
|
const emits = __emit;
|
|
12092
|
-
const {
|
|
12093
|
-
const
|
|
12094
|
-
|
|
12095
|
-
|
|
12096
|
-
|
|
12097
|
-
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
|
|
12117
|
-
|
|
12095
|
+
const { required, disabled, multiple, dir: propDir } = vue.toRefs(props);
|
|
12096
|
+
const modelValue = useVModel(props, "modelValue", emits, {
|
|
12097
|
+
defaultValue: props.defaultValue ?? (multiple.value ? [] : void 0),
|
|
12098
|
+
passive: props.modelValue === void 0,
|
|
12099
|
+
deep: true
|
|
12100
|
+
});
|
|
12101
|
+
const open = useVModel(props, "open", emits, {
|
|
12102
|
+
defaultValue: props.defaultOpen,
|
|
12103
|
+
passive: props.open === void 0
|
|
12104
|
+
});
|
|
12105
|
+
const triggerElement = vue.ref();
|
|
12106
|
+
const valueElement = vue.ref();
|
|
12107
|
+
const triggerPointerDownPosRef = vue.ref({
|
|
12108
|
+
x: 0,
|
|
12109
|
+
y: 0
|
|
12110
|
+
});
|
|
12111
|
+
const isEmptyModelValue = vue.computed(() => {
|
|
12112
|
+
if (multiple.value && Array.isArray(modelValue.value)) return modelValue.value?.length === 0;
|
|
12113
|
+
else return isNullish(modelValue.value);
|
|
12114
|
+
});
|
|
12115
|
+
useCollection({ isProvider: true });
|
|
12116
|
+
const dir = useDirection(propDir);
|
|
12117
|
+
const isFormControl = useFormControl(triggerElement);
|
|
12118
|
+
const optionsSet = vue.ref(/* @__PURE__ */ new Set());
|
|
12119
|
+
const nativeSelectKey = vue.computed(() => {
|
|
12120
|
+
return Array.from(optionsSet.value).map((option) => option.value).join(";");
|
|
12121
|
+
});
|
|
12122
|
+
function handleValueChange(value) {
|
|
12123
|
+
if (multiple.value) {
|
|
12124
|
+
const array = Array.isArray(modelValue.value) ? [...modelValue.value] : [];
|
|
12125
|
+
const index = array.findIndex((i) => compare(i, value, props.by));
|
|
12126
|
+
index === -1 ? array.push(value) : array.splice(index, 1);
|
|
12127
|
+
modelValue.value = [...array];
|
|
12128
|
+
} else modelValue.value = value;
|
|
12129
|
+
}
|
|
12130
|
+
function getOption(value) {
|
|
12131
|
+
return Array.from(optionsSet.value).find((option) => valueComparator(value, option.value, props.by));
|
|
12132
|
+
}
|
|
12133
|
+
provideSelectRootContext({
|
|
12134
|
+
triggerElement,
|
|
12135
|
+
onTriggerChange: (node) => {
|
|
12136
|
+
triggerElement.value = node;
|
|
12137
|
+
},
|
|
12138
|
+
valueElement,
|
|
12139
|
+
onValueElementChange: (node) => {
|
|
12140
|
+
valueElement.value = node;
|
|
12141
|
+
},
|
|
12142
|
+
contentId: "",
|
|
12143
|
+
modelValue,
|
|
12144
|
+
onValueChange: handleValueChange,
|
|
12145
|
+
by: props.by,
|
|
12146
|
+
open,
|
|
12147
|
+
multiple,
|
|
12148
|
+
required,
|
|
12149
|
+
onOpenChange: (value) => {
|
|
12150
|
+
open.value = value;
|
|
12151
|
+
},
|
|
12152
|
+
dir,
|
|
12153
|
+
triggerPointerDownPosRef,
|
|
12154
|
+
disabled,
|
|
12155
|
+
isEmptyModelValue,
|
|
12156
|
+
optionsSet,
|
|
12157
|
+
onOptionAdd: (option) => {
|
|
12158
|
+
const existingOption = getOption(option.value);
|
|
12159
|
+
if (existingOption) optionsSet.value.delete(existingOption);
|
|
12160
|
+
optionsSet.value.add(option);
|
|
12161
|
+
},
|
|
12162
|
+
onOptionRemove: (option) => {
|
|
12163
|
+
const existingOption = getOption(option.value);
|
|
12164
|
+
if (existingOption) optionsSet.value.delete(existingOption);
|
|
12165
|
+
}
|
|
12118
12166
|
});
|
|
12119
12167
|
return (_ctx, _cache) => {
|
|
12120
|
-
return vue.openBlock(), vue.createBlock(
|
|
12121
|
-
|
|
12122
|
-
|
|
12123
|
-
|
|
12124
|
-
|
|
12125
|
-
|
|
12126
|
-
|
|
12127
|
-
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12168
|
+
return vue.openBlock(), vue.createBlock(vue.unref(PopperRoot_default), null, {
|
|
12169
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default", {
|
|
12170
|
+
modelValue: vue.unref(modelValue),
|
|
12171
|
+
open: vue.unref(open)
|
|
12172
|
+
}), vue.unref(isFormControl) ? (vue.openBlock(), vue.createBlock(BubbleSelect_default, {
|
|
12173
|
+
key: nativeSelectKey.value,
|
|
12174
|
+
"aria-hidden": "true",
|
|
12175
|
+
tabindex: "-1",
|
|
12176
|
+
multiple: vue.unref(multiple),
|
|
12177
|
+
required: vue.unref(required),
|
|
12178
|
+
name: _ctx.name,
|
|
12179
|
+
autocomplete: _ctx.autocomplete,
|
|
12180
|
+
disabled: vue.unref(disabled),
|
|
12181
|
+
value: vue.unref(modelValue)
|
|
12182
|
+
}, {
|
|
12183
|
+
default: vue.withCtx(() => [vue.unref(isNullish)(vue.unref(modelValue)) ? (vue.openBlock(), vue.createElementBlock("option", _hoisted_1$B)) : vue.createCommentVNode("v-if", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(Array.from(optionsSet.value), (option) => {
|
|
12184
|
+
return vue.openBlock(), vue.createElementBlock("option", vue.mergeProps({ key: option.value ?? "" }, { ref_for: true }, option), null, 16);
|
|
12185
|
+
}), 128))]),
|
|
12186
|
+
_: 1
|
|
12187
|
+
}, 8, [
|
|
12188
|
+
"multiple",
|
|
12189
|
+
"required",
|
|
12190
|
+
"name",
|
|
12191
|
+
"autocomplete",
|
|
12192
|
+
"disabled",
|
|
12193
|
+
"value"
|
|
12194
|
+
])) : vue.createCommentVNode("v-if", true)]),
|
|
12195
|
+
_: 3
|
|
12196
|
+
});
|
|
12197
|
+
};
|
|
12198
|
+
}
|
|
12199
|
+
});
|
|
12200
|
+
var SelectRoot_default = SelectRoot_vue_vue_type_script_setup_true_lang_default;
|
|
12201
|
+
var BubbleSelect_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
12202
|
+
__name: "BubbleSelect",
|
|
12203
|
+
props: {
|
|
12204
|
+
autocomplete: {
|
|
12205
|
+
type: String,
|
|
12206
|
+
required: false
|
|
12207
|
+
},
|
|
12208
|
+
autofocus: {
|
|
12209
|
+
type: Boolean,
|
|
12210
|
+
required: false
|
|
12211
|
+
},
|
|
12212
|
+
disabled: {
|
|
12213
|
+
type: Boolean,
|
|
12214
|
+
required: false
|
|
12215
|
+
},
|
|
12216
|
+
form: {
|
|
12217
|
+
type: String,
|
|
12218
|
+
required: false
|
|
12219
|
+
},
|
|
12220
|
+
multiple: {
|
|
12221
|
+
type: Boolean,
|
|
12222
|
+
required: false
|
|
12223
|
+
},
|
|
12224
|
+
name: {
|
|
12225
|
+
type: String,
|
|
12226
|
+
required: false
|
|
12227
|
+
},
|
|
12228
|
+
required: {
|
|
12229
|
+
type: Boolean,
|
|
12230
|
+
required: false
|
|
12231
|
+
},
|
|
12232
|
+
size: {
|
|
12233
|
+
type: Number,
|
|
12234
|
+
required: false
|
|
12235
|
+
},
|
|
12236
|
+
value: {
|
|
12237
|
+
type: null,
|
|
12238
|
+
required: false
|
|
12239
|
+
}
|
|
12240
|
+
},
|
|
12241
|
+
setup(__props) {
|
|
12242
|
+
const props = __props;
|
|
12243
|
+
const selectElement = vue.ref();
|
|
12244
|
+
const rootContext = injectSelectRootContext();
|
|
12245
|
+
vue.watch(() => props.value, (cur, prev) => {
|
|
12246
|
+
const selectProto = window.HTMLSelectElement.prototype;
|
|
12247
|
+
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
12248
|
+
const setValue = descriptor.set;
|
|
12249
|
+
if (cur !== prev && setValue && selectElement.value) {
|
|
12250
|
+
const event = new Event("change", { bubbles: true });
|
|
12251
|
+
setValue.call(selectElement.value, cur);
|
|
12252
|
+
selectElement.value.dispatchEvent(event);
|
|
12253
|
+
}
|
|
12254
|
+
});
|
|
12255
|
+
function handleInput(event) {
|
|
12256
|
+
rootContext.onValueChange(event.target.value);
|
|
12257
|
+
}
|
|
12258
|
+
return (_ctx, _cache) => {
|
|
12259
|
+
return vue.openBlock(), vue.createBlock(vue.unref(VisuallyHidden_default), { "as-child": "" }, {
|
|
12260
|
+
default: vue.withCtx(() => [vue.createElementVNode("select", vue.mergeProps({
|
|
12261
|
+
ref_key: "selectElement",
|
|
12262
|
+
ref: selectElement
|
|
12263
|
+
}, props, { onInput: handleInput }), [vue.renderSlot(_ctx.$slots, "default")], 16)]),
|
|
12264
|
+
_: 3
|
|
12265
|
+
});
|
|
12266
|
+
};
|
|
12267
|
+
}
|
|
12268
|
+
});
|
|
12269
|
+
var BubbleSelect_default = BubbleSelect_vue_vue_type_script_setup_true_lang_default;
|
|
12270
|
+
var SelectPopperPosition_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
12271
|
+
__name: "SelectPopperPosition",
|
|
12272
|
+
props: {
|
|
12273
|
+
side: {
|
|
12274
|
+
type: null,
|
|
12275
|
+
required: false
|
|
12276
|
+
},
|
|
12277
|
+
sideOffset: {
|
|
12278
|
+
type: Number,
|
|
12279
|
+
required: false
|
|
12280
|
+
},
|
|
12281
|
+
sideFlip: {
|
|
12282
|
+
type: Boolean,
|
|
12283
|
+
required: false
|
|
12284
|
+
},
|
|
12285
|
+
align: {
|
|
12286
|
+
type: null,
|
|
12287
|
+
required: false,
|
|
12288
|
+
default: "start"
|
|
12289
|
+
},
|
|
12290
|
+
alignOffset: {
|
|
12291
|
+
type: Number,
|
|
12292
|
+
required: false
|
|
12293
|
+
},
|
|
12294
|
+
alignFlip: {
|
|
12295
|
+
type: Boolean,
|
|
12296
|
+
required: false
|
|
12297
|
+
},
|
|
12298
|
+
avoidCollisions: {
|
|
12299
|
+
type: Boolean,
|
|
12300
|
+
required: false
|
|
12301
|
+
},
|
|
12302
|
+
collisionBoundary: {
|
|
12303
|
+
type: null,
|
|
12304
|
+
required: false
|
|
12305
|
+
},
|
|
12306
|
+
collisionPadding: {
|
|
12307
|
+
type: [Number, Object],
|
|
12308
|
+
required: false,
|
|
12309
|
+
default: CONTENT_MARGIN
|
|
12310
|
+
},
|
|
12311
|
+
arrowPadding: {
|
|
12312
|
+
type: Number,
|
|
12313
|
+
required: false
|
|
12314
|
+
},
|
|
12315
|
+
sticky: {
|
|
12316
|
+
type: String,
|
|
12317
|
+
required: false
|
|
12318
|
+
},
|
|
12319
|
+
hideWhenDetached: {
|
|
12320
|
+
type: Boolean,
|
|
12321
|
+
required: false
|
|
12322
|
+
},
|
|
12323
|
+
positionStrategy: {
|
|
12324
|
+
type: String,
|
|
12325
|
+
required: false
|
|
12326
|
+
},
|
|
12327
|
+
updatePositionStrategy: {
|
|
12328
|
+
type: String,
|
|
12329
|
+
required: false
|
|
12330
|
+
},
|
|
12331
|
+
disableUpdateOnLayoutShift: {
|
|
12332
|
+
type: Boolean,
|
|
12333
|
+
required: false
|
|
12334
|
+
},
|
|
12335
|
+
prioritizePosition: {
|
|
12336
|
+
type: Boolean,
|
|
12337
|
+
required: false
|
|
12338
|
+
},
|
|
12339
|
+
reference: {
|
|
12340
|
+
type: null,
|
|
12341
|
+
required: false
|
|
12342
|
+
},
|
|
12343
|
+
asChild: {
|
|
12344
|
+
type: Boolean,
|
|
12345
|
+
required: false
|
|
12346
|
+
},
|
|
12347
|
+
as: {
|
|
12348
|
+
type: null,
|
|
12349
|
+
required: false
|
|
12350
|
+
}
|
|
12351
|
+
},
|
|
12352
|
+
setup(__props) {
|
|
12353
|
+
const props = __props;
|
|
12354
|
+
const forwarded = useForwardProps(props);
|
|
12355
|
+
return (_ctx, _cache) => {
|
|
12356
|
+
return vue.openBlock(), vue.createBlock(vue.unref(PopperContent_default), vue.mergeProps(vue.unref(forwarded), { style: {
|
|
12357
|
+
"boxSizing": "border-box",
|
|
12358
|
+
"--reka-select-content-transform-origin": "var(--reka-popper-transform-origin)",
|
|
12359
|
+
"--reka-select-content-available-width": "var(--reka-popper-available-width)",
|
|
12360
|
+
"--reka-select-content-available-height": "var(--reka-popper-available-height)",
|
|
12361
|
+
"--reka-select-trigger-width": "var(--reka-popper-anchor-width)",
|
|
12362
|
+
"--reka-select-trigger-height": "var(--reka-popper-anchor-height)"
|
|
12363
|
+
} }), {
|
|
12364
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
12365
|
+
_: 3
|
|
12366
|
+
}, 16);
|
|
12367
|
+
};
|
|
12368
|
+
}
|
|
12369
|
+
});
|
|
12370
|
+
var SelectPopperPosition_default = SelectPopperPosition_vue_vue_type_script_setup_true_lang_default;
|
|
12371
|
+
const SelectContentDefaultContextValue = {
|
|
12372
|
+
onViewportChange: () => {
|
|
12373
|
+
},
|
|
12374
|
+
itemTextRefCallback: () => {
|
|
12375
|
+
},
|
|
12376
|
+
itemRefCallback: () => {
|
|
12377
|
+
}
|
|
12378
|
+
};
|
|
12379
|
+
const [injectSelectContentContext, provideSelectContentContext] = createContext("SelectContent");
|
|
12380
|
+
var SelectContentImpl_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
12381
|
+
__name: "SelectContentImpl",
|
|
12382
|
+
props: {
|
|
12383
|
+
position: {
|
|
12384
|
+
type: String,
|
|
12385
|
+
required: false,
|
|
12386
|
+
default: "item-aligned"
|
|
12387
|
+
},
|
|
12388
|
+
bodyLock: {
|
|
12389
|
+
type: Boolean,
|
|
12390
|
+
required: false,
|
|
12391
|
+
default: true
|
|
12392
|
+
},
|
|
12393
|
+
side: {
|
|
12394
|
+
type: null,
|
|
12395
|
+
required: false
|
|
12396
|
+
},
|
|
12397
|
+
sideOffset: {
|
|
12398
|
+
type: Number,
|
|
12399
|
+
required: false
|
|
12400
|
+
},
|
|
12401
|
+
sideFlip: {
|
|
12402
|
+
type: Boolean,
|
|
12403
|
+
required: false
|
|
12404
|
+
},
|
|
12405
|
+
align: {
|
|
12406
|
+
type: null,
|
|
12407
|
+
required: false,
|
|
12408
|
+
default: "start"
|
|
12409
|
+
},
|
|
12410
|
+
alignOffset: {
|
|
12411
|
+
type: Number,
|
|
12412
|
+
required: false
|
|
12413
|
+
},
|
|
12414
|
+
alignFlip: {
|
|
12415
|
+
type: Boolean,
|
|
12416
|
+
required: false
|
|
12417
|
+
},
|
|
12418
|
+
avoidCollisions: {
|
|
12419
|
+
type: Boolean,
|
|
12420
|
+
required: false
|
|
12421
|
+
},
|
|
12422
|
+
collisionBoundary: {
|
|
12423
|
+
type: null,
|
|
12424
|
+
required: false
|
|
12425
|
+
},
|
|
12426
|
+
collisionPadding: {
|
|
12427
|
+
type: [Number, Object],
|
|
12428
|
+
required: false
|
|
12429
|
+
},
|
|
12430
|
+
arrowPadding: {
|
|
12431
|
+
type: Number,
|
|
12432
|
+
required: false
|
|
12433
|
+
},
|
|
12434
|
+
sticky: {
|
|
12435
|
+
type: String,
|
|
12436
|
+
required: false
|
|
12437
|
+
},
|
|
12438
|
+
hideWhenDetached: {
|
|
12439
|
+
type: Boolean,
|
|
12440
|
+
required: false
|
|
12441
|
+
},
|
|
12442
|
+
positionStrategy: {
|
|
12443
|
+
type: String,
|
|
12444
|
+
required: false
|
|
12445
|
+
},
|
|
12446
|
+
updatePositionStrategy: {
|
|
12447
|
+
type: String,
|
|
12448
|
+
required: false
|
|
12449
|
+
},
|
|
12450
|
+
disableUpdateOnLayoutShift: {
|
|
12451
|
+
type: Boolean,
|
|
12452
|
+
required: false
|
|
12453
|
+
},
|
|
12454
|
+
prioritizePosition: {
|
|
12455
|
+
type: Boolean,
|
|
12456
|
+
required: false
|
|
12457
|
+
},
|
|
12458
|
+
reference: {
|
|
12459
|
+
type: null,
|
|
12460
|
+
required: false
|
|
12461
|
+
},
|
|
12462
|
+
asChild: {
|
|
12463
|
+
type: Boolean,
|
|
12464
|
+
required: false
|
|
12465
|
+
},
|
|
12466
|
+
as: {
|
|
12467
|
+
type: null,
|
|
12468
|
+
required: false
|
|
12469
|
+
}
|
|
12470
|
+
},
|
|
12471
|
+
emits: [
|
|
12472
|
+
"closeAutoFocus",
|
|
12473
|
+
"escapeKeyDown",
|
|
12474
|
+
"pointerDownOutside"
|
|
12475
|
+
],
|
|
12476
|
+
setup(__props, { emit: __emit }) {
|
|
12477
|
+
const props = __props;
|
|
12478
|
+
const emits = __emit;
|
|
12479
|
+
const rootContext = injectSelectRootContext();
|
|
12480
|
+
useFocusGuards();
|
|
12481
|
+
useBodyScrollLock(props.bodyLock);
|
|
12482
|
+
const { CollectionSlot, getItems } = useCollection();
|
|
12483
|
+
const content = vue.ref();
|
|
12484
|
+
useHideOthers(content);
|
|
12485
|
+
const { search, handleTypeaheadSearch } = useTypeahead();
|
|
12486
|
+
const viewport = vue.ref();
|
|
12487
|
+
const selectedItem = vue.ref();
|
|
12488
|
+
const selectedItemText = vue.ref();
|
|
12489
|
+
const isPositioned = vue.ref(false);
|
|
12490
|
+
const firstValidItemFoundRef = vue.ref(false);
|
|
12491
|
+
const firstSelectedItemInArrayFoundRef = vue.ref(false);
|
|
12492
|
+
function focusSelectedItem() {
|
|
12493
|
+
if (selectedItem.value && content.value) focusFirst$1([selectedItem.value, content.value]);
|
|
12494
|
+
}
|
|
12495
|
+
vue.watch(isPositioned, () => {
|
|
12496
|
+
focusSelectedItem();
|
|
12497
|
+
});
|
|
12498
|
+
const { onOpenChange, triggerPointerDownPosRef } = rootContext;
|
|
12499
|
+
vue.watchEffect((cleanupFn) => {
|
|
12500
|
+
if (!content.value) return;
|
|
12501
|
+
let pointerMoveDelta = {
|
|
12502
|
+
x: 0,
|
|
12503
|
+
y: 0
|
|
12504
|
+
};
|
|
12505
|
+
const handlePointerMove = (event) => {
|
|
12506
|
+
pointerMoveDelta = {
|
|
12507
|
+
x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.value?.x ?? 0)),
|
|
12508
|
+
y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.value?.y ?? 0))
|
|
12509
|
+
};
|
|
12510
|
+
};
|
|
12511
|
+
const handlePointerUp = (event) => {
|
|
12512
|
+
if (event.pointerType === "touch") return;
|
|
12513
|
+
if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) event.preventDefault();
|
|
12514
|
+
else if (!content.value?.contains(event.target)) onOpenChange(false);
|
|
12515
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
12516
|
+
triggerPointerDownPosRef.value = null;
|
|
12517
|
+
};
|
|
12518
|
+
if (triggerPointerDownPosRef.value !== null) {
|
|
12519
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
12520
|
+
document.addEventListener("pointerup", handlePointerUp, {
|
|
12521
|
+
capture: true,
|
|
12522
|
+
once: true
|
|
12523
|
+
});
|
|
12524
|
+
}
|
|
12525
|
+
cleanupFn(() => {
|
|
12526
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
12527
|
+
document.removeEventListener("pointerup", handlePointerUp, { capture: true });
|
|
12528
|
+
});
|
|
12529
|
+
});
|
|
12530
|
+
function handleKeyDown(event) {
|
|
12531
|
+
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
12532
|
+
if (event.key === "Tab") event.preventDefault();
|
|
12533
|
+
if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key, getItems());
|
|
12534
|
+
if ([
|
|
12535
|
+
"ArrowUp",
|
|
12536
|
+
"ArrowDown",
|
|
12537
|
+
"Home",
|
|
12538
|
+
"End"
|
|
12539
|
+
].includes(event.key)) {
|
|
12540
|
+
const collectionItems = getItems().map((i) => i.ref);
|
|
12541
|
+
let candidateNodes = [...collectionItems];
|
|
12542
|
+
if (["ArrowUp", "End"].includes(event.key)) candidateNodes = candidateNodes.slice().reverse();
|
|
12543
|
+
if (["ArrowUp", "ArrowDown"].includes(event.key)) {
|
|
12544
|
+
const currentElement = event.target;
|
|
12545
|
+
const currentIndex = candidateNodes.indexOf(currentElement);
|
|
12546
|
+
candidateNodes = candidateNodes.slice(currentIndex + 1);
|
|
12547
|
+
}
|
|
12548
|
+
setTimeout(() => focusFirst$1(candidateNodes));
|
|
12549
|
+
event.preventDefault();
|
|
12550
|
+
}
|
|
12551
|
+
}
|
|
12552
|
+
const pickedProps = vue.computed(() => {
|
|
12553
|
+
if (props.position === "popper") return props;
|
|
12554
|
+
else return {};
|
|
12555
|
+
});
|
|
12556
|
+
const forwardedProps = useForwardProps(pickedProps.value);
|
|
12557
|
+
provideSelectContentContext({
|
|
12558
|
+
content,
|
|
12559
|
+
viewport,
|
|
12560
|
+
onViewportChange: (node) => {
|
|
12561
|
+
viewport.value = node;
|
|
12562
|
+
},
|
|
12563
|
+
itemRefCallback: (node, value, disabled) => {
|
|
12564
|
+
const isFirstValidItem = !firstValidItemFoundRef.value && !disabled;
|
|
12565
|
+
const isSelectedItem = valueComparator(rootContext.modelValue.value, value, rootContext.by);
|
|
12566
|
+
if (rootContext.multiple.value) {
|
|
12567
|
+
if (firstSelectedItemInArrayFoundRef.value) return;
|
|
12568
|
+
if (isSelectedItem || isFirstValidItem) {
|
|
12569
|
+
selectedItem.value = node;
|
|
12570
|
+
if (isSelectedItem) firstSelectedItemInArrayFoundRef.value = true;
|
|
12571
|
+
}
|
|
12572
|
+
} else if (isSelectedItem || isFirstValidItem) selectedItem.value = node;
|
|
12573
|
+
if (isFirstValidItem) firstValidItemFoundRef.value = true;
|
|
12574
|
+
},
|
|
12575
|
+
selectedItem,
|
|
12576
|
+
selectedItemText,
|
|
12577
|
+
onItemLeave: () => {
|
|
12578
|
+
content.value?.focus();
|
|
12579
|
+
},
|
|
12580
|
+
itemTextRefCallback: (node, value, disabled) => {
|
|
12581
|
+
const isFirstValidItem = !firstValidItemFoundRef.value && !disabled;
|
|
12582
|
+
const isSelectedItem = valueComparator(rootContext.modelValue.value, value, rootContext.by);
|
|
12583
|
+
if (isSelectedItem || isFirstValidItem) selectedItemText.value = node;
|
|
12584
|
+
},
|
|
12585
|
+
focusSelectedItem,
|
|
12586
|
+
position: props.position,
|
|
12587
|
+
isPositioned,
|
|
12588
|
+
searchRef: search
|
|
12589
|
+
});
|
|
12590
|
+
return (_ctx, _cache) => {
|
|
12591
|
+
return vue.openBlock(), vue.createBlock(vue.unref(CollectionSlot), null, {
|
|
12592
|
+
default: vue.withCtx(() => [vue.createVNode(vue.unref(FocusScope_default), {
|
|
12593
|
+
"as-child": "",
|
|
12594
|
+
onMountAutoFocus: _cache[6] || (_cache[6] = vue.withModifiers(() => {
|
|
12595
|
+
}, ["prevent"])),
|
|
12596
|
+
onUnmountAutoFocus: _cache[7] || (_cache[7] = (event) => {
|
|
12597
|
+
emits("closeAutoFocus", event);
|
|
12598
|
+
if (event.defaultPrevented) return;
|
|
12599
|
+
vue.unref(rootContext).triggerElement.value?.focus({ preventScroll: true });
|
|
12600
|
+
event.preventDefault();
|
|
12601
|
+
})
|
|
12602
|
+
}, {
|
|
12603
|
+
default: vue.withCtx(() => [vue.createVNode(vue.unref(DismissableLayer_default), {
|
|
12604
|
+
"as-child": "",
|
|
12605
|
+
"disable-outside-pointer-events": "",
|
|
12606
|
+
onFocusOutside: _cache[2] || (_cache[2] = vue.withModifiers(() => {
|
|
12607
|
+
}, ["prevent"])),
|
|
12608
|
+
onDismiss: _cache[3] || (_cache[3] = ($event) => vue.unref(rootContext).onOpenChange(false)),
|
|
12609
|
+
onEscapeKeyDown: _cache[4] || (_cache[4] = ($event) => emits("escapeKeyDown", $event)),
|
|
12610
|
+
onPointerDownOutside: _cache[5] || (_cache[5] = ($event) => emits("pointerDownOutside", $event))
|
|
12611
|
+
}, {
|
|
12612
|
+
default: vue.withCtx(() => [(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.position === "popper" ? SelectPopperPosition_default : SelectItemAlignedPosition_default), vue.mergeProps({
|
|
12613
|
+
..._ctx.$attrs,
|
|
12614
|
+
...vue.unref(forwardedProps)
|
|
12615
|
+
}, {
|
|
12616
|
+
id: vue.unref(rootContext).contentId,
|
|
12617
|
+
ref: (vnode) => {
|
|
12618
|
+
const el = vue.unref(unrefElement)(vnode);
|
|
12619
|
+
if (el?.hasAttribute("data-reka-popper-content-wrapper")) content.value = el.firstElementChild;
|
|
12620
|
+
else content.value = el;
|
|
12621
|
+
return void 0;
|
|
12622
|
+
},
|
|
12623
|
+
role: "listbox",
|
|
12624
|
+
"data-state": vue.unref(rootContext).open.value ? "open" : "closed",
|
|
12625
|
+
dir: vue.unref(rootContext).dir.value,
|
|
12626
|
+
style: {
|
|
12627
|
+
display: "flex",
|
|
12628
|
+
flexDirection: "column",
|
|
12629
|
+
outline: "none"
|
|
12630
|
+
},
|
|
12631
|
+
onContextmenu: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
12632
|
+
}, ["prevent"])),
|
|
12633
|
+
onPlaced: _cache[1] || (_cache[1] = ($event) => isPositioned.value = true),
|
|
12634
|
+
onKeydown: handleKeyDown
|
|
12635
|
+
}), {
|
|
12636
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
12637
|
+
_: 3
|
|
12638
|
+
}, 16, [
|
|
12639
|
+
"id",
|
|
12640
|
+
"data-state",
|
|
12641
|
+
"dir",
|
|
12642
|
+
"onKeydown"
|
|
12643
|
+
]))]),
|
|
12644
|
+
_: 3
|
|
12645
|
+
})]),
|
|
12646
|
+
_: 3
|
|
12647
|
+
})]),
|
|
12648
|
+
_: 3
|
|
12649
|
+
});
|
|
12650
|
+
};
|
|
12651
|
+
}
|
|
12652
|
+
});
|
|
12653
|
+
var SelectContentImpl_default = SelectContentImpl_vue_vue_type_script_setup_true_lang_default;
|
|
12654
|
+
const [injectSelectItemAlignedPositionContext, provideSelectItemAlignedPositionContext] = createContext("SelectItemAlignedPosition");
|
|
12655
|
+
var SelectItemAlignedPosition_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
12656
|
+
inheritAttrs: false,
|
|
12657
|
+
__name: "SelectItemAlignedPosition",
|
|
12658
|
+
props: {
|
|
12659
|
+
asChild: {
|
|
12660
|
+
type: Boolean,
|
|
12661
|
+
required: false
|
|
12662
|
+
},
|
|
12663
|
+
as: {
|
|
12664
|
+
type: null,
|
|
12665
|
+
required: false
|
|
12666
|
+
}
|
|
12667
|
+
},
|
|
12668
|
+
emits: ["placed"],
|
|
12669
|
+
setup(__props, { emit: __emit }) {
|
|
12670
|
+
const props = __props;
|
|
12671
|
+
const emits = __emit;
|
|
12672
|
+
const { getItems } = useCollection();
|
|
12673
|
+
const rootContext = injectSelectRootContext();
|
|
12674
|
+
const contentContext = injectSelectContentContext();
|
|
12675
|
+
const shouldExpandOnScrollRef = vue.ref(false);
|
|
12676
|
+
const shouldRepositionRef = vue.ref(true);
|
|
12677
|
+
const contentWrapperElement = vue.ref();
|
|
12678
|
+
const { forwardRef, currentElement: contentElement } = useForwardExpose();
|
|
12679
|
+
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
12680
|
+
function position() {
|
|
12681
|
+
if (rootContext.triggerElement.value && rootContext.valueElement.value && contentWrapperElement.value && contentElement.value && viewport?.value && selectedItem?.value && selectedItemText?.value) {
|
|
12682
|
+
const triggerRect = rootContext.triggerElement.value.getBoundingClientRect();
|
|
12683
|
+
const contentRect = contentElement.value.getBoundingClientRect();
|
|
12684
|
+
const valueNodeRect = rootContext.valueElement.value.getBoundingClientRect();
|
|
12685
|
+
const itemTextRect = selectedItemText.value.getBoundingClientRect();
|
|
12686
|
+
if (rootContext.dir.value !== "rtl") {
|
|
12687
|
+
const itemTextOffset = itemTextRect.left - contentRect.left;
|
|
12688
|
+
const left = valueNodeRect.left - itemTextOffset;
|
|
12689
|
+
const leftDelta = triggerRect.left - left;
|
|
12690
|
+
const minContentWidth = triggerRect.width + leftDelta;
|
|
12691
|
+
const contentWidth = Math.max(minContentWidth, contentRect.width);
|
|
12692
|
+
const rightEdge = window.innerWidth - CONTENT_MARGIN;
|
|
12693
|
+
const clampedLeft = clamp$1(left, CONTENT_MARGIN, Math.max(CONTENT_MARGIN, rightEdge - contentWidth));
|
|
12694
|
+
contentWrapperElement.value.style.minWidth = `${minContentWidth}px`;
|
|
12695
|
+
contentWrapperElement.value.style.left = `${clampedLeft}px`;
|
|
12696
|
+
} else {
|
|
12697
|
+
const itemTextOffset = contentRect.right - itemTextRect.right;
|
|
12698
|
+
const right = window.innerWidth - valueNodeRect.right - itemTextOffset;
|
|
12699
|
+
const rightDelta = window.innerWidth - triggerRect.right - right;
|
|
12700
|
+
const minContentWidth = triggerRect.width + rightDelta;
|
|
12701
|
+
const contentWidth = Math.max(minContentWidth, contentRect.width);
|
|
12702
|
+
const leftEdge = window.innerWidth - CONTENT_MARGIN;
|
|
12703
|
+
const clampedRight = clamp$1(right, CONTENT_MARGIN, Math.max(CONTENT_MARGIN, leftEdge - contentWidth));
|
|
12704
|
+
contentWrapperElement.value.style.minWidth = `${minContentWidth}px`;
|
|
12705
|
+
contentWrapperElement.value.style.right = `${clampedRight}px`;
|
|
12706
|
+
}
|
|
12707
|
+
const items = getItems().map((i) => i.ref);
|
|
12708
|
+
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
|
12709
|
+
const itemsHeight = viewport.value.scrollHeight;
|
|
12710
|
+
const contentStyles = window.getComputedStyle(contentElement.value);
|
|
12711
|
+
const contentBorderTopWidth = Number.parseInt(contentStyles.borderTopWidth, 10);
|
|
12712
|
+
const contentPaddingTop = Number.parseInt(contentStyles.paddingTop, 10);
|
|
12713
|
+
const contentBorderBottomWidth = Number.parseInt(contentStyles.borderBottomWidth, 10);
|
|
12714
|
+
const contentPaddingBottom = Number.parseInt(contentStyles.paddingBottom, 10);
|
|
12715
|
+
const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth;
|
|
12716
|
+
const minContentHeight = Math.min(selectedItem.value.offsetHeight * 5, fullContentHeight);
|
|
12717
|
+
const viewportStyles = window.getComputedStyle(viewport.value);
|
|
12718
|
+
const viewportPaddingTop = Number.parseInt(viewportStyles.paddingTop, 10);
|
|
12719
|
+
const viewportPaddingBottom = Number.parseInt(viewportStyles.paddingBottom, 10);
|
|
12720
|
+
const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN;
|
|
12721
|
+
const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;
|
|
12722
|
+
const selectedItemHalfHeight = selectedItem.value.offsetHeight / 2;
|
|
12723
|
+
const itemOffsetMiddle = selectedItem.value.offsetTop + selectedItemHalfHeight;
|
|
12724
|
+
const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle;
|
|
12725
|
+
const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle;
|
|
12726
|
+
const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle;
|
|
12727
|
+
if (willAlignWithoutTopOverflow) {
|
|
12728
|
+
const isLastItem = selectedItem.value === items[items.length - 1];
|
|
12729
|
+
contentWrapperElement.value.style.bottom = `0px`;
|
|
12730
|
+
const viewportOffsetBottom = contentElement.value.clientHeight - viewport.value.offsetTop - viewport.value.offsetHeight;
|
|
12731
|
+
const clampedTriggerMiddleToBottomEdge = Math.max(triggerMiddleToBottomEdge, selectedItemHalfHeight + (isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth);
|
|
12732
|
+
const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge;
|
|
12733
|
+
contentWrapperElement.value.style.height = `${height}px`;
|
|
12734
|
+
} else {
|
|
12735
|
+
const isFirstItem = selectedItem.value === items[0];
|
|
12736
|
+
contentWrapperElement.value.style.top = `0px`;
|
|
12737
|
+
const clampedTopEdgeToTriggerMiddle = Math.max(topEdgeToTriggerMiddle, contentBorderTopWidth + viewport.value.offsetTop + (isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight);
|
|
12738
|
+
const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom;
|
|
12739
|
+
contentWrapperElement.value.style.height = `${height}px`;
|
|
12740
|
+
viewport.value.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.value.offsetTop;
|
|
12741
|
+
}
|
|
12742
|
+
contentWrapperElement.value.style.margin = `${CONTENT_MARGIN}px 0`;
|
|
12743
|
+
contentWrapperElement.value.style.minHeight = `${minContentHeight}px`;
|
|
12744
|
+
contentWrapperElement.value.style.maxHeight = `${availableHeight}px`;
|
|
12745
|
+
emits("placed");
|
|
12746
|
+
requestAnimationFrame(() => shouldExpandOnScrollRef.value = true);
|
|
12747
|
+
}
|
|
12748
|
+
}
|
|
12749
|
+
const contentZIndex = vue.ref("");
|
|
12750
|
+
vue.onMounted(async () => {
|
|
12751
|
+
await vue.nextTick();
|
|
12752
|
+
position();
|
|
12753
|
+
if (contentElement.value) contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex;
|
|
12754
|
+
});
|
|
12755
|
+
function handleScrollButtonChange(node) {
|
|
12756
|
+
if (node && shouldRepositionRef.value === true) {
|
|
12757
|
+
position();
|
|
12758
|
+
focusSelectedItem?.();
|
|
12759
|
+
shouldRepositionRef.value = false;
|
|
12760
|
+
}
|
|
12761
|
+
}
|
|
12762
|
+
useResizeObserver(rootContext.triggerElement, () => {
|
|
12763
|
+
position();
|
|
12764
|
+
});
|
|
12765
|
+
provideSelectItemAlignedPositionContext({
|
|
12766
|
+
contentWrapper: contentWrapperElement,
|
|
12767
|
+
shouldExpandOnScrollRef,
|
|
12768
|
+
onScrollButtonChange: handleScrollButtonChange
|
|
12769
|
+
});
|
|
12770
|
+
return (_ctx, _cache) => {
|
|
12771
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
12772
|
+
ref_key: "contentWrapperElement",
|
|
12773
|
+
ref: contentWrapperElement,
|
|
12774
|
+
style: vue.normalizeStyle({
|
|
12775
|
+
display: "flex",
|
|
12776
|
+
flexDirection: "column",
|
|
12777
|
+
position: "fixed",
|
|
12778
|
+
zIndex: contentZIndex.value
|
|
12779
|
+
})
|
|
12780
|
+
}, [vue.createVNode(vue.unref(Primitive), vue.mergeProps({
|
|
12781
|
+
ref: vue.unref(forwardRef),
|
|
12782
|
+
style: {
|
|
12783
|
+
boxSizing: "border-box",
|
|
12784
|
+
maxHeight: "100%"
|
|
12785
|
+
}
|
|
12786
|
+
}, {
|
|
12787
|
+
..._ctx.$attrs,
|
|
12788
|
+
...props
|
|
12789
|
+
}), {
|
|
12790
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
12791
|
+
_: 3
|
|
12792
|
+
}, 16)], 4);
|
|
12793
|
+
};
|
|
12794
|
+
}
|
|
12795
|
+
});
|
|
12796
|
+
var SelectItemAlignedPosition_default = SelectItemAlignedPosition_vue_vue_type_script_setup_true_lang_default;
|
|
12797
|
+
var SelectProvider_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
12798
|
+
inheritAttrs: false,
|
|
12799
|
+
__name: "SelectProvider",
|
|
12800
|
+
props: { context: {
|
|
12801
|
+
type: Object,
|
|
12802
|
+
required: true
|
|
12803
|
+
} },
|
|
12804
|
+
setup(__props) {
|
|
12805
|
+
const props = __props;
|
|
12806
|
+
provideSelectRootContext(props.context);
|
|
12807
|
+
provideSelectContentContext(SelectContentDefaultContextValue);
|
|
12808
|
+
return (_ctx, _cache) => {
|
|
12809
|
+
return vue.renderSlot(_ctx.$slots, "default");
|
|
12810
|
+
};
|
|
12811
|
+
}
|
|
12812
|
+
});
|
|
12813
|
+
var SelectProvider_default = SelectProvider_vue_vue_type_script_setup_true_lang_default;
|
|
12814
|
+
const _hoisted_1$A = { key: 1 };
|
|
12815
|
+
var SelectContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
12816
|
+
inheritAttrs: false,
|
|
12817
|
+
__name: "SelectContent",
|
|
12818
|
+
props: {
|
|
12819
|
+
forceMount: {
|
|
12820
|
+
type: Boolean,
|
|
12821
|
+
required: false
|
|
12822
|
+
},
|
|
12823
|
+
position: {
|
|
12824
|
+
type: String,
|
|
12825
|
+
required: false
|
|
12826
|
+
},
|
|
12827
|
+
bodyLock: {
|
|
12828
|
+
type: Boolean,
|
|
12829
|
+
required: false
|
|
12830
|
+
},
|
|
12831
|
+
side: {
|
|
12832
|
+
type: null,
|
|
12833
|
+
required: false
|
|
12834
|
+
},
|
|
12835
|
+
sideOffset: {
|
|
12836
|
+
type: Number,
|
|
12837
|
+
required: false
|
|
12838
|
+
},
|
|
12839
|
+
sideFlip: {
|
|
12840
|
+
type: Boolean,
|
|
12841
|
+
required: false
|
|
12842
|
+
},
|
|
12843
|
+
align: {
|
|
12844
|
+
type: null,
|
|
12845
|
+
required: false
|
|
12846
|
+
},
|
|
12847
|
+
alignOffset: {
|
|
12848
|
+
type: Number,
|
|
12849
|
+
required: false
|
|
12850
|
+
},
|
|
12851
|
+
alignFlip: {
|
|
12852
|
+
type: Boolean,
|
|
12853
|
+
required: false
|
|
12854
|
+
},
|
|
12855
|
+
avoidCollisions: {
|
|
12856
|
+
type: Boolean,
|
|
12857
|
+
required: false
|
|
12858
|
+
},
|
|
12859
|
+
collisionBoundary: {
|
|
12860
|
+
type: null,
|
|
12861
|
+
required: false
|
|
12862
|
+
},
|
|
12863
|
+
collisionPadding: {
|
|
12864
|
+
type: [Number, Object],
|
|
12865
|
+
required: false
|
|
12866
|
+
},
|
|
12867
|
+
arrowPadding: {
|
|
12868
|
+
type: Number,
|
|
12869
|
+
required: false
|
|
12870
|
+
},
|
|
12871
|
+
sticky: {
|
|
12872
|
+
type: String,
|
|
12873
|
+
required: false
|
|
12874
|
+
},
|
|
12875
|
+
hideWhenDetached: {
|
|
12876
|
+
type: Boolean,
|
|
12877
|
+
required: false
|
|
12878
|
+
},
|
|
12879
|
+
positionStrategy: {
|
|
12880
|
+
type: String,
|
|
12881
|
+
required: false
|
|
12882
|
+
},
|
|
12883
|
+
updatePositionStrategy: {
|
|
12884
|
+
type: String,
|
|
12885
|
+
required: false
|
|
12886
|
+
},
|
|
12887
|
+
disableUpdateOnLayoutShift: {
|
|
12888
|
+
type: Boolean,
|
|
12889
|
+
required: false
|
|
12890
|
+
},
|
|
12891
|
+
prioritizePosition: {
|
|
12892
|
+
type: Boolean,
|
|
12893
|
+
required: false
|
|
12894
|
+
},
|
|
12895
|
+
reference: {
|
|
12896
|
+
type: null,
|
|
12897
|
+
required: false
|
|
12898
|
+
},
|
|
12899
|
+
asChild: {
|
|
12900
|
+
type: Boolean,
|
|
12901
|
+
required: false
|
|
12902
|
+
},
|
|
12903
|
+
as: {
|
|
12904
|
+
type: null,
|
|
12905
|
+
required: false
|
|
12906
|
+
}
|
|
12907
|
+
},
|
|
12908
|
+
emits: [
|
|
12909
|
+
"closeAutoFocus",
|
|
12910
|
+
"escapeKeyDown",
|
|
12911
|
+
"pointerDownOutside"
|
|
12912
|
+
],
|
|
12913
|
+
setup(__props, { emit: __emit }) {
|
|
12914
|
+
const props = __props;
|
|
12915
|
+
const emits = __emit;
|
|
12916
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
12917
|
+
const rootContext = injectSelectRootContext();
|
|
12918
|
+
const fragment = vue.ref();
|
|
12919
|
+
vue.onMounted(() => {
|
|
12920
|
+
fragment.value = new DocumentFragment();
|
|
12921
|
+
});
|
|
12922
|
+
const presenceRef = vue.ref();
|
|
12923
|
+
const present = vue.computed(() => props.forceMount || rootContext.open.value);
|
|
12924
|
+
const renderPresence = vue.ref(present.value);
|
|
12925
|
+
vue.watch(present, () => {
|
|
12926
|
+
setTimeout(() => renderPresence.value = present.value);
|
|
12927
|
+
});
|
|
12928
|
+
return (_ctx, _cache) => {
|
|
12929
|
+
return present.value || renderPresence.value || presenceRef.value?.present ? (vue.openBlock(), vue.createBlock(vue.unref(Presence_default), {
|
|
12930
|
+
key: 0,
|
|
12931
|
+
ref_key: "presenceRef",
|
|
12932
|
+
ref: presenceRef,
|
|
12933
|
+
present: present.value
|
|
12934
|
+
}, {
|
|
12935
|
+
default: vue.withCtx(() => [vue.createVNode(SelectContentImpl_default, vue.normalizeProps(vue.guardReactiveProps({
|
|
12936
|
+
...vue.unref(forwarded),
|
|
12937
|
+
..._ctx.$attrs
|
|
12938
|
+
})), {
|
|
12939
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
12940
|
+
_: 3
|
|
12941
|
+
}, 16)]),
|
|
12942
|
+
_: 3
|
|
12943
|
+
}, 8, ["present"])) : fragment.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$A, [(vue.openBlock(), vue.createBlock(vue.Teleport, { to: fragment.value }, [vue.createVNode(SelectProvider_default, { context: vue.unref(rootContext) }, {
|
|
12944
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
12945
|
+
_: 3
|
|
12946
|
+
}, 8, ["context"])], 8, ["to"]))])) : vue.createCommentVNode("v-if", true);
|
|
12947
|
+
};
|
|
12948
|
+
}
|
|
12949
|
+
});
|
|
12950
|
+
var SelectContent_default = SelectContent_vue_vue_type_script_setup_true_lang_default;
|
|
12951
|
+
const [injectSelectItemContext, provideSelectItemContext] = createContext("SelectItem");
|
|
12952
|
+
var SelectItem_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
12953
|
+
__name: "SelectItem",
|
|
12954
|
+
props: {
|
|
12955
|
+
value: {
|
|
12956
|
+
type: null,
|
|
12957
|
+
required: true
|
|
12958
|
+
},
|
|
12959
|
+
disabled: {
|
|
12960
|
+
type: Boolean,
|
|
12961
|
+
required: false
|
|
12962
|
+
},
|
|
12963
|
+
textValue: {
|
|
12964
|
+
type: String,
|
|
12965
|
+
required: false
|
|
12966
|
+
},
|
|
12967
|
+
asChild: {
|
|
12968
|
+
type: Boolean,
|
|
12969
|
+
required: false
|
|
12970
|
+
},
|
|
12971
|
+
as: {
|
|
12972
|
+
type: null,
|
|
12973
|
+
required: false
|
|
12974
|
+
}
|
|
12975
|
+
},
|
|
12976
|
+
emits: ["select"],
|
|
12977
|
+
setup(__props, { emit: __emit }) {
|
|
12978
|
+
const props = __props;
|
|
12979
|
+
const emits = __emit;
|
|
12980
|
+
const { disabled } = vue.toRefs(props);
|
|
12981
|
+
const rootContext = injectSelectRootContext();
|
|
12982
|
+
const contentContext = injectSelectContentContext();
|
|
12983
|
+
const { forwardRef, currentElement } = useForwardExpose();
|
|
12984
|
+
const { CollectionItem } = useCollection();
|
|
12985
|
+
const isSelected = vue.computed(() => valueComparator(rootContext.modelValue?.value, props.value, rootContext.by));
|
|
12986
|
+
const isFocused = vue.ref(false);
|
|
12987
|
+
const textValue = vue.ref(props.textValue ?? "");
|
|
12988
|
+
const textId = useId(void 0, "reka-select-item-text");
|
|
12989
|
+
const SELECT_SELECT = "select.select";
|
|
12990
|
+
async function handleSelectCustomEvent(ev) {
|
|
12991
|
+
if (ev.defaultPrevented) return;
|
|
12992
|
+
const eventDetail = {
|
|
12993
|
+
originalEvent: ev,
|
|
12994
|
+
value: props.value
|
|
12995
|
+
};
|
|
12996
|
+
handleAndDispatchCustomEvent$1(SELECT_SELECT, handleSelect2, eventDetail);
|
|
12997
|
+
}
|
|
12998
|
+
async function handleSelect2(ev) {
|
|
12999
|
+
await vue.nextTick();
|
|
13000
|
+
emits("select", ev);
|
|
13001
|
+
if (ev.defaultPrevented) return;
|
|
13002
|
+
if (!disabled.value) {
|
|
13003
|
+
rootContext.onValueChange(props.value);
|
|
13004
|
+
if (!rootContext.multiple.value) rootContext.onOpenChange(false);
|
|
13005
|
+
}
|
|
13006
|
+
}
|
|
13007
|
+
async function handlePointerMove(event) {
|
|
13008
|
+
await vue.nextTick();
|
|
13009
|
+
if (event.defaultPrevented) return;
|
|
13010
|
+
if (disabled.value) contentContext.onItemLeave?.();
|
|
13011
|
+
else event.currentTarget?.focus({ preventScroll: true });
|
|
13012
|
+
}
|
|
13013
|
+
async function handlePointerLeave(event) {
|
|
13014
|
+
await vue.nextTick();
|
|
13015
|
+
if (event.defaultPrevented) return;
|
|
13016
|
+
if (event.currentTarget === getActiveElement()) contentContext.onItemLeave?.();
|
|
13017
|
+
}
|
|
13018
|
+
async function handleKeyDown(event) {
|
|
13019
|
+
await vue.nextTick();
|
|
13020
|
+
if (event.defaultPrevented) return;
|
|
13021
|
+
const isTypingAhead = contentContext.searchRef?.value !== "";
|
|
13022
|
+
if (isTypingAhead && event.key === " ") return;
|
|
13023
|
+
if (SELECTION_KEYS.includes(event.key)) handleSelectCustomEvent(event);
|
|
13024
|
+
if (event.key === " ") event.preventDefault();
|
|
13025
|
+
}
|
|
13026
|
+
if (props.value === "") throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
|
|
13027
|
+
vue.onMounted(() => {
|
|
13028
|
+
if (!currentElement.value) return;
|
|
13029
|
+
contentContext.itemRefCallback(currentElement.value, props.value, props.disabled);
|
|
13030
|
+
});
|
|
13031
|
+
provideSelectItemContext({
|
|
13032
|
+
value: props.value,
|
|
13033
|
+
disabled,
|
|
13034
|
+
textId,
|
|
13035
|
+
isSelected,
|
|
13036
|
+
onItemTextChange: (node) => {
|
|
13037
|
+
textValue.value = ((textValue.value || node?.textContent) ?? "").trim();
|
|
13038
|
+
}
|
|
13039
|
+
});
|
|
13040
|
+
return (_ctx, _cache) => {
|
|
13041
|
+
return vue.openBlock(), vue.createBlock(vue.unref(CollectionItem), { value: { textValue: textValue.value } }, {
|
|
13042
|
+
default: vue.withCtx(() => [vue.createVNode(vue.unref(Primitive), {
|
|
13043
|
+
ref: vue.unref(forwardRef),
|
|
13044
|
+
role: "option",
|
|
13045
|
+
"aria-labelledby": vue.unref(textId),
|
|
13046
|
+
"data-highlighted": isFocused.value ? "" : void 0,
|
|
13047
|
+
"aria-selected": isSelected.value,
|
|
13048
|
+
"data-state": isSelected.value ? "checked" : "unchecked",
|
|
13049
|
+
"aria-disabled": vue.unref(disabled) || void 0,
|
|
13050
|
+
"data-disabled": vue.unref(disabled) ? "" : void 0,
|
|
13051
|
+
tabindex: vue.unref(disabled) ? void 0 : -1,
|
|
13052
|
+
as: _ctx.as,
|
|
13053
|
+
"as-child": _ctx.asChild,
|
|
13054
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => isFocused.value = true),
|
|
13055
|
+
onBlur: _cache[1] || (_cache[1] = ($event) => isFocused.value = false),
|
|
13056
|
+
onPointerup: handleSelectCustomEvent,
|
|
13057
|
+
onPointerdown: _cache[2] || (_cache[2] = (event) => {
|
|
13058
|
+
event.currentTarget.focus({ preventScroll: true });
|
|
13059
|
+
}),
|
|
13060
|
+
onTouchend: _cache[3] || (_cache[3] = vue.withModifiers(() => {
|
|
13061
|
+
}, ["prevent", "stop"])),
|
|
13062
|
+
onPointermove: handlePointerMove,
|
|
13063
|
+
onPointerleave: handlePointerLeave,
|
|
13064
|
+
onKeydown: handleKeyDown
|
|
13065
|
+
}, {
|
|
13066
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
13067
|
+
_: 3
|
|
13068
|
+
}, 8, [
|
|
13069
|
+
"aria-labelledby",
|
|
13070
|
+
"data-highlighted",
|
|
13071
|
+
"aria-selected",
|
|
13072
|
+
"data-state",
|
|
13073
|
+
"aria-disabled",
|
|
13074
|
+
"data-disabled",
|
|
13075
|
+
"tabindex",
|
|
13076
|
+
"as",
|
|
13077
|
+
"as-child"
|
|
13078
|
+
])]),
|
|
13079
|
+
_: 3
|
|
13080
|
+
}, 8, ["value"]);
|
|
13081
|
+
};
|
|
13082
|
+
}
|
|
13083
|
+
});
|
|
13084
|
+
var SelectItem_default = SelectItem_vue_vue_type_script_setup_true_lang_default;
|
|
13085
|
+
var SelectItemIndicator_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
13086
|
+
__name: "SelectItemIndicator",
|
|
13087
|
+
props: {
|
|
13088
|
+
asChild: {
|
|
13089
|
+
type: Boolean,
|
|
13090
|
+
required: false
|
|
13091
|
+
},
|
|
13092
|
+
as: {
|
|
13093
|
+
type: null,
|
|
13094
|
+
required: false,
|
|
13095
|
+
default: "span"
|
|
13096
|
+
}
|
|
13097
|
+
},
|
|
13098
|
+
setup(__props) {
|
|
13099
|
+
const props = __props;
|
|
13100
|
+
const itemContext = injectSelectItemContext();
|
|
13101
|
+
return (_ctx, _cache) => {
|
|
13102
|
+
return vue.unref(itemContext).isSelected.value ? (vue.openBlock(), vue.createBlock(vue.unref(Primitive), vue.mergeProps({
|
|
13103
|
+
key: 0,
|
|
13104
|
+
"aria-hidden": "true"
|
|
13105
|
+
}, props), {
|
|
13106
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
13107
|
+
_: 3
|
|
13108
|
+
}, 16)) : vue.createCommentVNode("v-if", true);
|
|
13109
|
+
};
|
|
13110
|
+
}
|
|
13111
|
+
});
|
|
13112
|
+
var SelectItemIndicator_default = SelectItemIndicator_vue_vue_type_script_setup_true_lang_default;
|
|
13113
|
+
var SelectItemText_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
13114
|
+
inheritAttrs: false,
|
|
13115
|
+
__name: "SelectItemText",
|
|
13116
|
+
props: {
|
|
13117
|
+
asChild: {
|
|
13118
|
+
type: Boolean,
|
|
13119
|
+
required: false
|
|
13120
|
+
},
|
|
13121
|
+
as: {
|
|
13122
|
+
type: null,
|
|
13123
|
+
required: false,
|
|
13124
|
+
default: "span"
|
|
13125
|
+
}
|
|
13126
|
+
},
|
|
13127
|
+
setup(__props) {
|
|
13128
|
+
const props = __props;
|
|
13129
|
+
const rootContext = injectSelectRootContext();
|
|
13130
|
+
const contentContext = injectSelectContentContext();
|
|
13131
|
+
const itemContext = injectSelectItemContext();
|
|
13132
|
+
const { forwardRef, currentElement: itemTextElement } = useForwardExpose();
|
|
13133
|
+
const optionProps = vue.computed(() => {
|
|
13134
|
+
return {
|
|
13135
|
+
value: itemContext.value,
|
|
13136
|
+
disabled: itemContext.disabled.value,
|
|
13137
|
+
textContent: itemTextElement.value?.textContent ?? itemContext.value?.toString() ?? ""
|
|
13138
|
+
};
|
|
13139
|
+
});
|
|
13140
|
+
vue.onMounted(() => {
|
|
13141
|
+
if (!itemTextElement.value) return;
|
|
13142
|
+
itemContext.onItemTextChange(itemTextElement.value);
|
|
13143
|
+
contentContext.itemTextRefCallback(itemTextElement.value, itemContext.value, itemContext.disabled.value);
|
|
13144
|
+
rootContext.onOptionAdd(optionProps.value);
|
|
13145
|
+
});
|
|
13146
|
+
vue.onUnmounted(() => {
|
|
13147
|
+
rootContext.onOptionRemove(optionProps.value);
|
|
13148
|
+
});
|
|
13149
|
+
return (_ctx, _cache) => {
|
|
13150
|
+
return vue.openBlock(), vue.createBlock(vue.unref(Primitive), vue.mergeProps({
|
|
13151
|
+
id: vue.unref(itemContext).textId,
|
|
13152
|
+
ref: vue.unref(forwardRef)
|
|
13153
|
+
}, {
|
|
13154
|
+
...props,
|
|
13155
|
+
..._ctx.$attrs
|
|
13156
|
+
}), {
|
|
13157
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
13158
|
+
_: 3
|
|
13159
|
+
}, 16, ["id"]);
|
|
13160
|
+
};
|
|
13161
|
+
}
|
|
13162
|
+
});
|
|
13163
|
+
var SelectItemText_default = SelectItemText_vue_vue_type_script_setup_true_lang_default;
|
|
13164
|
+
var SelectPortal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
13165
|
+
__name: "SelectPortal",
|
|
13166
|
+
props: {
|
|
13167
|
+
to: {
|
|
13168
|
+
type: null,
|
|
13169
|
+
required: false
|
|
13170
|
+
},
|
|
13171
|
+
disabled: {
|
|
13172
|
+
type: Boolean,
|
|
13173
|
+
required: false
|
|
13174
|
+
},
|
|
13175
|
+
defer: {
|
|
13176
|
+
type: Boolean,
|
|
13177
|
+
required: false
|
|
13178
|
+
},
|
|
13179
|
+
forceMount: {
|
|
13180
|
+
type: Boolean,
|
|
13181
|
+
required: false
|
|
13182
|
+
}
|
|
13183
|
+
},
|
|
13184
|
+
setup(__props) {
|
|
13185
|
+
const props = __props;
|
|
13186
|
+
return (_ctx, _cache) => {
|
|
13187
|
+
return vue.openBlock(), vue.createBlock(vue.unref(Teleport_default), vue.normalizeProps(vue.guardReactiveProps(props)), {
|
|
13188
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
13189
|
+
_: 3
|
|
13190
|
+
}, 16);
|
|
13191
|
+
};
|
|
13192
|
+
}
|
|
13193
|
+
});
|
|
13194
|
+
var SelectPortal_default = SelectPortal_vue_vue_type_script_setup_true_lang_default;
|
|
13195
|
+
var SelectSeparator_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
13196
|
+
__name: "SelectSeparator",
|
|
13197
|
+
props: {
|
|
13198
|
+
asChild: {
|
|
13199
|
+
type: Boolean,
|
|
13200
|
+
required: false
|
|
13201
|
+
},
|
|
13202
|
+
as: {
|
|
13203
|
+
type: null,
|
|
13204
|
+
required: false
|
|
13205
|
+
}
|
|
13206
|
+
},
|
|
13207
|
+
setup(__props) {
|
|
13208
|
+
const props = __props;
|
|
13209
|
+
return (_ctx, _cache) => {
|
|
13210
|
+
return vue.openBlock(), vue.createBlock(vue.unref(Primitive), vue.mergeProps({ "aria-hidden": "true" }, props), {
|
|
13211
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
13212
|
+
_: 3
|
|
13213
|
+
}, 16);
|
|
13214
|
+
};
|
|
13215
|
+
}
|
|
13216
|
+
});
|
|
13217
|
+
var SelectSeparator_default = SelectSeparator_vue_vue_type_script_setup_true_lang_default;
|
|
13218
|
+
var SelectTrigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
13219
|
+
__name: "SelectTrigger",
|
|
13220
|
+
props: {
|
|
13221
|
+
disabled: {
|
|
13222
|
+
type: Boolean,
|
|
13223
|
+
required: false
|
|
13224
|
+
},
|
|
13225
|
+
reference: {
|
|
13226
|
+
type: null,
|
|
13227
|
+
required: false
|
|
13228
|
+
},
|
|
13229
|
+
asChild: {
|
|
13230
|
+
type: Boolean,
|
|
13231
|
+
required: false
|
|
13232
|
+
},
|
|
13233
|
+
as: {
|
|
13234
|
+
type: null,
|
|
13235
|
+
required: false,
|
|
13236
|
+
default: "button"
|
|
13237
|
+
}
|
|
13238
|
+
},
|
|
13239
|
+
setup(__props) {
|
|
13240
|
+
const props = __props;
|
|
13241
|
+
const rootContext = injectSelectRootContext();
|
|
13242
|
+
const { forwardRef, currentElement: triggerElement } = useForwardExpose();
|
|
13243
|
+
const isDisabled = vue.computed(() => rootContext.disabled?.value || props.disabled);
|
|
13244
|
+
rootContext.contentId ||= useId(void 0, "reka-select-content");
|
|
13245
|
+
vue.onMounted(() => {
|
|
13246
|
+
rootContext.onTriggerChange(triggerElement.value);
|
|
13247
|
+
});
|
|
13248
|
+
const { getItems } = useCollection();
|
|
13249
|
+
const { search, handleTypeaheadSearch, resetTypeahead } = useTypeahead();
|
|
13250
|
+
function handleOpen() {
|
|
13251
|
+
if (!isDisabled.value) {
|
|
13252
|
+
rootContext.onOpenChange(true);
|
|
13253
|
+
resetTypeahead();
|
|
13254
|
+
}
|
|
13255
|
+
}
|
|
13256
|
+
function handlePointerOpen(event) {
|
|
13257
|
+
handleOpen();
|
|
13258
|
+
rootContext.triggerPointerDownPosRef.value = {
|
|
13259
|
+
x: Math.round(event.pageX),
|
|
13260
|
+
y: Math.round(event.pageY)
|
|
13261
|
+
};
|
|
13262
|
+
}
|
|
13263
|
+
return (_ctx, _cache) => {
|
|
13264
|
+
return vue.openBlock(), vue.createBlock(vue.unref(PopperAnchor_default), {
|
|
13265
|
+
"as-child": "",
|
|
13266
|
+
reference: _ctx.reference
|
|
13267
|
+
}, {
|
|
13268
|
+
default: vue.withCtx(() => [vue.createVNode(vue.unref(Primitive), {
|
|
13269
|
+
ref: vue.unref(forwardRef),
|
|
13270
|
+
role: "combobox",
|
|
13271
|
+
type: _ctx.as === "button" ? "button" : void 0,
|
|
13272
|
+
"aria-controls": vue.unref(rootContext).contentId,
|
|
13273
|
+
"aria-expanded": vue.unref(rootContext).open.value || false,
|
|
13274
|
+
"aria-required": vue.unref(rootContext).required?.value,
|
|
13275
|
+
"aria-autocomplete": "none",
|
|
13276
|
+
disabled: isDisabled.value,
|
|
13277
|
+
dir: vue.unref(rootContext)?.dir.value,
|
|
13278
|
+
"data-state": vue.unref(rootContext)?.open.value ? "open" : "closed",
|
|
13279
|
+
"data-disabled": isDisabled.value ? "" : void 0,
|
|
13280
|
+
"data-placeholder": vue.unref(shouldShowPlaceholder)(vue.unref(rootContext).modelValue?.value) ? "" : void 0,
|
|
13281
|
+
"as-child": _ctx.asChild,
|
|
13282
|
+
as: _ctx.as,
|
|
13283
|
+
onClick: _cache[0] || (_cache[0] = (event) => {
|
|
13284
|
+
event?.currentTarget?.focus();
|
|
13285
|
+
}),
|
|
13286
|
+
onPointerdown: _cache[1] || (_cache[1] = (event) => {
|
|
13287
|
+
if (event.pointerType === "touch") return event.preventDefault();
|
|
13288
|
+
const target = event.target;
|
|
13289
|
+
if (target.hasPointerCapture(event.pointerId)) target.releasePointerCapture(event.pointerId);
|
|
13290
|
+
if (event.button === 0 && event.ctrlKey === false) {
|
|
13291
|
+
handlePointerOpen(event);
|
|
13292
|
+
event.preventDefault();
|
|
13293
|
+
}
|
|
13294
|
+
}),
|
|
13295
|
+
onPointerup: _cache[2] || (_cache[2] = vue.withModifiers((event) => {
|
|
13296
|
+
if (event.pointerType === "touch") handlePointerOpen(event);
|
|
13297
|
+
}, ["prevent"])),
|
|
13298
|
+
onKeydown: _cache[3] || (_cache[3] = (event) => {
|
|
13299
|
+
const isTypingAhead = vue.unref(search) !== "";
|
|
13300
|
+
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
13301
|
+
if (!isModifierKey && event.key.length === 1) {
|
|
13302
|
+
if (isTypingAhead && event.key === " ") return;
|
|
13303
|
+
}
|
|
13304
|
+
vue.unref(handleTypeaheadSearch)(event.key, vue.unref(getItems)());
|
|
13305
|
+
if (vue.unref(OPEN_KEYS).includes(event.key)) {
|
|
13306
|
+
handleOpen();
|
|
13307
|
+
event.preventDefault();
|
|
13308
|
+
}
|
|
13309
|
+
})
|
|
13310
|
+
}, {
|
|
13311
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
13312
|
+
_: 3
|
|
13313
|
+
}, 8, [
|
|
13314
|
+
"type",
|
|
13315
|
+
"aria-controls",
|
|
13316
|
+
"aria-expanded",
|
|
13317
|
+
"aria-required",
|
|
13318
|
+
"disabled",
|
|
13319
|
+
"dir",
|
|
13320
|
+
"data-state",
|
|
13321
|
+
"data-disabled",
|
|
13322
|
+
"data-placeholder",
|
|
13323
|
+
"as-child",
|
|
13324
|
+
"as"
|
|
13325
|
+
])]),
|
|
13326
|
+
_: 3
|
|
13327
|
+
}, 8, ["reference"]);
|
|
13328
|
+
};
|
|
13329
|
+
}
|
|
13330
|
+
});
|
|
13331
|
+
var SelectTrigger_default = SelectTrigger_vue_vue_type_script_setup_true_lang_default;
|
|
13332
|
+
var SelectValue_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
13333
|
+
__name: "SelectValue",
|
|
13334
|
+
props: {
|
|
13335
|
+
placeholder: {
|
|
13336
|
+
type: String,
|
|
13337
|
+
required: false,
|
|
13338
|
+
default: ""
|
|
13339
|
+
},
|
|
13340
|
+
asChild: {
|
|
13341
|
+
type: Boolean,
|
|
13342
|
+
required: false
|
|
13343
|
+
},
|
|
13344
|
+
as: {
|
|
13345
|
+
type: null,
|
|
13346
|
+
required: false,
|
|
13347
|
+
default: "span"
|
|
13348
|
+
}
|
|
13349
|
+
},
|
|
13350
|
+
setup(__props) {
|
|
13351
|
+
const props = __props;
|
|
13352
|
+
const { forwardRef, currentElement } = useForwardExpose();
|
|
13353
|
+
const rootContext = injectSelectRootContext();
|
|
13354
|
+
vue.onMounted(() => {
|
|
13355
|
+
rootContext.valueElement = currentElement;
|
|
13356
|
+
});
|
|
13357
|
+
const selectedLabel = vue.computed(() => {
|
|
13358
|
+
let list = [];
|
|
13359
|
+
const options = Array.from(rootContext.optionsSet.value);
|
|
13360
|
+
const getOption = (value) => options.find((option) => valueComparator(value, option.value, rootContext.by));
|
|
13361
|
+
if (Array.isArray(rootContext.modelValue.value)) list = rootContext.modelValue.value.map((value) => getOption(value)?.textContent ?? "");
|
|
13362
|
+
else list = [getOption(rootContext.modelValue.value)?.textContent ?? ""];
|
|
13363
|
+
return list.filter(Boolean);
|
|
13364
|
+
});
|
|
13365
|
+
const slotText = vue.computed(() => {
|
|
13366
|
+
return selectedLabel.value.length ? selectedLabel.value.join(", ") : props.placeholder;
|
|
13367
|
+
});
|
|
13368
|
+
return (_ctx, _cache) => {
|
|
13369
|
+
return vue.openBlock(), vue.createBlock(vue.unref(Primitive), {
|
|
13370
|
+
ref: vue.unref(forwardRef),
|
|
13371
|
+
as: _ctx.as,
|
|
13372
|
+
"as-child": _ctx.asChild,
|
|
13373
|
+
style: { pointerEvents: "none" },
|
|
13374
|
+
"data-placeholder": selectedLabel.value.length ? void 0 : props.placeholder
|
|
13375
|
+
}, {
|
|
13376
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default", {
|
|
13377
|
+
selectedLabel: selectedLabel.value,
|
|
13378
|
+
modelValue: vue.unref(rootContext).modelValue.value
|
|
13379
|
+
}, () => [vue.createTextVNode(vue.toDisplayString(slotText.value), 1)])]),
|
|
13380
|
+
_: 3
|
|
13381
|
+
}, 8, [
|
|
13382
|
+
"as",
|
|
13383
|
+
"as-child",
|
|
13384
|
+
"data-placeholder"
|
|
13385
|
+
]);
|
|
13386
|
+
};
|
|
13387
|
+
}
|
|
13388
|
+
});
|
|
13389
|
+
var SelectValue_default = SelectValue_vue_vue_type_script_setup_true_lang_default;
|
|
13390
|
+
var SelectViewport_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
13391
|
+
__name: "SelectViewport",
|
|
13392
|
+
props: {
|
|
13393
|
+
nonce: {
|
|
13394
|
+
type: String,
|
|
13395
|
+
required: false
|
|
13396
|
+
},
|
|
13397
|
+
asChild: {
|
|
13398
|
+
type: Boolean,
|
|
13399
|
+
required: false
|
|
13400
|
+
},
|
|
13401
|
+
as: {
|
|
13402
|
+
type: null,
|
|
13403
|
+
required: false
|
|
13404
|
+
}
|
|
13405
|
+
},
|
|
13406
|
+
setup(__props) {
|
|
13407
|
+
const props = __props;
|
|
13408
|
+
const { nonce: propNonce } = vue.toRefs(props);
|
|
13409
|
+
const nonce = useNonce(propNonce);
|
|
13410
|
+
const contentContext = injectSelectContentContext();
|
|
13411
|
+
const alignedPositionContext = contentContext.position === "item-aligned" ? injectSelectItemAlignedPositionContext() : void 0;
|
|
13412
|
+
const { forwardRef, currentElement } = useForwardExpose();
|
|
13413
|
+
vue.onMounted(() => {
|
|
13414
|
+
contentContext?.onViewportChange(currentElement.value);
|
|
13415
|
+
});
|
|
13416
|
+
const prevScrollTopRef = vue.ref(0);
|
|
13417
|
+
function handleScroll(event) {
|
|
13418
|
+
const viewport = event.currentTarget;
|
|
13419
|
+
const { shouldExpandOnScrollRef, contentWrapper } = alignedPositionContext ?? {};
|
|
13420
|
+
if (shouldExpandOnScrollRef?.value && contentWrapper?.value) {
|
|
13421
|
+
const scrolledBy = Math.abs(prevScrollTopRef.value - viewport.scrollTop);
|
|
13422
|
+
if (scrolledBy > 0) {
|
|
13423
|
+
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
|
13424
|
+
const cssMinHeight = Number.parseFloat(contentWrapper.value.style.minHeight);
|
|
13425
|
+
const cssHeight = Number.parseFloat(contentWrapper.value.style.height);
|
|
13426
|
+
const prevHeight = Math.max(cssMinHeight, cssHeight);
|
|
13427
|
+
if (prevHeight < availableHeight) {
|
|
13428
|
+
const nextHeight = prevHeight + scrolledBy;
|
|
13429
|
+
const clampedNextHeight = Math.min(availableHeight, nextHeight);
|
|
13430
|
+
const heightDiff = nextHeight - clampedNextHeight;
|
|
13431
|
+
contentWrapper.value.style.height = `${clampedNextHeight}px`;
|
|
13432
|
+
if (contentWrapper.value.style.bottom === "0px") {
|
|
13433
|
+
viewport.scrollTop = heightDiff > 0 ? heightDiff : 0;
|
|
13434
|
+
contentWrapper.value.style.justifyContent = "flex-end";
|
|
13435
|
+
}
|
|
13436
|
+
}
|
|
13437
|
+
}
|
|
13438
|
+
}
|
|
13439
|
+
prevScrollTopRef.value = viewport.scrollTop;
|
|
13440
|
+
}
|
|
13441
|
+
return (_ctx, _cache) => {
|
|
13442
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [vue.createVNode(vue.unref(Primitive), vue.mergeProps({
|
|
13443
|
+
ref: vue.unref(forwardRef),
|
|
13444
|
+
"data-reka-select-viewport": "",
|
|
13445
|
+
role: "presentation"
|
|
13446
|
+
}, {
|
|
13447
|
+
..._ctx.$attrs,
|
|
13448
|
+
...props
|
|
13449
|
+
}, {
|
|
13450
|
+
style: {
|
|
13451
|
+
position: "relative",
|
|
13452
|
+
flex: 1,
|
|
13453
|
+
overflow: "hidden auto"
|
|
13454
|
+
},
|
|
13455
|
+
onScroll: handleScroll
|
|
13456
|
+
}), {
|
|
13457
|
+
default: vue.withCtx(() => [vue.renderSlot(_ctx.$slots, "default")]),
|
|
13458
|
+
_: 3
|
|
13459
|
+
}, 16), vue.createVNode(vue.unref(Primitive), {
|
|
13460
|
+
as: "style",
|
|
13461
|
+
nonce: vue.unref(nonce)
|
|
13462
|
+
}, {
|
|
13463
|
+
default: vue.withCtx(() => _cache[0] || (_cache[0] = [vue.createTextVNode(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),
|
|
13464
|
+
_: 1,
|
|
13465
|
+
__: [0]
|
|
13466
|
+
}, 8, ["nonce"])], 64);
|
|
13467
|
+
};
|
|
13468
|
+
}
|
|
13469
|
+
});
|
|
13470
|
+
var SelectViewport_default = SelectViewport_vue_vue_type_script_setup_true_lang_default;
|
|
13471
|
+
function getNextSortedValues(prevValues = [], nextValue, atIndex) {
|
|
13472
|
+
const nextValues = [...prevValues];
|
|
13473
|
+
nextValues[atIndex] = nextValue;
|
|
13474
|
+
return nextValues.sort((a, b) => a - b);
|
|
13475
|
+
}
|
|
13476
|
+
function convertValueToPercentage(value, min2, max2) {
|
|
13477
|
+
const maxSteps = max2 - min2;
|
|
13478
|
+
const percentPerStep = 100 / maxSteps;
|
|
13479
|
+
const percentage = percentPerStep * (value - min2);
|
|
13480
|
+
return clamp$1(percentage, 0, 100);
|
|
13481
|
+
}
|
|
13482
|
+
function getLabel(index, totalValues) {
|
|
13483
|
+
if (totalValues > 2) return `Value ${index + 1} of ${totalValues}`;
|
|
13484
|
+
else if (totalValues === 2) return ["Minimum", "Maximum"][index];
|
|
13485
|
+
else return void 0;
|
|
13486
|
+
}
|
|
13487
|
+
function getClosestValueIndex(values, nextValue) {
|
|
13488
|
+
if (values.length === 1) return 0;
|
|
13489
|
+
const distances = values.map((value) => Math.abs(value - nextValue));
|
|
13490
|
+
const closestDistance = Math.min(...distances);
|
|
13491
|
+
return distances.indexOf(closestDistance);
|
|
13492
|
+
}
|
|
13493
|
+
function getThumbInBoundsOffset(width, left, direction) {
|
|
13494
|
+
const halfWidth = width / 2;
|
|
13495
|
+
const halfPercent = 50;
|
|
13496
|
+
const offset2 = linearScale([0, halfPercent], [0, halfWidth]);
|
|
13497
|
+
return (halfWidth - offset2(left) * direction) * direction;
|
|
13498
|
+
}
|
|
13499
|
+
function getStepsBetweenValues(values) {
|
|
13500
|
+
return values.slice(0, -1).map((value, index) => values[index + 1] - value);
|
|
13501
|
+
}
|
|
13502
|
+
function hasMinStepsBetweenValues(values, minStepsBetweenValues) {
|
|
13503
|
+
if (minStepsBetweenValues > 0) {
|
|
13504
|
+
const stepsBetweenValues = getStepsBetweenValues(values);
|
|
13505
|
+
const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues);
|
|
13506
|
+
return actualMinStepsBetweenValues >= minStepsBetweenValues;
|
|
13507
|
+
}
|
|
13508
|
+
return true;
|
|
13509
|
+
}
|
|
13510
|
+
function linearScale(input, output) {
|
|
13511
|
+
return (value) => {
|
|
13512
|
+
if (input[0] === input[1] || output[0] === output[1]) return output[0];
|
|
13513
|
+
const ratio = (output[1] - output[0]) / (input[1] - input[0]);
|
|
13514
|
+
return output[0] + ratio * (value - input[0]);
|
|
13515
|
+
};
|
|
13516
|
+
}
|
|
13517
|
+
function getDecimalCount(value) {
|
|
13518
|
+
return (String(value).split(".")[1] || "").length;
|
|
13519
|
+
}
|
|
13520
|
+
function roundValue(value, decimalCount) {
|
|
13521
|
+
const rounder = 10 ** decimalCount;
|
|
13522
|
+
return Math.round(value * rounder) / rounder;
|
|
13523
|
+
}
|
|
13524
|
+
const PAGE_KEYS = ["PageUp", "PageDown"];
|
|
13525
|
+
const ARROW_KEYS = [
|
|
13526
|
+
"ArrowUp",
|
|
13527
|
+
"ArrowDown",
|
|
13528
|
+
"ArrowLeft",
|
|
13529
|
+
"ArrowRight"
|
|
13530
|
+
];
|
|
13531
|
+
const BACK_KEYS = {
|
|
13532
|
+
"from-left": [
|
|
13533
|
+
"Home",
|
|
13534
|
+
"PageDown",
|
|
13535
|
+
"ArrowDown",
|
|
13536
|
+
"ArrowLeft"
|
|
13537
|
+
],
|
|
13538
|
+
"from-right": [
|
|
13539
|
+
"Home",
|
|
13540
|
+
"PageDown",
|
|
13541
|
+
"ArrowDown",
|
|
13542
|
+
"ArrowRight"
|
|
13543
|
+
],
|
|
13544
|
+
"from-bottom": [
|
|
13545
|
+
"Home",
|
|
13546
|
+
"PageDown",
|
|
13547
|
+
"ArrowDown",
|
|
13548
|
+
"ArrowLeft"
|
|
13549
|
+
],
|
|
13550
|
+
"from-top": [
|
|
13551
|
+
"Home",
|
|
13552
|
+
"PageUp",
|
|
13553
|
+
"ArrowUp",
|
|
13554
|
+
"ArrowLeft"
|
|
13555
|
+
]
|
|
13556
|
+
};
|
|
13557
|
+
const [injectSliderOrientationContext, provideSliderOrientationContext] = createContext(["SliderVertical", "SliderHorizontal"]);
|
|
13558
|
+
var SliderHorizontal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
|
|
13559
|
+
__name: "SliderHorizontal",
|
|
13560
|
+
props: {
|
|
13561
|
+
dir: {
|
|
13562
|
+
type: String,
|
|
13563
|
+
required: false
|
|
13564
|
+
},
|
|
13565
|
+
min: {
|
|
13566
|
+
type: Number,
|
|
13567
|
+
required: true
|
|
13568
|
+
},
|
|
13569
|
+
max: {
|
|
13570
|
+
type: Number,
|
|
13571
|
+
required: true
|
|
13572
|
+
},
|
|
13573
|
+
inverted: {
|
|
13574
|
+
type: Boolean,
|
|
13575
|
+
required: true
|
|
13576
|
+
}
|
|
13577
|
+
},
|
|
13578
|
+
emits: [
|
|
13579
|
+
"slideEnd",
|
|
13580
|
+
"slideStart",
|
|
13581
|
+
"slideMove",
|
|
13582
|
+
"homeKeyDown",
|
|
13583
|
+
"endKeyDown",
|
|
13584
|
+
"stepKeyDown"
|
|
13585
|
+
],
|
|
13586
|
+
setup(__props, { emit: __emit }) {
|
|
13587
|
+
const props = __props;
|
|
13588
|
+
const emits = __emit;
|
|
13589
|
+
const { max: max2, min: min2, dir, inverted } = vue.toRefs(props);
|
|
13590
|
+
const { forwardRef, currentElement: sliderElement } = useForwardExpose();
|
|
13591
|
+
const rootContext = injectSliderRootContext();
|
|
13592
|
+
const offsetPosition = vue.ref();
|
|
13593
|
+
const rectRef = vue.ref();
|
|
13594
|
+
const isSlidingFromLeft = vue.computed(() => dir?.value !== "rtl" && !inverted.value || dir?.value !== "ltr" && inverted.value);
|
|
13595
|
+
function getValueFromPointerEvent(event, slideStart) {
|
|
13596
|
+
const rect = rectRef.value || sliderElement.value.getBoundingClientRect();
|
|
13597
|
+
const thumb = [...rootContext.thumbElements.value][rootContext.valueIndexToChangeRef.value];
|
|
13598
|
+
const thumbWidth = rootContext.thumbAlignment.value === "contain" ? thumb.clientWidth : 0;
|
|
13599
|
+
if (!offsetPosition.value && !slideStart && rootContext.thumbAlignment.value === "contain") offsetPosition.value = event.clientX - thumb.getBoundingClientRect().left;
|
|
13600
|
+
const input = [0, rect.width - thumbWidth];
|
|
13601
|
+
const output = isSlidingFromLeft.value ? [min2.value, max2.value] : [max2.value, min2.value];
|
|
13602
|
+
const value = linearScale(input, output);
|
|
13603
|
+
rectRef.value = rect;
|
|
13604
|
+
const position = slideStart ? event.clientX - rect.left - thumbWidth / 2 : event.clientX - rect.left - (offsetPosition.value ?? 0);
|
|
13605
|
+
return value(position);
|
|
13606
|
+
}
|
|
13607
|
+
const startEdge = vue.computed(() => isSlidingFromLeft.value ? "left" : "right");
|
|
13608
|
+
const endEdge = vue.computed(() => isSlidingFromLeft.value ? "right" : "left");
|
|
13609
|
+
const direction = vue.computed(() => isSlidingFromLeft.value ? 1 : -1);
|
|
13610
|
+
provideSliderOrientationContext({
|
|
13611
|
+
startEdge,
|
|
13612
|
+
endEdge,
|
|
13613
|
+
direction,
|
|
13614
|
+
size: "width"
|
|
13615
|
+
});
|
|
13616
|
+
return (_ctx, _cache) => {
|
|
13617
|
+
return vue.openBlock(), vue.createBlock(SliderImpl_default, {
|
|
13618
|
+
ref: vue.unref(forwardRef),
|
|
13619
|
+
dir: vue.unref(dir),
|
|
13620
|
+
"data-orientation": "horizontal",
|
|
13621
|
+
style: vue.normalizeStyle({ ["--reka-slider-thumb-transform"]: !isSlidingFromLeft.value && vue.unref(rootContext).thumbAlignment.value === "overflow" ? "translateX(50%)" : "translateX(-50%)" }),
|
|
13622
|
+
onSlideStart: _cache[0] || (_cache[0] = (event) => {
|
|
13623
|
+
const value = getValueFromPointerEvent(event, true);
|
|
13624
|
+
emits("slideStart", value);
|
|
13625
|
+
}),
|
|
13626
|
+
onSlideMove: _cache[1] || (_cache[1] = (event) => {
|
|
13627
|
+
const value = getValueFromPointerEvent(event);
|
|
13628
|
+
emits("slideMove", value);
|
|
13629
|
+
}),
|
|
13630
|
+
onSlideEnd: _cache[2] || (_cache[2] = () => {
|
|
13631
|
+
rectRef.value = void 0;
|
|
12135
13632
|
offsetPosition.value = void 0;
|
|
12136
13633
|
emits("slideEnd");
|
|
12137
13634
|
}),
|
|
@@ -15090,7 +16587,7 @@ Defaulting to \`null\`.`);
|
|
|
15090
16587
|
return styles;
|
|
15091
16588
|
});
|
|
15092
16589
|
}
|
|
15093
|
-
const _sfc_main$
|
|
16590
|
+
const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
|
|
15094
16591
|
__name: "SkAccordion",
|
|
15095
16592
|
props: {
|
|
15096
16593
|
type: { default: "single" },
|
|
@@ -15146,9 +16643,9 @@ Defaulting to \`null\`.`);
|
|
|
15146
16643
|
}
|
|
15147
16644
|
return target;
|
|
15148
16645
|
};
|
|
15149
|
-
const SkAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15150
|
-
const _hoisted_1$
|
|
15151
|
-
const _sfc_main$
|
|
16646
|
+
const SkAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-85c35809"]]);
|
|
16647
|
+
const _hoisted_1$z = { class: "sk-accordion-content-inner" };
|
|
16648
|
+
const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
15152
16649
|
__name: "SkAccordionItem",
|
|
15153
16650
|
props: {
|
|
15154
16651
|
value: {},
|
|
@@ -15211,7 +16708,7 @@ Defaulting to \`null\`.`);
|
|
|
15211
16708
|
}),
|
|
15212
16709
|
vue.createVNode(vue.unref(AccordionContent_default), { class: "sk-accordion-content" }, {
|
|
15213
16710
|
default: vue.withCtx(() => [
|
|
15214
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
16711
|
+
vue.createElementVNode("div", _hoisted_1$z, [
|
|
15215
16712
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
15216
16713
|
])
|
|
15217
16714
|
]),
|
|
@@ -15223,8 +16720,8 @@ Defaulting to \`null\`.`);
|
|
|
15223
16720
|
};
|
|
15224
16721
|
}
|
|
15225
16722
|
});
|
|
15226
|
-
const SkAccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15227
|
-
const _hoisted_1$
|
|
16723
|
+
const SkAccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-5e73d91f"]]);
|
|
16724
|
+
const _hoisted_1$y = {
|
|
15228
16725
|
key: 0,
|
|
15229
16726
|
class: "sk-alert-icon"
|
|
15230
16727
|
};
|
|
@@ -15257,7 +16754,7 @@ Defaulting to \`null\`.`);
|
|
|
15257
16754
|
"stroke-width": "2"
|
|
15258
16755
|
};
|
|
15259
16756
|
const _hoisted_6$4 = { class: "sk-alert-content" };
|
|
15260
|
-
const _sfc_main$
|
|
16757
|
+
const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
15261
16758
|
__name: "SkAlert",
|
|
15262
16759
|
props: {
|
|
15263
16760
|
kind: { default: "info" },
|
|
@@ -15296,7 +16793,7 @@ Defaulting to \`null\`.`);
|
|
|
15296
16793
|
style: vue.normalizeStyle(vue.unref(customColorStyles)),
|
|
15297
16794
|
role: "alert"
|
|
15298
16795
|
}, [
|
|
15299
|
-
shouldShowIcon.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
16796
|
+
shouldShowIcon.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$y, [
|
|
15300
16797
|
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
15301
16798
|
__props.kind === "info" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$h, [..._cache[0] || (_cache[0] = [
|
|
15302
16799
|
vue.createElementVNode("circle", {
|
|
@@ -15361,12 +16858,12 @@ Defaulting to \`null\`.`);
|
|
|
15361
16858
|
};
|
|
15362
16859
|
}
|
|
15363
16860
|
});
|
|
15364
|
-
const _hoisted_1$
|
|
16861
|
+
const _hoisted_1$x = ["src", "alt"];
|
|
15365
16862
|
const _hoisted_2$g = {
|
|
15366
16863
|
key: 1,
|
|
15367
16864
|
class: "sk-avatar-initials"
|
|
15368
16865
|
};
|
|
15369
|
-
const _sfc_main$
|
|
16866
|
+
const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
15370
16867
|
__name: "SkAvatar",
|
|
15371
16868
|
props: {
|
|
15372
16869
|
src: { default: void 0 },
|
|
@@ -15415,7 +16912,7 @@ Defaulting to \`null\`.`);
|
|
|
15415
16912
|
alt: __props.alt,
|
|
15416
16913
|
class: "sk-avatar-image",
|
|
15417
16914
|
onError: handleImageError
|
|
15418
|
-
}, null, 40, _hoisted_1$
|
|
16915
|
+
}, null, 40, _hoisted_1$x)) : __props.initials ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$g, vue.toDisplayString(displayInitials.value), 1)) : vue.renderSlot(_ctx.$slots, "icon", { key: 2 }, () => [
|
|
15419
16916
|
_cache[0] || (_cache[0] = vue.createElementVNode("svg", {
|
|
15420
16917
|
class: "sk-avatar-icon",
|
|
15421
16918
|
viewBox: "0 0 24 24",
|
|
@@ -15428,7 +16925,7 @@ Defaulting to \`null\`.`);
|
|
|
15428
16925
|
};
|
|
15429
16926
|
}
|
|
15430
16927
|
});
|
|
15431
|
-
const SkAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16928
|
+
const SkAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-07c208b7"]]);
|
|
15432
16929
|
/*!
|
|
15433
16930
|
* vue-router v4.6.3
|
|
15434
16931
|
* (c) 2025 Eduardo San Martin Morote
|
|
@@ -15604,8 +17101,8 @@ Defaulting to \`null\`.`);
|
|
|
15604
17101
|
return record ? record.aliasOf ? record.aliasOf.path : record.path : "";
|
|
15605
17102
|
}
|
|
15606
17103
|
const getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;
|
|
15607
|
-
const _hoisted_1$
|
|
15608
|
-
const _sfc_main$
|
|
17104
|
+
const _hoisted_1$w = { class: "sk-breadcrumb-item" };
|
|
17105
|
+
const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
|
|
15609
17106
|
__name: "SkBreadcrumbItem",
|
|
15610
17107
|
props: {
|
|
15611
17108
|
to: { default: void 0 },
|
|
@@ -15633,7 +17130,7 @@ Defaulting to \`null\`.`);
|
|
|
15633
17130
|
[`sk-${kind}`]: true
|
|
15634
17131
|
}));
|
|
15635
17132
|
return (_ctx, _cache) => {
|
|
15636
|
-
return vue.openBlock(), vue.createElementBlock("li", _hoisted_1$
|
|
17133
|
+
return vue.openBlock(), vue.createElementBlock("li", _hoisted_1$w, [
|
|
15637
17134
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(componentTag.value), {
|
|
15638
17135
|
class: vue.normalizeClass(linkClasses.value),
|
|
15639
17136
|
to: __props.to,
|
|
@@ -15651,12 +17148,12 @@ Defaulting to \`null\`.`);
|
|
|
15651
17148
|
};
|
|
15652
17149
|
}
|
|
15653
17150
|
});
|
|
15654
|
-
const SkBreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15655
|
-
const _hoisted_1$
|
|
17151
|
+
const SkBreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-83066af5"]]);
|
|
17152
|
+
const _hoisted_1$v = {
|
|
15656
17153
|
class: "sk-breadcrumb-separator",
|
|
15657
17154
|
"aria-hidden": "true"
|
|
15658
17155
|
};
|
|
15659
|
-
const _sfc_main$
|
|
17156
|
+
const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
15660
17157
|
__name: "SkBreadcrumbSeparator",
|
|
15661
17158
|
props: {
|
|
15662
17159
|
separator: { default: void 0 }
|
|
@@ -15666,13 +17163,13 @@ Defaulting to \`null\`.`);
|
|
|
15666
17163
|
const parentSeparator = vue.inject("breadcrumbs-separator", "/");
|
|
15667
17164
|
const displaySeparator = vue.computed(() => props.separator ?? parentSeparator);
|
|
15668
17165
|
return (_ctx, _cache) => {
|
|
15669
|
-
return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
17166
|
+
return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$v, vue.toDisplayString(displaySeparator.value), 1);
|
|
15670
17167
|
};
|
|
15671
17168
|
}
|
|
15672
17169
|
});
|
|
15673
|
-
const SkBreadcrumbSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15674
|
-
const _hoisted_1$
|
|
15675
|
-
const _sfc_main$
|
|
17170
|
+
const SkBreadcrumbSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-fab30e8b"]]);
|
|
17171
|
+
const _hoisted_1$u = { class: "sk-breadcrumbs-list" };
|
|
17172
|
+
const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
15676
17173
|
__name: "SkBreadcrumbs",
|
|
15677
17174
|
props: {
|
|
15678
17175
|
kind: { default: "neutral" },
|
|
@@ -15710,7 +17207,7 @@ Defaulting to \`null\`.`);
|
|
|
15710
17207
|
style: vue.normalizeStyle(vue.unref(customColorStyles)),
|
|
15711
17208
|
"aria-label": "Breadcrumb"
|
|
15712
17209
|
}, [
|
|
15713
|
-
vue.createElementVNode("ol", _hoisted_1$
|
|
17210
|
+
vue.createElementVNode("ol", _hoisted_1$u, [
|
|
15714
17211
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(processedItems.value, (item, index) => {
|
|
15715
17212
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index }, [
|
|
15716
17213
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item))),
|
|
@@ -15722,8 +17219,8 @@ Defaulting to \`null\`.`);
|
|
|
15722
17219
|
};
|
|
15723
17220
|
}
|
|
15724
17221
|
});
|
|
15725
|
-
const SkBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15726
|
-
const _hoisted_1$
|
|
17222
|
+
const SkBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-f7fec0fe"]]);
|
|
17223
|
+
const _hoisted_1$t = {
|
|
15727
17224
|
key: 0,
|
|
15728
17225
|
class: "sk-button-loader",
|
|
15729
17226
|
"aria-hidden": "true"
|
|
@@ -15744,7 +17241,7 @@ Defaulting to \`null\`.`);
|
|
|
15744
17241
|
key: 3,
|
|
15745
17242
|
class: "sk-button-icon sk-button-icon-trailing"
|
|
15746
17243
|
};
|
|
15747
|
-
const _sfc_main$
|
|
17244
|
+
const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
15748
17245
|
__name: "SkButton",
|
|
15749
17246
|
props: {
|
|
15750
17247
|
type: { default: "button" },
|
|
@@ -15801,7 +17298,7 @@ Defaulting to \`null\`.`);
|
|
|
15801
17298
|
role: "button"
|
|
15802
17299
|
}, {
|
|
15803
17300
|
default: vue.withCtx(() => [
|
|
15804
|
-
__props.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
17301
|
+
__props.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$t)) : vue.createCommentVNode("", true),
|
|
15805
17302
|
vue.createElementVNode("span", {
|
|
15806
17303
|
class: vue.normalizeClass({ "sk-button-content": true, "loading": __props.loading })
|
|
15807
17304
|
}, [
|
|
@@ -15824,20 +17321,22 @@ Defaulting to \`null\`.`);
|
|
|
15824
17321
|
};
|
|
15825
17322
|
}
|
|
15826
17323
|
});
|
|
15827
|
-
const SkButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15828
|
-
const _sfc_main$
|
|
17324
|
+
const SkButton = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-543676d6"]]);
|
|
17325
|
+
const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
15829
17326
|
__name: "SkPanel",
|
|
15830
17327
|
props: {
|
|
15831
17328
|
kind: { default: "neutral" },
|
|
15832
17329
|
size: { default: "md" },
|
|
15833
17330
|
showDecoration: { type: Boolean, default: true },
|
|
15834
17331
|
noBorder: { type: Boolean, default: false },
|
|
17332
|
+
corners: { default: () => ["bottom-right"] },
|
|
17333
|
+
decorationCorner: { default: "bottom-right" },
|
|
15835
17334
|
baseColor: {},
|
|
15836
17335
|
textColor: {}
|
|
15837
17336
|
},
|
|
15838
17337
|
setup(__props) {
|
|
15839
17338
|
vue.useCssVars((_ctx) => ({
|
|
15840
|
-
"
|
|
17339
|
+
"v42b18398": decorationDisplay.value
|
|
15841
17340
|
}));
|
|
15842
17341
|
const props = __props;
|
|
15843
17342
|
const classes = vue.computed(() => {
|
|
@@ -15845,7 +17344,12 @@ Defaulting to \`null\`.`);
|
|
|
15845
17344
|
"sk-panel": true,
|
|
15846
17345
|
[`sk-${props.kind}`]: true,
|
|
15847
17346
|
[`sk-${props.size}`]: true,
|
|
15848
|
-
"sk-no-border": props.noBorder
|
|
17347
|
+
"sk-no-border": props.noBorder,
|
|
17348
|
+
"sk-cut-top-left": props.corners.includes("top-left"),
|
|
17349
|
+
"sk-cut-top-right": props.corners.includes("top-right"),
|
|
17350
|
+
"sk-cut-bottom-right": props.corners.includes("bottom-right"),
|
|
17351
|
+
"sk-cut-bottom-left": props.corners.includes("bottom-left"),
|
|
17352
|
+
[`sk-decoration-${props.decorationCorner}`]: true
|
|
15849
17353
|
};
|
|
15850
17354
|
});
|
|
15851
17355
|
const customColorStyles = useCustomColors(
|
|
@@ -15854,10 +17358,13 @@ Defaulting to \`null\`.`);
|
|
|
15854
17358
|
vue.toRef(() => props.textColor)
|
|
15855
17359
|
);
|
|
15856
17360
|
const decorationDisplay = vue.computed(() => {
|
|
15857
|
-
if (props.noBorder) {
|
|
17361
|
+
if (props.noBorder || !props.showDecoration) {
|
|
15858
17362
|
return "none";
|
|
15859
17363
|
}
|
|
15860
|
-
|
|
17364
|
+
if (!props.corners.includes(props.decorationCorner)) {
|
|
17365
|
+
return "none";
|
|
17366
|
+
}
|
|
17367
|
+
return "block";
|
|
15861
17368
|
});
|
|
15862
17369
|
return (_ctx, _cache) => {
|
|
15863
17370
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -15869,8 +17376,8 @@ Defaulting to \`null\`.`);
|
|
|
15869
17376
|
};
|
|
15870
17377
|
}
|
|
15871
17378
|
});
|
|
15872
|
-
const SkPanel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15873
|
-
const _hoisted_1$
|
|
17379
|
+
const SkPanel = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-07c1642c"]]);
|
|
17380
|
+
const _hoisted_1$s = {
|
|
15874
17381
|
key: 0,
|
|
15875
17382
|
class: "sk-card-title"
|
|
15876
17383
|
};
|
|
@@ -15882,7 +17389,7 @@ Defaulting to \`null\`.`);
|
|
|
15882
17389
|
key: 3,
|
|
15883
17390
|
class: "sk-card-footer"
|
|
15884
17391
|
};
|
|
15885
|
-
const _sfc_main$
|
|
17392
|
+
const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
15886
17393
|
__name: "SkCard",
|
|
15887
17394
|
props: {
|
|
15888
17395
|
kind: { default: "neutral" },
|
|
@@ -15893,6 +17400,8 @@ Defaulting to \`null\`.`);
|
|
|
15893
17400
|
title: { default: void 0 },
|
|
15894
17401
|
headerColor: { default: void 0 },
|
|
15895
17402
|
scrollable: { type: Boolean, default: false },
|
|
17403
|
+
corners: { default: () => ["bottom-right"] },
|
|
17404
|
+
decorationCorner: { default: "bottom-right" },
|
|
15896
17405
|
baseColor: {},
|
|
15897
17406
|
textColor: {}
|
|
15898
17407
|
},
|
|
@@ -15936,6 +17445,8 @@ Defaulting to \`null\`.`);
|
|
|
15936
17445
|
"no-border": __props.noBorder,
|
|
15937
17446
|
"base-color": __props.baseColor,
|
|
15938
17447
|
"text-color": __props.textColor,
|
|
17448
|
+
corners: __props.corners,
|
|
17449
|
+
"decoration-corner": __props.decorationCorner,
|
|
15939
17450
|
class: vue.normalizeClass(classes.value)
|
|
15940
17451
|
}, {
|
|
15941
17452
|
default: vue.withCtx(() => [
|
|
@@ -15944,7 +17455,7 @@ Defaulting to \`null\`.`);
|
|
|
15944
17455
|
class: "sk-card-header",
|
|
15945
17456
|
style: vue.normalizeStyle(headerStyles.value)
|
|
15946
17457
|
}, [
|
|
15947
|
-
__props.title ? (vue.openBlock(), vue.createElementBlock("h3", _hoisted_1$
|
|
17458
|
+
__props.title ? (vue.openBlock(), vue.createElementBlock("h3", _hoisted_1$s, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true),
|
|
15948
17459
|
vue.renderSlot(_ctx.$slots, "header")
|
|
15949
17460
|
], 4)) : vue.createCommentVNode("", true),
|
|
15950
17461
|
_ctx.$slots.media ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$e, [
|
|
@@ -15961,11 +17472,11 @@ Defaulting to \`null\`.`);
|
|
|
15961
17472
|
])) : vue.createCommentVNode("", true)
|
|
15962
17473
|
]),
|
|
15963
17474
|
_: 3
|
|
15964
|
-
}, 8, ["kind", "size", "show-decoration", "no-border", "base-color", "text-color", "class"]);
|
|
17475
|
+
}, 8, ["kind", "size", "show-decoration", "no-border", "base-color", "text-color", "corners", "decoration-corner", "class"]);
|
|
15965
17476
|
};
|
|
15966
17477
|
}
|
|
15967
17478
|
});
|
|
15968
|
-
const _hoisted_1$
|
|
17479
|
+
const _hoisted_1$r = {
|
|
15969
17480
|
key: 0,
|
|
15970
17481
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15971
17482
|
viewBox: "0 0 24 24",
|
|
@@ -15990,7 +17501,7 @@ Defaulting to \`null\`.`);
|
|
|
15990
17501
|
key: 0,
|
|
15991
17502
|
class: "sk-checkbox-label"
|
|
15992
17503
|
};
|
|
15993
|
-
const _sfc_main$
|
|
17504
|
+
const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
15994
17505
|
__name: "SkCheckbox",
|
|
15995
17506
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
15996
17507
|
kind: { default: "neutral" },
|
|
@@ -16039,7 +17550,7 @@ Defaulting to \`null\`.`);
|
|
|
16039
17550
|
default: vue.withCtx(() => [
|
|
16040
17551
|
vue.createVNode(vue.unref(CheckboxIndicator_default), { class: "sk-checkbox-indicator" }, {
|
|
16041
17552
|
default: vue.withCtx(() => [
|
|
16042
|
-
checked.value === true ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
17553
|
+
checked.value === true ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$r, [..._cache[1] || (_cache[1] = [
|
|
16043
17554
|
vue.createElementVNode("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
16044
17555
|
])])) : checked.value === "indeterminate" ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2$d, [..._cache[2] || (_cache[2] = [
|
|
16045
17556
|
vue.createElementVNode("line", {
|
|
@@ -16064,9 +17575,9 @@ Defaulting to \`null\`.`);
|
|
|
16064
17575
|
};
|
|
16065
17576
|
}
|
|
16066
17577
|
});
|
|
16067
|
-
const SkCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16068
|
-
const _hoisted_1$
|
|
16069
|
-
const _sfc_main$
|
|
17578
|
+
const SkCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-073d7038"]]);
|
|
17579
|
+
const _hoisted_1$q = { class: "sk-collapsible-content-inner" };
|
|
17580
|
+
const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
16070
17581
|
__name: "SkCollapsible",
|
|
16071
17582
|
props: {
|
|
16072
17583
|
open: { type: Boolean, default: void 0 },
|
|
@@ -16144,7 +17655,7 @@ Defaulting to \`null\`.`);
|
|
|
16144
17655
|
}),
|
|
16145
17656
|
vue.createVNode(vue.unref(CollapsibleContent_default), { class: "sk-collapsible-content" }, {
|
|
16146
17657
|
default: vue.withCtx(() => [
|
|
16147
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
17658
|
+
vue.createElementVNode("div", _hoisted_1$q, [
|
|
16148
17659
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
16149
17660
|
])
|
|
16150
17661
|
]),
|
|
@@ -16156,9 +17667,9 @@ Defaulting to \`null\`.`);
|
|
|
16156
17667
|
};
|
|
16157
17668
|
}
|
|
16158
17669
|
});
|
|
16159
|
-
const SkCollapsible = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16160
|
-
const _hoisted_1$
|
|
16161
|
-
const _sfc_main$
|
|
17670
|
+
const SkCollapsible = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-dc60530b"]]);
|
|
17671
|
+
const _hoisted_1$p = ["aria-orientation"];
|
|
17672
|
+
const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
16162
17673
|
__name: "SkDivider",
|
|
16163
17674
|
props: {
|
|
16164
17675
|
orientation: { default: "horizontal" },
|
|
@@ -16182,7 +17693,7 @@ Defaulting to \`null\`.`);
|
|
|
16182
17693
|
class: vue.normalizeClass(classes.value),
|
|
16183
17694
|
role: "separator",
|
|
16184
17695
|
"aria-orientation": __props.orientation
|
|
16185
|
-
}, null, 10, _hoisted_1$
|
|
17696
|
+
}, null, 10, _hoisted_1$p);
|
|
16186
17697
|
};
|
|
16187
17698
|
}
|
|
16188
17699
|
});
|
|
@@ -16193,7 +17704,7 @@ Defaulting to \`null\`.`);
|
|
|
16193
17704
|
theme: currentTheme
|
|
16194
17705
|
};
|
|
16195
17706
|
}
|
|
16196
|
-
const _hoisted_1$
|
|
17707
|
+
const _hoisted_1$o = {
|
|
16197
17708
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16198
17709
|
viewBox: "0 0 24 24",
|
|
16199
17710
|
fill: "none",
|
|
@@ -16204,7 +17715,7 @@ Defaulting to \`null\`.`);
|
|
|
16204
17715
|
style: { "width": "1rem", "height": "1rem" }
|
|
16205
17716
|
};
|
|
16206
17717
|
const _hoisted_2$c = ["points"];
|
|
16207
|
-
const _sfc_main$
|
|
17718
|
+
const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
16208
17719
|
__name: "SkDropdown",
|
|
16209
17720
|
props: {
|
|
16210
17721
|
kind: { default: "neutral" },
|
|
@@ -16252,7 +17763,7 @@ Defaulting to \`null\`.`);
|
|
|
16252
17763
|
vue.renderSlot(_ctx.$slots, "trigger", {}, () => [
|
|
16253
17764
|
vue.createVNode(SkButton, { kind: __props.kind }, {
|
|
16254
17765
|
trailing: vue.withCtx(() => [
|
|
16255
|
-
(vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
17766
|
+
(vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$o, [
|
|
16256
17767
|
vue.createElementVNode("polyline", { points: caretPoints.value }, null, 8, _hoisted_2$c)
|
|
16257
17768
|
]))
|
|
16258
17769
|
]),
|
|
@@ -16289,8 +17800,8 @@ Defaulting to \`null\`.`);
|
|
|
16289
17800
|
};
|
|
16290
17801
|
}
|
|
16291
17802
|
});
|
|
16292
|
-
const SkDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16293
|
-
const _sfc_main$
|
|
17803
|
+
const SkDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-a5cb1061"]]);
|
|
17804
|
+
const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
|
|
16294
17805
|
__name: "SkDropdownMenuItem",
|
|
16295
17806
|
props: {
|
|
16296
17807
|
disabled: { type: Boolean, default: false }
|
|
@@ -16314,8 +17825,8 @@ Defaulting to \`null\`.`);
|
|
|
16314
17825
|
};
|
|
16315
17826
|
}
|
|
16316
17827
|
});
|
|
16317
|
-
const SkDropdownMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16318
|
-
const _sfc_main$
|
|
17828
|
+
const SkDropdownMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-63d43580"]]);
|
|
17829
|
+
const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
16319
17830
|
__name: "SkDropdownMenuSeparator",
|
|
16320
17831
|
setup(__props) {
|
|
16321
17832
|
return (_ctx, _cache) => {
|
|
@@ -16323,8 +17834,8 @@ Defaulting to \`null\`.`);
|
|
|
16323
17834
|
};
|
|
16324
17835
|
}
|
|
16325
17836
|
});
|
|
16326
|
-
const SkDropdownMenuSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16327
|
-
const _sfc_main$
|
|
17837
|
+
const SkDropdownMenuSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-8d03fb68"]]);
|
|
17838
|
+
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
16328
17839
|
__name: "SkDropdownSubmenu",
|
|
16329
17840
|
props: {
|
|
16330
17841
|
triggerText: {},
|
|
@@ -16385,8 +17896,8 @@ Defaulting to \`null\`.`);
|
|
|
16385
17896
|
};
|
|
16386
17897
|
}
|
|
16387
17898
|
});
|
|
16388
|
-
const SkDropdownSubmenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16389
|
-
const _hoisted_1$
|
|
17899
|
+
const SkDropdownSubmenu = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-63bf4e4d"]]);
|
|
17900
|
+
const _hoisted_1$n = ["for"];
|
|
16390
17901
|
const _hoisted_2$b = {
|
|
16391
17902
|
key: 0,
|
|
16392
17903
|
class: "sk-field-required"
|
|
@@ -16394,7 +17905,7 @@ Defaulting to \`null\`.`);
|
|
|
16394
17905
|
const _hoisted_3$9 = { class: "sk-field-input-wrapper" };
|
|
16395
17906
|
const _hoisted_4$7 = ["id"];
|
|
16396
17907
|
const _hoisted_5$4 = ["id"];
|
|
16397
|
-
const _sfc_main$
|
|
17908
|
+
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
16398
17909
|
__name: "SkField",
|
|
16399
17910
|
props: {
|
|
16400
17911
|
label: { default: void 0 },
|
|
@@ -16450,7 +17961,7 @@ Defaulting to \`null\`.`);
|
|
|
16450
17961
|
}, [
|
|
16451
17962
|
vue.createTextVNode(vue.toDisplayString(__props.label) + " ", 1),
|
|
16452
17963
|
__props.required ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$b, "*")) : vue.createCommentVNode("", true)
|
|
16453
|
-
], 8, _hoisted_1$
|
|
17964
|
+
], 8, _hoisted_1$n)) : vue.createCommentVNode("", true),
|
|
16454
17965
|
vue.createElementVNode("div", _hoisted_3$9, [
|
|
16455
17966
|
vue.renderSlot(_ctx.$slots, "default", {
|
|
16456
17967
|
id: fieldId.value,
|
|
@@ -16473,8 +17984,8 @@ Defaulting to \`null\`.`);
|
|
|
16473
17984
|
};
|
|
16474
17985
|
}
|
|
16475
17986
|
});
|
|
16476
|
-
const SkField = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16477
|
-
const _sfc_main$
|
|
17987
|
+
const SkField = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-e19bf08c"]]);
|
|
17988
|
+
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
16478
17989
|
__name: "SkGroup",
|
|
16479
17990
|
props: {
|
|
16480
17991
|
orientation: { default: "horizontal" }
|
|
@@ -16496,8 +18007,8 @@ Defaulting to \`null\`.`);
|
|
|
16496
18007
|
};
|
|
16497
18008
|
}
|
|
16498
18009
|
});
|
|
16499
|
-
const _hoisted_1$
|
|
16500
|
-
const _sfc_main$
|
|
18010
|
+
const _hoisted_1$m = ["type", "disabled", "readonly", "placeholder", "required", "name", "autocomplete"];
|
|
18011
|
+
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
|
|
16501
18012
|
__name: "SkInput",
|
|
16502
18013
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
16503
18014
|
type: { default: "text" },
|
|
@@ -16544,14 +18055,14 @@ Defaulting to \`null\`.`);
|
|
|
16544
18055
|
required: __props.required,
|
|
16545
18056
|
name: __props.name,
|
|
16546
18057
|
autocomplete: __props.autocomplete
|
|
16547
|
-
}, _ctx.$attrs), null, 16, _hoisted_1$
|
|
18058
|
+
}, _ctx.$attrs), null, 16, _hoisted_1$m)), [
|
|
16548
18059
|
[vue.vModelDynamic, modelValue.value]
|
|
16549
18060
|
]);
|
|
16550
18061
|
};
|
|
16551
18062
|
}
|
|
16552
18063
|
});
|
|
16553
|
-
const SkInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16554
|
-
const _hoisted_1$
|
|
18064
|
+
const SkInput = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-c6012675"]]);
|
|
18065
|
+
const _hoisted_1$l = {
|
|
16555
18066
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16556
18067
|
viewBox: "0 0 24 24",
|
|
16557
18068
|
fill: "none",
|
|
@@ -16561,7 +18072,7 @@ Defaulting to \`null\`.`);
|
|
|
16561
18072
|
"stroke-linejoin": "miter",
|
|
16562
18073
|
style: { "width": "1rem", "height": "1rem" }
|
|
16563
18074
|
};
|
|
16564
|
-
const _sfc_main$
|
|
18075
|
+
const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
|
|
16565
18076
|
__name: "SkListbox",
|
|
16566
18077
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
16567
18078
|
kind: { default: void 0 },
|
|
@@ -16625,7 +18136,7 @@ Defaulting to \`null\`.`);
|
|
|
16625
18136
|
class: vue.normalizeClass(triggerClasses.value)
|
|
16626
18137
|
}, {
|
|
16627
18138
|
default: vue.withCtx(() => [
|
|
16628
|
-
(vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
18139
|
+
(vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$l, [..._cache[1] || (_cache[1] = [
|
|
16629
18140
|
vue.createElementVNode("polyline", { points: "6 9 12 15 18 9" }, null, -1)
|
|
16630
18141
|
])]))
|
|
16631
18142
|
]),
|
|
@@ -16664,8 +18175,8 @@ Defaulting to \`null\`.`);
|
|
|
16664
18175
|
};
|
|
16665
18176
|
}
|
|
16666
18177
|
});
|
|
16667
|
-
const SkListbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16668
|
-
const _hoisted_1$
|
|
18178
|
+
const SkListbox = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-fbc1f022"]]);
|
|
18179
|
+
const _hoisted_1$k = {
|
|
16669
18180
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16670
18181
|
viewBox: "0 0 24 24",
|
|
16671
18182
|
fill: "none",
|
|
@@ -16675,7 +18186,7 @@ Defaulting to \`null\`.`);
|
|
|
16675
18186
|
"stroke-linejoin": "miter",
|
|
16676
18187
|
style: { "width": "1rem", "height": "1rem" }
|
|
16677
18188
|
};
|
|
16678
|
-
const _sfc_main$
|
|
18189
|
+
const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
|
|
16679
18190
|
__name: "SkListboxItem",
|
|
16680
18191
|
props: {
|
|
16681
18192
|
value: {},
|
|
@@ -16695,7 +18206,7 @@ Defaulting to \`null\`.`);
|
|
|
16695
18206
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
16696
18207
|
vue.createVNode(vue.unref(ComboboxItemIndicator_default), { class: "sk-listbox-item-indicator" }, {
|
|
16697
18208
|
default: vue.withCtx(() => [
|
|
16698
|
-
(vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$
|
|
18209
|
+
(vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$k, [..._cache[0] || (_cache[0] = [
|
|
16699
18210
|
vue.createElementVNode("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
16700
18211
|
])]))
|
|
16701
18212
|
]),
|
|
@@ -16707,8 +18218,8 @@ Defaulting to \`null\`.`);
|
|
|
16707
18218
|
};
|
|
16708
18219
|
}
|
|
16709
18220
|
});
|
|
16710
|
-
const SkListboxItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16711
|
-
const _sfc_main$
|
|
18221
|
+
const SkListboxItem = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-fcf3fe85"]]);
|
|
18222
|
+
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
16712
18223
|
__name: "SkListboxSeparator",
|
|
16713
18224
|
setup(__props) {
|
|
16714
18225
|
return (_ctx, _cache) => {
|
|
@@ -16716,8 +18227,8 @@ Defaulting to \`null\`.`);
|
|
|
16716
18227
|
};
|
|
16717
18228
|
}
|
|
16718
18229
|
});
|
|
16719
|
-
const SkListboxSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16720
|
-
const _hoisted_1$
|
|
18230
|
+
const SkListboxSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-12046626"]]);
|
|
18231
|
+
const _hoisted_1$j = {
|
|
16721
18232
|
key: 0,
|
|
16722
18233
|
class: "sk-modal-header"
|
|
16723
18234
|
};
|
|
@@ -16726,7 +18237,7 @@ Defaulting to \`null\`.`);
|
|
|
16726
18237
|
key: 1,
|
|
16727
18238
|
class: "sk-modal-footer"
|
|
16728
18239
|
};
|
|
16729
|
-
const _sfc_main$
|
|
18240
|
+
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
16730
18241
|
__name: "SkModal",
|
|
16731
18242
|
props: {
|
|
16732
18243
|
kind: { default: "neutral" },
|
|
@@ -16817,7 +18328,7 @@ Defaulting to \`null\`.`);
|
|
|
16817
18328
|
onInteractOutside: handleOverlayClick
|
|
16818
18329
|
}, {
|
|
16819
18330
|
default: vue.withCtx(() => [
|
|
16820
|
-
_ctx.$slots.title || __props.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
18331
|
+
_ctx.$slots.title || __props.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [
|
|
16821
18332
|
vue.createVNode(vue.unref(DialogTitle_default), { class: "sk-modal-title" }, {
|
|
16822
18333
|
default: vue.withCtx(() => [
|
|
16823
18334
|
vue.renderSlot(_ctx.$slots, "title", { close }, () => [
|
|
@@ -16864,8 +18375,8 @@ Defaulting to \`null\`.`);
|
|
|
16864
18375
|
};
|
|
16865
18376
|
}
|
|
16866
18377
|
});
|
|
16867
|
-
const SkModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
16868
|
-
const _hoisted_1$
|
|
18378
|
+
const SkModal = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-d5c13c78"]]);
|
|
18379
|
+
const _hoisted_1$i = { class: "sk-navbar-content" };
|
|
16869
18380
|
const _hoisted_2$9 = {
|
|
16870
18381
|
key: 0,
|
|
16871
18382
|
class: "sk-navbar-brand"
|
|
@@ -16878,7 +18389,7 @@ Defaulting to \`null\`.`);
|
|
|
16878
18389
|
key: 2,
|
|
16879
18390
|
class: "sk-navbar-actions"
|
|
16880
18391
|
};
|
|
16881
|
-
const _sfc_main$
|
|
18392
|
+
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
16882
18393
|
__name: "SkNavBar",
|
|
16883
18394
|
props: {
|
|
16884
18395
|
kind: { default: "neutral" },
|
|
@@ -16906,7 +18417,7 @@ Defaulting to \`null\`.`);
|
|
|
16906
18417
|
class: vue.normalizeClass(classes.value),
|
|
16907
18418
|
style: vue.normalizeStyle(vue.unref(customColorStyles))
|
|
16908
18419
|
}, [
|
|
16909
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
18420
|
+
vue.createElementVNode("div", _hoisted_1$i, [
|
|
16910
18421
|
vue.unref(slots).brand ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$9, [
|
|
16911
18422
|
vue.renderSlot(_ctx.$slots, "brand")
|
|
16912
18423
|
])) : vue.createCommentVNode("", true),
|
|
@@ -16921,8 +18432,8 @@ Defaulting to \`null\`.`);
|
|
|
16921
18432
|
};
|
|
16922
18433
|
}
|
|
16923
18434
|
});
|
|
16924
|
-
const _hoisted_1$
|
|
16925
|
-
const _sfc_main$
|
|
18435
|
+
const _hoisted_1$h = { class: "sk-number-input-steppers" };
|
|
18436
|
+
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
16926
18437
|
__name: "SkNumberInput",
|
|
16927
18438
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
16928
18439
|
kind: { default: void 0 },
|
|
@@ -16985,7 +18496,7 @@ Defaulting to \`null\`.`);
|
|
|
16985
18496
|
class: vue.normalizeClass(inputClasses.value),
|
|
16986
18497
|
placeholder: __props.placeholder
|
|
16987
18498
|
}, null, 8, ["class", "placeholder"]),
|
|
16988
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
18499
|
+
vue.createElementVNode("div", _hoisted_1$h, [
|
|
16989
18500
|
vue.createVNode(vue.unref(NumberFieldIncrement_default), { class: "sk-number-input-increment" }, {
|
|
16990
18501
|
default: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
16991
18502
|
vue.createElementVNode("svg", {
|
|
@@ -17026,7 +18537,7 @@ Defaulting to \`null\`.`);
|
|
|
17026
18537
|
};
|
|
17027
18538
|
}
|
|
17028
18539
|
});
|
|
17029
|
-
const SkNumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18540
|
+
const SkNumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-b589687f"]]);
|
|
17030
18541
|
const ThemeSymbol = Symbol("SkTheme");
|
|
17031
18542
|
function provideTheme(initialTheme = "greyscale") {
|
|
17032
18543
|
const currentTheme = vue.ref(initialTheme);
|
|
@@ -17047,7 +18558,7 @@ Defaulting to \`null\`.`);
|
|
|
17047
18558
|
}
|
|
17048
18559
|
return context2;
|
|
17049
18560
|
}
|
|
17050
|
-
const _hoisted_1$
|
|
18561
|
+
const _hoisted_1$g = ["data-scheme"];
|
|
17051
18562
|
const _hoisted_2$8 = {
|
|
17052
18563
|
key: 0,
|
|
17053
18564
|
class: "sk-page-header"
|
|
@@ -17062,7 +18573,7 @@ Defaulting to \`null\`.`);
|
|
|
17062
18573
|
key: 1,
|
|
17063
18574
|
class: "sk-page-footer"
|
|
17064
18575
|
};
|
|
17065
|
-
const _sfc_main$
|
|
18576
|
+
const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
17066
18577
|
__name: "SkPage",
|
|
17067
18578
|
props: {
|
|
17068
18579
|
sidebarPosition: { default: "left" },
|
|
@@ -17116,19 +18627,19 @@ Defaulting to \`null\`.`);
|
|
|
17116
18627
|
_ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("footer", _hoisted_6$3, [
|
|
17117
18628
|
vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
17118
18629
|
])) : vue.createCommentVNode("", true)
|
|
17119
|
-
], 14, _hoisted_1$
|
|
18630
|
+
], 14, _hoisted_1$g);
|
|
17120
18631
|
};
|
|
17121
18632
|
}
|
|
17122
18633
|
});
|
|
17123
|
-
const SkPage = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17124
|
-
const _hoisted_1$
|
|
18634
|
+
const SkPage = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-ad672949"]]);
|
|
18635
|
+
const _hoisted_1$f = ["disabled", "aria-label", "aria-current"];
|
|
17125
18636
|
const _hoisted_2$7 = { key: 0 };
|
|
17126
18637
|
const _hoisted_3$5 = { key: 1 };
|
|
17127
18638
|
const _hoisted_4$4 = { key: 2 };
|
|
17128
18639
|
const _hoisted_5$2 = { key: 3 };
|
|
17129
18640
|
const _hoisted_6$2 = { key: 4 };
|
|
17130
18641
|
const _hoisted_7 = { key: 5 };
|
|
17131
|
-
const _sfc_main$
|
|
18642
|
+
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
17132
18643
|
__name: "SkPaginationItem",
|
|
17133
18644
|
props: {
|
|
17134
18645
|
page: { default: void 0 },
|
|
@@ -17187,12 +18698,12 @@ Defaulting to \`null\`.`);
|
|
|
17187
18698
|
onClick: handleClick
|
|
17188
18699
|
}, [
|
|
17189
18700
|
__props.type === "prev" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$7, "‹")) : __props.type === "next" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$5, "›")) : __props.type === "first" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$4, "‹‹")) : __props.type === "last" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$2, "››")) : __props.type === "ellipsis" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$2, "...")) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_7, vue.toDisplayString(__props.page), 1))
|
|
17190
|
-
], 10, _hoisted_1$
|
|
18701
|
+
], 10, _hoisted_1$f);
|
|
17191
18702
|
};
|
|
17192
18703
|
}
|
|
17193
18704
|
});
|
|
17194
|
-
const SkPaginationItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17195
|
-
const _sfc_main$
|
|
18705
|
+
const SkPaginationItem = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-1eea3ced"]]);
|
|
18706
|
+
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
17196
18707
|
__name: "SkPagination",
|
|
17197
18708
|
props: {
|
|
17198
18709
|
total: {},
|
|
@@ -17306,8 +18817,8 @@ Defaulting to \`null\`.`);
|
|
|
17306
18817
|
};
|
|
17307
18818
|
}
|
|
17308
18819
|
});
|
|
17309
|
-
const SkPagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17310
|
-
const _hoisted_1$
|
|
18820
|
+
const SkPagination = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-e7fb9357"]]);
|
|
18821
|
+
const _hoisted_1$e = {
|
|
17311
18822
|
key: 0,
|
|
17312
18823
|
class: "sk-popover-header"
|
|
17313
18824
|
};
|
|
@@ -17323,7 +18834,7 @@ Defaulting to \`null\`.`);
|
|
|
17323
18834
|
key: 2,
|
|
17324
18835
|
class: "sk-popover-footer"
|
|
17325
18836
|
};
|
|
17326
|
-
const _sfc_main$
|
|
18837
|
+
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
17327
18838
|
__name: "SkPopover",
|
|
17328
18839
|
props: {
|
|
17329
18840
|
kind: { default: "neutral" },
|
|
@@ -17379,7 +18890,7 @@ Defaulting to \`null\`.`);
|
|
|
17379
18890
|
"collision-padding": 8
|
|
17380
18891
|
}, {
|
|
17381
18892
|
default: vue.withCtx(() => [
|
|
17382
|
-
__props.title || _ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
18893
|
+
__props.title || _ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
|
|
17383
18894
|
__props.title ? (vue.openBlock(), vue.createElementBlock("h3", _hoisted_2$6, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true),
|
|
17384
18895
|
vue.renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
17385
18896
|
__props.closable ? (vue.openBlock(), vue.createBlock(vue.unref(PopoverClose_default), {
|
|
@@ -17438,8 +18949,8 @@ Defaulting to \`null\`.`);
|
|
|
17438
18949
|
};
|
|
17439
18950
|
}
|
|
17440
18951
|
});
|
|
17441
|
-
const SkPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17442
|
-
const _sfc_main$
|
|
18952
|
+
const SkPopover = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-679c4935"]]);
|
|
18953
|
+
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
17443
18954
|
__name: "SkProgress",
|
|
17444
18955
|
props: {
|
|
17445
18956
|
value: { default: null },
|
|
@@ -17512,12 +19023,12 @@ Defaulting to \`null\`.`);
|
|
|
17512
19023
|
};
|
|
17513
19024
|
}
|
|
17514
19025
|
});
|
|
17515
|
-
const SkProgress = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17516
|
-
const _hoisted_1$
|
|
19026
|
+
const SkProgress = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-4b68e83d"]]);
|
|
19027
|
+
const _hoisted_1$d = {
|
|
17517
19028
|
key: 0,
|
|
17518
19029
|
class: "sk-radio-label"
|
|
17519
19030
|
};
|
|
17520
|
-
const _sfc_main$
|
|
19031
|
+
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
17521
19032
|
__name: "SkRadio",
|
|
17522
19033
|
props: {
|
|
17523
19034
|
value: {},
|
|
@@ -17563,7 +19074,7 @@ Defaulting to \`null\`.`);
|
|
|
17563
19074
|
]),
|
|
17564
19075
|
_: 1
|
|
17565
19076
|
}, 8, ["class", "style", "value", "disabled"]),
|
|
17566
|
-
__props.label || _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
19077
|
+
__props.label || _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$d, [
|
|
17567
19078
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
17568
19079
|
vue.createTextVNode(vue.toDisplayString(__props.label), 1)
|
|
17569
19080
|
], true)
|
|
@@ -17572,8 +19083,8 @@ Defaulting to \`null\`.`);
|
|
|
17572
19083
|
};
|
|
17573
19084
|
}
|
|
17574
19085
|
});
|
|
17575
|
-
const SkRadio = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
17576
|
-
const _sfc_main$
|
|
19086
|
+
const SkRadio = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-c88f9c3f"]]);
|
|
19087
|
+
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
17577
19088
|
__name: "SkRadioGroup",
|
|
17578
19089
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
17579
19090
|
orientation: { default: "vertical" },
|
|
@@ -17615,7 +19126,203 @@ Defaulting to \`null\`.`);
|
|
|
17615
19126
|
};
|
|
17616
19127
|
}
|
|
17617
19128
|
});
|
|
17618
|
-
const SkRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
19129
|
+
const SkRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-7f5bc9cb"]]);
|
|
19130
|
+
const _hoisted_1$c = {
|
|
19131
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19132
|
+
viewBox: "0 0 24 24",
|
|
19133
|
+
fill: "none",
|
|
19134
|
+
stroke: "currentColor",
|
|
19135
|
+
"stroke-width": "2",
|
|
19136
|
+
"stroke-linecap": "square",
|
|
19137
|
+
"stroke-linejoin": "miter",
|
|
19138
|
+
style: { "width": "1rem", "height": "1rem", "flex-shrink": "0" }
|
|
19139
|
+
};
|
|
19140
|
+
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
19141
|
+
__name: "SkSelect",
|
|
19142
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
19143
|
+
kind: { default: void 0 },
|
|
19144
|
+
size: { default: "md" },
|
|
19145
|
+
placeholder: { default: "Select..." },
|
|
19146
|
+
disabled: { type: Boolean, default: false },
|
|
19147
|
+
baseColor: {},
|
|
19148
|
+
textColor: {}
|
|
19149
|
+
}, {
|
|
19150
|
+
"modelValue": {},
|
|
19151
|
+
"modelModifiers": {}
|
|
19152
|
+
}),
|
|
19153
|
+
emits: ["update:modelValue"],
|
|
19154
|
+
setup(__props) {
|
|
19155
|
+
const props = __props;
|
|
19156
|
+
const modelValue = vue.useModel(__props, "modelValue");
|
|
19157
|
+
const { theme } = usePortalContext();
|
|
19158
|
+
const fieldKind = vue.inject("field-kind", vue.computed(() => void 0));
|
|
19159
|
+
const itemLabels = vue.reactive(/* @__PURE__ */ new Map());
|
|
19160
|
+
vue.provide("sk-select-register", (value, label) => {
|
|
19161
|
+
itemLabels.set(value, label);
|
|
19162
|
+
});
|
|
19163
|
+
vue.provide("sk-select-unregister", (value) => {
|
|
19164
|
+
itemLabels.delete(value);
|
|
19165
|
+
});
|
|
19166
|
+
const displayText = vue.computed(() => {
|
|
19167
|
+
if (!modelValue.value) {
|
|
19168
|
+
return "";
|
|
19169
|
+
}
|
|
19170
|
+
return itemLabels.get(modelValue.value) || modelValue.value;
|
|
19171
|
+
});
|
|
19172
|
+
const effectiveKind = vue.computed(() => fieldKind.value || props.kind || "neutral");
|
|
19173
|
+
const wrapperClasses = vue.computed(() => ({
|
|
19174
|
+
"sk-select": true,
|
|
19175
|
+
[`sk-${effectiveKind.value}`]: true,
|
|
19176
|
+
[`sk-${props.size}`]: true
|
|
19177
|
+
}));
|
|
19178
|
+
const triggerClasses = vue.computed(() => ({
|
|
19179
|
+
"sk-select-trigger": true
|
|
19180
|
+
}));
|
|
19181
|
+
const contentClasses = vue.computed(() => ({
|
|
19182
|
+
"sk-select-content": true,
|
|
19183
|
+
[`sk-${effectiveKind.value}`]: true
|
|
19184
|
+
}));
|
|
19185
|
+
const customColorStyles = useCustomColors(
|
|
19186
|
+
"select",
|
|
19187
|
+
vue.toRef(() => props.baseColor),
|
|
19188
|
+
vue.toRef(() => props.textColor)
|
|
19189
|
+
);
|
|
19190
|
+
return (_ctx, _cache) => {
|
|
19191
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
19192
|
+
class: vue.normalizeClass(wrapperClasses.value),
|
|
19193
|
+
style: vue.normalizeStyle(vue.unref(customColorStyles))
|
|
19194
|
+
}, [
|
|
19195
|
+
vue.createVNode(vue.unref(SelectRoot_default), {
|
|
19196
|
+
modelValue: modelValue.value,
|
|
19197
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
19198
|
+
disabled: __props.disabled
|
|
19199
|
+
}, {
|
|
19200
|
+
default: vue.withCtx(() => [
|
|
19201
|
+
vue.createVNode(vue.unref(SelectTrigger_default), {
|
|
19202
|
+
class: vue.normalizeClass(triggerClasses.value)
|
|
19203
|
+
}, {
|
|
19204
|
+
default: vue.withCtx(() => [
|
|
19205
|
+
vue.createVNode(vue.unref(SelectValue_default), { placeholder: __props.placeholder }, {
|
|
19206
|
+
default: vue.withCtx(() => [
|
|
19207
|
+
displayText.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
19208
|
+
vue.createTextVNode(vue.toDisplayString(displayText.value), 1)
|
|
19209
|
+
], 64)) : vue.createCommentVNode("", true)
|
|
19210
|
+
]),
|
|
19211
|
+
_: 1
|
|
19212
|
+
}, 8, ["placeholder"]),
|
|
19213
|
+
(vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$c, [..._cache[1] || (_cache[1] = [
|
|
19214
|
+
vue.createElementVNode("polyline", { points: "6 9 12 15 18 9" }, null, -1)
|
|
19215
|
+
])]))
|
|
19216
|
+
]),
|
|
19217
|
+
_: 1
|
|
19218
|
+
}, 8, ["class"]),
|
|
19219
|
+
vue.createVNode(vue.unref(SelectPortal_default), null, {
|
|
19220
|
+
default: vue.withCtx(() => [
|
|
19221
|
+
vue.createVNode(vue.unref(SelectContent_default), {
|
|
19222
|
+
"data-scheme": vue.unref(theme),
|
|
19223
|
+
class: vue.normalizeClass(contentClasses.value),
|
|
19224
|
+
style: vue.normalizeStyle(vue.unref(customColorStyles)),
|
|
19225
|
+
position: "popper",
|
|
19226
|
+
side: "bottom",
|
|
19227
|
+
align: "start",
|
|
19228
|
+
"side-offset": 4
|
|
19229
|
+
}, {
|
|
19230
|
+
default: vue.withCtx(() => [
|
|
19231
|
+
vue.createVNode(vue.unref(SelectViewport_default), null, {
|
|
19232
|
+
default: vue.withCtx(() => [
|
|
19233
|
+
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
19234
|
+
]),
|
|
19235
|
+
_: 3
|
|
19236
|
+
})
|
|
19237
|
+
]),
|
|
19238
|
+
_: 3
|
|
19239
|
+
}, 8, ["data-scheme", "class", "style"])
|
|
19240
|
+
]),
|
|
19241
|
+
_: 3
|
|
19242
|
+
})
|
|
19243
|
+
]),
|
|
19244
|
+
_: 3
|
|
19245
|
+
}, 8, ["modelValue", "disabled"])
|
|
19246
|
+
], 6);
|
|
19247
|
+
};
|
|
19248
|
+
}
|
|
19249
|
+
});
|
|
19250
|
+
const SkSelect = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-c39367b7"]]);
|
|
19251
|
+
const _hoisted_1$b = {
|
|
19252
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19253
|
+
viewBox: "0 0 24 24",
|
|
19254
|
+
fill: "none",
|
|
19255
|
+
stroke: "currentColor",
|
|
19256
|
+
"stroke-width": "3",
|
|
19257
|
+
"stroke-linecap": "square",
|
|
19258
|
+
"stroke-linejoin": "miter",
|
|
19259
|
+
style: { "width": "1rem", "height": "1rem" }
|
|
19260
|
+
};
|
|
19261
|
+
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
19262
|
+
__name: "SkSelectItem",
|
|
19263
|
+
props: {
|
|
19264
|
+
value: {},
|
|
19265
|
+
disabled: { type: Boolean, default: false }
|
|
19266
|
+
},
|
|
19267
|
+
setup(__props) {
|
|
19268
|
+
const props = __props;
|
|
19269
|
+
const textEl = vue.useTemplateRef("textEl");
|
|
19270
|
+
const register = vue.inject("sk-select-register", void 0);
|
|
19271
|
+
const unregister = vue.inject("sk-select-unregister", void 0);
|
|
19272
|
+
vue.onMounted(() => {
|
|
19273
|
+
const el = textEl.value?.$el;
|
|
19274
|
+
if (register) {
|
|
19275
|
+
register(props.value, el?.textContent?.trim() || props.value);
|
|
19276
|
+
}
|
|
19277
|
+
});
|
|
19278
|
+
vue.onUnmounted(() => {
|
|
19279
|
+
if (unregister) {
|
|
19280
|
+
unregister(props.value);
|
|
19281
|
+
}
|
|
19282
|
+
});
|
|
19283
|
+
const classes = vue.computed(() => ({
|
|
19284
|
+
"sk-select-item": true
|
|
19285
|
+
}));
|
|
19286
|
+
return (_ctx, _cache) => {
|
|
19287
|
+
return vue.openBlock(), vue.createBlock(vue.unref(SelectItem_default), {
|
|
19288
|
+
class: vue.normalizeClass(classes.value),
|
|
19289
|
+
value: __props.value,
|
|
19290
|
+
disabled: __props.disabled
|
|
19291
|
+
}, {
|
|
19292
|
+
default: vue.withCtx(() => [
|
|
19293
|
+
vue.createVNode(vue.unref(SelectItemText_default), {
|
|
19294
|
+
ref_key: "textEl",
|
|
19295
|
+
ref: textEl
|
|
19296
|
+
}, {
|
|
19297
|
+
default: vue.withCtx(() => [
|
|
19298
|
+
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
19299
|
+
]),
|
|
19300
|
+
_: 3
|
|
19301
|
+
}, 512),
|
|
19302
|
+
vue.createVNode(vue.unref(SelectItemIndicator_default), { class: "sk-select-item-indicator" }, {
|
|
19303
|
+
default: vue.withCtx(() => [
|
|
19304
|
+
(vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$b, [..._cache[0] || (_cache[0] = [
|
|
19305
|
+
vue.createElementVNode("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
19306
|
+
])]))
|
|
19307
|
+
]),
|
|
19308
|
+
_: 1
|
|
19309
|
+
})
|
|
19310
|
+
]),
|
|
19311
|
+
_: 3
|
|
19312
|
+
}, 8, ["class", "value", "disabled"]);
|
|
19313
|
+
};
|
|
19314
|
+
}
|
|
19315
|
+
});
|
|
19316
|
+
const SkSelectItem = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-7d12d89e"]]);
|
|
19317
|
+
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
19318
|
+
__name: "SkSelectSeparator",
|
|
19319
|
+
setup(__props) {
|
|
19320
|
+
return (_ctx, _cache) => {
|
|
19321
|
+
return vue.openBlock(), vue.createBlock(vue.unref(SelectSeparator_default), { class: "sk-select-separator" });
|
|
19322
|
+
};
|
|
19323
|
+
}
|
|
19324
|
+
});
|
|
19325
|
+
const SkSelectSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-4f7c0be0"]]);
|
|
17619
19326
|
const _hoisted_1$a = { class: "sk-panel-scroll-content" };
|
|
17620
19327
|
const _hoisted_2$5 = { class: "sk-sidebar-nav" };
|
|
17621
19328
|
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -17623,25 +19330,43 @@ Defaulting to \`null\`.`);
|
|
|
17623
19330
|
props: {
|
|
17624
19331
|
kind: { default: "neutral" },
|
|
17625
19332
|
width: { default: "180px" },
|
|
19333
|
+
side: { default: "left" },
|
|
17626
19334
|
baseColor: {},
|
|
17627
19335
|
textColor: {}
|
|
17628
19336
|
},
|
|
17629
19337
|
setup(__props) {
|
|
17630
19338
|
const props = __props;
|
|
19339
|
+
const panelCorners = vue.computed(() => {
|
|
19340
|
+
return props.side === "right" ? ["bottom-left"] : ["bottom-right"];
|
|
19341
|
+
});
|
|
19342
|
+
const panelDecorationCorner = vue.computed(() => {
|
|
19343
|
+
return props.side === "right" ? "bottom-left" : "bottom-right";
|
|
19344
|
+
});
|
|
17631
19345
|
const classes = vue.computed(() => {
|
|
17632
19346
|
return {
|
|
17633
19347
|
"sk-sidebar": true,
|
|
17634
|
-
[`sk-${props.kind}`]: true
|
|
19348
|
+
[`sk-${props.kind}`]: true,
|
|
19349
|
+
"sk-sidebar-right": props.side === "right"
|
|
17635
19350
|
};
|
|
17636
19351
|
});
|
|
19352
|
+
const sidebarStyles = vue.computed(() => {
|
|
19353
|
+
const styles = {};
|
|
19354
|
+
if (props.baseColor) {
|
|
19355
|
+
styles["--sk-sidebar-color-base"] = props.baseColor;
|
|
19356
|
+
}
|
|
19357
|
+
return styles;
|
|
19358
|
+
});
|
|
17637
19359
|
return (_ctx, _cache) => {
|
|
17638
19360
|
return vue.openBlock(), vue.createElementBlock("aside", {
|
|
17639
|
-
class: vue.normalizeClass(classes.value)
|
|
19361
|
+
class: vue.normalizeClass(classes.value),
|
|
19362
|
+
style: vue.normalizeStyle(sidebarStyles.value)
|
|
17640
19363
|
}, [
|
|
17641
19364
|
vue.createVNode(SkPanel, {
|
|
17642
19365
|
kind: __props.kind,
|
|
17643
19366
|
"base-color": __props.baseColor,
|
|
17644
19367
|
"text-color": __props.textColor,
|
|
19368
|
+
corners: panelCorners.value,
|
|
19369
|
+
"decoration-corner": panelDecorationCorner.value,
|
|
17645
19370
|
class: "sk-sidebar-panel"
|
|
17646
19371
|
}, {
|
|
17647
19372
|
default: vue.withCtx(() => [
|
|
@@ -17652,8 +19377,8 @@ Defaulting to \`null\`.`);
|
|
|
17652
19377
|
])
|
|
17653
19378
|
]),
|
|
17654
19379
|
_: 3
|
|
17655
|
-
}, 8, ["kind", "base-color", "text-color"])
|
|
17656
|
-
],
|
|
19380
|
+
}, 8, ["kind", "base-color", "text-color", "corners", "decoration-corner"])
|
|
19381
|
+
], 6);
|
|
17657
19382
|
};
|
|
17658
19383
|
}
|
|
17659
19384
|
});
|
|
@@ -18954,28 +20679,28 @@ Defaulting to \`null\`.`);
|
|
|
18954
20679
|
install(app) {
|
|
18955
20680
|
app.component("SkAccordion", SkAccordion);
|
|
18956
20681
|
app.component("SkAccordionItem", SkAccordionItem);
|
|
18957
|
-
app.component("SkAlert", _sfc_main$
|
|
20682
|
+
app.component("SkAlert", _sfc_main$S);
|
|
18958
20683
|
app.component("SkAvatar", SkAvatar);
|
|
18959
20684
|
app.component("SkBreadcrumbItem", SkBreadcrumbItem);
|
|
18960
20685
|
app.component("SkBreadcrumbs", SkBreadcrumbs);
|
|
18961
20686
|
app.component("SkBreadcrumbSeparator", SkBreadcrumbSeparator);
|
|
18962
20687
|
app.component("SkButton", SkButton);
|
|
18963
|
-
app.component("SkCard", _sfc_main$
|
|
20688
|
+
app.component("SkCard", _sfc_main$L);
|
|
18964
20689
|
app.component("SkCheckbox", SkCheckbox);
|
|
18965
20690
|
app.component("SkCollapsible", SkCollapsible);
|
|
18966
|
-
app.component("SkDivider", _sfc_main$
|
|
20691
|
+
app.component("SkDivider", _sfc_main$I);
|
|
18967
20692
|
app.component("SkDropdown", SkDropdown);
|
|
18968
20693
|
app.component("SkDropdownMenuItem", SkDropdownMenuItem);
|
|
18969
20694
|
app.component("SkDropdownMenuSeparator", SkDropdownMenuSeparator);
|
|
18970
20695
|
app.component("SkDropdownSubmenu", SkDropdownSubmenu);
|
|
18971
20696
|
app.component("SkField", SkField);
|
|
18972
|
-
app.component("SkGroup", _sfc_main$
|
|
20697
|
+
app.component("SkGroup", _sfc_main$C);
|
|
18973
20698
|
app.component("SkInput", SkInput);
|
|
18974
20699
|
app.component("SkListbox", SkListbox);
|
|
18975
20700
|
app.component("SkListboxItem", SkListboxItem);
|
|
18976
20701
|
app.component("SkListboxSeparator", SkListboxSeparator);
|
|
18977
20702
|
app.component("SkModal", SkModal);
|
|
18978
|
-
app.component("SkNavBar", _sfc_main$
|
|
20703
|
+
app.component("SkNavBar", _sfc_main$w);
|
|
18979
20704
|
app.component("SkNumberInput", SkNumberInput);
|
|
18980
20705
|
app.component("SkPage", SkPage);
|
|
18981
20706
|
app.component("SkPagination", SkPagination);
|
|
@@ -18985,6 +20710,9 @@ Defaulting to \`null\`.`);
|
|
|
18985
20710
|
app.component("SkProgress", SkProgress);
|
|
18986
20711
|
app.component("SkRadio", SkRadio);
|
|
18987
20712
|
app.component("SkRadioGroup", SkRadioGroup);
|
|
20713
|
+
app.component("SkSelect", SkSelect);
|
|
20714
|
+
app.component("SkSelectItem", SkSelectItem);
|
|
20715
|
+
app.component("SkSelectSeparator", SkSelectSeparator);
|
|
18988
20716
|
app.component("SkSidebar", _sfc_main$k);
|
|
18989
20717
|
app.component("SkSidebarItem", _sfc_main$j);
|
|
18990
20718
|
app.component("SkSidebarSection", _sfc_main$i);
|
|
@@ -19009,28 +20737,28 @@ Defaulting to \`null\`.`);
|
|
|
19009
20737
|
};
|
|
19010
20738
|
exports2.SkAccordion = SkAccordion;
|
|
19011
20739
|
exports2.SkAccordionItem = SkAccordionItem;
|
|
19012
|
-
exports2.SkAlert = _sfc_main$
|
|
20740
|
+
exports2.SkAlert = _sfc_main$S;
|
|
19013
20741
|
exports2.SkAvatar = SkAvatar;
|
|
19014
20742
|
exports2.SkBreadcrumbItem = SkBreadcrumbItem;
|
|
19015
20743
|
exports2.SkBreadcrumbSeparator = SkBreadcrumbSeparator;
|
|
19016
20744
|
exports2.SkBreadcrumbs = SkBreadcrumbs;
|
|
19017
20745
|
exports2.SkButton = SkButton;
|
|
19018
|
-
exports2.SkCard = _sfc_main$
|
|
20746
|
+
exports2.SkCard = _sfc_main$L;
|
|
19019
20747
|
exports2.SkCheckbox = SkCheckbox;
|
|
19020
20748
|
exports2.SkCollapsible = SkCollapsible;
|
|
19021
|
-
exports2.SkDivider = _sfc_main$
|
|
20749
|
+
exports2.SkDivider = _sfc_main$I;
|
|
19022
20750
|
exports2.SkDropdown = SkDropdown;
|
|
19023
20751
|
exports2.SkDropdownMenuItem = SkDropdownMenuItem;
|
|
19024
20752
|
exports2.SkDropdownMenuSeparator = SkDropdownMenuSeparator;
|
|
19025
20753
|
exports2.SkDropdownSubmenu = SkDropdownSubmenu;
|
|
19026
20754
|
exports2.SkField = SkField;
|
|
19027
|
-
exports2.SkGroup = _sfc_main$
|
|
20755
|
+
exports2.SkGroup = _sfc_main$C;
|
|
19028
20756
|
exports2.SkInput = SkInput;
|
|
19029
20757
|
exports2.SkListbox = SkListbox;
|
|
19030
20758
|
exports2.SkListboxItem = SkListboxItem;
|
|
19031
20759
|
exports2.SkListboxSeparator = SkListboxSeparator;
|
|
19032
20760
|
exports2.SkModal = SkModal;
|
|
19033
|
-
exports2.SkNavBar = _sfc_main$
|
|
20761
|
+
exports2.SkNavBar = _sfc_main$w;
|
|
19034
20762
|
exports2.SkNumberInput = SkNumberInput;
|
|
19035
20763
|
exports2.SkPage = SkPage;
|
|
19036
20764
|
exports2.SkPagination = SkPagination;
|
|
@@ -19040,6 +20768,9 @@ Defaulting to \`null\`.`);
|
|
|
19040
20768
|
exports2.SkProgress = SkProgress;
|
|
19041
20769
|
exports2.SkRadio = SkRadio;
|
|
19042
20770
|
exports2.SkRadioGroup = SkRadioGroup;
|
|
20771
|
+
exports2.SkSelect = SkSelect;
|
|
20772
|
+
exports2.SkSelectItem = SkSelectItem;
|
|
20773
|
+
exports2.SkSelectSeparator = SkSelectSeparator;
|
|
19043
20774
|
exports2.SkSidebar = _sfc_main$k;
|
|
19044
20775
|
exports2.SkSidebarItem = _sfc_main$j;
|
|
19045
20776
|
exports2.SkSidebarSection = _sfc_main$i;
|