@deepnoid/ui 0.1.20 → 0.1.22

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 (56) hide show
  1. package/.turbo/turbo-build.log +162 -172
  2. package/dist/{chunk-LNYMVBV5.mjs → chunk-6OMHIMIA.mjs} +8 -6
  3. package/dist/{chunk-3DPVPTHL.mjs → chunk-EAK5DVWA.mjs} +2 -2
  4. package/dist/{chunk-3BKCODIL.mjs → chunk-ICZTNO4V.mjs} +3 -3
  5. package/dist/{chunk-EGHTZLZJ.mjs → chunk-IVK24VIL.mjs} +1 -1
  6. package/dist/chunk-MSAULFDB.mjs +348 -0
  7. package/dist/{chunk-JOCMCOEK.mjs → chunk-P5PJTJLY.mjs} +13 -2
  8. package/dist/{chunk-63WXGSTV.mjs → chunk-XRC5OUYQ.mjs} +23 -13
  9. package/dist/components/input/index.js +13 -2
  10. package/dist/components/input/index.mjs +1 -1
  11. package/dist/components/input/input.js +13 -2
  12. package/dist/components/input/input.mjs +1 -1
  13. package/dist/components/modal/index.mjs +1 -1
  14. package/dist/components/modal/modal.mjs +1 -1
  15. package/dist/components/pagination/index.js +13 -2
  16. package/dist/components/pagination/index.mjs +2 -2
  17. package/dist/components/pagination/pagination.js +13 -2
  18. package/dist/components/pagination/pagination.mjs +2 -2
  19. package/dist/components/select/index.d.mts +1 -1
  20. package/dist/components/select/index.d.ts +1 -1
  21. package/dist/components/select/index.js +301 -286
  22. package/dist/components/select/index.mjs +2 -3
  23. package/dist/components/select/select.d.mts +190 -177
  24. package/dist/components/select/select.d.ts +190 -177
  25. package/dist/components/select/select.js +301 -286
  26. package/dist/components/select/select.mjs +2 -3
  27. package/dist/components/table/form-table.js +3 -3
  28. package/dist/components/table/form-table.mjs +1 -1
  29. package/dist/components/table/index.js +46 -23
  30. package/dist/components/table/index.mjs +6 -6
  31. package/dist/components/table/table-body.d.mts +3 -2
  32. package/dist/components/table/table-body.d.ts +3 -2
  33. package/dist/components/table/table-body.js +23 -13
  34. package/dist/components/table/table-body.mjs +1 -1
  35. package/dist/components/table/table-head.d.mts +2 -2
  36. package/dist/components/table/table-head.d.ts +2 -2
  37. package/dist/components/table/table-head.js +2 -2
  38. package/dist/components/table/table-head.mjs +1 -1
  39. package/dist/components/table/table.d.mts +2 -1
  40. package/dist/components/table/table.d.ts +2 -1
  41. package/dist/components/table/table.js +43 -20
  42. package/dist/components/table/table.mjs +5 -5
  43. package/dist/index.js +493 -497
  44. package/dist/index.mjs +28 -30
  45. package/package.json +1 -1
  46. package/dist/chunk-BXXAMH3R.mjs +0 -255
  47. package/dist/chunk-OF3X4BXG.mjs +0 -76
  48. package/dist/chunk-S3QS5B7F.mjs +0 -61
  49. package/dist/components/select/option.d.mts +0 -17
  50. package/dist/components/select/option.d.ts +0 -17
  51. package/dist/components/select/option.js +0 -4359
  52. package/dist/components/select/option.mjs +0 -12
  53. package/dist/components/select/useSelect.d.mts +0 -31
  54. package/dist/components/select/useSelect.d.ts +0 -31
  55. package/dist/components/select/useSelect.js +0 -84
  56. package/dist/components/select/useSelect.mjs +0 -8
package/dist/index.js CHANGED
@@ -5941,7 +5941,18 @@ var Input = (0, import_react9.forwardRef)((originalProps, ref) => {
5941
5941
  ),
5942
5942
  children: [
5943
5943
  startContent && renderStartContent(),
5944
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("input", { ...inputProps, ref: ref || inputRef, className: slots.input({ class: classNames == null ? void 0 : classNames.input }), size: 0 }),
5944
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5945
+ "input",
5946
+ {
5947
+ ...inputProps,
5948
+ ref: ref || inputRef,
5949
+ className: clsx(
5950
+ slots.input({ class: classNames == null ? void 0 : classNames.input }),
5951
+ inputProps.readOnly ? "!text-body-foreground placeholder:text-body-foreground" : ""
5952
+ ),
5953
+ size: 0
5954
+ }
5955
+ ),
5945
5956
  renderEndContent()
5946
5957
  ]
5947
5958
  }
@@ -5989,7 +6000,7 @@ var inputStyle = tv(
5989
6000
  ],
5990
6001
  helperText: ["text-neutral-main", "group-has-[:hover]/input:text-neutral-dark"],
5991
6002
  errorText: ["text-danger-main"],
5992
- readonly: ["pointer-events-none"]
6003
+ readonly: ["pointer-events-none", "!text-body-foreground"]
5993
6004
  },
5994
6005
  variants: {
5995
6006
  variant: {
@@ -6802,7 +6813,7 @@ var checkboxStyle = tv({
6802
6813
 
6803
6814
  // src/components/table/table-head.tsx
6804
6815
  var import_jsx_runtime15 = require("react/jsx-runtime");
6805
- var TableHead = ({ columns, slots, size, selectableRows, isCheckedAll, classNames, onCheckAll }) => {
6816
+ var TableHead = ({ columns, slots, size, rowCheckbox, isCheckedAll, classNames, onCheckAll }) => {
6806
6817
  const handleClickCheckAll = (e) => {
6807
6818
  e.preventDefault();
6808
6819
  onCheckAll(!isCheckedAll);
@@ -6821,7 +6832,7 @@ var TableHead = ({ columns, slots, size, selectableRows, isCheckedAll, className
6821
6832
  },
6822
6833
  `${column.field}${index}thead`
6823
6834
  ));
6824
- const renderSelectAllCheckbox = () => selectableRows && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(checkbox_default, { size, checked: isCheckedAll }) }) });
6835
+ const renderSelectAllCheckbox = () => rowCheckbox && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(checkbox_default, { size, checked: isCheckedAll }) }) });
6825
6836
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
6826
6837
  renderColumnHeaders(),
6827
6838
  renderSelectAllCheckbox()
@@ -6838,9 +6849,10 @@ var TableBody = ({
6838
6849
  columns,
6839
6850
  rows,
6840
6851
  size,
6841
- selectableRows,
6852
+ rowCheckbox,
6842
6853
  checkedRows,
6843
6854
  onCheckRow,
6855
+ onRowClick,
6844
6856
  emptyContent,
6845
6857
  isLoading,
6846
6858
  classNames,
@@ -6881,21 +6893,30 @@ var TableBody = ({
6881
6893
  [classNames == null ? void 0 : classNames.td, generateColumnStyles, slots]
6882
6894
  );
6883
6895
  const hasRows = rows.length > 0;
6884
- const colSpan = (columns.length || 1) + (selectableRows ? 1 : 0);
6896
+ const colSpan = (columns.length || 1) + (rowCheckbox ? 1 : 0);
6885
6897
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tbody", { className: clsx(slots.tbody({ class: classNames == null ? void 0 : classNames.tbody }), className), children: [
6886
6898
  !isLoading && hasRows && rows.map((row, rowIndex) => {
6887
6899
  const isRowChecked = checkedRows.has(rowIndex);
6888
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "aria-checked": isRowChecked, children: [
6889
- columns.map((column) => /* @__PURE__ */ (0, import_react14.createElement)("td", { ...getCellProps(column, row), key: column.field })),
6890
- selectableRows && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
6891
- checkbox_default,
6892
- {
6893
- size,
6894
- checked: isRowChecked,
6895
- onChange: (e) => onCheckRow(rowIndex, e.target.checked)
6896
- }
6897
- ) }) })
6898
- ] }, rowIndex);
6900
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
6901
+ "tr",
6902
+ {
6903
+ className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }),
6904
+ "aria-checked": isRowChecked,
6905
+ onClick: () => onRowClick ? onRowClick(row) : void 0,
6906
+ children: [
6907
+ columns.map((column) => /* @__PURE__ */ (0, import_react14.createElement)("td", { ...getCellProps(column, row), key: column.field })),
6908
+ rowCheckbox && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
6909
+ checkbox_default,
6910
+ {
6911
+ size,
6912
+ checked: isRowChecked,
6913
+ onChange: (e) => onCheckRow(rowIndex, e.target.checked)
6914
+ }
6915
+ ) }) })
6916
+ ]
6917
+ },
6918
+ rowIndex
6919
+ );
6899
6920
  }),
6900
6921
  !isLoading && !hasRows && emptyContent && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: clsx(slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "border-none"), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { colSpan, className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) })
6901
6922
  ] });
@@ -7233,7 +7254,8 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
7233
7254
  rows,
7234
7255
  columns,
7235
7256
  size,
7236
- selectableRows,
7257
+ rowCheckbox,
7258
+ onRowClick,
7237
7259
  totalData,
7238
7260
  pagination,
7239
7261
  onPageChange,
@@ -7270,7 +7292,7 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
7270
7292
  {
7271
7293
  columns,
7272
7294
  size,
7273
- selectableRows,
7295
+ rowCheckbox,
7274
7296
  isCheckedAll: checkedRows.size === rows.length && rows.length > 0,
7275
7297
  onCheckAll: handleCheckAll,
7276
7298
  classNames,
@@ -7284,8 +7306,9 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
7284
7306
  rows,
7285
7307
  columns,
7286
7308
  size,
7287
- selectableRows,
7309
+ rowCheckbox,
7288
7310
  checkedRows,
7311
+ onRowClick,
7289
7312
  onCheckRow: handleCheck,
7290
7313
  emptyContent,
7291
7314
  isLoading,
@@ -7531,10 +7554,10 @@ var tableStyle = (0, import_tailwind_variants15.tv)({
7531
7554
  var import_react18 = require("react");
7532
7555
  var import_jsx_runtime20 = require("react/jsx-runtime");
7533
7556
  var DEFAULT_COLUMN_CLASSES = [
7534
- "w-[120px] h-[50px] px-[10px] font-bold text-md text-body-foreground border-r border-neutral-light",
7535
- "px-[10px]"
7557
+ "w-[120px] px-[10px] py-[9.5px] font-bold text-md text-body-foreground border-r border-neutral-light",
7558
+ "px-[10px] py-[9.5px]"
7536
7559
  ];
7537
- var FormTableRow = ({ columns, columnClasses = [] }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tr", { className: "border-neutral-light border-b", children: columns.map((col, index) => {
7560
+ var FormTableRow = ({ columns, columnClasses = [] }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tr", { className: "border-neutral-light min-h-[50px] border-b", children: columns.map((col, index) => {
7538
7561
  var _a;
7539
7562
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("td", { className: (_a = columnClasses[index]) != null ? _a : DEFAULT_COLUMN_CLASSES[index], children: col }, index);
7540
7563
  }) });
@@ -7569,374 +7592,347 @@ var formTableStyle = tv({
7569
7592
  });
7570
7593
 
7571
7594
  // src/components/select/select.tsx
7572
- var import_react20 = require("react");
7573
- var import_react_dom = require("react-dom");
7574
-
7575
- // src/components/select/useSelect.tsx
7576
7595
  var import_react19 = require("react");
7577
- var useSelect = ({ options, defaultOption, onChange }) => {
7578
- const [selectedOption, setSelectedOption] = (0, import_react19.useState)(defaultOption);
7596
+ var import_react_dom = require("react-dom");
7597
+ var import_jsx_runtime21 = require("react/jsx-runtime");
7598
+ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7599
+ var _a;
7600
+ const [props, variantProps] = mapPropsVariants(originalProps, select.variantKeys);
7601
+ const {
7602
+ label,
7603
+ options,
7604
+ helperText,
7605
+ errorText,
7606
+ classNames,
7607
+ defaultSelectedOptions = [],
7608
+ onChange,
7609
+ multiple,
7610
+ ...inputProps
7611
+ } = props;
7612
+ const slots = (0, import_react19.useMemo)(() => select({ ...variantProps }), [variantProps]);
7613
+ const [selectedOptions, setSelectedOptions] = (0, import_react19.useState)(defaultSelectedOptions);
7579
7614
  const [targetRect, setTargetRect] = (0, import_react19.useState)(null);
7580
7615
  const [optionWrapperHeight, setOptionWrapperHeight] = (0, import_react19.useState)(0);
7616
+ const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
7617
+ const [isOpen, setIsOpen] = (0, import_react19.useState)(false);
7581
7618
  const selectWrapperRef = (0, import_react19.useRef)(null);
7582
7619
  const optionWrapperRef = (0, import_react19.useRef)(null);
7583
- const calculatePositionWithScroll = (targetRect2, optionWrapperHeight2) => {
7584
- const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;
7585
- const scrollLeft = window.scrollX || document.documentElement.scrollLeft || document.body.scrollLeft;
7586
- const spaceBelow = window.innerHeight - (targetRect2.y + targetRect2.height + 4);
7587
- const spaceAbove = targetRect2.y - 4;
7588
- const top = spaceBelow < optionWrapperHeight2 && spaceAbove > optionWrapperHeight2 ? targetRect2.y - optionWrapperHeight2 - 4 : targetRect2.y + targetRect2.height + 4;
7620
+ const handleToggleSelect = () => {
7621
+ if (isOpen) {
7622
+ setIsOpen(false);
7623
+ setTimeout(() => setIsVisible(false), 150);
7624
+ } else {
7625
+ if (selectWrapperRef.current) {
7626
+ const rect = selectWrapperRef.current.getBoundingClientRect();
7627
+ setTargetRect(rect);
7628
+ setIsVisible(true);
7629
+ requestAnimationFrame(() => setIsOpen(true));
7630
+ }
7631
+ }
7632
+ };
7633
+ const calculatePositionWithScroll = (rect, height) => {
7634
+ const scrollTop = window.scrollY;
7635
+ const scrollLeft = window.scrollX;
7636
+ const spaceBelow = window.innerHeight - (rect.y + rect.height + 4);
7637
+ const spaceAbove = rect.y - 4;
7638
+ const top = spaceBelow < height && spaceAbove > height ? rect.y - height - 4 : rect.y + rect.height + 4;
7589
7639
  return {
7590
7640
  top: top + scrollTop,
7591
- left: targetRect2.x + scrollLeft
7641
+ left: rect.x + scrollLeft
7592
7642
  };
7593
7643
  };
7594
- const handleToggleSelect = () => {
7595
- if (selectWrapperRef.current) {
7596
- const rect = selectWrapperRef.current.getBoundingClientRect();
7597
- setTargetRect((prevRect) => prevRect ? null : { x: rect.x, y: rect.y, width: rect.width, height: rect.height });
7598
- }
7599
- };
7600
7644
  const handleChangeOption = (option) => {
7601
- onChange == null ? void 0 : onChange(option);
7602
- setSelectedOption(option);
7603
- handleToggleSelect();
7645
+ let nextOptions;
7646
+ if (multiple) {
7647
+ const exists = selectedOptions.some((o) => o.key === option.key);
7648
+ nextOptions = exists ? selectedOptions.filter((o) => o.key !== option.key) : [...selectedOptions, option];
7649
+ } else {
7650
+ nextOptions = [option];
7651
+ setIsOpen(false);
7652
+ setTimeout(() => setIsVisible(false), 150);
7653
+ }
7654
+ setSelectedOptions(nextOptions);
7655
+ onChange == null ? void 0 : onChange(nextOptions);
7604
7656
  };
7605
7657
  (0, import_react19.useEffect)(() => {
7606
- const onClickOutside = (e) => {
7607
- if (optionWrapperRef.current && !optionWrapperRef.current.contains(e.target)) {
7608
- setTargetRect(null);
7658
+ const handleClickOutside = (e) => {
7659
+ var _a2;
7660
+ if (optionWrapperRef.current && !optionWrapperRef.current.contains(e.target) && !((_a2 = selectWrapperRef.current) == null ? void 0 : _a2.contains(e.target))) {
7661
+ setIsOpen(false);
7662
+ setTimeout(() => setIsVisible(false), 150);
7609
7663
  }
7610
7664
  };
7611
- window.addEventListener("mousedown", onClickOutside);
7612
- return () => window.removeEventListener("mousedown", onClickOutside);
7665
+ window.addEventListener("mousedown", handleClickOutside);
7666
+ return () => window.removeEventListener("mousedown", handleClickOutside);
7613
7667
  }, []);
7614
7668
  (0, import_react19.useEffect)(() => {
7615
7669
  if (optionWrapperRef.current) {
7616
7670
  setOptionWrapperHeight(optionWrapperRef.current.getBoundingClientRect().height);
7617
7671
  }
7618
7672
  }, [targetRect]);
7619
- return {
7620
- selectedOption,
7621
- targetRect,
7622
- optionWrapperHeight,
7623
- selectWrapperRef,
7624
- optionWrapperRef,
7625
- handleToggleSelect,
7626
- handleChangeOption,
7627
- calculatePositionWithScroll
7673
+ const position = targetRect ? calculatePositionWithScroll(targetRect, optionWrapperHeight) : null;
7674
+ const displayValue = multiple ? selectedOptions.map((opt) => opt.value).join(", ") : ((_a = selectedOptions[0]) == null ? void 0 : _a.value) || "";
7675
+ const Option = ({
7676
+ option,
7677
+ isSelected,
7678
+ onClick
7679
+ }) => {
7680
+ const slot = select({ ...variantProps, isSelected });
7681
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { title: option.value, onClick, className: clsx(slot.option({ class: classNames == null ? void 0 : classNames.option })), children: [
7682
+ option.value,
7683
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon_default, { name: "check", size: originalProps.size })
7684
+ ] });
7628
7685
  };
7629
- };
7630
-
7631
- // src/components/select/option.tsx
7632
- var import_jsx_runtime21 = require("react/jsx-runtime");
7633
- var Option = (props) => {
7634
- const { base, option, icon } = optionStyle(props);
7635
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
7636
- "div",
7637
- {
7638
- title: props.option.value,
7639
- className: base(),
7640
- onClick: () => props.onClick(props.option),
7641
- ref: (node) => {
7642
- props.isSelected && (node == null ? void 0 : node.scrollIntoView());
7643
- },
7644
- children: [
7645
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: option(), children: props.children }),
7646
- props.isSelected && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: icon(), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon_default, { name: "check", size: props.size }) })
7647
- ]
7648
- }
7649
- );
7650
- };
7651
- var option_default = Option;
7652
- var optionStyle = tv({
7653
- slots: {
7654
- base: ["w-full", "flex", "items-center", "justify-between", , "overflow-hidden"],
7655
- option: ["text-ellipsis overflow-hidden "],
7656
- icon: ""
7657
- },
7658
- variants: {
7659
- variant: {
7660
- solid: {},
7661
- normal: {},
7662
- line: {}
7663
- },
7664
- color: {
7665
- primary: {
7666
- base: ["border-primary-main", "hover:bg-primary-soft", "hover:text-primary-main"],
7667
- icon: "text-primary-main"
7668
- },
7669
- secondary: {
7670
- base: ["border-secondary-main", "hover:bg-secondary-soft", "hover:text-secondary-main"],
7671
- icon: "text-secondary-main"
7672
- }
7673
- },
7674
- size: {
7675
- sm: {
7676
- base: "text-sm px-[6px] py-[4.5px]"
7677
- },
7678
- md: {
7679
- base: "text-md px-[8px] py-[6.5px]"
7680
- },
7681
- lg: {
7682
- base: "text-lg px-[10px] py-[8px]"
7683
- },
7684
- xl: {
7685
- base: "text-xl px-[10px] py-[8px]"
7686
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
7687
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
7688
+ "div",
7689
+ {
7690
+ className: clsx(
7691
+ slots.base({ class: classNames == null ? void 0 : classNames.base }),
7692
+ variantProps.direction === "horizon" ? slots.horizon({ class: classNames == null ? void 0 : classNames.horizon }) : slots.vertical({ class: classNames == null ? void 0 : classNames.vertical })
7693
+ ),
7694
+ children: [
7695
+ label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
7696
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
7697
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
7698
+ "div",
7699
+ {
7700
+ "data-expanded": isOpen,
7701
+ className: clsx(
7702
+ slots.selectWrapper({ class: classNames == null ? void 0 : classNames.selectWrapper }),
7703
+ inputProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
7704
+ ),
7705
+ ref: selectWrapperRef,
7706
+ onClick: handleToggleSelect,
7707
+ children: [
7708
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7709
+ "input",
7710
+ {
7711
+ ...inputProps,
7712
+ ref,
7713
+ className: clsx(
7714
+ slots.select({ class: classNames == null ? void 0 : classNames.select }),
7715
+ inputProps.readOnly ? "!text-body-foreground placeholder:text-body-foreground" : ""
7716
+ ),
7717
+ value: displayValue,
7718
+ readOnly: true,
7719
+ size: 0
7720
+ }
7721
+ ),
7722
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7723
+ Icon_default,
7724
+ {
7725
+ name: "brace-up",
7726
+ size: originalProps.size,
7727
+ className: `transition-transform duration-200 ${isOpen ? "rotate-0" : "rotate-180"}`
7728
+ }
7729
+ )
7730
+ ]
7731
+ }
7732
+ ),
7733
+ helperText && !errorText && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: slots.helperText({ class: classNames == null ? void 0 : classNames.helperText }), children: helperText }),
7734
+ errorText && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: clsx("error", slots.errorText({ class: classNames == null ? void 0 : classNames.errorText })), children: errorText })
7735
+ ] })
7736
+ ]
7686
7737
  }
7687
- }
7688
- },
7689
- defaultVariants: {
7690
- variant: "normal",
7691
- color: "primary",
7692
- size: "md"
7693
- }
7694
- });
7695
-
7696
- // src/components/select/select.tsx
7697
- var import_jsx_runtime22 = require("react/jsx-runtime");
7698
- var Select = (0, import_react20.forwardRef)((originalProps, ref) => {
7699
- const [props, variantProps] = mapPropsVariants(originalProps, select.variantKeys);
7700
- const { classNames, options, defaultOption, onChange, ...inputProps } = props;
7701
- const slots = (0, import_react20.useMemo)(() => select({ ...variantProps }), [variantProps]);
7702
- const {
7703
- targetRect,
7704
- selectedOption,
7705
- optionWrapperHeight,
7706
- selectWrapperRef,
7707
- optionWrapperRef,
7708
- handleToggleSelect,
7709
- handleChangeOption,
7710
- calculatePositionWithScroll
7711
- } = useSelect({
7712
- options,
7713
- defaultOption,
7714
- onChange
7715
- });
7716
- const position = targetRect ? calculatePositionWithScroll(targetRect, optionWrapperHeight) : null;
7717
- const getBaseProps = (0, import_react20.useCallback)(
7718
- () => ({
7719
- className: slots.base({ class: classNames == null ? void 0 : classNames.base })
7720
- }),
7721
- [slots, classNames]
7722
- );
7723
- const getLabelProps = (0, import_react20.useCallback)(
7724
- () => ({
7725
- className: slots.label({ class: classNames == null ? void 0 : classNames.label })
7726
- }),
7727
- [slots, classNames]
7728
- );
7729
- const getSelectWrapperProps = (0, import_react20.useCallback)(
7730
- () => ({
7731
- className: slots.selectWrapper({ class: classNames == null ? void 0 : classNames.selectWrapper }),
7732
- ref: selectWrapperRef,
7733
- onClick: handleToggleSelect
7734
- }),
7735
- [slots, classNames]
7736
- );
7737
- const getSelectProps = (0, import_react20.useCallback)(
7738
- () => ({
7739
- ...inputProps,
7740
- ref,
7741
- className: slots.select({ class: classNames == null ? void 0 : classNames.select }),
7742
- value: (selectedOption == null ? void 0 : selectedOption.value) || "",
7743
- readOnly: true,
7744
- size: 0
7745
- }),
7746
- [slots, classNames, inputProps, selectedOption, ref]
7747
- );
7748
- const getOptionsWrapperProps = (0, import_react20.useCallback)(
7749
- () => ({
7750
- className: slots.optionsWrapper({ class: classNames == null ? void 0 : classNames.optionsWrapper }),
7751
- ref: optionWrapperRef
7752
- }),
7753
- [slots, classNames]
7754
- );
7755
- const getErrorMessageProps = (0, import_react20.useCallback)(
7756
- () => ({
7757
- className: slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })
7758
- }),
7759
- [slots, classNames]
7760
- );
7761
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
7762
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { ...getBaseProps(), children: [
7763
- props.label && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { ...getLabelProps(), children: props.label }),
7764
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { "data-expanded": !!targetRect, ...getSelectWrapperProps(), children: [
7765
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("input", { ...getSelectProps() }),
7766
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon_default, { name: !!targetRect ? "arrow-triangle-up" : "arrow-triangle-down", size: originalProps.size, fill: true })
7767
- ] }),
7768
- props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { ...getErrorMessageProps(), children: props.errorMessage })
7769
- ] }),
7770
- targetRect && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children: (0, import_react_dom.createPortal)(
7771
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7738
+ ),
7739
+ isVisible && (0, import_react_dom.createPortal)(
7740
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7772
7741
  "div",
7773
7742
  {
7774
- ...getOptionsWrapperProps(),
7743
+ ref: optionWrapperRef,
7744
+ className: slots.optionsWrapper({ class: classNames == null ? void 0 : classNames.optionsWrapper }),
7775
7745
  style: {
7776
7746
  position: "absolute",
7777
7747
  top: position == null ? void 0 : position.top,
7778
7748
  left: position == null ? void 0 : position.left,
7779
- width: targetRect.width
7749
+ width: targetRect == null ? void 0 : targetRect.width,
7750
+ zIndex: 1e3,
7751
+ opacity: isOpen ? 1 : 0,
7752
+ transform: isOpen ? "translateY(0)" : "translateY(-0.25rem)",
7753
+ transition: "opacity 150ms ease-out, transform 150ms ease-out"
7780
7754
  },
7781
- children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
7782
- option_default,
7783
- {
7784
- variant: originalProps.variant,
7785
- size: originalProps.size,
7786
- color: originalProps.color,
7787
- option,
7788
- isSelected: (selectedOption == null ? void 0 : selectedOption.key) === option.key,
7789
- onClick: () => handleChangeOption(option),
7790
- children: option.value
7791
- },
7792
- option.key
7793
- ))
7755
+ children: options.map((option) => {
7756
+ const isSelected = selectedOptions.some((o) => o.key === option.key);
7757
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7758
+ Option,
7759
+ {
7760
+ option,
7761
+ isSelected,
7762
+ onClick: () => handleChangeOption(option)
7763
+ },
7764
+ option.key
7765
+ );
7766
+ })
7794
7767
  }
7795
7768
  ),
7796
7769
  document.body
7797
- ) })
7770
+ )
7798
7771
  ] });
7799
7772
  });
7800
7773
  Select.displayName = "Select";
7801
7774
  var select_default = Select;
7802
7775
  var select = tv({
7803
7776
  slots: {
7804
- base: ["group/select", "flex flex-col"],
7805
- label: ["flex", "items-center"],
7777
+ base: ["group/select", "flex"],
7778
+ vertical: ["flex-col"],
7779
+ horizon: ["flex-row", "gap-0"],
7780
+ label: ["flex", "items-center", "font-bold", "text-body-foreground", "min-w-[80px]"],
7781
+ wrapper: ["flex", "flex-col"],
7806
7782
  selectWrapper: [
7807
7783
  "flex",
7808
7784
  "items-center",
7809
- "bg-transparent",
7810
- "border-neutral-main",
7811
- "transition duration-200",
7812
- "group-has-[p]/select:border-danger-main",
7813
- "group-has-[p]/select:text-danger-main",
7814
- "group-has-[p]/select:bg-danger-soft"
7785
+ "justify-between",
7786
+ "border",
7787
+ "cursor-pointer",
7788
+ "text-neutral-main",
7789
+ "hover:bg-trans-soft",
7790
+ "group-has-[p.error]/select:border-danger-main",
7791
+ "group-has-[p.error]/select:bg-danger-soft",
7792
+ "group-has-[p.error]/select:text-danger-main",
7793
+ "group-has-[p.error]/select:hover:bg-danger-soft"
7815
7794
  ],
7816
7795
  select: [
7817
- "w-full",
7818
7796
  "bg-transparent",
7819
- "text-foreground",
7820
- "cursor-inherit",
7821
- "cursor-pointer",
7797
+ "w-full",
7798
+ "outline-none",
7822
7799
  "placeholder:text-neutral-main",
7823
- "group-has-[p]/select:text-danger-main",
7824
- "focus-visible:outline-none"
7800
+ "text-neutral-dark",
7801
+ "group-has-[p.error]/select:text-danger-main",
7802
+ "group-has-[p.error]/select:placeholder:text-danger-main"
7825
7803
  ],
7826
- optionsWrapper: ["w-[240px]", "border", "bg-background", "cursor-pointer", "overflow-y-auto"],
7827
- errorMessage: ["text-danger-main"]
7804
+ optionsWrapper: ["border", "rounded", "bg-white", "shadow", "overflow-auto"],
7805
+ option: ["flex", "justify-between", "items-center", "cursor-pointer"],
7806
+ helperText: ["text-neutral-main"],
7807
+ errorText: ["text-danger-main"],
7808
+ readonly: ["pointer-events-none", "!bg-trans-soft"]
7828
7809
  },
7829
7810
  variants: {
7830
- variant: {
7831
- solid: {
7832
- selectWrapper: "bg-trans-soft hover:bg-trans-light data-[expanded=true]:bg-trans-light group-has-[p]/select:bg-danger-soft"
7833
- },
7834
- normal: {
7835
- selectWrapper: "border hover:bg-trans-soft data-[expanded=true]:bg-trans-soft"
7836
- },
7837
- line: {
7838
- selectWrapper: "border-b !rounded-none hover:bg-trans-soft data-[expanded=true]:bg-trans-soft",
7839
- optionsWrapper: "!rounded-none"
7840
- }
7841
- },
7842
7811
  color: {
7843
7812
  primary: {
7844
- selectWrapper: "data-[expanded=true]:border-primary-main text-primary-main",
7845
- optionsWrapper: "border-primary-main",
7846
- select: "data-[expanded=true]:text-primary-main"
7813
+ selectWrapper: ["hover:text-primary-main"],
7814
+ option: ["hover:bg-primary-soft", "hover:text-primary-main"]
7847
7815
  },
7848
7816
  secondary: {
7849
- selectWrapper: "data-[expanded=true]:border-secondary-main text-secondary-main",
7850
- optionsWrapper: "border-secondary-main",
7851
- select: "data-[expanded=true]:text-secondary-main"
7817
+ selectWrapper: ["hover:text-secondary-main"],
7818
+ select: ["text-secondary-main"],
7819
+ option: ["hover:bg-secondary-soft", "hover:text-secondary-main"]
7852
7820
  }
7853
7821
  },
7854
7822
  size: {
7855
7823
  sm: {
7856
- base: "text-sm gap-[6px]",
7857
- selectWrapper: "w-[240px] h-[24px] px-[6px] py-[4.5px] gap-[6px] rounded-sm",
7858
- optionsWrapper: "max-h-[96px] rounded-sm",
7859
- errorMessage: "text-sm"
7824
+ base: ["text-sm", "gap-[4px]"],
7825
+ label: ["text-sm"],
7826
+ wrapper: ["gap-[4px]"],
7827
+ selectWrapper: ["w-[240px]", "h-[24px]", "rounded-sm", "px-[4px]"],
7828
+ select: ["text-sm"],
7829
+ option: ["px-[4px]", "py-[3px]", "text-sm"],
7830
+ helperText: ["text-sm"],
7831
+ errorText: ["text-sm"]
7860
7832
  },
7861
7833
  md: {
7862
- base: "text-md gap-[8px]",
7863
- selectWrapper: "w-[240px] h-[30px] px-[8px] py-[6.5px] gap-[8px] rounded-md",
7864
- optionsWrapper: "max-h-[120px] rounded-md",
7865
- errorMessage: "text-md"
7834
+ base: ["text-md", "gap-[6px]", "rounded-md"],
7835
+ label: ["text-md"],
7836
+ wrapper: ["gap-[6px]"],
7837
+ selectWrapper: ["w-[240px]", "h-[32px]", "rounded-md", "px-[6px]"],
7838
+ select: ["text-md"],
7839
+ option: ["px-[6px]", "py-[5.5px]", "text-md"],
7840
+ helperText: ["text-sm"],
7841
+ errorText: ["text-sm"]
7866
7842
  },
7867
7843
  lg: {
7868
- base: "text-lg gap-[10px]",
7869
- selectWrapper: "w-[240px] h-[36px] px-[10px] py-[8px] gap-[10px] rounded-lg",
7870
- optionsWrapper: "max-h-[144px] rounded-lg",
7871
- errorMessage: "text-lg"
7844
+ base: ["text-lg", "gap-[8px]"],
7845
+ label: ["text-lg"],
7846
+ wrapper: ["gap-[8px]"],
7847
+ selectWrapper: ["w-[240px]", "h-[40px]", "rounded-lg", "px-[8px]"],
7848
+ select: ["text-lg"],
7849
+ option: ["px-[8px]", "py-[8px]", "text-lg"],
7850
+ helperText: ["text-md"],
7851
+ errorText: ["text-md"]
7872
7852
  },
7873
7853
  xl: {
7874
- base: "text-lg gap-[10px]",
7875
- selectWrapper: "w-[240px] h-[36px] px-[10px] py-[8px] gap-[10px] rounded-xl",
7876
- optionsWrapper: "max-h-[144px] rounded-xl",
7877
- errorMessage: "text-xl"
7854
+ base: ["text-xl", "gap-[10px]"],
7855
+ label: ["text-xl"],
7856
+ wrapper: ["gap-[10px]"],
7857
+ selectWrapper: ["w-[240px]", "h-[50px]", "rounded-lg", "px-[10px]"],
7858
+ select: ["text-xl"],
7859
+ option: ["px-[10px]", "py-[11.5px]"],
7860
+ helperText: ["text-md"],
7861
+ errorText: ["text-md"]
7878
7862
  }
7879
7863
  },
7880
- radius: {
7881
- default: "",
7882
- none: {
7883
- selectWrapper: "rounded-none",
7884
- optionsWrapper: "rounded-none"
7885
- },
7886
- full: {
7887
- selectWrapper: "rounded-full"
7888
- }
7864
+ direction: {
7865
+ vertical: "",
7866
+ horizon: ""
7889
7867
  },
7890
- fullWidth: {
7868
+ full: {
7891
7869
  true: {
7892
- selectWrapper: "w-full",
7893
- optionsWrapper: "w-full"
7870
+ base: ["w-full"],
7871
+ wrapper: ["w-full"],
7872
+ selectWrapper: ["w-full"]
7894
7873
  }
7895
7874
  },
7896
- isDisabled: {
7875
+ disabled: {
7897
7876
  true: {
7898
- base: "cursor-default",
7899
- selectWrapper: "bg-neutral-soft border-neutral-light text-neutral-light pointer-events-none",
7900
- select: "text-neutral-light focus:text-neutral-light",
7901
- label: "text-neutral-light"
7877
+ base: ["pointer-events-none"],
7878
+ selectWrapper: [
7879
+ "bg-neutral-soft",
7880
+ "border-neutral-light",
7881
+ "group-has-[p.error]/select:text-danger-light",
7882
+ "group-has-[p.error]/select:bg-danger-soft",
7883
+ "group-has-[p.error]/select:border-danger-light"
7884
+ ],
7885
+ select: [
7886
+ "text-neutral-light",
7887
+ "placeholder:text-neutral-light",
7888
+ "group-has-[p.error]/select:text-danger-light",
7889
+ "group-has-[p.error]/select:placeholder:text-danger-light"
7890
+ ],
7891
+ helperText: ["!text-neutral-light"],
7892
+ errorText: ["!text-danger-light"]
7902
7893
  }
7903
7894
  },
7904
- isRequired: {
7905
- true: {
7906
- label: "after:content-['*'] after:text-danger-main after:ml-0.5"
7907
- }
7895
+ isSelected: {
7896
+ true: "",
7897
+ false: ""
7908
7898
  }
7909
7899
  },
7910
- defaultVariants: {
7911
- variant: "solid",
7912
- color: "primary",
7913
- size: "md",
7914
- fullWidth: false,
7915
- isDisabled: false,
7916
- isRequired: false
7917
- },
7918
7900
  compoundVariants: [
7919
7901
  {
7920
- isDisabled: true,
7921
- isRequired: true,
7902
+ color: "primary",
7903
+ isSelected: true,
7922
7904
  class: {
7923
- label: "after:text-danger-light"
7905
+ option: "bg-primary-soft text-primary-main"
7906
+ }
7907
+ },
7908
+ {
7909
+ color: "secondary",
7910
+ isSelected: true,
7911
+ class: {
7912
+ option: "bg-secondary-soft text-secondary-main"
7924
7913
  }
7925
7914
  }
7926
- ]
7915
+ ],
7916
+ defaultVariants: {
7917
+ color: "primary",
7918
+ size: "md",
7919
+ direction: "vertical",
7920
+ disabled: false,
7921
+ readonly: false
7922
+ }
7927
7923
  });
7928
7924
 
7929
7925
  // src/components/chip/chip.tsx
7930
- var import_react21 = require("react");
7931
- var import_jsx_runtime23 = require("react/jsx-runtime");
7932
- var Chip = (0, import_react21.forwardRef)((originalProps, ref) => {
7926
+ var import_react20 = require("react");
7927
+ var import_jsx_runtime22 = require("react/jsx-runtime");
7928
+ var Chip = (0, import_react20.forwardRef)((originalProps, ref) => {
7933
7929
  var _a;
7934
7930
  const [rawProps, variantProps] = mapPropsVariants(originalProps, chipStyle.variantKeys);
7935
7931
  const props = { ...rawProps, ...variantProps };
7936
7932
  const Component = props.onClick ? "button" : "div";
7937
- const slots = (0, import_react21.useMemo)(() => chipStyle({ ...variantProps }), [variantProps]);
7938
- const renderIcon = (name) => name ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon_default, { name, fill: true, size: props.size, className: slots.icon() }) : null;
7939
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
7933
+ const slots = (0, import_react20.useMemo)(() => chipStyle({ ...variantProps }), [variantProps]);
7934
+ const renderIcon = (name) => name ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon_default, { name, fill: true, size: props.size, className: slots.icon() }) : null;
7935
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
7940
7936
  Component,
7941
7937
  {
7942
7938
  ref,
@@ -8112,13 +8108,13 @@ var chipStyle = tv({
8112
8108
  });
8113
8109
 
8114
8110
  // src/components/radio/radio.tsx
8115
- var import_react22 = require("react");
8116
- var import_jsx_runtime24 = require("react/jsx-runtime");
8117
- var Radio = (0, import_react22.forwardRef)((originalProps, ref) => {
8111
+ var import_react21 = require("react");
8112
+ var import_jsx_runtime23 = require("react/jsx-runtime");
8113
+ var Radio = (0, import_react21.forwardRef)((originalProps, ref) => {
8118
8114
  const [props, variantProps] = mapPropsVariants(originalProps, radioStyle.variantKeys);
8119
8115
  const { children, classNames, labelPosition = "end", ...inputProps } = props;
8120
- const slots = (0, import_react22.useMemo)(() => radioStyle({ ...variantProps }), [variantProps]);
8121
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
8116
+ const slots = (0, import_react21.useMemo)(() => radioStyle({ ...variantProps }), [variantProps]);
8117
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
8122
8118
  "label",
8123
8119
  {
8124
8120
  className: clsx(
@@ -8126,9 +8122,9 @@ var Radio = (0, import_react22.forwardRef)((originalProps, ref) => {
8126
8122
  labelPosition === "start" && slots.labelReverse({ class: classNames == null ? void 0 : classNames.labelReverse })
8127
8123
  ),
8128
8124
  children: [
8129
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { ...inputProps, type: "radio", ref }) }),
8130
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.outerDot({ class: classNames == null ? void 0 : classNames.outerDot }), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.innerDot({ class: classNames == null ? void 0 : classNames.innerDot }) }) }),
8131
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: slots.labelWrapper({ class: classNames == null ? void 0 : classNames.labelWrapper }), children: children && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children }) })
8125
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { ...inputProps, type: "radio", ref }) }),
8126
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: slots.outerDot({ class: classNames == null ? void 0 : classNames.outerDot }), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: slots.innerDot({ class: classNames == null ? void 0 : classNames.innerDot }) }) }),
8127
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: slots.labelWrapper({ class: classNames == null ? void 0 : classNames.labelWrapper }), children: children && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children }) })
8132
8128
  ]
8133
8129
  }
8134
8130
  );
@@ -8268,21 +8264,21 @@ var radioStyle = tv({
8268
8264
  });
8269
8265
 
8270
8266
  // src/components/switch/switch.tsx
8271
- var import_react23 = require("react");
8272
- var import_tailwind_variants21 = require("tailwind-variants");
8273
- var import_jsx_runtime25 = require("react/jsx-runtime");
8274
- var Switch = (0, import_react23.forwardRef)((originalProps, ref) => {
8267
+ var import_react22 = require("react");
8268
+ var import_tailwind_variants20 = require("tailwind-variants");
8269
+ var import_jsx_runtime24 = require("react/jsx-runtime");
8270
+ var Switch = (0, import_react22.forwardRef)((originalProps, ref) => {
8275
8271
  const [rawProps, variantProps] = mapPropsVariants(originalProps, switchStyle.variantKeys);
8276
8272
  const { size, color, isDisabled, disableAnimation, id, classNames, ...inputProps } = { ...rawProps, ...variantProps };
8277
- const slots = (0, import_react23.useMemo)(() => switchStyle({ ...variantProps }), [variantProps]);
8278
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
8279
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { ...inputProps, id, ref, type: "checkbox", disabled: isDisabled, className: "hidden" }),
8280
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: slots.outerWrapper({ class: classNames == null ? void 0 : classNames.outerWrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: slots.thumb({ class: classNames == null ? void 0 : classNames.thumb }) }) }) })
8273
+ const slots = (0, import_react22.useMemo)(() => switchStyle({ ...variantProps }), [variantProps]);
8274
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
8275
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { ...inputProps, id, ref, type: "checkbox", disabled: isDisabled, className: "hidden" }),
8276
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.outerWrapper({ class: classNames == null ? void 0 : classNames.outerWrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.thumb({ class: classNames == null ? void 0 : classNames.thumb }) }) }) })
8281
8277
  ] });
8282
8278
  });
8283
8279
  Switch.displayName = "Switch";
8284
8280
  var switch_default = Switch;
8285
- var switchStyle = (0, import_tailwind_variants21.tv)({
8281
+ var switchStyle = (0, import_tailwind_variants20.tv)({
8286
8282
  slots: {
8287
8283
  base: ["group/switch", "relative", "max-w-fit", "inline-flex", "items-center", "justify-start", "cursor-pointer"],
8288
8284
  outerWrapper: [
@@ -8387,7 +8383,7 @@ var switchStyle = (0, import_tailwind_variants21.tv)({
8387
8383
  });
8388
8384
 
8389
8385
  // src/components/tooltip/tooltip.tsx
8390
- var import_react25 = require("react");
8386
+ var import_react24 = require("react");
8391
8387
  var import_react_dom2 = require("react-dom");
8392
8388
 
8393
8389
  // src/components/tooltip/tooltip-utils.ts
@@ -8510,11 +8506,11 @@ var getTailStyles = (placement) => {
8510
8506
  };
8511
8507
 
8512
8508
  // src/components/tooltip/useTooltip.ts
8513
- var import_react24 = require("react");
8509
+ var import_react23 = require("react");
8514
8510
  var useTooltip = ({ placement, offset, targetRect }) => {
8515
- const [tooltipPosition, setTooltipPosition] = (0, import_react24.useState)({ x: 0, y: 0 });
8516
- const tooltipRef = (0, import_react24.useRef)(null);
8517
- (0, import_react24.useEffect)(() => {
8511
+ const [tooltipPosition, setTooltipPosition] = (0, import_react23.useState)({ x: 0, y: 0 });
8512
+ const tooltipRef = (0, import_react23.useRef)(null);
8513
+ (0, import_react23.useEffect)(() => {
8518
8514
  if (targetRect && tooltipRef.current) {
8519
8515
  const { width, height } = tooltipRef.current.getBoundingClientRect();
8520
8516
  const scrollX = window.scrollX;
@@ -8544,29 +8540,29 @@ var useTooltip = ({ placement, offset, targetRect }) => {
8544
8540
  };
8545
8541
 
8546
8542
  // src/components/tooltip/tooltip.tsx
8547
- var import_jsx_runtime26 = require("react/jsx-runtime");
8548
- var Tooltip = (0, import_react25.forwardRef)((originalProps, ref) => {
8543
+ var import_jsx_runtime25 = require("react/jsx-runtime");
8544
+ var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
8549
8545
  const [props, variantProps] = mapPropsVariants(originalProps, tooltipStyle.variantKeys);
8550
8546
  const { placement = "top", offset = 5, delay = 100, persistent = false, classNames } = props;
8551
- const slots = (0, import_react25.useMemo)(() => tooltipStyle({ ...variantProps }), [variantProps]);
8552
- const [targetRect, setTargetRect] = (0, import_react25.useState)(null);
8547
+ const slots = (0, import_react24.useMemo)(() => tooltipStyle({ ...variantProps }), [variantProps]);
8548
+ const [targetRect, setTargetRect] = (0, import_react24.useState)(null);
8553
8549
  const { tooltipPosition, tooltipRef } = useTooltip({
8554
8550
  placement,
8555
8551
  offset,
8556
8552
  delay,
8557
8553
  targetRect
8558
8554
  });
8559
- const childrenRef = (0, import_react25.useRef)(null);
8560
- const delayTimeoutRef = (0, import_react25.useRef)(null);
8561
- const getProps = (0, import_react25.useCallback)(
8555
+ const childrenRef = (0, import_react24.useRef)(null);
8556
+ const delayTimeoutRef = (0, import_react24.useRef)(null);
8557
+ const getProps = (0, import_react24.useCallback)(
8562
8558
  (slotKey, classNameKey) => ({
8563
8559
  className: slots[slotKey]({ class: classNames == null ? void 0 : classNames[classNameKey] })
8564
8560
  }),
8565
8561
  [slots, classNames]
8566
8562
  );
8567
- const getBaseProps = (0, import_react25.useCallback)(() => getProps("base", "base"), [getProps]);
8568
- const getContentProps = (0, import_react25.useCallback)(() => getProps("content", "content"), [getProps]);
8569
- const showTooltip = (0, import_react25.useCallback)(() => {
8563
+ const getBaseProps = (0, import_react24.useCallback)(() => getProps("base", "base"), [getProps]);
8564
+ const getContentProps = (0, import_react24.useCallback)(() => getProps("content", "content"), [getProps]);
8565
+ const showTooltip = (0, import_react24.useCallback)(() => {
8570
8566
  if (childrenRef.current) {
8571
8567
  const rect = childrenRef.current.getBoundingClientRect();
8572
8568
  setTargetRect({
@@ -8579,16 +8575,16 @@ var Tooltip = (0, import_react25.forwardRef)((originalProps, ref) => {
8579
8575
  });
8580
8576
  }
8581
8577
  }, []);
8582
- const hideTooltip = (0, import_react25.useCallback)(() => {
8578
+ const hideTooltip = (0, import_react24.useCallback)(() => {
8583
8579
  if (!persistent) {
8584
8580
  delayTimeoutRef.current = window.setTimeout(() => setTargetRect(null), delay);
8585
8581
  }
8586
8582
  }, [persistent, delay]);
8587
- (0, import_react25.useEffect)(() => {
8583
+ (0, import_react24.useEffect)(() => {
8588
8584
  if (persistent) showTooltip();
8589
8585
  }, [persistent, showTooltip]);
8590
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
8591
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
8586
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
8587
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8592
8588
  "div",
8593
8589
  {
8594
8590
  ref: (node) => {
@@ -8605,7 +8601,7 @@ var Tooltip = (0, import_react25.forwardRef)((originalProps, ref) => {
8605
8601
  }
8606
8602
  ),
8607
8603
  targetRect && (0, import_react_dom2.createPortal)(
8608
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
8604
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
8609
8605
  "div",
8610
8606
  {
8611
8607
  ref: tooltipRef,
@@ -8618,7 +8614,7 @@ var Tooltip = (0, import_react25.forwardRef)((originalProps, ref) => {
8618
8614
  },
8619
8615
  children: [
8620
8616
  props.content,
8621
- variantProps.tail && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
8617
+ variantProps.tail && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
8622
8618
  "div",
8623
8619
  {
8624
8620
  className: `absolute h-2 w-2 rotate-45 bg-inherit ${getTailClassName(placement)}`,
@@ -8669,10 +8665,10 @@ var tooltipStyle = tv({
8669
8665
  });
8670
8666
 
8671
8667
  // src/components/modal/modal.tsx
8672
- var import_react26 = require("react");
8668
+ var import_react25 = require("react");
8673
8669
  var import_react_dom3 = require("react-dom");
8674
- var import_jsx_runtime27 = require("react/jsx-runtime");
8675
- var Modal = (0, import_react26.forwardRef)((props, ref) => {
8670
+ var import_jsx_runtime26 = require("react/jsx-runtime");
8671
+ var Modal = (0, import_react25.forwardRef)((props, ref) => {
8676
8672
  const [localProps, variantProps] = mapPropsVariants(props, modal.variantKeys);
8677
8673
  const {
8678
8674
  classNames,
@@ -8686,8 +8682,8 @@ var Modal = (0, import_react26.forwardRef)((props, ref) => {
8686
8682
  onConfirm,
8687
8683
  onCancel
8688
8684
  } = localProps;
8689
- const slots = (0, import_react26.useMemo)(() => modal(variantProps), [variantProps]);
8690
- (0, import_react26.useEffect)(() => {
8685
+ const slots = (0, import_react25.useMemo)(() => modal(variantProps), [variantProps]);
8686
+ (0, import_react25.useEffect)(() => {
8691
8687
  document.body.classList.toggle("overflow-hidden", !!isOpen);
8692
8688
  if (!isOpen || isKeyboardDismissDisabled) return;
8693
8689
  const handleKeyDown = (e) => {
@@ -8701,10 +8697,10 @@ var Modal = (0, import_react26.forwardRef)((props, ref) => {
8701
8697
  }, [isOpen, isKeyboardDismissDisabled, onCancel]);
8702
8698
  if (!isOpen) return null;
8703
8699
  return (0, import_react_dom3.createPortal)(
8704
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
8705
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(backdrop_default, { open: true }),
8706
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: slots.modalWrapper({ class: classNames == null ? void 0 : classNames.modalWrapper }), children: [
8707
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
8700
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
8701
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(backdrop_default, { open: true }),
8702
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: slots.modalWrapper({ class: classNames == null ? void 0 : classNames.modalWrapper }), children: [
8703
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
8708
8704
  Icon_default,
8709
8705
  {
8710
8706
  size: "xl",
@@ -8713,12 +8709,12 @@ var Modal = (0, import_react26.forwardRef)((props, ref) => {
8713
8709
  onClick: onCancel
8714
8710
  }
8715
8711
  ),
8716
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
8717
- title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
8718
- typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: slots.content({ class: classNames == null ? void 0 : classNames.content }), children: content }) : content,
8719
- (cancelButtonText || confirmButtonText) && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: slots.footer({ class: classNames == null ? void 0 : classNames.footer }), children: [
8720
- cancelButtonText && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(button_default, { variant: "soft", color: "neutral", fullWidth: true, onClick: onCancel, children: cancelButtonText }),
8721
- confirmButtonText && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(button_default, { color: props.color, fullWidth: true, onClick: onConfirm, children: confirmButtonText })
8712
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
8713
+ title && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
8714
+ typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: slots.content({ class: classNames == null ? void 0 : classNames.content }), children: content }) : content,
8715
+ (cancelButtonText || confirmButtonText) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: slots.footer({ class: classNames == null ? void 0 : classNames.footer }), children: [
8716
+ cancelButtonText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(button_default, { variant: "soft", color: "neutral", fullWidth: true, onClick: onCancel, children: cancelButtonText }),
8717
+ confirmButtonText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(button_default, { color: props.color, fullWidth: true, onClick: onConfirm, children: confirmButtonText })
8722
8718
  ] })
8723
8719
  ] })
8724
8720
  ] }) })
@@ -8784,15 +8780,15 @@ var modal = tv({
8784
8780
  });
8785
8781
 
8786
8782
  // src/components/list/list.tsx
8787
- var import_react27 = require("react");
8788
- var import_jsx_runtime28 = require("react/jsx-runtime");
8789
- var List = (0, import_react27.forwardRef)((originalProps, ref) => {
8783
+ var import_react26 = require("react");
8784
+ var import_jsx_runtime27 = require("react/jsx-runtime");
8785
+ var List = (0, import_react26.forwardRef)((originalProps, ref) => {
8790
8786
  const [props, variantProps] = mapPropsVariants(originalProps, listStyle.variantKeys);
8791
8787
  const { children, classNames } = props;
8792
- const slots = (0, import_react27.useMemo)(() => listStyle(variantProps), [variantProps]);
8793
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: import_react27.Children.map(children, (child) => {
8794
- if (!(0, import_react27.isValidElement)(child)) return child;
8795
- return (0, import_react27.cloneElement)(child, {
8788
+ const slots = (0, import_react26.useMemo)(() => listStyle(variantProps), [variantProps]);
8789
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: import_react26.Children.map(children, (child) => {
8790
+ if (!(0, import_react26.isValidElement)(child)) return child;
8791
+ return (0, import_react26.cloneElement)(child, {
8796
8792
  ...variantProps,
8797
8793
  ...child.props
8798
8794
  });
@@ -8829,9 +8825,9 @@ var listStyle = tv({
8829
8825
  });
8830
8826
 
8831
8827
  // src/components/list/listItem.tsx
8832
- var import_react28 = require("react");
8833
- var import_jsx_runtime29 = require("react/jsx-runtime");
8834
- var ListItem = (0, import_react28.forwardRef)((props, ref) => {
8828
+ var import_react27 = require("react");
8829
+ var import_jsx_runtime28 = require("react/jsx-runtime");
8830
+ var ListItem = (0, import_react27.forwardRef)((props, ref) => {
8835
8831
  const [rawProps, variantProps] = mapPropsVariants(props, listItemStyle.variantKeys);
8836
8832
  const {
8837
8833
  title,
@@ -8843,19 +8839,19 @@ var ListItem = (0, import_react28.forwardRef)((props, ref) => {
8843
8839
  classNames,
8844
8840
  onClick
8845
8841
  } = { ...rawProps, ...variantProps };
8846
- const slots = (0, import_react28.useMemo)(() => listItemStyle(variantProps), [variantProps]);
8842
+ const slots = (0, import_react27.useMemo)(() => listItemStyle(variantProps), [variantProps]);
8847
8843
  const iconSize = ["lg", "xl"].includes(size) ? "lg" : "md";
8848
8844
  const avatarSize = iconSize;
8849
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), "data-selected": selected, onClick, children: [
8850
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
8851
- avatar && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(avatar_default, { ...avatar, variant: "round", size: avatarSize }),
8852
- startIconName && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: startIconName, fill: true, size, className: slots.startIcon({ class: classNames == null ? void 0 : classNames.startIcon }) }),
8853
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: slots.titleWrapper({ class: classNames == null ? void 0 : classNames.titleWrapper }), children: [
8854
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
8855
- subTitle && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: slots.subTitle({ class: classNames == null ? void 0 : classNames.subTitle }), children: subTitle })
8845
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), "data-selected": selected, onClick, children: [
8846
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
8847
+ avatar && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(avatar_default, { ...avatar, variant: "round", size: avatarSize }),
8848
+ startIconName && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon_default, { name: startIconName, fill: true, size, className: slots.startIcon({ class: classNames == null ? void 0 : classNames.startIcon }) }),
8849
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: slots.titleWrapper({ class: classNames == null ? void 0 : classNames.titleWrapper }), children: [
8850
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
8851
+ subTitle && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: slots.subTitle({ class: classNames == null ? void 0 : classNames.subTitle }), children: subTitle })
8856
8852
  ] })
8857
8853
  ] }),
8858
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: "right-chevron", size: iconSize, className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }) })
8854
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon_default, { name: "right-chevron", size: iconSize, className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }) })
8859
8855
  ] });
8860
8856
  });
8861
8857
  ListItem.displayName = "ListItem";
@@ -9023,9 +9019,9 @@ var listItemStyle = tv({
9023
9019
  });
9024
9020
 
9025
9021
  // src/components/toast/toast.tsx
9026
- var import_react29 = require("react");
9027
- var import_jsx_runtime30 = require("react/jsx-runtime");
9028
- var Toast = (0, import_react29.forwardRef)((originalProps, ref) => {
9022
+ var import_react28 = require("react");
9023
+ var import_jsx_runtime29 = require("react/jsx-runtime");
9024
+ var Toast = (0, import_react28.forwardRef)((originalProps, ref) => {
9029
9025
  const [props, variantProps] = mapPropsVariants(originalProps, toast.variantKeys);
9030
9026
  const {
9031
9027
  title,
@@ -9039,9 +9035,9 @@ var Toast = (0, import_react29.forwardRef)((originalProps, ref) => {
9039
9035
  disableAnimation,
9040
9036
  onClose
9041
9037
  } = { ...props, ...variantProps };
9042
- const slots = (0, import_react29.useMemo)(() => toast({ ...variantProps }), [variantProps]);
9043
- const toastRef = (0, import_react29.useRef)(null);
9044
- (0, import_react29.useImperativeHandle)(
9038
+ const slots = (0, import_react28.useMemo)(() => toast({ ...variantProps }), [variantProps]);
9039
+ const toastRef = (0, import_react28.useRef)(null);
9040
+ (0, import_react28.useImperativeHandle)(
9045
9041
  ref,
9046
9042
  () => ({
9047
9043
  getWidth: () => {
@@ -9052,7 +9048,7 @@ var Toast = (0, import_react29.forwardRef)((originalProps, ref) => {
9052
9048
  []
9053
9049
  );
9054
9050
  const animationClass = (placement == null ? void 0 : placement.includes("top")) ? "animate-slideInFromTop" : "animate-slideInFromBottom";
9055
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
9051
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
9056
9052
  "div",
9057
9053
  {
9058
9054
  ref: toastRef,
@@ -9064,12 +9060,12 @@ var Toast = (0, import_react29.forwardRef)((originalProps, ref) => {
9064
9060
  ),
9065
9061
  style: hasShadow ? { boxShadow: "0px 6px 18px rgba(0, 0, 0, 0.10)" } : {},
9066
9062
  children: [
9067
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
9068
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon_default, { name: originalProps.icon || "info-circle", fill: true, className: "mt-[2px]" }),
9069
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
9070
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon_default, { name: "close", className: "cursor-pointer", onClick: onClose })
9063
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
9064
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: originalProps.icon || "info-circle", fill: true, className: "mt-[2px]" }),
9065
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
9066
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: "close", className: "cursor-pointer", onClick: onClose })
9071
9067
  ] }),
9072
- content && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { children: content })
9068
+ content && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { children: content })
9073
9069
  ]
9074
9070
  }
9075
9071
  );
@@ -9174,7 +9170,7 @@ var toast = tv({
9174
9170
  });
9175
9171
 
9176
9172
  // src/components/toast/use-toast.tsx
9177
- var import_react30 = require("react");
9173
+ var import_react29 = require("react");
9178
9174
 
9179
9175
  // src/components/toast/toast-utils.ts
9180
9176
  var getToastPosition = (placement, width, offset) => {
@@ -9213,10 +9209,10 @@ var getToastPosition = (placement, width, offset) => {
9213
9209
  };
9214
9210
 
9215
9211
  // src/components/toast/use-toast.tsx
9216
- var import_jsx_runtime31 = require("react/jsx-runtime");
9217
- var ToastContext = (0, import_react30.createContext)(null);
9212
+ var import_jsx_runtime30 = require("react/jsx-runtime");
9213
+ var ToastContext = (0, import_react29.createContext)(null);
9218
9214
  var useToast = () => {
9219
- const context = (0, import_react30.useContext)(ToastContext);
9215
+ const context = (0, import_react29.useContext)(ToastContext);
9220
9216
  if (!context) {
9221
9217
  throw new Error("useToast must be used within a ToastProvider");
9222
9218
  }
@@ -9226,10 +9222,10 @@ var ToastProvider = ({
9226
9222
  globalOptions,
9227
9223
  children
9228
9224
  }) => {
9229
- const [toasts, setToasts] = (0, import_react30.useState)([]);
9230
- const [containerStyle, setContainerStyle] = (0, import_react30.useState)({});
9231
- const toastRef = (0, import_react30.useRef)(null);
9232
- const addToast = (0, import_react30.useCallback)(
9225
+ const [toasts, setToasts] = (0, import_react29.useState)([]);
9226
+ const [containerStyle, setContainerStyle] = (0, import_react29.useState)({});
9227
+ const toastRef = (0, import_react29.useRef)(null);
9228
+ const addToast = (0, import_react29.useCallback)(
9233
9229
  (title, options = {}) => {
9234
9230
  const id = Date.now() + Math.floor(Math.random() * 1e5);
9235
9231
  const newToast = {
@@ -9246,11 +9242,11 @@ var ToastProvider = ({
9246
9242
  },
9247
9243
  [globalOptions]
9248
9244
  );
9249
- const removeToast = (0, import_react30.useCallback)((id) => {
9245
+ const removeToast = (0, import_react29.useCallback)((id) => {
9250
9246
  setToasts((prevToasts) => prevToasts.filter((toast2) => toast2.id !== id));
9251
9247
  }, []);
9252
9248
  const contextValue = addToast;
9253
- (0, import_react30.useEffect)(() => {
9249
+ (0, import_react29.useEffect)(() => {
9254
9250
  var _a;
9255
9251
  const width = (globalOptions == null ? void 0 : globalOptions.width) ? globalOptions.width : typeof ((_a = toastRef.current) == null ? void 0 : _a.getWidth) === "function" ? toastRef.current.getWidth() : 300;
9256
9252
  const offset = 20;
@@ -9264,18 +9260,18 @@ var ToastProvider = ({
9264
9260
  right: right !== void 0 ? `${right}px` : void 0
9265
9261
  });
9266
9262
  }, [globalOptions == null ? void 0 : globalOptions.placement, globalOptions == null ? void 0 : globalOptions.width]);
9267
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(ToastContext.Provider, { value: contextValue, children: [
9263
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(ToastContext.Provider, { value: contextValue, children: [
9268
9264
  children,
9269
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { id: "deepnoid-toast-container", className: "flex flex-col gap-[10px]", style: containerStyle, children: toasts.map((toast2) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(toast_default, { ref: toastRef, onClose: () => removeToast(toast2.id), ...toast2 }, toast2.id)) })
9265
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { id: "deepnoid-toast-container", className: "flex flex-col gap-[10px]", style: containerStyle, children: toasts.map((toast2) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(toast_default, { ref: toastRef, onClose: () => removeToast(toast2.id), ...toast2 }, toast2.id)) })
9270
9266
  ] });
9271
9267
  };
9272
9268
 
9273
9269
  // src/components/dateTimePicker/dateTimePicker.tsx
9274
- var import_react34 = __toESM(require("react"));
9270
+ var import_react33 = __toESM(require("react"));
9275
9271
  var import_react_dom4 = require("react-dom");
9276
9272
 
9277
9273
  // src/components/dateTimePicker/useDateTimePicker.tsx
9278
- var import_react31 = require("react");
9274
+ var import_react30 = require("react");
9279
9275
 
9280
9276
  // src/components/dateTimePicker/util.ts
9281
9277
  var formatDateToString = (date) => {
@@ -9291,17 +9287,17 @@ var formatStringToDate = (date) => {
9291
9287
 
9292
9288
  // src/components/dateTimePicker/useDateTimePicker.tsx
9293
9289
  var useDatePicker = ({ initialDate, initialTime }) => {
9294
- const [selectedDate, setSelectedDate] = (0, import_react31.useState)(
9290
+ const [selectedDate, setSelectedDate] = (0, import_react30.useState)(
9295
9291
  initialDate ? formatDateToString(initialDate) : ""
9296
9292
  );
9297
- const [selectedTime, setSelectedTime] = (0, import_react31.useState)(initialTime ? initialTime : "");
9298
- const [targetRect, setTargetRect] = (0, import_react31.useState)(null);
9299
- const [popupWidth, setPopupWidth] = (0, import_react31.useState)(0);
9300
- const [popupHeight, setPopupHeight] = (0, import_react31.useState)(0);
9301
- const [isFocusInput, setIsFocusInput] = (0, import_react31.useState)(false);
9302
- const dateInputRef = (0, import_react31.useRef)(null);
9303
- const datePickerWrapperRef = (0, import_react31.useRef)(null);
9304
- const datePickerRef = (0, import_react31.useRef)(null);
9293
+ const [selectedTime, setSelectedTime] = (0, import_react30.useState)(initialTime ? initialTime : "");
9294
+ const [targetRect, setTargetRect] = (0, import_react30.useState)(null);
9295
+ const [popupWidth, setPopupWidth] = (0, import_react30.useState)(0);
9296
+ const [popupHeight, setPopupHeight] = (0, import_react30.useState)(0);
9297
+ const [isFocusInput, setIsFocusInput] = (0, import_react30.useState)(false);
9298
+ const dateInputRef = (0, import_react30.useRef)(null);
9299
+ const datePickerWrapperRef = (0, import_react30.useRef)(null);
9300
+ const datePickerRef = (0, import_react30.useRef)(null);
9305
9301
  const DATE_PICKER_GAP = 4;
9306
9302
  const calculatePositionWithScroll = (targetRect2) => {
9307
9303
  if (targetRect2 && popupWidth && popupHeight) {
@@ -9334,7 +9330,7 @@ var useDatePicker = ({ initialDate, initialTime }) => {
9334
9330
  const handleBlueInput = () => {
9335
9331
  setIsFocusInput(false);
9336
9332
  };
9337
- (0, import_react31.useEffect)(() => {
9333
+ (0, import_react30.useEffect)(() => {
9338
9334
  const onClickOutside = (e) => {
9339
9335
  if (datePickerRef.current && !datePickerRef.current.contains(e.target) && datePickerWrapperRef.current && !datePickerWrapperRef.current.contains(e.target)) {
9340
9336
  setTargetRect(null);
@@ -9343,7 +9339,7 @@ var useDatePicker = ({ initialDate, initialTime }) => {
9343
9339
  window.addEventListener("mousedown", onClickOutside);
9344
9340
  return () => window.removeEventListener("mousedown", onClickOutside);
9345
9341
  }, []);
9346
- (0, import_react31.useEffect)(() => {
9342
+ (0, import_react30.useEffect)(() => {
9347
9343
  if (datePickerWrapperRef.current) {
9348
9344
  setPopupHeight(datePickerWrapperRef.current.getBoundingClientRect().height);
9349
9345
  setPopupWidth(datePickerWrapperRef.current.getBoundingClientRect().width);
@@ -9368,19 +9364,19 @@ var useDatePicker = ({ initialDate, initialTime }) => {
9368
9364
  };
9369
9365
 
9370
9366
  // src/components/dateTimePicker/calendar.tsx
9371
- var import_react32 = __toESM(require("react"));
9372
- var import_jsx_runtime32 = require("react/jsx-runtime");
9373
- var Calendar = (0, import_react32.forwardRef)((originalProps, ref) => {
9367
+ var import_react31 = __toESM(require("react"));
9368
+ var import_jsx_runtime31 = require("react/jsx-runtime");
9369
+ var Calendar = (0, import_react31.forwardRef)((originalProps, ref) => {
9374
9370
  const [props, variantProps] = mapPropsVariants(originalProps, calendarStyle.variantKeys);
9375
9371
  const { selectedDate, classNames, highlightWeekend = true, onChangeDate, ...inputProps } = props;
9376
- const [currentDate, setCurrentDate] = (0, import_react32.useState)(selectedDate ? new Date(selectedDate) : /* @__PURE__ */ new Date());
9372
+ const [currentDate, setCurrentDate] = (0, import_react31.useState)(selectedDate ? new Date(selectedDate) : /* @__PURE__ */ new Date());
9377
9373
  const daysOfWeek = ["S", "M", "T", "W", "T", "F", "S"];
9378
- (0, import_react32.useEffect)(() => {
9374
+ (0, import_react31.useEffect)(() => {
9379
9375
  if (selectedDate) {
9380
9376
  setCurrentDate(new Date(selectedDate));
9381
9377
  }
9382
9378
  }, [selectedDate]);
9383
- const getCalendarDates = (0, import_react32.useCallback)(() => {
9379
+ const getCalendarDates = (0, import_react31.useCallback)(() => {
9384
9380
  const year = currentDate.getFullYear();
9385
9381
  const month = currentDate.getMonth();
9386
9382
  const firstDayOfMonth = new Date(year, month, 1).getDay();
@@ -9426,17 +9422,17 @@ var Calendar = (0, import_react32.forwardRef)((originalProps, ref) => {
9426
9422
  onChangeDate(formatted);
9427
9423
  }
9428
9424
  };
9429
- (0, import_react32.useImperativeHandle)(ref, () => ({
9425
+ (0, import_react31.useImperativeHandle)(ref, () => ({
9430
9426
  getSelectedDate: () => selectedDate
9431
9427
  }));
9432
- const slots = (0, import_react32.useMemo)(() => calendarStyle({ ...variantProps }), [variantProps]);
9433
- const getBaseProps = (0, import_react32.useCallback)(
9428
+ const slots = (0, import_react31.useMemo)(() => calendarStyle({ ...variantProps }), [variantProps]);
9429
+ const getBaseProps = (0, import_react31.useCallback)(
9434
9430
  () => ({
9435
9431
  className: `${slots.base({ class: classNames == null ? void 0 : classNames.base })}`
9436
9432
  }),
9437
9433
  [slots, classNames]
9438
9434
  );
9439
- const getDateTitleProps = (0, import_react32.useCallback)(
9435
+ const getDateTitleProps = (0, import_react31.useCallback)(
9440
9436
  (index) => {
9441
9437
  return {
9442
9438
  className: `${slots.dateTitle({
@@ -9448,7 +9444,7 @@ var Calendar = (0, import_react32.forwardRef)((originalProps, ref) => {
9448
9444
  },
9449
9445
  [slots, classNames, highlightWeekend]
9450
9446
  );
9451
- const getDateProps = (0, import_react32.useCallback)(
9447
+ const getDateProps = (0, import_react31.useCallback)(
9452
9448
  (dateObj) => {
9453
9449
  const today = /* @__PURE__ */ new Date();
9454
9450
  const isToday = today.getDate() === dateObj.date && today.getMonth() === currentDate.getMonth() && today.getFullYear() === currentDate.getFullYear();
@@ -9470,18 +9466,18 @@ var Calendar = (0, import_react32.forwardRef)((originalProps, ref) => {
9470
9466
  [slots, classNames, selectedDate, currentDate, highlightWeekend]
9471
9467
  );
9472
9468
  const calendarDates = getCalendarDates();
9473
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { ...getBaseProps(), children: [
9474
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "calendar-header flex justify-between items-center mb-4", children: [
9475
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon_default, { name: "brace-left", size: "md", className: "cursor-pointer", onClick: handlePrevMonth }),
9476
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-h6 font-semibold", children: currentDate.toLocaleString("default", { year: "numeric", month: "2-digit" }) }),
9477
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon_default, { name: "brace-right", size: "md", className: "cursor-pointer", onClick: handleNextMonth })
9469
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { ...getBaseProps(), children: [
9470
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "calendar-header flex justify-between items-center mb-4", children: [
9471
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon_default, { name: "brace-left", size: "md", className: "cursor-pointer", onClick: handlePrevMonth }),
9472
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-h6 font-semibold", children: currentDate.toLocaleString("default", { year: "numeric", month: "2-digit" }) }),
9473
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon_default, { name: "brace-right", size: "md", className: "cursor-pointer", onClick: handleNextMonth })
9478
9474
  ] }),
9479
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "grid grid-cols-7 gap-2 text-center", children: daysOfWeek.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { ...getDateTitleProps(index), children: day }, `${day}-${index}`)) }),
9480
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "grid grid-cols-7 gap-[5px] text-center mt-2", children: calendarDates.map((week, weekIndex) => {
9475
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "grid grid-cols-7 gap-2 text-center", children: daysOfWeek.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { ...getDateTitleProps(index), children: day }, `${day}-${index}`)) }),
9476
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "grid grid-cols-7 gap-[5px] text-center mt-2", children: calendarDates.map((week, weekIndex) => {
9481
9477
  const hasCurrentMonthDates = week.some((dateObj) => dateObj.currentMonth);
9482
9478
  if (!hasCurrentMonthDates) return null;
9483
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react32.default.Fragment, { children: week.map((dateObj, index) => {
9484
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { ...getDateProps(dateObj), children: dateObj.date }, index);
9479
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react31.default.Fragment, { children: week.map((dateObj, index) => {
9480
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { ...getDateProps(dateObj), children: dateObj.date }, index);
9485
9481
  }) }, weekIndex);
9486
9482
  }) })
9487
9483
  ] }) });
@@ -9552,22 +9548,22 @@ var calendarStyle = tv({
9552
9548
  });
9553
9549
 
9554
9550
  // src/components/dateTimePicker/timePicker.tsx
9555
- var import_react33 = require("react");
9556
- var import_jsx_runtime33 = require("react/jsx-runtime");
9551
+ var import_react32 = require("react");
9552
+ var import_jsx_runtime32 = require("react/jsx-runtime");
9557
9553
  var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime }) => {
9558
9554
  const TOTAL_HOURS = 12;
9559
9555
  const TOTAL_MINUTES = 60;
9560
9556
  const ITEM_HEIGHT = 30;
9561
9557
  const PERIODS = ["AM", "PM"];
9562
- const [selectedHour, setSelectedHour] = (0, import_react33.useState)("01");
9563
- const [selectedMinute, setSelectedMinute] = (0, import_react33.useState)("00");
9564
- const [selectedPeriod, setSelectedPeriod] = (0, import_react33.useState)("AM");
9565
- const hourRef = (0, import_react33.useRef)(null);
9566
- const minuteRef = (0, import_react33.useRef)(null);
9567
- const periodRef = (0, import_react33.useRef)(null);
9558
+ const [selectedHour, setSelectedHour] = (0, import_react32.useState)("01");
9559
+ const [selectedMinute, setSelectedMinute] = (0, import_react32.useState)("00");
9560
+ const [selectedPeriod, setSelectedPeriod] = (0, import_react32.useState)("AM");
9561
+ const hourRef = (0, import_react32.useRef)(null);
9562
+ const minuteRef = (0, import_react32.useRef)(null);
9563
+ const periodRef = (0, import_react32.useRef)(null);
9568
9564
  const hoursArray = [...Array(TOTAL_HOURS).keys()].map((i) => (i + 1).toString().padStart(2, "0"));
9569
9565
  const minutesArray = [...Array(TOTAL_MINUTES).keys()].map((i) => i.toString().padStart(2, "0"));
9570
- (0, import_react33.useEffect)(() => {
9566
+ (0, import_react32.useEffect)(() => {
9571
9567
  if (selectedTime) {
9572
9568
  const { formattedHour, minute, period } = parseAndFormatTime(selectedTime);
9573
9569
  setSelectedHour(formattedHour);
@@ -9578,7 +9574,7 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
9578
9574
  scrollToSelectedTime();
9579
9575
  }
9580
9576
  }, [selectedTime, isFocusInput]);
9581
- (0, import_react33.useEffect)(() => {
9577
+ (0, import_react32.useEffect)(() => {
9582
9578
  scrollToSelectedTime();
9583
9579
  }, []);
9584
9580
  const parseAndFormatTime = (time) => {
@@ -9615,8 +9611,8 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
9615
9611
  onChangeTime(formattedTime);
9616
9612
  }
9617
9613
  };
9618
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex h-[200px] p-[10px] gap-[5px] border border-neutral-main rounded-md bg-background shadow-lg", children: [
9619
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(list_default, { ref: periodRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: PERIODS.map((period, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9614
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex h-[200px] p-[10px] gap-[5px] border border-neutral-main rounded-md bg-background shadow-lg", children: [
9615
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(list_default, { ref: periodRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: PERIODS.map((period, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9620
9616
  listItem_default,
9621
9617
  {
9622
9618
  color,
@@ -9630,7 +9626,7 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
9630
9626
  },
9631
9627
  `${period}-${index}`
9632
9628
  )) }),
9633
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(list_default, { ref: hourRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: hoursArray.map((hour, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9629
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(list_default, { ref: hourRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: hoursArray.map((hour, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9634
9630
  listItem_default,
9635
9631
  {
9636
9632
  color,
@@ -9644,7 +9640,7 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
9644
9640
  },
9645
9641
  `${hour}-${index}`
9646
9642
  )) }),
9647
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(list_default, { ref: minuteRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: minutesArray.map((minute, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9643
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(list_default, { ref: minuteRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: minutesArray.map((minute, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
9648
9644
  listItem_default,
9649
9645
  {
9650
9646
  color,
@@ -9663,8 +9659,8 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
9663
9659
  var timePicker_default = TimePicker;
9664
9660
 
9665
9661
  // src/components/dateTimePicker/dateTimePicker.tsx
9666
- var import_jsx_runtime34 = require("react/jsx-runtime");
9667
- var DatePicker = (0, import_react34.forwardRef)((originalProps, ref) => {
9662
+ var import_jsx_runtime33 = require("react/jsx-runtime");
9663
+ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
9668
9664
  const [props, variantProps] = mapPropsVariants(originalProps, dateTimePickerStyle.variantKeys);
9669
9665
  const {
9670
9666
  classNames,
@@ -9678,7 +9674,7 @@ var DatePicker = (0, import_react34.forwardRef)((originalProps, ref) => {
9678
9674
  onChangeTime,
9679
9675
  ...inputProps
9680
9676
  } = props;
9681
- const slots = (0, import_react34.useMemo)(() => dateTimePickerStyle({ ...variantProps }), [variantProps]);
9677
+ const slots = (0, import_react33.useMemo)(() => dateTimePickerStyle({ ...variantProps }), [variantProps]);
9682
9678
  const {
9683
9679
  selectedDate,
9684
9680
  selectedTime,
@@ -9699,32 +9695,32 @@ var DatePicker = (0, import_react34.forwardRef)((originalProps, ref) => {
9699
9695
  initialTime: typeof value === "string" ? value : void 0
9700
9696
  });
9701
9697
  const position = targetRect ? calculatePositionWithScroll(targetRect) : null;
9702
- const getBaseProps = (0, import_react34.useCallback)(
9698
+ const getBaseProps = (0, import_react33.useCallback)(
9703
9699
  () => ({
9704
9700
  className: slots.base({ class: classNames == null ? void 0 : classNames.base })
9705
9701
  }),
9706
9702
  [slots, classNames]
9707
9703
  );
9708
- const getLabelProps = (0, import_react34.useCallback)(
9704
+ const getLabelProps = (0, import_react33.useCallback)(
9709
9705
  () => ({
9710
9706
  className: slots.label({ class: classNames == null ? void 0 : classNames.label })
9711
9707
  }),
9712
9708
  [slots, classNames]
9713
9709
  );
9714
- const getInnerWrapperProps = (0, import_react34.useCallback)(
9710
+ const getInnerWrapperProps = (0, import_react33.useCallback)(
9715
9711
  () => ({
9716
9712
  className: slots.innerWrapper({ class: classNames == null ? void 0 : classNames.innerWrapper })
9717
9713
  }),
9718
9714
  [slots, classNames]
9719
9715
  );
9720
- const getInputWrapperProps = (0, import_react34.useCallback)(
9716
+ const getInputWrapperProps = (0, import_react33.useCallback)(
9721
9717
  () => ({
9722
9718
  className: slots.inputWrapper({ class: classNames == null ? void 0 : classNames.inputWrapper }),
9723
9719
  ref: datePickerRef
9724
9720
  }),
9725
9721
  [slots, classNames]
9726
9722
  );
9727
- const getInputProps = (0, import_react34.useCallback)(
9723
+ const getInputProps = (0, import_react33.useCallback)(
9728
9724
  () => ({
9729
9725
  ...inputProps,
9730
9726
  ref: ref || dateInputRef,
@@ -9755,33 +9751,33 @@ var DatePicker = (0, import_react34.forwardRef)((originalProps, ref) => {
9755
9751
  }),
9756
9752
  [inputProps, ref, dateInputRef, slots, classNames == null ? void 0 : classNames.input, selectedDate, selectedTime, type, value]
9757
9753
  );
9758
- const getContentProps = (0, import_react34.useCallback)(
9754
+ const getContentProps = (0, import_react33.useCallback)(
9759
9755
  () => ({
9760
9756
  className: slots.content({ class: classNames == null ? void 0 : classNames.content }),
9761
9757
  size: originalProps.size
9762
9758
  }),
9763
9759
  [slots, classNames, originalProps.size]
9764
9760
  );
9765
- const getErrorMessageProps = (0, import_react34.useCallback)(
9761
+ const getErrorMessageProps = (0, import_react33.useCallback)(
9766
9762
  () => ({
9767
9763
  className: slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })
9768
9764
  }),
9769
9765
  [slots, classNames]
9770
9766
  );
9771
9767
  const renderStartContent = () => {
9772
- if (import_react34.default.isValidElement(startContent)) {
9768
+ if (import_react33.default.isValidElement(startContent)) {
9773
9769
  const existingProps = startContent.props;
9774
9770
  const mergedProps = {
9775
9771
  ...getContentProps(),
9776
9772
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
9777
9773
  };
9778
- return import_react34.default.cloneElement(startContent, mergedProps);
9774
+ return import_react33.default.cloneElement(startContent, mergedProps);
9779
9775
  } else {
9780
9776
  const contentProps = getContentProps();
9781
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ...contentProps, children: startContent });
9777
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ...contentProps, children: startContent });
9782
9778
  }
9783
9779
  };
9784
- const renderDateTimePickerIcon = () => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ...getContentProps(), onClick: handleToggleDatePicker, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9780
+ const renderDateTimePickerIcon = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ...getContentProps(), onClick: handleToggleDatePicker, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9785
9781
  Icon_default,
9786
9782
  {
9787
9783
  name: type === "time" ? "clock" : "calendar",
@@ -9791,18 +9787,18 @@ var DatePicker = (0, import_react34.forwardRef)((originalProps, ref) => {
9791
9787
  }
9792
9788
  ) });
9793
9789
  const renderContentWithIcon = () => {
9794
- if (import_react34.default.isValidElement(endContent)) {
9790
+ if (import_react33.default.isValidElement(endContent)) {
9795
9791
  const existingProps = endContent.props;
9796
9792
  const mergedProps = {
9797
9793
  ...getContentProps(),
9798
9794
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
9799
9795
  };
9800
- return import_react34.default.cloneElement(endContent, mergedProps);
9796
+ return import_react33.default.cloneElement(endContent, mergedProps);
9801
9797
  } else if (errorMessage) {
9802
9798
  const iconProps = { ...getContentProps(), className: getContentProps().className };
9803
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
9799
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
9804
9800
  } else {
9805
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, {});
9801
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, {});
9806
9802
  }
9807
9803
  };
9808
9804
  const renderEndContent = () => {
@@ -9817,20 +9813,20 @@ var DatePicker = (0, import_react34.forwardRef)((originalProps, ref) => {
9817
9813
  return renderContentWithIcon();
9818
9814
  }
9819
9815
  };
9820
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
9821
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ...getBaseProps(), children: [
9822
- label && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { ...getLabelProps(), children: label }),
9823
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ...getInnerWrapperProps(), children: [
9824
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ...getInputWrapperProps(), children: [
9816
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
9817
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ...getBaseProps(), children: [
9818
+ label && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("label", { ...getLabelProps(), children: label }),
9819
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ...getInnerWrapperProps(), children: [
9820
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ...getInputWrapperProps(), children: [
9825
9821
  startContent && renderStartContent(),
9826
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("input", { ...getInputProps() }),
9822
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("input", { ...getInputProps() }),
9827
9823
  renderEndContent()
9828
9824
  ] }),
9829
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { ...getErrorMessageProps(), children: errorMessage })
9825
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { ...getErrorMessageProps(), children: errorMessage })
9830
9826
  ] })
9831
9827
  ] }),
9832
- targetRect && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: (0, import_react_dom4.createPortal)(
9833
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
9828
+ targetRect && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: (0, import_react_dom4.createPortal)(
9829
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
9834
9830
  "div",
9835
9831
  {
9836
9832
  ref: datePickerWrapperRef,
@@ -9841,7 +9837,7 @@ var DatePicker = (0, import_react34.forwardRef)((originalProps, ref) => {
9841
9837
  zIndex: 1e3
9842
9838
  },
9843
9839
  children: [
9844
- type === "date" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9840
+ type === "date" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9845
9841
  calendar_default,
9846
9842
  {
9847
9843
  color: originalProps.color,
@@ -9853,7 +9849,7 @@ var DatePicker = (0, import_react34.forwardRef)((originalProps, ref) => {
9853
9849
  }
9854
9850
  }
9855
9851
  ),
9856
- type === "time" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9852
+ type === "time" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9857
9853
  timePicker_default,
9858
9854
  {
9859
9855
  color: originalProps.color,
@@ -10003,7 +9999,7 @@ var dateTimePickerStyle = tv({
10003
9999
  });
10004
10000
 
10005
10001
  // src/components/tree/tree.tsx
10006
- var import_react35 = require("react");
10002
+ var import_react34 = require("react");
10007
10003
 
10008
10004
  // src/assets/images/cogwheel.png
10009
10005
  var cogwheel_default = "./cogwheel-U2B3CWEL.png";
@@ -10012,12 +10008,12 @@ var cogwheel_default = "./cogwheel-U2B3CWEL.png";
10012
10008
  var folder_default = "./folder-RO3QTLGS.svg";
10013
10009
 
10014
10010
  // src/components/tree/tree.tsx
10015
- var import_jsx_runtime35 = require("react/jsx-runtime");
10016
- var TreeNodeItem = (0, import_react35.forwardRef)(({ node, depth }, _ref) => {
10011
+ var import_jsx_runtime34 = require("react/jsx-runtime");
10012
+ var TreeNodeItem = (0, import_react34.forwardRef)(({ node, depth }, _ref) => {
10017
10013
  var _a;
10018
- const [isOpen, setIsOpen] = (0, import_react35.useState)(false);
10019
- const slots = (0, import_react35.useMemo)(() => treeStyle(), []);
10020
- const toggleOpen = (0, import_react35.useCallback)(() => {
10014
+ const [isOpen, setIsOpen] = (0, import_react34.useState)(false);
10015
+ const slots = (0, import_react34.useMemo)(() => treeStyle(), []);
10016
+ const toggleOpen = (0, import_react34.useCallback)(() => {
10021
10017
  setIsOpen((prev) => !prev);
10022
10018
  }, []);
10023
10019
  const handleClick = () => {
@@ -10025,32 +10021,32 @@ var TreeNodeItem = (0, import_react35.forwardRef)(({ node, depth }, _ref) => {
10025
10021
  toggleOpen();
10026
10022
  (_a2 = node.onClick) == null ? void 0 : _a2.call(node);
10027
10023
  };
10028
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: depth > 1 ? "ml-[30px]" : "", children: [
10029
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: slots.label(), onClick: handleClick, children: [
10030
- node.children && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10024
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: depth > 1 ? "ml-[30px]" : "", children: [
10025
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: slots.label(), onClick: handleClick, children: [
10026
+ node.children && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10031
10027
  Icon_default,
10032
10028
  {
10033
10029
  name: "right-chevron",
10034
10030
  className: `text-neutral-main transition-transform duration-150 ${isOpen ? "rotate-90" : "rotate-0"}`
10035
10031
  }
10036
10032
  ),
10037
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("img", { src: folder_default, alt: "folder", width: 25, height: 25 }),
10033
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { src: folder_default, alt: "folder", width: 25, height: 25 }),
10038
10034
  node.label
10039
10035
  ] }),
10040
- isOpen && ((_a = node.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TreeNodeItem, { node: child, depth: depth + 1 }, child.id)))
10036
+ isOpen && ((_a = node.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TreeNodeItem, { node: child, depth: depth + 1 }, child.id)))
10041
10037
  ] });
10042
10038
  });
10043
- var Tree = (0, import_react35.forwardRef)(({ headerContent, group }, ref) => {
10039
+ var Tree = (0, import_react34.forwardRef)(({ headerContent, group }, ref) => {
10044
10040
  const { label, data, onClick } = group;
10045
- const slots = (0, import_react35.useMemo)(() => treeStyle(), []);
10046
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: slots.base(), ref, children: [
10047
- headerContent && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: headerContent }),
10048
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { children: [
10049
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: slots.label(), onClick, children: [
10050
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("img", { src: cogwheel_default, alt: "cogwheel", width: 25, height: 25 }),
10041
+ const slots = (0, import_react34.useMemo)(() => treeStyle(), []);
10042
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: slots.base(), ref, children: [
10043
+ headerContent && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: headerContent }),
10044
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
10045
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: slots.label(), onClick, children: [
10046
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { src: cogwheel_default, alt: "cogwheel", width: 25, height: 25 }),
10051
10047
  label
10052
10048
  ] }),
10053
- data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TreeNodeItem, { node, depth: 1 }, node.id))
10049
+ data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TreeNodeItem, { node, depth: 1 }, node.id))
10054
10050
  ] })
10055
10051
  ] });
10056
10052
  });