@kanso-labs/kanso-ui 0.30.4 → 0.31.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 (66) hide show
  1. package/dist/chip/styles.js +1 -0
  2. package/dist/chip/styles.js.map +1 -1
  3. package/dist/components/app-bar/index.js +2 -1
  4. package/dist/components/app-bar/index.js.map +1 -1
  5. package/dist/components/checkbox/index.js +1 -0
  6. package/dist/components/checkbox/index.js.map +1 -1
  7. package/dist/components/combo-box/index.js +2 -2
  8. package/dist/components/combo-box/index.js.map +1 -1
  9. package/dist/components/disclosure/index.js +2 -2
  10. package/dist/components/disclosure/index.js.map +1 -1
  11. package/dist/components/drop-zone/index.js +22 -33
  12. package/dist/components/drop-zone/index.js.map +1 -1
  13. package/dist/components/drop-zone/styles.js +21 -5
  14. package/dist/components/drop-zone/styles.js.map +1 -1
  15. package/dist/components/icon-button/index.js +6 -5
  16. package/dist/components/icon-button/index.js.map +1 -1
  17. package/dist/components/link/index.js +1 -0
  18. package/dist/components/link/index.js.map +1 -1
  19. package/dist/components/navigation-tree/index.js +2 -2
  20. package/dist/components/navigation-tree/index.js.map +1 -1
  21. package/dist/components/number-field/index.js +1 -0
  22. package/dist/components/number-field/index.js.map +1 -1
  23. package/dist/components/progress-indicator/index.js +2 -1
  24. package/dist/components/progress-indicator/index.js.map +1 -1
  25. package/dist/components/radio-group/index.js +1 -1
  26. package/dist/components/radio-group/index.js.map +1 -1
  27. package/dist/components/search-field/index.js +2 -2
  28. package/dist/components/search-field/index.js.map +1 -1
  29. package/dist/components/segmented-button/index.js +9 -8
  30. package/dist/components/segmented-button/index.js.map +1 -1
  31. package/dist/components/select/index.js +2 -2
  32. package/dist/components/select/index.js.map +1 -1
  33. package/dist/components/separator/index.js +6 -0
  34. package/dist/components/separator/index.js.map +1 -1
  35. package/dist/components/slider/index.js +13 -6
  36. package/dist/components/slider/index.js.map +1 -1
  37. package/dist/components/snackbar/index.js +1 -1
  38. package/dist/components/snackbar/index.js.map +1 -1
  39. package/dist/components/switch/index.js +4 -0
  40. package/dist/components/switch/index.js.map +1 -1
  41. package/dist/components/tabs/index.js +4 -4
  42. package/dist/components/tabs/index.js.map +1 -1
  43. package/dist/components/token-field/index.js +84 -124
  44. package/dist/components/token-field/index.js.map +1 -1
  45. package/dist/components/tree/index.js +2 -2
  46. package/dist/components/tree/index.js.map +1 -1
  47. package/dist/control/styles.js +1 -0
  48. package/dist/control/styles.js.map +1 -1
  49. package/dist/field/styles.js +5 -0
  50. package/dist/field/styles.js.map +1 -1
  51. package/dist/hooks/useRipple.js +16 -1
  52. package/dist/hooks/useRipple.js.map +1 -1
  53. package/dist/indicator/styles.js +2 -1
  54. package/dist/indicator/styles.js.map +1 -1
  55. package/dist/segments/styles.js +4 -1
  56. package/dist/segments/styles.js.map +1 -1
  57. package/dist/styles/color.js +8 -8
  58. package/dist/styles/color.js.map +1 -1
  59. package/dist/styles/icon-button.js +1 -1
  60. package/dist/styles/icon-button.js.map +1 -1
  61. package/dist/styles/picker.js +1 -1
  62. package/dist/styles/picker.js.map +1 -1
  63. package/dist/styles/ripple.js +1 -0
  64. package/dist/styles/ripple.js.map +1 -1
  65. package/dist/styles.css +97 -23
  66. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["stylex","colors","motion","radii","spacing","stateLayerOpacity","typography","FORCED_COLORS","BOX_BLOCK_SIZE","sm","bodySmallLineHeight","bodyLargeLineHeight","BOX_OUTLINED_BLOCK_SIZE","lg","fieldChromeStyles","affix","kmuXW","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kIyJzY","k1ekBW","kAMwcw","khDVqt","$$css","affixLine","kGNEyG","k1xSpc","kOIVth","autosize","autosizeCell","kJuA4N","box","kWkggS","kZKoxP","kfdmCh","kt9PQ7","kT0f0o","kVL7Gh","kfmiAY","krdFHd","kGVxlE","kB7OPa","kjBf7l","kInvED","k3XXqK","kMeerF","kGO01o","kLKAdn","kg3NbH","kVAEAm","boxDisabled","kL6WhQ","boxError","boxFixed","boxFloating","boxLabel","k87sOh","kLqNvP","boxLabelFloated","boxLabelOutlined","boxLabelOutlinedFloated","boxLeading","kZCmMZ","boxMultiline","kAzted","boxOutlined","kMwMTN","boxOutlinedDisabled","boxOutlinedError","boxOutlinedFloating","boxTrailing","kwRFfy","column","kzQI83","k7Eaqz","columnDisabled","columnDisabledFloating","columnFloating","counter","kcqcaj","keTefX","icon","kSGwAc","kjj79g","keoZOQ","iconDisabled","iconError","input","k8Qsv1","kMzoRj","kzqmXN","kmVPX3","inputDisabled","inputUnderFloatingLabel","inputUnderLabel","label","labelDisabled","labelError","labelFocused","message","kqGvvJ","messageError","messageInset","kUOVxO","messageLine","numeric","outline","kVAM5u","kaIpWk","ksu8eU","kpwlN0","kogj98","k8WAf4","kfzvcC","outlineFocused","outlineLeading","outlineNotch","ks0D6T","kVQacm","k33iCy","outlineNotchOpen","replica","kHjlTd","textArea","kHenm0","textAreaAutosize","trigger","kkrTdU","value","kg5iWk","valuePlaceholder","valuePlaceholderHidden","groupStyles","root","kXwgrk"],"sources":["../../src/field/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Declared\n// here rather than imported from src/styles/ripple.ts, which spells the same\n// query: the StyleX compiler resolves a constant across files only out of a\n// `.stylex.ts` module, and the one this repository has is generated from the\n// design tokens, where a user-preference query does not belong beside the\n// window size classes.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// What the box is tall enough for, rather than the 56dp the text fields page\n// draws it at. The page's number is the sum of these under the default\n// tokens, and stating it instead made the box right only there: a theme with\n// a longer body line — `Editorial` in src/theming/themes.ts, at body-small\n// 20 and body-large 28 on a 10dp `sm` — needs 68, and in a fixed 56 the\n// value's line ran past the underline with nothing left beneath it.\n//\n// The filled box holds its padding twice over, the floated label's line and\n// the control's; the outlined box holds its own padding twice and the\n// control's line alone, since its label sits on the outline rather than\n// above the value. The two agree at 56 under the default tokens, which is\n// what keeps the default stories' snapshots where they are.\n//\n// The resting label's line is written against the same expressions below, so\n// one derivation feeds both the box and the label that centres in it.\nconst BOX_BLOCK_SIZE = `calc(2 * ${spacing.sm} + ${typography.bodySmallLineHeight} + ${typography.bodyLargeLineHeight})`;\nconst BOX_OUTLINED_BLOCK_SIZE = `calc(2 * ${spacing.lg} + ${typography.bodyLargeLineHeight})`;\n\n// The chrome's styles. Apart from the parts in ./index.tsx so that file\n// exports components alone, which is what keeps fast refresh working for it —\n// the same reason ./root.ts gives for the root style beside it.\n//\n// The focus indicator is an inset box-shadow on the bottom edge rather than a\n// border that thickens. A real border going 1px -> 2px on focus grows the\n// box, which pushes every sibling below it down by a pixel — so a form\n// twitches each time focus moves between its fields. A shadow is drawn inside\n// the box and changes nothing about its size.\n//\n// The label floats, as the text fields page draws it: body-large and centred\n// in an empty, unfocused box, body-small at the top once the field is focused\n// or holds a value. `floatingLabel={false}` keeps it small at the top in\n// every state instead.\n//\n// Where the label sits depends on the box's state, and a child cannot select\n// on its parent's state while the box can select on its own. So the label's\n// type is set on the box and inherited: the box changes the font size and\n// line height it hands down when focus is within it, or when its control\n// shows something other than its placeholder, and the label transitions\n// between the two. Resting, the line is the box less its padding, which is\n// what centres the label without a position to move — the move to the top is\n// a change of type alone. The control sets its own type, so none of this\n// reaches it.\n//\n// The label's colour follows the control's focus the same way: the box is\n// React Aria's Group, which reports focus within it as render state, and the\n// label takes `labelFocused` from that.\n//\n// The box is a row: an icon slot at either end, if the field has one, with\n// the label and control between them. The page gives the icons 24dp, 12dp\n// from the box's edge and 16dp from the text, centred in the box's height;\n// the slot cancels the box's top padding and stretches to its full height,\n// so it centres whatever it holds — a 24dp icon, or an icon button around\n// one. The label and the control sit in a column of their own, which is\n// what the label is positioned against, so it moves past a leading icon\n// with the text.\n//\n// A prefix or suffix sits on the control's line, in the control's type and\n// the muted role, and shows only while the field is focused or holds a\n// value, as the placeholder does — at rest the label is where it would be.\n// It is the column's colour it takes, inherited, since the column can\n// select on its own focus and content and the affix cannot select on\n// either.\n//\n// The outlined variant is the page's outlined text field: no fill, a 1dp\n// outline in the outline role with 4dp corners all round, 2dp and primary\n// while focused, on surface while hovered, the error role with an error,\n// and the label cutting the outline once it floats, with the page's 4dp\n// beside it. The value is centred, 16dp from the top and bottom, and the\n// label rests on its line and moves up onto the outline — a move, where the\n// filled label only changes type.\n//\n// The outline is a fieldset laid over the box: a browser draws a fieldset's\n// border around its legend, so a legend holding a copy of the label, in the\n// label's floated type, is what cuts the outline to the label's width with\n// nothing measured. Empty, it cuts nothing, which is the closed notch.\nconst fieldChromeStyles = {\n affix: {\n kmuXW: \"x2lah0s\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xt3l3uh\",\n kAMwcw: \"xpc4ca7\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n affixLine: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x14qo01y\",\n $$css: true\n },\n autosize: {\n k1xSpc: \"xrvj5dj\",\n $$css: true\n },\n autosizeCell: {\n kJuA4N: \"x1b1wf8y\",\n $$css: true\n },\n box: {\n kGNEyG: \"x1cy8zhl\",\n kWkggS: \"x1rrhr5q\",\n kZKoxP: \"x4v968r\",\n kfdmCh: \"xe3zi7u\",\n kt9PQ7: \"x15anc7y\",\n kT0f0o: \"x16uus16\",\n kVL7Gh: \"xbiv7yw\",\n kfmiAY: \"xirz1nw\",\n krdFHd: \"xzcck0f\",\n kGVxlE: \"x89kqus x18rfq6m\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n kjBf7l: \"x1x84bn5\",\n kInvED: \"x12iqurn\",\n k3XXqK: \"xi9ts3s\",\n kMeerF: \"x1jrff4x\",\n kGO01o: \"x18d9i69\",\n kLKAdn: \"xi7mcox\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xkdsq27\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n boxDisabled: {\n kWkggS: \"xepofeg\",\n kL6WhQ: \"x1fxan2a\",\n kGVxlE: \"x1pqbjc1\",\n $$css: true\n },\n boxError: {\n kGVxlE: \"x1lxxh4i x1d6xoej\",\n $$css: true\n },\n boxFixed: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n $$css: true\n },\n boxFloating: {\n kMv6JI: \"x1ps135g xnc7ww3 x16svsjw\",\n kGuDYH: \"x52kfa xys1t9b x1848etk\",\n k63SB2: \"xz4f7ai xn9xqko x1c52epr\",\n kb6lSQ: \"x19wmx12 x1t00fh7 x1qn8t5l\",\n kLWn49: \"xsv50tp x1f5c3pk x1mv3dpe\",\n $$css: true\n },\n boxLabel: {\n k87sOh: \"x13vifvy\",\n kLqNvP: \"x1o0tod\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n boxLabelFloated: {\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n $$css: true\n },\n boxLabelOutlined: {\n kLqNvP: \"x10k232c\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n boxLabelOutlinedFloated: {\n k87sOh: \"x1qjp6zz\",\n $$css: true\n },\n boxLeading: {\n kZCmMZ: \"xwde665\",\n $$css: true\n },\n boxMultiline: {\n kZKoxP: \"xt7dq6l\",\n kAzted: \"x9ep9ug\",\n kGO01o: \"xqf7pud\",\n $$css: true\n },\n boxOutlined: {\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"xnqhc4v\",\n kfdmCh: \"xs07zst\",\n kT0f0o: \"x4gcak0\",\n kVL7Gh: \"xqs30sb\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x158cnre x1igw6b7 x1sa41d3\",\n kGO01o: \"xzfxn0k\",\n kLKAdn: \"x1clyivc\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n boxOutlinedDisabled: {\n kWkggS: \"xjbqb8w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1ldq0ta x1bhcspo\",\n $$css: true\n },\n boxOutlinedError: {\n kMwMTN: \"x12voer2 x1h298ve x4ii1qj\",\n $$css: true\n },\n boxOutlinedFloating: {\n kLWn49: \"xsv50tp x1f5c3pk x1rzm7h7\",\n $$css: true\n },\n boxTrailing: {\n kwRFfy: \"xk163s\",\n $$css: true\n },\n column: {\n kMwMTN: \"x1w5n3ug\",\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n columnDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n columnDisabledFloating: {\n kMwMTN: \"xspc5gk x19co3pv\",\n $$css: true\n },\n columnFloating: {\n kMwMTN: \"x1dfuzvz x6phwhp x19co3pv\",\n $$css: true\n },\n counter: {\n kmuXW: \"x2lah0s\",\n kcqcaj: \"xss6m8b\",\n keTefX: \"xvc5jky\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n kSGwAc: \"xkh2ocl\",\n kMwMTN: \"x1w5n3ug\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n keoZOQ: \"x1motrhk\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xt3l3uh\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n iconDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n iconError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n input: {\n k8Qsv1: \"x1hgeflb\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kzqmXN: \"xh8yej3\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n k3XXqK: \"x1t137rt\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n inputDisabled: {\n k8Qsv1: \"x7ip5l3\",\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n inputUnderFloatingLabel: {\n k8Qsv1: \"x1mvm7v4 xxqzaim\",\n $$css: true\n },\n inputUnderLabel: {\n keoZOQ: \"xwuztrq\",\n $$css: true\n },\n label: {\n kMwMTN: \"x1w5n3ug\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xixa3zk\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n labelDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n labelError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n labelFocused: {\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n message: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n kqGvvJ: \"x10im51j\",\n $$css: true\n },\n messageError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n messageInset: {\n kUOVxO: \"xboopgi\",\n $$css: true\n },\n messageLine: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n keoZOQ: \"x1y88zpp\",\n kAzted: \"x17jz683\",\n $$css: true\n },\n numeric: {\n kMv6JI: \"xbppi91\",\n kcqcaj: \"xss6m8b\",\n $$css: true\n },\n outline: {\n kVAM5u: \"x1r7ld26\",\n kaIpWk: \"x1tfhd1\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kB7OPa: \"x9f619\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kpwlN0: \"x10a8y8t\",\n kb6lSQ: \"xwth0xh\",\n kogj98: \"x1ghz6dp\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"xt970qd\",\n kg3NbH: \"x1mhv0kc\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x1aqzbqr\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n outlineFocused: {\n kMzoRj: \"xdh2fpr\",\n $$css: true\n },\n outlineLeading: {\n kZCmMZ: \"x167ah0f\",\n $$css: true\n },\n outlineNotch: {\n kZKoxP: \"xqtp20y\",\n kLWn49: \"x14ju556\",\n ks0D6T: \"x193iq5w\",\n kVQacm: \"xb3r6kr\",\n kmVPX3: \"x1717udv\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n outlineNotchOpen: {\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n replica: {\n kHjlTd: \"x1mzt3pk\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"x126k92a\",\n $$css: true\n },\n textArea: {\n k1xSpc: \"x1lliihq\",\n kVQacm: \"xysyzu8\",\n kHenm0: \"xtt52l0\",\n $$css: true\n },\n textAreaAutosize: {\n kVQacm: \"xb3r6kr\",\n $$css: true\n },\n trigger: {\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n kpwlN0: \"x10a8y8t\",\n k3XXqK: \"x1t137rt\",\n kmVPX3: \"x1717udv\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n value: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kVQacm: \"xb3r6kr\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n valuePlaceholder: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n valuePlaceholderHidden: {\n kMwMTN: \"x19co3pv\",\n $$css: true\n }\n};\n\n// The chrome a label sitting above a group takes, rather than inside a box.\n// CheckboxGroup, ChipGroup, RadioGroup, Slider and ColorSlider each wrote both\n// of these out: the type override on the label, and the column its label and\n// control sit in.\n//\n// The label is label-large, the role a field's label takes at rest, since a\n// group has no box to float it in.\n//\n// The two sliders compose an inline size of their own on the root, since a\n// slider fills the width it is given where a group of controls does not.\nconst groupStyles = {\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n root: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"xzoy561\",\n $$css: true\n }\n};\nexport { fieldChromeStyles, groupStyles };"],"mappings":";;AA2BuB,GAAYI,QAAQK,KAAQH,WAAWI,sBAAyBJ,WAAWK;AAClE,GAAYP,QAAQS,KAAQP,WAAWK;AA2DvE,MAAMG,oBAAoB;CACxBC,OAAO;EACLC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,WAAW;EACTC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRJ,OAAO;CACT;CACAK,UAAU;EACRF,QAAQ;EACRH,OAAO;CACT;CACAM,cAAc;EACZC,QAAQ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EACR4F,QAAQ;EACRM,QAAQ;EACRrG,OAAO;CACT;CACAsG,kBAAkB;EAChBP,QAAQ;EACR/F,OAAO;CACT;CACAuG,SAAS;EACP9F,QAAQ;EACRyD,QAAQ;EACRhD,QAAQ;EACRsF,QAAQ;EACRjB,QAAQ;EACRlE,QAAQ;EACR+C,QAAQ;EACR1C,QAAQ;EACR1B,OAAO;CACT;CACAyG,OAAO;EACLvG,QAAQ;EACRC,QAAQ;EACR4F,QAAQ;EACRW,QAAQ;EACR3G,QAAQ;EACRC,OAAO;CACT;CACA2G,kBAAkB;EAChBhE,QAAQ;EACR3C,OAAO;CACT;CACA4G,wBAAwB;EACtBjE,QAAQ;EACR3C,OAAO;CACT;AACF;AAYA,MAAM6G,cAAc;CAClBrC,OAAO;EACLjF,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRK,OAAO;CACT;CACA8G,MAAM;EACJ5F,QAAQ;EACRf,QAAQ;EACR4G,QAAQ;EACR3G,QAAQ;EACRJ,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"styles.js","names":["stylex","colors","motion","radii","spacing","stateLayerOpacity","typography","FORCED_COLORS","BOX_BLOCK_SIZE","sm","bodySmallLineHeight","bodyLargeLineHeight","BOX_OUTLINED_BLOCK_SIZE","lg","fieldChromeStyles","affix","k6CgDc","kmuXW","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kIyJzY","k1ekBW","kAMwcw","khDVqt","$$css","affixLine","kGNEyG","k1xSpc","kOIVth","autosize","autosizeCell","kJuA4N","box","kWkggS","kZKoxP","kfdmCh","kt9PQ7","kT0f0o","kVL7Gh","kfmiAY","krdFHd","kGVxlE","kB7OPa","kjBf7l","kInvED","k3XXqK","kMeerF","kGO01o","kLKAdn","kg3NbH","kVAEAm","boxDisabled","kL6WhQ","boxError","boxFixed","boxFloating","boxLabel","k87sOh","kLqNvP","boxLabelFloated","boxLabelOutlined","boxLabelOutlinedFloated","boxLeading","kZCmMZ","boxMultiline","kAzted","boxOutlined","kMwMTN","boxOutlinedDisabled","boxOutlinedError","boxOutlinedFloating","boxTrailing","kwRFfy","column","kzQI83","k7Eaqz","columnDisabled","columnDisabledFloating","columnFloating","counter","kcqcaj","keTefX","icon","kSGwAc","kjj79g","keoZOQ","iconDisabled","iconError","input","k8Qsv1","kMzoRj","kzqmXN","kmVPX3","inputDisabled","inputUnderFloatingLabel","inputUnderLabel","label","labelDisabled","labelError","labelFocused","message","kqGvvJ","messageError","messageInset","kUOVxO","messageLine","numeric","outline","kVAM5u","kaIpWk","ksu8eU","kpwlN0","kogj98","k8WAf4","kfzvcC","outlineFocused","outlineLeading","outlineNotch","ks0D6T","kVQacm","k33iCy","outlineNotchOpen","replica","kHjlTd","textArea","kHenm0","textAreaAutosize","trigger","kkrTdU","value","kg5iWk","valuePlaceholder","valuePlaceholderHidden","groupStyles","root","kXwgrk"],"sources":["../../src/field/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Declared\n// here rather than imported from src/styles/ripple.ts, which spells the same\n// query: the StyleX compiler resolves a constant across files only out of a\n// `.stylex.ts` module, and the one this repository has is generated from the\n// design tokens, where a user-preference query does not belong beside the\n// window size classes.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// What the box is tall enough for, rather than the 56dp the text fields page\n// draws it at. The page's number is the sum of these under the default\n// tokens, and stating it instead made the box right only there: a theme with\n// a longer body line — `Editorial` in src/theming/themes.ts, at body-small\n// 20 and body-large 28 on a 10dp `sm` — needs 68, and in a fixed 56 the\n// value's line ran past the underline with nothing left beneath it.\n//\n// The filled box holds its padding twice over, the floated label's line and\n// the control's; the outlined box holds its own padding twice and the\n// control's line alone, since its label sits on the outline rather than\n// above the value. The two agree at 56 under the default tokens, which is\n// what keeps the default stories' snapshots where they are.\n//\n// The resting label's line is written against the same expressions below, so\n// one derivation feeds both the box and the label that centres in it.\nconst BOX_BLOCK_SIZE = `calc(2 * ${spacing.sm} + ${typography.bodySmallLineHeight} + ${typography.bodyLargeLineHeight})`;\nconst BOX_OUTLINED_BLOCK_SIZE = `calc(2 * ${spacing.lg} + ${typography.bodyLargeLineHeight})`;\n\n// The chrome's styles. Apart from the parts in ./index.tsx so that file\n// exports components alone, which is what keeps fast refresh working for it —\n// the same reason ./root.ts gives for the root style beside it.\n//\n// The focus indicator is an inset box-shadow on the bottom edge rather than a\n// border that thickens. A real border going 1px -> 2px on focus grows the\n// box, which pushes every sibling below it down by a pixel — so a form\n// twitches each time focus moves between its fields. A shadow is drawn inside\n// the box and changes nothing about its size.\n//\n// The label floats, as the text fields page draws it: body-large and centred\n// in an empty, unfocused box, body-small at the top once the field is focused\n// or holds a value. `floatingLabel={false}` keeps it small at the top in\n// every state instead.\n//\n// Where the label sits depends on the box's state, and a child cannot select\n// on its parent's state while the box can select on its own. So the label's\n// type is set on the box and inherited: the box changes the font size and\n// line height it hands down when focus is within it, or when its control\n// shows something other than its placeholder, and the label transitions\n// between the two. Resting, the line is the box less its padding, which is\n// what centres the label without a position to move — the move to the top is\n// a change of type alone. The control sets its own type, so none of this\n// reaches it.\n//\n// The label's colour follows the control's focus the same way: the box is\n// React Aria's Group, which reports focus within it as render state, and the\n// label takes `labelFocused` from that.\n//\n// The box is a row: an icon slot at either end, if the field has one, with\n// the label and control between them. The page gives the icons 24dp, 12dp\n// from the box's edge and 16dp from the text, centred in the box's height;\n// the slot cancels the box's top padding and stretches to its full height,\n// so it centres whatever it holds — a 24dp icon, or an icon button around\n// one. The label and the control sit in a column of their own, which is\n// what the label is positioned against, so it moves past a leading icon\n// with the text.\n//\n// A prefix or suffix sits on the control's line, in the control's type and\n// the muted role, and shows only while the field is focused or holds a\n// value, as the placeholder does — at rest the label is where it would be.\n// It is the column's colour it takes, inherited, since the column can\n// select on its own focus and content and the affix cannot select on\n// either.\n//\n// The outlined variant is the page's outlined text field: no fill, a 1dp\n// outline in the outline role with 4dp corners all round, 2dp and primary\n// while focused, on surface while hovered, the error role with an error,\n// and the label cutting the outline once it floats, with the page's 4dp\n// beside it. The value is centred, 16dp from the top and bottom, and the\n// label rests on its line and moves up onto the outline — a move, where the\n// filled label only changes type.\n//\n// The outline is a fieldset laid over the box: a browser draws a fieldset's\n// border around its legend, so a legend holding a copy of the label, in the\n// label's floated type, is what cuts the outline to the label's width with\n// nothing measured. Empty, it cuts nothing, which is the closed notch.\nconst fieldChromeStyles = {\n affix: {\n k6CgDc: \"x12w9bfk\",\n kmuXW: \"x2lah0s\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xt3l3uh\",\n kAMwcw: \"xpc4ca7\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n affixLine: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x14qo01y\",\n $$css: true\n },\n autosize: {\n k1xSpc: \"xrvj5dj\",\n $$css: true\n },\n autosizeCell: {\n kJuA4N: \"x1b1wf8y\",\n $$css: true\n },\n box: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x1cy8zhl\",\n kWkggS: \"x1rrhr5q\",\n kZKoxP: \"x4v968r\",\n kfdmCh: \"xe3zi7u\",\n kt9PQ7: \"x15anc7y\",\n kT0f0o: \"x16uus16\",\n kVL7Gh: \"xbiv7yw\",\n kfmiAY: \"xirz1nw\",\n krdFHd: \"xzcck0f\",\n kGVxlE: \"x89kqus x18rfq6m\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n kjBf7l: \"x1x84bn5\",\n kInvED: \"x12iqurn\",\n k3XXqK: \"xi9ts3s\",\n kMeerF: \"x1jrff4x\",\n kGO01o: \"x18d9i69\",\n kLKAdn: \"xi7mcox\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xkdsq27\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n boxDisabled: {\n kWkggS: \"xepofeg\",\n kL6WhQ: \"x1fxan2a\",\n kGVxlE: \"x1pqbjc1\",\n $$css: true\n },\n boxError: {\n kGVxlE: \"x1lxxh4i x1d6xoej\",\n $$css: true\n },\n boxFixed: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n $$css: true\n },\n boxFloating: {\n kMv6JI: \"x1ps135g xnc7ww3 x16svsjw\",\n kGuDYH: \"x52kfa xys1t9b x1848etk\",\n k63SB2: \"xz4f7ai xn9xqko x1c52epr\",\n kb6lSQ: \"x19wmx12 x1t00fh7 x1qn8t5l\",\n kLWn49: \"xsv50tp x1f5c3pk x1mv3dpe\",\n $$css: true\n },\n boxLabel: {\n k87sOh: \"x13vifvy\",\n kLqNvP: \"x1o0tod\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n boxLabelFloated: {\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n $$css: true\n },\n boxLabelOutlined: {\n kLqNvP: \"x10k232c\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n boxLabelOutlinedFloated: {\n k87sOh: \"x1qjp6zz\",\n $$css: true\n },\n boxLeading: {\n kZCmMZ: \"xwde665\",\n $$css: true\n },\n boxMultiline: {\n kZKoxP: \"xt7dq6l\",\n kAzted: \"x9ep9ug\",\n kGO01o: \"xqf7pud\",\n $$css: true\n },\n boxOutlined: {\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"xnqhc4v\",\n kfdmCh: \"xs07zst\",\n kT0f0o: \"x4gcak0\",\n kVL7Gh: \"xqs30sb\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x158cnre x1igw6b7 x1sa41d3\",\n kGO01o: \"xzfxn0k\",\n kLKAdn: \"x1clyivc\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n boxOutlinedDisabled: {\n kWkggS: \"xjbqb8w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1ldq0ta x1bhcspo\",\n $$css: true\n },\n boxOutlinedError: {\n kMwMTN: \"x12voer2 x1h298ve x4ii1qj\",\n $$css: true\n },\n boxOutlinedFloating: {\n kLWn49: \"xsv50tp x1f5c3pk x1rzm7h7\",\n $$css: true\n },\n boxTrailing: {\n kwRFfy: \"xk163s\",\n $$css: true\n },\n column: {\n kMwMTN: \"x1w5n3ug\",\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n columnDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n columnDisabledFloating: {\n kMwMTN: \"xspc5gk x19co3pv\",\n $$css: true\n },\n columnFloating: {\n kMwMTN: \"x1dfuzvz x6phwhp x19co3pv\",\n $$css: true\n },\n counter: {\n kmuXW: \"x2lah0s\",\n kcqcaj: \"xss6m8b\",\n keTefX: \"xvc5jky\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n icon: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kSGwAc: \"xkh2ocl\",\n kMwMTN: \"x1w5n3ug\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n keoZOQ: \"x1motrhk\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xt3l3uh\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n iconDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n iconError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n input: {\n k8Qsv1: \"x1hgeflb\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kzqmXN: \"xh8yej3\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n k3XXqK: \"x1t137rt\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n inputDisabled: {\n k8Qsv1: \"x7ip5l3\",\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n inputUnderFloatingLabel: {\n k8Qsv1: \"x1mvm7v4 xxqzaim\",\n $$css: true\n },\n inputUnderLabel: {\n keoZOQ: \"xwuztrq\",\n $$css: true\n },\n label: {\n k6CgDc: \"x12w9bfk\",\n kMwMTN: \"x1w5n3ug\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xixa3zk\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n labelDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n labelError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n labelFocused: {\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n message: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n kqGvvJ: \"x10im51j\",\n $$css: true\n },\n messageError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n messageInset: {\n kUOVxO: \"xboopgi\",\n $$css: true\n },\n messageLine: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n keoZOQ: \"x1y88zpp\",\n kAzted: \"x17jz683\",\n $$css: true\n },\n numeric: {\n kMv6JI: \"xbppi91\",\n kcqcaj: \"xss6m8b\",\n $$css: true\n },\n outline: {\n k6CgDc: \"x12w9bfk\",\n kVAM5u: \"x1r7ld26\",\n kaIpWk: \"x1tfhd1\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kB7OPa: \"x9f619\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kpwlN0: \"x10a8y8t\",\n kb6lSQ: \"xwth0xh\",\n kogj98: \"x1ghz6dp\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"xt970qd\",\n kg3NbH: \"x1mhv0kc\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x1aqzbqr\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n outlineFocused: {\n kMzoRj: \"xdh2fpr\",\n $$css: true\n },\n outlineLeading: {\n kZCmMZ: \"x167ah0f\",\n $$css: true\n },\n outlineNotch: {\n kZKoxP: \"xqtp20y\",\n kLWn49: \"x14ju556\",\n ks0D6T: \"x193iq5w\",\n kVQacm: \"xb3r6kr\",\n kmVPX3: \"x1717udv\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n outlineNotchOpen: {\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n replica: {\n kHjlTd: \"x1mzt3pk\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"x126k92a\",\n $$css: true\n },\n textArea: {\n k1xSpc: \"x1lliihq\",\n kVQacm: \"xysyzu8\",\n kHenm0: \"xtt52l0\",\n $$css: true\n },\n textAreaAutosize: {\n kVQacm: \"xb3r6kr\",\n $$css: true\n },\n trigger: {\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n kpwlN0: \"x10a8y8t\",\n k3XXqK: \"x1t137rt\",\n kmVPX3: \"x1717udv\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n value: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kVQacm: \"xb3r6kr\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n valuePlaceholder: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n valuePlaceholderHidden: {\n kMwMTN: \"x19co3pv\",\n $$css: true\n }\n};\n\n// The chrome a label sitting above a group takes, rather than inside a box.\n// CheckboxGroup, ChipGroup, RadioGroup, Slider and ColorSlider each wrote both\n// of these out: the type override on the label, and the column its label and\n// control sit in.\n//\n// The label is label-large, the role a field's label takes at rest, since a\n// group has no box to float it in.\n//\n// The two sliders compose an inline size of their own on the root, since a\n// slider fills the width it is given where a group of controls does not.\nconst groupStyles = {\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n root: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"xzoy561\",\n $$css: true\n }\n};\nexport { fieldChromeStyles, groupStyles };"],"mappings":";;AA2BuB,GAAYI,QAAQK,KAAQH,WAAWI,sBAAyBJ,WAAWK;AAClE,GAAYP,QAAQS,KAAQP,WAAWK;AA2DvE,MAAMG,oBAAoB;CACxBC,OAAO;EACLC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,WAAW;EACTC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRJ,OAAO;CACT;CACAK,UAAU;EACRF,QAAQ;EACRH,OAAO;CACT;CACAM,cAAc;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RH,QAAQ;EACRjG,QAAQ;EACRC,OAAO;CACT;CACAoG,UAAU;EACRjG,QAAQ;EACR4F,QAAQ;EACRM,QAAQ;EACRrG,OAAO;CACT;CACAsG,kBAAkB;EAChBP,QAAQ;EACR/F,OAAO;CACT;CACAuG,SAAS;EACP9F,QAAQ;EACRyD,QAAQ;EACRhD,QAAQ;EACRsF,QAAQ;EACRjB,QAAQ;EACRlE,QAAQ;EACR+C,QAAQ;EACR1C,QAAQ;EACR1B,OAAO;CACT;CACAyG,OAAO;EACLvG,QAAQ;EACRC,QAAQ;EACR4F,QAAQ;EACRW,QAAQ;EACR3G,QAAQ;EACRC,OAAO;CACT;CACA2G,kBAAkB;EAChBhE,QAAQ;EACR3C,OAAO;CACT;CACA4G,wBAAwB;EACtBjE,QAAQ;EACR3C,OAAO;CACT;AACF;AAYA,MAAM6G,cAAc;CAClBrC,OAAO;EACLjF,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRK,OAAO;CACT;CACA8G,MAAM;EACJ5F,QAAQ;EACRf,QAAQ;EACR4G,QAAQ;EACR3G,QAAQ;EACRJ,OAAO;CACT;AACF"}
@@ -32,6 +32,21 @@ function isTouch(event) {
32
32
  return event.pointerType === "touch";
33
33
  }
34
34
  /**
35
+ * Whether the reader has asked the OS for less motion.
36
+ *
37
+ * Growth is a Web Animations call, which makes it the one animation in the
38
+ * library no `@media (prefers-reduced-motion: reduce)` branch can reach — see
39
+ * src/styles/ripple.ts for the opacity half, which is CSS and carries one.
40
+ *
41
+ * Read at the press rather than once at mount, so a reader who changes the
42
+ * setting is answered by their next press rather than by their next reload.
43
+ * The press already reads layout through `getBoundingClientRect`, which costs
44
+ * more than this does.
45
+ */
46
+ function prefersReducedMotion() {
47
+ return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
48
+ }
49
+ /**
35
50
  * Renders a press ripple that grows from the pointer's position, or from
36
51
  * the element's center for a keyboard or other non-pointer activation.
37
52
  *
@@ -141,7 +156,7 @@ function useRipple(t0, t1) {
141
156
  ripple.style.width = size_1;
142
157
  ripple.style.height = size_1;
143
158
  growAnimation.current = ripple.animate({ transform: [`translate(${startPoint_0.x}px, ${startPoint_0.y}px) scale(1)`, `translate(${endPoint_0.x}px, ${endPoint_0.y}px) scale(${rippleScale.current})`] }, {
144
- duration: motionDurationMs.long1,
159
+ duration: prefersReducedMotion() ? 0 : motionDurationMs.long1,
145
160
  easing: motionEasing.standard,
146
161
  fill: "forwards"
147
162
  });
@@ -1 +1 @@
1
- {"version":3,"file":"useRipple.js","names":["MouseEvent","MouseEventHandler","PointerEvent","PointerEventHandler","ReactNode","stylex","useCallback","useMemo","useRef","useState","rippleStyles","motionDurationMs","motionEasing","spacingPx","PADDING","sm","INITIAL_ORIGIN_SCALE","SOFT_EDGE_MINIMUM_SIZE","SOFT_EDGE_CONTAINER_RATIO","surfaceProps","props","surface","RippleState","Holding","Inactive","TouchDelay","WaitingForClick","const","RippleEventHandlers","Element","onClick","HostElement","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","isTouch","event","pointerType","useRipple","t0","t1","$","_c","enabled","undefined","t2","externalHandlers","pressed","setPressed","rippleRef","state","growAnimation","rippleStartEvent","initialSize","rippleScale","t3","Symbol","for","isPrimary","startEvent","current","pointerId","buttons","shouldReactToEvent","t4","rect","height","width","maxDimension","Math","max","softEdgeSize","size","floor","hypotenuse","hypot","maxRadius","determineRippleSize","t5","rect_0","positionEvent","height_0","left","top","width_0","size_0","endPoint","x","y","origin","clientX","clientY","startPoint","getTranslationCoordinates","t6","target","positionEvent_0","ripple","cancel","rect_1","getBoundingClientRect","size_1","endPoint_0","startPoint_0","style","animate","transform","duration","long1","easing","standard","fill","startPressAnimation","t7","animation","elapsed","currentTime","Infinity","medium1","Promise","resolve","setTimeout","endPressAnimation","t8","getState","t9","event_0","target_0","currentTarget","_temp","handlePointerDownAsync","t10","event_1","handlePointerDown","t11","event_2","handlePointerUp","t12","event_3","handlePointerLeave","t13","event_4","handlePointerCancel","t14","event_5","handleClick","t15","handleContextMenu","onClickProp","onContextMenuProp","onPointerCancelProp","onPointerDownProp","onPointerLeaveProp","onPointerUpProp","t16","event_6","t17","event_7","t18","event_8","t19","event_9","t20","event_10","t21","event_11","t22","handlers","t23","press","t24","t25","enabledResult","t26","disabledResult","resolve_0","short2"],"sources":["../../src/hooks/useRipple.tsx"],"sourcesContent":["import type { MouseEvent, MouseEventHandler, PointerEvent, PointerEventHandler, ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useMemo, useRef, useState } from 'react';\nimport { rippleStyles } from '../styles/ripple';\nimport { motionDurationMs, motionEasing, spacingPx } from '../tokens/values';\n\n// Every timing this file drives is a motion token, spent at the point of use\n// below. They come from tokens/values rather than the StyleX theme because\n// element.animate() and setTimeout both reject a token's var() form, and the\n// same is true of the one geometry token: `PADDING` is added to a radius, and\n// a var() would concatenate rather than add. See src/styles/ripple.ts for the\n// opacity half of the mechanism, whose three timings are deliberately not\n// tokens.\n\n/** How far the ripple grows past the host's corners. `spacing.sm`. */\nconst PADDING = spacingPx.sm;\n\n// The rest are ratios and a pixel floor that no token group covers — spacing\n// is layout rhythm, and nothing in the set holds bare geometric ratios.\nconst INITIAL_ORIGIN_SCALE = 0.2;\nconst SOFT_EDGE_MINIMUM_SIZE = 75;\nconst SOFT_EDGE_CONTAINER_RATIO = 0.35;\n\n// Static input, so this is computed once for every consumer of the module\n// rather than once per component instance.\nconst surfaceProps = stylex.props(rippleStyles.surface);\n\n/**\n * On touch: `Inactive -> TouchDelay -> WaitingForClick -> Inactive`, or\n * `Inactive -> TouchDelay -> Holding -> WaitingForClick -> Inactive` for a\n * held press.\n *\n * On mouse or pen: `Inactive -> WaitingForClick -> Inactive`.\n */\nconst RippleState = {\n /** A touch has been confirmed as a press (held past the touch delay). */\n Holding: 2,\n /** No press in progress. Touch down moves to TouchDelay; mouse/pen down moves to WaitingForClick. */\n Inactive: 0,\n /** Touch down received; waiting to see if it's a tap or a scroll/swipe. */\n TouchDelay: 1,\n /** The press has finished growing; waiting for the click that ends it. */\n WaitingForClick: 3\n} as const;\ninterface RippleEventHandlers<HostElement extends Element> {\n onClick?: MouseEventHandler<HostElement>;\n onContextMenu?: MouseEventHandler<HostElement>;\n onPointerCancel?: PointerEventHandler<HostElement>;\n onPointerDown?: PointerEventHandler<HostElement>;\n onPointerLeave?: PointerEventHandler<HostElement>;\n onPointerUp?: PointerEventHandler<HostElement>;\n}\ntype RippleState = (typeof RippleState)[keyof typeof RippleState];\nfunction isTouch(event: PointerEvent) {\n return event.pointerType === 'touch';\n}\n\n/**\n * Renders a press ripple that grows from the pointer's position, or from\n * the element's center for a keyboard or other non-pointer activation.\n *\n * Growth runs via the Web Animations API on a single reused element (no\n * per-click DOM nodes to clean up), over a fixed duration independent of how\n * long the element is held — a real press-and-hold keeps the ripple\n * growing until release, while a quick tap is still held visible for a\n * minimum duration so it plays a complete animation rather than a flicker.\n *\n * Merges its own handlers with `externalHandlers` (e.g. a component's own\n * consumer-supplied props — ripple's own run first, then the external\n * ones) and returns `handlers` to spread onto the interactive element and\n * `surface`, the node to render as a child. The host element must\n * establish a positioning context (`position: relative` or similar) so\n * `surface`, which fills it via `inset: 0`, clips to its bounds and\n * inherits its shape.\n *\n * Pass `enabled: false` to opt out — no ripple listeners are attached and\n * no surface is rendered, leaving `externalHandlers` and a component's own\n * hover/press state layer (if any) untouched.\n *\n * `handlers` and `surface` are hand-memoized (not left to build-tool\n * optimization) so a consumer rendering many instances — a list of icon\n * buttons, say — can memoize around them too, and so stability doesn't\n * depend on any particular compiler being configured.\n */\nfunction useRipple<HostElement extends Element = Element>(enabled = true, externalHandlers: RippleEventHandlers<HostElement> = {}): {\n handlers: RippleEventHandlers<HostElement>;\n surface: ReactNode;\n} {\n const [pressed, setPressed] = useState(false);\n const rippleRef = useRef<HTMLSpanElement>(null);\n const state = useRef<RippleState>(RippleState.Inactive);\n const growAnimation = useRef<Animation | undefined>(undefined);\n const rippleStartEvent = useRef<PointerEvent<HostElement> | undefined>(undefined);\n const initialSize = useRef(0);\n const rippleScale = useRef('1');\n const shouldReactToEvent = useCallback((event: PointerEvent<HostElement>) => {\n if (!event.isPrimary) {\n return false;\n }\n const startEvent = rippleStartEvent.current;\n if (startEvent && startEvent.pointerId !== event.pointerId) {\n return false;\n }\n return isTouch(event) || event.buttons === 1;\n }, []);\n const determineRippleSize = useCallback((rect: DOMRect) => {\n const {\n height,\n width\n } = rect;\n const maxDimension = Math.max(height, width);\n const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDimension, SOFT_EDGE_MINIMUM_SIZE);\n const size = Math.floor(maxDimension * INITIAL_ORIGIN_SCALE);\n const hypotenuse = Math.hypot(width, height);\n const maxRadius = hypotenuse + PADDING;\n initialSize.current = size;\n rippleScale.current = `${(maxRadius + softEdgeSize) / size}`;\n return `${size}px`;\n }, []);\n const getTranslationCoordinates = useCallback((rect: DOMRect, positionEvent?: PointerEvent<HostElement>) => {\n const {\n height,\n left,\n top,\n width\n } = rect;\n const size = initialSize.current;\n const endPoint = {\n x: (width - size) / 2,\n y: (height - size) / 2\n };\n const origin = positionEvent ? {\n x: positionEvent.clientX - left,\n y: positionEvent.clientY - top\n } : {\n x: width / 2,\n y: height / 2\n };\n const startPoint = {\n x: origin.x - size / 2,\n y: origin.y - size / 2\n };\n return {\n endPoint,\n startPoint\n };\n }, []);\n const startPressAnimation = useCallback((target: HostElement, positionEvent?: PointerEvent<HostElement>) => {\n const ripple = rippleRef.current;\n if (!ripple) {\n return;\n }\n setPressed(true);\n growAnimation.current?.cancel();\n\n // Read once and share: the two helpers below both only need the\n // target's rect, and a second `getBoundingClientRect()` call back to\n // back with the first would be a redundant layout read.\n const rect = target.getBoundingClientRect();\n const size = determineRippleSize(rect);\n const {\n endPoint,\n startPoint\n } = getTranslationCoordinates(rect, positionEvent);\n ripple.style.width = size;\n ripple.style.height = size;\n growAnimation.current = ripple.animate({\n transform: [`translate(${startPoint.x}px, ${startPoint.y}px) scale(1)`, `translate(${endPoint.x}px, ${endPoint.y}px) scale(${rippleScale.current})`]\n }, {\n // Growth runs over a fixed duration regardless of how long the\n // press is held, so the token is spent here rather than named as a\n // constant — element.animate() is one of the two places a StyleX\n // token could not have gone.\n duration: motionDurationMs.long1,\n easing: motionEasing.standard,\n fill: 'forwards'\n });\n }, [determineRippleSize, getTranslationCoordinates]);\n const endPressAnimation = useCallback(async () => {\n rippleStartEvent.current = undefined;\n state.current = RippleState.Inactive;\n const animation = growAnimation.current;\n const elapsed = typeof animation?.currentTime === 'number' ? animation.currentTime : Infinity;\n\n // The floor on how briefly a ripple may be visible, so a quick tap reads\n // as a deliberate ripple rather than a flicker.\n if (elapsed >= motionDurationMs.medium1) {\n setPressed(false);\n return;\n }\n await new Promise(resolve => {\n setTimeout(resolve, motionDurationMs.medium1 - elapsed);\n });\n if (growAnimation.current !== animation) {\n // A newer press started; let it own the pressed state instead.\n return;\n }\n setPressed(false);\n }, []);\n\n // Reads through a function so a stale narrowing of `state.current` from\n // before the `await` below isn't (incorrectly) carried across it — the\n // ref can change via a different handler while this one is suspended.\n const getState = useCallback(() => state.current, []);\n const handlePointerDownAsync = useCallback(async (event: PointerEvent<HostElement>) => {\n if (!shouldReactToEvent(event)) {\n return;\n }\n rippleStartEvent.current = event;\n const target = event.currentTarget;\n if (!isTouch(event)) {\n state.current = RippleState.WaitingForClick;\n startPressAnimation(target, event);\n return;\n }\n\n // Delay so a scroll/swipe starting on the element doesn't flash a\n // ripple — only a held (or quickly released) touch counts as a press.\n state.current = RippleState.TouchDelay;\n await new Promise(resolve => {\n setTimeout(resolve, motionDurationMs.short2);\n });\n if (getState() !== RippleState.TouchDelay) {\n return;\n }\n state.current = RippleState.Holding;\n startPressAnimation(target, event);\n }, [getState, shouldReactToEvent, startPressAnimation]);\n const handlePointerDown = useCallback((event: PointerEvent<HostElement>) => {\n void handlePointerDownAsync(event);\n }, [handlePointerDownAsync]);\n const handlePointerUp = useCallback((event: PointerEvent<HostElement>) => {\n if (!shouldReactToEvent(event)) {\n return;\n }\n if (state.current === RippleState.Holding) {\n state.current = RippleState.WaitingForClick;\n return;\n }\n if (state.current === RippleState.TouchDelay) {\n // Released before the delay elapsed: treat as a completed tap.\n state.current = RippleState.WaitingForClick;\n startPressAnimation(event.currentTarget, rippleStartEvent.current);\n }\n }, [shouldReactToEvent, startPressAnimation]);\n const handlePointerLeave = useCallback((event: PointerEvent<HostElement>) => {\n if (isTouch(event) || !shouldReactToEvent(event)) {\n return;\n }\n if (state.current !== RippleState.Inactive) {\n void endPressAnimation();\n }\n }, [endPressAnimation, shouldReactToEvent]);\n const handlePointerCancel = useCallback((event: PointerEvent<HostElement>) => {\n if (!shouldReactToEvent(event)) {\n return;\n }\n void endPressAnimation();\n }, [endPressAnimation, shouldReactToEvent]);\n const handleClick = useCallback((event: MouseEvent<HostElement>) => {\n if (state.current === RippleState.WaitingForClick) {\n void endPressAnimation();\n return;\n }\n if (state.current === RippleState.Inactive) {\n // No pointerdown preceded this click — keyboard activation, a\n // programmatic `.click()`, or assistive-tech-synthesized activation.\n // Play a complete, centered press immediately.\n startPressAnimation(event.currentTarget);\n void endPressAnimation();\n }\n }, [endPressAnimation, startPressAnimation]);\n const handleContextMenu = useCallback(() => {\n void endPressAnimation();\n }, [endPressAnimation]);\n const {\n onClick: onClickProp,\n onContextMenu: onContextMenuProp,\n onPointerCancel: onPointerCancelProp,\n onPointerDown: onPointerDownProp,\n onPointerLeave: onPointerLeaveProp,\n onPointerUp: onPointerUpProp\n } = externalHandlers;\n const onClick = useCallback((event: MouseEvent<HostElement>) => {\n handleClick(event);\n onClickProp?.(event);\n }, [handleClick, onClickProp]);\n const onContextMenu = useCallback((event: MouseEvent<HostElement>) => {\n handleContextMenu();\n onContextMenuProp?.(event);\n }, [handleContextMenu, onContextMenuProp]);\n const onPointerCancel = useCallback((event: PointerEvent<HostElement>) => {\n handlePointerCancel(event);\n onPointerCancelProp?.(event);\n }, [handlePointerCancel, onPointerCancelProp]);\n const onPointerDown = useCallback((event: PointerEvent<HostElement>) => {\n handlePointerDown(event);\n onPointerDownProp?.(event);\n }, [handlePointerDown, onPointerDownProp]);\n const onPointerLeave = useCallback((event: PointerEvent<HostElement>) => {\n handlePointerLeave(event);\n onPointerLeaveProp?.(event);\n }, [handlePointerLeave, onPointerLeaveProp]);\n const onPointerUp = useCallback((event: PointerEvent<HostElement>) => {\n handlePointerUp(event);\n onPointerUpProp?.(event);\n }, [handlePointerUp, onPointerUpProp]);\n const handlers = useMemo(() => ({\n onClick,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }), [onClick, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp]);\n const surface = useMemo(() => <span aria-hidden=\"true\" {...surfaceProps}>\n <span ref={rippleRef} {...stylex.props(rippleStyles.press, pressed && rippleStyles.pressed)} />\n </span>, [pressed]);\n\n // Two separate memos rather than one branching on `enabled`, so that\n // whichever branch is actually active stays keyed only on its own\n // inputs — the enabled result doesn't get a new identity every time\n // `externalHandlers` does (a component typically passes a fresh object\n // literal each render), and vice versa.\n const enabledResult = useMemo(() => ({\n handlers,\n surface\n }), [handlers, surface]);\n const disabledResult = useMemo(() => ({\n handlers: externalHandlers,\n surface: null\n }), [externalHandlers]);\n return enabled ? enabledResult : disabledResult;\n}\nexport { useRipple };"],"mappings":";;;;;;;;AAeA,MAAMc,UAAUD,UAAUE;AAI1B,MAAMC,uBAAuB;AAC7B,MAAMC,yBAAyB;AAC/B,MAAMC,4BAA4B;AAIlC,MAAMC,eAAed,MAAaK,OAAaW,OAAO;;;;;;;;AAStD,MAAMC,cAAc;;CAElBC,SAAS;;CAETC,UAAU;;CAEVC,YAAY;;CAEZC,iBAAiB;AACnB;AAUA,SAASW,QAAQC,OAAqB;CACpC,OAAOA,MAAMC,gBAAgB;AAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAAC,UAAAC,IAAAC,IAAA;C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/G,iBAAgBuK,MAAO;AAAC"}
1
+ {"version":3,"file":"useRipple.js","names":["MouseEvent","MouseEventHandler","PointerEvent","PointerEventHandler","ReactNode","stylex","useCallback","useMemo","useRef","useState","rippleStyles","motionDurationMs","motionEasing","spacingPx","PADDING","sm","INITIAL_ORIGIN_SCALE","SOFT_EDGE_MINIMUM_SIZE","SOFT_EDGE_CONTAINER_RATIO","surfaceProps","props","surface","RippleState","Holding","Inactive","TouchDelay","WaitingForClick","const","RippleEventHandlers","Element","onClick","HostElement","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","isTouch","event","pointerType","prefersReducedMotion","window","matchMedia","matches","useRipple","t0","t1","$","_c","enabled","undefined","t2","externalHandlers","pressed","setPressed","rippleRef","state","growAnimation","rippleStartEvent","initialSize","rippleScale","t3","Symbol","for","isPrimary","startEvent","current","pointerId","buttons","shouldReactToEvent","t4","rect","height","width","maxDimension","Math","max","softEdgeSize","size","floor","hypotenuse","hypot","maxRadius","determineRippleSize","t5","rect_0","positionEvent","height_0","left","top","width_0","size_0","endPoint","x","y","origin","clientX","clientY","startPoint","getTranslationCoordinates","t6","target","positionEvent_0","ripple","cancel","rect_1","getBoundingClientRect","size_1","endPoint_0","startPoint_0","style","animate","transform","duration","long1","easing","standard","fill","startPressAnimation","t7","animation","elapsed","currentTime","Infinity","medium1","Promise","resolve","setTimeout","endPressAnimation","t8","getState","t9","event_0","target_0","currentTarget","_temp","handlePointerDownAsync","t10","event_1","handlePointerDown","t11","event_2","handlePointerUp","t12","event_3","handlePointerLeave","t13","event_4","handlePointerCancel","t14","event_5","handleClick","t15","handleContextMenu","onClickProp","onContextMenuProp","onPointerCancelProp","onPointerDownProp","onPointerLeaveProp","onPointerUpProp","t16","event_6","t17","event_7","t18","event_8","t19","event_9","t20","event_10","t21","event_11","t22","handlers","t23","press","t24","t25","enabledResult","t26","disabledResult","resolve_0","short2"],"sources":["../../src/hooks/useRipple.tsx"],"sourcesContent":["import type { MouseEvent, MouseEventHandler, PointerEvent, PointerEventHandler, ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useMemo, useRef, useState } from 'react';\nimport { rippleStyles } from '../styles/ripple';\nimport { motionDurationMs, motionEasing, spacingPx } from '../tokens/values';\n\n// Every timing this file drives is a motion token, spent at the point of use\n// below. They come from tokens/values rather than the StyleX theme because\n// element.animate() and setTimeout both reject a token's var() form, and the\n// same is true of the one geometry token: `PADDING` is added to a radius, and\n// a var() would concatenate rather than add. See src/styles/ripple.ts for the\n// opacity half of the mechanism, whose three timings are deliberately not\n// tokens.\n\n/** How far the ripple grows past the host's corners. `spacing.sm`. */\nconst PADDING = spacingPx.sm;\n\n// The rest are ratios and a pixel floor that no token group covers — spacing\n// is layout rhythm, and nothing in the set holds bare geometric ratios.\nconst INITIAL_ORIGIN_SCALE = 0.2;\nconst SOFT_EDGE_MINIMUM_SIZE = 75;\nconst SOFT_EDGE_CONTAINER_RATIO = 0.35;\n\n// Static input, so this is computed once for every consumer of the module\n// rather than once per component instance.\nconst surfaceProps = stylex.props(rippleStyles.surface);\n\n/**\n * On touch: `Inactive -> TouchDelay -> WaitingForClick -> Inactive`, or\n * `Inactive -> TouchDelay -> Holding -> WaitingForClick -> Inactive` for a\n * held press.\n *\n * On mouse or pen: `Inactive -> WaitingForClick -> Inactive`.\n */\nconst RippleState = {\n /** A touch has been confirmed as a press (held past the touch delay). */\n Holding: 2,\n /** No press in progress. Touch down moves to TouchDelay; mouse/pen down moves to WaitingForClick. */\n Inactive: 0,\n /** Touch down received; waiting to see if it's a tap or a scroll/swipe. */\n TouchDelay: 1,\n /** The press has finished growing; waiting for the click that ends it. */\n WaitingForClick: 3\n} as const;\ninterface RippleEventHandlers<HostElement extends Element> {\n onClick?: MouseEventHandler<HostElement>;\n onContextMenu?: MouseEventHandler<HostElement>;\n onPointerCancel?: PointerEventHandler<HostElement>;\n onPointerDown?: PointerEventHandler<HostElement>;\n onPointerLeave?: PointerEventHandler<HostElement>;\n onPointerUp?: PointerEventHandler<HostElement>;\n}\ntype RippleState = (typeof RippleState)[keyof typeof RippleState];\nfunction isTouch(event: PointerEvent) {\n return event.pointerType === 'touch';\n}\n\n/**\n * Whether the reader has asked the OS for less motion.\n *\n * Growth is a Web Animations call, which makes it the one animation in the\n * library no `@media (prefers-reduced-motion: reduce)` branch can reach — see\n * src/styles/ripple.ts for the opacity half, which is CSS and carries one.\n *\n * Read at the press rather than once at mount, so a reader who changes the\n * setting is answered by their next press rather than by their next reload.\n * The press already reads layout through `getBoundingClientRect`, which costs\n * more than this does.\n */\nfunction prefersReducedMotion() {\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n\n/**\n * Renders a press ripple that grows from the pointer's position, or from\n * the element's center for a keyboard or other non-pointer activation.\n *\n * Growth runs via the Web Animations API on a single reused element (no\n * per-click DOM nodes to clean up), over a fixed duration independent of how\n * long the element is held — a real press-and-hold keeps the ripple\n * growing until release, while a quick tap is still held visible for a\n * minimum duration so it plays a complete animation rather than a flicker.\n *\n * Merges its own handlers with `externalHandlers` (e.g. a component's own\n * consumer-supplied props — ripple's own run first, then the external\n * ones) and returns `handlers` to spread onto the interactive element and\n * `surface`, the node to render as a child. The host element must\n * establish a positioning context (`position: relative` or similar) so\n * `surface`, which fills it via `inset: 0`, clips to its bounds and\n * inherits its shape.\n *\n * Pass `enabled: false` to opt out — no ripple listeners are attached and\n * no surface is rendered, leaving `externalHandlers` and a component's own\n * hover/press state layer (if any) untouched.\n *\n * `handlers` and `surface` are hand-memoized (not left to build-tool\n * optimization) so a consumer rendering many instances — a list of icon\n * buttons, say — can memoize around them too, and so stability doesn't\n * depend on any particular compiler being configured.\n */\nfunction useRipple<HostElement extends Element = Element>(enabled = true, externalHandlers: RippleEventHandlers<HostElement> = {}): {\n handlers: RippleEventHandlers<HostElement>;\n surface: ReactNode;\n} {\n const [pressed, setPressed] = useState(false);\n const rippleRef = useRef<HTMLSpanElement>(null);\n const state = useRef<RippleState>(RippleState.Inactive);\n const growAnimation = useRef<Animation | undefined>(undefined);\n const rippleStartEvent = useRef<PointerEvent<HostElement> | undefined>(undefined);\n const initialSize = useRef(0);\n const rippleScale = useRef('1');\n const shouldReactToEvent = useCallback((event: PointerEvent<HostElement>) => {\n if (!event.isPrimary) {\n return false;\n }\n const startEvent = rippleStartEvent.current;\n if (startEvent && startEvent.pointerId !== event.pointerId) {\n return false;\n }\n return isTouch(event) || event.buttons === 1;\n }, []);\n const determineRippleSize = useCallback((rect: DOMRect) => {\n const {\n height,\n width\n } = rect;\n const maxDimension = Math.max(height, width);\n const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDimension, SOFT_EDGE_MINIMUM_SIZE);\n const size = Math.floor(maxDimension * INITIAL_ORIGIN_SCALE);\n const hypotenuse = Math.hypot(width, height);\n const maxRadius = hypotenuse + PADDING;\n initialSize.current = size;\n rippleScale.current = `${(maxRadius + softEdgeSize) / size}`;\n return `${size}px`;\n }, []);\n const getTranslationCoordinates = useCallback((rect: DOMRect, positionEvent?: PointerEvent<HostElement>) => {\n const {\n height,\n left,\n top,\n width\n } = rect;\n const size = initialSize.current;\n const endPoint = {\n x: (width - size) / 2,\n y: (height - size) / 2\n };\n const origin = positionEvent ? {\n x: positionEvent.clientX - left,\n y: positionEvent.clientY - top\n } : {\n x: width / 2,\n y: height / 2\n };\n const startPoint = {\n x: origin.x - size / 2,\n y: origin.y - size / 2\n };\n return {\n endPoint,\n startPoint\n };\n }, []);\n const startPressAnimation = useCallback((target: HostElement, positionEvent?: PointerEvent<HostElement>) => {\n const ripple = rippleRef.current;\n if (!ripple) {\n return;\n }\n setPressed(true);\n growAnimation.current?.cancel();\n\n // Read once and share: the two helpers below both only need the\n // target's rect, and a second `getBoundingClientRect()` call back to\n // back with the first would be a redundant layout read.\n const rect = target.getBoundingClientRect();\n const size = determineRippleSize(rect);\n const {\n endPoint,\n startPoint\n } = getTranslationCoordinates(rect, positionEvent);\n ripple.style.width = size;\n ripple.style.height = size;\n growAnimation.current = ripple.animate({\n transform: [`translate(${startPoint.x}px, ${startPoint.y}px) scale(1)`, `translate(${endPoint.x}px, ${endPoint.y}px) scale(${rippleScale.current})`]\n }, {\n // Growth runs over a fixed duration regardless of how long the\n // press is held, so the token is spent here rather than named as a\n // constant — element.animate() is one of the two places a StyleX\n // token could not have gone.\n //\n // Zeroed rather than skipped under reduced motion, which lands the\n // disc at its full size with the growth never drawn. Skipping the\n // call outright would leave `growAnimation` unset, and the release\n // below reads its `currentTime` to decide whether the press has\n // been visible long enough — so the press would still be shown, and\n // would stop being held for its minimum.\n duration: prefersReducedMotion() ? 0 : motionDurationMs.long1,\n easing: motionEasing.standard,\n fill: 'forwards'\n });\n }, [determineRippleSize, getTranslationCoordinates]);\n const endPressAnimation = useCallback(async () => {\n rippleStartEvent.current = undefined;\n state.current = RippleState.Inactive;\n const animation = growAnimation.current;\n const elapsed = typeof animation?.currentTime === 'number' ? animation.currentTime : Infinity;\n\n // The floor on how briefly a ripple may be visible, so a quick tap reads\n // as a deliberate ripple rather than a flicker.\n if (elapsed >= motionDurationMs.medium1) {\n setPressed(false);\n return;\n }\n await new Promise(resolve => {\n setTimeout(resolve, motionDurationMs.medium1 - elapsed);\n });\n if (growAnimation.current !== animation) {\n // A newer press started; let it own the pressed state instead.\n return;\n }\n setPressed(false);\n }, []);\n\n // Reads through a function so a stale narrowing of `state.current` from\n // before the `await` below isn't (incorrectly) carried across it — the\n // ref can change via a different handler while this one is suspended.\n const getState = useCallback(() => state.current, []);\n const handlePointerDownAsync = useCallback(async (event: PointerEvent<HostElement>) => {\n if (!shouldReactToEvent(event)) {\n return;\n }\n rippleStartEvent.current = event;\n const target = event.currentTarget;\n if (!isTouch(event)) {\n state.current = RippleState.WaitingForClick;\n startPressAnimation(target, event);\n return;\n }\n\n // Delay so a scroll/swipe starting on the element doesn't flash a\n // ripple — only a held (or quickly released) touch counts as a press.\n state.current = RippleState.TouchDelay;\n await new Promise(resolve => {\n setTimeout(resolve, motionDurationMs.short2);\n });\n if (getState() !== RippleState.TouchDelay) {\n return;\n }\n state.current = RippleState.Holding;\n startPressAnimation(target, event);\n }, [getState, shouldReactToEvent, startPressAnimation]);\n const handlePointerDown = useCallback((event: PointerEvent<HostElement>) => {\n void handlePointerDownAsync(event);\n }, [handlePointerDownAsync]);\n const handlePointerUp = useCallback((event: PointerEvent<HostElement>) => {\n if (!shouldReactToEvent(event)) {\n return;\n }\n if (state.current === RippleState.Holding) {\n state.current = RippleState.WaitingForClick;\n return;\n }\n if (state.current === RippleState.TouchDelay) {\n // Released before the delay elapsed: treat as a completed tap.\n state.current = RippleState.WaitingForClick;\n startPressAnimation(event.currentTarget, rippleStartEvent.current);\n }\n }, [shouldReactToEvent, startPressAnimation]);\n const handlePointerLeave = useCallback((event: PointerEvent<HostElement>) => {\n if (isTouch(event) || !shouldReactToEvent(event)) {\n return;\n }\n if (state.current !== RippleState.Inactive) {\n void endPressAnimation();\n }\n }, [endPressAnimation, shouldReactToEvent]);\n const handlePointerCancel = useCallback((event: PointerEvent<HostElement>) => {\n if (!shouldReactToEvent(event)) {\n return;\n }\n void endPressAnimation();\n }, [endPressAnimation, shouldReactToEvent]);\n const handleClick = useCallback((event: MouseEvent<HostElement>) => {\n if (state.current === RippleState.WaitingForClick) {\n void endPressAnimation();\n return;\n }\n if (state.current === RippleState.Inactive) {\n // No pointerdown preceded this click — keyboard activation, a\n // programmatic `.click()`, or assistive-tech-synthesized activation.\n // Play a complete, centered press immediately.\n startPressAnimation(event.currentTarget);\n void endPressAnimation();\n }\n }, [endPressAnimation, startPressAnimation]);\n const handleContextMenu = useCallback(() => {\n void endPressAnimation();\n }, [endPressAnimation]);\n const {\n onClick: onClickProp,\n onContextMenu: onContextMenuProp,\n onPointerCancel: onPointerCancelProp,\n onPointerDown: onPointerDownProp,\n onPointerLeave: onPointerLeaveProp,\n onPointerUp: onPointerUpProp\n } = externalHandlers;\n const onClick = useCallback((event: MouseEvent<HostElement>) => {\n handleClick(event);\n onClickProp?.(event);\n }, [handleClick, onClickProp]);\n const onContextMenu = useCallback((event: MouseEvent<HostElement>) => {\n handleContextMenu();\n onContextMenuProp?.(event);\n }, [handleContextMenu, onContextMenuProp]);\n const onPointerCancel = useCallback((event: PointerEvent<HostElement>) => {\n handlePointerCancel(event);\n onPointerCancelProp?.(event);\n }, [handlePointerCancel, onPointerCancelProp]);\n const onPointerDown = useCallback((event: PointerEvent<HostElement>) => {\n handlePointerDown(event);\n onPointerDownProp?.(event);\n }, [handlePointerDown, onPointerDownProp]);\n const onPointerLeave = useCallback((event: PointerEvent<HostElement>) => {\n handlePointerLeave(event);\n onPointerLeaveProp?.(event);\n }, [handlePointerLeave, onPointerLeaveProp]);\n const onPointerUp = useCallback((event: PointerEvent<HostElement>) => {\n handlePointerUp(event);\n onPointerUpProp?.(event);\n }, [handlePointerUp, onPointerUpProp]);\n const handlers = useMemo(() => ({\n onClick,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }), [onClick, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp]);\n const surface = useMemo(() => <span aria-hidden=\"true\" {...surfaceProps}>\n <span ref={rippleRef} {...stylex.props(rippleStyles.press, pressed && rippleStyles.pressed)} />\n </span>, [pressed]);\n\n // Two separate memos rather than one branching on `enabled`, so that\n // whichever branch is actually active stays keyed only on its own\n // inputs — the enabled result doesn't get a new identity every time\n // `externalHandlers` does (a component typically passes a fresh object\n // literal each render), and vice versa.\n const enabledResult = useMemo(() => ({\n handlers,\n surface\n }), [handlers, surface]);\n const disabledResult = useMemo(() => ({\n handlers: externalHandlers,\n surface: null\n }), [externalHandlers]);\n return enabled ? enabledResult : disabledResult;\n}\nexport { useRipple };"],"mappings":";;;;;;;;AAeA,MAAMc,UAAUD,UAAUE;AAI1B,MAAMC,uBAAuB;AAC7B,MAAMC,yBAAyB;AAC/B,MAAMC,4BAA4B;AAIlC,MAAMC,eAAed,MAAaK,OAAaW,OAAO;;;;;;;;AAStD,MAAMC,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0B,EAAA,MAAAkI;CAAA,OAAAA,MAAAlI,EAAA;CAHD,MAAAmI,gBAAqCD;CAGZ,IAAAE;CAAA,IAAApI,EAAA,QAAAK,kBAAA;EACa+H,MAAA;GAAAN,UAC1BzH;GAAgB/B,SACjB;EACX;EAAC0B,EAAA,MAAAK;EAAAL,EAAA,MAAAoI;CAAA,OAAAA,MAAApI,EAAA;CAAuB,OACjBE,UAAAiI,gBAAAE;AAAwC;AA/PjD,SAAA7C,MAAA8C,WAAA;CA+IMtD,WAAWD,WAASnH,iBAAgB2K,MAAO;AAAC"}
@@ -5,12 +5,13 @@ const _temp = {
5
5
  };
6
6
  const indicatorStyles = {
7
7
  active: {
8
+ k6CgDc: "x12w9bfk",
8
9
  kWkggS: "xnety89",
9
10
  kZKoxP: "x5yr21d",
10
11
  kaIpWk: "x1dkaolv",
11
12
  kB7OPa: "x9f619",
12
13
  kmuXW: "x2lah0s",
13
- kIyJzY: "x1rvut6x",
14
+ kIyJzY: "xioksi3",
14
15
  k1ekBW: "x1j4rzew",
15
16
  kAMwcw: "x16pyfke",
16
17
  $$css: true
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["stylex","colors","radii","spacing","typography","THICKNESS","GAP","DETERMINATE_MS","DETERMINATE_EASING","IndicatorTone","_temp","kzqmXN","indicatorStyles","active","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","line","negativeActive","positiveActive","root","kXwgrk","stop","track","kzQI83","k7Eaqz","kVQacm","trackSolid"],"sources":["../../src/indicator/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, 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 active indicator's width is\n// the percentage itself and the track takes what is left, so the row is a\n// flex line and the two gaps are its `gap`.\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/** What the page gives a value that changes to move over. */\nexport const DETERMINATE_MS = 250;\nexport const DETERMINATE_EASING = 'cubic-bezier(0.4, 0, 0.6, 1)';\nexport type IndicatorTone = 'inherit' | 'negative' | 'positive' | 'primary';\nconst _temp = {\n kzqmXN: \"x1uyokj7\",\n \"$$css\": true\n};\nexport const indicatorStyles = {\n active: {\n kWkggS: \"xnety89\",\n kZKoxP: \"x5yr21d\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kmuXW: \"x2lah0s\",\n kIyJzY: \"x1rvut6x\",\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)(`${percentage}%`)\n }],\n inheritActive: {\n kWkggS: \"xtwfq29\",\n kjVXCG: \"x73je2i\",\n $$css: true\n },\n inheritTrack: {\n kWkggS: \"xtp5tyh\",\n kjVXCG: \"xy3ggvv\",\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 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\",\n $$css: true\n },\n positiveActive: {\n kWkggS: \"x1xov01w\",\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\",\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 kVQacm: \"xb3r6kr\",\n $$css: true\n },\n trackSolid: {\n kWkggS: \"x15dekr4\",\n $$css: true\n }\n};"],"mappings":";AAmCA,MAAMU,QAAQ;CACZC,QAAQ;CACR,SAAS;AACX;AACA,MAAaC,kBAAkB;CAC7BC,QAAQ;EACNC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,WAAWC,eAAuB,CAACd,OAAO,EACxC,oBAAmBe,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAW,GAAGF,WAAU,EAAG,EAClH,CAAC;CACDG,eAAe;EACbb,QAAQ;EACRc,QAAQ;EACRN,OAAO;CACT;CACAO,cAAc;EACZf,QAAQ;EACRc,QAAQ;EACRN,OAAO;CACT;CACAQ,OAAO;EACLb,QAAQ;EACRc,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRd,OAAO;CACT;CACAe,QAAQ;EACNC,QAAQ;EACRrB,QAAQ;EACRsB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRnB,OAAO;CACT;CACAoB,MAAM;EACJJ,QAAQ;EACRvB,QAAQ;EACRE,QAAQ;EACRsB,QAAQ;EACRC,QAAQ;EACR7B,QAAQ;EACRW,OAAO;CACT;CACAqB,gBAAgB;EACd7B,QAAQ;EACRQ,OAAO;CACT;CACAsB,gBAAgB;EACd9B,QAAQ;EACRQ,OAAO;CACT;CACAuB,MAAM;EACJ5B,QAAQ;EACRsB,QAAQ;EACRO,QAAQ;EACRN,QAAQ;EACR7B,QAAQ;EACRW,OAAO;CACT;CACAyB,MAAM;EACJjC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPP,QAAQ;EACRW,OAAO;CACT;CACA0B,OAAO;EACLjC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRsB,QAAQ;EACRU,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACR7B,OAAO;CACT;CACA8B,YAAY;EACVtC,QAAQ;EACRQ,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"styles.js","names":["stylex","colors","motion","radii","spacing","typography","THICKNESS","GAP","DETERMINATE_EASING","IndicatorTone","_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","line","negativeActive","positiveActive","root","kXwgrk","stop","track","kzQI83","k7Eaqz","kVQacm","trackSolid"],"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 active indicator's width is\n// the percentage itself and the track takes what is left, so the row is a\n// flex line and the two gaps are its `gap`.\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';\nconst _temp = {\n kzqmXN: \"x1uyokj7\",\n \"$$css\": true\n};\nexport const indicatorStyles = {\n active: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89\",\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)(`${percentage}%`)\n }],\n inheritActive: {\n kWkggS: \"xtwfq29\",\n kjVXCG: \"x73je2i\",\n $$css: true\n },\n inheritTrack: {\n kWkggS: \"xtp5tyh\",\n kjVXCG: \"xy3ggvv\",\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 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\",\n $$css: true\n },\n positiveActive: {\n kWkggS: \"x1xov01w\",\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\",\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 kVQacm: \"xb3r6kr\",\n $$css: true\n },\n trackSolid: {\n kWkggS: \"x15dekr4\",\n $$css: true\n }\n};"],"mappings":";AAuCA,MAAMU,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,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAW,GAAGF,WAAU,EAAG,EAClH,CAAC;CACDG,eAAe;EACbb,QAAQ;EACRc,QAAQ;EACRN,OAAO;CACT;CACAO,cAAc;EACZf,QAAQ;EACRc,QAAQ;EACRN,OAAO;CACT;CACAQ,OAAO;EACLb,QAAQ;EACRc,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRd,OAAO;CACT;CACAe,QAAQ;EACNC,QAAQ;EACRrB,QAAQ;EACRsB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRnB,OAAO;CACT;CACAoB,MAAM;EACJJ,QAAQ;EACRvB,QAAQ;EACRE,QAAQ;EACRsB,QAAQ;EACRC,QAAQ;EACR9B,QAAQ;EACRY,OAAO;CACT;CACAqB,gBAAgB;EACd7B,QAAQ;EACRQ,OAAO;CACT;CACAsB,gBAAgB;EACd9B,QAAQ;EACRQ,OAAO;CACT;CACAuB,MAAM;EACJ5B,QAAQ;EACRsB,QAAQ;EACRO,QAAQ;EACRN,QAAQ;EACR9B,QAAQ;EACRY,OAAO;CACT;CACAyB,MAAM;EACJjC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPR,QAAQ;EACRY,OAAO;CACT;CACA0B,OAAO;EACLjC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRsB,QAAQ;EACRU,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACR7B,OAAO;CACT;CACA8B,YAAY;EACVtC,QAAQ;EACRQ,OAAO;CACT;AACF"}
@@ -12,7 +12,10 @@ const segmentStyles = {
12
12
  kB7OPa: "x9f619",
13
13
  knGrYV: "xbuiw85",
14
14
  kMwMTN: "x139gbkf",
15
- k3XXqK: "x1t137rt",
15
+ kjBf7l: "x1x84bn5",
16
+ kInvED: "xnrgvoc",
17
+ k3XXqK: "x1t137rt xc0lcac x1894zjx",
18
+ kMeerF: "x1jrff4x",
16
19
  kg3NbH: "xdomwbk",
17
20
  k9WMMc: "xp4054r",
18
21
  $$css: true
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["stylex","colors","radii","spacing","stateLayerOpacity","segmentStyles","input","kGNEyG","kB7OPa","k1xSpc","k3XXqK","$$css","segment","kaIpWk","knGrYV","kMwMTN","kg3NbH","k9WMMc","segmentDisabled","segmentFocused","kWkggS","segmentLiteral","segmentPlaceholder"],"sources":["../../src/segments/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, stateLayerOpacity } from '../tokens/design.tokens.stylex';\n\n// The segments a date or a time is typed into, shared by DateField and\n// TimeField. Apart from either component so the two cannot drift, and outside\n// `src/components` because a directory there is a public component with\n// stories, a barrel entry and a `styling.test.tsx` case — which shared styles\n// are none of.\n\nconst segmentStyles = {\n input: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n segment: {\n kaIpWk: \"x1tfhd1\",\n kB7OPa: \"x9f619\",\n knGrYV: \"xbuiw85\",\n kMwMTN: \"x139gbkf\",\n k3XXqK: \"x1t137rt\",\n kg3NbH: \"xdomwbk\",\n k9WMMc: \"xp4054r\",\n $$css: true\n },\n segmentDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n segmentFocused: {\n kWkggS: \"xnety89\",\n kMwMTN: \"xwjo7ld\",\n $$css: true\n },\n segmentLiteral: {\n kMwMTN: \"x1w5n3ug\",\n kg3NbH: \"xnjsko4\",\n $$css: true\n },\n segmentPlaceholder: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\nexport { segmentStyles };"],"mappings":";AAUA,MAAMK,gBAAgB;CACpBC,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,SAAS;EACPC,QAAQ;EACRL,QAAQ;EACRM,QAAQ;EACRC,QAAQ;EACRL,QAAQ;EACRM,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;CACAO,iBAAiB;EACfH,QAAQ;EACRJ,OAAO;CACT;CACAQ,gBAAgB;EACdC,QAAQ;EACRL,QAAQ;EACRJ,OAAO;CACT;CACAU,gBAAgB;EACdN,QAAQ;EACRC,QAAQ;EACRL,OAAO;CACT;CACAW,oBAAoB;EAClBP,QAAQ;EACRJ,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"styles.js","names":["stylex","colors","radii","spacing","stateLayerOpacity","FORCED_COLORS","segmentStyles","input","kGNEyG","kB7OPa","k1xSpc","k3XXqK","$$css","segment","kaIpWk","knGrYV","kMwMTN","kjBf7l","kInvED","kMeerF","kg3NbH","k9WMMc","segmentDisabled","segmentFocused","kWkggS","segmentLiteral","segmentPlaceholder"],"sources":["../../src/segments/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, stateLayerOpacity } from '../tokens/design.tokens.stylex';\n\n// The segments a date or a time is typed into, shared by DateField and\n// TimeField. Apart from either component so the two cannot drift, and outside\n// `src/components` because a directory there is a public component with\n// stories, a barrel entry and a `styling.test.tsx` case — which shared styles\n// are none of.\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 segmentStyles = {\n input: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n segment: {\n kaIpWk: \"x1tfhd1\",\n kB7OPa: \"x9f619\",\n knGrYV: \"xbuiw85\",\n kMwMTN: \"x139gbkf\",\n kjBf7l: \"x1x84bn5\",\n kInvED: \"xnrgvoc\",\n k3XXqK: \"x1t137rt xc0lcac x1894zjx\",\n kMeerF: \"x1jrff4x\",\n kg3NbH: \"xdomwbk\",\n k9WMMc: \"xp4054r\",\n $$css: true\n },\n segmentDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n segmentFocused: {\n kWkggS: \"xnety89\",\n kMwMTN: \"xwjo7ld\",\n $$css: true\n },\n segmentLiteral: {\n kMwMTN: \"x1w5n3ug\",\n kg3NbH: \"xnjsko4\",\n $$css: true\n },\n segmentPlaceholder: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\nexport { segmentStyles };"],"mappings":";AAeA,MAAMM,gBAAgB;CACpBC,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,SAAS;EACPC,QAAQ;EACRL,QAAQ;EACRM,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRT,OAAO;CACT;CACAU,iBAAiB;EACfN,QAAQ;EACRJ,OAAO;CACT;CACAW,gBAAgB;EACdC,QAAQ;EACRR,QAAQ;EACRJ,OAAO;CACT;CACAa,gBAAgB;EACdT,QAAQ;EACRI,QAAQ;EACRR,OAAO;CACT;CACAc,oBAAoB;EAClBV,QAAQ;EACRJ,OAAO;CACT;AACF"}
@@ -1,14 +1,14 @@
1
1
  //#region src/styles/color.ts
2
2
  function thumbClassName(state) {
3
3
  return {
4
- 0: { className: "x1qx5ct2 x16fbrrb xlzcsym x9f619 x1jm3nie xw4jnvo xwa60dl xrgy624 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7" },
5
- 4: { className: "x1qx5ct2 x16fbrrb xlzcsym x9f619 x1jm3nie xw4jnvo xwa60dl xrgy624 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59" },
6
- 2: { className: "x1qx5ct2 x16fbrrb x9f619 xw4jnvo xwa60dl xrgy624 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7 x1kr41ut xi9pz9s" },
7
- 6: { className: "x1qx5ct2 x16fbrrb x9f619 xw4jnvo xwa60dl xrgy624 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59 x1kr41ut xi9pz9s" },
8
- 1: { className: "x1qx5ct2 x16fbrrb xlzcsym x9f619 xw4jnvo xwa60dl xrgy624 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7 x1h6gzvc" },
9
- 5: { className: "x1qx5ct2 x16fbrrb xlzcsym x9f619 xw4jnvo xwa60dl xrgy624 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59 x1h6gzvc" },
10
- 3: { className: "x1qx5ct2 x16fbrrb x9f619 xw4jnvo xwa60dl xrgy624 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7 x1kr41ut x1h6gzvc" },
11
- 7: { className: "x1qx5ct2 x16fbrrb x9f619 xw4jnvo xwa60dl xrgy624 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59 x1kr41ut x1h6gzvc" }
4
+ 0: { className: "x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 xlzcsym x9f619 x1jm3nie xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7" },
5
+ 4: { className: "x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 xlzcsym x9f619 x1jm3nie xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59" },
6
+ 2: { className: "x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 x9f619 xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7 x1kr41ut xi9pz9s" },
7
+ 6: { className: "x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 x9f619 xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59 x1kr41ut xi9pz9s" },
8
+ 1: { className: "x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 xlzcsym x9f619 xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7 x1h6gzvc" },
9
+ 5: { className: "x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 xlzcsym x9f619 xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59 x1h6gzvc" },
10
+ 3: { className: "x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 x9f619 xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7 x1kr41ut x1h6gzvc" },
11
+ 7: { className: "x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 x9f619 xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59 x1kr41ut x1h6gzvc" }
12
12
  }[!!state.isFocusVisible << 2 | !!state.isDragging << 1 | !!state.isDisabled << 0].className ?? "";
13
13
  }
14
14
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"color.js","names":["ColorThumbRenderProps","stylex","colors","motion","radii","shadows","colorThumb","thumb","kZKoxP","kaIpWk","kGVxlE","kB7OPa","kkrTdU","kzqmXN","k87sOh","kjBf7l","kInvED","k3XXqK","kMeerF","kIyJzY","k1ekBW","kAMwcw","$$css","thumbDisabled","thumbDragging","thumbFocused","thumbClassName","state","className","isFocusVisible","isDragging","isDisabled"],"sources":["../../src/styles/color.ts"],"sourcesContent":["import type { ColorThumbRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows } from '../tokens/design.tokens.stylex';\n\n// The handle a colour slider and a colour area share. React Aria places it —\n// along one axis on a slider, along two in an area — and fills it with the\n// colour at that point, so everything here is the ring around that fill.\n//\n// In `src/styles` rather than a directory of its own, since it is a style\n// more than one component draws, which is what that directory holds.\n//\n// Two things about it are worth knowing.\n//\n// **It is ringed rather than filled, because its fill is the value.** The\n// ring is what has to read — against every colour the track or the plane\n// runs through — so it is a surface-coloured ring with a hairline outside\n// it, which works on a light ground and a dark one alike.\n//\n// **`dragging` is applied after `focused`.** StyleX replaces a property\n// whole, so a handle being dragged takes the lifted shadow rather than\n// keeping the resting ring under it.\n\nconst colorThumb = {\n thumb: {\n kZKoxP: \"x1qx5ct2\",\n kaIpWk: \"x16fbrrb\",\n kGVxlE: \"xlzcsym\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1jm3nie\",\n kzqmXN: \"xw4jnvo\",\n k87sOh: \"xwa60dl\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2wh2y9\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xkdsq27\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n thumbDisabled: {\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n thumbDragging: {\n kGVxlE: \"x1kr41ut\",\n kkrTdU: \"xi9pz9s\",\n $$css: true\n },\n thumbFocused: {\n k3XXqK: \"xaatb59\",\n $$css: true\n }\n};\n\n// The handle's classes, from React Aria's render state. StyleX cannot target\n// `[data-dragging]` on the element it is styling, so the state comes from\n// what React Aria hands the className.\nfunction thumbClassName(state: ColorThumbRenderProps) {\n return {\n 0: {\n className: \"x1qx5ct2 x16fbrrb xlzcsym x9f619 x1jm3nie xw4jnvo xwa60dl xrgy624 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7\"\n },\n 4: {\n className: \"x1qx5ct2 x16fbrrb xlzcsym x9f619 x1jm3nie xw4jnvo xwa60dl xrgy624 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59\"\n },\n 2: {\n className: \"x1qx5ct2 x16fbrrb x9f619 xw4jnvo xwa60dl xrgy624 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7 x1kr41ut xi9pz9s\"\n },\n 6: {\n className: \"x1qx5ct2 x16fbrrb x9f619 xw4jnvo xwa60dl xrgy624 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59 x1kr41ut xi9pz9s\"\n },\n 1: {\n className: \"x1qx5ct2 x16fbrrb xlzcsym x9f619 xw4jnvo xwa60dl xrgy624 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7 x1h6gzvc\"\n },\n 5: {\n className: \"x1qx5ct2 x16fbrrb xlzcsym x9f619 xw4jnvo xwa60dl xrgy624 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59 x1h6gzvc\"\n },\n 3: {\n className: \"x1qx5ct2 x16fbrrb x9f619 xw4jnvo xwa60dl xrgy624 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7 x1kr41ut x1h6gzvc\"\n },\n 7: {\n className: \"x1qx5ct2 x16fbrrb x9f619 xw4jnvo xwa60dl xrgy624 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59 x1kr41ut x1h6gzvc\"\n }\n }[!!state.isFocusVisible << 2 | !!state.isDragging << 1 | !!state.isDisabled << 0].className ?? '';\n}\nexport { colorThumb, thumbClassName };"],"mappings":";AA2DA,SAAS0B,eAAeC,OAA8B;CACpD,OAAO;EACL,GAAG,EACDC,WAAW,uHACb;EACA,GAAG,EACDA,WAAW,sHACb;EACA,GAAG,EACDA,WAAW,uHACb;EACA,GAAG,EACDA,WAAW,sHACb;EACA,GAAG,EACDA,WAAW,uHACb;EACA,GAAG,EACDA,WAAW,sHACb;EACA,GAAG,EACDA,WAAW,wHACb;EACA,GAAG,EACDA,WAAW,uHACb;CACF,EAAE,CAAC,CAACD,MAAME,kBAAkB,IAAI,CAAC,CAACF,MAAMG,cAAc,IAAI,CAAC,CAACH,MAAMI,cAAc,EAAE,CAACH,aAAa;AAClG"}
1
+ {"version":3,"file":"color.js","names":["ColorThumbRenderProps","stylex","colors","motion","radii","shadows","FORCED_COLORS","colorThumb","thumb","k6CgDc","kZKoxP","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kGVxlE","kB7OPa","kkrTdU","kzqmXN","k87sOh","kjBf7l","kInvED","k3XXqK","kMeerF","kIyJzY","k1ekBW","kAMwcw","$$css","thumbDisabled","thumbDragging","thumbFocused","thumbClassName","state","className","isFocusVisible","isDragging","isDisabled"],"sources":["../../src/styles/color.ts"],"sourcesContent":["import type { ColorThumbRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows } from '../tokens/design.tokens.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The handle a colour slider and a colour area share. React Aria places it —\n// along one axis on a slider, along two in an area — and fills it with the\n// colour at that point, so everything here is the ring around that fill.\n//\n// In `src/styles` rather than a directory of its own, since it is a style\n// more than one component draws, which is what that directory holds.\n//\n// Two things about it are worth knowing.\n//\n// **It is ringed rather than filled, because its fill is the value.** The\n// ring is what has to read — against every colour the track or the plane\n// runs through — so it is a surface-coloured ring with a hairline outside\n// it, which works on a light ground and a dark one alike.\n//\n// **`dragging` is applied after `focused`.** StyleX replaces a property\n// whole, so a handle being dragged takes the lifted shadow rather than\n// keeping the resting ring under it.\n\nconst colorThumb = {\n thumb: {\n k6CgDc: \"x12w9bfk\",\n kZKoxP: \"x1qx5ct2\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x16fbrrb\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kGVxlE: \"xlzcsym\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1jm3nie\",\n kzqmXN: \"xw4jnvo\",\n k87sOh: \"xwa60dl\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x2wh2y9\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xkdsq27\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n thumbDisabled: {\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n thumbDragging: {\n kGVxlE: \"x1kr41ut\",\n kkrTdU: \"xi9pz9s\",\n $$css: true\n },\n thumbFocused: {\n k3XXqK: \"xaatb59\",\n $$css: true\n }\n};\n\n// The handle's classes, from React Aria's render state. StyleX cannot target\n// `[data-dragging]` on the element it is styling, so the state comes from\n// what React Aria hands the className.\nfunction thumbClassName(state: ColorThumbRenderProps) {\n return {\n 0: {\n className: \"x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 xlzcsym x9f619 x1jm3nie xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7\"\n },\n 4: {\n className: \"x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 xlzcsym x9f619 x1jm3nie xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59\"\n },\n 2: {\n className: \"x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 x9f619 xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7 x1kr41ut xi9pz9s\"\n },\n 6: {\n className: \"x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 x9f619 xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59 x1kr41ut xi9pz9s\"\n },\n 1: {\n className: \"x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 xlzcsym x9f619 xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7 x1h6gzvc\"\n },\n 5: {\n className: \"x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 xlzcsym x9f619 xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59 x1h6gzvc\"\n },\n 3: {\n className: \"x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 x9f619 xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1t137rt x1de99jn x1qno0dh xkdsq27 xpc4ca7 x1kr41ut x1h6gzvc\"\n },\n 7: {\n className: \"x12w9bfk x1qx5ct2 x1ylmb6m x16fbrrb xx61lck x13rsnn2 x9f619 xw4jnvo xwa60dl xrgy624 x1x84bn5 x2wh2y9 x1de99jn x1qno0dh xkdsq27 xpc4ca7 xaatb59 x1kr41ut x1h6gzvc\"\n }\n }[!!state.isFocusVisible << 2 | !!state.isDragging << 1 | !!state.isDisabled << 0].className ?? '';\n}\nexport { colorThumb, thumbClassName };"],"mappings":";AAqEA,SAAS+B,eAAeC,OAA8B;CACpD,OAAO;EACL,GAAG,EACDC,WAAW,mKACb;EACA,GAAG,EACDA,WAAW,kKACb;EACA,GAAG,EACDA,WAAW,mKACb;EACA,GAAG,EACDA,WAAW,kKACb;EACA,GAAG,EACDA,WAAW,mKACb;EACA,GAAG,EACDA,WAAW,kKACb;EACA,GAAG,EACDA,WAAW,oKACb;EACA,GAAG,EACDA,WAAW,mKACb;CACF,EAAE,CAAC,CAACD,MAAME,kBAAkB,IAAI,CAAC,CAACF,MAAMG,cAAc,IAAI,CAAC,CAACH,MAAMI,cAAc,EAAE,CAACH,aAAa;AAClG"}
@@ -10,7 +10,7 @@ const iconButton = { chrome: {
10
10
  kkrTdU: "x1ypdohk",
11
11
  k1xSpc: "x78zum5",
12
12
  kmuXW: "x2lah0s",
13
- kzqmXN: "x100vrsf",
13
+ kzqmXN: "x1eujcsb",
14
14
  kjj79g: "xl56j7k",
15
15
  kmVPX3: "x1717udv",
16
16
  $$css: true
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button.js","names":["stylex","colors","radii","sizing","stateLayerOpacity","iconButton","chrome","kGNEyG","kWkggS","kZKoxP","kaIpWk","kMzoRj","kB7OPa","kMwMTN","kkrTdU","k1xSpc","kmuXW","kzqmXN","kjj79g","kmVPX3","$$css"],"sources":["../../src/styles/icon-button.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, sizing, stateLayerOpacity } from '../tokens/design.tokens.stylex';\n\n// The icon buttons page's 40dp square and its state layer, drawn directly on\n// a button rather than through the `IconButton` component.\n//\n// Two places need that, and both said so in the same words while keeping\n// their own copy: a picker's trigger and the chevrons that move a calendar's\n// month. Neither can reach for `IconButton`, because React Aria carries each\n// of them on its own `Button` — the trigger through a picker's context, the\n// chevrons through a calendar's slots — so the chrome has to be drawn onto\n// the element React Aria renders.\n//\n// What each keeps is what it does not share. A calendar's chevron sits in a\n// 48dp column, so it adds the 4dp either side; a picker's trigger takes a\n// fade when the field around it is disabled.\n//\n// This is deliberately narrow. Five other buttons in the library draw a bare\n// icon — a tree's caret, a navigation tree's, a combo box's toggle, a chip's\n// remove and `IconButton` itself — and each differs in size, content colour,\n// state-layer semantics or focus-ring offset, with a comment recording why.\n// At most eleven of these seventeen declarations survive into any of them, so\n// composing this and overriding the rest would hide those decisions rather\n// than record them.\nconst iconButton = {\n chrome: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"x1dg9itu x1728qcm xjbqb8w\",\n kZKoxP: \"x1rv7mn0\",\n kaIpWk: \"x1dkaolv\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x100vrsf\",\n kjj79g: \"xl56j7k\",\n kmVPX3: \"x1717udv\",\n $$css: true\n }\n};\nexport { iconButton };"],"mappings":";AAyBA,MAAMK,aAAa,EACjBC,QAAQ;CACNC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,OAAO;CACPC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,OAAO;AACT,EACF"}
1
+ {"version":3,"file":"icon-button.js","names":["stylex","colors","radii","sizing","stateLayerOpacity","iconButton","chrome","kGNEyG","kWkggS","kZKoxP","kaIpWk","kMzoRj","kB7OPa","kMwMTN","kkrTdU","k1xSpc","kmuXW","kzqmXN","kjj79g","kmVPX3","$$css"],"sources":["../../src/styles/icon-button.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, sizing, stateLayerOpacity } from '../tokens/design.tokens.stylex';\n\n// The icon buttons page's 40dp square and its state layer, drawn directly on\n// a button rather than through the `IconButton` component.\n//\n// Two places need that, and both said so in the same words while keeping\n// their own copy: a picker's trigger and the chevrons that move a calendar's\n// month. Neither can reach for `IconButton`, because React Aria carries each\n// of them on its own `Button` — the trigger through a picker's context, the\n// chevrons through a calendar's slots — so the chrome has to be drawn onto\n// the element React Aria renders.\n//\n// What each keeps is what it does not share. A calendar's chevron sits in a\n// 48dp column, so it adds the 4dp either side; a picker's trigger takes a\n// fade when the field around it is disabled.\n//\n// This is deliberately narrow. Five other buttons in the library draw a bare\n// icon — a tree's caret, a navigation tree's, a combo box's toggle, a chip's\n// remove and `IconButton` itself — and each differs in size, content colour,\n// state-layer semantics or focus-ring offset, with a comment recording why.\n// At most eleven of these seventeen declarations survive into any of them, so\n// composing this and overriding the rest would hide those decisions rather\n// than record them.\nconst iconButton = {\n chrome: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"x1dg9itu x1728qcm xjbqb8w\",\n kZKoxP: \"x1rv7mn0\",\n kaIpWk: \"x1dkaolv\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x1eujcsb\",\n kjj79g: \"xl56j7k\",\n kmVPX3: \"x1717udv\",\n $$css: true\n }\n};\nexport { iconButton };"],"mappings":";AAyBA,MAAMK,aAAa,EACjBC,QAAQ;CACNC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,OAAO;CACPC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,OAAO;AACT,EACF"}
@@ -15,7 +15,7 @@ const picker = {
15
15
  popover: {
16
16
  k87sOh: "x80663w xifftmu",
17
17
  kLqNvP: "xhi6v0a xel0e7d",
18
- ks0D6T: "x1x1rfll x1gc1xii",
18
+ ks0D6T: "x1x1rfll x1493c6o",
19
19
  kVAEAm: "x10l6tqk xrdyt6x",
20
20
  k3aq6I: "x1c071of xd6mrmt",
21
21
  $$css: true
@@ -1 +1 @@
1
- {"version":3,"file":"picker.js","names":["stylex","colors","media","spacing","stateLayerOpacity","focus","iconButton","picker","group","kGNEyG","kB7OPa","k1xSpc","kOIVth","kzqmXN","k3XXqK","$$css","popover","k87sOh","kLqNvP","ks0D6T","kVAEAm","k3aq6I","triggerDisabled","kWkggS","kMwMTN","kkrTdU","triggerGlyph","kZKoxP","triggerClassName","state","isDisabled","props","chrome","ring","className"],"sources":["../../src/styles/picker.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, media, spacing, stateLayerOpacity } from '../tokens/design.tokens.stylex';\nimport { focus } from './focus';\nimport { iconButton } from './icon-button';\n\n// What a date picker and a date range picker draw in common: the line the\n// segments and the trigger share, the trigger itself, and the surface the\n// calendar opens on. Both put the same three on screen, and the breakpoint\n// swap below is why they are here rather than written twice — a docked\n// picker and a range picker that disagreed about where the modal sits would\n// be two bugs rather than one.\n//\n// In `src/styles` rather than a `src/picker` of its own, since this is\n// styles more than one component draws, which is what that directory holds.\n// Geometry belonging to one picker alone stays with that picker.\n\nconst picker = {\n group: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x126z3so\",\n kzqmXN: \"xh8yej3\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n popover: {\n k87sOh: \"x80663w xifftmu\",\n kLqNvP: \"xhi6v0a xel0e7d\",\n ks0D6T: \"x1x1rfll x1gc1xii\",\n kVAEAm: \"x10l6tqk xrdyt6x\",\n k3aq6I: \"x1c071of xd6mrmt\",\n $$css: true\n },\n triggerDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1gpw424\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n triggerGlyph: {\n kZKoxP: \"xxk0z11\",\n kzqmXN: \"xvy4d1p\",\n $$css: true\n }\n};\n\n// The trigger's classes, from React Aria's own render state. A picker's\n// trigger is disabled by the field around it rather than by a prop of its\n// own, so the fade comes off the state React Aria hands the className.\nfunction triggerClassName(state: {\n isDisabled: boolean;\n}) {\n return stylex.props(iconButton.chrome, focus.ring, state.isDisabled && picker.triggerDisabled).className ?? '';\n}\nexport { picker, triggerClassName };"],"mappings":";;;;AAiBA,MAAMO,SAAS;CACbC,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;CACAO,iBAAiB;EACfC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRV,OAAO;CACT;CACAW,cAAc;EACZC,QAAQ;EACRd,QAAQ;EACRE,OAAO;CACT;AACF;AAKA,SAASa,iBAAiBC,OAEvB;CACD,OAAO7B,MAAaM,WAAW0B,QAAQ3B,MAAM4B,MAAMJ,MAAMC,cAAcvB,OAAOe,eAAe,CAAC,CAACY,aAAa;AAC9G"}
1
+ {"version":3,"file":"picker.js","names":["stylex","colors","media","spacing","stateLayerOpacity","focus","iconButton","picker","group","kGNEyG","kB7OPa","k1xSpc","kOIVth","kzqmXN","k3XXqK","$$css","popover","k87sOh","kLqNvP","ks0D6T","kVAEAm","k3aq6I","triggerDisabled","kWkggS","kMwMTN","kkrTdU","triggerGlyph","kZKoxP","triggerClassName","state","isDisabled","props","chrome","ring","className"],"sources":["../../src/styles/picker.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, media, spacing, stateLayerOpacity } from '../tokens/design.tokens.stylex';\nimport { focus } from './focus';\nimport { iconButton } from './icon-button';\n\n// What a date picker and a date range picker draw in common: the line the\n// segments and the trigger share, the trigger itself, and the surface the\n// calendar opens on. Both put the same three on screen, and the breakpoint\n// swap below is why they are here rather than written twice — a docked\n// picker and a range picker that disagreed about where the modal sits would\n// be two bugs rather than one.\n//\n// In `src/styles` rather than a `src/picker` of its own, since this is\n// styles more than one component draws, which is what that directory holds.\n// Geometry belonging to one picker alone stays with that picker.\n\nconst picker = {\n group: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x126z3so\",\n kzqmXN: \"xh8yej3\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n popover: {\n k87sOh: \"x80663w xifftmu\",\n kLqNvP: \"xhi6v0a xel0e7d\",\n ks0D6T: \"x1x1rfll x1493c6o\",\n kVAEAm: \"x10l6tqk xrdyt6x\",\n k3aq6I: \"x1c071of xd6mrmt\",\n $$css: true\n },\n triggerDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1gpw424\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n triggerGlyph: {\n kZKoxP: \"xxk0z11\",\n kzqmXN: \"xvy4d1p\",\n $$css: true\n }\n};\n\n// The trigger's classes, from React Aria's own render state. A picker's\n// trigger is disabled by the field around it rather than by a prop of its\n// own, so the fade comes off the state React Aria hands the className.\nfunction triggerClassName(state: {\n isDisabled: boolean;\n}) {\n return stylex.props(iconButton.chrome, focus.ring, state.isDisabled && picker.triggerDisabled).className ?? '';\n}\nexport { picker, triggerClassName };"],"mappings":";;;;AAiBA,MAAMO,SAAS;CACbC,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;CACAO,iBAAiB;EACfC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRV,OAAO;CACT;CACAW,cAAc;EACZC,QAAQ;EACRd,QAAQ;EACRE,OAAO;CACT;AACF;AAKA,SAASa,iBAAiBC,OAEvB;CACD,OAAO7B,MAAaM,WAAW0B,QAAQ3B,MAAM4B,MAAMJ,MAAMC,cAAcvB,OAAOe,eAAe,CAAC,CAACY,aAAa;AAC9G"}
@@ -1,6 +1,7 @@
1
1
  //#region src/styles/ripple.ts
2
2
  const styles = {
3
3
  press: {
4
+ k6CgDc: "x12w9bfk",
4
5
  kKwaWg: "xliahv6",
5
6
  kbCHJM: "xu96u03",
6
7
  kSiTet: "xg01cxk",
@@ -1 +1 @@
1
- {"version":3,"file":"ripple.js","names":["stylex","stateLayerOpacity","FORCED_COLORS","styles","press","kKwaWg","kbCHJM","kSiTet","kVAEAm","k87sOh","k3nNDw","kIyJzY","k1ekBW","kAMwcw","$$css","pressed","surface","kaIpWk","k1xSpc","kpwlN0","kVQacm","kfzvcC","rippleStyles"],"sources":["../../src/styles/ripple.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { stateLayerOpacity } from '../tokens/design.tokens.stylex';\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// Growth and opacity are two independent mechanisms. Growth (width/height/\n// transform) is driven imperatively via the Web Animations API in\n// useRipple, decoupled from press/release timing so it always plays out\n// over a fixed duration. Opacity is what this file owns — toggled by the\n// `pressed` class — with a fast fade-in and a slower fade-out, so a quick\n// tap still reads as a deliberate, visible ripple rather than a flicker.\n//\n// None of the three timings below is a motion token, and that is deliberate\n// rather than an oversight predating them. The fade pair is the asymmetry\n// the paragraph above describes: 105ms in against 375ms out, hand-tuned as\n// a ratio to each other, and neither lands on the scale (105ms is near\n// durationShort1's 100ms; 375ms sits between durationMedium3 and\n// durationLong1). Snapping either to its nearest token would flatten a\n// tuned asymmetry into two arbitrary values, and adding tokens to fit would\n// make a scale that documents itself as three bands of three describe this\n// component instead. `linear` is likewise not on the easing scale, and\n// belongs off it — a fade to and from a state layer wants no acceleration,\n// which is why every curve in the token set is the wrong answer here.\n//\n// These three are now the only ripple timings off the scale. Everything\n// useRipple drives from JS is a token, read through src/tokens/values\n// because element.animate() and setTimeout both reject the StyleX form.\n//\n// The gradient's soft edge (a currentColor disc fading to transparent over\n// its outer 30-35%, capped at 70px) replaces a hard-edged circle so the\n// ripple blends into the surface rather than looking like a solid dot.\n//\n// `closest-side` + a plain circular box means no `border-radius` is needed\n// on the ripple itself — the gradient's own shape reads as a circle.\nconst styles = {\n press: {\n kKwaWg: \"xliahv6\",\n kbCHJM: \"xu96u03\",\n kSiTet: \"xg01cxk\",\n kVAEAm: \"x10l6tqk\",\n k87sOh: \"x13vifvy\",\n k3nNDw: \"x1g0ag68\",\n kIyJzY: \"xbg8nd6\",\n k1ekBW: \"x19991ni\",\n kAMwcw: \"xcj1dhv\",\n $$css: true\n },\n pressed: {\n kSiTet: \"xjg27g\",\n kIyJzY: \"xjl7l83\",\n $$css: true\n },\n surface: {\n kaIpWk: \"x1pjcqnp\",\n k1xSpc: \"x1lliihq x1c7sf14\",\n kpwlN0: \"x10a8y8t\",\n kVQacm: \"xb3r6kr\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n }\n};\nexport { styles as rippleStyles };"],"mappings":";AAkCA,MAAMG,SAAS;CACbC,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,SAAS;EACPR,QAAQ;EACRI,QAAQ;EACRG,OAAO;CACT;CACAE,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRb,QAAQ;EACRM,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"ripple.js","names":["stylex","stateLayerOpacity","FORCED_COLORS","styles","press","k6CgDc","kKwaWg","kbCHJM","kSiTet","kVAEAm","k87sOh","k3nNDw","kIyJzY","k1ekBW","kAMwcw","$$css","pressed","surface","kaIpWk","k1xSpc","kpwlN0","kVQacm","kfzvcC","rippleStyles"],"sources":["../../src/styles/ripple.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { stateLayerOpacity } from '../tokens/design.tokens.stylex';\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// Growth and opacity are two independent mechanisms. Growth (width/height/\n// transform) is driven imperatively via the Web Animations API in\n// useRipple, decoupled from press/release timing so it always plays out\n// over a fixed duration. Opacity is what this file owns — toggled by the\n// `pressed` class — with a fast fade-in and a slower fade-out, so a quick\n// tap still reads as a deliberate, visible ripple rather than a flicker.\n//\n// None of the three timings below is a motion token, and that is deliberate\n// rather than an oversight predating them. The fade pair is the asymmetry\n// the paragraph above describes: 105ms in against 375ms out, hand-tuned as\n// a ratio to each other, and neither lands on the scale (105ms is near\n// durationShort1's 100ms; 375ms sits between durationMedium3 and\n// durationLong1). Snapping either to its nearest token would flatten a\n// tuned asymmetry into two arbitrary values, and adding tokens to fit would\n// make a scale that documents itself as three bands of three describe this\n// component instead. `linear` is likewise not on the easing scale, and\n// belongs off it — a fade to and from a state layer wants no acceleration,\n// which is why every curve in the token set is the wrong answer here.\n//\n// These three are now the only ripple timings off the scale. Everything\n// useRipple drives from JS is a token, read through src/tokens/values\n// because element.animate() and setTimeout both reject the StyleX form.\n//\n// The gradient's soft edge (a currentColor disc fading to transparent over\n// its outer 30-35%, capped at 70px) replaces a hard-edged circle so the\n// ripple blends into the surface rather than looking like a solid dot.\n//\n// `closest-side` + a plain circular box means no `border-radius` is needed\n// on the ripple itself — the gradient's own shape reads as a circle.\nconst styles = {\n press: {\n k6CgDc: \"x12w9bfk\",\n kKwaWg: \"xliahv6\",\n kbCHJM: \"xu96u03\",\n kSiTet: \"xg01cxk\",\n kVAEAm: \"x10l6tqk\",\n k87sOh: \"x13vifvy\",\n k3nNDw: \"x1g0ag68\",\n kIyJzY: \"xbg8nd6\",\n k1ekBW: \"x19991ni\",\n kAMwcw: \"xcj1dhv\",\n $$css: true\n },\n pressed: {\n kSiTet: \"xjg27g\",\n kIyJzY: \"xjl7l83\",\n $$css: true\n },\n surface: {\n kaIpWk: \"x1pjcqnp\",\n k1xSpc: \"x1lliihq x1c7sf14\",\n kpwlN0: \"x10a8y8t\",\n kVQacm: \"xb3r6kr\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n }\n};\nexport { styles as rippleStyles };"],"mappings":";AAkCA,MAAMG,SAAS;CACbC,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,SAAS;EACPR,QAAQ;EACRI,QAAQ;EACRG,OAAO;CACT;CACAE,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRb,QAAQ;EACRM,OAAO;CACT;AACF"}