@lets-events/react 11.7.4 → 11.7.5
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 +5 -374
- package/dist/index.d.ts +5 -374
- package/dist/index.js +55 -58
- package/dist/index.mjs +24 -27
- package/package.json +1 -1
- package/src/components/Alert.tsx +303 -303
- package/src/components/Avatar.tsx +55 -55
- package/src/components/Badge.tsx +125 -125
- package/src/components/Box.tsx +3 -3
- package/src/components/Button/index.tsx +16 -16
- package/src/components/Button/styledComponents.ts +287 -287
- 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 +176 -176
- package/src/components/Container.tsx +39 -39
- package/src/components/Drawer/index.tsx +48 -48
- package/src/components/Drawer/styledComponents.ts +46 -46
- package/src/components/Dropdown.tsx +302 -302
- package/src/components/Filter.tsx +164 -164
- package/src/components/Flex.tsx +118 -118
- package/src/components/FormFields/AddressFormFields/CityFormField.tsx +111 -111
- package/src/components/FormFields/AddressFormFields/CountryFormField.tsx +33 -33
- package/src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx +39 -39
- package/src/components/FormFields/AddressFormFields/StateFormField.tsx +32 -32
- package/src/components/FormFields/AddressFormFields/index.tsx +141 -141
- package/src/components/FormFields/BirthDateFormField.tsx +85 -85
- package/src/components/FormFields/CNPJFormField.tsx +87 -87
- package/src/components/FormFields/CPFFormField.tsx +77 -77
- package/src/components/FormFields/CheckboxGroupFormField.tsx +90 -90
- package/src/components/FormFields/EmailFormField.tsx +27 -27
- package/src/components/FormFields/Form.tsx +39 -39
- package/src/components/FormFields/IdentityDocumentNumberFormField.tsx +40 -40
- package/src/components/FormFields/MultiSelectFormField.tsx +55 -55
- package/src/components/FormFields/PhoneFormField.tsx +40 -40
- package/src/components/FormFields/RadioGroupFormField.tsx +84 -84
- package/src/components/FormFields/SelectFormField.tsx +93 -93
- package/src/components/FormFields/TextAreaFormField.tsx +48 -48
- package/src/components/FormFields/TextFormField.tsx +112 -112
- package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
- package/src/components/FormFields/subComponents/FormLabel.tsx +29 -29
- package/src/components/FormFields/utils/validation.ts +23 -23
- package/src/components/Grid.tsx +137 -137
- package/src/components/Icon.tsx +47 -47
- package/src/components/MenuDropdown/index.tsx +30 -30
- package/src/components/MenuDropdown/styledComponents.ts +31 -31
- package/src/components/Modal.tsx +90 -90
- package/src/components/MultiSelect.tsx +218 -218
- 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 +38 -38
- package/src/components/TextField.tsx +316 -316
- 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/useCountries.ts +41 -41
- package/src/hooks/useOnClickOutside.tsx +20 -20
- package/src/index.tsx +54 -54
- package/src/styles/index.ts +38 -38
- package/src/types/typographyValues.ts +178 -178
- package/src/utils/getNestedValue.ts +3 -3
- package/src/utils/states.ts +29 -29
- package/tsconfig.json +3 -3
- package/dist/index.css +0 -171
package/dist/index.js
CHANGED
|
@@ -3844,9 +3844,6 @@ function Modal(_a) {
|
|
|
3844
3844
|
] }));
|
|
3845
3845
|
}
|
|
3846
3846
|
|
|
3847
|
-
// src/components/MenuDropdown/index.tsx
|
|
3848
|
-
var import_react5 = require("react");
|
|
3849
|
-
|
|
3850
3847
|
// src/components/MenuDropdown/styledComponents.ts
|
|
3851
3848
|
var MenuDropdownContainerStyled = styled("div", {
|
|
3852
3849
|
position: "relative",
|
|
@@ -3880,24 +3877,24 @@ var MenuItemsContainerStyled = styled("div", {
|
|
|
3880
3877
|
|
|
3881
3878
|
// src/components/MenuDropdown/index.tsx
|
|
3882
3879
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3883
|
-
function MenuDropdown({
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3880
|
+
function MenuDropdown({
|
|
3881
|
+
children,
|
|
3882
|
+
isOpen,
|
|
3883
|
+
setIsOpen
|
|
3884
|
+
}) {
|
|
3888
3885
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(MenuDropdownContainerStyled, { children: [
|
|
3889
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TriggerButtonStyled, { onClick:
|
|
3886
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TriggerButtonStyled, { onClick: () => setIsOpen(!isOpen), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon_default, { name: "ellipsis", size: "xl", color: "#FFFFFF" }) }),
|
|
3890
3887
|
isOpen && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuItemsContainerStyled, { children })
|
|
3891
3888
|
] });
|
|
3892
3889
|
}
|
|
3893
3890
|
|
|
3894
3891
|
// src/components/Calendar/index.tsx
|
|
3895
|
-
var
|
|
3892
|
+
var import_react6 = require("react");
|
|
3896
3893
|
|
|
3897
3894
|
// src/hooks/useOnClickOutside.tsx
|
|
3898
|
-
var
|
|
3895
|
+
var import_react5 = require("react");
|
|
3899
3896
|
function useOnClickOutside(ref, handler) {
|
|
3900
|
-
(0,
|
|
3897
|
+
(0, import_react5.useEffect)(() => {
|
|
3901
3898
|
const listener = (event) => {
|
|
3902
3899
|
if (!ref.current || ref.current.contains(event.target)) {
|
|
3903
3900
|
return;
|
|
@@ -8034,15 +8031,15 @@ function Calendar(_a) {
|
|
|
8034
8031
|
"setSelected",
|
|
8035
8032
|
"position"
|
|
8036
8033
|
]);
|
|
8037
|
-
const [inputValue, setInputValue] = (0,
|
|
8038
|
-
const [showContainer, setShowCalendar] = (0,
|
|
8039
|
-
const dropdownRef = (0,
|
|
8034
|
+
const [inputValue, setInputValue] = (0, import_react6.useState)("");
|
|
8035
|
+
const [showContainer, setShowCalendar] = (0, import_react6.useState)(false);
|
|
8036
|
+
const dropdownRef = (0, import_react6.useRef)(null);
|
|
8040
8037
|
useOnClickOutside(dropdownRef, () => {
|
|
8041
8038
|
setShowCalendar(false);
|
|
8042
8039
|
});
|
|
8043
8040
|
const today = /* @__PURE__ */ new Date();
|
|
8044
8041
|
const maxDate = addYears(today, 20);
|
|
8045
|
-
(0,
|
|
8042
|
+
(0, import_react6.useEffect)(() => {
|
|
8046
8043
|
if (selected) {
|
|
8047
8044
|
setInputValue(format2(selected, "dd/MM/yyyy"));
|
|
8048
8045
|
} else {
|
|
@@ -8192,7 +8189,7 @@ function Drawer({
|
|
|
8192
8189
|
}
|
|
8193
8190
|
|
|
8194
8191
|
// src/components/TimePicker.tsx
|
|
8195
|
-
var
|
|
8192
|
+
var import_react7 = require("react");
|
|
8196
8193
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
8197
8194
|
var TimePickerStyled = styled("div", {
|
|
8198
8195
|
position: "relative",
|
|
@@ -8296,14 +8293,14 @@ function TimePicker({
|
|
|
8296
8293
|
setSelected,
|
|
8297
8294
|
position = "bottom"
|
|
8298
8295
|
}) {
|
|
8299
|
-
const [hours, setHours] = (0,
|
|
8300
|
-
const [minutes, setMinutes] = (0,
|
|
8301
|
-
const [rawHours, setRawHours] = (0,
|
|
8302
|
-
const [rawMinutes, setRawMinutes] = (0,
|
|
8303
|
-
const [isOpen, setIsOpen] = (0,
|
|
8304
|
-
const dropdownRef = (0,
|
|
8296
|
+
const [hours, setHours] = (0, import_react7.useState)("00");
|
|
8297
|
+
const [minutes, setMinutes] = (0, import_react7.useState)("00");
|
|
8298
|
+
const [rawHours, setRawHours] = (0, import_react7.useState)("00");
|
|
8299
|
+
const [rawMinutes, setRawMinutes] = (0, import_react7.useState)("00");
|
|
8300
|
+
const [isOpen, setIsOpen] = (0, import_react7.useState)(false);
|
|
8301
|
+
const dropdownRef = (0, import_react7.useRef)(null);
|
|
8305
8302
|
useOnClickOutside(dropdownRef, () => setIsOpen(false));
|
|
8306
|
-
const handleIncrement = (0,
|
|
8303
|
+
const handleIncrement = (0, import_react7.useCallback)(
|
|
8307
8304
|
(type) => {
|
|
8308
8305
|
if (type === "hours") {
|
|
8309
8306
|
const next = (parseInt(hours) + 1) % 24;
|
|
@@ -8317,7 +8314,7 @@ function TimePicker({
|
|
|
8317
8314
|
},
|
|
8318
8315
|
[hours, minutes]
|
|
8319
8316
|
);
|
|
8320
|
-
const handleDecrement = (0,
|
|
8317
|
+
const handleDecrement = (0, import_react7.useCallback)(
|
|
8321
8318
|
(type) => {
|
|
8322
8319
|
if (type === "hours") {
|
|
8323
8320
|
const prev = (parseInt(hours) - 1 + 24) % 24;
|
|
@@ -8839,7 +8836,7 @@ function Switch(props) {
|
|
|
8839
8836
|
}
|
|
8840
8837
|
|
|
8841
8838
|
// src/components/Step.tsx
|
|
8842
|
-
var
|
|
8839
|
+
var import_react8 = __toESM(require("react"));
|
|
8843
8840
|
var import_themes15 = require("@radix-ui/themes");
|
|
8844
8841
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
8845
8842
|
var StepStyled = styled("div", {
|
|
@@ -8955,9 +8952,9 @@ function StepList(_a) {
|
|
|
8955
8952
|
"children",
|
|
8956
8953
|
"currentStep"
|
|
8957
8954
|
]);
|
|
8958
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StepListStyled, __spreadProps(__spreadValues({}, props), { children:
|
|
8959
|
-
if (
|
|
8960
|
-
return
|
|
8955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StepListStyled, __spreadProps(__spreadValues({}, props), { children: import_react8.default.Children.map(children, (child) => {
|
|
8956
|
+
if (import_react8.default.isValidElement(child) && child.type === StepTrigger) {
|
|
8957
|
+
return import_react8.default.cloneElement(child, { currentStep });
|
|
8961
8958
|
}
|
|
8962
8959
|
return child;
|
|
8963
8960
|
}) }));
|
|
@@ -9014,7 +9011,7 @@ function Card(_a) {
|
|
|
9014
9011
|
|
|
9015
9012
|
// src/components/TextareaField.tsx
|
|
9016
9013
|
var import_themes17 = require("@radix-ui/themes");
|
|
9017
|
-
var
|
|
9014
|
+
var import_react9 = __toESM(require("react"));
|
|
9018
9015
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
9019
9016
|
var TextareaFieldStyle = styled(import_themes17.TextArea, {
|
|
9020
9017
|
display: "flex",
|
|
@@ -9079,10 +9076,10 @@ var TextareaLimitIndicator = styled("div", {
|
|
|
9079
9076
|
padding: "$4"
|
|
9080
9077
|
}
|
|
9081
9078
|
});
|
|
9082
|
-
var TextareaField =
|
|
9079
|
+
var TextareaField = import_react9.default.forwardRef((_a, fowardedRef) => {
|
|
9083
9080
|
var _b = _a, { maxLength, color } = _b, props = __objRest(_b, ["maxLength", "color"]);
|
|
9084
|
-
const inputRef = (0,
|
|
9085
|
-
const badgeRef = (0,
|
|
9081
|
+
const inputRef = (0, import_react9.useRef)(null);
|
|
9082
|
+
const badgeRef = (0, import_react9.useRef)(null);
|
|
9086
9083
|
const updateCharCountBadge = () => {
|
|
9087
9084
|
var _a2, _b2;
|
|
9088
9085
|
if (!maxLength || !badgeRef.current) return;
|
|
@@ -9118,12 +9115,12 @@ var TextareaField = import_react10.default.forwardRef((_a, fowardedRef) => {
|
|
|
9118
9115
|
});
|
|
9119
9116
|
|
|
9120
9117
|
// src/components/Toast/components/ToastItem.tsx
|
|
9121
|
-
var
|
|
9118
|
+
var import_react11 = require("react");
|
|
9122
9119
|
|
|
9123
9120
|
// src/components/Toast/styles/index.ts
|
|
9124
|
-
var
|
|
9121
|
+
var import_react10 = require("@stitches/react");
|
|
9125
9122
|
var ToastPrimitive = __toESM(require("@radix-ui/react-toast"));
|
|
9126
|
-
var slideIn = (0,
|
|
9123
|
+
var slideIn = (0, import_react10.keyframes)({
|
|
9127
9124
|
from: {
|
|
9128
9125
|
transform: "translateX(calc(100% + 25px))",
|
|
9129
9126
|
opacity: 0
|
|
@@ -9133,7 +9130,7 @@ var slideIn = (0, import_react11.keyframes)({
|
|
|
9133
9130
|
opacity: 1
|
|
9134
9131
|
}
|
|
9135
9132
|
});
|
|
9136
|
-
var slideOut = (0,
|
|
9133
|
+
var slideOut = (0, import_react10.keyframes)({
|
|
9137
9134
|
from: {
|
|
9138
9135
|
transform: "translateX(0)",
|
|
9139
9136
|
opacity: 1
|
|
@@ -9143,7 +9140,7 @@ var slideOut = (0, import_react11.keyframes)({
|
|
|
9143
9140
|
opacity: 0
|
|
9144
9141
|
}
|
|
9145
9142
|
});
|
|
9146
|
-
var swipeOut = (0,
|
|
9143
|
+
var swipeOut = (0, import_react10.keyframes)({
|
|
9147
9144
|
from: {
|
|
9148
9145
|
transform: "translateX(var(--radix-toast-swipe-end-x))",
|
|
9149
9146
|
opacity: 1
|
|
@@ -9249,7 +9246,7 @@ function ToastItem({
|
|
|
9249
9246
|
toast,
|
|
9250
9247
|
onRemove
|
|
9251
9248
|
}) {
|
|
9252
|
-
const [open, setOpen] = (0,
|
|
9249
|
+
const [open, setOpen] = (0, import_react11.useState)(true);
|
|
9253
9250
|
const handleOpenChange = (open2) => {
|
|
9254
9251
|
setOpen(open2);
|
|
9255
9252
|
if (!open2) {
|
|
@@ -9273,17 +9270,17 @@ function ToastItem({
|
|
|
9273
9270
|
}
|
|
9274
9271
|
|
|
9275
9272
|
// src/components/Toast/components/ToastProvider.tsx
|
|
9276
|
-
var
|
|
9273
|
+
var import_react12 = require("react");
|
|
9277
9274
|
var ToastPrimitive2 = __toESM(require("@radix-ui/react-toast"));
|
|
9278
9275
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
9279
|
-
var ToastContext = (0,
|
|
9276
|
+
var ToastContext = (0, import_react12.createContext)(null);
|
|
9280
9277
|
function ToastProvider({
|
|
9281
9278
|
children,
|
|
9282
9279
|
defaultDuration = 5e3,
|
|
9283
9280
|
maxToasts = 5,
|
|
9284
9281
|
swipeDirection = "right"
|
|
9285
9282
|
}) {
|
|
9286
|
-
const [toasts, setToasts] = (0,
|
|
9283
|
+
const [toasts, setToasts] = (0, import_react12.useState)([]);
|
|
9287
9284
|
const addToast = (toastData) => {
|
|
9288
9285
|
const id = Math.random().toString(36).substr(2, 9);
|
|
9289
9286
|
const newToast = __spreadProps(__spreadValues({
|
|
@@ -9319,9 +9316,9 @@ function ToastProvider({
|
|
|
9319
9316
|
}
|
|
9320
9317
|
|
|
9321
9318
|
// src/components/Toast/hooks/useToast.ts
|
|
9322
|
-
var
|
|
9319
|
+
var import_react13 = require("react");
|
|
9323
9320
|
var useToast = () => {
|
|
9324
|
-
const context = (0,
|
|
9321
|
+
const context = (0, import_react13.useContext)(ToastContext);
|
|
9325
9322
|
if (!context) {
|
|
9326
9323
|
throw new Error("useToast deve ser usado dentro de um ToastProvider");
|
|
9327
9324
|
}
|
|
@@ -9382,8 +9379,8 @@ function Tooltip({
|
|
|
9382
9379
|
var import_themes18 = require("@radix-ui/themes");
|
|
9383
9380
|
var import_react_fontawesome3 = require("@fortawesome/react-fontawesome");
|
|
9384
9381
|
var import_free_solid_svg_icons3 = require("@fortawesome/free-solid-svg-icons");
|
|
9385
|
-
var
|
|
9386
|
-
var
|
|
9382
|
+
var import_react14 = require("react");
|
|
9383
|
+
var import_react15 = __toESM(require("react"));
|
|
9387
9384
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
9388
9385
|
var StyledContent = styled(import_themes18.DropdownMenu.Content, {
|
|
9389
9386
|
backgroundColor: "$dark50",
|
|
@@ -9447,7 +9444,7 @@ var BadgeCloseBtn = styled("div", {
|
|
|
9447
9444
|
backgroundColor: "$dark600"
|
|
9448
9445
|
}
|
|
9449
9446
|
});
|
|
9450
|
-
var MultiSelect =
|
|
9447
|
+
var MultiSelect = import_react15.default.forwardRef(
|
|
9451
9448
|
({
|
|
9452
9449
|
placeholder,
|
|
9453
9450
|
value: selectedValues = [],
|
|
@@ -9458,16 +9455,16 @@ var MultiSelect = import_react16.default.forwardRef(
|
|
|
9458
9455
|
zIndex = "auto"
|
|
9459
9456
|
}, fowardedRef) => {
|
|
9460
9457
|
var _a;
|
|
9461
|
-
const [isOpen, setIsOpen] = (0,
|
|
9462
|
-
const triggerRef = (0,
|
|
9463
|
-
const labelByValue = (0,
|
|
9458
|
+
const [isOpen, setIsOpen] = (0, import_react14.useState)(false);
|
|
9459
|
+
const triggerRef = (0, import_react14.useRef)(null);
|
|
9460
|
+
const labelByValue = (0, import_react14.useMemo)(() => {
|
|
9464
9461
|
return options.reduce((prev, curr) => {
|
|
9465
9462
|
return __spreadProps(__spreadValues({}, prev), {
|
|
9466
9463
|
[curr.value]: curr.label
|
|
9467
9464
|
});
|
|
9468
9465
|
}, {});
|
|
9469
9466
|
}, [options]);
|
|
9470
|
-
const handleRemove = (0,
|
|
9467
|
+
const handleRemove = (0, import_react14.useCallback)(
|
|
9471
9468
|
(value) => {
|
|
9472
9469
|
const newValue = selectedValues.filter((v) => v !== value);
|
|
9473
9470
|
onValueChange == null ? void 0 : onValueChange(newValue);
|
|
@@ -9820,7 +9817,7 @@ var TextAreaFormField = (_a) => {
|
|
|
9820
9817
|
|
|
9821
9818
|
// src/components/FormFields/TextFormField.tsx
|
|
9822
9819
|
var import_react_hook_form2 = require("react-hook-form");
|
|
9823
|
-
var
|
|
9820
|
+
var import_react16 = require("react");
|
|
9824
9821
|
var import_mask2 = require("@react-input/mask");
|
|
9825
9822
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
9826
9823
|
var TextFormField = (_a) => {
|
|
@@ -9843,7 +9840,7 @@ var TextFormField = (_a) => {
|
|
|
9843
9840
|
"onChange",
|
|
9844
9841
|
"valueFormatter"
|
|
9845
9842
|
]);
|
|
9846
|
-
const handleValidate = (0,
|
|
9843
|
+
const handleValidate = (0, import_react16.useCallback)(
|
|
9847
9844
|
(value) => {
|
|
9848
9845
|
var _a2;
|
|
9849
9846
|
if (value === void 0 || value === null || !required && value.trim() === "")
|
|
@@ -9865,7 +9862,7 @@ var TextFormField = (_a) => {
|
|
|
9865
9862
|
const haveError = !!fieldError;
|
|
9866
9863
|
const errorMsg = fieldError == null ? void 0 : fieldError.message;
|
|
9867
9864
|
const { value: formValue, onChange: formChange } = field;
|
|
9868
|
-
const formattedValue = (0,
|
|
9865
|
+
const formattedValue = (0, import_react16.useMemo)(() => {
|
|
9869
9866
|
let value = formValue;
|
|
9870
9867
|
if (valueFormatter) value = valueFormatter.format(value);
|
|
9871
9868
|
if (mask) value = (0, import_mask2.format)(value != null ? value : "", mask);
|
|
@@ -10455,7 +10452,7 @@ function StateFormField({
|
|
|
10455
10452
|
}
|
|
10456
10453
|
|
|
10457
10454
|
// src/components/FormFields/AddressFormFields/CityFormField.tsx
|
|
10458
|
-
var
|
|
10455
|
+
var import_react17 = require("react");
|
|
10459
10456
|
var import_react_hook_form7 = require("react-hook-form");
|
|
10460
10457
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
10461
10458
|
function CityFormField({
|
|
@@ -10468,9 +10465,9 @@ function CityFormField({
|
|
|
10468
10465
|
}) {
|
|
10469
10466
|
const { control, watch } = (0, import_react_hook_form7.useFormContext)();
|
|
10470
10467
|
const selectedState = watch(stateName);
|
|
10471
|
-
const [cities, setCities] = (0,
|
|
10472
|
-
const [loading, setLoading] = (0,
|
|
10473
|
-
(0,
|
|
10468
|
+
const [cities, setCities] = (0, import_react17.useState)([]);
|
|
10469
|
+
const [loading, setLoading] = (0, import_react17.useState)(false);
|
|
10470
|
+
(0, import_react17.useEffect)(() => {
|
|
10474
10471
|
if (!isBrazil) {
|
|
10475
10472
|
setCities([]);
|
|
10476
10473
|
return;
|
package/dist/index.mjs
CHANGED
|
@@ -3741,9 +3741,6 @@ function Modal(_a) {
|
|
|
3741
3741
|
] }));
|
|
3742
3742
|
}
|
|
3743
3743
|
|
|
3744
|
-
// src/components/MenuDropdown/index.tsx
|
|
3745
|
-
import { useState as useState2 } from "react";
|
|
3746
|
-
|
|
3747
3744
|
// src/components/MenuDropdown/styledComponents.ts
|
|
3748
3745
|
var MenuDropdownContainerStyled = styled("div", {
|
|
3749
3746
|
position: "relative",
|
|
@@ -3777,19 +3774,19 @@ var MenuItemsContainerStyled = styled("div", {
|
|
|
3777
3774
|
|
|
3778
3775
|
// src/components/MenuDropdown/index.tsx
|
|
3779
3776
|
import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3780
|
-
function MenuDropdown({
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3777
|
+
function MenuDropdown({
|
|
3778
|
+
children,
|
|
3779
|
+
isOpen,
|
|
3780
|
+
setIsOpen
|
|
3781
|
+
}) {
|
|
3785
3782
|
return /* @__PURE__ */ jsxs5(MenuDropdownContainerStyled, { children: [
|
|
3786
|
-
/* @__PURE__ */ jsx14(TriggerButtonStyled, { onClick:
|
|
3783
|
+
/* @__PURE__ */ jsx14(TriggerButtonStyled, { onClick: () => setIsOpen(!isOpen), children: /* @__PURE__ */ jsx14(Icon_default, { name: "ellipsis", size: "xl", color: "#FFFFFF" }) }),
|
|
3787
3784
|
isOpen && /* @__PURE__ */ jsx14(MenuItemsContainerStyled, { children })
|
|
3788
3785
|
] });
|
|
3789
3786
|
}
|
|
3790
3787
|
|
|
3791
3788
|
// src/components/Calendar/index.tsx
|
|
3792
|
-
import { useRef as useRef2, useEffect as useEffect3, useState as
|
|
3789
|
+
import { useRef as useRef2, useEffect as useEffect3, useState as useState2 } from "react";
|
|
3793
3790
|
|
|
3794
3791
|
// src/hooks/useOnClickOutside.tsx
|
|
3795
3792
|
import { useEffect as useEffect2 } from "react";
|
|
@@ -7931,8 +7928,8 @@ function Calendar(_a) {
|
|
|
7931
7928
|
"setSelected",
|
|
7932
7929
|
"position"
|
|
7933
7930
|
]);
|
|
7934
|
-
const [inputValue, setInputValue] =
|
|
7935
|
-
const [showContainer, setShowCalendar] =
|
|
7931
|
+
const [inputValue, setInputValue] = useState2("");
|
|
7932
|
+
const [showContainer, setShowCalendar] = useState2(false);
|
|
7936
7933
|
const dropdownRef = useRef2(null);
|
|
7937
7934
|
useOnClickOutside(dropdownRef, () => {
|
|
7938
7935
|
setShowCalendar(false);
|
|
@@ -8089,7 +8086,7 @@ function Drawer({
|
|
|
8089
8086
|
}
|
|
8090
8087
|
|
|
8091
8088
|
// src/components/TimePicker.tsx
|
|
8092
|
-
import { useCallback, useRef as useRef3, useState as
|
|
8089
|
+
import { useCallback, useRef as useRef3, useState as useState3 } from "react";
|
|
8093
8090
|
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
8094
8091
|
var TimePickerStyled = styled("div", {
|
|
8095
8092
|
position: "relative",
|
|
@@ -8193,11 +8190,11 @@ function TimePicker({
|
|
|
8193
8190
|
setSelected,
|
|
8194
8191
|
position = "bottom"
|
|
8195
8192
|
}) {
|
|
8196
|
-
const [hours, setHours] =
|
|
8197
|
-
const [minutes, setMinutes] =
|
|
8198
|
-
const [rawHours, setRawHours] =
|
|
8199
|
-
const [rawMinutes, setRawMinutes] =
|
|
8200
|
-
const [isOpen, setIsOpen] =
|
|
8193
|
+
const [hours, setHours] = useState3("00");
|
|
8194
|
+
const [minutes, setMinutes] = useState3("00");
|
|
8195
|
+
const [rawHours, setRawHours] = useState3("00");
|
|
8196
|
+
const [rawMinutes, setRawMinutes] = useState3("00");
|
|
8197
|
+
const [isOpen, setIsOpen] = useState3(false);
|
|
8201
8198
|
const dropdownRef = useRef3(null);
|
|
8202
8199
|
useOnClickOutside(dropdownRef, () => setIsOpen(false));
|
|
8203
8200
|
const handleIncrement = useCallback(
|
|
@@ -9015,7 +9012,7 @@ var TextareaField = React7.forwardRef((_a, fowardedRef) => {
|
|
|
9015
9012
|
});
|
|
9016
9013
|
|
|
9017
9014
|
// src/components/Toast/components/ToastItem.tsx
|
|
9018
|
-
import { useState as
|
|
9015
|
+
import { useState as useState4 } from "react";
|
|
9019
9016
|
|
|
9020
9017
|
// src/components/Toast/styles/index.ts
|
|
9021
9018
|
import { keyframes as keyframes2 } from "@stitches/react";
|
|
@@ -9146,7 +9143,7 @@ function ToastItem({
|
|
|
9146
9143
|
toast,
|
|
9147
9144
|
onRemove
|
|
9148
9145
|
}) {
|
|
9149
|
-
const [open, setOpen] =
|
|
9146
|
+
const [open, setOpen] = useState4(true);
|
|
9150
9147
|
const handleOpenChange = (open2) => {
|
|
9151
9148
|
setOpen(open2);
|
|
9152
9149
|
if (!open2) {
|
|
@@ -9170,7 +9167,7 @@ function ToastItem({
|
|
|
9170
9167
|
}
|
|
9171
9168
|
|
|
9172
9169
|
// src/components/Toast/components/ToastProvider.tsx
|
|
9173
|
-
import { createContext, useState as
|
|
9170
|
+
import { createContext, useState as useState5 } from "react";
|
|
9174
9171
|
import * as ToastPrimitive2 from "@radix-ui/react-toast";
|
|
9175
9172
|
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
9176
9173
|
var ToastContext = createContext(null);
|
|
@@ -9180,7 +9177,7 @@ function ToastProvider({
|
|
|
9180
9177
|
maxToasts = 5,
|
|
9181
9178
|
swipeDirection = "right"
|
|
9182
9179
|
}) {
|
|
9183
|
-
const [toasts, setToasts] =
|
|
9180
|
+
const [toasts, setToasts] = useState5([]);
|
|
9184
9181
|
const addToast = (toastData) => {
|
|
9185
9182
|
const id = Math.random().toString(36).substr(2, 9);
|
|
9186
9183
|
const newToast = __spreadProps(__spreadValues({
|
|
@@ -9283,7 +9280,7 @@ import {
|
|
|
9283
9280
|
faChevronUp as faChevronUp2,
|
|
9284
9281
|
faX
|
|
9285
9282
|
} from "@fortawesome/free-solid-svg-icons";
|
|
9286
|
-
import { useCallback as useCallback2, useMemo, useRef as useRef5, useState as
|
|
9283
|
+
import { useCallback as useCallback2, useMemo, useRef as useRef5, useState as useState6 } from "react";
|
|
9287
9284
|
import React8 from "react";
|
|
9288
9285
|
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
9289
9286
|
var StyledContent = styled(DropdownMenu3.Content, {
|
|
@@ -9359,7 +9356,7 @@ var MultiSelect = React8.forwardRef(
|
|
|
9359
9356
|
zIndex = "auto"
|
|
9360
9357
|
}, fowardedRef) => {
|
|
9361
9358
|
var _a;
|
|
9362
|
-
const [isOpen, setIsOpen] =
|
|
9359
|
+
const [isOpen, setIsOpen] = useState6(false);
|
|
9363
9360
|
const triggerRef = useRef5(null);
|
|
9364
9361
|
const labelByValue = useMemo(() => {
|
|
9365
9362
|
return options.reduce((prev, curr) => {
|
|
@@ -10361,7 +10358,7 @@ function StateFormField({
|
|
|
10361
10358
|
}
|
|
10362
10359
|
|
|
10363
10360
|
// src/components/FormFields/AddressFormFields/CityFormField.tsx
|
|
10364
|
-
import { useEffect as useEffect4, useState as
|
|
10361
|
+
import { useEffect as useEffect4, useState as useState7 } from "react";
|
|
10365
10362
|
import { useFormContext as useFormContext6, Controller as Controller2 } from "react-hook-form";
|
|
10366
10363
|
import { Fragment as Fragment3, jsx as jsx45 } from "react/jsx-runtime";
|
|
10367
10364
|
function CityFormField({
|
|
@@ -10374,8 +10371,8 @@ function CityFormField({
|
|
|
10374
10371
|
}) {
|
|
10375
10372
|
const { control, watch } = useFormContext6();
|
|
10376
10373
|
const selectedState = watch(stateName);
|
|
10377
|
-
const [cities, setCities] =
|
|
10378
|
-
const [loading, setLoading] =
|
|
10374
|
+
const [cities, setCities] = useState7([]);
|
|
10375
|
+
const [loading, setLoading] = useState7(false);
|
|
10379
10376
|
useEffect4(() => {
|
|
10380
10377
|
if (!isBrazil) {
|
|
10381
10378
|
setCities([]);
|