@telepix-lab/telepix-ui 0.3.7 → 0.4.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.
@@ -220,7 +220,7 @@ var VisuallyHidden = React__namespace.forwardRef(
220
220
  }
221
221
  );
222
222
  VisuallyHidden.displayName = NAME$1;
223
- var Root$3 = VisuallyHidden;
223
+ var Root$4 = VisuallyHidden;
224
224
 
225
225
  // packages/react/context/src/create-context.tsx
226
226
  function createContext2(rootComponentName, defaultContext) {
@@ -1982,7 +1982,7 @@ var DialogTrigger$1 = React__namespace.forwardRef(
1982
1982
  "aria-haspopup": "dialog",
1983
1983
  "aria-expanded": context.open,
1984
1984
  "aria-controls": context.contentId,
1985
- "data-state": getState$3(context.open),
1985
+ "data-state": getState$4(context.open),
1986
1986
  ...triggerProps,
1987
1987
  ref: composedTriggerRef,
1988
1988
  onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
@@ -2022,7 +2022,7 @@ var DialogOverlayImpl = React__namespace.forwardRef(
2022
2022
  /* @__PURE__ */ jsxRuntime.jsx(ReactRemoveScroll, { as: Slot$3, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsxRuntime.jsx(
2023
2023
  Primitive.div,
2024
2024
  {
2025
- "data-state": getState$3(context.open),
2025
+ "data-state": getState$4(context.open),
2026
2026
  ...overlayProps,
2027
2027
  ref: forwardedRef,
2028
2028
  style: { pointerEvents: "auto", ...overlayProps.style }
@@ -2138,7 +2138,7 @@ var DialogContentImpl = React__namespace.forwardRef(
2138
2138
  id: context.contentId,
2139
2139
  "aria-describedby": context.descriptionId,
2140
2140
  "aria-labelledby": context.titleId,
2141
- "data-state": getState$3(context.open),
2141
+ "data-state": getState$4(context.open),
2142
2142
  ...contentProps,
2143
2143
  ref: composedRefs,
2144
2144
  onDismiss: () => context.onOpenChange(false)
@@ -2188,7 +2188,7 @@ var DialogClose$1 = React__namespace.forwardRef(
2188
2188
  }
2189
2189
  );
2190
2190
  DialogClose$1.displayName = CLOSE_NAME$1;
2191
- function getState$3(open) {
2191
+ function getState$4(open) {
2192
2192
  return open ? "open" : "closed";
2193
2193
  }
2194
2194
  var TITLE_WARNING_NAME = "DialogTitleWarning";
@@ -2225,7 +2225,7 @@ var DescriptionWarning = ({ contentRef, descriptionId }) => {
2225
2225
  }, [MESSAGE, contentRef, descriptionId]);
2226
2226
  return null;
2227
2227
  };
2228
- var Root$2 = Dialog$1;
2228
+ var Root$3 = Dialog$1;
2229
2229
  var Trigger$4 = DialogTrigger$1;
2230
2230
  var Portal$3 = DialogPortal$1;
2231
2231
  var Overlay = DialogOverlay;
@@ -2376,7 +2376,7 @@ var CheckboxTrigger = React__namespace.forwardRef(
2376
2376
  role: "checkbox",
2377
2377
  "aria-checked": isIndeterminate$1(checked) ? "mixed" : checked,
2378
2378
  "aria-required": required,
2379
- "data-state": getState$2(checked),
2379
+ "data-state": getState$3(checked),
2380
2380
  "data-disabled": disabled ? "" : void 0,
2381
2381
  disabled,
2382
2382
  value,
@@ -2456,7 +2456,7 @@ var CheckboxIndicator = React__namespace.forwardRef(
2456
2456
  children: /* @__PURE__ */ jsxRuntime.jsx(
2457
2457
  Primitive.span,
2458
2458
  {
2459
- "data-state": getState$2(context.checked),
2459
+ "data-state": getState$3(context.checked),
2460
2460
  "data-disabled": context.disabled ? "" : void 0,
2461
2461
  ...indicatorProps,
2462
2462
  ref: forwardedRef,
@@ -2468,7 +2468,7 @@ var CheckboxIndicator = React__namespace.forwardRef(
2468
2468
  }
2469
2469
  );
2470
2470
  CheckboxIndicator.displayName = INDICATOR_NAME$2;
2471
- var BUBBLE_INPUT_NAME$2 = "CheckboxBubbleInput";
2471
+ var BUBBLE_INPUT_NAME$3 = "CheckboxBubbleInput";
2472
2472
  var CheckboxBubbleInput = React__namespace.forwardRef(
2473
2473
  ({ __scopeCheckbox, ...props }, forwardedRef) => {
2474
2474
  const {
@@ -2483,7 +2483,7 @@ var CheckboxBubbleInput = React__namespace.forwardRef(
2483
2483
  form,
2484
2484
  bubbleInput,
2485
2485
  setBubbleInput
2486
- } = useCheckboxContext(BUBBLE_INPUT_NAME$2, __scopeCheckbox);
2486
+ } = useCheckboxContext(BUBBLE_INPUT_NAME$3, __scopeCheckbox);
2487
2487
  const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
2488
2488
  const prevChecked = usePrevious(checked);
2489
2489
  const controlSize = useSize(control);
@@ -2535,14 +2535,14 @@ var CheckboxBubbleInput = React__namespace.forwardRef(
2535
2535
  );
2536
2536
  }
2537
2537
  );
2538
- CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME$2;
2538
+ CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME$3;
2539
2539
  function isFunction(value) {
2540
2540
  return typeof value === "function";
2541
2541
  }
2542
2542
  function isIndeterminate$1(checked) {
2543
2543
  return checked === "indeterminate";
2544
2544
  }
2545
- function getState$2(checked) {
2545
+ function getState$3(checked) {
2546
2546
  return isIndeterminate$1(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
2547
2547
  }
2548
2548
 
@@ -4732,7 +4732,7 @@ var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
4732
4732
  );
4733
4733
  });
4734
4734
  Arrow$1.displayName = NAME;
4735
- var Root$1 = Arrow$1;
4735
+ var Root$2 = Arrow$1;
4736
4736
 
4737
4737
  var POPPER_NAME = "Popper";
4738
4738
  var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
@@ -4940,7 +4940,7 @@ var PopperArrow = React__namespace.forwardRef(function PopperArrow2(props, forwa
4940
4940
  visibility: contentContext.shouldHideArrow ? "hidden" : void 0
4941
4941
  },
4942
4942
  children: /* @__PURE__ */ jsxRuntime.jsx(
4943
- Root$1,
4943
+ Root$2,
4944
4944
  {
4945
4945
  ...arrowProps,
4946
4946
  ref: forwardedRef,
@@ -5206,7 +5206,7 @@ function focusFirst$1(candidates, preventScroll = false) {
5206
5206
  function wrapArray$2(array, startIndex) {
5207
5207
  return array.map((_, index) => array[(startIndex + index) % array.length]);
5208
5208
  }
5209
- var Root = RovingFocusGroup;
5209
+ var Root$1 = RovingFocusGroup;
5210
5210
  var Item$1 = RovingFocusGroupItem;
5211
5211
 
5212
5212
  var SELECTION_KEYS$1 = ["Enter", " "];
@@ -5457,7 +5457,7 @@ var MenuContentImpl = React__namespace.forwardRef(
5457
5457
  onInteractOutside,
5458
5458
  onDismiss,
5459
5459
  children: /* @__PURE__ */ jsxRuntime.jsx(
5460
- Root,
5460
+ Root$1,
5461
5461
  {
5462
5462
  asChild: true,
5463
5463
  ...rovingFocusGroupScope,
@@ -6375,7 +6375,7 @@ var PopoverTrigger = React__namespace.forwardRef(
6375
6375
  "aria-haspopup": "dialog",
6376
6376
  "aria-expanded": context.open,
6377
6377
  "aria-controls": context.contentId,
6378
- "data-state": getState$1(context.open),
6378
+ "data-state": getState$2(context.open),
6379
6379
  ...triggerProps,
6380
6380
  ref: composedTriggerRef,
6381
6381
  onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
@@ -6518,7 +6518,7 @@ var PopoverContentImpl = React__namespace.forwardRef(
6518
6518
  children: /* @__PURE__ */ jsxRuntime.jsx(
6519
6519
  Content,
6520
6520
  {
6521
- "data-state": getState$1(context.open),
6521
+ "data-state": getState$2(context.open),
6522
6522
  role: "dialog",
6523
6523
  id: context.contentId,
6524
6524
  ...popperScope,
@@ -6569,7 +6569,7 @@ var PopoverArrow = React__namespace.forwardRef(
6569
6569
  }
6570
6570
  );
6571
6571
  PopoverArrow.displayName = ARROW_NAME$2;
6572
- function getState$1(open) {
6572
+ function getState$2(open) {
6573
6573
  return open ? "open" : "closed";
6574
6574
  }
6575
6575
  var Root2$2 = Popover;
@@ -6603,7 +6603,7 @@ var Radio = React__namespace.forwardRef(
6603
6603
  type: "button",
6604
6604
  role: "radio",
6605
6605
  "aria-checked": checked,
6606
- "data-state": getState(checked),
6606
+ "data-state": getState$1(checked),
6607
6607
  "data-disabled": disabled ? "" : void 0,
6608
6608
  disabled,
6609
6609
  value,
@@ -6644,7 +6644,7 @@ var RadioIndicator = React__namespace.forwardRef(
6644
6644
  return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsxRuntime.jsx(
6645
6645
  Primitive.span,
6646
6646
  {
6647
- "data-state": getState(context.checked),
6647
+ "data-state": getState$1(context.checked),
6648
6648
  "data-disabled": context.disabled ? "" : void 0,
6649
6649
  ...indicatorProps,
6650
6650
  ref: forwardedRef
@@ -6653,7 +6653,7 @@ var RadioIndicator = React__namespace.forwardRef(
6653
6653
  }
6654
6654
  );
6655
6655
  RadioIndicator.displayName = INDICATOR_NAME;
6656
- var BUBBLE_INPUT_NAME$1 = "RadioBubbleInput";
6656
+ var BUBBLE_INPUT_NAME$2 = "RadioBubbleInput";
6657
6657
  var RadioBubbleInput = React__namespace.forwardRef(
6658
6658
  ({
6659
6659
  __scopeRadio,
@@ -6702,8 +6702,8 @@ var RadioBubbleInput = React__namespace.forwardRef(
6702
6702
  );
6703
6703
  }
6704
6704
  );
6705
- RadioBubbleInput.displayName = BUBBLE_INPUT_NAME$1;
6706
- function getState(checked) {
6705
+ RadioBubbleInput.displayName = BUBBLE_INPUT_NAME$2;
6706
+ function getState$1(checked) {
6707
6707
  return checked ? "checked" : "unchecked";
6708
6708
  }
6709
6709
  var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
@@ -6748,7 +6748,7 @@ var RadioGroup$1 = React__namespace.forwardRef(
6748
6748
  value,
6749
6749
  onValueChange: setValue,
6750
6750
  children: /* @__PURE__ */ jsxRuntime.jsx(
6751
- Root,
6751
+ Root$1,
6752
6752
  {
6753
6753
  asChild: true,
6754
6754
  ...rovingFocusGroupScope,
@@ -7881,7 +7881,7 @@ var SelectArrow = React__namespace.forwardRef(
7881
7881
  }
7882
7882
  );
7883
7883
  SelectArrow.displayName = ARROW_NAME$1;
7884
- var BUBBLE_INPUT_NAME = "SelectBubbleInput";
7884
+ var BUBBLE_INPUT_NAME$1 = "SelectBubbleInput";
7885
7885
  var SelectBubbleInput = React__namespace.forwardRef(
7886
7886
  ({ __scopeSelect, value, ...props }, forwardedRef) => {
7887
7887
  const ref = React__namespace.useRef(null);
@@ -7913,7 +7913,7 @@ var SelectBubbleInput = React__namespace.forwardRef(
7913
7913
  );
7914
7914
  }
7915
7915
  );
7916
- SelectBubbleInput.displayName = BUBBLE_INPUT_NAME;
7916
+ SelectBubbleInput.displayName = BUBBLE_INPUT_NAME$1;
7917
7917
  function shouldShowPlaceholder(value) {
7918
7918
  return value === "" || value === void 0;
7919
7919
  }
@@ -7971,6 +7971,147 @@ var ItemText = SelectItemText;
7971
7971
  var ItemIndicator = SelectItemIndicator;
7972
7972
  var Separator = SelectSeparator$1;
7973
7973
 
7974
+ var SWITCH_NAME = "Switch";
7975
+ var [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);
7976
+ var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
7977
+ var Switch$1 = React__namespace.forwardRef(
7978
+ (props, forwardedRef) => {
7979
+ const {
7980
+ __scopeSwitch,
7981
+ name,
7982
+ checked: checkedProp,
7983
+ defaultChecked,
7984
+ required,
7985
+ disabled,
7986
+ value = "on",
7987
+ onCheckedChange,
7988
+ form,
7989
+ ...switchProps
7990
+ } = props;
7991
+ const [button, setButton] = React__namespace.useState(null);
7992
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
7993
+ const hasConsumerStoppedPropagationRef = React__namespace.useRef(false);
7994
+ const isFormControl = button ? form || !!button.closest("form") : true;
7995
+ const [checked, setChecked] = useControllableState({
7996
+ prop: checkedProp,
7997
+ defaultProp: defaultChecked ?? false,
7998
+ onChange: onCheckedChange,
7999
+ caller: SWITCH_NAME
8000
+ });
8001
+ return /* @__PURE__ */ jsxRuntime.jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
8002
+ /* @__PURE__ */ jsxRuntime.jsx(
8003
+ Primitive.button,
8004
+ {
8005
+ type: "button",
8006
+ role: "switch",
8007
+ "aria-checked": checked,
8008
+ "aria-required": required,
8009
+ "data-state": getState(checked),
8010
+ "data-disabled": disabled ? "" : void 0,
8011
+ disabled,
8012
+ value,
8013
+ ...switchProps,
8014
+ ref: composedRefs,
8015
+ onClick: composeEventHandlers(props.onClick, (event) => {
8016
+ setChecked((prevChecked) => !prevChecked);
8017
+ if (isFormControl) {
8018
+ hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
8019
+ if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
8020
+ }
8021
+ })
8022
+ }
8023
+ ),
8024
+ isFormControl && /* @__PURE__ */ jsxRuntime.jsx(
8025
+ SwitchBubbleInput,
8026
+ {
8027
+ control: button,
8028
+ bubbles: !hasConsumerStoppedPropagationRef.current,
8029
+ name,
8030
+ value,
8031
+ checked,
8032
+ required,
8033
+ disabled,
8034
+ form,
8035
+ style: { transform: "translateX(-100%)" }
8036
+ }
8037
+ )
8038
+ ] });
8039
+ }
8040
+ );
8041
+ Switch$1.displayName = SWITCH_NAME;
8042
+ var THUMB_NAME = "SwitchThumb";
8043
+ var SwitchThumb = React__namespace.forwardRef(
8044
+ (props, forwardedRef) => {
8045
+ const { __scopeSwitch, ...thumbProps } = props;
8046
+ const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
8047
+ return /* @__PURE__ */ jsxRuntime.jsx(
8048
+ Primitive.span,
8049
+ {
8050
+ "data-state": getState(context.checked),
8051
+ "data-disabled": context.disabled ? "" : void 0,
8052
+ ...thumbProps,
8053
+ ref: forwardedRef
8054
+ }
8055
+ );
8056
+ }
8057
+ );
8058
+ SwitchThumb.displayName = THUMB_NAME;
8059
+ var BUBBLE_INPUT_NAME = "SwitchBubbleInput";
8060
+ var SwitchBubbleInput = React__namespace.forwardRef(
8061
+ ({
8062
+ __scopeSwitch,
8063
+ control,
8064
+ checked,
8065
+ bubbles = true,
8066
+ ...props
8067
+ }, forwardedRef) => {
8068
+ const ref = React__namespace.useRef(null);
8069
+ const composedRefs = useComposedRefs(ref, forwardedRef);
8070
+ const prevChecked = usePrevious(checked);
8071
+ const controlSize = useSize(control);
8072
+ React__namespace.useEffect(() => {
8073
+ const input = ref.current;
8074
+ if (!input) return;
8075
+ const inputProto = window.HTMLInputElement.prototype;
8076
+ const descriptor = Object.getOwnPropertyDescriptor(
8077
+ inputProto,
8078
+ "checked"
8079
+ );
8080
+ const setChecked = descriptor.set;
8081
+ if (prevChecked !== checked && setChecked) {
8082
+ const event = new Event("click", { bubbles });
8083
+ setChecked.call(input, checked);
8084
+ input.dispatchEvent(event);
8085
+ }
8086
+ }, [prevChecked, checked, bubbles]);
8087
+ return /* @__PURE__ */ jsxRuntime.jsx(
8088
+ "input",
8089
+ {
8090
+ type: "checkbox",
8091
+ "aria-hidden": true,
8092
+ defaultChecked: checked,
8093
+ ...props,
8094
+ tabIndex: -1,
8095
+ ref: composedRefs,
8096
+ style: {
8097
+ ...props.style,
8098
+ ...controlSize,
8099
+ position: "absolute",
8100
+ pointerEvents: "none",
8101
+ opacity: 0,
8102
+ margin: 0
8103
+ }
8104
+ }
8105
+ );
8106
+ }
8107
+ );
8108
+ SwitchBubbleInput.displayName = BUBBLE_INPUT_NAME;
8109
+ function getState(checked) {
8110
+ return checked ? "checked" : "unchecked";
8111
+ }
8112
+ var Root = Switch$1;
8113
+ var Thumb = SwitchThumb;
8114
+
7974
8115
  var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
7975
8116
  createPopperScope
7976
8117
  ]);
@@ -8302,7 +8443,7 @@ var TooltipContentImpl = React__namespace.forwardRef(
8302
8443
  },
8303
8444
  children: [
8304
8445
  /* @__PURE__ */ jsxRuntime.jsx(Slottable, { children }),
8305
- /* @__PURE__ */ jsxRuntime.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntime.jsx(Root$3, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
8446
+ /* @__PURE__ */ jsxRuntime.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntime.jsx(Root$4, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
8306
8447
  ]
8307
8448
  }
8308
8449
  )
@@ -8461,6 +8602,28 @@ function _objectWithoutPropertiesLoose(source, excluded) {
8461
8602
  return target;
8462
8603
  }
8463
8604
 
8605
+ var _excluded$F = ["color"];
8606
+ var BoxIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
8607
+ var _ref$color = _ref.color,
8608
+ color = _ref$color === void 0 ? 'currentColor' : _ref$color,
8609
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$F);
8610
+
8611
+ return React.createElement("svg", Object.assign({
8612
+ width: "15",
8613
+ height: "15",
8614
+ viewBox: "0 0 15 15",
8615
+ fill: "none",
8616
+ xmlns: "http://www.w3.org/2000/svg"
8617
+ }, props, {
8618
+ ref: forwardedRef
8619
+ }), React.createElement("path", {
8620
+ d: "M12.5 2H2.5C2.22386 2 2 2.22386 2 2.5V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V2.5C13 2.22386 12.7761 2 12.5 2ZM2.5 1C1.67157 1 1 1.67157 1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5Z",
8621
+ fill: color,
8622
+ fillRule: "evenodd",
8623
+ clipRule: "evenodd"
8624
+ }));
8625
+ });
8626
+
8464
8627
  var _excluded$N = ["color"];
8465
8628
  var CaretDownIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
8466
8629
  var _ref$color = _ref.color,
@@ -12022,13 +12185,13 @@ const createLucideIcon = (iconName, iconNode) => {
12022
12185
  */
12023
12186
 
12024
12187
 
12025
- const __iconNode$6 = [
12188
+ const __iconNode$4 = [
12026
12189
  ["path", { d: "M8 2v4", key: "1cmpym" }],
12027
12190
  ["path", { d: "M16 2v4", key: "4m81vk" }],
12028
12191
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
12029
12192
  ["path", { d: "M3 10h18", key: "8toen8" }]
12030
12193
  ];
12031
- const Calendar$1 = createLucideIcon("calendar", __iconNode$6);
12194
+ const Calendar$1 = createLucideIcon("calendar", __iconNode$4);
12032
12195
 
12033
12196
  /**
12034
12197
  * @license lucide-react v0.513.0 - ISC
@@ -12038,8 +12201,8 @@ const Calendar$1 = createLucideIcon("calendar", __iconNode$6);
12038
12201
  */
12039
12202
 
12040
12203
 
12041
- const __iconNode$5 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
12042
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$5);
12204
+ const __iconNode$3 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
12205
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$3);
12043
12206
 
12044
12207
  /**
12045
12208
  * @license lucide-react v0.513.0 - ISC
@@ -12049,8 +12212,8 @@ const ChevronDown = createLucideIcon("chevron-down", __iconNode$5);
12049
12212
  */
12050
12213
 
12051
12214
 
12052
- const __iconNode$4 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
12053
- const ChevronLeft = createLucideIcon("chevron-left", __iconNode$4);
12215
+ const __iconNode$2 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
12216
+ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$2);
12054
12217
 
12055
12218
  /**
12056
12219
  * @license lucide-react v0.513.0 - ISC
@@ -12060,38 +12223,11 @@ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$4);
12060
12223
  */
12061
12224
 
12062
12225
 
12063
- const __iconNode$3 = [
12064
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
12065
- ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
12066
- ];
12067
- const SquareCheck = createLucideIcon("square-check", __iconNode$3);
12068
-
12069
- /**
12070
- * @license lucide-react v0.513.0 - ISC
12071
- *
12072
- * This source code is licensed under the ISC license.
12073
- * See the LICENSE file in the root directory of this source tree.
12074
- */
12075
-
12076
-
12077
- const __iconNode$2 = [
12226
+ const __iconNode$1 = [
12078
12227
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
12079
12228
  ["path", { d: "M8 12h8", key: "1wcyev" }]
12080
12229
  ];
12081
- const SquareMinus = createLucideIcon("square-minus", __iconNode$2);
12082
-
12083
- /**
12084
- * @license lucide-react v0.513.0 - ISC
12085
- *
12086
- * This source code is licensed under the ISC license.
12087
- * See the LICENSE file in the root directory of this source tree.
12088
- */
12089
-
12090
-
12091
- const __iconNode$1 = [
12092
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
12093
- ];
12094
- const Square = createLucideIcon("square", __iconNode$1);
12230
+ const SquareMinus = createLucideIcon("square-minus", __iconNode$1);
12095
12231
 
12096
12232
  /**
12097
12233
  * @license lucide-react v0.513.0 - ISC
@@ -12129,15 +12265,14 @@ const Checkbox = React.forwardRef(({ label, labelClassName, wrapperClassName, ..
12129
12265
  setChecked(isChecked ?? defaultChecked);
12130
12266
  }, [isChecked, defaultChecked]);
12131
12267
  const randomId = React.useId();
12132
- const checkboxIconClass = cn("size-4 fill-transparent stroke-comp-mono-default", checked && "stroke-comp-mono-selected", disabled && "stroke-comp-disabled cursor-default");
12133
12268
  const renderCheckboxIcon = (checked, disabled) => {
12134
12269
  if (disabled) {
12135
- return jsxRuntime.jsx(SquareMinus, { className: checkboxIconClass });
12270
+ return (jsxRuntime.jsx(SquareMinus, { className: "size-full fill-transparent text-comp-disabled cursor-default" }));
12136
12271
  }
12137
12272
  else if (checked) {
12138
- return jsxRuntime.jsx(SquareCheck, { className: checkboxIconClass });
12273
+ return (jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "size-full fill-transparent text-comp-mono-selected", children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1 2.1821C1 1.52924 1.52925 1 2.1821 1H13.6879C14.3408 1 14.87 1.52925 14.87 2.1821V13.6879C14.87 14.3408 14.3408 14.87 13.6879 14.87H2.1821C1.52924 14.87 1 14.3408 1 13.6879V2.1821ZM11.3429 4.58303C11.6121 4.76774 11.6805 5.13566 11.4958 5.4048L7.38613 11.393C7.28127 11.5457 7.11082 11.6405 6.9257 11.6489C6.74058 11.6574 6.56222 11.5785 6.44391 11.4359L4.0914 8.59999C3.88299 8.34876 3.9177 7.97614 4.16894 7.76772C4.42018 7.55931 4.79279 7.59403 5.00121 7.84526L6.85419 10.079L10.5211 4.73591C10.7059 4.46676 11.0738 4.39832 11.3429 4.58303Z", fill: "currentColor" }) }));
12139
12274
  }
12140
- return jsxRuntime.jsx(Square, { className: checkboxIconClass });
12275
+ return (jsxRuntime.jsx(BoxIcon, { className: "size-full fill-transparent text-comp-mono-default" }));
12141
12276
  };
12142
12277
  const onCheckedChange = (value) => {
12143
12278
  setChecked(value);
@@ -12206,14 +12341,14 @@ const CardFooter = React.forwardRef(({ className, ...rest }, ref) => {
12206
12341
  * </DialogContent>
12207
12342
  * </Dialog>
12208
12343
  */
12209
- const Dialog = Root$2;
12344
+ const Dialog = Root$3;
12210
12345
  const DialogTrigger = (props) => {
12211
12346
  return (jsxRuntime.jsx(Trigger$4, { className: props.className, ...props, "data-slot": "dialog-trigger", asChild: true, children: props.children }));
12212
12347
  };
12213
12348
  const DialogPortal = Portal$3;
12214
12349
  const DialogClose = Close;
12215
12350
  const DialogContent = ({ className, children, ...rest }) => {
12216
- return (jsxRuntime.jsxs(Portal$3, { children: [jsxRuntime.jsx(Overlay, { className: "fixed top-0 bottom-0 left-0 right-0 bg-pure-black-50 inset-0 z-[1000] animate-fade-in" }), jsxRuntime.jsxs(Content$1, { className: cn("fixed top-1/2 left-1/2 z-[1001] transform -translate-x-1/2 -translate-y-1/2 animate-content-fade-in", className), ...rest, children: [jsxRuntime.jsx(Title, { "data-slot": "dialog-title", ...rest, children: jsxRuntime.jsx(Root$3, {}) }), jsxRuntime.jsx(Description, {}), jsxRuntime.jsx(Card, { children: children })] })] }));
12351
+ return (jsxRuntime.jsxs(Portal$3, { children: [jsxRuntime.jsx(Overlay, { className: "fixed top-0 bottom-0 left-0 right-0 bg-pure-black-50 inset-0 z-[1000] animate-fade-in" }), jsxRuntime.jsxs(Content$1, { className: cn("fixed top-1/2 left-1/2 z-[1001] transform -translate-x-1/2 -translate-y-1/2 animate-content-fade-in", className), ...rest, children: [jsxRuntime.jsx(Title, { "data-slot": "dialog-title", ...rest, children: jsxRuntime.jsx(Root$4, {}) }), jsxRuntime.jsx(Description, {}), jsxRuntime.jsx(Card, { children: children })] })] }));
12217
12352
  };
12218
12353
  const DialogDescription = (props) => {
12219
12354
  return jsxRuntime.jsx(CardBody, { ...props, children: props.children });
@@ -12266,7 +12401,7 @@ const SelectTrigger = ({ placeholder, variant = "outline", size = "regular", ico
12266
12401
  };
12267
12402
  const SelectContent = ({ children, viewportClassName, ...rest }) => {
12268
12403
  const { className, position, sideOffset, ...otherProps } = rest;
12269
- return (jsxRuntime.jsx(Portal$1, { children: jsxRuntime.jsx(Content2$1, { position: "popper", sideOffset: 7, className: cn("p-2 min-w-[var(--radix-select-trigger-width)] border border-border-overlay rounded-lg bg-page-l1 shadow-medium", className), ...otherProps, children: jsxRuntime.jsx(Viewport, { className: cn("flex flex-col gap-1", viewportClassName), children: children }) }) }));
12404
+ return (jsxRuntime.jsx(Portal$1, { children: jsxRuntime.jsx(Content2$1, { position: "popper", sideOffset: 7, className: cn("p-2 min-w-[var(--radix-select-trigger-width)] border border-border-overlay rounded-lg bg-page-l1 shadow-medium", className), asChild: true, ...otherProps, children: jsxRuntime.jsx("div", { className: "z-10", children: jsxRuntime.jsx(Viewport, { className: cn("flex flex-col gap-1", viewportClassName), children: children }) }) }) }));
12270
12405
  };
12271
12406
  const SelectGroup = Group;
12272
12407
  const SelectLabel = (props) => {
@@ -12759,7 +12894,7 @@ var dayjs_min = {exports: {}};
12759
12894
  var dayjs_minExports = dayjs_min.exports;
12760
12895
  var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
12761
12896
 
12762
- const DatePicker = ({ size = "regular", placeholder = "Pick a date", format = "YYYY. MM. DD.", value, mode = "single", onChange, isInstantClose = false, open: openProp, onOpenChange: onOpenChangeProp, disabled, ...rest }) => {
12897
+ const DatePicker = ({ size = "regular", placeholder = "Pick a date", format = "YYYY. MM. DD.", value, mode = "single", onChange, isInstantClose = false, open: openProp, onOpenChange: onOpenChangeProp, disabled, popoverContentClassName, ...rest }) => {
12763
12898
  const [inputValue, setInputValue] = React.useState(value);
12764
12899
  const [open, setOpen] = React.useState(openProp || false);
12765
12900
  const handleSelect = (date) => {
@@ -12799,7 +12934,7 @@ const DatePicker = ({ size = "regular", placeholder = "Pick a date", format = "Y
12799
12934
  }
12800
12935
  return placeholder ?? "";
12801
12936
  };
12802
- return (jsxRuntime.jsxs(Root2$2, { open: open, onOpenChange: handleOpenChange, children: [jsxRuntime.jsx(Trigger$2, { asChild: true, children: jsxRuntime.jsx(Button, { size: size, fullWidth: true, variant: "outline", leftIcon: jsxRuntime.jsx(Calendar$1, { size: 20 }), className: "justify-start", disabled: disabled, children: getDateToFormatString(inputValue) }) }), jsxRuntime.jsx(Content2$2, { sideOffset: 10, align: "start", ...rest, children: mode === "single" ? (jsxRuntime.jsx(Calendar, { mode: "single", ...rest, selected: inputValue, onSelect: handleSelect })) : mode === "multiple" ? (jsxRuntime.jsx(Calendar, { mode: "multiple", ...rest, selected: Array.isArray(inputValue) ? inputValue : [], onSelect: handleSelect })) : (jsxRuntime.jsx(Calendar, { mode: "range", ...rest, selected: inputValue, onSelect: handleSelect })) })] }));
12937
+ return (jsxRuntime.jsxs(Root2$2, { open: open, onOpenChange: handleOpenChange, children: [jsxRuntime.jsx(Trigger$2, { asChild: true, children: jsxRuntime.jsx(Button, { size: size, fullWidth: true, variant: "outline", leftIcon: jsxRuntime.jsx(Calendar$1, { size: 20 }), className: "justify-start", disabled: disabled, children: getDateToFormatString(inputValue) }) }), jsxRuntime.jsx(Content2$2, { sideOffset: 10, align: "start", className: cn("z-10", popoverContentClassName), ...rest, children: mode === "single" ? (jsxRuntime.jsx(Calendar, { mode: "single", ...rest, selected: inputValue, onSelect: handleSelect })) : mode === "multiple" ? (jsxRuntime.jsx(Calendar, { mode: "multiple", ...rest, selected: Array.isArray(inputValue) ? inputValue : [], onSelect: handleSelect })) : (jsxRuntime.jsx(Calendar, { mode: "range", ...rest, selected: inputValue, onSelect: handleSelect })) })] }));
12803
12938
  };
12804
12939
 
12805
12940
  const ContextMenu = Root2$3;
@@ -12943,6 +13078,235 @@ const Autocomplete = ({ placeholder, data, value, displayValue, onSelect, onChan
12943
13078
  : undefined }), showSuggestions && (jsxRuntime.jsx("ul", { id: "autocomplete-suggestions", role: "listbox", className: cn("absolute top-calc(100%-10px) left-0 z-[20] p-2 bg-page-l1 shadow-medium border border-border-overlay rounded-lg w-[calc(100%-16px)]", contentClassName), children: filteredResults.length > 0 ? (filteredResults.map((item, index) => (jsxRuntime.jsx(AutocompleteContentItem, { item: item, index: index, highlightedIndex: highlightedIndex, onClick: handleItemClick, displayValue: displayValue, inputValue: inputValue, className: itemClassName }, displayValue(item) + index)))) : (jsxRuntime.jsx("li", { "data-no-results": true, className: "rounded-sm p-2 bg-fill-mono-default text-comp-mono-default text-body leading-body-compact font-medium list-none text-center", children: noResultsMessage })) }))] }));
12944
13079
  };
12945
13080
 
13081
+ const SWITCH_VARIANTS = {
13082
+ FILLED: "filled",
13083
+ OUTLINED: "outlined",
13084
+ };
13085
+ const SWITCH_SIZES = {
13086
+ SMALL: "small",
13087
+ REGULAR: "regular",
13088
+ };
13089
+
13090
+ const TEXT_VARIANTS = {
13091
+ BOLD3XLARGEBOLD: "bold3XLargeBold",
13092
+ BOLD2XLARGEBOLDCOMPACT: "bold2XLargeBoldCompact",
13093
+ BOLD2XLARGEBOLD: "bold2XLargeBold",
13094
+ BOLDXLARGEBOLDCOMPACT: "boldXLargeBoldCompact",
13095
+ BOLDXLARGEBOLD: "boldXLargeBold",
13096
+ BOLDLARGEBOLDCOMPACT: "boldLargeBoldCompact",
13097
+ BOLDLARGEBOLD: "boldLargeBold",
13098
+ BOLDBASEBOLDCOMPACT: "boldBaseBoldCompact",
13099
+ BOLDBASEBOLD: "boldBaseBold",
13100
+ BOLDBODYBOLDCOMPACT: "boldBodyBoldCompact",
13101
+ BOLDBODYBOLD: "boldBodyBold",
13102
+ BOLDLABELBOLDCOMPACT: "boldLabelBoldCompact",
13103
+ BOLDLABELBOLD: "boldLabelBold",
13104
+ BOLDXSMALLBOLD: "boldXSmallBold",
13105
+ SEMIBOLDBASESEMIBOLDCOMPACT: "semiBoldBaseSemiBoldCompact",
13106
+ SEMIBOLDBASESEMIBOLD: "semiBoldBaseSemiBold",
13107
+ SEMIBOLDBODYSEMIBOLDCOMPACT: "semiBoldBodySemiBoldCompact",
13108
+ SEMIBOLDBODYSEMIBOLD: "semiBoldBodySemiBold",
13109
+ SEMIBOLDLABELSEMIBOLDCOMPACT: "semiBoldLabelSemiBoldCompact",
13110
+ MED3XLARGEMED: "med3XLargeMed",
13111
+ MEDXLARGEMED: "medXLargeMed",
13112
+ MEDLARGEMED: "medLargeMed",
13113
+ MEDBASEMEDCOMPACT: "medBaseMedCompact",
13114
+ MEDBASEMED: "medBaseMed",
13115
+ MEDBODYMEDCOMPACT: "medBodyMedCompact",
13116
+ MEDBODYMED: "medBodyMed",
13117
+ MEDLABELMEDCOMPACT: "medLabelMedCompact",
13118
+ MEDLABELMED: "medLabelMed",
13119
+ MEDXSMALLMED: "medXSmallMed",
13120
+ REGULAR3XLARGE: "regular3XLarge",
13121
+ REGULAR2XLARGE: "regular2XLarge",
13122
+ REGULARXLARGE: "regularXLarge",
13123
+ REGULARLARGECOMPACT: "regularLargeCompact",
13124
+ REGULARLARGE: "regularLarge",
13125
+ REGULARBASECOMPACT: "regularBaseCompact",
13126
+ REGULARBASE: "regularBase",
13127
+ REGULARBODYCOMPACT: "regularBodyCompact",
13128
+ REGULARBODY: "regularBody",
13129
+ REGULARLABELCOMPACT: "regularLabelCompact",
13130
+ REGULARLABEL: "regularLabel",
13131
+ REGULARXSMALL: "regularXSmall",
13132
+ };
13133
+
13134
+ const Text = ({ children, className, size, weight, align, variant = "regularBase", color, as: Component = "p", }) => {
13135
+ const getFontWeightClass = (weight) => {
13136
+ switch (weight) {
13137
+ case "bold":
13138
+ return "font-bold";
13139
+ case "semibold":
13140
+ return "font-semibold";
13141
+ case "medium":
13142
+ return "font-medium";
13143
+ case "regular":
13144
+ return "font-normal";
13145
+ case "light":
13146
+ return "font-light";
13147
+ case "extralight":
13148
+ return "font-extralight";
13149
+ case "thin":
13150
+ return "font-thin";
13151
+ default:
13152
+ return "font-normal";
13153
+ }
13154
+ };
13155
+ const getSizeClass = (size) => {
13156
+ switch (size) {
13157
+ case "xxxl":
13158
+ return "text-xxxl";
13159
+ case "xxl":
13160
+ return "text-xxl";
13161
+ case "xl":
13162
+ return "text-xl";
13163
+ case "large":
13164
+ return "text-large";
13165
+ case "base":
13166
+ return "text-base";
13167
+ case "body":
13168
+ return "text-body";
13169
+ case "label":
13170
+ return "text-label";
13171
+ case "xsmall":
13172
+ return "text-xsmall";
13173
+ default:
13174
+ return "text-base";
13175
+ }
13176
+ };
13177
+ const getAlignClass = (align) => {
13178
+ switch (align) {
13179
+ case "left":
13180
+ return "text-left";
13181
+ case "center":
13182
+ return "text-center";
13183
+ case "right":
13184
+ return "text-right";
13185
+ case "justify":
13186
+ return "text-justify";
13187
+ default:
13188
+ return "text-left";
13189
+ }
13190
+ };
13191
+ const getVariantClass = (variant) => {
13192
+ switch (variant) {
13193
+ case TEXT_VARIANTS.BOLD3XLARGEBOLD:
13194
+ return "text-xxxl font-bold leading-xxxl";
13195
+ case TEXT_VARIANTS.BOLD2XLARGEBOLDCOMPACT:
13196
+ return "text-xxl font-bold leading-xxl-compact";
13197
+ case TEXT_VARIANTS.BOLD2XLARGEBOLD:
13198
+ return "text-xxl font-bold leading-xxl";
13199
+ case TEXT_VARIANTS.BOLDXLARGEBOLDCOMPACT:
13200
+ return "text-xl font-bold leading-xl-compact";
13201
+ case TEXT_VARIANTS.BOLDXLARGEBOLD:
13202
+ return "text-xl font-bold leading-xl";
13203
+ case TEXT_VARIANTS.BOLDLARGEBOLDCOMPACT:
13204
+ return "text-large font-bold leading-large-compact";
13205
+ case TEXT_VARIANTS.BOLDLARGEBOLD:
13206
+ return "text-large font-bold leading-large";
13207
+ case TEXT_VARIANTS.BOLDBASEBOLDCOMPACT:
13208
+ return "text-base font-bold leading-base-compact";
13209
+ case TEXT_VARIANTS.BOLDBASEBOLD:
13210
+ return "text-base font-bold leading-base";
13211
+ case TEXT_VARIANTS.BOLDBODYBOLDCOMPACT:
13212
+ return "text-body font-bold leading-body-compact";
13213
+ case TEXT_VARIANTS.BOLDBODYBOLD:
13214
+ return "text-body font-bold leading-body";
13215
+ case TEXT_VARIANTS.BOLDLABELBOLDCOMPACT:
13216
+ return "text-label font-bold leading-label-compact";
13217
+ case TEXT_VARIANTS.BOLDLABELBOLD:
13218
+ return "text-label font-bold leading-label";
13219
+ case TEXT_VARIANTS.BOLDXSMALLBOLD:
13220
+ return "text-xsmall font-bold leading-xsmall";
13221
+ case TEXT_VARIANTS.SEMIBOLDBASESEMIBOLDCOMPACT:
13222
+ return "text-base font-semibold leading-base-compact";
13223
+ case TEXT_VARIANTS.SEMIBOLDBASESEMIBOLD:
13224
+ return "text-base font-semibold leading-base";
13225
+ case TEXT_VARIANTS.SEMIBOLDBODYSEMIBOLDCOMPACT:
13226
+ return "text-body font-semibold leading-body-compact";
13227
+ case TEXT_VARIANTS.SEMIBOLDBODYSEMIBOLD:
13228
+ return "text-body font-semibold leading-body";
13229
+ case TEXT_VARIANTS.SEMIBOLDLABELSEMIBOLDCOMPACT:
13230
+ return "text-label font-semibold leading-label-compact";
13231
+ case TEXT_VARIANTS.MED3XLARGEMED:
13232
+ return "text-xxxl font-medium leading-xxxl";
13233
+ case TEXT_VARIANTS.MEDXLARGEMED:
13234
+ return "text-xl font-medium leading-xl";
13235
+ case TEXT_VARIANTS.MEDLARGEMED:
13236
+ return "text-large font-medium leading-large";
13237
+ case TEXT_VARIANTS.MEDBASEMEDCOMPACT:
13238
+ return "text-base font-medium leading-base-compact";
13239
+ case TEXT_VARIANTS.MEDBASEMED:
13240
+ return "text-base font-medium leading-base";
13241
+ case TEXT_VARIANTS.MEDBODYMEDCOMPACT:
13242
+ return "text-body font-medium leading-body-compact";
13243
+ case TEXT_VARIANTS.MEDBODYMED:
13244
+ return "text-body font-medium leading-body";
13245
+ case TEXT_VARIANTS.MEDLABELMEDCOMPACT:
13246
+ return "text-label font-medium leading-label-compact";
13247
+ case TEXT_VARIANTS.MEDLABELMED:
13248
+ return "text-label font-medium leading-label";
13249
+ case TEXT_VARIANTS.MEDXSMALLMED:
13250
+ return "text-xsmall font-medium leading-xsmall";
13251
+ case TEXT_VARIANTS.REGULAR3XLARGE:
13252
+ return "text-xxxl font-normal leading-xxxl";
13253
+ case TEXT_VARIANTS.REGULAR2XLARGE:
13254
+ return "text-xxl font-normal leading-xxl";
13255
+ case TEXT_VARIANTS.REGULARXLARGE:
13256
+ return "text-xl font-normal leading-xl";
13257
+ case TEXT_VARIANTS.REGULARLARGE:
13258
+ return "text-large font-normal leading-large";
13259
+ case TEXT_VARIANTS.REGULARLARGECOMPACT:
13260
+ return "text-large font-normal leading-large-compact";
13261
+ case TEXT_VARIANTS.REGULARBASE:
13262
+ return "text-base font-normal leading-base";
13263
+ case TEXT_VARIANTS.REGULARBASECOMPACT:
13264
+ return "text-base font-normal leading-base-compact";
13265
+ case TEXT_VARIANTS.REGULARBODY:
13266
+ return "text-body font-normal leading-body";
13267
+ case TEXT_VARIANTS.REGULARBODYCOMPACT:
13268
+ return "text-body font-normal leading-body-compact";
13269
+ case TEXT_VARIANTS.REGULARLABEL:
13270
+ return "text-label font-normal leading-label";
13271
+ case TEXT_VARIANTS.REGULARLABELCOMPACT:
13272
+ return "text-label font-normal leading-label-compact";
13273
+ case TEXT_VARIANTS.REGULARXSMALL:
13274
+ return "text-xsmall font-normal leading-xsmall";
13275
+ default:
13276
+ return "text-base font-normal leading-base";
13277
+ }
13278
+ };
13279
+ return (jsxRuntime.jsx(Component, { style: color ? { color } : undefined, className: cn("m-0 p-0 text-comp-mono-default", getVariantClass(variant), size && getSizeClass(size), weight && getFontWeightClass(weight), align && getAlignClass(align), className), children: children }));
13280
+ };
13281
+ Text.displayName = "Text";
13282
+
13283
+ const FilledSwitch = (props) => {
13284
+ const { size, checked, thumbClassName, ...rest } = props;
13285
+ return (jsxRuntime.jsxs(Root, { className: cn("flex items-center gap-1 bg-page-l2 rounded-lg relative", size === SWITCH_SIZES.REGULAR && "p-1.5 w-[68px] h-9", size === SWITCH_SIZES.SMALL && "p-1 w-[59px] h-7"), checked: checked, ...rest, children: [jsxRuntime.jsx(Thumb, { className: cn("rounded-sm absolute transition-all duration-100", size === SWITCH_SIZES.REGULAR &&
13286
+ "size-6 left-1.5 data-[state=checked]:left-[37px]", size === SWITCH_SIZES.SMALL &&
13287
+ "size-5 left-1 data-[state=checked]:left-[35px]", checked ? "bg-fill-accent-selected" : "bg-fill-mono-subtle-selected", thumbClassName) }), checked ? (jsxRuntime.jsx(Text, { variant: "medLabelMedCompact", className: "text-comp-mono-selected py-1 px-[5px] text-left w-full", as: "div", children: "ON" })) : (jsxRuntime.jsx(Text, { variant: "medLabelMedCompact", className: "text-comp-mono-subtle-default py-1 px-0.5 text-right w-full", as: "div", children: "OFF" }))] }));
13288
+ };
13289
+ const OutlinedSwitch = (props) => {
13290
+ const { size, checked, thumbClassName, ...rest } = props;
13291
+ return (jsxRuntime.jsxs(Root, { className: cn("group border shadow-inner p-1 relative rounded-[20px]", checked
13292
+ ? "bg-fill-accent-default hover:bg-fill-accent-hovered border-transparent"
13293
+ : "bg-fill-mono-default hover:bg-fill-mono-hovered border-border-divider hover:border-border-bound", size === SWITCH_SIZES.REGULAR && "w-[74px] h-9", size === SWITCH_SIZES.SMALL && "w-[60px] h-7"), checked: checked, ...rest, children: [jsxRuntime.jsx(Thumb, { className: cn("absolute transition-all duration-100 top-[3px] rounded-full left-1 bg-border-divider data-[state=checked]:bg-comp-accent-default shadow-basic group-hover:bg-border-bound data-[state=checked]:group-hover:bg-comp-accent-hovered", size === SWITCH_SIZES.REGULAR &&
13294
+ "size-7 data-[state=checked]:left-[42px] group-hover:shadow-large", size === SWITCH_SIZES.SMALL &&
13295
+ "size-5 data-[state=checked]:left-[36px] group-hover:shadow-basic", thumbClassName) }), checked ? (jsxRuntime.jsx(Text, { variant: size === SWITCH_SIZES.REGULAR
13296
+ ? "boldBodyBoldCompact"
13297
+ : "boldLabelBoldCompact", className: "text-comp-accent-default pl-2 text-left group-hover:text-comp-accent-hovered", as: "div", children: "ON" })) : (jsxRuntime.jsx(Text, { variant: size === SWITCH_SIZES.REGULAR
13298
+ ? "medBodyMedCompact"
13299
+ : "medLabelMedCompact", className: cn("text-comp-mono-subtle-default text-right group-hover:text-comp-mono-subtle-hovered", size === SWITCH_SIZES.REGULAR && "pr-1.5", size === SWITCH_SIZES.SMALL && "pr-[3px]"), as: "div", children: "OFF" }))] }));
13300
+ };
13301
+ const Switch = (props) => {
13302
+ const [checked, setChecked] = React.useState(props.checked);
13303
+ const handleCheckedChange = (value) => {
13304
+ setChecked(value);
13305
+ props.onCheckedChange?.(value);
13306
+ };
13307
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [props.variant === SWITCH_VARIANTS.FILLED && (jsxRuntime.jsx(FilledSwitch, { checked: checked, onCheckedChange: handleCheckedChange, ...props })), props.variant === SWITCH_VARIANTS.OUTLINED && (jsxRuntime.jsx(OutlinedSwitch, { checked: checked, onCheckedChange: handleCheckedChange, ...props }))] }));
13308
+ };
13309
+
12946
13310
  exports.Autocomplete = Autocomplete;
12947
13311
  exports.Calendar = Calendar;
12948
13312
  exports.Checkbox = Checkbox;
@@ -12989,6 +13353,8 @@ exports.RadioGroup = RadioGroup;
12989
13353
  exports.RadioItem = RadioItem;
12990
13354
  exports.SELECT_TRIGGER_SIZES = SELECT_TRIGGER_SIZES;
12991
13355
  exports.SELECT_TRIGGER_VARIANTS = SELECT_TRIGGER_VARIANTS;
13356
+ exports.SWITCH_SIZES = SWITCH_SIZES;
13357
+ exports.SWITCH_VARIANTS = SWITCH_VARIANTS;
12992
13358
  exports.Select = Select;
12993
13359
  exports.SelectContent = SelectContent;
12994
13360
  exports.SelectGroup = SelectGroup;
@@ -12996,6 +13362,7 @@ exports.SelectItem = SelectItem;
12996
13362
  exports.SelectLabel = SelectLabel;
12997
13363
  exports.SelectSeparator = SelectSeparator;
12998
13364
  exports.SelectTrigger = SelectTrigger;
13365
+ exports.Switch = Switch;
12999
13366
  exports.TOOLTIP_SHORT_SIZES = TOOLTIP_SHORT_SIZES;
13000
13367
  exports.TOOLTIP_SHORT_VARIANTS = TOOLTIP_SHORT_VARIANTS;
13001
13368
  exports.Table = Table;