@kanso-labs/kanso-ui 0.40.3 → 0.40.4
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.
- package/dist/collection/styles.js +2 -1
- package/dist/collection/styles.js.map +1 -1
- package/dist/components/app-bar/index.js +6 -5
- package/dist/components/app-bar/index.js.map +1 -1
- package/dist/components/button/index.js +2 -0
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/card/index.js +1 -0
- package/dist/components/card/index.js.map +1 -1
- package/dist/components/link/index.js +1 -0
- package/dist/components/link/index.js.map +1 -1
- package/dist/components/list-item/index.js +2 -1
- package/dist/components/list-item/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +4 -1
- package/dist/components/menu/index.js +64 -9
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/text/index.js +1 -0
- package/dist/components/text/index.js.map +1 -1
- package/dist/control/styles.js +7 -1
- package/dist/control/styles.js.map +1 -1
- package/dist/field/styles.js +2 -0
- package/dist/field/styles.js.map +1 -1
- package/dist/indicator/index.js +6 -5
- package/dist/indicator/index.js.map +1 -1
- package/dist/indicator/styles.js +11 -0
- package/dist/indicator/styles.js.map +1 -1
- package/dist/render/content.js +16 -0
- package/dist/render/content.js.map +1 -0
- package/dist/row/index.js +5 -4
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js +4 -0
- package/dist/row/styles.js.map +1 -1
- package/dist/styles.css +2 -2
- package/package.json +1 -1
package/dist/field/styles.js.map
CHANGED
|
@@ -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","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","kkrTdU","kjBf7l","kInvED","k3XXqK","kMeerF","kGO01o","kLKAdn","kg3NbH","kVAEAm","boxDisabled","kL6WhQ","boxError","boxErrorFocused","boxFixed","boxFloating","boxFocused","boxLabel","k87sOh","kLqNvP","ks0D6T","kVQacm","kg5iWk","boxLabelFloated","boxLabelOutlined","boxLabelOutlinedFloated","boxLeading","kZCmMZ","boxMultiline","kAzted","boxOutlined","kMwMTN","boxOutlinedDisabled","boxOutlinedError","boxOutlinedErrorFocused","boxOutlinedErrorHovered","boxOutlinedFloating","boxOutlinedFocused","boxOutlinedHovered","boxOutlinedMultiline","boxTrailing","kwRFfy","column","kzQI83","k7Eaqz","columnDisabled","columnDisabledFloating","columnFloating","counter","kcqcaj","keTefX","icon","kSGwAc","kjj79g","keoZOQ","iconDisabled","iconError","iconMultiline","k1K539","iconOutlined","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","k33iCy","outlineNotchOpen","outlineTrailing","replica","kHjlTd","segments","textArea","kHenm0","textAreaAutosize","trigger","kY2c9j","value","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 kkrTdU: \"x1ed109x\",\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 kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n boxError: {\n kGVxlE: \"x1lxxh4i x1d6xoej\",\n $$css: true\n },\n boxErrorFocused: {\n kGVxlE: \"xb0slzl\",\n k3XXqK: \"x815t2r\",\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 boxFocused: {\n kGVxlE: \"xra6ydt\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxLabel: {\n kB7OPa: \"x9f619\",\n k87sOh: \"x13vifvy\",\n kLqNvP: \"x1o0tod\",\n ks0D6T: \"x193iq5w\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\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 ks0D6T: \"x35j8wb\",\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 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 kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n boxOutlinedError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n boxOutlinedErrorFocused: {\n kMwMTN: \"x4ii1qj\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxOutlinedErrorHovered: {\n kMwMTN: \"x12voer2 x16elhoc\",\n $$css: true\n },\n boxOutlinedFloating: {\n kLWn49: \"xsv50tp x1f5c3pk x1rzm7h7\",\n $$css: true\n },\n boxOutlinedFocused: {\n kMwMTN: \"x1mxwv8y\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxOutlinedHovered: {\n kMwMTN: \"x158cnre x139gbkf\",\n $$css: true\n },\n boxOutlinedMultiline: {\n kZKoxP: \"xt7dq6l\",\n kAzted: \"xnqs80d\",\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 iconMultiline: {\n k1K539: \"x14yxyxb\",\n $$css: true\n },\n iconOutlined: {\n k1K539: \"xs1qnrw\",\n keoZOQ: \"x17v9ssf\",\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 x1bhcspo\",\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 kB7OPa: \"x9f619\",\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 outlineTrailing: {\n kwRFfy: \"x3o381d\",\n $$css: true\n },\n replica: {\n kHjlTd: \"x1mzt3pk\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"x126k92a\",\n $$css: true\n },\n segments: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kVQacm: \"xb3r6kr\",\n khDVqt: \"xuxw1ft\",\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 kY2c9j: \"x1vjfegm\",\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;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ACR/E,QAAQ;EACR4D,QAAQ;EACRvD,QAAQ;EACR2F,QAAQ;EACRtH,OAAO;CACT;CACAuH,OAAO;EACLrH,QAAQ;EACRC,QAAQ;EACRoC,QAAQ;EACRC,QAAQ;EACRzC,QAAQ;EACRC,OAAO;CACT;CACAwH,kBAAkB;EAChBvE,QAAQ;EACRjD,OAAO;CACT;CACAyH,wBAAwB;EACtBxE,QAAQ;EACRjD,OAAO;CACT;AACF;AAYA,MAAM0H,cAAc;CAClBpC,OAAO;EACL/F,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRK,OAAO;CACT;CACA2H,MAAM;EACJzG,QAAQ;EACRf,QAAQ;EACRyH,QAAQ;EACRxH,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","kkrTdU","kjBf7l","kInvED","k3XXqK","kMeerF","kGO01o","kLKAdn","kg3NbH","kVAEAm","boxDisabled","kL6WhQ","boxError","boxErrorFocused","boxFixed","boxFloating","boxFocused","boxLabel","k87sOh","kLqNvP","ks0D6T","kVQacm","kg5iWk","boxLabelFloated","boxLabelOutlined","boxLabelOutlinedFloated","boxLeading","kZCmMZ","boxMultiline","kAzted","boxOutlined","kMwMTN","boxOutlinedDisabled","boxOutlinedError","boxOutlinedErrorFocused","boxOutlinedErrorHovered","boxOutlinedFloating","boxOutlinedFocused","boxOutlinedHovered","boxOutlinedMultiline","boxTrailing","kwRFfy","column","kzQI83","k7Eaqz","columnDisabled","columnDisabledFloating","columnFloating","counter","kcqcaj","keTefX","icon","kSGwAc","kjj79g","keoZOQ","iconDisabled","iconError","iconMultiline","k1K539","iconOutlined","input","k8Qsv1","kMzoRj","kzqmXN","kmVPX3","inputDisabled","inputUnderFloatingLabel","inputUnderLabel","label","kHjlTd","labelDisabled","labelError","labelFocused","message","kqGvvJ","messageError","messageInset","kUOVxO","messageLine","numeric","outline","kVAM5u","kaIpWk","ksu8eU","kpwlN0","kogj98","k8WAf4","kfzvcC","outlineFocused","outlineLeading","outlineNotch","k33iCy","outlineNotchOpen","outlineTrailing","replica","segments","textArea","kHenm0","textAreaAutosize","trigger","kY2c9j","value","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 kkrTdU: \"x1ed109x\",\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 kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n boxError: {\n kGVxlE: \"x1lxxh4i x1d6xoej\",\n $$css: true\n },\n boxErrorFocused: {\n kGVxlE: \"xb0slzl\",\n k3XXqK: \"x815t2r\",\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 boxFocused: {\n kGVxlE: \"xra6ydt\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxLabel: {\n kB7OPa: \"x9f619\",\n k87sOh: \"x13vifvy\",\n kLqNvP: \"x1o0tod\",\n ks0D6T: \"x193iq5w\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\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 ks0D6T: \"x35j8wb\",\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 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 kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n boxOutlinedError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n boxOutlinedErrorFocused: {\n kMwMTN: \"x4ii1qj\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxOutlinedErrorHovered: {\n kMwMTN: \"x12voer2 x16elhoc\",\n $$css: true\n },\n boxOutlinedFloating: {\n kLWn49: \"xsv50tp x1f5c3pk x1rzm7h7\",\n $$css: true\n },\n boxOutlinedFocused: {\n kMwMTN: \"x1mxwv8y\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxOutlinedHovered: {\n kMwMTN: \"x158cnre x139gbkf\",\n $$css: true\n },\n boxOutlinedMultiline: {\n kZKoxP: \"xt7dq6l\",\n kAzted: \"xnqs80d\",\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 iconMultiline: {\n k1K539: \"x14yxyxb\",\n $$css: true\n },\n iconOutlined: {\n k1K539: \"xs1qnrw\",\n keoZOQ: \"x17v9ssf\",\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 kHjlTd: \"xj0a0fe\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xixa3zk\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n labelDisabled: {\n kMwMTN: \"x1xj74d8 x1bhcspo\",\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 kHjlTd: \"xj0a0fe\",\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 kB7OPa: \"x9f619\",\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 outlineTrailing: {\n kwRFfy: \"x3o381d\",\n $$css: true\n },\n replica: {\n kHjlTd: \"x1mzt3pk\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"x126k92a\",\n $$css: true\n },\n segments: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kVQacm: \"xb3r6kr\",\n khDVqt: \"xuxw1ft\",\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 kY2c9j: \"x1vjfegm\",\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;EACZC,QAAQ;EACRP,OAAO;CACT;CACAQ,KAAK;EACHnB,QAAQ;EACRa,QAAQ;EACRO,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,Q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AQ;EACRK,OAAO;CACT;CACA2H,MAAM;EACJzG,QAAQ;EACRf,QAAQ;EACRyH,QAAQ;EACRxH,QAAQ;EACRJ,OAAO;CACT;AACF"}
|
package/dist/indicator/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
|
|
2
|
+
import { hasContent } from "../render/content.js";
|
|
2
3
|
import { indicatorStyles } from "./styles.js";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -19,7 +20,7 @@ const ACTIVE_TONES = {
|
|
|
19
20
|
function IndicatorLabels(t0) {
|
|
20
21
|
const $ = c(8);
|
|
21
22
|
const { label, value } = t0;
|
|
22
|
-
if (label
|
|
23
|
+
if (!hasContent(label) && !hasContent(value)) return null;
|
|
23
24
|
let t1;
|
|
24
25
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
25
26
|
t1 = props(indicatorStyles.labels);
|
|
@@ -27,8 +28,8 @@ function IndicatorLabels(t0) {
|
|
|
27
28
|
} else t1 = $[0];
|
|
28
29
|
let t2;
|
|
29
30
|
if ($[1] !== label) {
|
|
30
|
-
t2 = label
|
|
31
|
-
...props(indicatorStyles.label),
|
|
31
|
+
t2 = !hasContent(label) ? null : /* @__PURE__ */ jsx(Label, {
|
|
32
|
+
...props(indicatorStyles.label, indicatorStyles.labelText),
|
|
32
33
|
children: label
|
|
33
34
|
});
|
|
34
35
|
$[1] = label;
|
|
@@ -36,8 +37,8 @@ function IndicatorLabels(t0) {
|
|
|
36
37
|
} else t2 = $[2];
|
|
37
38
|
let t3;
|
|
38
39
|
if ($[3] !== value) {
|
|
39
|
-
t3 = value
|
|
40
|
-
...props(indicatorStyles.label),
|
|
40
|
+
t3 = !hasContent(value) ? null : /* @__PURE__ */ jsx("span", {
|
|
41
|
+
...props(indicatorStyles.label, indicatorStyles.value),
|
|
41
42
|
children: value
|
|
42
43
|
});
|
|
43
44
|
$[3] = value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ReactNode","stylex","Label","IndicatorTone","indicatorStyles","ACTIVE_TONES","inherit","inheritActive","negative","negativeActive","positive","positiveActive","primary","const","IndicatorLabels","t0","$","_c","label","value","
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactNode","stylex","Label","IndicatorTone","hasContent","indicatorStyles","ACTIVE_TONES","inherit","inheritActive","negative","negativeActive","positive","positiveActive","primary","const","IndicatorLabels","t0","$","_c","label","value","t1","Symbol","for","props","labels","t2","labelText","t3","t4","IndicatorLine","activeStyle","children","percentage","tone","active","solid","undefined","line","activeAt","track","trackSolid","inheritTrack","t5","t6","stop","t7","t8","_c","stylex.props"],"sources":["../../src/indicator/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { Label } from 'react-aria-components';\nimport type { IndicatorTone } from './styles';\nimport { hasContent } from '../render/content';\nimport { indicatorStyles } from './styles';\n\n// The two pieces a linear indicator is drawn from, shared by\n// ProgressIndicator and Meter. The styles they use are in ./styles.ts.\n\n// What each tone draws the active indicator and the stop indicator in.\n// `primary` is the style they already carry, so it adds nothing.\nconst ACTIVE_TONES = {\n inherit: indicatorStyles.inheritActive,\n negative: indicatorStyles.negativeActive,\n positive: indicatorStyles.positiveActive,\n primary: null\n} as const;\n\n/**\n * The label and, optionally, the value, on a line above the indicator.\n * React Aria's `Label` reads the surrounding context, so the same element\n * names a progress bar and a meter alike. Renders nothing when there is\n * neither to show.\n */\nexport function IndicatorLabels({\n label,\n value\n}: {\n label: ReactNode;\n value: ReactNode;\n}) {\n if (!hasContent(label) && !hasContent(value)) {\n return null;\n }\n return <div {...stylex.props(indicatorStyles.labels)}>\n {!hasContent(label) ? null : <Label {...stylex.props(indicatorStyles.label, indicatorStyles.labelText)}>\n {label}\n </Label>}\n {!hasContent(value) ? null : <span {...stylex.props(indicatorStyles.label, indicatorStyles.value)}>\n {value}\n </span>}\n </div>;\n}\n\n/**\n * The page's line: the active indicator at its share of the width, the track\n * taking what is left, and the stop indicator at the end. Anything passed as\n * `children` is drawn inside the track, which is what the progress\n * indicator's buffer fills it with; with none the track is solid.\n * `activeStyle` is applied to the active indicator last, which is how the\n * progress indicator fades it under a wave.\n */\nexport function IndicatorLine({\n activeStyle,\n children,\n percentage,\n tone\n}: {\n activeStyle?: stylex.StyleXStyles;\n children?: ReactNode;\n percentage: number;\n tone: IndicatorTone;\n}) {\n const active = ACTIVE_TONES[tone];\n const solid = children === undefined;\n return <div {...stylex.props(indicatorStyles.line)}>\n <span {...stylex.props(indicatorStyles.active, indicatorStyles.activeAt(percentage), active, activeStyle)} />\n <span {...stylex.props(indicatorStyles.track, solid && indicatorStyles.trackSolid, solid && tone === 'inherit' && indicatorStyles.inheritTrack)}>\n {children}\n </span>\n <span {...stylex.props(indicatorStyles.stop, active)} />\n </div>;\n}"],"mappings":";;;;;;;AAYA,MAAMM,eAAe;CACnBC,SAASF,gBAAgBG;CACzBC,UAAUJ,gBAAgBK;CAC1BC,UAAUN,gBAAgBO;CAC1BC,SAAS;AACX;;;;;;;AAQA,SAAOE,gBAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAyB,MAAA,EAAAC,OAAAC,UAAAJ;CAO9B,IAAI,CAACZ,WAAWe,KAAK,KAAjB,CAAuBf,WAAWgB,KAAK,GAAC,OACnC;CACR,IAAAC;CAAA,IAAAJ,EAAA,OAAAK,OAAAC,IAAA,2BAAA,GAAA;EACeF,KAAApB,MAAaI,gBAAeoB,MAAO;EAACR,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,OAAAE,OAAA;EAC/CO,KAAA,CAACtB,WAAWe,KAAK,IAAjB,OAA4B,oBAAC,OAAD;GAAM,GAAKlB,MAAaI,gBAAec,OAAQd,gBAAesB,SAAU;GAChGR,UAAAA;EAD8B,CAAA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AAAA,KAAA9B,EAAA;CAAA,OAND8B;AAMC"}
|
package/dist/indicator/styles.js
CHANGED
|
@@ -45,6 +45,11 @@ const indicatorStyles = {
|
|
|
45
45
|
kjj79g: "x1qughib",
|
|
46
46
|
$$css: true
|
|
47
47
|
},
|
|
48
|
+
labelText: {
|
|
49
|
+
k7Eaqz: "xeuugli",
|
|
50
|
+
kHjlTd: "xj0a0fe",
|
|
51
|
+
$$css: true
|
|
52
|
+
},
|
|
48
53
|
line: {
|
|
49
54
|
kGNEyG: "x6s0dn4",
|
|
50
55
|
kZKoxP: "xqu0tyb",
|
|
@@ -96,6 +101,12 @@ const indicatorStyles = {
|
|
|
96
101
|
trackSolid: {
|
|
97
102
|
kWkggS: "x15dekr4",
|
|
98
103
|
$$css: true
|
|
104
|
+
},
|
|
105
|
+
value: {
|
|
106
|
+
kmuXW: "x2lah0s",
|
|
107
|
+
keTefX: "xvc5jky",
|
|
108
|
+
khDVqt: "xuxw1ft",
|
|
109
|
+
$$css: true
|
|
99
110
|
}
|
|
100
111
|
};
|
|
101
112
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["stylex","colors","motion","radii","spacing","typography","THICKNESS","GAP","DETERMINATE_EASING","IndicatorTone","FORCED_COLORS","_temp","kzqmXN","indicatorStyles","active","k6CgDc","kWkggS","kZKoxP","kaIpWk","kB7OPa","kmuXW","kIyJzY","k1ekBW","kAMwcw","$$css","activeAt","percentage","val","undefined","inheritActive","kjVXCG","inheritTrack","label","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","labels","kGNEyG","k1xSpc","kOIVth","kjj79g","line","negativeActive","positiveActive","root","kXwgrk","stop","track","kzQI83","
|
|
1
|
+
{"version":3,"file":"styles.js","names":["stylex","colors","motion","radii","spacing","typography","THICKNESS","GAP","DETERMINATE_EASING","IndicatorTone","FORCED_COLORS","_temp","kzqmXN","indicatorStyles","active","k6CgDc","kWkggS","kZKoxP","kaIpWk","kB7OPa","kmuXW","kIyJzY","k1ekBW","kAMwcw","$$css","activeAt","percentage","val","undefined","inheritActive","kjVXCG","inheritTrack","label","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","labels","kGNEyG","k1xSpc","kOIVth","kjj79g","labelText","k7Eaqz","kHjlTd","line","negativeActive","positiveActive","root","kXwgrk","stop","track","kzQI83","kjBf7l","kInvED","k3XXqK","kMeerF","kVQacm","trackSolid","value","keTefX","khDVqt"],"sources":["../../src/indicator/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, typography } from '../tokens/design.tokens.stylex';\n\n// The line the progress indicators page draws, and the label row above it,\n// shared by the two components that draw one: ProgressIndicator, which adds\n// the ring and the two indeterminate presentations on top, and Meter, which\n// is this and nothing else.\n//\n// The page's anatomy names three parts — the active indicator in primary,\n// the track in secondary container, and the stop indicator in primary at the\n// end — at 4dp thick with 4dp between them. The row is a flex line and the\n// two gaps are its `gap`. The active indicator takes the value's share of\n// what the two gaps and the stop leave, and the track takes the rest, so the\n// stop ends the row at every value.\n//\n// Under forced colours every part here is a background, which that mode\n// paints in a system colour, so the line drew nothing at all. The active\n// indicator and the stop take `Highlight` there, as the slider's filled part\n// does, and the track keeps a `CanvasText` edge, drawn as an outline inside\n// it so it takes no room from the line.\n//\n// `tone` is the line's colour. `primary` is the page's own pair, and it is\n// what a progress indicator draws. `negative` and `positive` swap the active\n// indicator and the stop indicator alone, leaving the track in secondary\n// container, so a column of meters reads as one scale with bars of different\n// colours rather than as several unrelated gauges. `inherit` instead takes\n// the colour around it for both, and gives the track a quarter of it, which\n// is what makes a ring legible inside a filled button, where the page's\n// primary is the button's own fill.\n//\n// Apart from ./index.tsx so that file exports components alone, which is\n// what keeps fast refresh working for it.\n\n/** The thickness of every part, and the room the page leaves between them. */\nexport const THICKNESS = 4;\nexport const GAP = 4;\n\n/**\n * What the page gives a value that changes to move over. The duration is the\n * motion scale's own step rather than a constant beside it — src/tokens/\n * values.ts keeps a number in JS only where one has to reach\n * `element.animate()` or a timer, and nothing here does.\n */\nexport const DETERMINATE_EASING = 'cubic-bezier(0.4, 0, 0.6, 1)';\nexport type IndicatorTone = 'inherit' | 'negative' | 'positive' | 'primary';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\nconst _temp = {\n kzqmXN: \"x1uyokj7\",\n \"$$css\": true\n};\nexport const indicatorStyles = {\n active: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89 x1jzqe4\",\n kZKoxP: \"x5yr21d\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kmuXW: \"x2lah0s\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"x1j4rzew\",\n kAMwcw: \"x16pyfke\",\n $$css: true\n },\n activeAt: (percentage: number) => [_temp, {\n \"--x-inlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(`calc((100% - ${GAP * 2 + THICKNESS}px) * ${percentage / 100})`)\n }],\n inheritActive: {\n kWkggS: \"xtwfq29 x1jzqe4\",\n kjVXCG: \"x73je2i xbabvq0\",\n $$css: true\n },\n inheritTrack: {\n kWkggS: \"xtp5tyh\",\n kjVXCG: \"xy3ggvv x8jos32\",\n $$css: true\n },\n label: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n labels: {\n kGNEyG: \"x1pha0wt\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x126z3so\",\n kjj79g: \"x1qughib\",\n $$css: true\n },\n labelText: {\n k7Eaqz: \"xeuugli\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n line: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"xqu0tyb\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x1jnr06f\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n negativeActive: {\n kWkggS: \"xmjwayr x1jzqe4\",\n $$css: true\n },\n positiveActive: {\n kWkggS: \"x1xov01w x1jzqe4\",\n $$css: true\n },\n root: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"xzoy561\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n stop: {\n kWkggS: \"xnety89 x1jzqe4\",\n kZKoxP: \"xqu0tyb\",\n kaIpWk: \"x16fbrrb\",\n kB7OPa: \"x9f619\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x51ohtg\",\n $$css: true\n },\n track: {\n kZKoxP: \"x5yr21d\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n kjBf7l: \"x3teovq\",\n kInvED: \"xvr1dqx\",\n k3XXqK: \"x815t2r\",\n kMeerF: \"xcthrzx\",\n kVQacm: \"xb3r6kr\",\n $$css: true\n },\n trackSolid: {\n kWkggS: \"x15dekr4\",\n $$css: true\n },\n value: {\n kmuXW: \"x2lah0s\",\n keTefX: \"xvc5jky\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n }\n};"],"mappings":";AAoDA,MAAMW,QAAQ;CACZC,QAAQ;CACR,SAAS;AACX;AACA,MAAaC,kBAAkB;CAC7BC,QAAQ;EACNC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,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ACAqC,OAAO;EACLzC,OAAO;EACP0C,QAAQ;EACRC,QAAQ;EACRvC,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/render/content.ts
|
|
2
|
+
/**
|
|
3
|
+
* Whether a slot was handed anything to draw. React draws nothing for
|
|
4
|
+
* `null`, `false`, `true` or an empty string, and a call site passes them
|
|
5
|
+
* for "nothing here" — `leading={user.avatar && <Avatar />}`, or a note that
|
|
6
|
+
* is `null` — so a slot that asked only whether it was `undefined` drew an
|
|
7
|
+
* empty wrapper for them, and a row counted a line it never showed. `0` is
|
|
8
|
+
* content, since React draws it, and so is a string of spaces.
|
|
9
|
+
*/
|
|
10
|
+
function hasContent(node) {
|
|
11
|
+
return node !== void 0 && node !== null && node !== false && node !== true && node !== "";
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { hasContent };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.js","names":["ReactNode","hasContent","node","undefined"],"sources":["../../src/render/content.ts"],"sourcesContent":["import type { ReactNode } from 'react'\n\n/**\n * Whether a slot was handed anything to draw. React draws nothing for\n * `null`, `false`, `true` or an empty string, and a call site passes them\n * for \"nothing here\" — `leading={user.avatar && <Avatar />}`, or a note that\n * is `null` — so a slot that asked only whether it was `undefined` drew an\n * empty wrapper for them, and a row counted a line it never showed. `0` is\n * content, since React draws it, and so is a string of spaces.\n */\nfunction hasContent(node: ReactNode): boolean {\n return (\n node !== undefined &&\n node !== null &&\n node !== false &&\n node !== true &&\n node !== ''\n )\n}\n\nexport { hasContent }\n"],"mappings":";;;;;;;;;AAUA,SAASC,WAAWC,MAA0B;CAC5C,OACEA,SAASC,KAAAA,KACTD,SAAS,QACTA,SAAS,SACTA,SAAS,QACTA,SAAS;AAEb"}
|
package/dist/row/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
|
|
2
|
+
import { hasContent } from "../render/content.js";
|
|
2
3
|
import { rowStyles } from "./styles.js";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -33,7 +34,7 @@ function RowContent(t0) {
|
|
|
33
34
|
const supportingTone = t5;
|
|
34
35
|
let t6;
|
|
35
36
|
if ($[4] !== leading) {
|
|
36
|
-
t6 = leading
|
|
37
|
+
t6 = !hasContent(leading) ? null : /* @__PURE__ */ jsx("span", {
|
|
37
38
|
...props(rowStyles.slot),
|
|
38
39
|
children: leading
|
|
39
40
|
});
|
|
@@ -47,7 +48,7 @@ function RowContent(t0) {
|
|
|
47
48
|
} else t7 = $[6];
|
|
48
49
|
let t8;
|
|
49
50
|
if ($[7] !== overline || $[8] !== supportingTone) {
|
|
50
|
-
t8 = overline
|
|
51
|
+
t8 = !hasContent(overline) ? null : /* @__PURE__ */ jsx("span", {
|
|
51
52
|
...props(rowStyles.overline, supportingTone),
|
|
52
53
|
children: overline
|
|
53
54
|
});
|
|
@@ -74,7 +75,7 @@ function RowContent(t0) {
|
|
|
74
75
|
} else t10 = $[15];
|
|
75
76
|
let t11;
|
|
76
77
|
if ($[16] !== supporting || $[17] !== supportingTone) {
|
|
77
|
-
t11 = supporting
|
|
78
|
+
t11 = !hasContent(supporting) ? null : /* @__PURE__ */ jsx("span", {
|
|
78
79
|
...props(rowStyles.supporting, supportingTone),
|
|
79
80
|
children: supporting
|
|
80
81
|
});
|
|
@@ -99,7 +100,7 @@ function RowContent(t0) {
|
|
|
99
100
|
} else t12 = $[22];
|
|
100
101
|
let t13;
|
|
101
102
|
if ($[23] !== trailing) {
|
|
102
|
-
t13 = trailing
|
|
103
|
+
t13 = !hasContent(trailing) ? null : /* @__PURE__ */ jsx("span", {
|
|
103
104
|
...props(rowStyles.slot),
|
|
104
105
|
children: trailing
|
|
105
106
|
});
|
package/dist/row/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ReactNode","stylex","rowStyles","RowContentProps","children","isDisabled","isEmphasized","isSelected","leading","overline","supporting","trailing","variant","RowVariant","RowContent","t0","$","_c","t1","t2","t3","t4","undefined","label","t5","supportingInherit","selectedSupportingTone","supportingTone","t6","props","slot","t7","Symbol","for","main","t8","t9","headlineMenu","headlineList","headlineEmphasis","t10","t11","t12","t13","t14","supportingSelectedDrawer","supportingSelectedMenu","supportingSelectedList","_c","stylex.props"],"sources":["../../src/row/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { rowStyles } from './styles';\ninterface RowContentProps {\n /** The row's headline — the one thing it is mostly about. */\n children?: ReactNode;\n /**\n * Whether the row is disabled. The supporting line takes the row's own\n * faded colour when it is, rather than staying at full strength in the\n * muted role.\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Whether the headline is drawn heavier than its variant's own weight, for\n * a row marked without the container a selected one takes. The navigation\n * drawer's trail to the current row is what asks for it.\n * @default false\n */\n isEmphasized?: boolean;\n /**\n * Whether the row is selected. The supporting line takes the selected\n * container's own content role when it is, rather than staying in the\n * muted role it draws on the surface.\n * @default false\n */\n isSelected?: boolean;\n /** Content before the headline: an avatar, an icon, a checkbox. */\n leading?: ReactNode;\n /**\n * A line above the headline, in the page's label-small and the same muted\n * role the supporting line takes.\n */\n overline?: ReactNode;\n /** A second line under the headline, in the muted role. */\n supporting?: ReactNode;\n /** Content after the headline, such as an amount or a control. */\n trailing?: ReactNode;\n /**\n * Which spec page's row this is. A list item's headline is body-large; a\n * menu item's label and a navigation drawer row's are label-large. The\n * element around the content applies the matching `rowStyles.list`,\n * `rowStyles.menu` or `rowStyles.drawer` beside `rowStyles.base`.\n * @default 'list'\n */\n variant?: RowVariant;\n}\ntype RowVariant = 'drawer' | 'list' | 'menu';\n\n/**\n * The inside of a row: the leading slot, the headline with its supporting\n * line, and the trailing slot, each rendered only when given. The element\n * around it is the caller's — ListItem's div or button, a collection's item —\n * and takes `rowStyles.base`, the variant's own style, and whichever states\n * apply; this is what every one of them puts inside it, so a list, a menu, a\n * tree and a drawer draw the same row.\n *\n * Not a component of the library's own and not exported; see `src/field` for\n * the same arrangement around a field.\n */\nfunction RowContent({\n children,\n isDisabled = false,\n isEmphasized = false,\n isSelected = false,\n leading,\n overline,\n supporting,\n trailing,\n variant = 'list'\n}: RowContentProps) {\n // The drawer's label is the menu's, so the two share the headline style;\n // what they do not share is the container a selected row brings, which is\n // why the tone below still asks which variant this is.\n const label = variant === 'drawer' || variant === 'menu';\n // Disabled first: a disabled row's own colour is already the faded one, so\n // it wins over the selected container's content role.\n const supportingTone = isDisabled ? rowStyles.supportingInherit : isSelected && selectedSupportingTone(variant);\n return <>\n {leading
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactNode","stylex","hasContent","rowStyles","RowContentProps","children","isDisabled","isEmphasized","isSelected","leading","overline","supporting","trailing","variant","RowVariant","RowContent","t0","$","_c","t1","t2","t3","t4","undefined","label","t5","supportingInherit","selectedSupportingTone","supportingTone","t6","props","slot","t7","Symbol","for","main","t8","t9","headlineMenu","headlineList","headlineEmphasis","t10","t11","t12","t13","t14","supportingSelectedDrawer","supportingSelectedMenu","supportingSelectedList","_c","stylex.props"],"sources":["../../src/row/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { hasContent } from '../render/content';\nimport { rowStyles } from './styles';\ninterface RowContentProps {\n /** The row's headline — the one thing it is mostly about. */\n children?: ReactNode;\n /**\n * Whether the row is disabled. The supporting line takes the row's own\n * faded colour when it is, rather than staying at full strength in the\n * muted role.\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Whether the headline is drawn heavier than its variant's own weight, for\n * a row marked without the container a selected one takes. The navigation\n * drawer's trail to the current row is what asks for it.\n * @default false\n */\n isEmphasized?: boolean;\n /**\n * Whether the row is selected. The supporting line takes the selected\n * container's own content role when it is, rather than staying in the\n * muted role it draws on the surface.\n * @default false\n */\n isSelected?: boolean;\n /** Content before the headline: an avatar, an icon, a checkbox. */\n leading?: ReactNode;\n /**\n * A line above the headline, in the page's label-small and the same muted\n * role the supporting line takes.\n */\n overline?: ReactNode;\n /** A second line under the headline, in the muted role. */\n supporting?: ReactNode;\n /** Content after the headline, such as an amount or a control. */\n trailing?: ReactNode;\n /**\n * Which spec page's row this is. A list item's headline is body-large; a\n * menu item's label and a navigation drawer row's are label-large. The\n * element around the content applies the matching `rowStyles.list`,\n * `rowStyles.menu` or `rowStyles.drawer` beside `rowStyles.base`.\n * @default 'list'\n */\n variant?: RowVariant;\n}\ntype RowVariant = 'drawer' | 'list' | 'menu';\n\n/**\n * The inside of a row: the leading slot, the headline with its supporting\n * line, and the trailing slot, each rendered only when given. The element\n * around it is the caller's — ListItem's div or button, a collection's item —\n * and takes `rowStyles.base`, the variant's own style, and whichever states\n * apply; this is what every one of them puts inside it, so a list, a menu, a\n * tree and a drawer draw the same row.\n *\n * Not a component of the library's own and not exported; see `src/field` for\n * the same arrangement around a field.\n */\nfunction RowContent({\n children,\n isDisabled = false,\n isEmphasized = false,\n isSelected = false,\n leading,\n overline,\n supporting,\n trailing,\n variant = 'list'\n}: RowContentProps) {\n // The drawer's label is the menu's, so the two share the headline style;\n // what they do not share is the container a selected row brings, which is\n // why the tone below still asks which variant this is.\n const label = variant === 'drawer' || variant === 'menu';\n // Disabled first: a disabled row's own colour is already the faded one, so\n // it wins over the selected container's content role.\n const supportingTone = isDisabled ? rowStyles.supportingInherit : isSelected && selectedSupportingTone(variant);\n return <>\n {!hasContent(leading) ? null : <span {...stylex.props(rowStyles.slot)}>{leading}</span>}\n <span {...stylex.props(rowStyles.main)}>\n {!hasContent(overline) ? null : <span {...stylex.props(rowStyles.overline, supportingTone)}>\n {overline}\n </span>}\n <span {...stylex.props(label ? rowStyles.headlineMenu : rowStyles.headlineList, isEmphasized && rowStyles.headlineEmphasis)}>\n {children}\n </span>\n {!hasContent(supporting) ? null : <span {...stylex.props(rowStyles.supporting, supportingTone)}>\n {supporting}\n </span>}\n </span>\n {!hasContent(trailing) ? null : <span {...stylex.props(rowStyles.slot)}>{trailing}</span>}\n </>;\n}\n\n// Which on-colour a supporting line takes over a selected row's own\n// container. Each variant's container is a different colour family, and the\n// muted role is not guaranteed to be readable over any of them.\nfunction selectedSupportingTone(variant: RowVariant) {\n if (variant === 'drawer') {\n return rowStyles.supportingSelectedDrawer;\n }\n if (variant === 'menu') {\n return rowStyles.supportingSelectedMenu;\n }\n return rowStyles.supportingSelectedList;\n}\nexport type { RowContentProps, RowVariant };\nexport { RowContent };"],"mappings":";;;;;;;;;;;;;;;;;AA6DA,SAAAe,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAoB,MAAA,EAAAb,UAAAC,YAAAa,IAAAZ,cAAAa,IAAAZ,YAAAa,IAAAZ,SAAAC,UAAAC,YAAAC,UAAAC,SAAAS,OAAAN;CAElB,MAAAV,aAAAa,OAAAI,KAAAA,IAAA,QAAAJ;CACA,MAAAZ,eAAAa,OAAAG,KAAAA,IAAA,QAAAH;CACA,MAAAZ,aAAAa,OAAAE,KAAAA,IAAA,QAAAF;CAKA,MAAAR,UAAAS,OAAAC,KAAAA,IAAA,SAAAD;CAKA,MAAAE,QAAcX,YAAY,YAAYA,YAAY;CAAO,IAAAY;CAAA,IAAAR,EAAA,OAAAX,cAAAW,EAAA,OAAAT,cAAAS,EAAA,OAAAJ,SAAA;EAGlCY,KAAAnB,aAAaH,UAASuB,oBAAqBlB,cAAcmB,uBAAuBd,OAAO;EAACI,EAAA,KAAAX;EAAAW,EAAA,KAAAT;EAAAS,EAAA,KAAAJ;EAAAI,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAA/G,MAAAW,iBAAuBH;CAAyF,IAAAI;CAAA,IAAAZ,EAAA,OAAAR,SAAA;EAE3GoB,KAAA,CAAC3B,WAAWO,OAAO,IAAnB,OAA8B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n8t5l",
|
|
64
64
|
kLWn49: "xh7dzej",
|
|
65
|
+
kHjlTd: "xj0a0fe",
|
|
65
66
|
$$css: true
|
|
66
67
|
},
|
|
67
68
|
headlineMenu: {
|
|
@@ -70,6 +71,7 @@ const rowStyles = {
|
|
|
70
71
|
k63SB2: "x1v9cpvo",
|
|
71
72
|
kb6lSQ: "x155f00i",
|
|
72
73
|
kLWn49: "x1lz68p4",
|
|
74
|
+
kHjlTd: "xj0a0fe",
|
|
73
75
|
$$css: true
|
|
74
76
|
},
|
|
75
77
|
hovered: {
|
|
@@ -113,6 +115,7 @@ const rowStyles = {
|
|
|
113
115
|
k63SB2: "x1su64ma",
|
|
114
116
|
kb6lSQ: "xdlnduh",
|
|
115
117
|
kLWn49: "xaomhve",
|
|
118
|
+
kHjlTd: "xj0a0fe",
|
|
116
119
|
$$css: true
|
|
117
120
|
},
|
|
118
121
|
pressed: {
|
|
@@ -150,6 +153,7 @@ const rowStyles = {
|
|
|
150
153
|
k63SB2: "x1hews6w",
|
|
151
154
|
kb6lSQ: "xn43zvd",
|
|
152
155
|
kLWn49: "xv61bfh",
|
|
156
|
+
kHjlTd: "xj0a0fe",
|
|
153
157
|
$$css: true
|
|
154
158
|
},
|
|
155
159
|
supportingInherit: {
|
package/dist/row/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["stylex","colors","radii","shadows","sizing","spacing","stateLayerOpacity","typography","HOVER_CAPABLE","FORCED_COLORS","rowStyles","base","kGNEyG","kWkggS","kMzoRj","kB7OPa","kMwMTN","k1xSpc","kOIVth","kzqmXN","k8WAf4","kg3NbH","kVAEAm","k9WMMc","$$css","disabled","kkrTdU","kAXs8y","dragging","kKwaWg","kGVxlE","kY2c9j","drawer","kaIpWk","kUOVxO","kAzted","dropTarget","kjBf7l","kInvED","k3XXqK","kMeerF","focusVisible","headlineEmphasis","k63SB2","headlineList","kMv6JI","kGuDYH","kb6lSQ","kLWn49","headlineMenu","hovered","interactive","kVVagm","interactiveLayers","list","main","kXwgrk","kzQI83","k7Eaqz","menu","overline","pressed","selectedDrawer","selectedList","selectedMenu","slot","kmuXW","supporting","supportingInherit","supportingSelectedDrawer","supportingSelectedList","supportingSelectedMenu","threeLine","twoLine"],"sources":["../../src/row/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The row every list draws: ListItem's, and from here on the item of every\n// collection the coverage plan adds — ListBox, Menu, List, Tree, the options\n// of Select and ComboBox. Apart from the RowContent component in ./index.tsx\n// so that file exports components alone, which is what keeps fast refresh\n// working for it.\n//\n// Three variants, because three spec pages draw three rows. The lists page\n// gives a list item a 56dp floor, a body-large headline and a body-medium\n// supporting line, and primary container when selected. The menus page gives\n// a menu item 48dp, a label-large label, and tertiary container when\n// selected. The navigation drawer page gives its row 56dp too, with a\n// label-large label like a menu's, and marks the current one with a\n// secondary-container pill held 12dp off each edge — 336dp of indicator in a\n// 360dp container, which is what that inset comes to. The layout, the\n// padding, the state layers and the disabled treatment are one row; `list`,\n// `menu` and `drawer` carry only what the three pages disagree on, and a\n// consumer applies one of them beside `base`.\n//\n// Laid out with flex rather than the grid the design draws. The design's\n// three columns are `auto 1fr auto`, which is what flex does natively — and\n// unlike a fixed three-column grid it stays correct when a row has no leading\n// or no trailing content, where the remaining children would otherwise slide\n// into the wrong columns.\n//\n// Rows align with each other through their leading content being the same\n// size, not through a fixed column width: a list of Avatars all at one size\n// lines up, and that is the same thing the design's 40px column achieves.\n//\n// The state layer composites over `transparent` rather than over a container\n// colour, because a row's own background is transparent and it therefore\n// tints whatever it happens to be sitting on — a card, a menu, or the page.\n// The two selected states are the ones that bring a container of their own.\n\n// A pointer that can hover, for `interactiveLayers` — a plain element with no\n// render state, so its hover layer is a pseudo-class, and Chromium leaves\n// `:hover` on whatever a touch last tapped. Inside this query a touch screen\n// draws no hover at all; a touchscreen laptop still matches it for its\n// trackpad.\nconst HOVER_CAPABLE = '@media (hover: hover)';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\nconst rowStyles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n kzqmXN: \"xh8yej3\",\n k8WAf4: \"x1uvvd8r\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n k9WMMc: \"x1yc453h\",\n $$css: true\n },\n disabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n kAXs8y: \"xr5dkdi\",\n $$css: true\n },\n dragging: {\n kWkggS: \"x14s9m32\",\n kKwaWg: \"xdiex0u\",\n kGVxlE: \"x4r79n0\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n drawer: {\n kaIpWk: \"x1dkaolv\",\n kzqmXN: \"x14atkfc\",\n kUOVxO: \"xd2r6sq\",\n kAzted: \"xyax5pk\",\n $$css: true\n },\n dropTarget: {\n kKwaWg: \"xu73ib2\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n focusVisible: {\n kKwaWg: \"x17vw94z\",\n kjBf7l: \"xrgy624 x1v8yhc2\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n headlineEmphasis: {\n k63SB2: \"x1sfltvt\",\n $$css: true\n },\n headlineList: {\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n $$css: true\n },\n headlineMenu: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n hovered: {\n kKwaWg: \"xbmfk57\",\n kkrTdU: \"x1ypdohk\",\n $$css: true\n },\n interactive: {\n kkrTdU: \"x1ypdohk\",\n kVVagm: \"xln7xf2\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n interactiveLayers: {\n kWkggS: \"x83qkoq x1yl1wq7 xjqqt44 xjbqb8w\",\n $$css: true\n },\n list: {\n kAzted: \"xyax5pk\",\n $$css: true\n },\n main: {\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kzQI83: \"x1iyjqo2\",\n kOIVth: \"x14qo01y\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n },\n menu: {\n kAzted: \"x1ddmzdj\",\n $$css: true\n },\n overline: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xs1w0rn\",\n kGuDYH: \"x1n35her\",\n k63SB2: \"x1su64ma\",\n kb6lSQ: \"xdlnduh\",\n kLWn49: \"xaomhve\",\n $$css: true\n },\n pressed: {\n kKwaWg: \"xdiex0u\",\n $$css: true\n },\n selectedDrawer: {\n kWkggS: \"x15dekr4 x1jzqe4\",\n kMwMTN: \"x1sawysd x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selectedList: {\n kWkggS: \"xp89om9 x1jzqe4\",\n kMwMTN: \"xscdzaa x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selectedMenu: {\n kWkggS: \"xs6yvni x1jzqe4\",\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n slot: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n supporting: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xpo2rfv\",\n kGuDYH: \"x193rfdd\",\n k63SB2: \"x1hews6w\",\n kb6lSQ: \"xn43zvd\",\n kLWn49: \"xv61bfh\",\n $$css: true\n },\n supportingInherit: {\n kMwMTN: \"x1heor9g\",\n $$css: true\n },\n supportingSelectedDrawer: {\n kMwMTN: \"x1sawysd x1k5gbb1\",\n $$css: true\n },\n supportingSelectedList: {\n kMwMTN: \"xscdzaa x1k5gbb1\",\n $$css: true\n },\n supportingSelectedMenu: {\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n $$css: true\n },\n threeLine: {\n kGNEyG: \"x1cy8zhl\",\n kAzted: \"x1bt55z4\",\n $$css: true\n },\n twoLine: {\n kAzted: \"x304zwk\",\n $$css: true\n }\n};\nexport { rowStyles };"],"mappings":";AAiDA,MAAMU,YAAY;CAChBC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRZ,QAAQ;EACRG,QAAQ;EACRU,QAAQ;EACRC,QAAQ;EACRH,OAAO;CACT;CACAI,UAAU;EACRf,QAAQ;EACRgB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,OAAO;CACT;CACAQ,QAAQ;EACNC,QAAQ;EACRd,QAAQ;EACRe,QAAQ;EACRC,QAAQ;EACRX,OAAO;CACT;CACAY,YAAY;EACVP,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRhB,OAAO;CACT;CACAiB,cAAc;EACZZ,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRhB,OAAO;CACT;CACAkB,kBAAkB;EAChBC,QAAQ;EACRnB,OAAO;CACT;CACAoB,cAAc;EACZC,QAAQ;EACRC,QAAQ;EACRH,QAAQ;EACRI,QAAQ;EACRC,QAAQ;
|
|
1
|
+
{"version":3,"file":"styles.js","names":["stylex","colors","radii","shadows","sizing","spacing","stateLayerOpacity","typography","HOVER_CAPABLE","FORCED_COLORS","rowStyles","base","kGNEyG","kWkggS","kMzoRj","kB7OPa","kMwMTN","k1xSpc","kOIVth","kzqmXN","k8WAf4","kg3NbH","kVAEAm","k9WMMc","$$css","disabled","kkrTdU","kAXs8y","dragging","kKwaWg","kGVxlE","kY2c9j","drawer","kaIpWk","kUOVxO","kAzted","dropTarget","kjBf7l","kInvED","k3XXqK","kMeerF","focusVisible","headlineEmphasis","k63SB2","headlineList","kMv6JI","kGuDYH","kb6lSQ","kLWn49","kHjlTd","headlineMenu","hovered","interactive","kVVagm","interactiveLayers","list","main","kXwgrk","kzQI83","k7Eaqz","menu","overline","pressed","selectedDrawer","selectedList","selectedMenu","slot","kmuXW","supporting","supportingInherit","supportingSelectedDrawer","supportingSelectedList","supportingSelectedMenu","threeLine","twoLine"],"sources":["../../src/row/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The row every list draws: ListItem's, and from here on the item of every\n// collection the coverage plan adds — ListBox, Menu, List, Tree, the options\n// of Select and ComboBox. Apart from the RowContent component in ./index.tsx\n// so that file exports components alone, which is what keeps fast refresh\n// working for it.\n//\n// Three variants, because three spec pages draw three rows. The lists page\n// gives a list item a 56dp floor, a body-large headline and a body-medium\n// supporting line, and primary container when selected. The menus page gives\n// a menu item 48dp, a label-large label, and tertiary container when\n// selected. The navigation drawer page gives its row 56dp too, with a\n// label-large label like a menu's, and marks the current one with a\n// secondary-container pill held 12dp off each edge — 336dp of indicator in a\n// 360dp container, which is what that inset comes to. The layout, the\n// padding, the state layers and the disabled treatment are one row; `list`,\n// `menu` and `drawer` carry only what the three pages disagree on, and a\n// consumer applies one of them beside `base`.\n//\n// Laid out with flex rather than the grid the design draws. The design's\n// three columns are `auto 1fr auto`, which is what flex does natively — and\n// unlike a fixed three-column grid it stays correct when a row has no leading\n// or no trailing content, where the remaining children would otherwise slide\n// into the wrong columns.\n//\n// Rows align with each other through their leading content being the same\n// size, not through a fixed column width: a list of Avatars all at one size\n// lines up, and that is the same thing the design's 40px column achieves.\n//\n// The state layer composites over `transparent` rather than over a container\n// colour, because a row's own background is transparent and it therefore\n// tints whatever it happens to be sitting on — a card, a menu, or the page.\n// The two selected states are the ones that bring a container of their own.\n\n// A pointer that can hover, for `interactiveLayers` — a plain element with no\n// render state, so its hover layer is a pseudo-class, and Chromium leaves\n// `:hover` on whatever a touch last tapped. Inside this query a touch screen\n// draws no hover at all; a touchscreen laptop still matches it for its\n// trackpad.\nconst HOVER_CAPABLE = '@media (hover: hover)';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\nconst rowStyles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n kzqmXN: \"xh8yej3\",\n k8WAf4: \"x1uvvd8r\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n k9WMMc: \"x1yc453h\",\n $$css: true\n },\n disabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n kAXs8y: \"xr5dkdi\",\n $$css: true\n },\n dragging: {\n kWkggS: \"x14s9m32\",\n kKwaWg: \"xdiex0u\",\n kGVxlE: \"x4r79n0\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n drawer: {\n kaIpWk: \"x1dkaolv\",\n kzqmXN: \"x14atkfc\",\n kUOVxO: \"xd2r6sq\",\n kAzted: \"xyax5pk\",\n $$css: true\n },\n dropTarget: {\n kKwaWg: \"xu73ib2\",\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n focusVisible: {\n kKwaWg: \"x17vw94z\",\n kjBf7l: \"xrgy624 x1v8yhc2\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n headlineEmphasis: {\n k63SB2: \"x1sfltvt\",\n $$css: true\n },\n headlineList: {\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n headlineMenu: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n hovered: {\n kKwaWg: \"xbmfk57\",\n kkrTdU: \"x1ypdohk\",\n $$css: true\n },\n interactive: {\n kkrTdU: \"x1ypdohk\",\n kVVagm: \"xln7xf2\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n interactiveLayers: {\n kWkggS: \"x83qkoq x1yl1wq7 xjqqt44 xjbqb8w\",\n $$css: true\n },\n list: {\n kAzted: \"xyax5pk\",\n $$css: true\n },\n main: {\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kzQI83: \"x1iyjqo2\",\n kOIVth: \"x14qo01y\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n },\n menu: {\n kAzted: \"x1ddmzdj\",\n $$css: true\n },\n overline: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xs1w0rn\",\n kGuDYH: \"x1n35her\",\n k63SB2: \"x1su64ma\",\n kb6lSQ: \"xdlnduh\",\n kLWn49: \"xaomhve\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n pressed: {\n kKwaWg: \"xdiex0u\",\n $$css: true\n },\n selectedDrawer: {\n kWkggS: \"x15dekr4 x1jzqe4\",\n kMwMTN: \"x1sawysd x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selectedList: {\n kWkggS: \"xp89om9 x1jzqe4\",\n kMwMTN: \"xscdzaa x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n selectedMenu: {\n kWkggS: \"xs6yvni x1jzqe4\",\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n slot: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n supporting: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xpo2rfv\",\n kGuDYH: \"x193rfdd\",\n k63SB2: \"x1hews6w\",\n kb6lSQ: \"xn43zvd\",\n kLWn49: \"xv61bfh\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n supportingInherit: {\n kMwMTN: \"x1heor9g\",\n $$css: true\n },\n supportingSelectedDrawer: {\n kMwMTN: \"x1sawysd x1k5gbb1\",\n $$css: true\n },\n supportingSelectedList: {\n kMwMTN: \"xscdzaa x1k5gbb1\",\n $$css: true\n },\n supportingSelectedMenu: {\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n $$css: true\n },\n threeLine: {\n kGNEyG: \"x1cy8zhl\",\n kAzted: \"x1bt55z4\",\n $$css: true\n },\n twoLine: {\n kAzted: \"x304zwk\",\n $$css: true\n }\n};\nexport { rowStyles };"],"mappings":";AAiDA,MAAMU,YAAY;CAChBC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRZ,QAAQ;EACRG,QAAQ;EACRU,QAAQ;EACRC,QAAQ;EACRH,OAAO;CACT;CACAI,UAAU;EACRf,QAAQ;EACRgB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,OAAO;CACT;CACAQ,QAAQ;EACNC,QAAQ;EACRd,QAAQ;EACRe,QAAQ;EACRC,QAAQ;EACRX,OAAO;CACT;CACAY,YAAY;EACVP,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRhB,OAAO;CACT;CACAiB,cAAc;EACZZ,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRhB,OAAO;CACT;CACAkB,kBAAkB;EAChBC,QAAQ;EACRnB,OAAO;CACT;CACAoB,cAAc;EACZC,QAAQ;EACRC,QAAQ;EACRH,QAAQ;EACRI,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRzB,OAAO;CACT;CACA0B,cAAc;EACZL,QAAQ;EACRC,QAAQ;EACRH,QAAQ;EACRI,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRzB,OAAO;CACT;CACA2B,SAAS;EACPtB,QAAQ;EACRH,QAAQ;EACRF,OAAO;CACT;CACA4B,aAAa;EACX1B,QAAQ;EAC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HANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanso-labs/kanso-ui",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.4",
|
|
4
4
|
"description": "A React component library built on React Aria Components primitives and styled with StyleX, with design tokens sourced from a single W3C DTCG file and compiled via Style Dictionary",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|