@clickpalm/react 1.1.2 → 1.2.1
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 +482 -23
- package/dist/index.js +417 -173
- package/dist/index.mjs +391 -151
- package/package.json +3 -1
package/dist/index.mjs
CHANGED
|
@@ -1069,7 +1069,8 @@ var CheckboxLabel = styled("label", {
|
|
|
1069
1069
|
display: "flex",
|
|
1070
1070
|
paddingLeft: "$3",
|
|
1071
1071
|
fontSize: "$md",
|
|
1072
|
-
lineHeight: "$base"
|
|
1072
|
+
lineHeight: "$base",
|
|
1073
|
+
color: "$black"
|
|
1073
1074
|
});
|
|
1074
1075
|
var Span = styled("span", {
|
|
1075
1076
|
fontFamily: "$default",
|
|
@@ -1140,7 +1141,7 @@ var TextInputContainer = styled("div", {
|
|
|
1140
1141
|
padding: "$4 $4",
|
|
1141
1142
|
marginBottom: "$6",
|
|
1142
1143
|
FontSize: "$md",
|
|
1143
|
-
"&:has(input:focus)": {
|
|
1144
|
+
"&:has(input:focus), &:hover": {
|
|
1144
1145
|
border: "2px solid $clickpalm_light"
|
|
1145
1146
|
},
|
|
1146
1147
|
"&:has(input:disabled)": {
|
|
@@ -1161,7 +1162,7 @@ var TextInputContainer = styled("div", {
|
|
|
1161
1162
|
true: {
|
|
1162
1163
|
border: "1px solid $danger_dark",
|
|
1163
1164
|
marginBottom: "0px",
|
|
1164
|
-
"&:has(input:focus)": {
|
|
1165
|
+
"&:has(input:focus), &:hover": {
|
|
1165
1166
|
border: "2px solid $danger_dark"
|
|
1166
1167
|
}
|
|
1167
1168
|
}
|
|
@@ -1426,14 +1427,13 @@ import * as Dialog2 from "@radix-ui/react-dialog";
|
|
|
1426
1427
|
|
|
1427
1428
|
// src/components/Modal/styles.ts
|
|
1428
1429
|
import * as Dialog from "@radix-ui/react-dialog";
|
|
1429
|
-
|
|
1430
|
-
var StyledOverlay = styled2(Dialog.Overlay, {
|
|
1430
|
+
var StyledOverlay = styled(Dialog.Overlay, {
|
|
1431
1431
|
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
1432
1432
|
position: "fixed",
|
|
1433
1433
|
inset: 0,
|
|
1434
|
-
zIndex:
|
|
1434
|
+
zIndex: 101
|
|
1435
1435
|
});
|
|
1436
|
-
var StyledContent =
|
|
1436
|
+
var StyledContent = styled(Dialog.Content, {
|
|
1437
1437
|
position: "fixed",
|
|
1438
1438
|
top: "50%",
|
|
1439
1439
|
left: "50%",
|
|
@@ -1446,19 +1446,21 @@ var StyledContent = styled2(Dialog.Content, {
|
|
|
1446
1446
|
borderRadius: "$md",
|
|
1447
1447
|
boxShadow: "0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)",
|
|
1448
1448
|
transform: "translate(-50%, -50%)",
|
|
1449
|
-
zIndex:
|
|
1450
|
-
fontFamily: "$default"
|
|
1449
|
+
zIndex: 102,
|
|
1450
|
+
fontFamily: "$default",
|
|
1451
|
+
fontWeight: "$regular"
|
|
1451
1452
|
});
|
|
1452
|
-
var Wrapper =
|
|
1453
|
+
var Wrapper = styled("div", {
|
|
1453
1454
|
display: "flex",
|
|
1454
1455
|
justifyContent: "space-between",
|
|
1455
1456
|
alignItems: "center"
|
|
1456
1457
|
});
|
|
1457
|
-
var StyledTitle =
|
|
1458
|
+
var StyledTitle = styled(Dialog.Title, {
|
|
1458
1459
|
fontSize: "$lg",
|
|
1459
|
-
fontWeight: "bold"
|
|
1460
|
+
fontWeight: "bold",
|
|
1461
|
+
color: "$black"
|
|
1460
1462
|
});
|
|
1461
|
-
var StyledClose =
|
|
1463
|
+
var StyledClose = styled(Dialog.Close, {
|
|
1462
1464
|
all: "unset",
|
|
1463
1465
|
position: "absolute",
|
|
1464
1466
|
top: "16px",
|
|
@@ -1470,15 +1472,22 @@ var StyledClose = styled2(Dialog.Close, {
|
|
|
1470
1472
|
color: "#333"
|
|
1471
1473
|
}
|
|
1472
1474
|
});
|
|
1473
|
-
var StyledDivider =
|
|
1475
|
+
var StyledDivider = styled("hr", {
|
|
1474
1476
|
width: "100%",
|
|
1475
1477
|
border: "none",
|
|
1476
1478
|
borderTop: "1px solid $gray_mid"
|
|
1477
1479
|
});
|
|
1480
|
+
var StyledDescription = styled(Dialog.Description, {
|
|
1481
|
+
display: "flex",
|
|
1482
|
+
fontFamily: "$default",
|
|
1483
|
+
fontWeight: "$regular",
|
|
1484
|
+
fontSize: "$md",
|
|
1485
|
+
margin: "$2 0"
|
|
1486
|
+
});
|
|
1478
1487
|
|
|
1479
1488
|
// src/components/Modal/index.tsx
|
|
1480
1489
|
import { jsx as jsx22, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1481
|
-
var Modal = ({ open, onOpenChange, title, children }) => {
|
|
1490
|
+
var Modal = ({ open, onOpenChange, title, description, children }) => {
|
|
1482
1491
|
return /* @__PURE__ */ jsx22(Dialog2.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs6(Dialog2.Portal, { children: [
|
|
1483
1492
|
/* @__PURE__ */ jsx22(StyledOverlay, {}),
|
|
1484
1493
|
/* @__PURE__ */ jsxs6(StyledContent, { children: [
|
|
@@ -1487,6 +1496,7 @@ var Modal = ({ open, onOpenChange, title, children }) => {
|
|
|
1487
1496
|
/* @__PURE__ */ jsx22(StyledClose, { asChild: true, "aria-label": "Close", children: /* @__PURE__ */ jsx22(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ jsx22(Icon, { name: "Closed", size: 8 }) }) })
|
|
1488
1497
|
] }),
|
|
1489
1498
|
/* @__PURE__ */ jsx22(StyledDivider, {}),
|
|
1499
|
+
description && /* @__PURE__ */ jsx22(StyledDescription, { children: description }),
|
|
1490
1500
|
children
|
|
1491
1501
|
] })
|
|
1492
1502
|
] }) });
|
|
@@ -1551,6 +1561,9 @@ var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
|
|
|
1551
1561
|
};
|
|
1552
1562
|
ProgressBar.displayName = "ProgressBar";
|
|
1553
1563
|
|
|
1564
|
+
// src/components/Radio/index.tsx
|
|
1565
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
1566
|
+
|
|
1554
1567
|
// src/components/Radio/styles.ts
|
|
1555
1568
|
import * as RadioGroup from "@radix-ui/react-radio-group";
|
|
1556
1569
|
var StyledRoot2 = styled(RadioGroup.Root, {
|
|
@@ -1644,18 +1657,19 @@ var Span3 = styled("span", {
|
|
|
1644
1657
|
|
|
1645
1658
|
// src/components/Radio/index.tsx
|
|
1646
1659
|
import { jsx as jsx24, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1647
|
-
var Radio = ({
|
|
1660
|
+
var Radio = forwardRef5(({
|
|
1648
1661
|
labels,
|
|
1649
1662
|
value,
|
|
1650
1663
|
onChange,
|
|
1651
1664
|
disabled = false,
|
|
1652
1665
|
required = false,
|
|
1653
1666
|
errorMessage
|
|
1654
|
-
}) => {
|
|
1667
|
+
}, ref) => {
|
|
1655
1668
|
return /* @__PURE__ */ jsxs8("form", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
1656
1669
|
/* @__PURE__ */ jsx24(
|
|
1657
1670
|
StyledRoot2,
|
|
1658
1671
|
{
|
|
1672
|
+
ref,
|
|
1659
1673
|
value,
|
|
1660
1674
|
onValueChange: onChange,
|
|
1661
1675
|
hasError: !!errorMessage,
|
|
@@ -1679,7 +1693,8 @@ var Radio = ({
|
|
|
1679
1693
|
),
|
|
1680
1694
|
errorMessage && /* @__PURE__ */ jsx24(Span3, { children: errorMessage })
|
|
1681
1695
|
] });
|
|
1682
|
-
};
|
|
1696
|
+
});
|
|
1697
|
+
Radio.displayName = "Radio";
|
|
1683
1698
|
|
|
1684
1699
|
// src/components/Spacing.tsx
|
|
1685
1700
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
@@ -1697,6 +1712,9 @@ var Spacing = ({ size, axis = "vertical" }) => {
|
|
|
1697
1712
|
return /* @__PURE__ */ jsx25("div", { style, "data-testid": `spacing-${size}-${axis}` });
|
|
1698
1713
|
};
|
|
1699
1714
|
|
|
1715
|
+
// src/components/Switch/index.tsx
|
|
1716
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
1717
|
+
|
|
1700
1718
|
// src/components/Switch/styles.ts
|
|
1701
1719
|
import * as Switch from "@radix-ui/react-switch";
|
|
1702
1720
|
var Wrapper3 = styled("div", {
|
|
@@ -1793,7 +1811,7 @@ var Span4 = styled("span", {
|
|
|
1793
1811
|
|
|
1794
1812
|
// src/components/Switch/index.tsx
|
|
1795
1813
|
import { jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1796
|
-
var Switch2 = ({
|
|
1814
|
+
var Switch2 = forwardRef6(({
|
|
1797
1815
|
label,
|
|
1798
1816
|
checked,
|
|
1799
1817
|
defaultChecked,
|
|
@@ -1802,12 +1820,13 @@ var Switch2 = ({
|
|
|
1802
1820
|
required = false,
|
|
1803
1821
|
id,
|
|
1804
1822
|
errorMessage
|
|
1805
|
-
}) => {
|
|
1823
|
+
}, ref) => {
|
|
1806
1824
|
return /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
|
|
1807
1825
|
/* @__PURE__ */ jsxs9(Wrapper3, { hasError: !!errorMessage, children: [
|
|
1808
1826
|
/* @__PURE__ */ jsx26(
|
|
1809
1827
|
StyledRoot3,
|
|
1810
1828
|
{
|
|
1829
|
+
ref,
|
|
1811
1830
|
id,
|
|
1812
1831
|
checked,
|
|
1813
1832
|
defaultChecked,
|
|
@@ -1822,7 +1841,8 @@ var Switch2 = ({
|
|
|
1822
1841
|
] }),
|
|
1823
1842
|
errorMessage && /* @__PURE__ */ jsx26(Span4, { children: errorMessage })
|
|
1824
1843
|
] });
|
|
1825
|
-
};
|
|
1844
|
+
});
|
|
1845
|
+
Switch2.displayName = "Switch";
|
|
1826
1846
|
|
|
1827
1847
|
// src/components/Tabs/index.tsx
|
|
1828
1848
|
import { Children, isValidElement, useLayoutEffect, useRef as useRef4, useState as useState4 } from "react";
|
|
@@ -2016,6 +2036,7 @@ var Tabs2 = ({ defaultValue, colorContent, children }) => {
|
|
|
2016
2036
|
Tabs2.Item = TabsItem;
|
|
2017
2037
|
|
|
2018
2038
|
// src/components/TextArea.tsx
|
|
2039
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
2019
2040
|
import { jsx as jsx28, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2020
2041
|
var Wrapper4 = styled("div", {
|
|
2021
2042
|
display: "flex",
|
|
@@ -2091,14 +2112,24 @@ var Span5 = styled("span", {
|
|
|
2091
2112
|
marginTop: "2px",
|
|
2092
2113
|
marginBottom: "$6"
|
|
2093
2114
|
});
|
|
2094
|
-
var TextArea = (
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2115
|
+
var TextArea = forwardRef7(
|
|
2116
|
+
({ label, id, htmlFor, errorMessage, ...props }, ref) => {
|
|
2117
|
+
const textAreaId = id || htmlFor || `textarea-${crypto.randomUUID()}`;
|
|
2118
|
+
return /* @__PURE__ */ jsxs11(Wrapper4, { children: [
|
|
2119
|
+
label && /* @__PURE__ */ jsx28(StyledLabel2, { htmlFor: textAreaId, children: label }),
|
|
2120
|
+
/* @__PURE__ */ jsx28(
|
|
2121
|
+
TextAreaElement,
|
|
2122
|
+
{
|
|
2123
|
+
id: textAreaId,
|
|
2124
|
+
...props,
|
|
2125
|
+
hasError: !!errorMessage,
|
|
2126
|
+
ref
|
|
2127
|
+
}
|
|
2128
|
+
),
|
|
2129
|
+
errorMessage && /* @__PURE__ */ jsx28(Span5, { children: errorMessage })
|
|
2130
|
+
] });
|
|
2131
|
+
}
|
|
2132
|
+
);
|
|
2102
2133
|
TextArea.displayName = "TextArea";
|
|
2103
2134
|
|
|
2104
2135
|
// src/components/Tooltip/index.tsx
|
|
@@ -2257,7 +2288,7 @@ var Loader = ({ show, fullscreen = false }) => {
|
|
|
2257
2288
|
Loader.displayName = "Loader";
|
|
2258
2289
|
|
|
2259
2290
|
// src/components/MaskedInput/index.tsx
|
|
2260
|
-
import { forwardRef as
|
|
2291
|
+
import { forwardRef as forwardRef8, useState as useState5, useRef as useRef5 } from "react";
|
|
2261
2292
|
|
|
2262
2293
|
// src/components/MaskedInput/utils.ts
|
|
2263
2294
|
var MAX_LENGTHS = {
|
|
@@ -2322,7 +2353,7 @@ var applyMask = (value, maskType) => {
|
|
|
2322
2353
|
|
|
2323
2354
|
// src/components/MaskedInput/index.tsx
|
|
2324
2355
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2325
|
-
var MaskedInput =
|
|
2356
|
+
var MaskedInput = forwardRef8(
|
|
2326
2357
|
({ maskType, onChange, ...props }, ref) => {
|
|
2327
2358
|
const [value, setValue] = useState5("");
|
|
2328
2359
|
const inputRef = useRef5(null);
|
|
@@ -2372,8 +2403,112 @@ var MaskedInput = forwardRef5(
|
|
|
2372
2403
|
);
|
|
2373
2404
|
MaskedInput.displayName = "MaskedInput";
|
|
2374
2405
|
|
|
2406
|
+
// src/components/Dropdown/index.tsx
|
|
2407
|
+
import React3, { Children as Children2, Fragment as Fragment2 } from "react";
|
|
2408
|
+
import * as DropdownMenu2 from "@radix-ui/react-dropdown-menu";
|
|
2409
|
+
|
|
2410
|
+
// src/components/Dropdown/styles.ts
|
|
2411
|
+
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
|
|
2412
|
+
var slideUpAndFade2 = keyframes({
|
|
2413
|
+
"0%": { opacity: 0, transform: "translateY(2px)" },
|
|
2414
|
+
"100%": { opacity: 1, transform: "translateY(0)" }
|
|
2415
|
+
});
|
|
2416
|
+
var slideRightAndFade2 = keyframes({
|
|
2417
|
+
"0%": { opacity: 0, transform: "translateX(-2px)" },
|
|
2418
|
+
"100%": { opacity: 1, transform: "translateX(0)" }
|
|
2419
|
+
});
|
|
2420
|
+
var slideDownAndFade2 = keyframes({
|
|
2421
|
+
"0%": { opacity: 0, transform: "translateY(-2px)" },
|
|
2422
|
+
"100%": { opacity: 1, transform: "translateY(0)" }
|
|
2423
|
+
});
|
|
2424
|
+
var slideLeftAndFade2 = keyframes({
|
|
2425
|
+
"0%": { opacity: 0, transform: "translateX(2px)" },
|
|
2426
|
+
"100%": { opacity: 1, transform: "translateX(0)" }
|
|
2427
|
+
});
|
|
2428
|
+
var StyledContent2 = styled(DropdownMenu.Content, {
|
|
2429
|
+
minWidth: 100,
|
|
2430
|
+
backgroundColor: "$white",
|
|
2431
|
+
borderRadius: "$md",
|
|
2432
|
+
padding: "$2",
|
|
2433
|
+
boxShadow: "0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)",
|
|
2434
|
+
animationDuration: "400ms",
|
|
2435
|
+
animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
2436
|
+
willChange: "transform, opacity",
|
|
2437
|
+
'&[data-state="open"]': {
|
|
2438
|
+
'&[data-side="top"]': { animationName: slideDownAndFade2 },
|
|
2439
|
+
'&[data-side="right"]': { animationName: slideLeftAndFade2 },
|
|
2440
|
+
'&[data-side="bottom"]': { animationName: slideUpAndFade2 },
|
|
2441
|
+
'&[data-side="left"]': { animationName: slideRightAndFade2 }
|
|
2442
|
+
}
|
|
2443
|
+
});
|
|
2444
|
+
var itemStyles = {
|
|
2445
|
+
all: "unset",
|
|
2446
|
+
fontSize: "$sm",
|
|
2447
|
+
lineHeight: 1,
|
|
2448
|
+
color: "$black",
|
|
2449
|
+
borderRadius: "$sm",
|
|
2450
|
+
display: "flex",
|
|
2451
|
+
alignItems: "center",
|
|
2452
|
+
height: 25,
|
|
2453
|
+
padding: "0 $2",
|
|
2454
|
+
position: "relative",
|
|
2455
|
+
paddingLeft: "$5",
|
|
2456
|
+
userSelect: "none",
|
|
2457
|
+
"&[data-disabled]": {
|
|
2458
|
+
color: "$gray_mid",
|
|
2459
|
+
pointerEvents: "none"
|
|
2460
|
+
},
|
|
2461
|
+
"&[data-highlighted]": {
|
|
2462
|
+
color: "$clickpalm_light",
|
|
2463
|
+
cursor: "pointer"
|
|
2464
|
+
},
|
|
2465
|
+
button: {
|
|
2466
|
+
all: "unset",
|
|
2467
|
+
width: "100%",
|
|
2468
|
+
textAlign: "left"
|
|
2469
|
+
}
|
|
2470
|
+
};
|
|
2471
|
+
var StyledItem2 = styled(DropdownMenu.Item, { ...itemStyles });
|
|
2472
|
+
var StyledSeparator = styled(DropdownMenu.Separator, {
|
|
2473
|
+
height: "1px",
|
|
2474
|
+
backgroundColor: "$gray_light",
|
|
2475
|
+
margin: "$2"
|
|
2476
|
+
});
|
|
2477
|
+
var IconButton = styled("button", {
|
|
2478
|
+
all: "unset",
|
|
2479
|
+
fontFamily: "inherit",
|
|
2480
|
+
borderRadius: "100%",
|
|
2481
|
+
height: 35,
|
|
2482
|
+
width: 35,
|
|
2483
|
+
display: "inline-flex",
|
|
2484
|
+
alignItems: "center",
|
|
2485
|
+
justifyContent: "center",
|
|
2486
|
+
color: "$clickpalm_light",
|
|
2487
|
+
backgroundColor: "transparent"
|
|
2488
|
+
});
|
|
2489
|
+
|
|
2490
|
+
// src/components/Dropdown/index.tsx
|
|
2491
|
+
import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2492
|
+
var Dropdown = ({ children }) => {
|
|
2493
|
+
const childrenArray = Children2.toArray(children);
|
|
2494
|
+
return /* @__PURE__ */ jsxs13(DropdownMenu2.Root, { children: [
|
|
2495
|
+
/* @__PURE__ */ jsx32(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsx32(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ jsx32(Icon, { name: "Dots", size: 16 }) }) }),
|
|
2496
|
+
/* @__PURE__ */ jsx32(DropdownMenu2.Portal, { children: /* @__PURE__ */ jsx32(StyledContent2, { sideOffset: 5, align: "end", children: childrenArray.map((child, index) => /* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
2497
|
+
child,
|
|
2498
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ jsx32(DropdownSeparator, {})
|
|
2499
|
+
] }, index)) }) })
|
|
2500
|
+
] });
|
|
2501
|
+
};
|
|
2502
|
+
var DropdownSeparator = StyledSeparator;
|
|
2503
|
+
var DropdownItem = React3.forwardRef(({ children, ...props }, forwardedRef) => {
|
|
2504
|
+
return /* @__PURE__ */ jsx32(StyledItem2, { ...props, ref: forwardedRef, children });
|
|
2505
|
+
});
|
|
2506
|
+
Dropdown.displayName = "Dropdown";
|
|
2507
|
+
DropdownItem.displayName = "DropdownItem";
|
|
2508
|
+
DropdownSeparator.displayName = "DropdownSeparator";
|
|
2509
|
+
|
|
2375
2510
|
// src/components/Box.tsx
|
|
2376
|
-
import { jsx as
|
|
2511
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2377
2512
|
var StyledBox = styled("div", {
|
|
2378
2513
|
padding: "$5",
|
|
2379
2514
|
borderRadius: "$md",
|
|
@@ -2395,15 +2530,16 @@ var StyledBox = styled("div", {
|
|
|
2395
2530
|
}
|
|
2396
2531
|
});
|
|
2397
2532
|
var Box = (props) => {
|
|
2398
|
-
return /* @__PURE__ */
|
|
2533
|
+
return /* @__PURE__ */ jsx33(StyledBox, { ...props });
|
|
2399
2534
|
};
|
|
2400
2535
|
Box.displayName = "Box";
|
|
2401
2536
|
|
|
2402
2537
|
// src/components/Paragraph.tsx
|
|
2403
|
-
import { jsx as
|
|
2538
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2404
2539
|
var StyledParagraph = styled("p", {
|
|
2405
2540
|
fontFamily: "$default",
|
|
2406
2541
|
lineHeight: "$short",
|
|
2542
|
+
color: "$black",
|
|
2407
2543
|
margin: 0,
|
|
2408
2544
|
variants: {
|
|
2409
2545
|
size: {
|
|
@@ -2441,13 +2577,13 @@ var StyledParagraph = styled("p", {
|
|
|
2441
2577
|
}
|
|
2442
2578
|
});
|
|
2443
2579
|
var Paragraph = (props) => {
|
|
2444
|
-
return /* @__PURE__ */
|
|
2580
|
+
return /* @__PURE__ */ jsx34(StyledParagraph, { ...props });
|
|
2445
2581
|
};
|
|
2446
2582
|
Paragraph.displayName = "Paragraph";
|
|
2447
2583
|
|
|
2448
2584
|
// src/components/Heading.tsx
|
|
2449
|
-
import { forwardRef as
|
|
2450
|
-
import { jsx as
|
|
2585
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
2586
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2451
2587
|
var StyledHeading = styled("h2", {
|
|
2452
2588
|
fontFamily: "$default",
|
|
2453
2589
|
lineHeight: "$shorter",
|
|
@@ -2469,15 +2605,15 @@ var StyledHeading = styled("h2", {
|
|
|
2469
2605
|
size: "md"
|
|
2470
2606
|
}
|
|
2471
2607
|
});
|
|
2472
|
-
var Heading =
|
|
2473
|
-
return /* @__PURE__ */
|
|
2608
|
+
var Heading = forwardRef9(function Heading2({ children, ...props }, ref) {
|
|
2609
|
+
return /* @__PURE__ */ jsx35(StyledHeading, { ref, ...props, children });
|
|
2474
2610
|
});
|
|
2475
2611
|
Heading.displayName = "Heading";
|
|
2476
2612
|
|
|
2477
2613
|
// src/components/Select/index.tsx
|
|
2478
2614
|
import { TriangleDownIcon, TriangleUpIcon } from "@radix-ui/react-icons";
|
|
2479
2615
|
import * as CustomSelect from "@radix-ui/react-select";
|
|
2480
|
-
import { useState as useState6 } from "react";
|
|
2616
|
+
import { forwardRef as forwardRef10, useState as useState6 } from "react";
|
|
2481
2617
|
|
|
2482
2618
|
// src/components/Select/styles.ts
|
|
2483
2619
|
import * as Select from "@radix-ui/react-select";
|
|
@@ -2506,6 +2642,7 @@ var StyledTrigger = styled(Select.Trigger, {
|
|
|
2506
2642
|
fontSize: "$md",
|
|
2507
2643
|
backgroundColor: "white",
|
|
2508
2644
|
cursor: "pointer",
|
|
2645
|
+
color: "$black",
|
|
2509
2646
|
"&[data-placeholder]": {
|
|
2510
2647
|
color: "$gray_mid"
|
|
2511
2648
|
},
|
|
@@ -2530,25 +2667,27 @@ var StyledTrigger = styled(Select.Trigger, {
|
|
|
2530
2667
|
}
|
|
2531
2668
|
}
|
|
2532
2669
|
});
|
|
2533
|
-
var
|
|
2670
|
+
var StyledContent3 = styled(Select.Content, {
|
|
2534
2671
|
overflow: "hidden",
|
|
2535
2672
|
backgroundColor: "$gray_background",
|
|
2536
2673
|
borderRadius: "$md",
|
|
2537
2674
|
boxShadow: "0px 4px 6px rgba(0, 0, 0, 0.1)",
|
|
2538
|
-
zIndex:
|
|
2675
|
+
zIndex: 103,
|
|
2539
2676
|
width: "var(--radix-select-trigger-width)",
|
|
2540
|
-
maxHeight: "var(--radix-select-content-available-height)"
|
|
2677
|
+
maxHeight: "var(--radix-select-content-available-height)",
|
|
2678
|
+
fontWeight: "$regular"
|
|
2541
2679
|
});
|
|
2542
2680
|
var StyledViewport = styled(Select.Viewport, {
|
|
2543
2681
|
padding: "4px"
|
|
2544
2682
|
});
|
|
2545
|
-
var
|
|
2683
|
+
var StyledItem3 = styled(Select.Item, {
|
|
2546
2684
|
position: "relative",
|
|
2547
2685
|
fontSize: "$md",
|
|
2686
|
+
fontWeight: "$regular",
|
|
2548
2687
|
padding: "14px 12px",
|
|
2549
2688
|
color: "$black",
|
|
2550
2689
|
cursor: "pointer",
|
|
2551
|
-
"&[data-highlighted]": {
|
|
2690
|
+
"&[data-highlighted], &:focus, &:hover": {
|
|
2552
2691
|
outline: "none",
|
|
2553
2692
|
color: "$clickpalm_light"
|
|
2554
2693
|
},
|
|
@@ -2594,55 +2733,52 @@ var Span6 = styled("span", {
|
|
|
2594
2733
|
});
|
|
2595
2734
|
|
|
2596
2735
|
// src/components/Select/index.tsx
|
|
2597
|
-
import { jsx as
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
children:
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
)
|
|
2639
|
-
] });
|
|
2640
|
-
}
|
|
2736
|
+
import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2737
|
+
var Select2 = forwardRef10(
|
|
2738
|
+
({
|
|
2739
|
+
value,
|
|
2740
|
+
onValueChange,
|
|
2741
|
+
items,
|
|
2742
|
+
placeholder = "Selecione",
|
|
2743
|
+
label,
|
|
2744
|
+
errorMessage,
|
|
2745
|
+
css: css2,
|
|
2746
|
+
className,
|
|
2747
|
+
style,
|
|
2748
|
+
...rest
|
|
2749
|
+
}, ref) => {
|
|
2750
|
+
const [open, setOpen] = useState6(false);
|
|
2751
|
+
return /* @__PURE__ */ jsxs14(StyledWrapper4, { css: css2, className, style, children: [
|
|
2752
|
+
label && /* @__PURE__ */ jsx36(Label3, { children: label }),
|
|
2753
|
+
/* @__PURE__ */ jsxs14(
|
|
2754
|
+
CustomSelect.Root,
|
|
2755
|
+
{
|
|
2756
|
+
value,
|
|
2757
|
+
onValueChange,
|
|
2758
|
+
onOpenChange: setOpen,
|
|
2759
|
+
...rest,
|
|
2760
|
+
children: [
|
|
2761
|
+
/* @__PURE__ */ jsxs14(StyledTrigger, { "aria-label": label, hasError: !!errorMessage, ref, children: [
|
|
2762
|
+
/* @__PURE__ */ jsx36(CustomSelect.Value, { placeholder }),
|
|
2763
|
+
/* @__PURE__ */ jsx36(StyledIcon, { open, children: /* @__PURE__ */ jsx36(TriangleDownIcon, {}) })
|
|
2764
|
+
] }),
|
|
2765
|
+
errorMessage && /* @__PURE__ */ jsx36(Span6, { children: errorMessage }),
|
|
2766
|
+
/* @__PURE__ */ jsx36(CustomSelect.Portal, { children: /* @__PURE__ */ jsxs14(StyledContent3, { side: "bottom", align: "start", position: "popper", children: [
|
|
2767
|
+
/* @__PURE__ */ jsx36(CustomSelect.ScrollUpButton, { children: /* @__PURE__ */ jsx36(TriangleUpIcon, {}) }),
|
|
2768
|
+
/* @__PURE__ */ jsx36(StyledViewport, { children: items.map((item) => /* @__PURE__ */ jsx36(StyledItem3, { value: item.value, children: /* @__PURE__ */ jsx36(CustomSelect.ItemText, { children: item.label }) }, item.value)) }),
|
|
2769
|
+
/* @__PURE__ */ jsx36(CustomSelect.ScrollDownButton, { children: /* @__PURE__ */ jsx36(TriangleDownIcon, {}) })
|
|
2770
|
+
] }) })
|
|
2771
|
+
]
|
|
2772
|
+
}
|
|
2773
|
+
)
|
|
2774
|
+
] });
|
|
2775
|
+
}
|
|
2776
|
+
);
|
|
2641
2777
|
Select2.displayName = "Select";
|
|
2642
2778
|
|
|
2643
2779
|
// src/components/LabelledValue/index.tsx
|
|
2644
2780
|
import {
|
|
2645
|
-
Children as
|
|
2781
|
+
Children as Children3,
|
|
2646
2782
|
cloneElement,
|
|
2647
2783
|
isValidElement as isValidElement2
|
|
2648
2784
|
} from "react";
|
|
@@ -2706,22 +2842,22 @@ var Value2 = styled("div", {
|
|
|
2706
2842
|
});
|
|
2707
2843
|
|
|
2708
2844
|
// src/components/LabelledValue/index.tsx
|
|
2709
|
-
import { jsx as
|
|
2845
|
+
import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2710
2846
|
function LabelledValue({ position = "vertical", withRow = false, children }) {
|
|
2711
|
-
return /* @__PURE__ */
|
|
2847
|
+
return /* @__PURE__ */ jsx37(Container, { position, children: Children3.map(children, (child) => {
|
|
2712
2848
|
if (isValidElement2(child)) {
|
|
2713
2849
|
return cloneElement(child, { position, withRow });
|
|
2714
2850
|
}
|
|
2715
2851
|
return child;
|
|
2716
2852
|
}) });
|
|
2717
2853
|
}
|
|
2718
|
-
function
|
|
2719
|
-
return /* @__PURE__ */
|
|
2720
|
-
/* @__PURE__ */
|
|
2721
|
-
/* @__PURE__ */
|
|
2854
|
+
function Item4({ label, value, position = "vertical", withRow = false }) {
|
|
2855
|
+
return /* @__PURE__ */ jsxs15(ItemWrapper, { position, withRow, children: [
|
|
2856
|
+
/* @__PURE__ */ jsx37(Label4, { children: label }),
|
|
2857
|
+
/* @__PURE__ */ jsx37(Value2, { children: value })
|
|
2722
2858
|
] });
|
|
2723
2859
|
}
|
|
2724
|
-
LabelledValue.Item =
|
|
2860
|
+
LabelledValue.Item = Item4;
|
|
2725
2861
|
|
|
2726
2862
|
// src/components/OneTimePassword/index.tsx
|
|
2727
2863
|
import * as OneTimePasswordField2 from "@radix-ui/react-one-time-password-field";
|
|
@@ -2750,7 +2886,8 @@ var StyledLabel3 = styled(OneTimePasswordField.Root, {
|
|
|
2750
2886
|
display: "flex",
|
|
2751
2887
|
justifyContent: "center",
|
|
2752
2888
|
alignItems: "center",
|
|
2753
|
-
marginBottom: "$5"
|
|
2889
|
+
marginBottom: "$5",
|
|
2890
|
+
color: "$black"
|
|
2754
2891
|
});
|
|
2755
2892
|
var StyledInput = styled(OneTimePasswordField.Input, {
|
|
2756
2893
|
all: "unset",
|
|
@@ -2789,11 +2926,11 @@ var Span7 = styled("span", {
|
|
|
2789
2926
|
});
|
|
2790
2927
|
|
|
2791
2928
|
// src/components/OneTimePassword/index.tsx
|
|
2792
|
-
import { jsx as
|
|
2929
|
+
import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2793
2930
|
var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...rootProps }) => {
|
|
2794
|
-
return /* @__PURE__ */
|
|
2795
|
-
/* @__PURE__ */
|
|
2796
|
-
/* @__PURE__ */
|
|
2931
|
+
return /* @__PURE__ */ jsx38(Container2, { children: /* @__PURE__ */ jsxs16(StyledWrapper5, { children: [
|
|
2932
|
+
/* @__PURE__ */ jsx38(StyledLabel3, { children: label }),
|
|
2933
|
+
/* @__PURE__ */ jsxs16(
|
|
2797
2934
|
StyledRoot4,
|
|
2798
2935
|
{
|
|
2799
2936
|
value,
|
|
@@ -2801,19 +2938,19 @@ var OneTimePassword = ({ label, length, value, errorMessage, onValueChange, ...r
|
|
|
2801
2938
|
...rootProps,
|
|
2802
2939
|
style: { "--otp-length": length },
|
|
2803
2940
|
children: [
|
|
2804
|
-
Array.from({ length }).map((_, index) => /* @__PURE__ */
|
|
2805
|
-
/* @__PURE__ */
|
|
2941
|
+
Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx38(StyledInput, {}, index)),
|
|
2942
|
+
/* @__PURE__ */ jsx38(OneTimePasswordField2.HiddenInput, {})
|
|
2806
2943
|
]
|
|
2807
2944
|
}
|
|
2808
2945
|
),
|
|
2809
|
-
errorMessage && /* @__PURE__ */
|
|
2946
|
+
errorMessage && /* @__PURE__ */ jsx38(Span7, { children: errorMessage })
|
|
2810
2947
|
] }) });
|
|
2811
2948
|
};
|
|
2812
2949
|
OneTimePassword.displayName = "OneTimePasswordInput";
|
|
2813
2950
|
|
|
2814
2951
|
// src/components/Toast/index.tsx
|
|
2815
2952
|
import * as ToastPrimitive2 from "@radix-ui/react-toast";
|
|
2816
|
-
import * as
|
|
2953
|
+
import * as React4 from "react";
|
|
2817
2954
|
|
|
2818
2955
|
// src/components/Toast/styles.ts
|
|
2819
2956
|
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
@@ -2910,7 +3047,7 @@ var ToastViewport = styled(ToastPrimitive.Viewport, {
|
|
|
2910
3047
|
outline: "none",
|
|
2911
3048
|
zIndex: 9999,
|
|
2912
3049
|
"@lg": {
|
|
2913
|
-
maxWidth: "
|
|
3050
|
+
maxWidth: "700px"
|
|
2914
3051
|
}
|
|
2915
3052
|
});
|
|
2916
3053
|
var progress = keyframes({
|
|
@@ -2976,11 +3113,11 @@ var toast = {
|
|
|
2976
3113
|
};
|
|
2977
3114
|
|
|
2978
3115
|
// src/components/Toast/index.tsx
|
|
2979
|
-
import { jsx as
|
|
3116
|
+
import { jsx as jsx39, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2980
3117
|
var Toast = () => {
|
|
2981
|
-
const [messages, setMessages] =
|
|
2982
|
-
const [paused, setPaused] =
|
|
2983
|
-
|
|
3118
|
+
const [messages, setMessages] = React4.useState([]);
|
|
3119
|
+
const [paused, setPaused] = React4.useState(false);
|
|
3120
|
+
React4.useEffect(() => {
|
|
2984
3121
|
const handleNewToast = (msg) => {
|
|
2985
3122
|
setMessages((prev) => [...prev, msg]);
|
|
2986
3123
|
};
|
|
@@ -2992,8 +3129,8 @@ var Toast = () => {
|
|
|
2992
3129
|
const removeToast = (id) => {
|
|
2993
3130
|
setMessages((prev) => prev.filter((msg) => msg.id !== id));
|
|
2994
3131
|
};
|
|
2995
|
-
return /* @__PURE__ */
|
|
2996
|
-
messages.map((message) => /* @__PURE__ */
|
|
3132
|
+
return /* @__PURE__ */ jsxs17(ToastPrimitive2.Provider, { swipeDirection: "right", children: [
|
|
3133
|
+
messages.map((message) => /* @__PURE__ */ jsxs17(
|
|
2997
3134
|
ToastRoot,
|
|
2998
3135
|
{
|
|
2999
3136
|
open: true,
|
|
@@ -3006,11 +3143,11 @@ var Toast = () => {
|
|
|
3006
3143
|
onPause: () => setPaused(true),
|
|
3007
3144
|
onResume: () => setPaused(false),
|
|
3008
3145
|
children: [
|
|
3009
|
-
/* @__PURE__ */
|
|
3010
|
-
/* @__PURE__ */
|
|
3011
|
-
message.description && /* @__PURE__ */
|
|
3146
|
+
/* @__PURE__ */ jsxs17(ToastContent, { children: [
|
|
3147
|
+
/* @__PURE__ */ jsx39(ToastTitle, { children: message.title }),
|
|
3148
|
+
message.description && /* @__PURE__ */ jsx39(ToastDescription, { children: message.description })
|
|
3012
3149
|
] }),
|
|
3013
|
-
/* @__PURE__ */
|
|
3150
|
+
/* @__PURE__ */ jsx39(ToastAction, { altText: "Fechar", asChild: true, children: /* @__PURE__ */ jsx39(
|
|
3014
3151
|
"button",
|
|
3015
3152
|
{
|
|
3016
3153
|
style: {
|
|
@@ -3020,15 +3157,15 @@ var Toast = () => {
|
|
|
3020
3157
|
alignItems: "center"
|
|
3021
3158
|
},
|
|
3022
3159
|
onClick: () => removeToast(message.id),
|
|
3023
|
-
children: /* @__PURE__ */
|
|
3160
|
+
children: /* @__PURE__ */ jsx39(Icon, { name: "Closed", size: 16, height: 14, width: 14 })
|
|
3024
3161
|
}
|
|
3025
3162
|
) }),
|
|
3026
|
-
/* @__PURE__ */
|
|
3163
|
+
/* @__PURE__ */ jsx39(ToastProgress, { paused, variant: message.variant })
|
|
3027
3164
|
]
|
|
3028
3165
|
},
|
|
3029
3166
|
message.id
|
|
3030
3167
|
)),
|
|
3031
|
-
/* @__PURE__ */
|
|
3168
|
+
/* @__PURE__ */ jsx39(ToastViewport, {})
|
|
3032
3169
|
] });
|
|
3033
3170
|
};
|
|
3034
3171
|
|
|
@@ -3071,7 +3208,6 @@ var StepItem = styled("div", {
|
|
|
3071
3208
|
});
|
|
3072
3209
|
var StepCircle = styled("div", {
|
|
3073
3210
|
position: "relative",
|
|
3074
|
-
zIndex: 990,
|
|
3075
3211
|
width: "var(--circle-size)",
|
|
3076
3212
|
height: "var(--circle-size)",
|
|
3077
3213
|
borderRadius: "50%",
|
|
@@ -3264,22 +3400,22 @@ var StepLabel = styled("span", {
|
|
|
3264
3400
|
});
|
|
3265
3401
|
|
|
3266
3402
|
// src/components/MultiStep/index.tsx
|
|
3267
|
-
import { jsx as
|
|
3403
|
+
import { jsx as jsx40, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3268
3404
|
var MultiStep = ({
|
|
3269
3405
|
steps,
|
|
3270
3406
|
currentStep,
|
|
3271
3407
|
orientation = "horizontal",
|
|
3272
3408
|
variant
|
|
3273
3409
|
}) => {
|
|
3274
|
-
return /* @__PURE__ */
|
|
3410
|
+
return /* @__PURE__ */ jsx40(
|
|
3275
3411
|
Wrapper5,
|
|
3276
3412
|
{
|
|
3277
3413
|
orientation,
|
|
3278
3414
|
children: steps.map((step, index) => {
|
|
3279
3415
|
const isFirst = index === 0;
|
|
3280
3416
|
const isLast = index === steps.length - 1;
|
|
3281
|
-
return /* @__PURE__ */
|
|
3282
|
-
/* @__PURE__ */
|
|
3417
|
+
return /* @__PURE__ */ jsxs18(StepItem, { orientation, children: [
|
|
3418
|
+
/* @__PURE__ */ jsx40(
|
|
3283
3419
|
StepCircle,
|
|
3284
3420
|
{
|
|
3285
3421
|
orientation,
|
|
@@ -3290,7 +3426,7 @@ var MultiStep = ({
|
|
|
3290
3426
|
children: index + 1
|
|
3291
3427
|
}
|
|
3292
3428
|
),
|
|
3293
|
-
/* @__PURE__ */
|
|
3429
|
+
/* @__PURE__ */ jsx40(
|
|
3294
3430
|
StepLabel,
|
|
3295
3431
|
{
|
|
3296
3432
|
orientation,
|
|
@@ -3306,7 +3442,7 @@ var MultiStep = ({
|
|
|
3306
3442
|
MultiStep.displayName = "MultiStep";
|
|
3307
3443
|
|
|
3308
3444
|
// src/components/Carousel/index.tsx
|
|
3309
|
-
import { useState as useState8, Children as
|
|
3445
|
+
import { useState as useState8, Children as Children4, cloneElement as cloneElement2 } from "react";
|
|
3310
3446
|
|
|
3311
3447
|
// src/components/Carousel/styles.ts
|
|
3312
3448
|
var CarouselContainer = styled("div", {
|
|
@@ -3412,10 +3548,10 @@ var CarouselItemContainer = styled("div", {
|
|
|
3412
3548
|
});
|
|
3413
3549
|
|
|
3414
3550
|
// src/components/Carousel/index.tsx
|
|
3415
|
-
import { jsx as
|
|
3551
|
+
import { jsx as jsx41, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3416
3552
|
var SWIPE_THRESHOLD = 50;
|
|
3417
3553
|
var Carousel = ({ title, variant, children }) => {
|
|
3418
|
-
const items =
|
|
3554
|
+
const items = Children4.toArray(children);
|
|
3419
3555
|
const [activeIndex, setActiveIndex] = useState8(0);
|
|
3420
3556
|
const [touchStartX, setTouchStartX] = useState8(null);
|
|
3421
3557
|
const [touchEndX, setTouchEndX] = useState8(null);
|
|
@@ -3446,18 +3582,18 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3446
3582
|
setTouchStartX(null);
|
|
3447
3583
|
setTouchEndX(null);
|
|
3448
3584
|
};
|
|
3449
|
-
return /* @__PURE__ */
|
|
3585
|
+
return /* @__PURE__ */ jsxs19(
|
|
3450
3586
|
CarouselContainer,
|
|
3451
3587
|
{
|
|
3452
3588
|
role: "region",
|
|
3453
3589
|
"aria-roledescription": "carousel",
|
|
3454
3590
|
"aria-label": "Carousel Component",
|
|
3455
3591
|
children: [
|
|
3456
|
-
/* @__PURE__ */
|
|
3457
|
-
/* @__PURE__ */
|
|
3458
|
-
/* @__PURE__ */
|
|
3459
|
-
/* @__PURE__ */
|
|
3460
|
-
/* @__PURE__ */
|
|
3592
|
+
/* @__PURE__ */ jsxs19(Wrapper6, { variant, children: [
|
|
3593
|
+
/* @__PURE__ */ jsxs19(CarouselHeader, { children: [
|
|
3594
|
+
/* @__PURE__ */ jsx41(Title2, { children: title }),
|
|
3595
|
+
/* @__PURE__ */ jsxs19(Navigation, { children: [
|
|
3596
|
+
/* @__PURE__ */ jsx41(
|
|
3461
3597
|
Button,
|
|
3462
3598
|
{
|
|
3463
3599
|
size: "sm",
|
|
@@ -3465,10 +3601,10 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3465
3601
|
"aria-label": "Previous Slide",
|
|
3466
3602
|
onClick: prev,
|
|
3467
3603
|
tabIndex: 0,
|
|
3468
|
-
children: /* @__PURE__ */
|
|
3604
|
+
children: /* @__PURE__ */ jsx41(Icon, { name: "TriangleLeft", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
3469
3605
|
}
|
|
3470
3606
|
),
|
|
3471
|
-
/* @__PURE__ */
|
|
3607
|
+
/* @__PURE__ */ jsx41(
|
|
3472
3608
|
Button,
|
|
3473
3609
|
{
|
|
3474
3610
|
size: "sm",
|
|
@@ -3476,15 +3612,15 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3476
3612
|
"aria-label": "Previous Slide",
|
|
3477
3613
|
onClick: next,
|
|
3478
3614
|
tabIndex: 0,
|
|
3479
|
-
children: /* @__PURE__ */
|
|
3615
|
+
children: /* @__PURE__ */ jsx41(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
|
|
3480
3616
|
}
|
|
3481
3617
|
)
|
|
3482
3618
|
] })
|
|
3483
3619
|
] }),
|
|
3484
|
-
/* @__PURE__ */
|
|
3485
|
-
/* @__PURE__ */
|
|
3486
|
-
/* @__PURE__ */
|
|
3487
|
-
/* @__PURE__ */
|
|
3620
|
+
/* @__PURE__ */ jsx41(Spacing, { size: "xs" }),
|
|
3621
|
+
/* @__PURE__ */ jsx41(Hr, { variant }),
|
|
3622
|
+
/* @__PURE__ */ jsx41(Spacing, { size: "xs" }),
|
|
3623
|
+
/* @__PURE__ */ jsx41(
|
|
3488
3624
|
CarouselContent,
|
|
3489
3625
|
{
|
|
3490
3626
|
onTouchStart,
|
|
@@ -3501,8 +3637,8 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3501
3637
|
}
|
|
3502
3638
|
)
|
|
3503
3639
|
] }),
|
|
3504
|
-
/* @__PURE__ */
|
|
3505
|
-
/* @__PURE__ */
|
|
3640
|
+
/* @__PURE__ */ jsx41(Spacing, { size: "md" }),
|
|
3641
|
+
/* @__PURE__ */ jsx41(DotsContainer, { children: /* @__PURE__ */ jsx41(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: items.map((_, idx) => /* @__PURE__ */ jsx41(
|
|
3506
3642
|
DotButton,
|
|
3507
3643
|
{
|
|
3508
3644
|
active: idx === activeIndex,
|
|
@@ -3518,12 +3654,12 @@ var Carousel = ({ title, variant, children }) => {
|
|
|
3518
3654
|
}
|
|
3519
3655
|
);
|
|
3520
3656
|
};
|
|
3521
|
-
var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */
|
|
3657
|
+
var CarouselItem = ({ children, style, ...props }) => /* @__PURE__ */ jsx41(CarouselItemContainer, { ...props, style: { ...style }, children });
|
|
3522
3658
|
Carousel.Item = CarouselItem;
|
|
3523
3659
|
|
|
3524
3660
|
// src/components/PasswordInput.tsx
|
|
3525
|
-
import { forwardRef as
|
|
3526
|
-
import { jsx as
|
|
3661
|
+
import { forwardRef as forwardRef11, useImperativeHandle, useRef as useRef6, useState as useState9 } from "react";
|
|
3662
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3527
3663
|
var ToggleButton = styled("button", {
|
|
3528
3664
|
all: "unset",
|
|
3529
3665
|
cursor: "pointer",
|
|
@@ -3538,7 +3674,7 @@ var ToggleButton = styled("button", {
|
|
|
3538
3674
|
borderRadius: "$sm"
|
|
3539
3675
|
}
|
|
3540
3676
|
});
|
|
3541
|
-
var PasswordInput =
|
|
3677
|
+
var PasswordInput = forwardRef11(
|
|
3542
3678
|
({ value, onChange, ...props }, ref) => {
|
|
3543
3679
|
const [visible, setVisible] = useState9(false);
|
|
3544
3680
|
const innerRef = useRef6(null);
|
|
@@ -3552,7 +3688,7 @@ var PasswordInput = forwardRef7(
|
|
|
3552
3688
|
}
|
|
3553
3689
|
}, 0);
|
|
3554
3690
|
};
|
|
3555
|
-
return /* @__PURE__ */
|
|
3691
|
+
return /* @__PURE__ */ jsx42(
|
|
3556
3692
|
Input2,
|
|
3557
3693
|
{
|
|
3558
3694
|
...props,
|
|
@@ -3560,14 +3696,14 @@ var PasswordInput = forwardRef7(
|
|
|
3560
3696
|
type: visible ? "text" : "password",
|
|
3561
3697
|
value,
|
|
3562
3698
|
onChange,
|
|
3563
|
-
suffix: /* @__PURE__ */
|
|
3699
|
+
suffix: /* @__PURE__ */ jsx42(
|
|
3564
3700
|
ToggleButton,
|
|
3565
3701
|
{
|
|
3566
3702
|
type: "button",
|
|
3567
3703
|
onClick: handleToggleVisibility,
|
|
3568
3704
|
onMouseDown: (e) => e.preventDefault(),
|
|
3569
3705
|
"aria-label": visible ? "Ocultar senha" : "Mostrar senha",
|
|
3570
|
-
children: visible ? /* @__PURE__ */
|
|
3706
|
+
children: visible ? /* @__PURE__ */ jsx42(Icon, { name: "EyeClosed", size: 16, color: "black" }) : /* @__PURE__ */ jsx42(Icon, { name: "EyeOpen", size: 16, color: "black" })
|
|
3571
3707
|
}
|
|
3572
3708
|
)
|
|
3573
3709
|
}
|
|
@@ -3575,7 +3711,108 @@ var PasswordInput = forwardRef7(
|
|
|
3575
3711
|
}
|
|
3576
3712
|
);
|
|
3577
3713
|
PasswordInput.displayName = "PasswordInput";
|
|
3714
|
+
|
|
3715
|
+
// src/components/Accordion/index.tsx
|
|
3716
|
+
import * as RadixAccordion from "@radix-ui/react-accordion";
|
|
3717
|
+
import React6 from "react";
|
|
3718
|
+
|
|
3719
|
+
// src/components/Accordion/styles.ts
|
|
3720
|
+
import * as Accordion from "@radix-ui/react-accordion";
|
|
3721
|
+
var AccordionContainer = styled(Accordion.Root, {
|
|
3722
|
+
borderRadius: "$md",
|
|
3723
|
+
width: "100%",
|
|
3724
|
+
backgroundColor: "$white",
|
|
3725
|
+
boxShadow: "0 1px 2px $colors$gray_mid",
|
|
3726
|
+
border: "2px solid $colors$gray_mid"
|
|
3727
|
+
});
|
|
3728
|
+
var AccordionItem = styled(Accordion.Item, {
|
|
3729
|
+
overflow: "hidden",
|
|
3730
|
+
marginTop: "1px",
|
|
3731
|
+
"&:first-child": {
|
|
3732
|
+
marginTop: 0,
|
|
3733
|
+
borderTopLeftRadius: "$md",
|
|
3734
|
+
borderTopRightRadius: "$md"
|
|
3735
|
+
},
|
|
3736
|
+
"&:last-child": {
|
|
3737
|
+
borderBottomLeftRadius: "$md",
|
|
3738
|
+
borderBottomRightRadius: "$md"
|
|
3739
|
+
}
|
|
3740
|
+
});
|
|
3741
|
+
var AccordionHeader = styled(Accordion.Header, {
|
|
3742
|
+
display: "flex"
|
|
3743
|
+
});
|
|
3744
|
+
var AccordionTrigger = styled(Accordion.Trigger, {
|
|
3745
|
+
all: "unset",
|
|
3746
|
+
fontFamily: "$default",
|
|
3747
|
+
backgroundColor: "transparent",
|
|
3748
|
+
padding: "0 $5",
|
|
3749
|
+
flex: 1,
|
|
3750
|
+
display: "flex",
|
|
3751
|
+
alignItems: "center",
|
|
3752
|
+
justifyContent: "space-between",
|
|
3753
|
+
fontSize: "$md",
|
|
3754
|
+
lineHeight: "$regular",
|
|
3755
|
+
color: "$black",
|
|
3756
|
+
fontWeight: "$bold",
|
|
3757
|
+
width: "100%",
|
|
3758
|
+
"&:hover": {
|
|
3759
|
+
cursor: "pointer"
|
|
3760
|
+
},
|
|
3761
|
+
"&:focus": {
|
|
3762
|
+
cursor: "pointer",
|
|
3763
|
+
outline: "none"
|
|
3764
|
+
}
|
|
3765
|
+
});
|
|
3766
|
+
var AccordionChevron = styled(Icon, {
|
|
3767
|
+
color: "$ignite_light",
|
|
3768
|
+
transition: "transform 300ms cubic-bezier(0.87, 0, 0.13, 1)",
|
|
3769
|
+
"[data-state=open] &": {
|
|
3770
|
+
transform: "rotate(180deg)"
|
|
3771
|
+
}
|
|
3772
|
+
});
|
|
3773
|
+
var AccordionContent = styled(Accordion.Content, {
|
|
3774
|
+
overflow: "hidden",
|
|
3775
|
+
fontSize: "$md",
|
|
3776
|
+
color: "$black",
|
|
3777
|
+
borderTop: "1px solid $colors$gray_mid",
|
|
3778
|
+
'&[data-state="open"]': {
|
|
3779
|
+
animation: "slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1)"
|
|
3780
|
+
},
|
|
3781
|
+
'&[data-state="closed"]': {
|
|
3782
|
+
animation: "slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1)"
|
|
3783
|
+
},
|
|
3784
|
+
"> div": {
|
|
3785
|
+
padding: "$5"
|
|
3786
|
+
}
|
|
3787
|
+
});
|
|
3788
|
+
var TriggerContent = styled("div", {
|
|
3789
|
+
display: "flex",
|
|
3790
|
+
alignItems: "center",
|
|
3791
|
+
gap: "$2"
|
|
3792
|
+
});
|
|
3793
|
+
var OptionsButton = styled(Button, {
|
|
3794
|
+
marginRight: "$1"
|
|
3795
|
+
});
|
|
3796
|
+
|
|
3797
|
+
// src/components/Accordion/index.tsx
|
|
3798
|
+
import { jsx as jsx43, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3799
|
+
var Accordion2 = React6.forwardRef(
|
|
3800
|
+
({ title, children, dropdownItems }, ref) => {
|
|
3801
|
+
return /* @__PURE__ */ jsx43(AccordionContainer, { type: "single", collapsible: true, ref, children: /* @__PURE__ */ jsxs20(AccordionItem, { value: "item-1", children: [
|
|
3802
|
+
/* @__PURE__ */ jsx43(AccordionHeader, { children: /* @__PURE__ */ jsxs20(AccordionTrigger, { children: [
|
|
3803
|
+
title,
|
|
3804
|
+
/* @__PURE__ */ jsxs20(TriggerContent, { children: [
|
|
3805
|
+
dropdownItems && dropdownItems,
|
|
3806
|
+
/* @__PURE__ */ jsx43(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ jsx43(AccordionChevron, { name: "TriangleDown", size: 16, "aria-hidden": true }) })
|
|
3807
|
+
] })
|
|
3808
|
+
] }) }),
|
|
3809
|
+
/* @__PURE__ */ jsx43(RadixAccordion.Content, { asChild: true, children: /* @__PURE__ */ jsx43(AccordionContent, { children }) })
|
|
3810
|
+
] }) });
|
|
3811
|
+
}
|
|
3812
|
+
);
|
|
3813
|
+
Accordion2.displayName = "Accordion";
|
|
3578
3814
|
export {
|
|
3815
|
+
Accordion2 as Accordion,
|
|
3579
3816
|
Avatar2 as Avatar,
|
|
3580
3817
|
Box,
|
|
3581
3818
|
Button,
|
|
@@ -3583,6 +3820,9 @@ export {
|
|
|
3583
3820
|
Carousel,
|
|
3584
3821
|
Checkbox2 as Checkbox,
|
|
3585
3822
|
Datepicker,
|
|
3823
|
+
Dropdown,
|
|
3824
|
+
DropdownItem,
|
|
3825
|
+
DropdownSeparator,
|
|
3586
3826
|
Heading,
|
|
3587
3827
|
Hr,
|
|
3588
3828
|
Icon,
|