@tipp/ui 1.4.15 → 1.4.17

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 (72) hide show
  1. package/dist/atoms/index.cjs +130 -97
  2. package/dist/atoms/index.cjs.map +1 -1
  3. package/dist/atoms/index.d.cts +3 -1
  4. package/dist/atoms/index.d.ts +3 -1
  5. package/dist/atoms/index.js +32 -32
  6. package/dist/atoms/pagination.js +2 -2
  7. package/dist/atoms/text-area.cjs +47 -1
  8. package/dist/atoms/text-area.cjs.map +1 -1
  9. package/dist/atoms/text-area.d.cts +11 -1
  10. package/dist/atoms/text-area.d.ts +11 -1
  11. package/dist/atoms/text-area.js +1 -1
  12. package/dist/atoms/text-field.cjs +43 -1
  13. package/dist/atoms/text-field.cjs.map +1 -1
  14. package/dist/atoms/text-field.d.cts +15 -1
  15. package/dist/atoms/text-field.d.ts +15 -1
  16. package/dist/atoms/text-field.js +1 -1
  17. package/dist/chunk-2LJ7CD62.js +340 -0
  18. package/dist/chunk-2LJ7CD62.js.map +1 -0
  19. package/dist/chunk-3ADRZ7OH.js +27 -0
  20. package/dist/chunk-3ADRZ7OH.js.map +1 -0
  21. package/dist/chunk-3KFECMWE.js +97 -0
  22. package/dist/chunk-3KFECMWE.js.map +1 -0
  23. package/dist/chunk-7UNNTQPU.js +28 -0
  24. package/dist/chunk-7UNNTQPU.js.map +1 -0
  25. package/dist/chunk-AP2MXJOW.js +164 -0
  26. package/dist/chunk-AP2MXJOW.js.map +1 -0
  27. package/dist/chunk-CJDUEQIT.js +169 -0
  28. package/dist/chunk-CJDUEQIT.js.map +1 -0
  29. package/dist/chunk-DDBXZ3IQ.js +28 -0
  30. package/dist/chunk-DDBXZ3IQ.js.map +1 -0
  31. package/dist/chunk-EXC5RUGV.js +20 -0
  32. package/dist/chunk-EXC5RUGV.js.map +1 -0
  33. package/dist/chunk-EZEZH6DF.js +29 -0
  34. package/dist/chunk-EZEZH6DF.js.map +1 -0
  35. package/dist/chunk-GJ6NEBI5.js +340 -0
  36. package/dist/chunk-GJ6NEBI5.js.map +1 -0
  37. package/dist/chunk-KQDTZZMT.js +29 -0
  38. package/dist/chunk-KQDTZZMT.js.map +1 -0
  39. package/dist/chunk-LZYIGZTE.js +164 -0
  40. package/dist/chunk-LZYIGZTE.js.map +1 -0
  41. package/dist/chunk-R4JVUEWZ.js +32 -0
  42. package/dist/chunk-R4JVUEWZ.js.map +1 -0
  43. package/dist/chunk-RJIYLM7M.js +32 -0
  44. package/dist/chunk-RJIYLM7M.js.map +1 -0
  45. package/dist/chunk-RT5L7IEL.js +29 -0
  46. package/dist/chunk-RT5L7IEL.js.map +1 -0
  47. package/dist/chunk-SHFRE4AI.js +340 -0
  48. package/dist/chunk-SHFRE4AI.js.map +1 -0
  49. package/dist/chunk-TTYPIX4R.js +32 -0
  50. package/dist/chunk-TTYPIX4R.js.map +1 -0
  51. package/dist/chunk-VIXDNPET.js +28 -0
  52. package/dist/chunk-VIXDNPET.js.map +1 -0
  53. package/dist/chunk-YY45YYJE.js +28 -0
  54. package/dist/chunk-YY45YYJE.js.map +1 -0
  55. package/dist/index.cjs +287 -254
  56. package/dist/index.cjs.map +1 -1
  57. package/dist/index.d.cts +3 -1
  58. package/dist/index.d.ts +3 -1
  59. package/dist/index.js +62 -62
  60. package/dist/molecules/date-picker/index.js +3 -3
  61. package/dist/molecules/expand-table/index.js +18 -18
  62. package/dist/molecules/expand-table/row.js +15 -15
  63. package/dist/molecules/form.d.cts +1 -1
  64. package/dist/molecules/form.d.ts +1 -1
  65. package/dist/molecules/index.js +24 -24
  66. package/dist/molecules/learning-post.js +5 -5
  67. package/dist/molecules/navigation.js +16 -16
  68. package/dist/molecules/stepper.js +2 -2
  69. package/dist/molecules/tag-selector.js +16 -16
  70. package/package.json +3 -3
  71. package/src/atoms/text-area.tsx +32 -1
  72. package/src/atoms/text-field.tsx +29 -1
@@ -99,7 +99,7 @@ __export(atoms_exports, {
99
99
  Radio: () => import_themes32.Radio,
100
100
  RadioCards: () => import_themes33.RadioCards,
101
101
  RadioGroup: () => import_themes34.RadioGroup,
102
- Root: () => Root4,
102
+ Root: () => Root5,
103
103
  ScrollArea: () => import_themes35.ScrollArea,
104
104
  Section: () => import_themes36.Section,
105
105
  SegmentedControl: () => import_themes37.SegmentedControl,
@@ -111,8 +111,8 @@ __export(atoms_exports, {
111
111
  Switch: () => import_themes42.Switch,
112
112
  TabNav: () => import_themes43.TabNav,
113
113
  Tabs: () => import_themes44.Tabs,
114
- TextArea: () => import_themes45.TextArea,
115
- TextField: () => import_themes47.TextField,
114
+ TextArea: () => TextArea,
115
+ TextField: () => TextField,
116
116
  ToastContainer: () => ToastContainer,
117
117
  Tooltip: () => import_themes48.Tooltip,
118
118
  Trigger: () => Trigger4,
@@ -600,15 +600,32 @@ var import_themes44 = require("@radix-ui/themes");
600
600
 
601
601
  // src/atoms/text-area.tsx
602
602
  var import_themes45 = require("@radix-ui/themes");
603
+ var import_react12 = require("react");
604
+ var import_jsx_runtime12 = require("react/jsx-runtime");
605
+ var TextArea = (0, import_react12.forwardRef)(
606
+ (props, ref) => {
607
+ const _a = props, { error, style } = _a, rest = __objRest(_a, ["error", "style"]);
608
+ const fieldStyle = (0, import_react12.useMemo)(() => {
609
+ if (!style && !error)
610
+ return void 0;
611
+ const errorStyle = error ? {
612
+ boxShadow: "inset 0 0 0 var(--text-area-border-width) var(--error-11)"
613
+ } : {};
614
+ return __spreadValues(__spreadValues({}, style || {}), errorStyle);
615
+ }, [error, style]);
616
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_themes45.TextArea, __spreadProps(__spreadValues({}, rest), { ref, style: fieldStyle }));
617
+ }
618
+ );
619
+ TextArea.displayName = "TextArea";
603
620
 
604
621
  // src/atoms/typo.tsx
605
622
  var import_themes46 = require("@radix-ui/themes");
606
- var import_react12 = require("react");
607
- var import_jsx_runtime12 = require("react/jsx-runtime");
608
- var Typo = (0, import_react12.forwardRef)(
623
+ var import_react13 = require("react");
624
+ var import_jsx_runtime13 = require("react/jsx-runtime");
625
+ var Typo = (0, import_react13.forwardRef)(
609
626
  (props, ref) => {
610
627
  const _a = props, { size, variant, children } = _a, rest = __objRest(_a, ["size", "variant", "children"]);
611
- const radixSize = (0, import_react12.useMemo)(() => {
628
+ const radixSize = (0, import_react13.useMemo)(() => {
612
629
  if (size !== void 0)
613
630
  return size;
614
631
  switch (variant) {
@@ -621,54 +638,70 @@ var Typo = (0, import_react12.forwardRef)(
621
638
  return "2";
622
639
  }
623
640
  }, [size, variant]);
624
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_themes46.Text, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize, children }));
641
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_themes46.Text, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize, children }));
625
642
  }
626
643
  );
627
644
  Typo.displayName = "Typo";
628
645
 
629
646
  // src/atoms/text-field.tsx
630
647
  var import_themes47 = require("@radix-ui/themes");
648
+ var import_react14 = require("react");
649
+ var import_jsx_runtime14 = require("react/jsx-runtime");
650
+ var Root3 = (0, import_react14.forwardRef)((props, ref) => {
651
+ const _a = props, { error, style } = _a, rest = __objRest(_a, ["error", "style"]);
652
+ const fieldStyle = (0, import_react14.useMemo)(() => {
653
+ if (!style && !error)
654
+ return void 0;
655
+ const errorStyle = {
656
+ boxShadow: "inset 0 0 0 var(--text-field-border-width) var(--error-11)"
657
+ };
658
+ return __spreadValues(__spreadValues({}, style || {}), errorStyle);
659
+ }, [error, style]);
660
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_themes47.TextField.Root, __spreadValues({ ref, style: fieldStyle }, rest));
661
+ });
662
+ Root3.displayName = "TextField.Root";
663
+ var TextField = { Root: Root3, Slot: import_themes47.TextField.Slot };
631
664
 
632
665
  // src/atoms/tooltip.tsx
633
666
  var import_themes48 = require("@radix-ui/themes");
634
667
 
635
668
  // src/atoms/collapse.tsx
636
- var import_react13 = require("react");
637
- var import_jsx_runtime13 = require("react/jsx-runtime");
669
+ var import_react15 = require("react");
670
+ var import_jsx_runtime15 = require("react/jsx-runtime");
638
671
  function Collapse(props) {
639
672
  const { children, closedHeight = "0" } = props;
640
- const [open, setOpen] = (0, import_react13.useState)(() => {
673
+ const [open, setOpen] = (0, import_react15.useState)(() => {
641
674
  return props.open || props.defaultOpen || false;
642
675
  });
643
- (0, import_react13.useEffect)(() => {
676
+ (0, import_react15.useEffect)(() => {
644
677
  if (props.open === void 0)
645
678
  return;
646
679
  setOpen(props.open);
647
680
  }, [props.open]);
648
- const ref = (0, import_react13.useRef)(null);
649
- (0, import_react13.useEffect)(() => {
681
+ const ref = (0, import_react15.useRef)(null);
682
+ (0, import_react15.useEffect)(() => {
650
683
  if (!ref.current)
651
684
  return;
652
685
  ref.current.style.maxHeight = open ? `${ref.current.scrollHeight}px` : closedHeight;
653
686
  }, [closedHeight, open]);
654
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "tipp-collapse", ref, children });
687
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "tipp-collapse", ref, children });
655
688
  }
656
689
 
657
690
  // src/atoms/spinner.tsx
658
691
  var import_themes49 = require("@radix-ui/themes");
659
692
 
660
693
  // src/atoms/pagination.tsx
661
- var import_react14 = require("react");
694
+ var import_react16 = require("react");
662
695
 
663
696
  // src/icon.ts
664
697
  var import_react_icons2 = require("@radix-ui/react-icons");
665
698
 
666
699
  // src/atoms/pagination.tsx
667
- var import_jsx_runtime14 = require("react/jsx-runtime");
700
+ var import_jsx_runtime16 = require("react/jsx-runtime");
668
701
  function Pagination(props) {
669
702
  const { onChange, count = 0, siblingCount = 2 } = props;
670
- const [page, setPage] = (0, import_react14.useState)(() => props.page || props.defaultPage || 1);
671
- const visibleItems = (0, import_react14.useMemo)(() => {
703
+ const [page, setPage] = (0, import_react16.useState)(() => props.page || props.defaultPage || 1);
704
+ const visibleItems = (0, import_react16.useMemo)(() => {
672
705
  let start = Math.max(1, page - siblingCount);
673
706
  let end = Math.min(count, page + siblingCount);
674
707
  if (page - siblingCount <= 0 && end < count) {
@@ -678,37 +711,37 @@ function Pagination(props) {
678
711
  }
679
712
  return Array.from({ length: end - start + 1 }, (_, i) => i + start);
680
713
  }, [count, page, siblingCount]);
681
- (0, import_react14.useEffect)(() => {
714
+ (0, import_react16.useEffect)(() => {
682
715
  onChange == null ? void 0 : onChange(page);
683
716
  }, [onChange, page]);
684
- (0, import_react14.useEffect)(() => {
717
+ (0, import_react16.useEffect)(() => {
685
718
  if (props.page) {
686
719
  setPage(props.page);
687
720
  }
688
721
  }, [props.page]);
689
- const prev = (0, import_react14.useMemo)(() => {
722
+ const prev = (0, import_react16.useMemo)(() => {
690
723
  const p = page - 1;
691
724
  return p < 1 ? void 0 : p;
692
725
  }, [page]);
693
- const next = (0, import_react14.useMemo)(() => {
726
+ const next = (0, import_react16.useMemo)(() => {
694
727
  const n = page + 1;
695
728
  return n > count ? void 0 : n;
696
729
  }, [count, page]);
697
- const onClickPrev = (0, import_react14.useCallback)(() => {
730
+ const onClickPrev = (0, import_react16.useCallback)(() => {
698
731
  prev && setPage(prev);
699
732
  }, [prev]);
700
- const onClickNext = (0, import_react14.useCallback)(() => {
733
+ const onClickNext = (0, import_react16.useCallback)(() => {
701
734
  next && setPage(next);
702
735
  }, [next]);
703
- const doublePrev = (0, import_react14.useMemo)(() => {
736
+ const doublePrev = (0, import_react16.useMemo)(() => {
704
737
  if (!visibleItems.length)
705
738
  return;
706
739
  return Math.max(0, visibleItems[0] - 1);
707
740
  }, [visibleItems]);
708
- const onClickDoublePrev = (0, import_react14.useCallback)(() => {
741
+ const onClickDoublePrev = (0, import_react16.useCallback)(() => {
709
742
  doublePrev && setPage(doublePrev);
710
743
  }, [doublePrev]);
711
- const doubleNext = (0, import_react14.useMemo)(() => {
744
+ const doubleNext = (0, import_react16.useMemo)(() => {
712
745
  if (!visibleItems.length)
713
746
  return;
714
747
  const n = visibleItems[visibleItems.length - 1] + 1;
@@ -716,7 +749,7 @@ function Pagination(props) {
716
749
  return;
717
750
  return Math.min(count, n);
718
751
  }, [count, visibleItems]);
719
- const onClickDoubleNext = (0, import_react14.useCallback)(() => {
752
+ const onClickDoubleNext = (0, import_react16.useCallback)(() => {
720
753
  doubleNext && setPage(doubleNext);
721
754
  }, [doubleNext]);
722
755
  const iconSize = {
@@ -728,19 +761,19 @@ function Pagination(props) {
728
761
  size: "3",
729
762
  style: { borderRadius: "50%" }
730
763
  };
731
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_themes19.Flex, { align: "center", className: "tipp-pagination", gap: "4", children: [
732
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
764
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_themes19.Flex, { align: "center", className: "tipp-pagination", gap: "4", children: [
765
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
733
766
  import_themes24.IconButton,
734
767
  __spreadProps(__spreadValues({
735
768
  disabled: !doublePrev,
736
769
  onClick: onClickDoublePrev
737
770
  }, moveButtonProps), {
738
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_icons2.DoubleArrowLeftIcon, __spreadValues({}, iconSize))
771
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons2.DoubleArrowLeftIcon, __spreadValues({}, iconSize))
739
772
  })
740
773
  ),
741
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_themes24.IconButton, __spreadProps(__spreadValues({ disabled: !prev, onClick: onClickPrev }, moveButtonProps), { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_icons2.ChevronLeftIcon, __spreadValues({}, iconSize)) })),
742
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_themes19.Flex, { gap: "1", children: visibleItems.map((item) => {
743
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
774
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_themes24.IconButton, __spreadProps(__spreadValues({ disabled: !prev, onClick: onClickPrev }, moveButtonProps), { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons2.ChevronLeftIcon, __spreadValues({}, iconSize)) })),
775
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_themes19.Flex, { gap: "1", children: visibleItems.map((item) => {
776
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
744
777
  "button",
745
778
  {
746
779
  className: `page-button ${item === page ? "active" : ""}`,
@@ -748,46 +781,46 @@ function Pagination(props) {
748
781
  setPage(item);
749
782
  },
750
783
  type: "button",
751
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Typo, { variant: "body", children: item })
784
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Typo, { variant: "body", children: item })
752
785
  },
753
786
  item
754
787
  );
755
788
  }) }),
756
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_themes24.IconButton, __spreadProps(__spreadValues({ disabled: !next, onClick: onClickNext }, moveButtonProps), { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_icons2.ChevronRightIcon, __spreadValues({}, iconSize)) })),
757
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
789
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_themes24.IconButton, __spreadProps(__spreadValues({ disabled: !next, onClick: onClickNext }, moveButtonProps), { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons2.ChevronRightIcon, __spreadValues({}, iconSize)) })),
790
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
758
791
  import_themes24.IconButton,
759
792
  __spreadProps(__spreadValues({
760
793
  disabled: !doubleNext,
761
794
  onClick: onClickDoubleNext
762
795
  }, moveButtonProps), {
763
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_icons2.DoubleArrowRightIcon, __spreadValues({}, iconSize))
796
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_icons2.DoubleArrowRightIcon, __spreadValues({}, iconSize))
764
797
  })
765
798
  )
766
799
  ] });
767
800
  }
768
801
 
769
802
  // src/atoms/field-error-wrapper.tsx
770
- var import_jsx_runtime15 = require("react/jsx-runtime");
803
+ var import_jsx_runtime17 = require("react/jsx-runtime");
771
804
  function FieldErrorWrapper({
772
805
  children,
773
806
  error
774
807
  }) {
775
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_themes19.Flex, { direction: "column", gap: "1", children: [
808
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_themes19.Flex, { direction: "column", gap: "1", children: [
776
809
  children,
777
- error ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Typo, { color: "red", variant: "caption", children: error }) : null
810
+ error ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Typo, { color: "red", variant: "caption", children: error }) : null
778
811
  ] });
779
812
  }
780
813
 
781
814
  // src/atoms/ellipsis-tooltip.tsx
782
- var import_react15 = require("react");
783
- var import_jsx_runtime16 = require("react/jsx-runtime");
815
+ var import_react17 = require("react");
816
+ var import_jsx_runtime18 = require("react/jsx-runtime");
784
817
  function EllipsisTooltip(props) {
785
818
  const _a = props, { children, style, lineClamp = 2 } = _a, rest = __objRest(_a, ["children", "style", "lineClamp"]);
786
- const ref = (0, import_react15.useRef)(null);
787
- const [tooltipDisplay, setTooltipDisplay] = (0, import_react15.useState)(
819
+ const ref = (0, import_react17.useRef)(null);
820
+ const [tooltipDisplay, setTooltipDisplay] = (0, import_react17.useState)(
788
821
  "none"
789
822
  );
790
- (0, import_react15.useEffect)(() => {
823
+ (0, import_react17.useEffect)(() => {
791
824
  if (ref.current) {
792
825
  const typo = ref.current;
793
826
  const mouseOver = () => {
@@ -802,7 +835,7 @@ function EllipsisTooltip(props) {
802
835
  ref.current.addEventListener("mouseleave", mouseOut);
803
836
  }
804
837
  }, [children]);
805
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_themes48.Tooltip, { content: children, style: { display: tooltipDisplay }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
838
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes48.Tooltip, { content: children, style: { display: tooltipDisplay }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
806
839
  Typo,
807
840
  __spreadProps(__spreadValues({}, rest), {
808
841
  ref,
@@ -821,28 +854,28 @@ function EllipsisTooltip(props) {
821
854
  }
822
855
 
823
856
  // src/atoms/drawer.tsx
824
- var import_react16 = require("react");
857
+ var import_react18 = require("react");
825
858
  var Dialog2 = __toESM(require("@radix-ui/react-dialog"), 1);
826
859
  var import_react_icons3 = require("@radix-ui/react-icons");
827
- var import_jsx_runtime17 = require("react/jsx-runtime");
828
- function Root4(props) {
829
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog2.Root, __spreadValues({}, props));
860
+ var import_jsx_runtime19 = require("react/jsx-runtime");
861
+ function Root5(props) {
862
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog2.Root, __spreadValues({}, props));
830
863
  }
831
864
  function Content6(props) {
832
865
  const _a = props, { position = "right", className, children } = _a, rest = __objRest(_a, ["position", "className", "children"]);
833
- const containerRef = (0, import_react16.useRef)(null);
834
- (0, import_react16.useEffect)(() => {
866
+ const containerRef = (0, import_react18.useRef)(null);
867
+ (0, import_react18.useEffect)(() => {
835
868
  containerRef.current = document.getElementsByClassName("radix-themes")[0];
836
869
  }, []);
837
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Dialog2.Portal, { container: containerRef.current, children: [
838
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog2.Overlay, { className: "DrawerOverlay" }),
839
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
870
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Dialog2.Portal, { container: containerRef.current, children: [
871
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog2.Overlay, { className: "DrawerOverlay" }),
872
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
840
873
  Dialog2.Content,
841
874
  __spreadProps(__spreadValues({
842
875
  className: `DrawerContent ${position} ${className || ""}`
843
876
  }, rest), {
844
877
  children: [
845
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_themes6.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog2.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Button, { color: "gray", variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_icons3.Cross1Icon, { height: "18px", width: "18px" }) }) }) }),
878
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_themes6.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog2.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { color: "gray", variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_icons3.Cross1Icon, { height: "18px", width: "18px" }) }) }) }),
846
879
  children
847
880
  ]
848
881
  })
@@ -850,7 +883,7 @@ function Content6(props) {
850
883
  ] });
851
884
  }
852
885
  function Trigger4(props) {
853
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog2.Trigger, __spreadValues({ asChild: true }, props));
886
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog2.Trigger, __spreadValues({ asChild: true }, props));
854
887
  }
855
888
  var Drawer = {
856
889
  Root: Dialog2.Root,
@@ -865,12 +898,12 @@ var Drawer = {
865
898
  var import_react_icons4 = require("@radix-ui/react-icons");
866
899
  var import_react_toastify = require("react-toastify");
867
900
  var import_react_toastify2 = require("react-toastify");
868
- var import_jsx_runtime18 = require("react/jsx-runtime");
901
+ var import_jsx_runtime20 = require("react/jsx-runtime");
869
902
  function CloseButton() {
870
903
  return null;
871
904
  }
872
905
  function ToastContainer(props) {
873
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
906
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
874
907
  import_react_toastify.ToastContainer,
875
908
  __spreadValues({
876
909
  autoClose: 5e3,
@@ -878,7 +911,7 @@ function ToastContainer(props) {
878
911
  closeOnClick: true,
879
912
  draggable: true,
880
913
  hideProgressBar: true,
881
- icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_icons4.InfoCircledIcon, {}),
914
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_icons4.InfoCircledIcon, {}),
882
915
  newestOnTop: true,
883
916
  pauseOnFocusLoss: true,
884
917
  pauseOnHover: true,
@@ -891,12 +924,12 @@ function ToastContainer(props) {
891
924
 
892
925
  // src/molecules/form.tsx
893
926
  var RadixForm = __toESM(require("@radix-ui/react-form"), 1);
894
- var import_react17 = require("react");
895
- var import_jsx_runtime19 = require("react/jsx-runtime");
896
- var Root6 = (0, import_react17.forwardRef)(
927
+ var import_react19 = require("react");
928
+ var import_jsx_runtime21 = require("react/jsx-runtime");
929
+ var Root7 = (0, import_react19.forwardRef)(
897
930
  (_a, ref) => {
898
931
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
899
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
932
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
900
933
  RadixForm.Root,
901
934
  __spreadProps(__spreadValues({}, rest), {
902
935
  className: `FormRoot ${className || ""}`,
@@ -906,67 +939,67 @@ var Root6 = (0, import_react17.forwardRef)(
906
939
  );
907
940
  }
908
941
  );
909
- Root6.displayName = "FORM_ROOT";
910
- var FieldContext = (0, import_react17.createContext)({
942
+ Root7.displayName = "FORM_ROOT";
943
+ var FieldContext = (0, import_react19.createContext)({
911
944
  name: ""
912
945
  });
913
- var Field2 = (0, import_react17.forwardRef)(
946
+ var Field2 = (0, import_react19.forwardRef)(
914
947
  (_a, ref) => {
915
948
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
916
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
949
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
917
950
  RadixForm.Field,
918
951
  __spreadProps(__spreadValues({}, rest), {
919
952
  className: `FormField ${className || ""}`,
920
953
  ref,
921
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FieldContext.Provider, { value: rest, children })
954
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FieldContext.Provider, { value: rest, children })
922
955
  })
923
956
  );
924
957
  }
925
958
  );
926
959
  Field2.displayName = "FORM_FIELD";
927
960
  function HeadingLabel(props) {
928
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Heading2, __spreadProps(__spreadValues({ variant: "heading5" }, props), { children: props.children }));
961
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Heading2, __spreadProps(__spreadValues({ variant: "heading5" }, props), { children: props.children }));
929
962
  }
930
- var Label2 = (0, import_react17.forwardRef)(
963
+ var Label2 = (0, import_react19.forwardRef)(
931
964
  (_a, ref) => {
932
965
  var _b = _a, { children, className, variant = "body" } = _b, rest = __objRest(_b, ["children", "className", "variant"]);
933
966
  const Comp = variant === "title" ? HeadingLabel : Typo;
934
- const fieldProps = (0, import_react17.useContext)(FieldContext);
935
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
967
+ const fieldProps = (0, import_react19.useContext)(FieldContext);
968
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
936
969
  RadixForm.Label,
937
970
  __spreadProps(__spreadValues({}, rest), {
938
971
  asChild: true,
939
972
  className: `FormLabel ${className || ""}`,
940
973
  ref,
941
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Comp, { children: [
974
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Comp, { children: [
942
975
  children,
943
- fieldProps.required ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Typo, { as: "span", color: "tomato", children: ` *` }) : null
976
+ fieldProps.required ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Typo, { as: "span", color: "tomato", children: ` *` }) : null
944
977
  ] })
945
978
  })
946
979
  );
947
980
  }
948
981
  );
949
982
  Label2.displayName = "FORM_Label";
950
- var Message2 = (0, import_react17.forwardRef)(
983
+ var Message2 = (0, import_react19.forwardRef)(
951
984
  (_a, ref) => {
952
985
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
953
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
986
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
954
987
  RadixForm.Message,
955
988
  __spreadProps(__spreadValues({}, rest), {
956
989
  asChild: true,
957
990
  className: `FormMessage ${className || ""}`,
958
991
  ref,
959
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Typo, { color: "red", children })
992
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Typo, { color: "red", children })
960
993
  })
961
994
  );
962
995
  }
963
996
  );
964
997
  Message2.displayName = "FORM_Message";
965
- var Control2 = (0, import_react17.forwardRef)(
998
+ var Control2 = (0, import_react19.forwardRef)(
966
999
  (_a, ref) => {
967
1000
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
968
- const fieldProps = (0, import_react17.useContext)(FieldContext);
969
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1001
+ const fieldProps = (0, import_react19.useContext)(FieldContext);
1002
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
970
1003
  RadixForm.Control,
971
1004
  __spreadProps(__spreadValues({}, rest), {
972
1005
  className: `FormControl ${className || ""}`,
@@ -978,7 +1011,7 @@ var Control2 = (0, import_react17.forwardRef)(
978
1011
  );
979
1012
  Control2.displayName = "FORM_Control";
980
1013
  var Form = {
981
- Root: Root6,
1014
+ Root: Root7,
982
1015
  Field: Field2,
983
1016
  Label: Label2,
984
1017
  Message: Message2,
@@ -987,33 +1020,33 @@ var Form = {
987
1020
  };
988
1021
 
989
1022
  // src/atoms/auto-sizing-input.tsx
990
- var import_react18 = require("react");
991
- var import_jsx_runtime20 = require("react/jsx-runtime");
992
- var AutoSizingInput = (0, import_react18.forwardRef)(
1023
+ var import_react20 = require("react");
1024
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1025
+ var AutoSizingInput = (0, import_react20.forwardRef)(
993
1026
  (_a, ref) => {
994
1027
  var _b = _a, { value: _value, onChangeValue, onChange } = _b, rest = __objRest(_b, ["value", "onChangeValue", "onChange"]);
995
- const [value, setValue] = (0, import_react18.useState)(_value);
996
- const [width, setWidth] = (0, import_react18.useState)(0);
997
- const span = (0, import_react18.useRef)(null);
998
- (0, import_react18.useEffect)(() => {
1028
+ const [value, setValue] = (0, import_react20.useState)(_value);
1029
+ const [width, setWidth] = (0, import_react20.useState)(0);
1030
+ const span = (0, import_react20.useRef)(null);
1031
+ (0, import_react20.useEffect)(() => {
999
1032
  span.current && setWidth(span.current.offsetWidth);
1000
1033
  }, [value]);
1001
- const changeHandler = (0, import_react18.useCallback)(
1034
+ const changeHandler = (0, import_react20.useCallback)(
1002
1035
  (evt) => {
1003
1036
  onChange == null ? void 0 : onChange(evt);
1004
1037
  setValue(evt.target.value);
1005
1038
  },
1006
1039
  [onChange]
1007
1040
  );
1008
- (0, import_react18.useEffect)(() => {
1041
+ (0, import_react20.useEffect)(() => {
1009
1042
  setValue(_value || "");
1010
1043
  }, [_value]);
1011
- (0, import_react18.useEffect)(() => {
1044
+ (0, import_react20.useEffect)(() => {
1012
1045
  onChangeValue == null ? void 0 : onChangeValue(value || "");
1013
1046
  }, [value, onChangeValue]);
1014
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "auto-sizing-input wrapper", style: { width: width + 24 }, children: [
1015
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("input", __spreadValues({ onChange: changeHandler, ref, value }, rest)),
1016
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { "aria-hidden": "true", ref: span, children: value })
1047
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "auto-sizing-input wrapper", style: { width: width + 24 }, children: [
1048
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("input", __spreadValues({ onChange: changeHandler, ref, value }, rest)),
1049
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { "aria-hidden": "true", ref: span, children: value })
1017
1050
  ] });
1018
1051
  }
1019
1052
  );