@wow-two-beta/ui 0.0.60 → 0.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.js +3 -3
- package/dist/{chunk-MTE5E6OQ.js → chunk-3IVQNIHV.js} +6 -6
- package/dist/{chunk-MTE5E6OQ.js.map → chunk-3IVQNIHV.js.map} +1 -1
- package/dist/{chunk-XDATW7NF.js → chunk-3SWPYYRQ.js} +3 -3
- package/dist/{chunk-XDATW7NF.js.map → chunk-3SWPYYRQ.js.map} +1 -1
- package/dist/{chunk-OBW7JUNL.js → chunk-5JYRZ5PA.js} +6 -6
- package/dist/{chunk-OBW7JUNL.js.map → chunk-5JYRZ5PA.js.map} +1 -1
- package/dist/{chunk-NR5DYKSJ.js → chunk-7ZDLUNAY.js} +3 -3
- package/dist/{chunk-NR5DYKSJ.js.map → chunk-7ZDLUNAY.js.map} +1 -1
- package/dist/{chunk-MTD4RTGO.js → chunk-BLU5JZAB.js} +8 -8
- package/dist/{chunk-MTD4RTGO.js.map → chunk-BLU5JZAB.js.map} +1 -1
- package/dist/{chunk-GSAOM2ZR.js → chunk-DPB2K3BH.js} +4 -4
- package/dist/{chunk-GSAOM2ZR.js.map → chunk-DPB2K3BH.js.map} +1 -1
- package/dist/{chunk-JYGC5SRP.js → chunk-DX7FYAKY.js} +8 -2
- package/dist/chunk-DX7FYAKY.js.map +1 -0
- package/dist/{chunk-DJJOQWOG.js → chunk-EQNTG53H.js} +3 -3
- package/dist/{chunk-DJJOQWOG.js.map → chunk-EQNTG53H.js.map} +1 -1
- package/dist/{chunk-577JZ2A2.js → chunk-FMTBJJP6.js} +3 -3
- package/dist/{chunk-577JZ2A2.js.map → chunk-FMTBJJP6.js.map} +1 -1
- package/dist/{chunk-EJCO7AWR.js → chunk-H4P5MAGS.js} +6 -6
- package/dist/{chunk-EJCO7AWR.js.map → chunk-H4P5MAGS.js.map} +1 -1
- package/dist/{chunk-HG7NX6GP.js → chunk-INSI3NPU.js} +7 -7
- package/dist/{chunk-HG7NX6GP.js.map → chunk-INSI3NPU.js.map} +1 -1
- package/dist/{chunk-EEHJHPAP.js → chunk-MYLSXVIS.js} +6 -6
- package/dist/{chunk-EEHJHPAP.js.map → chunk-MYLSXVIS.js.map} +1 -1
- package/dist/{chunk-FNSC4LAL.js → chunk-NOOKDXIZ.js} +3 -3
- package/dist/{chunk-FNSC4LAL.js.map → chunk-NOOKDXIZ.js.map} +1 -1
- package/dist/{chunk-2N3N3IE2.js → chunk-VQGGK4VP.js} +128 -6
- package/dist/chunk-VQGGK4VP.js.map +1 -0
- package/dist/{chunk-EX4AOJCN.js → chunk-WIXKLDTN.js} +6 -6
- package/dist/{chunk-EX4AOJCN.js.map → chunk-WIXKLDTN.js.map} +1 -1
- package/dist/{chunk-TTSJZEL7.js → chunk-XLYJF3HC.js} +41 -3
- package/dist/chunk-XLYJF3HC.js.map +1 -0
- package/dist/display/index.d.ts +1 -0
- package/dist/display/index.js +4 -4
- package/dist/display/sortable/Sortable.d.ts +15 -0
- package/dist/display/sortable/index.d.ts +2 -0
- package/dist/feedback/index.js +5 -5
- package/dist/forms/index.js +10 -10
- package/dist/icons/index.js +1 -1
- package/dist/index.css +33 -0
- package/dist/index.js +16 -16
- package/dist/layout/index.js +7 -7
- package/dist/nav/index.js +7 -7
- package/dist/overlays/index.js +7 -7
- package/dist/primitives/colorModeProvider/ColorModeProvider.d.ts +22 -0
- package/dist/primitives/colorModeProvider/index.d.ts +1 -0
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.js +1 -1
- package/dist/utils/SurfaceStyles.d.ts +37 -0
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2N3N3IE2.js.map +0 -1
- package/dist/chunk-JYGC5SRP.js.map +0 -1
- package/dist/chunk-TTSJZEL7.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/index.ts","../src/utils/composeEventHandlers.ts","../src/utils/dataAttr.ts","../src/utils/CssExtensions.ts","../src/utils/ColorExtensions.ts","../src/utils/OptionalExtensions.ts","../src/utils/PressExtensions.ts","../src/utils/HtmlExtensions.ts","../src/utils/KeyboardExtensions.ts","../src/utils/Environment.ts","../src/utils/TransitionExtensions.ts","../src/utils/Tones.ts","../src/utils/SurfaceStyles.ts","../src/utils/Layers.ts","../src/utils/Equality.ts"],"names":[],"mappings":";;;;;;AAAA,IAAA,aAAA,GAAA;AAAA,QAAA,CAAA,aAAA,EAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,WAAA,EAAA,MAAA,WAAA;AAAA,EAAA,QAAA,EAAA,MAAA,QAAA;AAAA,EAAA,WAAA,EAAA,MAAA,WAAA;AAAA,EAAA,MAAA,EAAA,MAAA,MAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,GAAA,EAAA,MAAA,GAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,kBAAA,EAAA,MAAA,kBAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,oBAAA,EAAA,MAAA,oBAAA;AAAA,EAAA,EAAA,EAAA,MAAA,EAAA;AAAA,EAAA,oBAAA,EAAA,MAAA,oBAAA;AAAA,EAAA,WAAA,EAAA,MAAA,WAAA;AAAA,EAAA,QAAA,EAAA,MAAA,QAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,EAAA,EAAA,MAAA;AAAA,CAAA,CAAA;;;ACQO,SAAS,oBAAA,CACd,cACA,UAAA,EACA,EAAE,2BAA2B,IAAA,EAAK,GAA4C,EAAC,EAC3D;AACpB,EAAA,OAAO,CAAC,KAAA,KAAU;AAChB,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AG,CAAA,CAAE,CAAC,GAAG,CAAA,CAAE,CAAC,CAAC,CAAC,CAAA;AAAA,EAC5F;AACF","file":"chunk-JYGC5SRP.js","sourcesContent":["export { cn } from './cn';\nexport { composeRefs } from './composeRefs';\nexport { composeEventHandlers } from './composeEventHandlers';\nexport { dataAttr } from './dataAttr';\nexport { tv, type VariantProps } from './tv';\nexport type {\n PolymorphicProps,\n PolymorphicPropsWithoutRef,\n PolymorphicRef,\n} from './polymorphic';\nexport { CssExtensions } from './CssExtensions';\nexport type {\n PaddingToken,\n RadiusToken,\n SizeValue,\n PaddingProp,\n RadiusProp,\n BoxSizeOverrides,\n SizeUnion,\n SizePreset,\n AbsolutePositionPreset,\n AbsoluteInsetOverrides,\n AbsolutePosition,\n} from './CssExtensions';\nexport { ColorExtensions } from './ColorExtensions';\nexport type { ColorTone, ColorOverride, ColorProp } from './ColorExtensions';\nexport { OptionalExtensions } from './OptionalExtensions';\nexport { PressExtensions, type PressEvent } from './PressExtensions';\nexport { HtmlElement, ButtonType } from './HtmlExtensions';\nexport { Key } from './KeyboardExtensions';\nexport { Environment, IS_DEV, IS_PRODUCTION } from './Environment';\nexport { TransitionExtensions } from './TransitionExtensions';\nexport type {\n PresenceAnimationDurationProp,\n PresenceAnimationDuration,\n} from './TransitionExtensions';\nexport { surfaceVariants } from './SurfaceStyles';\nexport type {\n SurfaceVariants,\n SurfaceVariant,\n SurfaceTone,\n SurfaceRadius,\n SurfacePadding,\n SurfaceElevation,\n} from './SurfaceStyles';\nexport { Layer, layerStyle, type LayerName } from './Layers';\nexport { Equality, type EqualityComparer } from './Equality';\nexport type { Tone, Size, Radius, Padding, Elevation } from './StyleTokens';\nexport { Tones, type ToneFamily } from './Tones';\n","import type { SyntheticEvent } from 'react';\n\n/**\n * Chain two event handlers. The first handler runs, then the second — unless\n * the first called `event.preventDefault()`, in which case the second is skipped.\n * Use when overriding a default handler from a parent while still allowing\n * the consumer to provide their own.\n */\nexport function composeEventHandlers<E extends SyntheticEvent>(\n theirHandler: ((event: E) => void) | undefined,\n ourHandler: (event: E) => void,\n { checkForDefaultPrevented = true }: { checkForDefaultPrevented?: boolean } = {},\n): (event: E) => void {\n return (event) => {\n theirHandler?.(event);\n if (!checkForDefaultPrevented || !event.defaultPrevented) {\n ourHandler(event);\n }\n };\n}\n","/**\n * Returns `\"\"` when the condition is true, `undefined` otherwise.\n * Use for boolean `data-*` attributes — React strips the attr when value is undefined,\n * so the DOM cleanly toggles `data-state` rather than `data-state=\"false\"`.\n */\nexport function dataAttr(condition: boolean | undefined): '' | undefined {\n return condition ? '' : undefined;\n}\n","import type { CSSProperties } from 'react';\n\n/** CSS-value extensions — types, token maps, resolvers. Call as `CssExtensions.x(...)`. */\n\n// =============================================================================\n// Tokens (types — individually exported; types are erased, no shaking concern)\n// =============================================================================\n\nexport type PaddingToken = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\nexport type RadiusToken = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';\nexport type SizeValue = string | number;\nexport type PaddingProp = PaddingToken | { x?: SizeValue; y?: SizeValue };\nexport type RadiusProp = RadiusToken | SizeValue;\nexport interface BoxSizeOverrides {\n width?: SizeValue;\n height?: SizeValue;\n minWidth?: SizeValue;\n minHeight?: SizeValue;\n maxWidth?: SizeValue;\n maxHeight?: SizeValue;\n /** Shorthand for square boxes — applied as fallback for both `width` and `height`. Explicit `width`/`height` win when both are set. */\n boxSize?: SizeValue;\n /** CSS `aspect-ratio`. String like `'16/9'` or number like `1.5`. Pairs naturally with a single width/height. */\n aspectRatio?: string | number;\n}\n\n/** Canonical size preset vocabulary — shared across components. Each component picks the subset it supports via `Extract<SizePreset, ...>` and owns its internal dimension mapping. */\nexport type SizePreset = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n/* Absolute-positioning tokens — preset 9-anchor enum + raw inset overrides. */\n\nexport type AbsolutePositionPreset =\n | 'top-right'\n | 'top-left'\n | 'bottom-right'\n | 'bottom-left'\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'center';\n\nexport interface AbsoluteInsetOverrides {\n top?: SizeValue;\n right?: SizeValue;\n bottom?: SizeValue;\n left?: SizeValue;\n}\n\nexport type AbsolutePosition = AbsolutePositionPreset | AbsoluteInsetOverrides;\n\n// =============================================================================\n// Token → CSS maps\n// =============================================================================\n\nconst PADDING_TOKEN_TO_CSS: Record<Exclude<PaddingToken, 'none'>, string> = {\n xs: '0.5rem',\n sm: '0.75rem',\n md: '1rem',\n lg: '1.5rem',\n xl: '2rem',\n};\n\nconst RADIUS_TOKEN_TO_CSS: Record<Exclude<RadiusToken, 'none' | 'full'>, string> = {\n xs: '0.125rem',\n sm: '0.25rem',\n md: '0.5rem',\n lg: '0.75rem',\n xl: '1rem',\n};\n\n// =============================================================================\n// Internal resolvers\n// =============================================================================\n\nfunction toCss(v: SizeValue): string {\n return typeof v === 'number' ? `${v}px` : v;\n}\n\nfunction resolvePadding(padding: PaddingProp | undefined): CSSProperties | undefined {\n if (!padding) return undefined;\n if (typeof padding === 'string') {\n if (padding === 'none') {\n return { paddingLeft: 0, paddingRight: 0, paddingTop: 0, paddingBottom: 0 };\n }\n const v = PADDING_TOKEN_TO_CSS[padding];\n return { paddingLeft: v, paddingRight: v, paddingTop: v, paddingBottom: v };\n }\n const style: CSSProperties = {};\n if (padding.x !== undefined) {\n const v = toCss(padding.x);\n style.paddingLeft = v;\n style.paddingRight = v;\n }\n if (padding.y !== undefined) {\n const v = toCss(padding.y);\n style.paddingTop = v;\n style.paddingBottom = v;\n }\n return style;\n}\n\nfunction resolveRadius(radius: RadiusProp | undefined): CSSProperties | undefined {\n if (radius === undefined || radius === null) return undefined;\n if (typeof radius === 'number') return { borderRadius: `${radius}px` };\n if (radius === 'none') return { borderRadius: 0 };\n if (radius === 'full') return { borderRadius: '9999px' };\n if (radius in RADIUS_TOKEN_TO_CSS) {\n return {\n borderRadius:\n RADIUS_TOKEN_TO_CSS[radius as Exclude<RadiusToken, 'none' | 'full'>],\n };\n }\n return { borderRadius: radius };\n}\n\nfunction resolveBoxSize(overrides: BoxSizeOverrides): CSSProperties | undefined {\n const style: CSSProperties = {};\n let hasAny = false;\n // boxSize is the fallback for width AND height — explicit dims win.\n const effectiveWidth = overrides.width ?? overrides.boxSize;\n const effectiveHeight = overrides.height ?? overrides.boxSize;\n if (effectiveWidth !== undefined) {\n style.width = toCss(effectiveWidth);\n hasAny = true;\n }\n if (effectiveHeight !== undefined) {\n style.height = toCss(effectiveHeight);\n hasAny = true;\n }\n if (overrides.minWidth !== undefined) {\n style.minWidth = toCss(overrides.minWidth);\n hasAny = true;\n }\n if (overrides.minHeight !== undefined) {\n style.minHeight = toCss(overrides.minHeight);\n hasAny = true;\n }\n if (overrides.maxWidth !== undefined) {\n style.maxWidth = toCss(overrides.maxWidth);\n hasAny = true;\n }\n if (overrides.maxHeight !== undefined) {\n style.maxHeight = toCss(overrides.maxHeight);\n hasAny = true;\n }\n if (overrides.aspectRatio !== undefined) {\n style.aspectRatio = String(overrides.aspectRatio);\n hasAny = true;\n }\n return hasAny ? style : undefined;\n}\n\n/** Union type for size props that accept either a named preset, a raw value (applied as `boxSize`), or an explicit dim object. */\nexport type SizeUnion<P extends string> =\n | P\n | (string & {}) // keeps preset literals in autocomplete while accepting any CSS unit string\n | number\n | BoxSizeOverrides;\n\n/**\n * Parse a union-style size prop into (a) a preset name (if matched), or (b) a `BoxSizeOverrides` payload.\n *\n * Resolution order:\n * - `undefined` → `{}`\n * - object → `{ box: input }`\n * - preset string → `{ preset: input }`\n * - any other string → `{ box: { boxSize: input } }`\n * - number → `{ box: { boxSize: input } }`\n */\nfunction parseSizeUnion<P extends string>(\n input: SizeUnion<P> | undefined,\n presets: ReadonlySet<string>,\n): { preset?: P; box?: BoxSizeOverrides } {\n if (input === undefined) return {};\n if (typeof input === 'object' && input !== null) return { box: input };\n if (typeof input === 'string' && presets.has(input)) return { preset: input as P };\n if (typeof input === 'number' || typeof input === 'string') {\n return { box: { boxSize: input } };\n }\n return {};\n}\n\n// =============================================================================\n// Grouped namespace export\n// =============================================================================\n\nexport const CssExtensions = {\n toCss,\n resolvePadding,\n resolveRadius,\n resolveBoxSize,\n parseSizeUnion,\n PADDING_TOKEN_TO_CSS,\n RADIUS_TOKEN_TO_CSS,\n} as const;\n","import type { CSSProperties } from 'react';\n\n/* Tone vocabulary shared by tone-aware components (Button, Checkbox, ToggleButton, Tag, Alert, etc.). */\nexport type ColorTone = 'primary' | 'neutral' | 'danger' | 'success' | 'warning';\n\n/* Explicit color overrides for the active tone's slot set. Pair with a base `tone` prop on the component. */\nexport interface ColorOverride {\n /* Main background / fill color. Drives `bg-{tone}`, `hover:bg-{tone}/X`, `active:bg-{tone}/X`, `border-{tone}`, `ring-{tone}`. */\n bg?: string;\n\n /* Text/icon color on top of `bg`. Drives `text-{tone}-foreground`. */\n text?: string;\n\n /* Light tinted background for soft variants. Drives `bg-{tone}-soft`. */\n soft?: string;\n\n /* Text on top of `soft` background. Drives `text-{tone}-soft-foreground`. */\n softText?: string;\n\n /* Focus ring color override (else inherits the component's tone). */\n ring?: string;\n}\n\n/* Accepted shapes for the `color` prop: a single seed string (lib derives rest) OR an explicit slot override object. */\nexport type ColorProp = string | ColorOverride;\n\n/* Per-tone CSS variable name suffixes (after `--color-`). */\nconst TONE_TOKEN_MAP: Record<\n ColorTone,\n { main: string; fg: string; soft: string; softFg: string }\n> = {\n primary: { main: 'primary', fg: 'primary-foreground', soft: 'primary-soft', softFg: 'primary-soft-foreground' },\n neutral: { main: 'foreground', fg: 'background', soft: 'muted', softFg: 'foreground' },\n danger: { main: 'destructive', fg: 'destructive-foreground', soft: 'destructive-soft', softFg: 'destructive-soft-foreground' },\n success: { main: 'success', fg: 'success-foreground', soft: 'success-soft', softFg: 'success-soft-foreground' },\n warning: { main: 'warning', fg: 'warning-foreground', soft: 'warning-soft', softFg: 'warning-soft-foreground' },\n};\n\n/**\n * Convert a `color` / `colors` prop into a CSS-variable override style for\n * the active tone's slot set. Returned style overrides the component's theme\n * tokens locally — every Tailwind utility (`bg-{tone}`, `hover:bg-{tone}/X`,\n * `text-{tone}-foreground`, etc.) that references the var picks it up\n * automatically. No variant config refactor required.\n *\n * Single-seed mode (`input` is a string):\n * - `bg` ← seed\n * - `text` ← white (default contrast; override via `colors.text`)\n * - `soft` ← seed mixed 12% over white via `color-mix(in oklch, ...)`\n * - `softText` ← seed\n * - `ring` ← seed\n *\n * Object mode (`input` is a `ColorOverride`):\n * - Each slot independently overridable; unset slots retain the theme default.\n */\nfunction toneColorOverride(\n input: ColorProp | undefined,\n tone: ColorTone | undefined,\n): CSSProperties | undefined {\n if (input === undefined || input === null) return undefined;\n const activeTone = tone ?? 'primary';\n const tokens = TONE_TOKEN_MAP[activeTone];\n const out: Record<string, string> = {};\n\n if (typeof input === 'string') {\n out[`--color-${tokens.main}`] = input;\n out[`--color-${tokens.fg}`] = '#ffffff';\n out[`--color-${tokens.soft}`] = `color-mix(in oklch, ${input} 12%, white)`;\n out[`--color-${tokens.softFg}`] = input;\n out['--color-ring'] = input;\n } else {\n if (input.bg !== undefined) out[`--color-${tokens.main}`] = input.bg;\n if (input.text !== undefined) out[`--color-${tokens.fg}`] = input.text;\n if (input.soft !== undefined) out[`--color-${tokens.soft}`] = input.soft;\n if (input.softText !== undefined) out[`--color-${tokens.softFg}`] = input.softText;\n if (input.ring !== undefined) out['--color-ring'] = input.ring;\n }\n\n return Object.keys(out).length > 0 ? (out as CSSProperties) : undefined;\n}\n\n// =============================================================================\n// Grouped namespace export\n// =============================================================================\n\nexport const ColorExtensions = {\n toneColorOverride,\n TONE_TOKEN_MAP,\n} as const;\n","/** Optional value extensions — call as `OptionalExtensions.x(...)`. */\n\n/**\n * Construct an optional from a `(condition, value)` pair: returns `value` when\n * `condition` is truthy, otherwise `undefined`. Use to keep DOM attributes\n * absent when their default/false meaning is what we want (e.g. `aria-busy`,\n * `tabIndex`, `disabled`).\n */\nfunction from<T>(condition: unknown, value: T): T | undefined {\n return condition ? value : undefined;\n}\n\nexport const OptionalExtensions = {\n from,\n} as const;\n","import type { KeyboardEvent, PointerEvent } from 'react';\n\n/** Press-interaction extensions — types + constants shared by interactive components. */\n\n/** Unified press event — pointer OR keyboard activation on any HTML element. */\nexport type PressEvent<T extends HTMLElement = HTMLElement> =\n | PointerEvent<T>\n | KeyboardEvent<T>;\n\nexport const PressExtensions = {\n /**\n * Bounds for `longPressDelay` props. Below `min`: overlaps with normal\n * click latency, too easy to trigger accidentally. Above `max`: clearly a\n * developer error (5-min hold). `default` is the conventional 500ms.\n */\n longPressDelay: {\n min: 200,\n max: 300_000,\n default: 500,\n },\n} as const;\n","/* HTML attribute & element value enums (const + type pairs). */\n\n/* HTML element tag names — for JSX intrinsics and polymorphic `Comp` variables. */\nexport const HtmlElement = {\n Button: 'button',\n Anchor: 'a',\n Span: 'span',\n Div: 'div',\n} as const;\nexport type HtmlElement = (typeof HtmlElement)[keyof typeof HtmlElement];\n\n/* HTML `<button type=\"\">` attribute. */\nexport const ButtonType = {\n Button: 'button',\n Submit: 'submit',\n Reset: 'reset',\n} as const;\nexport type ButtonType = (typeof ButtonType)[keyof typeof ButtonType];\n","/* Keyboard key values from `KeyboardEvent.key`. Add new entries as components need them. */\nexport const Key = {\n Space: ' ',\n Enter: 'Enter',\n Escape: 'Escape',\n Tab: 'Tab',\n Backspace: 'Backspace',\n Delete: 'Delete',\n Home: 'Home',\n End: 'End',\n PageUp: 'PageUp',\n PageDown: 'PageDown',\n ArrowUp: 'ArrowUp',\n ArrowDown: 'ArrowDown',\n ArrowLeft: 'ArrowLeft',\n ArrowRight: 'ArrowRight',\n} as const;\nexport type Key = (typeof Key)[keyof typeof Key];\n","/* Build-environment value set + derived flags. Follows the library's const-object\n enum pattern (cf. HtmlElement, ButtonType, Key) — not a domain enum. */\n\nexport const Environment = {\n Development: 'development',\n Production: 'production',\n Test: 'test',\n} as const;\nexport type Environment = (typeof Environment)[keyof typeof Environment];\n\n/* Gate dev-only warnings/affordances on these. The literal `'production'` is kept\n inline so the consumer's bundler folds it and dev branches dead-code-eliminate. */\nexport const IS_DEV = process.env.NODE_ENV !== 'production';\nexport const IS_PRODUCTION = !IS_DEV;\n","/* Transition / animation utility extensions — duration normalization, defaults. Call as `TransitionExtensions.x(...)`. */\n\n// =============================================================================\n// Types — presence-style asymmetric durations (enter/exit). Not every animation\n// has an enter/exit phase (loops, one-shots, springs); this shape applies\n// specifically to mount/unmount or appear/disappear transitions.\n// =============================================================================\n\n/** Input prop — symmetric number OR asymmetric `{ enter, exit }`. */\nexport type PresenceAnimationDurationProp =\n | number\n | { enter?: number; exit?: number };\n\n/** Resolved (canonical) — both sides always present. */\nexport interface PresenceAnimationDuration {\n enter: number;\n exit: number;\n}\n\n// =============================================================================\n// Defaults\n// =============================================================================\n\nconst DEFAULT_DURATION_MS = 200;\n\n// =============================================================================\n// Internal resolvers\n// =============================================================================\n\nfunction resolveDuration(\n d: PresenceAnimationDurationProp | undefined,\n): PresenceAnimationDuration {\n if (typeof d === 'number') return { enter: d, exit: d };\n if (d && typeof d === 'object') {\n return {\n enter: d.enter ?? DEFAULT_DURATION_MS,\n exit: d.exit ?? DEFAULT_DURATION_MS,\n };\n }\n return { enter: DEFAULT_DURATION_MS, exit: DEFAULT_DURATION_MS };\n}\n\n// =============================================================================\n// Grouped namespace export\n// =============================================================================\n\nexport const TransitionExtensions = {\n resolveDuration,\n duration: { default: DEFAULT_DURATION_MS },\n} as const;\n","import type { Tone } from './StyleTokens';\n\n/* Contains the (variant-family × tone) → Tailwind class lookup shared between\n `surfaceVariants` and `buttonVariants` (and any future variant config). */\n\n/** Represents a tone-family — the variant group that picks the same bg/border/text palette. */\nexport type ToneFamily =\n | 'solid'\n | 'soft'\n | 'surface'\n | 'outline'\n | 'glass'\n | 'glassOutline'\n | 'subtle';\n\n/** Contains the cross-engine palette: bg / text (+ border where applicable) per tone-family × tone. */\nexport const Tones: Record<ToneFamily, Record<Tone, string>> = {\n /** Opaque tone bg + foreground. Used by `solid`, `elevated`, `flat`, button defaults. */\n solid: {\n neutral: 'bg-popover text-popover-foreground',\n primary: 'bg-primary text-primary-foreground',\n danger: 'bg-destructive text-destructive-foreground',\n success: 'bg-success text-success-foreground',\n warning: 'bg-warning text-warning-foreground',\n info: 'bg-info text-info-foreground',\n },\n /** Muted/tinted bg + tone-readable foreground. */\n soft: {\n neutral: 'bg-muted text-foreground',\n primary: 'bg-primary-soft text-primary',\n danger: 'bg-destructive-soft text-destructive',\n success: 'bg-success-soft text-success',\n warning: 'bg-warning-soft text-warning',\n info: 'bg-info-soft text-info',\n },\n /** Popover bg + tone-accent border. The \"default\" subtle look. */\n surface: {\n neutral: 'border-border bg-popover text-popover-foreground',\n primary: 'border-primary/40 bg-popover text-popover-foreground',\n danger: 'border-destructive/40 bg-popover text-popover-foreground',\n success: 'border-success/40 bg-popover text-popover-foreground',\n warning: 'border-warning/40 bg-popover text-popover-foreground',\n info: 'border-info/40 bg-popover text-popover-foreground',\n },\n /** Transparent bg, tone border + tone text. */\n outline: {\n neutral: 'border-border text-foreground',\n primary: 'border-primary text-primary',\n danger: 'border-destructive text-destructive',\n success: 'border-success text-success',\n warning: 'border-warning text-warning',\n info: 'border-info text-info',\n },\n /** Translucent tone bg + blur — used by `glass`. */\n glass: {\n neutral: 'bg-popover/70 text-popover-foreground',\n primary: 'bg-primary/30 text-primary-foreground',\n danger: 'bg-destructive/30 text-destructive-foreground',\n success: 'bg-success/30 text-success-foreground',\n warning: 'bg-warning/30 text-warning-foreground',\n info: 'bg-info/30 text-info-foreground',\n },\n /** Glass + tone-accent border at 50% alpha. */\n glassOutline: {\n neutral: 'border-border/50 bg-popover/70 text-popover-foreground',\n primary: 'border-primary/50 bg-primary/30 text-primary-foreground',\n danger: 'border-destructive/50 bg-destructive/30 text-destructive-foreground',\n success: 'border-success/50 bg-success/30 text-success-foreground',\n warning: 'border-warning/50 bg-warning/30 text-warning-foreground',\n info: 'border-info/50 bg-info/30 text-info-foreground',\n },\n /**\n * Low-alpha tinted fill + neutral `border-border`, no shadow. The understated\n * \"tinted panel / section band\" look — quieter than `soft`, flatter than `surface`.\n * Neutral fills from the muted token; coloured tones tint their `-soft` token at low alpha.\n */\n subtle: {\n neutral: 'border-border bg-muted/30 text-foreground',\n primary: 'border-primary/20 bg-primary-soft/60 text-foreground',\n danger: 'border-destructive/20 bg-destructive-soft/60 text-foreground',\n success: 'border-success/20 bg-success-soft/60 text-foreground',\n warning: 'border-warning/20 bg-warning-soft/60 text-foreground',\n info: 'border-info/20 bg-info-soft/60 text-foreground',\n },\n};\n","/* Provides the cross-domain surface style engine — variant × tone × radius × padding × elevation. */\n\nimport { tv, type VariantProps } from './tv';\nimport { Tones } from './Tones';\n\n/** Provides the tailwind-variants config for every \"block with a visual treatment\" surface. */\nexport const surfaceVariants = tv({\n base: 'outline-none transition-colors',\n variants: {\n variant: {\n /* Opaque fill, no border, light shadow — tooltips, chips, inline pills. */\n solid: 'shadow-sm',\n /* Muted/tinted fill, no border, light shadow — chat bubbles, inline groups. */\n soft: 'shadow-sm',\n /* Opaque fill + visible border + medium shadow — default for popovers/menus. */\n surface: 'border shadow-md',\n /* Transparent fill + visible border — static cards, embedded info blocks. */\n outline: 'border bg-transparent',\n /* Translucent + blur, no border, medium shadow — image overlays. */\n glass: 'backdrop-blur-md shadow-md',\n /* Translucent + blur + subtle border — premium / hero overlays. */\n 'glass-outline': 'border backdrop-blur-md shadow-md',\n /* Opaque fill, no border, heavy shadow — modals, drawers, command palette. */\n elevated: 'shadow-xl',\n /* Opaque fill, no border, no shadow — embedded sub-panels inside another surface. */\n flat: '',\n /* Low-alpha tinted fill + neutral border, no shadow — section bands, tinted panels. */\n subtle: 'border',\n },\n\n tone: { neutral: '', primary: '', danger: '', success: '', warning: '', info: '' },\n\n radius: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n full: 'rounded-full',\n },\n\n padding: {\n none: 'p-0',\n xs: 'p-1',\n sm: 'p-2',\n md: 'p-3',\n lg: 'p-4',\n xl: 'p-6',\n '2xl': 'p-8',\n },\n\n /* Optional shadow override — beats variant's default shadow via tailwind-merge precedence. */\n elevation: {\n 0: 'shadow-none',\n 1: 'shadow-sm',\n 2: 'shadow-md',\n 3: 'shadow-lg',\n 4: 'shadow-xl',\n 5: 'shadow-2xl',\n },\n },\n\n compoundVariants: [\n /* solid / elevated / flat share the same palette — opaque tone bg + tone foreground. */\n { variant: ['solid', 'elevated', 'flat'], tone: 'neutral', class: Tones.solid.neutral },\n { variant: ['solid', 'elevated', 'flat'], tone: 'primary', class: Tones.solid.primary },\n { variant: ['solid', 'elevated', 'flat'], tone: 'danger', class: Tones.solid.danger },\n { variant: ['solid', 'elevated', 'flat'], tone: 'success', class: Tones.solid.success },\n { variant: ['solid', 'elevated', 'flat'], tone: 'warning', class: Tones.solid.warning },\n { variant: ['solid', 'elevated', 'flat'], tone: 'info', class: Tones.solid.info },\n\n /* soft — muted/tinted bg, tone-readable text. */\n { variant: 'soft', tone: 'neutral', class: Tones.soft.neutral },\n { variant: 'soft', tone: 'primary', class: Tones.soft.primary },\n { variant: 'soft', tone: 'danger', class: Tones.soft.danger },\n { variant: 'soft', tone: 'success', class: Tones.soft.success },\n { variant: 'soft', tone: 'warning', class: Tones.soft.warning },\n { variant: 'soft', tone: 'info', class: Tones.soft.info },\n\n /* surface — popover bg + tone-accent border. */\n { variant: 'surface', tone: 'neutral', class: Tones.surface.neutral },\n { variant: 'surface', tone: 'primary', class: Tones.surface.primary },\n { variant: 'surface', tone: 'danger', class: Tones.surface.danger },\n { variant: 'surface', tone: 'success', class: Tones.surface.success },\n { variant: 'surface', tone: 'warning', class: Tones.surface.warning },\n { variant: 'surface', tone: 'info', class: Tones.surface.info },\n\n /* outline — transparent fill, tone border + tone text. */\n { variant: 'outline', tone: 'neutral', class: Tones.outline.neutral },\n { variant: 'outline', tone: 'primary', class: Tones.outline.primary },\n { variant: 'outline', tone: 'danger', class: Tones.outline.danger },\n { variant: 'outline', tone: 'success', class: Tones.outline.success },\n { variant: 'outline', tone: 'warning', class: Tones.outline.warning },\n { variant: 'outline', tone: 'info', class: Tones.outline.info },\n\n /* glass — translucent tinted fill + blur. */\n { variant: 'glass', tone: 'neutral', class: Tones.glass.neutral },\n { variant: 'glass', tone: 'primary', class: Tones.glass.primary },\n { variant: 'glass', tone: 'danger', class: Tones.glass.danger },\n { variant: 'glass', tone: 'success', class: Tones.glass.success },\n { variant: 'glass', tone: 'warning', class: Tones.glass.warning },\n { variant: 'glass', tone: 'info', class: Tones.glass.info },\n\n /* glass-outline — glass + tone border at 50% alpha. */\n { variant: 'glass-outline', tone: 'neutral', class: Tones.glassOutline.neutral },\n { variant: 'glass-outline', tone: 'primary', class: Tones.glassOutline.primary },\n { variant: 'glass-outline', tone: 'danger', class: Tones.glassOutline.danger },\n { variant: 'glass-outline', tone: 'success', class: Tones.glassOutline.success },\n { variant: 'glass-outline', tone: 'warning', class: Tones.glassOutline.warning },\n { variant: 'glass-outline', tone: 'info', class: Tones.glassOutline.info },\n\n /* subtle — low-alpha tinted fill + neutral border, no shadow. */\n { variant: 'subtle', tone: 'neutral', class: Tones.subtle.neutral },\n { variant: 'subtle', tone: 'primary', class: Tones.subtle.primary },\n { variant: 'subtle', tone: 'danger', class: Tones.subtle.danger },\n { variant: 'subtle', tone: 'success', class: Tones.subtle.success },\n { variant: 'subtle', tone: 'warning', class: Tones.subtle.warning },\n { variant: 'subtle', tone: 'info', class: Tones.subtle.info },\n ],\n\n defaultVariants: {\n variant: 'surface',\n tone: 'neutral',\n radius: 'md',\n padding: 'none',\n },\n});\n\n/** Represents the union of every surface variant prop. */\nexport type SurfaceVariants = VariantProps<typeof surfaceVariants>;\n\n/** Represents the visual-recipe axis (solid · soft · surface · outline · glass · etc.). */\nexport type SurfaceVariant = NonNullable<SurfaceVariants['variant']>;\n\n/** Represents the semantic colour axis (neutral · primary · danger · success · warning · info). */\nexport type SurfaceTone = NonNullable<SurfaceVariants['tone']>;\n\n/** Represents the corner-roundness axis (none · sm · md · lg · xl · 2xl · full). */\nexport type SurfaceRadius = NonNullable<SurfaceVariants['radius']>;\n\n/** Represents the interior-padding axis (none · xs · sm · md · lg · xl · 2xl). */\nexport type SurfacePadding = NonNullable<SurfaceVariants['padding']>;\n\n/** Represents the shadow-depth override (0–5); omitted means the variant decides. */\nexport type SurfaceElevation = NonNullable<SurfaceVariants['elevation']>;\n","/* Provides semantic z-index tiers — the single source of truth for stacking order. */\n\n/** Contains the semantic z-index tiers; matching `z-{name}` utilities ship via @theme. */\nexport const Layer = {\n /** Slips under the base layer; visually hidden. */\n Hide: -1,\n /** Sits in the default DOM flow with no z-index applied. */\n Base: 0,\n /** Slightly elevates over siblings — badges, sticky list items, in-grid overlays. */\n Raised: 10,\n /** Pins widgets inside a section — panels, inline overlays. */\n Docked: 20,\n /** Anchors a page-level sticky header or footer. */\n Sticky: 30,\n /** Hosts system banners — cookie notice, status banner, persistent FAB. */\n Banner: 40,\n /** Hosts dropdowns, popovers, comboboxes, menus, hover-cards anchored to a trigger. */\n Dropdown: 50,\n /** Dims the page behind a modal — backdrop / scrim layer. */\n Overlay: 60,\n /** Hosts modal / dialog / drawer / sheet content above its backdrop. */\n Modal: 70,\n /** Hosts popovers / menus opened FROM inside a modal — must beat Modal. */\n Popover: 80,\n /** Hosts toasts, snackbars, undo bars — survives above modals. */\n Toast: 90,\n /** Hosts tooltips and live-cursors — highest functional layer. */\n Tooltip: 100,\n /** Hosts DevTools / design-system inspector overlays — always wins. */\n Debug: 9999,\n} as const;\n\n/** Represents the name of a semantic z-index tier. */\nexport type LayerName = keyof typeof Layer;\n\n/** Provides an inline `style` object for programmatic z-index assignment. */\nexport function layerStyle(layer: LayerName): { zIndex: number } {\n return { zIndex: Layer[layer] };\n}\n","/* Provides reusable equality comparers for selection components and diff checks. */\n\n/** Represents a function that decides whether two values are equal. */\nexport type EqualityComparer<T> = (a: T, b: T) => boolean;\n\n/** Contains the standard equality comparers. */\nexport const Equality = {\n /** Checks NaN-safe strict equality (Object.is) — fits primitives + reference equality for objects. */\n strictEquals: <T>(a: T, b: T): boolean => Object.is(a, b),\n\n /** Checks plain `===` equality (NaN !== NaN). */\n referenceEquals: <T>(a: T, b: T): boolean => a === b,\n\n /** Provides a comparer that compares two objects by an extracted scalar key. */\n byKey:\n <T, K = unknown>(extract: (item: T) => K): EqualityComparer<T> =>\n (a, b) =>\n Object.is(extract(a), extract(b)),\n\n /** Checks shallow object equality — equal iff every key has identical (Object.is) value. */\n shallowEquals: <T extends Record<string, unknown>>(a: T, b: T): boolean => {\n if (Object.is(a, b)) return true;\n if (a == null || b == null) return false;\n const ak = Object.keys(a);\n const bk = Object.keys(b);\n if (ak.length !== bk.length) return false;\n return ak.every((k) => Object.prototype.hasOwnProperty.call(b, k) && Object.is(a[k], b[k]));\n },\n} as const;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/primitives/index.ts","../src/primitives/slot/Slot.tsx","../src/primitives/portal/Portal.tsx","../src/primitives/visuallyHidden/VisuallyHidden.tsx","../src/primitives/presence/Presence.tsx","../src/primitives/directionProvider/DirectionProvider.tsx","../src/primitives/accessibleIcon/AccessibleIcon.tsx","../src/primitives/focusScope/FocusScope.tsx","../src/primitives/dismissableLayer/DismissableLayer.tsx","../src/primitives/anchoredPositioner/AnchoredPositioner.tsx","../src/primitives/rovingFocusGroup/RovingFocusGroup.tsx","../src/primitives/collection/Collection.tsx","../src/primitives/formControlContext/FormControlContext.tsx","../src/primitives/scrollLockProvider/ScrollLockProvider.tsx","../src/primitives/overlayArrow/OverlayArrow.tsx","../src/primitives/announce/Announce.tsx"],"names":["forwardRef","jsx","useState","isValidElement","useEffect","cloneElement","RadixFocusScope","useRef","offset","offsetMiddleware","sizeMiddleware","createContext","RovingFocusGroup","useContext","useId","useCallback","useMemo","Fragment","OverlayArrow"],"mappings":";;;;;;;;;;AAAA,IAAA,kBAAA,GAAA;AAAA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EAAoB,MAAA;AAAA,QACpB,aAAA,EAAY,MAAA;AAAA,QACX,GAAG,IAAA;AAAA,QAEJ,QAAA,kBAAAA,GAAAA,CAAC,SAAA,EAAA,EAAQ,MAAA,EAAQ,CAAA,IAAA,EAAO,KAAK,CAAA,GAAA,EAAM,KAAA,GAAQ,CAAC,CAAA,CAAA,EAAI,MAAM,CAAA,CAAA,EAAI,IAAA,EAAY;AAAA;AAAA,KACxE;AAAA,EAEJ;AACF;ACrBO,IAAM,QAAA,GAAWD,UAAAA;AAAA,EACtB,CAAC,EAAE,UAAA,GAAa,QAAA,EAAU,SAAA,EAAW,UAAU,GAAG,IAAA,EAAK,EAAG,GAAA,qBACxDC,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,IAAA,EAAM,UAAA,KAAe,WAAA,GAAc,OAAA,GAAU,QAAA;AAAA,MAC7C,WAAA,EAAW,UAAA;AAAA,MACX,aAAA,EAAY,MAAA;AAAA,MACZ,SAAA,EAAW,EAAA;AAAA,QACT,mEAAA;AAAA,QACA,sDAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,IAAA;AAAA,MAEH;AAAA;AAAA;AAGP;AACA,QAAA,CAAS,WAAA,GAAc,UAAA","file":"chunk-TTSJZEL7.js","sourcesContent":["// L2 — headless primitives. Behavior + a11y, no visual styling beyond layout.\n// Foundation layer; cannot import upward (enforced by ESLint boundaries).\n\nexport * from './slot';\nexport * from './portal';\nexport * from './visuallyHidden';\nexport * from './presence';\nexport * from './directionProvider';\nexport * from './accessibleIcon';\nexport * from './focusScope';\nexport * from './dismissableLayer';\nexport * from './anchoredPositioner';\nexport * from './rovingFocusGroup';\nexport * from './collection';\nexport * from './formControlContext';\nexport * from './scrollLockProvider';\nexport * from './overlayArrow';\nexport * from './announce';\n","import {\n Children,\n cloneElement,\n forwardRef,\n isValidElement,\n type CSSProperties,\n type HTMLAttributes,\n type ReactElement,\n type Ref,\n} from 'react';\nimport { useComposedRefs } from '../../utils/composeRefs';\n\nexport interface SlotProps extends HTMLAttributes<HTMLElement> {\n children?: React.ReactNode;\n}\n\ntype AnyProps = Record<string, unknown>;\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps): AnyProps {\n const merged: AnyProps = { ...childProps };\n for (const key of Object.keys(slotProps)) {\n const slotVal = slotProps[key];\n const childVal = childProps[key];\n if (key === 'className') {\n merged.className = [slotVal, childVal].filter(Boolean).join(' ');\n } else if (key === 'style') {\n merged.style = { ...(slotVal as CSSProperties), ...(childVal as CSSProperties) };\n } else if (/^on[A-Z]/.test(key)) {\n const slotFn = slotVal as ((...args: unknown[]) => void) | undefined;\n const childFn = childVal as ((...args: unknown[]) => void) | undefined;\n if (slotFn && childFn) {\n merged[key] = (...args: unknown[]) => {\n childFn(...args);\n slotFn(...args);\n };\n } else if (slotFn) {\n merged[key] = slotFn;\n }\n } else if (childVal === undefined) {\n merged[key] = slotVal;\n }\n }\n return merged;\n}\n\n/**\n * Polymorphic slot — renders the single child element with the parent's props\n * merged in (className concatenated, handlers chained, refs composed).\n *\n * Use to enable an `asChild` API on a component:\n * ```tsx\n * <Button asChild><a href=\"/x\">Open</a></Button>\n * ```\n */\nexport const Slot = forwardRef<HTMLElement, SlotProps>(\n ({ children, ...slotProps }, forwardedRef) => {\n const child = isValidElement(children)\n ? (children as ReactElement<AnyProps> & { ref?: Ref<HTMLElement> })\n : null;\n const composedRef = useComposedRefs(forwardedRef, child?.ref);\n if (!child) {\n return Children.count(children) > 1 ? Children.only(null) : null;\n }\n const merged = mergeProps(slotProps as AnyProps, (child.props ?? {}) as AnyProps);\n return cloneElement(child, {\n ...merged,\n ref: composedRef,\n });\n },\n);\nSlot.displayName = 'Slot';\n","import { useEffect, useState, type ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\n\nexport interface PortalProps {\n children: ReactNode;\n /** Container to render into. Default: `document.body`. */\n container?: HTMLElement | null;\n /** Optional named layer — sets `data-portal-name` on the wrapper. */\n name?: string;\n}\n\n/**\n * Render children into a different DOM node (default `document.body`).\n * SSR-inert — renders nothing on the server, portals in after mount on the client.\n */\nexport function Portal({ children, container, name }: PortalProps): ReactNode {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) return null;\n const target = container ?? document.body;\n return createPortal(<div data-portal-name={name}>{children}</div>, target);\n}\n","import { forwardRef, type HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type VisuallyHiddenProps = HTMLAttributes<HTMLSpanElement>;\n\n/**\n * Visually hidden span — content removed from the visual layout but still\n * announced to screen readers. Use for accessible labels on icon-only\n * affordances and live-region announcements.\n */\nexport const VisuallyHidden = forwardRef<HTMLSpanElement, VisuallyHiddenProps>(\n ({ className, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(\n 'absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0',\n 'm-[-1px] [clip:rect(0_0_0_0)] [clip-path:inset(50%)]',\n className,\n )}\n {...props}\n />\n ),\n);\nVisuallyHidden.displayName = 'VisuallyHidden';\n","import {\n cloneElement,\n isValidElement,\n useEffect,\n useRef,\n useState,\n type ReactElement,\n type Ref,\n} from 'react';\nimport { useComposedRefs } from '../../utils/composeRefs';\n\nexport interface PresenceProps {\n /** Whether the content should be present. Toggle false to trigger exit. */\n isPresent: boolean;\n /** Single React element child — receives `ref` and `data-state` (\"open\" | \"closed\"). */\n children: ReactElement;\n}\n\nfunction parseTimes(value: string): number[] {\n return value.split(',').map((part) => {\n const trimmed = part.trim();\n const ms = trimmed.endsWith('ms') ? parseFloat(trimmed) : parseFloat(trimmed) * 1000;\n return Number.isFinite(ms) ? ms : 0;\n });\n}\n\n/** Longest computed transition/animation (duration + delay) in ms. */\nfunction getTotalDurationMs(node: HTMLElement): number {\n const cs = getComputedStyle(node);\n const maxOf = (durations: number[], delays: number[]) =>\n durations.reduce(\n (max, duration, i) => Math.max(max, duration + (delays[i % delays.length] ?? 0)),\n 0,\n );\n return Math.max(\n maxOf(parseTimes(cs.transitionDuration), parseTimes(cs.transitionDelay)),\n maxOf(parseTimes(cs.animationDuration), parseTimes(cs.animationDelay)),\n );\n}\n\n/**\n * Defer unmount until the child's exit animation/transition finishes.\n * Pass `isPresent={false}` to start the exit; the child stays mounted with\n * `data-state=\"closed\"` until its own `animationend`/`transitionend` fires\n * (or a computed-duration timeout as a fallback). If no exit animation\n * actually starts, the child unmounts immediately. On enter, the child\n * mounts with `data-state=\"closed\"` and flips to `\"open\"` on the next\n * frame so enter transitions play.\n */\nexport function Presence({ isPresent, children }: PresenceProps): ReactElement | null {\n const [rendered, setRendered] = useState(isPresent);\n const [dataState, setDataState] = useState<'open' | 'closed'>('closed');\n const ref = useRef<HTMLElement | null>(null);\n\n const child = isValidElement(children)\n ? (children as ReactElement<{ ref?: Ref<HTMLElement> }> & { ref?: Ref<HTMLElement> })\n : null;\n const composedRef = useComposedRefs(ref, child?.ref);\n\n // Enter — mount closed, then flip to open on the next frame (double rAF\n // so the closed styles are committed and painted first) to run transitions.\n useEffect(() => {\n if (!isPresent) return;\n if (!rendered) {\n setRendered(true);\n return;\n }\n if (dataState === 'open') return;\n let raf2 = 0;\n const raf1 = requestAnimationFrame(() => {\n raf2 = requestAnimationFrame(() => setDataState('open'));\n });\n return () => {\n cancelAnimationFrame(raf1);\n cancelAnimationFrame(raf2);\n };\n }, [isPresent, rendered, dataState]);\n\n // Exit — flip to closed, then unmount when the child's own exit\n // animation/transition ends; immediately if none starts within a frame\n // window; or after the computed total duration as a safety net.\n useEffect(() => {\n if (isPresent) return;\n const node = ref.current;\n if (!node) {\n setRendered(false);\n return;\n }\n let started = false;\n let timer: number | undefined;\n let raf2 = 0;\n const onStart = (event: Event) => {\n if (event.target === node) started = true;\n };\n const onEnd = (event: Event) => {\n if (event.target === node) setRendered(false);\n };\n node.addEventListener('animationstart', onStart);\n node.addEventListener('transitionrun', onStart);\n node.addEventListener('animationend', onEnd);\n node.addEventListener('transitionend', onEnd);\n // Flip the DOM synchronously so the start-detection window below is\n // deterministic; React re-renders to the same value via setDataState.\n node.setAttribute('data-state', 'closed');\n setDataState('closed');\n const raf1 = requestAnimationFrame(() => {\n raf2 = requestAnimationFrame(() => {\n const animating = started || (node.getAnimations?.().length ?? 0) > 0;\n if (!animating) {\n setRendered(false);\n return;\n }\n timer = window.setTimeout(() => setRendered(false), getTotalDurationMs(node) + 100);\n });\n });\n return () => {\n node.removeEventListener('animationstart', onStart);\n node.removeEventListener('transitionrun', onStart);\n node.removeEventListener('animationend', onEnd);\n node.removeEventListener('transitionend', onEnd);\n cancelAnimationFrame(raf1);\n cancelAnimationFrame(raf2);\n if (timer !== undefined) window.clearTimeout(timer);\n };\n }, [isPresent]);\n\n if (!rendered || !child) return null;\n return cloneElement(child, {\n ref: composedRef,\n 'data-state': dataState,\n } as Partial<typeof child.props>);\n}\n","import { createContext, useContext, type ReactNode } from 'react';\n\nexport type Direction = 'ltr' | 'rtl';\n\nconst DirectionContext = createContext<Direction>('ltr');\n\nexport interface DirectionProviderProps {\n dir: Direction;\n children: ReactNode;\n}\n\n/**\n * Provide reading direction to descendants. Components that mirror in RTL\n * (Tabs arrow keys, Slider, Carousel, etc.) read this via `useDirection()`.\n */\nexport function DirectionProvider({ dir, children }: DirectionProviderProps) {\n return <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>;\n}\n\nexport function useDirection(): Direction {\n return useContext(DirectionContext);\n}\n","import { cloneElement, isValidElement, type ReactElement } from 'react';\nimport { VisuallyHidden } from '../visuallyHidden/VisuallyHidden';\n\nexport interface AccessibleIconProps {\n /** Required accessible label for the icon. */\n label: string;\n /** Single icon element — will receive `aria-hidden` so SR reads only the label. */\n children: ReactElement;\n}\n\n/**\n * Wrap an icon-only element with an accessible label. The icon is hidden\n * from assistive tech and a `VisuallyHidden` sibling provides the label.\n */\nexport function AccessibleIcon({ label, children }: AccessibleIconProps) {\n const icon = isValidElement(children)\n ? cloneElement(children as ReactElement<{ 'aria-hidden'?: boolean | string; focusable?: string }>, {\n 'aria-hidden': 'true',\n focusable: 'false',\n })\n : children;\n return (\n <>\n {icon}\n <VisuallyHidden>{label}</VisuallyHidden>\n </>\n );\n}\n","import { FocusScope as RadixFocusScope } from '@radix-ui/react-focus-scope';\n\nexport type FocusScopeProps = React.ComponentProps<typeof RadixFocusScope>;\n\n/**\n * Trap focus within children. On unmount, returns focus to the previously\n * focused element. Pass `loop` to wrap Tab navigation; `trapped` to enable\n * the trap (default true while mounted).\n *\n * Wraps `@radix-ui/react-focus-scope` — battle-tested implementation.\n */\nexport const FocusScope = RadixFocusScope;\n","import {\n forwardRef,\n useEffect,\n useRef,\n type HTMLAttributes,\n} from 'react';\nimport { useComposedRefs } from '../../utils/composeRefs';\n\ninterface LayerEntry {\n node: HTMLElement;\n onEscape?: (event: KeyboardEvent) => void;\n onOutsidePointerDown?: (event: PointerEvent) => void;\n}\n\nconst layerStack: LayerEntry[] = [];\n\nexport interface DismissableLayerProps extends HTMLAttributes<HTMLDivElement> {\n /** Called when Escape is pressed and this is the topmost layer. */\n onEscape?: (event: KeyboardEvent) => void;\n /** Called when a pointerdown lands outside this layer's DOM and this is topmost. */\n onOutsidePointerDown?: (event: PointerEvent) => void;\n /** Disable the Escape listener for this layer. */\n isEscapeDisabled?: boolean;\n /** Disable the outside-pointer-down listener for this layer. */\n isOutsideClickDisabled?: boolean;\n}\n\n/**\n * Stack-aware dismissal layer. Multiple layers may stack (modal > popover);\n * only the topmost reacts to Escape / outside click. Used as the base of\n * Modal, Drawer, Popover, Menu, HoverCard, ContextMenu.\n */\nexport const DismissableLayer = forwardRef<HTMLDivElement, DismissableLayerProps>(\n (\n { onEscape, onOutsidePointerDown, isEscapeDisabled, isOutsideClickDisabled, ...props },\n forwardedRef,\n ) => {\n const ref = useRef<HTMLDivElement | null>(null);\n\n // Keep callbacks in refs so registration runs once on mount; re-registering\n // on identity change would reorder the stack and corrupt dismissal ordering.\n const onEscapeRef = useRef(onEscape);\n const onOutsidePointerDownRef = useRef(onOutsidePointerDown);\n useEffect(() => {\n onEscapeRef.current = onEscape;\n onOutsidePointerDownRef.current = onOutsidePointerDown;\n });\n\n useEffect(() => {\n const node = ref.current;\n if (!node) return;\n const entry: LayerEntry = {\n node,\n onEscape: (event) => onEscapeRef.current?.(event),\n onOutsidePointerDown: (event) => onOutsidePointerDownRef.current?.(event),\n };\n layerStack.push(entry);\n return () => {\n const idx = layerStack.indexOf(entry);\n if (idx >= 0) layerStack.splice(idx, 1);\n };\n }, []);\n\n useEffect(() => {\n if (isEscapeDisabled) return;\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key !== 'Escape') return;\n const top = layerStack[layerStack.length - 1];\n if (top && top.node === ref.current) top.onEscape?.(e);\n };\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [isEscapeDisabled]);\n\n useEffect(() => {\n if (isOutsideClickDisabled) return;\n const onPointer = (e: PointerEvent) => {\n const top = layerStack[layerStack.length - 1];\n if (!top || top.node !== ref.current) return;\n const target = e.target as Node | null;\n if (!target || ref.current?.contains(target)) return;\n top.onOutsidePointerDown?.(e);\n };\n document.addEventListener('pointerdown', onPointer, true);\n return () => document.removeEventListener('pointerdown', onPointer, true);\n }, [isOutsideClickDisabled]);\n\n const composedRef = useComposedRefs(forwardedRef, ref);\n return <div ref={composedRef} {...props} />;\n },\n);\nDismissableLayer.displayName = 'DismissableLayer';\n","import {\n autoUpdate,\n flip,\n offset as offsetMiddleware,\n shift,\n size as sizeMiddleware,\n useFloating,\n type Placement,\n} from '@floating-ui/react';\nimport { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\nimport { composeRefs } from '../../utils/composeRefs';\n\nexport interface AnchoredPositionerProps extends HTMLAttributes<HTMLDivElement> {\n /** The element the floating layer should be anchored to. */\n anchor: HTMLElement | null;\n /** Floating UI placement. Default `bottom`. */\n placement?: Placement;\n /** Distance between anchor and floating element in px. Default 8. */\n offset?: number;\n /** Render the floating element only when open. */\n isOpen?: boolean;\n children: ReactNode;\n}\n\n/**\n * Position children relative to an anchor element using Floating UI.\n * Auto-flips and shifts to stay in viewport. Use as the positioning surface\n * for Tooltip, Popover, Menu, HoverCard.\n *\n * Exposes the anchor's measured size as CSS variables on the floating\n * element, enabling consumers to size content relative to the trigger:\n *\n * style=\"--anchor-width: 240px; --anchor-height: 36px;\"\n *\n * Common pattern: `min-w-[var(--anchor-width)]` on a Select dropdown so\n * the panel never narrows below the trigger.\n */\nexport const AnchoredPositioner = forwardRef<HTMLDivElement, AnchoredPositionerProps>(\n (\n { anchor, placement = 'bottom', offset = 8, isOpen = true, children, style, ...props },\n forwardedRef,\n ) => {\n const { refs, floatingStyles } = useFloating({\n open: isOpen,\n placement,\n middleware: [\n offsetMiddleware(offset),\n flip(),\n shift({ padding: 8 }),\n sizeMiddleware({\n apply({ rects, elements }) {\n elements.floating.style.setProperty('--anchor-width', `${rects.reference.width}px`);\n elements.floating.style.setProperty(\n '--anchor-height',\n `${rects.reference.height}px`,\n );\n },\n }),\n ],\n whileElementsMounted: autoUpdate,\n elements: { reference: anchor },\n });\n\n if (!isOpen) return null;\n\n return (\n <div\n ref={composeRefs(forwardedRef, refs.setFloating)}\n style={{ ...floatingStyles, ...style }}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\nAnchoredPositioner.displayName = 'AnchoredPositioner';\n","import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type KeyboardEvent,\n type ReactNode,\n type RefObject,\n} from 'react';\nimport { useComposedRefs } from '../../utils/composeRefs';\nimport { useDirection } from '../directionProvider';\n\nexport type Orientation = 'horizontal' | 'vertical' | 'both';\n\ninterface ItemEntry {\n id: string;\n node: HTMLElement | null;\n}\n\ninterface RovingFocusContextValue {\n register: (id: string, node: HTMLElement | null) => void;\n unregister: (id: string) => void;\n focusedId: string | null;\n setFocusedId: (id: string) => void;\n onItemKeyDown: (event: KeyboardEvent, id: string) => void;\n /** True once the user has interacted with the group; reset when focus leaves. */\n interactedRef: RefObject<boolean>;\n groupRef: RefObject<HTMLDivElement | null>;\n}\n\nconst RovingFocusContext = createContext<RovingFocusContextValue | null>(null);\n\nexport interface RovingFocusGroupProps extends HTMLAttributes<HTMLDivElement> {\n orientation?: Orientation;\n canLoop?: boolean;\n children: ReactNode;\n}\n\n/**\n * Provide arrow-key navigation for a group of focusable children. Children\n * call `useRovingFocusItem()` to register and receive `tabIndex` / event\n * handlers. Used by Tabs, ToggleGroup, RadioGroup, Menu.\n */\nexport const RovingFocusGroup = forwardRef<HTMLDivElement, RovingFocusGroupProps>(\n function RovingFocusGroup(\n { orientation = 'horizontal', canLoop = true, children, ...props },\n ref,\n ) {\n const items = useRef<ItemEntry[]>([]);\n const [focusedId, setFocusedId] = useState<string | null>(null);\n const interactedRef = useRef(false);\n const groupRef = useRef<HTMLDivElement | null>(null);\n const composedRef = useComposedRefs(ref, groupRef);\n const direction = useDirection();\n\n const register = useCallback((id: string, node: HTMLElement | null) => {\n if (!items.current.some((item) => item.id === id)) {\n const entry: ItemEntry = { id, node };\n // Insert by DOM order (not mount order) so dynamically inserted\n // items navigate in visual order.\n const index = node\n ? items.current.findIndex(\n (item) =>\n item.node !== null &&\n (node.compareDocumentPosition(item.node) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0,\n )\n : -1;\n if (index === -1) items.current.push(entry);\n else items.current.splice(index, 0, entry);\n }\n setFocusedId((current) => current ?? id);\n }, []);\n\n const unregister = useCallback((id: string) => {\n const idx = items.current.findIndex((item) => item.id === id);\n items.current = items.current.filter((item) => item.id !== id);\n // If the tab stop unmounts, advance to the next remaining item (or\n // the first) so the group keeps exactly one tabbable item.\n setFocusedId((current) => {\n if (current !== id) return current;\n const next = items.current[idx] ?? items.current[0];\n return next ? next.id : null;\n });\n }, []);\n\n // Reset the interaction flag when focus leaves the group so tab-stop\n // bookkeeping (focusedId updates) never steals focus back.\n useEffect(() => {\n const node = groupRef.current;\n if (!node) return;\n const onFocusOut = (event: FocusEvent) => {\n const next = event.relatedTarget as Node | null;\n if (!next || !node.contains(next)) interactedRef.current = false;\n };\n node.addEventListener('focusout', onFocusOut);\n return () => node.removeEventListener('focusout', onFocusOut);\n }, []);\n\n const onItemKeyDown = useCallback(\n (event: KeyboardEvent, id: string) => {\n const list = items.current;\n const idx = list.findIndex((item) => item.id === id);\n if (idx === -1) return;\n const isVert = orientation === 'vertical' || orientation === 'both';\n const isHoriz = orientation === 'horizontal' || orientation === 'both';\n // Horizontal arrows mirror in RTL.\n const nextHorizKey = direction === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n const prevHorizKey = direction === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n let next = idx;\n if ((event.key === nextHorizKey && isHoriz) || (event.key === 'ArrowDown' && isVert)) {\n next = idx + 1;\n if (next >= list.length) next = canLoop ? 0 : list.length - 1;\n } else if ((event.key === prevHorizKey && isHoriz) || (event.key === 'ArrowUp' && isVert)) {\n next = idx - 1;\n if (next < 0) next = canLoop ? list.length - 1 : 0;\n } else if (event.key === 'Home') {\n next = 0;\n } else if (event.key === 'End') {\n next = list.length - 1;\n } else {\n return;\n }\n event.preventDefault();\n interactedRef.current = true;\n const entry = list[next];\n if (entry) setFocusedId(entry.id);\n },\n [orientation, canLoop, direction],\n );\n\n const value = useMemo(\n () => ({\n register,\n unregister,\n focusedId,\n setFocusedId,\n onItemKeyDown,\n interactedRef,\n groupRef,\n }),\n [register, unregister, focusedId, onItemKeyDown],\n );\n\n return (\n <RovingFocusContext.Provider value={value}>\n <div ref={composedRef} role=\"group\" {...props}>\n {children}\n </div>\n </RovingFocusContext.Provider>\n );\n },\n);\n\nexport interface UseRovingFocusItemOptions {\n /** Preferred tab stop while focus is outside the group (e.g. the selected tab) — APG composite-widget pattern. */\n isActive?: boolean;\n}\n\nexport interface UseRovingFocusItemReturn {\n ref: (node: HTMLElement | null) => void;\n tabIndex: 0 | -1;\n onKeyDown: (event: KeyboardEvent) => void;\n onFocus: () => void;\n 'data-roving-focus-item': boolean;\n}\n\n/**\n * Inside a `RovingFocusGroup`, returns props to spread onto a focusable item.\n * Outside, returns inert props (tabIndex 0).\n */\nexport function useRovingFocusItem(\n options: UseRovingFocusItemOptions = {},\n): UseRovingFocusItemReturn {\n const { isActive = false } = options;\n const context = useContext(RovingFocusContext);\n const id = useId();\n const ref = useRef<HTMLElement | null>(null);\n\n const register = context?.register;\n const unregister = context?.unregister;\n useEffect(() => {\n register?.(id, ref.current);\n return () => unregister?.(id);\n }, [register, unregister, id]);\n\n // Move DOM focus only after user interaction — never on initial mount.\n const focusedId = context?.focusedId;\n const interactedRef = context?.interactedRef;\n useEffect(() => {\n if (\n focusedId === id &&\n interactedRef?.current &&\n ref.current &&\n document.activeElement !== ref.current\n ) {\n ref.current.focus();\n }\n }, [focusedId, interactedRef, id]);\n\n // Keep the active item (e.g. selected tab) as the tab stop whenever focus\n // is outside the group.\n const setFocusedId = context?.setFocusedId;\n const groupRef = context?.groupRef;\n useEffect(() => {\n if (!isActive || !setFocusedId || !groupRef) return;\n const groupNode = groupRef.current;\n if (!groupNode || !groupNode.contains(document.activeElement)) setFocusedId(id);\n const onFocusOut = (event: FocusEvent) => {\n const next = event.relatedTarget as Node | null;\n if (!next || !groupNode?.contains(next)) setFocusedId(id);\n };\n groupNode?.addEventListener('focusout', onFocusOut);\n return () => groupNode?.removeEventListener('focusout', onFocusOut);\n }, [isActive, setFocusedId, groupRef, id]);\n\n return {\n ref: (node) => {\n ref.current = node;\n },\n tabIndex: !context || context.focusedId === id ? 0 : -1,\n onKeyDown: (e) => context?.onItemKeyDown(e, id),\n onFocus: () => {\n if (!context) return;\n context.interactedRef.current = true;\n context.setFocusedId(id);\n },\n 'data-roving-focus-item': true,\n };\n}\n","import {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n type Context,\n type ReactNode,\n} from 'react';\n\nexport interface CollectionContextValue<T> {\n items: T[];\n register: (item: T) => void;\n unregister: (item: T) => void;\n}\n\n/**\n * Factory for a typed children-registry context. Compound components\n * (Menu, Tabs, Listbox) use this so the parent can iterate ordered children\n * without prop-drilling.\n */\nexport function createCollection<T>(): {\n Provider: (props: { children: ReactNode }) => ReactNode;\n useCollection: () => CollectionContextValue<T>;\n Context: Context<CollectionContextValue<T> | null>;\n} {\n const CollectionContext = createContext<CollectionContextValue<T> | null>(null);\n\n function Provider({ children }: { children: ReactNode }) {\n const [items, setItems] = useState<T[]>([]);\n const register = useCallback((item: T) => {\n setItems((prev) => (prev.includes(item) ? prev : [...prev, item]));\n }, []);\n const unregister = useCallback((item: T) => {\n setItems((prev) => prev.filter((i) => i !== item));\n }, []);\n const value = useMemo(() => ({ items, register, unregister }), [items, register, unregister]);\n return <CollectionContext.Provider value={value}>{children}</CollectionContext.Provider>;\n }\n\n function useCollection(): CollectionContextValue<T> {\n const ctx = useContext(CollectionContext);\n if (!ctx) {\n throw new Error('useCollection must be used inside its Provider');\n }\n return ctx;\n }\n\n return { Provider, useCollection, Context: CollectionContext };\n}\n","import { createContext, useContext, type ReactNode } from 'react';\nimport { useId } from '../../hooks/useId';\n\nexport interface FormControlContextValue {\n id: string;\n labelId: string;\n helperId: string;\n errorId: string;\n isInvalid: boolean;\n isDisabled: boolean;\n isRequired: boolean;\n isReadOnly: boolean;\n}\n\nconst Context = createContext<FormControlContextValue | null>(null);\n\nexport interface FormControlProviderProps {\n /** Override the auto-generated id (also used as control's `id`). */\n id?: string;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isRequired?: boolean;\n isReadOnly?: boolean;\n children: ReactNode;\n}\n\n/**\n * Wires Label ↔ control ↔ HelperText/ErrorMessage via stable IDs and shared\n * state flags. Used by `FormField` (L4) — atoms (Input, Label, etc.) read\n * via `useFormControl()` to get the right `id`/`htmlFor`/`aria-describedby`.\n */\nexport function FormControlProvider({\n id: providedId,\n isInvalid = false,\n isDisabled = false,\n isRequired = false,\n isReadOnly = false,\n children,\n}: FormControlProviderProps) {\n const generatedId = useId();\n const id = providedId ?? generatedId;\n const value: FormControlContextValue = {\n id,\n labelId: `${id}-label`,\n helperId: `${id}-helper`,\n errorId: `${id}-error`,\n isInvalid,\n isDisabled,\n isRequired,\n isReadOnly,\n };\n return <Context.Provider value={value}>{children}</Context.Provider>;\n}\n\n/**\n * Read the surrounding form-control context. Returns `null` when used\n * outside a provider — atoms gracefully degrade to standalone mode.\n */\nexport function useFormControl(): FormControlContextValue | null {\n return useContext(Context);\n}\n","import { type ReactNode } from 'react';\nimport { useScrollLock } from '../../hooks/useScrollLock';\n\nexport interface ScrollLockProviderProps {\n isEnabled?: boolean;\n children: ReactNode;\n}\n\n/**\n * Component wrapper around `useScrollLock` — handy when scroll lock should\n * follow a child's mount lifecycle (e.g. inside a Modal's portal).\n * Multiple wrappers stack; lock releases when the count reaches zero.\n */\nexport function ScrollLockProvider({ isEnabled = true, children }: ScrollLockProviderProps) {\n useScrollLock(isEnabled);\n return <>{children}</>;\n}\n","import { forwardRef, type SVGAttributes } from 'react';\n\nexport interface OverlayArrowProps extends SVGAttributes<SVGSVGElement> {\n /** Arrow width in px. Default 12. */\n width?: number;\n /** Arrow height in px. Default 6. */\n height?: number;\n}\n\n/**\n * Tip-arrow primitive for floating overlays (Tooltip, Popover, HoverCard).\n *\n * Renders a minimal SVG triangle with `fill=\"currentColor\"` — color follows\n * the consuming overlay's background via Tailwind's `text-*` utilities.\n *\n * Pair with Floating UI's `arrow()` middleware to position. The middleware\n * exposes the arrow's `x` / `y` offset on the resolved data; consumers apply\n * those as inline styles to the wrapping span.\n */\nexport const OverlayArrow = forwardRef<SVGSVGElement, OverlayArrowProps>(\n function OverlayArrow({ width = 12, height = 6, fill = 'currentColor', ...rest }, ref) {\n return (\n <svg\n ref={ref}\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n {...rest}\n >\n <polygon points={`0,0 ${width},0 ${width / 2},${height}`} fill={fill} />\n </svg>\n );\n },\n);\n","import { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport interface AnnounceProps extends HTMLAttributes<HTMLDivElement> {\n /** `polite` → `role=\"status\"`, `assertive` → `role=\"alert\"`. Default `polite`. */\n politeness?: 'polite' | 'assertive';\n children?: ReactNode;\n}\n\n/**\n * Visually-hidden ARIA live region. Children are announced by screen readers\n * whenever they change. Pair with a stable mount + swappable children for\n * lightweight transient announcements (status updates, toast messages, etc.).\n */\nexport const Announce = forwardRef<HTMLDivElement, AnnounceProps>(\n ({ politeness = 'polite', className, children, ...rest }, ref) => (\n <div\n ref={ref}\n role={politeness === 'assertive' ? 'alert' : 'status'}\n aria-live={politeness}\n aria-atomic=\"true\"\n className={cn(\n 'absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0',\n 'm-[-1px] [clip:rect(0_0_0_0)] [clip-path:inset(50%)]',\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n ),\n);\nAnnounce.displayName = 'Announce';\n"]}
|