@kanso-labs/kanso-ui 0.45.21 → 0.45.23
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/badge/index.js.map +1 -1
- package/dist/button/context.js.map +1 -1
- package/dist/button/group.js.map +1 -1
- package/dist/button/hooks.js.map +1 -1
- package/dist/button/index.d.ts +3 -4
- package/dist/button/index.js.map +1 -1
- package/dist/button/styles.js.map +1 -1
- package/dist/button/toggle.js.map +1 -1
- package/dist/calendar/index.js +119 -11
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/styles.js +19 -1
- package/dist/calendar/styles.js.map +1 -1
- package/dist/carousel/arrangement.d.ts +1 -2
- package/dist/carousel/arrangement.js.map +1 -1
- package/dist/chip/index.js.map +1 -1
- package/dist/chip/label.js.map +1 -1
- package/dist/chip/styles.js.map +1 -1
- package/dist/collection/empty.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/styles.js.map +1 -1
- package/dist/collection/text.js.map +1 -1
- package/dist/color-scheme.d.ts +1 -2
- package/dist/color-scheme.js.map +1 -1
- package/dist/components/app-bar/index.d.ts +9 -4
- package/dist/components/app-bar/index.js +123 -73
- package/dist/components/app-bar/index.js.map +1 -1
- package/dist/components/autocomplete/index.d.ts +1 -2
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/avatar/index.d.ts +1 -2
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/badge/index.d.ts +1 -2
- package/dist/components/badge/index.js.map +1 -1
- package/dist/components/breadcrumbs/index.d.ts +1 -2
- package/dist/components/breadcrumbs/index.js.map +1 -1
- package/dist/components/button/index.d.ts +1 -2
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button-group/index.d.ts +1 -2
- package/dist/components/button-group/index.js.map +1 -1
- package/dist/components/calendar/index.d.ts +4 -5
- package/dist/components/calendar/index.js +8 -19
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/card/index.d.ts +1 -2
- package/dist/components/card/index.js.map +1 -1
- package/dist/components/carousel/index.d.ts +22 -4
- package/dist/components/carousel/index.js +26 -14
- package/dist/components/carousel/index.js.map +1 -1
- package/dist/components/checkbox/index.d.ts +1 -2
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox-group/index.d.ts +1 -2
- package/dist/components/checkbox-group/index.js.map +1 -1
- package/dist/components/chip/index.d.ts +1 -2
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip-group/index.d.ts +1 -2
- package/dist/components/chip-group/index.js +3 -0
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/code/index.d.ts +1 -2
- package/dist/components/code/index.js.map +1 -1
- package/dist/components/color-area/index.d.ts +1 -2
- package/dist/components/color-area/index.js.map +1 -1
- package/dist/components/color-field/index.d.ts +1 -2
- package/dist/components/color-field/index.js.map +1 -1
- package/dist/components/color-picker/index.d.ts +1 -2
- package/dist/components/color-picker/index.js +64 -46
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/color-slider/index.d.ts +1 -2
- package/dist/components/color-slider/index.js.map +1 -1
- package/dist/components/color-swatch/index.d.ts +1 -2
- package/dist/components/color-swatch/index.js +20 -16
- package/dist/components/color-swatch/index.js.map +1 -1
- package/dist/components/color-swatch-picker/index.d.ts +1 -2
- package/dist/components/color-swatch-picker/index.js.map +1 -1
- package/dist/components/color-wheel/index.d.ts +1 -2
- package/dist/components/color-wheel/index.js.map +1 -1
- package/dist/components/combo-box/index.d.ts +1 -2
- package/dist/components/combo-box/index.js.map +1 -1
- package/dist/components/container/index.d.ts +1 -2
- package/dist/components/container/index.js.map +1 -1
- package/dist/components/copy-field/index.d.ts +1 -2
- package/dist/components/copy-field/index.js +1 -0
- package/dist/components/copy-field/index.js.map +1 -1
- package/dist/components/currency/index.d.ts +1 -2
- package/dist/components/currency/index.js.map +1 -1
- package/dist/components/date-field/index.d.ts +1 -2
- package/dist/components/date-field/index.js.map +1 -1
- package/dist/components/date-picker/index.d.ts +1 -2
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/date-range-picker/index.d.ts +1 -2
- package/dist/components/date-range-picker/index.js +165 -81
- package/dist/components/date-range-picker/index.js.map +1 -1
- package/dist/components/dialog/index.d.ts +1 -2
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/disclosure/index.d.ts +1 -2
- package/dist/components/disclosure/index.js.map +1 -1
- package/dist/components/disclosure-group/index.d.ts +1 -2
- package/dist/components/disclosure-group/index.js.map +1 -1
- package/dist/components/drop-zone/index.d.ts +1 -2
- package/dist/components/drop-zone/index.js.map +1 -1
- package/dist/components/drop-zone/styles.js.map +1 -1
- package/dist/components/fab/index.d.ts +1 -2
- package/dist/components/fab/index.js.map +1 -1
- package/dist/components/fab-menu/index.d.ts +1 -2
- package/dist/components/fab-menu/index.js.map +1 -1
- package/dist/components/feed/index.d.ts +1 -2
- package/dist/components/feed/index.js.map +1 -1
- package/dist/components/form/index.d.ts +1 -2
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/icon-button/index.d.ts +1 -2
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/keycap/index.d.ts +1 -2
- package/dist/components/keycap/index.js.map +1 -1
- package/dist/components/link/index.d.ts +1 -2
- package/dist/components/link/index.js.map +1 -1
- package/dist/components/list/index.d.ts +1 -2
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-box/index.d.ts +1 -2
- package/dist/components/list-box/index.js.map +1 -1
- package/dist/components/list-detail/index.d.ts +1 -2
- package/dist/components/list-detail/index.js.map +1 -1
- package/dist/components/list-item/index.d.ts +1 -2
- package/dist/components/list-item/index.js.map +1 -1
- package/dist/components/loading-indicator/index.d.ts +1 -2
- package/dist/components/loading-indicator/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +1 -2
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/meter/index.d.ts +1 -2
- package/dist/components/meter/index.js.map +1 -1
- package/dist/components/navigation-bar/index.d.ts +1 -2
- package/dist/components/navigation-bar/index.js.map +1 -1
- package/dist/components/navigation-rail/index.d.ts +1 -2
- package/dist/components/navigation-rail/index.js.map +1 -1
- package/dist/components/navigation-tree/index.d.ts +1 -2
- package/dist/components/navigation-tree/index.js.map +1 -1
- package/dist/components/number-field/index.d.ts +1 -2
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/popover/index.d.ts +1 -2
- package/dist/components/popover/index.js +14 -4
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/product-icon/index.d.ts +1 -2
- package/dist/components/product-icon/index.js.map +1 -1
- package/dist/components/progress-indicator/index.d.ts +1 -2
- package/dist/components/progress-indicator/index.js.map +1 -1
- package/dist/components/radio-group/index.d.ts +1 -2
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/range-calendar/index.d.ts +1 -2
- package/dist/components/range-calendar/index.js +53 -80
- package/dist/components/range-calendar/index.js.map +1 -1
- package/dist/components/search-field/index.d.ts +1 -2
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/search-view/index.d.ts +1 -2
- package/dist/components/search-view/index.js.map +1 -1
- package/dist/components/segmented-button/index.d.ts +1 -2
- package/dist/components/segmented-button/index.js +261 -145
- package/dist/components/segmented-button/index.js.map +1 -1
- package/dist/components/select/index.d.ts +1 -2
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/separator/index.d.ts +1 -2
- package/dist/components/separator/index.js.map +1 -1
- package/dist/components/sheet/index.d.ts +1 -2
- package/dist/components/sheet/index.js +149 -82
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/slider/index.d.ts +1 -2
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/snackbar/index.d.ts +1 -2
- package/dist/components/snackbar/index.js.map +1 -1
- package/dist/components/split-button/index.d.ts +1 -2
- package/dist/components/split-button/index.js.map +1 -1
- package/dist/components/stack/index.d.ts +1 -2
- package/dist/components/stack/index.js.map +1 -1
- package/dist/components/supporting-pane/index.d.ts +1 -2
- package/dist/components/supporting-pane/index.js.map +1 -1
- package/dist/components/switch/index.d.ts +1 -2
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/table/index.d.ts +1 -2
- package/dist/components/table/index.js +251 -123
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/tabs/index.d.ts +1 -2
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/tag/index.d.ts +1 -2
- package/dist/components/tag/index.js.map +1 -1
- package/dist/components/text/index.d.ts +1 -2
- package/dist/components/text/index.js.map +1 -1
- package/dist/components/text-area/index.d.ts +1 -2
- package/dist/components/text-area/index.js.map +1 -1
- package/dist/components/text-field/index.d.ts +1 -2
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/time-field/index.d.ts +1 -2
- package/dist/components/time-field/index.js.map +1 -1
- package/dist/components/time-picker/index.d.ts +1 -2
- package/dist/components/time-picker/index.js.map +1 -1
- package/dist/components/token-field/index.d.ts +1 -2
- package/dist/components/token-field/index.js.map +1 -1
- package/dist/components/toolbar/index.d.ts +1 -2
- package/dist/components/toolbar/index.js.map +1 -1
- package/dist/components/tooltip/index.d.ts +1 -2
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/components/tree/index.d.ts +1 -2
- package/dist/components/tree/index.js.map +1 -1
- package/dist/control/index.js.map +1 -1
- package/dist/control/styles.js.map +1 -1
- package/dist/drag/hooks.d.ts +1 -2
- package/dist/drag/hooks.js.map +1 -1
- package/dist/drag/index.js.map +1 -1
- package/dist/drag/styles.js.map +1 -1
- package/dist/fab/styles.js.map +1 -1
- package/dist/field/index.d.ts +3 -4
- package/dist/field/index.js.map +1 -1
- package/dist/field/press.js.map +1 -1
- package/dist/field/root.js.map +1 -1
- package/dist/field/styles.js.map +1 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/glyphs/styles.js.map +1 -1
- package/dist/hooks/useAppBarScroll.d.ts +1 -2
- package/dist/hooks/useAppBarScroll.js.map +1 -1
- package/dist/hooks/useBottomEdge.js.map +1 -1
- package/dist/hooks/useClippedTitle.js.map +1 -1
- package/dist/hooks/useImageLoadingStatus.js.map +1 -1
- package/dist/hooks/useRipple.js +3 -2
- package/dist/hooks/useRipple.js.map +1 -1
- package/dist/hooks/useScrollStop.js.map +1 -1
- package/dist/hooks/useToggleGroupDisabled.js.map +1 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/indicator/index.js.map +1 -1
- package/dist/indicator/styles.d.ts +1 -2
- package/dist/indicator/styles.js.map +1 -1
- package/dist/kanso-ui-core/defaults-DMH0HWCw.d.ts +1 -2
- package/dist/keycap/context.js.map +1 -1
- package/dist/layout.d.ts +1 -2
- package/dist/layout.js.map +1 -1
- package/dist/mark/index.js.map +1 -1
- package/dist/mark/initials.js.map +1 -1
- package/dist/mark/styles.js.map +1 -1
- package/dist/navigation/context.js.map +1 -1
- package/dist/navigation/index.d.ts +2 -3
- package/dist/navigation/index.js.map +1 -1
- package/dist/navigation/styles.js.map +1 -1
- package/dist/overlay/index.js.map +1 -1
- package/dist/render/aria.js.map +1 -1
- package/dist/render/content.js.map +1 -1
- package/dist/render/name.d.ts +1 -2
- package/dist/render/ref.js.map +1 -1
- package/dist/render/useRender.d.ts +1 -2
- package/dist/render/useRender.js.map +1 -1
- package/dist/row/index.js.map +1 -1
- 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 +5 -1
- package/dist/segments/styles.js.map +1 -1
- package/dist/styles/chequer.js.map +1 -1
- package/dist/styles/color.js.map +1 -1
- package/dist/styles/focus.js.map +1 -1
- package/dist/styles/icon-button.js.map +1 -1
- package/dist/styles/merge.js.map +1 -1
- package/dist/styles/overlay.d.ts +2 -3
- package/dist/styles/overlay.js.map +1 -1
- package/dist/styles/picker.js.map +1 -1
- package/dist/styles/ripple.js.map +1 -1
- package/dist/styles/scheme.js.map +1 -1
- package/dist/styles.css +40 -8
- package/dist/swatch/index.js +19 -0
- package/dist/swatch/index.js.map +1 -0
- package/dist/theme-scope.d.ts +1 -2
- package/dist/theme-scope.js.map +1 -1
- package/dist/tokens/design.tokens.stylex.js.map +1 -1
- package/dist/tokens/values.js.map +1 -1
- package/package.json +16 -16
|
@@ -47,5 +47,4 @@ type ToolbarTone = 'neutral' | 'vibrant';
|
|
|
47
47
|
* the element a layout positions.
|
|
48
48
|
*/
|
|
49
49
|
declare function Toolbar$1({ orientation, tone, ...props }: RefAttributes<HTMLDivElement> & ToolbarProps$1): import("react").JSX.Element;
|
|
50
|
-
export { type ToolbarProps$1 as ToolbarProps, type ToolbarTone, Toolbar$1 as default };
|
|
51
|
-
//# sourceMappingURL=index.d.ts.map
|
|
50
|
+
export { type ToolbarProps$1 as ToolbarProps, type ToolbarTone, Toolbar$1 as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_c","stylex","Toolbar","RACToolbar","SeparatorContext","mergeStatefulStyles","styles","base","kGNEyG","kaIpWk","kB7OPa","kMwMTN","k1xSpc","kOIVth","kjj79g","k3XXqK","$$css","horizontal","kXwgrk","kAzted","k8WAf4","kg3NbH","neutral","kWkggS","vertical","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 kGNEyG: \"x6s0dn4\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n k1xSpc: \"x3nfvp2\",\n kOIVth: \"x126z3so\",\n kjj79g: \"xl56j7k\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n horizontal: {\n kXwgrk: \"x1q0g3np\",\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 kXwgrk: \"xdt5ytf\",\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 */\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,OAAO;CACT;CACAC,YAAY;EACVC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRL,OAAO;CACT;CACAM,SAAS;EACPC,QAAQ;EACRP,OAAO;CACT;CACAQ,UAAU;EACRN,QAAQ;EACRO,QAAQ;EACRL,QAAQ;EACRC,QAAQ;EACRL,OAAO;CACT;CACAU,SAAS;EACPH,QAAQ;EACRZ,QAAQ;EACRK,OAAO;CACT;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAAd,UAAA0B,IAAA;CAAA,MAAAC,IAAA7B,EAAA,EAAA;CAAA,IAAA8B;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAN,EAAA,OAAAD,IAAA;EAAiB,MAAA,EAAAQ,aAAAC,IAAAV,MAAAW,IAAA,GAAAC,YAAAX;EACf,MAAAQ,cAAAC,OAAAG,KAAAA,IAAA,eAAAH;EACA,MAAAV,OAAAW,OAAAE,KAAAA,IAAA,YAAAF;EAOe,MAAAG,KAAAL,gBAAgB,eAAhB,aAAA;EAAwD,IAAAM;EAAA,IAAAb,EAAA,OAAAY,IAAA;GADtBC,KAAA,EAAAN,aAClCK,GACf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` and `style` land on the tooltip itself.
|
|
59
59
|
*/
|
|
60
60
|
declare function Tooltip$1({ align, alignOffset, children, className, container, label, ref, side, sideOffset, style, ...props }: RefAttributes<HTMLDivElement> & TooltipProps): import("react").JSX.Element;
|
|
61
|
-
export { type TooltipAlign, type TooltipProps, type TooltipSide, Tooltip$1 as default };
|
|
62
|
-
//# sourceMappingURL=index.d.ts.map
|
|
61
|
+
export { type TooltipAlign, type TooltipProps, type TooltipSide, Tooltip$1 as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["_c","stylex","Tooltip","mergeStatefulStyles","overlay","placementOf","popupOrigin","styles","container","kWkggS","kaIpWk","kGVxlE","kB7OPa","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","ks0D6T","kAzted","k8WAf4","kg3NbH","$$css","DEFAULT_SIDE_OFFSET","align","alignOffset","children","className","label","side","sideOffset","style","t0","$","props","ref","t1","t2","t3","undefined","t4","t5","_temp","t6","t7","state","popup","placement","RACTooltip"],"sources":["../../../src/components/tooltip/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, StyleOrFunction, TooltipRenderProps, TooltipTriggerComponentProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Tooltip as RACTooltip, TooltipTrigger } from 'react-aria-components';\nimport type { OverlayAlign, OverlaySide } from '../../styles/overlay';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport { overlay, placementOf, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, typography } from '../../tokens/design.tokens.stylex';\n\n// The tooltips page's plain tooltip: a 24dp container on inverse surface\n// with 8dp of padding, holding one line of supporting text in inverse on\n// surface at 12 over 16, which is the body-small role. The page names a\n// shape token for the container without giving its value, so the container\n// takes the smallest corner the library has — a 24dp box has room for no\n// more.\n//\n// The rich tooltip on the same page is a hover-triggered `Popover`, which is\n// where its subhead, supporting text and buttons already live; this one is\n// text and nothing else, which is why it takes its label as a string rather\n// than as parts.\n//\n// The entry is the overlay module's, shared with every anchored surface, and\n// so is the origin it grows from — the tooltip comes out of the thing it\n// describes. The surface itself is not: a tooltip inverts the page's colours\n// where a popover sits on a container role, so it draws its own, and it lies\n// flat. The plain tooltip's tokens give a container colour, a shape and the\n// text roles and no elevation, so the popup's shadow is taken off; it is the\n// rich tooltip that sits at level 2. The popup's forced-colours border\n// stays, since that mode paints the fill in the page's own colour.\nconst styles = {\n container: {\n kWkggS: \"x1c5gpgi\",\n kaIpWk: \"x1tfhd1\",\n kGVxlE: \"x1gnnqk1\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1girmi0\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n ks0D6T: \"x10u2fgw\",\n kAzted: \"xjwf9q1\",\n k8WAf4: \"xmqoko8\",\n kg3NbH: \"xn60lsn\",\n $$css: true\n }\n};\n\n// The gap between the anchor and the tooltip. A number rather than a token,\n// because React Aria computes the position in JavaScript and so cannot read\n// a custom property — the same one place `Popover` spells a step out.\nconst DEFAULT_SIDE_OFFSET = 8;\n\n// The overlay module's, since which side a surface opens on is the same\n// question for every anchored overlay, and `Popover` and `Menu` ask it\n// there too. Aliased rather than re-declared so the names a call site\n// imports stay this component's.\ntype TooltipAlign = OverlayAlign;\ntype TooltipProps = {\n /**\n * Where the tooltip sits along the side it opens on.\n * @default 'center'\n */\n align?: TooltipAlign;\n /** Shifts the tooltip along that side, in pixels. */\n alignOffset?: number;\n /**\n * The element the tooltip describes, and nothing else. It has to be able\n * to take focus, since a tooltip a keyboard cannot reach is one most\n * people never see — wrap anything that cannot in `Focusable`, which this\n * package re-exports.\n */\n children?: ReactNode;\n /** A function may compute the class from the tooltip's render state. */\n className?: ClassNameOrFunction<TooltipRenderProps>;\n /**\n * Where to portal the tooltip. Defaults to the container of the `ThemeScope`\n * around it, which keeps the tooltip on that scope's tokens, or to the end of\n * `<body>` where there is none. A subtree themed through the `themeScope`\n * class has no container of its own, so point this inside it, or the tooltip\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\n /** What the tooltip says. Text, since the page's plain tooltip is text. */\n label: ReactNode;\n /**\n * Which side of the element the tooltip opens on. It flips to the opposite\n * side on its own when there is no room. `start` and `end` follow the\n * writing direction, so `end` is the right in English and the left in\n * Arabic; `left` and `right` stay put in either.\n * @default 'top'\n */\n side?: TooltipSide;\n /** The gap between the element and the tooltip, in pixels. */\n sideOffset?: number;\n /** A function may compute the style from the tooltip's render state. */\n style?: StyleOrFunction<TooltipRenderProps>;\n} & Omit<TooltipTriggerComponentProps, 'children'>;\ntype TooltipSide = OverlaySide;\n\n/**\n * A label for the element it wraps, shown while that element is hovered or\n * focused — the tooltips page's plain tooltip. Its open state is React\n * Aria's: pass `isOpen` with `onOpenChange` to control it, `defaultOpen` to\n * let it keep its own, and `delay` and `closeDelay` for how long a pointer\n * has to rest before it appears and after it leaves.\n *\n * A tooltip is not a place to put anything a person has to read or reach:\n * it is skipped by touch entirely and dismissed by Escape, so what it says\n * has to be a repeat of what the element already means. Anything with a\n * button in it, or worth reading twice, is a `Popover`.\n *\n * The call site's `className` and `style` land on the tooltip itself.\n */\nfunction Tooltip({\n align = 'center',\n alignOffset,\n children,\n className,\n container,\n label,\n ref,\n side = 'top',\n sideOffset = DEFAULT_SIDE_OFFSET,\n style,\n ...props\n}: RefAttributes<HTMLDivElement> & TooltipProps) {\n return <TooltipTrigger {...props}>\n {children}\n <RACTooltip crossOffset={alignOffset} offset={sideOffset} placement={placementOf(side, align)}\n // The trigger renders no element of its own, so the ref lands on\n // the surface, as the call site's class and style do.\n ref={ref}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} {...mergeStatefulStyles((state: TooltipRenderProps) => stylex.props(overlay.popup, styles.container, popupOrigin(state.placement)), {\n className,\n style\n })}>\n {label}\n </RACTooltip>\n </TooltipTrigger>;\n}\nexport type { TooltipAlign, TooltipProps, TooltipSide };\nexport default Tooltip;"],"mappings":";;;;;;;;AAgCA,MAAMO,SAAS,EACbC,WAAW;CACTC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,QAAQ;CACRC,OAAO;AACT,EACF;AAKA,MAAMC,sBAAsB;;;;;;;;;;;;;;;AA+D5B,SAAAtB,UAAA+B,IAAA;CAAA,MAAAC,IAAAlC,EAAA,EAAA;CAAA,IAAA0B;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAApB;CAAA,IAAAqB;CAAA,IAAAM;CAAA,IAAAC;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAL,EAAA,OAAAD,IAAA;EAAiB,CAAA,CAAAR,OAAAY,IAAAX,aAAAC,UAAAC,WAAApB,WAAAqB,OAAAO,KAAAN,MAAAQ,IAAAP,YAAAQ,IAAAP,OAAA,GAAAG,SAAAF;EAY8BC,EAAA,KAAAD;EAAAC,EAAA,KAAAR;EAAAQ,EAAA,KAAAP;EAAAO,EAAA,KAAAN;EAAAM,EAAA,KAAA1B;EAAA0B,EAAA,KAAAL;EAAAK,EAAA,KAAAC;EAAAD,EAAA,KAAAE;EAAAF,EAAA,KAAAF;EAAAE,EAAA,KAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAK;CAAA,OAAA;EAAAb,cAAAQ,EAAA;EAAAP,WAAAO,EAAA;EAAAN,YAAAM,EAAA;EAAA1B,YAAA0B,EAAA;EAAAL,QAAAK,EAAA;EAAAC,QAAAD,EAAA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,QAAAC,SAAAD,EAAA,QAAAU,IAAA;EAZVC,KAAA,qBAAC,gBAAD;GAAe,GAAKV;GAApB,UAAA,CACFR,UACDiB,EAFkB;;EAaHV,EAAA,MAAAP;EAAAO,EAAA,MAAAC;EAAAD,EAAA,MAAAU;EAAAV,EAAA,MAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,OAbZW;AAaY;AA1BrB,SAAAF,MAAAG,OAAA;CAAA,OAoBgG7C,MAAaG,QAAO2C,OAAQxC,OAAMC,WAAYF,YAAYwC,MAAKE,SAAU,CAAC;AAAC"}
|
|
@@ -120,5 +120,4 @@ declare function TreeLoadMore({ label, ...props }: RefAttributes<HTMLDivElement>
|
|
|
120
120
|
* A named group of rows, with its heading above them.
|
|
121
121
|
*/
|
|
122
122
|
declare function TreeSection$1<T extends object = object>({ children, header, ...props }: TreeSectionProps<T>): import("react").JSX.Element;
|
|
123
|
-
export { TreeItem$1 as TreeItem, type TreeItemProps$1 as TreeItemProps, TreeLoadMore, type TreeLoadMoreProps, type TreeProps$1 as TreeProps, TreeSection$1 as TreeSection, type TreeSectionProps, Tree$1 as default };
|
|
124
|
-
//# sourceMappingURL=index.d.ts.map
|
|
123
|
+
export { TreeItem$1 as TreeItem, type TreeItemProps$1 as TreeItemProps, TreeLoadMore, type TreeLoadMoreProps, type TreeProps$1 as TreeProps, TreeSection$1 as TreeSection, type TreeSectionProps, Tree$1 as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","ReactNode","RefAttributes","TreeItemProps","RACTreeItemProps","TreeLoadMoreItemProps","RACTreeLoadMoreItemProps","TreeProps","RACTreeProps","TreeItemRenderProps","stylex","createContext","useContext","Button","RACButton","Tree","RACTree","TreeHeader","RACTreeHeader","TreeItem","RACTreeItem","TreeItemContent","RACTreeItemContent","TreeLoadMoreItem","RACTreeLoadMoreItem","TreeSection","RACTreeSection","CollectionLoadMore","collectionStyles","containerClasses","rowItemStyles","ChevronEndGlyph","useRipple","RowContent","focus","mergeStatefulStyles","mergeStyles","colors","motion","radii","spacing","Checkbox","RACTreeSectionProps","Parameters","T","SelectLabelContext","undefined","styles","chevron","kGNEyG","kWkggS","kaIpWk","kMzoRj","kB7OPa","kMwMTN","kkrTdU","k1xSpc","kmuXW","kjj79g","kmVPX3","$$css","indent","kZCmMZ","TreeHeaderProps","children","Omit","TreeItemText","className","leading","style","supporting","trailing","headline","textValue","TreeLoadMoreProps","label","selectionBehavior","selectLabel","TreeSectionProps","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","stylex.props","RACButton","Tree","_c","RACTree","TreeHeader","RACTreeHeader","TreeItem","RACTreeItem","RACTreeItemContent","props","RACTreeLoadMoreItem","TreeSection","RACTreeSection"],"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,MAAM8C,qBAAqBlC,cAAkCmC,KAAAA,CAAS;AACtE,MAAMC,SAAS;CACbC,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;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A,MAAAK;EAAAL,EAAA,MAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAHZM;AAGY;AAErBtF,OAAKsG,OAAOlG;AACZJ,OAAKuG,WAAWJ;AAChBnG,OAAKwG,UAAU9F"}
|
|
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","TreeHeader","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,KA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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,OAAKiF,OAAO9E;AACZH,OAAKkF,WAAWJ;AAChB9E,OAAKmF,UAAU7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["stylex","fieldChromeStyles","controlStyles","children","isDisabled","isRequired","state","isReadOnly","ControlDescription","t0","$","_c","t1","undefined","t2","t3","Symbol","for","messages","message","messageLine","messageIndent","t4","messageDisabled","t5","INTERACTIVE","ControlLabel","label","labelReadOnly","labelDisabled","keepToInteractive","event","currentTarget","target","interactive","Element","closest","contains","stopPropagation"],"sources":["../../src/control/index.tsx"],"sourcesContent":["import type { ReactNode, SyntheticEvent } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { Text } from 'react-aria-components';\nimport { RequiredMark } from '../field';\nimport { fieldChromeStyles } from '../field/styles';\nimport { controlStyles } from './styles';\ntype ControlDescriptionProps = {\n /** The hint. Nothing renders when there is none. */\n children: string | undefined;\n /**\n * Whether the option is disabled, by itself or by its group, which fades\n * the hint with the option's label.\n * @default false\n */\n isDisabled?: boolean;\n};\ntype ControlLabelProps = {\n /** The label's text. Nothing renders when there is none. */\n children: ReactNode;\n /**\n * Whether the control must be chosen, which ends the label in the asterisk\n * every required field's label ends in.\n * @default false\n */\n isRequired?: boolean;\n /** The render state React Aria hands the component. */\n state: ControlLabelState;\n};\n\n/**\n * The state a label reads. Each of React Aria's three render states carries\n * more than this, and this is the part all three share.\n */\ntype ControlLabelState = {\n isDisabled: boolean;\n isReadOnly: boolean;\n};\n\n/**\n * The hint under one option of a group, in the second column of its grid and\n * in the option's description slot, so it is read with the option.\n *\n * Not `FieldMessage`, which is the line under a whole field: it reads the\n * validation of the field around it and draws an error, or an empty line for\n * one to arrive in. An option sits inside its group's validation, so through\n * `FieldMessage` it took the group's error for its own — React Aria's\n * `FieldError` then rendered into the option's slots, which hold no error\n * slot, and threw — dropped its own hint whenever the group was invalid, and\n * drew an empty line under every option inside a `Form`. The group's own line\n * is where its error goes, and an option has only its hint to say.\n */\nfunction ControlDescription({\n children,\n isDisabled = false\n}: ControlDescriptionProps) {\n if (children === undefined) {\n return null;\n }\n return <div {...stylex.props(controlStyles.messages)}>\n <div {...stylex.props(fieldChromeStyles.message, fieldChromeStyles.messageLine, fieldChromeStyles.messageIndent)}>\n <Text slot=\"description\" {...stylex.props(fieldChromeStyles.message, isDisabled && fieldChromeStyles.messageDisabled)}>\n {children}\n </Text>\n </div>\n </div>;\n}\n\n// What a press inside a label belongs to rather than the control: anything\n// that acts on its own, where a native `<label>` leaves the press to it too.\nconst INTERACTIVE = 'a[href], button, input, select, textarea, [role=\"button\"], [role=\"link\"]';\n\n/**\n * The label beside a selection control, in the second column of its grid.\n *\n * Renders nothing without children, which is what a control labelled from\n * outside — by a group's legend, or an `aria-label` — needs.\n *\n * A link or a button inside it acts on its own rather than toggling the\n * control — see `keepToInteractive`.\n */\nfunction ControlLabel({\n children,\n isRequired = false,\n state\n}: ControlLabelProps) {\n if (children === undefined) {\n return null;\n }\n return (\n // The handlers only stop events on their way out of the label; they\n // handle nothing themselves, which is what jsx-a11y cannot tell.\n // oxlint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events\n <span onClick={keepToInteractive} onKeyDown={keepToInteractive} onKeyUp={keepToInteractive} onMouseDown={keepToInteractive} onMouseUp={keepToInteractive} onPointerDown={keepToInteractive} onPointerUp={keepToInteractive} onTouchEnd={keepToInteractive} onTouchStart={keepToInteractive} {...stylex.props(controlStyles.label, state.isReadOnly && controlStyles.labelReadOnly, state.isDisabled && controlStyles.labelDisabled)}>\n {children}\n {isRequired ? <RequiredMark /> : null}\n </span>\n );\n}\n\n/**\n * Keeps a press or a key that starts in something interactive inside the\n * label — the link in \"I agree to the terms\" — from reaching the control's\n * own press handling, which sits on the element around the label. React Aria\n * took such a press as a press on the control, toggling it and stopping the\n * link's own default, so a click toggled the box and left the page where it\n * was, and Enter did neither. Stopped here, the event goes no further than\n * the label, and the browser's own default — following the link — is left\n * alone, as a native label leaves it. A press anywhere else in the label\n * still reaches the control and toggles it.\n */\nfunction keepToInteractive(event: SyntheticEvent<HTMLSpanElement>) {\n const {\n currentTarget,\n target\n } = event;\n const interactive = target instanceof Element ? target.closest(INTERACTIVE) : null;\n if (interactive !== null && currentTarget.contains(interactive)) {\n event.stopPropagation();\n }\n}\nexport type { ControlDescriptionProps, ControlLabelProps };\nexport { ControlDescription, ControlLabel };"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmDA,SAAAQ,mBAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAA4B,MAAA,EAAAR,UAAAC,YAAAQ,OAAAH;CAE1B,MAAAL,aAAAQ,OAAAC,KAAAA,IAAA,QAAAD;CAEA,IAAIT,aAAaU,KAAAA,GAAS,OACjB;CACR,IAAAC;CAAA,IAAAC;CAAA,IAAAL,EAAA,OAAAM,OAAAC,IAAA,2BAAA,GAAA;EACeH,KAAAd,MAAaE,cAAagB,QAAS;EACtCH,KAAAf,MAAaC,kBAAiBkB,SAAUlB,kBAAiBmB,aAAcnB,kBAAiBoB,aAAc;EAACX,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAA;EAAAD,KAAAJ,EAAA;EAAAK,KAAAL,EAAA;CAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,OAAAN,YAAA;EACjFkB,KAAAtB,MAAaC,kBAAiBkB,SAAUf,cAAcH,kBAAiBsB,eAAgB;EAACb,EAAA,KAAAN;EAAAM,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,IAAAc;CAAA,IAAAd,EAAA,OAAAP,YAAAO,EAAA,OAAAY,IAAA;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AAMhB;GAAhS,UAAA,CACGX,UACAY,EACI;;EAAAL,EAAA,KAAAP;EAAAO,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OAHPY;AAGO;;;;;;;;;;;;AAeX,SAASQ,kBAAkBC,OAAwC;CACjE,MAAM,EACJC,eACAC,WACEF;CACJ,MAAMG,cAAcD,kBAAkBE,UAAUF,OAAOG,QAAQX,WAAW,IAAI;CAC9E,IAAIS,gBAAgB,QAAQF,cAAcK,SAASH,WAAW,GAC5DH,MAAMO,gBAAgB;AAE1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["
|
|
1
|
+
{"version":3,"file":"styles.js","names":["controlStyles","controlDisabled","kkrTdU","$$css","controlReadOnly","disc","kgeoSG","kFcpXp","kEoFBp","k6CgDc","kGNEyG","kWkggS","kZKoxP","kaIpWk","kB7OPa","k1xSpc","kmuXW","kzqmXN","kjj79g","kVAEAm","kIyJzY","k1ekBW","kAMwcw","field","kumcoG","k7Eaqz","label","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kHjlTd","k8WAf4","kZCmMZ","labelDisabled","labelReadOnly","messages","kEXP64","stack","kXwgrk","khm7nJ"],"sources":["../../src/control/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. 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 row a selection control draws, shared by Checkbox, Switch and Radio.\n// Each wrote it out in full: the two-column grid, the body-large label with\n// its disabled and read-only fades, the messages cell under the text, and the\n// cursors the control takes in those two states. Switch's own comment already\n// said it drew \"the two-column grid the checkbox uses\" while keeping a second\n// copy, so the coupling was recorded in prose rather than in code — the same\n// thing src/field and src/row were extracted to stop.\n//\n// The set is closed at three. React Aria Components has no fourth component\n// drawing this row, and CheckboxGroup is a container rather than a control.\n// What this is worth is that the three cannot drift apart, and that the\n// repository's own convention — a style more than one component draws lives\n// beside src/components, not inside it — holds here too.\n//\n// Two things deliberately stay with each component.\n//\n// The state layers are three different shapes rather than one shape with\n// three sets of key names. Checkbox carries an `error` key Radio has no\n// equivalent for, Checkbox's pressed set inverts its own key names, and\n// Switch deliberately does not invert at all. One style keyed on a `marked`\n// boolean would have to encode an error branch one caller uses, an inversion\n// another uses, and a documented non-inversion for the third, which costs a\n// reader more than the three short `stylex.create` calls it would replace.\n//\n// And the disc's colour. Checkbox draws it in `onSurface` and Radio in\n// `onSurfaceVariant`, which is the one declaration their otherwise identical\n// discs disagree on, so `disc` holds the other fourteen and each component\n// composes its own colour after.\n// The two sizes the checkbox, radio button and switch pages each give, and\n// the decision the three of them share.\n//\n// Every one of those pages lists them as separate measurements — a 40dp state\n// layer and a 48dp target — and all three components here recorded the pair in\n// their header comments while drawing only the first. The target is what the\n// pages ask a press to reach, so it is drawn: `disc` carries a transparent\n// `::before` that reaches the 4dp either side, taking the press because a\n// pseudo-element is part of the element it belongs to. A lone control moves\n// nothing, since that box is out of flow — the alternative, a 48dp disc,\n// would have grown every form in every consuming app by 8dp a row.\n//\n// A group's rows are the exception, and `stack` is how. Rows on the 40dp\n// pitch of their layers put each target 8dp into the next row's, and the\n// later row is painted over the earlier, so a press on the bottom of one\n// row's visible layer went to the row below it. The pages ask that a target\n// not overlap its neighbour, so a group spaces its rows by the 8dp the two\n// sizes differ by, and the targets meet edge to edge on a 48dp pitch.\n//\n// Switch composes neither of these. Its track is its own 52 by 40, so it\n// carries the same `::before` in its own file, over the one axis that is\n// short.\n//\n// The layer is also what the label centres its first line on, and the two\n// have to agree: a disc resized without the label following it would put the\n// control off its own label again, which is the drift this row already had\n// once. The target is deliberately not in that sum — a label centred on an\n// invisible box would sit 4dp below the disc a reader can see.\n//\n// Literals rather than `sizing.controlSm` and `controlMd`, which happen to\n// hold the same two numbers. Those are steps of the control scale, spent on\n// button heights; these are one page's state layer and one page's target, and\n// a consumer resizing their buttons should not move either.\nconst LAYER_SIZE = '40px';\nconst TARGET_SIZE = '48px';\n\n/** How far the target reaches past the layer on each side: 4dp. */\nconst TARGET_REACH = `calc((${LAYER_SIZE} - ${TARGET_SIZE}) / 2)`;\n\n/** The room two targets need between their layers to meet without overlap. */\nconst TARGET_GAP = `calc(${TARGET_SIZE} - ${LAYER_SIZE})`;\nconst controlStyles = {\n controlDisabled: {\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n controlReadOnly: {\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n disc: {\n kgeoSG: \"x1cpjm7i\",\n kFcpXp: \"x15kbrqr\",\n kEoFBp: \"x1hmns74\",\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"x1vqgdyp\",\n kaIpWk: \"x16fbrrb\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x100vrsf\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x1n2onr6\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x15406qy\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n field: {\n kGNEyG: \"x7a106z\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"xrvj5dj\",\n kumcoG: \"x1rkzygb\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n },\n label: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kkrTdU: \"x1ypdohk\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n k7Eaqz: \"xeuugli\",\n kHjlTd: \"xj0a0fe\",\n k8WAf4: \"x18r0n19\",\n kZCmMZ: \"xdxifnh\",\n $$css: true\n },\n labelDisabled: {\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n labelReadOnly: {\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n messages: {\n kB7OPa: \"x9f619\",\n kEXP64: \"x1xdureb\",\n k7Eaqz: \"xeuugli\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n stack: {\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n khm7nJ: \"xtfsegk\",\n $$css: true\n }\n};\nexport { controlStyles };"],"mappings":";AA+EA,MAAMA,gBAAgB;CACpBC,iBAAiB;EACfC,QAAQ;EACRC,OAAO;CACT;CACAC,iBAAiB;EACfF,QAAQ;EACRC,OAAO;CACT;CACAE,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRZ,QAAQ;EACRa,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRnB,OAAO;CACT;CACAoB,OAAO;EACLb,QAAQ;EACRI,QAAQ;EACRC,QAAQ;EACRS,QAAQ;EACRC,QAAQ;EACRtB,OAAO;CACT;CACAuB,OAAO;EACLZ,QAAQ;EACRa,QAAQ;EACRzB,QAAQ;EACR0B,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRhC,OAAO;CACT;CACAiC,eAAe;EACbT,QAAQ;EACRzB,QAAQ;EACRC,OAAO;CACT;CACAkC,eAAe;EACbnC,QAAQ;EACRC,OAAO;CACT;CACAmC,UAAU;EACRxB,QAAQ;EACRyB,QAAQ;EACRd,QAAQ;EACRQ,QAAQ;EACR9B,OAAO;CACT;CACAqC,OAAO;EACLzB,QAAQ;EACR0B,QAAQ;EACRC,QAAQ;EACRvC,OAAO;CACT;AACF"}
|
package/dist/drag/hooks.d.ts
CHANGED
|
@@ -19,5 +19,4 @@ import { useDragAndDrop } from "react-aria-components";
|
|
|
19
19
|
* Passing `renderDropIndicator` or `renderDragPreview` replaces the default.
|
|
20
20
|
*/
|
|
21
21
|
declare function useDragAndDrop$1(options: Parameters<typeof useDragAndDrop>[0]): ReturnType<typeof useDragAndDrop>;
|
|
22
|
-
export { useDragAndDrop$1 as useDragAndDrop };
|
|
23
|
-
//# sourceMappingURL=hooks.d.ts.map
|
|
22
|
+
export { useDragAndDrop$1 as useDragAndDrop };
|
package/dist/drag/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","names":["
|
|
1
|
+
{"version":3,"file":"hooks.js","names":["_c","stylex","useDragAndDrop","useRACDragAndDrop","dragStyles","renderDragPreview","items","first","rest","length","preview","renderDropIndicator","target","options","$","t0","DropIndicator"],"sources":["../../src/drag/hooks.tsx"],"sourcesContent":["'use client';\n\nimport type { JSX } from 'react';\nimport type { DropTarget } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useDragAndDrop as useRACDragAndDrop } from 'react-aria-components';\nimport { DropIndicator } from '.';\nimport { dragStyles } from './styles';\n\n// The hook half of `src/drag`, apart from ./index.tsx so that file exports\n// components alone — which is what keeps fast refresh working for it, the\n// same arrangement `src/row` uses.\n\n// React Aria types the preview renderer's argument with a `DragItem` it does\n// not export, so the shape is read back off the option that takes it.\ntype DragItems = Parameters<NonNullable<Parameters<typeof useRACDragAndDrop>[0]['renderDragPreview']>>[0];\n\n// What is drawn under the pointer while a drag is in flight. React Aria\n// hands it the items being dragged, each a map of type to value; what is\n// shown is the plain text one, and how many others are coming with it.\n//\n// The parameter type is taken off the option rather than imported, since\n// `DragItem` is not on the package's public surface.\nfunction renderDragPreview(items: DragItems): JSX.Element {\n const first = items[0]?.['text/plain'] ?? '';\n const rest = items.length - 1;\n return <div {...stylex.props(dragStyles.preview)}>\n {rest > 0 ? `${first} + ${rest}` : first}\n </div>;\n}\nfunction renderDropIndicator(target: DropTarget): JSX.Element {\n return <DropIndicator target={target} />;\n}\n\n/**\n * React Aria's drag and drop hooks, with this library's drop indicator and\n * drag preview as the defaults. Hand what it returns to a `List`, `ListBox`,\n * `Table` or `Tree` as `dragAndDropHooks`.\n *\n * ```tsx\n * const { dragAndDropHooks } = useDragAndDrop({\n * getItems: (keys) => [...keys].map((key) => ({ 'text/plain': String(key) })),\n * onReorder: (event) => { … },\n * })\n *\n * <List aria-label=\"Label\" dragAndDropHooks={dragAndDropHooks}>…</List>\n * ```\n *\n * Everything else is React Aria's and is not wrapped — `getItems`,\n * `onReorder`, `onInsert`, `acceptedDragTypes` and the rest decide what may\n * be dragged where, which is the page's business rather than the row's.\n * Passing `renderDropIndicator` or `renderDragPreview` replaces the default.\n */\nfunction useDragAndDrop(options: Parameters<typeof useRACDragAndDrop>[0]): ReturnType<typeof useRACDragAndDrop> {\n return useRACDragAndDrop({\n renderDragPreview,\n renderDropIndicator,\n ...options\n });\n}\nexport { useDragAndDrop };"],"mappings":";;;;;;;;AAuBA,SAASK,kBAAkBC,OAA+B;CACxD,MAAMC,QAAQD,MAAM,EAAE,GAAG,iBAAiB;CAC1C,MAAME,OAAOF,MAAMG,SAAS;CAC5B,OAAO,oBAAC,OAAD;EAAK,GAAIR,MAAaG,WAAWM,OAAO;EAC1CF,UAAAA,OAAO,IAAI,GAAGD,MAAK,KAAMC,SAASD;CAChC,CAAA;AACT;AACA,SAASI,oBAAoBC,QAAiC;CAC5D,OAAO,oBAACI,iBAAD,EAAuBJ,OAAO,CAAA;AACvC;;;;;;;;;;;;;;;;;;;;AAqBA,SAAAV,iBAAAW,SAAA;CAAA,MAAAC,IAAAd,EAAA,CAAA;CAAA,IAAAe;CAAA,IAAAD,EAAA,OAAAD,SAAA;EAC2BE,KAAA;GAAAV;GAAAM;GAAA,GAGpBE;EACL;EAACC,EAAA,KAAAD;EAAAC,EAAA,KAAAC;CAAA,OAAAA,KAAAD,EAAA;CAAA,OAJMX,eAAkBY,EAIxB;AAAC"}
|
package/dist/drag/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["DropIndicator","indicatorClassName","t0","$","_c","target","t1","RACDropIndicator"],"sources":["../../src/drag/index.tsx"],"sourcesContent":["import type { DropTarget } from 'react-aria-components'\n\nimport { DropIndicator as RACDropIndicator } from 'react-aria-components'\n\nimport { indicatorClassName } from './styles'\n\n// What drag and drop looks like across the four collections that do it —\n// List, ListBox, Table and Tree. React Aria supplies the behaviour through\n// `useDragAndDrop` and renders an unstyled line between items; what is here\n// is the line and the preview, and a wrapper that makes both the default so\n// a call site gets them without wiring either.\n//\n// Apart from `src/components` because it is shared internals rather than a\n// component: a directory there is a public component with stories, a barrel\n// entry and a `styling.test.tsx` case, and this has none of the three. The\n// one name it does put on the public surface is `useDragAndDrop`, which\n// `src/react-aria.ts` exports in place of React Aria's own.\n//\n// The lists page draws one part of a drag: the dragged row, lifted to\n// elevation 4 under a pressed layer, which the row a drag started from takes\n// as `dragging` in `src/row` — in List, ListBox and Tree through\n// `rowItemStyles`, and in Table's own row. Three things are this library's\n// own, since no page draws them.\n//\n// **The line between two items is the primary role, 2dp.** It is the same\n// weight and colour a focus ring takes, which is the nearest thing the\n// system has to \"this is where the thing you are moving will land\".\n//\n// **A row or a whole collection a drop lands on draws that line around\n// itself**, as an outline inside its edges over a primary layer at the hover\n// opacity — `dropTarget` in `src/row` and in `src/collection`, which Table's\n// own row and box take too.\n//\n// **The preview is the row's own type on a raised surface.** A drag preview\n// that looked nothing like the row it came from would read as a second\n// thing rather than as the row in transit.\n\n/**\n * The line that shows where a dragged item would land. Rendered by\n * {@link useDragAndDrop} rather than by a call site, which is why it takes\n * React Aria's target rather than props of its own.\n */\nfunction DropIndicator({ target }: { target: DropTarget }) {\n return <RACDropIndicator className={indicatorClassName} target={target} />\n}\n\nexport { DropIndicator }\n"],"mappings":";;;;;;;;;;AA0CA,SAAAA,gBAAAE,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAuB,MAAA,EAAAC,WAAAH;CAAkC,IAAAI;CAAA,IAAAH,EAAA,OAAAE,QAAA;EAChDC,KAAA,oBAACC,eAAD;GAA6BN,WAAAA;GAA4BI;EAAM,CAAA;EAAIF,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAAnEG;AAAmE"}
|
package/dist/drag/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["
|
|
1
|
+
{"version":3,"file":"styles.js","names":["dragStyles","indicator","kWkggS","kZKoxP","kaIpWk","kB7OPa","kqGvvJ","k3XXqK","kVAEAm","kY2c9j","$$css","indicatorActive","kLZC3w","kPef9Z","kEafiO","preview","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","ks0D6T","kVQacm","k8WAf4","kg3NbH","kg5iWk","khDVqt","indicatorClassName","state","isDropTarget","className"],"sources":["../../src/drag/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, typography } from '../tokens/design.tokens.stylex';\n\n// Apart from ./index.tsx so that file exports components alone, which is what\n// keeps fast refresh working for it — the same arrangement `src/row` uses.\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 dragStyles = {\n indicator: {\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"x36qwtl\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kqGvvJ: \"x16sahtb\",\n k3XXqK: \"x1t137rt\",\n kVAEAm: \"x1n2onr6\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n indicatorActive: {\n kWkggS: \"xnety89\",\n kLZC3w: \"x4hsqty\",\n kPef9Z: \"x4z998w\",\n kEafiO: \"x7sdbh0\",\n $$css: true\n },\n preview: {\n kWkggS: \"xvkjz1l\",\n kaIpWk: \"x1xdvaa9\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n ks0D6T: \"x1va8c73\",\n kVQacm: \"xb3r6kr\",\n k8WAf4: \"x1cmllll\",\n kg3NbH: \"x18fpw6u\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n }\n};\n\n// The line's classes, from React Aria's own render state.\nfunction indicatorClassName(state: {\n isDropTarget: boolean;\n}) {\n return {\n 0: {\n className: \"xjbqb8w x36qwtl x1dkaolv x9f619 x16sahtb x1t137rt x1n2onr6 x1vjfegm\"\n },\n 1: {\n className: \"x36qwtl x1dkaolv x9f619 x16sahtb x1t137rt x1n2onr6 x1vjfegm xnety89 x4hsqty x4z998w x7sdbh0\"\n }\n }[!!state.isDropTarget << 0].className ?? '';\n}\nexport { dragStyles, indicatorClassName };"],"mappings":";AAYA,MAAMA,aAAa;CACjBC,WAAW;EACTC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,iBAAiB;EACfT,QAAQ;EACRU,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRJ,OAAO;CACT;CACAK,SAAS;EACPb,QAAQ;EACRE,QAAQ;EACRC,QAAQ;EACRW,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRjB,OAAO;CACT;AACF;AAGA,SAASkB,mBAAmBC,OAEzB;CACD,OAAO;EACL,GAAG,EACDE,WAAW,sEACb;EACA,GAAG,EACDA,WAAW,8FACb;CACF,EAAE,CAAC,CAACF,MAAMC,gBAAgB,EAAE,CAACC,aAAa;AAC5C"}
|
package/dist/fab/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["
|
|
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;EACPF,QAAQ;EACRH,OAAO;CACT;CACAM,SAAS;EACPH,QAAQ;EACRZ,QAAQ;EACRS,OAAO;CACT;CACAO,MAAM;EACJpB,QAAQ;EACRO,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRI,OAAO;CACT;CACAQ,SAAS;EACPL,QAAQ;EACRZ,QAAQ;EACRS,OAAO;CACT;AACF;AAGA,MAAMS,WAAW;CACfC,IAAI;EACFC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRb,OAAO;CACT;CACAc,IAAI;EACFH,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRb,OAAO;CACT;CACAe,IAAI;EACFJ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRb,OAAO;CACT;AACF;AAIA,MAAMgB,mBAAmB;CACvBN,IAAI;EACFC,QAAQ;EACRC,QAAQ;EACRK,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRvB,OAAO;CACT;CACAc,IAAI;EACFH,QAAQ;EACRC,QAAQ;EACRK,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRvB,OAAO;CACT;CACAe,IAAI;EACFJ,QAAQ;EACRC,QAAQ;EACRK,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRvB,OAAO;CACT;AACF;AAGA,MAAMwB,eAAe;CACnBd,IAAI;EACFQ,QAAQ;EACRlB,OAAO;CACT;CACAc,IAAI;EACFI,QAAQ;EACRlB,OAAO;CACT;CACAe,IAAI;EACFG,QAAQ;EACRlB,OAAO;CACT;AACF;AAqCA,MAAM8B,WAAW;CACfD,QAAAA;EAjBAH,SAAS;GACPxB,QAAQ;GACRE,QAAQ;GACRJ,OAAO;EACT;EACA2B,WAAW;GACTzB,QAAQ;GACRE,QAAQ;GACRJ,OAAO;EACT;EACA4B,UAAU;GACR1B,QAAQ;GACRE,QAAQ;GACRJ,OAAO;EACT;CAGA6B;CACAJ,OAAAA;EAnCAC,SAAS;GACPxB,QAAQ;GACRE,QAAQ;GACRJ,OAAO;EACT;EACA2B,WAAW;GACTzB,QAAQ;GACRE,QAAQ;GACRJ,OAAO;EACT;EACA4B,UAAU;GACR1B,QAAQ;GACRE,QAAQ;GACRJ,OAAO;EACT;CAqBAyB;AACF"}
|
package/dist/field/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "react";
|
|
2
|
+
import "react-aria-components";
|
|
3
3
|
type FieldVariant = 'filled' | 'outlined';
|
|
4
|
-
export type { FieldVariant };
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
4
|
+
export type { FieldVariant };
|