@clickpalm/react 1.1.2 → 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.mjs CHANGED
@@ -2372,8 +2372,110 @@ var MaskedInput = forwardRef5(
2372
2372
  );
2373
2373
  MaskedInput.displayName = "MaskedInput";
2374
2374
 
2375
+ // src/components/Dropdown/index.tsx
2376
+ import { Children as Children2, Fragment as Fragment2 } from "react";
2377
+ import * as DropdownMenu2 from "@radix-ui/react-dropdown-menu";
2378
+
2379
+ // src/components/Dropdown/styles.ts
2380
+ import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
2381
+ var slideUpAndFade2 = keyframes({
2382
+ "0%": { opacity: 0, transform: "translateY(2px)" },
2383
+ "100%": { opacity: 1, transform: "translateY(0)" }
2384
+ });
2385
+ var slideRightAndFade2 = keyframes({
2386
+ "0%": { opacity: 0, transform: "translateX(-2px)" },
2387
+ "100%": { opacity: 1, transform: "translateX(0)" }
2388
+ });
2389
+ var slideDownAndFade2 = keyframes({
2390
+ "0%": { opacity: 0, transform: "translateY(-2px)" },
2391
+ "100%": { opacity: 1, transform: "translateY(0)" }
2392
+ });
2393
+ var slideLeftAndFade2 = keyframes({
2394
+ "0%": { opacity: 0, transform: "translateX(2px)" },
2395
+ "100%": { opacity: 1, transform: "translateX(0)" }
2396
+ });
2397
+ var StyledContent2 = styled(DropdownMenu.Content, {
2398
+ minWidth: 100,
2399
+ backgroundColor: "$white",
2400
+ borderRadius: "$md",
2401
+ padding: "$2",
2402
+ boxShadow: "0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)",
2403
+ animationDuration: "400ms",
2404
+ animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
2405
+ willChange: "transform, opacity",
2406
+ '&[data-state="open"]': {
2407
+ '&[data-side="top"]': { animationName: slideDownAndFade2 },
2408
+ '&[data-side="right"]': { animationName: slideLeftAndFade2 },
2409
+ '&[data-side="bottom"]': { animationName: slideUpAndFade2 },
2410
+ '&[data-side="left"]': { animationName: slideRightAndFade2 }
2411
+ }
2412
+ });
2413
+ var itemStyles = {
2414
+ all: "unset",
2415
+ fontSize: "$sm",
2416
+ lineHeight: 1,
2417
+ color: "$black",
2418
+ borderRadius: "$sm",
2419
+ display: "flex",
2420
+ alignItems: "center",
2421
+ height: 25,
2422
+ padding: "0 $2",
2423
+ position: "relative",
2424
+ paddingLeft: "$5",
2425
+ userSelect: "none",
2426
+ "&[data-disabled]": {
2427
+ color: "$gray_mid",
2428
+ pointerEvents: "none"
2429
+ },
2430
+ "&[data-highlighted]": {
2431
+ color: "$clickpalm_light",
2432
+ cursor: "pointer"
2433
+ },
2434
+ button: {
2435
+ all: "unset",
2436
+ width: "100%",
2437
+ textAlign: "left"
2438
+ }
2439
+ };
2440
+ var StyledItem2 = styled(DropdownMenu.Item, { ...itemStyles });
2441
+ var StyledSeparator = styled(DropdownMenu.Separator, {
2442
+ height: "1px",
2443
+ backgroundColor: "$gray_light",
2444
+ margin: "$2"
2445
+ });
2446
+ var IconButton = styled("button", {
2447
+ all: "unset",
2448
+ fontFamily: "inherit",
2449
+ borderRadius: "100%",
2450
+ height: 35,
2451
+ width: 35,
2452
+ display: "inline-flex",
2453
+ alignItems: "center",
2454
+ justifyContent: "center",
2455
+ color: "$clickpalm_light",
2456
+ backgroundColor: "transparent"
2457
+ });
2458
+
2459
+ // src/components/Dropdown/index.tsx
2460
+ import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
2461
+ var Dropdown = ({ children }) => {
2462
+ const childrenArray = Children2.toArray(children);
2463
+ return /* @__PURE__ */ jsxs13(DropdownMenu2.Root, { children: [
2464
+ /* @__PURE__ */ jsx32(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx32(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ jsx32(Icon, { name: "Dots", size: 16 }) }) }),
2465
+ /* @__PURE__ */ jsx32(DropdownMenu2.Portal, { children: /* @__PURE__ */ jsx32(StyledContent2, { sideOffset: 5, align: "end", children: childrenArray.map((child, index) => /* @__PURE__ */ jsxs13(Fragment2, { children: [
2466
+ child,
2467
+ index < childrenArray.length - 1 && /* @__PURE__ */ jsx32(DropdownSeparator, {})
2468
+ ] }, index)) }) })
2469
+ ] });
2470
+ };
2471
+ var DropdownItem = StyledItem2;
2472
+ var DropdownSeparator = StyledSeparator;
2473
+ Dropdown.displayName = "Dropdown";
2474
+ DropdownItem.displayName = "DropdownItem";
2475
+ DropdownSeparator.displayName = "DropdownSeparator";
2476
+
2375
2477
  // src/components/Box.tsx
2376
- import { jsx as jsx32 } from "react/jsx-runtime";
2478
+ import { jsx as jsx33 } from "react/jsx-runtime";
2377
2479
  var StyledBox = styled("div", {
2378
2480
  padding: "$5",
2379
2481
  borderRadius: "$md",
@@ -2395,12 +2497,12 @@ var StyledBox = styled("div", {
2395
2497
  }
2396
2498
  });
2397
2499
  var Box = (props) => {
2398
- return /* @__PURE__ */ jsx32(StyledBox, { ...props });
2500
+ return /* @__PURE__ */ jsx33(StyledBox, { ...props });
2399
2501
  };
2400
2502
  Box.displayName = "Box";
2401
2503
 
2402
2504
  // src/components/Paragraph.tsx
2403
- import { jsx as jsx33 } from "react/jsx-runtime";
2505
+ import { jsx as jsx34 } from "react/jsx-runtime";
2404
2506
  var StyledParagraph = styled("p", {
2405
2507
  fontFamily: "$default",
2406
2508
  lineHeight: "$short",
@@ -2441,13 +2543,13 @@ var StyledParagraph = styled("p", {
2441
2543
  }
2442
2544
  });
2443
2545
  var Paragraph = (props) => {
2444
- return /* @__PURE__ */ jsx33(StyledParagraph, { ...props });
2546
+ return /* @__PURE__ */ jsx34(StyledParagraph, { ...props });
2445
2547
  };
2446
2548
  Paragraph.displayName = "Paragraph";
2447
2549
 
2448
2550
  // src/components/Heading.tsx
2449
2551
  import { forwardRef as forwardRef6 } from "react";
2450
- import { jsx as jsx34 } from "react/jsx-runtime";
2552
+ import { jsx as jsx35 } from "react/jsx-runtime";
2451
2553
  var StyledHeading = styled("h2", {
2452
2554
  fontFamily: "$default",
2453
2555
  lineHeight: "$shorter",
@@ -2470,7 +2572,7 @@ var StyledHeading = styled("h2", {
2470
2572
  }
2471
2573
  });
2472
2574
  var Heading = forwardRef6(function Heading2({ children, ...props }, ref) {
2473
- return /* @__PURE__ */ jsx34(StyledHeading, { ref, ...props, children });
2575
+ return /* @__PURE__ */ jsx35(StyledHeading, { ref, ...props, children });
2474
2576
  });
2475
2577
  Heading.displayName = "Heading";
2476
2578
 
@@ -2530,7 +2632,7 @@ var StyledTrigger = styled(Select.Trigger, {
2530
2632
  }
2531
2633
  }
2532
2634
  });
2533
- var StyledContent2 = styled(Select.Content, {
2635
+ var StyledContent3 = styled(Select.Content, {
2534
2636
  overflow: "hidden",
2535
2637
  backgroundColor: "$gray_background",
2536
2638
  borderRadius: "$md",
@@ -2542,7 +2644,7 @@ var StyledContent2 = styled(Select.Content, {
2542
2644
  var StyledViewport = styled(Select.Viewport, {
2543
2645
  padding: "4px"
2544
2646
  });
2545
- var StyledItem2 = styled(Select.Item, {
2647
+ var StyledItem3 = styled(Select.Item, {
2546
2648
  position: "relative",
2547
2649
  fontSize: "$md",
2548
2650
  padding: "14px 12px",
@@ -2594,7 +2696,7 @@ var Span6 = styled("span", {
2594
2696
  });
2595
2697
 
2596
2698
  // src/components/Select/index.tsx
2597
- import { jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
2699
+ import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
2598
2700
  function Select2({
2599
2701
  value,
2600
2702
  onValueChange,
@@ -2605,9 +2707,9 @@ function Select2({
2605
2707
  ...rest
2606
2708
  }) {
2607
2709
  const [open, setOpen] = useState6(false);
2608
- return /* @__PURE__ */ jsxs13(StyledWrapper4, { children: [
2609
- label && /* @__PURE__ */ jsx35(Label3, { children: label }),
2610
- /* @__PURE__ */ jsxs13(
2710
+ return /* @__PURE__ */ jsxs14(StyledWrapper4, { children: [
2711
+ label && /* @__PURE__ */ jsx36(Label3, { children: label }),
2712
+ /* @__PURE__ */ jsxs14(
2611
2713
  CustomSelect.Root,
2612
2714
  {
2613
2715
  value,
@@ -2615,21 +2717,21 @@ function Select2({
2615
2717
  onOpenChange: setOpen,
2616
2718
  ...rest,
2617
2719
  children: [
2618
- /* @__PURE__ */ jsxs13(StyledTrigger, { "aria-label": label, hasError: !!errorMessage, children: [
2619
- /* @__PURE__ */ jsx35(CustomSelect.Value, { placeholder }),
2620
- /* @__PURE__ */ jsx35(StyledIcon, { open, children: /* @__PURE__ */ jsx35(TriangleDownIcon, {}) })
2720
+ /* @__PURE__ */ jsxs14(StyledTrigger, { "aria-label": label, hasError: !!errorMessage, children: [
2721
+ /* @__PURE__ */ jsx36(CustomSelect.Value, { placeholder }),
2722
+ /* @__PURE__ */ jsx36(StyledIcon, { open, children: /* @__PURE__ */ jsx36(TriangleDownIcon, {}) })
2621
2723
  ] }),
2622
- errorMessage && /* @__PURE__ */ jsx35(Span6, { children: errorMessage }),
2623
- /* @__PURE__ */ jsx35(CustomSelect.Portal, { children: /* @__PURE__ */ jsxs13(
2624
- StyledContent2,
2724
+ errorMessage && /* @__PURE__ */ jsx36(Span6, { children: errorMessage }),
2725
+ /* @__PURE__ */ jsx36(CustomSelect.Portal, { children: /* @__PURE__ */ jsxs14(
2726
+ StyledContent3,
2625
2727
  {
2626
2728
  side: "bottom",
2627
2729
  align: "start",
2628
2730
  position: "popper",
2629
2731
  children: [
2630
- /* @__PURE__ */ jsx35(CustomSelect.ScrollUpButton, { children: /* @__PURE__ */ jsx35(TriangleUpIcon, {}) }),
2631
- /* @__PURE__ */ jsx35(StyledViewport, { children: items.map((item) => /* @__PURE__ */ jsx35(StyledItem2, { value: item.value, children: /* @__PURE__ */ jsx35(CustomSelect.ItemText, { children: item.label }) }, item.value)) }),
2632
- /* @__PURE__ */ jsx35(CustomSelect.ScrollDownButton, { children: /* @__PURE__ */ jsx35(TriangleDownIcon, {}) })
2732
+ /* @__PURE__ */ jsx36(CustomSelect.ScrollUpButton, { children: /* @__PURE__ */ jsx36(TriangleUpIcon, {}) }),
2733
+ /* @__PURE__ */ jsx36(StyledViewport, { children: items.map((item) => /* @__PURE__ */ jsx36(StyledItem3, { value: item.value, children: /* @__PURE__ */ jsx36(CustomSelect.ItemText, { children: item.label }) }, item.value)) }),
2734
+ /* @__PURE__ */ jsx36(CustomSelect.ScrollDownButton, { children: /* @__PURE__ */ jsx36(TriangleDownIcon, {}) })
2633
2735
  ]
2634
2736
  }
2635
2737
  ) })
@@ -2642,7 +2744,7 @@ Select2.displayName = "Select";
2642
2744
 
2643
2745
  // src/components/LabelledValue/index.tsx
2644
2746
  import {
2645
- Children as Children2,
2747
+ Children as Children3,
2646
2748
  cloneElement,
2647
2749
  isValidElement as isValidElement2
2648
2750
  } from "react";
@@ -2706,22 +2808,22 @@ var Value2 = styled("div", {
2706
2808
  });
2707
2809
 
2708
2810
  // src/components/LabelledValue/index.tsx
2709
- import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
2811
+ import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
2710
2812
  function LabelledValue({ position = "vertical", withRow = false, children }) {
2711
- return /* @__PURE__ */ jsx36(Container, { position, children: Children2.map(children, (child) => {
2813
+ return /* @__PURE__ */ jsx37(Container, { position, children: Children3.map(children, (child) => {
2712
2814
  if (isValidElement2(child)) {
2713
2815
  return cloneElement(child, { position, withRow });
2714
2816
  }
2715
2817
  return child;
2716
2818
  }) });
2717
2819
  }
2718
- function Item3({ label, value, position = "vertical", withRow = false }) {
2719
- return /* @__PURE__ */ jsxs14(ItemWrapper, { position, withRow, children: [
2720
- /* @__PURE__ */ jsx36(Label4, { children: label }),
2721
- /* @__PURE__ */ jsx36(Value2, { children: value })
2820
+ function Item4({ label, value, position = "vertical", withRow = false }) {
2821
+ return /* @__PURE__ */ jsxs15(ItemWrapper, { position, withRow, children: [
2822
+ /* @__PURE__ */ jsx37(Label4, { children: label }),
2823
+ /* @__PURE__ */ jsx37(Value2, { children: value })
2722
2824
  ] });
2723
2825
  }
2724
- LabelledValue.Item = Item3;
2826
+ LabelledValue.Item = Item4;
2725
2827
 
2726
2828
  // src/components/OneTimePassword/index.tsx
2727
2829
  import * as OneTimePasswordField2 from "@radix-ui/react-one-time-password-field";
@@ -2789,11 +2891,11 @@ var Span7 = styled("span", {
2789
2891
  });
2790
2892
 
2791
2893
  // src/components/OneTimePassword/index.tsx
2792
- import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
2894
+ import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
2793
2895
  var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...rootProps }) => {
2794
- return /* @__PURE__ */ jsx37(Container2, { children: /* @__PURE__ */ jsxs15(StyledWrapper5, { children: [
2795
- /* @__PURE__ */ jsx37(StyledLabel3, { children: label }),
2796
- /* @__PURE__ */ jsxs15(
2896
+ return /* @__PURE__ */ jsx38(Container2, { children: /* @__PURE__ */ jsxs16(StyledWrapper5, { children: [
2897
+ /* @__PURE__ */ jsx38(StyledLabel3, { children: label }),
2898
+ /* @__PURE__ */ jsxs16(
2797
2899
  StyledRoot4,
2798
2900
  {
2799
2901
  value,
@@ -2801,19 +2903,19 @@ var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...r
2801
2903
  ...rootProps,
2802
2904
  style: { "--otp-length": length },
2803
2905
  children: [
2804
- Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx37(StyledInput, {}, index)),
2805
- /* @__PURE__ */ jsx37(OneTimePasswordField2.HiddenInput, {})
2906
+ Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx38(StyledInput, {}, index)),
2907
+ /* @__PURE__ */ jsx38(OneTimePasswordField2.HiddenInput, {})
2806
2908
  ]
2807
2909
  }
2808
2910
  ),
2809
- errorMessage && /* @__PURE__ */ jsx37(Span7, { children: errorMessage })
2911
+ errorMessage && /* @__PURE__ */ jsx38(Span7, { children: errorMessage })
2810
2912
  ] }) });
2811
2913
  };
2812
2914
  OneTimePassword.displayName = "OneTimePasswordInput";
2813
2915
 
2814
2916
  // src/components/Toast/index.tsx
2815
2917
  import * as ToastPrimitive2 from "@radix-ui/react-toast";
2816
- import * as React3 from "react";
2918
+ import * as React4 from "react";
2817
2919
 
2818
2920
  // src/components/Toast/styles.ts
2819
2921
  import * as ToastPrimitive from "@radix-ui/react-toast";
@@ -2976,11 +3078,11 @@ var toast = {
2976
3078
  };
2977
3079
 
2978
3080
  // src/components/Toast/index.tsx
2979
- import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
3081
+ import { jsx as jsx39, jsxs as jsxs17 } from "react/jsx-runtime";
2980
3082
  var Toast = () => {
2981
- const [messages, setMessages] = React3.useState([]);
2982
- const [paused, setPaused] = React3.useState(false);
2983
- React3.useEffect(() => {
3083
+ const [messages, setMessages] = React4.useState([]);
3084
+ const [paused, setPaused] = React4.useState(false);
3085
+ React4.useEffect(() => {
2984
3086
  const handleNewToast = (msg) => {
2985
3087
  setMessages((prev) => [...prev, msg]);
2986
3088
  };
@@ -2992,8 +3094,8 @@ var Toast = () => {
2992
3094
  const removeToast = (id) => {
2993
3095
  setMessages((prev) => prev.filter((msg) => msg.id !== id));
2994
3096
  };
2995
- return /* @__PURE__ */ jsxs16(ToastPrimitive2.Provider, { swipeDirection: "right", children: [
2996
- messages.map((message) => /* @__PURE__ */ jsxs16(
3097
+ return /* @__PURE__ */ jsxs17(ToastPrimitive2.Provider, { swipeDirection: "right", children: [
3098
+ messages.map((message) => /* @__PURE__ */ jsxs17(
2997
3099
  ToastRoot,
2998
3100
  {
2999
3101
  open: true,
@@ -3006,11 +3108,11 @@ var Toast = () => {
3006
3108
  onPause: () => setPaused(true),
3007
3109
  onResume: () => setPaused(false),
3008
3110
  children: [
3009
- /* @__PURE__ */ jsxs16(ToastContent, { children: [
3010
- /* @__PURE__ */ jsx38(ToastTitle, { children: message.title }),
3011
- message.description && /* @__PURE__ */ jsx38(ToastDescription, { children: message.description })
3111
+ /* @__PURE__ */ jsxs17(ToastContent, { children: [
3112
+ /* @__PURE__ */ jsx39(ToastTitle, { children: message.title }),
3113
+ message.description && /* @__PURE__ */ jsx39(ToastDescription, { children: message.description })
3012
3114
  ] }),
3013
- /* @__PURE__ */ jsx38(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ jsx38(
3115
+ /* @__PURE__ */ jsx39(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ jsx39(
3014
3116
  "button",
3015
3117
  {
3016
3118
  style: {
@@ -3020,15 +3122,15 @@ var Toast = () => {
3020
3122
  alignItems: "center"
3021
3123
  },
3022
3124
  onClick: () => removeToast(message.id),
3023
- children: /* @__PURE__ */ jsx38(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
3125
+ children: /* @__PURE__ */ jsx39(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
3024
3126
  }
3025
3127
  ) }),
3026
- /* @__PURE__ */ jsx38(ToastProgress, { paused, variant: message.variant })
3128
+ /* @__PURE__ */ jsx39(ToastProgress, { paused, variant: message.variant })
3027
3129
  ]
3028
3130
  },
3029
3131
  message.id
3030
3132
  )),
3031
- /* @__PURE__ */ jsx38(ToastViewport, {})
3133
+ /* @__PURE__ */ jsx39(ToastViewport, {})
3032
3134
  ] });
3033
3135
  };
3034
3136
 
@@ -3264,22 +3366,22 @@ var StepLabel = styled("span", {
3264
3366
  });
3265
3367
 
3266
3368
  // src/components/MultiStep/index.tsx
3267
- import { jsx as jsx39, jsxs as jsxs17 } from "react/jsx-runtime";
3369
+ import { jsx as jsx40, jsxs as jsxs18 } from "react/jsx-runtime";
3268
3370
  var MultiStep = ({
3269
3371
  steps,
3270
3372
  currentStep,
3271
3373
  orientation = "horizontal",
3272
3374
  variant
3273
3375
  }) => {
3274
- return /* @__PURE__ */ jsx39(
3376
+ return /* @__PURE__ */ jsx40(
3275
3377
  Wrapper5,
3276
3378
  {
3277
3379
  orientation,
3278
3380
  children: steps.map((step, index) => {
3279
3381
  const isFirst = index === 0;
3280
3382
  const isLast = index === steps.length - 1;
3281
- return /* @__PURE__ */ jsxs17(StepItem, { orientation, children: [
3282
- /* @__PURE__ */ jsx39(
3383
+ return /* @__PURE__ */ jsxs18(StepItem, { orientation, children: [
3384
+ /* @__PURE__ */ jsx40(
3283
3385
  StepCircle,
3284
3386
  {
3285
3387
  orientation,
@@ -3290,7 +3392,7 @@ var MultiStep = ({
3290
3392
  children: index + 1
3291
3393
  }
3292
3394
  ),
3293
- /* @__PURE__ */ jsx39(
3395
+ /* @__PURE__ */ jsx40(
3294
3396
  StepLabel,
3295
3397
  {
3296
3398
  orientation,
@@ -3306,7 +3408,7 @@ var MultiStep = ({
3306
3408
  MultiStep.displayName = "MultiStep";
3307
3409
 
3308
3410
  // src/components/Carousel/index.tsx
3309
- import { useState as useState8, Children as Children3, cloneElement as cloneElement2 } from "react";
3411
+ import { useState as useState8, Children as Children4, cloneElement as cloneElement2 } from "react";
3310
3412
 
3311
3413
  // src/components/Carousel/styles.ts
3312
3414
  var CarouselContainer = styled("div", {
@@ -3412,10 +3514,10 @@ var CarouselItemContainer = styled("div", {
3412
3514
  });
3413
3515
 
3414
3516
  // src/components/Carousel/index.tsx
3415
- import { jsx as jsx40, jsxs as jsxs18 } from "react/jsx-runtime";
3517
+ import { jsx as jsx41, jsxs as jsxs19 } from "react/jsx-runtime";
3416
3518
  var SWIPE_THRESHOLD = 50;
3417
3519
  var Carousel = ({ title, variant, children }) => {
3418
- const items = Children3.toArray(children);
3520
+ const items = Children4.toArray(children);
3419
3521
  const [activeIndex, setActiveIndex] = useState8(0);
3420
3522
  const [touchStartX, setTouchStartX] = useState8(null);
3421
3523
  const [touchEndX, setTouchEndX] = useState8(null);
@@ -3446,18 +3548,18 @@ var Carousel = ({ title, variant, children }) => {
3446
3548
  setTouchStartX(null);
3447
3549
  setTouchEndX(null);
3448
3550
  };
3449
- return /* @__PURE__ */ jsxs18(
3551
+ return /* @__PURE__ */ jsxs19(
3450
3552
  CarouselContainer,
3451
3553
  {
3452
3554
  role: "region",
3453
3555
  "aria-roledescription": "carousel",
3454
3556
  "aria-label": "Carousel Component",
3455
3557
  children: [
3456
- /* @__PURE__ */ jsxs18(Wrapper6, { variant, children: [
3457
- /* @__PURE__ */ jsxs18(CarouselHeader, { children: [
3458
- /* @__PURE__ */ jsx40(Title2, { children: title }),
3459
- /* @__PURE__ */ jsxs18(Navigation, { children: [
3460
- /* @__PURE__ */ jsx40(
3558
+ /* @__PURE__ */ jsxs19(Wrapper6, { variant, children: [
3559
+ /* @__PURE__ */ jsxs19(CarouselHeader, { children: [
3560
+ /* @__PURE__ */ jsx41(Title2, { children: title }),
3561
+ /* @__PURE__ */ jsxs19(Navigation, { children: [
3562
+ /* @__PURE__ */ jsx41(
3461
3563
  Button,
3462
3564
  {
3463
3565
  size: "sm",
@@ -3465,10 +3567,10 @@ var Carousel = ({ title, variant, children }) => {
3465
3567
  "aria-label": "Previous Slide",
3466
3568
  onClick: prev,
3467
3569
  tabIndex: 0,
3468
- children: /* @__PURE__ */ jsx40(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
3570
+ children: /* @__PURE__ */ jsx41(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
3469
3571
  }
3470
3572
  ),
3471
- /* @__PURE__ */ jsx40(
3573
+ /* @__PURE__ */ jsx41(
3472
3574
  Button,
3473
3575
  {
3474
3576
  size: "sm",
@@ -3476,15 +3578,15 @@ var Carousel = ({ title, variant, children }) => {
3476
3578
  "aria-label": "Previous Slide",
3477
3579
  onClick: next,
3478
3580
  tabIndex: 0,
3479
- children: /* @__PURE__ */ jsx40(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
3581
+ children: /* @__PURE__ */ jsx41(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
3480
3582
  }
3481
3583
  )
3482
3584
  ] })
3483
3585
  ] }),
3484
- /* @__PURE__ */ jsx40(Spacing, { size: "xs" }),
3485
- /* @__PURE__ */ jsx40(Hr, { variant }),
3486
- /* @__PURE__ */ jsx40(Spacing, { size: "xs" }),
3487
- /* @__PURE__ */ jsx40(
3586
+ /* @__PURE__ */ jsx41(Spacing, { size: "xs" }),
3587
+ /* @__PURE__ */ jsx41(Hr, { variant }),
3588
+ /* @__PURE__ */ jsx41(Spacing, { size: "xs" }),
3589
+ /* @__PURE__ */ jsx41(
3488
3590
  CarouselContent,
3489
3591
  {
3490
3592
  onTouchStart,
@@ -3501,8 +3603,8 @@ var Carousel = ({ title, variant, children }) => {
3501
3603
  }
3502
3604
  )
3503
3605
  ] }),
3504
- /* @__PURE__ */ jsx40(Spacing, { size: "md" }),
3505
- /* @__PURE__ */ jsx40(DotsContainer, { children: /* @__PURE__ */ jsx40(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: items.map((_, idx) => /* @__PURE__ */ jsx40(
3606
+ /* @__PURE__ */ jsx41(Spacing, { size: "md" }),
3607
+ /* @__PURE__ */ jsx41(DotsContainer, { children: /* @__PURE__ */ jsx41(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: items.map((_, idx) => /* @__PURE__ */ jsx41(
3506
3608
  DotButton,
3507
3609
  {
3508
3610
  active: idx === activeIndex,
@@ -3518,12 +3620,12 @@ var Carousel = ({ title, variant, children }) => {
3518
3620
  }
3519
3621
  );
3520
3622
  };
3521
- var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ jsx40(CarouselItemContainer, { ...props, style: { ...style }, children });
3623
+ var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ jsx41(CarouselItemContainer, { ...props, style: { ...style }, children });
3522
3624
  Carousel.Item = CarouselItem;
3523
3625
 
3524
3626
  // src/components/PasswordInput.tsx
3525
3627
  import { forwardRef as forwardRef7, useImperativeHandle, useRef as useRef6, useState as useState9 } from "react";
3526
- import { jsx as jsx41 } from "react/jsx-runtime";
3628
+ import { jsx as jsx42 } from "react/jsx-runtime";
3527
3629
  var ToggleButton = styled("button", {
3528
3630
  all: "unset",
3529
3631
  cursor: "pointer",
@@ -3552,7 +3654,7 @@ var PasswordInput = forwardRef7(
3552
3654
  }
3553
3655
  }, 0);
3554
3656
  };
3555
- return /* @__PURE__ */ jsx41(
3657
+ return /* @__PURE__ */ jsx42(
3556
3658
  Input2,
3557
3659
  {
3558
3660
  ...props,
@@ -3560,14 +3662,14 @@ var PasswordInput = forwardRef7(
3560
3662
  type: visible ? "text" : "password",
3561
3663
  value,
3562
3664
  onChange,
3563
- suffix: /* @__PURE__ */ jsx41(
3665
+ suffix: /* @__PURE__ */ jsx42(
3564
3666
  ToggleButton,
3565
3667
  {
3566
3668
  type: "button",
3567
3669
  onClick: handleToggleVisibility,
3568
3670
  onMouseDown: (e) => e.preventDefault(),
3569
3671
  "aria-label": visible ? "Ocultar senha" : "Mostrar senha",
3570
- children: visible ? /* @__PURE__ */ jsx41(Icon, { name: "EyeClosed", size: 16, color: "black" }) : /* @__PURE__ */ jsx41(Icon, { name: "EyeOpen", size: 16, color: "black" })
3672
+ children: visible ? /* @__PURE__ */ jsx42(Icon, { name: "EyeClosed", size: 16, color: "black" }) : /* @__PURE__ */ jsx42(Icon, { name: "EyeOpen", size: 16, color: "black" })
3571
3673
  }
3572
3674
  )
3573
3675
  }
@@ -3575,7 +3677,108 @@ var PasswordInput = forwardRef7(
3575
3677
  }
3576
3678
  );
3577
3679
  PasswordInput.displayName = "PasswordInput";
3680
+
3681
+ // src/components/Accordion/index.tsx
3682
+ import * as RadixAccordion from "@radix-ui/react-accordion";
3683
+ import React6 from "react";
3684
+
3685
+ // src/components/Accordion/styles.ts
3686
+ import * as Accordion from "@radix-ui/react-accordion";
3687
+ var AccordionContainer = styled(Accordion.Root, {
3688
+ borderRadius: "$md",
3689
+ width: "100%",
3690
+ backgroundColor: "$white",
3691
+ boxShadow: "0 1px 2px $colors$gray_mid",
3692
+ border: "2px solid $colors$gray_mid"
3693
+ });
3694
+ var AccordionItem = styled(Accordion.Item, {
3695
+ overflow: "hidden",
3696
+ marginTop: "1px",
3697
+ "&:first-child": {
3698
+ marginTop: 0,
3699
+ borderTopLeftRadius: "$md",
3700
+ borderTopRightRadius: "$md"
3701
+ },
3702
+ "&:last-child": {
3703
+ borderBottomLeftRadius: "$md",
3704
+ borderBottomRightRadius: "$md"
3705
+ }
3706
+ });
3707
+ var AccordionHeader = styled(Accordion.Header, {
3708
+ display: "flex"
3709
+ });
3710
+ var AccordionTrigger = styled(Accordion.Trigger, {
3711
+ all: "unset",
3712
+ fontFamily: "$default",
3713
+ backgroundColor: "transparent",
3714
+ padding: "0 $5",
3715
+ flex: 1,
3716
+ display: "flex",
3717
+ alignItems: "center",
3718
+ justifyContent: "space-between",
3719
+ fontSize: "$md",
3720
+ lineHeight: "$regular",
3721
+ color: "$black",
3722
+ fontWeight: "$bold",
3723
+ width: "100%",
3724
+ "&:hover": {
3725
+ cursor: "pointer"
3726
+ },
3727
+ "&:focus": {
3728
+ cursor: "pointer",
3729
+ outline: "none"
3730
+ }
3731
+ });
3732
+ var AccordionChevron = styled(Icon, {
3733
+ color: "$ignite_light",
3734
+ transition: "transform 300ms cubic-bezier(0.87, 0, 0.13, 1)",
3735
+ "[data-state=open] &": {
3736
+ transform: "rotate(180deg)"
3737
+ }
3738
+ });
3739
+ var AccordionContent = styled(Accordion.Content, {
3740
+ overflow: "hidden",
3741
+ fontSize: "$md",
3742
+ color: "$black",
3743
+ borderTop: "1px solid $colors$gray_mid",
3744
+ '&[data-state="open"]': {
3745
+ animation: "slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1)"
3746
+ },
3747
+ '&[data-state="closed"]': {
3748
+ animation: "slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1)"
3749
+ },
3750
+ "> div": {
3751
+ padding: "$5"
3752
+ }
3753
+ });
3754
+ var TriggerContent = styled("div", {
3755
+ display: "flex",
3756
+ alignItems: "center",
3757
+ gap: "$2"
3758
+ });
3759
+ var OptionsButton = styled(Button, {
3760
+ marginRight: "$1"
3761
+ });
3762
+
3763
+ // src/components/Accordion/index.tsx
3764
+ import { jsx as jsx43, jsxs as jsxs20 } from "react/jsx-runtime";
3765
+ var Accordion2 = React6.forwardRef(
3766
+ ({ title, children, dropdownItems }, ref) => {
3767
+ return /* @__PURE__ */ jsx43(AccordionContainer, { type: "single", collapsible: true, ref, children: /* @__PURE__ */ jsxs20(AccordionItem, { value: "item-1", children: [
3768
+ /* @__PURE__ */ jsx43(AccordionHeader, { children: /* @__PURE__ */ jsxs20(AccordionTrigger, { children: [
3769
+ title,
3770
+ /* @__PURE__ */ jsxs20(TriggerContent, { children: [
3771
+ dropdownItems && dropdownItems,
3772
+ /* @__PURE__ */ jsx43(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ jsx43(AccordionChevron, { name: "TriangleDown", size: 16, "aria-hidden": true }) })
3773
+ ] })
3774
+ ] }) }),
3775
+ /* @__PURE__ */ jsx43(RadixAccordion.Content, { asChild: true, children: /* @__PURE__ */ jsx43(AccordionContent, { children }) })
3776
+ ] }) });
3777
+ }
3778
+ );
3779
+ Accordion2.displayName = "Accordion";
3578
3780
  export {
3781
+ Accordion2 as Accordion,
3579
3782
  Avatar2 as Avatar,
3580
3783
  Box,
3581
3784
  Button,
@@ -3583,6 +3786,9 @@ export {
3583
3786
  Carousel,
3584
3787
  Checkbox2 as Checkbox,
3585
3788
  Datepicker,
3789
+ Dropdown,
3790
+ DropdownItem,
3791
+ DropdownSeparator,
3586
3792
  Heading,
3587
3793
  Hr,
3588
3794
  Icon,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Design System da Clikpalm",
4
4
  "author": "Enisson Shilo",
5
5
  "license": "MIT",
6
- "version": "1.1.2",
6
+ "version": "1.2.0",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/clickpalm/clickpalm-designsystem-lib.git"
@@ -26,9 +26,11 @@
26
26
  "dev": "tsup src/index.tsx --format esm,cjs --dts --external react --watch"
27
27
  },
28
28
  "dependencies": {
29
+ "@radix-ui/react-accordion": "^1.2.11",
29
30
  "@radix-ui/react-avatar": "^1.0.0",
30
31
  "@radix-ui/react-checkbox": "^1.0.0",
31
32
  "@radix-ui/react-dialog": "^1.1.14",
33
+ "@radix-ui/react-dropdown-menu": "^2.1.15",
32
34
  "@radix-ui/react-icons": "^1.3.2",
33
35
  "@radix-ui/react-one-time-password-field": "^0.1.7",
34
36
  "@radix-ui/react-password-toggle-field": "^0.1.2",