@kanso-labs/kanso-ui 0.45.32 → 0.45.33

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","useSyncExternalStore","RACToastQueue","RACToastRegion","useBottomEdgeClearance","useRipple","mergeStatefulStyles","MESSAGE_MS","MINIMUM_MS","UNTIL_CLOSED","EXIT_MS","_temp","krVfgx","kGO01o","styles","action","kgeoSG","kGOzcv","kpsdNU","kEoFBp","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kAzted","k8WAf4","kg3NbH","$$css","close","kZKoxP","kzqmXN","kmVPX3","control","kGNEyG","kWkggS","kaIpWk","kMzoRj","kB7OPa","kkrTdU","k1xSpc","kmuXW","kjj79g","kjBf7l","kInvED","k3XXqK","kMeerF","kVAEAm","controlFocused","controlHovered","controlPressed","region","kXwgrk","kOIVth","kkqhue","kLKAdn","kE3dHu","kpe85a","kfzvcC","kY2c9j","risen","clearance","val","undefined","label","onPress","message","showCloseButton","onClose","timeout","className","closeLabel","queue","SnackbarQueue","style","FadingToastQueue","fading","Set","onClosing","key","constructor","maxVisibleToasts","add","setTimeout","delete","listener","isFading","has","subscribeToFading","rac","Map","toasts","options","clear","readableTimeout","set","keys","get","actionPress","closeToast","controlClassName","state","isFocusVisible","isHovered","isPressed","props","Math","max","Snackbar","t0","$","T0","t1","t2","t3","snackbarContent","t4","SnackbarButton","children","ripple","handlers","surface","toast","SnackbarControls","SnackbarToast","content","useFading","Symbol","for","0","1","t5","_temp2","Queue","RACButton","RACToastContent","RACToast"],"sources":["../../../src/components/snackbar/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { FocusableElement, ToastRegionProps as RACToastRegionProps, ToastRegionRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useSyncExternalStore } from 'react';\nimport { Button as RACButton, UNSTABLE_Toast as RACToast, UNSTABLE_ToastContent as RACToastContent, UNSTABLE_ToastQueue as RACToastQueue, UNSTABLE_ToastRegion as RACToastRegion, Text } from 'react-aria-components';\nimport { CloseGlyph } from '../../glyphs';\nimport { useBottomEdgeClearance } from '../../hooks/useBottomEdge';\nimport { useRipple } from '../../hooks/useRipple';\nimport '../../styles/layers.stylex';\nimport { layers } from '../../styles/layers.stylex';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The snackbar page's brief message at the bottom of the screen, with an\n// optional action beside it and an optional close button after that. The\n// page's container is the inverse surface at a 4dp corner and elevation 3,\n// its supporting text is body-medium in inverse on surface, its action label\n// is inverse primary, and its close icon takes the supporting text's colour.\n// The measurements are the page's too: 8dp of margin from the edges of the\n// screen, 8dp of padding inside the container with another 8dp either side\n// of the message, 14dp above and below on a single line, and between 320 and\n// 576dp wide above the page's 600dp breakpoint — full width below it.\n//\n// One at a time. The page shows a single snackbar and replaces it rather\n// than stacking, so a message added while another is up closes that one —\n// its `onClose` runs — and takes its place. Nothing waits behind it: React\n// Aria's queue, left to itself, kept every message and showed the one it had\n// replaced again once the newer closed, so an Undo could come back long after\n// the thing it undid.\n//\n// React Aria's toast is the behaviour: the region is a landmark that holds\n// the message, moves focus into it for a keyboard, and pauses every timer\n// while it is hovered or focused, so a message never expires while it is\n// being read or acted on.\n//\n// Three things are decided here rather than taken from React Aria or from\n// the page.\n//\n// **The queue is ours, not React Aria's.** React Aria's toast is still\n// `UNSTABLE_`, and `SnackbarQueue` is what keeps that name out of a\n// consumer's code — an upstream rename is this file rather than every call\n// site. It wraps their queue, defaults it to one visible message, and takes\n// the message and its options as one call.\n//\n// **The action and the close button are drawn here rather than through\n// Button and IconButton.** The page colours them inverse primary and inverse\n// on surface, which no variant of either carries, and a colour pushed in\n// from outside through `className` is the merge hazard AGENTS.md describes:\n// StyleX decides between two atomic classes by their order in the compiled\n// stylesheet, not by the order they are applied. Both are React Aria's\n// `Button` with the same ripple and the same state layers, over\n// `currentColor` so each takes the colour the snackbar gives it.\n//\n// **There is no `container` prop.** Every other overlay here takes one,\n// because React Aria's `Modal` and `Popover` accept a portal container, and\n// `src/components/portal-container.test.tsx` is what keeps that true.\n// Its toast region does not: it reads a portal provider that\n// `react-aria-components` does not export, so the region always lands at the\n// end of `<body>`. An app that scopes its StyleX theme to a subtree has to\n// put the theme on `:root` for the snackbar to be drawn in it.\n\n// How long a message is shown when the call site names no `timeout`. The\n// specs page gives no duration, so these come from the snackbar's guidelines\n// and accessibility pages.\n//\n// A message alone leaves after five seconds. The pages allow four to ten, and\n// React Aria's toast docs set five as the least a reader should be given.\n//\n// A call site's own `timeout` is held to the pages' four. A shorter one is\n// lengthened to that, since a message gone in a second cannot be read, and the\n// web gives a reader no setting to slow it down with — the same reason the\n// paragraph below gives. `0` is left alone: it is no timer at all.\n//\n// A message with an action stays until the action is taken or something\n// closes it, as the pages ask of every actionable snackbar. No timer can know\n// how long a reader needs to act: a screen reader user hears the message\n// first and has to reach the region before the action is any use, and the\n// pause while the region is hovered or focused only starts once they have.\n// Android's snackbar can keep shorter defaults because the platform lengthens\n// them from each user's accessibility settings, and the web has no such\n// setting to read.\nconst MESSAGE_MS = 5000;\nconst MINIMUM_MS = 4000;\nconst UNTIL_CLOSED = 0;\n\n// How long a closing snackbar takes to fade, and so how long it stays in the\n// document once something has closed it: `durationShort2`, the token the fade\n// below runs for. A theme that lengthens that token has its fade cut short\n// here, since the queue cannot read a duration out of the stylesheet.\nconst EXIT_MS = 150;\n\n// Below the page's 600dp breakpoint the snackbar runs the width of the\n// screen; above it, it takes between 320 and 576.\nconst WIDE = '@media (min-width: 600px)';\n\n// The page's own is a fade, in and out. It rises a little as it arrives too,\n// which is what the page draws and what says the message came from the edge\n// of the screen rather than appearing over it. It leaves by the fade alone,\n// and quicker than it came, on the curve for something going away: once it is\n// closed there is nothing left on it to read.\nconst rise = \"x15b941j-B\";\nconst fadeOut = \"x1jn504y-B\";\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 least press area the action keeps, as Button's medium size does. A\n// literal rather than a token, for the reason Button's `TARGET_SIZE` gives: a\n// consumer resizing their controls should not shrink a floor the page states.\nconst TARGET_SIZE = '48px';\nconst _temp = {\n krVfgx: \"xiicpxy\",\n kGO01o: \"xqf7pud\",\n \"$$css\": true\n};\nconst styles = {\n action: {\n kgeoSG: \"x1cpjm7i\",\n kGOzcv: \"xun2zgk\",\n kpsdNU: \"xm4btww\",\n kEoFBp: \"x1hmns74\",\n kMwMTN: \"x16bex6i\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kAzted: \"x1cio8j0\",\n k8WAf4: \"x1cmllll\",\n kg3NbH: \"x18fpw6u\",\n $$css: true\n },\n close: {\n kZKoxP: \"xbg5kjn\",\n kMwMTN: \"x1girmi0\",\n kzqmXN: \"xoqf9c6\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n control: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n kjBf7l: \"x14ytart\",\n kInvED: \"xr2mjdv\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n controlFocused: {\n kWkggS: \"x1mbb5iu\",\n $$css: true\n },\n controlHovered: {\n kWkggS: \"x930l3l\",\n $$css: true\n },\n controlPressed: {\n kWkggS: \"xsykwg8\",\n $$css: true\n },\n region: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x126z3so\",\n krVfgx: \"x1ey2m1c\",\n kkqhue: \"x17y0mx6\",\n k3XXqK: \"x1t137rt\",\n kGO01o: \"x1u7mh7p\",\n kLKAdn: \"xi7mcox\",\n kE3dHu: \"xbpsoft\",\n kpe85a: \"xq5vm52\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"xixxii4\",\n kY2c9j: \"x1bk8fjm\",\n $$css: true\n },\n risen: (clearance: string) => [_temp, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(clearance)\n }]\n};\ntype SnackbarAction = {\n /** What the action says. The page gives it a single word where it can. */\n label: string;\n /** Run when the action is pressed, just before the snackbar closes. */\n onPress: () => void;\n};\n\n/** What a snackbar carries: its message, and what may sit beside it. */\ntype SnackbarMessage = {\n action: SnackbarAction | undefined;\n message: ReactNode;\n showCloseButton: boolean;\n};\ntype SnackbarOptions = {\n /**\n * A single action shown after the message. Pressing it runs `onPress` and\n * closes the snackbar, which is what the page draws.\n */\n action?: SnackbarAction;\n /**\n * Run when the snackbar closes, however it was closed: by its timer, its\n * action or close button, `close`, `clear`, or a newer message added in its\n * place. It runs as the snackbar starts to fade out, not once it has gone.\n */\n onClose?: () => void;\n /**\n * Whether a close button is shown at the end. The page draws one for a\n * message a reader may want out of the way before it expires.\n *\n * Named for what it draws rather than `isDismissable`, which on `Sheet`,\n * `Dialog` and React Aria's modals is whether a press outside them closes\n * them — a snackbar has no outside to press.\n * @default false\n */\n showCloseButton?: boolean;\n /**\n * How long the snackbar is shown, in milliseconds. Defaults to five seconds\n * for a message alone. A message with an action defaults to `0` and stays\n * until the action is taken or something closes it, as Material Design asks\n * of an actionable snackbar, since a reader may need longer to reach the\n * action than any timer allows. The timer is paused while the region is\n * hovered or focused, so a message never expires while it is being read.\n *\n * A timer shorter than four seconds, the least Material Design allows, is\n * lengthened to four, since a message gone sooner cannot be read.\n *\n * `0` is the page's indefinite length: the snackbar stays until something\n * closes it. Give one of those an action or `showCloseButton`, or there is no\n * way to be rid of it.\n */\n timeout?: number;\n};\ntype SnackbarProps = {\n /**\n * What a screen reader calls the region holding the snackbar. Left out,\n * React Aria names the region itself: a count of the messages it holds, in\n * the reader's own locale — \"1 notification.\" in English, and one of some\n * thirty languages otherwise. Pass a name only to replace that, and pass a\n * translated one, since whatever is passed is read as written.\n */\n 'aria-label'?: string;\n /** A function may compute the class from the region's render state. */\n className?: RACToastRegionProps<SnackbarMessage>['className'];\n /**\n * What a screen reader calls the button that dismisses a snackbar. It sits\n * here rather than on a message's own options because it does not vary by\n * message, so putting it there would make every `add` call repeat it. Left\n * out, React Aria names it in the reader's locale — \"Close\" in English.\n */\n closeLabel?: string;\n /** The queue the region shows messages from. */\n queue: SnackbarQueue;\n /** A function may compute the style from the region's render state. */\n style?: RACToastRegionProps<SnackbarMessage>['style'];\n} & Omit<RACToastRegionProps<SnackbarMessage>, 'aria-label' | 'children' | 'className' | 'queue' | 'style'>;\n\n// One entry of the queue, as React Aria hands it to the region's render\n// function. Taken from its render state rather than imported from\n// `react-stately`, which this package does not depend on.\ntype SnackbarToastItem = ToastRegionRenderProps<SnackbarMessage>['visibleToasts'][number];\n\n/**\n * React Aria's queue, made to keep a closing snackbar on screen while it\n * fades. React Aria drops a toast from its list the moment it closes, and the\n * region unmounts with its last toast, so a closing strip has no state of its\n * own to be drawn in. Every close reaches `close` here — React Aria's timer and\n * its close button call it on the queue they were handed, as `SnackbarQueue`\n * does — so this one override covers all of them: the strip is marked as\n * fading, and React Aria closes it once the fade has run.\n */\nclass FadingToastQueue extends RACToastQueue<SnackbarMessage> {\n // The strips fading out.\n readonly #fading = new Set<string>();\n readonly #listeners = new Set<() => void>();\n\n // Run as a strip starts to close — see `SnackbarQueue`.\n readonly #onClosing: (key: string) => void;\n constructor(onClosing: (key: string) => void) {\n // One at a time, which is what the page shows. React Aria shows the\n // newest, so a message added while another is up or fading takes its\n // place at once, and the older one runs out its fade unseen.\n super({\n maxVisibleToasts: 1\n });\n this.#onClosing = onClosing;\n }\n\n /** Starts a toast fading, and closes it once the fade has run. */\n override close(key: string) {\n this.#onClosing(key);\n this.#fading.add(key);\n setTimeout(() => {\n this.#fading.delete(key);\n super.close(key);\n }, EXIT_MS);\n for (const listener of this.#listeners) {\n listener();\n }\n }\n\n /** Whether a toast is fading out. */\n isFading(key: string) {\n return this.#fading.has(key);\n }\n\n /** Calls `listener` whenever a toast starts to fade. */\n subscribeToFading(listener: () => void) {\n this.#listeners.add(listener);\n return () => {\n this.#listeners.delete(listener);\n };\n }\n}\n\n/**\n * The queue a snackbar is shown from. Make one where the app can reach it —\n * a module of its own is the usual place — mount `Snackbar` once with it,\n * and call `add` from anywhere.\n *\n * ```ts\n * const messages = new Snackbar.Queue()\n * messages.add('Label', { action: { label: 'Undo', onPress: undo } })\n * ```\n *\n * It wraps React Aria's toast queue rather than exposing it, which is what\n * keeps that API's `UNSTABLE_` name out of a consumer's code.\n */\nclass SnackbarQueue {\n /**\n * React Aria's queue, which `Snackbar` subscribes to. Not part of the\n * package's API — read it and an upstream release may break the call site.\n */\n readonly rac: RACToastQueue<SnackbarMessage>;\n\n // The snackbars not yet closed, each with its `onClose`, which `add` and\n // `clear` close. Kept here because React Aria keeps its own list private,\n // and its own `clear` empties that list without running a single `onClose`.\n readonly #open = new Map<string, (() => void) | undefined>();\n\n // `rac` as the class it is, which `rac` itself is not declared as so that\n // the subclass stays out of the package's API.\n readonly #toasts: FadingToastQueue;\n constructor() {\n this.#toasts = new FadingToastQueue(key => {\n this.#closing(key);\n });\n this.rac = this.#toasts;\n }\n\n /**\n * Shows a message in place of the one on screen, and returns the key that\n * closes it. The message it replaces is closed, so its `onClose` runs, and\n * it does not come back.\n */\n add(message: ReactNode, options: SnackbarOptions = {}) {\n const {\n action,\n onClose,\n showCloseButton = false,\n timeout\n } = options;\n this.clear();\n const key = this.#toasts.add({\n action,\n message,\n showCloseButton\n }, {\n timeout: readableTimeout(timeout ?? (action === undefined ? MESSAGE_MS : UNTIL_CLOSED))\n });\n this.#open.set(key, onClose);\n return key;\n }\n\n /** Closes the snackbar on screen, running its `onClose`. */\n clear() {\n // Each close runs that message's `onClose`, which deletes its own key\n // from the map — the entry being visited, which a Map allows.\n for (const key of this.#open.keys()) {\n this.#toasts.close(key);\n }\n }\n\n /** Closes one snackbar, by the key `add` returned. */\n close(key: string) {\n this.#toasts.close(key);\n }\n\n // A snackbar starting to close, however it was closed — its timer runs\n // inside React Aria's queue, past this one — leaves the open map and runs\n // its `onClose` on the way out.\n #closing(key: string) {\n const onClose = this.#open.get(key);\n if (this.#open.delete(key)) {\n onClose?.();\n }\n }\n}\n\n// The three handlers the snackbar hands to something below it, each built by\n// a call rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after; the React Compiler memoises the result on\n// its inputs.\nfunction actionPress(action: SnackbarAction, close: () => void) {\n return () => {\n action.onPress();\n close();\n };\n}\nfunction closeToast(queue: SnackbarQueue, key: string) {\n return () => {\n queue.close(key);\n };\n}\n\n// A control's classes, from its own render state — see `controlFocused`.\nfunction controlClassName(style: stylex.StyleXStyles) {\n return (state: {\n isFocusVisible: boolean;\n isHovered: boolean;\n isPressed: boolean;\n }) => stylex.props(styles.control, style, state.isHovered && styles.controlHovered, state.isFocusVisible && styles.controlFocused, state.isPressed && styles.controlPressed).className ?? '';\n}\n\n// A timer the reader has time to read by — see the durations at the top of\n// this file. Only a timer is held to the minimum: React Aria runs none for `0`\n// or below, which keep the message until something closes it.\nfunction readableTimeout(timeout: number) {\n return timeout > UNTIL_CLOSED ? Math.max(timeout, MINIMUM_MS) : timeout;\n}\n\n/**\n * A brief message at the bottom of the screen, with an optional action. Mount\n * one of these with a `Snackbar.Queue`, and call the queue's `add` to show a\n * message from anywhere.\n *\n * ```tsx\n * const messages = new Snackbar.Queue()\n *\n * <Snackbar queue={messages} />\n * ```\n *\n * The region is portalled to the end of `<body>` and renders nothing while\n * the queue is empty. It is one region rather than one per message, so mount\n * it once, near the root.\n *\n * The call site's `className` and `style` land on that region, which is the\n * element a layout positions.\n *\n * While a full-screen `Dialog` or a `Sheet` with a footer is open, the region\n * rises to sit above those actions rather than over them, since they share\n * the bottom edge of the window and the snackbar is drawn above both.\n *\n * While a `Dialog` or a `Sheet` is open, Tab stays inside it and never\n * reaches the snackbar. F6 does: React Aria moves focus between landmarks\n * with it, so it lands on the region, Tab then reaches the message and its\n * action, and tabbing on past the last of them leads back into the dialog. A\n * message with an action stays until it is answered, so a keyboard user has\n * the time that route takes.\n */\nfunction Snackbar({\n closeLabel,\n queue,\n ...props\n}: RefAttributes<HTMLDivElement> & SnackbarProps) {\n const clearance = useBottomEdgeClearance();\n return <RACToastRegion<SnackbarMessage> queue={queue.rac} {...props} {...mergeStatefulStyles(stylex.props(styles.region, clearance > 0 && styles.risen(`${clearance}px`)), props)}>\n {snackbarContent(queue, closeLabel)}\n </RACToastRegion>;\n}\n\n/**\n * One of the snackbar's two controls. React Aria's `Button` rather than the\n * library's, for the colour reason in the comment at the top of this file;\n * the ripple and the state layers are the same ones every other control\n * here draws, over `currentColor`.\n */\nfunction SnackbarButton({\n children,\n style,\n ...props\n}: {\n 'aria-label'?: string;\n children: ReactNode;\n onPress?: () => void;\n slot?: string;\n style: stylex.StyleXStyles;\n}) {\n const ripple = useRipple<FocusableElement>();\n return <RACButton {...ripple.handlers} {...props} className={controlClassName(style)}>\n {children}\n {ripple.surface}\n </RACButton>;\n}\nfunction snackbarContent(queue: SnackbarQueue, closeLabel: string | undefined) {\n return ({\n toast\n }: {\n toast: SnackbarToastItem;\n }) => <SnackbarToast close={closeToast(queue, toast.key)} closeLabel={closeLabel} queue={queue} toast={toast} />;\n}\n\n/**\n * The action, the close button, or nothing, after the message — together, so\n * they move beneath it together.\n */\nfunction SnackbarControls({\n action,\n close,\n closeLabel,\n fading,\n showCloseButton\n}: {\n action: SnackbarAction | undefined;\n close: () => void;\n closeLabel: string | undefined;\n fading: boolean;\n showCloseButton: boolean;\n}) {\n if (action === undefined && !showCloseButton) {\n return null;\n }\n return <div className=\"x6s0dn4 x9f619 x78zum5 x2lah0s xvc5jky\">\n {action === undefined ? null :\n // Nothing on a fading strip answers a press: its action has already\n // run, and an Undo pressed twice would undo twice.\n <SnackbarButton onPress={fading ? undefined : actionPress(action, close)} style={styles.action}>\n {action.label}\n </SnackbarButton>}\n {showCloseButton ? <SnackbarButton aria-label={closeLabel} slot=\"close\" style={styles.close}>\n <CloseGlyph className=\"xxk0z11 xvy4d1p\" />\n </SnackbarButton> : null}\n </div>;\n}\n\n/** One snackbar: its message, then whatever sits after it. */\nfunction SnackbarToast({\n close,\n closeLabel,\n queue,\n toast\n}: {\n close: () => void;\n closeLabel: string | undefined;\n queue: SnackbarQueue;\n toast: SnackbarToastItem;\n}) {\n const {\n action,\n message,\n showCloseButton\n } = toast.content;\n const fading = useFading(queue, toast.key);\n return <RACToast toast={toast} {...{\n 0: {\n className: \"x6s0dn4 x1n1nwrg x1u6grsq x1dwmuk9 x16dv9tl x1c5gpgi x1w1tqly x1tfhd1 xx61lck x13rsnn2 x1udv5rz x9f619 x78zum5 x1a02dak xh8yej3 x1x1rfll xlx31pv x1dry9sr xeuugli xuq8xha x1ulcdur xr2mjdv x9v5kkp x1t137rt x1de99jn xt970qd xn60lsn x67bb7w\"\n },\n 1: {\n className: \"x6s0dn4 x1c5gpgi x1w1tqly x1tfhd1 xx61lck x13rsnn2 x1udv5rz x9f619 x78zum5 x1a02dak xh8yej3 x1x1rfll xlx31pv x1dry9sr xeuugli xuq8xha x1ulcdur xr2mjdv x9v5kkp x1t137rt x1de99jn xt970qd xn60lsn x1vhuh8u x1u6grsq x10e4vud xxp0q0x xi22y15 x47corl\"\n }\n }[!!fading << 0]}>\n <RACToastContent className=\"x9f619 x1girmi0 x4pfjvb x1iyjqo2 xpo2rfv x193rfdd x1hews6w xkjl1po xn43zvd xv61bfh xz158ff xeuugli xj0a0fe xxlmvz2\">\n <Text slot=\"title\">{message}</Text>\n </RACToastContent>\n <SnackbarControls action={action} close={close} closeLabel={closeLabel} fading={fading} showCloseButton={showCloseButton} />\n </RACToast>;\n}\n\n/**\n * Whether a snackbar is fading out of its queue. `rac` is always the queue\n * that fades, but is declared as React Aria's, so it is narrowed back here.\n */\nfunction useFading(queue: SnackbarQueue, key: string) {\n const toasts = queue.rac instanceof FadingToastQueue ? queue.rac : undefined;\n return useSyncExternalStore(listener => toasts?.subscribeToFading(listener) ?? (() => {}), () => toasts?.isFading(key) ?? false);\n}\nSnackbar.Queue = SnackbarQueue;\n\n// The queue is reached as `Snackbar.Queue` rather than exported beside the\n// component: this file would otherwise export something that is not a\n// component, which is what turns fast refresh off for it.\nexport type { SnackbarAction, SnackbarMessage, SnackbarOptions, SnackbarProps, SnackbarQueue, ToastRegionRenderProps as SnackbarRegionRenderProps };\nexport default Snackbar;"],"mappings":";;;;;;;;;;;AAoFA,MAAMQ,aAAa;AACnB,MAAMC,aAAa;AACnB,MAAMC,eAAe;AAMrB,MAAMC,UAAU;AAwBhB,MAAMC,QAAQ;CACZC,QAAQ;CACRC,QAAQ;CACR,SAAS;AACX;AACA,MAAMC,SAAS;CACbC,QAAQ;EACNC,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,OAAO;EACLC,QAAQ;EACRX,QAAQ;EACRY,QAAQ;EACRC,QAAQ;EACRJ,OAAO;CACT;CACAK,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,Q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OAAAO,KAAA;CAAA,MAAA+B,IAAAhH,EAAA,CAAA;CACE,MAAA6F,SAAenB,MAAKiB,eAAgBd,mBAAmBH,MAAKiB,MAA7C1B,KAAAA;CAA8D,IAAA8C;CAAA,IAAAC,EAAA,OAAAnB,QAAA;EACjDkB,MAAAxB,aAAYM,QAAMH,kBAAoBH,QAAsB,KAAhD+C;EAAiDtB,EAAA,KAAAnB;EAAAmB,EAAA,KAAAD;CAAA,OAAAA,KAAAC,EAAA;CAAA,IAAAE;CAAA,IAAAF,EAAA,OAAA/B,OAAA+B,EAAA,OAAAnB,QAAA;EAAEqB,WAAMrB,QAAML,SAAWP,GAAY,KAA7B;EAA8B+B,EAAA,KAAA/B;EAAA+B,EAAA,KAAAnB;EAAAmB,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAAxH9G,qBAAqB6G,IAA+DG,EAAoC;AAAC;AAFlI,SAAAoB,SAAA,CAAA;AAIAxB,SAASyB,QAAQ5D"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","useSyncExternalStore","RACToastQueue","RACToastRegion","useBottomEdgeClearance","useRipple","mergeStatefulStyles","MESSAGE_MS","MINIMUM_MS","UNTIL_CLOSED","EXIT_MS","_temp","krVfgx","kGO01o","styles","action","kgeoSG","kGOzcv","kpsdNU","kEoFBp","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kAzted","k8WAf4","kg3NbH","$$css","close","kZKoxP","kzqmXN","kmVPX3","control","kGNEyG","kWkggS","kaIpWk","kMzoRj","kB7OPa","kkrTdU","k1xSpc","kmuXW","kjj79g","kjBf7l","kInvED","k3XXqK","kMeerF","kVAEAm","controlFocused","controlHovered","controlPressed","region","kXwgrk","kOIVth","kkqhue","kLKAdn","kE3dHu","kpe85a","kfzvcC","kY2c9j","risen","clearance","val","undefined","label","onPress","message","showCloseButton","onClose","timeout","className","closeLabel","queue","SnackbarQueue","style","FadingToastQueue","fading","Set","onClosing","key","constructor","maxVisibleToasts","add","setTimeout","delete","listener","isFading","has","subscribeToFading","rac","Map","toasts","options","clear","readableTimeout","set","keys","get","actionPress","closeToast","controlClassName","state","isFocusVisible","isHovered","isPressed","props","Math","max","Snackbar","t0","$","T0","t1","t2","t3","snackbarContent","t4","SnackbarButton","children","ripple","handlers","surface","toast","SnackbarControls","SnackbarToast","content","useFading","Symbol","for","0","1","t5","_temp2","Queue","RACButton","RACToastContent","RACToast"],"sources":["../../../src/components/snackbar/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { FocusableElement, ToastRegionProps as RACToastRegionProps, ToastRegionRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useSyncExternalStore } from 'react';\nimport { Button as RACButton, UNSTABLE_Toast as RACToast, UNSTABLE_ToastContent as RACToastContent, UNSTABLE_ToastQueue as RACToastQueue, UNSTABLE_ToastRegion as RACToastRegion, Text } from 'react-aria-components';\nimport { CloseGlyph } from '../../glyphs';\nimport { useBottomEdgeClearance } from '../../hooks/useBottomEdge';\nimport { useRipple } from '../../hooks/useRipple';\nimport '../../styles/layers.stylex';\nimport { layers } from '../../styles/layers.stylex';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The snackbar page's brief message at the bottom of the screen, with an\n// optional action beside it and an optional close button after that. The\n// page's container is the inverse surface at a 4dp corner and elevation 3,\n// its supporting text is body-medium in inverse on surface, its action label\n// is inverse primary, and its close icon takes the supporting text's colour.\n// The measurements are the page's too: 8dp of margin from the edges of the\n// screen, 8dp of padding inside the container with another 8dp either side\n// of the message, 14dp above and below on a single line, and between 320 and\n// 576dp wide above the page's 600dp breakpoint — full width below it.\n//\n// One at a time. The page shows a single snackbar and replaces it rather\n// than stacking, so a message added while another is up closes that one —\n// its `onClose` runs — and takes its place. Nothing waits behind it: React\n// Aria's queue, left to itself, kept every message and showed the one it had\n// replaced again once the newer closed, so an Undo could come back long after\n// the thing it undid.\n//\n// React Aria's toast is the behaviour: the region is a landmark that holds\n// the message, moves focus into it for a keyboard, and pauses every timer\n// while it is hovered or focused, so a message never expires while it is\n// being read or acted on.\n//\n// Three things are decided here rather than taken from React Aria or from\n// the page.\n//\n// **The queue is ours, not React Aria's.** React Aria's toast is still\n// `UNSTABLE_`, and `SnackbarQueue` is what keeps that name out of a\n// consumer's code — an upstream rename is this file rather than every call\n// site. It wraps their queue, defaults it to one visible message, and takes\n// the message and its options as one call.\n//\n// **The action and the close button are drawn here rather than through\n// Button and IconButton.** The page colours them inverse primary and inverse\n// on surface, which no variant of either carries, and a colour pushed in\n// from outside through `className` is the merge hazard AGENTS.md describes:\n// StyleX decides between two atomic classes by their order in the compiled\n// stylesheet, not by the order they are applied. Both are React Aria's\n// `Button` with the same ripple and the same state layers, over\n// `currentColor` so each takes the colour the snackbar gives it.\n//\n// **There is no `container` prop.** Every other overlay here takes one,\n// because React Aria's `Modal` and `Popover` accept a portal container, and\n// `src/components/portal-container.test.tsx` is what keeps that true.\n// Its toast region does not: it reads a portal provider that\n// `react-aria-components` does not export, so the region always lands at the\n// end of `<body>`. An app that scopes its StyleX theme to a subtree has to\n// put the theme on `:root` for the snackbar to be drawn in it.\n\n// How long a message is shown when the call site names no `timeout`. The\n// specs page gives no duration, so these come from the snackbar's guidelines\n// and accessibility pages.\n//\n// A message alone leaves after five seconds. The pages allow four to ten, and\n// React Aria's toast docs set five as the least a reader should be given.\n//\n// A call site's own `timeout` is held to the pages' four. A shorter one is\n// lengthened to that, since a message gone in a second cannot be read, and the\n// web gives a reader no setting to slow it down with — the same reason the\n// paragraph below gives. `0` is left alone: it is no timer at all.\n//\n// A message with an action stays until the action is taken or something\n// closes it, as the pages ask of every actionable snackbar. No timer can know\n// how long a reader needs to act: a screen reader user hears the message\n// first and has to reach the region before the action is any use, and the\n// pause while the region is hovered or focused only starts once they have.\n// Android's snackbar can keep shorter defaults because the platform lengthens\n// them from each user's accessibility settings, and the web has no such\n// setting to read.\nconst MESSAGE_MS = 5000;\nconst MINIMUM_MS = 4000;\nconst UNTIL_CLOSED = 0;\n\n// How long a closing snackbar takes to fade, and so how long it stays in the\n// document once something has closed it: `durationShort2`, the token the fade\n// below runs for. A theme that lengthens that token has its fade cut short\n// here, since the queue cannot read a duration out of the stylesheet.\nconst EXIT_MS = 150;\n\n// Below the page's 600dp breakpoint the snackbar runs the width of the\n// screen; above it, it takes between 320 and 576.\nconst WIDE = '@media (min-width: 600px)';\n\n// The page's own is a fade, in and out. It rises a little as it arrives too,\n// which is what the page draws and what says the message came from the edge\n// of the screen rather than appearing over it. It leaves by the fade alone,\n// and quicker than it came, on the curve for something going away: once it is\n// closed there is nothing left on it to read.\nconst rise = \"x15b941j-B\";\nconst fadeOut = \"x1jn504y-B\";\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 least press area the action keeps, as Button's medium size does. A\n// literal rather than a token, for the reason Button's `TARGET_SIZE` gives: a\n// consumer resizing their controls should not shrink a floor the page states.\nconst TARGET_SIZE = '48px';\nconst _temp = {\n krVfgx: \"xiicpxy\",\n kGO01o: \"xqf7pud\",\n \"$$css\": true\n};\nconst styles = {\n action: {\n kgeoSG: \"x1cpjm7i\",\n kGOzcv: \"xun2zgk\",\n kpsdNU: \"xm4btww\",\n kEoFBp: \"x1hmns74\",\n kMwMTN: \"x16bex6i\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kAzted: \"x1cio8j0\",\n k8WAf4: \"x1cmllll\",\n kg3NbH: \"x18fpw6u\",\n $$css: true\n },\n close: {\n kZKoxP: \"xbg5kjn\",\n kMwMTN: \"x1girmi0\",\n kzqmXN: \"xoqf9c6\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n control: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n kjBf7l: \"x14ytart\",\n kInvED: \"xr2mjdv\",\n k3XXqK: \"x9v5kkp x1t137rt\",\n kMeerF: \"x1de99jn\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n controlFocused: {\n kWkggS: \"x1mbb5iu\",\n $$css: true\n },\n controlHovered: {\n kWkggS: \"x930l3l\",\n $$css: true\n },\n controlPressed: {\n kWkggS: \"xsykwg8\",\n $$css: true\n },\n region: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x126z3so\",\n krVfgx: \"x1ey2m1c\",\n kkqhue: \"x17y0mx6\",\n k3XXqK: \"x1t137rt\",\n kGO01o: \"x1u7mh7p\",\n kLKAdn: \"xi7mcox\",\n kE3dHu: \"xbpsoft\",\n kpe85a: \"xq5vm52\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"xixxii4\",\n kY2c9j: \"x1bk8fjm\",\n $$css: true\n },\n risen: (clearance: string) => [_temp, {\n \"--x-insetBlockEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(clearance)\n }]\n};\ntype SnackbarAction = {\n /** What the action says. The page gives it a single word where it can. */\n label: string;\n /** Run when the action is pressed, just before the snackbar closes. */\n onPress: () => void;\n};\n\n/** What a snackbar carries: its message, and what may sit beside it. */\ntype SnackbarMessage = {\n action: SnackbarAction | undefined;\n message: ReactNode;\n showCloseButton: boolean;\n};\ntype SnackbarOptions = {\n /**\n * A single action shown after the message. Pressing it runs `onPress` and\n * closes the snackbar, which is what the page draws.\n */\n action?: SnackbarAction;\n /**\n * Run when the snackbar closes, however it was closed: by its timer, its\n * action or close button, `close`, `clear`, or a newer message added in its\n * place. It runs as the snackbar starts to fade out, not once it has gone.\n */\n onClose?: () => void;\n /**\n * Whether a close button is shown at the end. The page draws one for a\n * message a reader may want out of the way before it expires.\n *\n * Named for what it draws rather than `isDismissable`, which on `Sheet`,\n * `Dialog` and React Aria's modals is whether a press outside them closes\n * them — a snackbar has no outside to press.\n * @default false\n */\n showCloseButton?: boolean;\n /**\n * How long the snackbar is shown, in milliseconds. Defaults to five seconds\n * for a message alone. A message with an action defaults to `0` and stays\n * until the action is taken or something closes it, as Material Design asks\n * of an actionable snackbar, since a reader may need longer to reach the\n * action than any timer allows. The timer is paused while the region is\n * hovered or focused, so a message never expires while it is being read.\n *\n * A timer shorter than four seconds, the least Material Design allows, is\n * lengthened to four, since a message gone sooner cannot be read.\n *\n * `0` is the page's indefinite length: the snackbar stays until something\n * closes it. Give one of those an action or `showCloseButton`, or there is no\n * way to be rid of it.\n */\n timeout?: number;\n};\ntype SnackbarProps = {\n /**\n * What a screen reader calls the region holding the snackbar. Left out,\n * React Aria names the region itself: a count of the messages it holds, in\n * the reader's own locale — \"1 notification.\" in English, and one of some\n * thirty languages otherwise. Pass a name only to replace that, and pass a\n * translated one, since whatever is passed is read as written.\n */\n 'aria-label'?: string;\n /** A function may compute the class from the region's render state. */\n className?: RACToastRegionProps<SnackbarMessage>['className'];\n /**\n * What a screen reader calls the button that dismisses a snackbar. It sits\n * here rather than on a message's own options because it does not vary by\n * message, so putting it there would make every `add` call repeat it. Left\n * out, React Aria names it in the reader's locale — \"Close\" in English.\n */\n closeLabel?: string;\n /** The queue the region shows messages from. */\n queue: SnackbarQueue;\n /** A function may compute the style from the region's render state. */\n style?: RACToastRegionProps<SnackbarMessage>['style'];\n} & Omit<RACToastRegionProps<SnackbarMessage>, 'aria-label' | 'children' | 'className' | 'queue' | 'style'>;\n\n// One entry of the queue, as React Aria hands it to the region's render\n// function. Taken from its render state rather than imported from\n// `react-stately`, which this package does not depend on.\ntype SnackbarToastItem = ToastRegionRenderProps<SnackbarMessage>['visibleToasts'][number];\n\n/**\n * React Aria's queue, made to keep a closing snackbar on screen while it\n * fades. React Aria drops a toast from its list the moment it closes, and the\n * region unmounts with its last toast, so a closing strip has no state of its\n * own to be drawn in. Every close reaches `close` here — React Aria's timer and\n * its close button call it on the queue they were handed, as `SnackbarQueue`\n * does — so this one override covers all of them: the strip is marked as\n * fading, and React Aria closes it once the fade has run.\n */\nclass FadingToastQueue extends RACToastQueue<SnackbarMessage> {\n // The strips fading out.\n readonly #fading = new Set<string>();\n readonly #listeners = new Set<() => void>();\n\n // Run as a strip starts to close — see `SnackbarQueue`.\n readonly #onClosing: (key: string) => void;\n constructor(onClosing: (key: string) => void) {\n // One at a time, which is what the page shows. React Aria shows the\n // newest, so a message added while another is up or fading takes its\n // place at once, and the older one runs out its fade unseen.\n super({\n maxVisibleToasts: 1\n });\n this.#onClosing = onClosing;\n }\n\n /** Starts a toast fading, and closes it once the fade has run. */\n override close(key: string) {\n this.#onClosing(key);\n this.#fading.add(key);\n setTimeout(() => {\n this.#fading.delete(key);\n super.close(key);\n }, EXIT_MS);\n for (const listener of this.#listeners) {\n listener();\n }\n }\n\n /** Whether a toast is fading out. */\n isFading(key: string) {\n return this.#fading.has(key);\n }\n\n /** Calls `listener` whenever a toast starts to fade. */\n subscribeToFading(listener: () => void) {\n this.#listeners.add(listener);\n return () => {\n this.#listeners.delete(listener);\n };\n }\n}\n\n/**\n * The queue a snackbar is shown from. Make one where the app can reach it —\n * a module of its own is the usual place — mount `Snackbar` once with it,\n * and call `add` from anywhere.\n *\n * ```ts\n * const messages = new Snackbar.Queue()\n * messages.add('Label', { action: { label: 'Undo', onPress: undo } })\n * ```\n *\n * It wraps React Aria's toast queue rather than exposing it, which is what\n * keeps that API's `UNSTABLE_` name out of a consumer's code.\n */\nclass SnackbarQueue {\n /**\n * React Aria's queue, which `Snackbar` subscribes to. Not part of the\n * package's API — read it and an upstream release may break the call site.\n */\n readonly rac: RACToastQueue<SnackbarMessage>;\n\n // The snackbars not yet closed, each with its `onClose`, which `add` and\n // `clear` close. Kept here because React Aria keeps its own list private,\n // and its own `clear` empties that list without running a single `onClose`.\n readonly #open = new Map<string, (() => void) | undefined>();\n\n // `rac` as the class it is, which `rac` itself is not declared as so that\n // the subclass stays out of the package's API.\n readonly #toasts: FadingToastQueue;\n constructor() {\n this.#toasts = new FadingToastQueue(key => {\n this.#closing(key);\n });\n this.rac = this.#toasts;\n }\n\n /**\n * Shows a message in place of the one on screen, and returns the key that\n * closes it. The message it replaces is closed, so its `onClose` runs, and\n * it does not come back.\n */\n add(message: ReactNode, options: SnackbarOptions = {}) {\n const {\n action,\n onClose,\n showCloseButton = false,\n timeout\n } = options;\n this.clear();\n const key = this.#toasts.add({\n action,\n message,\n showCloseButton\n }, {\n timeout: readableTimeout(timeout ?? (action === undefined ? MESSAGE_MS : UNTIL_CLOSED))\n });\n this.#open.set(key, onClose);\n return key;\n }\n\n /** Closes the snackbar on screen, running its `onClose`. */\n clear() {\n // Each close runs that message's `onClose`, which deletes its own key\n // from the map — the entry being visited, which a Map allows.\n for (const key of this.#open.keys()) {\n this.#toasts.close(key);\n }\n }\n\n /** Closes one snackbar, by the key `add` returned. */\n close(key: string) {\n this.#toasts.close(key);\n }\n\n // A snackbar starting to close, however it was closed — its timer runs\n // inside React Aria's queue, past this one — leaves the open map and runs\n // its `onClose` on the way out.\n #closing(key: string) {\n const onClose = this.#open.get(key);\n if (this.#open.delete(key)) {\n onClose?.();\n }\n }\n}\n\n// The three handlers the snackbar hands to something below it, each built by\n// a call rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after; the React Compiler memoises the result on\n// its inputs.\nfunction actionPress(action: SnackbarAction, close: () => void) {\n return () => {\n action.onPress();\n close();\n };\n}\nfunction closeToast(queue: SnackbarQueue, key: string) {\n return () => {\n queue.close(key);\n };\n}\n\n// A control's classes, from its own render state — see `controlFocused`.\nfunction controlClassName(style: stylex.StyleXStyles) {\n return (state: {\n isFocusVisible: boolean;\n isHovered: boolean;\n isPressed: boolean;\n }) => stylex.props(styles.control, style, state.isHovered && styles.controlHovered, state.isFocusVisible && styles.controlFocused, state.isPressed && styles.controlPressed).className ?? '';\n}\n\n// A timer the reader has time to read by — see the durations at the top of\n// this file. Only a timer is held to the minimum: React Aria runs none for `0`\n// or below, which keep the message until something closes it.\nfunction readableTimeout(timeout: number) {\n return timeout > UNTIL_CLOSED ? Math.max(timeout, MINIMUM_MS) : timeout;\n}\n\n/**\n * A brief message at the bottom of the screen, with an optional action. Mount\n * one of these with a `Snackbar.Queue`, and call the queue's `add` to show a\n * message from anywhere.\n *\n * ```tsx\n * const messages = new Snackbar.Queue()\n *\n * <Snackbar queue={messages} />\n * ```\n *\n * The region is portalled to the end of `<body>` and renders nothing while\n * the queue is empty. It is one region rather than one per message, so mount\n * it once, near the root.\n *\n * The call site's `className` and `style` land on that region, which is the\n * element a layout positions.\n *\n * While a full-screen `Dialog` or a `Sheet` with a footer is open, the region\n * rises to sit above those actions rather than over them, since they share\n * the bottom edge of the window and the snackbar is drawn above both.\n *\n * While a `Dialog` or a `Sheet` is open, Tab stays inside it and never\n * reaches the snackbar. F6 does: React Aria moves focus between landmarks\n * with it, so it lands on the region, Tab then reaches the message and its\n * action, and tabbing on past the last of them leads back into the dialog. A\n * message with an action stays until it is answered, so a keyboard user has\n * the time that route takes.\n */\nfunction Snackbar({\n closeLabel,\n queue,\n ...props\n}: RefAttributes<HTMLDivElement> & SnackbarProps) {\n const clearance = useBottomEdgeClearance();\n return <RACToastRegion<SnackbarMessage> queue={queue.rac} {...props} {...mergeStatefulStyles(stylex.props(styles.region, clearance > 0 && styles.risen(`${clearance}px`)), props)}>\n {snackbarContent(queue, closeLabel)}\n </RACToastRegion>;\n}\n\n/**\n * One of the snackbar's two controls. React Aria's `Button` rather than the\n * library's, for the colour reason in the comment at the top of this file;\n * the ripple and the state layers are the same ones every other control\n * here draws, over `currentColor`.\n */\nfunction SnackbarButton({\n children,\n style,\n ...props\n}: {\n 'aria-label'?: string;\n children: ReactNode;\n onPress?: () => void;\n slot?: string;\n style: stylex.StyleXStyles;\n}) {\n const ripple = useRipple<FocusableElement>();\n return <RACButton {...ripple.handlers} {...props} className={controlClassName(style)}>\n {children}\n {ripple.surface}\n </RACButton>;\n}\nfunction snackbarContent(queue: SnackbarQueue, closeLabel: string | undefined) {\n return ({\n toast\n }: {\n toast: SnackbarToastItem;\n }) => <SnackbarToast close={closeToast(queue, toast.key)} closeLabel={closeLabel} queue={queue} toast={toast} />;\n}\n\n/**\n * The action, the close button, or nothing, after the message — together, so\n * they move beneath it together.\n */\nfunction SnackbarControls({\n action,\n close,\n closeLabel,\n fading,\n showCloseButton\n}: {\n action: SnackbarAction | undefined;\n close: () => void;\n closeLabel: string | undefined;\n fading: boolean;\n showCloseButton: boolean;\n}) {\n if (action === undefined && !showCloseButton) {\n return null;\n }\n return <div className=\"x6s0dn4 x9f619 x78zum5 x2lah0s xvc5jky\">\n {action === undefined ? null :\n // Nothing on a fading strip answers a press: its action has already\n // run, and an Undo pressed twice would undo twice.\n <SnackbarButton onPress={fading ? undefined : actionPress(action, close)} style={styles.action}>\n {action.label}\n </SnackbarButton>}\n {showCloseButton ? <SnackbarButton aria-label={closeLabel} slot=\"close\" style={styles.close}>\n <CloseGlyph className=\"xxk0z11 xvy4d1p\" />\n </SnackbarButton> : null}\n </div>;\n}\n\n/** One snackbar: its message, then whatever sits after it. */\nfunction SnackbarToast({\n close,\n closeLabel,\n queue,\n toast\n}: {\n close: () => void;\n closeLabel: string | undefined;\n queue: SnackbarQueue;\n toast: SnackbarToastItem;\n}) {\n const {\n action,\n message,\n showCloseButton\n } = toast.content;\n const fading = useFading(queue, toast.key);\n return <RACToast toast={toast} {...{\n 0: {\n className: \"x6s0dn4 x1n1nwrg x1u6grsq x1dwmuk9 x16dv9tl x1c5gpgi x1w1tqly x1tfhd1 xx61lck x13rsnn2 x1udv5rz x9f619 x78zum5 x1a02dak xh8yej3 x1x1rfll xlx31pv x1dry9sr xeuugli xuq8xha x1ulcdur xr2mjdv x9v5kkp x1t137rt x1de99jn xt970qd xn60lsn x67bb7w\"\n },\n 1: {\n className: \"x6s0dn4 x1c5gpgi x1w1tqly x1tfhd1 xx61lck x13rsnn2 x1udv5rz x9f619 x78zum5 x1a02dak xh8yej3 x1x1rfll xlx31pv x1dry9sr xeuugli xuq8xha x1ulcdur xr2mjdv x9v5kkp x1t137rt x1de99jn xt970qd xn60lsn x1vhuh8u x1u6grsq x10e4vud xxp0q0x xi22y15 x47corl\"\n }\n }[!!fading << 0]}>\n <RACToastContent className=\"x9f619 x1girmi0 x4pfjvb x1iyjqo2 xpo2rfv x193rfdd x1hews6w xkjl1po xn43zvd xv61bfh xz158ff xeuugli xj0a0fe xxlmvz2\">\n <Text slot=\"title\">{message}</Text>\n </RACToastContent>\n <SnackbarControls action={action} close={close} closeLabel={closeLabel} fading={fading} showCloseButton={showCloseButton} />\n </RACToast>;\n}\n\n/**\n * Whether a snackbar is fading out of its queue. `rac` is always the queue\n * that fades, but is declared as React Aria's, so it is narrowed back here.\n */\nfunction useFading(queue: SnackbarQueue, key: string) {\n const toasts = queue.rac instanceof FadingToastQueue ? queue.rac : undefined;\n return useSyncExternalStore(listener => toasts?.subscribeToFading(listener) ?? (() => {}), () => toasts?.isFading(key) ?? false);\n}\nSnackbar.Queue = SnackbarQueue;\n\n// The queue is reached as `Snackbar.Queue` rather than exported beside the\n// component: this file would otherwise export something that is not a\n// component, which is what turns fast refresh off for it.\nexport type { SnackbarAction, SnackbarMessage, SnackbarOptions, SnackbarProps, SnackbarQueue, ToastRegionRenderProps as SnackbarRegionRenderProps };\nexport default Snackbar;"],"mappings":";;;;;;;;;;;AAoFA,MAAMQ,aAAa;AACnB,MAAMC,aAAa;AACnB,MAAMC,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EAAA,KAAAvC;EAAAuC,EAAA,KAAAlC;EAAAkC,EAAA,KAAA3C;EAAA2C,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAqB;CAAA,IAAArB,EAAA,OAAAG,MAAAH,EAAA,QAAAI,MAAAJ,EAAA,QAAAM,MAAAN,EAAA,QAAAY,OAAA;EAXzHS,KAAA,qBAACK,gBAAD;GAAiBd;GAAK,GAAMT;GAA5B,UAAA,CAQHC,IAGAE,EAXY;;EAYHN,EAAA,KAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAM;EAAAN,EAAA,MAAAY;EAAAZ,EAAA,MAAAqB;CAAA,OAAAA,KAAArB,EAAA;CAAA,OAZNqB;AAYM;;;;;AAOf,SAAAL,UAAAtD,OAAAO,KAAA;CAAA,MAAA+B,IAAAhH,EAAA,CAAA;CACE,MAAA6F,SAAenB,MAAKiB,eAAgBd,mBAAmBH,MAAKiB,MAA7C1B,KAAAA;CAA8D,IAAA8C;CAAA,IAAAC,EAAA,OAAAnB,QAAA;EACjDkB,MAAAxB,aAAYM,QAAMH,kBAAoBH,QAAsB,KAAhD+C;EAAiDtB,EAAA,KAAAnB;EAAAmB,EAAA,KAAAD;CAAA,OAAAA,KAAAC,EAAA;CAAA,IAAAE;CAAA,IAAAF,EAAA,OAAA/B,OAAA+B,EAAA,OAAAnB,QAAA;EAAEqB,WAAMrB,QAAML,SAAWP,GAAY,KAA7B;EAA8B+B,EAAA,KAAA/B;EAAA+B,EAAA,KAAAnB;EAAAmB,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAAxH9G,qBAAqB6G,IAA+DG,EAAoC;AAAC;AAFlI,SAAAoB,SAAA,CAAA;AAIAxB,SAASyB,QAAQ5D"}
@@ -10,18 +10,30 @@ import { createContext, useContext, useState } from "react";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  import { Group } from "react-aria-components";
12
12
  // src/components/split-button/index.tsx
13
- const corners = { shape: (start, end) => [{
14
- kT0f0o: end != null ? "x1wsjk4f" : end,
15
- kVL7Gh: start != null ? "x1oq9ryg" : start,
16
- kfmiAY: end != null ? "xbsomw4" : end,
17
- krdFHd: start != null ? "x6pmj1i" : start,
18
- $$css: true
19
- }, {
20
- "--x-borderEndEndRadius": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(end),
21
- "--x-borderEndStartRadius": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(start),
22
- "--x-borderStartEndRadius": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(end),
23
- "--x-borderStartStartRadius": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(start)
24
- }] };
13
+ const corners = { shape: (start, end) => [
14
+ end !== void 0 && {
15
+ kT0f0o: end != null ? "x1wsjk4f" : "",
16
+ $$css: true
17
+ },
18
+ start !== void 0 && {
19
+ kVL7Gh: start != null ? "x1oq9ryg" : "",
20
+ $$css: true
21
+ },
22
+ end !== void 0 && {
23
+ kfmiAY: end != null ? "xbsomw4" : "",
24
+ $$css: true
25
+ },
26
+ start !== void 0 && {
27
+ krdFHd: start != null ? "x6pmj1i" : "",
28
+ $$css: true
29
+ },
30
+ {
31
+ "--x-borderEndEndRadius": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(end),
32
+ "--x-borderEndStartRadius": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(start),
33
+ "--x-borderStartEndRadius": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(end),
34
+ "--x-borderStartStartRadius": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(start)
35
+ }
36
+ ] };
25
37
  const leading = {
26
38
  lg: {
27
39
  kwRFfy: "xdndrey",
@@ -71,14 +83,20 @@ const chevron = {
71
83
  $$css: true
72
84
  }
73
85
  };
74
- const trailing = { padding: (start, end) => [{
75
- kwRFfy: end != null ? "x120eax6" : end,
76
- kZCmMZ: start != null ? "xnvo3vl" : start,
77
- $$css: true
78
- }, {
79
- "--x-paddingInlineEnd": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(end),
80
- "--x-paddingInlineStart": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(start)
81
- }] };
86
+ const trailing = { padding: (start, end) => [
87
+ end !== void 0 && {
88
+ kwRFfy: end != null ? "x120eax6" : "",
89
+ $$css: true
90
+ },
91
+ start !== void 0 && {
92
+ kZCmMZ: start != null ? "xnvo3vl" : "",
93
+ $$css: true
94
+ },
95
+ {
96
+ "--x-paddingInlineEnd": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(end),
97
+ "--x-paddingInlineStart": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(start)
98
+ }
99
+ ] };
82
100
  const TRAILING_PADDING = {
83
101
  lg: 15,
84
102
  md: 13,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","createContext","useContext","useState","mergeStyles","radii","sizing","Menu","corners","shape","start","end","kT0f0o","kVL7Gh","kfmiAY","krdFHd","$$css","val","undefined","leading","lg","kwRFfy","kZCmMZ","md","xl","xs","xxl","chevron","kGuDYH","trailing","padding","TRAILING_PADDING","CLOSED_OFFSET","INNER","sm","ROUND","controlLg","controlSm","controlXl","controlXs","controlXxl","INNER_ACTIVE","children","container","defaultOpen","isDisabled","isOpen","onAction","onOpenChange","className","size","style","variant","SplitButtonContext","isActive","state","isHovered","isFocusVisible","isPressed","leadingItem","shift","styles","SplitButton","t0","$","label","ref","t1","t2","t3","context","t4","t5","t6","SplitButtonAction","props","item","SplitButtonMenu","ownOpen","setOwnOpen","open","next","changeOpen","trailingItem","Symbol","for","t7","t8","offset","Action","RACGroup","Button","Menu"],"sources":["../../../src/components/split-button/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSProperties, ReactNode, RefAttributes } from 'react';\nimport type { Key } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useMemo, useState } from 'react';\nimport { Group as RACGroup } from 'react-aria-components';\nimport type { ButtonState } from '../../button';\nimport type { ButtonGroupItem, GroupSize } from '../../button/context';\nimport type { ButtonProps, ButtonSize } from '../button';\nimport { ButtonGroupItemContext } from '../../button/context';\nimport { ChevronDownGlyph } from '../../glyphs';\nimport { mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { radii, sizing, spacing } from '../../tokens/design.tokens.stylex';\nimport Button from '../button';\nimport Menu from '../menu';\n\n// The split button page's split button: an action and the menu of\n// alternatives beside it, drawn as two Buttons 2dp apart — the page calls it\n// a special connected button group. The outer ends keep the button's round,\n// and the two edges that meet take the inner corner the size gives them,\n// 4dp up to the page's M, 8dp at L and 12dp at XL, opening out to 8dp, 12dp\n// and 20dp while either half is hovered, focused or pressed. The values are\n// the page's size token sets, read from Material Design's own split button\n// tokens; the 20dp corner, and the paddings that are not steps of the\n// spacing scale, are written out.\n//\n// **The leading half is a Button**, with an icon, a label or both, and the\n// page's own padding either side of what it holds — 12dp and 10dp at XS, for\n// instance, where a lone Button takes 16dp on both.\n//\n// **The trailing half is the menu's trigger**: a Button holding the down\n// chevron at the size's icon size, 22dp up to 50dp, with the menu below its\n// end edge. The chevron sits a pixel or more toward the start while the menu\n// is closed — the page's optical centring, 1dp to 6dp by size — and centres\n// once it opens, when the inner corners round off entirely. The page keeps\n// the colours as they are while the menu is open and lays the pressed state\n// layer over them, which is what React Aria's report of the trigger as\n// pressed for as long as its menu is open already draws.\n//\n// Both halves take the variant the root names, out of Button's four with a\n// container — the page gives text no split button.\n\n// Each half's corners on each side, set from the half and its state.\nconst corners = {\n shape: (start: string, end: string) => [{\n kT0f0o: end != null ? \"x1wsjk4f\" : end,\n kVL7Gh: start != null ? \"x1oq9ryg\" : start,\n kfmiAY: end != null ? \"xbsomw4\" : end,\n krdFHd: start != null ? \"x6pmj1i\" : start,\n $$css: true\n }, {\n \"--x-borderEndEndRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-borderEndStartRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start),\n \"--x-borderStartEndRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-borderStartStartRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }]\n};\n\n// The leading half's padding either side of what it holds.\nconst leading = {\n lg: {\n kwRFfy: \"xdndrey\",\n kZCmMZ: \"x1kdgbu8\",\n $$css: true\n },\n md: {\n kwRFfy: \"xk163s\",\n kZCmMZ: \"x10rdx38\",\n $$css: true\n },\n xl: {\n kwRFfy: \"x15zmtp0\",\n kZCmMZ: \"x1oiqv2n\",\n $$css: true\n },\n xs: {\n kwRFfy: \"x2vl965\",\n kZCmMZ: \"xwde665\",\n $$css: true\n },\n xxl: {\n kwRFfy: \"xli2wwf\",\n kZCmMZ: \"x7vhb2i\",\n $$css: true\n }\n};\n\n// The trailing half's chevron, at the size's icon size.\nconst chevron = {\n lg: {\n kGuDYH: \"x1ewwscv\",\n $$css: true\n },\n md: {\n kGuDYH: \"x1i1m3gp\",\n $$css: true\n },\n xl: {\n kGuDYH: \"x155jak9\",\n $$css: true\n },\n xs: {\n kGuDYH: \"x1i1m3gp\",\n $$css: true\n },\n xxl: {\n kGuDYH: \"xermeyz\",\n $$css: true\n }\n};\n\n// The trailing half's padding: centred once the menu is open, and moved\n// toward the start by the page's offset while it is closed.\nconst trailing = {\n padding: (start: string, end: string) => [{\n kwRFfy: end != null ? \"x120eax6\" : end,\n kZCmMZ: start != null ? \"xnvo3vl\" : start,\n $$css: true\n }, {\n \"--x-paddingInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-paddingInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }]\n};\n\n// The trailing half's padding either side of the chevron, and how far the\n// chevron sits toward the start while the menu is closed.\nconst TRAILING_PADDING = {\n lg: 15,\n md: 13,\n xl: 29,\n xs: 13,\n xxl: 43\n};\nconst CLOSED_OFFSET = {\n lg: 2,\n md: 1,\n xl: 3,\n xs: 1,\n xxl: 6\n};\n\n// The corner where the halves meet, at rest and while a half is hovered,\n// focused or pressed.\nconst INNER = {\n lg: radii.xs,\n md: radii.xs,\n xl: radii.sm,\n xs: radii.xs,\n xxl: radii.md\n};\n\n// The round end at each size: half the button's height. Not the pill's\n// 9999px: CSS scales every corner of a box down together when two on one\n// side add up to more than the side is long, so a 9999px end beside an 8px\n// inner corner shrank the inner one to nothing. Half the height fits as\n// written. A label that wraps makes a button taller than this, and its ends\n// a little less than round.\nconst ROUND = {\n lg: `calc(${sizing.controlLg} / 2)`,\n md: `calc(${sizing.controlSm} / 2)`,\n xl: `calc(${sizing.controlXl} / 2)`,\n xs: `calc(${sizing.controlXs} / 2)`,\n xxl: `calc(${sizing.controlXxl} / 2)`\n};\nconst INNER_ACTIVE = {\n lg: radii.md,\n md: radii.md,\n xl: '20px',\n xs: radii.sm,\n xxl: '20px'\n};\n\n// Omitted form by form: ButtonProps is a union of the plain, link and toggle\n// forms, and an Omit of the whole union keeps only the keys all three share,\n// which would let a link's and a toggle's props back together.\ntype SplitButtonActionProps = (ButtonProps extends infer Props ? Props extends unknown ? Omit<Props, 'shape' | 'size' | 'variant'> : never : never) & RefAttributes<HTMLAnchorElement | HTMLButtonElement>;\ntype SplitButtonMenuProps = {\n /** What the menu offers, in words: the trailing half is an icon alone. */\n 'aria-label': string;\n /** The menu's items, as `Menu.Item`s and the rest of Menu's parts. */\n children: ReactNode;\n /**\n * Where the menu is portalled to. Defaults to the container of the\n * `ThemeScope` around it, or to the end of `<body>` where there is none. A\n * subtree themed through the `themeScope` class has no container of its own,\n * so point this inside it, or it renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * Whether the menu starts open, when it keeps its own state.\n * @default false\n */\n defaultOpen?: boolean;\n /** Whether the trailing half can be pressed. */\n isDisabled?: boolean;\n /** Whether the menu is open, when the call site holds the state. */\n isOpen?: boolean;\n /** Called with an item's `id` when it is chosen. */\n onAction?: (key: Key) => void;\n /** Called when the menu opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n};\ntype SplitButtonProps = RefAttributes<HTMLDivElement> & {\n /** What the pair is, in words, for the group around the two halves. */\n 'aria-label'?: string;\n /** The two halves: a `SplitButton.Action`, then a `SplitButton.Menu`. */\n children: ReactNode;\n /** The class for the group around the two halves. */\n className?: string;\n /**\n * The size both halves take, as Button's: `xs` to `xxl`.\n * @default 'md'\n */\n size?: ButtonSize;\n /** The style for the group around the two halves. */\n style?: CSSProperties;\n /**\n * The colour style both halves take: Button's four with a container.\n * @default 'filled'\n */\n variant?: SplitButtonVariant;\n};\ntype SplitButtonVariant = 'elevated' | 'filled' | 'outlined' | 'tonal';\n\n// What the root hands its two halves.\nconst SplitButtonContext = createContext<{\n size: GroupSize;\n variant: SplitButtonVariant;\n}>({\n size: 'md',\n variant: 'filled'\n});\n\n// Whether a half shows the corner it opens out to: while it is hovered,\n// focused or pressed.\nfunction isActive(state: ButtonState) {\n return state.isHovered || state.isFocusVisible || state.isPressed;\n}\n\n// The leading half's part: its padding, its round start and the inner\n// corner at its end.\nfunction leadingItem(size: GroupSize): ButtonGroupItem {\n return {\n shift: 0,\n size,\n styles: (state: ButtonState) => [leading[size], corners.shape(ROUND[size], isActive(state) ? INNER_ACTIVE[size] : INNER[size])]\n };\n}\n\n/**\n * An action and a menu of alternatives beside it, drawn as one control.\n *\n * ```tsx\n * <SplitButton>\n * <SplitButton.Action onPress={save}>Label</SplitButton.Action>\n * <SplitButton.Menu aria-label=\"More options\">\n * <Menu.Item id=\"first\">First item</Menu.Item>\n * </SplitButton.Menu>\n * </SplitButton>\n * ```\n *\n * The call site's `className`, `style` and `ref` land on the group around\n * the two halves.\n */\nfunction SplitButton({\n 'aria-label': label,\n children,\n className,\n ref,\n size = 'md',\n style,\n variant = 'filled'\n}: SplitButtonProps) {\n const context = useMemo(() => ({\n size,\n variant\n }), [size, variant]);\n return <SplitButtonContext value={context}>\n <RACGroup aria-label={label} ref={ref} {...mergeStyles({\n className: \"x6s0dn4 x9f619 x3nfvp2 x14qo01y\"\n }, {\n className,\n style\n })}>\n {children}\n </RACGroup>\n </SplitButtonContext>;\n}\n\n/**\n * The split button's leading half: a Button, with an icon, a label or both,\n * in the root's size and variant.\n */\nfunction SplitButtonAction(props: SplitButtonActionProps) {\n const {\n size,\n variant\n } = useContext(SplitButtonContext);\n const item = useMemo(() => leadingItem(size), [size]);\n return <ButtonGroupItemContext value={item}>\n <Button {...props} variant={variant} />\n </ButtonGroupItemContext>;\n}\n\n/**\n * The split button's trailing half: the down chevron, which opens the menu\n * of alternatives its children describe.\n */\nfunction SplitButtonMenu({\n 'aria-label': label,\n children,\n container,\n defaultOpen = false,\n isDisabled,\n isOpen,\n onAction,\n onOpenChange\n}: SplitButtonMenuProps) {\n const {\n size,\n variant\n } = useContext(SplitButtonContext);\n const [ownOpen, setOwnOpen] = useState(defaultOpen);\n const open = isOpen ?? ownOpen;\n const changeOpen = useCallback((next: boolean) => {\n if (isOpen === undefined) {\n setOwnOpen(next);\n }\n onOpenChange?.(next);\n }, [isOpen, onOpenChange]);\n const item = useMemo(() => trailingItem(size, open), [size, open]);\n return <Menu isOpen={open} onOpenChange={changeOpen}>\n <ButtonGroupItemContext value={item}>\n <Button aria-label={label} isDisabled={isDisabled} variant={variant}>\n <ChevronDownGlyph height=\"1em\" width=\"1em\" />\n </Button>\n </ButtonGroupItemContext>\n <Menu.Content align=\"end\" container={container} onAction={onAction}>\n {children}\n </Menu.Content>\n </Menu>;\n}\n\n// The trailing half's part: its chevron and padding, the inner corner at its\n// start, and its round end — and while the menu is open, the chevron centred\n// and the inner corner rounded off.\nfunction trailingItem(size: GroupSize, isOpen: boolean): ButtonGroupItem {\n const padding = TRAILING_PADDING[size];\n const offset = isOpen ? 0 : CLOSED_OFFSET[size];\n return {\n shift: 0,\n size,\n styles: (state: ButtonState) => [chevron[size], trailing.padding(`${padding - offset}px`, `${padding + offset}px`), corners.shape(isOpen ? ROUND[size] : isActive(state) ? INNER_ACTIVE[size] : INNER[size], ROUND[size])]\n };\n}\nSplitButton.Action = SplitButtonAction;\nSplitButton.Menu = SplitButtonMenu;\nexport type { SplitButtonActionProps, SplitButtonMenuProps, SplitButtonProps, SplitButtonVariant };\nexport { SplitButtonAction, SplitButtonMenu };\nexport default SplitButton;"],"mappings":";;;;;;;;;;;;AA6CA,MAAMQ,UAAU,EACdC,QAAQC,OAAeC,QAAgB,CAAC;CACtCC,QAAQD,OAAO,OAAO,aAAaA;CACnCE,QAAQH,SAAS,OAAO,aAAaA;CACrCI,QAAQH,OAAO,OAAO,YAAYA;CAClCI,QAAQL,SAAS,OAAO,YAAYA;CACpCM,OAAO;AACT,GAAG;CACD,4BAA2BC,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAWP,GAAG;CAC3G,8BAA6BM,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAWR,KAAK;CAC/G,8BAA6BO,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAWP,GAAG;CAC7G,gCAA+BM,QAAO,OAAOA,QAAQ,WAAWA,MAAM,OAAOA,OAAO,OAAOA,MAAMC,KAAAA,EAAAA,CAAWR,KAAK;AACnH,CAAC,EACH;AAGA,MAAMS,UAAU;CACdC,IAAI;EACFC,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;CACAO,IAAI;EACFF,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;CACAQ,IAAI;EACFH,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;CACAS,IAAI;EACFJ,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;CACAU,KAAK;EACHL,QAAQ;EACRC,QAAQ;EACRN,OAAO;CACT;AACF;AAGA,MAAMW,UAAU;C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ASX,MAAMe,QAAQI,SAASC,KAAK,IAAId,aAAaS,QAAQjB,MAAMiB,OAAOf,MAAMe,KAAK;EAAC;CAC3N;AACF;AACAY,YAAY2B,SAASf;AACrBZ,YAAYvD,OAAOsE"}
1
+ {"version":3,"file":"index.js","names":["_c","createContext","useContext","useState","mergeStyles","radii","sizing","Menu","corners","shape","start","end","undefined","kT0f0o","$$css","kVL7Gh","kfmiAY","krdFHd","val","leading","lg","kwRFfy","kZCmMZ","md","xl","xs","xxl","chevron","kGuDYH","trailing","padding","TRAILING_PADDING","CLOSED_OFFSET","INNER","sm","ROUND","controlLg","controlSm","controlXl","controlXs","controlXxl","INNER_ACTIVE","children","container","defaultOpen","isDisabled","isOpen","onAction","onOpenChange","className","size","style","variant","SplitButtonContext","isActive","state","isHovered","isFocusVisible","isPressed","leadingItem","shift","styles","SplitButton","t0","$","label","ref","t1","t2","t3","context","t4","t5","t6","SplitButtonAction","props","item","SplitButtonMenu","ownOpen","setOwnOpen","open","next","changeOpen","trailingItem","Symbol","for","t7","t8","offset","Action","RACGroup","Button","Menu"],"sources":["../../../src/components/split-button/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CSSProperties, ReactNode, RefAttributes } from 'react';\nimport type { Key } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useMemo, useState } from 'react';\nimport { Group as RACGroup } from 'react-aria-components';\nimport type { ButtonState } from '../../button';\nimport type { ButtonGroupItem, GroupSize } from '../../button/context';\nimport type { ButtonProps, ButtonSize } from '../button';\nimport { ButtonGroupItemContext } from '../../button/context';\nimport { ChevronDownGlyph } from '../../glyphs';\nimport { mergeStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { radii, sizing, spacing } from '../../tokens/design.tokens.stylex';\nimport Button from '../button';\nimport Menu from '../menu';\n\n// The split button page's split button: an action and the menu of\n// alternatives beside it, drawn as two Buttons 2dp apart — the page calls it\n// a special connected button group. The outer ends keep the button's round,\n// and the two edges that meet take the inner corner the size gives them,\n// 4dp up to the page's M, 8dp at L and 12dp at XL, opening out to 8dp, 12dp\n// and 20dp while either half is hovered, focused or pressed. The values are\n// the page's size token sets, read from Material Design's own split button\n// tokens; the 20dp corner, and the paddings that are not steps of the\n// spacing scale, are written out.\n//\n// **The leading half is a Button**, with an icon, a label or both, and the\n// page's own padding either side of what it holds — 12dp and 10dp at XS, for\n// instance, where a lone Button takes 16dp on both.\n//\n// **The trailing half is the menu's trigger**: a Button holding the down\n// chevron at the size's icon size, 22dp up to 50dp, with the menu below its\n// end edge. The chevron sits a pixel or more toward the start while the menu\n// is closed — the page's optical centring, 1dp to 6dp by size — and centres\n// once it opens, when the inner corners round off entirely. The page keeps\n// the colours as they are while the menu is open and lays the pressed state\n// layer over them, which is what React Aria's report of the trigger as\n// pressed for as long as its menu is open already draws.\n//\n// Both halves take the variant the root names, out of Button's four with a\n// container — the page gives text no split button.\n\n// Each half's corners on each side, set from the half and its state.\nconst corners = {\n shape: (start: string, end: string) => [end !== undefined && {\n kT0f0o: end != null ? \"x1wsjk4f\" : \"\",\n $$css: true\n }, start !== undefined && {\n kVL7Gh: start != null ? \"x1oq9ryg\" : \"\",\n $$css: true\n }, end !== undefined && {\n kfmiAY: end != null ? \"xbsomw4\" : \"\",\n $$css: true\n }, start !== undefined && {\n krdFHd: start != null ? \"x6pmj1i\" : \"\",\n $$css: true\n }, {\n \"--x-borderEndEndRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-borderEndStartRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start),\n \"--x-borderStartEndRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-borderStartStartRadius\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }]\n};\n\n// The leading half's padding either side of what it holds.\nconst leading = {\n lg: {\n kwRFfy: \"xdndrey\",\n kZCmMZ: \"x1kdgbu8\",\n $$css: true\n },\n md: {\n kwRFfy: \"xk163s\",\n kZCmMZ: \"x10rdx38\",\n $$css: true\n },\n xl: {\n kwRFfy: \"x15zmtp0\",\n kZCmMZ: \"x1oiqv2n\",\n $$css: true\n },\n xs: {\n kwRFfy: \"x2vl965\",\n kZCmMZ: \"xwde665\",\n $$css: true\n },\n xxl: {\n kwRFfy: \"xli2wwf\",\n kZCmMZ: \"x7vhb2i\",\n $$css: true\n }\n};\n\n// The trailing half's chevron, at the size's icon size.\nconst chevron = {\n lg: {\n kGuDYH: \"x1ewwscv\",\n $$css: true\n },\n md: {\n kGuDYH: \"x1i1m3gp\",\n $$css: true\n },\n xl: {\n kGuDYH: \"x155jak9\",\n $$css: true\n },\n xs: {\n kGuDYH: \"x1i1m3gp\",\n $$css: true\n },\n xxl: {\n kGuDYH: \"xermeyz\",\n $$css: true\n }\n};\n\n// The trailing half's padding: centred once the menu is open, and moved\n// toward the start by the page's offset while it is closed.\nconst trailing = {\n padding: (start: string, end: string) => [end !== undefined && {\n kwRFfy: end != null ? \"x120eax6\" : \"\",\n $$css: true\n }, start !== undefined && {\n kZCmMZ: start != null ? \"xnvo3vl\" : \"\",\n $$css: true\n }, {\n \"--x-paddingInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(end),\n \"--x-paddingInlineStart\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(start)\n }]\n};\n\n// The trailing half's padding either side of the chevron, and how far the\n// chevron sits toward the start while the menu is closed.\nconst TRAILING_PADDING = {\n lg: 15,\n md: 13,\n xl: 29,\n xs: 13,\n xxl: 43\n};\nconst CLOSED_OFFSET = {\n lg: 2,\n md: 1,\n xl: 3,\n xs: 1,\n xxl: 6\n};\n\n// The corner where the halves meet, at rest and while a half is hovered,\n// focused or pressed.\nconst INNER = {\n lg: radii.xs,\n md: radii.xs,\n xl: radii.sm,\n xs: radii.xs,\n xxl: radii.md\n};\n\n// The round end at each size: half the button's height. Not the pill's\n// 9999px: CSS scales every corner of a box down together when two on one\n// side add up to more than the side is long, so a 9999px end beside an 8px\n// inner corner shrank the inner one to nothing. Half the height fits as\n// written. A label that wraps makes a button taller than this, and its ends\n// a little less than round.\nconst ROUND = {\n lg: `calc(${sizing.controlLg} / 2)`,\n md: `calc(${sizing.controlSm} / 2)`,\n xl: `calc(${sizing.controlXl} / 2)`,\n xs: `calc(${sizing.controlXs} / 2)`,\n xxl: `calc(${sizing.controlXxl} / 2)`\n};\nconst INNER_ACTIVE = {\n lg: radii.md,\n md: radii.md,\n xl: '20px',\n xs: radii.sm,\n xxl: '20px'\n};\n\n// Omitted form by form: ButtonProps is a union of the plain, link and toggle\n// forms, and an Omit of the whole union keeps only the keys all three share,\n// which would let a link's and a toggle's props back together.\ntype SplitButtonActionProps = (ButtonProps extends infer Props ? Props extends unknown ? Omit<Props, 'shape' | 'size' | 'variant'> : never : never) & RefAttributes<HTMLAnchorElement | HTMLButtonElement>;\ntype SplitButtonMenuProps = {\n /** What the menu offers, in words: the trailing half is an icon alone. */\n 'aria-label': string;\n /** The menu's items, as `Menu.Item`s and the rest of Menu's parts. */\n children: ReactNode;\n /**\n * Where the menu is portalled to. Defaults to the container of the\n * `ThemeScope` around it, or to the end of `<body>` where there is none. A\n * subtree themed through the `themeScope` class has no container of its own,\n * so point this inside it, or it renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * Whether the menu starts open, when it keeps its own state.\n * @default false\n */\n defaultOpen?: boolean;\n /** Whether the trailing half can be pressed. */\n isDisabled?: boolean;\n /** Whether the menu is open, when the call site holds the state. */\n isOpen?: boolean;\n /** Called with an item's `id` when it is chosen. */\n onAction?: (key: Key) => void;\n /** Called when the menu opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n};\ntype SplitButtonProps = RefAttributes<HTMLDivElement> & {\n /** What the pair is, in words, for the group around the two halves. */\n 'aria-label'?: string;\n /** The two halves: a `SplitButton.Action`, then a `SplitButton.Menu`. */\n children: ReactNode;\n /** The class for the group around the two halves. */\n className?: string;\n /**\n * The size both halves take, as Button's: `xs` to `xxl`.\n * @default 'md'\n */\n size?: ButtonSize;\n /** The style for the group around the two halves. */\n style?: CSSProperties;\n /**\n * The colour style both halves take: Button's four with a container.\n * @default 'filled'\n */\n variant?: SplitButtonVariant;\n};\ntype SplitButtonVariant = 'elevated' | 'filled' | 'outlined' | 'tonal';\n\n// What the root hands its two halves.\nconst SplitButtonContext = createContext<{\n size: GroupSize;\n variant: SplitButtonVariant;\n}>({\n size: 'md',\n variant: 'filled'\n});\n\n// Whether a half shows the corner it opens out to: while it is hovered,\n// focused or pressed.\nfunction isActive(state: ButtonState) {\n return state.isHovered || state.isFocusVisible || state.isPressed;\n}\n\n// The leading half's part: its padding, its round start and the inner\n// corner at its end.\nfunction leadingItem(size: GroupSize): ButtonGroupItem {\n return {\n shift: 0,\n size,\n styles: (state: ButtonState) => [leading[size], corners.shape(ROUND[size], isActive(state) ? INNER_ACTIVE[size] : INNER[size])]\n };\n}\n\n/**\n * An action and a menu of alternatives beside it, drawn as one control.\n *\n * ```tsx\n * <SplitButton>\n * <SplitButton.Action onPress={save}>Label</SplitButton.Action>\n * <SplitButton.Menu aria-label=\"More options\">\n * <Menu.Item id=\"first\">First item</Menu.Item>\n * </SplitButton.Menu>\n * </SplitButton>\n * ```\n *\n * The call site's `className`, `style` and `ref` land on the group around\n * the two halves.\n */\nfunction SplitButton({\n 'aria-label': label,\n children,\n className,\n ref,\n size = 'md',\n style,\n variant = 'filled'\n}: SplitButtonProps) {\n const context = useMemo(() => ({\n size,\n variant\n }), [size, variant]);\n return <SplitButtonContext value={context}>\n <RACGroup aria-label={label} ref={ref} {...mergeStyles({\n className: \"x6s0dn4 x9f619 x3nfvp2 x14qo01y\"\n }, {\n className,\n style\n })}>\n {children}\n </RACGroup>\n </SplitButtonContext>;\n}\n\n/**\n * The split button's leading half: a Button, with an icon, a label or both,\n * in the root's size and variant.\n */\nfunction SplitButtonAction(props: SplitButtonActionProps) {\n const {\n size,\n variant\n } = useContext(SplitButtonContext);\n const item = useMemo(() => leadingItem(size), [size]);\n return <ButtonGroupItemContext value={item}>\n <Button {...props} variant={variant} />\n </ButtonGroupItemContext>;\n}\n\n/**\n * The split button's trailing half: the down chevron, which opens the menu\n * of alternatives its children describe.\n */\nfunction SplitButtonMenu({\n 'aria-label': label,\n children,\n container,\n defaultOpen = false,\n isDisabled,\n isOpen,\n onAction,\n onOpenChange\n}: SplitButtonMenuProps) {\n const {\n size,\n variant\n } = useContext(SplitButtonContext);\n const [ownOpen, setOwnOpen] = useState(defaultOpen);\n const open = isOpen ?? ownOpen;\n const changeOpen = useCallback((next: boolean) => {\n if (isOpen === undefined) {\n setOwnOpen(next);\n }\n onOpenChange?.(next);\n }, [isOpen, onOpenChange]);\n const item = useMemo(() => trailingItem(size, open), [size, open]);\n return <Menu isOpen={open} onOpenChange={changeOpen}>\n <ButtonGroupItemContext value={item}>\n <Button aria-label={label} isDisabled={isDisabled} variant={variant}>\n <ChevronDownGlyph height=\"1em\" width=\"1em\" />\n </Button>\n </ButtonGroupItemContext>\n <Menu.Content align=\"end\" container={container} onAction={onAction}>\n {children}\n </Menu.Content>\n </Menu>;\n}\n\n// The trailing half's part: its chevron and padding, the inner corner at its\n// start, and its round end — and while the menu is open, the chevron centred\n// and the inner corner rounded off.\nfunction trailingItem(size: GroupSize, isOpen: boolean): ButtonGroupItem {\n const padding = TRAILING_PADDING[size];\n const offset = isOpen ? 0 : CLOSED_OFFSET[size];\n return {\n shift: 0,\n size,\n styles: (state: ButtonState) => [chevron[size], trailing.padding(`${padding - offset}px`, `${padding + offset}px`), corners.shape(isOpen ? ROUND[size] : isActive(state) ? INNER_ACTIVE[size] : INNER[size], ROUND[size])]\n };\n}\nSplitButton.Action = SplitButtonAction;\nSplitButton.Menu = SplitButtonMenu;\nexport type { SplitButtonActionProps, SplitButtonMenuProps, SplitButtonProps, SplitButtonVariant };\nexport { SplitButtonAction, SplitButtonMenu };\nexport default SplitButton;"],"mappings":";;;;;;;;;;;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aS,QAAQjB,MAAMiB,OAAOf,MAAMe,KAAK;EAAC;CAC3N;AACF;AACAY,YAAY2B,SAASf;AACrBZ,YAAYvD,OAAOsE"}
@@ -419,8 +419,8 @@ const fieldChromeStyles = {
419
419
  kAMwcw: "xpc4ca7",
420
420
  $$css: true
421
421
  },
422
- outlineEndInset: (paddingInlineEnd) => [{
423
- kwRFfy: paddingInlineEnd != null ? "x120eax6" : paddingInlineEnd,
422
+ outlineEndInset: (paddingInlineEnd) => [paddingInlineEnd !== void 0 && {
423
+ kwRFfy: paddingInlineEnd != null ? "x120eax6" : "",
424
424
  $$css: true
425
425
  }, { "--x-paddingInlineEnd": ((val) => typeof val === "number" ? val + "px" : val != null ? val : void 0)(paddingInlineEnd) }],
426
426
  outlineFocused: {
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["colors","spacing","stateLayerOpacity","typography","onSurface","disabledContent","surface","hover","surfaceContainerHighest","sm","bodySmallLineHeight","bodyLargeLineHeight","lg","_temp","ks0D6T","fieldChromeStyles","affix","k6CgDc","kmuXW","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kIyJzY","k1ekBW","kAMwcw","khDVqt","$$css","affixLine","kGNEyG","k1xSpc","kOIVth","autosize","autosizeCell","kJuA4N","box","kWkggS","kZKoxP","kfdmCh","kt9PQ7","kT0f0o","kVL7Gh","kfmiAY","krdFHd","kGVxlE","kB7OPa","kkrTdU","kjBf7l","kInvED","k3XXqK","kMeerF","kGO01o","kLKAdn","kg3NbH","kVAEAm","boxDisabled","kL6WhQ","boxError","boxErrorFocused","boxErrorHovered","boxFixed","boxFloating","boxFocused","boxHovered","boxLabel","k87sOh","kLqNvP","kVQacm","kg5iWk","boxLabelEndInset","maxInlineSize","val","undefined","boxLabelFloated","boxLabelOutlined","boxLabelOutlinedFloated","boxLeading","kZCmMZ","boxMultiline","kAzted","boxOutlined","kMwMTN","boxOutlinedDisabled","boxOutlinedError","boxOutlinedErrorFocused","boxOutlinedErrorHovered","boxOutlinedFloating","boxOutlinedFocused","boxOutlinedHovered","boxOutlinedMultiline","boxTrailing","kwRFfy","column","kzQI83","k7Eaqz","columnDisabled","columnDisabledFloating","columnFloating","counter","kcqcaj","keTefX","icon","kSGwAc","kjj79g","keoZOQ","iconDisabled","iconError","iconErrorHovered","iconMultiline","k1K539","iconOutlined","input","k9l4BL","kIPbS0","k8Qsv1","kMzoRj","knGrYV","kzqmXN","kmVPX3","inputDisabled","inputInvalid","inputUnderFloatingLabel","inputUnderLabel","label","kHjlTd","labelDisabled","labelError","labelErrorHovered","labelFocused","labelHovered","leftToRight","ksoyAI","k9WMMc","message","kqGvvJ","messageDisabled","messageError","messageIndent","messageInset","kUOVxO","messageLine","messageLineCollapsed","messageRegion","numeric","outline","kVAM5u","kaIpWk","ksu8eU","kpwlN0","kogj98","k8WAf4","kfzvcC","outlineEndInset","paddingInlineEnd","outlineFocused","outlineLeading","outlineLeadingFocused","outlineNotch","k33iCy","outlineNotchOpen","outlineTrailing","outlineTrailingFocused","replica","segments","textArea","kHenm0","textAreaAutosize","trigger","kY2c9j","value","valuePlaceholder","valuePlaceholderHidden","groupStyles","root","kXwgrk"],"sources":["../../src/field/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Declared\n// here rather than imported from src/styles/ripple.ts, which spells the same\n// query: the StyleX compiler resolves a constant across files only out of a\n// `.stylex.ts` module, and the one this repository has is generated from the\n// design tokens, where a user-preference query does not belong beside the\n// window size classes.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The colour of a disabled control's text: its label and the description\n// under it, from one definition so the two cannot drift apart. `GrayText`\n// under forced colours, which leaves a group's legend and a description\n// alone: they are text beside a control, not a control the mode would grey.\nconst DISABLED_TEXT = {\n default: `color-mix(in srgb, ${colors.onSurface} calc(${stateLayerOpacity.disabledContent} * 100%), ${colors.surface})`,\n [FORCED_COLORS]: 'GrayText'\n};\n\n// The filled box's state layer while hovered: on surface at the hover\n// opacity, laid over the fill, as the text fields page draws it.\nconst HOVERED_FILL = `color-mix(in srgb, ${colors.onSurface} calc(${stateLayerOpacity.hover} * 100%), ${colors.surfaceContainerHighest})`;\n\n// The filled box's disabled fill, on surface at 4%. Material Design gives the\n// filled field's disabled container a third of the 12% that\n// `stateLayerOpacity.disabledContainer` holds, and no token names it, so it\n// is written once here, beside the one style that draws it.\nconst DISABLED_FILL_OPACITY = '4%';\n\n// The outline's two widths, resting and focused. The notch's inline padding\n// is measured from the border's inside edge, so each width comes off the\n// padding that puts the notch level with the label — see `outline`.\nconst OUTLINE_WIDTH = '1px';\nconst OUTLINE_FOCUSED_WIDTH = '2px';\n\n// What the box is tall enough for, rather than the 56dp the text fields page\n// draws it at. The page's number is the sum of these under the default\n// tokens, and stating it instead made the box right only there: a theme with\n// a longer body line — `Editorial` in kanso-ui-core's themes, at body-small\n// 20 and body-large 28 on a 10dp `sm` — needs 68, and in a fixed 56 the\n// value's line ran past the underline with nothing left beneath it.\n//\n// The filled box holds its padding twice over, the floated label's line and\n// the control's; the outlined box holds its own padding twice and the\n// control's line alone, since its label sits on the outline rather than\n// above the value. The two agree at 56 under the default tokens, which is\n// what keeps the default stories' snapshots where they are.\n//\n// The resting label's line is written against the same expressions below, so\n// one derivation feeds both the box and the label that centres in it.\nconst BOX_BLOCK_SIZE = `calc(2 * ${spacing.sm} + ${typography.bodySmallLineHeight} + ${typography.bodyLargeLineHeight})`;\nconst BOX_OUTLINED_BLOCK_SIZE = `calc(2 * ${spacing.lg} + ${typography.bodyLargeLineHeight})`;\n\n// The chrome's styles. Apart from the parts in ./index.tsx so that file\n// exports components alone, which is what keeps fast refresh working for it —\n// the same reason ./root.ts gives for the root style beside it.\n//\n// The focus indicator is an inset box-shadow on the bottom edge rather than a\n// border that thickens. A real border going 1px -> 2px on focus grows the\n// box, which pushes every sibling below it down by a pixel — so a form\n// twitches each time focus moves between its fields. A shadow is drawn inside\n// the box and changes nothing about its size.\n//\n// The label floats, as the text fields page draws it: body-large and centred\n// in an empty, unfocused box, body-small at the top once the field is focused\n// or holds a value. `floatingLabel={false}` keeps it small at the top in\n// every state instead.\n//\n// Where the label sits depends on the box's state, and a child cannot select\n// on its parent's state while the box can select on its own. So the label's\n// type is set on the box and inherited: the box changes the font size and\n// line height it hands down when focus is within it, or when its control\n// shows something other than its placeholder, and the label transitions\n// between the two. Resting, the line is the box less its padding, which is\n// what centres the label without a position to move — the move to the top is\n// a change of type alone. The control sets its own type, so none of this\n// reaches it.\n//\n// The label's colour follows the control's focus the same way: the box is\n// React Aria's Group, which reports focus within it as render state, and the\n// label takes `labelFocused` from that.\n//\n// The box is a row: an icon slot at either end, if the field has one, with\n// the label and control between them. The page gives the icons 24dp, 12dp\n// from the box's edge and 16dp from the text, centred in the box's height;\n// the slot cancels the box's top padding and stretches to its full height,\n// so it centres whatever it holds — a 24dp icon, or an icon button around\n// one. The label and the control sit in a column of their own, which is\n// what the label is positioned against, so it moves past a leading icon\n// with the text.\n//\n// A prefix or suffix sits on the control's line, in the control's type and\n// the muted role, and shows only while the field is focused or holds a\n// value, as the placeholder does — at rest the label is where it would be.\n// It is the column's colour it takes, inherited, since the column can\n// select on its own focus and content and the affix cannot select on\n// either.\n//\n// The outlined variant is the page's outlined text field: no fill, a 1dp\n// outline in the outline role with 4dp corners all round, 2dp and primary\n// while focused, on surface while hovered, the error role with an error,\n// and the label cutting the outline once it floats, with the page's 4dp\n// beside it. The value is centred, 16dp from the top and bottom, and the\n// label rests on its line and moves up onto the outline — a move, where the\n// filled label only changes type.\n//\n// The outline is a fieldset laid over the box: a browser draws a fieldset's\n// border around its legend, so a legend holding a copy of the label, in the\n// label's floated type, is what cuts the outline to the label's width with\n// nothing measured. Empty, it cuts nothing, which is the closed notch.\nconst _temp = {\n ks0D6T: \"x13i5qev\",\n \"$$css\": true\n};\nconst fieldChromeStyles = {\n affix: {\n k6CgDc: \"x12w9bfk\",\n kmuXW: \"x2lah0s\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xt3l3uh\",\n kAMwcw: \"xpc4ca7\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n affixLine: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x14qo01y\",\n $$css: true\n },\n autosize: {\n k1xSpc: \"xrvj5dj\",\n $$css: true\n },\n autosizeCell: {\n kJuA4N: \"x1b1wf8y\",\n $$css: true\n },\n box: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x1cy8zhl\",\n kWkggS: \"x1rrhr5q\",\n kZKoxP: \"x4v968r\",\n kfdmCh: \"xe3zi7u\",\n kt9PQ7: \"x15anc7y\",\n kT0f0o: \"x16uus16\",\n kVL7Gh: \"xbiv7yw\",\n kfmiAY: \"xirz1nw\",\n krdFHd: \"xzcck0f\",\n kGVxlE: \"x89kqus x18rfq6m\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ed109x\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n kjBf7l: \"x1x84bn5\",\n kInvED: \"x12iqurn\",\n k3XXqK: \"xi9ts3s\",\n kMeerF: \"x1jrff4x\",\n kGO01o: \"x18d9i69\",\n kLKAdn: \"xi7mcox\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x106061f\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n boxDisabled: {\n kWkggS: \"x1ojo7np\",\n kL6WhQ: \"x1fxan2a\",\n kGVxlE: \"xgloidm\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n boxError: {\n kGVxlE: \"x1lxxh4i x1d6xoej\",\n $$css: true\n },\n boxErrorFocused: {\n kWkggS: \"x1rrhr5q\",\n kGVxlE: \"xb0slzl\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxErrorHovered: {\n kWkggS: \"x13aw6e3 xpae8dx\",\n kGVxlE: \"x1lxxh4i xryshfu\",\n $$css: true\n },\n boxFixed: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n $$css: true\n },\n boxFloating: {\n kMv6JI: \"x1ps135g xnc7ww3 x16svsjw\",\n kGuDYH: \"x52kfa xys1t9b x1848etk\",\n k63SB2: \"xz4f7ai xn9xqko x1c52epr\",\n kb6lSQ: \"x19wmx12 x1t00fh7 x1qn8t5l\",\n kLWn49: \"xsv50tp x1f5c3pk x1mv3dpe\",\n $$css: true\n },\n boxFocused: {\n kWkggS: \"x1rrhr5q\",\n kGVxlE: \"xra6ydt\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxHovered: {\n kWkggS: \"x13aw6e3 xpae8dx\",\n kGVxlE: \"x89kqus x1ncb8nd\",\n $$css: true\n },\n boxLabel: {\n kB7OPa: \"x9f619\",\n k87sOh: \"x13vifvy\",\n kLqNvP: \"x1o0tod\",\n ks0D6T: \"x193iq5w\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n boxLabelEndInset: (maxInlineSize: string) => [_temp, {\n \"--x-maxInlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(maxInlineSize)\n }],\n boxLabelFloated: {\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n $$css: true\n },\n boxLabelOutlined: {\n kLqNvP: \"x10k232c\",\n ks0D6T: \"x35j8wb\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n boxLabelOutlinedFloated: {\n k87sOh: \"x1qjp6zz\",\n $$css: true\n },\n boxLeading: {\n kZCmMZ: \"xwde665\",\n $$css: true\n },\n boxMultiline: {\n kZKoxP: \"xt7dq6l\",\n kAzted: \"x9ep9ug\",\n kGO01o: \"xqf7pud\",\n $$css: true\n },\n boxOutlined: {\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"xnqhc4v\",\n kfdmCh: \"xs07zst\",\n kT0f0o: \"x4gcak0\",\n kVL7Gh: \"xqs30sb\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x158cnre x1sa41d3\",\n kGO01o: \"xzfxn0k\",\n kLKAdn: \"x1clyivc\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n boxOutlinedDisabled: {\n kWkggS: \"xjbqb8w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1ldq0ta x1bhcspo\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n boxOutlinedError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n boxOutlinedErrorFocused: {\n kMwMTN: \"x4ii1qj\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxOutlinedErrorHovered: {\n kMwMTN: \"x12voer2 x16elhoc\",\n $$css: true\n },\n boxOutlinedFloating: {\n kLWn49: \"xsv50tp x1f5c3pk x1rzm7h7\",\n $$css: true\n },\n boxOutlinedFocused: {\n kMwMTN: \"x1mxwv8y\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxOutlinedHovered: {\n kMwMTN: \"x158cnre x139gbkf\",\n $$css: true\n },\n boxOutlinedMultiline: {\n kZKoxP: \"xt7dq6l\",\n kAzted: \"xnqs80d\",\n $$css: true\n },\n boxTrailing: {\n kwRFfy: \"xk163s\",\n $$css: true\n },\n column: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n columnDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n columnDisabledFloating: {\n kMwMTN: \"xspc5gk x19co3pv\",\n $$css: true\n },\n columnFloating: {\n kMwMTN: \"x1dfuzvz x6phwhp x19co3pv\",\n $$css: true\n },\n counter: {\n kmuXW: \"x2lah0s\",\n kcqcaj: \"xss6m8b\",\n keTefX: \"xvc5jky\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n icon: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kSGwAc: \"xkh2ocl\",\n kMwMTN: \"x1w5n3ug\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n keoZOQ: \"x1motrhk\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xt3l3uh\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n iconDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n iconError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n iconErrorHovered: {\n kMwMTN: \"x16elhoc\",\n $$css: true\n },\n iconMultiline: {\n k1K539: \"x14yxyxb\",\n $$css: true\n },\n iconOutlined: {\n k1K539: \"xs1qnrw\",\n keoZOQ: \"x17v9ssf\",\n $$css: true\n },\n input: {\n k9l4BL: \"x1hcrkkg\",\n kIPbS0: \"xzwh6sb\",\n k8Qsv1: \"x1hgeflb\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n knGrYV: \"x1jie568\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kzqmXN: \"xh8yej3\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n k3XXqK: \"x1t137rt\",\n kmVPX3: \"x1717udv\",\n kg5iWk: \"xlyipyv\",\n $$css: true\n },\n inputDisabled: {\n k8Qsv1: \"x7ip5l3\",\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n inputInvalid: {\n knGrYV: \"x11twi6n\",\n $$css: true\n },\n inputUnderFloatingLabel: {\n k8Qsv1: \"x1mvm7v4 xxqzaim\",\n $$css: true\n },\n inputUnderLabel: {\n keoZOQ: \"xwuztrq\",\n $$css: true\n },\n label: {\n k6CgDc: \"x12w9bfk\",\n kMwMTN: \"x1w5n3ug\",\n kHjlTd: \"xj0a0fe\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xixa3zk\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n labelDisabled: {\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n labelError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n labelErrorHovered: {\n kMwMTN: \"x16elhoc\",\n $$css: true\n },\n labelFocused: {\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n labelHovered: {\n kMwMTN: \"x139gbkf\",\n $$css: true\n },\n leftToRight: {\n ksoyAI: \"xzt5al7\",\n k9WMMc: \"xrgu2gv\",\n $$css: true\n },\n message: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n kqGvvJ: \"x10im51j\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n messageDisabled: {\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n messageError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n messageIndent: {\n keTefX: \"xq0p5jb\",\n $$css: true\n },\n messageInset: {\n kUOVxO: \"xboopgi\",\n $$css: true\n },\n messageLine: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n keoZOQ: \"x1y88zpp\",\n kAzted: \"x17jz683\",\n $$css: true\n },\n messageLineCollapsed: {\n keoZOQ: \"xdj266r\",\n kAzted: \"x2lwn1j\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n messageRegion: {\n k1xSpc: \"x78zum5\",\n kVAEAm: \"x1cmy3ng\",\n $$css: true\n },\n numeric: {\n kMv6JI: \"xbppi91\",\n kcqcaj: \"xss6m8b\",\n $$css: true\n },\n outline: {\n k6CgDc: \"x12w9bfk\",\n kVAM5u: \"x1r7ld26\",\n kaIpWk: \"x1tfhd1\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kB7OPa: \"x9f619\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kpwlN0: \"x10a8y8t\",\n kb6lSQ: \"xwth0xh\",\n kogj98: \"x1ghz6dp\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"xt970qd\",\n kg3NbH: \"xgnwbya\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x1bj6kjc\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n outlineEndInset: (paddingInlineEnd: string) => [{\n kwRFfy: paddingInlineEnd != null ? \"x120eax6\" : paddingInlineEnd,\n $$css: true\n }, {\n \"--x-paddingInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(paddingInlineEnd)\n }],\n outlineFocused: {\n kMzoRj: \"xdh2fpr\",\n kg3NbH: \"x1cmmxig\",\n $$css: true\n },\n outlineLeading: {\n kZCmMZ: \"x1e4tv75\",\n $$css: true\n },\n outlineLeadingFocused: {\n kZCmMZ: \"x2e0ysr\",\n $$css: true\n },\n outlineNotch: {\n kZKoxP: \"xqtp20y\",\n kB7OPa: \"x9f619\",\n kLWn49: \"x14ju556\",\n ks0D6T: \"x193iq5w\",\n kVQacm: \"xb3r6kr\",\n kmVPX3: \"x1717udv\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n outlineNotchOpen: {\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n outlineTrailing: {\n kwRFfy: \"xflzzte\",\n $$css: true\n },\n outlineTrailingFocused: {\n kwRFfy: \"x1gwc4xo\",\n $$css: true\n },\n replica: {\n kHjlTd: \"x1mzt3pk\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"x126k92a\",\n $$css: true\n },\n segments: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kVQacm: \"xb3r6kr\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n textArea: {\n k1xSpc: \"x1lliihq\",\n kVQacm: \"xysyzu8\",\n kHenm0: \"xtt52l0\",\n $$css: true\n },\n textAreaAutosize: {\n kVQacm: \"xb3r6kr\",\n $$css: true\n },\n trigger: {\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n kpwlN0: \"x10a8y8t\",\n k3XXqK: \"x1t137rt\",\n kmVPX3: \"x1717udv\",\n kVAEAm: \"x10l6tqk\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n value: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kVQacm: \"xb3r6kr\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n valuePlaceholder: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n valuePlaceholderHidden: {\n kMwMTN: \"x19co3pv\",\n $$css: true\n }\n};\n\n// The chrome a label sitting above a group takes, rather than inside a box.\n// CheckboxGroup, ChipGroup, RadioGroup, Slider and ColorSlider each wrote both\n// of these out: the type override on the label, and the column its label and\n// control sit in.\n//\n// The label is label-large, the role a field's label takes at rest, since a\n// group has no box to float it in.\n//\n// The two sliders compose an inline size of their own on the root, since a\n// slider fills the width it is given where a group of controls does not.\nconst groupStyles = {\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n root: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"xzoy561\",\n $$css: true\n }\n};\nexport { fieldChromeStyles, groupStyles, OUTLINE_FOCUSED_WIDTH, OUTLINE_WIDTH };"],"mappings":";;AAiBW,GAAsBA,OAAOI,YAAkBF,kBAAkBG,kBAA4BL,OAAOM;AAM1F,GAAsBN,OAAOI,YAAkBF,kBAAkBK,QAAkBP,OAAOQ;AA6BxF,GAAYP,QAAQQ,KAAQN,WAAWO,sBAAyBP,WAAWQ;AAClE,GAAYV,QAAQW,KAAQT,WAAWQ;AA2DvE,MAAME,QAAQ;CACZC,QAAQ;CACR,SAAS;AACX;AACA,MAAMC,oBAAoB;CACxBC,OAAO;EACLC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,WAAW;EACTC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRJ,OAAO;CACT;CACAK,UAAU;EACRF,QAAQ;EACRH,OAAO;CACT;CACAM,cAAc;EACZC,QAAQ;EACRP,OAAO;CACT;CACAQ,KAAK;EACHnB,QAAQ;EACRa,QAAQ;EACRO,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRhB,QAAQ;EACRC,QAAQ;EACRgB,QAAQ;EACRC,QA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/I,QAAQ;EACRJ,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"styles.js","names":["colors","spacing","stateLayerOpacity","typography","onSurface","disabledContent","surface","hover","surfaceContainerHighest","sm","bodySmallLineHeight","bodyLargeLineHeight","lg","_temp","ks0D6T","fieldChromeStyles","affix","k6CgDc","kmuXW","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kIyJzY","k1ekBW","kAMwcw","khDVqt","$$css","affixLine","kGNEyG","k1xSpc","kOIVth","autosize","autosizeCell","kJuA4N","box","kWkggS","kZKoxP","kfdmCh","kt9PQ7","kT0f0o","kVL7Gh","kfmiAY","krdFHd","kGVxlE","kB7OPa","kkrTdU","kjBf7l","kInvED","k3XXqK","kMeerF","kGO01o","kLKAdn","kg3NbH","kVAEAm","boxDisabled","kL6WhQ","boxError","boxErrorFocused","boxErrorHovered","boxFixed","boxFloating","boxFocused","boxHovered","boxLabel","k87sOh","kLqNvP","kVQacm","kg5iWk","boxLabelEndInset","maxInlineSize","val","undefined","boxLabelFloated","boxLabelOutlined","boxLabelOutlinedFloated","boxLeading","kZCmMZ","boxMultiline","kAzted","boxOutlined","kMwMTN","boxOutlinedDisabled","boxOutlinedError","boxOutlinedErrorFocused","boxOutlinedErrorHovered","boxOutlinedFloating","boxOutlinedFocused","boxOutlinedHovered","boxOutlinedMultiline","boxTrailing","kwRFfy","column","kzQI83","k7Eaqz","columnDisabled","columnDisabledFloating","columnFloating","counter","kcqcaj","keTefX","icon","kSGwAc","kjj79g","keoZOQ","iconDisabled","iconError","iconErrorHovered","iconMultiline","k1K539","iconOutlined","input","k9l4BL","kIPbS0","k8Qsv1","kMzoRj","knGrYV","kzqmXN","kmVPX3","inputDisabled","inputInvalid","inputUnderFloatingLabel","inputUnderLabel","label","kHjlTd","labelDisabled","labelError","labelErrorHovered","labelFocused","labelHovered","leftToRight","ksoyAI","k9WMMc","message","kqGvvJ","messageDisabled","messageError","messageIndent","messageInset","kUOVxO","messageLine","messageLineCollapsed","messageRegion","numeric","outline","kVAM5u","kaIpWk","ksu8eU","kpwlN0","kogj98","k8WAf4","kfzvcC","outlineEndInset","paddingInlineEnd","outlineFocused","outlineLeading","outlineLeadingFocused","outlineNotch","k33iCy","outlineNotchOpen","outlineTrailing","outlineTrailingFocused","replica","segments","textArea","kHenm0","textAreaAutosize","trigger","kY2c9j","value","valuePlaceholder","valuePlaceholderHidden","groupStyles","root","kXwgrk"],"sources":["../../src/field/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// Windows High Contrast and the rest of the forced-colours modes. Declared\n// here rather than imported from src/styles/ripple.ts, which spells the same\n// query: the StyleX compiler resolves a constant across files only out of a\n// `.stylex.ts` module, and the one this repository has is generated from the\n// design tokens, where a user-preference query does not belong beside the\n// window size classes.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The colour of a disabled control's text: its label and the description\n// under it, from one definition so the two cannot drift apart. `GrayText`\n// under forced colours, which leaves a group's legend and a description\n// alone: they are text beside a control, not a control the mode would grey.\nconst DISABLED_TEXT = {\n default: `color-mix(in srgb, ${colors.onSurface} calc(${stateLayerOpacity.disabledContent} * 100%), ${colors.surface})`,\n [FORCED_COLORS]: 'GrayText'\n};\n\n// The filled box's state layer while hovered: on surface at the hover\n// opacity, laid over the fill, as the text fields page draws it.\nconst HOVERED_FILL = `color-mix(in srgb, ${colors.onSurface} calc(${stateLayerOpacity.hover} * 100%), ${colors.surfaceContainerHighest})`;\n\n// The filled box's disabled fill, on surface at 4%. Material Design gives the\n// filled field's disabled container a third of the 12% that\n// `stateLayerOpacity.disabledContainer` holds, and no token names it, so it\n// is written once here, beside the one style that draws it.\nconst DISABLED_FILL_OPACITY = '4%';\n\n// The outline's two widths, resting and focused. The notch's inline padding\n// is measured from the border's inside edge, so each width comes off the\n// padding that puts the notch level with the label — see `outline`.\nconst OUTLINE_WIDTH = '1px';\nconst OUTLINE_FOCUSED_WIDTH = '2px';\n\n// What the box is tall enough for, rather than the 56dp the text fields page\n// draws it at. The page's number is the sum of these under the default\n// tokens, and stating it instead made the box right only there: a theme with\n// a longer body line — `Editorial` in kanso-ui-core's themes, at body-small\n// 20 and body-large 28 on a 10dp `sm` — needs 68, and in a fixed 56 the\n// value's line ran past the underline with nothing left beneath it.\n//\n// The filled box holds its padding twice over, the floated label's line and\n// the control's; the outlined box holds its own padding twice and the\n// control's line alone, since its label sits on the outline rather than\n// above the value. The two agree at 56 under the default tokens, which is\n// what keeps the default stories' snapshots where they are.\n//\n// The resting label's line is written against the same expressions below, so\n// one derivation feeds both the box and the label that centres in it.\nconst BOX_BLOCK_SIZE = `calc(2 * ${spacing.sm} + ${typography.bodySmallLineHeight} + ${typography.bodyLargeLineHeight})`;\nconst BOX_OUTLINED_BLOCK_SIZE = `calc(2 * ${spacing.lg} + ${typography.bodyLargeLineHeight})`;\n\n// The chrome's styles. Apart from the parts in ./index.tsx so that file\n// exports components alone, which is what keeps fast refresh working for it —\n// the same reason ./root.ts gives for the root style beside it.\n//\n// The focus indicator is an inset box-shadow on the bottom edge rather than a\n// border that thickens. A real border going 1px -> 2px on focus grows the\n// box, which pushes every sibling below it down by a pixel — so a form\n// twitches each time focus moves between its fields. A shadow is drawn inside\n// the box and changes nothing about its size.\n//\n// The label floats, as the text fields page draws it: body-large and centred\n// in an empty, unfocused box, body-small at the top once the field is focused\n// or holds a value. `floatingLabel={false}` keeps it small at the top in\n// every state instead.\n//\n// Where the label sits depends on the box's state, and a child cannot select\n// on its parent's state while the box can select on its own. So the label's\n// type is set on the box and inherited: the box changes the font size and\n// line height it hands down when focus is within it, or when its control\n// shows something other than its placeholder, and the label transitions\n// between the two. Resting, the line is the box less its padding, which is\n// what centres the label without a position to move — the move to the top is\n// a change of type alone. The control sets its own type, so none of this\n// reaches it.\n//\n// The label's colour follows the control's focus the same way: the box is\n// React Aria's Group, which reports focus within it as render state, and the\n// label takes `labelFocused` from that.\n//\n// The box is a row: an icon slot at either end, if the field has one, with\n// the label and control between them. The page gives the icons 24dp, 12dp\n// from the box's edge and 16dp from the text, centred in the box's height;\n// the slot cancels the box's top padding and stretches to its full height,\n// so it centres whatever it holds — a 24dp icon, or an icon button around\n// one. The label and the control sit in a column of their own, which is\n// what the label is positioned against, so it moves past a leading icon\n// with the text.\n//\n// A prefix or suffix sits on the control's line, in the control's type and\n// the muted role, and shows only while the field is focused or holds a\n// value, as the placeholder does — at rest the label is where it would be.\n// It is the column's colour it takes, inherited, since the column can\n// select on its own focus and content and the affix cannot select on\n// either.\n//\n// The outlined variant is the page's outlined text field: no fill, a 1dp\n// outline in the outline role with 4dp corners all round, 2dp and primary\n// while focused, on surface while hovered, the error role with an error,\n// and the label cutting the outline once it floats, with the page's 4dp\n// beside it. The value is centred, 16dp from the top and bottom, and the\n// label rests on its line and moves up onto the outline — a move, where the\n// filled label only changes type.\n//\n// The outline is a fieldset laid over the box: a browser draws a fieldset's\n// border around its legend, so a legend holding a copy of the label, in the\n// label's floated type, is what cuts the outline to the label's width with\n// nothing measured. Empty, it cuts nothing, which is the closed notch.\nconst _temp = {\n ks0D6T: \"x13i5qev\",\n \"$$css\": true\n};\nconst fieldChromeStyles = {\n affix: {\n k6CgDc: \"x12w9bfk\",\n kmuXW: \"x2lah0s\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xt3l3uh\",\n kAMwcw: \"xpc4ca7\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n affixLine: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x14qo01y\",\n $$css: true\n },\n autosize: {\n k1xSpc: \"xrvj5dj\",\n $$css: true\n },\n autosizeCell: {\n kJuA4N: \"x1b1wf8y\",\n $$css: true\n },\n box: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x1cy8zhl\",\n kWkggS: \"x1rrhr5q\",\n kZKoxP: \"x4v968r\",\n kfdmCh: \"xe3zi7u\",\n kt9PQ7: \"x15anc7y\",\n kT0f0o: \"x16uus16\",\n kVL7Gh: \"xbiv7yw\",\n kfmiAY: \"xirz1nw\",\n krdFHd: \"xzcck0f\",\n kGVxlE: \"x89kqus x18rfq6m\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ed109x\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n kjBf7l: \"x1x84bn5\",\n kInvED: \"x12iqurn\",\n k3XXqK: \"xi9ts3s\",\n kMeerF: \"x1jrff4x\",\n kGO01o: \"x18d9i69\",\n kLKAdn: \"xi7mcox\",\n kg3NbH: \"x790zyz\",\n kVAEAm: \"x1n2onr6\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x106061f\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n boxDisabled: {\n kWkggS: \"x1ojo7np\",\n kL6WhQ: \"x1fxan2a\",\n kGVxlE: \"xgloidm\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n boxError: {\n kGVxlE: \"x1lxxh4i x1d6xoej\",\n $$css: true\n },\n boxErrorFocused: {\n kWkggS: \"x1rrhr5q\",\n kGVxlE: \"xb0slzl\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxErrorHovered: {\n kWkggS: \"x13aw6e3 xpae8dx\",\n kGVxlE: \"x1lxxh4i xryshfu\",\n $$css: true\n },\n boxFixed: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n $$css: true\n },\n boxFloating: {\n kMv6JI: \"x1ps135g xnc7ww3 x16svsjw\",\n kGuDYH: \"x52kfa xys1t9b x1848etk\",\n k63SB2: \"xz4f7ai xn9xqko x1c52epr\",\n kb6lSQ: \"x19wmx12 x1t00fh7 x1qn8t5l\",\n kLWn49: \"xsv50tp x1f5c3pk x1mv3dpe\",\n $$css: true\n },\n boxFocused: {\n kWkggS: \"x1rrhr5q\",\n kGVxlE: \"xra6ydt\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxHovered: {\n kWkggS: \"x13aw6e3 xpae8dx\",\n kGVxlE: \"x89kqus x1ncb8nd\",\n $$css: true\n },\n boxLabel: {\n kB7OPa: \"x9f619\",\n k87sOh: \"x13vifvy\",\n kLqNvP: \"x1o0tod\",\n ks0D6T: \"x193iq5w\",\n kVQacm: \"xb3r6kr\",\n kVAEAm: \"x10l6tqk\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n boxLabelEndInset: (maxInlineSize: string) => [_temp, {\n \"--x-maxInlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(maxInlineSize)\n }],\n boxLabelFloated: {\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n $$css: true\n },\n boxLabelOutlined: {\n kLqNvP: \"x10k232c\",\n ks0D6T: \"x35j8wb\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n boxLabelOutlinedFloated: {\n k87sOh: \"x1qjp6zz\",\n $$css: true\n },\n boxLeading: {\n kZCmMZ: \"xwde665\",\n $$css: true\n },\n boxMultiline: {\n kZKoxP: \"xt7dq6l\",\n kAzted: \"x9ep9ug\",\n kGO01o: \"xqf7pud\",\n $$css: true\n },\n boxOutlined: {\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"xnqhc4v\",\n kfdmCh: \"xs07zst\",\n kT0f0o: \"x4gcak0\",\n kVL7Gh: \"xqs30sb\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x158cnre x1sa41d3\",\n kGO01o: \"xzfxn0k\",\n kLKAdn: \"x1clyivc\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n boxOutlinedDisabled: {\n kWkggS: \"xjbqb8w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1ldq0ta x1bhcspo\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n boxOutlinedError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n boxOutlinedErrorFocused: {\n kMwMTN: \"x4ii1qj\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxOutlinedErrorHovered: {\n kMwMTN: \"x12voer2 x16elhoc\",\n $$css: true\n },\n boxOutlinedFloating: {\n kLWn49: \"xsv50tp x1f5c3pk x1rzm7h7\",\n $$css: true\n },\n boxOutlinedFocused: {\n kMwMTN: \"x1mxwv8y\",\n k3XXqK: \"x815t2r\",\n $$css: true\n },\n boxOutlinedHovered: {\n kMwMTN: \"x158cnre x139gbkf\",\n $$css: true\n },\n boxOutlinedMultiline: {\n kZKoxP: \"xt7dq6l\",\n kAzted: \"xnqs80d\",\n $$css: true\n },\n boxTrailing: {\n kwRFfy: \"xk163s\",\n $$css: true\n },\n column: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kzQI83: \"x1iyjqo2\",\n k7Eaqz: \"xeuugli\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n columnDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n columnDisabledFloating: {\n kMwMTN: \"xspc5gk x19co3pv\",\n $$css: true\n },\n columnFloating: {\n kMwMTN: \"x1dfuzvz x6phwhp x19co3pv\",\n $$css: true\n },\n counter: {\n kmuXW: \"x2lah0s\",\n kcqcaj: \"xss6m8b\",\n keTefX: \"xvc5jky\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n icon: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kSGwAc: \"xkh2ocl\",\n kMwMTN: \"x1w5n3ug\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n keoZOQ: \"x1motrhk\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xt3l3uh\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n iconDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n iconError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n iconErrorHovered: {\n kMwMTN: \"x16elhoc\",\n $$css: true\n },\n iconMultiline: {\n k1K539: \"x14yxyxb\",\n $$css: true\n },\n iconOutlined: {\n k1K539: \"xs1qnrw\",\n keoZOQ: \"x17v9ssf\",\n $$css: true\n },\n input: {\n k9l4BL: \"x1hcrkkg\",\n kIPbS0: \"xzwh6sb\",\n k8Qsv1: \"x1hgeflb\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n knGrYV: \"x1jie568\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kzqmXN: \"xh8yej3\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n k3XXqK: \"x1t137rt\",\n kmVPX3: \"x1717udv\",\n kg5iWk: \"xlyipyv\",\n $$css: true\n },\n inputDisabled: {\n k8Qsv1: \"x7ip5l3\",\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n inputInvalid: {\n knGrYV: \"x11twi6n\",\n $$css: true\n },\n inputUnderFloatingLabel: {\n k8Qsv1: \"x1mvm7v4 xxqzaim\",\n $$css: true\n },\n inputUnderLabel: {\n keoZOQ: \"xwuztrq\",\n $$css: true\n },\n label: {\n k6CgDc: \"x12w9bfk\",\n kMwMTN: \"x1w5n3ug\",\n kHjlTd: \"xj0a0fe\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xixa3zk\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n labelDisabled: {\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n labelError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n labelErrorHovered: {\n kMwMTN: \"x16elhoc\",\n $$css: true\n },\n labelFocused: {\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n labelHovered: {\n kMwMTN: \"x139gbkf\",\n $$css: true\n },\n leftToRight: {\n ksoyAI: \"xzt5al7\",\n k9WMMc: \"xrgu2gv\",\n $$css: true\n },\n message: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n kqGvvJ: \"x10im51j\",\n kHjlTd: \"xj0a0fe\",\n $$css: true\n },\n messageDisabled: {\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n messageError: {\n kMwMTN: \"x4ii1qj\",\n $$css: true\n },\n messageIndent: {\n keTefX: \"xq0p5jb\",\n $$css: true\n },\n messageInset: {\n kUOVxO: \"xboopgi\",\n $$css: true\n },\n messageLine: {\n kGNEyG: \"x1pha0wt\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"xxj4525\",\n keoZOQ: \"x1y88zpp\",\n kAzted: \"x17jz683\",\n $$css: true\n },\n messageLineCollapsed: {\n keoZOQ: \"xdj266r\",\n kAzted: \"x2lwn1j\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n },\n messageRegion: {\n k1xSpc: \"x78zum5\",\n kVAEAm: \"x1cmy3ng\",\n $$css: true\n },\n numeric: {\n kMv6JI: \"xbppi91\",\n kcqcaj: \"xss6m8b\",\n $$css: true\n },\n outline: {\n k6CgDc: \"x12w9bfk\",\n kVAM5u: \"x1r7ld26\",\n kaIpWk: \"x1tfhd1\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kB7OPa: \"x9f619\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kpwlN0: \"x10a8y8t\",\n kb6lSQ: \"xwth0xh\",\n kogj98: \"x1ghz6dp\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"xt970qd\",\n kg3NbH: \"xgnwbya\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"x10l6tqk\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"x1bj6kjc\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n outlineEndInset: (paddingInlineEnd: string) => [paddingInlineEnd !== undefined && {\n kwRFfy: paddingInlineEnd != null ? \"x120eax6\" : \"\",\n $$css: true\n }, {\n \"--x-paddingInlineEnd\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(paddingInlineEnd)\n }],\n outlineFocused: {\n kMzoRj: \"xdh2fpr\",\n kg3NbH: \"x1cmmxig\",\n $$css: true\n },\n outlineLeading: {\n kZCmMZ: \"x1e4tv75\",\n $$css: true\n },\n outlineLeadingFocused: {\n kZCmMZ: \"x2e0ysr\",\n $$css: true\n },\n outlineNotch: {\n kZKoxP: \"xqtp20y\",\n kB7OPa: \"x9f619\",\n kLWn49: \"x14ju556\",\n ks0D6T: \"x193iq5w\",\n kVQacm: \"xb3r6kr\",\n kmVPX3: \"x1717udv\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n outlineNotchOpen: {\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n outlineTrailing: {\n kwRFfy: \"xflzzte\",\n $$css: true\n },\n outlineTrailingFocused: {\n kwRFfy: \"x1gwc4xo\",\n $$css: true\n },\n replica: {\n kHjlTd: \"x1mzt3pk\",\n k33iCy: \"xlshs6z\",\n khDVqt: \"x126k92a\",\n $$css: true\n },\n segments: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kVQacm: \"xb3r6kr\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n textArea: {\n k1xSpc: \"x1lliihq\",\n kVQacm: \"xysyzu8\",\n kHenm0: \"xtt52l0\",\n $$css: true\n },\n textAreaAutosize: {\n kVQacm: \"xb3r6kr\",\n $$css: true\n },\n trigger: {\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n kpwlN0: \"x10a8y8t\",\n k3XXqK: \"x1t137rt\",\n kmVPX3: \"x1717udv\",\n kVAEAm: \"x10l6tqk\",\n kY2c9j: \"x1vjfegm\",\n $$css: true\n },\n value: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kVQacm: \"xb3r6kr\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n valuePlaceholder: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n valuePlaceholderHidden: {\n kMwMTN: \"x19co3pv\",\n $$css: true\n }\n};\n\n// The chrome a label sitting above a group takes, rather than inside a box.\n// CheckboxGroup, ChipGroup, RadioGroup, Slider and ColorSlider each wrote both\n// of these out: the type override on the label, and the column its label and\n// control sit in.\n//\n// The label is label-large, the role a field's label takes at rest, since a\n// group has no box to float it in.\n//\n// The two sliders compose an inline size of their own on the root, since a\n// slider fills the width it is given where a group of controls does not.\nconst groupStyles = {\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n root: {\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"xzoy561\",\n $$css: true\n }\n};\nexport { fieldChromeStyles, groupStyles, OUTLINE_FOCUSED_WIDTH, OUTLINE_WIDTH };"],"mappings":";;AAiBW,GAAsBA,OAAOI,YAAkBF,kBAAkBG,kBAA4BL,OAAOM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QAAQ;EACRkC,QAAQ;EACRpI,QAAQ;EACRC,OAAO;CACT;CACAwI,UAAU;EACRtI,QAAQ;EACRC,QAAQ;EACRqC,QAAQ;EACRzC,QAAQ;EACRC,OAAO;CACT;CACAyI,UAAU;EACRtI,QAAQ;EACRqC,QAAQ;EACRkG,QAAQ;EACR1I,OAAO;CACT;CACA2I,kBAAkB;EAChBnG,QAAQ;EACRxC,OAAO;CACT;CACA4I,SAAS;EACPnI,QAAQ;EACR+E,QAAQ;EACRtE,QAAQ;EACRC,QAAQ;EACRsG,QAAQ;EACRnG,QAAQ;EACRqE,QAAQ;EACRhE,QAAQ;EACRkH,QAAQ;EACR7I,OAAO;CACT;CACA8I,OAAO;EACL5I,QAAQ;EACRC,QAAQ;EACRqC,QAAQ;EACRC,QAAQ;EACR1C,QAAQ;EACRC,OAAO;CACT;CACA+I,kBAAkB;EAChBzF,QAAQ;EACRtD,OAAO;CACT;CACAgJ,wBAAwB;EACtB1F,QAAQ;EACRtD,OAAO;CACT;AACF;AAYA,MAAMiJ,cAAc;CAClBjD,OAAO;EACLzG,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRK,OAAO;CACT;CACAkJ,MAAM;EACJhI,QAAQ;EACRf,QAAQ;EACRgJ,QAAQ;EACR/I,QAAQ;EACRJ,OAAO;CACT;AACF"}
@@ -156,7 +156,7 @@ function useRipple(t0, t1, t2, t3) {
156
156
  rippleStartEvent.current = void 0;
157
157
  state.current = RippleState.Inactive;
158
158
  const animation = growAnimation.current;
159
- const elapsed = typeof animation?.currentTime === "number" ? animation.currentTime : Infinity;
159
+ const elapsed = typeof animation?.currentTime === "number" ? animation.currentTime : 1e400;
160
160
  if (elapsed >= motionDurationMs.medium1) {
161
161
  setPressed(false);
162
162
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"stylex.js","names":[],"sources":["../../../../../../node_modules/@stylexjs/stylex/lib/es/stylex.mjs"],"sourcesContent":["var styleq = {};\n\nvar hasRequiredStyleq;\n\nfunction requireStyleq () {\n\tif (hasRequiredStyleq) return styleq;\n\thasRequiredStyleq = 1;\n\n\tObject.defineProperty(styleq, \"__esModule\", {\n\t value: true\n\t});\n\tstyleq.styleq = void 0;\n\tvar cache = new WeakMap();\n\tvar compiledKey = '$$css';\n\tfunction createStyleq(options) {\n\t var disableCache;\n\t var disableMix;\n\t var transform;\n\t if (options != null) {\n\t disableCache = options.disableCache === true;\n\t disableMix = options.disableMix === true;\n\t transform = options.transform;\n\t }\n\t return function styleq() {\n\t var definedProperties = [];\n\t var className = '';\n\t var inlineStyle = null;\n\t var debugString = '';\n\t var nextCache = disableCache ? null : cache;\n\t var styles = new Array(arguments.length);\n\t for (var i = 0; i < arguments.length; i++) {\n\t styles[i] = arguments[i];\n\t }\n\t while (styles.length > 0) {\n\t var possibleStyle = styles.pop();\n\t if (possibleStyle == null || possibleStyle === false) {\n\t continue;\n\t }\n\t if (Array.isArray(possibleStyle)) {\n\t for (var _i = 0; _i < possibleStyle.length; _i++) {\n\t styles.push(possibleStyle[_i]);\n\t }\n\t continue;\n\t }\n\t var style = transform != null ? transform(possibleStyle) : possibleStyle;\n\t if (style.$$css != null) {\n\t var classNameChunk = '';\n\t if (nextCache != null && nextCache.has(style)) {\n\t var cacheEntry = nextCache.get(style);\n\t if (cacheEntry != null) {\n\t classNameChunk = cacheEntry[0];\n\t debugString = cacheEntry[2];\n\t definedProperties.push.apply(definedProperties, cacheEntry[1]);\n\t nextCache = cacheEntry[3];\n\t }\n\t } else {\n\t var definedPropertiesChunk = [];\n\t for (var prop in style) {\n\t var value = style[prop];\n\t if (prop === compiledKey) {\n\t var compiledKeyValue = style[prop];\n\t if (compiledKeyValue !== true) {\n\t debugString = debugString ? compiledKeyValue + '; ' + debugString : compiledKeyValue;\n\t }\n\t continue;\n\t }\n\t if (typeof value === 'string' || value === null) {\n\t if (!definedProperties.includes(prop)) {\n\t definedProperties.push(prop);\n\t if (nextCache != null) {\n\t definedPropertiesChunk.push(prop);\n\t }\n\t if (typeof value === 'string') {\n\t classNameChunk += classNameChunk ? ' ' + value : value;\n\t }\n\t }\n\t } else {\n\t console.error(\"styleq: \".concat(prop, \" typeof \").concat(String(value), \" is not \\\"string\\\" or \\\"null\\\".\"));\n\t }\n\t }\n\t if (nextCache != null) {\n\t var weakMap = new WeakMap();\n\t nextCache.set(style, [classNameChunk, definedPropertiesChunk, debugString, weakMap]);\n\t nextCache = weakMap;\n\t }\n\t }\n\t if (classNameChunk) {\n\t className = className ? classNameChunk + ' ' + className : classNameChunk;\n\t }\n\t } else {\n\t if (disableMix) {\n\t if (inlineStyle == null) {\n\t inlineStyle = {};\n\t }\n\t inlineStyle = Object.assign({}, style, inlineStyle);\n\t } else {\n\t var subStyle = null;\n\t for (var _prop in style) {\n\t var _value = style[_prop];\n\t if (_value !== undefined) {\n\t if (!definedProperties.includes(_prop)) {\n\t if (_value != null) {\n\t if (inlineStyle == null) {\n\t inlineStyle = {};\n\t }\n\t if (subStyle == null) {\n\t subStyle = {};\n\t }\n\t subStyle[_prop] = _value;\n\t }\n\t definedProperties.push(_prop);\n\t nextCache = null;\n\t }\n\t }\n\t }\n\t if (subStyle != null) {\n\t inlineStyle = Object.assign(subStyle, inlineStyle);\n\t }\n\t }\n\t }\n\t }\n\t var styleProps = [className, inlineStyle, debugString];\n\t return styleProps;\n\t };\n\t}\n\tvar styleq$1 = styleq.styleq = createStyleq();\n\tstyleq$1.factory = createStyleq;\n\treturn styleq;\n}\n\nvar styleqExports = /*@__PURE__*/ requireStyleq();\n\nconst errorForFn = name => new Error(`Unexpected 'stylex.${name}' call at runtime. Styles must be compiled by '@stylexjs/babel-plugin'.`);\nconst errorForType = key => errorForFn(`types.${key}`);\nconst create = function stylexCreate(_styles) {\n throw errorForFn('create');\n};\nconst createTheme = (_baseTokens, _overrides) => {\n throw errorForFn('createTheme');\n};\nconst defineConsts = function stylexDefineConsts(_styles) {\n throw errorForFn('defineConsts');\n};\nconst defineVars = function stylexDefineVars(_styles) {\n throw errorForFn('defineVars');\n};\nconst unstable_conditional = function stylexConditional(_value) {\n throw errorForFn('unstable_conditional');\n};\nconst unstable_defineVarsNested = function stylexDefineVarsNested(_styles) {\n throw errorForFn('unstable_defineVarsNested');\n};\nconst unstable_defineConstsNested = function stylexDefineConstsNested(_styles) {\n throw errorForFn('unstable_defineConstsNested');\n};\nconst unstable_createThemeNested = (_baseTokens, _overrides) => {\n throw errorForFn('unstable_createThemeNested');\n};\nconst defineMarker = () => {\n throw errorForFn('defineMarker');\n};\nconst firstThatWorks = (..._styles) => {\n throw errorForFn('firstThatWorks');\n};\nconst keyframes = _keyframes => {\n throw errorForFn('keyframes');\n};\nconst positionTry = _positionTry => {\n throw errorForFn('positionTry');\n};\nfunction props(...styles) {\n const [className, style, dataStyleSrc] = styleqExports.styleq(styles);\n const result = {};\n if (className != null && className !== '') {\n result.className = className;\n }\n if (style != null && Object.keys(style).length > 0) {\n result.style = style;\n }\n if (dataStyleSrc != null && dataStyleSrc !== '') {\n result['data-style-src'] = dataStyleSrc;\n }\n return result;\n}\nconst toKebabCase = str => str.replace(/([A-Z])/g, '-$1').toLowerCase();\nfunction attrs(...styles) {\n const {\n className,\n style,\n 'data-style-src': dataStyleSrc\n } = props.apply(this, styles);\n const result = {};\n if (className != null) {\n result.class = className;\n }\n if (style != null) {\n result.style = Object.entries(style).map(([key, value]) => `${toKebabCase(key)}:${value}`).join(';');\n }\n if (dataStyleSrc != null) {\n result['data-style-src'] = dataStyleSrc;\n }\n return result;\n}\nconst viewTransitionClass = _viewTransitionClass => {\n throw errorForFn('viewTransitionClass');\n};\nconst defaultMarker = () => {\n throw errorForFn('defaultMarker');\n};\nconst when = {\n ancestor: _p => {\n throw errorForFn('when.ancestor');\n },\n descendant: _p => {\n throw errorForFn('when.descendant');\n },\n siblingBefore: _p => {\n throw errorForFn('when.siblingBefore');\n },\n siblingAfter: _p => {\n throw errorForFn('when.siblingAfter');\n },\n anySibling: _p => {\n throw errorForFn('when.anySibling');\n }\n};\nconst env = Object.freeze({});\nconst types = {\n angle: _v => {\n throw errorForType('angle');\n },\n color: _v => {\n throw errorForType('color');\n },\n url: _v => {\n throw errorForType('url');\n },\n image: _v => {\n throw errorForType('image');\n },\n integer: _v => {\n throw errorForType('integer');\n },\n lengthPercentage: _v => {\n throw errorForType('lengthPercentage');\n },\n length: _v => {\n throw errorForType('length');\n },\n percentage: _v => {\n throw errorForType('percentage');\n },\n number: _v => {\n throw errorForType('number');\n },\n resolution: _v => {\n throw errorForType('resolution');\n },\n time: _v => {\n throw errorForType('time');\n },\n transformFunction: _v => {\n throw errorForType('transformFunction');\n },\n transformList: _v => {\n throw errorForType('transformList');\n }\n};\nconst legacyMerge = /*@__PURE__*/ function () {\n function _legacyMerge(...styles) {\n const [className] = styleqExports.styleq(styles);\n return className;\n }\n _legacyMerge.create = create;\n _legacyMerge.createTheme = createTheme;\n _legacyMerge.defineConsts = defineConsts;\n _legacyMerge.defineMarker = defineMarker;\n _legacyMerge.defineVars = defineVars;\n _legacyMerge.defaultMarker = defaultMarker;\n _legacyMerge.firstThatWorks = firstThatWorks;\n _legacyMerge.keyframes = keyframes;\n _legacyMerge.positionTry = positionTry;\n _legacyMerge.props = props;\n _legacyMerge.attrs = attrs;\n _legacyMerge.types = types;\n _legacyMerge.when = when;\n _legacyMerge.viewTransitionClass = viewTransitionClass;\n _legacyMerge.env = env;\n _legacyMerge.unstable_conditional = unstable_conditional;\n _legacyMerge.unstable_defineVarsNested = unstable_defineVarsNested;\n _legacyMerge.unstable_defineConstsNested = unstable_defineConstsNested;\n _legacyMerge.unstable_createThemeNested = unstable_createThemeNested;\n return _legacyMerge;\n}();\n\nexport { attrs, create, createTheme, defaultMarker, defineConsts, defineMarker, defineVars, env, firstThatWorks, keyframes, legacyMerge, positionTry, props, types, unstable_conditional, unstable_createThemeNested, unstable_defineConstsNested, unstable_defineVarsNested, viewTransitionClass, when };\n"],"ignoreList":[0],"mappings":";AAAA,IAAI,SAAS,CAAC;AAEd,I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S,aAAa;CAC5C,SAAS,UAAU;CACnB,OAAO;AACR;AAEA,IAAI,gBAA8B,4BAAc;AAwChD,SAAS,MAAM,GAAG,QAAQ;CACxB,MAAM,CAAC,WAAW,OAAO,gBAAgB,cAAc,OAAO,MAAM;CACpE,MAAM,SAAS,CAAC;CAChB,IAAI,aAAa,QAAQ,cAAc,IACrC,OAAO,YAAY;CAErB,IAAI,SAAS,QAAQ,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,GAC/C,OAAO,QAAQ;CAEjB,IAAI,gBAAgB,QAAQ,iBAAiB,IAC3C,OAAO,oBAAoB;CAE7B,OAAO;AACT;AA2CY,OAAO,OAAO,CAAC,CAAC"}
1
+ {"version":3,"file":"stylex.js","names":[],"sources":["../../../../../../node_modules/@stylexjs/stylex/lib/es/stylex.mjs"],"sourcesContent":["var styleq = {};\n\nvar hasRequiredStyleq;\n\nfunction requireStyleq () {\n\tif (hasRequiredStyleq) return styleq;\n\thasRequiredStyleq = 1;\n\n\tObject.defineProperty(styleq, \"__esModule\", {\n\t value: true\n\t});\n\tstyleq.styleq = void 0;\n\tvar cache = new WeakMap();\n\tvar compiledKey = '$$css';\n\tfunction createStyleq(options) {\n\t var disableCache;\n\t var disableMix;\n\t var transform;\n\t if (options != null) {\n\t disableCache = options.disableCache === true;\n\t disableMix = options.disableMix === true;\n\t transform = options.transform;\n\t }\n\t return function styleq() {\n\t var definedProperties = [];\n\t var className = '';\n\t var inlineStyle = null;\n\t var debugString = '';\n\t var nextCache = disableCache ? null : cache;\n\t var styles = new Array(arguments.length);\n\t for (var i = 0; i < arguments.length; i++) {\n\t styles[i] = arguments[i];\n\t }\n\t while (styles.length > 0) {\n\t var possibleStyle = styles.pop();\n\t if (possibleStyle == null || possibleStyle === false) {\n\t continue;\n\t }\n\t if (Array.isArray(possibleStyle)) {\n\t for (var _i = 0; _i < possibleStyle.length; _i++) {\n\t styles.push(possibleStyle[_i]);\n\t }\n\t continue;\n\t }\n\t var style = transform != null ? transform(possibleStyle) : possibleStyle;\n\t if (style.$$css != null) {\n\t var classNameChunk = '';\n\t if (nextCache != null && nextCache.has(style)) {\n\t var cacheEntry = nextCache.get(style);\n\t if (cacheEntry != null) {\n\t classNameChunk = cacheEntry[0];\n\t debugString = cacheEntry[2];\n\t definedProperties.push.apply(definedProperties, cacheEntry[1]);\n\t nextCache = cacheEntry[3];\n\t }\n\t } else {\n\t var definedPropertiesChunk = [];\n\t for (var prop in style) {\n\t var value = style[prop];\n\t if (prop === compiledKey) {\n\t var compiledKeyValue = style[prop];\n\t if (compiledKeyValue !== true) {\n\t debugString = debugString ? compiledKeyValue + '; ' + debugString : compiledKeyValue;\n\t }\n\t continue;\n\t }\n\t if (typeof value === 'string' || value === null) {\n\t if (!definedProperties.includes(prop)) {\n\t definedProperties.push(prop);\n\t if (nextCache != null) {\n\t definedPropertiesChunk.push(prop);\n\t }\n\t if (typeof value === 'string') {\n\t classNameChunk += classNameChunk ? ' ' + value : value;\n\t }\n\t }\n\t } else {\n\t console.error(\"styleq: \".concat(prop, \" typeof \").concat(String(value), \" is not \\\"string\\\" or \\\"null\\\".\"));\n\t }\n\t }\n\t if (nextCache != null) {\n\t var weakMap = new WeakMap();\n\t nextCache.set(style, [classNameChunk, definedPropertiesChunk, debugString, weakMap]);\n\t nextCache = weakMap;\n\t }\n\t }\n\t if (classNameChunk) {\n\t className = className ? classNameChunk + ' ' + className : classNameChunk;\n\t }\n\t } else {\n\t if (disableMix) {\n\t if (inlineStyle == null) {\n\t inlineStyle = {};\n\t }\n\t inlineStyle = Object.assign({}, style, inlineStyle);\n\t } else {\n\t var subStyle = null;\n\t for (var _prop in style) {\n\t var _value = style[_prop];\n\t if (_value !== undefined) {\n\t if (!definedProperties.includes(_prop)) {\n\t if (_value != null) {\n\t if (inlineStyle == null) {\n\t inlineStyle = {};\n\t }\n\t if (subStyle == null) {\n\t subStyle = {};\n\t }\n\t subStyle[_prop] = _value;\n\t }\n\t definedProperties.push(_prop);\n\t nextCache = null;\n\t }\n\t }\n\t }\n\t if (subStyle != null) {\n\t inlineStyle = Object.assign(subStyle, inlineStyle);\n\t }\n\t }\n\t }\n\t }\n\t var styleProps = [className, inlineStyle, debugString];\n\t return styleProps;\n\t };\n\t}\n\tvar styleq$1 = styleq.styleq = createStyleq();\n\tstyleq$1.factory = createStyleq;\n\treturn styleq;\n}\n\nvar styleqExports = /*@__PURE__*/ requireStyleq();\n\nconst errorForFn = name => new Error(`Unexpected 'stylex.${name}' call at runtime. Styles must be compiled by '@stylexjs/babel-plugin'.`);\nconst errorForType = key => errorForFn(`types.${key}`);\nconst create = function stylexCreate(_styles) {\n throw errorForFn('create');\n};\nconst createTheme = (_baseTokens, _overrides) => {\n throw errorForFn('createTheme');\n};\nconst defineConsts = function stylexDefineConsts(_styles) {\n throw errorForFn('defineConsts');\n};\nconst defineVars = function stylexDefineVars(_styles) {\n throw errorForFn('defineVars');\n};\nconst unstable_conditional = function stylexConditional(_value) {\n throw errorForFn('unstable_conditional');\n};\nconst unstable_defineVarsNested = function stylexDefineVarsNested(_styles) {\n throw errorForFn('unstable_defineVarsNested');\n};\nconst unstable_defineConstsNested = function stylexDefineConstsNested(_styles) {\n throw errorForFn('unstable_defineConstsNested');\n};\nconst unstable_createThemeNested = (_baseTokens, _overrides) => {\n throw errorForFn('unstable_createThemeNested');\n};\nconst defineMarker = () => {\n throw errorForFn('defineMarker');\n};\nconst firstThatWorks = (..._styles) => {\n throw errorForFn('firstThatWorks');\n};\nconst keyframes = _keyframes => {\n throw errorForFn('keyframes');\n};\nconst positionTry = _positionTry => {\n throw errorForFn('positionTry');\n};\nfunction props(...styles) {\n const [className, style, dataStyleSrc] = styleqExports.styleq(styles);\n const result = {};\n if (className != null && className !== '') {\n result.className = className;\n }\n if (style != null && Object.keys(style).length > 0) {\n result.style = style;\n }\n if (dataStyleSrc != null && dataStyleSrc !== '') {\n result['data-style-src'] = dataStyleSrc;\n }\n return result;\n}\nconst toKebabCase = str => str.replace(/([A-Z])/g, '-$1').toLowerCase();\nfunction attrs(...styles) {\n const {\n className,\n style,\n 'data-style-src': dataStyleSrc\n } = props.apply(this, styles);\n const result = {};\n if (className != null) {\n result.class = className;\n }\n if (style != null) {\n result.style = Object.entries(style).map(([key, value]) => {\n if (key.startsWith('--')) {\n return `${key}:${value}`;\n }\n return `${toKebabCase(key)}:${value}`;\n }).join(';');\n }\n if (dataStyleSrc != null) {\n result['data-style-src'] = dataStyleSrc;\n }\n return result;\n}\nconst viewTransitionClass = _viewTransitionClass => {\n throw errorForFn('viewTransitionClass');\n};\nconst defaultMarker = () => {\n throw errorForFn('defaultMarker');\n};\nconst when = {\n ancestor: _p => {\n throw errorForFn('when.ancestor');\n },\n descendant: _p => {\n throw errorForFn('when.descendant');\n },\n siblingBefore: _p => {\n throw errorForFn('when.siblingBefore');\n },\n siblingAfter: _p => {\n throw errorForFn('when.siblingAfter');\n },\n anySibling: _p => {\n throw errorForFn('when.anySibling');\n }\n};\nconst env = Object.freeze({});\nconst types = {\n angle: _v => {\n throw errorForType('angle');\n },\n color: _v => {\n throw errorForType('color');\n },\n url: _v => {\n throw errorForType('url');\n },\n image: _v => {\n throw errorForType('image');\n },\n integer: _v => {\n throw errorForType('integer');\n },\n lengthPercentage: _v => {\n throw errorForType('lengthPercentage');\n },\n length: _v => {\n throw errorForType('length');\n },\n percentage: _v => {\n throw errorForType('percentage');\n },\n number: _v => {\n throw errorForType('number');\n },\n resolution: _v => {\n throw errorForType('resolution');\n },\n time: _v => {\n throw errorForType('time');\n },\n transformFunction: _v => {\n throw errorForType('transformFunction');\n },\n transformList: _v => {\n throw errorForType('transformList');\n }\n};\nconst legacyMerge = /*@__PURE__*/ function () {\n function _legacyMerge(...styles) {\n const [className] = styleqExports.styleq(styles);\n return className;\n }\n _legacyMerge.create = create;\n _legacyMerge.createTheme = createTheme;\n _legacyMerge.defineConsts = defineConsts;\n _legacyMerge.defineMarker = defineMarker;\n _legacyMerge.defineVars = defineVars;\n _legacyMerge.defaultMarker = defaultMarker;\n _legacyMerge.firstThatWorks = firstThatWorks;\n _legacyMerge.keyframes = keyframes;\n _legacyMerge.positionTry = positionTry;\n _legacyMerge.props = props;\n _legacyMerge.attrs = attrs;\n _legacyMerge.types = types;\n _legacyMerge.when = when;\n _legacyMerge.viewTransitionClass = viewTransitionClass;\n _legacyMerge.env = env;\n _legacyMerge.unstable_conditional = unstable_conditional;\n _legacyMerge.unstable_defineVarsNested = unstable_defineVarsNested;\n _legacyMerge.unstable_defineConstsNested = unstable_defineConstsNested;\n _legacyMerge.unstable_createThemeNested = unstable_createThemeNested;\n return _legacyMerge;\n}();\n\nexport { attrs, create, createTheme, defaultMarker, defineConsts, defineMarker, defineVars, env, firstThatWorks, keyframes, legacyMerge, positionTry, props, types, unstable_conditional, unstable_createThemeNested, unstable_defineConstsNested, unstable_defineVarsNested, viewTransitionClass, when };\n"],"ignoreList":[0],"mappings":";AAAA,IAAI,SAAS,CAAC;AAEd,IAAI;AAEJ,SAAS,gBAAiB;CACzB,IAAI,mBAAmB,OAAO;CAC9B,oBAAoB;CAEpB,OAAO,eAAe,QAAQ,cAAc,EAC1C,OAAO,KACT,CAAC;CACD,OAAO,SAAS,KAAK;CACrB,IAAI,wBAAQ,IAAI,QAAQ;CACxB,IAAI,cAAc;CAClB,SAAS,aAAa,SAAS;EAC7B,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI,WAAW,MAAM;GACnB,eAAe,QAAQ,iBAAiB;GACxC,aAAa,QAAQ,eAAe;GACpC,YAAY,QAAQ;EACtB;EACA,OAAO,SAAS,SAAS;GACvB,IAAI,oBAAoB,CAAC;GACzB,IAAI,YAAY;GAChB,IAAI,cAAc;GAClB,IAAI,cAAc;GAClB,IAAI,YAAY,eAAe,OAAO;GACtC,IAAI,SAAS,IAAI,MAAM,UAAU,MAAM;GACvC,KAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KACpC,OAAO,KAAK,UAAU;GAExB,OAAO,OAAO,SAAS,GAAG;IACxB,IAAI,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