@eightshift/ui-components 0.0.1 → 0.0.2

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 (116) hide show
  1. package/README.md +0 -1
  2. package/dist/Button-eebLs4cp.js +54 -0
  3. package/dist/{Checkbox-BLcVbhiO.js → Checkbox-BN0TEda-.js} +7 -7
  4. package/dist/{ColorSwatch-Cmlex_kT.js → ColorSwatch-BrowHhTG.js} +4 -4
  5. package/dist/{FieldError-wtMA4667.js → FieldError-ILxgMZy5.js} +2 -2
  6. package/dist/{FocusScope-1u9yyfIN.js → FocusScope-B9b0VMib.js} +2 -2
  7. package/dist/GeistMonoVF.woff2 +0 -0
  8. package/dist/GeistVF.woff2 +0 -0
  9. package/dist/{GridList-BZPXp3_O.js → GridList-CzpWxJsS.js} +18 -18
  10. package/dist/{Group-DyqpTRPe.js → Group-Dkdm2-E7.js} +3 -3
  11. package/dist/{Input-jsbb4ugq.js → Input-BJA4rmIo.js} +7 -7
  12. package/dist/{Label-BPzS-sR7.js → Label-9x5iLJ-Y.js} +1 -1
  13. package/dist/{ListBox-w9gDaJkV.js → ListBox-D3Vr4vvC.js} +18 -18
  14. package/dist/{Select-49a62830.esm-C-RFtLiD.js → Select-49a62830.esm-CKPmlkza.js} +1 -1
  15. package/dist/{SelectionManager-mefd0ThJ.js → SelectionManager-sedvcM-1.js} +8 -8
  16. package/dist/{Separator-DHn0CwdK.js → Separator-B6rnDabE.js} +3 -3
  17. package/dist/{Slider-Pyh2V4bY.js → Slider-C5U5N7uM.js} +11 -11
  18. package/dist/{Text-BM136LvS.js → Text-Cyxp9ewv.js} +1 -1
  19. package/dist/{VisuallyHidden-BYRI1Lfo.js → VisuallyHidden-BPJVSUyp.js} +2 -2
  20. package/dist/_commonjsHelpers-DWwsNxpa.js +8 -0
  21. package/dist/assets/fonts.css +1 -0
  22. package/dist/assets/style.css +1 -1
  23. package/dist/assets/wp.css +1 -0
  24. package/dist/{button-BkkdyHfJ.js → button-idVI4jmd.js} +45 -64
  25. package/dist/components/base-control/base-control.js +29 -39
  26. package/dist/components/breakpoint-preview/breakpoint-preview.js +7 -7
  27. package/dist/components/button/button.js +6 -5
  28. package/dist/components/checkbox/checkbox.js +9 -7
  29. package/dist/components/color-pickers/color-picker.js +27 -36
  30. package/dist/components/color-pickers/color-swatch.js +6 -6
  31. package/dist/components/color-pickers/gradient-editor.js +10 -6
  32. package/dist/components/color-pickers/solid-color-picker.js +35 -38
  33. package/dist/components/component-toggle/component-toggle.js +52 -6
  34. package/dist/components/container-panel/container-panel.js +55 -6
  35. package/dist/components/draggable-list/draggable-list-item.js +74 -0
  36. package/dist/components/draggable-list/draggable-list.js +157 -0
  37. package/dist/components/expandable/expandable.js +19 -12
  38. package/dist/components/input-field/input-field.js +15 -10
  39. package/dist/components/layout/hstack.js +40 -0
  40. package/dist/components/layout/vstack.js +40 -0
  41. package/dist/components/link-input/link-input.js +35 -31
  42. package/dist/components/list-box/list-box.js +11 -6
  43. package/dist/components/matrix-align/matrix-align.js +12 -7
  44. package/dist/components/menu/menu.js +26 -21
  45. package/dist/components/notice/notice.js +11 -7
  46. package/dist/components/number-picker/number-picker.js +19 -13
  47. package/dist/components/option-select/option-select.js +231 -0
  48. package/dist/components/placeholders/file-placeholder.js +53 -0
  49. package/dist/components/placeholders/image-placeholder.js +88 -0
  50. package/dist/components/placeholders/media-placeholder.js +62 -0
  51. package/dist/components/popover/popover.js +4 -4
  52. package/dist/components/radio/radio.js +56 -38
  53. package/dist/components/repeater/repeater-item.js +46 -39
  54. package/dist/components/repeater/repeater.js +83 -56
  55. package/dist/components/responsive/responsive-legacy.js +17 -12
  56. package/dist/components/responsive/responsive.js +227 -160
  57. package/dist/components/responsive-preview/responsive-preview.js +5 -3
  58. package/dist/components/rich-label/rich-label.js +12 -8
  59. package/dist/components/select/async-multi-select.js +9 -6
  60. package/dist/components/select/async-single-select.js +7 -2
  61. package/dist/components/select/custom-select-default-components.js +3 -3
  62. package/dist/components/select/multi-select-components.js +2 -2
  63. package/dist/components/select/multi-select.js +9 -6
  64. package/dist/components/select/react-select-component-wrappers.js +1 -1
  65. package/dist/components/select/single-select.js +7 -2
  66. package/dist/components/select/styles.js +4 -4
  67. package/dist/components/slider/column-config-slider.js +18 -34
  68. package/dist/components/slider/slider.js +19 -26
  69. package/dist/components/slider/utils.js +44 -1
  70. package/dist/components/spacer/spacer.js +21 -11
  71. package/dist/components/tabs/tabs.js +21 -20
  72. package/dist/components/toggle/switch.js +18 -12
  73. package/dist/components/toggle/toggle.js +8 -2
  74. package/dist/components/toggle-button/toggle-button.js +25 -13
  75. package/dist/components/tooltip/tooltip.js +4 -4
  76. package/dist/{context-jMy6xdVq.js → context-BAcFg5GO.js} +1 -1
  77. package/dist/{default-i18n-BhE-OUmt.js → default-i18n-Bk1GxDHz.js} +1 -1
  78. package/dist/{focusSafely-C3K8zAKj.js → focusSafely-B0hyd-S4.js} +1 -1
  79. package/dist/fonts.js +1 -0
  80. package/dist/icons/icons.js +184 -164
  81. package/dist/icons/jsx-svg.js +4957 -0
  82. package/dist/{index-Bfb9bWcb.js → index-BDk0TPWz.js} +1 -1
  83. package/dist/{index-a301f526.esm-Bioi4cGX.js → index-a301f526.esm-BzTuHLdr.js} +1 -1
  84. package/dist/index.js +30 -4
  85. package/dist/{intlStrings-CUhoK9EN.js → intlStrings-Ctkp0HDc.js} +1 -1
  86. package/dist/lite-pbIeT7tm.js +8 -0
  87. package/dist/{multi-select-components-CjVpCNko.js → multi-select-components-nORKdJ-2.js} +3 -3
  88. package/dist/{popover-Dx3vKXUX.js → popover-o2Q28Ljn.js} +19 -14
  89. package/dist/{react-select-async.esm-TFb_ZX6C.js → react-select-async.esm-CLj9uZTq.js} +3 -3
  90. package/dist/{react-select.esm-BjRWqf0E.js → react-select.esm-3tyTZmrx.js} +3 -3
  91. package/dist/{textSelection-BosCCRVE.js → textSelection-BRZdHY-4.js} +1 -1
  92. package/dist/{tooltip-CkCndvTI.js → tooltip-T6H9uF-Z.js} +10 -10
  93. package/dist/{useButton-CuG5UzUw.js → useButton-D-xACzEY.js} +3 -3
  94. package/dist/{useEvent-DHv-yhOH.js → useEvent-XlYPKgwX.js} +1 -1
  95. package/dist/{useFocusRing-Cc-4eouh.js → useFocusRing-CRx_hYC4.js} +1 -1
  96. package/dist/{useFocusable-5q1Gek1J.js → useFocusable-CHfpEdlE.js} +2 -2
  97. package/dist/{useFormReset-Buc9YJcv.js → useFormReset-aHn6-wRk.js} +1 -1
  98. package/dist/{useFormValidationState-BAPPNXic.js → useFormValidationState-CdYmOaXI.js} +2 -2
  99. package/dist/{useHasTabbableChild-D3uUNhJ0.js → useHasTabbableChild-domoFB7A.js} +2 -2
  100. package/dist/{useLabel-CGlkoFG0.js → useLabel-DVhXVhtH.js} +2 -2
  101. package/dist/{useLabels-Dg62M_3P.js → useLabels-C7E5SkOi.js} +1 -1
  102. package/dist/{useListState-Domq0blV.js → useListState-BRsq7O1C.js} +1 -1
  103. package/dist/{useLocalizedStringFormatter-Prmz0h0A.js → useLocalizedStringFormatter-WsEL47qR.js} +1 -1
  104. package/dist/{useNumberFieldState-BLU3uhSR.js → useNumberFieldState-ZH2Qyyxh.js} +9 -9
  105. package/dist/{useNumberFormatter-BLc2xjZn.js → useNumberFormatter-mhdYLxWQ.js} +1 -1
  106. package/dist/{usePress-BQgVor4T.js → usePress-B42RawCH.js} +3 -3
  107. package/dist/{useToggle-C9ETOBaZ.js → useToggle-CExfZM8x.js} +4 -4
  108. package/dist/{useToggleState-DJ_z5E2S.js → useToggleState-DghG5ImG.js} +1 -1
  109. package/dist/utilities/array-helpers.js +30 -0
  110. package/dist/utilities/index.js +8 -0
  111. package/dist/utilities/text-helpers.js +30 -4
  112. package/dist/{utils-BsiH7-5Y.js → utils-DIBzm1e4.js} +1 -1
  113. package/dist/wp.js +1 -0
  114. package/package.json +11 -4
  115. package/dist/_commonjsHelpers-CUmg6egw.js +0 -6
  116. package/dist/utilities/classnames.js +0 -16
@@ -1,5 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { classnames } from "../../utilities/classnames.js";
2
+ import { c as clsx } from "../../lite-pbIeT7tm.js";
3
+ import { RichLabel } from "../rich-label/rich-label.js";
3
4
  /**
4
5
  * A simple spacer/divider component, with optional text or icon.
5
6
  *
@@ -9,8 +10,10 @@ import { classnames } from "../../utilities/classnames.js";
9
10
  * @param {boolean} [props.border=false] - Whether to show a border in the middle.
10
11
  * @param {string} [props.className] - Additional classes to add.
11
12
  * @param {string} [props.text] - Text to display.
13
+ * @param {string} [props.subtitle] - Subtitle to display.
12
14
  * @param {JSX.Element} [props.icon] - Icon to display.
13
15
  * @param {boolean} [props.vertical=false] - Whether the spacer is vertical.
16
+ * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
14
17
  *
15
18
  * @returns {JSX.Element} The Spacer component.
16
19
  *
@@ -29,7 +32,10 @@ import { classnames } from "../../utilities/classnames.js";
29
32
  * @preserve
30
33
  */
31
34
  const Spacer = (props) => {
32
- const { size = "m", border, className, text, icon, vertical = false } = props;
35
+ const { size = "px", border, className, text, subtitle, icon, vertical = false, hidden } = props;
36
+ if (hidden) {
37
+ return null;
38
+ }
33
39
  const sizes = {
34
40
  px: {
35
41
  sizeHorizontal: "es-uic-h-px",
@@ -56,7 +62,7 @@ const Spacer = (props) => {
56
62
  sizeVerticalBorder: "es-uic-w-2"
57
63
  }
58
64
  };
59
- const spaceClass = classnames(
65
+ const spaceClass = clsx(
60
66
  vertical ? "es-uic-h-full" : "es-uic-w-full",
61
67
  !vertical && !border && sizes[size].sizeHorizontal,
62
68
  !vertical && border && sizes[size].sizeHorizontalBorder,
@@ -65,10 +71,17 @@ const Spacer = (props) => {
65
71
  className
66
72
  );
67
73
  if (text || icon) {
68
- return /* @__PURE__ */ jsxs("div", { className: classnames("es-uic-flex es-uic-items-center es-uic-gap-1.5", className), children: [
69
- icon && /* @__PURE__ */ jsx("span", { className: "es-uic-shrink-0 es-uic-rounded es-uic-bg-gray-500 es-uic-p-0.5 es-uic-text-gray-50 es-uic-shadow-sm [&>svg]:es-uic-size-5.5", children: icon }),
70
- text && /* @__PURE__ */ jsx("span", { className: "es-uic-shrink-0 es-uic-text-balance es-uic-text-sm es-uic-text-gray-500", children: text }),
71
- border && /* @__PURE__ */ jsx("div", { className: "es-uic-h-px es-uic-w-full es-uic-bg-gray-300" })
74
+ return /* @__PURE__ */ jsxs("div", { className: clsx("es-uic-flex es-uic-items-center es-uic-gap-1.5", className), children: [
75
+ /* @__PURE__ */ jsx(
76
+ RichLabel,
77
+ {
78
+ icon,
79
+ label: text,
80
+ subtitle,
81
+ className: "es-uic-shrink-0 es-uic-text-slate-500"
82
+ }
83
+ ),
84
+ border && /* @__PURE__ */ jsx("div", { className: "es-uic-h-px es-uic-w-full es-uic-bg-slate-300 es-uic-leading-3" })
72
85
  ] });
73
86
  }
74
87
  if (border) {
@@ -77,10 +90,7 @@ const Spacer = (props) => {
77
90
  /* @__PURE__ */ jsx(
78
91
  "div",
79
92
  {
80
- className: classnames(
81
- "es-uic-bg-gray-300",
82
- vertical ? "es-uic-h-full es-uic-w-px" : "es-uic-h-px es-uic-w-full"
83
- )
93
+ className: clsx("es-uic-bg-gray-300", vertical ? "es-uic-h-full es-uic-w-px" : "es-uic-h-px es-uic-w-full")
84
94
  }
85
95
  ),
86
96
  size !== "px" && /* @__PURE__ */ jsx("div", { className: spaceClass })
@@ -1,17 +1,17 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { f as $880e95eb8b93ba9a$export$ecf600387e221c37, c as $ae20dd8cbca75726$export$d6daf82dcd84e87c, g as $7135fc7d473fd974$export$7cd71aa5ddd6dc4e, h as $7135fc7d473fd974$export$8c25dea96356a8b6, i as $7135fc7d473fd974$export$813b5978dd974d8, j as $7135fc7d473fd974$export$e7c29ae2353b16ea } from "../../SelectionManager-mefd0ThJ.js";
3
- import { d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, b as $64fa3d84918910a7$export$86427a43e3e48ebb, a as $64fa3d84918910a7$export$29f1550f4b0d4415, p as $64fa3d84918910a7$export$8dc98ba7eadeaa56, c as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, l as $df56164dff5785e2$export$4338b53315abf666 } from "../../utils-BsiH7-5Y.js";
2
+ import { f as $880e95eb8b93ba9a$export$ecf600387e221c37, c as $ae20dd8cbca75726$export$d6daf82dcd84e87c, g as $7135fc7d473fd974$export$7cd71aa5ddd6dc4e, h as $7135fc7d473fd974$export$8c25dea96356a8b6, i as $7135fc7d473fd974$export$813b5978dd974d8, j as $7135fc7d473fd974$export$e7c29ae2353b16ea } from "../../SelectionManager-sedvcM-1.js";
3
+ import { d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, b as $64fa3d84918910a7$export$86427a43e3e48ebb, a as $64fa3d84918910a7$export$29f1550f4b0d4415, p as $64fa3d84918910a7$export$8dc98ba7eadeaa56, c as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, l as $df56164dff5785e2$export$4338b53315abf666 } from "../../utils-DIBzm1e4.js";
4
4
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-DG2RfOUr.js";
5
5
  import React__default, { useMemo, useRef, useEffect, forwardRef, useContext, createContext, useId, cloneElement } from "react";
6
- import { $ as $e72dd72e1c76a225$export$2f645645f7bca764 } from "../../useListState-Domq0blV.js";
7
- import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-C3K8zAKj.js";
8
- import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-Cc-4eouh.js";
9
- import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-Dg62M_3P.js";
10
- import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-jMy6xdVq.js";
11
- import { a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "../../usePress-BQgVor4T.js";
12
- import { $ as $83013635b024ae3d$export$eac1895992b9f3d6 } from "../../useHasTabbableChild-D3uUNhJ0.js";
13
- import { _ as __, s as sprintf } from "../../default-i18n-BhE-OUmt.js";
14
- import { classnames } from "../../utilities/classnames.js";
6
+ import { $ as $e72dd72e1c76a225$export$2f645645f7bca764 } from "../../useListState-BRsq7O1C.js";
7
+ import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-B0hyd-S4.js";
8
+ import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CRx_hYC4.js";
9
+ import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-C7E5SkOi.js";
10
+ import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-BAcFg5GO.js";
11
+ import { a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "../../usePress-B42RawCH.js";
12
+ import { $ as $83013635b024ae3d$export$eac1895992b9f3d6 } from "../../useHasTabbableChild-domoFB7A.js";
13
+ import { _ as __, s as sprintf } from "../../default-i18n-Bk1GxDHz.js";
14
+ import { c as clsx } from "../../lite-pbIeT7tm.js";
15
15
  import { Notice } from "../notice/notice.js";
16
16
  const $99b62ae3ff97ec45$export$c5f62239608282b6 = /* @__PURE__ */ new WeakMap();
17
17
  function $99b62ae3ff97ec45$export$567fc7097e064344(state, key, role) {
@@ -423,6 +423,7 @@ const $5e8ad37a45e1c704$export$3d96ec278d3efce4 = /* @__PURE__ */ $64fa3d8491891
423
423
  * @param {Object} props - Component props.
424
424
  * @param {boolean} [props.vertical=false] - Whether the tabs are vertical.
425
425
  * @param {string} [props.className] - Classes to pass to the tabs container.
426
+ * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
426
427
  *
427
428
  * @returns {JSX.Element} The Tabs component.
428
429
  *
@@ -439,8 +440,11 @@ const $5e8ad37a45e1c704$export$3d96ec278d3efce4 = /* @__PURE__ */ $64fa3d8491891
439
440
  * @preserve
440
441
  */
441
442
  const Tabs = (props) => {
442
- const { children, vertical, className, ...rest } = props;
443
+ const { children, vertical, className, hidden, ...rest } = props;
443
444
  const baseId = useId();
445
+ if (hidden) {
446
+ return null;
447
+ }
444
448
  let tabPanelCounter = 1;
445
449
  let tabCounter = 1;
446
450
  const preparedChildren = Array.isArray(children) ? children : [children];
@@ -475,7 +479,7 @@ const Tabs = (props) => {
475
479
  cloneElement(child, {
476
480
  id: `tab-${baseId}-${tabPanelCounter++}`,
477
481
  key: index,
478
- className: classnames(child.props.className, vertical && "es-uic-border-l es-uic-border-l-300 es-uic-pl-3")
482
+ className: clsx(child.props.className, vertical && "es-uic-border-l es-uic-border-l-300 es-uic-pl-3")
479
483
  })
480
484
  ];
481
485
  }
@@ -507,7 +511,7 @@ const Tabs = (props) => {
507
511
  {
508
512
  ...rest,
509
513
  orientation: vertical ? "vertical" : "horizontal",
510
- className: classnames(
514
+ className: clsx(
511
515
  vertical ? "es-uic-grid es-uic-size-full es-uic-min-h-40 es-uic-grid-cols-[minmax(0,_15rem),_2fr] es-uic-gap-4" : "es-uic-flex-col",
512
516
  className
513
517
  ),
@@ -535,7 +539,7 @@ const TabList = (props) => {
535
539
  $5e8ad37a45e1c704$export$e51a686c67fdaa2d,
536
540
  {
537
541
  "aria-label": ariaLabel ?? __("tabs", "eightshift-ui-components"),
538
- className: ({ orientation }) => classnames(
542
+ className: ({ orientation }) => clsx(
539
543
  "es-uic-flex es-uic-gap-1",
540
544
  orientation === "vertical" && "es-uic-h-full es-uic-flex-col es-uic-pr-1.5",
541
545
  orientation === "horizontal" && "es-uic-w-full es-uic-items-end es-uic-border-b es-uic-border-b-gray-300",
@@ -569,7 +573,7 @@ const Tab = (props) => {
569
573
  ...other,
570
574
  isDisabled: disabled,
571
575
  className: ({ isSelected, isDisabled }) => {
572
- return classnames(
576
+ return clsx(
573
577
  "es-uic-relative es-uic-flex es-uic-select-none es-uic-items-center es-uic-rounded es-uic-p-1.5 es-uic-text-sm es-uic-transition",
574
578
  "focus:es-uic-outline-none focus-visible:es-uic-outline-none focus-visible:es-uic-ring focus-visible:es-uic-ring-teal-500 focus-visible:es-uic-ring-opacity-50",
575
579
  'after:es-uic-absolute after:es-uic-rounded-full after:es-uic-bg-teal-600 after:es-uic-shadow-sm after:es-uic-shadow-teal-500/25 after:es-uic-transition after:es-uic-duration-300 after:es-uic-content-[""]',
@@ -609,10 +613,7 @@ const TabPanel = (props) => {
609
613
  $5e8ad37a45e1c704$export$3d96ec278d3efce4,
610
614
  {
611
615
  ...other,
612
- className: classnames(
613
- "es-uic-mt-1.5 es-uic-space-y-2.5 es-uic-text-sm focus:es-uic-outline-none",
614
- className
615
- ),
616
+ className: clsx("es-uic-mt-1.5 es-uic-space-y-2.5 es-uic-text-sm focus:es-uic-outline-none", className),
616
617
  children
617
618
  }
618
619
  );
@@ -1,13 +1,13 @@
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, i as $64fa3d84918910a7$export$ef03459518577ad4, c as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "../../utils-BsiH7-5Y.js";
2
+ import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, i as $64fa3d84918910a7$export$ef03459518577ad4, c as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "../../utils-DIBzm1e4.js";
3
3
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-DG2RfOUr.js";
4
4
  import React__default, { forwardRef, createContext } from "react";
5
- import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-DJ_z5E2S.js";
6
- import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-C9ETOBaZ.js";
7
- import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-Cc-4eouh.js";
8
- import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-C3K8zAKj.js";
9
- import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-BYRI1Lfo.js";
10
- import { classnames } from "../../utilities/classnames.js";
5
+ import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-DghG5ImG.js";
6
+ import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-CExfZM8x.js";
7
+ import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CRx_hYC4.js";
8
+ import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-B0hyd-S4.js";
9
+ import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-BPJVSUyp.js";
10
+ import { c as clsx } from "../../lite-pbIeT7tm.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);
13
13
  return {
@@ -85,6 +85,8 @@ const $8e59e948500a8fe1$export$b5d5cf8927ab7262 = /* @__PURE__ */ forwardRef($8e
85
85
  * @param {boolean} [props.disabled] - Whether the switch is disabled.
86
86
  * @param {string} [props.id] - The ID of the switch.
87
87
  * @param {string} [props.className] - Classes to pass to the switch.
88
+ * @param {boolean} [props.isIndeterminate] - If `true`, the switch will render in an indeterminate state.
89
+ * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
88
90
  *
89
91
  * @returns {JSX.Element} The Switch component.
90
92
  *
@@ -99,7 +101,10 @@ const $8e59e948500a8fe1$export$b5d5cf8927ab7262 = /* @__PURE__ */ forwardRef($8e
99
101
  * @preserve
100
102
  */
101
103
  const Switch = (props) => {
102
- const { checked, onChange, disabled, id, children, className } = props;
104
+ const { checked, onChange, disabled, id, children, className, isIndeterminate, hidden } = props;
105
+ if (hidden) {
106
+ return null;
107
+ }
103
108
  return /* @__PURE__ */ jsxs(
104
109
  $8e59e948500a8fe1$export$b5d5cf8927ab7262,
105
110
  {
@@ -110,10 +115,10 @@ const Switch = (props) => {
110
115
  className: "es-uic-group es-uic-flex es-uic-items-center es-uic-justify-between es-uic-gap-2",
111
116
  children: [
112
117
  children,
113
- /* @__PURE__ */ jsx("div", { className: classnames("es-uic-flex es-uic-items-center es-uic-min-w-9 es-uic-justify-center", className), children: /* @__PURE__ */ jsx(
118
+ /* @__PURE__ */ jsx("div", { className: clsx("es-uic-flex es-uic-shrink-0 es-uic-items-center es-uic-justify-center", className), children: /* @__PURE__ */ jsx(
114
119
  "div",
115
120
  {
116
- className: classnames(
121
+ className: clsx(
117
122
  "es-uic-no-webkit-highlight es-uic-h-4 es-uic-w-7 es-uic-shrink-0 es-uic-cursor-pointer es-uic-rounded-full es-uic-border es-uic-border-gray-500 es-uic-bg-white es-uic-p-[0.1875rem] es-uic-shadow-sm es-uic-outline-none es-uic-transition",
118
123
  "group-focus-visible:es-uic-ring group-focus-visible:es-uic-ring-teal-500 group-focus-visible:es-uic-ring-opacity-50",
119
124
  "group-selected:es-uic-border-teal-800/75 group-selected:es-uic-bg-teal-100/25 group-selected:es-uic-shadow-teal-500/25",
@@ -122,10 +127,11 @@ const Switch = (props) => {
122
127
  children: /* @__PURE__ */ jsx(
123
128
  "span",
124
129
  {
125
- className: classnames(
130
+ className: clsx(
126
131
  "es-uic-block es-uic-size-2 es-uic-rounded-full es-uic-border es-uic-border-gray-500 es-uic-bg-gray-500 es-uic-transition es-uic-will-change-transform",
127
132
  "group-selected:es-uic-translate-x-3 group-selected:es-uic-scale-125 group-selected:es-uic-border-teal-600 group-selected:es-uic-bg-teal-600",
128
- "group-disabled:es-uic-border-gray-300 group-disabled:es-uic-bg-white"
133
+ "group-disabled:es-uic-border-gray-300 group-disabled:es-uic-bg-white",
134
+ isIndeterminate && "es-uic-translate-x-1.5"
129
135
  )
130
136
  }
131
137
  )
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-BPzS-sR7.js";
2
+ import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-9x5iLJ-Y.js";
3
3
  import { Switch } from "./switch.js";
4
4
  import { RichLabel } from "../rich-label/rich-label.js";
5
5
  /**
@@ -15,6 +15,8 @@ import { RichLabel } from "../rich-label/rich-label.js";
15
15
  * @param {string} [props.subtitle] - Subtitle to display.
16
16
  * @param {string} [props.className] - Classes to pass to the toggle switch.
17
17
  * @param {string} [props.labelClassName] - Classes to pass to the label.
18
+ * @param {boolean} [props.isIndeterminate] - If `true`, the switch will render in an indeterminate state.
19
+ * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
18
20
  *
19
21
  * @returns {JSX.Element} The Toggle component.
20
22
  *
@@ -31,7 +33,10 @@ import { RichLabel } from "../rich-label/rich-label.js";
31
33
  * @preserve
32
34
  */
33
35
  const Toggle = (props) => {
34
- const { checked, onChange, icon, label, subtitle, disabled, className, labelClassName } = props;
36
+ const { checked, onChange, icon, label, subtitle, disabled, className, labelClassName, isIndeterminate, hidden } = props;
37
+ if (hidden) {
38
+ return null;
39
+ }
35
40
  return /* @__PURE__ */ jsx(
36
41
  Switch,
37
42
  {
@@ -39,6 +44,7 @@ const Toggle = (props) => {
39
44
  onChange,
40
45
  disabled,
41
46
  className,
47
+ isIndeterminate,
42
48
  children: /* @__PURE__ */ jsx(
43
49
  RichLabel,
44
50
  {
@@ -1,12 +1,12 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { n as $ff5963eb1fccf552$export$e08e3b67e392101e, d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-BsiH7-5Y.js";
2
+ import { n as $ff5963eb1fccf552$export$e08e3b67e392101e, d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-DIBzm1e4.js";
3
3
  import React__default, { forwardRef, createContext } from "react";
4
- import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-DJ_z5E2S.js";
5
- import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "../../useButton-CuG5UzUw.js";
6
- import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-Cc-4eouh.js";
7
- import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-C3K8zAKj.js";
8
- import { classnames } from "../../utilities/classnames.js";
9
- import { T as Tooltip } from "../../tooltip-CkCndvTI.js";
4
+ import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-DghG5ImG.js";
5
+ import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "../../useButton-D-xACzEY.js";
6
+ import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CRx_hYC4.js";
7
+ import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-B0hyd-S4.js";
8
+ import { c as clsx } from "../../lite-pbIeT7tm.js";
9
+ import { T as Tooltip } from "../../tooltip-T6H9uF-Z.js";
10
10
  function $55f54f7887471b58$export$51e84d46ca0bc451(props, state, ref) {
11
11
  const { isSelected } = state;
12
12
  const { isPressed, buttonProps } = $701a24aa0da5b062$export$ea18c227d4417cc3({
@@ -69,6 +69,7 @@ const $efde0372d7a700fe$export$d2b052e7b4be1756 = /* @__PURE__ */ forwardRef($ef
69
69
  * @param {Function} [props.onChange] - Function to run when the toggle state changes.
70
70
  * @param {string} [props.wrapperClassName] - Classes to pass to the tooltip wrapper.
71
71
  * @param {Object} [props.tooltipProps] - Props to pass to the tooltip.
72
+ * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
72
73
  *
73
74
  * @returns {JSX.Element} The Button component.
74
75
  *
@@ -107,8 +108,12 @@ const ToggleButton = (props) => {
107
108
  onChange,
108
109
  wrapperClassName,
109
110
  tooltipProps,
111
+ hidden,
110
112
  ...other
111
113
  } = props;
114
+ if (hidden) {
115
+ return null;
116
+ }
112
117
  const sizes = {
113
118
  small: {
114
119
  iconButton: "es-uic-size-7",
@@ -157,8 +162,11 @@ const ToggleButton = (props) => {
157
162
  isDisabled: disabled,
158
163
  className: ({ isSelected }) => {
159
164
  var _a, _b, _c, _d, _e, _f;
160
- return classnames(
161
- "es-uic-isolate es-uic-flex es-uic-items-center es-uic-justify-center es-uic-gap-1 es-uic-rounded-md es-uic-transition es-uic-duration-300 es-uic-relative",
165
+ return clsx(
166
+ "es-uic-relative es-uic-isolate es-uic-flex es-uic-items-center es-uic-gap-1 es-uic-rounded-md es-uic-transition es-uic-duration-300",
167
+ icon && children && "es-uic-justify-start",
168
+ icon && !children && "es-uic-justify-center",
169
+ !icon && children && "es-uic-justify-center",
162
170
  'after:es-uic-absolute after:es-uic-inset-0 after:-es-uic-z-10 after:es-uic-rounded-[0.3125rem] after:es-uic-bg-gradient-to-br after:es-uic-from-teal-100/40 after:es-uic-via-transparent after:es-uic-to-teal-200/50 after:es-uic-opacity-0 after:es-uic-transition-opacity after:es-uic-content-[""]',
163
171
  "disabled:es-uic-shadow-none",
164
172
  "focus:es-uic-outline-none focus-visible:es-uic-outline-none focus-visible:es-uic-ring",
@@ -174,10 +182,14 @@ const ToggleButton = (props) => {
174
182
  children && !icon && sizes[size].buttonPadding,
175
183
  sizes[size].iconSize,
176
184
  isSelected && (((_f = themes[type]) == null ? void 0 : _f.selected) ?? themes.default.selected),
177
- "[.es-uic-button-group_&:not(:first-child)]:es-uic-rounded-l-none [.es-uic-button-group_&:not(:last-child)]:-es-uic-mr-px [.es-uic-button-group_&:not(:last-child)]:es-uic-rounded-r-none",
178
- "[.es-uic-button-group_&:not(:first-child)]:after:es-uic-rounded-l-none [.es-uic-button-group_&:not(:last-child)]:after:es-uic-rounded-r-none",
179
- "[.es-uic-button-group_div:not(:first-child)_>_&]:es-uic-rounded-l-none [.es-uic-button-group_div:not(:last-child)_>_&]:-es-uic-mr-px [.es-uic-button-group_div:not(:last-child)_>_&]:es-uic-rounded-r-none",
180
- "[.es-uic-button-group_div:not(:last-child)_>_&]:after:es-uic-rounded-r-none [.es-uic-button-group_div:not(:first-child)_>_&]:after:es-uic-rounded-l-none",
185
+ "[.es-uic-button-group-h_&:not(:first-child)]:es-uic-rounded-l-none [.es-uic-button-group-h_&:not(:last-child)]:-es-uic-mr-px [.es-uic-button-group-h_&:not(:last-child)]:es-uic-rounded-r-none",
186
+ "[.es-uic-button-group-h_&:not(:first-child)]:after:es-uic-rounded-l-none [.es-uic-button-group-h_&:not(:last-child)]:after:es-uic-rounded-r-none",
187
+ "[.es-uic-button-group-h_div:not(:first-child)_>_&]:es-uic-rounded-l-none [.es-uic-button-group-h_div:not(:last-child)_>_&]:-es-uic-mr-px [.es-uic-button-group-h_div:not(:last-child)_>_&]:es-uic-rounded-r-none",
188
+ "[.es-uic-button-group-h_div:not(:first-child)_>_&]:after:es-uic-rounded-l-none [.es-uic-button-group-h_div:not(:last-child)_>_&]:after:es-uic-rounded-r-none",
189
+ "[.es-uic-button-group-v_&:not(:first-child)]:es-uic-rounded-t-none [.es-uic-button-group-v_&:not(:last-child)]:-es-uic-mb-px [.es-uic-button-group-v_&:not(:last-child)]:es-uic-rounded-b-none",
190
+ "[.es-uic-button-group-v_&:not(:first-child)]:after:es-uic-rounded-t-none [.es-uic-button-group-v_&:not(:last-child)]:after:es-uic-rounded-b-none",
191
+ "[.es-uic-button-group-v_div:not(:first-child)_>_&]:es-uic-rounded-t-none [.es-uic-button-group-v_div:not(:last-child)_>_&]:-es-uic-mb-px [.es-uic-button-group-v_div:not(:last-child)_>_&]:es-uic-rounded-b-none",
192
+ "[.es-uic-button-group-v_div:not(:first-child)_>_&]:after:es-uic-rounded-t-none [.es-uic-button-group-v_div:not(:last-child)_>_&]:after:es-uic-rounded-b-none",
181
193
  className
182
194
  );
183
195
  },
@@ -1,9 +1,9 @@
1
1
  import "react/jsx-runtime";
2
- import { D, T } from "../../tooltip-CkCndvTI.js";
3
- import "../../utilities/classnames.js";
2
+ import { D, T } from "../../tooltip-T6H9uF-Z.js";
3
+ import "../../lite-pbIeT7tm.js";
4
4
  import "react";
5
- import "../../focusSafely-C3K8zAKj.js";
6
- import "../../utils-BsiH7-5Y.js";
5
+ import "../../focusSafely-B0hyd-S4.js";
6
+ import "../../utils-DIBzm1e4.js";
7
7
  export {
8
8
  D as DecorativeTooltip,
9
9
  T as Tooltip
@@ -1,5 +1,5 @@
1
1
  import React__default, { useState, useEffect, useContext } from "react";
2
- import { o as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-BsiH7-5Y.js";
2
+ import { o as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-DIBzm1e4.js";
3
3
  const $148a7a147e38ea7f$var$RTL_SCRIPTS = /* @__PURE__ */ new Set([
4
4
  "Arab",
5
5
  "Syrc",
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.js";
1
+ import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-DWwsNxpa.js";
2
2
  function memize(fn, options) {
3
3
  var size = 0;
4
4
  var head;
@@ -1,4 +1,4 @@
1
- import { g as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, o as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-BsiH7-5Y.js";
1
+ import { g as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, o as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-DIBzm1e4.js";
2
2
  import { useState, useRef, useEffect, useCallback, useMemo } from "react";
3
3
  const $431fbd86ca7dc216$export$b204af158042fbac = (el) => {
4
4
  var _el_ownerDocument;
package/dist/fonts.js ADDED
@@ -0,0 +1 @@
1
+ import './assets/fonts.css';