@opengovsg/oui 0.0.0-snapshot-20250326085831 → 0.0.0-snapshot-20250327091959

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/cjs/banner/banner.cjs +1 -1
  2. package/dist/cjs/combo-box/combo-box-fuzzy.cjs +3 -3
  3. package/dist/cjs/combo-box/combo-box-item.cjs +2 -2
  4. package/dist/cjs/combo-box/combo-box.cjs +3 -2
  5. package/dist/cjs/index.cjs +24 -13
  6. package/dist/cjs/menu/index.cjs +15 -0
  7. package/dist/cjs/menu/menu.cjs +229 -0
  8. package/dist/cjs/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/check.cjs +19 -0
  9. package/dist/cjs/popover/index.cjs +8 -0
  10. package/dist/cjs/popover/popover.cjs +46 -0
  11. package/dist/cjs/range-calendar/range-calendar.cjs +1 -1
  12. package/dist/cjs/select/select.cjs +3 -2
  13. package/dist/cjs/system/react-utils/context.cjs +3 -2
  14. package/dist/cjs/tag-field/tag-field-item.cjs +8 -3
  15. package/dist/cjs/tag-field/tag-field.cjs +2 -1
  16. package/dist/esm/banner/banner.js +1 -1
  17. package/dist/esm/combo-box/combo-box-fuzzy.js +4 -4
  18. package/dist/esm/combo-box/combo-box-item.js +3 -3
  19. package/dist/esm/combo-box/combo-box.js +4 -3
  20. package/dist/esm/index.js +6 -4
  21. package/dist/esm/menu/index.js +2 -0
  22. package/dist/esm/menu/menu.js +220 -0
  23. package/dist/esm/node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/check.js +14 -0
  24. package/dist/esm/popover/index.js +2 -0
  25. package/dist/esm/popover/popover.js +44 -0
  26. package/dist/esm/range-calendar/range-calendar.js +1 -1
  27. package/dist/esm/select/select.js +3 -2
  28. package/dist/esm/system/react-utils/context.js +3 -2
  29. package/dist/esm/tag-field/tag-field-item.js +9 -4
  30. package/dist/esm/tag-field/tag-field.js +3 -2
  31. package/dist/types/combo-box/combo-box-fuzzy.d.ts +2 -2
  32. package/dist/types/combo-box/combo-box-fuzzy.d.ts.map +1 -1
  33. package/dist/types/combo-box/combo-box-item.d.ts +3 -3
  34. package/dist/types/combo-box/combo-box-item.d.ts.map +1 -1
  35. package/dist/types/combo-box/combo-box.d.ts.map +1 -1
  36. package/dist/types/index.d.mts +2 -0
  37. package/dist/types/index.d.ts +2 -0
  38. package/dist/types/index.d.ts.map +1 -1
  39. package/dist/types/menu/index.d.ts +2 -0
  40. package/dist/types/menu/index.d.ts.map +1 -0
  41. package/dist/types/menu/menu.d.ts +38 -0
  42. package/dist/types/menu/menu.d.ts.map +1 -0
  43. package/dist/types/popover/index.d.ts +2 -0
  44. package/dist/types/popover/index.d.ts.map +1 -0
  45. package/dist/types/popover/popover.d.ts +21 -0
  46. package/dist/types/popover/popover.d.ts.map +1 -0
  47. package/dist/types/range-calendar/range-calendar.d.ts.map +1 -1
  48. package/dist/types/select/select.d.ts.map +1 -1
  49. package/dist/types/system/react-utils/context.d.ts +3 -2
  50. package/dist/types/system/react-utils/context.d.ts.map +1 -1
  51. package/dist/types/tag-field/tag-field-item.d.ts +2 -2
  52. package/dist/types/tag-field/tag-field-item.d.ts.map +1 -1
  53. package/dist/types/tag-field/tag-field.d.ts.map +1 -1
  54. package/dist/types/tag-field/types.d.ts +3 -3
  55. package/dist/types/tag-field/types.d.ts.map +1 -1
  56. package/package.json +4 -4
package/dist/esm/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  export { useControllableState } from './hooks/use-controllable-state.js';
3
+ export { Button } from './button/button.js';
3
4
  export { GovtBanner } from './govt-banner/govt-banner.js';
4
5
  export { Ripple } from './ripple/ripple.js';
5
6
  export { useRipple } from './ripple/use-ripple.js';
@@ -16,16 +17,17 @@ export { ComboBox, ComboBoxEmptyState } from './combo-box/combo-box.js';
16
17
  export { ComboBoxFuzzy } from './combo-box/combo-box-fuzzy.js';
17
18
  export { ComboBoxItem } from './combo-box/combo-box-item.js';
18
19
  export { ComboBoxVariantContext, useComboBoxVariantContext } from './combo-box/combo-box-variant-context.js';
20
+ export { Banner } from './banner/banner.js';
19
21
  export { TagField } from './tag-field/tag-field.js';
20
22
  export { TagFieldItem } from './tag-field/tag-field-item.js';
21
23
  export { Select } from './select/select.js';
22
24
  export { SelectItem } from './select/select-item.js';
23
25
  export { SelectVariantContext, useSelectVariantContext } from './select/select-variant-context.js';
24
- export { RangeCalendar, RangeCalendarCell, RangeCalendarStateWrapper } from './range-calendar/range-calendar.js';
25
- export { Button } from './button/button.js';
26
- export { Banner } from './banner/banner.js';
27
26
  export { Badge } from './badge/badge.js';
28
- export { CalendarDate } from '@internationalized/date';
29
27
  export { Calendar, CalendarStateWrapper } from './calendar/calendar.js';
30
28
  export { CalendarStyleContext, useCalendarStyleContext } from './calendar/calendar-style-context.js';
31
29
  export { getEraFormat, useGenerateLocalizedMonths, useGenerateLocalizedYears, useLocalizedMonthYear } from './calendar/utils.js';
30
+ export { CalendarDate } from '@internationalized/date';
31
+ export { RangeCalendar, RangeCalendarCell, RangeCalendarStateWrapper } from './range-calendar/range-calendar.js';
32
+ export { Menu, MenuItem, MenuSection, MenuSeparator, MenuTrigger, MenuVariantContext, SubmenuTrigger, useMenuVariantContext } from './menu/menu.js';
33
+ export { Popover } from './popover/popover.js';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ export { Menu, MenuItem, MenuSection, MenuSeparator, MenuTrigger, MenuVariantContext, SubmenuTrigger, useMenuVariantContext } from './menu.js';
@@ -0,0 +1,220 @@
1
+ "use strict";
2
+ "use client";
3
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
+ import { forwardRef, useMemo, useCallback } from 'react';
5
+ import { useContextProps, MenuItem as MenuItem$1, composeRenderProps, Provider, Menu as Menu$1, MenuSection as MenuSection$1, Header, Collection, MenuTrigger as MenuTrigger$1, SubmenuTrigger as SubmenuTrigger$1, Separator } from 'react-aria-components';
6
+ import { listBoxItemStyles, menuItemStyles, menuStyles, menuSectionStyles, menuDividerStyles } from '@opengovsg/oui-theme';
7
+ import { Popover } from '../popover/popover.js';
8
+ import { forwardRefGeneric, mapPropsVariants } from '../system/utils.js';
9
+ import Check from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/check.js';
10
+ import ChevronRight from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevron-right.js';
11
+ import { createContext } from '../system/react-utils/context.js';
12
+
13
+ const [MenuVariantContext, useMenuVariantContext] = createContext({
14
+ name: "MenuVariantContext",
15
+ strict: false
16
+ });
17
+ function MenuInner(originalProps, ref) {
18
+ [originalProps, ref] = useContextProps(
19
+ originalProps,
20
+ ref,
21
+ MenuVariantContext
22
+ );
23
+ const [props, variantProps] = mapPropsVariants(
24
+ originalProps,
25
+ menuStyles.variantKeys
26
+ );
27
+ const { className, classNames, placement, ...rest } = props;
28
+ const styles = menuStyles(variantProps);
29
+ return /* @__PURE__ */ jsx(Provider, { values: [[MenuVariantContext, variantProps]], children: /* @__PURE__ */ jsx(
30
+ Popover,
31
+ {
32
+ placement,
33
+ className: styles.popover({ className: classNames?.popover }),
34
+ children: /* @__PURE__ */ jsx(
35
+ Menu$1,
36
+ {
37
+ ...rest,
38
+ ref,
39
+ className: composeRenderProps(
40
+ className ?? classNames?.base,
41
+ (className2, renderProps) => styles.base({
42
+ className: className2,
43
+ ...renderProps
44
+ })
45
+ )
46
+ }
47
+ )
48
+ }
49
+ ) });
50
+ }
51
+ const Menu = forwardRefGeneric(MenuInner);
52
+ const MenuItem = forwardRef(function MenuItem2(originalProps, ref) {
53
+ [originalProps, ref] = useContextProps(
54
+ originalProps,
55
+ ref,
56
+ MenuVariantContext
57
+ );
58
+ const [
59
+ {
60
+ classNames,
61
+ className,
62
+ multipleSelectionIcon: multipleSelectionIconProp,
63
+ singleSelectionIcon: singleSelectionIconProp,
64
+ startContent,
65
+ endContent,
66
+ ...props
67
+ },
68
+ variantProps
69
+ ] = mapPropsVariants(originalProps, listBoxItemStyles.variantKeys);
70
+ const styles = menuItemStyles(variantProps);
71
+ const multipleSelectionIcon = useMemo(() => {
72
+ if (multipleSelectionIconProp !== void 0) {
73
+ return multipleSelectionIconProp;
74
+ }
75
+ return /* @__PURE__ */ jsx(
76
+ Check,
77
+ {
78
+ "aria-hidden": true,
79
+ className: styles.icon({ className: classNames?.icon })
80
+ }
81
+ );
82
+ }, [classNames?.icon, multipleSelectionIconProp, styles]);
83
+ const singleSelectionIcon = useMemo(() => {
84
+ if (singleSelectionIconProp !== void 0) {
85
+ return singleSelectionIconProp;
86
+ }
87
+ return /* @__PURE__ */ jsx(
88
+ Check,
89
+ {
90
+ "aria-hidden": true,
91
+ className: styles.icon({ className: classNames?.icon })
92
+ }
93
+ );
94
+ }, [classNames?.icon, singleSelectionIconProp, styles]);
95
+ const showIconContainer = useCallback(
96
+ (selectionMode) => {
97
+ switch (selectionMode) {
98
+ case "none":
99
+ return false;
100
+ case "multiple":
101
+ return !!multipleSelectionIcon;
102
+ case "single":
103
+ return !!singleSelectionIcon;
104
+ }
105
+ },
106
+ [multipleSelectionIcon, singleSelectionIcon]
107
+ );
108
+ const defaultTextValue = useMemo(() => {
109
+ if (props.textValue) {
110
+ return props.textValue;
111
+ }
112
+ if (typeof props.children === "string") {
113
+ return props.children;
114
+ }
115
+ return void 0;
116
+ }, [props.children, props.textValue]);
117
+ return /* @__PURE__ */ jsx(
118
+ MenuItem$1,
119
+ {
120
+ ref,
121
+ textValue: defaultTextValue,
122
+ ...props,
123
+ isDisabled: variantProps.isDisabled,
124
+ className: composeRenderProps(
125
+ className ?? classNames?.container,
126
+ (className2, renderProps) => styles.container({
127
+ className: className2,
128
+ ...renderProps
129
+ })
130
+ ),
131
+ children: composeRenderProps(
132
+ props.children,
133
+ (children, { selectionMode, isSelected, hasSubmenu }) => /* @__PURE__ */ jsxs(Fragment, { children: [
134
+ startContent,
135
+ /* @__PURE__ */ jsx(
136
+ "span",
137
+ {
138
+ className: styles.label({
139
+ className: classNames?.label
140
+ }),
141
+ children
142
+ }
143
+ ),
144
+ showIconContainer(selectionMode) && /* @__PURE__ */ jsxs(
145
+ "span",
146
+ {
147
+ className: styles.iconContainer({
148
+ className: classNames?.iconContainer
149
+ }),
150
+ children: [
151
+ isSelected && selectionMode === "multiple" && multipleSelectionIcon,
152
+ isSelected && selectionMode === "single" && singleSelectionIcon
153
+ ]
154
+ }
155
+ ),
156
+ endContent,
157
+ hasSubmenu && /* @__PURE__ */ jsx(
158
+ ChevronRight,
159
+ {
160
+ "aria-hidden": true,
161
+ className: styles.icon({
162
+ className: classNames?.icon
163
+ })
164
+ }
165
+ )
166
+ ] })
167
+ )
168
+ }
169
+ );
170
+ });
171
+ function MenuSeparator(props) {
172
+ return /* @__PURE__ */ jsx(
173
+ Separator,
174
+ {
175
+ ...props,
176
+ className: menuDividerStyles({
177
+ className: props.className
178
+ })
179
+ }
180
+ );
181
+ }
182
+ function MenuSectionInner(originalProps, ref) {
183
+ [originalProps, ref] = useContextProps(
184
+ originalProps,
185
+ ref,
186
+ MenuVariantContext
187
+ );
188
+ const [{ title, classNames, ...props }, variantProps] = mapPropsVariants(
189
+ originalProps,
190
+ menuSectionStyles.variantKeys
191
+ );
192
+ const styles = menuSectionStyles(variantProps);
193
+ return /* @__PURE__ */ jsxs(
194
+ MenuSection$1,
195
+ {
196
+ ref,
197
+ className: styles.base({
198
+ className: props.className ?? classNames?.base
199
+ }),
200
+ ...props,
201
+ children: [
202
+ title && /* @__PURE__ */ jsx(
203
+ Header,
204
+ {
205
+ className: styles.header({
206
+ className: classNames?.header
207
+ }),
208
+ children: title
209
+ }
210
+ ),
211
+ /* @__PURE__ */ jsx(Collection, { items: props.items, children: props.children })
212
+ ]
213
+ }
214
+ );
215
+ }
216
+ const MenuSection = forwardRefGeneric(MenuSectionInner);
217
+ const MenuTrigger = MenuTrigger$1;
218
+ const SubmenuTrigger = SubmenuTrigger$1;
219
+
220
+ export { Menu, MenuItem, MenuSection, MenuSeparator, MenuTrigger, MenuVariantContext, SubmenuTrigger, useMenuVariantContext };
@@ -0,0 +1,14 @@
1
+ import createLucideIcon from '../createLucideIcon.js';
2
+
3
+ /**
4
+ * @license lucide-react v0.475.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+
11
+ const __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
12
+ const Check = createLucideIcon("Check", __iconNode);
13
+
14
+ export { __iconNode, Check as default };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ export { Popover } from './popover.js';
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ "use client";
3
+ import { jsxs, jsx } from 'react/jsx-runtime';
4
+ import { useSlottedContext, PopoverContext, Popover as Popover$1, composeRenderProps, OverlayArrow } from 'react-aria-components';
5
+ import { popoverArrowStyles, popoverStyles } from '@opengovsg/oui-theme';
6
+
7
+ const Popover = ({
8
+ children,
9
+ showArrow,
10
+ className,
11
+ classNames,
12
+ ...props
13
+ }) => {
14
+ const popoverContext = useSlottedContext(PopoverContext);
15
+ const isSubmenu = popoverContext?.trigger === "SubmenuTrigger";
16
+ let offset = showArrow ? 12 : 8;
17
+ offset = isSubmenu ? offset - 6 : offset;
18
+ return /* @__PURE__ */ jsxs(
19
+ Popover$1,
20
+ {
21
+ offset,
22
+ ...props,
23
+ className: composeRenderProps(
24
+ className ?? classNames?.base,
25
+ (className2, renderProps) => popoverStyles({ ...renderProps, className: className2 })
26
+ ),
27
+ children: [
28
+ showArrow && /* @__PURE__ */ jsx(OverlayArrow, { className: "group", children: /* @__PURE__ */ jsx(
29
+ "svg",
30
+ {
31
+ width: 12,
32
+ height: 12,
33
+ viewBox: "0 0 12 12",
34
+ className: popoverArrowStyles({ className: classNames?.arrow }),
35
+ children: /* @__PURE__ */ jsx("path", { d: "M0 0 L6 6 L12 0" })
36
+ }
37
+ ) }),
38
+ children
39
+ ]
40
+ }
41
+ );
42
+ };
43
+
44
+ export { Popover };
@@ -6,12 +6,12 @@ import { CalendarDate, today, getLocalTimeZone, getDayOfWeek } from '@internatio
6
6
  import { RangeCalendar as RangeCalendar$1, Provider, CalendarGrid, CalendarGridBody, Text, RangeCalendarStateContext, useLocale, CalendarCell } from 'react-aria-components';
7
7
  import { useDeepCompareMemo } from 'use-deep-compare';
8
8
  import { calendarStyles, composeRenderProps, cn, dataAttr } from '@opengovsg/oui-theme';
9
+ import { CalendarStyleContext, useCalendarStyleContext } from '../calendar/calendar-style-context.js';
9
10
  import { AgnosticCalendarStateContext } from '../calendar/agnostic-calendar-state-context.js';
10
11
  import { CalendarBottomContent } from '../calendar/calendar-bottom-content.js';
11
12
  import { CalendarGridHeader } from '../calendar/calendar-grid-header.js';
12
13
  import { CalendarHeader } from '../calendar/calendar-header.js';
13
14
  import { mapPropsVariants } from '../system/utils.js';
14
- import { CalendarStyleContext, useCalendarStyleContext } from '../calendar/calendar-style-context.js';
15
15
 
16
16
  const RangeCalendar = forwardRef(function RangeCalendar2(originalProps, ref) {
17
17
  const [props, variantProps] = mapPropsVariants(
@@ -2,13 +2,14 @@
2
2
  "use client";
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import { useMemo } from 'react';
5
- import { Provider, Select as Select$1, SelectValue, Popover, Virtualizer, ListLayout, ListBox } from 'react-aria-components';
5
+ import { Provider, Select as Select$1, SelectValue, Virtualizer, ListLayout, ListBox } from 'react-aria-components';
6
6
  import { selectStyles, composeRenderProps } from '@opengovsg/oui-theme';
7
+ import { Button } from '../button/button.js';
7
8
  import { Label, Description } from '../field/field.js';
9
+ import { Popover } from '../popover/popover.js';
8
10
  import { mapPropsVariants } from '../system/utils.js';
9
11
  import { SelectVariantContext } from './select-variant-context.js';
10
12
  import ChevronDown from '../node_modules/.pnpm/lucide-react@0.475.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevron-down.js';
11
- import { Button } from '../button/button.js';
12
13
 
13
14
  const calculateEstimatedRowHeight = (size) => {
14
15
  switch (size) {
@@ -5,9 +5,10 @@ function createContext(options = {}) {
5
5
  const {
6
6
  strict = true,
7
7
  errorMessage = "useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",
8
- name
8
+ name,
9
+ defaultValue
9
10
  } = options;
10
- const Context = createContext$1(void 0);
11
+ const Context = createContext$1(defaultValue);
11
12
  Context.displayName = name;
12
13
  function useContext$1() {
13
14
  const context = useContext(Context);
@@ -2,21 +2,26 @@
2
2
  "use client";
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import { useContext } from 'react';
5
- import { tagFieldItemStyles, dataAttr } from '@opengovsg/oui-theme';
5
+ import { listBoxItemStyles, dataAttr } from '@opengovsg/oui-theme';
6
6
  import { forwardRefGeneric } from '../system/utils.js';
7
7
  import { TagFieldStateContext } from './tag-field-state-context.js';
8
8
 
9
9
  const TagFieldItemInner = ({ item, isHighlighted, classNames, ...itemProps }, ref) => {
10
10
  const { itemToText, size } = useContext(TagFieldStateContext);
11
- const styles = tagFieldItemStyles({ size });
11
+ const styles = listBoxItemStyles({ size });
12
12
  return /* @__PURE__ */ jsx(
13
13
  "li",
14
14
  {
15
15
  ref,
16
16
  ...itemProps,
17
- className: styles.container({ className: classNames?.container }),
17
+ className: styles.container({
18
+ className: classNames?.container,
19
+ isFocused: isHighlighted,
20
+ isDisabled: itemProps["aria-disabled"]
21
+ }),
18
22
  "data-rac": true,
19
- "data-hovered": dataAttr(isHighlighted),
23
+ "data-focused": dataAttr(isHighlighted),
24
+ "data-disabled": dataAttr(itemProps["aria-disabled"]),
20
25
  children: /* @__PURE__ */ jsx("span", { className: styles.label({ className: classNames?.label }), children: itemToText(item) })
21
26
  }
22
27
  );
@@ -2,10 +2,11 @@
2
2
  "use client";
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import { createElement } from 'react';
5
- import { composeRenderProps, Popover } from 'react-aria-components';
5
+ import { composeRenderProps } from 'react-aria-components';
6
6
  import { tagFieldStyles } from '@opengovsg/oui-theme';
7
7
  import { Label, FieldGroup, Description, FieldError } from '../field/field.js';
8
8
  import { Input } from '../input/input.js';
9
+ import { Popover } from '../popover/popover.js';
9
10
  import { TagFieldItem } from './tag-field-item.js';
10
11
  import { TagFieldList } from './tag-field-list.js';
11
12
  import { TagFieldRoot } from './tag-field-root.js';
@@ -91,7 +92,7 @@ function TagField({
91
92
  }
92
93
  )
93
94
  ] }),
94
- /* @__PURE__ */ jsx(Popover, { children: /* @__PURE__ */ jsx(
95
+ /* @__PURE__ */ jsx(Popover, { className: styles.popover({ className: classNames?.popover }), children: /* @__PURE__ */ jsx(
95
96
  TagFieldList,
96
97
  {
97
98
  className: styles.list({ className: classNames?.list }),
@@ -1,6 +1,6 @@
1
1
  import type { Key } from "react-aria";
2
2
  import type { SetRequired } from "type-fest";
3
- import type { ComboBoxItemSlots, SlotsToClasses } from "@opengovsg/oui-theme";
3
+ import type { ListBoxItemSlots, SlotsToClasses } from "@opengovsg/oui-theme";
4
4
  import type { ComboBoxProps } from "./combo-box";
5
5
  import { ComboBoxItem } from "./combo-box-item";
6
6
  type ComboBoxItem = {
@@ -9,7 +9,7 @@ type ComboBoxItem = {
9
9
  description?: string;
10
10
  };
11
11
  export interface ComboBoxFuzzyProps<T extends ComboBoxItem = ComboBoxItem> extends SetRequired<ComboBoxProps<T>, "inputValue" | "onInputChange" | "onSelectionChange" | "selectedKey" | "items"> {
12
- itemClassNames?: SlotsToClasses<ComboBoxItemSlots> & SlotsToClasses<"highlight">;
12
+ itemClassNames?: SlotsToClasses<ListBoxItemSlots> & SlotsToClasses<"highlight">;
13
13
  }
14
14
  /**
15
15
  * Controlled variant of ComboBox, allows for fuzzy search and item highlight.
@@ -1 +1 @@
1
- {"version":3,"file":"combo-box-fuzzy.d.ts","sourceRoot":"","sources":["../../../src/combo-box/combo-box-fuzzy.tsx"],"names":[],"mappings":"AAEA,OAAO,KA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,CAAA;IACP,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAwBD,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,CACvE,SAAQ,WAAW,CACjB,aAAa,CAAC,CAAC,CAAC,EACd,YAAY,GACZ,eAAe,GACf,mBAAmB,GACnB,aAAa,GACb,OAAO,CACV;IACD,cAAc,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,GAC/C,cAAc,CAAC,WAAW,CAAC,CAAA;CAC9B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EACjE,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAC,2CAwGrC"}
@@ -1,11 +1,11 @@
1
1
  import type { ListBoxItemProps } from "react-aria-components";
2
- import type { ComboBoxItemSlots, ComboBoxItemVariantProps, SlotsToClasses } from "@opengovsg/oui-theme";
3
- export interface ComboBoxItemProps extends ListBoxItemProps, ComboBoxItemVariantProps {
2
+ import type { ListBoxItemSlots, ListBoxItemVariantProps, SlotsToClasses } from "@opengovsg/oui-theme";
3
+ export interface ComboBoxItemProps extends ListBoxItemProps, ListBoxItemVariantProps {
4
4
  /**
5
5
  * Description for the item, if any
6
6
  */
7
7
  description?: React.ReactNode;
8
- classNames?: SlotsToClasses<ComboBoxItemSlots>;
8
+ classNames?: SlotsToClasses<ListBoxItemSlots>;
9
9
  }
10
10
  export declare const ComboBoxItem: import("../system/utils").InternalForwardRefRenderFunction<import("../system/types").As, ComboBoxItemProps, never>;
11
11
  //# sourceMappingURL=combo-box-item.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"combo-box-item.d.ts","sourceRoot":"","sources":["../../../src/combo-box/combo-box-item.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAS7D,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EACxB,cAAc,EACf,MAAM,sBAAsB,CAAA;AAM7B,MAAM,WAAW,iBACf,SAAQ,gBAAgB,EACtB,wBAAwB;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,UAAU,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAA;CAC/C;AAED,eAAO,MAAM,YAAY,oHAgEvB,CAAA"}
1
+ {"version":3,"file":"combo-box-item.d.ts","sourceRoot":"","sources":["../../../src/combo-box/combo-box-item.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAS7D,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACf,MAAM,sBAAsB,CAAA;AAM7B,MAAM,WAAW,iBACf,SAAQ,gBAAgB,EACtB,uBAAuB;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,UAAU,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAA;CAC9C;AAED,eAAO,MAAM,YAAY,oHAgEvB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"combo-box.d.ts","sourceRoot":"","sources":["../../../src/combo-box/combo-box.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,IAAI,iBAAiB,EAClC,YAAY,EAEZ,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,uBAAuB,CAAA;AAe9B,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,cAAc,EACf,MAAM,sBAAsB,CAAA;AAc7B,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAC7C,SAAQ,oBAAoB,EAC1B,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iDAAiD;IACjD,YAAY,CAAC,EAAE,CAAC,EAAE,CAAA;IAClB,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CAC7C,SAAQ,oBAAoB,EAC1B,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iDAAiD;IACjD,YAAY,CAAC,EAAE,CAAC,EAAE,CAAA;IAClB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,CAAC,EAAE,CAAA;IACX,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,UAAU,EAAE,gBAAgB,KAAK,MAAM,CAAC,CAAA;IAClE,UAAU,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,GACxC,cAAc,CAAC,aAAa,GAAG,YAAY,CAAC,CAAA;IAC9C;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IAErC,mFAAmF;IACnF,YAAY,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAA;IAE9C;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IAEpB,gBAAgB,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAA;IAEtD,QAAQ,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAA;CACvC;AAkCD,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,SAAS,GACV,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAY7D;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,2CA6JzE"}
@@ -17,4 +17,6 @@ export * from "./select";
17
17
  export * from "./badge";
18
18
  export * from "./calendar";
19
19
  export * from "./range-calendar";
20
+ export * from "./menu";
21
+ export * from "./popover";
20
22
  //# sourceMappingURL=index.d.ts.map
@@ -17,4 +17,6 @@ export * from "./select";
17
17
  export * from "./badge";
18
18
  export * from "./calendar";
19
19
  export * from "./range-calendar";
20
+ export * from "./menu";
21
+ export * from "./popover";
20
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from "./menu";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/menu/index.tsx"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA"}
@@ -0,0 +1,38 @@
1
+ import type { MenuItemProps as AriaMenuItemProps, MenuProps as AriaMenuProps, MenuSectionProps as AriaMenuSectionProps, ContextValue, SeparatorProps } from "react-aria-components";
2
+ import { MenuTrigger as AriaMenuTrigger } from "react-aria-components";
3
+ import type { ListBoxItemVariantProps, MenuItemVariantSlots, MenuSectionVariantProps, MenuSectionVariantSlots, MenuVariantProps, MenuVariantSlots, SlotsToClasses } from "@opengovsg/oui-theme";
4
+ import type { PopoverProps } from "../popover";
5
+ export declare const MenuVariantContext: import("react").Context<ContextValue<MenuVariantProps, any>>, useMenuVariantContext: () => ContextValue<MenuVariantProps, any>;
6
+ export interface MenuProps<T> extends AriaMenuProps<T>, MenuVariantProps {
7
+ placement?: PopoverProps["placement"];
8
+ classNames?: SlotsToClasses<MenuVariantSlots>;
9
+ }
10
+ export declare const Menu: <T extends object>(props: MenuProps<T> & import("react").RefAttributes<HTMLDivElement>) => React.ReactNode;
11
+ export interface MenuItemProps extends AriaMenuItemProps, ListBoxItemVariantProps {
12
+ classNames?: SlotsToClasses<MenuItemVariantSlots>;
13
+ multipleSelectionIcon?: React.ReactNode | null;
14
+ singleSelectionIcon?: React.ReactNode | null;
15
+ /**
16
+ * Element to be rendered in the left side of the menu item.
17
+ */
18
+ startContent?: React.ReactNode;
19
+ /**
20
+ * Element to be rendered in the right side of the menu item.
21
+ */
22
+ endContent?: React.ReactNode;
23
+ }
24
+ export declare const MenuItem: import("react").ForwardRefExoticComponent<MenuItemProps & import("react").RefAttributes<object>>;
25
+ export declare function MenuSeparator(props: SeparatorProps): import("react/jsx-runtime").JSX.Element;
26
+ export interface MenuSectionProps<T> extends AriaMenuSectionProps<T>, MenuSectionVariantProps {
27
+ /**
28
+ * The title of the section.\
29
+ * If not provided, the `aria-label` prop must be provided for accessibility.
30
+ */
31
+ title?: string;
32
+ items?: T[];
33
+ classNames?: SlotsToClasses<MenuSectionVariantSlots>;
34
+ }
35
+ export declare const MenuSection: <T extends object>(props: MenuSectionProps<T> & import("react").RefAttributes<HTMLElement>) => React.ReactNode;
36
+ export declare const MenuTrigger: typeof AriaMenuTrigger;
37
+ export declare const SubmenuTrigger: (props: import("react-aria-components").SubmenuTriggerProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
38
+ //# sourceMappingURL=menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../src/menu/menu.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,IAAI,iBAAiB,EAClC,SAAS,IAAI,aAAa,EAC1B,gBAAgB,IAAI,oBAAoB,EACxC,YAAY,EAEZ,cAAc,EACf,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAIL,WAAW,IAAI,eAAe,EAQ/B,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACf,MAAM,sBAAsB,CAAA;AAS7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAK9C,eAAO,MAAO,kBAAkB,gEAAE,qBAAqB,2CAMrD,CAAA;AACF,MAAM,WAAW,SAAS,CAAC,CAAC,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC,EAAE,gBAAgB;IACtE,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAA;IACrC,UAAU,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAA;CAC9C;AA4CD,eAAO,MAAM,IAAI,GA1CE,CAAC,SAAS,MAAM,0EAgBhC,MAAO,SA0BsC,CAAA;AAEhD,MAAM,WAAW,aACf,SAAQ,iBAAiB,EACvB,uBAAuB;IACzB,UAAU,CAAC,EAAE,cAAc,CAAC,oBAAoB,CAAC,CAAA;IACjD,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAA;IAC9C,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAA;IAE5C;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC7B;AAED,eAAO,MAAM,QAAQ,kGA+HnB,CAAA;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,2CASlD;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,CACjC,SAAQ,oBAAoB,CAAC,CAAC,CAAC,EAC7B,uBAAuB;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,CAAC,EAAE,CAAA;IACX,UAAU,CAAC,EAAE,cAAc,CAAC,uBAAuB,CAAC,CAAA;CACrD;AAwCD,eAAO,MAAM,WAAW,GAtCE,CAAC,SAAS,MAAM,8EArMvC,MAAO,SA2OoD,CAAA;AAE9D,eAAO,MAAM,WAAW,wBAAkB,CAAA;AAC1C,eAAO,MAAM,cAAc,gEACs0nD,MAAO,aAAa,qBAAoB,MAAO,YAAY,OAD52nD,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from "./popover";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/popover/index.tsx"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,21 @@
1
+ import type { PopoverProps as AriaPopoverProps } from "react-aria-components";
2
+ import type { SlotsToClasses, VariantProps } from "@opengovsg/oui-theme";
3
+ import { popoverStyles } from "@opengovsg/oui-theme";
4
+ export interface PopoverProps extends Omit<AriaPopoverProps, "children">, VariantProps<typeof popoverStyles> {
5
+ showArrow?: boolean;
6
+ children: React.ReactNode;
7
+ /**
8
+ * List of classes to change the className of the element.
9
+ *
10
+ * @example
11
+ * ```text
12
+ * Component: Popover
13
+ *
14
+ * Class names:
15
+ * - base: the popover itself. Will be ignored if `className` is provided.
16
+ * - arrow: the arrow of the popover.
17
+ */
18
+ classNames?: SlotsToClasses<"arrow" | "base">;
19
+ }
20
+ export declare const Popover: ({ children, showArrow, className, classNames, ...props }: PopoverProps) => import("react/jsx-runtime").JSX.Element;
21
+ //# sourceMappingURL=popover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/popover/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAS7E,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxE,OAAO,EAAsB,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAExE,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,EACxC,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IAEzB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,GAAG,MAAM,CAAC,CAAA;CAC9C;AAED,eAAO,MAAM,OAAO,6DAMjB,YAAY,4CA8Bd,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"range-calendar.d.ts","sourceRoot":"","sources":["../../../src/range-calendar/range-calendar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,kBAAkB,IAAI,sBAAsB,EAC5C,iBAAiB,EAC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CAAC,CAAA;IAE/C;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IAErC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAE3B,2CAA2C;IAC3C,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IAE5C,QAAQ,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAA;CACvC;AAeD,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,EACvC,KAAK,EACL,WAAW,EACX,UAAU,EACV,GAAG,aAAa,EACjB,EAAE,WAAW,CAAC,CAAC,CAAC,2CAkFhB"}
@@ -1,4 +1,4 @@
1
- export interface CreateContextOptions {
1
+ export interface CreateContextOptions<T = any> {
2
2
  /**
3
3
  * If `true`, React will throw if context is `null` or `undefined`
4
4
  * In some cases, you might want to support nested context, so you can set it to `false`
@@ -12,6 +12,7 @@ export interface CreateContextOptions {
12
12
  * The display name of the context
13
13
  */
14
14
  name?: string;
15
+ defaultValue?: T;
15
16
  }
16
17
  export type CreateContextReturn<T> = [React.Context<T>, () => T];
17
18
  /**
@@ -19,5 +20,5 @@ export type CreateContextReturn<T> = [React.Context<T>, () => T];
19
20
  *
20
21
  * @param options - create context options
21
22
  */
22
- export declare function createContext<ContextType>(options?: CreateContextOptions): CreateContextReturn<ContextType>;
23
+ export declare function createContext<ContextType>(options?: CreateContextOptions<ContextType>): CreateContextReturn<ContextType>;
23
24
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/system/react-utils/context.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;AAEhE;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,EACvC,OAAO,GAAE,oBAAyB,GACjC,mBAAmB,CAAC,WAAW,CAAC,CA0BlC"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/system/react-utils/context.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,GAAG;IAC3C;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,YAAY,CAAC,EAAE,CAAC,CAAA;CACjB;AAED,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA;AAEhE;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,EACvC,OAAO,GAAE,oBAAoB,CAAC,WAAW,CAAM,GAC9C,mBAAmB,CAAC,WAAW,CAAC,CA2BlC"}
@@ -1,7 +1,7 @@
1
- import type { SlotsToClasses, TagFieldItemSlots } from "@opengovsg/oui-theme";
1
+ import type { ListBoxItemSlots, SlotsToClasses } from "@opengovsg/oui-theme";
2
2
  import type { TagFieldBaseItemProps, TagFieldListRenderProps } from "./types";
3
3
  export interface TagFieldItemProps<T extends object> extends Omit<TagFieldListRenderProps<T>, "key" | "itemProps">, TagFieldBaseItemProps<T> {
4
- classNames?: SlotsToClasses<TagFieldItemSlots>;
4
+ classNames?: SlotsToClasses<ListBoxItemSlots>;
5
5
  }
6
6
  export declare const TagFieldItem: <T extends object>(props: TagFieldItemProps<T> & import("react").RefAttributes<HTMLLIElement>) => React.ReactNode;
7
7
  //# sourceMappingURL=tag-field-item.d.ts.map