@lets-events/react 11.3.0 → 11.4.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 (58) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.turbo/turbo-build.log +18 -20
  3. package/CHANGELOG.md +6 -0
  4. package/dist/index.d.mts +967 -207
  5. package/dist/index.d.ts +967 -207
  6. package/dist/index.js +265 -54
  7. package/dist/index.mjs +261 -48
  8. package/package.json +1 -1
  9. package/src/components/Alert.tsx +303 -303
  10. package/src/components/Avatar.tsx +55 -55
  11. package/src/components/Badge.tsx +125 -128
  12. package/src/components/Box.tsx +3 -3
  13. package/src/components/Button/index.tsx +16 -16
  14. package/src/components/Button/styledComponents.ts +287 -287
  15. package/src/components/ButtonGroup.tsx +484 -484
  16. package/src/components/Calendar/index.tsx +136 -136
  17. package/src/components/Calendar/styledComponents.ts +209 -209
  18. package/src/components/Card.tsx +48 -48
  19. package/src/components/CheckboxGroup.tsx +196 -214
  20. package/src/components/Container.tsx +39 -39
  21. package/src/components/Drawer/index.tsx +48 -48
  22. package/src/components/Drawer/styledComponents.ts +46 -46
  23. package/src/components/Dropdown.tsx +167 -167
  24. package/src/components/Filter.tsx +164 -164
  25. package/src/components/Flex.tsx +118 -118
  26. package/src/components/FormFields/ErrorFormMessage.tsx +36 -36
  27. package/src/components/FormFields/Form.tsx +25 -25
  28. package/src/components/FormFields/FormLabel.tsx +29 -29
  29. package/src/components/FormFields/MultiSelectFormField.tsx +65 -0
  30. package/src/components/FormFields/TextAreaFormField.tsx +46 -46
  31. package/src/components/FormFields/TextFormField.tsx +46 -46
  32. package/src/components/Grid.tsx +137 -137
  33. package/src/components/Icon.tsx +47 -47
  34. package/src/components/MenuDropdown/index.tsx +30 -30
  35. package/src/components/MenuDropdown/styledComponents.ts +31 -31
  36. package/src/components/Modal.tsx +90 -90
  37. package/src/components/MultiSelect.tsx +216 -0
  38. package/src/components/RadioGroup.tsx +210 -210
  39. package/src/components/Section.tsx +33 -33
  40. package/src/components/Step.tsx +164 -164
  41. package/src/components/Switch.tsx +108 -108
  42. package/src/components/Text.tsx +38 -39
  43. package/src/components/TextField.tsx +315 -315
  44. package/src/components/TextareaField.tsx +128 -128
  45. package/src/components/TimePicker.tsx +298 -298
  46. package/src/components/Toast/components/ToastItem.tsx +41 -41
  47. package/src/components/Toast/components/ToastProvider.tsx +63 -63
  48. package/src/components/Toast/hooks/useToast.ts +12 -12
  49. package/src/components/Toast/index.tsx +5 -5
  50. package/src/components/Toast/styles/index.ts +135 -135
  51. package/src/components/Toast/types/index.ts +46 -46
  52. package/src/components/Tooltip/index.tsx +66 -66
  53. package/src/components/Tooltip/styles.ts +77 -77
  54. package/src/hooks/useOnClickOutside.tsx +20 -20
  55. package/src/index.tsx +44 -42
  56. package/src/styles/index.ts +38 -38
  57. package/src/types/typographyValues.ts +178 -178
  58. package/tsconfig.json +3 -3
@@ -1,48 +1,48 @@
1
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
2
- import { library } from "@fortawesome/fontawesome-svg-core";
3
- import { fas } from "@fortawesome/free-solid-svg-icons";
4
- import { far } from "@fortawesome/free-regular-svg-icons";
5
- import { fab } from "@fortawesome/free-brands-svg-icons";
6
- import { IconName, IconPrefix } from "@fortawesome/fontawesome-svg-core";
7
- import { FontAwesomeIconProps } from "@fortawesome/react-fontawesome";
8
- import PropTypes from "prop-types";
9
-
10
- library.add(fas, far, fab);
11
-
12
- interface IconProps extends Omit<FontAwesomeIconProps, "icon" | "size"> {
13
- name: IconName;
14
- size?: 'xs' | 'sm' | 'md' | 'xl';
15
- prefix?: IconPrefix;
16
- }
17
-
18
- export const Icon = ({ name, prefix = "fas", size = "sm", color = "currentColor", className = "", ...props }: IconProps) => {
19
- const sizeMap = {
20
-
21
- 'xs': { width: '0.625rem', height: '0.625rem', fontSize: '0.625rem' },
22
- 'sm': { width: '0.625rem', height: '0.625rem', fontSize: '0.625rem' },
23
- 'md': { width: '0.75rem', height: '0.75rem', fontSize: '0.75rem' },
24
- 'xl': { width: '1rem', height: '1rem', fontSize: '1rem' },
25
- undefined: { width: '0.75rem', height: '0.75rem', fontSize: '0.75rem' },
26
- } as const;
27
-
28
- return (
29
- <FontAwesomeIcon
30
- icon={[prefix, name]}
31
- style={sizeMap[size]}
32
- color={color}
33
- className={className}
34
- {...props}
35
- width={sizeMap[size]?.width}
36
- height={sizeMap[size]?.height}
37
- />
38
- );
39
- };
40
- Icon.propTypes = {
41
- name: PropTypes.string.isRequired,
42
- prefix: PropTypes.string,
43
- size: PropTypes.string,
44
- color: PropTypes.string,
45
- className: PropTypes.string,
46
- };
47
-
1
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
2
+ import { library } from "@fortawesome/fontawesome-svg-core";
3
+ import { fas } from "@fortawesome/free-solid-svg-icons";
4
+ import { far } from "@fortawesome/free-regular-svg-icons";
5
+ import { fab } from "@fortawesome/free-brands-svg-icons";
6
+ import { IconName, IconPrefix } from "@fortawesome/fontawesome-svg-core";
7
+ import { FontAwesomeIconProps } from "@fortawesome/react-fontawesome";
8
+ import PropTypes from "prop-types";
9
+
10
+ library.add(fas, far, fab);
11
+
12
+ interface IconProps extends Omit<FontAwesomeIconProps, "icon" | "size"> {
13
+ name: IconName;
14
+ size?: 'xs' | 'sm' | 'md' | 'xl';
15
+ prefix?: IconPrefix;
16
+ }
17
+
18
+ export const Icon = ({ name, prefix = "fas", size = "sm", color = "currentColor", className = "", ...props }: IconProps) => {
19
+ const sizeMap = {
20
+
21
+ 'xs': { width: '0.625rem', height: '0.625rem', fontSize: '0.625rem' },
22
+ 'sm': { width: '0.625rem', height: '0.625rem', fontSize: '0.625rem' },
23
+ 'md': { width: '0.75rem', height: '0.75rem', fontSize: '0.75rem' },
24
+ 'xl': { width: '1rem', height: '1rem', fontSize: '1rem' },
25
+ undefined: { width: '0.75rem', height: '0.75rem', fontSize: '0.75rem' },
26
+ } as const;
27
+
28
+ return (
29
+ <FontAwesomeIcon
30
+ icon={[prefix, name]}
31
+ style={sizeMap[size]}
32
+ color={color}
33
+ className={className}
34
+ {...props}
35
+ width={sizeMap[size]?.width}
36
+ height={sizeMap[size]?.height}
37
+ />
38
+ );
39
+ };
40
+ Icon.propTypes = {
41
+ name: PropTypes.string.isRequired,
42
+ prefix: PropTypes.string,
43
+ size: PropTypes.string,
44
+ color: PropTypes.string,
45
+ className: PropTypes.string,
46
+ };
47
+
48
48
  export default Icon;
@@ -1,30 +1,30 @@
1
- import { ComponentProps, ReactNode, useState } from "react";
2
- import {
3
- MenuDropdownContainerStyled,
4
- TriggerButtonStyled,
5
- MenuItemsContainerStyled,
6
- } from "./styledComponents";
7
- import Icon from "../Icon";
8
-
9
- export type MenuDropdownProps = ComponentProps<
10
- typeof MenuDropdownContainerStyled
11
- > & {
12
- children: ReactNode;
13
- };
14
-
15
- export function MenuDropdown({ children }: MenuDropdownProps) {
16
- const [isOpen, setIsOpen] = useState(false);
17
- function handleMenuDropdown() {
18
- setIsOpen(!isOpen);
19
- }
20
- return (
21
- <MenuDropdownContainerStyled>
22
- <TriggerButtonStyled onClick={handleMenuDropdown}>
23
- <Icon name="ellipsis" size="xl" color="#FFFFFF" />
24
- </TriggerButtonStyled>
25
- {isOpen && (
26
- <MenuItemsContainerStyled>{children}</MenuItemsContainerStyled>
27
- )}
28
- </MenuDropdownContainerStyled>
29
- );
30
- }
1
+ import { ComponentProps, ReactNode, useState } from "react";
2
+ import {
3
+ MenuDropdownContainerStyled,
4
+ TriggerButtonStyled,
5
+ MenuItemsContainerStyled,
6
+ } from "./styledComponents";
7
+ import Icon from "../Icon";
8
+
9
+ export type MenuDropdownProps = ComponentProps<
10
+ typeof MenuDropdownContainerStyled
11
+ > & {
12
+ children: ReactNode;
13
+ };
14
+
15
+ export function MenuDropdown({ children }: MenuDropdownProps) {
16
+ const [isOpen, setIsOpen] = useState(false);
17
+ function handleMenuDropdown() {
18
+ setIsOpen(!isOpen);
19
+ }
20
+ return (
21
+ <MenuDropdownContainerStyled>
22
+ <TriggerButtonStyled onClick={handleMenuDropdown}>
23
+ <Icon name="ellipsis" size="xl" color="#FFFFFF" />
24
+ </TriggerButtonStyled>
25
+ {isOpen && (
26
+ <MenuItemsContainerStyled>{children}</MenuItemsContainerStyled>
27
+ )}
28
+ </MenuDropdownContainerStyled>
29
+ );
30
+ }
@@ -1,31 +1,31 @@
1
- import { styled } from "../../styles";
2
-
3
- export const MenuDropdownContainerStyled = styled("div", {
4
- position: "relative",
5
- width: "fit-content",
6
- });
7
- export const TriggerButtonStyled = styled("button", {
8
- backgroundColor: "$brand500",
9
- boxShadow: "0px 4px 4px 0px #23354314",
10
- borderRadius: "$full",
11
- border: "none",
12
- height: "1.875rem",
13
- width: "1.875rem",
14
- cursor: "pointer",
15
- });
16
- export const MenuItemsContainerStyled = styled("div", {
17
- position: "absolute",
18
- right: 0,
19
- top: "2.125rem",
20
- zIndex: "999",
21
- width: "fit-content",
22
- minWidth: "5rem",
23
- background: "#fff",
24
- maxWidth: "18.75rem",
25
- margin: "auto",
26
- boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.0784313725)",
27
- border: "1px solid $dark300",
28
- borderRadius: "0.5rem",
29
- padding: "0.5rem 0",
30
- height: "fit-content",
31
- });
1
+ import { styled } from "../../styles";
2
+
3
+ export const MenuDropdownContainerStyled = styled("div", {
4
+ position: "relative",
5
+ width: "fit-content",
6
+ });
7
+ export const TriggerButtonStyled = styled("button", {
8
+ backgroundColor: "$brand500",
9
+ boxShadow: "0px 4px 4px 0px #23354314",
10
+ borderRadius: "$full",
11
+ border: "none",
12
+ height: "1.875rem",
13
+ width: "1.875rem",
14
+ cursor: "pointer",
15
+ });
16
+ export const MenuItemsContainerStyled = styled("div", {
17
+ position: "absolute",
18
+ right: 0,
19
+ top: "2.125rem",
20
+ zIndex: "999",
21
+ width: "fit-content",
22
+ minWidth: "5rem",
23
+ background: "#fff",
24
+ maxWidth: "18.75rem",
25
+ margin: "auto",
26
+ boxShadow: "0px 4px 4px 0px rgba(35, 53, 67, 0.0784313725)",
27
+ border: "1px solid $dark300",
28
+ borderRadius: "0.5rem",
29
+ padding: "0.5rem 0",
30
+ height: "fit-content",
31
+ });
@@ -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
+ }
@@ -0,0 +1,216 @@
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
+ height: "32px",
59
+ boxSizing: "border-box",
60
+ backgroundColor: "$dark50",
61
+ display: "block",
62
+
63
+ "&:hover": {
64
+ backgroundColor: "$dark100",
65
+ },
66
+ };
67
+
68
+ const BadgeWrapper = styled("div", {
69
+ flex: "1",
70
+ display: "flex",
71
+ justifyContent: "start",
72
+ flexWrap: "wrap",
73
+ gap: "4px",
74
+ });
75
+
76
+ const BadgeCloseBtn = styled("div", {
77
+ borderRadius: "100%",
78
+ width: "16px",
79
+ height: "16px",
80
+ minWidth: "16px",
81
+ minHeight: "16px",
82
+ display: "flex",
83
+ justifyContent: "center",
84
+ alignItems: "center",
85
+
86
+ "&:hover": {
87
+ backgroundColor: "$dark600",
88
+ },
89
+ });
90
+
91
+ export type MultiSelectProps = ComponentProps<typeof StyledTrigger> & {
92
+ placeholder?: string;
93
+ value?: string[];
94
+ onValueChange?: (v: string[]) => void;
95
+ options: Array<{
96
+ label: string;
97
+ value: string;
98
+ }>;
99
+ width?: 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
+ },
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
+ return (
138
+ <Theme>
139
+ <DropdownMenu.Root open={isOpen} onOpenChange={() => setIsOpen(false)}>
140
+ <DropdownMenu.Trigger onClick={() => setIsOpen(true)}>
141
+ <StyledTrigger
142
+ css={{
143
+ width,
144
+ }}
145
+ ref={(r) => {
146
+ if (!r) return;
147
+ triggerRef.current = r;
148
+ if (fowardedRef) {
149
+ if (typeof fowardedRef === "function") fowardedRef(r);
150
+ else {
151
+ fowardedRef.current = r;
152
+ }
153
+ }
154
+ }}
155
+ color={color}
156
+ >
157
+ {selectedValues.length === 0 ? (
158
+ <Text typography={"labelMedium"} css={{ flex: 1 }}>
159
+ {placeholder ?? "Selecione"}
160
+ </Text>
161
+ ) : (
162
+ <BadgeWrapper>
163
+ {selectedValues.map((value) => {
164
+ return (
165
+ <Badge key={value} size={"sm"} color={"dark"}>
166
+ <Flex justify={"between"} align={"center"}>
167
+ <Text typography={"badgeSmall"} color="dark100">
168
+ {labelByValue[value]}
169
+ </Text>
170
+ <BadgeCloseBtn
171
+ onClick={(e) => {
172
+ e.stopPropagation();
173
+ handleRemove(value);
174
+ }}
175
+ role="button"
176
+ >
177
+ <FontAwesomeIcon icon={faX} size="xs" />
178
+ </BadgeCloseBtn>
179
+ </Flex>
180
+ </Badge>
181
+ );
182
+ })}
183
+ </BadgeWrapper>
184
+ )}
185
+ <FontAwesomeIcon
186
+ icon={isOpen ? faChevronUp : faChevronDown}
187
+ size="sm"
188
+ color={colors.dark600}
189
+ />
190
+ </StyledTrigger>
191
+ </DropdownMenu.Trigger>
192
+ <StyledContent
193
+ css={{
194
+ width: menuWidth ? menuWidth + "px" : width,
195
+ }}
196
+ >
197
+ <CheckboxGroup
198
+ value={selectedValues}
199
+ onValueChange={(v) => {
200
+ onValueChange?.(v);
201
+ }}
202
+ >
203
+ <Flex direction={"column"} gap={8}>
204
+ {options.map(({ value, label }, i) => (
205
+ <CheckboxItem value={value} css={itemStyle} key={i}>
206
+ <Text typography={"labelSmall"}>{label}</Text>
207
+ </CheckboxItem>
208
+ ))}
209
+ </Flex>
210
+ </CheckboxGroup>
211
+ </StyledContent>
212
+ </DropdownMenu.Root>
213
+ </Theme>
214
+ );
215
+ }
216
+ );