@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":["c","_c","ReactNode","RefAttributes","SliderProps","RACSliderProps","SliderState","SliderThumbRenderProps","SliderTrackRenderProps","stylex","Slider","RACSlider","SliderOutput","SliderThumb","SliderTrack","FieldLabel","groupStyles","mergeStatefulStyles","colors","motion","radii","spacing","stateLayerOpacity","typography","FORCED_COLORS","GAP","HANDLE_WIDTH","CLEAR","STOP","ICON_PADDING","SliderSize","sizes","lg","$$css","md","sm","xl","xs","styles","active","kWkggS","activeDisabled","activeHoldingIcon","k9g6sI","icon","kGNEyG","kZKoxP","kMwMTN","k1xSpc","kGuDYH","kzqmXN","k87sOh","kLqNvP","kjj79g","kVAEAm","iconDisabled","iconRoomBlock","iconRoomBlockXl","iconRoomInline","iconRoomInlineXl","iconVertical","krVfgx","inactiveDisabled","innerBlockEnd","kT0f0o","kVL7Gh","innerBlockStart","kfmiAY","krdFHd","innerInlineEnd","innerInlineStart","root","rootVertical","segment","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kB7OPa","kVQacm","segmentVertical","stop","stopActive","stopActiveDisabled","stopDisabled","stopEnd","kt4wiu","stopEndVertical","stopStart","stopStartVertical","stopVertical","thumb","k6CgDc","kkrTdU","kjBf7l","kInvED","k3XXqK","kMeerF","kIyJzY","k1ekBW","kAMwcw","thumbActive","thumbActiveVertical","thumbDisabled","thumbDragging","thumbFocused","thumbVertical","kbCHJM","_temp","_temp2","placements","block","start","end","val","undefined","inline","stopBlock","offset","stopInline","Extras","showStops","size","vertical","Inset","fraction","px","Part","name","Omit","label","orientation","thumbLabels","AT_END","after","before","iconRoom","insetIcon","isDisabled","room","props","insetOf","offsetIn","share","scale","partContent","part","extras","steps","hasIcon","from","to","length","inside","filter","place","atStart","atEnd","map","t0","$","T0","t1","t2","t3","t4","t5","t6","t7","t8","t9","state","0","className","2","1","3","trackContent","stepsOf","min","getThumbMinValue","max","getThumbMaxValue","values","fractions","step","index","push","getValuePercent","thumbContent","isDragging","isFocusVisible","getThumbValueLabel","thumbStyles","_","getThumbPercent","first","last","at","range","parts","const","innerStart","innerEnd","stylex.props","Slider","_c","props","RACSlider"],"sources":["../../../src/components/slider/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { SliderProps as RACSliderProps, SliderState, SliderThumbRenderProps, SliderTrackRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Slider as RACSlider, SliderOutput, SliderThumb, SliderTrack } from 'react-aria-components';\nimport { FieldLabel } from '../../field';\nimport { groupStyles } from '../../field/styles';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The sliders page. At the size its tokens call extra-small, the default: a\n// 16dp track with an 8dp corner, the active part in primary and the inactive\n// part in secondary container, a 4dp stop in on secondary container 6dp from\n// the inactive end, and a handle 4dp wide and 44dp tall in primary that\n// narrows to 2dp while pressed or focused. The track parts on each side of\n// the handle, with 6dp of space between them and it, and their corners\n// against the handle are 2dp where their outer ends are full. Disabled, the\n// active part and the handle are on surface at the disabled content opacity\n// and the inactive part at the disabled container opacity.\n//\n// `size` takes the page's four larger sizes, which thicken the track and\n// round its ends more, and lengthen the handle from M up:\n//\n// | Size | Track | Corner | Handle | Inset icon |\n// | ---- | ----- | ------ | ------ | ---------- |\n// | xs | 16dp | 8dp | 44dp | |\n// | sm | 24dp | 8dp | 44dp | |\n// | md | 40dp | 12dp | 52dp | 24dp |\n// | lg | 56dp | 16dp | 68dp | 24dp |\n// | xl | 96dp | 28dp | 108dp | 32dp |\n//\n// The handle stays 4dp wide, the corners against it 2dp and the space beside\n// it 6dp at every size.\n//\n// `showStops` is the page's stops configuration, which it used to call the\n// discrete slider: a 4dp stop at every step, in on primary on the active part\n// and on secondary container on the inactive one, so the reader can see\n// where the handle can land. The stops at the two ends sit 6dp in from them,\n// as the single stop does. A part clips what it holds, which is what hides\n// the stops beside the handle: the part ends 6dp short of it.\n//\n// `icon` is the page's inset icon, at the start of the active part in on\n// primary, from M up: the page gives it a size at M, L and XL alone. It is\n// 10dp in from the part's start, which is MDC-Android's padding, since the\n// page gives none, and like MDC-Android it is drawn only while the part has\n// room for it and that padding on both sides, and for a single handle.\n//\n// The value indicator is the page's label: inverse surface under label-large\n// in inverse on surface, 44dp tall and at least 48dp wide, 12dp above the\n// handle. It shows while the handle is dragged or has keyboard focus, and it\n// is React Aria's `SliderOutput`, so what it shows is what the slider\n// announces.\n//\n// React Aria's `Slider` is the root, `SliderTrack` the strip the handles are\n// placed along by percent, and `SliderThumb` each handle around a visually\n// hidden range input. The track's parts are drawn here from those percents\n// rather than with `SliderFill`, since the page's parts stop short of the\n// handle on both sides and the fill runs up to it. A range slider is the\n// same track with two handles and the active part between them.\n//\n// Vertical, the same parts run along the block axis, with the active part\n// rising from the bottom and the indicator to the start side of the handle.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The sliders page's own measurements, which are constants of the component\n// rather than steps of the consumer's spacing scale. The clearance used to be\n// read off `spacing.sm` — true at its default 8, since 6 plus half the\n// handle comes to the same — so a theme moving that step opened the gap\n// beside the handle while the stop, written as the literal it is, stayed\n// where the page puts it.\nconst GAP = 6;\nconst HANDLE_WIDTH = 4;\n/** How far a part stops short of a handle's centre. */\nconst CLEAR = GAP + HANDLE_WIDTH / 2;\n/** A stop's size. */\nconst STOP = 4;\n/** MDC-Android's padding either side of the inset icon. */\nconst ICON_PADDING = 10;\ntype SliderSize = 'lg' | 'md' | 'sm' | 'xl' | 'xs';\n\n// The sizes, as the custom properties every part reads: the track's\n// thickness, its outer corner and the handle's length, which the track\n// strip takes as its own thickness too.\nconst sizes = {\n lg: {\n \"--slider-corner\": \"x1hr852m\",\n \"--slider-handle\": \"x1i1s3m4\",\n \"--slider-icon\": \"xsfv7fh\",\n \"--slider-track\": \"xdrquod\",\n $$css: true\n },\n md: {\n \"--slider-corner\": \"x1welmdy\",\n \"--slider-handle\": \"x1290pjo\",\n \"--slider-icon\": \"xsfv7fh\",\n \"--slider-track\": \"xhx1aj5\",\n $$css: true\n },\n sm: {\n \"--slider-corner\": \"x1y8vi8n\",\n \"--slider-handle\": \"x1czf5nl\",\n \"--slider-track\": \"xf334ng\",\n $$css: true\n },\n xl: {\n \"--slider-corner\": \"x1tzw2no\",\n \"--slider-handle\": \"x1aoofsu\",\n \"--slider-icon\": \"xmfnedx\",\n \"--slider-track\": \"x1s6dhuk\",\n $$css: true\n },\n xs: {\n \"--slider-corner\": \"x1y8vi8n\",\n \"--slider-handle\": \"x1czf5nl\",\n \"--slider-track\": \"x16oikcs\",\n $$css: true\n }\n};\nconst styles = {\n active: {\n kWkggS: \"xnety89 x1jzqe4\",\n $$css: true\n },\n activeDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n activeHoldingIcon: {\n k9g6sI: \"xpqogu8\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xi7vqlm\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"xuu3ggl\",\n kzqmXN: \"xoxpges\",\n k87sOh: \"xdtafdd\",\n kLqNvP: \"xi5uv41\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n iconDisabled: {\n kMwMTN: \"x1girmi0\",\n $$css: true\n },\n iconRoomBlock: {\n k1xSpc: \"x1uo08md x78zum5\",\n $$css: true\n },\n iconRoomBlockXl: {\n k1xSpc: \"x2mjljv x78zum5\",\n $$css: true\n },\n iconRoomInline: {\n k1xSpc: \"x1cueg3v x78zum5\",\n $$css: true\n },\n iconRoomInlineXl: {\n k1xSpc: \"x18ymn08 x78zum5\",\n $$css: true\n },\n iconVertical: {\n krVfgx: \"x1jn9clo\",\n k87sOh: \"x80663w\",\n kLqNvP: \"x1m57d8a\",\n $$css: true\n },\n inactiveDisabled: {\n kWkggS: \"x19v6zzp\",\n $$css: true\n },\n innerBlockEnd: {\n kT0f0o: \"x1ui04y5\",\n kVL7Gh: \"x6en5u8\",\n $$css: true\n },\n innerBlockStart: {\n kfmiAY: \"x1e4oeot\",\n krdFHd: \"xr9e8f9\",\n $$css: true\n },\n innerInlineEnd: {\n kT0f0o: \"x1ui04y5\",\n kfmiAY: \"x1e4oeot\",\n $$css: true\n },\n innerInlineStart: {\n kVL7Gh: \"x6en5u8\",\n krdFHd: \"xr9e8f9\",\n $$css: true\n },\n root: {\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n rootVertical: {\n kGNEyG: \"x1cy8zhl\",\n kZKoxP: \"x1u5z0ei\",\n kzqmXN: \"x14atkfc\",\n $$css: true\n },\n segment: {\n kWkggS: \"x15dekr4 x9yvj25\",\n kZKoxP: \"x9w084k\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1xpg3mf\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n k87sOh: \"x1i1s66i\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n segmentVertical: {\n kZKoxP: \"xt7dq6l\",\n kzqmXN: \"x3fzmgt\",\n k87sOh: \"x80663w\",\n kLqNvP: \"x9k4rl8\",\n $$css: true\n },\n stop: {\n kWkggS: \"x81krv7 x1tt9vl1\",\n kZKoxP: \"xqu0tyb\",\n kaIpWk: \"x16fbrrb\",\n kzqmXN: \"x51ohtg\",\n k87sOh: \"x17a0tka\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n stopActive: {\n kWkggS: \"x1ntwmx2 x1sir5s4\",\n $$css: true\n },\n stopActiveDisabled: {\n kWkggS: \"x1dbj914\",\n $$css: true\n },\n stopDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n stopEnd: {\n kt4wiu: \"x1f889gz\",\n $$css: true\n },\n stopEndVertical: {\n k87sOh: \"x1atx4j1\",\n kt4wiu: \"x1woyocn\",\n $$css: true\n },\n stopStart: {\n kLqNvP: \"xrr41r3\",\n $$css: true\n },\n stopStartVertical: {\n krVfgx: \"xrb244j\",\n k87sOh: \"x80663w\",\n kLqNvP: \"xhi6v0a\",\n $$css: true\n },\n stopVertical: {\n k87sOh: \"x80663w\",\n kLqNvP: \"xml7xvy\",\n $$css: true\n },\n thumb: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89 x1jzqe4\",\n kZKoxP: \"x16gdi9t\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1dkaolv\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1jm3nie\",\n kzqmXN: \"x51ohtg\",\n k87sOh: \"xwa60dl\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xdl150w\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n thumbActive: {\n kzqmXN: \"xfo62xy\",\n $$css: true\n },\n thumbActiveVertical: {\n kZKoxP: \"x36qwtl\",\n kzqmXN: \"xluoxwi\",\n $$css: true\n },\n thumbDisabled: {\n kWkggS: \"x1crcgwy\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n thumbDragging: {\n kkrTdU: \"xi9pz9s\",\n $$css: true\n },\n thumbFocused: {\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n thumbVertical: {\n kZKoxP: \"xqu0tyb\",\n kzqmXN: \"xluoxwi\",\n k87sOh: \"x80663w\",\n kbCHJM: \"x1nrll8i\",\n $$css: true\n }\n};\n\n// Where each part of the track starts and ends, as insets from the track's\n// two ends, and where a stop sits inside a part. Dynamic styles, since the\n// percents come from the value at render time and StyleX compiles its\n// classes ahead of time; each writes its insets to custom properties inline.\nconst _temp = {\n krVfgx: \"xiicpxy\",\n k87sOh: \"x5mnzd7\",\n \"$$css\": true\n};\nconst _temp2 = {\n krVfgx: \"xiicpxy\",\n \"$$css\": true\n};\nconst placements = {\n block: (start: string, end: string) => [_temp, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start),\n \"--x-insetBlockStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end)\n }],\n inline: (start: string, end: string) => [{\n kt4wiu: end != null ? \"xqxgn94\" : end,\n kLqNvP: start != null ? \"x1lxsm33\" : start,\n $$css: true\n }, {\n \"--x-insetInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }],\n stopBlock: (offset: string) => [_temp2, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(offset)\n }],\n stopInline: (offset: string) => [{\n kLqNvP: offset != null ? \"x1lxsm33\" : offset,\n $$css: true\n }, {\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(offset)\n }]\n};\n\n/** What a track draws besides its parts and handles. */\ntype Extras = {\n icon: ReactNode;\n showStops: boolean;\n size: SliderSize;\n vertical: boolean;\n};\n\n/** One end of a part: a fraction of the track's length, and pixels on top. */\ntype Inset = {\n fraction: number;\n px: number;\n};\n\n/**\n * A part of the track, by the insets of its two ends from the track's, and\n * which of the three it is: the inactive part before a range's first handle,\n * the active part, or the inactive part after the last handle.\n */\ntype Part = {\n active: boolean;\n end: Inset;\n name: 'active' | 'after' | 'before';\n start: Inset;\n};\ntype SliderProps = Omit<RACSliderProps, 'children' | 'orientation'> & {\n /**\n * The page's inset icon, at the start of the active part, from `md` up:\n * the page gives it a size at M, L and XL alone. Drawn for a single\n * handle, and only while the active part has room for it.\n */\n icon?: ReactNode;\n /**\n * What the slider sets. A slider that a row labels some other way leaves\n * it out and passes `aria-label` instead.\n */\n label?: string;\n /**\n * Along which axis the handle moves. A vertical slider is 240px tall until\n * `style` on the root says otherwise.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * A stop at every step, the page's stops configuration, so the reader can\n * see where the handle can land. Meant for a slider with a handful of\n * steps: each stop is a 4dp dot, and a fine step draws a crowd of them.\n * @default false\n */\n showStops?: boolean;\n /**\n * The page's sizes, by the track's thickness: 16dp at `xs`, 24dp at `sm`,\n * 40dp at `md`, 56dp at `lg` and 96dp at `xl`, with the handle 44dp long\n * up to `sm` and 52dp, 68dp and 108dp past it.\n * @default 'xs'\n */\n size?: SliderSize;\n /**\n * A name for each handle of a range slider, in order, since two handles\n * named by the same label cannot be told apart.\n */\n thumbLabels?: string[];\n};\nconst AT_END: Inset = {\n fraction: 0,\n px: 0\n};\n\n// A part's start inset, clear of a handle at `fraction` of the way along. The\n// fraction lands on the handle's centre, so half the handle's width joins the\n// page's gap to reach its edge.\nfunction after(fraction: number): Inset {\n return {\n fraction,\n px: CLEAR\n };\n}\n\n// A part's end inset, clear of a handle at `fraction` of the way along.\nfunction before(fraction: number): Inset {\n return {\n fraction: 1 - fraction,\n px: CLEAR\n };\n}\n\n// The container query that hides the inset icon for want of room: the part's\n// length along the track, against the icon and its padding at this size.\nfunction iconRoom(size: SliderSize, vertical: boolean) {\n if (vertical) {\n return size === 'xl' ? styles.iconRoomBlockXl : styles.iconRoomBlock;\n }\n return size === 'xl' ? styles.iconRoomInlineXl : styles.iconRoomInline;\n}\n\n// The inset icon, at the foot of the active part, while the part has room.\nfunction insetIcon({\n icon,\n size,\n vertical\n}: Extras, isDisabled: boolean): ReactNode {\n const room = iconRoom(size, vertical);\n return <span {...stylex.props(styles.icon, vertical && styles.iconVertical, room, isDisabled && styles.iconDisabled)}>\n {icon}\n </span>;\n}\nfunction insetOf({\n fraction,\n px\n}: Inset) {\n return `calc(${fraction * 100}% + ${px}px)`;\n}\n\n// Where a stop at `fraction` of the way along the track starts inside a part.\n// The part's own length is the `100%` the expression has to work from, and\n// the track's is that plus both insets, so a fraction of the track is a\n// share of the part's length plus their pixels.\nfunction offsetIn({\n end,\n start\n}: Part, fraction: number) {\n const share = 1 - start.fraction - end.fraction;\n const scale = (fraction - start.fraction) / share;\n return `calc(${scale} * (100% + ${start.px + end.px}px) - ${start.px + STOP / 2}px)`;\n}\n\n// What a part holds: a stop at each step inside it, the end stops where it\n// reaches the track's ends, and the inset icon.\nfunction partContent(part: Part, extras: Extras, isDisabled: boolean, steps: number[], hasIcon: boolean) {\n const {\n showStops,\n vertical\n } = extras;\n const stop = [styles.stop, vertical && styles.stopVertical, part.active && styles.stopActive, isDisabled && (part.active ? styles.stopActiveDisabled : styles.stopDisabled)];\n const from = part.start.fraction;\n const to = 1 - part.end.fraction;\n const length = 1 - part.start.fraction - part.end.fraction;\n const inside = showStops && length > 0 ? steps.filter(fraction => fraction >= from && fraction <= to) : [];\n const place = vertical ? placements.stopBlock : placements.stopInline;\n const atStart = part.start.fraction === 0 && part.start.px === 0;\n // The single stop at the inactive end is drawn with or without the stops\n // configuration; the one at the start is the configuration's own.\n const atEnd = part.end.fraction === 0 && part.end.px === 0 && !part.active;\n return <>\n {hasIcon ? insetIcon(extras, isDisabled) : null}\n {showStops && atStart ? <span {...stylex.props(...stop, vertical ? styles.stopStartVertical : styles.stopStart)} /> : null}\n {inside.map(fraction => <span key={fraction} {...stylex.props(...stop, place(offsetIn(part, fraction)))} />)}\n {atEnd ? <span {...stylex.props(...stop, vertical ? styles.stopEndVertical : styles.stopEnd)} /> : null}\n </>;\n}\n\n/**\n * A slider for one value, or for a range when the value is a pair. The value\n * is React Aria's: pass `value` with `onChange` to control it, or\n * `defaultValue` to let it keep its own, with `minValue`, `maxValue` and\n * `step` to shape it and `formatOptions` to say how it reads. Arrow keys\n * move a handle by a step, Page Up and Page Down by ten, Home and End to\n * the ends.\n *\n * The call site's `className` and `style` land on the slider as a whole,\n * which is the element a layout positions and the one that gives a vertical\n * slider its height.\n */\nfunction Slider({\n icon,\n label,\n orientation = 'horizontal',\n showStops = false,\n size = 'xs',\n thumbLabels,\n ...props\n}: RefAttributes<HTMLDivElement> & SliderProps) {\n const vertical = orientation === 'vertical';\n return <RACSlider orientation={orientation} {...props} {...mergeStatefulStyles(stylex.props(groupStyles.root, styles.root, sizes[size], vertical && styles.rootVertical), props)}>\n {label === undefined ? null : <FieldLabel variant=\"group\">{label}</FieldLabel>}\n <SliderTrack {...mergeStatefulStyles((state: SliderTrackRenderProps) => ({\n 0: {\n className: \"x16gdi9t x9f619 x1ypdohk xh8yej3 x1n2onr6\"\n },\n 2: {\n className: \"x9f619 x1ypdohk x1n2onr6 x5yr21d x1iyjqo2 xluoxwi x2lwn1j\"\n },\n 1: {\n className: \"x16gdi9t x9f619 xh8yej3 x1n2onr6 x1h6gzvc\"\n },\n 3: {\n className: \"x9f619 x1n2onr6 x5yr21d x1iyjqo2 xluoxwi x2lwn1j x1h6gzvc\"\n }\n })[!!vertical << 1 | !!state.isDisabled << 0], {})}>\n {trackContent({\n icon,\n showStops,\n size,\n vertical\n }, thumbLabels)}\n </SliderTrack>\n </RACSlider>;\n}\n\n// The fractions of the way along the track that a step lands on, ends left\n// out: those are drawn as the end stops, the page's gap in from each end.\nfunction stepsOf(state: SliderState) {\n const min = state.getThumbMinValue(0);\n const max = state.getThumbMaxValue(state.values.length - 1);\n const fractions: number[] = [];\n if (state.step <= 0) {\n return fractions;\n }\n for (let index = 1; min + index * state.step < max; index++) {\n fractions.push(state.getValuePercent(min + index * state.step));\n }\n return fractions;\n}\n\n// What a handle draws: its value while it is dragged or has keyboard focus.\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 memoises\n// the result on its inputs.\nfunction thumbContent(index: number, vertical: boolean) {\n return (state: SliderThumbRenderProps) => state.isDragging || state.isFocusVisible ? <SliderOutput {...{\n 0: {\n className: \"x6s0dn4 x1c5gpgi xn3w4p2 x1dkaolv x9f619 x1girmi0 x78zum5 xkknnkr x14zspaw x1v9cpvo x3mk9i xbudbmw xl56j7k x155f00i x1lz68p4 x900493 x18fpw6u x10l6tqk xaf021q xuuh30 xuxw1ft\"\n },\n 1: {\n className: \"x6s0dn4 x1c5gpgi xn3w4p2 x1dkaolv x9f619 x1girmi0 x78zum5 xkknnkr x14zspaw x1v9cpvo xl56j7k x155f00i x1lz68p4 x900493 x18fpw6u x10l6tqk xuxw1ft xdd4er5 xwa60dl x15zsqls xhi6v0a x1cb1t30\"\n }\n }[!!vertical << 0]}>\n {state.state.getThumbValueLabel(index)}\n </SliderOutput> : null;\n}\nfunction thumbStyles(vertical: boolean) {\n return (state: SliderThumbRenderProps) => stylex.props(styles.thumb, vertical && styles.thumbVertical, (state.isDragging || state.isFocusVisible) && (vertical ? styles.thumbActiveVertical : styles.thumbActive), state.isDragging && styles.thumbDragging, state.isFocusVisible && styles.thumbFocused, state.isDisabled && styles.thumbDisabled);\n}\n\n// The track's parts and handles, from the slider's state: an inactive part\n// before the first handle of a range, the active part up to or between the\n// handles, and the inactive part after the last one carrying the stop.\nfunction trackContent(extras: Extras, thumbLabels: string[] | undefined) {\n return ({\n isDisabled,\n state\n }: SliderTrackRenderProps) => {\n const {\n icon,\n showStops,\n size,\n vertical\n } = extras;\n const fractions = state.values.map((_, index) => state.getThumbPercent(index));\n const first = fractions[0] ?? 0;\n const last = fractions.at(-1) ?? 0;\n const range = fractions.length > 1;\n const parts: Part[] = [...(range ? [{\n active: false,\n end: before(first),\n name: 'before',\n start: AT_END\n } as const] : []), {\n active: true,\n end: before(last),\n name: 'active',\n start: range ? after(first) : AT_END\n }, {\n active: false,\n end: AT_END,\n name: 'after',\n start: after(last)\n }];\n const hasIcon = icon !== undefined && icon !== null && !range && (size === 'md' || size === 'lg' || size === 'xl');\n const steps = showStops ? stepsOf(state) : [];\n const place = vertical ? placements.block : placements.inline;\n const innerStart = vertical ? styles.innerBlockStart : styles.innerInlineStart;\n const innerEnd = vertical ? styles.innerBlockEnd : styles.innerInlineEnd;\n return <>\n {parts.map(part => <span key={part.name} {...stylex.props(styles.segment, vertical && styles.segmentVertical, part.active && styles.active, part.active && hasIcon && styles.activeHoldingIcon, isDisabled && (part.active ? styles.activeDisabled : styles.inactiveDisabled), part.start !== AT_END && innerStart, part.end !== AT_END && innerEnd, place(insetOf(part.start), insetOf(part.end)))}>\n {partContent(part, extras, isDisabled, steps, part.active && hasIcon)}\n </span>)}\n {fractions.map((_, index) => <SliderThumb aria-label={thumbLabels?.[index]} index={index}\n // oxlint-disable-next-line react/no-array-index-key -- a handle's position is its identity\n key={index} {...mergeStatefulStyles(thumbStyles(vertical), {})}>\n {thumbContent(index, vertical)}\n </SliderThumb>)}\n </>;\n };\n}\nexport type { SliderProps, SliderSize };\nexport default Slider;"],"mappings":";;;;;;;;;;AAgFA,MAAM2B,QAAQF;;AAEd,MAAMG,OAAO;AAQb,MAAMG,QAAQ;CACZC,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBC,OAAO;CACT;CACAC,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBD,OAAO;CACT;CACAE,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClBF,OAAO;CACT;CACAG,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBH,OAAO;CACT;CACAI,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClBJ,OAAO;CACT;AACF;AACA,MAAMK,SAAS;CACbC,QAAQ;EACNC,QAAQ;EACRP,OAAO;CACT;CACAQ,gBAAgB;EACdD,QAAQ;EACRP,OAAO;CACT;CACAS,mBAAmB;EACjBC,QAAQ;EACRV,OAAO;CACT;CACAW,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRrB,OAAO;CACT;CACAsB,cAAc;EACZR,QAAQ;EACRd,OAAO;CACT;CACAuB,eAAe;EACbR,QAAQ;EACRf,OAAO;CACT;CACAwB,iBAAiB;EACfT,QAAQ;EACRf,OAAO;CACT;CACAyB,gBAAgB;EACdV,QAAQ;EACRf,OAAO;CACT;CACA0B,kBAAkB;EAChBX,QAAQ;EACRf,OAAO;CACT;CACA2B,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QAAQhC,WAAWb,WAAWC,QAAQD,WAAWM;EACvD,MAAMsF,aAAa/E,WAAWrF,OAAO4B,kBAAkB5B,OAAOgC;EAC9D,MAAMqI,WAAWhF,WAAWrF,OAAOyB,gBAAgBzB,OAAO+B;EAC1D,OAAO,qBAAA,UAAA,EAAA,UAAA,CACFmI,MAAM1C,KAAIZ,SAAQ,oBAAC,QAAD;GAAsB,GAAIzI,MAAa6B,OAAOmC,SAASkD,YAAYrF,OAAO0C,iBAAiBkE,KAAK3G,UAAUD,OAAOC,QAAQ2G,KAAK3G,UAAU8G,WAAW/G,OAAOI,mBAAmBgG,eAAeQ,KAAK3G,SAASD,OAAOG,iBAAiBH,OAAOwB,mBAAmBoF,KAAKlC,UAAUqB,UAAUqE,YAAYxD,KAAKjC,QAAQoB,UAAUsE,UAAUhD,MAAMd,QAAQK,KAAKlC,KAAK,GAAG6B,QAAQK,KAAKjC,GAAG,CAAC,CAAC;GAC7XgC,UAAAA,YAAYC,MAAMC,QAAQT,YAAYU,OAAOF,KAAK3G,UAAU8G,OAAO;EAChE,GAFsBH,KAAKlB,IAE3B,CAAC,GACRwD,UAAU1B,KAAKoC,GAAGR,UAAU,oBAAC,aAAD;GAAa,cAAYtD,cAAcsD;GAAeA;GAEzE,GAAIzK,oBAAoBgL,YAAYtE,QAAQ,GAAG,CAAC,CAAC;GACtDkE,UAAAA,aAAaH,OAAO/D,QAAQ;EAClB,GAFZ+D,KAEY,CAAC,CAClB,EAAA,CAAA;CACJ;AACF"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","Slider","RACSlider","groupStyles","mergeStatefulStyles","GAP","CLEAR","STOP","sizes","lg","$$css","md","sm","xl","xs","styles","active","kWkggS","activeDisabled","activeHoldingIcon","k9g6sI","icon","kGNEyG","kZKoxP","kMwMTN","k1xSpc","kGuDYH","kzqmXN","k87sOh","kLqNvP","kjj79g","kVAEAm","iconDisabled","iconRoomBlock","iconRoomBlockXl","iconRoomInline","iconRoomInlineXl","iconVertical","krVfgx","inactiveDisabled","innerBlockEnd","kT0f0o","kVL7Gh","innerBlockStart","kfmiAY","krdFHd","innerInlineEnd","innerInlineStart","root","rootVertical","segment","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kB7OPa","kVQacm","segmentVertical","stop","stopActive","stopActiveDisabled","stopDisabled","stopEnd","kt4wiu","stopEndVertical","stopStart","stopStartVertical","stopVertical","thumb","k6CgDc","kkrTdU","kjBf7l","kInvED","k3XXqK","kMeerF","kIyJzY","k1ekBW","kAMwcw","thumbActive","thumbActiveVertical","thumbDisabled","thumbDragging","thumbFocused","thumbVertical","kbCHJM","_temp","_temp2","placements","block","start","end","val","undefined","inline","stopBlock","offset","stopInline","showStops","size","vertical","fraction","px","name","label","orientation","thumbLabels","AT_END","after","before","iconRoom","insetIcon","isDisabled","room","props","insetOf","offsetIn","share","partContent","part","extras","steps","hasIcon","from","to","length","inside","filter","place","atStart","atEnd","map","t0","$","T0","t1","t2","t3","t4","t5","t6","t7","t8","t9","state","0","className","2","1","3","trackContent","stepsOf","min","getThumbMinValue","max","getThumbMaxValue","values","fractions","step","index","push","getValuePercent","thumbContent","isDragging","isFocusVisible","getThumbValueLabel","thumbStyles","_","getThumbPercent","first","last","at","range","parts","innerStart","innerEnd"],"sources":["../../../src/components/slider/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { SliderProps as RACSliderProps, SliderState, SliderThumbRenderProps, SliderTrackRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Slider as RACSlider, SliderOutput, SliderThumb, SliderTrack } from 'react-aria-components';\nimport { FieldLabel } from '../../field';\nimport { groupStyles } from '../../field/styles';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The sliders page. At the size its tokens call extra-small, the default: a\n// 16dp track with an 8dp corner, the active part in primary and the inactive\n// part in secondary container, a 4dp stop in on secondary container 6dp from\n// the inactive end, and a handle 4dp wide and 44dp tall in primary that\n// narrows to 2dp while pressed or focused. The track parts on each side of\n// the handle, with 6dp of space between them and it, and their corners\n// against the handle are 2dp where their outer ends are full. Disabled, the\n// active part and the handle are on surface at the disabled content opacity\n// and the inactive part at the disabled container opacity.\n//\n// `size` takes the page's four larger sizes, which thicken the track and\n// round its ends more, and lengthen the handle from M up:\n//\n// | Size | Track | Corner | Handle | Inset icon |\n// | ---- | ----- | ------ | ------ | ---------- |\n// | xs | 16dp | 8dp | 44dp | |\n// | sm | 24dp | 8dp | 44dp | |\n// | md | 40dp | 12dp | 52dp | 24dp |\n// | lg | 56dp | 16dp | 68dp | 24dp |\n// | xl | 96dp | 28dp | 108dp | 32dp |\n//\n// The handle stays 4dp wide, the corners against it 2dp and the space beside\n// it 6dp at every size.\n//\n// `showStops` is the page's stops configuration, which it used to call the\n// discrete slider: a 4dp stop at every step, in on primary on the active part\n// and on secondary container on the inactive one, so the reader can see\n// where the handle can land. The stops at the two ends sit 6dp in from them,\n// as the single stop does. A part clips what it holds, which is what hides\n// the stops beside the handle: the part ends 6dp short of it.\n//\n// `icon` is the page's inset icon, at the start of the active part in on\n// primary, from M up: the page gives it a size at M, L and XL alone. It is\n// 10dp in from the part's start, which is MDC-Android's padding, since the\n// page gives none, and like MDC-Android it is drawn only while the part has\n// room for it and that padding on both sides, and for a single handle.\n//\n// The value indicator is the page's label: inverse surface under label-large\n// in inverse on surface, 44dp tall and at least 48dp wide, 12dp above the\n// handle. It shows while the handle is dragged or has keyboard focus, and it\n// is React Aria's `SliderOutput`, so what it shows is what the slider\n// announces.\n//\n// React Aria's `Slider` is the root, `SliderTrack` the strip the handles are\n// placed along by percent, and `SliderThumb` each handle around a visually\n// hidden range input. The track's parts are drawn here from those percents\n// rather than with `SliderFill`, since the page's parts stop short of the\n// handle on both sides and the fill runs up to it. A range slider is the\n// same track with two handles and the active part between them.\n//\n// Vertical, the same parts run along the block axis, with the active part\n// rising from the bottom and the indicator to the start side of the handle.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The sliders page's own measurements, which are constants of the component\n// rather than steps of the consumer's spacing scale. The clearance used to be\n// read off `spacing.sm` — true at its default 8, since 6 plus half the\n// handle comes to the same — so a theme moving that step opened the gap\n// beside the handle while the stop, written as the literal it is, stayed\n// where the page puts it.\nconst GAP = 6;\nconst HANDLE_WIDTH = 4;\n/** How far a part stops short of a handle's centre. */\nconst CLEAR = GAP + HANDLE_WIDTH / 2;\n/** A stop's size. */\nconst STOP = 4;\n/** MDC-Android's padding either side of the inset icon. */\nconst ICON_PADDING = 10;\ntype SliderSize = 'lg' | 'md' | 'sm' | 'xl' | 'xs';\n\n// The sizes, as the custom properties every part reads: the track's\n// thickness, its outer corner and the handle's length, which the track\n// strip takes as its own thickness too.\nconst sizes = {\n lg: {\n \"--slider-corner\": \"x1hr852m\",\n \"--slider-handle\": \"x1i1s3m4\",\n \"--slider-icon\": \"xsfv7fh\",\n \"--slider-track\": \"xdrquod\",\n $$css: true\n },\n md: {\n \"--slider-corner\": \"x1welmdy\",\n \"--slider-handle\": \"x1290pjo\",\n \"--slider-icon\": \"xsfv7fh\",\n \"--slider-track\": \"xhx1aj5\",\n $$css: true\n },\n sm: {\n \"--slider-corner\": \"x1y8vi8n\",\n \"--slider-handle\": \"x1czf5nl\",\n \"--slider-track\": \"xf334ng\",\n $$css: true\n },\n xl: {\n \"--slider-corner\": \"x1tzw2no\",\n \"--slider-handle\": \"x1aoofsu\",\n \"--slider-icon\": \"xmfnedx\",\n \"--slider-track\": \"x1s6dhuk\",\n $$css: true\n },\n xs: {\n \"--slider-corner\": \"x1y8vi8n\",\n \"--slider-handle\": \"x1czf5nl\",\n \"--slider-track\": \"x16oikcs\",\n $$css: true\n }\n};\nconst styles = {\n active: {\n kWkggS: \"xnety89 x1jzqe4\",\n $$css: true\n },\n activeDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n activeHoldingIcon: {\n k9g6sI: \"xpqogu8\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xi7vqlm\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"xuu3ggl\",\n kzqmXN: \"xoxpges\",\n k87sOh: \"xdtafdd\",\n kLqNvP: \"xi5uv41\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n iconDisabled: {\n kMwMTN: \"x1girmi0\",\n $$css: true\n },\n iconRoomBlock: {\n k1xSpc: \"x1uo08md x78zum5\",\n $$css: true\n },\n iconRoomBlockXl: {\n k1xSpc: \"x2mjljv x78zum5\",\n $$css: true\n },\n iconRoomInline: {\n k1xSpc: \"x1cueg3v x78zum5\",\n $$css: true\n },\n iconRoomInlineXl: {\n k1xSpc: \"x18ymn08 x78zum5\",\n $$css: true\n },\n iconVertical: {\n krVfgx: \"x1jn9clo\",\n k87sOh: \"x80663w\",\n kLqNvP: \"x1m57d8a\",\n $$css: true\n },\n inactiveDisabled: {\n kWkggS: \"x19v6zzp\",\n $$css: true\n },\n innerBlockEnd: {\n kT0f0o: \"x1ui04y5\",\n kVL7Gh: \"x6en5u8\",\n $$css: true\n },\n innerBlockStart: {\n kfmiAY: \"x1e4oeot\",\n krdFHd: \"xr9e8f9\",\n $$css: true\n },\n innerInlineEnd: {\n kT0f0o: \"x1ui04y5\",\n kfmiAY: \"x1e4oeot\",\n $$css: true\n },\n innerInlineStart: {\n kVL7Gh: \"x6en5u8\",\n krdFHd: \"xr9e8f9\",\n $$css: true\n },\n root: {\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n rootVertical: {\n kGNEyG: \"x1cy8zhl\",\n kZKoxP: \"x1u5z0ei\",\n kzqmXN: \"x14atkfc\",\n $$css: true\n },\n segment: {\n kWkggS: \"x15dekr4 x9yvj25\",\n kZKoxP: \"x9w084k\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1xpg3mf\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n k87sOh: \"x1i1s66i\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n segmentVertical: {\n kZKoxP: \"xt7dq6l\",\n kzqmXN: \"x3fzmgt\",\n k87sOh: \"x80663w\",\n kLqNvP: \"x9k4rl8\",\n $$css: true\n },\n stop: {\n kWkggS: \"x81krv7 x1tt9vl1\",\n kZKoxP: \"xqu0tyb\",\n kaIpWk: \"x16fbrrb\",\n kzqmXN: \"x51ohtg\",\n k87sOh: \"x17a0tka\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n stopActive: {\n kWkggS: \"x1ntwmx2 x1sir5s4\",\n $$css: true\n },\n stopActiveDisabled: {\n kWkggS: \"x1dbj914\",\n $$css: true\n },\n stopDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n stopEnd: {\n kt4wiu: \"x1f889gz\",\n $$css: true\n },\n stopEndVertical: {\n k87sOh: \"x1atx4j1\",\n kt4wiu: \"x1woyocn\",\n $$css: true\n },\n stopStart: {\n kLqNvP: \"xrr41r3\",\n $$css: true\n },\n stopStartVertical: {\n krVfgx: \"xrb244j\",\n k87sOh: \"x80663w\",\n kLqNvP: \"xhi6v0a\",\n $$css: true\n },\n stopVertical: {\n k87sOh: \"x80663w\",\n kLqNvP: \"xml7xvy\",\n $$css: true\n },\n thumb: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89 x1jzqe4\",\n kZKoxP: \"x16gdi9t\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1dkaolv\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1jm3nie\",\n kzqmXN: \"x51ohtg\",\n k87sOh: \"xwa60dl\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xdl150w\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n thumbActive: {\n kzqmXN: \"xfo62xy\",\n $$css: true\n },\n thumbActiveVertical: {\n kZKoxP: \"x36qwtl\",\n kzqmXN: \"xluoxwi\",\n $$css: true\n },\n thumbDisabled: {\n kWkggS: \"x1crcgwy\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n thumbDragging: {\n kkrTdU: \"xi9pz9s\",\n $$css: true\n },\n thumbFocused: {\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n thumbVertical: {\n kZKoxP: \"xqu0tyb\",\n kzqmXN: \"xluoxwi\",\n k87sOh: \"x80663w\",\n kbCHJM: \"x1nrll8i\",\n $$css: true\n }\n};\n\n// Where each part of the track starts and ends, as insets from the track's\n// two ends, and where a stop sits inside a part. Dynamic styles, since the\n// percents come from the value at render time and StyleX compiles its\n// classes ahead of time; each writes its insets to custom properties inline.\nconst _temp = {\n krVfgx: \"xiicpxy\",\n k87sOh: \"x5mnzd7\",\n \"$$css\": true\n};\nconst _temp2 = {\n krVfgx: \"xiicpxy\",\n \"$$css\": true\n};\nconst placements = {\n block: (start: string, end: string) => [_temp, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start),\n \"--x-insetBlockStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end)\n }],\n inline: (start: string, end: string) => [{\n kt4wiu: end != null ? \"xqxgn94\" : end,\n kLqNvP: start != null ? \"x1lxsm33\" : start,\n $$css: true\n }, {\n \"--x-insetInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }],\n stopBlock: (offset: string) => [_temp2, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(offset)\n }],\n stopInline: (offset: string) => [{\n kLqNvP: offset != null ? \"x1lxsm33\" : offset,\n $$css: true\n }, {\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(offset)\n }]\n};\n\n/** What a track draws besides its parts and handles. */\ntype Extras = {\n icon: ReactNode;\n showStops: boolean;\n size: SliderSize;\n vertical: boolean;\n};\n\n/** One end of a part: a fraction of the track's length, and pixels on top. */\ntype Inset = {\n fraction: number;\n px: number;\n};\n\n/**\n * A part of the track, by the insets of its two ends from the track's, and\n * which of the three it is: the inactive part before a range's first handle,\n * the active part, or the inactive part after the last handle.\n */\ntype Part = {\n active: boolean;\n end: Inset;\n name: 'active' | 'after' | 'before';\n start: Inset;\n};\ntype SliderProps = Omit<RACSliderProps, 'children' | 'orientation'> & {\n /**\n * The page's inset icon, at the start of the active part, from `md` up:\n * the page gives it a size at M, L and XL alone. Drawn for a single\n * handle, and only while the active part has room for it.\n */\n icon?: ReactNode;\n /**\n * What the slider sets. A slider that a row labels some other way leaves\n * it out and passes `aria-label` instead.\n */\n label?: string;\n /**\n * Along which axis the handle moves. A vertical slider is 240px tall until\n * `style` on the root says otherwise.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * A stop at every step, the page's stops configuration, so the reader can\n * see where the handle can land. Meant for a slider with a handful of\n * steps: each stop is a 4dp dot, and a fine step draws a crowd of them.\n * @default false\n */\n showStops?: boolean;\n /**\n * The page's sizes, by the track's thickness: 16dp at `xs`, 24dp at `sm`,\n * 40dp at `md`, 56dp at `lg` and 96dp at `xl`, with the handle 44dp long\n * up to `sm` and 52dp, 68dp and 108dp past it.\n * @default 'xs'\n */\n size?: SliderSize;\n /**\n * A name for each handle of a range slider, in order, since two handles\n * named by the same label cannot be told apart.\n */\n thumbLabels?: string[];\n};\nconst AT_END: Inset = {\n fraction: 0,\n px: 0\n};\n\n// A part's start inset, clear of a handle at `fraction` of the way along. The\n// fraction lands on the handle's centre, so half the handle's width joins the\n// page's gap to reach its edge.\nfunction after(fraction: number): Inset {\n return {\n fraction,\n px: CLEAR\n };\n}\n\n// A part's end inset, clear of a handle at `fraction` of the way along.\nfunction before(fraction: number): Inset {\n return {\n fraction: 1 - fraction,\n px: CLEAR\n };\n}\n\n// The container query that hides the inset icon for want of room: the part's\n// length along the track, against the icon and its padding at this size.\nfunction iconRoom(size: SliderSize, vertical: boolean) {\n if (vertical) {\n return size === 'xl' ? styles.iconRoomBlockXl : styles.iconRoomBlock;\n }\n return size === 'xl' ? styles.iconRoomInlineXl : styles.iconRoomInline;\n}\n\n// The inset icon, at the foot of the active part, while the part has room.\nfunction insetIcon({\n icon,\n size,\n vertical\n}: Extras, isDisabled: boolean): ReactNode {\n const room = iconRoom(size, vertical);\n return <span {...stylex.props(styles.icon, vertical && styles.iconVertical, room, isDisabled && styles.iconDisabled)}>\n {icon}\n </span>;\n}\nfunction insetOf({\n fraction,\n px\n}: Inset) {\n return `calc(${fraction * 100}% + ${px}px)`;\n}\n\n// Where a stop at `fraction` of the way along the track starts inside a part.\n// The part's own length is the `100%` the expression has to work from, and\n// the track's is that plus both insets, so a fraction of the track is a\n// share of the part's length plus their pixels.\nfunction offsetIn({\n end,\n start\n}: Part, fraction: number) {\n const share = 1 - start.fraction - end.fraction;\n const scale = (fraction - start.fraction) / share;\n return `calc(${scale} * (100% + ${start.px + end.px}px) - ${start.px + STOP / 2}px)`;\n}\n\n// What a part holds: a stop at each step inside it, the end stops where it\n// reaches the track's ends, and the inset icon.\nfunction partContent(part: Part, extras: Extras, isDisabled: boolean, steps: number[], hasIcon: boolean) {\n const {\n showStops,\n vertical\n } = extras;\n const stop = [styles.stop, vertical && styles.stopVertical, part.active && styles.stopActive, isDisabled && (part.active ? styles.stopActiveDisabled : styles.stopDisabled)];\n const from = part.start.fraction;\n const to = 1 - part.end.fraction;\n const length = 1 - part.start.fraction - part.end.fraction;\n const inside = showStops && length > 0 ? steps.filter(fraction => fraction >= from && fraction <= to) : [];\n const place = vertical ? placements.stopBlock : placements.stopInline;\n const atStart = part.start.fraction === 0 && part.start.px === 0;\n // The single stop at the inactive end is drawn with or without the stops\n // configuration; the one at the start is the configuration's own.\n const atEnd = part.end.fraction === 0 && part.end.px === 0 && !part.active;\n return <>\n {hasIcon ? insetIcon(extras, isDisabled) : null}\n {showStops && atStart ? <span {...stylex.props(...stop, vertical ? styles.stopStartVertical : styles.stopStart)} /> : null}\n {inside.map(fraction => <span key={fraction} {...stylex.props(...stop, place(offsetIn(part, fraction)))} />)}\n {atEnd ? <span {...stylex.props(...stop, vertical ? styles.stopEndVertical : styles.stopEnd)} /> : null}\n </>;\n}\n\n/**\n * A slider for one value, or for a range when the value is a pair. The value\n * is React Aria's: pass `value` with `onChange` to control it, or\n * `defaultValue` to let it keep its own, with `minValue`, `maxValue` and\n * `step` to shape it and `formatOptions` to say how it reads. Arrow keys\n * move a handle by a step, Page Up and Page Down by ten, Home and End to\n * the ends.\n *\n * The call site's `className` and `style` land on the slider as a whole,\n * which is the element a layout positions and the one that gives a vertical\n * slider its height.\n */\nfunction Slider({\n icon,\n label,\n orientation = 'horizontal',\n showStops = false,\n size = 'xs',\n thumbLabels,\n ...props\n}: RefAttributes<HTMLDivElement> & SliderProps) {\n const vertical = orientation === 'vertical';\n return <RACSlider orientation={orientation} {...props} {...mergeStatefulStyles(stylex.props(groupStyles.root, styles.root, sizes[size], vertical && styles.rootVertical), props)}>\n {label === undefined ? null : <FieldLabel variant=\"group\">{label}</FieldLabel>}\n <SliderTrack {...mergeStatefulStyles((state: SliderTrackRenderProps) => ({\n 0: {\n className: \"x16gdi9t x9f619 x1ypdohk xh8yej3 x1n2onr6\"\n },\n 2: {\n className: \"x9f619 x1ypdohk x1n2onr6 x5yr21d x1iyjqo2 xluoxwi x2lwn1j\"\n },\n 1: {\n className: \"x16gdi9t x9f619 xh8yej3 x1n2onr6 x1h6gzvc\"\n },\n 3: {\n className: \"x9f619 x1n2onr6 x5yr21d x1iyjqo2 xluoxwi x2lwn1j x1h6gzvc\"\n }\n })[!!vertical << 1 | !!state.isDisabled << 0], {})}>\n {trackContent({\n icon,\n showStops,\n size,\n vertical\n }, thumbLabels)}\n </SliderTrack>\n </RACSlider>;\n}\n\n// The fractions of the way along the track that a step lands on, ends left\n// out: those are drawn as the end stops, the page's gap in from each end.\nfunction stepsOf(state: SliderState) {\n const min = state.getThumbMinValue(0);\n const max = state.getThumbMaxValue(state.values.length - 1);\n const fractions: number[] = [];\n if (state.step <= 0) {\n return fractions;\n }\n for (let index = 1; min + index * state.step < max; index++) {\n fractions.push(state.getValuePercent(min + index * state.step));\n }\n return fractions;\n}\n\n// What a handle draws: its value while it is dragged or has keyboard focus.\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 memoises\n// the result on its inputs.\nfunction thumbContent(index: number, vertical: boolean) {\n return (state: SliderThumbRenderProps) => state.isDragging || state.isFocusVisible ? <SliderOutput {...{\n 0: {\n className: \"x6s0dn4 x1c5gpgi xn3w4p2 x1dkaolv x9f619 x1girmi0 x78zum5 xkknnkr x14zspaw x1v9cpvo x3mk9i xbudbmw xl56j7k x155f00i x1lz68p4 x900493 x18fpw6u x10l6tqk xaf021q xuuh30 xuxw1ft\"\n },\n 1: {\n className: \"x6s0dn4 x1c5gpgi xn3w4p2 x1dkaolv x9f619 x1girmi0 x78zum5 xkknnkr x14zspaw x1v9cpvo xl56j7k x155f00i x1lz68p4 x900493 x18fpw6u x10l6tqk xuxw1ft xdd4er5 xwa60dl x15zsqls xhi6v0a x1cb1t30\"\n }\n }[!!vertical << 0]}>\n {state.state.getThumbValueLabel(index)}\n </SliderOutput> : null;\n}\nfunction thumbStyles(vertical: boolean) {\n return (state: SliderThumbRenderProps) => stylex.props(styles.thumb, vertical && styles.thumbVertical, (state.isDragging || state.isFocusVisible) && (vertical ? styles.thumbActiveVertical : styles.thumbActive), state.isDragging && styles.thumbDragging, state.isFocusVisible && styles.thumbFocused, state.isDisabled && styles.thumbDisabled);\n}\n\n// The track's parts and handles, from the slider's state: an inactive part\n// before the first handle of a range, the active part up to or between the\n// handles, and the inactive part after the last one carrying the stop.\nfunction trackContent(extras: Extras, thumbLabels: string[] | undefined) {\n return ({\n isDisabled,\n state\n }: SliderTrackRenderProps) => {\n const {\n icon,\n showStops,\n size,\n vertical\n } = extras;\n const fractions = state.values.map((_, index) => state.getThumbPercent(index));\n const first = fractions[0] ?? 0;\n const last = fractions.at(-1) ?? 0;\n const range = fractions.length > 1;\n const parts: Part[] = [...(range ? [{\n active: false,\n end: before(first),\n name: 'before',\n start: AT_END\n } as const] : []), {\n active: true,\n end: before(last),\n name: 'active',\n start: range ? after(first) : AT_END\n }, {\n active: false,\n end: AT_END,\n name: 'after',\n start: after(last)\n }];\n const hasIcon = icon !== undefined && icon !== null && !range && (size === 'md' || size === 'lg' || size === 'xl');\n const steps = showStops ? stepsOf(state) : [];\n const place = vertical ? placements.block : placements.inline;\n const innerStart = vertical ? styles.innerBlockStart : styles.innerInlineStart;\n const innerEnd = vertical ? styles.innerBlockEnd : styles.innerInlineEnd;\n return <>\n {parts.map(part => <span key={part.name} {...stylex.props(styles.segment, vertical && styles.segmentVertical, part.active && styles.active, part.active && hasIcon && styles.activeHoldingIcon, isDisabled && (part.active ? styles.activeDisabled : styles.inactiveDisabled), part.start !== AT_END && innerStart, part.end !== AT_END && innerEnd, place(insetOf(part.start), insetOf(part.end)))}>\n {partContent(part, extras, isDisabled, steps, part.active && hasIcon)}\n </span>)}\n {fractions.map((_, index) => <SliderThumb aria-label={thumbLabels?.[index]} index={index}\n // oxlint-disable-next-line react/no-array-index-key -- a handle's position is its identity\n key={index} {...mergeStatefulStyles(thumbStyles(vertical), {})}>\n {thumbContent(index, vertical)}\n </SliderThumb>)}\n </>;\n };\n}\nexport type { SliderProps, SliderSize };\nexport default Slider;"],"mappings":";;;;;;;;;;AAgFA,MAAMO,QAAQD;;AAEd,MAAME,OAAO;AAQb,MAAMC,QAAQ;CACZC,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBC,OAAO;CACT;CACAC,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBD,OAAO;CACT;CACAE,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClBF,OAAO;CACT;CACAG,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBH,OAAO;CACT;CACAI,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClBJ,OAAO;CACT;AACF;AACA,MAAMK,SAAS;CACbC,QAAQ;EACNC,QAAQ;EACRP,OAAO;CACT;CACAQ,gBAAgB;EACdD,QAAQ;EACRP,OAAO;CACT;CACAS,mBAAmB;EACjBC,QAAQ;EACRV,OAAO;CACT;CACAW,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRrB,OAAO;CACT;CACAsB,cAAc;EACZR,QAAQ;EACRd,OAAO;CACT;CACAuB,eAAe;EACbR,QAAQ;EACRf,OAAO;CACT;CACAwB,iBAAiB;EACfT,QAAQ;EACRf,OAAO;CACT;CACAyB,gBAAgB;EACdV,QAAQ;EACRf,OAAO;CACT;CACA0B,kBAAkB;EAChBX,QAAQ;EACRf,OAAO;CACT;CACA2B,cAAc;EACZC,QAAQ;EACRV,QAAQ;EACRC,QAAQ;EACRnB,OAAO;CACT;CACA6B,kBAAkB;EAChBtB,QAAQ;EACRP,OAAO;CACT;CACA8B,eAAe;E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3E,WAAWpF,OAAOyB,gBAAgBzB,OAAO+B;EAC1D,OAAO,qBAAA,UAAA,EAAA,UAAA,CACF8H,MAAM1C,KAAIZ,SAAQ,oBAAC,QAAD;GAAsB,GAAItH,MAAae,OAAOmC,SAASiD,YAAYpF,OAAO0C,iBAAiB6D,KAAKtG,UAAUD,OAAOC,QAAQsG,KAAKtG,UAAUyG,WAAW1G,OAAOI,mBAAmB4F,eAAeO,KAAKtG,SAASD,OAAOG,iBAAiBH,OAAOwB,mBAAmB+E,KAAK7B,UAAUiB,UAAUmE,YAAYvD,KAAK5B,QAAQgB,UAAUoE,UAAU/C,MAAMb,QAAQI,KAAK7B,KAAK,GAAGyB,QAAQI,KAAK5B,GAAG,CAAC,CAAC;GAC7X2B,UAAAA,YAAYC,MAAMC,QAAQR,YAAYS,OAAOF,KAAKtG,UAAUyG,OAAO;EAChE,GAFsBH,KAAKhB,IAE3B,CAAC,GACRsD,UAAU1B,KAAKoC,GAAGR,UAAU,oBAAC,aAAD;GAAa,cAAYrD,cAAcqD;GAAeA;GAEzE,GAAI1J,oBAAoBiK,YAAYlE,QAAQ,GAAG,CAAC,CAAC;GACtD8D,UAAAA,aAAaH,OAAO3D,QAAQ;EAClB,GAFZ2D,KAEY,CAAC,CAClB,EAAA,CAAA;CACJ;AACF"}
@@ -139,5 +139,4 @@ declare function Snackbar({ closeLabel, queue, ...props }: RefAttributes<HTMLDiv
139
139
  declare namespace Snackbar {
140
140
  var Queue: typeof SnackbarQueue;
141
141
  }
142
- export { type SnackbarAction, type SnackbarMessage, type SnackbarOptions, type SnackbarProps, type SnackbarQueue, type ToastRegionRenderProps as SnackbarRegionRenderProps, Snackbar as default };
143
- //# sourceMappingURL=index.d.ts.map
142
+ export { type SnackbarAction, type SnackbarMessage, type SnackbarOptions, type SnackbarProps, type SnackbarQueue, type ToastRegionRenderProps as SnackbarRegionRenderProps, Snackbar as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","ReactNode","RefAttributes","FocusableElement","ToastRegionProps","RACToastRegionProps","ToastRegionRenderProps","stylex","useSyncExternalStore","Button","RACButton","UNSTABLE_Toast","RACToast","UNSTABLE_ToastContent","RACToastContent","UNSTABLE_ToastQueue","RACToastQueue","UNSTABLE_ToastRegion","RACToastRegion","Text","CloseGlyph","useBottomEdgeClearance","useRipple","layers","mergeStatefulStyles","colors","motion","radii","shadows","sizing","spacing","stateLayerOpacity","typography","MESSAGE_MS","MINIMUM_MS","UNTIL_CLOSED","EXIT_MS","WIDE","rise","fadeOut","FORCED_COLORS","TARGET_SIZE","_temp","krVfgx","kGO01o","styles","action","kgeoSG","kGOzcv","kpsdNU","kEoFBp","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kAzted","k8WAf4","kg3NbH","$$css","close","kZKoxP","kzqmXN","kmVPX3","control","kGNEyG","kWkggS","kaIpWk","kMzoRj","kB7OPa","kkrTdU","k1xSpc","kmuXW","kjj79g","kjBf7l","kInvED","k3XXqK","kMeerF","kVAEAm","controlFocused","controlHovered","controlPressed","region","kXwgrk","kOIVth","kkqhue","kLKAdn","kE3dHu","kpe85a","kfzvcC","kY2c9j","risen","clearance","val","undefined","SnackbarAction","label","onPress","SnackbarMessage","message","showCloseButton","SnackbarOptions","onClose","timeout","SnackbarProps","className","closeLabel","queue","SnackbarQueue","style","Omit","SnackbarToastItem","FadingToastQueue","fading","Set","listeners","onClosing","key","constructor","maxVisibleToasts","add","setTimeout","delete","listener","isFading","has","subscribeToFading","rac","open","Map","toasts","closing","options","clear","readableTimeout","set","keys","#closing","get","actionPress","closeToast","controlClassName","StyleXStyles","state","isFocusVisible","isHovered","isPressed","props","Math","max","Snackbar","t0","$","T0","t1","t2","t3","snackbarContent","t4","SnackbarButton","children","ripple","handlers","surface","toast","SnackbarControls","SnackbarToast","content","useFading","Symbol","for","0","1","t5","_temp2","Queue","SnackbarRegionRenderProps","RACToastQueue","stylex.props","_c","props","RACToastRegion","RACButton","RACToastContent","RACToast"],"sources":["../../../src/components/snackbar/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { FocusableElement, ToastRegionProps as RACToastRegionProps, ToastRegionRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useSyncExternalStore } from 'react';\nimport { Button as RACButton, UNSTABLE_Toast as RACToast, UNSTABLE_ToastContent as RACToastContent, UNSTABLE_ToastQueue as RACToastQueue, UNSTABLE_ToastRegion as RACToastRegion, Text } from 'react-aria-components';\nimport { CloseGlyph } from '../../glyphs';\nimport { useBottomEdgeClearance } from '../../hooks/useBottomEdge';\nimport { useRipple } from '../../hooks/useRipple';\nimport '../../styles/layers.stylex';\nimport { layers } from '../../styles/layers.stylex';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The snackbar page's brief message at the bottom of the screen, with an\n// optional action beside it and an optional close button after that. The\n// page's container is the inverse surface at a 4dp corner and elevation 3,\n// its supporting text is body-medium in inverse on surface, its action label\n// is inverse primary, and its close icon takes the supporting text's colour.\n// The measurements are the page's too: 8dp of margin from the edges of the\n// screen, 8dp of padding inside the container with another 8dp either side\n// of the message, 14dp above and below on a single line, and between 320 and\n// 576dp wide above the page's 600dp breakpoint — full width below it.\n//\n// One at a time. The page shows a single snackbar and replaces it rather\n// than stacking, so a message added while another is up closes that one —\n// its `onClose` runs — and takes its place. Nothing waits behind it: React\n// Aria's queue, left to itself, kept every message and showed the one it had\n// replaced again once the newer closed, so an Undo could come back long after\n// the thing it undid.\n//\n// React Aria's toast is the behaviour: the region is a landmark that holds\n// the message, moves focus into it for a keyboard, and pauses every timer\n// while it is hovered or focused, so a message never expires while it is\n// being read or acted on.\n//\n// Three things are decided here rather than taken from React Aria or from\n// the page.\n//\n// **The queue is ours, not React Aria's.** React Aria's toast is still\n// `UNSTABLE_`, and `SnackbarQueue` is what keeps that name out of a\n// consumer's code — an upstream rename is this file rather than every call\n// site. It wraps their queue, defaults it to one visible message, and takes\n// the message and its options as one call.\n//\n// **The action and the close button are drawn here rather than through\n// Button and IconButton.** The page colours them inverse primary and inverse\n// on surface, which no variant of either carries, and a colour pushed in\n// from outside through `className` is the merge hazard AGENTS.md describes:\n// StyleX decides between two atomic classes by their order in the compiled\n// stylesheet, not by the order they are applied. Both are React Aria's\n// `Button` with the same ripple and the same state layers, over\n// `currentColor` so each takes the colour the snackbar gives it.\n//\n// **There is no `container` prop.** Every other overlay here takes one,\n// because React Aria's `Modal` and `Popover` accept a portal container, and\n// `src/components/portal-container.test.tsx` is what keeps that true.\n// Its toast region does not: it reads a portal provider that\n// `react-aria-components` does not export, so the region always lands at the\n// end of `<body>`. An app that scopes its StyleX theme to a subtree has to\n// put the theme on `:root` for the snackbar to be drawn in it.\n\n// How long a message is shown when the call site names no `timeout`. The\n// specs page gives no duration, so these come from the snackbar's guidelines\n// and accessibility pages.\n//\n// A message alone leaves after five seconds. The pages allow four to ten, and\n// React Aria's toast docs set five as the least a reader should be given.\n//\n// A call site's own `timeout` is held to the pages' four. A shorter one is\n// lengthened to that, since a message gone in a second cannot be read, and the\n// web gives a reader no setting to slow it down with — the same reason the\n// paragraph below gives. `0` is left alone: it is no timer at all.\n//\n// A message with an action stays until the action is taken or something\n// closes it, as the pages ask of every actionable snackbar. No timer can know\n// how long a reader needs to act: a screen reader user hears the message\n// first and has to reach the region before the action is any use, and the\n// pause while the region is hovered or focused only starts once they have.\n// Android's snackbar can keep shorter defaults because the platform lengthens\n// them from each user's accessibility settings, and the web has no such\n// setting to read.\nconst MESSAGE_MS = 5000;\nconst MINIMUM_MS = 4000;\nconst UNTIL_CLOSED = 0;\n\n// How long a closing snackbar takes to fade, and so how long it stays in the\n// document once something has closed it: `durationShort2`, the token the fade\n// below runs for. A theme that lengthens that token has its fade cut short\n// here, since the queue cannot read a duration out of the stylesheet.\nconst EXIT_MS = 150;\n\n// Below the page's 600dp breakpoint the snackbar runs the width of the\n// screen; above it, it takes between 320 and 576.\nconst WIDE = '@media (min-width: 600px)';\n\n// The page's own is a fade, in and out. It rises a little as it arrives too,\n// which is what the page draws and what says the message came from the edge\n// of the screen rather than appearing over it. It leaves by the fade alone,\n// and quicker than it came, on the curve for something going away: once it is\n// closed there is nothing left on it to read.\nconst rise = \"x15b941j-B\";\nconst fadeOut = \"x1jn504y-B\";\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The least press area the action keeps, as Button's medium size does. A\n// literal rather than a token, for the reason Button's `TARGET_SIZE` gives: a\n// consumer resizing their controls should not shrink a floor the page states.\nconst TARGET_SIZE = '48px';\nconst _temp = {\n krVfgx: \"xiicpxy\",\n kGO01o: \"xqf7pud\",\n \"$$css\": true\n};\nconst styles = {\n action: {\n kgeoSG: \"x1cpjm7i\",\n kGOzcv: \"xun2zgk\",\n kpsdNU: \"xm4btww\",\n kEoFBp: \"x1hmns74\",\n kMwMTN: \"x16bex6i\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kAzted: \"x1cio8j0\",\n k8WAf4: \"x1cmllll\",\n kg3NbH: \"x18fpw6u\",\n $$css: true\n },\n close: {\n kZKoxP: \"xbg5kjn\",\n kMwMTN: \"x1girmi0\",\n kzqmXN: \"xoqf9c6\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n control: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n kjBf7l: \"x14ytart\",\n kInvED: \"xr2mjdv\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n controlFocused: {\n kWkggS: \"x1mbb5iu\",\n $$css: true\n },\n controlHovered: {\n kWkggS: \"x930l3l\",\n $$css: true\n },\n controlPressed: {\n kWkggS: \"xsykwg8\",\n $$css: true\n },\n region: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x126z3so\",\n krVfgx: \"x1ey2m1c\",\n kkqhue: \"x17y0mx6\",\n k3XXqK: \"x1t137rt\",\n kGO01o: \"x1u7mh7p\",\n kLKAdn: \"xi7mcox\",\n kE3dHu: \"xbpsoft\",\n kpe85a: \"xq5vm52\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"xixxii4\",\n kY2c9j: \"x1bk8fjm\",\n $$css: true\n },\n risen: (clearance: string) => [_temp, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(clearance)\n }]\n};\ntype SnackbarAction = {\n /** What the action says. The page gives it a single word where it can. */\n label: string;\n /** Run when the action is pressed, just before the snackbar closes. */\n onPress: () => void;\n};\n\n/** What a snackbar carries: its message, and what may sit beside it. */\ntype SnackbarMessage = {\n action: SnackbarAction | undefined;\n message: ReactNode;\n showCloseButton: boolean;\n};\ntype SnackbarOptions = {\n /**\n * A single action shown after the message. Pressing it runs `onPress` and\n * closes the snackbar, which is what the page draws.\n */\n action?: SnackbarAction;\n /**\n * Run when the snackbar closes, however it was closed: by its timer, its\n * action or close button, `close`, `clear`, or a newer message added in its\n * place. It runs as the snackbar starts to fade out, not once it has gone.\n */\n onClose?: () => void;\n /**\n * Whether a close button is shown at the end. The page draws one for a\n * message a reader may want out of the way before it expires.\n *\n * Named for what it draws rather than `isDismissable`, which on `Sheet`,\n * `Dialog` and React Aria's modals is whether a press outside them closes\n * them — a snackbar has no outside to press.\n * @default false\n */\n showCloseButton?: boolean;\n /**\n * How long the snackbar is shown, in milliseconds. Defaults to five seconds\n * for a message alone. A message with an action defaults to `0` and stays\n * until the action is taken or something closes it, as Material Design asks\n * of an actionable snackbar, since a reader may need longer to reach the\n * action than any timer allows. The timer is paused while the region is\n * hovered or focused, so a message never expires while it is being read.\n *\n * A timer shorter than four seconds, the least Material Design allows, is\n * lengthened to four, since a message gone sooner cannot be read.\n *\n * `0` is the page's indefinite length: the snackbar stays until something\n * closes it. Give one of those an action or `showCloseButton`, or there is no\n * way to be rid of it.\n */\n timeout?: number;\n};\ntype SnackbarProps = {\n /**\n * What a screen reader calls the region holding the snackbar. Left out,\n * React Aria names the region itself: a count of the messages it holds, in\n * the reader's own locale — \"1 notification.\" in English, and one of some\n * thirty languages otherwise. Pass a name only to replace that, and pass a\n * translated one, since whatever is passed is read as written.\n */\n 'aria-label'?: string;\n /** A function may compute the class from the region's render state. */\n className?: RACToastRegionProps<SnackbarMessage>['className'];\n /**\n * What a screen reader calls the button that dismisses a snackbar. It sits\n * here rather than on a message's own options because it does not vary by\n * message, so putting it there would make every `add` call repeat it. Left\n * out, React Aria names it in the reader's locale — \"Close\" in English.\n */\n closeLabel?: string;\n /** The queue the region shows messages from. */\n queue: SnackbarQueue;\n /** A function may compute the style from the region's render state. */\n style?: RACToastRegionProps<SnackbarMessage>['style'];\n} & Omit<RACToastRegionProps<SnackbarMessage>, 'aria-label' | 'children' | 'className' | 'queue' | 'style'>;\n\n// One entry of the queue, as React Aria hands it to the region's render\n// function. Taken from its render state rather than imported from\n// `react-stately`, which this package does not depend on.\ntype SnackbarToastItem = ToastRegionRenderProps<SnackbarMessage>['visibleToasts'][number];\n\n/**\n * React Aria's queue, made to keep a closing snackbar on screen while it\n * fades. React Aria drops a toast from its list the moment it closes, and the\n * region unmounts with its last toast, so a closing strip has no state of its\n * own to be drawn in. Every close reaches `close` here — React Aria's timer and\n * its close button call it on the queue they were handed, as `SnackbarQueue`\n * does — so this one override covers all of them: the strip is marked as\n * fading, and React Aria closes it once the fade has run.\n */\nclass FadingToastQueue extends RACToastQueue<SnackbarMessage> {\n // The strips fading out.\n readonly #fading = new Set<string>();\n readonly #listeners = new Set<() => void>();\n\n // Run as a strip starts to close — see `SnackbarQueue`.\n readonly #onClosing: (key: string) => void;\n constructor(onClosing: (key: string) => void) {\n // One at a time, which is what the page shows. React Aria shows the\n // newest, so a message added while another is up or fading takes its\n // place at once, and the older one runs out its fade unseen.\n super({\n maxVisibleToasts: 1\n });\n this.#onClosing = onClosing;\n }\n\n /** Starts a toast fading, and closes it once the fade has run. */\n override close(key: string) {\n this.#onClosing(key);\n this.#fading.add(key);\n setTimeout(() => {\n this.#fading.delete(key);\n super.close(key);\n }, EXIT_MS);\n for (const listener of this.#listeners) {\n listener();\n }\n }\n\n /** Whether a toast is fading out. */\n isFading(key: string) {\n return this.#fading.has(key);\n }\n\n /** Calls `listener` whenever a toast starts to fade. */\n subscribeToFading(listener: () => void) {\n this.#listeners.add(listener);\n return () => {\n this.#listeners.delete(listener);\n };\n }\n}\n\n/**\n * The queue a snackbar is shown from. Make one where the app can reach it —\n * a module of its own is the usual place — mount `Snackbar` once with it,\n * and call `add` from anywhere.\n *\n * ```ts\n * const messages = new Snackbar.Queue()\n * messages.add('Label', { action: { label: 'Undo', onPress: undo } })\n * ```\n *\n * It wraps React Aria's toast queue rather than exposing it, which is what\n * keeps that API's `UNSTABLE_` name out of a consumer's code.\n */\nclass SnackbarQueue {\n /**\n * React Aria's queue, which `Snackbar` subscribes to. Not part of the\n * package's API — read it and an upstream release may break the call site.\n */\n readonly rac: RACToastQueue<SnackbarMessage>;\n\n // The snackbars not yet closed, each with its `onClose`, which `add` and\n // `clear` close. Kept here because React Aria keeps its own list private,\n // and its own `clear` empties that list without running a single `onClose`.\n readonly #open = new Map<string, (() => void) | undefined>();\n\n // `rac` as the class it is, which `rac` itself is not declared as so that\n // the subclass stays out of the package's API.\n readonly #toasts: FadingToastQueue;\n constructor() {\n this.#toasts = new FadingToastQueue(key => {\n this.#closing(key);\n });\n this.rac = this.#toasts;\n }\n\n /**\n * Shows a message in place of the one on screen, and returns the key that\n * closes it. The message it replaces is closed, so its `onClose` runs, and\n * it does not come back.\n */\n add(message: ReactNode, options: SnackbarOptions = {}) {\n const {\n action,\n onClose,\n showCloseButton = false,\n timeout\n } = options;\n this.clear();\n const key = this.#toasts.add({\n action,\n message,\n showCloseButton\n }, {\n timeout: readableTimeout(timeout ?? (action === undefined ? MESSAGE_MS : UNTIL_CLOSED))\n });\n this.#open.set(key, onClose);\n return key;\n }\n\n /** Closes the snackbar on screen, running its `onClose`. */\n clear() {\n // Each close runs that message's `onClose`, which deletes its own key\n // from the map — the entry being visited, which a Map allows.\n for (const key of this.#open.keys()) {\n this.#toasts.close(key);\n }\n }\n\n /** Closes one snackbar, by the key `add` returned. */\n close(key: string) {\n this.#toasts.close(key);\n }\n\n // A snackbar starting to close, however it was closed — its timer runs\n // inside React Aria's queue, past this one — leaves the open map and runs\n // its `onClose` on the way out.\n #closing(key: string) {\n const onClose = this.#open.get(key);\n if (this.#open.delete(key)) {\n onClose?.();\n }\n }\n}\n\n// The three handlers the snackbar hands to something below it, each 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; the React Compiler memoises the result on\n// its inputs.\nfunction actionPress(action: SnackbarAction, close: () => void) {\n return () => {\n action.onPress();\n close();\n };\n}\nfunction closeToast(queue: SnackbarQueue, key: string) {\n return () => {\n queue.close(key);\n };\n}\n\n// A control's classes, from its own render state — see `controlFocused`.\nfunction controlClassName(style: stylex.StyleXStyles) {\n return (state: {\n isFocusVisible: boolean;\n isHovered: boolean;\n isPressed: boolean;\n }) => stylex.props(styles.control, style, state.isHovered && styles.controlHovered, state.isFocusVisible && styles.controlFocused, state.isPressed && styles.controlPressed).className ?? '';\n}\n\n// A timer the reader has time to read by — see the durations at the top of\n// this file. Only a timer is held to the minimum: React Aria runs none for `0`\n// or below, which keep the message until something closes it.\nfunction readableTimeout(timeout: number) {\n return timeout > UNTIL_CLOSED ? Math.max(timeout, MINIMUM_MS) : timeout;\n}\n\n/**\n * A brief message at the bottom of the screen, with an optional action. Mount\n * one of these with a `Snackbar.Queue`, and call the queue's `add` to show a\n * message from anywhere.\n *\n * ```tsx\n * const messages = new Snackbar.Queue()\n *\n * <Snackbar queue={messages} />\n * ```\n *\n * The region is portalled to the end of `<body>` and renders nothing while\n * the queue is empty. It is one region rather than one per message, so mount\n * it once, near the root.\n *\n * The call site's `className` and `style` land on that region, which is the\n * element a layout positions.\n *\n * While a full-screen `Dialog` or a `Sheet` with a footer is open, the region\n * rises to sit above those actions rather than over them, since they share\n * the bottom edge of the window and the snackbar is drawn above both.\n *\n * While a `Dialog` or a `Sheet` is open, Tab stays inside it and never\n * reaches the snackbar. F6 does: React Aria moves focus between landmarks\n * with it, so it lands on the region, Tab then reaches the message and its\n * action, and tabbing on past the last of them leads back into the dialog. A\n * message with an action stays until it is answered, so a keyboard user has\n * the time that route takes.\n */\nfunction Snackbar({\n closeLabel,\n queue,\n ...props\n}: RefAttributes<HTMLDivElement> & SnackbarProps) {\n const clearance = useBottomEdgeClearance();\n return <RACToastRegion<SnackbarMessage> queue={queue.rac} {...props} {...mergeStatefulStyles(stylex.props(styles.region, clearance > 0 && styles.risen(`${clearance}px`)), props)}>\n {snackbarContent(queue, closeLabel)}\n </RACToastRegion>;\n}\n\n/**\n * One of the snackbar's two controls. React Aria's `Button` rather than the\n * library's, for the colour reason in the comment at the top of this file;\n * the ripple and the state layers are the same ones every other control\n * here draws, over `currentColor`.\n */\nfunction SnackbarButton({\n children,\n style,\n ...props\n}: {\n 'aria-label'?: string;\n children: ReactNode;\n onPress?: () => void;\n slot?: string;\n style: stylex.StyleXStyles;\n}) {\n const ripple = useRipple<FocusableElement>();\n return <RACButton {...ripple.handlers} {...props} className={controlClassName(style)}>\n {children}\n {ripple.surface}\n </RACButton>;\n}\nfunction snackbarContent(queue: SnackbarQueue, closeLabel: string | undefined) {\n return ({\n toast\n }: {\n toast: SnackbarToastItem;\n }) => <SnackbarToast close={closeToast(queue, toast.key)} closeLabel={closeLabel} queue={queue} toast={toast} />;\n}\n\n/**\n * The action, the close button, or nothing, after the message — together, so\n * they move beneath it together.\n */\nfunction SnackbarControls({\n action,\n close,\n closeLabel,\n fading,\n showCloseButton\n}: {\n action: SnackbarAction | undefined;\n close: () => void;\n closeLabel: string | undefined;\n fading: boolean;\n showCloseButton: boolean;\n}) {\n if (action === undefined && !showCloseButton) {\n return null;\n }\n return <div className=\"x6s0dn4 x9f619 x78zum5 x2lah0s xvc5jky\">\n {action === undefined ? null :\n // Nothing on a fading strip answers a press: its action has already\n // run, and an Undo pressed twice would undo twice.\n <SnackbarButton onPress={fading ? undefined : actionPress(action, close)} style={styles.action}>\n {action.label}\n </SnackbarButton>}\n {showCloseButton ? <SnackbarButton aria-label={closeLabel} slot=\"close\" style={styles.close}>\n <CloseGlyph className=\"xxk0z11 xvy4d1p\" />\n </SnackbarButton> : null}\n </div>;\n}\n\n/** One snackbar: its message, then whatever sits after it. */\nfunction SnackbarToast({\n close,\n closeLabel,\n queue,\n toast\n}: {\n close: () => void;\n closeLabel: string | undefined;\n queue: SnackbarQueue;\n toast: SnackbarToastItem;\n}) {\n const {\n action,\n message,\n showCloseButton\n } = toast.content;\n const fading = useFading(queue, toast.key);\n return <RACToast toast={toast} {...{\n 0: {\n className: \"x6s0dn4 x1n1nwrg x1u6grsq x1dwmuk9 x16dv9tl x1c5gpgi x1w1tqly x1tfhd1 xx61lck x13rsnn2 x1udv5rz x9f619 x78zum5 x1a02dak xh8yej3 x1x1rfll xlx31pv x1dry9sr xeuugli xuq8xha x1ulcdur xr2mjdv x9v5kkp x1t137rt x1de99jn xt970qd xn60lsn x67bb7w\"\n },\n 1: {\n className: \"x6s0dn4 x1c5gpgi x1w1tqly x1tfhd1 xx61lck x13rsnn2 x1udv5rz x9f619 x78zum5 x1a02dak xh8yej3 x1x1rfll xlx31pv x1dry9sr xeuugli xuq8xha x1ulcdur xr2mjdv x9v5kkp x1t137rt x1de99jn xt970qd xn60lsn x1vhuh8u x1u6grsq x10e4vud xxp0q0x xi22y15 x47corl\"\n }\n }[!!fading << 0]}>\n <RACToastContent className=\"x9f619 x1girmi0 x4pfjvb x1iyjqo2 xpo2rfv x193rfdd x1hews6w xkjl1po xn43zvd xv61bfh xz158ff xeuugli xj0a0fe xxlmvz2\">\n <Text slot=\"title\">{message}</Text>\n </RACToastContent>\n <SnackbarControls action={action} close={close} closeLabel={closeLabel} fading={fading} showCloseButton={showCloseButton} />\n </RACToast>;\n}\n\n/**\n * Whether a snackbar is fading out of its queue. `rac` is always the queue\n * that fades, but is declared as React Aria's, so it is narrowed back here.\n */\nfunction useFading(queue: SnackbarQueue, key: string) {\n const toasts = queue.rac instanceof FadingToastQueue ? queue.rac : undefined;\n return useSyncExternalStore(listener => toasts?.subscribeToFading(listener) ?? (() => {}), () => toasts?.isFading(key) ?? false);\n}\nSnackbar.Queue = SnackbarQueue;\n\n// The queue is reached as `Snackbar.Queue` rather than exported beside the\n// component: this file would otherwise export something that is not a\n// component, which is what turns fast refresh off for it.\nexport type { SnackbarAction, SnackbarMessage, SnackbarOptions, SnackbarProps, SnackbarQueue, ToastRegionRenderProps as SnackbarRegionRenderProps };\nexport default Snackbar;"],"mappings":";;;;;;;;;;;AAoFA,MAAMkC,aAAa;AACnB,MAAMC,aAAa;AACnB,MAAMC,eAAe;AAMrB,MAAMC,UAAU;AAwBhB,MAAMM,QAAQ;CACZC,QAAQ;CACRC,QAAQ;CACR,SAAS;AACX;AACA,MAAMC,SAAS;CACbC,QAAQ;EACNC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EAC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GAAK,GAAMT;GAA5B,UAAA,CAQHC,IAGAE,EAXY;;EAYHN,EAAA,KAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAM;EAAAN,EAAA,MAAAY;EAAAZ,EAAA,MAAAqB;CAAA,OAAAA,KAAArB,EAAA;CAAA,OAZNqB;AAYM;;;;;AAOf,SAAAL,UAAA7D,OAAAU,KAAA;CAAA,MAAAmC,IAAAzJ,EAAA,CAAA;CACE,MAAAmI,SAAevB,MAAKoB,eAAgBf,mBAAmBL,MAAKoB,MAA7CjC,KAAAA;CAA8D,IAAAyD;CAAA,IAAAC,EAAA,OAAAtB,QAAA;EACjDqB,MAAA5B,aAAYO,QAAMJ,kBAAoBH,QAAsB,KAAhDmD;EAAiDtB,EAAA,KAAAtB;EAAAsB,EAAA,KAAAD;CAAA,OAAAA,KAAAC,EAAA;CAAA,IAAAE;CAAA,IAAAF,EAAA,OAAAnC,OAAAmC,EAAA,OAAAtB,QAAA;EAAEwB,WAAMxB,QAAMN,SAAWP,GAAY,KAA7B;EAA8BmC,EAAA,KAAAnC;EAAAmC,EAAA,KAAAtB;EAAAsB,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAAxHjJ,qBAAqBgJ,IAA+DG,EAAoC;AAAC;AAFlI,SAAAoB,SAAA,CAAA;AAIAxB,SAASyB,QAAQnE"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","useSyncExternalStore","RACToastQueue","RACToastRegion","useBottomEdgeClearance","useRipple","mergeStatefulStyles","MESSAGE_MS","MINIMUM_MS","UNTIL_CLOSED","EXIT_MS","_temp","krVfgx","kGO01o","styles","action","kgeoSG","kGOzcv","kpsdNU","kEoFBp","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kAzted","k8WAf4","kg3NbH","$$css","close","kZKoxP","kzqmXN","kmVPX3","control","kGNEyG","kWkggS","kaIpWk","kMzoRj","kB7OPa","kkrTdU","k1xSpc","kmuXW","kjj79g","kjBf7l","kInvED","k3XXqK","kMeerF","kVAEAm","controlFocused","controlHovered","controlPressed","region","kXwgrk","kOIVth","kkqhue","kLKAdn","kE3dHu","kpe85a","kfzvcC","kY2c9j","risen","clearance","val","undefined","label","onPress","message","showCloseButton","onClose","timeout","className","closeLabel","queue","SnackbarQueue","style","FadingToastQueue","fading","Set","onClosing","key","constructor","maxVisibleToasts","add","setTimeout","delete","listener","isFading","has","subscribeToFading","rac","Map","toasts","options","clear","readableTimeout","set","keys","get","actionPress","closeToast","controlClassName","state","isFocusVisible","isHovered","isPressed","props","Math","max","Snackbar","t0","$","T0","t1","t2","t3","snackbarContent","t4","SnackbarButton","children","ripple","handlers","surface","toast","SnackbarControls","SnackbarToast","content","useFading","Symbol","for","0","1","t5","_temp2","Queue","RACButton","RACToastContent","RACToast"],"sources":["../../../src/components/snackbar/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { FocusableElement, ToastRegionProps as RACToastRegionProps, ToastRegionRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useSyncExternalStore } from 'react';\nimport { Button as RACButton, UNSTABLE_Toast as RACToast, UNSTABLE_ToastContent as RACToastContent, UNSTABLE_ToastQueue as RACToastQueue, UNSTABLE_ToastRegion as RACToastRegion, Text } from 'react-aria-components';\nimport { CloseGlyph } from '../../glyphs';\nimport { useBottomEdgeClearance } from '../../hooks/useBottomEdge';\nimport { useRipple } from '../../hooks/useRipple';\nimport '../../styles/layers.stylex';\nimport { layers } from '../../styles/layers.stylex';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The snackbar page's brief message at the bottom of the screen, with an\n// optional action beside it and an optional close button after that. The\n// page's container is the inverse surface at a 4dp corner and elevation 3,\n// its supporting text is body-medium in inverse on surface, its action label\n// is inverse primary, and its close icon takes the supporting text's colour.\n// The measurements are the page's too: 8dp of margin from the edges of the\n// screen, 8dp of padding inside the container with another 8dp either side\n// of the message, 14dp above and below on a single line, and between 320 and\n// 576dp wide above the page's 600dp breakpoint — full width below it.\n//\n// One at a time. The page shows a single snackbar and replaces it rather\n// than stacking, so a message added while another is up closes that one —\n// its `onClose` runs — and takes its place. Nothing waits behind it: React\n// Aria's queue, left to itself, kept every message and showed the one it had\n// replaced again once the newer closed, so an Undo could come back long after\n// the thing it undid.\n//\n// React Aria's toast is the behaviour: the region is a landmark that holds\n// the message, moves focus into it for a keyboard, and pauses every timer\n// while it is hovered or focused, so a message never expires while it is\n// being read or acted on.\n//\n// Three things are decided here rather than taken from React Aria or from\n// the page.\n//\n// **The queue is ours, not React Aria's.** React Aria's toast is still\n// `UNSTABLE_`, and `SnackbarQueue` is what keeps that name out of a\n// consumer's code — an upstream rename is this file rather than every call\n// site. It wraps their queue, defaults it to one visible message, and takes\n// the message and its options as one call.\n//\n// **The action and the close button are drawn here rather than through\n// Button and IconButton.** The page colours them inverse primary and inverse\n// on surface, which no variant of either carries, and a colour pushed in\n// from outside through `className` is the merge hazard AGENTS.md describes:\n// StyleX decides between two atomic classes by their order in the compiled\n// stylesheet, not by the order they are applied. Both are React Aria's\n// `Button` with the same ripple and the same state layers, over\n// `currentColor` so each takes the colour the snackbar gives it.\n//\n// **There is no `container` prop.** Every other overlay here takes one,\n// because React Aria's `Modal` and `Popover` accept a portal container, and\n// `src/components/portal-container.test.tsx` is what keeps that true.\n// Its toast region does not: it reads a portal provider that\n// `react-aria-components` does not export, so the region always lands at the\n// end of `<body>`. An app that scopes its StyleX theme to a subtree has to\n// put the theme on `:root` for the snackbar to be drawn in it.\n\n// How long a message is shown when the call site names no `timeout`. The\n// specs page gives no duration, so these come from the snackbar's guidelines\n// and accessibility pages.\n//\n// A message alone leaves after five seconds. The pages allow four to ten, and\n// React Aria's toast docs set five as the least a reader should be given.\n//\n// A call site's own `timeout` is held to the pages' four. A shorter one is\n// lengthened to that, since a message gone in a second cannot be read, and the\n// web gives a reader no setting to slow it down with — the same reason the\n// paragraph below gives. `0` is left alone: it is no timer at all.\n//\n// A message with an action stays until the action is taken or something\n// closes it, as the pages ask of every actionable snackbar. No timer can know\n// how long a reader needs to act: a screen reader user hears the message\n// first and has to reach the region before the action is any use, and the\n// pause while the region is hovered or focused only starts once they have.\n// Android's snackbar can keep shorter defaults because the platform lengthens\n// them from each user's accessibility settings, and the web has no such\n// setting to read.\nconst MESSAGE_MS = 5000;\nconst MINIMUM_MS = 4000;\nconst UNTIL_CLOSED = 0;\n\n// How long a closing snackbar takes to fade, and so how long it stays in the\n// document once something has closed it: `durationShort2`, the token the fade\n// below runs for. A theme that lengthens that token has its fade cut short\n// here, since the queue cannot read a duration out of the stylesheet.\nconst EXIT_MS = 150;\n\n// Below the page's 600dp breakpoint the snackbar runs the width of the\n// screen; above it, it takes between 320 and 576.\nconst WIDE = '@media (min-width: 600px)';\n\n// The page's own is a fade, in and out. It rises a little as it arrives too,\n// which is what the page draws and what says the message came from the edge\n// of the screen rather than appearing over it. It leaves by the fade alone,\n// and quicker than it came, on the curve for something going away: once it is\n// closed there is nothing left on it to read.\nconst rise = \"x15b941j-B\";\nconst fadeOut = \"x1jn504y-B\";\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The least press area the action keeps, as Button's medium size does. A\n// literal rather than a token, for the reason Button's `TARGET_SIZE` gives: a\n// consumer resizing their controls should not shrink a floor the page states.\nconst TARGET_SIZE = '48px';\nconst _temp = {\n krVfgx: \"xiicpxy\",\n kGO01o: \"xqf7pud\",\n \"$$css\": true\n};\nconst styles = {\n action: {\n kgeoSG: \"x1cpjm7i\",\n kGOzcv: \"xun2zgk\",\n kpsdNU: \"xm4btww\",\n kEoFBp: \"x1hmns74\",\n kMwMTN: \"x16bex6i\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kAzted: \"x1cio8j0\",\n k8WAf4: \"x1cmllll\",\n kg3NbH: \"x18fpw6u\",\n $$css: true\n },\n close: {\n kZKoxP: \"xbg5kjn\",\n kMwMTN: \"x1girmi0\",\n kzqmXN: \"xoqf9c6\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n control: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n kjBf7l: \"x14ytart\",\n kInvED: \"xr2mjdv\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n controlFocused: {\n kWkggS: \"x1mbb5iu\",\n $$css: true\n },\n controlHovered: {\n kWkggS: \"x930l3l\",\n $$css: true\n },\n controlPressed: {\n kWkggS: \"xsykwg8\",\n $$css: true\n },\n region: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x126z3so\",\n krVfgx: \"x1ey2m1c\",\n kkqhue: \"x17y0mx6\",\n k3XXqK: \"x1t137rt\",\n kGO01o: \"x1u7mh7p\",\n kLKAdn: \"xi7mcox\",\n kE3dHu: \"xbpsoft\",\n kpe85a: \"xq5vm52\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"xixxii4\",\n kY2c9j: \"x1bk8fjm\",\n $$css: true\n },\n risen: (clearance: string) => [_temp, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(clearance)\n }]\n};\ntype SnackbarAction = {\n /** What the action says. The page gives it a single word where it can. */\n label: string;\n /** Run when the action is pressed, just before the snackbar closes. */\n onPress: () => void;\n};\n\n/** What a snackbar carries: its message, and what may sit beside it. */\ntype SnackbarMessage = {\n action: SnackbarAction | undefined;\n message: ReactNode;\n showCloseButton: boolean;\n};\ntype SnackbarOptions = {\n /**\n * A single action shown after the message. Pressing it runs `onPress` and\n * closes the snackbar, which is what the page draws.\n */\n action?: SnackbarAction;\n /**\n * Run when the snackbar closes, however it was closed: by its timer, its\n * action or close button, `close`, `clear`, or a newer message added in its\n * place. It runs as the snackbar starts to fade out, not once it has gone.\n */\n onClose?: () => void;\n /**\n * Whether a close button is shown at the end. The page draws one for a\n * message a reader may want out of the way before it expires.\n *\n * Named for what it draws rather than `isDismissable`, which on `Sheet`,\n * `Dialog` and React Aria's modals is whether a press outside them closes\n * them — a snackbar has no outside to press.\n * @default false\n */\n showCloseButton?: boolean;\n /**\n * How long the snackbar is shown, in milliseconds. Defaults to five seconds\n * for a message alone. A message with an action defaults to `0` and stays\n * until the action is taken or something closes it, as Material Design asks\n * of an actionable snackbar, since a reader may need longer to reach the\n * action than any timer allows. The timer is paused while the region is\n * hovered or focused, so a message never expires while it is being read.\n *\n * A timer shorter than four seconds, the least Material Design allows, is\n * lengthened to four, since a message gone sooner cannot be read.\n *\n * `0` is the page's indefinite length: the snackbar stays until something\n * closes it. Give one of those an action or `showCloseButton`, or there is no\n * way to be rid of it.\n */\n timeout?: number;\n};\ntype SnackbarProps = {\n /**\n * What a screen reader calls the region holding the snackbar. Left out,\n * React Aria names the region itself: a count of the messages it holds, in\n * the reader's own locale — \"1 notification.\" in English, and one of some\n * thirty languages otherwise. Pass a name only to replace that, and pass a\n * translated one, since whatever is passed is read as written.\n */\n 'aria-label'?: string;\n /** A function may compute the class from the region's render state. */\n className?: RACToastRegionProps<SnackbarMessage>['className'];\n /**\n * What a screen reader calls the button that dismisses a snackbar. It sits\n * here rather than on a message's own options because it does not vary by\n * message, so putting it there would make every `add` call repeat it. Left\n * out, React Aria names it in the reader's locale — \"Close\" in English.\n */\n closeLabel?: string;\n /** The queue the region shows messages from. */\n queue: SnackbarQueue;\n /** A function may compute the style from the region's render state. */\n style?: RACToastRegionProps<SnackbarMessage>['style'];\n} & Omit<RACToastRegionProps<SnackbarMessage>, 'aria-label' | 'children' | 'className' | 'queue' | 'style'>;\n\n// One entry of the queue, as React Aria hands it to the region's render\n// function. Taken from its render state rather than imported from\n// `react-stately`, which this package does not depend on.\ntype SnackbarToastItem = ToastRegionRenderProps<SnackbarMessage>['visibleToasts'][number];\n\n/**\n * React Aria's queue, made to keep a closing snackbar on screen while it\n * fades. React Aria drops a toast from its list the moment it closes, and the\n * region unmounts with its last toast, so a closing strip has no state of its\n * own to be drawn in. Every close reaches `close` here — React Aria's timer and\n * its close button call it on the queue they were handed, as `SnackbarQueue`\n * does — so this one override covers all of them: the strip is marked as\n * fading, and React Aria closes it once the fade has run.\n */\nclass FadingToastQueue extends RACToastQueue<SnackbarMessage> {\n // The strips fading out.\n readonly #fading = new Set<string>();\n readonly #listeners = new Set<() => void>();\n\n // Run as a strip starts to close — see `SnackbarQueue`.\n readonly #onClosing: (key: string) => void;\n constructor(onClosing: (key: string) => void) {\n // One at a time, which is what the page shows. React Aria shows the\n // newest, so a message added while another is up or fading takes its\n // place at once, and the older one runs out its fade unseen.\n super({\n maxVisibleToasts: 1\n });\n this.#onClosing = onClosing;\n }\n\n /** Starts a toast fading, and closes it once the fade has run. */\n override close(key: string) {\n this.#onClosing(key);\n this.#fading.add(key);\n setTimeout(() => {\n this.#fading.delete(key);\n super.close(key);\n }, EXIT_MS);\n for (const listener of this.#listeners) {\n listener();\n }\n }\n\n /** Whether a toast is fading out. */\n isFading(key: string) {\n return this.#fading.has(key);\n }\n\n /** Calls `listener` whenever a toast starts to fade. */\n subscribeToFading(listener: () => void) {\n this.#listeners.add(listener);\n return () => {\n this.#listeners.delete(listener);\n };\n }\n}\n\n/**\n * The queue a snackbar is shown from. Make one where the app can reach it —\n * a module of its own is the usual place — mount `Snackbar` once with it,\n * and call `add` from anywhere.\n *\n * ```ts\n * const messages = new Snackbar.Queue()\n * messages.add('Label', { action: { label: 'Undo', onPress: undo } })\n * ```\n *\n * It wraps React Aria's toast queue rather than exposing it, which is what\n * keeps that API's `UNSTABLE_` name out of a consumer's code.\n */\nclass SnackbarQueue {\n /**\n * React Aria's queue, which `Snackbar` subscribes to. Not part of the\n * package's API — read it and an upstream release may break the call site.\n */\n readonly rac: RACToastQueue<SnackbarMessage>;\n\n // The snackbars not yet closed, each with its `onClose`, which `add` and\n // `clear` close. Kept here because React Aria keeps its own list private,\n // and its own `clear` empties that list without running a single `onClose`.\n readonly #open = new Map<string, (() => void) | undefined>();\n\n // `rac` as the class it is, which `rac` itself is not declared as so that\n // the subclass stays out of the package's API.\n readonly #toasts: FadingToastQueue;\n constructor() {\n this.#toasts = new FadingToastQueue(key => {\n this.#closing(key);\n });\n this.rac = this.#toasts;\n }\n\n /**\n * Shows a message in place of the one on screen, and returns the key that\n * closes it. The message it replaces is closed, so its `onClose` runs, and\n * it does not come back.\n */\n add(message: ReactNode, options: SnackbarOptions = {}) {\n const {\n action,\n onClose,\n showCloseButton = false,\n timeout\n } = options;\n this.clear();\n const key = this.#toasts.add({\n action,\n message,\n showCloseButton\n }, {\n timeout: readableTimeout(timeout ?? (action === undefined ? MESSAGE_MS : UNTIL_CLOSED))\n });\n this.#open.set(key, onClose);\n return key;\n }\n\n /** Closes the snackbar on screen, running its `onClose`. */\n clear() {\n // Each close runs that message's `onClose`, which deletes its own key\n // from the map — the entry being visited, which a Map allows.\n for (const key of this.#open.keys()) {\n this.#toasts.close(key);\n }\n }\n\n /** Closes one snackbar, by the key `add` returned. */\n close(key: string) {\n this.#toasts.close(key);\n }\n\n // A snackbar starting to close, however it was closed — its timer runs\n // inside React Aria's queue, past this one — leaves the open map and runs\n // its `onClose` on the way out.\n #closing(key: string) {\n const onClose = this.#open.get(key);\n if (this.#open.delete(key)) {\n onClose?.();\n }\n }\n}\n\n// The three handlers the snackbar hands to something below it, each 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; the React Compiler memoises the result on\n// its inputs.\nfunction actionPress(action: SnackbarAction, close: () => void) {\n return () => {\n action.onPress();\n close();\n };\n}\nfunction closeToast(queue: SnackbarQueue, key: string) {\n return () => {\n queue.close(key);\n };\n}\n\n// A control's classes, from its own render state — see `controlFocused`.\nfunction controlClassName(style: stylex.StyleXStyles) {\n return (state: {\n isFocusVisible: boolean;\n isHovered: boolean;\n isPressed: boolean;\n }) => stylex.props(styles.control, style, state.isHovered && styles.controlHovered, state.isFocusVisible && styles.controlFocused, state.isPressed && styles.controlPressed).className ?? '';\n}\n\n// A timer the reader has time to read by — see the durations at the top of\n// this file. Only a timer is held to the minimum: React Aria runs none for `0`\n// or below, which keep the message until something closes it.\nfunction readableTimeout(timeout: number) {\n return timeout > UNTIL_CLOSED ? Math.max(timeout, MINIMUM_MS) : timeout;\n}\n\n/**\n * A brief message at the bottom of the screen, with an optional action. Mount\n * one of these with a `Snackbar.Queue`, and call the queue's `add` to show a\n * message from anywhere.\n *\n * ```tsx\n * const messages = new Snackbar.Queue()\n *\n * <Snackbar queue={messages} />\n * ```\n *\n * The region is portalled to the end of `<body>` and renders nothing while\n * the queue is empty. It is one region rather than one per message, so mount\n * it once, near the root.\n *\n * The call site's `className` and `style` land on that region, which is the\n * element a layout positions.\n *\n * While a full-screen `Dialog` or a `Sheet` with a footer is open, the region\n * rises to sit above those actions rather than over them, since they share\n * the bottom edge of the window and the snackbar is drawn above both.\n *\n * While a `Dialog` or a `Sheet` is open, Tab stays inside it and never\n * reaches the snackbar. F6 does: React Aria moves focus between landmarks\n * with it, so it lands on the region, Tab then reaches the message and its\n * action, and tabbing on past the last of them leads back into the dialog. A\n * message with an action stays until it is answered, so a keyboard user has\n * the time that route takes.\n */\nfunction Snackbar({\n closeLabel,\n queue,\n ...props\n}: RefAttributes<HTMLDivElement> & SnackbarProps) {\n const clearance = useBottomEdgeClearance();\n return <RACToastRegion<SnackbarMessage> queue={queue.rac} {...props} {...mergeStatefulStyles(stylex.props(styles.region, clearance > 0 && styles.risen(`${clearance}px`)), props)}>\n {snackbarContent(queue, closeLabel)}\n </RACToastRegion>;\n}\n\n/**\n * One of the snackbar's two controls. React Aria's `Button` rather than the\n * library's, for the colour reason in the comment at the top of this file;\n * the ripple and the state layers are the same ones every other control\n * here draws, over `currentColor`.\n */\nfunction SnackbarButton({\n children,\n style,\n ...props\n}: {\n 'aria-label'?: string;\n children: ReactNode;\n onPress?: () => void;\n slot?: string;\n style: stylex.StyleXStyles;\n}) {\n const ripple = useRipple<FocusableElement>();\n return <RACButton {...ripple.handlers} {...props} className={controlClassName(style)}>\n {children}\n {ripple.surface}\n </RACButton>;\n}\nfunction snackbarContent(queue: SnackbarQueue, closeLabel: string | undefined) {\n return ({\n toast\n }: {\n toast: SnackbarToastItem;\n }) => <SnackbarToast close={closeToast(queue, toast.key)} closeLabel={closeLabel} queue={queue} toast={toast} />;\n}\n\n/**\n * The action, the close button, or nothing, after the message — together, so\n * they move beneath it together.\n */\nfunction SnackbarControls({\n action,\n close,\n closeLabel,\n fading,\n showCloseButton\n}: {\n action: SnackbarAction | undefined;\n close: () => void;\n closeLabel: string | undefined;\n fading: boolean;\n showCloseButton: boolean;\n}) {\n if (action === undefined && !showCloseButton) {\n return null;\n }\n return <div className=\"x6s0dn4 x9f619 x78zum5 x2lah0s xvc5jky\">\n {action === undefined ? null :\n // Nothing on a fading strip answers a press: its action has already\n // run, and an Undo pressed twice would undo twice.\n <SnackbarButton onPress={fading ? undefined : actionPress(action, close)} style={styles.action}>\n {action.label}\n </SnackbarButton>}\n {showCloseButton ? <SnackbarButton aria-label={closeLabel} slot=\"close\" style={styles.close}>\n <CloseGlyph className=\"xxk0z11 xvy4d1p\" />\n </SnackbarButton> : null}\n </div>;\n}\n\n/** One snackbar: its message, then whatever sits after it. */\nfunction SnackbarToast({\n close,\n closeLabel,\n queue,\n toast\n}: {\n close: () => void;\n closeLabel: string | undefined;\n queue: SnackbarQueue;\n toast: SnackbarToastItem;\n}) {\n const {\n action,\n message,\n showCloseButton\n } = toast.content;\n const fading = useFading(queue, toast.key);\n return <RACToast toast={toast} {...{\n 0: {\n className: \"x6s0dn4 x1n1nwrg x1u6grsq x1dwmuk9 x16dv9tl x1c5gpgi x1w1tqly x1tfhd1 xx61lck x13rsnn2 x1udv5rz x9f619 x78zum5 x1a02dak xh8yej3 x1x1rfll xlx31pv x1dry9sr xeuugli xuq8xha x1ulcdur xr2mjdv x9v5kkp x1t137rt x1de99jn xt970qd xn60lsn x67bb7w\"\n },\n 1: {\n className: \"x6s0dn4 x1c5gpgi x1w1tqly x1tfhd1 xx61lck x13rsnn2 x1udv5rz x9f619 x78zum5 x1a02dak xh8yej3 x1x1rfll xlx31pv x1dry9sr xeuugli xuq8xha x1ulcdur xr2mjdv x9v5kkp x1t137rt x1de99jn xt970qd xn60lsn x1vhuh8u x1u6grsq x10e4vud xxp0q0x xi22y15 x47corl\"\n }\n }[!!fading << 0]}>\n <RACToastContent className=\"x9f619 x1girmi0 x4pfjvb x1iyjqo2 xpo2rfv x193rfdd x1hews6w xkjl1po xn43zvd xv61bfh xz158ff xeuugli xj0a0fe xxlmvz2\">\n <Text slot=\"title\">{message}</Text>\n </RACToastContent>\n <SnackbarControls action={action} close={close} closeLabel={closeLabel} fading={fading} showCloseButton={showCloseButton} />\n </RACToast>;\n}\n\n/**\n * Whether a snackbar is fading out of its queue. `rac` is always the queue\n * that fades, but is declared as React Aria's, so it is narrowed back here.\n */\nfunction useFading(queue: SnackbarQueue, key: string) {\n const toasts = queue.rac instanceof FadingToastQueue ? queue.rac : undefined;\n return useSyncExternalStore(listener => toasts?.subscribeToFading(listener) ?? (() => {}), () => toasts?.isFading(key) ?? false);\n}\nSnackbar.Queue = SnackbarQueue;\n\n// The queue is reached as `Snackbar.Queue` rather than exported beside the\n// component: this file would otherwise export something that is not a\n// component, which is what turns fast refresh off for it.\nexport type { SnackbarAction, SnackbarMessage, SnackbarOptions, SnackbarProps, SnackbarQueue, ToastRegionRenderProps as SnackbarRegionRenderProps };\nexport default Snackbar;"],"mappings":";;;;;;;;;;;AAoFA,MAAMQ,aAAa;AACnB,MAAMC,aAAa;AACnB,MAAMC,eAAe;AAMrB,MAAMC,UAAU;AAwBhB,MAAMC,QAAQ;CACZC,QAAQ;CACRC,QAAQ;CACR,SAAS;AACX;AACA,MAAMC,SAAS;CACbC,QAAQ;EACNC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,OAAO;EACLC,QAAQ;EACRX,QAAQ;EACRY,QAAQ;EACRC,QAAQ;EACRJ,OAAO;CACT;CACAK,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRnB,OAAO;CACT;CACAoB,gBAAgB;EACdb,QAAQ;EACRP,OAAO;CACT;CACAqB,gBAAgB;EACdd,QAAQ;EACRP,OAAO;CACT;CACAsB,gBAAgB;EACdf,QAAQ;EACRP,OAAO;CACT;CACAuB,QAAQ;EACNjB,QAAQ;EACRI,QAAQ;EACRE,QAAQ;EACRY,QAAQ;EACRC,QAAQ;EACR1C,QAAQ;EACR2C,QAAQ;EACRT,QAAQ;EACRjC,QAAQ;EACR2C,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRX,QAAQ;EACRY,QAAQ;EACR/B,OAAO;CACT;CACAgC,QAAQC,cA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9G,qBAAqB6G,IAA+DG,EAAoC;AAAC;AAFlI,SAAAoB,SAAA,CAAA;AAIAxB,SAASyB,QAAQ5D"}
@@ -79,5 +79,4 @@ declare function SplitButtonAction(props: SplitButtonActionProps): import("react
79
79
  * of alternatives its children describe.
80
80
  */
81
81
  declare function SplitButtonMenu({ 'aria-label': label, children, container, defaultOpen, isDisabled, isOpen, onAction, onOpenChange }: SplitButtonMenuProps): import("react").JSX.Element;
82
- export { SplitButtonAction, type SplitButtonActionProps, SplitButtonMenu, type SplitButtonMenuProps, type SplitButtonProps, type SplitButtonVariant, SplitButton as default };
83
- //# sourceMappingURL=index.d.ts.map
82
+ export { SplitButtonAction, type SplitButtonActionProps, SplitButtonMenu, type SplitButtonMenuProps, type SplitButtonProps, type SplitButtonVariant, SplitButton as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","CSSProperties","ReactNode","RefAttributes","Key","stylex","createContext","useCallback","useContext","useMemo","useState","Group","RACGroup","ButtonState","ButtonGroupItem","GroupSize","ButtonProps","ButtonSize","ButtonGroupItemContext","ChevronDownGlyph","mergeStyles","radii","sizing","spacing","Button","Menu","corners","shape","start","end","kT0f0o","kVL7Gh","kfmiAY","krdFHd","$$css","val","undefined","leading","lg","kwRFfy","kZCmMZ","md","xl","xs","xxl","chevron","kGuDYH","trailing","padding","TRAILING_PADDING","CLOSED_OFFSET","INNER","sm","ROUND","controlLg","controlSm","controlXl","controlXs","controlXxl","INNER_ACTIVE","SplitButtonActionProps","Props","Omit","HTMLAnchorElement","HTMLButtonElement","SplitButtonMenuProps","children","container","Element","defaultOpen","isDisabled","isOpen","onAction","key","onOpenChange","SplitButtonProps","HTMLDivElement","className","size","style","variant","SplitButtonVariant","SplitButtonContext","isActive","state","isHovered","isFocusVisible","isPressed","leadingItem","shift","styles","SplitButton","t0","$","label","ref","t1","t2","t3","context","t4","t5","t6","SplitButtonAction","props","item","SplitButtonMenu","ownOpen","setOwnOpen","open","next","changeOpen","trailingItem","Symbol","for","t7","t8","offset","Action","_c","RACGroup","Button","Menu"],"sources":["../../../src/components/split-button/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSProperties, ReactNode, RefAttributes } from 'react';\nimport type { Key } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useMemo, useState } from 'react';\nimport { Group as RACGroup } from 'react-aria-components';\nimport type { ButtonState } from '../../button';\nimport type { ButtonGroupItem, GroupSize } from '../../button/context';\nimport type { ButtonProps, ButtonSize } from '../button';\nimport { ButtonGroupItemContext } from '../../button/context';\nimport { ChevronDownGlyph } from '../../glyphs';\nimport { mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { radii, sizing, spacing } from '../../tokens/design.tokens.stylex';\nimport Button from '../button';\nimport Menu from '../menu';\n\n// The split button page's split button: an action and the menu of\n// alternatives beside it, drawn as two Buttons 2dp apart — the page calls it\n// a special connected button group. The outer ends keep the button's round,\n// and the two edges that meet take the inner corner the size gives them,\n// 4dp up to the page's M, 8dp at L and 12dp at XL, opening out to 8dp, 12dp\n// and 20dp while either half is hovered, focused or pressed. The values are\n// the page's size token sets, read from Material Design's own split button\n// tokens; the 20dp corner, and the paddings that are not steps of the\n// spacing scale, are written out.\n//\n// **The leading half is a Button**, with an icon, a label or both, and the\n// page's own padding either side of what it holds — 12dp and 10dp at XS, for\n// instance, where a lone Button takes 16dp on both.\n//\n// **The trailing half is the menu's trigger**: a Button holding the down\n// chevron at the size's icon size, 22dp up to 50dp, with the menu below its\n// end edge. The chevron sits a pixel or more toward the start while the menu\n// is closed — the page's optical centring, 1dp to 6dp by size — and centres\n// once it opens, when the inner corners round off entirely. The page keeps\n// the colours as they are while the menu is open and lays the pressed state\n// layer over them, which is what React Aria's report of the trigger as\n// pressed for as long as its menu is open already draws.\n//\n// Both halves take the variant the root names, out of Button's four with a\n// container — the page gives text no split button.\n\n// Each half's corners on each side, set from the half and its state.\nconst corners = {\n shape: (start: string, end: string) => [{\n kT0f0o: end != null ? \"x1wsjk4f\" : end,\n kVL7Gh: start != null ? \"x1oq9ryg\" : start,\n kfmiAY: end != null ? \"xbsomw4\" : end,\n krdFHd: start != null ? \"x6pmj1i\" : start,\n $$css: true\n }, {\n \"--x-borderEndEndRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-borderEndStartRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start),\n \"--x-borderStartEndRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-borderStartStartRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }]\n};\n\n// The leading half's padding either side of what it holds.\nconst leading = {\n lg: {\n kwRFfy: \"xdndrey\",\n kZCmMZ: \"x1kdgbu8\",\n $$css: true\n },\n md: {\n kwRFfy: \"xk163s\",\n kZCmMZ: \"x10rdx38\",\n $$css: true\n },\n xl: {\n kwRFfy: \"x15zmtp0\",\n kZCmMZ: \"x1oiqv2n\",\n $$css: true\n },\n xs: {\n kwRFfy: \"x2vl965\",\n kZCmMZ: \"xwde665\",\n $$css: true\n },\n xxl: {\n kwRFfy: \"xli2wwf\",\n kZCmMZ: \"x7vhb2i\",\n $$css: true\n }\n};\n\n// The trailing half's chevron, at the size's icon size.\nconst chevron = {\n lg: {\n kGuDYH: \"x1ewwscv\",\n $$css: true\n },\n md: {\n kGuDYH: \"x1i1m3gp\",\n $$css: true\n },\n xl: {\n kGuDYH: \"x155jak9\",\n $$css: true\n },\n xs: {\n kGuDYH: \"x1i1m3gp\",\n $$css: true\n },\n xxl: {\n kGuDYH: \"xermeyz\",\n $$css: true\n }\n};\n\n// The trailing half's padding: centred once the menu is open, and moved\n// toward the start by the page's offset while it is closed.\nconst trailing = {\n padding: (start: string, end: string) => [{\n kwRFfy: end != null ? \"x120eax6\" : end,\n kZCmMZ: start != null ? \"xnvo3vl\" : start,\n $$css: true\n }, {\n \"--x-paddingInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-paddingInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }]\n};\n\n// The trailing half's padding either side of the chevron, and how far the\n// chevron sits toward the start while the menu is closed.\nconst TRAILING_PADDING = {\n lg: 15,\n md: 13,\n xl: 29,\n xs: 13,\n xxl: 43\n};\nconst CLOSED_OFFSET = {\n lg: 2,\n md: 1,\n xl: 3,\n xs: 1,\n xxl: 6\n};\n\n// The corner where the halves meet, at rest and while a half is hovered,\n// focused or pressed.\nconst INNER = {\n lg: radii.xs,\n md: radii.xs,\n xl: radii.sm,\n xs: radii.xs,\n xxl: radii.md\n};\n\n// The round end at each size: half the button's height. Not the pill's\n// 9999px: CSS scales every corner of a box down together when two on one\n// side add up to more than the side is long, so a 9999px end beside an 8px\n// inner corner shrank the inner one to nothing. Half the height fits as\n// written. A label that wraps makes a button taller than this, and its ends\n// a little less than round.\nconst ROUND = {\n lg: `calc(${sizing.controlLg} / 2)`,\n md: `calc(${sizing.controlSm} / 2)`,\n xl: `calc(${sizing.controlXl} / 2)`,\n xs: `calc(${sizing.controlXs} / 2)`,\n xxl: `calc(${sizing.controlXxl} / 2)`\n};\nconst INNER_ACTIVE = {\n lg: radii.md,\n md: radii.md,\n xl: '20px',\n xs: radii.sm,\n xxl: '20px'\n};\n\n// Omitted form by form: ButtonProps is a union of the plain, link and toggle\n// forms, and an Omit of the whole union keeps only the keys all three share,\n// which would let a link's and a toggle's props back together.\ntype SplitButtonActionProps = (ButtonProps extends infer Props ? Props extends unknown ? Omit<Props, 'shape' | 'size' | 'variant'> : never : never) & RefAttributes<HTMLAnchorElement | HTMLButtonElement>;\ntype SplitButtonMenuProps = {\n /** What the menu offers, in words: the trailing half is an icon alone. */\n 'aria-label': string;\n /** The menu's items, as `Menu.Item`s and the rest of Menu's parts. */\n children: ReactNode;\n /**\n * Where the menu is portalled to. Defaults to the container of the\n * `ThemeScope` around it, or to the end of `<body>` where there is none. A\n * subtree themed through the `themeScope` class has no container of its own,\n * so point this inside it, or it renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * Whether the menu starts open, when it keeps its own state.\n * @default false\n */\n defaultOpen?: boolean;\n /** Whether the trailing half can be pressed. */\n isDisabled?: boolean;\n /** Whether the menu is open, when the call site holds the state. */\n isOpen?: boolean;\n /** Called with an item's `id` when it is chosen. */\n onAction?: (key: Key) => void;\n /** Called when the menu opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n};\ntype SplitButtonProps = RefAttributes<HTMLDivElement> & {\n /** What the pair is, in words, for the group around the two halves. */\n 'aria-label'?: string;\n /** The two halves: a `SplitButton.Action`, then a `SplitButton.Menu`. */\n children: ReactNode;\n /** The class for the group around the two halves. */\n className?: string;\n /**\n * The size both halves take, as Button's: `xs` to `xxl`.\n * @default 'md'\n */\n size?: ButtonSize;\n /** The style for the group around the two halves. */\n style?: CSSProperties;\n /**\n * The colour style both halves take: Button's four with a container.\n * @default 'filled'\n */\n variant?: SplitButtonVariant;\n};\ntype SplitButtonVariant = 'elevated' | 'filled' | 'outlined' | 'tonal';\n\n// What the root hands its two halves.\nconst SplitButtonContext = createContext<{\n size: GroupSize;\n variant: SplitButtonVariant;\n}>({\n size: 'md',\n variant: 'filled'\n});\n\n// Whether a half shows the corner it opens out to: while it is hovered,\n// focused or pressed.\nfunction isActive(state: ButtonState) {\n return state.isHovered || state.isFocusVisible || state.isPressed;\n}\n\n// The leading half's part: its padding, its round start and the inner\n// corner at its end.\nfunction leadingItem(size: GroupSize): ButtonGroupItem {\n return {\n shift: 0,\n size,\n styles: (state: ButtonState) => [leading[size], corners.shape(ROUND[size], isActive(state) ? INNER_ACTIVE[size] : INNER[size])]\n };\n}\n\n/**\n * An action and a menu of alternatives beside it, drawn as one control.\n *\n * ```tsx\n * <SplitButton>\n * <SplitButton.Action onPress={save}>Label</SplitButton.Action>\n * <SplitButton.Menu aria-label=\"More options\">\n * <Menu.Item id=\"first\">First item</Menu.Item>\n * </SplitButton.Menu>\n * </SplitButton>\n * ```\n *\n * The call site's `className`, `style` and `ref` land on the group around\n * the two halves.\n */\nfunction SplitButton({\n 'aria-label': label,\n children,\n className,\n ref,\n size = 'md',\n style,\n variant = 'filled'\n}: SplitButtonProps) {\n const context = useMemo(() => ({\n size,\n variant\n }), [size, variant]);\n return <SplitButtonContext value={context}>\n <RACGroup aria-label={label} ref={ref} {...mergeStyles({\n className: \"x6s0dn4 x9f619 x3nfvp2 x14qo01y\"\n }, {\n className,\n style\n })}>\n {children}\n </RACGroup>\n </SplitButtonContext>;\n}\n\n/**\n * The split button's leading half: a Button, with an icon, a label or both,\n * in the root's size and variant.\n */\nfunction SplitButtonAction(props: SplitButtonActionProps) {\n const {\n size,\n variant\n } = useContext(SplitButtonContext);\n const item = useMemo(() => leadingItem(size), [size]);\n return <ButtonGroupItemContext value={item}>\n <Button {...props} variant={variant} />\n </ButtonGroupItemContext>;\n}\n\n/**\n * The split button's trailing half: the down chevron, which opens the menu\n * of alternatives its children describe.\n */\nfunction SplitButtonMenu({\n 'aria-label': label,\n children,\n container,\n defaultOpen = false,\n isDisabled,\n isOpen,\n onAction,\n onOpenChange\n}: SplitButtonMenuProps) {\n const {\n size,\n variant\n } = useContext(SplitButtonContext);\n const [ownOpen, setOwnOpen] = useState(defaultOpen);\n const open = isOpen ?? ownOpen;\n const changeOpen = useCallback((next: boolean) => {\n if (isOpen === undefined) {\n setOwnOpen(next);\n }\n onOpenChange?.(next);\n }, [isOpen, onOpenChange]);\n const item = useMemo(() => trailingItem(size, open), [size, open]);\n return <Menu isOpen={open} onOpenChange={changeOpen}>\n <ButtonGroupItemContext value={item}>\n <Button aria-label={label} isDisabled={isDisabled} variant={variant}>\n <ChevronDownGlyph height=\"1em\" width=\"1em\" />\n </Button>\n </ButtonGroupItemContext>\n <Menu.Content align=\"end\" container={container} onAction={onAction}>\n {children}\n </Menu.Content>\n </Menu>;\n}\n\n// The trailing half's part: its chevron and padding, the inner corner at its\n// start, and its round end — and while the menu is open, the chevron centred\n// and the inner corner rounded off.\nfunction trailingItem(size: GroupSize, isOpen: boolean): ButtonGroupItem {\n const padding = TRAILING_PADDING[size];\n const offset = isOpen ? 0 : CLOSED_OFFSET[size];\n return {\n shift: 0,\n size,\n styles: (state: ButtonState) => [chevron[size], trailing.padding(`${padding - offset}px`, `${padding + offset}px`), corners.shape(isOpen ? ROUND[size] : isActive(state) ? INNER_ACTIVE[size] : INNER[size], ROUND[size])]\n };\n}\nSplitButton.Action = SplitButtonAction;\nSplitButton.Menu = SplitButtonMenu;\nexport type { SplitButtonActionProps, SplitButtonMenuProps, SplitButtonProps, SplitButtonVariant };\nexport { SplitButtonAction, SplitButtonMenu };\nexport default SplitButton;"],"mappings":";;;;;;;;;;;;AA6CA,MAAM2B,UAAU,EACdC,QAAQC,OAAeC,QAAgB,CAAC;CACtCC,QAAQD,OAAO,OAAO,aAAaA;CACnCE,QAAQH,SAAS,OAAO,aAAaA;CACrCI,QAAQH,OAAO,OAAO,YAAYA;CAClCI,QAAQL,SAAS,OAAO,YAAYA;CACpCM,OAAO;AACT,GAAG;CACD,4BAA2BC,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAWP,GAAG;CAC3G,8BAA6BM,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAWR,KAAK;CAC/G,8BAA6BO,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAWP,GAAG;CAC7G,gCAA+BM,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAWR,KAAK;AACnH,CAAC,EACH;AAGA,MAAMS,UAAU;CACdC,IAAI;EACFC,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;CACAO,IAAI;EACFF,QAA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,UAAUC,iBAAiB6B;CACjC,MAAMuC,SAAS9C,SAAS,IAAIrB,cAAc4B;CAC1C,OAAO;EACLW,OAAO;EACPX;EACAY,SAASN,UAAuB;GAACvC,QAAQiC;GAAO/B,SAASC,QAAQ,GAAGA,UAAUqE,OAAM,KAAM,GAAGrE,UAAUqE,OAAM,GAAI;GAAG3F,QAAQC,MAAM4C,SAASlB,MAAMyB,QAAQK,SAASC,KAAK,IAAIzB,aAAamB,QAAQ3B,MAAM2B,OAAOzB,MAAMyB,KAAK;EAAC;CAC3N;AACF;AACAa,YAAY2B,SAASf;AACrBZ,YAAYlE,OAAOiF"}
1
+ {"version":3,"file":"index.js","names":["_c","createContext","useContext","useState","mergeStyles","radii","sizing","Menu","corners","shape","start","end","kT0f0o","kVL7Gh","kfmiAY","krdFHd","$$css","val","undefined","leading","lg","kwRFfy","kZCmMZ","md","xl","xs","xxl","chevron","kGuDYH","trailing","padding","TRAILING_PADDING","CLOSED_OFFSET","INNER","sm","ROUND","controlLg","controlSm","controlXl","controlXs","controlXxl","INNER_ACTIVE","children","container","defaultOpen","isDisabled","isOpen","onAction","onOpenChange","className","size","style","variant","SplitButtonContext","isActive","state","isHovered","isFocusVisible","isPressed","leadingItem","shift","styles","SplitButton","t0","$","label","ref","t1","t2","t3","context","t4","t5","t6","SplitButtonAction","props","item","SplitButtonMenu","ownOpen","setOwnOpen","open","next","changeOpen","trailingItem","Symbol","for","t7","t8","offset","Action","RACGroup","Button","Menu"],"sources":["../../../src/components/split-button/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSProperties, ReactNode, RefAttributes } from 'react';\nimport type { Key } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useMemo, useState } from 'react';\nimport { Group as RACGroup } from 'react-aria-components';\nimport type { ButtonState } from '../../button';\nimport type { ButtonGroupItem, GroupSize } from '../../button/context';\nimport type { ButtonProps, ButtonSize } from '../button';\nimport { ButtonGroupItemContext } from '../../button/context';\nimport { ChevronDownGlyph } from '../../glyphs';\nimport { mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { radii, sizing, spacing } from '../../tokens/design.tokens.stylex';\nimport Button from '../button';\nimport Menu from '../menu';\n\n// The split button page's split button: an action and the menu of\n// alternatives beside it, drawn as two Buttons 2dp apart — the page calls it\n// a special connected button group. The outer ends keep the button's round,\n// and the two edges that meet take the inner corner the size gives them,\n// 4dp up to the page's M, 8dp at L and 12dp at XL, opening out to 8dp, 12dp\n// and 20dp while either half is hovered, focused or pressed. The values are\n// the page's size token sets, read from Material Design's own split button\n// tokens; the 20dp corner, and the paddings that are not steps of the\n// spacing scale, are written out.\n//\n// **The leading half is a Button**, with an icon, a label or both, and the\n// page's own padding either side of what it holds — 12dp and 10dp at XS, for\n// instance, where a lone Button takes 16dp on both.\n//\n// **The trailing half is the menu's trigger**: a Button holding the down\n// chevron at the size's icon size, 22dp up to 50dp, with the menu below its\n// end edge. The chevron sits a pixel or more toward the start while the menu\n// is closed — the page's optical centring, 1dp to 6dp by size — and centres\n// once it opens, when the inner corners round off entirely. The page keeps\n// the colours as they are while the menu is open and lays the pressed state\n// layer over them, which is what React Aria's report of the trigger as\n// pressed for as long as its menu is open already draws.\n//\n// Both halves take the variant the root names, out of Button's four with a\n// container — the page gives text no split button.\n\n// Each half's corners on each side, set from the half and its state.\nconst corners = {\n shape: (start: string, end: string) => [{\n kT0f0o: end != null ? \"x1wsjk4f\" : end,\n kVL7Gh: start != null ? \"x1oq9ryg\" : start,\n kfmiAY: end != null ? \"xbsomw4\" : end,\n krdFHd: start != null ? \"x6pmj1i\" : start,\n $$css: true\n }, {\n \"--x-borderEndEndRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-borderEndStartRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start),\n \"--x-borderStartEndRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-borderStartStartRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }]\n};\n\n// The leading half's padding either side of what it holds.\nconst leading = {\n lg: {\n kwRFfy: \"xdndrey\",\n kZCmMZ: \"x1kdgbu8\",\n $$css: true\n },\n md: {\n kwRFfy: \"xk163s\",\n kZCmMZ: \"x10rdx38\",\n $$css: true\n },\n xl: {\n kwRFfy: \"x15zmtp0\",\n kZCmMZ: \"x1oiqv2n\",\n $$css: true\n },\n xs: {\n kwRFfy: \"x2vl965\",\n kZCmMZ: \"xwde665\",\n $$css: true\n },\n xxl: {\n kwRFfy: \"xli2wwf\",\n kZCmMZ: \"x7vhb2i\",\n $$css: true\n }\n};\n\n// The trailing half's chevron, at the size's icon size.\nconst chevron = {\n lg: {\n kGuDYH: \"x1ewwscv\",\n $$css: true\n },\n md: {\n kGuDYH: \"x1i1m3gp\",\n $$css: true\n },\n xl: {\n kGuDYH: \"x155jak9\",\n $$css: true\n },\n xs: {\n kGuDYH: \"x1i1m3gp\",\n $$css: true\n },\n xxl: {\n kGuDYH: \"xermeyz\",\n $$css: true\n }\n};\n\n// The trailing half's padding: centred once the menu is open, and moved\n// toward the start by the page's offset while it is closed.\nconst trailing = {\n padding: (start: string, end: string) => [{\n kwRFfy: end != null ? \"x120eax6\" : end,\n kZCmMZ: start != null ? \"xnvo3vl\" : start,\n $$css: true\n }, {\n \"--x-paddingInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-paddingInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }]\n};\n\n// The trailing half's padding either side of the chevron, and how far the\n// chevron sits toward the start while the menu is closed.\nconst TRAILING_PADDING = {\n lg: 15,\n md: 13,\n xl: 29,\n xs: 13,\n xxl: 43\n};\nconst CLOSED_OFFSET = {\n lg: 2,\n md: 1,\n xl: 3,\n xs: 1,\n xxl: 6\n};\n\n// The corner where the halves meet, at rest and while a half is hovered,\n// focused or pressed.\nconst INNER = {\n lg: radii.xs,\n md: radii.xs,\n xl: radii.sm,\n xs: radii.xs,\n xxl: radii.md\n};\n\n// The round end at each size: half the button's height. Not the pill's\n// 9999px: CSS scales every corner of a box down together when two on one\n// side add up to more than the side is long, so a 9999px end beside an 8px\n// inner corner shrank the inner one to nothing. Half the height fits as\n// written. A label that wraps makes a button taller than this, and its ends\n// a little less than round.\nconst ROUND = {\n lg: `calc(${sizing.controlLg} / 2)`,\n md: `calc(${sizing.controlSm} / 2)`,\n xl: `calc(${sizing.controlXl} / 2)`,\n xs: `calc(${sizing.controlXs} / 2)`,\n xxl: `calc(${sizing.controlXxl} / 2)`\n};\nconst INNER_ACTIVE = {\n lg: radii.md,\n md: radii.md,\n xl: '20px',\n xs: radii.sm,\n xxl: '20px'\n};\n\n// Omitted form by form: ButtonProps is a union of the plain, link and toggle\n// forms, and an Omit of the whole union keeps only the keys all three share,\n// which would let a link's and a toggle's props back together.\ntype SplitButtonActionProps = (ButtonProps extends infer Props ? Props extends unknown ? Omit<Props, 'shape' | 'size' | 'variant'> : never : never) & RefAttributes<HTMLAnchorElement | HTMLButtonElement>;\ntype SplitButtonMenuProps = {\n /** What the menu offers, in words: the trailing half is an icon alone. */\n 'aria-label': string;\n /** The menu's items, as `Menu.Item`s and the rest of Menu's parts. */\n children: ReactNode;\n /**\n * Where the menu is portalled to. Defaults to the container of the\n * `ThemeScope` around it, or to the end of `<body>` where there is none. A\n * subtree themed through the `themeScope` class has no container of its own,\n * so point this inside it, or it renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * Whether the menu starts open, when it keeps its own state.\n * @default false\n */\n defaultOpen?: boolean;\n /** Whether the trailing half can be pressed. */\n isDisabled?: boolean;\n /** Whether the menu is open, when the call site holds the state. */\n isOpen?: boolean;\n /** Called with an item's `id` when it is chosen. */\n onAction?: (key: Key) => void;\n /** Called when the menu opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n};\ntype SplitButtonProps = RefAttributes<HTMLDivElement> & {\n /** What the pair is, in words, for the group around the two halves. */\n 'aria-label'?: string;\n /** The two halves: a `SplitButton.Action`, then a `SplitButton.Menu`. */\n children: ReactNode;\n /** The class for the group around the two halves. */\n className?: string;\n /**\n * The size both halves take, as Button's: `xs` to `xxl`.\n * @default 'md'\n */\n size?: ButtonSize;\n /** The style for the group around the two halves. */\n style?: CSSProperties;\n /**\n * The colour style both halves take: Button's four with a container.\n * @default 'filled'\n */\n variant?: SplitButtonVariant;\n};\ntype SplitButtonVariant = 'elevated' | 'filled' | 'outlined' | 'tonal';\n\n// What the root hands its two halves.\nconst SplitButtonContext = createContext<{\n size: GroupSize;\n variant: SplitButtonVariant;\n}>({\n size: 'md',\n variant: 'filled'\n});\n\n// Whether a half shows the corner it opens out to: while it is hovered,\n// focused or pressed.\nfunction isActive(state: ButtonState) {\n return state.isHovered || state.isFocusVisible || state.isPressed;\n}\n\n// The leading half's part: its padding, its round start and the inner\n// corner at its end.\nfunction leadingItem(size: GroupSize): ButtonGroupItem {\n return {\n shift: 0,\n size,\n styles: (state: ButtonState) => [leading[size], corners.shape(ROUND[size], isActive(state) ? INNER_ACTIVE[size] : INNER[size])]\n };\n}\n\n/**\n * An action and a menu of alternatives beside it, drawn as one control.\n *\n * ```tsx\n * <SplitButton>\n * <SplitButton.Action onPress={save}>Label</SplitButton.Action>\n * <SplitButton.Menu aria-label=\"More options\">\n * <Menu.Item id=\"first\">First item</Menu.Item>\n * </SplitButton.Menu>\n * </SplitButton>\n * ```\n *\n * The call site's `className`, `style` and `ref` land on the group around\n * the two halves.\n */\nfunction SplitButton({\n 'aria-label': label,\n children,\n className,\n ref,\n size = 'md',\n style,\n variant = 'filled'\n}: SplitButtonProps) {\n const context = useMemo(() => ({\n size,\n variant\n }), [size, variant]);\n return <SplitButtonContext value={context}>\n <RACGroup aria-label={label} ref={ref} {...mergeStyles({\n className: \"x6s0dn4 x9f619 x3nfvp2 x14qo01y\"\n }, {\n className,\n style\n })}>\n {children}\n </RACGroup>\n </SplitButtonContext>;\n}\n\n/**\n * The split button's leading half: a Button, with an icon, a label or both,\n * in the root's size and variant.\n */\nfunction SplitButtonAction(props: SplitButtonActionProps) {\n const {\n size,\n variant\n } = useContext(SplitButtonContext);\n const item = useMemo(() => leadingItem(size), [size]);\n return <ButtonGroupItemContext value={item}>\n <Button {...props} variant={variant} />\n </ButtonGroupItemContext>;\n}\n\n/**\n * The split button's trailing half: the down chevron, which opens the menu\n * of alternatives its children describe.\n */\nfunction SplitButtonMenu({\n 'aria-label': label,\n children,\n container,\n defaultOpen = false,\n isDisabled,\n isOpen,\n onAction,\n onOpenChange\n}: SplitButtonMenuProps) {\n const {\n size,\n variant\n } = useContext(SplitButtonContext);\n const [ownOpen, setOwnOpen] = useState(defaultOpen);\n const open = isOpen ?? ownOpen;\n const changeOpen = useCallback((next: boolean) => {\n if (isOpen === undefined) {\n setOwnOpen(next);\n }\n onOpenChange?.(next);\n }, [isOpen, onOpenChange]);\n const item = useMemo(() => trailingItem(size, open), [size, open]);\n return <Menu isOpen={open} onOpenChange={changeOpen}>\n <ButtonGroupItemContext value={item}>\n <Button aria-label={label} isDisabled={isDisabled} variant={variant}>\n <ChevronDownGlyph height=\"1em\" width=\"1em\" />\n </Button>\n </ButtonGroupItemContext>\n <Menu.Content align=\"end\" container={container} onAction={onAction}>\n {children}\n </Menu.Content>\n </Menu>;\n}\n\n// The trailing half's part: its chevron and padding, the inner corner at its\n// start, and its round end — and while the menu is open, the chevron centred\n// and the inner corner rounded off.\nfunction trailingItem(size: GroupSize, isOpen: boolean): ButtonGroupItem {\n const padding = TRAILING_PADDING[size];\n const offset = isOpen ? 0 : CLOSED_OFFSET[size];\n return {\n shift: 0,\n size,\n styles: (state: ButtonState) => [chevron[size], trailing.padding(`${padding - offset}px`, `${padding + offset}px`), corners.shape(isOpen ? ROUND[size] : isActive(state) ? INNER_ACTIVE[size] : INNER[size], ROUND[size])]\n };\n}\nSplitButton.Action = SplitButtonAction;\nSplitButton.Menu = SplitButtonMenu;\nexport type { SplitButtonActionProps, SplitButtonMenuProps, SplitButtonProps, SplitButtonVariant };\nexport { SplitButtonAction, SplitButtonMenu };\nexport default SplitButton;"],"mappings":";;;;;;;;;;;;AA6CA,MAAMQ,UAAU,EACdC,QAAQC,OAAeC,QAAgB,CAAC;CACtCC,QAAQD,OAAO,OAAO,aAAaA;CACnCE,QAAQH,SAAS,OAAO,aAAaA;CACrCI,QAAQH,OAAO,OAAO,YAAYA;CAClCI,QAAQL,SAAS,OAAO,YAAYA;CACpCM,OAAO;AACT,GAAG;CACD,4BAA2BC,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAWP,GAAG;CAC3G,8BAA6BM,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAWR,KAAK;CAC/G,8BAA6BO,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAWP,GAAG;CAC7G,gCAA+BM,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAWR,KAAK;AACnH,CAAC,EACH;AAGA,MAAMS,UAAU;CACdC,IAAI;EACFC,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;CACAO,IAAI;EACFF,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;CACAQ,IAAI;EACFH,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;CACAS,IAAI;EACFJ,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;CACAU,KAAK;EACHL,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;AACF;AAGA,MAAMW,UAAU;CACdP,IAAI;EACFQ,QAAQ;EACRZ,OAAO;CACT;CACAO,IAAI;EACFK,QAAQ;EACRZ,OAAO;CACT;CACAQ,IAAI;EACFI,QAAQ;EACRZ,OAAO;CACT;CAC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D,OAAOsE"}
@@ -76,5 +76,4 @@ type StackProps = {
76
76
  * That renders a `<ul role="list">` with its items spaced by `sm`.
77
77
  */
78
78
  declare function Stack({ align, direction, gap, justify, render, wrap, ...props }: StackProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
79
- export { type StackAlign, type StackGap, type StackJustify, type StackProps, Stack as default };
80
- //# sourceMappingURL=index.d.ts.map
79
+ export { type StackAlign, type StackGap, type StackJustify, type StackProps, Stack as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","stylex","isValidElement","RenderComponentProps","useRender","mergeStyles","spacing","alignments","baseline","kGNEyG","$$css","center","end","start","stretch","gaps","lg","kOIVth","md","none","sm","xl","xs","xxl","xxs","xxxl","justifications","around","kjj79g","between","styles","base","kB7OPa","k1xSpc","kH6xsr","kogj98","kmVPX3","column","kXwgrk","row","wrap","kwnvtZ","StackAlign","StackGap","StackJustify","StackProps","align","direction","gap","justify","listRole","render","type","undefined","Stack","t0","$","t1","t2","t3","t4","t5","t6","t7","t8","t9","props","role","defaultTagName","_c","props","stylex.props"],"sources":["../../../src/components/stack/index.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport { isValidElement } from 'react';\nimport type { RenderComponentProps } from '../../render/useRender';\nimport { useRender } from '../../render/useRender';\nimport { mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { spacing } from '../../tokens/design.tokens.stylex';\n\n// Short names rather than the CSS values they map to, so a call site reads\n// `align=\"start\"` instead of `align=\"flex-start\"`. A lookup is unavoidable\n// either way — `alignItems` takes `flex-start` and `justifyContent` takes\n// `space-between`, neither of which is a word anyone wants in a prop.\n//\n// No Material Design page draws a stack. Its gaps are the spacing tokens,\n// the 4dp grid the layout pages space elements on, and `xl` is their 24dp\n// spacer between panes.\nconst alignments = {\n baseline: {\n kGNEyG: \"x1pha0wt\",\n $$css: true\n },\n center: {\n kGNEyG: \"x6s0dn4\",\n $$css: true\n },\n end: {\n kGNEyG: \"xuk3077\",\n $$css: true\n },\n start: {\n kGNEyG: \"x1cy8zhl\",\n $$css: true\n },\n stretch: {\n kGNEyG: \"x1qjc9v5\",\n $$css: true\n }\n};\n\n// One key per step of the spacing scale, named exactly as the token group\n// names it, so `gaps[gap]` indexes straight off the prop with no lookup table\n// to keep in sync — the same arrangement Text's type scale uses.\n//\n// `none` is the one key with no token behind it, and deliberately so: zero is\n// the absence of a spacing decision rather than a step of the scale, so there\n// is nothing for the scale to name. It exists because a stack that only wants\n// the direction and the alignment is otherwise a plain flex container written\n// out by hand.\nconst gaps = {\n lg: {\n kOIVth: \"xxj4525\",\n $$css: true\n },\n md: {\n kOIVth: \"x1gka490\",\n $$css: true\n },\n none: {\n kOIVth: \"xxhr3t\",\n $$css: true\n },\n sm: {\n kOIVth: \"x126z3so\",\n $$css: true\n },\n xl: {\n kOIVth: \"xj2l1yv\",\n $$css: true\n },\n xs: {\n kOIVth: \"xzoy561\",\n $$css: true\n },\n xxl: {\n kOIVth: \"xghv2kt\",\n $$css: true\n },\n xxs: {\n kOIVth: \"x14qo01y\",\n $$css: true\n },\n xxxl: {\n kOIVth: \"xvm9ira\",\n $$css: true\n }\n};\nconst justifications = {\n around: {\n kjj79g: \"x1l1ennw\",\n $$css: true\n },\n between: {\n kjj79g: \"x1qughib\",\n $$css: true\n },\n center: {\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n end: {\n kjj79g: \"x13a6bvl\",\n $$css: true\n },\n start: {\n kjj79g: \"x1nhvcw1\",\n $$css: true\n }\n};\n\n// `margin`, `padding` and `listStyleType` are the UA resets. A stack renders\n// a <div> by default, which has none of them, but `render` is how one becomes\n// a <ul>, and a list keeps a block margin above and below, an inline-start\n// padding and a marker on every item — a column 40px off its own gap, and\n// spaced from its neighbours by the UA rather than by whatever holds it.\n// Breadcrumbs clears the same three on the list it renders, and Text clears\n// the margin for the same reason.\n//\n// Clearing the markers costs a list its role in Safari, whose VoiceOver stops\n// announcing a list once its markers are gone, so a stack rendered as a <ul>\n// or an <ol> gives the role back itself — see `listRole`.\nconst styles = {\n base: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kH6xsr: \"x3ct3a4\",\n kogj98: \"x1ghz6dp\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n column: {\n kXwgrk: \"xdt5ytf\",\n $$css: true\n },\n row: {\n kXwgrk: \"x1q0g3np\",\n $$css: true\n },\n wrap: {\n kwnvtZ: \"x1a02dak\",\n $$css: true\n }\n};\ntype StackAlign = 'baseline' | 'center' | 'end' | 'start' | 'stretch';\ntype StackGap = 'lg' | 'md' | 'none' | 'sm' | 'xl' | 'xs' | 'xxl' | 'xxs' | 'xxxl';\ntype StackJustify = 'around' | 'between' | 'center' | 'end' | 'start';\ntype StackProps = {\n /**\n * How the children line up across the stack: along the inline axis of a\n * column, along the block axis of a row. Left unset, they stretch, which is\n * what makes every card in a column the same width.\n *\n * `start` is what an inline-sized child needs in a column — a Tag or a\n * Chip spans the whole width otherwise. `center` is what a row of controls\n * usually wants: stretched, every button grows to the tallest one, so a\n * label wrapping onto a second line makes its neighbours taller too.\n * `baseline` lines the children up on their first line of text, and only\n * means something in a row; in a column it places them as `start` does.\n */\n align?: StackAlign;\n /**\n * Which way the children run.\n * @default 'column'\n */\n direction?: 'column' | 'row';\n /**\n * The space between children, as a step of the spacing scale. `none` closes\n * it entirely.\n *\n * Worth setting. The default is a middle step, and how much air a group of\n * things wants is the one thing a stack cannot work out for itself.\n * @default 'md'\n */\n gap?: StackGap;\n /**\n * How leftover space is distributed along the stack. Left unset, the\n * children sit at the start and the space collects after them.\n *\n * `between` is the one that puts a headline at one end of a row and its\n * actions at the other.\n */\n justify?: StackJustify;\n /**\n * Lets the children wrap onto further lines rather than overflowing. A row\n * wraps once its children are wider than it is, and the gap then spaces\n * the lines as well as the children. A column wraps only when the stack is\n * given a fixed height, and then flows into further columns.\n * @default false\n */\n wrap?: boolean;\n} & RenderComponentProps<'div'>;\n\n// The role a list rendered through an element form of `render` is given\n// back, since the stack cleared the markers that carried it. Put under the\n// call site's props, and under the element's own as `useRender` merges them,\n// so a `role` written on either wins.\nfunction listRole(render: StackProps['render']) {\n return isValidElement(render) && (render.type === 'ul' || render.type === 'ol') ? 'list' : undefined;\n}\n\n/**\n * A row or a column of children with one gap between them, taken from the\n * spacing scale.\n *\n * Layout only — it paints no surface and wraps no child, so each child is a\n * flex item exactly as it was written. It is the answer to spacing a group of\n * things, which is why no component here carries a margin of its own: the\n * space between two things belongs to whatever holds both of them.\n *\n * `render` swaps the element, for a stack that should be a `<ul>`, a `<nav>`,\n * or a `<section>` rather than a `<div>`. A list comes without its UA margin,\n * padding and markers, and with `role=\"list\"`: Safari's VoiceOver stops\n * announcing a list once its markers are gone, and the role puts it back. A\n * `role` the call site writes, on the stack or on the element, is kept\n * instead. A `render` function returns an element the stack cannot see\n * before it renders, so a list returned from one wants the role written on\n * it.\n *\n * ```tsx\n * <Stack gap=\"sm\" render={<ul />}>\n * <li>First item</li>\n * <li>Second item</li>\n * <li>Third item</li>\n * </Stack>\n * ```\n *\n * That renders a `<ul role=\"list\">` with its items spaced by `sm`.\n */\nfunction Stack({\n align,\n direction = 'column',\n gap = 'md',\n justify,\n render,\n wrap = false,\n ...props\n}: StackProps) {\n return useRender({\n defaultTagName: 'div',\n props: {\n role: listRole(render),\n ...props,\n ...mergeStyles(stylex.props(styles.base, styles[direction], gaps[gap], align !== undefined && alignments[align], justify !== undefined && justifications[justify], wrap && styles.wrap), props)\n },\n render\n });\n}\nexport type { StackAlign, StackGap, StackJustify, StackProps };\nexport default Stack;"],"mappings":";;;;;;;AAkBA,MAAMQ,aAAa;CACjBC,UAAU;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,QAAQ;EACNF,QAAQ;EACRC,OAAO;CACT;CACAE,KAAK;EACHH,QAAQ;EACRC,OAAO;CACT;CACAG,OAAO;EACLJ,QAAQ;EACRC,OAAO;CACT;CACAI,SAAS;EACPL,QA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AP,EAAA,QAAAL,UAAAK,EAAA,QAAAI,MAAAJ,EAAA,QAAAM,IAAA;EANcC,KAAA;GAAAK,gBACCR;GAAKM,OACdJ;GAINX;EAEH;EAACK,EAAA,MAAAL;EAAAK,EAAA,MAAAI;EAAAJ,EAAA,MAAAM;EAAAN,EAAA,MAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OARMpD,GAAU2D,EAQhB;AAAC"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","isValidElement","useRender","mergeStyles","alignments","baseline","kGNEyG","$$css","center","end","start","stretch","gaps","lg","kOIVth","md","none","sm","xl","xs","xxl","xxs","xxxl","justifications","around","kjj79g","between","styles","base","kB7OPa","k1xSpc","kH6xsr","kogj98","kmVPX3","column","kXwgrk","row","wrap","kwnvtZ","align","direction","gap","justify","listRole","render","type","undefined","Stack","t0","$","t1","t2","t3","t4","t5","t6","t7","t8","t9","props","role","defaultTagName"],"sources":["../../../src/components/stack/index.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport { isValidElement } from 'react';\nimport type { RenderComponentProps } from '../../render/useRender';\nimport { useRender } from '../../render/useRender';\nimport { mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { spacing } from '../../tokens/design.tokens.stylex';\n\n// Short names rather than the CSS values they map to, so a call site reads\n// `align=\"start\"` instead of `align=\"flex-start\"`. A lookup is unavoidable\n// either way — `alignItems` takes `flex-start` and `justifyContent` takes\n// `space-between`, neither of which is a word anyone wants in a prop.\n//\n// No Material Design page draws a stack. Its gaps are the spacing tokens,\n// the 4dp grid the layout pages space elements on, and `xl` is their 24dp\n// spacer between panes.\nconst alignments = {\n baseline: {\n kGNEyG: \"x1pha0wt\",\n $$css: true\n },\n center: {\n kGNEyG: \"x6s0dn4\",\n $$css: true\n },\n end: {\n kGNEyG: \"xuk3077\",\n $$css: true\n },\n start: {\n kGNEyG: \"x1cy8zhl\",\n $$css: true\n },\n stretch: {\n kGNEyG: \"x1qjc9v5\",\n $$css: true\n }\n};\n\n// One key per step of the spacing scale, named exactly as the token group\n// names it, so `gaps[gap]` indexes straight off the prop with no lookup table\n// to keep in sync — the same arrangement Text's type scale uses.\n//\n// `none` is the one key with no token behind it, and deliberately so: zero is\n// the absence of a spacing decision rather than a step of the scale, so there\n// is nothing for the scale to name. It exists because a stack that only wants\n// the direction and the alignment is otherwise a plain flex container written\n// out by hand.\nconst gaps = {\n lg: {\n kOIVth: \"xxj4525\",\n $$css: true\n },\n md: {\n kOIVth: \"x1gka490\",\n $$css: true\n },\n none: {\n kOIVth: \"xxhr3t\",\n $$css: true\n },\n sm: {\n kOIVth: \"x126z3so\",\n $$css: true\n },\n xl: {\n kOIVth: \"xj2l1yv\",\n $$css: true\n },\n xs: {\n kOIVth: \"xzoy561\",\n $$css: true\n },\n xxl: {\n kOIVth: \"xghv2kt\",\n $$css: true\n },\n xxs: {\n kOIVth: \"x14qo01y\",\n $$css: true\n },\n xxxl: {\n kOIVth: \"xvm9ira\",\n $$css: true\n }\n};\nconst justifications = {\n around: {\n kjj79g: \"x1l1ennw\",\n $$css: true\n },\n between: {\n kjj79g: \"x1qughib\",\n $$css: true\n },\n center: {\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n end: {\n kjj79g: \"x13a6bvl\",\n $$css: true\n },\n start: {\n kjj79g: \"x1nhvcw1\",\n $$css: true\n }\n};\n\n// `margin`, `padding` and `listStyleType` are the UA resets. A stack renders\n// a <div> by default, which has none of them, but `render` is how one becomes\n// a <ul>, and a list keeps a block margin above and below, an inline-start\n// padding and a marker on every item — a column 40px off its own gap, and\n// spaced from its neighbours by the UA rather than by whatever holds it.\n// Breadcrumbs clears the same three on the list it renders, and Text clears\n// the margin for the same reason.\n//\n// Clearing the markers costs a list its role in Safari, whose VoiceOver stops\n// announcing a list once its markers are gone, so a stack rendered as a <ul>\n// or an <ol> gives the role back itself — see `listRole`.\nconst styles = {\n base: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kH6xsr: \"x3ct3a4\",\n kogj98: \"x1ghz6dp\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n column: {\n kXwgrk: \"xdt5ytf\",\n $$css: true\n },\n row: {\n kXwgrk: \"x1q0g3np\",\n $$css: true\n },\n wrap: {\n kwnvtZ: \"x1a02dak\",\n $$css: true\n }\n};\ntype StackAlign = 'baseline' | 'center' | 'end' | 'start' | 'stretch';\ntype StackGap = 'lg' | 'md' | 'none' | 'sm' | 'xl' | 'xs' | 'xxl' | 'xxs' | 'xxxl';\ntype StackJustify = 'around' | 'between' | 'center' | 'end' | 'start';\ntype StackProps = {\n /**\n * How the children line up across the stack: along the inline axis of a\n * column, along the block axis of a row. Left unset, they stretch, which is\n * what makes every card in a column the same width.\n *\n * `start` is what an inline-sized child needs in a column — a Tag or a\n * Chip spans the whole width otherwise. `center` is what a row of controls\n * usually wants: stretched, every button grows to the tallest one, so a\n * label wrapping onto a second line makes its neighbours taller too.\n * `baseline` lines the children up on their first line of text, and only\n * means something in a row; in a column it places them as `start` does.\n */\n align?: StackAlign;\n /**\n * Which way the children run.\n * @default 'column'\n */\n direction?: 'column' | 'row';\n /**\n * The space between children, as a step of the spacing scale. `none` closes\n * it entirely.\n *\n * Worth setting. The default is a middle step, and how much air a group of\n * things wants is the one thing a stack cannot work out for itself.\n * @default 'md'\n */\n gap?: StackGap;\n /**\n * How leftover space is distributed along the stack. Left unset, the\n * children sit at the start and the space collects after them.\n *\n * `between` is the one that puts a headline at one end of a row and its\n * actions at the other.\n */\n justify?: StackJustify;\n /**\n * Lets the children wrap onto further lines rather than overflowing. A row\n * wraps once its children are wider than it is, and the gap then spaces\n * the lines as well as the children. A column wraps only when the stack is\n * given a fixed height, and then flows into further columns.\n * @default false\n */\n wrap?: boolean;\n} & RenderComponentProps<'div'>;\n\n// The role a list rendered through an element form of `render` is given\n// back, since the stack cleared the markers that carried it. Put under the\n// call site's props, and under the element's own as `useRender` merges them,\n// so a `role` written on either wins.\nfunction listRole(render: StackProps['render']) {\n return isValidElement(render) && (render.type === 'ul' || render.type === 'ol') ? 'list' : undefined;\n}\n\n/**\n * A row or a column of children with one gap between them, taken from the\n * spacing scale.\n *\n * Layout only — it paints no surface and wraps no child, so each child is a\n * flex item exactly as it was written. It is the answer to spacing a group of\n * things, which is why no component here carries a margin of its own: the\n * space between two things belongs to whatever holds both of them.\n *\n * `render` swaps the element, for a stack that should be a `<ul>`, a `<nav>`,\n * or a `<section>` rather than a `<div>`. A list comes without its UA margin,\n * padding and markers, and with `role=\"list\"`: Safari's VoiceOver stops\n * announcing a list once its markers are gone, and the role puts it back. A\n * `role` the call site writes, on the stack or on the element, is kept\n * instead. A `render` function returns an element the stack cannot see\n * before it renders, so a list returned from one wants the role written on\n * it.\n *\n * ```tsx\n * <Stack gap=\"sm\" render={<ul />}>\n * <li>First item</li>\n * <li>Second item</li>\n * <li>Third item</li>\n * </Stack>\n * ```\n *\n * That renders a `<ul role=\"list\">` with its items spaced by `sm`.\n */\nfunction Stack({\n align,\n direction = 'column',\n gap = 'md',\n justify,\n render,\n wrap = false,\n ...props\n}: StackProps) {\n return useRender({\n defaultTagName: 'div',\n props: {\n role: listRole(render),\n ...props,\n ...mergeStyles(stylex.props(styles.base, styles[direction], gaps[gap], align !== undefined && alignments[align], justify !== undefined && justifications[justify], wrap && styles.wrap), props)\n },\n render\n });\n}\nexport type { StackAlign, StackGap, StackJustify, StackProps };\nexport default Stack;"],"mappings":";;;;;;;AAkBA,MAAMK,aAAa;CACjBC,UAAU;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,QAAQ;EACNF,QAAQ;EACRC,OAAO;CACT;CACAE,KAAK;EACHH,QAAQ;EACRC,OAAO;CACT;CACAG,OAAO;EACLJ,QAAQ;EACRC,OAAO;CACT;CACAI,SAAS;EACPL,QAAQ;EACRC,OAAO;CACT;AACF;AAWA,MAAMK,OAAO;CACXC,IAAI;EACFC,QAAQ;EACRP,OAAO;CACT;CACAQ,IAAI;EACFD,Q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EH;EAACK,EAAA,MAAAL;EAAAK,EAAA,MAAAI;EAAAJ,EAAA,MAAAM;EAAAN,EAAA,MAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OARM/C,GAAUsD,EAQhB;AAAC"}
@@ -33,5 +33,4 @@ type SupportingPaneProps = Omit<RenderComponentProps<'div'>, 'children'> & {
33
33
  * arrangement on screen.
34
34
  */
35
35
  declare function SupportingPane({ main, placement, render, supporting, ...props }: SupportingPaneProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
36
- export { type SupportingPaneProps, SupportingPane as default };
37
- //# sourceMappingURL=index.d.ts.map
36
+ export { type SupportingPaneProps, SupportingPane as default };