@lets-events/react 11.8.1 → 12.1.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.
Files changed (87) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +21 -18
  3. package/CHANGELOG.md +12 -0
  4. package/dist/index.d.mts +139 -11
  5. package/dist/index.d.ts +139 -11
  6. package/dist/index.js +1260 -361
  7. package/dist/index.mjs +1251 -358
  8. package/package.json +7 -2
  9. package/src/components/Alert.tsx +303 -303
  10. package/src/components/Avatar.tsx +55 -55
  11. package/src/components/Badge.tsx +125 -125
  12. package/src/components/Box.tsx +3 -3
  13. package/src/components/Button/index.tsx +16 -16
  14. package/src/components/Button/styledComponents.ts +288 -287
  15. package/src/components/ButtonGroup.tsx +484 -484
  16. package/src/components/Calendar/index.tsx +146 -136
  17. package/src/components/Calendar/styledComponents.ts +250 -209
  18. package/src/components/Card.tsx +48 -48
  19. package/src/components/CheckboxGroup.tsx +176 -176
  20. package/src/components/Container.tsx +39 -39
  21. package/src/components/Drawer/index.tsx +129 -55
  22. package/src/components/Drawer/styledComponents.ts +46 -46
  23. package/src/components/Dropdown.tsx +302 -302
  24. package/src/components/Filter.tsx +164 -164
  25. package/src/components/Flex.tsx +118 -118
  26. package/src/components/FormFields/AddressFormFields/CityFormField.tsx +111 -111
  27. package/src/components/FormFields/AddressFormFields/CountryFormField.tsx +33 -33
  28. package/src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx +39 -39
  29. package/src/components/FormFields/AddressFormFields/StateFormField.tsx +32 -32
  30. package/src/components/FormFields/AddressFormFields/index.tsx +141 -141
  31. package/src/components/FormFields/BirthDateFormField.tsx +84 -84
  32. package/src/components/FormFields/CNPJFormField.tsx +87 -87
  33. package/src/components/FormFields/CPFFormField.tsx +78 -78
  34. package/src/components/FormFields/CalendarFormField.tsx +92 -0
  35. package/src/components/FormFields/CheckboxGroupFormField.tsx +91 -91
  36. package/src/components/FormFields/EmailFormField.tsx +27 -27
  37. package/src/components/FormFields/Form.tsx +39 -39
  38. package/src/components/FormFields/IdentityDocumentNumberFormField.tsx +37 -40
  39. package/src/components/FormFields/MultiSelectFormField.tsx +64 -55
  40. package/src/components/FormFields/PhoneFormField.tsx +40 -40
  41. package/src/components/FormFields/RadioGroupFormField.tsx +84 -84
  42. package/src/components/FormFields/RichEditorFormField.tsx +69 -0
  43. package/src/components/FormFields/SelectFormField.tsx +93 -93
  44. package/src/components/FormFields/TextAreaFormField.tsx +57 -48
  45. package/src/components/FormFields/TextFormField.tsx +112 -112
  46. package/src/components/FormFields/TimePickerFormField.tsx +88 -0
  47. package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
  48. package/src/components/FormFields/subComponents/FormLabel.tsx +29 -29
  49. package/src/components/FormFields/utils/validation.ts +23 -23
  50. package/src/components/Grid.tsx +137 -137
  51. package/src/components/Icon.tsx +47 -47
  52. package/src/components/MenuDropdown/index.tsx +38 -38
  53. package/src/components/MenuDropdown/styledComponents.ts +31 -31
  54. package/src/components/Modal.tsx +90 -90
  55. package/src/components/MultiSelect.tsx +311 -267
  56. package/src/components/RadioGroup.tsx +210 -210
  57. package/src/components/RichEditor/QuillComponent.tsx +413 -0
  58. package/src/components/RichEditor/RichEditor.tsx +38 -0
  59. package/src/components/RichEditor/index.ts +2 -0
  60. package/src/components/RichEditor/styledComponents.ts +62 -0
  61. package/src/components/Section.tsx +33 -33
  62. package/src/components/Step.tsx +164 -164
  63. package/src/components/Switch.tsx +108 -108
  64. package/src/components/Text.tsx +38 -38
  65. package/src/components/TextField.tsx +372 -365
  66. package/src/components/TextareaField.tsx +128 -128
  67. package/src/components/TimePicker.tsx +325 -298
  68. package/src/components/Toast/components/ToastItem.tsx +41 -41
  69. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  70. package/src/components/Toast/hooks/useToast.ts +12 -12
  71. package/src/components/Toast/index.tsx +5 -5
  72. package/src/components/Toast/styles/index.ts +135 -135
  73. package/src/components/Toast/types/index.ts +46 -46
  74. package/src/components/Tooltip/index.tsx +66 -66
  75. package/src/components/Tooltip/styles.ts +77 -77
  76. package/src/hooks/useCountries.ts +41 -41
  77. package/src/hooks/useImageUpload.ts +139 -0
  78. package/src/hooks/useOnClickOutside.tsx +42 -20
  79. package/src/index.tsx +67 -55
  80. package/src/styles/index.ts +38 -38
  81. package/src/types/typographyValues.ts +178 -178
  82. package/src/utils/getNestedValue.ts +3 -3
  83. package/src/utils/states.ts +29 -29
  84. package/src/utils/uploadService.ts +180 -0
  85. package/tsconfig.json +3 -3
  86. package/tsup.config.ts +38 -0
  87. package/dist/index.css +0 -171
@@ -1,90 +1,90 @@
1
- import { ComponentProps } from "react";
2
- import { styled } from "../styles";
3
- import { Dialog as ModalRadix } from "radix-ui";
4
- import Icon from "./Icon";
5
- import { Box } from "./Box";
6
- import { Text } from "./Text";
7
-
8
- const ModalContentStyled = styled(ModalRadix.Content, {
9
- fontFamily: "$default",
10
- lineHeight: "$base",
11
- fontSize: "$13",
12
- maxWidth: "502px",
13
- width: "100%",
14
- border: "1px solid $neutral",
15
- borderRadius: "$2xl",
16
- boxShadow:
17
- "0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)",
18
- position: "fixed",
19
- top: "50%",
20
- left: "50%",
21
- transform: "translate(-50%, -50%)",
22
- backgroundColor: "$dark50",
23
- zIndex: '10001'
24
- });
25
-
26
- const ModalOverlay = styled(ModalRadix.Overlay, {
27
- position: "fixed",
28
- inset: 0,
29
- opacity: 1,
30
- backgroundColor: "rgba(0, 0, 0, .5)",
31
- zIndex: '10000'
32
- });
33
-
34
- const ModalHeaderStyled = styled("div", {
35
- borderBottom: "1px solid $neutral300",
36
- padding: "$18 $24",
37
- textAlign: "center",
38
- position: "relative",
39
- display: "flex",
40
- alignItems: "center",
41
- justifyContent: "center",
42
- });
43
-
44
- const ModalIconClose = styled(Icon, {
45
- position: "absolute",
46
- right: "$24",
47
- cursor: "pointer",
48
- });
49
-
50
- const ModalTitleStyled = styled(ModalRadix.Title, {
51
- fontFamily: "$default",
52
- lineHeight: "$base",
53
- fontSize: "$18",
54
- fontWeight: "medium",
55
- fontStyle: "normal",
56
- textTransform: "uppercase",
57
- });
58
-
59
- export type ModalProps = ComponentProps<typeof ModalRadix.Root> & {
60
- trigger?: React.ReactNode;
61
- title?: string;
62
- children: React.ReactNode;
63
- };
64
-
65
- export function Modal({ children, title, trigger, ...props }: ModalProps) {
66
- return (
67
- <ModalRadix.Root {...props}>
68
- {trigger && <ModalRadix.Trigger asChild>{trigger}</ModalRadix.Trigger>}
69
- <ModalRadix.Portal>
70
- <ModalOverlay>
71
- <ModalContentStyled>
72
- {title && (
73
- <ModalHeaderStyled>
74
- <ModalTitleStyled asChild>
75
- <Text typography={"headline6"} fontWeight={"medium"}>
76
- {title}
77
- </Text>
78
- </ModalTitleStyled>
79
- <ModalRadix.Close asChild>
80
- <ModalIconClose name="close" size="xl" />
81
- </ModalRadix.Close>
82
- </ModalHeaderStyled>
83
- )}
84
- <Box>{children}</Box>
85
- </ModalContentStyled>
86
- </ModalOverlay>
87
- </ModalRadix.Portal>
88
- </ModalRadix.Root>
89
- );
90
- }
1
+ import { ComponentProps } from "react";
2
+ import { styled } from "../styles";
3
+ import { Dialog as ModalRadix } from "radix-ui";
4
+ import Icon from "./Icon";
5
+ import { Box } from "./Box";
6
+ import { Text } from "./Text";
7
+
8
+ const ModalContentStyled = styled(ModalRadix.Content, {
9
+ fontFamily: "$default",
10
+ lineHeight: "$base",
11
+ fontSize: "$13",
12
+ maxWidth: "502px",
13
+ width: "100%",
14
+ border: "1px solid $neutral",
15
+ borderRadius: "$2xl",
16
+ boxShadow:
17
+ "0px 4px 4px 0px rgba(35, 53, 67, 0.08), 0px 2px 4px 0px rgba(35, 53, 67, 0.16)",
18
+ position: "fixed",
19
+ top: "50%",
20
+ left: "50%",
21
+ transform: "translate(-50%, -50%)",
22
+ backgroundColor: "$dark50",
23
+ zIndex: '10001'
24
+ });
25
+
26
+ const ModalOverlay = styled(ModalRadix.Overlay, {
27
+ position: "fixed",
28
+ inset: 0,
29
+ opacity: 1,
30
+ backgroundColor: "rgba(0, 0, 0, .5)",
31
+ zIndex: '10000'
32
+ });
33
+
34
+ const ModalHeaderStyled = styled("div", {
35
+ borderBottom: "1px solid $neutral300",
36
+ padding: "$18 $24",
37
+ textAlign: "center",
38
+ position: "relative",
39
+ display: "flex",
40
+ alignItems: "center",
41
+ justifyContent: "center",
42
+ });
43
+
44
+ const ModalIconClose = styled(Icon, {
45
+ position: "absolute",
46
+ right: "$24",
47
+ cursor: "pointer",
48
+ });
49
+
50
+ const ModalTitleStyled = styled(ModalRadix.Title, {
51
+ fontFamily: "$default",
52
+ lineHeight: "$base",
53
+ fontSize: "$18",
54
+ fontWeight: "medium",
55
+ fontStyle: "normal",
56
+ textTransform: "uppercase",
57
+ });
58
+
59
+ export type ModalProps = ComponentProps<typeof ModalRadix.Root> & {
60
+ trigger?: React.ReactNode;
61
+ title?: string;
62
+ children: React.ReactNode;
63
+ };
64
+
65
+ export function Modal({ children, title, trigger, ...props }: ModalProps) {
66
+ return (
67
+ <ModalRadix.Root {...props}>
68
+ {trigger && <ModalRadix.Trigger asChild>{trigger}</ModalRadix.Trigger>}
69
+ <ModalRadix.Portal>
70
+ <ModalOverlay>
71
+ <ModalContentStyled>
72
+ {title && (
73
+ <ModalHeaderStyled>
74
+ <ModalTitleStyled asChild>
75
+ <Text typography={"headline6"} fontWeight={"medium"}>
76
+ {title}
77
+ </Text>
78
+ </ModalTitleStyled>
79
+ <ModalRadix.Close asChild>
80
+ <ModalIconClose name="close" size="xl" />
81
+ </ModalRadix.Close>
82
+ </ModalHeaderStyled>
83
+ )}
84
+ <Box>{children}</Box>
85
+ </ModalContentStyled>
86
+ </ModalOverlay>
87
+ </ModalRadix.Portal>
88
+ </ModalRadix.Root>
89
+ );
90
+ }