@kanso-labs/kanso-ui 0.45.34 → 0.47.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 (129) hide show
  1. package/dist/button/index.js +13 -9
  2. package/dist/button/index.js.map +1 -1
  3. package/dist/calendar/styles.js +12 -7
  4. package/dist/calendar/styles.js.map +1 -1
  5. package/dist/chip/label.js +1 -0
  6. package/dist/chip/label.js.map +1 -1
  7. package/dist/chip/styles.js +2 -0
  8. package/dist/chip/styles.js.map +1 -1
  9. package/dist/collection/styles.js +1 -1
  10. package/dist/collection/styles.js.map +1 -1
  11. package/dist/components/breadcrumbs/index.js +4 -1
  12. package/dist/components/breadcrumbs/index.js.map +1 -1
  13. package/dist/components/button-group/index.d.ts +16 -3
  14. package/dist/components/button-group/index.js +53 -86
  15. package/dist/components/button-group/index.js.map +1 -1
  16. package/dist/components/calendar/index.d.ts +3 -3
  17. package/dist/components/calendar/index.js.map +1 -1
  18. package/dist/components/card/index.js +5 -1
  19. package/dist/components/card/index.js.map +1 -1
  20. package/dist/components/carousel/index.js +162 -105
  21. package/dist/components/carousel/index.js.map +1 -1
  22. package/dist/components/chip/index.d.ts +38 -15
  23. package/dist/components/chip/index.js +104 -8
  24. package/dist/components/chip/index.js.map +1 -1
  25. package/dist/components/code/index.js +32 -26
  26. package/dist/components/code/index.js.map +1 -1
  27. package/dist/components/color-area/index.d.ts +5 -3
  28. package/dist/components/color-area/index.js +5 -3
  29. package/dist/components/color-area/index.js.map +1 -1
  30. package/dist/components/color-picker/index.js +6 -3
  31. package/dist/components/color-picker/index.js.map +1 -1
  32. package/dist/components/color-swatch/index.js +1 -1
  33. package/dist/components/color-swatch/index.js.map +1 -1
  34. package/dist/components/color-swatch-picker/index.js +24 -9
  35. package/dist/components/color-swatch-picker/index.js.map +1 -1
  36. package/dist/components/combo-box/index.d.ts +11 -3
  37. package/dist/components/combo-box/index.js +66 -62
  38. package/dist/components/combo-box/index.js.map +1 -1
  39. package/dist/components/copy-field/index.js +1 -0
  40. package/dist/components/copy-field/index.js.map +1 -1
  41. package/dist/components/date-picker/index.d.ts +22 -3
  42. package/dist/components/date-picker/index.js +234 -45
  43. package/dist/components/date-picker/index.js.map +1 -1
  44. package/dist/components/date-range-picker/index.d.ts +3 -1
  45. package/dist/components/date-range-picker/index.js +6 -4
  46. package/dist/components/date-range-picker/index.js.map +1 -1
  47. package/dist/components/disclosure/index.d.ts +4 -3
  48. package/dist/components/disclosure/index.js +159 -101
  49. package/dist/components/disclosure/index.js.map +1 -1
  50. package/dist/components/fab/index.d.ts +3 -1
  51. package/dist/components/fab/index.js +25 -12
  52. package/dist/components/fab/index.js.map +1 -1
  53. package/dist/components/fab-menu/index.js +1 -1
  54. package/dist/components/fab-menu/index.js.map +1 -1
  55. package/dist/components/icon-button/index.js +3 -3
  56. package/dist/components/icon-button/index.js.map +1 -1
  57. package/dist/components/index.d.ts +3 -3
  58. package/dist/components/link/index.js +2 -2
  59. package/dist/components/link/index.js.map +1 -1
  60. package/dist/components/menu/index.js +5 -2
  61. package/dist/components/menu/index.js.map +1 -1
  62. package/dist/components/navigation-bar/index.js.map +1 -1
  63. package/dist/components/navigation-rail/index.js +4 -4
  64. package/dist/components/navigation-rail/index.js.map +1 -1
  65. package/dist/components/navigation-tree/index.js +16 -13
  66. package/dist/components/navigation-tree/index.js.map +1 -1
  67. package/dist/components/popover/index.js +35 -33
  68. package/dist/components/popover/index.js.map +1 -1
  69. package/dist/components/progress-indicator/index.js +258 -172
  70. package/dist/components/progress-indicator/index.js.map +1 -1
  71. package/dist/components/range-calendar/index.js +41 -7
  72. package/dist/components/range-calendar/index.js.map +1 -1
  73. package/dist/components/search-view/index.js +1 -1
  74. package/dist/components/search-view/index.js.map +1 -1
  75. package/dist/components/segmented-button/index.d.ts +3 -2
  76. package/dist/components/segmented-button/index.js +46 -95
  77. package/dist/components/segmented-button/index.js.map +1 -1
  78. package/dist/components/select/index.js +5 -2
  79. package/dist/components/select/index.js.map +1 -1
  80. package/dist/components/slider/index.js +42 -10
  81. package/dist/components/slider/index.js.map +1 -1
  82. package/dist/components/table/index.d.ts +26 -5
  83. package/dist/components/table/index.js +93 -75
  84. package/dist/components/table/index.js.map +1 -1
  85. package/dist/components/tag/index.js +1 -0
  86. package/dist/components/tag/index.js.map +1 -1
  87. package/dist/components/time-picker/index.js +37 -5
  88. package/dist/components/time-picker/index.js.map +1 -1
  89. package/dist/components/token-field/index.js +89 -66
  90. package/dist/components/token-field/index.js.map +1 -1
  91. package/dist/components/toolbar/index.d.ts +8 -3
  92. package/dist/components/toolbar/index.js +123 -43
  93. package/dist/components/toolbar/index.js.map +1 -1
  94. package/dist/components/tree/index.js +1 -1
  95. package/dist/components/tree/index.js.map +1 -1
  96. package/dist/fab/styles.js +12 -0
  97. package/dist/fab/styles.js.map +1 -1
  98. package/dist/field/styles.js +2 -2
  99. package/dist/field/styles.js.map +1 -1
  100. package/dist/hooks/useDockedMonths.js +36 -0
  101. package/dist/hooks/useDockedMonths.js.map +1 -0
  102. package/dist/i18n/index.js +1 -0
  103. package/dist/i18n/index.js.map +1 -1
  104. package/dist/i18n/messages.js +34 -0
  105. package/dist/i18n/messages.js.map +1 -1
  106. package/dist/index.d.ts +3 -3
  107. package/dist/navigation/index.js +5 -5
  108. package/dist/navigation/index.js.map +1 -1
  109. package/dist/navigation/styles.js +5 -1
  110. package/dist/navigation/styles.js.map +1 -1
  111. package/dist/row/context.js +6 -0
  112. package/dist/row/context.js.map +1 -0
  113. package/dist/row/index.js +77 -66
  114. package/dist/row/index.js.map +1 -1
  115. package/dist/row/styles.js +15 -0
  116. package/dist/row/styles.js.map +1 -1
  117. package/dist/segments/index.js +2 -5
  118. package/dist/segments/index.js.map +1 -1
  119. package/dist/segments/literal.js +66 -0
  120. package/dist/segments/literal.js.map +1 -0
  121. package/dist/segments/styles.js +8 -0
  122. package/dist/segments/styles.js.map +1 -1
  123. package/dist/styles/chequer.js +1 -0
  124. package/dist/styles/chequer.js.map +1 -1
  125. package/dist/styles/focus.js.map +1 -1
  126. package/dist/styles.css +509 -69
  127. package/dist/toggle-group/index.js +133 -0
  128. package/dist/toggle-group/index.js.map +1 -0
  129. package/package.json +3 -3
@@ -102,6 +102,37 @@ const styles = {
102
102
  kWkggS: "x19v6zzp",
103
103
  $$css: true
104
104
  },
105
+ indicator: {
106
+ kGNEyG: "x6s0dn4",
107
+ kWkggS: "x1c5gpgi",
108
+ kZKoxP: "xn3w4p2",
109
+ kaIpWk: "x1dkaolv",
110
+ kB7OPa: "x9f619",
111
+ kMwMTN: "x1girmi0",
112
+ k1xSpc: "x78zum5",
113
+ kMv6JI: "xkknnkr",
114
+ kGuDYH: "x14zspaw",
115
+ k63SB2: "x1v9cpvo",
116
+ krVfgx: "x3mk9i",
117
+ kLqNvP: "xbudbmw",
118
+ kjj79g: "xl56j7k",
119
+ kb6lSQ: "x155f00i",
120
+ kLWn49: "x1lz68p4",
121
+ k7Eaqz: "x900493",
122
+ kg3NbH: "x18fpw6u",
123
+ kVAEAm: "x10l6tqk",
124
+ k3aq6I: "xc01soo x1gwzs1v",
125
+ khDVqt: "xuxw1ft",
126
+ $$css: true
127
+ },
128
+ indicatorVertical: {
129
+ krVfgx: "xdd4er5",
130
+ k87sOh: "xwa60dl",
131
+ kt4wiu: "x15zsqls",
132
+ kLqNvP: "xhi6v0a",
133
+ k3aq6I: "xj0i120",
134
+ $$css: true
135
+ },
105
136
  innerBlockEnd: {
106
137
  kT0f0o: "x1ui04y5",
107
138
  kVL7Gh: "x6en5u8",
@@ -262,6 +293,10 @@ const placements = {
262
293
  "--x-insetBlockEnd": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(start),
263
294
  "--x-insetBlockStart": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(end)
264
295
  }],
296
+ indicatorAt: (fraction) => [fraction !== void 0 && {
297
+ "--slider-at": fraction != null ? "x1knt7uz" : "",
298
+ $$css: true
299
+ }, { "--x---slider-at": fraction != null ? fraction : void 0 }],
265
300
  inline: (start, end) => [
266
301
  end !== void 0 && {
267
302
  kt4wiu: end != null ? "xqxgn94" : "",
@@ -410,10 +445,10 @@ function Slider(t0) {
410
445
  let t5;
411
446
  if ($[13] !== vertical) {
412
447
  t5 = mergeStatefulStyles((state) => ({
413
- 0: { className: "x16gdi9t x9f619 x1ypdohk xh8yej3 x1n2onr6" },
414
- 2: { className: "x9f619 x1ypdohk x1n2onr6 x5yr21d x1iyjqo2 xluoxwi x2lwn1j" },
415
- 1: { className: "x16gdi9t x9f619 xh8yej3 x1n2onr6 x1h6gzvc" },
416
- 3: { className: "x9f619 x1n2onr6 x5yr21d x1iyjqo2 xluoxwi x2lwn1j x1h6gzvc" }
448
+ 0: { className: "x16gdi9t x9f619 x12h1iku x1ypdohk xh8yej3 xt6307q x1n2onr6" },
449
+ 2: { className: "x9f619 x1ypdohk x1n2onr6 x5yr21d xpqogu8 x1iyjqo2 xluoxwi xdj266r xrnipbp x2lwn1j" },
450
+ 1: { className: "x16gdi9t x9f619 x12h1iku xh8yej3 xt6307q x1n2onr6 x1h6gzvc" },
451
+ 3: { className: "x9f619 x1n2onr6 x5yr21d xpqogu8 x1iyjqo2 xluoxwi xdj266r xrnipbp x2lwn1j x1h6gzvc" }
417
452
  })[!!vertical << 1 | !!state.isDisabled << 0], {});
418
453
  $[13] = vertical;
419
454
  $[14] = t5;
@@ -471,10 +506,7 @@ function stepsOf(state) {
471
506
  }
472
507
  function thumbContent(index, vertical) {
473
508
  return (state) => state.isDragging || state.isFocusVisible ? /* @__PURE__ */ jsx(SliderOutput, {
474
- ...{
475
- 0: { className: "x6s0dn4 x1c5gpgi xn3w4p2 x1dkaolv x9f619 x1girmi0 x78zum5 xkknnkr x14zspaw x1v9cpvo x3mk9i xbudbmw xl56j7k x155f00i x1lz68p4 x900493 x18fpw6u x10l6tqk xaf021q xuuh30 xuxw1ft" },
476
- 1: { className: "x6s0dn4 x1c5gpgi xn3w4p2 x1dkaolv x9f619 x1girmi0 x78zum5 xkknnkr x14zspaw x1v9cpvo xl56j7k x155f00i x1lz68p4 x900493 x18fpw6u x10l6tqk xuxw1ft xdd4er5 xwa60dl x15zsqls xhi6v0a x1cb1t30" }
477
- }[!!vertical << 0],
509
+ ...props(styles.indicator, placements.indicatorAt(state.state.getThumbPercent(index)), vertical && styles.indicatorVertical),
478
510
  children: state.state.getThumbValueLabel(index)
479
511
  }) : null;
480
512
  }
@@ -511,8 +543,8 @@ function trackContent(extras, thumbLabels) {
511
543
  const hasIcon = icon !== void 0 && icon !== null && !range && (size === "md" || size === "lg" || size === "xl");
512
544
  const steps = showStops ? stepsOf(state) : [];
513
545
  const place = vertical ? placements.block : placements.inline;
514
- const innerStart = vertical ? styles.innerBlockStart : styles.innerInlineStart;
515
- const innerEnd = vertical ? styles.innerBlockEnd : styles.innerInlineEnd;
546
+ const innerStart = vertical ? styles.innerBlockEnd : styles.innerInlineStart;
547
+ const innerEnd = vertical ? styles.innerBlockStart : styles.innerInlineEnd;
516
548
  return /* @__PURE__ */ jsxs(Fragment, { children: [parts.map((part) => /* @__PURE__ */ jsx("span", {
517
549
  ...props(styles.segment, vertical && styles.segmentVertical, part.active && styles.active, part.active && hasIcon && styles.activeHoldingIcon, isDisabled && (part.active ? styles.activeDisabled : styles.inactiveDisabled), part.start !== AT_END && innerStart, part.end !== AT_END && innerEnd, place(insetOf(part.start), insetOf(part.end))),
518
550
  children: partContent(part, extras, isDisabled, steps, part.active && hasIcon)
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","stylex","Slider","RACSlider","groupStyles","mergeStatefulStyles","GAP","CLEAR","STOP","sizes","lg","$$css","md","sm","xl","xs","styles","active","kWkggS","activeDisabled","activeHoldingIcon","k9g6sI","icon","kGNEyG","kZKoxP","kMwMTN","k1xSpc","kGuDYH","kzqmXN","k87sOh","kLqNvP","kjj79g","kVAEAm","iconDisabled","iconRoomBlock","iconRoomBlockXl","iconRoomInline","iconRoomInlineXl","iconVertical","krVfgx","inactiveDisabled","innerBlockEnd","kT0f0o","kVL7Gh","innerBlockStart","kfmiAY","krdFHd","innerInlineEnd","innerInlineStart","root","rootVertical","segment","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kB7OPa","kVQacm","segmentVertical","stop","stopActive","stopActiveDisabled","stopDisabled","stopEnd","kt4wiu","stopEndVertical","stopStart","stopStartVertical","stopVertical","thumb","k6CgDc","kkrTdU","kjBf7l","kInvED","k3XXqK","kMeerF","kIyJzY","k1ekBW","kAMwcw","thumbActive","thumbActiveVertical","thumbDisabled","thumbDragging","thumbFocused","thumbVertical","kbCHJM","_temp","_temp2","placements","block","start","end","val","undefined","inline","stopBlock","offset","stopInline","showStops","size","vertical","fraction","px","name","label","orientation","thumbLabels","AT_END","after","before","iconRoom","insetIcon","isDisabled","room","props","insetOf","offsetIn","share","partContent","part","extras","steps","hasIcon","from","to","length","inside","filter","place","atStart","atEnd","map","t0","$","T0","t1","t2","t3","t4","t5","t6","t7","t8","t9","state","0","className","2","1","3","trackContent","stepsOf","min","getThumbMinValue","max","getThumbMaxValue","values","fractions","step","index","push","getValuePercent","thumbContent","isDragging","isFocusVisible","getThumbValueLabel","thumbStyles","_","getThumbPercent","first","last","at","range","parts","innerStart","innerEnd"],"sources":["../../../src/components/slider/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { SliderProps as RACSliderProps, SliderState, SliderThumbRenderProps, SliderTrackRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Slider as RACSlider, SliderOutput, SliderThumb, SliderTrack } from 'react-aria-components';\nimport { FieldLabel } from '../../field';\nimport { groupStyles } from '../../field/styles';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The sliders page. At the size its tokens call extra-small, the default: a\n// 16dp track with an 8dp corner, the active part in primary and the inactive\n// part in secondary container, a 4dp stop in on secondary container 6dp from\n// the inactive end, and a handle 4dp wide and 44dp tall in primary that\n// narrows to 2dp while pressed or focused. The track parts on each side of\n// the handle, with 6dp of space between them and it, and their corners\n// against the handle are 2dp where their outer ends are full. Disabled, the\n// active part and the handle are on surface at the disabled content opacity\n// and the inactive part at the disabled container opacity.\n//\n// `size` takes the page's four larger sizes, which thicken the track and\n// round its ends more, and lengthen the handle from M up:\n//\n// | Size | Track | Corner | Handle | Inset icon |\n// | ---- | ----- | ------ | ------ | ---------- |\n// | xs | 16dp | 8dp | 44dp | |\n// | sm | 24dp | 8dp | 44dp | |\n// | md | 40dp | 12dp | 52dp | 24dp |\n// | lg | 56dp | 16dp | 68dp | 24dp |\n// | xl | 96dp | 28dp | 108dp | 32dp |\n//\n// The handle stays 4dp wide, the corners against it 2dp and the space beside\n// it 6dp at every size.\n//\n// `showStops` is the page's stops configuration, which it used to call the\n// discrete slider: a 4dp stop at every step, in on primary on the active part\n// and on secondary container on the inactive one, so the reader can see\n// where the handle can land. The stops at the two ends sit 6dp in from them,\n// as the single stop does. A part clips what it holds, which is what hides\n// the stops beside the handle: the part ends 6dp short of it.\n//\n// `icon` is the page's inset icon, at the start of the active part in on\n// primary, from M up: the page gives it a size at M, L and XL alone. It is\n// 10dp in from the part's start, which is MDC-Android's padding, since the\n// page gives none, and like MDC-Android it is drawn only while the part has\n// room for it and that padding on both sides, and for a single handle.\n//\n// The value indicator is the page's label: inverse surface under label-large\n// in inverse on surface, 44dp tall and at least 48dp wide, 12dp above the\n// handle. It shows while the handle is dragged or has keyboard focus, and it\n// is React Aria's `SliderOutput`, so what it shows is what the slider\n// announces.\n//\n// React Aria's `Slider` is the root, `SliderTrack` the strip the handles are\n// placed along by percent, and `SliderThumb` each handle around a visually\n// hidden range input. The track's parts are drawn here from those percents\n// rather than with `SliderFill`, since the page's parts stop short of the\n// handle on both sides and the fill runs up to it. A range slider is the\n// same track with two handles and the active part between them.\n//\n// Vertical, the same parts run along the block axis, with the active part\n// rising from the bottom and the indicator to the start side of the handle.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The sliders page's own measurements, which are constants of the component\n// rather than steps of the consumer's spacing scale. The clearance used to be\n// read off `spacing.sm` — true at its default 8, since 6 plus half the\n// handle comes to the same — so a theme moving that step opened the gap\n// beside the handle while the stop, written as the literal it is, stayed\n// where the page puts it.\nconst GAP = 6;\nconst HANDLE_WIDTH = 4;\n/** How far a part stops short of a handle's centre. */\nconst CLEAR = GAP + HANDLE_WIDTH / 2;\n/** A stop's size. */\nconst STOP = 4;\n/** MDC-Android's padding either side of the inset icon. */\nconst ICON_PADDING = 10;\ntype SliderSize = 'lg' | 'md' | 'sm' | 'xl' | 'xs';\n\n// The sizes, as the custom properties every part reads: the track's\n// thickness, its outer corner and the handle's length, which the track\n// strip takes as its own thickness too.\nconst sizes = {\n lg: {\n \"--slider-corner\": \"x1hr852m\",\n \"--slider-handle\": \"x1i1s3m4\",\n \"--slider-icon\": \"xsfv7fh\",\n \"--slider-track\": \"xdrquod\",\n $$css: true\n },\n md: {\n \"--slider-corner\": \"x1welmdy\",\n \"--slider-handle\": \"x1290pjo\",\n \"--slider-icon\": \"xsfv7fh\",\n \"--slider-track\": \"xhx1aj5\",\n $$css: true\n },\n sm: {\n \"--slider-corner\": \"x1y8vi8n\",\n \"--slider-handle\": \"x1czf5nl\",\n \"--slider-track\": \"xf334ng\",\n $$css: true\n },\n xl: {\n \"--slider-corner\": \"x1tzw2no\",\n \"--slider-handle\": \"x1aoofsu\",\n \"--slider-icon\": \"xmfnedx\",\n \"--slider-track\": \"x1s6dhuk\",\n $$css: true\n },\n xs: {\n \"--slider-corner\": \"x1y8vi8n\",\n \"--slider-handle\": \"x1czf5nl\",\n \"--slider-track\": \"x16oikcs\",\n $$css: true\n }\n};\nconst styles = {\n active: {\n kWkggS: \"xnety89 x1jzqe4\",\n $$css: true\n },\n activeDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n activeHoldingIcon: {\n k9g6sI: \"xpqogu8\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xi7vqlm\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"xuu3ggl\",\n kzqmXN: \"xoxpges\",\n k87sOh: \"xdtafdd\",\n kLqNvP: \"xi5uv41\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n iconDisabled: {\n kMwMTN: \"x1girmi0\",\n $$css: true\n },\n iconRoomBlock: {\n k1xSpc: \"x1uo08md x78zum5\",\n $$css: true\n },\n iconRoomBlockXl: {\n k1xSpc: \"x2mjljv x78zum5\",\n $$css: true\n },\n iconRoomInline: {\n k1xSpc: \"x1cueg3v x78zum5\",\n $$css: true\n },\n iconRoomInlineXl: {\n k1xSpc: \"x18ymn08 x78zum5\",\n $$css: true\n },\n iconVertical: {\n krVfgx: \"x1jn9clo\",\n k87sOh: \"x80663w\",\n kLqNvP: \"x1m57d8a\",\n $$css: true\n },\n inactiveDisabled: {\n kWkggS: \"x19v6zzp\",\n $$css: true\n },\n innerBlockEnd: {\n kT0f0o: \"x1ui04y5\",\n kVL7Gh: \"x6en5u8\",\n $$css: true\n },\n innerBlockStart: {\n kfmiAY: \"x1e4oeot\",\n krdFHd: \"xr9e8f9\",\n $$css: true\n },\n innerInlineEnd: {\n kT0f0o: \"x1ui04y5\",\n kfmiAY: \"x1e4oeot\",\n $$css: true\n },\n innerInlineStart: {\n kVL7Gh: \"x6en5u8\",\n krdFHd: \"xr9e8f9\",\n $$css: true\n },\n root: {\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n rootVertical: {\n kGNEyG: \"x1cy8zhl\",\n kZKoxP: \"x1u5z0ei\",\n kzqmXN: \"x14atkfc\",\n $$css: true\n },\n segment: {\n kWkggS: \"x15dekr4 x9yvj25\",\n kZKoxP: \"x9w084k\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1xpg3mf\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n k87sOh: \"x1i1s66i\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n segmentVertical: {\n kZKoxP: \"xt7dq6l\",\n kzqmXN: \"x3fzmgt\",\n k87sOh: \"x80663w\",\n kLqNvP: \"x9k4rl8\",\n $$css: true\n },\n stop: {\n kWkggS: \"x81krv7 x1tt9vl1\",\n kZKoxP: \"xqu0tyb\",\n kaIpWk: \"x16fbrrb\",\n kzqmXN: \"x51ohtg\",\n k87sOh: \"x17a0tka\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n stopActive: {\n kWkggS: \"x1ntwmx2 x1sir5s4\",\n $$css: true\n },\n stopActiveDisabled: {\n kWkggS: \"x1dbj914\",\n $$css: true\n },\n stopDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n stopEnd: {\n kt4wiu: \"x1f889gz\",\n $$css: true\n },\n stopEndVertical: {\n k87sOh: \"x1atx4j1\",\n kt4wiu: \"x1woyocn\",\n $$css: true\n },\n stopStart: {\n kLqNvP: \"xrr41r3\",\n $$css: true\n },\n stopStartVertical: {\n krVfgx: \"xrb244j\",\n k87sOh: \"x80663w\",\n kLqNvP: \"xhi6v0a\",\n $$css: true\n },\n stopVertical: {\n k87sOh: \"x80663w\",\n kLqNvP: \"xml7xvy\",\n $$css: true\n },\n thumb: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89 x1jzqe4\",\n kZKoxP: \"x16gdi9t\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1dkaolv\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1jm3nie\",\n kzqmXN: \"x51ohtg\",\n k87sOh: \"xwa60dl\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xdl150w\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n thumbActive: {\n kzqmXN: \"xfo62xy\",\n $$css: true\n },\n thumbActiveVertical: {\n kZKoxP: \"x36qwtl\",\n kzqmXN: \"xluoxwi\",\n $$css: true\n },\n thumbDisabled: {\n kWkggS: \"x1crcgwy\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n thumbDragging: {\n kkrTdU: \"xi9pz9s\",\n $$css: true\n },\n thumbFocused: {\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n thumbVertical: {\n kZKoxP: \"xqu0tyb\",\n kzqmXN: \"xluoxwi\",\n k87sOh: \"x80663w\",\n kbCHJM: \"x1nrll8i\",\n $$css: true\n }\n};\n\n// Where each part of the track starts and ends, as insets from the track's\n// two ends, and where a stop sits inside a part. Dynamic styles, since the\n// percents come from the value at render time and StyleX compiles its\n// classes ahead of time; each writes its insets to custom properties inline.\nconst _temp = {\n krVfgx: \"xiicpxy\",\n k87sOh: \"x5mnzd7\",\n \"$$css\": true\n};\nconst _temp2 = {\n krVfgx: \"xiicpxy\",\n \"$$css\": true\n};\nconst placements = {\n block: (start: string, end: string) => [_temp, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start),\n \"--x-insetBlockStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end)\n }],\n inline: (start: string, end: string) => [end !== undefined && {\n kt4wiu: end != null ? \"xqxgn94\" : \"\",\n $$css: true\n }, start !== undefined && {\n kLqNvP: start != null ? \"x1lxsm33\" : \"\",\n $$css: true\n }, {\n \"--x-insetInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }],\n stopBlock: (offset: string) => [_temp2, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(offset)\n }],\n stopInline: (offset: string) => [offset !== undefined && {\n kLqNvP: offset != null ? \"x1lxsm33\" : \"\",\n $$css: true\n }, {\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(offset)\n }]\n};\n\n/** What a track draws besides its parts and handles. */\ntype Extras = {\n icon: ReactNode;\n showStops: boolean;\n size: SliderSize;\n vertical: boolean;\n};\n\n/** One end of a part: a fraction of the track's length, and pixels on top. */\ntype Inset = {\n fraction: number;\n px: number;\n};\n\n/**\n * A part of the track, by the insets of its two ends from the track's, and\n * which of the three it is: the inactive part before a range's first handle,\n * the active part, or the inactive part after the last handle.\n */\ntype Part = {\n active: boolean;\n end: Inset;\n name: 'active' | 'after' | 'before';\n start: Inset;\n};\ntype SliderProps = Omit<RACSliderProps, 'children' | 'orientation'> & {\n /**\n * The page's inset icon, at the start of the active part, from `md` up:\n * the page gives it a size at M, L and XL alone. Drawn for a single\n * handle, and only while the active part has room for it.\n */\n icon?: ReactNode;\n /**\n * What the slider sets. A slider that a row labels some other way leaves\n * it out and passes `aria-label` instead.\n */\n label?: string;\n /**\n * Along which axis the handle moves. A vertical slider is 240px tall until\n * `style` on the root says otherwise.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * A stop at every step, the page's stops configuration, so the reader can\n * see where the handle can land. Meant for a slider with a handful of\n * steps: each stop is a 4dp dot, and a fine step draws a crowd of them.\n * @default false\n */\n showStops?: boolean;\n /**\n * The page's sizes, by the track's thickness: 16dp at `xs`, 24dp at `sm`,\n * 40dp at `md`, 56dp at `lg` and 96dp at `xl`, with the handle 44dp long\n * up to `sm` and 52dp, 68dp and 108dp past it.\n * @default 'xs'\n */\n size?: SliderSize;\n /**\n * A name for each handle of a range slider, in order, since two handles\n * named by the same label cannot be told apart.\n */\n thumbLabels?: string[];\n};\nconst AT_END: Inset = {\n fraction: 0,\n px: 0\n};\n\n// A part's start inset, clear of a handle at `fraction` of the way along. The\n// fraction lands on the handle's centre, so half the handle's width joins the\n// page's gap to reach its edge.\nfunction after(fraction: number): Inset {\n return {\n fraction,\n px: CLEAR\n };\n}\n\n// A part's end inset, clear of a handle at `fraction` of the way along.\nfunction before(fraction: number): Inset {\n return {\n fraction: 1 - fraction,\n px: CLEAR\n };\n}\n\n// The container query that hides the inset icon for want of room: the part's\n// length along the track, against the icon and its padding at this size.\nfunction iconRoom(size: SliderSize, vertical: boolean) {\n if (vertical) {\n return size === 'xl' ? styles.iconRoomBlockXl : styles.iconRoomBlock;\n }\n return size === 'xl' ? styles.iconRoomInlineXl : styles.iconRoomInline;\n}\n\n// The inset icon, at the foot of the active part, while the part has room.\nfunction insetIcon({\n icon,\n size,\n vertical\n}: Extras, isDisabled: boolean): ReactNode {\n const room = iconRoom(size, vertical);\n return <span {...stylex.props(styles.icon, vertical && styles.iconVertical, room, isDisabled && styles.iconDisabled)}>\n {icon}\n </span>;\n}\nfunction insetOf({\n fraction,\n px\n}: Inset) {\n return `calc(${fraction * 100}% + ${px}px)`;\n}\n\n// Where a stop at `fraction` of the way along the track starts inside a part.\n// The part's own length is the `100%` the expression has to work from, and\n// the track's is that plus both insets, so a fraction of the track is a\n// share of the part's length plus their pixels.\nfunction offsetIn({\n end,\n start\n}: Part, fraction: number) {\n const share = 1 - start.fraction - end.fraction;\n const scale = (fraction - start.fraction) / share;\n return `calc(${scale} * (100% + ${start.px + end.px}px) - ${start.px + STOP / 2}px)`;\n}\n\n// What a part holds: a stop at each step inside it, the end stops where it\n// reaches the track's ends, and the inset icon.\nfunction partContent(part: Part, extras: Extras, isDisabled: boolean, steps: number[], hasIcon: boolean) {\n const {\n showStops,\n vertical\n } = extras;\n const stop = [styles.stop, vertical && styles.stopVertical, part.active && styles.stopActive, isDisabled && (part.active ? styles.stopActiveDisabled : styles.stopDisabled)];\n const from = part.start.fraction;\n const to = 1 - part.end.fraction;\n const length = 1 - part.start.fraction - part.end.fraction;\n const inside = showStops && length > 0 ? steps.filter(fraction => fraction >= from && fraction <= to) : [];\n const place = vertical ? placements.stopBlock : placements.stopInline;\n const atStart = part.start.fraction === 0 && part.start.px === 0;\n // The single stop at the inactive end is drawn with or without the stops\n // configuration; the one at the start is the configuration's own.\n const atEnd = part.end.fraction === 0 && part.end.px === 0 && !part.active;\n return <>\n {hasIcon ? insetIcon(extras, isDisabled) : null}\n {showStops && atStart ? <span {...stylex.props(...stop, vertical ? styles.stopStartVertical : styles.stopStart)} /> : null}\n {inside.map(fraction => <span key={fraction} {...stylex.props(...stop, place(offsetIn(part, fraction)))} />)}\n {atEnd ? <span {...stylex.props(...stop, vertical ? styles.stopEndVertical : styles.stopEnd)} /> : null}\n </>;\n}\n\n/**\n * A slider for one value, or for a range when the value is a pair. The value\n * is React Aria's: pass `value` with `onChange` to control it, or\n * `defaultValue` to let it keep its own, with `minValue`, `maxValue` and\n * `step` to shape it and `formatOptions` to say how it reads. Arrow keys\n * move a handle by a step, Page Up and Page Down by ten, Home and End to\n * the ends.\n *\n * The call site's `className` and `style` land on the slider as a whole,\n * which is the element a layout positions and the one that gives a vertical\n * slider its height.\n */\nfunction Slider({\n icon,\n label,\n orientation = 'horizontal',\n showStops = false,\n size = 'xs',\n thumbLabels,\n ...props\n}: RefAttributes<HTMLDivElement> & SliderProps) {\n const vertical = orientation === 'vertical';\n return <RACSlider orientation={orientation} {...props} {...mergeStatefulStyles(stylex.props(groupStyles.root, styles.root, sizes[size], vertical && styles.rootVertical), props)}>\n {label === undefined ? null : <FieldLabel variant=\"group\">{label}</FieldLabel>}\n <SliderTrack {...mergeStatefulStyles((state: SliderTrackRenderProps) => ({\n 0: {\n className: \"x16gdi9t x9f619 x1ypdohk xh8yej3 x1n2onr6\"\n },\n 2: {\n className: \"x9f619 x1ypdohk x1n2onr6 x5yr21d x1iyjqo2 xluoxwi x2lwn1j\"\n },\n 1: {\n className: \"x16gdi9t x9f619 xh8yej3 x1n2onr6 x1h6gzvc\"\n },\n 3: {\n className: \"x9f619 x1n2onr6 x5yr21d x1iyjqo2 xluoxwi x2lwn1j x1h6gzvc\"\n }\n })[!!vertical << 1 | !!state.isDisabled << 0], {})}>\n {trackContent({\n icon,\n showStops,\n size,\n vertical\n }, thumbLabels)}\n </SliderTrack>\n </RACSlider>;\n}\n\n// The fractions of the way along the track that a step lands on, ends left\n// out: those are drawn as the end stops, the page's gap in from each end.\nfunction stepsOf(state: SliderState) {\n const min = state.getThumbMinValue(0);\n const max = state.getThumbMaxValue(state.values.length - 1);\n const fractions: number[] = [];\n if (state.step <= 0) {\n return fractions;\n }\n for (let index = 1; min + index * state.step < max; index++) {\n fractions.push(state.getValuePercent(min + index * state.step));\n }\n return fractions;\n}\n\n// What a handle draws: its value while it is dragged or has keyboard focus.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// the result on its inputs.\nfunction thumbContent(index: number, vertical: boolean) {\n return (state: SliderThumbRenderProps) => state.isDragging || state.isFocusVisible ? <SliderOutput {...{\n 0: {\n className: \"x6s0dn4 x1c5gpgi xn3w4p2 x1dkaolv x9f619 x1girmi0 x78zum5 xkknnkr x14zspaw x1v9cpvo x3mk9i xbudbmw xl56j7k x155f00i x1lz68p4 x900493 x18fpw6u x10l6tqk xaf021q xuuh30 xuxw1ft\"\n },\n 1: {\n className: \"x6s0dn4 x1c5gpgi xn3w4p2 x1dkaolv x9f619 x1girmi0 x78zum5 xkknnkr x14zspaw x1v9cpvo xl56j7k x155f00i x1lz68p4 x900493 x18fpw6u x10l6tqk xuxw1ft xdd4er5 xwa60dl x15zsqls xhi6v0a x1cb1t30\"\n }\n }[!!vertical << 0]}>\n {state.state.getThumbValueLabel(index)}\n </SliderOutput> : null;\n}\nfunction thumbStyles(vertical: boolean) {\n return (state: SliderThumbRenderProps) => stylex.props(styles.thumb, vertical && styles.thumbVertical, (state.isDragging || state.isFocusVisible) && (vertical ? styles.thumbActiveVertical : styles.thumbActive), state.isDragging && styles.thumbDragging, state.isFocusVisible && styles.thumbFocused, state.isDisabled && styles.thumbDisabled);\n}\n\n// The track's parts and handles, from the slider's state: an inactive part\n// before the first handle of a range, the active part up to or between the\n// handles, and the inactive part after the last one carrying the stop.\nfunction trackContent(extras: Extras, thumbLabels: string[] | undefined) {\n return ({\n isDisabled,\n state\n }: SliderTrackRenderProps) => {\n const {\n icon,\n showStops,\n size,\n vertical\n } = extras;\n const fractions = state.values.map((_, index) => state.getThumbPercent(index));\n const first = fractions[0] ?? 0;\n const last = fractions.at(-1) ?? 0;\n const range = fractions.length > 1;\n const parts: Part[] = [...(range ? [{\n active: false,\n end: before(first),\n name: 'before',\n start: AT_END\n } as const] : []), {\n active: true,\n end: before(last),\n name: 'active',\n start: range ? after(first) : AT_END\n }, {\n active: false,\n end: AT_END,\n name: 'after',\n start: after(last)\n }];\n const hasIcon = icon !== undefined && icon !== null && !range && (size === 'md' || size === 'lg' || size === 'xl');\n const steps = showStops ? stepsOf(state) : [];\n const place = vertical ? placements.block : placements.inline;\n const innerStart = vertical ? styles.innerBlockStart : styles.innerInlineStart;\n const innerEnd = vertical ? styles.innerBlockEnd : styles.innerInlineEnd;\n return <>\n {parts.map(part => <span key={part.name} {...stylex.props(styles.segment, vertical && styles.segmentVertical, part.active && styles.active, part.active && hasIcon && styles.activeHoldingIcon, isDisabled && (part.active ? styles.activeDisabled : styles.inactiveDisabled), part.start !== AT_END && innerStart, part.end !== AT_END && innerEnd, place(insetOf(part.start), insetOf(part.end)))}>\n {partContent(part, extras, isDisabled, steps, part.active && hasIcon)}\n </span>)}\n {fractions.map((_, index) => <SliderThumb aria-label={thumbLabels?.[index]} index={index}\n // oxlint-disable-next-line react/no-array-index-key -- a handle's position is its identity\n key={index} {...mergeStatefulStyles(thumbStyles(vertical), {})}>\n {thumbContent(index, vertical)}\n </SliderThumb>)}\n </>;\n };\n}\nexport type { SliderProps, SliderSize };\nexport default Slider;"],"mappings":";;;;;;;;;;AAgFA,MAAMO,QAAQD;;AAEd,MAAME,OAAO;AAQb,MAAMC,QAAQ;CACZC,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBC,OAAO;CACT;CACAC,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBD,OAAO;CACT;CACAE,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClBF,OAAO;CACT;CACAG,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBH,OAAO;CACT;CACAI,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClBJ,OAAO;CACT;AACF;AACA,MAAMK,SAAS;CACbC,QAAQ;EACNC,QAAQ;EACRP,OAAO;CACT;CACAQ,gBAAgB;EACdD,QAAQ;EACRP,OAAO;CACT;CACAS,mBAAmB;EACjBC,QAAQ;EACRV,OAAO;CACT;CACAW,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRrB,OAAO;CACT;CACAsB,cAAc;EACZR,QAAQ;EACRd,OAAO;CACT;CACAuB,eAAe;EACbR,QAAQ;EACRf,OAAO;CACT;CACAwB,iBAAiB;EACfT,QAAQ;EACRf,OAAO;CACT;CACAyB,gBAAgB;EACdV,QAAQ;EACRf,OAAO;CACT;CACA0B,kBAAkB;EAChBX,QAAQ;EACRf,OAAO;CACT;CACA2B,cAAc;EACZC,QAAQ;EACRV,QAAQ;EACRC,QAAQ;EACRnB,OAAO;CACT;CACA6B,kBAAkB;EAChBtB,QAAQ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AAQ5B,WAAWZ,WAAWC,QAAQD,WAAWM;EACvD,MAAMgF,aAAa1E,WAAWpF,OAAO4B,kBAAkB5B,OAAOgC;EAC9D,MAAM+H,WAAW3E,WAAWpF,OAAOyB,gBAAgBzB,OAAO+B;EAC1D,OAAO,qBAAA,UAAA,EAAA,UAAA,CACF8H,MAAM1C,KAAIZ,SAAQ,oBAAC,QAAD;GAAsB,GAAItH,MAAae,OAAOmC,SAASiD,YAAYpF,OAAO0C,iBAAiB6D,KAAKtG,UAAUD,OAAOC,QAAQsG,KAAKtG,UAAUyG,WAAW1G,OAAOI,mBAAmB4F,eAAeO,KAAKtG,SAASD,OAAOG,iBAAiBH,OAAOwB,mBAAmB+E,KAAK7B,UAAUiB,UAAUmE,YAAYvD,KAAK5B,QAAQgB,UAAUoE,UAAU/C,MAAMb,QAAQI,KAAK7B,KAAK,GAAGyB,QAAQI,KAAK5B,GAAG,CAAC,CAAC;GAC7X2B,UAAAA,YAAYC,MAAMC,QAAQR,YAAYS,OAAOF,KAAKtG,UAAUyG,OAAO;EAChE,GAFsBH,KAAKhB,IAE3B,CAAC,GACRsD,UAAU1B,KAAKoC,GAAGR,UAAU,oBAAC,aAAD;GAAa,cAAYrD,cAAcqD;GAAeA;GAEzE,GAAI1J,oBAAoBiK,YAAYlE,QAAQ,GAAG,CAAC,CAAC;GACtD8D,UAAAA,aAAaH,OAAO3D,QAAQ;EAClB,GAFZ2D,KAEY,CAAC,CAClB,EAAA,CAAA;CACJ;AACF"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","Slider","RACSlider","groupStyles","mergeStatefulStyles","GAP","CLEAR","STOP","sizes","lg","$$css","md","sm","xl","xs","styles","active","kWkggS","activeDisabled","activeHoldingIcon","k9g6sI","icon","kGNEyG","kZKoxP","kMwMTN","k1xSpc","kGuDYH","kzqmXN","k87sOh","kLqNvP","kjj79g","kVAEAm","iconDisabled","iconRoomBlock","iconRoomBlockXl","iconRoomInline","iconRoomInlineXl","iconVertical","krVfgx","inactiveDisabled","indicator","kaIpWk","kB7OPa","kMv6JI","k63SB2","kb6lSQ","kLWn49","k7Eaqz","kg3NbH","k3aq6I","khDVqt","indicatorVertical","kt4wiu","innerBlockEnd","kT0f0o","kVL7Gh","innerBlockStart","kfmiAY","krdFHd","innerInlineEnd","innerInlineStart","root","rootVertical","segment","kVAM5u","ksu8eU","kMzoRj","kVQacm","segmentVertical","stop","stopActive","stopActiveDisabled","stopDisabled","stopEnd","stopEndVertical","stopStart","stopStartVertical","stopVertical","thumb","k6CgDc","kkrTdU","kjBf7l","kInvED","k3XXqK","kMeerF","kIyJzY","k1ekBW","kAMwcw","thumbActive","thumbActiveVertical","thumbDisabled","thumbDragging","thumbFocused","thumbVertical","kbCHJM","_temp","_temp2","placements","block","start","end","val","undefined","indicatorAt","fraction","inline","stopBlock","offset","stopInline","showStops","size","vertical","px","name","label","orientation","thumbLabels","AT_END","after","before","iconRoom","insetIcon","isDisabled","room","props","insetOf","offsetIn","share","partContent","part","extras","steps","hasIcon","from","to","length","inside","filter","place","atStart","atEnd","map","t0","$","T0","t1","t2","t3","t4","t5","t6","t7","t8","t9","state","0","className","2","1","3","trackContent","stepsOf","min","getThumbMinValue","max","getThumbMaxValue","values","fractions","step","index","push","getValuePercent","thumbContent","isDragging","isFocusVisible","getThumbPercent","getThumbValueLabel","thumbStyles","_","first","last","at","range","parts","innerStart","innerEnd"],"sources":["../../../src/components/slider/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { SliderProps as RACSliderProps, SliderState, SliderThumbRenderProps, SliderTrackRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Slider as RACSlider, SliderOutput, SliderThumb, SliderTrack } from 'react-aria-components';\nimport { FieldLabel } from '../../field';\nimport { groupStyles } from '../../field/styles';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The sliders page. At the size its tokens call extra-small, the default: a\n// 16dp track with an 8dp corner, the active part in primary and the inactive\n// part in secondary container, a 4dp stop in on secondary container 6dp from\n// the inactive end, and a handle 4dp wide and 44dp tall in primary that\n// narrows to 2dp while pressed or focused. The track parts on each side of\n// the handle, with 6dp of space between them and it, and their corners\n// against the handle are 2dp where their outer ends are full. Disabled, the\n// active part and the handle are on surface at the disabled content opacity\n// and the inactive part at the disabled container opacity.\n//\n// `size` takes the page's four larger sizes, which thicken the track and\n// round its ends more, and lengthen the handle from M up:\n//\n// | Size | Track | Corner | Handle | Inset icon |\n// | ---- | ----- | ------ | ------ | ---------- |\n// | xs | 16dp | 8dp | 44dp | |\n// | sm | 24dp | 8dp | 44dp | |\n// | md | 40dp | 12dp | 52dp | 24dp |\n// | lg | 56dp | 16dp | 68dp | 24dp |\n// | xl | 96dp | 28dp | 108dp | 32dp |\n//\n// The handle stays 4dp wide, the corners against it 2dp and the space beside\n// it 6dp at every size.\n//\n// `showStops` is the page's stops configuration, which it used to call the\n// discrete slider: a 4dp stop at every step, in on primary on the active part\n// and on secondary container on the inactive one, so the reader can see\n// where the handle can land. The stops at the two ends sit 6dp in from them,\n// as the single stop does. A part clips what it holds, which is what hides\n// the stops beside the handle: the part ends 6dp short of it.\n//\n// `icon` is the page's inset icon, at the start of the active part in on\n// primary, from M up: the page gives it a size at M, L and XL alone. It is\n// 10dp in from the part's start, which is MDC-Android's padding, since the\n// page gives none, and like MDC-Android it is drawn only while the part has\n// room for it and that padding on both sides, and for a single handle.\n//\n// The value indicator is the page's label: inverse surface under label-large\n// in inverse on surface, 44dp tall and at least 48dp wide, 12dp above the\n// handle. It shows while the handle is dragged or has keyboard focus, and it\n// is React Aria's `SliderOutput`, so what it shows is what the slider\n// announces.\n//\n// The indicator is drawn inside the slider, as MDC-Android's `withinBounds`\n// label behaviour draws it, rather than floating over whatever is above. A\n// horizontal slider keeps the indicator's 44dp and its 12dp of clearance\n// above the track, between the label and the track, since the indicator\n// shares that space with the label and would otherwise cover it. Along the\n// track it is centred on the handle until that would carry it past either\n// end, and is then held to the track's length, so at 0 and at 100 it sits\n// over the handle without running off the slider's edge.\n//\n// React Aria's `Slider` is the root, `SliderTrack` the strip the handles are\n// placed along by percent, and `SliderThumb` each handle around a visually\n// hidden range input. The track's parts are drawn here from those percents\n// rather than with `SliderFill`, since the page's parts stop short of the\n// handle on both sides and the fill runs up to it. A range slider is the\n// same track with two handles and the active part between them.\n//\n// Vertical, the same parts run along the block axis, with the active part\n// rising from the bottom and the indicator to the start side of the handle.\n// The slider keeps the indicator's least width and its 12dp of clearance on\n// that side of the track, as a horizontal one keeps its height above, and\n// the indicator is held to the track's length at the ends the same way, so\n// at 100 it stays below the label rather than reaching up beside it. A value\n// wider than three digits grows the indicator past that room, towards the\n// slider's start edge.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The sliders page's own measurements, which are constants of the component\n// rather than steps of the consumer's spacing scale. The clearance used to be\n// read off `spacing.sm` — true at its default 8, since 6 plus half the\n// handle comes to the same — so a theme moving that step opened the gap\n// beside the handle while the stop, written as the literal it is, stayed\n// where the page puts it.\nconst GAP = 6;\nconst HANDLE_WIDTH = 4;\n/** How far a part stops short of a handle's centre. */\nconst CLEAR = GAP + HANDLE_WIDTH / 2;\n/** A stop's size. */\nconst STOP = 4;\n/** MDC-Android's padding either side of the inset icon. */\nconst ICON_PADDING = 10;\n/** The value indicator's height. */\nconst INDICATOR = 44;\n/**\n * The value indicator's least width, which holds three digits at\n * label-large. A vertical slider keeps this much room beside its track.\n */\nconst INDICATOR_WIDTH = 48;\ntype SliderSize = 'lg' | 'md' | 'sm' | 'xl' | 'xs';\n\n// The sizes, as the custom properties every part reads: the track's\n// thickness, its outer corner and the handle's length, which the track\n// strip takes as its own thickness too.\nconst sizes = {\n lg: {\n \"--slider-corner\": \"x1hr852m\",\n \"--slider-handle\": \"x1i1s3m4\",\n \"--slider-icon\": \"xsfv7fh\",\n \"--slider-track\": \"xdrquod\",\n $$css: true\n },\n md: {\n \"--slider-corner\": \"x1welmdy\",\n \"--slider-handle\": \"x1290pjo\",\n \"--slider-icon\": \"xsfv7fh\",\n \"--slider-track\": \"xhx1aj5\",\n $$css: true\n },\n sm: {\n \"--slider-corner\": \"x1y8vi8n\",\n \"--slider-handle\": \"x1czf5nl\",\n \"--slider-track\": \"xf334ng\",\n $$css: true\n },\n xl: {\n \"--slider-corner\": \"x1tzw2no\",\n \"--slider-handle\": \"x1aoofsu\",\n \"--slider-icon\": \"xmfnedx\",\n \"--slider-track\": \"x1s6dhuk\",\n $$css: true\n },\n xs: {\n \"--slider-corner\": \"x1y8vi8n\",\n \"--slider-handle\": \"x1czf5nl\",\n \"--slider-track\": \"x16oikcs\",\n $$css: true\n }\n};\nconst styles = {\n active: {\n kWkggS: \"xnety89 x1jzqe4\",\n $$css: true\n },\n activeDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n activeHoldingIcon: {\n k9g6sI: \"xpqogu8\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xi7vqlm\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"xuu3ggl\",\n kzqmXN: \"xoxpges\",\n k87sOh: \"xdtafdd\",\n kLqNvP: \"xi5uv41\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n iconDisabled: {\n kMwMTN: \"x1girmi0\",\n $$css: true\n },\n iconRoomBlock: {\n k1xSpc: \"x1uo08md x78zum5\",\n $$css: true\n },\n iconRoomBlockXl: {\n k1xSpc: \"x2mjljv x78zum5\",\n $$css: true\n },\n iconRoomInline: {\n k1xSpc: \"x1cueg3v x78zum5\",\n $$css: true\n },\n iconRoomInlineXl: {\n k1xSpc: \"x18ymn08 x78zum5\",\n $$css: true\n },\n iconVertical: {\n krVfgx: \"x1jn9clo\",\n k87sOh: \"x80663w\",\n kLqNvP: \"x1m57d8a\",\n $$css: true\n },\n inactiveDisabled: {\n kWkggS: \"x19v6zzp\",\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"x1c5gpgi\",\n kZKoxP: \"xn3w4p2\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1girmi0\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n krVfgx: \"x3mk9i\",\n kLqNvP: \"xbudbmw\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n k7Eaqz: \"x900493\",\n kg3NbH: \"x18fpw6u\",\n kVAEAm: \"x10l6tqk\",\n k3aq6I: \"xc01soo x1gwzs1v\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n indicatorVertical: {\n krVfgx: \"xdd4er5\",\n k87sOh: \"xwa60dl\",\n kt4wiu: \"x15zsqls\",\n kLqNvP: \"xhi6v0a\",\n k3aq6I: \"xj0i120\",\n $$css: true\n },\n innerBlockEnd: {\n kT0f0o: \"x1ui04y5\",\n kVL7Gh: \"x6en5u8\",\n $$css: true\n },\n innerBlockStart: {\n kfmiAY: \"x1e4oeot\",\n krdFHd: \"xr9e8f9\",\n $$css: true\n },\n innerInlineEnd: {\n kT0f0o: \"x1ui04y5\",\n kfmiAY: \"x1e4oeot\",\n $$css: true\n },\n innerInlineStart: {\n kVL7Gh: \"x6en5u8\",\n krdFHd: \"xr9e8f9\",\n $$css: true\n },\n root: {\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n rootVertical: {\n kGNEyG: \"x1cy8zhl\",\n kZKoxP: \"x1u5z0ei\",\n kzqmXN: \"x14atkfc\",\n $$css: true\n },\n segment: {\n kWkggS: \"x15dekr4 x9yvj25\",\n kZKoxP: \"x9w084k\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1xpg3mf\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n k87sOh: \"x1i1s66i\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n segmentVertical: {\n kZKoxP: \"xt7dq6l\",\n kzqmXN: \"x3fzmgt\",\n k87sOh: \"x80663w\",\n kLqNvP: \"x9k4rl8\",\n $$css: true\n },\n stop: {\n kWkggS: \"x81krv7 x1tt9vl1\",\n kZKoxP: \"xqu0tyb\",\n kaIpWk: \"x16fbrrb\",\n kzqmXN: \"x51ohtg\",\n k87sOh: \"x17a0tka\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n stopActive: {\n kWkggS: \"x1ntwmx2 x1sir5s4\",\n $$css: true\n },\n stopActiveDisabled: {\n kWkggS: \"x1dbj914\",\n $$css: true\n },\n stopDisabled: {\n kWkggS: \"x1crcgwy\",\n $$css: true\n },\n stopEnd: {\n kt4wiu: \"x1f889gz\",\n $$css: true\n },\n stopEndVertical: {\n k87sOh: \"x1atx4j1\",\n kt4wiu: \"x1woyocn\",\n $$css: true\n },\n stopStart: {\n kLqNvP: \"xrr41r3\",\n $$css: true\n },\n stopStartVertical: {\n krVfgx: \"xrb244j\",\n k87sOh: \"x80663w\",\n kLqNvP: \"xhi6v0a\",\n $$css: true\n },\n stopVertical: {\n k87sOh: \"x80663w\",\n kLqNvP: \"xml7xvy\",\n $$css: true\n },\n thumb: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89 x1jzqe4\",\n kZKoxP: \"x16gdi9t\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1dkaolv\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1jm3nie\",\n kzqmXN: \"x51ohtg\",\n k87sOh: \"xwa60dl\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xdl150w\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n thumbActive: {\n kzqmXN: \"xfo62xy\",\n $$css: true\n },\n thumbActiveVertical: {\n kZKoxP: \"x36qwtl\",\n kzqmXN: \"xluoxwi\",\n $$css: true\n },\n thumbDisabled: {\n kWkggS: \"x1crcgwy\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n thumbDragging: {\n kkrTdU: \"xi9pz9s\",\n $$css: true\n },\n thumbFocused: {\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n thumbVertical: {\n kZKoxP: \"xqu0tyb\",\n kzqmXN: \"xluoxwi\",\n k87sOh: \"x80663w\",\n kbCHJM: \"x1nrll8i\",\n $$css: true\n }\n};\n\n// Where each part of the track starts and ends, as insets from the track's\n// two ends, and where a stop sits inside a part. Dynamic styles, since the\n// percents come from the value at render time and StyleX compiles its\n// classes ahead of time; each writes its insets to custom properties inline.\n// `indicatorAt` is how far along the track a handle is, as a fraction, which\n// is what the value indicator over it is held to the track's ends by.\nconst _temp = {\n krVfgx: \"xiicpxy\",\n k87sOh: \"x5mnzd7\",\n \"$$css\": true\n};\nconst _temp2 = {\n krVfgx: \"xiicpxy\",\n \"$$css\": true\n};\nconst placements = {\n block: (start: string, end: string) => [_temp, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start),\n \"--x-insetBlockStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end)\n }],\n indicatorAt: (fraction: number) => [fraction !== undefined && {\n \"--slider-at\": fraction != null ? \"x1knt7uz\" : \"\",\n $$css: true\n }, {\n \"--x---slider-at\": fraction != null ? fraction : undefined\n }],\n inline: (start: string, end: string) => [end !== undefined && {\n kt4wiu: end != null ? \"xqxgn94\" : \"\",\n $$css: true\n }, start !== undefined && {\n kLqNvP: start != null ? \"x1lxsm33\" : \"\",\n $$css: true\n }, {\n \"--x-insetInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }],\n stopBlock: (offset: string) => [_temp2, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(offset)\n }],\n stopInline: (offset: string) => [offset !== undefined && {\n kLqNvP: offset != null ? \"x1lxsm33\" : \"\",\n $$css: true\n }, {\n \"--x-insetInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(offset)\n }]\n};\n\n/** What a track draws besides its parts and handles. */\ntype Extras = {\n icon: ReactNode;\n showStops: boolean;\n size: SliderSize;\n vertical: boolean;\n};\n\n/** One end of a part: a fraction of the track's length, and pixels on top. */\ntype Inset = {\n fraction: number;\n px: number;\n};\n\n/**\n * A part of the track, by the insets of its two ends from the track's, and\n * which of the three it is: the inactive part before a range's first handle,\n * the active part, or the inactive part after the last handle.\n */\ntype Part = {\n active: boolean;\n end: Inset;\n name: 'active' | 'after' | 'before';\n start: Inset;\n};\ntype SliderProps = Omit<RACSliderProps, 'children' | 'orientation'> & {\n /**\n * The page's inset icon, at the start of the active part, from `md` up:\n * the page gives it a size at M, L and XL alone. Drawn for a single\n * handle, and only while the active part has room for it.\n */\n icon?: ReactNode;\n /**\n * What the slider sets. A slider that a row labels some other way leaves\n * it out and passes `aria-label` instead.\n */\n label?: string;\n /**\n * Along which axis the handle moves. A vertical slider is 240px tall until\n * `style` on the root says otherwise.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * A stop at every step, the page's stops configuration, so the reader can\n * see where the handle can land. Meant for a slider with a handful of\n * steps: each stop is a 4dp dot, and a fine step draws a crowd of them.\n * @default false\n */\n showStops?: boolean;\n /**\n * The page's sizes, by the track's thickness: 16dp at `xs`, 24dp at `sm`,\n * 40dp at `md`, 56dp at `lg` and 96dp at `xl`, with the handle 44dp long\n * up to `sm` and 52dp, 68dp and 108dp past it.\n * @default 'xs'\n */\n size?: SliderSize;\n /**\n * A name for each handle of a range slider, in order, since two handles\n * named by the same label cannot be told apart.\n */\n thumbLabels?: string[];\n};\nconst AT_END: Inset = {\n fraction: 0,\n px: 0\n};\n\n// A part's start inset, clear of a handle at `fraction` of the way along. The\n// fraction lands on the handle's centre, so half the handle's width joins the\n// page's gap to reach its edge.\nfunction after(fraction: number): Inset {\n return {\n fraction,\n px: CLEAR\n };\n}\n\n// A part's end inset, clear of a handle at `fraction` of the way along.\nfunction before(fraction: number): Inset {\n return {\n fraction: 1 - fraction,\n px: CLEAR\n };\n}\n\n// The container query that hides the inset icon for want of room: the part's\n// length along the track, against the icon and its padding at this size.\nfunction iconRoom(size: SliderSize, vertical: boolean) {\n if (vertical) {\n return size === 'xl' ? styles.iconRoomBlockXl : styles.iconRoomBlock;\n }\n return size === 'xl' ? styles.iconRoomInlineXl : styles.iconRoomInline;\n}\n\n// The inset icon, at the foot of the active part, while the part has room.\nfunction insetIcon({\n icon,\n size,\n vertical\n}: Extras, isDisabled: boolean): ReactNode {\n const room = iconRoom(size, vertical);\n return <span {...stylex.props(styles.icon, vertical && styles.iconVertical, room, isDisabled && styles.iconDisabled)}>\n {icon}\n </span>;\n}\nfunction insetOf({\n fraction,\n px\n}: Inset) {\n return `calc(${fraction * 100}% + ${px}px)`;\n}\n\n// Where a stop at `fraction` of the way along the track starts inside a part.\n// The part's own length is the `100%` the expression has to work from, and\n// the track's is that plus both insets, so a fraction of the track is a\n// share of the part's length plus their pixels.\nfunction offsetIn({\n end,\n start\n}: Part, fraction: number) {\n const share = 1 - start.fraction - end.fraction;\n const scale = (fraction - start.fraction) / share;\n return `calc(${scale} * (100% + ${start.px + end.px}px) - ${start.px + STOP / 2}px)`;\n}\n\n// What a part holds: a stop at each step inside it, the end stops where it\n// reaches the track's ends, and the inset icon.\nfunction partContent(part: Part, extras: Extras, isDisabled: boolean, steps: number[], hasIcon: boolean) {\n const {\n showStops,\n vertical\n } = extras;\n const stop = [styles.stop, vertical && styles.stopVertical, part.active && styles.stopActive, isDisabled && (part.active ? styles.stopActiveDisabled : styles.stopDisabled)];\n const from = part.start.fraction;\n const to = 1 - part.end.fraction;\n const length = 1 - part.start.fraction - part.end.fraction;\n const inside = showStops && length > 0 ? steps.filter(fraction => fraction >= from && fraction <= to) : [];\n const place = vertical ? placements.stopBlock : placements.stopInline;\n const atStart = part.start.fraction === 0 && part.start.px === 0;\n // The single stop at the inactive end is drawn with or without the stops\n // configuration; the one at the start is the configuration's own.\n const atEnd = part.end.fraction === 0 && part.end.px === 0 && !part.active;\n return <>\n {hasIcon ? insetIcon(extras, isDisabled) : null}\n {showStops && atStart ? <span {...stylex.props(...stop, vertical ? styles.stopStartVertical : styles.stopStart)} /> : null}\n {inside.map(fraction => <span key={fraction} {...stylex.props(...stop, place(offsetIn(part, fraction)))} />)}\n {atEnd ? <span {...stylex.props(...stop, vertical ? styles.stopEndVertical : styles.stopEnd)} /> : null}\n </>;\n}\n\n/**\n * A slider for one value, or for a range when the value is a pair. The value\n * is React Aria's: pass `value` with `onChange` to control it, or\n * `defaultValue` to let it keep its own, with `minValue`, `maxValue` and\n * `step` to shape it and `formatOptions` to say how it reads. Arrow keys\n * move a handle by a step, Page Up and Page Down by ten, Home and End to\n * the ends.\n *\n * The call site's `className` and `style` land on the slider as a whole,\n * which is the element a layout positions and the one that gives a vertical\n * slider its height.\n */\nfunction Slider({\n icon,\n label,\n orientation = 'horizontal',\n showStops = false,\n size = 'xs',\n thumbLabels,\n ...props\n}: RefAttributes<HTMLDivElement> & SliderProps) {\n const vertical = orientation === 'vertical';\n return <RACSlider orientation={orientation} {...props} {...mergeStatefulStyles(stylex.props(groupStyles.root, styles.root, sizes[size], vertical && styles.rootVertical), props)}>\n {label === undefined ? null : <FieldLabel variant=\"group\">{label}</FieldLabel>}\n <SliderTrack {...mergeStatefulStyles((state: SliderTrackRenderProps) => ({\n 0: {\n className: \"x16gdi9t x9f619 x12h1iku x1ypdohk xh8yej3 xt6307q x1n2onr6\"\n },\n 2: {\n className: \"x9f619 x1ypdohk x1n2onr6 x5yr21d xpqogu8 x1iyjqo2 xluoxwi xdj266r xrnipbp x2lwn1j\"\n },\n 1: {\n className: \"x16gdi9t x9f619 x12h1iku xh8yej3 xt6307q x1n2onr6 x1h6gzvc\"\n },\n 3: {\n className: \"x9f619 x1n2onr6 x5yr21d xpqogu8 x1iyjqo2 xluoxwi xdj266r xrnipbp x2lwn1j x1h6gzvc\"\n }\n })[!!vertical << 1 | !!state.isDisabled << 0], {})}>\n {trackContent({\n icon,\n showStops,\n size,\n vertical\n }, thumbLabels)}\n </SliderTrack>\n </RACSlider>;\n}\n\n// The fractions of the way along the track that a step lands on, ends left\n// out: those are drawn as the end stops, the page's gap in from each end.\nfunction stepsOf(state: SliderState) {\n const min = state.getThumbMinValue(0);\n const max = state.getThumbMaxValue(state.values.length - 1);\n const fractions: number[] = [];\n if (state.step <= 0) {\n return fractions;\n }\n for (let index = 1; min + index * state.step < max; index++) {\n fractions.push(state.getValuePercent(min + index * state.step));\n }\n return fractions;\n}\n\n// What a handle draws: its value while it is dragged or has keyboard focus.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// the result on its inputs.\nfunction thumbContent(index: number, vertical: boolean) {\n return (state: SliderThumbRenderProps) => state.isDragging || state.isFocusVisible ? <SliderOutput {...stylex.props(styles.indicator, placements.indicatorAt(state.state.getThumbPercent(index)), vertical && styles.indicatorVertical)}>\n {state.state.getThumbValueLabel(index)}\n </SliderOutput> : null;\n}\nfunction thumbStyles(vertical: boolean) {\n return (state: SliderThumbRenderProps) => stylex.props(styles.thumb, vertical && styles.thumbVertical, (state.isDragging || state.isFocusVisible) && (vertical ? styles.thumbActiveVertical : styles.thumbActive), state.isDragging && styles.thumbDragging, state.isFocusVisible && styles.thumbFocused, state.isDisabled && styles.thumbDisabled);\n}\n\n// The track's parts and handles, from the slider's state: an inactive part\n// before the first handle of a range, the active part up to or between the\n// handles, and the inactive part after the last one carrying the stop.\nfunction trackContent(extras: Extras, thumbLabels: string[] | undefined) {\n return ({\n isDisabled,\n state\n }: SliderTrackRenderProps) => {\n const {\n icon,\n showStops,\n size,\n vertical\n } = extras;\n const fractions = state.values.map((_, index) => state.getThumbPercent(index));\n const first = fractions[0] ?? 0;\n const last = fractions.at(-1) ?? 0;\n const range = fractions.length > 1;\n const parts: Part[] = [...(range ? [{\n active: false,\n end: before(first),\n name: 'before',\n start: AT_END\n } as const] : []), {\n active: true,\n end: before(last),\n name: 'active',\n start: range ? after(first) : AT_END\n }, {\n active: false,\n end: AT_END,\n name: 'after',\n start: after(last)\n }];\n const hasIcon = icon !== undefined && icon !== null && !range && (size === 'md' || size === 'lg' || size === 'xl');\n const steps = showStops ? stepsOf(state) : [];\n const place = vertical ? placements.block : placements.inline;\n // Vertical, a part starts at its block end, since the value grows from\n // the bottom — `placements.block` turns the axis over the same way — so\n // the corners it turns to a handle at its start are the block end's.\n const innerStart = vertical ? styles.innerBlockEnd : styles.innerInlineStart;\n const innerEnd = vertical ? styles.innerBlockStart : styles.innerInlineEnd;\n return <>\n {parts.map(part => <span key={part.name} {...stylex.props(styles.segment, vertical && styles.segmentVertical, part.active && styles.active, part.active && hasIcon && styles.activeHoldingIcon, isDisabled && (part.active ? styles.activeDisabled : styles.inactiveDisabled), part.start !== AT_END && innerStart, part.end !== AT_END && innerEnd, place(insetOf(part.start), insetOf(part.end)))}>\n {partContent(part, extras, isDisabled, steps, part.active && hasIcon)}\n </span>)}\n {fractions.map((_, index) => <SliderThumb aria-label={thumbLabels?.[index]} index={index}\n // oxlint-disable-next-line react/no-array-index-key -- a handle's position is its identity\n key={index} {...mergeStatefulStyles(thumbStyles(vertical), {})}>\n {thumbContent(index, vertical)}\n </SliderThumb>)}\n </>;\n };\n}\nexport type { SliderProps, SliderSize };\nexport default Slider;"],"mappings":";;;;;;;;;;AA+FA,MAAMO,QAAQD;;AAEd,MAAME,OAAO;AAeb,MAAMC,QAAQ;CACZC,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBC,OAAO;CACT;CACAC,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBD,OAAO;CACT;CACAE,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClBF,OAAO;CACT;CACAG,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,iBAAiB;EACjB,kBAAkB;EAClBH,OAAO;CACT;CACAI,IAAI;EACF,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClBJ,OAAO;CACT;AACF;AACA,MAAMK,SAAS;CACbC,QAAQ;EACNC,QAAQ;EACRP,OAAO;CACT;CACAQ,gBAAgB;EACdD,QAAQ;EACRP,OAAO;CACT;CACAS,mBAAmB;EACjBC,QAAQ;EACRV,OAAO;CACT;CACAW,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRrB,OAAO;CACT;CACAsB,cAAc;EACZR,QAAQ;EACRd,OAAO;CACT;CACAuB,eAAe;EACbR,QAAQ;EACRf,OAAO;CACT;CACAwB,iBAAiB;EACfT,QAAQ;EACRf,OAAO;CACT;CACAyB,gBAAgB;EACdV,QAAQ;EACRf,OAAO;CACT;CACA0B,kBAAkB;EAChBX,QAAQ;EACRf,OAAO;CACT;CACA2B,cAAc;EACZC,QAAQ;EACRV,QAAQ;EACRC,QAAQ;EACRnB,OAAO;CACT;CACA6B,kBAAkB;EA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AAYS,OAAOF,KAAKjH,UAAUoH,OAAO;EAChE,GAFsBH,KAAKhB,IAE3B,CAAC,GACRsD,UAAU1B,KAAKqC,GAAGT,UAAU,oBAAC,aAAD;GAAa,cAAYrD,cAAcqD;GAAeA;GAEzE,GAAIrK,oBAAoB6K,YAAYlE,QAAQ,GAAG,CAAC,CAAC;GACtD6D,UAAAA,aAAaH,OAAO1D,QAAQ;EAClB,GAFZ0D,KAEY,CAAC,CAClB,EAAA,CAAA;CACJ;AACF"}
@@ -1,5 +1,11 @@
1
1
  import { ReactNode, RefAttributes } from "react";
2
2
  import { CellProps, ColumnProps, ResizableTableContainerProps, RowProps, TableBodyProps as TableBodyProps$1, TableFooterProps as TableFooterProps$1, TableHeaderProps as TableHeaderProps$1, TableLoadMoreItemProps, TableProps as TableProps$1 } from "react-aria-components";
3
+ /**
4
+ * Which end of its cells a column's text sits at: `start` for words, `end`
5
+ * for numbers, so the digits stack by place. Both follow the writing
6
+ * direction.
7
+ */
8
+ type TableAlign = 'end' | 'start';
3
9
  type TableBodyProps<T extends object = object> = Omit<TableBodyProps$1<T>, 'className' | 'renderEmptyState' | 'style'> & {
4
10
  /** A function may compute the class from the body's render state. */
5
11
  className?: TableBodyProps$1<T>['className'];
@@ -13,7 +19,14 @@ type TableBodyProps<T extends object = object> = Omit<TableBodyProps$1<T>, 'clas
13
19
  /** A function may compute the style from the body's render state. */
14
20
  style?: TableBodyProps$1<T>['style'];
15
21
  };
16
- type TableCellProps = Omit<CellProps, 'children' | 'className' | 'style'> & {
22
+ type TableCellProps = {
23
+ /**
24
+ * Which end of the cell its text sits at. Give it the value its column was
25
+ * given — React Aria hands a cell nothing of its column's, so a cell does
26
+ * not follow the header on its own.
27
+ * @default 'start'
28
+ */
29
+ align?: TableAlign;
17
30
  /** What the cell holds. */
18
31
  children?: ReactNode;
19
32
  /** A function may compute the class from the cell's render state. */
@@ -26,8 +39,16 @@ type TableCellProps = Omit<CellProps, 'children' | 'className' | 'style'> & {
26
39
  selection?: boolean;
27
40
  /** A function may compute the style from the cell's render state. */
28
41
  style?: CellProps['style'];
29
- };
42
+ } & Omit<CellProps, 'children' | 'className' | 'style'>;
30
43
  type TableColumnProps = {
44
+ /**
45
+ * Which end of the header cell the name sits at. `end` is for a column of
46
+ * numbers: the name goes against the end padding, over the digits, with
47
+ * the sort arrow before it rather than after. Give the column's cells the
48
+ * same `align`.
49
+ * @default 'start'
50
+ */
51
+ align?: TableAlign;
31
52
  /** The column's name. */
32
53
  children?: ReactNode;
33
54
  /** A function may compute the class from the column's render state. */
@@ -161,7 +182,7 @@ declare function TableBody<T extends object = object>({ renderEmptyState, ...pro
161
182
  * the cell would hold. On a disabled row the cell fades as a whole, so what
162
183
  * it holds fades with its text.
163
184
  */
164
- declare function TableCell({ children, selection, ...props }: RefAttributes<HTMLTableCellElement> & TableCellProps): import("react").JSX.Element;
185
+ declare function TableCell({ align, children, selection, ...props }: RefAttributes<HTMLTableCellElement> & TableCellProps): import("react").JSX.Element;
165
186
  /**
166
187
  * One column. `allowsSorting` is React Aria's and makes the header cell
167
188
  * itself the control that sorts; the arrow appears on the column the
@@ -172,7 +193,7 @@ declare function TableCell({ children, selection, ...props }: RefAttributes<HTML
172
193
  * that cannot collide — a column and a row with one id between them leaves
173
194
  * the table with no columns at all.
174
195
  */
175
- declare function TableColumn({ children, resizable, selection, ...props }: RefAttributes<HTMLTableCellElement> & TableColumnProps): import("react").JSX.Element;
196
+ declare function TableColumn({ align, children, resizable, selection, ...props }: RefAttributes<HTMLTableCellElement> & TableColumnProps): import("react").JSX.Element;
176
197
  /**
177
198
  * A row under the body, for totals and the like. It is not part of the
178
199
  * selection or the keyboard navigation — React Aria keeps it out of both.
@@ -196,4 +217,4 @@ declare function TableLoadMore({ label, ref, ...props }: RefAttributes<HTMLTable
196
217
  * row is pressed.
197
218
  */
198
219
  declare function TableRow<T extends object = object>(props: RefAttributes<HTMLTableRowElement> & TableRowProps<T>): import("react").JSX.Element;
199
- export { TableBody, type TableBodyProps, TableCell, type TableCellProps, TableColumn, type TableColumnProps, TableFooter, type TableFooterProps, TableHeader, type TableHeaderProps, TableLoadMore, type TableLoadMoreProps, type TableProps, TableRow, type TableRowProps, Table as default };
220
+ export { type TableAlign, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableColumn, type TableColumnProps, TableFooter, type TableFooterProps, TableHeader, type TableHeaderProps, TableLoadMore, type TableLoadMoreProps, type TableProps, TableRow, type TableRowProps, Table as default };
@@ -26,6 +26,10 @@ const styles = {
26
26
  kSiTet: "x1ppv7y9",
27
27
  $$css: true
28
28
  },
29
+ cellEnd: {
30
+ k9WMMc: "xp4054r",
31
+ $$css: true
32
+ },
29
33
  focus: {
30
34
  kjBf7l: "xrgy624 x1v8yhc2",
31
35
  kInvED: "x2ssjo2",
@@ -83,6 +87,10 @@ const styles = {
83
87
  khDVqt: "xuxw1ft",
84
88
  $$css: true
85
89
  },
90
+ selectionSelected: {
91
+ kAXs8y: "xr5dkdi",
92
+ $$css: true
93
+ },
86
94
  sticky: {
87
95
  kWkggS: "x14s9m32",
88
96
  kGVxlE: "x1ixd52e",
@@ -118,16 +126,19 @@ function cellContent(children, selection, label) {
118
126
  slot: "selection"
119
127
  });
120
128
  }
121
- function cellStyles(selection) {
122
- return (state) => props(styles.cell, styles.focus, selection ? styles.selection : state.isDisabled && styles.cellDisabled);
129
+ function cellStyles(align, selection) {
130
+ return (state) => props(styles.cell, align === "end" && styles.cellEnd, styles.focus, selection ? styles.selection : state.isDisabled && styles.cellDisabled, selection && state.isSelected && styles.selectionSelected);
123
131
  }
124
- function columnContent(children, selection, label, resizable, resizeLabel) {
132
+ function columnContent(children, align, selection, label, resizable, resizeLabel) {
125
133
  if (selection) return /* @__PURE__ */ jsx(Checkbox, {
126
134
  "aria-label": label,
127
135
  slot: "selection"
128
136
  });
129
137
  return (state) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
130
- className: "x6s0dn4 x78zum5 x126z3so",
138
+ ...{
139
+ 0: { className: "x6s0dn4 x78zum5 x126z3so" },
140
+ 1: { className: "x6s0dn4 x78zum5 x126z3so x15zctf7 x1nhvcw1" }
141
+ }[!!(align === "end") << 0],
131
142
  children: [children, sortArrowFor(state.sortDirection)]
132
143
  }), resizable ? /* @__PURE__ */ jsx(ColumnResizer, {
133
144
  "aria-label": resizeLabel,
@@ -135,8 +146,8 @@ function columnContent(children, selection, label, resizable, resizeLabel) {
135
146
  children: resizerRule
136
147
  }) : null] });
137
148
  }
138
- function columnStyles(selection, sticky) {
139
- return (state) => props(styles.cell, styles.header, styles.focus, sticky && styles.sticky, selection && styles.selection, state.allowsSorting && styles.headerSortable, state.allowsSorting && state.isHovered && styles.headerHovered, state.allowsSorting && state.isPressed && styles.headerPressed);
149
+ function columnStyles(align, selection, sticky) {
150
+ return (state) => props(styles.cell, align === "end" && styles.cellEnd, styles.header, styles.focus, sticky && styles.sticky, selection && styles.selection, state.allowsSorting && styles.headerSortable, state.allowsSorting && state.isHovered && styles.headerHovered, state.allowsSorting && state.isPressed && styles.headerPressed);
140
151
  }
141
152
  function dropAriaLevel(node) {
142
153
  node?.removeAttribute("aria-level");
@@ -398,33 +409,34 @@ function TableBody(t0) {
398
409
  */
399
410
  function TableCell(t0) {
400
411
  const $ = c(9);
401
- const { children, selection: t1, ...props } = t0;
402
- const selection = t1 === void 0 ? false : t1;
412
+ const { align: t1, children, selection: t2, ...props } = t0;
413
+ const align = t1 === void 0 ? "start" : t1;
414
+ const selection = t2 === void 0 ? false : t2;
403
415
  const label = useContext(SelectLabelContext);
404
416
  const T0 = Cell;
405
- const t2 = mergeStatefulStyles(cellStyles(selection), props);
406
- let t3;
417
+ const t3 = mergeStatefulStyles(cellStyles(align, selection), props);
418
+ let t4;
407
419
  if ($[0] !== children || $[1] !== label || $[2] !== selection) {
408
- t3 = cellContent(children, selection, label);
420
+ t4 = cellContent(children, selection, label);
409
421
  $[0] = children;
410
422
  $[1] = label;
411
423
  $[2] = selection;
412
- $[3] = t3;
413
- } else t3 = $[3];
414
- let t4;
415
- if ($[4] !== T0 || $[5] !== props || $[6] !== t2 || $[7] !== t3) {
416
- t4 = /* @__PURE__ */ jsx(T0, {
424
+ $[3] = t4;
425
+ } else t4 = $[3];
426
+ let t5;
427
+ if ($[4] !== T0 || $[5] !== props || $[6] !== t3 || $[7] !== t4) {
428
+ t5 = /* @__PURE__ */ jsx(T0, {
417
429
  ...props,
418
- ...t2,
419
- children: t3
430
+ ...t3,
431
+ children: t4
420
432
  });
421
433
  $[4] = T0;
422
434
  $[5] = props;
423
- $[6] = t2;
424
- $[7] = t3;
425
- $[8] = t4;
426
- } else t4 = $[8];
427
- return t4;
435
+ $[6] = t3;
436
+ $[7] = t4;
437
+ $[8] = t5;
438
+ } else t5 = $[8];
439
+ return t5;
428
440
  }
429
441
  function tableClasses(state) {
430
442
  return props(styles.table, state.isDropTarget && collectionStyles.dropTarget);
@@ -440,85 +452,91 @@ function tableClasses(state) {
440
452
  * the table with no columns at all.
441
453
  */
442
454
  function TableColumn(t0) {
443
- const $ = c(27);
455
+ const $ = c(30);
444
456
  let children;
445
457
  let props;
446
458
  let t1;
447
459
  let t2;
460
+ let t3;
448
461
  if ($[0] !== t0) {
449
- ({children, resizable: t1, selection: t2, ...props} = t0);
462
+ ({align: t1, children, resizable: t2, selection: t3, ...props} = t0);
450
463
  $[0] = t0;
451
464
  $[1] = children;
452
465
  $[2] = props;
453
466
  $[3] = t1;
454
467
  $[4] = t2;
468
+ $[5] = t3;
455
469
  } else {
456
470
  children = $[1];
457
471
  props = $[2];
458
472
  t1 = $[3];
459
473
  t2 = $[4];
474
+ t3 = $[5];
460
475
  }
461
- const resizable = t1 === void 0 ? false : t1;
462
- const selection = t2 === void 0 ? false : t2;
476
+ const align = t1 === void 0 ? "start" : t1;
477
+ const resizable = t2 === void 0 ? false : t2;
478
+ const selection = t3 === void 0 ? false : t3;
463
479
  const label = useContext(SelectAllLabelContext);
464
480
  const resizeLabel = useContext(ResizeLabelContext);
465
481
  const resizableTable = useContext(ResizableContext);
466
482
  const sticky = useContext(StickyHeaderContext);
467
483
  const [element, setElement] = useState(null);
468
- let t3;
469
- if ($[5] !== props.ref || $[6] !== resizableTable) {
470
- t3 = resizableTable ? mergeRefs(setElement, props.ref ?? void 0) : props.ref;
471
- $[5] = props.ref;
472
- $[6] = resizableTable;
473
- $[7] = t3;
474
- } else t3 = $[7];
475
- const ref = t3;
476
- const minWidths = useContext(ColumnMinWidthsContext);
477
484
  let t4;
478
- if ($[8] !== element || $[9] !== minWidths) {
479
- t4 = element === null ? void 0 : minWidths.get(element);
480
- $[8] = element;
481
- $[9] = minWidths;
482
- $[10] = t4;
483
- } else t4 = $[10];
484
- const measured = t4;
485
+ if ($[6] !== props.ref || $[7] !== resizableTable) {
486
+ t4 = resizableTable ? mergeRefs(setElement, props.ref ?? void 0) : props.ref;
487
+ $[6] = props.ref;
488
+ $[7] = resizableTable;
489
+ $[8] = t4;
490
+ } else t4 = $[8];
491
+ const ref = t4;
492
+ const minWidths = useContext(ColumnMinWidthsContext);
485
493
  let t5;
486
- if ($[11] !== props || $[12] !== selection || $[13] !== sticky) {
487
- t5 = mergeStatefulStyles(columnStyles(selection, sticky), props);
488
- $[11] = props;
489
- $[12] = selection;
490
- $[13] = sticky;
491
- $[14] = t5;
492
- } else t5 = $[14];
493
- const t6 = props.minWidth ?? (measured === void 0 ? void 0 : Math.max(measured, REACT_ARIA_MIN_WIDTH));
494
- const t7 = resizable && resizableTable;
495
- let t8;
496
- if ($[15] !== children || $[16] !== label || $[17] !== resizeLabel || $[18] !== selection || $[19] !== t7) {
497
- t8 = columnContent(children, selection, label, t7, resizeLabel);
498
- $[15] = children;
499
- $[16] = label;
500
- $[17] = resizeLabel;
501
- $[18] = selection;
502
- $[19] = t7;
503
- $[20] = t8;
504
- } else t8 = $[20];
494
+ if ($[9] !== element || $[10] !== minWidths) {
495
+ t5 = element === null ? void 0 : minWidths.get(element);
496
+ $[9] = element;
497
+ $[10] = minWidths;
498
+ $[11] = t5;
499
+ } else t5 = $[11];
500
+ const measured = t5;
501
+ let t6;
502
+ if ($[12] !== align || $[13] !== props || $[14] !== selection || $[15] !== sticky) {
503
+ t6 = mergeStatefulStyles(columnStyles(align, selection, sticky), props);
504
+ $[12] = align;
505
+ $[13] = props;
506
+ $[14] = selection;
507
+ $[15] = sticky;
508
+ $[16] = t6;
509
+ } else t6 = $[16];
510
+ const t7 = props.minWidth ?? (measured === void 0 ? void 0 : Math.max(measured, REACT_ARIA_MIN_WIDTH));
511
+ const t8 = resizable && resizableTable;
505
512
  let t9;
506
- if ($[21] !== props || $[22] !== ref || $[23] !== t5 || $[24] !== t6 || $[25] !== t8) {
507
- t9 = /* @__PURE__ */ jsx(Column, {
513
+ if ($[17] !== align || $[18] !== children || $[19] !== label || $[20] !== resizeLabel || $[21] !== selection || $[22] !== t8) {
514
+ t9 = columnContent(children, align, selection, label, t8, resizeLabel);
515
+ $[17] = align;
516
+ $[18] = children;
517
+ $[19] = label;
518
+ $[20] = resizeLabel;
519
+ $[21] = selection;
520
+ $[22] = t8;
521
+ $[23] = t9;
522
+ } else t9 = $[23];
523
+ let t10;
524
+ if ($[24] !== props || $[25] !== ref || $[26] !== t6 || $[27] !== t7 || $[28] !== t9) {
525
+ t10 = /* @__PURE__ */ jsx(Column, {
508
526
  ...props,
509
- ...t5,
510
- minWidth: t6,
527
+ ...t6,
528
+ minWidth: t7,
511
529
  ref,
512
- children: t8
530
+ children: t9
513
531
  });
514
- $[21] = props;
515
- $[22] = ref;
516
- $[23] = t5;
517
- $[24] = t6;
518
- $[25] = t8;
519
- $[26] = t9;
520
- } else t9 = $[26];
521
- return t9;
532
+ $[24] = props;
533
+ $[25] = ref;
534
+ $[26] = t6;
535
+ $[27] = t7;
536
+ $[28] = t9;
537
+ $[29] = t10;
538
+ } else t10 = $[29];
539
+ return t10;
522
540
  }
523
541
  /**
524
542
  * A row under the body, for totals and the like. It is not part of the