@mirohq/design-system-combobox 0.1.0-combobox.0 → 0.1.0-combobox.2

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/main.js CHANGED
@@ -4,15 +4,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var React = require('react');
7
- var interactions = require('@react-aria/interactions');
8
- var designSystemUtils = require('@mirohq/design-system-utils');
7
+ var Ariakit = require('@ariakit/react');
9
8
  var designSystemBaseForm = require('@mirohq/design-system-base-form');
10
- var designSystemInput = require('@mirohq/design-system-input');
9
+ var RadixPopover = require('@radix-ui/react-popover');
10
+ var designSystemUtils = require('@mirohq/design-system-utils');
11
11
  var designSystemIcons = require('@mirohq/design-system-icons');
12
+ var designSystemInput = require('@mirohq/design-system-input');
12
13
  var designSystemStitches = require('@mirohq/design-system-stitches');
14
+ var designSystemUseAriaDisabled = require('@mirohq/design-system-use-aria-disabled');
15
+ var designSystemStyles = require('@mirohq/design-system-styles');
13
16
  var designSystemPrimitive = require('@mirohq/design-system-primitive');
14
- var Ariakit = require('@ariakit/react');
15
- var reactPopover = require('@radix-ui/react-popover');
16
17
 
17
18
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
19
 
@@ -36,8 +37,52 @@ function _interopNamespace(e) {
36
37
 
37
38
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
38
39
  var Ariakit__namespace = /*#__PURE__*/_interopNamespace(Ariakit);
40
+ var RadixPopover__namespace = /*#__PURE__*/_interopNamespace(RadixPopover);
41
+
42
+ const StyledActionButton = designSystemStitches.styled(designSystemInput.Input.ActionButton, {
43
+ position: "absolute",
44
+ right: "$100",
45
+ top: "6px"
46
+ });
39
47
 
40
- const StyledTrigger = designSystemStitches.styled(designSystemInput.Input, {});
48
+ const ComboboxContext = React.createContext({});
49
+ const ComboboxProvider = ({
50
+ children,
51
+ defaultOpen,
52
+ valid,
53
+ value: valueProp,
54
+ defaultValue: defaultValueProp,
55
+ ...restProps
56
+ }) => {
57
+ const triggerRef = React.useRef(null);
58
+ const contentRef = React.useRef(null);
59
+ const [openState, setOpenState] = React.useState(defaultOpen);
60
+ const [value, setValue] = React.useState(valueProp != null ? valueProp : []);
61
+ const [defaultValue, setDefaultValue] = React.useState(defaultValueProp);
62
+ const [searchValue, setSearchValue] = React.useState();
63
+ const { valid: formFieldValid } = designSystemBaseForm.useFormFieldContext();
64
+ return /* @__PURE__ */ jsxRuntime.jsx(
65
+ ComboboxContext.Provider,
66
+ {
67
+ value: {
68
+ ...restProps,
69
+ valid: valid != null ? valid : formFieldValid,
70
+ openState,
71
+ setOpenState,
72
+ value,
73
+ setValue,
74
+ setDefaultValue,
75
+ defaultValue,
76
+ searchValue,
77
+ setSearchValue,
78
+ triggerRef,
79
+ contentRef
80
+ },
81
+ children
82
+ }
83
+ );
84
+ };
85
+ const useComboboxContext = () => React.useContext(ComboboxContext);
41
86
 
42
87
  const Trigger = React__default["default"].forwardRef(
43
88
  ({
@@ -45,59 +90,91 @@ const Trigger = React__default["default"].forwardRef(
45
90
  children,
46
91
  size = "large",
47
92
  "aria-describedby": ariaDescribedBy,
48
- onHoverChange,
49
- onHoverStart,
50
- onHoverEnd,
93
+ "aria-invalid": ariaInvalid,
94
+ placeholder,
51
95
  ...restProps
52
96
  }, forwardRef) => {
97
+ const {
98
+ "aria-disabled": ariaDisabled,
99
+ valid: comboboxValid,
100
+ disabled,
101
+ value,
102
+ triggerRef
103
+ } = useComboboxContext();
53
104
  const {
54
105
  formElementId,
55
106
  ariaDescribedBy: formFieldContextDescribedBy,
56
- ariaInvalid,
107
+ ariaInvalid: formFieldAriaInvalid,
57
108
  valid: formFieldValid
58
109
  } = designSystemBaseForm.useFormFieldContext();
59
- const valid = formFieldValid;
60
- const { hoverProps } = interactions.useHover({
61
- onHoverStart,
62
- onHoverEnd,
63
- onHoverChange: (isHovering) => {
64
- onHoverChange == null ? void 0 : onHoverChange(isHovering);
65
- }
66
- });
67
- const commonProps = {
110
+ const valid = formFieldValid != null ? formFieldValid : comboboxValid;
111
+ const inputProps = {
68
112
  ...restProps,
69
- ref: forwardRef,
70
- "aria-invalid": ariaInvalid,
113
+ "aria-disabled": ariaDisabled,
114
+ "aria-invalid": ariaInvalid != null ? ariaInvalid : formFieldAriaInvalid,
71
115
  "aria-describedby": designSystemUtils.stringAttrValue(
72
116
  ariaDescribedBy,
73
117
  formFieldContextDescribedBy
74
118
  ),
75
119
  valid,
120
+ disabled,
76
121
  invalid: designSystemUtils.booleanishAttrValue(valid),
77
- id: id != null ? id : formElementId
122
+ id: id != null ? id : formElementId,
123
+ placeholder: (value == null ? void 0 : value.length) === 0 ? placeholder : void 0
78
124
  };
79
125
  const variants = {
80
126
  size
81
127
  };
82
- return /* @__PURE__ */ jsxRuntime.jsxs(StyledTrigger, { ...hoverProps, ...commonProps, ...variants, children: [
83
- children,
84
- /* @__PURE__ */ jsxRuntime.jsx(designSystemInput.Input.ActionButton, { label: "custom label", children: /* @__PURE__ */ jsxRuntime.jsx(designSystemIcons.IconChevronDown, { size: "small", weight: "thin" }) })
85
- ] });
128
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixPopover__namespace.Anchor, { ref: designSystemUtils.mergeRefs([triggerRef, forwardRef]), children: /* @__PURE__ */ jsxRuntime.jsx(
129
+ Ariakit.Combobox,
130
+ {
131
+ render: /* @__PURE__ */ jsxRuntime.jsxs(designSystemInput.Input, { ...inputProps, ...variants, children: [
132
+ children,
133
+ /* @__PURE__ */ jsxRuntime.jsx(StyledActionButton, { label: "custom label", children: /* @__PURE__ */ jsxRuntime.jsx(designSystemIcons.IconChevronDown, { size: "small", weight: "thin" }) })
134
+ ] })
135
+ }
136
+ ) });
86
137
  }
87
138
  );
88
139
 
89
- const StyledContent = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
140
+ const StyledContent = designSystemStitches.styled(RadixPopover__namespace.Content, {
90
141
  backgroundColor: "$background-neutrals-container",
91
142
  borderRadius: "$50",
92
143
  boxShadow: "$50",
93
- minWidth: "var(--radix-select-trigger-width)",
94
- padding: "$50",
95
- zIndex: "$select"
144
+ fontSize: "$175",
145
+ fontWeight: "normal",
146
+ lineHeight: "1.5",
147
+ minWidth: "var(--radix-popover-trigger-width)",
148
+ zIndex: "$select",
149
+ overflowY: "auto",
150
+ marginTop: "$200"
96
151
  });
97
152
 
98
- const Content = React__default["default"].forwardRef(({ children, ...restProps }, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledContent, { ...restProps, ref: forwardRef, children }));
153
+ const Content = React__default["default"].forwardRef(({ children, ...restProps }, forwardRef) => {
154
+ const { triggerRef, contentRef } = useComboboxContext();
155
+ return /* @__PURE__ */ jsxRuntime.jsx(
156
+ StyledContent,
157
+ {
158
+ ...restProps,
159
+ ref: designSystemUtils.mergeRefs([forwardRef, contentRef]),
160
+ onOpenAutoFocus: (event) => event.preventDefault(),
161
+ onInteractOutside: (event) => {
162
+ var _a, _b;
163
+ const target = event.target;
164
+ const isTrigger = target === triggerRef.current;
165
+ const isContent = (_b = target != null && ((_a = contentRef.current) == null ? void 0 : _a.contains(target))) != null ? _b : false;
166
+ if (isTrigger || isContent) {
167
+ event.preventDefault();
168
+ }
169
+ },
170
+ children
171
+ }
172
+ );
173
+ });
99
174
 
100
- const StyledItem = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
175
+ const StyledItem = designSystemStitches.styled(Ariakit.ComboboxItem, {
176
+ display: "flex",
177
+ alignItems: "center",
101
178
  borderRadius: "$50",
102
179
  boxSizing: "border-box",
103
180
  color: "$text-neutrals",
@@ -108,22 +185,43 @@ const StyledItem = designSystemStitches.styled(designSystemPrimitive.Primitive.d
108
185
  userSelect: "none",
109
186
  padding: "6px 0",
110
187
  paddingInline: "$150 $100",
188
+ ...designSystemStyles.focus.css({
189
+ boxShadow: "$focus-small",
190
+ outline: "1px solid transparent"
191
+ }),
111
192
  '&:hover:not([aria-disabled="true"])': {
112
193
  background: "$background-primary-subtle-hover",
113
194
  color: "$text-primary-hover"
195
+ },
196
+ "&:disabled, &[aria-disabled=true], &[data-disabled]": {
197
+ cursor: "default",
198
+ color: "$text-neutrals-disabled"
114
199
  }
115
200
  });
116
201
 
117
- const StyledItemIndicator = designSystemStitches.styled(Ariakit__namespace.ComboboxItemCheck, {});
118
-
119
202
  const Item = React__default["default"].forwardRef(
120
- ({ textValue, children, ...restProps }, forwardRef) => /* @__PURE__ */ jsxRuntime.jsxs(StyledItem, { ref: forwardRef, ...restProps, children: [
121
- /* @__PURE__ */ jsxRuntime.jsx(StyledItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystemIcons.IconCheckMark, { size: "small" }) }),
122
- children
123
- ] })
203
+ ({ disabled = false, value, textValue, children, ...restProps }, forwardRef) => {
204
+ const { "aria-disabled": ariaDisabled, ...restAriaDisabledProps } = designSystemUseAriaDisabled.useAriaDisabled(restProps, { allowArrows: true });
205
+ return /* @__PURE__ */ jsxRuntime.jsxs(
206
+ StyledItem,
207
+ {
208
+ ...restProps,
209
+ ...restAriaDisabledProps,
210
+ focusable: true,
211
+ accessibleWhenDisabled: ariaDisabled === true,
212
+ disabled: ariaDisabled === true || disabled,
213
+ ref: forwardRef,
214
+ value,
215
+ children: [
216
+ /* @__PURE__ */ jsxRuntime.jsx(Ariakit__namespace.ComboboxItemCheck, {}),
217
+ children
218
+ ]
219
+ }
220
+ );
221
+ }
124
222
  );
125
223
 
126
- const Portal = (props) => /* @__PURE__ */ jsxRuntime.jsx(reactPopover.Portal, { ...props });
224
+ const Portal = (props) => /* @__PURE__ */ jsxRuntime.jsx(RadixPopover.Portal, { ...props });
127
225
 
128
226
  const StyledGroup = designSystemStitches.styled(Ariakit.Group, {});
129
227
 
@@ -133,15 +231,105 @@ const StyledGroupLabel = designSystemStitches.styled(Ariakit.GroupLabel, {});
133
231
 
134
232
  const GroupLabel = React__default["default"].forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledGroupLabel, { ...props, ref: forwardRef }));
135
233
 
136
- const StyledCombobox = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {});
234
+ const StyledValue = designSystemStitches.styled(designSystemPrimitive.Primitive.span, {});
235
+
236
+ const Value = React__default["default"].forwardRef(
237
+ (props, forwardRef) => {
238
+ const { value } = useComboboxContext();
239
+ const isEmpty = (value == null ? void 0 : value.length) === 0;
240
+ if (isEmpty) {
241
+ return null;
242
+ }
243
+ return /* @__PURE__ */ jsxRuntime.jsx(StyledValue, { ref: forwardRef, ...props, children: value });
244
+ }
245
+ );
137
246
 
138
- const Combobox = React__default["default"].forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledCombobox, { ...props, ref: forwardRef }));
247
+ const StyledComboboxContent = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {});
248
+
249
+ const Root = React__default["default"].forwardRef(({ value: valueProp, onValueChange, children, ...restProps }, forwardRef) => {
250
+ const {
251
+ openState,
252
+ setOpenState,
253
+ defaultValue,
254
+ value,
255
+ setValue,
256
+ required,
257
+ readOnly,
258
+ "aria-disabled": ariaDisabled,
259
+ disabled,
260
+ direction
261
+ } = useComboboxContext();
262
+ const { setRequired, setDisabled, setAriaDisabled, setReadOnly } = designSystemBaseForm.useFormFieldContext();
263
+ React.useEffect(() => {
264
+ setRequired == null ? void 0 : setRequired(required);
265
+ setDisabled == null ? void 0 : setDisabled(disabled);
266
+ setAriaDisabled == null ? void 0 : setAriaDisabled(ariaDisabled);
267
+ setReadOnly == null ? void 0 : setReadOnly(readOnly);
268
+ }, [
269
+ readOnly,
270
+ disabled,
271
+ ariaDisabled,
272
+ required,
273
+ setRequired,
274
+ setDisabled,
275
+ setAriaDisabled,
276
+ setReadOnly
277
+ ]);
278
+ const onSetSelectedValue = (newValue) => {
279
+ onValueChange == null ? void 0 : onValueChange(newValue);
280
+ setValue(newValue);
281
+ };
282
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixPopover__namespace.Root, { open: openState, onOpenChange: setOpenState, children: /* @__PURE__ */ jsxRuntime.jsx(
283
+ Ariakit__namespace.ComboboxProvider,
284
+ {
285
+ open: openState,
286
+ setOpen: setOpenState,
287
+ defaultSelectedValue: defaultValue,
288
+ selectedValue: value,
289
+ setSelectedValue: onSetSelectedValue,
290
+ children: /* @__PURE__ */ jsxRuntime.jsx(StyledComboboxContent, { ...restProps, ref: forwardRef, dir: direction, children })
291
+ }
292
+ ) });
293
+ });
294
+ const Combobox = React__default["default"].forwardRef(
295
+ ({
296
+ "aria-disabled": ariaDisabled,
297
+ defaultOpen = false,
298
+ open,
299
+ valid,
300
+ disabled,
301
+ readOnly,
302
+ required,
303
+ value,
304
+ defaultValue,
305
+ onOpen,
306
+ onValueChange,
307
+ direction = "ltr",
308
+ ...restProps
309
+ }, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(
310
+ ComboboxProvider,
311
+ {
312
+ defaultValue,
313
+ value,
314
+ defaultOpen,
315
+ open,
316
+ valid,
317
+ required,
318
+ disabled,
319
+ readOnly,
320
+ "aria-disabled": ariaDisabled,
321
+ direction,
322
+ children: /* @__PURE__ */ jsxRuntime.jsx(Root, { ...restProps, value, ref: forwardRef })
323
+ }
324
+ )
325
+ );
139
326
  Combobox.Portal = Portal;
140
327
  Combobox.Trigger = Trigger;
141
328
  Combobox.Content = Content;
142
329
  Combobox.Item = Item;
143
330
  Combobox.Group = Group;
144
331
  Combobox.GroupLabel = GroupLabel;
332
+ Combobox.Value = Value;
145
333
 
146
334
  exports.Combobox = Combobox;
147
335
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sources":["../src/partials/trigger.styled.tsx","../src/partials/trigger.tsx","../src/partials/content.styled.tsx","../src/partials/content.tsx","../src/partials/item.styled.tsx","../src/partials/item-indicator.styled.tsx","../src/partials/item.tsx","../src/partials/portal.tsx","../src/partials/group.styled.tsx","../src/partials/group.tsx","../src/partials/group-label.styled.tsx","../src/partials/group-label.tsx","../src/combobox.styled.tsx","../src/combobox.tsx"],"sourcesContent":["import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledTrigger = styled(Input, {})\n\nexport type StyledTriggerProps = StrictComponentProps<typeof StyledTrigger>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { useHover } from '@react-aria/interactions'\nimport type { HoverEvents } from '@react-types/shared'\nimport {\n booleanishAttrValue,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport { Input } from '@mirohq/design-system-input'\nimport { IconChevronDown } from '@mirohq/design-system-icons'\n\nimport { StyledTrigger } from './trigger.styled'\nimport type { StyledTriggerProps } from './trigger.styled'\n\nexport interface TriggerProps extends StyledTriggerProps, HoverEvents {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: StyledTriggerProps['size']\n}\n\nexport const Trigger = React.forwardRef<\n ElementRef<typeof StyledTrigger>,\n TriggerProps\n>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n onHoverChange,\n onHoverStart,\n onHoverEnd,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid,\n valid: formFieldValid,\n } = useFormFieldContext()\n\n /** @todo: validity, add validation logic after implementing the combobox context */\n const valid = formFieldValid\n\n const { hoverProps } = useHover({\n onHoverStart,\n onHoverEnd,\n onHoverChange: isHovering => {\n onHoverChange?.(isHovering)\n },\n })\n\n const commonProps = {\n ...restProps,\n ref: forwardRef,\n 'aria-invalid': ariaInvalid,\n 'aria-describedby': stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n ),\n valid,\n invalid: booleanishAttrValue(valid),\n id: id ?? formElementId,\n }\n\n const variants = {\n size,\n }\n\n return (\n <StyledTrigger {...hoverProps} {...commonProps} {...variants}>\n {children}\n <Input.ActionButton label='custom label'>\n <IconChevronDown size='small' weight='thin' />\n </Input.ActionButton>\n </StyledTrigger>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledContent = styled(Primitive.div, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n minWidth: 'var(--radix-select-trigger-width)',\n padding: '$50',\n zIndex: '$select',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * Combobox's content.\n */\n children?: ReactNode\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(({ children, ...restProps }, forwardRef) => (\n <StyledContent {...restProps} ref={forwardRef}>\n {children}\n </StyledContent>\n))\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledItem = styled(Primitive.div, {\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n fontSize: '$175',\n lineHeight: 1.5,\n position: 'relative',\n userSelect: 'none',\n padding: '6px 0',\n paddingInline: '$150 $100',\n\n '&:hover:not([aria-disabled=\"true\"])': {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import * as Ariakit from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemIndicator = styled(Ariakit.ComboboxItemCheck, {})\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'\n\nimport { StyledItem } from './item.styled'\nimport type { StyledItemProps } from './item.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 * @default false\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Combobox'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 ({ textValue, children, ...restProps }, forwardRef) => (\n <StyledItem ref={forwardRef} {...restProps}>\n <StyledItemIndicator>\n <IconCheckMark size='small' />\n </StyledItemIndicator>\n {children}\n </StyledItem>\n )\n)\n","import React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import { Group } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroup = styled(Group, {})\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 { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroupLabel = styled(GroupLabel, {})\n\nexport type StyledGroupLabelProps = StrictComponentProps<\n typeof StyledGroupLabel\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroupLabel } from './group-label.styled'\nimport type { StyledGroupLabelProps } from './group-label.styled'\n\nexport interface GroupLabelProps extends StyledGroupLabelProps {}\n\nexport const GroupLabel = React.forwardRef<\n ElementRef<typeof StyledGroupLabel>,\n GroupLabelProps\n>((props, forwardRef) => <StyledGroupLabel {...props} ref={forwardRef} />)\n","import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledCombobox = styled(Primitive.div, {})\n\nexport type StyledComboboxProps = ComponentPropsWithRef<typeof StyledCombobox>\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\n\nimport { Trigger } from './partials/trigger'\nimport { Content } from './partials/content'\nimport { Item } from './partials/item'\nimport { Portal } from './partials/portal'\nimport { Group } from './partials/group'\nimport { GroupLabel } from './partials/group-label'\nimport { StyledCombobox } from './combobox.styled'\nimport type { StyledComboboxProps } from './combobox.styled'\n\nexport interface ComboboxProps extends StyledComboboxProps {}\n\nexport const Combobox = React.forwardRef<\n ElementRef<typeof StyledCombobox>,\n ComboboxProps\n>((props, forwardRef) => (\n <StyledCombobox {...props} ref={forwardRef} />\n)) as ForwardRefExoticComponent<ComboboxProps> & Partials\n\nexport interface Partials {\n Portal: typeof Portal\n Trigger: typeof Trigger\n Content: typeof Content\n Item: typeof Item\n Group: typeof Group\n GroupLabel: typeof GroupLabel\n}\n\nCombobox.Portal = Portal\nCombobox.Trigger = Trigger\nCombobox.Content = Content\nCombobox.Item = Item\nCombobox.Group = Group\nCombobox.GroupLabel = GroupLabel\n"],"names":["styled","Input","React","useFormFieldContext","useHover","stringAttrValue","booleanishAttrValue","jsx","IconChevronDown","Primit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,MAAM,QAAW,GAAAP,yBAAA,CAAM,UAG5B,CAAA,CAAC,KAAO,EAAA,UAAA,qBACPK,cAAA,CAAA,cAAA,EAAA,EAAgB,GAAG,KAAA,EAAO,GAAK,EAAA,UAAA,EAAY,CAC7C,EAAA;AAWD,QAAA,CAAS,MAAS,GAAA,MAAA,CAAA;AAClB,QAAA,CAAS,OAAU,GAAA,OAAA,CAAA;AACnB,QAAA,CAAS,OAAU,GAAA,OAAA,CAAA;AACnB,QAAA,CAAS,IAAO,GAAA,IAAA,CAAA;AAChB,QAAA,CAAS,KAAQ,GAAA,KAAA,CAAA;AACjB,QAAA,CAAS,UAAa,GAAA,UAAA;;;;"}
1
+ {"version":3,"file":"main.js","sources":["../src/partials/trigger.styled.tsx","../src/hooks/use-combobox-context.tsx","../src/partials/trigger.tsx","../src/partials/content.styled.tsx","../src/partials/content.tsx","../src/partials/item.styled.tsx","../src/partials/item.tsx","../src/partials/portal.tsx","../src/partials/group.styled.tsx","../src/partials/group.tsx","../src/partials/group-label.styled.tsx","../src/partials/group-label.tsx","../src/partials/value.styled.tsx","../src/partials/value.tsx","../src/combobox.styled.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledActionButton = styled(Input.ActionButton, {\n position: 'absolute',\n right: '$100',\n top: '6px',\n})\n","import React, { createContext, useContext, useRef, useState } from 'react'\nimport type { PropsWithChildren } from 'react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\nimport type { Direction } from '../types'\n\ninterface ComboboxProps extends FormElementProps {\n open?: boolean\n defaultOpen?: boolean\n value?: string[]\n defaultValue?: string[]\n searchValue?: string\n direction?: Direction\n}\n\ninterface ComboboxContextProps extends ComboboxProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean | undefined>>\n openState?: boolean | undefined\n setValue: React.Dispatch<React.SetStateAction<string[]>>\n setDefaultValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n setSearchValue: React.Dispatch<React.SetStateAction<string | undefined>>\n triggerRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n}\n\nexport type ComboboxProviderProps = ComboboxProps\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n defaultOpen,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n ...restProps\n}: PropsWithChildren<ComboboxProviderProps>): JSX.Element => {\n const triggerRef = useRef<HTMLInputElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n\n const [openState, setOpenState] = useState(defaultOpen)\n const [value, setValue] = useState(valueProp ?? [])\n const [defaultValue, setDefaultValue] = useState(defaultValueProp)\n const [searchValue, setSearchValue] = useState<string | undefined>()\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n setDefaultValue,\n defaultValue,\n searchValue,\n setSearchValue,\n triggerRef,\n contentRef,\n }}\n >\n {children}\n </ComboboxContext.Provider>\n )\n}\n\nexport const useComboboxContext = (): ComboboxContextProps =>\n useContext(ComboboxContext)\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox } from '@ariakit/react'\nimport {\n booleanishAttrValue,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport { IconChevronDown } from '@mirohq/design-system-icons'\nimport { Input } from '@mirohq/design-system-input'\nimport type { InputProps } from '@mirohq/design-system-input'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { StyledActionButton } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport type TriggerProps = InputProps & {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: InputProps['size']\n\n /**\n * The content that will be rendered inside the Combobox.Trigger when no value or\n * defaultValue is set.\n */\n placeholder?: string\n}\n\nexport const Trigger = React.forwardRef<ElementRef<typeof Input>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n 'aria-disabled': ariaDisabled,\n valid: comboboxValid,\n disabled,\n value,\n triggerRef,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n } = useFormFieldContext()\n\n const valid = formFieldValid ?? comboboxValid\n\n const inputProps = {\n ...restProps,\n 'aria-disabled': ariaDisabled,\n 'aria-invalid': ariaInvalid ?? formFieldAriaInvalid,\n 'aria-describedby': stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n ),\n valid,\n disabled,\n invalid: booleanishAttrValue(valid),\n id: id ?? formElementId,\n placeholder: value?.length === 0 ? placeholder : undefined,\n }\n\n const variants = {\n size,\n }\n\n return (\n <RadixPopover.Anchor ref={mergeRefs([triggerRef, forwardRef])}>\n <Combobox\n render={\n <Input {...inputProps} {...variants}>\n {children}\n {/* @todo https://miro.atlassian.net/browse/CLC-335 */}\n <StyledActionButton label='custom label'>\n <IconChevronDown size='small' weight='thin' />\n </StyledActionButton>\n </Input>\n }\n />\n </RadixPopover.Anchor>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nexport const StyledContent = styled(RadixPopover.Content, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n fontSize: '$175',\n fontWeight: 'normal',\n lineHeight: '1.5',\n minWidth: 'var(--radix-popover-trigger-width)',\n zIndex: '$select',\n overflowY: 'auto',\n marginTop: '$200',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * Combobox's content.\n */\n children?: ReactNode\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(({ children, ...restProps }, forwardRef) => {\n const { triggerRef, contentRef } = useComboboxContext()\n\n return (\n <StyledContent\n {...restProps}\n ref={mergeRefs([forwardRef, contentRef])}\n onOpenAutoFocus={event => event.preventDefault()}\n onInteractOutside={event => {\n const target = event.target as Element | null\n const isTrigger = target === triggerRef.current\n const isContent =\n (target != null && contentRef.current?.contains(target)) ?? false\n if (isTrigger || isContent) {\n event.preventDefault()\n }\n }}\n >\n {children}\n </StyledContent>\n )\n})\n","import { ComboboxItem } from '@ariakit/react'\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(ComboboxItem, {\n display: 'flex',\n alignItems: 'center',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n fontSize: '$175',\n lineHeight: 1.5,\n position: 'relative',\n userSelect: 'none',\n padding: '6px 0',\n paddingInline: '$150 $100',\n\n ...focus.css({\n boxShadow: '$focus-small',\n outline: '1px solid transparent',\n }),\n\n '&:hover:not([aria-disabled=\"true\"])': {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n },\n\n '&:disabled, &[aria-disabled=true], &[data-disabled]': {\n cursor: 'default',\n color: '$text-neutrals-disabled',\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport * as Ariakit from '@ariakit/react'\nimport { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled'\n\nimport { StyledItem } from './item.styled'\nimport type { StyledItemProps } from './item.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 * @default false\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Combobox's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n\n /**\n * Item's content.\n */\n children?: ReactNode\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n (\n { disabled = false, value, textValue, children, ...restProps },\n forwardRef\n ) => {\n const { 'aria-disabled': ariaDisabled, ...restAriaDisabledProps } =\n useAriaDisabled(restProps, { allowArrows: true })\n\n return (\n <StyledItem\n {...restProps}\n {...restAriaDisabledProps}\n focusable\n accessibleWhenDisabled={ariaDisabled === true}\n disabled={ariaDisabled === true || disabled}\n ref={forwardRef}\n value={value}\n >\n <Ariakit.ComboboxItemCheck />\n {children}\n </StyledItem>\n )\n }\n)\n","import React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import { Group } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroup = styled(Group, {})\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 { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroupLabel = styled(GroupLabel, {})\n\nexport type StyledGroupLabelProps = StrictComponentProps<\n typeof StyledGroupLabel\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroupLabel } from './group-label.styled'\nimport type { StyledGroupLabelProps } from './group-label.styled'\n\nexport interface GroupLabelProps extends StyledGroupLabelProps {}\n\nexport const GroupLabel = React.forwardRef<\n ElementRef<typeof StyledGroupLabel>,\n GroupLabelProps\n>((props, forwardRef) => <StyledGroupLabel {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledValue = styled(Primitive.span, {})\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { StyledValue } from './value.styled'\n\nexport const Value = React.forwardRef<ElementRef<typeof StyledValue>>(\n (props, forwardRef) => {\n const { value } = useComboboxContext()\n const isEmpty = value?.length === 0\n\n if (isEmpty) {\n return null\n }\n\n return (\n <StyledValue ref={forwardRef} {...props}>\n {value}\n </StyledValue>\n )\n }\n)\n","import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledComboboxContent = styled(Primitive.div, {})\n\nexport type StyledComboboxProps = ComponentPropsWithRef<\n typeof StyledComboboxContent\n>\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport * as Ariakit from '@ariakit/react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { Trigger } from './partials/trigger'\nimport { Content } from './partials/content'\nimport { Item } from './partials/item'\nimport { Portal } from './partials/portal'\nimport { Group } from './partials/group'\nimport { GroupLabel } from './partials/group-label'\nimport { Value } from './partials/value'\nimport { StyledComboboxContent } from './combobox.styled'\nimport {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { ComboboxProviderProps } from './hooks/use-combobox-context'\nimport type { Direction } from './types'\n\nexport interface ComboboxProps extends ComboboxProviderProps {\n /**\n * The value of the combobox when initially rendered. Use when you do not need\n * to control the state of the combobox.\n */\n defaultValue?: string[]\n\n /**\n * The controlled value of the combobox. 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 combobox when it is initially rendered. Use when you do\n * not need to control its open state.\n * @default false\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the combobox. Must be used in conjunction with\n * onOpen and onClose.\n */\n open?: boolean\n\n /**\n * Event handler called when the combobox opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the combobox closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the combobox when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n * @default 'ltr'\n */\n direction?: Direction\n\n /**\n * The content of the combobox\n */\n children?: React.ReactNode\n}\n\nconst Root = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(({ value: valueProp, onValueChange, children, ...restProps }, forwardRef) => {\n const {\n openState,\n setOpenState,\n defaultValue,\n value,\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n direction,\n } = useComboboxContext()\n\n const { setRequired, setDisabled, setAriaDisabled, setReadOnly } =\n useFormFieldContext()\n\n useEffect(() => {\n setRequired?.(required)\n setDisabled?.(disabled)\n setAriaDisabled?.(ariaDisabled)\n setReadOnly?.(readOnly)\n }, [\n readOnly,\n disabled,\n ariaDisabled,\n required,\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n ])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n // setSelectedValue from Ariakit.ComboboxProvider expects to accept a union string | string[], type cast is required to specify that it's a multi value\n onValueChange?.(newValue as string[])\n setValue(newValue as string[])\n }\n\n return (\n <RadixPopover.Root open={openState} onOpenChange={setOpenState}>\n <Ariakit.ComboboxProvider\n open={openState}\n setOpen={setOpenState}\n defaultSelectedValue={defaultValue}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n <StyledComboboxContent {...restProps} ref={forwardRef} dir={direction}>\n {children}\n </StyledComboboxContent>\n </Ariakit.ComboboxProvider>\n </RadixPopover.Root>\n )\n})\n\nexport const Combobox = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(\n (\n {\n 'aria-disabled': ariaDisabled,\n defaultOpen = false,\n open,\n valid,\n disabled,\n readOnly,\n required,\n value,\n defaultValue,\n onOpen,\n onValueChange,\n direction = 'ltr',\n ...restProps\n },\n forwardRef\n ) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n defaultOpen={defaultOpen}\n open={open}\n valid={valid}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n aria-disabled={ariaDisabled}\n direction={direction}\n >\n <Root {...restProps} value={value} ref={forwardRef} />\n </ComboboxProvider>\n )\n) as ForwardRefExoticComponent<ComboboxProps> & Partials\n\nexport interface Partials {\n Portal: typeof Portal\n Trigger: typeof Trigger\n Content: typeof Content\n Item: typeof Item\n Group: typeof Group\n GroupLabel: typeof GroupLabel\n Value: typeof Value\n}\n\nCombobox.Portal = Portal\nCombobox.Trigger = Trigger\nCombobox.Content = Content\nCombobox.Item = Item\nCombobox.Group = Group\nCombobox.GroupLabel = GroupLabel\nCombobox.Value = Value\n"],"names":["styled","Input","createContext","useRef","useState","useFormFieldContext","jsx","useContext","React","stringAttrValue","booleanishAttrValue","RadixPopover","mergeRefs","Combobox","jsxs","IconChevronDown","ComboboxItem","focus","useAriaDisabled","Ariakit","RadixPortal","Group","GroupLabel","Primitive","useEffect"],"mappings":";;;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