@kanso-labs/kanso-ui 0.45.34 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/button/index.js +13 -9
- package/dist/button/index.js.map +1 -1
- package/dist/calendar/styles.js +12 -7
- package/dist/calendar/styles.js.map +1 -1
- package/dist/chip/styles.js +1 -0
- package/dist/chip/styles.js.map +1 -1
- package/dist/collection/styles.js +1 -1
- package/dist/collection/styles.js.map +1 -1
- package/dist/components/breadcrumbs/index.js +4 -1
- package/dist/components/breadcrumbs/index.js.map +1 -1
- package/dist/components/button-group/index.d.ts +16 -3
- package/dist/components/button-group/index.js +53 -86
- package/dist/components/button-group/index.js.map +1 -1
- package/dist/components/calendar/index.d.ts +3 -3
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/card/index.js +5 -1
- package/dist/components/card/index.js.map +1 -1
- package/dist/components/carousel/index.js +162 -105
- package/dist/components/carousel/index.js.map +1 -1
- package/dist/components/chip/index.d.ts +38 -15
- package/dist/components/chip/index.js +104 -8
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/color-area/index.d.ts +5 -3
- package/dist/components/color-area/index.js +5 -3
- package/dist/components/color-area/index.js.map +1 -1
- package/dist/components/color-picker/index.js +6 -3
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/color-swatch-picker/index.js +24 -9
- package/dist/components/color-swatch-picker/index.js.map +1 -1
- package/dist/components/combo-box/index.d.ts +11 -3
- package/dist/components/combo-box/index.js +66 -62
- package/dist/components/combo-box/index.js.map +1 -1
- package/dist/components/copy-field/index.js +1 -0
- package/dist/components/copy-field/index.js.map +1 -1
- package/dist/components/date-picker/index.d.ts +22 -3
- package/dist/components/date-picker/index.js +234 -45
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/date-range-picker/index.d.ts +3 -1
- package/dist/components/date-range-picker/index.js +6 -4
- package/dist/components/date-range-picker/index.js.map +1 -1
- package/dist/components/disclosure/index.d.ts +4 -3
- package/dist/components/disclosure/index.js +159 -101
- package/dist/components/disclosure/index.js.map +1 -1
- package/dist/components/fab/index.d.ts +3 -1
- package/dist/components/fab/index.js +25 -12
- package/dist/components/fab/index.js.map +1 -1
- package/dist/components/fab-menu/index.js +1 -1
- package/dist/components/fab-menu/index.js.map +1 -1
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/navigation-rail/index.js +4 -4
- package/dist/components/navigation-rail/index.js.map +1 -1
- package/dist/components/navigation-tree/index.js +16 -13
- package/dist/components/navigation-tree/index.js.map +1 -1
- package/dist/components/popover/index.js +35 -33
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/range-calendar/index.js +41 -7
- package/dist/components/range-calendar/index.js.map +1 -1
- package/dist/components/segmented-button/index.d.ts +3 -2
- package/dist/components/segmented-button/index.js +46 -95
- package/dist/components/segmented-button/index.js.map +1 -1
- package/dist/components/select/index.js +5 -2
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/slider/index.js +42 -10
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/time-picker/index.js +2 -0
- package/dist/components/time-picker/index.js.map +1 -1
- package/dist/components/token-field/index.js +89 -66
- package/dist/components/token-field/index.js.map +1 -1
- package/dist/components/toolbar/index.d.ts +4 -0
- package/dist/components/toolbar/index.js +16 -5
- package/dist/components/toolbar/index.js.map +1 -1
- package/dist/components/tree/index.js +1 -1
- package/dist/components/tree/index.js.map +1 -1
- package/dist/fab/styles.js +12 -0
- package/dist/fab/styles.js.map +1 -1
- package/dist/field/styles.js +2 -2
- package/dist/field/styles.js.map +1 -1
- package/dist/hooks/useDockedMonths.js +36 -0
- package/dist/hooks/useDockedMonths.js.map +1 -0
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +34 -0
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/navigation/index.js +5 -5
- package/dist/navigation/index.js.map +1 -1
- package/dist/navigation/styles.js +4 -0
- package/dist/navigation/styles.js.map +1 -1
- package/dist/row/context.js +6 -0
- package/dist/row/context.js.map +1 -0
- package/dist/row/index.js +77 -66
- package/dist/row/index.js.map +1 -1
- package/dist/row/styles.js +15 -0
- package/dist/row/styles.js.map +1 -1
- package/dist/segments/index.js +2 -1
- package/dist/segments/index.js.map +1 -1
- package/dist/segments/styles.js +4 -0
- package/dist/segments/styles.js.map +1 -1
- package/dist/styles/chequer.js +1 -0
- package/dist/styles/chequer.js.map +1 -1
- package/dist/styles/focus.js.map +1 -1
- package/dist/styles.css +158 -35
- package/dist/toggle-group/index.js +133 -0
- package/dist/toggle-group/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -8,18 +8,23 @@ import { SeparatorContext, Toolbar as Toolbar$1 } from "react-aria-components";
|
|
|
8
8
|
// src/components/toolbar/index.tsx
|
|
9
9
|
const styles = {
|
|
10
10
|
base: {
|
|
11
|
-
|
|
11
|
+
kOuLrU: "xfk6m8",
|
|
12
12
|
kaIpWk: "x1dkaolv",
|
|
13
13
|
kB7OPa: "x9f619",
|
|
14
14
|
kMwMTN: "x1w5n3ug",
|
|
15
|
-
k1xSpc: "
|
|
15
|
+
k1xSpc: "xwz0xwf",
|
|
16
16
|
kOIVth: "x126z3so",
|
|
17
|
-
|
|
17
|
+
ks0D6T: "x193iq5w",
|
|
18
18
|
k3XXqK: "x1t137rt",
|
|
19
|
+
kVQacm: "xysyzu8",
|
|
20
|
+
k5wCbM: "x1rohswg",
|
|
19
21
|
$$css: true
|
|
20
22
|
},
|
|
21
23
|
horizontal: {
|
|
22
|
-
|
|
24
|
+
kGNEyG: "x6s0dn4",
|
|
25
|
+
klIVar: "x1mt6kc2",
|
|
26
|
+
kprqdN: "x1mt1orb",
|
|
27
|
+
kjj79g: "xej7fhh",
|
|
23
28
|
kAzted: "x8nclml",
|
|
24
29
|
k8WAf4: "x1cmllll",
|
|
25
30
|
kg3NbH: "x790zyz",
|
|
@@ -30,7 +35,9 @@ const styles = {
|
|
|
30
35
|
$$css: true
|
|
31
36
|
},
|
|
32
37
|
vertical: {
|
|
33
|
-
|
|
38
|
+
kfiyM8: "x1l10kik",
|
|
39
|
+
kprqdN: "x1sdr0u7",
|
|
40
|
+
kAPf3g: "x1o2pa38",
|
|
34
41
|
k7Eaqz: "x4m7ku4",
|
|
35
42
|
k8WAf4: "xp6hjv6",
|
|
36
43
|
kg3NbH: "xn60lsn",
|
|
@@ -70,6 +77,10 @@ const styles = {
|
|
|
70
77
|
*
|
|
71
78
|
* The call site's `className` and `style` land on the container, which is
|
|
72
79
|
* the element a layout positions.
|
|
80
|
+
*
|
|
81
|
+
* Every control keeps its own width. A bar given less room than its controls
|
|
82
|
+
* need — a phone's width, say — stays inside it and scrolls along its length
|
|
83
|
+
* rather than squeezing a control or overflowing the page.
|
|
73
84
|
*/
|
|
74
85
|
function Toolbar(t0) {
|
|
75
86
|
const $ = c(18);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_c","stylex","Toolbar","RACToolbar","SeparatorContext","mergeStatefulStyles","styles","base","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_c","stylex","Toolbar","RACToolbar","SeparatorContext","mergeStatefulStyles","styles","base","kOuLrU","kaIpWk","kB7OPa","kMwMTN","k1xSpc","kOIVth","ks0D6T","k3XXqK","kVQacm","k5wCbM","$$css","horizontal","kGNEyG","klIVar","kprqdN","kjj79g","kAzted","k8WAf4","kg3NbH","neutral","kWkggS","vertical","kfiyM8","kAPf3g","k7Eaqz","vibrant","tone","t0","$","T0","T1","t1","t2","t3","t4","orientation","t5","t6","props","undefined","t7","t8","separator"],"sources":["../../../src/components/toolbar/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ToolbarProps as RACToolbarProps, SeparatorProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useMemo } from 'react';\nimport { Toolbar as RACToolbar, SeparatorContext } from 'react-aria-components';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing } from '../../tokens/design.tokens.stylex';\n\n// The toolbars page's container: a row of frequently used controls, on a\n// surface of its own, with the arrow keys moving between them rather than\n// Tab. The page calls it \"a container with configurable slots\", so nothing\n// here says what goes in one — an icon button, a button, a field or a rule\n// are all the call site's to place.\n//\n// The measurements are the page's, stated there in words: 64dp tall,\n// centred, 8dp between items and 16dp of padding outside them. The two\n// colour schemes are its own too — standard on surface container, vibrant on\n// primary container — and both put the muted content role on what they hold.\n// `tone` spells the standard one `neutral` rather than by the page's name,\n// since that is the word every `tone` in the library uses for its neutral\n// role.\n//\n// Two things are this component's own.\n//\n// **A rule inside it runs across the row, not along it.** React Aria's\n// `Toolbar` sets its orientation on itself and nowhere else, so a\n// `Separator` written among the controls would draw the way it does anywhere\n// else — along the row, where it is invisible. This provides React Aria's\n// separator context with the perpendicular orientation, and `Separator`\n// reads it, so a rule between two controls is correct without the call site\n// saying which way it runs. The context reaches the bar's own controls and\n// stops at an overlay opened from one: React context crosses the portal a\n// popover, sheet or dialog renders through, so their content parts clear it\n// — see `src/overlay` — and a rule inside one runs across the overlay as it\n// does anywhere else.\n//\n// **Arrow-key navigation is React Aria's and is not wrapped.** The arrows\n// move between the controls, and — worth knowing, since the pattern usually\n// implies otherwise — React Aria leaves every control tabbable rather than\n// giving the bar a roving tabindex, so Tab still steps through them one by\n// one. What the bar adds is the toolbar role, which tells a screen reader\n// the controls belong together, and a second way to move between them.\n//\n// One departure, and it is about the shape. The page gives the container's\n// corner as a token its widget draws rather than writes, so there is no\n// value to read: what it states in words is the height, the alignment and\n// the padding, and nothing else. The fully rounded corner here, and the\n// inline box that goes with it, are the library's own choice for a bar that\n// floats over a page rather than docking to its edge — a docked one spans\n// its container and squares its corner, both from the call site.\n\nconst styles = {\n base: {\n kOuLrU: \"xfk6m8\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n k1xSpc: \"xwz0xwf\",\n kOIVth: \"x126z3so\",\n ks0D6T: \"x193iq5w\",\n k3XXqK: \"x1t137rt\",\n kVQacm: \"xysyzu8\",\n k5wCbM: \"x1rohswg\",\n $$css: true\n },\n horizontal: {\n kGNEyG: \"x6s0dn4\",\n klIVar: \"x1mt6kc2\",\n kprqdN: \"x1mt1orb\",\n kjj79g: \"xej7fhh\",\n kAzted: \"x8nclml\",\n k8WAf4: \"x1cmllll\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n neutral: {\n kWkggS: \"x1mjdul6\",\n $$css: true\n },\n vertical: {\n kfiyM8: \"x1l10kik\",\n kprqdN: \"x1sdr0u7\",\n kAPf3g: \"x1o2pa38\",\n k7Eaqz: \"x4m7ku4\",\n k8WAf4: \"xp6hjv6\",\n kg3NbH: \"xn60lsn\",\n $$css: true\n },\n vibrant: {\n kWkggS: \"xp89om9\",\n kMwMTN: \"xscdzaa\",\n $$css: true\n }\n};\ntype ToolbarProps = Omit<RACToolbarProps, 'children' | 'className' | 'style'> & {\n /** The controls, and any rule between them. */\n children?: ReactNode;\n /** A function may compute the class from the toolbar's render state. */\n className?: RACToolbarProps['className'];\n /** A function may compute the style from the toolbar's render state. */\n style?: RACToolbarProps['style'];\n /**\n * Which of the page's two colour schemes the bar takes. `neutral` is the\n * page's standard scheme, the surface container it draws by default;\n * `vibrant` moves it to primary container, for a bar meant to carry the\n * page's accent.\n * @default 'neutral'\n */\n tone?: ToolbarTone;\n};\ntype ToolbarTone = 'neutral' | 'vibrant';\n\n/**\n * A container for a set of controls, announced as a toolbar so a screen\n * reader reads them as one group, with the arrow keys moving between them.\n * Tab still steps through each control: React Aria's toolbar adds the arrows\n * rather than replacing what Tab does.\n *\n * ```tsx\n * <Toolbar aria-label=\"Label\">\n * <IconButton aria-label=\"First item\">\n * <FirstIcon />\n * </IconButton>\n * <Separator />\n * <IconButton aria-label=\"Second item\">\n * <SecondIcon />\n * </IconButton>\n * </Toolbar>\n * ```\n *\n * Name it with `aria-label` or `aria-labelledby` — nothing here labels it for\n * you, and a toolbar with no name is a group a screen reader cannot announce.\n *\n * `orientation` is React Aria's, and it decides both which arrows move and\n * which way the bar runs. A `Separator` among its controls draws across that\n * direction without being told; one inside an overlay opened from the bar\n * draws as it would anywhere else.\n *\n * The call site's `className` and `style` land on the container, which is\n * the element a layout positions.\n *\n * Every control keeps its own width. A bar given less room than its controls\n * need — a phone's width, say — stays inside it and scrolls along its length\n * rather than squeezing a control or overflowing the page.\n */\nfunction Toolbar({\n orientation = 'horizontal',\n tone = 'neutral',\n ...props\n}: RefAttributes<HTMLDivElement> & ToolbarProps) {\n // The rule runs across the toolbar rather than along it. Memoised because\n // a fresh object here would be a new context value on every render, which\n // is what react-perf's no-new-object-as-prop is after.\n const separator = useMemo<SeparatorProps>(() => ({\n orientation: orientation === 'horizontal' ? 'vertical' : 'horizontal'\n }), [orientation]);\n return <SeparatorContext value={separator}>\n <RACToolbar orientation={orientation} {...props} {...mergeStatefulStyles(stylex.props(styles.base, styles[orientation], styles[tone]), props)} />\n </SeparatorContext>;\n}\nexport type { ToolbarProps, ToolbarTone };\nexport default Toolbar;"],"mappings":";;;;;;;;AAsDA,MAAMM,SAAS;CACbC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,YAAY;EACVC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRR,OAAO;CACT;CACAS,SAAS;EACPC,QAAQ;EACRV,OAAO;CACT;CACAW,UAAU;EACRC,QAAQ;EACRR,QAAQ;EACRS,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EAC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QAAAK,IAAA;EAA7IG,KAAA,oBAAC,IAAD;GAAyBD,aAAAA;GAAW,GAAMG;GAAK,GAAML;EAAwF,CAAA;EAAIL,EAAA,KAAAC;EAAAD,EAAA,MAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,QAAAE,MAAAF,EAAA,QAAAM,MAAAN,EAAA,QAAAQ,IAAA;EAD9IC,KAAA,oBAAC,IAAD;GAAyBK,OAAAA;GAC5BN,UAAAA;EADoB,CAAA;EAEHR,EAAA,MAAAE;EAAAF,EAAA,MAAAM;EAAAN,EAAA,MAAAQ;EAAAR,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OAFdS;AAEc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_c","stylex","createContext","useContext","Tree","RACTree","TreeHeader","TreeItem","RACTreeItem","RACTreeLoadMoreItem","TreeSection","RACTreeSection","collectionStyles","containerClasses","rowItemStyles","useRipple","focus","mergeStatefulStyles","mergeStyles","SelectLabelContext","undefined","styles","chevron","kGNEyG","kWkggS","kaIpWk","kMzoRj","kB7OPa","kMwMTN","kkrTdU","k1xSpc","kmuXW","kjj79g","kmVPX3","$$css","indent","kZCmMZ","children","className","leading","supporting","trailing","headline","textValue","label","selectionBehavior","selectLabel","header","chevronClassName","props","ring","chevronFor","state","hasChildItems","isExpanded","itemContent","ripple","isDisabled","isSelected","selectionFor","selectionMode","textValueFor","t0","$","T0","T1","t1","t2","t3","t4","t5","t6","Symbol","for","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","handlers","surface","t7","TreeLoadMore","loading","section","Item","LoadMore","Section","RACButton","RACTreeHeader","RACTreeItemContent"],"sources":["../../../src/components/tree/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { TreeItemProps as RACTreeItemProps, TreeLoadMoreItemProps as RACTreeLoadMoreItemProps, TreeProps as RACTreeProps, TreeItemRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useContext } from 'react';\nimport { Button as RACButton, Tree as RACTree, TreeHeader as RACTreeHeader, TreeItem as RACTreeItem, TreeItemContent as RACTreeItemContent, TreeLoadMoreItem as RACTreeLoadMoreItem, TreeSection as RACTreeSection } from 'react-aria-components';\nimport { CollectionLoadMore } from '../../collection';\nimport { collectionStyles, containerClasses, rowItemStyles } from '../../collection/styles';\nimport { ChevronEndGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { RowContent } from '../../row';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing } from '../../tokens/design.tokens.stylex';\nimport Checkbox from '../checkbox';\n\n// A list whose rows nest. Each row is the row every list here draws —\n// `src/row`, shared with ListItem, ListBox, List and Disclosure — so its\n// 56dp floor, body-large headline, body-medium supporting line, state layers\n// and disabled treatment are that module's, and a tree beside a list cannot\n// drift from it.\n//\n// The lists page gives no nesting: it draws one flat list. So the two things\n// a tree adds beyond that row are the library's own, and both are written\n// here with their reasons. The rest — the row, the selection colours, the\n// checkbox — is the page's, through the shared module.\n//\n// Four things are this component's own.\n//\n// **A level indents by one chevron's width.** React Aria puts the depth on\n// each row as a custom property, so the inset is one `calc` against the\n// row's own inline padding rather than a style per level. 24dp is the size\n// the menus page gives that glyph, which makes a level of nesting exactly as\n// wide as the caret that opens it.\n//\n// **The caret is a button, and React Aria names it.** A `slot=\"chevron\"`\n// button is what expands and collapses; React Aria labels it Expand or\n// Collapse and composes that with the row, so nothing here names it. It is\n// drawn only on a row that has children, since a caret on a leaf says the\n// row opens when it does not.\n//\n// **A selecting tree draws a checkbox, before whatever the row was given.**\n// Same rule as List: React Aria reports the mode on each row, so a tree that\n// toggles draws one without the call site repeating it, and it always sits\n// in the same place so a column of rows reads down.\n//\n// **`TreeItemContent` has no class to style.** React Aria renders it as a\n// `display: contents` gridcell with nothing on it, so the row's own layout\n// is drawn by what goes inside rather than by that wrapper.\n\n// `TreeSection`'s props are not re-exported from the package index, only its\n// component is — so the type is taken off the component rather than imported\n// by a name that is not there to import.\ntype RACTreeSectionProps<T> = Parameters<typeof RACTreeSection<T>>[0];\n\n// What each row's selection checkbox is called. A context rather than a prop\n// on the row, since it is the tree's decision and repeating it per row is\n// how the two drift. Undefined unless the tree is given one, which leaves\n// the name React Aria gives in the reader's locale.\nconst SelectLabelContext = createContext<string | undefined>(undefined);\nconst styles = {\n chevron: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n indent: {\n kZCmMZ: \"x1187sqy\",\n $$css: true\n }\n};\ntype TreeHeaderProps = {\n /** The section's heading. */\n children?: ReactNode;\n};\ntype TreeItemProps<T extends object = object> = Omit<RACTreeItemProps<T>, 'children' | 'className' | 'style' | 'textValue'> & TreeItemText & {\n /** The rows nested under this one, as further `Tree.Item` entries. */\n children?: ReactNode;\n /** A function may compute the class from the row's render state. */\n className?: RACTreeItemProps<T>['className'];\n /** Content before the headline: an avatar, an icon. */\n leading?: ReactNode;\n /** A function may compute the style from the row's render state. */\n style?: RACTreeItemProps<T>['style'];\n /** A second line under the headline, in the muted role. */\n supporting?: ReactNode;\n /** Content after the headline, such as a count or a control. */\n trailing?: ReactNode;\n};\n\n// What the row is worth as text, which React Aria requires: a tree row wraps\n// its headline in elements, so it cannot read one off the children the way a\n// plain-string child would give it. A string headline is taken as the value,\n// which is the common case; anything else has to say what it is worth, and\n// this is what makes the compiler ask rather than leaving a row unnamed.\ntype TreeItemText = {\n /** The row's headline — the one thing it is mostly about. */\n headline: string;\n /** What typeahead matches the row on. Defaults to the headline. */\n textValue?: string;\n} | {\n /** The row's headline, as something other than a plain string. */\n headline?: ReactNode;\n /** What typeahead matches the row on, and what names it. */\n textValue: string;\n};\ntype TreeLoadMoreProps = Omit<RACTreeLoadMoreItemProps, 'children'> & {\n /**\n * What the row says while it is loading. Read by a screen reader; the ring\n * itself carries no text.\n * Left out, it is the word for it in the I18nProvider's locale — \"Loading\n * more\" in English.\n */\n label?: string;\n};\ntype TreeProps<T extends object = object> = {\n /** A function may compute the class from the tree's render state. */\n className?: RACTreeProps<T>['className'];\n /**\n * How a press selects. `toggle` draws a checkbox on every row, and a press\n * adds that row to the selection or takes it out. `replace` draws none, a\n * press makes that row the selection, and the arrow keys carry the\n * selection with the focus; where rows also take an action, a click\n * selects and a double click acts. Left out, a `single` tree replaces and\n * any other toggles, since a single choice drawn as checkboxes unticks one\n * box whenever another is ticked.\n */\n selectionBehavior?: RACTreeProps<T>['selectionBehavior'];\n /**\n * What each row's selection checkbox is called, for a screen reader. The\n * row's own text is what names the row; this names the box inside it.\n * Left out, React Aria names it in the reader's locale — \"Select\" in\n * English.\n */\n selectLabel?: string;\n /** A function may compute the style from the tree's render state. */\n style?: RACTreeProps<T>['style'];\n} & Omit<RACTreeProps<T>, 'className' | 'selectionBehavior' | 'style'>;\ntype TreeSectionProps<T extends object = object> = Omit<RACTreeSectionProps<T>, 'children'> & {\n /**\n * The rows in the section. A section built from data puts React Aria's\n * `Collection` in here rather than a render function, since the header is\n * an element beside them.\n */\n children?: ReactNode;\n /**\n * The section's heading, rendered through React Aria's header so the\n * section is named by it. A section without one is a group with no name.\n */\n header?: ReactNode;\n};\n\n// The button itself never turns — the glyph inside it does, so the press\n// target stays a square whichever way the row is pointing.\nfunction chevronClassName() {\n return stylex.props(styles.chevron, focus.ring).className ?? '';\n}\n\n// The caret, or the space it would have taken. Written as a call rather than\n// inline at the prop, which is what react-perf's no-new-function-as-prop and\n// jsx-no-jsx-as-prop are after; the React Compiler memoises the result on\n// its inputs.\n//\n// A leaf gets the space rather than nothing, so its headline lines up with\n// the headline of a sibling that opens.\nfunction chevronFor(state: TreeItemRenderProps): ReactNode {\n if (!state.hasChildItems) {\n return <span className=\"xxk0z11 x2lah0s xvy4d1p\" />;\n }\n return <RACButton className={chevronClassName} slot=\"chevron\">\n <ChevronEndGlyph {...{\n 0: {\n className: \"x12w9bfk xxk0z11 xvy4d1p xu3v78v x1c071of xkzkux9 x11xpdln xpc4ca7\"\n },\n 1: {\n className: \"x12w9bfk xxk0z11 xvy4d1p xkzkux9 x11xpdln xpc4ca7 xaaet9u x1iffjtl\"\n }\n }[!!state.isExpanded << 0]} />\n </RACButton>;\n}\n\n// What a row draws, from React Aria's render state. The caret comes first,\n// then the selection checkbox, then whatever the row was given — one order,\n// always, which is what keeps a column of rows reading down.\nfunction itemContent(headline: ReactNode, leading: ReactNode, supporting: ReactNode, trailing: ReactNode, selectLabel: string | undefined, ripple: ReactNode) {\n return (state: TreeItemRenderProps): ReactNode => <>\n <RowContent chevron={chevronFor(state)} isDisabled={state.isDisabled} isSelected={state.isSelected} leading={leading} selection={selectionFor(state, selectLabel)} supporting={supporting} trailing={trailing}>\n {headline}\n </RowContent>\n {state.isDisabled ? null : ripple}\n </>;\n}\n\n// StyleX cannot target `[data-selected]` on the element it is styling, so a\n// row's state comes from the render state React Aria hands its className.\n// The order matters: `disabled` is applied last so its ground and colour\n// win over the selected container's. The state layers come from the render\n// state as well — see `focusVisible` in src/row/styles.ts — and React Aria\n// reports none of them on a disabled row, so nothing has to outrank them.\n//\n// A supporting line moves the row from the page's one-line container height\n// to its two-line one, which is a floor rather than something the row's own\n// box arrives at — see `twoLine` in `src/row/styles.ts`. Taken as an\n// argument rather than read from the render state, since React Aria reports\n// what a row is doing and not what it holds; the row is built by a call for\n// the same reason `itemContent` is.\n/**\n * The selection checkbox, while the tree toggles. The row draws it after the\n * caret and ahead of whatever `leading` holds.\n */\nfunction selectionFor(state: TreeItemRenderProps, selectLabel: string | undefined) {\n if (state.selectionBehavior !== 'toggle' || state.selectionMode === 'none') {\n return null;\n }\n return <Checkbox aria-label={selectLabel} slot=\"selection\" />;\n}\n\n// What React Aria matches typeahead on, and what names the row. `TreeItemText`\n// makes one of the two a string, so the last branch is unreachable through the\n// public type — it is there because destructuring the two apart is what loses\n// the narrowing, not because a row can arrive without either.\nfunction textValueFor(textValue: string | undefined, headline: ReactNode) {\n if (textValue !== undefined) {\n return textValue;\n }\n return typeof headline === 'string' ? headline : '';\n}\n\n/**\n * A list whose rows nest. Which rows are open is React Aria's: pass\n * `expandedKeys` with `onExpandedChange` to control it, or\n * `defaultExpandedKeys` to let it keep its own. Selection is React Aria's\n * too — set `selectionMode` to `single` or `multiple`. A `multiple` tree\n * draws a checkbox on every row and a `single` one draws none, as a `List`\n * does; `selectionBehavior` overrides either.\n *\n * ```tsx\n * <Tree aria-label=\"Label\">\n * <Tree.Item headline=\"First item\" id=\"first\">\n * <Tree.Item headline=\"Second item\" id=\"second\" />\n * </Tree.Item>\n * </Tree>\n * ```\n *\n * Each row is the row every list here draws, indented by its depth, with a\n * caret on the rows that have children. Name the tree with `aria-label` or\n * `aria-labelledby` — nothing here labels it for you.\n *\n * The call site's `className` and `style` land on the container, which is\n * the element a layout positions.\n */\nfunction Tree<T extends object>({\n selectionBehavior,\n selectLabel,\n ...props\n}: RefAttributes<HTMLDivElement> & TreeProps<T>) {\n return <SelectLabelContext value={selectLabel}>\n <RACTree<T> {...props} {...mergeStatefulStyles(containerClasses, props)}\n // React Aria's own default is `toggle` in every mode. Read with `??`\n // rather than placed before the spread, so a wrapper forwarding an\n // unset prop still gets the default.\n selectionBehavior={selectionBehavior ?? (props.selectionMode === 'single' ? 'replace' : 'toggle')} />\n </SelectLabelContext>;\n}\n\n/**\n * A named group of rows. `header` names it, and is what a screen reader\n * reads before the rows inside.\n */\nfunction TreeHeader({\n children\n}: TreeHeaderProps) {\n return <RACTreeHeader {...stylex.props(collectionStyles.header)}>\n {children}\n </RACTreeHeader>;\n}\n\n/**\n * One row, and the rows under it. Its slots are the row's: `leading`, the\n * `headline`, `supporting` under it, and `trailing`. Give every row an `id`\n * — that is the key selection and expansion are reported by.\n *\n * Rows nested as `children` are what make it a branch; a row with none is a\n * leaf and draws no caret. `textValue` is what typeahead matches on, and is\n * taken from a plain-string headline when it is not given.\n */\nfunction TreeItem<T extends object = object>({\n children,\n headline,\n leading,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n supporting,\n textValue,\n trailing,\n ...props\n}: RefAttributes<HTMLDivElement> & TreeItemProps<T>) {\n const selectLabel = useContext(SelectLabelContext);\n // The press ripple List's rows draw — see ListItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACTreeItem<T> textValue={textValueFor(textValue, headline)} {...ripple.handlers} {...props} {...mergeStatefulStyles(\n // No overline: a tree row takes the list variant's metrics because it\n // looks like a list row, but it follows its own page, and that page\n // gives a headline and a supporting line. The three-line item belongs\n // to the lists page, which `List.Item` and `ListBox.Item` draw.\n rowItemStyles(supporting, undefined, styles.indent), props)}>\n <RACTreeItemContent>\n {itemContent(headline, leading, supporting, trailing, selectLabel, ripple.surface)}\n </RACTreeItemContent>\n {children}\n </RACTreeItem>;\n}\n\n/**\n * The row the tree shows while it is fetching more. React Aria calls\n * `onLoadMore` when this comes into view, and draws it only while\n * `isLoading`.\n */\nfunction TreeLoadMore({\n label,\n ...props\n}: RefAttributes<HTMLDivElement> & TreeLoadMoreProps) {\n return <RACTreeLoadMoreItem {...props} {...mergeStatefulStyles(stylex.props(collectionStyles.loading), props)}>\n <CollectionLoadMore diameter=\"24px\" label={label} />\n </RACTreeLoadMoreItem>;\n}\n\n/**\n * A named group of rows, with its heading above them.\n */\nfunction TreeSection<T extends object = object>({\n children,\n header,\n ...props\n}: TreeSectionProps<T>) {\n return <RACTreeSection<T> {...props} {...mergeStyles(stylex.props(collectionStyles.section), props)}>\n {header === undefined ? null : <TreeHeader>{header}</TreeHeader>}\n {children}\n </RACTreeSection>;\n}\nTree.Item = TreeItem;\nTree.LoadMore = TreeLoadMore;\nTree.Section = TreeSection;\nexport type { TreeItemProps, TreeLoadMoreProps, TreeProps, TreeSectionProps };\nexport { TreeItem, TreeLoadMore, TreeSection };\nexport default Tree;"],"mappings":";;;;;;;;;;;;;;;AA6DA,MAAMmB,qBAAqBjB,cAAkCkB,KAAAA,CAAS;AACtE,MAAMC,SAAS;CACbC,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,QAAQ;EACNC,QAAQ;EACRF,OAAO;CACT;AACF;AAoFA,SAASc,mBAAmB;CAC1B,OAAO/C,MAAaoB,OAAOC,SAASN,MAAMkC,IAAI,CAAC,CAACZ,aAAa;AAC/D;AASA,SAASa,WAAWC,OAAuC;CACzD,IAAI,CAACA,MAAMC,eACT,OAAO,oBAAC,QAAD,EAAM,WAAU,0BAAyB,CAAA;CAElD,OAAO,oBAACmC,QAAD;EAAW,WAAWxC;EAAkB,MAAK;EAChD,UAAA,oBAAC,iBAAD,EAAiB,GAAI;GACrB,GAAG,EACDV,WAAW,qEACb;GACA,GAAG,EACDA,WAAW,qEACb;EACF,EAAE,CAAC,CAACc,MAAME,cAAc,GAAG,CAAA;CAChB,CAAA;AACf;AAKA,SAASC,YAAYb,UAAqBH,SAAoBC,YAAuBC,UAAqBK,aAAiCU,QAAmB;CAC5J,QAAQJ,UAA0C,qBAAA,YAAA,EAAA,UAAA,CAC9C,oBAAC,YAAD;EAAY,SAASD,WAAWC,KAAK;EAAG,YAAYA,MAAMK;EAA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AA;EAC9FqB,KAAArB,WAAW3B,KAAAA,IAAX,OAA8B,oBAAC,YAAD,EAAA,UAAa2B,OAAF,CAAA;EAAsBgB,EAAA,KAAAhB;EAAAgB,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,IAAAM;CAAA,IAAAN,EAAA,OAAAC,MAAAD,EAAA,OAAA1B,YAAA0B,EAAA,QAAAG,MAAAH,EAAA,QAAAI,MAAAJ,EAAA,QAAAK,IAAA;EAD7DC,KAAA,qBAAC,IAAD;GAAe,GAAQpB;GAAK,GAAMkB;GAAlC,UAAA,CACFC,IACA/B,QAFiB;;EAGH0B,EAAA,KAAAC;EAAAD,EAAA,KAAA1B;EAAA0B,EAAA,MAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAHZM;AAGY;AAErBjE,KAAKiF,OAAO9E;AACZH,KAAKkF,WAAWJ;AAChB9E,KAAKmF,UAAU7E"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_c","stylex","createContext","useContext","Tree","RACTree","TreeHeader","TreeItem","RACTreeItem","RACTreeLoadMoreItem","TreeSection","RACTreeSection","collectionStyles","containerClasses","rowItemStyles","useRipple","focus","mergeStatefulStyles","mergeStyles","SelectLabelContext","undefined","styles","chevron","kGNEyG","kWkggS","kaIpWk","kMzoRj","kB7OPa","kMwMTN","kkrTdU","k1xSpc","kmuXW","kjj79g","kmVPX3","$$css","indent","kZCmMZ","children","className","leading","supporting","trailing","headline","textValue","label","selectionBehavior","selectLabel","header","chevronClassName","props","ring","chevronFor","state","hasChildItems","isExpanded","itemContent","ripple","isDisabled","isSelected","selectionFor","selectionMode","textValueFor","t0","$","T0","T1","t1","t2","t3","t4","t5","t6","Symbol","for","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","handlers","surface","t7","TreeLoadMore","loading","section","Item","LoadMore","Section","RACButton","RACTreeHeader","RACTreeItemContent"],"sources":["../../../src/components/tree/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { TreeItemProps as RACTreeItemProps, TreeLoadMoreItemProps as RACTreeLoadMoreItemProps, TreeProps as RACTreeProps, TreeItemRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useContext } from 'react';\nimport { Button as RACButton, Tree as RACTree, TreeHeader as RACTreeHeader, TreeItem as RACTreeItem, TreeItemContent as RACTreeItemContent, TreeLoadMoreItem as RACTreeLoadMoreItem, TreeSection as RACTreeSection } from 'react-aria-components';\nimport { CollectionLoadMore } from '../../collection';\nimport { collectionStyles, containerClasses, rowItemStyles } from '../../collection/styles';\nimport { ChevronEndGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { RowContent } from '../../row';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing } from '../../tokens/design.tokens.stylex';\nimport Checkbox from '../checkbox';\n\n// A list whose rows nest. Each row is the row every list here draws —\n// `src/row`, shared with ListItem, ListBox, List and Disclosure — so its\n// 56dp floor, body-large headline, body-medium supporting line, state layers\n// and disabled treatment are that module's, and a tree beside a list cannot\n// drift from it.\n//\n// The lists page gives no nesting: it draws one flat list. So the two things\n// a tree adds beyond that row are the library's own, and both are written\n// here with their reasons. The rest — the row, the selection colours, the\n// checkbox — is the page's, through the shared module.\n//\n// Four things are this component's own.\n//\n// **A level indents by one chevron's width.** React Aria puts the depth on\n// each row as a custom property, so the inset is one `calc` against the\n// row's own inline padding rather than a style per level. 24dp is the size\n// the menus page gives that glyph, which makes a level of nesting exactly as\n// wide as the caret that opens it.\n//\n// **The caret is a button, and React Aria names it.** A `slot=\"chevron\"`\n// button is what expands and collapses; React Aria labels it Expand or\n// Collapse and composes that with the row, so nothing here names it. It is\n// drawn only on a row that has children, since a caret on a leaf says the\n// row opens when it does not.\n//\n// **A selecting tree draws a checkbox, before whatever the row was given.**\n// Same rule as List: React Aria reports the mode on each row, so a tree that\n// toggles draws one without the call site repeating it, and it always sits\n// in the same place so a column of rows reads down.\n//\n// **`TreeItemContent` has no class to style.** React Aria renders it as a\n// `display: contents` gridcell with nothing on it, so the row's own layout\n// is drawn by what goes inside rather than by that wrapper.\n\n// `TreeSection`'s props are not re-exported from the package index, only its\n// component is — so the type is taken off the component rather than imported\n// by a name that is not there to import.\ntype RACTreeSectionProps<T> = Parameters<typeof RACTreeSection<T>>[0];\n\n// What each row's selection checkbox is called. A context rather than a prop\n// on the row, since it is the tree's decision and repeating it per row is\n// how the two drift. Undefined unless the tree is given one, which leaves\n// the name React Aria gives in the reader's locale.\nconst SelectLabelContext = createContext<string | undefined>(undefined);\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 styles = {\n chevron: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug x1xt8qih\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n indent: {\n kZCmMZ: \"x1187sqy\",\n $$css: true\n }\n};\ntype TreeHeaderProps = {\n /** The section's heading. */\n children?: ReactNode;\n};\ntype TreeItemProps<T extends object = object> = Omit<RACTreeItemProps<T>, 'children' | 'className' | 'style' | 'textValue'> & TreeItemText & {\n /** The rows nested under this one, as further `Tree.Item` entries. */\n children?: ReactNode;\n /** A function may compute the class from the row's render state. */\n className?: RACTreeItemProps<T>['className'];\n /** Content before the headline: an avatar, an icon. */\n leading?: ReactNode;\n /** A function may compute the style from the row's render state. */\n style?: RACTreeItemProps<T>['style'];\n /** A second line under the headline, in the muted role. */\n supporting?: ReactNode;\n /** Content after the headline, such as a count or a control. */\n trailing?: ReactNode;\n};\n\n// What the row is worth as text, which React Aria requires: a tree row wraps\n// its headline in elements, so it cannot read one off the children the way a\n// plain-string child would give it. A string headline is taken as the value,\n// which is the common case; anything else has to say what it is worth, and\n// this is what makes the compiler ask rather than leaving a row unnamed.\ntype TreeItemText = {\n /** The row's headline — the one thing it is mostly about. */\n headline: string;\n /** What typeahead matches the row on. Defaults to the headline. */\n textValue?: string;\n} | {\n /** The row's headline, as something other than a plain string. */\n headline?: ReactNode;\n /** What typeahead matches the row on, and what names it. */\n textValue: string;\n};\ntype TreeLoadMoreProps = Omit<RACTreeLoadMoreItemProps, 'children'> & {\n /**\n * What the row says while it is loading. Read by a screen reader; the ring\n * itself carries no text.\n * Left out, it is the word for it in the I18nProvider's locale — \"Loading\n * more\" in English.\n */\n label?: string;\n};\ntype TreeProps<T extends object = object> = {\n /** A function may compute the class from the tree's render state. */\n className?: RACTreeProps<T>['className'];\n /**\n * How a press selects. `toggle` draws a checkbox on every row, and a press\n * adds that row to the selection or takes it out. `replace` draws none, a\n * press makes that row the selection, and the arrow keys carry the\n * selection with the focus; where rows also take an action, a click\n * selects and a double click acts. Left out, a `single` tree replaces and\n * any other toggles, since a single choice drawn as checkboxes unticks one\n * box whenever another is ticked.\n */\n selectionBehavior?: RACTreeProps<T>['selectionBehavior'];\n /**\n * What each row's selection checkbox is called, for a screen reader. The\n * row's own text is what names the row; this names the box inside it.\n * Left out, React Aria names it in the reader's locale — \"Select\" in\n * English.\n */\n selectLabel?: string;\n /** A function may compute the style from the tree's render state. */\n style?: RACTreeProps<T>['style'];\n} & Omit<RACTreeProps<T>, 'className' | 'selectionBehavior' | 'style'>;\ntype TreeSectionProps<T extends object = object> = Omit<RACTreeSectionProps<T>, 'children'> & {\n /**\n * The rows in the section. A section built from data puts React Aria's\n * `Collection` in here rather than a render function, since the header is\n * an element beside them.\n */\n children?: ReactNode;\n /**\n * The section's heading, rendered through React Aria's header so the\n * section is named by it. A section without one is a group with no name.\n */\n header?: ReactNode;\n};\n\n// The button itself never turns — the glyph inside it does, so the press\n// target stays a square whichever way the row is pointing.\nfunction chevronClassName() {\n return stylex.props(styles.chevron, focus.ring).className ?? '';\n}\n\n// The caret, or the space it would have taken. Written as a call rather than\n// inline at the prop, which is what react-perf's no-new-function-as-prop and\n// jsx-no-jsx-as-prop are after; the React Compiler memoises the result on\n// its inputs.\n//\n// A leaf gets the space rather than nothing, so its headline lines up with\n// the headline of a sibling that opens.\nfunction chevronFor(state: TreeItemRenderProps): ReactNode {\n if (!state.hasChildItems) {\n return <span className=\"xxk0z11 x2lah0s xvy4d1p\" />;\n }\n return <RACButton className={chevronClassName} slot=\"chevron\">\n <ChevronEndGlyph {...{\n 0: {\n className: \"x12w9bfk xxk0z11 xvy4d1p xu3v78v x1c071of xkzkux9 x11xpdln xpc4ca7\"\n },\n 1: {\n className: \"x12w9bfk xxk0z11 xvy4d1p xkzkux9 x11xpdln xpc4ca7 xaaet9u x1iffjtl\"\n }\n }[!!state.isExpanded << 0]} />\n </RACButton>;\n}\n\n// What a row draws, from React Aria's render state. The caret comes first,\n// then the selection checkbox, then whatever the row was given — one order,\n// always, which is what keeps a column of rows reading down.\nfunction itemContent(headline: ReactNode, leading: ReactNode, supporting: ReactNode, trailing: ReactNode, selectLabel: string | undefined, ripple: ReactNode) {\n return (state: TreeItemRenderProps): ReactNode => <>\n <RowContent chevron={chevronFor(state)} isDisabled={state.isDisabled} isSelected={state.isSelected} leading={leading} selection={selectionFor(state, selectLabel)} supporting={supporting} trailing={trailing}>\n {headline}\n </RowContent>\n {state.isDisabled ? null : ripple}\n </>;\n}\n\n// StyleX cannot target `[data-selected]` on the element it is styling, so a\n// row's state comes from the render state React Aria hands its className.\n// The order matters: `disabled` is applied last so its ground and colour\n// win over the selected container's. The state layers come from the render\n// state as well — see `focusVisible` in src/row/styles.ts — and React Aria\n// reports none of them on a disabled row, so nothing has to outrank them.\n//\n// A supporting line moves the row from the page's one-line container height\n// to its two-line one, which is a floor rather than something the row's own\n// box arrives at — see `twoLine` in `src/row/styles.ts`. Taken as an\n// argument rather than read from the render state, since React Aria reports\n// what a row is doing and not what it holds; the row is built by a call for\n// the same reason `itemContent` is.\n/**\n * The selection checkbox, while the tree toggles. The row draws it after the\n * caret and ahead of whatever `leading` holds.\n */\nfunction selectionFor(state: TreeItemRenderProps, selectLabel: string | undefined) {\n if (state.selectionBehavior !== 'toggle' || state.selectionMode === 'none') {\n return null;\n }\n return <Checkbox aria-label={selectLabel} slot=\"selection\" />;\n}\n\n// What React Aria matches typeahead on, and what names the row. `TreeItemText`\n// makes one of the two a string, so the last branch is unreachable through the\n// public type — it is there because destructuring the two apart is what loses\n// the narrowing, not because a row can arrive without either.\nfunction textValueFor(textValue: string | undefined, headline: ReactNode) {\n if (textValue !== undefined) {\n return textValue;\n }\n return typeof headline === 'string' ? headline : '';\n}\n\n/**\n * A list whose rows nest. Which rows are open is React Aria's: pass\n * `expandedKeys` with `onExpandedChange` to control it, or\n * `defaultExpandedKeys` to let it keep its own. Selection is React Aria's\n * too — set `selectionMode` to `single` or `multiple`. A `multiple` tree\n * draws a checkbox on every row and a `single` one draws none, as a `List`\n * does; `selectionBehavior` overrides either.\n *\n * ```tsx\n * <Tree aria-label=\"Label\">\n * <Tree.Item headline=\"First item\" id=\"first\">\n * <Tree.Item headline=\"Second item\" id=\"second\" />\n * </Tree.Item>\n * </Tree>\n * ```\n *\n * Each row is the row every list here draws, indented by its depth, with a\n * caret on the rows that have children. Name the tree with `aria-label` or\n * `aria-labelledby` — nothing here labels it for you.\n *\n * The call site's `className` and `style` land on the container, which is\n * the element a layout positions.\n */\nfunction Tree<T extends object>({\n selectionBehavior,\n selectLabel,\n ...props\n}: RefAttributes<HTMLDivElement> & TreeProps<T>) {\n return <SelectLabelContext value={selectLabel}>\n <RACTree<T> {...props} {...mergeStatefulStyles(containerClasses, props)}\n // React Aria's own default is `toggle` in every mode. Read with `??`\n // rather than placed before the spread, so a wrapper forwarding an\n // unset prop still gets the default.\n selectionBehavior={selectionBehavior ?? (props.selectionMode === 'single' ? 'replace' : 'toggle')} />\n </SelectLabelContext>;\n}\n\n/**\n * A named group of rows. `header` names it, and is what a screen reader\n * reads before the rows inside.\n */\nfunction TreeHeader({\n children\n}: TreeHeaderProps) {\n return <RACTreeHeader {...stylex.props(collectionStyles.header)}>\n {children}\n </RACTreeHeader>;\n}\n\n/**\n * One row, and the rows under it. Its slots are the row's: `leading`, the\n * `headline`, `supporting` under it, and `trailing`. Give every row an `id`\n * — that is the key selection and expansion are reported by.\n *\n * Rows nested as `children` are what make it a branch; a row with none is a\n * leaf and draws no caret. `textValue` is what typeahead matches on, and is\n * taken from a plain-string headline when it is not given.\n */\nfunction TreeItem<T extends object = object>({\n children,\n headline,\n leading,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n supporting,\n textValue,\n trailing,\n ...props\n}: RefAttributes<HTMLDivElement> & TreeItemProps<T>) {\n const selectLabel = useContext(SelectLabelContext);\n // The press ripple List's rows draw — see ListItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACTreeItem<T> textValue={textValueFor(textValue, headline)} {...ripple.handlers} {...props} {...mergeStatefulStyles(\n // No overline: a tree row takes the list variant's metrics because it\n // looks like a list row, but it follows its own page, and that page\n // gives a headline and a supporting line. The three-line item belongs\n // to the lists page, which `List.Item` and `ListBox.Item` draw.\n rowItemStyles(supporting, undefined, styles.indent), props)}>\n <RACTreeItemContent>\n {itemContent(headline, leading, supporting, trailing, selectLabel, ripple.surface)}\n </RACTreeItemContent>\n {children}\n </RACTreeItem>;\n}\n\n/**\n * The row the tree shows while it is fetching more. React Aria calls\n * `onLoadMore` when this comes into view, and draws it only while\n * `isLoading`.\n */\nfunction TreeLoadMore({\n label,\n ...props\n}: RefAttributes<HTMLDivElement> & TreeLoadMoreProps) {\n return <RACTreeLoadMoreItem {...props} {...mergeStatefulStyles(stylex.props(collectionStyles.loading), props)}>\n <CollectionLoadMore diameter=\"24px\" label={label} />\n </RACTreeLoadMoreItem>;\n}\n\n/**\n * A named group of rows, with its heading above them.\n */\nfunction TreeSection<T extends object = object>({\n children,\n header,\n ...props\n}: TreeSectionProps<T>) {\n return <RACTreeSection<T> {...props} {...mergeStyles(stylex.props(collectionStyles.section), props)}>\n {header === undefined ? null : <TreeHeader>{header}</TreeHeader>}\n {children}\n </RACTreeSection>;\n}\nTree.Item = TreeItem;\nTree.LoadMore = TreeLoadMore;\nTree.Section = TreeSection;\nexport type { TreeItemProps, TreeLoadMoreProps, TreeProps, TreeSectionProps };\nexport { TreeItem, TreeLoadMore, TreeSection };\nexport default Tree;"],"mappings":";;;;;;;;;;;;;;;AA6DA,MAAMmB,qBAAqBjB,cAAkCkB,KAAAA,CAAS;AAOtE,MAAMC,SAAS;CACbC,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,QAAQ;EACNC,QAAQ;EACRF,OAAO;CACT;AACF;AAoFA,SAASc,mBAAmB;CAC1B,OAAO/C,MAAaoB,OAAOC,SAASN,MAAMkC,IAAI,CAAC,CAACZ,aAAa;AAC/D;AASA,SAASa,WAAWC,OAAuC;CACzD,IAAI,CAACA,MAAMC,eACT,OAAO,oBAAC,QAAD,EAAM,WAAU,0BAAyB,CAAA;CAElD,OAAO,oBAACmC,QAAD;EAAW,WAAWxC;EAAkB,MAAK;EAChD,UAAA,oBAAC,iBAAD,EAAiB,GAAI;GACrB,GAAG,EACDV,WAAW,qEACb;GACA,GAAG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EAAA,KAAAC;EAAAD,EAAA,KAAA1B;EAAA0B,EAAA,KAAAhB;EAAAgB,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAA;EAAAH,KAAAD,EAAA;EAAA1B,WAAA0B,EAAA;EAAAhB,SAAAgB,EAAA;EAAAG,KAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAhB,QAAA;EAC9FqB,KAAArB,WAAW3B,KAAAA,IAAX,OAA8B,oBAAC,YAAD,EAAA,UAAa2B,OAAF,CAAA;EAAsBgB,EAAA,KAAAhB;EAAAgB,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,IAAAM;CAAA,IAAAN,EAAA,OAAAC,MAAAD,EAAA,OAAA1B,YAAA0B,EAAA,QAAAG,MAAAH,EAAA,QAAAI,MAAAJ,EAAA,QAAAK,IAAA;EAD7DC,KAAA,qBAAC,IAAD;GAAe,GAAQpB;GAAK,GAAMkB;GAAlC,UAAA,CACFC,IACA/B,QAFiB;;EAGH0B,EAAA,KAAAC;EAAAD,EAAA,KAAA1B;EAAA0B,EAAA,MAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAHZM;AAGY;AAErBjE,KAAKiF,OAAO9E;AACZH,KAAKkF,WAAWJ;AAChB9E,KAAKmF,UAAU7E"}
|
package/dist/fab/styles.js
CHANGED
|
@@ -25,6 +25,10 @@ const fabStyles = {
|
|
|
25
25
|
kkrTdU: "x1h6gzvc",
|
|
26
26
|
$$css: true
|
|
27
27
|
},
|
|
28
|
+
extended: {
|
|
29
|
+
ks0D6T: "x193iq5w",
|
|
30
|
+
$$css: true
|
|
31
|
+
},
|
|
28
32
|
focused: {
|
|
29
33
|
kKwaWg: "x17vw94z",
|
|
30
34
|
$$css: true
|
|
@@ -41,6 +45,14 @@ const fabStyles = {
|
|
|
41
45
|
kjj79g: "xl56j7k",
|
|
42
46
|
$$css: true
|
|
43
47
|
},
|
|
48
|
+
label: {
|
|
49
|
+
k7Eaqz: "xeuugli",
|
|
50
|
+
kXHlph: "x101abm8",
|
|
51
|
+
kORKVm: "xryxfnj",
|
|
52
|
+
kg5iWk: "xlyipyv",
|
|
53
|
+
khDVqt: "xuxw1ft",
|
|
54
|
+
$$css: true
|
|
55
|
+
},
|
|
44
56
|
pressed: {
|
|
45
57
|
kKwaWg: "xdiex0u",
|
|
46
58
|
kGVxlE: "x1udv5rz",
|
package/dist/fab/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["fabStyles","base","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kGVxlE","kB7OPa","kkrTdU","k1xSpc","kmuXW","kjj79g","kmVPX3","kVAEAm","kybGjl","$$css","disabled","kWkggS","kKwaWg","kMwMTN","focused","hovered","icon","pressed","fabSizes","lg","kZKoxP","kaIpWk","kzqmXN","md","xl","extendedFabSizes","kMv6JI","kGuDYH","k63SB2","kOIVth","kb6lSQ","kLWn49","kg3NbH","fabIconSizes","tonal","primary","secondary","tertiary","filled","fabTones"],"sources":["../../src/fab/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 FAB's styles, shared by Fab and by the FAB that opens FabMenu, which is\n// the same button until its menu opens. Apart from either component, and\n// outside `src/components`, for the reason src/row gives. See Fab's header\n// for the values and where they come from.\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 medium FAB's container and corner, between the steps of the control\n// and radius scales.\nconst MEDIUM_SIZE = '80px';\nconst MEDIUM_CORNER = '20px';\nconst fabStyles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1ylmb6m\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kGVxlE: \"x1udv5rz\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n kmVPX3: \"x1717udv\",\n kVAEAm: \"x1n2onr6\",\n kybGjl: \"x1hl2dhg\",\n $$css: true\n },\n disabled: {\n kWkggS: \"xepofeg\",\n kKwaWg: \"x18o3ruo\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n focused: {\n kKwaWg: \"x17vw94z\",\n $$css: true\n },\n hovered: {\n kKwaWg: \"xbmfk57\",\n kGVxlE: \"x4r79n0\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n pressed: {\n kKwaWg: \"xdiex0u\",\n kGVxlE: \"x1udv5rz\",\n $$css: true\n }\n};\n\n// The FAB on its own: a square of the size's edge, at its corner.\nconst fabSizes = {\n lg: {\n kZKoxP: \"xwzfr38\",\n kaIpWk: \"x1m3ak92\",\n kzqmXN: \"x1dmp6jm\",\n $$css: true\n },\n md: {\n kZKoxP: \"xs1ryiz\",\n kaIpWk: \"xhpdng0\",\n kzqmXN: \"x1fh0d6s\",\n $$css: true\n },\n xl: {\n kZKoxP: \"x1xaimp3\",\n kaIpWk: \"x19pkqky\",\n kzqmXN: \"xszbqgh\",\n $$css: true\n }\n};\n\n// The extended form: the size's height and corner, with its padding, the gap\n// before the label and the label's type role.\nconst extendedFabSizes = {\n lg: {\n kZKoxP: \"xwzfr38\",\n kaIpWk: \"x1m3ak92\",\n kMv6JI: \"xdy5w5q\",\n kGuDYH: \"xete2z3\",\n k63SB2: \"x14ijtet\",\n kOIVth: \"x1gka490\",\n kb6lSQ: \"xug9e1u\",\n kLWn49: \"x2divse\",\n kg3NbH: \"xr244g7\",\n $$css: true\n },\n md: {\n kZKoxP: \"xs1ryiz\",\n kaIpWk: \"xhpdng0\",\n kMv6JI: \"x46eyla\",\n kGuDYH: \"x5ehqhr\",\n k63SB2: \"xrf6cl6\",\n kOIVth: \"x126z3so\",\n kb6lSQ: \"x1g135zh\",\n kLWn49: \"x1ggk5va\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n xl: {\n kZKoxP: \"x1xaimp3\",\n kaIpWk: \"x19pkqky\",\n kMv6JI: \"x1fz0g89\",\n kGuDYH: \"xkb6epg\",\n k63SB2: \"x76yrz5\",\n kOIVth: \"xxj4525\",\n kb6lSQ: \"x1s1qhaa\",\n kLWn49: \"x1voeury\",\n kg3NbH: \"x1pbfunf\",\n $$css: true\n }\n};\n\n// The icon each size draws.\nconst fabIconSizes = {\n lg: {\n kGuDYH: \"xneq65o\",\n $$css: true\n },\n md: {\n kGuDYH: \"x1pvqxga\",\n $$css: true\n },\n xl: {\n kGuDYH: \"xqozcyj\",\n $$css: true\n }\n};\n\n// The six colour pairs: each tone's container pair, and the tone itself.\nconst tonal = {\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 tertiary: {\n kWkggS: \"xs6yvni\",\n kMwMTN: \"x3cbcwg\",\n $$css: true\n }\n};\nconst filled = {\n primary: {\n kWkggS: \"xnety89\",\n kMwMTN: \"xwjo7ld\",\n $$css: true\n },\n secondary: {\n kWkggS: \"x167r6xl\",\n kMwMTN: \"x1lba3jz\",\n $$css: true\n },\n tertiary: {\n kWkggS: \"x14t7u9f\",\n kMwMTN: \"x1007ibn\",\n $$css: true\n }\n};\nconst fabTones = {\n filled,\n tonal\n};\nexport { extendedFabSizes, fabIconSizes, fabSizes, fabStyles, fabTones };"],"mappings":";AAmBA,MAAMA,YAAY;CAChBC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRC,QAAQ;EACRC,QAAQ;EACRf,QAAQ;EACRG,QAAQ;EACRa,QAAQ;EACRX,QAAQ;EACRO,OAAO;CACT;CACAK,SAAS;
|
|
1
|
+
{"version":3,"file":"styles.js","names":["fabStyles","base","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kGVxlE","kB7OPa","kkrTdU","k1xSpc","kmuXW","kjj79g","kmVPX3","kVAEAm","kybGjl","$$css","disabled","kWkggS","kKwaWg","kMwMTN","extended","ks0D6T","focused","hovered","icon","label","k7Eaqz","kXHlph","kORKVm","kg5iWk","khDVqt","pressed","fabSizes","lg","kZKoxP","kaIpWk","kzqmXN","md","xl","extendedFabSizes","kMv6JI","kGuDYH","k63SB2","kOIVth","kb6lSQ","kLWn49","kg3NbH","fabIconSizes","tonal","primary","secondary","tertiary","filled","fabTones"],"sources":["../../src/fab/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 FAB's styles, shared by Fab and by the FAB that opens FabMenu, which is\n// the same button until its menu opens. Apart from either component, and\n// outside `src/components`, for the reason src/row gives. See Fab's header\n// for the values and where they come from.\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 medium FAB's container and corner, between the steps of the control\n// and radius scales.\nconst MEDIUM_SIZE = '80px';\nconst MEDIUM_CORNER = '20px';\nconst fabStyles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1ylmb6m\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kGVxlE: \"x1udv5rz\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n kmVPX3: \"x1717udv\",\n kVAEAm: \"x1n2onr6\",\n kybGjl: \"x1hl2dhg\",\n $$css: true\n },\n disabled: {\n kWkggS: \"xepofeg\",\n kKwaWg: \"x18o3ruo\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n extended: {\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n focused: {\n kKwaWg: \"x17vw94z\",\n $$css: true\n },\n hovered: {\n kKwaWg: \"xbmfk57\",\n kGVxlE: \"x4r79n0\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n label: {\n k7Eaqz: \"xeuugli\",\n kXHlph: \"x101abm8\",\n kORKVm: \"xryxfnj\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n pressed: {\n kKwaWg: \"xdiex0u\",\n kGVxlE: \"x1udv5rz\",\n $$css: true\n }\n};\n\n// The FAB on its own: a square of the size's edge, at its corner.\nconst fabSizes = {\n lg: {\n kZKoxP: \"xwzfr38\",\n kaIpWk: \"x1m3ak92\",\n kzqmXN: \"x1dmp6jm\",\n $$css: true\n },\n md: {\n kZKoxP: \"xs1ryiz\",\n kaIpWk: \"xhpdng0\",\n kzqmXN: \"x1fh0d6s\",\n $$css: true\n },\n xl: {\n kZKoxP: \"x1xaimp3\",\n kaIpWk: \"x19pkqky\",\n kzqmXN: \"xszbqgh\",\n $$css: true\n }\n};\n\n// The extended form: the size's height and corner, with its padding, the gap\n// before the label and the label's type role.\nconst extendedFabSizes = {\n lg: {\n kZKoxP: \"xwzfr38\",\n kaIpWk: \"x1m3ak92\",\n kMv6JI: \"xdy5w5q\",\n kGuDYH: \"xete2z3\",\n k63SB2: \"x14ijtet\",\n kOIVth: \"x1gka490\",\n kb6lSQ: \"xug9e1u\",\n kLWn49: \"x2divse\",\n kg3NbH: \"xr244g7\",\n $$css: true\n },\n md: {\n kZKoxP: \"xs1ryiz\",\n kaIpWk: \"xhpdng0\",\n kMv6JI: \"x46eyla\",\n kGuDYH: \"x5ehqhr\",\n k63SB2: \"xrf6cl6\",\n kOIVth: \"x126z3so\",\n kb6lSQ: \"x1g135zh\",\n kLWn49: \"x1ggk5va\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n xl: {\n kZKoxP: \"x1xaimp3\",\n kaIpWk: \"x19pkqky\",\n kMv6JI: \"x1fz0g89\",\n kGuDYH: \"xkb6epg\",\n k63SB2: \"x76yrz5\",\n kOIVth: \"xxj4525\",\n kb6lSQ: \"x1s1qhaa\",\n kLWn49: \"x1voeury\",\n kg3NbH: \"x1pbfunf\",\n $$css: true\n }\n};\n\n// The icon each size draws.\nconst fabIconSizes = {\n lg: {\n kGuDYH: \"xneq65o\",\n $$css: true\n },\n md: {\n kGuDYH: \"x1pvqxga\",\n $$css: true\n },\n xl: {\n kGuDYH: \"xqozcyj\",\n $$css: true\n }\n};\n\n// The six colour pairs: each tone's container pair, and the tone itself.\nconst tonal = {\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 tertiary: {\n kWkggS: \"xs6yvni\",\n kMwMTN: \"x3cbcwg\",\n $$css: true\n }\n};\nconst filled = {\n primary: {\n kWkggS: \"xnety89\",\n kMwMTN: \"xwjo7ld\",\n $$css: true\n },\n secondary: {\n kWkggS: \"x167r6xl\",\n kMwMTN: \"x1lba3jz\",\n $$css: true\n },\n tertiary: {\n kWkggS: \"x14t7u9f\",\n kMwMTN: \"x1007ibn\",\n $$css: true\n }\n};\nconst fabTones = {\n filled,\n tonal\n};\nexport { extendedFabSizes, fabIconSizes, fabSizes, fabStyles, fabTones };"],"mappings":";AAmBA,MAAMA,YAAY;CAChBC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRC,QAAQ;EACRC,QAAQ;EACRf,QAAQ;EACRG,QAAQ;EACRa,QAAQ;EACRX,QAAQ;EACRO,OAAO;CACT;CACAK,UAAU;EACRC,QAAQ;EACRN,OAAO;CACT;CACAO,SAAS;EACPJ,QAAQ;EACRH,OAAO;CACT;CACAQ,SAAS;EACPL,QAAQ;EACRZ,QAAQ;EACRS,OAAO;CACT;CACAS,MAAM;EACJtB,QAAQ;EACRO,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRI,OAAO;CACT;CACAU,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRf,OAAO;CACT;CACAgB,SAAS;EACPb,QAAQ;EACRZ,QAAQ;EACRS,OAAO;CACT;AACF;AAGA,MAAMiB,WAAW;CACfC,IAAI;EACFC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRrB,OAAO;CACT;CACAsB,IAAI;EACFH,QAAQ;EACRC,QAAQ;EACR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les = {
|
|
|
31
31
|
},
|
|
32
32
|
autosize: {
|
|
33
33
|
k1xSpc: "xrvj5dj",
|
|
34
|
+
kumcoG: "x1mkdm3x",
|
|
34
35
|
$$css: true
|
|
35
36
|
},
|
|
36
37
|
autosizeCell: {
|
|
@@ -295,7 +296,7 @@ const fieldChromeStyles = {
|
|
|
295
296
|
},
|
|
296
297
|
inputDisabled: {
|
|
297
298
|
k8Qsv1: "x7ip5l3",
|
|
298
|
-
kMwMTN: "x1xj74d8",
|
|
299
|
+
kMwMTN: "x1xj74d8 x1bhcspo",
|
|
299
300
|
$$css: true
|
|
300
301
|
},
|
|
301
302
|
inputInvalid: {
|
|
@@ -498,7 +499,6 @@ const fieldChromeStyles = {
|
|
|
498
499
|
kGNEyG: "x6s0dn4",
|
|
499
500
|
k1xSpc: "x78zum5",
|
|
500
501
|
kVQacm: "xb3r6kr",
|
|
501
|
-
kg5iWk: "xlyipyv",
|
|
502
502
|
khDVqt: "xuxw1ft",
|
|
503
503
|
$$css: true
|
|
504
504
|
},
|
package/dist/field/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["colors","spacing","stateLayerOpacity","typography","onSurface","disabledContent","surface","hover","surfaceContainerHighest","sm","bodySmallLineHeight","bodyLargeLineHeight","lg","_temp","ks0D6T","fieldChromeStyles","affix","k6CgDc","kmuXW","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kIyJzY","k1ekBW","kAMwcw","khDVqt","$$css","affixLine","kGNEyG","k1xSpc","kOIVth","autosize","autosizeCell","kJuA4N","box","kWkggS","kZKoxP","kfdmCh","kt9PQ7","kT0f0o","kVL7Gh","kfmiAY","krdFHd","kGVxlE","kB7OPa","kkrTdU","kjBf7l","kInvED","k3XXqK","kMeerF","kGO01o","kLKAdn","kg3NbH","kVAEAm","boxDisabled","kL6WhQ","boxError","boxErrorFocused","boxErrorHovered","boxFixed","boxFloating","boxFocused","boxHovered","boxLabel","k87sOh","kLqNvP","kVQacm","kg5iWk","boxLabelEndInset","maxInlineSize","val","undefined","boxLabelFloated","boxLabelOutlined","boxLabelOutlinedFloated","boxLeading","kZCmMZ","boxMultiline","kAzted","boxOutlined","kMwMTN","boxOutlinedDisabled","boxOutlinedError","boxOutlinedErrorFocused","boxOutlinedErrorHovered","boxOutlinedFloating","boxOutlinedFocused","boxOutlinedHovered","boxOutlinedMultiline","boxTrailing","kwRFfy","column","kzQI83","k7Eaqz","columnDisabled","columnDisabledFloating","columnFloating","counter","kcqcaj","keTefX","icon","kSGwAc","kjj79g","keoZOQ","iconDisabled","iconError","iconErrorHovered","iconMultiline","k1K539","iconOutlined","input","k9l4BL","kIPbS0","k8Qsv1","kMzoRj","knGrYV","kzqmXN","kmVPX3","inputDisabled","inputInvalid","inputUnderFloatingLabel","inputUnderLabel","label","kHjlTd","labelDisabled","labelError","labelErrorHovered","labelFocused","labelHovered","leftToRight","ksoyAI","k9WMMc","message","kqGvvJ","messageDisabled","messageError","messageIndent","messageInset","kUOVxO","messageLine","messageLineCollapsed","messageRegion","numeric","outline","kVAM5u","kaIpWk","ksu8eU","kpwlN0","kogj98","k8WAf4","kfzvcC","outlineEndInset","paddingInlineEnd","outlineFocused","outlineLeading","outlineLeadingFocused","outlineNotch","k33iCy","outlineNotchOpen","outlineTrailing","outlineTrailingFocused","replica","segments","textArea","kHenm0","textAreaAutosize","trigger","kY2c9j","value","valuePlaceholder","valuePlaceholderHidden","groupStyles","root","kXwgrk"],"sources":["../../src/field/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Declared\n// here rather than imported from src/styles/ripple.ts, which spells the same\n// query: the StyleX compiler resolves a constant across files only out of a\n// `.stylex.ts` module, and the one this repository has is generated from the\n// design tokens, where a user-preference query does not belong beside the\n// window size classes.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The colour of a disabled control's text: its label and the description\n// under it, from one definition so the two cannot drift apart. `GrayText`\n// under forced colours, which leaves a group's legend and a description\n// alone: they are text beside a control, not a control the mode would grey.\nconst DISABLED_TEXT = {\n default: `color-mix(in srgb, ${colors.onSurface} calc(${stateLayerOpacity.disabledContent} * 100%), ${colors.surface})`,\n [FORCED_COLORS]: 'GrayText'\n};\n\n// The filled box's state layer while hovered: on surface at the hover\n// opacity, laid over the fill, as the text fields page draws it.\nconst HOVERED_FILL = `color-mix(in srgb, ${colors.onSurface} calc(${stateLayerOpacity.hover} * 100%), ${colors.surfaceContainerHighest})`;\n\n// The filled box's disabled fill, on surface at 4%. Material Design gives the\n// filled field's disabled container a third of the 12% that\n// `stateLayerOpacity.disabledContainer` holds, and no token names it, so it\n// is written once here, beside the one style that draws it.\nconst DISABLED_FILL_OPACITY = '4%';\n\n// The outline's two widths, resting and focused. The notch's inline padding\n// is measured from the border's inside edge, so each width comes off the\n// padding that puts the notch level with the label — see `outline`.\nconst OUTLINE_WIDTH = '1px';\nconst OUTLINE_FOCUSED_WIDTH = '2px';\n\n// What the box is tall enough for, rather than the 56dp the text fields page\n// draws it at. The page's number is the sum of these under the default\n// tokens, and stating it instead made the box right only there: a theme with\n// a longer body line — `Editorial` in kanso-ui-core's themes, at body-small\n// 20 and body-large 28 on a 10dp `sm` — needs 68, and in a fixed 56 the\n// value's line ran past the underline with nothing left beneath it.\n//\n// The filled box holds its padding twice over, the floated label's line and\n// the control's; the outlined box holds its own padding twice and the\n// control's line alone, since its label sits on the outline rather than\n// above the value. The two agree at 56 under the default tokens, which is\n// what keeps the default stories' snapshots where they are.\n//\n// The resting label's line is written against the same expressions below, so\n// one derivation feeds both the box and the label that centres in it.\nconst BOX_BLOCK_SIZE = `calc(2 * ${spacing.sm} + ${typography.bodySmallLineHeight} + ${typography.bodyLargeLineHeight})`;\nconst BOX_OUTLINED_BLOCK_SIZE = `calc(2 * ${spacing.lg} + ${typography.bodyLargeLineHeight})`;\n\n// The chrome's styles. Apart from the parts in ./index.tsx so that file\n// exports components alone, which is what keeps fast refresh working for it —\n// the same reason ./root.ts gives for the root style beside it.\n//\n// The focus indicator is an inset box-shadow on the bottom edge rather than a\n// border that thickens. A real border going 1px -> 2px on focus grows the\n// box, which pushes every sibling below it down by a pixel — so a form\n// twitches each time focus moves between its fields. A shadow is drawn inside\n// the box and changes nothing about its size.\n//\n// The label floats, as the text fields page draws it: body-large and centred\n// in an empty, unfocused box, body-small at the top once the field is focused\n// or holds a value. `floatingLabel={false}` keeps it small at the top in\n// every state instead.\n//\n// Where the label sits depends on the box's state, and a child cannot select\n// on its parent's state while the box can select on its own. So the label's\n// type is set on the box and inherited: the box changes the font size and\n// line height it hands down when focus is within it, or when its control\n// shows something other than its placeholder, and the label transitions\n// between the two. Resting, the line is the box less its padding, which is\n// what centres the label without a position to move — the move to the top is\n// a change of type alone. The control sets its own type, so none of this\n// reaches it.\n//\n// The label's colour follows the control's focus the same way: the box is\n// React Aria's Group, which reports focus within it as render state, and the\n// label takes `labelFocused` from that.\n//\n// The box is a row: an icon slot at either end, if the field has one, with\n// the label and control between them. The page gives the icons 24dp, 12dp\n// from the box's edge and 16dp from the text, centred in the box's height;\n// the slot cancels the box's top padding and stretches to its full height,\n// so it centres whatever it holds — a 24dp icon, or an icon button around\n// one. The label and the control sit in a column of their own, which is\n// what the label is positioned against, so it moves past a leading icon\n// with the text.\n//\n// A prefix or suffix sits on the control's line, in the control's type and\n// the muted role, and shows only while the field is focused or holds a\n// value, as the placeholder does — at rest the label is where it would be.\n// It is the column's colour it takes, inherited, since the column can\n// select on its own focus and content and the affix cannot select on\n// either.\n//\n// The outlined variant is the page's outlined text field: no fill, a 1dp\n// outline in the outline role with 4dp corners all round, 2dp and primary\n// while focused, on surface while hovered, the error role with an error,\n// and the label cutting the outline once it floats, with the page's 4dp\n// beside it. The value is centred, 16dp from the top and bottom, and the\n// label rests on its line and moves up onto the outline — a move, where the\n// filled label only changes type.\n//\n// The outline is a fieldset laid over the box: a browser draws a fieldset's\n// border around its legend, so a legend holding a copy of the label, in the\n// label's floated type, is what cuts the outline to the label's width with\n// nothing measured. Empty, it cuts nothing, which is the closed notch.\nconst _temp = {\n ks0D6T: \"x13i5qev\",\n \"$$css\": true\n};\nconst fieldChromeStyles = {\n affix: {\n k6CgDc: \"x12w9bfk\",\n kmuXW: \"x2lah0s\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xt3l3uh\",\n kAMwcw: \"xpc4ca7\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n affixLine: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x14qo01y\",\n $$css: true\n },\n autosize: {\n k1xSpc: \"xrvj5dj\",\n $$css: true\n },\n autosizeCell: {\n kJuA4N: \"x1b1wf8y\",\n $$css: true\n },\n box: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x1cy8zhl\",\n kWkggS: \"x1rrhr5q\",\n kZKoxP: \"x4v968r\",\n kfdmCh: \"xe3zi7u\",\n kt9PQ7: \"x15anc7y\",\n kT0f0o: \"x16uus16\",\n kVL7Gh: \"xbiv7yw\",\n kfmiAY: \"xirz1nw\",\n krdFHd: \"xzcck0f\",\n kGVxlE: \"x89kqus x18rfq6m\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ed109x\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n kjBf7l: \"x1x84bn5\",\n kInvED: \"x12iqurn\",\n k3XXqK: \"xi9ts3s\",\n kMeerF: \"x1jrff4x\",\n kGO01o: \"x18d9i69\",\n kLKAdn: \"xi7mcox\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x106061f\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n boxDisabled: {\n kWkggS: \"x1ojo7np\",\n kL6WhQ: \"x1fxan2a\",\n kGVxlE: \"xgloidm\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n boxError: {\n kGVxlE: \"x1lxxh4i x1d6xoej\",\n $$css: true\n },\n boxErrorFocused: {\n kWkggS: \"x1rrhr5q\",\n kGVxlE: \"xb0slzl\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxErrorHovered: {\n kWkggS: \"x13aw6e3 xpae8dx\",\n kGVxlE: \"x1lxxh4i xryshfu\",\n $$css: true\n },\n boxFixed: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n $$css: true\n },\n boxFloating: {\n kMv6JI: \"x1ps135g xnc7ww3 x16svsjw\",\n kGuDYH: \"x52kfa xys1t9b x1848etk\",\n k63SB2: \"xz4f7ai xn9xqko x1c52epr\",\n kb6lSQ: \"x19wmx12 x1t00fh7 x1qn8t5l\",\n kLWn49: \"xsv50tp x1f5c3pk x1mv3dpe\",\n $$css: true\n },\n boxFocused: {\n kWkggS: \"x1rrhr5q\",\n kGVxlE: \"xra6ydt\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxHovered: {\n kWkggS: \"x13aw6e3 xpae8dx\",\n kGVxlE: \"x89kqus x1ncb8nd\",\n $$css: true\n },\n boxLabel: {\n kB7OPa: \"x9f619\",\n k87sOh: \"x13vifvy\",\n kLqNvP: \"x1o0tod\",\n ks0D6T: \"x193iq5w\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n boxLabelEndInset: (maxInlineSize: string) => [_temp, {\n \"--x-maxInlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(maxInlineSize)\n }],\n boxLabelFloated: {\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n $$css: true\n },\n boxLabelOutlined: {\n kLqNvP: \"x10k232c\",\n ks0D6T: \"x35j8wb\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n boxLabelOutlinedFloated: {\n k87sOh: \"x1qjp6zz\",\n $$css: true\n },\n boxLeading: {\n kZCmMZ: \"xwde665\",\n $$css: true\n },\n boxMultiline: {\n kZKoxP: \"xt7dq6l\",\n kAzted: \"x9ep9ug\",\n kGO01o: \"xqf7pud\",\n $$css: true\n },\n boxOutlined: {\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"xnqhc4v\",\n kfdmCh: \"xs07zst\",\n kT0f0o: \"x4gcak0\",\n kVL7Gh: \"xqs30sb\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x158cnre x1sa41d3\",\n kGO01o: \"xzfxn0k\",\n kLKAdn: \"x1clyivc\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n boxOutlinedDisabled: {\n kWkggS: \"xjbqb8w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1ldq0ta x1bhcspo\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n boxOutlinedError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n boxOutlinedErrorFocused: {\n kMwMTN: \"x4ii1qj\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxOutlinedErrorHovered: {\n kMwMTN: \"x12voer2 x16elhoc\",\n $$css: true\n },\n boxOutlinedFloating: {\n kLWn49: \"xsv50tp x1f5c3pk x1rzm7h7\",\n $$css: true\n },\n boxOutlinedFocused: {\n kMwMTN: \"x1mxwv8y\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxOutlinedHovered: {\n kMwMTN: \"x158cnre x139gbkf\",\n $$css: true\n },\n boxOutlinedMultiline: {\n kZKoxP: \"xt7dq6l\",\n kAzted: \"xnqs80d\",\n $$css: true\n },\n boxTrailing: {\n kwRFfy: \"xk163s\",\n $$css: true\n },\n column: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n columnDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n columnDisabledFloating: {\n kMwMTN: \"xspc5gk x19co3pv\",\n $$css: true\n },\n columnFloating: {\n kMwMTN: \"x1dfuzvz x6phwhp x19co3pv\",\n $$css: true\n },\n counter: {\n kmuXW: \"x2lah0s\",\n kcqcaj: \"xss6m8b\",\n keTefX: \"xvc5jky\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n icon: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kSGwAc: \"xkh2ocl\",\n kMwMTN: \"x1w5n3ug\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n keoZOQ: \"x1motrhk\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xt3l3uh\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n iconDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n iconError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n iconErrorHovered: {\n kMwMTN: \"x16elhoc\",\n $$css: true\n },\n iconMultiline: {\n k1K539: \"x14yxyxb\",\n $$css: true\n },\n iconOutlined: {\n k1K539: \"xs1qnrw\",\n keoZOQ: \"x17v9ssf\",\n $$css: true\n },\n input: {\n k9l4BL: \"x1hcrkkg\",\n kIPbS0: \"xzwh6sb\",\n k8Qsv1: \"x1hgeflb\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n knGrYV: \"x1jie568\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kzqmXN: \"xh8yej3\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n k3XXqK: \"x1t137rt\",\n kmVPX3: \"x1717udv\",\n kg5iWk: \"xlyipyv\",\n $$css: true\n },\n inputDisabled: {\n k8Qsv1: \"x7ip5l3\",\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n inputInvalid: {\n knGrYV: \"x11twi6n\",\n $$css: true\n },\n inputUnderFloatingLabel: {\n k8Qsv1: \"x1mvm7v4 xxqzaim\",\n $$css: true\n },\n inputUnderLabel: {\n keoZOQ: \"xwuztrq\",\n $$css: true\n },\n label: {\n k6CgDc: \"x12w9bfk\",\n kMwMTN: \"x1w5n3ug\",\n kHjlTd: \"xj0a0fe\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xixa3zk\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n labelDisabled: {\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n labelError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n labelErrorHovered: {\n kMwMTN: \"x16elhoc\",\n $$css: true\n },\n labelFocused: {\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n labelHovered: {\n kMwMTN: \"x139gbkf\",\n $$css: true\n },\n leftToRight: {\n ksoyAI: \"xzt5al7\",\n k9WMMc: \"xrgu2gv\",\n $$css: true\n },\n message: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n kqGvvJ: \"x10im51j\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n messageDisabled: {\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n messageError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n messageIndent: {\n keTefX: \"xq0p5jb\",\n $$css: true\n },\n messageInset: {\n kUOVxO: \"xboopgi\",\n $$css: true\n },\n messageLine: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n keoZOQ: \"x1y88zpp\",\n kAzted: \"x17jz683\",\n $$css: true\n },\n messageLineCollapsed: {\n keoZOQ: \"xdj266r\",\n kAzted: \"x2lwn1j\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n messageRegion: {\n k1xSpc: \"x78zum5\",\n kVAEAm: \"x1cmy3ng\",\n $$css: true\n },\n numeric: {\n kMv6JI: \"xbppi91\",\n kcqcaj: \"xss6m8b\",\n $$css: true\n },\n outline: {\n k6CgDc: \"x12w9bfk\",\n kVAM5u: \"x1r7ld26\",\n kaIpWk: \"x1tfhd1\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kB7OPa: \"x9f619\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kpwlN0: \"x10a8y8t\",\n kb6lSQ: \"xwth0xh\",\n kogj98: \"x1ghz6dp\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"xt970qd\",\n kg3NbH: \"xgnwbya\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x1bj6kjc\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n outlineEndInset: (paddingInlineEnd: string) => [paddingInlineEnd !== undefined && {\n kwRFfy: paddingInlineEnd != null ? \"x120eax6\" : \"\",\n $$css: true\n }, {\n \"--x-paddingInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(paddingInlineEnd)\n }],\n outlineFocused: {\n kMzoRj: \"xdh2fpr\",\n kg3NbH: \"x1cmmxig\",\n $$css: true\n },\n outlineLeading: {\n kZCmMZ: \"x1e4tv75\",\n $$css: true\n },\n outlineLeadingFocused: {\n kZCmMZ: \"x2e0ysr\",\n $$css: true\n },\n outlineNotch: {\n kZKoxP: \"xqtp20y\",\n kB7OPa: \"x9f619\",\n kLWn49: \"x14ju556\",\n ks0D6T: \"x193iq5w\",\n kVQacm: \"xb3r6kr\",\n kmVPX3: \"x1717udv\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n outlineNotchOpen: {\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n outlineTrailing: {\n kwRFfy: \"xflzzte\",\n $$css: true\n },\n outlineTrailingFocused: {\n kwRFfy: \"x1gwc4xo\",\n $$css: true\n },\n replica: {\n kHjlTd: \"x1mzt3pk\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"x126k92a\",\n $$css: true\n },\n segments: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kVQacm: \"xb3r6kr\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n textArea: {\n k1xSpc: \"x1lliihq\",\n kVQacm: \"xysyzu8\",\n kHenm0: \"xtt52l0\",\n $$css: true\n },\n textAreaAutosize: {\n kVQacm: \"xb3r6kr\",\n $$css: true\n },\n trigger: {\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n kpwlN0: \"x10a8y8t\",\n k3XXqK: \"x1t137rt\",\n kmVPX3: \"x1717udv\",\n kVAEAm: \"x10l6tqk\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n value: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kVQacm: \"xb3r6kr\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n valuePlaceholder: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n valuePlaceholderHidden: {\n kMwMTN: \"x19co3pv\",\n $$css: true\n }\n};\n\n// The chrome a label sitting above a group takes, rather than inside a box.\n// CheckboxGroup, ChipGroup, RadioGroup, Slider and ColorSlider each wrote both\n// of these out: the type override on the label, and the column its label and\n// control sit in.\n//\n// The label is label-large, the role a field's label takes at rest, since a\n// group has no box to float it in.\n//\n// The two sliders compose an inline size of their own on the root, since a\n// slider fills the width it is given where a group of controls does not.\nconst groupStyles = {\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n root: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"xzoy561\",\n $$css: true\n }\n};\nexport { fieldChromeStyles, groupStyles, OUTLINE_FOCUSED_WIDTH, OUTLINE_WIDTH };"],"mappings":";;AAiBW,GAAsBA,OAAOI,YAAkBF,kBAAkBG,kBAA4BL,OAAOM;AAM1F,GAAsBN,OAAOI,YAAkBF,kBAAkBK,QAAkBP,OAAOQ;AA6BxF,GAAYP,QAAQQ,KAAQN,WAAWO,sBAAyBP,WAAWQ;AAClE,GAAYV,QAAQW,KAAQT,WAAWQ;AA2DvE,MAAME,QAAQ;CACZC,QAAQ;CACR,SAAS;AACX;AACA,MAAMC,oBAAoB;CACxBC,OAAO;EACLC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,WAAW;EACTC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRJ,OAAO;CACT;CACAK,UAAU;EACRF,QAAQ;EACRH,OAAO;CACT;CACAM,cAAc;EACZC,QAAQ;EACRP,OAAO;CACT;CACAQ,KAAK;EACHnB,QAAQ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gJ,wBAAwB;EACtB1F,QAAQ;EACRtD,OAAO;CACT;AACF;AAYA,MAAMiJ,cAAc;CAClBjD,OAAO;EACLzG,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRK,OAAO;CACT;CACAkJ,MAAM;EACJhI,QAAQ;EACRf,QAAQ;EACRgJ,QAAQ;EACR/I,QAAQ;EACRJ,OAAO;CACT;AACF"}
|
|
1
|
+
{"version":3,"file":"styles.js","names":["colors","spacing","stateLayerOpacity","typography","onSurface","disabledContent","surface","hover","surfaceContainerHighest","sm","bodySmallLineHeight","bodyLargeLineHeight","lg","_temp","ks0D6T","fieldChromeStyles","affix","k6CgDc","kmuXW","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kIyJzY","k1ekBW","kAMwcw","khDVqt","$$css","affixLine","kGNEyG","k1xSpc","kOIVth","autosize","kumcoG","autosizeCell","kJuA4N","box","kWkggS","kZKoxP","kfdmCh","kt9PQ7","kT0f0o","kVL7Gh","kfmiAY","krdFHd","kGVxlE","kB7OPa","kkrTdU","kjBf7l","kInvED","k3XXqK","kMeerF","kGO01o","kLKAdn","kg3NbH","kVAEAm","boxDisabled","kL6WhQ","boxError","boxErrorFocused","boxErrorHovered","boxFixed","boxFloating","boxFocused","boxHovered","boxLabel","k87sOh","kLqNvP","kVQacm","kg5iWk","boxLabelEndInset","maxInlineSize","val","undefined","boxLabelFloated","boxLabelOutlined","boxLabelOutlinedFloated","boxLeading","kZCmMZ","boxMultiline","kAzted","boxOutlined","kMwMTN","boxOutlinedDisabled","boxOutlinedError","boxOutlinedErrorFocused","boxOutlinedErrorHovered","boxOutlinedFloating","boxOutlinedFocused","boxOutlinedHovered","boxOutlinedMultiline","boxTrailing","kwRFfy","column","kzQI83","k7Eaqz","columnDisabled","columnDisabledFloating","columnFloating","counter","kcqcaj","keTefX","icon","kSGwAc","kjj79g","keoZOQ","iconDisabled","iconError","iconErrorHovered","iconMultiline","k1K539","iconOutlined","input","k9l4BL","kIPbS0","k8Qsv1","kMzoRj","knGrYV","kzqmXN","kmVPX3","inputDisabled","inputInvalid","inputUnderFloatingLabel","inputUnderLabel","label","kHjlTd","labelDisabled","labelError","labelErrorHovered","labelFocused","labelHovered","leftToRight","ksoyAI","k9WMMc","message","kqGvvJ","messageDisabled","messageError","messageIndent","messageInset","kUOVxO","messageLine","messageLineCollapsed","messageRegion","numeric","outline","kVAM5u","kaIpWk","ksu8eU","kpwlN0","kogj98","k8WAf4","kfzvcC","outlineEndInset","paddingInlineEnd","outlineFocused","outlineLeading","outlineLeadingFocused","outlineNotch","k33iCy","outlineNotchOpen","outlineTrailing","outlineTrailingFocused","replica","segments","textArea","kHenm0","textAreaAutosize","trigger","kY2c9j","value","valuePlaceholder","valuePlaceholderHidden","groupStyles","root","kXwgrk"],"sources":["../../src/field/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Declared\n// here rather than imported from src/styles/ripple.ts, which spells the same\n// query: the StyleX compiler resolves a constant across files only out of a\n// `.stylex.ts` module, and the one this repository has is generated from the\n// design tokens, where a user-preference query does not belong beside the\n// window size classes.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The colour of a disabled control's text: its label, the description\n// under it and the value inside it, from one definition so they cannot drift\n// apart. `GrayText` under forced colours, which leaves a group's legend and\n// a description alone: they are text beside a control, not a control the\n// mode would grey. The mode greys a native disabled input's value by itself,\n// but not a token field's, which is a contenteditable element.\nconst DISABLED_TEXT = {\n default: `color-mix(in srgb, ${colors.onSurface} calc(${stateLayerOpacity.disabledContent} * 100%), ${colors.surface})`,\n [FORCED_COLORS]: 'GrayText'\n};\n\n// The filled box's state layer while hovered: on surface at the hover\n// opacity, laid over the fill, as the text fields page draws it.\nconst HOVERED_FILL = `color-mix(in srgb, ${colors.onSurface} calc(${stateLayerOpacity.hover} * 100%), ${colors.surfaceContainerHighest})`;\n\n// The filled box's disabled fill, on surface at 4%. Material Design gives the\n// filled field's disabled container a third of the 12% that\n// `stateLayerOpacity.disabledContainer` holds, and no token names it, so it\n// is written once here, beside the one style that draws it.\nconst DISABLED_FILL_OPACITY = '4%';\n\n// The outline's two widths, resting and focused. The notch's inline padding\n// is measured from the border's inside edge, so each width comes off the\n// padding that puts the notch level with the label — see `outline`.\nconst OUTLINE_WIDTH = '1px';\nconst OUTLINE_FOCUSED_WIDTH = '2px';\n\n// What the box is tall enough for, rather than the 56dp the text fields page\n// draws it at. The page's number is the sum of these under the default\n// tokens, and stating it instead made the box right only there: a theme with\n// a longer body line — `Editorial` in kanso-ui-core's themes, at body-small\n// 20 and body-large 28 on a 10dp `sm` — needs 68, and in a fixed 56 the\n// value's line ran past the underline with nothing left beneath it.\n//\n// The filled box holds its padding twice over, the floated label's line and\n// the control's; the outlined box holds its own padding twice and the\n// control's line alone, since its label sits on the outline rather than\n// above the value. The two agree at 56 under the default tokens, which is\n// what keeps the default stories' snapshots where they are.\n//\n// The resting label's line is written against the same expressions below, so\n// one derivation feeds both the box and the label that centres in it.\nconst BOX_BLOCK_SIZE = `calc(2 * ${spacing.sm} + ${typography.bodySmallLineHeight} + ${typography.bodyLargeLineHeight})`;\nconst BOX_OUTLINED_BLOCK_SIZE = `calc(2 * ${spacing.lg} + ${typography.bodyLargeLineHeight})`;\n\n// The chrome's styles. Apart from the parts in ./index.tsx so that file\n// exports components alone, which is what keeps fast refresh working for it —\n// the same reason ./root.ts gives for the root style beside it.\n//\n// The focus indicator is an inset box-shadow on the bottom edge rather than a\n// border that thickens. A real border going 1px -> 2px on focus grows the\n// box, which pushes every sibling below it down by a pixel — so a form\n// twitches each time focus moves between its fields. A shadow is drawn inside\n// the box and changes nothing about its size.\n//\n// The label floats, as the text fields page draws it: body-large and centred\n// in an empty, unfocused box, body-small at the top once the field is focused\n// or holds a value. `floatingLabel={false}` keeps it small at the top in\n// every state instead.\n//\n// Where the label sits depends on the box's state, and a child cannot select\n// on its parent's state while the box can select on its own. So the label's\n// type is set on the box and inherited: the box changes the font size and\n// line height it hands down when focus is within it, or when its control\n// shows something other than its placeholder, and the label transitions\n// between the two. Resting, the line is the box less its padding, which is\n// what centres the label without a position to move — the move to the top is\n// a change of type alone. The control sets its own type, so none of this\n// reaches it.\n//\n// The label's colour follows the control's focus the same way: the box is\n// React Aria's Group, which reports focus within it as render state, and the\n// label takes `labelFocused` from that.\n//\n// The box is a row: an icon slot at either end, if the field has one, with\n// the label and control between them. The page gives the icons 24dp, 12dp\n// from the box's edge and 16dp from the text, centred in the box's height;\n// the slot cancels the box's top padding and stretches to its full height,\n// so it centres whatever it holds — a 24dp icon, or an icon button around\n// one. The label and the control sit in a column of their own, which is\n// what the label is positioned against, so it moves past a leading icon\n// with the text.\n//\n// A prefix or suffix sits on the control's line, in the control's type and\n// the muted role, and shows only while the field is focused or holds a\n// value, as the placeholder does — at rest the label is where it would be.\n// It is the column's colour it takes, inherited, since the column can\n// select on its own focus and content and the affix cannot select on\n// either.\n//\n// The outlined variant is the page's outlined text field: no fill, a 1dp\n// outline in the outline role with 4dp corners all round, 2dp and primary\n// while focused, on surface while hovered, the error role with an error,\n// and the label cutting the outline once it floats, with the page's 4dp\n// beside it. The value is centred, 16dp from the top and bottom, and the\n// label rests on its line and moves up onto the outline — a move, where the\n// filled label only changes type.\n//\n// The outline is a fieldset laid over the box: a browser draws a fieldset's\n// border around its legend, so a legend holding a copy of the label, in the\n// label's floated type, is what cuts the outline to the label's width with\n// nothing measured. Empty, it cuts nothing, which is the closed notch.\nconst _temp = {\n ks0D6T: \"x13i5qev\",\n \"$$css\": true\n};\nconst fieldChromeStyles = {\n affix: {\n k6CgDc: \"x12w9bfk\",\n kmuXW: \"x2lah0s\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xt3l3uh\",\n kAMwcw: \"xpc4ca7\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n affixLine: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x14qo01y\",\n $$css: true\n },\n autosize: {\n k1xSpc: \"xrvj5dj\",\n kumcoG: \"x1mkdm3x\",\n $$css: true\n },\n autosizeCell: {\n kJuA4N: \"x1b1wf8y\",\n $$css: true\n },\n box: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x1cy8zhl\",\n kWkggS: \"x1rrhr5q\",\n kZKoxP: \"x4v968r\",\n kfdmCh: \"xe3zi7u\",\n kt9PQ7: \"x15anc7y\",\n kT0f0o: \"x16uus16\",\n kVL7Gh: \"xbiv7yw\",\n kfmiAY: \"xirz1nw\",\n krdFHd: \"xzcck0f\",\n kGVxlE: \"x89kqus x18rfq6m\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ed109x\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n kjBf7l: \"x1x84bn5\",\n kInvED: \"x12iqurn\",\n k3XXqK: \"xi9ts3s\",\n kMeerF: \"x1jrff4x\",\n kGO01o: \"x18d9i69\",\n kLKAdn: \"xi7mcox\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x106061f\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n boxDisabled: {\n kWkggS: \"x1ojo7np\",\n kL6WhQ: \"x1fxan2a\",\n kGVxlE: \"xgloidm\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n boxError: {\n kGVxlE: \"x1lxxh4i x1d6xoej\",\n $$css: true\n },\n boxErrorFocused: {\n kWkggS: \"x1rrhr5q\",\n kGVxlE: \"xb0slzl\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxErrorHovered: {\n kWkggS: \"x13aw6e3 xpae8dx\",\n kGVxlE: \"x1lxxh4i xryshfu\",\n $$css: true\n },\n boxFixed: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n $$css: true\n },\n boxFloating: {\n kMv6JI: \"x1ps135g xnc7ww3 x16svsjw\",\n kGuDYH: \"x52kfa xys1t9b x1848etk\",\n k63SB2: \"xz4f7ai xn9xqko x1c52epr\",\n kb6lSQ: \"x19wmx12 x1t00fh7 x1qn8t5l\",\n kLWn49: \"xsv50tp x1f5c3pk x1mv3dpe\",\n $$css: true\n },\n boxFocused: {\n kWkggS: \"x1rrhr5q\",\n kGVxlE: \"xra6ydt\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxHovered: {\n kWkggS: \"x13aw6e3 xpae8dx\",\n kGVxlE: \"x89kqus x1ncb8nd\",\n $$css: true\n },\n boxLabel: {\n kB7OPa: \"x9f619\",\n k87sOh: \"x13vifvy\",\n kLqNvP: \"x1o0tod\",\n ks0D6T: \"x193iq5w\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n boxLabelEndInset: (maxInlineSize: string) => [_temp, {\n \"--x-maxInlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(maxInlineSize)\n }],\n boxLabelFloated: {\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n $$css: true\n },\n boxLabelOutlined: {\n kLqNvP: \"x10k232c\",\n ks0D6T: \"x35j8wb\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n boxLabelOutlinedFloated: {\n k87sOh: \"x1qjp6zz\",\n $$css: true\n },\n boxLeading: {\n kZCmMZ: \"xwde665\",\n $$css: true\n },\n boxMultiline: {\n kZKoxP: \"xt7dq6l\",\n kAzted: \"x9ep9ug\",\n kGO01o: \"xqf7pud\",\n $$css: true\n },\n boxOutlined: {\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"xnqhc4v\",\n kfdmCh: \"xs07zst\",\n kT0f0o: \"x4gcak0\",\n kVL7Gh: \"xqs30sb\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x158cnre x1sa41d3\",\n kGO01o: \"xzfxn0k\",\n kLKAdn: \"x1clyivc\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n boxOutlinedDisabled: {\n kWkggS: \"xjbqb8w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1ldq0ta x1bhcspo\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n boxOutlinedError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n boxOutlinedErrorFocused: {\n kMwMTN: \"x4ii1qj\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxOutlinedErrorHovered: {\n kMwMTN: \"x12voer2 x16elhoc\",\n $$css: true\n },\n boxOutlinedFloating: {\n kLWn49: \"xsv50tp x1f5c3pk x1rzm7h7\",\n $$css: true\n },\n boxOutlinedFocused: {\n kMwMTN: \"x1mxwv8y\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxOutlinedHovered: {\n kMwMTN: \"x158cnre x139gbkf\",\n $$css: true\n },\n boxOutlinedMultiline: {\n kZKoxP: \"xt7dq6l\",\n kAzted: \"xnqs80d\",\n $$css: true\n },\n boxTrailing: {\n kwRFfy: \"xk163s\",\n $$css: true\n },\n column: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n columnDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n columnDisabledFloating: {\n kMwMTN: \"xspc5gk x19co3pv\",\n $$css: true\n },\n columnFloating: {\n kMwMTN: \"x1dfuzvz x6phwhp x19co3pv\",\n $$css: true\n },\n counter: {\n kmuXW: \"x2lah0s\",\n kcqcaj: \"xss6m8b\",\n keTefX: \"xvc5jky\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n icon: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kSGwAc: \"xkh2ocl\",\n kMwMTN: \"x1w5n3ug\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n keoZOQ: \"x1motrhk\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xt3l3uh\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n iconDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n iconError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n iconErrorHovered: {\n kMwMTN: \"x16elhoc\",\n $$css: true\n },\n iconMultiline: {\n k1K539: \"x14yxyxb\",\n $$css: true\n },\n iconOutlined: {\n k1K539: \"xs1qnrw\",\n keoZOQ: \"x17v9ssf\",\n $$css: true\n },\n input: {\n k9l4BL: \"x1hcrkkg\",\n kIPbS0: \"xzwh6sb\",\n k8Qsv1: \"x1hgeflb\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n knGrYV: \"x1jie568\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kzqmXN: \"xh8yej3\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n k3XXqK: \"x1t137rt\",\n kmVPX3: \"x1717udv\",\n kg5iWk: \"xlyipyv\",\n $$css: true\n },\n inputDisabled: {\n k8Qsv1: \"x7ip5l3\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n inputInvalid: {\n knGrYV: \"x11twi6n\",\n $$css: true\n },\n inputUnderFloatingLabel: {\n k8Qsv1: \"x1mvm7v4 xxqzaim\",\n $$css: true\n },\n inputUnderLabel: {\n keoZOQ: \"xwuztrq\",\n $$css: true\n },\n label: {\n k6CgDc: \"x12w9bfk\",\n kMwMTN: \"x1w5n3ug\",\n kHjlTd: \"xj0a0fe\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xixa3zk\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n labelDisabled: {\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n labelError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n labelErrorHovered: {\n kMwMTN: \"x16elhoc\",\n $$css: true\n },\n labelFocused: {\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n labelHovered: {\n kMwMTN: \"x139gbkf\",\n $$css: true\n },\n leftToRight: {\n ksoyAI: \"xzt5al7\",\n k9WMMc: \"xrgu2gv\",\n $$css: true\n },\n message: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n kqGvvJ: \"x10im51j\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n messageDisabled: {\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n messageError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n messageIndent: {\n keTefX: \"xq0p5jb\",\n $$css: true\n },\n messageInset: {\n kUOVxO: \"xboopgi\",\n $$css: true\n },\n messageLine: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n keoZOQ: \"x1y88zpp\",\n kAzted: \"x17jz683\",\n $$css: true\n },\n messageLineCollapsed: {\n keoZOQ: \"xdj266r\",\n kAzted: \"x2lwn1j\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n messageRegion: {\n k1xSpc: \"x78zum5\",\n kVAEAm: \"x1cmy3ng\",\n $$css: true\n },\n numeric: {\n kMv6JI: \"xbppi91\",\n kcqcaj: \"xss6m8b\",\n $$css: true\n },\n outline: {\n k6CgDc: \"x12w9bfk\",\n kVAM5u: \"x1r7ld26\",\n kaIpWk: \"x1tfhd1\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kB7OPa: \"x9f619\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kpwlN0: \"x10a8y8t\",\n kb6lSQ: \"xwth0xh\",\n kogj98: \"x1ghz6dp\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"xt970qd\",\n kg3NbH: \"xgnwbya\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x1bj6kjc\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n outlineEndInset: (paddingInlineEnd: string) => [paddingInlineEnd !== undefined && {\n kwRFfy: paddingInlineEnd != null ? \"x120eax6\" : \"\",\n $$css: true\n }, {\n \"--x-paddingInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(paddingInlineEnd)\n }],\n outlineFocused: {\n kMzoRj: \"xdh2fpr\",\n kg3NbH: \"x1cmmxig\",\n $$css: true\n },\n outlineLeading: {\n kZCmMZ: \"x1e4tv75\",\n $$css: true\n },\n outlineLeadingFocused: {\n kZCmMZ: \"x2e0ysr\",\n $$css: true\n },\n outlineNotch: {\n kZKoxP: \"xqtp20y\",\n kB7OPa: \"x9f619\",\n kLWn49: \"x14ju556\",\n ks0D6T: \"x193iq5w\",\n kVQacm: \"xb3r6kr\",\n kmVPX3: \"x1717udv\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n outlineNotchOpen: {\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n outlineTrailing: {\n kwRFfy: \"xflzzte\",\n $$css: true\n },\n outlineTrailingFocused: {\n kwRFfy: \"x1gwc4xo\",\n $$css: true\n },\n replica: {\n kHjlTd: \"x1mzt3pk\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"x126k92a\",\n $$css: true\n },\n segments: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kVQacm: \"xb3r6kr\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n textArea: {\n k1xSpc: \"x1lliihq\",\n kVQacm: \"xysyzu8\",\n kHenm0: \"xtt52l0\",\n $$css: true\n },\n textAreaAutosize: {\n kVQacm: \"xb3r6kr\",\n $$css: true\n },\n trigger: {\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n kpwlN0: \"x10a8y8t\",\n k3XXqK: \"x1t137rt\",\n kmVPX3: \"x1717udv\",\n kVAEAm: \"x10l6tqk\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n value: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kVQacm: \"xb3r6kr\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n valuePlaceholder: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n valuePlaceholderHidden: {\n kMwMTN: \"x19co3pv\",\n $$css: true\n }\n};\n\n// The chrome a label sitting above a group takes, rather than inside a box.\n// CheckboxGroup, ChipGroup, RadioGroup, Slider and ColorSlider each wrote both\n// of these out: the type override on the label, and the column its label and\n// control sit in.\n//\n// The label is label-large, the role a field's label takes at rest, since a\n// group has no box to float it in.\n//\n// The two sliders compose an inline size of their own on the root, since a\n// slider fills the width it is given where a group of controls does not.\nconst groupStyles = {\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: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
// src/hooks/useDockedMonths.ts
|
|
3
|
+
const DOCKED_AND_STACKED = "(600px <= width < 840px)";
|
|
4
|
+
const ONE_MONTH = { months: 1 };
|
|
5
|
+
function isDockedAndStacked() {
|
|
6
|
+
return window.matchMedia(DOCKED_AND_STACKED).matches;
|
|
7
|
+
}
|
|
8
|
+
function isDockedAndStackedOnServer() {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
function subscribe(listener) {
|
|
12
|
+
const query = window.matchMedia(DOCKED_AND_STACKED);
|
|
13
|
+
query.addEventListener("change", listener);
|
|
14
|
+
return () => {
|
|
15
|
+
query.removeEventListener("change", listener);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The months a docked date picker's calendar shows at once: what the call
|
|
20
|
+
* site asked for, apart from between the medium and the expanded breakpoint,
|
|
21
|
+
* where more than one comes down to one.
|
|
22
|
+
*
|
|
23
|
+
* There the surface is docked under the field and the months stack, and two
|
|
24
|
+
* stacked months are taller than the room under a field near the top of a
|
|
25
|
+
* tablet's window: the surface capped itself at that room and scrolled, and
|
|
26
|
+
* the second month's last week sat below its edge with nothing to say it was
|
|
27
|
+
* there. One month fits, and the calendar pages a month at a time. Below the
|
|
28
|
+
* medium breakpoint the surface is the modal, centred with the window's height
|
|
29
|
+
* to hold it, and the months stack there as asked.
|
|
30
|
+
*/
|
|
31
|
+
function useDockedMonths(visibleDuration) {
|
|
32
|
+
return useSyncExternalStore(subscribe, isDockedAndStacked, isDockedAndStackedOnServer) && (visibleDuration?.months ?? 1) > 1 ? ONE_MONTH : visibleDuration;
|
|
33
|
+
}
|
|
34
|
+
export { useDockedMonths };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=useDockedMonths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDockedMonths.js","names":["useSyncExternalStore","DOCKED_AND_STACKED","ONE_MONTH","months","isDockedAndStacked","window","matchMedia","matches","isDockedAndStackedOnServer","subscribe","listener","query","addEventListener","removeEventListener","useDockedMonths","visibleDuration","narrowed"],"sources":["../../src/hooks/useDockedMonths.ts"],"sourcesContent":["import type { DateDuration } from '@internationalized/date'\n\nimport { useSyncExternalStore } from 'react'\n\n// The window the date pickers dock their calendar in while its months stack:\n// from the medium breakpoint, where `src/styles/picker.ts` stops centring the\n// surface, to the expanded one, where `src/calendar/styles.ts` puts the months\n// side by side. Spelled again for `matchMedia`, since the stylesheet reads\n// both as `media.medium` and `media.belowExpanded` and this is the one thing\n// that has to know them outside it: a calendar's months are a prop, not a\n// style.\nconst DOCKED_AND_STACKED = '(600px <= width < 840px)'\n\nconst ONE_MONTH: DateDuration = { months: 1 }\n\nfunction isDockedAndStacked() {\n return window.matchMedia(DOCKED_AND_STACKED).matches\n}\n\nfunction isDockedAndStackedOnServer() {\n return false\n}\n\nfunction subscribe(listener: () => void) {\n const query = window.matchMedia(DOCKED_AND_STACKED)\n query.addEventListener('change', listener)\n return () => {\n query.removeEventListener('change', listener)\n }\n}\n\n/**\n * The months a docked date picker's calendar shows at once: what the call\n * site asked for, apart from between the medium and the expanded breakpoint,\n * where more than one comes down to one.\n *\n * There the surface is docked under the field and the months stack, and two\n * stacked months are taller than the room under a field near the top of a\n * tablet's window: the surface capped itself at that room and scrolled, and\n * the second month's last week sat below its edge with nothing to say it was\n * there. One month fits, and the calendar pages a month at a time. Below the\n * medium breakpoint the surface is the modal, centred with the window's height\n * to hold it, and the months stack there as asked.\n */\nfunction useDockedMonths(\n visibleDuration: DateDuration | undefined,\n): DateDuration | undefined {\n const narrowed = useSyncExternalStore(\n subscribe,\n isDockedAndStacked,\n isDockedAndStackedOnServer,\n )\n\n return narrowed && (visibleDuration?.months ?? 1) > 1\n ? ONE_MONTH\n : visibleDuration\n}\n\nexport { useDockedMonths }\n"],"mappings":";;AAWA,MAAMC,qBAAqB;AAE3B,MAAMC,YAA0B,EAAEC,QAAQ,EAAE;AAE5C,SAASC,qBAAqB;CAC5B,OAAOC,OAAOC,WAAWL,kBAAkB,CAAC,CAACM;AAC/C;AAEA,SAASC,6BAA6B;CACpC,OAAO;AACT;AAEA,SAASC,UAAUC,UAAsB;CACvC,MAAMC,QAAQN,OAAOC,WAAWL,kBAAkB;CAClDU,MAAMC,iBAAiB,UAAUF,QAAQ;CACzC,aAAa;EACXC,MAAME,oBAAoB,UAAUH,QAAQ;CAC9C;AACF;;;;;;;;;;;;;;AAeA,SAAAI,gBAAAC,iBAAA;CAOG,OAJgBf,qBACfS,WACAL,oBACAI,0BAGKQ,MAAaD,iBAAeZ,UAAf,KAAgC,IAA7CD,YAAAa;AAEY"}
|
package/dist/i18n/index.js
CHANGED
|
@@ -31,6 +31,7 @@ function messagesFor(locale) {
|
|
|
31
31
|
nextSlide: formatter.format("nextSlide"),
|
|
32
32
|
noResults: formatter.format("noResults"),
|
|
33
33
|
previousSlide: formatter.format("previousSlide"),
|
|
34
|
+
selectDate: formatter.format("selectDate"),
|
|
34
35
|
selectTime: formatter.format("selectTime"),
|
|
35
36
|
slide: formatter.format("slide"),
|
|
36
37
|
slideLabel: (index, count) => formatter.format("slideLabel", {
|
package/dist/i18n/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["LocalizedStringDictionary","LocalizedStringFormatter","useLocale","MESSAGES","back","cancel","carousel","characterLimit","count","characterLimitReached","confirm","copied","copy","copySelected","dragHandle","enterTime","loading","loadingMore","nextSlide","noResults","previousSlide","selectTime","slide","slideLabel","index","dictionary","cache","Map","messagesFor","locale","cached","get","undefined","formatter","numbers","Intl","NumberFormat","rules","PluralRules","messages","format","rule","select","set","useMessages","$","_c","t0","t1"],"sources":["../../src/i18n/index.ts"],"sourcesContent":["import {\n LocalizedStringDictionary,\n LocalizedStringFormatter,\n} from '@internationalized/string'\nimport { useLocale } from 'react-aria-components'\n\nimport { MESSAGES } from './messages'\n\n// The words the library writes itself, in the locale React Aria's\n// I18nProvider sets — the same locale every other name a control announces is\n// written in. Each one stands behind a prop that names it otherwise:\n// `pendingLabel`, a LoadMore's `label`, `copyLabel`, `copiedLabel` and\n// `selectedLabel`, a sheet handle's `aria-label`, `characterLimitLabel` and\n// `characterLimitReachedLabel`, the time picker's `cancelLabel`,\n// `confirmLabel`, `selectTimeLabel` and `enterTimeLabel`, and a collection's\n// `renderEmptyState` for its empty row.\n\ntype LibraryMessages = {\n /** What a search view's back button is called. */\n back: string\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["LocalizedStringDictionary","LocalizedStringFormatter","useLocale","MESSAGES","back","cancel","carousel","characterLimit","count","characterLimitReached","confirm","copied","copy","copySelected","dragHandle","enterTime","loading","loadingMore","nextSlide","noResults","previousSlide","selectDate","selectTime","slide","slideLabel","index","dictionary","cache","Map","messagesFor","locale","cached","get","undefined","formatter","numbers","Intl","NumberFormat","rules","PluralRules","messages","format","rule","select","set","useMessages","$","_c","t0","t1"],"sources":["../../src/i18n/index.ts"],"sourcesContent":["import {\n LocalizedStringDictionary,\n LocalizedStringFormatter,\n} from '@internationalized/string'\nimport { useLocale } from 'react-aria-components'\n\nimport { MESSAGES } from './messages'\n\n// The words the library writes itself, in the locale React Aria's\n// I18nProvider sets — the same locale every other name a control announces is\n// written in. Each one stands behind a prop that names it otherwise:\n// `pendingLabel`, a LoadMore's `label`, `copyLabel`, `copiedLabel` and\n// `selectedLabel`, a sheet handle's `aria-label`, `characterLimitLabel` and\n// `characterLimitReachedLabel`, the time picker's `cancelLabel`,\n// `confirmLabel`, `selectTimeLabel` and `enterTimeLabel`, the date picker's\n// `cancelLabel`, `confirmLabel` and `selectDateLabel`, and a collection's\n// `renderEmptyState` for its empty row.\n\ntype LibraryMessages = {\n /** What a search view's back button is called. */\n back: string\n /**\n * The time picker's and the modal date picker's action that closes it and\n * keeps the value it had.\n */\n cancel: string\n /** What a carousel calls itself, as its role description. */\n carousel: string\n /** The limit on a field's length, in words, for a count of characters. */\n characterLimit: (count: number) => string\n /** What a field announces once its length reaches its limit. */\n characterLimitReached: string\n /**\n * The time picker's and the modal date picker's action that closes it and\n * keeps the value picked.\n */\n confirm: string\n copied: string\n copy: string\n /**\n * What a copy field says when the clipboard refused it and the value has\n * been selected for the reader to copy themselves.\n */\n copySelected: string\n /**\n * What a bottom sheet's drag handle is called, while it is a button that\n * moves the sheet between its snap points.\n */\n dragHandle: string\n /** The time picker's headline while it takes a time typed. */\n enterTime: string\n loading: string\n loadingMore: string\n /** What a carousel's next button is called. */\n nextSlide: string\n /** What a collection says when filtering leaves nothing in it. */\n noResults: string\n /** What a carousel's previous button is called. */\n previousSlide: string\n /** The modal date picker's supporting text, above the date it holds. */\n selectDate: string\n /** The time picker's headline while it shows the dial. */\n selectTime: string\n /** What a carousel calls one of its slides, as its role description. */\n slide: string\n /** A slide's name: which of how many it is, as \"2 of 6\". */\n slideLabel: (index: number, count: number) => string\n}\n\nconst dictionary = new LocalizedStringDictionary(MESSAGES)\n\n// One set per locale an app renders in, built the first time a component asks\n// for it. Every string but the limit is fixed for its locale, so the set holds\n// them already formatted rather than formatting them on each render.\nconst cache = new Map<string, LibraryMessages>()\n\nfunction messagesFor(locale: string): LibraryMessages {\n const cached = cache.get(locale)\n if (cached !== undefined) {\n return cached\n }\n\n const formatter = new LocalizedStringFormatter(locale, dictionary)\n const numbers = new Intl.NumberFormat(locale)\n const rules = new Intl.PluralRules(locale)\n const messages = {\n back: formatter.format('back'),\n cancel: formatter.format('cancel'),\n carousel: formatter.format('carousel'),\n characterLimit: (count: number) =>\n formatter.format('characterLimit', {\n count: numbers.format(count),\n rule: rules.select(count),\n }),\n characterLimitReached: formatter.format('characterLimitReached'),\n confirm: formatter.format('confirm'),\n copied: formatter.format('copied'),\n copy: formatter.format('copy'),\n copySelected: formatter.format('copySelected'),\n dragHandle: formatter.format('dragHandle'),\n enterTime: formatter.format('enterTime'),\n loading: formatter.format('loading'),\n loadingMore: formatter.format('loadingMore'),\n nextSlide: formatter.format('nextSlide'),\n noResults: formatter.format('noResults'),\n previousSlide: formatter.format('previousSlide'),\n selectDate: formatter.format('selectDate'),\n selectTime: formatter.format('selectTime'),\n slide: formatter.format('slide'),\n slideLabel: (index: number, count: number) =>\n formatter.format('slideLabel', {\n count: numbers.format(count),\n index: numbers.format(index),\n }),\n }\n cache.set(locale, messages)\n return messages\n}\n\n/** The library's own words, in the I18nProvider's locale. */\nfunction useMessages(): LibraryMessages {\n return messagesFor(useLocale().locale)\n}\n\nexport type { LibraryMessages }\n\nexport { messagesFor, useMessages }\n"],"mappings":";;;;;AAqEA,MAAM0B,aAAa,IAAI1B,0BAA0BG,QAAQ;AAKzD,MAAMwB,wBAAQ,IAAIC,IAA6B;AAE/C,SAASC,YAAYC,QAAiC;CACpD,MAAMC,SAASJ,MAAMK,IAAIF,MAAM;CAC/B,IAAIC,WAAWE,KAAAA,GACb,OAAOF;CAGT,MAAMG,YAAY,IAAIjC,yBAAyB6B,QAAQJ,UAAU;CACjE,MAAMS,UAAU,IAAIC,KAAKC,aAAaP,MAAM;CAC5C,MAAMQ,QAAQ,IAAIF,KAAKG,YAAYT,MAAM;CACzC,MAAMU,WAAW;EACfpC,MAAM8B,UAAUO,OAAO,MAAM;EAC7BpC,QAAQ6B,UAAUO,OAAO,QAAQ;EACjCnC,UAAU4B,UAAUO,OAAO,UAAU;EACrClC,iBAAiBC,UACf0B,UAAUO,OAAO,kBAAkB;GACjCjC,OAAO2B,QAAQM,OAAOjC,KAAK;GAC3BkC,MAAMJ,MAAMK,OAAOnC,KAAK;EAC1B,CAAC;EACHC,uBAAuByB,UAAUO,OAAO,uBAAuB;EAC/D/B,SAASwB,UAAUO,OAAO,SAAS;EACnC9B,QAAQuB,UAAUO,OAAO,QAAQ;EACjC7B,MAAMsB,UAAUO,OAAO,MAAM;EAC7B5B,cAAcqB,UAAUO,OAAO,cAAc;EAC7C3B,YAAYoB,UAAUO,OAAO,YAAY;EACzC1B,WAAWmB,UAAUO,OAAO,WAAW;EACvCzB,SAASkB,UAAUO,OAAO,SAAS;EACnCxB,aAAaiB,UAAUO,OA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