@ohseungik/maru-ui 0.0.0-stage → 0.1.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.
Files changed (38) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -2
  3. package/dist/components/Button/Button.d.ts +16 -0
  4. package/dist/components/Button/index.d.ts +2 -0
  5. package/dist/components/Checkbox/Checkbox.d.ts +17 -0
  6. package/dist/components/Checkbox/index.d.ts +2 -0
  7. package/dist/components/Dialog/Dialog.d.ts +29 -0
  8. package/dist/components/Dialog/index.d.ts +2 -0
  9. package/dist/components/Field/Field.d.ts +14 -0
  10. package/dist/components/Field/FieldContext.d.ts +12 -0
  11. package/dist/components/Field/index.d.ts +2 -0
  12. package/dist/components/Heading/Heading.d.ts +12 -0
  13. package/dist/components/Heading/index.d.ts +2 -0
  14. package/dist/components/Input/Input.d.ts +16 -0
  15. package/dist/components/Input/index.d.ts +2 -0
  16. package/dist/components/Select/Select.d.ts +23 -0
  17. package/dist/components/Select/index.d.ts +2 -0
  18. package/dist/components/Stack/Stack.d.ts +16 -0
  19. package/dist/components/Stack/index.d.ts +2 -0
  20. package/dist/components/Switch/Switch.d.ts +13 -0
  21. package/dist/components/Switch/index.d.ts +2 -0
  22. package/dist/components/Tabs/Tab.d.ts +10 -0
  23. package/dist/components/Tabs/TabList.d.ts +8 -0
  24. package/dist/components/Tabs/TabPanel.d.ts +11 -0
  25. package/dist/components/Tabs/Tabs.d.ts +25 -0
  26. package/dist/components/Tabs/TabsContext.d.ts +16 -0
  27. package/dist/components/Tabs/index.d.ts +9 -0
  28. package/dist/components/Text/Text.d.ts +13 -0
  29. package/dist/components/Text/index.d.ts +2 -0
  30. package/dist/components/Tooltip/Tooltip.d.ts +37 -0
  31. package/dist/components/Tooltip/index.d.ts +3 -0
  32. package/dist/components/Tooltip/position.d.ts +28 -0
  33. package/dist/index.d.ts +24 -0
  34. package/dist/index.js +663 -0
  35. package/dist/index.js.map +1 -0
  36. package/dist/styles.css +1 -0
  37. package/dist/utils/cx.d.ts +4 -0
  38. package/package.json +62 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/utils/cx.ts","../src/components/Button/Button.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Heading/Heading.tsx","../src/components/Dialog/Dialog.tsx","../src/components/Field/FieldContext.ts","../src/components/Field/Field.tsx","../src/components/Input/Input.tsx","../src/components/Select/Select.tsx","../src/components/Stack/Stack.tsx","../src/components/Switch/Switch.tsx","../src/components/Tabs/TabsContext.ts","../src/components/Tabs/Tab.tsx","../src/components/Tabs/TabList.tsx","../src/components/Tabs/TabPanel.tsx","../src/components/Tabs/Tabs.tsx","../src/components/Text/Text.tsx","../src/components/Tooltip/position.ts","../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["type ClassValue = string | false | null | undefined;\n\n/** Join class names, skipping falsy values. */\nexport function cx(...values: ClassValue[]): string {\n return values.filter(Boolean).join(' ');\n}\n","import { forwardRef, type ButtonHTMLAttributes } from 'react';\nimport { cx } from '../../utils/cx';\nimport styles from './Button.module.css';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\n\nexport interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {\n /** Visual emphasis. Use one `primary` per view. */\n variant?: ButtonVariant;\n size?: ButtonSize;\n /**\n * Shows a spinner and marks the button busy. The button is also disabled while\n * loading so it cannot be activated twice.\n */\n loading?: boolean;\n /** Defaults to `button` so a Button inside a form never submits by accident. */\n type?: 'button' | 'submit' | 'reset';\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = 'primary',\n size = 'md',\n loading = false,\n type = 'button',\n disabled = false,\n className,\n children,\n ...rest\n },\n ref,\n) {\n return (\n <button\n {...rest}\n ref={ref}\n type={type}\n className={cx(styles.root, className)}\n data-variant={variant}\n data-size={size}\n data-loading={loading ? '' : undefined}\n disabled={disabled || loading}\n aria-busy={loading ? true : undefined}\n >\n {loading ? <span className={styles.spinner} aria-hidden=\"true\" /> : null}\n {children}\n </button>\n );\n});\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n type InputHTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cx } from '../../utils/cx';\nimport styles from './Checkbox.module.css';\n\nexport type CheckboxSize = 'sm' | 'md' | 'lg';\n\nexport interface CheckboxProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'type' | 'size'\n> {\n /** The visible label. Without it, set `aria-label` or `aria-labelledby`. */\n children?: ReactNode;\n size?: CheckboxSize;\n /**\n * Shows the \"some selected\" state of a parent checkbox. It is purely visual and\n * announced as \"mixed\"; the browser clears it when the user clicks, so a controlled\n * parent should recompute it in `onChange`.\n */\n indeterminate?: boolean;\n /** Marks the value as invalid (`aria-invalid`), for example a required checkbox left unchecked. */\n invalid?: boolean;\n}\n\n/** A native checkbox with a custom box. Click, Space, label click and forms all work natively. */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(function Checkbox(\n { size = 'md', indeterminate = false, invalid = false, disabled, className, children, ...rest },\n ref,\n) {\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const setRefs = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n },\n [ref],\n );\n\n // `indeterminate` is a DOM property with no HTML attribute, so it is set after render.\n // It runs on every render because a user click resets it in the browser.\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.indeterminate = indeterminate;\n }\n });\n\n return (\n <label\n className={cx(styles.root, className)}\n data-size={size}\n data-disabled={disabled ? '' : undefined}\n >\n <span className={styles.control}>\n <input\n {...rest}\n ref={setRefs}\n type=\"checkbox\"\n className={styles.input}\n disabled={disabled}\n data-invalid={invalid ? '' : undefined}\n aria-invalid={invalid ? true : undefined}\n />\n <span className={styles.box} aria-hidden=\"true\" />\n </span>\n {children ? <span className={styles.label}>{children}</span> : null}\n </label>\n );\n});\n","import { forwardRef, type ComponentType, type HTMLAttributes, type RefAttributes } from 'react';\nimport { cx } from '../../utils/cx';\nimport styles from './Heading.module.css';\n\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\nexport type HeadingSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';\nexport type HeadingTone = 'default' | 'muted';\n\nexport interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {\n /** Semantic level (h1-h6). Decides document structure, not appearance. */\n level: HeadingLevel;\n /** Visual size. Defaults to the size that matches `level`. */\n size?: HeadingSize;\n tone?: HeadingTone;\n}\n\nconst DEFAULT_SIZE: Record<HeadingLevel, HeadingSize> = {\n 1: '4xl',\n 2: '3xl',\n 3: '2xl',\n 4: 'xl',\n 5: 'lg',\n 6: 'md',\n};\n\n// The tag (h1-h6) is only known at runtime, so it is typed as one component that\n// accepts the props every heading shares (including a ref to HTMLHeadingElement).\ntype HeadingComponent = ComponentType<\n HTMLAttributes<HTMLHeadingElement> & RefAttributes<HTMLHeadingElement>\n>;\n\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(function Heading(\n { level, size, tone = 'default', className, ...rest },\n ref,\n) {\n const Component = `h${level}` as unknown as HeadingComponent;\n\n return (\n <Component\n {...rest}\n ref={ref}\n className={cx(styles.root, className)}\n data-size={size ?? DEFAULT_SIZE[level]}\n data-tone={tone}\n />\n );\n});\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useRef,\n type DialogHTMLAttributes,\n type ReactNode,\n type RefObject,\n} from 'react';\nimport { cx } from '../../utils/cx';\nimport { Heading } from '../Heading';\nimport styles from './Dialog.module.css';\n\nexport type DialogSize = 'sm' | 'md' | 'lg';\n\nexport interface DialogProps extends Omit<\n DialogHTMLAttributes<HTMLDialogElement>,\n 'open' | 'onClose' | 'onCancel' | 'title'\n> {\n /** Whether the dialog is shown. The dialog is controlled: update it in `onClose`. */\n open: boolean;\n /** Called when the user asks to close (Esc, close button or backdrop click). */\n onClose: () => void;\n /** Visible title. It also names the dialog (`aria-labelledby`). */\n title: ReactNode;\n /** Optional supporting text. It also describes the dialog (`aria-describedby`). */\n description?: ReactNode;\n /** Footer area, usually the action buttons. */\n actions?: ReactNode;\n size?: DialogSize;\n /** Close when the backdrop is clicked. Turn off for forms that must not be lost. */\n closeOnBackdropClick?: boolean;\n /** Accessible name of the close button. Translate it for your users. */\n closeLabel?: string;\n /** Element to focus on open. Defaults to the first focusable element. */\n initialFocusRef?: RefObject<HTMLElement | null>;\n /** Keep the content in the DOM while closed. Useful to preserve form state. */\n keepMounted?: boolean;\n}\n\n/* Several dialogs can be open at once; the page may only scroll again after the last closes. */\nlet scrollLocks = 0;\nlet previousOverflow = '';\n\nfunction lockScroll() {\n if (scrollLocks === 0) {\n previousOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n scrollLocks += 1;\n}\n\nfunction unlockScroll() {\n scrollLocks = Math.max(0, scrollLocks - 1);\n if (scrollLocks === 0) {\n document.body.style.overflow = previousOverflow;\n }\n}\n\n/**\n * A modal dialog built on the native `<dialog>` element. The browser provides the focus trap,\n * the inert background, Esc handling and focus restoration; this component adds the\n * controlled API, the backdrop click, the scroll lock and the visuals.\n */\nexport const Dialog = forwardRef<HTMLDialogElement, DialogProps>(function Dialog(\n {\n open,\n onClose,\n title,\n description,\n actions,\n size = 'md',\n closeOnBackdropClick = true,\n closeLabel = 'Close',\n initialFocusRef,\n keepMounted = false,\n className,\n children,\n ...rest\n },\n forwardedRef,\n) {\n const baseId = useId();\n const titleId = `${baseId}-title`;\n const descriptionId = `${baseId}-description`;\n\n const dialogRef = useRef<HTMLDialogElement | null>(null);\n // Event listeners are attached once but must always see the latest props.\n const onCloseRef = useRef(onClose);\n const openRef = useRef(open);\n const closeOnBackdropClickRef = useRef(closeOnBackdropClick);\n useEffect(() => {\n onCloseRef.current = onClose;\n openRef.current = open;\n closeOnBackdropClickRef.current = closeOnBackdropClick;\n });\n\n const setRefs = useCallback(\n (node: HTMLDialogElement | null) => {\n dialogRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n },\n [forwardedRef],\n );\n\n const mounted = open || keepMounted;\n\n // Sync the controlled `open` prop with the native modal state.\n useEffect(() => {\n const dialog = dialogRef.current;\n if (!dialog || !open) return;\n\n const returnFocusTo =\n document.activeElement instanceof HTMLElement ? document.activeElement : null;\n if (!dialog.open) dialog.showModal();\n lockScroll();\n if (initialFocusRef?.current) initialFocusRef.current.focus();\n\n return () => {\n unlockScroll();\n if (dialog.open) dialog.close();\n // The browser restores focus on close(), but not when React already removed the\n // dialog from the page (the usual case), so put it back ourselves. Do not steal it\n // if the user has meanwhile moved focus somewhere else on purpose.\n const current = document.activeElement;\n const focusLost = !current || current === document.body || dialog.contains(current);\n if (returnFocusTo?.isConnected && focusLost) returnFocusTo.focus();\n };\n // `initialFocusRef` is only read when the dialog opens.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n // Esc, backdrop click and any other native close request go through onClose.\n useEffect(() => {\n const dialog = dialogRef.current;\n if (!dialog) return;\n\n const handleCancel = (event: Event) => {\n // Stay controlled: the parent decides whether the dialog really closes.\n event.preventDefault();\n onCloseRef.current();\n };\n\n // A close we did not ask for (e.g. `<form method=\"dialog\">`) must reach the parent too.\n // Our own `dialog.close()` runs while `open` is already false, so it is ignored here.\n const handleClose = () => {\n if (openRef.current && !dialog.open) onCloseRef.current();\n };\n\n // The backdrop is the dialog element itself, so a click whose press AND release both\n // landed on it (not on the panel) is a click on the backdrop. Checking mousedown avoids\n // closing when a text selection started inside the panel ends outside.\n let pressedOnBackdrop = false;\n const handleMouseDown = (event: MouseEvent) => {\n pressedOnBackdrop = event.target === dialog;\n };\n const handleClick = (event: MouseEvent) => {\n const shouldClose =\n pressedOnBackdrop && event.target === dialog && closeOnBackdropClickRef.current;\n pressedOnBackdrop = false;\n if (shouldClose) onCloseRef.current();\n };\n\n dialog.addEventListener('cancel', handleCancel);\n dialog.addEventListener('close', handleClose);\n dialog.addEventListener('mousedown', handleMouseDown);\n dialog.addEventListener('click', handleClick);\n return () => {\n dialog.removeEventListener('cancel', handleCancel);\n dialog.removeEventListener('close', handleClose);\n dialog.removeEventListener('mousedown', handleMouseDown);\n dialog.removeEventListener('click', handleClick);\n };\n }, [mounted]);\n\n if (!mounted) return null;\n\n return (\n <dialog\n {...rest}\n ref={setRefs}\n className={cx(styles.root, className)}\n data-size={size}\n aria-labelledby={titleId}\n aria-describedby={description ? descriptionId : undefined}\n >\n {/* The panel keeps the padding, so every click on the dialog element is a backdrop click. */}\n <div className={styles.panel}>\n <header className={styles.header}>\n <Heading level={2} size=\"lg\" id={titleId} className={styles.title}>\n {title}\n </Heading>\n {description ? (\n <p id={descriptionId} className={styles.description}>\n {description}\n </p>\n ) : null}\n </header>\n <div className={styles.body}>{children}</div>\n {actions ? <footer className={styles.actions}>{actions}</footer> : null}\n {/* Last in the DOM so the first Tab stop is the content, not the close button. */}\n <button type=\"button\" className={styles.close} aria-label={closeLabel} onClick={onClose}>\n <svg viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" aria-hidden=\"true\" focusable=\"false\">\n <path\n d=\"M3 3l10 10M13 3L3 13\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n />\n </svg>\n </button>\n </div>\n </dialog>\n );\n});\n","import { createContext, useContext } from 'react';\n\nexport interface FieldContextValue {\n /** The id the field's label points to. The control inside the field must use it. */\n controlId: string;\n /** Space-separated ids of the description and error, for `aria-describedby`. */\n describedBy: string | undefined;\n invalid: boolean;\n required: boolean;\n disabled: boolean;\n}\n\nexport const FieldContext = createContext<FieldContextValue | null>(null);\n\n/** Returns the surrounding Field's wiring, or `null` when used outside a Field. */\nexport function useFieldContext(): FieldContextValue | null {\n return useContext(FieldContext);\n}\n","import { forwardRef, useId, type HTMLAttributes, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\nimport { FieldContext } from './FieldContext';\nimport styles from './Field.module.css';\n\nexport interface FieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n /** Visible label. Always required: a control without a name is not accessible. */\n label: ReactNode;\n /** Help text shown under the label and read after it by screen readers. */\n description?: ReactNode;\n /** Error message. Its presence marks the control invalid. */\n error?: ReactNode;\n required?: boolean;\n disabled?: boolean;\n /** The control, for example an `Input`. */\n children: ReactNode;\n}\n\nfunction hasContent(node: ReactNode): boolean {\n return node !== undefined && node !== null && node !== false && node !== '';\n}\n\nexport const Field = forwardRef<HTMLDivElement, FieldProps>(function Field(\n { label, description, error, required = false, disabled = false, className, children, ...rest },\n ref,\n) {\n const baseId = useId();\n const controlId = `${baseId}-control`;\n const descriptionId = `${baseId}-description`;\n const errorId = `${baseId}-error`;\n\n const hasDescription = hasContent(description);\n const hasError = hasContent(error);\n const describedBy =\n [hasDescription ? descriptionId : null, hasError ? errorId : null].filter(Boolean).join(' ') ||\n undefined;\n\n return (\n <div\n {...rest}\n ref={ref}\n className={cx(styles.root, className)}\n data-invalid={hasError ? '' : undefined}\n >\n <label htmlFor={controlId} className={styles.label}>\n {label}\n {required ? (\n <span aria-hidden=\"true\" className={styles.required}>\n {' *'}\n </span>\n ) : null}\n </label>\n {hasDescription ? (\n <p id={descriptionId} className={styles.description}>\n {description}\n </p>\n ) : null}\n <FieldContext.Provider\n value={{ controlId, describedBy, invalid: hasError, required, disabled }}\n >\n {children}\n </FieldContext.Provider>\n {/* The live region stays mounted so a newly added error is announced. */}\n <div aria-live=\"polite\">\n {hasError ? (\n <p id={errorId} className={styles.error}>\n {error}\n </p>\n ) : null}\n </div>\n </div>\n );\n});\n","import { forwardRef, type InputHTMLAttributes } from 'react';\nimport { cx } from '../../utils/cx';\nimport { useFieldContext } from '../Field/FieldContext';\nimport styles from './Input.module.css';\n\nexport type InputSize = 'sm' | 'md' | 'lg';\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {\n size?: InputSize;\n /**\n * Marks the value as invalid (`aria-invalid`). Inside a `Field` this follows the\n * field's `error` automatically, so you rarely need to set it yourself.\n */\n invalid?: boolean;\n}\n\n/**\n * A native text input. Inside a `Field` it picks up the label, description, error,\n * required and disabled state from the field; on its own it needs an `aria-label`\n * or an external `<label>`.\n */\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n {\n size = 'md',\n type = 'text',\n invalid,\n id,\n disabled,\n required,\n className,\n 'aria-describedby': ariaDescribedBy,\n ...rest\n },\n ref,\n) {\n const field = useFieldContext();\n\n const isInvalid = invalid ?? field?.invalid ?? false;\n const describedBy = [ariaDescribedBy, field?.describedBy].filter(Boolean).join(' ') || undefined;\n\n return (\n <input\n {...rest}\n ref={ref}\n // Inside a Field the label points at the field's id, so that id always wins.\n id={field?.controlId ?? id}\n type={type}\n className={cx(styles.root, className)}\n data-size={size}\n data-invalid={isInvalid ? '' : undefined}\n aria-invalid={isInvalid ? true : undefined}\n aria-describedby={describedBy}\n disabled={disabled ?? field?.disabled}\n required={required ?? field?.required}\n />\n );\n});\n","import { forwardRef, type ReactNode, type SelectHTMLAttributes } from 'react';\nimport { cx } from '../../utils/cx';\nimport { useFieldContext } from '../Field/FieldContext';\nimport styles from './Select.module.css';\n\nexport type SelectSize = 'sm' | 'md' | 'lg';\n\nexport interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {\n size?: SelectSize;\n /**\n * Marks the value as invalid (`aria-invalid`). Inside a `Field` this follows the\n * field's `error` automatically, so you rarely need to set it yourself.\n */\n invalid?: boolean;\n /**\n * Text shown while nothing is chosen. It becomes a first, empty option the user cannot\n * pick again. Without it, the browser preselects the first option.\n */\n placeholder?: string;\n /** The `<option>` and `<optgroup>` elements. */\n children: ReactNode;\n}\n\n/**\n * A native `<select>` with the design system's look. The browser keeps doing what it does\n * best: the option list, keyboard search, mobile pickers and screen reader support. Inside a\n * `Field` it picks up the label, description, error, required and disabled state.\n */\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(function Select(\n {\n size = 'md',\n invalid,\n placeholder,\n id,\n disabled,\n required,\n value,\n defaultValue,\n className,\n children,\n 'aria-describedby': ariaDescribedBy,\n ...rest\n },\n ref,\n) {\n const field = useFieldContext();\n\n const isInvalid = invalid ?? field?.invalid ?? false;\n const isDisabled = disabled ?? field?.disabled ?? false;\n const describedBy = [ariaDescribedBy, field?.describedBy].filter(Boolean).join(' ') || undefined;\n\n // With a placeholder, an uncontrolled select must start on the empty option.\n const selection =\n value !== undefined\n ? { value }\n : { defaultValue: defaultValue ?? (placeholder !== undefined ? '' : undefined) };\n\n return (\n <span className={styles.wrapper} data-size={size} data-disabled={isDisabled ? '' : undefined}>\n <select\n {...rest}\n {...selection}\n ref={ref}\n // Inside a Field the label points at the field's id, so that id always wins.\n id={field?.controlId ?? id}\n className={cx(styles.root, className)}\n data-invalid={isInvalid ? '' : undefined}\n aria-invalid={isInvalid ? true : undefined}\n aria-describedby={describedBy}\n disabled={isDisabled}\n required={required ?? field?.required}\n >\n {placeholder !== undefined ? (\n <option value=\"\" disabled hidden>\n {placeholder}\n </option>\n ) : null}\n {children}\n </select>\n <svg className={styles.chevron} viewBox=\"0 0 16 16\" aria-hidden=\"true\" focusable=\"false\">\n <path\n d=\"M4 6l4 4 4-4\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </span>\n );\n});\n","import {\n forwardRef,\n type ComponentType,\n type CSSProperties,\n type HTMLAttributes,\n type RefAttributes,\n} from 'react';\nimport { cx } from '../../utils/cx';\nimport styles from './Stack.module.css';\n\n/** Keys of `scale.space` in @ohseungik/maru-tokens. A test keeps both in sync. */\nexport const STACK_GAPS = [0, 1, 2, 3, 4, 5, 6, 8, 10, 12] as const;\n\nexport type StackGap = (typeof STACK_GAPS)[number];\nexport type StackElement =\n 'div' | 'section' | 'nav' | 'header' | 'footer' | 'main' | 'article' | 'aside';\n\nexport interface StackProps extends HTMLAttributes<HTMLElement> {\n as?: StackElement;\n direction?: 'vertical' | 'horizontal';\n /** Space between children, as a key of the spacing scale. */\n gap?: StackGap;\n align?: 'start' | 'center' | 'end' | 'stretch';\n justify?: 'start' | 'center' | 'end' | 'between';\n /** Allow children to wrap onto multiple lines. */\n wrap?: boolean;\n}\n\n// The element is only known at runtime, so it is typed as one component that\n// accepts the props every supported element shares (including a ref to HTMLElement).\ntype StackComponent = ComponentType<HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>>;\n\nexport const Stack = forwardRef<HTMLElement, StackProps>(function Stack(\n {\n as = 'div',\n direction = 'vertical',\n gap = 4,\n align,\n justify,\n wrap = false,\n className,\n style,\n ...rest\n },\n ref,\n) {\n const Component = as as unknown as StackComponent;\n const mergedStyle = {\n '--maru-stack-gap': `var(--maru-space-${gap})`,\n ...style,\n } as CSSProperties;\n\n return (\n <Component\n {...rest}\n ref={ref}\n className={cx(styles.root, className)}\n style={mergedStyle}\n data-direction={direction}\n data-align={align}\n data-justify={justify}\n data-wrap={wrap ? '' : undefined}\n />\n );\n});\n","import { forwardRef, type InputHTMLAttributes, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\nimport styles from './Switch.module.css';\n\nexport type SwitchSize = 'sm' | 'md' | 'lg';\n\nexport interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {\n /** The visible label. Without it, set `aria-label` or `aria-labelledby`. */\n children?: ReactNode;\n size?: SwitchSize;\n}\n\n/**\n * An on/off setting that takes effect immediately, like a light switch. It is a native\n * checkbox with `role=\"switch\"`, so Space toggles it and it works in forms. For choices\n * that are only applied after a submit, use `Checkbox` instead.\n */\nexport const Switch = forwardRef<HTMLInputElement, SwitchProps>(function Switch(\n { size = 'md', disabled, className, children, ...rest },\n ref,\n) {\n return (\n <label\n className={cx(styles.root, className)}\n data-size={size}\n data-disabled={disabled ? '' : undefined}\n >\n <span className={styles.control}>\n <input\n {...rest}\n ref={ref}\n type=\"checkbox\"\n role=\"switch\"\n className={styles.input}\n disabled={disabled}\n />\n <span className={styles.track} aria-hidden=\"true\" />\n </span>\n {children ? <span className={styles.label}>{children}</span> : null}\n </label>\n );\n});\n","import { createContext, useContext } from 'react';\n\nexport type TabsOrientation = 'horizontal' | 'vertical';\nexport type TabsActivation = 'automatic' | 'manual';\n\nexport interface TabsContextValue {\n baseId: string;\n /** The value of the selected tab. */\n value: string;\n select: (value: string) => void;\n orientation: TabsOrientation;\n activation: TabsActivation;\n}\n\nexport const TabsContext = createContext<TabsContextValue | null>(null);\n\n/** Returns the surrounding Tabs, or throws a clear error when used outside of one. */\nexport function useTabsContext(consumer: string): TabsContextValue {\n const context = useContext(TabsContext);\n if (!context) {\n throw new Error(`<${consumer}> must be rendered inside <Tabs>.`);\n }\n return context;\n}\n\n/** Ids tie a tab to its panel (`aria-controls` / `aria-labelledby`). */\nexport function getTabId(baseId: string, value: string): string {\n return `${baseId}-tab-${encodeURIComponent(value)}`;\n}\n\nexport function getPanelId(baseId: string, value: string): string {\n return `${baseId}-panel-${encodeURIComponent(value)}`;\n}\n","import {\n forwardRef,\n type ButtonHTMLAttributes,\n type FocusEvent,\n type KeyboardEvent,\n type MouseEvent,\n} from 'react';\nimport { cx } from '../../utils/cx';\nimport { getPanelId, getTabId, useTabsContext } from './TabsContext';\nimport styles from './Tabs.module.css';\n\nexport interface TabProps extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'type' | 'role' | 'value'\n> {\n /** Matches the `value` of the `TabPanel` this tab shows. */\n value: string;\n}\n\n/**\n * One tab. Only the selected tab is in the Tab key order (roving tabindex); the arrow\n * keys, Home and End move focus to another tab.\n */\nexport const Tab = forwardRef<HTMLButtonElement, TabProps>(function Tab(\n { value, className, onClick, onFocus, onKeyDown, ...rest },\n ref,\n) {\n const { baseId, value: selectedValue, select, orientation, activation } = useTabsContext('Tab');\n const selected = value === selectedValue;\n\n function handleClick(event: MouseEvent<HTMLButtonElement>) {\n onClick?.(event);\n if (!event.defaultPrevented) select(value);\n }\n\n function handleFocus(event: FocusEvent<HTMLButtonElement>) {\n onFocus?.(event);\n if (!event.defaultPrevented && activation === 'automatic') select(value);\n }\n\n function handleKeyDown(event: KeyboardEvent<HTMLButtonElement>) {\n onKeyDown?.(event);\n if (event.defaultPrevented) return;\n\n const list = event.currentTarget.closest('[role=\"tablist\"]');\n if (!list) return;\n\n const tabs = Array.from(list.querySelectorAll<HTMLElement>('[role=\"tab\"]:not(:disabled)'));\n const current = tabs.indexOf(event.currentTarget);\n if (current === -1) return;\n\n // In right-to-left text the \"next\" tab is on the left.\n const rtl = getComputedStyle(list).direction === 'rtl';\n const previousKey = orientation === 'vertical' ? 'ArrowUp' : rtl ? 'ArrowRight' : 'ArrowLeft';\n const nextKey = orientation === 'vertical' ? 'ArrowDown' : rtl ? 'ArrowLeft' : 'ArrowRight';\n\n let target: HTMLElement | undefined;\n if (event.key === nextKey) {\n target = tabs[(current + 1) % tabs.length];\n } else if (event.key === previousKey) {\n target = tabs[(current - 1 + tabs.length) % tabs.length];\n } else if (event.key === 'Home') {\n target = tabs[0];\n } else if (event.key === 'End') {\n target = tabs[tabs.length - 1];\n } else {\n return;\n }\n\n event.preventDefault();\n // In automatic mode the focused tab selects itself (see handleFocus).\n target?.focus();\n }\n\n return (\n <button\n {...rest}\n ref={ref}\n type=\"button\"\n role=\"tab\"\n id={getTabId(baseId, value)}\n aria-selected={selected}\n aria-controls={getPanelId(baseId, value)}\n tabIndex={selected ? 0 : -1}\n className={cx(styles.tab, className)}\n data-selected={selected ? '' : undefined}\n data-orientation={orientation}\n onClick={handleClick}\n onFocus={handleFocus}\n onKeyDown={handleKeyDown}\n />\n );\n});\n","import { forwardRef, type HTMLAttributes } from 'react';\nimport { cx } from '../../utils/cx';\nimport { useTabsContext } from './TabsContext';\nimport styles from './Tabs.module.css';\n\nexport type TabListProps = Omit<HTMLAttributes<HTMLDivElement>, 'role'>;\n\n/**\n * The row (or column) of tabs. The arrow keys, Home and End are handled by each `Tab`,\n * which is the element that actually has focus. Give the list an `aria-label` so the\n * group has a name.\n */\nexport const TabList = forwardRef<HTMLDivElement, TabListProps>(function TabList(\n { className, ...rest },\n ref,\n) {\n const { orientation } = useTabsContext('TabList');\n\n return (\n <div\n {...rest}\n ref={ref}\n role=\"tablist\"\n aria-orientation={orientation}\n className={cx(styles.list, className)}\n data-orientation={orientation}\n />\n );\n});\n","import { forwardRef, type HTMLAttributes } from 'react';\nimport { cx } from '../../utils/cx';\nimport { getPanelId, getTabId, useTabsContext } from './TabsContext';\nimport styles from './Tabs.module.css';\n\nexport interface TabPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, 'role'> {\n /** Matches the `value` of the `Tab` that shows this panel. */\n value: string;\n /**\n * Keep the content in the page (hidden) while the tab is not selected, so its state\n * survives switching. By default only the selected panel renders its content.\n */\n keepMounted?: boolean;\n}\n\nexport const TabPanel = forwardRef<HTMLDivElement, TabPanelProps>(function TabPanel(\n { value, keepMounted = false, className, children, ...rest },\n ref,\n) {\n const { baseId, value: selectedValue } = useTabsContext('TabPanel');\n const selected = value === selectedValue;\n\n return (\n <div\n {...rest}\n ref={ref}\n role=\"tabpanel\"\n id={getPanelId(baseId, value)}\n aria-labelledby={getTabId(baseId, value)}\n // Focusable so keyboard users can reach panels that contain no focusable content.\n tabIndex={0}\n hidden={!selected}\n className={cx(styles.panel, className)}\n >\n {selected || keepMounted ? children : null}\n </div>\n );\n});\n","import {\n forwardRef,\n useCallback,\n useId,\n useMemo,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cx } from '../../utils/cx';\nimport { TabsContext, type TabsActivation, type TabsOrientation } from './TabsContext';\nimport styles from './Tabs.module.css';\n\ninterface TabsBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {\n /** Called with the value of the tab the user selected. */\n onValueChange?: (value: string) => void;\n /** `vertical` lists the tabs in a column and uses the Up and Down arrow keys. */\n orientation?: TabsOrientation;\n /**\n * `automatic` selects a tab as soon as it receives focus with the arrow keys.\n * `manual` only moves focus; Enter or Space selects. Prefer `manual` when showing a\n * panel is slow, so keyboard users are not forced to wait on every arrow press.\n */\n activation?: TabsActivation;\n children: ReactNode;\n}\n\n/** Give either `value` (controlled) or `defaultValue` (uncontrolled), never both. */\nexport type TabsProps = TabsBaseProps &\n ({ value: string; defaultValue?: undefined } | { value?: undefined; defaultValue: string });\n\nexport const Tabs = forwardRef<HTMLDivElement, TabsProps>(function Tabs(\n {\n value: valueProp,\n defaultValue,\n onValueChange,\n orientation = 'horizontal',\n activation = 'automatic',\n className,\n children,\n ...rest\n },\n ref,\n) {\n const baseId = useId();\n const [innerValue, setInnerValue] = useState(defaultValue ?? '');\n const isControlled = valueProp !== undefined;\n const value = isControlled ? valueProp : innerValue;\n\n const select = useCallback(\n (next: string) => {\n if (next === value) return;\n if (!isControlled) setInnerValue(next);\n onValueChange?.(next);\n },\n [value, isControlled, onValueChange],\n );\n\n const context = useMemo(\n () => ({ baseId, value, select, orientation, activation }),\n [baseId, value, select, orientation, activation],\n );\n\n return (\n <TabsContext.Provider value={context}>\n <div\n {...rest}\n ref={ref}\n className={cx(styles.root, className)}\n data-orientation={orientation}\n >\n {children}\n </div>\n </TabsContext.Provider>\n );\n});\n","import { forwardRef, type ComponentType, type HTMLAttributes, type RefAttributes } from 'react';\nimport { cx } from '../../utils/cx';\nimport styles from './Text.module.css';\n\nexport type TextElement = 'p' | 'span' | 'div' | 'small' | 'strong' | 'em';\nexport type TextSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\nexport type TextTone = 'default' | 'muted' | 'danger';\nexport type TextWeight = 'regular' | 'medium' | 'semibold' | 'bold';\n\nexport interface TextProps extends HTMLAttributes<HTMLElement> {\n /** The rendered element. Pick for meaning (`strong`, `em`), not for looks. */\n as?: TextElement;\n size?: TextSize;\n tone?: TextTone;\n weight?: TextWeight;\n}\n\n// The element is only known at runtime, so it is typed as one component that\n// accepts the props every supported element shares (including a ref to HTMLElement).\ntype TextComponent = ComponentType<HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>>;\n\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text(\n { as = 'p', size = 'md', tone = 'default', weight = 'regular', className, ...rest },\n ref,\n) {\n const Component = as as unknown as TextComponent;\n\n return (\n <Component\n {...rest}\n ref={ref}\n className={cx(styles.root, className)}\n data-size={size}\n data-tone={tone}\n data-weight={weight}\n />\n );\n});\n","export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';\n\nexport interface Size {\n width: number;\n height: number;\n}\n\nexport interface Viewport {\n width: number;\n height: number;\n}\n\nexport interface Rect {\n top: number;\n bottom: number;\n left: number;\n right: number;\n}\n\nexport interface Position {\n x: number;\n y: number;\n /** The side that was actually used, after flipping. */\n side: TooltipPlacement;\n}\n\nconst OPPOSITE: Record<TooltipPlacement, TooltipPlacement> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n};\n\n/**\n * Places a tooltip next to its trigger, in viewport coordinates (for `position: fixed`).\n *\n * - If the preferred side does not fit but the opposite one does, it flips.\n * - Along the other axis it is centered on the trigger, then pushed back inside the viewport.\n */\nexport function computePosition(\n trigger: Rect,\n tooltip: Size,\n viewport: Viewport,\n placement: TooltipPlacement,\n gap = 8,\n margin = 8,\n): Position {\n const fits: Record<TooltipPlacement, boolean> = {\n top: trigger.top - gap - tooltip.height >= margin,\n bottom: trigger.bottom + gap + tooltip.height <= viewport.height - margin,\n left: trigger.left - gap - tooltip.width >= margin,\n right: trigger.right + gap + tooltip.width <= viewport.width - margin,\n };\n\n const side = !fits[placement] && fits[OPPOSITE[placement]] ? OPPOSITE[placement] : placement;\n\n const clamp = (value: number, size: number, limit: number) =>\n Math.max(margin, Math.min(value, limit - margin - size));\n\n const centerX = (trigger.left + trigger.right) / 2 - tooltip.width / 2;\n const centerY = (trigger.top + trigger.bottom) / 2 - tooltip.height / 2;\n\n switch (side) {\n case 'top':\n return {\n side,\n x: clamp(centerX, tooltip.width, viewport.width),\n y: trigger.top - gap - tooltip.height,\n };\n case 'bottom':\n return {\n side,\n x: clamp(centerX, tooltip.width, viewport.width),\n y: trigger.bottom + gap,\n };\n case 'left':\n return {\n side,\n x: trigger.left - gap - tooltip.width,\n y: clamp(centerY, tooltip.height, viewport.height),\n };\n case 'right':\n return {\n side,\n x: trigger.right + gap,\n y: clamp(centerY, tooltip.height, viewport.height),\n };\n }\n}\n","import {\n Children,\n cloneElement,\n isValidElement,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type FocusEventHandler,\n type KeyboardEventHandler,\n type MouseEventHandler,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cx } from '../../utils/cx';\nimport { computePosition, type TooltipPlacement } from './position';\nimport styles from './Tooltip.module.css';\n\n// useLayoutEffect warns during server rendering in React 18; positioning only matters in the browser.\nconst useIsomorphicLayoutEffect = typeof document === 'undefined' ? useEffect : useLayoutEffect;\n\n/** The props Tooltip adds to its trigger element. */\ninterface TriggerProps {\n onMouseEnter?: MouseEventHandler<Element>;\n onMouseLeave?: MouseEventHandler<Element>;\n onFocus?: FocusEventHandler<Element>;\n onBlur?: FocusEventHandler<Element>;\n onKeyDown?: KeyboardEventHandler<Element>;\n 'aria-describedby'?: string;\n}\n\nexport interface TooltipProps {\n /** Short, plain text. A tooltip cannot contain anything interactive. */\n content: ReactNode;\n /** The one element that triggers the tooltip. It must be able to take focus. */\n children: ReactElement<TriggerProps>;\n /** Preferred side. It flips to the opposite side when there is no room. */\n placement?: TooltipPlacement;\n /** Delay before it opens on hover, in milliseconds. Focus opens it immediately. */\n openDelay?: number;\n /** Grace period to move the pointer onto the tooltip before it closes, in milliseconds. */\n closeDelay?: number;\n /** Render only the trigger. */\n disabled?: boolean;\n className?: string;\n}\n\n/**\n * A short text hint for a control, shown on hover and keyboard focus. It describes the\n * trigger (`aria-describedby`), it does not name it: icon-only buttons still need an\n * accessible name of their own.\n *\n * It follows WCAG 1.4.13: Esc dismisses it, the pointer can move onto it without it\n * closing, and it stays until the user leaves or dismisses it. It is drawn in the browser's\n * top layer with the Popover API, so no ancestor can clip it.\n */\nexport function Tooltip({\n content,\n children,\n placement = 'top',\n openDelay = 300,\n closeDelay = 100,\n disabled = false,\n className,\n}: TooltipProps) {\n const id = useId();\n const [open, setOpen] = useState(false);\n const triggerRef = useRef<Element | null>(null);\n const tooltipRef = useRef<HTMLSpanElement | null>(null);\n const timerRef = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n const clearTimer = () => {\n clearTimeout(timerRef.current);\n timerRef.current = undefined;\n };\n\n const show = (trigger: Element, delay: number) => {\n triggerRef.current = trigger;\n clearTimer();\n if (delay > 0) {\n timerRef.current = setTimeout(() => setOpen(true), delay);\n } else {\n setOpen(true);\n }\n };\n\n const hide = (delay: number) => {\n clearTimer();\n if (delay > 0) {\n timerRef.current = setTimeout(() => setOpen(false), delay);\n } else {\n setOpen(false);\n }\n };\n\n useEffect(() => clearTimer, []);\n\n // Turn a closed tooltip off when it becomes disabled.\n useEffect(() => {\n if (disabled) {\n clearTimer();\n setOpen(false);\n }\n }, [disabled]);\n\n useIsomorphicLayoutEffect(() => {\n const tooltip = tooltipRef.current;\n if (!tooltip || !open) return;\n\n const place = () => {\n const trigger = triggerRef.current;\n if (!trigger) return;\n const { x, y, side } = computePosition(\n trigger.getBoundingClientRect(),\n { width: tooltip.offsetWidth, height: tooltip.offsetHeight },\n {\n width: document.documentElement.clientWidth,\n height: document.documentElement.clientHeight,\n },\n placement,\n );\n tooltip.style.left = `${x}px`;\n tooltip.style.top = `${y}px`;\n tooltip.dataset.placement = side;\n };\n\n // Without the Popover API the element still shows through the `data-open` style.\n let shown = false;\n if (typeof tooltip.showPopover === 'function') {\n tooltip.showPopover();\n shown = true;\n }\n place();\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') return;\n // The tooltip is the topmost thing, so Esc dismisses it first and goes no further.\n event.preventDefault();\n event.stopPropagation();\n setOpen(false);\n };\n\n // Capture so scrolling inside any ancestor moves the tooltip with its trigger.\n window.addEventListener('scroll', place, true);\n window.addEventListener('resize', place);\n document.addEventListener('keydown', onKeyDown, true);\n\n return () => {\n window.removeEventListener('scroll', place, true);\n window.removeEventListener('resize', place);\n document.removeEventListener('keydown', onKeyDown, true);\n if (shown) tooltip.hidePopover();\n };\n }, [open, placement]);\n\n const trigger = Children.only(children);\n if (!isValidElement<TriggerProps>(trigger)) return <>{children}</>;\n if (disabled) return trigger;\n\n const own = trigger.props;\n const describedBy = [own['aria-describedby'], id].filter(Boolean).join(' ');\n\n const enhanced = cloneElement(trigger, {\n 'aria-describedby': describedBy,\n onMouseEnter: (event) => {\n own.onMouseEnter?.(event);\n show(event.currentTarget, openDelay);\n },\n onMouseLeave: (event) => {\n own.onMouseLeave?.(event);\n hide(closeDelay);\n },\n onFocus: (event) => {\n own.onFocus?.(event);\n // Skip focus caused by a mouse click; hover already handles that case.\n let visible = true;\n try {\n visible = event.currentTarget.matches(':focus-visible');\n } catch {\n // Browsers without :focus-visible: treat every focus as keyboard focus.\n }\n if (visible) show(event.currentTarget, 0);\n },\n onBlur: (event) => {\n own.onBlur?.(event);\n hide(0);\n },\n });\n\n return (\n <>\n {enhanced}\n <span\n ref={tooltipRef}\n id={id}\n role=\"tooltip\"\n popover=\"manual\"\n className={cx(styles.root, className)}\n data-open={open ? '' : undefined}\n data-placement={placement}\n onMouseEnter={clearTimer}\n onMouseLeave={() => hide(closeDelay)}\n >\n {content}\n </span>\n </>\n );\n}\n"],"names":["cx","values","Button","forwardRef","variant","size","loading","type","disabled","className","children","rest","ref","jsxs","styles","Checkbox","indeterminate","invalid","inputRef","useRef","setRefs","useCallback","node","useEffect","jsx","DEFAULT_SIZE","Heading","level","tone","Component","scrollLocks","previousOverflow","lockScroll","unlockScroll","Dialog","open","onClose","title","description","actions","closeOnBackdropClick","closeLabel","initialFocusRef","keepMounted","forwardedRef","baseId","useId","titleId","descriptionId","dialogRef","onCloseRef","openRef","closeOnBackdropClickRef","mounted","dialog","returnFocusTo","current","focusLost","handleCancel","event","handleClose","pressedOnBackdrop","handleMouseDown","handleClick","shouldClose","FieldContext","createContext","useFieldContext","useContext","hasContent","Field","label","error","required","controlId","errorId","hasDescription","hasError","describedBy","Input","id","ariaDescribedBy","field","isInvalid","Select","placeholder","value","defaultValue","isDisabled","selection","Stack","as","direction","gap","align","justify","wrap","style","mergedStyle","Switch","TabsContext","useTabsContext","consumer","context","getTabId","getPanelId","Tab","onClick","onFocus","onKeyDown","selectedValue","select","orientation","activation","selected","handleFocus","handleKeyDown","list","tabs","rtl","previousKey","nextKey","target","TabList","TabPanel","Tabs","valueProp","onValueChange","innerValue","setInnerValue","useState","isControlled","next","useMemo","Text","weight","OPPOSITE","computePosition","trigger","tooltip","viewport","placement","margin","fits","side","clamp","limit","centerX","centerY","useIsomorphicLayoutEffect","useLayoutEffect","Tooltip","content","openDelay","closeDelay","setOpen","triggerRef","tooltipRef","timerRef","clearTimer","show","delay","hide","place","x","y","shown","Children","isValidElement","own","enhanced","cloneElement","visible","Fragment"],"mappings":";;;AAGO,SAASA,KAAMC,GAA8B;AAClD,SAAOA,EAAO,OAAO,OAAO,EAAE,KAAK,GAAG;AACxC;;;;GCeaC,KAASC,EAA2C,SAC/D;AAAA,EACE,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,KAAAC;AAAA,MACA,MAAAL;AAAA,MACA,WAAWP,EAAGc,EAAO,MAAML,CAAS;AAAA,MACpC,gBAAcL;AAAA,MACd,aAA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AAAA,QACpC,aAAW0B,IAAO,KAAK;AAAA,QACvB,kBAAgB0G;AAAA,QAChB,cAAckB;AAAA,QACd,cAAc,MAAMG,EAAKR,CAAU;AAAA,QAElC,UAAAF;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ;"}
@@ -0,0 +1 @@
1
+ .maru-Button-module__root__Q2R8-{--button-bg: var(--maru-color-action-bg);--button-bg-hover: var(--maru-color-action-bg-hover);--button-bg-active: var(--maru-color-action-bg-active);--button-fg: var(--maru-color-action-fg);--button-border: transparent;--button-height: 2.5rem;--button-padding-x: var(--maru-space-4);--button-font-size: var(--maru-font-size-md);display:inline-flex;align-items:center;justify-content:center;gap:var(--maru-space-2);box-sizing:border-box;min-height:var(--button-height);padding-block:0;padding-inline:var(--button-padding-x);border:1px solid var(--button-border);border-radius:var(--maru-radius-md);background:var(--button-bg);color:var(--button-fg);font:inherit;font-size:var(--button-font-size);font-weight:var(--maru-font-weight-medium);line-height:var(--maru-font-line-height-tight);white-space:nowrap;cursor:pointer;transition:background-color var(--maru-motion-duration-fast) var(--maru-motion-easing-standard)}.maru-Button-module__root__Q2R8-[data-size=sm]{--button-height: 2rem;--button-padding-x: var(--maru-space-3);--button-font-size: var(--maru-font-size-sm)}.maru-Button-module__root__Q2R8-[data-size=lg]{--button-height: 3rem;--button-padding-x: var(--maru-space-6);--button-font-size: var(--maru-font-size-lg)}.maru-Button-module__root__Q2R8-[data-variant=secondary]{--button-bg: var(--maru-color-neutral-bg);--button-bg-hover: var(--maru-color-neutral-bg-hover);--button-bg-active: var(--maru-color-neutral-bg-active);--button-fg: var(--maru-color-neutral-fg);--button-border: var(--maru-color-border-strong)}.maru-Button-module__root__Q2R8-[data-variant=ghost]{--button-bg: transparent;--button-bg-hover: var(--maru-color-action-ghost-bg-hover);--button-bg-active: var(--maru-color-action-ghost-bg-active);--button-fg: var(--maru-color-action-text)}.maru-Button-module__root__Q2R8-[data-variant=danger]{--button-bg: var(--maru-color-danger-bg);--button-bg-hover: var(--maru-color-danger-bg-hover);--button-bg-active: var(--maru-color-danger-bg-active);--button-fg: var(--maru-color-danger-fg)}.maru-Button-module__root__Q2R8-:not(:disabled):hover{background:var(--button-bg-hover)}.maru-Button-module__root__Q2R8-:not(:disabled):active{background:var(--button-bg-active)}.maru-Button-module__root__Q2R8-:focus-visible{outline:var(--maru-focus-ring-width) solid var(--maru-color-focus-ring);outline-offset:var(--maru-focus-ring-offset)}.maru-Button-module__root__Q2R8-:disabled{opacity:.5;cursor:not-allowed}.maru-Button-module__root__Q2R8-[data-loading]:disabled{opacity:.8;cursor:progress}.maru-Button-module__spinner__ZExvW{width:1em;height:1em;box-sizing:border-box;border:2px solid currentColor;border-inline-end-color:transparent;border-radius:50%;animation:maru-Button-module__spin__JvkZu .7s linear infinite}@keyframes maru-Button-module__spin__JvkZu{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.maru-Button-module__spinner__ZExvW{animation-duration:2.4s}}@media(forced-colors:active){.maru-Button-module__root__Q2R8-{border-color:ButtonText}.maru-Button-module__root__Q2R8-:disabled{border-color:GrayText}}.maru-Checkbox-module__root__mY3qk{--checkbox-size: 1.25rem;--checkbox-font-size: var(--maru-font-size-md);display:inline-flex;align-items:center;gap:var(--maru-space-2);color:var(--maru-color-text-default);font-family:var(--maru-font-family-sans);font-size:var(--checkbox-font-size);line-height:var(--maru-font-line-height-tight);cursor:pointer}.maru-Checkbox-module__root__mY3qk[data-size=sm]{--checkbox-size: 1rem;--checkbox-font-size: var(--maru-font-size-sm)}.maru-Checkbox-module__root__mY3qk[data-size=lg]{--checkbox-size: 1.5rem;--checkbox-font-size: var(--maru-font-size-lg)}.maru-Checkbox-module__control__PxoNk{position:relative;display:inline-flex;flex:none}.maru-Checkbox-module__input__2kt-h{position:absolute;z-index:1;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.maru-Checkbox-module__box__OCPee{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--checkbox-size);height:var(--checkbox-size);border:1px solid var(--maru-color-border-strong);border-radius:var(--maru-radius-sm);background:var(--maru-color-bg-default);color:var(--maru-color-action-fg);transition:background-color var(--maru-motion-duration-fast) var(--maru-motion-easing-standard),border-color var(--maru-motion-duration-fast) var(--maru-motion-easing-standard)}.maru-Checkbox-module__input__2kt-h:checked+.maru-Checkbox-module__box__OCPee:after{content:"";box-sizing:border-box;width:28%;height:56%;margin-block-end:8%;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg)}.maru-Checkbox-module__input__2kt-h:indeterminate+.maru-Checkbox-module__box__OCPee:after{content:"";box-sizing:border-box;width:56%;height:0;margin:0;border:solid currentColor;border-width:0 0 2px;transform:none}.maru-Checkbox-module__input__2kt-h:checked+.maru-Checkbox-module__box__OCPee,.maru-Checkbox-module__input__2kt-h:indeterminate+.maru-Checkbox-module__box__OCPee{border-color:var(--maru-color-action-bg);background:var(--maru-color-action-bg)}.maru-Checkbox-module__root__mY3qk:not([data-disabled]):hover .maru-Checkbox-module__input__2kt-h:not(:checked):not(:indeterminate)+.maru-Checkbox-module__box__OCPee{border-color:var(--maru-color-text-default)}.maru-Checkbox-module__root__mY3qk:not([data-disabled]):hover .maru-Checkbox-module__input__2kt-h:checked+.maru-Checkbox-module__box__OCPee,.maru-Checkbox-module__root__mY3qk:not([data-disabled]):hover .maru-Checkbox-module__input__2kt-h:indeterminate+.maru-Checkbox-module__box__OCPee{border-color:var(--maru-color-action-bg-hover);background:var(--maru-color-action-bg-hover)}.maru-Checkbox-module__input__2kt-h[data-invalid]+.maru-Checkbox-module__box__OCPee,.maru-Checkbox-module__root__mY3qk:not([data-disabled]):hover .maru-Checkbox-module__input__2kt-h[data-invalid]:not(:checked):not(:indeterminate)+.maru-Checkbox-module__box__OCPee{border-color:var(--maru-color-text-danger)}.maru-Checkbox-module__input__2kt-h:focus-visible+.maru-Checkbox-module__box__OCPee{outline:var(--maru-focus-ring-width) solid var(--maru-color-focus-ring);outline-offset:var(--maru-focus-ring-offset)}.maru-Checkbox-module__root__mY3qk[data-disabled]{opacity:.5;cursor:not-allowed}@media(forced-colors:active){.maru-Checkbox-module__box__OCPee{border-color:ButtonText;background:Canvas;color:HighlightText}.maru-Checkbox-module__input__2kt-h:checked+.maru-Checkbox-module__box__OCPee,.maru-Checkbox-module__input__2kt-h:indeterminate+.maru-Checkbox-module__box__OCPee{border-color:Highlight;background:Highlight}.maru-Checkbox-module__input__2kt-h[data-invalid]+.maru-Checkbox-module__box__OCPee{border-color:ButtonText;border-width:3px}.maru-Checkbox-module__root__mY3qk[data-disabled] .maru-Checkbox-module__box__OCPee{border-color:GrayText}}.maru-Heading-module__root__-To4U{margin:0;color:var(--maru-color-text-default);font-family:inherit;font-size:var(--maru-font-size-xl);font-weight:var(--maru-font-weight-semibold);line-height:var(--maru-font-line-height-tight)}.maru-Heading-module__root__-To4U[data-tone=muted]{color:var(--maru-color-text-muted)}.maru-Heading-module__root__-To4U[data-size=xs]{font-size:var(--maru-font-size-xs)}.maru-Heading-module__root__-To4U[data-size=sm]{font-size:var(--maru-font-size-sm)}.maru-Heading-module__root__-To4U[data-size=md]{font-size:var(--maru-font-size-md)}.maru-Heading-module__root__-To4U[data-size=lg]{font-size:var(--maru-font-size-lg)}.maru-Heading-module__root__-To4U[data-size=xl]{font-size:var(--maru-font-size-xl)}.maru-Heading-module__root__-To4U[data-size="2xl"]{font-size:var(--maru-font-size-2xl)}.maru-Heading-module__root__-To4U[data-size="3xl"]{font-size:var(--maru-font-size-3xl)}.maru-Heading-module__root__-To4U[data-size="4xl"]{font-size:var(--maru-font-size-4xl)}.maru-Dialog-module__root__tvkOF{--dialog-width: 32rem;--dialog-padding: var(--maru-space-6);box-sizing:border-box;width:min(var(--dialog-width),calc(100vw - 2 * var(--maru-space-4)));max-width:none;max-height:calc(100dvh - 2 * var(--maru-space-4));margin:auto;padding:0;border:0;background:transparent;color:var(--maru-color-text-default);overflow:visible}.maru-Dialog-module__root__tvkOF[data-size=sm]{--dialog-width: 24rem}.maru-Dialog-module__root__tvkOF[data-size=lg]{--dialog-width: 48rem}.maru-Dialog-module__root__tvkOF::backdrop{background:var(--maru-color-overlay-bg)}.maru-Dialog-module__panel__b2y0S{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:var(--maru-space-4);max-height:calc(100dvh - 2 * var(--maru-space-4));padding:var(--dialog-padding);border:1px solid var(--maru-color-border-default);border-radius:var(--maru-radius-lg);background:var(--maru-color-bg-default);box-shadow:var(--maru-shadow-lg)}.maru-Dialog-module__header__bdJRp{display:flex;flex-direction:column;gap:var(--maru-space-2);padding-inline-end:var(--maru-space-8)}.maru-Dialog-module__title__glVA6{margin:0}.maru-Dialog-module__description__6Bsa9{margin:0;color:var(--maru-color-text-muted);font-size:var(--maru-font-size-md);line-height:var(--maru-font-line-height-normal)}.maru-Dialog-module__body__1ZbVo{--dialog-ring-room: calc(var(--maru-focus-ring-width) + var(--maru-focus-ring-offset));min-height:0;margin:calc(-1 * var(--dialog-ring-room));padding:var(--dialog-ring-room);overflow-y:auto}.maru-Dialog-module__actions__JRD2K{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--maru-space-2)}.maru-Dialog-module__close__Zz2uv{position:absolute;inset-block-start:var(--maru-space-3);inset-inline-end:var(--maru-space-3);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:2rem;height:2rem;padding:0;border:0;border-radius:var(--maru-radius-md);background:transparent;color:var(--maru-color-text-muted);cursor:pointer;transition:background-color var(--maru-motion-duration-fast) var(--maru-motion-easing-standard)}.maru-Dialog-module__close__Zz2uv:hover{background:var(--maru-color-bg-subtle);color:var(--maru-color-text-default)}.maru-Dialog-module__close__Zz2uv:focus-visible{outline:2px solid var(--maru-color-focus-ring);outline-offset:2px}@media(prefers-reduced-motion:no-preference){.maru-Dialog-module__root__tvkOF[open]{animation:maru-Dialog-module__dialog-in__w80Pj .16s var(--maru-motion-easing-standard)}.maru-Dialog-module__root__tvkOF[open]::backdrop{animation:maru-Dialog-module__dialog-fade__z-32m .16s var(--maru-motion-easing-standard)}}@keyframes maru-Dialog-module__dialog-in__w80Pj{0%{opacity:0;transform:translateY(8px) scale(.98)}}@keyframes maru-Dialog-module__dialog-fade__z-32m{0%{opacity:0}}@media(forced-colors:active){.maru-Dialog-module__root__tvkOF::backdrop{background:transparent}.maru-Dialog-module__panel__b2y0S{border:2px solid CanvasText;box-shadow:none}.maru-Dialog-module__close__Zz2uv{border:1px solid ButtonText}}.maru-Field-module__root__OOI9-{display:flex;flex-direction:column;gap:var(--maru-space-1);font-family:var(--maru-font-family-sans)}.maru-Field-module__label__LAQio{color:var(--maru-color-text-default);font-size:var(--maru-font-size-sm);font-weight:var(--maru-font-weight-medium);line-height:var(--maru-font-line-height-tight)}.maru-Field-module__required__8HCWC{color:var(--maru-color-text-danger)}.maru-Field-module__description__yqljW,.maru-Field-module__error__m0uol{margin:0;font-size:var(--maru-font-size-sm);line-height:var(--maru-font-line-height-normal)}.maru-Field-module__description__yqljW{color:var(--maru-color-text-muted)}.maru-Field-module__error__m0uol{color:var(--maru-color-text-danger);font-weight:var(--maru-font-weight-medium)}.maru-Input-module__root__KgYPo{--input-border: var(--maru-color-border-strong);--input-height: 2.5rem;--input-padding-x: var(--maru-space-3);--input-font-size: var(--maru-font-size-md);box-sizing:border-box;width:100%;min-height:var(--input-height);padding-block:0;padding-inline:var(--input-padding-x);border:1px solid var(--input-border);border-radius:var(--maru-radius-md);background:var(--maru-color-bg-default);color:var(--maru-color-text-default);font:inherit;font-size:var(--input-font-size);line-height:var(--maru-font-line-height-tight);transition:border-color var(--maru-motion-duration-fast) var(--maru-motion-easing-standard)}.maru-Input-module__root__KgYPo[data-size=sm]{--input-height: 2rem;--input-padding-x: var(--maru-space-2);--input-font-size: var(--maru-font-size-sm)}.maru-Input-module__root__KgYPo[data-size=lg]{--input-height: 3rem;--input-padding-x: var(--maru-space-4);--input-font-size: var(--maru-font-size-lg)}.maru-Input-module__root__KgYPo::placeholder{color:var(--maru-color-text-muted)}.maru-Input-module__root__KgYPo:not(:disabled):hover{--input-border: var(--maru-color-text-default)}.maru-Input-module__root__KgYPo[data-invalid],.maru-Input-module__root__KgYPo[data-invalid]:not(:disabled):hover{--input-border: var(--maru-color-text-danger)}.maru-Input-module__root__KgYPo:focus-visible{outline:var(--maru-focus-ring-width) solid var(--maru-color-focus-ring);outline-offset:var(--maru-focus-ring-offset)}.maru-Input-module__root__KgYPo:disabled{background:var(--maru-color-bg-subtle);opacity:.5;cursor:not-allowed}@media(forced-colors:active){.maru-Input-module__root__KgYPo{border-color:FieldText}.maru-Input-module__root__KgYPo:disabled{border-color:GrayText}}.maru-Select-module__wrapper__KS2K3{--select-height: 2.5rem;--select-padding-x: var(--maru-space-3);--select-font-size: var(--maru-font-size-md);--select-border: var(--maru-color-border-strong);position:relative;display:block;width:100%}.maru-Select-module__wrapper__KS2K3[data-size=sm]{--select-height: 2rem;--select-padding-x: var(--maru-space-2);--select-font-size: var(--maru-font-size-sm)}.maru-Select-module__wrapper__KS2K3[data-size=lg]{--select-height: 3rem;--select-padding-x: var(--maru-space-4);--select-font-size: var(--maru-font-size-lg)}.maru-Select-module__root__y0u6b{appearance:none;box-sizing:border-box;display:block;width:100%;min-height:var(--select-height);padding-block:0;padding-inline-start:var(--select-padding-x);padding-inline-end:calc(var(--select-padding-x) + 1.5rem);border:1px solid var(--select-border);border-radius:var(--maru-radius-md);background:var(--maru-color-bg-default);color:var(--maru-color-text-default);font:inherit;font-size:var(--select-font-size);line-height:var(--maru-font-line-height-tight);text-overflow:ellipsis;cursor:pointer;transition:border-color var(--maru-motion-duration-fast) var(--maru-motion-easing-standard)}.maru-Select-module__root__y0u6b option,.maru-Select-module__root__y0u6b optgroup{background:var(--maru-color-bg-default);color:var(--maru-color-text-default)}.maru-Select-module__root__y0u6b:has(option[value=""]:checked){color:var(--maru-color-text-muted)}.maru-Select-module__root__y0u6b:not(:disabled):hover{--select-border: var(--maru-color-text-default)}.maru-Select-module__root__y0u6b[data-invalid],.maru-Select-module__root__y0u6b[data-invalid]:not(:disabled):hover{--select-border: var(--maru-color-text-danger)}.maru-Select-module__root__y0u6b:focus-visible{outline:var(--maru-focus-ring-width) solid var(--maru-color-focus-ring);outline-offset:var(--maru-focus-ring-offset)}.maru-Select-module__root__y0u6b:disabled{background:var(--maru-color-bg-subtle);opacity:.5;cursor:not-allowed}.maru-Select-module__chevron__PLUsh{position:absolute;inset-block:0;inset-inline-end:var(--select-padding-x);width:1rem;height:100%;color:var(--maru-color-text-muted);pointer-events:none}.maru-Select-module__wrapper__KS2K3[data-disabled] .maru-Select-module__chevron__PLUsh{opacity:.5}@media(forced-colors:active){.maru-Select-module__root__y0u6b{border-color:FieldText}.maru-Select-module__root__y0u6b:disabled{border-color:GrayText}.maru-Select-module__chevron__PLUsh{color:FieldText}.maru-Select-module__wrapper__KS2K3[data-disabled] .maru-Select-module__chevron__PLUsh{color:GrayText}}.maru-Stack-module__root__NUN-x{display:flex;flex-direction:column;gap:var(--maru-stack-gap, var(--maru-space-4))}.maru-Stack-module__root__NUN-x[data-direction=horizontal]{flex-direction:row}.maru-Stack-module__root__NUN-x[data-wrap]{flex-wrap:wrap}.maru-Stack-module__root__NUN-x[data-align=start]{align-items:flex-start}.maru-Stack-module__root__NUN-x[data-align=center]{align-items:center}.maru-Stack-module__root__NUN-x[data-align=end]{align-items:flex-end}.maru-Stack-module__root__NUN-x[data-align=stretch]{align-items:stretch}.maru-Stack-module__root__NUN-x[data-justify=start]{justify-content:flex-start}.maru-Stack-module__root__NUN-x[data-justify=center]{justify-content:center}.maru-Stack-module__root__NUN-x[data-justify=end]{justify-content:flex-end}.maru-Stack-module__root__NUN-x[data-justify=between]{justify-content:space-between}.maru-Switch-module__root__Y5Ydi{--switch-height: 1.5rem;--switch-width: 2.75rem;--switch-padding: 2px;--switch-font-size: var(--maru-font-size-md);display:inline-flex;align-items:center;gap:var(--maru-space-3);color:var(--maru-color-text-default);font-family:var(--maru-font-family-sans);font-size:var(--switch-font-size);line-height:var(--maru-font-line-height-tight);cursor:pointer}.maru-Switch-module__root__Y5Ydi[data-size=sm]{--switch-height: 1.25rem;--switch-width: 2.25rem;--switch-font-size: var(--maru-font-size-sm)}.maru-Switch-module__root__Y5Ydi[data-size=lg]{--switch-height: 1.75rem;--switch-width: 3.25rem;--switch-font-size: var(--maru-font-size-lg)}.maru-Switch-module__control__HV3vX{position:relative;display:inline-flex;flex:none}.maru-Switch-module__input__5BPNu{position:absolute;z-index:1;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}.maru-Switch-module__track__7ObdZ{--switch-thumb: calc(var(--switch-height) - 2 * var(--switch-padding) - 2px);display:inline-flex;align-items:center;box-sizing:border-box;width:var(--switch-width);height:var(--switch-height);padding-inline:var(--switch-padding);border:1px solid var(--maru-color-border-strong);border-radius:var(--maru-radius-full);background:var(--maru-color-border-strong);transition:background-color var(--maru-motion-duration-fast) var(--maru-motion-easing-standard),border-color var(--maru-motion-duration-fast) var(--maru-motion-easing-standard)}.maru-Switch-module__track__7ObdZ:after{content:"";width:var(--switch-thumb);height:var(--switch-thumb);border-radius:var(--maru-radius-full);background:var(--maru-color-bg-default);transition:transform var(--maru-motion-duration-fast) var(--maru-motion-easing-standard)}.maru-Switch-module__input__5BPNu:checked+.maru-Switch-module__track__7ObdZ{border-color:var(--maru-color-action-bg);background:var(--maru-color-action-bg)}.maru-Switch-module__input__5BPNu:checked+.maru-Switch-module__track__7ObdZ:after{transform:translate(calc(var(--switch-width) - var(--switch-thumb) - 2 * var(--switch-padding) - 2px))}.maru-Switch-module__root__Y5Ydi:not([data-disabled]):hover .maru-Switch-module__input__5BPNu:checked+.maru-Switch-module__track__7ObdZ{border-color:var(--maru-color-action-bg-hover);background:var(--maru-color-action-bg-hover)}.maru-Switch-module__input__5BPNu:focus-visible+.maru-Switch-module__track__7ObdZ{outline:var(--maru-focus-ring-width) solid var(--maru-color-focus-ring);outline-offset:var(--maru-focus-ring-offset)}.maru-Switch-module__root__Y5Ydi[data-disabled]{opacity:.5;cursor:not-allowed}@media(prefers-reduced-motion:reduce){.maru-Switch-module__track__7ObdZ,.maru-Switch-module__track__7ObdZ:after{transition:none}}@media(forced-colors:active){.maru-Switch-module__track__7ObdZ{border-color:ButtonText;background:Canvas}.maru-Switch-module__track__7ObdZ:after{background:ButtonText}.maru-Switch-module__input__5BPNu:checked+.maru-Switch-module__track__7ObdZ{border-color:Highlight;background:Highlight}.maru-Switch-module__input__5BPNu:checked+.maru-Switch-module__track__7ObdZ:after{background:HighlightText}.maru-Switch-module__root__Y5Ydi[data-disabled] .maru-Switch-module__track__7ObdZ{border-color:GrayText}}.maru-Tabs-module__root__-VKVI{font-family:var(--maru-font-family-sans);color:var(--maru-color-text-default)}.maru-Tabs-module__root__-VKVI[data-orientation=vertical]{display:flex;gap:var(--maru-space-6)}.maru-Tabs-module__list__qRVME{display:flex;border-bottom:1px solid var(--maru-color-border-default)}.maru-Tabs-module__list__qRVME[data-orientation=vertical]{flex-direction:column;flex:none;border-bottom:0;border-inline-end:1px solid var(--maru-color-border-default)}.maru-Tabs-module__tab__IdDYc{--tab-fg: var(--maru-color-text-muted);--tab-indicator: transparent;display:inline-flex;align-items:center;box-sizing:border-box;min-height:2.5rem;margin:0 0 -1px;padding-block:0;padding-inline:var(--maru-space-4);border:0;border-bottom:2px solid var(--tab-indicator);background:transparent;color:var(--tab-fg);font:inherit;font-size:var(--maru-font-size-md);font-weight:var(--maru-font-weight-medium);line-height:var(--maru-font-line-height-tight);white-space:nowrap;cursor:pointer;transition:color var(--maru-motion-duration-fast) var(--maru-motion-easing-standard)}.maru-Tabs-module__tab__IdDYc[data-orientation=vertical]{justify-content:flex-start;margin:0 -1px 0 0;border-bottom:0;border-inline-end:2px solid var(--tab-indicator)}.maru-Tabs-module__tab__IdDYc:not(:disabled):hover{--tab-fg: var(--maru-color-text-default)}.maru-Tabs-module__tab__IdDYc[data-selected]{--tab-fg: var(--maru-color-text-default);--tab-indicator: var(--maru-color-action-bg)}.maru-Tabs-module__tab__IdDYc:focus-visible,.maru-Tabs-module__panel__08i9c:focus-visible{outline:var(--maru-focus-ring-width) solid var(--maru-color-focus-ring);outline-offset:var(--maru-focus-ring-offset)}.maru-Tabs-module__tab__IdDYc:disabled{opacity:.5;cursor:not-allowed}.maru-Tabs-module__panel__08i9c{padding-block:var(--maru-space-4)}.maru-Tabs-module__root__-VKVI[data-orientation=vertical] .maru-Tabs-module__panel__08i9c{padding-block:0}@media(prefers-reduced-motion:reduce){.maru-Tabs-module__tab__IdDYc{transition:none}}@media(forced-colors:active){.maru-Tabs-module__tab__IdDYc{--tab-indicator: Canvas;margin-bottom:0}.maru-Tabs-module__tab__IdDYc[data-orientation=vertical]{margin-inline-end:0}.maru-Tabs-module__tab__IdDYc[data-selected]{--tab-indicator: Highlight}.maru-Tabs-module__tab__IdDYc:disabled{color:GrayText}}.maru-Text-module__root__rsBo7{margin:0;color:var(--maru-color-text-default);font-family:inherit;font-size:var(--maru-font-size-md);font-weight:var(--maru-font-weight-regular);line-height:var(--maru-font-line-height-normal)}.maru-Text-module__root__rsBo7[data-size=xs]{font-size:var(--maru-font-size-xs)}.maru-Text-module__root__rsBo7[data-size=sm]{font-size:var(--maru-font-size-sm)}.maru-Text-module__root__rsBo7[data-size=md]{font-size:var(--maru-font-size-md)}.maru-Text-module__root__rsBo7[data-size=lg]{font-size:var(--maru-font-size-lg)}.maru-Text-module__root__rsBo7[data-size=xl]{font-size:var(--maru-font-size-xl)}.maru-Text-module__root__rsBo7[data-tone=muted]{color:var(--maru-color-text-muted)}.maru-Text-module__root__rsBo7[data-tone=danger]{color:var(--maru-color-text-danger)}.maru-Text-module__root__rsBo7[data-weight=regular]{font-weight:var(--maru-font-weight-regular)}.maru-Text-module__root__rsBo7[data-weight=medium]{font-weight:var(--maru-font-weight-medium)}.maru-Text-module__root__rsBo7[data-weight=semibold]{font-weight:var(--maru-font-weight-semibold)}.maru-Text-module__root__rsBo7[data-weight=bold]{font-weight:var(--maru-font-weight-bold)}.maru-Tooltip-module__root__U84l8{position:fixed;inset:auto;margin:0;box-sizing:border-box;display:none;max-width:min(20rem,calc(100vw - 2 * var(--maru-space-2)));padding:var(--maru-space-1) var(--maru-space-2);border:0;border-radius:var(--maru-radius-md);background:var(--maru-color-text-default);color:var(--maru-color-bg-default);font-size:var(--maru-font-size-sm);line-height:var(--maru-font-line-height-normal);overflow:visible;overflow-wrap:anywhere;pointer-events:auto}.maru-Tooltip-module__root__U84l8[data-open]{display:block}@media(prefers-reduced-motion:no-preference){.maru-Tooltip-module__root__U84l8[data-open]{animation:maru-Tooltip-module__tooltip-in__mJXdG .12s var(--maru-motion-easing-standard)}}@keyframes maru-Tooltip-module__tooltip-in__mJXdG{0%{opacity:0}}@media(forced-colors:active){.maru-Tooltip-module__root__U84l8{border:1px solid CanvasText;background:Canvas;color:CanvasText}}
@@ -0,0 +1,4 @@
1
+ type ClassValue = string | false | null | undefined;
2
+ /** Join class names, skipping falsy values. */
3
+ export declare function cx(...values: ClassValue[]): string;
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,65 @@
1
1
  {
2
2
  "name": "@ohseungik/maru-ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "Accessible React components for Maru UI.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "keywords": [
8
+ "react",
9
+ "design-system",
10
+ "components",
11
+ "accessibility",
12
+ "typescript"
13
+ ],
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/ohseungik/Maru-UI.git",
17
+ "directory": "packages/components"
18
+ },
19
+ "homepage": "https://ohseungik.github.io/Maru-UI/",
20
+ "bugs": {
21
+ "url": "https://github.com/ohseungik/Maru-UI/issues"
22
+ },
23
+ "sideEffects": [
24
+ "**/*.css"
25
+ ],
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.js"
33
+ },
34
+ "./styles.css": "./dist/styles.css",
35
+ "./package.json": "./package.json"
36
+ },
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
40
+ "peerDependencies": {
41
+ "@ohseungik/maru-tokens": ">=0.1.0",
42
+ "react": ">=18"
43
+ },
44
+ "devDependencies": {
45
+ "@testing-library/dom": "^10.4.0",
46
+ "@testing-library/jest-dom": "^6.6.3",
47
+ "@testing-library/react": "^16.3.0",
48
+ "@testing-library/user-event": "^14.6.1",
49
+ "@types/react": "^19.1.0",
50
+ "@types/react-dom": "^19.1.0",
51
+ "axe-core": "^4.10.3",
52
+ "jsdom": "^26.1.0",
53
+ "react": "^19.1.0",
54
+ "react-dom": "^19.1.0",
55
+ "typescript": "~5.9.0",
56
+ "vite": "^7.0.0",
57
+ "vitest": "^3.2.4",
58
+ "@ohseungik/maru-tokens": "0.1.0"
59
+ },
60
+ "scripts": {
61
+ "build": "vite build && tsc -p tsconfig.build.json && node scripts/verify-build.mjs",
62
+ "test": "vitest run",
63
+ "typecheck": "tsc --noEmit"
64
+ }
6
65
  }