@kanso-labs/kanso-ui 0.43.7 → 0.44.0

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 (158) hide show
  1. package/README.md +1 -0
  2. package/dist/calendar/index.js +34 -10
  3. package/dist/calendar/index.js.map +1 -1
  4. package/dist/calendar/styles.js +30 -0
  5. package/dist/calendar/styles.js.map +1 -1
  6. package/dist/chip/index.js +27 -18
  7. package/dist/chip/index.js.map +1 -1
  8. package/dist/chip/label.js +32 -0
  9. package/dist/chip/label.js.map +1 -0
  10. package/dist/chip/styles.js +32 -2
  11. package/dist/chip/styles.js.map +1 -1
  12. package/dist/collection/text.js +24 -3
  13. package/dist/collection/text.js.map +1 -1
  14. package/dist/components/button/index.js.map +1 -1
  15. package/dist/components/calendar/index.d.ts +8 -1
  16. package/dist/components/calendar/index.js +129 -73
  17. package/dist/components/calendar/index.js.map +1 -1
  18. package/dist/components/checkbox/index.js +29 -30
  19. package/dist/components/checkbox/index.js.map +1 -1
  20. package/dist/components/checkbox-group/index.js +4 -2
  21. package/dist/components/checkbox-group/index.js.map +1 -1
  22. package/dist/components/chip/index.js +1 -1
  23. package/dist/components/chip/index.js.map +1 -1
  24. package/dist/components/chip-group/index.d.ts +35 -5
  25. package/dist/components/chip-group/index.js +137 -97
  26. package/dist/components/chip-group/index.js.map +1 -1
  27. package/dist/components/copy-field/index.js +1 -1
  28. package/dist/components/copy-field/index.js.map +1 -1
  29. package/dist/components/currency/index.d.ts +64 -6
  30. package/dist/components/currency/index.js +117 -40
  31. package/dist/components/currency/index.js.map +1 -1
  32. package/dist/components/date-picker/index.js +1 -1
  33. package/dist/components/dialog/index.d.ts +3 -1
  34. package/dist/components/dialog/index.js +121 -81
  35. package/dist/components/dialog/index.js.map +1 -1
  36. package/dist/components/disclosure-group/index.js +1 -1
  37. package/dist/components/disclosure-group/index.js.map +1 -1
  38. package/dist/components/icon-button/index.js +18 -1
  39. package/dist/components/icon-button/index.js.map +1 -1
  40. package/dist/components/index.d.ts +2 -2
  41. package/dist/components/keycap/index.d.ts +3 -0
  42. package/dist/components/keycap/index.js +30 -44
  43. package/dist/components/keycap/index.js.map +1 -1
  44. package/dist/components/list/index.d.ts +16 -2
  45. package/dist/components/list/index.js +124 -69
  46. package/dist/components/list/index.js.map +1 -1
  47. package/dist/components/list-detail/index.d.ts +11 -3
  48. package/dist/components/list-detail/index.js +13 -6
  49. package/dist/components/list-detail/index.js.map +1 -1
  50. package/dist/components/list-item/index.d.ts +16 -1
  51. package/dist/components/list-item/index.js.map +1 -1
  52. package/dist/components/menu/index.d.ts +6 -2
  53. package/dist/components/menu/index.js +22 -15
  54. package/dist/components/menu/index.js.map +1 -1
  55. package/dist/components/meter/index.d.ts +4 -1
  56. package/dist/components/meter/index.js +6 -0
  57. package/dist/components/meter/index.js.map +1 -1
  58. package/dist/components/navigation-bar/index.d.ts +14 -4
  59. package/dist/components/navigation-bar/index.js +77 -50
  60. package/dist/components/navigation-bar/index.js.map +1 -1
  61. package/dist/components/navigation-rail/index.d.ts +3 -2
  62. package/dist/components/navigation-rail/index.js +59 -52
  63. package/dist/components/navigation-rail/index.js.map +1 -1
  64. package/dist/components/navigation-tree/index.js +4 -1
  65. package/dist/components/navigation-tree/index.js.map +1 -1
  66. package/dist/components/number-field/index.d.ts +3 -2
  67. package/dist/components/number-field/index.js +91 -115
  68. package/dist/components/number-field/index.js.map +1 -1
  69. package/dist/components/popover/index.d.ts +3 -1
  70. package/dist/components/popover/index.js +102 -100
  71. package/dist/components/popover/index.js.map +1 -1
  72. package/dist/components/progress-indicator/index.d.ts +4 -2
  73. package/dist/components/progress-indicator/index.js +4 -3
  74. package/dist/components/progress-indicator/index.js.map +1 -1
  75. package/dist/components/radio-group/index.js +34 -24
  76. package/dist/components/radio-group/index.js.map +1 -1
  77. package/dist/components/search-field/index.d.ts +11 -1
  78. package/dist/components/search-field/index.js +32 -28
  79. package/dist/components/search-field/index.js.map +1 -1
  80. package/dist/components/segmented-button/index.d.ts +9 -2
  81. package/dist/components/segmented-button/index.js +1 -1
  82. package/dist/components/segmented-button/index.js.map +1 -1
  83. package/dist/components/separator/index.d.ts +19 -7
  84. package/dist/components/separator/index.js +36 -13
  85. package/dist/components/separator/index.js.map +1 -1
  86. package/dist/components/sheet/index.js +72 -61
  87. package/dist/components/sheet/index.js.map +1 -1
  88. package/dist/components/snackbar/index.d.ts +4 -1
  89. package/dist/components/snackbar/index.js +140 -55
  90. package/dist/components/snackbar/index.js.map +1 -1
  91. package/dist/components/stack/index.d.ts +6 -3
  92. package/dist/components/stack/index.js +48 -31
  93. package/dist/components/stack/index.js.map +1 -1
  94. package/dist/components/switch/index.d.ts +16 -6
  95. package/dist/components/switch/index.js +115 -62
  96. package/dist/components/switch/index.js.map +1 -1
  97. package/dist/components/text-area/index.d.ts +10 -1
  98. package/dist/components/text-area/index.js +21 -19
  99. package/dist/components/text-area/index.js.map +1 -1
  100. package/dist/components/text-field/index.d.ts +16 -2
  101. package/dist/components/text-field/index.js +49 -43
  102. package/dist/components/text-field/index.js.map +1 -1
  103. package/dist/components/time-picker/index.js +42 -38
  104. package/dist/components/time-picker/index.js.map +1 -1
  105. package/dist/components/tooltip/index.d.ts +3 -1
  106. package/dist/components/tooltip/index.js.map +1 -1
  107. package/dist/components/tree/index.d.ts +15 -3
  108. package/dist/components/tree/index.js +41 -28
  109. package/dist/components/tree/index.js.map +1 -1
  110. package/dist/control/index.js +26 -23
  111. package/dist/control/index.js.map +1 -1
  112. package/dist/control/styles.js +8 -1
  113. package/dist/control/styles.js.map +1 -1
  114. package/dist/field/index.js +149 -131
  115. package/dist/field/index.js.map +1 -1
  116. package/dist/field/styles.js +14 -1
  117. package/dist/field/styles.js.map +1 -1
  118. package/dist/glyphs/index.js +37 -1
  119. package/dist/glyphs/index.js.map +1 -1
  120. package/dist/hooks/useClippedTitle.js +44 -0
  121. package/dist/hooks/useClippedTitle.js.map +1 -0
  122. package/dist/hooks/useRipple.js +6 -5
  123. package/dist/hooks/useRipple.js.map +1 -1
  124. package/dist/hooks/useScrollStop.js +133 -0
  125. package/dist/hooks/useScrollStop.js.map +1 -0
  126. package/dist/i18n/index.js +1 -0
  127. package/dist/i18n/index.js.map +1 -1
  128. package/dist/i18n/messages.js +34 -0
  129. package/dist/i18n/messages.js.map +1 -1
  130. package/dist/index.d.ts +2 -2
  131. package/dist/indicator/index.js +18 -16
  132. package/dist/indicator/index.js.map +1 -1
  133. package/dist/indicator/styles.js +3 -0
  134. package/dist/indicator/styles.js.map +1 -1
  135. package/dist/keycap/context.js +7 -0
  136. package/dist/keycap/context.js.map +1 -0
  137. package/dist/navigation/index.d.ts +16 -2
  138. package/dist/navigation/index.js +145 -44
  139. package/dist/navigation/index.js.map +1 -1
  140. package/dist/navigation/styles.js +79 -16
  141. package/dist/navigation/styles.js.map +1 -1
  142. package/dist/overlay/modal.js +7 -0
  143. package/dist/overlay/modal.js.map +1 -0
  144. package/dist/row/index.js +92 -89
  145. package/dist/row/index.js.map +1 -1
  146. package/dist/row/styles.js +24 -1
  147. package/dist/row/styles.js.map +1 -1
  148. package/dist/styles/overlay.d.ts +6 -2
  149. package/dist/styles/overlay.js +9 -1
  150. package/dist/styles/overlay.js.map +1 -1
  151. package/dist/styles.css +177 -20
  152. package/dist/theme-scope.d.ts +5 -1
  153. package/dist/theme-scope.js +100 -51
  154. package/dist/theme-scope.js.map +1 -1
  155. package/dist/tokens/design.tokens.stylex.js.map +1 -1
  156. package/package.json +21 -20
  157. package/dist/hooks/useScrollable.js +0 -69
  158. package/dist/hooks/useScrollable.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["stylex","colors","media","radii","spacing","stateLayerOpacity","typography","FORCED_COLORS","HOVERED_OVER_NOTHING","onSecondaryContainer","hover","FOCUSED_OVER_NOTHING","focus","PRESSED_OVER_NOTHING","pressed","HOVERED_OVER_CURRENT","secondaryContainer","FOCUSED_OVER_CURRENT","PRESSED_OVER_CURRENT","navigationItemStyles","icon","kGNEyG","k1xSpc","kGuDYH","kjj79g","$$css","itemDisabled","kMwMTN","kkrTdU","label","kVQacm","kg5iWk","khDVqt","link","kB7OPa","k3XXqK","kVAEAm","kMnn75","pill","kWkggS","kaIpWk","TARGET_SIZE","barItemStyles","badgeMark","kSGwAc","kLqNvP","keTefX","indicator","kZKoxP","kmuXW","kzqmXN","indicatorCurrent","kVAM5u","ksu8eU","kMzoRj","indicatorFocused","indicatorFocusedCurrent","indicatorHovered","indicatorHoveredCurrent","indicatorPressed","indicatorPressedCurrent","indicatorRing","kjBf7l","kInvED","kMeerF","item","k5JduY","kSy8m5","kcktkL","kwXMNM","kCS8Yb","kXwgrk","kzQI83","kOIVth","k7Eaqz","k8WAf4","kg3NbH","itemCurrent","itemFocused","itemFocusedCurrent","itemHovered","itemHoveredCurrent","itemPressed","itemPressedCurrent","itemRing","kMv6JI","k63SB2","kb6lSQ","kLWn49","ks0D6T","labelCurrent","collapsedItemStyles","expandedItemStyles","crampedBarItemStyles"],"sources":["../../src/navigation/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, media, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The destinations NavigationBar and NavigationRail both draw, in the three\n// forms the two pages give them. Apart from either component so the two\n// cannot drift, and outside `src/components` for the reason src/row gives.\n//\n// A vertical destination puts its icon in the page's 56dp by 32dp active\n// indicator with the label 4dp under it, in label medium: the navigation bar\n// below the medium breakpoint, and the collapsed rail. A horizontal one is a\n// pill holding the icon and the label side by side, 16dp in at either end:\n// the bar at and above the medium breakpoint at 40dp with 4dp between the\n// two, and the expanded rail at 56dp with 8dp between them, in label large.\n//\n// The current destination's pill is the secondary container, with its icon\n// in on secondary container and, under the pill, its label in secondary;\n// every other is on surface variant. A label set inside the pill, as a\n// horizontal destination sets it, takes on secondary container instead — the\n// library's own call. Secondary over secondary container is not a pair a\n// scheme is held to, and the Poster scheme's came to 4:1, short of the 4.5:1\n// text needs; on secondary container is the pair every scheme guarantees.\n//\n// The hover, focus and pressed layers are the on secondary container role\n// over whatever the pill is, at the pages' 8%, 10% and 10%, drawn on the\n// pill — the indicator in a vertical destination, the whole destination in a\n// horizontal one. They are applied in that order, so where two hold the\n// later wins, as the pages draw one layer at a time. A focused destination's\n// ring goes around the same pill; ./index.tsx says whose ring it is.\n//\n// Under forced colours the mode paints the secondary container over in its\n// background, which left the current destination looking like every other.\n// The pill takes a 2px border in `Highlight` there, which the mode keeps.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The pill's ground and the layers over it, written out whole for each\n// ground, since StyleX replaces a property whole.\nconst HOVERED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), transparent)`;\nconst FOCUSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), transparent)`;\nconst PRESSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), transparent)`;\nconst HOVERED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), ${colors.secondaryContainer})`;\nconst FOCUSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), ${colors.secondaryContainer})`;\nconst PRESSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), ${colors.secondaryContainer})`;\n\n// What every destination draws whatever its form.\nconst navigationItemStyles = {\n icon: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n itemDisabled: {\n kMwMTN: \"x1gpw424 x1bhcspo\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n label: {\n kMwMTN: \"x1w5n3ug\",\n kVQacm: \"xb3r6kr\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n link: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n k3XXqK: \"x1t137rt\",\n kVAEAm: \"x1n2onr6\",\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n pill: {\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\n\n// The pages' least touch target, which a horizontal bar destination's 40dp\n// pill falls short of.\nconst TARGET_SIZE = '48px';\n\n// The navigation bar's destination: vertical below the medium breakpoint and\n// horizontal at it and above, so every value that differs is a pair.\nconst barItemStyles = {\n badgeMark: {\n kSGwAc: \"xcspwbw\",\n kLqNvP: \"xty0069 x19sl9hu\",\n keTefX: \"xhi6r6q\",\n kVAEAm: \"x10l6tqk x15m4ytg\",\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97 x10qpgbh\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f x11lewyt\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4 x8jqrm0\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck xnqlxux\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su x8jqrm0\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g x8jqrm0\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf x8jqrm0\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6 x8jqrm0\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj x8jqrm0\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9 x8jqrm0\",\n $$css: true\n },\n indicatorRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59 x1t601oj\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n item: {\n k5JduY: \"x1ktxc2h\",\n kSy8m5: \"xfmxh57\",\n kcktkL: \"xb7ltuz\",\n kwXMNM: \"x1j6awrg\",\n kZKoxP: \"x5yr21d xiioxts\",\n kaIpWk: \"x1dkaolv\",\n kCS8Yb: \"x1r8uery x1a6ly76\",\n kXwgrk: \"xdt5ytf xapwh9g\",\n kzQI83: \"x1iyjqo2 x10cb59y\",\n kOIVth: \"xzoy561\",\n kjj79g: \"xl56j7k\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"x1t0vds8 x1nouyz5\",\n kg3NbH: \"xnjsko4 xze1m75\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"xjbqb8w x1xec0pq\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"x1xldtvv x1wx4lrg\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"xjbqb8w xdodzsd\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"xjbqb8w xnmt8re\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"xjbqb8w xdenq60\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"xjbqb8w xjq3nej\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"xjbqb8w x7fq6vu\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xjbqb8w x9wewpu\",\n $$css: true\n },\n itemRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt xxgb522\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9 x16ybrrz\",\n $$css: true\n }\n};\n\n// The collapsed rail's destination: always vertical, the pitch from one to\n// the next the rail's 4dp gap.\nconst collapsedItemStyles = {\n badgeMark: {\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n item: {\n kXwgrk: \"xdt5ytf\",\n kmuXW: \"x2lah0s\",\n kOIVth: \"xzoy561\",\n kzqmXN: \"xh8yej3\",\n kjj79g: \"xl56j7k\",\n k8WAf4: \"x1t0vds8\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n itemCurrent: {\n $$css: true\n },\n itemFocused: {\n $$css: true\n },\n itemFocusedCurrent: {\n $$css: true\n },\n itemHovered: {\n $$css: true\n },\n itemHoveredCurrent: {\n $$css: true\n },\n itemPressed: {\n $$css: true\n },\n itemPressedCurrent: {\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9\",\n $$css: true\n }\n};\n\n// The expanded rail's destination: always horizontal, a 56dp pill as wide as\n// what it holds.\nconst expandedItemStyles = {\n badgeMark: {\n kSGwAc: \"xqcrz7y\",\n kLqNvP: \"x1o0tod\",\n keTefX: \"x18xomjl\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n indicatorCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n $$css: true\n },\n indicatorFocusedCurrent: {\n $$css: true\n },\n indicatorHovered: {\n $$css: true\n },\n indicatorHoveredCurrent: {\n $$css: true\n },\n indicatorPressed: {\n $$css: true\n },\n indicatorPressedCurrent: {\n $$css: true\n },\n item: {\n kSGwAc: \"xqcrz7y\",\n kZKoxP: \"xnnlda6\",\n kaIpWk: \"x1dkaolv\",\n kXwgrk: \"x1q0g3np\",\n kmuXW: \"x2lah0s\",\n kOIVth: \"x126z3so\",\n ks0D6T: \"x193iq5w\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n }\n};\n\n// The bar's destination when the bar is too narrow for its horizontal form\n// at a width that would otherwise draw it — see NavigationBar. Vertical at\n// every width: the bar's own vertical item, with the collapsed rail's\n// indicator, label and badge placement, which are the bar's vertical ones.\nconst crampedBarItemStyles = {\n item: {\n kZKoxP: \"x5yr21d\",\n kaIpWk: \"x1dkaolv\",\n kCS8Yb: \"x1r8uery\",\n kXwgrk: \"xdt5ytf\",\n kzQI83: \"x1iyjqo2\",\n kOIVth: \"xzoy561\",\n kjj79g: \"xl56j7k\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"x1t0vds8\",\n kg3NbH: \"xnjsko4\",\n $$css: true\n }\n};\nexport { barItemStyles, collapsedItemStyles, crampedBarItemStyles, expandedItemStyles, navigationItemStyles };"],"mappings":";;AA0C6B,GAAsBC,OAAOQ,uBAA6BJ,kBAAkBK;AAC5E,GAAsBT,OAAOQ,uBAA6BJ,kBAAkBO;AAC5E,GAAsBX,OAAOQ,uBAA6BJ,kBAAkBS;AAC5E,GAAsBb,OAAOQ,uBAA6BJ,kBAAkBK,QAAkBT,OAAOe;AACrG,GAAsBf,OAAOQ,uBAA6BJ,kBAAkBO,QAAkBX,OAAOe;AACrG,GAAsBf,OAAOQ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EACPwB,QAAQ;EACRgB,QAAQ;EACRb,QAAQ;EACRnD,OAAO;CACT;CACAoD,aAAa;EACXtC,QAAQ;EACRa,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACR7B,OAAO;CACT;CACAqD,aAAa;EACXvC,QAAQ;EACRd,OAAO;CACT;CACAsD,oBAAoB;EAClBxC,QAAQ;EACRd,OAAO;CACT;CACAuD,aAAa;EACXzC,QAAQ;EACRd,OAAO;CACT;CACAwD,oBAAoB;EAClB1C,QAAQ;EACRd,OAAO;CACT;CACAyD,aAAa;EACX3C,QAAQ;EACRd,OAAO;CACT;CACA0D,oBAAoB;EAClB5C,QAAQ;EACRd,OAAO;CACT;CACAI,OAAO;EACLwD,QAAQ;EACR9D,QAAQ;EACR+D,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACR/D,OAAO;CACT;CACAiE,cAAc;EACZ/D,QAAQ;EACRF,OAAO;CACT;AACF;AAMA,MAAMoE,uBAAuB,EAC3B5B,MAAM;CACJjB,QAAQ;CACRR,QAAQ;CACR8B,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRjD,QAAQ;CACRkD,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRnD,OAAO;AACT,EACF"}
1
+ {"version":3,"file":"styles.js","names":["stylex","colors","media","motion","radii","spacing","stateLayerOpacity","typography","FORCED_COLORS","HOVERED_OVER_NOTHING","onSecondaryContainer","hover","FOCUSED_OVER_NOTHING","focus","PRESSED_OVER_NOTHING","pressed","HOVERED_OVER_CURRENT","secondaryContainer","FOCUSED_OVER_CURRENT","PRESSED_OVER_CURRENT","navigationItemStyles","fade","kIyJzY","k1ekBW","kAMwcw","$$css","icon","kGNEyG","k1xSpc","kGuDYH","kjj79g","itemDisabled","kMwMTN","kkrTdU","label","kXHlph","kORKVm","kg5iWk","khDVqt","link","kB7OPa","k3XXqK","kVAEAm","kMnn75","pill","kWkggS","kaIpWk","navigationListStyles","item","list","kH6xsr","kogj98","kmVPX3","TARGET_SIZE","BAR_ROW","PILL","barItemStyles","badgeMark","kSGwAc","kLqNvP","keTefX","indicator","kZKoxP","kmuXW","kzqmXN","indicatorCurrent","kVAM5u","ksu8eU","kMzoRj","indicatorFocused","indicatorFocusedCurrent","indicatorHovered","indicatorHoveredCurrent","indicatorPressed","indicatorPressedCurrent","indicatorRing","kjBf7l","kInvED","kMeerF","k5JduY","kSy8m5","kcktkL","kwXMNM","kCS8Yb","kXwgrk","kzQI83","kOIVth","kqGvvJ","kAzted","k7Eaqz","k8WAf4","kg3NbH","itemCurrent","itemFocused","itemFocusedCurrent","itemHovered","itemHoveredCurrent","itemPressed","itemPressedCurrent","itemRing","kMv6JI","k63SB2","kb6lSQ","kLWn49","ks0D6T","labelCurrent","listItem","collapsedItemStyles","expandedItemStyles","crampedBarItemStyles"],"sources":["../../src/navigation/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, media, motion, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The destinations NavigationBar and NavigationRail both draw, in the three\n// forms the two pages give them. Apart from either component so the two\n// cannot drift, and outside `src/components` for the reason src/row gives.\n//\n// A vertical destination puts its icon in the page's 56dp by 32dp active\n// indicator with the label 4dp under it, in label medium: the navigation bar\n// below the medium breakpoint, and the collapsed rail. A horizontal one is a\n// pill holding the icon and the label side by side, 16dp in at either end:\n// the bar at and above the medium breakpoint at 40dp with 4dp between the\n// two, and the expanded rail at 56dp with 8dp between them, in label large.\n//\n// The current destination's pill is the secondary container, with its icon\n// in on secondary container and, under the pill, its label in secondary;\n// every other is on surface variant. A label set inside the pill, as a\n// horizontal destination sets it, takes on secondary container instead — the\n// library's own call. Secondary over secondary container is not a pair a\n// scheme is held to, and the Poster scheme's came to 4:1, short of the 4.5:1\n// text needs; on secondary container is the pair every scheme guarantees.\n//\n// The hover, focus and pressed layers are the on secondary container role\n// over whatever the pill is, at the pages' 8%, 10% and 10%, drawn on the\n// pill — the indicator in a vertical destination, the whole destination in a\n// horizontal one. They are applied in that order, so where two hold the\n// later wins, as the pages draw one layer at a time. A focused destination's\n// ring goes around the same pill; ./index.tsx says whose ring it is.\n//\n// A change from one of those states to another fades, over the pages' short\n// duration on the standard curve, rather than landing in one frame. A press\n// also draws the library's ripple over the pressed layer, clipped to the\n// pill: inside the indicator in a vertical destination, which positions it,\n// and across the whole destination in a horizontal one, whose indicator is\n// left unpositioned so the ripple fills the link and takes the indicator's\n// pill corner.\n//\n// Under forced colours the mode paints the secondary container over in its\n// background, which left the current destination looking like every other.\n// The pill takes a 2px border in `Highlight` there, which the mode keeps.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The pill's ground and the layers over it, written out whole for each\n// ground, since StyleX replaces a property whole.\nconst HOVERED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), transparent)`;\nconst FOCUSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), transparent)`;\nconst PRESSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), transparent)`;\nconst HOVERED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), ${colors.secondaryContainer})`;\nconst FOCUSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), ${colors.secondaryContainer})`;\nconst PRESSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), ${colors.secondaryContainer})`;\n\n// What every destination draws whatever its form.\nconst navigationItemStyles = {\n fade: {\n kIyJzY: \"x1qno0dh x12w9bfk\",\n k1ekBW: \"xs2xxs2\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n itemDisabled: {\n kMwMTN: \"x1gpw424 x1bhcspo\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n label: {\n kMwMTN: \"x1w5n3ug\",\n kXHlph: \"x101abm8\",\n kORKVm: \"xryxfnj\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n link: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n k3XXqK: \"x1t137rt\",\n kVAEAm: \"x1n2onr6\",\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n pill: {\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\n\n// The list a bar or a rail holds its destinations in, and the item each\n// destination sits in — see `NavigationList` in ./index.tsx. The list clears\n// the margin, padding and markers a `<ul>` comes with, and each form gives\n// the space between its destinations as its `list`. The item takes the\n// destination's place in the bar's row or the rail's column, which each form\n// gives as its `listItem`, and the link fills it.\nconst navigationListStyles = {\n item: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n $$css: true\n },\n list: {\n kB7OPa: \"x9f619\",\n kH6xsr: \"x3ct3a4\",\n kogj98: \"x1ghz6dp\",\n kmVPX3: \"x1717udv\",\n $$css: true\n }\n};\n\n// The pages' least touch target, which a horizontal bar destination's 40dp\n// pill falls short of.\nconst TARGET_SIZE = '48px';\n\n// The navigation bar page's 64dp row, and the 40dp pill a horizontal\n// destination draws inside it.\nconst BAR_ROW = '64px';\nconst PILL = '40px';\n\n// The navigation bar's destination: vertical below the medium breakpoint and\n// horizontal at it and above, so every value that differs is a pair.\nconst barItemStyles = {\n badgeMark: {\n kSGwAc: \"xcspwbw\",\n kLqNvP: \"xty0069 x19sl9hu\",\n keTefX: \"xhi6r6q\",\n kVAEAm: \"x10l6tqk x15m4ytg\",\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97 x10qpgbh\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f x11lewyt\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x1n2onr6 xtke4eg\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4 x8jqrm0\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck xnqlxux\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su x8jqrm0\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g x8jqrm0\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf x8jqrm0\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6 x8jqrm0\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj x8jqrm0\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9 x8jqrm0\",\n $$css: true\n },\n indicatorRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59 x1t601oj\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n item: {\n k5JduY: \"x1ktxc2h\",\n kSy8m5: \"xfmxh57\",\n kcktkL: \"xb7ltuz\",\n kwXMNM: \"x1j6awrg\",\n kZKoxP: \"xiioxts\",\n kaIpWk: \"x1dkaolv\",\n kCS8Yb: \"x1r8uery x1a6ly76\",\n kXwgrk: \"xdt5ytf xapwh9g\",\n kzQI83: \"x1iyjqo2 x10cb59y\",\n kOIVth: \"xzoy561\",\n kjj79g: \"xl56j7k\",\n kqGvvJ: \"x10im51j xap7i12\",\n kAzted: \"x8nclml xtyuij1\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"x1t0vds8 x1nouyz5\",\n kg3NbH: \"xnjsko4 xze1m75\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"xjbqb8w x1xec0pq\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"x1xldtvv x1wx4lrg\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"xjbqb8w xdodzsd\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"xjbqb8w xnmt8re\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"xjbqb8w xdenq60\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"xjbqb8w xjq3nej\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"xjbqb8w x7fq6vu\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xjbqb8w x9wewpu\",\n $$css: true\n },\n itemRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt xxgb522\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9 x16ybrrz\",\n $$css: true\n },\n list: {\n kOIVth: \"xxhr3t x110hqo6\",\n $$css: true\n },\n listItem: {\n kCS8Yb: \"x1r8uery x1a6ly76\",\n kzQI83: \"x1iyjqo2 x10cb59y\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n }\n};\n\n// The collapsed rail's destination: always vertical, the pitch from one to\n// the next the rail's 4dp gap.\nconst collapsedItemStyles = {\n badgeMark: {\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n item: {\n kXwgrk: \"xdt5ytf\",\n kmuXW: \"x2lah0s\",\n kOIVth: \"xzoy561\",\n kzqmXN: \"xh8yej3\",\n kjj79g: \"xl56j7k\",\n k8WAf4: \"x1t0vds8\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n itemCurrent: {\n $$css: true\n },\n itemFocused: {\n $$css: true\n },\n itemFocusedCurrent: {\n $$css: true\n },\n itemHovered: {\n $$css: true\n },\n itemHoveredCurrent: {\n $$css: true\n },\n itemPressed: {\n $$css: true\n },\n itemPressedCurrent: {\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9\",\n $$css: true\n },\n list: {\n kOIVth: \"xzoy561\",\n $$css: true\n },\n listItem: {\n kmuXW: \"x2lah0s\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n }\n};\n\n// The expanded rail's destination: always horizontal, a 56dp pill as wide as\n// what it holds.\nconst expandedItemStyles = {\n badgeMark: {\n kSGwAc: \"xqcrz7y\",\n kLqNvP: \"x1o0tod\",\n keTefX: \"x18xomjl\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n indicatorCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n $$css: true\n },\n indicatorFocusedCurrent: {\n $$css: true\n },\n indicatorHovered: {\n $$css: true\n },\n indicatorHoveredCurrent: {\n $$css: true\n },\n indicatorPressed: {\n $$css: true\n },\n indicatorPressedCurrent: {\n $$css: true\n },\n item: {\n kSGwAc: \"xqcrz7y\",\n kZKoxP: \"xnnlda6\",\n kaIpWk: \"x1dkaolv\",\n kXwgrk: \"x1q0g3np\",\n kmuXW: \"x2lah0s\",\n kOIVth: \"x126z3so\",\n ks0D6T: \"x193iq5w\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n list: {\n $$css: true\n },\n listItem: {\n kSGwAc: \"xqcrz7y\",\n kmuXW: \"x2lah0s\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n }\n};\n\n// The bar's destination when the bar is too narrow for its horizontal form\n// at a width that would otherwise draw it — see NavigationBar. Vertical at\n// every width: the bar's own vertical item, with the collapsed rail's\n// indicator, label and badge placement, which are the bar's vertical ones.\nconst crampedBarItemStyles = {\n item: {\n kZKoxP: \"x5yr21d\",\n kaIpWk: \"x1dkaolv\",\n kCS8Yb: \"x1r8uery\",\n kXwgrk: \"xdt5ytf\",\n kzQI83: \"x1iyjqo2\",\n kOIVth: \"xzoy561\",\n kjj79g: \"xl56j7k\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"x1t0vds8\",\n kg3NbH: \"xnjsko4\",\n $$css: true\n },\n list: {\n kOIVth: \"xxhr3t\",\n $$css: true\n },\n listItem: {\n kCS8Yb: \"x1r8uery\",\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n }\n};\nexport { barItemStyles, collapsedItemStyles, crampedBarItemStyles, expandedItemStyles, navigationItemStyles, navigationListStyles };"],"mappings":";;AAkD6B,GAAsBC,OAAOS,uBAA6BJ,kBAAkBK;AAC5E,GAAsBV,OAAOS,uBAA6BJ,kBAAkBO;AAC5E,GAAsBZ,OAAOS,uBAA6BJ,kBAAkBS;AAC5E,GAAsBd,OAAOS,uBAA6BJ,kBAAkBK,QAAkBV,OAAOgB;AACrG,GAAsBhB,OAAOS,uBAA6BJ,kBAAkBO,QAAkBZ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ACRK,OAAO;EACPyC,QAAQ;EACR/E,OAAO;CACT;AACF;AAMA,MAAMoF,uBAAuB;CAC3B7D,MAAM;EACJc,QAAQ;EACRhB,QAAQ;EACRqC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRxD,QAAQ;EACR2D,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRlE,OAAO;CACT;CACAwB,MAAM;EACJqC,QAAQ;EACR7D,OAAO;CACT;CACAiF,UAAU;EACRvB,QAAQ;EACRE,QAAQ;EACRI,QAAQ;EACRhE,OAAO;CACT;AACF"}
@@ -0,0 +1,7 @@
1
+ import { createContext } from "react";
2
+ //#region src/overlay/modal.ts
3
+ const InsideModalContext = createContext(false);
4
+ //#endregion
5
+ export { InsideModalContext };
6
+
7
+ //# sourceMappingURL=modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.js","names":["createContext","InsideModalContext"],"sources":["../../src/overlay/modal.ts"],"sourcesContent":["import { createContext } from 'react'\n\n// Whether a modal is open around what reads it. Every modal draws its own\n// scrim across the whole window, so one opened from inside another laid a\n// second over the first: the page darkened twice over, and the first modal's\n// own surface was dimmed with it. A modal set inside another reads this as\n// true and draws its scrim without a fill, leaving the first modal's as the\n// one the page is dimmed by. Its scrim is still there, empty, since it is\n// what React Aria reads a press outside the modal from.\n//\n// Set by a modal around its content rather than by `OverlayScope`, which\n// popovers set too: a modal opened from a popover is over a modal only if the\n// popover is inside one, and the context reaching it through the popover from\n// further out says exactly that. Apart from the components so their modules\n// export components alone, which is what keeps fast refresh working for them.\nconst InsideModalContext = createContext(false)\n\nexport { InsideModalContext }\n"],"mappings":";;AAeA,MAAMC,qBAAqBD,cAAc,KAAK"}
package/dist/row/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
2
2
  import { hasContent } from "../render/content.js";
3
- import { rowStyles } from "./styles.js";
3
+ import { rowStyles, supportingTone } from "./styles.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/row/index.tsx
@@ -16,7 +16,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
16
16
  * the same arrangement around a field.
17
17
  */
18
18
  function RowContent(t0) {
19
- const $ = c(29);
19
+ const $ = c(34);
20
20
  const { children, isDisabled: t1, isEmphasized: t2, isSelected: t3, leading, overline, supporting, trailing, variant: t4 } = t0;
21
21
  const isDisabled = t1 === void 0 ? false : t1;
22
22
  const isEmphasized = t2 === void 0 ? false : t2;
@@ -24,107 +24,110 @@ function RowContent(t0) {
24
24
  const variant = t4 === void 0 ? "list" : t4;
25
25
  const label = variant === "drawer" || variant === "menu";
26
26
  let t5;
27
- if ($[0] !== isDisabled || $[1] !== isSelected || $[2] !== variant) {
28
- t5 = isDisabled ? rowStyles.supportingInherit : isSelected && selectedSupportingTone(variant);
29
- $[0] = isDisabled;
30
- $[1] = isSelected;
31
- $[2] = variant;
32
- $[3] = t5;
33
- } else t5 = $[3];
34
- const supportingTone = t5;
35
27
  let t6;
36
- if ($[4] !== leading) {
37
- t6 = !hasContent(leading) ? null : /* @__PURE__ */ jsx("span", {
38
- ...props(rowStyles.slot),
39
- children: leading
40
- });
41
- $[4] = leading;
42
- $[5] = t6;
43
- } else t6 = $[5];
44
28
  let t7;
45
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
46
- t7 = props(rowStyles.main);
47
- $[6] = t7;
48
- } else t7 = $[6];
49
29
  let t8;
50
- if ($[7] !== overline || $[8] !== supportingTone) {
51
- t8 = !hasContent(overline) ? null : /* @__PURE__ */ jsx("span", {
52
- ...props(rowStyles.overline, supportingTone),
53
- children: overline
54
- });
55
- $[7] = overline;
56
- $[8] = supportingTone;
57
- $[9] = t8;
58
- } else t8 = $[9];
59
30
  let t9;
60
- if ($[10] !== isEmphasized || $[11] !== label) {
61
- t9 = props(label ? rowStyles.headlineMenu : rowStyles.headlineList, isEmphasized && rowStyles.headlineEmphasis);
62
- $[10] = isEmphasized;
63
- $[11] = label;
64
- $[12] = t9;
65
- } else t9 = $[12];
66
- let t10;
67
- if ($[13] !== children || $[14] !== t9) {
68
- t10 = /* @__PURE__ */ jsx("span", {
69
- ...t9,
70
- children
31
+ if ($[0] !== children || $[1] !== isDisabled || $[2] !== isEmphasized || $[3] !== isSelected || $[4] !== label || $[5] !== leading || $[6] !== overline || $[7] !== supporting || $[8] !== variant) {
32
+ const tone = supportingTone(variant, {
33
+ isDisabled,
34
+ isSelected
71
35
  });
72
- $[13] = children;
73
- $[14] = t9;
74
- $[15] = t10;
75
- } else t10 = $[15];
76
- let t11;
77
- if ($[16] !== supporting || $[17] !== supportingTone) {
78
- t11 = !hasContent(supporting) ? null : /* @__PURE__ */ jsx("span", {
79
- ...props(rowStyles.supporting, supportingTone),
36
+ if ($[14] !== leading) {
37
+ t9 = !hasContent(leading) ? null : /* @__PURE__ */ jsx("span", {
38
+ ...props(rowStyles.slot),
39
+ children: leading
40
+ });
41
+ $[14] = leading;
42
+ $[15] = t9;
43
+ } else t9 = $[15];
44
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
45
+ t5 = props(rowStyles.main);
46
+ $[16] = t5;
47
+ } else t5 = $[16];
48
+ t6 = !hasContent(overline) ? null : /* @__PURE__ */ jsx("span", {
49
+ ...props(rowStyles.overline, tone),
50
+ children: overline
51
+ });
52
+ let t10;
53
+ if ($[17] !== isEmphasized || $[18] !== label) {
54
+ t10 = props(label ? rowStyles.headlineMenu : rowStyles.headlineList, isEmphasized && rowStyles.headlineEmphasis);
55
+ $[17] = isEmphasized;
56
+ $[18] = label;
57
+ $[19] = t10;
58
+ } else t10 = $[19];
59
+ if ($[20] !== children || $[21] !== t10) {
60
+ t7 = /* @__PURE__ */ jsx("span", {
61
+ ...t10,
62
+ children
63
+ });
64
+ $[20] = children;
65
+ $[21] = t10;
66
+ $[22] = t7;
67
+ } else t7 = $[22];
68
+ t8 = !hasContent(supporting) ? null : /* @__PURE__ */ jsx("span", {
69
+ ...props(rowStyles.supporting, tone),
80
70
  children: supporting
81
71
  });
82
- $[16] = supporting;
83
- $[17] = supportingTone;
84
- $[18] = t11;
85
- } else t11 = $[18];
86
- let t12;
87
- if ($[19] !== t10 || $[20] !== t11 || $[21] !== t8) {
88
- t12 = /* @__PURE__ */ jsxs("span", {
89
- ...t7,
72
+ $[0] = children;
73
+ $[1] = isDisabled;
74
+ $[2] = isEmphasized;
75
+ $[3] = isSelected;
76
+ $[4] = label;
77
+ $[5] = leading;
78
+ $[6] = overline;
79
+ $[7] = supporting;
80
+ $[8] = variant;
81
+ $[9] = t5;
82
+ $[10] = t6;
83
+ $[11] = t7;
84
+ $[12] = t8;
85
+ $[13] = t9;
86
+ } else {
87
+ t5 = $[9];
88
+ t6 = $[10];
89
+ t7 = $[11];
90
+ t8 = $[12];
91
+ t9 = $[13];
92
+ }
93
+ let t10;
94
+ if ($[23] !== t5 || $[24] !== t6 || $[25] !== t7 || $[26] !== t8) {
95
+ t10 = /* @__PURE__ */ jsxs("span", {
96
+ ...t5,
90
97
  children: [
91
- t8,
92
- t10,
93
- t11
98
+ t6,
99
+ t7,
100
+ t8
94
101
  ]
95
102
  });
96
- $[19] = t10;
97
- $[20] = t11;
98
- $[21] = t8;
99
- $[22] = t12;
100
- } else t12 = $[22];
101
- let t13;
102
- if ($[23] !== trailing) {
103
- t13 = !hasContent(trailing) ? null : /* @__PURE__ */ jsx("span", {
103
+ $[23] = t5;
104
+ $[24] = t6;
105
+ $[25] = t7;
106
+ $[26] = t8;
107
+ $[27] = t10;
108
+ } else t10 = $[27];
109
+ let t11;
110
+ if ($[28] !== trailing) {
111
+ t11 = !hasContent(trailing) ? null : /* @__PURE__ */ jsx("span", {
104
112
  ...props(rowStyles.slot),
105
113
  children: trailing
106
114
  });
107
- $[23] = trailing;
108
- $[24] = t13;
109
- } else t13 = $[24];
110
- let t14;
111
- if ($[25] !== t12 || $[26] !== t13 || $[27] !== t6) {
112
- t14 = /* @__PURE__ */ jsxs(Fragment, { children: [
113
- t6,
114
- t12,
115
- t13
115
+ $[28] = trailing;
116
+ $[29] = t11;
117
+ } else t11 = $[29];
118
+ let t12;
119
+ if ($[30] !== t10 || $[31] !== t11 || $[32] !== t9) {
120
+ t12 = /* @__PURE__ */ jsxs(Fragment, { children: [
121
+ t9,
122
+ t10,
123
+ t11
116
124
  ] });
117
- $[25] = t12;
118
- $[26] = t13;
119
- $[27] = t6;
120
- $[28] = t14;
121
- } else t14 = $[28];
122
- return t14;
123
- }
124
- function selectedSupportingTone(variant) {
125
- if (variant === "drawer") return rowStyles.supportingSelectedDrawer;
126
- if (variant === "menu") return rowStyles.supportingSelectedMenu;
127
- return rowStyles.supportingSelectedList;
125
+ $[30] = t10;
126
+ $[31] = t11;
127
+ $[32] = t9;
128
+ $[33] = t12;
129
+ } else t12 = $[33];
130
+ return t12;
128
131
  }
129
132
  //#endregion
130
133
  export { RowContent };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ReactNode","stylex","hasContent","rowStyles","RowContentProps","children","isDisabled","isEmphasized","isSelected","leading","overline","supporting","trailing","variant","RowVariant","RowContent","t0","$","_c","t1","t2","t3","t4","undefined","label","t5","supportingInherit","selectedSupportingTone","supportingTone","t6","props","slot","t7","Symbol","for","main","t8","t9","headlineMenu","headlineList","headlineEmphasis","t10","t11","t12","t13","t14","supportingSelectedDrawer","supportingSelectedMenu","supportingSelectedList","_c","stylex.props"],"sources":["../../src/row/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { hasContent } from '../render/content';\nimport { rowStyles } from './styles';\ninterface RowContentProps {\n /** The row's headline — the one thing it is mostly about. */\n children?: ReactNode;\n /**\n * Whether the row is disabled. The supporting line takes the row's own\n * faded colour when it is, rather than staying at full strength in the\n * muted role.\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Whether the headline is drawn heavier than its variant's own weight, for\n * a row marked without the container a selected one takes. The navigation\n * drawer's trail to the current row is what asks for it.\n * @default false\n */\n isEmphasized?: boolean;\n /**\n * Whether the row is selected. The supporting line takes the selected\n * container's own content role when it is, rather than staying in the\n * muted role it draws on the surface.\n * @default false\n */\n isSelected?: boolean;\n /** Content before the headline: an avatar, an icon, a checkbox. */\n leading?: ReactNode;\n /**\n * A line above the headline, in the page's label-small and the same muted\n * role the supporting line takes.\n */\n overline?: ReactNode;\n /** A second line under the headline, in the muted role. */\n supporting?: ReactNode;\n /** Content after the headline, such as an amount or a control. */\n trailing?: ReactNode;\n /**\n * Which spec page's row this is. A list item's headline is body-large; a\n * menu item's label and a navigation drawer row's are label-large. The\n * element around the content applies the matching `rowStyles.list`,\n * `rowStyles.menu` or `rowStyles.drawer` beside `rowStyles.base`.\n * @default 'list'\n */\n variant?: RowVariant;\n}\ntype RowVariant = 'drawer' | 'list' | 'menu';\n\n/**\n * The inside of a row: the leading slot, the headline with its supporting\n * line, and the trailing slot, each rendered only when given. The element\n * around it is the caller's — ListItem's div or button, a collection's item —\n * and takes `rowStyles.base`, the variant's own style, and whichever states\n * apply; this is what every one of them puts inside it, so a list, a menu, a\n * tree and a drawer draw the same row.\n *\n * Not a component of the library's own and not exported; see `src/field` for\n * the same arrangement around a field.\n */\nfunction RowContent({\n children,\n isDisabled = false,\n isEmphasized = false,\n isSelected = false,\n leading,\n overline,\n supporting,\n trailing,\n variant = 'list'\n}: RowContentProps) {\n // The drawer's label is the menu's, so the two share the headline style;\n // what they do not share is the container a selected row brings, which is\n // why the tone below still asks which variant this is.\n const label = variant === 'drawer' || variant === 'menu';\n // Disabled first: a disabled row's own colour is already the faded one, so\n // it wins over the selected container's content role.\n const supportingTone = isDisabled ? rowStyles.supportingInherit : isSelected && selectedSupportingTone(variant);\n return <>\n {!hasContent(leading) ? null : <span {...stylex.props(rowStyles.slot)}>{leading}</span>}\n <span {...stylex.props(rowStyles.main)}>\n {!hasContent(overline) ? null : <span {...stylex.props(rowStyles.overline, supportingTone)}>\n {overline}\n </span>}\n <span {...stylex.props(label ? rowStyles.headlineMenu : rowStyles.headlineList, isEmphasized && rowStyles.headlineEmphasis)}>\n {children}\n </span>\n {!hasContent(supporting) ? null : <span {...stylex.props(rowStyles.supporting, supportingTone)}>\n {supporting}\n </span>}\n </span>\n {!hasContent(trailing) ? null : <span {...stylex.props(rowStyles.slot)}>{trailing}</span>}\n </>;\n}\n\n// Which on-colour a supporting line takes over a selected row's own\n// container. Each variant's container is a different colour family, and the\n// muted role is not guaranteed to be readable over any of them.\nfunction selectedSupportingTone(variant: RowVariant) {\n if (variant === 'drawer') {\n return rowStyles.supportingSelectedDrawer;\n }\n if (variant === 'menu') {\n return rowStyles.supportingSelectedMenu;\n }\n return rowStyles.supportingSelectedList;\n}\nexport type { RowContentProps, RowVariant };\nexport { RowContent };"],"mappings":";;;;;;;;;;;;;;;;;AA6DA,SAAAe,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAoB,MAAA,EAAAb,UAAAC,YAAAa,IAAAZ,cAAAa,IAAAZ,YAAAa,IAAAZ,SAAAC,UAAAC,YAAAC,UAAAC,SAAAS,OAAAN;CAElB,MAAAV,aAAAa,OAAAI,KAAAA,IAAA,QAAAJ;CACA,MAAAZ,eAAAa,OAAAG,KAAAA,IAAA,QAAAH;CACA,MAAAZ,aAAAa,OAAAE,KAAAA,IAAA,QAAAF;CAKA,MAAAR,UAAAS,OAAAC,KAAAA,IAAA,SAAAD;CAKA,MAAAE,QAAcX,YAAY,YAAYA,YAAY;CAAO,IAAAY;CAAA,IAAAR,EAAA,OAAAX,cAAAW,EAAA,OAAAT,cAAAS,EAAA,OAAAJ,SAAA;EAGlCY,KAAAnB,aAAaH,UAASuB,oBAAqBlB,cAAcmB,uBAAuBd,OAAO;EAACI,EAAA,KAAAX;EAAAW,EAAA,KAAAT;EAAAS,EAAA,KAAAJ;EAAAI,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAA/G,MAAAW,iBAAuBH;CAAyF,IAAA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Node","stylex","hasContent","rowStyles","supportingTone","RowContentProps","children","isDisabled","isEmphasized","isSelected","leading","overline","supporting","trailing","variant","RowVariant","RowContent","t0","$","_c","t1","t2","t3","t4","undefined","label","t5","t6","t7","t8","t9","tone","props","slot","Symbol","for","main","t10","headlineMenu","headlineList","headlineEmphasis","t11","t12","_c","stylex.props"],"sources":["../../src/row/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { hasContent } from '../render/content';\nimport { rowStyles, supportingTone } from './styles';\ninterface RowContentProps {\n /** The row's headline — the one thing it is mostly about. */\n children?: ReactNode;\n /**\n * Whether the row is disabled. The supporting line takes the row's own\n * faded colour when it is, rather than staying at full strength in the\n * muted role.\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Whether the headline is drawn heavier than its variant's own weight, for\n * a row marked without the container a selected one takes. The navigation\n * drawer's trail to the current row is what asks for it.\n * @default false\n */\n isEmphasized?: boolean;\n /**\n * Whether the row is selected. The supporting line takes the selected\n * container's own content role when it is, rather than staying in the\n * muted role it draws on the surface.\n * @default false\n */\n isSelected?: boolean;\n /** Content before the headline: an avatar, an icon, a checkbox. */\n leading?: ReactNode;\n /**\n * A line above the headline, in the page's label-small and the same muted\n * role the supporting line takes.\n */\n overline?: ReactNode;\n /** A second line under the headline, in the muted role. */\n supporting?: ReactNode;\n /** Content after the headline, such as an amount or a control. */\n trailing?: ReactNode;\n /**\n * Which spec page's row this is. A list item's headline is body-large; a\n * menu item's label and a navigation drawer row's are label-large. The\n * element around the content applies the matching `rowStyles.list`,\n * `rowStyles.menu` or `rowStyles.drawer` beside `rowStyles.base`.\n * @default 'list'\n */\n variant?: RowVariant;\n}\ntype RowVariant = 'drawer' | 'list' | 'menu';\n\n/**\n * The inside of a row: the leading slot, the headline with its supporting\n * line, and the trailing slot, each rendered only when given. The element\n * around it is the caller's — ListItem's div or button, a collection's item —\n * and takes `rowStyles.base`, the variant's own style, and whichever states\n * apply; this is what every one of them puts inside it, so a list, a menu, a\n * tree and a drawer draw the same row.\n *\n * Not a component of the library's own and not exported; see `src/field` for\n * the same arrangement around a field.\n */\nfunction RowContent({\n children,\n isDisabled = false,\n isEmphasized = false,\n isSelected = false,\n leading,\n overline,\n supporting,\n trailing,\n variant = 'list'\n}: RowContentProps) {\n // The drawer's label is the menu's, so the two share the headline style;\n // what they do not share is the container a selected row brings, which is\n // why the tone below still asks which variant this is.\n const label = variant === 'drawer' || variant === 'menu';\n const tone = supportingTone(variant, {\n isDisabled,\n isSelected\n });\n return <>\n {!hasContent(leading) ? null : <span {...stylex.props(rowStyles.slot)}>{leading}</span>}\n <span {...stylex.props(rowStyles.main)}>\n {!hasContent(overline) ? null : <span {...stylex.props(rowStyles.overline, tone)}>{overline}</span>}\n <span {...stylex.props(label ? rowStyles.headlineMenu : rowStyles.headlineList, isEmphasized && rowStyles.headlineEmphasis)}>\n {children}\n </span>\n {!hasContent(supporting) ? null : <span {...stylex.props(rowStyles.supporting, tone)}>\n {supporting}\n </span>}\n </span>\n {!hasContent(trailing) ? null : <span {...stylex.props(rowStyles.slot)}>{trailing}</span>}\n </>;\n}\nexport type { RowContentProps, RowVariant };\nexport { RowContent };"],"mappings":";;;;;;;;;;;;;;;;;AA6DA,SAAAgB,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAoB,MAAA,EAAAb,UAAAC,YAAAa,IAAAZ,cAAAa,IAAAZ,YAAAa,IAAAZ,SAAAC,UAAAC,YAAAC,UAAAC,SAAAS,OAAAN;CAElB,MAAAV,aAAAa,OAAAI,KAAAA,IAAA,QAAAJ;CACA,MAAAZ,eAAAa,OAAAG,KAAAA,IAAA,QAAAH;CACA,MAAAZ,aAAAa,OAAAE,KAAAA,IAAA,QAAAF;CAKA,MAAAR,UAAAS,OAAAC,KAAAA,IAAA,SAAAD;CAKA,MAAAE,QAAcX,YAAY,YAAYA,YAAY;CAAO,IAAAY;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;C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AA,UAAA,EAAA,UAAA;GACFZ;GACDO;GASCI;EAAwF,EAAA,CAAA;EACxFvB,EAAA,MAAAmB;EAAAnB,EAAA,MAAAuB;EAAAvB,EAAA,MAAAY;EAAAZ,EAAA,MAAAwB;CAAA,OAAAA,MAAAxB,EAAA;CAAA,OAZEwB;AAYF"}
@@ -37,6 +37,12 @@ const rowStyles = {
37
37
  kAzted: "xyax5pk",
38
38
  $$css: true
39
39
  },
40
+ drawerSurface: {
41
+ kaIpWk: "x1dkaolv",
42
+ kB7OPa: "x9f619",
43
+ k1xSpc: "xjp7ctv",
44
+ $$css: true
45
+ },
40
46
  dropTarget: {
41
47
  kKwaWg: "xu73ib2",
42
48
  kjBf7l: "xrgy624 x1x84bn5",
@@ -183,7 +189,24 @@ const rowStyles = {
183
189
  $$css: true
184
190
  }
185
191
  };
192
+ /**
193
+ * The tone a row's muted text takes over its own muted style: the supporting
194
+ * line and the overline, and a menu item's shortcut. Nothing while the row is
195
+ * drawn on the surface, where the muted style's on surface variant holds;
196
+ * the selected container's own on-colour while selected; and the row's own
197
+ * colour while disabled. Disabled is asked first, since a disabled row's own
198
+ * colour is already the faded one and so wins over the selected container's
199
+ * content role. One function for every caller, so a shortcut and the
200
+ * supporting line beside it cannot come to disagree.
201
+ */
202
+ function supportingTone(variant, { isDisabled, isSelected }) {
203
+ if (isDisabled) return rowStyles.supportingInherit;
204
+ if (!isSelected) return null;
205
+ if (variant === "drawer") return rowStyles.supportingSelectedDrawer;
206
+ if (variant === "menu") return rowStyles.supportingSelectedMenu;
207
+ return rowStyles.supportingSelectedList;
208
+ }
186
209
  //#endregion
187
- export { rowStyles };
210
+ export { rowStyles, supportingTone };
188
211
 
189
212
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["stylex","colors","radii","shadows","sizing","spacing","stateLayerOpacity","typography","HOVER_CAPABLE","FORCED_COLORS","rowStyles","base","kGNEyG","kWkggS","kMzoRj","kB7OPa","kMwMTN","k1xSpc","kOIVth","kzqmXN","k8WAf4","kg3NbH","kVAEAm","k9WMMc","kMnn75","$$css","disabled","kkrTdU","kAXs8y","dragging","kKwaWg","kGVxlE","kY2c9j","drawer","kaIpWk","kUOVxO","kAzted","dropTarget","kjBf7l","kInvED","k3XXqK","kMeerF","focusVisible","headlineEmphasis","k63SB2","headlineList","kMv6JI","kGuDYH","kb6lSQ","kLWn49","kHjlTd","headlineMenu","hovered","interactive","kVVagm","interactiveLayers","list","main","kXwgrk","kzQI83","k7Eaqz","menu","overline","pressed","selectedDrawer","selectedList","selectedMenu","slot","kmuXW","supporting","supportingInherit","supportingSelectedDrawer","supportingSelectedList","supportingSelectedMenu","threeLine","twoLine"],"sources":["../../src/row/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The row every list draws: ListItem's, and from here on the item of every\n// collection the coverage plan adds — ListBox, Menu, List, Tree, the options\n// of Select and ComboBox. Apart from the RowContent component in ./index.tsx\n// so that file exports components alone, which is what keeps fast refresh\n// working for it.\n//\n// Three variants, because three spec pages draw three rows. The lists page\n// gives a list item a 56dp floor, a body-large headline and a body-medium\n// supporting line, and primary container when selected. The menus page gives\n// a menu item 48dp, a label-large label, and tertiary container when\n// selected. The navigation drawer page gives its row 56dp too, with a\n// label-large label like a menu's, and marks the current one with a\n// secondary-container pill held 12dp off each edge — 336dp of indicator in a\n// 360dp container, which is what that inset comes to. The layout, the\n// padding, the state layers and the disabled treatment are one row; `list`,\n// `menu` and `drawer` carry only what the three pages disagree on, and a\n// consumer applies one of them beside `base`.\n//\n// Laid out with flex rather than the grid the design draws. The design's\n// three columns are `auto 1fr auto`, which is what flex does natively — and\n// unlike a fixed three-column grid it stays correct when a row has no leading\n// or no trailing content, where the remaining children would otherwise slide\n// into the wrong columns.\n//\n// Rows align with each other through their leading content being the same\n// size, not through a fixed column width: a list of Avatars all at one size\n// lines up, and that is the same thing the design's 40px column achieves.\n//\n// The state layer composites over `transparent` rather than over a container\n// colour, because a row's own background is transparent and it therefore\n// tints whatever it happens to be sitting on — a card, a menu, or the page.\n// The two selected states are the ones that bring a container of their own.\n\n// A pointer that can hover, for `interactiveLayers` — a plain element with no\n// render state, so its hover layer is a pseudo-class, and Chromium leaves\n// `:hover` on whatever a touch last tapped. Inside this query a touch screen\n// draws no hover at all; a touchscreen laptop still matches it for its\n// trackpad.\nconst HOVER_CAPABLE = '@media (hover: hover)';\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 rowStyles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf xs5hli\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n kzqmXN: \"xh8yej3\",\n k8WAf4: \"x1uvvd8r\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n k9WMMc: \"x1yc453h\",\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n disabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n kAXs8y: \"xr5dkdi\",\n $$css: true\n },\n dragging: {\n kWkggS: \"x14s9m32\",\n kKwaWg: \"xdiex0u\",\n kGVxlE: \"x4r79n0\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n drawer: {\n kaIpWk: \"x1dkaolv\",\n kzqmXN: \"x14atkfc\",\n kUOVxO: \"xd2r6sq\",\n kAzted: \"xyax5pk\",\n $$css: true\n },\n dropTarget: {\n kKwaWg: \"xu73ib2\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n focusVisible: {\n kKwaWg: \"x17vw94z\",\n kjBf7l: \"xrgy624 x1v8yhc2\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n headlineEmphasis: {\n k63SB2: \"x1sfltvt\",\n $$css: true\n },\n headlineList: {\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n headlineMenu: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n hovered: {\n kKwaWg: \"xbmfk57\",\n kkrTdU: \"x1ypdohk\",\n $$css: true\n },\n interactive: {\n kkrTdU: \"x1ypdohk\",\n kVVagm: \"xln7xf2\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n interactiveLayers: {\n kWkggS: \"x83qkoq x1yl1wq7 xjqqt44 xjbqb8w\",\n $$css: true\n },\n list: {\n kAzted: \"xyax5pk\",\n $$css: true\n },\n main: {\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kzQI83: \"x1iyjqo2\",\n kOIVth: \"x14qo01y\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n },\n menu: {\n kAzted: \"x1ddmzdj\",\n $$css: true\n },\n overline: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xs1w0rn\",\n kGuDYH: \"x1n35her\",\n k63SB2: \"x1su64ma\",\n kb6lSQ: \"xdlnduh\",\n kLWn49: \"xaomhve\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n pressed: {\n kKwaWg: \"xdiex0u\",\n $$css: true\n },\n selectedDrawer: {\n kWkggS: \"x15dekr4 x1jzqe4\",\n kMwMTN: \"x1sawysd x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selectedList: {\n kWkggS: \"xp89om9 x1jzqe4\",\n kMwMTN: \"xscdzaa x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selectedMenu: {\n kWkggS: \"xs6yvni x1jzqe4\",\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n slot: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n supporting: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xpo2rfv\",\n kGuDYH: \"x193rfdd\",\n k63SB2: \"x1hews6w\",\n kb6lSQ: \"xn43zvd\",\n kLWn49: \"xv61bfh\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n supportingInherit: {\n kMwMTN: \"x1heor9g\",\n $$css: true\n },\n supportingSelectedDrawer: {\n kMwMTN: \"x1sawysd x1k5gbb1\",\n $$css: true\n },\n supportingSelectedList: {\n kMwMTN: \"xscdzaa x1k5gbb1\",\n $$css: true\n },\n supportingSelectedMenu: {\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n $$css: true\n },\n threeLine: {\n kGNEyG: \"x1cy8zhl\",\n kAzted: \"x1bt55z4\",\n $$css: true\n },\n twoLine: {\n kAzted: \"x304zwk\",\n $$css: true\n }\n};\nexport { rowStyles };"],"mappings":";AAiDA,MAAMU,YAAY;CAChBC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,Q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;EACR8B,QAAQ;EACRC,QAAQ;EACRH,QAAQ;EACRI,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRzB,OAAO;CACT;CACAsC,SAAS;EACPjC,QAAQ;EACRL,OAAO;CACT;CACAuC,gBAAgB;EACdnD,QAAQ;EACRG,QAAQ;EACRY,QAAQ;EACRH,OAAO;CACT;CACAwC,cAAc;EACZpD,QAAQ;EACRG,QAAQ;EACRY,QAAQ;EACRH,OAAO;CACT;CACAyC,cAAc;EACZrD,QAAQ;EACRG,QAAQ;EACRY,QAAQ;EACRH,OAAO;CACT;CACA0C,MAAM;EACJvD,QAAQ;EACRK,QAAQ;EACRmD,OAAO;EACP3C,OAAO;CACT;CACA4C,YAAY;EACVrD,QAAQ;EACR8B,QAAQ;EACRC,QAAQ;EACRH,QAAQ;EACRI,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRzB,OAAO;CACT;CACA6C,mBAAmB;EACjBtD,QAAQ;EACRS,OAAO;CACT;CACA8C,0BAA0B;EACxBvD,QAAQ;EACRS,OAAO;CACT;CACA+C,wBAAwB;EACtBxD,QAAQ;EACRS,OAAO;CACT;CACAgD,wBAAwB;EACtBzD,QAAQ;EACRS,OAAO;CACT;CACAiD,WAAW;EACT9D,QAAQ;EACRwB,QAAQ;EACRX,OAAO;CACT;CACAkD,SAAS;EACPvC,QAAQ;EACRX,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"styles.js","names":["stylex","RowVariant","colors","radii","shadows","sizing","spacing","stateLayerOpacity","typography","HOVER_CAPABLE","FORCED_COLORS","rowStyles","base","kGNEyG","kWkggS","kMzoRj","kB7OPa","kMwMTN","k1xSpc","kOIVth","kzqmXN","k8WAf4","kg3NbH","kVAEAm","k9WMMc","kMnn75","$$css","disabled","kkrTdU","kAXs8y","dragging","kKwaWg","kGVxlE","kY2c9j","drawer","kaIpWk","kUOVxO","kAzted","drawerSurface","dropTarget","kjBf7l","kInvED","k3XXqK","kMeerF","focusVisible","headlineEmphasis","k63SB2","headlineList","kMv6JI","kGuDYH","kb6lSQ","kLWn49","kHjlTd","headlineMenu","hovered","interactive","kVVagm","interactiveLayers","list","main","kXwgrk","kzQI83","k7Eaqz","menu","overline","pressed","selectedDrawer","selectedList","selectedMenu","slot","kmuXW","supporting","supportingInherit","supportingSelectedDrawer","supportingSelectedList","supportingSelectedMenu","threeLine","twoLine","supportingTone","variant","isDisabled","isSelected"],"sources":["../../src/row/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport type { RowVariant } from '.';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The row every list draws: ListItem's, and from here on the item of every\n// collection the coverage plan adds — ListBox, Menu, List, Tree, the options\n// of Select and ComboBox. Apart from the RowContent component in ./index.tsx\n// so that file exports components alone, which is what keeps fast refresh\n// working for it.\n//\n// Three variants, because three spec pages draw three rows. The lists page\n// gives a list item a 56dp floor, a body-large headline and a body-medium\n// supporting line, and primary container when selected. The menus page gives\n// a menu item 48dp, a label-large label, and tertiary container when\n// selected. The navigation drawer page gives its row 56dp too, with a\n// label-large label like a menu's, and marks the current one with a\n// secondary-container pill held 12dp off each edge — 336dp of indicator in a\n// 360dp container, which is what that inset comes to. The layout, the\n// padding, the state layers and the disabled treatment are one row; `list`,\n// `menu` and `drawer` carry only what the three pages disagree on, and a\n// consumer applies one of them beside `base`.\n//\n// Laid out with flex rather than the grid the design draws. The design's\n// three columns are `auto 1fr auto`, which is what flex does natively — and\n// unlike a fixed three-column grid it stays correct when a row has no leading\n// or no trailing content, where the remaining children would otherwise slide\n// into the wrong columns.\n//\n// Rows align with each other through their leading content being the same\n// size, not through a fixed column width: a list of Avatars all at one size\n// lines up, and that is the same thing the design's 40px column achieves.\n//\n// The state layer composites over `transparent` rather than over a container\n// colour, because a row's own background is transparent and it therefore\n// tints whatever it happens to be sitting on — a card, a menu, or the page.\n// The two selected states are the ones that bring a container of their own.\n\n// A pointer that can hover, for `interactiveLayers` — a plain element with no\n// render state, so its hover layer is a pseudo-class, and Chromium leaves\n// `:hover` on whatever a touch last tapped. Inside this query a touch screen\n// draws no hover at all; a touchscreen laptop still matches it for its\n// trackpad.\nconst HOVER_CAPABLE = '@media (hover: hover)';\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 rowStyles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf xs5hli\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n kzqmXN: \"xh8yej3\",\n k8WAf4: \"x1uvvd8r\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n k9WMMc: \"x1yc453h\",\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n disabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n kAXs8y: \"xr5dkdi\",\n $$css: true\n },\n dragging: {\n kWkggS: \"x14s9m32\",\n kKwaWg: \"xdiex0u\",\n kGVxlE: \"x4r79n0\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n drawer: {\n kaIpWk: \"x1dkaolv\",\n kzqmXN: \"x14atkfc\",\n kUOVxO: \"xd2r6sq\",\n kAzted: \"xyax5pk\",\n $$css: true\n },\n drawerSurface: {\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"xjp7ctv\",\n $$css: true\n },\n dropTarget: {\n kKwaWg: \"xu73ib2\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n focusVisible: {\n kKwaWg: \"x17vw94z\",\n kjBf7l: \"xrgy624 x1v8yhc2\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n headlineEmphasis: {\n k63SB2: \"x1sfltvt\",\n $$css: true\n },\n headlineList: {\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n headlineMenu: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n hovered: {\n kKwaWg: \"xbmfk57\",\n kkrTdU: \"x1ypdohk\",\n $$css: true\n },\n interactive: {\n kkrTdU: \"x1ypdohk\",\n kVVagm: \"xln7xf2\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n interactiveLayers: {\n kWkggS: \"x83qkoq x1yl1wq7 xjqqt44 xjbqb8w\",\n $$css: true\n },\n list: {\n kAzted: \"xyax5pk\",\n $$css: true\n },\n main: {\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kzQI83: \"x1iyjqo2\",\n kOIVth: \"x14qo01y\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n },\n menu: {\n kAzted: \"x1ddmzdj\",\n $$css: true\n },\n overline: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xs1w0rn\",\n kGuDYH: \"x1n35her\",\n k63SB2: \"x1su64ma\",\n kb6lSQ: \"xdlnduh\",\n kLWn49: \"xaomhve\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n pressed: {\n kKwaWg: \"xdiex0u\",\n $$css: true\n },\n selectedDrawer: {\n kWkggS: \"x15dekr4 x1jzqe4\",\n kMwMTN: \"x1sawysd x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selectedList: {\n kWkggS: \"xp89om9 x1jzqe4\",\n kMwMTN: \"xscdzaa x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selectedMenu: {\n kWkggS: \"xs6yvni x1jzqe4\",\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n slot: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n supporting: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xpo2rfv\",\n kGuDYH: \"x193rfdd\",\n k63SB2: \"x1hews6w\",\n kb6lSQ: \"xn43zvd\",\n kLWn49: \"xv61bfh\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n supportingInherit: {\n kMwMTN: \"x1heor9g\",\n $$css: true\n },\n supportingSelectedDrawer: {\n kMwMTN: \"x1sawysd x1k5gbb1\",\n $$css: true\n },\n supportingSelectedList: {\n kMwMTN: \"xscdzaa x1k5gbb1\",\n $$css: true\n },\n supportingSelectedMenu: {\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n $$css: true\n },\n threeLine: {\n kGNEyG: \"x1cy8zhl\",\n kAzted: \"x1bt55z4\",\n $$css: true\n },\n twoLine: {\n kAzted: \"x304zwk\",\n $$css: true\n }\n};\n\n/**\n * The tone a row's muted text takes over its own muted style: the supporting\n * line and the overline, and a menu item's shortcut. Nothing while the row is\n * drawn on the surface, where the muted style's on surface variant holds;\n * the selected container's own on-colour while selected; and the row's own\n * colour while disabled. Disabled is asked first, since a disabled row's own\n * colour is already the faded one and so wins over the selected container's\n * content role. One function for every caller, so a shortcut and the\n * supporting line beside it cannot come to disagree.\n */\nfunction supportingTone(variant: RowVariant, {\n isDisabled,\n isSelected\n}: {\n isDisabled: boolean;\n isSelected: boolean;\n}) {\n if (isDisabled) {\n return rowStyles.supportingInherit;\n }\n if (!isSelected) {\n return null;\n }\n // Each variant's container is a different colour family, and the muted\n // role is not guaranteed to be readable over any of them.\n if (variant === 'drawer') {\n return rowStyles.supportingSelectedDrawer;\n }\n if (variant === 'menu') {\n return rowStyles.supportingSelectedMenu;\n }\n return rowStyles.supportingSelectedList;\n}\nexport { rowStyles, supportingTone };"],"mappings":";AAkDA,MAAMW,YAAY;CAChBC,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,OAAO;CACT;CACAC,UAAU;EACRb,QAAQ;EACRG,QAAQ;EACRW,QAAQ;EACRC,QAAQ;EACRH,OAAO;CACT;CACAI,UAAU;EACRhB,QAAQ;EACRiB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,OAAO;CACT;CACAQ,QAAQ;EACNC,QAAQ;EACRf,QAAQ;EACRgB,QAAQ;EACRC,QAAQ;EACRX,OAAO;CACT;CACAY,eAAe;EACbH,QAAQ;EACRnB,QAAQ;EACRE,QAAQ;EACRQ,OAAO;CACT;CACAa,YAAY;EACVR,QAAQ;EACRS,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRjB,OAAO;CACT;CACAkB,cAAc;EACZb,QAAQ;EACRS,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRjB,OAAO;CACT;CACAmB,kBAAkB;EAChBC,QAAQ;EACRpB,OAAO;CACT;CACAqB,cAAc;EACZC,QAAQ;EACRC,QAAQ;EACRH,QAAQ;EACRI,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACR1B,OAAO;CACT;CACA2B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RS,OAAO;CACT;CACAiD,wBAAwB;EACtB1D,QAAQ;EACRS,OAAO;CACT;CACAkD,WAAW;EACT/D,QAAQ;EACRwB,QAAQ;EACRX,OAAO;CACT;CACAmD,SAAS;EACPxC,QAAQ;EACRX,OAAO;CACT;AACF;;;;;;;;;;;AAYA,SAASoD,eAAeC,SAAqB,EAC3CC,YACAC,cAIC;CACD,IAAID,YACF,OAAOrE,UAAU6D;CAEnB,IAAI,CAACS,YACH,OAAO;CAIT,IAAIF,YAAY,UACd,OAAOpE,UAAU8D;CAEnB,IAAIM,YAAY,QACd,OAAOpE,UAAUgE;CAEnB,OAAOhE,UAAU+D;AACnB"}
@@ -2,8 +2,12 @@ import { PopoverRenderProps } from "react-aria-components";
2
2
  //#region src/styles/overlay.d.ts
3
3
  /** Where along that side it lines up with the anchor. */
4
4
  type OverlayAlign = 'center' | 'end' | 'start';
5
- /** Which side of the anchor a surface opens on. */
6
- type OverlaySide = 'bottom' | 'left' | 'right' | 'top';
5
+ /**
6
+ * Which side of the anchor a surface opens on. `start` and `end` are the
7
+ * inline sides by the writing direction, the right and the left in a
8
+ * right-to-left layout; `left` and `right` stay where they are in either.
9
+ */
10
+ type OverlaySide = 'bottom' | 'end' | 'left' | 'right' | 'start' | 'top';
7
11
  //#endregion
8
12
  export type { OverlayAlign, OverlaySide };
9
13
  //# sourceMappingURL=overlay.d.ts.map
@@ -65,6 +65,11 @@ const overlay = {
65
65
  kVAEAm: "xixxii4",
66
66
  kY2c9j: "x125h2g0",
67
67
  $$css: true
68
+ },
69
+ scrimOverModal: {
70
+ kKVMdj: "x1a5igra",
71
+ kWkggS: "xjbqb8w",
72
+ $$css: true
68
73
  }
69
74
  };
70
75
  const origins = {
@@ -78,7 +83,10 @@ const origins = {
78
83
  * React Aria's placement, from the side and the alignment a call site names.
79
84
  * Its own vocabulary pairs a side with `top`/`bottom` on the inline sides and
80
85
  * `start`/`end` on the block ones; a call site should not have to know which
81
- * of the two it is asking for, so this maps one onto the other.
86
+ * of the two it is asking for, so this maps one onto the other. The inline
87
+ * sides take in `start` and `end`, which React Aria turns into the left or
88
+ * the right by the locale's direction as it places the surface, so what it
89
+ * reports, and what `popupOrigin` reads, is always a physical side.
82
90
  *
83
91
  * Shared by every anchored overlay rather than kept in one, since which side
84
92
  * a surface opens on is the same question for a popover, a menu and a
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.js","names":["PopoverRenderProps","stylex","colors","motion","radii","shadows","spacing","layers","FORCED_COLORS","fadeIn","scaleIn","overlay","fromBottom","k3nNDw","$$css","fromLeft","fromRight","fromTop","modalBodyRing","kjBf7l","kInvED","k3XXqK","kMeerF","modalDialog","kZKoxP","kB7OPa","k1xSpc","kXwgrk","kAzted","popup","k44tkh","kKVMdj","kyAemX","kWkggS","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kGVxlE","kMwMTN","kORKVm","kZeWKH","popupDialog","kOIVth","scrim","kpwlN0","kVAEAm","kY2c9j","origins","bottom","center","left","right","top","OverlayAlign","OverlaySide","placementOf","side","align","const","popupOrigin","placement"],"sources":["../../src/styles/overlay.ts"],"sourcesContent":["import type { PopoverRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, spacing } from '../tokens/design.tokens.stylex';\nimport './layers.stylex';\nimport { layers } from './layers.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// What every overlay shares, drawn once. Popover's anchored surface and its\n// entry, Sheet's scrim, and the element that carries the dialog role inside\n// each of them; the coverage plan brings a dozen more overlays — Menu, Select,\n// ComboBox, Tooltip, the date pickers, Dialog — and each would otherwise have\n// written the same surface and the same scrim a second time. Geometry stays\n// with the component: how wide a popover is, which edge a sheet is pinned to,\n// where a dialog sits, are each overlay's own decision.\n//\n// Every one of these is portalled to the end of the body, which is why each\n// component takes a `container` prop and documents the same caveat: an app\n// that scopes its StyleX theme to a subtree has to point the portal inside it,\n// or the surface renders outside the theme and falls back to the tokens'\n// `prefers-color-scheme` default.\n//\n// Portalled to the end of the body, an element with no `z-index` paints level\n// with the page's own unlayered content, so a modal's scrim takes a layer\n// from src/styles/layers.stylex.ts, which sets the order every overlay\n// stacks in over the page.\n//\n// Entry only, and no exit animation, for the same reason in every overlay:\n// React Aria keeps a closing surface mounted only while an animation is\n// running on it, and a popover in particular is dismissed far more often than\n// it is closed deliberately — usually by pressing something else, where a\n// lingering surface is in the way of whatever the press was for.\n\n// The scrim settles before the panel it sits behind arrives: shorter than\n// any panel's entry, so the two do not finish together.\nconst fadeIn = \"x18re5ia-B\";\n\n// An anchored surface grows from the edge it is anchored by rather than from\n// its own centre, which is what makes it read as coming out of the trigger.\n// The origin is a separate style, chosen from the placement React Aria\n// reports, so the same keyframes serve all four sides.\nconst scaleIn = \"x1k48ry3-B\";\nconst overlay = {\n fromBottom: {\n k3nNDw: \"x18ouj0k\",\n $$css: true\n },\n fromLeft: {\n k3nNDw: \"x1nf803f\",\n $$css: true\n },\n fromRight: {\n k3nNDw: \"xyibjs4\",\n $$css: true\n },\n fromTop: {\n k3nNDw: \"x1dp6rp6\",\n $$css: true\n },\n modalBodyRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n modalDialog: {\n kZKoxP: \"x5yr21d\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kAzted: \"x2lwn1j\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n popup: {\n k44tkh: \"xvhm28k x1u6grsq\",\n kKVMdj: \"x97zbip\",\n kyAemX: \"x16dv9tl\",\n kWkggS: \"x1mjdul6\",\n kVAM5u: \"x1w1tqly\",\n kaIpWk: \"x62ce2h\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kGVxlE: \"x1os83gw\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kORKVm: \"x1odjw0f\",\n kZeWKH: \"xish69e\",\n $$css: true\n },\n popupDialog: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x126z3so\",\n $$css: true\n },\n scrim: {\n k44tkh: \"x1vhuh8u\",\n kKVMdj: \"xqcmdr3\",\n kyAemX: \"x1yujl0p\",\n kWkggS: \"x1iqbvzf\",\n kB7OPa: \"x9f619\",\n kpwlN0: \"x10a8y8t\",\n kVAEAm: \"xixxii4\",\n kY2c9j: \"x125h2g0\",\n $$css: true\n }\n};\n\n// Which side the surface opened on, and the origin its entry grows from.\n// Keyed on the placement React Aria reports rather than the one asked for,\n// since the surface flips to the opposite side when there is no room on its\n// own; `center` is the placement React Aria reports for an anchor it could\n// not place beside, and grows from the top like the default.\nconst origins = {\n bottom: overlay.fromTop,\n center: overlay.fromTop,\n left: overlay.fromRight,\n right: overlay.fromLeft,\n top: overlay.fromBottom\n};\n\n/** Where along that side it lines up with the anchor. */\ntype OverlayAlign = 'center' | 'end' | 'start';\n\n/** Which side of the anchor a surface opens on. */\ntype OverlaySide = 'bottom' | 'left' | 'right' | 'top';\n\n/**\n * React Aria's placement, from the side and the alignment a call site names.\n * Its own vocabulary pairs a side with `top`/`bottom` on the inline sides and\n * `start`/`end` on the block ones; a call site should not have to know which\n * of the two it is asking for, so this maps one onto the other.\n *\n * Shared by every anchored overlay rather than kept in one, since which side\n * a surface opens on is the same question for a popover, a menu and a\n * tooltip.\n */\nfunction placementOf(side: OverlaySide, align: OverlayAlign) {\n if (align === 'center') {\n return side;\n }\n if (side === 'top' || side === 'bottom') {\n return `${side} ${align}` as const;\n }\n return `${side} ${align === 'start' ? 'top' : 'bottom'}` as const;\n}\n\n/**\n * The origin an anchored surface grows from, for the placement React Aria\n * reports through its render state. `null`, before the surface has been\n * placed, grows from the top as `bottom` does.\n */\nfunction popupOrigin(placement: PopoverRenderProps['placement']) {\n return origins[placement ?? 'bottom'];\n}\nexport type { OverlayAlign, OverlaySide };\nexport { overlay, placementOf, popupOrigin };"],"mappings":";AA+CA,MAAMW,UAAU;CACdC,YAAY;EACVC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRF,QAAQ;EACRC,OAAO;CACT;CACAE,WAAW;EACTH,QAAQ;EACRC,OAAO;CACT;CACAG,SAAS;EACPJ,QAAQ;EACRC,OAAO;CACT;CACAI,eAAe;EACbC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRR,OAAO;CACT;CACAS,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRP,OAAO;CACT;CACAe,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRb,QAAQ;EACRc,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACR3B,OAAO;CACT;CACA4B,aAAa;EACXjB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRgB,QAAQ;EACR7B,OAAO;CACT;CACA8B,OAAO;EACLd,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRR,QAAQ;EACRoB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRjC,OAAO;CACT;AACF;AAOA,MAAMkC,UAAU;CACdC,QAAQtC,QAAQM;CAChBiC,QAAQvC,QAAQM;CAChBkC,MAAMxC,QAAQK;CACdoC,OAAOzC,QAAQI;CACfsC,KAAK1C,QAAQC;AACf;;;;;;;;;;;AAkBA,SAAS4C,YAAYC,MAAmBC,OAAqB;CAC3D,IAAIA,UAAU,UACZ,OAAOD;CAET,IAAIA,SAAS,SAASA,SAAS,UAC7B,OAAO,GAAGA,KAAI,GAAIC;CAEpB,OAAO,GAAGD,KAAI,GAAIC,UAAU,UAAU,QAAQ;AAChD;;;;;;AAOA,SAASE,YAAYC,WAA4C;CAC/D,OAAOb,QAAQa,aAAa;AAC9B"}
1
+ {"version":3,"file":"overlay.js","names":["PopoverRenderProps","stylex","colors","motion","radii","shadows","spacing","layers","FORCED_COLORS","fadeIn","scaleIn","overlay","fromBottom","k3nNDw","$$css","fromLeft","fromRight","fromTop","modalBodyRing","kjBf7l","kInvED","k3XXqK","kMeerF","modalDialog","kZKoxP","kB7OPa","k1xSpc","kXwgrk","kAzted","popup","k44tkh","kKVMdj","kyAemX","kWkggS","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kGVxlE","kMwMTN","kORKVm","kZeWKH","popupDialog","kOIVth","scrim","kpwlN0","kVAEAm","kY2c9j","scrimOverModal","origins","bottom","center","left","right","top","OverlayAlign","OverlaySide","placementOf","side","align","const","popupOrigin","placement"],"sources":["../../src/styles/overlay.ts"],"sourcesContent":["import type { PopoverRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, spacing } from '../tokens/design.tokens.stylex';\nimport './layers.stylex';\nimport { layers } from './layers.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// What every overlay shares, drawn once. Popover's anchored surface and its\n// entry, Sheet's scrim, and the element that carries the dialog role inside\n// each of them; the coverage plan brings a dozen more overlays — Menu, Select,\n// ComboBox, Tooltip, the date pickers, Dialog — and each would otherwise have\n// written the same surface and the same scrim a second time. Geometry stays\n// with the component: how wide a popover is, which edge a sheet is pinned to,\n// where a dialog sits, are each overlay's own decision.\n//\n// Every one of these is portalled to the end of the body, which is why each\n// component takes a `container` prop and documents the same caveat: an app\n// that scopes its StyleX theme to a subtree has to point the portal inside it,\n// or the surface renders outside the theme and falls back to the tokens'\n// `prefers-color-scheme` default.\n//\n// Portalled to the end of the body, an element with no `z-index` paints level\n// with the page's own unlayered content, so a modal's scrim takes a layer\n// from src/styles/layers.stylex.ts, which sets the order every overlay\n// stacks in over the page.\n//\n// Entry only, and no exit animation, for the same reason in every overlay:\n// React Aria keeps a closing surface mounted only while an animation is\n// running on it, and a popover in particular is dismissed far more often than\n// it is closed deliberately — usually by pressing something else, where a\n// lingering surface is in the way of whatever the press was for.\n\n// The scrim settles before the panel it sits behind arrives: shorter than\n// any panel's entry, so the two do not finish together.\nconst fadeIn = \"x18re5ia-B\";\n\n// An anchored surface grows from the edge it is anchored by rather than from\n// its own centre, which is what makes it read as coming out of the trigger.\n// The origin is a separate style, chosen from the placement React Aria\n// reports, so the same keyframes serve all four sides.\nconst scaleIn = \"x1k48ry3-B\";\nconst overlay = {\n fromBottom: {\n k3nNDw: \"x18ouj0k\",\n $$css: true\n },\n fromLeft: {\n k3nNDw: \"x1nf803f\",\n $$css: true\n },\n fromRight: {\n k3nNDw: \"xyibjs4\",\n $$css: true\n },\n fromTop: {\n k3nNDw: \"x1dp6rp6\",\n $$css: true\n },\n modalBodyRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n modalDialog: {\n kZKoxP: \"x5yr21d\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kAzted: \"x2lwn1j\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n popup: {\n k44tkh: \"xvhm28k x1u6grsq\",\n kKVMdj: \"x97zbip\",\n kyAemX: \"x16dv9tl\",\n kWkggS: \"x1mjdul6\",\n kVAM5u: \"x1w1tqly\",\n kaIpWk: \"x62ce2h\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kGVxlE: \"x1os83gw\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kORKVm: \"x1odjw0f\",\n kZeWKH: \"xish69e\",\n $$css: true\n },\n popupDialog: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x126z3so\",\n $$css: true\n },\n scrim: {\n k44tkh: \"x1vhuh8u\",\n kKVMdj: \"xqcmdr3\",\n kyAemX: \"x1yujl0p\",\n kWkggS: \"x1iqbvzf\",\n kB7OPa: \"x9f619\",\n kpwlN0: \"x10a8y8t\",\n kVAEAm: \"xixxii4\",\n kY2c9j: \"x125h2g0\",\n $$css: true\n },\n scrimOverModal: {\n kKVMdj: \"x1a5igra\",\n kWkggS: \"xjbqb8w\",\n $$css: true\n }\n};\n\n// Which side the surface opened on, and the origin its entry grows from.\n// Keyed on the placement React Aria reports rather than the one asked for,\n// since the surface flips to the opposite side when there is no room on its\n// own; `center` is the placement React Aria reports for an anchor it could\n// not place beside, and grows from the top like the default.\nconst origins = {\n bottom: overlay.fromTop,\n center: overlay.fromTop,\n left: overlay.fromRight,\n right: overlay.fromLeft,\n top: overlay.fromBottom\n};\n\n/** Where along that side it lines up with the anchor. */\ntype OverlayAlign = 'center' | 'end' | 'start';\n\n/**\n * Which side of the anchor a surface opens on. `start` and `end` are the\n * inline sides by the writing direction, the right and the left in a\n * right-to-left layout; `left` and `right` stay where they are in either.\n */\ntype OverlaySide = 'bottom' | 'end' | 'left' | 'right' | 'start' | 'top';\n\n/**\n * React Aria's placement, from the side and the alignment a call site names.\n * Its own vocabulary pairs a side with `top`/`bottom` on the inline sides and\n * `start`/`end` on the block ones; a call site should not have to know which\n * of the two it is asking for, so this maps one onto the other. The inline\n * sides take in `start` and `end`, which React Aria turns into the left or\n * the right by the locale's direction as it places the surface, so what it\n * reports, and what `popupOrigin` reads, is always a physical side.\n *\n * Shared by every anchored overlay rather than kept in one, since which side\n * a surface opens on is the same question for a popover, a menu and a\n * tooltip.\n */\nfunction placementOf(side: OverlaySide, align: OverlayAlign) {\n if (align === 'center') {\n return side;\n }\n if (side === 'top' || side === 'bottom') {\n return `${side} ${align}` as const;\n }\n return `${side} ${align === 'start' ? 'top' : 'bottom'}` as const;\n}\n\n/**\n * The origin an anchored surface grows from, for the placement React Aria\n * reports through its render state. `null`, before the surface has been\n * placed, grows from the top as `bottom` does.\n */\nfunction popupOrigin(placement: PopoverRenderProps['placement']) {\n return origins[placement ?? 'bottom'];\n}\nexport type { OverlayAlign, OverlaySide };\nexport { overlay, placementOf, popupOrigin };"],"mappings":";AA+CA,MAAMW,UAAU;CACdC,YAAY;EACVC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRF,QAAQ;EACRC,OAAO;CACT;CACAE,WAAW;EACTH,QAAQ;EACRC,OAAO;CACT;CACAG,SAAS;EACPJ,QAAQ;EACRC,OAAO;CACT;CACAI,eAAe;EACbC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRR,OAAO;CACT;CACAS,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRP,OAAO;CACT;CACAe,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRb,QAAQ;EACRc,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACR3B,OAAO;CACT;CACA4B,aAAa;EACXjB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRgB,QAAQ;EACR7B,OAAO;CACT;CACA8B,OAAO;EACLd,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRR,QAAQ;EACRoB,QAAQ;EACRC,QAAQ;EACRC,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