@hemerson/design-system 0.2.0 → 0.3.1

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.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["TONE_ICONS","_Fragment","enableGlassRefraction","cx","classes","GlassPanel","forwardRef","Tag","rest","tone","className","ICONS","Icon","name","shape","Button","iconOnly","disabled","loading","variant","size","icon","children","NavBarLink","active","NavBarRoot","title","navLabel","actions","NavBar","Sidebar","label","floating","items","shared","item","footer","STEPS","SegmentedControl","innerValue","setInnerValue","useState","defaultValue","options","current","value","buttons","useRef","thumb","selectedIndex","option","measure","button","select","next","onChange","onKeyDown","step","event","nextIndex","isSelected","index","node","Menu","isOpen","setOpen","root","trigger","panel","id","useId","menuItems","close","returnFocus","onPointerDown","list","triggerVariant","align","FloatingButton","position","FOCUSABLE","Dialog","titleId","descriptionId","onCloseRef","onClose","useEffect","open","previous","previousOverflow","focusables","initialFocus","first","last","createPortal","description","closeLabel","TONE_ICONS$1","Toast","isPaused","setPaused","duration","timer","useFieldIds","generated","fieldId","describedBy","props","ids","FieldMessages","Fragment","hint","error","Input","numeric","Select","placeholder","Checkbox","Card","interactive","media","eyebrow","TONE_ICONS","Badge","defaultIcon","shownIcon","cellClass","column","Table","caption","maxHeight","hideCaption","columns","rows","row","rowKey","empty","Container","withSidebar","SectionTitle","Separator","decorative","orientation","ScrollArea","style","Loading","showLabel","GlowAvatar"],"sources":["../src/internal/cx.ts","../src/components/GlassPanel/GlassPanel.tsx","../src/internal/Icon.tsx","../src/components/Button/Button.tsx","../src/components/NavBar/NavBar.tsx","../src/components/Sidebar/Sidebar.tsx","../src/components/SegmentedControl/SegmentedControl.tsx","../src/components/Menu/Menu.tsx","../src/components/FloatingButton/FloatingButton.tsx","../src/components/Dialog/Dialog.tsx","../src/components/Toast/Toast.tsx","../src/internal/field.tsx","../src/components/Input/Input.tsx","../src/components/Select/Select.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Card/Card.tsx","../src/components/Badge/Badge.tsx","../src/components/Table/Table.tsx","../src/components/Container/Container.tsx","../src/components/SectionTitle/SectionTitle.tsx","../src/components/Separator/Separator.tsx","../src/components/ScrollArea/ScrollArea.tsx","../src/components/Loading/Loading.tsx","../src/components/GlowAvatar/GlowAvatar.tsx"],"sourcesContent":["/** Joins the truthy class names. */\nexport function cx(...classes: Array<string | false | null | undefined>): string {\n return classes.filter(Boolean).join(\" \");\n}\n","import { forwardRef, type ElementType, type HTMLAttributes } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport type GlassTone = \"regular\" | \"clear\" | \"thick\" | \"accent\";\n\nexport interface GlassPanelProps extends HTMLAttributes<HTMLElement> {\n /** The element to render. Default `div`. */\n as?: ElementType;\n /**\n * regular (default, the only tone for text) · clear (icon-only controls over the app's own surfaces)\n * · thick (dialogs and sheets) · accent (one prominent floating control per view).\n */\n tone?: GlassTone;\n}\n\n/** Liquid glass: the material of every surface that floats above the content. */\nexport const GlassPanel = forwardRef<HTMLElement, GlassPanelProps>(function GlassPanel(\n { as: Tag = \"div\", tone = \"regular\", className, ...rest },\n ref\n) {\n return <Tag {...rest} ref={ref} className={cx(\"hds-glass\", tone !== \"regular\" && `hds-glass--${tone}`, className)} />;\n});\n","import { cx } from \"./cx\";\n\n// The few Lucide icons (ISC licence) the components draw themselves.\n// Projects pass any other icon from lucide-react.\nconst ICONS = {\n check: [\"M20 6 9 17l-5-5\"],\n x: [\"M18 6 6 18\", \"m6 6 12 12\"],\n \"chevron-down\": [\"m6 9 6 6 6-6\"],\n \"circle-check\": [\"circle\", \"m9 12 2 2 4-4\"],\n \"circle-x\": [\"circle\", \"m15 9-6 6\", \"m9 9 6 6\"],\n \"triangle-alert\": [\n \"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\",\n \"M12 9v4\",\n \"M12 17h.01\",\n ],\n info: [\"circle\", \"M12 16v-4\", \"M12 8h.01\"],\n loader: [\"M21 12a9 9 0 1 1-6.219-8.56\"],\n} as const;\n\nexport type IconName = keyof typeof ICONS;\n\ntype IconProps = {\n name: IconName;\n className?: string;\n};\n\nexport function Icon({ name, className }: IconProps) {\n return (\n <svg\n className={cx(\"hds-icon\", className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n {ICONS[name].map((shape) =>\n shape === \"circle\" ? <circle key={shape} cx={12} cy={12} r={10} /> : <path key={shape} d={shape} />\n )}\n </svg>\n );\n}\n","import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { Icon } from \"../../internal/Icon\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"glass\" | \"ghost\" | \"danger\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** primary (one per view) · secondary · glass (over content or in glass bars) · ghost · danger (destructive). */\n variant?: ButtonVariant;\n /** sm 32px · md 40px · lg 56px, as on the portfolio. */\n size?: ButtonSize;\n /** A Lucide icon, shown before the label. */\n icon?: ReactNode;\n /** Shows only the icon. Requires `aria-label`. */\n iconOnly?: boolean;\n /** Shows a spinner, disables the button and sets `aria-busy`. */\n loading?: boolean;\n}\n\n/** Triggers an action. Labels are set uppercase and bold, verb first. */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = \"primary\",\n size = \"md\",\n icon,\n iconOnly = false,\n loading = false,\n disabled,\n type = \"button\",\n className,\n children,\n ...rest\n },\n ref\n) {\n if (iconOnly && !rest[\"aria-label\"] && !rest[\"aria-labelledby\"]) {\n console.warn(\"Button: an icon-only button needs an aria-label.\");\n }\n\n return (\n <button\n {...rest}\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n className={cx(\n \"hds-btn\",\n `hds-btn--${variant}`,\n size !== \"md\" && `hds-btn--${size}`,\n iconOnly && \"hds-btn--icon\",\n variant === \"glass\" && \"hds-glass\",\n className\n )}\n >\n {loading ? <Icon name=\"loader\" className=\"hds-spin\" /> : icon}\n {iconOnly ? null : children}\n </button>\n );\n});\n","import type { AnchorHTMLAttributes, HTMLAttributes, ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { GlassPanel } from \"../GlassPanel/GlassPanel\";\n\nexport interface NavBarProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n /** Product or page name on the left. */\n title?: ReactNode;\n /** Buttons on the right. */\n actions?: ReactNode;\n /** Name of the navigation landmark. Default \"Principal\". */\n navLabel?: string;\n}\n\nexport interface NavBarLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /** Marks the current page. */\n active?: boolean;\n}\n\nfunction NavBarLink({ active = false, className, ...rest }: NavBarLinkProps) {\n return <a {...rest} aria-current={active ? \"page\" : undefined} className={cx(\"hds-navbar-link\", className)} />;\n}\n\nfunction NavBarRoot({ title, actions, navLabel = \"Principal\", className, children, ...rest }: NavBarProps) {\n return (\n <GlassPanel {...rest} as=\"header\" className={cx(\"hds-navbar\", className)}>\n {title ? <p className=\"hds-navbar-title\">{title}</p> : null}\n {children ? (\n <nav className=\"hds-navbar-nav\" aria-label={navLabel}>\n {children}\n </nav>\n ) : null}\n {actions ? <div className=\"hds-navbar-actions\">{actions}</div> : null}\n </GlassPanel>\n );\n}\n\n/** The app's top bar: a floating glass capsule with the product name, the main sections and the global actions. */\nexport const NavBar = Object.assign(NavBarRoot, { Link: NavBarLink });\n","import type { ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { GlassPanel } from \"../GlassPanel/GlassPanel\";\n\nexport interface SidebarItem {\n /** Accessible name and tooltip. */\n label: string;\n icon: ReactNode;\n href?: string;\n onClick?: () => void;\n active?: boolean;\n}\n\nexport interface SidebarProps {\n items: SidebarItem[];\n /** Items pinned to the bottom, such as settings. */\n footer?: ReactNode;\n /** A free-floating capsule instead of a rail attached to the edge. */\n floating?: boolean;\n /** Name of the navigation landmark. Default \"Navegação\". */\n label?: string;\n className?: string;\n}\n\n/** A slim glass rail of icon buttons for the app's main sections. */\nexport function Sidebar({ items, footer, floating = false, label = \"Navegação\", className }: SidebarProps) {\n return (\n <GlassPanel as=\"nav\" aria-label={label} className={cx(\"hds-sidebar\", floating && \"hds-sidebar--floating\", className)}>\n <ul className=\"hds-sidebar-items\">\n {items.map((item) => {\n const shared = {\n \"aria-label\": item.label,\n title: item.label,\n \"aria-current\": item.active ? (\"page\" as const) : undefined,\n className: \"hds-sidebar-item\",\n };\n return (\n <li key={item.label}>\n {item.href ? (\n <a {...shared} href={item.href} onClick={item.onClick}>\n {item.icon}\n </a>\n ) : (\n <button {...shared} type=\"button\" onClick={item.onClick}>\n {item.icon}\n </button>\n )}\n </li>\n );\n })}\n </ul>\n {footer ? <div className=\"hds-sidebar-footer\">{footer}</div> : null}\n </GlassPanel>\n );\n}\n","import { useLayoutEffect, useRef, useState, type KeyboardEvent, type ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { GlassPanel } from \"../GlassPanel/GlassPanel\";\n\nexport interface SegmentedOption<T extends string | number = string> {\n value: T;\n label?: ReactNode;\n icon?: ReactNode;\n /** Accessible name when the label is only an icon or a flag. */\n ariaLabel?: string;\n}\n\nexport interface SegmentedControlProps<T extends string | number = string> {\n options: SegmentedOption<T>[];\n /** The selected value, for a controlled control. */\n value?: T;\n /** The initially selected value, for an uncontrolled control. */\n defaultValue?: T;\n onChange?: (value: T) => void;\n /** Name of the group. */\n label: string;\n className?: string;\n}\n\nconst STEPS: Record<string, number> = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 };\n\n/** Switches between two to four exclusive options with a lit thumb that slides between them. */\nexport function SegmentedControl<T extends string | number = string>({\n options,\n value,\n defaultValue,\n onChange,\n label,\n className,\n}: SegmentedControlProps<T>) {\n const [innerValue, setInnerValue] = useState<T | undefined>(defaultValue ?? options[0]?.value);\n const current = value !== undefined ? value : innerValue;\n const buttons = useRef<Array<HTMLButtonElement | null>>([]);\n const thumb = useRef<HTMLSpanElement>(null);\n\n const selectedIndex = Math.max(\n 0,\n options.findIndex((option) => option.value === current)\n );\n\n // The thumb is positioned directly on the DOM node: it follows the selected option's size\n useLayoutEffect(() => {\n function measure() {\n const button = buttons.current[selectedIndex];\n if (!button || !thumb.current) return;\n thumb.current.style.width = `${button.offsetWidth}px`;\n thumb.current.style.transform = `translateX(${button.offsetLeft - 4}px)`;\n thumb.current.style.opacity = \"1\";\n }\n measure();\n window.addEventListener(\"resize\", measure);\n return () => window.removeEventListener(\"resize\", measure);\n }, [selectedIndex, options.length]);\n\n function select(next: T) {\n if (value === undefined) setInnerValue(next);\n onChange?.(next);\n }\n\n function onKeyDown(event: KeyboardEvent) {\n const step = STEPS[event.key];\n if (!step) return;\n event.preventDefault();\n const nextIndex = (selectedIndex + step + options.length) % options.length;\n select(options[nextIndex].value);\n buttons.current[nextIndex]?.focus();\n }\n\n return (\n <GlassPanel role=\"radiogroup\" aria-label={label} className={cx(\"hds-segmented\", className)} onKeyDown={onKeyDown}>\n <span ref={thumb} className=\"hds-segmented-thumb\" aria-hidden=\"true\" style={{ opacity: 0 }} />\n {options.map((option, index) => {\n const isSelected = index === selectedIndex;\n return (\n <button\n key={String(option.value)}\n ref={(node) => {\n buttons.current[index] = node;\n }}\n type=\"button\"\n role=\"radio\"\n aria-checked={isSelected}\n aria-label={option.ariaLabel}\n tabIndex={isSelected ? 0 : -1}\n className=\"hds-segmented-option\"\n onClick={() => select(option.value)}\n >\n {option.icon}\n {option.label}\n </button>\n );\n })}\n </GlassPanel>\n );\n}\n","import { useEffect, useId, useRef, useState, type KeyboardEvent, type ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { Button, type ButtonVariant } from \"../Button/Button\";\nimport { GlassPanel } from \"../GlassPanel/GlassPanel\";\n\nexport type MenuItem =\n | { label: string; icon?: ReactNode; onSelect?: () => void; danger?: boolean; separator?: never }\n | { separator: true };\n\nexport interface MenuProps {\n /** Trigger text, or its accessible name with `iconOnly`. */\n label: string;\n icon?: ReactNode;\n iconOnly?: boolean;\n items: MenuItem[];\n /** Which edge of the trigger the list lines up with. Default `end`. */\n align?: \"start\" | \"end\";\n /** Default `glass`. */\n triggerVariant?: ButtonVariant;\n className?: string;\n}\n\n/** A button that opens a glass list of actions. */\nexport function Menu({ label, icon, iconOnly = false, items, align = \"end\", triggerVariant = \"glass\", className }: MenuProps) {\n const [isOpen, setOpen] = useState(false);\n const root = useRef<HTMLDivElement>(null);\n const trigger = useRef<HTMLButtonElement>(null);\n const panel = useRef<HTMLElement>(null);\n const id = useId();\n\n const menuItems = () => Array.from(panel.current?.querySelectorAll<HTMLElement>('[role=\"menuitem\"]') ?? []);\n\n function close(returnFocus: boolean) {\n setOpen(false);\n if (returnFocus) trigger.current?.focus();\n }\n\n useEffect(() => {\n if (!isOpen) return;\n menuItems()[0]?.focus();\n\n function onPointerDown(event: MouseEvent) {\n if (root.current && !root.current.contains(event.target as Node)) setOpen(false);\n }\n document.addEventListener(\"mousedown\", onPointerDown);\n return () => document.removeEventListener(\"mousedown\", onPointerDown);\n }, [isOpen]);\n\n function onKeyDown(event: KeyboardEvent) {\n const list = menuItems();\n const index = list.indexOf(document.activeElement as HTMLElement);\n\n if (event.key === \"Escape\") {\n event.preventDefault();\n close(true);\n } else if (event.key === \"Tab\") {\n close(false);\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n event.preventDefault();\n const step = event.key === \"ArrowDown\" ? 1 : -1;\n list[(index + step + list.length) % list.length]?.focus();\n } else if (event.key === \"Home\" || event.key === \"End\") {\n event.preventDefault();\n (event.key === \"Home\" ? list[0] : list[list.length - 1])?.focus();\n }\n }\n\n return (\n <div ref={root} className={cx(\"hds-menu\", className)}>\n <Button\n ref={trigger}\n variant={triggerVariant}\n icon={icon}\n iconOnly={iconOnly}\n aria-label={iconOnly ? label : undefined}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n aria-controls={isOpen ? id : undefined}\n onClick={() => setOpen(!isOpen)}\n >\n {label}\n </Button>\n\n {isOpen ? (\n <GlassPanel\n ref={panel}\n id={id}\n role=\"menu\"\n aria-label={label}\n className={cx(\"hds-menu-panel\", `hds-menu-panel--${align}`)}\n onKeyDown={onKeyDown}\n >\n {items.map((item, index) =>\n item.separator ? (\n <div key={`separator-${index}`} role=\"separator\" className=\"hds-menu-separator\" />\n ) : (\n <button\n key={item.label}\n type=\"button\"\n role=\"menuitem\"\n tabIndex={-1}\n className={cx(\"hds-menu-item\", item.danger && \"hds-menu-item--danger\")}\n onClick={() => {\n close(true);\n item.onSelect?.();\n }}\n >\n {item.icon}\n {item.label}\n </button>\n )\n )}\n </GlassPanel>\n ) : null}\n </div>\n );\n}\n","import { forwardRef, type ButtonHTMLAttributes } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport type FloatingButtonPosition = \"bottom-right\" | \"bottom-left\" | \"top-right\" | \"top-left\";\n\nexport interface FloatingButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Accessible name and tooltip. */\n label: string;\n position?: FloatingButtonPosition;\n}\n\n/** A round glass button fixed to a corner of the viewport, for one persistent action. */\nexport const FloatingButton = forwardRef<HTMLButtonElement, FloatingButtonProps>(function FloatingButton(\n { label, position = \"bottom-right\", type = \"button\", className, ...rest },\n ref\n) {\n return (\n <button\n {...rest}\n ref={ref}\n type={type}\n aria-label={label}\n title={label}\n className={cx(\"hds-glass\", \"hds-fab\", `hds-fab--${position}`, className)}\n />\n );\n});\n","import { useEffect, useId, useRef, type ReactNode } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { cx } from \"../../internal/cx\";\nimport { Icon } from \"../../internal/Icon\";\nimport { Button } from \"../Button/Button\";\nimport { GlassPanel } from \"../GlassPanel/GlassPanel\";\n\nconst FOCUSABLE =\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\nexport interface DialogProps {\n open: boolean;\n /** Called on Escape, on the close button and on a click outside the panel. */\n onClose: () => void;\n title: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n /** The buttons, main action last. */\n footer?: ReactNode;\n /** Accessible name of the close button. Default \"Fechar\". */\n closeLabel?: string;\n /** `panel` focuses the panel itself instead of its first control. */\n initialFocus?: \"first\" | \"panel\";\n className?: string;\n}\n\n/** A modal panel of thick glass for a focused task or a confirmation. */\nexport function Dialog({\n open,\n onClose,\n title,\n description,\n children,\n footer,\n closeLabel = \"Fechar\",\n initialFocus = \"first\",\n className,\n}: DialogProps) {\n const panel = useRef<HTMLElement>(null);\n const titleId = useId();\n const descriptionId = useId();\n\n // Always call the latest onClose, even from listeners added when the dialog opened\n const onCloseRef = useRef(onClose);\n useEffect(() => {\n onCloseRef.current = onClose;\n }, [onClose]);\n\n useEffect(() => {\n if (!open) return;\n\n const previous = document.activeElement as HTMLElement | null;\n const previousOverflow = document.body.style.overflow;\n document.body.style.overflow = \"hidden\";\n\n const focusables = panel.current?.querySelectorAll<HTMLElement>(FOCUSABLE) ?? [];\n const target = initialFocus === \"panel\" || focusables.length === 0 ? panel.current : focusables[0];\n target?.focus();\n\n function onKeyDown(event: KeyboardEvent) {\n if (event.key === \"Escape\") {\n event.preventDefault();\n onCloseRef.current();\n return;\n }\n if (event.key !== \"Tab\" || !panel.current) return;\n\n const list = Array.from(panel.current.querySelectorAll<HTMLElement>(FOCUSABLE));\n if (list.length === 0) return;\n const first = list[0];\n const last = list[list.length - 1];\n if (event.shiftKey && document.activeElement === first) {\n event.preventDefault();\n last.focus();\n } else if (!event.shiftKey && document.activeElement === last) {\n event.preventDefault();\n first.focus();\n }\n }\n\n document.addEventListener(\"keydown\", onKeyDown);\n return () => {\n document.removeEventListener(\"keydown\", onKeyDown);\n document.body.style.overflow = previousOverflow;\n previous?.focus();\n };\n }, [open, initialFocus]);\n\n if (!open) return null;\n\n return createPortal(\n <div\n className=\"hds-scrim\"\n onMouseDown={(event) => {\n if (event.target === event.currentTarget) onClose();\n }}\n >\n <GlassPanel\n ref={panel}\n tone=\"thick\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={titleId}\n aria-describedby={description ? descriptionId : undefined}\n tabIndex={-1}\n className={cx(\"hds-dialog\", className)}\n >\n <div className=\"hds-dialog-header\">\n <div>\n <h2 id={titleId} className=\"hds-dialog-title\">\n {title}\n </h2>\n {description ? (\n <p id={descriptionId} className=\"hds-dialog-description\">\n {description}\n </p>\n ) : null}\n </div>\n <Button variant=\"ghost\" size=\"sm\" iconOnly icon={<Icon name=\"x\" />} aria-label={closeLabel} onClick={onClose} />\n </div>\n {children}\n {footer ? <div className=\"hds-dialog-footer\">{footer}</div> : null}\n </GlassPanel>\n </div>,\n document.body\n );\n}\n","import { useEffect, useRef, useState, type ReactNode } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { cx } from \"../../internal/cx\";\nimport { Icon, type IconName } from \"../../internal/Icon\";\nimport { Button } from \"../Button/Button\";\nimport { GlassPanel } from \"../GlassPanel/GlassPanel\";\n\nexport type ToastTone = \"neutral\" | \"success\" | \"warning\" | \"danger\";\n\nconst TONE_ICONS: Record<ToastTone, IconName> = {\n neutral: \"info\",\n success: \"circle-check\",\n warning: \"triangle-alert\",\n danger: \"circle-x\",\n};\n\nexport interface ToastProps {\n open: boolean;\n onClose?: () => void;\n tone?: ToastTone;\n title: ReactNode;\n description?: ReactNode;\n /** Milliseconds before it closes itself; 0 keeps it open. Default 5000. */\n duration?: number;\n /** Accessible name of the close button. Default \"Fechar aviso\". */\n closeLabel?: string;\n className?: string;\n}\n\n/** A short glass notice at the bottom of the screen that confirms an action or reports a problem. */\nexport function Toast({\n open,\n onClose,\n tone = \"neutral\",\n title,\n description,\n duration = 5000,\n closeLabel = \"Fechar aviso\",\n className,\n}: ToastProps) {\n const [isPaused, setPaused] = useState(false);\n const onCloseRef = useRef(onClose);\n useEffect(() => {\n onCloseRef.current = onClose;\n }, [onClose]);\n\n // The timer pauses while the pointer or focus is on the toast\n useEffect(() => {\n if (!open || !duration || isPaused) return;\n const timer = window.setTimeout(() => onCloseRef.current?.(), duration);\n return () => window.clearTimeout(timer);\n }, [open, duration, isPaused]);\n\n if (!open) return null;\n\n return createPortal(\n <div className=\"hds-toast-region\">\n <GlassPanel\n role={tone === \"danger\" ? \"alert\" : \"status\"}\n className={cx(\"hds-toast\", `hds-toast--${tone}`, className)}\n onMouseEnter={() => setPaused(true)}\n onMouseLeave={() => setPaused(false)}\n onFocus={() => setPaused(true)}\n onBlur={() => setPaused(false)}\n >\n <Icon name={TONE_ICONS[tone]} />\n <div className=\"hds-toast-body\">\n <p className=\"hds-toast-title\">{title}</p>\n {description ? <p className=\"hds-toast-description\">{description}</p> : null}\n </div>\n {onClose ? (\n <Button variant=\"ghost\" size=\"sm\" iconOnly icon={<Icon name=\"x\" />} aria-label={closeLabel} onClick={onClose} />\n ) : null}\n </GlassPanel>\n </div>,\n document.body\n );\n}\n","import { useId, type ReactNode } from \"react\";\nimport { Icon } from \"./Icon\";\n\nexport interface FieldTextProps {\n hint?: ReactNode;\n error?: ReactNode;\n \"aria-describedby\"?: string;\n}\n\n/** Ids for a field and its hint and error, so they can be linked with aria-describedby. */\nexport function useFieldIds(id?: string) {\n const generated = useId();\n const fieldId = id ?? generated;\n return { id: fieldId, hint: `${fieldId}-hint`, error: `${fieldId}-error` };\n}\n\nexport function describedBy(props: FieldTextProps, ids: ReturnType<typeof useFieldIds>) {\n const list = [props.hint && ids.hint, props.error && ids.error, props[\"aria-describedby\"]].filter(Boolean);\n return list.length ? list.join(\" \") : undefined;\n}\n\nexport function FieldMessages({ hint, error, ids }: FieldTextProps & { ids: ReturnType<typeof useFieldIds> }) {\n return (\n <>\n {hint ? (\n <p id={ids.hint} className=\"hds-hint\">\n {hint}\n </p>\n ) : null}\n {error ? (\n <p id={ids.error} className=\"hds-error\">\n <Icon name=\"circle-x\" />\n {error}\n </p>\n ) : null}\n </>\n );\n}\n","import { forwardRef, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { describedBy, FieldMessages, useFieldIds } from \"../../internal/field\";\n\nexport interface InputProps extends InputHTMLAttributes<HTMLInputElement> {\n /** Always visible, written as a noun (\"Beneficiário\"). */\n label: ReactNode;\n hint?: ReactNode;\n /** Says how to fix the value; also marks the input invalid. */\n error?: ReactNode;\n /** Mono, tabular figures and a decimal keyboard, for amounts and codes. */\n numeric?: boolean;\n}\n\n/** A labelled text field on a solid, recessed well. */\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { label, hint, error, numeric = false, id, className, ...rest },\n ref\n) {\n const ids = useFieldIds(id);\n\n return (\n <div className={cx(\"hds-field\", className)}>\n <label className=\"hds-label\" htmlFor={ids.id}>\n {label}\n </label>\n <input\n inputMode={numeric ? \"decimal\" : undefined}\n {...rest}\n ref={ref}\n id={ids.id}\n aria-invalid={error ? true : undefined}\n aria-describedby={describedBy({ hint, error, \"aria-describedby\": rest[\"aria-describedby\"] }, ids)}\n className={cx(\"hds-input\", numeric && \"hds-input--numeric\")}\n />\n <FieldMessages hint={hint} error={error} ids={ids} />\n </div>\n );\n});\n","import { forwardRef, type ReactNode, type SelectHTMLAttributes } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { describedBy, FieldMessages, useFieldIds } from \"../../internal/field\";\nimport { Icon } from \"../../internal/Icon\";\n\nexport interface SelectOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {\n label: ReactNode;\n options: SelectOption[];\n /** Shown as a disabled first option. */\n placeholder?: string;\n hint?: ReactNode;\n error?: ReactNode;\n}\n\n/** A labelled native dropdown, styled like Input, for choosing one option from a short list. */\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(function Select(\n { label, options, placeholder, hint, error, id, className, ...rest },\n ref\n) {\n const ids = useFieldIds(id);\n\n return (\n <div className={cx(\"hds-field\", className)}>\n <label className=\"hds-label\" htmlFor={ids.id}>\n {label}\n </label>\n <div className=\"hds-select-wrap\">\n <select\n {...rest}\n ref={ref}\n id={ids.id}\n aria-invalid={error ? true : undefined}\n aria-describedby={describedBy({ hint, error, \"aria-describedby\": rest[\"aria-describedby\"] }, ids)}\n className=\"hds-select\"\n >\n {placeholder ? (\n <option value=\"\" disabled>\n {placeholder}\n </option>\n ) : null}\n {options.map((option) => (\n <option key={option.value} value={option.value} disabled={option.disabled}>\n {option.label}\n </option>\n ))}\n </select>\n <Icon name=\"chevron-down\" />\n </div>\n <FieldMessages hint={hint} error={error} ids={ids} />\n </div>\n );\n});\n","import { forwardRef, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { useFieldIds } from \"../../internal/field\";\nimport { Icon } from \"../../internal/Icon\";\n\nexport interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"type\"> {\n /** States the \"yes\" (\"Pago\"), never a negative. */\n label: ReactNode;\n hint?: ReactNode;\n}\n\n/** A checkbox whose whole label is clickable. */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(function Checkbox(\n { label, hint, id, className, ...rest },\n ref\n) {\n const ids = useFieldIds(id);\n\n return (\n <label className={cx(\"hds-checkbox\", className)} htmlFor={ids.id}>\n <span className=\"hds-checkbox-control\">\n <input\n {...rest}\n ref={ref}\n id={ids.id}\n type=\"checkbox\"\n className=\"hds-checkbox-input\"\n aria-describedby={hint ? ids.hint : rest[\"aria-describedby\"]}\n />\n <span className=\"hds-checkbox-box\">\n <Icon name=\"check\" />\n </span>\n </span>\n <span className=\"hds-checkbox-text\">\n {label}\n {hint ? (\n <span id={ids.hint} className=\"hds-hint\">\n {hint}\n </span>\n ) : null}\n </span>\n </label>\n );\n});\n","import type { ElementType, HTMLAttributes, ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport interface CardProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n /** The element to render. Default `article`; use `a` with `href` for a link card. */\n as?: ElementType;\n href?: string;\n /** An uppercase label above the title. */\n eyebrow?: ReactNode;\n title?: ReactNode;\n media?: { src: string; alt?: string };\n /** Actions or badges at the bottom. */\n footer?: ReactNode;\n /** The whole card is clickable; it scales up slightly on hover. */\n interactive?: boolean;\n}\n\n/** A solid raised block that groups one item's content. */\nexport function Card({\n as: Tag = \"article\",\n eyebrow,\n title,\n media,\n footer,\n interactive = false,\n className,\n children,\n ...rest\n}: CardProps) {\n return (\n <Tag {...rest} className={cx(\"hds-card\", interactive && \"hds-card--interactive\", className)}>\n {media ? <img className=\"hds-card-media\" src={media.src} alt={media.alt ?? \"\"} /> : null}\n <div className=\"hds-card-body\">\n {eyebrow ? <p className=\"hds-card-eyebrow\">{eyebrow}</p> : null}\n {title ? <h3 className=\"hds-card-title\">{title}</h3> : null}\n {children ? <div className=\"hds-card-text\">{children}</div> : null}\n </div>\n {footer ? <div className=\"hds-card-footer\">{footer}</div> : null}\n </Tag>\n );\n}\n","import type { ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { Icon, type IconName } from \"../../internal/Icon\";\n\nexport type BadgeTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\n\nconst TONE_ICONS: Partial<Record<BadgeTone, IconName>> = {\n accent: \"info\",\n success: \"circle-check\",\n warning: \"triangle-alert\",\n danger: \"circle-x\",\n};\n\nexport interface BadgeProps {\n tone?: BadgeTone;\n /** A Lucide icon, or `false` for none. Status tones show their own icon by default. */\n icon?: ReactNode | false;\n children?: ReactNode;\n className?: string;\n}\n\n/**\n * A small pill that states a status or a category in one or two words.\n * The word stays in ink; the tone shows in the icon and the tint, so color never carries the meaning alone.\n */\nexport function Badge({ tone = \"neutral\", icon, children, className }: BadgeProps) {\n const defaultIcon = TONE_ICONS[tone];\n const shownIcon = icon === false ? null : (icon ?? (defaultIcon ? <Icon name={defaultIcon} /> : null));\n\n return (\n <span className={cx(\"hds-badge\", `hds-badge--${tone}`, className)}>\n {shownIcon}\n {children}\n </span>\n );\n}\n","import type { ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport interface TableColumn<Row> {\n key: string;\n header: ReactNode;\n /** Mono, tabular figures, right-aligned. */\n numeric?: boolean;\n align?: \"start\" | \"center\";\n /** Renders the cell from the row; by default the cell shows `row[key]`. */\n render?: (row: Row) => ReactNode;\n}\n\nexport interface TableProps<Row> {\n columns: TableColumn<Row>[];\n rows: Row[];\n /** Key of each row's unique id. Default `id`. */\n rowKey?: keyof Row & string;\n /** Names the table and its scroll region. */\n caption?: string;\n /** Keeps the caption for screen readers only. */\n hideCaption?: boolean;\n /** Shown when there are no rows. Default \"Nada para mostrar.\". */\n empty?: ReactNode;\n maxHeight?: number | string;\n className?: string;\n}\n\nfunction cellClass<Row>(column: TableColumn<Row>) {\n if (column.numeric) return \"hds-cell--numeric\";\n return column.align === \"center\" ? \"hds-cell--center\" : undefined;\n}\n\n/** A solid data table with a sticky header, roomy rows and aligned numbers. */\nexport function Table<Row extends object>({\n columns,\n rows,\n rowKey = \"id\" as keyof Row & string,\n caption,\n hideCaption = false,\n empty = \"Nada para mostrar.\",\n maxHeight,\n className,\n}: TableProps<Row>) {\n return (\n <div\n className={cx(\"hds-table-wrap\", \"hds-scroll\", className)}\n role=\"region\"\n aria-label={caption}\n tabIndex={0}\n style={maxHeight !== undefined ? { maxHeight } : undefined}\n >\n <table className=\"hds-table\">\n {caption ? <caption className={hideCaption ? \"hds-visually-hidden\" : undefined}>{caption}</caption> : null}\n <thead>\n <tr>\n {columns.map((column) => (\n <th key={column.key} scope=\"col\" className={cellClass(column)}>\n {column.header}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.length ? (\n rows.map((row, index) => (\n <tr key={String(row[rowKey] ?? index)}>\n {columns.map((column) => (\n <td key={column.key} className={cellClass(column)}>\n {column.render ? column.render(row) : (row[column.key as keyof Row] as ReactNode)}\n </td>\n ))}\n </tr>\n ))\n ) : (\n <tr>\n <td colSpan={columns.length || 1} className=\"hds-table-empty\">\n {empty}\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n );\n}\n","import type { ElementType, HTMLAttributes } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport interface ContainerProps extends HTMLAttributes<HTMLElement> {\n /** The element to render. Default `section`. */\n as?: ElementType;\n /** Adds the sidebar's width as left padding from 768px up. */\n withSidebar?: boolean;\n}\n\n/** Centres page content at content-max, with a section's vertical rhythm and the side gutter. */\nexport function Container({ as: Tag = \"section\", withSidebar = false, className, ...rest }: ContainerProps) {\n return <Tag {...rest} className={cx(\"hds-container\", withSidebar && \"hds-container--with-sidebar\", className)} />;\n}\n","import type { ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport interface SectionTitleProps {\n children: ReactNode;\n /** Shown zero-padded (3 → \"03\") before the heading, only when sections are a sequence. */\n index?: number;\n /** Heading level. Default `h2`. */\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\";\n id?: string;\n className?: string;\n}\n\n/** A page-section heading led by a glowing mono index, the portfolio's signature heading. */\nexport function SectionTitle({ children, index, as: Tag = \"h2\", id, className }: SectionTitleProps) {\n return (\n <Tag id={id} className={cx(\"hds-section-title\", className)}>\n {index !== undefined ? (\n <span className=\"hds-section-index\" aria-hidden=\"true\">\n {String(index).padStart(2, \"0\")}\n </span>\n ) : null}\n {children}\n </Tag>\n );\n}\n","import { cx } from \"../../internal/cx\";\n\nexport interface SeparatorProps {\n orientation?: \"horizontal\" | \"vertical\";\n /** Hides the line from screen readers when it only decorates. */\n decorative?: boolean;\n className?: string;\n}\n\n/** A 1px line that divides groups of content. */\nexport function Separator({ orientation = \"horizontal\", decorative = false, className }: SeparatorProps) {\n return (\n <div\n role={decorative ? \"none\" : \"separator\"}\n aria-orientation={decorative ? undefined : orientation}\n className={cx(\"hds-separator\", `hds-separator--${orientation}`, className)}\n />\n );\n}\n","import type { HTMLAttributes } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport interface ScrollAreaProps extends HTMLAttributes<HTMLDivElement> {\n /** Accessible name of the region. */\n label: string;\n maxHeight?: number | string;\n}\n\n/** A focusable scrollable region with the brand's slim scrollbars. */\nexport function ScrollArea({ label, maxHeight, className, style, ...rest }: ScrollAreaProps) {\n return (\n <div\n {...rest}\n role=\"region\"\n aria-label={label}\n tabIndex={0}\n className={cx(\"hds-scroll\", className)}\n style={{ maxHeight, ...style }}\n />\n );\n}\n","import { cx } from \"../../internal/cx\";\nimport { Icon } from \"../../internal/Icon\";\n\nexport interface LoadingProps {\n /** sm 16px · md 24px · lg 32px. */\n size?: \"sm\" | \"md\" | \"lg\";\n /** Announced to screen readers. Default \"Carregando…\". */\n label?: string;\n /** Shows the label beside the spinner. */\n showLabel?: boolean;\n className?: string;\n}\n\n/** A spinner that tells assistive technology something is loading. */\nexport function Loading({ size = \"md\", label = \"Carregando…\", showLabel = false, className }: LoadingProps) {\n return (\n <span role=\"status\" className={cx(\"hds-loading\", `hds-loading--${size}`, className)}>\n <Icon name=\"loader\" />\n <span className={showLabel ? undefined : \"hds-visually-hidden\"}>{label}</span>\n </span>\n );\n}\n","import { cx } from \"../../internal/cx\";\n\nexport interface GlowAvatarProps {\n src: string;\n /** The person's name. */\n alt: string;\n /** Diameter in px. Default 96. */\n size?: number;\n className?: string;\n}\n\n/** A round photo ringed in the accent with a soft glow behind it. One per view. */\nexport function GlowAvatar({ src, alt, size = 96, className }: GlowAvatarProps) {\n return (\n <span className={cx(\"hds-avatar\", className)} style={{ width: size, height: size }}>\n <span className=\"hds-avatar-glow\" aria-hidden=\"true\" />\n <img className=\"hds-avatar-image\" src={src} alt={alt} width={size} height={size} />\n </span>\n );\n}\n"],"mappings":";;;;;AACA,SAAgBG,EAAG,GAAGC,GAA2D;CAC/E,OAAOA,EAAQ,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EACL,cAAYuB;EACZ,UAAU;EACV,WAAW5B,EAAG,cAAcO,CAAS;EACrC,OAAO;GAAE;GAAW,GAAGsI;EAAM;CAC9B,CAAA;AAEL;;;ACPA,SAAgBC,EAAQ,EAAE,UAAO,MAAM,WAAQ,eAAe,eAAY,IAAO,gBAA2B;CAC1G,OACE,kBAAC,QAAD;EAAM,MAAK;EAAS,WAAW9I,EAAG,eAAe,gBAAgBiB,KAAQV,CAAS;EAAlF,UAAA,CACE,kBAACE,GAAD,EAAM,MAAK,SAAU,CAAA,GACrB,kBAAC,QAAD;GAAM,WAAWsI,IAAY,KAAA,IAAY;GAAwB,UAAAnH;EAAY,CAAA,CACzE;;AAEV;;;ACTA,SAAgBoH,EAAW,EAAE,QAAK,QAAK,UAAO,IAAI,gBAA8B;CAC9E,OACE,kBAAC,QAAD;EAAM,WAAWhJ,EAAG,cAAcO,CAAS;EAAG,OAAO;GAAE,OAAOU;GAAM,QAAQA;EAAK;EAAjF,UAAA,CACE,kBAAC,QAAD;GAAM,WAAU;GAAkB,eAAY;EAAQ,CAAA,GACtD,kBAAC,OAAD;GAAK,WAAU;GAAwB;GAAU;GAAK,OAAOA;GAAM,QAAQA;EAAO,CAAA,CAC9E;;AAEV"}
1
+ {"version":3,"file":"index.js","names":["TONE_ICONS","_Fragment","enableGlassRefraction","setTheme","readStoredAppearance","applyStoredAppearance","setTransparency","getAppearance","subscribeToAppearance","APPEARANCE_STORAGE_KEYS","cx","classes","GlassPanel","forwardRef","Tag","rest","tone","className","RING","ICONS","Icon","shapes","name","shape","index","Button","iconOnly","disabled","loading","variant","size","icon","children","NavBarLink","active","NavBarRoot","title","navLabel","actions","NavBar","Sidebar","label","floating","items","shared","item","footer","STEPS","SegmentedControl","innerValue","setInnerValue","useState","defaultValue","options","current","value","buttons","useRef","thumb","selectedIndex","option","measure","button","select","next","onChange","onKeyDown","step","event","nextIndex","isSelected","node","GAP","placePanel","anchor","trigger","width","panel","height","viewportWidth","viewportHeight","fitsBelow","fitsAbove","top","preferredLeft","align","left","Menu","isOpen","setOpen","id","useId","menuItems","close","returnFocus","useLayoutEffect","place","useEffect","onPointerDown","target","list","triggerVariant","createPortal","FloatingButton","position","FOCUSABLE","Dialog","titleId","descriptionId","onCloseRef","onClose","open","previous","previousOverflow","focusables","initialFocus","first","last","description","closeLabel","TONE_ICONS$1","ToastView","isPaused","setPaused","duration","timer","Toast","ToastContext","createContext","ToastProvider","toasts","setToasts","nextId","dismiss","useCallback","toast","show","max","api","useMemo","useToast","useContext","useFieldIds","generated","fieldId","describedBy","props","ids","FieldMessages","Fragment","hint","error","Input","numeric","Select","placeholder","Checkbox","Card","interactive","media","eyebrow","TONE_ICONS","Badge","defaultIcon","shownIcon","cellClass","column","Table","caption","maxHeight","hideCaption","columns","rows","row","rowKey","empty","initialized","serverAppearance","lastSnapshot","snapshot","useAppearance","appearance","useSyncExternalStore","ThemeToggle","theme","lightLabel","darkLabel","toggleTheme","TransparencyToggle","transparency","toggleTransparency","Container","withSidebar","SectionTitle","Separator","decorative","orientation","ScrollArea","style","Loading","showLabel","GlowAvatar"],"sources":["../src/internal/cx.ts","../src/components/GlassPanel/GlassPanel.tsx","../src/internal/Icon.tsx","../src/components/Button/Button.tsx","../src/components/NavBar/NavBar.tsx","../src/components/Sidebar/Sidebar.tsx","../src/components/SegmentedControl/SegmentedControl.tsx","../src/components/Menu/Menu.tsx","../src/components/FloatingButton/FloatingButton.tsx","../src/components/Dialog/Dialog.tsx","../src/components/Toast/ToastView.tsx","../src/components/Toast/Toast.tsx","../src/components/Toast/ToastProvider.tsx","../src/internal/field.tsx","../src/components/Input/Input.tsx","../src/components/Select/Select.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Card/Card.tsx","../src/components/Badge/Badge.tsx","../src/components/Table/Table.tsx","../src/appearance/useAppearance.ts","../src/components/AppearanceToggles/AppearanceToggles.tsx","../src/components/Container/Container.tsx","../src/components/SectionTitle/SectionTitle.tsx","../src/components/Separator/Separator.tsx","../src/components/ScrollArea/ScrollArea.tsx","../src/components/Loading/Loading.tsx","../src/components/GlowAvatar/GlowAvatar.tsx"],"sourcesContent":["/** Joins the truthy class names. */\nexport function cx(...classes: Array<string | false | null | undefined>): string {\n return classes.filter(Boolean).join(\" \");\n}\n","import { forwardRef, type ElementType, type HTMLAttributes } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport type GlassTone = \"regular\" | \"clear\" | \"thick\" | \"accent\";\n\nexport interface GlassPanelProps extends HTMLAttributes<HTMLElement> {\n /** The element to render. Default `div`. */\n as?: ElementType;\n /**\n * regular (default, the only tone for text) · clear (icon-only controls over the app's own surfaces)\n * · thick (dialogs and sheets) · accent (one prominent floating control per view).\n */\n tone?: GlassTone;\n}\n\n/** Liquid glass: the material of every surface that floats above the content. */\nexport const GlassPanel = forwardRef<HTMLElement, GlassPanelProps>(function GlassPanel(\n { as: Tag = \"div\", tone = \"regular\", className, ...rest },\n ref\n) {\n return <Tag {...rest} ref={ref} className={cx(\"hds-glass\", tone !== \"regular\" && `hds-glass--${tone}`, className)} />;\n});\n","import { cx } from \"./cx\";\n\ntype Shape = string | { cx: number; cy: number; r: number };\n\nconst RING = { cx: 12, cy: 12, r: 10 };\n\n// The few Lucide icons (ISC licence) the components draw themselves: a string is a path,\n// an object a circle. Projects pass any other icon from lucide-react.\nconst ICONS = {\n check: [\"M20 6 9 17l-5-5\"],\n x: [\"M18 6 6 18\", \"m6 6 12 12\"],\n \"chevron-down\": [\"m6 9 6 6 6-6\"],\n \"circle-check\": [RING, \"m9 12 2 2 4-4\"],\n \"circle-x\": [RING, \"m15 9-6 6\", \"m9 9 6 6\"],\n \"triangle-alert\": [\n \"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\",\n \"M12 9v4\",\n \"M12 17h.01\",\n ],\n info: [RING, \"M12 16v-4\", \"M12 8h.01\"],\n loader: [\"M21 12a9 9 0 1 1-6.219-8.56\"],\n sun: [\n { cx: 12, cy: 12, r: 4 },\n \"M12 2v2\",\n \"M12 20v2\",\n \"m4.93 4.93 1.41 1.41\",\n \"m17.66 17.66 1.41 1.41\",\n \"M2 12h2\",\n \"M20 12h2\",\n \"m6.34 17.66-1.41 1.41\",\n \"m19.07 4.93-1.41 1.41\",\n ],\n moon: [\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z\"],\n blend: [\n { cx: 9, cy: 9, r: 7 },\n { cx: 15, cy: 15, r: 7 },\n ],\n} satisfies Record<string, Shape[]>;\n\nexport type IconName = keyof typeof ICONS;\n\ntype IconProps = {\n name: IconName;\n className?: string;\n};\n\nexport function Icon({ name, className }: IconProps) {\n const shapes: Shape[] = ICONS[name];\n return (\n <svg\n className={cx(\"hds-icon\", className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n {shapes.map((shape, index) =>\n typeof shape === \"string\" ? <path key={index} d={shape} /> : <circle key={index} cx={shape.cx} cy={shape.cy} r={shape.r} />\n )}\n </svg>\n );\n}\n","import { forwardRef, type ButtonHTMLAttributes, type ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { Icon } from \"../../internal/Icon\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"glass\" | \"ghost\" | \"danger\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** primary (one per view) · secondary · glass (over content or in glass bars) · ghost · danger (destructive). */\n variant?: ButtonVariant;\n /** sm 32px · md 40px · lg 56px, as on the portfolio. */\n size?: ButtonSize;\n /** A Lucide icon, shown before the label. */\n icon?: ReactNode;\n /** Shows only the icon. Requires `aria-label`. */\n iconOnly?: boolean;\n /** Shows a spinner, disables the button and sets `aria-busy`. */\n loading?: boolean;\n}\n\n/** Triggers an action. Labels are set uppercase and bold, verb first. */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant = \"primary\",\n size = \"md\",\n icon,\n iconOnly = false,\n loading = false,\n disabled,\n type = \"button\",\n className,\n children,\n ...rest\n },\n ref\n) {\n if (iconOnly && !rest[\"aria-label\"] && !rest[\"aria-labelledby\"]) {\n console.warn(\"Button: an icon-only button needs an aria-label.\");\n }\n\n return (\n <button\n {...rest}\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n className={cx(\n \"hds-btn\",\n `hds-btn--${variant}`,\n size !== \"md\" && `hds-btn--${size}`,\n iconOnly && \"hds-btn--icon\",\n variant === \"glass\" && \"hds-glass\",\n className\n )}\n >\n {loading ? <Icon name=\"loader\" className=\"hds-spin\" /> : icon}\n {iconOnly ? null : children}\n </button>\n );\n});\n","import type { AnchorHTMLAttributes, HTMLAttributes, ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { GlassPanel } from \"../GlassPanel/GlassPanel\";\n\nexport interface NavBarProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n /** Product or page name on the left. */\n title?: ReactNode;\n /** Buttons on the right. */\n actions?: ReactNode;\n /** Name of the navigation landmark. Default \"Principal\". */\n navLabel?: string;\n}\n\nexport interface NavBarLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /** Marks the current page. */\n active?: boolean;\n}\n\nfunction NavBarLink({ active = false, className, ...rest }: NavBarLinkProps) {\n return <a {...rest} aria-current={active ? \"page\" : undefined} className={cx(\"hds-navbar-link\", className)} />;\n}\n\nfunction NavBarRoot({ title, actions, navLabel = \"Principal\", className, children, ...rest }: NavBarProps) {\n return (\n <GlassPanel {...rest} as=\"header\" className={cx(\"hds-navbar\", className)}>\n {title ? <p className=\"hds-navbar-title\">{title}</p> : null}\n {children ? (\n <nav className=\"hds-navbar-nav\" aria-label={navLabel}>\n {children}\n </nav>\n ) : null}\n {actions ? <div className=\"hds-navbar-actions\">{actions}</div> : null}\n </GlassPanel>\n );\n}\n\n/** The app's top bar: a floating glass capsule with the product name, the main sections and the global actions. */\nexport const NavBar = Object.assign(NavBarRoot, { Link: NavBarLink });\n","import type { ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { GlassPanel } from \"../GlassPanel/GlassPanel\";\n\nexport interface SidebarItem {\n /** Accessible name and tooltip. */\n label: string;\n icon: ReactNode;\n href?: string;\n onClick?: () => void;\n active?: boolean;\n}\n\nexport interface SidebarProps {\n items: SidebarItem[];\n /** Items pinned to the bottom, such as settings. */\n footer?: ReactNode;\n /** A free-floating capsule instead of a rail attached to the edge. */\n floating?: boolean;\n /** Name of the navigation landmark. Default \"Navegação\". */\n label?: string;\n className?: string;\n}\n\n/** A slim glass rail of icon buttons for the app's main sections. */\nexport function Sidebar({ items, footer, floating = false, label = \"Navegação\", className }: SidebarProps) {\n return (\n <GlassPanel as=\"nav\" aria-label={label} className={cx(\"hds-sidebar\", floating && \"hds-sidebar--floating\", className)}>\n <ul className=\"hds-sidebar-items\">\n {items.map((item) => {\n const shared = {\n \"aria-label\": item.label,\n title: item.label,\n \"aria-current\": item.active ? (\"page\" as const) : undefined,\n className: \"hds-sidebar-item\",\n };\n return (\n <li key={item.label}>\n {item.href ? (\n <a {...shared} href={item.href} onClick={item.onClick}>\n {item.icon}\n </a>\n ) : (\n <button {...shared} type=\"button\" onClick={item.onClick}>\n {item.icon}\n </button>\n )}\n </li>\n );\n })}\n </ul>\n {footer ? <div className=\"hds-sidebar-footer\">{footer}</div> : null}\n </GlassPanel>\n );\n}\n","import { useLayoutEffect, useRef, useState, type KeyboardEvent, type ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { GlassPanel } from \"../GlassPanel/GlassPanel\";\n\nexport interface SegmentedOption<T extends string | number = string> {\n value: T;\n label?: ReactNode;\n icon?: ReactNode;\n /** Accessible name when the label is only an icon or a flag. */\n ariaLabel?: string;\n}\n\nexport interface SegmentedControlProps<T extends string | number = string> {\n options: SegmentedOption<T>[];\n /** The selected value, for a controlled control. */\n value?: T;\n /** The initially selected value, for an uncontrolled control. */\n defaultValue?: T;\n onChange?: (value: T) => void;\n /** Name of the group. */\n label: string;\n className?: string;\n}\n\nconst STEPS: Record<string, number> = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 };\n\n/** Switches between two to four exclusive options with a lit thumb that slides between them. */\nexport function SegmentedControl<T extends string | number = string>({\n options,\n value,\n defaultValue,\n onChange,\n label,\n className,\n}: SegmentedControlProps<T>) {\n const [innerValue, setInnerValue] = useState<T | undefined>(defaultValue ?? options[0]?.value);\n const current = value !== undefined ? value : innerValue;\n const buttons = useRef<Array<HTMLButtonElement | null>>([]);\n const thumb = useRef<HTMLSpanElement>(null);\n\n const selectedIndex = Math.max(\n 0,\n options.findIndex((option) => option.value === current)\n );\n\n // The thumb is positioned directly on the DOM node: it follows the selected option's size\n useLayoutEffect(() => {\n function measure() {\n const button = buttons.current[selectedIndex];\n if (!button || !thumb.current) return;\n thumb.current.style.width = `${button.offsetWidth}px`;\n thumb.current.style.transform = `translateX(${button.offsetLeft - 4}px)`;\n thumb.current.style.opacity = \"1\";\n }\n measure();\n window.addEventListener(\"resize\", measure);\n return () => window.removeEventListener(\"resize\", measure);\n }, [selectedIndex, options.length]);\n\n function select(next: T) {\n if (value === undefined) setInnerValue(next);\n onChange?.(next);\n }\n\n function onKeyDown(event: KeyboardEvent) {\n const step = STEPS[event.key];\n if (!step) return;\n event.preventDefault();\n const nextIndex = (selectedIndex + step + options.length) % options.length;\n select(options[nextIndex].value);\n buttons.current[nextIndex]?.focus();\n }\n\n return (\n <GlassPanel role=\"radiogroup\" aria-label={label} className={cx(\"hds-segmented\", className)} onKeyDown={onKeyDown}>\n <span ref={thumb} className=\"hds-segmented-thumb\" aria-hidden=\"true\" style={{ opacity: 0 }} />\n {options.map((option, index) => {\n const isSelected = index === selectedIndex;\n return (\n <button\n key={String(option.value)}\n ref={(node) => {\n buttons.current[index] = node;\n }}\n type=\"button\"\n role=\"radio\"\n aria-checked={isSelected}\n aria-label={option.ariaLabel}\n tabIndex={isSelected ? 0 : -1}\n className=\"hds-segmented-option\"\n onClick={() => select(option.value)}\n >\n {option.icon}\n {option.label}\n </button>\n );\n })}\n </GlassPanel>\n );\n}\n","import { useEffect, useId, useLayoutEffect, useRef, useState, type KeyboardEvent, type ReactNode } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { cx } from \"../../internal/cx\";\nimport { Button, type ButtonVariant } from \"../Button/Button\";\nimport { GlassPanel } from \"../GlassPanel/GlassPanel\";\n\nexport type MenuItem =\n | { label: string; icon?: ReactNode; onSelect?: () => void; danger?: boolean; separator?: never }\n | { separator: true };\n\nexport interface MenuProps {\n /** Trigger text, or its accessible name with `iconOnly`. */\n label: string;\n icon?: ReactNode;\n iconOnly?: boolean;\n items: MenuItem[];\n /** Which edge of the trigger the list lines up with. Default `end`. */\n align?: \"start\" | \"end\";\n /** Default `glass`. */\n triggerVariant?: ButtonVariant;\n className?: string;\n}\n\n/** Space between the trigger and the list, and the closest the list gets to the window edge. */\nconst GAP = 8;\n\n/**\n * Places the list under the trigger, or above it when there is no room below. The list lives\n * in <body> with fixed positioning, so scroll containers (a table, a dialog) never clip it.\n */\nfunction placePanel(trigger: HTMLElement, panel: HTMLElement, align: \"start\" | \"end\") {\n const anchor = trigger.getBoundingClientRect();\n const width = panel.offsetWidth;\n const height = panel.offsetHeight;\n const viewportWidth = document.documentElement.clientWidth || window.innerWidth;\n const viewportHeight = document.documentElement.clientHeight || window.innerHeight;\n\n const fitsBelow = anchor.bottom + GAP + height <= viewportHeight - GAP;\n const fitsAbove = anchor.top - GAP - height >= GAP;\n const top = fitsBelow || !fitsAbove ? anchor.bottom + GAP : anchor.top - GAP - height;\n\n const preferredLeft = align === \"end\" ? anchor.right - width : anchor.left;\n const left = Math.min(Math.max(GAP, preferredLeft), Math.max(GAP, viewportWidth - width - GAP));\n\n panel.style.top = `${Math.round(top)}px`;\n panel.style.left = `${Math.round(left)}px`;\n panel.dataset.side = fitsBelow || !fitsAbove ? \"bottom\" : \"top\";\n}\n\n/** A button that opens a glass list of actions. */\nexport function Menu({ label, icon, iconOnly = false, items, align = \"end\", triggerVariant = \"glass\", className }: MenuProps) {\n const [isOpen, setOpen] = useState(false);\n const trigger = useRef<HTMLButtonElement>(null);\n const panel = useRef<HTMLElement>(null);\n const id = useId();\n\n const menuItems = () => Array.from(panel.current?.querySelectorAll<HTMLElement>('[role=\"menuitem\"]') ?? []);\n\n function close(returnFocus: boolean) {\n setOpen(false);\n if (returnFocus) trigger.current?.focus();\n }\n\n // Position before the first paint, then follow the trigger while the page scrolls or resizes\n useLayoutEffect(() => {\n if (!isOpen || !trigger.current || !panel.current) return;\n const place = () => {\n if (trigger.current && panel.current) placePanel(trigger.current, panel.current, align);\n };\n place();\n window.addEventListener(\"scroll\", place, true);\n window.addEventListener(\"resize\", place);\n return () => {\n window.removeEventListener(\"scroll\", place, true);\n window.removeEventListener(\"resize\", place);\n };\n }, [isOpen, align]);\n\n useEffect(() => {\n if (!isOpen) return;\n menuItems()[0]?.focus();\n\n function onPointerDown(event: MouseEvent) {\n const target = event.target as Node;\n if (trigger.current?.contains(target) || panel.current?.contains(target)) return;\n setOpen(false);\n }\n document.addEventListener(\"mousedown\", onPointerDown);\n return () => document.removeEventListener(\"mousedown\", onPointerDown);\n }, [isOpen]);\n\n function onKeyDown(event: KeyboardEvent) {\n const list = menuItems();\n const index = list.indexOf(document.activeElement as HTMLElement);\n\n if (event.key === \"Escape\") {\n event.preventDefault();\n close(true);\n } else if (event.key === \"Tab\") {\n // The list sits at the end of <body>, so let focus return to the trigger's place\n event.preventDefault();\n close(true);\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n event.preventDefault();\n const step = event.key === \"ArrowDown\" ? 1 : -1;\n list[(index + step + list.length) % list.length]?.focus();\n } else if (event.key === \"Home\" || event.key === \"End\") {\n event.preventDefault();\n (event.key === \"Home\" ? list[0] : list[list.length - 1])?.focus();\n }\n }\n\n return (\n <div className={cx(\"hds-menu\", className)}>\n <Button\n ref={trigger}\n variant={triggerVariant}\n icon={icon}\n iconOnly={iconOnly}\n aria-label={iconOnly ? label : undefined}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n aria-controls={isOpen ? id : undefined}\n onClick={() => setOpen(!isOpen)}\n >\n {label}\n </Button>\n\n {isOpen\n ? createPortal(\n <GlassPanel\n ref={panel}\n id={id}\n role=\"menu\"\n aria-label={label}\n className=\"hds-menu-panel\"\n onKeyDown={onKeyDown}\n >\n {items.map((item, index) =>\n item.separator ? (\n <div key={`separator-${index}`} role=\"separator\" className=\"hds-menu-separator\" />\n ) : (\n <button\n key={item.label}\n type=\"button\"\n role=\"menuitem\"\n tabIndex={-1}\n className={cx(\"hds-menu-item\", item.danger && \"hds-menu-item--danger\")}\n onClick={() => {\n close(true);\n item.onSelect?.();\n }}\n >\n {item.icon}\n {item.label}\n </button>\n )\n )}\n </GlassPanel>,\n document.body\n )\n : null}\n </div>\n );\n}\n","import { forwardRef, type ButtonHTMLAttributes } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport type FloatingButtonPosition = \"bottom-right\" | \"bottom-left\" | \"top-right\" | \"top-left\";\n\nexport interface FloatingButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Accessible name and tooltip. */\n label: string;\n position?: FloatingButtonPosition;\n}\n\n/** A round glass button fixed to a corner of the viewport, for one persistent action. */\nexport const FloatingButton = forwardRef<HTMLButtonElement, FloatingButtonProps>(function FloatingButton(\n { label, position = \"bottom-right\", type = \"button\", className, ...rest },\n ref\n) {\n return (\n <button\n {...rest}\n ref={ref}\n type={type}\n aria-label={label}\n title={label}\n className={cx(\"hds-glass\", \"hds-fab\", `hds-fab--${position}`, className)}\n />\n );\n});\n","import { useEffect, useId, useRef, type ReactNode } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { cx } from \"../../internal/cx\";\nimport { Icon } from \"../../internal/Icon\";\nimport { Button } from \"../Button/Button\";\nimport { GlassPanel } from \"../GlassPanel/GlassPanel\";\n\nconst FOCUSABLE =\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\nexport interface DialogProps {\n open: boolean;\n /** Called on Escape, on the close button and on a click outside the panel. */\n onClose: () => void;\n title: ReactNode;\n description?: ReactNode;\n children?: ReactNode;\n /** The buttons, main action last. */\n footer?: ReactNode;\n /** Accessible name of the close button. Default \"Fechar\". */\n closeLabel?: string;\n /** `panel` focuses the panel itself instead of its first control. */\n initialFocus?: \"first\" | \"panel\";\n /** md (default, 560px) for forms and confirmations · lg (880px) for wide content such as a print preview. */\n size?: \"md\" | \"lg\";\n className?: string;\n}\n\n/** A modal panel of thick glass for a focused task or a confirmation. */\nexport function Dialog({\n open,\n onClose,\n title,\n description,\n children,\n footer,\n closeLabel = \"Fechar\",\n initialFocus = \"first\",\n size = \"md\",\n className,\n}: DialogProps) {\n const panel = useRef<HTMLElement>(null);\n const titleId = useId();\n const descriptionId = useId();\n\n // Always call the latest onClose, even from listeners added when the dialog opened\n const onCloseRef = useRef(onClose);\n useEffect(() => {\n onCloseRef.current = onClose;\n }, [onClose]);\n\n useEffect(() => {\n if (!open) return;\n\n const previous = document.activeElement as HTMLElement | null;\n const previousOverflow = document.body.style.overflow;\n document.body.style.overflow = \"hidden\";\n\n const focusables = panel.current?.querySelectorAll<HTMLElement>(FOCUSABLE) ?? [];\n const target = initialFocus === \"panel\" || focusables.length === 0 ? panel.current : focusables[0];\n target?.focus();\n\n function onKeyDown(event: KeyboardEvent) {\n if (event.key === \"Escape\") {\n event.preventDefault();\n onCloseRef.current();\n return;\n }\n if (event.key !== \"Tab\" || !panel.current) return;\n\n const list = Array.from(panel.current.querySelectorAll<HTMLElement>(FOCUSABLE));\n if (list.length === 0) return;\n const first = list[0];\n const last = list[list.length - 1];\n if (event.shiftKey && document.activeElement === first) {\n event.preventDefault();\n last.focus();\n } else if (!event.shiftKey && document.activeElement === last) {\n event.preventDefault();\n first.focus();\n }\n }\n\n document.addEventListener(\"keydown\", onKeyDown);\n return () => {\n document.removeEventListener(\"keydown\", onKeyDown);\n document.body.style.overflow = previousOverflow;\n previous?.focus();\n };\n }, [open, initialFocus]);\n\n if (!open) return null;\n\n return createPortal(\n <div\n className=\"hds-scrim\"\n onMouseDown={(event) => {\n if (event.target === event.currentTarget) onClose();\n }}\n >\n <GlassPanel\n ref={panel}\n tone=\"thick\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={titleId}\n aria-describedby={description ? descriptionId : undefined}\n tabIndex={-1}\n className={cx(\"hds-dialog\", size !== \"md\" && `hds-dialog--${size}`, className)}\n >\n <div className=\"hds-dialog-header\">\n <div>\n <h2 id={titleId} className=\"hds-dialog-title\">\n {title}\n </h2>\n {description ? (\n <p id={descriptionId} className=\"hds-dialog-description\">\n {description}\n </p>\n ) : null}\n </div>\n <Button variant=\"ghost\" size=\"sm\" iconOnly icon={<Icon name=\"x\" />} aria-label={closeLabel} onClick={onClose} />\n </div>\n {children}\n {footer ? <div className=\"hds-dialog-footer\">{footer}</div> : null}\n </GlassPanel>\n </div>,\n document.body\n );\n}\n","import { useEffect, useRef, useState, type ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { Icon, type IconName } from \"../../internal/Icon\";\nimport { Button } from \"../Button/Button\";\nimport { GlassPanel } from \"../GlassPanel/GlassPanel\";\n\nexport type ToastTone = \"neutral\" | \"success\" | \"warning\" | \"danger\";\n\nconst TONE_ICONS: Record<ToastTone, IconName> = {\n neutral: \"info\",\n success: \"circle-check\",\n warning: \"triangle-alert\",\n danger: \"circle-x\",\n};\n\nexport interface ToastViewProps {\n tone: ToastTone;\n title: ReactNode;\n description?: ReactNode;\n /** Milliseconds before it closes itself; 0 keeps it open. */\n duration: number;\n onClose?: () => void;\n closeLabel: string;\n className?: string;\n}\n\n/** One toast: the glass card, its icon and close button, and a timer that pauses on hover or focus. */\nexport function ToastView({ tone, title, description, duration, onClose, closeLabel, className }: ToastViewProps) {\n const [isPaused, setPaused] = useState(false);\n const onCloseRef = useRef(onClose);\n useEffect(() => {\n onCloseRef.current = onClose;\n }, [onClose]);\n\n useEffect(() => {\n if (!duration || isPaused) return;\n const timer = window.setTimeout(() => onCloseRef.current?.(), duration);\n return () => window.clearTimeout(timer);\n }, [duration, isPaused]);\n\n return (\n <GlassPanel\n role={tone === \"danger\" ? \"alert\" : \"status\"}\n className={cx(\"hds-toast\", `hds-toast--${tone}`, className)}\n onMouseEnter={() => setPaused(true)}\n onMouseLeave={() => setPaused(false)}\n onFocus={() => setPaused(true)}\n onBlur={() => setPaused(false)}\n >\n <Icon name={TONE_ICONS[tone]} />\n <div className=\"hds-toast-body\">\n <p className=\"hds-toast-title\">{title}</p>\n {description ? <p className=\"hds-toast-description\">{description}</p> : null}\n </div>\n {onClose ? (\n <Button variant=\"ghost\" size=\"sm\" iconOnly icon={<Icon name=\"x\" />} aria-label={closeLabel} onClick={onClose} />\n ) : null}\n </GlassPanel>\n );\n}\n","import type { ReactNode } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { ToastView, type ToastTone } from \"./ToastView\";\n\nexport type { ToastTone } from \"./ToastView\";\n\nexport interface ToastProps {\n open: boolean;\n onClose?: () => void;\n tone?: ToastTone;\n title: ReactNode;\n description?: ReactNode;\n /** Milliseconds before it closes itself; 0 keeps it open. Default 5000. */\n duration?: number;\n /** Accessible name of the close button. Default \"Fechar aviso\". */\n closeLabel?: string;\n className?: string;\n}\n\n/**\n * A short glass notice at the bottom of the screen that confirms an action or reports a problem.\n * To raise toasts from anywhere in an app, wrap it in ToastProvider and use `useToast()` instead.\n */\nexport function Toast({\n open,\n onClose,\n tone = \"neutral\",\n title,\n description,\n duration = 5000,\n closeLabel = \"Fechar aviso\",\n className,\n}: ToastProps) {\n if (!open) return null;\n\n return createPortal(\n <div className=\"hds-toast-region\">\n <ToastView\n tone={tone}\n title={title}\n description={description}\n duration={duration}\n onClose={onClose}\n closeLabel={closeLabel}\n className={className}\n />\n </div>,\n document.body\n );\n}\n","import { createContext, useCallback, useContext, useMemo, useRef, useState, type ReactNode } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { ToastView, type ToastTone } from \"./ToastView\";\n\nexport interface ToastOptions {\n title: ReactNode;\n description?: ReactNode;\n tone?: ToastTone;\n /** Milliseconds before it closes itself; 0 keeps it open until dismissed. Default 5000. */\n duration?: number;\n}\n\nexport interface ToastApi {\n /** Shows a toast and returns its id, for `dismiss`. */\n show: (options: ToastOptions) => string;\n success: (title: ReactNode, description?: ReactNode) => string;\n error: (title: ReactNode, description?: ReactNode) => string;\n warning: (title: ReactNode, description?: ReactNode) => string;\n info: (title: ReactNode, description?: ReactNode) => string;\n dismiss: (id: string) => void;\n}\n\ninterface QueuedToast extends Required<Pick<ToastOptions, \"tone\" | \"duration\">> {\n id: string;\n title: ReactNode;\n description?: ReactNode;\n}\n\nexport interface ToastProviderProps {\n children?: ReactNode;\n /** Most toasts shown at once; the oldest goes first. Default 3. */\n max?: number;\n /** Accessible name of each close button. Default \"Fechar aviso\". */\n closeLabel?: string;\n}\n\nconst ToastContext = createContext<ToastApi | null>(null);\n\n/** Shows the toasts raised with `useToast()` anywhere inside it, stacked at the bottom of the screen. */\nexport function ToastProvider({ children, max = 3, closeLabel = \"Fechar aviso\" }: ToastProviderProps) {\n const [toasts, setToasts] = useState<QueuedToast[]>([]);\n const nextId = useRef(0);\n\n const dismiss = useCallback((id: string) => {\n setToasts((current) => current.filter((toast) => toast.id !== id));\n }, []);\n\n const show = useCallback(\n ({ title, description, tone = \"neutral\", duration = 5000 }: ToastOptions) => {\n const id = `hds-toast-${++nextId.current}`;\n setToasts((current) => [...current, { id, title, description, tone, duration }].slice(-max));\n return id;\n },\n [max]\n );\n\n const api = useMemo<ToastApi>(\n () => ({\n show,\n dismiss,\n success: (title, description) => show({ title, description, tone: \"success\" }),\n error: (title, description) => show({ title, description, tone: \"danger\" }),\n warning: (title, description) => show({ title, description, tone: \"warning\" }),\n info: (title, description) => show({ title, description, tone: \"neutral\" }),\n }),\n [show, dismiss]\n );\n\n return (\n <ToastContext.Provider value={api}>\n {children}\n {toasts.length\n ? createPortal(\n <div className=\"hds-toast-region\">\n {toasts.map((toast) => (\n <ToastView\n key={toast.id}\n tone={toast.tone}\n title={toast.title}\n description={toast.description}\n duration={toast.duration}\n closeLabel={closeLabel}\n onClose={() => dismiss(toast.id)}\n />\n ))}\n </div>,\n document.body\n )\n : null}\n </ToastContext.Provider>\n );\n}\n\n/** Raises toasts from anywhere inside a ToastProvider: `toast.success(\"Boleto salvo\")`. */\nexport function useToast(): ToastApi {\n const api = useContext(ToastContext);\n if (!api) throw new Error(\"useToast must be used inside a ToastProvider.\");\n return api;\n}\n","import { useId, type ReactNode } from \"react\";\nimport { Icon } from \"./Icon\";\n\nexport interface FieldTextProps {\n hint?: ReactNode;\n error?: ReactNode;\n \"aria-describedby\"?: string;\n}\n\n/** Ids for a field and its hint and error, so they can be linked with aria-describedby. */\nexport function useFieldIds(id?: string) {\n const generated = useId();\n const fieldId = id ?? generated;\n return { id: fieldId, hint: `${fieldId}-hint`, error: `${fieldId}-error` };\n}\n\nexport function describedBy(props: FieldTextProps, ids: ReturnType<typeof useFieldIds>) {\n const list = [props.hint && ids.hint, props.error && ids.error, props[\"aria-describedby\"]].filter(Boolean);\n return list.length ? list.join(\" \") : undefined;\n}\n\nexport function FieldMessages({ hint, error, ids }: FieldTextProps & { ids: ReturnType<typeof useFieldIds> }) {\n return (\n <>\n {hint ? (\n <p id={ids.hint} className=\"hds-hint\">\n {hint}\n </p>\n ) : null}\n {error ? (\n <p id={ids.error} className=\"hds-error\">\n <Icon name=\"circle-x\" />\n {error}\n </p>\n ) : null}\n </>\n );\n}\n","import { forwardRef, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { describedBy, FieldMessages, useFieldIds } from \"../../internal/field\";\n\nexport interface InputProps extends InputHTMLAttributes<HTMLInputElement> {\n /** Always visible, written as a noun (\"Beneficiário\"). */\n label: ReactNode;\n hint?: ReactNode;\n /** Says how to fix the value; also marks the input invalid. */\n error?: ReactNode;\n /** Mono, tabular figures and a decimal keyboard, for amounts and codes. */\n numeric?: boolean;\n}\n\n/** A labelled text field on a solid, recessed well. */\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { label, hint, error, numeric = false, id, className, ...rest },\n ref\n) {\n const ids = useFieldIds(id);\n\n return (\n <div className={cx(\"hds-field\", className)}>\n <label className=\"hds-label\" htmlFor={ids.id}>\n {label}\n </label>\n <input\n inputMode={numeric ? \"decimal\" : undefined}\n {...rest}\n ref={ref}\n id={ids.id}\n aria-invalid={error ? true : undefined}\n aria-describedby={describedBy({ hint, error, \"aria-describedby\": rest[\"aria-describedby\"] }, ids)}\n className={cx(\"hds-input\", numeric && \"hds-input--numeric\")}\n />\n <FieldMessages hint={hint} error={error} ids={ids} />\n </div>\n );\n});\n","import { forwardRef, type ReactNode, type SelectHTMLAttributes } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { describedBy, FieldMessages, useFieldIds } from \"../../internal/field\";\nimport { Icon } from \"../../internal/Icon\";\n\nexport interface SelectOption {\n value: string;\n label: string;\n disabled?: boolean;\n}\n\nexport interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {\n label: ReactNode;\n options: SelectOption[];\n /** Shown as a disabled first option. */\n placeholder?: string;\n hint?: ReactNode;\n error?: ReactNode;\n}\n\n/** A labelled native dropdown, styled like Input, for choosing one option from a short list. */\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(function Select(\n { label, options, placeholder, hint, error, id, className, ...rest },\n ref\n) {\n const ids = useFieldIds(id);\n\n return (\n <div className={cx(\"hds-field\", className)}>\n <label className=\"hds-label\" htmlFor={ids.id}>\n {label}\n </label>\n <div className=\"hds-select-wrap\">\n <select\n {...rest}\n ref={ref}\n id={ids.id}\n aria-invalid={error ? true : undefined}\n aria-describedby={describedBy({ hint, error, \"aria-describedby\": rest[\"aria-describedby\"] }, ids)}\n className=\"hds-select\"\n >\n {placeholder ? (\n <option value=\"\" disabled>\n {placeholder}\n </option>\n ) : null}\n {options.map((option) => (\n <option key={option.value} value={option.value} disabled={option.disabled}>\n {option.label}\n </option>\n ))}\n </select>\n <Icon name=\"chevron-down\" />\n </div>\n <FieldMessages hint={hint} error={error} ids={ids} />\n </div>\n );\n});\n","import { forwardRef, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { useFieldIds } from \"../../internal/field\";\nimport { Icon } from \"../../internal/Icon\";\n\nexport interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"type\"> {\n /** States the \"yes\" (\"Pago\"), never a negative. */\n label: ReactNode;\n hint?: ReactNode;\n}\n\n/** A checkbox whose whole label is clickable. */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(function Checkbox(\n { label, hint, id, className, ...rest },\n ref\n) {\n const ids = useFieldIds(id);\n\n return (\n <label className={cx(\"hds-checkbox\", className)} htmlFor={ids.id}>\n <span className=\"hds-checkbox-control\">\n <input\n {...rest}\n ref={ref}\n id={ids.id}\n type=\"checkbox\"\n className=\"hds-checkbox-input\"\n aria-describedby={hint ? ids.hint : rest[\"aria-describedby\"]}\n />\n <span className=\"hds-checkbox-box\">\n <Icon name=\"check\" />\n </span>\n </span>\n <span className=\"hds-checkbox-text\">\n {label}\n {hint ? (\n <span id={ids.hint} className=\"hds-hint\">\n {hint}\n </span>\n ) : null}\n </span>\n </label>\n );\n});\n","import type { ElementType, HTMLAttributes, ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport interface CardProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n /** The element to render. Default `article`; use `a` with `href` for a link card. */\n as?: ElementType;\n href?: string;\n /** An uppercase label above the title. */\n eyebrow?: ReactNode;\n title?: ReactNode;\n media?: { src: string; alt?: string };\n /** Actions or badges at the bottom. */\n footer?: ReactNode;\n /** The whole card is clickable; it scales up slightly on hover. */\n interactive?: boolean;\n}\n\n/** A solid raised block that groups one item's content. */\nexport function Card({\n as: Tag = \"article\",\n eyebrow,\n title,\n media,\n footer,\n interactive = false,\n className,\n children,\n ...rest\n}: CardProps) {\n return (\n <Tag {...rest} className={cx(\"hds-card\", interactive && \"hds-card--interactive\", className)}>\n {media ? <img className=\"hds-card-media\" src={media.src} alt={media.alt ?? \"\"} /> : null}\n <div className=\"hds-card-body\">\n {eyebrow ? <p className=\"hds-card-eyebrow\">{eyebrow}</p> : null}\n {title ? <h3 className=\"hds-card-title\">{title}</h3> : null}\n {children ? <div className=\"hds-card-text\">{children}</div> : null}\n </div>\n {footer ? <div className=\"hds-card-footer\">{footer}</div> : null}\n </Tag>\n );\n}\n","import type { ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\nimport { Icon, type IconName } from \"../../internal/Icon\";\n\nexport type BadgeTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\n\nconst TONE_ICONS: Partial<Record<BadgeTone, IconName>> = {\n accent: \"info\",\n success: \"circle-check\",\n warning: \"triangle-alert\",\n danger: \"circle-x\",\n};\n\nexport interface BadgeProps {\n tone?: BadgeTone;\n /** A Lucide icon, or `false` for none. Status tones show their own icon by default. */\n icon?: ReactNode | false;\n children?: ReactNode;\n className?: string;\n}\n\n/**\n * A small pill that states a status or a category in one or two words.\n * The word stays in ink; the tone shows in the icon and the tint, so color never carries the meaning alone.\n */\nexport function Badge({ tone = \"neutral\", icon, children, className }: BadgeProps) {\n const defaultIcon = TONE_ICONS[tone];\n const shownIcon = icon === false ? null : (icon ?? (defaultIcon ? <Icon name={defaultIcon} /> : null));\n\n return (\n <span className={cx(\"hds-badge\", `hds-badge--${tone}`, className)}>\n {shownIcon}\n {children}\n </span>\n );\n}\n","import type { ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport interface TableColumn<Row> {\n key: string;\n header: ReactNode;\n /** Mono, tabular figures, right-aligned. */\n numeric?: boolean;\n align?: \"start\" | \"center\";\n /** Renders the cell from the row; by default the cell shows `row[key]`. */\n render?: (row: Row) => ReactNode;\n}\n\nexport interface TableProps<Row> {\n columns: TableColumn<Row>[];\n rows: Row[];\n /** Key of each row's unique id. Default `id`. */\n rowKey?: keyof Row & string;\n /** Names the table and its scroll region. */\n caption?: string;\n /** Keeps the caption for screen readers only. */\n hideCaption?: boolean;\n /** Shown when there are no rows. Default \"Nada para mostrar.\". */\n empty?: ReactNode;\n maxHeight?: number | string;\n className?: string;\n}\n\nfunction cellClass<Row>(column: TableColumn<Row>) {\n if (column.numeric) return \"hds-cell--numeric\";\n return column.align === \"center\" ? \"hds-cell--center\" : undefined;\n}\n\n/** A solid data table with a sticky header, roomy rows and aligned numbers. */\nexport function Table<Row extends object>({\n columns,\n rows,\n rowKey = \"id\" as keyof Row & string,\n caption,\n hideCaption = false,\n empty = \"Nada para mostrar.\",\n maxHeight,\n className,\n}: TableProps<Row>) {\n return (\n <div\n className={cx(\"hds-table-wrap\", \"hds-scroll\", className)}\n role=\"region\"\n aria-label={caption}\n tabIndex={0}\n style={maxHeight !== undefined ? { maxHeight } : undefined}\n >\n <table className=\"hds-table\">\n {caption ? <caption className={hideCaption ? \"hds-visually-hidden\" : undefined}>{caption}</caption> : null}\n <thead>\n <tr>\n {columns.map((column) => (\n <th key={column.key} scope=\"col\" className={cellClass(column)}>\n {column.header}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.length ? (\n rows.map((row, index) => (\n <tr key={String(row[rowKey] ?? index)}>\n {columns.map((column) => (\n <td key={column.key} className={cellClass(column)}>\n {column.render ? column.render(row) : (row[column.key as keyof Row] as ReactNode)}\n </td>\n ))}\n </tr>\n ))\n ) : (\n <tr>\n <td colSpan={columns.length || 1} className=\"hds-table-empty\">\n {empty}\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n );\n}\n","import { useEffect, useSyncExternalStore } from \"react\";\nimport {\n applyStoredAppearance,\n getAppearance,\n setTheme,\n setTransparency,\n subscribeToAppearance,\n type Appearance,\n type Theme,\n type Transparency,\n} from \"./appearance\";\n\nlet initialized = false;\n\nconst serverAppearance: Appearance = { theme: \"dark\", transparency: \"full\" };\nlet lastSnapshot: Appearance = serverAppearance;\n\n// useSyncExternalStore needs the same object back while nothing has changed\nfunction snapshot(): Appearance {\n const current = getAppearance();\n if (current.theme !== lastSnapshot.theme || current.transparency !== lastSnapshot.transparency) {\n lastSnapshot = current;\n }\n return lastSnapshot;\n}\n\nexport interface UseAppearance extends Appearance {\n setTheme: (theme: Theme) => void;\n setTransparency: (transparency: Transparency) => void;\n toggleTheme: () => void;\n toggleTransparency: () => void;\n}\n\n/**\n * The page's theme and transparency, kept in sync across every component that uses it.\n * The first use applies the saved choice (dark when nothing is saved), unless the app already\n * called applyStoredAppearance() at startup.\n */\nexport function useAppearance(): UseAppearance {\n useEffect(() => {\n if (initialized) return;\n initialized = true;\n if (!document.documentElement.hasAttribute(\"data-theme\")) applyStoredAppearance();\n }, []);\n\n const appearance = useSyncExternalStore(subscribeToAppearance, snapshot, () => serverAppearance);\n\n return {\n ...appearance,\n setTheme,\n setTransparency,\n toggleTheme: () => setTheme(appearance.theme === \"dark\" ? \"light\" : \"dark\"),\n toggleTransparency: () => setTransparency(appearance.transparency === \"full\" ? \"reduced\" : \"full\"),\n };\n}\n","import { useAppearance } from \"../../appearance/useAppearance\";\nimport { Icon } from \"../../internal/Icon\";\nimport { Button, type ButtonProps } from \"../Button/Button\";\n\ntype ToggleProps = Omit<ButtonProps, \"onClick\" | \"children\" | \"icon\" | \"iconOnly\" | \"aria-label\" | \"aria-pressed\">;\n\nexport interface ThemeToggleProps extends ToggleProps {\n /** Accessible name while dark. Default \"Mudar para o tema claro\". */\n lightLabel?: string;\n /** Accessible name while light. Default \"Mudar para o tema escuro\". */\n darkLabel?: string;\n}\n\n/** Switches between the dark theme (the default) and the light one, and remembers the choice. */\nexport function ThemeToggle({\n lightLabel = \"Mudar para o tema claro\",\n darkLabel = \"Mudar para o tema escuro\",\n variant = \"ghost\",\n ...rest\n}: ThemeToggleProps) {\n const { theme, toggleTheme } = useAppearance();\n const label = theme === \"dark\" ? lightLabel : darkLabel;\n\n return (\n <Button\n {...rest}\n variant={variant}\n iconOnly\n icon={<Icon name={theme === \"dark\" ? \"sun\" : \"moon\"} />}\n aria-label={label}\n title={label}\n onClick={toggleTheme}\n />\n );\n}\n\nexport interface TransparencyToggleProps extends ToggleProps {\n /** Accessible name. Default \"Reduzir transparência\"; the pressed state says whether it is on. */\n label?: string;\n}\n\n/** Turns every glass surface solid, or back to glass, and remembers the choice. */\nexport function TransparencyToggle({ label = \"Reduzir transparência\", variant = \"ghost\", ...rest }: TransparencyToggleProps) {\n const { transparency, toggleTransparency } = useAppearance();\n\n return (\n <Button\n {...rest}\n variant={variant}\n iconOnly\n icon={<Icon name=\"blend\" />}\n aria-label={label}\n aria-pressed={transparency === \"reduced\"}\n title={label}\n onClick={toggleTransparency}\n />\n );\n}\n","import type { ElementType, HTMLAttributes } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport interface ContainerProps extends HTMLAttributes<HTMLElement> {\n /** The element to render. Default `section`. */\n as?: ElementType;\n /** Adds the sidebar's width as left padding from 768px up. */\n withSidebar?: boolean;\n}\n\n/** Centres page content at content-max, with a section's vertical rhythm and the side gutter. */\nexport function Container({ as: Tag = \"section\", withSidebar = false, className, ...rest }: ContainerProps) {\n return <Tag {...rest} className={cx(\"hds-container\", withSidebar && \"hds-container--with-sidebar\", className)} />;\n}\n","import type { ReactNode } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport interface SectionTitleProps {\n children: ReactNode;\n /** Shown zero-padded (3 → \"03\") before the heading, only when sections are a sequence. */\n index?: number;\n /** Heading level. Default `h2`. */\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\";\n id?: string;\n className?: string;\n}\n\n/** A page-section heading led by a glowing mono index, the portfolio's signature heading. */\nexport function SectionTitle({ children, index, as: Tag = \"h2\", id, className }: SectionTitleProps) {\n return (\n <Tag id={id} className={cx(\"hds-section-title\", className)}>\n {index !== undefined ? (\n <span className=\"hds-section-index\" aria-hidden=\"true\">\n {String(index).padStart(2, \"0\")}\n </span>\n ) : null}\n {children}\n </Tag>\n );\n}\n","import { cx } from \"../../internal/cx\";\n\nexport interface SeparatorProps {\n orientation?: \"horizontal\" | \"vertical\";\n /** Hides the line from screen readers when it only decorates. */\n decorative?: boolean;\n className?: string;\n}\n\n/** A 1px line that divides groups of content. */\nexport function Separator({ orientation = \"horizontal\", decorative = false, className }: SeparatorProps) {\n return (\n <div\n role={decorative ? \"none\" : \"separator\"}\n aria-orientation={decorative ? undefined : orientation}\n className={cx(\"hds-separator\", `hds-separator--${orientation}`, className)}\n />\n );\n}\n","import type { HTMLAttributes } from \"react\";\nimport { cx } from \"../../internal/cx\";\n\nexport interface ScrollAreaProps extends HTMLAttributes<HTMLDivElement> {\n /** Accessible name of the region. */\n label: string;\n maxHeight?: number | string;\n}\n\n/** A focusable scrollable region with the brand's slim scrollbars. */\nexport function ScrollArea({ label, maxHeight, className, style, ...rest }: ScrollAreaProps) {\n return (\n <div\n {...rest}\n role=\"region\"\n aria-label={label}\n tabIndex={0}\n className={cx(\"hds-scroll\", className)}\n style={{ maxHeight, ...style }}\n />\n );\n}\n","import { cx } from \"../../internal/cx\";\nimport { Icon } from \"../../internal/Icon\";\n\nexport interface LoadingProps {\n /** sm 16px · md 24px · lg 32px. */\n size?: \"sm\" | \"md\" | \"lg\";\n /** Announced to screen readers. Default \"Carregando…\". */\n label?: string;\n /** Shows the label beside the spinner. */\n showLabel?: boolean;\n className?: string;\n}\n\n/** A spinner that tells assistive technology something is loading. */\nexport function Loading({ size = \"md\", label = \"Carregando…\", showLabel = false, className }: LoadingProps) {\n return (\n <span role=\"status\" className={cx(\"hds-loading\", `hds-loading--${size}`, className)}>\n <Icon name=\"loader\" />\n <span className={showLabel ? undefined : \"hds-visually-hidden\"}>{label}</span>\n </span>\n );\n}\n","import { cx } from \"../../internal/cx\";\n\nexport interface GlowAvatarProps {\n src: string;\n /** The person's name. */\n alt: string;\n /** Diameter in px. Default 96. */\n size?: number;\n className?: string;\n}\n\n/** A round photo ringed in the accent with a soft glow behind it. One per view. */\nexport function GlowAvatar({ src, alt, size = 96, className }: GlowAvatarProps) {\n return (\n <span className={cx(\"hds-avatar\", className)} style={{ width: size, height: size }}>\n <span className=\"hds-avatar-glow\" aria-hidden=\"true\" />\n <img className=\"hds-avatar-image\" src={src} alt={alt} width={size} height={size} />\n </span>\n );\n}\n"],"mappings":";;;;;;AACA,SAAgBU,EAAG,GAAGC,GAA2D;CAC/E,OAAOA,EAAQ,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AACzC;;;ACaA,IAAaC,IAAaC,EAAyC,SACjE,EAAE,IAAIC,IAAM,OAAO,UAAO,WAAW,cAAW,GAAGC,KACnD,GACA;CACA,OAAO,kBAACD,GAAD;EAAK,GAAIC;EAAW;EAAK,WAAWL,EAAG,aAAaM,MAAS,aAAa,cAAcA,KAAQC,CAAS;CAAI,CAAA;AACtH,CAAC,GCjBKC,IAAO;CAAE,IAAI;CAAI,IAAI;CAAI,GAAG;AAAG,GAI/BC,IAAQ;CACZ,OAAO,CAAC,iBAAiB;CACzB,GAAG,CAAC,cAAc,YAAY;CAC9B,gBAAgB,CAAC,cAAc;CAC/B,gBAAgB,CAACD,GAAM,eAAe;CACtC,YAAY;EAACA;EAAM;EAAa;CAAU;CAC1C,kBAAkB;EAChB;EACA;EACA;CACF;CACA,MAAM;EAACA;EAAM;EAAa;CAAW;CACrC,QAAQ,CAAC,6BAA6B;CACtC,KAAK;EACH;GAAE,IAAI;GAAI,IAAI;GAAI,GAAG;EAAE;EACvB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM,CAAC,oCAAoC;CAC3C,OAAO,CACL;EAAE,IAAI;EAAG,IAAI;EAAG,GAAG;CAAE,GAC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G,OACE,kBAAC,QAAD;EAAM,MAAK;EAAS,WAAW7L,EAAG,eAAe,gBAAgBoB,KAAQb,CAAS;EAAlF,UAAA,CACE,kBAACG,GAAD,EAAM,MAAK,SAAU,CAAA,GACrB,kBAAC,QAAD;GAAM,WAAWoL,IAAY,KAAA,IAAY;GAAwB,UAAA/J;EAAY,CAAA,CACzE;;AAEV;;;ACTA,SAAgBgK,GAAW,EAAE,QAAK,QAAK,UAAO,IAAI,gBAA8B;CAC9E,OACE,kBAAC,QAAD;EAAM,WAAW/L,EAAG,cAAcO,CAAS;EAAG,OAAO;GAAE,OAAOa;GAAM,QAAQA;EAAK;EAAjF,UAAA,CACE,kBAAC,QAAD;GAAM,WAAU;GAAkB,eAAY;EAAQ,CAAA,GACtD,kBAAC,OAAD;GAAK,WAAU;GAAwB;GAAU;GAAK,OAAOA;GAAM,QAAQA;EAAO,CAAA,CAC9E;;AAEV"}
@@ -1,12 +1,35 @@
1
1
  declare const ICONS: {
2
- readonly check: readonly ["M20 6 9 17l-5-5"];
3
- readonly x: readonly ["M18 6 6 18", "m6 6 12 12"];
4
- readonly "chevron-down": readonly ["m6 9 6 6 6-6"];
5
- readonly "circle-check": readonly ["circle", "m9 12 2 2 4-4"];
6
- readonly "circle-x": readonly ["circle", "m15 9-6 6", "m9 9 6 6"];
7
- readonly "triangle-alert": readonly ["m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3", "M12 9v4", "M12 17h.01"];
8
- readonly info: readonly ["circle", "M12 16v-4", "M12 8h.01"];
9
- readonly loader: readonly ["M21 12a9 9 0 1 1-6.219-8.56"];
2
+ check: string[];
3
+ x: string[];
4
+ "chevron-down": string[];
5
+ "circle-check": (string | {
6
+ cx: number;
7
+ cy: number;
8
+ r: number;
9
+ })[];
10
+ "circle-x": (string | {
11
+ cx: number;
12
+ cy: number;
13
+ r: number;
14
+ })[];
15
+ "triangle-alert": string[];
16
+ info: (string | {
17
+ cx: number;
18
+ cy: number;
19
+ r: number;
20
+ })[];
21
+ loader: string[];
22
+ sun: (string | {
23
+ cx: number;
24
+ cy: number;
25
+ r: number;
26
+ })[];
27
+ moon: string[];
28
+ blend: {
29
+ cx: number;
30
+ cy: number;
31
+ r: number;
32
+ }[];
10
33
  };
11
34
  export type IconName = keyof typeof ICONS;
12
35
  type IconProps = {
package/dist/styles.css CHANGED
@@ -215,6 +215,11 @@
215
215
  outline-offset: 2px;
216
216
  }
217
217
 
218
+ /* The hidden attribute always wins over the display set by these styles */
219
+ [class*="hds-"][hidden] {
220
+ display: none !important;
221
+ }
222
+
218
223
  /* Dialogs and toasts render straight into <body>, outside .hds-root */
219
224
  .hds-scrim,
220
225
  .hds-toast-region {
@@ -686,18 +691,21 @@ html[data-transparency="reduced"] .hds-glass::before {
686
691
  display: inline-block;
687
692
  }
688
693
 
694
+ /* Rendered into <body> and placed from the trigger by the component, so scroll
695
+ containers never clip it; above dialogs, so a menu inside one still shows */
689
696
  .hds-menu-panel {
690
- position: absolute;
691
- top: calc(100% + var(--space-2));
692
- z-index: 30;
697
+ position: fixed;
698
+ top: 0;
699
+ left: 0;
700
+ z-index: 70;
693
701
  min-width: 176px;
702
+ max-height: calc(100vh - var(--space-4));
703
+ overflow: auto;
694
704
  padding: var(--space-1);
695
705
  border-radius: var(--radius-lg);
706
+ font-family: var(--font-sans);
696
707
  }
697
708
 
698
- .hds-menu-panel--start { left: 0; }
699
- .hds-menu-panel--end { right: 0; }
700
-
701
709
  .hds-menu-item {
702
710
  display: flex;
703
711
  align-items: center;
@@ -760,6 +768,10 @@ html[data-transparency="reduced"] .hds-glass::before {
760
768
  border-radius: var(--radius-2xl);
761
769
  }
762
770
 
771
+ .hds-dialog--lg {
772
+ max-width: 880px;
773
+ }
774
+
763
775
  .hds-dialog-header {
764
776
  display: flex;
765
777
  align-items: flex-start;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hemerson/design-system",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "Liquid-glass design system: tokens, styles and React components for Hemerson's projects.",
5
5
  "license": "MIT",
6
6
  "author": "Hemerson Oliveira",
@@ -41,6 +41,10 @@
41
41
  "types": "./dist/glass/index.d.ts",
42
42
  "import": "./dist/glass.js"
43
43
  },
44
+ "./appearance": {
45
+ "types": "./dist/appearance/index.d.ts",
46
+ "import": "./dist/appearance.js"
47
+ },
44
48
  "./styles.css": "./dist/styles.css",
45
49
  "./tokens.css": "./dist/tokens.css",
46
50
  "./tokens.json": "./dist/tokens.json"
@@ -55,10 +59,11 @@
55
59
  "typecheck": "tsc --noEmit",
56
60
  "lint": "eslint .",
57
61
  "prepare": "husky",
58
- "prepublishOnly": "npm run lint && npm run typecheck && npm test && npm run build",
62
+ "prepublishOnly": "npm run lint && npm run typecheck && npm test && npm run build && npm run test:types",
59
63
  "changeset": "changeset",
60
64
  "version-packages": "changeset version",
61
- "release": "changeset publish"
65
+ "release": "changeset publish",
66
+ "test:types": "tsc -p tsconfig.type-tests.json"
62
67
  },
63
68
  "peerDependencies": {
64
69
  "react": ">=18.2 <20",