@mantine-vue/core 2.3.0 → 2.4.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 (52) hide show
  1. package/cjs/index.cjs +1011 -144
  2. package/cjs/index.cjs.map +1 -1
  3. package/esm/index.mjs +1006 -145
  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/Cascader/Cascader.d.ts +314 -0
  8. package/lib/components/Cascader/cascader-utils.d.ts +11 -0
  9. package/lib/components/Cascader/index.d.ts +4 -0
  10. package/lib/components/ColorInput/ColorInput.d.ts +7 -2
  11. package/lib/components/ColorInput/index.d.ts +1 -1
  12. package/lib/components/Combobox/OptionsDropdown/OptionsDropdown.d.ts +1 -0
  13. package/lib/components/ComboboxPopover/ComboboxPopover.d.ts +4 -0
  14. package/lib/components/Drawer/Drawer.d.ts +33 -0
  15. package/lib/components/FloatingWindow/FloatingWindow.context.d.ts +23 -0
  16. package/lib/components/FloatingWindow/FloatingWindow.d.ts +37 -0
  17. package/lib/components/FloatingWindow/FloatingWindowResizeHandle.d.ts +27 -0
  18. package/lib/components/FloatingWindow/index.d.ts +2 -0
  19. package/lib/components/InputBase/index.d.ts +1 -1
  20. package/lib/components/Menu/Menu.context.d.ts +1 -0
  21. package/lib/components/Modal/Modal.d.ts +33 -0
  22. package/lib/components/MultiSelect/MultiSelect.d.ts +7 -0
  23. package/lib/components/MultiSelect/index.d.ts +1 -1
  24. package/lib/components/PasswordInput/PasswordInput.d.ts +4 -0
  25. package/lib/components/PasswordInput/index.d.ts +1 -1
  26. package/lib/components/Popover/Popover.d.ts +10 -2
  27. package/lib/components/Popover/index.d.ts +1 -1
  28. package/lib/components/ScrollArea/ScrollArea.d.ts +25 -0
  29. package/lib/components/Scroller/Scroller.d.ts +9 -2
  30. package/lib/components/Scroller/index.d.ts +1 -1
  31. package/lib/components/Select/Select.d.ts +1 -0
  32. package/lib/components/Select/index.d.ts +1 -1
  33. package/lib/components/Slider/index.d.ts +2 -1
  34. package/lib/components/Splitter/Splitter.d.ts +8 -3
  35. package/lib/components/Splitter/index.d.ts +1 -1
  36. package/lib/components/Stepper/Stepper.d.ts +2 -1
  37. package/lib/components/Tabs/Tabs.context.d.ts +0 -1
  38. package/lib/components/Tabs/Tabs.d.ts +0 -15
  39. package/lib/components/TagsInput/TagsInput.d.ts +7 -0
  40. package/lib/components/TagsInput/index.d.ts +1 -1
  41. package/lib/components/Textarea/Textarea.d.ts +7 -2
  42. package/lib/components/Textarea/index.d.ts +1 -0
  43. package/lib/components/Timeline/Timeline.d.ts +19 -1
  44. package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts +20 -1
  45. package/lib/components/Tree/Tree.d.ts +7 -2
  46. package/lib/components/Tree/index.d.ts +1 -1
  47. package/lib/components/TreeSelect/TreeSelect.d.ts +2 -0
  48. package/lib/components/TreeSelect/index.d.ts +1 -1
  49. package/lib/components/index.d.ts +1 -0
  50. package/package.json +3 -3
  51. package/styles.css +471 -129
  52. package/styles.layer.css +471 -129
package/cjs/index.cjs CHANGED
@@ -4038,7 +4038,7 @@ var Badge = withBoxProps((0, vue.defineComponent)({
4038
4038
  const renderSection = (section, position) => hasNode(section) ? (0, vue.h)("span", {
4039
4039
  ...getStyles("section"),
4040
4040
  "data-position": position
4041
- }, () => section) : null;
4041
+ }, section) : null;
4042
4042
  return () => {
4043
4043
  const children = slots.default?.() ?? [];
4044
4044
  const leftSection = resolveNode(props.leftSection, slots.leftSection);
@@ -5108,7 +5108,7 @@ var varsResolver$70 = createVarsResolver((theme, { radius, color, gradient, vari
5108
5108
  "--button-hover-color": color || variant ? colors.hoverColor : void 0
5109
5109
  } };
5110
5110
  });
5111
- function renderContent$5(content) {
5111
+ function renderContent$4(content) {
5112
5112
  return typeof content === "function" ? content() : content;
5113
5113
  }
5114
5114
  var ButtonBase = (0, vue.defineComponent)({
@@ -5237,7 +5237,7 @@ var ButtonBase = (0, vue.defineComponent)({
5237
5237
  component: "span",
5238
5238
  ...getStyles("section"),
5239
5239
  mod: { position }
5240
- }, () => renderContent$5(content)) : null;
5240
+ }, () => renderContent$4(content)) : null;
5241
5241
  return () => {
5242
5242
  const leftSection = resolveNode(props.leftSection, slots.leftSection);
5243
5243
  const rightSection = resolveNode(props.rightSection, slots.rightSection);
@@ -8017,13 +8017,13 @@ var ScrollAreaViewport = withBoxProps((0, vue.defineComponent)({
8017
8017
  }
8018
8018
  }));
8019
8019
  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"
8020
+ root: "_root_1sy9q_1",
8021
+ content: "_content_1sy9q_7",
8022
+ viewport: "_viewport_1sy9q_12",
8023
+ viewportInner: "_viewportInner_1sy9q_71",
8024
+ scrollbar: "_scrollbar_1sy9q_76",
8025
+ thumb: "_thumb_1sy9q_93",
8026
+ corner: "_corner_1sy9q_182"
8027
8027
  };
8028
8028
  //#endregion
8029
8029
  //#region src/components/ScrollArea/ScrollArea.ts
@@ -8099,6 +8099,10 @@ var ScrollAreaBase = (0, vue.defineComponent)({
8099
8099
  type: Object,
8100
8100
  default: void 0
8101
8101
  },
8102
+ verticalScrollbarPosition: {
8103
+ type: String,
8104
+ default: void 0
8105
+ },
8102
8106
  classNames: {
8103
8107
  type: [Object, Function],
8104
8108
  default: void 0
@@ -8257,11 +8261,13 @@ var ScrollAreaBase = (0, vue.defineComponent)({
8257
8261
  },
8258
8262
  "data-offset-scrollbars": toOffsetScrollbars(props.offsetScrollbars),
8259
8263
  "data-scrollbars": props.scrollbars || void 0,
8264
+ "data-vertical-scrollbar-position": props.verticalScrollbarPosition,
8260
8265
  onScroll: handleScroll
8261
8266
  }, () => slots.default?.()),
8262
8267
  (props.scrollbars === "xy" || props.scrollbars === "x") && (0, vue.h)(ScrollAreaScrollbar, {
8263
8268
  ...getStyles("scrollbar"),
8264
8269
  orientation: "horizontal",
8270
+ "data-vertical-scrollbar-position": props.verticalScrollbarPosition,
8265
8271
  "data-hidden": props.type === "never" ? true : void 0,
8266
8272
  "data-state": getScrollbarState("horizontal"),
8267
8273
  forceMount: true
@@ -8269,12 +8275,14 @@ var ScrollAreaBase = (0, vue.defineComponent)({
8269
8275
  (props.scrollbars === "xy" || props.scrollbars === "y") && (0, vue.h)(ScrollAreaScrollbar, {
8270
8276
  ...getStyles("scrollbar"),
8271
8277
  orientation: "vertical",
8278
+ "data-vertical-scrollbar-position": props.verticalScrollbarPosition,
8272
8279
  "data-hidden": props.type === "never" ? true : void 0,
8273
8280
  "data-state": getScrollbarState("vertical"),
8274
8281
  forceMount: true
8275
8282
  }, () => (0, vue.h)(ScrollAreaThumb, getStyles("thumb"))),
8276
8283
  (0, vue.h)(ScrollAreaCorner, {
8277
8284
  ...getStyles("corner"),
8285
+ "data-vertical-scrollbar-position": props.verticalScrollbarPosition,
8278
8286
  "data-hidden": props.type === "never" ? true : void 0
8279
8287
  })
8280
8288
  ]);
@@ -8595,6 +8603,7 @@ var defaultProps$35 = {
8595
8603
  multiple: false,
8596
8604
  loop: true,
8597
8605
  disableChevronRotation: false,
8606
+ disableCollapse: false,
8598
8607
  chevronPosition: "right",
8599
8608
  variant: "default",
8600
8609
  chevronSize: "auto",
@@ -8606,7 +8615,7 @@ function getSafeId$2(prefix) {
8606
8615
  return `${prefix}-${value}`;
8607
8616
  };
8608
8617
  }
8609
- function renderContent$4(content) {
8618
+ function renderContent$3(content) {
8610
8619
  return typeof content === "function" ? content() : content;
8611
8620
  }
8612
8621
  var varsResolver$57 = createVarsResolver((_, { transitionDuration, chevronSize, radius }) => ({ root: {
@@ -8617,6 +8626,7 @@ var varsResolver$57 = createVarsResolver((_, { transitionDuration, chevronSize,
8617
8626
  var AccordionBase = (0, vue.defineComponent)({
8618
8627
  name: "Accordion",
8619
8628
  inheritAttrs: false,
8629
+ slots: Object,
8620
8630
  props: {
8621
8631
  multiple: {
8622
8632
  type: Boolean,
@@ -8650,6 +8660,10 @@ var AccordionBase = (0, vue.defineComponent)({
8650
8660
  type: Boolean,
8651
8661
  default: void 0
8652
8662
  },
8663
+ disableCollapse: {
8664
+ type: Boolean,
8665
+ default: void 0
8666
+ },
8653
8667
  chevronPosition: {
8654
8668
  type: String,
8655
8669
  default: void 0
@@ -8729,6 +8743,7 @@ var AccordionBase = (0, vue.defineComponent)({
8729
8743
  const isItemActive = (itemValue) => Array.isArray(currentValue.value) ? currentValue.value.includes(itemValue) : itemValue === currentValue.value;
8730
8744
  const handleItemChange = (itemValue) => {
8731
8745
  const value = currentValue.value;
8746
+ if (!Array.isArray(value) && props.disableCollapse && itemValue === value) return;
8732
8747
  setCurrentValue(Array.isArray(value) ? value.includes(itemValue) ? value.filter((selectedValue) => selectedValue !== itemValue) : [...value, itemValue] : itemValue === value ? null : itemValue);
8733
8748
  };
8734
8749
  provideAccordionContext((0, vue.reactive)({
@@ -8748,7 +8763,8 @@ var AccordionBase = (0, vue.defineComponent)({
8748
8763
  return props.order;
8749
8764
  },
8750
8765
  get chevron() {
8751
- return props.chevron === null ? null : props.chevron ?? (() => (0, vue.h)(AccordionChevron, { size: props.chevronIconSize }));
8766
+ if (props.chevron === null) return null;
8767
+ return props.chevron ?? slots.chevron ?? (() => (0, vue.h)(AccordionChevron, { size: props.chevronIconSize }));
8752
8768
  },
8753
8769
  onChange: handleItemChange,
8754
8770
  isItemActive,
@@ -8778,7 +8794,7 @@ var AccordionBase = (0, vue.defineComponent)({
8778
8794
  id: uid.value,
8779
8795
  variant: props.variant,
8780
8796
  "data-accordion": true
8781
- }, () => renderContent$4(slots.default));
8797
+ }, () => renderContent$3(slots.default));
8782
8798
  }
8783
8799
  });
8784
8800
  var Accordion = Object.assign(AccordionBase, {
@@ -8806,12 +8822,10 @@ var varsResolver$56 = createVarsResolver((theme, { controlSize, edgeGradientColo
8806
8822
  "--scroller-control-size": controlSize === void 0 ? void 0 : rem(controlSize),
8807
8823
  "--scroller-background-color": edgeGradientColor ? getThemeColor(edgeGradientColor, theme) : void 0
8808
8824
  } }));
8809
- function renderContent$3(content) {
8810
- return typeof content === "function" ? content() : content;
8811
- }
8812
8825
  var Scroller = withBoxProps((0, vue.defineComponent)({
8813
8826
  name: "Scroller",
8814
8827
  inheritAttrs: false,
8828
+ slots: Object,
8815
8829
  props: {
8816
8830
  scrollAmount: {
8817
8831
  type: Number,
@@ -8916,7 +8930,7 @@ var Scroller = withBoxProps((0, vue.defineComponent)({
8916
8930
  "data-hidden": !showStart || void 0,
8917
8931
  "aria-label": "Scroll left",
8918
8932
  tabindex: showStart ? 0 : -1
8919
- }, () => renderContent$3(props.startControlIcon) || (0, vue.h)(AccordionChevron, getStyles("chevron"))),
8933
+ }, () => resolveNode(props.startControlIcon, slots.startControlIcon) || (0, vue.h)(AccordionChevron, getStyles("chevron"))),
8920
8934
  (0, vue.h)("div", {
8921
8935
  ...getStyles("container"),
8922
8936
  ref: scroller.ref,
@@ -8932,7 +8946,7 @@ var Scroller = withBoxProps((0, vue.defineComponent)({
8932
8946
  "data-hidden": !showEnd || void 0,
8933
8947
  "aria-label": "Scroll right",
8934
8948
  tabindex: showEnd ? 0 : -1
8935
- }, () => renderContent$3(props.endControlIcon) || (0, vue.h)(AccordionChevron, getStyles("chevron")))
8949
+ }, () => resolveNode(props.endControlIcon, slots.endControlIcon) || (0, vue.h)(AccordionChevron, getStyles("chevron")))
8936
8950
  ]);
8937
8951
  };
8938
8952
  }
@@ -9911,8 +9925,9 @@ function getDigitParts({ value, decimalScale, fixedDecimalScale }) {
9911
9925
  const dotIdx = str.indexOf(".");
9912
9926
  const intStr = dotIdx >= 0 ? str.slice(0, dotIdx) : str;
9913
9927
  const fracStr = dotIdx >= 0 ? str.slice(dotIdx + 1) : "";
9928
+ const roundedToZero = !/[1-9]/.test(str);
9914
9929
  return {
9915
- negative: value < 0,
9930
+ negative: value < 0 && !roundedToZero,
9916
9931
  intDigits: intStr.split(""),
9917
9932
  fracDigits: fracStr ? fracStr.split("") : [],
9918
9933
  hasDecimal: dotIdx >= 0
@@ -10258,11 +10273,12 @@ Object.assign(RollingNumber, {
10258
10273
  //#region src/components/Timeline/Timeline.context.ts
10259
10274
  var [provideTimelineContext, useTimelineContext] = createSafeContext("Timeline component was not found in tree");
10260
10275
  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"
10276
+ root: "_root_1p5xp_1",
10277
+ itemTitle: "_itemTitle_1p5xp_19",
10278
+ item: "_item_1p5xp_19",
10279
+ itemBullet: "_itemBullet_1p5xp_96",
10280
+ itemBody: "_itemBody_1p5xp_159",
10281
+ itemOpposite: "_itemOpposite_1p5xp_199"
10266
10282
  };
10267
10283
  //#endregion
10268
10284
  //#region src/components/Timeline/TimelineItem/TimelineItem.ts
@@ -10299,6 +10315,14 @@ var TimelineItem = withBoxProps((0, vue.defineComponent)({
10299
10315
  type: null,
10300
10316
  default: void 0
10301
10317
  },
10318
+ opposite: {
10319
+ type: null,
10320
+ default: void 0
10321
+ },
10322
+ alternate: {
10323
+ type: Boolean,
10324
+ default: false
10325
+ },
10302
10326
  radius: {
10303
10327
  type: [String, Number],
10304
10328
  default: void 0
@@ -10349,6 +10373,7 @@ var TimelineItem = withBoxProps((0, vue.defineComponent)({
10349
10373
  const lineActive = props.lineActive ?? props.__lineActive;
10350
10374
  const bullet = resolveNode(props.bullet, slots.bullet);
10351
10375
  const title = resolveNode(props.title, slots.title);
10376
+ const opposite = resolveNode(props.opposite, slots.opposite);
10352
10377
  const stylesApiProps = {
10353
10378
  className: props.className ?? attrs.class,
10354
10379
  props
@@ -10357,7 +10382,8 @@ var TimelineItem = withBoxProps((0, vue.defineComponent)({
10357
10382
  ...attrs,
10358
10383
  mod: [{
10359
10384
  lineActive,
10360
- active
10385
+ active,
10386
+ alternate: props.alternate
10361
10387
  }, props.mod],
10362
10388
  ...ctx.getStyles("item", {
10363
10389
  ...stylesApiProps,
@@ -10369,14 +10395,18 @@ var TimelineItem = withBoxProps((0, vue.defineComponent)({
10369
10395
  ...attrs.style
10370
10396
  }
10371
10397
  })
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?.())])]);
10398
+ }, () => [
10399
+ (0, vue.h)(Box, {
10400
+ ...ctx.getStyles("itemBullet", { props }),
10401
+ mod: {
10402
+ withChild: hasNode(bullet),
10403
+ align: props.__align,
10404
+ active
10405
+ }
10406
+ }, () => bullet),
10407
+ hasNode(opposite) ? (0, vue.h)("div", ctx.getStyles("itemOpposite", { props }), opposite) : null,
10408
+ (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?.())])
10409
+ ]);
10380
10410
  };
10381
10411
  }
10382
10412
  }));
@@ -10472,6 +10502,10 @@ var TimelineBase = (0, vue.defineComponent)({
10472
10502
  provideTimelineContext({ getStyles });
10473
10503
  return () => {
10474
10504
  const children = (slots.default?.() ?? []).filter(Boolean);
10505
+ const hasOpposite = children.some((item) => {
10506
+ const childSlots = item.children;
10507
+ return item.props?.opposite != null || childSlots?.opposite != null;
10508
+ });
10475
10509
  const active = props.active ?? defaultProps$28.active;
10476
10510
  const items = children.map((item, index) => (0, vue.cloneVNode)(item, {
10477
10511
  unstyled: props.unstyled,
@@ -10481,7 +10515,10 @@ var TimelineBase = (0, vue.defineComponent)({
10481
10515
  }, true));
10482
10516
  return (0, vue.h)(Box, {
10483
10517
  ...attrs,
10484
- mod: [{ align: props.align }, props.mod],
10518
+ mod: [{
10519
+ align: props.align,
10520
+ opposite: hasOpposite
10521
+ }, props.mod],
10485
10522
  ...getStyles("root", {
10486
10523
  className: attrs.class,
10487
10524
  style: attrs.style
@@ -16265,7 +16302,6 @@ var Tabs_module_default = {
16265
16302
  var VALUE_ERROR = "Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value";
16266
16303
  var defaultProps$13 = {
16267
16304
  keepMounted: true,
16268
- keepMountedMode: "activity",
16269
16305
  orientation: "horizontal",
16270
16306
  loop: true,
16271
16307
  activateTabWithKeyboard: true,
@@ -16347,10 +16383,6 @@ var TabsBase = (0, vue.defineComponent)({
16347
16383
  type: Boolean,
16348
16384
  default: void 0
16349
16385
  },
16350
- keepMountedMode: {
16351
- type: String,
16352
- default: void 0
16353
- },
16354
16386
  autoContrast: {
16355
16387
  type: Boolean,
16356
16388
  default: void 0
@@ -16426,9 +16458,6 @@ var TabsBase = (0, vue.defineComponent)({
16426
16458
  get keepMounted() {
16427
16459
  return props.keepMounted;
16428
16460
  },
16429
- get keepMountedMode() {
16430
- return props.keepMountedMode;
16431
- },
16432
16461
  get placement() {
16433
16462
  return props.placement;
16434
16463
  },
@@ -16640,6 +16669,7 @@ var TextareaAutosize = (0, vue.defineComponent)({
16640
16669
  var Textarea = (0, vue.defineComponent)({
16641
16670
  name: "Textarea",
16642
16671
  inheritAttrs: false,
16672
+ slots: Object,
16643
16673
  props: {
16644
16674
  autosize: {
16645
16675
  type: Boolean,
@@ -16688,7 +16718,7 @@ var Textarea = (0, vue.defineComponent)({
16688
16718
  __staticSelector: props.__staticSelector || "Textarea",
16689
16719
  multiline: true,
16690
16720
  "data-no-overflow": shouldAutosize && props.maxRows === void 0 ? true : void 0,
16691
- __bottomSection: props.bottomSection,
16721
+ __bottomSection: resolveNode(props.bottomSection, slots.bottomSection),
16692
16722
  __bottomSectionProps: props.bottomSectionProps,
16693
16723
  style: [{ "--input-resize": props.resize }, attrs.style],
16694
16724
  ...autosizeProps
@@ -17071,7 +17101,11 @@ var PasswordInput = (0, vue.defineComponent)({
17071
17101
  const hasError = props.error !== void 0 ? Boolean(props.error) && typeof props.error !== "boolean" : Boolean(slots.error);
17072
17102
  const hasDescription = props.description !== void 0 ? props.description !== null : Boolean(slots.description);
17073
17103
  const describedBy = `${hasError ? errorId : ""} ${hasDescription ? descriptionId : ""}`.trim() || void 0;
17074
- const VisibilityToggleIcon = props.visibilityToggleIcon || PasswordToggleIcon;
17104
+ const renderVisibilityToggleIcon = () => {
17105
+ if (props.visibilityToggleIcon) return (0, vue.h)(props.visibilityToggleIcon, { reveal: visible.value });
17106
+ if (slots.visibilityToggleIcon) return slots.visibilityToggleIcon({ reveal: visible.value });
17107
+ return (0, vue.h)(PasswordToggleIcon, { reveal: visible.value });
17108
+ };
17075
17109
  const visibilityToggleButton = (0, vue.h)(ActionIcon, {
17076
17110
  ...getStyles("visibilityToggle"),
17077
17111
  ...props.visibilityToggleButtonProps,
@@ -17100,7 +17134,7 @@ var PasswordInput = (0, vue.defineComponent)({
17100
17134
  toggleVisibility();
17101
17135
  }
17102
17136
  }
17103
- }, () => (0, vue.h)(VisibilityToggleIcon, { reveal: visible.value }));
17137
+ }, renderVisibilityToggleIcon);
17104
17138
  return (0, vue.h)(Input.Wrapper, {
17105
17139
  ...props.wrapperProps,
17106
17140
  id,
@@ -20275,16 +20309,17 @@ var StepperBase = (0, vue.defineComponent)({
20275
20309
  const items = [];
20276
20310
  steps.forEach((item, index) => {
20277
20311
  const itemProps = item.props ?? {};
20312
+ const itemSlots = item.children ?? {};
20278
20313
  const state = props.active === index ? "stepProgress" : props.active > index ? "stepCompleted" : "stepInactive";
20279
20314
  const selectable = typeof props.onStepClick === "function" && (typeof itemProps.allowStepSelect === "boolean" ? itemProps.allowStepSelect : state === "stepCompleted" || props.allowNextStepsSelect);
20280
20315
  items.push((0, vue.cloneVNode)(item, {
20281
- icon: itemProps.icon ?? props.icon ?? (slots.icon ? (payload) => slots.icon(payload) : index + 1),
20316
+ icon: itemSlots.icon ? itemProps.icon : itemProps.icon ?? props.icon ?? (slots.icon ? (payload) => slots.icon(payload) : index + 1),
20282
20317
  step: index,
20283
20318
  state,
20284
20319
  onClick: () => selectable && props.onStepClick?.(index),
20285
20320
  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),
20321
+ completedIcon: itemSlots.completedIcon ? itemProps.completedIcon : itemProps.completedIcon ?? props.completedIcon ?? (slots.completedIcon ? (payload) => slots.completedIcon(payload) : void 0),
20322
+ progressIcon: itemSlots.progressIcon ? itemProps.progressIcon : itemProps.progressIcon ?? props.progressIcon ?? (slots.progressIcon ? (payload) => slots.progressIcon(payload) : void 0),
20288
20323
  color: itemProps.color ?? props.color,
20289
20324
  iconSize: props.iconSize,
20290
20325
  iconPosition: itemProps.iconPosition ?? props.iconPosition,
@@ -20740,9 +20775,154 @@ Object.assign(TableOfContents, {
20740
20775
  classes: TableOfContents_module_default,
20741
20776
  varsResolver: varsResolver$14
20742
20777
  });
20743
- var FloatingWindow_module_default = { root: "_root_kejg3_1" };
20778
+ //#endregion
20779
+ //#region src/components/FloatingWindow/FloatingWindow.context.ts
20780
+ var [provideFloatingWindowContext, useFloatingWindowContext] = createSafeContext("FloatingWindow.ResizeHandle must be used within FloatingWindow");
20781
+ //#endregion
20782
+ //#region src/components/FloatingWindow/FloatingWindowResizeHandle.ts
20783
+ var KEYBOARD_STEP = 10;
20784
+ function clampDimension$1(value, min, max, viewportMax) {
20785
+ let result = value;
20786
+ if (min != null) result = Math.max(result, min);
20787
+ if (max != null) result = Math.min(result, max);
20788
+ if (viewportMax != null) result = Math.min(result, viewportMax);
20789
+ return result;
20790
+ }
20791
+ var FloatingWindowResizeHandle = withBoxProps((0, vue.defineComponent)({
20792
+ name: "FloatingWindowResizeHandle",
20793
+ inheritAttrs: false,
20794
+ props: {
20795
+ ariaLabel: {
20796
+ type: String,
20797
+ default: "Resize window"
20798
+ },
20799
+ tabindex: {
20800
+ type: Number,
20801
+ default: 0
20802
+ },
20803
+ onKeydown: Function
20804
+ },
20805
+ setup(props, { attrs, slots }) {
20806
+ const ctx = useFloatingWindowContext();
20807
+ let handle = null;
20808
+ let isResizing = false;
20809
+ let startX = 0;
20810
+ let startY = 0;
20811
+ let startWidth = 0;
20812
+ let startHeight = 0;
20813
+ const hasWidth = () => ctx.dimensions?.initialWidth != null || ctx.dimensions?.minWidth != null || ctx.dimensions?.maxWidth != null;
20814
+ const hasHeight = () => ctx.dimensions?.initialHeight != null || ctx.dimensions?.minHeight != null || ctx.dimensions?.maxHeight != null;
20815
+ const applySize = (width, height) => {
20816
+ const root = ctx.rootRef.value;
20817
+ if (!root || width === null && height === null) return;
20818
+ const rect = root.getBoundingClientRect();
20819
+ const offset = ctx.constrainOffset ?? 0;
20820
+ const maxViewportWidth = ctx.constrainToViewport ? window.innerWidth - rect.left - offset : void 0;
20821
+ const maxViewportHeight = ctx.constrainToViewport ? window.innerHeight - rect.top - offset : void 0;
20822
+ if (width !== null) root.style.width = `${clampDimension$1(width, ctx.dimensions?.minWidth, ctx.dimensions?.maxWidth, maxViewportWidth)}px`;
20823
+ if (height !== null) root.style.height = `${clampDimension$1(height, ctx.dimensions?.minHeight, ctx.dimensions?.maxHeight, maxViewportHeight)}px`;
20824
+ const resized = root.getBoundingClientRect();
20825
+ if (width !== null) handle?.setAttribute("aria-valuenow", String(Math.round(resized.width)));
20826
+ ctx.onSizeChange?.({
20827
+ width: resized.width,
20828
+ height: resized.height
20829
+ });
20830
+ };
20831
+ const end = () => {
20832
+ if (!isResizing) return;
20833
+ isResizing = false;
20834
+ document.body.style.userSelect = "";
20835
+ document.body.style.webkitUserSelect = "";
20836
+ ctx.onResizeEnd?.();
20837
+ document.removeEventListener("mousemove", move);
20838
+ document.removeEventListener("mouseup", end);
20839
+ document.removeEventListener("touchmove", move);
20840
+ document.removeEventListener("touchend", end);
20841
+ document.removeEventListener("touchcancel", end);
20842
+ };
20843
+ const move = (event) => {
20844
+ if (!isResizing) return;
20845
+ event.preventDefault();
20846
+ const point = "touches" in event ? event.touches[0] : event;
20847
+ applySize(hasWidth() ? startWidth + point.clientX - startX : null, hasHeight() ? startHeight + point.clientY - startY : null);
20848
+ };
20849
+ const start = (event) => {
20850
+ if ("button" in event && event.button !== 0) return;
20851
+ event.stopPropagation();
20852
+ event.preventDefault();
20853
+ if (!hasWidth() && !hasHeight()) return;
20854
+ const root = ctx.rootRef.value;
20855
+ if (!root) return;
20856
+ const point = "touches" in event ? event.touches[0] : event;
20857
+ const rect = root.getBoundingClientRect();
20858
+ startX = point.clientX;
20859
+ startY = point.clientY;
20860
+ startWidth = rect.width;
20861
+ startHeight = rect.height;
20862
+ isResizing = true;
20863
+ document.body.style.userSelect = "none";
20864
+ document.body.style.webkitUserSelect = "none";
20865
+ ctx.onResizeStart?.();
20866
+ document.addEventListener("mousemove", move);
20867
+ document.addEventListener("mouseup", end);
20868
+ document.addEventListener("touchmove", move, { passive: false });
20869
+ document.addEventListener("touchend", end);
20870
+ document.addEventListener("touchcancel", end);
20871
+ };
20872
+ const onKeydown = (event) => {
20873
+ props.onKeydown?.(event);
20874
+ if (event.defaultPrevented) return;
20875
+ const root = ctx.rootRef.value;
20876
+ if (!root) return;
20877
+ const rect = root.getBoundingClientRect();
20878
+ let width = null;
20879
+ let height = null;
20880
+ if (event.key === "ArrowRight" && hasWidth()) width = rect.width + KEYBOARD_STEP;
20881
+ else if (event.key === "ArrowLeft" && hasWidth()) width = rect.width - KEYBOARD_STEP;
20882
+ else if (event.key === "ArrowDown" && hasHeight()) height = rect.height + KEYBOARD_STEP;
20883
+ else if (event.key === "ArrowUp" && hasHeight()) height = rect.height - KEYBOARD_STEP;
20884
+ else if (event.key === "Home") {
20885
+ if (hasWidth()) width = ctx.dimensions?.minWidth ?? rect.width;
20886
+ if (hasHeight()) height = ctx.dimensions?.minHeight ?? rect.height;
20887
+ } else if (event.key === "End") {
20888
+ if (hasWidth()) width = ctx.dimensions?.maxWidth ?? rect.width;
20889
+ if (hasHeight()) height = ctx.dimensions?.maxHeight ?? rect.height;
20890
+ }
20891
+ if (width !== null || height !== null) {
20892
+ event.preventDefault();
20893
+ applySize(width, height);
20894
+ }
20895
+ };
20896
+ (0, vue.onMounted)(() => {
20897
+ 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))));
20898
+ });
20899
+ (0, vue.onBeforeUnmount)(end);
20900
+ return () => (0, vue.h)(Box, {
20901
+ ...attrs,
20902
+ ref: (node) => {
20903
+ handle = node?.$el ?? node;
20904
+ },
20905
+ role: "separator",
20906
+ "aria-label": attrs["aria-label"] ?? props.ariaLabel,
20907
+ "aria-valuemin": ctx.dimensions?.minWidth,
20908
+ "aria-valuemax": ctx.dimensions?.maxWidth,
20909
+ tabindex: props.tabindex,
20910
+ style: [{ touchAction: "none" }, attrs.style],
20911
+ onMousedown: start,
20912
+ onTouchstart: start,
20913
+ onKeydown
20914
+ }, () => slots.default?.());
20915
+ }
20916
+ }));
20917
+ var FloatingWindow_module_default = { root: "_root_mstr0_1" };
20744
20918
  //#endregion
20745
20919
  //#region src/components/FloatingWindow/FloatingWindow.ts
20920
+ function clampDimension(value, min, max) {
20921
+ let result = value;
20922
+ if (min != null) result = Math.max(result, min);
20923
+ if (max != null) result = Math.min(result, max);
20924
+ return result;
20925
+ }
20746
20926
  var defaultProps$7 = {
20747
20927
  constrainToViewport: true,
20748
20928
  withinPortal: true,
@@ -20808,6 +20988,22 @@ var FloatingWindow = (0, vue.defineComponent)({
20808
20988
  type: [String, Number],
20809
20989
  default: void 0
20810
20990
  },
20991
+ dimensions: {
20992
+ type: Object,
20993
+ default: void 0
20994
+ },
20995
+ onSizeChange: {
20996
+ type: Function,
20997
+ default: void 0
20998
+ },
20999
+ onResizeStart: {
21000
+ type: Function,
21001
+ default: void 0
21002
+ },
21003
+ onResizeEnd: {
21004
+ type: Function,
21005
+ default: void 0
21006
+ },
20811
21007
  shadow: {
20812
21008
  type: String,
20813
21009
  default: void 0
@@ -20844,6 +21040,7 @@ var FloatingWindow = (0, vue.defineComponent)({
20844
21040
  setup(rawProps, { attrs, slots, expose }) {
20845
21041
  const props = useProps("FloatingWindow", defaultProps$7, rawProps);
20846
21042
  const floating = (0, _mantine_vue_hooks.useFloatingWindow)(props);
21043
+ const rootRef = (0, vue.ref)(null);
20847
21044
  (0, _mantine_vue_hooks.assignRef)(props.setPositionRef, floating.setPosition);
20848
21045
  expose({ setPosition: floating.setPosition });
20849
21046
  const getStyles = useStyles({
@@ -20857,12 +21054,37 @@ var FloatingWindow = (0, vue.defineComponent)({
20857
21054
  vars: props.vars,
20858
21055
  unstyled: props.unstyled
20859
21056
  });
21057
+ provideFloatingWindowContext({
21058
+ rootRef,
21059
+ get dimensions() {
21060
+ return props.dimensions;
21061
+ },
21062
+ get constrainToViewport() {
21063
+ return props.constrainToViewport;
21064
+ },
21065
+ get constrainOffset() {
21066
+ return props.constrainOffset;
21067
+ },
21068
+ get onSizeChange() {
21069
+ return props.onSizeChange;
21070
+ },
21071
+ get onResizeStart() {
21072
+ return props.onResizeStart;
21073
+ },
21074
+ get onResizeEnd() {
21075
+ return props.onResizeEnd;
21076
+ }
21077
+ });
20860
21078
  return () => (0, vue.h)(OptionalPortal, {
20861
21079
  withinPortal: props.withinPortal,
20862
21080
  ...props.portalProps
20863
21081
  }, () => (0, vue.h)(Paper, {
20864
21082
  ...attrs,
20865
- ref: ((value) => floating.ref(value?.$el ?? value)),
21083
+ ref: ((value) => {
21084
+ const node = value?.$el ?? value;
21085
+ rootRef.value = node;
21086
+ floating.ref(node);
21087
+ }),
20866
21088
  shadow: props.shadow,
20867
21089
  radius: props.radius,
20868
21090
  withBorder: props.withBorder,
@@ -20873,13 +21095,20 @@ var FloatingWindow = (0, vue.defineComponent)({
20873
21095
  }),
20874
21096
  style: [
20875
21097
  getStyles("root").style,
20876
- { "--floating-window-z-index": String(props.zIndex) },
21098
+ {
21099
+ "--floating-window-z-index": String(props.zIndex),
21100
+ "--floating-window-width": props.dimensions?.initialWidth == null ? void 0 : `${clampDimension(props.dimensions.initialWidth, props.dimensions.minWidth, props.dimensions.maxWidth)}px`,
21101
+ "--floating-window-height": props.dimensions?.initialHeight == null ? void 0 : `${clampDimension(props.dimensions.initialHeight, props.dimensions.minHeight, props.dimensions.maxHeight)}px`
21102
+ },
20877
21103
  attrs.style
20878
21104
  ]
20879
21105
  }, () => slots.default?.()));
20880
21106
  }
20881
21107
  });
20882
- Object.assign(FloatingWindow, { classes: FloatingWindow_module_default });
21108
+ Object.assign(FloatingWindow, {
21109
+ classes: FloatingWindow_module_default,
21110
+ ResizeHandle: FloatingWindowResizeHandle
21111
+ });
20883
21112
  //#endregion
20884
21113
  //#region src/components/Slider/Slider.context.ts
20885
21114
  var [provideSliderContext, useSliderContext] = createSafeContext("SliderProvider was not found in tree");
@@ -21222,15 +21451,15 @@ var Track = (0, vue.defineComponent)({
21222
21451
  }
21223
21452
  });
21224
21453
  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"
21454
+ root: "_root_1osrz_1",
21455
+ label: "_label_1osrz_39",
21456
+ thumb: "_thumb_1osrz_65",
21457
+ trackContainer: "_trackContainer_1osrz_131",
21458
+ track: "_track_1osrz_131",
21459
+ bar: "_bar_1osrz_187",
21460
+ markWrapper: "_markWrapper_1osrz_215",
21461
+ mark: "_mark_1osrz_215",
21462
+ markLabel: "_markLabel_1osrz_257"
21234
21463
  };
21235
21464
  //#endregion
21236
21465
  //#region src/components/Slider/Slider/Slider.ts
@@ -21467,7 +21696,7 @@ var Slider = withBoxProps((0, vue.defineComponent)({
21467
21696
  max: domain.value[1]
21468
21697
  });
21469
21698
  const scaled = props.scale(current.value);
21470
- const label = slots.label ? slots.label({ value: scaled }) : typeof props.label === "function" ? props.label(scaled) : props.label;
21699
+ 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
21700
  const start = typeof props.startPointValue === "number" && !props.inverted ? getPosition$1({
21472
21701
  value: props.startPointValue,
21473
21702
  min: domain.value[0],
@@ -21800,10 +22029,10 @@ var RangeSlider = (0, vue.defineComponent)({
21800
22029
  value: props.scale(current.value[index]),
21801
22030
  position: positions[index],
21802
22031
  dragging: move.active.value && activeThumb.value === index,
21803
- label: slots.label ? slots.label({
22032
+ label: rawProps.label !== void 0 ? typeof props.label === "function" ? props.label(props.scale(current.value[index])) : props.label : slots.label?.({
21804
22033
  value: props.scale(current.value[index]),
21805
22034
  index
21806
- }) : typeof props.label === "function" ? props.label(props.scale(current.value[index])) : props.label,
22035
+ }) ?? (typeof props.label === "function" ? props.label(props.scale(current.value[index])) : props.label),
21807
22036
  labelAlwaysOn: props.labelAlwaysOn,
21808
22037
  thumbLabel: props.thumbLabel?.[index],
21809
22038
  thumbValueText: props.thumbValueText,
@@ -21814,7 +22043,7 @@ var RangeSlider = (0, vue.defineComponent)({
21814
22043
  onMousedown: () => activeThumb.value = index,
21815
22044
  onFocus: () => focused.value = index,
21816
22045
  onKeydown: (event) => keydown(index, event)
21817
- }, () => slots.thumbChildren ? slots.thumbChildren({ index }) : props.thumbChildren?.[index])) }), props.name ? [(0, vue.h)("input", {
22046
+ }, () => props.thumbChildren !== void 0 ? props.thumbChildren[index] : slots.thumbChildren?.({ index }))) }), props.name ? [(0, vue.h)("input", {
21818
22047
  type: "hidden",
21819
22048
  name: `${props.name}_from`,
21820
22049
  value: current.value[0],
@@ -24090,6 +24319,7 @@ function flattenChildren$1(children) {
24090
24319
  var SplitterBase = (0, vue.defineComponent)({
24091
24320
  name: "Splitter",
24092
24321
  inheritAttrs: false,
24322
+ slots: Object,
24093
24323
  props: {
24094
24324
  orientation: {
24095
24325
  type: String,
@@ -24236,7 +24466,7 @@ var SplitterBase = (0, vue.defineComponent)({
24236
24466
  ...getStyles("thumb"),
24237
24467
  "data-orientation": props.orientation,
24238
24468
  "data-active": splitter.activeHandle === handleIndex || void 0
24239
- }, [props.handleIcon !== void 0 ? props.handleIcon : (0, vue.h)(props.orientation === "vertical" ? GripHorizontalIcon : GripVerticalIcon)]) : void 0));
24469
+ }, [props.handleIcon !== void 0 || slots.handleIcon ? resolveNode(props.handleIcon, slots.handleIcon) : (0, vue.h)(props.orientation === "vertical" ? GripHorizontalIcon : GripVerticalIcon)]) : void 0));
24240
24470
  }
24241
24471
  items.push((0, vue.cloneVNode)(child, {
24242
24472
  key: `pane-${index}`,
@@ -24496,7 +24726,10 @@ var TreeNode = (0, vue.defineComponent)({
24496
24726
  },
24497
24727
  setup(props) {
24498
24728
  const element = (0, vue.ref)(null);
24499
- const hasChildren = () => Array.isArray(props.node.children) || !!props.node.hasChildren && !Array.isArray(props.node.children);
24729
+ const hasChildren = () => {
24730
+ const hasLoadedChildren = Array.isArray(props.node.children) && props.node.children.length > 0;
24731
+ return hasLoadedChildren || !!props.node.hasChildren && !hasLoadedChildren;
24732
+ };
24500
24733
  const expanded = () => props.controller.expandedState.value[props.node.value] || false;
24501
24734
  const dnd = useTreeNodeDragDrop({
24502
24735
  nodeValue: props.node.value,
@@ -24512,13 +24745,20 @@ var TreeNode = (0, vue.defineComponent)({
24512
24745
  if (event.code === "ArrowRight") {
24513
24746
  event.stopPropagation();
24514
24747
  event.preventDefault();
24515
- if (expanded()) element.value?.querySelector("[role=treeitem]")?.focus();
24516
- else if (hasChildren()) props.controller.expand(props.node.value);
24748
+ if (expanded()) {
24749
+ const nextNode = element.value?.querySelector("[role=treeitem]");
24750
+ nextNode?.setAttribute("data-focus-ring", "true");
24751
+ nextNode?.focus();
24752
+ } else if (hasChildren()) props.controller.expand(props.node.value);
24517
24753
  } else if (event.code === "ArrowLeft") {
24518
24754
  event.stopPropagation();
24519
24755
  event.preventDefault();
24520
24756
  if (expanded() && hasChildren()) props.controller.collapse(props.node.value);
24521
- else if (props.isSubtree) element.value?.parentElement?.closest("[role=treeitem]")?.focus();
24757
+ else if (props.isSubtree) {
24758
+ const parentNode = element.value?.parentElement?.closest("[role=treeitem]");
24759
+ parentNode?.setAttribute("data-focus-ring", "true");
24760
+ parentNode?.focus();
24761
+ }
24522
24762
  } else if (event.code === "ArrowDown" || event.code === "ArrowUp") {
24523
24763
  const root = element.value?.closest("[data-tree-root]");
24524
24764
  if (!root || !element.value) return;
@@ -24527,6 +24767,7 @@ var TreeNode = (0, vue.defineComponent)({
24527
24767
  const nodes = Array.from(root.querySelectorAll("[role=treeitem]")).filter((node) => visible(node, root));
24528
24768
  const index = nodes.indexOf(element.value);
24529
24769
  const next = nodes[event.code === "ArrowDown" ? index + 1 : index - 1];
24770
+ next?.setAttribute("data-focus-ring", "true");
24530
24771
  next?.focus();
24531
24772
  if (event.shiftKey && next) props.controller.setSelectedState(getValuesRange(props.controller.anchorNode.value, next.dataset.value, props.flatValues));
24532
24773
  } else if (event.code === "Space") {
@@ -24611,6 +24852,10 @@ var TreeNode = (0, vue.defineComponent)({
24611
24852
  "data-level": props.level,
24612
24853
  tabindex: props.rootIndex === 0 ? 0 : -1,
24613
24854
  onKeydown,
24855
+ onBlur: (event) => {
24856
+ const currentTarget = event.currentTarget;
24857
+ if (!currentTarget.contains(event.relatedTarget)) currentTarget.removeAttribute("data-focus-ring");
24858
+ },
24614
24859
  ref: element
24615
24860
  }, [
24616
24861
  label,
@@ -24871,12 +25116,12 @@ function useTree(input = {}) {
24871
25116
  };
24872
25117
  }
24873
25118
  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"
25119
+ root: "_root_ea12t_7",
25120
+ subtree: "_subtree_ea12t_13",
25121
+ node: "_node_ea12t_18",
25122
+ label: "_label_ea12t_27",
25123
+ flatLine: "_flatLine_ea12t_126",
25124
+ flatLineClosing: "_flatLineClosing_ea12t_152"
24880
25125
  };
24881
25126
  //#endregion
24882
25127
  //#region src/components/Tree/Tree.ts
@@ -24887,6 +25132,7 @@ var varsResolver$8 = createVarsResolver((_, { levelOffset }) => ({ root: { "--le
24887
25132
  var Tree = withBoxProps((0, vue.defineComponent)({
24888
25133
  name: "Tree",
24889
25134
  inheritAttrs: false,
25135
+ slots: Object,
24890
25136
  props: {
24891
25137
  component: {
24892
25138
  type: [
@@ -25002,7 +25248,7 @@ var Tree = withBoxProps((0, vue.defineComponent)({
25002
25248
  (0, vue.onBeforeUnmount)(() => document.removeEventListener("mousedown", outside));
25003
25249
  return () => {
25004
25250
  const flatValues = getFlatValues(props.data);
25005
- const renderNode = props.renderNode || (slots.node ? (payload) => slots.node?.(payload) : void 0);
25251
+ const renderNode = props.renderNode || (slots.renderNode ? (payload) => slots.renderNode?.(payload) : slots.node ? (payload) => slots.node?.(payload) : void 0);
25006
25252
  const nodes = props.data.map((node, index) => (0, vue.h)(TreeNode, {
25007
25253
  key: node.value,
25008
25254
  node,
@@ -25289,7 +25535,7 @@ function filterTreeData(data, query, filter = defaultTreeNodeFilter) {
25289
25535
  function flattenTo$1(acc, data, state, parent, level, ancestorIsLast) {
25290
25536
  data.forEach((node, index) => {
25291
25537
  const isLast = index === data.length - 1;
25292
- const loaded = Array.isArray(node.children);
25538
+ const loaded = Array.isArray(node.children) && node.children.length > 0;
25293
25539
  const hasChildren = loaded || !!node.hasChildren && !loaded;
25294
25540
  const expanded = state[node.value] || false;
25295
25541
  const linesPath = [];
@@ -25783,6 +26029,10 @@ var ModalRoot = (0, vue.defineComponent)({
25783
26029
  type: Function,
25784
26030
  required: true
25785
26031
  },
26032
+ keepMounted: {
26033
+ type: Boolean,
26034
+ default: false
26035
+ },
25786
26036
  centered: Boolean,
25787
26037
  fullScreen: Boolean,
25788
26038
  radius: [String, Number],
@@ -25845,6 +26095,7 @@ var ModalRoot = (0, vue.defineComponent)({
25845
26095
  ...attrs,
25846
26096
  opened: props.opened,
25847
26097
  onClose: props.onClose,
26098
+ keepMounted: props.keepMounted,
25848
26099
  unstyled: props.unstyled,
25849
26100
  ...getStyles("root"),
25850
26101
  mod: {
@@ -25899,6 +26150,10 @@ var ModalBaseComponent = (0, vue.defineComponent)({
25899
26150
  type: Function,
25900
26151
  required: true
25901
26152
  },
26153
+ keepMounted: {
26154
+ type: Boolean,
26155
+ default: false
26156
+ },
25902
26157
  title: {
25903
26158
  type: null,
25904
26159
  default: void 0
@@ -25921,7 +26176,8 @@ var ModalBaseComponent = (0, vue.defineComponent)({
25921
26176
  return (0, vue.h)(ModalRoot, {
25922
26177
  ...attrs,
25923
26178
  opened: props.opened,
25924
- onClose: props.onClose
26179
+ onClose: props.onClose,
26180
+ keepMounted: props.keepMounted
25925
26181
  }, { 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
26182
  };
25927
26183
  }
@@ -26046,6 +26302,10 @@ var DrawerRoot = (0, vue.defineComponent)({
26046
26302
  type: Function,
26047
26303
  required: true
26048
26304
  },
26305
+ keepMounted: {
26306
+ type: Boolean,
26307
+ default: false
26308
+ },
26049
26309
  position: {
26050
26310
  type: String,
26051
26311
  default: "left"
@@ -26105,6 +26365,7 @@ var DrawerRoot = (0, vue.defineComponent)({
26105
26365
  ...attrs,
26106
26366
  opened: props.opened,
26107
26367
  onClose: props.onClose,
26368
+ keepMounted: props.keepMounted,
26108
26369
  unstyled: props.unstyled,
26109
26370
  ...getStyles("root"),
26110
26371
  transitionProps: {
@@ -26163,6 +26424,10 @@ var DrawerBaseComponent = (0, vue.defineComponent)({
26163
26424
  type: Function,
26164
26425
  required: true
26165
26426
  },
26427
+ keepMounted: {
26428
+ type: Boolean,
26429
+ default: false
26430
+ },
26166
26431
  title: {
26167
26432
  type: null,
26168
26433
  default: void 0
@@ -26220,6 +26485,7 @@ var DrawerBaseComponent = (0, vue.defineComponent)({
26220
26485
  ...attrs,
26221
26486
  opened: props.opened,
26222
26487
  onClose: props.onClose,
26488
+ keepMounted: props.keepMounted,
26223
26489
  zIndex: resolvedZIndex.value,
26224
26490
  ...stackProps.value
26225
26491
  }, { default: () => [props.withOverlay && (0, vue.h)(DrawerOverlay, {
@@ -26244,14 +26510,17 @@ var Drawer = Object.assign(DrawerBaseComponent, {
26244
26510
  });
26245
26511
  //#endregion
26246
26512
  //#region src/utils/Floating/FloatingArrow/get-arrow-position-styles.ts
26513
+ function px$1(value) {
26514
+ return value === void 0 ? void 0 : `${value}px`;
26515
+ }
26247
26516
  function horizontalSide(placement, arrowY, offset, position) {
26248
- if (placement === "center" || position === "center") return { top: arrowY };
26249
- return placement === "end" ? { bottom: offset } : { top: offset };
26517
+ if (placement === "center" || position === "center") return { top: px$1(arrowY) };
26518
+ return placement === "end" ? { bottom: px$1(offset) } : { top: px$1(offset) };
26250
26519
  }
26251
26520
  function verticalSide(placement, arrowX, offset, position, dir) {
26252
- if (placement === "center" || position === "center") return { left: arrowX };
26253
- if (placement === "end") return { [dir === "ltr" ? "right" : "left"]: offset };
26254
- return { [dir === "ltr" ? "left" : "right"]: offset };
26521
+ if (placement === "center" || position === "center") return { left: px$1(arrowX) };
26522
+ if (placement === "end") return { [dir === "ltr" ? "right" : "left"]: px$1(offset) };
26523
+ return { [dir === "ltr" ? "left" : "right"]: px$1(offset) };
26255
26524
  }
26256
26525
  var radiusBySide = {
26257
26526
  bottom: "borderTopLeftRadius",
@@ -26272,15 +26541,15 @@ function mergeStyles(position, size, dir) {
26272
26541
  const startShape = placement === "start" !== (dir === "rtl");
26273
26542
  return {
26274
26543
  ...base,
26275
- [side === "bottom" ? "top" : "bottom"]: -size,
26276
- [physical]: 0,
26544
+ [side === "bottom" ? "top" : "bottom"]: px$1(-size),
26545
+ [physical]: px$1(0),
26277
26546
  clipPath: side === "bottom" ? startShape ? "polygon(0% 0%, 0% 100%, 100% 100%)" : "polygon(100% 0%, 0% 100%, 100% 100%)" : startShape ? "polygon(0% 0%, 100% 0%, 0% 100%)" : "polygon(0% 0%, 100% 0%, 100% 100%)"
26278
26547
  };
26279
26548
  }
26280
26549
  return {
26281
26550
  ...base,
26282
- [side === "left" ? "right" : "left"]: -size,
26283
- [placement === "start" ? "top" : "bottom"]: 0,
26551
+ [side === "left" ? "right" : "left"]: px$1(-size),
26552
+ [placement === "start" ? "top" : "bottom"]: px$1(0),
26284
26553
  clipPath: side === "left" ? placement === "start" ? "polygon(0% 0%, 100% 0%, 0% 100%)" : "polygon(0% 0%, 0% 100%, 100% 100%)" : placement === "start" ? "polygon(0% 0%, 100% 0%, 100% 100%)" : "polygon(100% 0%, 0% 100%, 100% 100%)"
26285
26554
  };
26286
26555
  }
@@ -26297,7 +26566,7 @@ function getArrowPositionStyles(input) {
26297
26566
  position: "absolute",
26298
26567
  [radiusBySide[side]]: `${input.arrowRadius}px`
26299
26568
  };
26300
- const edge = -input.arrowSize / 2;
26569
+ const edge = px$1(-input.arrowSize / 2);
26301
26570
  if (side === "left") return {
26302
26571
  ...base,
26303
26572
  ...horizontalSide(placement, input.arrowY, input.arrowOffset, input.arrowPosition),
@@ -26373,6 +26642,7 @@ var FloatingArrow = (0, vue.defineComponent)({
26373
26642
  setup(props, { attrs }) {
26374
26643
  const { dir } = useDirection();
26375
26644
  return () => props.visible ? (0, vue.h)("div", {
26645
+ role: "presentation",
26376
26646
  ...attrs,
26377
26647
  style: [attrs.style, getArrowPositionStyles({
26378
26648
  ...props,
@@ -26417,7 +26687,7 @@ function useDelayedHover(input) {
26417
26687
  }
26418
26688
  //#endregion
26419
26689
  //#region src/utils/Floating/use-context-menu-handlers.ts
26420
- function call$3(handler, event) {
26690
+ function call$4(handler, event) {
26421
26691
  if (Array.isArray(handler)) handler.forEach((item) => typeof item === "function" && item(event));
26422
26692
  else if (typeof handler === "function") handler(event);
26423
26693
  }
@@ -26469,11 +26739,11 @@ function useContextMenuHandlers(options) {
26469
26739
  });
26470
26740
  return {
26471
26741
  onMousedown: (event) => {
26472
- call$3(options.childProps.onMousedown ?? options.childProps.onMouseDown, event);
26742
+ call$4(options.childProps.onMousedown ?? options.childProps.onMouseDown, event);
26473
26743
  if (!options.disabled && event.button === 2) event.stopPropagation();
26474
26744
  },
26475
26745
  onContextmenu: (event) => {
26476
- call$3(options.childProps.onContextmenu ?? options.childProps.onContextMenu, event);
26746
+ call$4(options.childProps.onContextmenu ?? options.childProps.onContextMenu, event);
26477
26747
  if (options.disabled || event.defaultPrevented) return;
26478
26748
  event.preventDefault();
26479
26749
  if (gestureHandled.value) return;
@@ -26481,19 +26751,19 @@ function useContextMenuHandlers(options) {
26481
26751
  if (touchActive.value) gestureHandled.value = true;
26482
26752
  },
26483
26753
  onTouchstart: (event) => {
26484
- call$3(options.childProps.onTouchstart ?? options.childProps.onTouchStart, event);
26754
+ call$4(options.childProps.onTouchstart ?? options.childProps.onTouchStart, event);
26485
26755
  longPress.onTouchstart?.(event);
26486
26756
  },
26487
26757
  onTouchend: (event) => {
26488
- call$3(options.childProps.onTouchend ?? options.childProps.onTouchEnd, event);
26758
+ call$4(options.childProps.onTouchend ?? options.childProps.onTouchEnd, event);
26489
26759
  longPress.onTouchend?.(event);
26490
26760
  },
26491
26761
  onTouchcancel: (event) => {
26492
- call$3(options.childProps.onTouchcancel ?? options.childProps.onTouchCancel, event);
26762
+ call$4(options.childProps.onTouchcancel ?? options.childProps.onTouchCancel, event);
26493
26763
  longPress.onTouchcancel?.(event);
26494
26764
  },
26495
26765
  onTouchmove: (event) => {
26496
- call$3(options.childProps.onTouchmove ?? options.childProps.onTouchMove, event);
26766
+ call$4(options.childProps.onTouchmove ?? options.childProps.onTouchMove, event);
26497
26767
  longPress.onTouchmove?.(event);
26498
26768
  },
26499
26769
  style: options.disabled ? options.childProps.style : {
@@ -26549,7 +26819,7 @@ function one$3(slots, name) {
26549
26819
  if (children.length !== 1) throw new Error(`${name} component children should be a single element or component that accepts ref`);
26550
26820
  return children[0];
26551
26821
  }
26552
- function call$2(handler, event) {
26822
+ function call$3(handler, event) {
26553
26823
  if (Array.isArray(handler)) handler.forEach((fn) => fn?.(event));
26554
26824
  else handler?.(event);
26555
26825
  }
@@ -26589,7 +26859,7 @@ var PopoverTarget = (0, vue.defineComponent)({
26589
26859
  });
26590
26860
  if (!ctx.controlled) forwarded.onClick = (event) => {
26591
26861
  ctx.onToggle();
26592
- call$2(childProps.onClick, event);
26862
+ call$3(childProps.onClick, event);
26593
26863
  };
26594
26864
  return (0, vue.cloneVNode)(child, forwarded, true);
26595
26865
  };
@@ -26665,7 +26935,7 @@ var PopoverDropdown = (0, vue.defineComponent)({
26665
26935
  "data-position": ctx.placement,
26666
26936
  "data-fixed": ctx.floatingStrategy === "fixed" || void 0,
26667
26937
  onKeydownCapture: (event) => {
26668
- call$2(attrs.onKeydownCapture, event);
26938
+ call$3(attrs.onKeydownCapture, event);
26669
26939
  if (event.key === "Escape" && ctx.closeOnEscape) {
26670
26940
  ctx.onClose();
26671
26941
  ctx.onDismiss?.();
@@ -26819,7 +27089,11 @@ var PopoverBase = (0, vue.defineComponent)({
26819
27089
  ...shiftOptions
26820
27090
  };
26821
27091
  }));
26822
- result.push((0, _floating_ui_vue.arrow)({ element: arrowElement }));
27092
+ if (props.middlewares?.inline) result.push((0, _floating_ui_vue.inline)(typeof props.middlewares.inline === "object" ? props.middlewares.inline : void 0));
27093
+ result.push((0, _floating_ui_vue.arrow)({
27094
+ element: arrowElement,
27095
+ padding: props.arrowOffset
27096
+ }));
26823
27097
  if (props.middlewares?.size || props.width === "target") result.push((0, _floating_ui_vue.size)({
26824
27098
  ...typeof props.middlewares?.size === "object" ? props.middlewares.size : {},
26825
27099
  apply: ({ rects, availableWidth, availableHeight, elements, ...rest }) => {
@@ -27497,7 +27771,7 @@ var Tooltip = Object.assign(TooltipBase, {
27497
27771
  var [provideHoverCardContext, useHoverCardContext] = createSafeContext("HoverCard component was not found in the tree");
27498
27772
  //#endregion
27499
27773
  //#region src/components/HoverCard/HoverCardDropdown/HoverCardDropdown.ts
27500
- function call$1(handler, event) {
27774
+ function call$2(handler, event) {
27501
27775
  if (Array.isArray(handler)) handler.forEach((fn) => fn?.(event));
27502
27776
  else handler?.(event);
27503
27777
  }
@@ -27509,11 +27783,11 @@ var HoverCardDropdown = (0, vue.defineComponent)({
27509
27783
  return () => (0, vue.h)(PopoverDropdown, {
27510
27784
  ...attrs,
27511
27785
  onMouseenter: (event) => {
27512
- call$1(attrs.onMouseenter ?? attrs.onMouseEnter, event);
27786
+ call$2(attrs.onMouseenter ?? attrs.onMouseEnter, event);
27513
27787
  ctx.openDropdown();
27514
27788
  },
27515
27789
  onMouseleave: (event) => {
27516
- call$1(attrs.onMouseleave ?? attrs.onMouseLeave, event);
27790
+ call$2(attrs.onMouseleave ?? attrs.onMouseLeave, event);
27517
27791
  ctx.closeDropdown();
27518
27792
  }
27519
27793
  }, slots);
@@ -27716,7 +27990,7 @@ var Menu_module_default = {
27716
27990
  };
27717
27991
  //#endregion
27718
27992
  //#region src/components/Menu/Menu.ts
27719
- function call(handler, event) {
27993
+ function call$1(handler, event) {
27720
27994
  if (Array.isArray(handler)) handler.forEach((fn) => fn?.(event));
27721
27995
  else handler?.(event);
27722
27996
  }
@@ -27837,6 +28111,9 @@ var MenuBase = (0, vue.defineComponent)({
27837
28111
  get hasSearch() {
27838
28112
  return searchCount.value > 0;
27839
28113
  },
28114
+ get withInitialFocusPlaceholder() {
28115
+ return props.withInitialFocusPlaceholder;
28116
+ },
27840
28117
  registerSearch: () => {
27841
28118
  searchCount.value += 1;
27842
28119
  return () => {
@@ -27936,7 +28213,7 @@ var MenuDropdown = (0, vue.defineComponent)({
27936
28213
  onMouseenter: ctx.trigger !== "click" ? ctx.openDropdown : void 0,
27937
28214
  onMouseleave: ctx.trigger !== "click" ? ctx.closeDropdown : void 0,
27938
28215
  onKeydown: (event) => {
27939
- call(attrs.onKeydown, event);
28216
+ call$1(attrs.onKeydown, event);
27940
28217
  if (event.defaultPrevented || ctx.hasSearch) return;
27941
28218
  const root = event.currentTarget;
27942
28219
  const active = document.activeElement;
@@ -27959,7 +28236,13 @@ var MenuDropdown = (0, vue.defineComponent)({
27959
28236
  menuItems(root).find((item) => item.textContent?.trim().toLowerCase().startsWith(query))?.focus();
27960
28237
  }
27961
28238
  }
27962
- }, slots);
28239
+ }, () => [ctx.withInitialFocusPlaceholder && !ctx.hasSearch ? (0, vue.h)("div", {
28240
+ role: "presentation",
28241
+ tabindex: -1,
28242
+ "data-autofocus": true,
28243
+ "data-mantine-stop-propagation": true,
28244
+ style: { outline: 0 }
28245
+ }) : null, slots.default?.()]);
27963
28246
  }
27964
28247
  });
27965
28248
  var MenuItem = (0, vue.defineComponent)({
@@ -28018,7 +28301,7 @@ var MenuItem = (0, vue.defineComponent)({
28018
28301
  }),
28019
28302
  onMousedown: (event) => event.preventDefault(),
28020
28303
  onClick: (event) => {
28021
- call(attrs.onClick, event);
28304
+ call$1(attrs.onClick, event);
28022
28305
  if (!props.disabled && !attrs["data-disabled"] && (props.closeMenuOnClick ?? ctx.closeOnItemClick)) ctx.closeDropdownImmediately();
28023
28306
  }
28024
28307
  }, () => [
@@ -28120,16 +28403,16 @@ var MenuSearch = (0, vue.defineComponent)({
28120
28403
  }
28121
28404
  },
28122
28405
  onInput: (event) => {
28123
- call(attrs.onInput, event);
28124
- call(attrs.onChange, event);
28406
+ call$1(attrs.onInput, event);
28407
+ call$1(attrs.onChange, event);
28125
28408
  clearActive(event.currentTarget.closest("[data-menu-dropdown]"));
28126
28409
  },
28127
28410
  onChange: (event) => {
28128
- call(attrs.onChange, event);
28411
+ call$1(attrs.onChange, event);
28129
28412
  clearActive(event.currentTarget.closest("[data-menu-dropdown]"));
28130
28413
  },
28131
28414
  onKeydown: (event) => {
28132
- call(attrs.onKeydown ?? attrs.onKeyDown, event);
28415
+ call$1(attrs.onKeydown ?? attrs.onKeyDown, event);
28133
28416
  if (event.defaultPrevented) return;
28134
28417
  const root = event.currentTarget.closest("[data-menu-dropdown]");
28135
28418
  const items = menuItems(root);
@@ -28402,13 +28685,13 @@ var MenuSubTarget = (0, vue.defineComponent)({
28402
28685
  const childProps = child.props ?? {};
28403
28686
  return (0, vue.cloneVNode)(child, {
28404
28687
  onClick: (event) => {
28405
- call(childProps.onClick, event);
28688
+ call$1(childProps.onClick, event);
28406
28689
  ctx.toggleDropdown();
28407
28690
  },
28408
28691
  onMouseenter: ctx.openDropdown,
28409
28692
  onMouseleave: ctx.closeDropdown,
28410
28693
  onKeydown: (event) => {
28411
- call(childProps.onKeydown ?? childProps.onKeyDown, event);
28694
+ call$1(childProps.onKeydown ?? childProps.onKeyDown, event);
28412
28695
  if (event.defaultPrevented) return;
28413
28696
  if (event.key === "ArrowRight") {
28414
28697
  event.preventDefault();
@@ -28428,7 +28711,7 @@ var MenuSubDropdown = (0, vue.defineComponent)({
28428
28711
  return () => (0, vue.h)(MenuDropdown, {
28429
28712
  ...attrs,
28430
28713
  onKeydown: (event) => {
28431
- call(attrs.onKeydown, event);
28714
+ call$1(attrs.onKeydown, event);
28432
28715
  if (event.defaultPrevented) return;
28433
28716
  const currentDropdown = event.currentTarget;
28434
28717
  const focused = event.target;
@@ -29910,7 +30193,8 @@ var OptionsDropdown = (0, vue.defineComponent)({
29910
30193
  return () => {
29911
30194
  validateOptions(props.data);
29912
30195
  const renderOption = props.renderOption ?? (slots.renderOption ? (input) => slots.renderOption(input) : void 0);
29913
- const nothingFound = props.nothingFoundMessage ?? (slots.nothingFound ? slots.nothingFound() : void 0);
30196
+ const nothingFoundSlot = slots.nothingFoundMessage ?? slots.nothingFound;
30197
+ const nothingFound = props.nothingFoundMessage ?? (nothingFoundSlot ? nothingFoundSlot() : void 0);
29914
30198
  const data = typeof props.search === "string" ? (props.filter || defaultOptionsFilter)({
29915
30199
  options: props.data,
29916
30200
  search: props.filterOptions ? props.search : "",
@@ -30274,8 +30558,8 @@ var ComboboxPopoverBase = (0, vue.defineComponent)({
30274
30558
  }
30275
30559
  if (props.searchable) handleSearchChange("");
30276
30560
  };
30277
- const resolveRenderOption = () => props.renderOption ?? (slots.option ? (input) => slots.option(input) : void 0);
30278
- const resolveNothingFound = () => resolveNode(props.nothingFoundMessage, slots.nothingFound);
30561
+ const resolveRenderOption = () => props.renderOption ?? (slots.renderOption ?? slots.option ? (input) => (slots.renderOption ?? slots.option)(input) : void 0);
30562
+ const resolveNothingFound = () => resolveNode(props.nothingFoundMessage, slots.nothingFoundMessage ?? slots.nothingFound);
30279
30563
  const renderSearchableDropdown = () => {
30280
30564
  const filteredData = (props.filter || defaultOptionsFilter)({
30281
30565
  options: parsedData.value,
@@ -31127,7 +31411,7 @@ var Select = (0, vue.defineComponent)({
31127
31411
  scrollAreaProps: props.scrollAreaProps
31128
31412
  }, {
31129
31413
  renderOption: slots.renderOption,
31130
- nothingFound: slots.nothingFound
31414
+ nothingFound: slots.nothingFoundMessage ?? slots.nothingFound
31131
31415
  })]), (0, vue.h)(Combobox.HiddenInput, {
31132
31416
  value: current(),
31133
31417
  name: attrs.name,
@@ -31489,12 +31773,13 @@ var MultiSelect = (0, vue.defineComponent)({
31489
31773
  label: String(item)
31490
31774
  };
31491
31775
  const onRemove = () => remove(item);
31492
- return props.renderPill ? props.renderPill({
31776
+ const renderPillInput = {
31493
31777
  option,
31494
31778
  value: item,
31495
31779
  onRemove,
31496
31780
  disabled
31497
- }) : (0, vue.h)(Pill, {
31781
+ };
31782
+ return props.renderPill ? props.renderPill(renderPillInput) : slots.renderPill ? slots.renderPill(renderPillInput) : (0, vue.h)(Pill, {
31498
31783
  key: `${String(item)}-${index}`,
31499
31784
  withRemoveButton: !readOnly && !option.disabled,
31500
31785
  disabled,
@@ -31533,7 +31818,7 @@ var MultiSelect = (0, vue.defineComponent)({
31533
31818
  filter: props.filter,
31534
31819
  limit: props.limit,
31535
31820
  filterOptions: props.searchable,
31536
- hiddenWhenEmpty: props.nothingFoundMessage == null && !slots.nothingFound,
31821
+ hiddenWhenEmpty: props.nothingFoundMessage == null && !slots.nothingFoundMessage && !slots.nothingFound,
31537
31822
  nothingFoundMessage: props.nothingFoundMessage,
31538
31823
  value: values,
31539
31824
  withCheckIcon: props.withCheckIcon,
@@ -31545,7 +31830,7 @@ var MultiSelect = (0, vue.defineComponent)({
31545
31830
  scrollAreaProps: props.scrollAreaProps
31546
31831
  }, {
31547
31832
  renderOption: slots.renderOption,
31548
- nothingFound: slots.nothingFound
31833
+ nothingFound: slots.nothingFoundMessage ?? slots.nothingFound
31549
31834
  })]), (0, vue.h)(Combobox.HiddenInput, {
31550
31835
  value: values,
31551
31836
  valuesDivider: props.hiddenInputValuesDivider,
@@ -31764,17 +32049,17 @@ var TagsInput = (0, vue.defineComponent)({
31764
32049
  rightSection: slots.rightSection,
31765
32050
  default: () => (0, vue.h)(Pill.Group, null, () => [...current.map((item, index) => {
31766
32051
  const onRemove = () => removeAt(index);
31767
- const option = lockup.value[item] ?? {
31768
- value: item,
31769
- label: item,
31770
- disabled: false
31771
- };
31772
- return props.renderPill ? props.renderPill({
31773
- option,
32052
+ const renderPillInput = {
32053
+ option: lockup.value[item] ?? {
32054
+ value: item,
32055
+ label: item,
32056
+ disabled: false
32057
+ },
31774
32058
  value: item,
31775
32059
  onRemove,
31776
32060
  disabled
31777
- }) : (0, vue.h)(Pill, {
32061
+ };
32062
+ return props.renderPill ? props.renderPill(renderPillInput) : slots.renderPill ? slots.renderPill(renderPillInput) : (0, vue.h)(Pill, {
31778
32063
  key: `${item}-${index}`,
31779
32064
  withRemoveButton: !readOnly,
31780
32065
  disabled,
@@ -31825,7 +32110,7 @@ var TagsInput = (0, vue.defineComponent)({
31825
32110
  search: search(),
31826
32111
  filter: props.filter,
31827
32112
  limit: props.limit,
31828
- hiddenWhenEmpty: props.nothingFoundMessage == null && !slots.nothingFound,
32113
+ hiddenWhenEmpty: props.nothingFoundMessage == null && !slots.nothingFoundMessage && !slots.nothingFound,
31829
32114
  nothingFoundMessage: props.nothingFoundMessage,
31830
32115
  withScrollArea: props.withScrollArea,
31831
32116
  maxDropdownHeight: props.maxDropdownHeight,
@@ -31833,7 +32118,7 @@ var TagsInput = (0, vue.defineComponent)({
31833
32118
  scrollAreaProps: props.scrollAreaProps
31834
32119
  }, {
31835
32120
  renderOption: slots.renderOption,
31836
- nothingFound: slots.nothingFound
32121
+ nothingFound: slots.nothingFoundMessage ?? slots.nothingFound
31837
32122
  })]), (0, vue.h)(Combobox.HiddenInput, {
31838
32123
  value: current,
31839
32124
  valuesDivider: props.hiddenInputValuesDivider,
@@ -31895,6 +32180,7 @@ var ColorInput_module_default = {
31895
32180
  var ColorInput = (0, vue.defineComponent)({
31896
32181
  name: "ColorInput",
31897
32182
  inheritAttrs: false,
32183
+ slots: Object,
31898
32184
  props: {
31899
32185
  modelValue: String,
31900
32186
  value: String,
@@ -31989,7 +32275,7 @@ var ColorInput = (0, vue.defineComponent)({
31989
32275
  class: ColorInput_module_default.eyeDropperButton,
31990
32276
  "aria-label": "Pick color from screen",
31991
32277
  onClick: useEyeDropper
31992
- }, () => props.eyeDropperIcon ?? (0, vue.h)(EyeDropperIcon, { class: ColorInput_module_default.eyeDropperIcon })) : void 0;
32278
+ }, () => resolveNode(props.eyeDropperIcon, slots.eyeDropperIcon) ?? (0, vue.h)(EyeDropperIcon, { class: ColorInput_module_default.eyeDropperIcon })) : void 0;
31993
32279
  return (0, vue.h)(Popover, {
31994
32280
  position: "bottom-start",
31995
32281
  offset: 5,
@@ -32072,7 +32358,7 @@ function flattenTo(acc, data, expandedSet, parent, level, parentGuides) {
32072
32358
  for (let i = 0; i < data.length; i++) {
32073
32359
  const node = data[i];
32074
32360
  const isLast = i === data.length - 1;
32075
- const hasLoadedChildren = Array.isArray(node.children);
32361
+ const hasLoadedChildren = Array.isArray(node.children) && node.children.length > 0;
32076
32362
  const hasAsyncChildren = !!node.hasChildren && !hasLoadedChildren;
32077
32363
  const hasChildren = hasLoadedChildren || hasAsyncChildren;
32078
32364
  const expanded = expandedSet.has(node.value);
@@ -32185,6 +32471,11 @@ var TreeSelectOption = (0, vue.defineComponent)({
32185
32471
  const paddingInlineStart = BASE_PADDING + (props.level - 1) * LEVEL_OFFSET + (props.withLines && props.level > 1 ? LINE_CONTENT_GAP : 0) + (!props.hasChildren ? OPTION_GAP : 0);
32186
32472
  const isActive = props.selected || props.checked;
32187
32473
  const ariaChecked = props.showCheckbox ? props.indeterminate && !props.checked ? "mixed" : props.checked : void 0;
32474
+ const expand = (event) => {
32475
+ event?.preventDefault();
32476
+ event?.stopPropagation();
32477
+ if (props.hasChildren) props.onToggleExpand?.(props.node.value);
32478
+ };
32188
32479
  const payload = {
32189
32480
  node: props.node,
32190
32481
  level: props.level,
@@ -32192,7 +32483,8 @@ var TreeSelectOption = (0, vue.defineComponent)({
32192
32483
  hasChildren: props.hasChildren,
32193
32484
  selected: props.selected,
32194
32485
  checked: props.checked,
32195
- indeterminate: props.indeterminate
32486
+ indeterminate: props.indeterminate,
32487
+ expand
32196
32488
  };
32197
32489
  const lineElements = props.withLines && props.level > 1 ? [
32198
32490
  ...props.lineGuides.map((show, g) => show ? (0, vue.h)("span", {
@@ -32235,16 +32527,10 @@ var TreeSelectOption = (0, vue.defineComponent)({
32235
32527
  "aria-label": props.expanded ? props.chevronAriaLabels?.collapse ?? "Collapse" : props.chevronAriaLabels?.expand ?? "Expand",
32236
32528
  onMousedown: (event) => event.preventDefault(),
32237
32529
  onClick: (event) => {
32238
- event.preventDefault();
32239
- event.stopPropagation();
32240
- props.onToggleExpand?.(props.node.value);
32530
+ expand(event);
32241
32531
  },
32242
32532
  onKeydown: (event) => {
32243
- if (event.key === "Enter") {
32244
- event.preventDefault();
32245
- event.stopPropagation();
32246
- props.onToggleExpand?.(props.node.value);
32247
- }
32533
+ if (event.key === "Enter") expand(event);
32248
32534
  }
32249
32535
  }, (0, vue.h)(AccordionChevron, { size: "80%" })) : null,
32250
32536
  props.showCheckbox ? (0, vue.h)(CheckboxIndicator, {
@@ -32459,7 +32745,8 @@ var TreeSelect = (0, vue.defineComponent)({
32459
32745
  const multiValues = selectedArray();
32460
32746
  const hasValue = isMulti() ? multiValues.length > 0 : current() != null;
32461
32747
  const canClear = props.clearable && hasValue && !disabled && !readOnly;
32462
- const nothingFound = props.nothingFoundMessage ?? (slots.nothingFound ? slots.nothingFound() : void 0);
32748
+ const nothingFoundSlot = slots.nothingFoundMessage ?? slots.nothingFound;
32749
+ const nothingFound = props.nothingFoundMessage ?? (nothingFoundSlot ? nothingFoundSlot() : void 0);
32463
32750
  const renderNode = props.renderNode ?? (slots.renderNode ? (payload) => slots.renderNode(payload) : void 0);
32464
32751
  const clear = (event) => {
32465
32752
  event.stopPropagation();
@@ -32598,6 +32885,580 @@ Object.assign(TreeSelect, { classes: {
32598
32885
  ...Combobox.classes,
32599
32886
  ...TreeSelect_module_default
32600
32887
  } });
32888
+ var Cascader_module_default = {
32889
+ columnsList: "_columnsList_1xc8g_1",
32890
+ column: "_column_1xc8g_1",
32891
+ columnScroll: "_columnScroll_1xc8g_21",
32892
+ columnsOverflow: "_columnsOverflow_1xc8g_26",
32893
+ columnOption: "_columnOption_1xc8g_78",
32894
+ flatOption: "_flatOption_1xc8g_127",
32895
+ columnOptionLabel: "_columnOptionLabel_1xc8g_134",
32896
+ columnOptionIcon: "_columnOptionIcon_1xc8g_141",
32897
+ columnOptionCheck: "_columnOptionCheck_1xc8g_160",
32898
+ columnEmpty: "_columnEmpty_1xc8g_172"
32899
+ };
32900
+ //#endregion
32901
+ //#region src/components/Cascader/cascader-utils.ts
32902
+ function cascaderOptionHasChildren(option) {
32903
+ return Array.isArray(option.children) && option.children.length > 0;
32904
+ }
32905
+ function getCascaderColumns(data, activePath) {
32906
+ const columns = [data];
32907
+ let level = data;
32908
+ for (let index = 0; index < activePath.length; index++) {
32909
+ const node = level.find((option) => option.value === activePath[index]);
32910
+ if (!node) break;
32911
+ if (cascaderOptionHasChildren(node) && index < activePath.length - 1) {
32912
+ columns.push(node.children);
32913
+ level = node.children;
32914
+ } else break;
32915
+ }
32916
+ return columns;
32917
+ }
32918
+ function getCascaderPathOptions(data, value) {
32919
+ if (!value?.length) return [];
32920
+ const result = [];
32921
+ let level = data;
32922
+ for (const current of value) {
32923
+ const option = level?.find((item) => item.value === current);
32924
+ if (!option) break;
32925
+ result.push(option);
32926
+ level = option.children;
32927
+ }
32928
+ return result;
32929
+ }
32930
+ function flattenCascaderPaths(data) {
32931
+ const result = [];
32932
+ const walk = (nodes, parentPath, parentOptions, parentDisabled) => {
32933
+ nodes.forEach((node) => {
32934
+ const path = [...parentPath, node.value];
32935
+ const options = [...parentOptions, node];
32936
+ const disabled = parentDisabled || !!node.disabled;
32937
+ const leaf = !cascaderOptionHasChildren(node);
32938
+ result.push({
32939
+ path,
32940
+ options,
32941
+ leaf,
32942
+ disabled
32943
+ });
32944
+ if (!leaf) walk(node.children, path, options, disabled);
32945
+ });
32946
+ };
32947
+ walk(data, [], [], false);
32948
+ return result;
32949
+ }
32950
+ //#endregion
32951
+ //#region src/components/Cascader/Cascader.ts
32952
+ var optionLabelToString = (option) => typeof option.label === "string" || typeof option.label === "number" ? String(option.label) : option.value;
32953
+ var pathsEqual = (first, second) => !!first && !!second && first.length === second.length && first.every((item, index) => item === second[index]);
32954
+ var findEnabledIndex = (options, from, direction) => {
32955
+ let index = from + direction;
32956
+ while (index >= 0 && index < options.length) {
32957
+ if (!options[index].disabled) return index;
32958
+ index += direction;
32959
+ }
32960
+ return -1;
32961
+ };
32962
+ var call = (handler, event) => {
32963
+ if (Array.isArray(handler)) handler.forEach((item) => item?.(event));
32964
+ else if (typeof handler === "function") handler(event);
32965
+ };
32966
+ var Cascader = (0, vue.defineComponent)({
32967
+ name: "Cascader",
32968
+ inheritAttrs: false,
32969
+ slots: Object,
32970
+ props: {
32971
+ data: {
32972
+ type: Array,
32973
+ required: true
32974
+ },
32975
+ modelValue: Array,
32976
+ value: Array,
32977
+ defaultValue: Array,
32978
+ onChange: Function,
32979
+ changeOnSelect: Boolean,
32980
+ closeOnSelect: {
32981
+ type: Boolean,
32982
+ default: void 0
32983
+ },
32984
+ allowDeselect: {
32985
+ type: Boolean,
32986
+ default: true
32987
+ },
32988
+ withCheckIcon: {
32989
+ type: Boolean,
32990
+ default: true
32991
+ },
32992
+ checkIconPosition: {
32993
+ type: String,
32994
+ default: "right"
32995
+ },
32996
+ withColumns: {
32997
+ type: Boolean,
32998
+ default: true
32999
+ },
33000
+ expandTrigger: {
33001
+ type: String,
33002
+ default: "click"
33003
+ },
33004
+ searchable: Boolean,
33005
+ searchValue: String,
33006
+ defaultSearchValue: String,
33007
+ onSearchChange: Function,
33008
+ filter: Function,
33009
+ renderSearchOption: Function,
33010
+ formatValue: Function,
33011
+ renderOption: Function,
33012
+ separator: {
33013
+ type: null,
33014
+ default: void 0
33015
+ },
33016
+ columnWidth: {
33017
+ type: [Number, String],
33018
+ default: 200
33019
+ },
33020
+ maxDisplayedLevels: {
33021
+ type: Number,
33022
+ default: 3
33023
+ },
33024
+ previousLevelsControlLabel: {
33025
+ type: String,
33026
+ default: "Show previous levels"
33027
+ },
33028
+ nextLevelsControlLabel: {
33029
+ type: String,
33030
+ default: "Show next levels"
33031
+ },
33032
+ maxDropdownHeight: {
33033
+ type: [Number, String],
33034
+ default: 260
33035
+ },
33036
+ nothingFoundMessage: {
33037
+ type: null,
33038
+ default: void 0
33039
+ },
33040
+ clearable: Boolean,
33041
+ clearSectionMode: {
33042
+ type: String,
33043
+ default: "both"
33044
+ },
33045
+ clearButtonProps: Object,
33046
+ onClear: Function,
33047
+ dropdownOpened: {
33048
+ type: Boolean,
33049
+ default: void 0
33050
+ },
33051
+ defaultDropdownOpened: Boolean,
33052
+ onDropdownOpen: Function,
33053
+ onDropdownClose: Function,
33054
+ comboboxProps: Object,
33055
+ scrollAreaProps: Object,
33056
+ chevronColor: String,
33057
+ hiddenInputProps: Object,
33058
+ openOnFocus: {
33059
+ type: Boolean,
33060
+ default: true
33061
+ },
33062
+ readOnly: Boolean,
33063
+ disabled: Boolean,
33064
+ size: {
33065
+ type: [String, Number],
33066
+ default: "sm"
33067
+ },
33068
+ classNames: [Object, Function],
33069
+ styles: [Object, Function],
33070
+ unstyled: Boolean
33071
+ },
33072
+ emits: ["update:modelValue", "update:searchValue"],
33073
+ setup(props, { attrs, emit, slots }) {
33074
+ const id = (0, _mantine_vue_hooks.useId)(attrs.id);
33075
+ const internalValue = (0, vue.ref)(props.defaultValue ?? null);
33076
+ const currentValue = (0, vue.computed)(() => props.modelValue ?? props.value ?? internalValue.value);
33077
+ const pathOptions = (0, vue.computed)(() => getCascaderPathOptions(props.data, currentValue.value));
33078
+ const separatorString = (0, vue.computed)(() => typeof props.separator === "string" || typeof props.separator === "number" ? String(props.separator) : "/");
33079
+ const separatorContent = () => resolveNode(props.separator, slots.separator) ?? "/";
33080
+ const nothingFoundContent = () => resolveNode(props.nothingFoundMessage, slots.nothingFoundMessage ?? slots.nothingFound);
33081
+ const displayString = (0, vue.computed)(() => {
33082
+ if (!currentValue.value || pathOptions.value.length === 0) return "";
33083
+ const formatted = props.formatValue?.({
33084
+ value: currentValue.value,
33085
+ options: pathOptions.value
33086
+ });
33087
+ if (typeof formatted === "string" || typeof formatted === "number") return String(formatted);
33088
+ return pathOptions.value.map(optionLabelToString).join(` ${separatorString.value} `);
33089
+ });
33090
+ const internalSearch = (0, vue.ref)(props.defaultSearchValue ?? (props.searchable && props.defaultValue ? getCascaderPathOptions(props.data, props.defaultValue).map(optionLabelToString).join(` ${separatorString.value} `) : ""));
33091
+ const search = (0, vue.computed)(() => props.searchValue ?? internalSearch.value);
33092
+ const activePath = (0, vue.ref)(currentValue.value ? [...currentValue.value] : []);
33093
+ const keyboardNav = (0, vue.ref)(false);
33094
+ const windowOffset = (0, vue.ref)(0);
33095
+ const canInteract = (0, vue.computed)(() => !props.readOnly && !props.disabled);
33096
+ const shouldCloseOnSelect = (0, vue.computed)(() => props.closeOnSelect ?? !props.allowDeselect);
33097
+ const setSearch = (value) => {
33098
+ if (props.searchValue === void 0) internalSearch.value = value;
33099
+ props.onSearchChange?.(value);
33100
+ emit("update:searchValue", value);
33101
+ };
33102
+ const setValue = (value) => {
33103
+ if (props.modelValue === void 0 && props.value === void 0) internalValue.value = value;
33104
+ props.onChange?.(value, getCascaderPathOptions(props.data, value));
33105
+ emit("update:modelValue", value);
33106
+ };
33107
+ const resetActivePath = () => {
33108
+ activePath.value = currentValue.value ? [...currentValue.value] : [];
33109
+ };
33110
+ const combobox = useCombobox({
33111
+ opened: () => props.dropdownOpened,
33112
+ defaultOpened: props.defaultDropdownOpened,
33113
+ onDropdownOpen: () => {
33114
+ props.onDropdownOpen?.();
33115
+ resetActivePath();
33116
+ },
33117
+ onDropdownClose: () => {
33118
+ props.onDropdownClose?.();
33119
+ if (props.searchable) setSearch(currentValue.value ? displayString.value : "");
33120
+ }
33121
+ });
33122
+ (0, vue.watch)(currentValue, (value) => {
33123
+ if (props.searchable) setSearch(value ? displayString.value : "");
33124
+ }, { deep: true });
33125
+ (0, vue.watch)(activePath, () => windowOffset.value = 0, { deep: true });
33126
+ const selectPath = (path) => {
33127
+ setValue(props.allowDeselect && pathsEqual(currentValue.value, path) ? null : path);
33128
+ };
33129
+ const expandOption = (level, option) => {
33130
+ const optionPath = [...activePath.value.slice(0, level), option.value];
33131
+ if (cascaderOptionHasChildren(option)) {
33132
+ const first = findEnabledIndex(option.children, -1, 1);
33133
+ activePath.value = first >= 0 ? [...optionPath, option.children[first].value] : optionPath;
33134
+ } else activePath.value = optionPath;
33135
+ };
33136
+ const finishSelection = () => {
33137
+ if (shouldCloseOnSelect.value) combobox.closeDropdown("mouse");
33138
+ };
33139
+ const handleOptionClick = (level, option) => {
33140
+ if (option.disabled) return;
33141
+ keyboardNav.value = false;
33142
+ const path = [...activePath.value.slice(0, level), option.value];
33143
+ if (cascaderOptionHasChildren(option)) {
33144
+ if (props.changeOnSelect) {
33145
+ selectPath(path);
33146
+ finishSelection();
33147
+ }
33148
+ expandOption(level, option);
33149
+ } else {
33150
+ selectPath(path);
33151
+ finishSelection();
33152
+ }
33153
+ };
33154
+ const handleOptionMouseEnter = (level, option) => {
33155
+ if (option.disabled) return;
33156
+ keyboardNav.value = false;
33157
+ if (props.expandTrigger !== "hover") return;
33158
+ if (cascaderOptionHasChildren(option)) expandOption(level, option);
33159
+ else activePath.value = [...activePath.value.slice(0, level), option.value];
33160
+ };
33161
+ const flatPaths = (0, vue.computed)(() => flattenCascaderPaths(props.data));
33162
+ const isSearching = (0, vue.computed)(() => props.searchable && search.value.trim().length > 0 && search.value !== displayString.value);
33163
+ const showFlatList = (0, vue.computed)(() => isSearching.value || !props.withColumns);
33164
+ const flatListItems = (0, vue.computed)(() => {
33165
+ const base = flatPaths.value.filter((path) => props.changeOnSelect || path.leaf);
33166
+ if (!isSearching.value) return base;
33167
+ 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()));
33168
+ });
33169
+ const renderSearchLabel = (options) => {
33170
+ if (props.renderSearchOption) return props.renderSearchOption(search.value, options);
33171
+ if (slots.renderSearchOption) return slots.renderSearchOption({
33172
+ query: search.value,
33173
+ options
33174
+ });
33175
+ return options.flatMap((option, index) => [index ? (0, vue.h)("span", { "data-cascader-separator": true }, [
33176
+ " ",
33177
+ separatorContent(),
33178
+ " "
33179
+ ]) : null, option.label ?? option.value]);
33180
+ };
33181
+ const renderFlatList = () => (0, vue.h)(Combobox.Options, { "aria-label": typeof attrs.label === "string" ? attrs.label : void 0 }, () => [(0, vue.h)(ScrollArea.Autosize, {
33182
+ mah: props.maxDropdownHeight,
33183
+ type: "scroll",
33184
+ scrollbarSize: "var(--combobox-padding)",
33185
+ offsetScrollbars: "y",
33186
+ ...props.scrollAreaProps
33187
+ }, () => flatListItems.value.map((item, index) => {
33188
+ const selected = pathsEqual(currentValue.value, item.path);
33189
+ return (0, vue.h)(Combobox.Option, {
33190
+ value: index,
33191
+ active: selected,
33192
+ disabled: item.disabled
33193
+ }, () => (0, vue.h)("span", { class: Cascader_module_default.flatOption }, [
33194
+ selected && props.withCheckIcon && props.checkIconPosition === "left" ? (0, vue.h)(CheckIcon, { class: Cascader_module_default.columnOptionCheck }) : null,
33195
+ (0, vue.h)("span", { class: Cascader_module_default.columnOptionLabel }, [renderSearchLabel(item.options)]),
33196
+ selected && props.withCheckIcon && props.checkIconPosition !== "left" ? (0, vue.h)(CheckIcon, { class: Cascader_module_default.columnOptionCheck }) : null
33197
+ ]));
33198
+ })), flatListItems.value.length === 0 && (props.nothingFoundMessage !== void 0 || slots.nothingFoundMessage || slots.nothingFound) ? (0, vue.h)(Combobox.Empty, {}, nothingFoundContent) : null]);
33199
+ const optionId = (level, value) => id.value ? `${id.value}-cascader-list-${level}-${value}` : void 0;
33200
+ const renderColumns = () => {
33201
+ const allColumns = getCascaderColumns(props.data, activePath.value);
33202
+ const totalColumns = allColumns.length;
33203
+ const maxLevels = props.maxDisplayedLevels > 0 ? props.maxDisplayedLevels : totalColumns;
33204
+ const maxOffset = Math.max(0, totalColumns - maxLevels);
33205
+ const clampedOffset = Math.min(windowOffset.value, maxOffset);
33206
+ const windowStart = Math.max(0, maxOffset - clampedOffset);
33207
+ const windowEnd = Math.min(totalColumns, windowStart + maxLevels);
33208
+ const visibleColumns = allColumns.slice(windowStart, windowEnd);
33209
+ const hiddenBefore = windowStart;
33210
+ const hiddenAfter = totalColumns - windowEnd;
33211
+ const focusedLevel = activePath.value.length - 1;
33212
+ const overflowControl = (position) => (0, vue.h)(UnstyledButton, {
33213
+ class: Cascader_module_default.columnsOverflow,
33214
+ "data-position": position,
33215
+ tabindex: -1,
33216
+ "aria-label": position === "start" ? props.previousLevelsControlLabel : props.nextLevelsControlLabel,
33217
+ title: position === "start" ? props.previousLevelsControlLabel : props.nextLevelsControlLabel,
33218
+ onMousedown: (event) => event.preventDefault(),
33219
+ onClick: () => {
33220
+ windowOffset.value = position === "start" ? Math.min(maxOffset, windowOffset.value + 1) : Math.max(0, windowOffset.value - 1);
33221
+ }
33222
+ }, () => (0, vue.h)(AccordionChevron));
33223
+ return (0, vue.h)("div", {
33224
+ class: Cascader_module_default.columnsList,
33225
+ role: "presentation",
33226
+ onMouseleave: () => {
33227
+ if (props.expandTrigger === "hover") resetActivePath();
33228
+ },
33229
+ onMousemove: () => keyboardNav.value = false
33230
+ }, [
33231
+ hiddenBefore > 0 ? overflowControl("start") : null,
33232
+ ...visibleColumns.map((options, index) => {
33233
+ const level = windowStart + index;
33234
+ const isLast = index === visibleColumns.length - 1 && hiddenAfter === 0;
33235
+ return (0, vue.h)("div", {
33236
+ class: Cascader_module_default.column,
33237
+ "data-last": isLast || void 0,
33238
+ style: {
33239
+ width: typeof props.columnWidth === "number" ? `${props.columnWidth}px` : props.columnWidth,
33240
+ minWidth: typeof props.columnWidth === "number" ? `${props.columnWidth}px` : props.columnWidth
33241
+ }
33242
+ }, [(0, vue.h)(ScrollArea.Autosize, {
33243
+ class: Cascader_module_default.columnScroll,
33244
+ mah: props.maxDropdownHeight,
33245
+ type: "scroll",
33246
+ scrollbarSize: "var(--combobox-padding)",
33247
+ role: "listbox",
33248
+ ...props.scrollAreaProps
33249
+ }, () => options.length ? options.map((option) => {
33250
+ const active = activePath.value[level] === option.value;
33251
+ const current = active && level === focusedLevel && keyboardNav.value;
33252
+ const inPath = active && level < focusedLevel;
33253
+ const selected = !!currentValue.value && currentValue.value.length === level + 1 && currentValue.value[level] === option.value;
33254
+ return (0, vue.h)(UnstyledButton, {
33255
+ id: optionId(level, option.value),
33256
+ class: Cascader_module_default.columnOption,
33257
+ role: "option",
33258
+ tabindex: -1,
33259
+ "aria-selected": current || void 0,
33260
+ "aria-disabled": option.disabled || void 0,
33261
+ "data-active": current || void 0,
33262
+ "data-in-path": inPath || void 0,
33263
+ "data-selected": selected || void 0,
33264
+ "data-disabled": option.disabled || void 0,
33265
+ onMousedown: (event) => event.preventDefault(),
33266
+ onClick: () => handleOptionClick(level, option),
33267
+ onMouseenter: () => handleOptionMouseEnter(level, option)
33268
+ }, () => [
33269
+ selected && props.withCheckIcon && props.checkIconPosition === "left" ? (0, vue.h)(CheckIcon, { class: Cascader_module_default.columnOptionCheck }) : null,
33270
+ (0, vue.h)("span", { class: Cascader_module_default.columnOptionLabel }, [props.renderOption ? props.renderOption(option, level) : slots.renderOption?.({
33271
+ option,
33272
+ level
33273
+ }) ?? option.label ?? option.value]),
33274
+ selected && props.withCheckIcon && props.checkIconPosition !== "left" ? (0, vue.h)(CheckIcon, { class: Cascader_module_default.columnOptionCheck }) : null,
33275
+ cascaderOptionHasChildren(option) ? (0, vue.h)("span", { class: Cascader_module_default.columnOptionIcon }, (0, vue.h)(AccordionChevron)) : null
33276
+ ]);
33277
+ }) : (0, vue.h)("div", { class: Cascader_module_default.columnEmpty }, [nothingFoundContent()]))]);
33278
+ }),
33279
+ hiddenAfter > 0 ? overflowControl("end") : null
33280
+ ]);
33281
+ };
33282
+ const handleColumnsKeyDown = (event) => {
33283
+ keyboardNav.value = true;
33284
+ const columns = getCascaderColumns(props.data, activePath.value);
33285
+ const focusedLevel = Math.max(0, activePath.value.length - 1);
33286
+ const currentColumn = columns[focusedLevel] ?? columns[0] ?? [];
33287
+ const focusedIndex = currentColumn.findIndex((item) => item.value === activePath.value[focusedLevel]);
33288
+ const focusedOption = focusedIndex >= 0 ? currentColumn[focusedIndex] : void 0;
33289
+ if (event.key === "ArrowDown") {
33290
+ const next = findEnabledIndex(currentColumn, focusedIndex, 1);
33291
+ if (next >= 0) activePath.value = [...activePath.value.slice(0, focusedLevel), currentColumn[next].value];
33292
+ return true;
33293
+ }
33294
+ if (event.key === "ArrowUp") {
33295
+ const previous = findEnabledIndex(currentColumn, focusedIndex < 0 ? currentColumn.length : focusedIndex, -1);
33296
+ if (previous >= 0) activePath.value = [...activePath.value.slice(0, focusedLevel), currentColumn[previous].value];
33297
+ return true;
33298
+ }
33299
+ if (event.key === "ArrowRight") {
33300
+ if (focusedOption && cascaderOptionHasChildren(focusedOption)) expandOption(focusedLevel, focusedOption);
33301
+ return true;
33302
+ }
33303
+ if (event.key === "ArrowLeft") {
33304
+ if (activePath.value.length > 1) activePath.value = activePath.value.slice(0, -1);
33305
+ return true;
33306
+ }
33307
+ if (event.key === "Enter" && focusedOption) {
33308
+ const path = [...activePath.value.slice(0, focusedLevel), focusedOption.value];
33309
+ if (cascaderOptionHasChildren(focusedOption)) {
33310
+ if (props.changeOnSelect) {
33311
+ selectPath(path);
33312
+ finishSelection();
33313
+ }
33314
+ expandOption(focusedLevel, focusedOption);
33315
+ } else {
33316
+ selectPath(path);
33317
+ finishSelection();
33318
+ }
33319
+ return true;
33320
+ }
33321
+ return false;
33322
+ };
33323
+ const handleKeydown = (event) => {
33324
+ call(attrs.onKeydown, event);
33325
+ if (event.defaultPrevented) return;
33326
+ if (event.key === "Escape") {
33327
+ combobox.closeDropdown("keyboard");
33328
+ return;
33329
+ }
33330
+ if (showFlatList.value || !canInteract.value) return;
33331
+ if (!combobox.dropdownOpened) {
33332
+ if ([
33333
+ "ArrowDown",
33334
+ "ArrowUp",
33335
+ "ArrowRight",
33336
+ "Enter"
33337
+ ].includes(event.key) || !props.searchable && event.key === " ") {
33338
+ event.preventDefault();
33339
+ keyboardNav.value = true;
33340
+ combobox.openDropdown("keyboard");
33341
+ if (!currentValue.value && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
33342
+ const rootIndex = event.key === "ArrowDown" ? findEnabledIndex(props.data, -1, 1) : findEnabledIndex(props.data, props.data.length, -1);
33343
+ if (rootIndex >= 0) activePath.value = [props.data[rootIndex].value];
33344
+ }
33345
+ }
33346
+ return;
33347
+ }
33348
+ if (handleColumnsKeyDown(event)) event.preventDefault();
33349
+ else if (!props.searchable && event.key === " ") event.preventDefault();
33350
+ };
33351
+ return () => {
33352
+ const inputAttrs = { ...attrs };
33353
+ delete inputAttrs.name;
33354
+ delete inputAttrs.onKeydown;
33355
+ delete inputAttrs.onFocus;
33356
+ delete inputAttrs.onBlur;
33357
+ delete inputAttrs.onClick;
33358
+ delete inputAttrs.onInput;
33359
+ const clearButton = (0, vue.h)(Combobox.ClearButton, {
33360
+ ...props.clearButtonProps,
33361
+ onMousedown: (event) => event.preventDefault(),
33362
+ onClick: () => {
33363
+ props.onClear?.();
33364
+ setValue(null);
33365
+ activePath.value = [];
33366
+ setSearch("");
33367
+ combobox.focusTarget();
33368
+ }
33369
+ });
33370
+ const hasValue = !!currentValue.value?.length;
33371
+ const listId = id.value ? `${id.value}-cascader-list` : void 0;
33372
+ const focusedLevel = activePath.value.length - 1;
33373
+ const activeDescendant = keyboardNav.value && focusedLevel >= 0 ? optionId(focusedLevel, activePath.value[focusedLevel]) : void 0;
33374
+ return (0, vue.h)("div", { style: { display: "contents" } }, [(0, vue.h)(Combobox, {
33375
+ store: combobox,
33376
+ __staticSelector: "Cascader",
33377
+ classNames: props.classNames,
33378
+ styles: props.styles,
33379
+ unstyled: props.unstyled,
33380
+ readOnly: props.readOnly,
33381
+ size: String(props.size),
33382
+ width: showFlatList.value ? "target" : "max-content",
33383
+ position: "bottom-start",
33384
+ ...props.comboboxProps,
33385
+ onOptionSubmit: (raw) => {
33386
+ const item = flatListItems.value[Number(raw)];
33387
+ if (!item || item.disabled) return;
33388
+ selectPath(item.path);
33389
+ activePath.value = [...item.path];
33390
+ finishSelection();
33391
+ }
33392
+ }, { default: () => [(0, vue.h)(Combobox.Target, {
33393
+ targetType: props.searchable ? "input" : "button",
33394
+ withKeyboardNavigation: showFlatList.value
33395
+ }, () => (0, vue.h)(InputBase, {
33396
+ ...inputAttrs,
33397
+ id: id.value,
33398
+ __staticSelector: "Cascader",
33399
+ size: props.size,
33400
+ classNames: props.classNames,
33401
+ styles: props.styles,
33402
+ unstyled: props.unstyled,
33403
+ disabled: props.disabled,
33404
+ readonly: props.readOnly || !props.searchable,
33405
+ pointer: !props.searchable,
33406
+ value: props.searchable ? search.value : displayString.value,
33407
+ "aria-controls": listId,
33408
+ "aria-activedescendant": activeDescendant,
33409
+ __defaultRightSection: (0, vue.h)(Combobox.Chevron, {
33410
+ size: String(props.size),
33411
+ color: props.chevronColor
33412
+ }),
33413
+ __clearSection: clearButton,
33414
+ __clearable: props.clearable && hasValue && !props.disabled && !props.readOnly,
33415
+ __clearSectionMode: props.clearSectionMode,
33416
+ rightSectionPointerEvents: attrs.rightSectionPointerEvents || "none",
33417
+ onInput: (event) => {
33418
+ setSearch(event.target.value);
33419
+ if (canInteract.value) combobox.openDropdown("keyboard");
33420
+ },
33421
+ onFocus: (event) => {
33422
+ if (props.openOnFocus && props.searchable && canInteract.value) combobox.openDropdown("keyboard");
33423
+ call(attrs.onFocus, event);
33424
+ },
33425
+ onBlur: (event) => {
33426
+ combobox.closeDropdown("unknown");
33427
+ call(attrs.onBlur, event);
33428
+ },
33429
+ onClick: (event) => {
33430
+ if (canInteract.value) {
33431
+ keyboardNav.value = false;
33432
+ if (props.searchable) combobox.openDropdown("mouse");
33433
+ else combobox.toggleDropdown("mouse");
33434
+ }
33435
+ call(attrs.onClick, event);
33436
+ },
33437
+ onKeydown: handleKeydown
33438
+ }, {
33439
+ label: slots.label,
33440
+ description: slots.description,
33441
+ error: slots.error,
33442
+ leftSection: slots.leftSection,
33443
+ rightSection: slots.rightSection
33444
+ })), (0, vue.h)(Combobox.Dropdown, {
33445
+ hidden: props.readOnly || props.disabled,
33446
+ style: showFlatList.value ? void 0 : { padding: 0 }
33447
+ }, () => showFlatList.value ? renderFlatList() : renderColumns())] }), (0, vue.h)(Combobox.HiddenInput, {
33448
+ name: attrs.name,
33449
+ form: attrs.form,
33450
+ disabled: props.disabled,
33451
+ value: currentValue.value,
33452
+ ...props.hiddenInputProps
33453
+ })]);
33454
+ };
33455
+ }
33456
+ });
33457
+ Object.assign(Cascader, { classes: {
33458
+ ...InputBase.classes,
33459
+ ...Combobox.classes,
33460
+ ...Cascader_module_default
33461
+ } });
32601
33462
  //#endregion
32602
33463
  exports.Accordion = Accordion;
32603
33464
  exports.AccordionChevron = AccordionChevron;
@@ -32636,6 +33497,7 @@ exports.ButtonGroup = ButtonGroup;
32636
33497
  exports.ButtonGroupSection = ButtonGroupSection;
32637
33498
  exports.Card = Card;
32638
33499
  exports.CardSection = CardSection;
33500
+ exports.Cascader = Cascader;
32639
33501
  exports.Center = Center;
32640
33502
  exports.CheckIcon = CheckIcon;
32641
33503
  exports.Checkbox = Checkbox;
@@ -32705,6 +33567,7 @@ exports.FlatTreeNode = FlatTreeNode;
32705
33567
  exports.Flex = Flex;
32706
33568
  exports.FloatingIndicator = FloatingIndicator;
32707
33569
  exports.FloatingWindow = FloatingWindow;
33570
+ exports.FloatingWindowResizeHandle = FloatingWindowResizeHandle;
32708
33571
  exports.FocusTrap = FocusTrap;
32709
33572
  exports.FocusTrapInitialFocus = FocusTrapInitialFocus;
32710
33573
  exports.Grid = Grid;
@@ -32888,6 +33751,7 @@ exports.VisuallyHidden = VisuallyHidden;
32888
33751
  exports.alpha = alpha;
32889
33752
  exports.buildValue = buildValue;
32890
33753
  exports.camelToKebabCase = camelToKebabCase;
33754
+ exports.cascaderOptionHasChildren = cascaderOptionHasChildren;
32891
33755
  exports.colorsTuple = colorsTuple;
32892
33756
  exports.convertCssVariables = convertCssVariables;
32893
33757
  exports.convertHsvaTo = convertHsvaTo;
@@ -32910,6 +33774,7 @@ exports.factory = factory;
32910
33774
  exports.filterProps = filterProps;
32911
33775
  exports.filterTreeData = filterTreeData;
32912
33776
  exports.findClosestNumber = findClosestNumber;
33777
+ exports.flattenCascaderPaths = flattenCascaderPaths;
32913
33778
  exports.flattenTreeData = flattenTreeData;
32914
33779
  exports.foldAccents = foldAccents;
32915
33780
  exports.formatNumber = formatNumber;
@@ -32917,6 +33782,8 @@ exports.getAppShellVariables = getVariables;
32917
33782
  exports.getAutoContrastValue = getAutoContrastValue;
32918
33783
  exports.getBaseValue = getBaseValue;
32919
33784
  exports.getBreakpointValue = getBreakpointValue;
33785
+ exports.getCascaderColumns = getCascaderColumns;
33786
+ exports.getCascaderPathOptions = getCascaderPathOptions;
32920
33787
  exports.getContrastColor = getContrastColor;
32921
33788
  exports.getDefaultZIndex = getDefaultZIndex;
32922
33789
  exports.getDigitParts = getDigitParts;