@kanso-labs/kanso-ui 0.45.21 → 0.45.23

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 (269) hide show
  1. package/dist/badge/index.js.map +1 -1
  2. package/dist/button/context.js.map +1 -1
  3. package/dist/button/group.js.map +1 -1
  4. package/dist/button/hooks.js.map +1 -1
  5. package/dist/button/index.d.ts +3 -4
  6. package/dist/button/index.js.map +1 -1
  7. package/dist/button/styles.js.map +1 -1
  8. package/dist/button/toggle.js.map +1 -1
  9. package/dist/calendar/index.js +119 -11
  10. package/dist/calendar/index.js.map +1 -1
  11. package/dist/calendar/styles.js +19 -1
  12. package/dist/calendar/styles.js.map +1 -1
  13. package/dist/carousel/arrangement.d.ts +1 -2
  14. package/dist/carousel/arrangement.js.map +1 -1
  15. package/dist/chip/index.js.map +1 -1
  16. package/dist/chip/label.js.map +1 -1
  17. package/dist/chip/styles.js.map +1 -1
  18. package/dist/collection/empty.js.map +1 -1
  19. package/dist/collection/index.js.map +1 -1
  20. package/dist/collection/styles.js.map +1 -1
  21. package/dist/collection/text.js.map +1 -1
  22. package/dist/color-scheme.d.ts +1 -2
  23. package/dist/color-scheme.js.map +1 -1
  24. package/dist/components/app-bar/index.d.ts +9 -4
  25. package/dist/components/app-bar/index.js +123 -73
  26. package/dist/components/app-bar/index.js.map +1 -1
  27. package/dist/components/autocomplete/index.d.ts +1 -2
  28. package/dist/components/autocomplete/index.js.map +1 -1
  29. package/dist/components/avatar/index.d.ts +1 -2
  30. package/dist/components/avatar/index.js.map +1 -1
  31. package/dist/components/badge/index.d.ts +1 -2
  32. package/dist/components/badge/index.js.map +1 -1
  33. package/dist/components/breadcrumbs/index.d.ts +1 -2
  34. package/dist/components/breadcrumbs/index.js.map +1 -1
  35. package/dist/components/button/index.d.ts +1 -2
  36. package/dist/components/button/index.js.map +1 -1
  37. package/dist/components/button-group/index.d.ts +1 -2
  38. package/dist/components/button-group/index.js.map +1 -1
  39. package/dist/components/calendar/index.d.ts +4 -5
  40. package/dist/components/calendar/index.js +8 -19
  41. package/dist/components/calendar/index.js.map +1 -1
  42. package/dist/components/card/index.d.ts +1 -2
  43. package/dist/components/card/index.js.map +1 -1
  44. package/dist/components/carousel/index.d.ts +22 -4
  45. package/dist/components/carousel/index.js +26 -14
  46. package/dist/components/carousel/index.js.map +1 -1
  47. package/dist/components/checkbox/index.d.ts +1 -2
  48. package/dist/components/checkbox/index.js.map +1 -1
  49. package/dist/components/checkbox-group/index.d.ts +1 -2
  50. package/dist/components/checkbox-group/index.js.map +1 -1
  51. package/dist/components/chip/index.d.ts +1 -2
  52. package/dist/components/chip/index.js.map +1 -1
  53. package/dist/components/chip-group/index.d.ts +1 -2
  54. package/dist/components/chip-group/index.js +3 -0
  55. package/dist/components/chip-group/index.js.map +1 -1
  56. package/dist/components/code/index.d.ts +1 -2
  57. package/dist/components/code/index.js.map +1 -1
  58. package/dist/components/color-area/index.d.ts +1 -2
  59. package/dist/components/color-area/index.js.map +1 -1
  60. package/dist/components/color-field/index.d.ts +1 -2
  61. package/dist/components/color-field/index.js.map +1 -1
  62. package/dist/components/color-picker/index.d.ts +1 -2
  63. package/dist/components/color-picker/index.js +64 -46
  64. package/dist/components/color-picker/index.js.map +1 -1
  65. package/dist/components/color-slider/index.d.ts +1 -2
  66. package/dist/components/color-slider/index.js.map +1 -1
  67. package/dist/components/color-swatch/index.d.ts +1 -2
  68. package/dist/components/color-swatch/index.js +20 -16
  69. package/dist/components/color-swatch/index.js.map +1 -1
  70. package/dist/components/color-swatch-picker/index.d.ts +1 -2
  71. package/dist/components/color-swatch-picker/index.js.map +1 -1
  72. package/dist/components/color-wheel/index.d.ts +1 -2
  73. package/dist/components/color-wheel/index.js.map +1 -1
  74. package/dist/components/combo-box/index.d.ts +1 -2
  75. package/dist/components/combo-box/index.js.map +1 -1
  76. package/dist/components/container/index.d.ts +1 -2
  77. package/dist/components/container/index.js.map +1 -1
  78. package/dist/components/copy-field/index.d.ts +1 -2
  79. package/dist/components/copy-field/index.js +1 -0
  80. package/dist/components/copy-field/index.js.map +1 -1
  81. package/dist/components/currency/index.d.ts +1 -2
  82. package/dist/components/currency/index.js.map +1 -1
  83. package/dist/components/date-field/index.d.ts +1 -2
  84. package/dist/components/date-field/index.js.map +1 -1
  85. package/dist/components/date-picker/index.d.ts +1 -2
  86. package/dist/components/date-picker/index.js.map +1 -1
  87. package/dist/components/date-range-picker/index.d.ts +1 -2
  88. package/dist/components/date-range-picker/index.js +165 -81
  89. package/dist/components/date-range-picker/index.js.map +1 -1
  90. package/dist/components/dialog/index.d.ts +1 -2
  91. package/dist/components/dialog/index.js.map +1 -1
  92. package/dist/components/disclosure/index.d.ts +1 -2
  93. package/dist/components/disclosure/index.js.map +1 -1
  94. package/dist/components/disclosure-group/index.d.ts +1 -2
  95. package/dist/components/disclosure-group/index.js.map +1 -1
  96. package/dist/components/drop-zone/index.d.ts +1 -2
  97. package/dist/components/drop-zone/index.js.map +1 -1
  98. package/dist/components/drop-zone/styles.js.map +1 -1
  99. package/dist/components/fab/index.d.ts +1 -2
  100. package/dist/components/fab/index.js.map +1 -1
  101. package/dist/components/fab-menu/index.d.ts +1 -2
  102. package/dist/components/fab-menu/index.js.map +1 -1
  103. package/dist/components/feed/index.d.ts +1 -2
  104. package/dist/components/feed/index.js.map +1 -1
  105. package/dist/components/form/index.d.ts +1 -2
  106. package/dist/components/form/index.js.map +1 -1
  107. package/dist/components/icon-button/index.d.ts +1 -2
  108. package/dist/components/icon-button/index.js.map +1 -1
  109. package/dist/components/index.d.ts +2 -2
  110. package/dist/components/keycap/index.d.ts +1 -2
  111. package/dist/components/keycap/index.js.map +1 -1
  112. package/dist/components/link/index.d.ts +1 -2
  113. package/dist/components/link/index.js.map +1 -1
  114. package/dist/components/list/index.d.ts +1 -2
  115. package/dist/components/list/index.js.map +1 -1
  116. package/dist/components/list-box/index.d.ts +1 -2
  117. package/dist/components/list-box/index.js.map +1 -1
  118. package/dist/components/list-detail/index.d.ts +1 -2
  119. package/dist/components/list-detail/index.js.map +1 -1
  120. package/dist/components/list-item/index.d.ts +1 -2
  121. package/dist/components/list-item/index.js.map +1 -1
  122. package/dist/components/loading-indicator/index.d.ts +1 -2
  123. package/dist/components/loading-indicator/index.js.map +1 -1
  124. package/dist/components/menu/index.d.ts +1 -2
  125. package/dist/components/menu/index.js.map +1 -1
  126. package/dist/components/meter/index.d.ts +1 -2
  127. package/dist/components/meter/index.js.map +1 -1
  128. package/dist/components/navigation-bar/index.d.ts +1 -2
  129. package/dist/components/navigation-bar/index.js.map +1 -1
  130. package/dist/components/navigation-rail/index.d.ts +1 -2
  131. package/dist/components/navigation-rail/index.js.map +1 -1
  132. package/dist/components/navigation-tree/index.d.ts +1 -2
  133. package/dist/components/navigation-tree/index.js.map +1 -1
  134. package/dist/components/number-field/index.d.ts +1 -2
  135. package/dist/components/number-field/index.js.map +1 -1
  136. package/dist/components/popover/index.d.ts +1 -2
  137. package/dist/components/popover/index.js +14 -4
  138. package/dist/components/popover/index.js.map +1 -1
  139. package/dist/components/product-icon/index.d.ts +1 -2
  140. package/dist/components/product-icon/index.js.map +1 -1
  141. package/dist/components/progress-indicator/index.d.ts +1 -2
  142. package/dist/components/progress-indicator/index.js.map +1 -1
  143. package/dist/components/radio-group/index.d.ts +1 -2
  144. package/dist/components/radio-group/index.js.map +1 -1
  145. package/dist/components/range-calendar/index.d.ts +1 -2
  146. package/dist/components/range-calendar/index.js +53 -80
  147. package/dist/components/range-calendar/index.js.map +1 -1
  148. package/dist/components/search-field/index.d.ts +1 -2
  149. package/dist/components/search-field/index.js.map +1 -1
  150. package/dist/components/search-view/index.d.ts +1 -2
  151. package/dist/components/search-view/index.js.map +1 -1
  152. package/dist/components/segmented-button/index.d.ts +1 -2
  153. package/dist/components/segmented-button/index.js +261 -145
  154. package/dist/components/segmented-button/index.js.map +1 -1
  155. package/dist/components/select/index.d.ts +1 -2
  156. package/dist/components/select/index.js.map +1 -1
  157. package/dist/components/separator/index.d.ts +1 -2
  158. package/dist/components/separator/index.js.map +1 -1
  159. package/dist/components/sheet/index.d.ts +1 -2
  160. package/dist/components/sheet/index.js +149 -82
  161. package/dist/components/sheet/index.js.map +1 -1
  162. package/dist/components/slider/index.d.ts +1 -2
  163. package/dist/components/slider/index.js.map +1 -1
  164. package/dist/components/snackbar/index.d.ts +1 -2
  165. package/dist/components/snackbar/index.js.map +1 -1
  166. package/dist/components/split-button/index.d.ts +1 -2
  167. package/dist/components/split-button/index.js.map +1 -1
  168. package/dist/components/stack/index.d.ts +1 -2
  169. package/dist/components/stack/index.js.map +1 -1
  170. package/dist/components/supporting-pane/index.d.ts +1 -2
  171. package/dist/components/supporting-pane/index.js.map +1 -1
  172. package/dist/components/switch/index.d.ts +1 -2
  173. package/dist/components/switch/index.js.map +1 -1
  174. package/dist/components/table/index.d.ts +1 -2
  175. package/dist/components/table/index.js +251 -123
  176. package/dist/components/table/index.js.map +1 -1
  177. package/dist/components/tabs/index.d.ts +1 -2
  178. package/dist/components/tabs/index.js.map +1 -1
  179. package/dist/components/tag/index.d.ts +1 -2
  180. package/dist/components/tag/index.js.map +1 -1
  181. package/dist/components/text/index.d.ts +1 -2
  182. package/dist/components/text/index.js.map +1 -1
  183. package/dist/components/text-area/index.d.ts +1 -2
  184. package/dist/components/text-area/index.js.map +1 -1
  185. package/dist/components/text-field/index.d.ts +1 -2
  186. package/dist/components/text-field/index.js.map +1 -1
  187. package/dist/components/time-field/index.d.ts +1 -2
  188. package/dist/components/time-field/index.js.map +1 -1
  189. package/dist/components/time-picker/index.d.ts +1 -2
  190. package/dist/components/time-picker/index.js.map +1 -1
  191. package/dist/components/token-field/index.d.ts +1 -2
  192. package/dist/components/token-field/index.js.map +1 -1
  193. package/dist/components/toolbar/index.d.ts +1 -2
  194. package/dist/components/toolbar/index.js.map +1 -1
  195. package/dist/components/tooltip/index.d.ts +1 -2
  196. package/dist/components/tooltip/index.js.map +1 -1
  197. package/dist/components/tree/index.d.ts +1 -2
  198. package/dist/components/tree/index.js.map +1 -1
  199. package/dist/control/index.js.map +1 -1
  200. package/dist/control/styles.js.map +1 -1
  201. package/dist/drag/hooks.d.ts +1 -2
  202. package/dist/drag/hooks.js.map +1 -1
  203. package/dist/drag/index.js.map +1 -1
  204. package/dist/drag/styles.js.map +1 -1
  205. package/dist/fab/styles.js.map +1 -1
  206. package/dist/field/index.d.ts +3 -4
  207. package/dist/field/index.js.map +1 -1
  208. package/dist/field/press.js.map +1 -1
  209. package/dist/field/root.js.map +1 -1
  210. package/dist/field/styles.js.map +1 -1
  211. package/dist/glyphs/index.js.map +1 -1
  212. package/dist/glyphs/styles.js.map +1 -1
  213. package/dist/hooks/useAppBarScroll.d.ts +1 -2
  214. package/dist/hooks/useAppBarScroll.js.map +1 -1
  215. package/dist/hooks/useBottomEdge.js.map +1 -1
  216. package/dist/hooks/useClippedTitle.js.map +1 -1
  217. package/dist/hooks/useImageLoadingStatus.js.map +1 -1
  218. package/dist/hooks/useRipple.js +3 -2
  219. package/dist/hooks/useRipple.js.map +1 -1
  220. package/dist/hooks/useScrollStop.js.map +1 -1
  221. package/dist/hooks/useToggleGroupDisabled.js.map +1 -1
  222. package/dist/i18n/index.js.map +1 -1
  223. package/dist/i18n/messages.js.map +1 -1
  224. package/dist/index.d.ts +2 -2
  225. package/dist/indicator/index.js.map +1 -1
  226. package/dist/indicator/styles.d.ts +1 -2
  227. package/dist/indicator/styles.js.map +1 -1
  228. package/dist/kanso-ui-core/defaults-DMH0HWCw.d.ts +1 -2
  229. package/dist/keycap/context.js.map +1 -1
  230. package/dist/layout.d.ts +1 -2
  231. package/dist/layout.js.map +1 -1
  232. package/dist/mark/index.js.map +1 -1
  233. package/dist/mark/initials.js.map +1 -1
  234. package/dist/mark/styles.js.map +1 -1
  235. package/dist/navigation/context.js.map +1 -1
  236. package/dist/navigation/index.d.ts +2 -3
  237. package/dist/navigation/index.js.map +1 -1
  238. package/dist/navigation/styles.js.map +1 -1
  239. package/dist/overlay/index.js.map +1 -1
  240. package/dist/render/aria.js.map +1 -1
  241. package/dist/render/content.js.map +1 -1
  242. package/dist/render/name.d.ts +1 -2
  243. package/dist/render/ref.js.map +1 -1
  244. package/dist/render/useRender.d.ts +1 -2
  245. package/dist/render/useRender.js.map +1 -1
  246. package/dist/row/index.js.map +1 -1
  247. package/dist/row/styles.js.map +1 -1
  248. package/dist/segments/index.js +2 -1
  249. package/dist/segments/index.js.map +1 -1
  250. package/dist/segments/styles.js +5 -1
  251. package/dist/segments/styles.js.map +1 -1
  252. package/dist/styles/chequer.js.map +1 -1
  253. package/dist/styles/color.js.map +1 -1
  254. package/dist/styles/focus.js.map +1 -1
  255. package/dist/styles/icon-button.js.map +1 -1
  256. package/dist/styles/merge.js.map +1 -1
  257. package/dist/styles/overlay.d.ts +2 -3
  258. package/dist/styles/overlay.js.map +1 -1
  259. package/dist/styles/picker.js.map +1 -1
  260. package/dist/styles/ripple.js.map +1 -1
  261. package/dist/styles/scheme.js.map +1 -1
  262. package/dist/styles.css +40 -8
  263. package/dist/swatch/index.js +19 -0
  264. package/dist/swatch/index.js.map +1 -0
  265. package/dist/theme-scope.d.ts +1 -2
  266. package/dist/theme-scope.js.map +1 -1
  267. package/dist/tokens/design.tokens.stylex.js.map +1 -1
  268. package/dist/tokens/values.js.map +1 -1
  269. package/package.json +16 -16
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["StyleXStyles","createContext","BadgeMarkContext"],"sources":["../../src/badge/index.ts"],"sourcesContent":["import type { StyleXStyles } from '@stylexjs/stylex';\nimport { createContext } from 'react';\n\n// What a component drawing a badge can say about where its large mark goes.\n// Apart from the badge itself for the reason src/row gives, and a module of\n// its own rather than a part of the one place that uses it, since the badge\n// imports it and that place imports the badge.\n\n/**\n * A style laid over a large badge's mark by what the badge is drawn in,\n * after the mark's own, so it can move the mark out of its corner. A\n * navigation destination sets its label beside its icon in its horizontal\n * forms, and a count overhangs the icon by up to 22dp on that side: the\n * destination puts the mark in the flow there, so the label starts after it\n * rather than under it. See src/navigation/styles.ts.\n */\nconst BadgeMarkContext = createContext<null | StyleXStyles>(null);\nexport { BadgeMarkContext };"],"mappings":";;;;;;;;;;AAgBA,MAAME,mBAAmBD,cAAmC,IAAI"}
1
+ {"version":3,"file":"index.js","names":["createContext","BadgeMarkContext"],"sources":["../../src/badge/index.ts"],"sourcesContent":["import type { StyleXStyles } from '@stylexjs/stylex';\nimport { createContext } from 'react';\n\n// What a component drawing a badge can say about where its large mark goes.\n// Apart from the badge itself for the reason src/row gives, and a module of\n// its own rather than a part of the one place that uses it, since the badge\n// imports it and that place imports the badge.\n\n/**\n * A style laid over a large badge's mark by what the badge is drawn in,\n * after the mark's own, so it can move the mark out of its corner. A\n * navigation destination sets its label beside its icon in its horizontal\n * forms, and a count overhangs the icon by up to 22dp on that side: the\n * destination puts the mark in the flow there, so the label starts after it\n * rather than under it. See src/navigation/styles.ts.\n */\nconst BadgeMarkContext = createContext<null | StyleXStyles>(null);\nexport { BadgeMarkContext };"],"mappings":";;;;;;;;;;AAgBA,MAAMC,mBAAmBD,cAAmC,IAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","names":["stylex","createContext","ButtonState","ButtonGroupItem","onPressEnd","onPressStart","width","shift","size","GroupSize","styles","state","StyleXStyles","ButtonGroupItemContext"],"sources":["../../src/button/context.ts"],"sourcesContent":["import type * as stylex from '@stylexjs/stylex';\nimport { createContext } from 'react';\nimport type { ButtonState } from '.';\n\n// What a group hands each Button or IconButton in it: ButtonGroup's two\n// variants and SplitButton's two halves. Apart from ./index.tsx so that file\n// exports components alone, which is what keeps fast refresh working for it.\n\ntype ButtonGroupItem = {\n /** Called as a press on the button ends, so the group lets go of it. */\n onPressEnd?: () => void;\n /**\n * Called as a press on the button starts, with its width, so a standard\n * group can widen it and narrow its neighbours.\n */\n onPressStart?: (width: number) => void;\n /**\n * How far the button's width moves while it or a neighbour is pressed, in\n * pixels: the pressed button's gain, or a neighbour's loss as a negative.\n * Zero at rest.\n */\n shift: number;\n /** The group's size, which a button takes unless it names its own. */\n size: GroupSize | undefined;\n /**\n * Styles the group lays over the button's own, from its render state: a\n * connected group's inner corners, a split button's paddings. Applied\n * after the button's own shape and before its disabled styles.\n */\n styles?: (state: ButtonState) => stylex.StyleXStyles[];\n};\n\n/** The five sizes Button and IconButton share. */\ntype GroupSize = 'lg' | 'md' | 'xl' | 'xs' | 'xxl';\nconst ButtonGroupItemContext = createContext<ButtonGroupItem | null>(null);\nexport type { ButtonGroupItem, GroupSize };\nexport { ButtonGroupItemContext };"],"mappings":";;AAkCA,MAAMa,yBAAyBZ,cAAsC,IAAI"}
1
+ {"version":3,"file":"context.js","names":["createContext","ButtonGroupItemContext"],"sources":["../../src/button/context.ts"],"sourcesContent":["import type * as stylex from '@stylexjs/stylex';\nimport { createContext } from 'react';\nimport type { ButtonState } from '.';\n\n// What a group hands each Button or IconButton in it: ButtonGroup's two\n// variants and SplitButton's two halves. Apart from ./index.tsx so that file\n// exports components alone, which is what keeps fast refresh working for it.\n\ntype ButtonGroupItem = {\n /** Called as a press on the button ends, so the group lets go of it. */\n onPressEnd?: () => void;\n /**\n * Called as a press on the button starts, with its width, so a standard\n * group can widen it and narrow its neighbours.\n */\n onPressStart?: (width: number) => void;\n /**\n * How far the button's width moves while it or a neighbour is pressed, in\n * pixels: the pressed button's gain, or a neighbour's loss as a negative.\n * Zero at rest.\n */\n shift: number;\n /** The group's size, which a button takes unless it names its own. */\n size: GroupSize | undefined;\n /**\n * Styles the group lays over the button's own, from its render state: a\n * connected group's inner corners, a split button's paddings. Applied\n * after the button's own shape and before its disabled styles.\n */\n styles?: (state: ButtonState) => stylex.StyleXStyles[];\n};\n\n/** The five sizes Button and IconButton share. */\ntype GroupSize = 'lg' | 'md' | 'xl' | 'xs' | 'xxl';\nconst ButtonGroupItemContext = createContext<ButtonGroupItem | null>(null);\nexport type { ButtonGroupItem, GroupSize };\nexport { ButtonGroupItemContext };"],"mappings":";;AAkCA,MAAMC,yBAAyBD,cAAsC,IAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"group.js","names":["PressEvent","ButtonGroupItem","groupPressHandlers","group","onPressStart","event","onPressEnd","start","undefined","end","target","getBoundingClientRect","width"],"sources":["../../src/button/group.ts"],"sourcesContent":["import type { PressEvent } from 'react-aria-components'\n\nimport type { ButtonGroupItem } from './context'\n\n// What a button in a standard ButtonGroup does about its own presses: tell\n// the group when one starts, with its width, and when it ends, so the group\n// can widen it and narrow its neighbours. Apart from ./index.tsx so that file\n// exports components alone, which is what keeps fast refresh working for it.\n\n/**\n * The press handlers a button inside a group that tracks presses takes: its\n * own, with the group told first. Empty anywhere else, which leaves the\n * call site's own handlers on the button untouched.\n */\nfunction groupPressHandlers(\n group: ButtonGroupItem | null,\n onPressStart: ((event: PressEvent) => void) | undefined,\n onPressEnd: ((event: PressEvent) => void) | undefined,\n) {\n const start = group?.onPressStart\n if (start === undefined) {\n return {}\n }\n const end = group?.onPressEnd\n\n return {\n onPressEnd: (event: PressEvent) => {\n end?.()\n onPressEnd?.(event)\n },\n onPressStart: (event: PressEvent) => {\n start(event.target.getBoundingClientRect().width)\n onPressStart?.(event)\n },\n }\n}\n\nexport { groupPressHandlers }\n"],"mappings":";;;;;;AAcA,SAASE,mBACPC,OACAC,cACAE,YACA;CACA,MAAMC,QAAQJ,OAAOC;CACrB,IAAIG,UAAUC,KAAAA,GACZ,OAAO,CAAC;CAEV,MAAMC,MAAMN,OAAOG;CAEnB,OAAO;EACLA,aAAaD,UAAsB;GACjCI,MAAM;GACNH,aAAaD,KAAK;EACpB;EACAD,eAAeC,UAAsB;GACnCE,MAAMF,MAAMK,OAAOC,sBAAsB,CAAC,CAACC,KAAK;GAChDR,eAAeC,KAAK;EACtB;CACF;AACF"}
1
+ {"version":3,"file":"group.js","names":["groupPressHandlers","group","onPressStart","event","onPressEnd","start","undefined","end","target","getBoundingClientRect","width"],"sources":["../../src/button/group.ts"],"sourcesContent":["import type { PressEvent } from 'react-aria-components'\n\nimport type { ButtonGroupItem } from './context'\n\n// What a button in a standard ButtonGroup does about its own presses: tell\n// the group when one starts, with its width, and when it ends, so the group\n// can widen it and narrow its neighbours. Apart from ./index.tsx so that file\n// exports components alone, which is what keeps fast refresh working for it.\n\n/**\n * The press handlers a button inside a group that tracks presses takes: its\n * own, with the group told first. Empty anywhere else, which leaves the\n * call site's own handlers on the button untouched.\n */\nfunction groupPressHandlers(\n group: ButtonGroupItem | null,\n onPressStart: ((event: PressEvent) => void) | undefined,\n onPressEnd: ((event: PressEvent) => void) | undefined,\n) {\n const start = group?.onPressStart\n if (start === undefined) {\n return {}\n }\n const end = group?.onPressEnd\n\n return {\n onPressEnd: (event: PressEvent) => {\n end?.()\n onPressEnd?.(event)\n },\n onPressStart: (event: PressEvent) => {\n start(event.target.getBoundingClientRect().width)\n onPressStart?.(event)\n },\n }\n}\n\nexport { groupPressHandlers }\n"],"mappings":";;;;;;AAcA,SAASA,mBACPC,OACAC,cACAE,YACA;CACA,MAAMC,QAAQJ,OAAOC;CACrB,IAAIG,UAAUC,KAAAA,GACZ,OAAO,CAAC;CAEV,MAAMC,MAAMN,OAAOG;CAEnB,OAAO;EACLA,aAAaD,UAAsB;GACjCI,MAAM;GACNH,aAAaD,KAAK;EACpB;EACAD,eAAeC,UAAsB;GACnCE,MAAMF,MAAMK,OAAOC,sBAAsB,CAAC,CAACC,KAAK;GAChDR,eAAeC,KAAK;EACtB;CACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","names":["Ref","FocusableElement","useState","ButtonContext","useSlottedContext","ButtonDOMProps","useRipple","ariaAttributesOf","refCallback","ButtonBaseInput","Pick","disableRipple","ref","HTMLAnchorElement","HTMLButtonElement","useButtonBase","input","isPending","$","_c","t0","isDisabled","onClick","onContextMenu","onKeyDown","onKeyUp","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","props","undefined","context","slot","disabled","t1","ripple","t2","t3","aria","t4","t5","element","useSelection","defaultSelected","isSelected","onChange","own","setOwn","selected","toggle","_c"],"sources":["../../src/button/hooks.ts"],"sourcesContent":["import type { Ref } from 'react'\nimport type { FocusableElement } from 'react-aria-components'\n\nimport { useState } from 'react'\nimport { ButtonContext, useSlottedContext } from 'react-aria-components'\n\nimport type { ButtonDOMProps } from '.'\n\nimport { useRipple } from '../hooks/useRipple'\nimport { ariaAttributesOf } from '../render/aria'\nimport { refCallback } from '../render/ref'\n\n// The hook half of `src/button`, apart from ./index.tsx so that file exports\n// components alone — which is what keeps fast refresh working for it, the\n// same arrangement `src/drag` uses.\n\n/** What {@link useButtonBase} takes off a button's props for itself. */\ntype ButtonBaseInput = Pick<\n ButtonDOMProps,\n | 'isDisabled'\n | 'onClick'\n | 'onContextMenu'\n | 'onKeyDown'\n | 'onKeyUp'\n | 'onPointerCancel'\n | 'onPointerDown'\n | 'onPointerLeave'\n | 'onPointerUp'\n | 'slot'\n> & {\n disableRipple?: boolean\n ref?: Ref<HTMLAnchorElement | HTMLButtonElement>\n}\n\n/**\n * What a button does past React Aria, whichever of its elements it renders:\n * the disabled state a parent's context sets, the ripple, and the `aria-*`\n * props and keyboard handlers React Aria would drop or wrap. Hands back the\n * props it did not take, for the element.\n *\n * Shared by ButtonBase and by IconButton's toggle, which is React Aria's\n * `ToggleButton` rather than either element ButtonBase renders.\n */\nfunction useButtonBase<Props extends ButtonBaseInput>(\n input: Props,\n isPending: boolean,\n) {\n const {\n disableRipple = false,\n isDisabled,\n onClick,\n onContextMenu,\n onKeyDown,\n onKeyUp,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n ref,\n ...props\n } = input\n\n // A parent's context may disable the button — React Aria's own fields\n // disable the buttons they hold with them, a number field's stepper at the\n // end of its range and a search field's clear button with the field — and\n // React Aria takes a prop over its context, so a default of `false` here\n // would keep the button enabled whatever the parent said. The call site's\n // own prop still wins where it is given; the context is read for the\n // ripple, which has to know before the render state does.\n const context = useSlottedContext(ButtonContext, input.slot)\n const disabled = isDisabled ?? context?.isDisabled ?? false\n\n // The rest of the props (className/style, etc.) are handed back rather\n // than given to the ripple: `className` and `style` there may be functions\n // of render state, which the ripple's own handler-only merge doesn't need\n // to know about. It is also why ButtonBase merges the styles through\n // mergeStatefulStyles rather than the plain mergeStyles. The ripple is off\n // while disabled: React Aria still forwards pointer events to a disabled\n // element, and a press that changes nothing should not look like one.\n //\n // Off while pending for the same reason, and for a second one. React Aria\n // nulls out the handlers it derived itself while pending — the click among\n // them — but not the separate copy of the global pointer events that\n // carries ours, so a press still reached the ripple and started it while\n // the click that would have ended it never arrived. The ripple stayed at\n // its pressed opacity until some later press completed a cycle of its own.\n const ripple = useRipple<FocusableElement>(\n !disableRipple && !disabled && !isPending,\n {\n onClick,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n },\n )\n\n return {\n disabled,\n element: { aria: ariaAttributesOf(props), onKeyDown, onKeyUp },\n props,\n // The element is a button, a link or IconButton's toggle, so the ref is\n // typed as a link or a button and handed to each as the callback all\n // three accept — see src/render/ref.ts.\n ref: refCallback(ref),\n ripple,\n }\n}\n\n/**\n * A toggle's state, for a button that is a toggle on its own rather than in\n * a selecting group: the call site's `isSelected` where it holds the state,\n * otherwise the button's own, starting from `defaultSelected`. `toggle` is\n * what a press calls, and reports the new state through `onChange` either\n * way. Called whether or not the button is a toggle, so that becoming one\n * changes no hook order.\n */\nfunction useSelection({\n defaultSelected,\n isSelected,\n onChange,\n}: {\n defaultSelected?: boolean | undefined\n isSelected?: boolean | undefined\n onChange?: ((isSelected: boolean) => void) | undefined\n}) {\n const [own, setOwn] = useState(defaultSelected ?? false)\n const selected = isSelected ?? own\n\n return {\n selected,\n toggle: () => {\n setOwn(!selected)\n onChange?.(!selected)\n },\n }\n}\n\nexport { useButtonBase, useSelection }\n"],"mappings":";;;;;;;;;;;;;;;;AA2CA,SAAAe,cAAAC,OAAAC,WAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAIE,MAAA,EAAAR,eAAAS,IAAAC,YAAAC,SAAAC,eAAAC,WAA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oB,MAAApB,EAAA,QAAAsB,IAAA;EAPhBC,KAAA;GAAAP;GAAAQ,SAEIJ;GAAqDR;GAAAlB,KAKzD4B;GAAgBJ;EAEvB;EAAClB,EAAA,MAAAgB;EAAAhB,EAAA,MAAAY;EAAAZ,EAAA,MAAAkB;EAAAlB,EAAA,MAAAoB;EAAApB,EAAA,MAAAsB;EAAAtB,EAAA,MAAAuB;CAAA,OAAAA,KAAAvB,EAAA;CAAA,OATMuB;AASN;;;;;;;;;AAWH,SAAAE,aAAAvB,IAAA;CAAA,MAAAF,IAAAC,EAAA,CAAA;CAAsB,MAAA,EAAAyB,iBAAAC,YAAAC,aAAA1B;CASpB,MAAA,CAAA2B,KAAAC,UAAsB9C,SAAS0C,mBAAA,KAAwB;CACvD,MAAAK,WAAiBJ,cAAAE;CAAiB,IAAAZ;CAAA,IAAAjB,EAAA,OAAA4B,YAAA5B,EAAA,OAAA+B,UAAA;EAIxBd,WAAA;GACNa,OAAO,CAACC,QAAQ;GAChBH,WAAW,CAACG,QAAQ;EAAC;EACtB/B,EAAA,KAAA4B;EAAA5B,EAAA,KAAA+B;EAAA/B,EAAA,KAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,IAAAmB;CAAA,IAAAnB,EAAA,OAAA+B,YAAA/B,EAAA,OAAAiB,IAAA;EALIE,KAAA;GAAAY;GAAAC,QAEGf;EAIV;EAACjB,EAAA,KAAA+B;EAAA/B,EAAA,KAAAiB;EAAAjB,EAAA,KAAAmB;CAAA,OAAAA,KAAAnB,EAAA;CAAA,OANMmB;AAMN"}
1
+ {"version":3,"file":"hooks.js","names":["useState","ButtonContext","useSlottedContext","useRipple","ariaAttributesOf","refCallback","disableRipple","ref","useButtonBase","input","isPending","$","_c","t0","isDisabled","onClick","onContextMenu","onKeyDown","onKeyUp","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","props","undefined","context","slot","disabled","t1","ripple","t2","t3","aria","t4","t5","element","useSelection","defaultSelected","isSelected","onChange","own","setOwn","selected","toggle"],"sources":["../../src/button/hooks.ts"],"sourcesContent":["import type { Ref } from 'react'\nimport type { FocusableElement } from 'react-aria-components'\n\nimport { useState } from 'react'\nimport { ButtonContext, useSlottedContext } from 'react-aria-components'\n\nimport type { ButtonDOMProps } from '.'\n\nimport { useRipple } from '../hooks/useRipple'\nimport { ariaAttributesOf } from '../render/aria'\nimport { refCallback } from '../render/ref'\n\n// The hook half of `src/button`, apart from ./index.tsx so that file exports\n// components alone — which is what keeps fast refresh working for it, the\n// same arrangement `src/drag` uses.\n\n/** What {@link useButtonBase} takes off a button's props for itself. */\ntype ButtonBaseInput = Pick<\n ButtonDOMProps,\n | 'isDisabled'\n | 'onClick'\n | 'onContextMenu'\n | 'onKeyDown'\n | 'onKeyUp'\n | 'onPointerCancel'\n | 'onPointerDown'\n | 'onPointerLeave'\n | 'onPointerUp'\n | 'slot'\n> & {\n disableRipple?: boolean\n ref?: Ref<HTMLAnchorElement | HTMLButtonElement>\n}\n\n/**\n * What a button does past React Aria, whichever of its elements it renders:\n * the disabled state a parent's context sets, the ripple, and the `aria-*`\n * props and keyboard handlers React Aria would drop or wrap. Hands back the\n * props it did not take, for the element.\n *\n * Shared by ButtonBase and by IconButton's toggle, which is React Aria's\n * `ToggleButton` rather than either element ButtonBase renders.\n */\nfunction useButtonBase<Props extends ButtonBaseInput>(\n input: Props,\n isPending: boolean,\n) {\n const {\n disableRipple = false,\n isDisabled,\n onClick,\n onContextMenu,\n onKeyDown,\n onKeyUp,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n ref,\n ...props\n } = input\n\n // A parent's context may disable the button — React Aria's own fields\n // disable the buttons they hold with them, a number field's stepper at the\n // end of its range and a search field's clear button with the field — and\n // React Aria takes a prop over its context, so a default of `false` here\n // would keep the button enabled whatever the parent said. The call site's\n // own prop still wins where it is given; the context is read for the\n // ripple, which has to know before the render state does.\n const context = useSlottedContext(ButtonContext, input.slot)\n const disabled = isDisabled ?? context?.isDisabled ?? false\n\n // The rest of the props (className/style, etc.) are handed back rather\n // than given to the ripple: `className` and `style` there may be functions\n // of render state, which the ripple's own handler-only merge doesn't need\n // to know about. It is also why ButtonBase merges the styles through\n // mergeStatefulStyles rather than the plain mergeStyles. The ripple is off\n // while disabled: React Aria still forwards pointer events to a disabled\n // element, and a press that changes nothing should not look like one.\n //\n // Off while pending for the same reason, and for a second one. React Aria\n // nulls out the handlers it derived itself while pending — the click among\n // them — but not the separate copy of the global pointer events that\n // carries ours, so a press still reached the ripple and started it while\n // the click that would have ended it never arrived. The ripple stayed at\n // its pressed opacity until some later press completed a cycle of its own.\n const ripple = useRipple<FocusableElement>(\n !disableRipple && !disabled && !isPending,\n {\n onClick,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n },\n )\n\n return {\n disabled,\n element: { aria: ariaAttributesOf(props), onKeyDown, onKeyUp },\n props,\n // The element is a button, a link or IconButton's toggle, so the ref is\n // typed as a link or a button and handed to each as the callback all\n // three accept — see src/render/ref.ts.\n ref: refCallback(ref),\n ripple,\n }\n}\n\n/**\n * A toggle's state, for a button that is a toggle on its own rather than in\n * a selecting group: the call site's `isSelected` where it holds the state,\n * otherwise the button's own, starting from `defaultSelected`. `toggle` is\n * what a press calls, and reports the new state through `onChange` either\n * way. Called whether or not the button is a toggle, so that becoming one\n * changes no hook order.\n */\nfunction useSelection({\n defaultSelected,\n isSelected,\n onChange,\n}: {\n defaultSelected?: boolean | undefined\n isSelected?: boolean | undefined\n onChange?: ((isSelected: boolean) => void) | undefined\n}) {\n const [own, setOwn] = useState(defaultSelected ?? false)\n const selected = isSelected ?? own\n\n return {\n selected,\n toggle: () => {\n setOwn(!selected)\n onChange?.(!selected)\n },\n }\n}\n\nexport { useButtonBase, useSelection }\n"],"mappings":";;;;;;;;;;;;;;;;AA2CA,SAAAQ,cAAAC,OAAAC,WAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAIE,MAAA,EAAAN,eAAAO,IAAAC,YAAA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AkB,UAAAlB,EAAA,QAAAoB,MAAApB,EAAA,QAAAsB,IAAA;EAPhBC,KAAA;GAAAP;GAAAQ,SAEIJ;GAAqDR;GAAAhB,KAKzD0B;GAAgBJ;EAEvB;EAAClB,EAAA,MAAAgB;EAAAhB,EAAA,MAAAY;EAAAZ,EAAA,MAAAkB;EAAAlB,EAAA,MAAAoB;EAAApB,EAAA,MAAAsB;EAAAtB,EAAA,MAAAuB;CAAA,OAAAA,KAAAvB,EAAA;CAAA,OATMuB;AASN;;;;;;;;;AAWH,SAAAE,aAAAvB,IAAA;CAAA,MAAAF,IAAAC,EAAA,CAAA;CAAsB,MAAA,EAAAyB,iBAAAC,YAAAC,aAAA1B;CASpB,MAAA,CAAA2B,KAAAC,UAAsBzC,SAASqC,mBAAA,KAAwB;CACvD,MAAAK,WAAiBJ,cAAAE;CAAiB,IAAAZ;CAAA,IAAAjB,EAAA,OAAA4B,YAAA5B,EAAA,OAAA+B,UAAA;EAIxBd,WAAA;GACNa,OAAO,CAACC,QAAQ;GAChBH,WAAW,CAACG,QAAQ;EAAC;EACtB/B,EAAA,KAAA4B;EAAA5B,EAAA,KAAA+B;EAAA/B,EAAA,KAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,IAAAmB;CAAA,IAAAnB,EAAA,OAAA+B,YAAA/B,EAAA,OAAAiB,IAAA;EALIE,KAAA;GAAAY;GAAAC,QAEGf;EAIV;EAACjB,EAAA,KAAA+B;EAAA/B,EAAA,KAAAiB;EAAAjB,EAAA,KAAAmB;CAAA,OAAAA,KAAAnB,EAAA;CAAA,OANMmB;AAMN"}
@@ -1,5 +1,5 @@
1
- import { DOMAttributes, ReactNode, RefAttributes } from "react";
2
- import { ButtonProps, ButtonRenderProps, ClassNameOrFunction, StyleOrFunction } from "react-aria-components";
1
+ import { DOMAttributes } from "react";
2
+ import { ButtonProps, ButtonRenderProps } from "react-aria-components";
3
3
  type ButtonDOMProps = Omit<ButtonProps, 'children' | 'className' | 'style' | GlobalEventKey> & Pick<DOMAttributes<HTMLElement>, GlobalEventKey>;
4
4
  /**
5
5
  * The three forms a button takes, of which a call site writes exactly one:
@@ -61,5 +61,4 @@ type ButtonToggleForm = {
61
61
  target?: never;
62
62
  };
63
63
  type GlobalEventKey = Exclude<keyof DOMAttributes<HTMLElement> & keyof ButtonProps, 'onBlur' | 'onClick' | 'onFocus'>;
64
- export type { ButtonDOMProps, ButtonForm, ButtonLinkForm, ButtonPressForm, ButtonState, ButtonToggleForm };
65
- //# sourceMappingURL=index.d.ts.map
64
+ export type { ButtonDOMProps, ButtonForm, ButtonLinkForm, ButtonPressForm, ButtonState, ButtonToggleForm };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DOMAttributes","ReactNode","RefAttributes","ButtonRenderProps","ClassNameOrFunction","ButtonProps","RACButtonProps","ToggleButtonProps","RACToggleButtonProps","StyleOrFunction","stylex","Button","RACButton","Link","RACLink","ToggleButton","RACToggleButton","ElementProps","ProgressIndicator","useToggleGroupDisabled","useMessages","buttonRenderer","linkRenderer","toggleButtonRenderer","mergeStatefulStyles","useButtonBase","buttonBaseStyles","ButtonBaseProps","children","classes","state","ButtonClassesState","ReturnType","props","className","ButtonState","disableRipple","href","isSelected","pendingLabel","rel","style","target","ButtonDOMProps","HTMLAnchorElement","HTMLButtonElement","isPending","Omit","GlobalEventKey","Pick","HTMLElement","ButtonForm","ButtonLinkForm","ButtonPressForm","ButtonToggleForm","defaultSelected","onChange","Exclude","ToggleButtonBaseProps","busyElement","element","aria","ButtonBase","t0","$","_c","input","render","t1","undefined","messages","base","disabled","ref","ripple","t2","merged","T0","styleProps","t3","t4","t5","t6","t7","handlers","surface","Symbol","for","bb0","t8","state_0","selectedRender","t9","loading","t10","buttonContent","t11","label","labelPending","pending","selected","ToggleButtonBase","disabledByGroup","id","isDisabled","toggleRender","toggleContent","_c","RACLink","RACButton","stylex.props","RACToggleButton"],"sources":["../../src/button/index.tsx"],"sourcesContent":["import type { DOMAttributes, ReactNode, RefAttributes } from 'react';\nimport type { ButtonRenderProps, ClassNameOrFunction, ButtonProps as RACButtonProps, ToggleButtonProps as RACToggleButtonProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Button as RACButton, Link as RACLink, ToggleButton as RACToggleButton } from 'react-aria-components';\nimport type { ElementProps } from '../render/aria';\nimport ProgressIndicator from '../components/progress-indicator';\nimport { useToggleGroupDisabled } from '../hooks/useToggleGroupDisabled';\nimport { useMessages } from '../i18n';\nimport { buttonRenderer, linkRenderer, toggleButtonRenderer } from '../render/aria';\nimport { mergeStatefulStyles } from '../styles/merge';\nimport { useButtonBase } from './hooks';\nimport { buttonBaseStyles } from './styles';\n\n// The press-button core Button and IconButton both render through. A button\n// is React Aria's `Button`, its `Link` once given `href`, or its\n// `ToggleButton` inside a selecting group, and around each this adds what\n// React Aria leaves out: the ripple, the disabled state a parent's context\n// sets, the `aria-*` props and keyboard handlers it would drop or wrap, and\n// the ring drawn over the label while the button is pending, with the\n// `aria-busy` that says so. Each component\n// brings its own classes, as a function of the render state, and the call\n// site's `className` and `style` are merged over them.\n//\n// One module rather than a copy in each, since the copies had already drifted\n// once: IconButton read `ButtonContext` for a parent's disabled state and\n// Button did not. Not a component of the library's own and not exported from\n// the package; see `src/row` for the same arrangement around a list's row.\n\ntype ButtonBaseProps = {\n children?: ReactNode;\n /**\n * The component's own classes, from the render state. The call site's\n * `className` and `style` are merged over them.\n */\n classes: (state: ButtonClassesState) => ReturnType<typeof stylex.props>;\n className?: ClassNameOrFunction<ButtonState>;\n disableRipple?: boolean;\n href?: string;\n /**\n * A toggle's state, for a button that reports one through `aria-pressed`.\n * Left undefined, the button reports none. Handed to every function of the\n * render state, so the classes can draw it.\n */\n isSelected?: boolean;\n pendingLabel?: string;\n rel?: string;\n style?: StyleOrFunction<ButtonState>;\n target?: string;\n} & ButtonDOMProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>;\n\n// The state a component's own classes are handed: the render state above,\n// and whether the button is pending, so the classes can draw it. React\n// Aria's `Button` reports that and its `Link` and `ToggleButton` do not, so\n// it is optional — a link, and a toggle in a selecting group, are never\n// pending — and it stays out of ButtonState, which a call site's own\n// `className` and `style` are written against.\ntype ButtonClassesState = ButtonState & {\n isPending?: boolean;\n};\n\n// The props a button hands React Aria. React Aria types the global DOM events\n// — pointer, mouse, touch, wheel and the rest — against the element each\n// component renders, and a handler written for a <button> does not type-check\n// against an <a>. The keys are retyped against HTMLElement here so one set of\n// props serves both forms; the events React Aria defines itself (press,\n// focus, keyboard) keep its types, since it hands those its own event objects.\ntype ButtonDOMProps = Omit<RACButtonProps, 'children' | 'className' | 'style' | GlobalEventKey> & Pick<DOMAttributes<HTMLElement>, GlobalEventKey>;\n\n/**\n * The three forms a button takes, of which a call site writes exactly one:\n * a plain button, a link, or a toggle. Each names the props of the other two\n * as `never`, so a combination the rendered form would ignore — a toggle\n * given `href`, a link given `isPending` — is a compile error rather than a\n * prop that silently does nothing.\n */\ntype ButtonForm = ButtonLinkForm | ButtonPressForm | ButtonToggleForm;\ntype ButtonLinkForm = {\n defaultSelected?: never;\n /**\n * Where the button leads. Given one, the button is rendered as a link —\n * an `<a>`, announced as the link it is — with the same styles and ripple.\n * A link is never a toggle and never pending, and `render`, `type` and the\n * form props apply to the other two forms only.\n */\n href: string;\n isPending?: never;\n isSelected?: never;\n onChange?: never;\n pendingLabel?: never;\n /** The link's `rel`. */\n rel?: string;\n /** The link's `target`. */\n target?: string;\n};\ntype ButtonPressForm = {\n defaultSelected?: never;\n href?: never;\n isSelected?: never;\n onChange?: never;\n rel?: never;\n target?: never;\n};\n\n// The render state React Aria's three elements share. A className or style\n// function written against it serves the button, the link and the toggle\n// alike; `isPending` belongs to the button alone, and `isCurrent` to the\n// link, so neither is here. What the button draws while pending is decided\n// in `buttonContent`, which sees React Aria's own state rather than this one.\n//\n// `isSelected` is optional because only the toggle has one: React Aria hands\n// the button and the link a state without it and the toggle a state with\n// it, and a parameter type this wide accepts either.\ntype ButtonState = Pick<ButtonRenderProps, 'isDisabled' | 'isFocused' | 'isFocusVisible' | 'isHovered' | 'isPressed'> & {\n isSelected?: boolean;\n};\ntype ButtonToggleForm = {\n /**\n * Whether a toggle starts selected, when it keeps its own state. Passing\n * this, `isSelected` or `onChange` is what makes the button a toggle.\n */\n defaultSelected?: boolean;\n href?: never;\n /**\n * Whether a toggle is selected, when the call site holds the state. Pass\n * it with `onChange`; passing this, `defaultSelected` or `onChange` is what\n * makes the button a toggle. A value still loading may be `undefined` for a\n * while: the button stays the same element when it arrives.\n */\n isSelected?: boolean;\n /**\n * Called with the new state when a toggle is pressed. Passing this,\n * `isSelected` or `defaultSelected` is what makes the button a toggle.\n */\n onChange?: (isSelected: boolean) => void;\n rel?: never;\n target?: never;\n};\ntype GlobalEventKey = Exclude<keyof DOMAttributes<HTMLElement> & keyof RACButtonProps, 'onBlur' | 'onClick' | 'onFocus'>;\ntype ToggleButtonBaseProps = {\n children?: ReactNode;\n /** As for ButtonBase, handed `isSelected` as well. */\n classes: (state: ButtonState) => ReturnType<typeof stylex.props>;\n className?: ClassNameOrFunction<ButtonState>;\n defaultSelected?: boolean;\n disableRipple?: boolean;\n isSelected?: boolean;\n onChange?: (isSelected: boolean) => void;\n style?: StyleOrFunction<ButtonState>;\n} & ButtonDOMProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>;\n\n// A pending button says it is busy on the element itself. React Aria marks\n// it disabled and nests the ring's progress bar inside it, but a button's\n// children are presentational, and assistive technology that flattens them\n// never announces the bar. Only the button takes it, since a link is never\n// pending, and a call site's own `aria-busy` still wins.\nfunction busyElement(element: ElementProps, isPending: boolean) {\n return isPending ? {\n ...element,\n aria: {\n 'aria-busy': true,\n ...element.aria\n }\n } : element;\n}\n\n/**\n * A button drawn with the classes a component hands it: React Aria's\n * `Button`, or its `Link` given `href`. See the header.\n */\nfunction ButtonBase({\n children,\n classes,\n href,\n isPending = false,\n isSelected,\n pendingLabel,\n rel,\n render,\n target,\n ...input\n}: ButtonBaseProps) {\n const messages = useMessages();\n const base = useButtonBase(input, isPending);\n const {\n disabled,\n props,\n ref,\n ripple\n } = base;\n const merged = mergeStatefulStyles(classes, props);\n\n // A toggle is still React Aria's `Button`, which knows nothing of a\n // selected state, so the state goes onto the element as `aria-pressed` and\n // into every function of the render state from here. Being the same\n // component as the plain button is what keeps a button the same element\n // when it becomes a toggle — `isSelected` arriving once its data loads.\n const element = isSelected === undefined ? base.element : {\n ...base.element,\n aria: {\n ...base.element.aria,\n 'aria-pressed': isSelected\n }\n };\n const styleProps = isSelected === undefined ? merged : {\n className: (state: Parameters<typeof merged.className>[0]) => merged.className({\n ...state,\n isSelected\n }),\n style: (state: Parameters<typeof merged.style>[0]) => merged.style({\n ...state,\n isSelected\n })\n };\n if (href !== undefined) {\n return <RACLink href={href} isDisabled={disabled} ref={ref} rel={rel} render={linkRenderer(element)} target={target} {...ripple.handlers} {...props} {...styleProps}>\n {children}\n {ripple.surface}\n </RACLink>;\n }\n return <RACButton isDisabled={disabled} isPending={isPending} ref={ref} render={buttonRenderer(busyElement(element, isPending), selectedRender(render, isSelected))} {...ripple.handlers} {...props} {...styleProps}>\n {buttonContent(children, pendingLabel ?? messages.loading, ripple.surface)}\n </RACButton>;\n}\n\n// What the button draws: its label, hidden while the button is pending, with\n// the ring over it. The ring takes the button's own content colour rather\n// than the progress page's primary, which on a filled button is the fill\n// itself and so invisible. The label stays in the flow so the button keeps its\n// width, which is what stops a form jumping the moment it is submitted.\n// React Aria wants the progress bar in the accessibility tree as soon as the\n// button goes pending, so it is rendered from the render state rather than\n// after a delay.\n//\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler\n// memoises the result on its inputs.\nfunction buttonContent(children: ReactNode, pendingLabel: string, surface: ReactNode) {\n return (state: ButtonRenderProps) => <>\n <span {...stylex.props(buttonBaseStyles.label, state.isPending && buttonBaseStyles.labelPending)}>\n {children}\n </span>\n {state.isPending ? <span {...stylex.props(buttonBaseStyles.pending)}>\n <ProgressIndicator aria-label={pendingLabel} diameter=\"1em\" isIndeterminate tone=\"inherit\" variant=\"circular\" />\n </span> : null}\n {surface}\n </>;\n}\n\n// A toggle drawn through ButtonBase hands a call site's `render` the state of\n// React Aria's plain button, which has no `isSelected`; this fills it in.\nfunction selectedRender(render: RACButtonProps['render'], isSelected: boolean | undefined): RACButtonProps['render'] {\n if (render === undefined || isSelected === undefined) {\n return render;\n }\n // Through a binding rather than as a literal at the call: React Aria types\n // the state as its plain button's, and a call site's `render` is written\n // against ButtonState, which is that plus `isSelected`.\n return (props, state) => {\n const selected = {\n ...state,\n isSelected\n };\n return render(props, selected);\n };\n}\n\n/**\n * A toggle in a selecting group, drawn with the classes a component hands\n * it: React Aria's `ToggleButton`, which is what takes part in the group's\n * selection and reports its state through `aria-pressed`. A toggle on its\n * own is ButtonBase given `isSelected` instead — see there. React Aria's\n * toggle takes no pending state, so `isPending` reaches it only to keep the\n * ripple off.\n */\nfunction ToggleButtonBase({\n children,\n classes,\n defaultSelected,\n isPending = false,\n isSelected,\n onChange,\n render,\n ...input\n}: ToggleButtonBaseProps) {\n // A selecting ButtonGroup disables its toggles through React Aria's group\n // state, which no prop here carries, so the ripple would stay on in a\n // disabled group and answer a press with an animation. Handed on as the\n // toggle's own `isDisabled`, which is what React Aria makes of it anyway.\n const disabledByGroup = useToggleGroupDisabled(input.id);\n const {\n disabled,\n element,\n props,\n ref,\n ripple\n } = useButtonBase(disabledByGroup ? {\n ...input,\n isDisabled: true\n } : input, isPending);\n return <RACToggleButton defaultSelected={defaultSelected} isDisabled={disabled} isSelected={isSelected} onChange={onChange} ref={ref} render={toggleButtonRenderer(element, toggleRender(render))} {...ripple.handlers} {...props} {...mergeStatefulStyles(classes, props)}>\n {toggleContent(children, ripple.surface)}\n </RACToggleButton>;\n}\n\n// What a toggle draws: its label and the ripple. No pending ring — see\n// ToggleButtonBase. Built by a call for the reason `buttonContent` is.\nfunction toggleContent(children: ReactNode, surface: ReactNode) {\n return () => <>\n {children}\n {surface}\n </>;\n}\n\n// A call site's `render` is written for React Aria's button, whose render\n// state says whether it is pending; a toggle's says nothing of it, and a\n// toggle never is. So the toggle hands that function its own state with\n// `isPending` filled in, which is what lets one `render` prop serve a button\n// whichever element it turns out to be.\nfunction toggleRender(render: RACButtonProps['render']): RACToggleButtonProps['render'] {\n if (render === undefined) {\n return undefined;\n }\n return (props, state) => render(props, {\n ...state,\n isPending: false\n });\n}\nexport type { ButtonClassesState, ButtonDOMProps, ButtonForm, ButtonLinkForm, ButtonPressForm, ButtonState, ButtonToggleForm };\nexport { ButtonBase, ToggleButtonBase };"],"mappings":";;;;;;;;;;;;AA2JA,SAAS2D,YAAYC,SAAuBd,WAAoB;CAC9D,OAAOA,YAAY;EACjB,GAAGc;EACHC,MAAM;GACJ,aAAa;GACb,GAAGD,QAAQC;EACb;CACF,IAAID;AACN;;;;;AAMA,SAAAE,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAArC;CAAA,IAAAC;CAAA,IAAAQ;CAAA,IAAA6B;CAAA,IAAA5B;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAA2B;CAAA,IAAAC;CAAA,IAAA1B;CAAA,IAAAsB,EAAA,OAAAD,IAAA;EAAoB,CAAA,CAAAnC,UAAAC,SAAAQ,MAAAS,WAAAsB,IAAA9B,YAAAC,cAAAC,KAAA2B,QAAAzB,QAAA,GAAAwB,SAAAH;EAWFC,EAAA,KAAAD;EAAAC,EAAA,KAAApC;EAAAoC,EAAA,KAAAnC;EAAAmC,EAAA,KAAA3B;EAAA2B,EAAA,KAAAE;EAAAF,EAAA,KAAA1B;EAAA0B,EAAA,KAAAzB;EAAAyB,EAAA,KAAAxB;EAAAwB,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,MAAAtB;CAAA,OAAA;EAAAd,WAAAoC,EAAA;EAAAnC,UAAAmC,EAAA;EAAA3B,OAAA2B,EAAA;EAAAE,QAAAF,EAAA;EAA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AA1B,cAAA0B,EAAA,QAAAR,YAAAQ,EAAA,QAAA/B,SAAA+B,EAAA,QAAAS,OAAAT,EAAA,QAAAU,OAAAU,YAAApB,EAAA,QAAAe,MAAAf,EAAA,QAAAiB,MAAAjB,EAAA,QAAAkB,IAAA;EADrCC,KAAA,oBAAC4B,cAAD;GAAkCxD;GAA6BiB,YAAAA;GAAsBlC;GAAsBkB;GAAeiB;GAAa,QAAAM;GAAmD,GAAMC;GAAe,GAAM/C;GAAK,GAAMgD;GAClOC,UAAAA;EADkB,CAAA;EAEHlB,EAAA,MAAAT;EAAAS,EAAA,MAAAQ;EAAAR,EAAA,MAAA1B;EAAA0B,EAAA,MAAAR;EAAAQ,EAAA,MAAA/B;EAAA+B,EAAA,MAAAS;EAAAT,EAAA,MAAAU,OAAAU;EAAApB,EAAA,MAAAe;EAAAf,EAAA,MAAAiB;EAAAjB,EAAA,MAAAkB;EAAAlB,EAAA,MAAAmB;CAAA,OAAAA,KAAAnB,EAAA;CAAA,OAFbmB;AAEa;AAKtB,SAASuB,cAAc9E,UAAqByD,SAAoB;CAC9D,aAAa,qBAAA,UAAA,EAAA,UAAA,CACRzD,UACAyD,OACH,EAAA,CAAA;AACJ;AAOA,SAASoB,aAAatC,QAAkE;CACtF,IAAIA,WAAWE,KAAAA,GACb;CAEF,QAAQpC,OAAOH,UAAUqC,OAAOlC,OAAO;EACrC,GAAGH;EACHgB,WAAW;CACb,CAAC;AACH"}
1
+ {"version":3,"file":"index.js","names":["stylex","RACButton","useToggleGroupDisabled","useMessages","buttonRenderer","linkRenderer","toggleButtonRenderer","mergeStatefulStyles","useButtonBase","buttonBaseStyles","children","classes","state","props","className","href","isSelected","pendingLabel","rel","style","target","isPending","defaultSelected","onChange","busyElement","element","aria","ButtonBase","t0","$","_c","input","render","t1","undefined","messages","base","disabled","ref","ripple","t2","merged","T0","styleProps","t3","t4","t5","t6","t7","handlers","surface","Symbol","for","bb0","t8","state_0","selectedRender","t9","loading","t10","buttonContent","t11","label","labelPending","pending","selected","ToggleButtonBase","disabledByGroup","id","isDisabled","toggleRender","toggleContent","RACLink","RACToggleButton"],"sources":["../../src/button/index.tsx"],"sourcesContent":["import type { DOMAttributes, ReactNode, RefAttributes } from 'react';\nimport type { ButtonRenderProps, ClassNameOrFunction, ButtonProps as RACButtonProps, ToggleButtonProps as RACToggleButtonProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Button as RACButton, Link as RACLink, ToggleButton as RACToggleButton } from 'react-aria-components';\nimport type { ElementProps } from '../render/aria';\nimport ProgressIndicator from '../components/progress-indicator';\nimport { useToggleGroupDisabled } from '../hooks/useToggleGroupDisabled';\nimport { useMessages } from '../i18n';\nimport { buttonRenderer, linkRenderer, toggleButtonRenderer } from '../render/aria';\nimport { mergeStatefulStyles } from '../styles/merge';\nimport { useButtonBase } from './hooks';\nimport { buttonBaseStyles } from './styles';\n\n// The press-button core Button and IconButton both render through. A button\n// is React Aria's `Button`, its `Link` once given `href`, or its\n// `ToggleButton` inside a selecting group, and around each this adds what\n// React Aria leaves out: the ripple, the disabled state a parent's context\n// sets, the `aria-*` props and keyboard handlers it would drop or wrap, and\n// the ring drawn over the label while the button is pending, with the\n// `aria-busy` that says so. Each component\n// brings its own classes, as a function of the render state, and the call\n// site's `className` and `style` are merged over them.\n//\n// One module rather than a copy in each, since the copies had already drifted\n// once: IconButton read `ButtonContext` for a parent's disabled state and\n// Button did not. Not a component of the library's own and not exported from\n// the package; see `src/row` for the same arrangement around a list's row.\n\ntype ButtonBaseProps = {\n children?: ReactNode;\n /**\n * The component's own classes, from the render state. The call site's\n * `className` and `style` are merged over them.\n */\n classes: (state: ButtonClassesState) => ReturnType<typeof stylex.props>;\n className?: ClassNameOrFunction<ButtonState>;\n disableRipple?: boolean;\n href?: string;\n /**\n * A toggle's state, for a button that reports one through `aria-pressed`.\n * Left undefined, the button reports none. Handed to every function of the\n * render state, so the classes can draw it.\n */\n isSelected?: boolean;\n pendingLabel?: string;\n rel?: string;\n style?: StyleOrFunction<ButtonState>;\n target?: string;\n} & ButtonDOMProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>;\n\n// The state a component's own classes are handed: the render state above,\n// and whether the button is pending, so the classes can draw it. React\n// Aria's `Button` reports that and its `Link` and `ToggleButton` do not, so\n// it is optional — a link, and a toggle in a selecting group, are never\n// pending — and it stays out of ButtonState, which a call site's own\n// `className` and `style` are written against.\ntype ButtonClassesState = ButtonState & {\n isPending?: boolean;\n};\n\n// The props a button hands React Aria. React Aria types the global DOM events\n// — pointer, mouse, touch, wheel and the rest — against the element each\n// component renders, and a handler written for a <button> does not type-check\n// against an <a>. The keys are retyped against HTMLElement here so one set of\n// props serves both forms; the events React Aria defines itself (press,\n// focus, keyboard) keep its types, since it hands those its own event objects.\ntype ButtonDOMProps = Omit<RACButtonProps, 'children' | 'className' | 'style' | GlobalEventKey> & Pick<DOMAttributes<HTMLElement>, GlobalEventKey>;\n\n/**\n * The three forms a button takes, of which a call site writes exactly one:\n * a plain button, a link, or a toggle. Each names the props of the other two\n * as `never`, so a combination the rendered form would ignore — a toggle\n * given `href`, a link given `isPending` — is a compile error rather than a\n * prop that silently does nothing.\n */\ntype ButtonForm = ButtonLinkForm | ButtonPressForm | ButtonToggleForm;\ntype ButtonLinkForm = {\n defaultSelected?: never;\n /**\n * Where the button leads. Given one, the button is rendered as a link —\n * an `<a>`, announced as the link it is — with the same styles and ripple.\n * A link is never a toggle and never pending, and `render`, `type` and the\n * form props apply to the other two forms only.\n */\n href: string;\n isPending?: never;\n isSelected?: never;\n onChange?: never;\n pendingLabel?: never;\n /** The link's `rel`. */\n rel?: string;\n /** The link's `target`. */\n target?: string;\n};\ntype ButtonPressForm = {\n defaultSelected?: never;\n href?: never;\n isSelected?: never;\n onChange?: never;\n rel?: never;\n target?: never;\n};\n\n// The render state React Aria's three elements share. A className or style\n// function written against it serves the button, the link and the toggle\n// alike; `isPending` belongs to the button alone, and `isCurrent` to the\n// link, so neither is here. What the button draws while pending is decided\n// in `buttonContent`, which sees React Aria's own state rather than this one.\n//\n// `isSelected` is optional because only the toggle has one: React Aria hands\n// the button and the link a state without it and the toggle a state with\n// it, and a parameter type this wide accepts either.\ntype ButtonState = Pick<ButtonRenderProps, 'isDisabled' | 'isFocused' | 'isFocusVisible' | 'isHovered' | 'isPressed'> & {\n isSelected?: boolean;\n};\ntype ButtonToggleForm = {\n /**\n * Whether a toggle starts selected, when it keeps its own state. Passing\n * this, `isSelected` or `onChange` is what makes the button a toggle.\n */\n defaultSelected?: boolean;\n href?: never;\n /**\n * Whether a toggle is selected, when the call site holds the state. Pass\n * it with `onChange`; passing this, `defaultSelected` or `onChange` is what\n * makes the button a toggle. A value still loading may be `undefined` for a\n * while: the button stays the same element when it arrives.\n */\n isSelected?: boolean;\n /**\n * Called with the new state when a toggle is pressed. Passing this,\n * `isSelected` or `defaultSelected` is what makes the button a toggle.\n */\n onChange?: (isSelected: boolean) => void;\n rel?: never;\n target?: never;\n};\ntype GlobalEventKey = Exclude<keyof DOMAttributes<HTMLElement> & keyof RACButtonProps, 'onBlur' | 'onClick' | 'onFocus'>;\ntype ToggleButtonBaseProps = {\n children?: ReactNode;\n /** As for ButtonBase, handed `isSelected` as well. */\n classes: (state: ButtonState) => ReturnType<typeof stylex.props>;\n className?: ClassNameOrFunction<ButtonState>;\n defaultSelected?: boolean;\n disableRipple?: boolean;\n isSelected?: boolean;\n onChange?: (isSelected: boolean) => void;\n style?: StyleOrFunction<ButtonState>;\n} & ButtonDOMProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>;\n\n// A pending button says it is busy on the element itself. React Aria marks\n// it disabled and nests the ring's progress bar inside it, but a button's\n// children are presentational, and assistive technology that flattens them\n// never announces the bar. Only the button takes it, since a link is never\n// pending, and a call site's own `aria-busy` still wins.\nfunction busyElement(element: ElementProps, isPending: boolean) {\n return isPending ? {\n ...element,\n aria: {\n 'aria-busy': true,\n ...element.aria\n }\n } : element;\n}\n\n/**\n * A button drawn with the classes a component hands it: React Aria's\n * `Button`, or its `Link` given `href`. See the header.\n */\nfunction ButtonBase({\n children,\n classes,\n href,\n isPending = false,\n isSelected,\n pendingLabel,\n rel,\n render,\n target,\n ...input\n}: ButtonBaseProps) {\n const messages = useMessages();\n const base = useButtonBase(input, isPending);\n const {\n disabled,\n props,\n ref,\n ripple\n } = base;\n const merged = mergeStatefulStyles(classes, props);\n\n // A toggle is still React Aria's `Button`, which knows nothing of a\n // selected state, so the state goes onto the element as `aria-pressed` and\n // into every function of the render state from here. Being the same\n // component as the plain button is what keeps a button the same element\n // when it becomes a toggle — `isSelected` arriving once its data loads.\n const element = isSelected === undefined ? base.element : {\n ...base.element,\n aria: {\n ...base.element.aria,\n 'aria-pressed': isSelected\n }\n };\n const styleProps = isSelected === undefined ? merged : {\n className: (state: Parameters<typeof merged.className>[0]) => merged.className({\n ...state,\n isSelected\n }),\n style: (state: Parameters<typeof merged.style>[0]) => merged.style({\n ...state,\n isSelected\n })\n };\n if (href !== undefined) {\n return <RACLink href={href} isDisabled={disabled} ref={ref} rel={rel} render={linkRenderer(element)} target={target} {...ripple.handlers} {...props} {...styleProps}>\n {children}\n {ripple.surface}\n </RACLink>;\n }\n return <RACButton isDisabled={disabled} isPending={isPending} ref={ref} render={buttonRenderer(busyElement(element, isPending), selectedRender(render, isSelected))} {...ripple.handlers} {...props} {...styleProps}>\n {buttonContent(children, pendingLabel ?? messages.loading, ripple.surface)}\n </RACButton>;\n}\n\n// What the button draws: its label, hidden while the button is pending, with\n// the ring over it. The ring takes the button's own content colour rather\n// than the progress page's primary, which on a filled button is the fill\n// itself and so invisible. The label stays in the flow so the button keeps its\n// width, which is what stops a form jumping the moment it is submitted.\n// React Aria wants the progress bar in the accessibility tree as soon as the\n// button goes pending, so it is rendered from the render state rather than\n// after a delay.\n//\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler\n// memoises the result on its inputs.\nfunction buttonContent(children: ReactNode, pendingLabel: string, surface: ReactNode) {\n return (state: ButtonRenderProps) => <>\n <span {...stylex.props(buttonBaseStyles.label, state.isPending && buttonBaseStyles.labelPending)}>\n {children}\n </span>\n {state.isPending ? <span {...stylex.props(buttonBaseStyles.pending)}>\n <ProgressIndicator aria-label={pendingLabel} diameter=\"1em\" isIndeterminate tone=\"inherit\" variant=\"circular\" />\n </span> : null}\n {surface}\n </>;\n}\n\n// A toggle drawn through ButtonBase hands a call site's `render` the state of\n// React Aria's plain button, which has no `isSelected`; this fills it in.\nfunction selectedRender(render: RACButtonProps['render'], isSelected: boolean | undefined): RACButtonProps['render'] {\n if (render === undefined || isSelected === undefined) {\n return render;\n }\n // Through a binding rather than as a literal at the call: React Aria types\n // the state as its plain button's, and a call site's `render` is written\n // against ButtonState, which is that plus `isSelected`.\n return (props, state) => {\n const selected = {\n ...state,\n isSelected\n };\n return render(props, selected);\n };\n}\n\n/**\n * A toggle in a selecting group, drawn with the classes a component hands\n * it: React Aria's `ToggleButton`, which is what takes part in the group's\n * selection and reports its state through `aria-pressed`. A toggle on its\n * own is ButtonBase given `isSelected` instead — see there. React Aria's\n * toggle takes no pending state, so `isPending` reaches it only to keep the\n * ripple off.\n */\nfunction ToggleButtonBase({\n children,\n classes,\n defaultSelected,\n isPending = false,\n isSelected,\n onChange,\n render,\n ...input\n}: ToggleButtonBaseProps) {\n // A selecting ButtonGroup disables its toggles through React Aria's group\n // state, which no prop here carries, so the ripple would stay on in a\n // disabled group and answer a press with an animation. Handed on as the\n // toggle's own `isDisabled`, which is what React Aria makes of it anyway.\n const disabledByGroup = useToggleGroupDisabled(input.id);\n const {\n disabled,\n element,\n props,\n ref,\n ripple\n } = useButtonBase(disabledByGroup ? {\n ...input,\n isDisabled: true\n } : input, isPending);\n return <RACToggleButton defaultSelected={defaultSelected} isDisabled={disabled} isSelected={isSelected} onChange={onChange} ref={ref} render={toggleButtonRenderer(element, toggleRender(render))} {...ripple.handlers} {...props} {...mergeStatefulStyles(classes, props)}>\n {toggleContent(children, ripple.surface)}\n </RACToggleButton>;\n}\n\n// What a toggle draws: its label and the ripple. No pending ring — see\n// ToggleButtonBase. Built by a call for the reason `buttonContent` is.\nfunction toggleContent(children: ReactNode, surface: ReactNode) {\n return () => <>\n {children}\n {surface}\n </>;\n}\n\n// A call site's `render` is written for React Aria's button, whose render\n// state says whether it is pending; a toggle's says nothing of it, and a\n// toggle never is. So the toggle hands that function its own state with\n// `isPending` filled in, which is what lets one `render` prop serve a button\n// whichever element it turns out to be.\nfunction toggleRender(render: RACButtonProps['render']): RACToggleButtonProps['render'] {\n if (render === undefined) {\n return undefined;\n }\n return (props, state) => render(props, {\n ...state,\n isPending: false\n });\n}\nexport type { ButtonClassesState, ButtonDOMProps, ButtonForm, ButtonLinkForm, ButtonPressForm, ButtonState, ButtonToggleForm };\nexport { ButtonBase, ToggleButtonBase };"],"mappings":";;;;;;;;;;;;AA2JA,SAASwB,YAAYC,SAAuBJ,WAAoB;CAC9D,OAAOA,YAAY;EACjB,GAAGI;EACHC,MAAM;GACJ,aAAa;GACb,GAAGD,QAAQC;EACb;CACF,IAAID;AACN;;;;;AAMA,SAAAE,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAApB;CAAA,IAAAC;CAAA,IAAAI;CAAA,IAAAgB;CAAA,IAAAf;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAc;CAAA,IAAAC;CAAA,IAAAb;CAAA,IAAAS,EAAA,OAAAD,IAAA;EAAoB,CAAA,CAAAlB,UAAAC,SAAAI,MAAAM,WAAAY,IAAAjB,YAAAC,cAAAC,KAAAc,QAAAZ,QAAA,GAAAW,SAAAH;EAWFC,EAAA,KAAAD;EAAAC,EAAA,KAAAnB;EAAAmB,EAAA,KAAAlB;EAAAkB,EAAA,KAAAd;EAAAc,EAAA,KAAAE;EAAAF,EAAA,KAAAb;EAAAa,EAAA,KAAAZ;EAAAY,EAAA,KAAAX;EAAAW,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,E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,QAAAP,mBAAAO,EAAA,QAAAQ,YAAAR,EAAA,QAAAb,cAAAa,EAAA,QAAAN,YAAAM,EAAA,QAAAhB,SAAAgB,EAAA,QAAAS,OAAAT,EAAA,QAAAU,OAAAU,YAAApB,EAAA,QAAAe,MAAAf,EAAA,QAAAiB,MAAAjB,EAAA,QAAAkB,IAAA;EADrCC,KAAA,oBAACyB,cAAD;GAAkCnD;GAA6Be,YAAAA;GAAsBrB;GAAsBO;GAAee;GAAa,QAAAM;GAAmD,GAAMC;GAAe,GAAMhC;GAAK,GAAMiC;GAClOC,UAAAA;EADkB,CAAA;EAEHlB,EAAA,MAAAP;EAAAO,EAAA,MAAAQ;EAAAR,EAAA,MAAAb;EAAAa,EAAA,MAAAN;EAAAM,EAAA,MAAAhB;EAAAgB,EAAA,MAAAS;EAAAT,EAAA,MAAAU,OAAAU;EAAApB,EAAA,MAAAe;EAAAf,EAAA,MAAAiB;EAAAjB,EAAA,MAAAkB;EAAAlB,EAAA,MAAAmB;CAAA,OAAAA,KAAAnB,EAAA;CAAA,OAFbmB;AAEa;AAKtB,SAASuB,cAAc7D,UAAqBwC,SAAoB;CAC9D,aAAa,qBAAA,UAAA,EAAA,UAAA,CACRxC,UACAwC,OACH,EAAA,CAAA;AACJ;AAOA,SAASoB,aAAatC,QAAkE;CACtF,IAAIA,WAAWE,KAAAA,GACb;CAEF,QAAQrB,OAAOD,UAAUoB,OAAOnB,OAAO;EACrC,GAAGD;EACHS,WAAW;CACb,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["stylex","buttonBaseStyles","label","k1xSpc","$$css","labelPending","k33iCy","pending","kGNEyG","kpwlN0","kjj79g","kVAEAm"],"sources":["../../src/button/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\n// What ButtonBase draws inside every button, whatever the component's own\n// container: the label, held in place while the button is pending, and the\n// ring over it. Apart from ./index.tsx so that file exports components alone,\n// which is what keeps fast refresh working for it.\nconst buttonBaseStyles = {\n label: {\n k1xSpc: \"xjp7ctv\",\n $$css: true\n },\n labelPending: {\n k33iCy: \"xlshs6z\",\n $$css: true\n },\n pending: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kpwlN0: \"x10a8y8t\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n }\n};\nexport { buttonBaseStyles };"],"mappings":";AAMA,MAAMC,mBAAmB;CACvBC,OAAO;EACLC,QAAQ;EACRC,OAAO;CACT;CACAC,cAAc;EACZC,QAAQ;EACRF,OAAO;CACT;CACAG,SAAS;EACPC,QAAQ;EACRL,QAAQ;EACRM,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"styles.js","names":["buttonBaseStyles","label","k1xSpc","$$css","labelPending","k33iCy","pending","kGNEyG","kpwlN0","kjj79g","kVAEAm"],"sources":["../../src/button/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\n// What ButtonBase draws inside every button, whatever the component's own\n// container: the label, held in place while the button is pending, and the\n// ring over it. Apart from ./index.tsx so that file exports components alone,\n// which is what keeps fast refresh working for it.\nconst buttonBaseStyles = {\n label: {\n k1xSpc: \"xjp7ctv\",\n $$css: true\n },\n labelPending: {\n k33iCy: \"xlshs6z\",\n $$css: true\n },\n pending: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kpwlN0: \"x10a8y8t\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n }\n};\nexport { buttonBaseStyles };"],"mappings":";AAMA,MAAMA,mBAAmB;CACvBC,OAAO;EACLC,QAAQ;EACRC,OAAO;CACT;CACAC,cAAc;EACZC,QAAQ;EACRF,OAAO;CACT;CACAG,SAAS;EACPC,QAAQ;EACRL,QAAQ;EACRM,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,OAAO;CACT;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.js","names":["ButtonDOMProps","PressHandler","NonNullable","pressThen","onPress","then","event","Parameters"],"sources":["../../src/button/toggle.ts"],"sourcesContent":["import type { ButtonDOMProps } from '.'\n\ntype PressHandler = NonNullable<ButtonDOMProps['onPress']>\n\n/**\n * A toggle's press: the call site's own `onPress` first, then the change of\n * state, which is the order React Aria's own toggle reports them in. Built by\n * a call rather than written inline at the prop, which is what react-perf's\n * no-new-function-as-prop is after.\n */\nfunction pressThen(onPress: PressHandler | undefined, then: () => void) {\n return (...event: Parameters<PressHandler>) => {\n onPress?.(...event)\n then()\n }\n}\n\nexport { pressThen }\n"],"mappings":";;;;;;;AAUA,SAASG,UAAUC,SAAmCC,MAAkB;CACtE,QAAQ,GAAGC,UAAoC;EAC7CF,UAAU,GAAGE,KAAK;EAClBD,KAAK;CACP;AACF"}
1
+ {"version":3,"file":"toggle.js","names":["pressThen","onPress","then","event"],"sources":["../../src/button/toggle.ts"],"sourcesContent":["import type { ButtonDOMProps } from '.'\n\ntype PressHandler = NonNullable<ButtonDOMProps['onPress']>\n\n/**\n * A toggle's press: the call site's own `onPress` first, then the change of\n * state, which is the order React Aria's own toggle reports them in. Built by\n * a call rather than written inline at the prop, which is what react-perf's\n * no-new-function-as-prop is after.\n */\nfunction pressThen(onPress: PressHandler | undefined, then: () => void) {\n return (...event: Parameters<PressHandler>) => {\n onPress?.(...event)\n then()\n }\n}\n\nexport { pressThen }\n"],"mappings":";;;;;;;AAUA,SAASA,UAAUC,SAAmCC,MAAkB;CACtE,QAAQ,GAAGC,UAAoC;EAC7CF,UAAU,GAAGE,KAAK;EAClBD,KAAK;CACP;AACF"}
@@ -2,12 +2,14 @@ import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
2
2
  import { ArrowDropDownGlyph, CheckGlyph, ChevronEndGlyph } from "../glyphs/index.js";
3
3
  import { focus } from "../styles/focus.js";
4
4
  import { iconButton } from "../styles/icon-button.js";
5
+ import { monthOffsets } from "./months.js";
5
6
  import { calendarStyles, dateLayers, menuLayers } from "./styles.js";
6
7
  import { c } from "react/compiler-runtime";
7
8
  import { useContext, useId, useRef, useState } from "react";
8
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
- import { Button, ButtonContext, CalendarGridHeader, CalendarHeaderCell, CalendarMonthPicker, CalendarStateContext, CalendarYearPicker, Heading, ListBox, ListBoxItem, RangeCalendarStateContext } from "react-aria-components";
10
+ import { Button, ButtonContext, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeaderCell, CalendarMonthPicker, CalendarStateContext, CalendarYearPicker, Heading, ListBox, ListBoxItem, RangeCalendarStateContext } from "react-aria-components";
10
11
  import { endOfMonth, startOfMonth } from "@internationalized/date";
12
+ import { useDateFormatter } from "react-aria";
11
13
  // src/calendar/index.tsx
12
14
  const LISTED_YEARS = 201;
13
15
  /**
@@ -350,6 +352,75 @@ function CalendarMenus(t0) {
350
352
  return t22;
351
353
  }
352
354
  /**
355
+ * The month grids, one per visible month, each with the weekday row over
356
+ * its dates. React Aria positions each grid from its own offset, so
357
+ * `visibleDuration` of more than one draws the months side by side rather
358
+ * than one grid that scrolls between them, and stacks them below the
359
+ * expanded breakpoint. Stacked, each month is named over its grid by
360
+ * `MonthCaption`, since the heading above them all names the range as a
361
+ * whole; see `monthCaption` in ./styles.ts.
362
+ *
363
+ * The date's cell is the one thing the two calendars draw differently, so it
364
+ * is the child.
365
+ */
366
+ function _temp3(entry_0) {
367
+ return entry_0.id;
368
+ }
369
+ function _temp2(current_0) {
370
+ return current_0 === "year" ? null : "year";
371
+ }
372
+ function _temp(current) {
373
+ return current === "month" ? null : "month";
374
+ }
375
+ function CalendarMonths(t0) {
376
+ const $ = c(12);
377
+ const { children, months } = t0;
378
+ let t1;
379
+ let t2;
380
+ if ($[0] !== children || $[1] !== months) {
381
+ const offsets = monthOffsets(months);
382
+ const isStackable = offsets.length > 1;
383
+ if ($[4] !== isStackable) {
384
+ t1 = props(calendarStyles.months, isStackable && calendarStyles.monthsStacked);
385
+ $[4] = isStackable;
386
+ $[5] = t1;
387
+ } else t1 = $[5];
388
+ let t3;
389
+ if ($[6] !== children || $[7] !== isStackable) {
390
+ t3 = (offset) => /* @__PURE__ */ jsxs("div", {
391
+ ...props(calendarStyles.month),
392
+ children: [isStackable ? /* @__PURE__ */ jsx(MonthCaption, { offset }) : null, /* @__PURE__ */ jsxs(CalendarGrid, {
393
+ offset,
394
+ ...props(calendarStyles.grid),
395
+ children: [/* @__PURE__ */ jsx(CalendarGridHeader$1, {}), /* @__PURE__ */ jsx(CalendarGridBody, { children })]
396
+ })]
397
+ }, offset.months);
398
+ $[6] = children;
399
+ $[7] = isStackable;
400
+ $[8] = t3;
401
+ } else t3 = $[8];
402
+ t2 = offsets.map(t3);
403
+ $[0] = children;
404
+ $[1] = months;
405
+ $[2] = t1;
406
+ $[3] = t2;
407
+ } else {
408
+ t1 = $[2];
409
+ t2 = $[3];
410
+ }
411
+ let t3;
412
+ if ($[9] !== t1 || $[10] !== t2) {
413
+ t3 = /* @__PURE__ */ jsx("div", {
414
+ ...t1,
415
+ children: t2
416
+ });
417
+ $[9] = t1;
418
+ $[10] = t2;
419
+ $[11] = t3;
420
+ } else t3 = $[11];
421
+ return t3;
422
+ }
423
+ /**
353
424
  * Scrolls an open list so its checked entry sits in the middle, as the page
354
425
  * draws it, with the entries either side of it in view. React Aria scrolls
355
426
  * the entry it focuses only as far as the nearest edge, which left the year
@@ -365,15 +436,6 @@ function CalendarMenus(t0) {
365
436
  * list — React Aria renders its entries once out of the document to collect
366
437
  * them — finds no list and does nothing.
367
438
  */
368
- function _temp3(entry_0) {
369
- return entry_0.id;
370
- }
371
- function _temp2(current_0) {
372
- return current_0 === "year" ? null : "year";
373
- }
374
- function _temp(current) {
375
- return current === "month" ? null : "month";
376
- }
377
439
  function centreInList(check) {
378
440
  const entry = check?.closest("[role=\"option\"]");
379
441
  const list = check?.closest("[role=\"listbox\"]");
@@ -577,6 +639,52 @@ function MenuList(t0) {
577
639
  } else t6 = $[12];
578
640
  return t6;
579
641
  }
580
- export { CalendarFrame, CalendarGridHeader$1 as CalendarGridHeader };
642
+ /**
643
+ * The name of the month a grid shows, over the grid, for a calendar drawing
644
+ * more than one. It is formatted as React Aria names the grid itself — the
645
+ * month in full and the year, in the calendar system and time zone the
646
+ * calendar runs in, with the era where a Gregorian date falls before the
647
+ * common one — so the two say the same thing.
648
+ *
649
+ * Hidden from assistive technology, which hears the same name already: React
650
+ * Aria labels every grid with the calendar's name and its own month.
651
+ */
652
+ function MonthCaption(t0) {
653
+ const $ = c(4);
654
+ const { offset } = t0;
655
+ const single = useContext(CalendarStateContext);
656
+ const range = useContext(RangeCalendarStateContext);
657
+ const state = single ?? range;
658
+ const start = state?.visibleRange.start.add(offset);
659
+ const formatter = useDateFormatter({
660
+ calendar: start?.calendar.identifier,
661
+ era: start?.calendar.identifier === "gregory" && start.era === "BC" ? "short" : void 0,
662
+ month: "long",
663
+ timeZone: state?.timeZone,
664
+ year: "numeric"
665
+ });
666
+ if (state == null || start == null) return null;
667
+ const month = start.calendar.getFormattableMonth?.(start) ?? start;
668
+ const t1 = true;
669
+ let t2;
670
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
671
+ t2 = props(calendarStyles.monthCaption);
672
+ $[0] = t2;
673
+ } else t2 = $[0];
674
+ const t3 = formatter.format(month.toDate(state.timeZone));
675
+ let t4;
676
+ if ($[1] !== t2 || $[2] !== t3) {
677
+ t4 = /* @__PURE__ */ jsx("div", {
678
+ "aria-hidden": t1,
679
+ ...t2,
680
+ children: t3
681
+ });
682
+ $[1] = t2;
683
+ $[2] = t3;
684
+ $[3] = t4;
685
+ } else t4 = $[3];
686
+ return t4;
687
+ }
688
+ export { CalendarFrame, CalendarMonths };
581
689
 
582
690
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["CalendarDate","ReactElement","ReactNode","Ref","Key","Selection","endOfMonth","startOfMonth","stylex","useCallback","useContext","useId","useMemo","useRef","useState","ButtonContext","CalendarStateContext","Button","RACButton","CalendarGridHeader","RACCalendarGridHeader","CalendarHeaderCell","RACCalendarHeaderCell","CalendarMonthPicker","RACCalendarMonthPicker","CalendarYearPicker","RACCalendarYearPicker","Heading","RACHeading","ListBox","RACListBox","ListBoxItem","RACListBoxItem","RangeCalendarStateContext","ArrowDropDownGlyph","CheckGlyph","ChevronEndGlyph","focus","iconButton","calendarStyles","dateLayers","menuLayers","MenuEntry","date","formatted","id","MenuPicker","items","onChange","key","value","OpenMenu","LISTED_YEARS","CalendarFrame","t0","$","_c","children","months","showMonthYearMenus","t1","Symbol","for","t2","single","range","isDisabled","disabledHeaderCell","calendarHeaderCell","CalendarHeader","props","header","chevronClassName","chevronGlyph","chevronGlyphPrevious","heading","t3","day","headerCell","CalendarMenus","state","open","setOpen","listId","monthButton","yearButton","button","requestAnimationFrame","current","close","_temp","toggleMonth","_temp2","toggleYear","t4","picker","filter","entry","maxValue","compare","minValue","map","_temp3","outsideBounds","t5","t6","headerGroup","t7","t8","chevronClassNameWhile","t9","t10","t11","picker_0","t12","t13","t14","t15","t16","t17","picker_1","t18","t19","t20","picker_2","t21","picker_3","t22","entry_0","current_0","centreInList","check","SVGSVGElement","closest","list","HTMLElement","scrollTop","getBoundingClientRect","top","clientHeight","offsetHeight","isHovered","isPressed","isHidden","chrome","chevron","ring","chromeHovered","chromePressed","chromeDisabled","chevronHidden","className","isListOpen","headerCellDisabled","MenuButton","controls","isExpanded","onPress","ref","valueId","nameId","find","shown","undefined","menuArrow","menuArrowExpanded","menuButtonClassName","menuButton","menuEntry","menuItemClassName","menuEntryContent","label","isSelected","menuCheck","isFocusVisible","menuItem","menuItemSelected","selectedHovered","plainHovered","selectedPressed","plainPressed","menuItemFocused","menuItemDisabled","MenuList","disabledKeys","onClose","selected","keys","choose","menuList","_c","CalendarGridHeader","RACCalendarGridHeader","stylex.props","RACButton","RACHeading","RACCalendarMonthPicker","RACCalendarYearPicker","RACCalendarHeaderCell","RACListBoxItem","RACListBox"],"sources":["../../src/calendar/index.tsx"],"sourcesContent":["import type { CalendarDate } from '@internationalized/date';\nimport type { ReactElement, ReactNode, Ref } from 'react';\nimport type { Key, Selection } from 'react-aria-components';\nimport { endOfMonth, startOfMonth } from '@internationalized/date';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useContext, useId, useMemo, useRef, useState } from 'react';\nimport { ButtonContext, CalendarStateContext, Button as RACButton, CalendarGridHeader as RACCalendarGridHeader, CalendarHeaderCell as RACCalendarHeaderCell, CalendarMonthPicker as RACCalendarMonthPicker, CalendarYearPicker as RACCalendarYearPicker, Heading as RACHeading, ListBox as RACListBox, ListBoxItem as RACListBoxItem, RangeCalendarStateContext } from 'react-aria-components';\nimport { ArrowDropDownGlyph, CheckGlyph, ChevronEndGlyph } from '../glyphs';\nimport { focus } from '../styles/focus';\nimport { iconButton } from '../styles/icon-button';\nimport { calendarStyles, dateLayers, menuLayers } from './styles';\n\n// The parts Calendar and RangeCalendar both render: the row that moves the\n// month, the weekday header, and the offsets that put more than one month\n// side by side. Apart from either component so the two cannot drift, and\n// outside `src/components` for the reason ./styles.ts gives.\n\n/** One entry of React Aria's month or year picker, as either lists it. */\ntype MenuEntry = {\n date: CalendarDate;\n formatted: string;\n id: number;\n};\n\n/** What React Aria's month and year pickers hand the element they render. */\ntype MenuPicker = {\n 'aria-label': string;\n items: MenuEntry[];\n onChange: (key: Key | null) => void;\n value: Key;\n};\ntype OpenMenu = 'month' | 'year';\n\n// How many years the open year list holds: a century either side of the year\n// shown, and that year. Material Design's own list scrolls a whole range of\n// years rather than a window that moves with each choice, and Compose's\n// default range is two centuries. Bounds cut it short where they fall inside.\nconst LISTED_YEARS = 201;\n\n/**\n * What a calendar draws above its months, and the months themselves. With\n * `showMonthYearMenus` the header is the date pickers page's docked one —\n * the month and the year as menu buttons — and while either is open its list\n * takes the months' place.\n *\n * The menus are for one visible month. They name and pick the first month\n * alone, so a second grid beside it would have no visible month or year of\n * its own; with more than one month the header is the plain one, whose\n * heading names the whole range, both years included where it spans two.\n */\nfunction CalendarFrame({\n children,\n months,\n showMonthYearMenus\n}: {\n children: ReactNode;\n /** How many months the calendar shows side by side. */\n months: number;\n showMonthYearMenus: boolean;\n}): ReactElement {\n if (showMonthYearMenus && months <= 1) {\n return <CalendarMenus>{children}</CalendarMenus>;\n }\n return <>\n <CalendarHeader />\n {children}\n </>;\n}\n\n/**\n * The weekday row, faded with the rest of a calendar that is disabled. The\n * state comes from React Aria's context rather than a prop, so the two\n * calendars draw it the same way without either passing anything down.\n *\n * The narrow letters are for the eye alone. React Aria hides the row from\n * assistive technology, since every date's name opens with its weekday in\n * full, so a letter that two days share is never read out.\n */\nfunction CalendarGridHeader(): ReactElement {\n const single = useContext(CalendarStateContext);\n const range = useContext(RangeCalendarStateContext);\n const isDisabled = (single ?? range)?.isDisabled ?? false;\n return <RACCalendarGridHeader>\n {isDisabled ? disabledHeaderCell : calendarHeaderCell}\n </RACCalendarGridHeader>;\n}\n\n/**\n * The two chevrons with the month between them. React Aria wires\n * `slot=\"previous\"` and `slot=\"next\"` on its own `Button`, and `IconButton`\n * renders React Aria's `Button` too — so nesting one inside a slot would put\n * two buttons where the date pickers page draws one. The chevrons take the\n * icon buttons page's 40dp square and its state layer instead.\n *\n * A plain element rather than a `<header>`: a header is a banner landmark,\n * landmarks may not nest, and React Aria puts a calendar in\n * `role=\"application\"` — axe fails the page on it.\n *\n * React Aria hides the heading between the chevrons from assistive\n * technology. The one a reader reaches is React Aria's own, out of sight,\n * naming the calendar's label with the month, so a calendar adds one heading\n * to the page's outline rather than two.\n */\nfunction CalendarHeader(): ReactElement {\n return <div {...stylex.props(calendarStyles.header)}>\n <RACButton className={chevronClassName} slot=\"previous\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph, calendarStyles.chevronGlyphPrevious)} />\n </RACButton>\n <RACHeading {...stylex.props(calendarStyles.heading)} />\n <RACButton className={chevronClassName} slot=\"next\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph)} />\n </RACButton>\n </div>;\n}\n\n/** The weekday row, in the type the page gives both it and the dates. */\nfunction calendarHeaderCell(day: string): ReactElement {\n return headerCell(day, false);\n}\n\n/**\n * The docked header: the month's menu button between the chevrons that step\n * it, and the year's menu button at the end. A press opens the button's list\n * in the months' place, where the page draws it, rather than in a popover over\n * them; a calendar inside a picker is already in one. While a list is open\n * the chevrons are hidden and the other menu is disabled, as the page draws\n * them, and choosing an entry — or pressing the one already checked, or\n * Escape — closes the list and puts focus back on its button.\n *\n * The lists are React Aria's month and year pickers, rendered twice: the\n * header names the month short, as the page's button does, and the list in\n * full. The year list runs a century either side of the year shown — React\n * Aria's own default is ten, which took several passes through the list to\n * reach a date of birth — and `minValue` and `maxValue` cut it short, which\n * React Aria does itself. A month with no day inside them is disabled here.\n */\nfunction CalendarMenus({\n children\n}: {\n children: ReactNode;\n}): ReactElement {\n const single = useContext(CalendarStateContext);\n const range = useContext(RangeCalendarStateContext);\n const state = single ?? range;\n const [open, setOpen] = useState<null | OpenMenu>(null);\n const listId = useId();\n const monthButton = useRef<HTMLButtonElement>(null);\n const yearButton = useRef<HTMLButtonElement>(null);\n\n // A frame after the choice, and focus back on the button before the list\n // goes, rather than lost with it. The key that chose still has a keypress\n // to deliver: React Aria leaves Enter's default alone on a Mac, and with\n // focus already moved the keypress pressed the menu button and opened the\n // list again. A frame later it has landed on the list instead, as the\n // click after a pointer's choice has.\n const close = useCallback(() => {\n const button = open === 'month' ? monthButton : yearButton;\n requestAnimationFrame(() => {\n button.current?.focus();\n setOpen(null);\n });\n }, [open]);\n const toggleMonth = useCallback(() => {\n setOpen(current => current === 'month' ? null : 'month');\n }, []);\n const toggleYear = useCallback(() => {\n setOpen(current => current === 'year' ? null : 'year');\n }, []);\n const isDisabled = state?.isDisabled ?? false;\n const outsideBounds = (picker: MenuPicker) => picker.items.filter(entry => state?.maxValue != null && startOfMonth(entry.date).compare(state.maxValue) > 0 || state?.minValue != null && endOfMonth(entry.date).compare(state.minValue) < 0).map(entry => entry.id);\n return <>\n <div {...stylex.props(calendarStyles.header)}>\n <div {...stylex.props(calendarStyles.headerGroup)}>\n <RACButton className={chevronClassNameWhile(open !== null)} slot=\"previous\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph, calendarStyles.chevronGlyphPrevious)} />\n </RACButton>\n <RACCalendarMonthPicker>\n {picker => <MenuButton controls={listId} isDisabled={isDisabled || open === 'year'} isExpanded={open === 'month'} onPress={toggleMonth} picker={picker} ref={monthButton} />}\n </RACCalendarMonthPicker>\n <RACButton className={chevronClassNameWhile(open !== null)} slot=\"next\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph)} />\n </RACButton>\n </div>\n <RACCalendarYearPicker>\n {picker => <MenuButton controls={listId} isDisabled={isDisabled || open === 'month'} isExpanded={open === 'year'} onPress={toggleYear} picker={picker} ref={yearButton} />}\n </RACCalendarYearPicker>\n </div>\n {open === null ? children : null}\n {open === 'month' ? <RACCalendarMonthPicker format=\"long\">\n {picker => <MenuList disabledKeys={outsideBounds(picker)} id={listId} onClose={close} picker={picker} />}\n </RACCalendarMonthPicker> : null}\n {open === 'year' ? <RACCalendarYearPicker visibleYears={LISTED_YEARS}>\n {picker => <MenuList id={listId} onClose={close} picker={picker} />}\n </RACCalendarYearPicker> : null}\n </>;\n}\n\n/**\n * Scrolls an open list so its checked entry sits in the middle, as the page\n * draws it, with the entries either side of it in view. React Aria scrolls\n * the entry it focuses only as far as the nearest edge, which left the year\n * shown at the bottom with every later year out of sight; with it already\n * centred, that scroll has nothing to do.\n *\n * A ref on the checked entry's check rather than an effect on the list,\n * because React Aria builds its entries in a render of its own, after the\n * list's effects have run: the ref is called as the entry is attached,\n * before the first paint, so the list never draws a frame at its top and\n * then jumps. The list's own scroll alone moves, where `scrollIntoView` would\n * move the page around it too. A check rendered anywhere but an attached\n * list — React Aria renders its entries once out of the document to collect\n * them — finds no list and does nothing.\n */\nfunction centreInList(check: null | SVGSVGElement) {\n const entry = check?.closest('[role=\"option\"]');\n const list = check?.closest('[role=\"listbox\"]');\n if (!(entry instanceof HTMLElement) || !(list instanceof HTMLElement)) {\n return;\n }\n list.scrollTop += entry.getBoundingClientRect().top - list.getBoundingClientRect().top - (list.clientHeight - entry.offsetHeight) / 2;\n}\n\n// A chevron's classes, from React Aria's own render state. React Aria\n// disables one when the month it would move to is outside `minValue` and\n// `maxValue`, or the whole calendar is disabled, and a press on it then does\n// nothing — so it takes the shared fade, which drops the state layer too.\nfunction chevronClassName(state: {\n isDisabled: boolean;\n isHovered: boolean;\n isPressed: boolean;\n}, isHidden = false) {\n return stylex.props(iconButton.chrome, calendarStyles.chevron, focus.ring, state.isHovered && iconButton.chromeHovered, state.isPressed && iconButton.chromePressed, state.isDisabled && iconButton.chromeDisabled, isHidden && calendarStyles.chevronHidden).className ?? '';\n}\n\n// The same, hidden while a month or year list is open.\nfunction chevronClassNameWhile(isListOpen: boolean) {\n return (state: {\n isDisabled: boolean;\n isHovered: boolean;\n isPressed: boolean;\n }) => chevronClassName(state, isListOpen);\n}\n\n// A weekday in a disabled calendar, at the fade its dates take.\nfunction disabledHeaderCell(day: string): ReactElement {\n return headerCell(day, true);\n}\nfunction headerCell(day: string, isDisabled: boolean): ReactElement {\n return <RACCalendarHeaderCell {...stylex.props(calendarStyles.headerCell, isDisabled && calendarStyles.headerCellDisabled)}>\n {day}\n </RACCalendarHeaderCell>;\n}\n\n/**\n * The month or the year as the page's menu button, opening its list. Named\n * by what it shows and then by what it is — \"Sep month\" — which keeps the\n * visible text the start of the name, so a reader who says what they see\n * reaches it.\n *\n * Outside React Aria's button context, which a calendar fills with its\n * `previous` and `next` slots alone: a button with no slot inside it is an\n * error, and these are not either chevron.\n */\nfunction MenuButton({\n controls,\n isDisabled,\n isExpanded,\n onPress,\n picker,\n ref\n}: {\n controls: string;\n isDisabled: boolean;\n isExpanded: boolean;\n onPress: () => void;\n picker: MenuPicker;\n ref: Ref<HTMLButtonElement>;\n}): ReactElement {\n const valueId = useId();\n const nameId = useId();\n const shown = picker.items.find(entry => entry.id === picker.value);\n return <ButtonContext value={null}>\n <RACButton aria-controls={isExpanded ? controls : undefined} aria-expanded={isExpanded} aria-haspopup=\"listbox\" aria-labelledby={`${valueId} ${nameId}`} className={menuButtonClassName} isDisabled={isDisabled} onPress={onPress} ref={ref}>\n <span id={valueId}>{shown?.formatted}</span>\n <span hidden id={nameId}>\n {picker['aria-label']}\n </span>\n <ArrowDropDownGlyph {...stylex.props(calendarStyles.menuArrow, isExpanded && calendarStyles.menuArrowExpanded)} />\n </RACButton>\n </ButtonContext>;\n}\n\n// A menu button's classes, from React Aria's render state, with the icon\n// buttons' state layers and fade — see `menuButton`.\nfunction menuButtonClassName(state: {\n isDisabled: boolean;\n isHovered: boolean;\n isPressed: boolean;\n}) {\n return stylex.props(calendarStyles.menuButton, focus.ring, state.isHovered && iconButton.chromeHovered, state.isPressed && iconButton.chromePressed, state.isDisabled && iconButton.chromeDisabled).className ?? '';\n}\n\n// One row of an open list: the check where the row is the one shown, the\n// room it takes where it is not, then the month or the year. 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.\nfunction menuEntry(entry: MenuEntry): ReactElement {\n return <RACListBoxItem className={menuItemClassName} id={entry.id} textValue={entry.formatted}>\n {menuEntryContent(entry.formatted)}\n </RACListBoxItem>;\n}\nfunction menuEntryContent(label: string) {\n return ({\n isSelected\n }: {\n isSelected: boolean;\n }) => <>\n {isSelected ? <CheckGlyph ref={centreInList} {...stylex.props(calendarStyles.menuCheck)} /> : <span {...stylex.props(calendarStyles.menuCheck)} />}\n {label}\n </>;\n}\n\n// A row's classes, from React Aria's render state. The layers come after the\n// checked row's surface variant, written for whichever ground the row has,\n// and the fade last, which StyleX lets drop them by replacing a property\n// whole.\nfunction menuItemClassName(state: {\n isDisabled: boolean;\n isFocusVisible: boolean;\n isHovered: boolean;\n isPressed: boolean;\n isSelected: boolean;\n}) {\n return stylex.props(calendarStyles.menuItem, state.isSelected && calendarStyles.menuItemSelected, state.isHovered && (state.isSelected ? menuLayers.selectedHovered : dateLayers.plainHovered), state.isPressed && (state.isSelected ? menuLayers.selectedPressed : dateLayers.plainPressed), state.isFocusVisible && calendarStyles.menuItemFocused, state.isDisabled && calendarStyles.menuItemDisabled).className ?? '';\n}\n\n/**\n * An open month or year list, in the months' place. React Aria's list box,\n * with the entry the calendar shows selected and focused when it opens.\n *\n * Choosing closes it, and so does pressing the checked entry or Escape. A\n * single selection that may empty is what tells those apart: choosing\n * replaces the selection, while the checked entry toggles it off and Escape\n * clears it — and the clearing is what stops Escape there rather than letting\n * it close a picker's dialog around the calendar.\n */\nfunction MenuList({\n disabledKeys,\n id,\n onClose,\n picker\n}: {\n disabledKeys?: Key[];\n id: string;\n onClose: () => void;\n picker: MenuPicker;\n}): ReactElement {\n const selected = useMemo(() => [picker.value], [picker.value]);\n const choose = useCallback((keys: Selection) => {\n // The one entry a single selection holds after a choice, and none\n // after the checked entry is pressed again or Escape clears it.\n if (keys !== 'all') {\n for (const key of keys) {\n picker.onChange(key);\n }\n }\n onClose();\n }, [onClose, picker]);\n return <RACListBox aria-label={picker['aria-label']}\n // oxlint-disable-next-line jsx-a11y/no-autofocus -- a list opened from its button takes focus, as a select's does\n autoFocus disabledKeys={disabledKeys} id={id} items={picker.items} onSelectionChange={choose} selectedKeys={selected} selectionMode=\"single\"\n // On the release rather than the press, so the pointer is done with the\n // list before it closes: chosen on the press, the release landed on\n // whatever the closing list uncovered beneath it.\n shouldSelectOnPressUp {...stylex.props(calendarStyles.menuList)}>\n {menuEntry}\n </RACListBox>;\n}\nexport { CalendarFrame, CalendarGridHeader };"],"mappings":";;;;;;;;;;;AAqCA,MAAMoD,eAAe;;;;;;;;;;;;AAarB,SAAAC,cAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAuB,MAAA,EAAAC,UAAAC,QAAAC,uBAAAL;CAUrB,IAAIK,sBAAsBD,UAAU,GAAC;E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useContext","useId","useRef","useState","useDateFormatter","CalendarStateContext","CalendarGridHeader","RangeCalendarStateContext","focus","iconButton","monthOffsets","calendarStyles","dateLayers","menuLayers","date","formatted","id","items","onChange","key","value","LISTED_YEARS","CalendarFrame","t0","$","_c","children","months","showMonthYearMenus","t1","Symbol","for","t2","single","range","isDisabled","disabledHeaderCell","calendarHeaderCell","CalendarHeader","header","chevronClassName","chevronGlyph","chevronGlyphPrevious","heading","t3","day","headerCell","CalendarMenus","state","open","setOpen","listId","monthButton","yearButton","button","requestAnimationFrame","current","close","_temp","toggleMonth","_temp2","toggleYear","t4","picker","filter","entry","maxValue","compare","minValue","map","_temp3","outsideBounds","t5","t6","headerGroup","t7","t8","chevronClassNameWhile","t9","t10","t11","picker_0","t12","t13","t14","t15","t16","t17","picker_1","t18","t19","t20","picker_2","t21","picker_3","t22","entry_0","current_0","CalendarMonths","offsets","isStackable","length","monthsStacked","offset","month","grid","centreInList","check","closest","list","HTMLElement","scrollTop","getBoundingClientRect","top","clientHeight","offsetHeight","isHovered","isPressed","isHidden","chrome","chevron","ring","chromeHovered","chromePressed","chromeDisabled","chevronHidden","className","isListOpen","headerCellDisabled","MenuButton","controls","isExpanded","onPress","ref","valueId","nameId","find","shown","undefined","menuArrow","menuArrowExpanded","menuButtonClassName","menuButton","menuEntry","menuItemClassName","menuEntryContent","label","isSelected","menuCheck","isFocusVisible","menuItem","menuItemSelected","selectedHovered","plainHovered","selectedPressed","plainPressed","menuItemFocused","menuItemDisabled","MenuList","disabledKeys","onClose","selected","keys","choose","menuList","MonthCaption","start","visibleRange","add","formatter","calendar","identifier","era","timeZone","year","getFormattableMonth","monthCaption","format","toDate","CalendarGridHeader","RACCalendarGridHeader","RACButton","RACHeading","RACCalendarMonthPicker","RACCalendarYearPicker","RACCalendarGrid","RACCalendarGridBody","RACCalendarHeaderCell","RACListBoxItem","RACListBox"],"sources":["../../src/calendar/index.tsx"],"sourcesContent":["import type { CalendarDate } from '@internationalized/date';\nimport type { ReactElement, ReactNode, Ref } from 'react';\nimport type { Key, Selection } from 'react-aria-components';\nimport { endOfMonth, startOfMonth } from '@internationalized/date';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useContext, useId, useMemo, useRef, useState } from 'react';\nimport { useDateFormatter } from 'react-aria';\nimport { ButtonContext, CalendarStateContext, Button as RACButton, CalendarGrid as RACCalendarGrid, CalendarGridBody as RACCalendarGridBody, CalendarGridHeader as RACCalendarGridHeader, CalendarHeaderCell as RACCalendarHeaderCell, CalendarMonthPicker as RACCalendarMonthPicker, CalendarYearPicker as RACCalendarYearPicker, Heading as RACHeading, ListBox as RACListBox, ListBoxItem as RACListBoxItem, RangeCalendarStateContext } from 'react-aria-components';\nimport { ArrowDropDownGlyph, CheckGlyph, ChevronEndGlyph } from '../glyphs';\nimport { focus } from '../styles/focus';\nimport { iconButton } from '../styles/icon-button';\nimport { monthOffsets } from './months';\nimport { calendarStyles, dateLayers, menuLayers } from './styles';\n\n// The parts Calendar and RangeCalendar both render: the row that moves the\n// month, the months themselves with their weekday header, and the name each\n// month takes while more than one stack. Apart from either component so the two cannot drift, and\n// outside `src/components` for the reason ./styles.ts gives.\n\n/** One entry of React Aria's month or year picker, as either lists it. */\ntype MenuEntry = {\n date: CalendarDate;\n formatted: string;\n id: number;\n};\n\n/** What React Aria's month and year pickers hand the element they render. */\ntype MenuPicker = {\n 'aria-label': string;\n items: MenuEntry[];\n onChange: (key: Key | null) => void;\n value: Key;\n};\ntype OpenMenu = 'month' | 'year';\n\n// How many years the open year list holds: a century either side of the year\n// shown, and that year. Material Design's own list scrolls a whole range of\n// years rather than a window that moves with each choice, and Compose's\n// default range is two centuries. Bounds cut it short where they fall inside.\nconst LISTED_YEARS = 201;\n\n/**\n * What a calendar draws above its months, and the months themselves. With\n * `showMonthYearMenus` the header is the date pickers page's docked one —\n * the month and the year as menu buttons — and while either is open its list\n * takes the months' place.\n *\n * The menus are for one visible month. They name and pick the first month\n * alone, so a second grid beside it would have no visible month or year of\n * its own; with more than one month the header is the plain one, whose\n * heading names the whole range, both years included where it spans two.\n */\nfunction CalendarFrame({\n children,\n months,\n showMonthYearMenus\n}: {\n children: ReactNode;\n /** How many months the calendar shows side by side. */\n months: number;\n showMonthYearMenus: boolean;\n}): ReactElement {\n if (showMonthYearMenus && months <= 1) {\n return <CalendarMenus>{children}</CalendarMenus>;\n }\n return <>\n <CalendarHeader />\n {children}\n </>;\n}\n\n/**\n * The weekday row, faded with the rest of a calendar that is disabled. The\n * state comes from React Aria's context rather than a prop, so the two\n * calendars draw it the same way without either passing anything down.\n *\n * The narrow letters are for the eye alone. React Aria hides the row from\n * assistive technology, since every date's name opens with its weekday in\n * full, so a letter that two days share is never read out.\n */\nfunction CalendarGridHeader(): ReactElement {\n const single = useContext(CalendarStateContext);\n const range = useContext(RangeCalendarStateContext);\n const isDisabled = (single ?? range)?.isDisabled ?? false;\n return <RACCalendarGridHeader>\n {isDisabled ? disabledHeaderCell : calendarHeaderCell}\n </RACCalendarGridHeader>;\n}\n\n/**\n * The two chevrons with the month between them. React Aria wires\n * `slot=\"previous\"` and `slot=\"next\"` on its own `Button`, and `IconButton`\n * renders React Aria's `Button` too — so nesting one inside a slot would put\n * two buttons where the date pickers page draws one. The chevrons take the\n * icon buttons page's 40dp square and its state layer instead.\n *\n * A plain element rather than a `<header>`: a header is a banner landmark,\n * landmarks may not nest, and React Aria puts a calendar in\n * `role=\"application\"` — axe fails the page on it.\n *\n * React Aria hides the heading between the chevrons from assistive\n * technology. The one a reader reaches is React Aria's own, out of sight,\n * naming the calendar's label with the month, so a calendar adds one heading\n * to the page's outline rather than two.\n */\nfunction CalendarHeader(): ReactElement {\n return <div {...stylex.props(calendarStyles.header)}>\n <RACButton className={chevronClassName} slot=\"previous\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph, calendarStyles.chevronGlyphPrevious)} />\n </RACButton>\n <RACHeading {...stylex.props(calendarStyles.heading)} />\n <RACButton className={chevronClassName} slot=\"next\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph)} />\n </RACButton>\n </div>;\n}\n\n/** The weekday row, in the type the page gives both it and the dates. */\nfunction calendarHeaderCell(day: string): ReactElement {\n return headerCell(day, false);\n}\n\n/**\n * The docked header: the month's menu button between the chevrons that step\n * it, and the year's menu button at the end. A press opens the button's list\n * in the months' place, where the page draws it, rather than in a popover over\n * them; a calendar inside a picker is already in one. While a list is open\n * the chevrons are hidden and the other menu is disabled, as the page draws\n * them, and choosing an entry — or pressing the one already checked, or\n * Escape — closes the list and puts focus back on its button.\n *\n * The lists are React Aria's month and year pickers, rendered twice: the\n * header names the month short, as the page's button does, and the list in\n * full. The year list runs a century either side of the year shown — React\n * Aria's own default is ten, which took several passes through the list to\n * reach a date of birth — and `minValue` and `maxValue` cut it short, which\n * React Aria does itself. A month with no day inside them is disabled here.\n */\nfunction CalendarMenus({\n children\n}: {\n children: ReactNode;\n}): ReactElement {\n const single = useContext(CalendarStateContext);\n const range = useContext(RangeCalendarStateContext);\n const state = single ?? range;\n const [open, setOpen] = useState<null | OpenMenu>(null);\n const listId = useId();\n const monthButton = useRef<HTMLButtonElement>(null);\n const yearButton = useRef<HTMLButtonElement>(null);\n\n // A frame after the choice, and focus back on the button before the list\n // goes, rather than lost with it. The key that chose still has a keypress\n // to deliver: React Aria leaves Enter's default alone on a Mac, and with\n // focus already moved the keypress pressed the menu button and opened the\n // list again. A frame later it has landed on the list instead, as the\n // click after a pointer's choice has.\n const close = useCallback(() => {\n const button = open === 'month' ? monthButton : yearButton;\n requestAnimationFrame(() => {\n button.current?.focus();\n setOpen(null);\n });\n }, [open]);\n const toggleMonth = useCallback(() => {\n setOpen(current => current === 'month' ? null : 'month');\n }, []);\n const toggleYear = useCallback(() => {\n setOpen(current => current === 'year' ? null : 'year');\n }, []);\n const isDisabled = state?.isDisabled ?? false;\n const outsideBounds = (picker: MenuPicker) => picker.items.filter(entry => state?.maxValue != null && startOfMonth(entry.date).compare(state.maxValue) > 0 || state?.minValue != null && endOfMonth(entry.date).compare(state.minValue) < 0).map(entry => entry.id);\n return <>\n <div {...stylex.props(calendarStyles.header)}>\n <div {...stylex.props(calendarStyles.headerGroup)}>\n <RACButton className={chevronClassNameWhile(open !== null)} slot=\"previous\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph, calendarStyles.chevronGlyphPrevious)} />\n </RACButton>\n <RACCalendarMonthPicker>\n {picker => <MenuButton controls={listId} isDisabled={isDisabled || open === 'year'} isExpanded={open === 'month'} onPress={toggleMonth} picker={picker} ref={monthButton} />}\n </RACCalendarMonthPicker>\n <RACButton className={chevronClassNameWhile(open !== null)} slot=\"next\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph)} />\n </RACButton>\n </div>\n <RACCalendarYearPicker>\n {picker => <MenuButton controls={listId} isDisabled={isDisabled || open === 'month'} isExpanded={open === 'year'} onPress={toggleYear} picker={picker} ref={yearButton} />}\n </RACCalendarYearPicker>\n </div>\n {open === null ? children : null}\n {open === 'month' ? <RACCalendarMonthPicker format=\"long\">\n {picker => <MenuList disabledKeys={outsideBounds(picker)} id={listId} onClose={close} picker={picker} />}\n </RACCalendarMonthPicker> : null}\n {open === 'year' ? <RACCalendarYearPicker visibleYears={LISTED_YEARS}>\n {picker => <MenuList id={listId} onClose={close} picker={picker} />}\n </RACCalendarYearPicker> : null}\n </>;\n}\n\n/**\n * The month grids, one per visible month, each with the weekday row over\n * its dates. React Aria positions each grid from its own offset, so\n * `visibleDuration` of more than one draws the months side by side rather\n * than one grid that scrolls between them, and stacks them below the\n * expanded breakpoint. Stacked, each month is named over its grid by\n * `MonthCaption`, since the heading above them all names the range as a\n * whole; see `monthCaption` in ./styles.ts.\n *\n * The date's cell is the one thing the two calendars draw differently, so it\n * is the child.\n */\nfunction CalendarMonths({\n children,\n months\n}: {\n /** The cell each date of every month renders in. */\n children: (date: CalendarDate) => ReactElement;\n /** How many months the calendar shows. */\n months: number;\n}): ReactElement {\n const offsets = monthOffsets(months);\n const isStackable = offsets.length > 1;\n return <div {...stylex.props(calendarStyles.months, isStackable && calendarStyles.monthsStacked)}>\n {offsets.map(offset => <div key={offset.months} {...stylex.props(calendarStyles.month)}>\n {isStackable ? <MonthCaption offset={offset} /> : null}\n <RACCalendarGrid offset={offset} {...stylex.props(calendarStyles.grid)}>\n <CalendarGridHeader />\n <RACCalendarGridBody>{children}</RACCalendarGridBody>\n </RACCalendarGrid>\n </div>)}\n </div>;\n}\n\n/**\n * Scrolls an open list so its checked entry sits in the middle, as the page\n * draws it, with the entries either side of it in view. React Aria scrolls\n * the entry it focuses only as far as the nearest edge, which left the year\n * shown at the bottom with every later year out of sight; with it already\n * centred, that scroll has nothing to do.\n *\n * A ref on the checked entry's check rather than an effect on the list,\n * because React Aria builds its entries in a render of its own, after the\n * list's effects have run: the ref is called as the entry is attached,\n * before the first paint, so the list never draws a frame at its top and\n * then jumps. The list's own scroll alone moves, where `scrollIntoView` would\n * move the page around it too. A check rendered anywhere but an attached\n * list — React Aria renders its entries once out of the document to collect\n * them — finds no list and does nothing.\n */\nfunction centreInList(check: null | SVGSVGElement) {\n const entry = check?.closest('[role=\"option\"]');\n const list = check?.closest('[role=\"listbox\"]');\n if (!(entry instanceof HTMLElement) || !(list instanceof HTMLElement)) {\n return;\n }\n list.scrollTop += entry.getBoundingClientRect().top - list.getBoundingClientRect().top - (list.clientHeight - entry.offsetHeight) / 2;\n}\n\n// A chevron's classes, from React Aria's own render state. React Aria\n// disables one when the month it would move to is outside `minValue` and\n// `maxValue`, or the whole calendar is disabled, and a press on it then does\n// nothing — so it takes the shared fade, which drops the state layer too.\nfunction chevronClassName(state: {\n isDisabled: boolean;\n isHovered: boolean;\n isPressed: boolean;\n}, isHidden = false) {\n return stylex.props(iconButton.chrome, calendarStyles.chevron, focus.ring, state.isHovered && iconButton.chromeHovered, state.isPressed && iconButton.chromePressed, state.isDisabled && iconButton.chromeDisabled, isHidden && calendarStyles.chevronHidden).className ?? '';\n}\n\n// The same, hidden while a month or year list is open.\nfunction chevronClassNameWhile(isListOpen: boolean) {\n return (state: {\n isDisabled: boolean;\n isHovered: boolean;\n isPressed: boolean;\n }) => chevronClassName(state, isListOpen);\n}\n\n// A weekday in a disabled calendar, at the fade its dates take.\nfunction disabledHeaderCell(day: string): ReactElement {\n return headerCell(day, true);\n}\nfunction headerCell(day: string, isDisabled: boolean): ReactElement {\n return <RACCalendarHeaderCell {...stylex.props(calendarStyles.headerCell, isDisabled && calendarStyles.headerCellDisabled)}>\n {day}\n </RACCalendarHeaderCell>;\n}\n\n/**\n * The month or the year as the page's menu button, opening its list. Named\n * by what it shows and then by what it is — \"Sep month\" — which keeps the\n * visible text the start of the name, so a reader who says what they see\n * reaches it.\n *\n * Outside React Aria's button context, which a calendar fills with its\n * `previous` and `next` slots alone: a button with no slot inside it is an\n * error, and these are not either chevron.\n */\nfunction MenuButton({\n controls,\n isDisabled,\n isExpanded,\n onPress,\n picker,\n ref\n}: {\n controls: string;\n isDisabled: boolean;\n isExpanded: boolean;\n onPress: () => void;\n picker: MenuPicker;\n ref: Ref<HTMLButtonElement>;\n}): ReactElement {\n const valueId = useId();\n const nameId = useId();\n const shown = picker.items.find(entry => entry.id === picker.value);\n return <ButtonContext value={null}>\n <RACButton aria-controls={isExpanded ? controls : undefined} aria-expanded={isExpanded} aria-haspopup=\"listbox\" aria-labelledby={`${valueId} ${nameId}`} className={menuButtonClassName} isDisabled={isDisabled} onPress={onPress} ref={ref}>\n <span id={valueId}>{shown?.formatted}</span>\n <span hidden id={nameId}>\n {picker['aria-label']}\n </span>\n <ArrowDropDownGlyph {...stylex.props(calendarStyles.menuArrow, isExpanded && calendarStyles.menuArrowExpanded)} />\n </RACButton>\n </ButtonContext>;\n}\n\n// A menu button's classes, from React Aria's render state, with the icon\n// buttons' state layers and fade — see `menuButton`.\nfunction menuButtonClassName(state: {\n isDisabled: boolean;\n isHovered: boolean;\n isPressed: boolean;\n}) {\n return stylex.props(calendarStyles.menuButton, focus.ring, state.isHovered && iconButton.chromeHovered, state.isPressed && iconButton.chromePressed, state.isDisabled && iconButton.chromeDisabled).className ?? '';\n}\n\n// One row of an open list: the check where the row is the one shown, the\n// room it takes where it is not, then the month or the year. 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.\nfunction menuEntry(entry: MenuEntry): ReactElement {\n return <RACListBoxItem className={menuItemClassName} id={entry.id} textValue={entry.formatted}>\n {menuEntryContent(entry.formatted)}\n </RACListBoxItem>;\n}\nfunction menuEntryContent(label: string) {\n return ({\n isSelected\n }: {\n isSelected: boolean;\n }) => <>\n {isSelected ? <CheckGlyph ref={centreInList} {...stylex.props(calendarStyles.menuCheck)} /> : <span {...stylex.props(calendarStyles.menuCheck)} />}\n {label}\n </>;\n}\n\n// A row's classes, from React Aria's render state. The layers come after the\n// checked row's surface variant, written for whichever ground the row has,\n// and the fade last, which StyleX lets drop them by replacing a property\n// whole.\nfunction menuItemClassName(state: {\n isDisabled: boolean;\n isFocusVisible: boolean;\n isHovered: boolean;\n isPressed: boolean;\n isSelected: boolean;\n}) {\n return stylex.props(calendarStyles.menuItem, state.isSelected && calendarStyles.menuItemSelected, state.isHovered && (state.isSelected ? menuLayers.selectedHovered : dateLayers.plainHovered), state.isPressed && (state.isSelected ? menuLayers.selectedPressed : dateLayers.plainPressed), state.isFocusVisible && calendarStyles.menuItemFocused, state.isDisabled && calendarStyles.menuItemDisabled).className ?? '';\n}\n\n/**\n * An open month or year list, in the months' place. React Aria's list box,\n * with the entry the calendar shows selected and focused when it opens.\n *\n * Choosing closes it, and so does pressing the checked entry or Escape. A\n * single selection that may empty is what tells those apart: choosing\n * replaces the selection, while the checked entry toggles it off and Escape\n * clears it — and the clearing is what stops Escape there rather than letting\n * it close a picker's dialog around the calendar.\n */\nfunction MenuList({\n disabledKeys,\n id,\n onClose,\n picker\n}: {\n disabledKeys?: Key[];\n id: string;\n onClose: () => void;\n picker: MenuPicker;\n}): ReactElement {\n const selected = useMemo(() => [picker.value], [picker.value]);\n const choose = useCallback((keys: Selection) => {\n // The one entry a single selection holds after a choice, and none\n // after the checked entry is pressed again or Escape clears it.\n if (keys !== 'all') {\n for (const key of keys) {\n picker.onChange(key);\n }\n }\n onClose();\n }, [onClose, picker]);\n return <RACListBox aria-label={picker['aria-label']}\n // oxlint-disable-next-line jsx-a11y/no-autofocus -- a list opened from its button takes focus, as a select's does\n autoFocus disabledKeys={disabledKeys} id={id} items={picker.items} onSelectionChange={choose} selectedKeys={selected} selectionMode=\"single\"\n // On the release rather than the press, so the pointer is done with the\n // list before it closes: chosen on the press, the release landed on\n // whatever the closing list uncovered beneath it.\n shouldSelectOnPressUp {...stylex.props(calendarStyles.menuList)}>\n {menuEntry}\n </RACListBox>;\n}\n\n/**\n * The name of the month a grid shows, over the grid, for a calendar drawing\n * more than one. It is formatted as React Aria names the grid itself — the\n * month in full and the year, in the calendar system and time zone the\n * calendar runs in, with the era where a Gregorian date falls before the\n * common one — so the two say the same thing.\n *\n * Hidden from assistive technology, which hears the same name already: React\n * Aria labels every grid with the calendar's name and its own month.\n */\nfunction MonthCaption({\n offset\n}: {\n offset: {\n months: number;\n };\n}): null | ReactElement {\n const single = useContext(CalendarStateContext);\n const range = useContext(RangeCalendarStateContext);\n const state = single ?? range;\n const start = state?.visibleRange.start.add(offset);\n const formatter = useDateFormatter({\n calendar: start?.calendar.identifier,\n era: start?.calendar.identifier === 'gregory' && start.era === 'BC' ? 'short' : undefined,\n month: 'long',\n timeZone: state?.timeZone,\n year: 'numeric'\n });\n if (state == null || start == null) {\n return null;\n }\n const month = start.calendar.getFormattableMonth?.(start) ?? start;\n return <div aria-hidden {...stylex.props(calendarStyles.monthCaption)}>\n {formatter.format(month.toDate(state.timeZone))}\n </div>;\n}\nexport { CalendarFrame, CalendarMonths };"],"mappings":";;;;;;;;;;;;;AAuCA,MAAMwB,eAAe;;;;;;;;;;;;AAarB,SAAAC,cAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAuB,MAAA,EAAAC,UAAAC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OAFDsC;AAEC"}
@@ -253,15 +253,33 @@ const calendarStyles = {
253
253
  ks0D6T: "x193iq5w",
254
254
  $$css: true
255
255
  },
256
+ monthCaption: {
257
+ kGNEyG: "xpqajaz",
258
+ kZKoxP: "xsdox4t",
259
+ kB7OPa: "x9f619",
260
+ kMwMTN: "x1w5n3ug",
261
+ k1xSpc: "x1s85apg x1dstske",
262
+ kMv6JI: "xrgwony",
263
+ kGuDYH: "x12s497w",
264
+ k63SB2: "x1szcwkt",
265
+ kb6lSQ: "xo803ec",
266
+ kLWn49: "xyl1r0q",
267
+ kGO01o: "xqf7pud",
268
+ kg3NbH: "x18fpw6u",
269
+ $$css: true
270
+ },
256
271
  months: {
257
272
  kGNEyG: "x7a106z",
258
273
  k1xSpc: "x78zum5 x1yrkhk",
259
274
  kOIVth: "xj2l1yv",
260
- kJBjZk: "x17udjhq",
261
275
  kumcoG: "x1kji8p3",
262
276
  kAzted: "x8chfrn",
263
277
  $$css: true
264
278
  },
279
+ monthsStacked: {
280
+ kAzted: "x8chfrn x1e8x83n",
281
+ $$css: true
282
+ },
265
283
  root: {
266
284
  kWkggS: "xvkjz1l",
267
285
  kaIpWk: "xhpdng0",