@kanso-labs/kanso-ui 0.40.2 → 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/chip/styles.js +2 -2
- package/dist/chip/styles.js.map +1 -1
- package/dist/collection/styles.js +2 -1
- package/dist/collection/styles.js.map +1 -1
- package/dist/components/app-bar/index.js +11 -7
- 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 +8 -1
- package/dist/components/card/index.js.map +1 -1
- package/dist/components/checkbox/index.js +3 -3
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/chip-group/index.js +1 -1
- package/dist/components/dialog/index.d.ts +5 -0
- package/dist/components/dialog/index.js +5 -0
- package/dist/components/dialog/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 +68 -10
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/popover/index.js +310 -93
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/progress-indicator/index.js +6 -6
- package/dist/components/progress-indicator/index.js.map +1 -1
- package/dist/components/radio-group/index.js +27 -38
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/segmented-button/index.d.ts +3 -1
- package/dist/components/segmented-button/index.js +33 -17
- package/dist/components/segmented-button/index.js.map +1 -1
- package/dist/components/select/index.js +1 -0
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/sheet/index.d.ts +5 -0
- package/dist/components/sheet/index.js +6 -1
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/snackbar/index.js +1 -1
- package/dist/components/snackbar/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/index.js +54 -1
- package/dist/control/index.js.map +1 -1
- package/dist/control/styles.js +8 -2
- package/dist/control/styles.js.map +1 -1
- package/dist/field/index.js +183 -131
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +27 -1
- 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 +13 -2
- package/dist/indicator/styles.js.map +1 -1
- package/dist/mark/styles.js +3 -0
- package/dist/mark/styles.js.map +1 -1
- package/dist/navigation/styles.js +1 -1
- package/dist/navigation/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 +5 -1
- package/dist/row/styles.js.map +1 -1
- package/dist/styles/overlay.js +1 -0
- package/dist/styles/overlay.js.map +1 -1
- package/dist/styles.css +19 -3
- package/package.json +1 -1
package/dist/indicator/styles.js
CHANGED
|
@@ -19,12 +19,12 @@ const indicatorStyles = {
|
|
|
19
19
|
activeAt: (percentage) => [_temp, { "--x-inlineSize": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(`calc((100% - 12px) * ${percentage / 100})`) }],
|
|
20
20
|
inheritActive: {
|
|
21
21
|
kWkggS: "xtwfq29 x1jzqe4",
|
|
22
|
-
kjVXCG: "x73je2i",
|
|
22
|
+
kjVXCG: "x73je2i xbabvq0",
|
|
23
23
|
$$css: true
|
|
24
24
|
},
|
|
25
25
|
inheritTrack: {
|
|
26
26
|
kWkggS: "xtp5tyh",
|
|
27
|
-
kjVXCG: "xy3ggvv",
|
|
27
|
+
kjVXCG: "xy3ggvv x8jos32",
|
|
28
28
|
$$css: true
|
|
29
29
|
},
|
|
30
30
|
label: {
|
|
@@ -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,QAAQ;EACRC,OAAO;CACT;CACAC,WAAWC,eAAuB,CAACf,OAAO,EACxC,oBAAmBgB,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAW,wBAA4CF,aAAa,IAAG,EAAG,EACjK,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,WAAW;EACTC,QAAQ;EACRC,QAAQ;EACRtB,OAAO;CACT;CACAuB,MAAM;EACJP,QAAQ;EACRvB,QAAQ;EACRE,QAAQ;EACRsB,QAAQ;EACRC,QAAQ;EACR9B,QAAQ;EACRY,OAAO;CACT;CACAwB,gBAAgB;EACdhC,QAAQ;EACRQ,OAAO;CACT;CACAyB,gBAAgB;EACdjC,QAAQ;EACRQ,OAAO;CACT;CACA0B,MAAM;EACJ/B,QAAQ;EACRsB,QAAQ;EACRU,QAAQ;EACRT,QAAQ;EACR9B,QAAQ;EACRY,OAAO;CACT;CACA4B,MAAM;EACJpC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPR,QAAQ;EACRY,OAAO;CACT;CACA6B,OAAO;EACLpC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRsB,QAAQ;EACRa,QAAQ;EACRT,QAAQ;EACRU,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRnC,OAAO;CACT;CACAoC,YAAY;EACV5C,QAAQ;EACRQ,OAAO;CACT;CACAqC,OAAO;EACLzC,OAAO;EACP0C,QAAQ;EACRC,QAAQ;EACRvC,OAAO;CACT;AACF"}
|
package/dist/mark/styles.js
CHANGED
package/dist/mark/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["stylex","colors","radii","typography","markStyles","base","kGNEyG","kB7OPa","k1xSpc","kmuXW","kMv6JI","k63SB2","kjj79g","kVQacm","kfSwDN","$$css","circle","kaIpWk","contain","kVIFPx","cover","fallback","kZKoxP","kzqmXN","image","lg","kGuDYH","md","negative","kWkggS","kMwMTN","positive","primary","secondary","sm","square","tertiary","MarkSize","MarkTone"],"sources":["../../src/mark/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, typography } from '../tokens/design.tokens.stylex';\n\n// The box Avatar and ProductIcon draw in, shared so a person and a thing stay\n// the same three sizes in the same five tones, and so either can fill a\n// leading slot without moving what sits beside it. They differ in the two\n// ways that matter for a mark rather than a face, and those are the keys a\n// kind picks between in `./index.tsx`.\n//\n// A person is a circle with the photo cropped to fill it; a thing is a\n// rounded square with its mark letterboxed. A logo is drawn to its own\n// bounding box, so a circle crops the corners it was composed with, and\n// cropping a face loses nothing anyone minds where cropping a wordmark loses\n// the word. The cost of `contain` is letterboxing — a wide mark leaves space\n// above and below — and that is the right trade for a mark whose whole job\n// is to be recognised.\n//\n// That cost is also why a thing's tone tints the fallback rather than the\n// root. A mark letterboxed into the square does not cover it, and neither\n// does one drawn with transparency, so a tint on the root showed as a\n// coloured box around every logo that was not an opaque square. On the\n// fallback it is seen exactly when it is meant to be: while there is no\n// mark, or none has loaded. A photo covers the whole circle, so a person's\n// tone stays on the root.\n//\n// Tones are container/on-container pairs rather than one colour each, so the\n// initials are always a role's own foreground and can't end up unreadable on\n// a tint they were never paired with.\n//\n// Sizes carry their own type size but not their own weight or family: the\n// label face at medium weight holds across all three, so a large mark is\n// bigger initials rather than differently-styled ones.\n//\n// The three are the library's own rather than a spec page's — no Material\n// Design page gives a measurement for one in text; the lists page draws its\n// leading elements in a diagram and tabulates only their padding. So they are\n// stated against the scale the library already has. `md` is 40dp, which is\n// Button's and IconButton's own `md` height, so a mark and a control line up\n// in a row. `lg` is 56dp. `sm` is 36dp, between the 32dp a chip and an `xs`\n// control take and that 40dp default, for a row that wants a person smaller\n// than the button beside them.\nconst markStyles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kMv6JI: \"xkknnkr\",\n k63SB2: \"x1bf3uqz\",\n kjj79g: \"xl56j7k\",\n kVQacm: \"xb3r6kr\",\n kfSwDN: \"x87ps6o\",\n $$css: true\n },\n circle: {\n kaIpWk: \"x16fbrrb\",\n $$css: true\n },\n contain: {\n kVIFPx: \"x19kjcj4\",\n $$css: true\n },\n cover: {\n kVIFPx: \"xl1xv1r\",\n $$css: true\n },\n fallback: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x5yr21d\",\n k1xSpc: \"x78zum5\",\n kzqmXN: \"xh8yej3\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n image: {\n kZKoxP: \"x5yr21d\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n lg: {\n kZKoxP: \"xnnlda6\",\n kGuDYH: \"x1848etk\",\n kzqmXN: \"x15yg21f\",\n $$css: true\n },\n md: {\n kZKoxP: \"x1vqgdyp\",\n kGuDYH: \"x14zspaw\",\n kzqmXN: \"x100vrsf\",\n $$css: true\n },\n negative: {\n kWkggS: \"xkz0cvf\",\n kMwMTN: \"xylzu7l\",\n $$css: true\n },\n positive: {\n kWkggS: \"xa3zu90\",\n kMwMTN: \"x1di7zbg\",\n $$css: true\n },\n primary: {\n kWkggS: \"xp89om9\",\n kMwMTN: \"xscdzaa\",\n $$css: true\n },\n secondary: {\n kWkggS: \"x15dekr4\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n sm: {\n kZKoxP: \"xc9qbxq\",\n kGuDYH: \"xkucv67\",\n kzqmXN: \"x14qfxbe\",\n $$css: true\n },\n square: {\n kaIpWk: \"x1xdvaa9\",\n $$css: true\n },\n tertiary: {\n kWkggS: \"xs6yvni\",\n kMwMTN: \"x3cbcwg\",\n $$css: true\n }\n};\ntype MarkSize = 'lg' | 'md' | 'sm';\ntype MarkTone = 'negative' | 'positive' | 'primary' | 'secondary' | 'tertiary';\nexport type { MarkSize, MarkTone };\nexport { markStyles };"],"mappings":";
|
|
1
|
+
{"version":3,"file":"styles.js","names":["stylex","colors","radii","typography","FORCED_COLORS","markStyles","base","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kB7OPa","k1xSpc","kmuXW","kMv6JI","k63SB2","kjj79g","kVQacm","kfSwDN","$$css","circle","kaIpWk","contain","kVIFPx","cover","fallback","kZKoxP","kzqmXN","image","lg","kGuDYH","md","negative","kWkggS","kMwMTN","positive","primary","secondary","sm","square","tertiary","MarkSize","MarkTone"],"sources":["../../src/mark/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, typography } from '../tokens/design.tokens.stylex';\n\n// The box Avatar and ProductIcon draw in, shared so a person and a thing stay\n// the same three sizes in the same five tones, and so either can fill a\n// leading slot without moving what sits beside it. They differ in the two\n// ways that matter for a mark rather than a face, and those are the keys a\n// kind picks between in `./index.tsx`.\n//\n// A person is a circle with the photo cropped to fill it; a thing is a\n// rounded square with its mark letterboxed. A logo is drawn to its own\n// bounding box, so a circle crops the corners it was composed with, and\n// cropping a face loses nothing anyone minds where cropping a wordmark loses\n// the word. The cost of `contain` is letterboxing — a wide mark leaves space\n// above and below — and that is the right trade for a mark whose whole job\n// is to be recognised.\n//\n// That cost is also why a thing's tone tints the fallback rather than the\n// root. A mark letterboxed into the square does not cover it, and neither\n// does one drawn with transparency, so a tint on the root showed as a\n// coloured box around every logo that was not an opaque square. On the\n// fallback it is seen exactly when it is meant to be: while there is no\n// mark, or none has loaded. A photo covers the whole circle, so a person's\n// tone stays on the root.\n//\n// Tones are container/on-container pairs rather than one colour each, so the\n// initials are always a role's own foreground and can't end up unreadable on\n// a tint they were never paired with.\n//\n// Sizes carry their own type size but not their own weight or family: the\n// label face at medium weight holds across all three, so a large mark is\n// bigger initials rather than differently-styled ones.\n//\n// The three are the library's own rather than a spec page's — no Material\n// Design page gives a measurement for one in text; the lists page draws its\n// leading elements in a diagram and tabulates only their padding. So they are\n// stated against the scale the library already has. `md` is 40dp, which is\n// Button's and IconButton's own `md` height, so a mark and a control line up\n// in a row. `lg` is 56dp. `sm` is 36dp, between the 32dp a chip and an `xs`\n// control take and that 40dp default, for a row that wants a person smaller\n// than the button beside them.\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 markStyles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1w1tqly\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kMv6JI: \"xkknnkr\",\n k63SB2: \"x1bf3uqz\",\n kjj79g: \"xl56j7k\",\n kVQacm: \"xb3r6kr\",\n kfSwDN: \"x87ps6o\",\n $$css: true\n },\n circle: {\n kaIpWk: \"x16fbrrb\",\n $$css: true\n },\n contain: {\n kVIFPx: \"x19kjcj4\",\n $$css: true\n },\n cover: {\n kVIFPx: \"xl1xv1r\",\n $$css: true\n },\n fallback: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x5yr21d\",\n k1xSpc: \"x78zum5\",\n kzqmXN: \"xh8yej3\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n image: {\n kZKoxP: \"x5yr21d\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n lg: {\n kZKoxP: \"xnnlda6\",\n kGuDYH: \"x1848etk\",\n kzqmXN: \"x15yg21f\",\n $$css: true\n },\n md: {\n kZKoxP: \"x1vqgdyp\",\n kGuDYH: \"x14zspaw\",\n kzqmXN: \"x100vrsf\",\n $$css: true\n },\n negative: {\n kWkggS: \"xkz0cvf\",\n kMwMTN: \"xylzu7l\",\n $$css: true\n },\n positive: {\n kWkggS: \"xa3zu90\",\n kMwMTN: \"x1di7zbg\",\n $$css: true\n },\n primary: {\n kWkggS: \"xp89om9\",\n kMwMTN: \"xscdzaa\",\n $$css: true\n },\n secondary: {\n kWkggS: \"x15dekr4\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n sm: {\n kZKoxP: \"xc9qbxq\",\n kGuDYH: \"xkucv67\",\n kzqmXN: \"x14qfxbe\",\n $$css: true\n },\n square: {\n kaIpWk: \"x1xdvaa9\",\n $$css: true\n },\n tertiary: {\n kWkggS: \"xs6yvni\",\n kMwMTN: \"x3cbcwg\",\n $$css: true\n }\n};\ntype MarkSize = 'lg' | 'md' | 'sm';\ntype MarkTone = 'negative' | 'positive' | 'primary' | 'secondary' | 'tertiary';\nexport type { MarkSize, MarkTone };\nexport { markStyles };"],"mappings":";AA+CA,MAAMK,aAAa;CACjBC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,QAAQ;EACNC,QAAQ;EACRF,OAAO;CACT;CACAG,SAAS;EACPC,QAAQ;EACRJ,OAAO;CACT;CACAK,OAAO;EACLD,QAAQ;EACRJ,OAAO;CACT;CACAM,UAAU;EACRlB,QAAQ;EACRmB,QAAQ;EACRd,QAAQ;EACRe,QAAQ;EACRX,QAAQ;EACRG,OAAO;CACT;CACAS,OAAO;EACLF,QAAQ;EACRC,QAAQ;EACRR,OAAO;CACT;CACAU,IAAI;EACFH,QAAQ;EACRI,QAAQ;EACRH,QAAQ;EACRR,OAAO;CACT;CACAY,IAAI;EACFL,QAAQ;EACRI,QAAQ;EACRH,QAAQ;EACRR,OAAO;CACT;CACAa,UAAU;EACRC,QAAQ;EACRC,QAAQ;EACRf,OAAO;CACT;CACAgB,UAAU;EACRF,QAAQ;EACRC,QAAQ;EACRf,OAAO;CACT;CACAiB,SAAS;EACPH,QAAQ;EACRC,QAAQ;EACRf,OAAO;CACT;CACAkB,WAAW;EACTJ,QAAQ;EACRC,QAAQ;EACRf,OAAO;CACT;CACAmB,IAAI;EACFZ,QAAQ;EACRI,QAAQ;EACRH,QAAQ;EACRR,OAAO;CACT;CACAoB,QAAQ;EACNlB,QAAQ;EACRF,OAAO;CACT;CACAqB,UAAU;EACRP,QAAQ;EACRC,QAAQ;EACRf,OAAO;CACT;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["stylex","colors","media","radii","spacing","stateLayerOpacity","typography","FORCED_COLORS","HOVERED_OVER_NOTHING","onSecondaryContainer","hover","FOCUSED_OVER_NOTHING","focus","PRESSED_OVER_NOTHING","pressed","HOVERED_OVER_CURRENT","secondaryContainer","FOCUSED_OVER_CURRENT","PRESSED_OVER_CURRENT","navigationItemStyles","icon","kGNEyG","k1xSpc","kGuDYH","kjj79g","$$css","itemDisabled","kMwMTN","kkrTdU","label","kVQacm","kg5iWk","khDVqt","link","kB7OPa","k3XXqK","kVAEAm","kMnn75","pill","kWkggS","kaIpWk","barItemStyles","indicator","kZKoxP","kmuXW","kzqmXN","indicatorCurrent","kVAM5u","ksu8eU","kMzoRj","indicatorFocused","indicatorFocusedCurrent","indicatorHovered","indicatorHoveredCurrent","indicatorPressed","indicatorPressedCurrent","indicatorRing","kjBf7l","kInvED","kMeerF","item","kCS8Yb","kXwgrk","kzQI83","kOIVth","k7Eaqz","k8WAf4","kg3NbH","itemCurrent","itemFocused","itemFocusedCurrent","itemHovered","itemHoveredCurrent","itemPressed","itemPressedCurrent","itemRing","kMv6JI","k63SB2","kb6lSQ","kLWn49","ks0D6T","labelCurrent","collapsedItemStyles","expandedItemStyles","kSGwAc"],"sources":["../../src/navigation/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, media, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The destinations NavigationBar and NavigationRail both draw, in the three\n// forms the two pages give them. Apart from either component so the two\n// cannot drift, and outside `src/components` for the reason src/row gives.\n//\n// A vertical destination puts its icon in the page's 56dp by 32dp active\n// indicator with the label 4dp under it, in label medium: the navigation bar\n// below the medium breakpoint, and the collapsed rail. A horizontal one is a\n// pill holding the icon and the label side by side, 16dp in at either end:\n// the bar at and above the medium breakpoint at 40dp with 4dp between the\n// two, and the expanded rail at 56dp with 8dp between them, in label large.\n//\n// The current destination's pill is the secondary container, with its icon\n// in on secondary container and, under the pill, its label in secondary;\n// every other is on surface variant. A label set inside the pill, as a\n// horizontal destination sets it, takes on secondary container instead — the\n// library's own call. Secondary over secondary container is not a pair a\n// scheme is held to, and the Poster scheme's came to 4:1, short of the 4.5:1\n// text needs; on secondary container is the pair every scheme guarantees.\n//\n// The hover, focus and pressed layers are the on secondary container role\n// over whatever the pill is, at the pages' 8%, 10% and 10%, drawn on the\n// pill — the indicator in a vertical destination, the whole destination in a\n// horizontal one. They are applied in that order, so where two hold the\n// later wins, as the pages draw one layer at a time. A focused destination's\n// ring goes around the same pill; ./index.tsx says whose ring it is.\n//\n// Under forced colours the mode paints the secondary container over in its\n// background, which left the current destination looking like every other.\n// The pill takes a 2px border in `Highlight` there, which the mode keeps.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The pill's ground and the layers over it, written out whole for each\n// ground, since StyleX replaces a property whole.\nconst HOVERED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), transparent)`;\nconst FOCUSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), transparent)`;\nconst PRESSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), transparent)`;\nconst HOVERED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), ${colors.secondaryContainer})`;\nconst FOCUSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), ${colors.secondaryContainer})`;\nconst PRESSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), ${colors.secondaryContainer})`;\n\n// What every destination draws whatever its form.\nconst navigationItemStyles = {\n icon: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n itemDisabled: {\n kMwMTN: \"x1gpw424\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n label: {\n kMwMTN: \"x1w5n3ug\",\n kVQacm: \"xb3r6kr\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n link: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n k3XXqK: \"x1t137rt\",\n kVAEAm: \"x1n2onr6\",\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n pill: {\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\n\n// The navigation bar's destination: vertical below the medium breakpoint and\n// horizontal at it and above, so every value that differs is a pair.\nconst barItemStyles = {\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97 x10qpgbh\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f x11lewyt\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4 x8jqrm0\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck xnqlxux\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su x8jqrm0\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g x8jqrm0\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf x8jqrm0\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6 x8jqrm0\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj x8jqrm0\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9 x8jqrm0\",\n $$css: true\n },\n indicatorRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59 x1t601oj\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n item: {\n kZKoxP: \"x5yr21d xiioxts\",\n kaIpWk: \"x1dkaolv\",\n kCS8Yb: \"x1r8uery x1a6ly76\",\n kXwgrk: \"xdt5ytf xapwh9g\",\n kzQI83: \"x1iyjqo2 x10cb59y\",\n kOIVth: \"xzoy561\",\n kjj79g: \"xl56j7k\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"x1t0vds8 x1nouyz5\",\n kg3NbH: \"xnjsko4 xze1m75\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"xjbqb8w x1xec0pq\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"x1xldtvv x1wx4lrg\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"xjbqb8w xdodzsd\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"xjbqb8w xnmt8re\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"xjbqb8w xdenq60\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"xjbqb8w xjq3nej\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"xjbqb8w x7fq6vu\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xjbqb8w x9wewpu\",\n $$css: true\n },\n itemRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt xxgb522\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9 x16ybrrz\",\n $$css: true\n }\n};\n\n// The collapsed rail's destination: always vertical, the pitch from one to\n// the next the rail's 4dp gap.\nconst collapsedItemStyles = {\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n item: {\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"xzoy561\",\n kzqmXN: \"xh8yej3\",\n kjj79g: \"xl56j7k\",\n k8WAf4: \"x1t0vds8\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n itemCurrent: {\n $$css: true\n },\n itemFocused: {\n $$css: true\n },\n itemFocusedCurrent: {\n $$css: true\n },\n itemHovered: {\n $$css: true\n },\n itemHoveredCurrent: {\n $$css: true\n },\n itemPressed: {\n $$css: true\n },\n itemPressedCurrent: {\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9\",\n $$css: true\n }\n};\n\n// The expanded rail's destination: always horizontal, a 56dp pill as wide as\n// what it holds.\nconst expandedItemStyles = {\n indicator: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n indicatorCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n $$css: true\n },\n indicatorFocusedCurrent: {\n $$css: true\n },\n indicatorHovered: {\n $$css: true\n },\n indicatorHoveredCurrent: {\n $$css: true\n },\n indicatorPressed: {\n $$css: true\n },\n indicatorPressedCurrent: {\n $$css: true\n },\n item: {\n kSGwAc: \"xqcrz7y\",\n kZKoxP: \"xnnlda6\",\n kaIpWk: \"x1dkaolv\",\n kXwgrk: \"x1q0g3np\",\n kOIVth: \"x126z3so\",\n ks0D6T: \"x193iq5w\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n }\n};\nexport { barItemStyles, collapsedItemStyles, expandedItemStyles, navigationItemStyles };"],"mappings":";;AA0C6B,GAAsBC,OAAOQ,uBAA6BJ,kBAAkBK;AAC5E,GAAsBT,OAAOQ,uBAA6BJ,kBAAkBO;AAC5E,GAAsBX,OAAOQ,uBAA6BJ,kBAAkBS;AAC5E,GAAsBb,OAAOQ,uBAA6BJ,kBAAkBK,QAAkBT,OAAOe;AACrG,GAAsBf,OAAOQ,uBAA6BJ,kBAAkBO,QAAkBX,OAAOe;AACrG,GAAsBf,OAAOQ,uBAA6BJ,kBAAkBS,UAAoBb,OAAOe;AAGpI,MAAMG,uBAAuB;CAC3BC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,cAAc;EACZC,QAAQ;EACRC,QAAQ;EACRH,OAAO;CACT;CACAI,OAAO;EACLF,QAAQ;EACRG,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,OAAO;CACT;CACAQ,MAAM;EACJZ,QAAQ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"file":"styles.js","names":["stylex","colors","media","radii","spacing","stateLayerOpacity","typography","FORCED_COLORS","HOVERED_OVER_NOTHING","onSecondaryContainer","hover","FOCUSED_OVER_NOTHING","focus","PRESSED_OVER_NOTHING","pressed","HOVERED_OVER_CURRENT","secondaryContainer","FOCUSED_OVER_CURRENT","PRESSED_OVER_CURRENT","navigationItemStyles","icon","kGNEyG","k1xSpc","kGuDYH","kjj79g","$$css","itemDisabled","kMwMTN","kkrTdU","label","kVQacm","kg5iWk","khDVqt","link","kB7OPa","k3XXqK","kVAEAm","kMnn75","pill","kWkggS","kaIpWk","barItemStyles","indicator","kZKoxP","kmuXW","kzqmXN","indicatorCurrent","kVAM5u","ksu8eU","kMzoRj","indicatorFocused","indicatorFocusedCurrent","indicatorHovered","indicatorHoveredCurrent","indicatorPressed","indicatorPressedCurrent","indicatorRing","kjBf7l","kInvED","kMeerF","item","kCS8Yb","kXwgrk","kzQI83","kOIVth","k7Eaqz","k8WAf4","kg3NbH","itemCurrent","itemFocused","itemFocusedCurrent","itemHovered","itemHoveredCurrent","itemPressed","itemPressedCurrent","itemRing","kMv6JI","k63SB2","kb6lSQ","kLWn49","ks0D6T","labelCurrent","collapsedItemStyles","expandedItemStyles","kSGwAc"],"sources":["../../src/navigation/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, media, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The destinations NavigationBar and NavigationRail both draw, in the three\n// forms the two pages give them. Apart from either component so the two\n// cannot drift, and outside `src/components` for the reason src/row gives.\n//\n// A vertical destination puts its icon in the page's 56dp by 32dp active\n// indicator with the label 4dp under it, in label medium: the navigation bar\n// below the medium breakpoint, and the collapsed rail. A horizontal one is a\n// pill holding the icon and the label side by side, 16dp in at either end:\n// the bar at and above the medium breakpoint at 40dp with 4dp between the\n// two, and the expanded rail at 56dp with 8dp between them, in label large.\n//\n// The current destination's pill is the secondary container, with its icon\n// in on secondary container and, under the pill, its label in secondary;\n// every other is on surface variant. A label set inside the pill, as a\n// horizontal destination sets it, takes on secondary container instead — the\n// library's own call. Secondary over secondary container is not a pair a\n// scheme is held to, and the Poster scheme's came to 4:1, short of the 4.5:1\n// text needs; on secondary container is the pair every scheme guarantees.\n//\n// The hover, focus and pressed layers are the on secondary container role\n// over whatever the pill is, at the pages' 8%, 10% and 10%, drawn on the\n// pill — the indicator in a vertical destination, the whole destination in a\n// horizontal one. They are applied in that order, so where two hold the\n// later wins, as the pages draw one layer at a time. A focused destination's\n// ring goes around the same pill; ./index.tsx says whose ring it is.\n//\n// Under forced colours the mode paints the secondary container over in its\n// background, which left the current destination looking like every other.\n// The pill takes a 2px border in `Highlight` there, which the mode keeps.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The pill's ground and the layers over it, written out whole for each\n// ground, since StyleX replaces a property whole.\nconst HOVERED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), transparent)`;\nconst FOCUSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), transparent)`;\nconst PRESSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), transparent)`;\nconst HOVERED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), ${colors.secondaryContainer})`;\nconst FOCUSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), ${colors.secondaryContainer})`;\nconst PRESSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), ${colors.secondaryContainer})`;\n\n// What every destination draws whatever its form.\nconst navigationItemStyles = {\n icon: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n itemDisabled: {\n kMwMTN: \"x1gpw424 x1bhcspo\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n label: {\n kMwMTN: \"x1w5n3ug\",\n kVQacm: \"xb3r6kr\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n link: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n k3XXqK: \"x1t137rt\",\n kVAEAm: \"x1n2onr6\",\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n pill: {\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\n\n// The navigation bar's destination: vertical below the medium breakpoint and\n// horizontal at it and above, so every value that differs is a pair.\nconst barItemStyles = {\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97 x10qpgbh\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f x11lewyt\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4 x8jqrm0\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck xnqlxux\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su x8jqrm0\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g x8jqrm0\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf x8jqrm0\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6 x8jqrm0\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj x8jqrm0\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9 x8jqrm0\",\n $$css: true\n },\n indicatorRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59 x1t601oj\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n item: {\n kZKoxP: \"x5yr21d xiioxts\",\n kaIpWk: \"x1dkaolv\",\n kCS8Yb: \"x1r8uery x1a6ly76\",\n kXwgrk: \"xdt5ytf xapwh9g\",\n kzQI83: \"x1iyjqo2 x10cb59y\",\n kOIVth: \"xzoy561\",\n kjj79g: \"xl56j7k\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"x1t0vds8 x1nouyz5\",\n kg3NbH: \"xnjsko4 xze1m75\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"xjbqb8w x1xec0pq\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"x1xldtvv x1wx4lrg\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"xjbqb8w xdodzsd\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"xjbqb8w xnmt8re\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"xjbqb8w xdenq60\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"xjbqb8w xjq3nej\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"xjbqb8w x7fq6vu\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xjbqb8w x9wewpu\",\n $$css: true\n },\n itemRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt xxgb522\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9 x16ybrrz\",\n $$css: true\n }\n};\n\n// The collapsed rail's destination: always vertical, the pitch from one to\n// the next the rail's 4dp gap.\nconst collapsedItemStyles = {\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n item: {\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"xzoy561\",\n kzqmXN: \"xh8yej3\",\n kjj79g: \"xl56j7k\",\n k8WAf4: \"x1t0vds8\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n itemCurrent: {\n $$css: true\n },\n itemFocused: {\n $$css: true\n },\n itemFocusedCurrent: {\n $$css: true\n },\n itemHovered: {\n $$css: true\n },\n itemHoveredCurrent: {\n $$css: true\n },\n itemPressed: {\n $$css: true\n },\n itemPressedCurrent: {\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9\",\n $$css: true\n }\n};\n\n// The expanded rail's destination: always horizontal, a 56dp pill as wide as\n// what it holds.\nconst expandedItemStyles = {\n indicator: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n indicatorCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n $$css: true\n },\n indicatorFocusedCurrent: {\n $$css: true\n },\n indicatorHovered: {\n $$css: true\n },\n indicatorHoveredCurrent: {\n $$css: true\n },\n indicatorPressed: {\n $$css: true\n },\n indicatorPressedCurrent: {\n $$css: true\n },\n item: {\n kSGwAc: \"xqcrz7y\",\n kZKoxP: \"xnnlda6\",\n kaIpWk: \"x1dkaolv\",\n kXwgrk: \"x1q0g3np\",\n kOIVth: \"x126z3so\",\n ks0D6T: \"x193iq5w\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n }\n};\nexport { barItemStyles, collapsedItemStyles, expandedItemStyles, navigationItemStyles };"],"mappings":";;AA0C6B,GAAsBC,OAAOQ,uBAA6BJ,kBAAkBK;AAC5E,GAAsBT,OAAOQ,uBAA6BJ,kBAAkBO;AAC5E,GAAsBX,OAAOQ,uBAA6BJ,kBAAkBS;AAC5E,GAAsBb,OAAOQ,uBAA6BJ,kBAAkBK,QAAkBT,OAAOe;AACrG,GAAsBf,OAAOQ,uBAA6BJ,kBAAkBO,QAAkBX,OAAOe;AACrG,GAAsBf,OAAOQ,uBAA6BJ,kBAAkBS,UAAoBb,OAAOe;AAGpI,MAAMG,uBAAuB;CAC3BC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,cAAc;EACZC,QAAQ;EACRC,QAAQ;EACRH,OAAO;CACT;CACAI,OAAO;EACLF,QAAQ;EACRG,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,OAAO;CACT;CACAQ,MAAM;EACJZ,QAAQ;EACRa,QAAQ;EACRP,QAAQ;EACRC,QAAQ;EACRN,QAAQ;EACRa,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRZ,OAAO;CACT;CACAa,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRN,QAAQ;EACRP,QAAQ;EACRF,OAAO;CACT;AACF;AAIA,MAAMgB,gBAAgB;CACpBC,WAAW;EACTrB,QAAQ;EACRsB,QAAQ;EACRH,QAAQ;EACRN,QAAQ;EACRZ,QAAQ;EACRsB,OAAO;EACPC,QAAQ;EACRrB,QAAQ;EACRC,OAAO;CACT;CACAqB,kBAAkB;EAChBP,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAA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A2B,kBAAkB,EAChB3B,OAAO,KACT;CACA4B,yBAAyB,EACvB5B,OAAO,KACT;CACA6B,kBAAkB,EAChB7B,OAAO,KACT;CACA8B,yBAAyB,EACvB9B,OAAO,KACT;CACAmC,MAAM;EACJwB,QAAQ;EACRzC,QAAQ;EACRH,QAAQ;EACRsB,QAAQ;EACRE,QAAQ;EACRgB,QAAQ;EACRb,QAAQ;EACR1C,OAAO;CACT;CACA2C,aAAa;EACX7B,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRxB,OAAO;CACT;CACA4C,aAAa;EACX9B,QAAQ;EACRd,OAAO;CACT;CACA6C,oBAAoB;EAClB/B,QAAQ;EACRd,OAAO;CACT;CACA8C,aAAa;EACXhC,QAAQ;EACRd,OAAO;CACT;CACA+C,oBAAoB;EAClBjC,QAAQ;EACRd,OAAO;CACT;CACAgD,aAAa;EACXlC,QAAQ;EACRd,OAAO;CACT;CACAiD,oBAAoB;EAClBnC,QAAQ;EACRd,OAAO;CACT;CACAI,OAAO;EACL+C,QAAQ;EACRrD,QAAQ;EACRsD,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRtD,OAAO;CACT;CACAwD,cAAc;EACZtD,QAAQ;EACRF,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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yD,GAA/CX,MAAaE,UAAS4B,IAAK;GAAInB,UAAAA;EAAgB,CAAA;EAAAK,EAAA,MAAAL;EAAAK,EAAA,MAAA2B;CAAA,OAAAA,MAAA3B,EAAA;CAAA,IAAA4B;CAAA,IAAA5B,EAAA,QAAA0B,OAAA1B,EAAA,QAAA2B,OAAA3B,EAAA,QAAAY,IAAA;EAbtFgB,MAAA,qBAAA,UAAA,EAAA,UAAA;GACFhB;GACDc;GAWCC;EAAwF,EAAA,CAAA;EACxF3B,EAAA,MAAA0B;EAAA1B,EAAA,MAAA2B;EAAA3B,EAAA,MAAAY;EAAAZ,EAAA,MAAA4B;CAAA,OAAAA,MAAA5B,EAAA;CAAA,OAdE4B;AAcF;AAMP,SAASlB,uBAAuBd,SAAqB;CACnD,IAAIA,YAAY,UACd,OAAOV,UAAU2C;CAEnB,IAAIjC,YAAY,QACd,OAAOV,UAAU4C;CAEnB,OAAO5C,UAAU6C;AACnB"}
|
package/dist/row/styles.js
CHANGED
|
@@ -17,7 +17,7 @@ const rowStyles = {
|
|
|
17
17
|
},
|
|
18
18
|
disabled: {
|
|
19
19
|
kWkggS: "xjbqb8w",
|
|
20
|
-
kMwMTN: "x1xj74d8",
|
|
20
|
+
kMwMTN: "x1xj74d8 x1bhcspo",
|
|
21
21
|
kkrTdU: "x1h6gzvc",
|
|
22
22
|
kAXs8y: "xr5dkdi",
|
|
23
23
|
$$css: true
|
|
@@ -62,6 +62,7 @@ const rowStyles = {
|
|
|
62
62
|
k63SB2: "x1c52epr",
|
|
63
63
|
kb6lSQ: "x1qn8t5l",
|
|
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\",\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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ACT;CACAoC,MAAM;EACJzB,QAAQ;EACRX,OAAO;CACT;CACAqC,UAAU;EACR7C,QAAQ;EACR6B,QAAQ;EACRC,QAAQ;EACRH,QAAQ;EACRI,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRzB,OAAO;CACT;CACAsC,SAAS;EACPjC,QAAQ;EACRL,OAAO;CACT;CACAuC,gBAAgB;EACdlD,QAAQ;EACRG,QAAQ;EACRW,QAAQ;EACRH,OAAO;CACT;CACAwC,cAAc;EACZnD,QAAQ;EACRG,QAAQ;EACRW,QAAQ;EACRH,OAAO;CACT;CACAyC,cAAc;EACZpD,QAAQ;EACRG,QAAQ;EACRW,QAAQ;EACRH,OAAO;CACT;CACA0C,MAAM;EACJtD,QAAQ;EACRK,QAAQ;EACRkD,OAAO;EACP3C,OAAO;CACT;CACA4C,YAAY;EACVpD,QAAQ;EACR6B,QAAQ;EACRC,QAAQ;EACRH,QAAQ;EACRI,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRzB,OAAO;CACT;CACA6C,mBAAmB;EACjBrD,QAAQ;EACRQ,OAAO;CACT;CACA8C,0BAA0B;EACxBtD,QAAQ;EACRQ,OAAO;CACT;CACA+C,wBAAwB;EACtBvD,QAAQ;EACRQ,OAAO;CACT;CACAgD,wBAAwB;EACtBxD,QAAQ;EACRQ,OAAO;CACT;CACAiD,WAAW;EACT7D,QAAQ;EACRuB,QAAQ;EACRX,OAAO;CACT;CACAkD,SAAS;EACPvC,QAAQ;EACRX,OAAO;CACT;AACF"}
|
package/dist/styles/overlay.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.js","names":["PopoverRenderProps","stylex","colors","motion","radii","shadows","spacing","FORCED_COLORS","fadeIn","scaleIn","overlay","fromBottom","k3nNDw","$$css","fromLeft","fromRight","fromTop","modalBodyRing","kjBf7l","kInvED","k3XXqK","kMeerF","modalDialog","kZKoxP","kB7OPa","k1xSpc","kXwgrk","kAzted","popup","k44tkh","kKVMdj","kyAemX","kWkggS","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kGVxlE","kMwMTN","kORKVm","kZeWKH","popupDialog","kOIVth","scrim","kpwlN0","kVAEAm","origins","bottom","center","left","right","top","OverlayAlign","OverlaySide","placementOf","side","align","const","popupOrigin","placement"],"sources":["../../src/styles/overlay.ts"],"sourcesContent":["import type { PopoverRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, spacing } from '../tokens/design.tokens.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// What every overlay shares, drawn once. Popover's anchored surface and its\n// entry, Sheet's scrim, and the element that carries the dialog role inside\n// each of them; the coverage plan brings a dozen more overlays — Menu, Select,\n// ComboBox, Tooltip, the date pickers, Dialog — and each would otherwise have\n// written the same surface and the same scrim a second time. Geometry stays\n// with the component: how wide a popover is, which edge a sheet is pinned to,\n// where a dialog sits, are each overlay's own decision.\n//\n// Every one of these is portalled to the end of the body, which is why each\n// component takes a `container` prop and documents the same caveat: an app\n// that scopes its StyleX theme to a subtree has to point the portal inside it,\n// or the surface renders outside the theme and falls back to the tokens'\n// `prefers-color-scheme` default.\n//\n// Entry only, and no exit animation, for the same reason in every overlay:\n// React Aria keeps a closing surface mounted only while an animation is\n// running on it, and a popover in particular is dismissed far more often than\n// it is closed deliberately — usually by pressing something else, where a\n// lingering surface is in the way of whatever the press was for.\n\n// The scrim settles before the panel it sits behind arrives: shorter than\n// any panel's entry, so the two do not finish together.\nconst fadeIn = \"x18re5ia-B\";\n\n// An anchored surface grows from the edge it is anchored by rather than from\n// its own centre, which is what makes it read as coming out of the trigger.\n// The origin is a separate style, chosen from the placement React Aria\n// reports, so the same keyframes serve all four sides.\nconst scaleIn = \"x1k48ry3-B\";\nconst overlay = {\n fromBottom: {\n k3nNDw: \"x18ouj0k\",\n $$css: true\n },\n fromLeft: {\n k3nNDw: \"x1nf803f\",\n $$css: true\n },\n fromRight: {\n k3nNDw: \"xyibjs4\",\n $$css: true\n },\n fromTop: {\n k3nNDw: \"x1dp6rp6\",\n $$css: true\n },\n modalBodyRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n modalDialog: {\n kZKoxP: \"x5yr21d\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kAzted: \"x2lwn1j\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n popup: {\n k44tkh: \"xvhm28k x1u6grsq\",\n kKVMdj: \"x97zbip\",\n kyAemX: \"x16dv9tl\",\n kWkggS: \"x1mjdul6\",\n kVAM5u: \"x1w1tqly\",\n kaIpWk: \"x62ce2h\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kGVxlE: \"x1os83gw\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kORKVm: \"x1odjw0f\",\n kZeWKH: \"xish69e\",\n $$css: true\n },\n popupDialog: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x126z3so\",\n $$css: true\n },\n scrim: {\n k44tkh: \"x1vhuh8u\",\n kKVMdj: \"xqcmdr3\",\n kyAemX: \"x1yujl0p\",\n kWkggS: \"x1iqbvzf\",\n kB7OPa: \"x9f619\",\n kpwlN0: \"x10a8y8t\",\n kVAEAm: \"xixxii4\",\n $$css: true\n }\n};\n\n// Which side the surface opened on, and the origin its entry grows from.\n// Keyed on the placement React Aria reports rather than the one asked for,\n// since the surface flips to the opposite side when there is no room on its\n// own; `center` is the placement React Aria reports for an anchor it could\n// not place beside, and grows from the top like the default.\nconst origins = {\n bottom: overlay.fromTop,\n center: overlay.fromTop,\n left: overlay.fromRight,\n right: overlay.fromLeft,\n top: overlay.fromBottom\n};\n\n/** Where along that side it lines up with the anchor. */\ntype OverlayAlign = 'center' | 'end' | 'start';\n\n/** Which side of the anchor a surface opens on. */\ntype OverlaySide = 'bottom' | 'left' | 'right' | 'top';\n\n/**\n * React Aria's placement, from the side and the alignment a call site names.\n * Its own vocabulary pairs a side with `top`/`bottom` on the inline sides and\n * `start`/`end` on the block ones; a call site should not have to know which\n * of the two it is asking for, so this maps one onto the other.\n *\n * Shared by every anchored overlay rather than kept in one, since which side\n * a surface opens on is the same question for a popover, a menu and a\n * tooltip.\n */\nfunction placementOf(side: OverlaySide, align: OverlayAlign) {\n if (align === 'center') {\n return side;\n }\n if (side === 'top' || side === 'bottom') {\n return `${side} ${align}` as const;\n }\n return `${side} ${align === 'start' ? 'top' : 'bottom'}` as const;\n}\n\n/**\n * The origin an anchored surface grows from, for the placement React Aria\n * reports through its render state. `null`, before the surface has been\n * placed, grows from the top as `bottom` does.\n */\nfunction popupOrigin(placement: PopoverRenderProps['placement']) {\n return origins[placement ?? 'bottom'];\n}\nexport type { OverlayAlign, OverlaySide };\nexport { overlay, placementOf, popupOrigin };"],"mappings":";
|
|
1
|
+
{"version":3,"file":"overlay.js","names":["PopoverRenderProps","stylex","colors","motion","radii","shadows","spacing","layers","FORCED_COLORS","fadeIn","scaleIn","overlay","fromBottom","k3nNDw","$$css","fromLeft","fromRight","fromTop","modalBodyRing","kjBf7l","kInvED","k3XXqK","kMeerF","modalDialog","kZKoxP","kB7OPa","k1xSpc","kXwgrk","kAzted","popup","k44tkh","kKVMdj","kyAemX","kWkggS","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kGVxlE","kMwMTN","kORKVm","kZeWKH","popupDialog","kOIVth","scrim","kpwlN0","kVAEAm","kY2c9j","origins","bottom","center","left","right","top","OverlayAlign","OverlaySide","placementOf","side","align","const","popupOrigin","placement"],"sources":["../../src/styles/overlay.ts"],"sourcesContent":["import type { PopoverRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, spacing } from '../tokens/design.tokens.stylex';\nimport './layers.stylex';\nimport { layers } from './layers.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// What every overlay shares, drawn once. Popover's anchored surface and its\n// entry, Sheet's scrim, and the element that carries the dialog role inside\n// each of them; the coverage plan brings a dozen more overlays — Menu, Select,\n// ComboBox, Tooltip, the date pickers, Dialog — and each would otherwise have\n// written the same surface and the same scrim a second time. Geometry stays\n// with the component: how wide a popover is, which edge a sheet is pinned to,\n// where a dialog sits, are each overlay's own decision.\n//\n// Every one of these is portalled to the end of the body, which is why each\n// component takes a `container` prop and documents the same caveat: an app\n// that scopes its StyleX theme to a subtree has to point the portal inside it,\n// or the surface renders outside the theme and falls back to the tokens'\n// `prefers-color-scheme` default.\n//\n// Portalled to the end of the body, an element with no `z-index` paints level\n// with the page's own unlayered content, so a modal's scrim takes a layer\n// from src/styles/layers.stylex.ts, which sets the order every overlay\n// stacks in over the page.\n//\n// Entry only, and no exit animation, for the same reason in every overlay:\n// React Aria keeps a closing surface mounted only while an animation is\n// running on it, and a popover in particular is dismissed far more often than\n// it is closed deliberately — usually by pressing something else, where a\n// lingering surface is in the way of whatever the press was for.\n\n// The scrim settles before the panel it sits behind arrives: shorter than\n// any panel's entry, so the two do not finish together.\nconst fadeIn = \"x18re5ia-B\";\n\n// An anchored surface grows from the edge it is anchored by rather than from\n// its own centre, which is what makes it read as coming out of the trigger.\n// The origin is a separate style, chosen from the placement React Aria\n// reports, so the same keyframes serve all four sides.\nconst scaleIn = \"x1k48ry3-B\";\nconst overlay = {\n fromBottom: {\n k3nNDw: \"x18ouj0k\",\n $$css: true\n },\n fromLeft: {\n k3nNDw: \"x1nf803f\",\n $$css: true\n },\n fromRight: {\n k3nNDw: \"xyibjs4\",\n $$css: true\n },\n fromTop: {\n k3nNDw: \"x1dp6rp6\",\n $$css: true\n },\n modalBodyRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n modalDialog: {\n kZKoxP: \"x5yr21d\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kAzted: \"x2lwn1j\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n popup: {\n k44tkh: \"xvhm28k x1u6grsq\",\n kKVMdj: \"x97zbip\",\n kyAemX: \"x16dv9tl\",\n kWkggS: \"x1mjdul6\",\n kVAM5u: \"x1w1tqly\",\n kaIpWk: \"x62ce2h\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x13rsnn2\",\n kGVxlE: \"x1os83gw\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kORKVm: \"x1odjw0f\",\n kZeWKH: \"xish69e\",\n $$css: true\n },\n popupDialog: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x126z3so\",\n $$css: true\n },\n scrim: {\n k44tkh: \"x1vhuh8u\",\n kKVMdj: \"xqcmdr3\",\n kyAemX: \"x1yujl0p\",\n kWkggS: \"x1iqbvzf\",\n kB7OPa: \"x9f619\",\n kpwlN0: \"x10a8y8t\",\n kVAEAm: \"xixxii4\",\n kY2c9j: \"x125h2g0\",\n $$css: true\n }\n};\n\n// Which side the surface opened on, and the origin its entry grows from.\n// Keyed on the placement React Aria reports rather than the one asked for,\n// since the surface flips to the opposite side when there is no room on its\n// own; `center` is the placement React Aria reports for an anchor it could\n// not place beside, and grows from the top like the default.\nconst origins = {\n bottom: overlay.fromTop,\n center: overlay.fromTop,\n left: overlay.fromRight,\n right: overlay.fromLeft,\n top: overlay.fromBottom\n};\n\n/** Where along that side it lines up with the anchor. */\ntype OverlayAlign = 'center' | 'end' | 'start';\n\n/** Which side of the anchor a surface opens on. */\ntype OverlaySide = 'bottom' | 'left' | 'right' | 'top';\n\n/**\n * React Aria's placement, from the side and the alignment a call site names.\n * Its own vocabulary pairs a side with `top`/`bottom` on the inline sides and\n * `start`/`end` on the block ones; a call site should not have to know which\n * of the two it is asking for, so this maps one onto the other.\n *\n * Shared by every anchored overlay rather than kept in one, since which side\n * a surface opens on is the same question for a popover, a menu and a\n * tooltip.\n */\nfunction placementOf(side: OverlaySide, align: OverlayAlign) {\n if (align === 'center') {\n return side;\n }\n if (side === 'top' || side === 'bottom') {\n return `${side} ${align}` as const;\n }\n return `${side} ${align === 'start' ? 'top' : 'bottom'}` as const;\n}\n\n/**\n * The origin an anchored surface grows from, for the placement React Aria\n * reports through its render state. `null`, before the surface has been\n * placed, grows from the top as `bottom` does.\n */\nfunction popupOrigin(placement: PopoverRenderProps['placement']) {\n return origins[placement ?? 'bottom'];\n}\nexport type { OverlayAlign, OverlaySide };\nexport { overlay, placementOf, popupOrigin };"],"mappings":";AA+CA,MAAMW,UAAU;CACdC,YAAY;EACVC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRF,QAAQ;EACRC,OAAO;CACT;CACAE,WAAW;EACTH,QAAQ;EACRC,OAAO;CACT;CACAG,SAAS;EACPJ,QAAQ;EACRC,OAAO;CACT;CACAI,eAAe;EACbC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRR,OAAO;CACT;CACAS,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRP,OAAO;CACT;CACAe,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRb,QAAQ;EACRc,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACR3B,OAAO;CACT;CACA4B,aAAa;EACXjB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRgB,QAAQ;EACR7B,OAAO;CACT;CACA8B,OAAO;EACLd,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRR,QAAQ;EACRoB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRjC,OAAO;CACT;AACF;AAOA,MAAMkC,UAAU;CACdC,QAAQtC,QAAQM;CAChBiC,QAAQvC,QAAQM;CAChBkC,MAAMxC,QAAQK;CACdoC,OAAOzC,QAAQI;CACfsC,KAAK1C,QAAQC;AACf;;;;;;;;;;;AAkBA,SAAS4C,YAAYC,MAAmBC,OAAqB;CAC3D,IAAIA,UAAU,UACZ,OAAOD;CAET,IAAIA,SAAS,SAASA,SAAS,UAC7B,OAAO,GAAGA,KAAI,GAAIC;CAEpB,OAAO,GAAGD,KAAI,GAAIC,UAAU,UAAU,QAAQ;AAChD;;;;;;AAOA,SAASE,YAAYC,WAA4C;CAC/D,OAAOb,QAAQa,aAAa;AAC9B"}
|
package/dist/styles.css
CHANGED
|
@@ -1213,6 +1213,14 @@
|
|
|
1213
1213
|
box-shadow: inset 0 -1px 0 var(--x7dbk6n);
|
|
1214
1214
|
}
|
|
1215
1215
|
|
|
1216
|
+
.xb0slzl {
|
|
1217
|
+
box-shadow: inset 0 -2px 0 0 var(--x12p1wyw);
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
.xra6ydt {
|
|
1221
|
+
box-shadow: inset 0 -2px 0 0 var(--x1cjupv7);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1216
1224
|
.xbd69nm {
|
|
1217
1225
|
box-shadow: inset 0 0 0 1px var(--x7dbk6n);
|
|
1218
1226
|
}
|
|
@@ -1777,8 +1785,8 @@
|
|
|
1777
1785
|
grid-column-start: 2;
|
|
1778
1786
|
}
|
|
1779
1787
|
|
|
1780
|
-
.
|
|
1781
|
-
grid-template-columns: auto 1fr;
|
|
1788
|
+
.x1rkzygb {
|
|
1789
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
1782
1790
|
}
|
|
1783
1791
|
|
|
1784
1792
|
.x1mkdm3x {
|
|
@@ -2674,10 +2682,14 @@
|
|
|
2674
2682
|
z-index: 1;
|
|
2675
2683
|
}
|
|
2676
2684
|
|
|
2677
|
-
.
|
|
2685
|
+
.x1bk8fjm {
|
|
2678
2686
|
z-index: 1000;
|
|
2679
2687
|
}
|
|
2680
2688
|
|
|
2689
|
+
.x125h2g0 {
|
|
2690
|
+
z-index: 900;
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2681
2693
|
.x1lxxh4i:focus-within {
|
|
2682
2694
|
box-shadow: inset 0 -2px 0 0 var(--x12p1wyw);
|
|
2683
2695
|
}
|
|
@@ -4016,6 +4028,10 @@
|
|
|
4016
4028
|
}
|
|
4017
4029
|
|
|
4018
4030
|
@media (forced-colors: active) {
|
|
4031
|
+
.xszdk7l.xszdk7l {
|
|
4032
|
+
border-bottom-color: canvastext;
|
|
4033
|
+
}
|
|
4034
|
+
|
|
4019
4035
|
.x1fxan2a.x1fxan2a {
|
|
4020
4036
|
border-bottom-color: graytext;
|
|
4021
4037
|
}
|
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",
|