tguikit 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +396 -3
- package/dist/index.js +2269 -486
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/shared/lib/cn.ts","../src/components/Avatar/Avatar.module.css","../src/components/Avatar/Avatar.variants.ts","../src/components/Avatar/Avatar.tsx","../src/components/Badge/Badge.module.css","../src/components/Badge/Badge.variants.ts","../src/components/Badge/Badge.tsx","../src/components/Spinner/Spinner.module.css","../src/components/Spinner/Spinner.variants.ts","../src/components/Spinner/Spinner.tsx","../src/components/Typography/Typography.module.css","../src/components/Typography/Typography.variants.ts","../src/components/Typography/Typography.tsx","../src/components/Subheadline/Subheadline.module.css","../src/components/Subheadline/Subheadline.variants.ts","../src/components/Subheadline/Subheadline.tsx","../src/components/TguiProvider/context.ts","../src/components/TguiProvider/useTgui.ts","../src/components/Tappable/Ripple.module.css","../src/components/Tappable/Ripple.tsx","../src/components/Tappable/Tappable.module.css","../src/components/Tappable/useRipple.ts","../src/components/Tappable/Tappable.tsx","../src/components/Text/Text.module.css","../src/components/Text/Text.tsx","../src/shared/lib/telegram.ts","../src/shared/lib/appearance.ts","../src/shared/lib/platform.ts","../src/components/TguiProvider/TguiProvider.module.css","../src/components/TguiProvider/TguiProvider.tsx","../src/components/Button/Button.module.css","../src/components/Button/Button.variants.ts","../src/components/Button/Button.tsx","../src/components/Caption/Caption.module.css","../src/components/Caption/Caption.variants.ts","../src/components/Caption/Caption.tsx","../src/components/Card/Card.context.ts","../src/components/Card/Card.module.css","../src/components/Cell/Cell.module.css","../src/components/Cell/Cell.variants.ts","../src/components/Cell/Cell.tsx","../src/components/Card/CardCell.tsx","../src/components/Card/Card.tsx","../src/components/Checkbox/Checkbox.module.css","../src/components/Checkbox/Checkbox.tsx","../src/components/CircularProgress/CircularProgress.module.css","../src/components/CircularProgress/CircularProgress.variants.ts","../src/components/CircularProgress/CircularProgress.tsx","../src/components/Divider/Divider.module.css","../src/components/Divider/Divider.tsx","../src/components/Headline/Headline.module.css","../src/components/Headline/Headline.tsx","../src/components/IconButton/IconButton.module.css","../src/components/IconButton/IconButton.variants.ts","../src/components/IconButton/IconButton.tsx","../src/components/FormField/FormField.module.css","../src/components/FormField/FormField.tsx","../src/components/Input/Input.module.css","../src/components/Input/Input.tsx","../src/components/LargeTitle/LargeTitle.module.css","../src/components/LargeTitle/LargeTitle.tsx","../src/components/List/List.module.css","../src/components/List/List.tsx","../src/components/Title/Title.module.css","../src/components/Title/Title.variants.ts","../src/components/Title/Title.tsx","../src/components/Placeholder/Placeholder.module.css","../src/components/Placeholder/Placeholder.tsx","../src/components/Progress/Progress.module.css","../src/components/Progress/Progress.tsx","../src/components/Radio/Radio.module.css","../src/components/Radio/Radio.tsx","../src/components/Section/Section.module.css","../src/components/Section/SectionFooter.tsx","../src/components/Section/SectionHeader.tsx","../src/components/Section/Section.tsx","../src/components/Select/Select.module.css","../src/components/Select/Select.tsx","../src/components/Skeleton/Skeleton.module.css","../src/components/Skeleton/Skeleton.tsx","../src/components/Switch/Switch.module.css","../src/components/Switch/Switch.tsx","../src/components/TabBar/TabBar.module.css","../src/components/TabBar/TabBarItem.tsx","../src/components/TabBar/TabBar.tsx","../src/components/Textarea/Textarea.module.css","../src/components/Textarea/Textarea.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\n\nexport function cn(...inputs: ClassValue[]) {\n return clsx(inputs);\n}\n",".avatar {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n flex-shrink: 0;\n overflow: hidden;\n border-radius: 50%;\n background: var(--tgui--tertiary_bg_color);\n color: var(--tgui--subtitle_text_color);\n font-family: var(--tgui--font-family);\n font-weight: var(--tgui--font_weight--accent2);\n line-height: 1;\n user-select: none;\n}\n\n.s20 {\n width: 20px;\n height: 20px;\n font-size: 9px;\n}\n\n.s24 {\n width: 24px;\n height: 24px;\n font-size: 10px;\n}\n\n.s28 {\n width: 28px;\n height: 28px;\n font-size: 11px;\n}\n\n.s40 {\n width: 40px;\n height: 40px;\n font-size: 15px;\n}\n\n.s48 {\n width: 48px;\n height: 48px;\n font-size: 18px;\n}\n\n.s96 {\n width: 96px;\n height: 96px;\n font-size: 34px;\n}\n\n.img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n}\n\n.acronym {\n text-transform: uppercase;\n}\n\n.icon {\n display: flex;\n width: 60%;\n height: 60%;\n}\n\n.icon > svg {\n width: 100%;\n height: 100%;\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Avatar.module.css';\n\nexport type AvatarSize = 20 | 24 | 28 | 40 | 48 | 96;\n\nexport const avatar = cva(styles.avatar, {\n variants: {\n size: {\n 20: styles.s20,\n 24: styles.s24,\n 28: styles.s28,\n 40: styles.s40,\n 48: styles.s48,\n 96: styles.s96,\n },\n },\n defaultVariants: { size: 40 },\n});\n","'use client';\n\nimport { type HTMLAttributes, type ReactNode, type Ref, useState } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Avatar.module.css';\nimport { type AvatarSize, avatar } from './Avatar.variants';\n\nexport type { AvatarSize };\n\nexport interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {\n ref?: Ref<HTMLSpanElement>;\n size?: AvatarSize;\n src?: string;\n alt?: string;\n acronym?: string;\n fallbackIcon?: ReactNode;\n}\n\nfunction PersonIcon() {\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden>\n <path d=\"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 2c-4.2 0-7 2.4-7 4.5V20h14v-1.5c0-2.1-2.8-4.5-7-4.5Z\" />\n </svg>\n );\n}\n\nexport function Avatar({\n ref,\n size = 40,\n src,\n alt = '',\n acronym,\n fallbackIcon,\n className,\n children,\n ...rest\n}: AvatarProps) {\n const [failedSrc, setFailedSrc] = useState<string | null>(null);\n const showImage = src != null && src !== '' && src !== failedSrc;\n\n return (\n <span ref={ref} className={cn(avatar({ size }), className)} {...rest}>\n {showImage ? (\n <img\n className={styles.img}\n src={src}\n alt={alt}\n loading=\"lazy\"\n onError={() => setFailedSrc(src)}\n />\n ) : acronym ? (\n <span className={styles.acronym}>{acronym}</span>\n ) : (\n <span className={styles.icon}>{fallbackIcon ?? <PersonIcon />}</span>\n )}\n {children}\n </span>\n );\n}\n\nAvatar.displayName = 'Avatar';\n",".badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n flex-shrink: 0;\n font-family: var(--tgui--font-family);\n font-weight: var(--tgui--font_weight--accent2);\n}\n\n.number {\n min-width: 20px;\n height: 20px;\n padding: 0 6px;\n border-radius: 10px;\n font-size: 13px;\n line-height: 1;\n}\n\n.large.number {\n min-width: 24px;\n height: 24px;\n padding: 0 8px;\n border-radius: 12px;\n font-size: 15px;\n}\n\n.dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n}\n\n.large.dot {\n width: 10px;\n height: 10px;\n}\n\n.mode-primary {\n color: var(--tgui--button_text_color);\n background: var(--tgui--button_color);\n}\n\n.mode-critical {\n color: var(--tgui--white);\n background: var(--tgui--destructive_text_color);\n}\n\n.mode-secondary {\n color: var(--tgui--link_color);\n background: var(--tgui--secondary_fill);\n}\n\n.mode-gray {\n color: var(--tgui--plain_foreground);\n background: var(--tgui--tertiary_bg_color);\n}\n\n.mode-white {\n color: var(--tgui--black);\n background: var(--tgui--white);\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Badge.module.css';\n\nexport type BadgeType = 'number' | 'dot';\nexport type BadgeMode = 'primary' | 'critical' | 'secondary' | 'gray' | 'white';\n\nexport const badge = cva(styles.badge, {\n variants: {\n type: { number: styles.number, dot: styles.dot },\n mode: {\n primary: styles['mode-primary'],\n critical: styles['mode-critical'],\n secondary: styles['mode-secondary'],\n gray: styles['mode-gray'],\n white: styles['mode-white'],\n },\n large: { true: styles.large },\n },\n defaultVariants: { type: 'number', mode: 'primary' },\n});\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { type BadgeMode, type BadgeType, badge } from './Badge.variants';\n\nexport type { BadgeMode, BadgeType };\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n ref?: Ref<HTMLSpanElement>;\n type?: BadgeType;\n mode?: BadgeMode;\n large?: boolean;\n children?: ReactNode;\n}\n\nexport function Badge({\n ref,\n type = 'number',\n mode = 'primary',\n large = false,\n className,\n children,\n ...rest\n}: BadgeProps) {\n return (\n <span ref={ref} className={cn(badge({ type, mode, large }), className)} {...rest}>\n {type === 'number' ? children : null}\n </span>\n );\n}\n\nBadge.displayName = 'Badge';\n",".spinner {\n display: inline-block;\n box-sizing: border-box;\n border-radius: 50%;\n border-style: solid;\n border-color: currentColor;\n border-top-color: transparent;\n animation: tgui-spinner 0.6s linear infinite;\n}\n\n.s {\n width: 16px;\n height: 16px;\n border-width: 2px;\n}\n\n.m {\n width: 24px;\n height: 24px;\n border-width: 2.5px;\n}\n\n.l {\n width: 32px;\n height: 32px;\n border-width: 3px;\n}\n\n@keyframes tgui-spinner {\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .spinner {\n animation-duration: 1.6s;\n }\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Spinner.module.css';\n\nexport type SpinnerSize = 's' | 'm' | 'l';\n\nexport const spinner = cva(styles.spinner, {\n variants: {\n size: { s: styles.s, m: styles.m, l: styles.l },\n },\n defaultVariants: { size: 'm' },\n});\n","import type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { type SpinnerSize, spinner } from './Spinner.variants';\n\nexport type { SpinnerSize };\n\nexport interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {\n ref?: Ref<HTMLSpanElement>;\n size?: SpinnerSize;\n}\n\nexport function Spinner({ ref, size = 'm', className, ...rest }: SpinnerProps) {\n return (\n <span\n ref={ref}\n role=\"status\"\n aria-label=\"Loading\"\n className={cn(spinner({ size }), className)}\n {...rest}\n />\n );\n}\n\nSpinner.displayName = 'Spinner';\n",".typography {\n margin: 0;\n font-family: var(--tgui--font-family);\n}\n\n.weight-1 {\n font-weight: var(--tgui--font_weight--accent1);\n}\n\n.weight-2 {\n font-weight: var(--tgui--font_weight--accent2);\n}\n\n.weight-3 {\n font-weight: var(--tgui--font_weight--accent3);\n}\n\n.caps {\n text-transform: uppercase;\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Typography.module.css';\n\nexport const typography = cva(styles.typography, {\n variants: {\n weight: {\n '1': styles['weight-1'],\n '2': styles['weight-2'],\n '3': styles['weight-3'],\n },\n caps: { true: styles.caps },\n },\n defaultVariants: { weight: '3' },\n});\n","import type { AllHTMLAttributes, ElementType, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { typography } from './Typography.variants';\n\nexport interface TypographyProps extends AllHTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n weight?: '1' | '2' | '3';\n caps?: boolean;\n Component?: ElementType;\n}\n\nexport function Typography({\n ref,\n weight,\n caps,\n Component = 'span',\n className,\n ...rest\n}: TypographyProps) {\n return <Component ref={ref} className={cn(typography({ weight, caps }), className)} {...rest} />;\n}\n\nTypography.displayName = 'Typography';\n",".level-1 {\n font-size: var(--tgui--subheadline1--font_size);\n line-height: var(--tgui--subheadline1--line_height);\n}\n\n.level-2 {\n font-size: var(--tgui--subheadline2--font_size);\n line-height: var(--tgui--subheadline2--line_height);\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Subheadline.module.css';\n\nexport type SubheadlineLevel = '1' | '2';\n\nexport const subheadline = cva('', {\n variants: {\n level: {\n '1': styles['level-1'],\n '2': styles['level-2'],\n },\n },\n defaultVariants: { level: '1' },\n});\n","import type { Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Typography, type TypographyProps } from '../Typography';\nimport { type SubheadlineLevel, subheadline } from './Subheadline.variants';\n\nexport interface SubheadlineProps extends TypographyProps {\n ref?: Ref<HTMLElement>;\n level?: SubheadlineLevel;\n}\n\nexport function Subheadline({\n ref,\n level,\n Component = 'h6',\n className,\n ...rest\n}: SubheadlineProps) {\n return (\n <Typography\n ref={ref}\n Component={Component}\n className={cn(subheadline({ level }), className)}\n {...rest}\n />\n );\n}\n\nSubheadline.displayName = 'Subheadline';\n","import { createContext } from 'react';\nimport type { TguiContextValue } from '../../shared/types/tgui';\n\nexport const TguiContext = createContext<TguiContextValue | null>(null);\n\nTguiContext.displayName = 'TguiContext';\n","import { useContext } from 'react';\nimport type { TguiContextValue } from '../../shared/types/tgui';\nimport { TguiContext } from './context';\n\nexport function useTgui(): TguiContextValue {\n const context = useContext(TguiContext);\n\n if (context === null) {\n throw new Error('useTgui must be used within a <TguiProvider>.');\n }\n\n return context;\n}\n",".ripple {\n position: absolute;\n inset: 0;\n overflow: hidden;\n border-radius: inherit;\n pointer-events: none;\n}\n\n.wave {\n position: absolute;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n background: var(--tgui--outline);\n opacity: 0;\n animation: wave-rise 0.35s cubic-bezier(0.3, 0.3, 0.5, 1);\n}\n\n@keyframes wave-rise {\n from {\n transform: translate(-50%, -50%) scale(1);\n opacity: 1;\n }\n 30% {\n opacity: 1;\n }\n to {\n transform: translate(-50%, -50%) scale(8);\n opacity: 0;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wave {\n animation: none;\n }\n}\n","import styles from './Ripple.module.css';\nimport type { Wave } from './useRipple';\n\ninterface RippleProps {\n waves: Wave[];\n onWaveEnd: (id: number) => void;\n}\n\nexport function Ripple({ waves, onWaveEnd }: RippleProps) {\n return (\n <span aria-hidden className={styles.ripple}>\n {waves.map((wave) => (\n <span\n key={wave.id}\n className={styles.wave}\n style={{ top: wave.y, left: wave.x }}\n onAnimationEnd={() => onWaveEnd(wave.id)}\n />\n ))}\n </span>\n );\n}\n",".tappable {\n position: relative;\n isolation: isolate;\n cursor: pointer;\n transition: opacity 0.15s ease-out;\n}\n\n.tappable[data-readonly] {\n cursor: default;\n}\n\n.tappable[data-disabled] {\n cursor: default;\n opacity: 0.35;\n}\n\n.tappable--ios:not([data-disabled]):not([data-readonly]):active,\n.tappable--opacity:not([data-disabled]):not([data-readonly]):active {\n opacity: 0.65;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .tappable--ios:not([data-disabled]):not([data-readonly]):hover,\n .tappable--opacity:not([data-disabled]):not([data-readonly]):hover {\n opacity: 0.85;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tappable {\n transition: none;\n }\n}\n","import { type PointerEvent, useCallback, useEffect, useRef, useState } from 'react';\n\nconst PRESS_DELAY = 70;\nconst WAVE_FALLBACK = 600;\n\nexport interface Wave {\n id: number;\n x: number;\n y: number;\n}\n\ntype Timer = ReturnType<typeof setTimeout>;\n\nexport function useRipple() {\n const [waves, setWaves] = useState<Wave[]>([]);\n const nextId = useRef(0);\n const pressTimers = useRef(new Map<number, Timer>());\n const waveTimers = useRef(new Set<Timer>());\n\n useEffect(() => {\n const press = pressTimers.current;\n const wave = waveTimers.current;\n return () => {\n for (const timer of press.values()) clearTimeout(timer);\n for (const timer of wave) clearTimeout(timer);\n };\n }, []);\n\n const removeWave = useCallback((id: number) => {\n setWaves((current) => current.filter((wave) => wave.id !== id));\n }, []);\n\n const onPointerDown = useCallback(\n (event: PointerEvent<HTMLElement>) => {\n const { top, left } = event.currentTarget.getBoundingClientRect();\n const x = event.clientX - left;\n const y = event.clientY - top;\n const { pointerId } = event;\n\n const press = setTimeout(() => {\n pressTimers.current.delete(pointerId);\n const id = nextId.current++;\n setWaves((current) => [...current, { id, x, y }]);\n\n const fallback = setTimeout(() => {\n waveTimers.current.delete(fallback);\n removeWave(id);\n }, WAVE_FALLBACK);\n waveTimers.current.add(fallback);\n }, PRESS_DELAY);\n\n pressTimers.current.set(pointerId, press);\n },\n [removeWave],\n );\n\n const onPointerCancel = useCallback((event: PointerEvent<HTMLElement>) => {\n const press = pressTimers.current.get(event.pointerId);\n if (press) {\n clearTimeout(press);\n pressTimers.current.delete(event.pointerId);\n }\n }, []);\n\n return { waves, onPointerDown, onPointerCancel, removeWave };\n}\n","'use client';\n\nimport type { AllHTMLAttributes, ElementType, PointerEvent, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { useTgui } from '../TguiProvider/useTgui';\nimport { Ripple } from './Ripple';\nimport styles from './Tappable.module.css';\nimport { useRipple } from './useRipple';\n\nexport interface TappableProps extends AllHTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n Component?: ElementType;\n interactiveAnimation?: 'background' | 'opacity';\n}\n\nexport function Tappable({\n ref,\n Component = 'div',\n interactiveAnimation = 'background',\n className,\n children,\n onPointerDown,\n onPointerCancel,\n ...rest\n}: TappableProps) {\n const { platform } = useTgui();\n const ripple = useRipple();\n const disabled = Boolean(rest.disabled);\n const readOnly = Boolean(rest.readOnly);\n\n const interactive = Component !== 'div' && Component !== 'span';\n const hasRipple =\n platform === 'base' &&\n interactiveAnimation === 'background' &&\n !readOnly &&\n !disabled &&\n (interactive || rest.onClick != null);\n\n const handlePointerDown = (event: PointerEvent<HTMLElement>) => {\n if (hasRipple) ripple.onPointerDown(event);\n onPointerDown?.(event);\n };\n\n const handlePointerCancel = (event: PointerEvent<HTMLElement>) => {\n if (hasRipple) ripple.onPointerCancel(event);\n onPointerCancel?.(event);\n };\n\n return (\n <Component\n ref={ref}\n className={cn(\n styles.tappable,\n platform === 'ios' && styles['tappable--ios'],\n interactiveAnimation === 'opacity' && styles['tappable--opacity'],\n className,\n )}\n data-readonly={readOnly || undefined}\n data-disabled={disabled || undefined}\n aria-disabled={disabled || undefined}\n onPointerDown={handlePointerDown}\n onPointerCancel={handlePointerCancel}\n {...rest}\n >\n {hasRipple && <Ripple waves={ripple.waves} onWaveEnd={ripple.removeWave} />}\n {children}\n </Component>\n );\n}\n\nTappable.displayName = 'Tappable';\n",".text {\n font-size: var(--tgui--text--font_size);\n line-height: var(--tgui--text--line_height);\n}\n","import type { Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Typography, type TypographyProps } from '../Typography';\nimport styles from './Text.module.css';\n\nexport interface TextProps extends TypographyProps {\n ref?: Ref<HTMLElement>;\n}\n\nexport function Text({ ref, className, Component = 'span', ...rest }: TextProps) {\n return (\n <Typography ref={ref} Component={Component} className={cn(styles.text, className)} {...rest} />\n );\n}\n\nText.displayName = 'Text';\n","import type { WebApp } from '../types/telegram';\n\nexport function getTelegramWebApp(): WebApp | undefined {\n if (typeof window === 'undefined') {\n return undefined;\n }\n\n return window.Telegram?.WebApp;\n}\n","import type { Appearance } from '../types/tgui';\nimport { getTelegramWebApp } from './telegram';\n\nconst DARK_QUERY = '(prefers-color-scheme: dark)';\n\nfunction canMatchMedia() {\n return typeof window !== 'undefined' && typeof window.matchMedia === 'function';\n}\n\nexport function getAppearance(): Appearance {\n const webApp = getTelegramWebApp();\n if (webApp) {\n return webApp.colorScheme === 'dark' ? 'dark' : 'light';\n }\n\n if (canMatchMedia()) {\n return window.matchMedia(DARK_QUERY).matches ? 'dark' : 'light';\n }\n\n return 'light';\n}\n\nexport function subscribeAppearance(onChange: () => void): () => void {\n const webApp = getTelegramWebApp();\n if (webApp) {\n webApp.onEvent('themeChanged', onChange);\n return () => webApp.offEvent('themeChanged', onChange);\n }\n\n if (!canMatchMedia()) {\n return () => {};\n }\n\n const media = window.matchMedia(DARK_QUERY);\n media.addEventListener('change', onChange);\n return () => media.removeEventListener('change', onChange);\n}\n","import type { TguiPlatform } from '../types/tgui';\nimport { getTelegramWebApp } from './telegram';\n\nconst TELEGRAM_IOS_LIKE = new Set(['ios', 'macos']);\n\nexport function getPlatform(): TguiPlatform {\n const webApp = getTelegramWebApp();\n if (webApp) {\n return TELEGRAM_IOS_LIKE.has(webApp.platform) ? 'ios' : 'base';\n }\n\n if (typeof navigator === 'undefined') {\n return 'base';\n }\n\n const ua = navigator.userAgent;\n const isIpadOs = ua.includes('Macintosh') && navigator.maxTouchPoints > 1;\n\n return /iphone|ipad|ipod/i.test(ua) || isIpadOs ? 'ios' : 'base';\n}\n",".wrapper {\n --tgui--font-family:\n system-ui, -apple-system, BlinkMacSystemFont, \"Roboto\", \"Apple Color Emoji\", \"Helvetica Neue\",\n sans-serif;\n\n --tgui--font_weight--accent1: 700;\n --tgui--font_weight--accent2: 600;\n --tgui--font_weight--accent3: 400;\n\n --tgui--large_title--font_size: 34px;\n --tgui--large_title--line_height: 42px;\n\n --tgui--title1--font_size: 28px;\n --tgui--title1--line_height: 36px;\n --tgui--title2--font_size: 24px;\n --tgui--title2--line_height: 32px;\n --tgui--title3--font_size: 20px;\n --tgui--title3--line_height: 24px;\n\n --tgui--headline--font_size: 19px;\n --tgui--headline--line_height: 28px;\n\n --tgui--text--font_size: 17px;\n --tgui--text--line_height: 26px;\n\n --tgui--subheadline1--font_size: 16px;\n --tgui--subheadline1--line_height: 24px;\n --tgui--subheadline2--font_size: 15px;\n --tgui--subheadline2--line_height: 22px;\n\n --tgui--caption1--font_size: 13px;\n --tgui--caption1--line_height: 20px;\n --tgui--caption2--font_size: 11px;\n --tgui--caption2--line_height: 16px;\n\n --tgui--border--width: 1px;\n --tgui--base--section--box_shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);\n\n --tgui--bg_color: var(--tg-theme-bg-color, #ffffff);\n --tgui--text_color: var(--tg-theme-text-color, #000000);\n --tgui--hint_color: var(--tg-theme-hint-color, #707579);\n --tgui--link_color: var(--tg-theme-link-color, #007aff);\n --tgui--button_color: var(--tg-theme-button-color, #007aff);\n --tgui--button_text_color: var(--tg-theme-button-text-color, #ffffff);\n --tgui--secondary_bg_color: var(--tg-theme-secondary-bg-color, #efeff4);\n --tgui--header_bg_color: var(--tg-theme-header-bg-color, #ffffff);\n --tgui--accent_text_color: var(--tg-theme-accent-text-color, #007aff);\n --tgui--section_bg_color: var(--tg-theme-section-bg-color, #ffffff);\n --tgui--section_header_text_color: var(--tg-theme-section-header-text-color, #707579);\n --tgui--subtitle_text_color: var(--tg-theme-subtitle-text-color, #707579);\n --tgui--destructive_text_color: var(--tg-theme-destructive-text-color, #e53935);\n\n --tgui--skeleton: rgba(0, 0, 0, 0.07);\n --tgui--divider: rgba(0, 0, 0, 0.15);\n --tgui--outline: rgba(0, 0, 0, 0.05);\n --tgui--surface_primary: rgba(255, 255, 255, 0.95);\n\n --tgui--tertiary_bg_color: #f4f4f7;\n --tgui--quartenary_bg_color: #f6f6fa;\n --tgui--segmented_control_active_bg: var(--tgui--bg_color);\n --tgui--card_bg_color: var(--tgui--section_bg_color);\n --tgui--secondary_hint_color: #a2acb0;\n --tgui--secondary_fill: rgba(67, 120, 255, 0.14);\n --tgui--green: #31d158;\n --tgui--destructive_background: #e53935;\n --tgui--primary_code_highlight: #4378ff;\n --tgui--secondary_code_highlight: #b00fb4;\n --tgui--tertiary_code_highlight: #3a9f20;\n --tgui--plain_background: rgba(0, 0, 0, 0.04);\n --tgui--plain_foreground: rgba(0, 0, 0, 0.8);\n --tgui--toast_accent_color: #55a6ff;\n\n --tgui--surface_dark: rgba(56, 56, 56, 0.85);\n --tgui--tooltip_background_dark: rgba(0, 0, 0, 0.85);\n --tgui--white: #ffffff;\n --tgui--black: #000000;\n\n --tgui--z-index--simple: 1;\n --tgui--z-index--skeleton: 2;\n --tgui--z-index--overlay: 3;\n\n -webkit-tap-highlight-color: transparent;\n -webkit-text-size-adjust: 100%;\n\n font-family: var(--tgui--font-family);\n color: var(--tgui--text_color);\n}\n\n.wrapper--ios {\n --tgui--large_title--line_height: 41px;\n --tgui--title1--line_height: 34px;\n --tgui--title2--line_height: 28px;\n --tgui--title3--line_height: 25px;\n --tgui--headline--line_height: 24px;\n --tgui--text--line_height: 22px;\n --tgui--subheadline1--line_height: 21px;\n --tgui--subheadline2--line_height: 20px;\n --tgui--caption1--line_height: 16px;\n --tgui--caption2--line_height: 13px;\n}\n\n.wrapper--dark {\n --tgui--bg_color: var(--tg-theme-bg-color, #212121);\n --tgui--text_color: var(--tg-theme-text-color, #ffffff);\n --tgui--hint_color: var(--tg-theme-hint-color, #aaaaaa);\n --tgui--link_color: var(--tg-theme-link-color, #2990ff);\n --tgui--button_color: var(--tg-theme-button-color, #2990ff);\n --tgui--button_text_color: var(--tg-theme-button-text-color, #ffffff);\n --tgui--secondary_bg_color: var(--tg-theme-secondary-bg-color, #0f0f0f);\n --tgui--header_bg_color: var(--tg-theme-header-bg-color, #212121);\n --tgui--accent_text_color: var(--tg-theme-accent-text-color, #007aff);\n --tgui--section_bg_color: var(--tg-theme-section-bg-color, #212121);\n --tgui--section_header_text_color: var(--tg-theme-section-header-text-color, #aaaaaa);\n --tgui--subtitle_text_color: var(--tg-theme-subtitle-text-color, #aaaaaa);\n --tgui--destructive_text_color: var(--tg-theme-destructive-text-color, #e53935);\n\n --tgui--skeleton: rgba(255, 255, 255, 0.07);\n --tgui--divider: rgba(255, 255, 255, 0.05);\n --tgui--outline: rgba(255, 255, 255, 0.1);\n --tgui--surface_primary: rgba(23, 23, 23, 0.95);\n --tgui--tertiary_bg_color: #2a2a2a;\n --tgui--quartenary_bg_color: #2f2f2f;\n --tgui--segmented_control_active_bg: #2f2f2f;\n --tgui--card_bg_color: #262626;\n --tgui--secondary_hint_color: #78797e;\n --tgui--secondary_fill: rgba(41, 144, 255, 0.2);\n --tgui--green: #32e55e;\n --tgui--destructive_background: rgba(255, 35, 35, 0.02);\n --tgui--primary_code_highlight: #2990ff;\n --tgui--secondary_code_highlight: #e937ed;\n --tgui--tertiary_code_highlight: #5ae536;\n --tgui--plain_background: rgba(255, 255, 255, 0.08);\n --tgui--plain_foreground: rgba(255, 255, 255, 0.95);\n}\n\n@media (min-resolution: 2dppx) {\n .wrapper {\n --tgui--border--width: 0.5px;\n }\n}\n\n@supports (padding-top: env(safe-area-inset-bottom)) {\n .wrapper {\n --tgui--safe_area_inset_bottom: env(safe-area-inset-bottom);\n }\n}\n\n@supports (color: color-mix(in srgb, red 10%, transparent)) {\n .wrapper {\n --tgui--secondary_fill: color-mix(in srgb, var(--tgui--accent_text_color) 14%, transparent);\n --tgui--tertiary_bg_color: color-mix(\n in srgb,\n var(--tgui--secondary_bg_color),\n var(--tgui--bg_color) 40%\n );\n --tgui--quartenary_bg_color: color-mix(\n in srgb,\n var(--tgui--secondary_bg_color),\n var(--tgui--bg_color) 20%\n );\n }\n\n .wrapper--dark {\n --tgui--secondary_fill: color-mix(in srgb, var(--tgui--accent_text_color) 20%, transparent);\n --tgui--card_bg_color: color-mix(in srgb, var(--tgui--bg_color), #fff 7%);\n --tgui--tertiary_bg_color: color-mix(in srgb, var(--tgui--bg_color), #fff 10%);\n --tgui--quartenary_bg_color: color-mix(in srgb, var(--tgui--bg_color), #fff 14%);\n --tgui--segmented_control_active_bg: color-mix(in srgb, var(--tgui--bg_color), #fff 12%);\n }\n}\n","import {\n type HTMLAttributes,\n type Ref,\n useCallback,\n useMemo,\n useState,\n useSyncExternalStore,\n} from 'react';\nimport { getAppearance, subscribeAppearance } from '../../shared/lib/appearance';\nimport { cn } from '../../shared/lib/cn';\nimport { getPlatform } from '../../shared/lib/platform';\nimport type { Appearance, TguiPlatform } from '../../shared/types/tgui';\nimport { TguiContext } from './context';\nimport styles from './TguiProvider.module.css';\n\nexport interface TguiProviderProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n platform?: TguiPlatform;\n appearance?: Appearance;\n portalContainer?: HTMLElement | null;\n}\n\nconst getServerAppearance = (): Appearance => 'light';\n\nexport function TguiProvider({\n ref,\n platform: platformProp,\n appearance: appearanceProp,\n portalContainer: portalContainerProp,\n className,\n children,\n ...rest\n}: TguiProviderProps) {\n const platform = useMemo(() => platformProp ?? getPlatform(), [platformProp]);\n\n const systemAppearance = useSyncExternalStore(\n subscribeAppearance,\n getAppearance,\n getServerAppearance,\n );\n const appearance = appearanceProp ?? systemAppearance;\n\n const [wrapper, setWrapper] = useState<HTMLDivElement | null>(null);\n const setRef = useCallback(\n (node: HTMLDivElement | null) => {\n setWrapper(node);\n\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n },\n [ref],\n );\n\n const value = useMemo(\n () => ({\n platform,\n appearance,\n portalContainer: portalContainerProp ?? wrapper,\n }),\n [platform, appearance, portalContainerProp, wrapper],\n );\n\n return (\n <div\n ref={setRef}\n className={cn(\n styles.wrapper,\n platform === 'ios' && styles['wrapper--ios'],\n appearance === 'dark' && styles['wrapper--dark'],\n className,\n )}\n {...rest}\n >\n <TguiContext.Provider value={value}>{children}</TguiContext.Provider>\n </div>\n );\n}\n\nTguiProvider.displayName = 'TguiProvider';\n",".button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n max-inline-size: 100%;\n min-inline-size: 80px;\n border: none;\n border-radius: var(--tgui--button--border_radius, 8px);\n text-decoration: none;\n}\n\n.stretched {\n inline-size: 100%;\n flex-grow: 1;\n}\n\n.button::after {\n content: \"\";\n position: absolute;\n inset: 0;\n opacity: 0;\n background: var(--tgui--bg_color);\n transition: opacity 0.15s ease-out;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .button:not([data-disabled]):hover::after {\n opacity: var(--tgui--button--wash-opacity);\n }\n}\n\n.before,\n.after {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.content {\n display: flex;\n flex: 0 1 auto;\n min-inline-size: 0;\n align-items: center;\n justify-content: center;\n z-index: var(--tgui--z-index--simple);\n}\n\n.label {\n min-inline-size: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.content svg {\n display: block;\n}\n\n.loading {\n pointer-events: none;\n}\n\n.loading .before,\n.loading .after,\n.loading .content {\n opacity: 0;\n}\n\n.spinner {\n position: absolute;\n color: var(--tgui--button--spinner-color);\n}\n\n.size-s {\n height: 36px;\n min-width: 34px;\n gap: 6px;\n padding: 8px 12px;\n border-radius: 999px;\n}\n\n.size-m {\n height: 42px;\n min-width: 42px;\n gap: 8px;\n padding: 8px 14px;\n}\n\n.size-l {\n height: 50px;\n gap: 10px;\n padding: 10px 20px;\n}\n\n.ios.size-m {\n border-radius: 12px;\n}\n\n.ios::after {\n content: none;\n}\n\n.mode-filled {\n --tgui--button--wash-opacity: 0.15;\n --tgui--button--spinner-color: var(--tgui--button_text_color);\n color: var(--tgui--button_text_color);\n background: var(--tgui--button_color);\n}\n\n.mode-bezeled {\n --tgui--button--wash-opacity: 0.07;\n --tgui--button--spinner-color: var(--tgui--link_color);\n color: var(--tgui--link_color);\n background: var(--tgui--secondary_fill);\n}\n\n.mode-plain {\n --tgui--button--wash-opacity: 0.03;\n --tgui--button--spinner-color: var(--tgui--plain_foreground);\n color: var(--tgui--link_color);\n background: transparent;\n}\n\n.mode-gray {\n --tgui--button--wash-opacity: 0.5;\n --tgui--button--spinner-color: var(--tgui--plain_foreground);\n color: var(--tgui--plain_foreground);\n background: var(--tgui--plain_background);\n}\n\n.mode-outline {\n --tgui--button--wash-opacity: 0.5;\n --tgui--button--spinner-color: var(--tgui--plain_foreground);\n color: var(--tgui--plain_foreground);\n background: transparent;\n box-shadow: 0 0 0 1px var(--tgui--outline);\n}\n\n.mode-white {\n --tgui--button--wash-opacity: 0.5;\n --tgui--button--spinner-color: var(--tgui--surface_dark);\n color: var(--tgui--black);\n background: var(--tgui--white);\n}\n","import { cva } from 'class-variance-authority';\nimport type { TguiPlatform } from '../../shared/types/tgui';\nimport styles from './Button.module.css';\n\nexport type ButtonMode = 'filled' | 'bezeled' | 'plain' | 'gray' | 'outline' | 'white';\nexport type ButtonSize = 's' | 'm' | 'l';\n\nexport const button = cva(styles.button, {\n variants: {\n mode: {\n filled: styles['mode-filled'],\n bezeled: styles['mode-bezeled'],\n plain: styles['mode-plain'],\n gray: styles['mode-gray'],\n outline: styles['mode-outline'],\n white: styles['mode-white'],\n },\n size: {\n s: styles['size-s'],\n m: styles['size-m'],\n l: styles['size-l'],\n },\n stretched: { true: styles.stretched },\n platform: { ios: styles.ios, base: null },\n },\n defaultVariants: { mode: 'filled', size: 'm' },\n});\n\nexport type ButtonVariantInput = {\n mode?: ButtonMode;\n size?: ButtonSize;\n stretched?: boolean;\n platform: TguiPlatform;\n};\n","'use client';\n\nimport type { AllHTMLAttributes, ElementType, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Spinner } from '../Spinner';\nimport { Subheadline } from '../Subheadline';\nimport { Tappable } from '../Tappable';\nimport { Text } from '../Text';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Button.module.css';\nimport { type ButtonMode, type ButtonSize, button } from './Button.variants';\n\nexport interface ButtonProps extends Omit<AllHTMLAttributes<HTMLElement>, 'size'> {\n ref?: Ref<HTMLElement>;\n Component?: ElementType;\n mode?: ButtonMode;\n size?: ButtonSize;\n stretched?: boolean;\n loading?: boolean;\n before?: ReactNode;\n after?: ReactNode;\n}\n\nfunction Label({ size, children }: { size: ButtonSize; children: ReactNode }) {\n const shared = { weight: '2', className: styles.content } as const;\n const inner = <span className={styles.label}>{children}</span>;\n return size === 'l' ? (\n <Text {...shared}>{inner}</Text>\n ) : (\n <Subheadline level=\"2\" {...shared}>\n {inner}\n </Subheadline>\n );\n}\n\nexport function Button({\n ref,\n Component = 'button',\n mode = 'filled',\n size = 'm',\n stretched = false,\n loading = false,\n type,\n before,\n after,\n children,\n className,\n ...rest\n}: ButtonProps) {\n const { platform } = useTgui();\n\n return (\n <Tappable\n ref={ref}\n Component={Component}\n type={Component === 'button' ? (type ?? 'button') : type}\n aria-busy={loading || undefined}\n className={cn(\n button({ mode, size, stretched, platform }),\n loading && styles.loading,\n className,\n )}\n {...rest}\n >\n {loading ? <Spinner size=\"s\" className={styles.spinner} aria-hidden /> : null}\n {before ? <span className={styles.before}>{before}</span> : null}\n <Label size={size}>{children}</Label>\n {after ? <span className={styles.after}>{after}</span> : null}\n </Tappable>\n );\n}\n\nButton.displayName = 'Button';\n",".level-1 {\n font-size: var(--tgui--caption1--font_size);\n line-height: var(--tgui--caption1--line_height);\n}\n\n.level-2 {\n font-size: var(--tgui--caption2--font_size);\n line-height: var(--tgui--caption2--line_height);\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Caption.module.css';\n\nexport type CaptionLevel = '1' | '2';\n\nexport const caption = cva('', {\n variants: {\n level: {\n '1': styles['level-1'],\n '2': styles['level-2'],\n },\n },\n defaultVariants: { level: '1' },\n});\n","import type { Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Typography, type TypographyProps } from '../Typography';\nimport { type CaptionLevel, caption } from './Caption.variants';\n\nexport interface CaptionProps extends TypographyProps {\n ref?: Ref<HTMLElement>;\n level?: CaptionLevel;\n}\n\nexport function Caption({ ref, level, Component = 'span', className, ...rest }: CaptionProps) {\n return (\n <Typography\n ref={ref}\n Component={Component}\n className={cn(caption({ level }), className)}\n {...rest}\n />\n );\n}\n\nCaption.displayName = 'Caption';\n","import { createContext } from 'react';\n\nexport type CardType = 'plain' | 'ambient';\n\nexport const CardContext = createContext<{ type: CardType }>({ type: 'plain' });\n",".card {\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border-radius: 20px;\n background: var(--tgui--card_bg_color);\n box-shadow:\n 0 32px 64px 0 rgba(0, 0, 0, 0.04),\n 0 0 2px 1px rgba(0, 0, 0, 0.02);\n}\n\n.card > * {\n flex-shrink: 0;\n}\n\n.cardAmbient {\n background: var(--tgui--black);\n}\n\n.cell {\n padding: 0 20px;\n background: var(--tgui--card_bg_color);\n}\n\n.cellAmbient {\n --tgui--cell--middle--padding: 12px 0;\n\n position: absolute;\n inset: auto 0 0 0;\n padding-top: 64px;\n padding-bottom: 4px;\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0) 0%,\n rgba(0, 0, 0, 0.12) 22%,\n rgba(0, 0, 0, 0.55) 62%,\n rgba(0, 0, 0, 0.85) 100%\n );\n color: var(--tgui--white);\n}\n\n.cellHeader {\n font-weight: var(--tgui--font_weight--accent2);\n}\n\n.cellSubtitle {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.cellAmbient .cellHeader {\n color: var(--tgui--white);\n}\n\n.cellAmbient .cellSubtitle {\n color: rgba(255, 255, 255, 0.8);\n}\n",".cell {\n --tgui--cell--middle--padding: 16px 0;\n\n display: flex;\n align-items: center;\n gap: 24px;\n padding: 0 24px;\n}\n\n.before,\n.after {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.middle {\n flex-grow: 1;\n min-inline-size: 0;\n max-inline-size: 100%;\n padding: var(--tgui--cell--middle--padding);\n\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.middle > *,\n.title {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.multiline .middle > *,\n.multiline .title {\n white-space: normal;\n}\n\n.head {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.subhead {\n color: var(--tgui--subtitle_text_color);\n}\n\n.hint,\n.subtitle,\n.description {\n color: var(--tgui--hint_color);\n}\n\n.hovered {\n background: var(--tgui--tertiary_bg_color);\n}\n\n.ios {\n --tgui--cell--middle--padding: 12px 0;\n gap: 16px;\n padding: 0 16px;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .interactive:not([data-disabled]):hover {\n background: var(--tgui--tertiary_bg_color);\n }\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Cell.module.css';\n\nexport const cell = cva(styles.cell, {\n variants: {\n platform: { ios: styles.ios, base: null },\n hovered: { true: styles.hovered },\n interactive: { true: styles.interactive },\n multiline: { true: styles.multiline },\n },\n});\n","'use client';\n\nimport type { ElementType, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Caption } from '../Caption';\nimport { Subheadline } from '../Subheadline';\nimport { Tappable, type TappableProps } from '../Tappable';\nimport { Text } from '../Text';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Cell.module.css';\nimport { cell } from './Cell.variants';\n\nexport interface CellProps extends Omit<TappableProps, 'Component'> {\n ref?: Ref<HTMLElement>;\n Component?: ElementType;\n subhead?: ReactNode;\n hint?: ReactNode;\n titleBadge?: ReactNode;\n subtitle?: ReactNode;\n description?: ReactNode;\n before?: ReactNode;\n after?: ReactNode;\n hovered?: boolean;\n multiline?: boolean;\n}\n\nfunction CellTitle({ ios, children }: { ios: boolean; children: ReactNode }) {\n return ios ? (\n <Text className={styles.head}>{children}</Text>\n ) : (\n <Subheadline level=\"1\" className={styles.head}>\n {children}\n </Subheadline>\n );\n}\n\nfunction CellDescription({ ios, children }: { ios: boolean; children: ReactNode }) {\n return ios ? (\n <Caption className={styles.description}>{children}</Caption>\n ) : (\n <Subheadline level=\"2\" className={styles.description}>\n {children}\n </Subheadline>\n );\n}\n\nexport function Cell({\n ref,\n Component = 'div',\n subhead,\n children,\n hint,\n titleBadge,\n subtitle,\n description,\n before,\n after,\n hovered,\n multiline,\n className,\n ...rest\n}: CellProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n const hasTitle = children != null || hint != null || titleBadge != null;\n const interactive =\n rest.onClick != null ||\n rest.href != null ||\n Component === 'a' ||\n Component === 'button' ||\n Component === 'label';\n\n return (\n <Tappable\n ref={ref}\n Component={Component}\n className={cn(cell({ platform, hovered, multiline, interactive }), className)}\n {...rest}\n >\n {before != null ? <div className={styles.before}>{before}</div> : null}\n\n <div className={styles.middle}>\n {subhead != null ? (\n <Subheadline level=\"2\" className={styles.subhead}>\n {subhead}\n </Subheadline>\n ) : null}\n\n {hasTitle ? (\n <CellTitle ios={ios}>\n {children != null ? <span className={styles.title}>{children}</span> : null}\n {hint != null ? <span className={styles.hint}>{hint}</span> : null}\n {titleBadge}\n </CellTitle>\n ) : null}\n\n {subtitle != null ? (\n <Subheadline level=\"2\" className={styles.subtitle}>\n {subtitle}\n </Subheadline>\n ) : null}\n\n {description != null ? <CellDescription ios={ios}>{description}</CellDescription> : null}\n </div>\n\n {after != null ? <div className={styles.after}>{after}</div> : null}\n </Tappable>\n );\n}\n\nCell.displayName = 'Cell';\n","'use client';\n\nimport { type Ref, useContext } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Cell, type CellProps } from '../Cell';\nimport { CardContext } from './Card.context';\nimport styles from './Card.module.css';\n\nexport interface CardCellProps extends CellProps {\n ref?: Ref<HTMLElement>;\n}\n\nexport function CardCell({ ref, children, subtitle, className, ...rest }: CardCellProps) {\n const { type } = useContext(CardContext);\n const ambient = type === 'ambient';\n\n return (\n <Cell\n ref={ref}\n className={cn(styles.cell, ambient && styles.cellAmbient, className)}\n subtitle={\n subtitle != null ? <span className={styles.cellSubtitle}>{subtitle}</span> : undefined\n }\n {...rest}\n >\n {children != null ? <span className={styles.cellHeader}>{children}</span> : null}\n </Cell>\n );\n}\n\nCardCell.displayName = 'CardCell';\n","'use client';\n\nimport { type HTMLAttributes, type Ref, useMemo } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { CardContext, type CardType } from './Card.context';\nimport styles from './Card.module.css';\nimport { CardCell } from './CardCell';\n\nexport interface CardProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n type?: CardType;\n}\n\nexport function Card({ ref, type = 'plain', className, children, ...rest }: CardProps) {\n const context = useMemo(() => ({ type }), [type]);\n\n return (\n <CardContext.Provider value={context}>\n <article\n ref={ref}\n className={cn(styles.card, type === 'ambient' && styles.cardAmbient, className)}\n {...rest}\n >\n {children}\n </article>\n </CardContext.Provider>\n );\n}\n\nCard.displayName = 'Card';\nCard.Cell = CardCell;\n",".checkbox {\n position: relative;\n display: inline-flex;\n cursor: pointer;\n}\n\n.checkbox[data-disabled] {\n cursor: default;\n opacity: 0.3;\n}\n\n.input {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n cursor: inherit;\n}\n\n.box {\n position: relative;\n width: 20px;\n height: 20px;\n border-radius: 6px;\n box-shadow: inset 0 0 0 2px var(--tgui--outline);\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .box {\n transition:\n box-shadow 0.15s ease-out,\n background 0.15s ease-out;\n }\n}\n\n.input:checked + .box,\n.input:indeterminate + .box {\n background: var(--tgui--link_color);\n box-shadow: none;\n}\n\n.input:focus-visible + .box {\n box-shadow: 0 0 0 2px var(--tgui--link_color);\n}\n\n.input:checked + .box::after {\n content: \"\";\n position: absolute;\n left: 7px;\n top: 3px;\n width: 5px;\n height: 9px;\n border: solid var(--tgui--button_text_color);\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n}\n\n.input:indeterminate + .box::after {\n content: \"\";\n position: absolute;\n left: 4px;\n top: 9px;\n width: 12px;\n height: 2px;\n background: var(--tgui--button_text_color);\n}\n","import { type InputHTMLAttributes, type Ref, useEffect, useRef } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Checkbox.module.css';\n\nexport interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {\n ref?: Ref<HTMLInputElement>;\n indeterminate?: boolean;\n}\n\nexport function Checkbox({\n ref,\n indeterminate = false,\n disabled,\n className,\n style,\n ...rest\n}: CheckboxProps) {\n const inner = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (inner.current) inner.current.indeterminate = indeterminate;\n }, [indeterminate]);\n\n const mergeRef = (node: HTMLInputElement | null) => {\n inner.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n };\n\n return (\n <span\n className={cn(styles.checkbox, className)}\n style={style}\n data-disabled={disabled || undefined}\n >\n <input\n ref={mergeRef}\n type=\"checkbox\"\n className={styles.input}\n disabled={disabled}\n {...rest}\n />\n <span className={styles.box} aria-hidden />\n </span>\n );\n}\n\nCheckbox.displayName = 'Checkbox';\n",".root {\n display: inline-flex;\n color: var(--tgui--link_color);\n}\n\n.svg {\n display: block;\n}\n\n.track {\n stroke: var(--tgui--tertiary_bg_color);\n}\n\n.indicator {\n stroke: currentColor;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .indicator {\n transition: stroke-dashoffset 0.25s ease;\n }\n}\n","export type CircularProgressSize = 's' | 'm' | 'l';\n\nexport const DIMENSION: Record<CircularProgressSize, number> = { s: 20, m: 28, l: 36 };\nexport const STROKE: Record<CircularProgressSize, number> = { s: 2, m: 2.5, l: 3 };\n","import type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './CircularProgress.module.css';\nimport { type CircularProgressSize, DIMENSION, STROKE } from './CircularProgress.variants';\n\nexport type { CircularProgressSize };\n\nexport interface CircularProgressProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'size'> {\n ref?: Ref<HTMLSpanElement>;\n value?: number;\n size?: CircularProgressSize;\n}\n\nexport function CircularProgress({\n ref,\n value = 0,\n size = 'm',\n className,\n ...rest\n}: CircularProgressProps) {\n const clamped = Math.max(0, Math.min(100, value));\n const dimension = DIMENSION[size];\n const stroke = STROKE[size];\n const radius = (dimension - stroke) / 2;\n const circumference = 2 * Math.PI * radius;\n const center = dimension / 2;\n\n return (\n <span\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={Math.round(clamped)}\n className={cn(styles.root, className)}\n {...rest}\n >\n <svg\n className={styles.svg}\n width={dimension}\n height={dimension}\n viewBox={`0 0 ${dimension} ${dimension}`}\n aria-hidden\n >\n <circle\n className={styles.track}\n cx={center}\n cy={center}\n r={radius}\n strokeWidth={stroke}\n fill=\"none\"\n />\n <circle\n className={styles.indicator}\n cx={center}\n cy={center}\n r={radius}\n strokeWidth={stroke}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={circumference * (1 - clamped / 100)}\n fill=\"none\"\n />\n </svg>\n </span>\n );\n}\n\nCircularProgress.displayName = 'CircularProgress';\n",".divider {\n margin: 0;\n border: none;\n border-block-start: var(--tgui--border--width) solid var(--tgui--outline);\n}\n","import type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Divider.module.css';\n\nexport interface DividerProps extends HTMLAttributes<HTMLHRElement> {\n ref?: Ref<HTMLHRElement>;\n}\n\nexport function Divider({ ref, className, ...rest }: DividerProps) {\n return <hr ref={ref} className={cn(styles.divider, className)} {...rest} />;\n}\n\nDivider.displayName = 'Divider';\n",".headline {\n font-size: var(--tgui--headline--font_size);\n line-height: var(--tgui--headline--line_height);\n}\n","import type { Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Typography, type TypographyProps } from '../Typography';\nimport styles from './Headline.module.css';\n\nexport interface HeadlineProps extends TypographyProps {\n ref?: Ref<HTMLElement>;\n}\n\nexport function Headline({\n ref,\n weight = '2',\n className,\n Component = 'h5',\n ...rest\n}: HeadlineProps) {\n return (\n <Typography\n ref={ref}\n weight={weight}\n Component={Component}\n className={cn(styles.headline, className)}\n {...rest}\n />\n );\n}\n\nHeadline.displayName = 'Headline';\n",".iconButton {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n padding: 0;\n border: none;\n overflow: hidden;\n border-radius: 10px;\n color: var(--tgui--link_color);\n background: transparent;\n}\n\n.circle {\n border-radius: 50%;\n}\n\n.s {\n width: 30px;\n height: 30px;\n}\n\n.m {\n width: 36px;\n height: 36px;\n}\n\n.l {\n width: 44px;\n height: 44px;\n}\n\n.iconButton::after {\n content: \"\";\n position: absolute;\n inset: 0;\n opacity: 0;\n background: currentColor;\n}\n\n.ios::after {\n content: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .iconButton::after {\n transition: opacity 0.15s ease-out;\n }\n}\n\n@media (hover: hover) and (pointer: fine) {\n .iconButton:not([data-disabled]):hover::after {\n opacity: 0.08;\n }\n}\n\n.icon {\n display: flex;\n z-index: var(--tgui--z-index--simple);\n}\n\n.icon svg {\n display: block;\n}\n\n.mode-bezeled {\n color: var(--tgui--link_color);\n background: var(--tgui--secondary_fill);\n}\n\n.mode-plain {\n color: var(--tgui--link_color);\n}\n\n.mode-gray {\n color: var(--tgui--plain_foreground);\n background: var(--tgui--plain_background);\n}\n\n.mode-outline {\n color: var(--tgui--plain_foreground);\n box-shadow: inset 0 0 0 1px var(--tgui--outline);\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './IconButton.module.css';\n\nexport type IconButtonMode = 'bezeled' | 'plain' | 'gray' | 'outline';\nexport type IconButtonSize = 's' | 'm' | 'l';\n\nexport const iconButton = cva(styles.iconButton, {\n variants: {\n mode: {\n bezeled: styles['mode-bezeled'],\n plain: styles['mode-plain'],\n gray: styles['mode-gray'],\n outline: styles['mode-outline'],\n },\n size: { s: styles.s, m: styles.m, l: styles.l },\n circle: { true: styles.circle },\n platform: { ios: styles.ios, base: null },\n },\n defaultVariants: { mode: 'plain', size: 'm' },\n});\n","'use client';\n\nimport type { AllHTMLAttributes, ElementType, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Tappable } from '../Tappable';\nimport { useTgui } from '../TguiProvider';\nimport styles from './IconButton.module.css';\nimport { type IconButtonMode, type IconButtonSize, iconButton } from './IconButton.variants';\n\nexport type { IconButtonMode, IconButtonSize };\n\nexport interface IconButtonProps extends Omit<AllHTMLAttributes<HTMLElement>, 'size'> {\n ref?: Ref<HTMLElement>;\n Component?: ElementType;\n mode?: IconButtonMode;\n size?: IconButtonSize;\n circle?: boolean;\n}\n\nexport function IconButton({\n ref,\n Component = 'button',\n mode = 'plain',\n size = 'm',\n circle = false,\n type,\n className,\n children,\n ...rest\n}: IconButtonProps) {\n const { platform } = useTgui();\n\n return (\n <Tappable\n ref={ref}\n Component={Component}\n type={Component === 'button' ? (type ?? 'button') : type}\n className={cn(iconButton({ mode, size, circle, platform }), className)}\n {...rest}\n >\n <span className={styles.icon}>{children}</span>\n </Tappable>\n );\n}\n\nIconButton.displayName = 'IconButton';\n",".base {\n position: relative;\n padding: 20px 22px 16px;\n background: var(--tgui--bg_color);\n}\n\n.body {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n padding: 12px 16px;\n}\n\n.body > :not(:first-child) {\n margin-left: 12px;\n}\n\n.base .body {\n border-radius: 14px;\n box-shadow: 0 0 0 2px var(--tgui--outline);\n}\n\n.ios .body {\n min-height: 48px;\n border-radius: 12px;\n background: var(--tgui--tertiary_bg_color);\n}\n\n.align-start .body {\n align-items: flex-start;\n}\n\n.before,\n.after {\n display: flex;\n align-items: center;\n}\n\n.header {\n position: absolute;\n top: 6px;\n left: 32px;\n max-width: calc(100% - 76px);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n padding: 0 6px;\n border-radius: 5px;\n color: var(--tgui--secondary_hint_color);\n background: var(--tgui--bg_color);\n}\n\n.focused.base .body {\n box-shadow: 0 0 0 2px var(--tgui--link_color);\n}\n\n.focused.base .header {\n color: var(--tgui--link_color);\n}\n\n.error.base .body {\n box-shadow: 0 0 0 2px var(--tgui--destructive_text_color);\n}\n\n.error.base .header {\n color: var(--tgui--destructive_text_color);\n}\n\n.error.ios .body {\n box-shadow: 0 0 0 1.5px var(--tgui--destructive_text_color);\n}\n\n.disabled {\n pointer-events: none;\n}\n\n.disabled.ios {\n opacity: 0.35;\n}\n","import type { ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './FormField.module.css';\n\nexport type FormFieldStatus = 'default' | 'error' | 'focused';\n\nexport interface FormFieldProps {\n ref?: Ref<HTMLDivElement>;\n ios?: boolean;\n status?: FormFieldStatus;\n disabled?: boolean;\n alignStart?: boolean;\n header?: ReactNode;\n before?: ReactNode;\n after?: ReactNode;\n className?: string;\n children: ReactNode;\n}\n\nexport function FormField({\n ref,\n ios = false,\n status = 'default',\n disabled = false,\n alignStart = false,\n header,\n before,\n after,\n className,\n children,\n}: FormFieldProps) {\n return (\n <div\n ref={ref}\n className={cn(\n ios ? styles.ios : styles.base,\n status === 'error' && styles.error,\n status === 'focused' && styles.focused,\n disabled && styles.disabled,\n alignStart && styles['align-start'],\n className,\n )}\n aria-disabled={disabled || undefined}\n >\n {/* biome-ignore lint/a11y/noLabelWithoutControl: the control is the field passed in as children */}\n <label className={styles.body}>\n {before != null ? <span className={styles.before}>{before}</span> : null}\n {children}\n {after != null ? <span className={styles.after}>{after}</span> : null}\n </label>\n {header != null && !ios ? <span className={styles.header}>{header}</span> : null}\n </div>\n );\n}\n\nFormField.displayName = 'FormField';\n",".field {\n display: block;\n width: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n background: transparent;\n color: var(--tgui--text_color);\n text-overflow: ellipsis;\n}\n\n.field::placeholder {\n color: var(--tgui--secondary_hint_color);\n}\n\n.field::-webkit-outer-spin-button,\n.field::-webkit-inner-spin-button {\n appearance: none;\n}\n","'use client';\n\nimport {\n type FocusEvent,\n type InputHTMLAttributes,\n type ReactNode,\n type Ref,\n useState,\n} from 'react';\nimport { FormField } from '../FormField';\nimport { Subheadline } from '../Subheadline';\nimport { Text } from '../Text';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Input.module.css';\n\nexport type InputStatus = 'default' | 'error' | 'focused';\n\nexport interface InputProps extends InputHTMLAttributes<HTMLInputElement> {\n ref?: Ref<HTMLInputElement>;\n header?: ReactNode;\n before?: ReactNode;\n after?: ReactNode;\n status?: InputStatus;\n}\n\nexport function Input({\n ref,\n type = 'text',\n header,\n before,\n after,\n status,\n disabled,\n className,\n onFocus,\n onBlur,\n ...rest\n}: InputProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n const [focused, setFocused] = useState(false);\n const state = status ?? (focused ? 'focused' : 'default');\n const Typography = ios ? Text : Subheadline;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n if (!disabled) setFocused(true);\n onFocus?.(event);\n };\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n setFocused(false);\n onBlur?.(event);\n };\n\n return (\n <FormField\n ios={ios}\n status={state}\n disabled={disabled}\n header={header}\n before={before}\n after={after}\n className={className}\n >\n <Typography\n ref={ref as Ref<HTMLElement>}\n Component=\"input\"\n className={styles.field}\n type={type}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...rest}\n />\n </FormField>\n );\n}\n\nInput.displayName = 'Input';\n",".large-title {\n font-size: var(--tgui--large_title--font_size);\n line-height: var(--tgui--large_title--line_height);\n\n letter-spacing: -0.02em;\n}\n","import type { Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Typography, type TypographyProps } from '../Typography';\nimport styles from './LargeTitle.module.css';\n\nexport interface LargeTitleProps extends TypographyProps {\n ref?: Ref<HTMLElement>;\n}\n\nexport function LargeTitle({\n ref,\n weight = '1',\n className,\n Component = 'h1',\n ...rest\n}: LargeTitleProps) {\n return (\n <Typography\n ref={ref}\n weight={weight}\n Component={Component}\n className={cn(styles['large-title'], className)}\n {...rest}\n />\n );\n}\n\nLargeTitle.displayName = 'LargeTitle';\n",".list {\n box-sizing: border-box;\n}\n\n.ios {\n padding: 10px 18px;\n}\n\n.list > :not(:last-child) {\n margin-bottom: 12px;\n}\n","'use client';\n\nimport type { ElementType, HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { useTgui } from '../TguiProvider';\nimport styles from './List.module.css';\n\nexport interface ListProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n Component?: ElementType;\n}\n\nexport function List({ ref, Component = 'div', className, children, ...rest }: ListProps) {\n const { platform } = useTgui();\n\n return (\n <Component\n ref={ref}\n className={cn(styles.list, platform === 'ios' && styles.ios, className)}\n {...rest}\n >\n {children}\n </Component>\n );\n}\n\nList.displayName = 'List';\n",".level-1 {\n font-size: var(--tgui--title1--font_size);\n line-height: var(--tgui--title1--line_height);\n}\n\n.level-2 {\n font-size: var(--tgui--title2--font_size);\n line-height: var(--tgui--title2--line_height);\n}\n\n.level-3 {\n font-size: var(--tgui--title3--font_size);\n line-height: var(--tgui--title3--line_height);\n}\n","import type { ElementType } from 'react';\nimport styles from './Title.module.css';\n\nexport type TitleLevel = '1' | '2' | '3';\n\nexport const TITLE_LEVELS: Record<TitleLevel, { tag: ElementType; className: string }> = {\n '1': { tag: 'h2', className: styles['level-1'] },\n '2': { tag: 'h3', className: styles['level-2'] },\n '3': { tag: 'h4', className: styles['level-3'] },\n};\n","import type { Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Typography, type TypographyProps } from '../Typography';\nimport { TITLE_LEVELS, type TitleLevel } from './Title.variants';\n\nexport interface TitleProps extends TypographyProps {\n ref?: Ref<HTMLElement>;\n level?: TitleLevel;\n}\n\nexport function Title({ ref, level = '2', Component, className, ...rest }: TitleProps) {\n const { tag, className: levelClass } = TITLE_LEVELS[level];\n\n return (\n <Typography\n ref={ref}\n Component={Component ?? tag}\n className={cn(levelClass, className)}\n {...rest}\n />\n );\n}\n\nTitle.displayName = 'Title';\n",".placeholder {\n overflow: hidden;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n gap: 24px;\n padding: 32px;\n}\n\n.fields {\n margin: 0;\n text-align: center;\n overflow-wrap: anywhere;\n}\n\n.description {\n color: var(--tgui--hint_color);\n}\n\n.description:not(:first-child) {\n margin-top: 8px;\n}\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Text } from '../Text';\nimport { Title } from '../Title';\nimport styles from './Placeholder.module.css';\n\nexport interface PlaceholderProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n children?: ReactNode;\n header?: ReactNode;\n description?: ReactNode;\n action?: ReactNode;\n}\n\nexport function Placeholder({\n ref,\n children,\n header,\n description,\n action,\n className,\n ...rest\n}: PlaceholderProps) {\n return (\n <section ref={ref} className={cn(styles.placeholder, className)} {...rest}>\n {children}\n {header != null || description != null ? (\n <dl className={styles.fields}>\n {header != null ? (\n <Title Component=\"dt\" level=\"3\" weight=\"2\">\n {header}\n </Title>\n ) : null}\n {description != null ? (\n <Text Component=\"dd\" className={styles.description}>\n {description}\n </Text>\n ) : null}\n </dl>\n ) : null}\n {action}\n </section>\n );\n}\n\nPlaceholder.displayName = 'Placeholder';\n",".track {\n overflow: hidden;\n width: 100%;\n height: 4px;\n border-radius: 2px;\n background: var(--tgui--tertiary_bg_color);\n}\n\n.bar {\n height: 100%;\n border-radius: inherit;\n background: var(--tgui--link_color);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .bar {\n transition: width 0.25s ease;\n }\n}\n","import type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Progress.module.css';\n\nexport interface ProgressProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n value?: number;\n}\n\nexport function Progress({ ref, value = 0, className, ...rest }: ProgressProps) {\n const clamped = Math.max(0, Math.min(100, value));\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={Math.round(clamped)}\n className={cn(styles.track, className)}\n {...rest}\n >\n <div className={styles.bar} style={{ width: `${clamped}%` }} />\n </div>\n );\n}\n\nProgress.displayName = 'Progress';\n",".radio {\n position: relative;\n display: inline-flex;\n cursor: pointer;\n}\n\n.radio[data-disabled] {\n cursor: default;\n opacity: 0.3;\n}\n\n.input {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n cursor: inherit;\n}\n\n.dot {\n position: relative;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n box-shadow: inset 0 0 0 2px var(--tgui--outline);\n pointer-events: none;\n}\n\n.dot::after {\n content: \"\";\n position: absolute;\n inset: 5px;\n border-radius: 50%;\n background: var(--tgui--link_color);\n transform: scale(0);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .dot {\n transition: box-shadow 0.15s ease-out;\n }\n\n .dot::after {\n transition: transform 0.15s ease-out;\n }\n}\n\n.input:checked + .dot {\n box-shadow: inset 0 0 0 2px var(--tgui--link_color);\n}\n\n.input:checked + .dot::after {\n transform: scale(1);\n}\n\n.input:focus-visible + .dot {\n box-shadow:\n inset 0 0 0 2px var(--tgui--outline),\n 0 0 0 2px var(--tgui--link_color);\n}\n\n.input:checked:focus-visible + .dot {\n box-shadow:\n inset 0 0 0 2px var(--tgui--link_color),\n 0 0 0 2px var(--tgui--link_color);\n}\n","import type { InputHTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Radio.module.css';\n\nexport interface RadioProps extends InputHTMLAttributes<HTMLInputElement> {\n ref?: Ref<HTMLInputElement>;\n}\n\nexport function Radio({ ref, disabled, className, style, ...rest }: RadioProps) {\n return (\n <span\n className={cn(styles.radio, className)}\n style={style}\n data-disabled={disabled || undefined}\n >\n <input ref={ref} type=\"radio\" className={styles.input} disabled={disabled} {...rest} />\n <span className={styles.dot} aria-hidden />\n </span>\n );\n}\n\nRadio.displayName = 'Radio';\n",".body {\n display: flex;\n flex-direction: column;\n}\n\n.sectionBase .bodyWithHeader {\n background: var(--tgui--section_bg_color);\n box-shadow: var(--tgui--base--section--box_shadow);\n}\n\n.sectionIos .body {\n border-radius: 12px;\n background: var(--tgui--section_bg_color);\n}\n\n.sectionIos .body > :first-child {\n border-radius: 12px 12px 0 0;\n}\n\n.sectionIos .body > :last-child {\n border-radius: 0 0 12px 12px;\n}\n\n.sectionIos .body > :only-child {\n border-radius: 12px;\n}\n\n.header {\n padding: 20px 24px 4px 22px;\n color: var(--tgui--link_color);\n}\n\n.headerLarge {\n padding-left: 24px;\n color: var(--tgui--text_color);\n}\n\n.headerIos {\n padding: 16px 16px 8px;\n color: var(--tgui--section_header_text_color);\n}\n\n.headerIos.headerLarge {\n padding: 0 0 12px;\n color: var(--tgui--text_color);\n}\n\n.footer {\n padding: 12px 24px;\n}\n\n.footerIos {\n padding: 8px 16px 0;\n}\n\n.footerCentered {\n padding: 16px 24px 20px;\n text-align: center;\n}\n\n.footerIos.footerCentered {\n padding: 16px 16px 0;\n}\n\n.footerText {\n color: var(--tgui--hint_color);\n}\n","'use client';\n\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Caption } from '../Caption';\nimport { Subheadline } from '../Subheadline';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Section.module.css';\n\nexport interface SectionFooterProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n centered?: boolean;\n}\n\nfunction FooterText({ ios, children }: { ios: boolean; children: ReactNode }) {\n return ios ? (\n <Caption className={styles.footerText}>{children}</Caption>\n ) : (\n <Subheadline level=\"2\" className={styles.footerText}>\n {children}\n </Subheadline>\n );\n}\n\nexport function SectionFooter({\n ref,\n centered = false,\n className,\n children,\n ...rest\n}: SectionFooterProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n\n return (\n <footer\n ref={ref}\n className={cn(\n styles.footer,\n ios && styles.footerIos,\n centered && styles.footerCentered,\n className,\n )}\n {...rest}\n >\n <FooterText ios={ios}>{children}</FooterText>\n </footer>\n );\n}\n\nSectionFooter.displayName = 'SectionFooter';\n","'use client';\n\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Caption } from '../Caption';\nimport { Subheadline } from '../Subheadline';\nimport { Text } from '../Text';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Section.module.css';\n\nexport interface SectionHeaderProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n large?: boolean;\n}\n\nfunction HeaderText({\n ios,\n large,\n children,\n}: {\n ios: boolean;\n large: boolean;\n children: ReactNode;\n}) {\n if (large) {\n return ios ? (\n <Subheadline Component=\"h2\" level=\"1\" weight=\"2\">\n {children}\n </Subheadline>\n ) : (\n <Text Component=\"h2\" weight=\"2\">\n {children}\n </Text>\n );\n }\n return ios ? (\n <Caption Component=\"h2\" caps>\n {children}\n </Caption>\n ) : (\n <Subheadline Component=\"h2\" level=\"2\" weight=\"2\">\n {children}\n </Subheadline>\n );\n}\n\nexport function SectionHeader({\n ref,\n large = false,\n className,\n children,\n ...rest\n}: SectionHeaderProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n\n return (\n <header\n ref={ref}\n className={cn(styles.header, ios && styles.headerIos, large && styles.headerLarge, className)}\n {...rest}\n >\n <HeaderText ios={ios} large={large}>\n {children}\n </HeaderText>\n </header>\n );\n}\n\nSectionHeader.displayName = 'SectionHeader';\n","'use client';\n\nimport {\n Children,\n Fragment,\n type HTMLAttributes,\n isValidElement,\n type ReactNode,\n type Ref,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Divider } from '../Divider';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Section.module.css';\nimport { SectionFooter } from './SectionFooter';\nimport { SectionHeader } from './SectionHeader';\n\nexport interface SectionProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n header?: ReactNode;\n footer?: ReactNode;\n}\n\nconst isText = (node: ReactNode) => typeof node === 'string' || typeof node === 'number';\n\nexport function Section({ ref, header, footer, className, children, ...rest }: SectionProps) {\n const { platform } = useTgui();\n const rows = Children.toArray(children);\n\n return (\n <section\n ref={ref}\n className={cn(platform === 'ios' ? styles.sectionIos : styles.sectionBase, className)}\n {...rest}\n >\n <div className={styles.bodyWithHeader}>\n {isText(header) ? <SectionHeader>{header}</SectionHeader> : header}\n <div className={styles.body}>\n {rows.map((row, i) => (\n <Fragment key={isValidElement(row) ? row.key : i}>\n {row}\n {i < rows.length - 1 ? <Divider /> : null}\n </Fragment>\n ))}\n </div>\n </div>\n {isText(footer) ? <SectionFooter>{footer}</SectionFooter> : footer}\n </section>\n );\n}\n\nSection.displayName = 'Section';\nSection.Header = SectionHeader;\nSection.Footer = SectionFooter;\n",".base {\n position: relative;\n padding: 20px 22px 16px;\n background: var(--tgui--bg_color);\n}\n\n.row {\n position: relative;\n box-sizing: border-box;\n border-radius: 14px;\n}\n\n.base .row {\n box-shadow: inset 0 0 0 2px var(--tgui--outline);\n}\n\n.ios .row {\n border-radius: 12px;\n background: var(--tgui--tertiary_bg_color);\n}\n\n.select {\n appearance: none;\n display: block;\n width: 100%;\n min-height: 48px;\n margin: 0;\n padding: 12px 44px 12px 16px;\n border: 0;\n outline: 0;\n border-radius: inherit;\n background: transparent;\n color: var(--tgui--text_color);\n}\n\n.chevron {\n position: absolute;\n top: 50%;\n right: 18px;\n width: 8px;\n height: 8px;\n border: solid var(--tgui--secondary_hint_color);\n border-width: 0 2px 2px 0;\n transform: translateY(-75%) rotate(45deg);\n pointer-events: none;\n}\n\n.header {\n position: absolute;\n top: 6px;\n left: 32px;\n max-width: calc(100% - 76px);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n padding: 0 6px;\n border-radius: 5px;\n color: var(--tgui--secondary_hint_color);\n background: var(--tgui--bg_color);\n}\n\n.focused.base .row {\n box-shadow: inset 0 0 0 2px var(--tgui--link_color);\n}\n\n.focused.base .header {\n color: var(--tgui--link_color);\n}\n\n.error.base .row {\n box-shadow: inset 0 0 0 2px var(--tgui--destructive_text_color);\n}\n\n.error.base .header {\n color: var(--tgui--destructive_text_color);\n}\n\n.error.ios .row {\n box-shadow: inset 0 0 0 1.5px var(--tgui--destructive_text_color);\n}\n\n.disabled {\n pointer-events: none;\n}\n\n.disabled.ios {\n opacity: 0.35;\n}\n","'use client';\n\nimport {\n type FocusEvent,\n type ReactNode,\n type Ref,\n type SelectHTMLAttributes,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport type { InputStatus } from '../Input';\nimport { Subheadline } from '../Subheadline';\nimport { Text } from '../Text';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Select.module.css';\n\nexport interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {\n ref?: Ref<HTMLSelectElement>;\n header?: ReactNode;\n status?: InputStatus;\n}\n\nexport function Select({\n ref,\n header,\n status,\n disabled,\n className,\n onFocus,\n onBlur,\n children,\n ...rest\n}: SelectProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n const [focused, setFocused] = useState(false);\n const state = status ?? (focused ? 'focused' : 'default');\n const Typography = ios ? Text : Subheadline;\n\n const handleFocus = (event: FocusEvent<HTMLSelectElement>) => {\n if (!disabled) setFocused(true);\n onFocus?.(event);\n };\n const handleBlur = (event: FocusEvent<HTMLSelectElement>) => {\n setFocused(false);\n onBlur?.(event);\n };\n\n return (\n <div\n className={cn(\n ios ? styles.ios : styles.base,\n state === 'error' && styles.error,\n state === 'focused' && styles.focused,\n disabled && styles.disabled,\n className,\n )}\n aria-disabled={disabled || undefined}\n >\n <div className={styles.row}>\n <Typography\n ref={ref as Ref<HTMLElement>}\n Component=\"select\"\n className={styles.select}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...rest}\n >\n {children}\n </Typography>\n <span aria-hidden className={styles.chevron} />\n </div>\n {header != null && !ios ? <span className={styles.header}>{header}</span> : null}\n </div>\n );\n}\n\nSelect.displayName = 'Select';\n",".skeleton {\n display: block;\n}\n\n.visible {\n position: relative;\n overflow: hidden;\n min-height: 1em;\n border-radius: 8px;\n background: var(--tgui--skeleton);\n color: transparent;\n pointer-events: none;\n}\n\n.visible * {\n visibility: hidden;\n}\n\n.visible::after {\n content: \"\";\n position: absolute;\n inset: 0;\n transform: translateX(-100%);\n background: linear-gradient(\n 90deg,\n transparent,\n color-mix(in srgb, var(--tgui--text_color) 5%, transparent),\n transparent\n );\n animation: tgui-skeleton 1.5s ease-in-out infinite;\n}\n\n@keyframes tgui-skeleton {\n to {\n transform: translateX(100%);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .visible::after {\n animation: none;\n }\n}\n\n@media (prefers-reduced-transparency: reduce) {\n .visible {\n background: var(--tgui--tertiary_bg_color);\n }\n}\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Skeleton.module.css';\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n visible?: boolean;\n children?: ReactNode;\n}\n\nexport function Skeleton({ ref, visible = true, className, children, ...rest }: SkeletonProps) {\n return (\n <div\n ref={ref}\n aria-hidden={visible || undefined}\n className={cn(styles.skeleton, visible && styles.visible, className)}\n {...rest}\n >\n {children}\n </div>\n );\n}\n\nSkeleton.displayName = 'Skeleton';\n",".switch {\n position: relative;\n overflow: hidden;\n display: inline-flex;\n align-items: center;\n width: 52px;\n height: 32px;\n border-radius: 16px;\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.switch[data-disabled] {\n cursor: default;\n opacity: 0.4;\n}\n\n.input {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n cursor: inherit;\n}\n\n.control::before {\n position: absolute;\n content: \"\";\n inset: 0;\n background: var(--tgui--secondary_bg_color);\n}\n\n.base .control::before {\n border-radius: 16px;\n border: 3px solid var(--tgui--secondary_hint_color);\n}\n\n.control::after {\n position: absolute;\n content: \"\";\n top: 50%;\n transform: translateY(-50%);\n border-radius: 50%;\n}\n\n.base .control::after {\n width: 16px;\n height: 16px;\n margin-left: 8px;\n background: var(--tgui--secondary_hint_color);\n}\n\n.ios .control::before {\n background: rgba(120, 120, 128, 0.22);\n}\n\n.ios .control::after {\n width: 28px;\n height: 28px;\n margin-left: 2px;\n background: var(--tgui--white);\n box-shadow:\n 0 3px 8px 0 rgba(0, 0, 0, 0.12),\n 0 1px 1px 0 rgba(0, 0, 0, 0.16);\n}\n\n.input:checked + .control::before {\n border-color: var(--tgui--link_color);\n background-color: var(--tgui--link_color);\n}\n\n.input:checked + .control::after {\n transform: translateX(20px) translateY(-50%);\n}\n\n.base .input:checked + .control::after {\n width: 24px;\n height: 24px;\n background: var(--tgui--white);\n transform: translateX(16px) translateY(-50%);\n}\n\n.input:focus-visible + .control::before {\n box-shadow: 0 0 0 2px var(--tgui--link_color);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .control::before {\n transition:\n background-color 0.2s ease,\n border-color 0.2s ease;\n }\n .control::after {\n transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);\n }\n .ios .control::after {\n transition: transform 0.2s cubic-bezier(0.36, -0.24, 0.26, 1.32);\n }\n}\n","'use client';\n\nimport type { InputHTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Switch.module.css';\n\nexport interface SwitchProps extends InputHTMLAttributes<HTMLInputElement> {\n ref?: Ref<HTMLInputElement>;\n}\n\nexport function Switch({ ref, disabled, className, style, ...rest }: SwitchProps) {\n const { platform } = useTgui();\n\n return (\n <label\n className={cn(styles.switch, platform === 'ios' ? styles.ios : styles.base, className)}\n style={style}\n data-disabled={disabled || undefined}\n >\n <input ref={ref} type=\"checkbox\" className={styles.input} disabled={disabled} {...rest} />\n <span aria-hidden className={styles.control} />\n </label>\n );\n}\n\nSwitch.displayName = 'Switch';\n",".bar {\n display: flex;\n align-items: stretch;\n padding: 0 16px;\n padding-bottom: env(safe-area-inset-bottom, 0px);\n background: var(--tgui--surface_primary);\n box-shadow: 0 -0.5px 0 var(--tgui--divider);\n}\n\n.barIos {\n padding: 0;\n padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));\n}\n\n.item {\n flex: 1 0 0;\n min-inline-size: 0;\n max-inline-size: 100%;\n margin: 0;\n padding: 10px 16px 14px;\n border: none;\n background: transparent;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 4px;\n\n color: var(--tgui--secondary_hint_color);\n}\n\n.itemIos {\n padding: 7px 12px 2px;\n gap: 3px;\n}\n\n.itemSelected {\n color: var(--tgui--link_color);\n}\n\n.icon {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 64px;\n height: 32px;\n padding: 2px 10px;\n border-radius: 16px;\n}\n\n.itemIos .icon {\n min-width: 0;\n height: 28px;\n padding: 0;\n}\n\n.itemSelected:not(.itemIos) .icon {\n background: var(--tgui--secondary_fill);\n}\n\n.text {\n max-inline-size: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .item {\n transition: color 0.15s ease-out;\n }\n\n .icon {\n transition: background 0.15s ease-out;\n }\n}\n","'use client';\n\nimport type { ButtonHTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Caption } from '../Caption';\nimport { Tappable } from '../Tappable';\nimport { useTgui } from '../TguiProvider';\nimport styles from './TabBar.module.css';\n\nexport interface TabBarItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n ref?: Ref<HTMLElement>;\n selected?: boolean;\n text?: string;\n children?: ReactNode;\n}\n\nexport function TabBarItem({ ref, selected, text, children, className, ...rest }: TabBarItemProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n\n return (\n <Tappable\n ref={ref}\n Component=\"button\"\n interactiveAnimation=\"opacity\"\n aria-current={selected ? 'page' : undefined}\n className={cn(styles.item, ios && styles.itemIos, selected && styles.itemSelected, className)}\n {...rest}\n >\n {children != null ? <span className={styles.icon}>{children}</span> : null}\n {text != null ? (\n <Caption className={styles.text} weight=\"2\" level={ios ? '2' : '1'}>\n {text}\n </Caption>\n ) : null}\n </Tappable>\n );\n}\n\nTabBarItem.displayName = 'TabBarItem';\n","'use client';\n\nimport type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { useTgui } from '../TguiProvider';\nimport styles from './TabBar.module.css';\nimport { TabBarItem } from './TabBarItem';\n\nexport interface TabBarProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n}\n\nexport function TabBar({ ref, className, children, ...rest }: TabBarProps) {\n const { platform } = useTgui();\n\n return (\n <nav\n ref={ref}\n className={cn(styles.bar, platform === 'ios' && styles.barIos, className)}\n {...rest}\n >\n {children}\n </nav>\n );\n}\n\nTabBar.displayName = 'TabBar';\nTabBar.Item = TabBarItem;\n",".field {\n display: block;\n width: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n resize: none;\n background: transparent;\n color: var(--tgui--text_color);\n font-family: inherit;\n line-height: 1.4;\n overflow-y: auto;\n}\n\n.field::placeholder {\n color: var(--tgui--secondary_hint_color);\n}\n","'use client';\n\nimport {\n type ChangeEvent,\n type FocusEvent,\n type MutableRefObject,\n type ReactNode,\n type Ref,\n type TextareaHTMLAttributes,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { FormField } from '../FormField';\nimport { Subheadline } from '../Subheadline';\nimport { Text } from '../Text';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Textarea.module.css';\n\nexport type TextareaStatus = 'default' | 'error' | 'focused';\n\nexport interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {\n ref?: Ref<HTMLTextAreaElement>;\n header?: ReactNode;\n status?: TextareaStatus;\n autoGrow?: boolean;\n maxRows?: number;\n}\n\nexport function Textarea({\n ref,\n header,\n status,\n autoGrow = false,\n maxRows,\n rows = 3,\n disabled,\n className,\n value,\n defaultValue,\n onFocus,\n onBlur,\n onChange,\n ...rest\n}: TextareaProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n const [focused, setFocused] = useState(false);\n const state = status ?? (focused ? 'focused' : 'default');\n const Typography = ios ? Text : Subheadline;\n\n const innerRef = useRef<HTMLTextAreaElement>(null);\n const setRefs = useCallback(\n (node: HTMLTextAreaElement | null) => {\n innerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as MutableRefObject<HTMLTextAreaElement | null>).current = node;\n },\n [ref],\n );\n\n const resize = useCallback(() => {\n const el = innerRef.current;\n if (!el || !autoGrow) return;\n el.style.height = 'auto';\n const cs = getComputedStyle(el);\n const lineHeight = Number.parseFloat(cs.lineHeight) || 20;\n const max = maxRows ? lineHeight * maxRows : Number.POSITIVE_INFINITY;\n el.style.height = `${Math.min(el.scrollHeight, max)}px`;\n el.style.overflowY = el.scrollHeight > max ? 'auto' : 'hidden';\n }, [autoGrow, maxRows]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: value drives the re-measure\n useEffect(resize, [resize, value, defaultValue]);\n\n const handleFocus = (event: FocusEvent<HTMLTextAreaElement>) => {\n if (!disabled) setFocused(true);\n onFocus?.(event);\n };\n const handleBlur = (event: FocusEvent<HTMLTextAreaElement>) => {\n setFocused(false);\n onBlur?.(event);\n };\n const handleChange = (event: ChangeEvent<HTMLTextAreaElement>) => {\n resize();\n onChange?.(event);\n };\n\n return (\n <FormField\n ios={ios}\n status={state}\n disabled={disabled}\n alignStart\n header={header}\n className={className}\n >\n <Typography\n ref={setRefs as Ref<HTMLElement>}\n Component=\"textarea\"\n className={styles.field}\n rows={rows}\n disabled={disabled}\n value={value}\n defaultValue={defaultValue}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...rest}\n />\n </FormField>\n );\n}\n\nTextarea.displayName = 'Textarea';\n"],"mappings":";;;;;;AAEA,SAAgB,EAAG,GAAG,GAAsB;CAC1C,OAAO,EAAK,CAAM;AACpB;;;;;;;;;;;;GECa,IAAS,EAAI,EAAO,QAAQ;CACvC,UAAU,EACR,MAAM;EACJ,IAAI,EAAO;EACX,IAAI,EAAO;EACX,IAAI,EAAO;EACX,IAAI,EAAO;EACX,IAAI,EAAO;EACX,IAAI,EAAO;CACb,EACF;CACA,iBAAiB,EAAE,MAAM,GAAG;AAC9B,CAAC;;;ACCD,SAAS,IAAa;CACpB,OACE,kBAAC,OAAD;EAAK,SAAQ;EAAY,MAAK;EAAe,eAAA;EAC3C,UAAA,kBAAC,QAAD,EAAM,GAAE,6FAA8F,CAAA;CACnG,CAAA;AAET;AAEA,SAAgB,EAAO,EACrB,QACA,UAAO,IACP,QACA,SAAM,IACN,YACA,iBACA,cACA,aACA,GAAG,KACW;CACd,IAAM,CAAC,GAAW,KAAgB,EAAwB,IAAI,GACxD,IAAY,KAAO,QAAQ,MAAQ,MAAM,MAAQ;CAEvD,OACE,kBA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AK;GACL,WAAU;GACV,WAAW,GAAO;GACZ;GACI;GACH;GACO;GACd,UA9Be,MAA2C;IAE9D,AADK,KAAU,EAAW,EAAI,GAC9B,IAAU,CAAK;GACjB;GA4BM,SA3Bc,MAA2C;IAE7D,AADA,EAAW,EAAK,GAChB,IAAS,CAAK;GAChB;GAyBM,WAxBgB,MAA4C;IAEhE,AADA,EAAO,GACP,IAAW,CAAK;GAClB;GAsBM,GAAI;EACL,CAAA;CACQ,CAAA;AAEf;AAEA,GAAS,cAAc"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/shared/lib/cn.ts","../src/components/Accordion/Accordion.module.css","../src/components/Accordion/context.ts","../src/components/Accordion/Accordion.tsx","../src/components/Accordion/AccordionItem.tsx","../src/components/Avatar/Avatar.module.css","../src/components/Avatar/Avatar.variants.ts","../src/components/Avatar/Avatar.tsx","../src/components/AvatarStack/AvatarStack.module.css","../src/components/AvatarStack/AvatarStack.tsx","../src/components/Badge/Badge.module.css","../src/components/Badge/Badge.variants.ts","../src/components/Badge/Badge.tsx","../src/components/Banner/Banner.module.css","../src/components/Banner/Banner.variants.ts","../src/components/Banner/Banner.tsx","../src/components/Blockquote/Blockquote.module.css","../src/components/Blockquote/Blockquote.tsx","../src/components/Breadcrumbs/Breadcrumbs.module.css","../src/components/Breadcrumbs/Breadcrumbs.tsx","../src/components/Spinner/Spinner.module.css","../src/components/Spinner/Spinner.variants.ts","../src/components/Spinner/Spinner.tsx","../src/components/Typography/Typography.module.css","../src/components/Typography/Typography.variants.ts","../src/components/Typography/Typography.tsx","../src/components/Subheadline/Subheadline.module.css","../src/components/Subheadline/Subheadline.variants.ts","../src/components/Subheadline/Subheadline.tsx","../src/components/TguiProvider/context.ts","../src/components/TguiProvider/useTgui.ts","../src/components/Tappable/Ripple.module.css","../src/components/Tappable/Ripple.tsx","../src/components/Tappable/Tappable.module.css","../src/components/Tappable/useRipple.ts","../src/components/Tappable/Tappable.tsx","../src/components/Text/Text.module.css","../src/components/Text/Text.tsx","../src/shared/lib/telegram.ts","../src/shared/lib/appearance.ts","../src/shared/lib/platform.ts","../src/components/TguiProvider/TguiProvider.module.css","../src/components/TguiProvider/TguiProvider.tsx","../src/components/Button/Button.module.css","../src/components/Button/Button.variants.ts","../src/components/Button/Button.tsx","../src/components/Caption/Caption.module.css","../src/components/Caption/Caption.variants.ts","../src/components/Caption/Caption.tsx","../src/components/Card/Card.context.ts","../src/components/Card/Card.module.css","../src/components/Cell/Cell.module.css","../src/components/Cell/Cell.variants.ts","../src/components/Cell/Cell.tsx","../src/components/Card/CardCell.tsx","../src/components/Card/Card.tsx","../src/components/Checkbox/Checkbox.module.css","../src/components/Checkbox/Checkbox.tsx","../src/components/Chip/Chip.module.css","../src/components/Chip/Chip.variants.ts","../src/components/Chip/Chip.tsx","../src/components/CircularProgress/CircularProgress.module.css","../src/components/CircularProgress/CircularProgress.variants.ts","../src/components/CircularProgress/CircularProgress.tsx","../src/components/Divider/Divider.module.css","../src/components/Divider/Divider.tsx","../src/components/FixedLayout/FixedLayout.module.css","../src/components/FixedLayout/FixedLayout.tsx","../src/components/Headline/Headline.module.css","../src/components/Headline/Headline.tsx","../src/components/HorizontalScroll/HorizontalScroll.module.css","../src/components/HorizontalScroll/HorizontalScroll.tsx","../src/components/IconButton/IconButton.module.css","../src/components/IconButton/IconButton.variants.ts","../src/components/IconButton/IconButton.tsx","../src/components/Image/Image.module.css","../src/components/Image/Image.tsx","../src/components/InlineButtons/context.ts","../src/components/InlineButtons/InlineButtons.module.css","../src/components/InlineButtons/InlineButtons.variants.ts","../src/components/InlineButtons/InlineButtonsItem.tsx","../src/components/InlineButtons/InlineButtons.tsx","../src/components/FormField/FormField.module.css","../src/components/FormField/FormField.tsx","../src/components/Input/Input.module.css","../src/components/Input/Input.tsx","../src/components/LargeTitle/LargeTitle.module.css","../src/components/LargeTitle/LargeTitle.tsx","../src/components/Link/Link.module.css","../src/components/Link/Link.tsx","../src/components/List/List.module.css","../src/components/List/List.tsx","../src/components/Pagination/Pagination.module.css","../src/components/Pagination/paginationRange.ts","../src/components/Pagination/CompactPagination.tsx","../src/components/Pagination/Pagination.tsx","../src/components/PinInput/PinInput.module.css","../src/components/PinInput/PinInput.tsx","../src/components/Title/Title.module.css","../src/components/Title/Title.variants.ts","../src/components/Title/Title.tsx","../src/components/Placeholder/Placeholder.module.css","../src/components/Placeholder/Placeholder.tsx","../src/components/Portal/Portal.tsx","../src/components/Progress/Progress.module.css","../src/components/Progress/Progress.tsx","../src/components/Radio/Radio.module.css","../src/components/Radio/Radio.tsx","../src/components/Rating/Rating.module.css","../src/components/Rating/Rating.tsx","../src/components/SearchBar/SearchBar.module.css","../src/components/SearchBar/SearchBar.tsx","../src/components/Section/Section.module.css","../src/components/Section/SectionFooter.tsx","../src/components/Section/SectionHeader.tsx","../src/components/Section/Section.tsx","../src/components/SegmentedControl/SegmentedControl.module.css","../src/components/SegmentedControl/SegmentedControl.tsx","../src/components/SegmentedControl/SegmentedControlItem.tsx","../src/components/Select/Select.module.css","../src/components/Select/Select.tsx","../src/shared/lib/useReducedMotion.ts","../src/components/Sheet/Sheet.module.css","../src/components/Sheet/Sheet.tsx","../src/components/Skeleton/Skeleton.module.css","../src/components/Skeleton/Skeleton.tsx","../src/components/Slider/Slider.module.css","../src/components/Slider/Slider.tsx","../src/components/Snackbar/context.ts","../src/components/Snackbar/Snackbar.module.css","../src/components/Snackbar/SnackbarProvider.tsx","../src/components/Snackbar/useSnackbar.ts","../src/components/Spoiler/particles.ts","../src/components/Spoiler/Spoiler.module.css","../src/components/Spoiler/Spoiler.tsx","../src/components/Stepper/Stepper.module.css","../src/components/Stepper/Stepper.tsx","../src/components/Steps/Steps.module.css","../src/components/Steps/Steps.tsx","../src/components/Switch/Switch.module.css","../src/components/Switch/Switch.tsx","../src/components/TabBar/TabBar.module.css","../src/components/TabBar/TabBarItem.tsx","../src/components/TabBar/TabBar.tsx","../src/components/Textarea/Textarea.module.css","../src/components/Textarea/Textarea.tsx","../src/components/Timeline/Timeline.module.css","../src/components/Timeline/Timeline.tsx","../src/components/Timeline/TimelineItem.tsx","../src/components/Tooltip/Tooltip.module.css","../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\n\nexport function cn(...inputs: ClassValue[]) {\n return clsx(inputs);\n}\n",".accordion {\n display: flex;\n flex-direction: column;\n}\n\n.item {\n border-bottom: var(--tgui--border--width, 1px) solid var(--tgui--divider);\n}\n\n.item:last-child {\n border-bottom: 0;\n}\n\n.header {\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n padding: 15px var(--tgui--accordion--inset, 20px);\n border: 0;\n background: transparent;\n color: var(--tgui--text_color);\n font-family: var(--tgui--font-family);\n font-size: 16px;\n font-weight: var(--tgui--font_weight--accent2);\n line-height: 22px;\n text-align: start;\n cursor: pointer;\n}\n\n.title {\n flex: 1;\n min-width: 0;\n}\n\n.chevron {\n flex-shrink: 0;\n width: 18px;\n height: 18px;\n color: var(--tgui--secondary_hint_color);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .chevron {\n transition: transform 0.2s ease;\n }\n}\n\n.header[aria-expanded=\"true\"] .chevron {\n transform: rotate(180deg);\n}\n\n@media (hover: hover) and (pointer: fine) {\n .header:hover .title {\n color: var(--tgui--link_color);\n }\n}\n\n.panel {\n display: grid;\n grid-template-rows: 0fr;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .panel {\n transition: grid-template-rows 0.25s ease;\n }\n}\n\n.panel--open {\n grid-template-rows: 1fr;\n}\n\n.panelInner {\n overflow: hidden;\n}\n\n.panelContent {\n padding: 2px var(--tgui--accordion--inset, 20px) 16px;\n color: var(--tgui--subtitle_text_color);\n font-family: var(--tgui--font-family);\n font-size: 15px;\n line-height: 21px;\n}\n","import { createContext } from 'react';\n\nexport interface AccordionContextValue {\n open: string[];\n toggle: (value: string) => void;\n}\n\nexport const AccordionContext = createContext<AccordionContextValue | null>(null);\n\nAccordionContext.displayName = 'AccordionContext';\n","'use client';\n\nimport { type HTMLAttributes, type Ref, useCallback, useMemo, useState } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Accordion.module.css';\nimport { AccordionContext } from './context';\n\nconst toArray = (value: string | string[] | undefined): string[] =>\n value == null ? [] : Array.isArray(value) ? value : [value];\n\nexport interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {\n ref?: Ref<HTMLDivElement>;\n multiple?: boolean;\n value?: string | string[];\n defaultValue?: string | string[];\n onChange?: (value: string[]) => void;\n}\n\nexport function Accordion({\n ref,\n multiple = false,\n value: valueProp,\n defaultValue,\n onChange,\n className,\n children,\n ...rest\n}: AccordionProps) {\n const [uncontrolled, setUncontrolled] = useState(() => toArray(defaultValue));\n const open = valueProp != null ? toArray(valueProp) : uncontrolled;\n\n const toggle = useCallback(\n (item: string) => {\n const isOpen = open.includes(item);\n const next = isOpen ? open.filter((v) => v !== item) : multiple ? [...open, item] : [item];\n if (valueProp == null) setUncontrolled(next);\n onChange?.(next);\n },\n [open, multiple, valueProp, onChange],\n );\n\n const context = useMemo(() => ({ open, toggle }), [open, toggle]);\n\n return (\n <AccordionContext.Provider value={context}>\n <div ref={ref} className={cn(styles.accordion, className)} {...rest}>\n {children}\n </div>\n </AccordionContext.Provider>\n );\n}\n\nAccordion.displayName = 'Accordion';\n","'use client';\n\nimport { type HTMLAttributes, type ReactNode, type Ref, useContext, useId } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Accordion.module.css';\nimport { AccordionContext } from './context';\n\nexport interface AccordionItemProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n value: string;\n header: ReactNode;\n}\n\nexport function AccordionItem({\n ref,\n value,\n header,\n className,\n children,\n ...rest\n}: AccordionItemProps) {\n const context = useContext(AccordionContext);\n if (!context) {\n throw new Error('AccordionItem must be used within an <Accordion>.');\n }\n const panelId = useId();\n const open = context.open.includes(value);\n\n return (\n <div ref={ref} className={cn(styles.item, className)} {...rest}>\n <button\n type=\"button\"\n className={styles.header}\n aria-expanded={open}\n aria-controls={panelId}\n onClick={() => context.toggle(value)}\n >\n <span className={styles.title}>{header}</span>\n <svg className={styles.chevron} viewBox=\"0 0 18 18\" fill=\"none\" aria-hidden>\n <path\n d=\"M4.5 7l4.5 4.5L13.5 7\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n <div className={cn(styles.panel, open && styles['panel--open'])}>\n <div className={styles.panelInner}>\n <div id={panelId} className={styles.panelContent} inert={!open} aria-hidden={!open}>\n {children}\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nAccordionItem.displayName = 'AccordionItem';\n",".avatar {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n flex-shrink: 0;\n overflow: hidden;\n border-radius: 50%;\n background: var(--tgui--tertiary_bg_color);\n color: var(--tgui--subtitle_text_color);\n font-family: var(--tgui--font-family);\n font-weight: var(--tgui--font_weight--accent2);\n line-height: 1;\n user-select: none;\n}\n\n.s20 {\n width: 20px;\n height: 20px;\n font-size: 9px;\n}\n\n.s24 {\n width: 24px;\n height: 24px;\n font-size: 10px;\n}\n\n.s28 {\n width: 28px;\n height: 28px;\n font-size: 11px;\n}\n\n.s40 {\n width: 40px;\n height: 40px;\n font-size: 15px;\n}\n\n.s48 {\n width: 48px;\n height: 48px;\n font-size: 18px;\n}\n\n.s96 {\n width: 96px;\n height: 96px;\n font-size: 34px;\n}\n\n.img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n}\n\n.acronym {\n text-transform: uppercase;\n}\n\n.icon {\n display: flex;\n width: 60%;\n height: 60%;\n}\n\n.icon > svg {\n width: 100%;\n height: 100%;\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Avatar.module.css';\n\nexport type AvatarSize = 20 | 24 | 28 | 40 | 48 | 96;\n\nexport const avatar = cva(styles.avatar, {\n variants: {\n size: {\n 20: styles.s20,\n 24: styles.s24,\n 28: styles.s28,\n 40: styles.s40,\n 48: styles.s48,\n 96: styles.s96,\n },\n },\n defaultVariants: { size: 40 },\n});\n","'use client';\n\nimport { type HTMLAttributes, type ReactNode, type Ref, useState } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Avatar.module.css';\nimport { type AvatarSize, avatar } from './Avatar.variants';\n\nexport type { AvatarSize };\n\nexport interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {\n ref?: Ref<HTMLSpanElement>;\n size?: AvatarSize;\n src?: string;\n alt?: string;\n acronym?: string;\n fallbackIcon?: ReactNode;\n}\n\nfunction PersonIcon() {\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden>\n <path d=\"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 2c-4.2 0-7 2.4-7 4.5V20h14v-1.5c0-2.1-2.8-4.5-7-4.5Z\" />\n </svg>\n );\n}\n\nexport function Avatar({\n ref,\n size = 40,\n src,\n alt = '',\n acronym,\n fallbackIcon,\n className,\n children,\n ...rest\n}: AvatarProps) {\n const [failedSrc, setFailedSrc] = useState<string | null>(null);\n const showImage = src != null && src !== '' && src !== failedSrc;\n\n return (\n <span ref={ref} className={cn(avatar({ size }), className)} {...rest}>\n {showImage ? (\n <img\n className={styles.img}\n src={src}\n alt={alt}\n loading=\"lazy\"\n onError={() => setFailedSrc(src)}\n />\n ) : acronym ? (\n <span className={styles.acronym}>{acronym}</span>\n ) : (\n <span className={styles.icon}>{fallbackIcon ?? <PersonIcon />}</span>\n )}\n {children}\n </span>\n );\n}\n\nAvatar.displayName = 'Avatar';\n",".stack {\n display: inline-flex;\n align-items: center;\n}\n\n.stack > * {\n margin-inline-start: calc(-1 * var(--tgui--avatar-stack--overlap, 8px));\n border-radius: 50%;\n box-shadow: 0 0 0 2px var(--tgui--bg_color);\n}\n\n.stack > *:first-child {\n margin-inline-start: 0;\n}\n","import type { CSSProperties, HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './AvatarStack.module.css';\n\nexport interface AvatarStackProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n overlap?: number;\n}\n\nexport function AvatarStack({ ref, overlap, className, style, ...rest }: AvatarStackProps) {\n return (\n <div\n ref={ref}\n className={cn(styles.stack, className)}\n style={\n overlap != null\n ? ({ ...style, '--tgui--avatar-stack--overlap': `${overlap}px` } as CSSProperties)\n : style\n }\n {...rest}\n />\n );\n}\n\nAvatarStack.displayName = 'AvatarStack';\n",".badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n flex-shrink: 0;\n font-family: var(--tgui--font-family);\n font-weight: var(--tgui--font_weight--accent2);\n}\n\n.number {\n min-width: 20px;\n height: 20px;\n padding: 0 6px;\n border-radius: 10px;\n font-size: 13px;\n line-height: 1;\n}\n\n.large.number {\n min-width: 24px;\n height: 24px;\n padding: 0 8px;\n border-radius: 12px;\n font-size: 15px;\n}\n\n.dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n}\n\n.large.dot {\n width: 10px;\n height: 10px;\n}\n\n.mode-primary {\n color: var(--tgui--button_text_color);\n background: var(--tgui--button_color);\n}\n\n.mode-critical {\n color: var(--tgui--white);\n background: var(--tgui--destructive_text_color);\n}\n\n.mode-secondary {\n color: var(--tgui--link_color);\n background: var(--tgui--secondary_fill);\n}\n\n.mode-gray {\n color: var(--tgui--plain_foreground);\n background: var(--tgui--tertiary_bg_color);\n}\n\n.mode-white {\n color: var(--tgui--black);\n background: var(--tgui--white);\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Badge.module.css';\n\nexport type BadgeType = 'number' | 'dot';\nexport type BadgeMode = 'primary' | 'critical' | 'secondary' | 'gray' | 'white';\n\nexport const badge = cva(styles.badge, {\n variants: {\n type: { number: styles.number, dot: styles.dot },\n mode: {\n primary: styles['mode-primary'],\n critical: styles['mode-critical'],\n secondary: styles['mode-secondary'],\n gray: styles['mode-gray'],\n white: styles['mode-white'],\n },\n large: { true: styles.large },\n },\n defaultVariants: { type: 'number', mode: 'primary' },\n});\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { type BadgeMode, type BadgeType, badge } from './Badge.variants';\n\nexport type { BadgeMode, BadgeType };\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n ref?: Ref<HTMLSpanElement>;\n type?: BadgeType;\n mode?: BadgeMode;\n large?: boolean;\n children?: ReactNode;\n}\n\nexport function Badge({\n ref,\n type = 'number',\n mode = 'primary',\n large = false,\n className,\n children,\n ...rest\n}: BadgeProps) {\n return (\n <span ref={ref} className={cn(badge({ type, mode, large }), className)} {...rest}>\n {type === 'number' ? children : null}\n </span>\n );\n}\n\nBadge.displayName = 'Badge';\n",".banner {\n position: relative;\n display: flex;\n gap: 16px;\n box-sizing: border-box;\n padding: 16px;\n border-radius: 12px;\n overflow: hidden;\n font-family: var(--tgui--font-family);\n}\n\n.type-section {\n background: var(--tgui--tertiary_bg_color);\n color: var(--tgui--text_color);\n}\n\n.type-image {\n color: var(--tgui--white);\n}\n\n.background {\n position: absolute;\n inset: 0;\n z-index: 0;\n}\n\n.background > * {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.type-image::after {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: 1;\n background: linear-gradient(180deg, rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.55));\n}\n\n.before {\n position: relative;\n z-index: 2;\n flex-shrink: 0;\n}\n\n.body {\n position: relative;\n z-index: 2;\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n flex: 1;\n}\n\n.callout {\n font-size: 13px;\n line-height: 16px;\n font-weight: var(--tgui--font_weight--accent2);\n text-transform: uppercase;\n letter-spacing: 0.04em;\n opacity: 0.75;\n}\n\n.header {\n font-size: 16px;\n line-height: 22px;\n font-weight: var(--tgui--font_weight--accent1);\n}\n\n.subheader {\n font-size: 14px;\n line-height: 20px;\n opacity: 0.8;\n}\n\n.description {\n margin-top: 4px;\n font-size: 14px;\n line-height: 20px;\n}\n\n.actions {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n margin-top: 12px;\n}\n\n.close {\n position: relative;\n z-index: 2;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 24px;\n height: 24px;\n margin: -4px -4px auto auto;\n padding: 0;\n border: 0;\n border-radius: 50%;\n color: currentColor;\n background: transparent;\n cursor: pointer;\n opacity: 0.7;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .close:hover {\n opacity: 1;\n }\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Banner.module.css';\n\nexport type BannerType = 'section' | 'image';\n\nexport const banner = cva(styles.banner, {\n variants: {\n type: {\n section: styles['type-section'],\n image: styles['type-image'],\n },\n },\n defaultVariants: { type: 'section' },\n});\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Banner.module.css';\nimport { type BannerType, banner } from './Banner.variants';\n\nexport type { BannerType };\n\nexport interface BannerProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n type?: BannerType;\n before?: ReactNode;\n callout?: ReactNode;\n header?: ReactNode;\n subheader?: ReactNode;\n description?: ReactNode;\n actions?: ReactNode;\n background?: ReactNode;\n onClose?: () => void;\n closeLabel?: string;\n}\n\nexport function Banner({\n ref,\n type = 'section',\n before,\n callout,\n header,\n subheader,\n description,\n actions,\n background,\n onClose,\n closeLabel = 'Close',\n className,\n children,\n ...rest\n}: BannerProps) {\n return (\n <section ref={ref} className={cn(banner({ type }), className)} {...rest}>\n {type === 'image' && background != null ? (\n <div className={styles.background} aria-hidden>\n {background}\n </div>\n ) : null}\n\n {before != null ? <div className={styles.before}>{before}</div> : null}\n\n <div className={styles.body}>\n {callout != null ? <span className={styles.callout}>{callout}</span> : null}\n {header != null ? <span className={styles.header}>{header}</span> : null}\n {subheader != null ? <span className={styles.subheader}>{subheader}</span> : null}\n {description != null ? <p className={styles.description}>{description}</p> : null}\n {children}\n {actions != null ? <div className={styles.actions}>{actions}</div> : null}\n </div>\n\n {onClose != null ? (\n <button type=\"button\" className={styles.close} aria-label={closeLabel} onClick={onClose}>\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden>\n <path\n d=\"M3.5 3.5l7 7M10.5 3.5l-7 7\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n />\n </svg>\n </button>\n ) : null}\n </section>\n );\n}\n\nBanner.displayName = 'Banner';\n",".blockquote {\n margin: 0;\n padding: 8px 12px 8px 16px;\n border-radius: 4px 12px 12px 4px;\n border-inline-start: 3px solid var(--tgui--link_color);\n background: var(--tgui--secondary_fill);\n color: var(--tgui--text_color);\n font-family: var(--tgui--font-family);\n font-size: 15px;\n line-height: 21px;\n}\n\n.cite {\n display: block;\n margin-top: 6px;\n color: var(--tgui--hint_color);\n font-size: 13px;\n font-style: normal;\n}\n","import type { BlockquoteHTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Blockquote.module.css';\n\nexport interface BlockquoteProps extends BlockquoteHTMLAttributes<HTMLQuoteElement> {\n ref?: Ref<HTMLQuoteElement>;\n author?: ReactNode;\n}\n\nexport function Blockquote({ ref, author, className, children, ...rest }: BlockquoteProps) {\n return (\n <blockquote ref={ref} className={cn(styles.blockquote, className)} {...rest}>\n {children}\n {author != null ? <cite className={styles.cite}>{author}</cite> : null}\n </blockquote>\n );\n}\n\nBlockquote.displayName = 'Blockquote';\n",".nav {\n min-width: 0;\n font-family: var(--tgui--font-family);\n font-size: 14px;\n line-height: 18px;\n}\n\n.list {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.item {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.link {\n margin: 0;\n padding: 0;\n border: 0;\n background: none;\n color: var(--tgui--link_color);\n font: inherit;\n cursor: pointer;\n text-decoration: none;\n border-radius: 4px;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .link:hover {\n text-decoration: underline;\n }\n}\n\n.link:focus-visible {\n outline: 2px solid var(--tgui--link_color);\n outline-offset: 2px;\n}\n\n.current {\n overflow: hidden;\n max-width: 220px;\n color: var(--tgui--text_color);\n font-weight: var(--tgui--font_weight--accent2);\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.ellipsis {\n color: var(--tgui--hint_color);\n}\n\n.chevron {\n flex-shrink: 0;\n color: var(--tgui--hint_color);\n}\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Breadcrumbs.module.css';\n\nexport interface BreadcrumbItem {\n label: ReactNode;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface BreadcrumbsProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {\n ref?: Ref<HTMLElement>;\n items: BreadcrumbItem[];\n maxItems?: number;\n}\n\nconst Chevron = () => (\n <svg\n className={styles.chevron}\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 18 18\"\n fill=\"none\"\n aria-hidden\n >\n <path\n d=\"M6.75 4.5L11.25 9l-4.5 4.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\nexport function Breadcrumbs({ ref, items, maxItems = 4, className, ...rest }: BreadcrumbsProps) {\n const collapsed = items.length > maxItems;\n const visible: (BreadcrumbItem | 'ellipsis')[] = collapsed\n ? [items[0], 'ellipsis', ...items.slice(items.length - (maxItems - 1))]\n : items;\n\n return (\n <nav ref={ref} aria-label=\"Breadcrumbs\" className={cn(styles.nav, className)} {...rest}>\n <ol className={styles.list}>\n {visible.map((item, index) => {\n const isLast = index === visible.length - 1;\n return (\n // biome-ignore lint/suspicious/noArrayIndexKey: breadcrumb trail order is stable\n <li key={index} className={styles.item}>\n {item === 'ellipsis' ? (\n <span className={styles.ellipsis} aria-hidden>\n …\n </span>\n ) : isLast ? (\n <span className={styles.current} aria-current=\"page\">\n {item.label}\n </span>\n ) : item.href != null ? (\n <a href={item.href} className={styles.link} onClick={item.onClick}>\n {item.label}\n </a>\n ) : (\n <button type=\"button\" className={styles.link} onClick={item.onClick}>\n {item.label}\n </button>\n )}\n {!isLast ? <Chevron /> : null}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n}\n\nBreadcrumbs.displayName = 'Breadcrumbs';\n",".spinner {\n display: inline-block;\n box-sizing: border-box;\n border-radius: 50%;\n border-style: solid;\n border-color: currentColor;\n border-top-color: transparent;\n animation: tgui-spinner 0.6s linear infinite;\n}\n\n.s {\n width: 16px;\n height: 16px;\n border-width: 2px;\n}\n\n.m {\n width: 24px;\n height: 24px;\n border-width: 2.5px;\n}\n\n.l {\n width: 32px;\n height: 32px;\n border-width: 3px;\n}\n\n@keyframes tgui-spinner {\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .spinner {\n animation-duration: 1.6s;\n }\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Spinner.module.css';\n\nexport type SpinnerSize = 's' | 'm' | 'l';\n\nexport const spinner = cva(styles.spinner, {\n variants: {\n size: { s: styles.s, m: styles.m, l: styles.l },\n },\n defaultVariants: { size: 'm' },\n});\n","import type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { type SpinnerSize, spinner } from './Spinner.variants';\n\nexport type { SpinnerSize };\n\nexport interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {\n ref?: Ref<HTMLSpanElement>;\n size?: SpinnerSize;\n}\n\nexport function Spinner({ ref, size = 'm', className, ...rest }: SpinnerProps) {\n return (\n <span\n ref={ref}\n role=\"status\"\n aria-label=\"Loading\"\n className={cn(spinner({ size }), className)}\n {...rest}\n />\n );\n}\n\nSpinner.displayName = 'Spinner';\n",".typography {\n margin: 0;\n font-family: var(--tgui--font-family);\n}\n\n.weight-1 {\n font-weight: var(--tgui--font_weight--accent1);\n}\n\n.weight-2 {\n font-weight: var(--tgui--font_weight--accent2);\n}\n\n.weight-3 {\n font-weight: var(--tgui--font_weight--accent3);\n}\n\n.caps {\n text-transform: uppercase;\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Typography.module.css';\n\nexport const typography = cva(styles.typography, {\n variants: {\n weight: {\n '1': styles['weight-1'],\n '2': styles['weight-2'],\n '3': styles['weight-3'],\n },\n caps: { true: styles.caps },\n },\n defaultVariants: { weight: '3' },\n});\n","import type { AllHTMLAttributes, ElementType, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { typography } from './Typography.variants';\n\nexport interface TypographyProps extends AllHTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n weight?: '1' | '2' | '3';\n caps?: boolean;\n Component?: ElementType;\n}\n\nexport function Typography({\n ref,\n weight,\n caps,\n Component = 'span',\n className,\n ...rest\n}: TypographyProps) {\n return <Component ref={ref} className={cn(typography({ weight, caps }), className)} {...rest} />;\n}\n\nTypography.displayName = 'Typography';\n",".level-1 {\n font-size: var(--tgui--subheadline1--font_size);\n line-height: var(--tgui--subheadline1--line_height);\n}\n\n.level-2 {\n font-size: var(--tgui--subheadline2--font_size);\n line-height: var(--tgui--subheadline2--line_height);\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Subheadline.module.css';\n\nexport type SubheadlineLevel = '1' | '2';\n\nexport const subheadline = cva('', {\n variants: {\n level: {\n '1': styles['level-1'],\n '2': styles['level-2'],\n },\n },\n defaultVariants: { level: '1' },\n});\n","import type { Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Typography, type TypographyProps } from '../Typography';\nimport { type SubheadlineLevel, subheadline } from './Subheadline.variants';\n\nexport interface SubheadlineProps extends TypographyProps {\n ref?: Ref<HTMLElement>;\n level?: SubheadlineLevel;\n}\n\nexport function Subheadline({\n ref,\n level,\n Component = 'h6',\n className,\n ...rest\n}: SubheadlineProps) {\n return (\n <Typography\n ref={ref}\n Component={Component}\n className={cn(subheadline({ level }), className)}\n {...rest}\n />\n );\n}\n\nSubheadline.displayName = 'Subheadline';\n","import { createContext } from 'react';\nimport type { TguiContextValue } from '../../shared/types/tgui';\n\nexport const TguiContext = createContext<TguiContextValue | null>(null);\n\nTguiContext.displayName = 'TguiContext';\n","import { useContext } from 'react';\nimport type { TguiContextValue } from '../../shared/types/tgui';\nimport { TguiContext } from './context';\n\nexport function useTgui(): TguiContextValue {\n const context = useContext(TguiContext);\n\n if (context === null) {\n throw new Error('useTgui must be used within a <TguiProvider>.');\n }\n\n return context;\n}\n",".ripple {\n position: absolute;\n inset: 0;\n overflow: hidden;\n border-radius: inherit;\n pointer-events: none;\n}\n\n.wave {\n position: absolute;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n background: var(--tgui--outline);\n opacity: 0;\n animation: wave-rise 0.35s cubic-bezier(0.3, 0.3, 0.5, 1);\n}\n\n@keyframes wave-rise {\n from {\n transform: translate(-50%, -50%) scale(1);\n opacity: 1;\n }\n 30% {\n opacity: 1;\n }\n to {\n transform: translate(-50%, -50%) scale(8);\n opacity: 0;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wave {\n animation: none;\n }\n}\n","import styles from './Ripple.module.css';\nimport type { Wave } from './useRipple';\n\ninterface RippleProps {\n waves: Wave[];\n onWaveEnd: (id: number) => void;\n}\n\nexport function Ripple({ waves, onWaveEnd }: RippleProps) {\n return (\n <span aria-hidden className={styles.ripple}>\n {waves.map((wave) => (\n <span\n key={wave.id}\n className={styles.wave}\n style={{ top: wave.y, left: wave.x }}\n onAnimationEnd={() => onWaveEnd(wave.id)}\n />\n ))}\n </span>\n );\n}\n",".tappable {\n position: relative;\n isolation: isolate;\n cursor: pointer;\n transition: opacity 0.15s ease-out;\n}\n\n.tappable[data-readonly] {\n cursor: default;\n}\n\n.tappable[data-disabled] {\n cursor: default;\n opacity: 0.35;\n}\n\n.tappable--ios:not([data-disabled]):not([data-readonly]):active,\n.tappable--opacity:not([data-disabled]):not([data-readonly]):active {\n opacity: 0.65;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .tappable--ios:not([data-disabled]):not([data-readonly]):hover,\n .tappable--opacity:not([data-disabled]):not([data-readonly]):hover {\n opacity: 0.85;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tappable {\n transition: none;\n }\n}\n","import { type PointerEvent, useCallback, useEffect, useRef, useState } from 'react';\n\nconst PRESS_DELAY = 70;\nconst WAVE_FALLBACK = 600;\n\nexport interface Wave {\n id: number;\n x: number;\n y: number;\n}\n\ntype Timer = ReturnType<typeof setTimeout>;\n\nexport function useRipple() {\n const [waves, setWaves] = useState<Wave[]>([]);\n const nextId = useRef(0);\n const pressTimers = useRef(new Map<number, Timer>());\n const waveTimers = useRef(new Set<Timer>());\n\n useEffect(() => {\n const press = pressTimers.current;\n const wave = waveTimers.current;\n return () => {\n for (const timer of press.values()) clearTimeout(timer);\n for (const timer of wave) clearTimeout(timer);\n };\n }, []);\n\n const removeWave = useCallback((id: number) => {\n setWaves((current) => current.filter((wave) => wave.id !== id));\n }, []);\n\n const onPointerDown = useCallback(\n (event: PointerEvent<HTMLElement>) => {\n const { top, left } = event.currentTarget.getBoundingClientRect();\n const x = event.clientX - left;\n const y = event.clientY - top;\n const { pointerId } = event;\n\n const press = setTimeout(() => {\n pressTimers.current.delete(pointerId);\n const id = nextId.current++;\n setWaves((current) => [...current, { id, x, y }]);\n\n const fallback = setTimeout(() => {\n waveTimers.current.delete(fallback);\n removeWave(id);\n }, WAVE_FALLBACK);\n waveTimers.current.add(fallback);\n }, PRESS_DELAY);\n\n pressTimers.current.set(pointerId, press);\n },\n [removeWave],\n );\n\n const onPointerCancel = useCallback((event: PointerEvent<HTMLElement>) => {\n const press = pressTimers.current.get(event.pointerId);\n if (press) {\n clearTimeout(press);\n pressTimers.current.delete(event.pointerId);\n }\n }, []);\n\n return { waves, onPointerDown, onPointerCancel, removeWave };\n}\n","'use client';\n\nimport type { AllHTMLAttributes, ElementType, PointerEvent, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { useTgui } from '../TguiProvider/useTgui';\nimport { Ripple } from './Ripple';\nimport styles from './Tappable.module.css';\nimport { useRipple } from './useRipple';\n\nexport interface TappableProps extends AllHTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n Component?: ElementType;\n interactiveAnimation?: 'background' | 'opacity';\n}\n\nexport function Tappable({\n ref,\n Component = 'div',\n interactiveAnimation = 'background',\n className,\n children,\n onPointerDown,\n onPointerCancel,\n ...rest\n}: TappableProps) {\n const { platform } = useTgui();\n const ripple = useRipple();\n const disabled = Boolean(rest.disabled);\n const readOnly = Boolean(rest.readOnly);\n\n const interactive = Component !== 'div' && Component !== 'span';\n const hasRipple =\n platform === 'base' &&\n interactiveAnimation === 'background' &&\n !readOnly &&\n !disabled &&\n (interactive || rest.onClick != null);\n\n const handlePointerDown = (event: PointerEvent<HTMLElement>) => {\n if (hasRipple) ripple.onPointerDown(event);\n onPointerDown?.(event);\n };\n\n const handlePointerCancel = (event: PointerEvent<HTMLElement>) => {\n if (hasRipple) ripple.onPointerCancel(event);\n onPointerCancel?.(event);\n };\n\n return (\n <Component\n ref={ref}\n className={cn(\n styles.tappable,\n platform === 'ios' && styles['tappable--ios'],\n interactiveAnimation === 'opacity' && styles['tappable--opacity'],\n className,\n )}\n data-readonly={readOnly || undefined}\n data-disabled={disabled || undefined}\n aria-disabled={disabled || undefined}\n onPointerDown={handlePointerDown}\n onPointerCancel={handlePointerCancel}\n {...rest}\n >\n {hasRipple && <Ripple waves={ripple.waves} onWaveEnd={ripple.removeWave} />}\n {children}\n </Component>\n );\n}\n\nTappable.displayName = 'Tappable';\n",".text {\n font-size: var(--tgui--text--font_size);\n line-height: var(--tgui--text--line_height);\n}\n","import type { Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Typography, type TypographyProps } from '../Typography';\nimport styles from './Text.module.css';\n\nexport interface TextProps extends TypographyProps {\n ref?: Ref<HTMLElement>;\n}\n\nexport function Text({ ref, className, Component = 'span', ...rest }: TextProps) {\n return (\n <Typography ref={ref} Component={Component} className={cn(styles.text, className)} {...rest} />\n );\n}\n\nText.displayName = 'Text';\n","import type { WebApp } from '../types/telegram';\n\nexport function getTelegramWebApp(): WebApp | undefined {\n if (typeof window === 'undefined') {\n return undefined;\n }\n\n return window.Telegram?.WebApp;\n}\n","import type { Appearance } from '../types/tgui';\nimport { getTelegramWebApp } from './telegram';\n\nconst DARK_QUERY = '(prefers-color-scheme: dark)';\n\nfunction canMatchMedia() {\n return typeof window !== 'undefined' && typeof window.matchMedia === 'function';\n}\n\nexport function getAppearance(): Appearance {\n const webApp = getTelegramWebApp();\n if (webApp) {\n return webApp.colorScheme === 'dark' ? 'dark' : 'light';\n }\n\n if (canMatchMedia()) {\n return window.matchMedia(DARK_QUERY).matches ? 'dark' : 'light';\n }\n\n return 'light';\n}\n\nexport function subscribeAppearance(onChange: () => void): () => void {\n const webApp = getTelegramWebApp();\n if (webApp) {\n webApp.onEvent('themeChanged', onChange);\n return () => webApp.offEvent('themeChanged', onChange);\n }\n\n if (!canMatchMedia()) {\n return () => {};\n }\n\n const media = window.matchMedia(DARK_QUERY);\n media.addEventListener('change', onChange);\n return () => media.removeEventListener('change', onChange);\n}\n","import type { TguiPlatform } from '../types/tgui';\nimport { getTelegramWebApp } from './telegram';\n\nconst TELEGRAM_IOS_LIKE = new Set(['ios', 'macos']);\n\nexport function getPlatform(): TguiPlatform {\n const webApp = getTelegramWebApp();\n if (webApp) {\n return TELEGRAM_IOS_LIKE.has(webApp.platform) ? 'ios' : 'base';\n }\n\n if (typeof navigator === 'undefined') {\n return 'base';\n }\n\n const ua = navigator.userAgent;\n const isIpadOs = ua.includes('Macintosh') && navigator.maxTouchPoints > 1;\n\n return /iphone|ipad|ipod/i.test(ua) || isIpadOs ? 'ios' : 'base';\n}\n",".wrapper {\n --tgui--font-family:\n system-ui, -apple-system, BlinkMacSystemFont, \"Roboto\", \"Apple Color Emoji\", \"Helvetica Neue\",\n sans-serif;\n\n --tgui--font_weight--accent1: 700;\n --tgui--font_weight--accent2: 600;\n --tgui--font_weight--accent3: 400;\n\n --tgui--large_title--font_size: 34px;\n --tgui--large_title--line_height: 42px;\n\n --tgui--title1--font_size: 28px;\n --tgui--title1--line_height: 36px;\n --tgui--title2--font_size: 24px;\n --tgui--title2--line_height: 32px;\n --tgui--title3--font_size: 20px;\n --tgui--title3--line_height: 24px;\n\n --tgui--headline--font_size: 19px;\n --tgui--headline--line_height: 28px;\n\n --tgui--text--font_size: 17px;\n --tgui--text--line_height: 26px;\n\n --tgui--subheadline1--font_size: 16px;\n --tgui--subheadline1--line_height: 24px;\n --tgui--subheadline2--font_size: 15px;\n --tgui--subheadline2--line_height: 22px;\n\n --tgui--caption1--font_size: 13px;\n --tgui--caption1--line_height: 20px;\n --tgui--caption2--font_size: 11px;\n --tgui--caption2--line_height: 16px;\n\n --tgui--border--width: 1px;\n --tgui--base--section--box_shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);\n\n --tgui--bg_color: var(--tg-theme-bg-color, #ffffff);\n --tgui--text_color: var(--tg-theme-text-color, #000000);\n --tgui--hint_color: var(--tg-theme-hint-color, #707579);\n --tgui--link_color: var(--tg-theme-link-color, #007aff);\n --tgui--button_color: var(--tg-theme-button-color, #007aff);\n --tgui--button_text_color: var(--tg-theme-button-text-color, #ffffff);\n --tgui--secondary_bg_color: var(--tg-theme-secondary-bg-color, #efeff4);\n --tgui--header_bg_color: var(--tg-theme-header-bg-color, #ffffff);\n --tgui--accent_text_color: var(--tg-theme-accent-text-color, #007aff);\n --tgui--section_bg_color: var(--tg-theme-section-bg-color, #ffffff);\n --tgui--section_header_text_color: var(--tg-theme-section-header-text-color, #707579);\n --tgui--subtitle_text_color: var(--tg-theme-subtitle-text-color, #707579);\n --tgui--destructive_text_color: var(--tg-theme-destructive-text-color, #e53935);\n\n --tgui--skeleton: rgba(0, 0, 0, 0.07);\n --tgui--divider: rgba(0, 0, 0, 0.15);\n --tgui--outline: rgba(0, 0, 0, 0.05);\n --tgui--surface_primary: rgba(255, 255, 255, 0.95);\n\n --tgui--tertiary_bg_color: #f4f4f7;\n --tgui--quartenary_bg_color: #f6f6fa;\n --tgui--segmented_control_active_bg: var(--tgui--bg_color);\n --tgui--card_bg_color: var(--tgui--section_bg_color);\n --tgui--secondary_hint_color: #a2acb0;\n --tgui--secondary_fill: rgba(67, 120, 255, 0.14);\n --tgui--green: #31d158;\n --tgui--destructive_background: #e53935;\n --tgui--primary_code_highlight: #4378ff;\n --tgui--secondary_code_highlight: #b00fb4;\n --tgui--tertiary_code_highlight: #3a9f20;\n --tgui--plain_background: rgba(0, 0, 0, 0.04);\n --tgui--plain_foreground: rgba(0, 0, 0, 0.8);\n --tgui--toast_accent_color: #55a6ff;\n\n --tgui--surface_dark: rgba(56, 56, 56, 0.85);\n --tgui--tooltip_background_dark: rgba(0, 0, 0, 0.85);\n --tgui--white: #ffffff;\n --tgui--black: #000000;\n\n --tgui--field_padding_x: 16px;\n --tgui--field_padding_y: 12px;\n --tgui--field_radius: 12px;\n --tgui--field_gap: 12px;\n --tgui--field_min_height: 48px;\n\n --tgui--z-index--simple: 1;\n --tgui--z-index--skeleton: 2;\n --tgui--z-index--overlay: 3;\n\n -webkit-tap-highlight-color: transparent;\n -webkit-text-size-adjust: 100%;\n\n font-family: var(--tgui--font-family);\n color: var(--tgui--text_color);\n}\n\n.wrapper--ios {\n --tgui--large_title--line_height: 41px;\n --tgui--title1--line_height: 34px;\n --tgui--title2--line_height: 28px;\n --tgui--title3--line_height: 25px;\n --tgui--headline--line_height: 24px;\n --tgui--text--line_height: 22px;\n --tgui--subheadline1--line_height: 21px;\n --tgui--subheadline2--line_height: 20px;\n --tgui--caption1--line_height: 16px;\n --tgui--caption2--line_height: 13px;\n}\n\n.wrapper--dark {\n --tgui--bg_color: var(--tg-theme-bg-color, #212121);\n --tgui--text_color: var(--tg-theme-text-color, #ffffff);\n --tgui--hint_color: var(--tg-theme-hint-color, #aaaaaa);\n --tgui--link_color: var(--tg-theme-link-color, #2990ff);\n --tgui--button_color: var(--tg-theme-button-color, #2990ff);\n --tgui--button_text_color: var(--tg-theme-button-text-color, #ffffff);\n --tgui--secondary_bg_color: var(--tg-theme-secondary-bg-color, #0f0f0f);\n --tgui--header_bg_color: var(--tg-theme-header-bg-color, #212121);\n --tgui--accent_text_color: var(--tg-theme-accent-text-color, #007aff);\n --tgui--section_bg_color: var(--tg-theme-section-bg-color, #212121);\n --tgui--section_header_text_color: var(--tg-theme-section-header-text-color, #aaaaaa);\n --tgui--subtitle_text_color: var(--tg-theme-subtitle-text-color, #aaaaaa);\n --tgui--destructive_text_color: var(--tg-theme-destructive-text-color, #e53935);\n\n --tgui--skeleton: rgba(255, 255, 255, 0.07);\n --tgui--divider: rgba(255, 255, 255, 0.05);\n --tgui--outline: rgba(255, 255, 255, 0.1);\n --tgui--surface_primary: rgba(23, 23, 23, 0.95);\n --tgui--tertiary_bg_color: #2a2a2a;\n --tgui--quartenary_bg_color: #2f2f2f;\n --tgui--segmented_control_active_bg: #2f2f2f;\n --tgui--card_bg_color: #262626;\n --tgui--secondary_hint_color: #78797e;\n --tgui--secondary_fill: rgba(41, 144, 255, 0.2);\n --tgui--surface_dark: #48484a;\n --tgui--tooltip_background_dark: #48484a;\n --tgui--green: #32e55e;\n --tgui--destructive_background: rgba(255, 35, 35, 0.02);\n --tgui--primary_code_highlight: #2990ff;\n --tgui--secondary_code_highlight: #e937ed;\n --tgui--tertiary_code_highlight: #5ae536;\n --tgui--plain_background: rgba(255, 255, 255, 0.08);\n --tgui--plain_foreground: rgba(255, 255, 255, 0.95);\n}\n\n@media (min-resolution: 2dppx) {\n .wrapper {\n --tgui--border--width: 0.5px;\n }\n}\n\n@supports (padding-top: env(safe-area-inset-bottom)) {\n .wrapper {\n --tgui--safe_area_inset_bottom: env(safe-area-inset-bottom);\n }\n}\n\n@supports (color: color-mix(in srgb, red 10%, transparent)) {\n .wrapper {\n --tgui--secondary_fill: color-mix(in srgb, var(--tgui--accent_text_color) 14%, transparent);\n --tgui--tertiary_bg_color: color-mix(\n in srgb,\n var(--tgui--secondary_bg_color),\n var(--tgui--bg_color) 40%\n );\n --tgui--quartenary_bg_color: color-mix(\n in srgb,\n var(--tgui--secondary_bg_color),\n var(--tgui--bg_color) 20%\n );\n }\n\n .wrapper--dark {\n --tgui--secondary_fill: color-mix(in srgb, var(--tgui--accent_text_color) 20%, transparent);\n --tgui--card_bg_color: color-mix(in srgb, var(--tgui--bg_color), #fff 7%);\n --tgui--tertiary_bg_color: color-mix(in srgb, var(--tgui--bg_color), #fff 10%);\n --tgui--quartenary_bg_color: color-mix(in srgb, var(--tgui--bg_color), #fff 14%);\n --tgui--segmented_control_active_bg: color-mix(in srgb, var(--tgui--bg_color), #fff 12%);\n }\n}\n","import {\n type HTMLAttributes,\n type Ref,\n useCallback,\n useMemo,\n useState,\n useSyncExternalStore,\n} from 'react';\nimport { getAppearance, subscribeAppearance } from '../../shared/lib/appearance';\nimport { cn } from '../../shared/lib/cn';\nimport { getPlatform } from '../../shared/lib/platform';\nimport type { Appearance, TguiPlatform } from '../../shared/types/tgui';\nimport { TguiContext } from './context';\nimport styles from './TguiProvider.module.css';\n\nexport interface TguiProviderProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n platform?: TguiPlatform;\n appearance?: Appearance;\n portalContainer?: HTMLElement | null;\n}\n\nconst getServerAppearance = (): Appearance => 'light';\n\nexport function TguiProvider({\n ref,\n platform: platformProp,\n appearance: appearanceProp,\n portalContainer: portalContainerProp,\n className,\n children,\n ...rest\n}: TguiProviderProps) {\n const platform = useMemo(() => platformProp ?? getPlatform(), [platformProp]);\n\n const systemAppearance = useSyncExternalStore(\n subscribeAppearance,\n getAppearance,\n getServerAppearance,\n );\n const appearance = appearanceProp ?? systemAppearance;\n\n const [wrapper, setWrapper] = useState<HTMLDivElement | null>(null);\n const setRef = useCallback(\n (node: HTMLDivElement | null) => {\n setWrapper(node);\n\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n },\n [ref],\n );\n\n const value = useMemo(\n () => ({\n platform,\n appearance,\n portalContainer: portalContainerProp ?? wrapper,\n }),\n [platform, appearance, portalContainerProp, wrapper],\n );\n\n return (\n <div\n ref={setRef}\n className={cn(\n styles.wrapper,\n platform === 'ios' && styles['wrapper--ios'],\n appearance === 'dark' && styles['wrapper--dark'],\n className,\n )}\n {...rest}\n >\n <TguiContext.Provider value={value}>{children}</TguiContext.Provider>\n </div>\n );\n}\n\nTguiProvider.displayName = 'TguiProvider';\n",".button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n max-inline-size: 100%;\n min-inline-size: 80px;\n border: none;\n border-radius: var(--tgui--button--border_radius, 8px);\n text-decoration: none;\n}\n\n.stretched {\n inline-size: 100%;\n flex-grow: 1;\n}\n\n.button::after {\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: inherit;\n opacity: 0;\n background: var(--tgui--bg_color);\n transition: opacity 0.15s ease-out;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .button:not([data-disabled]):hover::after {\n opacity: var(--tgui--button--wash-opacity);\n }\n}\n\n.before,\n.after {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.content {\n display: flex;\n flex: 0 1 auto;\n min-inline-size: 0;\n align-items: center;\n justify-content: center;\n z-index: var(--tgui--z-index--simple);\n}\n\n.label {\n min-inline-size: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.content svg {\n display: block;\n}\n\n.loading {\n pointer-events: none;\n}\n\n.loading .before,\n.loading .after,\n.loading .content {\n opacity: 0;\n}\n\n.spinner {\n position: absolute;\n color: var(--tgui--button--spinner-color);\n}\n\n.size-s {\n height: 36px;\n min-width: 34px;\n gap: 6px;\n padding: 8px 12px;\n border-radius: 999px;\n}\n\n.size-m {\n height: 42px;\n min-width: 42px;\n gap: 8px;\n padding: 8px 14px;\n}\n\n.size-l {\n height: 50px;\n gap: 10px;\n padding: 10px 20px;\n}\n\n.ios.size-m {\n border-radius: 12px;\n}\n\n.ios::after {\n content: none;\n}\n\n.mode-filled {\n --tgui--button--wash-opacity: 0.15;\n --tgui--button--spinner-color: var(--tgui--button_text_color);\n color: var(--tgui--button_text_color);\n background: var(--tgui--button_color);\n}\n\n.mode-bezeled {\n --tgui--button--wash-opacity: 0.07;\n --tgui--button--spinner-color: var(--tgui--link_color);\n color: var(--tgui--link_color);\n background: var(--tgui--secondary_fill);\n}\n\n.mode-plain {\n --tgui--button--wash-opacity: 0.03;\n --tgui--button--spinner-color: var(--tgui--plain_foreground);\n color: var(--tgui--link_color);\n background: transparent;\n}\n\n.mode-gray {\n --tgui--button--wash-opacity: 0.5;\n --tgui--button--spinner-color: var(--tgui--plain_foreground);\n color: var(--tgui--plain_foreground);\n background: var(--tgui--plain_background);\n}\n\n.mode-outline {\n --tgui--button--wash-opacity: 0.5;\n --tgui--button--spinner-color: var(--tgui--plain_foreground);\n color: var(--tgui--plain_foreground);\n background: transparent;\n box-shadow: 0 0 0 1px var(--tgui--outline);\n}\n\n.mode-white {\n --tgui--button--wash-opacity: 0.5;\n --tgui--button--spinner-color: var(--tgui--surface_dark);\n color: var(--tgui--black);\n background: var(--tgui--white);\n}\n","import { cva } from 'class-variance-authority';\nimport type { TguiPlatform } from '../../shared/types/tgui';\nimport styles from './Button.module.css';\n\nexport type ButtonMode = 'filled' | 'bezeled' | 'plain' | 'gray' | 'outline' | 'white';\nexport type ButtonSize = 's' | 'm' | 'l';\n\nexport const button = cva(styles.button, {\n variants: {\n mode: {\n filled: styles['mode-filled'],\n bezeled: styles['mode-bezeled'],\n plain: styles['mode-plain'],\n gray: styles['mode-gray'],\n outline: styles['mode-outline'],\n white: styles['mode-white'],\n },\n size: {\n s: styles['size-s'],\n m: styles['size-m'],\n l: styles['size-l'],\n },\n stretched: { true: styles.stretched },\n platform: { ios: styles.ios, base: null },\n },\n defaultVariants: { mode: 'filled', size: 'm' },\n});\n\nexport type ButtonVariantInput = {\n mode?: ButtonMode;\n size?: ButtonSize;\n stretched?: boolean;\n platform: TguiPlatform;\n};\n","'use client';\n\nimport type { AllHTMLAttributes, ElementType, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Spinner } from '../Spinner';\nimport { Subheadline } from '../Subheadline';\nimport { Tappable } from '../Tappable';\nimport { Text } from '../Text';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Button.module.css';\nimport { type ButtonMode, type ButtonSize, button } from './Button.variants';\n\nexport interface ButtonProps extends Omit<AllHTMLAttributes<HTMLElement>, 'size'> {\n ref?: Ref<HTMLElement>;\n Component?: ElementType;\n mode?: ButtonMode;\n size?: ButtonSize;\n stretched?: boolean;\n loading?: boolean;\n before?: ReactNode;\n after?: ReactNode;\n}\n\nfunction Label({ size, children }: { size: ButtonSize; children: ReactNode }) {\n const shared = { weight: '2', className: styles.content } as const;\n const inner = <span className={styles.label}>{children}</span>;\n return size === 'l' ? (\n <Text {...shared}>{inner}</Text>\n ) : (\n <Subheadline level=\"2\" {...shared}>\n {inner}\n </Subheadline>\n );\n}\n\nexport function Button({\n ref,\n Component = 'button',\n mode = 'filled',\n size = 'm',\n stretched = false,\n loading = false,\n type,\n before,\n after,\n children,\n className,\n ...rest\n}: ButtonProps) {\n const { platform } = useTgui();\n\n return (\n <Tappable\n ref={ref}\n Component={Component}\n type={Component === 'button' ? (type ?? 'button') : type}\n aria-busy={loading || undefined}\n className={cn(\n button({ mode, size, stretched, platform }),\n loading && styles.loading,\n className,\n )}\n {...rest}\n >\n {loading ? <Spinner size=\"s\" className={styles.spinner} aria-hidden /> : null}\n {before ? <span className={styles.before}>{before}</span> : null}\n <Label size={size}>{children}</Label>\n {after ? <span className={styles.after}>{after}</span> : null}\n </Tappable>\n );\n}\n\nButton.displayName = 'Button';\n",".level-1 {\n font-size: var(--tgui--caption1--font_size);\n line-height: var(--tgui--caption1--line_height);\n}\n\n.level-2 {\n font-size: var(--tgui--caption2--font_size);\n line-height: var(--tgui--caption2--line_height);\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Caption.module.css';\n\nexport type CaptionLevel = '1' | '2';\n\nexport const caption = cva('', {\n variants: {\n level: {\n '1': styles['level-1'],\n '2': styles['level-2'],\n },\n },\n defaultVariants: { level: '1' },\n});\n","import type { Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Typography, type TypographyProps } from '../Typography';\nimport { type CaptionLevel, caption } from './Caption.variants';\n\nexport interface CaptionProps extends TypographyProps {\n ref?: Ref<HTMLElement>;\n level?: CaptionLevel;\n}\n\nexport function Caption({ ref, level, Component = 'span', className, ...rest }: CaptionProps) {\n return (\n <Typography\n ref={ref}\n Component={Component}\n className={cn(caption({ level }), className)}\n {...rest}\n />\n );\n}\n\nCaption.displayName = 'Caption';\n","import { createContext } from 'react';\n\nexport type CardType = 'plain' | 'ambient';\n\nexport const CardContext = createContext<{ type: CardType }>({ type: 'plain' });\n",".card {\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border-radius: 20px;\n background: var(--tgui--card_bg_color);\n box-shadow:\n 0 32px 64px 0 rgba(0, 0, 0, 0.04),\n 0 0 2px 1px rgba(0, 0, 0, 0.02);\n}\n\n.card > * {\n flex-shrink: 0;\n}\n\n.cardAmbient {\n background: var(--tgui--black);\n}\n\n.cell {\n padding: 0 20px;\n background: var(--tgui--card_bg_color);\n}\n\n.cellAmbient {\n --tgui--cell--middle--padding: 12px 0;\n\n position: absolute;\n inset: auto 0 0 0;\n padding-top: 64px;\n padding-bottom: 4px;\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0) 0%,\n rgba(0, 0, 0, 0.12) 22%,\n rgba(0, 0, 0, 0.55) 62%,\n rgba(0, 0, 0, 0.85) 100%\n );\n color: var(--tgui--white);\n}\n\n.cellHeader {\n font-weight: var(--tgui--font_weight--accent2);\n}\n\n.cellSubtitle {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.cellAmbient .cellHeader {\n color: var(--tgui--white);\n}\n\n.cellAmbient .cellSubtitle {\n color: rgba(255, 255, 255, 0.8);\n}\n",".cell {\n --tgui--cell--middle--padding: 16px 0;\n\n display: flex;\n align-items: center;\n gap: 24px;\n padding: 0 24px;\n}\n\n.before,\n.after {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.middle {\n flex-grow: 1;\n min-inline-size: 0;\n max-inline-size: 100%;\n padding: var(--tgui--cell--middle--padding);\n\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.middle > *,\n.title {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.multiline .middle > *,\n.multiline .title {\n white-space: normal;\n}\n\n.head {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.subhead {\n color: var(--tgui--subtitle_text_color);\n}\n\n.hint,\n.subtitle,\n.description {\n color: var(--tgui--hint_color);\n}\n\n.hovered {\n background: var(--tgui--tertiary_bg_color);\n}\n\n.ios {\n --tgui--cell--middle--padding: 12px 0;\n gap: 16px;\n padding: 0 16px;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .interactive:not([data-disabled]):hover {\n background: var(--tgui--tertiary_bg_color);\n }\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Cell.module.css';\n\nexport const cell = cva(styles.cell, {\n variants: {\n platform: { ios: styles.ios, base: null },\n hovered: { true: styles.hovered },\n interactive: { true: styles.interactive },\n multiline: { true: styles.multiline },\n },\n});\n","'use client';\n\nimport type { ElementType, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Caption } from '../Caption';\nimport { Subheadline } from '../Subheadline';\nimport { Tappable, type TappableProps } from '../Tappable';\nimport { Text } from '../Text';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Cell.module.css';\nimport { cell } from './Cell.variants';\n\nexport interface CellProps extends Omit<TappableProps, 'Component'> {\n ref?: Ref<HTMLElement>;\n Component?: ElementType;\n subhead?: ReactNode;\n hint?: ReactNode;\n titleBadge?: ReactNode;\n subtitle?: ReactNode;\n description?: ReactNode;\n before?: ReactNode;\n after?: ReactNode;\n hovered?: boolean;\n multiline?: boolean;\n}\n\nfunction CellTitle({ ios, children }: { ios: boolean; children: ReactNode }) {\n return ios ? (\n <Text className={styles.head}>{children}</Text>\n ) : (\n <Subheadline level=\"1\" className={styles.head}>\n {children}\n </Subheadline>\n );\n}\n\nfunction CellDescription({ ios, children }: { ios: boolean; children: ReactNode }) {\n return ios ? (\n <Caption className={styles.description}>{children}</Caption>\n ) : (\n <Subheadline level=\"2\" className={styles.description}>\n {children}\n </Subheadline>\n );\n}\n\nexport function Cell({\n ref,\n Component = 'div',\n subhead,\n children,\n hint,\n titleBadge,\n subtitle,\n description,\n before,\n after,\n hovered,\n multiline,\n className,\n ...rest\n}: CellProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n const hasTitle = children != null || hint != null || titleBadge != null;\n const interactive =\n rest.onClick != null ||\n rest.href != null ||\n Component === 'a' ||\n Component === 'button' ||\n Component === 'label';\n\n return (\n <Tappable\n ref={ref}\n Component={Component}\n className={cn(cell({ platform, hovered, multiline, interactive }), className)}\n {...rest}\n >\n {before != null ? <div className={styles.before}>{before}</div> : null}\n\n <div className={styles.middle}>\n {subhead != null ? (\n <Subheadline level=\"2\" className={styles.subhead}>\n {subhead}\n </Subheadline>\n ) : null}\n\n {hasTitle ? (\n <CellTitle ios={ios}>\n {children != null ? <span className={styles.title}>{children}</span> : null}\n {hint != null ? <span className={styles.hint}>{hint}</span> : null}\n {titleBadge}\n </CellTitle>\n ) : null}\n\n {subtitle != null ? (\n <Subheadline level=\"2\" className={styles.subtitle}>\n {subtitle}\n </Subheadline>\n ) : null}\n\n {description != null ? <CellDescription ios={ios}>{description}</CellDescription> : null}\n </div>\n\n {after != null ? <div className={styles.after}>{after}</div> : null}\n </Tappable>\n );\n}\n\nCell.displayName = 'Cell';\n","'use client';\n\nimport { type Ref, useContext } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Cell, type CellProps } from '../Cell';\nimport { CardContext } from './Card.context';\nimport styles from './Card.module.css';\n\nexport interface CardCellProps extends CellProps {\n ref?: Ref<HTMLElement>;\n}\n\nexport function CardCell({ ref, children, subtitle, className, ...rest }: CardCellProps) {\n const { type } = useContext(CardContext);\n const ambient = type === 'ambient';\n\n return (\n <Cell\n ref={ref}\n className={cn(styles.cell, ambient && styles.cellAmbient, className)}\n subtitle={\n subtitle != null ? <span className={styles.cellSubtitle}>{subtitle}</span> : undefined\n }\n {...rest}\n >\n {children != null ? <span className={styles.cellHeader}>{children}</span> : null}\n </Cell>\n );\n}\n\nCardCell.displayName = 'CardCell';\n","'use client';\n\nimport { type HTMLAttributes, type Ref, useMemo } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { CardContext, type CardType } from './Card.context';\nimport styles from './Card.module.css';\nimport { CardCell } from './CardCell';\n\nexport interface CardProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n type?: CardType;\n}\n\nexport function Card({ ref, type = 'plain', className, children, ...rest }: CardProps) {\n const context = useMemo(() => ({ type }), [type]);\n\n return (\n <CardContext.Provider value={context}>\n <article\n ref={ref}\n className={cn(styles.card, type === 'ambient' && styles.cardAmbient, className)}\n {...rest}\n >\n {children}\n </article>\n </CardContext.Provider>\n );\n}\n\nCard.displayName = 'Card';\nCard.Cell = CardCell;\n",".checkbox {\n position: relative;\n display: inline-flex;\n cursor: pointer;\n}\n\n.checkbox[data-disabled] {\n cursor: default;\n opacity: 0.3;\n}\n\n.input {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n cursor: inherit;\n}\n\n.box {\n position: relative;\n width: 20px;\n height: 20px;\n border-radius: 6px;\n box-shadow: inset 0 0 0 2px var(--tgui--outline);\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .box {\n transition:\n box-shadow 0.15s ease-out,\n background 0.15s ease-out;\n }\n}\n\n.input:checked + .box,\n.input:indeterminate + .box {\n background: var(--tgui--link_color);\n box-shadow: none;\n}\n\n.input:focus-visible + .box {\n box-shadow: 0 0 0 2px var(--tgui--link_color);\n}\n\n.input:checked + .box::after {\n content: \"\";\n position: absolute;\n left: 7px;\n top: 3px;\n width: 5px;\n height: 9px;\n border: solid var(--tgui--button_text_color);\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n}\n\n.input:indeterminate + .box::after {\n content: \"\";\n position: absolute;\n left: 4px;\n top: 9px;\n width: 12px;\n height: 2px;\n background: var(--tgui--button_text_color);\n}\n","import { type InputHTMLAttributes, type Ref, useEffect, useRef } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Checkbox.module.css';\n\nexport interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {\n ref?: Ref<HTMLInputElement>;\n indeterminate?: boolean;\n}\n\nexport function Checkbox({\n ref,\n indeterminate = false,\n disabled,\n className,\n style,\n ...rest\n}: CheckboxProps) {\n const inner = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (inner.current) inner.current.indeterminate = indeterminate;\n }, [indeterminate]);\n\n const mergeRef = (node: HTMLInputElement | null) => {\n inner.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n };\n\n return (\n <span\n className={cn(styles.checkbox, className)}\n style={style}\n data-disabled={disabled || undefined}\n >\n <input\n ref={mergeRef}\n type=\"checkbox\"\n className={styles.input}\n disabled={disabled}\n {...rest}\n />\n <span className={styles.box} aria-hidden />\n </span>\n );\n}\n\nCheckbox.displayName = 'Checkbox';\n",".chip {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n box-sizing: border-box;\n min-height: 32px;\n padding: 4px 12px;\n border: 0;\n border-radius: 16px;\n color: var(--tgui--text_color);\n font-family: var(--tgui--font-family);\n font-size: 14px;\n line-height: 18px;\n}\n\n.mode-elevated {\n background: var(--tgui--tertiary_bg_color);\n box-shadow: 0 1px 4px rgb(0 0 0 / 0.1);\n}\n\n.mode-outline {\n background: transparent;\n box-shadow: inset 0 0 0 1px var(--tgui--outline);\n}\n\n.clickable {\n cursor: pointer;\n user-select: none;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .clickable:not([data-disabled]):hover {\n opacity: 0.85;\n }\n}\n\n.before,\n.after {\n display: inline-flex;\n align-items: center;\n margin-left: -2px;\n}\n\n.after {\n margin-left: 0;\n margin-right: -4px;\n}\n\n.label {\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.remove {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 18px;\n height: 18px;\n margin-right: -4px;\n padding: 0;\n border: 0;\n border-radius: 50%;\n color: var(--tgui--secondary_hint_color);\n background: transparent;\n cursor: pointer;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .remove:hover {\n opacity: 0.6;\n }\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './Chip.module.css';\n\nexport type ChipMode = 'elevated' | 'outline';\n\nexport const chip = cva(styles.chip, {\n variants: {\n mode: {\n elevated: styles['mode-elevated'],\n outline: styles['mode-outline'],\n },\n clickable: { true: styles.clickable },\n },\n defaultVariants: { mode: 'elevated' },\n});\n","import type { AllHTMLAttributes, ElementType, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Chip.module.css';\nimport { type ChipMode, chip } from './Chip.variants';\n\nexport type { ChipMode };\n\nexport interface ChipProps extends Omit<AllHTMLAttributes<HTMLElement>, 'onClick'> {\n ref?: Ref<HTMLElement>;\n Component?: ElementType;\n mode?: ChipMode;\n before?: ReactNode;\n after?: ReactNode;\n onClick?: () => void;\n onRemove?: () => void;\n removeLabel?: string;\n}\n\nexport function Chip({\n ref,\n Component = 'div',\n mode = 'elevated',\n before,\n after,\n onClick,\n onRemove,\n removeLabel = 'Remove',\n className,\n children,\n ...rest\n}: ChipProps) {\n const clickable = onClick != null;\n\n return (\n <Component\n ref={ref}\n className={cn(chip({ mode, clickable }), className)}\n onClick={onClick}\n {...rest}\n >\n {before != null ? <span className={styles.before}>{before}</span> : null}\n <span className={styles.label}>{children}</span>\n {onRemove != null ? (\n <button\n type=\"button\"\n className={styles.remove}\n aria-label={removeLabel}\n onClick={(event) => {\n event.stopPropagation();\n onRemove();\n }}\n >\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" aria-hidden>\n <path\n d=\"M3 3l6 6M9 3l-6 6\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n />\n </svg>\n </button>\n ) : after != null ? (\n <span className={styles.after}>{after}</span>\n ) : null}\n </Component>\n );\n}\n\nChip.displayName = 'Chip';\n",".root {\n display: inline-flex;\n color: var(--tgui--link_color);\n}\n\n.svg {\n display: block;\n}\n\n.track {\n stroke: var(--tgui--tertiary_bg_color);\n}\n\n.indicator {\n stroke: currentColor;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .indicator {\n transition: stroke-dashoffset 0.25s ease;\n }\n}\n","export type CircularProgressSize = 's' | 'm' | 'l';\n\nexport const DIMENSION: Record<CircularProgressSize, number> = { s: 20, m: 28, l: 36 };\nexport const STROKE: Record<CircularProgressSize, number> = { s: 2, m: 2.5, l: 3 };\n","import type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './CircularProgress.module.css';\nimport { type CircularProgressSize, DIMENSION, STROKE } from './CircularProgress.variants';\n\nexport type { CircularProgressSize };\n\nexport interface CircularProgressProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'size'> {\n ref?: Ref<HTMLSpanElement>;\n value?: number;\n size?: CircularProgressSize;\n}\n\nexport function CircularProgress({\n ref,\n value = 0,\n size = 'm',\n className,\n ...rest\n}: CircularProgressProps) {\n const clamped = Math.max(0, Math.min(100, value));\n const dimension = DIMENSION[size];\n const stroke = STROKE[size];\n const radius = (dimension - stroke) / 2;\n const circumference = 2 * Math.PI * radius;\n const center = dimension / 2;\n\n return (\n <span\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={Math.round(clamped)}\n className={cn(styles.root, className)}\n {...rest}\n >\n <svg\n className={styles.svg}\n width={dimension}\n height={dimension}\n viewBox={`0 0 ${dimension} ${dimension}`}\n aria-hidden\n >\n <circle\n className={styles.track}\n cx={center}\n cy={center}\n r={radius}\n strokeWidth={stroke}\n fill=\"none\"\n />\n <circle\n className={styles.indicator}\n cx={center}\n cy={center}\n r={radius}\n strokeWidth={stroke}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={circumference * (1 - clamped / 100)}\n fill=\"none\"\n />\n </svg>\n </span>\n );\n}\n\nCircularProgress.displayName = 'CircularProgress';\n",".divider {\n margin: 0;\n border: none;\n border-block-start: var(--tgui--border--width) solid var(--tgui--outline);\n}\n","import type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Divider.module.css';\n\nexport interface DividerProps extends HTMLAttributes<HTMLHRElement> {\n ref?: Ref<HTMLHRElement>;\n}\n\nexport function Divider({ ref, className, ...rest }: DividerProps) {\n return <hr ref={ref} className={cn(styles.divider, className)} {...rest} />;\n}\n\nDivider.displayName = 'Divider';\n",".fixedLayout {\n position: fixed;\n left: 0;\n right: 0;\n z-index: var(--tgui--z-index--fixed, 100);\n box-sizing: border-box;\n}\n\n.top {\n top: 0;\n padding-top: env(safe-area-inset-top, 0px);\n}\n\n.bottom {\n bottom: 0;\n padding-bottom: env(safe-area-inset-bottom, 0px);\n}\n","import type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './FixedLayout.module.css';\n\nexport interface FixedLayoutProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n vertical?: 'top' | 'bottom';\n}\n\nexport function FixedLayout({ ref, vertical = 'bottom', className, ...rest }: FixedLayoutProps) {\n return (\n <div ref={ref} className={cn(styles.fixedLayout, styles[vertical], className)} {...rest} />\n );\n}\n\nFixedLayout.displayName = 'FixedLayout';\n",".headline {\n font-size: var(--tgui--headline--font_size);\n line-height: var(--tgui--headline--line_height);\n}\n","import type { Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Typography, type TypographyProps } from '../Typography';\nimport styles from './Headline.module.css';\n\nexport interface HeadlineProps extends TypographyProps {\n ref?: Ref<HTMLElement>;\n}\n\nexport function Headline({\n ref,\n weight = '2',\n className,\n Component = 'h5',\n ...rest\n}: HeadlineProps) {\n return (\n <Typography\n ref={ref}\n weight={weight}\n Component={Component}\n className={cn(styles.headline, className)}\n {...rest}\n />\n );\n}\n\nHeadline.displayName = 'Headline';\n",".root {\n --tgui--hscroll--fade: 36px;\n --tgui--hscroll--bg: var(--tgui--bg_color);\n position: relative;\n min-width: 0;\n max-width: 100%;\n}\n\n.edge {\n position: absolute;\n top: 0;\n bottom: 0;\n width: var(--tgui--hscroll--fade);\n z-index: 1;\n opacity: 0;\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .edge {\n transition: opacity 0.2s ease;\n }\n}\n\n.edge.visible {\n opacity: 1;\n}\n\n.edge--start {\n left: 0;\n background: linear-gradient(to right, var(--tgui--hscroll--bg), transparent);\n}\n\n.edge--end {\n right: 0;\n background: linear-gradient(to left, var(--tgui--hscroll--bg), transparent);\n}\n\n.scroller {\n display: flex;\n min-width: 0;\n overflow-x: auto;\n overflow-y: hidden;\n scrollbar-width: none;\n -ms-overflow-style: none;\n -webkit-overflow-scrolling: touch;\n overscroll-behavior-x: contain;\n}\n\n.scroller::-webkit-scrollbar {\n display: none;\n}\n\n.scroller > * {\n -webkit-user-drag: none;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .scroller {\n cursor: grab;\n }\n\n .scroller[data-grabbing=\"true\"] {\n cursor: grabbing;\n }\n\n .scroller[data-grabbing=\"true\"] * {\n pointer-events: none;\n }\n}\n\n.snap {\n scroll-snap-type: x mandatory;\n}\n\n.snap > * {\n scroll-snap-align: start;\n}\n","'use client';\n\nimport {\n type HTMLAttributes,\n type PointerEvent as ReactPointerEvent,\n type Ref,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './HorizontalScroll.module.css';\n\nconst DRAG_THRESHOLD = 4;\n\nexport interface HorizontalScrollProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n snap?: boolean;\n fade?: boolean;\n}\n\nexport function HorizontalScroll({\n ref,\n snap = false,\n fade = true,\n className,\n children,\n ...rest\n}: HorizontalScrollProps) {\n const scrollerRef = useRef<HTMLDivElement | null>(null);\n const [edges, setEdges] = useState({ start: false, end: false });\n const drag = useRef({ down: false, moved: false, startX: 0, startScroll: 0 });\n\n const measure = useCallback(() => {\n const el = scrollerRef.current;\n if (!el) return;\n const start = el.scrollLeft > 1;\n const end = el.scrollLeft < el.scrollWidth - el.clientWidth - 1;\n setEdges((prev) => (prev.start === start && prev.end === end ? prev : { start, end }));\n }, []);\n\n useEffect(() => {\n const el = scrollerRef.current;\n if (!el) return;\n measure();\n el.addEventListener('scroll', measure, { passive: true });\n const observer = typeof ResizeObserver !== 'undefined' ? new ResizeObserver(measure) : null;\n observer?.observe(el);\n return () => {\n el.removeEventListener('scroll', measure);\n observer?.disconnect();\n };\n }, [measure]);\n\n const onPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (event.pointerType !== 'mouse' || event.button !== 0) return;\n const el = scrollerRef.current;\n if (!el) return;\n drag.current = {\n down: true,\n moved: false,\n startX: event.clientX,\n startScroll: el.scrollLeft,\n };\n };\n\n const onPointerMove = (event: ReactPointerEvent<HTMLDivElement>) => {\n const state = drag.current;\n const el = scrollerRef.current;\n if (!state.down || !el) return;\n const dx = event.clientX - state.startX;\n if (!state.moved) {\n if (Math.abs(dx) < DRAG_THRESHOLD) return;\n state.moved = true;\n el.setPointerCapture(event.pointerId);\n el.dataset.grabbing = 'true';\n el.style.scrollBehavior = 'auto';\n }\n event.preventDefault();\n el.scrollLeft = state.startScroll - dx;\n };\n\n const endDrag = (event: ReactPointerEvent<HTMLDivElement>) => {\n const el = scrollerRef.current;\n if (el && drag.current.moved) {\n el.releasePointerCapture?.(event.pointerId);\n delete el.dataset.grabbing;\n el.style.scrollBehavior = '';\n }\n drag.current.down = false;\n };\n\n return (\n <div\n ref={ref}\n className={cn(styles.root, className)}\n data-start={fade ? String(edges.start) : undefined}\n data-end={fade ? String(edges.end) : undefined}\n {...rest}\n >\n {fade ? (\n <>\n <span\n className={cn(styles.edge, styles['edge--start'], edges.start && styles.visible)}\n aria-hidden\n />\n <span\n className={cn(styles.edge, styles['edge--end'], edges.end && styles.visible)}\n aria-hidden\n />\n </>\n ) : null}\n {/* biome-ignore lint/a11y/noStaticElementInteractions: pointer handlers only add mouse drag-to-scroll on top of the native scroll region; keyboard and touch scroll it without them */}\n <div\n ref={scrollerRef}\n className={cn(styles.scroller, snap && styles.snap)}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n onDragStart={(event) => event.preventDefault()}\n onClickCapture={(event) => {\n if (drag.current.moved) {\n event.stopPropagation();\n drag.current.moved = false;\n }\n }}\n >\n {children}\n </div>\n </div>\n );\n}\n\nHorizontalScroll.displayName = 'HorizontalScroll';\n",".iconButton {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n padding: 0;\n border: none;\n overflow: hidden;\n border-radius: 10px;\n color: var(--tgui--link_color);\n background: transparent;\n}\n\n.circle {\n border-radius: 50%;\n}\n\n.s {\n width: 30px;\n height: 30px;\n}\n\n.m {\n width: 36px;\n height: 36px;\n}\n\n.l {\n width: 44px;\n height: 44px;\n}\n\n.iconButton::after {\n content: \"\";\n position: absolute;\n inset: 0;\n opacity: 0;\n background: currentColor;\n}\n\n.ios::after {\n content: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .iconButton::after {\n transition: opacity 0.15s ease-out;\n }\n}\n\n@media (hover: hover) and (pointer: fine) {\n .iconButton:not([data-disabled]):hover::after {\n opacity: 0.08;\n }\n}\n\n.icon {\n display: flex;\n z-index: var(--tgui--z-index--simple);\n}\n\n.icon svg {\n display: block;\n}\n\n.mode-bezeled {\n color: var(--tgui--link_color);\n background: var(--tgui--secondary_fill);\n}\n\n.mode-plain {\n color: var(--tgui--link_color);\n}\n\n.mode-gray {\n color: var(--tgui--plain_foreground);\n background: var(--tgui--plain_background);\n}\n\n.mode-outline {\n color: var(--tgui--plain_foreground);\n box-shadow: inset 0 0 0 1px var(--tgui--outline);\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './IconButton.module.css';\n\nexport type IconButtonMode = 'bezeled' | 'plain' | 'gray' | 'outline';\nexport type IconButtonSize = 's' | 'm' | 'l';\n\nexport const iconButton = cva(styles.iconButton, {\n variants: {\n mode: {\n bezeled: styles['mode-bezeled'],\n plain: styles['mode-plain'],\n gray: styles['mode-gray'],\n outline: styles['mode-outline'],\n },\n size: { s: styles.s, m: styles.m, l: styles.l },\n circle: { true: styles.circle },\n platform: { ios: styles.ios, base: null },\n },\n defaultVariants: { mode: 'plain', size: 'm' },\n});\n","'use client';\n\nimport type { AllHTMLAttributes, ElementType, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Tappable } from '../Tappable';\nimport { useTgui } from '../TguiProvider';\nimport styles from './IconButton.module.css';\nimport { type IconButtonMode, type IconButtonSize, iconButton } from './IconButton.variants';\n\nexport type { IconButtonMode, IconButtonSize };\n\nexport interface IconButtonProps extends Omit<AllHTMLAttributes<HTMLElement>, 'size'> {\n ref?: Ref<HTMLElement>;\n Component?: ElementType;\n mode?: IconButtonMode;\n size?: IconButtonSize;\n circle?: boolean;\n}\n\nexport function IconButton({\n ref,\n Component = 'button',\n mode = 'plain',\n size = 'm',\n circle = false,\n type,\n className,\n children,\n ...rest\n}: IconButtonProps) {\n const { platform } = useTgui();\n\n return (\n <Tappable\n ref={ref}\n Component={Component}\n type={Component === 'button' ? (type ?? 'button') : type}\n className={cn(iconButton({ mode, size, circle, platform }), className)}\n {...rest}\n >\n <span className={styles.icon}>{children}</span>\n </Tappable>\n );\n}\n\nIconButton.displayName = 'IconButton';\n",".frame {\n position: relative;\n display: inline-block;\n overflow: hidden;\n flex-shrink: 0;\n background: var(--tgui--tertiary_bg_color);\n line-height: 0;\n}\n\n.bordered {\n box-shadow: inset 0 0 0 1px var(--tgui--outline);\n}\n\n.img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: var(--tgui--image--fit, cover);\n}\n\n.loading .img {\n opacity: 0;\n}\n\n.placeholder,\n.fallback {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--tgui--secondary_hint_color);\n}\n\n.placeholder {\n overflow: hidden;\n background: var(--tgui--skeleton);\n}\n\n.placeholder::after {\n content: \"\";\n position: absolute;\n inset: 0;\n transform: translateX(-100%);\n background: linear-gradient(\n 90deg,\n transparent,\n color-mix(in srgb, var(--tgui--text_color) 6%, transparent),\n transparent\n );\n animation: tgui-image-shimmer 1.5s ease-in-out infinite;\n}\n\n@keyframes tgui-image-shimmer {\n to {\n transform: translateX(100%);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .placeholder::after {\n animation: none;\n }\n}\n\n.fallback svg {\n width: 32%;\n height: 32%;\n max-width: 48px;\n max-height: 48px;\n}\n","'use client';\n\nimport {\n type CSSProperties,\n type ImgHTMLAttributes,\n type ReactNode,\n type Ref,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Image.module.css';\n\ntype Fit = 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';\n\nexport interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'width' | 'height'> {\n ref?: Ref<HTMLImageElement>;\n size?: number;\n width?: number | string;\n height?: number | string;\n aspectRatio?: number | string;\n fit?: Fit;\n radius?: number | 'full';\n bordered?: boolean;\n fallback?: ReactNode;\n}\n\nconst BrokenIcon = (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden>\n <path\n d=\"M3 5h18v14H3zM3 15l5-5 4 4 3-3 6 6\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\nexport function Image({\n ref,\n size,\n width,\n height,\n aspectRatio,\n fit = 'cover',\n radius,\n bordered = false,\n fallback = BrokenIcon,\n src,\n alt = '',\n className,\n style,\n onLoad,\n onError,\n ...rest\n}: ImageProps) {\n const [failedSrc, setFailedSrc] = useState<string | null>(null);\n const [loaded, setLoaded] = useState(false);\n const errored = src != null && src === failedSrc;\n\n const frameStyle: CSSProperties = {\n ...style,\n width: size ?? width,\n height: size ?? height,\n aspectRatio,\n borderRadius: radius === 'full' ? '50%' : radius,\n '--tgui--image--fit': fit,\n } as CSSProperties;\n\n return (\n <div\n className={cn(\n styles.frame,\n bordered && styles.bordered,\n !loaded && styles.loading,\n className,\n )}\n style={frameStyle}\n >\n {src != null && !errored ? (\n <img\n ref={ref}\n className={styles.img}\n src={src}\n alt={alt}\n draggable={false}\n onLoad={(event) => {\n setLoaded(true);\n onLoad?.(event);\n }}\n onError={(event) => {\n setFailedSrc(src);\n onError?.(event);\n }}\n {...rest}\n />\n ) : null}\n {!loaded && !errored ? <div className={styles.placeholder} aria-hidden /> : null}\n {errored ? (\n <div className={styles.fallback} aria-hidden>\n {fallback}\n </div>\n ) : null}\n </div>\n );\n}\n\nImage.displayName = 'Image';\n","import { createContext } from 'react';\nimport type { InlineButtonsMode } from './InlineButtons.variants';\n\nexport interface InlineButtonsContextValue {\n mode: InlineButtonsMode;\n}\n\nexport const InlineButtonsContext = createContext<InlineButtonsContextValue>({ mode: 'bezeled' });\n\nInlineButtonsContext.displayName = 'InlineButtonsContext';\n",".group {\n display: flex;\n gap: 8px;\n overflow-x: auto;\n scroll-snap-type: x proximity;\n scrollbar-width: none;\n -ms-overflow-style: none;\n -webkit-overflow-scrolling: touch;\n}\n\n.group::-webkit-scrollbar {\n display: none;\n}\n\n.item {\n display: flex;\n flex: 1 1 0;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 4px;\n min-width: 72px;\n padding: 10px 4px;\n border: 0;\n border-radius: 12px;\n color: var(--tgui--link_color);\n scroll-snap-align: start;\n}\n\n.item:focus-visible {\n outline: 2px solid var(--tgui--link_color);\n outline-offset: 2px;\n}\n\n.mode-bezeled {\n background: var(--tgui--secondary_fill);\n}\n\n.mode-plain {\n background: transparent;\n}\n\n.mode-gray {\n color: var(--tgui--plain_foreground);\n background: var(--tgui--plain_background);\n}\n\n.icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n}\n\n.icon svg {\n display: block;\n width: 100%;\n height: 100%;\n}\n\n.label {\n max-width: 100%;\n overflow: hidden;\n color: inherit;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n","import { cva } from 'class-variance-authority';\nimport styles from './InlineButtons.module.css';\n\nexport type InlineButtonsMode = 'bezeled' | 'plain' | 'gray';\n\nexport const inlineButtonsItem = cva(styles.item, {\n variants: {\n mode: {\n bezeled: styles['mode-bezeled'],\n plain: styles['mode-plain'],\n gray: styles['mode-gray'],\n },\n },\n defaultVariants: { mode: 'bezeled' },\n});\n","'use client';\n\nimport { type ButtonHTMLAttributes, type ReactNode, type Ref, useContext } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Caption } from '../Caption';\nimport { Tappable } from '../Tappable';\nimport { InlineButtonsContext } from './context';\nimport styles from './InlineButtons.module.css';\nimport { inlineButtonsItem } from './InlineButtons.variants';\n\nexport interface InlineButtonsItemProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n ref?: Ref<HTMLButtonElement>;\n icon: ReactNode;\n children: ReactNode;\n}\n\nexport function InlineButtonsItem({\n ref,\n icon,\n children,\n className,\n ...rest\n}: InlineButtonsItemProps) {\n const { mode } = useContext(InlineButtonsContext);\n\n return (\n <Tappable\n ref={ref}\n Component=\"button\"\n type=\"button\"\n interactiveAnimation=\"opacity\"\n className={cn(inlineButtonsItem({ mode }), className)}\n {...rest}\n >\n <span className={styles.icon}>{icon}</span>\n <Caption className={styles.label} level=\"2\" weight=\"2\">\n {children}\n </Caption>\n </Tappable>\n );\n}\n\nInlineButtonsItem.displayName = 'InlineButtonsItem';\n","'use client';\n\nimport type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { InlineButtonsContext } from './context';\nimport styles from './InlineButtons.module.css';\nimport type { InlineButtonsMode } from './InlineButtons.variants';\nimport { InlineButtonsItem } from './InlineButtonsItem';\n\nexport type { InlineButtonsMode };\n\nexport interface InlineButtonsProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n mode?: InlineButtonsMode;\n}\n\nexport function InlineButtons({\n ref,\n mode = 'bezeled',\n className,\n children,\n ...rest\n}: InlineButtonsProps) {\n return (\n <InlineButtonsContext.Provider value={{ mode }}>\n {/* biome-ignore lint/a11y/useSemanticElements: a row of action buttons, not a form control group; <fieldset> would add a border box and legend semantics we don't want */}\n <div ref={ref} role=\"group\" className={cn(styles.group, className)} {...rest}>\n {children}\n </div>\n </InlineButtonsContext.Provider>\n );\n}\n\nInlineButtons.displayName = 'InlineButtons';\nInlineButtons.Item = InlineButtonsItem;\n",".base {\n position: relative;\n padding: 20px 22px 16px;\n background: var(--tgui--bg_color);\n}\n\n.body {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n padding: var(--tgui--field_padding_y) var(--tgui--field_padding_x);\n}\n\n.body > :not(:first-child) {\n margin-left: var(--tgui--field_gap);\n}\n\n.base .body {\n border-radius: 14px;\n box-shadow: 0 0 0 2px var(--tgui--outline);\n}\n\n.ios .body {\n min-height: var(--tgui--field_min_height);\n border-radius: var(--tgui--field_radius);\n background: var(--tgui--tertiary_bg_color);\n}\n\n.align-start .body {\n align-items: flex-start;\n}\n\n.before,\n.after {\n display: flex;\n align-items: center;\n}\n\n.header {\n position: absolute;\n top: 6px;\n left: 32px;\n max-width: calc(100% - 76px);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n padding: 0 6px;\n border-radius: 5px;\n color: var(--tgui--secondary_hint_color);\n background: var(--tgui--bg_color);\n}\n\n.focused.base .body {\n box-shadow: 0 0 0 2px var(--tgui--link_color);\n}\n\n.focused.base .header {\n color: var(--tgui--link_color);\n}\n\n.error.base .body {\n box-shadow: 0 0 0 2px var(--tgui--destructive_text_color);\n}\n\n.error.base .header {\n color: var(--tgui--destructive_text_color);\n}\n\n.error.ios .body {\n box-shadow: 0 0 0 1.5px var(--tgui--destructive_text_color);\n}\n\n.disabled {\n pointer-events: none;\n}\n\n.disabled.ios {\n opacity: 0.35;\n}\n","import type { ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './FormField.module.css';\n\nexport type FormFieldStatus = 'default' | 'error' | 'focused';\n\nexport interface FormFieldProps {\n ref?: Ref<HTMLDivElement>;\n ios?: boolean;\n status?: FormFieldStatus;\n disabled?: boolean;\n alignStart?: boolean;\n header?: ReactNode;\n before?: ReactNode;\n after?: ReactNode;\n className?: string;\n children: ReactNode;\n}\n\nexport function FormField({\n ref,\n ios = false,\n status = 'default',\n disabled = false,\n alignStart = false,\n header,\n before,\n after,\n className,\n children,\n}: FormFieldProps) {\n return (\n <div\n ref={ref}\n className={cn(\n ios ? styles.ios : styles.base,\n status === 'error' && styles.error,\n status === 'focused' && styles.focused,\n disabled && styles.disabled,\n alignStart && styles['align-start'],\n className,\n )}\n aria-disabled={disabled || undefined}\n >\n {/* biome-ignore lint/a11y/noLabelWithoutControl: the control is the field passed in as children */}\n <label className={styles.body}>\n {before != null ? <span className={styles.before}>{before}</span> : null}\n {children}\n {after != null ? <span className={styles.after}>{after}</span> : null}\n </label>\n {header != null && !ios ? <span className={styles.header}>{header}</span> : null}\n </div>\n );\n}\n\nFormField.displayName = 'FormField';\n",".field {\n display: block;\n width: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n background: transparent;\n color: var(--tgui--text_color);\n text-overflow: ellipsis;\n}\n\n.field::placeholder {\n color: var(--tgui--secondary_hint_color);\n}\n\n.field::-webkit-outer-spin-button,\n.field::-webkit-inner-spin-button {\n appearance: none;\n}\n","'use client';\n\nimport {\n type FocusEvent,\n type InputHTMLAttributes,\n type ReactNode,\n type Ref,\n useState,\n} from 'react';\nimport { FormField } from '../FormField';\nimport { Subheadline } from '../Subheadline';\nimport { Text } from '../Text';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Input.module.css';\n\nexport type InputStatus = 'default' | 'error' | 'focused';\n\nexport interface InputProps extends InputHTMLAttributes<HTMLInputElement> {\n ref?: Ref<HTMLInputElement>;\n header?: ReactNode;\n before?: ReactNode;\n after?: ReactNode;\n status?: InputStatus;\n}\n\nexport function Input({\n ref,\n type = 'text',\n header,\n before,\n after,\n status,\n disabled,\n className,\n onFocus,\n onBlur,\n ...rest\n}: InputProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n const [focused, setFocused] = useState(false);\n const state = status ?? (focused ? 'focused' : 'default');\n const Typography = ios ? Text : Subheadline;\n\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n if (!disabled) setFocused(true);\n onFocus?.(event);\n };\n const handleBlur = (event: FocusEvent<HTMLInputElement>) => {\n setFocused(false);\n onBlur?.(event);\n };\n\n return (\n <FormField\n ios={ios}\n status={state}\n disabled={disabled}\n header={header}\n before={before}\n after={after}\n className={className}\n >\n <Typography\n ref={ref as Ref<HTMLElement>}\n Component=\"input\"\n className={styles.field}\n type={type}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...rest}\n />\n </FormField>\n );\n}\n\nInput.displayName = 'Input';\n",".large-title {\n font-size: var(--tgui--large_title--font_size);\n line-height: var(--tgui--large_title--line_height);\n\n letter-spacing: -0.02em;\n}\n","import type { Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Typography, type TypographyProps } from '../Typography';\nimport styles from './LargeTitle.module.css';\n\nexport interface LargeTitleProps extends TypographyProps {\n ref?: Ref<HTMLElement>;\n}\n\nexport function LargeTitle({\n ref,\n weight = '1',\n className,\n Component = 'h1',\n ...rest\n}: LargeTitleProps) {\n return (\n <Typography\n ref={ref}\n weight={weight}\n Component={Component}\n className={cn(styles['large-title'], className)}\n {...rest}\n />\n );\n}\n\nLargeTitle.displayName = 'LargeTitle';\n",".link {\n color: var(--tgui--link_color);\n text-decoration: none;\n border-radius: 3px;\n outline-offset: 2px;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .link:hover {\n text-decoration: underline;\n }\n}\n\n.link:focus-visible {\n outline: 2px solid var(--tgui--link_color);\n}\n\n.icon {\n display: inline-block;\n width: 0.85em;\n height: 0.85em;\n margin-inline-start: 0.15em;\n vertical-align: -0.05em;\n}\n","import type { AnchorHTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Link.module.css';\n\nexport interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n ref?: Ref<HTMLAnchorElement>;\n}\n\nexport function Link({ ref, target, rel, className, children, ...rest }: LinkProps) {\n const external = target === '_blank';\n return (\n <a\n ref={ref}\n target={target}\n rel={external ? (rel ?? 'noopener noreferrer') : rel}\n className={cn(styles.link, className)}\n {...rest}\n >\n {children}\n {external ? (\n <svg className={styles.icon} viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden>\n <path\n d=\"M6 3h7v7M13 3l-8 8\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n ) : null}\n </a>\n );\n}\n\nLink.displayName = 'Link';\n",".list {\n box-sizing: border-box;\n}\n\n.ios {\n padding: 10px 18px;\n}\n\n.list > :not(:last-child) {\n margin-bottom: 12px;\n}\n","'use client';\n\nimport type { ElementType, HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { useTgui } from '../TguiProvider';\nimport styles from './List.module.css';\n\nexport interface ListProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n Component?: ElementType;\n}\n\nexport function List({ ref, Component = 'div', className, children, ...rest }: ListProps) {\n const { platform } = useTgui();\n\n return (\n <Component\n ref={ref}\n className={cn(styles.list, platform === 'ios' && styles.ios, className)}\n {...rest}\n >\n {children}\n </Component>\n );\n}\n\nList.displayName = 'List';\n",".nav {\n font-family: var(--tgui--font-family);\n}\n\n.list {\n display: flex;\n align-items: center;\n gap: 4px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.page {\n min-width: 32px;\n height: 32px;\n padding: 0 8px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--tgui--text_color);\n font: inherit;\n font-size: 14px;\n cursor: pointer;\n}\n\n.page--active {\n color: var(--tgui--link_color);\n font-weight: var(--tgui--font_weight--accent2);\n background: var(--tgui--secondary_fill);\n}\n\n@media (hover: hover) and (pointer: fine) {\n .page:not(.page--active):hover {\n background: var(--tgui--plain_background);\n }\n}\n\n.page:focus-visible {\n outline: 2px solid var(--tgui--link_color);\n outline-offset: 2px;\n}\n\n.dots {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 32px;\n height: 32px;\n color: var(--tgui--hint_color);\n}\n\n.dotList {\n display: flex;\n align-items: center;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.dot {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n padding: 0;\n border: 0;\n background: transparent;\n cursor: pointer;\n}\n\n.dot::after {\n content: \"\";\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--tgui--secondary_fill);\n}\n\n.dot[data-active]::after {\n width: 8px;\n height: 8px;\n background: var(--tgui--link_color);\n}\n\n.dotGap {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 12px;\n height: 20px;\n}\n\n.dotGap::after {\n content: \"\";\n width: 3px;\n height: 3px;\n border-radius: 50%;\n background: var(--tgui--hint_color);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .dot::after {\n transition:\n width 0.15s ease,\n height 0.15s ease,\n background 0.15s ease;\n }\n}\n\n.dot:focus-visible {\n outline: 2px solid var(--tgui--link_color);\n outline-offset: 2px;\n border-radius: 50%;\n}\n","export const DOTS = 'dots' as const;\n\nfunction range(start: number, end: number) {\n return Array.from({ length: end - start + 1 }, (_, index) => start + index);\n}\n\nexport function paginationRange(page: number, count: number, siblingCount: number) {\n const totalNumbers = siblingCount * 2 + 5;\n if (totalNumbers >= count) return range(1, count);\n\n const leftSibling = Math.max(page - siblingCount, 1);\n const rightSibling = Math.min(page + siblingCount, count);\n const showLeftDots = leftSibling > 2;\n const showRightDots = rightSibling < count - 1;\n\n if (!showLeftDots && showRightDots) {\n return [...range(1, 3 + siblingCount * 2), DOTS, count];\n }\n if (showLeftDots && !showRightDots) {\n return [1, DOTS, ...range(count - (3 + siblingCount * 2) + 1, count)];\n }\n return [1, DOTS, ...range(leftSibling, rightSibling), DOTS, count];\n}\n","'use client';\n\nimport type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Pagination.module.css';\nimport { DOTS, paginationRange } from './paginationRange';\n\nexport interface CompactPaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {\n ref?: Ref<HTMLElement>;\n page: number;\n count: number;\n onChange: (page: number) => void;\n siblingCount?: number;\n}\n\nexport function CompactPagination({\n ref,\n page,\n count,\n onChange,\n siblingCount = 1,\n className,\n ...rest\n}: CompactPaginationProps) {\n const items = paginationRange(page, count, siblingCount);\n\n return (\n <nav ref={ref} aria-label=\"Pagination\" className={cn(styles.nav, className)} {...rest}>\n <ul className={styles.dotList}>\n {items.map((item, index) =>\n item === DOTS ? (\n // biome-ignore lint/suspicious/noArrayIndexKey: ellipsis positions are stable per render\n <li key={`dots-${index}`} className={styles.dotGap} aria-hidden />\n ) : (\n <li key={item}>\n <button\n type=\"button\"\n className={styles.dot}\n data-active={item === page || undefined}\n aria-label={`Page ${item}`}\n aria-current={item === page ? 'page' : undefined}\n onClick={() => onChange(item)}\n />\n </li>\n ),\n )}\n </ul>\n </nav>\n );\n}\n\nCompactPagination.displayName = 'CompactPagination';\n","'use client';\n\nimport type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { IconButton } from '../IconButton';\nimport styles from './Pagination.module.css';\nimport { DOTS, paginationRange } from './paginationRange';\n\nexport interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {\n ref?: Ref<HTMLElement>;\n page: number;\n count: number;\n onChange: (page: number) => void;\n siblingCount?: number;\n}\n\nconst ArrowIcon = ({ direction }: { direction: 'prev' | 'next' }) => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 18 18\" fill=\"none\" aria-hidden>\n <path\n d={direction === 'prev' ? 'M11.25 4.5L6.75 9l4.5 4.5' : 'M6.75 4.5L11.25 9l-4.5 4.5'}\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\nexport function Pagination({\n ref,\n page,\n count,\n onChange,\n siblingCount = 1,\n className,\n ...rest\n}: PaginationProps) {\n const items = paginationRange(page, count, siblingCount);\n\n return (\n <nav ref={ref} aria-label=\"Pagination\" className={cn(styles.nav, className)} {...rest}>\n <ul className={styles.list}>\n <li>\n <IconButton\n mode=\"gray\"\n size=\"s\"\n aria-label=\"Previous page\"\n disabled={page <= 1}\n onClick={() => onChange(page - 1)}\n >\n <ArrowIcon direction=\"prev\" />\n </IconButton>\n </li>\n {items.map((item, index) =>\n item === DOTS ? (\n // biome-ignore lint/suspicious/noArrayIndexKey: ellipsis positions are stable per render\n <li key={`dots-${index}`} className={styles.dots} aria-hidden>\n …\n </li>\n ) : (\n <li key={item}>\n <button\n type=\"button\"\n className={cn(styles.page, item === page && styles['page--active'])}\n aria-current={item === page ? 'page' : undefined}\n onClick={() => onChange(item)}\n >\n {item}\n </button>\n </li>\n ),\n )}\n <li>\n <IconButton\n mode=\"gray\"\n size=\"s\"\n aria-label=\"Next page\"\n disabled={page >= count}\n onClick={() => onChange(page + 1)}\n >\n <ArrowIcon direction=\"next\" />\n </IconButton>\n </li>\n </ul>\n </nav>\n );\n}\n\nPagination.displayName = 'Pagination';\n",".pinInput {\n display: inline-flex;\n gap: 10px;\n}\n\n.cell {\n width: 44px;\n height: 52px;\n padding: 0;\n border: 0;\n border-radius: 12px;\n background: var(--tgui--tertiary_bg_color);\n color: var(--tgui--text_color);\n font-family: var(--tgui--font-family);\n font-size: 24px;\n font-weight: var(--tgui--font_weight--accent2);\n text-align: center;\n caret-color: var(--tgui--link_color);\n box-shadow: inset 0 0 0 1.5px transparent;\n transition: box-shadow 0.12s ease;\n}\n\n.cell:focus {\n outline: none;\n box-shadow: inset 0 0 0 1.5px var(--tgui--link_color);\n}\n\n.cell:disabled {\n opacity: 0.4;\n}\n\n.pinInput[data-invalid] .cell {\n box-shadow: inset 0 0 0 1.5px var(--tgui--destructive_text_color);\n}\n","'use client';\n\nimport {\n type ClipboardEvent as ReactClipboardEvent,\n type KeyboardEvent as ReactKeyboardEvent,\n type Ref,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './PinInput.module.css';\n\nconst PATTERNS = {\n numeric: /[0-9]/,\n alphanumeric: /[a-z0-9]/i,\n};\n\nexport interface PinInputProps {\n ref?: Ref<HTMLDivElement>;\n length?: number;\n value?: string;\n defaultValue?: string;\n onChange?: (value: string) => void;\n onComplete?: (value: string) => void;\n type?: 'numeric' | 'alphanumeric';\n mask?: boolean;\n disabled?: boolean;\n invalid?: boolean;\n name?: string;\n 'aria-label'?: string;\n className?: string;\n}\n\nexport function PinInput({\n ref,\n length = 4,\n value: valueProp,\n defaultValue = '',\n onChange,\n onComplete,\n type = 'numeric',\n mask = false,\n disabled = false,\n invalid = false,\n name,\n 'aria-label': ariaLabel = 'Verification code',\n className,\n}: PinInputProps) {\n const [uncontrolled, setUncontrolled] = useState(defaultValue.slice(0, length));\n const raw = valueProp ?? uncontrolled;\n const chars = useMemo(() => {\n const next = raw.split('').slice(0, length);\n while (next.length < length) next.push('');\n return next;\n }, [raw, length]);\n\n const inputs = useRef<(HTMLInputElement | null)[]>([]);\n const pattern = PATTERNS[type];\n\n const commit = (next: string[]) => {\n const value = next.join('');\n if (valueProp == null) setUncontrolled(value);\n onChange?.(value);\n if (value.length === length && next.every(Boolean)) onComplete?.(value);\n };\n\n const focusCell = (index: number) => {\n const clamped = Math.max(0, Math.min(length - 1, index));\n inputs.current[clamped]?.focus();\n inputs.current[clamped]?.select();\n };\n\n const handleChange = (index: number, incoming: string) => {\n const char = incoming\n .split('')\n .reverse()\n .find((c) => pattern.test(c));\n if (!char) return;\n const next = [...chars];\n next[index] = char;\n commit(next);\n focusCell(index + 1);\n };\n\n const handleKeyDown = (index: number, event: ReactKeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Backspace') {\n event.preventDefault();\n const next = [...chars];\n if (next[index]) {\n next[index] = '';\n commit(next);\n } else if (index > 0) {\n next[index - 1] = '';\n commit(next);\n focusCell(index - 1);\n }\n } else if (event.key === 'ArrowLeft') {\n event.preventDefault();\n focusCell(index - 1);\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n focusCell(index + 1);\n }\n };\n\n const handlePaste = (index: number, event: ReactClipboardEvent<HTMLInputElement>) => {\n event.preventDefault();\n const pasted = event.clipboardData\n .getData('text')\n .split('')\n .filter((c) => pattern.test(c));\n if (pasted.length === 0) return;\n const next = [...chars];\n for (let i = 0; i < pasted.length && index + i < length; i += 1) {\n next[index + i] = pasted[i];\n }\n commit(next);\n focusCell(index + pasted.length);\n };\n\n return (\n // biome-ignore lint/a11y/useSemanticElements: a labelled group of separate inputs; <fieldset> would add a border box and legend semantics we don't want\n <div\n ref={ref}\n className={cn(styles.pinInput, className)}\n role=\"group\"\n aria-label={ariaLabel}\n data-invalid={invalid || undefined}\n >\n {chars.map((char, index) => (\n <input\n // biome-ignore lint/suspicious/noArrayIndexKey: fixed-length positional cells\n key={index}\n ref={(node) => {\n inputs.current[index] = node;\n }}\n className={styles.cell}\n type={mask ? 'password' : 'text'}\n inputMode={type === 'numeric' ? 'numeric' : 'text'}\n autoComplete={index === 0 ? 'one-time-code' : 'off'}\n name={name ? `${name}-${index}` : undefined}\n aria-label={`${ariaLabel}, digit ${index + 1}`}\n maxLength={1}\n value={char}\n disabled={disabled}\n onChange={(event) => handleChange(index, event.target.value)}\n onKeyDown={(event) => handleKeyDown(index, event)}\n onPaste={(event) => handlePaste(index, event)}\n onFocus={(event) => event.target.select()}\n />\n ))}\n </div>\n );\n}\n\nPinInput.displayName = 'PinInput';\n",".level-1 {\n font-size: var(--tgui--title1--font_size);\n line-height: var(--tgui--title1--line_height);\n}\n\n.level-2 {\n font-size: var(--tgui--title2--font_size);\n line-height: var(--tgui--title2--line_height);\n}\n\n.level-3 {\n font-size: var(--tgui--title3--font_size);\n line-height: var(--tgui--title3--line_height);\n}\n","import type { ElementType } from 'react';\nimport styles from './Title.module.css';\n\nexport type TitleLevel = '1' | '2' | '3';\n\nexport const TITLE_LEVELS: Record<TitleLevel, { tag: ElementType; className: string }> = {\n '1': { tag: 'h2', className: styles['level-1'] },\n '2': { tag: 'h3', className: styles['level-2'] },\n '3': { tag: 'h4', className: styles['level-3'] },\n};\n","import type { Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Typography, type TypographyProps } from '../Typography';\nimport { TITLE_LEVELS, type TitleLevel } from './Title.variants';\n\nexport interface TitleProps extends TypographyProps {\n ref?: Ref<HTMLElement>;\n level?: TitleLevel;\n}\n\nexport function Title({ ref, level = '2', Component, className, ...rest }: TitleProps) {\n const { tag, className: levelClass } = TITLE_LEVELS[level];\n\n return (\n <Typography\n ref={ref}\n Component={Component ?? tag}\n className={cn(levelClass, className)}\n {...rest}\n />\n );\n}\n\nTitle.displayName = 'Title';\n",".placeholder {\n overflow: hidden;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n gap: 24px;\n padding: 32px;\n}\n\n.fields {\n margin: 0;\n text-align: center;\n overflow-wrap: anywhere;\n}\n\n.description {\n color: var(--tgui--hint_color);\n}\n\n.description:not(:first-child) {\n margin-top: 8px;\n}\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Text } from '../Text';\nimport { Title } from '../Title';\nimport styles from './Placeholder.module.css';\n\nexport interface PlaceholderProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n children?: ReactNode;\n header?: ReactNode;\n description?: ReactNode;\n action?: ReactNode;\n}\n\nexport function Placeholder({\n ref,\n children,\n header,\n description,\n action,\n className,\n ...rest\n}: PlaceholderProps) {\n return (\n <section ref={ref} className={cn(styles.placeholder, className)} {...rest}>\n {children}\n {header != null || description != null ? (\n <dl className={styles.fields}>\n {header != null ? (\n <Title Component=\"dt\" level=\"3\" weight=\"2\">\n {header}\n </Title>\n ) : null}\n {description != null ? (\n <Text Component=\"dd\" className={styles.description}>\n {description}\n </Text>\n ) : null}\n </dl>\n ) : null}\n {action}\n </section>\n );\n}\n\nPlaceholder.displayName = 'Placeholder';\n","'use client';\n\nimport type { ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useTgui } from '../TguiProvider';\n\nexport interface PortalProps {\n children?: ReactNode;\n container?: Element | DocumentFragment | null;\n}\n\nexport function Portal({ children, container }: PortalProps) {\n const { portalContainer } = useTgui();\n const target = container ?? portalContainer;\n if (!target) return null;\n return createPortal(children, target);\n}\n\nPortal.displayName = 'Portal';\n",".track {\n overflow: hidden;\n width: 100%;\n height: 4px;\n border-radius: 2px;\n background: var(--tgui--tertiary_bg_color);\n}\n\n.bar {\n height: 100%;\n border-radius: inherit;\n background: var(--tgui--link_color);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .bar {\n transition: width 0.25s ease;\n }\n}\n","import type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Progress.module.css';\n\nexport interface ProgressProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n value?: number;\n}\n\nexport function Progress({ ref, value = 0, className, ...rest }: ProgressProps) {\n const clamped = Math.max(0, Math.min(100, value));\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={Math.round(clamped)}\n className={cn(styles.track, className)}\n {...rest}\n >\n <div className={styles.bar} style={{ width: `${clamped}%` }} />\n </div>\n );\n}\n\nProgress.displayName = 'Progress';\n",".radio {\n position: relative;\n display: inline-flex;\n cursor: pointer;\n}\n\n.radio[data-disabled] {\n cursor: default;\n opacity: 0.3;\n}\n\n.input {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n cursor: inherit;\n}\n\n.dot {\n position: relative;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n box-shadow: inset 0 0 0 2px var(--tgui--outline);\n pointer-events: none;\n}\n\n.dot::after {\n content: \"\";\n position: absolute;\n inset: 5px;\n border-radius: 50%;\n background: var(--tgui--link_color);\n transform: scale(0);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .dot {\n transition: box-shadow 0.15s ease-out;\n }\n\n .dot::after {\n transition: transform 0.15s ease-out;\n }\n}\n\n.input:checked + .dot {\n box-shadow: inset 0 0 0 2px var(--tgui--link_color);\n}\n\n.input:checked + .dot::after {\n transform: scale(1);\n}\n\n.input:focus-visible + .dot {\n box-shadow:\n inset 0 0 0 2px var(--tgui--outline),\n 0 0 0 2px var(--tgui--link_color);\n}\n\n.input:checked:focus-visible + .dot {\n box-shadow:\n inset 0 0 0 2px var(--tgui--link_color),\n 0 0 0 2px var(--tgui--link_color);\n}\n","import type { InputHTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Radio.module.css';\n\nexport interface RadioProps extends InputHTMLAttributes<HTMLInputElement> {\n ref?: Ref<HTMLInputElement>;\n}\n\nexport function Radio({ ref, disabled, className, style, ...rest }: RadioProps) {\n return (\n <span\n className={cn(styles.radio, className)}\n style={style}\n data-disabled={disabled || undefined}\n >\n <input ref={ref} type=\"radio\" className={styles.input} disabled={disabled} {...rest} />\n <span className={styles.dot} aria-hidden />\n </span>\n );\n}\n\nRadio.displayName = 'Radio';\n",".rating {\n position: relative;\n display: inline-flex;\n width: max-content;\n}\n\n.row {\n display: flex;\n gap: 2px;\n}\n\n.empty {\n color: color-mix(in srgb, var(--tgui--rating--color, #f5a623) 22%, transparent);\n}\n\n.fill {\n position: absolute;\n inset: 0;\n pointer-events: none;\n color: var(--tgui--rating--color, #f5a623);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .fill {\n transition: clip-path 0.15s ease-out;\n }\n}\n\n.star {\n display: block;\n width: 1em;\n height: 1em;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n font-size: 24px;\n line-height: 0;\n}\n\n.interactive .star {\n cursor: pointer;\n}\n\n.interactive:not([data-disabled]) .star:focus-visible {\n outline: 2px solid var(--tgui--link_color);\n outline-offset: 2px;\n border-radius: 4px;\n}\n\n.star svg {\n display: block;\n width: 100%;\n height: 100%;\n}\n\n.rating[data-disabled] {\n opacity: 0.4;\n}\n","'use client';\n\nimport {\n type KeyboardEvent as ReactKeyboardEvent,\n type ReactNode,\n type Ref,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Rating.module.css';\n\nconst DefaultStar = (\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden>\n <path d=\"M12 2l2.9 6.3 6.9.8-5.1 4.7 1.4 6.8L12 17.8 5.9 20.4l1.4-6.8L2.2 9.1l6.9-.8z\" />\n </svg>\n);\n\nexport interface RatingProps {\n ref?: Ref<HTMLDivElement>;\n value?: number;\n defaultValue?: number;\n onChange?: (value: number) => void;\n count?: number;\n readOnly?: boolean;\n disabled?: boolean;\n icon?: ReactNode;\n name?: string;\n 'aria-label'?: string;\n className?: string;\n}\n\nexport function Rating({\n ref,\n value: valueProp,\n defaultValue = 0,\n onChange,\n count = 5,\n readOnly = false,\n disabled = false,\n icon = DefaultStar,\n name,\n 'aria-label': ariaLabel = 'Rating',\n className,\n}: RatingProps) {\n const [uncontrolled, setUncontrolled] = useState(defaultValue);\n const value = valueProp ?? uncontrolled;\n const [hovered, setHovered] = useState<number | null>(null);\n\n const interactive = !readOnly && !disabled;\n const shown = hovered ?? value;\n const pct = Math.max(0, Math.min(1, shown / count)) * 100;\n\n const set = (next: number) => {\n if (!interactive) return;\n if (valueProp == null) setUncontrolled(next);\n onChange?.(next);\n };\n\n const onKeyDown = (event: ReactKeyboardEvent<HTMLDivElement>) => {\n if (!interactive) return;\n if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {\n event.preventDefault();\n set(Math.min(count, Math.round(value) + 1));\n } else if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {\n event.preventDefault();\n set(Math.max(0, Math.round(value) - 1));\n }\n };\n\n const stars = Array.from({ length: count }, (_, i) => i + 1);\n\n const interactiveHandlers = interactive\n ? { onKeyDown, onMouseLeave: () => setHovered(null) }\n : {};\n\n const role = interactive ? 'radiogroup' : 'img';\n const label = interactive ? ariaLabel : `${ariaLabel}: ${value} out of ${count}`;\n\n return (\n // biome-ignore lint/a11y/useAriaPropsSupportedByRole: role is radiogroup or img, both support aria-label\n <div\n ref={ref}\n className={cn(styles.rating, interactive && styles.interactive, className)}\n data-disabled={disabled || undefined}\n role={role}\n aria-label={label}\n {...interactiveHandlers}\n >\n <div className={cn(styles.row, styles.empty)} aria-hidden={!interactive}>\n {stars.map((star) =>\n interactive ? (\n // biome-ignore lint/a11y/useSemanticElements: a button in a radiogroup is the rating ARIA pattern; a native radio can't hold the icon\n <button\n key={star}\n type=\"button\"\n role=\"radio\"\n aria-checked={Math.round(value) === star}\n aria-label={`${star}`}\n tabIndex={star === (Math.round(value) || 1) ? 0 : -1}\n name={name}\n className={styles.star}\n onClick={() => set(star)}\n onMouseEnter={() => setHovered(star)}\n onFocus={() => setHovered(star)}\n onBlur={() => setHovered(null)}\n >\n {icon}\n </button>\n ) : (\n <span key={star} className={styles.star}>\n {icon}\n </span>\n ),\n )}\n </div>\n <div className={styles.fill} style={{ clipPath: `inset(0 ${100 - pct}% 0 0)` }} aria-hidden>\n <div className={styles.row}>\n {stars.map((star) => (\n <span key={star} className={styles.star}>\n {icon}\n </span>\n ))}\n </div>\n </div>\n </div>\n );\n}\n\nRating.displayName = 'Rating';\n",".bar {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n}\n\n.field {\n position: relative;\n display: flex;\n align-items: center;\n flex: 1;\n min-width: 0;\n height: var(--tgui--field_min_height);\n padding: 0 var(--tgui--field_padding_x);\n border-radius: var(--tgui--field_radius);\n background: var(--tgui--tertiary_bg_color);\n}\n\n.icon {\n flex-shrink: 0;\n margin-right: var(--tgui--field_gap);\n color: var(--tgui--secondary_hint_color);\n}\n\n.input {\n flex: 1;\n min-width: 0;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n background: transparent;\n color: var(--tgui--text_color);\n font-family: var(--tgui--font-family);\n font-size: 16px;\n}\n\n.input::placeholder {\n color: var(--tgui--secondary_hint_color);\n}\n\n.input::-webkit-search-cancel-button,\n.input::-webkit-search-decoration {\n appearance: none;\n}\n\n.clear {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n margin-left: 4px;\n padding: 0;\n border: 0;\n border-radius: 50%;\n color: var(--tgui--secondary_hint_color);\n background: transparent;\n cursor: pointer;\n}\n\n.clear:focus-visible {\n outline: 2px solid var(--tgui--link_color);\n outline-offset: 2px;\n}\n\n.cancel {\n flex-shrink: 0;\n overflow: hidden;\n max-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--tgui--link_color);\n font-family: var(--tgui--font-family);\n font-size: 16px;\n white-space: nowrap;\n cursor: pointer;\n opacity: 0;\n}\n\n.cancel--visible {\n max-width: 80px;\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .cancel {\n transition:\n opacity 0.2s ease,\n max-width 0.2s ease;\n }\n}\n\n.cancel:focus-visible {\n outline: 2px solid var(--tgui--link_color);\n outline-offset: 2px;\n}\n","'use client';\n\nimport {\n type ChangeEvent,\n type HTMLAttributes,\n type MouseEvent,\n type Ref,\n useRef,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './SearchBar.module.css';\n\nexport interface SearchBarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {\n ref?: Ref<HTMLDivElement>;\n value: string;\n onChange: (value: string) => void;\n placeholder?: string;\n onCancel?: () => void;\n label?: string;\n}\n\nconst preventFocusLoss = (event: MouseEvent<HTMLButtonElement>) => event.preventDefault();\n\nexport function SearchBar({\n ref,\n value,\n onChange,\n placeholder = 'Search',\n onCancel,\n label = 'Search',\n className,\n ...rest\n}: SearchBarProps) {\n const inputRef = useRef<HTMLInputElement | null>(null);\n const [focused, setFocused] = useState(false);\n\n const handleClear = () => {\n onChange('');\n inputRef.current?.focus();\n };\n\n const handleCancel = () => {\n onCancel?.();\n inputRef.current?.blur();\n };\n\n return (\n <div ref={ref} className={cn(styles.bar, className)} {...rest}>\n <div className={styles.field}>\n <svg\n className={styles.icon}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n aria-hidden\n >\n <circle cx=\"7\" cy=\"7\" r=\"5.25\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path\n d=\"M11.5 11.5L14.5 14.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n />\n </svg>\n <input\n ref={inputRef}\n type=\"search\"\n className={styles.input}\n value={value}\n placeholder={placeholder}\n aria-label={label}\n onChange={(event: ChangeEvent<HTMLInputElement>) => onChange(event.target.value)}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n />\n {value.length > 0 ? (\n <button\n type=\"button\"\n className={styles.clear}\n aria-label=\"Clear\"\n onMouseDown={preventFocusLoss}\n onClick={handleClear}\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden>\n <circle cx=\"7\" cy=\"7\" r=\"7\" fill=\"currentColor\" opacity=\"0.15\" />\n <path\n d=\"M4.5 4.5l5 5M9.5 4.5l-5 5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.4\"\n strokeLinecap=\"round\"\n />\n </svg>\n </button>\n ) : null}\n </div>\n {onCancel != null ? (\n <button\n type=\"button\"\n className={cn(styles.cancel, focused && styles['cancel--visible'])}\n tabIndex={focused ? 0 : -1}\n onMouseDown={preventFocusLoss}\n onClick={handleCancel}\n >\n Cancel\n </button>\n ) : null}\n </div>\n );\n}\n\nSearchBar.displayName = 'SearchBar';\n",".body {\n display: flex;\n flex-direction: column;\n}\n\n.sectionBase .bodyWithHeader {\n background: var(--tgui--section_bg_color);\n box-shadow: var(--tgui--base--section--box_shadow);\n}\n\n.sectionIos .body {\n border-radius: 12px;\n background: var(--tgui--section_bg_color);\n}\n\n.sectionIos .body > :first-child {\n border-radius: 12px 12px 0 0;\n}\n\n.sectionIos .body > :last-child {\n border-radius: 0 0 12px 12px;\n}\n\n.sectionIos .body > :only-child {\n border-radius: 12px;\n}\n\n.header {\n padding: 20px 24px 4px 22px;\n color: var(--tgui--link_color);\n}\n\n.headerLarge {\n padding-left: 24px;\n color: var(--tgui--text_color);\n}\n\n.headerIos {\n padding: 16px 16px 8px;\n color: var(--tgui--section_header_text_color);\n}\n\n.headerIos.headerLarge {\n padding: 0 0 12px;\n color: var(--tgui--text_color);\n}\n\n.footer {\n padding: 12px 24px;\n}\n\n.footerIos {\n padding: 8px 16px 0;\n}\n\n.footerCentered {\n padding: 16px 24px 20px;\n text-align: center;\n}\n\n.footerIos.footerCentered {\n padding: 16px 16px 0;\n}\n\n.footerText {\n color: var(--tgui--hint_color);\n}\n","'use client';\n\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Caption } from '../Caption';\nimport { Subheadline } from '../Subheadline';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Section.module.css';\n\nexport interface SectionFooterProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n centered?: boolean;\n}\n\nfunction FooterText({ ios, children }: { ios: boolean; children: ReactNode }) {\n return ios ? (\n <Caption className={styles.footerText}>{children}</Caption>\n ) : (\n <Subheadline level=\"2\" className={styles.footerText}>\n {children}\n </Subheadline>\n );\n}\n\nexport function SectionFooter({\n ref,\n centered = false,\n className,\n children,\n ...rest\n}: SectionFooterProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n\n return (\n <footer\n ref={ref}\n className={cn(\n styles.footer,\n ios && styles.footerIos,\n centered && styles.footerCentered,\n className,\n )}\n {...rest}\n >\n <FooterText ios={ios}>{children}</FooterText>\n </footer>\n );\n}\n\nSectionFooter.displayName = 'SectionFooter';\n","'use client';\n\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Caption } from '../Caption';\nimport { Subheadline } from '../Subheadline';\nimport { Text } from '../Text';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Section.module.css';\n\nexport interface SectionHeaderProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n large?: boolean;\n}\n\nfunction HeaderText({\n ios,\n large,\n children,\n}: {\n ios: boolean;\n large: boolean;\n children: ReactNode;\n}) {\n if (large) {\n return ios ? (\n <Subheadline Component=\"h2\" level=\"1\" weight=\"2\">\n {children}\n </Subheadline>\n ) : (\n <Text Component=\"h2\" weight=\"2\">\n {children}\n </Text>\n );\n }\n return ios ? (\n <Caption Component=\"h2\" caps>\n {children}\n </Caption>\n ) : (\n <Subheadline Component=\"h2\" level=\"2\" weight=\"2\">\n {children}\n </Subheadline>\n );\n}\n\nexport function SectionHeader({\n ref,\n large = false,\n className,\n children,\n ...rest\n}: SectionHeaderProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n\n return (\n <header\n ref={ref}\n className={cn(styles.header, ios && styles.headerIos, large && styles.headerLarge, className)}\n {...rest}\n >\n <HeaderText ios={ios} large={large}>\n {children}\n </HeaderText>\n </header>\n );\n}\n\nSectionHeader.displayName = 'SectionHeader';\n","'use client';\n\nimport {\n Children,\n Fragment,\n type HTMLAttributes,\n isValidElement,\n type ReactNode,\n type Ref,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Divider } from '../Divider';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Section.module.css';\nimport { SectionFooter } from './SectionFooter';\nimport { SectionHeader } from './SectionHeader';\n\nexport interface SectionProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n header?: ReactNode;\n footer?: ReactNode;\n}\n\nconst isText = (node: ReactNode) => typeof node === 'string' || typeof node === 'number';\n\nexport function Section({ ref, header, footer, className, children, ...rest }: SectionProps) {\n const { platform } = useTgui();\n const rows = Children.toArray(children);\n\n return (\n <section\n ref={ref}\n className={cn(platform === 'ios' ? styles.sectionIos : styles.sectionBase, className)}\n {...rest}\n >\n <div className={styles.bodyWithHeader}>\n {isText(header) ? <SectionHeader>{header}</SectionHeader> : header}\n <div className={styles.body}>\n {rows.map((row, i) => (\n <Fragment key={isValidElement(row) ? row.key : i}>\n {row}\n {i < rows.length - 1 ? <Divider /> : null}\n </Fragment>\n ))}\n </div>\n </div>\n {isText(footer) ? <SectionFooter>{footer}</SectionFooter> : footer}\n </section>\n );\n}\n\nSection.displayName = 'Section';\nSection.Header = SectionHeader;\nSection.Footer = SectionFooter;\n",".control {\n position: relative;\n display: flex;\n box-sizing: border-box;\n padding: 2px;\n border-radius: 9px;\n background: var(--tgui--secondary_fill);\n}\n\n.pill {\n position: absolute;\n top: 2px;\n left: 0;\n bottom: 2px;\n border-radius: 7px;\n background: var(--tgui--segmented_control_active_bg, var(--tgui--bg_color));\n box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .pill {\n transition:\n transform 0.22s cubic-bezier(0.32, 0.72, 0, 1),\n width 0.22s cubic-bezier(0.32, 0.72, 0, 1);\n }\n}\n\n.item {\n position: relative;\n z-index: var(--tgui--z-index--simple, 1);\n flex: 1 1 0;\n min-width: 0;\n padding: 6px 12px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--tgui--text_color);\n font-family: var(--tgui--font-family);\n font-size: 14px;\n font-weight: var(--tgui--font_weight--accent2);\n line-height: 20px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n cursor: pointer;\n transition: color 0.15s ease;\n}\n\n.item[data-selected] {\n cursor: default;\n}\n\n.item:disabled {\n opacity: 0.35;\n cursor: default;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .item:not([data-selected]):not(:disabled):hover {\n color: var(--tgui--link_color);\n }\n}\n","'use client';\n\nimport {\n type HTMLAttributes,\n type MutableRefObject,\n type KeyboardEvent as ReactKeyboardEvent,\n type Ref,\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './SegmentedControl.module.css';\n\nexport interface SegmentedControlProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n}\n\nexport function SegmentedControl({\n ref,\n className,\n children,\n onKeyDown,\n ...rest\n}: SegmentedControlProps) {\n const trackRef = useRef<HTMLDivElement | null>(null);\n const [pill, setPill] = useState<{ left: number; width: number } | null>(null);\n\n const measure = useCallback(() => {\n const track = trackRef.current;\n if (!track) return;\n const selected = track.querySelector<HTMLElement>('[role=\"radio\"][data-selected]');\n const next = selected ? { left: selected.offsetLeft, width: selected.offsetWidth } : null;\n setPill((prev) => {\n if (prev === next) return prev;\n if (prev && next && prev.left === next.left && prev.width === next.width) return prev;\n return next;\n });\n }, []);\n\n useLayoutEffect(measure);\n\n useEffect(() => {\n const track = trackRef.current;\n if (!track || typeof ResizeObserver === 'undefined') return;\n const observer = new ResizeObserver(measure);\n observer.observe(track);\n return () => observer.disconnect();\n }, [measure]);\n\n const setRef = useCallback(\n (node: HTMLDivElement | null) => {\n trackRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n\n const handleKeyDown = (event: ReactKeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return;\n const track = trackRef.current;\n if (!track) return;\n const radios = Array.from(\n track.querySelectorAll<HTMLButtonElement>('[role=\"radio\"]:not(:disabled)'),\n );\n const current = radios.indexOf(document.activeElement as HTMLButtonElement);\n if (current < 0) return;\n event.preventDefault();\n const delta = event.key === 'ArrowRight' ? 1 : -1;\n const next = radios[(current + delta + radios.length) % radios.length];\n next.focus();\n next.click();\n };\n\n return (\n <div\n ref={setRef}\n role=\"radiogroup\"\n className={cn(styles.control, className)}\n onKeyDown={handleKeyDown}\n {...rest}\n >\n <div\n className={styles.pill}\n style={\n pill ? { transform: `translateX(${pill.left}px)`, width: pill.width } : { opacity: 0 }\n }\n aria-hidden\n />\n {children}\n </div>\n );\n}\n\nSegmentedControl.displayName = 'SegmentedControl';\n","import type { ButtonHTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './SegmentedControl.module.css';\n\nexport interface SegmentedControlItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n ref?: Ref<HTMLButtonElement>;\n selected?: boolean;\n}\n\nexport function SegmentedControlItem({\n ref,\n selected = false,\n className,\n ...rest\n}: SegmentedControlItemProps) {\n return (\n // biome-ignore lint/a11y/useSemanticElements: a button in a radiogroup is the segmented-control ARIA pattern; a native radio can't hold arbitrary content\n <button\n ref={ref}\n type=\"button\"\n role=\"radio\"\n aria-checked={selected}\n tabIndex={selected ? 0 : -1}\n data-selected={selected || undefined}\n className={cn(styles.item, className)}\n {...rest}\n />\n );\n}\n\nSegmentedControlItem.displayName = 'SegmentedControlItem';\n",".base {\n position: relative;\n padding: 20px 22px 16px;\n background: var(--tgui--bg_color);\n}\n\n.row {\n position: relative;\n box-sizing: border-box;\n border-radius: 14px;\n}\n\n.base .row {\n box-shadow: inset 0 0 0 2px var(--tgui--outline);\n}\n\n.ios .row {\n border-radius: 12px;\n background: var(--tgui--tertiary_bg_color);\n}\n\n.select {\n appearance: none;\n display: block;\n width: 100%;\n min-height: 48px;\n margin: 0;\n padding: 12px 44px 12px 16px;\n border: 0;\n outline: 0;\n border-radius: inherit;\n background: transparent;\n color: var(--tgui--text_color);\n}\n\n.chevron {\n position: absolute;\n top: 50%;\n right: 18px;\n width: 8px;\n height: 8px;\n border: solid var(--tgui--secondary_hint_color);\n border-width: 0 2px 2px 0;\n transform: translateY(-75%) rotate(45deg);\n pointer-events: none;\n}\n\n.header {\n position: absolute;\n top: 6px;\n left: 32px;\n max-width: calc(100% - 76px);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n padding: 0 6px;\n border-radius: 5px;\n color: var(--tgui--secondary_hint_color);\n background: var(--tgui--bg_color);\n}\n\n.focused.base .row {\n box-shadow: inset 0 0 0 2px var(--tgui--link_color);\n}\n\n.focused.base .header {\n color: var(--tgui--link_color);\n}\n\n.error.base .row {\n box-shadow: inset 0 0 0 2px var(--tgui--destructive_text_color);\n}\n\n.error.base .header {\n color: var(--tgui--destructive_text_color);\n}\n\n.error.ios .row {\n box-shadow: inset 0 0 0 1.5px var(--tgui--destructive_text_color);\n}\n\n.disabled {\n pointer-events: none;\n}\n\n.disabled.ios {\n opacity: 0.35;\n}\n","'use client';\n\nimport {\n type FocusEvent,\n type ReactNode,\n type Ref,\n type SelectHTMLAttributes,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport type { InputStatus } from '../Input';\nimport { Subheadline } from '../Subheadline';\nimport { Text } from '../Text';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Select.module.css';\n\nexport interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {\n ref?: Ref<HTMLSelectElement>;\n header?: ReactNode;\n status?: InputStatus;\n}\n\nexport function Select({\n ref,\n header,\n status,\n disabled,\n className,\n onFocus,\n onBlur,\n children,\n ...rest\n}: SelectProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n const [focused, setFocused] = useState(false);\n const state = status ?? (focused ? 'focused' : 'default');\n const Typography = ios ? Text : Subheadline;\n\n const handleFocus = (event: FocusEvent<HTMLSelectElement>) => {\n if (!disabled) setFocused(true);\n onFocus?.(event);\n };\n const handleBlur = (event: FocusEvent<HTMLSelectElement>) => {\n setFocused(false);\n onBlur?.(event);\n };\n\n return (\n <div\n className={cn(\n ios ? styles.ios : styles.base,\n state === 'error' && styles.error,\n state === 'focused' && styles.focused,\n disabled && styles.disabled,\n className,\n )}\n aria-disabled={disabled || undefined}\n >\n <div className={styles.row}>\n <Typography\n ref={ref as Ref<HTMLElement>}\n Component=\"select\"\n className={styles.select}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...rest}\n >\n {children}\n </Typography>\n <span aria-hidden className={styles.chevron} />\n </div>\n {header != null && !ios ? <span className={styles.header}>{header}</span> : null}\n </div>\n );\n}\n\nSelect.displayName = 'Select';\n","import { useSyncExternalStore } from 'react';\n\nconst QUERY = '(prefers-reduced-motion: reduce)';\n\nfunction subscribe(callback: () => void) {\n if (typeof window === 'undefined' || !window.matchMedia) return () => {};\n const query = window.matchMedia(QUERY);\n query.addEventListener('change', callback);\n return () => query.removeEventListener('change', callback);\n}\n\nfunction getSnapshot() {\n if (typeof window === 'undefined' || !window.matchMedia) return false;\n return window.matchMedia(QUERY).matches;\n}\n\nexport function useReducedMotion() {\n return useSyncExternalStore(subscribe, getSnapshot, () => false);\n}\n",".backdrop {\n position: fixed;\n inset: 0;\n z-index: var(--tgui--z-index--overlay, 1000);\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n background: rgb(0 0 0 / 0.4);\n opacity: 0;\n}\n\n.backdrop--contained {\n position: absolute;\n}\n\n.backdrop--visible {\n opacity: 1;\n}\n\n.panel {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n max-width: 512px;\n max-height: var(--tgui--sheet--max-height, 50%);\n margin: 0 auto;\n border-radius: 16px 16px 0 0;\n background: var(--tgui--bg_color);\n color: var(--tgui--text_color);\n box-shadow: 0 -8px 32px rgb(0 0 0 / 0.18);\n transform: translateY(100%);\n will-change: transform;\n contain: layout;\n}\n\n.panel--visible {\n transform: translateY(0);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .backdrop {\n transition: opacity 0.34s ease;\n }\n\n .panel {\n transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .backdrop {\n transition: opacity 0.18s linear;\n }\n\n .panel {\n transform: none;\n opacity: 0;\n transition: opacity 0.18s linear;\n }\n\n .panel--visible {\n opacity: 1;\n }\n}\n\n.grip {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n padding-top: 8px;\n touch-action: none;\n cursor: grab;\n}\n\n.handle {\n align-self: center;\n width: 36px;\n height: 4px;\n border-radius: 2px;\n background: var(--tgui--quaternary_bg_color, var(--tgui--tertiary_bg_color));\n}\n\n.header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 20px;\n font-family: var(--tgui--font-family);\n font-size: 20px;\n font-weight: var(--tgui--font_weight--accent1);\n line-height: 1.2;\n}\n\n.title {\n flex: 1;\n min-width: 0;\n}\n\n.close {\n margin-right: -7px;\n color: var(--tgui--secondary_hint_color);\n}\n\n.body {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: 4px 20px calc(20px + env(safe-area-inset-bottom));\n -webkit-overflow-scrolling: touch;\n}\n\n.grip + .body {\n padding-top: 0;\n}\n","'use client';\n\nimport {\n type KeyboardEvent as ReactKeyboardEvent,\n type ReactNode,\n type PointerEvent as ReactPointerEvent,\n type Ref,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { useReducedMotion } from '../../shared/lib/useReducedMotion';\nimport { IconButton } from '../IconButton';\nimport { Portal } from '../Portal';\nimport styles from './Sheet.module.css';\n\nconst DURATION_MS = 340;\nconst DRAG_THRESHOLD = 6;\nconst DISMISS_DISTANCE = 96;\nconst DISMISS_VELOCITY = 0.5;\n\nexport interface SheetProps {\n ref?: Ref<HTMLDivElement>;\n open: boolean;\n onClose: () => void;\n header?: ReactNode;\n children?: ReactNode;\n dismissable?: boolean;\n closeLabel?: string;\n className?: string;\n container?: Element | DocumentFragment | null;\n}\n\nfunction focusable(root: HTMLElement) {\n return Array.from(\n root.querySelectorAll<HTMLElement>(\n 'a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex=\"-1\"])',\n ),\n ).filter((el) => el.offsetParent !== null || el === document.activeElement);\n}\n\nexport function Sheet({\n ref,\n open,\n onClose,\n header,\n children,\n dismissable = true,\n closeLabel = 'Close',\n className,\n container,\n}: SheetProps) {\n const reducedMotion = useReducedMotion();\n const contained = container != null;\n const [rendered, setRendered] = useState(open);\n const [visible, setVisible] = useState(false);\n\n const panelRef = useRef<HTMLDivElement | null>(null);\n const restoreFocusRef = useRef<HTMLElement | null>(null);\n const drag = useRef({ id: -1, active: false, startY: 0, lastY: 0, lastT: 0, velocity: 0 });\n\n useEffect(() => {\n if (open) {\n setRendered(true);\n return;\n }\n setVisible(false);\n if (reducedMotion) {\n setRendered(false);\n return;\n }\n const id = setTimeout(() => setRendered(false), DURATION_MS);\n return () => clearTimeout(id);\n }, [open, reducedMotion]);\n\n useEffect(() => {\n if (!rendered || !open) return;\n const panel = panelRef.current;\n if (!panel) return;\n // reflow so the browser registers the off-screen start before the class flips\n void panel.offsetHeight;\n setVisible(true);\n }, [rendered, open]);\n\n useEffect(() => {\n if (!rendered) return;\n restoreFocusRef.current = document.activeElement as HTMLElement | null;\n\n const { body, documentElement } = document;\n const previous = { overflow: body.style.overflow, paddingRight: body.style.paddingRight };\n if (!contained) {\n const scrollbar = window.innerWidth - documentElement.clientWidth;\n body.style.overflow = 'hidden';\n if (scrollbar > 0) body.style.paddingRight = `${scrollbar}px`;\n }\n\n const id = requestAnimationFrame(() => panelRef.current?.focus({ preventScroll: true }));\n return () => {\n cancelAnimationFrame(id);\n body.style.overflow = previous.overflow;\n body.style.paddingRight = previous.paddingRight;\n restoreFocusRef.current?.focus?.({ preventScroll: true });\n };\n }, [rendered, contained]);\n\n useEffect(() => {\n if (!rendered) return;\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && dismissable) {\n event.stopPropagation();\n onClose();\n }\n };\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [rendered, dismissable, onClose]);\n\n const trapTab = useCallback((event: ReactKeyboardEvent<HTMLDivElement>) => {\n if (event.key !== 'Tab' || !panelRef.current) return;\n const items = focusable(panelRef.current);\n if (items.length === 0) {\n event.preventDefault();\n panelRef.current.focus();\n return;\n }\n const first = items[0];\n const last = items[items.length - 1];\n const active = document.activeElement;\n if (event.shiftKey && (active === first || active === panelRef.current)) {\n event.preventDefault();\n last.focus();\n } else if (!event.shiftKey && active === last) {\n event.preventDefault();\n first.focus();\n }\n }, []);\n\n const onPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (!dismissable || event.button !== 0 || reducedMotion) return;\n if ((event.target as HTMLElement).closest('button')) return;\n drag.current = {\n id: event.pointerId,\n active: false,\n startY: event.clientY,\n lastY: event.clientY,\n lastT: event.timeStamp,\n velocity: 0,\n };\n };\n\n const onPointerMove = (event: ReactPointerEvent<HTMLDivElement>) => {\n const state = drag.current;\n if (state.id !== event.pointerId) return;\n const delta = event.clientY - state.startY;\n if (!state.active) {\n if (delta < DRAG_THRESHOLD) return;\n state.active = true;\n event.currentTarget.setPointerCapture(event.pointerId);\n if (panelRef.current) panelRef.current.style.transition = 'none';\n }\n const dt = event.timeStamp - state.lastT;\n if (dt >= 1) {\n const instant = (event.clientY - state.lastY) / dt;\n state.velocity = state.velocity * 0.6 + instant * 0.4;\n state.lastY = event.clientY;\n state.lastT = event.timeStamp;\n }\n if (panelRef.current) {\n panelRef.current.style.transform = `translateY(${Math.max(0, delta)}px)`;\n }\n };\n\n const endDrag = (event: ReactPointerEvent<HTMLDivElement>) => {\n const state = drag.current;\n if (state.id !== event.pointerId) return;\n drag.current = { ...state, id: -1, active: false };\n if (!state.active) return;\n event.currentTarget.releasePointerCapture?.(event.pointerId);\n\n const panel = panelRef.current;\n const travelled = event.clientY - state.startY;\n const dismiss = travelled > DISMISS_DISTANCE || state.velocity > DISMISS_VELOCITY;\n\n if (panel) {\n panel.style.transition = '';\n panel.getBoundingClientRect();\n panel.style.transform = '';\n }\n if (dismiss) {\n setVisible(false);\n onClose();\n }\n };\n\n if (!rendered) return null;\n\n const showPanel = visible && open;\n\n return (\n <Portal container={container}>\n <div\n ref={ref}\n className={cn(\n styles.backdrop,\n contained && styles['backdrop--contained'],\n showPanel && styles['backdrop--visible'],\n )}\n onPointerDown={(event) => {\n if (event.target === event.currentTarget && dismissable) onClose();\n }}\n >\n <div\n ref={panelRef}\n role=\"dialog\"\n aria-modal=\"true\"\n tabIndex={-1}\n className={cn(styles.panel, showPanel && styles['panel--visible'], className)}\n onKeyDown={trapTab}\n >\n <div\n className={styles.grip}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n >\n {dismissable ? <span className={styles.handle} aria-hidden /> : null}\n {header != null ? (\n <div className={styles.header}>\n <div className={styles.title}>{header}</div>\n {dismissable ? (\n <IconButton\n mode=\"gray\"\n size=\"s\"\n circle\n className={styles.close}\n aria-label={closeLabel}\n onClick={onClose}\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden>\n <path\n d=\"M4 4l8 8M12 4l-8 8\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n strokeLinecap=\"round\"\n />\n </svg>\n </IconButton>\n ) : null}\n </div>\n ) : null}\n </div>\n <div className={styles.body}>{children}</div>\n </div>\n </div>\n </Portal>\n );\n}\n\nSheet.displayName = 'Sheet';\n",".skeleton {\n display: block;\n}\n\n.visible {\n position: relative;\n overflow: hidden;\n min-height: 1em;\n border-radius: 8px;\n background: var(--tgui--skeleton);\n color: transparent;\n pointer-events: none;\n}\n\n.visible * {\n visibility: hidden;\n}\n\n.visible::after {\n content: \"\";\n position: absolute;\n inset: 0;\n transform: translateX(-100%);\n background: linear-gradient(\n 90deg,\n transparent,\n color-mix(in srgb, var(--tgui--text_color) 5%, transparent),\n transparent\n );\n animation: tgui-skeleton 1.5s ease-in-out infinite;\n}\n\n@keyframes tgui-skeleton {\n to {\n transform: translateX(100%);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .visible::after {\n animation: none;\n }\n}\n\n@media (prefers-reduced-transparency: reduce) {\n .visible {\n background: var(--tgui--tertiary_bg_color);\n }\n}\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Skeleton.module.css';\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n visible?: boolean;\n children?: ReactNode;\n}\n\nexport function Skeleton({ ref, visible = true, className, children, ...rest }: SkeletonProps) {\n return (\n <div\n ref={ref}\n aria-hidden={visible || undefined}\n className={cn(styles.skeleton, visible && styles.visible, className)}\n {...rest}\n >\n {children}\n </div>\n );\n}\n\nSkeleton.displayName = 'Skeleton';\n",".slider {\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n}\n\n.track {\n position: relative;\n flex: 1;\n height: 28px;\n display: flex;\n align-items: center;\n}\n\n.rail {\n position: absolute;\n left: 0;\n right: 0;\n height: 4px;\n border-radius: 2px;\n background: var(--tgui--secondary_fill);\n}\n\n.fill {\n position: absolute;\n left: 0;\n height: 4px;\n border-radius: 2px;\n background: var(--tgui--link_color);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .fill {\n transition: width 0.1s linear;\n }\n}\n\n.input {\n position: relative;\n z-index: 1;\n width: 100%;\n height: 28px;\n margin: 0;\n padding: 0;\n background: transparent;\n appearance: none;\n cursor: pointer;\n}\n\n.input:focus-visible {\n outline: none;\n}\n\n.input::-webkit-slider-thumb {\n appearance: none;\n width: 22px;\n height: 22px;\n border-radius: 50%;\n background: var(--tgui--bg_color);\n box-shadow: 0 1px 4px rgb(0 0 0 / 0.25);\n cursor: grab;\n}\n\n.input:active::-webkit-slider-thumb {\n cursor: grabbing;\n}\n\n.input::-moz-range-thumb {\n width: 22px;\n height: 22px;\n border: 0;\n border-radius: 50%;\n background: var(--tgui--bg_color);\n box-shadow: 0 1px 4px rgb(0 0 0 / 0.25);\n}\n\n.input:focus-visible::-webkit-slider-thumb {\n box-shadow:\n 0 1px 4px rgb(0 0 0 / 0.25),\n 0 0 0 4px var(--tgui--secondary_fill);\n}\n\n.input:focus-visible::-moz-range-thumb {\n box-shadow:\n 0 1px 4px rgb(0 0 0 / 0.25),\n 0 0 0 4px var(--tgui--secondary_fill);\n}\n\n.input:disabled {\n cursor: default;\n}\n\n.slider[data-disabled] {\n opacity: 0.4;\n}\n\n.side {\n flex-shrink: 0;\n color: var(--tgui--hint_color);\n font-family: var(--tgui--font-family);\n font-size: 14px;\n}\n","'use client';\n\nimport {\n type ChangeEvent,\n type InputHTMLAttributes,\n type ReactNode,\n type Ref,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Slider.module.css';\n\nexport interface SliderProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange'> {\n ref?: Ref<HTMLInputElement>;\n value?: number;\n defaultValue?: number;\n onChange?: (value: number) => void;\n min?: number;\n max?: number;\n step?: number;\n before?: ReactNode;\n after?: ReactNode;\n}\n\nexport function Slider({\n ref,\n value: valueProp,\n defaultValue,\n onChange,\n min = 0,\n max = 100,\n step = 1,\n before,\n after,\n disabled,\n className,\n ...rest\n}: SliderProps) {\n const [uncontrolled, setUncontrolled] = useState(defaultValue ?? min);\n const value = valueProp ?? uncontrolled;\n const percent = max > min ? ((value - min) / (max - min)) * 100 : 0;\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n const next = Number(event.target.value);\n if (valueProp == null) setUncontrolled(next);\n onChange?.(next);\n };\n\n return (\n <div className={cn(styles.slider, className)} data-disabled={disabled || undefined}>\n {before != null ? <span className={styles.side}>{before}</span> : null}\n <span className={styles.track}>\n <span className={styles.rail} />\n <span\n className={styles.fill}\n style={{ width: `${Math.max(0, Math.min(100, percent))}%` }}\n />\n <input\n ref={ref}\n type=\"range\"\n className={styles.input}\n min={min}\n max={max}\n step={step}\n value={value}\n disabled={disabled}\n onChange={handleChange}\n {...rest}\n />\n </span>\n {after != null ? <span className={styles.side}>{after}</span> : null}\n </div>\n );\n}\n\nSlider.displayName = 'Slider';\n","import type { ReactNode } from 'react';\nimport { createContext } from 'react';\n\nexport interface SnackbarOptions {\n message: ReactNode;\n description?: ReactNode;\n before?: ReactNode;\n action?: { label: string; onClick: () => void };\n duration?: number;\n}\n\nexport interface SnackbarApi {\n show: (options: SnackbarOptions) => string;\n dismiss: (id: string) => void;\n}\n\nexport const SnackbarContext = createContext<SnackbarApi | null>(null);\n\nSnackbarContext.displayName = 'SnackbarContext';\n",".viewport {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: var(--tgui--z-index--overlay, 1000);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n padding: 12px;\n padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));\n overflow: clip;\n overflow-clip-margin: 28px;\n pointer-events: none;\n}\n\n.snackbar {\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n max-width: 440px;\n box-sizing: border-box;\n padding: 12px 16px;\n border-radius: 12px;\n background: var(--tgui--bg_color);\n color: var(--tgui--text_color);\n box-shadow: 0 6px 24px rgb(0 0 0 / 0.22);\n pointer-events: auto;\n touch-action: pan-y;\n opacity: 0;\n transform: translateY(16px);\n}\n\n.snackbar--visible {\n opacity: 1;\n transform: translateY(0);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .snackbar {\n transition:\n opacity 0.22s ease,\n transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);\n }\n}\n\n.snackbar--dragging {\n transition: none;\n}\n\n.before {\n display: flex;\n flex-shrink: 0;\n color: var(--tgui--link_color);\n}\n\n.body {\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n min-width: 0;\n font-family: var(--tgui--font-family);\n}\n\n.message {\n font-size: 15px;\n line-height: 20px;\n}\n\n.description {\n font-size: 13px;\n line-height: 18px;\n color: var(--tgui--hint_color);\n}\n\n.action {\n flex-shrink: 0;\n padding: 4px 8px;\n margin-right: -8px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--tgui--link_color);\n font-family: var(--tgui--font-family);\n font-size: 15px;\n font-weight: var(--tgui--font_weight--accent2);\n cursor: pointer;\n}\n","'use client';\n\nimport {\n type ReactNode,\n type PointerEvent as ReactPointerEvent,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { useReducedMotion } from '../../shared/lib/useReducedMotion';\nimport { Portal } from '../Portal';\nimport { SnackbarContext, type SnackbarOptions } from './context';\nimport styles from './Snackbar.module.css';\n\nconst EXIT_MS = 240;\nconst SWIPE_DISMISS = 80;\n\ninterface SnackItem extends SnackbarOptions {\n id: string;\n}\n\nexport interface SnackbarProviderProps {\n children: ReactNode;\n duration?: number;\n max?: number;\n}\n\nexport function SnackbarProvider({ children, duration = 4000, max = 3 }: SnackbarProviderProps) {\n const [items, setItems] = useState<SnackItem[]>([]);\n const nextId = useRef(0);\n\n const dismiss = useCallback((id: string) => {\n setItems((current) => current.filter((item) => item.id !== id));\n }, []);\n\n const show = useCallback(\n (options: SnackbarOptions) => {\n const id = `snackbar-${nextId.current++}`;\n setItems((current) => [...current, { ...options, id }].slice(-max));\n return id;\n },\n [max],\n );\n\n const api = useMemo(() => ({ show, dismiss }), [show, dismiss]);\n\n return (\n <SnackbarContext.Provider value={api}>\n {children}\n {items.length > 0 ? (\n <Portal>\n <div className={styles.viewport}>\n {items.map((item) => (\n <SnackbarItem\n key={item.id}\n item={item}\n defaultDuration={duration}\n onDismiss={() => dismiss(item.id)}\n />\n ))}\n </div>\n </Portal>\n ) : null}\n </SnackbarContext.Provider>\n );\n}\n\nSnackbarProvider.displayName = 'SnackbarProvider';\n\ninterface SnackbarItemProps {\n item: SnackItem;\n defaultDuration: number;\n onDismiss: () => void;\n}\n\nfunction SnackbarItem({ item, defaultDuration, onDismiss }: SnackbarItemProps) {\n const reducedMotion = useReducedMotion();\n const [visible, setVisible] = useState(false);\n const [leaving, setLeaving] = useState(false);\n const nodeRef = useRef<HTMLDivElement | null>(null);\n\n const duration = item.duration ?? defaultDuration;\n const remaining = useRef(duration);\n const startedAt = useRef(0);\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n const drag = useRef({ id: -1, startX: 0, active: false });\n\n useLayoutEffect(() => {\n const node = nodeRef.current;\n if (node) void node.offsetHeight;\n setVisible(true);\n }, []);\n\n const close = useCallback(() => {\n setLeaving(true);\n setVisible(false);\n if (reducedMotion) {\n onDismiss();\n return;\n }\n const id = setTimeout(onDismiss, EXIT_MS);\n return () => clearTimeout(id);\n }, [reducedMotion, onDismiss]);\n\n const pause = useCallback(() => {\n if (!timer.current) return;\n clearTimeout(timer.current);\n timer.current = null;\n remaining.current -= Date.now() - startedAt.current;\n }, []);\n\n const resume = useCallback(() => {\n if (duration <= 0 || leaving || timer.current) return;\n startedAt.current = Date.now();\n timer.current = setTimeout(() => close(), Math.max(0, remaining.current));\n }, [duration, leaving, close]);\n\n useEffect(() => {\n resume();\n return pause;\n }, [resume, pause]);\n\n const onPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (event.button !== 0) return;\n drag.current = { id: event.pointerId, startX: event.clientX, active: false };\n pause();\n };\n\n const onPointerMove = (event: ReactPointerEvent<HTMLDivElement>) => {\n const state = drag.current;\n if (state.id !== event.pointerId) return;\n const dx = event.clientX - state.startX;\n if (!state.active) {\n if (Math.abs(dx) < 6) return;\n state.active = true;\n event.currentTarget.setPointerCapture(event.pointerId);\n nodeRef.current?.classList.add(styles['snackbar--dragging']);\n }\n if (nodeRef.current) {\n nodeRef.current.style.transform = `translateX(${dx}px)`;\n nodeRef.current.style.opacity = `${Math.max(0, 1 - Math.abs(dx) / 240)}`;\n }\n };\n\n const endDrag = (event: ReactPointerEvent<HTMLDivElement>) => {\n const state = drag.current;\n if (state.id !== event.pointerId) return;\n drag.current = { id: -1, startX: 0, active: false };\n const node = nodeRef.current;\n if (!node) return;\n node.classList.remove(styles['snackbar--dragging']);\n const dx = event.clientX - state.startX;\n if (state.active && Math.abs(dx) > SWIPE_DISMISS) {\n if (reducedMotion) {\n onDismiss();\n return;\n }\n node.style.transition = 'transform 0.2s ease-out, opacity 0.2s ease-out';\n node.style.transform = `translateX(${Math.sign(dx) * (window.innerWidth || 400)}px)`;\n node.style.opacity = '0';\n setTimeout(onDismiss, 190);\n return;\n }\n node.style.transform = '';\n node.style.opacity = '';\n resume();\n };\n\n return (\n <div\n ref={nodeRef}\n className={cn(styles.snackbar, visible && !leaving && styles['snackbar--visible'])}\n role=\"status\"\n onMouseEnter={pause}\n onMouseLeave={resume}\n onFocus={pause}\n onBlur={resume}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n >\n {item.before != null ? <span className={styles.before}>{item.before}</span> : null}\n <div className={styles.body}>\n <span className={styles.message}>{item.message}</span>\n {item.description != null ? (\n <span className={styles.description}>{item.description}</span>\n ) : null}\n </div>\n {item.action != null ? (\n <button\n type=\"button\"\n className={styles.action}\n onClick={() => {\n item.action?.onClick();\n close();\n }}\n >\n {item.action.label}\n </button>\n ) : null}\n </div>\n );\n}\n","import { useContext } from 'react';\nimport { type SnackbarApi, SnackbarContext } from './context';\n\nexport function useSnackbar(): SnackbarApi {\n const api = useContext(SnackbarContext);\n if (!api) {\n throw new Error('useSnackbar must be used within a <SnackbarProvider>.');\n }\n return api;\n}\n","export interface Particle {\n x0: number;\n y0: number;\n vx: number;\n vy: number;\n life: number;\n respawn: number;\n phase: number;\n size: number;\n square: boolean;\n}\n\nconst TAU = Math.PI * 2;\nconst clamp01 = (value: number) => Math.max(0, Math.min(1, value));\nconst easeOutCubic = (t: number) => 1 - (1 - t) ** 3;\n\n// particle grows in over `up` seconds, holds, shrinks over `down` seconds\nfunction trapezoid(life: number, up: number, down: number, t: number) {\n const hold = Math.max(up, life - down);\n if (t < up) return Math.max(0, t / up);\n if (t > hold) return Math.max(0, 1 - (t - hold) / (life - hold));\n return 1;\n}\n\nexport function createParticles(w: number, h: number, density: number): Particle[] {\n const count = Math.round(Math.min(1800, Math.max(12, density * w * h)));\n const particles: Particle[] = [];\n for (let i = 0; i < count; i += 1) {\n const speed = 2 + Math.random() * 10;\n const angle = Math.random() * TAU;\n const life = 0.3 + Math.random() * 1.2;\n const respawn = Math.random();\n particles.push({\n x0: Math.random() * w,\n y0: Math.random() * h,\n vx: speed * Math.cos(angle),\n vy: speed * Math.sin(angle),\n life,\n respawn,\n phase: Math.random() * (life + respawn),\n size: 1 + Math.random() * 0.7,\n square: Math.random() > 0.5,\n });\n }\n return particles;\n}\n\n// paints one frame; `stop` is the loop time (s) at which the reveal began, or null\nexport function paintParticles(\n ctx: CanvasRenderingContext2D,\n pixelW: number,\n pixelH: number,\n dpr: number,\n particles: Particle[],\n color: readonly [number, number, number],\n time: number,\n stop: number | null,\n fade: number,\n) {\n ctx.clearRect(0, 0, pixelW, pixelH);\n const w = pixelW / dpr;\n const h = pixelH / dpr;\n const [r, g, b] = color;\n const n = particles.length;\n\n for (let i = 0; i < n; i += 1) {\n const p = particles[i];\n const period = p.life + p.respawn;\n\n if (stop != null) {\n const spawned = Math.floor((time + p.phase) / period);\n const lastAllowed = Math.floor((stop + p.phase) / period);\n if (spawned > lastAllowed) continue;\n }\n\n const local = (time + p.phase) % period;\n if (local >= p.life) continue;\n\n let x = (p.x0 + p.vx * local) % w;\n if (x < 0) x += w;\n let y = (p.y0 + p.vy * local) % h;\n if (y < 0) y += h;\n\n const visible = trapezoid(p.life, 0.15, 0.3, local);\n let alpha = visible * (0.45 + 0.55 * (1 - local / p.life));\n\n if (stop != null && fade > 0) {\n const fadeStart = stop + ((2 / 3) * fade * i) / n;\n const progress = clamp01((time - fadeStart) / ((1 / 3) * fade));\n alpha *= easeOutCubic(1 - progress);\n }\n\n if (alpha <= 0.01) continue;\n\n const size = Math.max(0.5, p.size * visible) * dpr;\n ctx.fillStyle = `rgba(${r}, ${g}, ${b}, ${alpha.toFixed(3)})`;\n ctx.beginPath();\n if (p.square) {\n ctx.rect(x * dpr, y * dpr, size, size);\n } else {\n ctx.arc(x * dpr, y * dpr, size / 2, 0, TAU);\n }\n ctx.fill();\n }\n}\n",".spoiler {\n --tgui--spoiler--p: 0;\n --tgui--spoiler--edge: 10px;\n --tgui--spoiler--edge-y: 3px;\n --tgui--spoiler--radius: 5px;\n position: relative;\n display: inline-block;\n max-width: 100%;\n border-radius: 4px;\n vertical-align: baseline;\n isolation: isolate;\n color: var(--tgui--text_color);\n}\n\n.spoiler:not(.revealed) {\n cursor: pointer;\n}\n\n.spoiler::before,\n.canvas {\n border-radius: var(--tgui--spoiler--radius);\n overflow: hidden;\n -webkit-mask-image:\n linear-gradient(\n to right,\n transparent,\n #000 var(--tgui--spoiler--edge),\n #000 calc(100% - var(--tgui--spoiler--edge)),\n transparent\n ),\n linear-gradient(\n to bottom,\n transparent,\n #000 var(--tgui--spoiler--edge-y),\n #000 calc(100% - var(--tgui--spoiler--edge-y)),\n transparent\n );\n -webkit-mask-composite: source-in;\n mask-image:\n linear-gradient(\n to right,\n transparent,\n #000 var(--tgui--spoiler--edge),\n #000 calc(100% - var(--tgui--spoiler--edge)),\n transparent\n ),\n linear-gradient(\n to bottom,\n transparent,\n #000 var(--tgui--spoiler--edge-y),\n #000 calc(100% - var(--tgui--spoiler--edge-y)),\n transparent\n );\n mask-composite: intersect;\n}\n\n.spoiler::before {\n content: \"\";\n position: absolute;\n inset: -1px -3px;\n z-index: 0;\n background: currentColor;\n opacity: calc((1 - var(--tgui--spoiler--p)) * 0.06);\n pointer-events: none;\n}\n\n.content {\n display: inline-block;\n position: relative;\n z-index: 2;\n opacity: var(--tgui--spoiler--p);\n}\n\n.spoiler:not(.revealed) .content {\n user-select: none;\n pointer-events: none;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .content,\n .spoiler::before {\n transition: opacity 0.4s ease;\n }\n}\n\n.canvas {\n position: absolute;\n inset: -1px -3px;\n z-index: 1;\n width: calc(100% + 6px);\n height: calc(100% + 2px);\n pointer-events: none;\n}\n\n.spoiler:focus-visible {\n outline: 2px solid var(--tgui--link_color);\n outline-offset: 2px;\n}\n","'use client';\n\nimport {\n type CSSProperties,\n type HTMLAttributes,\n type KeyboardEvent as ReactKeyboardEvent,\n type Ref,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { useReducedMotion } from '../../shared/lib/useReducedMotion';\nimport { createParticles, type Particle, paintParticles } from './particles';\nimport styles from './Spoiler.module.css';\n\nconst FADE_S = 0.5;\n\nexport interface SpoilerProps extends HTMLAttributes<HTMLSpanElement> {\n ref?: Ref<HTMLSpanElement>;\n revealed?: boolean;\n defaultRevealed?: boolean;\n onRevealedChange?: (revealed: boolean) => void;\n revealOn?: 'click' | 'hover';\n accentColor?: string;\n density?: number;\n fps?: number;\n revealLabel?: string;\n}\n\nfunction parseColor(value: string): [number, number, number] {\n const parts = value.match(/-?\\d*\\.?\\d+/g);\n if (!parts || parts.length < 3) return [128, 128, 128];\n return [Number(parts[0]), Number(parts[1]), Number(parts[2])];\n}\n\nexport function Spoiler({\n ref,\n revealed: revealedProp,\n defaultRevealed = false,\n onRevealedChange,\n revealOn = 'click',\n accentColor,\n density = 0.1,\n fps = 40,\n revealLabel = 'Reveal hidden text',\n className,\n style,\n children,\n onClick,\n onKeyDown,\n onMouseEnter,\n onMouseLeave,\n ...rest\n}: SpoilerProps) {\n const [uncontrolled, setUncontrolled] = useState(defaultRevealed);\n const revealed = revealedProp ?? uncontrolled;\n const reducedMotion = useReducedMotion();\n const isButton = revealOn === 'click';\n\n const rootRef = useRef<HTMLSpanElement | null>(null);\n const canvasRef = useRef<HTMLCanvasElement | null>(null);\n const particles = useRef<Particle[]>([]);\n const colorRef = useRef<[number, number, number]>([128, 128, 128]);\n const inView = useRef(true);\n const stopAt = useRef<number | null>(revealed ? 0 : null);\n const loopTime = useRef(0);\n\n const [painting, setPainting] = useState(!revealed);\n\n const setRevealed = (next: boolean) => {\n if (next) {\n stopAt.current = loopTime.current;\n } else {\n stopAt.current = null;\n setPainting(true);\n }\n if (revealedProp == null) setUncontrolled(next);\n onRevealedChange?.(next);\n };\n\n useEffect(() => {\n if (!painting) return;\n const root = rootRef.current;\n const canvas = canvasRef.current;\n const ctx = canvas?.getContext('2d');\n if (!root || !canvas || !ctx) return;\n\n const dpr = Math.min(2, window.devicePixelRatio || 1);\n\n const sync = () => {\n const box = canvas.getBoundingClientRect();\n const w = Math.max(1, Math.round(box.width * dpr));\n const h = Math.max(1, Math.round(box.height * dpr));\n if (canvas.width !== w || canvas.height !== h) {\n canvas.width = w;\n canvas.height = h;\n particles.current = createParticles(w / dpr, h / dpr, density);\n }\n colorRef.current = parseColor(accentColor ?? getComputedStyle(root).color);\n };\n sync();\n\n if (reducedMotion) {\n paintParticles(\n ctx,\n canvas.width,\n canvas.height,\n dpr,\n particles.current,\n colorRef.current,\n 0.6,\n null,\n 0,\n );\n return;\n }\n\n let raf = 0;\n let start = 0;\n let last = -1;\n const frameGap = 1000 / Math.max(8, fps);\n\n const loop = (now: number) => {\n if (!start) start = now;\n const time = (now - start) / 1000;\n loopTime.current = time;\n const stop = stopAt.current;\n\n if (stop != null && time > stop + FADE_S + 0.06) {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n setPainting(false);\n return;\n }\n\n raf = requestAnimationFrame(loop);\n if (!inView.current || now - last < frameGap) return;\n last = now;\n\n paintParticles(\n ctx,\n canvas.width,\n canvas.height,\n dpr,\n particles.current,\n colorRef.current,\n time,\n stop,\n FADE_S,\n );\n };\n\n raf = requestAnimationFrame(loop);\n\n const ro = typeof ResizeObserver !== 'undefined' ? new ResizeObserver(sync) : null;\n ro?.observe(root);\n const io =\n typeof IntersectionObserver !== 'undefined'\n ? new IntersectionObserver(([entry]) => {\n inView.current = entry.isIntersecting;\n })\n : null;\n io?.observe(root);\n\n return () => {\n cancelAnimationFrame(raf);\n ro?.disconnect();\n io?.disconnect();\n };\n }, [painting, reducedMotion, density, fps, accentColor]);\n\n const toggle = () => setRevealed(!revealed);\n\n return (\n // biome-ignore lint/a11y/useSemanticElements: a spoiler sits inline inside a sentence; a <button> would break the text flow and reset typography\n <span\n ref={(node) => {\n rootRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as { current: HTMLSpanElement | null }).current = node;\n }}\n className={cn(styles.spoiler, revealed && styles.revealed, className)}\n role=\"button\"\n tabIndex={0}\n aria-pressed={revealed}\n aria-label={revealed ? undefined : revealLabel}\n style={{ ...style, '--tgui--spoiler--p': revealed ? 1 : 0 } as CSSProperties}\n onClick={(event) => {\n onClick?.(event);\n if (isButton) toggle();\n }}\n onKeyDown={(event: ReactKeyboardEvent<HTMLSpanElement>) => {\n onKeyDown?.(event);\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n toggle();\n }\n }}\n onMouseEnter={(event) => {\n onMouseEnter?.(event);\n if (!isButton && !revealed) setRevealed(true);\n }}\n onMouseLeave={(event) => {\n onMouseLeave?.(event);\n if (!isButton && revealed) setRevealed(false);\n }}\n {...rest}\n >\n <span className={styles.content} aria-hidden={!revealed}>\n {children}\n </span>\n {painting ? <canvas ref={canvasRef} className={styles.canvas} aria-hidden /> : null}\n </span>\n );\n}\n\nSpoiler.displayName = 'Spoiler';\n",".stepper {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n}\n\n.value {\n width: 36px;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n background: transparent;\n color: var(--tgui--text_color);\n font-family: var(--tgui--font-family);\n font-size: 16px;\n text-align: center;\n appearance: textfield;\n}\n\n.value::-webkit-outer-spin-button,\n.value::-webkit-inner-spin-button {\n margin: 0;\n appearance: none;\n}\n\n.value:disabled {\n color: var(--tgui--hint_color);\n}\n\n.value:focus-visible {\n border-radius: 4px;\n outline: 2px solid var(--tgui--link_color);\n outline-offset: 2px;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .value[data-pulse=\"up\"] {\n animation: pulse-up 0.18s ease-out;\n }\n\n .value[data-pulse=\"down\"] {\n animation: pulse-down 0.18s ease-out;\n }\n}\n\n@keyframes pulse-up {\n from {\n transform: translateY(6px);\n opacity: 0.4;\n }\n}\n\n@keyframes pulse-down {\n from {\n transform: translateY(-6px);\n opacity: 0.4;\n }\n}\n","'use client';\n\nimport {\n type ChangeEvent,\n type HTMLAttributes,\n type KeyboardEvent,\n type Ref,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { useReducedMotion } from '../../shared/lib/useReducedMotion';\nimport { IconButton } from '../IconButton';\nimport styles from './Stepper.module.css';\n\nexport interface StepperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {\n ref?: Ref<HTMLDivElement>;\n value: number;\n onChange: (value: number) => void;\n min?: number;\n max?: number;\n step?: number;\n disabled?: boolean;\n}\n\nconst clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));\n\nconst MinusIcon = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden>\n <path d=\"M2.5 7h9\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" />\n </svg>\n);\n\nconst PlusIcon = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden>\n <path d=\"M7 2.5v9M2.5 7h9\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" />\n </svg>\n);\n\nexport function Stepper({\n ref,\n value,\n onChange,\n min = 0,\n max = Number.POSITIVE_INFINITY,\n step = 1,\n disabled = false,\n className,\n ...rest\n}: StepperProps) {\n const reducedMotion = useReducedMotion();\n const [text, setText] = useState(String(value));\n const [pulse, setPulse] = useState<'up' | 'down' | null>(null);\n const previousValue = useRef(value);\n\n useEffect(() => {\n setText(String(value));\n if (value !== previousValue.current) {\n if (!reducedMotion) setPulse(value > previousValue.current ? 'up' : 'down');\n previousValue.current = value;\n }\n }, [value, reducedMotion]);\n\n const commit = () => {\n const parsed = Number.parseFloat(text);\n const next = clamp(Number.isNaN(parsed) ? value : parsed, min, max);\n onChange(next);\n setText(String(next));\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key !== 'Enter') return;\n commit();\n event.currentTarget.blur();\n };\n\n return (\n <div ref={ref} className={cn(styles.stepper, className)} {...rest}>\n <IconButton\n mode=\"gray\"\n size=\"s\"\n circle\n aria-label=\"Decrease\"\n disabled={disabled || value <= min}\n onClick={() => onChange(clamp(value - step, min, max))}\n >\n <MinusIcon />\n </IconButton>\n <input\n className={styles.value}\n type=\"number\"\n inputMode=\"numeric\"\n aria-label=\"Value\"\n value={text}\n disabled={disabled}\n data-pulse={pulse ?? undefined}\n onChange={(event: ChangeEvent<HTMLInputElement>) => setText(event.target.value)}\n onBlur={commit}\n onKeyDown={handleKeyDown}\n onAnimationEnd={() => setPulse(null)}\n />\n <IconButton\n mode=\"gray\"\n size=\"s\"\n circle\n aria-label=\"Increase\"\n disabled={disabled || value >= max}\n onClick={() => onChange(clamp(value + step, min, max))}\n >\n <PlusIcon />\n </IconButton>\n </div>\n );\n}\n\nStepper.displayName = 'Stepper';\n",".steps {\n display: flex;\n align-items: center;\n gap: 4px;\n width: 100%;\n}\n\n.segment {\n flex: 1 1 0;\n overflow: hidden;\n height: 3px;\n border-radius: 2px;\n background: var(--tgui--secondary_fill);\n}\n\n.fill {\n height: 100%;\n border-radius: inherit;\n background: var(--tgui--link_color);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .fill {\n transition: width 0.2s ease;\n }\n}\n","import type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Steps.module.css';\n\nexport interface StepsProps extends HTMLAttributes<HTMLDivElement> {\n ref?: Ref<HTMLDivElement>;\n count: number;\n progress: number;\n}\n\nconst clamp01 = (value: number) => Math.max(0, Math.min(1, value));\n\nexport function Steps({ ref, count, progress, className, ...rest }: StepsProps) {\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={count}\n aria-valuenow={Math.max(0, Math.min(count, progress))}\n className={cn(styles.steps, className)}\n {...rest}\n >\n {Array.from({ length: count }, (_, index) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: fixed-length positional segments\n <div key={index} className={styles.segment}>\n <div className={styles.fill} style={{ width: `${clamp01(progress - index) * 100}%` }} />\n </div>\n ))}\n </div>\n );\n}\n\nSteps.displayName = 'Steps';\n",".switch {\n position: relative;\n overflow: hidden;\n display: inline-flex;\n align-items: center;\n width: 52px;\n height: 32px;\n border-radius: 16px;\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.switch[data-disabled] {\n cursor: default;\n opacity: 0.4;\n}\n\n.input {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n cursor: inherit;\n}\n\n.control::before {\n position: absolute;\n content: \"\";\n inset: 0;\n background: var(--tgui--secondary_bg_color);\n}\n\n.base .control::before {\n border-radius: 16px;\n border: 3px solid var(--tgui--secondary_hint_color);\n}\n\n.control::after {\n position: absolute;\n content: \"\";\n top: 50%;\n transform: translateY(-50%);\n border-radius: 50%;\n}\n\n.base .control::after {\n width: 16px;\n height: 16px;\n margin-left: 8px;\n background: var(--tgui--secondary_hint_color);\n}\n\n.ios .control::before {\n background: rgba(120, 120, 128, 0.22);\n}\n\n.ios .control::after {\n width: 28px;\n height: 28px;\n margin-left: 2px;\n background: var(--tgui--white);\n box-shadow:\n 0 3px 8px 0 rgba(0, 0, 0, 0.12),\n 0 1px 1px 0 rgba(0, 0, 0, 0.16);\n}\n\n.input:checked + .control::before {\n border-color: var(--tgui--link_color);\n background-color: var(--tgui--link_color);\n}\n\n.input:checked + .control::after {\n transform: translateX(20px) translateY(-50%);\n}\n\n.base .input:checked + .control::after {\n width: 24px;\n height: 24px;\n background: var(--tgui--white);\n transform: translateX(16px) translateY(-50%);\n}\n\n.input:focus-visible + .control::before {\n box-shadow: 0 0 0 2px var(--tgui--link_color);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .control::before {\n transition:\n background-color 0.2s ease,\n border-color 0.2s ease;\n }\n .control::after {\n transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);\n }\n .ios .control::after {\n transition: transform 0.2s cubic-bezier(0.36, -0.24, 0.26, 1.32);\n }\n}\n","'use client';\n\nimport type { InputHTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Switch.module.css';\n\nexport interface SwitchProps extends InputHTMLAttributes<HTMLInputElement> {\n ref?: Ref<HTMLInputElement>;\n}\n\nexport function Switch({ ref, disabled, className, style, ...rest }: SwitchProps) {\n const { platform } = useTgui();\n\n return (\n <label\n className={cn(styles.switch, platform === 'ios' ? styles.ios : styles.base, className)}\n style={style}\n data-disabled={disabled || undefined}\n >\n <input ref={ref} type=\"checkbox\" className={styles.input} disabled={disabled} {...rest} />\n <span aria-hidden className={styles.control} />\n </label>\n );\n}\n\nSwitch.displayName = 'Switch';\n",".bar {\n display: flex;\n align-items: stretch;\n padding: 0 16px;\n padding-bottom: env(safe-area-inset-bottom, 0px);\n background: var(--tgui--surface_primary);\n box-shadow: 0 -0.5px 0 var(--tgui--divider);\n}\n\n.barIos {\n padding: 0;\n padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));\n}\n\n.item {\n flex: 1 0 0;\n min-inline-size: 0;\n max-inline-size: 100%;\n margin: 0;\n padding: 10px 16px 14px;\n border: none;\n background: transparent;\n\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 4px;\n\n color: var(--tgui--secondary_hint_color);\n}\n\n.itemIos {\n padding: 7px 12px 2px;\n gap: 3px;\n}\n\n.itemSelected {\n color: var(--tgui--link_color);\n}\n\n.icon {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 64px;\n height: 32px;\n padding: 2px 10px;\n border-radius: 16px;\n}\n\n.itemIos .icon {\n min-width: 0;\n height: 28px;\n padding: 0;\n}\n\n.itemSelected:not(.itemIos) .icon {\n background: var(--tgui--secondary_fill);\n}\n\n.text {\n max-inline-size: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .item {\n transition: color 0.15s ease-out;\n }\n\n .icon {\n transition: background 0.15s ease-out;\n }\n}\n","'use client';\n\nimport type { ButtonHTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Caption } from '../Caption';\nimport { Tappable } from '../Tappable';\nimport { useTgui } from '../TguiProvider';\nimport styles from './TabBar.module.css';\n\nexport interface TabBarItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n ref?: Ref<HTMLElement>;\n selected?: boolean;\n text?: string;\n children?: ReactNode;\n}\n\nexport function TabBarItem({ ref, selected, text, children, className, ...rest }: TabBarItemProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n\n return (\n <Tappable\n ref={ref}\n Component=\"button\"\n interactiveAnimation=\"opacity\"\n aria-current={selected ? 'page' : undefined}\n className={cn(styles.item, ios && styles.itemIos, selected && styles.itemSelected, className)}\n {...rest}\n >\n {children != null ? <span className={styles.icon}>{children}</span> : null}\n {text != null ? (\n <Caption className={styles.text} weight=\"2\" level={ios ? '2' : '1'}>\n {text}\n </Caption>\n ) : null}\n </Tappable>\n );\n}\n\nTabBarItem.displayName = 'TabBarItem';\n","'use client';\n\nimport type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { useTgui } from '../TguiProvider';\nimport styles from './TabBar.module.css';\nimport { TabBarItem } from './TabBarItem';\n\nexport interface TabBarProps extends HTMLAttributes<HTMLElement> {\n ref?: Ref<HTMLElement>;\n}\n\nexport function TabBar({ ref, className, children, ...rest }: TabBarProps) {\n const { platform } = useTgui();\n\n return (\n <nav\n ref={ref}\n className={cn(styles.bar, platform === 'ios' && styles.barIos, className)}\n {...rest}\n >\n {children}\n </nav>\n );\n}\n\nTabBar.displayName = 'TabBar';\nTabBar.Item = TabBarItem;\n",".field {\n display: block;\n width: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n outline: 0;\n resize: none;\n background: transparent;\n color: var(--tgui--text_color);\n font-family: inherit;\n line-height: 1.4;\n overflow-y: auto;\n}\n\n.field::placeholder {\n color: var(--tgui--secondary_hint_color);\n}\n","'use client';\n\nimport {\n type ChangeEvent,\n type FocusEvent,\n type MutableRefObject,\n type ReactNode,\n type Ref,\n type TextareaHTMLAttributes,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { FormField } from '../FormField';\nimport { Subheadline } from '../Subheadline';\nimport { Text } from '../Text';\nimport { useTgui } from '../TguiProvider';\nimport styles from './Textarea.module.css';\n\nexport type TextareaStatus = 'default' | 'error' | 'focused';\n\nexport interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {\n ref?: Ref<HTMLTextAreaElement>;\n header?: ReactNode;\n status?: TextareaStatus;\n autoGrow?: boolean;\n maxRows?: number;\n}\n\nexport function Textarea({\n ref,\n header,\n status,\n autoGrow = false,\n maxRows,\n rows = 3,\n disabled,\n className,\n value,\n defaultValue,\n onFocus,\n onBlur,\n onChange,\n ...rest\n}: TextareaProps) {\n const { platform } = useTgui();\n const ios = platform === 'ios';\n const [focused, setFocused] = useState(false);\n const state = status ?? (focused ? 'focused' : 'default');\n const Typography = ios ? Text : Subheadline;\n\n const innerRef = useRef<HTMLTextAreaElement>(null);\n const setRefs = useCallback(\n (node: HTMLTextAreaElement | null) => {\n innerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as MutableRefObject<HTMLTextAreaElement | null>).current = node;\n },\n [ref],\n );\n\n const resize = useCallback(() => {\n const el = innerRef.current;\n if (!el || !autoGrow) return;\n el.style.height = 'auto';\n const cs = getComputedStyle(el);\n const lineHeight = Number.parseFloat(cs.lineHeight) || 20;\n const max = maxRows ? lineHeight * maxRows : Number.POSITIVE_INFINITY;\n el.style.height = `${Math.min(el.scrollHeight, max)}px`;\n el.style.overflowY = el.scrollHeight > max ? 'auto' : 'hidden';\n }, [autoGrow, maxRows]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: value drives the re-measure\n useEffect(resize, [resize, value, defaultValue]);\n\n const handleFocus = (event: FocusEvent<HTMLTextAreaElement>) => {\n if (!disabled) setFocused(true);\n onFocus?.(event);\n };\n const handleBlur = (event: FocusEvent<HTMLTextAreaElement>) => {\n setFocused(false);\n onBlur?.(event);\n };\n const handleChange = (event: ChangeEvent<HTMLTextAreaElement>) => {\n resize();\n onChange?.(event);\n };\n\n return (\n <FormField\n ios={ios}\n status={state}\n disabled={disabled}\n alignStart\n header={header}\n className={className}\n >\n <Typography\n ref={setRefs as Ref<HTMLElement>}\n Component=\"textarea\"\n className={styles.field}\n rows={rows}\n disabled={disabled}\n value={value}\n defaultValue={defaultValue}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...rest}\n />\n </FormField>\n );\n}\n\nTextarea.displayName = 'Textarea';\n",".timeline {\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.item {\n position: relative;\n display: flex;\n gap: 12px;\n padding-bottom: 20px;\n}\n\n.item:last-child {\n padding-bottom: 0;\n}\n\n.rail {\n position: relative;\n display: flex;\n flex-shrink: 0;\n justify-content: center;\n width: 10px;\n padding-top: 5px;\n}\n\n.connector {\n position: absolute;\n top: 10px;\n bottom: -30px;\n left: 50%;\n width: 1.5px;\n transform: translateX(-50%);\n background: var(--tgui--divider);\n}\n\n.item:last-child .connector {\n display: none;\n}\n\n.item:has(~ .item[data-active]) .connector {\n background: var(--tgui--link_color);\n}\n\n.dot {\n z-index: 1;\n flex-shrink: 0;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: var(--tgui--secondary_hint_color);\n}\n\n.item:has(~ .item[data-active]) .dot {\n background: var(--tgui--link_color);\n}\n\n.item[data-active] .dot {\n background: var(--tgui--link_color);\n box-shadow: 0 0 0 3px var(--tgui--secondary_fill);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .connector,\n .dot {\n transition:\n background 0.2s ease,\n box-shadow 0.2s ease;\n }\n}\n\n.content {\n flex: 1;\n min-width: 0;\n padding-top: 1px;\n}\n\n.heading {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 8px;\n}\n\n.title {\n font-family: var(--tgui--font-family);\n font-size: 15px;\n font-weight: var(--tgui--font_weight--accent2);\n color: var(--tgui--text_color);\n}\n\n.time {\n flex-shrink: 0;\n font-family: var(--tgui--font-family);\n font-size: 13px;\n color: var(--tgui--hint_color);\n}\n\n.description {\n margin-top: 2px;\n font-family: var(--tgui--font-family);\n font-size: 14px;\n line-height: 18px;\n color: var(--tgui--subtitle_text_color);\n}\n\n.item[data-active] ~ .item .title {\n color: var(--tgui--hint_color);\n}\n\n.item[data-active] ~ .item .description {\n color: var(--tgui--hint_color);\n}\n\n.item[data-active] ~ .item .dot {\n background: color-mix(in srgb, var(--tgui--secondary_hint_color) 55%, var(--tgui--bg_color));\n}\n","import type { HTMLAttributes, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Timeline.module.css';\n\nexport interface TimelineProps extends HTMLAttributes<HTMLOListElement> {\n ref?: Ref<HTMLOListElement>;\n}\n\nexport function Timeline({ ref, className, children, ...rest }: TimelineProps) {\n return (\n <ol ref={ref} className={cn(styles.timeline, className)} {...rest}>\n {children}\n </ol>\n );\n}\n\nTimeline.displayName = 'Timeline';\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport styles from './Timeline.module.css';\n\nexport interface TimelineItemProps extends Omit<HTMLAttributes<HTMLLIElement>, 'title'> {\n ref?: Ref<HTMLLIElement>;\n title: ReactNode;\n description?: ReactNode;\n time?: ReactNode;\n active?: boolean;\n}\n\nexport function TimelineItem({\n ref,\n title,\n description,\n time,\n active = false,\n className,\n ...rest\n}: TimelineItemProps) {\n return (\n <li\n ref={ref}\n className={cn(styles.item, className)}\n data-active={active || undefined}\n {...rest}\n >\n <span className={styles.rail} aria-hidden>\n <span className={styles.connector} />\n <span className={styles.dot} />\n </span>\n <div className={styles.content}>\n <div className={styles.heading}>\n <span className={styles.title}>{title}</span>\n {time != null ? <span className={styles.time}>{time}</span> : null}\n </div>\n {description != null ? <div className={styles.description}>{description}</div> : null}\n </div>\n </li>\n );\n}\n\nTimelineItem.displayName = 'TimelineItem';\n",".trigger {\n display: inline-flex;\n}\n\n.tooltip {\n position: fixed;\n top: 0;\n left: 0;\n z-index: var(--tgui--z-index--overlay, 1000);\n max-width: 260px;\n padding: 6px 10px;\n border-radius: 8px;\n background: var(--tgui--tooltip_background_dark, rgba(0, 0, 0, 0.86));\n color: var(--tgui--white, #ffffff);\n font-family: var(--tgui--font-family);\n font-size: 13px;\n line-height: 17px;\n box-shadow: 0 4px 16px rgb(0 0 0 / 0.24);\n pointer-events: none;\n opacity: 0;\n transform: scale(0.92);\n transform-origin: var(--tgui--tooltip--origin-x, 50%) var(--tgui--tooltip--origin-y, 50%);\n}\n\n.tooltip--visible {\n opacity: 1;\n transform: scale(1);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .tooltip {\n transition:\n opacity 0.13s ease,\n transform 0.13s cubic-bezier(0.32, 0.72, 0, 1);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tooltip {\n transform: none;\n }\n}\n\n.arrow {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n transform: rotate(45deg);\n}\n","'use client';\n\nimport {\n type CSSProperties,\n type ReactNode,\n type Ref,\n useCallback,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport { cn } from '../../shared/lib/cn';\nimport { Portal } from '../Portal';\nimport styles from './Tooltip.module.css';\n\nexport type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';\n\nexport interface TooltipProps {\n ref?: Ref<HTMLSpanElement>;\n children: ReactNode;\n content: ReactNode;\n placement?: TooltipPlacement;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n className?: string;\n}\n\nconst GAP = 8;\nconst MARGIN = 8;\nconst clamp = (value: number, min: number, max: number) => Math.max(min, Math.min(max, value));\n\ninterface Position {\n top: number;\n left: number;\n placement: TooltipPlacement;\n originX: number;\n originY: number;\n arrow: CSSProperties;\n}\n\nfunction compute(trigger: DOMRect, tip: DOMRect, want: TooltipPlacement): Position {\n const vw = window.innerWidth;\n const vh = window.innerHeight;\n let placement = want;\n if (placement === 'top' && trigger.top - tip.height - GAP < MARGIN) placement = 'bottom';\n else if (placement === 'bottom' && trigger.bottom + tip.height + GAP > vh - MARGIN)\n placement = 'top';\n else if (placement === 'left' && trigger.left - tip.width - GAP < MARGIN) placement = 'right';\n else if (placement === 'right' && trigger.right + tip.width + GAP > vw - MARGIN)\n placement = 'left';\n\n let top = 0;\n let left = 0;\n if (placement === 'top' || placement === 'bottom') {\n left = trigger.left + trigger.width / 2 - tip.width / 2;\n top = placement === 'top' ? trigger.top - tip.height - GAP : trigger.bottom + GAP;\n } else {\n top = trigger.top + trigger.height / 2 - tip.height / 2;\n left = placement === 'left' ? trigger.left - tip.width - GAP : trigger.right + GAP;\n }\n left = clamp(left, MARGIN, vw - tip.width - MARGIN);\n top = clamp(top, MARGIN, vh - tip.height - MARGIN);\n\n const centerX = trigger.left + trigger.width / 2 - left;\n const centerY = trigger.top + trigger.height / 2 - top;\n const arrow: CSSProperties = {};\n if (placement === 'top') {\n arrow.left = clamp(centerX, 10, tip.width - 10) - 4;\n arrow.bottom = -4;\n } else if (placement === 'bottom') {\n arrow.left = clamp(centerX, 10, tip.width - 10) - 4;\n arrow.top = -4;\n } else if (placement === 'left') {\n arrow.top = clamp(centerY, 10, tip.height - 10) - 4;\n arrow.right = -4;\n } else {\n arrow.top = clamp(centerY, 10, tip.height - 10) - 4;\n arrow.left = -4;\n }\n\n return {\n top,\n left,\n placement,\n originX: clamp(centerX, 0, tip.width),\n originY: clamp(centerY, 0, tip.height),\n arrow,\n };\n}\n\nexport function Tooltip({\n ref,\n children,\n content,\n placement = 'top',\n open: openProp,\n onOpenChange,\n className,\n}: TooltipProps) {\n const [uncontrolled, setUncontrolled] = useState(false);\n const open = openProp ?? uncontrolled;\n\n const triggerRef = useRef<HTMLSpanElement | null>(null);\n const tipRef = useRef<HTMLDivElement | null>(null);\n const pressTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n const [pos, setPos] = useState<Position | null>(null);\n const [visible, setVisible] = useState(false);\n const id = useId();\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (openProp == null) setUncontrolled(next);\n onOpenChange?.(next);\n },\n [openProp, onOpenChange],\n );\n\n const reposition = useCallback(() => {\n const trigger = triggerRef.current;\n const tip = tipRef.current;\n if (!trigger || !tip) return;\n setPos(compute(trigger.getBoundingClientRect(), tip.getBoundingClientRect(), placement));\n }, [placement]);\n\n useLayoutEffect(() => {\n if (!open) {\n setVisible(false);\n setPos(null);\n return;\n }\n reposition();\n }, [open, reposition]);\n\n useEffect(() => {\n if (!open || !pos) return;\n const raf = requestAnimationFrame(() => setVisible(true));\n const onScroll = () => setOpen(false);\n window.addEventListener('scroll', onScroll, true);\n window.addEventListener('resize', reposition);\n return () => {\n cancelAnimationFrame(raf);\n window.removeEventListener('scroll', onScroll, true);\n window.removeEventListener('resize', reposition);\n };\n }, [open, pos, reposition, setOpen]);\n\n useEffect(() => {\n if (!open) return;\n const onKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape') setOpen(false);\n };\n document.addEventListener('keydown', onKey);\n return () => document.removeEventListener('keydown', onKey);\n }, [open, setOpen]);\n\n const clearPress = useCallback(() => {\n if (pressTimer.current) {\n clearTimeout(pressTimer.current);\n pressTimer.current = null;\n }\n }, []);\n\n useEffect(() => clearPress, [clearPress]);\n\n return (\n <>\n {/* biome-ignore lint/a11y/noStaticElementInteractions: this span only relays hover/focus to the described tooltip; the child is the real control */}\n <span\n ref={(node) => {\n triggerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as { current: HTMLSpanElement | null }).current = node;\n }}\n className={cn(styles.trigger, className)}\n aria-describedby={open ? id : undefined}\n onPointerEnter={(event) => {\n if (event.pointerType !== 'touch') setOpen(true);\n }}\n onPointerLeave={(event) => {\n if (event.pointerType !== 'touch') setOpen(false);\n clearPress();\n }}\n onPointerDown={(event) => {\n if (event.pointerType === 'touch') {\n pressTimer.current = setTimeout(() => setOpen(true), 450);\n }\n }}\n onPointerUp={clearPress}\n onPointerCancel={clearPress}\n onFocus={() => setOpen(true)}\n onBlur={() => setOpen(false)}\n >\n {children}\n </span>\n {open ? (\n <Portal>\n <div\n ref={tipRef}\n id={id}\n role=\"tooltip\"\n className={cn(styles.tooltip, visible && styles['tooltip--visible'])}\n style={\n pos\n ? ({\n top: pos.top,\n left: pos.left,\n '--tgui--tooltip--origin-x': `${pos.originX}px`,\n '--tgui--tooltip--origin-y': `${pos.originY}px`,\n } as CSSProperties)\n : undefined\n }\n data-placement={pos?.placement}\n >\n {content}\n {pos ? <span className={styles.arrow} style={pos.arrow} aria-hidden /> : null}\n </div>\n </Portal>\n ) : null}\n </>\n );\n}\n\nTooltip.displayName = 'Tooltip';\n"],"mappings":";;;;;;;AAEA,SAAgB,EAAG,GAAG,GAAsB;CAC1C,OAAO,EAAK,CAAM;AACpB;;;;;;;;;;;GEGa,IAAmB,EAA4C,IAAI;AAEhF,EAAiB,cAAc;;;ACF/B,IAAM,KAAW,MACf,KAAS,OAAO,CAAC,IAAI,MAAM,QAAQ,CAAK,IAAI,IAAQ,CAAC,CAAK;AAU5D,SAAgB,EAAU,EACxB,QACA,cAAW,IACX,OAAO,GACP,iBACA,aACA,cACA,aACA,GAAG,KACc;CACjB,IAAM,CAAC,GAAc,KAAmB,QAAe,EAAQ,CAAY,CAAC,GACtE,IAAO,KAAa,OAA4B,IAArB,EAAQ,CAAS,GAE5C,IAAS,GACZ,MAAiB;EAEhB,IAAM,IADS,EAAK,SAAS,CAChB,IAAS,EAAK,QAAQ,MAAM,MAAM,CAAI,IAAI,IAAW,CAAC,GAAG,GAAM,CAAI,IAAI,CAAC,CAAI;EAEzF,AADI,KAAmB,EAAgB,CAAI,GAC3C,IAAW,CAAI;CACjB,GACA;EAAC;EAAM;EAAU;EAAW;CAAQ,CACtC,GAEM,IAAU,SAAe;EAAE;EAAM;CAAO,IAAI,CAAC,GAAM,CAAM,CAAC;CAEhE,OACE,kBAAC,EAAiB,UAAlB;EAA2B,OAAO;EAChC,UAAA,kBAAC,OAAD;GAAU;GAAK,WAAW,EAAG,EAAO,WAA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