@lets-events/react 11.2.0 → 11.4.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +1728 -209
- package/dist/index.d.ts +1728 -209
- package/dist/index.js +524 -176
- package/dist/index.mjs +496 -148
- package/package.json +1 -1
- package/src/components/Badge.tsx +1 -4
- package/src/components/Button/index.tsx +12 -9
- package/src/components/Button/styledComponents.ts +14 -3
- package/src/components/CheckboxGroup.tsx +129 -147
- package/src/components/Drawer/index.tsx +48 -0
- package/src/components/Drawer/styledComponents.ts +46 -0
- package/src/components/FormFields/MultiSelectFormField.tsx +65 -0
- package/src/components/MenuDropdown/index.tsx +30 -0
- package/src/components/MenuDropdown/styledComponents.ts +31 -0
- package/src/components/MultiSelect.tsx +216 -0
- package/src/components/Text.tsx +1 -2
- package/src/index.tsx +4 -0
package/dist/index.mjs
CHANGED
|
@@ -1557,7 +1557,6 @@ import { jsx as jsx2 } from "react/jsx-runtime";
|
|
|
1557
1557
|
var TextStyle = styled(TextRadix, {
|
|
1558
1558
|
fontFamily: "$default",
|
|
1559
1559
|
lineHeight: "$base",
|
|
1560
|
-
color: "$grey950",
|
|
1561
1560
|
variants: {
|
|
1562
1561
|
typography: typographyValues,
|
|
1563
1562
|
fontWeight: {
|
|
@@ -1574,7 +1573,7 @@ function Text(_a) {
|
|
|
1574
1573
|
TextStyle,
|
|
1575
1574
|
__spreadProps(__spreadValues({}, props), {
|
|
1576
1575
|
css: __spreadValues({
|
|
1577
|
-
color: color ? "$" + color : "$
|
|
1576
|
+
color: color ? "$" + color : "$dark600"
|
|
1578
1577
|
}, props.css)
|
|
1579
1578
|
})
|
|
1580
1579
|
);
|
|
@@ -1823,6 +1822,19 @@ var ButtonStyled = styled(ButtonRadix, {
|
|
|
1823
1822
|
borderColor: "$colors$neutral100",
|
|
1824
1823
|
$$buttonColor: "$colors$neutral300"
|
|
1825
1824
|
}
|
|
1825
|
+
},
|
|
1826
|
+
menuDropdownItem: {
|
|
1827
|
+
backgroundColor: "transparent",
|
|
1828
|
+
boxShadow: "none",
|
|
1829
|
+
padding: "0.25rem 0.5rem",
|
|
1830
|
+
border: 0,
|
|
1831
|
+
height: "unset",
|
|
1832
|
+
color: "$$buttonColor",
|
|
1833
|
+
width: "100%",
|
|
1834
|
+
borderRadius: 0,
|
|
1835
|
+
"&:hover": {
|
|
1836
|
+
backgroundColor: "$dark100"
|
|
1837
|
+
}
|
|
1826
1838
|
}
|
|
1827
1839
|
},
|
|
1828
1840
|
fontWeight: {
|
|
@@ -2973,10 +2985,10 @@ import { CheckboxGroup as CheckboxGroupRadix } from "@radix-ui/themes";
|
|
|
2973
2985
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
2974
2986
|
var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
|
|
2975
2987
|
fontFamily: "$default",
|
|
2976
|
-
|
|
2988
|
+
svg: {
|
|
2977
2989
|
display: "none"
|
|
2978
2990
|
},
|
|
2979
|
-
|
|
2991
|
+
label: {
|
|
2980
2992
|
display: "flex",
|
|
2981
2993
|
alignItems: "center",
|
|
2982
2994
|
gap: "$8",
|
|
@@ -3019,7 +3031,7 @@ var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
|
|
|
3019
3031
|
variants: {
|
|
3020
3032
|
color: {
|
|
3021
3033
|
success: {
|
|
3022
|
-
|
|
3034
|
+
label: {
|
|
3023
3035
|
"&:focus button, &:hover button": {
|
|
3024
3036
|
boxShadow: "0px 0px 0px 4px rgba(38, 167, 67, 0.50)"
|
|
3025
3037
|
}
|
|
@@ -3034,7 +3046,7 @@ var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
|
|
|
3034
3046
|
},
|
|
3035
3047
|
blue: {},
|
|
3036
3048
|
error: {
|
|
3037
|
-
|
|
3049
|
+
label: {
|
|
3038
3050
|
"&:focus button, &:hover button": {
|
|
3039
3051
|
boxShadow: "0px 0px 0px 4px rgba(225, 86, 98, 0.50)"
|
|
3040
3052
|
}
|
|
@@ -3050,7 +3062,7 @@ var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
|
|
|
3050
3062
|
},
|
|
3051
3063
|
disabled: {
|
|
3052
3064
|
true: {
|
|
3053
|
-
|
|
3065
|
+
label: {
|
|
3054
3066
|
cursor: "not-allowed",
|
|
3055
3067
|
opacity: 0.5,
|
|
3056
3068
|
"&:focus button, &:hover button": {
|
|
@@ -3076,7 +3088,7 @@ var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
|
|
|
3076
3088
|
color: "blue",
|
|
3077
3089
|
disabled: false,
|
|
3078
3090
|
css: {
|
|
3079
|
-
|
|
3091
|
+
label: {
|
|
3080
3092
|
"&:focus button, &:hover button": {
|
|
3081
3093
|
boxShadow: "0px 0px 0px 4px rgba(56, 129, 255, 0.50)"
|
|
3082
3094
|
}
|
|
@@ -3134,21 +3146,14 @@ var CheckboxGroupStyled = styled(CheckboxGroupRadix.Root, {
|
|
|
3134
3146
|
disabled: false
|
|
3135
3147
|
}
|
|
3136
3148
|
});
|
|
3149
|
+
var StyledItem = styled(CheckboxGroupRadix.Item, {});
|
|
3137
3150
|
function CheckboxGroup(_a) {
|
|
3138
|
-
var _b = _a, {
|
|
3139
|
-
children
|
|
3140
|
-
} = _b, props = __objRest(_b, [
|
|
3141
|
-
"children"
|
|
3142
|
-
]);
|
|
3151
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
3143
3152
|
return /* @__PURE__ */ jsx9(CheckboxGroupStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
3144
3153
|
}
|
|
3145
3154
|
function CheckboxItem(_a) {
|
|
3146
|
-
var _b = _a, {
|
|
3147
|
-
|
|
3148
|
-
} = _b, props = __objRest(_b, [
|
|
3149
|
-
"children"
|
|
3150
|
-
]);
|
|
3151
|
-
return /* @__PURE__ */ jsx9(CheckboxGroupRadix.Item, __spreadProps(__spreadValues({}, props), { children }));
|
|
3155
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
3156
|
+
return /* @__PURE__ */ jsx9(StyledItem, __spreadProps(__spreadValues({}, props), { children }));
|
|
3152
3157
|
}
|
|
3153
3158
|
|
|
3154
3159
|
// src/components/Filter.tsx
|
|
@@ -3443,9 +3448,6 @@ var BadgeStyled = styled(BadgeRadix, {
|
|
|
3443
3448
|
fontFamily: "$default",
|
|
3444
3449
|
borderRadius: "$sm",
|
|
3445
3450
|
verticalAlign: "middle",
|
|
3446
|
-
"svg": {
|
|
3447
|
-
marginRight: "10px"
|
|
3448
|
-
},
|
|
3449
3451
|
variants: {
|
|
3450
3452
|
color: {
|
|
3451
3453
|
primary: {
|
|
@@ -3619,8 +3621,55 @@ function Modal(_a) {
|
|
|
3619
3621
|
] }));
|
|
3620
3622
|
}
|
|
3621
3623
|
|
|
3624
|
+
// src/components/MenuDropdown/index.tsx
|
|
3625
|
+
import { useState } from "react";
|
|
3626
|
+
|
|
3627
|
+
// src/components/MenuDropdown/styledComponents.ts
|
|
3628
|
+
var MenuDropdownContainerStyled = styled("div", {
|
|
3629
|
+
position: "relative",
|
|
3630
|
+
width: "fit-content"
|
|
3631
|
+
});
|
|
3632
|
+
var TriggerButtonStyled = styled("button", {
|
|
3633
|
+
backgroundColor: "$brand500",
|
|
3634
|
+
boxShadow: "0px 4px 4px 0px #23354314",
|
|
3635
|
+
borderRadius: "$full",
|
|
3636
|
+
border: "none",
|
|
3637
|
+
height: "1.875rem",
|
|
3638
|
+
width: "1.875rem",
|
|
3639
|
+
cursor: "pointer"
|
|
3640
|
+
});
|
|
3641
|
+
var MenuItemsContainerStyled = styled("div", {
|
|
3642
|
+
position: "absolute",
|
|
3643
|
+
right: 0,
|
|
3644
|
+
top: "2.125rem",
|
|
3645
|
+
zIndex: "999",
|
|
3646
|
+
width: "fit-content",
|
|
3647
|
+
minWidth: "5rem",
|
|
3648
|
+
background: "#fff",
|
|
3649
|
+
maxWidth: "18.75rem",
|
|
3650
|
+
margin: "auto",
|
|
3651
|
+
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.0784313725)",
|
|
3652
|
+
border: "1px solid $dark300",
|
|
3653
|
+
borderRadius: "0.5rem",
|
|
3654
|
+
padding: "0.5rem 0",
|
|
3655
|
+
height: "fit-content"
|
|
3656
|
+
});
|
|
3657
|
+
|
|
3658
|
+
// src/components/MenuDropdown/index.tsx
|
|
3659
|
+
import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3660
|
+
function MenuDropdown({ children }) {
|
|
3661
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
3662
|
+
function handleMenuDropdown() {
|
|
3663
|
+
setIsOpen(!isOpen);
|
|
3664
|
+
}
|
|
3665
|
+
return /* @__PURE__ */ jsxs5(MenuDropdownContainerStyled, { children: [
|
|
3666
|
+
/* @__PURE__ */ jsx14(TriggerButtonStyled, { onClick: handleMenuDropdown, children: /* @__PURE__ */ jsx14(Icon_default, { name: "ellipsis", size: "xl", color: "#FFFFFF" }) }),
|
|
3667
|
+
isOpen && /* @__PURE__ */ jsx14(MenuItemsContainerStyled, { children })
|
|
3668
|
+
] });
|
|
3669
|
+
}
|
|
3670
|
+
|
|
3622
3671
|
// src/components/Calendar/index.tsx
|
|
3623
|
-
import { useRef, useEffect as useEffect2, useState } from "react";
|
|
3672
|
+
import { useRef, useEffect as useEffect2, useState as useState2 } from "react";
|
|
3624
3673
|
|
|
3625
3674
|
// src/hooks/useOnClickOutside.tsx
|
|
3626
3675
|
import { useEffect } from "react";
|
|
@@ -7738,7 +7787,7 @@ var DayPickerWrapperStyled = styled("div", {
|
|
|
7738
7787
|
});
|
|
7739
7788
|
|
|
7740
7789
|
// src/components/Calendar/index.tsx
|
|
7741
|
-
import { jsx as
|
|
7790
|
+
import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
7742
7791
|
function formatToDateMask(value) {
|
|
7743
7792
|
const numeric = value.replace(/\D/g, "").slice(0, 8);
|
|
7744
7793
|
const parts = numeric.match(/^(\d{0,2})(\d{0,2})(\d{0,4})$/);
|
|
@@ -7762,8 +7811,8 @@ function Calendar(_a) {
|
|
|
7762
7811
|
"setSelected",
|
|
7763
7812
|
"position"
|
|
7764
7813
|
]);
|
|
7765
|
-
const [inputValue, setInputValue] =
|
|
7766
|
-
const [showContainer, setShowCalendar] =
|
|
7814
|
+
const [inputValue, setInputValue] = useState2("");
|
|
7815
|
+
const [showContainer, setShowCalendar] = useState2(false);
|
|
7767
7816
|
const dropdownRef = useRef(null);
|
|
7768
7817
|
useOnClickOutside(dropdownRef, () => {
|
|
7769
7818
|
setShowCalendar(false);
|
|
@@ -7787,13 +7836,13 @@ function Calendar(_a) {
|
|
|
7787
7836
|
console.warn("Data inv\xE1lida inserida no input:", masked);
|
|
7788
7837
|
}
|
|
7789
7838
|
};
|
|
7790
|
-
return /* @__PURE__ */
|
|
7791
|
-
/* @__PURE__ */
|
|
7839
|
+
return /* @__PURE__ */ jsx15("div", { children: /* @__PURE__ */ jsxs6(CalendarStyled, __spreadProps(__spreadValues({}, props), { ref: dropdownRef, children: [
|
|
7840
|
+
/* @__PURE__ */ jsx15(
|
|
7792
7841
|
CalendarButtonStyled,
|
|
7793
7842
|
{
|
|
7794
7843
|
type: "button",
|
|
7795
7844
|
onClick: () => setShowCalendar((prev) => !prev),
|
|
7796
|
-
children: /* @__PURE__ */
|
|
7845
|
+
children: /* @__PURE__ */ jsx15(
|
|
7797
7846
|
TextField,
|
|
7798
7847
|
{
|
|
7799
7848
|
placeholder: "00/00/0000",
|
|
@@ -7802,17 +7851,17 @@ function Calendar(_a) {
|
|
|
7802
7851
|
onChange: handleInputChange,
|
|
7803
7852
|
inputMode: "numeric",
|
|
7804
7853
|
textAlign: "right",
|
|
7805
|
-
children: /* @__PURE__ */
|
|
7854
|
+
children: /* @__PURE__ */ jsx15(TextFieldSlot, { children: /* @__PURE__ */ jsx15(Icon_default, { name: "calendar", size: "xl" }) })
|
|
7806
7855
|
}
|
|
7807
7856
|
)
|
|
7808
7857
|
}
|
|
7809
7858
|
),
|
|
7810
|
-
showContainer && /* @__PURE__ */
|
|
7859
|
+
showContainer && /* @__PURE__ */ jsxs6(
|
|
7811
7860
|
CalendarContentStyled,
|
|
7812
7861
|
{
|
|
7813
7862
|
style: position === "top" ? { bottom: "110%" } : { top: "110%" },
|
|
7814
7863
|
children: [
|
|
7815
|
-
/* @__PURE__ */
|
|
7864
|
+
/* @__PURE__ */ jsx15(Box, { children: /* @__PURE__ */ jsx15(DayPickerWrapperStyled, { children: /* @__PURE__ */ jsx15(
|
|
7816
7865
|
DayPicker,
|
|
7817
7866
|
{
|
|
7818
7867
|
mode: "single",
|
|
@@ -7826,7 +7875,7 @@ function Calendar(_a) {
|
|
|
7826
7875
|
endMonth: maxDate
|
|
7827
7876
|
}
|
|
7828
7877
|
) }) }),
|
|
7829
|
-
action && /* @__PURE__ */
|
|
7878
|
+
action && /* @__PURE__ */ jsx15(CalendarFooterStyled, { children: /* @__PURE__ */ jsx15(
|
|
7830
7879
|
Button,
|
|
7831
7880
|
{
|
|
7832
7881
|
variant: "text",
|
|
@@ -7846,9 +7895,82 @@ function Calendar(_a) {
|
|
|
7846
7895
|
] })) });
|
|
7847
7896
|
}
|
|
7848
7897
|
|
|
7898
|
+
// src/components/Drawer/styledComponents.ts
|
|
7899
|
+
var DrawerOverlayStyled = styled("div", {
|
|
7900
|
+
position: "fixed",
|
|
7901
|
+
top: 0,
|
|
7902
|
+
right: 0,
|
|
7903
|
+
width: "100vw",
|
|
7904
|
+
height: "100vh",
|
|
7905
|
+
background: "rgba(0, 0, 0, 0.4)",
|
|
7906
|
+
zIndex: 1e3
|
|
7907
|
+
});
|
|
7908
|
+
var DrawerContainerStyled = styled("div", {
|
|
7909
|
+
position: "absolute",
|
|
7910
|
+
top: 0,
|
|
7911
|
+
right: 0,
|
|
7912
|
+
maxWidth: "calc(100% - 2rem)",
|
|
7913
|
+
height: "100%",
|
|
7914
|
+
background: "$neutral50",
|
|
7915
|
+
display: "flex",
|
|
7916
|
+
flexDirection: "column",
|
|
7917
|
+
boxShadow: "-4px 0 12px rgba(0, 0, 0, 0.2)",
|
|
7918
|
+
padding: "1.5rem 0",
|
|
7919
|
+
overflowY: "auto"
|
|
7920
|
+
});
|
|
7921
|
+
var DrawerHeaderDiv = styled("div", {
|
|
7922
|
+
display: "flex",
|
|
7923
|
+
justifyContent: "space-between",
|
|
7924
|
+
alignItems: "center",
|
|
7925
|
+
borderBottom: "1px solid $neutral300",
|
|
7926
|
+
padding: "0 1.5rem 1rem",
|
|
7927
|
+
position: "relative"
|
|
7928
|
+
});
|
|
7929
|
+
var DrawerHeaderTitle = styled("h2", {
|
|
7930
|
+
fontSize: "1.125rem",
|
|
7931
|
+
fontWeight: "400",
|
|
7932
|
+
fontFamily: "Work Sans",
|
|
7933
|
+
color: "$dark800",
|
|
7934
|
+
margin: "0"
|
|
7935
|
+
});
|
|
7936
|
+
var DrawerHeaderCloseButton = styled("button", {
|
|
7937
|
+
background: "none",
|
|
7938
|
+
border: "none",
|
|
7939
|
+
cursor: "pointer"
|
|
7940
|
+
});
|
|
7941
|
+
|
|
7942
|
+
// src/components/Drawer/index.tsx
|
|
7943
|
+
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
7944
|
+
function Drawer({
|
|
7945
|
+
isOpen,
|
|
7946
|
+
onClose,
|
|
7947
|
+
width,
|
|
7948
|
+
backgroundColor,
|
|
7949
|
+
title,
|
|
7950
|
+
children
|
|
7951
|
+
}) {
|
|
7952
|
+
if (!isOpen) return null;
|
|
7953
|
+
return /* @__PURE__ */ jsx16(DrawerOverlayStyled, { children: /* @__PURE__ */ jsxs7(
|
|
7954
|
+
DrawerContainerStyled,
|
|
7955
|
+
{
|
|
7956
|
+
style: {
|
|
7957
|
+
width: width != null ? width : "34.25rem",
|
|
7958
|
+
backgroundColor: colors[backgroundColor != null ? backgroundColor : "neutral50"]
|
|
7959
|
+
},
|
|
7960
|
+
children: [
|
|
7961
|
+
/* @__PURE__ */ jsxs7(DrawerHeaderDiv, { children: [
|
|
7962
|
+
/* @__PURE__ */ jsx16(DrawerHeaderTitle, { children: title }),
|
|
7963
|
+
/* @__PURE__ */ jsx16(DrawerHeaderCloseButton, { onClick: onClose, children: /* @__PURE__ */ jsx16(Icon_default, { size: "xl", color: "$dark600", name: "xmark" }) })
|
|
7964
|
+
] }),
|
|
7965
|
+
children
|
|
7966
|
+
]
|
|
7967
|
+
}
|
|
7968
|
+
) });
|
|
7969
|
+
}
|
|
7970
|
+
|
|
7849
7971
|
// src/components/TimePicker.tsx
|
|
7850
|
-
import { useCallback, useRef as useRef2, useState as
|
|
7851
|
-
import { jsx as
|
|
7972
|
+
import { useCallback, useRef as useRef2, useState as useState3 } from "react";
|
|
7973
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
7852
7974
|
var TimePickerStyled = styled("div", {
|
|
7853
7975
|
position: "relative",
|
|
7854
7976
|
fontFamily: "$default",
|
|
@@ -7951,11 +8073,11 @@ function TimePicker({
|
|
|
7951
8073
|
setSelected,
|
|
7952
8074
|
position = "bottom"
|
|
7953
8075
|
}) {
|
|
7954
|
-
const [hours, setHours] =
|
|
7955
|
-
const [minutes, setMinutes] =
|
|
7956
|
-
const [rawHours, setRawHours] =
|
|
7957
|
-
const [rawMinutes, setRawMinutes] =
|
|
7958
|
-
const [isOpen, setIsOpen] =
|
|
8076
|
+
const [hours, setHours] = useState3("00");
|
|
8077
|
+
const [minutes, setMinutes] = useState3("00");
|
|
8078
|
+
const [rawHours, setRawHours] = useState3("00");
|
|
8079
|
+
const [rawMinutes, setRawMinutes] = useState3("00");
|
|
8080
|
+
const [isOpen, setIsOpen] = useState3(false);
|
|
7959
8081
|
const dropdownRef = useRef2(null);
|
|
7960
8082
|
useOnClickOutside(dropdownRef, () => setIsOpen(false));
|
|
7961
8083
|
const handleIncrement = useCallback(
|
|
@@ -7986,13 +8108,13 @@ function TimePicker({
|
|
|
7986
8108
|
},
|
|
7987
8109
|
[hours, minutes]
|
|
7988
8110
|
);
|
|
7989
|
-
return /* @__PURE__ */
|
|
7990
|
-
/* @__PURE__ */
|
|
8111
|
+
return /* @__PURE__ */ jsxs8(TimePickerStyled, { ref: dropdownRef, children: [
|
|
8112
|
+
/* @__PURE__ */ jsx17(
|
|
7991
8113
|
TimePickerButtonStyled,
|
|
7992
8114
|
{
|
|
7993
8115
|
type: "button",
|
|
7994
8116
|
onClick: () => setIsOpen((prev) => !prev),
|
|
7995
|
-
children: /* @__PURE__ */
|
|
8117
|
+
children: /* @__PURE__ */ jsx17(
|
|
7996
8118
|
TextField,
|
|
7997
8119
|
{
|
|
7998
8120
|
value: selected,
|
|
@@ -8001,18 +8123,18 @@ function TimePicker({
|
|
|
8001
8123
|
placeholder: "00:00",
|
|
8002
8124
|
typography: "labelSmall",
|
|
8003
8125
|
fontWeight: "regular",
|
|
8004
|
-
children: /* @__PURE__ */
|
|
8126
|
+
children: /* @__PURE__ */ jsx17(TextFieldSlot, { children: /* @__PURE__ */ jsx17(Icon_default, { name: "clock", size: "xl" }) })
|
|
8005
8127
|
}
|
|
8006
8128
|
)
|
|
8007
8129
|
}
|
|
8008
8130
|
),
|
|
8009
|
-
isOpen && /* @__PURE__ */
|
|
8131
|
+
isOpen && /* @__PURE__ */ jsxs8(
|
|
8010
8132
|
TimePickerDropdownStyled,
|
|
8011
8133
|
{
|
|
8012
8134
|
style: position === "top" ? { bottom: "110%" } : { top: "110%" },
|
|
8013
8135
|
children: [
|
|
8014
|
-
/* @__PURE__ */
|
|
8015
|
-
["hours", "minutes"].map((unit) => /* @__PURE__ */
|
|
8136
|
+
/* @__PURE__ */ jsxs8(TimerPickerContentStyled, { children: [
|
|
8137
|
+
["hours", "minutes"].map((unit) => /* @__PURE__ */ jsxs8(
|
|
8016
8138
|
Box,
|
|
8017
8139
|
{
|
|
8018
8140
|
style: {
|
|
@@ -8021,13 +8143,13 @@ function TimePicker({
|
|
|
8021
8143
|
flexDirection: "column"
|
|
8022
8144
|
},
|
|
8023
8145
|
children: [
|
|
8024
|
-
/* @__PURE__ */
|
|
8146
|
+
/* @__PURE__ */ jsx17(
|
|
8025
8147
|
Button,
|
|
8026
8148
|
{
|
|
8027
8149
|
type: "button",
|
|
8028
8150
|
variant: "text",
|
|
8029
8151
|
onClick: () => handleIncrement(unit),
|
|
8030
|
-
children: /* @__PURE__ */
|
|
8152
|
+
children: /* @__PURE__ */ jsxs8(
|
|
8031
8153
|
"svg",
|
|
8032
8154
|
{
|
|
8033
8155
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8036,14 +8158,14 @@ function TimePicker({
|
|
|
8036
8158
|
viewBox: "0 0 32 32",
|
|
8037
8159
|
fill: "none",
|
|
8038
8160
|
children: [
|
|
8039
|
-
/* @__PURE__ */
|
|
8161
|
+
/* @__PURE__ */ jsx17(
|
|
8040
8162
|
"path",
|
|
8041
8163
|
{
|
|
8042
8164
|
d: "M0 8C0 3.58172 3.58172 0 8 0H24C28.4183 0 32 3.58172 32 8V24C32 28.4183 28.4183 32 24 32H8C3.58172 32 0 28.4183 0 24V8Z",
|
|
8043
8165
|
fill: "white"
|
|
8044
8166
|
}
|
|
8045
8167
|
),
|
|
8046
|
-
/* @__PURE__ */
|
|
8168
|
+
/* @__PURE__ */ jsx17(
|
|
8047
8169
|
"path",
|
|
8048
8170
|
{
|
|
8049
8171
|
d: "M16.7063 12.2937C16.3157 11.9031 15.6813 11.9031 15.2907 12.2937L10.2907 17.2937C9.9001 17.6843 9.9001 18.3187 10.2907 18.7093C10.6813 19.1 11.3157 19.1 11.7063 18.7093L16.0001 14.4156L20.2938 18.7062C20.6845 19.0968 21.3188 19.0968 21.7095 18.7062C22.1001 18.3156 22.1001 17.6812 21.7095 17.2906L16.7095 12.2906L16.7063 12.2937Z",
|
|
@@ -8055,7 +8177,7 @@ function TimePicker({
|
|
|
8055
8177
|
)
|
|
8056
8178
|
}
|
|
8057
8179
|
),
|
|
8058
|
-
/* @__PURE__ */
|
|
8180
|
+
/* @__PURE__ */ jsx17(
|
|
8059
8181
|
InputStyled,
|
|
8060
8182
|
{
|
|
8061
8183
|
inputMode: "numeric",
|
|
@@ -8093,13 +8215,13 @@ function TimePicker({
|
|
|
8093
8215
|
}
|
|
8094
8216
|
}
|
|
8095
8217
|
),
|
|
8096
|
-
/* @__PURE__ */
|
|
8218
|
+
/* @__PURE__ */ jsx17(
|
|
8097
8219
|
Button,
|
|
8098
8220
|
{
|
|
8099
8221
|
type: "button",
|
|
8100
8222
|
variant: "text",
|
|
8101
8223
|
onClick: () => handleDecrement(unit),
|
|
8102
|
-
children: /* @__PURE__ */
|
|
8224
|
+
children: /* @__PURE__ */ jsxs8(
|
|
8103
8225
|
"svg",
|
|
8104
8226
|
{
|
|
8105
8227
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8108,14 +8230,14 @@ function TimePicker({
|
|
|
8108
8230
|
viewBox: "0 0 32 32",
|
|
8109
8231
|
fill: "none",
|
|
8110
8232
|
children: [
|
|
8111
|
-
/* @__PURE__ */
|
|
8233
|
+
/* @__PURE__ */ jsx17(
|
|
8112
8234
|
"path",
|
|
8113
8235
|
{
|
|
8114
8236
|
d: "M0 8C0 3.58172 3.58172 0 8 0H24C28.4183 0 32 3.58172 32 8V24C32 28.4183 28.4183 32 24 32H8C3.58172 32 0 28.4183 0 24V8Z",
|
|
8115
8237
|
fill: "white"
|
|
8116
8238
|
}
|
|
8117
8239
|
),
|
|
8118
|
-
/* @__PURE__ */
|
|
8240
|
+
/* @__PURE__ */ jsx17(
|
|
8119
8241
|
"path",
|
|
8120
8242
|
{
|
|
8121
8243
|
d: "M15.2937 19.7063C15.6843 20.0969 16.3187 20.0969 16.7093 19.7063L21.7093 14.7063C22.0999 14.3157 22.0999 13.6813 21.7093 13.2907C21.3187 12.9 20.6843 12.9 20.2937 13.2907L15.9999 17.5844L11.7062 13.2938C11.3155 12.9032 10.6812 12.9032 10.2905 13.2938C9.8999 13.6844 9.8999 14.3188 10.2905 14.7094L15.2905 19.7094L15.2937 19.7063Z",
|
|
@@ -8131,9 +8253,9 @@ function TimePicker({
|
|
|
8131
8253
|
},
|
|
8132
8254
|
unit
|
|
8133
8255
|
)),
|
|
8134
|
-
/* @__PURE__ */
|
|
8256
|
+
/* @__PURE__ */ jsx17(Text, { children: ":" })
|
|
8135
8257
|
] }),
|
|
8136
|
-
/* @__PURE__ */
|
|
8258
|
+
/* @__PURE__ */ jsx17(TimePickerFooterStyled, { children: /* @__PURE__ */ jsx17(
|
|
8137
8259
|
Button,
|
|
8138
8260
|
{
|
|
8139
8261
|
type: "button",
|
|
@@ -8156,7 +8278,7 @@ function TimePicker({
|
|
|
8156
8278
|
|
|
8157
8279
|
// src/components/Alert.tsx
|
|
8158
8280
|
import { Theme as Theme3, AlertDialog } from "@radix-ui/themes";
|
|
8159
|
-
import { Fragment, jsx as
|
|
8281
|
+
import { Fragment, jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
8160
8282
|
var AlertDialogSimpleStyled = styled(AlertDialog.Content, {
|
|
8161
8283
|
fontFamily: "$default",
|
|
8162
8284
|
lineHeight: "$base",
|
|
@@ -8270,19 +8392,19 @@ function Alert(_a) {
|
|
|
8270
8392
|
"completAlert",
|
|
8271
8393
|
"simpleAlert"
|
|
8272
8394
|
]);
|
|
8273
|
-
return /* @__PURE__ */
|
|
8274
|
-
simpleAlert && /* @__PURE__ */
|
|
8275
|
-
/* @__PURE__ */
|
|
8276
|
-
/* @__PURE__ */
|
|
8277
|
-
/* @__PURE__ */
|
|
8278
|
-
simpleAlert.cancel && /* @__PURE__ */
|
|
8395
|
+
return /* @__PURE__ */ jsxs9(Fragment, { children: [
|
|
8396
|
+
simpleAlert && /* @__PURE__ */ jsx18(Theme3, { children: /* @__PURE__ */ jsxs9(AlertDialog.Root, { children: [
|
|
8397
|
+
/* @__PURE__ */ jsx18(AlertDialog.Trigger, { children: trigger }),
|
|
8398
|
+
/* @__PURE__ */ jsx18(Fragment, { children: /* @__PURE__ */ jsxs9(AlertDialogSimpleStyled, __spreadProps(__spreadValues({}, props), { children: [
|
|
8399
|
+
/* @__PURE__ */ jsx18(AlertDialogDescriptionStyled, { children: simpleAlert.description }),
|
|
8400
|
+
simpleAlert.cancel && /* @__PURE__ */ jsx18(AlertDialog.Cancel, { children: /* @__PURE__ */ jsx18(Button, { variant: "text", children: /* @__PURE__ */ jsx18(Icon_default, { name: "close" }) }) })
|
|
8279
8401
|
] })) })
|
|
8280
8402
|
] }) }),
|
|
8281
|
-
completAlert && /* @__PURE__ */
|
|
8282
|
-
/* @__PURE__ */
|
|
8283
|
-
/* @__PURE__ */
|
|
8284
|
-
/* @__PURE__ */
|
|
8285
|
-
color === "success" && /* @__PURE__ */
|
|
8403
|
+
completAlert && /* @__PURE__ */ jsx18(Theme3, { children: /* @__PURE__ */ jsxs9(AlertDialog.Root, { children: [
|
|
8404
|
+
/* @__PURE__ */ jsx18(AlertDialog.Trigger, { children: trigger }),
|
|
8405
|
+
/* @__PURE__ */ jsxs9(AlertDialogCompleteStyled, { children: [
|
|
8406
|
+
/* @__PURE__ */ jsxs9(AlertDialogRowStyled, { className: "le-alert-dialog-row", children: [
|
|
8407
|
+
color === "success" && /* @__PURE__ */ jsxs9(
|
|
8286
8408
|
"svg",
|
|
8287
8409
|
{
|
|
8288
8410
|
width: "56",
|
|
@@ -8291,18 +8413,18 @@ function Alert(_a) {
|
|
|
8291
8413
|
fill: "none",
|
|
8292
8414
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8293
8415
|
children: [
|
|
8294
|
-
/* @__PURE__ */
|
|
8416
|
+
/* @__PURE__ */ jsx18("g", { clipPath: "url(#clip0_1428_9995)", children: /* @__PURE__ */ jsx18(
|
|
8295
8417
|
"path",
|
|
8296
8418
|
{
|
|
8297
8419
|
d: "M28 56C35.4261 56 42.548 53.05 47.799 47.799C53.05 42.548 56 35.4261 56 28C56 20.5739 53.05 13.452 47.799 8.20101C42.548 2.94999 35.4261 0 28 0C20.5739 0 13.452 2.94999 8.20101 8.20101C2.94999 13.452 0 20.5739 0 28C0 35.4261 2.94999 42.548 8.20101 47.799C13.452 53.05 20.5739 56 28 56ZM40.3594 22.8594L26.3594 36.8594C25.3312 37.8875 23.6688 37.8875 22.6516 36.8594L15.6516 29.8594C14.6234 28.8312 14.6234 27.1688 15.6516 26.1516C16.6797 25.1344 18.3422 25.1234 19.3594 26.1516L24.5 31.2922L36.6406 19.1406C37.6688 18.1125 39.3312 18.1125 40.3484 19.1406C41.3656 20.1688 41.3766 21.8312 40.3484 22.8484L40.3594 22.8594Z",
|
|
8298
8420
|
fill: "#1E8535"
|
|
8299
8421
|
}
|
|
8300
8422
|
) }),
|
|
8301
|
-
/* @__PURE__ */
|
|
8423
|
+
/* @__PURE__ */ jsx18("defs", { children: /* @__PURE__ */ jsx18("clipPath", { id: "clip0_1428_9995", children: /* @__PURE__ */ jsx18("rect", { width: "56", height: "56", fill: "white" }) }) })
|
|
8302
8424
|
]
|
|
8303
8425
|
}
|
|
8304
8426
|
),
|
|
8305
|
-
color === "error" && /* @__PURE__ */
|
|
8427
|
+
color === "error" && /* @__PURE__ */ jsxs9(
|
|
8306
8428
|
"svg",
|
|
8307
8429
|
{
|
|
8308
8430
|
width: "56",
|
|
@@ -8311,18 +8433,18 @@ function Alert(_a) {
|
|
|
8311
8433
|
fill: "none",
|
|
8312
8434
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8313
8435
|
children: [
|
|
8314
|
-
/* @__PURE__ */
|
|
8436
|
+
/* @__PURE__ */ jsx18("g", { clipPath: "url(#clip0_1428_10022)", children: /* @__PURE__ */ jsx18(
|
|
8315
8437
|
"path",
|
|
8316
8438
|
{
|
|
8317
8439
|
d: "M28 56C35.4261 56 42.548 53.05 47.799 47.799C53.05 42.548 56 35.4261 56 28C56 20.5739 53.05 13.452 47.799 8.20101C42.548 2.94999 35.4261 0 28 0C20.5739 0 13.452 2.94999 8.20101 8.20101C2.94999 13.452 0 20.5739 0 28C0 35.4261 2.94999 42.548 8.20101 47.799C13.452 53.05 20.5739 56 28 56ZM19.1406 19.1406C20.1687 18.1125 21.8312 18.1125 22.8484 19.1406L27.9891 24.2812L33.1297 19.1406C34.1578 18.1125 35.8203 18.1125 36.8375 19.1406C37.8547 20.1687 37.8656 21.8312 36.8375 22.8484L31.6969 27.9891L36.8375 33.1297C37.8656 34.1578 37.8656 35.8203 36.8375 36.8375C35.8094 37.8547 34.1469 37.8656 33.1297 36.8375L27.9891 31.6969L22.8484 36.8375C21.8203 37.8656 20.1578 37.8656 19.1406 36.8375C18.1234 35.8094 18.1125 34.1469 19.1406 33.1297L24.2812 27.9891L19.1406 22.8484C18.1125 21.8203 18.1125 20.1578 19.1406 19.1406Z",
|
|
8318
8440
|
fill: "#AD1F2B"
|
|
8319
8441
|
}
|
|
8320
8442
|
) }),
|
|
8321
|
-
/* @__PURE__ */
|
|
8443
|
+
/* @__PURE__ */ jsx18("defs", { children: /* @__PURE__ */ jsx18("clipPath", { id: "clip0_1428_10022", children: /* @__PURE__ */ jsx18("rect", { width: "56", height: "56", fill: "white" }) }) })
|
|
8322
8444
|
]
|
|
8323
8445
|
}
|
|
8324
8446
|
),
|
|
8325
|
-
color === "warning" && /* @__PURE__ */
|
|
8447
|
+
color === "warning" && /* @__PURE__ */ jsxs9(
|
|
8326
8448
|
"svg",
|
|
8327
8449
|
{
|
|
8328
8450
|
width: "56",
|
|
@@ -8331,18 +8453,18 @@ function Alert(_a) {
|
|
|
8331
8453
|
fill: "none",
|
|
8332
8454
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8333
8455
|
children: [
|
|
8334
|
-
/* @__PURE__ */
|
|
8456
|
+
/* @__PURE__ */ jsx18("g", { clipPath: "url(#clip0_1428_10038)", children: /* @__PURE__ */ jsx18(
|
|
8335
8457
|
"path",
|
|
8336
8458
|
{
|
|
8337
8459
|
d: "M28 56C35.4261 56 42.548 53.05 47.799 47.799C53.05 42.548 56 35.4261 56 28C56 20.5739 53.05 13.452 47.799 8.20101C42.548 2.94999 35.4261 0 28 0C20.5739 0 13.452 2.94999 8.20101 8.20101C2.94999 13.452 0 20.5739 0 28C0 35.4261 2.94999 42.548 8.20101 47.799C13.452 53.05 20.5739 56 28 56ZM28 14C29.4547 14 30.625 15.1703 30.625 16.625V28.875C30.625 30.3297 29.4547 31.5 28 31.5C26.5453 31.5 25.375 30.3297 25.375 28.875V16.625C25.375 15.1703 26.5453 14 28 14ZM24.5 38.5C24.5 37.5717 24.8687 36.6815 25.5251 36.0251C26.1815 35.3688 27.0717 35 28 35C28.9283 35 29.8185 35.3688 30.4749 36.0251C31.1313 36.6815 31.5 37.5717 31.5 38.5C31.5 39.4283 31.1313 40.3185 30.4749 40.9749C29.8185 41.6312 28.9283 42 28 42C27.0717 42 26.1815 41.6312 25.5251 40.9749C24.8687 40.3185 24.5 39.4283 24.5 38.5Z",
|
|
8338
8460
|
fill: "#CC9A06"
|
|
8339
8461
|
}
|
|
8340
8462
|
) }),
|
|
8341
|
-
/* @__PURE__ */
|
|
8463
|
+
/* @__PURE__ */ jsx18("defs", { children: /* @__PURE__ */ jsx18("clipPath", { id: "clip0_1428_10038", children: /* @__PURE__ */ jsx18("rect", { width: "56", height: "56", fill: "white" }) }) })
|
|
8342
8464
|
]
|
|
8343
8465
|
}
|
|
8344
8466
|
),
|
|
8345
|
-
color === "info" && /* @__PURE__ */
|
|
8467
|
+
color === "info" && /* @__PURE__ */ jsxs9(
|
|
8346
8468
|
"svg",
|
|
8347
8469
|
{
|
|
8348
8470
|
width: "40",
|
|
@@ -8351,35 +8473,35 @@ function Alert(_a) {
|
|
|
8351
8473
|
fill: "none",
|
|
8352
8474
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8353
8475
|
children: [
|
|
8354
|
-
/* @__PURE__ */
|
|
8476
|
+
/* @__PURE__ */ jsx18("g", { clipPath: "url(#clip0_1645_46)", children: /* @__PURE__ */ jsx18(
|
|
8355
8477
|
"path",
|
|
8356
8478
|
{
|
|
8357
8479
|
d: "M20 40C25.3043 40 30.3914 37.8929 34.1421 34.1421C37.8929 30.3914 40 25.3043 40 20C40 14.6957 37.8929 9.60859 34.1421 5.85786C30.3914 2.10714 25.3043 0 20 0C14.6957 0 9.60859 2.10714 5.85786 5.85786C2.10714 9.60859 0 14.6957 0 20C0 25.3043 2.10714 30.3914 5.85786 34.1421C9.60859 37.8929 14.6957 40 20 40ZM20 10C21.0391 10 21.875 10.8359 21.875 11.875V20.625C21.875 21.6641 21.0391 22.5 20 22.5C18.9609 22.5 18.125 21.6641 18.125 20.625V11.875C18.125 10.8359 18.9609 10 20 10ZM17.5 27.5C17.5 26.837 17.7634 26.2011 18.2322 25.7322C18.7011 25.2634 19.337 25 20 25C20.663 25 21.2989 25.2634 21.7678 25.7322C22.2366 26.2011 22.5 26.837 22.5 27.5C22.5 28.163 22.2366 28.7989 21.7678 29.2678C21.2989 29.7366 20.663 30 20 30C19.337 30 18.7011 29.7366 18.2322 29.2678C17.7634 28.7989 17.5 28.163 17.5 27.5Z",
|
|
8358
8480
|
fill: "#9FB6C7"
|
|
8359
8481
|
}
|
|
8360
8482
|
) }),
|
|
8361
|
-
/* @__PURE__ */
|
|
8483
|
+
/* @__PURE__ */ jsx18("defs", { children: /* @__PURE__ */ jsx18("clipPath", { id: "clip0_1645_46", children: /* @__PURE__ */ jsx18("rect", { width: "40", height: "40", fill: "white" }) }) })
|
|
8362
8484
|
]
|
|
8363
8485
|
}
|
|
8364
8486
|
),
|
|
8365
|
-
completAlert.title && /* @__PURE__ */
|
|
8366
|
-
/* @__PURE__ */
|
|
8367
|
-
completAlert.subtitle && /* @__PURE__ */
|
|
8487
|
+
completAlert.title && /* @__PURE__ */ jsx18(AlertDialogTitleStyled, { children: completAlert.title }),
|
|
8488
|
+
/* @__PURE__ */ jsxs9(AlertDialogDescriptionStyled, { children: [
|
|
8489
|
+
completAlert.subtitle && /* @__PURE__ */ jsx18(
|
|
8368
8490
|
Text,
|
|
8369
8491
|
{
|
|
8370
8492
|
css: {
|
|
8371
8493
|
fontSize: "$16"
|
|
8372
8494
|
},
|
|
8373
8495
|
asChild: true,
|
|
8374
|
-
children: /* @__PURE__ */
|
|
8496
|
+
children: /* @__PURE__ */ jsx18("h2", { children: completAlert.subtitle })
|
|
8375
8497
|
}
|
|
8376
8498
|
),
|
|
8377
8499
|
completAlert.description
|
|
8378
8500
|
] })
|
|
8379
8501
|
] }),
|
|
8380
|
-
completAlert.onAction || completAlert.cancel ? /* @__PURE__ */
|
|
8381
|
-
/* @__PURE__ */
|
|
8382
|
-
completAlert.onAction && /* @__PURE__ */
|
|
8502
|
+
completAlert.onAction || completAlert.cancel ? /* @__PURE__ */ jsx18(AlertDialoghrStyled, {}) : null,
|
|
8503
|
+
/* @__PURE__ */ jsx18(AlertDialogRowStyled, { children: /* @__PURE__ */ jsxs9(Flex2, { gap: "10", justify: "end", width: "100%", children: [
|
|
8504
|
+
completAlert.onAction && /* @__PURE__ */ jsx18(AlertDialog.Action, { children: /* @__PURE__ */ jsx18(
|
|
8383
8505
|
Button,
|
|
8384
8506
|
{
|
|
8385
8507
|
variant: "contained",
|
|
@@ -8387,7 +8509,7 @@ function Alert(_a) {
|
|
|
8387
8509
|
children: completAlert.actionText || "Salvar"
|
|
8388
8510
|
}
|
|
8389
8511
|
) }),
|
|
8390
|
-
completAlert.cancel && /* @__PURE__ */
|
|
8512
|
+
completAlert.cancel && /* @__PURE__ */ jsx18(AlertDialog.Cancel, { children: /* @__PURE__ */ jsx18(Button, { variant: "outlined", color: "neutral", children: completAlert.cancelText || "Cancelar" }) })
|
|
8391
8513
|
] }) })
|
|
8392
8514
|
] })
|
|
8393
8515
|
] }) })
|
|
@@ -8396,7 +8518,7 @@ function Alert(_a) {
|
|
|
8396
8518
|
|
|
8397
8519
|
// src/components/Switch.tsx
|
|
8398
8520
|
import { Switch as RadixSwitch } from "@radix-ui/themes";
|
|
8399
|
-
import { jsx as
|
|
8521
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
8400
8522
|
var SwitchStyled = styled(RadixSwitch, {
|
|
8401
8523
|
all: "unset",
|
|
8402
8524
|
borderRadius: "$full",
|
|
@@ -8490,13 +8612,13 @@ var SwitchStyled = styled(RadixSwitch, {
|
|
|
8490
8612
|
}
|
|
8491
8613
|
});
|
|
8492
8614
|
function Switch(props) {
|
|
8493
|
-
return /* @__PURE__ */
|
|
8615
|
+
return /* @__PURE__ */ jsx19(SwitchStyled, __spreadValues({ color: "brand", defaultChecked: true }, props));
|
|
8494
8616
|
}
|
|
8495
8617
|
|
|
8496
8618
|
// src/components/Step.tsx
|
|
8497
8619
|
import React5 from "react";
|
|
8498
8620
|
import { Box as Box2, Tabs as StepRadix } from "@radix-ui/themes";
|
|
8499
|
-
import { jsx as
|
|
8621
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
8500
8622
|
var StepStyled = styled("div", {
|
|
8501
8623
|
fontFamily: "$default",
|
|
8502
8624
|
color: "$gray100",
|
|
@@ -8569,7 +8691,7 @@ var StepListStyled = styled(StepRadix.List, {
|
|
|
8569
8691
|
});
|
|
8570
8692
|
function Step(_a) {
|
|
8571
8693
|
var _b = _a, { children, defaultValue } = _b, props = __objRest(_b, ["children", "defaultValue"]);
|
|
8572
|
-
return /* @__PURE__ */
|
|
8694
|
+
return /* @__PURE__ */ jsx20(StepRadix.Root, { defaultValue: String(defaultValue), children: /* @__PURE__ */ jsx20(StepStyled, __spreadProps(__spreadValues({}, props), { children })) });
|
|
8573
8695
|
}
|
|
8574
8696
|
function StepTrigger(_a) {
|
|
8575
8697
|
var _b = _a, {
|
|
@@ -8582,7 +8704,7 @@ function StepTrigger(_a) {
|
|
|
8582
8704
|
"currentStep"
|
|
8583
8705
|
]);
|
|
8584
8706
|
const isActiveOrPrevious = currentStep !== void 0 && value <= currentStep;
|
|
8585
|
-
return /* @__PURE__ */
|
|
8707
|
+
return /* @__PURE__ */ jsx20(
|
|
8586
8708
|
StepTriggerStyled,
|
|
8587
8709
|
__spreadProps(__spreadValues({
|
|
8588
8710
|
"data-filled": isActiveOrPrevious,
|
|
@@ -8600,7 +8722,7 @@ function StepContent(_a) {
|
|
|
8600
8722
|
"value",
|
|
8601
8723
|
"children"
|
|
8602
8724
|
]);
|
|
8603
|
-
return /* @__PURE__ */
|
|
8725
|
+
return /* @__PURE__ */ jsx20(StepRadix.Content, __spreadProps(__spreadValues({ value: String(value) }, props), { children }));
|
|
8604
8726
|
}
|
|
8605
8727
|
function StepList(_a) {
|
|
8606
8728
|
var _b = _a, {
|
|
@@ -8610,7 +8732,7 @@ function StepList(_a) {
|
|
|
8610
8732
|
"children",
|
|
8611
8733
|
"currentStep"
|
|
8612
8734
|
]);
|
|
8613
|
-
return /* @__PURE__ */
|
|
8735
|
+
return /* @__PURE__ */ jsx20(StepListStyled, __spreadProps(__spreadValues({}, props), { children: React5.Children.map(children, (child) => {
|
|
8614
8736
|
if (React5.isValidElement(child) && child.type === StepTrigger) {
|
|
8615
8737
|
return React5.cloneElement(child, { currentStep });
|
|
8616
8738
|
}
|
|
@@ -8623,12 +8745,12 @@ function StepWrapper(_a) {
|
|
|
8623
8745
|
} = _b, props = __objRest(_b, [
|
|
8624
8746
|
"children"
|
|
8625
8747
|
]);
|
|
8626
|
-
return /* @__PURE__ */
|
|
8748
|
+
return /* @__PURE__ */ jsx20(Box2, __spreadProps(__spreadValues({}, props), { children }));
|
|
8627
8749
|
}
|
|
8628
8750
|
|
|
8629
8751
|
// src/components/Card.tsx
|
|
8630
8752
|
import { Card as CardRadix } from "@radix-ui/themes";
|
|
8631
|
-
import { jsx as
|
|
8753
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
8632
8754
|
var CardStyled = styled(CardRadix, {
|
|
8633
8755
|
borderRadius: "$2xl",
|
|
8634
8756
|
border: "1px solid $dark100",
|
|
@@ -8664,13 +8786,13 @@ var CardStyled = styled(CardRadix, {
|
|
|
8664
8786
|
});
|
|
8665
8787
|
function Card(_a) {
|
|
8666
8788
|
var _b = _a, { asChild, children } = _b, props = __objRest(_b, ["asChild", "children"]);
|
|
8667
|
-
return /* @__PURE__ */
|
|
8789
|
+
return /* @__PURE__ */ jsx21(CardStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
8668
8790
|
}
|
|
8669
8791
|
|
|
8670
8792
|
// src/components/TextareaField.tsx
|
|
8671
8793
|
import { TextArea as TextAreaRadix } from "@radix-ui/themes";
|
|
8672
8794
|
import React6, { useRef as useRef3 } from "react";
|
|
8673
|
-
import { jsx as
|
|
8795
|
+
import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
8674
8796
|
var TextareaFieldStyle = styled(TextAreaRadix, {
|
|
8675
8797
|
display: "flex",
|
|
8676
8798
|
flex: 1,
|
|
@@ -8749,8 +8871,8 @@ var TextareaField = React6.forwardRef((_a, fowardedRef) => {
|
|
|
8749
8871
|
updateCharCountBadge();
|
|
8750
8872
|
(_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
|
|
8751
8873
|
};
|
|
8752
|
-
return /* @__PURE__ */
|
|
8753
|
-
/* @__PURE__ */
|
|
8874
|
+
return /* @__PURE__ */ jsxs10(TextareaContainer, { color, children: [
|
|
8875
|
+
/* @__PURE__ */ jsx22(
|
|
8754
8876
|
TextareaFieldStyle,
|
|
8755
8877
|
__spreadValues({
|
|
8756
8878
|
rows: 4,
|
|
@@ -8768,12 +8890,12 @@ var TextareaField = React6.forwardRef((_a, fowardedRef) => {
|
|
|
8768
8890
|
maxLength
|
|
8769
8891
|
}, props)
|
|
8770
8892
|
),
|
|
8771
|
-
maxLength && /* @__PURE__ */
|
|
8893
|
+
maxLength && /* @__PURE__ */ jsx22(TextareaLimitIndicator, { children: /* @__PURE__ */ jsx22(Text, { typography: "badgeMedium", ref: badgeRef, children: maxLength }) })
|
|
8772
8894
|
] });
|
|
8773
8895
|
});
|
|
8774
8896
|
|
|
8775
8897
|
// src/components/Toast/components/ToastItem.tsx
|
|
8776
|
-
import { useState as
|
|
8898
|
+
import { useState as useState4 } from "react";
|
|
8777
8899
|
|
|
8778
8900
|
// src/components/Toast/styles/index.ts
|
|
8779
8901
|
import { keyframes as keyframes2 } from "@stitches/react";
|
|
@@ -8899,19 +9021,19 @@ var ToastClose = styled(ToastPrimitive.Close, {
|
|
|
8899
9021
|
});
|
|
8900
9022
|
|
|
8901
9023
|
// src/components/Toast/components/ToastItem.tsx
|
|
8902
|
-
import { jsx as
|
|
9024
|
+
import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
8903
9025
|
function ToastItem({
|
|
8904
9026
|
toast,
|
|
8905
9027
|
onRemove
|
|
8906
9028
|
}) {
|
|
8907
|
-
const [open, setOpen] =
|
|
9029
|
+
const [open, setOpen] = useState4(true);
|
|
8908
9030
|
const handleOpenChange = (open2) => {
|
|
8909
9031
|
setOpen(open2);
|
|
8910
9032
|
if (!open2) {
|
|
8911
9033
|
onRemove(toast.id);
|
|
8912
9034
|
}
|
|
8913
9035
|
};
|
|
8914
|
-
return /* @__PURE__ */
|
|
9036
|
+
return /* @__PURE__ */ jsxs11(
|
|
8915
9037
|
ToastRoot,
|
|
8916
9038
|
{
|
|
8917
9039
|
type: toast.type,
|
|
@@ -8919,18 +9041,18 @@ function ToastItem({
|
|
|
8919
9041
|
open,
|
|
8920
9042
|
onOpenChange: handleOpenChange,
|
|
8921
9043
|
children: [
|
|
8922
|
-
(toast == null ? void 0 : toast.icon) && /* @__PURE__ */
|
|
8923
|
-
/* @__PURE__ */
|
|
8924
|
-
/* @__PURE__ */
|
|
9044
|
+
(toast == null ? void 0 : toast.icon) && /* @__PURE__ */ jsx23(Icon_default, { name: toast.icon, size: "xl" }),
|
|
9045
|
+
/* @__PURE__ */ jsx23("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx23(Text, { typography: "bodyS", fontWeight: "medium", children: toast.message }) }),
|
|
9046
|
+
/* @__PURE__ */ jsx23(ToastClose, { "aria-label": "Close", children: /* @__PURE__ */ jsx23(Icon_default, { name: "xmark", size: "md" }) })
|
|
8925
9047
|
]
|
|
8926
9048
|
}
|
|
8927
9049
|
);
|
|
8928
9050
|
}
|
|
8929
9051
|
|
|
8930
9052
|
// src/components/Toast/components/ToastProvider.tsx
|
|
8931
|
-
import { createContext, useState as
|
|
9053
|
+
import { createContext, useState as useState5 } from "react";
|
|
8932
9054
|
import * as ToastPrimitive2 from "@radix-ui/react-toast";
|
|
8933
|
-
import { jsx as
|
|
9055
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
8934
9056
|
var ToastContext = createContext(null);
|
|
8935
9057
|
function ToastProvider({
|
|
8936
9058
|
children,
|
|
@@ -8938,7 +9060,7 @@ function ToastProvider({
|
|
|
8938
9060
|
maxToasts = 5,
|
|
8939
9061
|
swipeDirection = "right"
|
|
8940
9062
|
}) {
|
|
8941
|
-
const [toasts, setToasts] =
|
|
9063
|
+
const [toasts, setToasts] = useState5([]);
|
|
8942
9064
|
const addToast = (toastData) => {
|
|
8943
9065
|
const id = Math.random().toString(36).substr(2, 9);
|
|
8944
9066
|
const newToast = __spreadProps(__spreadValues({
|
|
@@ -8966,10 +9088,10 @@ function ToastProvider({
|
|
|
8966
9088
|
removeToast,
|
|
8967
9089
|
removeAllToasts
|
|
8968
9090
|
};
|
|
8969
|
-
return /* @__PURE__ */
|
|
9091
|
+
return /* @__PURE__ */ jsx24(ToastContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs12(ToastPrimitive2.Provider, { swipeDirection, children: [
|
|
8970
9092
|
children,
|
|
8971
|
-
toasts.map((toast) => /* @__PURE__ */
|
|
8972
|
-
/* @__PURE__ */
|
|
9093
|
+
toasts.map((toast) => /* @__PURE__ */ jsx24(ToastItem, { toast, onRemove: removeToast }, toast.id)),
|
|
9094
|
+
/* @__PURE__ */ jsx24(ToastViewport, {})
|
|
8973
9095
|
] }) });
|
|
8974
9096
|
}
|
|
8975
9097
|
|
|
@@ -8985,7 +9107,7 @@ var useToast = () => {
|
|
|
8985
9107
|
|
|
8986
9108
|
// src/components/Tooltip/index.tsx
|
|
8987
9109
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
8988
|
-
import { jsx as
|
|
9110
|
+
import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
8989
9111
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
8990
9112
|
var TooltipRoot = TooltipPrimitive.Root;
|
|
8991
9113
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
@@ -9024,18 +9146,187 @@ function Tooltip({
|
|
|
9024
9146
|
delayDuration = 200,
|
|
9025
9147
|
side = "top"
|
|
9026
9148
|
}) {
|
|
9027
|
-
return /* @__PURE__ */
|
|
9028
|
-
/* @__PURE__ */
|
|
9029
|
-
/* @__PURE__ */
|
|
9030
|
-
typeof content === "string" ? /* @__PURE__ */
|
|
9031
|
-
/* @__PURE__ */
|
|
9149
|
+
return /* @__PURE__ */ jsx25(TooltipProvider, { children: /* @__PURE__ */ jsxs13(TooltipRoot, { delayDuration, children: [
|
|
9150
|
+
/* @__PURE__ */ jsx25(TooltipTrigger, { asChild: true, children }),
|
|
9151
|
+
/* @__PURE__ */ jsxs13(TooltipContent, { side, sideOffset: 5, children: [
|
|
9152
|
+
typeof content === "string" ? /* @__PURE__ */ jsx25(Text, { typography: "tooltip", children: content }) : content,
|
|
9153
|
+
/* @__PURE__ */ jsx25(TooltipArrow, {})
|
|
9032
9154
|
] })
|
|
9033
9155
|
] }) });
|
|
9034
9156
|
}
|
|
9035
9157
|
|
|
9158
|
+
// src/components/MultiSelect.tsx
|
|
9159
|
+
import { DropdownMenu as DropdownMenu3, Theme as Theme4 } from "@radix-ui/themes";
|
|
9160
|
+
import { FontAwesomeIcon as FontAwesomeIcon2 } from "@fortawesome/react-fontawesome";
|
|
9161
|
+
import {
|
|
9162
|
+
faChevronDown,
|
|
9163
|
+
faChevronUp,
|
|
9164
|
+
faX
|
|
9165
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
9166
|
+
import { useCallback as useCallback2, useMemo, useRef as useRef4, useState as useState6 } from "react";
|
|
9167
|
+
import React7 from "react";
|
|
9168
|
+
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
9169
|
+
var StyledContent = styled(DropdownMenu3.Content, {
|
|
9170
|
+
backgroundColor: "$dark50",
|
|
9171
|
+
borderRadius: "$sm",
|
|
9172
|
+
padding: "$8 0",
|
|
9173
|
+
boxShadow: "0px 2px 4px 0px #23354329, 0px 4px 4px 0px #23354314",
|
|
9174
|
+
boxSizing: "border-box",
|
|
9175
|
+
border: "1px solid $dark300"
|
|
9176
|
+
});
|
|
9177
|
+
var StyledTrigger = styled("div", {
|
|
9178
|
+
minHeight: "40px",
|
|
9179
|
+
borderRadius: "$sm",
|
|
9180
|
+
cursor: "pointer",
|
|
9181
|
+
display: "flex",
|
|
9182
|
+
justifyContent: "start",
|
|
9183
|
+
alignItems: "center",
|
|
9184
|
+
padding: "$6 $14",
|
|
9185
|
+
boxSizing: "border-box",
|
|
9186
|
+
gap: "4px",
|
|
9187
|
+
variants: {
|
|
9188
|
+
color: {
|
|
9189
|
+
default: {
|
|
9190
|
+
border: "1px solid $dark300"
|
|
9191
|
+
},
|
|
9192
|
+
error: {
|
|
9193
|
+
border: "1px solid $error400"
|
|
9194
|
+
}
|
|
9195
|
+
}
|
|
9196
|
+
},
|
|
9197
|
+
defaultVariants: {
|
|
9198
|
+
color: "default"
|
|
9199
|
+
}
|
|
9200
|
+
});
|
|
9201
|
+
var itemStyle = {
|
|
9202
|
+
padding: "$4 $16",
|
|
9203
|
+
minHeight: "$32",
|
|
9204
|
+
height: "32px",
|
|
9205
|
+
boxSizing: "border-box",
|
|
9206
|
+
backgroundColor: "$dark50",
|
|
9207
|
+
display: "block",
|
|
9208
|
+
"&:hover": {
|
|
9209
|
+
backgroundColor: "$dark100"
|
|
9210
|
+
}
|
|
9211
|
+
};
|
|
9212
|
+
var BadgeWrapper = styled("div", {
|
|
9213
|
+
flex: "1",
|
|
9214
|
+
display: "flex",
|
|
9215
|
+
justifyContent: "start",
|
|
9216
|
+
flexWrap: "wrap",
|
|
9217
|
+
gap: "4px"
|
|
9218
|
+
});
|
|
9219
|
+
var BadgeCloseBtn = styled("div", {
|
|
9220
|
+
borderRadius: "100%",
|
|
9221
|
+
width: "16px",
|
|
9222
|
+
height: "16px",
|
|
9223
|
+
minWidth: "16px",
|
|
9224
|
+
minHeight: "16px",
|
|
9225
|
+
display: "flex",
|
|
9226
|
+
justifyContent: "center",
|
|
9227
|
+
alignItems: "center",
|
|
9228
|
+
"&:hover": {
|
|
9229
|
+
backgroundColor: "$dark600"
|
|
9230
|
+
}
|
|
9231
|
+
});
|
|
9232
|
+
var MultiSelect = React7.forwardRef(
|
|
9233
|
+
({
|
|
9234
|
+
placeholder,
|
|
9235
|
+
value: selectedValues = [],
|
|
9236
|
+
onValueChange,
|
|
9237
|
+
options,
|
|
9238
|
+
color,
|
|
9239
|
+
width = "100%"
|
|
9240
|
+
}, fowardedRef) => {
|
|
9241
|
+
var _a;
|
|
9242
|
+
const [isOpen, setIsOpen] = useState6(false);
|
|
9243
|
+
const triggerRef = useRef4(null);
|
|
9244
|
+
const labelByValue = useMemo(() => {
|
|
9245
|
+
return options.reduce((prev, curr) => {
|
|
9246
|
+
return __spreadProps(__spreadValues({}, prev), {
|
|
9247
|
+
[curr.value]: curr.label
|
|
9248
|
+
});
|
|
9249
|
+
}, {});
|
|
9250
|
+
}, [options]);
|
|
9251
|
+
const handleRemove = useCallback2(
|
|
9252
|
+
(value) => {
|
|
9253
|
+
const newValue = selectedValues.filter((v) => v !== value);
|
|
9254
|
+
onValueChange == null ? void 0 : onValueChange(newValue);
|
|
9255
|
+
},
|
|
9256
|
+
[selectedValues, onValueChange]
|
|
9257
|
+
);
|
|
9258
|
+
const menuWidth = (_a = triggerRef.current) == null ? void 0 : _a.offsetWidth;
|
|
9259
|
+
return /* @__PURE__ */ jsx26(Theme4, { children: /* @__PURE__ */ jsxs14(DropdownMenu3.Root, { open: isOpen, onOpenChange: () => setIsOpen(false), children: [
|
|
9260
|
+
/* @__PURE__ */ jsx26(DropdownMenu3.Trigger, { onClick: () => setIsOpen(true), children: /* @__PURE__ */ jsxs14(
|
|
9261
|
+
StyledTrigger,
|
|
9262
|
+
{
|
|
9263
|
+
css: {
|
|
9264
|
+
width
|
|
9265
|
+
},
|
|
9266
|
+
ref: (r) => {
|
|
9267
|
+
if (!r) return;
|
|
9268
|
+
triggerRef.current = r;
|
|
9269
|
+
if (fowardedRef) {
|
|
9270
|
+
if (typeof fowardedRef === "function") fowardedRef(r);
|
|
9271
|
+
else {
|
|
9272
|
+
fowardedRef.current = r;
|
|
9273
|
+
}
|
|
9274
|
+
}
|
|
9275
|
+
},
|
|
9276
|
+
color,
|
|
9277
|
+
children: [
|
|
9278
|
+
selectedValues.length === 0 ? /* @__PURE__ */ jsx26(Text, { typography: "labelMedium", css: { flex: 1 }, children: placeholder != null ? placeholder : "Selecione" }) : /* @__PURE__ */ jsx26(BadgeWrapper, { children: selectedValues.map((value) => {
|
|
9279
|
+
return /* @__PURE__ */ jsx26(Badge, { size: "sm", color: "dark", children: /* @__PURE__ */ jsxs14(Flex2, { justify: "between", align: "center", children: [
|
|
9280
|
+
/* @__PURE__ */ jsx26(Text, { typography: "badgeSmall", color: "dark100", children: labelByValue[value] }),
|
|
9281
|
+
/* @__PURE__ */ jsx26(
|
|
9282
|
+
BadgeCloseBtn,
|
|
9283
|
+
{
|
|
9284
|
+
onClick: (e) => {
|
|
9285
|
+
e.stopPropagation();
|
|
9286
|
+
handleRemove(value);
|
|
9287
|
+
},
|
|
9288
|
+
role: "button",
|
|
9289
|
+
children: /* @__PURE__ */ jsx26(FontAwesomeIcon2, { icon: faX, size: "xs" })
|
|
9290
|
+
}
|
|
9291
|
+
)
|
|
9292
|
+
] }) }, value);
|
|
9293
|
+
}) }),
|
|
9294
|
+
/* @__PURE__ */ jsx26(
|
|
9295
|
+
FontAwesomeIcon2,
|
|
9296
|
+
{
|
|
9297
|
+
icon: isOpen ? faChevronUp : faChevronDown,
|
|
9298
|
+
size: "sm",
|
|
9299
|
+
color: colors.dark600
|
|
9300
|
+
}
|
|
9301
|
+
)
|
|
9302
|
+
]
|
|
9303
|
+
}
|
|
9304
|
+
) }),
|
|
9305
|
+
/* @__PURE__ */ jsx26(
|
|
9306
|
+
StyledContent,
|
|
9307
|
+
{
|
|
9308
|
+
css: {
|
|
9309
|
+
width: menuWidth ? menuWidth + "px" : width
|
|
9310
|
+
},
|
|
9311
|
+
children: /* @__PURE__ */ jsx26(
|
|
9312
|
+
CheckboxGroup,
|
|
9313
|
+
{
|
|
9314
|
+
value: selectedValues,
|
|
9315
|
+
onValueChange: (v) => {
|
|
9316
|
+
onValueChange == null ? void 0 : onValueChange(v);
|
|
9317
|
+
},
|
|
9318
|
+
children: /* @__PURE__ */ jsx26(Flex2, { direction: "column", gap: 8, children: options.map(({ value, label }, i) => /* @__PURE__ */ jsx26(CheckboxItem, { value, css: itemStyle, children: /* @__PURE__ */ jsx26(Text, { typography: "labelSmall", children: label }) }, i)) })
|
|
9319
|
+
}
|
|
9320
|
+
)
|
|
9321
|
+
}
|
|
9322
|
+
)
|
|
9323
|
+
] }) });
|
|
9324
|
+
}
|
|
9325
|
+
);
|
|
9326
|
+
|
|
9036
9327
|
// src/components/Grid.tsx
|
|
9037
9328
|
import { Grid as GridRadix } from "@radix-ui/themes";
|
|
9038
|
-
import { jsx as
|
|
9329
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
9039
9330
|
var GridStyled = styled(GridRadix, {
|
|
9040
9331
|
display: "grid",
|
|
9041
9332
|
variants: {
|
|
@@ -9157,12 +9448,12 @@ var GridStyled = styled(GridRadix, {
|
|
|
9157
9448
|
});
|
|
9158
9449
|
function Grid(_a) {
|
|
9159
9450
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9160
|
-
return /* @__PURE__ */
|
|
9451
|
+
return /* @__PURE__ */ jsx27(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9161
9452
|
}
|
|
9162
9453
|
|
|
9163
9454
|
// src/components/Container.tsx
|
|
9164
9455
|
import { Container as ContainerRadix } from "@radix-ui/themes";
|
|
9165
|
-
import { jsx as
|
|
9456
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
9166
9457
|
var ContainerStyled = styled(ContainerRadix, {
|
|
9167
9458
|
variants: {
|
|
9168
9459
|
size: {
|
|
@@ -9192,12 +9483,12 @@ var ContainerStyled = styled(ContainerRadix, {
|
|
|
9192
9483
|
});
|
|
9193
9484
|
function Container(_a) {
|
|
9194
9485
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9195
|
-
return /* @__PURE__ */
|
|
9486
|
+
return /* @__PURE__ */ jsx28(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9196
9487
|
}
|
|
9197
9488
|
|
|
9198
9489
|
// src/components/Section.tsx
|
|
9199
9490
|
import { Section as SectionRadix } from "@radix-ui/themes";
|
|
9200
|
-
import { jsx as
|
|
9491
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
9201
9492
|
var SectionStyled = styled(SectionRadix, {
|
|
9202
9493
|
variants: {
|
|
9203
9494
|
size: {
|
|
@@ -9221,26 +9512,26 @@ var SectionStyled = styled(SectionRadix, {
|
|
|
9221
9512
|
});
|
|
9222
9513
|
function Section(_a) {
|
|
9223
9514
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9224
|
-
return /* @__PURE__ */
|
|
9515
|
+
return /* @__PURE__ */ jsx29(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9225
9516
|
}
|
|
9226
9517
|
|
|
9227
9518
|
// src/components/FormFields/ErrorFormMessage.tsx
|
|
9228
9519
|
import { faXmarkCircle } from "@fortawesome/free-solid-svg-icons";
|
|
9229
|
-
import { FontAwesomeIcon as
|
|
9230
|
-
import { jsx as
|
|
9520
|
+
import { FontAwesomeIcon as FontAwesomeIcon3 } from "@fortawesome/react-fontawesome";
|
|
9521
|
+
import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
9231
9522
|
var ErrorFormMessage = ({ message: message2 }) => {
|
|
9232
9523
|
if (!message2) return null;
|
|
9233
9524
|
if (typeof message2 !== "string") {
|
|
9234
9525
|
return null;
|
|
9235
9526
|
}
|
|
9236
|
-
return /* @__PURE__ */
|
|
9237
|
-
/* @__PURE__ */
|
|
9238
|
-
/* @__PURE__ */
|
|
9527
|
+
return /* @__PURE__ */ jsxs15(Flex2, { justify: "start", align: "center", gap: 6, children: [
|
|
9528
|
+
/* @__PURE__ */ jsx30(FontAwesomeIcon3, { icon: faXmarkCircle, color: colors.error600, size: "1x" }),
|
|
9529
|
+
/* @__PURE__ */ jsx30(Text, { typography: "bodyXS", fontWeight: "medium", color: "error600", children: message2 })
|
|
9239
9530
|
] });
|
|
9240
9531
|
};
|
|
9241
9532
|
|
|
9242
9533
|
// src/components/FormFields/FormLabel.tsx
|
|
9243
|
-
import { jsx as
|
|
9534
|
+
import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
9244
9535
|
var FormLabel = ({
|
|
9245
9536
|
name,
|
|
9246
9537
|
label,
|
|
@@ -9248,7 +9539,7 @@ var FormLabel = ({
|
|
|
9248
9539
|
required
|
|
9249
9540
|
}) => {
|
|
9250
9541
|
if (!label) return null;
|
|
9251
|
-
return /* @__PURE__ */
|
|
9542
|
+
return /* @__PURE__ */ jsxs16(
|
|
9252
9543
|
Text,
|
|
9253
9544
|
{
|
|
9254
9545
|
typography: "labelMedium",
|
|
@@ -9257,7 +9548,7 @@ var FormLabel = ({
|
|
|
9257
9548
|
id: `${name}-label`,
|
|
9258
9549
|
children: [
|
|
9259
9550
|
label,
|
|
9260
|
-
!required && /* @__PURE__ */
|
|
9551
|
+
!required && /* @__PURE__ */ jsx31(Text, { color: "dark500", children: " (opcional)" })
|
|
9261
9552
|
]
|
|
9262
9553
|
}
|
|
9263
9554
|
);
|
|
@@ -9265,7 +9556,7 @@ var FormLabel = ({
|
|
|
9265
9556
|
|
|
9266
9557
|
// src/components/FormFields/TextAreaFormField.tsx
|
|
9267
9558
|
import { useFormContext } from "react-hook-form";
|
|
9268
|
-
import { jsx as
|
|
9559
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
9269
9560
|
var TextAreaFormField = ({
|
|
9270
9561
|
name,
|
|
9271
9562
|
label,
|
|
@@ -9279,8 +9570,8 @@ var TextAreaFormField = ({
|
|
|
9279
9570
|
} = useFormContext();
|
|
9280
9571
|
const haveError = !!errors[name];
|
|
9281
9572
|
const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
|
|
9282
|
-
return /* @__PURE__ */
|
|
9283
|
-
/* @__PURE__ */
|
|
9573
|
+
return /* @__PURE__ */ jsxs17(Flex2, { direction: "column", children: [
|
|
9574
|
+
/* @__PURE__ */ jsx32(
|
|
9284
9575
|
FormLabel,
|
|
9285
9576
|
{
|
|
9286
9577
|
name,
|
|
@@ -9289,7 +9580,7 @@ var TextAreaFormField = ({
|
|
|
9289
9580
|
haveError
|
|
9290
9581
|
}
|
|
9291
9582
|
),
|
|
9292
|
-
/* @__PURE__ */
|
|
9583
|
+
/* @__PURE__ */ jsx32(
|
|
9293
9584
|
TextareaField,
|
|
9294
9585
|
__spreadProps(__spreadValues({}, register(name, { required })), {
|
|
9295
9586
|
placeholder,
|
|
@@ -9297,13 +9588,13 @@ var TextAreaFormField = ({
|
|
|
9297
9588
|
"aria-labelledby": `${name}-label`
|
|
9298
9589
|
})
|
|
9299
9590
|
),
|
|
9300
|
-
/* @__PURE__ */
|
|
9591
|
+
/* @__PURE__ */ jsx32(ErrorFormMessage, { message: errorMsg })
|
|
9301
9592
|
] });
|
|
9302
9593
|
};
|
|
9303
9594
|
|
|
9304
9595
|
// src/components/FormFields/TextFormField.tsx
|
|
9305
9596
|
import { useFormContext as useFormContext2 } from "react-hook-form";
|
|
9306
|
-
import { jsx as
|
|
9597
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
9307
9598
|
var TextFormField = ({
|
|
9308
9599
|
name,
|
|
9309
9600
|
label,
|
|
@@ -9317,8 +9608,8 @@ var TextFormField = ({
|
|
|
9317
9608
|
} = useFormContext2();
|
|
9318
9609
|
const haveError = !!errors[name];
|
|
9319
9610
|
const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
|
|
9320
|
-
return /* @__PURE__ */
|
|
9321
|
-
/* @__PURE__ */
|
|
9611
|
+
return /* @__PURE__ */ jsxs18(Flex2, { direction: "column", children: [
|
|
9612
|
+
/* @__PURE__ */ jsx33(
|
|
9322
9613
|
FormLabel,
|
|
9323
9614
|
{
|
|
9324
9615
|
name,
|
|
@@ -9327,7 +9618,7 @@ var TextFormField = ({
|
|
|
9327
9618
|
haveError
|
|
9328
9619
|
}
|
|
9329
9620
|
),
|
|
9330
|
-
/* @__PURE__ */
|
|
9621
|
+
/* @__PURE__ */ jsx33(
|
|
9331
9622
|
TextField,
|
|
9332
9623
|
__spreadProps(__spreadValues({}, register(name, { required })), {
|
|
9333
9624
|
placeholder,
|
|
@@ -9335,7 +9626,7 @@ var TextFormField = ({
|
|
|
9335
9626
|
"aria-labelledby": `${name}-label`
|
|
9336
9627
|
})
|
|
9337
9628
|
),
|
|
9338
|
-
/* @__PURE__ */
|
|
9629
|
+
/* @__PURE__ */ jsx33(ErrorFormMessage, { message: errorMsg })
|
|
9339
9630
|
] });
|
|
9340
9631
|
};
|
|
9341
9632
|
|
|
@@ -9344,12 +9635,65 @@ import {
|
|
|
9344
9635
|
FormProvider,
|
|
9345
9636
|
useForm
|
|
9346
9637
|
} from "react-hook-form";
|
|
9347
|
-
import { jsx as
|
|
9638
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
9348
9639
|
var Form = (_a) => {
|
|
9349
9640
|
var _b = _a, { onSubmit, children } = _b, props = __objRest(_b, ["onSubmit", "children"]);
|
|
9350
9641
|
const methods = useForm(props);
|
|
9351
9642
|
const { handleSubmit } = methods;
|
|
9352
|
-
return /* @__PURE__ */
|
|
9643
|
+
return /* @__PURE__ */ jsx34(FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ jsx34("form", { onSubmit: handleSubmit(onSubmit), children }) }));
|
|
9644
|
+
};
|
|
9645
|
+
|
|
9646
|
+
// src/components/FormFields/MultiSelectFormField.tsx
|
|
9647
|
+
import { useController, useFormContext as useFormContext3 } from "react-hook-form";
|
|
9648
|
+
import { jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
9649
|
+
var MultiSelectFormField = (_a) => {
|
|
9650
|
+
var _b = _a, {
|
|
9651
|
+
name,
|
|
9652
|
+
label,
|
|
9653
|
+
required
|
|
9654
|
+
} = _b, rest = __objRest(_b, [
|
|
9655
|
+
"name",
|
|
9656
|
+
"label",
|
|
9657
|
+
"required"
|
|
9658
|
+
]);
|
|
9659
|
+
var _a2;
|
|
9660
|
+
const {
|
|
9661
|
+
formState: { errors }
|
|
9662
|
+
} = useFormContext3();
|
|
9663
|
+
const { field } = useController({
|
|
9664
|
+
name,
|
|
9665
|
+
rules: {
|
|
9666
|
+
required
|
|
9667
|
+
},
|
|
9668
|
+
defaultValue: []
|
|
9669
|
+
});
|
|
9670
|
+
const { value, onChange, ref, onBlur, disabled } = field;
|
|
9671
|
+
const haveError = !!errors[name];
|
|
9672
|
+
const errorMsg = (_a2 = errors[name]) == null ? void 0 : _a2.message;
|
|
9673
|
+
const handleChange = (v) => {
|
|
9674
|
+
onChange(v);
|
|
9675
|
+
};
|
|
9676
|
+
return /* @__PURE__ */ jsxs19(Flex2, { direction: "column", children: [
|
|
9677
|
+
/* @__PURE__ */ jsx35(
|
|
9678
|
+
FormLabel,
|
|
9679
|
+
{
|
|
9680
|
+
name,
|
|
9681
|
+
label,
|
|
9682
|
+
required,
|
|
9683
|
+
haveError
|
|
9684
|
+
}
|
|
9685
|
+
),
|
|
9686
|
+
/* @__PURE__ */ jsx35(
|
|
9687
|
+
MultiSelect,
|
|
9688
|
+
__spreadValues({
|
|
9689
|
+
value,
|
|
9690
|
+
onValueChange: handleChange,
|
|
9691
|
+
ref,
|
|
9692
|
+
color: haveError ? "error" : "default"
|
|
9693
|
+
}, rest)
|
|
9694
|
+
),
|
|
9695
|
+
/* @__PURE__ */ jsx35(ErrorFormMessage, { message: errorMsg })
|
|
9696
|
+
] });
|
|
9353
9697
|
};
|
|
9354
9698
|
export {
|
|
9355
9699
|
Alert,
|
|
@@ -9378,6 +9722,7 @@ export {
|
|
|
9378
9722
|
CheckboxItem,
|
|
9379
9723
|
Container,
|
|
9380
9724
|
ContainerStyled,
|
|
9725
|
+
Drawer,
|
|
9381
9726
|
DropdownMenu2 as DropdownMenu,
|
|
9382
9727
|
DropdownMenuItem,
|
|
9383
9728
|
ErrorFormMessage,
|
|
@@ -9391,7 +9736,10 @@ export {
|
|
|
9391
9736
|
GridStyled,
|
|
9392
9737
|
Icon,
|
|
9393
9738
|
InputStyled,
|
|
9739
|
+
MenuDropdown,
|
|
9394
9740
|
Modal,
|
|
9741
|
+
MultiSelect,
|
|
9742
|
+
MultiSelectFormField,
|
|
9395
9743
|
RadioGroup,
|
|
9396
9744
|
RadioGroupStyled,
|
|
9397
9745
|
RadioItem,
|