@lets-events/react 11.2.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 +6 -0
- package/dist/index.d.mts +771 -12
- package/dist/index.d.ts +771 -12
- package/dist/index.js +283 -146
- package/dist/index.mjs +260 -125
- 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 -25
- 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,
|
|
@@ -1050,6 +1051,7 @@ __export(index_exports, {
|
|
|
1050
1051
|
GridStyled: () => GridStyled,
|
|
1051
1052
|
Icon: () => Icon,
|
|
1052
1053
|
InputStyled: () => InputStyled,
|
|
1054
|
+
MenuDropdown: () => MenuDropdown,
|
|
1053
1055
|
Modal: () => Modal,
|
|
1054
1056
|
RadioGroup: () => RadioGroup,
|
|
1055
1057
|
RadioGroupStyled: () => RadioGroupStyled,
|
|
@@ -1914,6 +1916,19 @@ var ButtonStyled = styled(import_themes2.Button, {
|
|
|
1914
1916
|
borderColor: "$colors$neutral100",
|
|
1915
1917
|
$$buttonColor: "$colors$neutral300"
|
|
1916
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
|
+
}
|
|
1917
1932
|
}
|
|
1918
1933
|
},
|
|
1919
1934
|
fontWeight: {
|
|
@@ -3710,13 +3725,60 @@ function Modal(_a) {
|
|
|
3710
3725
|
] }));
|
|
3711
3726
|
}
|
|
3712
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
|
+
|
|
3713
3775
|
// src/components/Calendar/index.tsx
|
|
3714
|
-
var
|
|
3776
|
+
var import_react6 = require("react");
|
|
3715
3777
|
|
|
3716
3778
|
// src/hooks/useOnClickOutside.tsx
|
|
3717
|
-
var
|
|
3779
|
+
var import_react5 = require("react");
|
|
3718
3780
|
function useOnClickOutside(ref, handler) {
|
|
3719
|
-
(0,
|
|
3781
|
+
(0, import_react5.useEffect)(() => {
|
|
3720
3782
|
const listener = (event) => {
|
|
3721
3783
|
if (!ref.current || ref.current.contains(event.target)) {
|
|
3722
3784
|
return;
|
|
@@ -7829,7 +7891,7 @@ var DayPickerWrapperStyled = styled("div", {
|
|
|
7829
7891
|
});
|
|
7830
7892
|
|
|
7831
7893
|
// src/components/Calendar/index.tsx
|
|
7832
|
-
var
|
|
7894
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
7833
7895
|
function formatToDateMask(value) {
|
|
7834
7896
|
const numeric = value.replace(/\D/g, "").slice(0, 8);
|
|
7835
7897
|
const parts = numeric.match(/^(\d{0,2})(\d{0,2})(\d{0,4})$/);
|
|
@@ -7853,15 +7915,15 @@ function Calendar(_a) {
|
|
|
7853
7915
|
"setSelected",
|
|
7854
7916
|
"position"
|
|
7855
7917
|
]);
|
|
7856
|
-
const [inputValue, setInputValue] = (0,
|
|
7857
|
-
const [showContainer, setShowCalendar] = (0,
|
|
7858
|
-
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);
|
|
7859
7921
|
useOnClickOutside(dropdownRef, () => {
|
|
7860
7922
|
setShowCalendar(false);
|
|
7861
7923
|
});
|
|
7862
7924
|
const today = /* @__PURE__ */ new Date();
|
|
7863
7925
|
const maxDate = addYears(today, 20);
|
|
7864
|
-
(0,
|
|
7926
|
+
(0, import_react6.useEffect)(() => {
|
|
7865
7927
|
if (selected) {
|
|
7866
7928
|
setInputValue(format2(selected, "dd/MM/yyyy"));
|
|
7867
7929
|
} else {
|
|
@@ -7878,13 +7940,13 @@ function Calendar(_a) {
|
|
|
7878
7940
|
console.warn("Data inv\xE1lida inserida no input:", masked);
|
|
7879
7941
|
}
|
|
7880
7942
|
};
|
|
7881
|
-
return /* @__PURE__ */ (0,
|
|
7882
|
-
/* @__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)(
|
|
7883
7945
|
CalendarButtonStyled,
|
|
7884
7946
|
{
|
|
7885
7947
|
type: "button",
|
|
7886
7948
|
onClick: () => setShowCalendar((prev) => !prev),
|
|
7887
|
-
children: /* @__PURE__ */ (0,
|
|
7949
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7888
7950
|
TextField,
|
|
7889
7951
|
{
|
|
7890
7952
|
placeholder: "00/00/0000",
|
|
@@ -7893,17 +7955,17 @@ function Calendar(_a) {
|
|
|
7893
7955
|
onChange: handleInputChange,
|
|
7894
7956
|
inputMode: "numeric",
|
|
7895
7957
|
textAlign: "right",
|
|
7896
|
-
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" }) })
|
|
7897
7959
|
}
|
|
7898
7960
|
)
|
|
7899
7961
|
}
|
|
7900
7962
|
),
|
|
7901
|
-
showContainer && /* @__PURE__ */ (0,
|
|
7963
|
+
showContainer && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
7902
7964
|
CalendarContentStyled,
|
|
7903
7965
|
{
|
|
7904
7966
|
style: position === "top" ? { bottom: "110%" } : { top: "110%" },
|
|
7905
7967
|
children: [
|
|
7906
|
-
/* @__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)(
|
|
7907
7969
|
import_react_day_picker.DayPicker,
|
|
7908
7970
|
{
|
|
7909
7971
|
mode: "single",
|
|
@@ -7917,7 +7979,7 @@ function Calendar(_a) {
|
|
|
7917
7979
|
endMonth: maxDate
|
|
7918
7980
|
}
|
|
7919
7981
|
) }) }),
|
|
7920
|
-
action && /* @__PURE__ */ (0,
|
|
7982
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CalendarFooterStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7921
7983
|
Button,
|
|
7922
7984
|
{
|
|
7923
7985
|
variant: "text",
|
|
@@ -7937,9 +7999,82 @@ function Calendar(_a) {
|
|
|
7937
7999
|
] })) });
|
|
7938
8000
|
}
|
|
7939
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
|
+
|
|
7940
8075
|
// src/components/TimePicker.tsx
|
|
7941
|
-
var
|
|
7942
|
-
var
|
|
8076
|
+
var import_react7 = require("react");
|
|
8077
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
7943
8078
|
var TimePickerStyled = styled("div", {
|
|
7944
8079
|
position: "relative",
|
|
7945
8080
|
fontFamily: "$default",
|
|
@@ -8042,14 +8177,14 @@ function TimePicker({
|
|
|
8042
8177
|
setSelected,
|
|
8043
8178
|
position = "bottom"
|
|
8044
8179
|
}) {
|
|
8045
|
-
const [hours, setHours] = (0,
|
|
8046
|
-
const [minutes, setMinutes] = (0,
|
|
8047
|
-
const [rawHours, setRawHours] = (0,
|
|
8048
|
-
const [rawMinutes, setRawMinutes] = (0,
|
|
8049
|
-
const [isOpen, setIsOpen] = (0,
|
|
8050
|
-
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);
|
|
8051
8186
|
useOnClickOutside(dropdownRef, () => setIsOpen(false));
|
|
8052
|
-
const handleIncrement = (0,
|
|
8187
|
+
const handleIncrement = (0, import_react7.useCallback)(
|
|
8053
8188
|
(type) => {
|
|
8054
8189
|
if (type === "hours") {
|
|
8055
8190
|
const next = (parseInt(hours) + 1) % 24;
|
|
@@ -8063,7 +8198,7 @@ function TimePicker({
|
|
|
8063
8198
|
},
|
|
8064
8199
|
[hours, minutes]
|
|
8065
8200
|
);
|
|
8066
|
-
const handleDecrement = (0,
|
|
8201
|
+
const handleDecrement = (0, import_react7.useCallback)(
|
|
8067
8202
|
(type) => {
|
|
8068
8203
|
if (type === "hours") {
|
|
8069
8204
|
const prev = (parseInt(hours) - 1 + 24) % 24;
|
|
@@ -8077,13 +8212,13 @@ function TimePicker({
|
|
|
8077
8212
|
},
|
|
8078
8213
|
[hours, minutes]
|
|
8079
8214
|
);
|
|
8080
|
-
return /* @__PURE__ */ (0,
|
|
8081
|
-
/* @__PURE__ */ (0,
|
|
8215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(TimePickerStyled, { ref: dropdownRef, children: [
|
|
8216
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8082
8217
|
TimePickerButtonStyled,
|
|
8083
8218
|
{
|
|
8084
8219
|
type: "button",
|
|
8085
8220
|
onClick: () => setIsOpen((prev) => !prev),
|
|
8086
|
-
children: /* @__PURE__ */ (0,
|
|
8221
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8087
8222
|
TextField,
|
|
8088
8223
|
{
|
|
8089
8224
|
value: selected,
|
|
@@ -8092,18 +8227,18 @@ function TimePicker({
|
|
|
8092
8227
|
placeholder: "00:00",
|
|
8093
8228
|
typography: "labelSmall",
|
|
8094
8229
|
fontWeight: "regular",
|
|
8095
|
-
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" }) })
|
|
8096
8231
|
}
|
|
8097
8232
|
)
|
|
8098
8233
|
}
|
|
8099
8234
|
),
|
|
8100
|
-
isOpen && /* @__PURE__ */ (0,
|
|
8235
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
8101
8236
|
TimePickerDropdownStyled,
|
|
8102
8237
|
{
|
|
8103
8238
|
style: position === "top" ? { bottom: "110%" } : { top: "110%" },
|
|
8104
8239
|
children: [
|
|
8105
|
-
/* @__PURE__ */ (0,
|
|
8106
|
-
["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)(
|
|
8107
8242
|
Box,
|
|
8108
8243
|
{
|
|
8109
8244
|
style: {
|
|
@@ -8112,13 +8247,13 @@ function TimePicker({
|
|
|
8112
8247
|
flexDirection: "column"
|
|
8113
8248
|
},
|
|
8114
8249
|
children: [
|
|
8115
|
-
/* @__PURE__ */ (0,
|
|
8250
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8116
8251
|
Button,
|
|
8117
8252
|
{
|
|
8118
8253
|
type: "button",
|
|
8119
8254
|
variant: "text",
|
|
8120
8255
|
onClick: () => handleIncrement(unit),
|
|
8121
|
-
children: /* @__PURE__ */ (0,
|
|
8256
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
8122
8257
|
"svg",
|
|
8123
8258
|
{
|
|
8124
8259
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8127,14 +8262,14 @@ function TimePicker({
|
|
|
8127
8262
|
viewBox: "0 0 32 32",
|
|
8128
8263
|
fill: "none",
|
|
8129
8264
|
children: [
|
|
8130
|
-
/* @__PURE__ */ (0,
|
|
8265
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8131
8266
|
"path",
|
|
8132
8267
|
{
|
|
8133
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",
|
|
8134
8269
|
fill: "white"
|
|
8135
8270
|
}
|
|
8136
8271
|
),
|
|
8137
|
-
/* @__PURE__ */ (0,
|
|
8272
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8138
8273
|
"path",
|
|
8139
8274
|
{
|
|
8140
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",
|
|
@@ -8146,7 +8281,7 @@ function TimePicker({
|
|
|
8146
8281
|
)
|
|
8147
8282
|
}
|
|
8148
8283
|
),
|
|
8149
|
-
/* @__PURE__ */ (0,
|
|
8284
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8150
8285
|
InputStyled,
|
|
8151
8286
|
{
|
|
8152
8287
|
inputMode: "numeric",
|
|
@@ -8184,13 +8319,13 @@ function TimePicker({
|
|
|
8184
8319
|
}
|
|
8185
8320
|
}
|
|
8186
8321
|
),
|
|
8187
|
-
/* @__PURE__ */ (0,
|
|
8322
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8188
8323
|
Button,
|
|
8189
8324
|
{
|
|
8190
8325
|
type: "button",
|
|
8191
8326
|
variant: "text",
|
|
8192
8327
|
onClick: () => handleDecrement(unit),
|
|
8193
|
-
children: /* @__PURE__ */ (0,
|
|
8328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
8194
8329
|
"svg",
|
|
8195
8330
|
{
|
|
8196
8331
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8199,14 +8334,14 @@ function TimePicker({
|
|
|
8199
8334
|
viewBox: "0 0 32 32",
|
|
8200
8335
|
fill: "none",
|
|
8201
8336
|
children: [
|
|
8202
|
-
/* @__PURE__ */ (0,
|
|
8337
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8203
8338
|
"path",
|
|
8204
8339
|
{
|
|
8205
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",
|
|
8206
8341
|
fill: "white"
|
|
8207
8342
|
}
|
|
8208
8343
|
),
|
|
8209
|
-
/* @__PURE__ */ (0,
|
|
8344
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8210
8345
|
"path",
|
|
8211
8346
|
{
|
|
8212
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",
|
|
@@ -8222,9 +8357,9 @@ function TimePicker({
|
|
|
8222
8357
|
},
|
|
8223
8358
|
unit
|
|
8224
8359
|
)),
|
|
8225
|
-
/* @__PURE__ */ (0,
|
|
8360
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { children: ":" })
|
|
8226
8361
|
] }),
|
|
8227
|
-
/* @__PURE__ */ (0,
|
|
8362
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TimePickerFooterStyled, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8228
8363
|
Button,
|
|
8229
8364
|
{
|
|
8230
8365
|
type: "button",
|
|
@@ -8247,7 +8382,7 @@ function TimePicker({
|
|
|
8247
8382
|
|
|
8248
8383
|
// src/components/Alert.tsx
|
|
8249
8384
|
var import_themes14 = require("@radix-ui/themes");
|
|
8250
|
-
var
|
|
8385
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
8251
8386
|
var AlertDialogSimpleStyled = styled(import_themes14.AlertDialog.Content, {
|
|
8252
8387
|
fontFamily: "$default",
|
|
8253
8388
|
lineHeight: "$base",
|
|
@@ -8361,19 +8496,19 @@ function Alert(_a) {
|
|
|
8361
8496
|
"completAlert",
|
|
8362
8497
|
"simpleAlert"
|
|
8363
8498
|
]);
|
|
8364
|
-
return /* @__PURE__ */ (0,
|
|
8365
|
-
simpleAlert && /* @__PURE__ */ (0,
|
|
8366
|
-
/* @__PURE__ */ (0,
|
|
8367
|
-
/* @__PURE__ */ (0,
|
|
8368
|
-
/* @__PURE__ */ (0,
|
|
8369
|
-
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" }) }) })
|
|
8370
8505
|
] })) })
|
|
8371
8506
|
] }) }),
|
|
8372
|
-
completAlert && /* @__PURE__ */ (0,
|
|
8373
|
-
/* @__PURE__ */ (0,
|
|
8374
|
-
/* @__PURE__ */ (0,
|
|
8375
|
-
/* @__PURE__ */ (0,
|
|
8376
|
-
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)(
|
|
8377
8512
|
"svg",
|
|
8378
8513
|
{
|
|
8379
8514
|
width: "56",
|
|
@@ -8382,18 +8517,18 @@ function Alert(_a) {
|
|
|
8382
8517
|
fill: "none",
|
|
8383
8518
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8384
8519
|
children: [
|
|
8385
|
-
/* @__PURE__ */ (0,
|
|
8520
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { clipPath: "url(#clip0_1428_9995)", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8386
8521
|
"path",
|
|
8387
8522
|
{
|
|
8388
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",
|
|
8389
8524
|
fill: "#1E8535"
|
|
8390
8525
|
}
|
|
8391
8526
|
) }),
|
|
8392
|
-
/* @__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" }) }) })
|
|
8393
8528
|
]
|
|
8394
8529
|
}
|
|
8395
8530
|
),
|
|
8396
|
-
color === "error" && /* @__PURE__ */ (0,
|
|
8531
|
+
color === "error" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
8397
8532
|
"svg",
|
|
8398
8533
|
{
|
|
8399
8534
|
width: "56",
|
|
@@ -8402,18 +8537,18 @@ function Alert(_a) {
|
|
|
8402
8537
|
fill: "none",
|
|
8403
8538
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8404
8539
|
children: [
|
|
8405
|
-
/* @__PURE__ */ (0,
|
|
8540
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { clipPath: "url(#clip0_1428_10022)", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8406
8541
|
"path",
|
|
8407
8542
|
{
|
|
8408
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",
|
|
8409
8544
|
fill: "#AD1F2B"
|
|
8410
8545
|
}
|
|
8411
8546
|
) }),
|
|
8412
|
-
/* @__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" }) }) })
|
|
8413
8548
|
]
|
|
8414
8549
|
}
|
|
8415
8550
|
),
|
|
8416
|
-
color === "warning" && /* @__PURE__ */ (0,
|
|
8551
|
+
color === "warning" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
8417
8552
|
"svg",
|
|
8418
8553
|
{
|
|
8419
8554
|
width: "56",
|
|
@@ -8422,18 +8557,18 @@ function Alert(_a) {
|
|
|
8422
8557
|
fill: "none",
|
|
8423
8558
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8424
8559
|
children: [
|
|
8425
|
-
/* @__PURE__ */ (0,
|
|
8560
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { clipPath: "url(#clip0_1428_10038)", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8426
8561
|
"path",
|
|
8427
8562
|
{
|
|
8428
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",
|
|
8429
8564
|
fill: "#CC9A06"
|
|
8430
8565
|
}
|
|
8431
8566
|
) }),
|
|
8432
|
-
/* @__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" }) }) })
|
|
8433
8568
|
]
|
|
8434
8569
|
}
|
|
8435
8570
|
),
|
|
8436
|
-
color === "info" && /* @__PURE__ */ (0,
|
|
8571
|
+
color === "info" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
8437
8572
|
"svg",
|
|
8438
8573
|
{
|
|
8439
8574
|
width: "40",
|
|
@@ -8442,35 +8577,35 @@ function Alert(_a) {
|
|
|
8442
8577
|
fill: "none",
|
|
8443
8578
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8444
8579
|
children: [
|
|
8445
|
-
/* @__PURE__ */ (0,
|
|
8580
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { clipPath: "url(#clip0_1645_46)", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8446
8581
|
"path",
|
|
8447
8582
|
{
|
|
8448
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",
|
|
8449
8584
|
fill: "#9FB6C7"
|
|
8450
8585
|
}
|
|
8451
8586
|
) }),
|
|
8452
|
-
/* @__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" }) }) })
|
|
8453
8588
|
]
|
|
8454
8589
|
}
|
|
8455
8590
|
),
|
|
8456
|
-
completAlert.title && /* @__PURE__ */ (0,
|
|
8457
|
-
/* @__PURE__ */ (0,
|
|
8458
|
-
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)(
|
|
8459
8594
|
Text,
|
|
8460
8595
|
{
|
|
8461
8596
|
css: {
|
|
8462
8597
|
fontSize: "$16"
|
|
8463
8598
|
},
|
|
8464
8599
|
asChild: true,
|
|
8465
|
-
children: /* @__PURE__ */ (0,
|
|
8600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { children: completAlert.subtitle })
|
|
8466
8601
|
}
|
|
8467
8602
|
),
|
|
8468
8603
|
completAlert.description
|
|
8469
8604
|
] })
|
|
8470
8605
|
] }),
|
|
8471
|
-
completAlert.onAction || completAlert.cancel ? /* @__PURE__ */ (0,
|
|
8472
|
-
/* @__PURE__ */ (0,
|
|
8473
|
-
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)(
|
|
8474
8609
|
Button,
|
|
8475
8610
|
{
|
|
8476
8611
|
variant: "contained",
|
|
@@ -8478,7 +8613,7 @@ function Alert(_a) {
|
|
|
8478
8613
|
children: completAlert.actionText || "Salvar"
|
|
8479
8614
|
}
|
|
8480
8615
|
) }),
|
|
8481
|
-
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" }) })
|
|
8482
8617
|
] }) })
|
|
8483
8618
|
] })
|
|
8484
8619
|
] }) })
|
|
@@ -8487,7 +8622,7 @@ function Alert(_a) {
|
|
|
8487
8622
|
|
|
8488
8623
|
// src/components/Switch.tsx
|
|
8489
8624
|
var import_themes15 = require("@radix-ui/themes");
|
|
8490
|
-
var
|
|
8625
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
8491
8626
|
var SwitchStyled = styled(import_themes15.Switch, {
|
|
8492
8627
|
all: "unset",
|
|
8493
8628
|
borderRadius: "$full",
|
|
@@ -8581,13 +8716,13 @@ var SwitchStyled = styled(import_themes15.Switch, {
|
|
|
8581
8716
|
}
|
|
8582
8717
|
});
|
|
8583
8718
|
function Switch(props) {
|
|
8584
|
-
return /* @__PURE__ */ (0,
|
|
8719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SwitchStyled, __spreadValues({ color: "brand", defaultChecked: true }, props));
|
|
8585
8720
|
}
|
|
8586
8721
|
|
|
8587
8722
|
// src/components/Step.tsx
|
|
8588
|
-
var
|
|
8723
|
+
var import_react8 = __toESM(require("react"));
|
|
8589
8724
|
var import_themes16 = require("@radix-ui/themes");
|
|
8590
|
-
var
|
|
8725
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
8591
8726
|
var StepStyled = styled("div", {
|
|
8592
8727
|
fontFamily: "$default",
|
|
8593
8728
|
color: "$gray100",
|
|
@@ -8660,7 +8795,7 @@ var StepListStyled = styled(import_themes16.Tabs.List, {
|
|
|
8660
8795
|
});
|
|
8661
8796
|
function Step(_a) {
|
|
8662
8797
|
var _b = _a, { children, defaultValue } = _b, props = __objRest(_b, ["children", "defaultValue"]);
|
|
8663
|
-
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 })) });
|
|
8664
8799
|
}
|
|
8665
8800
|
function StepTrigger(_a) {
|
|
8666
8801
|
var _b = _a, {
|
|
@@ -8673,7 +8808,7 @@ function StepTrigger(_a) {
|
|
|
8673
8808
|
"currentStep"
|
|
8674
8809
|
]);
|
|
8675
8810
|
const isActiveOrPrevious = currentStep !== void 0 && value <= currentStep;
|
|
8676
|
-
return /* @__PURE__ */ (0,
|
|
8811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
8677
8812
|
StepTriggerStyled,
|
|
8678
8813
|
__spreadProps(__spreadValues({
|
|
8679
8814
|
"data-filled": isActiveOrPrevious,
|
|
@@ -8691,7 +8826,7 @@ function StepContent(_a) {
|
|
|
8691
8826
|
"value",
|
|
8692
8827
|
"children"
|
|
8693
8828
|
]);
|
|
8694
|
-
return /* @__PURE__ */ (0,
|
|
8829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_themes16.Tabs.Content, __spreadProps(__spreadValues({ value: String(value) }, props), { children }));
|
|
8695
8830
|
}
|
|
8696
8831
|
function StepList(_a) {
|
|
8697
8832
|
var _b = _a, {
|
|
@@ -8701,9 +8836,9 @@ function StepList(_a) {
|
|
|
8701
8836
|
"children",
|
|
8702
8837
|
"currentStep"
|
|
8703
8838
|
]);
|
|
8704
|
-
return /* @__PURE__ */ (0,
|
|
8705
|
-
if (
|
|
8706
|
-
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 });
|
|
8707
8842
|
}
|
|
8708
8843
|
return child;
|
|
8709
8844
|
}) }));
|
|
@@ -8714,12 +8849,12 @@ function StepWrapper(_a) {
|
|
|
8714
8849
|
} = _b, props = __objRest(_b, [
|
|
8715
8850
|
"children"
|
|
8716
8851
|
]);
|
|
8717
|
-
return /* @__PURE__ */ (0,
|
|
8852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_themes16.Box, __spreadProps(__spreadValues({}, props), { children }));
|
|
8718
8853
|
}
|
|
8719
8854
|
|
|
8720
8855
|
// src/components/Card.tsx
|
|
8721
8856
|
var import_themes17 = require("@radix-ui/themes");
|
|
8722
|
-
var
|
|
8857
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
8723
8858
|
var CardStyled = styled(import_themes17.Card, {
|
|
8724
8859
|
borderRadius: "$2xl",
|
|
8725
8860
|
border: "1px solid $dark100",
|
|
@@ -8755,13 +8890,13 @@ var CardStyled = styled(import_themes17.Card, {
|
|
|
8755
8890
|
});
|
|
8756
8891
|
function Card(_a) {
|
|
8757
8892
|
var _b = _a, { asChild, children } = _b, props = __objRest(_b, ["asChild", "children"]);
|
|
8758
|
-
return /* @__PURE__ */ (0,
|
|
8893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CardStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
8759
8894
|
}
|
|
8760
8895
|
|
|
8761
8896
|
// src/components/TextareaField.tsx
|
|
8762
8897
|
var import_themes18 = require("@radix-ui/themes");
|
|
8763
|
-
var
|
|
8764
|
-
var
|
|
8898
|
+
var import_react9 = __toESM(require("react"));
|
|
8899
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
8765
8900
|
var TextareaFieldStyle = styled(import_themes18.TextArea, {
|
|
8766
8901
|
display: "flex",
|
|
8767
8902
|
flex: 1,
|
|
@@ -8825,10 +8960,10 @@ var TextareaLimitIndicator = styled("div", {
|
|
|
8825
8960
|
padding: "$4"
|
|
8826
8961
|
}
|
|
8827
8962
|
});
|
|
8828
|
-
var TextareaField =
|
|
8963
|
+
var TextareaField = import_react9.default.forwardRef((_a, fowardedRef) => {
|
|
8829
8964
|
var _b = _a, { maxLength, color } = _b, props = __objRest(_b, ["maxLength", "color"]);
|
|
8830
|
-
const inputRef = (0,
|
|
8831
|
-
const badgeRef = (0,
|
|
8965
|
+
const inputRef = (0, import_react9.useRef)(null);
|
|
8966
|
+
const badgeRef = (0, import_react9.useRef)(null);
|
|
8832
8967
|
const updateCharCountBadge = () => {
|
|
8833
8968
|
var _a2, _b2;
|
|
8834
8969
|
if (!maxLength || !badgeRef.current) return;
|
|
@@ -8840,8 +8975,8 @@ var TextareaField = import_react8.default.forwardRef((_a, fowardedRef) => {
|
|
|
8840
8975
|
updateCharCountBadge();
|
|
8841
8976
|
(_a2 = props.onInput) == null ? void 0 : _a2.call(props, e);
|
|
8842
8977
|
};
|
|
8843
|
-
return /* @__PURE__ */ (0,
|
|
8844
|
-
/* @__PURE__ */ (0,
|
|
8978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(TextareaContainer, { color, children: [
|
|
8979
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
8845
8980
|
TextareaFieldStyle,
|
|
8846
8981
|
__spreadValues({
|
|
8847
8982
|
rows: 4,
|
|
@@ -8859,17 +8994,17 @@ var TextareaField = import_react8.default.forwardRef((_a, fowardedRef) => {
|
|
|
8859
8994
|
maxLength
|
|
8860
8995
|
}, props)
|
|
8861
8996
|
),
|
|
8862
|
-
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 }) })
|
|
8863
8998
|
] });
|
|
8864
8999
|
});
|
|
8865
9000
|
|
|
8866
9001
|
// src/components/Toast/components/ToastItem.tsx
|
|
8867
|
-
var
|
|
9002
|
+
var import_react11 = require("react");
|
|
8868
9003
|
|
|
8869
9004
|
// src/components/Toast/styles/index.ts
|
|
8870
|
-
var
|
|
9005
|
+
var import_react10 = require("@stitches/react");
|
|
8871
9006
|
var ToastPrimitive = __toESM(require("@radix-ui/react-toast"));
|
|
8872
|
-
var slideIn = (0,
|
|
9007
|
+
var slideIn = (0, import_react10.keyframes)({
|
|
8873
9008
|
from: {
|
|
8874
9009
|
transform: "translateX(calc(100% + 25px))",
|
|
8875
9010
|
opacity: 0
|
|
@@ -8879,7 +9014,7 @@ var slideIn = (0, import_react9.keyframes)({
|
|
|
8879
9014
|
opacity: 1
|
|
8880
9015
|
}
|
|
8881
9016
|
});
|
|
8882
|
-
var slideOut = (0,
|
|
9017
|
+
var slideOut = (0, import_react10.keyframes)({
|
|
8883
9018
|
from: {
|
|
8884
9019
|
transform: "translateX(0)",
|
|
8885
9020
|
opacity: 1
|
|
@@ -8889,7 +9024,7 @@ var slideOut = (0, import_react9.keyframes)({
|
|
|
8889
9024
|
opacity: 0
|
|
8890
9025
|
}
|
|
8891
9026
|
});
|
|
8892
|
-
var swipeOut = (0,
|
|
9027
|
+
var swipeOut = (0, import_react10.keyframes)({
|
|
8893
9028
|
from: {
|
|
8894
9029
|
transform: "translateX(var(--radix-toast-swipe-end-x))",
|
|
8895
9030
|
opacity: 1
|
|
@@ -8990,19 +9125,19 @@ var ToastClose = styled(ToastPrimitive.Close, {
|
|
|
8990
9125
|
});
|
|
8991
9126
|
|
|
8992
9127
|
// src/components/Toast/components/ToastItem.tsx
|
|
8993
|
-
var
|
|
9128
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
8994
9129
|
function ToastItem({
|
|
8995
9130
|
toast,
|
|
8996
9131
|
onRemove
|
|
8997
9132
|
}) {
|
|
8998
|
-
const [open, setOpen] = (0,
|
|
9133
|
+
const [open, setOpen] = (0, import_react11.useState)(true);
|
|
8999
9134
|
const handleOpenChange = (open2) => {
|
|
9000
9135
|
setOpen(open2);
|
|
9001
9136
|
if (!open2) {
|
|
9002
9137
|
onRemove(toast.id);
|
|
9003
9138
|
}
|
|
9004
9139
|
};
|
|
9005
|
-
return /* @__PURE__ */ (0,
|
|
9140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
9006
9141
|
ToastRoot,
|
|
9007
9142
|
{
|
|
9008
9143
|
type: toast.type,
|
|
@@ -9010,26 +9145,26 @@ function ToastItem({
|
|
|
9010
9145
|
open,
|
|
9011
9146
|
onOpenChange: handleOpenChange,
|
|
9012
9147
|
children: [
|
|
9013
|
-
(toast == null ? void 0 : toast.icon) && /* @__PURE__ */ (0,
|
|
9014
|
-
/* @__PURE__ */ (0,
|
|
9015
|
-
/* @__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" }) })
|
|
9016
9151
|
]
|
|
9017
9152
|
}
|
|
9018
9153
|
);
|
|
9019
9154
|
}
|
|
9020
9155
|
|
|
9021
9156
|
// src/components/Toast/components/ToastProvider.tsx
|
|
9022
|
-
var
|
|
9157
|
+
var import_react12 = require("react");
|
|
9023
9158
|
var ToastPrimitive2 = __toESM(require("@radix-ui/react-toast"));
|
|
9024
|
-
var
|
|
9025
|
-
var ToastContext = (0,
|
|
9159
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
9160
|
+
var ToastContext = (0, import_react12.createContext)(null);
|
|
9026
9161
|
function ToastProvider({
|
|
9027
9162
|
children,
|
|
9028
9163
|
defaultDuration = 5e3,
|
|
9029
9164
|
maxToasts = 5,
|
|
9030
9165
|
swipeDirection = "right"
|
|
9031
9166
|
}) {
|
|
9032
|
-
const [toasts, setToasts] = (0,
|
|
9167
|
+
const [toasts, setToasts] = (0, import_react12.useState)([]);
|
|
9033
9168
|
const addToast = (toastData) => {
|
|
9034
9169
|
const id = Math.random().toString(36).substr(2, 9);
|
|
9035
9170
|
const newToast = __spreadProps(__spreadValues({
|
|
@@ -9057,17 +9192,17 @@ function ToastProvider({
|
|
|
9057
9192
|
removeToast,
|
|
9058
9193
|
removeAllToasts
|
|
9059
9194
|
};
|
|
9060
|
-
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: [
|
|
9061
9196
|
children,
|
|
9062
|
-
toasts.map((toast) => /* @__PURE__ */ (0,
|
|
9063
|
-
/* @__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, {})
|
|
9064
9199
|
] }) });
|
|
9065
9200
|
}
|
|
9066
9201
|
|
|
9067
9202
|
// src/components/Toast/hooks/useToast.ts
|
|
9068
|
-
var
|
|
9203
|
+
var import_react13 = require("react");
|
|
9069
9204
|
var useToast = () => {
|
|
9070
|
-
const context = (0,
|
|
9205
|
+
const context = (0, import_react13.useContext)(ToastContext);
|
|
9071
9206
|
if (!context) {
|
|
9072
9207
|
throw new Error("useToast deve ser usado dentro de um ToastProvider");
|
|
9073
9208
|
}
|
|
@@ -9076,7 +9211,7 @@ var useToast = () => {
|
|
|
9076
9211
|
|
|
9077
9212
|
// src/components/Tooltip/index.tsx
|
|
9078
9213
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
9079
|
-
var
|
|
9214
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
9080
9215
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
9081
9216
|
var TooltipRoot = TooltipPrimitive.Root;
|
|
9082
9217
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
@@ -9115,18 +9250,18 @@ function Tooltip({
|
|
|
9115
9250
|
delayDuration = 200,
|
|
9116
9251
|
side = "top"
|
|
9117
9252
|
}) {
|
|
9118
|
-
return /* @__PURE__ */ (0,
|
|
9119
|
-
/* @__PURE__ */ (0,
|
|
9120
|
-
/* @__PURE__ */ (0,
|
|
9121
|
-
typeof content === "string" ? /* @__PURE__ */ (0,
|
|
9122
|
-
/* @__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, {})
|
|
9123
9258
|
] })
|
|
9124
9259
|
] }) });
|
|
9125
9260
|
}
|
|
9126
9261
|
|
|
9127
9262
|
// src/components/Grid.tsx
|
|
9128
9263
|
var import_themes19 = require("@radix-ui/themes");
|
|
9129
|
-
var
|
|
9264
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
9130
9265
|
var GridStyled = styled(import_themes19.Grid, {
|
|
9131
9266
|
display: "grid",
|
|
9132
9267
|
variants: {
|
|
@@ -9248,12 +9383,12 @@ var GridStyled = styled(import_themes19.Grid, {
|
|
|
9248
9383
|
});
|
|
9249
9384
|
function Grid(_a) {
|
|
9250
9385
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9251
|
-
return /* @__PURE__ */ (0,
|
|
9386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(GridStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9252
9387
|
}
|
|
9253
9388
|
|
|
9254
9389
|
// src/components/Container.tsx
|
|
9255
9390
|
var import_themes20 = require("@radix-ui/themes");
|
|
9256
|
-
var
|
|
9391
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
9257
9392
|
var ContainerStyled = styled(import_themes20.Container, {
|
|
9258
9393
|
variants: {
|
|
9259
9394
|
size: {
|
|
@@ -9283,12 +9418,12 @@ var ContainerStyled = styled(import_themes20.Container, {
|
|
|
9283
9418
|
});
|
|
9284
9419
|
function Container(_a) {
|
|
9285
9420
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9286
|
-
return /* @__PURE__ */ (0,
|
|
9421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ContainerStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9287
9422
|
}
|
|
9288
9423
|
|
|
9289
9424
|
// src/components/Section.tsx
|
|
9290
9425
|
var import_themes21 = require("@radix-ui/themes");
|
|
9291
|
-
var
|
|
9426
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
9292
9427
|
var SectionStyled = styled(import_themes21.Section, {
|
|
9293
9428
|
variants: {
|
|
9294
9429
|
size: {
|
|
@@ -9312,26 +9447,26 @@ var SectionStyled = styled(import_themes21.Section, {
|
|
|
9312
9447
|
});
|
|
9313
9448
|
function Section(_a) {
|
|
9314
9449
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
9315
|
-
return /* @__PURE__ */ (0,
|
|
9450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SectionStyled, __spreadProps(__spreadValues({}, props), { children }));
|
|
9316
9451
|
}
|
|
9317
9452
|
|
|
9318
9453
|
// src/components/FormFields/ErrorFormMessage.tsx
|
|
9319
9454
|
var import_free_solid_svg_icons2 = require("@fortawesome/free-solid-svg-icons");
|
|
9320
9455
|
var import_react_fontawesome2 = require("@fortawesome/react-fontawesome");
|
|
9321
|
-
var
|
|
9456
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
9322
9457
|
var ErrorFormMessage = ({ message: message2 }) => {
|
|
9323
9458
|
if (!message2) return null;
|
|
9324
9459
|
if (typeof message2 !== "string") {
|
|
9325
9460
|
return null;
|
|
9326
9461
|
}
|
|
9327
|
-
return /* @__PURE__ */ (0,
|
|
9328
|
-
/* @__PURE__ */ (0,
|
|
9329
|
-
/* @__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 })
|
|
9330
9465
|
] });
|
|
9331
9466
|
};
|
|
9332
9467
|
|
|
9333
9468
|
// src/components/FormFields/FormLabel.tsx
|
|
9334
|
-
var
|
|
9469
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
9335
9470
|
var FormLabel = ({
|
|
9336
9471
|
name,
|
|
9337
9472
|
label,
|
|
@@ -9339,7 +9474,7 @@ var FormLabel = ({
|
|
|
9339
9474
|
required
|
|
9340
9475
|
}) => {
|
|
9341
9476
|
if (!label) return null;
|
|
9342
|
-
return /* @__PURE__ */ (0,
|
|
9477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
9343
9478
|
Text,
|
|
9344
9479
|
{
|
|
9345
9480
|
typography: "labelMedium",
|
|
@@ -9348,7 +9483,7 @@ var FormLabel = ({
|
|
|
9348
9483
|
id: `${name}-label`,
|
|
9349
9484
|
children: [
|
|
9350
9485
|
label,
|
|
9351
|
-
!required && /* @__PURE__ */ (0,
|
|
9486
|
+
!required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: "dark500", children: " (opcional)" })
|
|
9352
9487
|
]
|
|
9353
9488
|
}
|
|
9354
9489
|
);
|
|
@@ -9356,7 +9491,7 @@ var FormLabel = ({
|
|
|
9356
9491
|
|
|
9357
9492
|
// src/components/FormFields/TextAreaFormField.tsx
|
|
9358
9493
|
var import_react_hook_form = require("react-hook-form");
|
|
9359
|
-
var
|
|
9494
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
9360
9495
|
var TextAreaFormField = ({
|
|
9361
9496
|
name,
|
|
9362
9497
|
label,
|
|
@@ -9370,8 +9505,8 @@ var TextAreaFormField = ({
|
|
|
9370
9505
|
} = (0, import_react_hook_form.useFormContext)();
|
|
9371
9506
|
const haveError = !!errors[name];
|
|
9372
9507
|
const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
|
|
9373
|
-
return /* @__PURE__ */ (0,
|
|
9374
|
-
/* @__PURE__ */ (0,
|
|
9508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Flex2, { direction: "column", children: [
|
|
9509
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9375
9510
|
FormLabel,
|
|
9376
9511
|
{
|
|
9377
9512
|
name,
|
|
@@ -9380,7 +9515,7 @@ var TextAreaFormField = ({
|
|
|
9380
9515
|
haveError
|
|
9381
9516
|
}
|
|
9382
9517
|
),
|
|
9383
|
-
/* @__PURE__ */ (0,
|
|
9518
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9384
9519
|
TextareaField,
|
|
9385
9520
|
__spreadProps(__spreadValues({}, register(name, { required })), {
|
|
9386
9521
|
placeholder,
|
|
@@ -9388,13 +9523,13 @@ var TextAreaFormField = ({
|
|
|
9388
9523
|
"aria-labelledby": `${name}-label`
|
|
9389
9524
|
})
|
|
9390
9525
|
),
|
|
9391
|
-
/* @__PURE__ */ (0,
|
|
9526
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ErrorFormMessage, { message: errorMsg })
|
|
9392
9527
|
] });
|
|
9393
9528
|
};
|
|
9394
9529
|
|
|
9395
9530
|
// src/components/FormFields/TextFormField.tsx
|
|
9396
9531
|
var import_react_hook_form2 = require("react-hook-form");
|
|
9397
|
-
var
|
|
9532
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
9398
9533
|
var TextFormField = ({
|
|
9399
9534
|
name,
|
|
9400
9535
|
label,
|
|
@@ -9408,8 +9543,8 @@ var TextFormField = ({
|
|
|
9408
9543
|
} = (0, import_react_hook_form2.useFormContext)();
|
|
9409
9544
|
const haveError = !!errors[name];
|
|
9410
9545
|
const errorMsg = (_a = errors[name]) == null ? void 0 : _a.message;
|
|
9411
|
-
return /* @__PURE__ */ (0,
|
|
9412
|
-
/* @__PURE__ */ (0,
|
|
9546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Flex2, { direction: "column", children: [
|
|
9547
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
9413
9548
|
FormLabel,
|
|
9414
9549
|
{
|
|
9415
9550
|
name,
|
|
@@ -9418,7 +9553,7 @@ var TextFormField = ({
|
|
|
9418
9553
|
haveError
|
|
9419
9554
|
}
|
|
9420
9555
|
),
|
|
9421
|
-
/* @__PURE__ */ (0,
|
|
9556
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
9422
9557
|
TextField,
|
|
9423
9558
|
__spreadProps(__spreadValues({}, register(name, { required })), {
|
|
9424
9559
|
placeholder,
|
|
@@ -9426,18 +9561,18 @@ var TextFormField = ({
|
|
|
9426
9561
|
"aria-labelledby": `${name}-label`
|
|
9427
9562
|
})
|
|
9428
9563
|
),
|
|
9429
|
-
/* @__PURE__ */ (0,
|
|
9564
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ErrorFormMessage, { message: errorMsg })
|
|
9430
9565
|
] });
|
|
9431
9566
|
};
|
|
9432
9567
|
|
|
9433
9568
|
// src/components/FormFields/Form.tsx
|
|
9434
9569
|
var import_react_hook_form3 = require("react-hook-form");
|
|
9435
|
-
var
|
|
9570
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
9436
9571
|
var Form = (_a) => {
|
|
9437
9572
|
var _b = _a, { onSubmit, children } = _b, props = __objRest(_b, ["onSubmit", "children"]);
|
|
9438
9573
|
const methods = (0, import_react_hook_form3.useForm)(props);
|
|
9439
9574
|
const { handleSubmit } = methods;
|
|
9440
|
-
return /* @__PURE__ */ (0,
|
|
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 }) }));
|
|
9441
9576
|
};
|
|
9442
9577
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9443
9578
|
0 && (module.exports = {
|
|
@@ -9467,6 +9602,7 @@ var Form = (_a) => {
|
|
|
9467
9602
|
CheckboxItem,
|
|
9468
9603
|
Container,
|
|
9469
9604
|
ContainerStyled,
|
|
9605
|
+
Drawer,
|
|
9470
9606
|
DropdownMenu,
|
|
9471
9607
|
DropdownMenuItem,
|
|
9472
9608
|
ErrorFormMessage,
|
|
@@ -9480,6 +9616,7 @@ var Form = (_a) => {
|
|
|
9480
9616
|
GridStyled,
|
|
9481
9617
|
Icon,
|
|
9482
9618
|
InputStyled,
|
|
9619
|
+
MenuDropdown,
|
|
9483
9620
|
Modal,
|
|
9484
9621
|
RadioGroup,
|
|
9485
9622
|
RadioGroupStyled,
|