@mantine-vue/core 2.3.1 → 3.0.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/cjs/index.cjs +1718 -292
- package/cjs/index.cjs.map +1 -1
- package/esm/index.mjs +1713 -293
- package/esm/index.mjs.map +1 -1
- package/lib/components/Accordion/Accordion.d.ts +24 -4
- package/lib/components/Accordion/index.d.ts +1 -1
- package/lib/components/AngleSlider/AngleSlider.d.ts +15 -2
- package/lib/components/Autocomplete/Autocomplete.d.ts +3 -1
- package/lib/components/Cascader/Cascader.d.ts +315 -0
- package/lib/components/Cascader/cascader-utils.d.ts +11 -0
- package/lib/components/Cascader/index.d.ts +4 -0
- package/lib/components/Checkbox/Checkbox.d.ts +91 -9
- package/lib/components/Checkbox/CheckboxCard/CheckboxCard.d.ts +15 -2
- package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.d.ts +14 -2
- package/lib/components/Chip/Chip.d.ts +46 -7
- package/lib/components/Chip/ChipGroup/ChipGroup.d.ts +14 -2
- package/lib/components/ColorInput/ColorInput.d.ts +9 -3
- package/lib/components/ColorInput/index.d.ts +1 -1
- package/lib/components/ColorPicker/AlphaSlider/AlphaSlider.d.ts +26 -4
- package/lib/components/ColorPicker/ColorPicker.d.ts +14 -2
- package/lib/components/ColorPicker/ColorSlider/ColorSlider.d.ts +26 -4
- package/lib/components/ColorPicker/HueSlider/HueSlider.d.ts +26 -4
- package/lib/components/Combobox/Combobox.d.ts +64 -4
- package/lib/components/Combobox/OptionsDropdown/OptionsDropdown.d.ts +1 -0
- package/lib/components/ComboboxPopover/ComboboxPopover.d.ts +49 -7
- package/lib/components/Drawer/Drawer.d.ts +33 -0
- package/lib/components/FileButton/FileButton.d.ts +17 -4
- package/lib/components/FileInput/FileInput.d.ts +14 -2
- package/lib/components/FloatingWindow/FloatingWindow.context.d.ts +23 -0
- package/lib/components/FloatingWindow/FloatingWindow.d.ts +37 -0
- package/lib/components/FloatingWindow/FloatingWindowResizeHandle.d.ts +27 -0
- package/lib/components/FloatingWindow/index.d.ts +2 -0
- package/lib/components/Input/Input.d.ts +74 -5
- package/lib/components/InputBase/InputBase.d.ts +41 -2
- package/lib/components/InputBase/index.d.ts +1 -1
- package/lib/components/JsonInput/JsonInput.d.ts +14 -2
- package/lib/components/MaskInput/MaskInput.d.ts +45 -2
- package/lib/components/Menu/Menu.context.d.ts +1 -0
- package/lib/components/Menu/Menu.d.ts +82 -4
- package/lib/components/Modal/Modal.d.ts +33 -0
- package/lib/components/MultiSelect/MultiSelect.d.ts +9 -1
- package/lib/components/MultiSelect/index.d.ts +1 -1
- package/lib/components/NativeSelect/NativeSelect.d.ts +19 -6
- package/lib/components/NumberInput/NumberInput.d.ts +14 -2
- package/lib/components/PasswordInput/PasswordInput.d.ts +45 -2
- package/lib/components/PasswordInput/index.d.ts +1 -1
- package/lib/components/PillsInput/PillsInput.d.ts +41 -2
- package/lib/components/PillsInput/PillsInputField/PillsInputField.d.ts +41 -2
- package/lib/components/PinInput/PinInput.d.ts +15 -2
- package/lib/components/Radio/Radio.d.ts +124 -9
- package/lib/components/Radio/RadioCard/RadioCard.d.ts +33 -2
- package/lib/components/Radio/RadioGroup/RadioGroup.d.ts +14 -2
- package/lib/components/Rating/Rating.d.ts +14 -2
- package/lib/components/ScrollArea/ScrollArea.d.ts +25 -0
- package/lib/components/Scroller/Scroller.d.ts +9 -2
- package/lib/components/Scroller/index.d.ts +1 -1
- package/lib/components/SegmentedControl/SegmentedControl.d.ts +14 -2
- package/lib/components/Select/Select.d.ts +4 -2
- package/lib/components/Select/index.d.ts +1 -1
- package/lib/components/Slider/RangeSlider/RangeSlider.d.ts +14 -2
- package/lib/components/Slider/Slider/Slider.d.ts +14 -2
- package/lib/components/Slider/index.d.ts +2 -1
- package/lib/components/Splitter/Splitter.d.ts +8 -3
- package/lib/components/Splitter/index.d.ts +1 -1
- package/lib/components/Stepper/Stepper.d.ts +2 -1
- package/lib/components/Switch/Switch.d.ts +67 -13
- package/lib/components/Switch/SwitchGroup/SwitchGroup.d.ts +15 -3
- package/lib/components/Tabs/Tabs.context.d.ts +0 -1
- package/lib/components/Tabs/Tabs.d.ts +0 -15
- package/lib/components/TagsInput/TagsInput.d.ts +9 -1
- package/lib/components/TagsInput/index.d.ts +1 -1
- package/lib/components/TextInput/TextInput.d.ts +36 -2
- package/lib/components/Textarea/Textarea.d.ts +39 -4
- package/lib/components/Textarea/index.d.ts +1 -0
- package/lib/components/Timeline/Timeline.d.ts +19 -1
- package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts +20 -1
- package/lib/components/Tree/Tree.d.ts +7 -2
- package/lib/components/Tree/index.d.ts +1 -1
- package/lib/components/TreeSelect/TreeSelect.d.ts +5 -2
- package/lib/components/TreeSelect/index.d.ts +1 -1
- package/lib/components/index.d.ts +1 -0
- package/package.json +3 -3
- package/styles.css +471 -129
- package/styles.layer.css +471 -129
package/esm/index.mjs
CHANGED
|
@@ -3748,6 +3748,10 @@ var AngleSlider = withBoxProps(defineComponent({
|
|
|
3748
3748
|
type: Number,
|
|
3749
3749
|
default: void 0
|
|
3750
3750
|
},
|
|
3751
|
+
modelValue: {
|
|
3752
|
+
type: Number,
|
|
3753
|
+
default: void 0
|
|
3754
|
+
},
|
|
3751
3755
|
value: {
|
|
3752
3756
|
type: Number,
|
|
3753
3757
|
default: void 0
|
|
@@ -3825,14 +3829,18 @@ var AngleSlider = withBoxProps(defineComponent({
|
|
|
3825
3829
|
default: false
|
|
3826
3830
|
}
|
|
3827
3831
|
},
|
|
3828
|
-
|
|
3832
|
+
emits: ["update:modelValue", "change"],
|
|
3833
|
+
setup(rawProps, { attrs, emit }) {
|
|
3829
3834
|
const props = useProps("AngleSlider", defaultProps$52, rawProps);
|
|
3830
3835
|
const rootRef = ref(null);
|
|
3831
3836
|
const [value, setValue] = useUncontrolled({
|
|
3832
|
-
value: () => props.value,
|
|
3837
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
3833
3838
|
defaultValue: props.defaultValue,
|
|
3834
3839
|
finalValue: 0,
|
|
3835
|
-
onChange:
|
|
3840
|
+
onChange: (value) => {
|
|
3841
|
+
emit("update:modelValue", value);
|
|
3842
|
+
emit("change", value);
|
|
3843
|
+
}
|
|
3836
3844
|
});
|
|
3837
3845
|
const update = (nextValue) => {
|
|
3838
3846
|
if (!rootRef.value || props.disabled) return;
|
|
@@ -5107,7 +5115,7 @@ var varsResolver$70 = createVarsResolver((theme, { radius, color, gradient, vari
|
|
|
5107
5115
|
"--button-hover-color": color || variant ? colors.hoverColor : void 0
|
|
5108
5116
|
} };
|
|
5109
5117
|
});
|
|
5110
|
-
function renderContent$
|
|
5118
|
+
function renderContent$4(content) {
|
|
5111
5119
|
return typeof content === "function" ? content() : content;
|
|
5112
5120
|
}
|
|
5113
5121
|
var ButtonBase = defineComponent({
|
|
@@ -5236,7 +5244,7 @@ var ButtonBase = defineComponent({
|
|
|
5236
5244
|
component: "span",
|
|
5237
5245
|
...getStyles("section"),
|
|
5238
5246
|
mod: { position }
|
|
5239
|
-
}, () => renderContent$
|
|
5247
|
+
}, () => renderContent$4(content)) : null;
|
|
5240
5248
|
return () => {
|
|
5241
5249
|
const leftSection = resolveNode(props.leftSection, slots.leftSection);
|
|
5242
5250
|
const rightSection = resolveNode(props.rightSection, slots.rightSection);
|
|
@@ -8016,13 +8024,13 @@ var ScrollAreaViewport = withBoxProps(defineComponent({
|
|
|
8016
8024
|
}
|
|
8017
8025
|
}));
|
|
8018
8026
|
var ScrollArea_module_default = {
|
|
8019
|
-
root: "
|
|
8020
|
-
content: "
|
|
8021
|
-
viewport: "
|
|
8022
|
-
viewportInner: "
|
|
8023
|
-
scrollbar: "
|
|
8024
|
-
thumb: "
|
|
8025
|
-
corner: "
|
|
8027
|
+
root: "_root_1sy9q_1",
|
|
8028
|
+
content: "_content_1sy9q_7",
|
|
8029
|
+
viewport: "_viewport_1sy9q_12",
|
|
8030
|
+
viewportInner: "_viewportInner_1sy9q_71",
|
|
8031
|
+
scrollbar: "_scrollbar_1sy9q_76",
|
|
8032
|
+
thumb: "_thumb_1sy9q_93",
|
|
8033
|
+
corner: "_corner_1sy9q_182"
|
|
8026
8034
|
};
|
|
8027
8035
|
//#endregion
|
|
8028
8036
|
//#region src/components/ScrollArea/ScrollArea.ts
|
|
@@ -8098,6 +8106,10 @@ var ScrollAreaBase = defineComponent({
|
|
|
8098
8106
|
type: Object,
|
|
8099
8107
|
default: void 0
|
|
8100
8108
|
},
|
|
8109
|
+
verticalScrollbarPosition: {
|
|
8110
|
+
type: String,
|
|
8111
|
+
default: void 0
|
|
8112
|
+
},
|
|
8101
8113
|
classNames: {
|
|
8102
8114
|
type: [Object, Function],
|
|
8103
8115
|
default: void 0
|
|
@@ -8256,11 +8268,13 @@ var ScrollAreaBase = defineComponent({
|
|
|
8256
8268
|
},
|
|
8257
8269
|
"data-offset-scrollbars": toOffsetScrollbars(props.offsetScrollbars),
|
|
8258
8270
|
"data-scrollbars": props.scrollbars || void 0,
|
|
8271
|
+
"data-vertical-scrollbar-position": props.verticalScrollbarPosition,
|
|
8259
8272
|
onScroll: handleScroll
|
|
8260
8273
|
}, () => slots.default?.()),
|
|
8261
8274
|
(props.scrollbars === "xy" || props.scrollbars === "x") && h(ScrollAreaScrollbar, {
|
|
8262
8275
|
...getStyles("scrollbar"),
|
|
8263
8276
|
orientation: "horizontal",
|
|
8277
|
+
"data-vertical-scrollbar-position": props.verticalScrollbarPosition,
|
|
8264
8278
|
"data-hidden": props.type === "never" ? true : void 0,
|
|
8265
8279
|
"data-state": getScrollbarState("horizontal"),
|
|
8266
8280
|
forceMount: true
|
|
@@ -8268,12 +8282,14 @@ var ScrollAreaBase = defineComponent({
|
|
|
8268
8282
|
(props.scrollbars === "xy" || props.scrollbars === "y") && h(ScrollAreaScrollbar, {
|
|
8269
8283
|
...getStyles("scrollbar"),
|
|
8270
8284
|
orientation: "vertical",
|
|
8285
|
+
"data-vertical-scrollbar-position": props.verticalScrollbarPosition,
|
|
8271
8286
|
"data-hidden": props.type === "never" ? true : void 0,
|
|
8272
8287
|
"data-state": getScrollbarState("vertical"),
|
|
8273
8288
|
forceMount: true
|
|
8274
8289
|
}, () => h(ScrollAreaThumb, getStyles("thumb"))),
|
|
8275
8290
|
h(ScrollAreaCorner, {
|
|
8276
8291
|
...getStyles("corner"),
|
|
8292
|
+
"data-vertical-scrollbar-position": props.verticalScrollbarPosition,
|
|
8277
8293
|
"data-hidden": props.type === "never" ? true : void 0
|
|
8278
8294
|
})
|
|
8279
8295
|
]);
|
|
@@ -8594,6 +8610,7 @@ var defaultProps$35 = {
|
|
|
8594
8610
|
multiple: false,
|
|
8595
8611
|
loop: true,
|
|
8596
8612
|
disableChevronRotation: false,
|
|
8613
|
+
disableCollapse: false,
|
|
8597
8614
|
chevronPosition: "right",
|
|
8598
8615
|
variant: "default",
|
|
8599
8616
|
chevronSize: "auto",
|
|
@@ -8605,7 +8622,7 @@ function getSafeId$2(prefix) {
|
|
|
8605
8622
|
return `${prefix}-${value}`;
|
|
8606
8623
|
};
|
|
8607
8624
|
}
|
|
8608
|
-
function renderContent$
|
|
8625
|
+
function renderContent$3(content) {
|
|
8609
8626
|
return typeof content === "function" ? content() : content;
|
|
8610
8627
|
}
|
|
8611
8628
|
var varsResolver$57 = createVarsResolver((_, { transitionDuration, chevronSize, radius }) => ({ root: {
|
|
@@ -8616,6 +8633,7 @@ var varsResolver$57 = createVarsResolver((_, { transitionDuration, chevronSize,
|
|
|
8616
8633
|
var AccordionBase = defineComponent({
|
|
8617
8634
|
name: "Accordion",
|
|
8618
8635
|
inheritAttrs: false,
|
|
8636
|
+
slots: Object,
|
|
8619
8637
|
props: {
|
|
8620
8638
|
multiple: {
|
|
8621
8639
|
type: Boolean,
|
|
@@ -8649,6 +8667,10 @@ var AccordionBase = defineComponent({
|
|
|
8649
8667
|
type: Boolean,
|
|
8650
8668
|
default: void 0
|
|
8651
8669
|
},
|
|
8670
|
+
disableCollapse: {
|
|
8671
|
+
type: Boolean,
|
|
8672
|
+
default: void 0
|
|
8673
|
+
},
|
|
8652
8674
|
chevronPosition: {
|
|
8653
8675
|
type: String,
|
|
8654
8676
|
default: void 0
|
|
@@ -8728,6 +8750,7 @@ var AccordionBase = defineComponent({
|
|
|
8728
8750
|
const isItemActive = (itemValue) => Array.isArray(currentValue.value) ? currentValue.value.includes(itemValue) : itemValue === currentValue.value;
|
|
8729
8751
|
const handleItemChange = (itemValue) => {
|
|
8730
8752
|
const value = currentValue.value;
|
|
8753
|
+
if (!Array.isArray(value) && props.disableCollapse && itemValue === value) return;
|
|
8731
8754
|
setCurrentValue(Array.isArray(value) ? value.includes(itemValue) ? value.filter((selectedValue) => selectedValue !== itemValue) : [...value, itemValue] : itemValue === value ? null : itemValue);
|
|
8732
8755
|
};
|
|
8733
8756
|
provideAccordionContext(reactive({
|
|
@@ -8747,7 +8770,8 @@ var AccordionBase = defineComponent({
|
|
|
8747
8770
|
return props.order;
|
|
8748
8771
|
},
|
|
8749
8772
|
get chevron() {
|
|
8750
|
-
|
|
8773
|
+
if (props.chevron === null) return null;
|
|
8774
|
+
return props.chevron ?? slots.chevron ?? (() => h(AccordionChevron, { size: props.chevronIconSize }));
|
|
8751
8775
|
},
|
|
8752
8776
|
onChange: handleItemChange,
|
|
8753
8777
|
isItemActive,
|
|
@@ -8777,7 +8801,7 @@ var AccordionBase = defineComponent({
|
|
|
8777
8801
|
id: uid.value,
|
|
8778
8802
|
variant: props.variant,
|
|
8779
8803
|
"data-accordion": true
|
|
8780
|
-
}, () => renderContent$
|
|
8804
|
+
}, () => renderContent$3(slots.default));
|
|
8781
8805
|
}
|
|
8782
8806
|
});
|
|
8783
8807
|
var Accordion = Object.assign(AccordionBase, {
|
|
@@ -8805,12 +8829,10 @@ var varsResolver$56 = createVarsResolver((theme, { controlSize, edgeGradientColo
|
|
|
8805
8829
|
"--scroller-control-size": controlSize === void 0 ? void 0 : rem(controlSize),
|
|
8806
8830
|
"--scroller-background-color": edgeGradientColor ? getThemeColor(edgeGradientColor, theme) : void 0
|
|
8807
8831
|
} }));
|
|
8808
|
-
function renderContent$3(content) {
|
|
8809
|
-
return typeof content === "function" ? content() : content;
|
|
8810
|
-
}
|
|
8811
8832
|
var Scroller = withBoxProps(defineComponent({
|
|
8812
8833
|
name: "Scroller",
|
|
8813
8834
|
inheritAttrs: false,
|
|
8835
|
+
slots: Object,
|
|
8814
8836
|
props: {
|
|
8815
8837
|
scrollAmount: {
|
|
8816
8838
|
type: Number,
|
|
@@ -8915,7 +8937,7 @@ var Scroller = withBoxProps(defineComponent({
|
|
|
8915
8937
|
"data-hidden": !showStart || void 0,
|
|
8916
8938
|
"aria-label": "Scroll left",
|
|
8917
8939
|
tabindex: showStart ? 0 : -1
|
|
8918
|
-
}, () =>
|
|
8940
|
+
}, () => resolveNode(props.startControlIcon, slots.startControlIcon) || h(AccordionChevron, getStyles("chevron"))),
|
|
8919
8941
|
h("div", {
|
|
8920
8942
|
...getStyles("container"),
|
|
8921
8943
|
ref: scroller.ref,
|
|
@@ -8931,7 +8953,7 @@ var Scroller = withBoxProps(defineComponent({
|
|
|
8931
8953
|
"data-hidden": !showEnd || void 0,
|
|
8932
8954
|
"aria-label": "Scroll right",
|
|
8933
8955
|
tabindex: showEnd ? 0 : -1
|
|
8934
|
-
}, () =>
|
|
8956
|
+
}, () => resolveNode(props.endControlIcon, slots.endControlIcon) || h(AccordionChevron, getStyles("chevron")))
|
|
8935
8957
|
]);
|
|
8936
8958
|
};
|
|
8937
8959
|
}
|
|
@@ -9910,8 +9932,9 @@ function getDigitParts({ value, decimalScale, fixedDecimalScale }) {
|
|
|
9910
9932
|
const dotIdx = str.indexOf(".");
|
|
9911
9933
|
const intStr = dotIdx >= 0 ? str.slice(0, dotIdx) : str;
|
|
9912
9934
|
const fracStr = dotIdx >= 0 ? str.slice(dotIdx + 1) : "";
|
|
9935
|
+
const roundedToZero = !/[1-9]/.test(str);
|
|
9913
9936
|
return {
|
|
9914
|
-
negative: value < 0,
|
|
9937
|
+
negative: value < 0 && !roundedToZero,
|
|
9915
9938
|
intDigits: intStr.split(""),
|
|
9916
9939
|
fracDigits: fracStr ? fracStr.split("") : [],
|
|
9917
9940
|
hasDecimal: dotIdx >= 0
|
|
@@ -10257,11 +10280,12 @@ Object.assign(RollingNumber, {
|
|
|
10257
10280
|
//#region src/components/Timeline/Timeline.context.ts
|
|
10258
10281
|
var [provideTimelineContext, useTimelineContext] = createSafeContext("Timeline component was not found in tree");
|
|
10259
10282
|
var Timeline_module_default = {
|
|
10260
|
-
root: "
|
|
10261
|
-
itemTitle: "
|
|
10262
|
-
item: "
|
|
10263
|
-
itemBullet: "
|
|
10264
|
-
itemBody: "
|
|
10283
|
+
root: "_root_1p5xp_1",
|
|
10284
|
+
itemTitle: "_itemTitle_1p5xp_19",
|
|
10285
|
+
item: "_item_1p5xp_19",
|
|
10286
|
+
itemBullet: "_itemBullet_1p5xp_96",
|
|
10287
|
+
itemBody: "_itemBody_1p5xp_159",
|
|
10288
|
+
itemOpposite: "_itemOpposite_1p5xp_199"
|
|
10265
10289
|
};
|
|
10266
10290
|
//#endregion
|
|
10267
10291
|
//#region src/components/Timeline/TimelineItem/TimelineItem.ts
|
|
@@ -10298,6 +10322,14 @@ var TimelineItem = withBoxProps(defineComponent({
|
|
|
10298
10322
|
type: null,
|
|
10299
10323
|
default: void 0
|
|
10300
10324
|
},
|
|
10325
|
+
opposite: {
|
|
10326
|
+
type: null,
|
|
10327
|
+
default: void 0
|
|
10328
|
+
},
|
|
10329
|
+
alternate: {
|
|
10330
|
+
type: Boolean,
|
|
10331
|
+
default: false
|
|
10332
|
+
},
|
|
10301
10333
|
radius: {
|
|
10302
10334
|
type: [String, Number],
|
|
10303
10335
|
default: void 0
|
|
@@ -10348,6 +10380,7 @@ var TimelineItem = withBoxProps(defineComponent({
|
|
|
10348
10380
|
const lineActive = props.lineActive ?? props.__lineActive;
|
|
10349
10381
|
const bullet = resolveNode(props.bullet, slots.bullet);
|
|
10350
10382
|
const title = resolveNode(props.title, slots.title);
|
|
10383
|
+
const opposite = resolveNode(props.opposite, slots.opposite);
|
|
10351
10384
|
const stylesApiProps = {
|
|
10352
10385
|
className: props.className ?? attrs.class,
|
|
10353
10386
|
props
|
|
@@ -10356,7 +10389,8 @@ var TimelineItem = withBoxProps(defineComponent({
|
|
|
10356
10389
|
...attrs,
|
|
10357
10390
|
mod: [{
|
|
10358
10391
|
lineActive,
|
|
10359
|
-
active
|
|
10392
|
+
active,
|
|
10393
|
+
alternate: props.alternate
|
|
10360
10394
|
}, props.mod],
|
|
10361
10395
|
...ctx.getStyles("item", {
|
|
10362
10396
|
...stylesApiProps,
|
|
@@ -10368,14 +10402,18 @@ var TimelineItem = withBoxProps(defineComponent({
|
|
|
10368
10402
|
...attrs.style
|
|
10369
10403
|
}
|
|
10370
10404
|
})
|
|
10371
|
-
}, () => [
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10405
|
+
}, () => [
|
|
10406
|
+
h(Box, {
|
|
10407
|
+
...ctx.getStyles("itemBullet", { props }),
|
|
10408
|
+
mod: {
|
|
10409
|
+
withChild: hasNode(bullet),
|
|
10410
|
+
align: props.__align,
|
|
10411
|
+
active
|
|
10412
|
+
}
|
|
10413
|
+
}, () => bullet),
|
|
10414
|
+
hasNode(opposite) ? h("div", ctx.getStyles("itemOpposite", { props }), opposite) : null,
|
|
10415
|
+
h("div", ctx.getStyles("itemBody", { props }), [hasNode(title) ? h("div", ctx.getStyles("itemTitle", { props }), title) : null, h("div", ctx.getStyles("itemContent", { props }), slots.default?.())])
|
|
10416
|
+
]);
|
|
10379
10417
|
};
|
|
10380
10418
|
}
|
|
10381
10419
|
}));
|
|
@@ -10471,6 +10509,10 @@ var TimelineBase = defineComponent({
|
|
|
10471
10509
|
provideTimelineContext({ getStyles });
|
|
10472
10510
|
return () => {
|
|
10473
10511
|
const children = (slots.default?.() ?? []).filter(Boolean);
|
|
10512
|
+
const hasOpposite = children.some((item) => {
|
|
10513
|
+
const childSlots = item.children;
|
|
10514
|
+
return item.props?.opposite != null || childSlots?.opposite != null;
|
|
10515
|
+
});
|
|
10474
10516
|
const active = props.active ?? defaultProps$28.active;
|
|
10475
10517
|
const items = children.map((item, index) => cloneVNode(item, {
|
|
10476
10518
|
unstyled: props.unstyled,
|
|
@@ -10480,7 +10522,10 @@ var TimelineBase = defineComponent({
|
|
|
10480
10522
|
}, true));
|
|
10481
10523
|
return h(Box, {
|
|
10482
10524
|
...attrs,
|
|
10483
|
-
mod: [{
|
|
10525
|
+
mod: [{
|
|
10526
|
+
align: props.align,
|
|
10527
|
+
opposite: hasOpposite
|
|
10528
|
+
}, props.mod],
|
|
10484
10529
|
...getStyles("root", {
|
|
10485
10530
|
className: attrs.class,
|
|
10486
10531
|
style: attrs.style
|
|
@@ -11085,9 +11130,17 @@ var FileButton = defineComponent({
|
|
|
11085
11130
|
name: "FileButton",
|
|
11086
11131
|
inheritAttrs: false,
|
|
11087
11132
|
props: {
|
|
11133
|
+
modelValue: {
|
|
11134
|
+
type: [
|
|
11135
|
+
Object,
|
|
11136
|
+
Array,
|
|
11137
|
+
null
|
|
11138
|
+
],
|
|
11139
|
+
default: void 0
|
|
11140
|
+
},
|
|
11088
11141
|
onChange: {
|
|
11089
11142
|
type: Function,
|
|
11090
|
-
|
|
11143
|
+
default: void 0
|
|
11091
11144
|
},
|
|
11092
11145
|
multiple: {
|
|
11093
11146
|
type: Boolean,
|
|
@@ -11126,7 +11179,8 @@ var FileButton = defineComponent({
|
|
|
11126
11179
|
default: void 0
|
|
11127
11180
|
}
|
|
11128
11181
|
},
|
|
11129
|
-
|
|
11182
|
+
emits: ["update:modelValue", "change"],
|
|
11183
|
+
setup(props, { attrs, slots, emit }) {
|
|
11130
11184
|
const inputRef = ref(null);
|
|
11131
11185
|
const reset = () => {
|
|
11132
11186
|
if (inputRef.value) inputRef.value.value = "";
|
|
@@ -11151,10 +11205,14 @@ var FileButton = defineComponent({
|
|
|
11151
11205
|
onChange: (event) => {
|
|
11152
11206
|
const files = event.currentTarget.files;
|
|
11153
11207
|
if (files === null) {
|
|
11154
|
-
props.
|
|
11208
|
+
const nextValue = props.multiple ? [] : null;
|
|
11209
|
+
emit("update:modelValue", nextValue);
|
|
11210
|
+
emit("change", nextValue);
|
|
11155
11211
|
return;
|
|
11156
11212
|
}
|
|
11157
|
-
props.
|
|
11213
|
+
const nextValue = props.multiple ? Array.from(files) : files[0] || null;
|
|
11214
|
+
emit("update:modelValue", nextValue);
|
|
11215
|
+
emit("change", nextValue);
|
|
11158
11216
|
}
|
|
11159
11217
|
}), slots.default?.({
|
|
11160
11218
|
onClick,
|
|
@@ -11795,6 +11853,22 @@ var InputBase$1 = defineComponent({
|
|
|
11795
11853
|
],
|
|
11796
11854
|
default: "input"
|
|
11797
11855
|
},
|
|
11856
|
+
modelValue: {
|
|
11857
|
+
type: null,
|
|
11858
|
+
default: void 0
|
|
11859
|
+
},
|
|
11860
|
+
value: {
|
|
11861
|
+
type: null,
|
|
11862
|
+
default: void 0
|
|
11863
|
+
},
|
|
11864
|
+
defaultValue: {
|
|
11865
|
+
type: null,
|
|
11866
|
+
default: void 0
|
|
11867
|
+
},
|
|
11868
|
+
onChange: {
|
|
11869
|
+
type: Function,
|
|
11870
|
+
default: void 0
|
|
11871
|
+
},
|
|
11798
11872
|
__staticSelector: {
|
|
11799
11873
|
type: String,
|
|
11800
11874
|
default: void 0
|
|
@@ -11964,7 +12038,21 @@ var InputBase$1 = defineComponent({
|
|
|
11964
12038
|
default: false
|
|
11965
12039
|
}
|
|
11966
12040
|
},
|
|
11967
|
-
|
|
12041
|
+
emits: ["update:modelValue", "change"],
|
|
12042
|
+
setup(props, { attrs, slots, emit }) {
|
|
12043
|
+
const [value, setValue] = useUncontrolled({
|
|
12044
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
12045
|
+
defaultValue: props.defaultValue,
|
|
12046
|
+
finalValue: void 0,
|
|
12047
|
+
onChange: (nextValue) => {
|
|
12048
|
+
emit("update:modelValue", nextValue);
|
|
12049
|
+
emit("change", nextValue);
|
|
12050
|
+
}
|
|
12051
|
+
});
|
|
12052
|
+
const callHandler = (handler, event) => {
|
|
12053
|
+
if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
|
|
12054
|
+
else if (typeof handler === "function") handler(event);
|
|
12055
|
+
};
|
|
11968
12056
|
const wrapperCtx = useInputWrapperContext();
|
|
11969
12057
|
const stylesCtx = reactive({
|
|
11970
12058
|
offsetBottom: false,
|
|
@@ -12034,6 +12122,14 @@ var InputBase$1 = defineComponent({
|
|
|
12034
12122
|
h(Box, {
|
|
12035
12123
|
...attrs,
|
|
12036
12124
|
...ariaAttributes,
|
|
12125
|
+
value: props.component === "button" || props.component === "div" ? void 0 : value.value,
|
|
12126
|
+
onInput: (event) => {
|
|
12127
|
+
callHandler(attrs.onInput, event);
|
|
12128
|
+
if (props.component !== "select") setValue(event.currentTarget.value);
|
|
12129
|
+
},
|
|
12130
|
+
onChange: (event) => {
|
|
12131
|
+
if (props.component === "select") setValue(event.currentTarget.value);
|
|
12132
|
+
},
|
|
12037
12133
|
component: props.component,
|
|
12038
12134
|
required: props.required,
|
|
12039
12135
|
disabled: props.disabled,
|
|
@@ -12089,6 +12185,22 @@ var InputBase = withBoxProps(defineComponent({
|
|
|
12089
12185
|
],
|
|
12090
12186
|
default: "input"
|
|
12091
12187
|
},
|
|
12188
|
+
modelValue: {
|
|
12189
|
+
type: null,
|
|
12190
|
+
default: void 0
|
|
12191
|
+
},
|
|
12192
|
+
value: {
|
|
12193
|
+
type: null,
|
|
12194
|
+
default: void 0
|
|
12195
|
+
},
|
|
12196
|
+
defaultValue: {
|
|
12197
|
+
type: null,
|
|
12198
|
+
default: void 0
|
|
12199
|
+
},
|
|
12200
|
+
onChange: {
|
|
12201
|
+
type: Function,
|
|
12202
|
+
default: void 0
|
|
12203
|
+
},
|
|
12092
12204
|
__staticSelector: {
|
|
12093
12205
|
type: String,
|
|
12094
12206
|
default: "InputBase"
|
|
@@ -12294,7 +12406,17 @@ var InputBase = withBoxProps(defineComponent({
|
|
|
12294
12406
|
default: void 0
|
|
12295
12407
|
}
|
|
12296
12408
|
},
|
|
12297
|
-
|
|
12409
|
+
emits: ["update:modelValue", "change"],
|
|
12410
|
+
setup(props, { attrs, slots, emit }) {
|
|
12411
|
+
const [value, setValue] = useUncontrolled({
|
|
12412
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
12413
|
+
defaultValue: props.defaultValue,
|
|
12414
|
+
finalValue: void 0,
|
|
12415
|
+
onChange: (nextValue) => {
|
|
12416
|
+
emit("update:modelValue", nextValue);
|
|
12417
|
+
emit("change", nextValue);
|
|
12418
|
+
}
|
|
12419
|
+
});
|
|
12298
12420
|
return () => h(Input.Wrapper, {
|
|
12299
12421
|
...props.wrapperProps,
|
|
12300
12422
|
id: props.id,
|
|
@@ -12322,6 +12444,8 @@ var InputBase = withBoxProps(defineComponent({
|
|
|
12322
12444
|
error: slots.error,
|
|
12323
12445
|
default: () => h(Input, {
|
|
12324
12446
|
...attrs,
|
|
12447
|
+
modelValue: value.value,
|
|
12448
|
+
"onUpdate:modelValue": setValue,
|
|
12325
12449
|
component: props.component,
|
|
12326
12450
|
__staticSelector: props.__staticSelector,
|
|
12327
12451
|
__stylesApiProps: props.__stylesApiProps ?? props,
|
|
@@ -12385,6 +12509,14 @@ var FileInput = defineComponent({
|
|
|
12385
12509
|
type: String,
|
|
12386
12510
|
default: "button"
|
|
12387
12511
|
},
|
|
12512
|
+
modelValue: {
|
|
12513
|
+
type: [
|
|
12514
|
+
Object,
|
|
12515
|
+
Array,
|
|
12516
|
+
null
|
|
12517
|
+
],
|
|
12518
|
+
default: void 0
|
|
12519
|
+
},
|
|
12388
12520
|
onChange: {
|
|
12389
12521
|
type: Function,
|
|
12390
12522
|
default: void 0
|
|
@@ -12506,13 +12638,17 @@ var FileInput = defineComponent({
|
|
|
12506
12638
|
default: false
|
|
12507
12639
|
}
|
|
12508
12640
|
},
|
|
12509
|
-
|
|
12641
|
+
emits: ["update:modelValue", "change"],
|
|
12642
|
+
setup(props, { attrs, slots, emit }) {
|
|
12510
12643
|
const resetRef = ref(null);
|
|
12511
12644
|
const [value, setValue] = useUncontrolled({
|
|
12512
|
-
value: () => props.value,
|
|
12645
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
12513
12646
|
defaultValue: props.defaultValue,
|
|
12514
12647
|
finalValue: props.multiple ? [] : null,
|
|
12515
|
-
onChange: (nextValue) =>
|
|
12648
|
+
onChange: (nextValue) => {
|
|
12649
|
+
emit("update:modelValue", nextValue);
|
|
12650
|
+
emit("change", nextValue);
|
|
12651
|
+
}
|
|
12516
12652
|
});
|
|
12517
12653
|
const hasValue = computed(() => Array.isArray(value.value) ? value.value.length !== 0 : value.value !== null);
|
|
12518
12654
|
const reset = () => {
|
|
@@ -12972,6 +13108,14 @@ var NumberInput = defineComponent({
|
|
|
12972
13108
|
inheritAttrs: false,
|
|
12973
13109
|
slots: Object,
|
|
12974
13110
|
props: {
|
|
13111
|
+
modelValue: {
|
|
13112
|
+
type: [
|
|
13113
|
+
String,
|
|
13114
|
+
Number,
|
|
13115
|
+
BigInt
|
|
13116
|
+
],
|
|
13117
|
+
default: void 0
|
|
13118
|
+
},
|
|
12975
13119
|
value: {
|
|
12976
13120
|
type: [
|
|
12977
13121
|
String,
|
|
@@ -13161,15 +13305,19 @@ var NumberInput = defineComponent({
|
|
|
13161
13305
|
default: false
|
|
13162
13306
|
}
|
|
13163
13307
|
},
|
|
13164
|
-
|
|
13308
|
+
emits: ["update:modelValue", "change"],
|
|
13309
|
+
setup(props, { attrs, slots, emit }) {
|
|
13165
13310
|
const inputRef = ref(null);
|
|
13166
13311
|
const isEditing = ref(false);
|
|
13167
|
-
const isBigIntMode = computed(() => typeof props.value === "bigint" || typeof props.defaultValue === "bigint");
|
|
13312
|
+
const isBigIntMode = computed(() => typeof props.modelValue === "bigint" || typeof props.value === "bigint" || typeof props.defaultValue === "bigint");
|
|
13168
13313
|
const [value, setValue] = useUncontrolled({
|
|
13169
|
-
value: () => props.value,
|
|
13314
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
13170
13315
|
defaultValue: props.defaultValue,
|
|
13171
13316
|
finalValue: "",
|
|
13172
|
-
onChange: (nextValue) =>
|
|
13317
|
+
onChange: (nextValue) => {
|
|
13318
|
+
emit("update:modelValue", nextValue);
|
|
13319
|
+
emit("change", nextValue);
|
|
13320
|
+
}
|
|
13173
13321
|
});
|
|
13174
13322
|
const getStyles = useStyles({
|
|
13175
13323
|
name: "NumberInput",
|
|
@@ -13566,6 +13714,10 @@ var PinInput = withBoxProps(defineComponent({
|
|
|
13566
13714
|
type: Boolean,
|
|
13567
13715
|
default: false
|
|
13568
13716
|
},
|
|
13717
|
+
modelValue: {
|
|
13718
|
+
type: String,
|
|
13719
|
+
default: void 0
|
|
13720
|
+
},
|
|
13569
13721
|
value: {
|
|
13570
13722
|
type: String,
|
|
13571
13723
|
default: void 0
|
|
@@ -13671,7 +13823,8 @@ var PinInput = withBoxProps(defineComponent({
|
|
|
13671
13823
|
default: false
|
|
13672
13824
|
}
|
|
13673
13825
|
},
|
|
13674
|
-
|
|
13826
|
+
emits: ["update:modelValue", "change"],
|
|
13827
|
+
setup(rawProps, { attrs, emit }) {
|
|
13675
13828
|
const props = useProps("PinInput", defaultProps$21, rawProps);
|
|
13676
13829
|
const uuid = useId(props.id);
|
|
13677
13830
|
const focusedIndex = ref(-1);
|
|
@@ -13691,12 +13844,13 @@ var PinInput = withBoxProps(defineComponent({
|
|
|
13691
13844
|
varsResolver: varsResolver$38
|
|
13692
13845
|
});
|
|
13693
13846
|
const [value, setValue] = useUncontrolled({
|
|
13694
|
-
value: () => props.value !== void 0 ? createPinArray(currentLength.value, props.value) : void 0,
|
|
13847
|
+
value: () => props.modelValue !== void 0 || props.value !== void 0 ? createPinArray(currentLength.value, props.modelValue ?? props.value ?? "") : void 0,
|
|
13695
13848
|
defaultValue: props.defaultValue?.split("").slice(0, currentLength.value),
|
|
13696
13849
|
finalValue: createPinArray(currentLength.value, ""),
|
|
13697
13850
|
onChange: (nextValue) => {
|
|
13698
13851
|
const stringValue = nextValue.join("").trim();
|
|
13699
|
-
|
|
13852
|
+
emit("update:modelValue", stringValue);
|
|
13853
|
+
emit("change", stringValue);
|
|
13700
13854
|
if (stringValue.length === currentLength.value && !completed.value) {
|
|
13701
13855
|
completed.value = true;
|
|
13702
13856
|
props.onComplete?.(stringValue);
|
|
@@ -13830,7 +13984,6 @@ var PinInput = withBoxProps(defineComponent({
|
|
|
13830
13984
|
id: `${uuid.value}-${index + 1}`,
|
|
13831
13985
|
inputMode: props.inputMode || (props.type === "number" ? "numeric" : "text"),
|
|
13832
13986
|
onInput: (event) => handleInput(event, index),
|
|
13833
|
-
onChange: (event) => handleInput(event, index),
|
|
13834
13987
|
onKeydown: (event) => handleKeyDown(event, index),
|
|
13835
13988
|
onFocus: (event) => {
|
|
13836
13989
|
event.target.select();
|
|
@@ -13996,6 +14149,10 @@ var NativeSelect = defineComponent({
|
|
|
13996
14149
|
type: String,
|
|
13997
14150
|
default: void 0
|
|
13998
14151
|
},
|
|
14152
|
+
modelValue: {
|
|
14153
|
+
type: String,
|
|
14154
|
+
default: void 0
|
|
14155
|
+
},
|
|
13999
14156
|
value: {
|
|
14000
14157
|
type: String,
|
|
14001
14158
|
default: void 0
|
|
@@ -14033,7 +14190,8 @@ var NativeSelect = defineComponent({
|
|
|
14033
14190
|
default: false
|
|
14034
14191
|
}
|
|
14035
14192
|
},
|
|
14036
|
-
|
|
14193
|
+
emits: ["update:modelValue", "change"],
|
|
14194
|
+
setup(rawProps, { attrs, slots, emit }) {
|
|
14037
14195
|
const props = useProps("NativeSelect", defaultProps$20, rawProps);
|
|
14038
14196
|
return () => {
|
|
14039
14197
|
const parsedOptions = getParsedNativeSelectData(props.data).map((item, index) => h(NativeSelectOption, {
|
|
@@ -14057,9 +14215,11 @@ var NativeSelect = defineComponent({
|
|
|
14057
14215
|
id: props.id,
|
|
14058
14216
|
name: props.name,
|
|
14059
14217
|
form: props.form,
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
|
|
14218
|
+
modelValue: props.modelValue,
|
|
14219
|
+
value: props.value,
|
|
14220
|
+
defaultValue: props.defaultValue,
|
|
14221
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", value),
|
|
14222
|
+
onChange: (value) => emit("change", value),
|
|
14063
14223
|
variant: props.variant,
|
|
14064
14224
|
radius: props.radius,
|
|
14065
14225
|
classNames: props.classNames,
|
|
@@ -14107,7 +14267,7 @@ var varsResolver$37 = createVarsResolver((theme, { variant, color, childrenOffse
|
|
|
14107
14267
|
function renderContent(content) {
|
|
14108
14268
|
return typeof content === "function" ? content() : content;
|
|
14109
14269
|
}
|
|
14110
|
-
function callHandler$
|
|
14270
|
+
function callHandler$5(handler, event) {
|
|
14111
14271
|
if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
|
|
14112
14272
|
else handler?.(event);
|
|
14113
14273
|
}
|
|
@@ -14260,11 +14420,11 @@ var NavLink = withBoxProps(defineComponent({
|
|
|
14260
14420
|
expanded: opened.value
|
|
14261
14421
|
}, props.mod],
|
|
14262
14422
|
onClick: (event) => {
|
|
14263
|
-
callHandler$
|
|
14423
|
+
callHandler$5(attrs.onClick, event);
|
|
14264
14424
|
toggle(event);
|
|
14265
14425
|
},
|
|
14266
14426
|
onKeydown: (event) => {
|
|
14267
|
-
callHandler$
|
|
14427
|
+
callHandler$5(attrs.onKeydown ?? attrs.onKeyDown, event);
|
|
14268
14428
|
if (event.code === "Space" && withChildren) toggle(event);
|
|
14269
14429
|
}
|
|
14270
14430
|
}, () => [
|
|
@@ -14829,6 +14989,10 @@ var Rating = withBoxProps(defineComponent({
|
|
|
14829
14989
|
inheritAttrs: false,
|
|
14830
14990
|
slots: Object,
|
|
14831
14991
|
props: {
|
|
14992
|
+
modelValue: {
|
|
14993
|
+
type: Number,
|
|
14994
|
+
default: void 0
|
|
14995
|
+
},
|
|
14832
14996
|
defaultValue: {
|
|
14833
14997
|
type: Number,
|
|
14834
14998
|
default: void 0
|
|
@@ -14910,7 +15074,8 @@ var Rating = withBoxProps(defineComponent({
|
|
|
14910
15074
|
default: false
|
|
14911
15075
|
}
|
|
14912
15076
|
},
|
|
14913
|
-
|
|
15077
|
+
emits: ["update:modelValue", "change"],
|
|
15078
|
+
setup(rawProps, { attrs, slots, emit }) {
|
|
14914
15079
|
const props = useProps("Rating", defaultProps$16, rawProps);
|
|
14915
15080
|
const rootRef = ref(null);
|
|
14916
15081
|
const hovered = ref(-1);
|
|
@@ -14919,10 +15084,13 @@ var Rating = withBoxProps(defineComponent({
|
|
|
14919
15084
|
const name = useId(props.name);
|
|
14920
15085
|
const id = useId(props.id);
|
|
14921
15086
|
const [currentValue, setCurrentValue] = useUncontrolled({
|
|
14922
|
-
value: () => props.value,
|
|
15087
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
14923
15088
|
defaultValue: props.defaultValue,
|
|
14924
15089
|
finalValue: 0,
|
|
14925
|
-
onChange: (value) =>
|
|
15090
|
+
onChange: (value) => {
|
|
15091
|
+
emit("update:modelValue", value);
|
|
15092
|
+
emit("change", value);
|
|
15093
|
+
}
|
|
14926
15094
|
});
|
|
14927
15095
|
const getStyles = useStyles({
|
|
14928
15096
|
name: "Rating",
|
|
@@ -15259,6 +15427,14 @@ var SegmentedControl = defineComponent({
|
|
|
15259
15427
|
type: Array,
|
|
15260
15428
|
required: true
|
|
15261
15429
|
},
|
|
15430
|
+
modelValue: {
|
|
15431
|
+
type: [
|
|
15432
|
+
String,
|
|
15433
|
+
Number,
|
|
15434
|
+
Boolean
|
|
15435
|
+
],
|
|
15436
|
+
default: void 0
|
|
15437
|
+
},
|
|
15262
15438
|
value: {
|
|
15263
15439
|
type: [
|
|
15264
15440
|
String,
|
|
@@ -15352,7 +15528,8 @@ var SegmentedControl = defineComponent({
|
|
|
15352
15528
|
default: false
|
|
15353
15529
|
}
|
|
15354
15530
|
},
|
|
15355
|
-
|
|
15531
|
+
emits: ["update:modelValue", "change"],
|
|
15532
|
+
setup(props, { attrs, emit }) {
|
|
15356
15533
|
const theme = useMantineTheme();
|
|
15357
15534
|
const uuid = useId(props.name);
|
|
15358
15535
|
const mounted = useMounted();
|
|
@@ -15360,10 +15537,13 @@ var SegmentedControl = defineComponent({
|
|
|
15360
15537
|
const itemRefs = reactive({});
|
|
15361
15538
|
const normalizedData = computed(() => normalizeData(props.data));
|
|
15362
15539
|
const [value, setValue] = useUncontrolled({
|
|
15363
|
-
value: () => props.value,
|
|
15540
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
15364
15541
|
defaultValue: props.defaultValue,
|
|
15365
15542
|
finalValue: normalizedData.value.find((item) => !item.disabled)?.value ?? normalizedData.value[0]?.value,
|
|
15366
|
-
onChange: (nextValue) =>
|
|
15543
|
+
onChange: (nextValue) => {
|
|
15544
|
+
emit("update:modelValue", nextValue);
|
|
15545
|
+
emit("change", nextValue);
|
|
15546
|
+
}
|
|
15367
15547
|
});
|
|
15368
15548
|
const getStyles = useStyles({
|
|
15369
15549
|
name: "SegmentedControl",
|
|
@@ -16264,7 +16444,6 @@ var Tabs_module_default = {
|
|
|
16264
16444
|
var VALUE_ERROR = "Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value";
|
|
16265
16445
|
var defaultProps$13 = {
|
|
16266
16446
|
keepMounted: true,
|
|
16267
|
-
keepMountedMode: "activity",
|
|
16268
16447
|
orientation: "horizontal",
|
|
16269
16448
|
loop: true,
|
|
16270
16449
|
activateTabWithKeyboard: true,
|
|
@@ -16346,10 +16525,6 @@ var TabsBase = defineComponent({
|
|
|
16346
16525
|
type: Boolean,
|
|
16347
16526
|
default: void 0
|
|
16348
16527
|
},
|
|
16349
|
-
keepMountedMode: {
|
|
16350
|
-
type: String,
|
|
16351
|
-
default: void 0
|
|
16352
|
-
},
|
|
16353
16528
|
autoContrast: {
|
|
16354
16529
|
type: Boolean,
|
|
16355
16530
|
default: void 0
|
|
@@ -16425,9 +16600,6 @@ var TabsBase = defineComponent({
|
|
|
16425
16600
|
get keepMounted() {
|
|
16426
16601
|
return props.keepMounted;
|
|
16427
16602
|
},
|
|
16428
|
-
get keepMountedMode() {
|
|
16429
|
-
return props.keepMountedMode;
|
|
16430
|
-
},
|
|
16431
16603
|
get placement() {
|
|
16432
16604
|
return props.placement;
|
|
16433
16605
|
},
|
|
@@ -16639,7 +16811,20 @@ var TextareaAutosize = defineComponent({
|
|
|
16639
16811
|
var Textarea = defineComponent({
|
|
16640
16812
|
name: "Textarea",
|
|
16641
16813
|
inheritAttrs: false,
|
|
16814
|
+
slots: Object,
|
|
16642
16815
|
props: {
|
|
16816
|
+
modelValue: {
|
|
16817
|
+
type: String,
|
|
16818
|
+
default: void 0
|
|
16819
|
+
},
|
|
16820
|
+
value: {
|
|
16821
|
+
type: String,
|
|
16822
|
+
default: void 0
|
|
16823
|
+
},
|
|
16824
|
+
defaultValue: {
|
|
16825
|
+
type: String,
|
|
16826
|
+
default: void 0
|
|
16827
|
+
},
|
|
16643
16828
|
autosize: {
|
|
16644
16829
|
type: Boolean,
|
|
16645
16830
|
default: false
|
|
@@ -16674,7 +16859,8 @@ var Textarea = defineComponent({
|
|
|
16674
16859
|
default: void 0
|
|
16675
16860
|
}
|
|
16676
16861
|
},
|
|
16677
|
-
|
|
16862
|
+
emits: ["update:modelValue", "change"],
|
|
16863
|
+
setup(props, { attrs, slots, emit }) {
|
|
16678
16864
|
return () => {
|
|
16679
16865
|
const shouldAutosize = props.autosize;
|
|
16680
16866
|
const autosizeProps = shouldAutosize ? {
|
|
@@ -16683,11 +16869,16 @@ var Textarea = defineComponent({
|
|
|
16683
16869
|
} : { rows: props.minRows };
|
|
16684
16870
|
return h(InputBase, {
|
|
16685
16871
|
...attrs,
|
|
16872
|
+
modelValue: props.modelValue,
|
|
16873
|
+
value: props.value,
|
|
16874
|
+
defaultValue: props.defaultValue,
|
|
16875
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", value),
|
|
16876
|
+
onChange: (value) => emit("change", value),
|
|
16686
16877
|
component: shouldAutosize ? TextareaAutosize : "textarea",
|
|
16687
16878
|
__staticSelector: props.__staticSelector || "Textarea",
|
|
16688
16879
|
multiline: true,
|
|
16689
16880
|
"data-no-overflow": shouldAutosize && props.maxRows === void 0 ? true : void 0,
|
|
16690
|
-
__bottomSection: props.bottomSection,
|
|
16881
|
+
__bottomSection: resolveNode(props.bottomSection, slots.bottomSection),
|
|
16691
16882
|
__bottomSectionProps: props.bottomSectionProps,
|
|
16692
16883
|
style: [{ "--input-resize": props.resize }, attrs.style],
|
|
16693
16884
|
...autosizeProps
|
|
@@ -16709,7 +16900,7 @@ function validateJson(value, deserialize) {
|
|
|
16709
16900
|
}
|
|
16710
16901
|
//#endregion
|
|
16711
16902
|
//#region src/components/JsonInput/JsonInput.ts
|
|
16712
|
-
function callHandler$
|
|
16903
|
+
function callHandler$4(handler, event) {
|
|
16713
16904
|
if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
|
|
16714
16905
|
else handler?.(event);
|
|
16715
16906
|
}
|
|
@@ -16717,6 +16908,10 @@ var JsonInput = defineComponent({
|
|
|
16717
16908
|
name: "JsonInput",
|
|
16718
16909
|
inheritAttrs: false,
|
|
16719
16910
|
props: {
|
|
16911
|
+
modelValue: {
|
|
16912
|
+
type: String,
|
|
16913
|
+
default: void 0
|
|
16914
|
+
},
|
|
16720
16915
|
value: {
|
|
16721
16916
|
type: String,
|
|
16722
16917
|
default: void 0
|
|
@@ -16770,12 +16965,16 @@ var JsonInput = defineComponent({
|
|
|
16770
16965
|
default: void 0
|
|
16771
16966
|
}
|
|
16772
16967
|
},
|
|
16773
|
-
|
|
16968
|
+
emits: ["update:modelValue", "change"],
|
|
16969
|
+
setup(props, { attrs, slots, emit }) {
|
|
16774
16970
|
const [value, setValue] = useUncontrolled({
|
|
16775
|
-
value: () => props.value,
|
|
16971
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
16776
16972
|
defaultValue: props.defaultValue,
|
|
16777
16973
|
finalValue: "",
|
|
16778
|
-
onChange: (nextValue) =>
|
|
16974
|
+
onChange: (nextValue) => {
|
|
16975
|
+
emit("update:modelValue", nextValue);
|
|
16976
|
+
emit("change", nextValue);
|
|
16977
|
+
}
|
|
16779
16978
|
});
|
|
16780
16979
|
const valid = ref(validateJson(value.value, props.deserialize));
|
|
16781
16980
|
return () => h(Textarea, {
|
|
@@ -16787,15 +16986,15 @@ var JsonInput = defineComponent({
|
|
|
16787
16986
|
error: valid.value ? props.error : props.validationError || true,
|
|
16788
16987
|
"data-monospace": true,
|
|
16789
16988
|
onInput: (event) => {
|
|
16790
|
-
callHandler$
|
|
16989
|
+
callHandler$4(attrs.onInput, event);
|
|
16791
16990
|
setValue(event.currentTarget.value);
|
|
16792
16991
|
},
|
|
16793
16992
|
onFocus: (event) => {
|
|
16794
|
-
callHandler$
|
|
16993
|
+
callHandler$4(attrs.onFocus, event);
|
|
16795
16994
|
valid.value = true;
|
|
16796
16995
|
},
|
|
16797
16996
|
onBlur: (event) => {
|
|
16798
|
-
callHandler$
|
|
16997
|
+
callHandler$4(attrs.onBlur, event);
|
|
16799
16998
|
const target = event.currentTarget;
|
|
16800
16999
|
const isValid = validateJson(target.value, props.deserialize);
|
|
16801
17000
|
if (props.formatOnBlur && !props.readOnly && isValid && target.value.trim() !== "") setValue(props.serialize(props.deserialize(target.value), null, props.indentSpaces));
|
|
@@ -16810,9 +17009,29 @@ Object.assign(JsonInput, { classes: InputBase.classes });
|
|
|
16810
17009
|
var TextInput = defineComponent({
|
|
16811
17010
|
name: "TextInput",
|
|
16812
17011
|
inheritAttrs: false,
|
|
16813
|
-
|
|
17012
|
+
props: {
|
|
17013
|
+
modelValue: {
|
|
17014
|
+
type: [String, Number],
|
|
17015
|
+
default: void 0
|
|
17016
|
+
},
|
|
17017
|
+
value: {
|
|
17018
|
+
type: [String, Number],
|
|
17019
|
+
default: void 0
|
|
17020
|
+
},
|
|
17021
|
+
defaultValue: {
|
|
17022
|
+
type: [String, Number],
|
|
17023
|
+
default: void 0
|
|
17024
|
+
}
|
|
17025
|
+
},
|
|
17026
|
+
emits: ["update:modelValue", "change"],
|
|
17027
|
+
setup(props, { attrs, slots, emit }) {
|
|
16814
17028
|
return () => h(InputBase, {
|
|
16815
17029
|
...attrs,
|
|
17030
|
+
modelValue: props.modelValue,
|
|
17031
|
+
value: props.value,
|
|
17032
|
+
defaultValue: props.defaultValue,
|
|
17033
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", value),
|
|
17034
|
+
onChange: (value) => emit("change", value),
|
|
16816
17035
|
component: "input",
|
|
16817
17036
|
__staticSelector: "TextInput",
|
|
16818
17037
|
__stylesApiProps: attrs
|
|
@@ -16904,6 +17123,22 @@ var PasswordInput = defineComponent({
|
|
|
16904
17123
|
inheritAttrs: false,
|
|
16905
17124
|
slots: Object,
|
|
16906
17125
|
props: {
|
|
17126
|
+
modelValue: {
|
|
17127
|
+
type: String,
|
|
17128
|
+
default: void 0
|
|
17129
|
+
},
|
|
17130
|
+
value: {
|
|
17131
|
+
type: String,
|
|
17132
|
+
default: void 0
|
|
17133
|
+
},
|
|
17134
|
+
defaultValue: {
|
|
17135
|
+
type: String,
|
|
17136
|
+
default: void 0
|
|
17137
|
+
},
|
|
17138
|
+
onChange: {
|
|
17139
|
+
type: Function,
|
|
17140
|
+
default: void 0
|
|
17141
|
+
},
|
|
16907
17142
|
visibilityToggleIcon: {
|
|
16908
17143
|
type: [Object, Function],
|
|
16909
17144
|
default: void 0
|
|
@@ -17041,7 +17276,8 @@ var PasswordInput = defineComponent({
|
|
|
17041
17276
|
default: false
|
|
17042
17277
|
}
|
|
17043
17278
|
},
|
|
17044
|
-
|
|
17279
|
+
emits: ["update:modelValue", "change"],
|
|
17280
|
+
setup(props, { attrs, slots, emit }) {
|
|
17045
17281
|
const uuid = useId(props.id);
|
|
17046
17282
|
const fallbackId = ref(`password-input-${Math.random().toString(36).slice(2)}`);
|
|
17047
17283
|
const [visible, setVisible] = useUncontrolled({
|
|
@@ -17050,6 +17286,15 @@ var PasswordInput = defineComponent({
|
|
|
17050
17286
|
finalValue: false,
|
|
17051
17287
|
onChange: (value) => props.onVisibilityChange?.(value)
|
|
17052
17288
|
});
|
|
17289
|
+
const [value, setValue] = useUncontrolled({
|
|
17290
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
17291
|
+
defaultValue: props.defaultValue,
|
|
17292
|
+
finalValue: "",
|
|
17293
|
+
onChange: (nextValue) => {
|
|
17294
|
+
emit("update:modelValue", nextValue);
|
|
17295
|
+
emit("change", nextValue);
|
|
17296
|
+
}
|
|
17297
|
+
});
|
|
17053
17298
|
const getStyles = useStyles({
|
|
17054
17299
|
name: "PasswordInput",
|
|
17055
17300
|
props,
|
|
@@ -17070,7 +17315,11 @@ var PasswordInput = defineComponent({
|
|
|
17070
17315
|
const hasError = props.error !== void 0 ? Boolean(props.error) && typeof props.error !== "boolean" : Boolean(slots.error);
|
|
17071
17316
|
const hasDescription = props.description !== void 0 ? props.description !== null : Boolean(slots.description);
|
|
17072
17317
|
const describedBy = `${hasError ? errorId : ""} ${hasDescription ? descriptionId : ""}`.trim() || void 0;
|
|
17073
|
-
const
|
|
17318
|
+
const renderVisibilityToggleIcon = () => {
|
|
17319
|
+
if (props.visibilityToggleIcon) return h(props.visibilityToggleIcon, { reveal: visible.value });
|
|
17320
|
+
if (slots.visibilityToggleIcon) return slots.visibilityToggleIcon({ reveal: visible.value });
|
|
17321
|
+
return h(PasswordToggleIcon, { reveal: visible.value });
|
|
17322
|
+
};
|
|
17074
17323
|
const visibilityToggleButton = h(ActionIcon, {
|
|
17075
17324
|
...getStyles("visibilityToggle"),
|
|
17076
17325
|
...props.visibilityToggleButtonProps,
|
|
@@ -17099,7 +17348,7 @@ var PasswordInput = defineComponent({
|
|
|
17099
17348
|
toggleVisibility();
|
|
17100
17349
|
}
|
|
17101
17350
|
}
|
|
17102
|
-
},
|
|
17351
|
+
}, renderVisibilityToggleIcon);
|
|
17103
17352
|
return h(Input.Wrapper, {
|
|
17104
17353
|
...props.wrapperProps,
|
|
17105
17354
|
id,
|
|
@@ -17166,6 +17415,7 @@ var PasswordInput = defineComponent({
|
|
|
17166
17415
|
default: () => h("input", {
|
|
17167
17416
|
...attrs,
|
|
17168
17417
|
...getStyles("innerInput"),
|
|
17418
|
+
value: value.value,
|
|
17169
17419
|
required: props.required,
|
|
17170
17420
|
"data-invalid": props.error || slots.error ? true : void 0,
|
|
17171
17421
|
"data-with-left-section": props.leftSection !== void 0 || slots.leftSection ? true : void 0,
|
|
@@ -17173,7 +17423,12 @@ var PasswordInput = defineComponent({
|
|
|
17173
17423
|
id,
|
|
17174
17424
|
"aria-describedby": describedBy,
|
|
17175
17425
|
autocomplete: attrs.autocomplete || "off",
|
|
17176
|
-
type: visible.value ? "text" : "password"
|
|
17426
|
+
type: visible.value ? "text" : "password",
|
|
17427
|
+
onInput: (event) => {
|
|
17428
|
+
const handler = attrs.onInput;
|
|
17429
|
+
handler?.(event);
|
|
17430
|
+
setValue(event.currentTarget.value);
|
|
17431
|
+
}
|
|
17177
17432
|
}),
|
|
17178
17433
|
leftSection: slots.leftSection,
|
|
17179
17434
|
rightSection: slots.rightSection
|
|
@@ -17419,6 +17674,10 @@ var CheckboxGroup = defineComponent({
|
|
|
17419
17674
|
inheritAttrs: false,
|
|
17420
17675
|
slots: Object,
|
|
17421
17676
|
props: {
|
|
17677
|
+
modelValue: {
|
|
17678
|
+
type: Array,
|
|
17679
|
+
default: void 0
|
|
17680
|
+
},
|
|
17422
17681
|
value: {
|
|
17423
17682
|
type: Array,
|
|
17424
17683
|
default: void 0
|
|
@@ -17492,12 +17751,16 @@ var CheckboxGroup = defineComponent({
|
|
|
17492
17751
|
default: false
|
|
17493
17752
|
}
|
|
17494
17753
|
},
|
|
17495
|
-
|
|
17754
|
+
emits: ["update:modelValue", "change"],
|
|
17755
|
+
setup(props, { attrs, slots, emit }) {
|
|
17496
17756
|
const [value, setValue] = useUncontrolled({
|
|
17497
|
-
value: () => props.value,
|
|
17757
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
17498
17758
|
defaultValue: props.defaultValue,
|
|
17499
17759
|
finalValue: [],
|
|
17500
|
-
onChange: (nextValue) =>
|
|
17760
|
+
onChange: (nextValue) => {
|
|
17761
|
+
emit("update:modelValue", nextValue);
|
|
17762
|
+
emit("change", nextValue);
|
|
17763
|
+
}
|
|
17501
17764
|
});
|
|
17502
17765
|
const handleChange = (eventOrValue) => {
|
|
17503
17766
|
if (props.readOnly) return;
|
|
@@ -17560,6 +17823,10 @@ var CheckboxCard = withBoxProps(defineComponent({
|
|
|
17560
17823
|
name: "CheckboxCard",
|
|
17561
17824
|
inheritAttrs: false,
|
|
17562
17825
|
props: {
|
|
17826
|
+
modelValue: {
|
|
17827
|
+
type: Boolean,
|
|
17828
|
+
default: void 0
|
|
17829
|
+
},
|
|
17563
17830
|
checked: {
|
|
17564
17831
|
type: Boolean,
|
|
17565
17832
|
default: void 0
|
|
@@ -17605,13 +17872,22 @@ var CheckboxCard = withBoxProps(defineComponent({
|
|
|
17605
17872
|
default: false
|
|
17606
17873
|
}
|
|
17607
17874
|
},
|
|
17608
|
-
|
|
17875
|
+
emits: [
|
|
17876
|
+
"update:modelValue",
|
|
17877
|
+
"update:checked",
|
|
17878
|
+
"change"
|
|
17879
|
+
],
|
|
17880
|
+
setup(props, { attrs, slots, emit }) {
|
|
17609
17881
|
const groupContext = useCheckboxGroupContext();
|
|
17610
17882
|
const [checked, setChecked] = useUncontrolled({
|
|
17611
|
-
value: () => typeof props.checked === "boolean" ? props.checked : groupContext ? groupContext.value.includes(props.value || "") : void 0,
|
|
17883
|
+
value: () => typeof props.modelValue === "boolean" ? props.modelValue : typeof props.checked === "boolean" ? props.checked : groupContext ? groupContext.value.includes(props.value || "") : void 0,
|
|
17612
17884
|
defaultValue: props.defaultChecked,
|
|
17613
17885
|
finalValue: false,
|
|
17614
|
-
onChange: (nextValue) =>
|
|
17886
|
+
onChange: (nextValue) => {
|
|
17887
|
+
emit("update:modelValue", nextValue);
|
|
17888
|
+
emit("update:checked", nextValue);
|
|
17889
|
+
emit("change", nextValue);
|
|
17890
|
+
}
|
|
17615
17891
|
});
|
|
17616
17892
|
const getStyles = useStyles({
|
|
17617
17893
|
name: "CheckboxCard",
|
|
@@ -17802,7 +18078,7 @@ var varsResolver$25 = createVarsResolver((theme, { radius, color, size, iconColo
|
|
|
17802
18078
|
autoContrast
|
|
17803
18079
|
}) : void 0
|
|
17804
18080
|
} }));
|
|
17805
|
-
function callHandler$
|
|
18081
|
+
function callHandler$3(handler, event) {
|
|
17806
18082
|
if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
|
|
17807
18083
|
else handler?.(event);
|
|
17808
18084
|
}
|
|
@@ -17871,10 +18147,22 @@ var CheckboxBase = defineComponent({
|
|
|
17871
18147
|
type: Boolean,
|
|
17872
18148
|
default: true
|
|
17873
18149
|
},
|
|
18150
|
+
modelValue: {
|
|
18151
|
+
type: Boolean,
|
|
18152
|
+
default: void 0
|
|
18153
|
+
},
|
|
17874
18154
|
checked: {
|
|
17875
18155
|
type: Boolean,
|
|
17876
18156
|
default: void 0
|
|
17877
18157
|
},
|
|
18158
|
+
defaultChecked: {
|
|
18159
|
+
type: Boolean,
|
|
18160
|
+
default: void 0
|
|
18161
|
+
},
|
|
18162
|
+
onChange: {
|
|
18163
|
+
type: Function,
|
|
18164
|
+
default: void 0
|
|
18165
|
+
},
|
|
17878
18166
|
disabled: {
|
|
17879
18167
|
type: Boolean,
|
|
17880
18168
|
default: false
|
|
@@ -17908,9 +18196,24 @@ var CheckboxBase = defineComponent({
|
|
|
17908
18196
|
default: false
|
|
17909
18197
|
}
|
|
17910
18198
|
},
|
|
17911
|
-
|
|
18199
|
+
emits: [
|
|
18200
|
+
"update:modelValue",
|
|
18201
|
+
"update:checked",
|
|
18202
|
+
"change"
|
|
18203
|
+
],
|
|
18204
|
+
setup(props, { attrs, slots, emit }) {
|
|
17912
18205
|
const uuid = useId(props.id);
|
|
17913
18206
|
const groupContext = useCheckboxGroupContext();
|
|
18207
|
+
const [localChecked, setLocalChecked] = useUncontrolled({
|
|
18208
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.checked,
|
|
18209
|
+
defaultValue: props.defaultChecked,
|
|
18210
|
+
finalValue: false,
|
|
18211
|
+
onChange: (checked) => {
|
|
18212
|
+
emit("update:modelValue", checked);
|
|
18213
|
+
emit("update:checked", checked);
|
|
18214
|
+
emit("change", checked);
|
|
18215
|
+
}
|
|
18216
|
+
});
|
|
17914
18217
|
const getStyles = useStyles({
|
|
17915
18218
|
name: "Checkbox",
|
|
17916
18219
|
props,
|
|
@@ -17940,7 +18243,7 @@ var CheckboxBase = defineComponent({
|
|
|
17940
18243
|
};
|
|
17941
18244
|
const Icon = props.icon || CheckboxIcon;
|
|
17942
18245
|
const value = String(attrs.value ?? "");
|
|
17943
|
-
const checked = groupContext ? groupContext.value.includes(value) :
|
|
18246
|
+
const checked = groupContext ? groupContext.value.includes(value) : localChecked.value;
|
|
17944
18247
|
const disabled = groupContext?.isDisabled?.(value) || props.disabled;
|
|
17945
18248
|
const size = groupContext?.size ?? props.size;
|
|
17946
18249
|
return h(InlineInput, {
|
|
@@ -17985,13 +18288,14 @@ var CheckboxBase = defineComponent({
|
|
|
17985
18288
|
},
|
|
17986
18289
|
variant: props.variant,
|
|
17987
18290
|
onClick: (event) => {
|
|
17988
|
-
callHandler$
|
|
17989
|
-
if (props.readOnly
|
|
18291
|
+
callHandler$3(attrs.onClick, event);
|
|
18292
|
+
if (props.readOnly) event.preventDefault();
|
|
17990
18293
|
},
|
|
17991
18294
|
onChange: (event) => {
|
|
17992
18295
|
if (props.readOnly) return;
|
|
17993
|
-
|
|
18296
|
+
const nextChecked = event.currentTarget.checked;
|
|
17994
18297
|
groupContext?.onChange(event);
|
|
18298
|
+
setLocalChecked(nextChecked);
|
|
17995
18299
|
}
|
|
17996
18300
|
}), slots.icon ? slots.icon(iconSlotProps) : h(Icon, {
|
|
17997
18301
|
indeterminate: props.indeterminate,
|
|
@@ -18020,6 +18324,10 @@ var ChipGroup = defineComponent({
|
|
|
18020
18324
|
type: Boolean,
|
|
18021
18325
|
default: false
|
|
18022
18326
|
},
|
|
18327
|
+
modelValue: {
|
|
18328
|
+
type: [String, Array],
|
|
18329
|
+
default: void 0
|
|
18330
|
+
},
|
|
18023
18331
|
value: {
|
|
18024
18332
|
type: [String, Array],
|
|
18025
18333
|
default: void 0
|
|
@@ -18033,12 +18341,16 @@ var ChipGroup = defineComponent({
|
|
|
18033
18341
|
default: void 0
|
|
18034
18342
|
}
|
|
18035
18343
|
},
|
|
18036
|
-
|
|
18344
|
+
emits: ["update:modelValue", "change"],
|
|
18345
|
+
setup(props, { slots, emit }) {
|
|
18037
18346
|
const [value, setValue] = useUncontrolled({
|
|
18038
|
-
value: () => props.value,
|
|
18347
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
18039
18348
|
defaultValue: props.defaultValue,
|
|
18040
18349
|
finalValue: props.multiple ? [] : null,
|
|
18041
|
-
onChange: (nextValue) =>
|
|
18350
|
+
onChange: (nextValue) => {
|
|
18351
|
+
emit("update:modelValue", nextValue);
|
|
18352
|
+
emit("change", nextValue);
|
|
18353
|
+
}
|
|
18042
18354
|
});
|
|
18043
18355
|
const isChipSelected = (chipValue) => Array.isArray(value.value) ? value.value.includes(chipValue) : value.value === chipValue;
|
|
18044
18356
|
const handleChange = (event) => {
|
|
@@ -18086,10 +18398,6 @@ var varsResolver$24 = createVarsResolver((theme, { size, radius, variant, color,
|
|
|
18086
18398
|
"--chip-spacing": getSize(size, "chip-spacing")
|
|
18087
18399
|
} };
|
|
18088
18400
|
});
|
|
18089
|
-
function callHandler$5(handler, event) {
|
|
18090
|
-
if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
|
|
18091
|
-
else handler?.(event);
|
|
18092
|
-
}
|
|
18093
18401
|
var ChipBase = defineComponent({
|
|
18094
18402
|
name: "Chip",
|
|
18095
18403
|
inheritAttrs: false,
|
|
@@ -18110,6 +18418,10 @@ var ChipBase = defineComponent({
|
|
|
18110
18418
|
type: String,
|
|
18111
18419
|
default: "checkbox"
|
|
18112
18420
|
},
|
|
18421
|
+
modelValue: {
|
|
18422
|
+
type: Boolean,
|
|
18423
|
+
default: void 0
|
|
18424
|
+
},
|
|
18113
18425
|
checked: {
|
|
18114
18426
|
type: Boolean,
|
|
18115
18427
|
default: void 0
|
|
@@ -18181,15 +18493,24 @@ var ChipBase = defineComponent({
|
|
|
18181
18493
|
default: false
|
|
18182
18494
|
}
|
|
18183
18495
|
},
|
|
18184
|
-
|
|
18496
|
+
emits: [
|
|
18497
|
+
"update:modelValue",
|
|
18498
|
+
"update:checked",
|
|
18499
|
+
"change"
|
|
18500
|
+
],
|
|
18501
|
+
setup(rawProps, { attrs, slots, emit }) {
|
|
18185
18502
|
const props = useProps("Chip", null, rawProps);
|
|
18186
18503
|
const groupContext = useChipGroupContext();
|
|
18187
18504
|
const uuid = useId(props.id);
|
|
18188
18505
|
const [value, setValue] = useUncontrolled({
|
|
18189
|
-
value: () => props.checked,
|
|
18506
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.checked,
|
|
18190
18507
|
defaultValue: props.defaultChecked,
|
|
18191
18508
|
finalValue: false,
|
|
18192
|
-
onChange: (nextValue) =>
|
|
18509
|
+
onChange: (nextValue) => {
|
|
18510
|
+
emit("update:modelValue", nextValue);
|
|
18511
|
+
emit("update:checked", nextValue);
|
|
18512
|
+
emit("change", nextValue);
|
|
18513
|
+
}
|
|
18193
18514
|
});
|
|
18194
18515
|
const getStyles = useStyles({
|
|
18195
18516
|
name: "Chip",
|
|
@@ -18210,7 +18531,7 @@ var ChipBase = defineComponent({
|
|
|
18210
18531
|
const inputType = groupContext ? groupContext.multiple ? "checkbox" : "radio" : props.type;
|
|
18211
18532
|
const icon = props.icon ?? slots.icon;
|
|
18212
18533
|
const showIcon = checked && icon !== null && icon !== false;
|
|
18213
|
-
const { class: _class, style: _style,
|
|
18534
|
+
const { class: _class, style: _style, value: _attrsValue, ...inputAttrs } = attrs;
|
|
18214
18535
|
const renderIcon = () => {
|
|
18215
18536
|
const iconProps = getStyles("checkIcon");
|
|
18216
18537
|
if (icon === void 0) return h(CheckIcon, iconProps);
|
|
@@ -18235,11 +18556,9 @@ var ChipBase = defineComponent({
|
|
|
18235
18556
|
disabled: props.disabled,
|
|
18236
18557
|
value: chipValue,
|
|
18237
18558
|
onChange: (event) => {
|
|
18238
|
-
|
|
18239
|
-
if (groupContext)
|
|
18240
|
-
|
|
18241
|
-
props.onChange?.(event.currentTarget.checked);
|
|
18242
|
-
} else setValue(event.currentTarget.checked);
|
|
18559
|
+
const nextChecked = event.currentTarget.checked;
|
|
18560
|
+
if (groupContext) groupContext.onChange(event);
|
|
18561
|
+
setValue(nextChecked);
|
|
18243
18562
|
}
|
|
18244
18563
|
}), h(Box, {
|
|
18245
18564
|
component: "label",
|
|
@@ -18363,7 +18682,7 @@ var varsResolver$22 = createVarsResolver((_, { radius }, ctx) => ({ root: {
|
|
|
18363
18682
|
"--pill-height": getSize(ctx.size, "pill-height"),
|
|
18364
18683
|
"--pill-radius": radius === void 0 ? void 0 : getRadius(radius)
|
|
18365
18684
|
} }));
|
|
18366
|
-
function callHandler$
|
|
18685
|
+
function callHandler$2(handler, event) {
|
|
18367
18686
|
if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
|
|
18368
18687
|
else handler?.(event);
|
|
18369
18688
|
}
|
|
@@ -18472,12 +18791,12 @@ var PillBase = defineComponent({
|
|
|
18472
18791
|
onMousedown: (event) => {
|
|
18473
18792
|
event.preventDefault();
|
|
18474
18793
|
event.stopPropagation();
|
|
18475
|
-
callHandler$
|
|
18794
|
+
callHandler$2(removeButtonProps.onMousedown ?? removeButtonProps.onMousedown ?? removeButtonProps.onMouseDown, event);
|
|
18476
18795
|
},
|
|
18477
18796
|
onClick: (event) => {
|
|
18478
18797
|
event.stopPropagation();
|
|
18479
18798
|
props.onRemove?.();
|
|
18480
|
-
callHandler$
|
|
18799
|
+
callHandler$2(removeButtonProps.onClick, event);
|
|
18481
18800
|
}
|
|
18482
18801
|
}) : null]);
|
|
18483
18802
|
};
|
|
@@ -18495,6 +18814,22 @@ var PillsInputField = withBoxProps(defineComponent({
|
|
|
18495
18814
|
name: "PillsInputField",
|
|
18496
18815
|
inheritAttrs: false,
|
|
18497
18816
|
props: {
|
|
18817
|
+
modelValue: {
|
|
18818
|
+
type: String,
|
|
18819
|
+
default: void 0
|
|
18820
|
+
},
|
|
18821
|
+
value: {
|
|
18822
|
+
type: String,
|
|
18823
|
+
default: void 0
|
|
18824
|
+
},
|
|
18825
|
+
defaultValue: {
|
|
18826
|
+
type: String,
|
|
18827
|
+
default: void 0
|
|
18828
|
+
},
|
|
18829
|
+
onChange: {
|
|
18830
|
+
type: Function,
|
|
18831
|
+
default: void 0
|
|
18832
|
+
},
|
|
18498
18833
|
type: {
|
|
18499
18834
|
type: String,
|
|
18500
18835
|
default: "visible"
|
|
@@ -18536,8 +18871,18 @@ var PillsInputField = withBoxProps(defineComponent({
|
|
|
18536
18871
|
default: false
|
|
18537
18872
|
}
|
|
18538
18873
|
},
|
|
18539
|
-
|
|
18874
|
+
emits: ["update:modelValue", "change"],
|
|
18875
|
+
setup(rawProps, { attrs, emit }) {
|
|
18540
18876
|
const props = useProps("PillsInputField", null, rawProps);
|
|
18877
|
+
const [value, setValue] = useUncontrolled({
|
|
18878
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
18879
|
+
defaultValue: props.defaultValue,
|
|
18880
|
+
finalValue: "",
|
|
18881
|
+
onChange: (nextValue) => {
|
|
18882
|
+
emit("update:modelValue", nextValue);
|
|
18883
|
+
emit("change", nextValue);
|
|
18884
|
+
}
|
|
18885
|
+
});
|
|
18541
18886
|
const context = usePillsInputContext();
|
|
18542
18887
|
const inputWrapperContext = useInputWrapperContext();
|
|
18543
18888
|
const getStyles = useStyles({
|
|
@@ -18559,6 +18904,7 @@ var PillsInputField = withBoxProps(defineComponent({
|
|
|
18559
18904
|
style: attrs.style
|
|
18560
18905
|
}),
|
|
18561
18906
|
component: "input",
|
|
18907
|
+
value: value.value,
|
|
18562
18908
|
ref: (node) => {
|
|
18563
18909
|
const input = node?.$el ?? node ?? null;
|
|
18564
18910
|
if (context) context.fieldRef.value = input;
|
|
@@ -18574,6 +18920,11 @@ var PillsInputField = withBoxProps(defineComponent({
|
|
|
18574
18920
|
"aria-invalid": context?.hasError || void 0,
|
|
18575
18921
|
"aria-describedby": inputWrapperContext.describedBy,
|
|
18576
18922
|
type: "text",
|
|
18923
|
+
onInput: (event) => {
|
|
18924
|
+
const handler = attrs.onInput;
|
|
18925
|
+
handler?.(event);
|
|
18926
|
+
setValue(event.currentTarget.value);
|
|
18927
|
+
},
|
|
18577
18928
|
onMousedown: (event) => {
|
|
18578
18929
|
if (!props.pointer) event.stopPropagation();
|
|
18579
18930
|
}
|
|
@@ -18740,6 +19091,10 @@ var RadioGroup = defineComponent({
|
|
|
18740
19091
|
inheritAttrs: false,
|
|
18741
19092
|
slots: Object,
|
|
18742
19093
|
props: {
|
|
19094
|
+
modelValue: {
|
|
19095
|
+
type: String,
|
|
19096
|
+
default: void 0
|
|
19097
|
+
},
|
|
18743
19098
|
value: {
|
|
18744
19099
|
type: String,
|
|
18745
19100
|
default: void 0
|
|
@@ -18801,13 +19156,17 @@ var RadioGroup = defineComponent({
|
|
|
18801
19156
|
default: false
|
|
18802
19157
|
}
|
|
18803
19158
|
},
|
|
18804
|
-
|
|
19159
|
+
emits: ["update:modelValue", "change"],
|
|
19160
|
+
setup(props, { attrs, slots, emit }) {
|
|
18805
19161
|
const name = useId(props.name);
|
|
18806
19162
|
const [value, setValue] = useUncontrolled({
|
|
18807
|
-
value: () => props.value,
|
|
19163
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
18808
19164
|
defaultValue: props.defaultValue,
|
|
18809
19165
|
finalValue: "",
|
|
18810
|
-
onChange: (nextValue) =>
|
|
19166
|
+
onChange: (nextValue) => {
|
|
19167
|
+
emit("update:modelValue", nextValue);
|
|
19168
|
+
emit("change", nextValue);
|
|
19169
|
+
}
|
|
18811
19170
|
});
|
|
18812
19171
|
const handleChange = (eventOrValue) => {
|
|
18813
19172
|
if (props.readOnly) return;
|
|
@@ -18853,7 +19212,7 @@ function useRadioCardContext() {
|
|
|
18853
19212
|
return inject(RadioCardContextKey, null);
|
|
18854
19213
|
}
|
|
18855
19214
|
var varsResolver$21 = createVarsResolver((_, { radius }) => ({ card: { "--card-radius": getRadius(radius) } }));
|
|
18856
|
-
function callHandler$
|
|
19215
|
+
function callHandler$1(handler, event) {
|
|
18857
19216
|
if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
|
|
18858
19217
|
else handler?.(event);
|
|
18859
19218
|
}
|
|
@@ -18861,10 +19220,22 @@ var RadioCard = withBoxProps(defineComponent({
|
|
|
18861
19220
|
name: "RadioCard",
|
|
18862
19221
|
inheritAttrs: false,
|
|
18863
19222
|
props: {
|
|
19223
|
+
modelValue: {
|
|
19224
|
+
type: Boolean,
|
|
19225
|
+
default: void 0
|
|
19226
|
+
},
|
|
18864
19227
|
checked: {
|
|
18865
19228
|
type: Boolean,
|
|
18866
19229
|
default: void 0
|
|
18867
19230
|
},
|
|
19231
|
+
defaultChecked: {
|
|
19232
|
+
type: Boolean,
|
|
19233
|
+
default: void 0
|
|
19234
|
+
},
|
|
19235
|
+
onChange: {
|
|
19236
|
+
type: Function,
|
|
19237
|
+
default: void 0
|
|
19238
|
+
},
|
|
18868
19239
|
withBorder: {
|
|
18869
19240
|
type: Boolean,
|
|
18870
19241
|
default: true
|
|
@@ -18902,8 +19273,23 @@ var RadioCard = withBoxProps(defineComponent({
|
|
|
18902
19273
|
default: false
|
|
18903
19274
|
}
|
|
18904
19275
|
},
|
|
18905
|
-
|
|
19276
|
+
emits: [
|
|
19277
|
+
"update:modelValue",
|
|
19278
|
+
"update:checked",
|
|
19279
|
+
"change"
|
|
19280
|
+
],
|
|
19281
|
+
setup(props, { attrs, slots, emit }) {
|
|
18906
19282
|
const groupContext = useRadioGroupContext();
|
|
19283
|
+
const [localChecked, setLocalChecked] = useUncontrolled({
|
|
19284
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.checked,
|
|
19285
|
+
defaultValue: props.defaultChecked,
|
|
19286
|
+
finalValue: false,
|
|
19287
|
+
onChange: (checked) => {
|
|
19288
|
+
emit("update:modelValue", checked);
|
|
19289
|
+
emit("update:checked", checked);
|
|
19290
|
+
emit("change", checked);
|
|
19291
|
+
}
|
|
19292
|
+
});
|
|
18907
19293
|
const getStyles = useStyles({
|
|
18908
19294
|
name: "RadioCard",
|
|
18909
19295
|
props,
|
|
@@ -18916,7 +19302,7 @@ var RadioCard = withBoxProps(defineComponent({
|
|
|
18916
19302
|
vars: props.vars,
|
|
18917
19303
|
varsResolver: varsResolver$21
|
|
18918
19304
|
});
|
|
18919
|
-
const isChecked = () =>
|
|
19305
|
+
const isChecked = () => groupContext ? groupContext.value === props.value : localChecked.value;
|
|
18920
19306
|
provide(RadioCardContextKey, { get checked() {
|
|
18921
19307
|
return isChecked();
|
|
18922
19308
|
} });
|
|
@@ -18938,8 +19324,9 @@ var RadioCard = withBoxProps(defineComponent({
|
|
|
18938
19324
|
name,
|
|
18939
19325
|
"aria-checked": checked,
|
|
18940
19326
|
onClick: (event) => {
|
|
18941
|
-
callHandler$
|
|
19327
|
+
callHandler$1(attrs.onClick, event);
|
|
18942
19328
|
groupContext?.onChange(props.value || "");
|
|
19329
|
+
setLocalChecked(true);
|
|
18943
19330
|
}
|
|
18944
19331
|
}, () => slots.default?.());
|
|
18945
19332
|
};
|
|
@@ -19109,10 +19496,6 @@ var varsResolver$19 = createVarsResolver((theme, { size, radius, color, iconColo
|
|
|
19109
19496
|
}) : void 0,
|
|
19110
19497
|
"--radio-icon-size": getSize(size, "radio-icon-size")
|
|
19111
19498
|
} }));
|
|
19112
|
-
function callHandler$2(handler, event) {
|
|
19113
|
-
if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
|
|
19114
|
-
else handler?.(event);
|
|
19115
|
-
}
|
|
19116
19499
|
var RadioBase = defineComponent({
|
|
19117
19500
|
name: "Radio",
|
|
19118
19501
|
inheritAttrs: false,
|
|
@@ -19174,14 +19557,30 @@ var RadioBase = defineComponent({
|
|
|
19174
19557
|
type: Boolean,
|
|
19175
19558
|
default: true
|
|
19176
19559
|
},
|
|
19560
|
+
modelValue: {
|
|
19561
|
+
type: Boolean,
|
|
19562
|
+
default: void 0
|
|
19563
|
+
},
|
|
19177
19564
|
checked: {
|
|
19178
19565
|
type: Boolean,
|
|
19179
19566
|
default: void 0
|
|
19180
19567
|
},
|
|
19568
|
+
defaultChecked: {
|
|
19569
|
+
type: Boolean,
|
|
19570
|
+
default: void 0
|
|
19571
|
+
},
|
|
19572
|
+
onChange: {
|
|
19573
|
+
type: Function,
|
|
19574
|
+
default: void 0
|
|
19575
|
+
},
|
|
19181
19576
|
disabled: {
|
|
19182
19577
|
type: Boolean,
|
|
19183
19578
|
default: false
|
|
19184
19579
|
},
|
|
19580
|
+
readOnly: {
|
|
19581
|
+
type: Boolean,
|
|
19582
|
+
default: false
|
|
19583
|
+
},
|
|
19185
19584
|
variant: {
|
|
19186
19585
|
type: String,
|
|
19187
19586
|
default: "filled"
|
|
@@ -19207,9 +19606,24 @@ var RadioBase = defineComponent({
|
|
|
19207
19606
|
default: false
|
|
19208
19607
|
}
|
|
19209
19608
|
},
|
|
19210
|
-
|
|
19609
|
+
emits: [
|
|
19610
|
+
"update:modelValue",
|
|
19611
|
+
"update:checked",
|
|
19612
|
+
"change"
|
|
19613
|
+
],
|
|
19614
|
+
setup(props, { attrs, slots, emit }) {
|
|
19211
19615
|
const uuid = useId(props.id);
|
|
19212
19616
|
const groupContext = useRadioGroupContext();
|
|
19617
|
+
const [localChecked, setLocalChecked] = useUncontrolled({
|
|
19618
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.checked,
|
|
19619
|
+
defaultValue: props.defaultChecked,
|
|
19620
|
+
finalValue: false,
|
|
19621
|
+
onChange: (checked) => {
|
|
19622
|
+
emit("update:modelValue", checked);
|
|
19623
|
+
emit("update:checked", checked);
|
|
19624
|
+
emit("change", checked);
|
|
19625
|
+
}
|
|
19626
|
+
});
|
|
19213
19627
|
const getStyles = useStyles({
|
|
19214
19628
|
name: "Radio",
|
|
19215
19629
|
props,
|
|
@@ -19235,7 +19649,7 @@ var RadioBase = defineComponent({
|
|
|
19235
19649
|
const iconStyles = getStyles("icon");
|
|
19236
19650
|
const Icon = props.icon || RadioIcon;
|
|
19237
19651
|
const value = String(attrs.value ?? "");
|
|
19238
|
-
const checked = groupContext ? groupContext.value === value :
|
|
19652
|
+
const checked = groupContext ? groupContext.value === value : localChecked.value;
|
|
19239
19653
|
const disabled = groupContext?.disabled || props.disabled;
|
|
19240
19654
|
const size = groupContext?.size ?? props.size;
|
|
19241
19655
|
const name = groupContext?.name ?? attrs.name;
|
|
@@ -19271,6 +19685,7 @@ var RadioBase = defineComponent({
|
|
|
19271
19685
|
id,
|
|
19272
19686
|
checked,
|
|
19273
19687
|
disabled,
|
|
19688
|
+
readonly: props.readOnly,
|
|
19274
19689
|
name,
|
|
19275
19690
|
type: "radio",
|
|
19276
19691
|
"aria-describedby": describedBy,
|
|
@@ -19280,8 +19695,12 @@ var RadioBase = defineComponent({
|
|
|
19280
19695
|
},
|
|
19281
19696
|
variant: props.variant,
|
|
19282
19697
|
onChange: (event) => {
|
|
19283
|
-
|
|
19698
|
+
if (props.readOnly) {
|
|
19699
|
+
event.currentTarget.checked = Boolean(checked);
|
|
19700
|
+
return;
|
|
19701
|
+
}
|
|
19284
19702
|
groupContext?.onChange(event);
|
|
19703
|
+
setLocalChecked(event.currentTarget.checked);
|
|
19285
19704
|
}
|
|
19286
19705
|
}), slots.icon ? slots.icon(iconStyles) : h(Icon, iconStyles)]));
|
|
19287
19706
|
};
|
|
@@ -19305,6 +19724,10 @@ var SwitchGroup = defineComponent({
|
|
|
19305
19724
|
inheritAttrs: false,
|
|
19306
19725
|
slots: Object,
|
|
19307
19726
|
props: {
|
|
19727
|
+
modelValue: {
|
|
19728
|
+
type: Array,
|
|
19729
|
+
default: void 0
|
|
19730
|
+
},
|
|
19308
19731
|
value: {
|
|
19309
19732
|
type: Array,
|
|
19310
19733
|
default: void 0
|
|
@@ -19378,16 +19801,20 @@ var SwitchGroup = defineComponent({
|
|
|
19378
19801
|
default: false
|
|
19379
19802
|
}
|
|
19380
19803
|
},
|
|
19381
|
-
|
|
19804
|
+
emits: ["update:modelValue", "change"],
|
|
19805
|
+
setup(props, { attrs, slots, emit }) {
|
|
19382
19806
|
const [value, setValue] = useUncontrolled({
|
|
19383
|
-
value: () => props.value,
|
|
19807
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
19384
19808
|
defaultValue: props.defaultValue,
|
|
19385
19809
|
finalValue: [],
|
|
19386
|
-
onChange: (nextValue) =>
|
|
19810
|
+
onChange: (nextValue) => {
|
|
19811
|
+
emit("update:modelValue", nextValue);
|
|
19812
|
+
emit("change", nextValue);
|
|
19813
|
+
}
|
|
19387
19814
|
});
|
|
19388
|
-
const handleChange = (
|
|
19815
|
+
const handleChange = (eventOrValue) => {
|
|
19389
19816
|
if (props.readOnly) return;
|
|
19390
|
-
const itemValue = String(
|
|
19817
|
+
const itemValue = typeof eventOrValue === "string" ? eventOrValue : String(eventOrValue.currentTarget?.value ?? "");
|
|
19391
19818
|
const isCurrentlySelected = value.value.includes(itemValue);
|
|
19392
19819
|
if (!isCurrentlySelected && props.maxSelectedValues && value.value.length >= props.maxSelectedValues) return;
|
|
19393
19820
|
setValue(isCurrentlySelected ? value.value.filter((item) => item !== itemValue) : [...value.value, itemValue]);
|
|
@@ -19453,10 +19880,6 @@ var varsResolver$18 = createVarsResolver((theme, { radius, color, size }) => ({
|
|
|
19453
19880
|
"--switch-track-label-padding": getSize(size, "switch-track-label-padding"),
|
|
19454
19881
|
"--switch-color": color ? getThemeColor(color, theme) : void 0
|
|
19455
19882
|
} }));
|
|
19456
|
-
function callHandler$1(handler, event) {
|
|
19457
|
-
if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
|
|
19458
|
-
else handler?.(event);
|
|
19459
|
-
}
|
|
19460
19883
|
var SwitchBase = defineComponent({
|
|
19461
19884
|
name: "Switch",
|
|
19462
19885
|
inheritAttrs: false,
|
|
@@ -19518,6 +19941,10 @@ var SwitchBase = defineComponent({
|
|
|
19518
19941
|
type: Boolean,
|
|
19519
19942
|
default: true
|
|
19520
19943
|
},
|
|
19944
|
+
modelValue: {
|
|
19945
|
+
type: Boolean,
|
|
19946
|
+
default: void 0
|
|
19947
|
+
},
|
|
19521
19948
|
checked: {
|
|
19522
19949
|
type: Boolean,
|
|
19523
19950
|
default: void 0
|
|
@@ -19534,6 +19961,10 @@ var SwitchBase = defineComponent({
|
|
|
19534
19961
|
type: Boolean,
|
|
19535
19962
|
default: false
|
|
19536
19963
|
},
|
|
19964
|
+
readOnly: {
|
|
19965
|
+
type: Boolean,
|
|
19966
|
+
default: false
|
|
19967
|
+
},
|
|
19537
19968
|
variant: {
|
|
19538
19969
|
type: String,
|
|
19539
19970
|
default: void 0
|
|
@@ -19559,16 +19990,22 @@ var SwitchBase = defineComponent({
|
|
|
19559
19990
|
default: false
|
|
19560
19991
|
}
|
|
19561
19992
|
},
|
|
19562
|
-
|
|
19993
|
+
emits: [
|
|
19994
|
+
"update:modelValue",
|
|
19995
|
+
"update:checked",
|
|
19996
|
+
"change"
|
|
19997
|
+
],
|
|
19998
|
+
setup(props, { attrs, slots, emit }) {
|
|
19563
19999
|
const uuid = useId(props.id);
|
|
19564
20000
|
const groupContext = useSwitchGroupContext();
|
|
19565
|
-
const internalChecked = ref(false);
|
|
19566
20001
|
const [checked, setChecked] = useUncontrolled({
|
|
19567
|
-
value: () => props.checked,
|
|
20002
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.checked,
|
|
19568
20003
|
defaultValue: props.defaultChecked,
|
|
19569
20004
|
finalValue: false,
|
|
19570
20005
|
onChange: (value) => {
|
|
19571
|
-
|
|
20006
|
+
emit("update:modelValue", value);
|
|
20007
|
+
emit("update:checked", value);
|
|
20008
|
+
emit("change", value);
|
|
19572
20009
|
}
|
|
19573
20010
|
});
|
|
19574
20011
|
const getStyles = useStyles({
|
|
@@ -19629,15 +20066,19 @@ var SwitchBase = defineComponent({
|
|
|
19629
20066
|
...getStyles("input"),
|
|
19630
20067
|
disabled,
|
|
19631
20068
|
checked: currentChecked,
|
|
20069
|
+
readonly: props.readOnly,
|
|
19632
20070
|
id,
|
|
19633
20071
|
type: "checkbox",
|
|
19634
20072
|
role: "switch",
|
|
19635
20073
|
"aria-describedby": describedBy,
|
|
19636
20074
|
onChange: (event) => {
|
|
19637
|
-
|
|
19638
|
-
|
|
20075
|
+
if (props.readOnly) {
|
|
20076
|
+
event.currentTarget.checked = currentChecked;
|
|
20077
|
+
return;
|
|
20078
|
+
}
|
|
20079
|
+
const nextChecked = event.currentTarget.checked;
|
|
19639
20080
|
if (groupContext) groupContext.onChange(event);
|
|
19640
|
-
|
|
20081
|
+
setChecked(nextChecked);
|
|
19641
20082
|
}
|
|
19642
20083
|
}), h(Box, {
|
|
19643
20084
|
component: "span",
|
|
@@ -20274,16 +20715,17 @@ var StepperBase = defineComponent({
|
|
|
20274
20715
|
const items = [];
|
|
20275
20716
|
steps.forEach((item, index) => {
|
|
20276
20717
|
const itemProps = item.props ?? {};
|
|
20718
|
+
const itemSlots = item.children ?? {};
|
|
20277
20719
|
const state = props.active === index ? "stepProgress" : props.active > index ? "stepCompleted" : "stepInactive";
|
|
20278
20720
|
const selectable = typeof props.onStepClick === "function" && (typeof itemProps.allowStepSelect === "boolean" ? itemProps.allowStepSelect : state === "stepCompleted" || props.allowNextStepsSelect);
|
|
20279
20721
|
items.push(cloneVNode(item, {
|
|
20280
|
-
icon: itemProps.icon ?? props.icon ?? (slots.icon ? (payload) => slots.icon(payload) : index + 1),
|
|
20722
|
+
icon: itemSlots.icon ? itemProps.icon : itemProps.icon ?? props.icon ?? (slots.icon ? (payload) => slots.icon(payload) : index + 1),
|
|
20281
20723
|
step: index,
|
|
20282
20724
|
state,
|
|
20283
20725
|
onClick: () => selectable && props.onStepClick?.(index),
|
|
20284
20726
|
allowStepClick: selectable,
|
|
20285
|
-
completedIcon: itemProps.completedIcon ?? props.completedIcon ?? (slots.completedIcon ? (payload) => slots.completedIcon(payload) : void 0),
|
|
20286
|
-
progressIcon: itemProps.progressIcon ?? props.progressIcon ?? (slots.progressIcon ? (payload) => slots.progressIcon(payload) : void 0),
|
|
20727
|
+
completedIcon: itemSlots.completedIcon ? itemProps.completedIcon : itemProps.completedIcon ?? props.completedIcon ?? (slots.completedIcon ? (payload) => slots.completedIcon(payload) : void 0),
|
|
20728
|
+
progressIcon: itemSlots.progressIcon ? itemProps.progressIcon : itemProps.progressIcon ?? props.progressIcon ?? (slots.progressIcon ? (payload) => slots.progressIcon(payload) : void 0),
|
|
20287
20729
|
color: itemProps.color ?? props.color,
|
|
20288
20730
|
iconSize: props.iconSize,
|
|
20289
20731
|
iconPosition: itemProps.iconPosition ?? props.iconPosition,
|
|
@@ -20739,9 +21181,154 @@ Object.assign(TableOfContents, {
|
|
|
20739
21181
|
classes: TableOfContents_module_default,
|
|
20740
21182
|
varsResolver: varsResolver$14
|
|
20741
21183
|
});
|
|
20742
|
-
|
|
21184
|
+
//#endregion
|
|
21185
|
+
//#region src/components/FloatingWindow/FloatingWindow.context.ts
|
|
21186
|
+
var [provideFloatingWindowContext, useFloatingWindowContext] = createSafeContext("FloatingWindow.ResizeHandle must be used within FloatingWindow");
|
|
21187
|
+
//#endregion
|
|
21188
|
+
//#region src/components/FloatingWindow/FloatingWindowResizeHandle.ts
|
|
21189
|
+
var KEYBOARD_STEP = 10;
|
|
21190
|
+
function clampDimension$1(value, min, max, viewportMax) {
|
|
21191
|
+
let result = value;
|
|
21192
|
+
if (min != null) result = Math.max(result, min);
|
|
21193
|
+
if (max != null) result = Math.min(result, max);
|
|
21194
|
+
if (viewportMax != null) result = Math.min(result, viewportMax);
|
|
21195
|
+
return result;
|
|
21196
|
+
}
|
|
21197
|
+
var FloatingWindowResizeHandle = withBoxProps(defineComponent({
|
|
21198
|
+
name: "FloatingWindowResizeHandle",
|
|
21199
|
+
inheritAttrs: false,
|
|
21200
|
+
props: {
|
|
21201
|
+
ariaLabel: {
|
|
21202
|
+
type: String,
|
|
21203
|
+
default: "Resize window"
|
|
21204
|
+
},
|
|
21205
|
+
tabindex: {
|
|
21206
|
+
type: Number,
|
|
21207
|
+
default: 0
|
|
21208
|
+
},
|
|
21209
|
+
onKeydown: Function
|
|
21210
|
+
},
|
|
21211
|
+
setup(props, { attrs, slots }) {
|
|
21212
|
+
const ctx = useFloatingWindowContext();
|
|
21213
|
+
let handle = null;
|
|
21214
|
+
let isResizing = false;
|
|
21215
|
+
let startX = 0;
|
|
21216
|
+
let startY = 0;
|
|
21217
|
+
let startWidth = 0;
|
|
21218
|
+
let startHeight = 0;
|
|
21219
|
+
const hasWidth = () => ctx.dimensions?.initialWidth != null || ctx.dimensions?.minWidth != null || ctx.dimensions?.maxWidth != null;
|
|
21220
|
+
const hasHeight = () => ctx.dimensions?.initialHeight != null || ctx.dimensions?.minHeight != null || ctx.dimensions?.maxHeight != null;
|
|
21221
|
+
const applySize = (width, height) => {
|
|
21222
|
+
const root = ctx.rootRef.value;
|
|
21223
|
+
if (!root || width === null && height === null) return;
|
|
21224
|
+
const rect = root.getBoundingClientRect();
|
|
21225
|
+
const offset = ctx.constrainOffset ?? 0;
|
|
21226
|
+
const maxViewportWidth = ctx.constrainToViewport ? window.innerWidth - rect.left - offset : void 0;
|
|
21227
|
+
const maxViewportHeight = ctx.constrainToViewport ? window.innerHeight - rect.top - offset : void 0;
|
|
21228
|
+
if (width !== null) root.style.width = `${clampDimension$1(width, ctx.dimensions?.minWidth, ctx.dimensions?.maxWidth, maxViewportWidth)}px`;
|
|
21229
|
+
if (height !== null) root.style.height = `${clampDimension$1(height, ctx.dimensions?.minHeight, ctx.dimensions?.maxHeight, maxViewportHeight)}px`;
|
|
21230
|
+
const resized = root.getBoundingClientRect();
|
|
21231
|
+
if (width !== null) handle?.setAttribute("aria-valuenow", String(Math.round(resized.width)));
|
|
21232
|
+
ctx.onSizeChange?.({
|
|
21233
|
+
width: resized.width,
|
|
21234
|
+
height: resized.height
|
|
21235
|
+
});
|
|
21236
|
+
};
|
|
21237
|
+
const end = () => {
|
|
21238
|
+
if (!isResizing) return;
|
|
21239
|
+
isResizing = false;
|
|
21240
|
+
document.body.style.userSelect = "";
|
|
21241
|
+
document.body.style.webkitUserSelect = "";
|
|
21242
|
+
ctx.onResizeEnd?.();
|
|
21243
|
+
document.removeEventListener("mousemove", move);
|
|
21244
|
+
document.removeEventListener("mouseup", end);
|
|
21245
|
+
document.removeEventListener("touchmove", move);
|
|
21246
|
+
document.removeEventListener("touchend", end);
|
|
21247
|
+
document.removeEventListener("touchcancel", end);
|
|
21248
|
+
};
|
|
21249
|
+
const move = (event) => {
|
|
21250
|
+
if (!isResizing) return;
|
|
21251
|
+
event.preventDefault();
|
|
21252
|
+
const point = "touches" in event ? event.touches[0] : event;
|
|
21253
|
+
applySize(hasWidth() ? startWidth + point.clientX - startX : null, hasHeight() ? startHeight + point.clientY - startY : null);
|
|
21254
|
+
};
|
|
21255
|
+
const start = (event) => {
|
|
21256
|
+
if ("button" in event && event.button !== 0) return;
|
|
21257
|
+
event.stopPropagation();
|
|
21258
|
+
event.preventDefault();
|
|
21259
|
+
if (!hasWidth() && !hasHeight()) return;
|
|
21260
|
+
const root = ctx.rootRef.value;
|
|
21261
|
+
if (!root) return;
|
|
21262
|
+
const point = "touches" in event ? event.touches[0] : event;
|
|
21263
|
+
const rect = root.getBoundingClientRect();
|
|
21264
|
+
startX = point.clientX;
|
|
21265
|
+
startY = point.clientY;
|
|
21266
|
+
startWidth = rect.width;
|
|
21267
|
+
startHeight = rect.height;
|
|
21268
|
+
isResizing = true;
|
|
21269
|
+
document.body.style.userSelect = "none";
|
|
21270
|
+
document.body.style.webkitUserSelect = "none";
|
|
21271
|
+
ctx.onResizeStart?.();
|
|
21272
|
+
document.addEventListener("mousemove", move);
|
|
21273
|
+
document.addEventListener("mouseup", end);
|
|
21274
|
+
document.addEventListener("touchmove", move, { passive: false });
|
|
21275
|
+
document.addEventListener("touchend", end);
|
|
21276
|
+
document.addEventListener("touchcancel", end);
|
|
21277
|
+
};
|
|
21278
|
+
const onKeydown = (event) => {
|
|
21279
|
+
props.onKeydown?.(event);
|
|
21280
|
+
if (event.defaultPrevented) return;
|
|
21281
|
+
const root = ctx.rootRef.value;
|
|
21282
|
+
if (!root) return;
|
|
21283
|
+
const rect = root.getBoundingClientRect();
|
|
21284
|
+
let width = null;
|
|
21285
|
+
let height = null;
|
|
21286
|
+
if (event.key === "ArrowRight" && hasWidth()) width = rect.width + KEYBOARD_STEP;
|
|
21287
|
+
else if (event.key === "ArrowLeft" && hasWidth()) width = rect.width - KEYBOARD_STEP;
|
|
21288
|
+
else if (event.key === "ArrowDown" && hasHeight()) height = rect.height + KEYBOARD_STEP;
|
|
21289
|
+
else if (event.key === "ArrowUp" && hasHeight()) height = rect.height - KEYBOARD_STEP;
|
|
21290
|
+
else if (event.key === "Home") {
|
|
21291
|
+
if (hasWidth()) width = ctx.dimensions?.minWidth ?? rect.width;
|
|
21292
|
+
if (hasHeight()) height = ctx.dimensions?.minHeight ?? rect.height;
|
|
21293
|
+
} else if (event.key === "End") {
|
|
21294
|
+
if (hasWidth()) width = ctx.dimensions?.maxWidth ?? rect.width;
|
|
21295
|
+
if (hasHeight()) height = ctx.dimensions?.maxHeight ?? rect.height;
|
|
21296
|
+
}
|
|
21297
|
+
if (width !== null || height !== null) {
|
|
21298
|
+
event.preventDefault();
|
|
21299
|
+
applySize(width, height);
|
|
21300
|
+
}
|
|
21301
|
+
};
|
|
21302
|
+
onMounted(() => {
|
|
21303
|
+
if (hasWidth() && ctx.dimensions?.initialWidth != null) handle?.setAttribute("aria-valuenow", String(Math.round(clampDimension$1(ctx.dimensions.initialWidth, ctx.dimensions.minWidth, ctx.dimensions.maxWidth, void 0))));
|
|
21304
|
+
});
|
|
21305
|
+
onBeforeUnmount(end);
|
|
21306
|
+
return () => h(Box, {
|
|
21307
|
+
...attrs,
|
|
21308
|
+
ref: (node) => {
|
|
21309
|
+
handle = node?.$el ?? node;
|
|
21310
|
+
},
|
|
21311
|
+
role: "separator",
|
|
21312
|
+
"aria-label": attrs["aria-label"] ?? props.ariaLabel,
|
|
21313
|
+
"aria-valuemin": ctx.dimensions?.minWidth,
|
|
21314
|
+
"aria-valuemax": ctx.dimensions?.maxWidth,
|
|
21315
|
+
tabindex: props.tabindex,
|
|
21316
|
+
style: [{ touchAction: "none" }, attrs.style],
|
|
21317
|
+
onMousedown: start,
|
|
21318
|
+
onTouchstart: start,
|
|
21319
|
+
onKeydown
|
|
21320
|
+
}, () => slots.default?.());
|
|
21321
|
+
}
|
|
21322
|
+
}));
|
|
21323
|
+
var FloatingWindow_module_default = { root: "_root_mstr0_1" };
|
|
20743
21324
|
//#endregion
|
|
20744
21325
|
//#region src/components/FloatingWindow/FloatingWindow.ts
|
|
21326
|
+
function clampDimension(value, min, max) {
|
|
21327
|
+
let result = value;
|
|
21328
|
+
if (min != null) result = Math.max(result, min);
|
|
21329
|
+
if (max != null) result = Math.min(result, max);
|
|
21330
|
+
return result;
|
|
21331
|
+
}
|
|
20745
21332
|
var defaultProps$7 = {
|
|
20746
21333
|
constrainToViewport: true,
|
|
20747
21334
|
withinPortal: true,
|
|
@@ -20807,6 +21394,22 @@ var FloatingWindow = defineComponent({
|
|
|
20807
21394
|
type: [String, Number],
|
|
20808
21395
|
default: void 0
|
|
20809
21396
|
},
|
|
21397
|
+
dimensions: {
|
|
21398
|
+
type: Object,
|
|
21399
|
+
default: void 0
|
|
21400
|
+
},
|
|
21401
|
+
onSizeChange: {
|
|
21402
|
+
type: Function,
|
|
21403
|
+
default: void 0
|
|
21404
|
+
},
|
|
21405
|
+
onResizeStart: {
|
|
21406
|
+
type: Function,
|
|
21407
|
+
default: void 0
|
|
21408
|
+
},
|
|
21409
|
+
onResizeEnd: {
|
|
21410
|
+
type: Function,
|
|
21411
|
+
default: void 0
|
|
21412
|
+
},
|
|
20810
21413
|
shadow: {
|
|
20811
21414
|
type: String,
|
|
20812
21415
|
default: void 0
|
|
@@ -20843,6 +21446,7 @@ var FloatingWindow = defineComponent({
|
|
|
20843
21446
|
setup(rawProps, { attrs, slots, expose }) {
|
|
20844
21447
|
const props = useProps("FloatingWindow", defaultProps$7, rawProps);
|
|
20845
21448
|
const floating = useFloatingWindow(props);
|
|
21449
|
+
const rootRef = ref(null);
|
|
20846
21450
|
assignRef(props.setPositionRef, floating.setPosition);
|
|
20847
21451
|
expose({ setPosition: floating.setPosition });
|
|
20848
21452
|
const getStyles = useStyles({
|
|
@@ -20856,12 +21460,37 @@ var FloatingWindow = defineComponent({
|
|
|
20856
21460
|
vars: props.vars,
|
|
20857
21461
|
unstyled: props.unstyled
|
|
20858
21462
|
});
|
|
21463
|
+
provideFloatingWindowContext({
|
|
21464
|
+
rootRef,
|
|
21465
|
+
get dimensions() {
|
|
21466
|
+
return props.dimensions;
|
|
21467
|
+
},
|
|
21468
|
+
get constrainToViewport() {
|
|
21469
|
+
return props.constrainToViewport;
|
|
21470
|
+
},
|
|
21471
|
+
get constrainOffset() {
|
|
21472
|
+
return props.constrainOffset;
|
|
21473
|
+
},
|
|
21474
|
+
get onSizeChange() {
|
|
21475
|
+
return props.onSizeChange;
|
|
21476
|
+
},
|
|
21477
|
+
get onResizeStart() {
|
|
21478
|
+
return props.onResizeStart;
|
|
21479
|
+
},
|
|
21480
|
+
get onResizeEnd() {
|
|
21481
|
+
return props.onResizeEnd;
|
|
21482
|
+
}
|
|
21483
|
+
});
|
|
20859
21484
|
return () => h(OptionalPortal, {
|
|
20860
21485
|
withinPortal: props.withinPortal,
|
|
20861
21486
|
...props.portalProps
|
|
20862
21487
|
}, () => h(Paper, {
|
|
20863
21488
|
...attrs,
|
|
20864
|
-
ref: ((value) =>
|
|
21489
|
+
ref: ((value) => {
|
|
21490
|
+
const node = value?.$el ?? value;
|
|
21491
|
+
rootRef.value = node;
|
|
21492
|
+
floating.ref(node);
|
|
21493
|
+
}),
|
|
20865
21494
|
shadow: props.shadow,
|
|
20866
21495
|
radius: props.radius,
|
|
20867
21496
|
withBorder: props.withBorder,
|
|
@@ -20872,13 +21501,20 @@ var FloatingWindow = defineComponent({
|
|
|
20872
21501
|
}),
|
|
20873
21502
|
style: [
|
|
20874
21503
|
getStyles("root").style,
|
|
20875
|
-
{
|
|
21504
|
+
{
|
|
21505
|
+
"--floating-window-z-index": String(props.zIndex),
|
|
21506
|
+
"--floating-window-width": props.dimensions?.initialWidth == null ? void 0 : `${clampDimension(props.dimensions.initialWidth, props.dimensions.minWidth, props.dimensions.maxWidth)}px`,
|
|
21507
|
+
"--floating-window-height": props.dimensions?.initialHeight == null ? void 0 : `${clampDimension(props.dimensions.initialHeight, props.dimensions.minHeight, props.dimensions.maxHeight)}px`
|
|
21508
|
+
},
|
|
20876
21509
|
attrs.style
|
|
20877
21510
|
]
|
|
20878
21511
|
}, () => slots.default?.()));
|
|
20879
21512
|
}
|
|
20880
21513
|
});
|
|
20881
|
-
Object.assign(FloatingWindow, {
|
|
21514
|
+
Object.assign(FloatingWindow, {
|
|
21515
|
+
classes: FloatingWindow_module_default,
|
|
21516
|
+
ResizeHandle: FloatingWindowResizeHandle
|
|
21517
|
+
});
|
|
20882
21518
|
//#endregion
|
|
20883
21519
|
//#region src/components/Slider/Slider.context.ts
|
|
20884
21520
|
var [provideSliderContext, useSliderContext] = createSafeContext("SliderProvider was not found in tree");
|
|
@@ -21221,15 +21857,15 @@ var Track = defineComponent({
|
|
|
21221
21857
|
}
|
|
21222
21858
|
});
|
|
21223
21859
|
var Slider_module_default = {
|
|
21224
|
-
root: "
|
|
21225
|
-
label: "
|
|
21226
|
-
thumb: "
|
|
21227
|
-
trackContainer: "
|
|
21228
|
-
track: "
|
|
21229
|
-
bar: "
|
|
21230
|
-
markWrapper: "
|
|
21231
|
-
mark: "
|
|
21232
|
-
markLabel: "
|
|
21860
|
+
root: "_root_1osrz_1",
|
|
21861
|
+
label: "_label_1osrz_39",
|
|
21862
|
+
thumb: "_thumb_1osrz_65",
|
|
21863
|
+
trackContainer: "_trackContainer_1osrz_131",
|
|
21864
|
+
track: "_track_1osrz_131",
|
|
21865
|
+
bar: "_bar_1osrz_187",
|
|
21866
|
+
markWrapper: "_markWrapper_1osrz_215",
|
|
21867
|
+
mark: "_mark_1osrz_215",
|
|
21868
|
+
markLabel: "_markLabel_1osrz_257"
|
|
21233
21869
|
};
|
|
21234
21870
|
//#endregion
|
|
21235
21871
|
//#region src/components/Slider/Slider/Slider.ts
|
|
@@ -21289,6 +21925,10 @@ var Slider = withBoxProps(defineComponent({
|
|
|
21289
21925
|
type: Number,
|
|
21290
21926
|
default: void 0
|
|
21291
21927
|
},
|
|
21928
|
+
modelValue: {
|
|
21929
|
+
type: Number,
|
|
21930
|
+
default: void 0
|
|
21931
|
+
},
|
|
21292
21932
|
value: {
|
|
21293
21933
|
type: Number,
|
|
21294
21934
|
default: void 0
|
|
@@ -21404,16 +22044,23 @@ var Slider = withBoxProps(defineComponent({
|
|
|
21404
22044
|
default: false
|
|
21405
22045
|
}
|
|
21406
22046
|
},
|
|
21407
|
-
|
|
22047
|
+
emits: ["update:modelValue", "change"],
|
|
22048
|
+
setup(rawProps, { attrs, slots, emit }) {
|
|
21408
22049
|
const props = useProps("Slider", defaultProps$6, rawProps);
|
|
21409
22050
|
const direction = useDirection();
|
|
21410
22051
|
const hovered = ref(false);
|
|
21411
22052
|
const thumb = ref(null);
|
|
21412
22053
|
const [current, setCurrent] = useUncontrolled({
|
|
21413
|
-
value: () =>
|
|
22054
|
+
value: () => {
|
|
22055
|
+
const controlledValue = props.modelValue !== void 0 ? props.modelValue : props.value;
|
|
22056
|
+
return controlledValue === void 0 ? void 0 : clamp$1(controlledValue, props.min, props.max);
|
|
22057
|
+
},
|
|
21414
22058
|
defaultValue: props.defaultValue === void 0 ? void 0 : clamp$1(props.defaultValue, props.min, props.max),
|
|
21415
22059
|
finalValue: clamp$1(0, props.min, props.max),
|
|
21416
|
-
onChange: (value) =>
|
|
22060
|
+
onChange: (value) => {
|
|
22061
|
+
emit("update:modelValue", value);
|
|
22062
|
+
emit("change", value);
|
|
22063
|
+
}
|
|
21417
22064
|
});
|
|
21418
22065
|
const valueRef = ref(current.value);
|
|
21419
22066
|
watch(current, (value) => {
|
|
@@ -21466,7 +22113,7 @@ var Slider = withBoxProps(defineComponent({
|
|
|
21466
22113
|
max: domain.value[1]
|
|
21467
22114
|
});
|
|
21468
22115
|
const scaled = props.scale(current.value);
|
|
21469
|
-
const label =
|
|
22116
|
+
const label = rawProps.label !== void 0 ? typeof props.label === "function" ? props.label(scaled) : props.label : slots.label?.({ value: scaled }) ?? (typeof props.label === "function" ? props.label(scaled) : props.label);
|
|
21470
22117
|
const start = typeof props.startPointValue === "number" && !props.inverted ? getPosition$1({
|
|
21471
22118
|
value: props.startPointValue,
|
|
21472
22119
|
min: domain.value[0],
|
|
@@ -21551,6 +22198,10 @@ var RangeSlider = defineComponent({
|
|
|
21551
22198
|
inheritAttrs: false,
|
|
21552
22199
|
slots: Object,
|
|
21553
22200
|
props: {
|
|
22201
|
+
modelValue: {
|
|
22202
|
+
type: Array,
|
|
22203
|
+
default: void 0
|
|
22204
|
+
},
|
|
21554
22205
|
value: {
|
|
21555
22206
|
type: Array,
|
|
21556
22207
|
default: void 0
|
|
@@ -21697,17 +22348,21 @@ var RangeSlider = defineComponent({
|
|
|
21697
22348
|
default: false
|
|
21698
22349
|
}
|
|
21699
22350
|
},
|
|
21700
|
-
|
|
22351
|
+
emits: ["update:modelValue", "change"],
|
|
22352
|
+
setup(rawProps, { attrs, slots, emit }) {
|
|
21701
22353
|
const props = useProps("RangeSlider", defaults$5, rawProps);
|
|
21702
22354
|
const direction = useDirection();
|
|
21703
22355
|
const activeThumb = ref(0);
|
|
21704
22356
|
const focused = ref(0);
|
|
21705
22357
|
const hovered = ref(false);
|
|
21706
22358
|
const [current, setCurrent] = useUncontrolled({
|
|
21707
|
-
value: () => props.value,
|
|
22359
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
21708
22360
|
defaultValue: props.defaultValue,
|
|
21709
22361
|
finalValue: [props.min, props.max],
|
|
21710
|
-
onChange: (value) =>
|
|
22362
|
+
onChange: (value) => {
|
|
22363
|
+
emit("update:modelValue", value);
|
|
22364
|
+
emit("change", value);
|
|
22365
|
+
}
|
|
21711
22366
|
});
|
|
21712
22367
|
const valueRef = ref([...current.value]);
|
|
21713
22368
|
watch(current, (value) => valueRef.value = [...value]);
|
|
@@ -21799,10 +22454,10 @@ var RangeSlider = defineComponent({
|
|
|
21799
22454
|
value: props.scale(current.value[index]),
|
|
21800
22455
|
position: positions[index],
|
|
21801
22456
|
dragging: move.active.value && activeThumb.value === index,
|
|
21802
|
-
label:
|
|
22457
|
+
label: rawProps.label !== void 0 ? typeof props.label === "function" ? props.label(props.scale(current.value[index])) : props.label : slots.label?.({
|
|
21803
22458
|
value: props.scale(current.value[index]),
|
|
21804
22459
|
index
|
|
21805
|
-
})
|
|
22460
|
+
}) ?? (typeof props.label === "function" ? props.label(props.scale(current.value[index])) : props.label),
|
|
21806
22461
|
labelAlwaysOn: props.labelAlwaysOn,
|
|
21807
22462
|
thumbLabel: props.thumbLabel?.[index],
|
|
21808
22463
|
thumbValueText: props.thumbValueText,
|
|
@@ -21813,7 +22468,7 @@ var RangeSlider = defineComponent({
|
|
|
21813
22468
|
onMousedown: () => activeThumb.value = index,
|
|
21814
22469
|
onFocus: () => focused.value = index,
|
|
21815
22470
|
onKeydown: (event) => keydown(index, event)
|
|
21816
|
-
}, () =>
|
|
22471
|
+
}, () => props.thumbChildren !== void 0 ? props.thumbChildren[index] : slots.thumbChildren?.({ index }))) }), props.name ? [h("input", {
|
|
21817
22472
|
type: "hidden",
|
|
21818
22473
|
name: `${props.name}_from`,
|
|
21819
22474
|
value: current.value[0],
|
|
@@ -21874,9 +22529,17 @@ var ColorSlider = defineComponent({
|
|
|
21874
22529
|
name: "ColorSlider",
|
|
21875
22530
|
inheritAttrs: false,
|
|
21876
22531
|
props: {
|
|
22532
|
+
modelValue: {
|
|
22533
|
+
type: Number,
|
|
22534
|
+
default: void 0
|
|
22535
|
+
},
|
|
21877
22536
|
value: {
|
|
21878
22537
|
type: Number,
|
|
21879
|
-
|
|
22538
|
+
default: void 0
|
|
22539
|
+
},
|
|
22540
|
+
defaultValue: {
|
|
22541
|
+
type: Number,
|
|
22542
|
+
default: void 0
|
|
21880
22543
|
},
|
|
21881
22544
|
onChange: {
|
|
21882
22545
|
type: Function,
|
|
@@ -21935,11 +22598,21 @@ var ColorSlider = defineComponent({
|
|
|
21935
22598
|
default: false
|
|
21936
22599
|
}
|
|
21937
22600
|
},
|
|
21938
|
-
|
|
22601
|
+
emits: ["update:modelValue", "change"],
|
|
22602
|
+
setup(props, { attrs, emit }) {
|
|
21939
22603
|
const ctx = useColorPickerContext();
|
|
21940
22604
|
const theme = useMantineTheme();
|
|
22605
|
+
const [value, setValue] = useUncontrolled({
|
|
22606
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
22607
|
+
defaultValue: props.defaultValue,
|
|
22608
|
+
finalValue: 0,
|
|
22609
|
+
onChange: (nextValue) => {
|
|
22610
|
+
emit("update:modelValue", nextValue);
|
|
22611
|
+
emit("change", nextValue);
|
|
22612
|
+
}
|
|
22613
|
+
});
|
|
21941
22614
|
const position = ref({
|
|
21942
|
-
x:
|
|
22615
|
+
x: value.value / props.maxValue,
|
|
21943
22616
|
y: 0
|
|
21944
22617
|
});
|
|
21945
22618
|
const positionRef = ref(position.value);
|
|
@@ -21964,7 +22637,7 @@ var ColorSlider = defineComponent({
|
|
|
21964
22637
|
x,
|
|
21965
22638
|
y: 0
|
|
21966
22639
|
};
|
|
21967
|
-
|
|
22640
|
+
setValue(changeValue(x));
|
|
21968
22641
|
}, {
|
|
21969
22642
|
onScrubStart: props.onScrubStart,
|
|
21970
22643
|
onScrubEnd: () => {
|
|
@@ -21972,7 +22645,7 @@ var ColorSlider = defineComponent({
|
|
|
21972
22645
|
props.onScrubEnd?.();
|
|
21973
22646
|
}
|
|
21974
22647
|
});
|
|
21975
|
-
watch(
|
|
22648
|
+
watch(value, (value) => position.value = {
|
|
21976
22649
|
x: value / props.maxValue,
|
|
21977
22650
|
y: 0
|
|
21978
22651
|
});
|
|
@@ -21983,7 +22656,7 @@ var ColorSlider = defineComponent({
|
|
|
21983
22656
|
x: position.value.x + (event.key === "ArrowRight" ? .05 : -.05),
|
|
21984
22657
|
y: 0
|
|
21985
22658
|
}).x);
|
|
21986
|
-
|
|
22659
|
+
setValue(value);
|
|
21987
22660
|
props.onChangeEnd?.(value);
|
|
21988
22661
|
};
|
|
21989
22662
|
return () => h(Box, {
|
|
@@ -21994,7 +22667,7 @@ var ColorSlider = defineComponent({
|
|
|
21994
22667
|
style: attrs.style
|
|
21995
22668
|
}),
|
|
21996
22669
|
role: "slider",
|
|
21997
|
-
"aria-valuenow":
|
|
22670
|
+
"aria-valuenow": value.value,
|
|
21998
22671
|
"aria-valuemax": props.maxValue,
|
|
21999
22672
|
"aria-valuemin": 0,
|
|
22000
22673
|
tabindex: props.focusable ? 0 : -1,
|
|
@@ -22229,9 +22902,17 @@ var AlphaSlider = defineComponent({
|
|
|
22229
22902
|
name: "AlphaSlider",
|
|
22230
22903
|
inheritAttrs: false,
|
|
22231
22904
|
props: {
|
|
22905
|
+
modelValue: {
|
|
22906
|
+
type: Number,
|
|
22907
|
+
default: void 0
|
|
22908
|
+
},
|
|
22232
22909
|
value: {
|
|
22233
22910
|
type: Number,
|
|
22234
|
-
|
|
22911
|
+
default: void 0
|
|
22912
|
+
},
|
|
22913
|
+
defaultValue: {
|
|
22914
|
+
type: Number,
|
|
22915
|
+
default: void 0
|
|
22235
22916
|
},
|
|
22236
22917
|
color: {
|
|
22237
22918
|
type: String,
|
|
@@ -22262,7 +22943,8 @@ var AlphaSlider = defineComponent({
|
|
|
22262
22943
|
default: true
|
|
22263
22944
|
}
|
|
22264
22945
|
},
|
|
22265
|
-
|
|
22946
|
+
emits: ["update:modelValue", "change"],
|
|
22947
|
+
setup(props, { attrs, emit }) {
|
|
22266
22948
|
return () => h(ColorSlider, {
|
|
22267
22949
|
...attrs,
|
|
22268
22950
|
...props,
|
|
@@ -22270,7 +22952,8 @@ var AlphaSlider = defineComponent({
|
|
|
22270
22952
|
maxValue: 1,
|
|
22271
22953
|
round: false,
|
|
22272
22954
|
"data-alpha": "",
|
|
22273
|
-
|
|
22955
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", round(value, 2)),
|
|
22956
|
+
onChange: (value) => emit("change", round(value, 2)),
|
|
22274
22957
|
onChangeEnd: (value) => props.onChangeEnd?.(round(value, 2)),
|
|
22275
22958
|
overlays: [
|
|
22276
22959
|
{
|
|
@@ -22290,9 +22973,17 @@ var HueSlider = defineComponent({
|
|
|
22290
22973
|
name: "HueSlider",
|
|
22291
22974
|
inheritAttrs: false,
|
|
22292
22975
|
props: {
|
|
22976
|
+
modelValue: {
|
|
22977
|
+
type: Number,
|
|
22978
|
+
default: void 0
|
|
22979
|
+
},
|
|
22293
22980
|
value: {
|
|
22294
22981
|
type: Number,
|
|
22295
|
-
|
|
22982
|
+
default: void 0
|
|
22983
|
+
},
|
|
22984
|
+
defaultValue: {
|
|
22985
|
+
type: Number,
|
|
22986
|
+
default: void 0
|
|
22296
22987
|
},
|
|
22297
22988
|
onChange: {
|
|
22298
22989
|
type: Function,
|
|
@@ -22319,13 +23010,16 @@ var HueSlider = defineComponent({
|
|
|
22319
23010
|
default: true
|
|
22320
23011
|
}
|
|
22321
23012
|
},
|
|
22322
|
-
|
|
23013
|
+
emits: ["update:modelValue", "change"],
|
|
23014
|
+
setup(props, { attrs, emit }) {
|
|
22323
23015
|
return () => h(ColorSlider, {
|
|
22324
23016
|
...attrs,
|
|
22325
23017
|
...props,
|
|
23018
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", value),
|
|
23019
|
+
onChange: (value) => emit("change", value),
|
|
22326
23020
|
__staticSelector: "HueSlider",
|
|
22327
23021
|
maxValue: 360,
|
|
22328
|
-
thumbColor: `hsl(${props.value}, 100%, 50%)`,
|
|
23022
|
+
thumbColor: `hsl(${props.modelValue ?? props.value ?? props.defaultValue ?? 0}, 100%, 50%)`,
|
|
22329
23023
|
round: true,
|
|
22330
23024
|
"data-hue": "",
|
|
22331
23025
|
overlays: [{ backgroundImage: "linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))" }, { boxShadow: `rgba(0,0,0,.1) 0 0 0 ${rem(1)} inset, rgba(0,0,0,.15) 0 0 ${rem(4)} inset` }]
|
|
@@ -22523,6 +23217,10 @@ var ColorPicker = defineComponent({
|
|
|
22523
23217
|
name: "ColorPicker",
|
|
22524
23218
|
inheritAttrs: false,
|
|
22525
23219
|
props: {
|
|
23220
|
+
modelValue: {
|
|
23221
|
+
type: String,
|
|
23222
|
+
default: void 0
|
|
23223
|
+
},
|
|
22526
23224
|
value: {
|
|
22527
23225
|
type: String,
|
|
22528
23226
|
default: void 0
|
|
@@ -22616,13 +23314,17 @@ var ColorPicker = defineComponent({
|
|
|
22616
23314
|
default: false
|
|
22617
23315
|
}
|
|
22618
23316
|
},
|
|
22619
|
-
|
|
23317
|
+
emits: ["update:modelValue", "change"],
|
|
23318
|
+
setup(rawProps, { attrs, emit }) {
|
|
22620
23319
|
const props = useProps("ColorPicker", defaults$4, rawProps);
|
|
22621
23320
|
const [current, setCurrent, controlled] = useUncontrolled({
|
|
22622
|
-
value: () => props.value,
|
|
23321
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
22623
23322
|
defaultValue: props.defaultValue,
|
|
22624
23323
|
finalValue: "#FFFFFF",
|
|
22625
|
-
onChange: (value) =>
|
|
23324
|
+
onChange: (value) => {
|
|
23325
|
+
emit("update:modelValue", value);
|
|
23326
|
+
emit("change", value);
|
|
23327
|
+
}
|
|
22626
23328
|
});
|
|
22627
23329
|
const parsed = ref(parseColor(current.value));
|
|
22628
23330
|
let scrubbing = false;
|
|
@@ -23386,6 +24088,22 @@ var MaskInput = defineComponent({
|
|
|
23386
24088
|
type: [String, Array],
|
|
23387
24089
|
required: true
|
|
23388
24090
|
},
|
|
24091
|
+
modelValue: {
|
|
24092
|
+
type: String,
|
|
24093
|
+
default: void 0
|
|
24094
|
+
},
|
|
24095
|
+
value: {
|
|
24096
|
+
type: String,
|
|
24097
|
+
default: void 0
|
|
24098
|
+
},
|
|
24099
|
+
defaultValue: {
|
|
24100
|
+
type: String,
|
|
24101
|
+
default: void 0
|
|
24102
|
+
},
|
|
24103
|
+
onChange: {
|
|
24104
|
+
type: Function,
|
|
24105
|
+
default: void 0
|
|
24106
|
+
},
|
|
23389
24107
|
tokens: {
|
|
23390
24108
|
type: Object,
|
|
23391
24109
|
default: void 0
|
|
@@ -23435,7 +24153,8 @@ var MaskInput = defineComponent({
|
|
|
23435
24153
|
default: void 0
|
|
23436
24154
|
}
|
|
23437
24155
|
},
|
|
23438
|
-
|
|
24156
|
+
emits: ["update:modelValue", "change"],
|
|
24157
|
+
setup(props, { attrs, slots, emit }) {
|
|
23439
24158
|
const input = ref(null);
|
|
23440
24159
|
const processed = ref("");
|
|
23441
24160
|
const rawValue = ref("");
|
|
@@ -23496,6 +24215,8 @@ var MaskInput = defineComponent({
|
|
|
23496
24215
|
}
|
|
23497
24216
|
const complete = isComplete(reprocessed, resolved.slots);
|
|
23498
24217
|
if (notify) {
|
|
24218
|
+
emit("update:modelValue", nextDisplay);
|
|
24219
|
+
emit("change", nextDisplay);
|
|
23499
24220
|
props.onChangeRaw?.(resolvedRaw, nextDisplay);
|
|
23500
24221
|
if (complete && !wasComplete.value) props.onComplete?.(nextDisplay, resolvedRaw);
|
|
23501
24222
|
}
|
|
@@ -23508,11 +24229,13 @@ var MaskInput = defineComponent({
|
|
|
23508
24229
|
const resolved = resolveMaskOptions(options(), "");
|
|
23509
24230
|
displayValue.value = props.alwaysShowMask ? buildDisplayValue("", resolved.slots, resolved.slotChar, true) : "";
|
|
23510
24231
|
if (input.value) input.value.value = displayValue.value;
|
|
24232
|
+
emit("update:modelValue", "");
|
|
24233
|
+
emit("change", "");
|
|
23511
24234
|
props.onChangeRaw?.("", "");
|
|
23512
24235
|
};
|
|
23513
24236
|
assignRef(props.resetRef, reset);
|
|
23514
24237
|
watch(() => props.resetRef, (value) => assignRef(value, reset));
|
|
23515
|
-
watch(() =>
|
|
24238
|
+
watch(() => props.modelValue !== void 0 ? props.modelValue : props.value, (value) => {
|
|
23516
24239
|
if (input.value && value !== void 0 && String(value) !== displayValue.value) commit(String(value), void 0, false, String(value));
|
|
23517
24240
|
});
|
|
23518
24241
|
onBeforeUnmount(() => assignRef(props.resetRef, null));
|
|
@@ -23521,7 +24244,7 @@ var MaskInput = defineComponent({
|
|
|
23521
24244
|
input.value = element instanceof HTMLInputElement ? element : null;
|
|
23522
24245
|
assignRef(attrs.rootRef, root?.$el ?? root ?? null);
|
|
23523
24246
|
if (!input.value) return;
|
|
23524
|
-
const initial =
|
|
24247
|
+
const initial = props.modelValue ?? props.value ?? props.defaultValue ?? input.value.value;
|
|
23525
24248
|
if (initial) commit(String(initial), void 0, false, String(initial));
|
|
23526
24249
|
else if (props.alwaysShowMask) {
|
|
23527
24250
|
const resolved = resolveMaskOptions(options(), "");
|
|
@@ -23632,6 +24355,7 @@ var MaskInput = defineComponent({
|
|
|
23632
24355
|
type: forwarded.type ?? "text",
|
|
23633
24356
|
__staticSelector: "MaskInput",
|
|
23634
24357
|
__stylesApiProps: attrs,
|
|
24358
|
+
value: displayValue.value,
|
|
23635
24359
|
rootRef: attach,
|
|
23636
24360
|
onInput: handleInput,
|
|
23637
24361
|
onFocus: handleFocus,
|
|
@@ -24089,6 +24813,7 @@ function flattenChildren$1(children) {
|
|
|
24089
24813
|
var SplitterBase = defineComponent({
|
|
24090
24814
|
name: "Splitter",
|
|
24091
24815
|
inheritAttrs: false,
|
|
24816
|
+
slots: Object,
|
|
24092
24817
|
props: {
|
|
24093
24818
|
orientation: {
|
|
24094
24819
|
type: String,
|
|
@@ -24235,7 +24960,7 @@ var SplitterBase = defineComponent({
|
|
|
24235
24960
|
...getStyles("thumb"),
|
|
24236
24961
|
"data-orientation": props.orientation,
|
|
24237
24962
|
"data-active": splitter.activeHandle === handleIndex || void 0
|
|
24238
|
-
}, [props.handleIcon !== void 0 ? props.handleIcon : h(props.orientation === "vertical" ? GripHorizontalIcon : GripVerticalIcon)]) : void 0));
|
|
24963
|
+
}, [props.handleIcon !== void 0 || slots.handleIcon ? resolveNode(props.handleIcon, slots.handleIcon) : h(props.orientation === "vertical" ? GripHorizontalIcon : GripVerticalIcon)]) : void 0));
|
|
24239
24964
|
}
|
|
24240
24965
|
items.push(cloneVNode(child, {
|
|
24241
24966
|
key: `pane-${index}`,
|
|
@@ -24495,7 +25220,10 @@ var TreeNode = defineComponent({
|
|
|
24495
25220
|
},
|
|
24496
25221
|
setup(props) {
|
|
24497
25222
|
const element = ref(null);
|
|
24498
|
-
const hasChildren = () =>
|
|
25223
|
+
const hasChildren = () => {
|
|
25224
|
+
const hasLoadedChildren = Array.isArray(props.node.children) && props.node.children.length > 0;
|
|
25225
|
+
return hasLoadedChildren || !!props.node.hasChildren && !hasLoadedChildren;
|
|
25226
|
+
};
|
|
24499
25227
|
const expanded = () => props.controller.expandedState.value[props.node.value] || false;
|
|
24500
25228
|
const dnd = useTreeNodeDragDrop({
|
|
24501
25229
|
nodeValue: props.node.value,
|
|
@@ -24511,13 +25239,20 @@ var TreeNode = defineComponent({
|
|
|
24511
25239
|
if (event.code === "ArrowRight") {
|
|
24512
25240
|
event.stopPropagation();
|
|
24513
25241
|
event.preventDefault();
|
|
24514
|
-
if (expanded())
|
|
24515
|
-
|
|
25242
|
+
if (expanded()) {
|
|
25243
|
+
const nextNode = element.value?.querySelector("[role=treeitem]");
|
|
25244
|
+
nextNode?.setAttribute("data-focus-ring", "true");
|
|
25245
|
+
nextNode?.focus();
|
|
25246
|
+
} else if (hasChildren()) props.controller.expand(props.node.value);
|
|
24516
25247
|
} else if (event.code === "ArrowLeft") {
|
|
24517
25248
|
event.stopPropagation();
|
|
24518
25249
|
event.preventDefault();
|
|
24519
25250
|
if (expanded() && hasChildren()) props.controller.collapse(props.node.value);
|
|
24520
|
-
else if (props.isSubtree)
|
|
25251
|
+
else if (props.isSubtree) {
|
|
25252
|
+
const parentNode = element.value?.parentElement?.closest("[role=treeitem]");
|
|
25253
|
+
parentNode?.setAttribute("data-focus-ring", "true");
|
|
25254
|
+
parentNode?.focus();
|
|
25255
|
+
}
|
|
24521
25256
|
} else if (event.code === "ArrowDown" || event.code === "ArrowUp") {
|
|
24522
25257
|
const root = element.value?.closest("[data-tree-root]");
|
|
24523
25258
|
if (!root || !element.value) return;
|
|
@@ -24526,6 +25261,7 @@ var TreeNode = defineComponent({
|
|
|
24526
25261
|
const nodes = Array.from(root.querySelectorAll("[role=treeitem]")).filter((node) => visible(node, root));
|
|
24527
25262
|
const index = nodes.indexOf(element.value);
|
|
24528
25263
|
const next = nodes[event.code === "ArrowDown" ? index + 1 : index - 1];
|
|
25264
|
+
next?.setAttribute("data-focus-ring", "true");
|
|
24529
25265
|
next?.focus();
|
|
24530
25266
|
if (event.shiftKey && next) props.controller.setSelectedState(getValuesRange(props.controller.anchorNode.value, next.dataset.value, props.flatValues));
|
|
24531
25267
|
} else if (event.code === "Space") {
|
|
@@ -24610,6 +25346,10 @@ var TreeNode = defineComponent({
|
|
|
24610
25346
|
"data-level": props.level,
|
|
24611
25347
|
tabindex: props.rootIndex === 0 ? 0 : -1,
|
|
24612
25348
|
onKeydown,
|
|
25349
|
+
onBlur: (event) => {
|
|
25350
|
+
const currentTarget = event.currentTarget;
|
|
25351
|
+
if (!currentTarget.contains(event.relatedTarget)) currentTarget.removeAttribute("data-focus-ring");
|
|
25352
|
+
},
|
|
24613
25353
|
ref: element
|
|
24614
25354
|
}, [
|
|
24615
25355
|
label,
|
|
@@ -24870,12 +25610,12 @@ function useTree(input = {}) {
|
|
|
24870
25610
|
};
|
|
24871
25611
|
}
|
|
24872
25612
|
var Tree_module_default = {
|
|
24873
|
-
root: "
|
|
24874
|
-
subtree: "
|
|
24875
|
-
node: "
|
|
24876
|
-
label: "
|
|
24877
|
-
flatLine: "
|
|
24878
|
-
flatLineClosing: "
|
|
25613
|
+
root: "_root_ea12t_7",
|
|
25614
|
+
subtree: "_subtree_ea12t_13",
|
|
25615
|
+
node: "_node_ea12t_18",
|
|
25616
|
+
label: "_label_ea12t_27",
|
|
25617
|
+
flatLine: "_flatLine_ea12t_126",
|
|
25618
|
+
flatLineClosing: "_flatLineClosing_ea12t_152"
|
|
24879
25619
|
};
|
|
24880
25620
|
//#endregion
|
|
24881
25621
|
//#region src/components/Tree/Tree.ts
|
|
@@ -24886,6 +25626,7 @@ var varsResolver$8 = createVarsResolver((_, { levelOffset }) => ({ root: { "--le
|
|
|
24886
25626
|
var Tree = withBoxProps(defineComponent({
|
|
24887
25627
|
name: "Tree",
|
|
24888
25628
|
inheritAttrs: false,
|
|
25629
|
+
slots: Object,
|
|
24889
25630
|
props: {
|
|
24890
25631
|
component: {
|
|
24891
25632
|
type: [
|
|
@@ -25001,7 +25742,7 @@ var Tree = withBoxProps(defineComponent({
|
|
|
25001
25742
|
onBeforeUnmount(() => document.removeEventListener("mousedown", outside));
|
|
25002
25743
|
return () => {
|
|
25003
25744
|
const flatValues = getFlatValues(props.data);
|
|
25004
|
-
const renderNode = props.renderNode || (slots.node ? (payload) => slots.node?.(payload) : void 0);
|
|
25745
|
+
const renderNode = props.renderNode || (slots.renderNode ? (payload) => slots.renderNode?.(payload) : slots.node ? (payload) => slots.node?.(payload) : void 0);
|
|
25005
25746
|
const nodes = props.data.map((node, index) => h(TreeNode, {
|
|
25006
25747
|
key: node.value,
|
|
25007
25748
|
node,
|
|
@@ -25288,7 +26029,7 @@ function filterTreeData(data, query, filter = defaultTreeNodeFilter) {
|
|
|
25288
26029
|
function flattenTo$1(acc, data, state, parent, level, ancestorIsLast) {
|
|
25289
26030
|
data.forEach((node, index) => {
|
|
25290
26031
|
const isLast = index === data.length - 1;
|
|
25291
|
-
const loaded = Array.isArray(node.children);
|
|
26032
|
+
const loaded = Array.isArray(node.children) && node.children.length > 0;
|
|
25292
26033
|
const hasChildren = loaded || !!node.hasChildren && !loaded;
|
|
25293
26034
|
const expanded = state[node.value] || false;
|
|
25294
26035
|
const linesPath = [];
|
|
@@ -25782,6 +26523,10 @@ var ModalRoot = defineComponent({
|
|
|
25782
26523
|
type: Function,
|
|
25783
26524
|
required: true
|
|
25784
26525
|
},
|
|
26526
|
+
keepMounted: {
|
|
26527
|
+
type: Boolean,
|
|
26528
|
+
default: false
|
|
26529
|
+
},
|
|
25785
26530
|
centered: Boolean,
|
|
25786
26531
|
fullScreen: Boolean,
|
|
25787
26532
|
radius: [String, Number],
|
|
@@ -25844,6 +26589,7 @@ var ModalRoot = defineComponent({
|
|
|
25844
26589
|
...attrs,
|
|
25845
26590
|
opened: props.opened,
|
|
25846
26591
|
onClose: props.onClose,
|
|
26592
|
+
keepMounted: props.keepMounted,
|
|
25847
26593
|
unstyled: props.unstyled,
|
|
25848
26594
|
...getStyles("root"),
|
|
25849
26595
|
mod: {
|
|
@@ -25898,6 +26644,10 @@ var ModalBaseComponent = defineComponent({
|
|
|
25898
26644
|
type: Function,
|
|
25899
26645
|
required: true
|
|
25900
26646
|
},
|
|
26647
|
+
keepMounted: {
|
|
26648
|
+
type: Boolean,
|
|
26649
|
+
default: false
|
|
26650
|
+
},
|
|
25901
26651
|
title: {
|
|
25902
26652
|
type: null,
|
|
25903
26653
|
default: void 0
|
|
@@ -25920,7 +26670,8 @@ var ModalBaseComponent = defineComponent({
|
|
|
25920
26670
|
return h(ModalRoot, {
|
|
25921
26671
|
...attrs,
|
|
25922
26672
|
opened: props.opened,
|
|
25923
|
-
onClose: props.onClose
|
|
26673
|
+
onClose: props.onClose,
|
|
26674
|
+
keepMounted: props.keepMounted
|
|
25924
26675
|
}, { default: () => [props.withOverlay && h(ModalOverlay, props.overlayProps), h(ModalContent, null, { default: () => [header && h(ModalHeader, null, { default: () => [hasNode(title) && h(ModalTitle, null, { default: () => title }), props.withCloseButton && h(ModalCloseButton, props.closeButtonProps)] }), h(ModalBody, null, { default: () => slots.default?.() })] })] });
|
|
25925
26676
|
};
|
|
25926
26677
|
}
|
|
@@ -26045,6 +26796,10 @@ var DrawerRoot = defineComponent({
|
|
|
26045
26796
|
type: Function,
|
|
26046
26797
|
required: true
|
|
26047
26798
|
},
|
|
26799
|
+
keepMounted: {
|
|
26800
|
+
type: Boolean,
|
|
26801
|
+
default: false
|
|
26802
|
+
},
|
|
26048
26803
|
position: {
|
|
26049
26804
|
type: String,
|
|
26050
26805
|
default: "left"
|
|
@@ -26104,6 +26859,7 @@ var DrawerRoot = defineComponent({
|
|
|
26104
26859
|
...attrs,
|
|
26105
26860
|
opened: props.opened,
|
|
26106
26861
|
onClose: props.onClose,
|
|
26862
|
+
keepMounted: props.keepMounted,
|
|
26107
26863
|
unstyled: props.unstyled,
|
|
26108
26864
|
...getStyles("root"),
|
|
26109
26865
|
transitionProps: {
|
|
@@ -26162,6 +26918,10 @@ var DrawerBaseComponent = defineComponent({
|
|
|
26162
26918
|
type: Function,
|
|
26163
26919
|
required: true
|
|
26164
26920
|
},
|
|
26921
|
+
keepMounted: {
|
|
26922
|
+
type: Boolean,
|
|
26923
|
+
default: false
|
|
26924
|
+
},
|
|
26165
26925
|
title: {
|
|
26166
26926
|
type: null,
|
|
26167
26927
|
default: void 0
|
|
@@ -26219,6 +26979,7 @@ var DrawerBaseComponent = defineComponent({
|
|
|
26219
26979
|
...attrs,
|
|
26220
26980
|
opened: props.opened,
|
|
26221
26981
|
onClose: props.onClose,
|
|
26982
|
+
keepMounted: props.keepMounted,
|
|
26222
26983
|
zIndex: resolvedZIndex.value,
|
|
26223
26984
|
...stackProps.value
|
|
26224
26985
|
}, { default: () => [props.withOverlay && h(DrawerOverlay, {
|
|
@@ -26420,7 +27181,7 @@ function useDelayedHover(input) {
|
|
|
26420
27181
|
}
|
|
26421
27182
|
//#endregion
|
|
26422
27183
|
//#region src/utils/Floating/use-context-menu-handlers.ts
|
|
26423
|
-
function call$
|
|
27184
|
+
function call$4(handler, event) {
|
|
26424
27185
|
if (Array.isArray(handler)) handler.forEach((item) => typeof item === "function" && item(event));
|
|
26425
27186
|
else if (typeof handler === "function") handler(event);
|
|
26426
27187
|
}
|
|
@@ -26472,11 +27233,11 @@ function useContextMenuHandlers(options) {
|
|
|
26472
27233
|
});
|
|
26473
27234
|
return {
|
|
26474
27235
|
onMousedown: (event) => {
|
|
26475
|
-
call$
|
|
27236
|
+
call$4(options.childProps.onMousedown ?? options.childProps.onMouseDown, event);
|
|
26476
27237
|
if (!options.disabled && event.button === 2) event.stopPropagation();
|
|
26477
27238
|
},
|
|
26478
27239
|
onContextmenu: (event) => {
|
|
26479
|
-
call$
|
|
27240
|
+
call$4(options.childProps.onContextmenu ?? options.childProps.onContextMenu, event);
|
|
26480
27241
|
if (options.disabled || event.defaultPrevented) return;
|
|
26481
27242
|
event.preventDefault();
|
|
26482
27243
|
if (gestureHandled.value) return;
|
|
@@ -26484,19 +27245,19 @@ function useContextMenuHandlers(options) {
|
|
|
26484
27245
|
if (touchActive.value) gestureHandled.value = true;
|
|
26485
27246
|
},
|
|
26486
27247
|
onTouchstart: (event) => {
|
|
26487
|
-
call$
|
|
27248
|
+
call$4(options.childProps.onTouchstart ?? options.childProps.onTouchStart, event);
|
|
26488
27249
|
longPress.onTouchstart?.(event);
|
|
26489
27250
|
},
|
|
26490
27251
|
onTouchend: (event) => {
|
|
26491
|
-
call$
|
|
27252
|
+
call$4(options.childProps.onTouchend ?? options.childProps.onTouchEnd, event);
|
|
26492
27253
|
longPress.onTouchend?.(event);
|
|
26493
27254
|
},
|
|
26494
27255
|
onTouchcancel: (event) => {
|
|
26495
|
-
call$
|
|
27256
|
+
call$4(options.childProps.onTouchcancel ?? options.childProps.onTouchCancel, event);
|
|
26496
27257
|
longPress.onTouchcancel?.(event);
|
|
26497
27258
|
},
|
|
26498
27259
|
onTouchmove: (event) => {
|
|
26499
|
-
call$
|
|
27260
|
+
call$4(options.childProps.onTouchmove ?? options.childProps.onTouchMove, event);
|
|
26500
27261
|
longPress.onTouchmove?.(event);
|
|
26501
27262
|
},
|
|
26502
27263
|
style: options.disabled ? options.childProps.style : {
|
|
@@ -26552,7 +27313,7 @@ function one$3(slots, name) {
|
|
|
26552
27313
|
if (children.length !== 1) throw new Error(`${name} component children should be a single element or component that accepts ref`);
|
|
26553
27314
|
return children[0];
|
|
26554
27315
|
}
|
|
26555
|
-
function call$
|
|
27316
|
+
function call$3(handler, event) {
|
|
26556
27317
|
if (Array.isArray(handler)) handler.forEach((fn) => fn?.(event));
|
|
26557
27318
|
else handler?.(event);
|
|
26558
27319
|
}
|
|
@@ -26592,7 +27353,7 @@ var PopoverTarget = defineComponent({
|
|
|
26592
27353
|
});
|
|
26593
27354
|
if (!ctx.controlled) forwarded.onClick = (event) => {
|
|
26594
27355
|
ctx.onToggle();
|
|
26595
|
-
call$
|
|
27356
|
+
call$3(childProps.onClick, event);
|
|
26596
27357
|
};
|
|
26597
27358
|
return cloneVNode(child, forwarded, true);
|
|
26598
27359
|
};
|
|
@@ -26668,7 +27429,7 @@ var PopoverDropdown = defineComponent({
|
|
|
26668
27429
|
"data-position": ctx.placement,
|
|
26669
27430
|
"data-fixed": ctx.floatingStrategy === "fixed" || void 0,
|
|
26670
27431
|
onKeydownCapture: (event) => {
|
|
26671
|
-
call$
|
|
27432
|
+
call$3(attrs.onKeydownCapture, event);
|
|
26672
27433
|
if (event.key === "Escape" && ctx.closeOnEscape) {
|
|
26673
27434
|
ctx.onClose();
|
|
26674
27435
|
ctx.onDismiss?.();
|
|
@@ -27504,7 +28265,7 @@ var Tooltip = Object.assign(TooltipBase, {
|
|
|
27504
28265
|
var [provideHoverCardContext, useHoverCardContext] = createSafeContext("HoverCard component was not found in the tree");
|
|
27505
28266
|
//#endregion
|
|
27506
28267
|
//#region src/components/HoverCard/HoverCardDropdown/HoverCardDropdown.ts
|
|
27507
|
-
function call$
|
|
28268
|
+
function call$2(handler, event) {
|
|
27508
28269
|
if (Array.isArray(handler)) handler.forEach((fn) => fn?.(event));
|
|
27509
28270
|
else handler?.(event);
|
|
27510
28271
|
}
|
|
@@ -27516,11 +28277,11 @@ var HoverCardDropdown = defineComponent({
|
|
|
27516
28277
|
return () => h(PopoverDropdown, {
|
|
27517
28278
|
...attrs,
|
|
27518
28279
|
onMouseenter: (event) => {
|
|
27519
|
-
call$
|
|
28280
|
+
call$2(attrs.onMouseenter ?? attrs.onMouseEnter, event);
|
|
27520
28281
|
ctx.openDropdown();
|
|
27521
28282
|
},
|
|
27522
28283
|
onMouseleave: (event) => {
|
|
27523
|
-
call$
|
|
28284
|
+
call$2(attrs.onMouseleave ?? attrs.onMouseLeave, event);
|
|
27524
28285
|
ctx.closeDropdown();
|
|
27525
28286
|
}
|
|
27526
28287
|
}, slots);
|
|
@@ -27723,7 +28484,7 @@ var Menu_module_default = {
|
|
|
27723
28484
|
};
|
|
27724
28485
|
//#endregion
|
|
27725
28486
|
//#region src/components/Menu/Menu.ts
|
|
27726
|
-
function call(handler, event) {
|
|
28487
|
+
function call$1(handler, event) {
|
|
27727
28488
|
if (Array.isArray(handler)) handler.forEach((fn) => fn?.(event));
|
|
27728
28489
|
else handler?.(event);
|
|
27729
28490
|
}
|
|
@@ -27844,6 +28605,9 @@ var MenuBase = defineComponent({
|
|
|
27844
28605
|
get hasSearch() {
|
|
27845
28606
|
return searchCount.value > 0;
|
|
27846
28607
|
},
|
|
28608
|
+
get withInitialFocusPlaceholder() {
|
|
28609
|
+
return props.withInitialFocusPlaceholder;
|
|
28610
|
+
},
|
|
27847
28611
|
registerSearch: () => {
|
|
27848
28612
|
searchCount.value += 1;
|
|
27849
28613
|
return () => {
|
|
@@ -27943,7 +28707,7 @@ var MenuDropdown = defineComponent({
|
|
|
27943
28707
|
onMouseenter: ctx.trigger !== "click" ? ctx.openDropdown : void 0,
|
|
27944
28708
|
onMouseleave: ctx.trigger !== "click" ? ctx.closeDropdown : void 0,
|
|
27945
28709
|
onKeydown: (event) => {
|
|
27946
|
-
call(attrs.onKeydown, event);
|
|
28710
|
+
call$1(attrs.onKeydown, event);
|
|
27947
28711
|
if (event.defaultPrevented || ctx.hasSearch) return;
|
|
27948
28712
|
const root = event.currentTarget;
|
|
27949
28713
|
const active = document.activeElement;
|
|
@@ -27966,7 +28730,13 @@ var MenuDropdown = defineComponent({
|
|
|
27966
28730
|
menuItems(root).find((item) => item.textContent?.trim().toLowerCase().startsWith(query))?.focus();
|
|
27967
28731
|
}
|
|
27968
28732
|
}
|
|
27969
|
-
},
|
|
28733
|
+
}, () => [ctx.withInitialFocusPlaceholder && !ctx.hasSearch ? h("div", {
|
|
28734
|
+
role: "presentation",
|
|
28735
|
+
tabindex: -1,
|
|
28736
|
+
"data-autofocus": true,
|
|
28737
|
+
"data-mantine-stop-propagation": true,
|
|
28738
|
+
style: { outline: 0 }
|
|
28739
|
+
}) : null, slots.default?.()]);
|
|
27970
28740
|
}
|
|
27971
28741
|
});
|
|
27972
28742
|
var MenuItem = defineComponent({
|
|
@@ -28025,7 +28795,7 @@ var MenuItem = defineComponent({
|
|
|
28025
28795
|
}),
|
|
28026
28796
|
onMousedown: (event) => event.preventDefault(),
|
|
28027
28797
|
onClick: (event) => {
|
|
28028
|
-
call(attrs.onClick, event);
|
|
28798
|
+
call$1(attrs.onClick, event);
|
|
28029
28799
|
if (!props.disabled && !attrs["data-disabled"] && (props.closeMenuOnClick ?? ctx.closeOnItemClick)) ctx.closeDropdownImmediately();
|
|
28030
28800
|
}
|
|
28031
28801
|
}, () => [
|
|
@@ -28075,19 +28845,44 @@ var MenuDivider = defineComponent({
|
|
|
28075
28845
|
var MenuSearch = defineComponent({
|
|
28076
28846
|
name: "MenuSearch",
|
|
28077
28847
|
inheritAttrs: false,
|
|
28078
|
-
props: {
|
|
28079
|
-
|
|
28080
|
-
|
|
28081
|
-
|
|
28082
|
-
|
|
28848
|
+
props: {
|
|
28849
|
+
modelValue: {
|
|
28850
|
+
type: String,
|
|
28851
|
+
default: void 0
|
|
28852
|
+
},
|
|
28853
|
+
value: {
|
|
28854
|
+
type: String,
|
|
28855
|
+
default: void 0
|
|
28856
|
+
},
|
|
28857
|
+
defaultValue: {
|
|
28858
|
+
type: String,
|
|
28859
|
+
default: void 0
|
|
28860
|
+
},
|
|
28861
|
+
onChange: {
|
|
28862
|
+
type: Function,
|
|
28863
|
+
default: void 0
|
|
28864
|
+
},
|
|
28865
|
+
clearSearchOnClose: {
|
|
28866
|
+
type: Boolean,
|
|
28867
|
+
default: true
|
|
28868
|
+
}
|
|
28869
|
+
},
|
|
28870
|
+
emits: ["update:modelValue", "change"],
|
|
28871
|
+
setup(props, { attrs, emit }) {
|
|
28083
28872
|
const ctx = useMenuContext();
|
|
28873
|
+
const [value, setValue] = useUncontrolled({
|
|
28874
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
28875
|
+
defaultValue: props.defaultValue,
|
|
28876
|
+
finalValue: "",
|
|
28877
|
+
onChange: (nextValue) => {
|
|
28878
|
+
emit("update:modelValue", nextValue);
|
|
28879
|
+
emit("change", nextValue);
|
|
28880
|
+
}
|
|
28881
|
+
});
|
|
28084
28882
|
const unregister = ctx.registerSearch();
|
|
28085
28883
|
ctx.setSearchExitClear(props.clearSearchOnClose ? () => {
|
|
28086
28884
|
clearActive(document.querySelector("[data-menu-dropdown]"));
|
|
28087
|
-
|
|
28088
|
-
currentTarget: { value: "" },
|
|
28089
|
-
target: { value: "" }
|
|
28090
|
-
});
|
|
28885
|
+
setValue("");
|
|
28091
28886
|
} : null);
|
|
28092
28887
|
onUnmounted(() => {
|
|
28093
28888
|
unregister();
|
|
@@ -28111,6 +28906,7 @@ var MenuSearch = defineComponent({
|
|
|
28111
28906
|
const inputStyles = attrs.styles;
|
|
28112
28907
|
return h(Input, {
|
|
28113
28908
|
...forwarded,
|
|
28909
|
+
value: value.value,
|
|
28114
28910
|
type: "search",
|
|
28115
28911
|
"data-autofocus": "",
|
|
28116
28912
|
"data-mantine-stop-propagation": "",
|
|
@@ -28127,16 +28923,12 @@ var MenuSearch = defineComponent({
|
|
|
28127
28923
|
}
|
|
28128
28924
|
},
|
|
28129
28925
|
onInput: (event) => {
|
|
28130
|
-
call(attrs.onInput, event);
|
|
28131
|
-
|
|
28132
|
-
clearActive(event.currentTarget.closest("[data-menu-dropdown]"));
|
|
28133
|
-
},
|
|
28134
|
-
onChange: (event) => {
|
|
28135
|
-
call(attrs.onChange, event);
|
|
28926
|
+
call$1(attrs.onInput, event);
|
|
28927
|
+
setValue(event.currentTarget.value);
|
|
28136
28928
|
clearActive(event.currentTarget.closest("[data-menu-dropdown]"));
|
|
28137
28929
|
},
|
|
28138
28930
|
onKeydown: (event) => {
|
|
28139
|
-
call(attrs.onKeydown ?? attrs.onKeyDown, event);
|
|
28931
|
+
call$1(attrs.onKeydown ?? attrs.onKeyDown, event);
|
|
28140
28932
|
if (event.defaultPrevented) return;
|
|
28141
28933
|
const root = event.currentTarget.closest("[data-menu-dropdown]");
|
|
28142
28934
|
const items = menuItems(root);
|
|
@@ -28409,13 +29201,13 @@ var MenuSubTarget = defineComponent({
|
|
|
28409
29201
|
const childProps = child.props ?? {};
|
|
28410
29202
|
return cloneVNode(child, {
|
|
28411
29203
|
onClick: (event) => {
|
|
28412
|
-
call(childProps.onClick, event);
|
|
29204
|
+
call$1(childProps.onClick, event);
|
|
28413
29205
|
ctx.toggleDropdown();
|
|
28414
29206
|
},
|
|
28415
29207
|
onMouseenter: ctx.openDropdown,
|
|
28416
29208
|
onMouseleave: ctx.closeDropdown,
|
|
28417
29209
|
onKeydown: (event) => {
|
|
28418
|
-
call(childProps.onKeydown ?? childProps.onKeyDown, event);
|
|
29210
|
+
call$1(childProps.onKeydown ?? childProps.onKeyDown, event);
|
|
28419
29211
|
if (event.defaultPrevented) return;
|
|
28420
29212
|
if (event.key === "ArrowRight") {
|
|
28421
29213
|
event.preventDefault();
|
|
@@ -28435,7 +29227,7 @@ var MenuSubDropdown = defineComponent({
|
|
|
28435
29227
|
return () => h(MenuDropdown, {
|
|
28436
29228
|
...attrs,
|
|
28437
29229
|
onKeydown: (event) => {
|
|
28438
|
-
call(attrs.onKeydown, event);
|
|
29230
|
+
call$1(attrs.onKeydown, event);
|
|
28439
29231
|
if (event.defaultPrevented) return;
|
|
28440
29232
|
const currentDropdown = event.currentTarget;
|
|
28441
29233
|
const focused = event.target;
|
|
@@ -29533,6 +30325,18 @@ var ComboboxSearch = defineComponent({
|
|
|
29533
30325
|
name: "ComboboxSearch",
|
|
29534
30326
|
inheritAttrs: false,
|
|
29535
30327
|
props: {
|
|
30328
|
+
modelValue: {
|
|
30329
|
+
type: String,
|
|
30330
|
+
default: void 0
|
|
30331
|
+
},
|
|
30332
|
+
value: {
|
|
30333
|
+
type: String,
|
|
30334
|
+
default: void 0
|
|
30335
|
+
},
|
|
30336
|
+
defaultValue: {
|
|
30337
|
+
type: String,
|
|
30338
|
+
default: void 0
|
|
30339
|
+
},
|
|
29536
30340
|
withAriaAttributes: {
|
|
29537
30341
|
type: Boolean,
|
|
29538
30342
|
default: true
|
|
@@ -29543,7 +30347,8 @@ var ComboboxSearch = defineComponent({
|
|
|
29543
30347
|
},
|
|
29544
30348
|
size: String
|
|
29545
30349
|
},
|
|
29546
|
-
|
|
30350
|
+
emits: ["update:modelValue", "change"],
|
|
30351
|
+
setup(props, { attrs, emit }) {
|
|
29547
30352
|
const ctx = useComboboxContext();
|
|
29548
30353
|
const targetProps = useComboboxTargetProps({
|
|
29549
30354
|
targetType: "input",
|
|
@@ -29556,6 +30361,11 @@ var ComboboxSearch = defineComponent({
|
|
|
29556
30361
|
});
|
|
29557
30362
|
return () => h(Input, {
|
|
29558
30363
|
...attrs,
|
|
30364
|
+
modelValue: props.modelValue,
|
|
30365
|
+
value: props.value,
|
|
30366
|
+
defaultValue: props.defaultValue,
|
|
30367
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", value),
|
|
30368
|
+
onChange: (value) => emit("change", value),
|
|
29559
30369
|
...targetProps,
|
|
29560
30370
|
ref: (node) => {
|
|
29561
30371
|
const element = node?.$el?.querySelector?.("input") ?? node?.$el ?? node;
|
|
@@ -29917,7 +30727,8 @@ var OptionsDropdown = defineComponent({
|
|
|
29917
30727
|
return () => {
|
|
29918
30728
|
validateOptions(props.data);
|
|
29919
30729
|
const renderOption = props.renderOption ?? (slots.renderOption ? (input) => slots.renderOption(input) : void 0);
|
|
29920
|
-
const
|
|
30730
|
+
const nothingFoundSlot = slots.nothingFoundMessage ?? slots.nothingFound;
|
|
30731
|
+
const nothingFound = props.nothingFoundMessage ?? (nothingFoundSlot ? nothingFoundSlot() : void 0);
|
|
29921
30732
|
const data = typeof props.search === "string" ? (props.filter || defaultOptionsFilter)({
|
|
29922
30733
|
options: props.data,
|
|
29923
30734
|
search: props.filterOptions ? props.search : "",
|
|
@@ -30093,6 +30904,10 @@ var ComboboxPopoverBase = defineComponent({
|
|
|
30093
30904
|
type: Boolean,
|
|
30094
30905
|
default: void 0
|
|
30095
30906
|
},
|
|
30907
|
+
modelValue: {
|
|
30908
|
+
type: null,
|
|
30909
|
+
default: void 0
|
|
30910
|
+
},
|
|
30096
30911
|
value: {
|
|
30097
30912
|
type: null,
|
|
30098
30913
|
default: void 0
|
|
@@ -30230,7 +31045,8 @@ var ComboboxPopoverBase = defineComponent({
|
|
|
30230
31045
|
default: false
|
|
30231
31046
|
}
|
|
30232
31047
|
},
|
|
30233
|
-
|
|
31048
|
+
emits: ["update:modelValue", "change"],
|
|
31049
|
+
setup(rawProps, { attrs, slots, emit }) {
|
|
30234
31050
|
const props = new Proxy(rawProps, { get(target, key) {
|
|
30235
31051
|
const value = target[key];
|
|
30236
31052
|
return value === void 0 && key in defaultProps$2 ? defaultProps$2[key] : value;
|
|
@@ -30238,10 +31054,13 @@ var ComboboxPopoverBase = defineComponent({
|
|
|
30238
31054
|
const parsedData = computed(() => getParsedComboboxData(props.data));
|
|
30239
31055
|
const optionsLockup = computed(() => getOptionsLockup(parsedData.value));
|
|
30240
31056
|
const [_value, setValue] = useUncontrolled({
|
|
30241
|
-
value: () => props.value,
|
|
31057
|
+
value: () => props.modelValue !== void 0 ? props.modelValue : props.value,
|
|
30242
31058
|
defaultValue: props.defaultValue,
|
|
30243
31059
|
finalValue: props.multiple ? [] : null,
|
|
30244
|
-
onChange: (
|
|
31060
|
+
onChange: (value) => {
|
|
31061
|
+
emit("update:modelValue", value);
|
|
31062
|
+
emit("change", value);
|
|
31063
|
+
}
|
|
30245
31064
|
});
|
|
30246
31065
|
const [_searchValue, setSearchValue] = useUncontrolled({
|
|
30247
31066
|
value: () => props.searchValue,
|
|
@@ -30281,8 +31100,8 @@ var ComboboxPopoverBase = defineComponent({
|
|
|
30281
31100
|
}
|
|
30282
31101
|
if (props.searchable) handleSearchChange("");
|
|
30283
31102
|
};
|
|
30284
|
-
const resolveRenderOption = () => props.renderOption ?? (slots.option ? (input) => slots.option(input) : void 0);
|
|
30285
|
-
const resolveNothingFound = () => resolveNode(props.nothingFoundMessage, slots.nothingFound);
|
|
31103
|
+
const resolveRenderOption = () => props.renderOption ?? (slots.renderOption ?? slots.option ? (input) => (slots.renderOption ?? slots.option)(input) : void 0);
|
|
31104
|
+
const resolveNothingFound = () => resolveNode(props.nothingFoundMessage, slots.nothingFoundMessage ?? slots.nothingFound);
|
|
30286
31105
|
const renderSearchableDropdown = () => {
|
|
30287
31106
|
const filteredData = (props.filter || defaultOptionsFilter)({
|
|
30288
31107
|
options: parsedData.value,
|
|
@@ -30992,7 +31811,11 @@ var Select = defineComponent({
|
|
|
30992
31811
|
default: void 0
|
|
30993
31812
|
}
|
|
30994
31813
|
},
|
|
30995
|
-
emits: [
|
|
31814
|
+
emits: [
|
|
31815
|
+
"update:modelValue",
|
|
31816
|
+
"update:searchValue",
|
|
31817
|
+
"change"
|
|
31818
|
+
],
|
|
30996
31819
|
setup(props, { attrs, emit, slots }) {
|
|
30997
31820
|
const parsed = computed(() => getParsedComboboxData(props.data));
|
|
30998
31821
|
const lockup = computed(() => getOptionsLockup(parsed.value));
|
|
@@ -31012,8 +31835,8 @@ var Select = defineComponent({
|
|
|
31012
31835
|
};
|
|
31013
31836
|
const changeValue = (value, option) => {
|
|
31014
31837
|
if (!controlled()) internal.value = value;
|
|
31015
|
-
props.onChange?.(value, option);
|
|
31016
31838
|
emit("update:modelValue", value);
|
|
31839
|
+
emit("change", value, option);
|
|
31017
31840
|
};
|
|
31018
31841
|
const combobox = useCombobox({
|
|
31019
31842
|
opened: () => props.dropdownOpened,
|
|
@@ -31134,7 +31957,7 @@ var Select = defineComponent({
|
|
|
31134
31957
|
scrollAreaProps: props.scrollAreaProps
|
|
31135
31958
|
}, {
|
|
31136
31959
|
renderOption: slots.renderOption,
|
|
31137
|
-
nothingFound: slots.nothingFound
|
|
31960
|
+
nothingFound: slots.nothingFoundMessage ?? slots.nothingFound
|
|
31138
31961
|
})]), h(Combobox.HiddenInput, {
|
|
31139
31962
|
value: current(),
|
|
31140
31963
|
name: attrs.name,
|
|
@@ -31201,15 +32024,18 @@ var Autocomplete = defineComponent({
|
|
|
31201
32024
|
default: true
|
|
31202
32025
|
}
|
|
31203
32026
|
},
|
|
31204
|
-
emits: {
|
|
32027
|
+
emits: {
|
|
32028
|
+
"update:modelValue": (value) => typeof value === "string",
|
|
32029
|
+
change: (value) => typeof value === "string"
|
|
32030
|
+
},
|
|
31205
32031
|
setup(props, { attrs, emit, slots }) {
|
|
31206
32032
|
const internal = ref(props.defaultValue);
|
|
31207
32033
|
const current = () => props.modelValue ?? props.value ?? internal.value;
|
|
31208
32034
|
const controlled = () => props.modelValue !== void 0 || props.value !== void 0;
|
|
31209
32035
|
const change = (value) => {
|
|
31210
32036
|
if (!controlled()) internal.value = value;
|
|
31211
|
-
props.onChange?.(value);
|
|
31212
32037
|
emit("update:modelValue", value);
|
|
32038
|
+
emit("change", value);
|
|
31213
32039
|
combobox.resetSelectedOption();
|
|
31214
32040
|
};
|
|
31215
32041
|
const parsed = computed(() => getParsedComboboxData(props.data));
|
|
@@ -31396,7 +32222,11 @@ var MultiSelect = defineComponent({
|
|
|
31396
32222
|
},
|
|
31397
32223
|
selectFirstOptionOnDropdownOpen: Boolean
|
|
31398
32224
|
},
|
|
31399
|
-
emits: [
|
|
32225
|
+
emits: [
|
|
32226
|
+
"update:modelValue",
|
|
32227
|
+
"update:searchValue",
|
|
32228
|
+
"change"
|
|
32229
|
+
],
|
|
31400
32230
|
setup(props, { attrs, emit, slots }) {
|
|
31401
32231
|
const parsed = computed(() => getParsedComboboxData(props.data));
|
|
31402
32232
|
const lockup = computed(() => getOptionsLockup(parsed.value));
|
|
@@ -31414,8 +32244,8 @@ var MultiSelect = defineComponent({
|
|
|
31414
32244
|
};
|
|
31415
32245
|
const setValue = (value) => {
|
|
31416
32246
|
if (!controlled()) internal.value = value;
|
|
31417
|
-
props.onChange?.(value);
|
|
31418
32247
|
emit("update:modelValue", value);
|
|
32248
|
+
emit("change", value);
|
|
31419
32249
|
};
|
|
31420
32250
|
const combobox = useCombobox({
|
|
31421
32251
|
opened: () => props.dropdownOpened,
|
|
@@ -31496,12 +32326,13 @@ var MultiSelect = defineComponent({
|
|
|
31496
32326
|
label: String(item)
|
|
31497
32327
|
};
|
|
31498
32328
|
const onRemove = () => remove(item);
|
|
31499
|
-
|
|
32329
|
+
const renderPillInput = {
|
|
31500
32330
|
option,
|
|
31501
32331
|
value: item,
|
|
31502
32332
|
onRemove,
|
|
31503
32333
|
disabled
|
|
31504
|
-
}
|
|
32334
|
+
};
|
|
32335
|
+
return props.renderPill ? props.renderPill(renderPillInput) : slots.renderPill ? slots.renderPill(renderPillInput) : h(Pill, {
|
|
31505
32336
|
key: `${String(item)}-${index}`,
|
|
31506
32337
|
withRemoveButton: !readOnly && !option.disabled,
|
|
31507
32338
|
disabled,
|
|
@@ -31540,7 +32371,7 @@ var MultiSelect = defineComponent({
|
|
|
31540
32371
|
filter: props.filter,
|
|
31541
32372
|
limit: props.limit,
|
|
31542
32373
|
filterOptions: props.searchable,
|
|
31543
|
-
hiddenWhenEmpty: props.nothingFoundMessage == null && !slots.nothingFound,
|
|
32374
|
+
hiddenWhenEmpty: props.nothingFoundMessage == null && !slots.nothingFoundMessage && !slots.nothingFound,
|
|
31544
32375
|
nothingFoundMessage: props.nothingFoundMessage,
|
|
31545
32376
|
value: values,
|
|
31546
32377
|
withCheckIcon: props.withCheckIcon,
|
|
@@ -31552,7 +32383,7 @@ var MultiSelect = defineComponent({
|
|
|
31552
32383
|
scrollAreaProps: props.scrollAreaProps
|
|
31553
32384
|
}, {
|
|
31554
32385
|
renderOption: slots.renderOption,
|
|
31555
|
-
nothingFound: slots.nothingFound
|
|
32386
|
+
nothingFound: slots.nothingFoundMessage ?? slots.nothingFound
|
|
31556
32387
|
})]), h(Combobox.HiddenInput, {
|
|
31557
32388
|
value: values,
|
|
31558
32389
|
valuesDivider: props.hiddenInputValuesDivider,
|
|
@@ -31654,7 +32485,11 @@ var TagsInput = defineComponent({
|
|
|
31654
32485
|
},
|
|
31655
32486
|
selectFirstOptionOnDropdownOpen: Boolean
|
|
31656
32487
|
},
|
|
31657
|
-
emits: [
|
|
32488
|
+
emits: [
|
|
32489
|
+
"update:modelValue",
|
|
32490
|
+
"update:searchValue",
|
|
32491
|
+
"change"
|
|
32492
|
+
],
|
|
31658
32493
|
setup(props, { attrs, emit, slots }) {
|
|
31659
32494
|
const parsed = computed(() => getParsedComboboxData(props.data));
|
|
31660
32495
|
const lockup = computed(() => getOptionsLockup(parsed.value));
|
|
@@ -31671,8 +32506,8 @@ var TagsInput = defineComponent({
|
|
|
31671
32506
|
};
|
|
31672
32507
|
const setValue = (value) => {
|
|
31673
32508
|
if (!controlled()) internal.value = value;
|
|
31674
|
-
props.onChange?.(value);
|
|
31675
32509
|
emit("update:modelValue", value);
|
|
32510
|
+
emit("change", value);
|
|
31676
32511
|
};
|
|
31677
32512
|
const combobox = useCombobox({
|
|
31678
32513
|
opened: () => props.dropdownOpened,
|
|
@@ -31771,17 +32606,17 @@ var TagsInput = defineComponent({
|
|
|
31771
32606
|
rightSection: slots.rightSection,
|
|
31772
32607
|
default: () => h(Pill.Group, null, () => [...current.map((item, index) => {
|
|
31773
32608
|
const onRemove = () => removeAt(index);
|
|
31774
|
-
const
|
|
31775
|
-
|
|
31776
|
-
|
|
31777
|
-
|
|
31778
|
-
|
|
31779
|
-
|
|
31780
|
-
option,
|
|
32609
|
+
const renderPillInput = {
|
|
32610
|
+
option: lockup.value[item] ?? {
|
|
32611
|
+
value: item,
|
|
32612
|
+
label: item,
|
|
32613
|
+
disabled: false
|
|
32614
|
+
},
|
|
31781
32615
|
value: item,
|
|
31782
32616
|
onRemove,
|
|
31783
32617
|
disabled
|
|
31784
|
-
}
|
|
32618
|
+
};
|
|
32619
|
+
return props.renderPill ? props.renderPill(renderPillInput) : slots.renderPill ? slots.renderPill(renderPillInput) : h(Pill, {
|
|
31785
32620
|
key: `${item}-${index}`,
|
|
31786
32621
|
withRemoveButton: !readOnly,
|
|
31787
32622
|
disabled,
|
|
@@ -31832,7 +32667,7 @@ var TagsInput = defineComponent({
|
|
|
31832
32667
|
search: search(),
|
|
31833
32668
|
filter: props.filter,
|
|
31834
32669
|
limit: props.limit,
|
|
31835
|
-
hiddenWhenEmpty: props.nothingFoundMessage == null && !slots.nothingFound,
|
|
32670
|
+
hiddenWhenEmpty: props.nothingFoundMessage == null && !slots.nothingFoundMessage && !slots.nothingFound,
|
|
31836
32671
|
nothingFoundMessage: props.nothingFoundMessage,
|
|
31837
32672
|
withScrollArea: props.withScrollArea,
|
|
31838
32673
|
maxDropdownHeight: props.maxDropdownHeight,
|
|
@@ -31840,7 +32675,7 @@ var TagsInput = defineComponent({
|
|
|
31840
32675
|
scrollAreaProps: props.scrollAreaProps
|
|
31841
32676
|
}, {
|
|
31842
32677
|
renderOption: slots.renderOption,
|
|
31843
|
-
nothingFound: slots.nothingFound
|
|
32678
|
+
nothingFound: slots.nothingFoundMessage ?? slots.nothingFound
|
|
31844
32679
|
})]), h(Combobox.HiddenInput, {
|
|
31845
32680
|
value: current,
|
|
31846
32681
|
valuesDivider: props.hiddenInputValuesDivider,
|
|
@@ -31902,6 +32737,7 @@ var ColorInput_module_default = {
|
|
|
31902
32737
|
var ColorInput = defineComponent({
|
|
31903
32738
|
name: "ColorInput",
|
|
31904
32739
|
inheritAttrs: false,
|
|
32740
|
+
slots: Object,
|
|
31905
32741
|
props: {
|
|
31906
32742
|
modelValue: String,
|
|
31907
32743
|
value: String,
|
|
@@ -31945,7 +32781,7 @@ var ColorInput = defineComponent({
|
|
|
31945
32781
|
default: 7
|
|
31946
32782
|
}
|
|
31947
32783
|
},
|
|
31948
|
-
emits: ["update:modelValue"],
|
|
32784
|
+
emits: ["update:modelValue", "change"],
|
|
31949
32785
|
setup(props, { attrs, emit, slots }) {
|
|
31950
32786
|
const internal = ref(props.defaultValue);
|
|
31951
32787
|
const current = () => props.modelValue ?? props.value ?? internal.value;
|
|
@@ -31954,8 +32790,8 @@ var ColorInput = defineComponent({
|
|
|
31954
32790
|
const lastValid = ref(isColorValid(current()) ? current() : "");
|
|
31955
32791
|
const setValue = (value, end = false) => {
|
|
31956
32792
|
if (!controlled()) internal.value = value;
|
|
31957
|
-
props.onChange?.(value);
|
|
31958
32793
|
emit("update:modelValue", value);
|
|
32794
|
+
emit("change", value);
|
|
31959
32795
|
if (isColorValid(value)) {
|
|
31960
32796
|
lastValid.value = value;
|
|
31961
32797
|
if (end) props.onChangeEnd?.(convertHsvaTo(props.format, parseColor(value)));
|
|
@@ -31996,7 +32832,7 @@ var ColorInput = defineComponent({
|
|
|
31996
32832
|
class: ColorInput_module_default.eyeDropperButton,
|
|
31997
32833
|
"aria-label": "Pick color from screen",
|
|
31998
32834
|
onClick: useEyeDropper
|
|
31999
|
-
}, () => props.eyeDropperIcon ?? h(EyeDropperIcon, { class: ColorInput_module_default.eyeDropperIcon })) : void 0;
|
|
32835
|
+
}, () => resolveNode(props.eyeDropperIcon, slots.eyeDropperIcon) ?? h(EyeDropperIcon, { class: ColorInput_module_default.eyeDropperIcon })) : void 0;
|
|
32000
32836
|
return h(Popover, {
|
|
32001
32837
|
position: "bottom-start",
|
|
32002
32838
|
offset: 5,
|
|
@@ -32079,7 +32915,7 @@ function flattenTo(acc, data, expandedSet, parent, level, parentGuides) {
|
|
|
32079
32915
|
for (let i = 0; i < data.length; i++) {
|
|
32080
32916
|
const node = data[i];
|
|
32081
32917
|
const isLast = i === data.length - 1;
|
|
32082
|
-
const hasLoadedChildren = Array.isArray(node.children);
|
|
32918
|
+
const hasLoadedChildren = Array.isArray(node.children) && node.children.length > 0;
|
|
32083
32919
|
const hasAsyncChildren = !!node.hasChildren && !hasLoadedChildren;
|
|
32084
32920
|
const hasChildren = hasLoadedChildren || hasAsyncChildren;
|
|
32085
32921
|
const expanded = expandedSet.has(node.value);
|
|
@@ -32192,6 +33028,11 @@ var TreeSelectOption = defineComponent({
|
|
|
32192
33028
|
const paddingInlineStart = BASE_PADDING + (props.level - 1) * LEVEL_OFFSET + (props.withLines && props.level > 1 ? LINE_CONTENT_GAP : 0) + (!props.hasChildren ? OPTION_GAP : 0);
|
|
32193
33029
|
const isActive = props.selected || props.checked;
|
|
32194
33030
|
const ariaChecked = props.showCheckbox ? props.indeterminate && !props.checked ? "mixed" : props.checked : void 0;
|
|
33031
|
+
const expand = (event) => {
|
|
33032
|
+
event?.preventDefault();
|
|
33033
|
+
event?.stopPropagation();
|
|
33034
|
+
if (props.hasChildren) props.onToggleExpand?.(props.node.value);
|
|
33035
|
+
};
|
|
32195
33036
|
const payload = {
|
|
32196
33037
|
node: props.node,
|
|
32197
33038
|
level: props.level,
|
|
@@ -32199,7 +33040,8 @@ var TreeSelectOption = defineComponent({
|
|
|
32199
33040
|
hasChildren: props.hasChildren,
|
|
32200
33041
|
selected: props.selected,
|
|
32201
33042
|
checked: props.checked,
|
|
32202
|
-
indeterminate: props.indeterminate
|
|
33043
|
+
indeterminate: props.indeterminate,
|
|
33044
|
+
expand
|
|
32203
33045
|
};
|
|
32204
33046
|
const lineElements = props.withLines && props.level > 1 ? [
|
|
32205
33047
|
...props.lineGuides.map((show, g) => show ? h("span", {
|
|
@@ -32242,16 +33084,10 @@ var TreeSelectOption = defineComponent({
|
|
|
32242
33084
|
"aria-label": props.expanded ? props.chevronAriaLabels?.collapse ?? "Collapse" : props.chevronAriaLabels?.expand ?? "Expand",
|
|
32243
33085
|
onMousedown: (event) => event.preventDefault(),
|
|
32244
33086
|
onClick: (event) => {
|
|
32245
|
-
event
|
|
32246
|
-
event.stopPropagation();
|
|
32247
|
-
props.onToggleExpand?.(props.node.value);
|
|
33087
|
+
expand(event);
|
|
32248
33088
|
},
|
|
32249
33089
|
onKeydown: (event) => {
|
|
32250
|
-
if (event.key === "Enter")
|
|
32251
|
-
event.preventDefault();
|
|
32252
|
-
event.stopPropagation();
|
|
32253
|
-
props.onToggleExpand?.(props.node.value);
|
|
32254
|
-
}
|
|
33090
|
+
if (event.key === "Enter") expand(event);
|
|
32255
33091
|
}
|
|
32256
33092
|
}, h(AccordionChevron, { size: "80%" })) : null,
|
|
32257
33093
|
props.showCheckbox ? h(CheckboxIndicator, {
|
|
@@ -32363,15 +33199,19 @@ var TreeSelect = defineComponent({
|
|
|
32363
33199
|
},
|
|
32364
33200
|
chevronAriaLabels: Object
|
|
32365
33201
|
},
|
|
32366
|
-
emits: [
|
|
33202
|
+
emits: [
|
|
33203
|
+
"update:modelValue",
|
|
33204
|
+
"update:searchValue",
|
|
33205
|
+
"change"
|
|
33206
|
+
],
|
|
32367
33207
|
setup(props, { attrs, emit, slots }) {
|
|
32368
33208
|
const isMulti = () => props.mode !== "single";
|
|
32369
33209
|
const internal = ref(props.defaultValue !== void 0 ? props.defaultValue : isMulti() ? [] : null);
|
|
32370
|
-
const current = () => props.modelValue
|
|
33210
|
+
const current = () => props.modelValue !== void 0 ? props.modelValue : props.value !== void 0 ? props.value : internal.value;
|
|
32371
33211
|
const setValue = (value) => {
|
|
32372
33212
|
if (props.modelValue === void 0 && props.value === void 0) internal.value = value;
|
|
32373
|
-
props.onChange?.(value);
|
|
32374
33213
|
emit("update:modelValue", value);
|
|
33214
|
+
emit("change", value);
|
|
32375
33215
|
};
|
|
32376
33216
|
const expandedInternal = ref(props.defaultExpandAll ? allValues(props.data) : props.defaultExpandedValues ?? []);
|
|
32377
33217
|
const expanded = () => props.expandedValues ?? expandedInternal.value;
|
|
@@ -32466,7 +33306,8 @@ var TreeSelect = defineComponent({
|
|
|
32466
33306
|
const multiValues = selectedArray();
|
|
32467
33307
|
const hasValue = isMulti() ? multiValues.length > 0 : current() != null;
|
|
32468
33308
|
const canClear = props.clearable && hasValue && !disabled && !readOnly;
|
|
32469
|
-
const
|
|
33309
|
+
const nothingFoundSlot = slots.nothingFoundMessage ?? slots.nothingFound;
|
|
33310
|
+
const nothingFound = props.nothingFoundMessage ?? (nothingFoundSlot ? nothingFoundSlot() : void 0);
|
|
32470
33311
|
const renderNode = props.renderNode ?? (slots.renderNode ? (payload) => slots.renderNode(payload) : void 0);
|
|
32471
33312
|
const clear = (event) => {
|
|
32472
33313
|
event.stopPropagation();
|
|
@@ -32605,7 +33446,586 @@ Object.assign(TreeSelect, { classes: {
|
|
|
32605
33446
|
...Combobox.classes,
|
|
32606
33447
|
...TreeSelect_module_default
|
|
32607
33448
|
} });
|
|
33449
|
+
var Cascader_module_default = {
|
|
33450
|
+
columnsList: "_columnsList_1xc8g_1",
|
|
33451
|
+
column: "_column_1xc8g_1",
|
|
33452
|
+
columnScroll: "_columnScroll_1xc8g_21",
|
|
33453
|
+
columnsOverflow: "_columnsOverflow_1xc8g_26",
|
|
33454
|
+
columnOption: "_columnOption_1xc8g_78",
|
|
33455
|
+
flatOption: "_flatOption_1xc8g_127",
|
|
33456
|
+
columnOptionLabel: "_columnOptionLabel_1xc8g_134",
|
|
33457
|
+
columnOptionIcon: "_columnOptionIcon_1xc8g_141",
|
|
33458
|
+
columnOptionCheck: "_columnOptionCheck_1xc8g_160",
|
|
33459
|
+
columnEmpty: "_columnEmpty_1xc8g_172"
|
|
33460
|
+
};
|
|
33461
|
+
//#endregion
|
|
33462
|
+
//#region src/components/Cascader/cascader-utils.ts
|
|
33463
|
+
function cascaderOptionHasChildren(option) {
|
|
33464
|
+
return Array.isArray(option.children) && option.children.length > 0;
|
|
33465
|
+
}
|
|
33466
|
+
function getCascaderColumns(data, activePath) {
|
|
33467
|
+
const columns = [data];
|
|
33468
|
+
let level = data;
|
|
33469
|
+
for (let index = 0; index < activePath.length; index++) {
|
|
33470
|
+
const node = level.find((option) => option.value === activePath[index]);
|
|
33471
|
+
if (!node) break;
|
|
33472
|
+
if (cascaderOptionHasChildren(node) && index < activePath.length - 1) {
|
|
33473
|
+
columns.push(node.children);
|
|
33474
|
+
level = node.children;
|
|
33475
|
+
} else break;
|
|
33476
|
+
}
|
|
33477
|
+
return columns;
|
|
33478
|
+
}
|
|
33479
|
+
function getCascaderPathOptions(data, value) {
|
|
33480
|
+
if (!value?.length) return [];
|
|
33481
|
+
const result = [];
|
|
33482
|
+
let level = data;
|
|
33483
|
+
for (const current of value) {
|
|
33484
|
+
const option = level?.find((item) => item.value === current);
|
|
33485
|
+
if (!option) break;
|
|
33486
|
+
result.push(option);
|
|
33487
|
+
level = option.children;
|
|
33488
|
+
}
|
|
33489
|
+
return result;
|
|
33490
|
+
}
|
|
33491
|
+
function flattenCascaderPaths(data) {
|
|
33492
|
+
const result = [];
|
|
33493
|
+
const walk = (nodes, parentPath, parentOptions, parentDisabled) => {
|
|
33494
|
+
nodes.forEach((node) => {
|
|
33495
|
+
const path = [...parentPath, node.value];
|
|
33496
|
+
const options = [...parentOptions, node];
|
|
33497
|
+
const disabled = parentDisabled || !!node.disabled;
|
|
33498
|
+
const leaf = !cascaderOptionHasChildren(node);
|
|
33499
|
+
result.push({
|
|
33500
|
+
path,
|
|
33501
|
+
options,
|
|
33502
|
+
leaf,
|
|
33503
|
+
disabled
|
|
33504
|
+
});
|
|
33505
|
+
if (!leaf) walk(node.children, path, options, disabled);
|
|
33506
|
+
});
|
|
33507
|
+
};
|
|
33508
|
+
walk(data, [], [], false);
|
|
33509
|
+
return result;
|
|
33510
|
+
}
|
|
33511
|
+
//#endregion
|
|
33512
|
+
//#region src/components/Cascader/Cascader.ts
|
|
33513
|
+
var optionLabelToString = (option) => typeof option.label === "string" || typeof option.label === "number" ? String(option.label) : option.value;
|
|
33514
|
+
var pathsEqual = (first, second) => !!first && !!second && first.length === second.length && first.every((item, index) => item === second[index]);
|
|
33515
|
+
var findEnabledIndex = (options, from, direction) => {
|
|
33516
|
+
let index = from + direction;
|
|
33517
|
+
while (index >= 0 && index < options.length) {
|
|
33518
|
+
if (!options[index].disabled) return index;
|
|
33519
|
+
index += direction;
|
|
33520
|
+
}
|
|
33521
|
+
return -1;
|
|
33522
|
+
};
|
|
33523
|
+
var call = (handler, event) => {
|
|
33524
|
+
if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
|
|
33525
|
+
else if (typeof handler === "function") handler(event);
|
|
33526
|
+
};
|
|
33527
|
+
var Cascader = defineComponent({
|
|
33528
|
+
name: "Cascader",
|
|
33529
|
+
inheritAttrs: false,
|
|
33530
|
+
slots: Object,
|
|
33531
|
+
props: {
|
|
33532
|
+
data: {
|
|
33533
|
+
type: Array,
|
|
33534
|
+
required: true
|
|
33535
|
+
},
|
|
33536
|
+
modelValue: Array,
|
|
33537
|
+
value: Array,
|
|
33538
|
+
defaultValue: Array,
|
|
33539
|
+
onChange: Function,
|
|
33540
|
+
changeOnSelect: Boolean,
|
|
33541
|
+
closeOnSelect: {
|
|
33542
|
+
type: Boolean,
|
|
33543
|
+
default: void 0
|
|
33544
|
+
},
|
|
33545
|
+
allowDeselect: {
|
|
33546
|
+
type: Boolean,
|
|
33547
|
+
default: true
|
|
33548
|
+
},
|
|
33549
|
+
withCheckIcon: {
|
|
33550
|
+
type: Boolean,
|
|
33551
|
+
default: true
|
|
33552
|
+
},
|
|
33553
|
+
checkIconPosition: {
|
|
33554
|
+
type: String,
|
|
33555
|
+
default: "right"
|
|
33556
|
+
},
|
|
33557
|
+
withColumns: {
|
|
33558
|
+
type: Boolean,
|
|
33559
|
+
default: true
|
|
33560
|
+
},
|
|
33561
|
+
expandTrigger: {
|
|
33562
|
+
type: String,
|
|
33563
|
+
default: "click"
|
|
33564
|
+
},
|
|
33565
|
+
searchable: Boolean,
|
|
33566
|
+
searchValue: String,
|
|
33567
|
+
defaultSearchValue: String,
|
|
33568
|
+
onSearchChange: Function,
|
|
33569
|
+
filter: Function,
|
|
33570
|
+
renderSearchOption: Function,
|
|
33571
|
+
formatValue: Function,
|
|
33572
|
+
renderOption: Function,
|
|
33573
|
+
separator: {
|
|
33574
|
+
type: null,
|
|
33575
|
+
default: void 0
|
|
33576
|
+
},
|
|
33577
|
+
columnWidth: {
|
|
33578
|
+
type: [Number, String],
|
|
33579
|
+
default: 200
|
|
33580
|
+
},
|
|
33581
|
+
maxDisplayedLevels: {
|
|
33582
|
+
type: Number,
|
|
33583
|
+
default: 3
|
|
33584
|
+
},
|
|
33585
|
+
previousLevelsControlLabel: {
|
|
33586
|
+
type: String,
|
|
33587
|
+
default: "Show previous levels"
|
|
33588
|
+
},
|
|
33589
|
+
nextLevelsControlLabel: {
|
|
33590
|
+
type: String,
|
|
33591
|
+
default: "Show next levels"
|
|
33592
|
+
},
|
|
33593
|
+
maxDropdownHeight: {
|
|
33594
|
+
type: [Number, String],
|
|
33595
|
+
default: 260
|
|
33596
|
+
},
|
|
33597
|
+
nothingFoundMessage: {
|
|
33598
|
+
type: null,
|
|
33599
|
+
default: void 0
|
|
33600
|
+
},
|
|
33601
|
+
clearable: Boolean,
|
|
33602
|
+
clearSectionMode: {
|
|
33603
|
+
type: String,
|
|
33604
|
+
default: "both"
|
|
33605
|
+
},
|
|
33606
|
+
clearButtonProps: Object,
|
|
33607
|
+
onClear: Function,
|
|
33608
|
+
dropdownOpened: {
|
|
33609
|
+
type: Boolean,
|
|
33610
|
+
default: void 0
|
|
33611
|
+
},
|
|
33612
|
+
defaultDropdownOpened: Boolean,
|
|
33613
|
+
onDropdownOpen: Function,
|
|
33614
|
+
onDropdownClose: Function,
|
|
33615
|
+
comboboxProps: Object,
|
|
33616
|
+
scrollAreaProps: Object,
|
|
33617
|
+
chevronColor: String,
|
|
33618
|
+
hiddenInputProps: Object,
|
|
33619
|
+
openOnFocus: {
|
|
33620
|
+
type: Boolean,
|
|
33621
|
+
default: true
|
|
33622
|
+
},
|
|
33623
|
+
readOnly: Boolean,
|
|
33624
|
+
disabled: Boolean,
|
|
33625
|
+
size: {
|
|
33626
|
+
type: [String, Number],
|
|
33627
|
+
default: "sm"
|
|
33628
|
+
},
|
|
33629
|
+
classNames: [Object, Function],
|
|
33630
|
+
styles: [Object, Function],
|
|
33631
|
+
unstyled: Boolean
|
|
33632
|
+
},
|
|
33633
|
+
emits: [
|
|
33634
|
+
"update:modelValue",
|
|
33635
|
+
"update:searchValue",
|
|
33636
|
+
"change"
|
|
33637
|
+
],
|
|
33638
|
+
setup(props, { attrs, emit, slots }) {
|
|
33639
|
+
const id = useId(attrs.id);
|
|
33640
|
+
const internalValue = ref(props.defaultValue ?? null);
|
|
33641
|
+
const currentValue = computed(() => props.modelValue !== void 0 ? props.modelValue : props.value !== void 0 ? props.value : internalValue.value);
|
|
33642
|
+
const pathOptions = computed(() => getCascaderPathOptions(props.data, currentValue.value));
|
|
33643
|
+
const separatorString = computed(() => typeof props.separator === "string" || typeof props.separator === "number" ? String(props.separator) : "/");
|
|
33644
|
+
const separatorContent = () => resolveNode(props.separator, slots.separator) ?? "/";
|
|
33645
|
+
const nothingFoundContent = () => resolveNode(props.nothingFoundMessage, slots.nothingFoundMessage ?? slots.nothingFound);
|
|
33646
|
+
const displayString = computed(() => {
|
|
33647
|
+
if (!currentValue.value || pathOptions.value.length === 0) return "";
|
|
33648
|
+
const formatted = props.formatValue?.({
|
|
33649
|
+
value: currentValue.value,
|
|
33650
|
+
options: pathOptions.value
|
|
33651
|
+
});
|
|
33652
|
+
if (typeof formatted === "string" || typeof formatted === "number") return String(formatted);
|
|
33653
|
+
return pathOptions.value.map(optionLabelToString).join(` ${separatorString.value} `);
|
|
33654
|
+
});
|
|
33655
|
+
const internalSearch = ref(props.defaultSearchValue ?? (props.searchable && props.defaultValue ? getCascaderPathOptions(props.data, props.defaultValue).map(optionLabelToString).join(` ${separatorString.value} `) : ""));
|
|
33656
|
+
const search = computed(() => props.searchValue ?? internalSearch.value);
|
|
33657
|
+
const activePath = ref(currentValue.value ? [...currentValue.value] : []);
|
|
33658
|
+
const keyboardNav = ref(false);
|
|
33659
|
+
const windowOffset = ref(0);
|
|
33660
|
+
const canInteract = computed(() => !props.readOnly && !props.disabled);
|
|
33661
|
+
const shouldCloseOnSelect = computed(() => props.closeOnSelect ?? !props.allowDeselect);
|
|
33662
|
+
const setSearch = (value) => {
|
|
33663
|
+
if (props.searchValue === void 0) internalSearch.value = value;
|
|
33664
|
+
props.onSearchChange?.(value);
|
|
33665
|
+
emit("update:searchValue", value);
|
|
33666
|
+
};
|
|
33667
|
+
const setValue = (value) => {
|
|
33668
|
+
if (props.modelValue === void 0 && props.value === void 0) internalValue.value = value;
|
|
33669
|
+
const selectedOptions = getCascaderPathOptions(props.data, value);
|
|
33670
|
+
emit("update:modelValue", value);
|
|
33671
|
+
emit("change", value, selectedOptions);
|
|
33672
|
+
};
|
|
33673
|
+
const resetActivePath = () => {
|
|
33674
|
+
activePath.value = currentValue.value ? [...currentValue.value] : [];
|
|
33675
|
+
};
|
|
33676
|
+
const combobox = useCombobox({
|
|
33677
|
+
opened: () => props.dropdownOpened,
|
|
33678
|
+
defaultOpened: props.defaultDropdownOpened,
|
|
33679
|
+
onDropdownOpen: () => {
|
|
33680
|
+
props.onDropdownOpen?.();
|
|
33681
|
+
resetActivePath();
|
|
33682
|
+
},
|
|
33683
|
+
onDropdownClose: () => {
|
|
33684
|
+
props.onDropdownClose?.();
|
|
33685
|
+
if (props.searchable) setSearch(currentValue.value ? displayString.value : "");
|
|
33686
|
+
}
|
|
33687
|
+
});
|
|
33688
|
+
watch(currentValue, (value) => {
|
|
33689
|
+
if (props.searchable) setSearch(value ? displayString.value : "");
|
|
33690
|
+
}, { deep: true });
|
|
33691
|
+
watch(activePath, () => windowOffset.value = 0, { deep: true });
|
|
33692
|
+
const selectPath = (path) => {
|
|
33693
|
+
setValue(props.allowDeselect && pathsEqual(currentValue.value, path) ? null : path);
|
|
33694
|
+
};
|
|
33695
|
+
const expandOption = (level, option) => {
|
|
33696
|
+
const optionPath = [...activePath.value.slice(0, level), option.value];
|
|
33697
|
+
if (cascaderOptionHasChildren(option)) {
|
|
33698
|
+
const first = findEnabledIndex(option.children, -1, 1);
|
|
33699
|
+
activePath.value = first >= 0 ? [...optionPath, option.children[first].value] : optionPath;
|
|
33700
|
+
} else activePath.value = optionPath;
|
|
33701
|
+
};
|
|
33702
|
+
const finishSelection = () => {
|
|
33703
|
+
if (shouldCloseOnSelect.value) combobox.closeDropdown("mouse");
|
|
33704
|
+
};
|
|
33705
|
+
const handleOptionClick = (level, option) => {
|
|
33706
|
+
if (option.disabled) return;
|
|
33707
|
+
keyboardNav.value = false;
|
|
33708
|
+
const path = [...activePath.value.slice(0, level), option.value];
|
|
33709
|
+
if (cascaderOptionHasChildren(option)) {
|
|
33710
|
+
if (props.changeOnSelect) {
|
|
33711
|
+
selectPath(path);
|
|
33712
|
+
finishSelection();
|
|
33713
|
+
}
|
|
33714
|
+
expandOption(level, option);
|
|
33715
|
+
} else {
|
|
33716
|
+
selectPath(path);
|
|
33717
|
+
finishSelection();
|
|
33718
|
+
}
|
|
33719
|
+
};
|
|
33720
|
+
const handleOptionMouseEnter = (level, option) => {
|
|
33721
|
+
if (option.disabled) return;
|
|
33722
|
+
keyboardNav.value = false;
|
|
33723
|
+
if (props.expandTrigger !== "hover") return;
|
|
33724
|
+
if (cascaderOptionHasChildren(option)) expandOption(level, option);
|
|
33725
|
+
else activePath.value = [...activePath.value.slice(0, level), option.value];
|
|
33726
|
+
};
|
|
33727
|
+
const flatPaths = computed(() => flattenCascaderPaths(props.data));
|
|
33728
|
+
const isSearching = computed(() => props.searchable && search.value.trim().length > 0 && search.value !== displayString.value);
|
|
33729
|
+
const showFlatList = computed(() => isSearching.value || !props.withColumns);
|
|
33730
|
+
const flatListItems = computed(() => {
|
|
33731
|
+
const base = flatPaths.value.filter((path) => props.changeOnSelect || path.leaf);
|
|
33732
|
+
if (!isSearching.value) return base;
|
|
33733
|
+
return base.filter((path) => props.filter ? props.filter(search.value, path.options) : path.options.map(optionLabelToString).join(` ${separatorString.value} `).toLowerCase().includes(search.value.trim().toLowerCase()));
|
|
33734
|
+
});
|
|
33735
|
+
const renderSearchLabel = (options) => {
|
|
33736
|
+
if (props.renderSearchOption) return props.renderSearchOption(search.value, options);
|
|
33737
|
+
if (slots.renderSearchOption) return slots.renderSearchOption({
|
|
33738
|
+
query: search.value,
|
|
33739
|
+
options
|
|
33740
|
+
});
|
|
33741
|
+
return options.flatMap((option, index) => [index ? h("span", { "data-cascader-separator": true }, [
|
|
33742
|
+
" ",
|
|
33743
|
+
separatorContent(),
|
|
33744
|
+
" "
|
|
33745
|
+
]) : null, option.label ?? option.value]);
|
|
33746
|
+
};
|
|
33747
|
+
const renderFlatList = () => h(Combobox.Options, { "aria-label": typeof attrs.label === "string" ? attrs.label : void 0 }, () => [h(ScrollArea.Autosize, {
|
|
33748
|
+
mah: props.maxDropdownHeight,
|
|
33749
|
+
type: "scroll",
|
|
33750
|
+
scrollbarSize: "var(--combobox-padding)",
|
|
33751
|
+
offsetScrollbars: "y",
|
|
33752
|
+
...props.scrollAreaProps
|
|
33753
|
+
}, () => flatListItems.value.map((item, index) => {
|
|
33754
|
+
const selected = pathsEqual(currentValue.value, item.path);
|
|
33755
|
+
return h(Combobox.Option, {
|
|
33756
|
+
value: index,
|
|
33757
|
+
active: selected,
|
|
33758
|
+
disabled: item.disabled
|
|
33759
|
+
}, () => h("span", { class: Cascader_module_default.flatOption }, [
|
|
33760
|
+
selected && props.withCheckIcon && props.checkIconPosition === "left" ? h(CheckIcon, { class: Cascader_module_default.columnOptionCheck }) : null,
|
|
33761
|
+
h("span", { class: Cascader_module_default.columnOptionLabel }, [renderSearchLabel(item.options)]),
|
|
33762
|
+
selected && props.withCheckIcon && props.checkIconPosition !== "left" ? h(CheckIcon, { class: Cascader_module_default.columnOptionCheck }) : null
|
|
33763
|
+
]));
|
|
33764
|
+
})), flatListItems.value.length === 0 && (props.nothingFoundMessage !== void 0 || slots.nothingFoundMessage || slots.nothingFound) ? h(Combobox.Empty, {}, nothingFoundContent) : null]);
|
|
33765
|
+
const optionId = (level, value) => id.value ? `${id.value}-cascader-list-${level}-${value}` : void 0;
|
|
33766
|
+
const renderColumns = () => {
|
|
33767
|
+
const allColumns = getCascaderColumns(props.data, activePath.value);
|
|
33768
|
+
const totalColumns = allColumns.length;
|
|
33769
|
+
const maxLevels = props.maxDisplayedLevels > 0 ? props.maxDisplayedLevels : totalColumns;
|
|
33770
|
+
const maxOffset = Math.max(0, totalColumns - maxLevels);
|
|
33771
|
+
const clampedOffset = Math.min(windowOffset.value, maxOffset);
|
|
33772
|
+
const windowStart = Math.max(0, maxOffset - clampedOffset);
|
|
33773
|
+
const windowEnd = Math.min(totalColumns, windowStart + maxLevels);
|
|
33774
|
+
const visibleColumns = allColumns.slice(windowStart, windowEnd);
|
|
33775
|
+
const hiddenBefore = windowStart;
|
|
33776
|
+
const hiddenAfter = totalColumns - windowEnd;
|
|
33777
|
+
const focusedLevel = activePath.value.length - 1;
|
|
33778
|
+
const overflowControl = (position) => h(UnstyledButton, {
|
|
33779
|
+
class: Cascader_module_default.columnsOverflow,
|
|
33780
|
+
"data-position": position,
|
|
33781
|
+
tabindex: -1,
|
|
33782
|
+
"aria-label": position === "start" ? props.previousLevelsControlLabel : props.nextLevelsControlLabel,
|
|
33783
|
+
title: position === "start" ? props.previousLevelsControlLabel : props.nextLevelsControlLabel,
|
|
33784
|
+
onMousedown: (event) => event.preventDefault(),
|
|
33785
|
+
onClick: () => {
|
|
33786
|
+
windowOffset.value = position === "start" ? Math.min(maxOffset, windowOffset.value + 1) : Math.max(0, windowOffset.value - 1);
|
|
33787
|
+
}
|
|
33788
|
+
}, () => h(AccordionChevron));
|
|
33789
|
+
return h("div", {
|
|
33790
|
+
class: Cascader_module_default.columnsList,
|
|
33791
|
+
role: "presentation",
|
|
33792
|
+
onMouseleave: () => {
|
|
33793
|
+
if (props.expandTrigger === "hover") resetActivePath();
|
|
33794
|
+
},
|
|
33795
|
+
onMousemove: () => keyboardNav.value = false
|
|
33796
|
+
}, [
|
|
33797
|
+
hiddenBefore > 0 ? overflowControl("start") : null,
|
|
33798
|
+
...visibleColumns.map((options, index) => {
|
|
33799
|
+
const level = windowStart + index;
|
|
33800
|
+
const isLast = index === visibleColumns.length - 1 && hiddenAfter === 0;
|
|
33801
|
+
return h("div", {
|
|
33802
|
+
class: Cascader_module_default.column,
|
|
33803
|
+
"data-last": isLast || void 0,
|
|
33804
|
+
style: {
|
|
33805
|
+
width: typeof props.columnWidth === "number" ? `${props.columnWidth}px` : props.columnWidth,
|
|
33806
|
+
minWidth: typeof props.columnWidth === "number" ? `${props.columnWidth}px` : props.columnWidth
|
|
33807
|
+
}
|
|
33808
|
+
}, [h(ScrollArea.Autosize, {
|
|
33809
|
+
class: Cascader_module_default.columnScroll,
|
|
33810
|
+
mah: props.maxDropdownHeight,
|
|
33811
|
+
type: "scroll",
|
|
33812
|
+
scrollbarSize: "var(--combobox-padding)",
|
|
33813
|
+
role: "listbox",
|
|
33814
|
+
...props.scrollAreaProps
|
|
33815
|
+
}, () => options.length ? options.map((option) => {
|
|
33816
|
+
const active = activePath.value[level] === option.value;
|
|
33817
|
+
const current = active && level === focusedLevel && keyboardNav.value;
|
|
33818
|
+
const inPath = active && level < focusedLevel;
|
|
33819
|
+
const selected = !!currentValue.value && currentValue.value.length === level + 1 && currentValue.value[level] === option.value;
|
|
33820
|
+
return h(UnstyledButton, {
|
|
33821
|
+
id: optionId(level, option.value),
|
|
33822
|
+
class: Cascader_module_default.columnOption,
|
|
33823
|
+
role: "option",
|
|
33824
|
+
tabindex: -1,
|
|
33825
|
+
"aria-selected": current || void 0,
|
|
33826
|
+
"aria-disabled": option.disabled || void 0,
|
|
33827
|
+
"data-active": current || void 0,
|
|
33828
|
+
"data-in-path": inPath || void 0,
|
|
33829
|
+
"data-selected": selected || void 0,
|
|
33830
|
+
"data-disabled": option.disabled || void 0,
|
|
33831
|
+
onMousedown: (event) => event.preventDefault(),
|
|
33832
|
+
onClick: () => handleOptionClick(level, option),
|
|
33833
|
+
onMouseenter: () => handleOptionMouseEnter(level, option)
|
|
33834
|
+
}, () => [
|
|
33835
|
+
selected && props.withCheckIcon && props.checkIconPosition === "left" ? h(CheckIcon, { class: Cascader_module_default.columnOptionCheck }) : null,
|
|
33836
|
+
h("span", { class: Cascader_module_default.columnOptionLabel }, [props.renderOption ? props.renderOption(option, level) : slots.renderOption?.({
|
|
33837
|
+
option,
|
|
33838
|
+
level
|
|
33839
|
+
}) ?? option.label ?? option.value]),
|
|
33840
|
+
selected && props.withCheckIcon && props.checkIconPosition !== "left" ? h(CheckIcon, { class: Cascader_module_default.columnOptionCheck }) : null,
|
|
33841
|
+
cascaderOptionHasChildren(option) ? h("span", { class: Cascader_module_default.columnOptionIcon }, h(AccordionChevron)) : null
|
|
33842
|
+
]);
|
|
33843
|
+
}) : h("div", { class: Cascader_module_default.columnEmpty }, [nothingFoundContent()]))]);
|
|
33844
|
+
}),
|
|
33845
|
+
hiddenAfter > 0 ? overflowControl("end") : null
|
|
33846
|
+
]);
|
|
33847
|
+
};
|
|
33848
|
+
const handleColumnsKeyDown = (event) => {
|
|
33849
|
+
keyboardNav.value = true;
|
|
33850
|
+
const columns = getCascaderColumns(props.data, activePath.value);
|
|
33851
|
+
const focusedLevel = Math.max(0, activePath.value.length - 1);
|
|
33852
|
+
const currentColumn = columns[focusedLevel] ?? columns[0] ?? [];
|
|
33853
|
+
const focusedIndex = currentColumn.findIndex((item) => item.value === activePath.value[focusedLevel]);
|
|
33854
|
+
const focusedOption = focusedIndex >= 0 ? currentColumn[focusedIndex] : void 0;
|
|
33855
|
+
if (event.key === "ArrowDown") {
|
|
33856
|
+
const next = findEnabledIndex(currentColumn, focusedIndex, 1);
|
|
33857
|
+
if (next >= 0) activePath.value = [...activePath.value.slice(0, focusedLevel), currentColumn[next].value];
|
|
33858
|
+
return true;
|
|
33859
|
+
}
|
|
33860
|
+
if (event.key === "ArrowUp") {
|
|
33861
|
+
const previous = findEnabledIndex(currentColumn, focusedIndex < 0 ? currentColumn.length : focusedIndex, -1);
|
|
33862
|
+
if (previous >= 0) activePath.value = [...activePath.value.slice(0, focusedLevel), currentColumn[previous].value];
|
|
33863
|
+
return true;
|
|
33864
|
+
}
|
|
33865
|
+
if (event.key === "ArrowRight") {
|
|
33866
|
+
if (focusedOption && cascaderOptionHasChildren(focusedOption)) expandOption(focusedLevel, focusedOption);
|
|
33867
|
+
return true;
|
|
33868
|
+
}
|
|
33869
|
+
if (event.key === "ArrowLeft") {
|
|
33870
|
+
if (activePath.value.length > 1) activePath.value = activePath.value.slice(0, -1);
|
|
33871
|
+
return true;
|
|
33872
|
+
}
|
|
33873
|
+
if (event.key === "Enter" && focusedOption) {
|
|
33874
|
+
const path = [...activePath.value.slice(0, focusedLevel), focusedOption.value];
|
|
33875
|
+
if (cascaderOptionHasChildren(focusedOption)) {
|
|
33876
|
+
if (props.changeOnSelect) {
|
|
33877
|
+
selectPath(path);
|
|
33878
|
+
finishSelection();
|
|
33879
|
+
}
|
|
33880
|
+
expandOption(focusedLevel, focusedOption);
|
|
33881
|
+
} else {
|
|
33882
|
+
selectPath(path);
|
|
33883
|
+
finishSelection();
|
|
33884
|
+
}
|
|
33885
|
+
return true;
|
|
33886
|
+
}
|
|
33887
|
+
return false;
|
|
33888
|
+
};
|
|
33889
|
+
const handleKeydown = (event) => {
|
|
33890
|
+
call(attrs.onKeydown, event);
|
|
33891
|
+
if (event.defaultPrevented) return;
|
|
33892
|
+
if (event.key === "Escape") {
|
|
33893
|
+
combobox.closeDropdown("keyboard");
|
|
33894
|
+
return;
|
|
33895
|
+
}
|
|
33896
|
+
if (showFlatList.value || !canInteract.value) return;
|
|
33897
|
+
if (!combobox.dropdownOpened) {
|
|
33898
|
+
if ([
|
|
33899
|
+
"ArrowDown",
|
|
33900
|
+
"ArrowUp",
|
|
33901
|
+
"ArrowRight",
|
|
33902
|
+
"Enter"
|
|
33903
|
+
].includes(event.key) || !props.searchable && event.key === " ") {
|
|
33904
|
+
event.preventDefault();
|
|
33905
|
+
keyboardNav.value = true;
|
|
33906
|
+
combobox.openDropdown("keyboard");
|
|
33907
|
+
if (!currentValue.value && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
|
|
33908
|
+
const rootIndex = event.key === "ArrowDown" ? findEnabledIndex(props.data, -1, 1) : findEnabledIndex(props.data, props.data.length, -1);
|
|
33909
|
+
if (rootIndex >= 0) activePath.value = [props.data[rootIndex].value];
|
|
33910
|
+
}
|
|
33911
|
+
}
|
|
33912
|
+
return;
|
|
33913
|
+
}
|
|
33914
|
+
if (handleColumnsKeyDown(event)) event.preventDefault();
|
|
33915
|
+
else if (!props.searchable && event.key === " ") event.preventDefault();
|
|
33916
|
+
};
|
|
33917
|
+
return () => {
|
|
33918
|
+
const inputAttrs = { ...attrs };
|
|
33919
|
+
delete inputAttrs.name;
|
|
33920
|
+
delete inputAttrs.onKeydown;
|
|
33921
|
+
delete inputAttrs.onFocus;
|
|
33922
|
+
delete inputAttrs.onBlur;
|
|
33923
|
+
delete inputAttrs.onClick;
|
|
33924
|
+
delete inputAttrs.onInput;
|
|
33925
|
+
const clearButton = h(Combobox.ClearButton, {
|
|
33926
|
+
...props.clearButtonProps,
|
|
33927
|
+
onMousedown: (event) => event.preventDefault(),
|
|
33928
|
+
onClick: () => {
|
|
33929
|
+
props.onClear?.();
|
|
33930
|
+
setValue(null);
|
|
33931
|
+
activePath.value = [];
|
|
33932
|
+
setSearch("");
|
|
33933
|
+
combobox.focusTarget();
|
|
33934
|
+
}
|
|
33935
|
+
});
|
|
33936
|
+
const hasValue = !!currentValue.value?.length;
|
|
33937
|
+
const listId = id.value ? `${id.value}-cascader-list` : void 0;
|
|
33938
|
+
const focusedLevel = activePath.value.length - 1;
|
|
33939
|
+
const activeDescendant = keyboardNav.value && focusedLevel >= 0 ? optionId(focusedLevel, activePath.value[focusedLevel]) : void 0;
|
|
33940
|
+
return h("div", { style: { display: "contents" } }, [h(Combobox, {
|
|
33941
|
+
store: combobox,
|
|
33942
|
+
__staticSelector: "Cascader",
|
|
33943
|
+
classNames: props.classNames,
|
|
33944
|
+
styles: props.styles,
|
|
33945
|
+
unstyled: props.unstyled,
|
|
33946
|
+
readOnly: props.readOnly,
|
|
33947
|
+
size: String(props.size),
|
|
33948
|
+
width: showFlatList.value ? "target" : "max-content",
|
|
33949
|
+
position: "bottom-start",
|
|
33950
|
+
...props.comboboxProps,
|
|
33951
|
+
onOptionSubmit: (raw) => {
|
|
33952
|
+
const item = flatListItems.value[Number(raw)];
|
|
33953
|
+
if (!item || item.disabled) return;
|
|
33954
|
+
selectPath(item.path);
|
|
33955
|
+
activePath.value = [...item.path];
|
|
33956
|
+
finishSelection();
|
|
33957
|
+
}
|
|
33958
|
+
}, { default: () => [h(Combobox.Target, {
|
|
33959
|
+
targetType: props.searchable ? "input" : "button",
|
|
33960
|
+
withKeyboardNavigation: showFlatList.value
|
|
33961
|
+
}, () => h(InputBase, {
|
|
33962
|
+
...inputAttrs,
|
|
33963
|
+
id: id.value,
|
|
33964
|
+
__staticSelector: "Cascader",
|
|
33965
|
+
size: props.size,
|
|
33966
|
+
classNames: props.classNames,
|
|
33967
|
+
styles: props.styles,
|
|
33968
|
+
unstyled: props.unstyled,
|
|
33969
|
+
disabled: props.disabled,
|
|
33970
|
+
readonly: props.readOnly || !props.searchable,
|
|
33971
|
+
pointer: !props.searchable,
|
|
33972
|
+
value: props.searchable ? search.value : displayString.value,
|
|
33973
|
+
"aria-controls": listId,
|
|
33974
|
+
"aria-activedescendant": activeDescendant,
|
|
33975
|
+
__defaultRightSection: h(Combobox.Chevron, {
|
|
33976
|
+
size: String(props.size),
|
|
33977
|
+
color: props.chevronColor
|
|
33978
|
+
}),
|
|
33979
|
+
__clearSection: clearButton,
|
|
33980
|
+
__clearable: props.clearable && hasValue && !props.disabled && !props.readOnly,
|
|
33981
|
+
__clearSectionMode: props.clearSectionMode,
|
|
33982
|
+
rightSectionPointerEvents: attrs.rightSectionPointerEvents || "none",
|
|
33983
|
+
onInput: (event) => {
|
|
33984
|
+
setSearch(event.target.value);
|
|
33985
|
+
if (canInteract.value) combobox.openDropdown("keyboard");
|
|
33986
|
+
},
|
|
33987
|
+
onFocus: (event) => {
|
|
33988
|
+
if (props.openOnFocus && props.searchable && canInteract.value) combobox.openDropdown("keyboard");
|
|
33989
|
+
call(attrs.onFocus, event);
|
|
33990
|
+
},
|
|
33991
|
+
onBlur: (event) => {
|
|
33992
|
+
combobox.closeDropdown("unknown");
|
|
33993
|
+
call(attrs.onBlur, event);
|
|
33994
|
+
},
|
|
33995
|
+
onClick: (event) => {
|
|
33996
|
+
if (canInteract.value) {
|
|
33997
|
+
keyboardNav.value = false;
|
|
33998
|
+
if (props.searchable) combobox.openDropdown("mouse");
|
|
33999
|
+
else combobox.toggleDropdown("mouse");
|
|
34000
|
+
}
|
|
34001
|
+
call(attrs.onClick, event);
|
|
34002
|
+
},
|
|
34003
|
+
onKeydown: handleKeydown
|
|
34004
|
+
}, {
|
|
34005
|
+
label: slots.label,
|
|
34006
|
+
description: slots.description,
|
|
34007
|
+
error: slots.error,
|
|
34008
|
+
leftSection: slots.leftSection,
|
|
34009
|
+
rightSection: slots.rightSection
|
|
34010
|
+
})), h(Combobox.Dropdown, {
|
|
34011
|
+
hidden: props.readOnly || props.disabled,
|
|
34012
|
+
style: showFlatList.value ? void 0 : { padding: 0 }
|
|
34013
|
+
}, () => showFlatList.value ? renderFlatList() : renderColumns())] }), h(Combobox.HiddenInput, {
|
|
34014
|
+
name: attrs.name,
|
|
34015
|
+
form: attrs.form,
|
|
34016
|
+
disabled: props.disabled,
|
|
34017
|
+
value: currentValue.value,
|
|
34018
|
+
...props.hiddenInputProps
|
|
34019
|
+
})]);
|
|
34020
|
+
};
|
|
34021
|
+
}
|
|
34022
|
+
});
|
|
34023
|
+
Object.assign(Cascader, { classes: {
|
|
34024
|
+
...InputBase.classes,
|
|
34025
|
+
...Combobox.classes,
|
|
34026
|
+
...Cascader_module_default
|
|
34027
|
+
} });
|
|
32608
34028
|
//#endregion
|
|
32609
|
-
export { Accordion, AccordionChevron, AccordionControl, AccordionItem, AccordionPanel, ActionIcon, ActionIconGroup, ActionIconGroupSection, Affix, Alert, AlphaSlider, Anchor, AngleSlider, AppShell, AppShellAside, AppShellFooter, AppShellHeader, AppShellMain, AppShellNavbar, AppShellSection, AspectRatio, Autocomplete, Avatar, AvatarGroup, AvatarGroupContextKey, BackgroundImage, Badge, Bars, Blockquote, Box, Breadcrumbs, Burger, Button, ButtonGroup, ButtonGroupSection, Card, CardSection, Center, CheckIcon, Checkbox, CheckboxCard, CheckboxGroup, CheckboxIcon, CheckboxIndicator, Chip, ChipGroup, CloseButton, CloseIcon, Code, Collapse, ColorInput, ColorPicker, ColorSlider, ColorSwatch, Combobox, ComboboxChevron, ComboboxClearButton, ComboboxDropdown, ComboboxDropdownTarget, ComboboxEmpty, ComboboxEventsTarget, ComboboxFooter, ComboboxGroup, ComboboxHeader, ComboboxHiddenInput, ComboboxOption, ComboboxOptions, ComboboxPopover, ComboboxPopoverTarget, ComboboxSearch, ComboboxTarget, Container, CopyButton, DEFAULT_COLORS, DEFAULT_THEME, DataList, DataListItem, DataListItemLabel, DataListItemValue, Dialog, DirectionContextKey, DirectionProvider, Divider, Dots, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerHeader, DrawerOverlay, DrawerRoot, DrawerStack, DrawerTitle, EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateIndicator, EmptyStateTitle, FLEX_STYLE_PROPS_DATA, Fieldset, FileButton, FileInput, FlatTreeNode, Flex, FloatingIndicator, FloatingWindow, FocusTrap, FocusTrapInitialFocus, Grid, GridCol, Group, HeadlessMantineProvider, Highlight, HoverCard, HoverCardDropdown, HoverCardGroup, HoverCardTarget, HueSlider, INVALID_PRIMARY_COLOR_ERROR, INVALID_PRIMARY_SHADE_ERROR, Image, Indicator, InlineStyles, Input, InputBase, InputClearButton, InputClearSection, InputDescription, InputError, InputLabel, InputPlaceholder, InputWrapper, JsonInput, Kbd, List, ListItem, Loader, LoadingOverlay, MantineClasses, MantineContextKey, MantineCssVariables, MantineProvider, MantineThemeKey, MantineThemeProvider, Mark, Marquee, MaskInput, Menu, MenuCheckboxGroup, MenuCheckboxItem, MenuContextMenu, MenuDivider, MenuDropdown, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSearch, MenuSub, MenuSubDropdown, MenuSubItem, MenuSubTarget, MenuTarget, Menubar, MenubarDropdown, MenubarMenu, MenubarTarget, Modal, ModalBase, ModalBaseBody, ModalBaseCloseButton, ModalBaseContent, ModalBaseHeader, ModalBaseOverlay, ModalBaseTitle, ModalBody, ModalCloseButton, ModalContent, ModalHeader, ModalOverlay, ModalRoot, ModalTitle, MultiSelect, NativeScrollArea, NativeSelect, NativeSelectOption, NavLink, Notification, NumberFormatter, NumberInput, NumberInputChevron, OptionalPortal, OptionsDropdown, Oval, OverflowList, Overlay, Pagination, PaginationControl, PaginationDots, PaginationFirst, PaginationItems, PaginationItemsGroup, PaginationLabel, PaginationLast, PaginationNext, PaginationPrevious, PaginationRoot, Paper, PasswordInput, PasswordToggleIcon, Pill, PillGroup, PillsInput, PillsInputField, PinInput, Popover, PopoverContextMenu, PopoverDropdown, PopoverTarget, Portal, Progress, ProgressLabel, ProgressRoot, ProgressSection, Radio, RadioCard, RadioGroup, RadioIcon, RadioIndicator, RangeSlider, Rating, RingProgress, RollingNumber, STYLE_PROPS_DATA, ScrollArea, ScrollAreaAutosize, Scroller, SegmentedControl, Select, SemiCircleProgress, SimpleGrid, Skeleton, Slider, Space, Splitter, SplitterPane, Spoiler, Stack, Stepper, StepperCompleted, StepperStep, Switch, SwitchGroup, Table, TableCaption, TableDataRenderer, TableOfContents, TableScrollContainer, TableTbody, TableTd, TableTfoot, TableTh, TableThead, TableTr, Tabs, TabsList, TabsPanel, TabsTab, TagsInput, Text, TextInput, Textarea, ThemeIcon, Timeline, TimelineItem, Title, Tooltip, TooltipFloating, TooltipGroup, Transition, Tree, TreeSelect, TreeSelectOption, Typography, UnstyledButton, VisuallyHidden, alpha, buildValue, camelToKebabCase, colorsTuple, convertCssVariables, convertHsvaTo, createEventHandler, createProviderColorScheme, createSafeContext, createSafeInjectionContext, createScopedKeydownHandler, createVarsResolver, cssVariablesObjectToString, darken, deepMerge, defaultCssVariablesResolver, defaultLoaders, defaultOptionsFilter, defaultTreeNodeFilter, defaultVariantColorsResolver, em, factory, factory as polymorphicFactory, filterProps, filterTreeData, findClosestNumber, flattenTreeData, foldAccents, formatNumber, getVariables as getAppShellVariables, getAutoContrastValue, getBaseValue, getBreakpointValue, getContrastColor, getDefaultZIndex, getDigitParts, getFontSize, getGradient, getInitials, getInitialsColor, getLineHeight, getMarkColor, getMergedVariables, getOptionsLockup, getParsedComboboxData, getParsedNativeSelectData, getPositionVariables, getPrimaryContrastColor, getPrimaryShade, getRadius, getRenderSlots, getRenderSlotsFromValues, getSafeId, getShadow, getSize, getSortedBreakpoints, getSpacing, getSplittedTags, getThemeColor, getTitleSize, getTreeExpandedState, hasNode, hashStyleProps, highlighter, hsvaToHex, hsvaToHexa, hsvaToHsl, hsvaToRgba, hsvaToRgbaObject, isColorValid, isEmptyComboboxData, isLightColor, isNumberLike, isOptionsGroup, isPrimitive, isVirtualColor, keys, lighten, luminance, memoize, mergeAsyncChildren, mergeMantineTheme, movePill, moveTreeNode, noop, parseColor, parseHex, parseHexa, parseHsla, parseHue, parseRgba, parseStyleProps, parseThemeColor, polymorphicProps, provideGridContext, provideListContext, provideMantineContext, provideMantineTheme, providePillsInputContext, px, rem, renderPolymorphic, resolveColorScheme, resolveNode, rgba, round, toRgba, useAccordionContext, useAccordionItemContext, useAppShellContext, useAvatarGroupContext, useCheckboxCardContext, useCheckboxGroupContext, useChipGroupContext, useCombobox, useComboboxContext, useComboboxTargetProps, useComputedColorScheme, useDataListContext, useDirection, useDrawersStack, useEmptyStateContext, useFloatingIndicator, useForwardedRef, useGridContext, useHoverCardContext, useInputContext, useInputWrapperContext, useListContext, useMantineClassNamesPrefix, useMantineColorScheme, useMantineContext, useMantineCssVariablesResolver, useMantineDeduplicateInlineStyles, useMantineEnv, useMantineIsHeadless, useMantineStyleNonce, useMantineTheme, useMantineWithStaticClasses, useMenuContext, useMenubarContext, useMenubarMenuContext, usePaginationContext, usePillGroupContext, usePillsInputContext, usePillsReorder, useProgressContext, useProps, useRadioCardContext, useRadioGroupContext, useRandomClassName, useSafeMantineTheme, useScrollAreaContext, useSplitterContext, useStepperContext, useStyles, useSwitchGroupContext, useTabsContext, useTree, useVirtualizedCombobox, validateJson, validateMantineTheme, validateOptions, virtualColor, withBoxProps };
|
|
34029
|
+
export { Accordion, AccordionChevron, AccordionControl, AccordionItem, AccordionPanel, ActionIcon, ActionIconGroup, ActionIconGroupSection, Affix, Alert, AlphaSlider, Anchor, AngleSlider, AppShell, AppShellAside, AppShellFooter, AppShellHeader, AppShellMain, AppShellNavbar, AppShellSection, AspectRatio, Autocomplete, Avatar, AvatarGroup, AvatarGroupContextKey, BackgroundImage, Badge, Bars, Blockquote, Box, Breadcrumbs, Burger, Button, ButtonGroup, ButtonGroupSection, Card, CardSection, Cascader, Center, CheckIcon, Checkbox, CheckboxCard, CheckboxGroup, CheckboxIcon, CheckboxIndicator, Chip, ChipGroup, CloseButton, CloseIcon, Code, Collapse, ColorInput, ColorPicker, ColorSlider, ColorSwatch, Combobox, ComboboxChevron, ComboboxClearButton, ComboboxDropdown, ComboboxDropdownTarget, ComboboxEmpty, ComboboxEventsTarget, ComboboxFooter, ComboboxGroup, ComboboxHeader, ComboboxHiddenInput, ComboboxOption, ComboboxOptions, ComboboxPopover, ComboboxPopoverTarget, ComboboxSearch, ComboboxTarget, Container, CopyButton, DEFAULT_COLORS, DEFAULT_THEME, DataList, DataListItem, DataListItemLabel, DataListItemValue, Dialog, DirectionContextKey, DirectionProvider, Divider, Dots, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerHeader, DrawerOverlay, DrawerRoot, DrawerStack, DrawerTitle, EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateIndicator, EmptyStateTitle, FLEX_STYLE_PROPS_DATA, Fieldset, FileButton, FileInput, FlatTreeNode, Flex, FloatingIndicator, FloatingWindow, FloatingWindowResizeHandle, FocusTrap, FocusTrapInitialFocus, Grid, GridCol, Group, HeadlessMantineProvider, Highlight, HoverCard, HoverCardDropdown, HoverCardGroup, HoverCardTarget, HueSlider, INVALID_PRIMARY_COLOR_ERROR, INVALID_PRIMARY_SHADE_ERROR, Image, Indicator, InlineStyles, Input, InputBase, InputClearButton, InputClearSection, InputDescription, InputError, InputLabel, InputPlaceholder, InputWrapper, JsonInput, Kbd, List, ListItem, Loader, LoadingOverlay, MantineClasses, MantineContextKey, MantineCssVariables, MantineProvider, MantineThemeKey, MantineThemeProvider, Mark, Marquee, MaskInput, Menu, MenuCheckboxGroup, MenuCheckboxItem, MenuContextMenu, MenuDivider, MenuDropdown, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSearch, MenuSub, MenuSubDropdown, MenuSubItem, MenuSubTarget, MenuTarget, Menubar, MenubarDropdown, MenubarMenu, MenubarTarget, Modal, ModalBase, ModalBaseBody, ModalBaseCloseButton, ModalBaseContent, ModalBaseHeader, ModalBaseOverlay, ModalBaseTitle, ModalBody, ModalCloseButton, ModalContent, ModalHeader, ModalOverlay, ModalRoot, ModalTitle, MultiSelect, NativeScrollArea, NativeSelect, NativeSelectOption, NavLink, Notification, NumberFormatter, NumberInput, NumberInputChevron, OptionalPortal, OptionsDropdown, Oval, OverflowList, Overlay, Pagination, PaginationControl, PaginationDots, PaginationFirst, PaginationItems, PaginationItemsGroup, PaginationLabel, PaginationLast, PaginationNext, PaginationPrevious, PaginationRoot, Paper, PasswordInput, PasswordToggleIcon, Pill, PillGroup, PillsInput, PillsInputField, PinInput, Popover, PopoverContextMenu, PopoverDropdown, PopoverTarget, Portal, Progress, ProgressLabel, ProgressRoot, ProgressSection, Radio, RadioCard, RadioGroup, RadioIcon, RadioIndicator, RangeSlider, Rating, RingProgress, RollingNumber, STYLE_PROPS_DATA, ScrollArea, ScrollAreaAutosize, Scroller, SegmentedControl, Select, SemiCircleProgress, SimpleGrid, Skeleton, Slider, Space, Splitter, SplitterPane, Spoiler, Stack, Stepper, StepperCompleted, StepperStep, Switch, SwitchGroup, Table, TableCaption, TableDataRenderer, TableOfContents, TableScrollContainer, TableTbody, TableTd, TableTfoot, TableTh, TableThead, TableTr, Tabs, TabsList, TabsPanel, TabsTab, TagsInput, Text, TextInput, Textarea, ThemeIcon, Timeline, TimelineItem, Title, Tooltip, TooltipFloating, TooltipGroup, Transition, Tree, TreeSelect, TreeSelectOption, Typography, UnstyledButton, VisuallyHidden, alpha, buildValue, camelToKebabCase, cascaderOptionHasChildren, colorsTuple, convertCssVariables, convertHsvaTo, createEventHandler, createProviderColorScheme, createSafeContext, createSafeInjectionContext, createScopedKeydownHandler, createVarsResolver, cssVariablesObjectToString, darken, deepMerge, defaultCssVariablesResolver, defaultLoaders, defaultOptionsFilter, defaultTreeNodeFilter, defaultVariantColorsResolver, em, factory, factory as polymorphicFactory, filterProps, filterTreeData, findClosestNumber, flattenCascaderPaths, flattenTreeData, foldAccents, formatNumber, getVariables as getAppShellVariables, getAutoContrastValue, getBaseValue, getBreakpointValue, getCascaderColumns, getCascaderPathOptions, getContrastColor, getDefaultZIndex, getDigitParts, getFontSize, getGradient, getInitials, getInitialsColor, getLineHeight, getMarkColor, getMergedVariables, getOptionsLockup, getParsedComboboxData, getParsedNativeSelectData, getPositionVariables, getPrimaryContrastColor, getPrimaryShade, getRadius, getRenderSlots, getRenderSlotsFromValues, getSafeId, getShadow, getSize, getSortedBreakpoints, getSpacing, getSplittedTags, getThemeColor, getTitleSize, getTreeExpandedState, hasNode, hashStyleProps, highlighter, hsvaToHex, hsvaToHexa, hsvaToHsl, hsvaToRgba, hsvaToRgbaObject, isColorValid, isEmptyComboboxData, isLightColor, isNumberLike, isOptionsGroup, isPrimitive, isVirtualColor, keys, lighten, luminance, memoize, mergeAsyncChildren, mergeMantineTheme, movePill, moveTreeNode, noop, parseColor, parseHex, parseHexa, parseHsla, parseHue, parseRgba, parseStyleProps, parseThemeColor, polymorphicProps, provideGridContext, provideListContext, provideMantineContext, provideMantineTheme, providePillsInputContext, px, rem, renderPolymorphic, resolveColorScheme, resolveNode, rgba, round, toRgba, useAccordionContext, useAccordionItemContext, useAppShellContext, useAvatarGroupContext, useCheckboxCardContext, useCheckboxGroupContext, useChipGroupContext, useCombobox, useComboboxContext, useComboboxTargetProps, useComputedColorScheme, useDataListContext, useDirection, useDrawersStack, useEmptyStateContext, useFloatingIndicator, useForwardedRef, useGridContext, useHoverCardContext, useInputContext, useInputWrapperContext, useListContext, useMantineClassNamesPrefix, useMantineColorScheme, useMantineContext, useMantineCssVariablesResolver, useMantineDeduplicateInlineStyles, useMantineEnv, useMantineIsHeadless, useMantineStyleNonce, useMantineTheme, useMantineWithStaticClasses, useMenuContext, useMenubarContext, useMenubarMenuContext, usePaginationContext, usePillGroupContext, usePillsInputContext, usePillsReorder, useProgressContext, useProps, useRadioCardContext, useRadioGroupContext, useRandomClassName, useSafeMantineTheme, useScrollAreaContext, useSplitterContext, useStepperContext, useStyles, useSwitchGroupContext, useTabsContext, useTree, useVirtualizedCombobox, validateJson, validateMantineTheme, validateOptions, virtualColor, withBoxProps };
|
|
32610
34030
|
|
|
32611
34031
|
//# sourceMappingURL=index.mjs.map
|