@mirohq/design-system-select 0.1.0-select.0 → 0.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.
package/dist/module.js CHANGED
@@ -1,8 +1,11 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import React, { useCallback, useState } from 'react';
3
- import { styled } from '@mirohq/design-system-stitches';
4
- import { Root, Group as Group$1, Item as Item$1, ItemText, ItemIndicator, Portal as Portal$1, Trigger as Trigger$1, SelectIcon, Value as Value$1, Content as Content$1, Label as Label$1, Separator as Separator$1 } from '@radix-ui/react-select';
5
- import { IconCheckMark, IconChevronDown, ScrollArea } from '@mirohq/design-system';
2
+ import React, { createContext, useContext, useCallback, useState } from 'react';
3
+ import { styled, theme } from '@mirohq/design-system-stitches';
4
+ import { Root, Group as Group$1, Item as Item$1, ItemIndicator, ItemText, Portal as Portal$1, SelectIcon, Trigger as Trigger$1, Value as Value$1, Content as Content$1, Viewport, Label as Label$1, Separator as Separator$1 } from '@radix-ui/react-select';
5
+ import { IconCheckMark, IconChevronDown } from '@mirohq/design-system-icons';
6
+ import { booleanify } from '@mirohq/design-system-utils';
7
+ import { focus } from '@mirohq/design-system-styles';
8
+ import { ScrollArea } from '@mirohq/design-system-scroll-area';
6
9
 
7
10
  const StyledSelect = styled(Root);
8
11
 
@@ -10,39 +13,271 @@ const StyledGroup = styled(Group$1, {});
10
13
 
11
14
  const Group = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsx(StyledGroup, { ...props, ref: forwardRef }));
12
15
 
13
- const StyledItem = styled(Item$1, {});
16
+ const StyledItem = styled(Item$1, {
17
+ all: "unset",
18
+ borderRadius: "$50",
19
+ boxSizing: "border-box",
20
+ color: "$text-neutrals",
21
+ cursor: "pointer",
22
+ display: "grid",
23
+ fontSize: "$175",
24
+ gridTemplateAreas: "leftSlot textItem",
25
+ gridTemplateColumns: "20px 1fr",
26
+ lineHeight: "20px",
27
+ padding: "6px $150 6px $100",
28
+ position: "relative",
29
+ userSelect: "none",
30
+ ...focus.css({
31
+ boxShadow: "$focus-small",
32
+ outline: "1px solid transparent"
33
+ }),
34
+ '&[data-state="checked"]': {
35
+ color: "$text-primary-selected"
36
+ },
37
+ '&:active:not([aria-disabled="true"])': {
38
+ background: "$background-primary-subtle-active",
39
+ boxShadow: "none",
40
+ color: "$text-primary-active"
41
+ },
42
+ '&:disabled, &[aria-disabled="true"], &[data-disabled]': {
43
+ cursor: "default",
44
+ color: "$text-neutrals-disabled"
45
+ },
46
+ "&:disabled, &[data-disabled]": {
47
+ pointerEvents: "none"
48
+ },
49
+ '&:hover:not([aria-disabled="true"])': {
50
+ background: "$background-primary-subtle-hover",
51
+ color: "$text-primary-hover",
52
+ '&:not([aria-disabled="true"])': {
53
+ boxShadow: "none"
54
+ }
55
+ }
56
+ });
14
57
 
15
- const StyledItemText = styled(ItemText, {});
58
+ const StyledItemText = styled("span", {
59
+ display: "flex",
60
+ gridColumn: 2,
61
+ width: "100%"
62
+ });
16
63
 
17
64
  const StyledItemIndicator = styled(ItemIndicator, {});
18
65
 
19
66
  const Item = React.forwardRef(
20
- ({ children, ...restProps }, forwardRef) => /* @__PURE__ */ jsxs(StyledItem, { ...restProps, ref: forwardRef, children: [
21
- /* @__PURE__ */ jsx(StyledItemText, { children }),
22
- /* @__PURE__ */ jsx(StyledItemIndicator, { children: /* @__PURE__ */ jsx(IconCheckMark, {}) })
23
- ] })
67
+ ({
68
+ disabled = false,
69
+ textValue,
70
+ "aria-disabled": ariaDisabled,
71
+ onKeyDown,
72
+ onPointerUp,
73
+ onPointerMove,
74
+ onPointerLeave,
75
+ children,
76
+ ...restProps
77
+ }, forwardRef) => /* @__PURE__ */ jsxs(
78
+ StyledItem,
79
+ {
80
+ ...restProps,
81
+ "aria-disabled": booleanify(ariaDisabled) ? ariaDisabled : void 0,
82
+ onKeyDown: (e) => {
83
+ if (booleanify(ariaDisabled) && e.code !== "ArrowUp" && e.code !== "ArrowDown" && e.code !== "Escape") {
84
+ e.preventDefault();
85
+ e.stopPropagation();
86
+ return;
87
+ }
88
+ onKeyDown == null ? void 0 : onKeyDown(e);
89
+ },
90
+ onPointerUp: (e) => {
91
+ if (booleanify(ariaDisabled)) {
92
+ e.preventDefault();
93
+ return;
94
+ }
95
+ onPointerUp == null ? void 0 : onPointerUp(e);
96
+ },
97
+ onPointerMove: (e) => {
98
+ if (booleanify(ariaDisabled)) {
99
+ e.preventDefault();
100
+ return;
101
+ }
102
+ onPointerMove == null ? void 0 : onPointerMove(e);
103
+ },
104
+ onPointerLeave: (e) => {
105
+ if (booleanify(ariaDisabled)) {
106
+ e.preventDefault();
107
+ return;
108
+ }
109
+ onPointerLeave == null ? void 0 : onPointerLeave(e);
110
+ },
111
+ textValue,
112
+ disabled,
113
+ ref: forwardRef,
114
+ children: [
115
+ /* @__PURE__ */ jsx(StyledItemIndicator, { children: /* @__PURE__ */ jsx(IconCheckMark, { size: "small" }) }),
116
+ /* @__PURE__ */ jsx(ItemText, { asChild: true, children: /* @__PURE__ */ jsx(StyledItemText, { children }) })
117
+ ]
118
+ }
119
+ )
24
120
  );
25
121
 
26
122
  const StyledPortal = styled(Portal$1, {});
27
123
 
28
124
  const Portal = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsx(StyledPortal, { ...props, ref: forwardRef }));
29
125
 
30
- const StyledTrigger = styled(Trigger$1, {});
126
+ const StyledSelectIcon = styled(SelectIcon, { flexShrink: 0 });
127
+
128
+ const StyledTrigger = styled(Trigger$1, {
129
+ all: "unset",
130
+ backgroundColor: "$background-neutrals-container",
131
+ border: "1px solid $border-neutrals",
132
+ borderRadius: "$50",
133
+ boxSizing: "border-box",
134
+ color: "$text-neutrals",
135
+ display: "flex",
136
+ minWidth: 0,
137
+ fontSize: "$200",
138
+ lineHeight: 1.5,
139
+ maxWidth: "$100",
140
+ position: "relative",
141
+ userSelect: "none",
142
+ width: "$50",
143
+ justifyContent: "space-between",
144
+ alignItems: "center",
145
+ svg: {
146
+ color: "$icon-neutrals-text"
147
+ },
148
+ "&[data-placeholder]": {
149
+ color: "$text-neutrals-subtle"
150
+ },
151
+ "&[data-invalid]": {
152
+ borderColor: "$border-danger",
153
+ ...focus.css({
154
+ boxShadow: "$focus-controls-error"
155
+ })
156
+ },
157
+ "&:hover": {
158
+ borderColor: "$border-primary-hover"
159
+ },
160
+ '&:active, &[data-state="open"]': {
161
+ borderColor: "$border-primary-active"
162
+ },
163
+ ...focus.css({
164
+ boxShadow: "$focus-controls",
165
+ outline: "1px solid transparent"
166
+ }),
167
+ '&[disabled], &[aria-disabled="true"]': {
168
+ backgroundColor: "$background-neutrals-disabled",
169
+ borderColor: "$border-neutrals-disabled",
170
+ color: "$text-neutrals-disabled",
171
+ svg: {
172
+ color: "$icon-neutrals-disabled"
173
+ }
174
+ },
175
+ '&[data-state="open"]': {
176
+ ["& ".concat(StyledSelectIcon)]: {
177
+ transform: "rotate(180deg)"
178
+ }
179
+ },
180
+ variants: {
181
+ size: {
182
+ medium: {
183
+ height: "$10",
184
+ paddingX: "$100",
185
+ gap: "$50"
186
+ },
187
+ large: {
188
+ height: "$12",
189
+ paddingX: "$150",
190
+ gap: "$100"
191
+ }
192
+ }
193
+ }
194
+ });
31
195
 
32
- const Trigger = React.forwardRef(({ children, ...restProps }, forwardRef) => /* @__PURE__ */ jsxs(StyledTrigger, { ...restProps, ref: forwardRef, children: [
196
+ const SelectContext = createContext({});
197
+ const SelectProvider = ({
33
198
  children,
34
- /* @__PURE__ */ jsx(SelectIcon, { asChild: true, children: /* @__PURE__ */ jsx(IconChevronDown, {}) })
35
- ] }));
199
+ invalid,
200
+ ariaDisabled
201
+ }) => /* @__PURE__ */ jsx(
202
+ SelectContext.Provider,
203
+ {
204
+ value: {
205
+ invalid,
206
+ ariaDisabled
207
+ },
208
+ children
209
+ }
210
+ );
211
+ const useSelectContext = () => useContext(SelectContext);
212
+
213
+ const Trigger = React.forwardRef(
214
+ ({ onKeyDown, onPointerDown, children, size = "medium", ...restProps }, forwardRef) => {
215
+ const { invalid, ariaDisabled } = useSelectContext();
216
+ return /* @__PURE__ */ jsxs(
217
+ StyledTrigger,
218
+ {
219
+ ...restProps,
220
+ size,
221
+ ref: forwardRef,
222
+ "aria-disabled": ariaDisabled,
223
+ onPointerDown: (e) => {
224
+ if (booleanify(ariaDisabled)) {
225
+ e.preventDefault();
226
+ } else {
227
+ onPointerDown == null ? void 0 : onPointerDown(e);
228
+ }
229
+ },
230
+ onKeyDown: (e) => {
231
+ if (booleanify(ariaDisabled) && e.code !== "Tab" && e.code !== "ArrowUp" && e.code !== "ArrowDown") {
232
+ e.preventDefault();
233
+ } else {
234
+ onKeyDown == null ? void 0 : onKeyDown(e);
235
+ }
236
+ },
237
+ "data-invalid": invalid ? "" : void 0,
238
+ children: [
239
+ children,
240
+ /* @__PURE__ */ jsx(StyledSelectIcon, { asChild: true, children: /* @__PURE__ */ jsx(IconChevronDown, { size: "small", weight: "thin" }) })
241
+ ]
242
+ }
243
+ );
244
+ }
245
+ );
36
246
 
37
- const StyledValue = styled(Value$1, {});
247
+ const StyledValue = styled("span", {
248
+ overflow: "hidden",
249
+ paddingX: "$50",
250
+ "& span:first-child": {
251
+ display: "block",
252
+ overflow: "hidden",
253
+ textOverflow: "ellipsis",
254
+ whiteSpace: "nowrap"
255
+ }
256
+ });
38
257
 
39
- const Value = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsx(StyledValue, { ...props, ref: forwardRef }));
258
+ const Value = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsx(StyledValue, { children: /* @__PURE__ */ jsx(Value$1, { ...props, ref: forwardRef }) }));
40
259
 
41
- const StyledContent = styled(Content$1, {});
260
+ const StyledContent = styled(Content$1, {
261
+ backgroundColor: "$background-neutrals-container",
262
+ borderRadius: "$50",
263
+ boxShadow: "$50",
264
+ fontSize: "$175",
265
+ fontWeight: "normal",
266
+ lineHeight: "20px",
267
+ minWidth: "var(--radix-select-trigger-width)",
268
+ padding: "$50",
269
+ zIndex: "$select",
270
+ "& [data-radix-scroll-area-viewport]": {
271
+ padding: "2px $50 2px 2px",
272
+ boxSizing: "border-box"
273
+ }
274
+ });
42
275
 
276
+ const CONTENT_OFFSET = parseInt(theme.space[50]);
43
277
  const Content = React.forwardRef(
44
278
  ({
45
279
  side = "bottom",
280
+ sideOffset = CONTENT_OFFSET,
46
281
  align = "center",
47
282
  alignOffset = 0,
48
283
  collisionPadding = 0,
@@ -57,7 +292,7 @@ const Content = React.forwardRef(
57
292
  const getOverflowMaxHeight = useCallback(() => {
58
293
  const overflowMaxHeigh = "calc(var(--radix-select-content-available-height))";
59
294
  return {
60
- maxHeight: maxHeight === void 0 ? overflowMaxHeigh : maxHeight
295
+ maxHeight: maxHeight != null ? maxHeight : overflowMaxHeigh
61
296
  };
62
297
  }, [maxHeight]);
63
298
  return /* @__PURE__ */ jsx(
@@ -65,27 +300,38 @@ const Content = React.forwardRef(
65
300
  {
66
301
  ...restProps,
67
302
  ref: forwardRef,
303
+ position: "popper",
68
304
  side,
305
+ sideOffset,
69
306
  align,
70
307
  alignOffset,
71
308
  avoidCollisions,
72
309
  collisionPadding,
73
310
  sticky,
74
311
  hideWhenDetached,
75
- children: overflow === "auto" ? /* @__PURE__ */ jsxs(ScrollArea, { type: "always", children: [
76
- /* @__PURE__ */ jsx(ScrollArea.Viewport, { css: { ...getOverflowMaxHeight() }, children }),
312
+ children: /* @__PURE__ */ jsx(Viewport, { children: overflow === "auto" ? /* @__PURE__ */ jsxs(ScrollArea, { type: "always", children: [
313
+ /* @__PURE__ */ jsx(ScrollArea.Viewport, { css: getOverflowMaxHeight(), children }),
77
314
  /* @__PURE__ */ jsx(ScrollArea.Scrollbar, { orientation: "vertical", children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {}) })
78
- ] }) : /* @__PURE__ */ jsx(Fragment, { children })
315
+ ] }) : /* @__PURE__ */ jsx(Fragment, { children }) })
79
316
  }
80
317
  );
81
318
  }
82
319
  );
83
320
 
84
- const StyledLabel = styled(Label$1, {});
321
+ const StyledLabel = styled(Label$1, {
322
+ color: "$text-neutrals-subtle",
323
+ marginLeft: "$300",
324
+ padding: "6px $50"
325
+ });
85
326
 
86
327
  const Label = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsx(StyledLabel, { ...props, ref: forwardRef }));
87
328
 
88
- const StyledSeparator = styled(Separator$1, {});
329
+ const StyledSeparator = styled(Separator$1, {
330
+ backgroundColor: "$border-neutrals-subtle",
331
+ height: "1px",
332
+ width: "100%",
333
+ margin: "5.5px 0"
334
+ });
89
335
 
90
336
  const Separator = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsx(StyledSeparator, { ...props, ref: forwardRef }));
91
337
 
@@ -96,13 +342,18 @@ const Select = React.forwardRef(
96
342
  open,
97
343
  onOpen,
98
344
  onClose,
345
+ invalid = false,
346
+ "aria-disabled": ariaDisabled,
347
+ disabled,
99
348
  ...restProps
100
349
  }, forwardRef) => {
101
350
  const [openState, setOpenState] = useState(defaultOpen);
102
- return /* @__PURE__ */ jsx(
351
+ return /* @__PURE__ */ jsx(SelectProvider, { invalid, ariaDisabled, children: /* @__PURE__ */ jsx(
103
352
  StyledSelect,
104
353
  {
105
354
  ...restProps,
355
+ "aria-disabled": ariaDisabled,
356
+ disabled,
106
357
  dir: direction,
107
358
  open: open != null ? open : openState,
108
359
  onOpenChange: (newOpen) => {
@@ -113,7 +364,7 @@ const Select = React.forwardRef(
113
364
  },
114
365
  ref: forwardRef
115
366
  }
116
- );
367
+ ) });
117
368
  }
118
369
  );
119
370
  Select.Group = Group;
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../src/select.styled.tsx","../partials/group.styled.tsx","../partials/group.tsx","../partials/item.styled.tsx","../partials/item-text.styled.tsx","../partials/item-indicator.styled.tsx","../partials/item.tsx","../partials/portal.styled.tsx","../partials/portal.tsx","../partials/trigger.styled.tsx","../partials/trigger.tsx","../partials/value.styled.tsx","../partials/value.tsx","../partials/content.styled.tsx","../partials/content.tsx","../partials/label.styled.tsx","../partials/label.tsx","../partials/separator.styled.tsx","../partials/separator.tsx","../src/select.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Root as RadixSelect } from '@radix-ui/react-select'\n\nexport const StyledSelect = styled(RadixSelect)\n\nexport type StyledSelectProps = ComponentPropsWithRef<typeof StyledSelect>\n","import { Group as RadixGroup } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroup = styled(RadixGroup, {})\n\nexport type StyledGroupProps = StrictComponentProps<typeof StyledGroup>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroup } from './group.styled'\nimport type { StyledGroupProps } from './group.styled'\n\nexport interface GroupProps extends StyledGroupProps {}\n\nexport const Group = React.forwardRef<\n ElementRef<typeof StyledGroup>,\n GroupProps\n>((props, forwardRef) => <StyledGroup {...props} ref={forwardRef} />)\n","import { Item as RadixItem } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItem = styled(RadixItem, {})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import { ItemText as RadixItemText } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemText = styled(RadixItemText, {})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItemText>\n","import { ItemIndicator as RadixItemIndicator } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemIndicator = styled(RadixItemIndicator, {})\n\nexport type StyledItemIndicatorProps = StrictComponentProps<\n typeof StyledItemIndicator\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { IconCheckMark } from '@mirohq/design-system'\n\nimport { StyledItem } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { StyledItemText } from './item-text.styled'\nimport { StyledItemIndicator } from './item-indicator.styled'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * The value given as data when submitted with a name.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Select's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n ({ children, ...restProps }, forwardRef) => (\n <StyledItem {...restProps} ref={forwardRef}>\n <StyledItemText>{children}</StyledItemText>\n <StyledItemIndicator>\n <IconCheckMark />\n </StyledItemIndicator>\n </StyledItem>\n )\n)\n","import { Portal as RadixPortal } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledPortal = styled(RadixPortal, {})\n\nexport type StyledPortalProps = StrictComponentProps<typeof StyledPortal>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledPortal } from './portal.styled'\nimport type { StyledPortalProps } from './portal.styled'\n\nexport interface PortalProps extends StyledPortalProps {\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal = React.forwardRef<\n ElementRef<typeof StyledPortal>,\n PortalProps\n>((props, forwardRef) => <StyledPortal {...props} ref={forwardRef} />)\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Trigger as RadixTrigger } from '@radix-ui/react-select'\n\nexport const StyledTrigger = styled(RadixTrigger, {})\n\nexport type StyledTriggerProps = StrictComponentProps<typeof StyledTrigger>\n","import type { ElementRef } from 'react'\nimport React from 'react'\nimport { SelectIcon as RadixSelectIcon } from '@radix-ui/react-select'\nimport { IconChevronDown } from '@mirohq/design-system'\n\nimport { StyledTrigger } from './trigger.styled'\nimport type { StyledTriggerProps } from './trigger.styled'\n\nexport interface TriggerProps extends StyledTriggerProps {\n children: React.ReactNode\n}\n\nexport const Trigger = React.forwardRef<\n ElementRef<typeof StyledTrigger>,\n TriggerProps\n>(({ children, ...restProps }, forwardRef) => (\n <StyledTrigger {...restProps} ref={forwardRef}>\n {children}\n <RadixSelectIcon asChild>\n <IconChevronDown />\n </RadixSelectIcon>\n </StyledTrigger>\n))\n","import { Value as RadixValue } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledValue = styled(RadixValue, {})\n\nexport type StyledValueProps = StrictComponentProps<typeof StyledValue>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledValue } from './value.styled'\nimport type { StyledValueProps } from './value.styled'\n\nexport interface ValueProps extends StyledValueProps {\n /**\n * The content that will be rendered inside the Select.Value when no value or\n * defaultValue is set.\n */\n placeholder?: React.ReactNode\n\n /**\n * The controlled content that will be rendered inside the Select.Value.\n */\n children?: React.ReactNode\n}\n\nexport const Value = React.forwardRef<\n ElementRef<typeof StyledValue>,\n ValueProps\n>((props, forwardRef) => <StyledValue {...props} ref={forwardRef} />)\n","import { Content as RadixContent } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledContent = styled(RadixContent, {})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import React, { useCallback } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ScrollArea } from '@mirohq/design-system'\nimport type { CSS, CSSProperties } from '@stitches/react'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport type {\n Boundary,\n PointerDownOutsideEvent,\n Side,\n Overflow,\n} from '../src/types'\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault.\n */\n onCloseAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n\n /**\n * Event handler called when a pointer event occurs outside the bounds of the\n * component. It can be prevented by calling event.preventDefault.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void\n\n /**\n * The positioning mode to use, item-aligned is the default and behaves\n * similarly to a native MacOS menu by positioning content relative to the\n * active item. popper positions content in the same way as our other\n * primitives, for example Popover or DropdownMenu.\n */\n position?: 'item-aligned' | 'popper'\n\n /**\n * The preferred side of the anchor to render against when open. Will be\n * reversed when collisions occur and avoidCollisions is enabled. Only\n * available when position is set to popper.\n */\n side?: 'top' | 'right' | 'bottom' | 'left'\n\n /**\n * The distance in pixels from the anchor. Only available when position is set\n * to popper.\n */\n sideOffset?: number\n\n /**\n * The preferred alignment against the anchor. May change when collisions\n * occur. Only available when position is set to popper.\n */\n align?: 'start' | 'center' | 'end'\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment options. Only\n * available when position is set to popper.\n */\n alignOffset?: number\n\n /**\n * When true, overrides the side andalign preferences to prevent collisions\n * with boundary edges. Only available when position is set to popper.\n */\n avoidCollisions?: boolean\n\n /**\n * The element used as the collision boundary. By default this is the\n * viewport, though you can provide additional element(s) to be included in\n * this check. Only available when position is set to popper.\n */\n collisionBoundary?: Boundary\n\n /**\n * The distance in pixels from the boundary edges where collision detection\n * should occur. Accepts a number (same for all sides), or a partial padding\n * object, for example: { top: 20, left: 20 }. Only available when position is\n * set to popper.\n */\n collisionPadding?: number | Partial<Record<Side, number>>\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in the\n * boundary as long as the trigger is at least partially in the boundary whilst\n * \"always\" will keep the content in the boundary regardless. Only available\n * when position is set to popper.\n */\n sticky?: 'partial' | 'always'\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded. Only\n * available when position is set to popper.\n */\n hideWhenDetached?: boolean\n\n /**\n * The max height for the content.\n */\n maxHeight?: CSSProperties['maxHeight']\n\n /**\n * Setting overflow as \"visible\" means that the content can extend beyond the\n * its collision boundary without any clipping or scrolling being\n * applied.\n * When set to \"auto,\" a scrollbar is added if the content exceeds its\n * boundaries. If no maxHeight is defined, it will be automatically adjusted\n * to fit the remaining space between the trigger and the boundary edge.\n */\n overflow?: Overflow\n\n /**\n * Select's content.\n */\n children?: ReactNode\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(\n (\n {\n side = 'bottom',\n align = 'center',\n alignOffset = 0,\n collisionPadding = 0,\n avoidCollisions = true,\n sticky = 'partial',\n hideWhenDetached = true,\n overflow = 'visible',\n maxHeight,\n children,\n ...restProps\n },\n forwardRef\n ) => {\n const getOverflowMaxHeight = useCallback((): CSS => {\n const overflowMaxHeigh = `calc(var(--radix-select-content-available-height))`\n\n return {\n maxHeight: maxHeight === undefined ? overflowMaxHeigh : maxHeight,\n }\n }, [maxHeight])\n return (\n <StyledContent\n {...restProps}\n ref={forwardRef}\n side={side}\n align={align}\n alignOffset={alignOffset}\n avoidCollisions={avoidCollisions}\n collisionPadding={collisionPadding}\n sticky={sticky}\n hideWhenDetached={hideWhenDetached}\n >\n {overflow === 'auto' ? (\n <ScrollArea type='always'>\n <ScrollArea.Viewport css={{ ...getOverflowMaxHeight() }}>\n {children}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation='vertical'>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea>\n ) : (\n <>{children}</>\n )}\n </StyledContent>\n )\n }\n)\n","import { Label as RadixLabel } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledLabel = styled(RadixLabel, {})\n\nexport type StyledLabelProps = StrictComponentProps<typeof StyledLabel>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledLabel } from './label.styled'\nimport type { StyledLabelProps } from './label.styled'\n\nexport interface LabelProps extends StyledLabelProps {}\n\nexport const Label = React.forwardRef<\n ElementRef<typeof StyledLabel>,\n LabelProps\n>((props, forwardRef) => <StyledLabel {...props} ref={forwardRef} />)\n","import { Separator as RadixSeparator } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledSeparator = styled(RadixSeparator, {})\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledSeparator } from './separator.styled'\nimport type { StyledSeparatorProps } from './separator.styled'\n\nexport interface SeparatorProps extends StyledSeparatorProps {}\n\nexport const Separator = React.forwardRef<\n ElementRef<typeof StyledSeparator>,\n SeparatorProps\n>((props, forwardRef) => <StyledSeparator {...props} ref={forwardRef} />)\n","import React, { useState } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\n\nimport { StyledSelect } from './select.styled'\nimport type { StyledSelectProps } from './select.styled'\nimport { Group } from '../partials/group'\nimport { Item } from '../partials/item'\nimport { Portal } from '../partials/portal'\nimport { Trigger } from '../partials/trigger'\nimport { Value } from '../partials/value'\nimport { Content } from '../partials/content'\nimport { Label } from '../partials/label'\nimport { Separator } from '../partials/separator'\n\nexport interface SelectProps extends StyledSelectProps {\n /**\n * The value of the select when initially rendered. Use when you do not need\n * to control the state of the select.\n */\n defaultValue?: string\n\n /**\n * The controlled value of the select. Should be used in conjunction with\n * onValueChange.\n */\n value?: string\n\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string) => void\n\n /**\n * The open state of the select when it is initially rendered. Use when you do\n * not need to control its open state.\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the select. Must be used in conjunction with\n * onOpenChange.\n */\n open?: boolean\n\n /**\n * Event handler called when the select opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the select closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the select when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n */\n direction?: 'ltr' | 'rtl'\n\n /**\n * The name of the select. Submitted with its owning form as part of a\n * name/value pair.\n */\n name?: string\n\n /**\n * When true, prevents the user from interacting with select.\n */\n disabled?: boolean\n\n /**\n * When true, indicates that the user must select a value before the owning\n * form can be submitted.\n */\n required?: boolean\n}\n\nexport const Select = React.forwardRef<\n ElementRef<typeof StyledSelect>,\n SelectProps\n>(\n (\n {\n defaultOpen = false,\n direction = 'ltr',\n open,\n onOpen,\n onClose,\n ...restProps\n },\n forwardRef\n ) => {\n const [openState, setOpenState] = useState(defaultOpen)\n\n return (\n <StyledSelect\n {...restProps}\n dir={direction}\n open={open ?? openState}\n onOpenChange={newOpen => {\n if (open == null) {\n setOpenState(newOpen)\n }\n\n newOpen ? onOpen?.() : onClose?.()\n }}\n ref={forwardRef}\n />\n )\n }\n) as ForwardRefExoticComponent<SelectProps> & Partials\n\ninterface Partials {\n Content: typeof Content\n Separator: typeof Separator\n Label: typeof Label\n Group: typeof Group\n Item: typeof Item\n Portal: typeof Portal\n Trigger: typeof Trigger\n Value: typeof Value\n}\n\nSelect.Group = Group\nSelect.Separator = Separator\nSelect.Content = Content\nSelect.Item = Item\nSelect.Portal = Portal\nSelect.Trigger = Trigger\nSelect.Value = Value\nSelect.Label = Label\n"],"names":["RadixSelect","RadixGroup","RadixItem","RadixItemText","RadixItemIndicator","RadixPortal","RadixTrigger","RadixSelectIcon","RadixValue","RadixContent","RadixLabel","RadixSeparator"],"mappings":";;;;;;AAIa,MAAA,YAAA,GAAe,OAAOA,IAAW,CAAA;;ACAvC,MAAM,WAAc,GAAA,MAAA,CAAOC,OAAY,EAAA,EAAE,CAAA;;ACIzC,MAAM,KAAQ,GAAA,KAAA,CAAM,UAGzB,CAAA,CAAC,KAAO,EAAA,UAAA,qBAAgB,GAAA,CAAA,WAAA,EAAA,EAAa,GA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MAAC,YAAA;AAAA,MAAA;AAAA,QACE,GAAG,SAAA;AAAA,QACJ,GAAK,EAAA,SAAA;AAAA,QACL,MAAM,IAAQ,IAAA,IAAA,GAAA,IAAA,GAAA,SAAA;AAAA,QACd,cAAc,CAAW,OAAA,KAAA;AACvB,UAAA,IAAI,QAAQ,IAAM,EAAA;AAChB,YAAA,YAAA,CAAa,OAAO,CAAA,CAAA;AAAA,WACtB;AAEA,UAAA,OAAA,GAAU,MAAa,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,MAAA,EAAA,GAAA,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,EAAA,CAAA;AAAA,SACzB;AAAA,QACA,GAAK,EAAA,UAAA;AAAA,OAAA;AAAA,KACP,CAAA;AAAA,GAEJ;AACF,EAAA;AAaA,MAAA,CAAO,KAAQ,GAAA,KAAA,CAAA;AACf,MAAA,CAAO,SAAY,GAAA,SAAA,CAAA;AACnB,MAAA,CAAO,OAAU,GAAA,OAAA,CAAA;AACjB,MAAA,CAAO,IAAO,GAAA,IAAA,CAAA;AACd,MAAA,CAAO,MAAS,GAAA,MAAA,CAAA;AAChB,MAAA,CAAO,OAAU,GAAA,OAAA,CAAA;AACjB,MAAA,CAAO,KAAQ,GAAA,KAAA,CAAA;AACf,MAAA,CAAO,KAAQ,GAAA,KAAA;;;;;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../src/select.styled.tsx","../src/partials/group.styled.tsx","../src/partials/group.tsx","../src/partials/item.styled.tsx","../src/partials/item-text.styled.tsx","../src/partials/item-indicator.styled.tsx","../src/partials/item.tsx","../src/partials/portal.styled.tsx","../src/partials/portal.tsx","../src/partials/select-icon.styled.tsx","../src/partials/trigger.styled.tsx","../src/hooks/use-select-context.tsx","../src/partials/trigger.tsx","../src/partials/value.styled.tsx","../src/partials/value.tsx","../src/partials/content.styled.tsx","../src/partials/content.tsx","../src/partials/label.styled.tsx","../src/partials/label.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/select.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Root as RadixSelect } from '@radix-ui/react-select'\n\nexport const StyledSelect = styled(RadixSelect)\n\nexport type StyledSelectProps = ComponentPropsWithRef<typeof StyledSelect>\n","import { Group as RadixGroup } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroup = styled(RadixGroup, {})\n\nexport type StyledGroupProps = StrictComponentProps<typeof StyledGroup>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroup } from './group.styled'\nimport type { StyledGroupProps } from './group.styled'\n\nexport interface GroupProps extends StyledGroupProps {}\n\nexport const Group = React.forwardRef<\n ElementRef<typeof StyledGroup>,\n GroupProps\n>((props, forwardRef) => <StyledGroup {...props} ref={forwardRef} />)\n","import { Item as RadixItem } from '@radix-ui/react-select'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItem = styled(RadixItem, {\n all: 'unset',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n display: 'grid',\n fontSize: '$175',\n gridTemplateAreas: 'leftSlot textItem',\n gridTemplateColumns: '20px 1fr',\n lineHeight: '20px',\n padding: '6px $150 6px $100',\n position: 'relative',\n userSelect: 'none',\n\n ...focus.css({\n boxShadow: '$focus-small',\n outline: '1px solid transparent',\n }),\n\n '&[data-state=\"checked\"]': {\n color: '$text-primary-selected',\n },\n\n '&:active:not([aria-disabled=\"true\"])': {\n background: '$background-primary-subtle-active',\n boxShadow: 'none',\n color: '$text-primary-active',\n },\n\n '&:disabled, &[aria-disabled=\"true\"], &[data-disabled]': {\n cursor: 'default',\n color: '$text-neutrals-disabled',\n },\n\n '&:disabled, &[data-disabled]': {\n pointerEvents: 'none',\n },\n\n '&:hover:not([aria-disabled=\"true\"])': {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n '&:not([aria-disabled=\"true\"])': {\n boxShadow: 'none',\n },\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemText = styled('span', {\n display: 'flex',\n gridColumn: 2,\n width: '100%',\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItemText>\n","import { ItemIndicator as RadixItemIndicator } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemIndicator = styled(RadixItemIndicator, {})\n\nexport type StyledItemIndicatorProps = StrictComponentProps<\n typeof StyledItemIndicator\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { IconCheckMark } from '@mirohq/design-system-icons'\nimport { ItemText as RadixItemText } from '@radix-ui/react-select'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledItem } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { StyledItemText } from './item-text.styled'\nimport { StyledItemIndicator } from './item-indicator.styled'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * The value given as data when submitted with a name.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Select's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n (\n {\n disabled = false,\n textValue,\n 'aria-disabled': ariaDisabled,\n onKeyDown,\n onPointerUp,\n onPointerMove,\n onPointerLeave,\n children,\n ...restProps\n },\n forwardRef\n ) => (\n <StyledItem\n {...restProps}\n aria-disabled={booleanify(ariaDisabled) ? ariaDisabled : undefined}\n onKeyDown={e => {\n if (\n booleanify(ariaDisabled) &&\n e.code !== 'ArrowUp' &&\n e.code !== 'ArrowDown' &&\n e.code !== 'Escape'\n ) {\n e.preventDefault()\n e.stopPropagation()\n return\n }\n\n onKeyDown?.(e)\n }}\n onPointerUp={e => {\n if (booleanify(ariaDisabled)) {\n e.preventDefault()\n return\n }\n\n onPointerUp?.(e)\n }}\n onPointerMove={e => {\n if (booleanify(ariaDisabled)) {\n e.preventDefault()\n return\n }\n\n onPointerMove?.(e)\n }}\n onPointerLeave={e => {\n if (booleanify(ariaDisabled)) {\n e.preventDefault()\n return\n }\n\n onPointerLeave?.(e)\n }}\n textValue={textValue}\n disabled={disabled}\n ref={forwardRef}\n >\n <StyledItemIndicator>\n <IconCheckMark size='small' />\n </StyledItemIndicator>\n <RadixItemText asChild>\n <StyledItemText>{children}</StyledItemText>\n </RadixItemText>\n </StyledItem>\n )\n)\n","import { Portal as RadixPortal } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledPortal = styled(RadixPortal, {})\n\nexport type StyledPortalProps = StrictComponentProps<typeof StyledPortal>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledPortal } from './portal.styled'\nimport type { StyledPortalProps } from './portal.styled'\n\nexport interface PortalProps extends StyledPortalProps {\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal = React.forwardRef<\n ElementRef<typeof StyledPortal>,\n PortalProps\n>((props, forwardRef) => <StyledPortal {...props} ref={forwardRef} />)\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { SelectIcon as RadixSelectIcon } from '@radix-ui/react-select'\n\nexport const StyledSelectIcon = styled(RadixSelectIcon, { flexShrink: 0 })\n\nexport type StyledSelectIconProps = StrictComponentProps<\n typeof StyledSelectIcon\n>\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Trigger as RadixTrigger } from '@radix-ui/react-select'\nimport { focus } from '@mirohq/design-system-styles'\n\nimport { StyledSelectIcon } from './select-icon.styled'\n\nexport const StyledTrigger = styled(RadixTrigger, {\n all: 'unset',\n backgroundColor: '$background-neutrals-container',\n border: '1px solid $border-neutrals',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n display: 'flex',\n minWidth: 0,\n fontSize: '$200',\n lineHeight: 1.5,\n maxWidth: '$100',\n position: 'relative',\n userSelect: 'none',\n width: '$50',\n justifyContent: 'space-between',\n alignItems: 'center',\n\n svg: {\n color: '$icon-neutrals-text',\n },\n\n '&[data-placeholder]': {\n color: '$text-neutrals-subtle',\n },\n\n '&[data-invalid]': {\n borderColor: '$border-danger',\n\n ...focus.css({\n boxShadow: '$focus-controls-error',\n }),\n },\n\n '&:hover': {\n borderColor: '$border-primary-hover',\n },\n\n '&:active, &[data-state=\"open\"]': {\n borderColor: '$border-primary-active',\n },\n\n ...focus.css({\n boxShadow: '$focus-controls',\n outline: '1px solid transparent',\n }),\n\n '&[disabled], &[aria-disabled=\"true\"]': {\n backgroundColor: '$background-neutrals-disabled',\n borderColor: '$border-neutrals-disabled',\n color: '$text-neutrals-disabled',\n\n svg: {\n color: '$icon-neutrals-disabled',\n },\n },\n\n '&[data-state=\"open\"]': {\n [`& ${StyledSelectIcon}`]: {\n transform: 'rotate(180deg)',\n },\n },\n\n variants: {\n size: {\n medium: {\n height: '$10',\n paddingX: '$100',\n gap: '$50',\n },\n large: {\n height: '$12',\n paddingX: '$150',\n gap: '$100',\n },\n },\n },\n})\n\nexport type StyledTriggerProps = StrictComponentProps<typeof StyledTrigger>\n","import React, { createContext, useContext } from 'react'\nimport type { PropsWithChildren } from 'react'\nimport type { Booleanish } from '@mirohq/design-system-types'\n\ninterface SelectValues {\n invalid: boolean\n ariaDisabled?: Booleanish\n}\n\ninterface SelectContextProps {\n invalid: boolean\n ariaDisabled?: Booleanish\n}\n\nconst SelectContext = createContext<SelectContextProps>({} as any)\n\nexport const SelectProvider = ({\n children,\n invalid,\n ariaDisabled,\n}: PropsWithChildren<SelectValues>): any => (\n <SelectContext.Provider\n value={{\n invalid,\n ariaDisabled,\n }}\n >\n {children}\n </SelectContext.Provider>\n)\n\nexport const useSelectContext = (): SelectContextProps =>\n useContext(SelectContext)\n","import type { ElementRef } from 'react'\nimport React from 'react'\nimport { IconChevronDown } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledTrigger } from './trigger.styled'\nimport type { StyledTriggerProps } from './trigger.styled'\nimport { useSelectContext } from '../hooks/use-select-context'\nimport { StyledSelectIcon } from './select-icon.styled'\n\nexport interface TriggerProps extends StyledTriggerProps {\n /**\n * The content.\n */\n children: React.ReactNode\n}\n\nexport const Trigger = React.forwardRef<\n ElementRef<typeof StyledTrigger>,\n TriggerProps\n>(\n (\n { onKeyDown, onPointerDown, children, size = 'medium', ...restProps },\n forwardRef\n ) => {\n const { invalid, ariaDisabled } = useSelectContext()\n\n return (\n <StyledTrigger\n {...restProps}\n size={size}\n ref={forwardRef}\n aria-disabled={ariaDisabled}\n onPointerDown={e => {\n if (booleanify(ariaDisabled)) {\n e.preventDefault()\n } else {\n onPointerDown?.(e)\n }\n }}\n onKeyDown={e => {\n if (\n booleanify(ariaDisabled) &&\n e.code !== 'Tab' &&\n e.code !== 'ArrowUp' &&\n e.code !== 'ArrowDown'\n ) {\n e.preventDefault()\n } else {\n onKeyDown?.(e)\n }\n }}\n data-invalid={invalid ? '' : undefined}\n >\n {children}\n <StyledSelectIcon asChild>\n <IconChevronDown size='small' weight='thin' />\n </StyledSelectIcon>\n </StyledTrigger>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledValue = styled('span', {\n overflow: 'hidden',\n paddingX: '$50',\n\n '& span:first-child': {\n display: 'block',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n})\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Value as RadixValue } from '@radix-ui/react-select'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nimport { StyledValue } from './value.styled'\n\nexport type StyledValueProps = StrictComponentProps<typeof RadixValue>\n\nexport interface ValueProps extends StyledValueProps {\n /**\n * The content that will be rendered inside the Select.Value when no value or\n * defaultValue is set.\n */\n placeholder?: React.ReactNode\n\n /**\n * The controlled content that will be rendered inside the Select.Value.\n */\n children?: React.ReactNode\n}\n\nexport const Value = React.forwardRef<\n ElementRef<typeof StyledValue>,\n ValueProps\n>((props, forwardRef) => (\n <StyledValue>\n <RadixValue {...props} ref={forwardRef} />\n </StyledValue>\n))\n","import { Content as RadixContent } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledContent = styled(RadixContent, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n fontSize: '$175',\n fontWeight: 'normal',\n lineHeight: '20px',\n minWidth: 'var(--radix-select-trigger-width)',\n padding: '$50',\n zIndex: '$select',\n\n '& [data-radix-scroll-area-viewport]': {\n padding: `2px $50 2px 2px`,\n boxSizing: 'border-box',\n },\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import React, { useCallback } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ScrollArea } from '@mirohq/design-system-scroll-area'\nimport type { CSS, CSSProperties } from '@stitches/react'\nimport { Viewport as RadixViewport } from '@radix-ui/react-select'\nimport { theme } from '@mirohq/design-system-stitches'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport type {\n Boundary,\n PointerDownOutsideEvent,\n Side,\n Align,\n Overflow,\n Sticky,\n} from '../types'\n\nexport const CONTENT_OFFSET = parseInt(theme.space[50])\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault.\n */\n onCloseAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n\n /**\n * Event handler called when a pointer event occurs outside the bounds of the\n * component. It can be prevented by calling event.preventDefault.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void\n\n /**\n * The preferred side of the anchor to render against when open. Will be\n * reversed when collisions occur and avoidCollisions is enabled. Only\n * available when position is set to popper.\n */\n side?: Side\n\n /**\n * The distance in pixels from the anchor. Only available when position is set\n * to popper.\n */\n sideOffset?: number\n\n /**\n * The preferred alignment against the anchor. May change when collisions\n * occur. Only available when position is set to popper.\n */\n align?: Align\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment options. Only\n * available when position is set to popper.\n */\n alignOffset?: number\n\n /**\n * When true, overrides the side andalign preferences to prevent collisions\n * with boundary edges. Only available when position is set to popper.\n */\n avoidCollisions?: boolean\n\n /**\n * The element used as the collision boundary. By default this is the\n * viewport, though you can provide additional element(s) to be included in\n * this check. Only available when position is set to popper.\n */\n collisionBoundary?: Boundary\n\n /**\n * The distance in pixels from the boundary edges where collision detection\n * should occur. Accepts a number (same for all sides), or a partial padding\n * object, for example: { top: 20, left: 20 }. Only available when position is\n * set to popper.\n */\n collisionPadding?: number | Partial<Record<Side, number>>\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in the\n * boundary as long as the trigger is at least partially in the boundary whilst\n * \"always\" will keep the content in the boundary regardless. Only available\n * when position is set to popper.\n */\n sticky?: Sticky\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded. Only\n * available when position is set to popper.\n */\n hideWhenDetached?: boolean\n\n /**\n * The max height for the content.\n */\n maxHeight?: CSSProperties['maxHeight']\n\n /**\n * Setting overflow as \"visible\" means that the content can extend beyond the\n * its collision boundary without any clipping or scrolling being\n * applied.\n * When set to \"auto,\" a scrollbar is added if the content exceeds its\n * boundaries. If no maxHeight is defined, it will be automatically adjusted\n * to fit the remaining space between the trigger and the boundary edge.\n */\n overflow?: Overflow\n\n /**\n * Select's content.\n */\n children?: ReactNode\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(\n (\n {\n side = 'bottom',\n sideOffset = CONTENT_OFFSET,\n align = 'center',\n alignOffset = 0,\n collisionPadding = 0,\n avoidCollisions = true,\n sticky = 'partial',\n hideWhenDetached = true,\n overflow = 'visible',\n maxHeight,\n children,\n ...restProps\n },\n forwardRef\n ) => {\n const getOverflowMaxHeight = useCallback((): CSS => {\n const overflowMaxHeigh = `calc(var(--radix-select-content-available-height))`\n\n return {\n maxHeight: maxHeight ?? overflowMaxHeigh,\n }\n }, [maxHeight])\n return (\n <StyledContent\n {...restProps}\n ref={forwardRef}\n position='popper'\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n avoidCollisions={avoidCollisions}\n collisionPadding={collisionPadding}\n sticky={sticky}\n hideWhenDetached={hideWhenDetached}\n >\n <RadixViewport>\n {overflow === 'auto' ? (\n <ScrollArea type='always'>\n <ScrollArea.Viewport css={getOverflowMaxHeight()}>\n {children}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation='vertical'>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea>\n ) : (\n <>{children}</>\n )}\n </RadixViewport>\n </StyledContent>\n )\n }\n)\n","import { Label as RadixLabel } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledLabel = styled(RadixLabel, {\n color: '$text-neutrals-subtle',\n marginLeft: '$300',\n padding: '6px $50',\n})\n\nexport type StyledLabelProps = StrictComponentProps<typeof StyledLabel>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledLabel } from './label.styled'\nimport type { StyledLabelProps } from './label.styled'\n\nexport interface LabelProps extends StyledLabelProps {}\n\nexport const Label = React.forwardRef<\n ElementRef<typeof StyledLabel>,\n LabelProps\n>((props, forwardRef) => <StyledLabel {...props} ref={forwardRef} />)\n","import { Separator as RadixSeparator } from '@radix-ui/react-select'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledSeparator = styled(RadixSeparator, {\n backgroundColor: '$border-neutrals-subtle',\n height: '1px',\n width: '100%',\n margin: '5.5px 0',\n})\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledSeparator } from './separator.styled'\nimport type { StyledSeparatorProps } from './separator.styled'\n\nexport interface SeparatorProps extends StyledSeparatorProps {}\n\nexport const Separator = React.forwardRef<\n ElementRef<typeof StyledSeparator>,\n SeparatorProps\n>((props, forwardRef) => <StyledSeparator {...props} ref={forwardRef} />)\n","import React, { useState } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport type { Booleanish } from '@mirohq/design-system-types'\n\nimport { StyledSelect } from './select.styled'\nimport type { StyledSelectProps } from './select.styled'\nimport { Group } from './partials/group'\nimport { Item } from './partials/item'\nimport { Portal } from './partials/portal'\nimport { Trigger } from './partials/trigger'\nimport { Value } from './partials/value'\nimport { Content } from './partials/content'\nimport { Label } from './partials/label'\nimport { Separator } from './partials/separator'\nimport { SelectProvider } from './hooks/use-select-context'\n\nexport interface SelectProps extends StyledSelectProps {\n /**\n * The value of the select when initially rendered. Use when you do not need\n * to control the state of the select.\n */\n defaultValue?: string\n\n /**\n * The controlled value of the select. Should be used in conjunction with\n * onValueChange.\n */\n value?: string\n\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string) => void\n\n /**\n * The open state of the select when it is initially rendered. Use when you do\n * not need to control its open state.\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the select. Must be used in conjunction with\n * onOpenChange.\n */\n open?: boolean\n\n /**\n * Event handler called when the select opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the select closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the select when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n */\n direction?: 'ltr' | 'rtl'\n\n /**\n * The name of the select. Submitted with its owning form as part of a\n * name/value pair.\n */\n name?: string\n\n /**\n * When true, prevents the user from interacting with select.\n */\n disabled?: boolean\n\n /**\n * When true, prevents the user from opening with select, while allowing focus and hover.\n */\n 'aria-disabled'?: Booleanish\n\n /**\n * When true, indicates that the user must select a value before the owning\n * form can be submitted.\n */\n required?: boolean\n\n /**\n * When true, indicates that the select value contains an error which have to be fixed before the owning\n * form can be submitted.\n */\n invalid?: boolean\n}\n\nexport const Select = React.forwardRef<\n ElementRef<typeof StyledSelect>,\n SelectProps\n>(\n (\n {\n defaultOpen = false,\n direction = 'ltr',\n open,\n onOpen,\n onClose,\n invalid = false,\n 'aria-disabled': ariaDisabled,\n disabled,\n ...restProps\n },\n forwardRef\n ) => {\n const [openState, setOpenState] = useState(defaultOpen)\n return (\n <SelectProvider invalid={invalid} ariaDisabled={ariaDisabled}>\n <StyledSelect\n {...restProps}\n aria-disabled={ariaDisabled}\n disabled={disabled}\n dir={direction}\n open={open ?? openState}\n onOpenChange={newOpen => {\n if (open == null) {\n setOpenState(newOpen)\n }\n\n newOpen ? onOpen?.() : onClose?.()\n }}\n ref={forwardRef}\n />\n </SelectProvider>\n )\n }\n) as ForwardRefExoticComponent<SelectProps> & Partials\n\ninterface Partials {\n Content: typeof Content\n Separator: typeof Separator\n Label: typeof Label\n Group: typeof Group\n Item: typeof Item\n Portal: typeof Portal\n Trigger: typeof Trigger\n Value: typeof Value\n}\n\nSelect.Group = Group\nSelect.Separator = Separator\nSelect.Content = Content\nSelect.Item = Item\nSelect.Portal = Portal\nSelect.Trigger = Trigger\nSelect.Value = Value\nSelect.Label = Label\n"],"names":["RadixSelect","RadixGroup","RadixItem","RadixItemIndicator","R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