@lets-events/react 11.7.10 → 11.8.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 (77) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +18 -20
  3. package/CHANGELOG.md +3 -3
  4. package/dist/index.css +171 -0
  5. package/dist/index.d.mts +2 -0
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.js +104 -76
  8. package/dist/index.mjs +110 -82
  9. package/package.json +1 -1
  10. package/src/components/Alert.tsx +303 -303
  11. package/src/components/Avatar.tsx +55 -55
  12. package/src/components/Badge.tsx +125 -125
  13. package/src/components/Box.tsx +3 -3
  14. package/src/components/Button/index.tsx +16 -16
  15. package/src/components/Button/styledComponents.ts +287 -287
  16. package/src/components/ButtonGroup.tsx +484 -484
  17. package/src/components/Calendar/index.tsx +136 -136
  18. package/src/components/Calendar/styledComponents.ts +209 -209
  19. package/src/components/Card.tsx +48 -48
  20. package/src/components/CheckboxGroup.tsx +176 -176
  21. package/src/components/Container.tsx +39 -39
  22. package/src/components/Drawer/index.tsx +55 -55
  23. package/src/components/Drawer/styledComponents.ts +46 -46
  24. package/src/components/Dropdown.tsx +302 -302
  25. package/src/components/Filter.tsx +164 -164
  26. package/src/components/Flex.tsx +118 -118
  27. package/src/components/FormFields/AddressFormFields/CityFormField.tsx +111 -111
  28. package/src/components/FormFields/AddressFormFields/CountryFormField.tsx +33 -33
  29. package/src/components/FormFields/AddressFormFields/PostalCodeFormField.tsx +39 -39
  30. package/src/components/FormFields/AddressFormFields/StateFormField.tsx +32 -32
  31. package/src/components/FormFields/AddressFormFields/index.tsx +141 -141
  32. package/src/components/FormFields/BirthDateFormField.tsx +84 -84
  33. package/src/components/FormFields/CNPJFormField.tsx +87 -87
  34. package/src/components/FormFields/CPFFormField.tsx +78 -78
  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 +40 -40
  39. package/src/components/FormFields/MultiSelectFormField.tsx +55 -55
  40. package/src/components/FormFields/PhoneFormField.tsx +40 -40
  41. package/src/components/FormFields/RadioGroupFormField.tsx +84 -84
  42. package/src/components/FormFields/SelectFormField.tsx +93 -93
  43. package/src/components/FormFields/TextAreaFormField.tsx +48 -48
  44. package/src/components/FormFields/TextFormField.tsx +112 -112
  45. package/src/components/FormFields/subComponents/ErrorFormMessage.tsx +36 -36
  46. package/src/components/FormFields/subComponents/FormLabel.tsx +29 -29
  47. package/src/components/FormFields/utils/validation.ts +23 -23
  48. package/src/components/Grid.tsx +137 -137
  49. package/src/components/Icon.tsx +47 -47
  50. package/src/components/MenuDropdown/index.tsx +38 -38
  51. package/src/components/MenuDropdown/styledComponents.ts +31 -31
  52. package/src/components/Modal.tsx +90 -90
  53. package/src/components/MultiSelect.tsx +252 -218
  54. package/src/components/RadioGroup.tsx +210 -210
  55. package/src/components/Section.tsx +33 -33
  56. package/src/components/Step.tsx +164 -164
  57. package/src/components/Switch.tsx +108 -108
  58. package/src/components/Text.tsx +38 -38
  59. package/src/components/TextField.tsx +365 -365
  60. package/src/components/TextareaField.tsx +128 -128
  61. package/src/components/TimePicker.tsx +298 -298
  62. package/src/components/Toast/components/ToastItem.tsx +41 -41
  63. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  64. package/src/components/Toast/hooks/useToast.ts +12 -12
  65. package/src/components/Toast/index.tsx +5 -5
  66. package/src/components/Toast/styles/index.ts +135 -135
  67. package/src/components/Toast/types/index.ts +46 -46
  68. package/src/components/Tooltip/index.tsx +66 -66
  69. package/src/components/Tooltip/styles.ts +77 -77
  70. package/src/hooks/useCountries.ts +41 -41
  71. package/src/hooks/useOnClickOutside.tsx +20 -20
  72. package/src/index.tsx +54 -54
  73. package/src/styles/index.ts +38 -38
  74. package/src/types/typographyValues.ts +178 -178
  75. package/src/utils/getNestedValue.ts +3 -3
  76. package/src/utils/states.ts +29 -29
  77. package/tsconfig.json +3 -3
@@ -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
+ }
@@ -1,218 +1,252 @@
1
- import { DropdownMenu, Theme } from "@radix-ui/themes";
2
- import { Button } from "./Button";
3
- import { CheckboxGroup, CheckboxItem } from "./CheckboxGroup";
4
- import { styled, css } from "../styles";
5
- import { Text } from "./Text";
6
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
7
- import {
8
- faChevronDown,
9
- faChevronUp,
10
- faX,
11
- } from "@fortawesome/free-solid-svg-icons";
12
- import { colors } from "@lets-events/tokens";
13
- import { ComponentProps, useCallback, useMemo, useRef, useState } from "react";
14
- import { Flex } from "./Flex";
15
- import { CSS } from "@stitches/react";
16
- import React from "react";
17
- import { Badge } from "./Badge";
18
-
19
- const StyledContent = styled(DropdownMenu.Content, {
20
- backgroundColor: "$dark50",
21
- borderRadius: "$sm",
22
- padding: "$8 0",
23
- boxShadow: "0px 2px 4px 0px #23354329, 0px 4px 4px 0px #23354314",
24
- boxSizing: "border-box",
25
- border: "1px solid $dark300",
26
- });
27
-
28
- const StyledTrigger = styled("div", {
29
- minHeight: "40px",
30
- borderRadius: "$sm",
31
- cursor: "pointer",
32
- display: "flex",
33
- justifyContent: "start",
34
- alignItems: "center",
35
- padding: "$6 $14",
36
- boxSizing: "border-box",
37
- gap: "4px",
38
-
39
- variants: {
40
- color: {
41
- default: {
42
- border: "1px solid $dark300",
43
- },
44
- error: {
45
- border: "1px solid $error400",
46
- },
47
- },
48
- },
49
-
50
- defaultVariants: {
51
- color: "default",
52
- },
53
- });
54
-
55
- const itemStyle: CSS = {
56
- padding: "$4 $16",
57
- minHeight: "$32",
58
- boxSizing: "border-box",
59
- backgroundColor: "$dark50",
60
- display: "block",
61
-
62
- "&:hover": {
63
- backgroundColor: "$dark100",
64
- },
65
- };
66
-
67
- const BadgeWrapper = styled("div", {
68
- flex: "1",
69
- display: "flex",
70
- justifyContent: "start",
71
- flexWrap: "wrap",
72
- gap: "4px",
73
- });
74
-
75
- const BadgeCloseBtn = styled("div", {
76
- borderRadius: "100%",
77
- width: "16px",
78
- height: "16px",
79
- minWidth: "16px",
80
- minHeight: "16px",
81
- display: "flex",
82
- justifyContent: "center",
83
- alignItems: "center",
84
-
85
- "&:hover": {
86
- backgroundColor: "$dark600",
87
- },
88
- });
89
-
90
- export type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
91
- placeholder?: string;
92
- value?: string[];
93
- onValueChange?: (v: string[]) => void;
94
- options: Array<{
95
- label: string;
96
- value: string;
97
- }>;
98
- width?: string;
99
- zIndex?: string;
100
- };
101
-
102
- export const MultiSelect = React.forwardRef<HTMLDivElement, MultiSelectProps>(
103
- (
104
- {
105
- placeholder,
106
- value: selectedValues = [],
107
- onValueChange,
108
- options,
109
- color,
110
- width = "100%",
111
- zIndex = "auto",
112
- },
113
- fowardedRef
114
- ) => {
115
- const [isOpen, setIsOpen] = useState(false);
116
-
117
- const triggerRef = useRef<HTMLDivElement>(null);
118
-
119
- const labelByValue = useMemo(() => {
120
- return options.reduce<{ [key: string]: string }>((prev, curr) => {
121
- return {
122
- ...prev,
123
- [curr.value]: curr.label,
124
- };
125
- }, {});
126
- }, [options]);
127
-
128
- const handleRemove = useCallback(
129
- (value: string) => {
130
- const newValue = selectedValues.filter((v) => v !== value);
131
- onValueChange?.(newValue);
132
- },
133
- [selectedValues, onValueChange]
134
- );
135
-
136
- const menuWidth = triggerRef.current?.offsetWidth;
137
-
138
- return (
139
- <Theme>
140
- <DropdownMenu.Root open={isOpen} onOpenChange={() => setIsOpen(false)}>
141
- <DropdownMenu.Trigger onClick={() => setIsOpen(true)}>
142
- <StyledTrigger
143
- css={{
144
- width,
145
- }}
146
- ref={(r) => {
147
- if (!r) return;
148
- triggerRef.current = r;
149
- if (fowardedRef) {
150
- if (typeof fowardedRef === "function") fowardedRef(r);
151
- else {
152
- fowardedRef.current = r;
153
- }
154
- }
155
- }}
156
- color={color}
157
- >
158
- {selectedValues.length === 0 ? (
159
- <Text typography={"labelMedium"} css={{ flex: 1 }}>
160
- {placeholder ?? "Selecione"}
161
- </Text>
162
- ) : (
163
- <BadgeWrapper>
164
- {selectedValues.map((value) => {
165
- return (
166
- <Badge key={value} size={"sm"} color={"dark"}>
167
- <Flex justify={"between"} align={"center"}>
168
- <Text typography={"badgeSmall"} color="dark100">
169
- {labelByValue[value]}
170
- </Text>
171
- <BadgeCloseBtn
172
- onClick={(e) => {
173
- e.stopPropagation();
174
- handleRemove(value);
175
- }}
176
- role="button"
177
- >
178
- <FontAwesomeIcon icon={faX} size="xs" />
179
- </BadgeCloseBtn>
180
- </Flex>
181
- </Badge>
182
- );
183
- })}
184
- </BadgeWrapper>
185
- )}
186
- <FontAwesomeIcon
187
- icon={isOpen ? faChevronUp : faChevronDown}
188
- size="sm"
189
- color={colors.dark600}
190
- />
191
- </StyledTrigger>
192
- </DropdownMenu.Trigger>
193
- <StyledContent
194
- css={{
195
- width: menuWidth ? menuWidth + "px" : width,
196
- zIndex,
197
- }}
198
- >
199
- <CheckboxGroup
200
- value={selectedValues}
201
- onValueChange={(v) => {
202
- onValueChange?.(v);
203
- }}
204
- >
205
- <Flex direction={"column"} gap={8}>
206
- {options.map(({ value, label }, i) => (
207
- <CheckboxItem value={value} css={itemStyle} key={i}>
208
- <Text typography={"labelSmall"}>{label}</Text>
209
- </CheckboxItem>
210
- ))}
211
- </Flex>
212
- </CheckboxGroup>
213
- </StyledContent>
214
- </DropdownMenu.Root>
215
- </Theme>
216
- );
217
- }
218
- );
1
+ import { DropdownMenu, Theme } from "@radix-ui/themes";
2
+ import { Button } from "./Button";
3
+ import { CheckboxGroup, CheckboxItem } from "./CheckboxGroup";
4
+ import { styled, css } from "../styles";
5
+ import { Text } from "./Text";
6
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
7
+ import {
8
+ faChevronDown,
9
+ faChevronUp,
10
+ faSquareXmark,
11
+ faX,
12
+ } from "@fortawesome/free-solid-svg-icons";
13
+ import { colors } from "@lets-events/tokens";
14
+ import { ComponentProps, useCallback, useMemo, useRef, useState } from "react";
15
+ import { Flex } from "./Flex";
16
+ import { CSS } from "@stitches/react";
17
+ import React from "react";
18
+ import { Badge } from "./Badge";
19
+
20
+ const StyledContent = styled(DropdownMenu.Content, {
21
+ backgroundColor: "$dark50",
22
+ borderRadius: "$sm",
23
+ padding: "$8 0",
24
+ boxShadow: "0px 2px 4px 0px #23354329, 0px 4px 4px 0px #23354314",
25
+ boxSizing: "border-box",
26
+ border: "1px solid $dark300",
27
+ });
28
+
29
+ const StyledTrigger = styled("div", {
30
+ minHeight: "40px",
31
+ borderRadius: "$sm",
32
+ cursor: "pointer",
33
+ display: "flex",
34
+ justifyContent: "start",
35
+ alignItems: "center",
36
+ padding: "$6 $14",
37
+ boxSizing: "border-box",
38
+ gap: "4px",
39
+
40
+ variants: {
41
+ color: {
42
+ default: {
43
+ border: "1px solid $dark300",
44
+ },
45
+ error: {
46
+ border: "1px solid $error400",
47
+ },
48
+ },
49
+ },
50
+
51
+ defaultVariants: {
52
+ color: "default",
53
+ },
54
+ });
55
+
56
+ const itemStyle: CSS = {
57
+ padding: "$4 $16",
58
+ minHeight: "$32",
59
+ boxSizing: "border-box",
60
+ backgroundColor: "$dark50",
61
+ display: "block",
62
+ cursor: "pointer",
63
+
64
+ "&:hover": {
65
+ backgroundColor: "$dark100",
66
+ },
67
+ };
68
+
69
+ const StyledItem = styled("div", {
70
+ ...itemStyle,
71
+ });
72
+
73
+ const BadgeWrapper = styled("div", {
74
+ flex: "1",
75
+ display: "flex",
76
+ gap: "4px",
77
+ marginTop: "8px",
78
+ flexDirection: "column",
79
+ });
80
+
81
+ const BadgeCloseBtn = styled("div", {
82
+ cursor: "pointer",
83
+ });
84
+
85
+ export type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
86
+ placeholder?: string;
87
+ value?: string[];
88
+ onValueChange?: (v: string[]) => void;
89
+ options: Array<{
90
+ label: string;
91
+ value: string;
92
+ }>;
93
+ width?: string;
94
+ zIndex?: string;
95
+ showSelectedValues?: boolean;
96
+ singleSelect?: boolean;
97
+ };
98
+
99
+ export const MultiSelect = React.forwardRef<HTMLDivElement, MultiSelectProps>(
100
+ (
101
+ {
102
+ placeholder,
103
+ value: selectedValues = [],
104
+ onValueChange,
105
+ options,
106
+ color,
107
+ width = "100%",
108
+ zIndex = "auto",
109
+ showSelectedValues = true,
110
+ singleSelect = false,
111
+ },
112
+ fowardedRef
113
+ ) => {
114
+ const [isOpen, setIsOpen] = useState(false);
115
+
116
+ const triggerRef = useRef<HTMLDivElement>(null);
117
+
118
+ const labelByValue = useMemo(() => {
119
+ return options.reduce<{ [key: string]: string }>((prev, curr) => {
120
+ return {
121
+ ...prev,
122
+ [curr.value]: curr.label,
123
+ };
124
+ }, {});
125
+ }, [options]);
126
+
127
+ const handleRemove = useCallback(
128
+ (value: string) => {
129
+ const newValue = selectedValues.filter((v) => v !== value);
130
+ onValueChange?.(newValue);
131
+ },
132
+ [selectedValues, onValueChange]
133
+ );
134
+
135
+ const menuWidth = triggerRef.current?.offsetWidth;
136
+
137
+ const text = useMemo(() => {
138
+ if (selectedValues.length > 0 && singleSelect) {
139
+ const value = selectedValues[0];
140
+ return labelByValue[value];
141
+ }
142
+
143
+ return placeholder ?? "Selecione";
144
+ }, [selectedValues, placeholder, singleSelect]);
145
+
146
+ const handleItemClick = (v: string) => {
147
+ onValueChange?.([v]);
148
+ setIsOpen(false);
149
+ };
150
+
151
+ return (
152
+ <Theme>
153
+ <DropdownMenu.Root open={isOpen} onOpenChange={() => setIsOpen(false)}>
154
+ <DropdownMenu.Trigger onClick={() => setIsOpen(true)}>
155
+ <StyledTrigger
156
+ css={{
157
+ width,
158
+ }}
159
+ ref={(r) => {
160
+ if (!r) return;
161
+ triggerRef.current = r;
162
+ if (fowardedRef) {
163
+ if (typeof fowardedRef === "function") fowardedRef(r);
164
+ else {
165
+ fowardedRef.current = r;
166
+ }
167
+ }
168
+ }}
169
+ color={color}
170
+ >
171
+ <Text
172
+ typography={"labelMedium"}
173
+ css={{
174
+ flex: 1,
175
+ overflow: "hidden",
176
+ whiteSpace: "nowrap",
177
+ textOverflow: "ellipsis",
178
+ }}
179
+ >
180
+ {text}
181
+ </Text>
182
+ <FontAwesomeIcon
183
+ icon={isOpen ? faChevronUp : faChevronDown}
184
+ size="sm"
185
+ color={colors.dark600}
186
+ />
187
+ </StyledTrigger>
188
+ </DropdownMenu.Trigger>
189
+ <StyledContent
190
+ css={{
191
+ width: menuWidth ? menuWidth + "px" : width,
192
+ zIndex,
193
+ }}
194
+ >
195
+ {!singleSelect ? (
196
+ <CheckboxGroup
197
+ value={selectedValues}
198
+ onValueChange={(v) => {
199
+ onValueChange?.(v);
200
+ }}
201
+ >
202
+ <Flex direction={"column"} gap={8}>
203
+ {options.map(({ value, label }, i) => (
204
+ <CheckboxItem value={value} css={itemStyle} key={i}>
205
+ <Text typography={"labelSmall"}>{label}</Text>
206
+ </CheckboxItem>
207
+ ))}
208
+ </Flex>
209
+ </CheckboxGroup>
210
+ ) : (
211
+ <Flex direction={"column"} gap={8}>
212
+ {options.map(({ value, label }, i) => (
213
+ <StyledItem key={i} onClick={() => handleItemClick(value)}>
214
+ <Text typography={"labelSmall"}>{label}</Text>
215
+ </StyledItem>
216
+ ))}
217
+ </Flex>
218
+ )}
219
+ </StyledContent>
220
+ </DropdownMenu.Root>
221
+ {selectedValues.length > 0 && showSelectedValues && (
222
+ <>
223
+ <BadgeWrapper>
224
+ {selectedValues.map((value) => {
225
+ return (
226
+ <Flex gap={4}>
227
+ <BadgeCloseBtn
228
+ onClick={(e) => {
229
+ e.stopPropagation();
230
+ handleRemove(value);
231
+ }}
232
+ role="button"
233
+ >
234
+ <FontAwesomeIcon icon={faSquareXmark} size="sm" />
235
+ </BadgeCloseBtn>
236
+ <Text
237
+ typography={"captionMedium"}
238
+ fontWeight={"regular"}
239
+ color="dark600"
240
+ >
241
+ {labelByValue[value]}
242
+ </Text>
243
+ </Flex>
244
+ );
245
+ })}
246
+ </BadgeWrapper>
247
+ </>
248
+ )}
249
+ </Theme>
250
+ );
251
+ }
252
+ );