@lets-events/react 11.1.0 → 11.3.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/.eslintrc.json +2 -2
- package/.turbo/turbo-build.log +20 -18
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +902 -137
- package/dist/index.d.ts +902 -137
- package/dist/index.js +294 -145
- package/dist/index.mjs +273 -124
- package/package.json +1 -1
- package/src/components/Alert.tsx +303 -303
- package/src/components/Avatar.tsx +55 -55
- package/src/components/Badge.tsx +128 -128
- package/src/components/Box.tsx +3 -3
- package/src/components/Button/index.tsx +16 -13
- package/src/components/Button/styledComponents.ts +287 -276
- package/src/components/ButtonGroup.tsx +484 -484
- package/src/components/Calendar/index.tsx +136 -136
- package/src/components/Calendar/styledComponents.ts +209 -209
- package/src/components/Card.tsx +48 -48
- package/src/components/CheckboxGroup.tsx +214 -214
- package/src/components/Container.tsx +39 -39
- package/src/components/Drawer/index.tsx +48 -0
- package/src/components/Drawer/styledComponents.ts +46 -0
- package/src/components/Dropdown.tsx +167 -167
- package/src/components/Filter.tsx +164 -164
- package/src/components/Flex.tsx +118 -118
- package/src/components/FormFields/ErrorFormMessage.tsx +36 -36
- package/src/components/FormFields/Form.tsx +25 -0
- package/src/components/FormFields/FormLabel.tsx +29 -29
- package/src/components/FormFields/TextAreaFormField.tsx +46 -46
- package/src/components/FormFields/TextFormField.tsx +46 -46
- package/src/components/Grid.tsx +137 -137
- package/src/components/Icon.tsx +47 -47
- package/src/components/MenuDropdown/index.tsx +30 -0
- package/src/components/MenuDropdown/styledComponents.ts +31 -0
- package/src/components/Modal.tsx +90 -90
- package/src/components/RadioGroup.tsx +210 -210
- package/src/components/Section.tsx +33 -33
- package/src/components/Step.tsx +164 -164
- package/src/components/Switch.tsx +108 -108
- package/src/components/Text.tsx +39 -39
- package/src/components/TextField.tsx +315 -315
- package/src/components/TextareaField.tsx +128 -128
- package/src/components/TimePicker.tsx +298 -298
- package/src/components/Toast/components/ToastItem.tsx +41 -41
- package/src/components/Toast/components/ToastProvider.tsx +63 -63
- package/src/components/Toast/hooks/useToast.ts +12 -12
- package/src/components/Toast/index.tsx +5 -5
- package/src/components/Toast/styles/index.ts +135 -135
- package/src/components/Toast/types/index.ts +46 -46
- package/src/components/Tooltip/index.tsx +66 -66
- package/src/components/Tooltip/styles.ts +77 -77
- package/src/hooks/useOnClickOutside.tsx +20 -20
- package/src/index.tsx +42 -40
- package/src/styles/index.ts +38 -38
- package/src/types/typographyValues.ts +178 -178
- package/tsconfig.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1037,6 +1037,7 @@ __export(index_exports, {
|
|
|
1037
1037
|
CheckboxItem: () => CheckboxItem,
|
|
1038
1038
|
Container: () => Container,
|
|
1039
1039
|
ContainerStyled: () => ContainerStyled,
|
|
1040
|
+
Drawer: () => Drawer,
|
|
1040
1041
|
DropdownMenu: () => DropdownMenu2,
|
|
1041
1042
|
DropdownMenuItem: () => DropdownMenuItem,
|
|
1042
1043
|
ErrorFormMessage: () => ErrorFormMessage,
|
|
@@ -1044,11 +1045,13 @@ __export(index_exports, {
|
|
|
1044
1045
|
FilterItem: () => FilterItem,
|
|
1045
1046
|
Flex: () => Flex2,
|
|
1046
1047
|
FlexStyled: () => FlexStyled,
|
|
1048
|
+
Form: () => Form,
|
|
1047
1049
|
FormLabel: () => FormLabel,
|
|
1048
1050
|
Grid: () => Grid,
|
|
1049
1051
|
GridStyled: () => GridStyled,
|
|
1050
1052
|
Icon: () => Icon,
|
|
1051
1053
|
InputStyled: () => InputStyled,
|
|
1054
|
+
MenuDropdown: () => MenuDropdown,
|
|
1052
1055
|
Modal: () => Modal,
|
|
1053
1056
|
RadioGroup: () => RadioGroup,
|
|
1054
1057
|
RadioGroupStyled: () => RadioGroupStyled,
|
|
@@ -1913,6 +1916,19 @@ var ButtonStyled = styled(import_themes2.Button, {
|
|
|
1913
1916
|
borderColor: "$colors$neutral100",
|
|
1914
1917
|
$$buttonColor: "$colors$neutral300"
|
|
1915
1918
|
}
|
|
1919
|
+
},
|
|
1920
|
+
menuDropdownItem: {
|
|
1921
|
+
backgroundColor: "transparent",
|
|
1922
|
+
boxShadow: "none",
|
|
1923
|
+
padding: "0.25rem 0.5rem",
|
|
1924
|
+
border: 0,
|
|
1925
|
+
height: "unset",
|
|
1926
|
+
color: "$$buttonColor",
|
|
1927
|
+
width: "100%",
|
|
1928
|
+
borderRadius: 0,
|
|
1929
|
+
"&:hover": {
|
|
1930
|
+
backgroundColor: "$dark100"
|
|
1931
|
+
}
|
|
1916
1932
|
}
|
|
1917
1933
|
},
|
|
1918
1934
|
fontWeight: {
|
|
@@ -3709,13 +3725,60 @@ function Modal(_a) {
|
|
|
3709
3725
|
] }));
|
|
3710
3726
|
}
|
|
3711
3727
|
|
|
3728
|
+
// src/components/MenuDropdown/index.tsx
|
|
3729
|
+
var import_react4 = require("react");
|
|
3730
|
+
|
|
3731
|
+
// src/components/MenuDropdown/styledComponents.ts
|
|
3732
|
+
var MenuDropdownContainerStyled = styled("div", {
|
|
3733
|
+
position: "relative",
|
|
3734
|
+
width: "fit-content"
|
|
3735
|
+
});
|
|
3736
|
+
var TriggerButtonStyled = styled("button", {
|
|
3737
|
+
backgroundColor: "$brand500",
|
|
3738
|
+
boxShadow: "0px 4px 4px 0px #23354314",
|
|
3739
|
+
borderRadius: "$full",
|
|
3740
|
+
border: "none",
|
|
3741
|
+
height: "1.875rem",
|
|
3742
|
+
width: "1.875rem",
|
|
3743
|
+
cursor: "pointer"
|
|
3744
|
+
});
|
|
3745
|
+
var MenuItemsContainerStyled = styled("div", {
|
|
3746
|
+
position: "absolute",
|
|
3747
|
+
right: 0,
|
|
3748
|
+
top: "2.125rem",
|
|
3749
|
+
zIndex: "999",
|
|
3750
|
+
width: "fit-content",
|
|
3751
|
+
minWidth: "5rem",
|
|
3752
|
+
background: "#fff",
|
|
3753
|
+
maxWidth: "18.75rem",
|
|
3754
|
+
margin: "auto",
|
|
3755
|
+
boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.0784313725)",
|
|
3756
|
+
border: "1px solid $dark300",
|
|
3757
|
+
borderRadius: "0.5rem",
|
|
3758
|
+
padding: "0.5rem 0",
|
|
3759
|
+
height: "fit-content"
|
|
3760
|
+
});
|
|
3761
|
+
|
|
3762
|
+
// src/components/MenuDropdown/index.tsx
|
|
3763
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3764
|
+
function MenuDropdown({ children }) {
|
|
3765
|
+
const [isOpen, setIsOpen] = (0, import_react4.useState)(false);
|
|
3766
|
+
function handleMenuDropdown() {
|
|
3767
|
+
setIsOpen(!isOpen);
|
|
3768
|
+
}
|
|
3769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(MenuDropdownContainerStyled, { children: [
|
|
3770
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TriggerButtonStyled, { onClick: handleMenuDropdown, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon_default, { name: "ellipsis", size: "xl", color: "#FFFFFF" }) }),
|
|
3771
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuItemsContainerStyled, { children })
|
|
3772
|
+
] });
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3712
3775
|
// src/components/Calendar/index.tsx
|
|
3713
|
-
var
|
|
3776
|
+
var import_react6 = require("react");
|
|
3714
3777
|
|
|
3715
3778
|
// src/hooks/useOnClickOutside.tsx
|
|
3716
|
-
var
|
|
3779
|
+
var import_react5 = require("react");
|
|
3717
3780
|
function useOnClickOutside(ref, handler) {
|
|
3718
|
-
(0,
|
|
3781
|
+
(0, import_react5.useEffect)(() => {
|
|
3719
3782
|
const listener = (event) => {
|
|
3720
3783
|
if (!ref.current || ref.current.contains(event.target)) {
|
|
3721
3784
|
return;
|
|
@@ -7828,7 +7891,7 @@ var DayPickerWrapperStyled = styled("div", {
|
|
|
7828
7891
|
});
|
|
7829
7892
|
|
|
7830
7893
|
// src/components/Calendar/index.tsx
|
|
7831
|
-
var
|
|
7894
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
7832
7895
|
function formatToDateMask(value) {
|
|
7833
7896
|
const numeric = value.replace(/\D/g, "").slice(0, 8);
|
|
7834
7897
|
const parts = numeric.match(/^(\d{0,2})(\d{0,2})(\d{0,4})$/);
|
|
@@ -7852,15 +7915,15 @@ function Calendar(_a) {
|
|
|
7852
7915
|
"setSelected",
|
|
7853
7916
|
"position"
|
|
7854
7917
|
]);
|
|
7855
|
-
const [inputValue, setInputValue] = (0,
|
|
7856
|
-
const [showContainer, setShowCalendar] = (0,
|
|
7857
|
-
const dropdownRef = (0,
|
|
7918
|
+
const [inputValue, setInputValue] = (0, import_react6.useState)("");
|
|
7919
|
+
const [showContainer, setShowCalendar] = (0, import_react6.useState)(false);
|
|
7920
|
+
const dropdownRef = (0, import_react6.useRef)(null);
|
|
7858
7921
|
useOnClickOutside(dropdownRef, () => {
|
|
7859
7922
|
setShowCalendar(false);
|
|
7860
7923
|
});
|
|
7861
7924
|
const today = /* @__PURE__ */ new Date();
|
|
7862
7925
|
const maxDate = addYears(today, 20);
|
|
7863
|
-
(0,
|
|
7926
|
+
(0, import_react6.useEffect)(() => {
|
|
7864
7927
|
if (selected) {
|
|
7865
7928
|
setInputValue(format2(selected, "dd/MM/yyyy"));
|
|
7866
7929
|
} else {
|
|
@@ -7877,13 +7940,13 @@ function Calendar(_a) {
|
|
|
7877
7940
|
console.warn("Data inv\xE1lida inserida no input:", masked);
|
|
7878
7941
|
}
|
|
7879
7942
|
};
|
|
7880
|
-
return /* @__PURE__ */ (0,
|
|
7881
|
-
/* @__PURE__ */ (0,
|
|
7943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(CalendarStyled, __spreadProps(__spreadValues({}, props), { ref: dropdownRef, children: [
|
|
7944
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7882
7945
|
CalendarButtonStyled,
|
|
7883
7946
|
{
|
|
7884
7947
|
type: "button",
|
|
7885
7948
|
onClick: () => setShowCalendar((prev) => !prev),
|
|
7886
|
-
children: /* @__PURE__ */ (0,
|
|
7949
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7887
7950
|
TextField,
|
|
7888
7951
|
{
|
|
7889
7952
|
placeholder: "00/00/0000",
|
|
@@ -7892,17 +7955,17 @@ function Calendar(_a) {
|
|
|
7892
7955
|
onChange: handleInputChange,
|
|
7893
7956
|
inputMode: "numeric",
|
|
7894
7957
|
textAlign: "right",
|
|
7895
|
-
children: /* @__PURE__ */ (0,
|
|
7958
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TextFieldSlot, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon_default, { name: "calendar", size: "xl" }) })
|
|
7896
7959
|
}
|
|
7897
7960
|
)
|
|
7898
7961
|
}
|
|
7899
7962
|
),
|
|
7900
|
-
showContainer && /* @__PURE__ */ (0,
|
|
7963
|
+
showContainer && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
7901
7964
|
CalendarContentStyled,
|
|
7902
7965
|
{
|
|
7903
7966
|
style: position === "top" ? { bottom: "110%" } : { top: "110%" },
|
|
7904
7967
|
children: [
|
|
7905
|
-
/* @__PURE__ */ (0,
|
|
7968
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DayPickerWrapperStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7906
7969
|
import_react_day_picker.DayPicker,
|
|
7907
7970
|
{
|
|
7908
7971
|
mode: "single",
|
|
@@ -7916,7 +7979,7 @@ function Calendar(_a) {
|
|
|
7916
7979
|
endMonth: maxDate
|
|
7917
7980
|
}
|
|
7918
7981
|
) }) }),
|
|
7919
|
-
action && /* @__PURE__ */ (0,
|
|
7982
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CalendarFooterStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7920
7983
|
Button,
|
|
7921
7984
|
{
|
|
7922
7985
|
variant: "text",
|
|
@@ -7936,9 +7999,82 @@ function Calendar(_a) {
|
|
|
7936
7999
|
] })) });
|
|
7937
8000
|
}
|
|
7938
8001
|
|
|
8002
|
+
// src/components/Drawer/styledComponents.ts
|
|
8003
|
+
var DrawerOverlayStyled = styled("div", {
|
|
8004
|
+
position: "fixed",
|
|
8005
|
+
top: 0,
|
|
8006
|
+
right: 0,
|
|
8007
|
+
width: "100vw",
|
|
8008
|
+
height: "100vh",
|
|
8009
|
+
background: "rgba(0, 0, 0, 0.4)",
|
|
8010
|
+
zIndex: 1e3
|
|
8011
|
+
});
|
|
8012
|
+
var DrawerContainerStyled = styled("div", {
|
|
8013
|
+
position: "absolute",
|
|
8014
|
+
top: 0,
|
|
8015
|
+
right: 0,
|
|
8016
|
+
maxWidth: "calc(100% - 2rem)",
|
|
8017
|
+
height: "100%",
|
|
8018
|
+
background: "$neutral50",
|
|
8019
|
+
display: "flex",
|
|
8020
|
+
flexDirection: "column",
|
|
8021
|
+
boxShadow: "-4px 0 12px rgba(0, 0, 0, 0.2)",
|
|
8022
|
+
padding: "1.5rem 0",
|
|
8023
|
+
overflowY: "auto"
|
|
8024
|
+
});
|
|
8025
|
+
var DrawerHeaderDiv = styled("div", {
|
|
8026
|
+
display: "flex",
|
|
8027
|
+
justifyContent: "space-between",
|
|
8028
|
+
alignItems: "center",
|
|
8029
|
+
borderBottom: "1px solid $neutral300",
|
|
8030
|
+
padding: "0 1.5rem 1rem",
|
|
8031
|
+
position: "relative"
|
|
8032
|
+
});
|
|
8033
|
+
var DrawerHeaderTitle = styled("h2", {
|
|
8034
|
+
fontSize: "1.125rem",
|
|
8035
|
+
fontWeight: "400",
|
|
8036
|
+
fontFamily: "Work Sans",
|
|
8037
|
+
color: "$dark800",
|
|
8038
|
+
margin: "0"
|
|
8039
|
+
});
|
|
8040
|
+
var DrawerHeaderCloseButton = styled("button", {
|
|
8041
|
+
background: "none",
|
|
8042
|
+
border: "none",
|
|
8043
|
+
cursor: "pointer"
|
|
8044
|
+
});
|
|
8045
|
+
|
|
8046
|
+
// src/components/Drawer/index.tsx
|
|
8047
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
8048
|
+
function Drawer({
|
|
8049
|
+
isOpen,
|
|
8050
|
+
onClose,
|
|
8051
|
+
width,
|
|
8052
|
+
backgroundColor,
|
|
8053
|
+
title,
|
|
8054
|
+
children
|
|
8055
|
+
}) {
|
|
8056
|
+
if (!isOpen) return null;
|
|
8057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DrawerOverlayStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
8058
|
+
DrawerContainerStyled,
|
|
8059
|
+
{
|
|
8060
|
+
style: {
|
|
8061
|
+
width: width != null ? width : "34.25rem",
|
|
8062
|
+
backgroundColor: colors[backgroundColor != null ? backgroundColor : "neutral50"]
|
|
8063
|
+
},
|
|
8064
|
+
children: [
|
|
8065
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(DrawerHeaderDiv, { children: [
|
|
8066
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DrawerHeaderTitle, { children: title }),
|
|
8067
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DrawerHeaderCloseButton, { onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon_default, { size: "xl", color: "$dark600", name: "xmark" }) })
|
|
8068
|
+
] }),
|
|
8069
|
+
children
|
|
8070
|
+
]
|
|
8071
|
+
}
|
|
8072
|
+
) });
|
|
8073
|
+
}
|
|
8074
|
+
|
|
7939
8075
|
// src/components/TimePicker.tsx
|
|
7940
|
-
var
|
|
7941
|
-
var
|
|
8076
|
+
var import_react7 = require("react");
|
|
8077
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
7942
8078
|
var TimePickerStyled = styled("div", {
|
|
7943
8079
|
position: "relative",
|
|
7944
8080
|
fontFamily: "$default",
|
|
@@ -8041,14 +8177,14 @@ function TimePicker({
|
|
|
8041
8177
|
setSelected,
|
|
8042
8178
|
position = "bottom"
|
|
8043
8179
|
}) {
|
|
8044
|
-
const [hours, setHours] = (0,
|
|
8045
|
-
const [minutes, setMinutes] = (0,
|
|
8046
|
-
const [rawHours, setRawHours] = (0,
|
|
8047
|
-
const [rawMinutes, setRawMinutes] = (0,
|
|
8048
|
-
const [isOpen, setIsOpen] = (0,
|
|
8049
|
-
const dropdownRef = (0,
|
|
8180
|
+
const [hours, setHours] = (0, import_react7.useState)("00");
|
|
8181
|
+
const [minutes, setMinutes] = (0, import_react7.useState)("00");
|
|
8182
|
+
const [rawHours, setRawHours] = (0, import_react7.useState)("00");
|
|
8183
|
+
const [rawMinutes, setRawMinutes] = (0, import_react7.useState)("00");
|
|
8184
|
+
const [isOpen, setIsOpen] = (0, import_react7.useState)(false);
|
|
8185
|
+
const dropdownRef = (0, import_react7.useRef)(null);
|
|
8050
8186
|
useOnClickOutside(dropdownRef, () => setIsOpen(false));
|
|
8051
|
-
const handleIncrement = (0,
|
|
8187
|
+
const handleIncrement = (0, import_react7.useCallback)(
|
|
8052
8188
|
(type) => {
|
|
8053
8189
|
if (type === "hours") {
|
|
8054
8190
|
const next = (parseInt(hours) + 1) % 24;
|
|
@@ -8062,7 +8198,7 @@ function TimePicker({
|
|
|
8062
8198
|
},
|
|
8063
8199
|
[hours, minutes]
|
|
8064
8200
|
);
|
|
8065
|
-
const handleDecrement = (0,
|
|
8201
|
+
const handleDecrement = (0, import_react7.useCallback)(
|
|
8066
8202
|
(type) => {
|
|
8067
8203
|
if (type === "hours") {
|
|
8068
8204
|
const prev = (parseInt(hours) - 1 + 24) % 24;
|
|
@@ -8076,13 +8212,13 @@ function TimePicker({
|
|
|
8076
8212
|
},
|
|
8077
8213
|
[hours, minutes]
|
|
8078
8214
|
);
|
|
8079
|
-
return /* @__PURE__ */ (0,
|
|
8080
|
-
/* @__PURE__ */ (0,
|
|
8215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(TimePickerStyled, { ref: dropdownRef, children: [
|
|
8216
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8081
8217
|
TimePickerButtonStyled,
|
|
8082
8218
|
{
|
|
8083
8219
|
type: "button",
|
|
8084
8220
|
onClick: () => setIsOpen((prev) => !prev),
|
|
8085
|
-
children: /* @__PURE__ */ (0,
|
|
8221
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8086
8222
|
TextField,
|
|
8087
8223
|
{
|
|
8088
8224
|
value: selected,
|
|
@@ -8091,18 +8227,18 @@ function TimePicker({
|
|
|
8091
8227
|
placeholder: "00:00",
|
|
8092
8228
|
typography: "labelSmall",
|
|
8093
8229
|
fontWeight: "regular",
|
|
8094
|
-
children: /* @__PURE__ */ (0,
|
|
8230
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextFieldSlot, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon_default, { name: "clock", size: "xl" }) })
|
|
8095
8231
|
}
|
|
8096
8232
|
)
|
|
8097
8233
|
}
|
|
8098
8234
|
),
|
|
8099
|
-
isOpen && /* @__PURE__ */ (0,
|
|
8235
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
8100
8236
|
TimePickerDropdownStyled,
|
|
8101
8237
|
{
|
|
8102
8238
|
style: position === "top" ? { bottom: "110%" } : { top: "110%" },
|
|
8103
8239
|
children: [
|
|
8104
|
-
/* @__PURE__ */ (0,
|
|
8105
|
-
["hours", "minutes"].map((unit) => /* @__PURE__ */ (0,
|
|
8240
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(TimerPickerContentStyled, { children: [
|
|
8241
|
+
["hours", "minutes"].map((unit) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
8106
8242
|
Box,
|
|
8107
8243
|
{
|
|
8108
8244
|
style: {
|
|
@@ -8111,13 +8247,13 @@ function TimePicker({
|
|
|
8111
8247
|
flexDirection: "column"
|
|
8112
8248
|
},
|
|
8113
8249
|
children: [
|
|
8114
|
-
/* @__PURE__ */ (0,
|
|
8250
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8115
8251
|
Button,
|
|
8116
8252
|
{
|
|
8117
8253
|
type: "button",
|
|
8118
8254
|
variant: "text",
|
|
8119
8255
|
onClick: () => handleIncrement(unit),
|
|
8120
|
-
children: /* @__PURE__ */ (0,
|
|
8256
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
8121
8257
|
"svg",
|
|
8122
8258
|
{
|
|
8123
8259
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8126,14 +8262,14 @@ function TimePicker({
|
|
|
8126
8262
|
viewBox: "0 0 32 32",
|
|
8127
8263
|
fill: "none",
|
|
8128
8264
|
children: [
|
|
8129
|
-
/* @__PURE__ */ (0,
|
|
8265
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8130
8266
|
"path",
|
|
8131
8267
|
{
|
|
8132
8268
|
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",
|
|
8133
8269
|
fill: "white"
|
|
8134
8270
|
}
|
|
8135
8271
|
),
|
|
8136
|
-
/* @__PURE__ */ (0,
|
|
8272
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8137
8273
|
"path",
|
|
8138
8274
|
{
|
|
8139
8275
|
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",
|
|
@@ -8145,7 +8281,7 @@ function TimePicker({
|
|
|
8145
8281
|
)
|
|
8146
8282
|
}
|
|
8147
8283
|
),
|
|
8148
|
-
/* @__PURE__ */ (0,
|
|
8284
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8149
8285
|
InputStyled,
|
|
8150
8286
|
{
|
|
8151
8287
|
inputMode: "numeric",
|
|
@@ -8183,13 +8319,13 @@ function TimePicker({
|
|
|
8183
8319
|
}
|
|
8184
8320
|
}
|
|
8185
8321
|
),
|
|
8186
|
-
/* @__PURE__ */ (0,
|
|
8322
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8187
8323
|
Button,
|
|
8188
8324
|
{
|
|
8189
8325
|
type: "button",
|
|
8190
8326
|
variant: "text",
|
|
8191
8327
|
onClick: () => handleDecrement(unit),
|
|
8192
|
-
children: /* @__PURE__ */ (0,
|
|
8328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
8193
8329
|
"svg",
|
|
8194
8330
|
{
|
|
8195
8331
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8198,14 +8334,14 @@ function TimePicker({
|
|
|
8198
8334
|
viewBox: "0 0 32 32",
|
|
8199
8335
|
fill: "none",
|
|
8200
8336
|
children: [
|
|
8201
|
-
/* @__PURE__ */ (0,
|
|
8337
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8202
8338
|
"path",
|
|
8203
8339
|
{
|
|
8204
8340
|
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",
|
|
8205
8341
|
fill: "white"
|
|
8206
8342
|
}
|
|
8207
8343
|
),
|
|
8208
|
-
/* @__PURE__ */ (0,
|
|
8344
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8209
8345
|
"path",
|
|
8210
8346
|
{
|
|
8211
8347
|
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",
|
|
@@ -8221,9 +8357,9 @@ function TimePicker({
|
|
|
8221
8357
|
},
|
|
8222
8358
|
unit
|
|
8223
8359
|
)),
|
|
8224
|
-
/* @__PURE__ */ (0,
|
|
8360
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { children: ":" })
|
|
8225
8361
|
] }),
|
|
8226
|
-
/* @__PURE__ */ (0,
|
|
8362
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TimePickerFooterStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8227
8363
|
Button,
|
|
8228
8364
|
{
|
|
8229
8365
|
type: "button",
|
|
@@ -8246,7 +8382,7 @@ function TimePicker({
|
|
|
8246
8382
|
|
|
8247
8383
|
// src/components/Alert.tsx
|
|
8248
8384
|
var import_themes14 = require("@radix-ui/themes");
|
|
8249
|
-
var
|
|
8385
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
8250
8386
|
var AlertDialogSimpleStyled = styled(import_themes14.AlertDialog.Content, {
|
|
8251
8387
|
fontFamily: "$default",
|
|
8252
8388
|
lineHeight: "$base",
|
|
@@ -8360,19 +8496,19 @@ function Alert(_a) {
|
|
|
8360
8496
|
"completAlert",
|
|
8361
8497
|
"simpleAlert"
|
|
8362
8498
|
]);
|
|
8363
|
-
return /* @__PURE__ */ (0,
|
|
8364
|
-
simpleAlert && /* @__PURE__ */ (0,
|
|
8365
|
-
/* @__PURE__ */ (0,
|
|
8366
|
-
/* @__PURE__ */ (0,
|
|
8367
|
-
/* @__PURE__ */ (0,
|
|
8368
|
-
simpleAlert.cancel && /* @__PURE__ */ (0,
|
|
8499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
8500
|
+
simpleAlert && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes14.Theme, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_themes14.AlertDialog.Root, { children: [
|
|
8501
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes14.AlertDialog.Trigger, { children: trigger }),
|
|
8502
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(AlertDialogSimpleStyled, __spreadProps(__spreadValues({}, props), { children: [
|
|
8503
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlertDialogDescriptionStyled, { children: simpleAlert.description }),
|
|
8504
|
+
simpleAlert.cancel && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes14.AlertDialog.Cancel, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { variant: "text", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon_default, { name: "close" }) }) })
|
|
8369
8505
|
] })) })
|
|
8370
8506
|
] }) }),
|
|
8371
|
-
completAlert && /* @__PURE__ */ (0,
|
|
8372
|
-
/* @__PURE__ */ (0,
|
|
8373
|
-
/* @__PURE__ */ (0,
|
|
8374
|
-
/* @__PURE__ */ (0,
|
|
8375
|
-
color === "success" && /* @__PURE__ */ (0,
|
|
8507
|
+
completAlert && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes14.Theme, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_themes14.AlertDialog.Root, { children: [
|
|
8508
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes14.AlertDialog.Trigger, { children: trigger }),
|
|
8509
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(AlertDialogCompleteStyled, { children: [
|
|
8510
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(AlertDialogRowStyled, { className: "le-alert-dialog-row", children: [
|
|
8511
|
+
color === "success" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
8376
8512
|
"svg",
|
|
8377
8513
|
{
|
|
8378
8514
|
width: "56",
|
|
@@ -8381,18 +8517,18 @@ function Alert(_a) {
|
|
|
8381
8517
|
fill: "none",
|
|
8382
8518
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8383
8519
|
children: [
|
|
8384
|
-
/* @__PURE__ */ (0,
|
|
8520
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { clipPath: "url(#clip0_1428_9995)", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8385
8521
|
"path",
|
|
8386
8522
|
{
|
|
8387
8523
|
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",
|
|
8388
8524
|
fill: "#1E8535"
|
|
8389
8525
|
}
|
|
8390
8526
|
) }),
|
|
8391
|
-
/* @__PURE__ */ (0,
|
|
8527
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("clipPath", { id: "clip0_1428_9995", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { width: "56", height: "56", fill: "white" }) }) })
|
|
8392
8528
|
]
|
|
8393
8529
|
}
|
|
8394
8530
|
),
|
|
8395
|
-
color === "error" && /* @__PURE__ */ (0,
|
|
8531
|
+
color === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
8396
8532
|
"svg",
|
|
8397
8533
|
{
|
|
8398
8534
|
width: "56",
|
|
@@ -8401,18 +8537,18 @@ function Alert(_a) {
|
|
|
8401
8537
|
fill: "none",
|
|
8402
8538
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8403
8539
|
children: [
|
|
8404
|
-
/* @__PURE__ */ (0,
|
|
8540
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { clipPath: "url(#clip0_1428_10022)", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8405
8541
|
"path",
|
|
8406
8542
|
{
|
|
8407
8543
|
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",
|
|
8408
8544
|
fill: "#AD1F2B"
|
|
8409
8545
|
}
|
|
8410
8546
|
) }),
|
|
8411
|
-
/* @__PURE__ */ (0,
|
|
8547
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("clipPath", { id: "clip0_1428_10022", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { width: "56", height: "56", fill: "white" }) }) })
|
|
8412
8548
|
]
|
|
8413
8549
|
}
|
|
8414
8550
|
),
|
|
8415
|
-
color === "warning" && /* @__PURE__ */ (0,
|
|
8551
|
+
color === "warning" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
8416
8552
|
"svg",
|
|
8417
8553
|
{
|
|
8418
8554
|
width: "56",
|
|
@@ -8421,18 +8557,18 @@ function Alert(_a) {
|
|
|
8421
8557
|
fill: "none",
|
|
8422
8558
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8423
8559
|
children: [
|
|
8424
|
-
/* @__PURE__ */ (0,
|
|
8560
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { clipPath: "url(#clip0_1428_10038)", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8425
8561
|
"path",
|
|
8426
8562
|
{
|
|
8427
8563
|
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",
|
|
8428
8564
|
fill: "#CC9A06"
|
|
8429
8565
|
}
|
|
8430
8566
|
) }),
|
|
8431
|
-
/* @__PURE__ */ (0,
|
|
8567
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("clipPath", { id: "clip0_1428_10038", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { width: "56", height: "56", fill: "white" }) }) })
|
|
8432
8568
|
]
|
|
8433
8569
|
}
|
|
8434
8570
|
),
|
|
8435
|
-
color === "info" && /* @__PURE__ */ (0,
|
|
8571
|
+
color === "info" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
8436
8572
|
"svg",
|
|
8437
8573
|
{
|
|
8438
8574
|
width: "40",
|
|
@@ -8441,35 +8577,35 @@ function Alert(_a) {
|
|
|
8441
8577
|
fill: "none",
|
|
8442
8578
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8443
8579
|
children: [
|
|
8444
|
-
/* @__PURE__ */ (0,
|
|
8580
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { clipPath: "url(#clip0_1645_46)", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8445
8581
|
"path",
|
|
8446
8582
|
{
|
|
8447
8583
|
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",
|
|
8448
8584
|
fill: "#9FB6C7"
|
|
8449
8585
|
}
|
|
8450
8586
|
) }),
|
|
8451
|
-
/* @__PURE__ */ (0,
|
|
8587
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("clipPath", { id: "clip0_1645_46", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { width: "40", height: "40", fill: "white" }) }) })
|
|
8452
8588
|
]
|
|
8453
8589
|
}
|
|
8454
8590
|
),
|
|
8455
|
-
completAlert.title && /* @__PURE__ */ (0,
|
|
8456
|
-
/* @__PURE__ */ (0,
|
|
8457
|
-
completAlert.subtitle && /* @__PURE__ */ (0,
|
|
8591
|
+
completAlert.title && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlertDialogTitleStyled, { children: completAlert.title }),
|
|
8592
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(AlertDialogDescriptionStyled, { children: [
|
|
8593
|
+
completAlert.subtitle && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8458
8594
|
Text,
|
|
8459
8595
|
{
|
|
8460
8596
|
css: {
|
|
8461
8597
|
fontSize: "$16"
|
|
8462
8598
|
},
|
|
8463
8599
|
asChild: true,
|
|
8464
|
-
children: /* @__PURE__ */ (0,
|
|
8600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { children: completAlert.subtitle })
|
|
8465
8601
|
}
|
|
8466
8602
|
),
|
|
8467
8603
|
completAlert.description
|
|
8468
8604
|
] })
|
|
8469
8605
|
] }),
|
|
8470
|
-
completAlert.onAction || completAlert.cancel ? /* @__PURE__ */ (0,
|
|
8471
|
-
/* @__PURE__ */ (0,
|
|
8472
|
-
completAlert.onAction && /* @__PURE__ */ (0,
|
|
8606
|
+
completAlert.onAction || completAlert.cancel ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlertDialoghrStyled, {}) : null,
|
|
8607
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlertDialogRowStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Flex2, { gap: "10", justify: "end", width: "100%", children: [
|
|
8608
|
+
completAlert.onAction && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes14.AlertDialog.Action, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8473
8609
|
Button,
|
|
8474
8610
|
{
|
|
8475
8611
|
variant: "contained",
|
|
@@ -8477,7 +8613,7 @@ function Alert(_a) {
|
|
|
8477
8613
|
children: completAlert.actionText || "Salvar"
|
|
8478
8614
|
}
|
|
8479
8615
|
) }),
|
|
8480
|
-
completAlert.cancel && /* @__PURE__ */ (0,
|
|
8616
|
+
completAlert.cancel && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_themes14.AlertDialog.Cancel, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { variant: "outlined", color: "neutral", children: completAlert.cancelText || "Cancelar" }) })
|
|
8481
8617
|
] }) })
|
|
8482
8618
|
] })
|
|
8483
8619
|
] }) })
|
|
@@ -8486,7 +8622,7 @@ function Alert(_a) {
|
|
|
8486
8622
|
|
|
8487
8623
|
// src/components/Switch.tsx
|
|
8488
8624
|
var import_themes15 = require("@radix-ui/themes");
|
|
8489
|
-
var
|
|
8625
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
8490
8626
|
var SwitchStyled = styled(import_themes15.Switch, {
|
|
8491
8627
|
all: "unset",
|
|
8492
8628
|
borderRadius: "$full",
|
|
@@ -8580,13 +8716,13 @@ var SwitchStyled = styled(import_themes15.Switch, {
|
|
|
8580
8716
|
}
|
|
8581
8717
|
});
|
|
8582
8718
|
function Switch(props) {
|
|
8583
|
-
return /* @__PURE__ */ (0,
|
|
8719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SwitchStyled, __spreadValues({ color: "brand", defaultChecked: true }, props));
|
|
8584
8720
|
}
|
|
8585
8721
|
|
|
8586
8722
|
// src/components/Step.tsx
|
|
8587
|
-
var
|
|
8723
|
+
var import_react8 = __toESM(require("react"));
|
|
8588
8724
|
var import_themes16 = require("@radix-ui/themes");
|
|
8589
|
-
var
|
|
8725
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
8590
8726
|
var StepStyled = styled("div", {
|
|
8591
8727
|
fontFamily: "$default",
|
|
8592
8728
|
color: "$gray100",
|
|
@@ -8659,7 +8795,7 @@ var StepListStyled = styled(import_themes16.Tabs.List, {
|
|
|
8659
8795
|
});
|
|
8660
8796
|
function Step(_a) {
|
|
8661
8797
|
var _b = _a, { children, defaultValue } = _b, props = __objRest(_b, ["children", "defaultValue"]);
|
|
8662
|
-
return /* @__PURE__ */ (0,
|
|
8798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_themes16.Tabs.Root, { defaultValue: String(defaultValue), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StepStyled, __spreadProps(__spreadValues({}, props), { children })) });
|
|
8663
8799
|
}
|
|
8664
8800
|
function StepTrigger(_a) {
|
|
8665
8801
|
var _b = _a, {
|
|
@@ -8672,7 +8808,7 @@ function StepTrigger(_a) {
|
|
|
8672
8808
|
"currentStep"
|
|
8673
8809
|
]);
|
|
8674
8810
|
const isActiveOrPrevious = currentStep !== void 0 && value <= currentStep;
|
|
8675
|
-
return /* @__PURE__ */ (0,
|
|
8811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
8676
8812
|
StepTriggerStyled,
|
|
8677
8813
|
__spreadProps(__spreadValues({
|
|
8678
8814
|
"data-filled": isActiveOrPrevious,
|
|
@@ -8690,7 +8826,7 @@ function StepContent(_a) {
|
|
|
8690
8826
|
"value",
|
|
8691
8827
|
"children"
|
|
8692
8828
|
]);
|
|
8693
|
-
return /* @__PURE__ */ (0,
|
|
8829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_themes16.Tabs.Content, __spreadProps(__spreadValues({ value: String(value) }, props), { children }));
|
|
8694
8830
|
}
|
|
8695
8831
|
function StepList(_a) {
|
|
8696
8832
|
var _b = _a, {
|
|
@@ -8700,9 +8836,9 @@ function StepList(_a) {
|
|
|
8700
8836
|
"children",
|
|
8701
8837
|
"currentStep"
|
|
8702
8838
|
]);
|
|
8703
|
-
return /* @__PURE__ */ (0,
|
|
8704
|
-
if (
|
|
8705
|
-
return
|
|
8839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StepListStyled, __spreadProps(__spreadValues({}, props), { children: import_react8.default.Children.map(children, (child) => {
|
|
8840
|
+
if (import_react8.default.isValidElement(child) && child.type === StepTrigger) {
|
|
8841
|
+
return import_react8.default.cloneElement(child, { currentStep });
|
|
8706
8842
|
}
|
|
8707
8843
|
return child;
|
|
8708
8844
|
}) }));
|
|
@@ -8713,12 +8849,12 @@ function StepWrapper(_a) {
|
|
|
8713
8849
|
} = _b, props = __objRest(_b, [
|
|
8714
8850
|
"children"
|
|
8715
8851
|
]);
|
|
8716
|
-
return /* @__PURE__ */ (0,
|
|
8852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_themes16.Box, __spreadProps(__spreadValues({}, props), { children }));
|
|
8717
8853
|
}
|
|
8718
8854
|
|
|
8719
8855
|
// src/components/Card.tsx
|
|
8720
8856
|
var import_themes17 = require("@radix-ui/themes");
|
|
8721
|
-
var
|
|
8857
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
8722
8858
|
var CardStyled = styled(import_themes17.Card, {
|
|
8723
8859
|
borderRadius: "$2xl",
|
|
8724
8860
|
border: "1px solid $dark100",
|
|
@@ -8754,13 +8890,13 @@ var CardStyled = styled(import_themes17.Card, {
|
|
|
8754
8890
|
});
|
|
8755
8891
|
function Card(_a) {
|
|
8756
8892
|
var _b = _a, { asChild, children } = _b, props = __objRest(_b, ["asChild", "children"]);
|
|
8757
|
-
return /* @__PURE__ */ (0,
|
|
8893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CardStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
8758
8894
|
}
|
|
8759
8895
|
|
|
8760
8896
|
// src/components/TextareaField.tsx
|
|
8761
8897
|
var import_themes18 = require("@radix-ui/themes");
|
|
8762
|
-
var
|
|
8763
|
-
var
|
|
8898
|
+
var import_react9 = __toESM(require("react"));
|
|
8899
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
8764
8900
|
var TextareaFieldStyle = styled(import_themes18.TextArea, {
|
|
8765
8901
|
display: "flex",
|
|
8766
8902
|
flex: 1,
|
|
@@ -8824,10 +8960,10 @@ var TextareaLimitIndicator = styled("div", {
|
|
|
8824
8960
|
padding: "$4"
|
|
8825
8961
|
}
|
|
8826
8962
|
});
|
|
8827
|
-
var TextareaField =
|
|
8963
|
+
var TextareaField = import_react9.default.forwardRef((_a, fowardedRef) => {
|
|
8828
8964
|
var _b = _a, { maxLength, color } = _b, props = __objRest(_b, ["maxLength", "color"]);
|
|
8829
|
-
const inputRef = (0,
|
|
8830
|
-
const badgeRef = (0,
|
|
8965
|
+
const inputRef = (0, import_react9.useRef)(null);
|
|
8966
|
+
const badgeRef = (0, import_react9.useRef)(null);
|
|
8831
8967
|
const updateCharCountBadge = () => {
|
|
8832
8968
|
var _a2, _b2;
|
|
8833
8969
|
if (!maxLength || !badgeRef.current) return;
|
|
@@ -8839,8 +8975,8 @@ var TextareaField = import_react8.default.forwardRef((_a, fowardedRef) => {
|
|
|
8839
8975
|
updateCharCountBadge();
|
|
8840
8976
|
(_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
|
|
8841
8977
|
};
|
|
8842
|
-
return /* @__PURE__ */ (0,
|
|
8843
|
-
/* @__PURE__ */ (0,
|
|
8978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(TextareaContainer, { color, children: [
|
|
8979
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
8844
8980
|
TextareaFieldStyle,
|
|
8845
8981
|
__spreadValues({
|
|
8846
8982
|
rows: 4,
|
|
@@ -8858,17 +8994,17 @@ var TextareaField = import_react8.default.forwardRef((_a, fowardedRef) => {
|
|
|
8858
8994
|
maxLength
|
|
8859
8995
|
}, props)
|
|
8860
8996
|
),
|
|
8861
|
-
maxLength && /* @__PURE__ */ (0,
|
|
8997
|
+
maxLength && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TextareaLimitIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { typography: "badgeMedium", ref: badgeRef, children: maxLength }) })
|
|
8862
8998
|
] });
|
|
8863
8999
|
});
|
|
8864
9000
|
|
|
8865
9001
|
// src/components/Toast/components/ToastItem.tsx
|
|
8866
|
-
var
|
|
9002
|
+
var import_react11 = require("react");
|
|
8867
9003
|
|
|
8868
9004
|
// src/components/Toast/styles/index.ts
|
|
8869
|
-
var
|
|
9005
|
+
var import_react10 = require("@stitches/react");
|
|
8870
9006
|
var ToastPrimitive = __toESM(require("@radix-ui/react-toast"));
|
|
8871
|
-
var slideIn = (0,
|
|
9007
|
+
var slideIn = (0, import_react10.keyframes)({
|
|
8872
9008
|
from: {
|
|
8873
9009
|
transform: "translateX(calc(100% + 25px))",
|
|
8874
9010
|
opacity: 0
|
|
@@ -8878,7 +9014,7 @@ var slideIn = (0, import_react9.keyframes)({
|
|
|
8878
9014
|
opacity: 1
|
|
8879
9015
|
}
|
|
8880
9016
|
});
|
|
8881
|
-
var slideOut = (0,
|
|
9017
|
+
var slideOut = (0, import_react10.keyframes)({
|
|
8882
9018
|
from: {
|
|
8883
9019
|
transform: "translateX(0)",
|
|
8884
9020
|
opacity: 1
|
|
@@ -8888,7 +9024,7 @@ var slideOut = (0, import_react9.keyframes)({
|
|
|
8888
9024
|
opacity: 0
|
|
8889
9025
|
}
|
|
8890
9026
|
});
|
|
8891
|
-
var swipeOut = (0,
|
|
9027
|
+
var swipeOut = (0, import_react10.keyframes)({
|
|
8892
9028
|
from: {
|
|
8893
9029
|
transform: "translateX(var(--radix-toast-swipe-end-x))",
|
|
8894
9030
|
opacity: 1
|
|
@@ -8989,19 +9125,19 @@ var ToastClose = styled(ToastPrimitive.Close, {
|
|
|
8989
9125
|
});
|
|
8990
9126
|
|
|
8991
9127
|
// src/components/Toast/components/ToastItem.tsx
|
|
8992
|
-
var
|
|
9128
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
8993
9129
|
function ToastItem({
|
|
8994
9130
|
toast,
|
|
8995
9131
|
onRemove
|
|
8996
9132
|
}) {
|
|
8997
|
-
const [open, setOpen] = (0,
|
|
9133
|
+
const [open, setOpen] = (0, import_react11.useState)(true);
|
|
8998
9134
|
const handleOpenChange = (open2) => {
|
|
8999
9135
|
setOpen(open2);
|
|
9000
9136
|
if (!open2) {
|
|
9001
9137
|
onRemove(toast.id);
|
|
9002
9138
|
}
|
|
9003
9139
|
};
|
|
9004
|
-
return /* @__PURE__ */ (0,
|
|
9140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
9005
9141
|
ToastRoot,
|
|
9006
9142
|
{
|
|
9007
9143
|
type: toast.type,
|
|
@@ -9009,26 +9145,26 @@ function ToastItem({
|
|
|
9009
9145
|
open,
|
|
9010
9146
|
onOpenChange: handleOpenChange,
|
|
9011
9147
|
children: [
|
|
9012
|
-
(toast == null ? void 0 : toast.icon) && /* @__PURE__ */ (0,
|
|
9013
|
-
/* @__PURE__ */ (0,
|
|
9014
|
-
/* @__PURE__ */ (0,
|
|
9148
|
+
(toast == null ? void 0 : toast.icon) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon_default, { name: toast.icon, size: "xl" }),
|
|
9149
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { typography: "bodyS", fontWeight: "medium", children: toast.message }) }),
|
|
9150
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToastClose, { "aria-label": "Close", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon_default, { name: "xmark", size: "md" }) })
|
|
9015
9151
|
]
|
|
9016
9152
|
}
|
|
9017
9153
|
);
|
|
9018
9154
|
}
|
|
9019
9155
|
|
|
9020
9156
|
// src/components/Toast/components/ToastProvider.tsx
|
|
9021
|
-
var
|
|
9157
|
+
var import_react12 = require("react");
|
|
9022
9158
|
var ToastPrimitive2 = __toESM(require("@radix-ui/react-toast"));
|
|
9023
|
-
var
|
|
9024
|
-
var ToastContext = (0,
|
|
9159
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
9160
|
+
var ToastContext = (0, import_react12.createContext)(null);
|
|
9025
9161
|
function ToastProvider({
|
|
9026
9162
|
children,
|
|
9027
9163
|
defaultDuration = 5e3,
|
|
9028
9164
|
maxToasts = 5,
|
|
9029
9165
|
swipeDirection = "right"
|
|
9030
9166
|
}) {
|
|
9031
|
-
const [toasts, setToasts] = (0,
|
|
9167
|
+
const [toasts, setToasts] = (0, import_react12.useState)([]);
|
|
9032
9168
|
const addToast = (toastData) => {
|
|
9033
9169
|
const id = Math.random().toString(36).substr(2, 9);
|
|
9034
9170
|
const newToast = __spreadProps(__spreadValues({
|
|
@@ -9056,17 +9192,17 @@ function ToastProvider({
|
|
|
9056
9192
|
removeToast,
|
|
9057
9193
|
removeAllToasts
|
|
9058
9194
|
};
|
|
9059
|
-
return /* @__PURE__ */ (0,
|
|
9195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(ToastPrimitive2.Provider, { swipeDirection, children: [
|
|
9060
9196
|
children,
|
|
9061
|
-
toasts.map((toast) => /* @__PURE__ */ (0,
|
|
9062
|
-
/* @__PURE__ */ (0,
|
|
9197
|
+
toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastItem, { toast, onRemove: removeToast }, toast.id)),
|
|
9198
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastViewport, {})
|
|
9063
9199
|
] }) });
|
|
9064
9200
|
}
|
|
9065
9201
|
|
|
9066
9202
|
// src/components/Toast/hooks/useToast.ts
|
|
9067
|
-
var
|
|
9203
|
+
var import_react13 = require("react");
|
|
9068
9204
|
var useToast = () => {
|
|
9069
|
-
const context = (0,
|
|
9205
|
+
const context = (0, import_react13.useContext)(ToastContext);
|
|
9070
9206
|
if (!context) {
|
|
9071
9207
|
throw new Error("useToast deve ser usado dentro de um ToastProvider");
|
|
9072
9208
|
}
|
|
@@ -9075,7 +9211,7 @@ var useToast = () => {
|
|
|
9075
9211
|
|
|
9076
9212
|
// src/components/Tooltip/index.tsx
|
|
9077
9213
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
9078
|
-
var
|
|
9214
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
9079
9215
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
9080
9216
|
var TooltipRoot = TooltipPrimitive.Root;
|
|
9081
9217
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
@@ -9114,18 +9250,18 @@ function Tooltip({
|
|
|
9114
9250
|
delayDuration = 200,
|
|
9115
9251
|
side = "top"
|
|
9116
9252
|
}) {
|
|
9117
|
-
return /* @__PURE__ */ (0,
|
|
9118
|
-
/* @__PURE__ */ (0,
|
|
9119
|
-
/* @__PURE__ */ (0,
|
|
9120
|
-
typeof content === "string" ? /* @__PURE__ */ (0,
|
|
9121
|
-
/* @__PURE__ */ (0,
|
|
9253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(TooltipRoot, { delayDuration, children: [
|
|
9254
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipTrigger, { asChild: true, children }),
|
|
9255
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(TooltipContent, { side, sideOffset: 5, children: [
|
|
9256
|
+
typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { typography: "tooltip", children: content }) : content,
|
|
9257
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipArrow, {})
|
|
9122
9258
|
] })
|
|
9123
9259
|
] }) });
|
|
9124
9260
|
}
|
|
9125
9261
|
|
|
9126
9262
|
// src/components/Grid.tsx
|
|
9127
9263
|
var import_themes19 = require("@radix-ui/themes");
|
|
9128
|
-
var
|
|
9264
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
9129
9265
|
var GridStyled = styled(import_themes19.Grid, {
|
|
9130
9266
|
display: "grid",
|
|
9131
9267
|
variants: {
|
|
@@ -9247,12 +9383,12 @@ var GridStyled = styled(import_themes19.Grid, {
|
|
|
9247
9383
|
});
|
|
9248
9384
|
function Grid(_a) {
|
|
9249
9385
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9250
|
-
return /* @__PURE__ */ (0,
|
|
9386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9251
9387
|
}
|
|
9252
9388
|
|
|
9253
9389
|
// src/components/Container.tsx
|
|
9254
9390
|
var import_themes20 = require("@radix-ui/themes");
|
|
9255
|
-
var
|
|
9391
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
9256
9392
|
var ContainerStyled = styled(import_themes20.Container, {
|
|
9257
9393
|
variants: {
|
|
9258
9394
|
size: {
|
|
@@ -9282,12 +9418,12 @@ var ContainerStyled = styled(import_themes20.Container, {
|
|
|
9282
9418
|
});
|
|
9283
9419
|
function Container(_a) {
|
|
9284
9420
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9285
|
-
return /* @__PURE__ */ (0,
|
|
9421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9286
9422
|
}
|
|
9287
9423
|
|
|
9288
9424
|
// src/components/Section.tsx
|
|
9289
9425
|
var import_themes21 = require("@radix-ui/themes");
|
|
9290
|
-
var
|
|
9426
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
9291
9427
|
var SectionStyled = styled(import_themes21.Section, {
|
|
9292
9428
|
variants: {
|
|
9293
9429
|
size: {
|
|
@@ -9311,26 +9447,26 @@ var SectionStyled = styled(import_themes21.Section, {
|
|
|
9311
9447
|
});
|
|
9312
9448
|
function Section(_a) {
|
|
9313
9449
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9314
|
-
return /* @__PURE__ */ (0,
|
|
9450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9315
9451
|
}
|
|
9316
9452
|
|
|
9317
9453
|
// src/components/FormFields/ErrorFormMessage.tsx
|
|
9318
9454
|
var import_free_solid_svg_icons2 = require("@fortawesome/free-solid-svg-icons");
|
|
9319
9455
|
var import_react_fontawesome2 = require("@fortawesome/react-fontawesome");
|
|
9320
|
-
var
|
|
9456
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
9321
9457
|
var ErrorFormMessage = ({ message: message2 }) => {
|
|
9322
|
-
if (!message2) return;
|
|
9458
|
+
if (!message2) return null;
|
|
9323
9459
|
if (typeof message2 !== "string") {
|
|
9324
9460
|
return null;
|
|
9325
9461
|
}
|
|
9326
|
-
return /* @__PURE__ */ (0,
|
|
9327
|
-
/* @__PURE__ */ (0,
|
|
9328
|
-
/* @__PURE__ */ (0,
|
|
9462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Flex2, { justify: "start", align: "center", gap: 6, children: [
|
|
9463
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_fontawesome2.FontAwesomeIcon, { icon: import_free_solid_svg_icons2.faXmarkCircle, color: colors.error600, size: "1x" }),
|
|
9464
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { typography: "bodyXS", fontWeight: "medium", color: "error600", children: message2 })
|
|
9329
9465
|
] });
|
|
9330
9466
|
};
|
|
9331
9467
|
|
|
9332
9468
|
// src/components/FormFields/FormLabel.tsx
|
|
9333
|
-
var
|
|
9469
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
9334
9470
|
var FormLabel = ({
|
|
9335
9471
|
name,
|
|
9336
9472
|
label,
|
|
@@ -9338,7 +9474,7 @@ var FormLabel = ({
|
|
|
9338
9474
|
required
|
|
9339
9475
|
}) => {
|
|
9340
9476
|
if (!label) return null;
|
|
9341
|
-
return /* @__PURE__ */ (0,
|
|
9477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
9342
9478
|
Text,
|
|
9343
9479
|
{
|
|
9344
9480
|
typography: "labelMedium",
|
|
@@ -9347,7 +9483,7 @@ var FormLabel = ({
|
|
|
9347
9483
|
id: `${name}-label`,
|
|
9348
9484
|
children: [
|
|
9349
9485
|
label,
|
|
9350
|
-
!required && /* @__PURE__ */ (0,
|
|
9486
|
+
!required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "dark500", children: " (opcional)" })
|
|
9351
9487
|
]
|
|
9352
9488
|
}
|
|
9353
9489
|
);
|
|
@@ -9355,7 +9491,7 @@ var FormLabel = ({
|
|
|
9355
9491
|
|
|
9356
9492
|
// src/components/FormFields/TextAreaFormField.tsx
|
|
9357
9493
|
var import_react_hook_form = require("react-hook-form");
|
|
9358
|
-
var
|
|
9494
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
9359
9495
|
var TextAreaFormField = ({
|
|
9360
9496
|
name,
|
|
9361
9497
|
label,
|
|
@@ -9369,8 +9505,8 @@ var TextAreaFormField = ({
|
|
|
9369
9505
|
} = (0, import_react_hook_form.useFormContext)();
|
|
9370
9506
|
const haveError = !!errors[name];
|
|
9371
9507
|
const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
|
|
9372
|
-
return /* @__PURE__ */ (0,
|
|
9373
|
-
/* @__PURE__ */ (0,
|
|
9508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Flex2, { direction: "column", children: [
|
|
9509
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9374
9510
|
FormLabel,
|
|
9375
9511
|
{
|
|
9376
9512
|
name,
|
|
@@ -9379,7 +9515,7 @@ var TextAreaFormField = ({
|
|
|
9379
9515
|
haveError
|
|
9380
9516
|
}
|
|
9381
9517
|
),
|
|
9382
|
-
/* @__PURE__ */ (0,
|
|
9518
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9383
9519
|
TextareaField,
|
|
9384
9520
|
__spreadProps(__spreadValues({}, register(name, { required })), {
|
|
9385
9521
|
placeholder,
|
|
@@ -9387,13 +9523,13 @@ var TextAreaFormField = ({
|
|
|
9387
9523
|
"aria-labelledby": `${name}-label`
|
|
9388
9524
|
})
|
|
9389
9525
|
),
|
|
9390
|
-
/* @__PURE__ */ (0,
|
|
9526
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ErrorFormMessage, { message: errorMsg })
|
|
9391
9527
|
] });
|
|
9392
9528
|
};
|
|
9393
9529
|
|
|
9394
9530
|
// src/components/FormFields/TextFormField.tsx
|
|
9395
9531
|
var import_react_hook_form2 = require("react-hook-form");
|
|
9396
|
-
var
|
|
9532
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
9397
9533
|
var TextFormField = ({
|
|
9398
9534
|
name,
|
|
9399
9535
|
label,
|
|
@@ -9407,8 +9543,8 @@ var TextFormField = ({
|
|
|
9407
9543
|
} = (0, import_react_hook_form2.useFormContext)();
|
|
9408
9544
|
const haveError = !!errors[name];
|
|
9409
9545
|
const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
|
|
9410
|
-
return /* @__PURE__ */ (0,
|
|
9411
|
-
/* @__PURE__ */ (0,
|
|
9546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Flex2, { direction: "column", children: [
|
|
9547
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
9412
9548
|
FormLabel,
|
|
9413
9549
|
{
|
|
9414
9550
|
name,
|
|
@@ -9417,7 +9553,7 @@ var TextFormField = ({
|
|
|
9417
9553
|
haveError
|
|
9418
9554
|
}
|
|
9419
9555
|
),
|
|
9420
|
-
/* @__PURE__ */ (0,
|
|
9556
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
9421
9557
|
TextField,
|
|
9422
9558
|
__spreadProps(__spreadValues({}, register(name, { required })), {
|
|
9423
9559
|
placeholder,
|
|
@@ -9425,9 +9561,19 @@ var TextFormField = ({
|
|
|
9425
9561
|
"aria-labelledby": `${name}-label`
|
|
9426
9562
|
})
|
|
9427
9563
|
),
|
|
9428
|
-
/* @__PURE__ */ (0,
|
|
9564
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ErrorFormMessage, { message: errorMsg })
|
|
9429
9565
|
] });
|
|
9430
9566
|
};
|
|
9567
|
+
|
|
9568
|
+
// src/components/FormFields/Form.tsx
|
|
9569
|
+
var import_react_hook_form3 = require("react-hook-form");
|
|
9570
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
9571
|
+
var Form = (_a) => {
|
|
9572
|
+
var _b = _a, { onSubmit, children } = _b, props = __objRest(_b, ["onSubmit", "children"]);
|
|
9573
|
+
const methods = (0, import_react_hook_form3.useForm)(props);
|
|
9574
|
+
const { handleSubmit } = methods;
|
|
9575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_hook_form3.FormProvider, __spreadProps(__spreadValues({}, methods), { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("form", { onSubmit: handleSubmit(onSubmit), children }) }));
|
|
9576
|
+
};
|
|
9431
9577
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9432
9578
|
0 && (module.exports = {
|
|
9433
9579
|
Alert,
|
|
@@ -9456,6 +9602,7 @@ var TextFormField = ({
|
|
|
9456
9602
|
CheckboxItem,
|
|
9457
9603
|
Container,
|
|
9458
9604
|
ContainerStyled,
|
|
9605
|
+
Drawer,
|
|
9459
9606
|
DropdownMenu,
|
|
9460
9607
|
DropdownMenuItem,
|
|
9461
9608
|
ErrorFormMessage,
|
|
@@ -9463,11 +9610,13 @@ var TextFormField = ({
|
|
|
9463
9610
|
FilterItem,
|
|
9464
9611
|
Flex,
|
|
9465
9612
|
FlexStyled,
|
|
9613
|
+
Form,
|
|
9466
9614
|
FormLabel,
|
|
9467
9615
|
Grid,
|
|
9468
9616
|
GridStyled,
|
|
9469
9617
|
Icon,
|
|
9470
9618
|
InputStyled,
|
|
9619
|
+
MenuDropdown,
|
|
9471
9620
|
Modal,
|
|
9472
9621
|
RadioGroup,
|
|
9473
9622
|
RadioGroupStyled,
|