@kanso-labs/kanso-ui 0.47.5 → 0.48.1

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 (194) hide show
  1. package/dist/button/hooks.js +38 -4
  2. package/dist/button/hooks.js.map +1 -1
  3. package/dist/button/index.js +80 -67
  4. package/dist/button/index.js.map +1 -1
  5. package/dist/calendar/index.js +5 -5
  6. package/dist/calendar/styles.js +5 -5
  7. package/dist/calendar/styles.js.map +1 -1
  8. package/dist/chip/label.js +1 -1
  9. package/dist/chip/styles.js +1 -1
  10. package/dist/chip/styles.js.map +1 -1
  11. package/dist/collection/context.js +6 -0
  12. package/dist/collection/context.js.map +1 -0
  13. package/dist/collection/index.js +2 -2
  14. package/dist/collection/styles.js +29 -6
  15. package/dist/collection/styles.js.map +1 -1
  16. package/dist/components/app-bar/index.d.ts +1 -1
  17. package/dist/components/app-bar/index.js +2 -2
  18. package/dist/components/autocomplete/index.js +2 -2
  19. package/dist/components/avatar/index.d.ts +1 -1
  20. package/dist/components/avatar/index.js +1 -1
  21. package/dist/components/badge/index.js +3 -3
  22. package/dist/components/breadcrumbs/index.js +2 -2
  23. package/dist/components/button/index.d.ts +1 -1
  24. package/dist/components/button/index.js +3 -3
  25. package/dist/components/button/index.js.map +1 -1
  26. package/dist/components/button-group/index.d.ts +1 -1
  27. package/dist/components/button-group/index.js +3 -3
  28. package/dist/components/calendar/index.js +11 -4
  29. package/dist/components/calendar/index.js.map +1 -1
  30. package/dist/components/card/index.js +2 -2
  31. package/dist/components/carousel/index.d.ts +1 -1
  32. package/dist/components/carousel/index.js +2 -2
  33. package/dist/components/checkbox/index.js +13 -10
  34. package/dist/components/checkbox/index.js.map +1 -1
  35. package/dist/components/checkbox-group/index.js +4 -3
  36. package/dist/components/checkbox-group/index.js.map +1 -1
  37. package/dist/components/chip/index.js +2 -2
  38. package/dist/components/chip-group/index.js +72 -69
  39. package/dist/components/chip-group/index.js.map +1 -1
  40. package/dist/components/code/index.js +1 -1
  41. package/dist/components/color-area/index.js +2 -2
  42. package/dist/components/color-field/index.d.ts +1 -1
  43. package/dist/components/color-field/index.js +2 -2
  44. package/dist/components/color-picker/index.js +2 -2
  45. package/dist/components/color-slider/index.js +3 -3
  46. package/dist/components/color-swatch/index.js +3 -3
  47. package/dist/components/color-swatch-picker/index.js +3 -2
  48. package/dist/components/color-swatch-picker/index.js.map +1 -1
  49. package/dist/components/color-wheel/index.js +2 -2
  50. package/dist/components/combo-box/index.d.ts +1 -1
  51. package/dist/components/combo-box/index.js +8 -4
  52. package/dist/components/combo-box/index.js.map +1 -1
  53. package/dist/components/container/index.js +1 -1
  54. package/dist/components/copy-field/index.js +2 -2
  55. package/dist/components/currency/index.js +3 -3
  56. package/dist/components/date-field/index.d.ts +1 -1
  57. package/dist/components/date-field/index.js +2 -2
  58. package/dist/components/date-picker/index.d.ts +2 -2
  59. package/dist/components/date-picker/index.js +5 -5
  60. package/dist/components/date-range-picker/index.d.ts +2 -2
  61. package/dist/components/date-range-picker/index.js +3 -3
  62. package/dist/components/dialog/index.js +4 -4
  63. package/dist/components/disclosure/index.js +3 -3
  64. package/dist/components/disclosure-group/index.js +3 -3
  65. package/dist/components/drop-zone/index.js +2 -2
  66. package/dist/components/drop-zone/styles.js +11 -11
  67. package/dist/components/drop-zone/styles.js.map +1 -1
  68. package/dist/components/fab/index.d.ts +1 -1
  69. package/dist/components/fab/index.js +1 -1
  70. package/dist/components/fab-menu/index.d.ts +2 -2
  71. package/dist/components/fab-menu/index.js +6 -6
  72. package/dist/components/fab-menu/index.js.map +1 -1
  73. package/dist/components/feed/index.js +1 -1
  74. package/dist/components/form/index.js +2 -2
  75. package/dist/components/icon-button/index.d.ts +1 -1
  76. package/dist/components/icon-button/index.js +3 -3
  77. package/dist/components/icon-button/index.js.map +1 -1
  78. package/dist/components/keycap/index.js +2 -2
  79. package/dist/components/link/index.js +2 -2
  80. package/dist/components/list/index.js +61 -14
  81. package/dist/components/list/index.js.map +1 -1
  82. package/dist/components/list-box/index.js +84 -105
  83. package/dist/components/list-box/index.js.map +1 -1
  84. package/dist/components/list-detail/index.d.ts +1 -1
  85. package/dist/components/list-detail/index.js +1 -1
  86. package/dist/components/list-item/index.js +1 -1
  87. package/dist/components/loading-indicator/index.js +2 -2
  88. package/dist/components/menu/index.d.ts +2 -2
  89. package/dist/components/menu/index.js +3 -3
  90. package/dist/components/meter/index.d.ts +1 -1
  91. package/dist/components/meter/index.js +2 -2
  92. package/dist/components/navigation-bar/index.d.ts +1 -1
  93. package/dist/components/navigation-bar/index.js +2 -2
  94. package/dist/components/navigation-rail/index.d.ts +1 -1
  95. package/dist/components/navigation-rail/index.js +6 -6
  96. package/dist/components/navigation-rail/index.js.map +1 -1
  97. package/dist/components/navigation-tree/index.js +2 -2
  98. package/dist/components/number-field/index.d.ts +1 -1
  99. package/dist/components/number-field/index.js +5 -5
  100. package/dist/components/number-field/index.js.map +1 -1
  101. package/dist/components/popover/index.d.ts +1 -1
  102. package/dist/components/popover/index.js +7 -7
  103. package/dist/components/popover/index.js.map +1 -1
  104. package/dist/components/product-icon/index.d.ts +1 -1
  105. package/dist/components/product-icon/index.js +1 -1
  106. package/dist/components/progress-indicator/index.d.ts +1 -1
  107. package/dist/components/progress-indicator/index.js +2 -2
  108. package/dist/components/radio-group/index.js +14 -13
  109. package/dist/components/radio-group/index.js.map +1 -1
  110. package/dist/components/range-calendar/index.js +3 -3
  111. package/dist/components/search-field/index.js +6 -6
  112. package/dist/components/search-field/index.js.map +1 -1
  113. package/dist/components/search-view/index.d.ts +1 -1
  114. package/dist/components/search-view/index.js +2 -2
  115. package/dist/components/segmented-button/index.d.ts +1 -1
  116. package/dist/components/segmented-button/index.js +3 -3
  117. package/dist/components/select/index.d.ts +1 -1
  118. package/dist/components/select/index.js +8 -4
  119. package/dist/components/select/index.js.map +1 -1
  120. package/dist/components/separator/index.js +3 -3
  121. package/dist/components/sheet/index.js +4 -4
  122. package/dist/components/sheet/index.js.map +1 -1
  123. package/dist/components/slider/index.js +4 -4
  124. package/dist/components/slider/index.js.map +1 -1
  125. package/dist/components/snackbar/index.js +6 -6
  126. package/dist/components/snackbar/index.js.map +1 -1
  127. package/dist/components/split-button/index.d.ts +1 -1
  128. package/dist/components/split-button/index.js +56 -44
  129. package/dist/components/split-button/index.js.map +1 -1
  130. package/dist/components/stack/index.js +2 -2
  131. package/dist/components/supporting-pane/index.d.ts +1 -1
  132. package/dist/components/supporting-pane/index.js +1 -1
  133. package/dist/components/switch/index.d.ts +1 -1
  134. package/dist/components/switch/index.js +3 -3
  135. package/dist/components/table/index.js +61 -48
  136. package/dist/components/table/index.js.map +1 -1
  137. package/dist/components/tabs/index.js +84 -33
  138. package/dist/components/tabs/index.js.map +1 -1
  139. package/dist/components/tag/index.js +1 -1
  140. package/dist/components/text/index.js +1 -1
  141. package/dist/components/text-area/index.d.ts +1 -1
  142. package/dist/components/text-area/index.js +2 -2
  143. package/dist/components/text-field/index.d.ts +1 -1
  144. package/dist/components/text-field/index.js +2 -2
  145. package/dist/components/time-field/index.d.ts +1 -1
  146. package/dist/components/time-field/index.js +2 -2
  147. package/dist/components/time-picker/index.d.ts +1 -1
  148. package/dist/components/time-picker/index.js +9 -9
  149. package/dist/components/time-picker/index.js.map +1 -1
  150. package/dist/components/token-field/index.d.ts +1 -1
  151. package/dist/components/token-field/index.js +3 -3
  152. package/dist/components/toolbar/index.js +3 -3
  153. package/dist/components/tooltip/index.d.ts +1 -1
  154. package/dist/components/tooltip/index.js +2 -2
  155. package/dist/components/tree/index.js +81 -24
  156. package/dist/components/tree/index.js.map +1 -1
  157. package/dist/control/index.js +2 -2
  158. package/dist/drag/hooks.js +2 -2
  159. package/dist/drag/index.js +2 -2
  160. package/dist/field/index.js +106 -107
  161. package/dist/field/index.js.map +1 -1
  162. package/dist/field/styles.js +1 -1
  163. package/dist/field/styles.js.map +1 -1
  164. package/dist/glyphs/index.js +1 -1
  165. package/dist/hooks/useClippedTitle.js +1 -1
  166. package/dist/hooks/useEnlargedText.js +1 -1
  167. package/dist/hooks/useRipple.js +2 -2
  168. package/dist/hooks/useScrollEdges.js +73 -0
  169. package/dist/hooks/useScrollEdges.js.map +1 -0
  170. package/dist/i18n/index.js +2 -2
  171. package/dist/index.js +1 -1
  172. package/dist/indicator/index.js +2 -2
  173. package/dist/mark/index.js +2 -2
  174. package/dist/navigation/index.js +3 -3
  175. package/dist/navigation/styles.js +5 -5
  176. package/dist/navigation/styles.js.map +1 -1
  177. package/dist/overlay/index.js +1 -1
  178. package/dist/render/useRender.js +1 -1
  179. package/dist/row/index.js +2 -2
  180. package/dist/row/styles.js +7 -7
  181. package/dist/row/styles.js.map +1 -1
  182. package/dist/segments/index.js +1 -1
  183. package/dist/segments/literal.js +3 -3
  184. package/dist/styles/color.js +16 -16
  185. package/dist/styles/color.js.map +1 -1
  186. package/dist/styles/focus.js +4 -4
  187. package/dist/styles/focus.js.map +1 -1
  188. package/dist/styles/overlay.js +3 -3
  189. package/dist/styles/overlay.js.map +1 -1
  190. package/dist/styles/scroll-fade.js +33 -0
  191. package/dist/styles/scroll-fade.js.map +1 -0
  192. package/dist/styles.css +61 -20
  193. package/dist/theme-scope.js +4 -4
  194. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["chipStyles","assist","kMwMTN","$$css","base","k6CgDc","kGNEyG","kZKoxP","kaIpWk","ksu8eU","kMzoRj","kB7OPa","kkrTdU","k1xSpc","kmuXW","kMv6JI","kGuDYH","k63SB2","kOIVth","kb6lSQ","kLWn49","ks0D6T","k8WAf4","kg3NbH","kIyJzY","k1ekBW","kAMwcw","disabled","disabledSelected","kWkggS","disabledUnselected","kVAM5u","elevated","elevatedDisabled","kGVxlE","glyph","kzqmXN","kjj79g","keTefX","glyphFolded","k71WvV","kSiTet","glyphOpening","kVQacm","glyphSvg","icon","inert","label","kVAEAm","kg5iWk","kQ0QjF","khDVqt","raised","raisedHovered","remove","kgeoSG","kFcpXp","kEoFBp","kjBf7l","kInvED","k3XXqK","kMeerF","kmVPX3","removeDisabled","removeGlyph","selected","selectedHovered","surfaceCorners","target","kGOzcv","kpsdNU","trailing","unselected","chipLayers","elevatedFocused","elevatedHovered","elevatedPressed","removeHovered","removePressed","selectedFocused","selectedPressed","unselectedFocused","unselectedHovered","unselectedPressed"],"sources":["../../src/chip/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The pill the chips page draws, shared by the three components that draw\n// one: Chip, which is a toggle on its own or one of the page's two action\n// chips; ChipGroup's chip, which is one of a set that can also be removed;\n// and TokenField's token, which takes `base` and `unselected` alone — a token\n// is not selectable, so it reaches for neither the selected container nor\n// the check below. The measurements and roles are the page's filter chip — a\n// 32dp container with an 8dp corner and 16dp of inline padding, an outline\n// variant border while unselected, the secondary container pair once\n// selected.\n//\n// The assist and suggestion chips are that unselected pill, never selected.\n// The page's only difference between them is the label: on surface on an\n// assist chip, on surface variant on a suggestion chip as on a filter one.\n//\n// **An elevated chip trades the outline for a container**, surface container\n// low at the page's elevation 1, raised to 2 under a hovering pointer and\n// back to 1 while pressed, since a mouse press does not end the hover. A\n// selected one keeps the secondary container and takes the shadow with it.\n// Its 1px border stays, transparent, as every chip's does: a forced-colours\n// mode paints a transparent border in its text colour and drops the shadow\n// and the fill, so the border is the boundary left there.\n//\n// **A flat chip lies on the page, apart from one state.** A selected filter\n// chip under a hovering pointer rises to elevation 1, and comes back down\n// while pressed, as the page's filter chip tokens give it; every other flat\n// state, and every state of an input chip, stays at 0.\n//\n// **A disabled chip is translucent**, its content at 38% and its container at\n// 12% of on surface over whatever is behind it, as the page gives them,\n// rather than mixed into the surface. Mixed into the surface, a disabled chip\n// on a coloured container drew an opaque pale patch with grey text on it.\n//\n// **A label with no room on one line is cut short, never wrapped.** The\n// container is a fixed 32dp, so a second line has nowhere to go but out of\n// the pill: a chip or a token in a room narrower than its label drew the\n// rest below its own edge, and a chip in a group's row ran past the row's\n// end instead. The pill is held to the room it is in, and the label sits in\n// a span of its own that ends in an ellipsis where the pill does — a span,\n// because a flex container ignores `text-overflow`, which is also why\n// Material's own chips carry one. The whole label stays in the DOM, so a\n// screen reader still reads all of it.\n//\n// Each state composites an on-colour over its own container at the\n// interaction state's opacity rather than swapping in a separate hover\n// colour. `calc(<opacity> * 100%)` turns the token's unitless 0-1 ratio into\n// the percentage `color-mix()` takes, and it is inlined at each property\n// because @stylexjs/babel-plugin only statically recognises expressions\n// written directly as property values.\n//\n// The selected chip drops its border rather than recolouring it: it has a\n// container of its own to define its edge, and a border on top of that reads\n// as a second, competing outline.\n//\n// Disabled is applied from render state rather than from `:disabled`. Chip is\n// a button and would match the pseudo-class; a chip in a group is React\n// Aria's `Tag`, which is a div and never will. One mechanism serves both, and\n// StyleX replaces a property whole, so the disabled styles take the hover and\n// pressed branches of whichever state they are applied over.\n//\n// A selected chip carries the page's check before its label, which is what\n// makes the selection legible without colour. The two containers differ in\n// colour alone, and under a scheme whose secondary container sits close to\n// the surface — or for a reader who does not see colour — that is no\n// difference at all.\n//\n// The chip widens when the check appears, and that is the page's behaviour\n// rather than a cost of drawing it: a chip is flow content, laid out in a\n// row that wraps, so nothing around it has a width to hold. A segmented\n// button's segments are equal columns of one track, which is a different\n// geometry answering a different question, and the two should not be read\n// across. A chip given an icon does not widen, since the check takes the\n// icon's place in the same slot.\n//\n// **A filter chip can carry an icon after its label as well**, the page's\n// trailing icon, which is what draws its dropdown filter chip: an arrow\n// saying the chip opens a menu. It takes the same 18dp slot at the other\n// end, and the chip's content role rather than the primary one the leading\n// icon takes — on surface variant, then on secondary container once\n// selected, then the disabled 38% — so it is drawn in the chip's own colour\n// rather than a role of its own. The check never displaces it.\n//\n// **The widening is animated rather than taken in one frame.** A chip with\n// no icon keeps its slot mounted while unselected, folded to nothing, and\n// selecting it opens the slot over the chip's own short duration while the\n// check fades in, so the chips after it in a wrapped row glide rather than\n// jump 18dp. Reduced motion takes the change at once, as it does the\n// colours. A chip that can never be selected, an assist or suggestion chip\n// or one in a group that does not select, has no slot to open.\n//\n// **The press ripple takes the chip's corner from here** wherever the chip\n// is a ChipGroup's. The ripple clips itself to its host's corner by\n// inheriting it, and React Aria puts a cell between a group's chip and its\n// content, so what the ripple would inherit is the cell's square corner.\n// `surfaceCorners` restates the chip's own corner on a box the ripple sits\n// in, less the 1px border every chip keeps, since the ripple fills the\n// inside of that border.\n//\n// Apart from any component so a chip in a group and a chip on its own cannot\n// drift; see `src/row` for the same arrangement around a list's row.\n\n// The press area the chips page requires around its 32dp chip. A literal for\n// the reason IconButton's `TARGET_SIZE` gives.\nconst TARGET_SIZE = '48px';\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)';\nconst chipStyles = {\n assist: {\n kMwMTN: \"x139gbkf\",\n $$css: true\n },\n base: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xig8zya\",\n kaIpWk: \"x1xdvaa9\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kOIVth: \"x126z3so\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n ks0D6T: \"x193iq5w\",\n k8WAf4: \"xt970qd\",\n kg3NbH: \"x790zyz\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xu8237s\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n disabled: {\n kMwMTN: \"x1gpw424 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n disabledSelected: {\n kWkggS: \"x19v6zzp\",\n $$css: true\n },\n disabledUnselected: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"xrh88j3 xmnqt3w\",\n $$css: true\n },\n elevated: {\n kWkggS: \"x1vnz5z6\",\n kVAM5u: \"x9r1u3d\",\n $$css: true\n },\n elevatedDisabled: {\n kWkggS: \"x19v6zzp\",\n kVAM5u: \"x9r1u3d\",\n kGVxlE: \"x1gnnqk1\",\n $$css: true\n },\n glyph: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xmix8c7\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kGuDYH: \"xosj86m\",\n kzqmXN: \"x1xp8n7a\",\n kjj79g: \"xl56j7k\",\n keTefX: \"xxuhe3a\",\n $$css: true\n },\n glyphFolded: {\n kzqmXN: \"xnalus7\",\n k71WvV: \"x1kfc2zf\",\n keTefX: \"x1lziwak\",\n kSiTet: \"xg01cxk\",\n $$css: true\n },\n glyphOpening: {\n k6CgDc: \"x12w9bfk\",\n kVQacm: \"xb3r6kr\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x17vvy08\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n glyphSvg: {\n kZKoxP: \"xmix8c7\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x1xp8n7a\",\n $$css: true\n },\n icon: {\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n inert: {\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n label: {\n kB7OPa: \"x9f619\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x1n2onr6\",\n kg5iWk: \"xlyipyv\",\n kQ0QjF: \"x4ej8vm\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n raised: {\n kGVxlE: \"x19efjv6\",\n $$css: true\n },\n raisedHovered: {\n kGVxlE: \"x1os83gw\",\n $$css: true\n },\n remove: {\n kgeoSG: \"x1cpjm7i\",\n kFcpXp: \"xtu493u\",\n kEoFBp: \"x1hmns74\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"xmix8c7\",\n kaIpWk: \"x1dkaolv\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1heor9g\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x1xp8n7a\",\n kjj79g: \"xl56j7k\",\n k71WvV: \"x1kfc2zf\",\n kjBf7l: \"x14ytart\",\n kInvED: \"x1y3gkto\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n kmVPX3: \"x1717udv\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n removeDisabled: {\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n removeGlyph: {\n kZKoxP: \"xmix8c7\",\n kzqmXN: \"x1xp8n7a\",\n $$css: true\n },\n selected: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x9r1u3d\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n selectedHovered: {\n kGVxlE: \"x19efjv6\",\n $$css: true\n },\n surfaceCorners: {\n kaIpWk: \"x5a2xki\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"xjp7ctv\",\n $$css: true\n },\n target: {\n kgeoSG: \"x1cpjm7i\",\n kGOzcv: \"x1xkszu9\",\n kpsdNU: \"x1ecwmwu\",\n kEoFBp: \"x1hmns74\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n trailing: {\n k71WvV: \"x1kfc2zf\",\n keTefX: \"x1lziwak\",\n $$css: true\n },\n unselected: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"x133yhug\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\n\n// The hover and pressed layers, applied from React Aria's render state rather\n// than from `:hover` and `:active`, for Button's reasons — see its header: a\n// hover layer stayed on after a tap, and no pressed layer showed for a press\n// made from the keyboard. One pair per container, the pressed after the\n// hovered so a press wins, and one for the close target, whose own render\n// state is its button's. A token in a TokenField draws none of them: React\n// Aria reports neither state for one, since it is text the caret moves\n// through rather than a control a press acts on.\nconst chipLayers = {\n elevatedFocused: {\n kWkggS: \"x1drsm1c\",\n $$css: true\n },\n elevatedHovered: {\n kWkggS: \"x1ei6177\",\n $$css: true\n },\n elevatedPressed: {\n kWkggS: \"x1vt8e7r\",\n $$css: true\n },\n removeHovered: {\n kWkggS: \"x930l3l\",\n $$css: true\n },\n removePressed: {\n kWkggS: \"xsykwg8\",\n $$css: true\n },\n selectedFocused: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n selectedHovered: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n selectedPressed: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n unselectedFocused: {\n kWkggS: \"xwqhyid\",\n $$css: true\n },\n unselectedHovered: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n },\n unselectedPressed: {\n kWkggS: \"xjeeohs\",\n $$css: true\n }\n};\nexport { chipLayers, chipStyles };"],"mappings":";AAiHA,MAAMA,aAAa;CACjBC,QAAQ;EACNC,QAAQ;EACRC,OAAO;CACT;CACAC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,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;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRvB,OAAO;CACT;CACAwB,UAAU;EACRzB,QAAQ;EACRU,QAAQ;EACRT,OAAO;CACT;CACAyB,kBAAkB;EAChBC,QAAQ;EACR1B,OAAO;CACT;CACA2B,oBAAoB;EAClB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AAO;CACT;CACA6D,aAAa;EACXzD,QAAQ;EACR6B,QAAQ;EACRjC,OAAO;CACT;CACA8D,UAAU;EACRpC,QAAQ;EACRE,QAAQ;EACR7B,QAAQ;EACRC,OAAO;CACT;CACA+D,iBAAiB;EACfhC,QAAQ;EACR/B,OAAO;CACT;CACAgE,gBAAgB;EACd3D,QAAQ;EACRG,QAAQ;EACRE,QAAQ;EACRV,OAAO;CACT;CACAiE,QAAQ;EACNb,QAAQ;EACRc,QAAQ;EACRC,QAAQ;EACRb,QAAQ;EACRT,QAAQ;EACR7C,OAAO;CACT;CACAoE,UAAU;EACR/B,QAAQ;EACRF,QAAQ;EACRnC,OAAO;CACT;CACAqE,YAAY;EACV3C,QAAQ;EACRE,QAAQ;EACR7B,QAAQ;EACRC,OAAO;CACT;AACF;AAUA,MAAMsE,aAAa;CACjBC,iBAAiB;EACf7C,QAAQ;EACR1B,OAAO;CACT;CACAwE,iBAAiB;EACf9C,QAAQ;EACR1B,OAAO;CACT;CACAyE,iBAAiB;EACf/C,QAAQ;EACR1B,OAAO;CACT;CACA0E,eAAe;EACbhD,QAAQ;EACR1B,OAAO;CACT;CACA2E,eAAe;EACbjD,QAAQ;EACR1B,OAAO;CACT;CACA4E,iBAAiB;EACflD,QAAQ;EACR1B,OAAO;CACT;CACA+D,iBAAiB;EACfrC,QAAQ;EACR1B,OAAO;CACT;CACA6E,iBAAiB;EACfnD,QAAQ;EACR1B,OAAO;CACT;CACA8E,mBAAmB;EACjBpD,QAAQ;EACR1B,OAAO;CACT;CACA+E,mBAAmB;EACjBrD,QAAQ;EACR1B,OAAO;CACT;CACAgF,mBAAmB;EACjBtD,QAAQ;EACR1B,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"styles.js","names":["chipStyles","assist","kMwMTN","$$css","base","k6CgDc","kGNEyG","kZKoxP","kaIpWk","ksu8eU","kMzoRj","kB7OPa","kkrTdU","k1xSpc","kmuXW","kMv6JI","kGuDYH","k63SB2","kOIVth","kb6lSQ","kLWn49","ks0D6T","k8WAf4","kg3NbH","kIyJzY","k1ekBW","kAMwcw","disabled","disabledSelected","kWkggS","disabledUnselected","kVAM5u","elevated","elevatedDisabled","kGVxlE","glyph","kzqmXN","kjj79g","keTefX","glyphFolded","k71WvV","kSiTet","glyphOpening","kVQacm","glyphSvg","icon","inert","label","kVAEAm","kg5iWk","kQ0QjF","khDVqt","raised","raisedHovered","remove","kgeoSG","kFcpXp","kEoFBp","kjBf7l","kInvED","k3XXqK","kMeerF","kmVPX3","removeDisabled","removeGlyph","selected","selectedHovered","surfaceCorners","target","kGOzcv","kpsdNU","trailing","unselected","chipLayers","elevatedFocused","elevatedHovered","elevatedPressed","removeHovered","removePressed","selectedFocused","selectedPressed","unselectedFocused","unselectedHovered","unselectedPressed"],"sources":["../../src/chip/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The pill the chips page draws, shared by the three components that draw\n// one: Chip, which is a toggle on its own or one of the page's two action\n// chips; ChipGroup's chip, which is one of a set that can also be removed;\n// and TokenField's token, which takes `base` and `unselected` alone — a token\n// is not selectable, so it reaches for neither the selected container nor\n// the check below. The measurements and roles are the page's filter chip — a\n// 32dp container with an 8dp corner and 16dp of inline padding, an outline\n// variant border while unselected, the secondary container pair once\n// selected.\n//\n// The assist and suggestion chips are that unselected pill, never selected.\n// The page's only difference between them is the label: on surface on an\n// assist chip, on surface variant on a suggestion chip as on a filter one.\n//\n// **An elevated chip trades the outline for a container**, surface container\n// low at the page's elevation 1, raised to 2 under a hovering pointer and\n// back to 1 while pressed, since a mouse press does not end the hover. A\n// selected one keeps the secondary container and takes the shadow with it.\n// Its 1px border stays, transparent, as every chip's does: a forced-colours\n// mode paints a transparent border in its text colour and drops the shadow\n// and the fill, so the border is the boundary left there.\n//\n// **A flat chip lies on the page, apart from one state.** A selected filter\n// chip under a hovering pointer rises to elevation 1, and comes back down\n// while pressed, as the page's filter chip tokens give it; every other flat\n// state, and every state of an input chip, stays at 0.\n//\n// **A disabled chip is translucent**, its content at 38% and its container at\n// 12% of on surface over whatever is behind it, as the page gives them,\n// rather than mixed into the surface. Mixed into the surface, a disabled chip\n// on a coloured container drew an opaque pale patch with grey text on it.\n//\n// **A label with no room on one line is cut short, never wrapped.** The\n// container is a fixed 32dp, so a second line has nowhere to go but out of\n// the pill: a chip or a token in a room narrower than its label drew the\n// rest below its own edge, and a chip in a group's row ran past the row's\n// end instead. The pill is held to the room it is in, and the label sits in\n// a span of its own that ends in an ellipsis where the pill does — a span,\n// because a flex container ignores `text-overflow`, which is also why\n// Material's own chips carry one. The whole label stays in the DOM, so a\n// screen reader still reads all of it.\n//\n// Each state composites an on-colour over its own container at the\n// interaction state's opacity rather than swapping in a separate hover\n// colour. `calc(<opacity> * 100%)` turns the token's unitless 0-1 ratio into\n// the percentage `color-mix()` takes, and it is inlined at each property\n// because @stylexjs/babel-plugin only statically recognises expressions\n// written directly as property values.\n//\n// The selected chip drops its border rather than recolouring it: it has a\n// container of its own to define its edge, and a border on top of that reads\n// as a second, competing outline.\n//\n// Disabled is applied from render state rather than from `:disabled`. Chip is\n// a button and would match the pseudo-class; a chip in a group is React\n// Aria's `Tag`, which is a div and never will. One mechanism serves both, and\n// StyleX replaces a property whole, so the disabled styles take the hover and\n// pressed branches of whichever state they are applied over.\n//\n// A selected chip carries the page's check before its label, which is what\n// makes the selection legible without colour. The two containers differ in\n// colour alone, and under a scheme whose secondary container sits close to\n// the surface — or for a reader who does not see colour — that is no\n// difference at all.\n//\n// The chip widens when the check appears, and that is the page's behaviour\n// rather than a cost of drawing it: a chip is flow content, laid out in a\n// row that wraps, so nothing around it has a width to hold. A segmented\n// button's segments are equal columns of one track, which is a different\n// geometry answering a different question, and the two should not be read\n// across. A chip given an icon does not widen, since the check takes the\n// icon's place in the same slot.\n//\n// **A filter chip can carry an icon after its label as well**, the page's\n// trailing icon, which is what draws its dropdown filter chip: an arrow\n// saying the chip opens a menu. It takes the same 18dp slot at the other\n// end, and the chip's content role rather than the primary one the leading\n// icon takes — on surface variant, then on secondary container once\n// selected, then the disabled 38% — so it is drawn in the chip's own colour\n// rather than a role of its own. The check never displaces it.\n//\n// **The widening is animated rather than taken in one frame.** A chip with\n// no icon keeps its slot mounted while unselected, folded to nothing, and\n// selecting it opens the slot over the chip's own short duration while the\n// check fades in, so the chips after it in a wrapped row glide rather than\n// jump 18dp. Reduced motion takes the change at once, as it does the\n// colours. A chip that can never be selected, an assist or suggestion chip\n// or one in a group that does not select, has no slot to open.\n//\n// **The press ripple takes the chip's corner from here** wherever the chip\n// is a ChipGroup's. The ripple clips itself to its host's corner by\n// inheriting it, and React Aria puts a cell between a group's chip and its\n// content, so what the ripple would inherit is the cell's square corner.\n// `surfaceCorners` restates the chip's own corner on a box the ripple sits\n// in, less the 1px border every chip keeps, since the ripple fills the\n// inside of that border.\n//\n// Apart from any component so a chip in a group and a chip on its own cannot\n// drift; see `src/row` for the same arrangement around a list's row.\n\n// The press area the chips page requires around its 32dp chip. A literal for\n// the reason IconButton's `TARGET_SIZE` gives.\nconst TARGET_SIZE = '48px';\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)';\nconst chipStyles = {\n assist: {\n kMwMTN: \"x139gbkf\",\n $$css: true\n },\n base: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xig8zya\",\n kaIpWk: \"x1xdvaa9\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kOIVth: \"x126z3so\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n ks0D6T: \"x193iq5w\",\n k8WAf4: \"xt970qd\",\n kg3NbH: \"x790zyz\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xu8237s\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n disabled: {\n kMwMTN: \"x1gpw424 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n disabledSelected: {\n kWkggS: \"x19v6zzp\",\n $$css: true\n },\n disabledUnselected: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"xrh88j3 xmnqt3w\",\n $$css: true\n },\n elevated: {\n kWkggS: \"x1vnz5z6\",\n kVAM5u: \"x9r1u3d\",\n $$css: true\n },\n elevatedDisabled: {\n kWkggS: \"x19v6zzp\",\n kVAM5u: \"x9r1u3d\",\n kGVxlE: \"x1gnnqk1\",\n $$css: true\n },\n glyph: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xmix8c7\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kGuDYH: \"xosj86m\",\n kzqmXN: \"x1xp8n7a\",\n kjj79g: \"xl56j7k\",\n keTefX: \"xxuhe3a\",\n $$css: true\n },\n glyphFolded: {\n kzqmXN: \"xnalus7\",\n k71WvV: \"x1kfc2zf\",\n keTefX: \"x1lziwak\",\n kSiTet: \"xg01cxk\",\n $$css: true\n },\n glyphOpening: {\n k6CgDc: \"x12w9bfk\",\n kVQacm: \"xb3r6kr\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x17vvy08\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n glyphSvg: {\n kZKoxP: \"xmix8c7\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x1xp8n7a\",\n $$css: true\n },\n icon: {\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n inert: {\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n label: {\n kB7OPa: \"x9f619\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x1n2onr6\",\n kg5iWk: \"xlyipyv\",\n kQ0QjF: \"x4ej8vm\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n raised: {\n kGVxlE: \"x19efjv6\",\n $$css: true\n },\n raisedHovered: {\n kGVxlE: \"x1os83gw\",\n $$css: true\n },\n remove: {\n kgeoSG: \"x1cpjm7i\",\n kFcpXp: \"xtu493u\",\n kEoFBp: \"x1hmns74\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"xmix8c7\",\n kaIpWk: \"x1dkaolv\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1heor9g\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x1xp8n7a\",\n kjj79g: \"xl56j7k\",\n k71WvV: \"x1kfc2zf\",\n kjBf7l: \"x14ytart\",\n kInvED: \"x1y3gkto\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1s780dp\",\n kmVPX3: \"x1717udv\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n removeDisabled: {\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n removeGlyph: {\n kZKoxP: \"xmix8c7\",\n kzqmXN: \"x1xp8n7a\",\n $$css: true\n },\n selected: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x9r1u3d\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n selectedHovered: {\n kGVxlE: \"x19efjv6\",\n $$css: true\n },\n surfaceCorners: {\n kaIpWk: \"x5a2xki\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"xjp7ctv\",\n $$css: true\n },\n target: {\n kgeoSG: \"x1cpjm7i\",\n kGOzcv: \"x1xkszu9\",\n kpsdNU: \"x1ecwmwu\",\n kEoFBp: \"x1hmns74\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n trailing: {\n k71WvV: \"x1kfc2zf\",\n keTefX: \"x1lziwak\",\n $$css: true\n },\n unselected: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"x133yhug\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\n\n// The hover and pressed layers, applied from React Aria's render state rather\n// than from `:hover` and `:active`, for Button's reasons — see its header: a\n// hover layer stayed on after a tap, and no pressed layer showed for a press\n// made from the keyboard. One pair per container, the pressed after the\n// hovered so a press wins, and one for the close target, whose own render\n// state is its button's. A token in a TokenField draws none of them: React\n// Aria reports neither state for one, since it is text the caret moves\n// through rather than a control a press acts on.\nconst chipLayers = {\n elevatedFocused: {\n kWkggS: \"x1drsm1c\",\n $$css: true\n },\n elevatedHovered: {\n kWkggS: \"x1ei6177\",\n $$css: true\n },\n elevatedPressed: {\n kWkggS: \"x1vt8e7r\",\n $$css: true\n },\n removeHovered: {\n kWkggS: \"x930l3l\",\n $$css: true\n },\n removePressed: {\n kWkggS: \"xsykwg8\",\n $$css: true\n },\n selectedFocused: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n selectedHovered: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n selectedPressed: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n unselectedFocused: {\n kWkggS: \"xwqhyid\",\n $$css: true\n },\n unselectedHovered: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n },\n unselectedPressed: {\n kWkggS: \"xjeeohs\",\n $$css: true\n }\n};\nexport { chipLayers, chipStyles };"],"mappings":";AAiHA,MAAMA,aAAa;CACjBC,QAAQ;EACNC,QAAQ;EACRC,OAAO;CACT;CACAC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;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CACT;CACA+E,mBAAmB;EACjBrD,QAAQ;EACR1B,OAAO;CACT;CACAgF,mBAAmB;EACjBtD,QAAQ;EACR1B,OAAO;CACT;AACF"}
@@ -0,0 +1,6 @@
1
+ import { createContext } from "react";
2
+ // src/collection/context.ts
3
+ const OptionRowContext = createContext("list");
4
+ export { OptionRowContext };
5
+
6
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","names":["createContext","OptionRowContext"],"sources":["../../src/collection/context.ts"],"sourcesContent":["import { createContext } from 'react'\n\n// Which row a ListBox's options draw: the lists page's, wherever the list\n// sits on its own, or the menus page's inside the popup of a Select or a\n// ComboBox. Material Design draws an exposed dropdown menu — which is what\n// those two are — as a menu, so their options are 48dp rows at the menu's\n// 12dp with its selected container, and the list's section header, its\n// empty row and its load-more row follow the same page. The field providing\n// it is what decides; a ListBox cannot tell from inside whether it is in a\n// popup. Apart from the components so their modules export components alone,\n// which is what keeps fast refresh working for them.\nconst OptionRowContext = createContext<'list' | 'menu'>('list')\n\nexport { OptionRowContext }\n"],"mappings":";;AAWA,MAAMC,mBAAmBD,cAA+B,MAAM"}
@@ -1,11 +1,11 @@
1
+ import { c } from "react/compiler-runtime";
1
2
  import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
3
+ import { useContext, useEffect, useState } from "react";
2
4
  import ProgressIndicator from "../components/progress-indicator/index.js";
3
5
  import { useMessages } from "../i18n/index.js";
4
6
  import { rowStyles } from "../row/styles.js";
5
7
  import { EmptyStatusContext } from "./empty.js";
6
8
  import { collectionStyles } from "./styles.js";
7
- import { c } from "react/compiler-runtime";
8
- import { useContext, useEffect, useState } from "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  // src/collection/index.tsx
11
11
  /**
@@ -23,6 +23,13 @@ const collectionStyles = {
23
23
  kMwMTN: "x1w5n3ug",
24
24
  $$css: true
25
25
  },
26
+ focusVisible: {
27
+ kjBf7l: "xat36cu x1x84bn5",
28
+ kInvED: "x1v57pqu",
29
+ k3XXqK: "xaatb59",
30
+ kMeerF: "x1s780dp",
31
+ $$css: true
32
+ },
26
33
  header: {
27
34
  kB7OPa: "x9f619",
28
35
  kMwMTN: "x1w5n3ug",
@@ -36,6 +43,11 @@ const collectionStyles = {
36
43
  kg3NbH: "x790zyz",
37
44
  $$css: true
38
45
  },
46
+ headerMenu: {
47
+ kLKAdn: "x6gmt8y",
48
+ kg3NbH: "x18fpw6u",
49
+ $$css: true
50
+ },
39
51
  loading: {
40
52
  kGNEyG: "x6s0dn4",
41
53
  kB7OPa: "x9f619",
@@ -44,6 +56,10 @@ const collectionStyles = {
44
56
  kAzted: "xyax5pk",
45
57
  $$css: true
46
58
  },
59
+ loadingMenu: {
60
+ kAzted: "x1ddmzdj",
61
+ $$css: true
62
+ },
47
63
  section: {
48
64
  kB7OPa: "x9f619",
49
65
  k1xSpc: "x78zum5",
@@ -63,14 +79,17 @@ const collectionStyles = {
63
79
  };
64
80
  /**
65
81
  * A collection's own box, as the function React Aria's `className` prop
66
- * wants: the container, and the drop target while a drop would land on the
67
- * collection as a whole. List, ListBox and Tree each draw it.
82
+ * wants: the container, its ring while it holds keyboard focus itself, and
83
+ * the drop target while a drop would land on the collection as a whole.
84
+ * List, ListBox and Tree each draw it.
68
85
  */
69
86
  function containerClasses(state) {
70
87
  return {
71
88
  0: { className: "x9f619 x78zum5 xdt5ytf x1t137rt x1cmllll" },
72
- 1: { className: "x9f619 x78zum5 xdt5ytf x1cmllll x659ado xrgy624 x1x84bn5 x2ssjo2 xaatb59 x1de99jn" }
73
- }[!!state.isDropTarget << 0];
89
+ 2: { className: "x9f619 x78zum5 xdt5ytf x1cmllll xat36cu x1x84bn5 x1v57pqu xaatb59 x1s780dp" },
90
+ 1: { className: "x9f619 x78zum5 xdt5ytf x1cmllll x659ado xrgy624 x1x84bn5 x2ssjo2 xaatb59 x1de99jn" },
91
+ 3: { className: "x9f619 x78zum5 xdt5ytf x1cmllll x659ado xrgy624 x1x84bn5 x2ssjo2 xaatb59 x1de99jn" }
92
+ }[!!state.isFocusVisible << 1 | !!state.isDropTarget << 0];
74
93
  }
75
94
  /**
76
95
  * The styles a selectable row in a list takes, as the function React Aria's
@@ -90,10 +109,14 @@ function containerClasses(state) {
90
109
  * end. NavigationTree is not a caller: it draws the drawer variant, branches
91
110
  * on an ancestor being current, and reads `isCurrent` where these read
92
111
  * `isSelected`.
112
+ *
113
+ * `variant` is the row the item draws: the lists page's, or the menus
114
+ * page's floor, inset and selected container for a ListBox in the popup of a
115
+ * Select or a ComboBox — see `OptionRowContext` in ./context.ts.
93
116
  */
94
- function rowItemStyles(supporting, overline, extra) {
117
+ function rowItemStyles(supporting, overline, extra, variant = "list") {
95
118
  const lines = (hasContent(overline) ? 1 : 0) + (hasContent(supporting) ? 1 : 0);
96
- return (state) => props(rowStyles.base, rowStyles.list, extra, lines === 1 && rowStyles.twoLine, lines === 2 && rowStyles.threeLine, state.isDragging === true && rowStyles.dragging, state.isSelected && rowStyles.selectedList, state.isHovered && rowStyles.hovered, state.isFocusVisible && rowStyles.focusVisible, state.isFocusVisible && state.isSelected && rowStyles.focusVisibleSelected, state.isPressed && rowStyles.pressed, state.isDropTarget === true && rowStyles.dropTarget, state.isDisabled && rowStyles.disabled);
119
+ return (state) => props(rowStyles.base, variant === "menu" ? rowStyles.menu : rowStyles.list, extra, lines === 1 && rowStyles.twoLine, lines === 2 && rowStyles.threeLine, state.isDragging === true && rowStyles.dragging, state.isSelected && (variant === "menu" ? rowStyles.selectedMenu : rowStyles.selectedList), state.isHovered && rowStyles.hovered, state.isFocusVisible && rowStyles.focusVisible, state.isFocusVisible && state.isSelected && rowStyles.focusVisibleSelected, state.isPressed && rowStyles.pressed, state.isDropTarget === true && rowStyles.dropTarget, state.isDisabled && rowStyles.disabled);
97
120
  }
98
121
  export { collectionStyles, containerClasses, rowItemStyles };
99
122
 
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["stylex","hasContent","rowStyles","collectionStyles","container","kB7OPa","k1xSpc","kXwgrk","k3XXqK","k8WAf4","$$css","dropTarget","kWkggS","kjBf7l","kInvED","kMeerF","empty","kMwMTN","header","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kGO01o","kLKAdn","kg3NbH","loading","kGNEyG","kjj79g","kAzted","section","status","kZKoxP","kz4h6p","kzqmXN","kVQacm","kVAEAm","khDVqt","isDisabled","isDragging","isDropTarget","isFocusVisible","isHovered","isPressed","isSelected","containerClasses","state","className","rowItemStyles","supporting","overline","extra","lines","base","list","twoLine","threeLine","dragging","selectedList","hovered","focusVisible","focusVisibleSelected","pressed","disabled"],"sources":["../../src/collection/styles.ts"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { hasContent } from '../render/content';\nimport { rowStyles } from '../row/styles';\nimport '../tokens/design.tokens.stylex';\nimport { colors, sizing, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The chrome around the row. `src/row` was extracted so a list, menu, tree and\n// drawer draw the same row; everything wrapped around it stayed behind in each\n// component, so a change to the subhead over a list was three edits with\n// nothing failing if one were missed.\n//\n// Two of these are shared by four components and two by three, and the split\n// is the Material Design spec pages rather than convenience:\n//\n// - `container` and `section` are the box and the grouping, which List,\n// ListBox, Tree and NavigationTree all draw the same way.\n// - `header` and `loading` are the lists page's, so they are shared by the\n// three components that follow it. Menu and NavigationTree keep their own,\n// because the menus page and the navigation drawer page give different\n// values — a subhead tighter to the items above it, a label role rather\n// than a title role, and an inset that lines up with pill-shaped rows.\n// Those are the specs disagreeing rather than the code drifting, so each\n// stays where its comment explaining it is.\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)';\nconst collectionStyles = {\n container: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n k3XXqK: \"x1t137rt\",\n k8WAf4: \"x1cmllll\",\n $$css: true\n },\n dropTarget: {\n kWkggS: \"x659ado\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n empty: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n header: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xrgwony\",\n kGuDYH: \"x12s497w\",\n k63SB2: \"x1szcwkt\",\n kb6lSQ: \"xo803ec\",\n kLWn49: \"xyl1r0q\",\n kGO01o: \"xw3mh6e\",\n kLKAdn: \"x1clyivc\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n loading: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kjj79g: \"xl56j7k\",\n kAzted: \"xyax5pk\",\n $$css: true\n },\n section: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n $$css: true\n },\n status: {\n kZKoxP: \"xjm9jq1\",\n kB7OPa: \"x9f619\",\n kz4h6p: \"x1hyvwdk\",\n kzqmXN: \"x1i1rx1s\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n }\n};\n\n/**\n * The render state every collection item this covers reports. Each of React\n * Aria's own is wider than this, and this is the part the three share.\n */\ntype CollectionItemState = {\n isDisabled: boolean;\n /** Reported only where the collection drags; see `dragging` in `src/row`. */\n isDragging?: boolean;\n /** Reported only where the collection takes drops onto its items. */\n isDropTarget?: boolean;\n isFocusVisible: boolean;\n isHovered: boolean;\n isPressed: boolean;\n isSelected: boolean;\n};\n\n/**\n * A collection's own box, as the function React Aria's `className` prop\n * wants: the container, and the drop target while a drop would land on the\n * collection as a whole. List, ListBox and Tree each draw it.\n */\nfunction containerClasses(state: {\n isDropTarget: boolean;\n}) {\n return {\n 0: {\n className: \"x9f619 x78zum5 xdt5ytf x1t137rt x1cmllll\"\n },\n 1: {\n className: \"x9f619 x78zum5 xdt5ytf x1cmllll x659ado xrgy624 x1x84bn5 x2ssjo2 xaatb59 x1de99jn\"\n }\n }[!!state.isDropTarget << 0];\n}\n\n/**\n * The styles a selectable row in a list takes, as the function React Aria's\n * `className` prop wants.\n *\n * Which of the lists page's three items the row is, read from the content\n * rather than taken as a prop: a row holding all three lines already says it\n * is three lines, and a word for it would be a second place to get it wrong.\n * `ListItem` does the same arithmetic for the static row, and this is where\n * the collection forms share it.\n *\n * The three-line item is the only row whose slots move, which is why it alone\n * carries an alignment as well as a height.\n *\n * `extra` is the one difference between the three callers — Tree passes its\n * indent, which is why it sits where Tree already had it rather than at the\n * end. NavigationTree is not a caller: it draws the drawer variant, branches\n * on an ancestor being current, and reads `isCurrent` where these read\n * `isSelected`.\n */\nfunction rowItemStyles(supporting: ReactNode, overline: ReactNode, extra?: stylex.StyleXStyles) {\n const lines = (hasContent(overline) ? 1 : 0) + (hasContent(supporting) ? 1 : 0);\n return (state: CollectionItemState) => stylex.props(rowStyles.base, rowStyles.list, extra, lines === 1 && rowStyles.twoLine, lines === 2 && rowStyles.threeLine, state.isDragging === true && rowStyles.dragging, state.isSelected && rowStyles.selectedList, state.isHovered && rowStyles.hovered, state.isFocusVisible && rowStyles.focusVisible, state.isFocusVisible && state.isSelected && rowStyles.focusVisibleSelected, state.isPressed && rowStyles.pressed, state.isDropTarget === true && rowStyles.dropTarget, state.isDisabled && rowStyles.disabled);\n}\nexport type { CollectionItemState };\nexport { collectionStyles, containerClasses, rowItemStyles };"],"mappings":";;;;AA6BA,MAAMG,mBAAmB;CACvBC,WAAW;EACTC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,YAAY;EACVC,QAAQ;EACRC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AAiB,QAAQvC,UAAUS,YAAYoC,MAAMR,cAAcrC,UAAU8D,QAAQ;AACniB"}
1
+ {"version":3,"file":"styles.js","names":["stylex","hasContent","rowStyles","collectionStyles","container","kB7OPa","k1xSpc","kXwgrk","k3XXqK","k8WAf4","$$css","dropTarget","kWkggS","kjBf7l","kInvED","kMeerF","empty","kMwMTN","focusVisible","header","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kGO01o","kLKAdn","kg3NbH","headerMenu","loading","kGNEyG","kjj79g","kAzted","loadingMenu","section","status","kZKoxP","kz4h6p","kzqmXN","kVQacm","kVAEAm","khDVqt","isDisabled","isDragging","isDropTarget","isFocusVisible","isHovered","isPressed","isSelected","containerClasses","state","className","rowItemStyles","supporting","overline","extra","variant","lines","base","menu","list","twoLine","threeLine","dragging","selectedMenu","selectedList","hovered","focusVisibleSelected","pressed","disabled"],"sources":["../../src/collection/styles.ts"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { hasContent } from '../render/content';\nimport { rowStyles } from '../row/styles';\nimport '../tokens/design.tokens.stylex';\nimport { colors, sizing, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The chrome around the row. `src/row` was extracted so a list, menu, tree and\n// drawer draw the same row; everything wrapped around it stayed behind in each\n// component, so a change to the subhead over a list was three edits with\n// nothing failing if one were missed.\n//\n// Two of these are shared by four components and two by three, and the split\n// is the Material Design spec pages rather than convenience:\n//\n// - `container` and `section` are the box and the grouping, which List,\n// ListBox, Tree and NavigationTree all draw the same way.\n// - `header` and `loading` are the lists page's, so they are shared by the\n// three components that follow it. Menu and NavigationTree keep their own,\n// because the menus page and the navigation drawer page give different\n// values — a subhead tighter to the items above it, a label role rather\n// than a title role, and an inset that lines up with pill-shaped rows.\n// Those are the specs disagreeing rather than the code drifting, so each\n// stays where its comment explaining it is.\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)';\nconst collectionStyles = {\n container: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n k3XXqK: \"x1t137rt\",\n k8WAf4: \"x1cmllll\",\n $$css: true\n },\n dropTarget: {\n kWkggS: \"x659ado\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n empty: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n focusVisible: {\n kjBf7l: \"xat36cu x1x84bn5\",\n kInvED: \"x1v57pqu\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1s780dp\",\n $$css: true\n },\n header: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xrgwony\",\n kGuDYH: \"x12s497w\",\n k63SB2: \"x1szcwkt\",\n kb6lSQ: \"xo803ec\",\n kLWn49: \"xyl1r0q\",\n kGO01o: \"xw3mh6e\",\n kLKAdn: \"x1clyivc\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n headerMenu: {\n kLKAdn: \"x6gmt8y\",\n kg3NbH: \"x18fpw6u\",\n $$css: true\n },\n loading: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kjj79g: \"xl56j7k\",\n kAzted: \"xyax5pk\",\n $$css: true\n },\n loadingMenu: {\n kAzted: \"x1ddmzdj\",\n $$css: true\n },\n section: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n $$css: true\n },\n status: {\n kZKoxP: \"xjm9jq1\",\n kB7OPa: \"x9f619\",\n kz4h6p: \"x1hyvwdk\",\n kzqmXN: \"x1i1rx1s\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n }\n};\n\n/**\n * The render state every collection item this covers reports. Each of React\n * Aria's own is wider than this, and this is the part the three share.\n */\ntype CollectionItemState = {\n isDisabled: boolean;\n /** Reported only where the collection drags; see `dragging` in `src/row`. */\n isDragging?: boolean;\n /** Reported only where the collection takes drops onto its items. */\n isDropTarget?: boolean;\n isFocusVisible: boolean;\n isHovered: boolean;\n isPressed: boolean;\n isSelected: boolean;\n};\n\n/**\n * A collection's own box, as the function React Aria's `className` prop\n * wants: the container, its ring while it holds keyboard focus itself, and\n * the drop target while a drop would land on the collection as a whole.\n * List, ListBox and Tree each draw it.\n */\nfunction containerClasses(state: {\n isDropTarget: boolean;\n isFocusVisible: boolean;\n}) {\n return {\n 0: {\n className: \"x9f619 x78zum5 xdt5ytf x1t137rt x1cmllll\"\n },\n 2: {\n className: \"x9f619 x78zum5 xdt5ytf x1cmllll xat36cu x1x84bn5 x1v57pqu xaatb59 x1s780dp\"\n },\n 1: {\n className: \"x9f619 x78zum5 xdt5ytf x1cmllll x659ado xrgy624 x1x84bn5 x2ssjo2 xaatb59 x1de99jn\"\n },\n 3: {\n className: \"x9f619 x78zum5 xdt5ytf x1cmllll x659ado xrgy624 x1x84bn5 x2ssjo2 xaatb59 x1de99jn\"\n }\n }[!!state.isFocusVisible << 1 | !!state.isDropTarget << 0];\n}\n\n/**\n * The styles a selectable row in a list takes, as the function React Aria's\n * `className` prop wants.\n *\n * Which of the lists page's three items the row is, read from the content\n * rather than taken as a prop: a row holding all three lines already says it\n * is three lines, and a word for it would be a second place to get it wrong.\n * `ListItem` does the same arithmetic for the static row, and this is where\n * the collection forms share it.\n *\n * The three-line item is the only row whose slots move, which is why it alone\n * carries an alignment as well as a height.\n *\n * `extra` is the one difference between the three callers — Tree passes its\n * indent, which is why it sits where Tree already had it rather than at the\n * end. NavigationTree is not a caller: it draws the drawer variant, branches\n * on an ancestor being current, and reads `isCurrent` where these read\n * `isSelected`.\n *\n * `variant` is the row the item draws: the lists page's, or the menus\n * page's floor, inset and selected container for a ListBox in the popup of a\n * Select or a ComboBox — see `OptionRowContext` in ./context.ts.\n */\nfunction rowItemStyles(supporting: ReactNode, overline: ReactNode, extra?: stylex.StyleXStyles, variant: 'list' | 'menu' = 'list') {\n const lines = (hasContent(overline) ? 1 : 0) + (hasContent(supporting) ? 1 : 0);\n return (state: CollectionItemState) => stylex.props(rowStyles.base, variant === 'menu' ? rowStyles.menu : rowStyles.list, extra, lines === 1 && rowStyles.twoLine, lines === 2 && rowStyles.threeLine, state.isDragging === true && rowStyles.dragging, state.isSelected && (variant === 'menu' ? rowStyles.selectedMenu : rowStyles.selectedList), state.isHovered && rowStyles.hovered, state.isFocusVisible && rowStyles.focusVisible, state.isFocusVisible && state.isSelected && rowStyles.focusVisibleSelected, state.isPressed && rowStyles.pressed, state.isDropTarget === true && rowStyles.dropTarget, state.isDisabled && rowStyles.disabled);\n}\nexport type { CollectionItemState };\nexport { collectionStyles, containerClasses, rowItemStyles };"],"mappings":";;;;AA6BA,MAAMG,mBAAmB;CACvBC,WAAW;EACTC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,YAAY;EACVC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRN,QAAQ;EACRO,QAAQ;EACRL,OAAO;CACT;CACAM,OAAO;EACLC,QAAQ;EACRP,OAAO;CACT;CACAQ,cAAc;EACZL,QAAQ;EACRC,QAAQ;EACRN,QAAQ;EACRO,QAAQ;EACRL,OAAO;CACT;CACAS,QAAQ;EACNd,QAAQ;EACRY,QAAQ;EACRG,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRjB,OAAO;CACT;CACAkB,YAAY;EACVF,QAAQ;EACRC,QAAQ;EACRjB,OAAO;CACT;CACAmB,SAAS;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"}
@@ -1,5 +1,5 @@
1
- import { RenderComponentProps } from "../../render/useRender.js";
2
1
  import { ReactNode } from "react";
2
+ import { RenderComponentProps } from "../../render/useRender.js";
3
3
  type AppBarProps = Omit<RenderComponentProps<'header'>, 'children'> & {
4
4
  /**
5
5
  * Which of Material Design's alignments the text takes. `center` is the
@@ -1,5 +1,7 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
4
+ import { createElement, useEffect, useLayoutEffect, useRef } from "react";
3
5
  import "../../hooks/useAppBarScroll.js";
4
6
  import { hasContent } from "../../render/content.js";
5
7
  import { useRender } from "../../render/useRender.js";
@@ -7,8 +9,6 @@ import { mergeStyles } from "../../styles/merge.js";
7
9
  import { spacing } from "../../tokens/design.tokens.stylex.js";
8
10
  import { motionDurationMs, motionEasing } from "../../tokens/values.js";
9
11
  import Text from "../text/index.js";
10
- import { c } from "react/compiler-runtime";
11
- import { createElement, useEffect, useLayoutEffect, useRef } from "react";
12
12
  import { jsx, jsxs } from "react/jsx-runtime";
13
13
  // src/components/app-bar/index.tsx
14
14
  const ICON_BUTTON_TARGET = "48px";
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { CollectionStatus } from "../../collection/index.js";
3
2
  import { c } from "react/compiler-runtime";
4
- import { jsx } from "react/jsx-runtime";
5
3
  import { Autocomplete as Autocomplete$1, useFilter } from "react-aria-components";
4
+ import { CollectionStatus } from "../../collection/index.js";
5
+ import { jsx } from "react/jsx-runtime";
6
6
  // src/components/autocomplete/index.tsx
7
7
  /**
8
8
  * A search input that filters the collection under it. Its value is React
@@ -1,5 +1,5 @@
1
- import { RenderComponentProps } from "../../render/useRender.js";
2
1
  import { ImgHTMLAttributes } from "react";
2
+ import { RenderComponentProps } from "../../render/useRender.js";
3
3
  type AvatarProps = {
4
4
  /**
5
5
  * Hides the avatar from assistive technology, for one beside the person's
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import Mark from "../../mark/index.js";
3
2
  import { c } from "react/compiler-runtime";
3
+ import Mark from "../../mark/index.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  // src/components/avatar/index.tsx
6
6
  /**
@@ -1,12 +1,12 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
4
+ import { useContext } from "react";
5
+ import { useLocale } from "react-aria-components";
3
6
  import { BadgeMarkContext } from "../../badge/index.js";
4
7
  import { useRender } from "../../render/useRender.js";
5
8
  import { mergeStyles } from "../../styles/merge.js";
6
- import { c } from "react/compiler-runtime";
7
- import { useContext } from "react";
8
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
- import { useLocale } from "react-aria-components";
10
10
  // src/components/badge/index.tsx
11
11
  const styles = {
12
12
  count: {
@@ -1,10 +1,10 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
3
+ import { Breadcrumb, Breadcrumbs as Breadcrumbs$1 } from "react-aria-components";
2
4
  import { ChevronEndGlyph } from "../../glyphs/index.js";
3
5
  import { mergeStatefulStyles, mergeStyles } from "../../styles/merge.js";
4
6
  import Link$1 from "../link/index.js";
5
- import { c } from "react/compiler-runtime";
6
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
- import { Breadcrumb, Breadcrumbs as Breadcrumbs$1 } from "react-aria-components";
8
8
  // src/components/breadcrumbs/index.tsx
9
9
  /**
10
10
  * A trail of links back up a hierarchy, ending at the page you are on.
@@ -1,6 +1,6 @@
1
- import { ButtonDOMProps, ButtonLinkForm, ButtonPressForm, ButtonState, ButtonToggleForm } from "../../button/index.js";
2
1
  import { ReactNode, RefAttributes } from "react";
3
2
  import { ClassNameOrFunction, StyleOrFunction } from "react-aria-components";
3
+ import { ButtonDOMProps, ButtonLinkForm, ButtonPressForm, ButtonState, ButtonToggleForm } from "../../button/index.js";
4
4
  type ButtonProps = ButtonDOMProps & (ButtonLinkForm | ButtonPressForm | (ButtonToggleForm & {
5
5
  /**
6
6
  * A toggle takes any variant but `text`, which the page gives no
@@ -1,5 +1,8 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
4
+ import { useContext, useState } from "react";
5
+ import { ToggleGroupStateContext } from "react-aria-components";
3
6
  import { ButtonBase, ToggleButtonBase } from "../../button/index.js";
4
7
  import { ButtonGroupItemContext } from "../../button/context.js";
5
8
  import { groupPressHandlers } from "../../button/group.js";
@@ -7,10 +10,7 @@ import { useSelection } from "../../button/hooks.js";
7
10
  import { pressThen } from "../../button/toggle.js";
8
11
  import { focus } from "../../styles/focus.js";
9
12
  import { spacing } from "../../tokens/design.tokens.stylex.js";
10
- import { c } from "react/compiler-runtime";
11
- import { useContext, useState } from "react";
12
13
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
- import { ToggleGroupStateContext } from "react-aria-components";
14
14
  // src/components/button/index.tsx
15
15
  const styles = {
16
16
  base: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","stylex","useContext","useState","ToggleGroupStateContext","ButtonGroupItemContext","groupPressHandlers","useSelection","pressThen","focus","spacing","styles","base","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kB7OPa","kkrTdU","k1xSpc","kMv6JI","kGuDYH","k63SB2","kOIVth","kjj79g","kb6lSQ","kLWn49","ks0D6T","kHjlTd","kVAEAm","k9WMMc","kybGjl","kIyJzY","k1ekBW","kAMwcw","$$css","disabled","elevated","kWkggS","kGVxlE","kMwMTN","elevatedDisabled","elevatedToggleSelected","filled","filledDisabled","filledToggle","filledToggleSelected","icon","kmuXW","lg","kAzted","k8WAf4","kg3NbH","md","kgeoSG","kGOzcv","kpsdNU","kEoFBp","outlined","outlinedDisabled","outlinedToggleSelected","pending","text","textDisabled","tonal","tonalDisabled","tonalToggleSelected","xl","xs","xxl","OUTLINE_WIDTHS","outlinedSizes","iconSizes","PADDINGS","shifted","padding","value","undefined","val","roundShapes","kaIpWk","squareShapes","pressedShapes","hovered","focused","pressed","disabledStyles","toggleContainers","selected","unselected","variant","children","disableRipple","pendingLabel","shape","size","Button","t0","$","defaultSelected","href","isPending","isSelected","onChange","rel","t1","ownSize","target","t2","props","group","inSelectingGroup","grouped","onPressStart","onPressEnd","t3","selection","keyHeld","setKeyHeld","press","event","event_0","pointerType","ripples","t4","content","t5","buttonClasses","toggleClasses","isToggle","onPress","toggle","state","ring","isHovered","isPressed","isFocusVisible","groupStyles","isDisabled","border","shift","container"],"sources":["../../../src/components/button/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, PressEvent, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useState } from 'react';\nimport { ToggleGroupStateContext } from 'react-aria-components';\nimport type { ButtonClassesState, ButtonDOMProps, ButtonLinkForm, ButtonPressForm, ButtonState, ButtonToggleForm } from '../../button';\nimport type { ButtonGroupItem } from '../../button/context';\nimport { ButtonBase, ToggleButtonBase } from '../../button';\nimport { ButtonGroupItemContext } from '../../button/context';\nimport { groupPressHandlers } from '../../button/group';\nimport { useSelection } from '../../button/hooks';\nimport { pressThen } from '../../button/toggle';\nimport { focus } from '../../styles/focus';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// Each variant composites its label colour over its container at the\n// interaction state's opacity, rather than swapping in a separate\n// hover/pressed color: filled and tonal paint the 'on-color' over the\n// container, outlined, text and elevated paint the label colour over their\n// own. The pairs are the buttons spec page's newer values: tonal on\n// secondary container, outlined with an outline variant border and an\n// on-surface-variant label, text on primary, elevated on surface container\n// low with a primary label.\n//\n// **The outlined rule is faint on purpose.** Outline variant sits at about\n// 1.6:1 against the surface in the light theme and 2:1 in the dark, under the\n// 3:1 WCAG asks of a boundary that identifies a control. The rule is not that\n// boundary: the label identifies the button, in on-surface-variant at about\n// 9:1, and the rule only shows how far the button reaches. IconButton's\n// outlined variant draws its rule in the same role for the same reason.\n//\n// **Elevated is the one variant whose shadow is part of its identity.** The\n// page rests it at elevation 1 rather than flat, raises it on hover and\n// returns it to 1 while pressed — where filled and tonal rest flat and lift\n// only on hover. Disabled drops it to none, since a shadow says a control is\n// available to press.\n// calc(<opacity> * 100%) turns the token's unitless 0-1 ratio into the\n// percentage color-mix() takes. Inlined rather than factored into a helper:\n// @stylexjs/babel-plugin only statically recognizes expressions written\n// directly as property values, and a call to an externally-defined function\n// isn't one of them.\n//\n// The hover, focus and pressed layers come from React Aria's render state,\n// `isHovered`, `isFocusVisible` and `isPressed`, rather than from `:hover`,\n// `:focus-visible` and `:active`. On a touch screen Chromium leaves `:hover`\n// on the last element tapped, so the layer and its lifted shadow stayed on a\n// button after the tap had ended, where React Aria ignores the emulated mouse\n// events that follow a touch. And React Aria prevents the default of the\n// keydown that presses a button with Space or Enter, so `:active` never\n// matched a keyboard press, which `isPressed` reports like any other.\n//\n// A press is one layer, as the page draws it: the ripple at the pressed\n// opacity, over the container at rest. The hover layer and its lift come off\n// while the button is pressed, so neither stacks under the ripple, and the\n// `pressed` table is the layer a button draws in the ripple's place: when\n// `disableRipple` turns the ripple off, and while a key holds the button\n// down, since the ripple answers a key only once it is released. The layer\n// then gives way to the ripple, which plays its whole press from there.\n//\n// Disabled is a style of its own per variant rather than a `:disabled`\n// branch inside each property: a button given `href` renders as a link,\n// which React Aria turns into a <span> while disabled, and neither matches\n// the pseudo-class. The disabled styles are applied last from the render\n// state's `isDisabled`, and StyleX replaces a property whole, so they win\n// over any state layer applied before them.\n//\n// **Under forced colours a container is drawn as a rule.** That mode drops\n// the shadow and paints author backgrounds in a system colour, which left a\n// filled, tonal or elevated button as a label with nothing round it. `base`\n// draws a 1px `ButtonText` border there instead. Outlined keeps its own rule,\n// and text stays without one, as the page draws it. The mode repaints a\n// disabled button's fade at full strength as well. Chromium greys a disabled\n// `<button>` there by itself, but not the `<span>` React Aria renders for a\n// disabled link, so the disabled styles name `GrayText` for the label and\n// the edge rather than leave it to the browser.\n//\n// Two independent axes, applied base -> variant -> size. The variant carries\n// colour and the size carries geometry, so the two never argue: inline\n// padding belongs to the size alone, and every size declares its own.\n//\n// That is deliberate rather than incidental. The buttons page gives padding\n// per size — its Small button padding is 16dp, the 24dp beside it being the\n// older value the page marks as not recommended — and gives the five colour\n// styles no padding of their own. A text button is therefore as wide as a\n// filled one at the same size, which is what the code draws.\n//\n// This did once read the other way, with `md` declaring no padding so a\n// medium button fell through to its variant's. `fix(button)!: the spec's\n// five sizes` replaced that when the component took the page's sizes, since\n// a per-variant padding had nowhere to sit once every size carried one. The\n// comment describing the old cascade outlived it by some months, which is\n// how it came to say `text` keeps a tighter padding it has never had — back\n// then `text` declared 16dp while a filled `md` declared none at all, so the\n// text button was the wider of the two.\n//\n// **A toggle is the same button reporting a state.** Given `isSelected`,\n// `defaultSelected` or `onChange` it is React Aria's `ToggleButton`, which\n// announces the state through `aria-pressed`, as IconButton's toggle does.\n// The page gives four of the five styles a second pair of colour roles for\n// it: a filled toggle rests on surface container with an on-surface-variant\n// label and takes primary once selected, a tonal one moves from the\n// secondary container pair to secondary, an elevated one keeps its low\n// surface until it takes primary, and an outlined one swaps its rule for the\n// inverse surface pair. Under forced colours a selected toggle of any style\n// is filled `Highlight`, as IconButton's is. The page gives text no pair, so\n// a text button given those props stays a plain one.\n//\n// **The corner is a shape the button morphs between**, from the page's size\n// token sets. `round` rests at half the container's height, which is the pill\n// for a label on one line, and `square` at the size's square corner: 12dp up\n// to the page's S, 16dp at M and 28dp above. A press tightens either to the\n// size's pressed corner, 8dp, 12dp or 16dp, and a toggle trades its shape for\n// the other once selected — a round one for the square corner, a square one\n// for the round. The corner eases over the motion tokens' short duration, as\n// the container, label and rule colours and the shadow do between states, and\n// all of them move at once for a reader who asks for reduced motion.\n//\n// The round corner is a length rather than the pill token's 9999px, because\n// the browser draws a corner no larger than half the box and eases the value\n// as written. From 9999px a press spent all but the last frame or two of its\n// 150ms above the 20dp a medium button can show, so the corner held round and\n// then jumped. From half the height every frame of the ease is one the eye\n// can see. A label that wraps makes a button taller than that, and its ends a\n// little less than round, as a connected ButtonGroup's already are.\n//\n// What every button does past its own styles — the ripple, the link and\n// toggle forms, the pending ring and `aria-busy`, a parent's disabled state\n// — is `src/button`'s, shared with IconButton.\n\n/**\n * The press area the buttons page requires, which its two smallest sizes are\n * drawn under. A literal rather than `sizing.controlMd`, which holds the same\n * number, for the reason IconButton's `TARGET_SIZE` gives: a consumer\n * resizing their medium controls should not shrink a target the page states\n * as a floor.\n */\nconst TARGET_SIZE = '48px';\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)';\nconst styles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1ylmb6m\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kOIVth: \"x126z3so\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n ks0D6T: \"x193iq5w\",\n kHjlTd: \"xj0a0fe\",\n kVAEAm: \"x1n2onr6\",\n k9WMMc: \"x2b8uid\",\n kybGjl: \"x1hl2dhg\",\n kIyJzY: \"x4ukx00 x12w9bfk\",\n k1ekBW: \"xidvh3d\",\n kAMwcw: \"xmg88ys\",\n $$css: true\n },\n disabled: {\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n elevated: {\n kWkggS: \"x1vnz5z6\",\n kGVxlE: \"x19efjv6\",\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n elevatedDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n elevatedToggleSelected: {\n kWkggS: \"xnety89 x1jzqe4\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n $$css: true\n },\n filled: {\n kWkggS: \"xnety89\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"xwjo7ld\",\n $$css: true\n },\n filledDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"x1mjdul6\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"xnety89 x1jzqe4\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n lg: {\n kMv6JI: \"x46eyla\",\n kGuDYH: \"x5ehqhr\",\n k63SB2: \"xrf6cl6\",\n kb6lSQ: \"x1g135zh\",\n kLWn49: \"x1ggk5va\",\n kAzted: \"xdovgog\",\n k8WAf4: \"x1uvvd8r\",\n kg3NbH: \"xg0ps1x\",\n $$css: true\n },\n md: {\n kgeoSG: \"x1cpjm7i\",\n kGOzcv: \"xun2zgk\",\n kpsdNU: \"xm4btww\",\n kEoFBp: \"x1hmns74\",\n kAzted: \"x1cio8j0\",\n k8WAf4: \"x1cmllll\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n outlined: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"x133yhug\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n outlinedDisabled: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"xrh88j3 xmnqt3w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"x1c5gpgi x1jzqe4\",\n kVAM5u: \"x9r1u3d x1n2ykn\",\n kMwMTN: \"x1girmi0 x1k5gbb1\",\n $$css: true\n },\n pending: {\n kkrTdU: \"x19v85br\",\n $$css: true\n },\n text: {\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n textDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n tonal: {\n kWkggS: \"x15dekr4\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n tonalDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x167r6xl x1jzqe4\",\n kMwMTN: \"x1lba3jz x1k5gbb1\",\n $$css: true\n },\n xl: {\n kMv6JI: \"x1fz0g89\",\n kGuDYH: \"xkb6epg\",\n k63SB2: \"x76yrz5\",\n kOIVth: \"x1gka490\",\n kb6lSQ: \"x1s1qhaa\",\n kLWn49: \"x1voeury\",\n kAzted: \"x112cvos\",\n k8WAf4: \"xny1cbh\",\n kg3NbH: \"x1sdxjpb\",\n $$css: true\n },\n xs: {\n kgeoSG: \"x1cpjm7i\",\n kGOzcv: \"xun2zgk\",\n kpsdNU: \"x1ecwmwu\",\n kEoFBp: \"x1hmns74\",\n kOIVth: \"xzoy561\",\n kAzted: \"xlzjxrf\",\n k8WAf4: \"xmqoko8\",\n kg3NbH: \"x18fpw6u\",\n $$css: true\n },\n xxl: {\n kMv6JI: \"x1vsmgmf\",\n kGuDYH: \"xh9c4x\",\n k63SB2: \"x1y15vu6\",\n kOIVth: \"xxj4525\",\n kb6lSQ: \"xoqu3bc\",\n kLWn49: \"x10x9d6x\",\n kAzted: \"xldltni\",\n k8WAf4: \"x1lrxzt4\",\n kg3NbH: \"x1dao9b2\",\n $$css: true\n }\n};\n\n// The outlined button's border thickens with the size, as the page's size\n// tokens have it: 1dp up to M, 2dp at L, 3dp at XL. A style per size rather\n// than a value in the size style, since a border on a filled button would\n// draw in the label colour.\nconst OUTLINE_WIDTHS = {\n lg: '1px',\n md: '1px',\n xl: '2px',\n xs: '1px',\n xxl: '3px'\n} as const;\n\n// The outlined button draws its rule inside the width the other variants\n// take, as the page's buttons do: the padding gives up what the border takes,\n// so an outlined and a filled button with one label are one width, and a\n// group mixing them lines up. The height needs nothing, since it is a floor\n// the border already counts towards.\nconst outlinedSizes = {\n lg: {\n kMzoRj: \"xmkeg23\",\n kg3NbH: \"xfeiziq\",\n $$css: true\n },\n md: {\n kMzoRj: \"xmkeg23\",\n kg3NbH: \"x1uvede8\",\n $$css: true\n },\n xl: {\n kMzoRj: \"xdh2fpr\",\n kg3NbH: \"xrhf21y\",\n $$css: true\n },\n xs: {\n kMzoRj: \"xmkeg23\",\n kg3NbH: \"x9t8nta\",\n $$css: true\n },\n xxl: {\n kMzoRj: \"x9r2w2z\",\n kg3NbH: \"x1wz3vkj\",\n $$css: true\n }\n};\n\n// The icon each size draws, from the page's size token sets: 20dp for the\n// two small sizes, then 24, 32 and 40. The gap before it is the size's own,\n// which `base`, `xl` and `xxl` already set as the page gives them.\nconst iconSizes = {\n lg: {\n kGuDYH: \"x1pvqxga\",\n $$css: true\n },\n md: {\n kGuDYH: \"xwsyq91\",\n $$css: true\n },\n xl: {\n kGuDYH: \"x1s3cmhv\",\n $$css: true\n },\n xs: {\n kGuDYH: \"xwsyq91\",\n $$css: true\n },\n xxl: {\n kGuDYH: \"x1tgwohi\",\n $$css: true\n }\n};\n\n// Each size's inline padding again, for the one place it is read at runtime:\n// a standard ButtonGroup widening a pressed button by adding to it. The size\n// styles above write the same values, and an outlined button's border comes\n// off them here as it does in `outlinedSizes`.\nconst PADDINGS = {\n lg: spacing.xl,\n md: spacing.lg,\n xl: '48px',\n xs: spacing.md,\n xxl: '64px'\n};\n\n// The padding a standard group sets while it widens or narrows the button.\nconst shifted = {\n padding: (value: string) => [value !== undefined && {\n kg3NbH: value != null ? \"x30g6up\" : \"\",\n $$css: true\n }, {\n \"--x-paddingInline\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(value)\n }]\n};\n\n// The round corner each size rests at, and a square toggle once selected:\n// half the container's height — see the header for why not the pill's\n// 9999px. `min()` leaves the pill token in charge below that, so a scheme\n// that sets `--kui-radius-pill` small still draws round buttons at its corner.\nconst roundShapes = {\n lg: {\n kaIpWk: \"x1j5kmnq\",\n $$css: true\n },\n md: {\n kaIpWk: \"x1y5wlyh\",\n $$css: true\n },\n xl: {\n kaIpWk: \"x39tcx0\",\n $$css: true\n },\n xs: {\n kaIpWk: \"xcslhsm\",\n $$css: true\n },\n xxl: {\n kaIpWk: \"xjy9rn5\",\n $$css: true\n }\n};\n\n// The square corner each size rests at, and a round toggle once selected.\nconst squareShapes = {\n lg: {\n kaIpWk: \"xhpdng0\",\n $$css: true\n },\n md: {\n kaIpWk: \"x62ce2h\",\n $$css: true\n },\n xl: {\n kaIpWk: \"x19pkqky\",\n $$css: true\n },\n xs: {\n kaIpWk: \"x62ce2h\",\n $$css: true\n },\n xxl: {\n kaIpWk: \"x19pkqky\",\n $$css: true\n }\n};\n\n// The corner each size presses to, whatever its shape. Applied after the\n// resting and selected shapes, so a press is felt whichever the button rests\n// at.\nconst pressedShapes = {\n lg: {\n kaIpWk: \"x62ce2h\",\n $$css: true\n },\n md: {\n kaIpWk: \"x1xdvaa9\",\n $$css: true\n },\n xl: {\n kaIpWk: \"xhpdng0\",\n $$css: true\n },\n xs: {\n kaIpWk: \"x1xdvaa9\",\n $$css: true\n },\n xxl: {\n kaIpWk: \"xhpdng0\",\n $$css: true\n }\n};\n\n// The interaction state layers, one style per variant for each state, applied\n// from React Aria's render state — see the header for why that and not the\n// pseudo-classes. In the order they are applied, so where two hold the later\n// wins, as the page draws one layer at a time: focus over hover, and a press\n// over both. Hover lifts filled and tonal off the page and raises elevated a\n// level, and a press brings each back to where it rests.\n//\n// A toggle's containers carry a layer of their own, each the label colour\n// over that container, applied after the variant's so the variant still\n// decides the shadow. A selected toggle's keeps its forced-colours\n// `Highlight`, since a later style replaces the property whole.\nconst hovered = {\n elevated: {\n kWkggS: \"xltxkvm\",\n kGVxlE: \"x1os83gw\",\n $$css: true\n },\n elevatedToggleSelected: {\n kWkggS: \"xo1ct44 x1jzqe4\",\n $$css: true\n },\n filled: {\n kWkggS: \"xo1ct44\",\n kGVxlE: \"x19efjv6\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"xtxe0ya\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"xo1ct44 x1jzqe4\",\n $$css: true\n },\n outlined: {\n kWkggS: \"x14noynh\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"x1hxzsxp x1jzqe4\",\n $$css: true\n },\n text: {\n kWkggS: \"x659ado\",\n $$css: true\n },\n tonal: {\n kWkggS: \"x1fctxn6\",\n kGVxlE: \"x19efjv6\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x12r95rf x1jzqe4\",\n $$css: true\n }\n};\nconst focused = {\n elevated: {\n kWkggS: \"xcn1wy9\",\n $$css: true\n },\n elevatedToggleSelected: {\n kWkggS: \"xhodiby x1jzqe4\",\n $$css: true\n },\n filled: {\n kWkggS: \"xhodiby\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"x1ppcb1\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"xhodiby x1jzqe4\",\n $$css: true\n },\n outlined: {\n kWkggS: \"x19p5drm\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"xn4e5mw x1jzqe4\",\n $$css: true\n },\n text: {\n kWkggS: \"x1sog3nf\",\n $$css: true\n },\n tonal: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x16tkg7c x1jzqe4\",\n $$css: true\n }\n};\n\n// The pressed layer of a button whose ripple is off, drawn in the ripple's\n// place — see the header. Its shadow is the variant's resting one, which the\n// hover's lift no longer covers while the button is pressed.\nconst pressed = {\n elevated: {\n kWkggS: \"x1d33wxb\",\n $$css: true\n },\n elevatedToggleSelected: {\n kWkggS: \"x7b25lv x1jzqe4\",\n $$css: true\n },\n filled: {\n kWkggS: \"x7b25lv\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"x1qdfkg1\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"x7b25lv x1jzqe4\",\n $$css: true\n },\n outlined: {\n kWkggS: \"x123fei2\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"x167cdfs x1jzqe4\",\n $$css: true\n },\n text: {\n kWkggS: \"x1dvjsmr\",\n $$css: true\n },\n tonal: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x12o6fnv x1jzqe4\",\n $$css: true\n }\n};\nconst disabledStyles = {\n elevated: styles.elevatedDisabled,\n filled: styles.filledDisabled,\n outlined: styles.outlinedDisabled,\n text: styles.textDisabled,\n tonal: styles.tonalDisabled\n};\n\n// Which container a toggle draws, selected and not, by its name in the\n// tables above. Three of the eight are the plain button's own: an unselected\n// tonal, elevated or outlined toggle is the tonal, elevated or outlined\n// button.\nconst toggleContainers = {\n elevated: {\n selected: 'elevatedToggleSelected',\n unselected: 'elevated'\n },\n filled: {\n selected: 'filledToggleSelected',\n unselected: 'filledToggle'\n },\n outlined: {\n selected: 'outlinedToggleSelected',\n unselected: 'outlined'\n },\n tonal: {\n selected: 'tonalToggleSelected',\n unselected: 'tonal'\n }\n} as const;\ntype ButtonProps = ButtonDOMProps & (ButtonLinkForm | ButtonPressForm | (ButtonToggleForm & {\n /**\n * A toggle takes any variant but `text`, which the page gives no\n * selected colours.\n */\n variant?: Exclude<ButtonVariant, 'text'>;\n})) & {\n children?: ReactNode;\n /** A function may compute the class from the button's render state. */\n className?: ClassNameOrFunction<ButtonState>;\n /**\n * Disables the press ripple. A press then draws its layer as a background\n * instead, at the same pressed opacity, so the button reads the same\n * either way. The hover and focus layers are unaffected.\n * @default false\n */\n disableRipple?: boolean;\n /**\n * An icon before the label, at the page's icon size for the button's size:\n * 20px at `xs` and `md`, 24px at `lg`, 32px at `xl` and 40px at `xxl`. Draw\n * it `1em` square in `currentColor`, as every icon here is, and it follows.\n * Hidden with the label while the button is pending.\n */\n icon?: ReactNode;\n /**\n * The name of the ring shown while the button is pending, for a screen\n * reader. The label it replaces is hidden while it shows. Left out, it is\n * the word for it in the I18nProvider's locale — \"Loading\" in English.\n */\n pendingLabel?: string;\n /**\n * The corner the button rests at: `round` is the pill, `square` the\n * page's rounded rectangle, 12px up to `md`, 16px at `lg` and 28px above.\n * Either tightens while pressed, and a toggle trades one for the other\n * once selected.\n * @default 'round'\n */\n shape?: ButtonShape;\n /**\n * Control height: `xs` 32px, `md` 40px, `lg` 56px, `xl` 96px, `xxl` 136px —\n * the buttons spec page's XS, S, M, L and XL, each with its own inline\n * padding and type role. `md` is the page's default.\n * @default 'md'\n */\n size?: ButtonSize;\n /** A function may compute the style from the button's render state. */\n style?: StyleOrFunction<ButtonState>;\n /**\n * How much weight the button pulls. `filled` and `tonal` carry a container\n * of their own; `outlined` and `text` sit on the page; `elevated` sits on\n * a low surface and lifts off it with a shadow, for a button that has to\n * separate from a busy background rather than from the page.\n * @default 'filled'\n */\n variant?: ButtonVariant;\n};\ntype ButtonShape = 'round' | 'square';\ntype ButtonSize = 'lg' | 'md' | 'xl' | 'xs' | 'xxl';\ntype ButtonVariant = 'elevated' | 'filled' | 'outlined' | 'text' | 'tonal';\n\n// The four styles the page gives a toggle's colour pairs; see the header.\ntype ToggleVariant = keyof typeof toggleContainers;\n\n/**\n * The design's button, at five emphasis levels and five control heights,\n * round or square. Given `href` it is a link with the same appearance. Every\n * `aria-*` prop is forwarded to the element; React Aria alone would keep only\n * the labelling ones.\n *\n * Given `isSelected`, `defaultSelected` or `onChange` it is a toggle, which\n * reports its state through `aria-pressed` and draws the page's second pair\n * of colour roles for its variant. The three forms are exclusive, so a toggle\n * given `href` does not compile, and nor does a `text` toggle, which the page\n * gives no selected colours — a `text` button in a selecting `ButtonGroup`\n * is the one that toggles, for the group's sake. A toggle may be pending,\n * for a state saved somewhere slow: the ring replaces its label and a press\n * changes nothing until it clears.\n *\n * ```tsx\n * <Button defaultSelected variant=\"tonal\">\n * Label\n * </Button>\n * ```\n */\nfunction Button({\n children,\n defaultSelected,\n href,\n icon,\n isPending,\n isSelected,\n onChange,\n pendingLabel,\n rel,\n shape = 'round',\n size: ownSize,\n target,\n variant = 'filled',\n ...props\n}: ButtonProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>) {\n // A ButtonGroup or a SplitButton around the button hands it a size, its\n // shape at the group's inner edges and the press interaction; see\n // src/button/context.ts. A size named here still wins.\n const group = useContext(ButtonGroupItemContext);\n const size = ownSize ?? group?.size ?? 'md';\n // A group that selects is React Aria's ToggleButtonGroup, whose buttons\n // have to be toggles to take part in its selection.\n const inSelectingGroup = useContext(ToggleGroupStateContext) !== null;\n const grouped = groupPressHandlers(group, props.onPressStart, props.onPressEnd);\n const onPressEnd = grouped.onPressEnd ?? props.onPressEnd;\n const onPressStart = grouped.onPressStart ?? props.onPressStart;\n const selection = useSelection({\n defaultSelected,\n isSelected,\n onChange\n });\n // Whether a key holds the button down, which the ripple does not draw\n // until the key is released, so the pressed layer draws in its place.\n const [keyHeld, setKeyHeld] = useState(false);\n const press = {\n onPressEnd: (event: PressEvent) => {\n setKeyHeld(false);\n onPressEnd?.(event);\n },\n onPressStart: (event: PressEvent) => {\n setKeyHeld(event.pointerType === 'keyboard');\n onPressStart?.(event);\n }\n };\n const ripples = props.disableRipple !== true && !keyHeld;\n\n // The icon goes in with the label, inside what ButtonBase hides while the\n // button is pending, so the ring takes the place of both.\n const content = icon === undefined ? children : <>\n <span {...stylex.props(styles.icon, iconSizes[size])}>{icon}</span>\n {children}\n </>;\n\n // A selecting ButtonGroup around it makes it React Aria's ToggleButton, to\n // take part in the group's selection — a text button too, which draws its\n // selection by nothing but the group's shape. Whether a button sits in one\n // does not change from one render to the next.\n if (inSelectingGroup) {\n return <ToggleButtonBase {...props} {...press} classes={variant === 'text' ? buttonClasses(shape, size, variant, group, ripples) : toggleClasses(shape, size, variant, group, ripples)} isPending={isPending}>\n {content}\n </ToggleButtonBase>;\n }\n\n // The three props that make this a toggle on its own, read as IconButton\n // reads them, and on the same component as the plain button so a toggle\n // whose `isSelected` is still loading stays one element when it arrives.\n // The types keep them off a `text` button; the check here keeps a call\n // site that slipped past them a plain button, as it always was.\n const isToggle = variant !== 'text' && (defaultSelected !== undefined || isSelected !== undefined || onChange !== undefined);\n return <ButtonBase {...props} {...press} classes={isToggle ? toggleClasses(shape, size, variant, group, ripples) : buttonClasses(shape, size, variant, group, ripples)} href={href} isPending={isPending} isSelected={isToggle ? selection.selected : undefined} onPress={isToggle ? pressThen(props.onPress, selection.toggle) : props.onPress} pendingLabel={pendingLabel} rel={rel} target={target}>\n {content}\n </ButtonBase>;\n}\n\n// The button's own classes, from React Aria's render state — see the header\n// for why that and not the pseudo-classes, and for why a press drops the\n// hover layer and draws its own only where the ripple does not. Built by a\n// 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 buttonClasses(shape: ButtonShape, size: ButtonSize, variant: ButtonVariant, group: ButtonGroupItem | null, ripples: boolean) {\n return (state: ButtonClassesState) => stylex.props(styles.base, focus.ring, styles[variant], styles[size], shape === 'square' ? squareShapes[size] : roundShapes[size], variant === 'outlined' && outlinedSizes[size], state.isHovered && !state.isPressed && hovered[variant], state.isFocusVisible && focused[variant], state.isPressed && !ripples && pressed[variant], state.isPressed && pressedShapes[size], groupStyles(group, size, variant, state), state.isPending === true && styles.pending, state.isDisabled && styles.disabled, state.isDisabled && disabledStyles[variant]);\n}\n\n// What a group lays over the button: its own styles for the button's state,\n// and the standard group's widening or narrowing as extra inline padding,\n// half of the shift on either side.\nfunction groupStyles(group: ButtonGroupItem | null, size: ButtonSize, variant: ButtonVariant, state: ButtonState) {\n if (group === null) {\n return null;\n }\n const border = variant === 'outlined' ? OUTLINE_WIDTHS[size] : '0px';\n return [group.styles?.(state), group.shift !== 0 && shifted.padding(`calc(${PADDINGS[size]} - ${border} + ${group.shift / 2}px)`)];\n}\n\n// A toggle's classes: the plain button's, with the container and its layers\n// swapped for the toggle's pair, and the selected shape between the resting\n// and the pressed one. The variant's own style and layers still go first, for\n// the shadow and the rule they carry. Built by a call for the reason\n// `buttonClasses` is.\nfunction toggleClasses(shape: ButtonShape, size: ButtonSize, variant: ToggleVariant, group: ButtonGroupItem | null, ripples: boolean) {\n return (state: ButtonClassesState) => {\n const isSelected = state.isSelected === true;\n const container = toggleContainers[variant][isSelected ? 'selected' : 'unselected'];\n return stylex.props(styles.base, focus.ring, styles[variant], styles[container], styles[size], shape === 'square' ? squareShapes[size] : roundShapes[size], isSelected && (shape === 'square' ? roundShapes[size] : squareShapes[size]), variant === 'outlined' && outlinedSizes[size], state.isHovered && !state.isPressed && hovered[variant], state.isHovered && !state.isPressed && hovered[container], state.isFocusVisible && focused[variant], state.isFocusVisible && focused[container], state.isPressed && !ripples && pressed[variant], state.isPressed && !ripples && pressed[container], state.isPressed && pressedShapes[size], groupStyles(group, size, variant, state), state.isPending === true && styles.pending, state.isDisabled && styles.disabled, state.isDisabled && disabledStyles[variant]);\n };\n}\nexport type { ButtonDOMProps, ButtonProps, ButtonShape, ButtonSize, ButtonState, ButtonVariant };\nexport default Button;"],"mappings":";;;;;;;;;;;;;;AAkJA,MAAMW,SAAS;CACbC,MAA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,aAAa8B,MAAM9B,eAAe;EACxC,MAAMuC,YAAYtD,iBAAiBG,QAAQ,CAACY,aAAa,aAAa;EACtE,OAAOrG,MAAaU,OAAOC,MAAMH,MAAM4H,MAAM1H,OAAO+E,UAAU/E,OAAOkI,YAAYlI,OAAOoF,OAAOD,UAAU,WAAWb,aAAac,QAAQhB,YAAYgB,OAAOO,eAAeR,UAAU,WAAWf,YAAYgB,QAAQd,aAAac,QAAQL,YAAY,cAAcnB,cAAcwB,OAAOqC,MAAME,aAAa,CAACF,MAAMG,aAAapD,QAAQO,UAAU0C,MAAME,aAAa,CAACF,MAAMG,aAAapD,QAAQ0D,YAAYT,MAAMI,kBAAkBpD,QAAQM,UAAU0C,MAAMI,kBAAkBpD,QAAQyD,YAAYT,MAAMG,aAAa,CAACZ,WAAWtC,QAAQK,UAAU0C,MAAMG,aAAa,CAACZ,WAAWtC,QAAQwD,YAAYT,MAAMG,aAAarD,cAAca,OAAO0C,YAAY3B,OAAOf,MAAML,SAAS0C,KAAK,GAAGA,MAAM/B,cAAc,QAAQ1F,OAAOkD,SAASuE,MAAMM,cAAc/H,OAAOyB,UAAUgG,MAAMM,cAAcpD,eAAeI,QAAQ;CACtxB;AACF"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","useContext","useState","ToggleGroupStateContext","ButtonGroupItemContext","groupPressHandlers","useSelection","pressThen","focus","spacing","styles","base","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kB7OPa","kkrTdU","k1xSpc","kMv6JI","kGuDYH","k63SB2","kOIVth","kjj79g","kb6lSQ","kLWn49","ks0D6T","kHjlTd","kVAEAm","k9WMMc","kybGjl","kIyJzY","k1ekBW","kAMwcw","$$css","disabled","elevated","kWkggS","kGVxlE","kMwMTN","elevatedDisabled","elevatedToggleSelected","filled","filledDisabled","filledToggle","filledToggleSelected","icon","kmuXW","lg","kAzted","k8WAf4","kg3NbH","md","kgeoSG","kGOzcv","kpsdNU","kEoFBp","outlined","outlinedDisabled","outlinedToggleSelected","pending","text","textDisabled","tonal","tonalDisabled","tonalToggleSelected","xl","xs","xxl","OUTLINE_WIDTHS","outlinedSizes","iconSizes","PADDINGS","shifted","padding","value","undefined","val","roundShapes","kaIpWk","squareShapes","pressedShapes","hovered","focused","pressed","disabledStyles","toggleContainers","selected","unselected","variant","children","disableRipple","pendingLabel","shape","size","Button","t0","$","defaultSelected","href","isPending","isSelected","onChange","rel","t1","ownSize","target","t2","props","group","inSelectingGroup","grouped","onPressStart","onPressEnd","t3","selection","keyHeld","setKeyHeld","press","event","event_0","pointerType","ripples","t4","content","t5","buttonClasses","toggleClasses","isToggle","onPress","toggle","state","ring","isHovered","isPressed","isFocusVisible","groupStyles","isDisabled","border","shift","container"],"sources":["../../../src/components/button/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, PressEvent, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useState } from 'react';\nimport { ToggleGroupStateContext } from 'react-aria-components';\nimport type { ButtonClassesState, ButtonDOMProps, ButtonLinkForm, ButtonPressForm, ButtonState, ButtonToggleForm } from '../../button';\nimport type { ButtonGroupItem } from '../../button/context';\nimport { ButtonBase, ToggleButtonBase } from '../../button';\nimport { ButtonGroupItemContext } from '../../button/context';\nimport { groupPressHandlers } from '../../button/group';\nimport { useSelection } from '../../button/hooks';\nimport { pressThen } from '../../button/toggle';\nimport { focus } from '../../styles/focus';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// Each variant composites its label colour over its container at the\n// interaction state's opacity, rather than swapping in a separate\n// hover/pressed color: filled and tonal paint the 'on-color' over the\n// container, outlined, text and elevated paint the label colour over their\n// own. The pairs are the buttons spec page's newer values: tonal on\n// secondary container, outlined with an outline variant border and an\n// on-surface-variant label, text on primary, elevated on surface container\n// low with a primary label.\n//\n// **The outlined rule is faint on purpose.** Outline variant sits at about\n// 1.6:1 against the surface in the light theme and 2:1 in the dark, under the\n// 3:1 WCAG asks of a boundary that identifies a control. The rule is not that\n// boundary: the label identifies the button, in on-surface-variant at about\n// 9:1, and the rule only shows how far the button reaches. IconButton's\n// outlined variant draws its rule in the same role for the same reason.\n//\n// **Elevated is the one variant whose shadow is part of its identity.** The\n// page rests it at elevation 1 rather than flat, raises it on hover and\n// returns it to 1 while pressed — where filled and tonal rest flat and lift\n// only on hover. Disabled drops it to none, since a shadow says a control is\n// available to press.\n// calc(<opacity> * 100%) turns the token's unitless 0-1 ratio into the\n// percentage color-mix() takes. Inlined rather than factored into a helper:\n// @stylexjs/babel-plugin only statically recognizes expressions written\n// directly as property values, and a call to an externally-defined function\n// isn't one of them.\n//\n// The hover, focus and pressed layers come from React Aria's render state,\n// `isHovered`, `isFocusVisible` and `isPressed`, rather than from `:hover`,\n// `:focus-visible` and `:active`. On a touch screen Chromium leaves `:hover`\n// on the last element tapped, so the layer and its lifted shadow stayed on a\n// button after the tap had ended, where React Aria ignores the emulated mouse\n// events that follow a touch. And React Aria prevents the default of the\n// keydown that presses a button with Space or Enter, so `:active` never\n// matched a keyboard press, which `isPressed` reports like any other.\n//\n// A press is one layer, as the page draws it: the ripple at the pressed\n// opacity, over the container at rest. The hover layer and its lift come off\n// while the button is pressed, so neither stacks under the ripple, and the\n// `pressed` table is the layer a button draws in the ripple's place: when\n// `disableRipple` turns the ripple off, and while a key holds the button\n// down, since the ripple answers a key only once it is released. The layer\n// then gives way to the ripple, which plays its whole press from there. A\n// press is a pointer or a key on the button, never an overlay it opened:\n// React Aria reports a trigger pressed for as long as its menu, popover or\n// dialog is open, and the button rests and answers hover through all of it\n// — see src/button.\n//\n// Disabled is a style of its own per variant rather than a `:disabled`\n// branch inside each property: a button given `href` renders as a link,\n// which React Aria turns into a <span> while disabled, and neither matches\n// the pseudo-class. The disabled styles are applied last from the render\n// state's `isDisabled`, and StyleX replaces a property whole, so they win\n// over any state layer applied before them.\n//\n// **Under forced colours a container is drawn as a rule.** That mode drops\n// the shadow and paints author backgrounds in a system colour, which left a\n// filled, tonal or elevated button as a label with nothing round it. `base`\n// draws a 1px `ButtonText` border there instead. Outlined keeps its own rule,\n// and text stays without one, as the page draws it. The mode repaints a\n// disabled button's fade at full strength as well. Chromium greys a disabled\n// `<button>` there by itself, but not the `<span>` React Aria renders for a\n// disabled link, so the disabled styles name `GrayText` for the label and\n// the edge rather than leave it to the browser.\n//\n// Two independent axes, applied base -> variant -> size. The variant carries\n// colour and the size carries geometry, so the two never argue: inline\n// padding belongs to the size alone, and every size declares its own.\n//\n// That is deliberate rather than incidental. The buttons page gives padding\n// per size — its Small button padding is 16dp, the 24dp beside it being the\n// older value the page marks as not recommended — and gives the five colour\n// styles no padding of their own. A text button is therefore as wide as a\n// filled one at the same size, which is what the code draws.\n//\n// This did once read the other way, with `md` declaring no padding so a\n// medium button fell through to its variant's. `fix(button)!: the spec's\n// five sizes` replaced that when the component took the page's sizes, since\n// a per-variant padding had nowhere to sit once every size carried one. The\n// comment describing the old cascade outlived it by some months, which is\n// how it came to say `text` keeps a tighter padding it has never had — back\n// then `text` declared 16dp while a filled `md` declared none at all, so the\n// text button was the wider of the two.\n//\n// **A toggle is the same button reporting a state.** Given `isSelected`,\n// `defaultSelected` or `onChange` it is React Aria's `ToggleButton`, which\n// announces the state through `aria-pressed`, as IconButton's toggle does.\n// The page gives four of the five styles a second pair of colour roles for\n// it: a filled toggle rests on surface container with an on-surface-variant\n// label and takes primary once selected, a tonal one moves from the\n// secondary container pair to secondary, an elevated one keeps its low\n// surface until it takes primary, and an outlined one swaps its rule for the\n// inverse surface pair. Under forced colours a selected toggle of any style\n// is filled `Highlight`, as IconButton's is. The page gives text no pair, so\n// a text button given those props stays a plain one.\n//\n// **The corner is a shape the button morphs between**, from the page's size\n// token sets. `round` rests at half the container's height, which is the pill\n// for a label on one line, and `square` at the size's square corner: 12dp up\n// to the page's S, 16dp at M and 28dp above. A press tightens either to the\n// size's pressed corner, 8dp, 12dp or 16dp, and a toggle trades its shape for\n// the other once selected — a round one for the square corner, a square one\n// for the round. The corner eases over the motion tokens' short duration, as\n// the container, label and rule colours and the shadow do between states, and\n// all of them move at once for a reader who asks for reduced motion.\n//\n// The round corner is a length rather than the pill token's 9999px, because\n// the browser draws a corner no larger than half the box and eases the value\n// as written. From 9999px a press spent all but the last frame or two of its\n// 150ms above the 20dp a medium button can show, so the corner held round and\n// then jumped. From half the height every frame of the ease is one the eye\n// can see. A label that wraps makes a button taller than that, and its ends a\n// little less than round, as a connected ButtonGroup's already are.\n//\n// What every button does past its own styles — the ripple, the link and\n// toggle forms, the pending ring and `aria-busy`, a parent's disabled state\n// — is `src/button`'s, shared with IconButton.\n\n/**\n * The press area the buttons page requires, which its two smallest sizes are\n * drawn under. A literal rather than `sizing.controlMd`, which holds the same\n * number, for the reason IconButton's `TARGET_SIZE` gives: a consumer\n * resizing their medium controls should not shrink a target the page states\n * as a floor.\n */\nconst TARGET_SIZE = '48px';\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)';\nconst styles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1ylmb6m\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kOIVth: \"x126z3so\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n ks0D6T: \"x193iq5w\",\n kHjlTd: \"xj0a0fe\",\n kVAEAm: \"x1n2onr6\",\n k9WMMc: \"x2b8uid\",\n kybGjl: \"x1hl2dhg\",\n kIyJzY: \"x4ukx00 x12w9bfk\",\n k1ekBW: \"xidvh3d\",\n kAMwcw: \"xmg88ys\",\n $$css: true\n },\n disabled: {\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n elevated: {\n kWkggS: \"x1vnz5z6\",\n kGVxlE: \"x19efjv6\",\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n elevatedDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n elevatedToggleSelected: {\n kWkggS: \"xnety89 x1jzqe4\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n $$css: true\n },\n filled: {\n kWkggS: \"xnety89\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"xwjo7ld\",\n $$css: true\n },\n filledDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"x1mjdul6\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"xnety89 x1jzqe4\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n lg: {\n kMv6JI: \"x46eyla\",\n kGuDYH: \"x5ehqhr\",\n k63SB2: \"xrf6cl6\",\n kb6lSQ: \"x1g135zh\",\n kLWn49: \"x1ggk5va\",\n kAzted: \"xdovgog\",\n k8WAf4: \"x1uvvd8r\",\n kg3NbH: \"xg0ps1x\",\n $$css: true\n },\n md: {\n kgeoSG: \"x1cpjm7i\",\n kGOzcv: \"xun2zgk\",\n kpsdNU: \"xm4btww\",\n kEoFBp: \"x1hmns74\",\n kAzted: \"x1cio8j0\",\n k8WAf4: \"x1cmllll\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n outlined: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"x133yhug\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n outlinedDisabled: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"xrh88j3 xmnqt3w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"x1c5gpgi x1jzqe4\",\n kVAM5u: \"x9r1u3d x1n2ykn\",\n kMwMTN: \"x1girmi0 x1k5gbb1\",\n $$css: true\n },\n pending: {\n kkrTdU: \"x19v85br\",\n $$css: true\n },\n text: {\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n textDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n tonal: {\n kWkggS: \"x15dekr4\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n tonalDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x167r6xl x1jzqe4\",\n kMwMTN: \"x1lba3jz x1k5gbb1\",\n $$css: true\n },\n xl: {\n kMv6JI: \"x1fz0g89\",\n kGuDYH: \"xkb6epg\",\n k63SB2: \"x76yrz5\",\n kOIVth: \"x1gka490\",\n kb6lSQ: \"x1s1qhaa\",\n kLWn49: \"x1voeury\",\n kAzted: \"x112cvos\",\n k8WAf4: \"xny1cbh\",\n kg3NbH: \"x1sdxjpb\",\n $$css: true\n },\n xs: {\n kgeoSG: \"x1cpjm7i\",\n kGOzcv: \"xun2zgk\",\n kpsdNU: \"x1ecwmwu\",\n kEoFBp: \"x1hmns74\",\n kOIVth: \"xzoy561\",\n kAzted: \"xlzjxrf\",\n k8WAf4: \"xmqoko8\",\n kg3NbH: \"x18fpw6u\",\n $$css: true\n },\n xxl: {\n kMv6JI: \"x1vsmgmf\",\n kGuDYH: \"xh9c4x\",\n k63SB2: \"x1y15vu6\",\n kOIVth: \"xxj4525\",\n kb6lSQ: \"xoqu3bc\",\n kLWn49: \"x10x9d6x\",\n kAzted: \"xldltni\",\n k8WAf4: \"x1lrxzt4\",\n kg3NbH: \"x1dao9b2\",\n $$css: true\n }\n};\n\n// The outlined button's border thickens with the size, as the page's size\n// tokens have it: 1dp up to M, 2dp at L, 3dp at XL. A style per size rather\n// than a value in the size style, since a border on a filled button would\n// draw in the label colour.\nconst OUTLINE_WIDTHS = {\n lg: '1px',\n md: '1px',\n xl: '2px',\n xs: '1px',\n xxl: '3px'\n} as const;\n\n// The outlined button draws its rule inside the width the other variants\n// take, as the page's buttons do: the padding gives up what the border takes,\n// so an outlined and a filled button with one label are one width, and a\n// group mixing them lines up. The height needs nothing, since it is a floor\n// the border already counts towards.\nconst outlinedSizes = {\n lg: {\n kMzoRj: \"xmkeg23\",\n kg3NbH: \"xfeiziq\",\n $$css: true\n },\n md: {\n kMzoRj: \"xmkeg23\",\n kg3NbH: \"x1uvede8\",\n $$css: true\n },\n xl: {\n kMzoRj: \"xdh2fpr\",\n kg3NbH: \"xrhf21y\",\n $$css: true\n },\n xs: {\n kMzoRj: \"xmkeg23\",\n kg3NbH: \"x9t8nta\",\n $$css: true\n },\n xxl: {\n kMzoRj: \"x9r2w2z\",\n kg3NbH: \"x1wz3vkj\",\n $$css: true\n }\n};\n\n// The icon each size draws, from the page's size token sets: 20dp for the\n// two small sizes, then 24, 32 and 40. The gap before it is the size's own,\n// which `base`, `xl` and `xxl` already set as the page gives them.\nconst iconSizes = {\n lg: {\n kGuDYH: \"x1pvqxga\",\n $$css: true\n },\n md: {\n kGuDYH: \"xwsyq91\",\n $$css: true\n },\n xl: {\n kGuDYH: \"x1s3cmhv\",\n $$css: true\n },\n xs: {\n kGuDYH: \"xwsyq91\",\n $$css: true\n },\n xxl: {\n kGuDYH: \"x1tgwohi\",\n $$css: true\n }\n};\n\n// Each size's inline padding again, for the one place it is read at runtime:\n// a standard ButtonGroup widening a pressed button by adding to it. The size\n// styles above write the same values, and an outlined button's border comes\n// off them here as it does in `outlinedSizes`.\nconst PADDINGS = {\n lg: spacing.xl,\n md: spacing.lg,\n xl: '48px',\n xs: spacing.md,\n xxl: '64px'\n};\n\n// The padding a standard group sets while it widens or narrows the button.\nconst shifted = {\n padding: (value: string) => [value !== undefined && {\n kg3NbH: value != null ? \"x30g6up\" : \"\",\n $$css: true\n }, {\n \"--x-paddingInline\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(value)\n }]\n};\n\n// The round corner each size rests at, and a square toggle once selected:\n// half the container's height — see the header for why not the pill's\n// 9999px. `min()` leaves the pill token in charge below that, so a scheme\n// that sets `--kui-radius-pill` small still draws round buttons at its corner.\nconst roundShapes = {\n lg: {\n kaIpWk: \"x1j5kmnq\",\n $$css: true\n },\n md: {\n kaIpWk: \"x1y5wlyh\",\n $$css: true\n },\n xl: {\n kaIpWk: \"x39tcx0\",\n $$css: true\n },\n xs: {\n kaIpWk: \"xcslhsm\",\n $$css: true\n },\n xxl: {\n kaIpWk: \"xjy9rn5\",\n $$css: true\n }\n};\n\n// The square corner each size rests at, and a round toggle once selected.\nconst squareShapes = {\n lg: {\n kaIpWk: \"xhpdng0\",\n $$css: true\n },\n md: {\n kaIpWk: \"x62ce2h\",\n $$css: true\n },\n xl: {\n kaIpWk: \"x19pkqky\",\n $$css: true\n },\n xs: {\n kaIpWk: \"x62ce2h\",\n $$css: true\n },\n xxl: {\n kaIpWk: \"x19pkqky\",\n $$css: true\n }\n};\n\n// The corner each size presses to, whatever its shape. Applied after the\n// resting and selected shapes, so a press is felt whichever the button rests\n// at.\nconst pressedShapes = {\n lg: {\n kaIpWk: \"x62ce2h\",\n $$css: true\n },\n md: {\n kaIpWk: \"x1xdvaa9\",\n $$css: true\n },\n xl: {\n kaIpWk: \"xhpdng0\",\n $$css: true\n },\n xs: {\n kaIpWk: \"x1xdvaa9\",\n $$css: true\n },\n xxl: {\n kaIpWk: \"xhpdng0\",\n $$css: true\n }\n};\n\n// The interaction state layers, one style per variant for each state, applied\n// from React Aria's render state — see the header for why that and not the\n// pseudo-classes. In the order they are applied, so where two hold the later\n// wins, as the page draws one layer at a time: focus over hover, and a press\n// over both. Hover lifts filled and tonal off the page and raises elevated a\n// level, and a press brings each back to where it rests.\n//\n// A toggle's containers carry a layer of their own, each the label colour\n// over that container, applied after the variant's so the variant still\n// decides the shadow. A selected toggle's keeps its forced-colours\n// `Highlight`, since a later style replaces the property whole.\nconst hovered = {\n elevated: {\n kWkggS: \"xltxkvm\",\n kGVxlE: \"x1os83gw\",\n $$css: true\n },\n elevatedToggleSelected: {\n kWkggS: \"xo1ct44 x1jzqe4\",\n $$css: true\n },\n filled: {\n kWkggS: \"xo1ct44\",\n kGVxlE: \"x19efjv6\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"xtxe0ya\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"xo1ct44 x1jzqe4\",\n $$css: true\n },\n outlined: {\n kWkggS: \"x14noynh\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"x1hxzsxp x1jzqe4\",\n $$css: true\n },\n text: {\n kWkggS: \"x659ado\",\n $$css: true\n },\n tonal: {\n kWkggS: \"x1fctxn6\",\n kGVxlE: \"x19efjv6\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x12r95rf x1jzqe4\",\n $$css: true\n }\n};\nconst focused = {\n elevated: {\n kWkggS: \"xcn1wy9\",\n $$css: true\n },\n elevatedToggleSelected: {\n kWkggS: \"xhodiby x1jzqe4\",\n $$css: true\n },\n filled: {\n kWkggS: \"xhodiby\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"x1ppcb1\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"xhodiby x1jzqe4\",\n $$css: true\n },\n outlined: {\n kWkggS: \"x19p5drm\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"xn4e5mw x1jzqe4\",\n $$css: true\n },\n text: {\n kWkggS: \"x1sog3nf\",\n $$css: true\n },\n tonal: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x16tkg7c x1jzqe4\",\n $$css: true\n }\n};\n\n// The pressed layer of a button whose ripple is off, drawn in the ripple's\n// place — see the header. Its shadow is the variant's resting one, which the\n// hover's lift no longer covers while the button is pressed.\nconst pressed = {\n elevated: {\n kWkggS: \"x1d33wxb\",\n $$css: true\n },\n elevatedToggleSelected: {\n kWkggS: \"x7b25lv x1jzqe4\",\n $$css: true\n },\n filled: {\n kWkggS: \"x7b25lv\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"x1qdfkg1\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"x7b25lv x1jzqe4\",\n $$css: true\n },\n outlined: {\n kWkggS: \"x123fei2\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"x167cdfs x1jzqe4\",\n $$css: true\n },\n text: {\n kWkggS: \"x1dvjsmr\",\n $$css: true\n },\n tonal: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x12o6fnv x1jzqe4\",\n $$css: true\n }\n};\nconst disabledStyles = {\n elevated: styles.elevatedDisabled,\n filled: styles.filledDisabled,\n outlined: styles.outlinedDisabled,\n text: styles.textDisabled,\n tonal: styles.tonalDisabled\n};\n\n// Which container a toggle draws, selected and not, by its name in the\n// tables above. Three of the eight are the plain button's own: an unselected\n// tonal, elevated or outlined toggle is the tonal, elevated or outlined\n// button.\nconst toggleContainers = {\n elevated: {\n selected: 'elevatedToggleSelected',\n unselected: 'elevated'\n },\n filled: {\n selected: 'filledToggleSelected',\n unselected: 'filledToggle'\n },\n outlined: {\n selected: 'outlinedToggleSelected',\n unselected: 'outlined'\n },\n tonal: {\n selected: 'tonalToggleSelected',\n unselected: 'tonal'\n }\n} as const;\ntype ButtonProps = ButtonDOMProps & (ButtonLinkForm | ButtonPressForm | (ButtonToggleForm & {\n /**\n * A toggle takes any variant but `text`, which the page gives no\n * selected colours.\n */\n variant?: Exclude<ButtonVariant, 'text'>;\n})) & {\n children?: ReactNode;\n /** A function may compute the class from the button's render state. */\n className?: ClassNameOrFunction<ButtonState>;\n /**\n * Disables the press ripple. A press then draws its layer as a background\n * instead, at the same pressed opacity, so the button reads the same\n * either way. The hover and focus layers are unaffected.\n * @default false\n */\n disableRipple?: boolean;\n /**\n * An icon before the label, at the page's icon size for the button's size:\n * 20px at `xs` and `md`, 24px at `lg`, 32px at `xl` and 40px at `xxl`. Draw\n * it `1em` square in `currentColor`, as every icon here is, and it follows.\n * Hidden with the label while the button is pending.\n */\n icon?: ReactNode;\n /**\n * The name of the ring shown while the button is pending, for a screen\n * reader. The label it replaces is hidden while it shows. Left out, it is\n * the word for it in the I18nProvider's locale — \"Loading\" in English.\n */\n pendingLabel?: string;\n /**\n * The corner the button rests at: `round` is the pill, `square` the\n * page's rounded rectangle, 12px up to `md`, 16px at `lg` and 28px above.\n * Either tightens while pressed, and a toggle trades one for the other\n * once selected.\n * @default 'round'\n */\n shape?: ButtonShape;\n /**\n * Control height: `xs` 32px, `md` 40px, `lg` 56px, `xl` 96px, `xxl` 136px —\n * the buttons spec page's XS, S, M, L and XL, each with its own inline\n * padding and type role. `md` is the page's default.\n * @default 'md'\n */\n size?: ButtonSize;\n /** A function may compute the style from the button's render state. */\n style?: StyleOrFunction<ButtonState>;\n /**\n * How much weight the button pulls. `filled` and `tonal` carry a container\n * of their own; `outlined` and `text` sit on the page; `elevated` sits on\n * a low surface and lifts off it with a shadow, for a button that has to\n * separate from a busy background rather than from the page.\n * @default 'filled'\n */\n variant?: ButtonVariant;\n};\ntype ButtonShape = 'round' | 'square';\ntype ButtonSize = 'lg' | 'md' | 'xl' | 'xs' | 'xxl';\ntype ButtonVariant = 'elevated' | 'filled' | 'outlined' | 'text' | 'tonal';\n\n// The four styles the page gives a toggle's colour pairs; see the header.\ntype ToggleVariant = keyof typeof toggleContainers;\n\n/**\n * The design's button, at five emphasis levels and five control heights,\n * round or square. Given `href` it is a link with the same appearance. Every\n * `aria-*` prop is forwarded to the element; React Aria alone would keep only\n * the labelling ones.\n *\n * Given `isSelected`, `defaultSelected` or `onChange` it is a toggle, which\n * reports its state through `aria-pressed` and draws the page's second pair\n * of colour roles for its variant. The three forms are exclusive, so a toggle\n * given `href` does not compile, and nor does a `text` toggle, which the page\n * gives no selected colours — a `text` button in a selecting `ButtonGroup`\n * is the one that toggles, for the group's sake. A toggle may be pending,\n * for a state saved somewhere slow: the ring replaces its label and a press\n * changes nothing until it clears.\n *\n * ```tsx\n * <Button defaultSelected variant=\"tonal\">\n * Label\n * </Button>\n * ```\n */\nfunction Button({\n children,\n defaultSelected,\n href,\n icon,\n isPending,\n isSelected,\n onChange,\n pendingLabel,\n rel,\n shape = 'round',\n size: ownSize,\n target,\n variant = 'filled',\n ...props\n}: ButtonProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>) {\n // A ButtonGroup or a SplitButton around the button hands it a size, its\n // shape at the group's inner edges and the press interaction; see\n // src/button/context.ts. A size named here still wins.\n const group = useContext(ButtonGroupItemContext);\n const size = ownSize ?? group?.size ?? 'md';\n // A group that selects is React Aria's ToggleButtonGroup, whose buttons\n // have to be toggles to take part in its selection.\n const inSelectingGroup = useContext(ToggleGroupStateContext) !== null;\n const grouped = groupPressHandlers(group, props.onPressStart, props.onPressEnd);\n const onPressEnd = grouped.onPressEnd ?? props.onPressEnd;\n const onPressStart = grouped.onPressStart ?? props.onPressStart;\n const selection = useSelection({\n defaultSelected,\n isSelected,\n onChange\n });\n // Whether a key holds the button down, which the ripple does not draw\n // until the key is released, so the pressed layer draws in its place.\n const [keyHeld, setKeyHeld] = useState(false);\n const press = {\n onPressEnd: (event: PressEvent) => {\n setKeyHeld(false);\n onPressEnd?.(event);\n },\n onPressStart: (event: PressEvent) => {\n setKeyHeld(event.pointerType === 'keyboard');\n onPressStart?.(event);\n }\n };\n const ripples = props.disableRipple !== true && !keyHeld;\n\n // The icon goes in with the label, inside what ButtonBase hides while the\n // button is pending, so the ring takes the place of both.\n const content = icon === undefined ? children : <>\n <span {...stylex.props(styles.icon, iconSizes[size])}>{icon}</span>\n {children}\n </>;\n\n // A selecting ButtonGroup around it makes it React Aria's ToggleButton, to\n // take part in the group's selection — a text button too, which draws its\n // selection by nothing but the group's shape. Whether a button sits in one\n // does not change from one render to the next.\n if (inSelectingGroup) {\n return <ToggleButtonBase {...props} {...press} classes={variant === 'text' ? buttonClasses(shape, size, variant, group, ripples) : toggleClasses(shape, size, variant, group, ripples)} isPending={isPending}>\n {content}\n </ToggleButtonBase>;\n }\n\n // The three props that make this a toggle on its own, read as IconButton\n // reads them, and on the same component as the plain button so a toggle\n // whose `isSelected` is still loading stays one element when it arrives.\n // The types keep them off a `text` button; the check here keeps a call\n // site that slipped past them a plain button, as it always was.\n const isToggle = variant !== 'text' && (defaultSelected !== undefined || isSelected !== undefined || onChange !== undefined);\n return <ButtonBase {...props} {...press} classes={isToggle ? toggleClasses(shape, size, variant, group, ripples) : buttonClasses(shape, size, variant, group, ripples)} href={href} isPending={isPending} isSelected={isToggle ? selection.selected : undefined} onPress={isToggle ? pressThen(props.onPress, selection.toggle) : props.onPress} pendingLabel={pendingLabel} rel={rel} target={target}>\n {content}\n </ButtonBase>;\n}\n\n// The button's own classes, from React Aria's render state — see the header\n// for why that and not the pseudo-classes, and for why a press drops the\n// hover layer and draws its own only where the ripple does not. Built by a\n// 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 buttonClasses(shape: ButtonShape, size: ButtonSize, variant: ButtonVariant, group: ButtonGroupItem | null, ripples: boolean) {\n return (state: ButtonClassesState) => stylex.props(styles.base, focus.ring, styles[variant], styles[size], shape === 'square' ? squareShapes[size] : roundShapes[size], variant === 'outlined' && outlinedSizes[size], state.isHovered && !state.isPressed && hovered[variant], state.isFocusVisible && focused[variant], state.isPressed && !ripples && pressed[variant], state.isPressed && pressedShapes[size], groupStyles(group, size, variant, state), state.isPending === true && styles.pending, state.isDisabled && styles.disabled, state.isDisabled && disabledStyles[variant]);\n}\n\n// What a group lays over the button: its own styles for the button's state,\n// and the standard group's widening or narrowing as extra inline padding,\n// half of the shift on either side.\nfunction groupStyles(group: ButtonGroupItem | null, size: ButtonSize, variant: ButtonVariant, state: ButtonState) {\n if (group === null) {\n return null;\n }\n const border = variant === 'outlined' ? OUTLINE_WIDTHS[size] : '0px';\n return [group.styles?.(state), group.shift !== 0 && shifted.padding(`calc(${PADDINGS[size]} - ${border} + ${group.shift / 2}px)`)];\n}\n\n// A toggle's classes: the plain button's, with the container and its layers\n// swapped for the toggle's pair, and the selected shape between the resting\n// and the pressed one. The variant's own style and layers still go first, for\n// the shadow and the rule they carry. Built by a call for the reason\n// `buttonClasses` is.\nfunction toggleClasses(shape: ButtonShape, size: ButtonSize, variant: ToggleVariant, group: ButtonGroupItem | null, ripples: boolean) {\n return (state: ButtonClassesState) => {\n const isSelected = state.isSelected === true;\n const container = toggleContainers[variant][isSelected ? 'selected' : 'unselected'];\n return stylex.props(styles.base, focus.ring, styles[variant], styles[container], styles[size], shape === 'square' ? squareShapes[size] : roundShapes[size], isSelected && (shape === 'square' ? roundShapes[size] : squareShapes[size]), variant === 'outlined' && outlinedSizes[size], state.isHovered && !state.isPressed && hovered[variant], state.isHovered && !state.isPressed && hovered[container], state.isFocusVisible && focused[variant], state.isFocusVisible && focused[container], state.isPressed && !ripples && pressed[variant], state.isPressed && !ripples && pressed[container], state.isPressed && pressedShapes[size], groupStyles(group, size, variant, state), state.isPending === true && styles.pending, state.isDisabled && styles.disabled, state.isDisabled && disabledStyles[variant]);\n };\n}\nexport type { ButtonDOMProps, ButtonProps, ButtonShape, ButtonSize, ButtonState, ButtonVariant };\nexport default Button;"],"mappings":";;;;;;;;;;;;;;AAsJA,MAAMW,SAAS;CACbC,MAAM;EACJC,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,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRlB,QAAQ;EACRiB,OAAO;CACT;CACAE,UAAU;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRL,OAAO;CACT;CACAM,kBAAkB;EAChBH,QAAQ;EACRxB,QAAQ;EACRyB,QAAQ;EACRC,QAAQ;EACRL,OAAO;CACT;CACAO,wBAAwB;EACtBJ,QAAQ;EACRE,QAAQ;EACRL,OAAO;CACT;CACAQ,QAAQ;EACNL,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRL,OAAO;CACT;CACAS,gBAAgB;EACdN,QAAQ;EACRxB,QAAQ;EACRyB,QAAQ;EACRC,QAAQ;EACRL,OAAO;CACT;CACAU,cAAc;EACZP,QAAQ;EACRE,QAAQ;EACRL,OAAO;CACT;CACAW,sBAAsB;EACpBR,QAAQ;EACRE,QAAQ;EACRL,OAAO;CACT;CACAY,MAAM;EACJlC,QAAQ;EACRM,QAAQ;EACR6B,OAAO;EACPxB,QAAQ;EACRW,OAAO;CACT;CACAc,IAAI;EACF7B,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRG,QAAQ;EACRC,QAAQ;EACRwB,QAAQ;EACRC,QAAQ;EACRC,QA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,QAAQ,QAAQF,SAASsB,MAAK,KAAM4C,OAAM,KAAM7B,MAAM8B,QAAQ,EAAC,IAAK,CAAC;AACnI;AAOA,SAASZ,cAAclC,OAAoBC,MAAkBL,SAAwBoB,OAA+Ba,SAAkB;CACpI,QAAQS,UAA8B;EACpC,MAAM9B,aAAa8B,MAAM9B,eAAe;EACxC,MAAMuC,YAAYtD,iBAAiBG,QAAQ,CAACY,aAAa,aAAa;EACtE,OAAOrG,MAAaU,OAAOC,MAAMH,MAAM4H,MAAM1H,OAAO+E,UAAU/E,OAAOkI,YAAYlI,OAAOoF,OAAOD,UAAU,WAAWb,aAAac,QAAQhB,YAAYgB,OAAOO,eAAeR,UAAU,WAAWf,YAAYgB,QAAQd,aAAac,QAAQL,YAAY,cAAcnB,cAAcwB,OAAOqC,MAAME,aAAa,CAACF,MAAMG,aAAapD,QAAQO,UAAU0C,MAAME,aAAa,CAACF,MAAMG,aAAapD,QAAQ0D,YAAYT,MAAMI,kBAAkBpD,QAAQM,UAAU0C,MAAMI,kBAAkBpD,QAAQyD,YAAYT,MAAMG,aAAa,CAACZ,WAAWtC,QAAQK,UAAU0C,MAAMG,aAAa,CAACZ,WAAWtC,QAAQwD,YAAYT,MAAMG,aAAarD,cAAca,OAAO0C,YAAY3B,OAAOf,MAAML,SAAS0C,KAAK,GAAGA,MAAM/B,cAAc,QAAQ1F,OAAOkD,SAASuE,MAAMM,cAAc/H,OAAOyB,UAAUgG,MAAMM,cAAcpD,eAAeI,QAAQ;CACtxB;AACF"}
@@ -1,6 +1,6 @@
1
- import { ButtonShape, ButtonSize } from "../button/index.js";
2
1
  import { CSSProperties, ReactNode, RefAttributes } from "react";
3
2
  import { ToggleButtonGroupProps } from "react-aria-components";
3
+ import { ButtonShape, ButtonSize } from "../button/index.js";
4
4
  type ButtonGroupProps = Omit<ToggleButtonGroupProps, 'children' | 'className' | 'disallowEmptySelection' | 'selectionMode' | 'style'> & RefAttributes<HTMLDivElement> & {
5
5
  /** The buttons: Buttons and IconButtons, each with an `id` in a group that selects. */
6
6
  children?: ReactNode;