@kanso-labs/kanso-ui 0.45.27 → 0.45.29

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 (144) hide show
  1. package/dist/calendar/index.js +4 -4
  2. package/dist/calendar/index.js.map +1 -1
  3. package/dist/components/app-bar/index.js +1 -0
  4. package/dist/components/app-bar/index.js.map +1 -1
  5. package/dist/components/autocomplete/index.d.ts +6 -6
  6. package/dist/components/autocomplete/index.js +4 -4
  7. package/dist/components/autocomplete/index.js.map +1 -1
  8. package/dist/components/breadcrumbs/index.d.ts +5 -5
  9. package/dist/components/breadcrumbs/index.js +5 -5
  10. package/dist/components/breadcrumbs/index.js.map +1 -1
  11. package/dist/components/button/index.d.ts +3 -3
  12. package/dist/components/button/index.js +2 -2
  13. package/dist/components/button/index.js.map +1 -1
  14. package/dist/components/calendar/index.d.ts +7 -7
  15. package/dist/components/calendar/index.js +4 -4
  16. package/dist/components/calendar/index.js.map +1 -1
  17. package/dist/components/checkbox-group/index.d.ts +5 -5
  18. package/dist/components/checkbox-group/index.js +4 -4
  19. package/dist/components/checkbox-group/index.js.map +1 -1
  20. package/dist/components/color-area/index.d.ts +4 -4
  21. package/dist/components/color-area/index.js +4 -4
  22. package/dist/components/color-area/index.js.map +1 -1
  23. package/dist/components/color-field/index.d.ts +7 -7
  24. package/dist/components/color-field/index.js +4 -4
  25. package/dist/components/color-field/index.js.map +1 -1
  26. package/dist/components/color-picker/index.d.ts +4 -4
  27. package/dist/components/color-picker/index.js +4 -4
  28. package/dist/components/color-picker/index.js.map +1 -1
  29. package/dist/components/color-slider/index.d.ts +6 -6
  30. package/dist/components/color-slider/index.js +4 -4
  31. package/dist/components/color-slider/index.js.map +1 -1
  32. package/dist/components/color-swatch/index.d.ts +4 -4
  33. package/dist/components/color-swatch/index.js +4 -4
  34. package/dist/components/color-swatch/index.js.map +1 -1
  35. package/dist/components/color-swatch-picker/index.d.ts +12 -12
  36. package/dist/components/color-swatch-picker/index.js +7 -7
  37. package/dist/components/color-swatch-picker/index.js.map +1 -1
  38. package/dist/components/color-wheel/index.d.ts +6 -6
  39. package/dist/components/color-wheel/index.js +4 -4
  40. package/dist/components/color-wheel/index.js.map +1 -1
  41. package/dist/components/combo-box/index.d.ts +5 -5
  42. package/dist/components/combo-box/index.js +4 -4
  43. package/dist/components/combo-box/index.js.map +1 -1
  44. package/dist/components/date-field/index.d.ts +6 -6
  45. package/dist/components/date-field/index.js +4 -4
  46. package/dist/components/date-field/index.js.map +1 -1
  47. package/dist/components/date-picker/index.d.ts +6 -6
  48. package/dist/components/date-picker/index.js +4 -4
  49. package/dist/components/date-picker/index.js.map +1 -1
  50. package/dist/components/date-range-picker/index.d.ts +6 -6
  51. package/dist/components/date-range-picker/index.js +4 -4
  52. package/dist/components/date-range-picker/index.js.map +1 -1
  53. package/dist/components/dialog/index.d.ts +6 -6
  54. package/dist/components/dialog/index.js +9 -9
  55. package/dist/components/dialog/index.js.map +1 -1
  56. package/dist/components/disclosure/index.d.ts +10 -10
  57. package/dist/components/disclosure/index.js +8 -8
  58. package/dist/components/disclosure/index.js.map +1 -1
  59. package/dist/components/disclosure-group/index.d.ts +4 -4
  60. package/dist/components/disclosure-group/index.js +4 -4
  61. package/dist/components/disclosure-group/index.js.map +1 -1
  62. package/dist/components/drop-zone/index.d.ts +8 -8
  63. package/dist/components/drop-zone/index.js +6 -6
  64. package/dist/components/drop-zone/index.js.map +1 -1
  65. package/dist/components/form/index.d.ts +5 -5
  66. package/dist/components/form/index.js +4 -4
  67. package/dist/components/form/index.js.map +1 -1
  68. package/dist/components/link/index.d.ts +6 -6
  69. package/dist/components/link/index.js +4 -4
  70. package/dist/components/link/index.js.map +1 -1
  71. package/dist/components/list-box/index.d.ts +18 -18
  72. package/dist/components/list-box/index.js +11 -11
  73. package/dist/components/list-box/index.js.map +1 -1
  74. package/dist/components/menu/index.d.ts +16 -16
  75. package/dist/components/menu/index.js +14 -14
  76. package/dist/components/menu/index.js.map +1 -1
  77. package/dist/components/meter/index.d.ts +6 -6
  78. package/dist/components/meter/index.js +4 -4
  79. package/dist/components/meter/index.js.map +1 -1
  80. package/dist/components/navigation-tree/index.d.ts +15 -15
  81. package/dist/components/navigation-tree/index.js +13 -13
  82. package/dist/components/navigation-tree/index.js.map +1 -1
  83. package/dist/components/number-field/index.d.ts +5 -5
  84. package/dist/components/number-field/index.js +4 -4
  85. package/dist/components/number-field/index.js.map +1 -1
  86. package/dist/components/popover/index.d.ts +3 -3
  87. package/dist/components/popover/index.js +12 -12
  88. package/dist/components/popover/index.js.map +1 -1
  89. package/dist/components/radio-group/index.d.ts +5 -5
  90. package/dist/components/radio-group/index.js +4 -4
  91. package/dist/components/radio-group/index.js.map +1 -1
  92. package/dist/components/range-calendar/index.d.ts +7 -7
  93. package/dist/components/range-calendar/index.js +4 -4
  94. package/dist/components/range-calendar/index.js.map +1 -1
  95. package/dist/components/search-field/index.d.ts +6 -6
  96. package/dist/components/search-field/index.js +4 -4
  97. package/dist/components/search-field/index.js.map +1 -1
  98. package/dist/components/select/index.d.ts +5 -5
  99. package/dist/components/select/index.js +4 -4
  100. package/dist/components/select/index.js.map +1 -1
  101. package/dist/components/separator/index.d.ts +5 -5
  102. package/dist/components/separator/index.js +4 -4
  103. package/dist/components/separator/index.js.map +1 -1
  104. package/dist/components/sheet/index.d.ts +5 -5
  105. package/dist/components/sheet/index.js +12 -12
  106. package/dist/components/sheet/index.js.map +1 -1
  107. package/dist/components/slider/index.d.ts +4 -4
  108. package/dist/components/slider/index.js +4 -4
  109. package/dist/components/slider/index.js.map +1 -1
  110. package/dist/components/table/index.d.ts +20 -20
  111. package/dist/components/table/index.js +17 -17
  112. package/dist/components/table/index.js.map +1 -1
  113. package/dist/components/tabs/index.d.ts +5 -5
  114. package/dist/components/tabs/index.js +8 -8
  115. package/dist/components/tabs/index.js.map +1 -1
  116. package/dist/components/text-area/index.d.ts +2 -2
  117. package/dist/components/text-area/index.js +2 -2
  118. package/dist/components/text-area/index.js.map +1 -1
  119. package/dist/components/text-field/index.d.ts +4 -4
  120. package/dist/components/text-field/index.js +4 -4
  121. package/dist/components/text-field/index.js.map +1 -1
  122. package/dist/components/time-field/index.d.ts +6 -6
  123. package/dist/components/time-field/index.js +4 -4
  124. package/dist/components/time-field/index.js.map +1 -1
  125. package/dist/components/token-field/index.d.ts +7 -7
  126. package/dist/components/token-field/index.js +4 -4
  127. package/dist/components/token-field/index.js.map +1 -1
  128. package/dist/components/toolbar/index.d.ts +6 -6
  129. package/dist/components/toolbar/index.js +4 -4
  130. package/dist/components/toolbar/index.js.map +1 -1
  131. package/dist/components/tooltip/index.d.ts +2 -2
  132. package/dist/components/tooltip/index.js +4 -4
  133. package/dist/components/tooltip/index.js.map +1 -1
  134. package/dist/components/tree/index.d.ts +17 -17
  135. package/dist/components/tree/index.js +14 -14
  136. package/dist/components/tree/index.js.map +1 -1
  137. package/dist/drag/hooks.d.ts +3 -3
  138. package/dist/drag/hooks.js +4 -4
  139. package/dist/drag/hooks.js.map +1 -1
  140. package/dist/drag/index.js +4 -4
  141. package/dist/drag/index.js.map +1 -1
  142. package/dist/react-aria.d.ts +2 -2
  143. package/dist/react-aria.js +2 -2
  144. package/package.json +10 -10
@@ -1,10 +1,10 @@
1
1
  import { ReactNode, RefAttributes } from "react";
2
- import { ListBoxItemProps, ListBoxLoadMoreItemProps, ListBoxProps, ListBoxSectionProps } from "react-aria-components";
3
- type ListBoxItemProps$1<T extends object = object> = {
2
+ import { ListBoxItemProps as ListBoxItemProps$1, ListBoxLoadMoreItemProps, ListBoxProps as ListBoxProps$1, ListBoxSectionProps as ListBoxSectionProps$1 } from "react-aria-components";
3
+ type ListBoxItemProps<T extends object = object> = {
4
4
  /** The option's headline — the one thing it is mostly about. */
5
5
  children?: ReactNode;
6
6
  /** A function may compute the class from the option's render state. */
7
- className?: ListBoxItemProps<T>['className'];
7
+ className?: ListBoxItemProps$1<T>['className'];
8
8
  /** Content before the headline: an avatar, an icon, a checkbox. */
9
9
  leading?: ReactNode;
10
10
  /**
@@ -14,12 +14,12 @@ type ListBoxItemProps$1<T extends object = object> = {
14
14
  */
15
15
  overline?: ReactNode;
16
16
  /** A function may compute the style from the option's render state. */
17
- style?: ListBoxItemProps<T>['style'];
17
+ style?: ListBoxItemProps$1<T>['style'];
18
18
  /** A second line under the headline, in the muted role. */
19
19
  supporting?: ReactNode;
20
20
  /** Content after the headline, such as an amount or a control. */
21
21
  trailing?: ReactNode;
22
- } & Omit<ListBoxItemProps<T>, 'children' | 'className' | 'style'>;
22
+ } & Omit<ListBoxItemProps$1<T>, 'children' | 'className' | 'style'>;
23
23
  type ListBoxLoadMoreProps = Omit<ListBoxLoadMoreItemProps, 'children'> & {
24
24
  /**
25
25
  * What the row says while it is loading. Read by a screen reader; the ring
@@ -29,9 +29,9 @@ type ListBoxLoadMoreProps = Omit<ListBoxLoadMoreItemProps, 'children'> & {
29
29
  */
30
30
  label?: string;
31
31
  };
32
- type ListBoxProps$1<T extends object = object> = {
32
+ type ListBoxProps<T extends object = object> = {
33
33
  /** A function may compute the class from the list's render state. */
34
- className?: ListBoxProps<T>['className'];
34
+ className?: ListBoxProps$1<T>['className'];
35
35
  /**
36
36
  * What the list shows when nothing is in it — after a search that matched
37
37
  * nothing, usually. Left out, it is a muted row saying "No results" in the
@@ -39,11 +39,11 @@ type ListBoxProps$1<T extends object = object> = {
39
39
  * announces. One of the call site's own replaces the announcement as well
40
40
  * as the row, so what it says to a screen reader is the call site's too.
41
41
  */
42
- renderEmptyState?: ListBoxProps<T>['renderEmptyState'];
42
+ renderEmptyState?: ListBoxProps$1<T>['renderEmptyState'];
43
43
  /** A function may compute the style from the list's render state. */
44
- style?: ListBoxProps<T>['style'];
45
- } & Omit<ListBoxProps<T>, 'className' | 'renderEmptyState' | 'style'>;
46
- type ListBoxSectionProps$1<T extends object = object> = Omit<ListBoxSectionProps<T>, 'children'> & {
44
+ style?: ListBoxProps$1<T>['style'];
45
+ } & Omit<ListBoxProps$1<T>, 'className' | 'renderEmptyState' | 'style'>;
46
+ type ListBoxSectionProps<T extends object = object> = Omit<ListBoxSectionProps$1<T>, 'children'> & {
47
47
  /**
48
48
  * The options in the section. A section built from data puts React Aria's
49
49
  * `Collection` in here rather than a render function, since the header is
@@ -74,18 +74,18 @@ type ListBoxSectionProps$1<T extends object = object> = Omit<ListBoxSectionProps
74
74
  * options, which is what a search that matches nothing leaves; pass
75
75
  * `renderEmptyState` to draw something else.
76
76
  */
77
- declare function ListBox$1<T extends object>(props: ListBoxProps$1<T> & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
78
- declare namespace ListBox$1 {
79
- var Item: typeof ListBoxItem$1;
77
+ declare function ListBox<T extends object>(props: ListBoxProps<T> & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
78
+ declare namespace ListBox {
79
+ var Item: typeof ListBoxItem;
80
80
  var LoadMore: typeof ListBoxLoadMore;
81
- var Section: typeof ListBoxSection$1;
81
+ var Section: typeof ListBoxSection;
82
82
  }
83
83
  /**
84
84
  * One option. Its slots are the row's: `leading`, the headline as children,
85
85
  * `supporting` under it, and `trailing`. Give every option an `id` — that is
86
86
  * the key selection is reported by.
87
87
  */
88
- declare function ListBoxItem$1<T extends object = object>({ children, leading, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp, overline, supporting, textValue, trailing, ...props }: ListBoxItemProps$1<T> & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
88
+ declare function ListBoxItem<T extends object = object>({ children, leading, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp, overline, supporting, textValue, trailing, ...props }: ListBoxItemProps<T> & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
89
89
  /**
90
90
  * The row the list shows while it is fetching more. React Aria calls
91
91
  * `onLoadMore` when this comes into view, and draws it only while
@@ -96,5 +96,5 @@ declare function ListBoxLoadMore({ label, ...props }: ListBoxLoadMoreProps & Ref
96
96
  * A named group of options. `header` names it, and is what a screen reader
97
97
  * reads before the options inside.
98
98
  */
99
- declare function ListBoxSection$1<T extends object = object>({ children, header, ...props }: ListBoxSectionProps$1<T> & RefAttributes<HTMLElement>): import("react").JSX.Element;
100
- export { ListBoxItem$1 as ListBoxItem, type ListBoxItemProps$1 as ListBoxItemProps, ListBoxLoadMore, type ListBoxLoadMoreProps, type ListBoxProps$1 as ListBoxProps, ListBoxSection$1 as ListBoxSection, type ListBoxSectionProps$1 as ListBoxSectionProps, ListBox$1 as default };
99
+ declare function ListBoxSection<T extends object = object>({ children, header, ...props }: ListBoxSectionProps<T> & RefAttributes<HTMLElement>): import("react").JSX.Element;
100
+ export { ListBoxItem, type ListBoxItemProps, ListBoxLoadMore, type ListBoxLoadMoreProps, type ListBoxProps, ListBoxSection, type ListBoxSectionProps, ListBox as default };
@@ -8,7 +8,7 @@ import { RowContent } from "../../row/index.js";
8
8
  import { mergeStatefulStyles, mergeStyles } from "../../styles/merge.js";
9
9
  import { c } from "react/compiler-runtime";
10
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
- import { Header, ListBox, ListBoxItem, ListBoxLoadMoreItem, ListBoxSection } from "react-aria-components";
11
+ import { Header, ListBox as ListBox$1, ListBoxItem as ListBoxItem$1, ListBoxLoadMoreItem, ListBoxSection as ListBoxSection$1 } from "react-aria-components";
12
12
  // src/components/list-box/index.tsx
13
13
  function emptyState() {
14
14
  return /* @__PURE__ */ jsx(CollectionEmpty, { variant: "list" });
@@ -42,7 +42,7 @@ function itemContent(children, leading, overline, supporting, trailing, ripple)
42
42
  * options, which is what a search that matches nothing leaves; pass
43
43
  * `renderEmptyState` to draw something else.
44
44
  */
45
- function ListBox$1(props) {
45
+ function ListBox(props) {
46
46
  const $ = c(5);
47
47
  let t0;
48
48
  if ($[0] !== props) {
@@ -52,7 +52,7 @@ function ListBox$1(props) {
52
52
  } else t0 = $[1];
53
53
  let t1;
54
54
  if ($[2] !== props || $[3] !== t0) {
55
- t1 = /* @__PURE__ */ jsx(ListBox, {
55
+ t1 = /* @__PURE__ */ jsx(ListBox$1, {
56
56
  renderEmptyState: emptyState,
57
57
  ...props,
58
58
  ...t0
@@ -68,7 +68,7 @@ function ListBox$1(props) {
68
68
  * `supporting` under it, and `trailing`. Give every option an `id` — that is
69
69
  * the key selection is reported by.
70
70
  */
71
- function ListBoxItem$1(t0) {
71
+ function ListBoxItem(t0) {
72
72
  const $ = c(23);
73
73
  const { children, leading, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp, overline, supporting, textValue, trailing, ...props } = t0;
74
74
  let t1;
@@ -88,7 +88,7 @@ function ListBoxItem$1(t0) {
88
88
  $[5] = t1;
89
89
  } else t1 = $[5];
90
90
  const ripple = useRipple(true, t1, true);
91
- const T0 = ListBoxItem;
91
+ const T0 = ListBoxItem$1;
92
92
  let t2;
93
93
  if ($[6] !== children || $[7] !== textValue) {
94
94
  t2 = textValue ?? textOf(children);
@@ -184,7 +184,7 @@ function ListBoxLoadMore(t0) {
184
184
  * A named group of options. `header` names it, and is what a screen reader
185
185
  * reads before the options inside.
186
186
  */
187
- function ListBoxSection$1(t0) {
187
+ function ListBoxSection(t0) {
188
188
  const $ = c(14);
189
189
  let T0;
190
190
  let children;
@@ -195,7 +195,7 @@ function ListBoxSection$1(t0) {
195
195
  const { children: t3, header: t4, ...props$2 } = t0;
196
196
  children = t3;
197
197
  header = t4;
198
- T0 = ListBoxSection;
198
+ T0 = ListBoxSection$1;
199
199
  t1 = props$2;
200
200
  t2 = mergeStyles(props(collectionStyles.section), props$2);
201
201
  $[0] = t0;
@@ -236,9 +236,9 @@ function ListBoxSection$1(t0) {
236
236
  } else t4 = $[13];
237
237
  return t4;
238
238
  }
239
- ListBox$1.Item = ListBoxItem$1;
240
- ListBox$1.LoadMore = ListBoxLoadMore;
241
- ListBox$1.Section = ListBoxSection$1;
242
- export { ListBoxItem$1 as ListBoxItem, ListBoxLoadMore, ListBoxSection$1 as ListBoxSection, ListBox$1 as default };
239
+ ListBox.Item = ListBoxItem;
240
+ ListBox.LoadMore = ListBoxLoadMore;
241
+ ListBox.Section = ListBoxSection;
242
+ export { ListBoxItem, ListBoxLoadMore, ListBoxSection, ListBox as default };
243
243
 
244
244
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","stylex","ListBox","ListBoxItem","RACListBoxItem","RACListBoxLoadMoreItem","ListBoxSection","RACListBoxSection","collectionStyles","containerClasses","rowItemStyles","textOf","useRipple","mergeStatefulStyles","mergeStyles","children","leading","overline","supporting","trailing","label","header","emptyState","itemContent","ripple","state","isDisabled","isSelected","props","$","t0","t1","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","textValue","T0","t2","t3","handlers","t4","t5","surface","t6","ListBoxLoadMore","loading","section","undefined","Item","LoadMore","Section","RACListBox"],"sources":["../../../src/components/list-box/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ListBoxItemRenderProps, ListBoxItemProps as RACListBoxItemProps, ListBoxLoadMoreItemProps as RACListBoxLoadMoreItemProps, ListBoxProps as RACListBoxProps, ListBoxSectionProps as RACListBoxSectionProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Header, ListBox as RACListBox, ListBoxItem as RACListBoxItem, ListBoxLoadMoreItem as RACListBoxLoadMoreItem, ListBoxSection as RACListBoxSection } from 'react-aria-components';\nimport { CollectionEmpty, CollectionLoadMore } from '../../collection';\nimport { collectionStyles, containerClasses, rowItemStyles } from '../../collection/styles';\nimport { textOf } from '../../collection/text';\nimport { useRipple } from '../../hooks/useRipple';\nimport { RowContent } from '../../row';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\n\n// The lists page's selectable list. Each option is the row every list here\n// draws — `src/row`, shared with ListItem and with every collection the\n// coverage plan adds after this one — so the 56dp floor, the body-large\n// headline, the body-medium supporting line, the state layers and the\n// disabled treatment are all that module's and none of them is written\n// again. What is here is the container around those rows, the section and\n// its header, and the row the list shows while it is fetching more.\n//\n// The container takes the page's 8dp above and below its rows and no\n// background of its own, which is what lets the same list sit on the page\n// and inside a popover without knowing which it is in. Select, ComboBox and\n// Autocomplete are each a field plus one of these in an overlay, so that is\n// not a detail — it is the reason the container is transparent.\n//\n// A selected option takes primary container and on primary container, the\n// page's selected state, through the row module's `list` variant. The page\n// also draws a checkbox in the trailing slot on a list that selects more\n// than one; that is left to the call site rather than added by the option,\n// since which of the two affordances a list wants is the list's decision and\n// the slot is already there for it.\n//\n// Three things are worth knowing about how this maps onto React Aria.\n//\n// **The option's styles are a function of its render state.** StyleX cannot\n// target `[data-selected]` on the element it is styling, so selection,\n// disabled and the rest are read from the state React Aria hands the\n// `className` function — the same mechanism Tabs and Chip use, wrapped in\n// `mergeStatefulStyles` so a call site's own `className` survives.\n//\n// **A section's heading is React Aria's `Header`**, which is what points the\n// section's `aria-labelledby` at it. The lists page names no subhead in its\n// anatomy, so the type is title-small in on surface variant at the row's own\n// 16dp inline padding, which is what the page's own guidance draws.\n//\n// **The load-more row is a sentinel, not a button.** React Aria's\n// `ListBoxLoadMoreItem` calls `onLoadMore` when it comes into view and\n// renders whatever it is given while `isLoading`; ours renders the ring, so\n// a list that fetches as it scrolls says so with the same indicator every\n// other pending state in the library uses.\n\ntype ListBoxItemProps<T extends object = object> = {\n /** The option's headline — the one thing it is mostly about. */\n children?: ReactNode;\n /** A function may compute the class from the option's render state. */\n className?: RACListBoxItemProps<T>['className'];\n /** Content before the headline: an avatar, an icon, a checkbox. */\n leading?: ReactNode;\n /**\n * A line above the headline, in the page's label-small and the same muted\n * role the supporting line takes — a category, a date, a status. Given\n * alongside `supporting` it makes the row the page's three-line item.\n */\n overline?: ReactNode;\n /** A function may compute the style from the option's render state. */\n style?: RACListBoxItemProps<T>['style'];\n /** A second line under the headline, in the muted role. */\n supporting?: ReactNode;\n /** Content after the headline, such as an amount or a control. */\n trailing?: ReactNode;\n} & Omit<RACListBoxItemProps<T>, 'children' | 'className' | 'style'>;\ntype ListBoxLoadMoreProps = Omit<RACListBoxLoadMoreItemProps, 'children'> & {\n /**\n * What the row says while it is loading. Read by a screen reader; the ring\n * itself carries no text.\n * Left out, it is the word for it in the I18nProvider's locale — \"Loading\n * more\" in English.\n */\n label?: string;\n};\ntype ListBoxProps<T extends object = object> = {\n /** A function may compute the class from the list's render state. */\n className?: RACListBoxProps<T>['className'];\n /**\n * What the list shows when nothing is in it — after a search that matched\n * nothing, usually. Left out, it is a muted row saying \"No results\" in the\n * I18nProvider's locale, which an `Autocomplete` around the list also\n * announces. One of the call site's own replaces the announcement as well\n * as the row, so what it says to a screen reader is the call site's too.\n */\n renderEmptyState?: RACListBoxProps<T>['renderEmptyState'];\n /** A function may compute the style from the list's render state. */\n style?: RACListBoxProps<T>['style'];\n} & Omit<RACListBoxProps<T>, 'className' | 'renderEmptyState' | 'style'>;\ntype ListBoxSectionProps<T extends object = object> = Omit<RACListBoxSectionProps<T>, 'children'> & {\n /**\n * The options in the section. A section built from data puts React Aria's\n * `Collection` in here rather than a render function, since the header is\n * an element beside them.\n */\n children?: ReactNode;\n /**\n * The section's heading, rendered through React Aria's header so the\n * section is named by it. A section without one is a group with no name.\n */\n header?: ReactNode;\n};\n\n// The default empty state, at module scope so every list hands React Aria\n// the same function.\nfunction emptyState() {\n return <CollectionEmpty variant=\"list\" />;\n}\n\n// What the option draws, from React Aria's render state. Built by a call\n// rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after; the React Compiler memoises the result\n// on its inputs.\n//\n// It reads the render state for one thing: which colour the supporting line\n// takes. The muted role the page gives it holds only on the surface — over a\n// selected row's container it is a second colour family, and on a disabled\n// row it stays at full strength while the headline above it fades. The row\n// module decides; this hands it the two flags.\nfunction itemContent(children: ReactNode, leading: ReactNode, overline: ReactNode, supporting: ReactNode, trailing: ReactNode, ripple: ReactNode) {\n return (state: ListBoxItemRenderProps) => <>\n <RowContent isDisabled={state.isDisabled} isSelected={state.isSelected} leading={leading} overline={overline} supporting={supporting} trailing={trailing}>\n {children}\n </RowContent>\n {state.isDisabled ? null : ripple}\n </>;\n}\n\n// StyleX cannot target `[data-selected]` on the element it is styling, so an\n// option's state comes from the render state React Aria hands its className.\n// The order matters: `disabled` is applied last so its ground and colour\n// win over the selected container's. The state layers come from the render\n// state as well — see `focusVisible` in src/row/styles.ts — and React Aria\n// reports none of them on a disabled option, so nothing has to outrank them.\n//\n// A supporting line moves the option from the page's one-line container\n// height to its two-line one, which is a floor rather than something the\n// row's own box arrives at — see `twoLine` in `src/row/styles.ts`. Taken as\n// an argument rather than read from the render state, since React Aria\n// reports what an option is doing and not what it holds; the row is built by\n// a call for the same reason `itemContent` is.\n/**\n * A list of options one or more of which can be selected. Selection is React\n * Aria's: set `selectionMode` to `single` or `multiple`, and pass\n * `selectedKeys` with `onSelectionChange` to control it or\n * `defaultSelectedKeys` to let it keep its own. A list that only responds to\n * a press takes `onAction` on the option instead.\n *\n * Composed from parts, since an option's slots take arbitrary content:\n * `ListBox.Item`, `ListBox.Section` and `ListBox.LoadMore`. Name the list\n * with `aria-label` or `aria-labelledby` — nothing here labels it for you.\n *\n * The call site's `className` and `style` land on the container, which is\n * the element a layout positions.\n *\n * A list with nothing in it shows a muted \"No results\" row in place of its\n * options, which is what a search that matches nothing leaves; pass\n * `renderEmptyState` to draw something else.\n */\nfunction ListBox<T extends object>(props: ListBoxProps<T> & RefAttributes<HTMLDivElement>) {\n return <RACListBox renderEmptyState={emptyState} {...props} {...mergeStatefulStyles(containerClasses, props)} />;\n}\n\n/**\n * One option. Its slots are the row's: `leading`, the headline as children,\n * `supporting` under it, and `trailing`. Give every option an `id` — that is\n * the key selection is reported by.\n */\nfunction ListBoxItem<T extends object = object>({\n children,\n leading,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n overline,\n supporting,\n textValue,\n trailing,\n ...props\n}: ListBoxItemProps<T> & RefAttributes<HTMLDivElement>) {\n // The press ripple List's rows draw — see ListItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACListBoxItem textValue={textValue ?? textOf(children)} {...ripple.handlers} {...props} {...mergeStatefulStyles(rowItemStyles(supporting, overline), props)}>\n {itemContent(children, leading, overline, supporting, trailing, ripple.surface)}\n </RACListBoxItem>;\n}\n\n/**\n * The row the list shows while it is fetching more. React Aria calls\n * `onLoadMore` when this comes into view, and draws it only while\n * `isLoading` — so a list that pages as it scrolls needs nothing else.\n */\nfunction ListBoxLoadMore({\n label,\n ...props\n}: ListBoxLoadMoreProps & RefAttributes<HTMLDivElement>) {\n return <RACListBoxLoadMoreItem {...props} {...mergeStyles(stylex.props(collectionStyles.loading), props)}>\n <CollectionLoadMore diameter=\"24px\" label={label} />\n </RACListBoxLoadMoreItem>;\n}\n\n/**\n * A named group of options. `header` names it, and is what a screen reader\n * reads before the options inside.\n */\nfunction ListBoxSection<T extends object = object>({\n children,\n header,\n ...props\n}: ListBoxSectionProps<T> & RefAttributes<HTMLElement>) {\n return <RACListBoxSection {...props} {...mergeStyles(stylex.props(collectionStyles.section), props)}>\n {header === undefined ? null : <Header {...stylex.props(collectionStyles.header)}>{header}</Header>}\n {children}\n </RACListBoxSection>;\n}\nListBox.Item = ListBoxItem;\nListBox.LoadMore = ListBoxLoadMore;\nListBox.Section = ListBoxSection;\nexport type { ListBoxItemProps, ListBoxLoadMoreProps, ListBoxProps, ListBoxSectionProps };\nexport { ListBoxItem, ListBoxLoadMore, ListBoxSection };\nexport default ListBox;"],"mappings":";;;;;;;;;;;;AAgHA,SAASsB,aAAa;CACpB,OAAO,oBAAC,iBAAD,EAAiB,SAAQ,OAAM,CAAA;AACxC;AAYA,SAASC,YAAYR,UAAqBC,SAAoBC,UAAqBC,YAAuBC,UAAqBK,QAAmB;CAChJ,QAAQC,UAAkC,qBAAA,UAAA,EAAA,UAAA,CACtC,oBAAC,YAAD;EAAY,YAAYA,MAAMC;EAAY,YAAYD,MAAME;EAAqBX;EAAmBC;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,KAAAA;EAAWW,KAAAzB,YAAYb,MAAaO,iBAAgBwC,OAAQ,GAAGpB,OAAK;EAACC,EAAA,KAAAC;EAAAD,EAAA,KAAAS;EAAAT,EAAA,KAAAd;EAAAc,EAAA,KAAAR;EAAAQ,EAAA,KAAAE;EAAAF,EAAA,KAAAU;CAAA,OAAA;EAAAD,KAAAT,EAAA;EAAAd,WAAAc,EAAA;EAAAR,SAAAQ,EAAA;EAAAE,KAAAF,EAAA;EAAAU,KAAAV,EAAA;CAAA;CAAA,IAAAW;CAAA,IAAAX,EAAA,OAAAR,QAAA;EAC9FmB,KAAAnB,WAAW4B,KAAAA,IAAX,OAA8B,oBAAC,QAAD;GAAO,GAAKhD,MAAaO,iBAAgBa,MAAO;GAAIA,UAAAA;EAA7C,CAAA;EAA6DQ,EAAA,KAAAR;EAAAQ,EAAA,KAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,OAAAS,MAAAT,EAAA,OAAAd,YAAAc,EAAA,QAAAE,MAAAF,EAAA,QAAAU,MAAAV,EAAA,QAAAW,IAAA;EADhGE,KAAA,qBAAC,IAAD;GAAkB,GAAKd;GAAK,GAAMW;GAAlC,UAAA,CACFC,IACAzB,QAFoB;;EAGHc,EAAA,KAAAS;EAAAT,EAAA,KAAAd;EAAAc,EAAA,MAAAE;EAAAF,EAAA,MAAAU;EAAAV,EAAA,MAAAW;EAAAX,EAAA,MAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,OAHfa;AAGe;AAExBxC,UAAQgD,OAAO/C;AACfD,UAAQiD,WAAWL;AACnB5C,UAAQkD,UAAU9C"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","ListBox","ListBoxItem","RACListBoxItem","RACListBoxLoadMoreItem","ListBoxSection","RACListBoxSection","collectionStyles","containerClasses","rowItemStyles","textOf","useRipple","mergeStatefulStyles","mergeStyles","children","leading","overline","supporting","trailing","label","header","emptyState","itemContent","ripple","state","isDisabled","isSelected","props","$","t0","t1","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","textValue","T0","t2","t3","handlers","t4","t5","surface","t6","ListBoxLoadMore","loading","section","undefined","Item","LoadMore","Section","RACListBox"],"sources":["../../../src/components/list-box/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ListBoxItemRenderProps, ListBoxItemProps as RACListBoxItemProps, ListBoxLoadMoreItemProps as RACListBoxLoadMoreItemProps, ListBoxProps as RACListBoxProps, ListBoxSectionProps as RACListBoxSectionProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Header, ListBox as RACListBox, ListBoxItem as RACListBoxItem, ListBoxLoadMoreItem as RACListBoxLoadMoreItem, ListBoxSection as RACListBoxSection } from 'react-aria-components';\nimport { CollectionEmpty, CollectionLoadMore } from '../../collection';\nimport { collectionStyles, containerClasses, rowItemStyles } from '../../collection/styles';\nimport { textOf } from '../../collection/text';\nimport { useRipple } from '../../hooks/useRipple';\nimport { RowContent } from '../../row';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\n\n// The lists page's selectable list. Each option is the row every list here\n// draws — `src/row`, shared with ListItem and with every collection the\n// coverage plan adds after this one — so the 56dp floor, the body-large\n// headline, the body-medium supporting line, the state layers and the\n// disabled treatment are all that module's and none of them is written\n// again. What is here is the container around those rows, the section and\n// its header, and the row the list shows while it is fetching more.\n//\n// The container takes the page's 8dp above and below its rows and no\n// background of its own, which is what lets the same list sit on the page\n// and inside a popover without knowing which it is in. Select, ComboBox and\n// Autocomplete are each a field plus one of these in an overlay, so that is\n// not a detail — it is the reason the container is transparent.\n//\n// A selected option takes primary container and on primary container, the\n// page's selected state, through the row module's `list` variant. The page\n// also draws a checkbox in the trailing slot on a list that selects more\n// than one; that is left to the call site rather than added by the option,\n// since which of the two affordances a list wants is the list's decision and\n// the slot is already there for it.\n//\n// Three things are worth knowing about how this maps onto React Aria.\n//\n// **The option's styles are a function of its render state.** StyleX cannot\n// target `[data-selected]` on the element it is styling, so selection,\n// disabled and the rest are read from the state React Aria hands the\n// `className` function — the same mechanism Tabs and Chip use, wrapped in\n// `mergeStatefulStyles` so a call site's own `className` survives.\n//\n// **A section's heading is React Aria's `Header`**, which is what points the\n// section's `aria-labelledby` at it. The lists page names no subhead in its\n// anatomy, so the type is title-small in on surface variant at the row's own\n// 16dp inline padding, which is what the page's own guidance draws.\n//\n// **The load-more row is a sentinel, not a button.** React Aria's\n// `ListBoxLoadMoreItem` calls `onLoadMore` when it comes into view and\n// renders whatever it is given while `isLoading`; ours renders the ring, so\n// a list that fetches as it scrolls says so with the same indicator every\n// other pending state in the library uses.\n\ntype ListBoxItemProps<T extends object = object> = {\n /** The option's headline — the one thing it is mostly about. */\n children?: ReactNode;\n /** A function may compute the class from the option's render state. */\n className?: RACListBoxItemProps<T>['className'];\n /** Content before the headline: an avatar, an icon, a checkbox. */\n leading?: ReactNode;\n /**\n * A line above the headline, in the page's label-small and the same muted\n * role the supporting line takes — a category, a date, a status. Given\n * alongside `supporting` it makes the row the page's three-line item.\n */\n overline?: ReactNode;\n /** A function may compute the style from the option's render state. */\n style?: RACListBoxItemProps<T>['style'];\n /** A second line under the headline, in the muted role. */\n supporting?: ReactNode;\n /** Content after the headline, such as an amount or a control. */\n trailing?: ReactNode;\n} & Omit<RACListBoxItemProps<T>, 'children' | 'className' | 'style'>;\ntype ListBoxLoadMoreProps = Omit<RACListBoxLoadMoreItemProps, 'children'> & {\n /**\n * What the row says while it is loading. Read by a screen reader; the ring\n * itself carries no text.\n * Left out, it is the word for it in the I18nProvider's locale — \"Loading\n * more\" in English.\n */\n label?: string;\n};\ntype ListBoxProps<T extends object = object> = {\n /** A function may compute the class from the list's render state. */\n className?: RACListBoxProps<T>['className'];\n /**\n * What the list shows when nothing is in it — after a search that matched\n * nothing, usually. Left out, it is a muted row saying \"No results\" in the\n * I18nProvider's locale, which an `Autocomplete` around the list also\n * announces. One of the call site's own replaces the announcement as well\n * as the row, so what it says to a screen reader is the call site's too.\n */\n renderEmptyState?: RACListBoxProps<T>['renderEmptyState'];\n /** A function may compute the style from the list's render state. */\n style?: RACListBoxProps<T>['style'];\n} & Omit<RACListBoxProps<T>, 'className' | 'renderEmptyState' | 'style'>;\ntype ListBoxSectionProps<T extends object = object> = Omit<RACListBoxSectionProps<T>, 'children'> & {\n /**\n * The options in the section. A section built from data puts React Aria's\n * `Collection` in here rather than a render function, since the header is\n * an element beside them.\n */\n children?: ReactNode;\n /**\n * The section's heading, rendered through React Aria's header so the\n * section is named by it. A section without one is a group with no name.\n */\n header?: ReactNode;\n};\n\n// The default empty state, at module scope so every list hands React Aria\n// the same function.\nfunction emptyState() {\n return <CollectionEmpty variant=\"list\" />;\n}\n\n// What the option draws, from React Aria's render state. Built by a call\n// rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after; the React Compiler memoises the result\n// on its inputs.\n//\n// It reads the render state for one thing: which colour the supporting line\n// takes. The muted role the page gives it holds only on the surface — over a\n// selected row's container it is a second colour family, and on a disabled\n// row it stays at full strength while the headline above it fades. The row\n// module decides; this hands it the two flags.\nfunction itemContent(children: ReactNode, leading: ReactNode, overline: ReactNode, supporting: ReactNode, trailing: ReactNode, ripple: ReactNode) {\n return (state: ListBoxItemRenderProps) => <>\n <RowContent isDisabled={state.isDisabled} isSelected={state.isSelected} leading={leading} overline={overline} supporting={supporting} trailing={trailing}>\n {children}\n </RowContent>\n {state.isDisabled ? null : ripple}\n </>;\n}\n\n// StyleX cannot target `[data-selected]` on the element it is styling, so an\n// option's state comes from the render state React Aria hands its className.\n// The order matters: `disabled` is applied last so its ground and colour\n// win over the selected container's. The state layers come from the render\n// state as well — see `focusVisible` in src/row/styles.ts — and React Aria\n// reports none of them on a disabled option, so nothing has to outrank them.\n//\n// A supporting line moves the option from the page's one-line container\n// height to its two-line one, which is a floor rather than something the\n// row's own box arrives at — see `twoLine` in `src/row/styles.ts`. Taken as\n// an argument rather than read from the render state, since React Aria\n// reports what an option is doing and not what it holds; the row is built by\n// a call for the same reason `itemContent` is.\n/**\n * A list of options one or more of which can be selected. Selection is React\n * Aria's: set `selectionMode` to `single` or `multiple`, and pass\n * `selectedKeys` with `onSelectionChange` to control it or\n * `defaultSelectedKeys` to let it keep its own. A list that only responds to\n * a press takes `onAction` on the option instead.\n *\n * Composed from parts, since an option's slots take arbitrary content:\n * `ListBox.Item`, `ListBox.Section` and `ListBox.LoadMore`. Name the list\n * with `aria-label` or `aria-labelledby` — nothing here labels it for you.\n *\n * The call site's `className` and `style` land on the container, which is\n * the element a layout positions.\n *\n * A list with nothing in it shows a muted \"No results\" row in place of its\n * options, which is what a search that matches nothing leaves; pass\n * `renderEmptyState` to draw something else.\n */\nfunction ListBox<T extends object>(props: ListBoxProps<T> & RefAttributes<HTMLDivElement>) {\n return <RACListBox renderEmptyState={emptyState} {...props} {...mergeStatefulStyles(containerClasses, props)} />;\n}\n\n/**\n * One option. Its slots are the row's: `leading`, the headline as children,\n * `supporting` under it, and `trailing`. Give every option an `id` — that is\n * the key selection is reported by.\n */\nfunction ListBoxItem<T extends object = object>({\n children,\n leading,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n overline,\n supporting,\n textValue,\n trailing,\n ...props\n}: ListBoxItemProps<T> & RefAttributes<HTMLDivElement>) {\n // The press ripple List's rows draw — see ListItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACListBoxItem textValue={textValue ?? textOf(children)} {...ripple.handlers} {...props} {...mergeStatefulStyles(rowItemStyles(supporting, overline), props)}>\n {itemContent(children, leading, overline, supporting, trailing, ripple.surface)}\n </RACListBoxItem>;\n}\n\n/**\n * The row the list shows while it is fetching more. React Aria calls\n * `onLoadMore` when this comes into view, and draws it only while\n * `isLoading` — so a list that pages as it scrolls needs nothing else.\n */\nfunction ListBoxLoadMore({\n label,\n ...props\n}: ListBoxLoadMoreProps & RefAttributes<HTMLDivElement>) {\n return <RACListBoxLoadMoreItem {...props} {...mergeStyles(stylex.props(collectionStyles.loading), props)}>\n <CollectionLoadMore diameter=\"24px\" label={label} />\n </RACListBoxLoadMoreItem>;\n}\n\n/**\n * A named group of options. `header` names it, and is what a screen reader\n * reads before the options inside.\n */\nfunction ListBoxSection<T extends object = object>({\n children,\n header,\n ...props\n}: ListBoxSectionProps<T> & RefAttributes<HTMLElement>) {\n return <RACListBoxSection {...props} {...mergeStyles(stylex.props(collectionStyles.section), props)}>\n {header === undefined ? null : <Header {...stylex.props(collectionStyles.header)}>{header}</Header>}\n {children}\n </RACListBoxSection>;\n}\nListBox.Item = ListBoxItem;\nListBox.LoadMore = ListBoxLoadMore;\nListBox.Section = ListBoxSection;\nexport type { ListBoxItemProps, ListBoxLoadMoreProps, ListBoxProps, ListBoxSectionProps };\nexport { ListBoxItem, ListBoxLoadMore, ListBoxSection };\nexport default ListBox;"],"mappings":";;;;;;;;;;;;AAgHA,SAASsB,aAAa;CACpB,OAAO,oBAAC,iBAAD,EAAiB,SAAQ,OAAM,CAAA;AACxC;AAYA,SAASC,YAAYR,UAAqBC,SAAoBC,UAAqBC,YAAuBC,UAAqBK,QAAmB;CAChJ,QAAQC,UAAkC,qBAAA,UAAA,EAAA,UAAA,CACtC,oBAAC,YAAD;EAAY,YAAYA,MAAMC;EAAY,YAAYD,MAAME;EAAqBX;EAAmBC;EAAsBC;EAAsBC;EAC7IJ;CACS,CAAA,GACXU,MAAMC,aAAa,OAAOF,MAC7B,EAAA,CAAA;AACJ;;;;;;;;;;;;;;;;;;;AAiCA,SAAAtB,QAAA0B,OAAA;CAAA,MAAAC,IAAA7B,EAAA,CAAA;CAAA,IAAA8B;CAAA,IAAAD,EAAA,OAAAD,OAAA;EACkEE,KAAAjB,oBAAoBJ,kBAAkBmB,KAAK;EAACC,EAAA,KAAAD;EAAAC,EAAA,KAAAC;CAAA,OAAAA,KAAAD,EAAA;CAAA,IAAAE;CAAA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AAR,QAAA;EAC9FmB,KAAAnB,WAAW4B,KAAAA,IAAX,OAA8B,oBAAC,QAAD;GAAO,GAAKhD,MAAaO,iBAAgBa,MAAO;GAAIA,UAAAA;EAA7C,CAAA;EAA6DQ,EAAA,KAAAR;EAAAQ,EAAA,KAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,OAAAS,MAAAT,EAAA,OAAAd,YAAAc,EAAA,QAAAE,MAAAF,EAAA,QAAAU,MAAAV,EAAA,QAAAW,IAAA;EADhGE,KAAA,qBAAC,IAAD;GAAkB,GAAKd;GAAK,GAAMW;GAAlC,UAAA,CACFC,IACAzB,QAFoB;;EAGHc,EAAA,KAAAS;EAAAT,EAAA,KAAAd;EAAAc,EAAA,MAAAE;EAAAF,EAAA,MAAAU;EAAAV,EAAA,MAAAW;EAAAX,EAAA,MAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,OAHfa;AAGe;AAExBxC,QAAQgD,OAAO/C;AACfD,QAAQiD,WAAWL;AACnB5C,QAAQkD,UAAU9C"}
@@ -1,7 +1,7 @@
1
1
  import { OverlayAlign, OverlaySide } from "../../styles/overlay.js";
2
2
  import Separator$1 from "../separator/index.js";
3
3
  import { ComponentProps, ReactElement, ReactNode, RefAttributes } from "react";
4
- import { ClassNameOrFunction, MenuItemProps, MenuLoadMoreItemProps, MenuProps, MenuSectionProps, MenuTriggerProps, PopoverRenderProps, StyleOrFunction } from "react-aria-components";
4
+ import { ClassNameOrFunction, MenuItemProps as MenuItemProps$1, MenuLoadMoreItemProps, MenuProps as MenuProps$1, MenuSectionProps as MenuSectionProps$1, MenuTriggerProps, PopoverRenderProps, StyleOrFunction } from "react-aria-components";
5
5
  type MenuAlign = OverlayAlign;
6
6
  type MenuContentProps<T extends object = object> = {
7
7
  /**
@@ -32,7 +32,7 @@ type MenuContentProps<T extends object = object> = {
32
32
  * keeps a row's height rather than shrinking to its search bar. One of the
33
33
  * call site's own replaces the announcement as well as the row.
34
34
  */
35
- renderEmptyState?: MenuProps<T>['renderEmptyState'];
35
+ renderEmptyState?: MenuProps$1<T>['renderEmptyState'];
36
36
  /**
37
37
  * Content drawn on the surface above the items — a search bar that filters
38
38
  * them, usually. It goes here rather than among the children because a
@@ -62,12 +62,12 @@ type MenuContentProps<T extends object = object> = {
62
62
  sideOffset?: number;
63
63
  /** Lands on the surface, as `className` does. */
64
64
  style?: StyleOrFunction<PopoverRenderProps>;
65
- } & Omit<MenuProps<T>, 'className' | 'renderEmptyState' | 'style'>;
66
- type MenuItemProps$1<T extends object = object> = {
65
+ } & Omit<MenuProps$1<T>, 'className' | 'renderEmptyState' | 'style'>;
66
+ type MenuItemProps<T extends object = object> = {
67
67
  /** The item's label — what it does. */
68
68
  children?: ReactNode;
69
69
  /** A function may compute the class from the item's render state. */
70
- className?: MenuItemProps<T>['className'];
70
+ className?: MenuItemProps$1<T>['className'];
71
71
  /** Content before the label, usually an icon. */
72
72
  leading?: ReactNode;
73
73
  /**
@@ -80,10 +80,10 @@ type MenuItemProps$1<T extends object = object> = {
80
80
  */
81
81
  shortcut?: ReactNode;
82
82
  /** A function may compute the style from the item's render state. */
83
- style?: MenuItemProps<T>['style'];
83
+ style?: MenuItemProps$1<T>['style'];
84
84
  /** Content after the label, before the shortcut. */
85
85
  trailing?: ReactNode;
86
- } & Omit<MenuItemProps<T>, 'children' | 'className' | 'style'>;
86
+ } & Omit<MenuItemProps$1<T>, 'children' | 'className' | 'style'>;
87
87
  type MenuLoadMoreProps = Omit<MenuLoadMoreItemProps, 'children'> & {
88
88
  /**
89
89
  * What the row says while it is loading. Read by a screen reader; the ring
@@ -93,11 +93,11 @@ type MenuLoadMoreProps = Omit<MenuLoadMoreItemProps, 'children'> & {
93
93
  */
94
94
  label?: string;
95
95
  };
96
- type MenuProps$1 = Omit<MenuTriggerProps, 'children'> & {
96
+ type MenuProps = Omit<MenuTriggerProps, 'children'> & {
97
97
  /** The trigger, then the `Menu.Content` it opens. */
98
98
  children?: ReactNode;
99
99
  };
100
- type MenuSectionProps$1<T extends object = object> = Omit<MenuSectionProps<T>, 'children'> & {
100
+ type MenuSectionProps<T extends object = object> = Omit<MenuSectionProps$1<T>, 'children'> & {
101
101
  /**
102
102
  * The items in the section. A section built from data puts React Aria's
103
103
  * `Collection` in here rather than a render function, since the header is
@@ -146,12 +146,12 @@ type MenuSubmenuProps = {
146
146
  *
147
147
  * The trigger's text names the menu, so the button is where a label goes.
148
148
  */
149
- declare function Menu$1({ children, ...props }: MenuProps$1): import("react").JSX.Element;
150
- declare namespace Menu$1 {
149
+ declare function Menu({ children, ...props }: MenuProps): import("react").JSX.Element;
150
+ declare namespace Menu {
151
151
  var Content: typeof MenuContent;
152
- var Item: typeof MenuItem$1;
152
+ var Item: typeof MenuItem;
153
153
  var LoadMore: typeof MenuLoadMore;
154
- var Section: typeof MenuSection$1;
154
+ var Section: typeof MenuSection;
155
155
  var Separator: typeof MenuSeparator;
156
156
  var Submenu: typeof MenuSubmenu;
157
157
  }
@@ -180,7 +180,7 @@ declare function MenuContent<T extends object = object>({ align, alignOffset, cl
180
180
  * as children, and `trailing` after it, with `shortcut` at the end. An item
181
181
  * that opens a submenu draws the chevron itself.
182
182
  */
183
- declare function MenuItem$1<T extends object = object>({ children, leading, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp, shortcut, textValue, trailing, ...props }: MenuItemProps$1<T> & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
183
+ declare function MenuItem<T extends object = object>({ children, leading, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp, shortcut, textValue, trailing, ...props }: MenuItemProps<T> & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
184
184
  /**
185
185
  * The row shown while more items are being fetched. React Aria calls
186
186
  * `onLoadMore` when it comes into view, and draws it only while `isLoading`.
@@ -190,7 +190,7 @@ declare function MenuLoadMore({ label, ...props }: MenuLoadMoreProps & RefAttrib
190
190
  * A named group of items. `header` names it, and is what a screen reader
191
191
  * reads before the items inside.
192
192
  */
193
- declare function MenuSection$1<T extends object = object>({ children, header, ...props }: MenuSectionProps$1<T> & RefAttributes<HTMLElement>): import("react").JSX.Element;
193
+ declare function MenuSection<T extends object = object>({ children, header, ...props }: MenuSectionProps<T> & RefAttributes<HTMLElement>): import("react").JSX.Element;
194
194
  /**
195
195
  * A rule between groups of items. It takes its role from the menu around it,
196
196
  * so it needs no slot from the call site.
@@ -201,4 +201,4 @@ declare function MenuSeparator(props: MenuSeparatorProps): import("react").JSX.E
201
201
  * `Menu.Item` that opens it, then the `Menu.Content` it opens.
202
202
  */
203
203
  declare function MenuSubmenu(props: MenuSubmenuProps): import("react").JSX.Element;
204
- export { type MenuAlign, MenuContent, type MenuContentProps, MenuItem$1 as MenuItem, type MenuItemProps$1 as MenuItemProps, MenuLoadMore, type MenuLoadMoreProps, type MenuProps$1 as MenuProps, MenuSection$1 as MenuSection, type MenuSectionProps$1 as MenuSectionProps, MenuSeparator, type MenuSeparatorProps, type MenuSide, MenuSubmenu, type MenuSubmenuProps, Menu$1 as default };
204
+ export { type MenuAlign, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLoadMore, type MenuLoadMoreProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, type MenuSide, MenuSubmenu, type MenuSubmenuProps, Menu as default };
@@ -13,7 +13,7 @@ import Separator$1 from "../separator/index.js";
13
13
  import { c } from "react/compiler-runtime";
14
14
  import { useContext, useEffect, useRef } from "react";
15
15
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
16
- import { AutocompleteStateContext, Header, Keyboard, Menu, MenuItem, MenuLoadMoreItem, MenuSection, MenuTrigger, Popover, SubmenuTrigger, Text } from "react-aria-components";
16
+ import { AutocompleteStateContext, Header, Keyboard, Menu as Menu$1, MenuItem as MenuItem$1, MenuLoadMoreItem, MenuSection as MenuSection$1, MenuTrigger, Popover, SubmenuTrigger, Text } from "react-aria-components";
17
17
  // src/components/menu/index.tsx
18
18
  const styles = {
19
19
  content: {
@@ -73,7 +73,7 @@ function itemStyles(state) {
73
73
  *
74
74
  * The trigger's text names the menu, so the button is where a label goes.
75
75
  */
76
- function Menu$1(t0) {
76
+ function Menu(t0) {
77
77
  const $ = c(6);
78
78
  let children;
79
79
  let props;
@@ -179,7 +179,7 @@ function MenuContent(t0) {
179
179
  } else t3 = $[18];
180
180
  let t4;
181
181
  if ($[19] !== props) {
182
- t4 = /* @__PURE__ */ jsx(Menu, {
182
+ t4 = /* @__PURE__ */ jsx(Menu$1, {
183
183
  renderEmptyState: emptyState,
184
184
  ...props,
185
185
  className: "x9f619 x78zum5 xdt5ytf x1t137rt"
@@ -222,7 +222,7 @@ const SEARCH_CONTROL = "input, textarea, [contenteditable=\"true\"]";
222
222
  * as children, and `trailing` after it, with `shortcut` at the end. An item
223
223
  * that opens a submenu draws the chevron itself.
224
224
  */
225
- function MenuItem$1(t0) {
225
+ function MenuItem(t0) {
226
226
  const $ = c(22);
227
227
  const { children, leading, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp, shortcut, textValue, trailing, ...props } = t0;
228
228
  let t1;
@@ -242,7 +242,7 @@ function MenuItem$1(t0) {
242
242
  $[5] = t1;
243
243
  } else t1 = $[5];
244
244
  const ripple = useRipple(true, t1, true);
245
- const T0 = MenuItem;
245
+ const T0 = MenuItem$1;
246
246
  let t2;
247
247
  if ($[6] !== children || $[7] !== textValue) {
248
248
  t2 = textValue ?? textOf(children);
@@ -336,7 +336,7 @@ function MenuLoadMore(t0) {
336
336
  * A named group of items. `header` names it, and is what a screen reader
337
337
  * reads before the items inside.
338
338
  */
339
- function MenuSection$1(t0) {
339
+ function MenuSection(t0) {
340
340
  const $ = c(10);
341
341
  let children;
342
342
  let header;
@@ -363,7 +363,7 @@ function MenuSection$1(t0) {
363
363
  } else t1 = $[5];
364
364
  let t2;
365
365
  if ($[6] !== children || $[7] !== props || $[8] !== t1) {
366
- t2 = /* @__PURE__ */ jsxs(MenuSection, {
366
+ t2 = /* @__PURE__ */ jsxs(MenuSection$1, {
367
367
  ...props,
368
368
  children: [t1, children]
369
369
  });
@@ -488,12 +488,12 @@ function trailingOf(state, shortcut, trailing, check) {
488
488
  check
489
489
  ] });
490
490
  }
491
- Menu$1.Content = MenuContent;
492
- Menu$1.Item = MenuItem$1;
493
- Menu$1.LoadMore = MenuLoadMore;
494
- Menu$1.Section = MenuSection$1;
495
- Menu$1.Separator = MenuSeparator;
496
- Menu$1.Submenu = MenuSubmenu;
497
- export { MenuContent, MenuItem$1 as MenuItem, MenuLoadMore, MenuSection$1 as MenuSection, MenuSeparator, MenuSubmenu, Menu$1 as default };
491
+ Menu.Content = MenuContent;
492
+ Menu.Item = MenuItem;
493
+ Menu.LoadMore = MenuLoadMore;
494
+ Menu.Section = MenuSection;
495
+ Menu.Separator = MenuSeparator;
496
+ Menu.Submenu = MenuSubmenu;
497
+ export { MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu, Menu as default };
498
498
 
499
499
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","stylex","useContext","useEffect","useRef","AutocompleteStateContext","Menu","MenuItem","RACMenuItem","RACMenuLoadMoreItem","MenuSection","textOf","useRipple","rowStyles","supportingTone","mergeStatefulStyles","mergeStyles","overlay","placementOf","popupOrigin","Separator","styles","content","kWkggS","kaIpWk","ks0D6T","k7Eaqz","k3XXqK","k8WAf4","$$css","shortcut","kMwMTN","align","alignOffset","className","container","search","side","sideOffset","style","children","leading","trailing","label","header","emptyState","itemContent","ripple","state","check","isSelected","undefined","hasLeading","isDisabled","trailingOf","itemStyles","props","base","menu","selectedMenu","isHovered","hovered","isFocusVisible","focusVisible","isPressed","pressed","disabled","t0","$","t1","MenuContent","ref","t2","surfaceStyles","t3","t4","t5","t6","SEARCH_CONTROL","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","textValue","T0","handlers","surface","MenuLoadMore","MenuSeparator","MenuSubmenu","SearchSlot","autocomplete","latest","current","Symbol","for","querySelector","focus","setInputValue","popup","placement","hasSubmenu","Content","Item","LoadMore","Section","Submenu","RACMenuTrigger","RACMenu","RACPopover","RACMenuSection","Separator","RACSubmenuTrigger"],"sources":["../../../src/components/menu/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ComponentProps, ReactElement, ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, MenuItemRenderProps, PopoverRenderProps, MenuItemProps as RACMenuItemProps, MenuLoadMoreItemProps as RACMenuLoadMoreItemProps, MenuProps as RACMenuProps, MenuSectionProps as RACMenuSectionProps, MenuTriggerProps as RACMenuTriggerProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useEffect, useRef } from 'react';\nimport { AutocompleteStateContext, Header, Keyboard, Menu as RACMenu, MenuItem as RACMenuItem, MenuLoadMoreItem as RACMenuLoadMoreItem, MenuSection as RACMenuSection, MenuTrigger as RACMenuTrigger, Popover as RACPopover, SubmenuTrigger as RACSubmenuTrigger, Text } from 'react-aria-components';\nimport type { OverlayAlign, OverlaySide } from '../../styles/overlay';\nimport { CollectionEmpty, CollectionLoadMore, CollectionStatus } from '../../collection';\nimport { textOf } from '../../collection/text';\nimport { CheckGlyph, ChevronEndGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { KeycapToneContext } from '../../keycap/context';\nimport { RowContent } from '../../row';\nimport { rowStyles, supportingTone } from '../../row/styles';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\nimport { overlay, placementOf, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, sizing, spacing, typography } from '../../tokens/design.tokens.stylex';\nimport Separator from '../separator';\n\n// The menus page's menu: a surface between 112 and 280 wide with a 4dp\n// corner and 8dp above and below its items, holding rows of the row module's\n// menu variant — 48dp tall, a label-large label, tertiary container when\n// selected, with a check beside the label. The container alone sits as close\n// as 1.1:1 to the surface, so the check is what carries the selection for a\n// reader who cannot tell the two apart. The surface itself is the overlay module's, shared with Popover\n// and Sheet, with the two things the menus page decides differently applied\n// over it: the corner, which is the extra-small step rather than the\n// medium one every other overlay takes, and the container colour, which is\n// the Expressive column's surface container low rather than the baseline's\n// surface container.\n//\n// Six parts, because everything a menu holds takes arbitrary content:\n// `Menu.Content`, `Menu.Item`, `Menu.Section`, `Menu.Separator`,\n// `Menu.Submenu` and `Menu.LoadMore`. A `Button` or `IconButton` placed\n// directly inside `Menu` is the trigger, wired through React Aria's context\n// rather than a part of ours — the same arrangement Sheet and Popover use.\n//\n// Four things are worth knowing about how this maps onto React Aria.\n//\n// **The item's styles are a function of its render state.** StyleX cannot\n// target `[data-selected]` on the element it is styling, so selection,\n// disabled and the rest are read from the state React Aria hands the\n// `className` function, wrapped in `mergeStatefulStyles` so a call site's own\n// `className` survives.\n//\n// **A shortcut goes through React Aria's `Keyboard` slot**, and the label\n// through its `Text` slot. The second is what makes the first work: React\n// Aria points the item's `aria-labelledby` at the labelled text, so a screen\n// reader reads the label alone and announces the keystroke separately. Left\n// as plain content, the item's name is its whole text and the shortcut is\n// read as part of what the item does. The keycap itself is the library's.\n// The shortcut's colour follows the item's state as the supporting line's\n// does, through the same `supportingTone`, and a selected or disabled item\n// hands a keycap inside it the `inherit` tone, so the keycap follows too.\n//\n// **A submenu's arrow is drawn from render state, not from a prop.** React\n// Aria reports `hasSubmenu` on the item inside a `SubmenuTrigger`, so an item\n// that opens one gets the chevron without the call site saying so twice. The\n// glyph carries no direction of its own, so the style mirrors it under a\n// right-to-left writing mode.\n//\n// **A menu's children are a collection**, so anything that is not an item is\n// dropped: React Aria walks them looking for items and finds a search input\n// no place to be. `Menu.Content` therefore takes a `search` slot, drawn on\n// the surface above the items — which is also what puts the bar and the\n// items inside one `Autocomplete` when the menu is filtered.\n//\n// **A separator needs no slot from the call site.** React Aria's menu\n// provides the separator context, which is what `Menu.Separator` picks up —\n// that is why Separator moved onto React Aria in Phase 0. What is added here\n// is the menus page's 8dp either side of the rule.\n\nconst MENU_MIN = '112px';\nconst MENU_MAX = '280px';\nconst styles = {\n content: {\n kWkggS: \"x1vnz5z6\",\n kaIpWk: \"x1tfhd1\",\n ks0D6T: \"x1jkqq1h\",\n k7Eaqz: \"x1c7vg25\",\n k3XXqK: \"x1t137rt\",\n k8WAf4: \"x1cmllll\",\n $$css: true\n },\n shortcut: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\ntype MenuAlign = OverlayAlign;\ntype MenuContentProps<T extends object = object> = {\n /**\n * Where the menu lines up along that side. Left out, a menu lines up with\n * the start of its trigger, and a submenu with the top of the item that\n * opens it.\n */\n align?: MenuAlign;\n /** Moves the menu along that side, in pixels. */\n alignOffset?: number;\n /**\n * Lands on the surface, which is the element a layout positions. A\n * function may compute the class from the surface's render state.\n */\n className?: ClassNameOrFunction<PopoverRenderProps>;\n /**\n * Where to portal the menu. Defaults to the container of the `ThemeScope`\n * around it, which keeps the menu on that scope's tokens, or to the end of\n * `<body>` where there is none. A subtree themed through the `themeScope`\n * class has no container of its own, so point this inside it, or the menu\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * What the menu shows when nothing is in it — after a search that matched\n * nothing, usually. Left out, it is a muted row saying \"No results\" in the\n * I18nProvider's locale, which the surface also announces, so the menu\n * keeps a row's height rather than shrinking to its search bar. One of the\n * call site's own replaces the announcement as well as the row.\n */\n renderEmptyState?: RACMenuProps<T>['renderEmptyState'];\n /**\n * Content drawn on the surface above the items — a search bar that filters\n * them, usually. It goes here rather than among the children because a\n * menu's children are a collection: React Aria walks them for items and\n * drops anything else, so an input written beside them disappears.\n *\n * To filter with it, wrap this whole part in `Autocomplete`, which puts\n * the bar and the items inside one wrapper. The bar takes focus as the\n * menu opens, however it was opened, so typing filters straight away,\n * and its query is cleared as the menu closes, so a reopened menu shows\n * every item.\n */\n search?: ReactNode;\n /**\n * Which side of the trigger the menu opens on. Left out, a menu opens below\n * its trigger and a submenu at the inline end of the item that opens it,\n * where the item's chevron points — the places React Aria gives each.\n * Given `align` alone, the side is `bottom`. `start` and `end` follow the\n * writing direction, as a submenu does; `left` and `right` stay put in\n * either.\n */\n side?: MenuSide;\n /**\n * How far the menu sits from the trigger, in pixels. Left out, React Aria's:\n * 8, or 0 for a menu opened with `trigger=\"contextMenu\"`.\n */\n sideOffset?: number;\n /** Lands on the surface, as `className` does. */\n style?: StyleOrFunction<PopoverRenderProps>;\n} & Omit<RACMenuProps<T>, 'className' | 'renderEmptyState' | 'style'>;\ntype MenuItemProps<T extends object = object> = {\n /** The item's label — what it does. */\n children?: ReactNode;\n /** A function may compute the class from the item's render state. */\n className?: RACMenuItemProps<T>['className'];\n /** Content before the label, usually an icon. */\n leading?: ReactNode;\n /**\n * The keystroke that runs the item, at the end of the row. Pass a `Keycap`\n * to draw it as one; a string is set as plain text in the muted role. Either\n * goes through React Aria's keyboard slot, so a screen reader announces it\n * apart from the label rather than reading the two as one name. It takes\n * the item's colour while the item is selected or disabled, and so does a\n * `Keycap` inside it, its rule included.\n */\n shortcut?: ReactNode;\n /** A function may compute the style from the item's render state. */\n style?: RACMenuItemProps<T>['style'];\n /** Content after the label, before the shortcut. */\n trailing?: ReactNode;\n} & Omit<RACMenuItemProps<T>, 'children' | 'className' | 'style'>;\ntype MenuLoadMoreProps = Omit<RACMenuLoadMoreItemProps, 'children'> & {\n /**\n * What the row says while it is loading. Read by a screen reader; the ring\n * itself carries no text.\n * Left out, it is the word for it in the I18nProvider's locale — \"Loading\n * more\" in English.\n */\n label?: string;\n};\n\n// `children` is optional here where React Aria makes it required, so the\n// type reads the way Sheet's and Popover's do: a root that composes rather\n// than one that has to be handed something. Sheet does the same for the same\n// reason.\ntype MenuProps = Omit<RACMenuTriggerProps, 'children'> & {\n /** The trigger, then the `Menu.Content` it opens. */\n children?: ReactNode;\n};\ntype MenuSectionProps<T extends object = object> = Omit<RACMenuSectionProps<T>, 'children'> & {\n /**\n * The items in the section. A section built from data puts React Aria's\n * `Collection` in here rather than a render function, since the header is\n * an element beside them.\n */\n children?: ReactNode;\n /**\n * The section's heading, rendered through React Aria's header so the\n * section is named by it. A section without one is a group with no name.\n */\n header?: ReactNode;\n};\ntype MenuSeparatorProps = Omit<ComponentProps<typeof Separator>, 'orientation'>;\ntype MenuSide = OverlaySide;\ntype MenuSubmenuProps = {\n /**\n * The item that opens the submenu, then the `Menu.Content` it opens.\n * Exactly those two, in that order. The count is the type's to enforce;\n * the order is not, since every JSX element has the same type.\n */\n children: [trigger: ReactElement, content: ReactElement];\n /**\n * How long the pointer rests on the item before the submenu opens, in\n * milliseconds.\n * @default 200\n */\n delay?: number;\n};\n\n// The default empty state, at module scope so every menu hands React Aria\n// the same function.\nfunction emptyState() {\n return <CollectionEmpty variant=\"menu\" />;\n}\n\n// What the item draws, from React Aria's render state. Built by a call\n// rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after; the React Compiler memoises the result\n// on its inputs.\n//\n// The render state decides three things: the chevron, which an item inside a\n// SubmenuTrigger gets without the call site asking twice, the check on a\n// selected item, and the supporting line's colour, which the row module takes\n// from whether the row is selected or disabled.\n//\n// The check takes the leading slot where the item has leading content, in\n// place of it, and comes at the end of the row where it has none. Either way\n// the label stays where it was, so choosing an item moves nothing in the\n// menu. Hidden from the tree, since React Aria's `aria-checked` already says\n// the item is chosen.\nfunction itemContent(children: ReactNode, leading: ReactNode, shortcut: ReactNode, trailing: ReactNode, ripple: ReactNode) {\n return (state: MenuItemRenderProps) => {\n const check = state.isSelected ? <CheckGlyph className=\"xxk0z11 x9f619 x2lah0s xvy4d1p\" /> : undefined;\n const hasLeading = leading !== undefined && leading !== null;\n return <>\n <RowContent isDisabled={state.isDisabled} isSelected={state.isSelected} leading={hasLeading ? check ?? leading : undefined} trailing={trailingOf(state, shortcut, trailing, hasLeading ? undefined : check)} variant=\"menu\">\n <Text slot=\"label\">{children}</Text>\n </RowContent>\n {state.isDisabled ? null : ripple}\n </>;\n };\n}\n\n// StyleX cannot target `[data-selected]` on the element it is styling, so an\n// item's state comes from the render state React Aria hands its className.\n// The order matters: `disabled` is applied last so its ground and colour\n// win over the selected container's. The state layers come from the render\n// state as well — see `focusVisible` in src/row/styles.ts — and React Aria\n// reports none of them on a disabled item, so nothing has to outrank them.\n// No overline, and so no three-line row: the menus page gives one item\n// height and one line of text. `List.Item` and `ListBox.Item` take the prop\n// because the lists page is what they draw, and this row is 48dp rather than\n// that page's 56. A label longer than the surface's 280dp still wraps, and\n// breaks inside a word that is wider than that, rather than running out of\n// the surface and under the shortcut — the shared row's rule, which nothing\n// here truncates.\nfunction itemStyles(state: MenuItemRenderProps) {\n return stylex.props(rowStyles.base, rowStyles.menu, state.isSelected && rowStyles.selectedMenu, state.isHovered && rowStyles.hovered, state.isFocusVisible && rowStyles.focusVisible, state.isPressed && rowStyles.pressed, state.isDisabled && rowStyles.disabled);\n}\n\n/**\n * A list of actions opened from a control. Open state is React Aria's: pass\n * `isOpen` with `onOpenChange` to control it, or `defaultOpen` to let it keep\n * its own.\n *\n * A `Button` or `IconButton` placed directly inside opens it; everything the\n * menu shows goes in `Menu.Content`, since the trigger lives in the page\n * while the menu is portalled out to the end of the body.\n *\n * ```tsx\n * <Menu>\n * <Button>Open</Button>\n * <Menu.Content>\n * <Menu.Item id=\"first\">First item</Menu.Item>\n * </Menu.Content>\n * </Menu>\n * ```\n *\n * The trigger's text names the menu, so the button is where a label goes.\n */\nfunction Menu({\n children,\n ...props\n}: MenuProps) {\n return <RACMenuTrigger {...props}>{children}</RACMenuTrigger>;\n}\n\n/**\n * The menu itself, and the surface it is drawn on. React Aria names it after\n * the control that opened it, so `aria-label` here is ignored — name the\n * trigger instead.\n *\n * The call site's `className` and `style` land on the surface, which is the\n * element a layout positions.\n *\n * The placement and the offsets are passed on only where the call site gives\n * them. React Aria hands the popover a placement of its own through context —\n * below the trigger for a menu, at the item's inline end for a submenu — and\n * a prop set here replaces it, so a default written here opened every\n * submenu below its item, over the rest of the menu it came from.\n *\n * A menu with nothing in it shows a muted \"No results\" row in place of its\n * items, and says so through a status on the surface, which is what a search\n * that matches nothing leaves; pass `renderEmptyState` to draw something\n * else.\n */\nfunction MenuContent<T extends object = object>({\n align,\n alignOffset,\n className,\n container,\n ref,\n search,\n side,\n sideOffset,\n style,\n ...props\n}: MenuContentProps<T> & RefAttributes<HTMLElement>) {\n return <RACPopover crossOffset={alignOffset} offset={sideOffset} placement={side === undefined && align === undefined ? undefined : placementOf(side ?? 'bottom', align ?? 'start')}\n // The surface, where the call site's class and style land, rather than\n // the menu inside it, which takes the rest of the props.\n ref={ref}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} {...mergeStatefulStyles(surfaceStyles, {\n className,\n style\n })}>\n <CollectionStatus>\n {search === undefined ? null : <SearchSlot>{search}</SearchSlot>}\n <RACMenu<T> renderEmptyState={emptyState} {...props} className=\"x9f619 x78zum5 xdt5ytf x1t137rt\" />\n </CollectionStatus>\n </RACPopover>;\n}\n\n// What a press on the search slot focuses: its field's own control.\nconst SEARCH_CONTROL = 'input, textarea, [contenteditable=\"true\"]';\n\n/**\n * One action. Its slots are the row's: `leading` before the label, the label\n * as children, and `trailing` after it, with `shortcut` at the end. An item\n * that opens a submenu draws the chevron itself.\n */\nfunction MenuItem<T extends object = object>({\n children,\n leading,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n shortcut,\n textValue,\n trailing,\n ...props\n}: MenuItemProps<T> & RefAttributes<HTMLDivElement>) {\n // The press ripple List's rows draw — see ListItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACMenuItem textValue={textValue ?? textOf(children)} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemStyles, props)}>\n {itemContent(children, leading, shortcut, trailing, ripple.surface)}\n </RACMenuItem>;\n}\n\n/**\n * The row shown while more items are being fetched. React Aria calls\n * `onLoadMore` when it comes into view, and draws it only while `isLoading`.\n */\nfunction MenuLoadMore({\n label,\n ...props\n}: MenuLoadMoreProps & RefAttributes<HTMLDivElement>) {\n return <RACMenuLoadMoreItem {...props} {...mergeStyles({\n className: \"x6s0dn4 x9f619 x78zum5 xl56j7k x1ddmzdj\"\n }, props)}>\n <CollectionLoadMore diameter=\"20px\" label={label} />\n </RACMenuLoadMoreItem>;\n}\n\n/**\n * A named group of items. `header` names it, and is what a screen reader\n * reads before the items inside.\n */\nfunction MenuSection<T extends object = object>({\n children,\n header,\n ...props\n}: MenuSectionProps<T> & RefAttributes<HTMLElement>) {\n return <RACMenuSection {...props}>\n {header === undefined ? null : <Header className=\"x9f619 x1w5n3ug xrgwony x12s497w x1szcwkt xo803ec xyl1r0q xw3mh6e x6gmt8y x790zyz\">{header}</Header>}\n {children}\n </RACMenuSection>;\n}\n\n/**\n * A rule between groups of items. It takes its role from the menu around it,\n * so it needs no slot from the call site.\n */\nfunction MenuSeparator(props: MenuSeparatorProps) {\n return <Separator {...props} {...mergeStyles({\n className: \"xwpi13i\"\n }, props)} />;\n}\n\n/**\n * An item that opens a menu of its own. Takes exactly two children: the\n * `Menu.Item` that opens it, then the `Menu.Content` it opens.\n */\nfunction MenuSubmenu(props: MenuSubmenuProps) {\n return <RACSubmenuTrigger {...props} />;\n}\n\n/**\n * The search bar above a menu's items, mounted only while the menu is open.\n *\n * Its field takes focus as it mounts. React Aria's popover otherwise took\n * focus itself whenever a pointer opened the menu, so typing went nowhere\n * and only a keyboard's Enter happened to land in the field. Mounted before\n * the items, so the popover finds focus already inside it and leaves it.\n *\n * The query is cleared as it unmounts. The `Autocomplete` that filters the\n * items wraps this whole part and outlives the popover, so its query did\n * too: a menu filtered, used and reopened came back filtered.\n */\nfunction SearchSlot({\n children\n}: {\n children: ReactNode;\n}) {\n const ref = useRef<HTMLDivElement>(null);\n const autocomplete = useContext(AutocompleteStateContext);\n // The latest state, for the cleanup below to clear: the state object is a\n // new one on every render, and the effect that mounts the bar runs once.\n const latest = useRef(autocomplete);\n useEffect(() => {\n latest.current = autocomplete;\n });\n useEffect(() => {\n ref.current?.querySelector<HTMLElement>(SEARCH_CONTROL)?.focus();\n return () => {\n latest.current?.setInputValue('');\n };\n }, []);\n return <div ref={ref} className=\"x9f619 xqf7pud xn60lsn\">\n {children}\n </div>;\n}\n\n// The surface grows from the edge it is anchored by, which is what makes it\n// read as coming out of the trigger. Built by a call rather than written\n// inline at the prop, which is what react-perf's no-new-function-as-prop is\n// after.\nfunction surfaceStyles(state: PopoverRenderProps) {\n return stylex.props(overlay.popup, styles.content, popupOrigin(state.placement));\n}\n\n/** What sits after the label: the call site's content, then the shortcut or\n * the submenu's chevron. */\nfunction trailingOf(state: MenuItemRenderProps, shortcut: ReactNode, trailing: ReactNode, check: ReactNode) {\n if (state.hasSubmenu) {\n return <>\n {trailing}\n <ChevronEndGlyph className=\"x1qx5ct2 xw4jnvo x19axjrm x1c071of\" />\n </>;\n }\n if (shortcut === undefined && trailing === undefined && check === undefined) {\n return undefined;\n }\n return <>\n {trailing}\n {shortcut === undefined ? null : <Keyboard {...stylex.props(styles.shortcut, supportingTone('menu', state))}>\n <KeycapToneContext value={state.isDisabled || state.isSelected ? 'inherit' : 'neutral'}>\n {shortcut}\n </KeycapToneContext>\n </Keyboard>}\n {check}\n </>;\n}\nMenu.Content = MenuContent;\nMenu.Item = MenuItem;\nMenu.LoadMore = MenuLoadMore;\nMenu.Section = MenuSection;\nMenu.Separator = MenuSeparator;\nMenu.Submenu = MenuSubmenu;\nexport type { MenuAlign, MenuContentProps, MenuItemProps, MenuLoadMoreProps, MenuProps, MenuSectionProps, MenuSeparatorProps, MenuSide, MenuSubmenuProps };\nexport { MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu };\nexport default Menu;"],"mappings":";;;;;;;;;;;;;;;;;AA4EA,MAAMqB,SAAS;CACbC,SAAS;EACP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aT,aAAaS,KAAAA,KAAaF,UAAUE,KAAAA,GAChE;CAEF,OAAO,qBAAA,YAAA,EAAA,UAAA;EACFT;EACAZ,aAAaqB,KAAAA,IAAY,OAAO,oBAAC,UAAD;GAAU,GAAIlD,MAAaoB,OAAOS,UAAUhB,eAAe,QAAQkC,KAAK,CAAC;GACtG,UAAA,oBAAC,mBAAD;IAAmB,OAAOA,MAAMK,cAAcL,MAAME,aAAa,YAAY;IAC1EpB,UAAAA;GACgB,CAAA;EACX,CAAA;EACXmB;CACH,EAAA,CAAA;AACJ;AACA3C,OAAKiG,UAAUjC;AACfhE,OAAKkG,OAAOjG;AACZD,OAAKmG,WAAWjB;AAChBlF,OAAKoG,UAAUhG;AACfJ,OAAKc,YAAYqE;AACjBnF,OAAKqG,UAAUjB"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","useContext","useEffect","useRef","AutocompleteStateContext","Menu","MenuItem","RACMenuItem","RACMenuLoadMoreItem","MenuSection","textOf","useRipple","rowStyles","supportingTone","mergeStatefulStyles","mergeStyles","overlay","placementOf","popupOrigin","Separator","styles","content","kWkggS","kaIpWk","ks0D6T","k7Eaqz","k3XXqK","k8WAf4","$$css","shortcut","kMwMTN","align","alignOffset","className","container","search","side","sideOffset","style","children","leading","trailing","label","header","emptyState","itemContent","ripple","state","check","isSelected","undefined","hasLeading","isDisabled","trailingOf","itemStyles","props","base","menu","selectedMenu","isHovered","hovered","isFocusVisible","focusVisible","isPressed","pressed","disabled","t0","$","t1","MenuContent","ref","t2","surfaceStyles","t3","t4","t5","t6","SEARCH_CONTROL","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","textValue","T0","handlers","surface","MenuLoadMore","MenuSeparator","MenuSubmenu","SearchSlot","autocomplete","latest","current","Symbol","for","querySelector","focus","setInputValue","popup","placement","hasSubmenu","Content","Item","LoadMore","Section","Submenu","RACMenuTrigger","RACMenu","RACPopover","RACMenuSection","Separator","RACSubmenuTrigger"],"sources":["../../../src/components/menu/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ComponentProps, ReactElement, ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, MenuItemRenderProps, PopoverRenderProps, MenuItemProps as RACMenuItemProps, MenuLoadMoreItemProps as RACMenuLoadMoreItemProps, MenuProps as RACMenuProps, MenuSectionProps as RACMenuSectionProps, MenuTriggerProps as RACMenuTriggerProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useEffect, useRef } from 'react';\nimport { AutocompleteStateContext, Header, Keyboard, Menu as RACMenu, MenuItem as RACMenuItem, MenuLoadMoreItem as RACMenuLoadMoreItem, MenuSection as RACMenuSection, MenuTrigger as RACMenuTrigger, Popover as RACPopover, SubmenuTrigger as RACSubmenuTrigger, Text } from 'react-aria-components';\nimport type { OverlayAlign, OverlaySide } from '../../styles/overlay';\nimport { CollectionEmpty, CollectionLoadMore, CollectionStatus } from '../../collection';\nimport { textOf } from '../../collection/text';\nimport { CheckGlyph, ChevronEndGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { KeycapToneContext } from '../../keycap/context';\nimport { RowContent } from '../../row';\nimport { rowStyles, supportingTone } from '../../row/styles';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\nimport { overlay, placementOf, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, sizing, spacing, typography } from '../../tokens/design.tokens.stylex';\nimport Separator from '../separator';\n\n// The menus page's menu: a surface between 112 and 280 wide with a 4dp\n// corner and 8dp above and below its items, holding rows of the row module's\n// menu variant — 48dp tall, a label-large label, tertiary container when\n// selected, with a check beside the label. The container alone sits as close\n// as 1.1:1 to the surface, so the check is what carries the selection for a\n// reader who cannot tell the two apart. The surface itself is the overlay module's, shared with Popover\n// and Sheet, with the two things the menus page decides differently applied\n// over it: the corner, which is the extra-small step rather than the\n// medium one every other overlay takes, and the container colour, which is\n// the Expressive column's surface container low rather than the baseline's\n// surface container.\n//\n// Six parts, because everything a menu holds takes arbitrary content:\n// `Menu.Content`, `Menu.Item`, `Menu.Section`, `Menu.Separator`,\n// `Menu.Submenu` and `Menu.LoadMore`. A `Button` or `IconButton` placed\n// directly inside `Menu` is the trigger, wired through React Aria's context\n// rather than a part of ours — the same arrangement Sheet and Popover use.\n//\n// Four things are worth knowing about how this maps onto React Aria.\n//\n// **The item's styles are a function of its render state.** StyleX cannot\n// target `[data-selected]` on the element it is styling, so selection,\n// disabled and the rest are read from the state React Aria hands the\n// `className` function, wrapped in `mergeStatefulStyles` so a call site's own\n// `className` survives.\n//\n// **A shortcut goes through React Aria's `Keyboard` slot**, and the label\n// through its `Text` slot. The second is what makes the first work: React\n// Aria points the item's `aria-labelledby` at the labelled text, so a screen\n// reader reads the label alone and announces the keystroke separately. Left\n// as plain content, the item's name is its whole text and the shortcut is\n// read as part of what the item does. The keycap itself is the library's.\n// The shortcut's colour follows the item's state as the supporting line's\n// does, through the same `supportingTone`, and a selected or disabled item\n// hands a keycap inside it the `inherit` tone, so the keycap follows too.\n//\n// **A submenu's arrow is drawn from render state, not from a prop.** React\n// Aria reports `hasSubmenu` on the item inside a `SubmenuTrigger`, so an item\n// that opens one gets the chevron without the call site saying so twice. The\n// glyph carries no direction of its own, so the style mirrors it under a\n// right-to-left writing mode.\n//\n// **A menu's children are a collection**, so anything that is not an item is\n// dropped: React Aria walks them looking for items and finds a search input\n// no place to be. `Menu.Content` therefore takes a `search` slot, drawn on\n// the surface above the items — which is also what puts the bar and the\n// items inside one `Autocomplete` when the menu is filtered.\n//\n// **A separator needs no slot from the call site.** React Aria's menu\n// provides the separator context, which is what `Menu.Separator` picks up —\n// that is why Separator moved onto React Aria in Phase 0. What is added here\n// is the menus page's 8dp either side of the rule.\n\nconst MENU_MIN = '112px';\nconst MENU_MAX = '280px';\nconst styles = {\n content: {\n kWkggS: \"x1vnz5z6\",\n kaIpWk: \"x1tfhd1\",\n ks0D6T: \"x1jkqq1h\",\n k7Eaqz: \"x1c7vg25\",\n k3XXqK: \"x1t137rt\",\n k8WAf4: \"x1cmllll\",\n $$css: true\n },\n shortcut: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\ntype MenuAlign = OverlayAlign;\ntype MenuContentProps<T extends object = object> = {\n /**\n * Where the menu lines up along that side. Left out, a menu lines up with\n * the start of its trigger, and a submenu with the top of the item that\n * opens it.\n */\n align?: MenuAlign;\n /** Moves the menu along that side, in pixels. */\n alignOffset?: number;\n /**\n * Lands on the surface, which is the element a layout positions. A\n * function may compute the class from the surface's render state.\n */\n className?: ClassNameOrFunction<PopoverRenderProps>;\n /**\n * Where to portal the menu. Defaults to the container of the `ThemeScope`\n * around it, which keeps the menu on that scope's tokens, or to the end of\n * `<body>` where there is none. A subtree themed through the `themeScope`\n * class has no container of its own, so point this inside it, or the menu\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * What the menu shows when nothing is in it — after a search that matched\n * nothing, usually. Left out, it is a muted row saying \"No results\" in the\n * I18nProvider's locale, which the surface also announces, so the menu\n * keeps a row's height rather than shrinking to its search bar. One of the\n * call site's own replaces the announcement as well as the row.\n */\n renderEmptyState?: RACMenuProps<T>['renderEmptyState'];\n /**\n * Content drawn on the surface above the items — a search bar that filters\n * them, usually. It goes here rather than among the children because a\n * menu's children are a collection: React Aria walks them for items and\n * drops anything else, so an input written beside them disappears.\n *\n * To filter with it, wrap this whole part in `Autocomplete`, which puts\n * the bar and the items inside one wrapper. The bar takes focus as the\n * menu opens, however it was opened, so typing filters straight away,\n * and its query is cleared as the menu closes, so a reopened menu shows\n * every item.\n */\n search?: ReactNode;\n /**\n * Which side of the trigger the menu opens on. Left out, a menu opens below\n * its trigger and a submenu at the inline end of the item that opens it,\n * where the item's chevron points — the places React Aria gives each.\n * Given `align` alone, the side is `bottom`. `start` and `end` follow the\n * writing direction, as a submenu does; `left` and `right` stay put in\n * either.\n */\n side?: MenuSide;\n /**\n * How far the menu sits from the trigger, in pixels. Left out, React Aria's:\n * 8, or 0 for a menu opened with `trigger=\"contextMenu\"`.\n */\n sideOffset?: number;\n /** Lands on the surface, as `className` does. */\n style?: StyleOrFunction<PopoverRenderProps>;\n} & Omit<RACMenuProps<T>, 'className' | 'renderEmptyState' | 'style'>;\ntype MenuItemProps<T extends object = object> = {\n /** The item's label — what it does. */\n children?: ReactNode;\n /** A function may compute the class from the item's render state. */\n className?: RACMenuItemProps<T>['className'];\n /** Content before the label, usually an icon. */\n leading?: ReactNode;\n /**\n * The keystroke that runs the item, at the end of the row. Pass a `Keycap`\n * to draw it as one; a string is set as plain text in the muted role. Either\n * goes through React Aria's keyboard slot, so a screen reader announces it\n * apart from the label rather than reading the two as one name. It takes\n * the item's colour while the item is selected or disabled, and so does a\n * `Keycap` inside it, its rule included.\n */\n shortcut?: ReactNode;\n /** A function may compute the style from the item's render state. */\n style?: RACMenuItemProps<T>['style'];\n /** Content after the label, before the shortcut. */\n trailing?: ReactNode;\n} & Omit<RACMenuItemProps<T>, 'children' | 'className' | 'style'>;\ntype MenuLoadMoreProps = Omit<RACMenuLoadMoreItemProps, 'children'> & {\n /**\n * What the row says while it is loading. Read by a screen reader; the ring\n * itself carries no text.\n * Left out, it is the word for it in the I18nProvider's locale — \"Loading\n * more\" in English.\n */\n label?: string;\n};\n\n// `children` is optional here where React Aria makes it required, so the\n// type reads the way Sheet's and Popover's do: a root that composes rather\n// than one that has to be handed something. Sheet does the same for the same\n// reason.\ntype MenuProps = Omit<RACMenuTriggerProps, 'children'> & {\n /** The trigger, then the `Menu.Content` it opens. */\n children?: ReactNode;\n};\ntype MenuSectionProps<T extends object = object> = Omit<RACMenuSectionProps<T>, 'children'> & {\n /**\n * The items in the section. A section built from data puts React Aria's\n * `Collection` in here rather than a render function, since the header is\n * an element beside them.\n */\n children?: ReactNode;\n /**\n * The section's heading, rendered through React Aria's header so the\n * section is named by it. A section without one is a group with no name.\n */\n header?: ReactNode;\n};\ntype MenuSeparatorProps = Omit<ComponentProps<typeof Separator>, 'orientation'>;\ntype MenuSide = OverlaySide;\ntype MenuSubmenuProps = {\n /**\n * The item that opens the submenu, then the `Menu.Content` it opens.\n * Exactly those two, in that order. The count is the type's to enforce;\n * the order is not, since every JSX element has the same type.\n */\n children: [trigger: ReactElement, content: ReactElement];\n /**\n * How long the pointer rests on the item before the submenu opens, in\n * milliseconds.\n * @default 200\n */\n delay?: number;\n};\n\n// The default empty state, at module scope so every menu hands React Aria\n// the same function.\nfunction emptyState() {\n return <CollectionEmpty variant=\"menu\" />;\n}\n\n// What the item draws, from React Aria's render state. Built by a call\n// rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after; the React Compiler memoises the result\n// on its inputs.\n//\n// The render state decides three things: the chevron, which an item inside a\n// SubmenuTrigger gets without the call site asking twice, the check on a\n// selected item, and the supporting line's colour, which the row module takes\n// from whether the row is selected or disabled.\n//\n// The check takes the leading slot where the item has leading content, in\n// place of it, and comes at the end of the row where it has none. Either way\n// the label stays where it was, so choosing an item moves nothing in the\n// menu. Hidden from the tree, since React Aria's `aria-checked` already says\n// the item is chosen.\nfunction itemContent(children: ReactNode, leading: ReactNode, shortcut: ReactNode, trailing: ReactNode, ripple: ReactNode) {\n return (state: MenuItemRenderProps) => {\n const check = state.isSelected ? <CheckGlyph className=\"xxk0z11 x9f619 x2lah0s xvy4d1p\" /> : undefined;\n const hasLeading = leading !== undefined && leading !== null;\n return <>\n <RowContent isDisabled={state.isDisabled} isSelected={state.isSelected} leading={hasLeading ? check ?? leading : undefined} trailing={trailingOf(state, shortcut, trailing, hasLeading ? undefined : check)} variant=\"menu\">\n <Text slot=\"label\">{children}</Text>\n </RowContent>\n {state.isDisabled ? null : ripple}\n </>;\n };\n}\n\n// StyleX cannot target `[data-selected]` on the element it is styling, so an\n// item's state comes from the render state React Aria hands its className.\n// The order matters: `disabled` is applied last so its ground and colour\n// win over the selected container's. The state layers come from the render\n// state as well — see `focusVisible` in src/row/styles.ts — and React Aria\n// reports none of them on a disabled item, so nothing has to outrank them.\n// No overline, and so no three-line row: the menus page gives one item\n// height and one line of text. `List.Item` and `ListBox.Item` take the prop\n// because the lists page is what they draw, and this row is 48dp rather than\n// that page's 56. A label longer than the surface's 280dp still wraps, and\n// breaks inside a word that is wider than that, rather than running out of\n// the surface and under the shortcut — the shared row's rule, which nothing\n// here truncates.\nfunction itemStyles(state: MenuItemRenderProps) {\n return stylex.props(rowStyles.base, rowStyles.menu, state.isSelected && rowStyles.selectedMenu, state.isHovered && rowStyles.hovered, state.isFocusVisible && rowStyles.focusVisible, state.isPressed && rowStyles.pressed, state.isDisabled && rowStyles.disabled);\n}\n\n/**\n * A list of actions opened from a control. Open state is React Aria's: pass\n * `isOpen` with `onOpenChange` to control it, or `defaultOpen` to let it keep\n * its own.\n *\n * A `Button` or `IconButton` placed directly inside opens it; everything the\n * menu shows goes in `Menu.Content`, since the trigger lives in the page\n * while the menu is portalled out to the end of the body.\n *\n * ```tsx\n * <Menu>\n * <Button>Open</Button>\n * <Menu.Content>\n * <Menu.Item id=\"first\">First item</Menu.Item>\n * </Menu.Content>\n * </Menu>\n * ```\n *\n * The trigger's text names the menu, so the button is where a label goes.\n */\nfunction Menu({\n children,\n ...props\n}: MenuProps) {\n return <RACMenuTrigger {...props}>{children}</RACMenuTrigger>;\n}\n\n/**\n * The menu itself, and the surface it is drawn on. React Aria names it after\n * the control that opened it, so `aria-label` here is ignored — name the\n * trigger instead.\n *\n * The call site's `className` and `style` land on the surface, which is the\n * element a layout positions.\n *\n * The placement and the offsets are passed on only where the call site gives\n * them. React Aria hands the popover a placement of its own through context —\n * below the trigger for a menu, at the item's inline end for a submenu — and\n * a prop set here replaces it, so a default written here opened every\n * submenu below its item, over the rest of the menu it came from.\n *\n * A menu with nothing in it shows a muted \"No results\" row in place of its\n * items, and says so through a status on the surface, which is what a search\n * that matches nothing leaves; pass `renderEmptyState` to draw something\n * else.\n */\nfunction MenuContent<T extends object = object>({\n align,\n alignOffset,\n className,\n container,\n ref,\n search,\n side,\n sideOffset,\n style,\n ...props\n}: MenuContentProps<T> & RefAttributes<HTMLElement>) {\n return <RACPopover crossOffset={alignOffset} offset={sideOffset} placement={side === undefined && align === undefined ? undefined : placementOf(side ?? 'bottom', align ?? 'start')}\n // The surface, where the call site's class and style land, rather than\n // the menu inside it, which takes the rest of the props.\n ref={ref}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} {...mergeStatefulStyles(surfaceStyles, {\n className,\n style\n })}>\n <CollectionStatus>\n {search === undefined ? null : <SearchSlot>{search}</SearchSlot>}\n <RACMenu<T> renderEmptyState={emptyState} {...props} className=\"x9f619 x78zum5 xdt5ytf x1t137rt\" />\n </CollectionStatus>\n </RACPopover>;\n}\n\n// What a press on the search slot focuses: its field's own control.\nconst SEARCH_CONTROL = 'input, textarea, [contenteditable=\"true\"]';\n\n/**\n * One action. Its slots are the row's: `leading` before the label, the label\n * as children, and `trailing` after it, with `shortcut` at the end. An item\n * that opens a submenu draws the chevron itself.\n */\nfunction MenuItem<T extends object = object>({\n children,\n leading,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n shortcut,\n textValue,\n trailing,\n ...props\n}: MenuItemProps<T> & RefAttributes<HTMLDivElement>) {\n // The press ripple List's rows draw — see ListItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACMenuItem textValue={textValue ?? textOf(children)} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemStyles, props)}>\n {itemContent(children, leading, shortcut, trailing, ripple.surface)}\n </RACMenuItem>;\n}\n\n/**\n * The row shown while more items are being fetched. React Aria calls\n * `onLoadMore` when it comes into view, and draws it only while `isLoading`.\n */\nfunction MenuLoadMore({\n label,\n ...props\n}: MenuLoadMoreProps & RefAttributes<HTMLDivElement>) {\n return <RACMenuLoadMoreItem {...props} {...mergeStyles({\n className: \"x6s0dn4 x9f619 x78zum5 xl56j7k x1ddmzdj\"\n }, props)}>\n <CollectionLoadMore diameter=\"20px\" label={label} />\n </RACMenuLoadMoreItem>;\n}\n\n/**\n * A named group of items. `header` names it, and is what a screen reader\n * reads before the items inside.\n */\nfunction MenuSection<T extends object = object>({\n children,\n header,\n ...props\n}: MenuSectionProps<T> & RefAttributes<HTMLElement>) {\n return <RACMenuSection {...props}>\n {header === undefined ? null : <Header className=\"x9f619 x1w5n3ug xrgwony x12s497w x1szcwkt xo803ec xyl1r0q xw3mh6e x6gmt8y x790zyz\">{header}</Header>}\n {children}\n </RACMenuSection>;\n}\n\n/**\n * A rule between groups of items. It takes its role from the menu around it,\n * so it needs no slot from the call site.\n */\nfunction MenuSeparator(props: MenuSeparatorProps) {\n return <Separator {...props} {...mergeStyles({\n className: \"xwpi13i\"\n }, props)} />;\n}\n\n/**\n * An item that opens a menu of its own. Takes exactly two children: the\n * `Menu.Item` that opens it, then the `Menu.Content` it opens.\n */\nfunction MenuSubmenu(props: MenuSubmenuProps) {\n return <RACSubmenuTrigger {...props} />;\n}\n\n/**\n * The search bar above a menu's items, mounted only while the menu is open.\n *\n * Its field takes focus as it mounts. React Aria's popover otherwise took\n * focus itself whenever a pointer opened the menu, so typing went nowhere\n * and only a keyboard's Enter happened to land in the field. Mounted before\n * the items, so the popover finds focus already inside it and leaves it.\n *\n * The query is cleared as it unmounts. The `Autocomplete` that filters the\n * items wraps this whole part and outlives the popover, so its query did\n * too: a menu filtered, used and reopened came back filtered.\n */\nfunction SearchSlot({\n children\n}: {\n children: ReactNode;\n}) {\n const ref = useRef<HTMLDivElement>(null);\n const autocomplete = useContext(AutocompleteStateContext);\n // The latest state, for the cleanup below to clear: the state object is a\n // new one on every render, and the effect that mounts the bar runs once.\n const latest = useRef(autocomplete);\n useEffect(() => {\n latest.current = autocomplete;\n });\n useEffect(() => {\n ref.current?.querySelector<HTMLElement>(SEARCH_CONTROL)?.focus();\n return () => {\n latest.current?.setInputValue('');\n };\n }, []);\n return <div ref={ref} className=\"x9f619 xqf7pud xn60lsn\">\n {children}\n </div>;\n}\n\n// The surface grows from the edge it is anchored by, which is what makes it\n// read as coming out of the trigger. Built by a call rather than written\n// inline at the prop, which is what react-perf's no-new-function-as-prop is\n// after.\nfunction surfaceStyles(state: PopoverRenderProps) {\n return stylex.props(overlay.popup, styles.content, popupOrigin(state.placement));\n}\n\n/** What sits after the label: the call site's content, then the shortcut or\n * the submenu's chevron. */\nfunction trailingOf(state: MenuItemRenderProps, shortcut: ReactNode, trailing: ReactNode, check: ReactNode) {\n if (state.hasSubmenu) {\n return <>\n {trailing}\n <ChevronEndGlyph className=\"x1qx5ct2 xw4jnvo x19axjrm x1c071of\" />\n </>;\n }\n if (shortcut === undefined && trailing === undefined && check === undefined) {\n return undefined;\n }\n return <>\n {trailing}\n {shortcut === undefined ? null : <Keyboard {...stylex.props(styles.shortcut, supportingTone('menu', state))}>\n <KeycapToneContext value={state.isDisabled || state.isSelected ? 'inherit' : 'neutral'}>\n {shortcut}\n </KeycapToneContext>\n </Keyboard>}\n {check}\n </>;\n}\nMenu.Content = MenuContent;\nMenu.Item = MenuItem;\nMenu.LoadMore = MenuLoadMore;\nMenu.Section = MenuSection;\nMenu.Separator = MenuSeparator;\nMenu.Submenu = MenuSubmenu;\nexport type { MenuAlign, MenuContentProps, MenuItemProps, MenuLoadMoreProps, MenuProps, MenuSectionProps, MenuSeparatorProps, MenuSide, MenuSubmenuProps };\nexport { MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu };\nexport default Menu;"],"mappings":";;;;;;;;;;;;;;;;;AA4EA,MAAMqB,SAAS;CACbC,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRC,QAAQ;EACRF,OAAO;CACT;AACF;AAqIA,SAASgB,aAAa;CACpB,OAAO,oBAAC,i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