@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.d.ts +457 -3
- package/dist/index.js +332 -115
- package/dist/index.mjs +313 -100
- package/package.json +3 -1
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
|
|
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__ */
|
|
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
|
|
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__ */
|
|
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
|
|
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__ */
|
|
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
|
|
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
|
|
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
|
|
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__ */
|
|
2609
|
-
label && /* @__PURE__ */
|
|
2610
|
-
/* @__PURE__ */
|
|
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__ */
|
|
2619
|
-
/* @__PURE__ */
|
|
2620
|
-
/* @__PURE__ */
|
|
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__ */
|
|
2623
|
-
/* @__PURE__ */
|
|
2624
|
-
|
|
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__ */
|
|
2631
|
-
/* @__PURE__ */
|
|
2632
|
-
/* @__PURE__ */
|
|
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
|
|
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
|
|
2811
|
+
import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2710
2812
|
function LabelledValue({ position = "vertical", withRow = false, children }) {
|
|
2711
|
-
return /* @__PURE__ */
|
|
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
|
|
2719
|
-
return /* @__PURE__ */
|
|
2720
|
-
/* @__PURE__ */
|
|
2721
|
-
/* @__PURE__ */
|
|
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 =
|
|
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";
|
|
@@ -2733,17 +2835,24 @@ var Container2 = styled("div", {
|
|
|
2733
2835
|
flexDirection: "column",
|
|
2734
2836
|
justifyContent: "center",
|
|
2735
2837
|
alignItems: "center",
|
|
2736
|
-
marginBottom: "$6"
|
|
2838
|
+
marginBottom: "$6",
|
|
2839
|
+
width: "100%"
|
|
2737
2840
|
});
|
|
2738
2841
|
var StyledWrapper5 = styled("div", {
|
|
2739
2842
|
display: "flex",
|
|
2740
|
-
flexDirection: "column"
|
|
2741
|
-
gap: "$5"
|
|
2843
|
+
flexDirection: "column"
|
|
2742
2844
|
});
|
|
2743
2845
|
var StyledRoot4 = styled(OneTimePasswordField.Root, {
|
|
2744
|
-
display: "
|
|
2846
|
+
display: "grid",
|
|
2745
2847
|
gap: "$2",
|
|
2746
|
-
|
|
2848
|
+
gridTemplateColumns: "repeat(var(--otp-length), 1fr)",
|
|
2849
|
+
width: "100%"
|
|
2850
|
+
});
|
|
2851
|
+
var StyledLabel3 = styled(OneTimePasswordField.Root, {
|
|
2852
|
+
display: "flex",
|
|
2853
|
+
justifyContent: "center",
|
|
2854
|
+
alignItems: "center",
|
|
2855
|
+
marginBottom: "$5"
|
|
2747
2856
|
});
|
|
2748
2857
|
var StyledInput = styled(OneTimePasswordField.Input, {
|
|
2749
2858
|
all: "unset",
|
|
@@ -2760,8 +2869,9 @@ var StyledInput = styled(OneTimePasswordField.Input, {
|
|
|
2760
2869
|
fontSize: "$md",
|
|
2761
2870
|
color: "$black",
|
|
2762
2871
|
padding: "0",
|
|
2763
|
-
|
|
2764
|
-
|
|
2872
|
+
width: "100%",
|
|
2873
|
+
aspectRatio: "1 / 1",
|
|
2874
|
+
maxWidth: "53px",
|
|
2765
2875
|
"&:hover": {
|
|
2766
2876
|
borderColor: "$gray_dark"
|
|
2767
2877
|
},
|
|
@@ -2781,32 +2891,31 @@ var Span7 = styled("span", {
|
|
|
2781
2891
|
});
|
|
2782
2892
|
|
|
2783
2893
|
// src/components/OneTimePassword/index.tsx
|
|
2784
|
-
import { jsx as
|
|
2894
|
+
import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2785
2895
|
var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...rootProps }) => {
|
|
2786
|
-
return /* @__PURE__ */
|
|
2787
|
-
/* @__PURE__ */
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
] });
|
|
2896
|
+
return /* @__PURE__ */ jsx38(Container2, { children: /* @__PURE__ */ jsxs16(StyledWrapper5, { children: [
|
|
2897
|
+
/* @__PURE__ */ jsx38(StyledLabel3, { children: label }),
|
|
2898
|
+
/* @__PURE__ */ jsxs16(
|
|
2899
|
+
StyledRoot4,
|
|
2900
|
+
{
|
|
2901
|
+
value,
|
|
2902
|
+
onValueChange,
|
|
2903
|
+
...rootProps,
|
|
2904
|
+
style: { "--otp-length": length },
|
|
2905
|
+
children: [
|
|
2906
|
+
Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx38(StyledInput, {}, index)),
|
|
2907
|
+
/* @__PURE__ */ jsx38(OneTimePasswordField2.HiddenInput, {})
|
|
2908
|
+
]
|
|
2909
|
+
}
|
|
2910
|
+
),
|
|
2911
|
+
errorMessage && /* @__PURE__ */ jsx38(Span7, { children: errorMessage })
|
|
2912
|
+
] }) });
|
|
2804
2913
|
};
|
|
2805
2914
|
OneTimePassword.displayName = "OneTimePasswordInput";
|
|
2806
2915
|
|
|
2807
2916
|
// src/components/Toast/index.tsx
|
|
2808
2917
|
import * as ToastPrimitive2 from "@radix-ui/react-toast";
|
|
2809
|
-
import * as
|
|
2918
|
+
import * as React4 from "react";
|
|
2810
2919
|
|
|
2811
2920
|
// src/components/Toast/styles.ts
|
|
2812
2921
|
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
@@ -2969,11 +3078,11 @@ var toast = {
|
|
|
2969
3078
|
};
|
|
2970
3079
|
|
|
2971
3080
|
// src/components/Toast/index.tsx
|
|
2972
|
-
import { jsx as
|
|
3081
|
+
import { jsx as jsx39, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2973
3082
|
var Toast = () => {
|
|
2974
|
-
const [messages, setMessages] =
|
|
2975
|
-
const [paused, setPaused] =
|
|
2976
|
-
|
|
3083
|
+
const [messages, setMessages] = React4.useState([]);
|
|
3084
|
+
const [paused, setPaused] = React4.useState(false);
|
|
3085
|
+
React4.useEffect(() => {
|
|
2977
3086
|
const handleNewToast = (msg) => {
|
|
2978
3087
|
setMessages((prev) => [...prev, msg]);
|
|
2979
3088
|
};
|
|
@@ -2985,8 +3094,8 @@ var Toast = () => {
|
|
|
2985
3094
|
const removeToast = (id) => {
|
|
2986
3095
|
setMessages((prev) => prev.filter((msg) => msg.id !== id));
|
|
2987
3096
|
};
|
|
2988
|
-
return /* @__PURE__ */
|
|
2989
|
-
messages.map((message) => /* @__PURE__ */
|
|
3097
|
+
return /* @__PURE__ */ jsxs17(ToastPrimitive2.Provider, { swipeDirection: "right", children: [
|
|
3098
|
+
messages.map((message) => /* @__PURE__ */ jsxs17(
|
|
2990
3099
|
ToastRoot,
|
|
2991
3100
|
{
|
|
2992
3101
|
open: true,
|
|
@@ -2999,11 +3108,11 @@ var Toast = () => {
|
|
|
2999
3108
|
onPause: () => setPaused(true),
|
|
3000
3109
|
onResume: () => setPaused(false),
|
|
3001
3110
|
children: [
|
|
3002
|
-
/* @__PURE__ */
|
|
3003
|
-
/* @__PURE__ */
|
|
3004
|
-
message.description && /* @__PURE__ */
|
|
3111
|
+
/* @__PURE__ */ jsxs17(ToastContent, { children: [
|
|
3112
|
+
/* @__PURE__ */ jsx39(ToastTitle, { children: message.title }),
|
|
3113
|
+
message.description && /* @__PURE__ */ jsx39(ToastDescription, { children: message.description })
|
|
3005
3114
|
] }),
|
|
3006
|
-
/* @__PURE__ */
|
|
3115
|
+
/* @__PURE__ */ jsx39(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ jsx39(
|
|
3007
3116
|
"button",
|
|
3008
3117
|
{
|
|
3009
3118
|
style: {
|
|
@@ -3013,15 +3122,15 @@ var Toast = () => {
|
|
|
3013
3122
|
alignItems: "center"
|
|
3014
3123
|
},
|
|
3015
3124
|
onClick: () => removeToast(message.id),
|
|
3016
|
-
children: /* @__PURE__ */
|
|
3125
|
+
children: /* @__PURE__ */ jsx39(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
|
|
3017
3126
|
}
|
|
3018
3127
|
) }),
|
|
3019
|
-
/* @__PURE__ */
|
|
3128
|
+
/* @__PURE__ */ jsx39(ToastProgress, { paused, variant: message.variant })
|
|
3020
3129
|
]
|
|
3021
3130
|
},
|
|
3022
3131
|
message.id
|
|
3023
3132
|
)),
|
|
3024
|
-
/* @__PURE__ */
|
|
3133
|
+
/* @__PURE__ */ jsx39(ToastViewport, {})
|
|
3025
3134
|
] });
|
|
3026
3135
|
};
|
|
3027
3136
|
|
|
@@ -3033,7 +3142,8 @@ var Wrapper5 = styled("div", {
|
|
|
3033
3142
|
variants: {
|
|
3034
3143
|
orientation: {
|
|
3035
3144
|
horizontal: {
|
|
3036
|
-
|
|
3145
|
+
display: "grid",
|
|
3146
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(100px, 1fr))",
|
|
3037
3147
|
alignItems: "center",
|
|
3038
3148
|
gap: "var(--gap)"
|
|
3039
3149
|
},
|
|
@@ -3051,7 +3161,6 @@ var StepItem = styled("div", {
|
|
|
3051
3161
|
variants: {
|
|
3052
3162
|
orientation: {
|
|
3053
3163
|
horizontal: {
|
|
3054
|
-
flex: 1,
|
|
3055
3164
|
flexDirection: "column",
|
|
3056
3165
|
textAlign: "center"
|
|
3057
3166
|
},
|
|
@@ -3064,7 +3173,7 @@ var StepItem = styled("div", {
|
|
|
3064
3173
|
});
|
|
3065
3174
|
var StepCircle = styled("div", {
|
|
3066
3175
|
position: "relative",
|
|
3067
|
-
zIndex:
|
|
3176
|
+
zIndex: 990,
|
|
3068
3177
|
width: "var(--circle-size)",
|
|
3069
3178
|
height: "var(--circle-size)",
|
|
3070
3179
|
borderRadius: "50%",
|
|
@@ -3257,22 +3366,22 @@ var StepLabel = styled("span", {
|
|
|
3257
3366
|
});
|
|
3258
3367
|
|
|
3259
3368
|
// src/components/MultiStep/index.tsx
|
|
3260
|
-
import { jsx as
|
|
3369
|
+
import { jsx as jsx40, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3261
3370
|
var MultiStep = ({
|
|
3262
3371
|
steps,
|
|
3263
3372
|
currentStep,
|
|
3264
3373
|
orientation = "horizontal",
|
|
3265
3374
|
variant
|
|
3266
3375
|
}) => {
|
|
3267
|
-
return /* @__PURE__ */
|
|
3376
|
+
return /* @__PURE__ */ jsx40(
|
|
3268
3377
|
Wrapper5,
|
|
3269
3378
|
{
|
|
3270
3379
|
orientation,
|
|
3271
3380
|
children: steps.map((step, index) => {
|
|
3272
3381
|
const isFirst = index === 0;
|
|
3273
3382
|
const isLast = index === steps.length - 1;
|
|
3274
|
-
return /* @__PURE__ */
|
|
3275
|
-
/* @__PURE__ */
|
|
3383
|
+
return /* @__PURE__ */ jsxs18(StepItem, { orientation, children: [
|
|
3384
|
+
/* @__PURE__ */ jsx40(
|
|
3276
3385
|
StepCircle,
|
|
3277
3386
|
{
|
|
3278
3387
|
orientation,
|
|
@@ -3283,7 +3392,7 @@ var MultiStep = ({
|
|
|
3283
3392
|
children: index + 1
|
|
3284
3393
|
}
|
|
3285
3394
|
),
|
|
3286
|
-
/* @__PURE__ */
|
|
3395
|
+
/* @__PURE__ */ jsx40(
|
|
3287
3396
|
StepLabel,
|
|
3288
3397
|
{
|
|
3289
3398
|
orientation,
|
|
@@ -3299,7 +3408,7 @@ var MultiStep = ({
|
|
|
3299
3408
|
MultiStep.displayName = "MultiStep";
|
|
3300
3409
|
|
|
3301
3410
|
// src/components/Carousel/index.tsx
|
|
3302
|
-
import { useState as useState8, Children as
|
|
3411
|
+
import { useState as useState8, Children as Children4, cloneElement as cloneElement2 } from "react";
|
|
3303
3412
|
|
|
3304
3413
|
// src/components/Carousel/styles.ts
|
|
3305
3414
|
var CarouselContainer = styled("div", {
|
|
@@ -3405,10 +3514,10 @@ var CarouselItemContainer = styled("div", {
|
|
|
3405
3514
|
});
|
|
3406
3515
|
|
|
3407
3516
|
// src/components/Carousel/index.tsx
|
|
3408
|
-
import { jsx as
|
|
3517
|
+
import { jsx as jsx41, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3409
3518
|
var SWIPE_THRESHOLD = 50;
|
|
3410
3519
|
var Carousel = ({ title, variant, children }) => {
|
|
3411
|
-
const items =
|
|
3520
|
+
const items = Children4.toArray(children);
|
|
3412
3521
|
const [activeIndex, setActiveIndex] = useState8(0);
|
|
3413
3522
|
const [touchStartX, setTouchStartX] = useState8(null);
|
|
3414
3523
|
const [touchEndX, setTouchEndX] = useState8(null);
|
|
@@ -3439,18 +3548,18 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3439
3548
|
setTouchStartX(null);
|
|
3440
3549
|
setTouchEndX(null);
|
|
3441
3550
|
};
|
|
3442
|
-
return /* @__PURE__ */
|
|
3551
|
+
return /* @__PURE__ */ jsxs19(
|
|
3443
3552
|
CarouselContainer,
|
|
3444
3553
|
{
|
|
3445
3554
|
role: "region",
|
|
3446
3555
|
"aria-roledescription": "carousel",
|
|
3447
3556
|
"aria-label": "Carousel Component",
|
|
3448
3557
|
children: [
|
|
3449
|
-
/* @__PURE__ */
|
|
3450
|
-
/* @__PURE__ */
|
|
3451
|
-
/* @__PURE__ */
|
|
3452
|
-
/* @__PURE__ */
|
|
3453
|
-
/* @__PURE__ */
|
|
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(
|
|
3454
3563
|
Button,
|
|
3455
3564
|
{
|
|
3456
3565
|
size: "sm",
|
|
@@ -3458,10 +3567,10 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3458
3567
|
"aria-label": "Previous Slide",
|
|
3459
3568
|
onClick: prev,
|
|
3460
3569
|
tabIndex: 0,
|
|
3461
|
-
children: /* @__PURE__ */
|
|
3570
|
+
children: /* @__PURE__ */ jsx41(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
3462
3571
|
}
|
|
3463
3572
|
),
|
|
3464
|
-
/* @__PURE__ */
|
|
3573
|
+
/* @__PURE__ */ jsx41(
|
|
3465
3574
|
Button,
|
|
3466
3575
|
{
|
|
3467
3576
|
size: "sm",
|
|
@@ -3469,15 +3578,15 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3469
3578
|
"aria-label": "Previous Slide",
|
|
3470
3579
|
onClick: next,
|
|
3471
3580
|
tabIndex: 0,
|
|
3472
|
-
children: /* @__PURE__ */
|
|
3581
|
+
children: /* @__PURE__ */ jsx41(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
3473
3582
|
}
|
|
3474
3583
|
)
|
|
3475
3584
|
] })
|
|
3476
3585
|
] }),
|
|
3477
|
-
/* @__PURE__ */
|
|
3478
|
-
/* @__PURE__ */
|
|
3479
|
-
/* @__PURE__ */
|
|
3480
|
-
/* @__PURE__ */
|
|
3586
|
+
/* @__PURE__ */ jsx41(Spacing, { size: "xs" }),
|
|
3587
|
+
/* @__PURE__ */ jsx41(Hr, { variant }),
|
|
3588
|
+
/* @__PURE__ */ jsx41(Spacing, { size: "xs" }),
|
|
3589
|
+
/* @__PURE__ */ jsx41(
|
|
3481
3590
|
CarouselContent,
|
|
3482
3591
|
{
|
|
3483
3592
|
onTouchStart,
|
|
@@ -3494,8 +3603,8 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3494
3603
|
}
|
|
3495
3604
|
)
|
|
3496
3605
|
] }),
|
|
3497
|
-
/* @__PURE__ */
|
|
3498
|
-
/* @__PURE__ */
|
|
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(
|
|
3499
3608
|
DotButton,
|
|
3500
3609
|
{
|
|
3501
3610
|
active: idx === activeIndex,
|
|
@@ -3511,12 +3620,12 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3511
3620
|
}
|
|
3512
3621
|
);
|
|
3513
3622
|
};
|
|
3514
|
-
var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */
|
|
3623
|
+
var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ jsx41(CarouselItemContainer, { ...props, style: { ...style }, children });
|
|
3515
3624
|
Carousel.Item = CarouselItem;
|
|
3516
3625
|
|
|
3517
3626
|
// src/components/PasswordInput.tsx
|
|
3518
3627
|
import { forwardRef as forwardRef7, useImperativeHandle, useRef as useRef6, useState as useState9 } from "react";
|
|
3519
|
-
import { jsx as
|
|
3628
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3520
3629
|
var ToggleButton = styled("button", {
|
|
3521
3630
|
all: "unset",
|
|
3522
3631
|
cursor: "pointer",
|
|
@@ -3545,7 +3654,7 @@ var PasswordInput = forwardRef7(
|
|
|
3545
3654
|
}
|
|
3546
3655
|
}, 0);
|
|
3547
3656
|
};
|
|
3548
|
-
return /* @__PURE__ */
|
|
3657
|
+
return /* @__PURE__ */ jsx42(
|
|
3549
3658
|
Input2,
|
|
3550
3659
|
{
|
|
3551
3660
|
...props,
|
|
@@ -3553,14 +3662,14 @@ var PasswordInput = forwardRef7(
|
|
|
3553
3662
|
type: visible ? "text" : "password",
|
|
3554
3663
|
value,
|
|
3555
3664
|
onChange,
|
|
3556
|
-
suffix: /* @__PURE__ */
|
|
3665
|
+
suffix: /* @__PURE__ */ jsx42(
|
|
3557
3666
|
ToggleButton,
|
|
3558
3667
|
{
|
|
3559
3668
|
type: "button",
|
|
3560
3669
|
onClick: handleToggleVisibility,
|
|
3561
3670
|
onMouseDown: (e) => e.preventDefault(),
|
|
3562
3671
|
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
3563
|
-
children: visible ? /* @__PURE__ */
|
|
3672
|
+
children: visible ? /* @__PURE__ */ jsx42(Icon, { name: "EyeClosed", size: 16, color: "black" }) : /* @__PURE__ */ jsx42(Icon, { name: "EyeOpen", size: 16, color: "black" })
|
|
3564
3673
|
}
|
|
3565
3674
|
)
|
|
3566
3675
|
}
|
|
@@ -3568,7 +3677,108 @@ var PasswordInput = forwardRef7(
|
|
|
3568
3677
|
}
|
|
3569
3678
|
);
|
|
3570
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";
|
|
3571
3780
|
export {
|
|
3781
|
+
Accordion2 as Accordion,
|
|
3572
3782
|
Avatar2 as Avatar,
|
|
3573
3783
|
Box,
|
|
3574
3784
|
Button,
|
|
@@ -3576,6 +3786,9 @@ export {
|
|
|
3576
3786
|
Carousel,
|
|
3577
3787
|
Checkbox2 as Checkbox,
|
|
3578
3788
|
Datepicker,
|
|
3789
|
+
Dropdown,
|
|
3790
|
+
DropdownItem,
|
|
3791
|
+
DropdownSeparator,
|
|
3579
3792
|
Heading,
|
|
3580
3793
|
Hr,
|
|
3581
3794
|
Icon,
|