@eightshift/ui-components 4.0.0 → 5.0.1

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 (94) hide show
  1. package/dist/{Button-CvzGKGCo.js → Button-wERNNG0T.js} +4 -4
  2. package/dist/{Collection-ddre1L5v.js → Collection-CKsHTyhc.js} +129 -98
  3. package/dist/{Color-MV5kBVXr.js → Color-BhgbJF5x.js} +1 -1
  4. package/dist/{ColorSwatch-BqQfVu4L.js → ColorSwatch-Bcn6oRSg.js} +4 -4
  5. package/dist/{ComboBox-jQ-dk95U.js → ComboBox-D1LPUwWP.js} +19 -19
  6. package/dist/{Dialog-DX1aiYyE.js → Dialog-D190gMbE.js} +28 -30
  7. package/dist/{FieldError-52GVSGgC.js → FieldError-DeUh5Wkw.js} +2 -2
  8. package/dist/{FocusScope-Cri5BFRz.js → FocusScope-C-plSxbS.js} +2 -2
  9. package/dist/{Group-_emcIVxI.js → Group-C5iZpSAM.js} +3 -3
  10. package/dist/{Heading-B2153VXe.js → Heading-D-Pboe4p.js} +1 -1
  11. package/dist/{Input-BxpFEIXV.js → Input--mF4XVE1.js} +6 -6
  12. package/dist/{Label-icmbmNdI.js → Label-Fp6AwSRn.js} +1 -1
  13. package/dist/{List-BYNHbol3.js → List-CZMUbkFU.js} +1 -1
  14. package/dist/{ListBox-mJ4nQaL7.js → ListBox-4oW9kh3R.js} +13 -12
  15. package/dist/{OverlayArrow-BB0CWwdq.js → OverlayArrow-BpB9uB_I.js} +19 -11
  16. package/dist/{Select-aab027f3.esm--EmXjiL3.js → Select-aab027f3.esm-BKIJGje-.js} +1 -1
  17. package/dist/{Separator-D9moUgP8.js → Separator-B88tj5YD.js} +6 -5
  18. package/dist/{Slider-rz2XRMGm.js → Slider-CyJzC1bp.js} +11 -11
  19. package/dist/{Text-DVSAPY-K.js → Text-DRpwWot2.js} +1 -1
  20. package/dist/{VisuallyHidden-f9zX67a_.js → VisuallyHidden-DsKYcRQ_.js} +2 -2
  21. package/dist/assets/index.css +21 -1
  22. package/dist/assets/style-admin.css +891 -282
  23. package/dist/assets/style-editor.css +891 -282
  24. package/dist/assets/style.css +891 -282
  25. package/dist/assets/wp-font-enhancements.css +1 -1
  26. package/dist/assets/wp-ui-enhancements.css +91 -13
  27. package/dist/components/base-control/base-control.js +1 -1
  28. package/dist/components/button/button.js +5 -5
  29. package/dist/components/checkbox/checkbox.js +9 -9
  30. package/dist/components/color-pickers/color-swatch.js +8 -7
  31. package/dist/components/color-pickers/gradient-editor.js +1 -1
  32. package/dist/components/color-pickers/solid-color-picker.js +16 -16
  33. package/dist/components/component-toggle/component-toggle.js +5 -2
  34. package/dist/components/draggable/draggable.js +2049 -1277
  35. package/dist/components/draggable-list/draggable-list.js +1 -1
  36. package/dist/components/expandable/expandable.js +7 -7
  37. package/dist/components/input-field/input-field.js +7 -7
  38. package/dist/components/link-input/link-input.js +16 -18
  39. package/dist/components/menu/menu.js +2 -2
  40. package/dist/components/modal/modal.js +5 -5
  41. package/dist/components/number-picker/number-picker.js +9 -9
  42. package/dist/components/options-panel/options-panel.js +1 -1
  43. package/dist/components/popover/popover.js +1 -1
  44. package/dist/components/radio/radio.js +13 -13
  45. package/dist/components/repeater/repeater.js +1 -1
  46. package/dist/components/responsive/mini-responsive.js +3 -3
  47. package/dist/components/responsive/responsive-legacy.js +3 -3
  48. package/dist/components/responsive/responsive.js +6 -3
  49. package/dist/components/select/async-multi-select.js +3 -3
  50. package/dist/components/select/async-single-select.js +2 -2
  51. package/dist/components/select/custom-select-default-components.js +1 -1
  52. package/dist/components/select/multi-select-components.js +1 -1
  53. package/dist/components/select/multi-select.js +3 -3
  54. package/dist/components/select/react-select-component-wrappers.js +1 -1
  55. package/dist/components/select/single-select.js +2 -2
  56. package/dist/components/select/v2/async-select.js +8 -8
  57. package/dist/components/select/v2/shared.js +2 -2
  58. package/dist/components/select/v2/single-select.js +19 -18
  59. package/dist/components/slider/column-config-slider.js +2 -2
  60. package/dist/components/slider/slider.js +6 -4
  61. package/dist/components/slider/utils.js +11 -1
  62. package/dist/components/tabs/tabs.js +16 -14
  63. package/dist/components/toggle/switch.js +8 -7
  64. package/dist/components/toggle/toggle.js +1 -1
  65. package/dist/components/toggle-button/toggle-button.js +27 -8
  66. package/dist/components/tooltip/tooltip.js +6 -4
  67. package/dist/{context-D2KUdwNL.js → context-BYWrbm1z.js} +1 -1
  68. package/dist/{index-641ee5b8.esm-BPz6U6sJ.js → index-641ee5b8.esm-BPU8rMZr.js} +5 -5
  69. package/dist/index-CFozsmNS.js +28321 -0
  70. package/dist/{index-BKGQ6jGS.js → index-wl5606BX.js} +1 -1
  71. package/dist/{multi-select-components-BlZZoNXC.js → multi-select-components-Sp-JEFEX.js} +1 -1
  72. package/dist/{react-select-async.esm-CwUoej5h.js → react-select-async.esm-D937XTWW.js} +3 -3
  73. package/dist/{react-select.esm-DcwYxadV.js → react-select.esm-Ciai3aKf.js} +3 -3
  74. package/dist/{textSelection-0UUS8Yfg.js → textSelection-CCcyjiRP.js} +1 -1
  75. package/dist/{useButton-BpOKDWEN.js → useButton-BOHxkGQF.js} +6 -27
  76. package/dist/{useEvent-B0b-6KBr.js → useEvent-D5o_CqDH.js} +1 -1
  77. package/dist/{useFocusRing-CV5l3lf6.js → useFocusRing-nMG2uzxS.js} +5 -5
  78. package/dist/{useFormReset-C5OggHsw.js → useFormReset-DlmRL87g.js} +1 -1
  79. package/dist/{useFormValidation-DhDNSjws.js → useFormValidation-D0_aaK-e.js} +2 -2
  80. package/dist/{useHover-DwDr6ozG.js → useHover-VO5tcIli.js} +58 -68
  81. package/dist/{useLabel-D7HkNEHT.js → useLabel-BKH4fVA4.js} +3 -3
  82. package/dist/{useLabels-D8cxd1Z8.js → useLabels-ntF3rFY0.js} +1 -1
  83. package/dist/{useListState-UGlN5-7P.js → useListState-Cq2Nvr-v.js} +1 -1
  84. package/dist/{useLocalizedStringFormatter-CFP1YZWQ.js → useLocalizedStringFormatter-CGzwx1a0.js} +1 -1
  85. package/dist/{useNumberField-CEAj7Mrj.js → useNumberField-C9dmERhP.js} +14 -11
  86. package/dist/{useNumberFormatter-321rAb4J.js → useNumberFormatter-MrRLgvhj.js} +1 -1
  87. package/dist/{usePress-DNW8qpY6.js → usePress-DjNo5790.js} +36 -23
  88. package/dist/{useSingleSelectListState-DC0wWTUM.js → useSingleSelectListState--r3AAhRj.js} +2 -2
  89. package/dist/{useToggle-BrpmSOB-.js → useToggle-CQaXLe-O.js} +5 -5
  90. package/dist/{useToggleState-CmQX3SoX.js → useToggleState-C3DLdez5.js} +1 -1
  91. package/dist/utilities/es-dash.js +6 -0
  92. package/dist/{utils-DkCSC521.js → utils-B94NDG0v.js} +1 -1
  93. package/package.json +101 -101
  94. package/dist/index-BYHhzLf-.js +0 -444
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../../utils-DkCSC521.js";
3
- import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5, a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "../../Label-icmbmNdI.js";
4
- import { $ as $6f909507e6374d18$export$472062a354075cee, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, c as $6f909507e6374d18$export$a590f758a961cb5b, d as $6f909507e6374d18$export$1e7083018727fa60 } from "../../Slider-rz2XRMGm.js";
2
+ import { $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../../utils-B94NDG0v.js";
3
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5, a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "../../Label-Fp6AwSRn.js";
4
+ import { $ as $6f909507e6374d18$export$472062a354075cee, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, c as $6f909507e6374d18$export$a590f758a961cb5b, d as $6f909507e6374d18$export$1e7083018727fa60 } from "../../Slider-CyJzC1bp.js";
5
5
  import { BaseControl } from "../base-control/base-control.js";
6
6
  import { c as clsx } from "../../lite-DVmmD_-j.js";
7
7
  import { NumberPicker } from "../number-picker/number-picker.js";
@@ -35,6 +35,7 @@ import { generateMarkers } from "./utils.js";
35
35
  * @param {Function} [props.thumbContent] - If provided, the function will be called with the current value of the thumb, and the return value will be displayed within the thumb. `(currentIndex: number) => JSX.Element`.
36
36
  * @param {string} [props.labelClassName] - Additional classes to pass to the label.
37
37
  * @param {Object<string, any>} [props.trackStyle] - Additional style for the track.
38
+ * @param {Number} [props.markerStep] - If provided, this value is used to generate markers instead of the step value. Useful when using small steps with a larger range.
38
39
  * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
39
40
  *
40
41
  * @returns {JSX.Element} The Slider component.
@@ -75,6 +76,7 @@ const Slider = (props) => {
75
76
  thumbContent,
76
77
  labelClassName,
77
78
  trackStyle,
79
+ markerStep = step,
78
80
  hidden,
79
81
  ...other
80
82
  } = props;
@@ -87,7 +89,7 @@ const Slider = (props) => {
87
89
  generatedMarkers = markers;
88
90
  }
89
91
  if (markers === true || markers === "dots") {
90
- generatedMarkers = generateMarkers(min, max, step);
92
+ generatedMarkers = generateMarkers(min, max, markerStep);
91
93
  }
92
94
  const markerEntries = Object.entries(generatedMarkers);
93
95
  const markerData = vertical ? markerEntries.toReversed() : markerEntries;
@@ -16,6 +16,12 @@ import { _ as __, s as sprintf, a as _n } from "../../default-i18n-CT_oS1Fy.js";
16
16
  */
17
17
  const generateMarkers = (min, max, step = 10) => {
18
18
  const smallStep = step < 10 && Math.abs(max - min) > 20;
19
+ if (step < 1 && Math.abs(max - min) > 2) {
20
+ step = 1;
21
+ }
22
+ if (step < 0.1 && Math.abs(max - min) > 0.2) {
23
+ step = 0.1;
24
+ }
19
25
  const markers = [];
20
26
  if (min < 0) {
21
27
  for (let i = min; i < 0; i += step) {
@@ -36,7 +42,11 @@ const generateMarkers = (min, max, step = 10) => {
36
42
  if (smallStep && marker % 10 !== 0) {
37
43
  acc[marker] = "";
38
44
  } else {
39
- acc[marker] = marker;
45
+ if (marker < 1) {
46
+ acc[marker] = parseFloat(marker).toFixed(step < 0.1 ? 2 : 1).replace(".0", "");
47
+ } else {
48
+ acc[marker] = marker;
49
+ }
40
50
  }
41
51
  return acc;
42
52
  }, {});
@@ -1,19 +1,19 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { c as $880e95eb8b93ba9a$export$ecf600387e221c37, k as $ae20dd8cbca75726$export$d6daf82dcd84e87c, d as $e1995378a142960e$export$18af5c7a9e9b3664, f as $e1995378a142960e$export$fb8073518f34e6ec, g as $7135fc7d473fd974$export$4feb769f8ddf26c5, m as $7135fc7d473fd974$export$a164736487e3f0ae, e as $e1995378a142960e$export$bf788dd355e3a401, n as $7135fc7d473fd974$export$90e00781bc59d8f9 } from "../../Collection-ddre1L5v.js";
3
- import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, l as $df56164dff5785e2$export$4338b53315abf666, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../../utils-DkCSC521.js";
2
+ import { c as $880e95eb8b93ba9a$export$ecf600387e221c37, k as $ae20dd8cbca75726$export$d6daf82dcd84e87c, d as $e1995378a142960e$export$18af5c7a9e9b3664, f as $e1995378a142960e$export$fb8073518f34e6ec, g as $7135fc7d473fd974$export$4feb769f8ddf26c5, m as $7135fc7d473fd974$export$a164736487e3f0ae, e as $e1995378a142960e$export$bf788dd355e3a401, n as $7135fc7d473fd974$export$90e00781bc59d8f9 } from "../../Collection-CKsHTyhc.js";
3
+ import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, l as $df56164dff5785e2$export$4338b53315abf666, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../../utils-B94NDG0v.js";
4
4
  import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "../../Hidden-rE6uR-lr.js";
5
5
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
6
6
  import React__default, { version, useState, useMemo, useRef, useEffect, forwardRef, useContext, createContext, isValidElement, useId, cloneElement } from "react";
7
- import { a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "../../usePress-DNW8qpY6.js";
8
- import { a as $f645667febf57a63$export$4c014de7c8940b4c, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-DwDr6ozG.js";
9
- import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-D8cxd1Z8.js";
10
- import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-Cri5BFRz.js";
11
- import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-D2KUdwNL.js";
12
- import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CV5l3lf6.js";
13
- import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../useSingleSelectListState-DC0wWTUM.js";
7
+ import { a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "../../usePress-DjNo5790.js";
8
+ import { a as $f645667febf57a63$export$4c014de7c8940b4c, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-VO5tcIli.js";
9
+ import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-ntF3rFY0.js";
10
+ import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-C-plSxbS.js";
11
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-BYWrbm1z.js";
12
+ import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-nMG2uzxS.js";
13
+ import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../useSingleSelectListState--r3AAhRj.js";
14
14
  import { _ as __, s as sprintf } from "../../default-i18n-CT_oS1Fy.js";
15
15
  import { c as clsx } from "../../lite-DVmmD_-j.js";
16
- import { c as cva } from "../../index-BKGQ6jGS.js";
16
+ import { c as cva } from "../../index-wl5606BX.js";
17
17
  import { Notice } from "../notice/notice.js";
18
18
  import { RichLabel } from "../rich-label/rich-label.js";
19
19
  function $cdc5a6778b766db2$export$a9d04c5684123369(value) {
@@ -149,18 +149,20 @@ class $bfc6f2d60b8a4c40$export$15010ca3c1abe90b {
149
149
  if (this.tabDirection) return null;
150
150
  return this.getNextKey(key);
151
151
  }
152
- getNextKey(key) {
152
+ getNextKey(startKey) {
153
+ let key = startKey;
153
154
  do {
154
155
  key = this.collection.getKeyAfter(key);
155
156
  if (key == null) key = this.collection.getFirstKey();
156
- } while (this.isDisabled(key));
157
+ } while (key != null && this.isDisabled(key));
157
158
  return key;
158
159
  }
159
- getPreviousKey(key) {
160
+ getPreviousKey(startKey) {
161
+ let key = startKey;
160
162
  do {
161
163
  key = this.collection.getKeyBefore(key);
162
164
  if (key == null) key = this.collection.getLastKey();
163
- } while (this.isDisabled(key));
165
+ } while (key != null && this.isDisabled(key));
164
166
  return key;
165
167
  }
166
168
  constructor(collection, direction, orientation, disabledKeys = /* @__PURE__ */ new Set()) {
@@ -1,12 +1,12 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "../../utils-DkCSC521.js";
2
+ import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "../../utils-B94NDG0v.js";
3
3
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
4
4
  import React__default, { forwardRef, createContext } from "react";
5
- import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-CmQX3SoX.js";
6
- import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-BrpmSOB-.js";
7
- import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CV5l3lf6.js";
8
- import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-DwDr6ozG.js";
9
- import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-f9zX67a_.js";
5
+ import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-C3DLdez5.js";
6
+ import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-CQaXLe-O.js";
7
+ import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-nMG2uzxS.js";
8
+ import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-VO5tcIli.js";
9
+ import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-DsKYcRQ_.js";
10
10
  import { c as clsx } from "../../lite-DVmmD_-j.js";
11
11
  function $b418ec0c85c52f27$export$d853f7095ae95f88(props, state, ref) {
12
12
  let { labelProps, inputProps, isSelected, isPressed, isDisabled, isReadOnly } = $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref);
@@ -100,7 +100,7 @@ const $8e59e948500a8fe1$export$b5d5cf8927ab7262 = /* @__PURE__ */ forwardRef(fun
100
100
  * @preserve
101
101
  */
102
102
  const Switch2 = (props) => {
103
- const { checked, onChange, disabled, id, children, className, isIndeterminate, hidden } = props;
103
+ const { checked, onChange, disabled, id, children, className, isIndeterminate, hidden, ...rest } = props;
104
104
  if (hidden) {
105
105
  return null;
106
106
  }
@@ -112,6 +112,7 @@ const Switch2 = (props) => {
112
112
  isSelected: checked ?? false,
113
113
  onChange,
114
114
  className: "es:group es:flex es:items-center es:justify-between es:gap-2 es:any-focus:outline-hidden",
115
+ ...rest,
115
116
  children: [
116
117
  children,
117
118
  /* @__PURE__ */ jsx("div", { className: clsx("es:flex es:shrink-0 es:items-center es:justify-center es:min-h-6.5", className), children: /* @__PURE__ */ jsx(
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-icmbmNdI.js";
2
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-Fp6AwSRn.js";
3
3
  import { Switch } from "./switch.js";
4
4
  import { RichLabel } from "../rich-label/rich-label.js";
5
5
  /**
@@ -1,11 +1,11 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { p as $ff5963eb1fccf552$export$e08e3b67e392101e, d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, b as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-DkCSC521.js";
2
+ import { p as $ff5963eb1fccf552$export$e08e3b67e392101e, d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, b as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-B94NDG0v.js";
3
3
  import React__default, { createContext, forwardRef, useContext } from "react";
4
- import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-CmQX3SoX.js";
5
- import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "../../useButton-BpOKDWEN.js";
6
- import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CV5l3lf6.js";
7
- import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-DwDr6ozG.js";
8
- import { c as cva } from "../../index-BKGQ6jGS.js";
4
+ import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-C3DLdez5.js";
5
+ import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "../../useButton-BOHxkGQF.js";
6
+ import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-nMG2uzxS.js";
7
+ import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-VO5tcIli.js";
8
+ import { c as cva } from "../../index-wl5606BX.js";
9
9
  import { Tooltip } from "../tooltip/tooltip.js";
10
10
  function $55f54f7887471b58$export$51e84d46ca0bc451(props, state, ref) {
11
11
  const { isSelected } = state;
@@ -106,7 +106,7 @@ const $efde0372d7a700fe$export$d2b052e7b4be1756 = /* @__PURE__ */ forwardRef(fun
106
106
  * @param {ButtonType} [props.type='default'] - The type of the button.
107
107
  * @param {boolean} [props.disabled] - If `true`, the button is disabled.
108
108
  * @param {string} [props.className] - Classes to pass to the button.
109
- * @param {string} [props.tooltip] - Tooltip text to display on hover.
109
+ * @param {string|boolean} [props.tooltip] - Tooltip text to display on hover.
110
110
  * @param {boolean} props.selected - Whether the button is selected.
111
111
  * @param {Function} [props.onChange] - Function to run when the toggle state changes.
112
112
  * @param {string} [props.wrapperClassName] - Classes to pass to the tooltip wrapper.
@@ -138,7 +138,22 @@ const $efde0372d7a700fe$export$d2b052e7b4be1756 = /* @__PURE__ */ forwardRef(fun
138
138
  * @preserve
139
139
  */
140
140
  const ToggleButton2 = (props) => {
141
- const { children, icon, size = "default", type = "default", disabled, className, tooltip, selected, onChange, wrapperClassName, tooltipProps, hidden, ...other } = props;
141
+ const {
142
+ children,
143
+ icon,
144
+ size = "default",
145
+ type = "default",
146
+ disabled,
147
+ className,
148
+ tooltip: rawTooltip,
149
+ selected,
150
+ onChange,
151
+ wrapperClassName,
152
+ tooltipProps,
153
+ hidden,
154
+ "aria-label": ariaLabel,
155
+ ...other
156
+ } = props;
142
157
  if (hidden) {
143
158
  return null;
144
159
  }
@@ -285,6 +300,10 @@ const ToggleButton2 = (props) => {
285
300
  }
286
301
  }
287
302
  );
303
+ let tooltip = rawTooltip;
304
+ if (rawTooltip === true && (ariaLabel == null ? void 0 : ariaLabel.length) > 0) {
305
+ tooltip = ariaLabel;
306
+ }
288
307
  const component = /* @__PURE__ */ jsxs(
289
308
  $efde0372d7a700fe$export$d2b052e7b4be1756,
290
309
  {
@@ -1,10 +1,10 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $d3f049242431219c$export$45fda7c47f93fd48, c as $2a41e45df1593e64$export$d39e1813b3bdd0e1, b as $d3f049242431219c$export$6d3443f2c48bfc20, d as $44f671af83e7d9e0$export$2de4954e8ae13b9f, e as $44f671af83e7d9e0$export$746d02f47f4d381 } from "../../OverlayArrow-BB0CWwdq.js";
3
- import { n as $b5e257d569688ac6$export$535bd6ca7f90a273, d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, i as $64fa3d84918910a7$export$2881499e37b75b9a, a as $64fa3d84918910a7$export$29f1550f4b0d4415, k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, b as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-DkCSC521.js";
4
- import { $ as $6179b936705e76d3$export$ae780daf29e6d456, a as $f645667febf57a63$export$4c014de7c8940b4c, w as $507fabe10e71c6fb$export$630ff653c5ada6a9, m as $507fabe10e71c6fb$export$b9b3dfddab17db27, x as $f645667febf57a63$export$13f3202a3e5ddd5 } from "../../useHover-DwDr6ozG.js";
2
+ import { c as $96b38030c423d352$export$9fc1347d4195ccb3, $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $d3f049242431219c$export$45fda7c47f93fd48, d as $2a41e45df1593e64$export$d39e1813b3bdd0e1, b as $d3f049242431219c$export$6d3443f2c48bfc20, e as $44f671af83e7d9e0$export$2de4954e8ae13b9f, f as $44f671af83e7d9e0$export$746d02f47f4d381 } from "../../OverlayArrow-BpB9uB_I.js";
3
+ import { n as $b5e257d569688ac6$export$535bd6ca7f90a273, d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, i as $64fa3d84918910a7$export$2881499e37b75b9a, a as $64fa3d84918910a7$export$29f1550f4b0d4415, k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, b as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-B94NDG0v.js";
4
+ import { $ as $6179b936705e76d3$export$ae780daf29e6d456, a as $f645667febf57a63$export$4c014de7c8940b4c, x as $507fabe10e71c6fb$export$630ff653c5ada6a9, n as $507fabe10e71c6fb$export$b9b3dfddab17db27, y as $f645667febf57a63$export$13f3202a3e5ddd5 } from "../../useHover-VO5tcIli.js";
5
5
  import React__default, { useContext, useState, useMemo, useRef, useEffect, forwardRef, createContext } from "react";
6
6
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
7
- import { $ as $dbSRa$reactdom } from "../../index-BYHhzLf-.js";
7
+ import { $ as $dbSRa$reactdom } from "../../index-CFozsmNS.js";
8
8
  import { c as clsx } from "../../lite-DVmmD_-j.js";
9
9
  const $f57aed4a881a3485$var$Context = /* @__PURE__ */ React__default.createContext(null);
10
10
  function $f57aed4a881a3485$export$178405afcd8c5eb(props) {
@@ -52,6 +52,8 @@ function $f57aed4a881a3485$export$bf688221f59024e5(props) {
52
52
  function $f57aed4a881a3485$export$b47c3594eab58386(props) {
53
53
  let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273();
54
54
  let { portalContainer = isSSR ? null : document.body, ...rest } = props;
55
+ let { getContainer } = $96b38030c423d352$export$9fc1347d4195ccb3();
56
+ if (!props.portalContainer && getContainer) portalContainer = getContainer();
55
57
  React__default.useEffect(() => {
56
58
  if (portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.closest("[data-overlay-container]")) throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.");
57
59
  }, [
@@ -1,5 +1,5 @@
1
1
  import React__default, { useState, useEffect, useContext } from "react";
2
- import { n as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-DkCSC521.js";
2
+ import { n as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-B94NDG0v.js";
3
3
  const $148a7a147e38ea7f$var$RTL_SCRIPTS = /* @__PURE__ */ new Set([
4
4
  "Arab",
5
5
  "Syrc",
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { forwardRef, useContext, useLayoutEffect, useRef, useState, useMemo, useCallback, createContext } from "react";
3
- import { r as reactDomExports } from "./index-BYHhzLf-.js";
3
+ import { r as reactDomExports } from "./index-CFozsmNS.js";
4
4
  function _typeof(o) {
5
5
  "@babel/helpers - typeof";
6
6
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
@@ -98,7 +98,7 @@ function _objectWithoutPropertiesLoose(r, e) {
98
98
  if (null == r) return {};
99
99
  var t = {};
100
100
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
101
- if (-1 !== e.indexOf(n)) continue;
101
+ if (e.includes(n)) continue;
102
102
  t[n] = r[n];
103
103
  }
104
104
  return t;
@@ -107,8 +107,8 @@ function _objectWithoutProperties(e, t) {
107
107
  if (null == e) return {};
108
108
  var o, r, i = _objectWithoutPropertiesLoose(e, t);
109
109
  if (Object.getOwnPropertySymbols) {
110
- var n = Object.getOwnPropertySymbols(e);
111
- for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
110
+ var s = Object.getOwnPropertySymbols(e);
111
+ for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
112
112
  }
113
113
  return i;
114
114
  }
@@ -1980,7 +1980,7 @@ function observeMove(element, onMove) {
1980
1980
  // Handle <iframe>s
1981
1981
  root: root.ownerDocument
1982
1982
  });
1983
- } catch (e) {
1983
+ } catch (_e) {
1984
1984
  io = new IntersectionObserver(handleObserve, options2);
1985
1985
  }
1986
1986
  io.observe(element);