@hemerson/design-system 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +78 -2
- package/dist/components/Badge/Badge.d.ts +14 -0
- package/dist/components/Button/Button.d.ts +17 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +19 -0
- package/dist/components/Checkbox/Checkbox.d.ts +8 -0
- package/dist/components/Container/Container.d.ts +9 -0
- package/dist/components/Dialog/Dialog.d.ts +18 -0
- package/dist/components/FloatingButton/FloatingButton.d.ts +9 -0
- package/dist/components/GlassPanel/GlassPanel.d.ts +13 -0
- package/dist/components/GlowAvatar/GlowAvatar.d.ts +10 -0
- package/dist/components/Input/Input.d.ts +12 -0
- package/dist/components/Loading/Loading.d.ts +11 -0
- package/dist/components/Menu/Menu.d.ts +25 -0
- package/dist/components/NavBar/NavBar.d.ts +20 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +8 -0
- package/dist/components/SectionTitle/SectionTitle.d.ts +12 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +21 -0
- package/dist/components/Select/Select.d.ts +16 -0
- package/dist/components/Separator/Separator.d.ts +8 -0
- package/dist/components/Sidebar/Sidebar.d.ts +21 -0
- package/dist/components/Table/Table.d.ts +26 -0
- package/dist/components/Toast/Toast.d.ts +16 -0
- package/dist/glass/enableGlassRefraction.d.ts +9 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +726 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/Icon.d.ts +17 -0
- package/dist/internal/cx.d.ts +2 -0
- package/dist/internal/field.d.ts +16 -0
- package/dist/styles.css +1249 -0
- package/dist/tokens.css +184 -0
- package/dist/tokens.json +514 -0
- package/package.json +86 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["TONE_ICONS","_Fragment","cx","classes","GlassPanel","forwardRef","Tag","rest","tone","className","SVG","enableGlassRefraction","isChromium","brand","reducesTransparency","svg","filter","name","value","values","node","key","ICONS","Icon","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","buttons","useRef","thumb","selectedIndex","option","measure","button","select","next","onChange","onKeyDown","step","event","nextIndex","isSelected","index","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/glass/enableGlassRefraction.ts","../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","const SVG = \"http://www.w3.org/2000/svg\";\n\n/**\n * Adds the SVG filter that makes glass refract its backdrop, and marks\n * `<html data-glass-refraction>` so the styles use it.\n *\n * Only Chromium renders the effect. Firefox accepts it in `@supports` and then\n * drops the whole backdrop-filter, blur included, so other browsers are left alone.\n * Returns whether refraction was turned on.\n */\nexport function enableGlassRefraction(): boolean {\n if (typeof document === \"undefined\") return false;\n\n const brands = (navigator as Navigator & { userAgentData?: { brands: { brand: string }[] } }).userAgentData?.brands ?? [];\n const isChromium = brands.some(({ brand }) => brand.includes(\"Chromium\"));\n const reducesTransparency = window.matchMedia?.(\"(prefers-reduced-transparency: reduce)\").matches ?? false;\n\n if (!isChromium || reducesTransparency) return false;\n\n if (!document.getElementById(\"hds-glass-defs\")) {\n const svg = document.createElementNS(SVG, \"svg\");\n svg.setAttribute(\"id\", \"hds-glass-defs\");\n svg.setAttribute(\"width\", \"0\");\n svg.setAttribute(\"height\", \"0\");\n svg.setAttribute(\"aria-hidden\", \"true\");\n svg.style.position = \"absolute\";\n\n const filter = document.createElementNS(SVG, \"filter\");\n const attributes: Record<string, string> = {\n id: \"hds-glass-distortion\",\n x: \"-20%\",\n y: \"-20%\",\n width: \"140%\",\n height: \"140%\",\n filterUnits: \"objectBoundingBox\",\n };\n Object.entries(attributes).forEach(([name, value]) => filter.setAttribute(name, value));\n\n const steps: Array<[string, Record<string, string>]> = [\n [\"feTurbulence\", { type: \"fractalNoise\", baseFrequency: \"0.012 0.012\", numOctaves: \"2\", seed: \"8\", result: \"noise\" }],\n [\"feGaussianBlur\", { in: \"noise\", stdDeviation: \"3\", result: \"blurredNoise\" }],\n [\"feDisplacementMap\", { in: \"SourceGraphic\", in2: \"blurredNoise\", scale: \"40\", xChannelSelector: \"R\", yChannelSelector: \"G\" }],\n ];\n for (const [name, values] of steps) {\n const node = document.createElementNS(SVG, name);\n Object.entries(values).forEach(([key, value]) => node.setAttribute(key, value));\n filter.appendChild(node);\n }\n\n svg.appendChild(filter);\n document.body.appendChild(svg);\n }\n\n document.documentElement.setAttribute(\"data-glass-refraction\", \"\");\n return true;\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,SAAgBE,EAAG,GAAGC,GAA2D;CAC/E,OAAOA,EAAQ,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AACzC;;;ACaA,IAAaC,IAAaC,EAAyC,SACjE,EAAE,IAAIC,IAAM,O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AAO,GAAGhJ,KAAyB;CAC3F,OACE,kBAAC,OAAD;EACE,GAAIA;EACJ,MAAK;EACL,cAAYkC;EACZ,UAAU;EACV,WAAWvC,EAAG,cAAcO,CAAS;EACrC,OAAO;GAAE;GAAW,GAAG+I;EAAM;CAC9B,CAAA;AAEL;;;ACPA,SAAgBC,EAAQ,EAAE,UAAO,MAAM,WAAQ,eAAe,eAAY,IAAO,gBAA2B;CAC1G,OACE,kBAAC,QAAD;EAAM,MAAK;EAAS,WAAWvJ,EAAG,eAAe,gBAAgB4B,KAAQrB,CAAS;EAAlF,UAAA,CACE,kBAACc,GAAD,EAAM,MAAK,SAAU,CAAA,GACrB,kBAAC,QAAD;GAAM,WAAWmI,IAAY,KAAA,IAAY;GAAwB,UAAAjH;EAAY,CAAA,CACzE;;AAEV;;;ACTA,SAAgBkH,EAAW,EAAE,QAAK,QAAK,UAAO,IAAI,gBAA8B;CAC9E,OACE,kBAAC,QAAD;EAAM,WAAWzJ,EAAG,cAAcO,CAAS;EAAG,OAAO;GAAE,OAAOqB;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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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"];
|
|
10
|
+
};
|
|
11
|
+
export type IconName = keyof typeof ICONS;
|
|
12
|
+
type IconProps = {
|
|
13
|
+
name: IconName;
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function Icon({ name, className }: IconProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface FieldTextProps {
|
|
3
|
+
hint?: ReactNode;
|
|
4
|
+
error?: ReactNode;
|
|
5
|
+
"aria-describedby"?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Ids for a field and its hint and error, so they can be linked with aria-describedby. */
|
|
8
|
+
export declare function useFieldIds(id?: string): {
|
|
9
|
+
id: string;
|
|
10
|
+
hint: string;
|
|
11
|
+
error: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function describedBy(props: FieldTextProps, ids: ReturnType<typeof useFieldIds>): string | undefined;
|
|
14
|
+
export declare function FieldMessages({ hint, error, ids }: FieldTextProps & {
|
|
15
|
+
ids: ReturnType<typeof useFieldIds>;
|
|
16
|
+
}): import("react").JSX.Element;
|