@clickpalm/react 1.1.1 → 1.2.0

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.
package/dist/index.js CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.tsx
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
+ Accordion: () => Accordion2,
33
34
  Avatar: () => Avatar2,
34
35
  Box: () => Box,
35
36
  Button: () => Button,
@@ -37,6 +38,9 @@ __export(src_exports, {
37
38
  Carousel: () => Carousel,
38
39
  Checkbox: () => Checkbox2,
39
40
  Datepicker: () => Datepicker,
41
+ Dropdown: () => Dropdown,
42
+ DropdownItem: () => DropdownItem,
43
+ DropdownSeparator: () => DropdownSeparator,
40
44
  Heading: () => Heading,
41
45
  Hr: () => Hr,
42
46
  Icon: () => Icon,
@@ -2440,8 +2444,110 @@ var MaskedInput = (0, import_react12.forwardRef)(
2440
2444
  );
2441
2445
  MaskedInput.displayName = "MaskedInput";
2442
2446
 
2443
- // src/components/Box.tsx
2447
+ // src/components/Dropdown/index.tsx
2448
+ var import_react13 = require("react");
2449
+ var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"));
2450
+
2451
+ // src/components/Dropdown/styles.ts
2452
+ var DropdownMenu = __toESM(require("@radix-ui/react-dropdown-menu"));
2453
+ var slideUpAndFade2 = keyframes({
2454
+ "0%": { opacity: 0, transform: "translateY(2px)" },
2455
+ "100%": { opacity: 1, transform: "translateY(0)" }
2456
+ });
2457
+ var slideRightAndFade2 = keyframes({
2458
+ "0%": { opacity: 0, transform: "translateX(-2px)" },
2459
+ "100%": { opacity: 1, transform: "translateX(0)" }
2460
+ });
2461
+ var slideDownAndFade2 = keyframes({
2462
+ "0%": { opacity: 0, transform: "translateY(-2px)" },
2463
+ "100%": { opacity: 1, transform: "translateY(0)" }
2464
+ });
2465
+ var slideLeftAndFade2 = keyframes({
2466
+ "0%": { opacity: 0, transform: "translateX(2px)" },
2467
+ "100%": { opacity: 1, transform: "translateX(0)" }
2468
+ });
2469
+ var StyledContent2 = styled(DropdownMenu.Content, {
2470
+ minWidth: 100,
2471
+ backgroundColor: "$white",
2472
+ borderRadius: "$md",
2473
+ padding: "$2",
2474
+ boxShadow: "0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)",
2475
+ animationDuration: "400ms",
2476
+ animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
2477
+ willChange: "transform, opacity",
2478
+ '&[data-state="open"]': {
2479
+ '&[data-side="top"]': { animationName: slideDownAndFade2 },
2480
+ '&[data-side="right"]': { animationName: slideLeftAndFade2 },
2481
+ '&[data-side="bottom"]': { animationName: slideUpAndFade2 },
2482
+ '&[data-side="left"]': { animationName: slideRightAndFade2 }
2483
+ }
2484
+ });
2485
+ var itemStyles = {
2486
+ all: "unset",
2487
+ fontSize: "$sm",
2488
+ lineHeight: 1,
2489
+ color: "$black",
2490
+ borderRadius: "$sm",
2491
+ display: "flex",
2492
+ alignItems: "center",
2493
+ height: 25,
2494
+ padding: "0 $2",
2495
+ position: "relative",
2496
+ paddingLeft: "$5",
2497
+ userSelect: "none",
2498
+ "&[data-disabled]": {
2499
+ color: "$gray_mid",
2500
+ pointerEvents: "none"
2501
+ },
2502
+ "&[data-highlighted]": {
2503
+ color: "$clickpalm_light",
2504
+ cursor: "pointer"
2505
+ },
2506
+ button: {
2507
+ all: "unset",
2508
+ width: "100%",
2509
+ textAlign: "left"
2510
+ }
2511
+ };
2512
+ var StyledItem2 = styled(DropdownMenu.Item, { ...itemStyles });
2513
+ var StyledSeparator = styled(DropdownMenu.Separator, {
2514
+ height: "1px",
2515
+ backgroundColor: "$gray_light",
2516
+ margin: "$2"
2517
+ });
2518
+ var IconButton = styled("button", {
2519
+ all: "unset",
2520
+ fontFamily: "inherit",
2521
+ borderRadius: "100%",
2522
+ height: 35,
2523
+ width: 35,
2524
+ display: "inline-flex",
2525
+ alignItems: "center",
2526
+ justifyContent: "center",
2527
+ color: "$clickpalm_light",
2528
+ backgroundColor: "transparent"
2529
+ });
2530
+
2531
+ // src/components/Dropdown/index.tsx
2444
2532
  var import_jsx_runtime32 = require("react/jsx-runtime");
2533
+ var Dropdown = ({ children }) => {
2534
+ const childrenArray = import_react13.Children.toArray(children);
2535
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DropdownMenu2.Root, { children: [
2536
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { name: "Dots", size: 16 }) }) }),
2537
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StyledContent2, { sideOffset: 5, align: "end", children: childrenArray.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react13.Fragment, { children: [
2538
+ child,
2539
+ index < childrenArray.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownSeparator, {})
2540
+ ] }, index)) }) })
2541
+ ] });
2542
+ };
2543
+ var DropdownItem = StyledItem2;
2544
+ var DropdownSeparator = StyledSeparator;
2545
+ Dropdown.displayName = "Dropdown";
2546
+ DropdownItem.displayName = "DropdownItem";
2547
+ DropdownSeparator.displayName = "DropdownSeparator";
2548
+
2549
+ // src/components/Box.tsx
2550
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2445
2551
  var StyledBox = styled("div", {
2446
2552
  padding: "$5",
2447
2553
  borderRadius: "$md",
@@ -2463,12 +2569,12 @@ var StyledBox = styled("div", {
2463
2569
  }
2464
2570
  });
2465
2571
  var Box = (props) => {
2466
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StyledBox, { ...props });
2572
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StyledBox, { ...props });
2467
2573
  };
2468
2574
  Box.displayName = "Box";
2469
2575
 
2470
2576
  // src/components/Paragraph.tsx
2471
- var import_jsx_runtime33 = require("react/jsx-runtime");
2577
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2472
2578
  var StyledParagraph = styled("p", {
2473
2579
  fontFamily: "$default",
2474
2580
  lineHeight: "$short",
@@ -2509,13 +2615,13 @@ var StyledParagraph = styled("p", {
2509
2615
  }
2510
2616
  });
2511
2617
  var Paragraph = (props) => {
2512
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StyledParagraph, { ...props });
2618
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StyledParagraph, { ...props });
2513
2619
  };
2514
2620
  Paragraph.displayName = "Paragraph";
2515
2621
 
2516
2622
  // src/components/Heading.tsx
2517
- var import_react13 = require("react");
2518
- var import_jsx_runtime34 = require("react/jsx-runtime");
2623
+ var import_react14 = require("react");
2624
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2519
2625
  var StyledHeading = styled("h2", {
2520
2626
  fontFamily: "$default",
2521
2627
  lineHeight: "$shorter",
@@ -2537,15 +2643,15 @@ var StyledHeading = styled("h2", {
2537
2643
  size: "md"
2538
2644
  }
2539
2645
  });
2540
- var Heading = (0, import_react13.forwardRef)(function Heading2({ children, ...props }, ref) {
2541
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StyledHeading, { ref, ...props, children });
2646
+ var Heading = (0, import_react14.forwardRef)(function Heading2({ children, ...props }, ref) {
2647
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledHeading, { ref, ...props, children });
2542
2648
  });
2543
2649
  Heading.displayName = "Heading";
2544
2650
 
2545
2651
  // src/components/Select/index.tsx
2546
2652
  var import_react_icons2 = require("@radix-ui/react-icons");
2547
2653
  var CustomSelect = __toESM(require("@radix-ui/react-select"));
2548
- var import_react14 = require("react");
2654
+ var import_react15 = require("react");
2549
2655
 
2550
2656
  // src/components/Select/styles.ts
2551
2657
  var Select = __toESM(require("@radix-ui/react-select"));
@@ -2598,7 +2704,7 @@ var StyledTrigger = styled(Select.Trigger, {
2598
2704
  }
2599
2705
  }
2600
2706
  });
2601
- var StyledContent2 = styled(Select.Content, {
2707
+ var StyledContent3 = styled(Select.Content, {
2602
2708
  overflow: "hidden",
2603
2709
  backgroundColor: "$gray_background",
2604
2710
  borderRadius: "$md",
@@ -2610,7 +2716,7 @@ var StyledContent2 = styled(Select.Content, {
2610
2716
  var StyledViewport = styled(Select.Viewport, {
2611
2717
  padding: "4px"
2612
2718
  });
2613
- var StyledItem2 = styled(Select.Item, {
2719
+ var StyledItem3 = styled(Select.Item, {
2614
2720
  position: "relative",
2615
2721
  fontSize: "$md",
2616
2722
  padding: "14px 12px",
@@ -2662,7 +2768,7 @@ var Span6 = styled("span", {
2662
2768
  });
2663
2769
 
2664
2770
  // src/components/Select/index.tsx
2665
- var import_jsx_runtime35 = require("react/jsx-runtime");
2771
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2666
2772
  function Select2({
2667
2773
  value,
2668
2774
  onValueChange,
@@ -2672,10 +2778,10 @@ function Select2({
2672
2778
  errorMessage,
2673
2779
  ...rest
2674
2780
  }) {
2675
- const [open, setOpen] = (0, import_react14.useState)(false);
2676
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(StyledWrapper4, { children: [
2677
- label && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Label3, { children: label }),
2678
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2781
+ const [open, setOpen] = (0, import_react15.useState)(false);
2782
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(StyledWrapper4, { children: [
2783
+ label && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Label3, { children: label }),
2784
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2679
2785
  CustomSelect.Root,
2680
2786
  {
2681
2787
  value,
@@ -2683,21 +2789,21 @@ function Select2({
2683
2789
  onOpenChange: setOpen,
2684
2790
  ...rest,
2685
2791
  children: [
2686
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(StyledTrigger, { "aria-label": label, hasError: !!errorMessage, children: [
2687
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CustomSelect.Value, { placeholder }),
2688
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledIcon, { open, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_icons2.TriangleDownIcon, {}) })
2792
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(StyledTrigger, { "aria-label": label, hasError: !!errorMessage, children: [
2793
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CustomSelect.Value, { placeholder }),
2794
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(StyledIcon, { open, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_icons2.TriangleDownIcon, {}) })
2689
2795
  ] }),
2690
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Span6, { children: errorMessage }),
2691
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CustomSelect.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2692
- StyledContent2,
2796
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Span6, { children: errorMessage }),
2797
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CustomSelect.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2798
+ StyledContent3,
2693
2799
  {
2694
2800
  side: "bottom",
2695
2801
  align: "start",
2696
2802
  position: "popper",
2697
2803
  children: [
2698
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CustomSelect.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_icons2.TriangleUpIcon, {}) }),
2699
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledViewport, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledItem2, { value: item.value, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CustomSelect.ItemText, { children: item.label }) }, item.value)) }),
2700
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CustomSelect.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_icons2.TriangleDownIcon, {}) })
2804
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CustomSelect.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_icons2.TriangleUpIcon, {}) }),
2805
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(StyledViewport, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(StyledItem3, { value: item.value, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CustomSelect.ItemText, { children: item.label }) }, item.value)) }),
2806
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CustomSelect.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_icons2.TriangleDownIcon, {}) })
2701
2807
  ]
2702
2808
  }
2703
2809
  ) })
@@ -2709,7 +2815,7 @@ function Select2({
2709
2815
  Select2.displayName = "Select";
2710
2816
 
2711
2817
  // src/components/LabelledValue/index.tsx
2712
- var import_react15 = require("react");
2818
+ var import_react16 = require("react");
2713
2819
 
2714
2820
  // src/components/LabelledValue/styles.ts
2715
2821
  var Container = styled("div", {
@@ -2770,22 +2876,22 @@ var Value2 = styled("div", {
2770
2876
  });
2771
2877
 
2772
2878
  // src/components/LabelledValue/index.tsx
2773
- var import_jsx_runtime36 = require("react/jsx-runtime");
2879
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2774
2880
  function LabelledValue({ position = "vertical", withRow = false, children }) {
2775
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Container, { position, children: import_react15.Children.map(children, (child) => {
2776
- if ((0, import_react15.isValidElement)(child)) {
2777
- return (0, import_react15.cloneElement)(child, { position, withRow });
2881
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Container, { position, children: import_react16.Children.map(children, (child) => {
2882
+ if ((0, import_react16.isValidElement)(child)) {
2883
+ return (0, import_react16.cloneElement)(child, { position, withRow });
2778
2884
  }
2779
2885
  return child;
2780
2886
  }) });
2781
2887
  }
2782
- function Item3({ label, value, position = "vertical", withRow = false }) {
2783
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(ItemWrapper, { position, withRow, children: [
2784
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Label4, { children: label }),
2785
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Value2, { children: value })
2888
+ function Item4({ label, value, position = "vertical", withRow = false }) {
2889
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(ItemWrapper, { position, withRow, children: [
2890
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Label4, { children: label }),
2891
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Value2, { children: value })
2786
2892
  ] });
2787
2893
  }
2788
- LabelledValue.Item = Item3;
2894
+ LabelledValue.Item = Item4;
2789
2895
 
2790
2896
  // src/components/OneTimePassword/index.tsx
2791
2897
  var OneTimePasswordField2 = __toESM(require("@radix-ui/react-one-time-password-field"));
@@ -2797,17 +2903,24 @@ var Container2 = styled("div", {
2797
2903
  flexDirection: "column",
2798
2904
  justifyContent: "center",
2799
2905
  alignItems: "center",
2800
- marginBottom: "$6"
2906
+ marginBottom: "$6",
2907
+ width: "100%"
2801
2908
  });
2802
2909
  var StyledWrapper5 = styled("div", {
2803
2910
  display: "flex",
2804
- flexDirection: "column",
2805
- gap: "$5"
2911
+ flexDirection: "column"
2806
2912
  });
2807
2913
  var StyledRoot4 = styled(OneTimePasswordField.Root, {
2808
- display: "flex",
2914
+ display: "grid",
2809
2915
  gap: "$2",
2810
- flexWrap: "nowrap"
2916
+ gridTemplateColumns: "repeat(var(--otp-length), 1fr)",
2917
+ width: "100%"
2918
+ });
2919
+ var StyledLabel3 = styled(OneTimePasswordField.Root, {
2920
+ display: "flex",
2921
+ justifyContent: "center",
2922
+ alignItems: "center",
2923
+ marginBottom: "$5"
2811
2924
  });
2812
2925
  var StyledInput = styled(OneTimePasswordField.Input, {
2813
2926
  all: "unset",
@@ -2824,8 +2937,9 @@ var StyledInput = styled(OneTimePasswordField.Input, {
2824
2937
  fontSize: "$md",
2825
2938
  color: "$black",
2826
2939
  padding: "0",
2827
- height: "50px",
2828
- width: "53px",
2940
+ width: "100%",
2941
+ aspectRatio: "1 / 1",
2942
+ maxWidth: "53px",
2829
2943
  "&:hover": {
2830
2944
  borderColor: "$gray_dark"
2831
2945
  },
@@ -2845,32 +2959,31 @@ var Span7 = styled("span", {
2845
2959
  });
2846
2960
 
2847
2961
  // src/components/OneTimePassword/index.tsx
2848
- var import_jsx_runtime37 = require("react/jsx-runtime");
2962
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2849
2963
  var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...rootProps }) => {
2850
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Container2, { children: [
2851
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(StyledWrapper5, { children: [
2852
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("label", { children: label }),
2853
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2854
- StyledRoot4,
2855
- {
2856
- value,
2857
- onValueChange,
2858
- ...rootProps,
2859
- children: [
2860
- Array.from({ length }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(StyledInput, {}, index)),
2861
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(OneTimePasswordField2.HiddenInput, {})
2862
- ]
2863
- }
2864
- )
2865
- ] }),
2866
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Span7, { children: errorMessage })
2867
- ] });
2964
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Container2, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(StyledWrapper5, { children: [
2965
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StyledLabel3, { children: label }),
2966
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2967
+ StyledRoot4,
2968
+ {
2969
+ value,
2970
+ onValueChange,
2971
+ ...rootProps,
2972
+ style: { "--otp-length": length },
2973
+ children: [
2974
+ Array.from({ length }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StyledInput, {}, index)),
2975
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(OneTimePasswordField2.HiddenInput, {})
2976
+ ]
2977
+ }
2978
+ ),
2979
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Span7, { children: errorMessage })
2980
+ ] }) });
2868
2981
  };
2869
2982
  OneTimePassword.displayName = "OneTimePasswordInput";
2870
2983
 
2871
2984
  // src/components/Toast/index.tsx
2872
2985
  var ToastPrimitive2 = __toESM(require("@radix-ui/react-toast"));
2873
- var React3 = __toESM(require("react"));
2986
+ var React4 = __toESM(require("react"));
2874
2987
 
2875
2988
  // src/components/Toast/styles.ts
2876
2989
  var ToastPrimitive = __toESM(require("@radix-ui/react-toast"));
@@ -3033,11 +3146,11 @@ var toast = {
3033
3146
  };
3034
3147
 
3035
3148
  // src/components/Toast/index.tsx
3036
- var import_jsx_runtime38 = require("react/jsx-runtime");
3149
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3037
3150
  var Toast = () => {
3038
- const [messages, setMessages] = React3.useState([]);
3039
- const [paused, setPaused] = React3.useState(false);
3040
- React3.useEffect(() => {
3151
+ const [messages, setMessages] = React4.useState([]);
3152
+ const [paused, setPaused] = React4.useState(false);
3153
+ React4.useEffect(() => {
3041
3154
  const handleNewToast = (msg) => {
3042
3155
  setMessages((prev) => [...prev, msg]);
3043
3156
  };
@@ -3049,8 +3162,8 @@ var Toast = () => {
3049
3162
  const removeToast = (id) => {
3050
3163
  setMessages((prev) => prev.filter((msg) => msg.id !== id));
3051
3164
  };
3052
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(ToastPrimitive2.Provider, { swipeDirection: "right", children: [
3053
- messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3165
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(ToastPrimitive2.Provider, { swipeDirection: "right", children: [
3166
+ messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3054
3167
  ToastRoot,
3055
3168
  {
3056
3169
  open: true,
@@ -3063,11 +3176,11 @@ var Toast = () => {
3063
3176
  onPause: () => setPaused(true),
3064
3177
  onResume: () => setPaused(false),
3065
3178
  children: [
3066
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(ToastContent, { children: [
3067
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ToastTitle, { children: message.title }),
3068
- message.description && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ToastDescription, { children: message.description })
3179
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(ToastContent, { children: [
3180
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ToastTitle, { children: message.title }),
3181
+ message.description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ToastDescription, { children: message.description })
3069
3182
  ] }),
3070
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3183
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3071
3184
  "button",
3072
3185
  {
3073
3186
  style: {
@@ -3077,15 +3190,15 @@ var Toast = () => {
3077
3190
  alignItems: "center"
3078
3191
  },
3079
3192
  onClick: () => removeToast(message.id),
3080
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
3193
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
3081
3194
  }
3082
3195
  ) }),
3083
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ToastProgress, { paused, variant: message.variant })
3196
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ToastProgress, { paused, variant: message.variant })
3084
3197
  ]
3085
3198
  },
3086
3199
  message.id
3087
3200
  )),
3088
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ToastViewport, {})
3201
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ToastViewport, {})
3089
3202
  ] });
3090
3203
  };
3091
3204
 
@@ -3097,7 +3210,8 @@ var Wrapper5 = styled("div", {
3097
3210
  variants: {
3098
3211
  orientation: {
3099
3212
  horizontal: {
3100
- flexDirection: "row",
3213
+ display: "grid",
3214
+ gridTemplateColumns: "repeat(auto-fit, minmax(100px, 1fr))",
3101
3215
  alignItems: "center",
3102
3216
  gap: "var(--gap)"
3103
3217
  },
@@ -3115,7 +3229,6 @@ var StepItem = styled("div", {
3115
3229
  variants: {
3116
3230
  orientation: {
3117
3231
  horizontal: {
3118
- flex: 1,
3119
3232
  flexDirection: "column",
3120
3233
  textAlign: "center"
3121
3234
  },
@@ -3128,7 +3241,7 @@ var StepItem = styled("div", {
3128
3241
  });
3129
3242
  var StepCircle = styled("div", {
3130
3243
  position: "relative",
3131
- zIndex: 999,
3244
+ zIndex: 990,
3132
3245
  width: "var(--circle-size)",
3133
3246
  height: "var(--circle-size)",
3134
3247
  borderRadius: "50%",
@@ -3321,22 +3434,22 @@ var StepLabel = styled("span", {
3321
3434
  });
3322
3435
 
3323
3436
  // src/components/MultiStep/index.tsx
3324
- var import_jsx_runtime39 = require("react/jsx-runtime");
3437
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3325
3438
  var MultiStep = ({
3326
3439
  steps,
3327
3440
  currentStep,
3328
3441
  orientation = "horizontal",
3329
3442
  variant
3330
3443
  }) => {
3331
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3444
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3332
3445
  Wrapper5,
3333
3446
  {
3334
3447
  orientation,
3335
3448
  children: steps.map((step, index) => {
3336
3449
  const isFirst = index === 0;
3337
3450
  const isLast = index === steps.length - 1;
3338
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(StepItem, { orientation, children: [
3339
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3451
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(StepItem, { orientation, children: [
3452
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3340
3453
  StepCircle,
3341
3454
  {
3342
3455
  orientation,
@@ -3347,7 +3460,7 @@ var MultiStep = ({
3347
3460
  children: index + 1
3348
3461
  }
3349
3462
  ),
3350
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3463
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3351
3464
  StepLabel,
3352
3465
  {
3353
3466
  orientation,
@@ -3363,7 +3476,7 @@ var MultiStep = ({
3363
3476
  MultiStep.displayName = "MultiStep";
3364
3477
 
3365
3478
  // src/components/Carousel/index.tsx
3366
- var import_react16 = require("react");
3479
+ var import_react17 = require("react");
3367
3480
 
3368
3481
  // src/components/Carousel/styles.ts
3369
3482
  var CarouselContainer = styled("div", {
@@ -3469,13 +3582,13 @@ var CarouselItemContainer = styled("div", {
3469
3582
  });
3470
3583
 
3471
3584
  // src/components/Carousel/index.tsx
3472
- var import_jsx_runtime40 = require("react/jsx-runtime");
3585
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3473
3586
  var SWIPE_THRESHOLD = 50;
3474
3587
  var Carousel = ({ title, variant, children }) => {
3475
- const items = import_react16.Children.toArray(children);
3476
- const [activeIndex, setActiveIndex] = (0, import_react16.useState)(0);
3477
- const [touchStartX, setTouchStartX] = (0, import_react16.useState)(null);
3478
- const [touchEndX, setTouchEndX] = (0, import_react16.useState)(null);
3588
+ const items = import_react17.Children.toArray(children);
3589
+ const [activeIndex, setActiveIndex] = (0, import_react17.useState)(0);
3590
+ const [touchStartX, setTouchStartX] = (0, import_react17.useState)(null);
3591
+ const [touchEndX, setTouchEndX] = (0, import_react17.useState)(null);
3479
3592
  const prev = () => {
3480
3593
  setActiveIndex((prevIndex) => prevIndex === 0 ? items.length - 1 : prevIndex - 1);
3481
3594
  };
@@ -3503,18 +3616,18 @@ var Carousel = ({ title, variant, children }) => {
3503
3616
  setTouchStartX(null);
3504
3617
  setTouchEndX(null);
3505
3618
  };
3506
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
3619
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3507
3620
  CarouselContainer,
3508
3621
  {
3509
3622
  role: "region",
3510
3623
  "aria-roledescription": "carousel",
3511
3624
  "aria-label": "Carousel Component",
3512
3625
  children: [
3513
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Wrapper6, { variant, children: [
3514
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(CarouselHeader, { children: [
3515
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Title2, { children: title }),
3516
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Navigation, { children: [
3517
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3626
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Wrapper6, { variant, children: [
3627
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(CarouselHeader, { children: [
3628
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Title2, { children: title }),
3629
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Navigation, { children: [
3630
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3518
3631
  Button,
3519
3632
  {
3520
3633
  size: "sm",
@@ -3522,10 +3635,10 @@ var Carousel = ({ title, variant, children }) => {
3522
3635
  "aria-label": "Previous Slide",
3523
3636
  onClick: prev,
3524
3637
  tabIndex: 0,
3525
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
3638
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
3526
3639
  }
3527
3640
  ),
3528
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3641
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3529
3642
  Button,
3530
3643
  {
3531
3644
  size: "sm",
@@ -3533,22 +3646,22 @@ var Carousel = ({ title, variant, children }) => {
3533
3646
  "aria-label": "Previous Slide",
3534
3647
  onClick: next,
3535
3648
  tabIndex: 0,
3536
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
3649
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
3537
3650
  }
3538
3651
  )
3539
3652
  ] })
3540
3653
  ] }),
3541
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Spacing, { size: "xs" }),
3542
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Hr, { variant }),
3543
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Spacing, { size: "xs" }),
3544
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3654
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Spacing, { size: "xs" }),
3655
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Hr, { variant }),
3656
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Spacing, { size: "xs" }),
3657
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3545
3658
  CarouselContent,
3546
3659
  {
3547
3660
  onTouchStart,
3548
3661
  onTouchMove,
3549
3662
  onTouchEnd,
3550
3663
  children: items.map(
3551
- (child, index) => (0, import_react16.cloneElement)(child, {
3664
+ (child, index) => (0, import_react17.cloneElement)(child, {
3552
3665
  "aria-hidden": index !== activeIndex,
3553
3666
  style: {
3554
3667
  display: index === activeIndex ? "block" : "none"
@@ -3558,8 +3671,8 @@ var Carousel = ({ title, variant, children }) => {
3558
3671
  }
3559
3672
  )
3560
3673
  ] }),
3561
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Spacing, { size: "md" }),
3562
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DotsContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: items.map((_, idx) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3674
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Spacing, { size: "md" }),
3675
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DotsContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: items.map((_, idx) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3563
3676
  DotButton,
3564
3677
  {
3565
3678
  active: idx === activeIndex,
@@ -3575,12 +3688,12 @@ var Carousel = ({ title, variant, children }) => {
3575
3688
  }
3576
3689
  );
3577
3690
  };
3578
- var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CarouselItemContainer, { ...props, style: { ...style }, children });
3691
+ var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselItemContainer, { ...props, style: { ...style }, children });
3579
3692
  Carousel.Item = CarouselItem;
3580
3693
 
3581
3694
  // src/components/PasswordInput.tsx
3582
- var import_react17 = require("react");
3583
- var import_jsx_runtime41 = require("react/jsx-runtime");
3695
+ var import_react18 = require("react");
3696
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3584
3697
  var ToggleButton = styled("button", {
3585
3698
  all: "unset",
3586
3699
  cursor: "pointer",
@@ -3595,11 +3708,11 @@ var ToggleButton = styled("button", {
3595
3708
  borderRadius: "$sm"
3596
3709
  }
3597
3710
  });
3598
- var PasswordInput = (0, import_react17.forwardRef)(
3711
+ var PasswordInput = (0, import_react18.forwardRef)(
3599
3712
  ({ value, onChange, ...props }, ref) => {
3600
- const [visible, setVisible] = (0, import_react17.useState)(false);
3601
- const innerRef = (0, import_react17.useRef)(null);
3602
- (0, import_react17.useImperativeHandle)(ref, () => innerRef.current);
3713
+ const [visible, setVisible] = (0, import_react18.useState)(false);
3714
+ const innerRef = (0, import_react18.useRef)(null);
3715
+ (0, import_react18.useImperativeHandle)(ref, () => innerRef.current);
3603
3716
  const handleToggleVisibility = () => {
3604
3717
  setVisible((v) => !v);
3605
3718
  setTimeout(() => {
@@ -3609,7 +3722,7 @@ var PasswordInput = (0, import_react17.forwardRef)(
3609
3722
  }
3610
3723
  }, 0);
3611
3724
  };
3612
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3725
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3613
3726
  Input2,
3614
3727
  {
3615
3728
  ...props,
@@ -3617,14 +3730,14 @@ var PasswordInput = (0, import_react17.forwardRef)(
3617
3730
  type: visible ? "text" : "password",
3618
3731
  value,
3619
3732
  onChange,
3620
- suffix: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3733
+ suffix: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3621
3734
  ToggleButton,
3622
3735
  {
3623
3736
  type: "button",
3624
3737
  onClick: handleToggleVisibility,
3625
3738
  onMouseDown: (e) => e.preventDefault(),
3626
3739
  "aria-label": visible ? "Ocultar senha" : "Mostrar senha",
3627
- children: visible ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "EyeClosed", size: 16, color: "black" }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "EyeOpen", size: 16, color: "black" })
3740
+ children: visible ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: "EyeClosed", size: 16, color: "black" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: "EyeOpen", size: 16, color: "black" })
3628
3741
  }
3629
3742
  )
3630
3743
  }
@@ -3632,8 +3745,109 @@ var PasswordInput = (0, import_react17.forwardRef)(
3632
3745
  }
3633
3746
  );
3634
3747
  PasswordInput.displayName = "PasswordInput";
3748
+
3749
+ // src/components/Accordion/index.tsx
3750
+ var RadixAccordion = __toESM(require("@radix-ui/react-accordion"));
3751
+ var import_react19 = __toESM(require("react"));
3752
+
3753
+ // src/components/Accordion/styles.ts
3754
+ var Accordion = __toESM(require("@radix-ui/react-accordion"));
3755
+ var AccordionContainer = styled(Accordion.Root, {
3756
+ borderRadius: "$md",
3757
+ width: "100%",
3758
+ backgroundColor: "$white",
3759
+ boxShadow: "0 1px 2px $colors$gray_mid",
3760
+ border: "2px solid $colors$gray_mid"
3761
+ });
3762
+ var AccordionItem = styled(Accordion.Item, {
3763
+ overflow: "hidden",
3764
+ marginTop: "1px",
3765
+ "&:first-child": {
3766
+ marginTop: 0,
3767
+ borderTopLeftRadius: "$md",
3768
+ borderTopRightRadius: "$md"
3769
+ },
3770
+ "&:last-child": {
3771
+ borderBottomLeftRadius: "$md",
3772
+ borderBottomRightRadius: "$md"
3773
+ }
3774
+ });
3775
+ var AccordionHeader = styled(Accordion.Header, {
3776
+ display: "flex"
3777
+ });
3778
+ var AccordionTrigger = styled(Accordion.Trigger, {
3779
+ all: "unset",
3780
+ fontFamily: "$default",
3781
+ backgroundColor: "transparent",
3782
+ padding: "0 $5",
3783
+ flex: 1,
3784
+ display: "flex",
3785
+ alignItems: "center",
3786
+ justifyContent: "space-between",
3787
+ fontSize: "$md",
3788
+ lineHeight: "$regular",
3789
+ color: "$black",
3790
+ fontWeight: "$bold",
3791
+ width: "100%",
3792
+ "&:hover": {
3793
+ cursor: "pointer"
3794
+ },
3795
+ "&:focus": {
3796
+ cursor: "pointer",
3797
+ outline: "none"
3798
+ }
3799
+ });
3800
+ var AccordionChevron = styled(Icon, {
3801
+ color: "$ignite_light",
3802
+ transition: "transform 300ms cubic-bezier(0.87, 0, 0.13, 1)",
3803
+ "[data-state=open] &": {
3804
+ transform: "rotate(180deg)"
3805
+ }
3806
+ });
3807
+ var AccordionContent = styled(Accordion.Content, {
3808
+ overflow: "hidden",
3809
+ fontSize: "$md",
3810
+ color: "$black",
3811
+ borderTop: "1px solid $colors$gray_mid",
3812
+ '&[data-state="open"]': {
3813
+ animation: "slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1)"
3814
+ },
3815
+ '&[data-state="closed"]': {
3816
+ animation: "slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1)"
3817
+ },
3818
+ "> div": {
3819
+ padding: "$5"
3820
+ }
3821
+ });
3822
+ var TriggerContent = styled("div", {
3823
+ display: "flex",
3824
+ alignItems: "center",
3825
+ gap: "$2"
3826
+ });
3827
+ var OptionsButton = styled(Button, {
3828
+ marginRight: "$1"
3829
+ });
3830
+
3831
+ // src/components/Accordion/index.tsx
3832
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3833
+ var Accordion2 = import_react19.default.forwardRef(
3834
+ ({ title, children, dropdownItems }, ref) => {
3835
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AccordionContainer, { type: "single", collapsible: true, ref, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(AccordionItem, { value: "item-1", children: [
3836
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AccordionHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(AccordionTrigger, { children: [
3837
+ title,
3838
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(TriggerContent, { children: [
3839
+ dropdownItems && dropdownItems,
3840
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AccordionChevron, { name: "TriangleDown", size: 16, "aria-hidden": true }) })
3841
+ ] })
3842
+ ] }) }),
3843
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(RadixAccordion.Content, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(AccordionContent, { children }) })
3844
+ ] }) });
3845
+ }
3846
+ );
3847
+ Accordion2.displayName = "Accordion";
3635
3848
  // Annotate the CommonJS export names for ESM import in node:
3636
3849
  0 && (module.exports = {
3850
+ Accordion,
3637
3851
  Avatar,
3638
3852
  Box,
3639
3853
  Button,
@@ -3641,6 +3855,9 @@ PasswordInput.displayName = "PasswordInput";
3641
3855
  Carousel,
3642
3856
  Checkbox,
3643
3857
  Datepicker,
3858
+ Dropdown,
3859
+ DropdownItem,
3860
+ DropdownSeparator,
3644
3861
  Heading,
3645
3862
  Hr,
3646
3863
  Icon,