@kanso-labs/kanso-ui 0.47.2 → 0.47.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","stylex","createContext","useContext","useEffect","useState","Tabs","RACTabs","Tab","refCallback","mergeStatefulStyles","mergeStyles","styles","indicator","k6CgDc","kWkggS","kZKoxP","kLZC3w","kPef9Z","kEafiO","kfmiAY","krdFHd","kB7OPa","kzqmXN","krVfgx","kkqhue","kUOVxO","k7Eaqz","kVAEAm","kIyJzY","k1ekBW","kAMwcw","$$css","indicatorSecondary","indicatorSecondaryVertical","kBCPoo","k8ry5P","ke9TFa","kYYq5F","kt4wiu","indicatorVertical","kVL7Gh","kqGvvJ","kAzted","label","kGNEyG","k1xSpc","kjj79g","ks0D6T","labelInline","kOIVth","labelStacked","kXwgrk","tab","kMzoRj","kMwMTN","kkrTdU","kCS8Yb","kzQI83","kmuXW","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kjBf7l","kInvED","k3XXqK","kMeerF","k8WAf4","kg3NbH","kybGjl","tabActive","tabActiveFocused","tabActiveHovered","tabActiveSecondary","tabDisabled","tabInactive","tabInactiveEngaged","tabInactiveFocused","tabInactiveHovered","tabPressed","tabScrollable","tabSecondaryFocused","tabSecondaryHovered","tabSecondaryPressed","tabStacked","tabVertical","VARIANTS","primary","active","activeFocused","activeHovered","inactiveFocused","inactiveHovered","horizontal","vertical","pressed","secondary","layout","orientation","variant","BarContext","revealed","WeakSet","NO_PANELS","Set","PanelsContext","RegisterPanelContext","id","children","badgeFor","badge","icon","undefined","className","revealInBar","element","closest","bar","first","has","add","box","getBoundingClientRect","room","left","Math","min","max","right","top","bottom","scrollBy","behavior","tabClasses","stacked","roles","state","engaged","isHovered","isFocusVisible","isPressed","props","isSelected","isDisabled","tabContent","hasIcon","after","underLabel","text","tabRenderer","hasPanel","render","domProps","adjusted","t0","$","t1","t2","t3","t4","panels","setPanels","t5","Symbol","for","previous","next","previous_0","next_0","delete","register","T0","t6","0","1","t7","t8","t9","t10","TabsList","2","3","TabsPanel","TabsPanels","TabsTab","ref","List","Panel","Panels","RACSelectionIndicator","RACTabPanels"],"sources":["../../../src/components/tabs/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { Key, TabsProps as RACTabsProps, TabListProps, TabPanelProps, TabPanelsProps, TabProps, TabRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';\nimport { SelectionIndicator as RACSelectionIndicator, TabPanels as RACTabPanels, Tabs as RACTabs, Tab, TabList, TabPanel } from 'react-aria-components';\nimport { refCallback } from '../../render/ref';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\nimport Badge from '../badge';\n\n// The tabs page's primary and secondary tabs. Both are a 48dp bar on the\n// surface, divided into equal sections, with a 1dp outline-variant divider\n// inside the bar along its bottom edge.\n//\n// **Primary** draws the active tab in the primary role and, under its label,\n// a 3dp primary indicator rounded along its top. The indicator follows the\n// label rather than the tab, inset 2dp from the label's ends and never\n// shorter than 24dp, which is what the page draws. A primary tab given an\n// icon stacks the page's 24dp icon over its label, 2dp apart, and the bar\n// grows to the page's 64dp.\n//\n// **Secondary** is the strip that sits under a primary one. Its active tab\n// keeps the on-surface role, and its 2dp primary indicator spans the whole\n// tab. An icon sits before the label, 8dp from it, which is the page's\n// spacing for an inline icon and material-web's layout for a secondary tab:\n// the strip keeps its 48dp under the primary one either way.\n//\n// A badge sits on the icon where a primary tab stacks one, placed as the\n// badges page places it, and 4dp after the label anywhere else.\n//\n// **The bar is equal sections unless `layout` says otherwise.**\n// `layout=\"scrollable\"` is the page's scrollable tabs: each tab as wide as\n// its label, between MDC-Android's 72dp and 264dp, in a bar that scrolls\n// without a scrollbar and brings the selected tab into view, as\n// material-web's does.\n//\n// **`orientation=\"vertical\"` turns the bar on its side.** The page draws no\n// vertical tabs, so this follows the horizontal bar's own measurements: the\n// tabs stack, the divider runs down the bar's inline end, and each\n// indicator lies along that edge — 3dp and rounded toward the tab on a\n// primary bar, 2dp and square on a secondary one — spanning the tab rather\n// than a label that no longer runs along it. The bar sits beside the panels\n// rather than above them.\n//\n// The indicator is React Aria's `SelectionIndicator`, which is a shared\n// element: it is rendered inside every tab but drawn in the selected one,\n// and on a change it keeps the old one until it has finished moving to the\n// new one's place. No `SharedElementTransition` is rendered here — `Tab`\n// scopes its own, and one added around the list changes nothing, which is\n// worth knowing because the primitive throws outside a scope when it is put\n// anywhere else.\n//\n// The label is wrapped in a span of its own so a primary indicator has the\n// label's width to follow: it is drawn inside the span, and the span is as\n// tall as the tab so the indicator reaches the bottom of the bar. Which tab\n// carries it comes from React Aria's render state rather than a selector,\n// since StyleX cannot target [data-selected] on the element it is styling.\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\nconst styles = {\n indicator: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89\",\n kZKoxP: \"xuoj239\",\n kLZC3w: \"x4hsqty\",\n kPef9Z: \"x4z998w\",\n kEafiO: \"x1cuxy5d\",\n kfmiAY: \"x1pixlao\",\n krdFHd: \"xyooppx\",\n kB7OPa: \"x9f619\",\n kzqmXN: \"x17v02zk\",\n krVfgx: \"x1ey2m1c\",\n kkqhue: \"x17y0mx6\",\n kUOVxO: \"xvueqy4\",\n k7Eaqz: \"xnei2rj\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"x1mxbss1\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n },\n indicatorSecondary: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89\",\n kZKoxP: \"x36qwtl\",\n kLZC3w: \"x4hsqty\",\n kPef9Z: \"x4z998w\",\n kEafiO: \"x7sdbh0\",\n kB7OPa: \"x9f619\",\n krVfgx: \"x1ey2m1c\",\n kkqhue: \"x17y0mx6\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"x1mxbss1\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n },\n indicatorSecondaryVertical: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89\",\n kBCPoo: \"x1ksdfms\",\n k8ry5P: \"xf1j0q2\",\n ke9TFa: \"x12inkfj\",\n kB7OPa: \"x9f619\",\n kzqmXN: \"xfo62xy\",\n kYYq5F: \"x10no89f\",\n kt4wiu: \"xtijo5x\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"xcxfjh9\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n },\n indicatorVertical: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89\",\n kZKoxP: \"x1qu6c4t\",\n kVL7Gh: \"x25gbn0\",\n kBCPoo: \"x1ksdfms\",\n k8ry5P: \"xf1j0q2\",\n ke9TFa: \"x1o9zed4\",\n krdFHd: \"xyooppx\",\n kB7OPa: \"x9f619\",\n kzqmXN: \"x1g8rjiy\",\n kYYq5F: \"x10no89f\",\n kt4wiu: \"xtijo5x\",\n kqGvvJ: \"x1nkss2m\",\n kAzted: \"xjwf9q1\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"xcxfjh9\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n },\n label: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x5yr21d\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x3nfvp2\",\n kjj79g: \"xl56j7k\",\n ks0D6T: \"x193iq5w\",\n k7Eaqz: \"xeuugli\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n labelInline: {\n kOIVth: \"x126z3so\",\n $$css: true\n },\n labelStacked: {\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x14qo01y\",\n $$css: true\n },\n tab: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kCS8Yb: \"x1r8uery\",\n kzQI83: \"x1iyjqo2\",\n kmuXW: \"xs83m0k\",\n kMv6JI: \"xrgwony\",\n kGuDYH: \"x12s497w\",\n k63SB2: \"x1szcwkt\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"xo803ec\",\n kLWn49: \"xyl1r0q\",\n kAzted: \"x1dry9sr\",\n k7Eaqz: \"xeuugli\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n k8WAf4: \"xt970qd\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n kybGjl: \"x1hl2dhg\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xs2xxs2\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n tabActive: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n tabActiveFocused: {\n kWkggS: \"x1sog3nf\",\n $$css: true\n },\n tabActiveHovered: {\n kWkggS: \"x659ado\",\n $$css: true\n },\n tabActiveSecondary: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x139gbkf\",\n $$css: true\n },\n tabDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1xj74d8\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n tabInactive: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n tabInactiveEngaged: {\n kMwMTN: \"x139gbkf\",\n $$css: true\n },\n tabInactiveFocused: {\n kWkggS: \"xwqhyid\",\n $$css: true\n },\n tabInactiveHovered: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n },\n tabPressed: {\n kWkggS: \"x1dvjsmr\",\n $$css: true\n },\n tabScrollable: {\n kCS8Yb: \"xdl72j9\",\n kzQI83: \"x1c4vz4f\",\n kmuXW: \"x2lah0s\",\n ks0D6T: \"x1pdpmub\",\n k7Eaqz: \"x187xtus\",\n $$css: true\n },\n tabSecondaryFocused: {\n kWkggS: \"xwqhyid\",\n $$css: true\n },\n tabSecondaryHovered: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n },\n tabSecondaryPressed: {\n kWkggS: \"xjeeohs\",\n $$css: true\n },\n tabStacked: {\n kAzted: \"x8nclml\",\n $$css: true\n },\n tabVertical: {\n kCS8Yb: \"xdl72j9\",\n kzQI83: \"x1c4vz4f\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"x1nhvcw1\",\n $$css: true\n }\n};\n\n// A vertical bar beside its panels, which take the rest of the row. A style\n// of its own rather than one of the list's, since it is the root that holds\n// the two.\n\n/** The tabs page's two styles of tab bar. */\ntype TabsVariant = 'primary' | 'secondary';\n\n// What each style draws a tab's states in. A table rather than a branch per\n// state, so the two styles cannot differ in which states they answer.\nconst VARIANTS = {\n primary: {\n active: styles.tabActive,\n activeFocused: styles.tabActiveFocused,\n activeHovered: styles.tabActiveHovered,\n inactiveFocused: styles.tabInactiveFocused,\n inactiveHovered: styles.tabInactiveHovered,\n indicator: {\n horizontal: styles.indicator,\n vertical: styles.indicatorVertical\n },\n pressed: styles.tabPressed\n },\n secondary: {\n active: styles.tabActiveSecondary,\n activeFocused: styles.tabSecondaryFocused,\n activeHovered: styles.tabSecondaryHovered,\n inactiveFocused: styles.tabSecondaryFocused,\n inactiveHovered: styles.tabSecondaryHovered,\n indicator: {\n horizontal: styles.indicatorSecondary,\n vertical: styles.indicatorSecondaryVertical\n },\n pressed: styles.tabSecondaryPressed\n }\n} satisfies Record<TabsVariant, unknown>;\n\n// The bar's three decisions, from the root to the list and every tab in it.\n// A context rather than props on each part, since they are the bar's and\n// repeating them on every tab is how the two drift.\ntype Bar = {\n layout: TabsLayout;\n orientation: Orientation;\n variant: TabsVariant;\n};\ntype Orientation = NonNullable<RACTabsProps['orientation']>;\n\n/** How the bar shares its room among the tabs. */\ntype TabsLayout = 'fixed' | 'scrollable';\nconst BarContext = createContext<Bar>({\n layout: 'fixed',\n orientation: 'horizontal',\n variant: 'primary'\n});\n\n// The bars a reveal has already scrolled, so that only the first is instant.\nconst revealed = new WeakSet<Element>();\nconst NO_PANELS: ReadonlySet<Key> = new Set();\n\n// Which panels are mounted, by id. React Aria points a selected tab's\n// `aria-controls` at the panel it would control whether or not one exists,\n// and a strip used on its own — tabs that filter the content below rather\n// than swapping a panel — then references an id nothing carries, which axe\n// reports as an invalid attribute value. Each panel registers itself here so\n// a tab can leave the attribute off when its panel is not there.\nconst PanelsContext = createContext<ReadonlySet<Key>>(NO_PANELS);\nconst RegisterPanelContext = createContext<(id: Key) => () => void>(() => () => {});\n\n// `children` is narrowed to nodes. React Aria also accepts a function there,\n// to hand the children the tabs' render state, and that form cannot be\n// wrapped in a context provider without calling it first — which would be\n// doing React Aria's job with none of its state. Nothing here needs it, so\n// the narrower type says so rather than leaving a signature that type-checks\n// and then fails to render.\ntype TabsProps = Omit<RACTabsProps, 'children'> & {\n children?: ReactNode;\n /**\n * How the bar shares its room: `fixed` divides it into equal sections, and\n * `scrollable` gives each tab its label's width in a bar that scrolls,\n * which is the page's choice for more tabs than the room has sections for.\n * @default 'fixed'\n */\n layout?: TabsLayout;\n /**\n * Which of the page's two tab bars this is: `primary` for the main one,\n * `secondary` for a strip under a primary one.\n * @default 'primary'\n */\n variant?: TabsVariant;\n};\n\n// The badge, which wraps the icon where a primary tab stacks one and stands\n// after the label anywhere else: `true` for the small dot, a number for the\n// large badge, and nothing for `false`.\nfunction badgeFor(badge: boolean | number | undefined, icon?: ReactNode): ReactNode {\n if (badge === undefined || badge === false) {\n return icon ?? null;\n }\n return <Badge count={badge === true ? undefined : badge} {...{\n 0: {},\n 1: {\n className: \"x2lah0s\"\n }\n }[!!(icon === undefined) << 0]}>\n {icon}\n </Badge>;\n}\n\n// Scrolls a scrollable bar just far enough to show its selected tab whole,\n// handed to the selected tab's label as a ref so it runs as that tab\n// becomes the selected one. The bar alone, never the page: `scrollIntoView`\n// would scroll every scrolling ancestor, the window included, to bring a\n// bar below the fold up to it. The first reveal is instant, so a bar opens\n// on its selected tab rather than sliding to it; the rest take the bar's own\n// smooth scrolling.\nfunction revealInBar(element: HTMLElement | null) {\n const tab = element?.closest('[role=\"tab\"]');\n const bar = tab?.closest('[role=\"tablist\"]');\n if (tab === undefined || tab === null || bar === undefined || bar === null) {\n return;\n }\n const first = !revealed.has(bar);\n revealed.add(bar);\n const box = tab.getBoundingClientRect();\n const room = bar.getBoundingClientRect();\n const left = Math.min(0, box.left - room.left) + Math.max(0, box.right - room.right);\n const top = Math.min(0, box.top - room.top) + Math.max(0, box.bottom - room.bottom);\n if (left !== 0 || top !== 0) {\n bar.scrollBy({\n behavior: first ? 'instant' : 'auto',\n left,\n top\n });\n }\n}\n\n// StyleX cannot target [data-selected] on the element it is styling, so the\n// active tab cannot be chosen in CSS. React Aria's answer is a className that\n// is a function of the tab's own state, the same mechanism Chip uses —\n// mergeStatefulStyles wraps this one so a tab still keeps a className the call\n// site passed.\nfunction tabClasses({\n layout,\n orientation,\n variant\n}: Bar, stacked: boolean) {\n const roles = VARIANTS[variant];\n const vertical = orientation === 'vertical';\n return (state: TabRenderProps) => {\n const engaged = state.isHovered || state.isFocusVisible || state.isPressed;\n\n // The layers in rising order, so a press shows over a focused tab and\n // focus over a hovered one.\n return stylex.props(styles.tab, layout === 'scrollable' && !vertical && styles.tabScrollable, vertical && styles.tabVertical, stacked && styles.tabStacked, state.isSelected ? roles.active : styles.tabInactive, !state.isSelected && engaged && styles.tabInactiveEngaged, state.isHovered && (state.isSelected ? roles.activeHovered : roles.inactiveHovered), state.isFocusVisible && (state.isSelected ? roles.activeFocused : roles.inactiveFocused), state.isPressed && roles.pressed, state.isDisabled && styles.tabDisabled);\n };\n}\n\n// The tab's content: the icon, if any, then the label, wrapped so the\n// indicator has its width to follow. A badge after the label shares a line\n// with it, which is the one wrapper a tab without one goes without. Built by\n// a call for the same reason as `tabRenderer` below; React Aria hands the\n// function the tab's state, and it is passed on when the children are a\n// function too.\nfunction tabContent(children: TabProps['children'], {\n layout,\n orientation,\n variant\n}: Bar, icon: ReactNode, badge: boolean | number | undefined) {\n const hasIcon = icon !== undefined && icon !== null;\n const stacked = hasIcon && variant === 'primary';\n const after = stacked ? null : badgeFor(badge);\n const indicator = <RACSelectionIndicator {...stylex.props(VARIANTS[variant].indicator[orientation])} />;\n // A primary indicator follows the label along a horizontal bar, and lies\n // along the tab's edge everywhere else.\n const underLabel = variant === 'primary' && orientation === 'horizontal';\n return (state: TabRenderProps & {\n defaultChildren: ReactNode;\n }) => {\n const text = <span {...{\n 0: {\n className: \"x104kibb xkjl1po xb3r6kr xj0a0fe x2b8uid x1ua5tub x1h7i4cw\"\n },\n 2: {\n className: \"x104kibb xkjl1po xb3r6kr xj0a0fe x2b8uid x1ua5tub xh0615m\"\n },\n 1: {\n className: \"x104kibb xkjl1po xb3r6kr xj0a0fe x1ua5tub x1h7i4cw x1yc453h\"\n },\n 3: {\n className: \"x104kibb xkjl1po xb3r6kr xj0a0fe x1ua5tub xh0615m x1yc453h\"\n }\n }[!!stacked << 1 | !!(orientation === 'vertical') << 0]}>\n {typeof children === 'function' ? children(state) : children}\n </span>;\n return <>\n <span ref={layout === 'scrollable' && state.isSelected ? revealInBar : undefined} {...stylex.props(styles.label, hasIcon && (stacked ? styles.labelStacked : styles.labelInline))}>\n {hasIcon ? <span className=\"x6s0dn4 xxk0z11 x3nfvp2 x2lah0s x1pvqxga xvy4d1p xl56j7k\">\n {stacked ? badgeFor(badge, icon) : icon}\n </span> : null}\n {after === null ? text : <span className=\"x6s0dn4 x9f619 x3nfvp2 xzoy561 x193iq5w xeuugli\">\n {text}\n {after}\n </span>}\n {underLabel ? indicator : null}\n </span>\n {underLabel ? null : indicator}\n </>;\n };\n}\n\n// React Aria renders a tab with `href` as an anchor and any other as a div,\n// and expects a `render` function to return the same element it would have.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// the result on its two inputs. See PanelsContext for why the attribute is\n// dropped.\nfunction tabRenderer(hasPanel: boolean, render: TabProps['render']): NonNullable<TabProps['render']> {\n return (domProps, state) => {\n const adjusted = hasPanel ? domProps : {\n ...domProps,\n 'aria-controls': undefined\n };\n if (render !== undefined) {\n return render(adjusted, state);\n }\n if ('href' in adjusted) {\n // oxlint-disable-next-line jsx-a11y/anchor-has-content -- filled by React Aria\n return <a {...adjusted} />;\n }\n return <div {...adjusted} />;\n };\n}\n\n/**\n * A tab bar and its panels. Selection is React Aria's `selectedKey`: pass\n * it with `onSelectionChange` to control it, or `defaultSelectedKey` to let\n * it keep its own. Each `Tabs.Tab` names the `Tabs.Panel` it controls through\n * a shared `id`, and a strip may stand alone without panels.\n *\n * Composed rather than configured by props, because the number of tabs and\n * what each panel holds are the call site's to decide — the parts are\n * `Tabs.List`, `Tabs.Tab`, and `Tabs.Panel`.\n */\nfunction Tabs({\n children,\n layout = 'fixed',\n orientation = 'horizontal',\n variant = 'primary',\n ...props\n}: RefAttributes<HTMLDivElement> & TabsProps) {\n const bar = useMemo(() => ({\n layout,\n orientation,\n variant\n }), [layout, orientation, variant]);\n const [panels, setPanels] = useState<ReadonlySet<Key>>(NO_PANELS);\n const register = useCallback((id: Key) => {\n setPanels(previous => {\n if (previous.has(id)) {\n return previous;\n }\n const next = new Set(previous);\n next.add(id);\n return next;\n });\n return () => {\n setPanels(previous => {\n if (!previous.has(id)) {\n return previous;\n }\n const next = new Set(previous);\n next.delete(id);\n return next;\n });\n };\n }, []);\n return <RACTabs {...props} orientation={orientation} {...mergeStatefulStyles({\n 0: {},\n 1: {\n className: \"x78zum5\"\n }\n }[!!(orientation === 'vertical') << 0], props)}>\n <RegisterPanelContext value={register}>\n <PanelsContext value={panels}>\n <BarContext value={bar}>{children}</BarContext>\n </PanelsContext>\n </RegisterPanelContext>\n </RACTabs>;\n}\nfunction TabsList(props: RefAttributes<HTMLDivElement> & TabsListProps) {\n const {\n layout,\n orientation\n } = useContext(BarContext);\n return <TabList {...props} {...mergeStatefulStyles({\n 0: {\n className: \"xp05xdj x9f619 x78zum5\"\n },\n 2: {\n className: \"xp05xdj x9f619 x78zum5 xfk6m8 xysyzu8 x1rohswg xkcv6ua xg83hb1\"\n },\n 1: {\n className: \"x9f619 x78zum5 x1kbcym6 xiwn18o xdt5ytf x2lah0s\"\n },\n 3: {\n className: \"x9f619 x78zum5 xfk6m8 xysyzu8 x1rohswg xkcv6ua xg83hb1 x1kbcym6 xiwn18o xdt5ytf x2lah0s\"\n }\n }[!!(layout === 'scrollable') << 1 | !!(orientation === 'vertical') << 0], props)} />;\n}\nfunction TabsPanel(props: RefAttributes<HTMLDivElement> & TabsPanelProps) {\n const register = useContext(RegisterPanelContext);\n const {\n id\n } = props;\n useEffect(() => {\n if (id === undefined) {\n return undefined;\n }\n return register(id);\n }, [id, register]);\n return <TabPanel {...props} {...mergeStatefulStyles({\n className: \"x9f619 x1iyjqo2 xeuugli xrgy624 x2ssjo2 x9v5kkp x1t137rt x1de99jn\"\n }, props)} />;\n}\n\n/**\n * An optional box around the panels, which animates its height as one panel\n * gives way to the next. Without it the panels still work; the box around\n * them simply jumps from one height to the other.\n */\nfunction TabsPanels(props: RefAttributes<HTMLDivElement> & TabsPanelsProps) {\n return <RACTabPanels {...props} {...mergeStyles({\n className: \"x12w9bfk x1t2j4n3 x9f619 x1iyjqo2 xeuugli x7giv3 x1hm618n xioksi3 x1f55p5c x1seskgd\"\n }, props)} />;\n}\nfunction TabsTab({\n badge,\n children,\n icon,\n ref,\n render,\n ...props\n}: RefAttributes<HTMLAnchorElement | HTMLDivElement> & TabsTabProps) {\n const panels = useContext(PanelsContext);\n const bar = useContext(BarContext);\n const hasPanel = props.id !== undefined && panels.has(props.id);\n const stacked = icon !== undefined && icon !== null && bar.variant === 'primary';\n return <Tab {...props}\n // A tab with `href` is an anchor and any other a div, so the ref is\n // typed as either and handed over as the callback both accept — see\n // src/render/ref.ts.\n ref={refCallback(ref)} render={tabRenderer(hasPanel, render)} {...mergeStatefulStyles(tabClasses(bar, stacked), props)}>\n {tabContent(children, bar, icon, badge)}\n </Tab>;\n}\nTabs.List = TabsList;\nTabs.Panel = TabsPanel;\nTabs.Panels = TabsPanels;\nTabs.Tab = TabsTab;\ntype TabsListProps = TabListProps<object>;\ntype TabsPanelProps = TabPanelProps;\ntype TabsPanelsProps = Omit<TabPanelsProps<object>, 'children'> & {\n children?: ReactNode;\n};\ntype TabsTabProps = {\n /**\n * A badge on the tab: `true` for the badges page's small dot, a number for\n * the large badge holding it. It sits on a primary tab's icon, and after\n * the label anywhere else. The badge is hidden from assistive technology,\n * so say what it says in the tab's name too — \"First item, 3 new\".\n */\n badge?: boolean | number;\n /**\n * An icon with the label, at the page's 24dp: over it on a primary tab,\n * whose bar grows to 64dp, and before it on a secondary one. An icon drawn\n * in `em` takes its size from the slot.\n */\n icon?: ReactNode;\n} & TabProps;\nexport type { TabsLayout, TabsListProps, TabsPanelProps, TabsPanelsProps, TabsProps, TabsTabProps, TabsVariant };\nexport { TabsList, TabsPanel, TabsPanels, TabsTab };\nexport default Tabs;"],"mappings":";;;;;;;;;;AAiEA,MAAMY,SAAS;CACbC,WAAW;EACTC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,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,EAAA;CAAA,OANDO;AAMC;AAEV9J,KAAKsL,OAAOP;AACZ/K,KAAKuL,QAAQL;AACblL,KAAKwL,SAASL;AACdnL,KAAKE,MAAMkL"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","createContext","useContext","useEffect","useState","Tabs","RACTabs","Tab","useEnlargedText","refCallback","mergeStatefulStyles","mergeStyles","styles","indicator","k6CgDc","kWkggS","kZKoxP","kLZC3w","kPef9Z","kEafiO","kfmiAY","krdFHd","kB7OPa","kzqmXN","krVfgx","kkqhue","kUOVxO","k7Eaqz","kVAEAm","kIyJzY","k1ekBW","kAMwcw","$$css","indicatorSecondary","indicatorSecondaryVertical","kBCPoo","k8ry5P","ke9TFa","kYYq5F","kt4wiu","indicatorVertical","kVL7Gh","kqGvvJ","kAzted","label","kGNEyG","k1xSpc","kjj79g","ks0D6T","labelInline","kOIVth","labelStacked","kXwgrk","tab","kMzoRj","kMwMTN","kkrTdU","kCS8Yb","kzQI83","kmuXW","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kjBf7l","kInvED","k3XXqK","kMeerF","k8WAf4","kg3NbH","kybGjl","tabActive","tabActiveFocused","tabActiveHovered","tabActiveSecondary","tabDisabled","tabInactive","tabInactiveEngaged","tabInactiveFocused","tabInactiveHovered","tabPressed","tabScrollable","tabSecondaryFocused","tabSecondaryHovered","tabSecondaryPressed","tabStacked","tabVertical","VARIANTS","primary","active","activeFocused","activeHovered","inactiveFocused","inactiveHovered","horizontal","vertical","pressed","secondary","layout","orientation","variant","BarContext","revealed","WeakSet","NO_PANELS","Set","PanelsContext","RegisterPanelContext","id","children","badgeFor","badge","icon","undefined","className","revealInBar","element","closest","bar","first","has","add","box","getBoundingClientRect","room","left","Math","min","max","right","top","bottom","scrollBy","behavior","tabClasses","stacked","roles","state","engaged","isHovered","isFocusVisible","isPressed","props","isSelected","isDisabled","tabContent","isEnlarged","hasIcon","after","underLabel","text","tabRenderer","hasPanel","render","domProps","adjusted","t0","$","t1","t2","t3","t4","panels","setPanels","t5","Symbol","for","previous","next","previous_0","next_0","delete","register","T0","t6","0","1","t7","t8","t9","t10","TabsList","2","3","TabsPanel","TabsPanels","TabsTab","ref","List","Panel","Panels","RACSelectionIndicator","RACTabPanels"],"sources":["../../../src/components/tabs/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { Key, TabsProps as RACTabsProps, TabListProps, TabPanelProps, TabPanelsProps, TabProps, TabRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';\nimport { SelectionIndicator as RACSelectionIndicator, TabPanels as RACTabPanels, Tabs as RACTabs, Tab, TabList, TabPanel } from 'react-aria-components';\nimport { useEnlargedText } from '../../hooks/useEnlargedText';\nimport { refCallback } from '../../render/ref';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\nimport Badge from '../badge';\n\n// The tabs page's primary and secondary tabs. Both are a 48dp bar on the\n// surface, divided into equal sections, with a 1dp outline-variant divider\n// inside the bar along its bottom edge.\n//\n// **Primary** draws the active tab in the primary role and, under its label,\n// a 3dp primary indicator rounded along its top. The indicator follows the\n// label rather than the tab, inset 2dp from the label's ends and never\n// shorter than 24dp, which is what the page draws. A primary tab given an\n// icon stacks the page's 24dp icon over its label, 2dp apart, and the bar\n// grows to the page's 64dp.\n//\n// **Secondary** is the strip that sits under a primary one. Its active tab\n// keeps the on-surface role, and its 2dp primary indicator spans the whole\n// tab. An icon sits before the label, 8dp from it, which is the page's\n// spacing for an inline icon and material-web's layout for a secondary tab:\n// the strip keeps its 48dp under the primary one either way.\n//\n// A badge sits on the icon where a primary tab stacks one, placed as the\n// badges page places it, and 4dp after the label anywhere else.\n//\n// **The bar is equal sections unless `layout` says otherwise.**\n// `layout=\"scrollable\"` is the page's scrollable tabs: each tab as wide as\n// its label, between MDC-Android's 72dp and 264dp, in a bar that scrolls\n// without a scrollbar and brings the selected tab into view, as\n// material-web's does.\n//\n// **`orientation=\"vertical\"` turns the bar on its side.** The page draws no\n// vertical tabs, so this follows the horizontal bar's own measurements: the\n// tabs stack, the divider runs down the bar's inline end, and each\n// indicator lies along that edge — 3dp and rounded toward the tab on a\n// primary bar, 2dp and square on a secondary one — spanning the tab rather\n// than a label that no longer runs along it. The bar sits beside the panels\n// rather than above them.\n//\n// The indicator is React Aria's `SelectionIndicator`, which is a shared\n// element: it is rendered inside every tab but drawn in the selected one,\n// and on a change it keeps the old one until it has finished moving to the\n// new one's place. No `SharedElementTransition` is rendered here — `Tab`\n// scopes its own, and one added around the list changes nothing, which is\n// worth knowing because the primitive throws outside a scope when it is put\n// anywhere else.\n//\n// The label is wrapped in a span of its own so a primary indicator has the\n// label's width to follow: it is drawn inside the span, and the span is as\n// tall as the tab so the indicator reaches the bottom of the bar. Which tab\n// carries it comes from React Aria's render state rather than a selector,\n// since StyleX cannot target [data-selected] on the element it is styling.\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\nconst styles = {\n indicator: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89\",\n kZKoxP: \"xuoj239\",\n kLZC3w: \"x4hsqty\",\n kPef9Z: \"x4z998w\",\n kEafiO: \"x1cuxy5d\",\n kfmiAY: \"x1pixlao\",\n krdFHd: \"xyooppx\",\n kB7OPa: \"x9f619\",\n kzqmXN: \"x17v02zk\",\n krVfgx: \"x1ey2m1c\",\n kkqhue: \"x17y0mx6\",\n kUOVxO: \"xvueqy4\",\n k7Eaqz: \"xnei2rj\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"x1mxbss1\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n },\n indicatorSecondary: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89\",\n kZKoxP: \"x36qwtl\",\n kLZC3w: \"x4hsqty\",\n kPef9Z: \"x4z998w\",\n kEafiO: \"x7sdbh0\",\n kB7OPa: \"x9f619\",\n krVfgx: \"x1ey2m1c\",\n kkqhue: \"x17y0mx6\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"x1mxbss1\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n },\n indicatorSecondaryVertical: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89\",\n kBCPoo: \"x1ksdfms\",\n k8ry5P: \"xf1j0q2\",\n ke9TFa: \"x12inkfj\",\n kB7OPa: \"x9f619\",\n kzqmXN: \"xfo62xy\",\n kYYq5F: \"x10no89f\",\n kt4wiu: \"xtijo5x\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"xcxfjh9\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n },\n indicatorVertical: {\n k6CgDc: \"x12w9bfk\",\n kWkggS: \"xnety89\",\n kZKoxP: \"x1qu6c4t\",\n kVL7Gh: \"x25gbn0\",\n kBCPoo: \"x1ksdfms\",\n k8ry5P: \"xf1j0q2\",\n ke9TFa: \"x1o9zed4\",\n krdFHd: \"xyooppx\",\n kB7OPa: \"x9f619\",\n kzqmXN: \"x1g8rjiy\",\n kYYq5F: \"x10no89f\",\n kt4wiu: \"xtijo5x\",\n kqGvvJ: \"x1nkss2m\",\n kAzted: \"xjwf9q1\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"xioksi3\",\n k1ekBW: \"xcxfjh9\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n },\n label: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x5yr21d\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x3nfvp2\",\n kjj79g: \"xl56j7k\",\n ks0D6T: \"x193iq5w\",\n k7Eaqz: \"xeuugli\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n labelInline: {\n kOIVth: \"x126z3so\",\n $$css: true\n },\n labelStacked: {\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x14qo01y\",\n $$css: true\n },\n tab: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kCS8Yb: \"x1r8uery\",\n kzQI83: \"x1iyjqo2\",\n kmuXW: \"xs83m0k\",\n kMv6JI: \"xrgwony\",\n kGuDYH: \"x12s497w\",\n k63SB2: \"x1szcwkt\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"xo803ec\",\n kLWn49: \"xyl1r0q\",\n kAzted: \"x1dry9sr\",\n k7Eaqz: \"xeuugli\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n k8WAf4: \"xt970qd\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n kybGjl: \"x1hl2dhg\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xs2xxs2\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n tabActive: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n tabActiveFocused: {\n kWkggS: \"x1sog3nf\",\n $$css: true\n },\n tabActiveHovered: {\n kWkggS: \"x659ado\",\n $$css: true\n },\n tabActiveSecondary: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x139gbkf\",\n $$css: true\n },\n tabDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1xj74d8\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n tabInactive: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n tabInactiveEngaged: {\n kMwMTN: \"x139gbkf\",\n $$css: true\n },\n tabInactiveFocused: {\n kWkggS: \"xwqhyid\",\n $$css: true\n },\n tabInactiveHovered: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n },\n tabPressed: {\n kWkggS: \"x1dvjsmr\",\n $$css: true\n },\n tabScrollable: {\n kCS8Yb: \"xdl72j9\",\n kzQI83: \"x1c4vz4f\",\n kmuXW: \"x2lah0s\",\n ks0D6T: \"x1pdpmub\",\n k7Eaqz: \"x187xtus\",\n $$css: true\n },\n tabSecondaryFocused: {\n kWkggS: \"xwqhyid\",\n $$css: true\n },\n tabSecondaryHovered: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n },\n tabSecondaryPressed: {\n kWkggS: \"xjeeohs\",\n $$css: true\n },\n tabStacked: {\n kAzted: \"x8nclml\",\n $$css: true\n },\n tabVertical: {\n kCS8Yb: \"xdl72j9\",\n kzQI83: \"x1c4vz4f\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"x1nhvcw1\",\n $$css: true\n }\n};\n\n// A vertical bar beside its panels, which take the rest of the row. A style\n// of its own rather than one of the list's, since it is the root that holds\n// the two.\n\n/** The tabs page's two styles of tab bar. */\ntype TabsVariant = 'primary' | 'secondary';\n\n// What each style draws a tab's states in. A table rather than a branch per\n// state, so the two styles cannot differ in which states they answer.\nconst VARIANTS = {\n primary: {\n active: styles.tabActive,\n activeFocused: styles.tabActiveFocused,\n activeHovered: styles.tabActiveHovered,\n inactiveFocused: styles.tabInactiveFocused,\n inactiveHovered: styles.tabInactiveHovered,\n indicator: {\n horizontal: styles.indicator,\n vertical: styles.indicatorVertical\n },\n pressed: styles.tabPressed\n },\n secondary: {\n active: styles.tabActiveSecondary,\n activeFocused: styles.tabSecondaryFocused,\n activeHovered: styles.tabSecondaryHovered,\n inactiveFocused: styles.tabSecondaryFocused,\n inactiveHovered: styles.tabSecondaryHovered,\n indicator: {\n horizontal: styles.indicatorSecondary,\n vertical: styles.indicatorSecondaryVertical\n },\n pressed: styles.tabSecondaryPressed\n }\n} satisfies Record<TabsVariant, unknown>;\n\n// The bar's three decisions, from the root to the list and every tab in it.\n// A context rather than props on each part, since they are the bar's and\n// repeating them on every tab is how the two drift.\ntype Bar = {\n layout: TabsLayout;\n orientation: Orientation;\n variant: TabsVariant;\n};\ntype Orientation = NonNullable<RACTabsProps['orientation']>;\n\n/** How the bar shares its room among the tabs. */\ntype TabsLayout = 'fixed' | 'scrollable';\nconst BarContext = createContext<Bar>({\n layout: 'fixed',\n orientation: 'horizontal',\n variant: 'primary'\n});\n\n// The bars a reveal has already scrolled, so that only the first is instant.\nconst revealed = new WeakSet<Element>();\nconst NO_PANELS: ReadonlySet<Key> = new Set();\n\n// Which panels are mounted, by id. React Aria points a selected tab's\n// `aria-controls` at the panel it would control whether or not one exists,\n// and a strip used on its own — tabs that filter the content below rather\n// than swapping a panel — then references an id nothing carries, which axe\n// reports as an invalid attribute value. Each panel registers itself here so\n// a tab can leave the attribute off when its panel is not there.\nconst PanelsContext = createContext<ReadonlySet<Key>>(NO_PANELS);\nconst RegisterPanelContext = createContext<(id: Key) => () => void>(() => () => {});\n\n// `children` is narrowed to nodes. React Aria also accepts a function there,\n// to hand the children the tabs' render state, and that form cannot be\n// wrapped in a context provider without calling it first — which would be\n// doing React Aria's job with none of its state. Nothing here needs it, so\n// the narrower type says so rather than leaving a signature that type-checks\n// and then fails to render.\ntype TabsProps = Omit<RACTabsProps, 'children'> & {\n children?: ReactNode;\n /**\n * How the bar shares its room: `fixed` divides it into equal sections, and\n * `scrollable` gives each tab its label's width in a bar that scrolls,\n * which is the page's choice for more tabs than the room has sections for.\n * @default 'fixed'\n */\n layout?: TabsLayout;\n /**\n * Which of the page's two tab bars this is: `primary` for the main one,\n * `secondary` for a strip under a primary one.\n * @default 'primary'\n */\n variant?: TabsVariant;\n};\n\n// The badge, which wraps the icon where a primary tab stacks one and stands\n// after the label anywhere else: `true` for the small dot, a number for the\n// large badge, and nothing for `false`.\nfunction badgeFor(badge: boolean | number | undefined, icon?: ReactNode): ReactNode {\n if (badge === undefined || badge === false) {\n return icon ?? null;\n }\n return <Badge count={badge === true ? undefined : badge} {...{\n 0: {},\n 1: {\n className: \"x2lah0s\"\n }\n }[!!(icon === undefined) << 0]}>\n {icon}\n </Badge>;\n}\n\n// Scrolls a scrollable bar just far enough to show its selected tab whole,\n// handed to the selected tab's label as a ref so it runs as that tab\n// becomes the selected one. The bar alone, never the page: `scrollIntoView`\n// would scroll every scrolling ancestor, the window included, to bring a\n// bar below the fold up to it. The first reveal is instant, so a bar opens\n// on its selected tab rather than sliding to it; the rest take the bar's own\n// smooth scrolling.\nfunction revealInBar(element: HTMLElement | null) {\n const tab = element?.closest('[role=\"tab\"]');\n const bar = tab?.closest('[role=\"tablist\"]');\n if (tab === undefined || tab === null || bar === undefined || bar === null) {\n return;\n }\n const first = !revealed.has(bar);\n revealed.add(bar);\n const box = tab.getBoundingClientRect();\n const room = bar.getBoundingClientRect();\n const left = Math.min(0, box.left - room.left) + Math.max(0, box.right - room.right);\n const top = Math.min(0, box.top - room.top) + Math.max(0, box.bottom - room.bottom);\n if (left !== 0 || top !== 0) {\n bar.scrollBy({\n behavior: first ? 'instant' : 'auto',\n left,\n top\n });\n }\n}\n\n// StyleX cannot target [data-selected] on the element it is styling, so the\n// active tab cannot be chosen in CSS. React Aria's answer is a className that\n// is a function of the tab's own state, the same mechanism Chip uses —\n// mergeStatefulStyles wraps this one so a tab still keeps a className the call\n// site passed.\nfunction tabClasses({\n layout,\n orientation,\n variant\n}: Bar, stacked: boolean) {\n const roles = VARIANTS[variant];\n const vertical = orientation === 'vertical';\n return (state: TabRenderProps) => {\n const engaged = state.isHovered || state.isFocusVisible || state.isPressed;\n\n // The layers in rising order, so a press shows over a focused tab and\n // focus over a hovered one.\n return stylex.props(styles.tab, layout === 'scrollable' && !vertical && styles.tabScrollable, vertical && styles.tabVertical, stacked && styles.tabStacked, state.isSelected ? roles.active : styles.tabInactive, !state.isSelected && engaged && styles.tabInactiveEngaged, state.isHovered && (state.isSelected ? roles.activeHovered : roles.inactiveHovered), state.isFocusVisible && (state.isSelected ? roles.activeFocused : roles.inactiveFocused), state.isPressed && roles.pressed, state.isDisabled && styles.tabDisabled);\n };\n}\n\n// The tab's content: the icon, if any, then the label, wrapped so the\n// indicator has its width to follow. A badge after the label shares a line\n// with it, which is the one wrapper a tab without one goes without. Built by\n// a call for the same reason as `tabRenderer` below; React Aria hands the\n// function the tab's state, and it is passed on when the children are a\n// function too.\n//\n// A fixed bar's label is whole once the reader has enlarged their text,\n// rather than cut at the two lines or the one its section has room for. A\n// scrollable bar's tab is as wide as its label up to its 264dp, and its label\n// keeps the clamp past that.\nfunction tabContent(children: TabProps['children'], {\n layout,\n orientation,\n variant\n}: Bar, icon: ReactNode, badge: boolean | number | undefined, isEnlarged: boolean) {\n const hasIcon = icon !== undefined && icon !== null;\n const stacked = hasIcon && variant === 'primary';\n const after = stacked ? null : badgeFor(badge);\n const indicator = <RACSelectionIndicator {...stylex.props(VARIANTS[variant].indicator[orientation])} />;\n // A primary indicator follows the label along a horizontal bar, and lies\n // along the tab's edge everywhere else.\n const underLabel = variant === 'primary' && orientation === 'horizontal';\n return (state: TabRenderProps & {\n defaultChildren: ReactNode;\n }) => {\n const text = <span {...{\n 0: {\n className: \"x104kibb xkjl1po xb3r6kr xj0a0fe x2b8uid x1ua5tub x1h7i4cw\"\n },\n 4: {\n className: \"x104kibb xkjl1po xb3r6kr xj0a0fe x2b8uid x1ua5tub xh0615m\"\n },\n 2: {\n className: \"x104kibb xkjl1po xb3r6kr xj0a0fe x1ua5tub x1h7i4cw x1yc453h\"\n },\n 6: {\n className: \"x104kibb xkjl1po xb3r6kr xj0a0fe x1ua5tub xh0615m x1yc453h\"\n },\n 1: {\n className: \"x104kibb xkjl1po xb3r6kr xj0a0fe x2b8uid x1ua5tub x1uy8f9d\"\n },\n 5: {\n className: \"x104kibb xkjl1po xb3r6kr xj0a0fe x2b8uid x1ua5tub x1uy8f9d\"\n },\n 3: {\n className: \"x104kibb xkjl1po xb3r6kr xj0a0fe x1ua5tub x1yc453h x1uy8f9d\"\n },\n 7: {\n className: \"x104kibb xkjl1po xb3r6kr xj0a0fe x1ua5tub x1yc453h x1uy8f9d\"\n }\n }[!!stacked << 2 | !!(orientation === 'vertical') << 1 | !!(isEnlarged && layout === 'fixed') << 0]}>\n {typeof children === 'function' ? children(state) : children}\n </span>;\n return <>\n <span ref={layout === 'scrollable' && state.isSelected ? revealInBar : undefined} {...stylex.props(styles.label, hasIcon && (stacked ? styles.labelStacked : styles.labelInline))}>\n {hasIcon ? <span className=\"x6s0dn4 xxk0z11 x3nfvp2 x2lah0s x1pvqxga xvy4d1p xl56j7k\">\n {stacked ? badgeFor(badge, icon) : icon}\n </span> : null}\n {after === null ? text : <span className=\"x6s0dn4 x9f619 x3nfvp2 xzoy561 x193iq5w xeuugli\">\n {text}\n {after}\n </span>}\n {underLabel ? indicator : null}\n </span>\n {underLabel ? null : indicator}\n </>;\n };\n}\n\n// React Aria renders a tab with `href` as an anchor and any other as a div,\n// and expects a `render` function to return the same element it would have.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// the result on its two inputs. See PanelsContext for why the attribute is\n// dropped.\nfunction tabRenderer(hasPanel: boolean, render: TabProps['render']): NonNullable<TabProps['render']> {\n return (domProps, state) => {\n const adjusted = hasPanel ? domProps : {\n ...domProps,\n 'aria-controls': undefined\n };\n if (render !== undefined) {\n return render(adjusted, state);\n }\n if ('href' in adjusted) {\n // oxlint-disable-next-line jsx-a11y/anchor-has-content -- filled by React Aria\n return <a {...adjusted} />;\n }\n return <div {...adjusted} />;\n };\n}\n\n/**\n * A tab bar and its panels. Selection is React Aria's `selectedKey`: pass\n * it with `onSelectionChange` to control it, or `defaultSelectedKey` to let\n * it keep its own. Each `Tabs.Tab` names the `Tabs.Panel` it controls through\n * a shared `id`, and a strip may stand alone without panels.\n *\n * Composed rather than configured by props, because the number of tabs and\n * what each panel holds are the call site's to decide — the parts are\n * `Tabs.List`, `Tabs.Tab`, and `Tabs.Panel`.\n */\nfunction Tabs({\n children,\n layout = 'fixed',\n orientation = 'horizontal',\n variant = 'primary',\n ...props\n}: RefAttributes<HTMLDivElement> & TabsProps) {\n const bar = useMemo(() => ({\n layout,\n orientation,\n variant\n }), [layout, orientation, variant]);\n const [panels, setPanels] = useState<ReadonlySet<Key>>(NO_PANELS);\n const register = useCallback((id: Key) => {\n setPanels(previous => {\n if (previous.has(id)) {\n return previous;\n }\n const next = new Set(previous);\n next.add(id);\n return next;\n });\n return () => {\n setPanels(previous => {\n if (!previous.has(id)) {\n return previous;\n }\n const next = new Set(previous);\n next.delete(id);\n return next;\n });\n };\n }, []);\n return <RACTabs {...props} orientation={orientation} {...mergeStatefulStyles({\n 0: {},\n 1: {\n className: \"x78zum5\"\n }\n }[!!(orientation === 'vertical') << 0], props)}>\n <RegisterPanelContext value={register}>\n <PanelsContext value={panels}>\n <BarContext value={bar}>{children}</BarContext>\n </PanelsContext>\n </RegisterPanelContext>\n </RACTabs>;\n}\nfunction TabsList(props: RefAttributes<HTMLDivElement> & TabsListProps) {\n const {\n layout,\n orientation\n } = useContext(BarContext);\n return <TabList {...props} {...mergeStatefulStyles({\n 0: {\n className: \"xp05xdj x9f619 x78zum5\"\n },\n 2: {\n className: \"xp05xdj x9f619 x78zum5 xfk6m8 xysyzu8 x1rohswg xkcv6ua xg83hb1\"\n },\n 1: {\n className: \"x9f619 x78zum5 x1kbcym6 xiwn18o xdt5ytf x2lah0s\"\n },\n 3: {\n className: \"x9f619 x78zum5 xfk6m8 xysyzu8 x1rohswg xkcv6ua xg83hb1 x1kbcym6 xiwn18o xdt5ytf x2lah0s\"\n }\n }[!!(layout === 'scrollable') << 1 | !!(orientation === 'vertical') << 0], props)} />;\n}\nfunction TabsPanel(props: RefAttributes<HTMLDivElement> & TabsPanelProps) {\n const register = useContext(RegisterPanelContext);\n const {\n id\n } = props;\n useEffect(() => {\n if (id === undefined) {\n return undefined;\n }\n return register(id);\n }, [id, register]);\n return <TabPanel {...props} {...mergeStatefulStyles({\n className: \"x9f619 x1iyjqo2 xeuugli xrgy624 x2ssjo2 x9v5kkp x1t137rt x1de99jn\"\n }, props)} />;\n}\n\n/**\n * An optional box around the panels, which animates its height as one panel\n * gives way to the next. Without it the panels still work; the box around\n * them simply jumps from one height to the other.\n */\nfunction TabsPanels(props: RefAttributes<HTMLDivElement> & TabsPanelsProps) {\n return <RACTabPanels {...props} {...mergeStyles({\n className: \"x12w9bfk x1t2j4n3 x9f619 x1iyjqo2 xeuugli x7giv3 x1hm618n xioksi3 x1f55p5c x1seskgd\"\n }, props)} />;\n}\nfunction TabsTab({\n badge,\n children,\n icon,\n ref,\n render,\n ...props\n}: RefAttributes<HTMLAnchorElement | HTMLDivElement> & TabsTabProps) {\n const panels = useContext(PanelsContext);\n const bar = useContext(BarContext);\n const hasPanel = props.id !== undefined && panels.has(props.id);\n const stacked = icon !== undefined && icon !== null && bar.variant === 'primary';\n const isEnlarged = useEnlargedText();\n return <Tab {...props}\n // A tab with `href` is an anchor and any other a div, so the ref is\n // typed as either and handed over as the callback both accept — see\n // src/render/ref.ts.\n ref={refCallback(ref)} render={tabRenderer(hasPanel, render)} {...mergeStatefulStyles(tabClasses(bar, stacked), props)}>\n {tabContent(children, bar, icon, badge, isEnlarged)}\n </Tab>;\n}\nTabs.List = TabsList;\nTabs.Panel = TabsPanel;\nTabs.Panels = TabsPanels;\nTabs.Tab = TabsTab;\ntype TabsListProps = TabListProps<object>;\ntype TabsPanelProps = TabPanelProps;\ntype TabsPanelsProps = Omit<TabPanelsProps<object>, 'children'> & {\n children?: ReactNode;\n};\ntype TabsTabProps = {\n /**\n * A badge on the tab: `true` for the badges page's small dot, a number for\n * the large badge holding it. It sits on a primary tab's icon, and after\n * the label anywhere else. The badge is hidden from assistive technology,\n * so say what it says in the tab's name too — \"First item, 3 new\".\n */\n badge?: boolean | number;\n /**\n * An icon with the label, at the page's 24dp: over it on a primary tab,\n * whose bar grows to 64dp, and before it on a secondary one. An icon drawn\n * in `em` takes its size from the slot.\n */\n icon?: ReactNode;\n} & TabProps;\nexport type { TabsLayout, TabsListProps, TabsPanelProps, TabsPanelsProps, TabsProps, TabsTabProps, TabsVariant };\nexport { TabsList, TabsPanel, TabsPanels, TabsTab };\nexport default Tabs;"],"mappings":";;;;;;;;;;;AAkEA,MAAMa,SAAS;CACbC,WAAW;EACTC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,oBAAoB;EAClBnB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRG,QAAQ;EACRE,QAAQ;EACRC,QAAQ;EACRG,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAE,4BAA4B;EAC1BpB,QAAQ;EACRC,QAAQ;EACRoB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRf,QAAQ;EACRC,QAAQ;EACRe,QAAQ;EACRC,QAAQ;EACRX,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAQ,mBAAmB;EACjB1B,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRyB,QAAQ;EACRN,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRhB,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRe,QAAQ;EACRC,QAAQ;EACRG,QAAQ;EACR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AmB;CAAA,IAAAJ,EAAA,OAAA9C,SAAA8C,EAAA,OAAAvC,OAAAuC,EAAA,OAAAhD,YAAAgD,EAAA,OAAA7C,QAAA6C,EAAA,OAAAX,YAAA;EACjHe,KAAAhB,WAAWpC,UAAUS,KAAKN,MAAMD,OAAOmC,UAAU;EAACW,EAAA,KAAA9C;EAAA8C,EAAA,KAAAvC;EAAAuC,EAAA,KAAAhD;EAAAgD,EAAA,KAAA7C;EAAA6C,EAAA,KAAAX;EAAAW,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAgB,MAAAhB,EAAA,OAAAf,SAAAe,EAAA,QAAAC,MAAAD,EAAA,QAAAE,MAAAF,EAAA,QAAAG,MAAAH,EAAA,QAAAI,IAAA;EALhDG,KAAA,oBAAC,IAAD;GAAI,GAAKtB;GAIX,KAAAgB;GAA0B,QAAAC;GAA6B,GAAMC;GAC7DC,UAAAA;EALM,CAAA;EAMHJ,EAAA,KAAAgB;EAAAhB,EAAA,KAAAf;EAAAe,EAAA,MAAAC;EAAAD,EAAA,MAAAE;EAAAF,EAAA,MAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OANDO;AAMC;AAEVhK,KAAKwL,OAAOP;AACZjL,KAAKyL,QAAQL;AACbpL,KAAK0L,SAASL;AACdrL,KAAKE,MAAMoL"}
@@ -0,0 +1,58 @@
1
+ import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
2
+ import { textScaleStyles } from "../styles/text-scale.js";
3
+ import { useSyncExternalStore } from "react";
4
+ // src/hooks/useEnlargedText.ts
5
+ const THRESHOLD = 1.05;
6
+ /** What the probe carries, so a spec can find it and enlarge its font. */
7
+ const PROBE_ATTRIBUTE = "data-text-scale-probe";
8
+ const listeners = /* @__PURE__ */ new Set();
9
+ let probe = null;
10
+ let observer = null;
11
+ let enlarged = false;
12
+ function getEnlarged() {
13
+ return enlarged;
14
+ }
15
+ function getServerEnlarged() {
16
+ return false;
17
+ }
18
+ function measure() {
19
+ if (probe === null) return;
20
+ const { height, width } = probe.getBoundingClientRect();
21
+ const next = height > 0 && width / height > THRESHOLD;
22
+ if (next === enlarged) return;
23
+ enlarged = next;
24
+ for (const listener of listeners) listener();
25
+ }
26
+ function subscribe(listener) {
27
+ listeners.add(listener);
28
+ if (probe === null) {
29
+ probe = document.createElement("span");
30
+ probe.setAttribute("aria-hidden", "true");
31
+ probe.setAttribute(PROBE_ATTRIBUTE, "");
32
+ probe.className = props(textScaleStyles.probe).className ?? "";
33
+ document.body.append(probe);
34
+ observer = new ResizeObserver(measure);
35
+ observer.observe(probe);
36
+ }
37
+ measure();
38
+ return () => {
39
+ listeners.delete(listener);
40
+ if (listeners.size > 0) return;
41
+ observer?.disconnect();
42
+ probe?.remove();
43
+ observer = null;
44
+ probe = null;
45
+ enlarged = false;
46
+ };
47
+ }
48
+ /**
49
+ * Whether the reader's text is drawn larger than the type sizes it was set
50
+ * in, by a text-only zoom or a minimum font size: `false` on the server and
51
+ * until the page has been measured.
52
+ */
53
+ function useEnlargedText() {
54
+ return useSyncExternalStore(subscribe, getEnlarged, getServerEnlarged);
55
+ }
56
+ export { PROBE_ATTRIBUTE, useEnlargedText };
57
+
58
+ //# sourceMappingURL=useEnlargedText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEnlargedText.js","names":["stylex","useSyncExternalStore","textScaleStyles","THRESHOLD","PROBE_ATTRIBUTE","listeners","Set","probe","observer","ResizeObserver","enlarged","getEnlarged","getServerEnlarged","measure","height","width","getBoundingClientRect","next","listener","subscribe","add","document","createElement","setAttribute","className","body","append","observe","delete","size","disconnect","remove","useEnlargedText"],"sources":["../../src/hooks/useEnlargedText.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport { useSyncExternalStore } from 'react';\nimport { textScaleStyles } from '../styles/text-scale';\n\n// Whether the reader has enlarged their text, which NavigationBar,\n// NavigationRail and Tabs answer by letting a label take further lines rather\n// than cutting it short.\n//\n// There is no media query for it, and the browser's text-size setting is not\n// it: that setting is the root font size, and every type size here is a\n// length in pixels, which it leaves alone. What does enlarge this library's\n// text is a text-only zoom, and a browser's minimum font size, and both grow\n// the font while every length in pixels stays as it is — so a label that fit\n// its destination no longer does. Page zoom is not it either: it grows the\n// text and the box around it together, which narrows the window rather than\n// enlarging the text inside it.\n//\n// So a probe compares the two: an element as wide as its own font, `1em`, and\n// as tall as the same size written as a length — see src/styles/text-scale.ts.\n// The two agree until the font is enlarged, and a ResizeObserver on the probe\n// catches the change as it is made. One probe for the whole page, appended to\n// the body while anything is listening and removed after the last one stops.\n//\n// A server render and the first render after it say not enlarged, so a page\n// is drawn as it always was and only a reader with enlarged text sees the\n// labels change, once the probe is measured.\n\n// Past 5% larger, which every text zoom step is: Firefox's smallest is 10%.\nconst THRESHOLD = 1.05;\n\n/** What the probe carries, so a spec can find it and enlarge its font. */\nconst PROBE_ATTRIBUTE = 'data-text-scale-probe';\nconst listeners = new Set<() => void>();\nlet probe: HTMLElement | null = null;\nlet observer: null | ResizeObserver = null;\nlet enlarged = false;\nfunction getEnlarged() {\n return enlarged;\n}\n\n// A server knows nothing of the reader's settings.\nfunction getServerEnlarged() {\n return false;\n}\nfunction measure() {\n if (probe === null) {\n return;\n }\n const {\n height,\n width\n } = probe.getBoundingClientRect();\n const next = height > 0 && width / height > THRESHOLD;\n if (next === enlarged) {\n return;\n }\n enlarged = next;\n for (const listener of listeners) {\n listener();\n }\n}\nfunction subscribe(listener: () => void) {\n listeners.add(listener);\n if (probe === null) {\n probe = document.createElement('span');\n probe.setAttribute('aria-hidden', 'true');\n probe.setAttribute(PROBE_ATTRIBUTE, '');\n probe.className = stylex.props(textScaleStyles.probe).className ?? '';\n document.body.append(probe);\n observer = new ResizeObserver(measure);\n observer.observe(probe);\n }\n measure();\n return () => {\n listeners.delete(listener);\n if (listeners.size > 0) {\n return;\n }\n observer?.disconnect();\n probe?.remove();\n observer = null;\n probe = null;\n enlarged = false;\n };\n}\n\n/**\n * Whether the reader's text is drawn larger than the type sizes it was set\n * in, by a text-only zoom or a minimum font size: `false` on the server and\n * until the page has been measured.\n */\nfunction useEnlargedText(): boolean {\n return useSyncExternalStore(subscribe, getEnlarged, getServerEnlarged);\n}\nexport { PROBE_ATTRIBUTE, useEnlargedText };"],"mappings":";;;;AA4BA,MAAMG,YAAY;;AAGlB,MAAMC,kBAAkB;AACxB,MAAMC,4BAAY,IAAIC,IAAgB;AACtC,IAAIC,QAA4B;AAChC,IAAIC,WAAkC;AACtC,IAAIE,WAAW;AACf,SAASC,cAAc;CACrB,OAAOD;AACT;AAGA,SAASE,oBAAoB;CAC3B,OAAO;AACT;AACA,SAASC,UAAU;CACjB,IAAIN,UAAU,MACZ;CAEF,MAAM,EACJO,QACAC,UACER,MAAMS,sBAAsB;CAChC,MAAMC,OAAOH,SAAS,KAAKC,QAAQD,SAASX;CAC5C,IAAIc,SAASP,UACX;CAEFA,WAAWO;CACX,KAAK,MAAMC,YAAYb,WACrBa,SAAS;AAEb;AACA,SAASC,UAAUD,UAAsB;CACvCb,UAAUe,IAAIF,QAAQ;CACtB,IAAIX,UAAU,MAAM;EAClBA,QAAQc,SAASC,cAAc,MAAM;EACrCf,MAAMgB,aAAa,eAAe,MAAM;EACxChB,MAAMgB,aAAanB,iBAAiB,EAAE;EACtCG,MAAMiB,YAAYxB,MAAaE,gBAAgBK,KAAK,CAAC,CAACiB,aAAa;EACnEH,SAASI,KAAKC,OAAOnB,KAAK;EAC1BC,WAAW,IAAIC,eAAeI,OAAO;EACrCL,SAASmB,QAAQpB,KAAK;CACxB;CACAM,QAAQ;CACR,aAAa;EACXR,UAAUuB,OAAOV,QAAQ;EACzB,IAAIb,UAAUwB,OAAO,GACnB;EAEFrB,UAAUsB,WAAW;EACrBvB,OAAOwB,OAAO;EACdvB,WAAW;EACXD,QAAQ;EACRG,WAAW;CACb;AACF;;;;;;AAOA,SAAAsB,kBAAA;CAAA,OACS/B,qBAAqBkB,WAAWR,aAAaC,iBAAiB;AAAC"}
@@ -2,6 +2,7 @@ import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
2
2
  import { BadgeMarkContext } from "../badge/index.js";
3
3
  import Badge from "../components/badge/index.js";
4
4
  import { useClippedTitle } from "../hooks/useClippedTitle.js";
5
+ import { useEnlargedText } from "../hooks/useEnlargedText.js";
5
6
  import { useRipple } from "../hooks/useRipple.js";
6
7
  import { focus } from "../styles/focus.js";
7
8
  import { mergeStatefulStyles } from "../styles/merge.js";
@@ -45,7 +46,7 @@ function itemClasses(form, isCurrent) {
45
46
  const styles = FORMS[form];
46
47
  return (state) => props(navigationItemStyles.link, navigationItemStyles.fade, styles.item, isCurrent && styles.itemCurrent, state.isHovered && (isCurrent ? styles.itemHoveredCurrent : styles.itemHovered), state.isFocusVisible && (isCurrent ? styles.itemFocusedCurrent : styles.itemFocused), state.isPressed && (isCurrent ? styles.itemPressedCurrent : styles.itemPressed), state.isFocusVisible && RINGS[form].item, state.isDisabled && navigationItemStyles.itemDisabled);
47
48
  }
48
- function itemContent(form, isCurrent, badge, icon, label, naming, ripple) {
49
+ function itemContent(form, isCurrent, badge, icon, label, naming, ripple, isEnlarged) {
49
50
  const styles = FORMS[form];
50
51
  const glyph = badge === void 0 || badge === false ? icon : /* @__PURE__ */ jsx(BadgeMarkContext, {
51
52
  value: styles.badgeMark,
@@ -70,7 +71,7 @@ function itemContent(form, isCurrent, badge, icon, label, naming, ripple) {
70
71
  ]
71
72
  }), /* @__PURE__ */ jsx(NavigationLabel, {
72
73
  id: naming?.labelId,
73
- styling: props(navigationItemStyles.label, navigationItemStyles.fade, styles.label, isCurrent && styles.labelCurrent, state.isDisabled && navigationItemStyles.itemDisabled),
74
+ styling: props(navigationItemStyles.label, navigationItemStyles.fade, styles.label, isEnlarged && styles.labelWhole, isCurrent && styles.labelCurrent, state.isDisabled && navigationItemStyles.itemDisabled),
74
75
  children: label
75
76
  })] });
76
77
  }
@@ -82,6 +83,7 @@ function NavigationItem(t0) {
82
83
  const $ = c(21);
83
84
  const { badge, badgeLabel, children, href, icon, isCurrent: isCurrentProp, onClick, onContextMenu, onPointerCancel, onPointerDown, onPointerLeave, onPointerUp, ...props$1 } = t0;
84
85
  const { form, selectedRoute } = useContext(NavigationContext);
86
+ const isEnlarged = useEnlargedText();
85
87
  let t1;
86
88
  if ($[0] !== onClick || $[1] !== onContextMenu || $[2] !== onPointerCancel || $[3] !== onPointerDown || $[4] !== onPointerLeave || $[5] !== onPointerUp) {
87
89
  t1 = {
@@ -120,7 +122,7 @@ function NavigationItem(t0) {
120
122
  const t4 = naming && `${naming.labelId} ${naming.badgeId}`;
121
123
  const t5 = ripple.handlers;
122
124
  const t6 = mergeStatefulStyles(itemClasses(form, isCurrent), props$1);
123
- const t7 = itemContent(form, isCurrent, badge, icon, children, naming, ripple.surface);
125
+ const t7 = itemContent(form, isCurrent, badge, icon, children, naming, ripple.surface, isEnlarged);
124
126
  let t8;
125
127
  if ($[9] !== T0 || $[10] !== href || $[11] !== props$1 || $[12] !== ripple.handlers || $[13] !== t3 || $[14] !== t4 || $[15] !== t6 || $[16] !== t7) {
126
128
  t8 = /* @__PURE__ */ jsx(T0, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["stylex","useContext","useId","RACLink","useClippedTitle","useRipple","focus","mergeStatefulStyles","NavigationContext","barItemStyles","collapsedItemStyles","crampedBarItemStyles","expandedItemStyles","navigationItemStyles","navigationListStyles","FORMS","bar","barCramped","item","list","listItem","collapsed","expanded","RINGS","indicator","indicatorRing","ringWeight","itemRing","ringVisible","badgeId","badgeLabel","labelId","badge","children","href","icon","isCurrent","itemClasses","form","styles","state","props","link","fade","itemCurrent","isHovered","itemHoveredCurrent","itemHovered","isFocusVisible","itemFocusedCurrent","itemFocused","isPressed","itemPressedCurrent","itemPressed","isDisabled","itemDisabled","itemContent","label","naming","ripple","glyph","undefined","badgeMark","pill","indicatorCurrent","indicatorHoveredCurrent","indicatorHovered","indicatorFocusedCurrent","indicatorFocused","indicatorPressedCurrent","indicatorPressed","labelCurrent","NavigationItem","t0","$","_c","isCurrentProp","onClick","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","selectedRoute","t1","t2","T0","t3","t4","t5","handlers","t6","t7","surface","t8","t9","NavigationLabel","id","styling","clipped","NavigationList","layout"],"sources":["../../src/navigation/index.tsx"],"sourcesContent":["import type { ReactNode, RefAttributes } from 'react';\nimport type { FocusableElement, LinkRenderProps, LinkProps as RACLinkProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useId } from 'react';\nimport { Link as RACLink } from 'react-aria-components';\nimport type { NavigationForm } from './context';\nimport { BadgeMarkContext } from '../badge';\nimport Badge from '../components/badge';\nimport { useClippedTitle } from '../hooks/useClippedTitle';\nimport { useRipple } from '../hooks/useRipple';\nimport { focus } from '../styles/focus';\nimport { mergeStatefulStyles } from '../styles/merge';\nimport { NavigationContext } from './context';\nimport { barItemStyles, collapsedItemStyles, crampedBarItemStyles, expandedItemStyles, navigationItemStyles, navigationListStyles } from './styles';\n\n// The destination NavigationBar and NavigationRail both render, and the\n// context each hands it: which of the three forms to draw and which route is\n// current. See ./styles.ts for the forms.\n//\n// A destination is a link — it goes somewhere, rather than selecting\n// something — so it is React Aria's `Link`, which routes through a\n// `RouterProvider` when an app has one. The current one is the one whose\n// `href` is the bar's or the rail's `selectedRoute`, the same matching\n// NavigationTree does, and it carries `aria-current=\"page\"`. A destination's\n// own `isCurrent` overrides that match, which is how an app on a route\n// nested under a destination marks the destination it is under: the match\n// is exact, and a top-level destination's `href` is rarely the whole route.\n// The attribute, the indicator and the label all read the one answer.\n//\n// A badge is hidden from assistive technology — see the Badge component for\n// why — so what it says reaches the link's name through `badgeLabel`: the\n// link is named by its label and that text together, through\n// `aria-labelledby`, rather than by an `aria-label` the call site would keep\n// in step with both the label and the count, in every language. The text\n// sits in a hidden span beside the badge, which a name can still be read\n// from, so the label's own text and the width the bar measures it at are\n// untouched. An `aria-label` or `aria-labelledby` the call site passes still\n// names the link instead.\n//\n// The destinations are a list, each in an item of its own, which is what has\n// a screen reader say how many there are and which one it is on, as the\n// WAI-ARIA navigation examples do. The bar and the rail draw the list, and\n// each destination draws its item: the item takes the destination's place in\n// the row or the column, and the link fills it, so the class, the ref and\n// `aria-current` stay on the link.\n\nconst FORMS = {\n bar: barItemStyles,\n barCramped: {\n ...collapsedItemStyles,\n item: crampedBarItemStyles.item,\n list: crampedBarItemStyles.list,\n listItem: crampedBarItemStyles.listItem\n },\n collapsed: collapsedItemStyles,\n expanded: expandedItemStyles\n};\n\n// The focus ring goes around the pill, wherever a form draws it: the\n// indicator in a vertical destination, the whole destination in a horizontal\n// one. The rail's two forms take the library's shared ring. The bar's pill\n// moves from one element to the other at the medium breakpoint, so its rings\n// are its own, each giving way at the width the other takes over. Each ring\n// takes `ringWeight` after it, which is what tells it from the current\n// destination's border under forced colours.\nconst RINGS = {\n bar: {\n indicator: [barItemStyles.indicatorRing, navigationItemStyles.ringWeight],\n item: [barItemStyles.itemRing, navigationItemStyles.ringWeight]\n },\n barCramped: {\n indicator: [focus.ringVisible, navigationItemStyles.ringWeight],\n item: null\n },\n collapsed: {\n indicator: [focus.ringVisible, navigationItemStyles.ringWeight],\n item: null\n },\n expanded: {\n indicator: null,\n item: [focus.ringVisible, navigationItemStyles.ringWeight]\n }\n};\n\n// The ids a destination naming its badge gives its label and the badge's\n// words, which its link is labelled by.\ntype Naming = {\n badgeId: string;\n badgeLabel: string;\n labelId: string;\n};\ntype NavigationItemProps = {\n /**\n * A badge on the icon: `true` for the badges page's small dot, a number\n * for the large badge holding it. The badge is hidden from assistive\n * technology, so say what it says in `badgeLabel`.\n */\n badge?: boolean | number;\n /**\n * What the badge says, in words and in the reader's language — \"3 new\",\n * or \"new\" for the dot. It follows the label in the destination's\n * accessible name, \"First item 3 new\", and is read only while the badge is\n * drawn.\n */\n badgeLabel?: string;\n /** The destination's name, drawn as its label. */\n children: ReactNode;\n /** A function may compute the class from the destination's render state. */\n className?: RACLinkProps['className'];\n /**\n * Where the destination goes, and what the bar's or the rail's\n * `selectedRoute` is matched against.\n */\n href: string;\n /** The destination's icon, at the pages' 24dp. */\n icon: ReactNode;\n /**\n * Whether this is the current destination, in place of matching its\n * `href` against the bar's or the rail's `selectedRoute`. Pass it for a\n * route nested under the destination, `/first/42` under `/first`, which\n * the exact match leaves without a current destination; `false` turns\n * the match off. Left out, the match decides.\n */\n isCurrent?: boolean;\n /** A function may compute the style from the destination's render state. */\n style?: RACLinkProps['style'];\n} & Omit<RACLinkProps, 'children' | 'className' | 'href' | 'style'>;\n\n// A destination's own classes, from React Aria's render state: the pill in a\n// horizontal form, and the layers over it.\nfunction itemClasses(form: NavigationForm, isCurrent: boolean) {\n const styles = FORMS[form];\n return (state: LinkRenderProps) => stylex.props(navigationItemStyles.link, navigationItemStyles.fade, styles.item, isCurrent && styles.itemCurrent, state.isHovered && (isCurrent ? styles.itemHoveredCurrent : styles.itemHovered), state.isFocusVisible && (isCurrent ? styles.itemFocusedCurrent : styles.itemFocused), state.isPressed && (isCurrent ? styles.itemPressedCurrent : styles.itemPressed), state.isFocusVisible && RINGS[form].item, state.isDisabled && navigationItemStyles.itemDisabled);\n}\n\n// What a destination draws, from React Aria's render state: the indicator\n// holding the icon and the press ripple, and the label beside or under it.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after.\n//\n// The ripple comes first, so a count badge drawn after it stays over it.\nfunction itemContent(form: NavigationForm, isCurrent: boolean, badge: boolean | number | undefined, icon: ReactNode, label: ReactNode, naming: Naming | undefined, ripple: ReactNode) {\n const styles = FORMS[form];\n const glyph = badge === undefined || badge === false ? icon : <BadgeMarkContext value={styles.badgeMark}>\n <Badge count={badge === true ? undefined : badge}>{icon}</Badge>\n </BadgeMarkContext>;\n return (state: LinkRenderProps) => <>\n <span {...stylex.props(navigationItemStyles.pill, navigationItemStyles.fade, styles.indicator, isCurrent && styles.indicatorCurrent, state.isHovered && (isCurrent ? styles.indicatorHoveredCurrent : styles.indicatorHovered), state.isFocusVisible && (isCurrent ? styles.indicatorFocusedCurrent : styles.indicatorFocused), state.isPressed && (isCurrent ? styles.indicatorPressedCurrent : styles.indicatorPressed), state.isFocusVisible && RINGS[form].indicator, state.isDisabled && navigationItemStyles.itemDisabled)}>\n {ripple}\n <span {...stylex.props(navigationItemStyles.icon)}>{glyph}</span>\n {naming && <span hidden id={naming.badgeId}>\n {naming.badgeLabel}\n </span>}\n </span>\n <NavigationLabel id={naming?.labelId} styling={stylex.props(navigationItemStyles.label, navigationItemStyles.fade, styles.label, isCurrent && styles.labelCurrent, state.isDisabled && navigationItemStyles.itemDisabled)}>\n {label}\n </NavigationLabel>\n </>;\n}\n\n/**\n * One destination in a navigation bar or rail: an icon, a label and, when\n * it is the current one, the active indicator behind them.\n */\nfunction NavigationItem({\n badge,\n badgeLabel,\n children,\n href,\n icon,\n isCurrent: isCurrentProp,\n onClick,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n ...props\n}: NavigationItemProps & RefAttributes<HTMLAnchorElement>) {\n const {\n form,\n selectedRoute\n } = useContext(NavigationContext);\n // The call site's handlers run after the ripple's own.\n const ripple = useRipple<FocusableElement>(props.isDisabled !== true, {\n onClick,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n });\n const isCurrent = isCurrentProp ?? (selectedRoute !== undefined && href === selectedRoute);\n const labelId = useId();\n const badgeId = useId();\n // Only while the badge is drawn, and only where the call site names the\n // link no other way.\n const naming = badge !== undefined && badge !== false && badgeLabel !== undefined && props['aria-label'] === undefined && props['aria-labelledby'] === undefined ? {\n badgeId,\n badgeLabel,\n labelId\n } : undefined;\n return <li {...stylex.props(navigationListStyles.item, FORMS[form].listItem)}>\n <RACLink aria-current={isCurrent ? 'page' : undefined} aria-labelledby={naming && `${naming.labelId} ${naming.badgeId}`} href={href} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemClasses(form, isCurrent), props)}>\n {itemContent(form, isCurrent, badge, icon, children, naming, ripple.surface)}\n </RACLink>\n </li>;\n}\n\n// The label, kept to one line, which shows its full text in the browser's\n// tooltip on hover once it is cut short — see `useClippedTitle`. A component\n// because the title is state, and `itemContent` runs inside React Aria's\n// render function.\nfunction NavigationLabel({\n children,\n id,\n styling\n}: {\n children: ReactNode;\n id: string | undefined;\n styling: ReturnType<typeof stylex.props>;\n}) {\n const clipped = useClippedTitle(children);\n return <span {...clipped} id={id} {...styling}>\n {children}\n </span>;\n}\n\n/**\n * The list a bar or a rail holds its destinations in, laid out as `layout`\n * says, the bar's row or the rail's column, with the space between them its\n * form's.\n */\nfunction NavigationList({\n children,\n layout\n}: {\n children: ReactNode;\n layout: stylex.StyleXStyles;\n}) {\n const {\n form\n } = useContext(NavigationContext);\n return <ul\n // oxlint-disable-next-line jsx-a11y/no-redundant-roles -- Safari's VoiceOver drops the role once the markers are cleared\n role=\"list\" {...stylex.props(navigationListStyles.list, layout, FORMS[form].list)}>\n {children}\n </ul>;\n}\nexport type { NavigationItemProps };\nexport { NavigationItem, NavigationList };"],"mappings":";;;;;;;;;;;;;;AA8CA,MAAMe,QAAQ;CACZC,KAAKP;CACLQ,YAAY;EACV,GAAGP;EACHQ,MAAMP,qBAAqBO;EAC3BC,MAAMR,qBAAqBQ;EAC3BC,UAAUT,qBAAqBS;CACjC;CACAC,WAAWX;CACXY,UAAUV;AACZ;AASA,MAAMW,QAAQ;CACZP,KAAK;EACHQ,WAAW,CAACf,cAAcgB,eAAeZ,qBAAqBa,UAAU;EACxER,MAAM,CAACT,cAAckB,UAAUd,qBAAqBa,UAAU;CAChE;CACAT,YAAY;EACVO,WAAW,CAAClB,MAAMsB,aAAaf,qBAAqBa,UAAU;EAC9DR,MAAM;CACR;CACAG,WAAW;EACTG,WAAW,CAAClB,MAAMsB,aAAaf,qBAAqBa,UAAU;EAC9DR,MAAM;CACR;CACAI,UAAU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A,OAAAA,KAAAV,EAAA;CAAA,IAAAW;CAAA,IAAAX,EAAA,OAAAzC,YAAAyC,EAAA,OAAAU,IAAA;EAF1EC,KAAA,oBAAA,MAAA;GAEF,MAAA;GAAM,GAAKD;GACXnD;EACE,CAAA;EAAAyC,EAAA,KAAAzC;EAAAyC,EAAA,KAAAU;EAAAV,EAAA,KAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,OAJAW;AAIA"}
1
+ {"version":3,"file":"index.js","names":["stylex","useContext","useId","RACLink","useClippedTitle","useEnlargedText","useRipple","focus","mergeStatefulStyles","NavigationContext","barItemStyles","collapsedItemStyles","crampedBarItemStyles","expandedItemStyles","navigationItemStyles","navigationListStyles","FORMS","bar","barCramped","item","list","listItem","collapsed","expanded","RINGS","indicator","indicatorRing","ringWeight","itemRing","ringVisible","badgeId","badgeLabel","labelId","badge","children","href","icon","isCurrent","itemClasses","form","styles","state","props","link","fade","itemCurrent","isHovered","itemHoveredCurrent","itemHovered","isFocusVisible","itemFocusedCurrent","itemFocused","isPressed","itemPressedCurrent","itemPressed","isDisabled","itemDisabled","itemContent","label","naming","ripple","isEnlarged","glyph","undefined","badgeMark","pill","indicatorCurrent","indicatorHoveredCurrent","indicatorHovered","indicatorFocusedCurrent","indicatorFocused","indicatorPressedCurrent","indicatorPressed","labelWhole","labelCurrent","NavigationItem","t0","$","_c","isCurrentProp","onClick","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","selectedRoute","t1","t2","T0","t3","t4","t5","handlers","t6","t7","surface","t8","t9","NavigationLabel","id","styling","clipped","NavigationList","layout"],"sources":["../../src/navigation/index.tsx"],"sourcesContent":["import type { ReactNode, RefAttributes } from 'react';\nimport type { FocusableElement, LinkRenderProps, LinkProps as RACLinkProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useId } from 'react';\nimport { Link as RACLink } from 'react-aria-components';\nimport type { NavigationForm } from './context';\nimport { BadgeMarkContext } from '../badge';\nimport Badge from '../components/badge';\nimport { useClippedTitle } from '../hooks/useClippedTitle';\nimport { useEnlargedText } from '../hooks/useEnlargedText';\nimport { useRipple } from '../hooks/useRipple';\nimport { focus } from '../styles/focus';\nimport { mergeStatefulStyles } from '../styles/merge';\nimport { NavigationContext } from './context';\nimport { barItemStyles, collapsedItemStyles, crampedBarItemStyles, expandedItemStyles, navigationItemStyles, navigationListStyles } from './styles';\n\n// The destination NavigationBar and NavigationRail both render, and the\n// context each hands it: which of the three forms to draw and which route is\n// current. See ./styles.ts for the forms.\n//\n// A destination is a link — it goes somewhere, rather than selecting\n// something — so it is React Aria's `Link`, which routes through a\n// `RouterProvider` when an app has one. The current one is the one whose\n// `href` is the bar's or the rail's `selectedRoute`, the same matching\n// NavigationTree does, and it carries `aria-current=\"page\"`. A destination's\n// own `isCurrent` overrides that match, which is how an app on a route\n// nested under a destination marks the destination it is under: the match\n// is exact, and a top-level destination's `href` is rarely the whole route.\n// The attribute, the indicator and the label all read the one answer.\n//\n// A badge is hidden from assistive technology — see the Badge component for\n// why — so what it says reaches the link's name through `badgeLabel`: the\n// link is named by its label and that text together, through\n// `aria-labelledby`, rather than by an `aria-label` the call site would keep\n// in step with both the label and the count, in every language. The text\n// sits in a hidden span beside the badge, which a name can still be read\n// from, so the label's own text and the width the bar measures it at are\n// untouched. An `aria-label` or `aria-labelledby` the call site passes still\n// names the link instead.\n//\n// The destinations are a list, each in an item of its own, which is what has\n// a screen reader say how many there are and which one it is on, as the\n// WAI-ARIA navigation examples do. The bar and the rail draw the list, and\n// each destination draws its item: the item takes the destination's place in\n// the row or the column, and the link fills it, so the class, the ref and\n// `aria-current` stay on the link.\n\nconst FORMS = {\n bar: barItemStyles,\n barCramped: {\n ...collapsedItemStyles,\n item: crampedBarItemStyles.item,\n list: crampedBarItemStyles.list,\n listItem: crampedBarItemStyles.listItem\n },\n collapsed: collapsedItemStyles,\n expanded: expandedItemStyles\n};\n\n// The focus ring goes around the pill, wherever a form draws it: the\n// indicator in a vertical destination, the whole destination in a horizontal\n// one. The rail's two forms take the library's shared ring. The bar's pill\n// moves from one element to the other at the medium breakpoint, so its rings\n// are its own, each giving way at the width the other takes over. Each ring\n// takes `ringWeight` after it, which is what tells it from the current\n// destination's border under forced colours.\nconst RINGS = {\n bar: {\n indicator: [barItemStyles.indicatorRing, navigationItemStyles.ringWeight],\n item: [barItemStyles.itemRing, navigationItemStyles.ringWeight]\n },\n barCramped: {\n indicator: [focus.ringVisible, navigationItemStyles.ringWeight],\n item: null\n },\n collapsed: {\n indicator: [focus.ringVisible, navigationItemStyles.ringWeight],\n item: null\n },\n expanded: {\n indicator: null,\n item: [focus.ringVisible, navigationItemStyles.ringWeight]\n }\n};\n\n// The ids a destination naming its badge gives its label and the badge's\n// words, which its link is labelled by.\ntype Naming = {\n badgeId: string;\n badgeLabel: string;\n labelId: string;\n};\ntype NavigationItemProps = {\n /**\n * A badge on the icon: `true` for the badges page's small dot, a number\n * for the large badge holding it. The badge is hidden from assistive\n * technology, so say what it says in `badgeLabel`.\n */\n badge?: boolean | number;\n /**\n * What the badge says, in words and in the reader's language — \"3 new\",\n * or \"new\" for the dot. It follows the label in the destination's\n * accessible name, \"First item 3 new\", and is read only while the badge is\n * drawn.\n */\n badgeLabel?: string;\n /** The destination's name, drawn as its label. */\n children: ReactNode;\n /** A function may compute the class from the destination's render state. */\n className?: RACLinkProps['className'];\n /**\n * Where the destination goes, and what the bar's or the rail's\n * `selectedRoute` is matched against.\n */\n href: string;\n /** The destination's icon, at the pages' 24dp. */\n icon: ReactNode;\n /**\n * Whether this is the current destination, in place of matching its\n * `href` against the bar's or the rail's `selectedRoute`. Pass it for a\n * route nested under the destination, `/first/42` under `/first`, which\n * the exact match leaves without a current destination; `false` turns\n * the match off. Left out, the match decides.\n */\n isCurrent?: boolean;\n /** A function may compute the style from the destination's render state. */\n style?: RACLinkProps['style'];\n} & Omit<RACLinkProps, 'children' | 'className' | 'href' | 'style'>;\n\n// A destination's own classes, from React Aria's render state: the pill in a\n// horizontal form, and the layers over it.\nfunction itemClasses(form: NavigationForm, isCurrent: boolean) {\n const styles = FORMS[form];\n return (state: LinkRenderProps) => stylex.props(navigationItemStyles.link, navigationItemStyles.fade, styles.item, isCurrent && styles.itemCurrent, state.isHovered && (isCurrent ? styles.itemHoveredCurrent : styles.itemHovered), state.isFocusVisible && (isCurrent ? styles.itemFocusedCurrent : styles.itemFocused), state.isPressed && (isCurrent ? styles.itemPressedCurrent : styles.itemPressed), state.isFocusVisible && RINGS[form].item, state.isDisabled && navigationItemStyles.itemDisabled);\n}\n\n// What a destination draws, from React Aria's render state: the indicator\n// holding the icon and the press ripple, and the label beside or under it.\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after.\n//\n// The ripple comes first, so a count badge drawn after it stays over it.\n//\n// Once the reader has enlarged their text the label takes the form's\n// `labelWhole`, further lines under the icon in a vertical form, rather than\n// being cut short. See src/hooks/useEnlargedText.ts for how that is told.\nfunction itemContent(form: NavigationForm, isCurrent: boolean, badge: boolean | number | undefined, icon: ReactNode, label: ReactNode, naming: Naming | undefined, ripple: ReactNode, isEnlarged: boolean) {\n const styles = FORMS[form];\n const glyph = badge === undefined || badge === false ? icon : <BadgeMarkContext value={styles.badgeMark}>\n <Badge count={badge === true ? undefined : badge}>{icon}</Badge>\n </BadgeMarkContext>;\n return (state: LinkRenderProps) => <>\n <span {...stylex.props(navigationItemStyles.pill, navigationItemStyles.fade, styles.indicator, isCurrent && styles.indicatorCurrent, state.isHovered && (isCurrent ? styles.indicatorHoveredCurrent : styles.indicatorHovered), state.isFocusVisible && (isCurrent ? styles.indicatorFocusedCurrent : styles.indicatorFocused), state.isPressed && (isCurrent ? styles.indicatorPressedCurrent : styles.indicatorPressed), state.isFocusVisible && RINGS[form].indicator, state.isDisabled && navigationItemStyles.itemDisabled)}>\n {ripple}\n <span {...stylex.props(navigationItemStyles.icon)}>{glyph}</span>\n {naming && <span hidden id={naming.badgeId}>\n {naming.badgeLabel}\n </span>}\n </span>\n <NavigationLabel id={naming?.labelId} styling={stylex.props(navigationItemStyles.label, navigationItemStyles.fade, styles.label, isEnlarged && styles.labelWhole, isCurrent && styles.labelCurrent, state.isDisabled && navigationItemStyles.itemDisabled)}>\n {label}\n </NavigationLabel>\n </>;\n}\n\n/**\n * One destination in a navigation bar or rail: an icon, a label and, when\n * it is the current one, the active indicator behind them.\n */\nfunction NavigationItem({\n badge,\n badgeLabel,\n children,\n href,\n icon,\n isCurrent: isCurrentProp,\n onClick,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n ...props\n}: NavigationItemProps & RefAttributes<HTMLAnchorElement>) {\n const {\n form,\n selectedRoute\n } = useContext(NavigationContext);\n const isEnlarged = useEnlargedText();\n // The call site's handlers run after the ripple's own.\n const ripple = useRipple<FocusableElement>(props.isDisabled !== true, {\n onClick,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n });\n const isCurrent = isCurrentProp ?? (selectedRoute !== undefined && href === selectedRoute);\n const labelId = useId();\n const badgeId = useId();\n // Only while the badge is drawn, and only where the call site names the\n // link no other way.\n const naming = badge !== undefined && badge !== false && badgeLabel !== undefined && props['aria-label'] === undefined && props['aria-labelledby'] === undefined ? {\n badgeId,\n badgeLabel,\n labelId\n } : undefined;\n return <li {...stylex.props(navigationListStyles.item, FORMS[form].listItem)}>\n <RACLink aria-current={isCurrent ? 'page' : undefined} aria-labelledby={naming && `${naming.labelId} ${naming.badgeId}`} href={href} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemClasses(form, isCurrent), props)}>\n {itemContent(form, isCurrent, badge, icon, children, naming, ripple.surface, isEnlarged)}\n </RACLink>\n </li>;\n}\n\n// The label, kept to one line at the size it was set in, which shows its\n// full text in the browser's tooltip on hover once it is cut short — see `useClippedTitle`. A component\n// because the title is state, and `itemContent` runs inside React Aria's\n// render function.\nfunction NavigationLabel({\n children,\n id,\n styling\n}: {\n children: ReactNode;\n id: string | undefined;\n styling: ReturnType<typeof stylex.props>;\n}) {\n const clipped = useClippedTitle(children);\n return <span {...clipped} id={id} {...styling}>\n {children}\n </span>;\n}\n\n/**\n * The list a bar or a rail holds its destinations in, laid out as `layout`\n * says, the bar's row or the rail's column, with the space between them its\n * form's.\n */\nfunction NavigationList({\n children,\n layout\n}: {\n children: ReactNode;\n layout: stylex.StyleXStyles;\n}) {\n const {\n form\n } = useContext(NavigationContext);\n return <ul\n // oxlint-disable-next-line jsx-a11y/no-redundant-roles -- Safari's VoiceOver drops the role once the markers are cleared\n role=\"list\" {...stylex.props(navigationListStyles.list, layout, FORMS[form].list)}>\n {children}\n </ul>;\n}\nexport type { NavigationItemProps };\nexport { NavigationItem, NavigationList };"],"mappings":";;;;;;;;;;;;;;;AA+CA,MAAMgB,QAAQ;CACZC,KAAKP;CACLQ,YAAY;EACV,GAAGP;EACHQ,MAAMP,qBAAqBO;EAC3BC,MAAMR,qBAAqBQ;EAC3BC,UAAUT,qBAAqBS;CACjC;CACAC,WAAWX;CACXY,UAAUV;AACZ;AASA,MAAMW,QAAQ;CACZP,KAAK;EACHQ,WAAW,CAACf,cAAcgB,eAAeZ,qBAAqBa,UAAU;EACxER,MAAM,CAACT,cAAckB,UAAUd,qBAAqBa,UAAU;CAChE;CACAT,YAAY;EACVO,WAAW,CAAClB,MAAMsB,aAAaf,qBAAqBa,UAAU;EAC9DR,MAAM;CACR;CACAG,WAAW;EACTG,WAAW,CAAClB,MAAMsB,aAAaf,qBAAqBa,UAAU;EAC9DR,MAAM;CACR;CACAI,UAAU;EACRE,WAAW;EACXN,MAAM,CAACZ,MAAMsB,aAAaf,qBAAqBa,UAAU;CAC3D;AACF;AAgDA,SAASW,YAAYC,MAAsBF,WAAoB;CAC7D,MAAMG,SAASxB,MAAMuB;CACrB,QAAQE,UAA2BzC,MAAac,qBAAqB6B,MAAM7B,qBAAqB8B,MAAMJ,OAAOrB,MAAMkB,aAAaG,OAAOK,aAAaJ,MAAMK,cAAcT,YAAYG,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C,EAAA,KAAAU;EAAAV,EAAA,KAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,OAJAW;AAIA"}
@@ -199,6 +199,13 @@ const barItemStyles = {
199
199
  kMwMTN: "xzakmg9 x16ybrrz",
200
200
  $$css: true
201
201
  },
202
+ labelWhole: {
203
+ kE4Cay: "xkjl1po",
204
+ kHjlTd: "xj0a0fe",
205
+ k9WMMc: "x2b8uid",
206
+ khDVqt: "xeaf4i8 x17j4zob",
207
+ $$css: true
208
+ },
202
209
  list: {
203
210
  kOIVth: "xxhr3t x110hqo6",
204
211
  $$css: true
@@ -286,6 +293,13 @@ const collapsedItemStyles = {
286
293
  kMwMTN: "xzakmg9",
287
294
  $$css: true
288
295
  },
296
+ labelWhole: {
297
+ kE4Cay: "xkjl1po",
298
+ kHjlTd: "xj0a0fe",
299
+ k9WMMc: "x2b8uid",
300
+ khDVqt: "xeaf4i8",
301
+ $$css: true
302
+ },
289
303
  list: {
290
304
  kOIVth: "xzoy561",
291
305
  $$css: true
@@ -374,6 +388,7 @@ const expandedItemStyles = {
374
388
  kMwMTN: "x1sawysd",
375
389
  $$css: true
376
390
  },
391
+ labelWhole: { $$css: true },
377
392
  list: { $$css: true },
378
393
  listItem: {
379
394
  kSGwAc: "xqcrz7y",
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["colors","stateLayerOpacity","onSecondaryContainer","hover","focus","pressed","secondaryContainer","navigationItemStyles","fade","kIyJzY","k1ekBW","kAMwcw","$$css","icon","kGNEyG","k1xSpc","kGuDYH","kjj79g","itemDisabled","kMwMTN","kkrTdU","label","kXHlph","kORKVm","kg5iWk","khDVqt","link","kB7OPa","k3XXqK","kVAEAm","kMnn75","pill","kWkggS","kaIpWk","ringWeight","kMeerF","navigationListStyles","item","list","kH6xsr","kogj98","kmVPX3","barItemStyles","badgeMark","kSGwAc","kLqNvP","keTefX","indicator","kZKoxP","kmuXW","kzqmXN","indicatorCurrent","kVAM5u","ksu8eU","kMzoRj","indicatorFocused","indicatorFocusedCurrent","indicatorHovered","indicatorHoveredCurrent","indicatorPressed","indicatorPressedCurrent","indicatorRing","kjBf7l","kInvED","k5JduY","kSy8m5","kcktkL","kwXMNM","kCS8Yb","kXwgrk","kzQI83","kOIVth","kqGvvJ","kAzted","k7Eaqz","k8WAf4","kg3NbH","itemCurrent","itemFocused","itemFocusedCurrent","itemHovered","itemHoveredCurrent","itemPressed","itemPressedCurrent","itemRing","kMv6JI","k63SB2","kb6lSQ","kLWn49","ks0D6T","labelCurrent","listItem","collapsedItemStyles","expandedItemStyles","crampedBarItemStyles"],"sources":["../../src/navigation/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, media, motion, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The destinations NavigationBar and NavigationRail both draw, in the three\n// forms the two pages give them. Apart from either component so the two\n// cannot drift, and outside `src/components` for the reason src/row gives.\n//\n// A vertical destination puts its icon in the page's 56dp by 32dp active\n// indicator with the label 4dp under it, in label medium: the navigation bar\n// below the medium breakpoint, and the collapsed rail. A horizontal one is a\n// pill holding the icon and the label side by side, 16dp in at either end:\n// the bar at and above the medium breakpoint at 40dp with 4dp between the\n// two, and the expanded rail at 56dp with 8dp between them, in label large.\n//\n// The current destination's pill is the secondary container, with its icon\n// in on secondary container and, under the pill, its label in secondary;\n// every other is on surface variant. A label set inside the pill, as a\n// horizontal destination sets it, takes on secondary container instead — the\n// library's own call. Secondary over secondary container is not a pair a\n// scheme is held to, and the Poster scheme's came to 4:1, short of the 4.5:1\n// text needs; on secondary container is the pair every scheme guarantees.\n//\n// The hover, focus and pressed layers are the on secondary container role\n// over whatever the pill is, at the pages' 8%, 10% and 10%, drawn on the\n// pill — the indicator in a vertical destination, the whole destination in a\n// horizontal one. They are applied in that order, so where two hold the\n// later wins, as the pages draw one layer at a time. A focused destination's\n// ring goes around the same pill; ./index.tsx says whose ring it is.\n//\n// A change from one of those states to another fades, over the pages' short\n// duration on the standard curve, rather than landing in one frame. A press\n// also draws the library's ripple over the pressed layer, clipped to the\n// pill: inside the indicator in a vertical destination, which positions it,\n// and across the whole destination in a horizontal one, whose indicator is\n// left unpositioned so the ripple fills the link and takes the indicator's\n// pill corner.\n//\n// Under forced colours the mode paints the secondary container over in its\n// background, which left the current destination looking like every other.\n// The pill takes a 2px border in `Highlight` there, which the mode keeps,\n// and a focused destination's ring doubles its weight, so the two marks\n// differ in shape and not in colour alone — see `ringWeight`.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The pill's ground and the layers over it, written out whole for each\n// ground, since StyleX replaces a property whole.\nconst HOVERED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), transparent)`;\nconst FOCUSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), transparent)`;\nconst PRESSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), transparent)`;\nconst HOVERED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), ${colors.secondaryContainer})`;\nconst FOCUSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), ${colors.secondaryContainer})`;\nconst PRESSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), ${colors.secondaryContainer})`;\n\n// What every destination draws whatever its form.\nconst navigationItemStyles = {\n fade: {\n kIyJzY: \"x1qno0dh x12w9bfk\",\n k1ekBW: \"xs2xxs2\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n itemDisabled: {\n kMwMTN: \"x1gpw424 x1bhcspo\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n label: {\n kMwMTN: \"x1w5n3ug\",\n kXHlph: \"x101abm8\",\n kORKVm: \"xryxfnj\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n link: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n k3XXqK: \"x1t137rt\",\n kVAEAm: \"x1n2onr6\",\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n pill: {\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n ringWeight: {\n kMeerF: \"x1de99jn xlqle6p\",\n $$css: true\n }\n};\n\n// The list a bar or a rail holds its destinations in, and the item each\n// destination sits in — see `NavigationList` in ./index.tsx. The list clears\n// the margin, padding and markers a `<ul>` comes with, and each form gives\n// the space between its destinations as its `list`. The item takes the\n// destination's place in the bar's row or the rail's column, which each form\n// gives as its `listItem`, and the link fills it.\nconst navigationListStyles = {\n item: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n $$css: true\n },\n list: {\n kB7OPa: \"x9f619\",\n kH6xsr: \"x3ct3a4\",\n kogj98: \"x1ghz6dp\",\n kmVPX3: \"x1717udv\",\n $$css: true\n }\n};\n\n// The pages' least touch target, which a horizontal bar destination's 40dp\n// pill falls short of.\nconst TARGET_SIZE = '48px';\n\n// The navigation bar page's 64dp row, and the 40dp pill a horizontal\n// destination draws inside it.\nconst BAR_ROW = '64px';\nconst PILL = '40px';\n\n// The navigation bar's destination: vertical below the medium breakpoint and\n// horizontal at it and above, so every value that differs is a pair.\nconst barItemStyles = {\n badgeMark: {\n kSGwAc: \"xcspwbw\",\n kLqNvP: \"xty0069 x19sl9hu\",\n keTefX: \"xhi6r6q\",\n kVAEAm: \"x10l6tqk x15m4ytg\",\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97 x10qpgbh\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f x11lewyt\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x1n2onr6 xtke4eg\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4 x8jqrm0\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck xnqlxux\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su x8jqrm0\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g x8jqrm0\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf x8jqrm0\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6 x8jqrm0\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj x8jqrm0\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9 x8jqrm0\",\n $$css: true\n },\n indicatorRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59 x1t601oj\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n item: {\n k5JduY: \"x1ktxc2h\",\n kSy8m5: \"xfmxh57\",\n kcktkL: \"xb7ltuz\",\n kwXMNM: \"x1j6awrg\",\n kZKoxP: \"xiioxts\",\n kaIpWk: \"x1dkaolv\",\n kCS8Yb: \"x1r8uery x1a6ly76\",\n kXwgrk: \"xdt5ytf xapwh9g\",\n kzQI83: \"x1iyjqo2 x10cb59y\",\n kOIVth: \"xzoy561\",\n kjj79g: \"xl56j7k\",\n kqGvvJ: \"x10im51j xap7i12\",\n kAzted: \"x8nclml xtyuij1\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"x1t0vds8 x1nouyz5\",\n kg3NbH: \"ximhkdq xze1m75\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"xjbqb8w x1xec0pq\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"x1xldtvv x1wx4lrg\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"xjbqb8w xdodzsd\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"xjbqb8w xnmt8re\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"xjbqb8w xdenq60\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"xjbqb8w xjq3nej\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"xjbqb8w x7fq6vu\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xjbqb8w x9wewpu\",\n $$css: true\n },\n itemRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt xxgb522\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9 x16ybrrz\",\n $$css: true\n },\n list: {\n kOIVth: \"xxhr3t x110hqo6\",\n $$css: true\n },\n listItem: {\n kCS8Yb: \"x1r8uery x1a6ly76\",\n kzQI83: \"x1iyjqo2 x10cb59y\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n }\n};\n\n// The collapsed rail's destination: always vertical, the pitch from one to\n// the next the rail's 4dp gap.\nconst collapsedItemStyles = {\n badgeMark: {\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n item: {\n kXwgrk: \"xdt5ytf\",\n kmuXW: \"x2lah0s\",\n kOIVth: \"xzoy561\",\n kzqmXN: \"xh8yej3\",\n kjj79g: \"xl56j7k\",\n k8WAf4: \"x1t0vds8\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n itemCurrent: {\n $$css: true\n },\n itemFocused: {\n $$css: true\n },\n itemFocusedCurrent: {\n $$css: true\n },\n itemHovered: {\n $$css: true\n },\n itemHoveredCurrent: {\n $$css: true\n },\n itemPressed: {\n $$css: true\n },\n itemPressedCurrent: {\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9\",\n $$css: true\n },\n list: {\n kOIVth: \"xzoy561\",\n $$css: true\n },\n listItem: {\n kmuXW: \"x2lah0s\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n }\n};\n\n// The expanded rail's destination: always horizontal, a 56dp pill as wide as\n// what it holds.\nconst expandedItemStyles = {\n badgeMark: {\n kSGwAc: \"xqcrz7y\",\n kLqNvP: \"x1o0tod\",\n keTefX: \"x18xomjl\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n indicatorCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n $$css: true\n },\n indicatorFocusedCurrent: {\n $$css: true\n },\n indicatorHovered: {\n $$css: true\n },\n indicatorHoveredCurrent: {\n $$css: true\n },\n indicatorPressed: {\n $$css: true\n },\n indicatorPressedCurrent: {\n $$css: true\n },\n item: {\n kSGwAc: \"xqcrz7y\",\n kZKoxP: \"xnnlda6\",\n kaIpWk: \"x1dkaolv\",\n kXwgrk: \"x1q0g3np\",\n kmuXW: \"x2lah0s\",\n kOIVth: \"x126z3so\",\n ks0D6T: \"x193iq5w\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n list: {\n $$css: true\n },\n listItem: {\n kSGwAc: \"xqcrz7y\",\n kmuXW: \"x2lah0s\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n }\n};\n\n// The bar's destination when the bar is too narrow for its horizontal form\n// at a width that would otherwise draw it — see NavigationBar. Vertical at\n// every width: the bar's own vertical item, with the collapsed rail's\n// indicator, label and badge placement, which are the bar's vertical ones.\nconst crampedBarItemStyles = {\n item: {\n kZKoxP: \"x5yr21d\",\n kaIpWk: \"x1dkaolv\",\n kCS8Yb: \"x1r8uery\",\n kXwgrk: \"xdt5ytf\",\n kzQI83: \"x1iyjqo2\",\n kOIVth: \"xzoy561\",\n kjj79g: \"xl56j7k\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"x1t0vds8\",\n kg3NbH: \"xnjsko4\",\n $$css: true\n },\n list: {\n kOIVth: \"xxhr3t\",\n $$css: true\n },\n listItem: {\n kCS8Yb: \"x1r8uery\",\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n }\n};\nexport { barItemStyles, collapsedItemStyles, crampedBarItemStyles, expandedItemStyles, navigationItemStyles, navigationListStyles };"],"mappings":";;AAoD6B,GAAsBA,OAAOE,uBAA6BD,kBAAkBE;AAC5E,GAAsBH,OAAOE,uBAA6BD,kBAAkBG;AAC5E,GAAsBJ,OAAOE,uBAA6BD,kBAAkBI;AAC5E,GAAsBL,OAAOE,uBAA6BD,kBAAkBE,QAAkBH,OAAOM;AACrG,GAAsBN,OAAOE,uBAA6BD,kBAAkBG,QAAkBJ,OAAOM;AACrG,GAAsBN,OAAOE,uBAA6BD,kBAAk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EACPwC,QAAQ;EACR7E,OAAO;CACT;AACF;AAMA,MAAMkF,uBAAuB;CAC3BzD,MAAM;EACJW,QAAQ;EACRf,QAAQ;EACRmC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRtD,QAAQ;EACRyD,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRhE,OAAO;CACT;CACA0B,MAAM;EACJiC,QAAQ;EACR3D,OAAO;CACT;CACA+E,UAAU;EACRvB,QAAQ;EACRE,QAAQ;EACRI,QAAQ;EACR9D,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"styles.js","names":["colors","stateLayerOpacity","onSecondaryContainer","hover","focus","pressed","secondaryContainer","navigationItemStyles","fade","kIyJzY","k1ekBW","kAMwcw","$$css","icon","kGNEyG","k1xSpc","kGuDYH","kjj79g","itemDisabled","kMwMTN","kkrTdU","label","kXHlph","kORKVm","kg5iWk","khDVqt","link","kB7OPa","k3XXqK","kVAEAm","kMnn75","pill","kWkggS","kaIpWk","ringWeight","kMeerF","navigationListStyles","item","list","kH6xsr","kogj98","kmVPX3","barItemStyles","badgeMark","kSGwAc","kLqNvP","keTefX","indicator","kZKoxP","kmuXW","kzqmXN","indicatorCurrent","kVAM5u","ksu8eU","kMzoRj","indicatorFocused","indicatorFocusedCurrent","indicatorHovered","indicatorHoveredCurrent","indicatorPressed","indicatorPressedCurrent","indicatorRing","kjBf7l","kInvED","k5JduY","kSy8m5","kcktkL","kwXMNM","kCS8Yb","kXwgrk","kzQI83","kOIVth","kqGvvJ","kAzted","k7Eaqz","k8WAf4","kg3NbH","itemCurrent","itemFocused","itemFocusedCurrent","itemHovered","itemHoveredCurrent","itemPressed","itemPressedCurrent","itemRing","kMv6JI","k63SB2","kb6lSQ","kLWn49","ks0D6T","labelCurrent","labelWhole","kE4Cay","kHjlTd","k9WMMc","listItem","collapsedItemStyles","expandedItemStyles","crampedBarItemStyles"],"sources":["../../src/navigation/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, media, motion, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The destinations NavigationBar and NavigationRail both draw, in the three\n// forms the two pages give them. Apart from either component so the two\n// cannot drift, and outside `src/components` for the reason src/row gives.\n//\n// A vertical destination puts its icon in the page's 56dp by 32dp active\n// indicator with the label 4dp under it, in label medium: the navigation bar\n// below the medium breakpoint, and the collapsed rail. A horizontal one is a\n// pill holding the icon and the label side by side, 16dp in at either end:\n// the bar at and above the medium breakpoint at 40dp with 4dp between the\n// two, and the expanded rail at 56dp with 8dp between them, in label large.\n//\n// The current destination's pill is the secondary container, with its icon\n// in on secondary container and, under the pill, its label in secondary;\n// every other is on surface variant. A label set inside the pill, as a\n// horizontal destination sets it, takes on secondary container instead — the\n// library's own call. Secondary over secondary container is not a pair a\n// scheme is held to, and the Poster scheme's came to 4:1, short of the 4.5:1\n// text needs; on secondary container is the pair every scheme guarantees.\n//\n// The hover, focus and pressed layers are the on secondary container role\n// over whatever the pill is, at the pages' 8%, 10% and 10%, drawn on the\n// pill — the indicator in a vertical destination, the whole destination in a\n// horizontal one. They are applied in that order, so where two hold the\n// later wins, as the pages draw one layer at a time. A focused destination's\n// ring goes around the same pill; ./index.tsx says whose ring it is.\n//\n// A change from one of those states to another fades, over the pages' short\n// duration on the standard curve, rather than landing in one frame. A press\n// also draws the library's ripple over the pressed layer, clipped to the\n// pill: inside the indicator in a vertical destination, which positions it,\n// and across the whole destination in a horizontal one, whose indicator is\n// left unpositioned so the ripple fills the link and takes the indicator's\n// pill corner.\n//\n// Under forced colours the mode paints the secondary container over in its\n// background, which left the current destination looking like every other.\n// The pill takes a 2px border in `Highlight` there, which the mode keeps,\n// and a focused destination's ring doubles its weight, so the two marks\n// differ in shape and not in colour alone — see `ringWeight`.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The pill's ground and the layers over it, written out whole for each\n// ground, since StyleX replaces a property whole.\nconst HOVERED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), transparent)`;\nconst FOCUSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), transparent)`;\nconst PRESSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), transparent)`;\nconst HOVERED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), ${colors.secondaryContainer})`;\nconst FOCUSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), ${colors.secondaryContainer})`;\nconst PRESSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), ${colors.secondaryContainer})`;\n\n// What every destination draws whatever its form.\nconst navigationItemStyles = {\n fade: {\n kIyJzY: \"x1qno0dh x12w9bfk\",\n k1ekBW: \"xs2xxs2\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n icon: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n itemDisabled: {\n kMwMTN: \"x1gpw424 x1bhcspo\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n label: {\n kMwMTN: \"x1w5n3ug\",\n kXHlph: \"x101abm8\",\n kORKVm: \"xryxfnj\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n link: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n k3XXqK: \"x1t137rt\",\n kVAEAm: \"x1n2onr6\",\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n pill: {\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n ringWeight: {\n kMeerF: \"x1de99jn xlqle6p\",\n $$css: true\n }\n};\n\n// The list a bar or a rail holds its destinations in, and the item each\n// destination sits in — see `NavigationList` in ./index.tsx. The list clears\n// the margin, padding and markers a `<ul>` comes with, and each form gives\n// the space between its destinations as its `list`. The item takes the\n// destination's place in the bar's row or the rail's column, which each form\n// gives as its `listItem`, and the link fills it.\nconst navigationListStyles = {\n item: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n $$css: true\n },\n list: {\n kB7OPa: \"x9f619\",\n kH6xsr: \"x3ct3a4\",\n kogj98: \"x1ghz6dp\",\n kmVPX3: \"x1717udv\",\n $$css: true\n }\n};\n\n// The pages' least touch target, which a horizontal bar destination's 40dp\n// pill falls short of.\nconst TARGET_SIZE = '48px';\n\n// The navigation bar page's 64dp row, and the 40dp pill a horizontal\n// destination draws inside it.\nconst BAR_ROW = '64px';\nconst PILL = '40px';\n\n// The navigation bar's destination: vertical below the medium breakpoint and\n// horizontal at it and above, so every value that differs is a pair.\nconst barItemStyles = {\n badgeMark: {\n kSGwAc: \"xcspwbw\",\n kLqNvP: \"xty0069 x19sl9hu\",\n keTefX: \"xhi6r6q\",\n kVAEAm: \"x10l6tqk x15m4ytg\",\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97 x10qpgbh\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f x11lewyt\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x1n2onr6 xtke4eg\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4 x8jqrm0\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck xnqlxux\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su x8jqrm0\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g x8jqrm0\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf x8jqrm0\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6 x8jqrm0\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj x8jqrm0\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9 x8jqrm0\",\n $$css: true\n },\n indicatorRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59 x1t601oj\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n item: {\n k5JduY: \"x1ktxc2h\",\n kSy8m5: \"xfmxh57\",\n kcktkL: \"xb7ltuz\",\n kwXMNM: \"x1j6awrg\",\n kZKoxP: \"xiioxts\",\n kaIpWk: \"x1dkaolv\",\n kCS8Yb: \"x1r8uery x1a6ly76\",\n kXwgrk: \"xdt5ytf xapwh9g\",\n kzQI83: \"x1iyjqo2 x10cb59y\",\n kOIVth: \"xzoy561\",\n kjj79g: \"xl56j7k\",\n kqGvvJ: \"x10im51j xap7i12\",\n kAzted: \"x8nclml xtyuij1\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"x1t0vds8 x1nouyz5\",\n kg3NbH: \"ximhkdq xze1m75\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"xjbqb8w x1xec0pq\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"x1xldtvv x1wx4lrg\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"xjbqb8w xdodzsd\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"xjbqb8w xnmt8re\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"xjbqb8w xdenq60\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"xjbqb8w xjq3nej\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"xjbqb8w x7fq6vu\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xjbqb8w x9wewpu\",\n $$css: true\n },\n itemRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt xxgb522\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9 x16ybrrz\",\n $$css: true\n },\n labelWhole: {\n kE4Cay: \"xkjl1po\",\n kHjlTd: \"xj0a0fe\",\n k9WMMc: \"x2b8uid\",\n khDVqt: \"xeaf4i8 x17j4zob\",\n $$css: true\n },\n list: {\n kOIVth: \"xxhr3t x110hqo6\",\n $$css: true\n },\n listItem: {\n kCS8Yb: \"x1r8uery x1a6ly76\",\n kzQI83: \"x1iyjqo2 x10cb59y\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n }\n};\n\n// The collapsed rail's destination: always vertical, the pitch from one to\n// the next the rail's 4dp gap.\nconst collapsedItemStyles = {\n badgeMark: {\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f\",\n kjj79g: \"xl56j7k\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n item: {\n kXwgrk: \"xdt5ytf\",\n kmuXW: \"x2lah0s\",\n kOIVth: \"xzoy561\",\n kzqmXN: \"xh8yej3\",\n kjj79g: \"xl56j7k\",\n k8WAf4: \"x1t0vds8\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n itemCurrent: {\n $$css: true\n },\n itemFocused: {\n $$css: true\n },\n itemFocusedCurrent: {\n $$css: true\n },\n itemHovered: {\n $$css: true\n },\n itemHoveredCurrent: {\n $$css: true\n },\n itemPressed: {\n $$css: true\n },\n itemPressedCurrent: {\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9\",\n $$css: true\n },\n labelWhole: {\n kE4Cay: \"xkjl1po\",\n kHjlTd: \"xj0a0fe\",\n k9WMMc: \"x2b8uid\",\n khDVqt: \"xeaf4i8\",\n $$css: true\n },\n list: {\n kOIVth: \"xzoy561\",\n $$css: true\n },\n listItem: {\n kmuXW: \"x2lah0s\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n }\n};\n\n// The expanded rail's destination: always horizontal, a 56dp pill as wide as\n// what it holds.\nconst expandedItemStyles = {\n badgeMark: {\n kSGwAc: \"xqcrz7y\",\n kLqNvP: \"x1o0tod\",\n keTefX: \"x18xomjl\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n indicator: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n indicatorCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n $$css: true\n },\n indicatorFocusedCurrent: {\n $$css: true\n },\n indicatorHovered: {\n $$css: true\n },\n indicatorHoveredCurrent: {\n $$css: true\n },\n indicatorPressed: {\n $$css: true\n },\n indicatorPressedCurrent: {\n $$css: true\n },\n item: {\n kSGwAc: \"xqcrz7y\",\n kZKoxP: \"xnnlda6\",\n kaIpWk: \"x1dkaolv\",\n kXwgrk: \"x1q0g3np\",\n kmuXW: \"x2lah0s\",\n kOIVth: \"x126z3so\",\n ks0D6T: \"x193iq5w\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n labelWhole: {\n $$css: true\n },\n list: {\n $$css: true\n },\n listItem: {\n kSGwAc: \"xqcrz7y\",\n kmuXW: \"x2lah0s\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n }\n};\n\n// The bar's destination when the bar is too narrow for its horizontal form\n// at a width that would otherwise draw it — see NavigationBar. Vertical at\n// every width: the bar's own vertical item, with the collapsed rail's\n// indicator, label and badge placement, which are the bar's vertical ones.\nconst crampedBarItemStyles = {\n item: {\n kZKoxP: \"x5yr21d\",\n kaIpWk: \"x1dkaolv\",\n kCS8Yb: \"x1r8uery\",\n kXwgrk: \"xdt5ytf\",\n kzQI83: \"x1iyjqo2\",\n kOIVth: \"xzoy561\",\n kjj79g: \"xl56j7k\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"x1t0vds8\",\n kg3NbH: \"xnjsko4\",\n $$css: true\n },\n list: {\n kOIVth: \"xxhr3t\",\n $$css: true\n },\n listItem: {\n kCS8Yb: \"x1r8uery\",\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n }\n};\nexport { barItemStyles, collapsedItemStyles, crampedBarItemStyles, expandedItemStyles, navigationItemStyles, navigationListStyles };"],"mappings":";;AAoD6B,GAAsBA,OAAOE,uBAA6BD,kBAAkBE;AAC5E,GAAsBH,OAAOE,uBAA6BD,kBAAkBG;AAC5E,GAAsBJ,OAAOE,uBAA6BD,kBAAkBI;AAC5E,GAAsBL,OAAOE,uBAA6BD,kBAAkBE,QAAkBH,OAAOM;AACrG,GAAsBN,OAAOE,uBAA6BD,kBAAkBG,QAAkBJ,OAAOM;AACrG,GAAsBN,OAAOE,uBAA6BD,kBAAkBI,UAAoBL,OAAOM;AAGpI,MAAMC,uBAAuB;CAC3BC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,MAAM;EACJC,QAAQ;EACRC,QAAQ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AAO,KACT;CACAmF,UAAU;EACRnD,QAAQ;EACRK,OAAO;EACPwC,QAAQ;EACR7E,OAAO;CACT;AACF;AAMA,MAAMsF,uBAAuB;CAC3B7D,MAAM;EACJW,QAAQ;EACRf,QAAQ;EACRmC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRtD,QAAQ;EACRyD,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRhE,OAAO;CACT;CACA0B,MAAM;EACJiC,QAAQ;EACR3D,OAAO;CACT;CACAmF,UAAU;EACR3B,QAAQ;EACRE,QAAQ;EACRI,QAAQ;EACR9D,OAAO;CACT;AACF"}
@@ -123,7 +123,9 @@ const rowStyles = {
123
123
  $$css: true
124
124
  },
125
125
  menu: {
126
+ kOIVth: "x1gka490",
126
127
  kAzted: "x1ddmzdj",
128
+ kg3NbH: "x18fpw6u",
127
129
  $$css: true
128
130
  },
129
131
  overline: {