@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","motion","radii","spacing","typography","THICKNESS","GAP","DETERMINATE_EASING","IndicatorTone","FORCED_COLORS","_temp","kzqmXN","indicatorStyles","active","k6CgDc","kWkggS","kZKoxP","kaIpWk","kB7OPa","kmuXW","kIyJzY","k1ekBW","kAMwcw","$$css","activeAt","percentage","val","undefined","inheritActive","kjVXCG","inheritTrack","label","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","labels","kGNEyG","k1xSpc","kOIVth","kjj79g","labelText","k7Eaqz","kHjlTd","line","negativeActive","positiveActive","root","kXwgrk","stop","track","kzQI83","kjBf7l","kInvED","k3XXqK","kMeerF","kVQacm","trackSolid","value","keTefX","khDVqt"],"sources":["../../src/indicator/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, typography } from '../tokens/design.tokens.stylex';\n\n// The line the progress indicators page draws, and the label row above it,\n// shared by the two components that draw one: ProgressIndicator, which adds\n// the ring and the two indeterminate presentations on top, and Meter, which\n// is this and nothing else.\n//\n// The page's anatomy names three parts — the active indicator in primary,\n// the track in secondary container, and the stop indicator in primary at the\n// end — at 4dp thick with 4dp between them. The row is a flex line and the\n// two gaps are its `gap`. The active indicator takes the value's share of\n// what the two gaps and the stop leave, and the track takes the rest, so the\n// stop ends the row at every value.\n//\n// Under forced colours every part here is a background, which that mode\n// paints in a system colour, so the line drew nothing at all. The active\n// indicator and the stop take `Highlight` there, as the slider's filled part\n// does, and the track keeps a `CanvasText` edge, drawn as an outline inside\n// it so it takes no room from the line.\n//\n// `tone` is the line's colour. `primary` is the page's own pair, and it is\n// what a progress indicator draws. `negative` and `positive` swap the active\n// indicator and the stop indicator alone, leaving the track in secondary\n// container, so a column of meters reads as one scale with bars of different\n// colours rather than as several unrelated gauges. `inherit` instead takes\n// the colour around it for both, and gives the track a quarter of it, which\n// is what makes a ring legible inside a filled button, where the page's\n// primary is the button's own fill.\n//\n// Apart from ./index.tsx so that file exports components alone, which is\n// what keeps fast refresh working for it.\n\n/** The thickness of every part, and the room the page leaves between them. */\nexport const THICKNESS = 4;\nexport const GAP = 4;\n\n/**\n * What the page gives a value that changes to move over. The duration is the\n * motion scale's own step rather than a constant beside it — src/tokens/\n * values.ts keeps a number in JS only where one has to reach\n * `element.animate()` or a timer, and nothing here does.\n */\nexport const DETERMINATE_EASING = 'cubic-bezier(0.4, 0, 0.6, 1)';\nexport type IndicatorTone = 'inherit' | 'negative' | 'positive' | 'primary';\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 _temp = {\n kzqmXN: \"x1uyokj7\",\n \"$$css\": true\n};\nexport const indicatorStyles = {\n active: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89 x1jzqe4\",\n kZKoxP: \"x5yr21d\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kmuXW: \"x2lah0s\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"x1j4rzew\",\n kAMwcw: \"x16pyfke\",\n $$css: true\n },\n activeAt: (percentage: number) => [_temp, {\n \"--x-inlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(`calc((100% - ${GAP * 2 + THICKNESS}px) * ${percentage / 100})`)\n }],\n inheritActive: {\n kWkggS: \"xtwfq29 x1jzqe4\",\n kjVXCG: \"x73je2i xbabvq0\",\n $$css: true\n },\n inheritTrack: {\n kWkggS: \"xtp5tyh\",\n kjVXCG: \"xy3ggvv x8jos32\",\n $$css: true\n },\n label: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n labels: {\n kGNEyG: \"x1pha0wt\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x126z3so\",\n kjj79g: \"x1qughib\",\n $$css: true\n },\n labelText: {\n k7Eaqz: \"xeuugli\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n line: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xqu0tyb\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x1jnr06f\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n negativeActive: {\n kWkggS: \"xmjwayr x1jzqe4\",\n $$css: true\n },\n positiveActive: {\n kWkggS: \"x1xov01w x1jzqe4\",\n $$css: true\n },\n root: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"xzoy561\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n stop: {\n kWkggS: \"xnety89 x1jzqe4\",\n kZKoxP: \"xqu0tyb\",\n kaIpWk: \"x16fbrrb\",\n kB7OPa: \"x9f619\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x51ohtg\",\n $$css: true\n },\n track: {\n kZKoxP: \"x5yr21d\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n kjBf7l: \"x3teovq\",\n kInvED: \"xvr1dqx\",\n k3XXqK: \"x815t2r\",\n kMeerF: \"xcthrzx\",\n kVQacm: \"xb3r6kr\",\n $$css: true\n },\n trackSolid: {\n kWkggS: \"x15dekr4\",\n $$css: true\n },\n value: {\n kmuXW: \"x2lah0s\",\n keTefX: \"xvc5jky\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n }\n};"],"mappings":";AAoDA,MAAMW,QAAQ;CACZC,QAAQ;CACR,SAAS;AACX;AACA,MAAaC,kBAAkB;CAC7BC,QAAQ;EACNC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,WAAWC,eAAuB,CAACf,OAAO,EACxC,oBAAmBgB,QAAO,OAAO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"version":3,"file":"styles.js","names":["stylex","colors","motion","radii","spacing","typography","THICKNESS","GAP","DETERMINATE_EASING","IndicatorTone","FORCED_COLORS","_temp","kzqmXN","indicatorStyles","active","k6CgDc","kWkggS","kZKoxP","kaIpWk","kB7OPa","kmuXW","kIyJzY","k1ekBW","kAMwcw","$$css","activeAt","percentage","val","undefined","inheritActive","kjVXCG","inheritTrack","label","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","labels","kGNEyG","k1xSpc","kOIVth","kjj79g","labelText","k7Eaqz","kHjlTd","line","negativeActive","positiveActive","root","kXwgrk","stop","track","kzQI83","kjBf7l","kInvED","k3XXqK","kMeerF","kVQacm","trackSolid","value","keTefX","khDVqt"],"sources":["../../src/indicator/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, typography } from '../tokens/design.tokens.stylex';\n\n// The line the progress indicators page draws, and the label row above it,\n// shared by the two components that draw one: ProgressIndicator, which adds\n// the ring and the two indeterminate presentations on top, and Meter, which\n// is this and nothing else.\n//\n// The page's anatomy names three parts — the active indicator in primary,\n// the track in secondary container, and the stop indicator in primary at the\n// end — at 4dp thick with 4dp between them. The row is a flex line and the\n// two gaps are its `gap`. The active indicator takes the value's share of\n// what the two gaps and the stop leave, and the track takes the rest, so the\n// stop ends the row at every value.\n//\n// Under forced colours every part here is a background, which that mode\n// paints in a system colour, so the line drew nothing at all. The active\n// indicator and the stop take `Highlight` there, as the slider's filled part\n// does, and the track keeps a `CanvasText` edge, drawn as an outline inside\n// it so it takes no room from the line.\n//\n// `tone` is the line's colour. `primary` is the page's own pair, and it is\n// what a progress indicator draws. `negative` and `positive` swap the active\n// indicator and the stop indicator alone, leaving the track in secondary\n// container, so a column of meters reads as one scale with bars of different\n// colours rather than as several unrelated gauges. `inherit` instead takes\n// the colour around it for both, and gives the track a quarter of it, which\n// is what makes a ring legible inside a filled button, where the page's\n// primary is the button's own fill.\n//\n// Apart from ./index.tsx so that file exports components alone, which is\n// what keeps fast refresh working for it.\n\n/** The thickness of every part, and the room the page leaves between them. */\nexport const THICKNESS = 4;\nexport const GAP = 4;\n\n/**\n * What the page gives a value that changes to move over. The duration is the\n * motion scale's own step rather than a constant beside it — src/tokens/\n * values.ts keeps a number in JS only where one has to reach\n * `element.animate()` or a timer, and nothing here does.\n */\nexport const DETERMINATE_EASING = 'cubic-bezier(0.4, 0, 0.6, 1)';\nexport type IndicatorTone = 'inherit' | 'negative' | 'positive' | 'primary';\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 _temp = {\n kzqmXN: \"x1uyokj7\",\n \"$$css\": true\n};\nexport const indicatorStyles = {\n active: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89 x1jzqe4\",\n kZKoxP: \"x5yr21d\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kmuXW: \"x2lah0s\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"x1j4rzew\",\n kAMwcw: \"x16pyfke\",\n $$css: true\n },\n activeAt: (percentage: number) => [_temp, {\n \"--x-inlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(`calc((100% - ${GAP * 2 + THICKNESS}px) * ${percentage / 100})`)\n }],\n inheritActive: {\n kWkggS: \"xtwfq29 x1jzqe4\",\n kjVXCG: \"x73je2i xbabvq0\",\n $$css: true\n },\n inheritTrack: {\n kWkggS: \"xtp5tyh\",\n kjVXCG: \"xy3ggvv x8jos32\",\n $$css: true\n },\n label: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n labels: {\n kGNEyG: \"x1pha0wt\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x126z3so\",\n kjj79g: \"x1qughib\",\n $$css: true\n },\n labelText: {\n k7Eaqz: \"xeuugli\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n line: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xqu0tyb\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x1jnr06f\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n negativeActive: {\n kWkggS: \"xmjwayr x1jzqe4\",\n $$css: true\n },\n positiveActive: {\n kWkggS: \"x1xov01w x1jzqe4\",\n $$css: true\n },\n root: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"xzoy561\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n stop: {\n kWkggS: \"xnety89 x1jzqe4\",\n kZKoxP: \"xqu0tyb\",\n kaIpWk: \"x16fbrrb\",\n kB7OPa: \"x9f619\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x51ohtg\",\n $$css: true\n },\n track: {\n kZKoxP: \"x5yr21d\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n kjBf7l: \"x3teovq\",\n kInvED: \"xvr1dqx\",\n k3XXqK: \"x815t2r\",\n kMeerF: \"xcthrzx\",\n kVQacm: \"xb3r6kr\",\n $$css: true\n },\n trackSolid: {\n kWkggS: \"x15dekr4\",\n $$css: true\n },\n value: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kOIVth: \"x126z3so\",\n keTefX: \"xvc5jky\",\n khDVqt: \"xuxw1ft\",\n $$css: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O;EACLpC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRsB,QAAQ;EACRa,QAAQ;EACRT,QAAQ;EACRU,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRnC,OAAO;CACT;CACAoC,YAAY;EACV5C,QAAQ;EACRQ,OAAO;CACT;CACAqC,OAAO;EACLrB,QAAQ;EACRC,QAAQ;EACRrB,OAAO;EACPsB,QAAQ;EACRoB,QAAQ;EACRC,QAAQ;EACRvC,OAAO;CACT;AACF"}
@@ -0,0 +1,7 @@
1
+ import { createContext } from "react";
2
+ //#region src/keycap/context.ts
3
+ const KeycapToneContext = createContext("neutral");
4
+ //#endregion
5
+ export { KeycapToneContext };
6
+
7
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","names":["createContext","KeycapTone","KeycapToneContext"],"sources":["../../src/keycap/context.ts"],"sourcesContent":["import { createContext } from 'react'\n\n// Whether a Keycap draws in its own colours or in the colour of the text\n// around it. A selected or disabled menu item asks for the second around its\n// shortcut, so a keycap there takes the row's colour onto the selected\n// container and fades with a disabled label, rather than staying dark and\n// boxed on a row that has changed around it. Apart from the component so its\n// module exports components alone, which is what keeps fast refresh working\n// for it.\n\n/** `neutral` is the keycap's own on surface and outline; `inherit` is the\n * colour around it, for its text and its rule alike. */\ntype KeycapTone = 'inherit' | 'neutral'\n\nconst KeycapToneContext = createContext<KeycapTone>('neutral')\n\nexport type { KeycapTone }\n\nexport { KeycapToneContext }\n"],"mappings":";;AAcA,MAAME,oBAAoBF,cAA0B,SAAS"}
@@ -5,10 +5,16 @@ type NavigationItemProps = {
5
5
  /**
6
6
  * A badge on the icon: `true` for the badges page's small dot, a number
7
7
  * for the large badge holding it. The badge is hidden from assistive
8
- * technology, so say what it says in the destination's `aria-label` too —
9
- * "First item, 3 new".
8
+ * technology, so say what it says in `badgeLabel`.
10
9
  */
11
10
  badge?: boolean | number;
11
+ /**
12
+ * What the badge says, in words and in the reader's language — "3 new",
13
+ * or "new" for the dot. It follows the label in the destination's
14
+ * accessible name, "First item 3 new", and is read only while the badge is
15
+ * drawn.
16
+ */
17
+ badgeLabel?: string;
12
18
  /** The destination's name, drawn as its label. */
13
19
  children: ReactNode;
14
20
  /** A function may compute the class from the destination's render state. */
@@ -20,6 +26,14 @@ type NavigationItemProps = {
20
26
  href: string;
21
27
  /** The destination's icon, at the pages' 24dp. */
22
28
  icon: ReactNode;
29
+ /**
30
+ * Whether this is the current destination, in place of matching its
31
+ * `href` against the bar's or the rail's `selectedRoute`. Pass it for a
32
+ * route nested under the destination, `/first/42` under `/first`, which
33
+ * the exact match leaves without a current destination; `false` turns
34
+ * the match off. Left out, the match decides.
35
+ */
36
+ isCurrent?: boolean;
23
37
  /** A function may compute the style from the destination's render state. */
24
38
  style?: LinkProps['style'];
25
39
  } & Omit<LinkProps, 'children' | 'className' | 'href' | 'style'>;
@@ -3,10 +3,12 @@ import { mergeStatefulStyles } from "../styles/merge.js";
3
3
  import { BadgeMarkContext } from "../badge/index.js";
4
4
  import Badge from "../components/badge/index.js";
5
5
  import { focus } from "../styles/focus.js";
6
+ import { useRipple } from "../hooks/useRipple.js";
7
+ import { useClippedTitle } from "../hooks/useClippedTitle.js";
6
8
  import { NavigationContext } from "./context.js";
7
- import { barItemStyles, collapsedItemStyles, crampedBarItemStyles, expandedItemStyles, navigationItemStyles } from "./styles.js";
9
+ import { barItemStyles, collapsedItemStyles, crampedBarItemStyles, expandedItemStyles, navigationItemStyles, navigationListStyles } from "./styles.js";
8
10
  import { c } from "react/compiler-runtime";
9
- import { useContext } from "react";
11
+ import { useContext, useId } from "react";
10
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
11
13
  import { Link } from "react-aria-components";
12
14
  //#region src/navigation/index.tsx
@@ -14,7 +16,9 @@ const FORMS = {
14
16
  bar: barItemStyles,
15
17
  barCramped: {
16
18
  ...collapsedItemStyles,
17
- item: crampedBarItemStyles.item
19
+ item: crampedBarItemStyles.item,
20
+ list: crampedBarItemStyles.list,
21
+ listItem: crampedBarItemStyles.listItem
18
22
  },
19
23
  collapsed: collapsedItemStyles,
20
24
  expanded: expandedItemStyles
@@ -39,9 +43,9 @@ const RINGS = {
39
43
  };
40
44
  function itemClasses(form, isCurrent) {
41
45
  const styles = FORMS[form];
42
- return (state) => props(navigationItemStyles.link, styles.item, isCurrent && styles.itemCurrent, state.isHovered && (isCurrent ? styles.itemHoveredCurrent : styles.itemHovered), state.isFocusVisible && (isCurrent ? styles.itemFocusedCurrent : styles.itemFocused), state.isPressed && (isCurrent ? styles.itemPressedCurrent : styles.itemPressed), state.isFocusVisible && RINGS[form].item, state.isDisabled && navigationItemStyles.itemDisabled);
46
+ return (state) => props(navigationItemStyles.link, navigationItemStyles.fade, styles.item, isCurrent && styles.itemCurrent, state.isHovered && (isCurrent ? styles.itemHoveredCurrent : styles.itemHovered), state.isFocusVisible && (isCurrent ? styles.itemFocusedCurrent : styles.itemFocused), state.isPressed && (isCurrent ? styles.itemPressedCurrent : styles.itemPressed), state.isFocusVisible && RINGS[form].item, state.isDisabled && navigationItemStyles.itemDisabled);
43
47
  }
44
- function itemContent(form, isCurrent, badge, icon, label) {
48
+ function itemContent(form, isCurrent, badge, icon, label, naming, ripple) {
45
49
  const styles = FORMS[form];
46
50
  const glyph = badge === void 0 || badge === false ? icon : /* @__PURE__ */ jsx(BadgeMarkContext, {
47
51
  value: styles.badgeMark,
@@ -50,14 +54,23 @@ function itemContent(form, isCurrent, badge, icon, label) {
50
54
  children: icon
51
55
  })
52
56
  });
53
- return (state) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
54
- ...props(navigationItemStyles.pill, styles.indicator, isCurrent && styles.indicatorCurrent, state.isHovered && (isCurrent ? styles.indicatorHoveredCurrent : styles.indicatorHovered), state.isFocusVisible && (isCurrent ? styles.indicatorFocusedCurrent : styles.indicatorFocused), state.isPressed && (isCurrent ? styles.indicatorPressedCurrent : styles.indicatorPressed), state.isFocusVisible && RINGS[form].indicator, state.isDisabled && navigationItemStyles.itemDisabled),
55
- children: /* @__PURE__ */ jsx("span", {
56
- ...props(navigationItemStyles.icon),
57
- children: glyph
58
- })
59
- }), /* @__PURE__ */ jsx("span", {
60
- ...props(navigationItemStyles.label, styles.label, isCurrent && styles.labelCurrent, state.isDisabled && navigationItemStyles.itemDisabled),
57
+ return (state) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
58
+ ...props(navigationItemStyles.pill, navigationItemStyles.fade, styles.indicator, isCurrent && styles.indicatorCurrent, state.isHovered && (isCurrent ? styles.indicatorHoveredCurrent : styles.indicatorHovered), state.isFocusVisible && (isCurrent ? styles.indicatorFocusedCurrent : styles.indicatorFocused), state.isPressed && (isCurrent ? styles.indicatorPressedCurrent : styles.indicatorPressed), state.isFocusVisible && RINGS[form].indicator, state.isDisabled && navigationItemStyles.itemDisabled),
59
+ children: [
60
+ ripple,
61
+ /* @__PURE__ */ jsx("span", {
62
+ ...props(navigationItemStyles.icon),
63
+ children: glyph
64
+ }),
65
+ naming && /* @__PURE__ */ jsx("span", {
66
+ hidden: true,
67
+ id: naming.badgeId,
68
+ children: naming.badgeLabel
69
+ })
70
+ ]
71
+ }), /* @__PURE__ */ jsx(NavigationLabel, {
72
+ id: naming?.labelId,
73
+ styling: props(navigationItemStyles.label, navigationItemStyles.fade, styles.label, isCurrent && styles.labelCurrent, state.isDisabled && navigationItemStyles.itemDisabled),
61
74
  children: label
62
75
  })] });
63
76
  }
@@ -66,43 +79,131 @@ function itemContent(form, isCurrent, badge, icon, label) {
66
79
  * it is the current one, the active indicator behind them.
67
80
  */
68
81
  function NavigationItem(t0) {
69
- const $ = c(13);
70
- const { badge, children, href, icon, ...props } = t0;
82
+ const $ = c(21);
83
+ const { badge, badgeLabel, children, href, icon, isCurrent: isCurrentProp, onClick, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp, ...props$1 } = t0;
71
84
  const { form, selectedRoute } = useContext(NavigationContext);
72
- const isCurrent = selectedRoute !== void 0 && href === selectedRoute;
85
+ let t1;
86
+ if ($[0] !== onClick || $[1] !== onContextMenu || $[2] !== onPointerCancel || $[3] !== onPointerDown || $[4] !== onPointerLeave || $[5] !== onPointerUp) {
87
+ t1 = {
88
+ onClick,
89
+ onContextMenu,
90
+ onPointerCancel,
91
+ onPointerDown,
92
+ onPointerLeave,
93
+ onPointerUp
94
+ };
95
+ $[0] = onClick;
96
+ $[1] = onContextMenu;
97
+ $[2] = onPointerCancel;
98
+ $[3] = onPointerDown;
99
+ $[4] = onPointerLeave;
100
+ $[5] = onPointerUp;
101
+ $[6] = t1;
102
+ } else t1 = $[6];
103
+ const ripple = useRipple(props$1.isDisabled !== true, t1);
104
+ const isCurrent = isCurrentProp ?? (selectedRoute !== void 0 && href === selectedRoute);
105
+ const labelId = useId();
106
+ const badgeId = useId();
107
+ const naming = badge !== void 0 && badge !== false && badgeLabel !== void 0 && props$1["aria-label"] === void 0 && props$1["aria-labelledby"] === void 0 ? {
108
+ badgeId,
109
+ badgeLabel,
110
+ labelId
111
+ } : void 0;
112
+ let t2;
113
+ if ($[7] !== form) {
114
+ t2 = props(navigationListStyles.item, FORMS[form].listItem);
115
+ $[7] = form;
116
+ $[8] = t2;
117
+ } else t2 = $[8];
73
118
  const T0 = Link;
74
- const t1 = isCurrent ? "page" : void 0;
75
- const t2 = mergeStatefulStyles(itemClasses(form, isCurrent), props);
76
- let t3;
77
- if ($[0] !== badge || $[1] !== children || $[2] !== form || $[3] !== icon || $[4] !== isCurrent) {
78
- t3 = itemContent(form, isCurrent, badge, icon, children);
79
- $[0] = badge;
80
- $[1] = children;
81
- $[2] = form;
82
- $[3] = icon;
83
- $[4] = isCurrent;
84
- $[5] = t3;
85
- } else t3 = $[5];
86
- let t4;
87
- if ($[6] !== T0 || $[7] !== href || $[8] !== props || $[9] !== t1 || $[10] !== t2 || $[11] !== t3) {
88
- t4 = /* @__PURE__ */ jsx(T0, {
89
- "aria-current": t1,
119
+ const t3 = isCurrent ? "page" : void 0;
120
+ const t4 = naming && `${naming.labelId} ${naming.badgeId}`;
121
+ const t5 = ripple.handlers;
122
+ const t6 = mergeStatefulStyles(itemClasses(form, isCurrent), props$1);
123
+ const t7 = itemContent(form, isCurrent, badge, icon, children, naming, ripple.surface);
124
+ let t8;
125
+ if ($[9] !== T0 || $[10] !== href || $[11] !== props$1 || $[12] !== ripple.handlers || $[13] !== t3 || $[14] !== t4 || $[15] !== t6 || $[16] !== t7) {
126
+ t8 = /* @__PURE__ */ jsx(T0, {
127
+ "aria-current": t3,
128
+ "aria-labelledby": t4,
90
129
  href,
91
- ...props,
130
+ ...t5,
131
+ ...props$1,
132
+ ...t6,
133
+ children: t7
134
+ });
135
+ $[9] = T0;
136
+ $[10] = href;
137
+ $[11] = props$1;
138
+ $[12] = ripple.handlers;
139
+ $[13] = t3;
140
+ $[14] = t4;
141
+ $[15] = t6;
142
+ $[16] = t7;
143
+ $[17] = t8;
144
+ } else t8 = $[17];
145
+ let t9;
146
+ if ($[18] !== t2 || $[19] !== t8) {
147
+ t9 = /* @__PURE__ */ jsx("li", {
92
148
  ...t2,
93
- children: t3
149
+ children: t8
150
+ });
151
+ $[18] = t2;
152
+ $[19] = t8;
153
+ $[20] = t9;
154
+ } else t9 = $[20];
155
+ return t9;
156
+ }
157
+ function NavigationLabel(t0) {
158
+ const $ = c(5);
159
+ const { children, id, styling } = t0;
160
+ const clipped = useClippedTitle(children);
161
+ let t1;
162
+ if ($[0] !== children || $[1] !== clipped || $[2] !== id || $[3] !== styling) {
163
+ t1 = /* @__PURE__ */ jsx("span", {
164
+ ...clipped,
165
+ id,
166
+ ...styling,
167
+ children
168
+ });
169
+ $[0] = children;
170
+ $[1] = clipped;
171
+ $[2] = id;
172
+ $[3] = styling;
173
+ $[4] = t1;
174
+ } else t1 = $[4];
175
+ return t1;
176
+ }
177
+ /**
178
+ * The list a bar or a rail holds its destinations in, laid out as `layout`
179
+ * says, the bar's row or the rail's column, with the space between them its
180
+ * form's.
181
+ */
182
+ function NavigationList(t0) {
183
+ const $ = c(6);
184
+ const { children, layout } = t0;
185
+ const { form } = useContext(NavigationContext);
186
+ let t1;
187
+ if ($[0] !== form || $[1] !== layout) {
188
+ t1 = props(navigationListStyles.list, layout, FORMS[form].list);
189
+ $[0] = form;
190
+ $[1] = layout;
191
+ $[2] = t1;
192
+ } else t1 = $[2];
193
+ let t2;
194
+ if ($[3] !== children || $[4] !== t1) {
195
+ t2 = /* @__PURE__ */ jsx("ul", {
196
+ role: "list",
197
+ ...t1,
198
+ children
94
199
  });
95
- $[6] = T0;
96
- $[7] = href;
97
- $[8] = props;
98
- $[9] = t1;
99
- $[10] = t2;
100
- $[11] = t3;
101
- $[12] = t4;
102
- } else t4 = $[12];
103
- return t4;
200
+ $[3] = children;
201
+ $[4] = t1;
202
+ $[5] = t2;
203
+ } else t2 = $[5];
204
+ return t2;
104
205
  }
105
206
  //#endregion
106
- export { NavigationItem };
207
+ export { NavigationItem, NavigationList };
107
208
 
108
209
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ReactNode","RefAttributes","LinkRenderProps","LinkProps","RACLinkProps","stylex","useContext","Link","RACLink","NavigationForm","BadgeMarkContext","Badge","focus","mergeStatefulStyles","NavigationContext","barItemStyles","collapsedItemStyles","crampedBarItemStyles","expandedItemStyles","navigationItemStyles","FORMS","bar","barCramped","item","collapsed","expanded","RINGS","indicator","indicatorRing","itemRing","ringVisible","NavigationItemProps","badge","children","className","href","icon","style","Omit","itemClasses","form","isCurrent","styles","state","props","link","itemCurrent","isHovered","itemHoveredCurrent","itemHovered","isFocusVisible","itemFocusedCurrent","itemFocused","isPressed","itemPressedCurrent","itemPressed","isDisabled","itemDisabled","itemContent","label","glyph","undefined","badgeMark","pill","indicatorCurrent","indicatorHoveredCurrent","indicatorHovered","indicatorFocusedCurrent","indicatorFocused","indicatorPressedCurrent","indicatorPressed","labelCurrent","NavigationItem","t0","$","_c","selectedRoute","T0","t1","t2","t3","t4","stylex.props","_c","RACLink"],"sources":["../../src/navigation/index.tsx"],"sourcesContent":["import type { ReactNode, RefAttributes } from 'react';\nimport type { LinkRenderProps, LinkProps as RACLinkProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext } from 'react';\nimport { Link as RACLink } from 'react-aria-components';\nimport type { NavigationForm } from './context';\nimport { BadgeMarkContext } from '../badge';\nimport Badge from '../components/badge';\nimport { focus } from '../styles/focus';\nimport { mergeStatefulStyles } from '../styles/merge';\nimport { NavigationContext } from './context';\nimport { barItemStyles, collapsedItemStyles, crampedBarItemStyles, expandedItemStyles, navigationItemStyles } from './styles';\n\n// The destination NavigationBar and NavigationRail both render, and the\n// context each hands it: which of the three forms to draw and which route is\n// current. See ./styles.ts for the forms.\n//\n// A destination is a link — it goes somewhere, rather than selecting\n// something — so it is React Aria's `Link`, which routes through a\n// `RouterProvider` when an app has one. The current one is the one whose\n// `href` is the bar's or the rail's `selectedRoute`, the same matching\n// NavigationTree does, and it carries `aria-current=\"page\"`.\n\nconst FORMS = {\n bar: barItemStyles,\n barCramped: {\n ...collapsedItemStyles,\n item: crampedBarItemStyles.item\n },\n collapsed: collapsedItemStyles,\n expanded: expandedItemStyles\n};\n\n// The focus ring goes around the pill, wherever a form draws it: the\n// indicator in a vertical destination, the whole destination in a horizontal\n// one. The rail's two forms take the library's shared ring. The bar's pill\n// moves from one element to the other at the medium breakpoint, so its rings\n// are its own, each giving way at the width the other takes over.\nconst RINGS = {\n bar: {\n indicator: barItemStyles.indicatorRing,\n item: barItemStyles.itemRing\n },\n barCramped: {\n indicator: focus.ringVisible,\n item: null\n },\n collapsed: {\n indicator: focus.ringVisible,\n item: null\n },\n expanded: {\n indicator: null,\n item: focus.ringVisible\n }\n};\ntype NavigationItemProps = {\n /**\n * A badge on the icon: `true` for the badges page's small dot, a number\n * for the large badge holding it. The badge is hidden from assistive\n * technology, so say what it says in the destination's `aria-label` too —\n * \"First item, 3 new\".\n */\n badge?: boolean | number;\n /** The destination's name, drawn as its label. */\n children: ReactNode;\n /** A function may compute the class from the destination's render state. */\n className?: RACLinkProps['className'];\n /**\n * Where the destination goes, and what the bar's or the rail's\n * `selectedRoute` is matched against.\n */\n href: string;\n /** The destination's icon, at the pages' 24dp. */\n icon: ReactNode;\n /** A function may compute the style from the destination's render state. */\n style?: RACLinkProps['style'];\n} & Omit<RACLinkProps, 'children' | 'className' | 'href' | 'style'>;\n\n// A destination's own classes, from React Aria's render state: the pill in a\n// horizontal form, and the layers over it.\nfunction itemClasses(form: NavigationForm, isCurrent: boolean) {\n const styles = FORMS[form];\n return (state: LinkRenderProps) => stylex.props(navigationItemStyles.link, styles.item, isCurrent && styles.itemCurrent, state.isHovered && (isCurrent ? styles.itemHoveredCurrent : styles.itemHovered), state.isFocusVisible && (isCurrent ? styles.itemFocusedCurrent : styles.itemFocused), state.isPressed && (isCurrent ? styles.itemPressedCurrent : styles.itemPressed), state.isFocusVisible && RINGS[form].item, state.isDisabled && navigationItemStyles.itemDisabled);\n}\n\n// What a destination draws, from React Aria's render state: the indicator\n// holding the icon, and the label beside or under it. Built by a call rather\n// than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after.\nfunction itemContent(form: NavigationForm, isCurrent: boolean, badge: boolean | number | undefined, icon: ReactNode, label: ReactNode) {\n const styles = FORMS[form];\n const glyph = badge === undefined || badge === false ? icon : <BadgeMarkContext value={styles.badgeMark}>\n <Badge count={badge === true ? undefined : badge}>{icon}</Badge>\n </BadgeMarkContext>;\n return (state: LinkRenderProps) => <>\n <span {...stylex.props(navigationItemStyles.pill, styles.indicator, isCurrent && styles.indicatorCurrent, state.isHovered && (isCurrent ? styles.indicatorHoveredCurrent : styles.indicatorHovered), state.isFocusVisible && (isCurrent ? styles.indicatorFocusedCurrent : styles.indicatorFocused), state.isPressed && (isCurrent ? styles.indicatorPressedCurrent : styles.indicatorPressed), state.isFocusVisible && RINGS[form].indicator, state.isDisabled && navigationItemStyles.itemDisabled)}>\n <span {...stylex.props(navigationItemStyles.icon)}>{glyph}</span>\n </span>\n <span {...stylex.props(navigationItemStyles.label, styles.label, isCurrent && styles.labelCurrent, state.isDisabled && navigationItemStyles.itemDisabled)}>\n {label}\n </span>\n </>;\n}\n\n/**\n * One destination in a navigation bar or rail: an icon, a label and, when\n * it is the current one, the active indicator behind them.\n */\nfunction NavigationItem({\n badge,\n children,\n href,\n icon,\n ...props\n}: NavigationItemProps & RefAttributes<HTMLAnchorElement>) {\n const {\n form,\n selectedRoute\n } = useContext(NavigationContext);\n const isCurrent = selectedRoute !== undefined && href === selectedRoute;\n return <RACLink aria-current={isCurrent ? 'page' : undefined} href={href} {...props} {...mergeStatefulStyles(itemClasses(form, isCurrent), props)}>\n {itemContent(form, isCurrent, badge, icon, children)}\n </RACLink>;\n}\nexport type { NavigationItemProps };\nexport { NavigationItem };"],"mappings":";;;;;;;;;;;;AAuBA,MAAMoB,QAAQ;CACZC,KAAKN;CACLO,YAAY;EACV,GAAGN;EACHO,MAAMN,qBAAqBM;CAC7B;CACAC,WAAWR;CACXS,UAAUP;AACZ;AAOA,MAAMQ,QAAQ;CACZL,KAAK;EACHM,WAAWZ,cAAca;EACzBL,MAAMR,cAAcc;CACtB;CACAP,YAAY;EACVK,WAAWf,MAAMkB;EACjBP,MAAM;CACR;CACAC,WAAW;EACTG,WAAWf,MAAMkB;EACjBP,MAAM;CACR;CACAE,UAAU;EACRE,WAAW;EACXJ,MAAMX,MAAMkB;CACd;AACF;AA0BA,SAASS,YAAYC,MAAsBC,WAAoB;CAC7D,MAAMC,SAAStB,MAAMoB;CACrB,QAAQG,UAA2BtC,MAAac,qBAAqB0B,MAAMH,OAAOnB,MAAMkB,aAAaC,OAAOI,aAAaH,MAAMI,cAAcN,YAAYC,OAAOM,qBAAqBN,OAAOO,cAAcN,MAAMO,mBAAmBT,YAAYC,OAAOS,qBAAqBT,OAAOU,cAAcT,MAAMU,cAAcZ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AAA,GAAAQ,UAAA6B;CAOtB,MAAA,EAAAjC,MAAAoC,kBAGItE,WAAWQ,iBAAiB;CAChC,MAAA2B,YAAkBmC,kBAAkBf,KAAAA,KAAa1B,SAASyC;CAClD,MAAAC,KAAArE;CAAsB,MAAAsE,KAAArC,YAAA,SAAAoB,KAAAA;CAA2D,MAAAkB,KAAAlE,oBAAoB0B,YAAYC,MAAMC,SAAS,GAAGG,KAAK;CAAC,IAAAoC;CAAA,IAAAN,EAAA,OAAA1C,SAAA0C,EAAA,OAAAzC,YAAAyC,EAAA,OAAAlC,QAAAkC,EAAA,OAAAtC,QAAAsC,EAAA,OAAAjC,WAAA;EAC5IuC,KAAAtB,YAAYlB,MAAMC,WAAWT,OAAOI,MAAMH,QAAQ;EAACyC,EAAA,KAAA1C;EAAA0C,EAAA,KAAAzC;EAAAyC,EAAA,KAAAlC;EAAAkC,EAAA,KAAAtC;EAAAsC,EAAA,KAAAjC;EAAAiC,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAG,MAAAH,EAAA,OAAAvC,QAAAuC,EAAA,OAAA9B,SAAA8B,EAAA,OAAAI,MAAAJ,EAAA,QAAAK,MAAAL,EAAA,QAAAM,IAAA;EADjDC,KAAA,oBAAC,IAAD;GAAuB,gBAAAH;GAAsC3C;GAAI,GAAMS;GAAK,GAAMmC;GACpFC,UAAAA;EADU,CAAA;EAEHN,EAAA,KAAAG;EAAAH,EAAA,KAAAvC;EAAAuC,EAAA,KAAA9B;EAAA8B,EAAA,KAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAM;EAAAN,EAAA,MAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAFLO;AAEK"}
1
+ {"version":3,"file":"index.js","names":["ReactNode","RefAttributes","FocusableElement","LinkRenderProps","LinkProps","RACLinkProps","stylex","useContext","useId","Link","RACLink","NavigationForm","BadgeMarkContext","Badge","useClippedTitle","useRipple","focus","mergeStatefulStyles","NavigationContext","barItemStyles","collapsedItemStyles","crampedBarItemStyles","expandedItemStyles","navigationItemStyles","navigationListStyles","FORMS","bar","barCramped","item","list","listItem","collapsed","expanded","RINGS","indicator","indicatorRing","itemRing","ringVisible","Naming","badgeId","badgeLabel","labelId","NavigationItemProps","badge","children","className","href","icon","isCurrent","style","Omit","itemClasses","form","styles","state","props","link","fade","itemCurrent","isHovered","itemHoveredCurrent","itemHovered","isFocusVisible","itemFocusedCurrent","itemFocused","isPressed","itemPressedCurrent","itemPressed","isDisabled","itemDisabled","itemContent","label","naming","ripple","glyph","undefined","badgeMark","pill","indicatorCurrent","indicatorHoveredCurrent","indicatorHovered","indicatorFocusedCurrent","indicatorFocused","indicatorPressedCurrent","indicatorPressed","labelCurrent","NavigationItem","t0","$","_c","isCurrentProp","onClick","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","selectedRoute","t1","t2","T0","t3","t4","t5","handlers","t6","t7","surface","t8","t9","NavigationLabel","id","styling","clipped","NavigationList","layout","stylex.props","_c","props","RACLink"],"sources":["../../src/navigation/index.tsx"],"sourcesContent":["import type { ReactNode, RefAttributes } from 'react';\nimport type { FocusableElement, LinkRenderProps, LinkProps as RACLinkProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useId } from 'react';\nimport { Link as RACLink } from 'react-aria-components';\nimport type { NavigationForm } from './context';\nimport { BadgeMarkContext } from '../badge';\nimport Badge from '../components/badge';\nimport { useClippedTitle } from '../hooks/useClippedTitle';\nimport { useRipple } from '../hooks/useRipple';\nimport { focus } from '../styles/focus';\nimport { mergeStatefulStyles } from '../styles/merge';\nimport { NavigationContext } from './context';\nimport { barItemStyles, collapsedItemStyles, crampedBarItemStyles, expandedItemStyles, navigationItemStyles, navigationListStyles } from './styles';\n\n// The destination NavigationBar and NavigationRail both render, and the\n// context each hands it: which of the three forms to draw and which route is\n// current. See ./styles.ts for the forms.\n//\n// A destination is a link — it goes somewhere, rather than selecting\n// something — so it is React Aria's `Link`, which routes through a\n// `RouterProvider` when an app has one. The current one is the one whose\n// `href` is the bar's or the rail's `selectedRoute`, the same matching\n// NavigationTree does, and it carries `aria-current=\"page\"`. A destination's\n// own `isCurrent` overrides that match, which is how an app on a route\n// nested under a destination marks the destination it is under: the match\n// is exact, and a top-level destination's `href` is rarely the whole route.\n// The attribute, the indicator and the label all read the one answer.\n//\n// A badge is hidden from assistive technology — see the Badge component for\n// why — so what it says reaches the link's name through `badgeLabel`: the\n// link is named by its label and that text together, through\n// `aria-labelledby`, rather than by an `aria-label` the call site would keep\n// in step with both the label and the count, in every language. The text\n// sits in a hidden span beside the badge, which a name can still be read\n// from, so the label's own text and the width the bar measures it at are\n// untouched. An `aria-label` or `aria-labelledby` the call site passes still\n// names the link instead.\n//\n// The destinations are a list, each in an item of its own, which is what has\n// a screen reader say how many there are and which one it is on, as the\n// WAI-ARIA navigation examples do. The bar and the rail draw the list, and\n// each destination draws its item: the item takes the destination's place in\n// the row or the column, and the link fills it, so the class, the ref and\n// `aria-current` stay on the link.\n\nconst FORMS = {\n bar: barItemStyles,\n barCramped: {\n ...collapsedItemStyles,\n item: crampedBarItemStyles.item,\n list: crampedBarItemStyles.list,\n listItem: crampedBarItemStyles.listItem\n },\n collapsed: collapsedItemStyles,\n expanded: expandedItemStyles\n};\n\n// The focus ring goes around the pill, wherever a form draws it: the\n// indicator in a vertical destination, the whole destination in a horizontal\n// one. The rail's two forms take the library's shared ring. The bar's pill\n// moves from one element to the other at the medium breakpoint, so its rings\n// are its own, each giving way at the width the other takes over.\nconst RINGS = {\n bar: {\n indicator: barItemStyles.indicatorRing,\n item: barItemStyles.itemRing\n },\n barCramped: {\n indicator: focus.ringVisible,\n item: null\n },\n collapsed: {\n indicator: focus.ringVisible,\n item: null\n },\n expanded: {\n indicator: null,\n item: focus.ringVisible\n }\n};\n\n// The ids a destination naming its badge gives its label and the badge's\n// words, which its link is labelled by.\ntype Naming = {\n badgeId: string;\n badgeLabel: string;\n labelId: string;\n};\ntype NavigationItemProps = {\n /**\n * A badge on the icon: `true` for the badges page's small dot, a number\n * for the large badge holding it. The badge is hidden from assistive\n * technology, so say what it says in `badgeLabel`.\n */\n badge?: boolean | number;\n /**\n * What the badge says, in words and in the reader's language — \"3 new\",\n * or \"new\" for the dot. It follows the label in the destination's\n * accessible name, \"First item 3 new\", and is read only while the badge is\n * drawn.\n */\n badgeLabel?: string;\n /** The destination's name, drawn as its label. */\n children: ReactNode;\n /** A function may compute the class from the destination's render state. */\n className?: RACLinkProps['className'];\n /**\n * Where the destination goes, and what the bar's or the rail's\n * `selectedRoute` is matched against.\n */\n href: string;\n /** The destination's icon, at the pages' 24dp. */\n icon: ReactNode;\n /**\n * Whether this is the current destination, in place of matching its\n * `href` against the bar's or the rail's `selectedRoute`. Pass it for a\n * route nested under the destination, `/first/42` under `/first`, which\n * the exact match leaves without a current destination; `false` turns\n * the match off. Left out, the match decides.\n */\n isCurrent?: boolean;\n /** A function may compute the style from the destination's render state. */\n style?: RACLinkProps['style'];\n} & Omit<RACLinkProps, 'children' | 'className' | 'href' | 'style'>;\n\n// A destination's own classes, from React Aria's render state: the pill in a\n// horizontal form, and the layers over it.\nfunction itemClasses(form: NavigationForm, isCurrent: boolean) {\n const styles = FORMS[form];\n return (state: LinkRenderProps) => stylex.props(navigationItemStyles.link, navigationItemStyles.fade, styles.item, isCurrent && styles.itemCurrent, state.isHovered && (isCurrent ? styles.itemHoveredCurrent : styles.itemHovered), state.isFocusVisible && (isCurrent ? styles.itemFocusedCurrent : styles.itemFocused), state.isPressed && (isCurrent ? styles.itemPressedCurrent : styles.itemPressed), state.isFocusVisible && RINGS[form].item, state.isDisabled && navigationItemStyles.itemDisabled);\n}\n\n// What a destination draws, from React Aria's render state: the indicator\n// holding the icon and the press ripple, and the label beside or under it.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after.\n//\n// The ripple comes first, so a count badge drawn after it stays over it.\nfunction itemContent(form: NavigationForm, isCurrent: boolean, badge: boolean | number | undefined, icon: ReactNode, label: ReactNode, naming: Naming | undefined, ripple: ReactNode) {\n const styles = FORMS[form];\n const glyph = badge === undefined || badge === false ? icon : <BadgeMarkContext value={styles.badgeMark}>\n <Badge count={badge === true ? undefined : badge}>{icon}</Badge>\n </BadgeMarkContext>;\n return (state: LinkRenderProps) => <>\n <span {...stylex.props(navigationItemStyles.pill, navigationItemStyles.fade, styles.indicator, isCurrent && styles.indicatorCurrent, state.isHovered && (isCurrent ? styles.indicatorHoveredCurrent : styles.indicatorHovered), state.isFocusVisible && (isCurrent ? styles.indicatorFocusedCurrent : styles.indicatorFocused), state.isPressed && (isCurrent ? styles.indicatorPressedCurrent : styles.indicatorPressed), state.isFocusVisible && RINGS[form].indicator, state.isDisabled && navigationItemStyles.itemDisabled)}>\n {ripple}\n <span {...stylex.props(navigationItemStyles.icon)}>{glyph}</span>\n {naming && <span hidden id={naming.badgeId}>\n {naming.badgeLabel}\n </span>}\n </span>\n <NavigationLabel id={naming?.labelId} styling={stylex.props(navigationItemStyles.label, navigationItemStyles.fade, styles.label, isCurrent && styles.labelCurrent, state.isDisabled && navigationItemStyles.itemDisabled)}>\n {label}\n </NavigationLabel>\n </>;\n}\n\n/**\n * One destination in a navigation bar or rail: an icon, a label and, when\n * it is the current one, the active indicator behind them.\n */\nfunction NavigationItem({\n badge,\n badgeLabel,\n children,\n href,\n icon,\n isCurrent: isCurrentProp,\n onClick,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n ...props\n}: NavigationItemProps & RefAttributes<HTMLAnchorElement>) {\n const {\n form,\n selectedRoute\n } = useContext(NavigationContext);\n // The call site's handlers run after the ripple's own.\n const ripple = useRipple<FocusableElement>(props.isDisabled !== true, {\n onClick,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n });\n const isCurrent = isCurrentProp ?? (selectedRoute !== undefined && href === selectedRoute);\n const labelId = useId();\n const badgeId = useId();\n // Only while the badge is drawn, and only where the call site names the\n // link no other way.\n const naming = badge !== undefined && badge !== false && badgeLabel !== undefined && props['aria-label'] === undefined && props['aria-labelledby'] === undefined ? {\n badgeId,\n badgeLabel,\n labelId\n } : undefined;\n return <li {...stylex.props(navigationListStyles.item, FORMS[form].listItem)}>\n <RACLink aria-current={isCurrent ? 'page' : undefined} aria-labelledby={naming && `${naming.labelId} ${naming.badgeId}`} href={href} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemClasses(form, isCurrent), props)}>\n {itemContent(form, isCurrent, badge, icon, children, naming, ripple.surface)}\n </RACLink>\n </li>;\n}\n\n// The label, kept to one line, which shows its full text in the browser's\n// tooltip on hover once it is cut short — see `useClippedTitle`. A component\n// because the title is state, and `itemContent` runs inside React Aria's\n// render function.\nfunction NavigationLabel({\n children,\n id,\n styling\n}: {\n children: ReactNode;\n id: string | undefined;\n styling: ReturnType<typeof stylex.props>;\n}) {\n const clipped = useClippedTitle(children);\n return <span {...clipped} id={id} {...styling}>\n {children}\n </span>;\n}\n\n/**\n * The list a bar or a rail holds its destinations in, laid out as `layout`\n * says, the bar's row or the rail's column, with the space between them its\n * form's.\n */\nfunction NavigationList({\n children,\n layout\n}: {\n children: ReactNode;\n layout: stylex.StyleXStyles;\n}) {\n const {\n form\n } = useContext(NavigationContext);\n return <ul\n // oxlint-disable-next-line jsx-a11y/no-redundant-roles -- Safari's VoiceOver drops the role once the markers are cleared\n role=\"list\" {...stylex.props(navigationListStyles.list, layout, FORMS[form].list)}>\n {children}\n </ul>;\n}\nexport type { NavigationItemProps };\nexport { NavigationItem, NavigationList };"],"mappings":";;;;;;;;;;;;;;AA8CA,MAAMyB,QAAQ;CACZC,KAAKP;CACLQ,YAAY;EACV,GAAGP;EACHQ,MAAMP,qBAAqBO;EAC3BC,MAAMR,qBAAqBQ;EAC3BC,UAAUT,qBAAqBS;CACjC;CACAC,WAAWX;CACXY,UAAUV;AACZ;AAOA,MAAMW,QAAQ;CACZP,KAAK;E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QAAA;EAGlBjB,KAAA5F,MAAakB,qBAAoBK,MAAOsF,QAAQ1F,MAAM2B,KAAK,CAAAvB,IAAK;EAAC2D,EAAA,KAAApC;EAAAoC,EAAA,KAAA2B;EAAA3B,EAAA,KAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,IAAAW;CAAA,IAAAX,EAAA,OAAA5C,YAAA4C,EAAA,OAAAU,IAAA;EAF1EC,KAAA,oBAAA,MAAA;GAEF,MAAA;GAAM,GAAKD;GACXtD;EACE,CAAA;EAAA4C,EAAA,KAAA5C;EAAA4C,EAAA,KAAAU;EAAAV,EAAA,KAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,OAJAW;AAIA"}
@@ -7,6 +7,12 @@ import { colors, stateLayerOpacity } from "../tokens/design.tokens.stylex.js";
7
7
  `${colors.onSecondaryContainer}${stateLayerOpacity.focus}${colors.secondaryContainer}`;
8
8
  `${colors.onSecondaryContainer}${stateLayerOpacity.pressed}${colors.secondaryContainer}`;
9
9
  const navigationItemStyles = {
10
+ fade: {
11
+ kIyJzY: "x1qno0dh x12w9bfk",
12
+ k1ekBW: "xs2xxs2",
13
+ kAMwcw: "xpc4ca7",
14
+ $$css: true
15
+ },
10
16
  icon: {
11
17
  kGNEyG: "x6s0dn4",
12
18
  k1xSpc: "x78zum5",
@@ -21,7 +27,8 @@ const navigationItemStyles = {
21
27
  },
22
28
  label: {
23
29
  kMwMTN: "x1w5n3ug",
24
- kVQacm: "xb3r6kr",
30
+ kXHlph: "x101abm8",
31
+ kORKVm: "xryxfnj",
25
32
  kg5iWk: "xlyipyv",
26
33
  khDVqt: "xuxw1ft",
27
34
  $$css: true
@@ -45,6 +52,20 @@ const navigationItemStyles = {
45
52
  $$css: true
46
53
  }
47
54
  };
55
+ const navigationListStyles = {
56
+ item: {
57
+ kB7OPa: "x9f619",
58
+ k1xSpc: "x78zum5",
59
+ $$css: true
60
+ },
61
+ list: {
62
+ kB7OPa: "x9f619",
63
+ kH6xsr: "x3ct3a4",
64
+ kogj98: "x1ghz6dp",
65
+ kmVPX3: "x1717udv",
66
+ $$css: true
67
+ }
68
+ };
48
69
  const barItemStyles = {
49
70
  badgeMark: {
50
71
  kSGwAc: "xcspwbw",
@@ -62,6 +83,7 @@ const barItemStyles = {
62
83
  kmuXW: "x2lah0s",
63
84
  kzqmXN: "x15yg21f x11lewyt",
64
85
  kjj79g: "xl56j7k",
86
+ kVAEAm: "x1n2onr6 xtke4eg",
65
87
  $$css: true
66
88
  },
67
89
  indicatorCurrent: {
@@ -108,13 +130,15 @@ const barItemStyles = {
108
130
  kSy8m5: "xfmxh57",
109
131
  kcktkL: "xb7ltuz",
110
132
  kwXMNM: "x1j6awrg",
111
- kZKoxP: "x5yr21d xiioxts",
133
+ kZKoxP: "xiioxts",
112
134
  kaIpWk: "x1dkaolv",
113
135
  kCS8Yb: "x1r8uery x1a6ly76",
114
136
  kXwgrk: "xdt5ytf xapwh9g",
115
137
  kzQI83: "x1iyjqo2 x10cb59y",
116
138
  kOIVth: "xzoy561",
117
139
  kjj79g: "xl56j7k",
140
+ kqGvvJ: "x10im51j xap7i12",
141
+ kAzted: "x8nclml xtyuij1",
118
142
  k7Eaqz: "xeuugli",
119
143
  k8WAf4: "x1t0vds8 x1nouyz5",
120
144
  kg3NbH: "xnjsko4 xze1m75",
@@ -170,6 +194,16 @@ const barItemStyles = {
170
194
  labelCurrent: {
171
195
  kMwMTN: "xzakmg9 x16ybrrz",
172
196
  $$css: true
197
+ },
198
+ list: {
199
+ kOIVth: "xxhr3t x110hqo6",
200
+ $$css: true
201
+ },
202
+ listItem: {
203
+ kCS8Yb: "x1r8uery x1a6ly76",
204
+ kzQI83: "x1iyjqo2 x10cb59y",
205
+ k7Eaqz: "xeuugli",
206
+ $$css: true
173
207
  }
174
208
  };
175
209
  const collapsedItemStyles = {
@@ -183,6 +217,7 @@ const collapsedItemStyles = {
183
217
  kmuXW: "x2lah0s",
184
218
  kzqmXN: "x15yg21f",
185
219
  kjj79g: "xl56j7k",
220
+ kVAEAm: "x1n2onr6",
186
221
  $$css: true
187
222
  },
188
223
  indicatorCurrent: {
@@ -246,6 +281,15 @@ const collapsedItemStyles = {
246
281
  labelCurrent: {
247
282
  kMwMTN: "xzakmg9",
248
283
  $$css: true
284
+ },
285
+ list: {
286
+ kOIVth: "xzoy561",
287
+ $$css: true
288
+ },
289
+ listItem: {
290
+ kmuXW: "x2lah0s",
291
+ kzqmXN: "xh8yej3",
292
+ $$css: true
249
293
  }
250
294
  };
251
295
  const expandedItemStyles = {
@@ -325,22 +369,41 @@ const expandedItemStyles = {
325
369
  labelCurrent: {
326
370
  kMwMTN: "x1sawysd",
327
371
  $$css: true
372
+ },
373
+ list: { $$css: true },
374
+ listItem: {
375
+ kSGwAc: "xqcrz7y",
376
+ kmuXW: "x2lah0s",
377
+ ks0D6T: "x193iq5w",
378
+ $$css: true
379
+ }
380
+ };
381
+ const crampedBarItemStyles = {
382
+ item: {
383
+ kZKoxP: "x5yr21d",
384
+ kaIpWk: "x1dkaolv",
385
+ kCS8Yb: "x1r8uery",
386
+ kXwgrk: "xdt5ytf",
387
+ kzQI83: "x1iyjqo2",
388
+ kOIVth: "xzoy561",
389
+ kjj79g: "xl56j7k",
390
+ k7Eaqz: "xeuugli",
391
+ k8WAf4: "x1t0vds8",
392
+ kg3NbH: "xnjsko4",
393
+ $$css: true
394
+ },
395
+ list: {
396
+ kOIVth: "xxhr3t",
397
+ $$css: true
398
+ },
399
+ listItem: {
400
+ kCS8Yb: "x1r8uery",
401
+ kzQI83: "x1iyjqo2",
402
+ k7Eaqz: "xeuugli",
403
+ $$css: true
328
404
  }
329
405
  };
330
- const crampedBarItemStyles = { item: {
331
- kZKoxP: "x5yr21d",
332
- kaIpWk: "x1dkaolv",
333
- kCS8Yb: "x1r8uery",
334
- kXwgrk: "xdt5ytf",
335
- kzQI83: "x1iyjqo2",
336
- kOIVth: "xzoy561",
337
- kjj79g: "xl56j7k",
338
- k7Eaqz: "xeuugli",
339
- k8WAf4: "x1t0vds8",
340
- kg3NbH: "xnjsko4",
341
- $$css: true
342
- } };
343
406
  //#endregion
344
- export { barItemStyles, collapsedItemStyles, crampedBarItemStyles, expandedItemStyles, navigationItemStyles };
407
+ export { barItemStyles, collapsedItemStyles, crampedBarItemStyles, expandedItemStyles, navigationItemStyles, navigationListStyles };
345
408
 
346
409
  //# sourceMappingURL=styles.js.map