@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.d.ts +455 -1
- package/dist/index.js +303 -93
- package/dist/index.mjs +284 -78
- package/package.json +3 -1
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/
|
|
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,
|
|
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
|
|
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,
|
|
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
|
|
2518
|
-
var
|
|
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,
|
|
2541
|
-
return /* @__PURE__ */ (0,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
2676
|
-
return /* @__PURE__ */ (0,
|
|
2677
|
-
label && /* @__PURE__ */ (0,
|
|
2678
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
2687
|
-
/* @__PURE__ */ (0,
|
|
2688
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
2691
|
-
/* @__PURE__ */ (0,
|
|
2692
|
-
|
|
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,
|
|
2699
|
-
/* @__PURE__ */ (0,
|
|
2700
|
-
/* @__PURE__ */ (0,
|
|
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
|
|
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
|
|
2879
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2774
2880
|
function LabelledValue({ position = "vertical", withRow = false, children }) {
|
|
2775
|
-
return /* @__PURE__ */ (0,
|
|
2776
|
-
if ((0,
|
|
2777
|
-
return (0,
|
|
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
|
|
2783
|
-
return /* @__PURE__ */ (0,
|
|
2784
|
-
/* @__PURE__ */ (0,
|
|
2785
|
-
/* @__PURE__ */ (0,
|
|
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 =
|
|
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"));
|
|
@@ -2853,11 +2959,11 @@ var Span7 = styled("span", {
|
|
|
2853
2959
|
});
|
|
2854
2960
|
|
|
2855
2961
|
// src/components/OneTimePassword/index.tsx
|
|
2856
|
-
var
|
|
2962
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2857
2963
|
var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...rootProps }) => {
|
|
2858
|
-
return /* @__PURE__ */ (0,
|
|
2859
|
-
/* @__PURE__ */ (0,
|
|
2860
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
2861
2967
|
StyledRoot4,
|
|
2862
2968
|
{
|
|
2863
2969
|
value,
|
|
@@ -2865,19 +2971,19 @@ var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...r
|
|
|
2865
2971
|
...rootProps,
|
|
2866
2972
|
style: { "--otp-length": length },
|
|
2867
2973
|
children: [
|
|
2868
|
-
Array.from({ length }).map((_, index) => /* @__PURE__ */ (0,
|
|
2869
|
-
/* @__PURE__ */ (0,
|
|
2974
|
+
Array.from({ length }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StyledInput, {}, index)),
|
|
2975
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(OneTimePasswordField2.HiddenInput, {})
|
|
2870
2976
|
]
|
|
2871
2977
|
}
|
|
2872
2978
|
),
|
|
2873
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2979
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Span7, { children: errorMessage })
|
|
2874
2980
|
] }) });
|
|
2875
2981
|
};
|
|
2876
2982
|
OneTimePassword.displayName = "OneTimePasswordInput";
|
|
2877
2983
|
|
|
2878
2984
|
// src/components/Toast/index.tsx
|
|
2879
2985
|
var ToastPrimitive2 = __toESM(require("@radix-ui/react-toast"));
|
|
2880
|
-
var
|
|
2986
|
+
var React4 = __toESM(require("react"));
|
|
2881
2987
|
|
|
2882
2988
|
// src/components/Toast/styles.ts
|
|
2883
2989
|
var ToastPrimitive = __toESM(require("@radix-ui/react-toast"));
|
|
@@ -3040,11 +3146,11 @@ var toast = {
|
|
|
3040
3146
|
};
|
|
3041
3147
|
|
|
3042
3148
|
// src/components/Toast/index.tsx
|
|
3043
|
-
var
|
|
3149
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3044
3150
|
var Toast = () => {
|
|
3045
|
-
const [messages, setMessages] =
|
|
3046
|
-
const [paused, setPaused] =
|
|
3047
|
-
|
|
3151
|
+
const [messages, setMessages] = React4.useState([]);
|
|
3152
|
+
const [paused, setPaused] = React4.useState(false);
|
|
3153
|
+
React4.useEffect(() => {
|
|
3048
3154
|
const handleNewToast = (msg) => {
|
|
3049
3155
|
setMessages((prev) => [...prev, msg]);
|
|
3050
3156
|
};
|
|
@@ -3056,8 +3162,8 @@ var Toast = () => {
|
|
|
3056
3162
|
const removeToast = (id) => {
|
|
3057
3163
|
setMessages((prev) => prev.filter((msg) => msg.id !== id));
|
|
3058
3164
|
};
|
|
3059
|
-
return /* @__PURE__ */ (0,
|
|
3060
|
-
messages.map((message) => /* @__PURE__ */ (0,
|
|
3165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(ToastPrimitive2.Provider, { swipeDirection: "right", children: [
|
|
3166
|
+
messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3061
3167
|
ToastRoot,
|
|
3062
3168
|
{
|
|
3063
3169
|
open: true,
|
|
@@ -3070,11 +3176,11 @@ var Toast = () => {
|
|
|
3070
3176
|
onPause: () => setPaused(true),
|
|
3071
3177
|
onResume: () => setPaused(false),
|
|
3072
3178
|
children: [
|
|
3073
|
-
/* @__PURE__ */ (0,
|
|
3074
|
-
/* @__PURE__ */ (0,
|
|
3075
|
-
message.description && /* @__PURE__ */ (0,
|
|
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 })
|
|
3076
3182
|
] }),
|
|
3077
|
-
/* @__PURE__ */ (0,
|
|
3183
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3078
3184
|
"button",
|
|
3079
3185
|
{
|
|
3080
3186
|
style: {
|
|
@@ -3084,15 +3190,15 @@ var Toast = () => {
|
|
|
3084
3190
|
alignItems: "center"
|
|
3085
3191
|
},
|
|
3086
3192
|
onClick: () => removeToast(message.id),
|
|
3087
|
-
children: /* @__PURE__ */ (0,
|
|
3193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
|
|
3088
3194
|
}
|
|
3089
3195
|
) }),
|
|
3090
|
-
/* @__PURE__ */ (0,
|
|
3196
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ToastProgress, { paused, variant: message.variant })
|
|
3091
3197
|
]
|
|
3092
3198
|
},
|
|
3093
3199
|
message.id
|
|
3094
3200
|
)),
|
|
3095
|
-
/* @__PURE__ */ (0,
|
|
3201
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ToastViewport, {})
|
|
3096
3202
|
] });
|
|
3097
3203
|
};
|
|
3098
3204
|
|
|
@@ -3328,22 +3434,22 @@ var StepLabel = styled("span", {
|
|
|
3328
3434
|
});
|
|
3329
3435
|
|
|
3330
3436
|
// src/components/MultiStep/index.tsx
|
|
3331
|
-
var
|
|
3437
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3332
3438
|
var MultiStep = ({
|
|
3333
3439
|
steps,
|
|
3334
3440
|
currentStep,
|
|
3335
3441
|
orientation = "horizontal",
|
|
3336
3442
|
variant
|
|
3337
3443
|
}) => {
|
|
3338
|
-
return /* @__PURE__ */ (0,
|
|
3444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3339
3445
|
Wrapper5,
|
|
3340
3446
|
{
|
|
3341
3447
|
orientation,
|
|
3342
3448
|
children: steps.map((step, index) => {
|
|
3343
3449
|
const isFirst = index === 0;
|
|
3344
3450
|
const isLast = index === steps.length - 1;
|
|
3345
|
-
return /* @__PURE__ */ (0,
|
|
3346
|
-
/* @__PURE__ */ (0,
|
|
3451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(StepItem, { orientation, children: [
|
|
3452
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3347
3453
|
StepCircle,
|
|
3348
3454
|
{
|
|
3349
3455
|
orientation,
|
|
@@ -3354,7 +3460,7 @@ var MultiStep = ({
|
|
|
3354
3460
|
children: index + 1
|
|
3355
3461
|
}
|
|
3356
3462
|
),
|
|
3357
|
-
/* @__PURE__ */ (0,
|
|
3463
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3358
3464
|
StepLabel,
|
|
3359
3465
|
{
|
|
3360
3466
|
orientation,
|
|
@@ -3370,7 +3476,7 @@ var MultiStep = ({
|
|
|
3370
3476
|
MultiStep.displayName = "MultiStep";
|
|
3371
3477
|
|
|
3372
3478
|
// src/components/Carousel/index.tsx
|
|
3373
|
-
var
|
|
3479
|
+
var import_react17 = require("react");
|
|
3374
3480
|
|
|
3375
3481
|
// src/components/Carousel/styles.ts
|
|
3376
3482
|
var CarouselContainer = styled("div", {
|
|
@@ -3476,13 +3582,13 @@ var CarouselItemContainer = styled("div", {
|
|
|
3476
3582
|
});
|
|
3477
3583
|
|
|
3478
3584
|
// src/components/Carousel/index.tsx
|
|
3479
|
-
var
|
|
3585
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3480
3586
|
var SWIPE_THRESHOLD = 50;
|
|
3481
3587
|
var Carousel = ({ title, variant, children }) => {
|
|
3482
|
-
const items =
|
|
3483
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
3484
|
-
const [touchStartX, setTouchStartX] = (0,
|
|
3485
|
-
const [touchEndX, setTouchEndX] = (0,
|
|
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);
|
|
3486
3592
|
const prev = () => {
|
|
3487
3593
|
setActiveIndex((prevIndex) => prevIndex === 0 ? items.length - 1 : prevIndex - 1);
|
|
3488
3594
|
};
|
|
@@ -3510,18 +3616,18 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3510
3616
|
setTouchStartX(null);
|
|
3511
3617
|
setTouchEndX(null);
|
|
3512
3618
|
};
|
|
3513
|
-
return /* @__PURE__ */ (0,
|
|
3619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3514
3620
|
CarouselContainer,
|
|
3515
3621
|
{
|
|
3516
3622
|
role: "region",
|
|
3517
3623
|
"aria-roledescription": "carousel",
|
|
3518
3624
|
"aria-label": "Carousel Component",
|
|
3519
3625
|
children: [
|
|
3520
|
-
/* @__PURE__ */ (0,
|
|
3521
|
-
/* @__PURE__ */ (0,
|
|
3522
|
-
/* @__PURE__ */ (0,
|
|
3523
|
-
/* @__PURE__ */ (0,
|
|
3524
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
3525
3631
|
Button,
|
|
3526
3632
|
{
|
|
3527
3633
|
size: "sm",
|
|
@@ -3529,10 +3635,10 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3529
3635
|
"aria-label": "Previous Slide",
|
|
3530
3636
|
onClick: prev,
|
|
3531
3637
|
tabIndex: 0,
|
|
3532
|
-
children: /* @__PURE__ */ (0,
|
|
3638
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
3533
3639
|
}
|
|
3534
3640
|
),
|
|
3535
|
-
/* @__PURE__ */ (0,
|
|
3641
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3536
3642
|
Button,
|
|
3537
3643
|
{
|
|
3538
3644
|
size: "sm",
|
|
@@ -3540,22 +3646,22 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3540
3646
|
"aria-label": "Previous Slide",
|
|
3541
3647
|
onClick: next,
|
|
3542
3648
|
tabIndex: 0,
|
|
3543
|
-
children: /* @__PURE__ */ (0,
|
|
3649
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
3544
3650
|
}
|
|
3545
3651
|
)
|
|
3546
3652
|
] })
|
|
3547
3653
|
] }),
|
|
3548
|
-
/* @__PURE__ */ (0,
|
|
3549
|
-
/* @__PURE__ */ (0,
|
|
3550
|
-
/* @__PURE__ */ (0,
|
|
3551
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
3552
3658
|
CarouselContent,
|
|
3553
3659
|
{
|
|
3554
3660
|
onTouchStart,
|
|
3555
3661
|
onTouchMove,
|
|
3556
3662
|
onTouchEnd,
|
|
3557
3663
|
children: items.map(
|
|
3558
|
-
(child, index) => (0,
|
|
3664
|
+
(child, index) => (0, import_react17.cloneElement)(child, {
|
|
3559
3665
|
"aria-hidden": index !== activeIndex,
|
|
3560
3666
|
style: {
|
|
3561
3667
|
display: index === activeIndex ? "block" : "none"
|
|
@@ -3565,8 +3671,8 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3565
3671
|
}
|
|
3566
3672
|
)
|
|
3567
3673
|
] }),
|
|
3568
|
-
/* @__PURE__ */ (0,
|
|
3569
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
3570
3676
|
DotButton,
|
|
3571
3677
|
{
|
|
3572
3678
|
active: idx === activeIndex,
|
|
@@ -3582,12 +3688,12 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3582
3688
|
}
|
|
3583
3689
|
);
|
|
3584
3690
|
};
|
|
3585
|
-
var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ (0,
|
|
3691
|
+
var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselItemContainer, { ...props, style: { ...style }, children });
|
|
3586
3692
|
Carousel.Item = CarouselItem;
|
|
3587
3693
|
|
|
3588
3694
|
// src/components/PasswordInput.tsx
|
|
3589
|
-
var
|
|
3590
|
-
var
|
|
3695
|
+
var import_react18 = require("react");
|
|
3696
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3591
3697
|
var ToggleButton = styled("button", {
|
|
3592
3698
|
all: "unset",
|
|
3593
3699
|
cursor: "pointer",
|
|
@@ -3602,11 +3708,11 @@ var ToggleButton = styled("button", {
|
|
|
3602
3708
|
borderRadius: "$sm"
|
|
3603
3709
|
}
|
|
3604
3710
|
});
|
|
3605
|
-
var PasswordInput = (0,
|
|
3711
|
+
var PasswordInput = (0, import_react18.forwardRef)(
|
|
3606
3712
|
({ value, onChange, ...props }, ref) => {
|
|
3607
|
-
const [visible, setVisible] = (0,
|
|
3608
|
-
const innerRef = (0,
|
|
3609
|
-
(0,
|
|
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);
|
|
3610
3716
|
const handleToggleVisibility = () => {
|
|
3611
3717
|
setVisible((v) => !v);
|
|
3612
3718
|
setTimeout(() => {
|
|
@@ -3616,7 +3722,7 @@ var PasswordInput = (0, import_react17.forwardRef)(
|
|
|
3616
3722
|
}
|
|
3617
3723
|
}, 0);
|
|
3618
3724
|
};
|
|
3619
|
-
return /* @__PURE__ */ (0,
|
|
3725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3620
3726
|
Input2,
|
|
3621
3727
|
{
|
|
3622
3728
|
...props,
|
|
@@ -3624,14 +3730,14 @@ var PasswordInput = (0, import_react17.forwardRef)(
|
|
|
3624
3730
|
type: visible ? "text" : "password",
|
|
3625
3731
|
value,
|
|
3626
3732
|
onChange,
|
|
3627
|
-
suffix: /* @__PURE__ */ (0,
|
|
3733
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3628
3734
|
ToggleButton,
|
|
3629
3735
|
{
|
|
3630
3736
|
type: "button",
|
|
3631
3737
|
onClick: handleToggleVisibility,
|
|
3632
3738
|
onMouseDown: (e) => e.preventDefault(),
|
|
3633
3739
|
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
3634
|
-
children: visible ? /* @__PURE__ */ (0,
|
|
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" })
|
|
3635
3741
|
}
|
|
3636
3742
|
)
|
|
3637
3743
|
}
|
|
@@ -3639,8 +3745,109 @@ var PasswordInput = (0, import_react17.forwardRef)(
|
|
|
3639
3745
|
}
|
|
3640
3746
|
);
|
|
3641
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";
|
|
3642
3848
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3643
3849
|
0 && (module.exports = {
|
|
3850
|
+
Accordion,
|
|
3644
3851
|
Avatar,
|
|
3645
3852
|
Box,
|
|
3646
3853
|
Button,
|
|
@@ -3648,6 +3855,9 @@ PasswordInput.displayName = "PasswordInput";
|
|
|
3648
3855
|
Carousel,
|
|
3649
3856
|
Checkbox,
|
|
3650
3857
|
Datepicker,
|
|
3858
|
+
Dropdown,
|
|
3859
|
+
DropdownItem,
|
|
3860
|
+
DropdownSeparator,
|
|
3651
3861
|
Heading,
|
|
3652
3862
|
Hr,
|
|
3653
3863
|
Icon,
|