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