@manakind/ui-core 0.25.0 → 0.26.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/README.md +7 -5
- package/dist/alert/alert.js.map +1 -1
- package/dist/alert/index.js.map +1 -1
- package/dist/avatar/avatar.js.map +1 -1
- package/dist/avatar/index.js.map +1 -1
- package/dist/badge/badge.js.map +1 -1
- package/dist/badge/index.js.map +1 -1
- package/dist/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/breadcrumb/index.js.map +1 -1
- package/dist/button/button.js.map +1 -1
- package/dist/button/icon-button.d.ts +11 -3
- package/dist/button/icon-button.d.ts.map +1 -1
- package/dist/button/icon-button.js +5 -3
- package/dist/button/icon-button.js.map +1 -1
- package/dist/button/index.js.map +1 -1
- package/dist/calendar/calendar.js.map +1 -1
- package/dist/calendar/index.js.map +1 -1
- package/dist/card/card.js.map +1 -1
- package/dist/card/index.js.map +1 -1
- package/dist/centered-layout/centered-layout.js.map +1 -1
- package/dist/centered-layout/index.js.map +1 -1
- package/dist/checkbox/checkbox.js.map +1 -1
- package/dist/checkbox/index.js.map +1 -1
- package/dist/combobox/combobox.d.ts.map +1 -1
- package/dist/combobox/combobox.js +3 -2
- package/dist/combobox/combobox.js.map +1 -1
- package/dist/combobox/index.js.map +1 -1
- package/dist/cx.js.map +1 -1
- package/dist/date-input/date-input.js.map +1 -1
- package/dist/date-input/index.js.map +1 -1
- package/dist/dialog/dialog-close.js.map +1 -1
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/dialog/index.js.map +1 -1
- package/dist/divider/divider.js.map +1 -1
- package/dist/divider/index.js.map +1 -1
- package/dist/empty-state/empty-state.js.map +1 -1
- package/dist/empty-state/index.js.map +1 -1
- package/dist/fallback-glyphs.js.map +1 -1
- package/dist/field/field.js.map +1 -1
- package/dist/field/index.js.map +1 -1
- package/dist/field/input.js.map +1 -1
- package/dist/field/textarea.js.map +1 -1
- package/dist/field/use-field-control.js.map +1 -1
- package/dist/form-layout/form-layout.js.map +1 -1
- package/dist/form-layout/index.js.map +1 -1
- package/dist/group-items.js.map +1 -1
- package/dist/icon/icon.js.map +1 -1
- package/dist/icon/index.js.map +1 -1
- package/dist/illustration/illustration.js.map +1 -1
- package/dist/illustration/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/iso-date.js.map +1 -1
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/layout.js.map +1 -1
- package/dist/link/index.js.map +1 -1
- package/dist/link/link.js.map +1 -1
- package/dist/link-component.js.map +1 -1
- package/dist/menu/action-menu.js.map +1 -1
- package/dist/menu/index.js.map +1 -1
- package/dist/menu/menu.js.map +1 -1
- package/dist/page-layout/index.js.map +1 -1
- package/dist/page-layout/page-layout.js.map +1 -1
- package/dist/popover/index.js.map +1 -1
- package/dist/popover/popover.js.map +1 -1
- package/dist/portal-container.js.map +1 -1
- package/dist/progress/index.js.map +1 -1
- package/dist/progress/progress.js.map +1 -1
- package/dist/reorder-control/index.js.map +1 -1
- package/dist/reorder-control/reorder-control.js.map +1 -1
- package/dist/scroll-area/index.js.map +1 -1
- package/dist/scroll-area/scroll-area.js.map +1 -1
- package/dist/section/index.js.map +1 -1
- package/dist/section/section.js.map +1 -1
- package/dist/segment-group/index.d.ts +1 -1
- package/dist/segment-group/index.d.ts.map +1 -1
- package/dist/segment-group/index.js.map +1 -1
- package/dist/segment-group/segment-group.css +63 -3
- package/dist/segment-group/segment-group.d.ts +27 -1
- package/dist/segment-group/segment-group.d.ts.map +1 -1
- package/dist/segment-group/segment-group.js +11 -2
- package/dist/segment-group/segment-group.js.map +1 -1
- package/dist/select/index.js.map +1 -1
- package/dist/select/select.css +3 -3
- package/dist/select/select.js.map +1 -1
- package/dist/show/index.js.map +1 -1
- package/dist/show/show.js.map +1 -1
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/skeleton.js.map +1 -1
- package/dist/slider/index.js.map +1 -1
- package/dist/slider/slider.css +5 -3
- package/dist/slider/slider.js.map +1 -1
- package/dist/spinner/index.js.map +1 -1
- package/dist/spinner/spinner.js.map +1 -1
- package/dist/split-layout/index.js.map +1 -1
- package/dist/split-layout/split-layout.js.map +1 -1
- package/dist/sticky/index.js.map +1 -1
- package/dist/sticky/sticky.js.map +1 -1
- package/dist/switch/index.js.map +1 -1
- package/dist/switch/switch.js.map +1 -1
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/tabs.js.map +1 -1
- package/dist/text/index.js.map +1 -1
- package/dist/text/text.js.map +1 -1
- package/dist/tooltip/index.d.ts +2 -0
- package/dist/tooltip/index.d.ts.map +1 -0
- package/dist/tooltip/index.js +2 -0
- package/dist/tooltip/index.js.map +1 -0
- package/dist/tooltip/tooltip.css +20 -0
- package/dist/tooltip/tooltip.css.d.ts +2 -0
- package/dist/tooltip/tooltip.d.ts +38 -0
- package/dist/tooltip/tooltip.d.ts.map +1 -0
- package/dist/tooltip/tooltip.js +41 -0
- package/dist/tooltip/tooltip.js.map +1 -0
- package/dist/visually-hidden/index.js.map +1 -1
- package/dist/visually-hidden/visually-hidden.js.map +1 -1
- package/dist/wizard-layout/index.js.map +1 -1
- package/dist/wizard-layout/wizard-layout.js.map +1 -1
- package/package.json +10 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.js","sourceRoot":"","sources":["../../src/combobox/combobox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAQL,WAAW,EACX,UAAU,EACV,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf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,EACb,QAAQ,EAAE,CAAC,CAAC,EACZ,SAAS,EAAC,kBAAkB,gBAChB,aAAa,KAAK,CAAC,KAAK,EAAE,kBACxB,GAAG,CAAC,MAAM,cACf,EAAE,iBACE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,YAE3C,KAAC,IAAI,IAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,IAAI,EAAC,UAAU,SAAG,GACvC,GACD,CACX,IACI,CACR,CAAC;AACJ,CAAC;AAQD,SAAS,UAAU,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAmB;IAClE,OAAO,CACL,gBAAM,SAAS,EAAC,mBAAmB,aAChC,KAAK,CAAC,IAAI,EACX,yBAAO,KAAK,CAAC,KAAK,GAAQ,EAC1B,KAAC,OAAO,IAAC,OAAO,EAAC,gBAAgB,EAAC,IAAI,EAAC,OAAO,YAC5C,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,0BAA0B,gBACxB,qBAAqB,KAAK,CAAC,KAAK,EAAE,EAC9C,OAAO,EAAE,QAAQ,YAEjB,KAAC,IAAI,IAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAC,IAAI,EAAC,UAAU,SAAG,GAC1C,GACD,IACL,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { Popover as ArkPopover } from '@ark-ui/react/popover';\nimport { Portal } from '@ark-ui/react/portal';\nimport { getTabbableEdges, getTabbables, isComposingEvent } from '@zag-js/dom-query';\nimport {\n type ChangeEvent,\n type KeyboardEvent,\n type MouseEvent,\n type PointerEvent,\n type ReactNode,\n type Ref,\n type TdHTMLAttributes,\n useCallback,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { flushSync } from 'react-dom';\nimport { cx } from '../cx';\nimport { Cross, Pin } from '../fallback-glyphs';\nimport { groupItems } from '../group-items';\nimport { Icon, type IconSource } from '../icon/icon';\nimport { PortalContainerContext } from '../portal-container';\nimport { Tooltip } from '../tooltip/tooltip';\nimport '../visually-hidden/visually-hidden.css';\nimport './combobox.css';\n\nexport type ComboboxSize = 'sm' | 'md' | 'lg';\n\n/** What an option belongs to, shown in a second column: its category, its project. */\nexport interface ComboboxFacet {\n /** Stable value reported when the facet is pinned. */\n value: string;\n /** Text in the facet column, and in the pinned chip. */\n label: string;\n /** Decorative mark before the label, such as the category's icon. */\n icon?: ReactNode;\n}\n\nexport interface ComboboxItem {\n /** Stable value reported by `onSelect`. */\n value: string;\n /** Option text, also what screen readers use. */\n label: string;\n /** Optional secondary line under the label, shown muted. */\n description?: string;\n /** Individually disable this option without removing it. */\n disabled?: boolean;\n /**\n * The group the option is listed under, by its heading. Options sharing a\n * group are listed together under it, groups in the order they first\n * appear; options without one (or with an empty name) are listed before\n * any group.\n */\n group?: string;\n /** What the option belongs to, shown in the facet column when `facets` is set. */\n facet?: ComboboxFacet;\n}\n\n/**\n * A second column naming what each option belongs to, with a pin that\n * narrows the list to it.\n */\nexport interface ComboboxFacets {\n /** Heading of the option column, for assistive tech: \"Action\". */\n itemLabel: string;\n /** Heading of the facet column, for assistive tech: \"Category\". */\n label: string;\n /** The facet the list is narrowed to, shown as a removable chip in the status line. */\n pinned?: ComboboxFacet | null;\n /**\n * Pins a row's facet, or unpins it with `null` (its pin pressed again, the\n * chip's remove button, or Backspace in the empty field). The caller does\n * the narrowing. Without it, the facet column shows no pins.\n */\n onPinnedChange?: (facet: ComboboxFacet | null) => void;\n}\n\nexport interface ComboboxProps {\n /**\n * Suggestions for the current text.\n *\n * The caller filters, sorts and groups them; the component does not. What\n * counts as a match (a prefix, a substring, a category's name, anything\n * not already chosen) is the product's call, and the list it passes is the\n * list that shows.\n */\n items: ComboboxItem[];\n /** Controlled text in the input. */\n inputValue: string;\n /** Fired with the new text on every keystroke, and with `''` after a choice. */\n onInputValueChange: (value: string) => void;\n /**\n * A suggestion was chosen. The input then clears (`onInputValueChange('')`)\n * and the field holds no value: this is the \"add to a list\" pattern. A\n * field that keeps its choice is a `Select`.\n */\n onSelect: (value: string) => void;\n /**\n * Visible label. Strongly preferred over `aria-label` — a visible label\n * helps everyone, not only screen reader users.\n */\n label?: ReactNode;\n /** Accessible name when no visible `label` is supplied. */\n 'aria-label'?: string;\n /** Text shown in the empty input. */\n placeholder?: string;\n /** Shown in the open list when `items` is empty. */\n emptyText?: ReactNode;\n /**\n * Controls at the top of the open list that change what it shows: a\n * `Switch`, a small `SegmentGroup`. One row of them, so the options stay\n * in view; Tab moves into them from the field.\n */\n toolbar?: ReactNode;\n /**\n * One line under the toolbar saying what the list shows, such as \"Showing\n * all actions in Health\". Announced politely as it changes.\n */\n status?: ReactNode;\n /** Adds the facet column, with its pins. The list becomes a grid. */\n facets?: ComboboxFacets;\n /** Glyph of a row's pin. Defaults to the inlined fallback pin. */\n pinIcon?: IconSource;\n /** Glyph of the pinned chip's remove button. Defaults to the inlined fallback cross. */\n removeIcon?: IconSource;\n /** Control height and type scale. */\n size?: ComboboxSize;\n /** Disable the whole control. */\n disabled?: boolean;\n /** Marks the field invalid for assistive tech and styling. */\n invalid?: boolean;\n /** Extra class names appended after `ds-combobox` modifiers. */\n className?: string;\n /** The text input, for moving focus back to the field, e.g. after removing an item it added. */\n inputRef?: Ref<HTMLInputElement>;\n}\n\ntype Cell = 'item' | 'facet';\n\ninterface Active {\n value: string;\n cell: Cell;\n}\n\n// The header's own controls, which a press may focus.\nconst HEADER_CONTROLS = 'button, input, label, a[href], [tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * A text input that suggests options as you type, with optional controls at\n * the top of the open list.\n *\n * Choosing a suggestion reports it through `onSelect` and empties the input,\n * so the field is ready for the next one: the control for adding items to a\n * list one at a time. It never holds a selection itself; the caller keeps\n * the list. For a field that keeps one choice, use `Select`.\n *\n * The open list can carry what narrows it, so nothing sits outside the\n * field: a `toolbar` row of switches or a segment group, a `status` line\n * saying what is shown, and with `facets` a second column naming what each\n * option belongs to, whose pin narrows the list to it.\n *\n * ```tsx\n * <Combobox\n * label=\"Add actions\"\n * items={matches}\n * inputValue={query}\n * onInputValueChange={setQuery}\n * onSelect={(value) => setPicked((list) => [...list, value])}\n * toolbar={<Switch size=\"sm\" label=\"Include categories\" checked={…} onCheckedChange={…} />}\n * status={`Showing all actions that contain “${query}”`}\n * facets={{ itemLabel: 'Action', label: 'Category', pinned, onPinnedChange: setPinned }}\n * />\n * ```\n *\n * The field is the APG editable combobox. Focus stays in the input, and the\n * active option is `aria-activedescendant`. Typing highlights the first\n * option, so Enter takes it, and Up and Down walk the options in their drawn\n * order. With `facets` the popup is a grid instead of a listbox: Right, at\n * the end of the text, moves onto the row's pin and Enter then pins it, and\n * Left moves back. Tab moves from the field into the toolbar and the chip,\n * and on out to the next field.\n *\n * The popup is an Ark Popover anchored to the field, so it takes part in\n * the dismiss stack. Escape closes it before a `Dialog` around it, and a\n * click outside closes it. Its wrapper drops the Popover's dialog role, so\n * the listbox or grid inside is the popup assistive tech meets. It portals\n * like `Select`'s list: into `<body>`, or into the panel of the ui-core\n * `Dialog` it opens in, at `z-index: 60`.\n * The field reads the `--ds-input-*` keys and the list the `--ds-select-*`\n * keys, so it reads as one family with `Input` and `Select`.\n */\nexport function Combobox({\n items,\n inputValue,\n onInputValueChange,\n onSelect,\n label,\n 'aria-label': ariaLabel,\n placeholder,\n emptyText,\n toolbar,\n status,\n facets,\n pinIcon = Pin,\n removeIcon = Cross,\n size = 'md',\n disabled,\n invalid,\n className,\n inputRef,\n}: ComboboxProps) {\n const id = useId();\n const inputId = `${id}-input`;\n const labelId = `${id}-label`;\n const listId = `${id}-list`;\n const statusId = `${id}-status`;\n const rowId = (index: number) => `${id}-row-${index}`;\n const cellId = (index: number, cell: Cell) => `${id}-cell-${index}-${cell}`;\n\n const rootRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const inputEl = useRef<HTMLInputElement | null>(null);\n const portalContainer = useContext(PortalContainerContext);\n\n const [open, setOpen] = useState(false);\n const [chosen, setChosen] = useState<Active | null>(null);\n const isOpen = open && !disabled;\n const isGrid = facets !== undefined;\n const pinned = facets?.pinned ?? null;\n const canPin = (item: ComboboxItem) => Boolean(facets?.onPinnedChange && item.facet);\n\n const groups = useMemo(() => groupItems(items), [items]);\n const ordered = useMemo(() => groups.flatMap((group) => group.items), [groups]);\n const navigable = useMemo(() => ordered.filter((item) => !item.disabled), [ordered]);\n\n const chosenItem = chosen && navigable.find((item) => item.value === chosen.value);\n const active: Active | null = chosenItem\n ? {\n value: chosenItem.value,\n cell: chosen?.cell === 'facet' && canPin(chosenItem) ? 'facet' : 'item',\n }\n : inputValue !== '' && navigable[0]\n ? { value: navigable[0].value, cell: 'item' }\n : null;\n const activeIndex = active ? ordered.findIndex((item) => item.value === active.value) : -1;\n const activeDescendant =\n isOpen && active && activeIndex >= 0\n ? isGrid\n ? cellId(activeIndex, active.cell)\n : rowId(activeIndex)\n : undefined;\n\n const setInputRef = useCallback(\n (element: HTMLInputElement | null) => {\n inputEl.current = element;\n if (typeof inputRef === 'function') inputRef(element);\n else if (inputRef) inputRef.current = element;\n },\n [inputRef],\n );\n\n /*\n * The popup portals out of the field, so the browser's Tab order would\n * skip it. While it is open, Tab from the field moves into its header's\n * controls, Tab from the last one moves on to whatever follows the field,\n * and Shift+Tab walks back the same way. Only the header counts, as the\n * pins are reached with the arrows; with no header control, Tab is the\n * browser's. A window listener, so it lives in an effect, and so it runs\n * ahead of a Dialog's focus trap: the popup is the end of the dialog's\n * panel, and the trap would wrap Tab from its last control to the\n * dialog's first.\n */\n useEffect(() => {\n if (!isOpen) return;\n const handleTab = (event: globalThis.KeyboardEvent) => {\n const header = headerRef.current;\n const content = contentRef.current;\n const field = inputEl.current;\n if (event.key !== 'Tab' || !header || !content || !field) return;\n const [first, last] = getTabbableEdges(header);\n if (!first || !last) return;\n const scope = field.closest<HTMLElement>('[aria-modal=\"true\"]') ?? field.ownerDocument.body;\n const tabbables = getTabbables(scope);\n const after = tabbables\n .slice(tabbables.indexOf(field) + 1)\n .find((element) => !content.contains(element));\n const current = field.ownerDocument.activeElement;\n let target: HTMLElement | undefined;\n if (event.shiftKey) target = current === first ? field : current === after ? last : undefined;\n else target = current === field ? first : current === last ? after : undefined;\n if (!target) return;\n event.preventDefault();\n if (target === after) event.stopPropagation();\n target.focus({ preventScroll: true });\n };\n window.addEventListener('keydown', handleTab, true);\n return () => window.removeEventListener('keydown', handleTab, true);\n }, [isOpen]);\n\n const activate = (next: Active | null) => {\n flushSync(() => setChosen(next));\n if (!next) return;\n const index = ordered.findIndex((item) => item.value === next.value);\n document.getElementById(rowId(index))?.scrollIntoView?.({ block: 'nearest' });\n };\n\n const move = (step: 1 | -1) => {\n if (navigable.length === 0) return;\n const from = active ? navigable.findIndex((item) => item.value === active.value) : -1;\n const to =\n from === -1\n ? step === 1\n ? 0\n : navigable.length - 1\n : (from + step + navigable.length) % navigable.length;\n const item = navigable[to];\n activate({\n value: item.value,\n cell: active?.cell === 'facet' && canPin(item) ? 'facet' : 'item',\n });\n };\n\n const focusFieldFromPopup = () => {\n if (contentRef.current?.contains(document.activeElement)) inputEl.current?.focus();\n };\n\n const handleOpenChange = (details: { open: boolean }) => {\n setOpen(details.open);\n if (!details.open) setChosen(null);\n };\n\n const choose = (item: ComboboxItem) => {\n if (item.disabled) return;\n focusFieldFromPopup();\n onSelect(item.value);\n onInputValueChange('');\n setChosen(null);\n setOpen(false);\n };\n\n const togglePin = (facet: ComboboxFacet) => {\n facets?.onPinnedChange?.(pinned?.value === facet.value ? null : facet);\n setChosen(null);\n };\n\n const unpin = () => {\n facets?.onPinnedChange?.(null);\n inputEl.current?.focus();\n };\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setChosen(null);\n setOpen(true);\n onInputValueChange(event.target.value);\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (isComposingEvent(event) || event.ctrlKey || event.shiftKey) return;\n const input = event.currentTarget;\n const activeItem = activeIndex >= 0 ? ordered[activeIndex] : undefined;\n const caretAtEnd =\n input.selectionStart === input.value.length && input.selectionEnd === input.value.length;\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n if (!isOpen) setOpen(true);\n move(event.key === 'ArrowDown' ? 1 : -1);\n } else if (event.key === 'ArrowRight' && isOpen && activeItem && active?.cell === 'item') {\n if (isGrid && canPin(activeItem) && caretAtEnd) {\n event.preventDefault();\n activate({ value: activeItem.value, cell: 'facet' });\n }\n } else if (event.key === 'ArrowLeft' && isOpen && activeItem && active?.cell === 'facet') {\n event.preventDefault();\n activate({ value: activeItem.value, cell: 'item' });\n } else if (event.key === 'Enter' && isOpen && activeItem) {\n event.preventDefault();\n if (active?.cell === 'facet' && activeItem.facet) togglePin(activeItem.facet);\n else choose(activeItem);\n } else if (event.key === 'Backspace' && input.value === '' && pinned) {\n facets?.onPinnedChange?.(null);\n }\n };\n\n const rowIndexOf = (target: EventTarget) => {\n const row = (target as Element).closest<HTMLElement>('[data-index]');\n return row ? Number(row.dataset.index) : -1;\n };\n\n const handleListClick = (event: MouseEvent) => {\n const item = ordered[rowIndexOf(event.target)];\n if (!item) return;\n if ((event.target as Element).closest('[data-pin]') && item.facet) togglePin(item.facet);\n else choose(item);\n };\n\n const handleListPointerMove = (event: PointerEvent) => {\n const item = ordered[rowIndexOf(event.target)];\n if (item && !item.disabled && item.value !== active?.value) {\n setChosen({ value: item.value, cell: 'item' });\n }\n };\n\n const listName = label ? { 'aria-labelledby': labelId } : { 'aria-label': ariaLabel };\n const hasStatus = status !== undefined || pinned !== null;\n const hasHeader = toolbar !== undefined || hasStatus;\n const isEmpty = items.length === 0 && emptyText !== undefined;\n\n const rowOf = (item: ComboboxItem): RowModel => {\n const index = ordered.indexOf(item);\n const isActive = isOpen && index === activeIndex;\n return {\n item,\n index,\n rowId: rowId(index),\n itemCellId: cellId(index, 'item'),\n facetCellId: cellId(index, 'facet'),\n highlighted: isActive,\n pinnable: canPin(item),\n pinned: pinned !== null && pinned.value === item.facet?.value,\n pinActive: isActive && active?.cell === 'facet',\n };\n };\n const sections: Section[] = groups.map((group, groupIndex) => ({\n label: group.label,\n headingId: `${id}-group-${groupIndex}`,\n rows: group.items.map(rowOf),\n }));\n\n /*\n * Mouse input never takes focus from the field, so typing carries on: a\n * press on a row, a pin or the header's background is cancelled. Only the\n * header's own controls (a switch, a segment, the chip's remove button)\n * take focus, as they would anywhere.\n */\n const handleContentMouseDown = (event: MouseEvent) => {\n const target = event.target as Element;\n if (target.closest('.ds-combobox__list') || !target.closest(HEADER_CONTROLS)) {\n event.preventDefault();\n }\n };\n\n return (\n <ArkPopover.Root\n open={isOpen}\n onOpenChange={handleOpenChange}\n lazyMount\n unmountOnExit\n autoFocus={false}\n restoreFocus={false}\n portalled={false}\n persistentElements={[() => rootRef.current]}\n onEscapeKeyDown={focusFieldFromPopup}\n positioning={{ placement: 'bottom-start', sameWidth: true }}\n >\n <div ref={rootRef} className={cx('ds-combobox', `ds-combobox--${size}`, className)}>\n {label && (\n <label\n id={labelId}\n htmlFor={inputId}\n className=\"ds-combobox__label\"\n data-disabled={disabled ? '' : undefined}\n >\n {label}\n </label>\n )}\n <ArkPopover.Anchor className=\"ds-combobox__control\">\n <input\n ref={setInputRef}\n id={inputId}\n type=\"text\"\n role=\"combobox\"\n className=\"ds-combobox__input\"\n value={inputValue}\n placeholder={placeholder}\n aria-label={label ? undefined : ariaLabel}\n aria-autocomplete=\"list\"\n aria-haspopup={isGrid ? 'grid' : 'listbox'}\n aria-expanded={isOpen}\n aria-controls={isOpen ? listId : undefined}\n aria-activedescendant={activeDescendant}\n aria-describedby={isOpen && hasStatus ? statusId : undefined}\n aria-invalid={invalid || undefined}\n data-invalid={invalid ? '' : undefined}\n disabled={disabled}\n autoComplete=\"off\"\n autoCorrect=\"off\"\n autoCapitalize=\"none\"\n spellCheck={false}\n onChange={handleChange}\n onClick={() => setOpen(true)}\n onKeyDown={handleKeyDown}\n />\n </ArkPopover.Anchor>\n </div>\n\n <Portal container={portalContainer}>\n <ArkPopover.Positioner>\n <ArkPopover.Content\n ref={contentRef}\n role=\"presentation\"\n className=\"ds-combobox__content\"\n onMouseDown={handleContentMouseDown}\n onClick={handleListClick}\n onPointerMove={handleListPointerMove}\n >\n {hasHeader && (\n <div ref={headerRef} className=\"ds-combobox__header\">\n {toolbar && <div className=\"ds-combobox__toolbar\">{toolbar}</div>}\n {hasStatus && (\n <p id={statusId} role=\"status\" className=\"ds-combobox__status\">\n {status}\n {pinned && (\n <>\n {' '}\n <PinnedChip facet={pinned} removeIcon={removeIcon} onRemove={unpin} />\n </>\n )}\n </p>\n )}\n </div>\n )}\n {facets ? (\n <GridList\n id={listId}\n name={listName}\n facets={facets}\n sections={sections}\n emptyText={isEmpty ? emptyText : undefined}\n pinIcon={pinIcon}\n />\n ) : (\n <ListboxList\n id={listId}\n name={listName}\n sections={sections}\n emptyText={isEmpty ? emptyText : undefined}\n />\n )}\n </ArkPopover.Content>\n </ArkPopover.Positioner>\n </Portal>\n </ArkPopover.Root>\n );\n}\n\ninterface RowModel {\n item: ComboboxItem;\n index: number;\n rowId: string;\n itemCellId: string;\n facetCellId: string;\n highlighted: boolean;\n pinnable: boolean;\n pinned: boolean;\n pinActive: boolean;\n}\n\ninterface Section {\n label?: string;\n headingId: string;\n rows: RowModel[];\n}\n\ninterface ListProps {\n id: string;\n name: { 'aria-labelledby': string } | { 'aria-label': string | undefined };\n sections: Section[];\n emptyText: ReactNode;\n}\n\nconst rowState = (row: RowModel) => ({\n 'data-index': row.index,\n 'data-highlighted': row.highlighted ? '' : undefined,\n 'data-disabled': row.item.disabled ? '' : undefined,\n});\n\nfunction ItemText({ item }: { item: ComboboxItem }) {\n return (\n <>\n <span className=\"ds-combobox__item-label\">{item.label}</span>\n {item.description && (\n <>\n {' '}\n <span className=\"ds-combobox__item-description\">{item.description}</span>\n </>\n )}\n </>\n );\n}\n\n/*\n * The listbox's options and groups take their roles on plain elements: the\n * field keeps focus and points at an option with aria-activedescendant, so\n * none of them is focusable, and HTML has no element for an option outside\n * a native select. The lint rules asking for focusable or native elements\n * are therefore suppressed here, and only here.\n */\nfunction ListboxList({ id, name, sections, emptyText }: ListProps) {\n const option = (row: RowModel) => (\n // biome-ignore lint/a11y/useFocusableInteractive: reached through aria-activedescendant from the field, never by focus\n <div\n key={row.item.value}\n id={row.rowId}\n role=\"option\"\n aria-selected=\"false\"\n aria-disabled={row.item.disabled}\n className=\"ds-combobox__item\"\n {...rowState(row)}\n >\n <ItemText item={row.item} />\n </div>\n );\n return (\n <div id={id} role=\"listbox\" className=\"ds-combobox__list\" {...name}>\n {sections.map((section) =>\n section.label === undefined ? (\n section.rows.map(option)\n ) : (\n // biome-ignore lint/a11y/useSemanticElements: a fieldset is a form group, not a group of options\n <div\n key={section.label}\n role=\"group\"\n aria-labelledby={section.headingId}\n className=\"ds-combobox__group\"\n >\n <div id={section.headingId} className=\"ds-combobox__group-label\">\n {section.label}\n </div>\n {section.rows.map(option)}\n </div>\n ),\n )}\n {emptyText !== undefined && (\n // biome-ignore lint/a11y/useFocusableInteractive: a disabled option the keyboard never lands on\n <div\n role=\"option\"\n aria-disabled=\"true\"\n aria-selected=\"false\"\n className=\"ds-combobox__empty\"\n >\n {emptyText}\n </div>\n )}\n </div>\n );\n}\n\ninterface GridListProps extends ListProps {\n facets: ComboboxFacets;\n pinIcon: IconSource;\n}\n\n/*\n * A table in the grid role: its rows and cells line up in two columns by\n * themselves, and a group of rows is a `tbody` named by its heading row.\n * The keyboard skips heading rows, as it skips a listbox's group labels.\n */\nfunction GridList({ id, name, facets, sections, emptyText, pinIcon }: GridListProps) {\n const row = (model: RowModel) => <GridRow key={model.item.value} row={model} pinIcon={pinIcon} />;\n return (\n // biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: a table in the grid role is the APG grid pattern; its cells line up by themselves\n <table id={id} role=\"grid\" className=\"ds-combobox__list ds-combobox__list--grid\" {...name}>\n <thead className=\"ds-visually-hidden\">\n <tr>\n <th scope=\"col\">{facets.itemLabel}</th>\n <th scope=\"col\">{facets.label}</th>\n </tr>\n </thead>\n {sections.map((section) =>\n section.label === undefined ? (\n <tbody key=\"ungrouped\">{section.rows.map(row)}</tbody>\n ) : (\n <tbody\n key={section.label}\n aria-labelledby={section.headingId}\n className=\"ds-combobox__group\"\n >\n <tr>\n <th\n id={section.headingId}\n colSpan={2}\n scope=\"colgroup\"\n className=\"ds-combobox__group-label\"\n >\n {section.label}\n </th>\n </tr>\n {section.rows.map(row)}\n </tbody>\n ),\n )}\n {emptyText !== undefined && (\n <tbody>\n <tr>\n <GridCell colSpan={2} aria-disabled=\"true\" className=\"ds-combobox__empty\">\n {emptyText}\n </GridCell>\n </tr>\n </tbody>\n )}\n </table>\n );\n}\n\n/*\n * A cell of the grid, named so explicitly: a `td` in a grid table is a\n * gridcell to browsers, but not to every tool, and the field keeps focus\n * and points at the cell with aria-activedescendant, so it is not focusable.\n */\nfunction GridCell(props: TdHTMLAttributes<HTMLTableCellElement>) {\n // biome-ignore lint/a11y/useFocusableInteractive: reached through aria-activedescendant from the field, never by focus\n // biome-ignore lint/a11y/noNoninteractiveElementToInteractiveRole: a td in a grid table is a gridcell; named so for every tool\n return <td role=\"gridcell\" {...props} />;\n}\n\nfunction GridRow({ row, pinIcon }: { row: RowModel; pinIcon: IconSource }) {\n const { item } = row;\n return (\n <tr id={row.rowId} className=\"ds-combobox__item\" {...rowState(row)}>\n <GridCell id={row.itemCellId} className=\"ds-combobox__cell\" aria-disabled={item.disabled}>\n <ItemText item={item} />\n </GridCell>\n <GridCell id={row.facetCellId} className=\"ds-combobox__facet\">\n {item.facet && <FacetCell facet={item.facet} row={row} pinIcon={pinIcon} />}\n </GridCell>\n </tr>\n );\n}\n\nfunction FacetCell({\n facet,\n row,\n pinIcon,\n}: {\n facet: ComboboxFacet;\n row: RowModel;\n pinIcon: IconSource;\n}) {\n return (\n <span className=\"ds-combobox__facet-content\">\n {facet.icon}\n <span className=\"ds-combobox__facet-label\">{facet.label}</span>\n {row.pinnable && (\n <Tooltip content={`Filter by ${facet.label}`} kind=\"label\">\n <button\n type=\"button\"\n tabIndex={-1}\n className=\"ds-combobox__pin\"\n aria-label={`Filter by ${facet.label}`}\n aria-pressed={row.pinned}\n data-pin=\"\"\n data-active={row.pinActive ? '' : undefined}\n >\n <Icon source={pinIcon} size=\"sm\" decorative />\n </button>\n </Tooltip>\n )}\n </span>\n );\n}\n\ninterface PinnedChipProps {\n facet: ComboboxFacet;\n removeIcon: IconSource;\n onRemove: () => void;\n}\n\nfunction PinnedChip({ facet, removeIcon, onRemove }: PinnedChipProps) {\n return (\n <span className=\"ds-combobox__chip\">\n {facet.icon}\n <span>{facet.label}</span>\n <Tooltip content=\"Stop filtering\" kind=\"label\">\n <button\n type=\"button\"\n className=\"ds-combobox__chip-remove\"\n aria-label={`Stop filtering by ${facet.label}`}\n onClick={onRemove}\n >\n <Icon source={removeIcon} size=\"sm\" decorative />\n </button>\n </Tooltip>\n </span>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/combobox/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/combobox/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export type {\n ComboboxFacet,\n ComboboxFacets,\n ComboboxItem,\n ComboboxProps,\n ComboboxSize,\n} from './combobox';\nexport { Combobox } from './combobox';\n"]}
|
package/dist/cx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cx.js","sourceRoot":"","sources":["../src/cx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAA4C,EAAU,EAAE,CAC5E,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"cx.js","sourceRoot":"","sources":["../src/cx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAA4C,EAAU,EAAE,CAC5E,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC","sourcesContent":["/**\n * Join class names, dropping anything falsy.\n *\n * ```tsx\n * cx('ds-card', `ds-card--${variant}`, interactive && 'ds-card--interactive', className)\n * ```\n *\n * Deliberately smaller than `clsx`: no objects, no arrays, no nesting. Every\n * call site in this repo passes a flat list of strings and `cond && 'class'`\n * expressions, and keeping the signature at exactly that shape means the\n * design system carries no class-name DSL of its own for products to learn.\n *\n * Exported publicly because `{product}-ui` packages compose `ui-core` and need\n * the same helper; `ui-core` is the only runtime dependency they share.\n */\nexport const cx = (...parts: (string | false | undefined | null)[]): string =>\n parts.filter(Boolean).join(' ');\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-input.js","sourceRoot":"","sources":["../../src/date-input/date-input.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,IAAI,YAAY,EAGzB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAmB,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,MAAM,kBAAkB,GAAkB,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE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E,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,eAAe,EACtB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,EAC7E,OAAO,EAAE,KAAK,EAAE,OAAO,IAAI,OAAO,EAClC,QAAQ,EAAE,KAAK,EAAE,QAAQ,IAAI,QAAQ,EACrC,QAAQ,EAAE,KAAK,EAAE,QAAQ,IAAI,QAAQ,EACrC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,KAAK,aAEb,KAAC,YAAY,CAAC,OAAO,IACnB,SAAS,EAAC,wBAAwB,EAClC,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAE,iBAAiB,YAE1B,MAAC,YAAY,CAAC,YAAY,IACxB,SAAS,EAAC,yBAAyB,gBACvB,SAAS,sBACH,KAAK,EAAE,WAAW,aAEpC,KAAC,YAAY,CAAC,OAAO,cAClB,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,GAC/B,EACtB,kBAAkB,IAAI,KAAC,iBAAiB,IAAC,kBAAkB,EAAE,kBAAkB,GAAI,IAC1D,GACP,EACvB,KAAC,YAAY,CAAC,WAAW,KAAG,IACV,CACrB,CAAC;AACJ,CAAC","sourcesContent":["import {\n DateInput as ArkDateInput,\n type DateInputDateValue as DateValue,\n type UseDateInputReturn,\n useDateInputContext,\n} from '@ark-ui/react/date-input';\nimport { type FocusEvent, useEffect, useMemo, useRef } from 'react';\nimport './date-input.css';\nimport { cx } from '../cx';\nimport type { InputSize } from '../field/input';\nimport { useFieldControl } from '../field/use-field-control';\nimport { parseIsoDate } from '../iso-date';\n\nexport type DatePartNames = { day: string; month: string; year: string };\n\nconst ENGLISH_PART_NAMES: DatePartNames = { day: 'Day', month: 'Month', year: 'Year' };\n\nexport type DateInputProps = {\n /**\n * The date as an ISO calendar date, `YYYY-MM-DD`, or `null` for none.\n * A calendar date has no time and no zone, so the same value means the\n * same day everywhere. Leave undefined to let the component own it.\n */\n value?: string | null;\n /** Initial date when uncontrolled, `YYYY-MM-DD`, or `null` for none. */\n defaultValue?: string | null;\n /**\n * Fired with the ISO date whenever all three parts hold a value, and with\n * `null` once every part is cleared. A half-typed or half-cleared date\n * fires nothing: the last whole date stands until there is a new one or\n * none.\n */\n onValueChange?: (value: string | null) => void;\n /**\n * BCP 47 tag that decides the order of the parts and the separators.\n * Defaults to `nb`: day, month, year with dots (31.12.2026), the format\n * the products write dates in; `en-GB` gives slashes, `en-US` leads with\n * the month.\n */\n locale?: string;\n /**\n * Fired when the date becomes half-typed, and back: some parts filled\n * while another is empty, or the parts showing something other than the\n * committed date (a pending digit, a year cut short). A form that must\n * refuse a half-typed date on submit listens here: `onValueChange` cannot\n * tell a cleared part from an untouched one.\n */\n onIncompleteChange?: (incomplete: boolean) => void;\n /**\n * What the parts are called for assistive technology, in the product's\n * language. The placeholders follow `locale`; these do not, because the\n * control cannot know which words the product uses. English by default.\n */\n partNames?: DatePartNames;\n /** Control height and type scale. Matches `Input` and `Select`. */\n size?: InputSize;\n /**\n * Marks the control invalid on its own, outside a `Field`. Inside one, the\n * field's `error` or `invalid` does this and the prop is not needed.\n */\n invalid?: boolean;\n /** Disables the parts and dims the control. */\n disabled?: boolean;\n /** Shows the date without letting the user change it. */\n readOnly?: boolean;\n /**\n * Tells assistive technology the date is required. The form validates it:\n * the value lives in a hidden input, which takes part in no native\n * validation.\n */\n required?: boolean;\n /** Name for native form participation; the hidden input submits the ISO date. */\n name?: string;\n /** Accessible name when the control is outside a `Field`. */\n 'aria-label'?: string;\n /** Extra class names appended after `ds-date-input`. */\n className?: string;\n};\n\n/*\n * The value a form submits and `onValueChange` reports. Zag formats it for\n * the locale by default, which is the display, not a date a database keeps.\n */\nconst toIso = (date: DateValue): string => date.toString();\n\nconst toDateValue = (iso: string | null | undefined, prop: string): DateValue[] | undefined => {\n if (iso === undefined) return undefined;\n if (iso === null || iso === '') return [];\n return [parseIsoDate(iso, `DateInput: ${prop}`)];\n};\n\n/*\n * A part's key is its type and its rank among parts of that type: the\n * literal separators repeat, and a key that changed with the text would\n * remount the part under the user's caret.\n */\nconst isDatePart = (type: string): type is keyof DatePartNames =>\n type === 'day' || type === 'month' || type === 'year';\n\nfunction renderSegments(api: UseDateInputReturn, names: DatePartNames, required?: boolean) {\n const seen = new Map<string, number>();\n return api.getSegments().map((segment) => {\n const rank = seen.get(segment.type) ?? 0;\n seen.set(segment.type, rank + 1);\n const part = isDatePart(segment.type) ? segment.type : undefined;\n return (\n <ArkDateInput.Segment\n key={`${segment.type}-${rank}`}\n segment={segment}\n className=\"ds-date-input__segment\"\n aria-label={part && names[part]}\n aria-required={part && required ? true : undefined}\n />\n );\n });\n}\n\n/*\n * Reports the half-typed state to the parent. Zag holds it in the display\n * value, not in the committed value, so it is read from the context and\n * sent out when it changes: an effect, because the parent is the external\n * system here.\n */\nfunction IncompleteWatcher({\n onIncompleteChange,\n}: {\n onIncompleteChange: (incomplete: boolean) => void;\n}) {\n const api = useDateInputContext();\n const segments = api.getSegments().filter((segment) => segment.isEditable);\n const touched = segments.filter((segment) => !segment.isPlaceholder).length;\n /*\n * What the parts show can run ahead of what Zag has committed: a first\n * digit typed into a day, or a year cut to \"202\", leaves the value at the\n * last whole date. Read against the committed date, so the form is told\n * the date is half-typed whenever what it would save differs from what the\n * user sees.\n */\n const committed = api.value[0];\n const shownDiffers = segments.some(\n (segment) =>\n !segment.isPlaceholder &&\n isDatePart(segment.type) &&\n segment.value !== committed?.[segment.type],\n );\n const incomplete = touched > 0 && (touched < segments.length || shownDiffers);\n const previous = useRef(incomplete);\n useEffect(() => {\n if (previous.current === incomplete) return;\n previous.current = incomplete;\n onIncompleteChange(incomplete);\n }, [incomplete, onIncompleteChange]);\n return null;\n}\n\n/**\n * A date typed as parts, built on Ark UI's DateInput.\n *\n * The control shows day, month and year as separate parts in the locale's\n * order, with the locale's separators between them. A part takes digits,\n * steps with the arrow keys, and hands focus to the next part when it is\n * full, so a date is typed as one run of digits. The value in and out is an\n * ISO calendar date: a string a form library and a database both keep as\n * is, with no time zone to get wrong.\n *\n * Inside a `Field` it takes the label, the hint, the error and the states\n * from the field, which also owns its `id`; clicking the label focuses the\n * first part. On its own it needs `aria-label`.\n *\n * ```tsx\n * <Field label=\"Target date\" error={errors.targetDate?.message}>\n * <DateInput value={targetDate} onValueChange={setTargetDate} />\n * </Field>\n * ```\n */\nexport function DateInput({\n value,\n defaultValue,\n onValueChange,\n locale = 'nb',\n onIncompleteChange,\n partNames = ENGLISH_PART_NAMES,\n size = 'md',\n invalid,\n disabled,\n readOnly,\n required,\n name,\n 'aria-label': ariaLabel,\n className,\n}: DateInputProps) {\n const field = useFieldControl();\n const controlledValue = useMemo(() => toDateValue(value, 'value'), [value]);\n const initialValue = useMemo(() => toDateValue(defaultValue, 'defaultValue'), [defaultValue]);\n const isRequired = field?.required || required;\n\n /*\n * A Field names its control through `<label for>` and focuses a control\n * that is not labelable by calling `focus()` on the element carrying the\n * field's id. That element is the control box here, which is not itself\n * a part, so a focus that lands on the box is handed to the first part.\n */\n const focusFirstSegment = (event: FocusEvent<HTMLDivElement>) => {\n if (event.target !== event.currentTarget) return;\n event.currentTarget.querySelector<HTMLElement>('[role=\"spinbutton\"]')?.focus();\n };\n\n return (\n <ArkDateInput.Root\n className={cx('ds-date-input', `ds-date-input--${size}`, className)}\n ids={field ? { control: field.id, label: () => field.labelId } : undefined}\n locale={locale}\n value={controlledValue}\n defaultValue={initialValue}\n onValueChange={(details) => onValueChange?.(details.valueAsString[0] ?? null)}\n invalid={field?.invalid || invalid}\n disabled={field?.disabled || disabled}\n readOnly={field?.readOnly || readOnly}\n name={name}\n format={toIso}\n >\n <ArkDateInput.Control\n className=\"ds-date-input__control\"\n tabIndex={-1}\n onFocus={focusFirstSegment}\n >\n <ArkDateInput.SegmentGroup\n className=\"ds-date-input__segments\"\n aria-label={ariaLabel}\n aria-describedby={field?.describedBy}\n >\n <ArkDateInput.Context>\n {(api) => renderSegments(api, partNames, isRequired)}\n </ArkDateInput.Context>\n {onIncompleteChange && <IncompleteWatcher onIncompleteChange={onIncompleteChange} />}\n </ArkDateInput.SegmentGroup>\n </ArkDateInput.Control>\n <ArkDateInput.HiddenInput />\n </ArkDateInput.Root>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/date-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA2C,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/date-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA2C,MAAM,cAAc,CAAC","sourcesContent":["export { DateInput, type DateInputProps, type DatePartNames } from './date-input';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-close.js","sourceRoot":"","sources":["../../src/dialog/dialog-close.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAqB,KAAK,EAAE,MAAM,OAAO,CAAC;AAUjD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAoB;IACxD,yEAAyE;IACzE,4DAA4D;IAC5D,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACnB,OAAO,CACL,KAAC,SAAS,CAAC,YAAY,IAAC,OAAO,QAAC,EAAE,EAAE,EAAE,YACnC,QAAQ,GACc,CAC1B,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"dialog-close.js","sourceRoot":"","sources":["../../src/dialog/dialog-close.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAqB,KAAK,EAAE,MAAM,OAAO,CAAC;AAUjD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAoB;IACxD,yEAAyE;IACzE,4DAA4D;IAC5D,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACnB,OAAO,CACL,KAAC,SAAS,CAAC,YAAY,IAAC,OAAO,QAAC,EAAE,EAAE,EAAE,YACnC,QAAQ,GACc,CAC1B,CAAC;AACJ,CAAC","sourcesContent":["import { Dialog as ArkDialog } from '@ark-ui/react/dialog';\nimport { type ReactElement, useId } from 'react';\n\nexport interface DialogCloseProps {\n /**\n * The one element that closes the dialog, usually a `Button`. It keeps its\n * own look, label and `ref`; DialogClose adds the closing click.\n */\n children: ReactElement;\n}\n\n/**\n * Makes its child close the enclosing `Dialog` when activated.\n *\n * ```tsx\n * <DialogClose>\n * <Button variant=\"secondary\">Cancel</Button>\n * </DialogClose>\n * ```\n *\n * Use it for the dismissive action, or for a committing one that should\n * close at once. Closing goes through the dialog's `onOpenChange`, so a\n * controlled dialog decides, as it does for Escape. Must be rendered inside\n * a `Dialog` — in its `actions` or its body.\n */\nexport function DialogClose({ children }: DialogCloseProps) {\n // Ark gives every close trigger in a dialog the same id; a dialog with a\n // close button and a Cancel would otherwise carry it twice.\n const id = useId();\n return (\n <ArkDialog.CloseTrigger asChild id={id}>\n {children}\n </ArkDialog.CloseTrigger>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/dialog/dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAIL,WAAW,EACX,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,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U,EAAE,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,cAAK,GAAG,EAAE,OAAO,EAAE,SAAS,EAAC,iBAAiB,EAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,YACjF,cAAK,SAAS,EAAC,yBAAyB,YAAE,QAAQ,GAAO,GACrD,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { Dialog as ArkDialog } from '@ark-ui/react/dialog';\nimport { Portal } from '@ark-ui/react/portal';\nimport {\n type ReactElement,\n type ReactNode,\n type RefObject,\n useCallback,\n useRef,\n useState,\n} from 'react';\nimport { IconButton } from '../button/icon-button';\nimport type { IconSource } from '../icon/icon';\nimport { PortalContainerContext } from '../portal-container';\nimport './dialog.css';\nimport { cx } from '../cx';\nimport { Cross } from '../fallback-glyphs';\n\nexport type DialogRole = 'dialog' | 'alertdialog';\n\n/** How wide the panel may grow: a message or short form, or a form with fields side by side. */\nexport type DialogSize = 'md' | 'lg';\n\nexport interface DialogProps {\n /**\n * The dialog's name: rendered as its `<h2>` heading and announced when it\n * opens (`aria-labelledby`). Write it as a short statement or question —\n * \"Remove “Site foreman”?\".\n */\n title: ReactNode;\n /**\n * One or two sentences under the title, announced with it\n * (`aria-describedby`). For a confirmation, say what the action does and\n * what it leaves alone.\n */\n description?: ReactNode;\n /** Body content. Scrolls inside the panel when it outgrows the viewport. */\n children?: ReactNode;\n /**\n * The footer's buttons, end-aligned, in reading order: the dismissive one\n * first, the committing one last. They wrap onto a second line on a narrow\n * screen. Wrap a dismissive button in `DialogClose` to make it close.\n */\n actions?: ReactNode;\n /**\n * The one element that opens the dialog, such as a `Button`. Focus returns\n * to it when the dialog closes, unless `finalFocusRef` names another\n * element. Leave it out to open the dialog with `open` from elsewhere.\n */\n trigger?: ReactElement;\n /** Controlled open state. Pair with `onOpenChange`. */\n open?: boolean;\n /** Initial open state when uncontrolled. */\n defaultOpen?: boolean;\n /**\n * Fired with the requested state whenever the dialog asks to open (its\n * trigger) or close (a `DialogClose`, the close button, Escape, or for\n * `role=\"dialog\"` a click outside). A controlled dialog stays as it is\n * until `open` changes.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * `dialog` (default) shows a close button and closes on Escape and on a\n * click outside. `alertdialog` is for confirmations: no close button, and a\n * click outside does nothing, so the explicit cancel action is the way\n * out. Escape still cancels.\n */\n role?: DialogRole;\n /**\n * Where focus lands when the dialog opens. Defaults to the first focusable\n * element: the close button of a `dialog`, the first action of an\n * `alertdialog` with no focusable body. Point an alertdialog at its least\n * destructive action.\n */\n initialFocusRef?: RefObject<HTMLElement | null>;\n /**\n * Where focus lands when the dialog closes, in place of the trigger. Use it\n * when the confirmed action removes the trigger, such as a row's Remove\n * button: focus would return to an element that is about to unmount and\n * fall to the page body. Point it at something that stays, such as the\n * list's heading, which needs `tabIndex={-1}` to take focus.\n *\n * The ref is read as the dialog closes, however it closes. Fill it in the\n * committing action, so Cancel and Escape still return focus to the\n * trigger, which is still there. While the ref holds no element, focus\n * returns to the trigger as usual.\n */\n finalFocusRef?: RefObject<HTMLElement | null>;\n /** Accessible name of the close button. Translate it with the rest of the UI. */\n closeLabel?: string;\n /**\n * Glyph for the close button. Defaults to a plain built-in cross so\n * `@manakind/ui-core` renders on its own; products pass their own icon set,\n * as they do for Select's indicators.\n */\n closeIcon?: IconSource;\n /**\n * How wide the panel may grow: `md` (the default) for a message or a short\n * form, `lg` for a form with fields side by side.\n */\n size?: DialogSize;\n /** Extra class names appended to the panel's `ds-dialog`. */\n className?: string;\n}\n\n/**\n * A modal dialog: a raised panel over a dimmed page, built on Ark UI.\n *\n * Ark owns the behaviour: the focus trap, focus returning to the trigger\n * (or to `finalFocusRef`), Escape, the page's scroll lock, `aria-modal`, and the title and\n * description wiring. This wrapper adds the `ds-` classes, the\n * `--ds-dialog-*` bindings, and a slot API in place of Ark's anatomy.\n *\n * ```tsx\n * <Dialog\n * role=\"alertdialog\"\n * title=\"Remove “Site foreman”?\"\n * description=\"2 people and 1 Landfall lose this type; nothing else is deleted.\"\n * trigger={<Button variant=\"secondary\">Remove</Button>}\n * initialFocusRef={cancelRef}\n * actions={\n * <>\n * <DialogClose>\n * <Button ref={cancelRef} variant=\"secondary\">Cancel</Button>\n * </DialogClose>\n * <Button variant=\"danger\" onClick={remove}>Remove</Button>\n * </>\n * }\n * />\n * ```\n *\n * The committing action is the consumer's own button. To close after it\n * runs, control the dialog with `open` and set it false in the handler, or\n * wrap the button in `DialogClose` when closing at once is right.\n *\n * The backdrop and panel portal into `<body>` at `z-index: 50`, the layer\n * the product apps use for their own overlays. A Select or Menu inside the\n * dialog portals into its panel (see `PortalContainerContext`) and opens at\n * 60, above it. Nothing is mounted while the dialog is closed.\n */\nexport function Dialog({\n title,\n description,\n children,\n actions,\n trigger,\n open,\n defaultOpen,\n onOpenChange,\n role = 'dialog',\n initialFocusRef,\n finalFocusRef,\n closeLabel = 'Close',\n closeIcon = Cross,\n size = 'md',\n className,\n}: DialogProps) {\n const dismissible = role === 'dialog';\n const panelRef = useRef<HTMLDivElement>(null);\n const handleOpenChange = (details: { open: boolean }) => onOpenChange?.(details.open);\n // Zag types this as returning `HTMLElement | null`, but its focus trap\n // reads undefined as \"the first focusable element\" and, given null, fails\n // to start at all, leaving the page reachable by Tab.\n const initialFocusEl = (() => initialFocusRef?.current ?? undefined) as () => HTMLElement | null;\n const finalFocusEl = () => finalFocusRef?.current ?? null;\n\n return (\n <ArkDialog.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={handleOpenChange}\n role={role}\n closeOnInteractOutside={dismissible}\n initialFocusEl={initialFocusEl}\n finalFocusEl={finalFocusEl}\n lazyMount\n unmountOnExit\n >\n {trigger && <ArkDialog.Trigger asChild>{trigger}</ArkDialog.Trigger>}\n <Portal>\n <ArkDialog.Backdrop className=\"ds-dialog__backdrop\" />\n <ArkDialog.Positioner className=\"ds-dialog__positioner\">\n <ArkDialog.Content\n ref={panelRef}\n className={cx('ds-dialog', size === 'lg' && 'ds-dialog--lg', className)}\n >\n <PortalContainerContext.Provider value={panelRef}>\n <div className=\"ds-dialog__header\">\n <div className=\"ds-dialog__heading\">\n <ArkDialog.Title className=\"ds-dialog__title\">{title}</ArkDialog.Title>\n {description && (\n <ArkDialog.Description className=\"ds-dialog__description\">\n {description}\n </ArkDialog.Description>\n )}\n </div>\n {dismissible && (\n <ArkDialog.CloseTrigger asChild>\n <IconButton\n icon={closeIcon}\n aria-label={closeLabel}\n variant=\"tertiary\"\n size=\"sm\"\n className=\"ds-dialog__close\"\n />\n </ArkDialog.CloseTrigger>\n )}\n </div>\n {children && <DialogBody>{children}</DialogBody>}\n {actions && <div className=\"ds-dialog__actions\">{actions}</div>}\n </PortalContainerContext.Provider>\n </ArkDialog.Content>\n </ArkDialog.Positioner>\n </Portal>\n </ArkDialog.Root>\n );\n}\n\n/**\n * The scrolling body. While its content overflows it joins the tab order, so\n * a keyboard user can focus it and scroll; a body with nothing to scroll\n * stays out of the way.\n *\n * Two boxes are observed because either can change the answer: the outer one\n * resizes with the viewport, the inner one with the content.\n */\nfunction DialogBody({ children }: { children: ReactNode }) {\n const [scrollable, setScrollable] = useState(false);\n const observe = useCallback((scroller: HTMLDivElement | null) => {\n const content = scroller?.firstElementChild;\n if (!scroller || !content) return;\n const observer = new ResizeObserver(() =>\n setScrollable(scroller.scrollHeight > scroller.clientHeight),\n );\n observer.observe(scroller);\n observer.observe(content);\n return () => observer.disconnect();\n }, []);\n\n return (\n <div ref={observe} className=\"ds-dialog__body\" tabIndex={scrollable ? 0 : undefined}>\n <div className=\"ds-dialog__body-content\">{children}</div>\n </div>\n );\n}\n"]}
|
package/dist/dialog/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dialog/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dialog/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export type { DialogProps, DialogRole, DialogSize } from './dialog';\nexport { Dialog } from './dialog';\nexport type { DialogCloseProps } from './dialog-close';\nexport { DialogClose } from './dialog-close';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.js","sourceRoot":"","sources":["../../src/divider/divider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAkB3B;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,EACtB,WAAW,GAAG,YAAY,EAC1B,UAAU,GAAG,KAAK,EAClB,SAAS,EACT,GAAG,KAAK,EACK;IACb,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IACN,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,sBACrB,UAAU,IAAI,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,iBACzE,UAAU,IAAI,SAAS,EACpC,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,eAAe,WAAW,EAAE,EAAE,SAAS,CAAC,KAChE,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"divider.js","sourceRoot":"","sources":["../../src/divider/divider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAkB3B;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,EACtB,WAAW,GAAG,YAAY,EAC1B,UAAU,GAAG,KAAK,EAClB,SAAS,EACT,GAAG,KAAK,EACK;IACb,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IACN,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,sBACrB,UAAU,IAAI,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,iBACzE,UAAU,IAAI,SAAS,EACpC,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,eAAe,WAAW,EAAE,EAAE,SAAS,CAAC,KAChE,KAAK,GACT,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { ark } from '@ark-ui/react/factory';\nimport type { ComponentProps } from 'react';\nimport './divider.css';\nimport { cx } from '../cx';\n\nexport type DividerOrientation = 'horizontal' | 'vertical';\n\nexport interface DividerProps extends ComponentProps<typeof ark.div> {\n /**\n * `horizontal` (the default) rules across its container; `vertical` rules\n * between the children of a row and stretches to the row's height.\n */\n orientation?: DividerOrientation;\n /**\n * Hide the rule from assistive technology. A divider that only tidies the\n * eye, between two buttons say, is decorative; one that separates the\n * sections of a document is not and announces as a separator.\n */\n decorative?: boolean;\n}\n\n/**\n * A hairline between two things.\n *\n * Renders a `div` with `role=\"separator\"`, since an `hr` cannot be vertical.\n * The colour is `--ds-divider-color`; the thickness is one pixel in either\n * orientation.\n */\nexport function Divider({\n orientation = 'horizontal',\n decorative = false,\n className,\n ...props\n}: DividerProps) {\n return (\n <ark.div\n role={decorative ? 'none' : 'separator'}\n aria-orientation={decorative || orientation === 'horizontal' ? undefined : orientation}\n aria-hidden={decorative || undefined}\n className={cx('ds-divider', `ds-divider--${orientation}`, className)}\n {...props}\n />\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/divider/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/divider/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export type { DividerOrientation, DividerProps } from './divider';\nexport { Divider } from './divider';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.js","sourceRoot":"","sources":["../../src/empty-state/empty-state.tsx"],"names":[],"mappings":";AACA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAgBrD;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACQ;IAChB,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,KAAM,KAAK,aACvD,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,UAAU,SAAG,CAAC,CAAC,CAAC,IAAI,EACvE,YAAG,SAAS,EAAC,uBAAuB,YAAE,KAAK,GAAK,EAC/C,WAAW,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,6BAA6B,YAAE,WAAW,GAAK,CAAC,CAAC,CAAC,IAAI,EACjF,QAAQ,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,yBAAyB,YAAE,QAAQ,GAAO,CAAC,CAAC,CAAC,IAAI,IACxE,CACP,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"empty-state.js","sourceRoot":"","sources":["../../src/empty-state/empty-state.tsx"],"names":[],"mappings":";AACA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAgBrD;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACQ;IAChB,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,KAAM,KAAK,aACvD,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,UAAU,SAAG,CAAC,CAAC,CAAC,IAAI,EACvE,YAAG,SAAS,EAAC,uBAAuB,YAAE,KAAK,GAAK,EAC/C,WAAW,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,6BAA6B,YAAE,WAAW,GAAK,CAAC,CAAC,CAAC,IAAI,EACjF,QAAQ,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,yBAAyB,YAAE,QAAQ,GAAO,CAAC,CAAC,CAAC,IAAI,IACxE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\nimport './empty-state.css';\nimport { cx } from '../cx';\nimport { Icon, type IconSource } from '../icon/icon';\n\nexport interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {\n /** The one line that says what is missing: \"No goals yet\". */\n title: ReactNode;\n /** What to do about it, or why it is empty. Muted, under the title. */\n description?: ReactNode;\n /**\n * A glyph above the title, decorative: the title says the same thing. An\n * `IconSource`, since `ui-core` ships no icons of its own.\n */\n icon?: IconSource;\n /** The way out, typically one button, rendered under the text. */\n children?: ReactNode;\n}\n\n/**\n * The centred column a region shows when it has nothing to list.\n *\n * A title, an optional description and an optional action, centred in a\n * block of inset so the emptiness reads as intended rather than as a failed\n * render. Styled by the `--ds-empty-state-*` keys; the type comes from the\n * text contract.\n */\nexport function EmptyState({\n title,\n description,\n icon,\n className,\n children,\n ...props\n}: EmptyStateProps) {\n return (\n <div className={cx('ds-empty-state', className)} {...props}>\n {icon ? <Icon source={icon} size=\"lg\" tone=\"muted\" decorative /> : null}\n <p className=\"ds-empty-state__title\">{title}</p>\n {description ? <p className=\"ds-empty-state__description\">{description}</p> : null}\n {children ? <div className=\"ds-empty-state__actions\">{children}</div> : null}\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/empty-state/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/empty-state/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export type { EmptyStateProps } from './empty-state';\nexport { EmptyState } from './empty-state';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fallback-glyphs.js","sourceRoot":"","sources":["../src/fallback-glyphs.tsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CACjD,6BAAiB,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,KAAK,KAAK,YAC/D,eACE,CAAC,EAAC,cAAc,EAChB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,CACP,CAAC;AACF,YAAY,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAElD,MAAM,CAAC,MAAM,WAAW,GAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CAChD,6BAAiB,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,K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AK,CAAC,WAAW,GAAG,eAAe,CAAC;AAEpC,MAAM,CAAC,MAAM,KAAK,GAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CAC1C,6BAAiB,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,KAAK,KAAK,YAC/D,eACE,CAAC,EAAC,kBAAkB,EACpB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,GACrB,GACE,CACP,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,eAAe,CAAC;AAEpC,MAAM,CAAC,MAAM,GAAG,GAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CACxC,6BAAiB,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,KAAK,KAAK,YAC/D,eACE,CAAC,EAAC,gDAAgD,EAClD,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,CACP,CAAC;AACF,GAAG,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import type { IconSource } from './icon/icon';\n\n/*\n * Fallback glyphs for the components whose icon slots default to something\n * (Select's indicators, Menu's check, Dialog's close button), inlined on\n * purpose and kept in one place. The package root exports them as\n * `Fallback*`, so a product composition with the same default reuses these\n * rather than copying the path data.\n *\n * ui-core is public and MIT; the Lineicons Pro icon package is private and\n * carries proprietary payloads, so a public package must not reference it —\n * `check:tarballs` enforces that. A default that ships inside ui-core's own\n * runtime therefore cannot be a licensed icon.\n *\n * These exist only so the package works standalone. Products override them\n * via `indicator` / `itemIndicator`, which is how the Humanity Plus apps\n * render Lineicons here.\n *\n * Note: that audit is a plain string scan over the built output, and tsc\n * keeps comments, so naming the private package here — even in prose —\n * would fail CI. Describe it, do not spell it.\n */\nexport const ChevronRight: IconSource = (props) => (\n <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" fill=\"none\" {...props}>\n <path\n d=\"m6 4 4 4-4 4\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\nChevronRight.displayName = 'FallbackChevronRight';\n\nexport const ChevronLeft: IconSource = (props) => (\n <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" fill=\"none\" {...props}>\n <path\n d=\"M10 4 6 8l4 4\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\nChevronLeft.displayName = 'FallbackChevronLeft';\n\nexport const Check: IconSource = (props) => (\n <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" fill=\"none\" {...props}>\n <path\n d=\"m3.5 8.5 3 3 6-6\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\nCheck.displayName = 'FallbackCheck';\n\nexport const Cross: IconSource = (props) => (\n <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" fill=\"none\" {...props}>\n <path\n d=\"m4 4 8 8m0-8-8 8\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n />\n </svg>\n);\nCross.displayName = 'FallbackCross';\n\nexport const Pin: IconSource = (props) => (\n <svg aria-hidden=\"true\" viewBox=\"0 0 16 16\" fill=\"none\" {...props}>\n <path\n d=\"M6 2.5h4M7 2.5v3.75L4.5 9h7L9 6.25V2.5M8 9v4.5\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\nPin.displayName = 'FallbackPin';\n"]}
|
package/dist/field/field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
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AS,EAAC,mBAAmB,YAAE,KAAK,GAAsB,EAC1F,QAAQ,IACK,GACW,CAC9B,CAAC;AACJ,CAAC","sourcesContent":["import { Field as ArkField, useFieldContext } from '@ark-ui/react/field';\nimport { type ReactNode, useMemo } from 'react';\nimport { FieldPartsContext } from './use-field-control';\nimport './field.css';\nimport { cx } from '../cx';\n\nexport type FieldProps = {\n /** Visible label. The field's control is named by it, so it is required. */\n label: ReactNode;\n /**\n * The control: an `Input`, a `Textarea`, or any Ark field part. It picks up\n * the label, the hint, the error and the states from the field.\n */\n children: ReactNode;\n /** Help the user reads before typing. Sits between the label and the control, muted. */\n hint?: ReactNode;\n /**\n * What is wrong with the value. Shown above the control in the danger\n * colour, and its presence marks the field invalid: the control gets\n * `aria-invalid` and points at the message through `aria-describedby`.\n * `false`, `''` and `undefined` all mean no error, so a form library's\n * `errors.title?.message` goes straight in.\n */\n error?: ReactNode;\n /**\n * Marks the field invalid without a message, for a summary shown elsewhere.\n * Defaults to whether `error` has content. An explicit `false` wins over\n * `error`, and the message is then not shown: the control is only\n * described by an error while it is invalid.\n */\n invalid?: boolean;\n /** Marks the control required and shows the indicator after the label. */\n required?: boolean;\n /** Disables the control and dims it, the label and the hint. */\n disabled?: boolean;\n /** Shows the value without letting the user change it. */\n readOnly?: boolean;\n /** Id for the control. Generated when omitted; the label's `for` follows it. */\n id?: string;\n /** Extra class names appended after `ds-field`. */\n className?: string;\n};\n\n/**\n * A `<label for>` activates only a labelable element. A control a product\n * composes itself (a rich-text editor, see `useFieldControl`) is a `div`,\n * so a click on its label would do nothing. This gives such a control the\n * focus the label promises; a native control keeps the browser's behaviour.\n */\nfunction FieldLabel({ children }: { children: ReactNode }) {\n const field = useFieldContext();\n const focusCustomControl = () => {\n const control = document.getElementById(field.ids.control);\n if (control instanceof HTMLElement && !('labels' in control)) control.focus();\n };\n return (\n <ArkField.Label className=\"ds-field__label\" onClick={focusCustomControl}>\n {children}\n <ArkField.RequiredIndicator className=\"ds-field__indicator\" />\n </ArkField.Label>\n );\n}\n\n/**\n * A labelled form control with optional hint and error, built on Ark UI.\n *\n * Ark owns most of the wiring: the label's `for`, `aria-invalid`, `required`,\n * `disabled` and `readOnly`. The control's `aria-describedby` is composed\n * here from what the field renders, the error first and then the hint, so it\n * does not depend on which attribute a given Ark version uses for the error.\n * This wrapper decides what renders and contributes the `ds-field` classes\n * and the `--ds-field-*` bindings. The control is whatever you put inside:\n * an `Input`, a `Textarea`, or a future Ark field part.\n *\n * The hint and the error render before the control, not after it. A screen\n * reader then meets them on the way down and lands on the control to act,\n * and a sighted user keeps seeing them when a listbox, a date picker or a\n * password manager opens under the focused control and covers what sits there.\n *\n * ```tsx\n * <Field label=\"Title\" hint=\"Short and specific.\" error={errors.title?.message}>\n * <Input {...register('title')} />\n * </Field>\n * ```\n */\nexport function Field({\n label,\n children,\n hint,\n error,\n invalid,\n required,\n disabled,\n readOnly,\n id,\n className,\n}: FieldProps) {\n const hasHint = Boolean(hint);\n const hasError = Boolean(error);\n const parts = useMemo(() => ({ hasHint, hasError }), [hasHint, hasError]);\n return (\n <FieldPartsContext.Provider value={parts}>\n <ArkField.Root\n id={id}\n invalid={invalid ?? hasError}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n className={cx('ds-field', className)}\n >\n <FieldLabel>{label}</FieldLabel>\n {hasHint && <ArkField.HelperText className=\"ds-field__hint\">{hint}</ArkField.HelperText>}\n {hasError && <ArkField.ErrorText className=\"ds-field__message\">{error}</ArkField.ErrorText>}\n {children}\n </ArkField.Root>\n </FieldPartsContext.Provider>\n );\n}\n"]}
|
package/dist/field/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/field/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/field/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["export type { FieldProps } from './field';\nexport { Field } from './field';\nexport type { InputProps, InputSize } from './input';\nexport { Input } from './input';\nexport type { TextareaProps } from './textarea';\nexport { Textarea } from './textarea';\nexport type { FieldControl } from './use-field-control';\nexport { useFieldControl } from './use-field-control';\n"]}
|
package/dist/field/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/field/input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAc3D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAc;IAC7E,OAAO,CACL,KAAC,QAAQ,CAAC,KAAK,IACb,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,aAAa,IAAI,EAAE,EAAE,SAAS,CAAC,kBAC3C,OAAO,IAAI,SAAS,kBACpB,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,KAClC,oBAAoB,CAAC,KAAK,CAAC,GAC/B,CACH,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/field/input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAc3D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAc;IAC7E,OAAO,CACL,KAAC,QAAQ,CAAC,KAAK,IACb,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,aAAa,IAAI,EAAE,EAAE,SAAS,CAAC,kBAC3C,OAAO,IAAI,SAAS,kBACpB,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,KAClC,oBAAoB,CAAC,KAAK,CAAC,GAC/B,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { Field as ArkField } from '@ark-ui/react/field';\nimport type { ComponentProps } from 'react';\nimport './field.css';\nimport { cx } from '../cx';\nimport { useFieldControlProps } from './use-field-control';\n\nexport type InputSize = 'sm' | 'md' | 'lg';\n\nexport type InputProps = Omit<ComponentProps<'input'>, 'size'> & {\n /** Control height and type scale. Matches `Select` and `Button`. */\n size?: InputSize;\n /**\n * Marks the control invalid on its own, outside a `Field`. Inside one, the\n * field's `error` or `invalid` does this and the prop is not needed.\n */\n invalid?: boolean;\n};\n\n/**\n * Single-line text control, built on Ark UI's field input.\n *\n * Inside a `Field` it takes the label, the hint, the error and the states\n * from the field, which also owns its `id`; an `aria-describedby` of its own\n * is added to the field's. On its own it is a plain `<input>` with the\n * `ds-input` look, so it still needs a name: a visible label elsewhere or\n * `aria-label`.\n *\n * ```tsx\n * <Field label=\"Title\">\n * <Input placeholder=\"e.g. Run a marathon\" />\n * </Field>\n * ```\n */\nexport function Input({ size = 'md', invalid, className, ...props }: InputProps) {\n return (\n <ArkField.Input\n className={cx('ds-input', `ds-input--${size}`, className)}\n aria-invalid={invalid || undefined}\n data-invalid={invalid ? '' : undefined}\n {...useFieldControlProps(props)}\n />\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../src/field/textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAW3D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,IAAI,GAAG,IAAI,EACX,OAAO,EACP,UAAU,GAAG,KAAK,EAClB,IAAI,GAAG,CAAC,EACR,SAAS,EACT,GAAG,KAAK,EACM;IACd,OAAO,CACL,KAAC,QAAQ,CAAC,QAAQ,IAChB,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,aAAa,IAAI,EAAE,EAAE,SAAS,CAAC,kBAC1D,OAAO,IAAI,SAAS,kBACpB,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EACtC,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,KACN,oBAAoB,CAAC,KAAK,CAAC,GAC/B,CACH,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../src/field/textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAW3D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,IAAI,GAAG,IAAI,EACX,OAAO,EACP,UAAU,GAAG,KAAK,EAClB,IAAI,GAAG,CAAC,EACR,SAAS,EACT,GAAG,KAAK,EACM;IACd,OAAO,CACL,KAAC,QAAQ,CAAC,QAAQ,IAChB,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,aAAa,IAAI,EAAE,EAAE,SAAS,CAAC,kBAC1D,OAAO,IAAI,SAAS,kBACpB,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EACtC,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,KACN,oBAAoB,CAAC,KAAK,CAAC,GAC/B,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { Field as ArkField } from '@ark-ui/react/field';\nimport type { ComponentProps } from 'react';\nimport './field.css';\nimport { cx } from '../cx';\nimport type { InputSize } from './input';\nimport { useFieldControlProps } from './use-field-control';\n\nexport type TextareaProps = ComponentProps<'textarea'> & {\n /** Type scale and padding. Matches `Input`. */\n size?: InputSize;\n /** Marks the control invalid on its own, outside a `Field`. */\n invalid?: boolean;\n /** Grows with its content instead of scrolling, and takes away the resize handle. */\n autoresize?: boolean;\n};\n\n/**\n * Multi-line text control, built on Ark UI's field textarea.\n *\n * Same contract as `Input`: inside a `Field` it is named and described by the\n * field; on its own it needs `aria-label`. Three rows by default, resizable\n * vertically; `autoresize` grows it with the text instead and drops the handle.\n *\n * ```tsx\n * <Field label=\"Description\">\n * <Textarea rows={4} placeholder=\"Describe your goal…\" />\n * </Field>\n * ```\n */\nexport function Textarea({\n size = 'md',\n invalid,\n autoresize = false,\n rows = 3,\n className,\n ...props\n}: TextareaProps) {\n return (\n <ArkField.Textarea\n className={cx('ds-input', 'ds-textarea', `ds-input--${size}`, className)}\n aria-invalid={invalid || undefined}\n data-invalid={invalid ? '' : undefined}\n autoresize={autoresize}\n rows={rows}\n {...useFieldControlProps(props)}\n />\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-field-control.js","sourceRoot":"","sources":["../../src/field/use-field-control.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAA0C;IACtF,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,KAAK;CAChB,CAAC,CAAC;AAOH,SAAS,mBAAmB;IAI1B,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAChC,MAAM,KAAK,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC5C,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC7B,MAAM,GAAG,GAAG;QACV,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QACjE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;KACjD,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAClB,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;AACxE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAyB,KAAQ;IACnE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,mBAAmB,EAAE,CAAC;IACrD,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,MAAM,MAAM,GAAG,CAAC,WAAW,EAAE,KAAK,CA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ACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;KACzB,CAAC;AACJ,CAAC","sourcesContent":["import { useFieldContext } from '@ark-ui/react/field';\nimport { createContext, useContext } from 'react';\n\n/**\n * Which text parts the `Field` is rendering. Ark decides the control's\n * description from what it finds in the DOM, and which attribute carries\n * the error changed between Ark versions (`aria-describedby` up to 5.36,\n * `aria-errormessage` from 5.39). The field knows what it renders, so the\n * wrapper composes the description from that and stays the same on every\n * Ark version: the error first, then the hint.\n */\nexport const FieldPartsContext = createContext<{ hasHint: boolean; hasError: boolean }>({\n hasHint: false,\n hasError: false,\n});\n\ntype ControlProps = {\n id?: string;\n 'aria-describedby'?: string;\n};\n\nfunction useFieldDescription(): {\n field: ReturnType<typeof useFieldContext>;\n describedBy?: string;\n} {\n const field = useFieldContext();\n const parts = useContext(FieldPartsContext);\n if (!field) return { field };\n const ids = [\n field.invalid && parts.hasError ? field.ids.errorText : undefined,\n parts.hasHint ? field.ids.helperText : undefined,\n ].filter(Boolean);\n return { field, describedBy: ids.length ? ids.join(' ') : undefined };\n}\n\n/**\n * Inside a `Field`, the field owns the control's `id` (the label's `for`\n * points at it) and its description (the hint and the error). Ark lets any\n * prop on the element replace the context's, so a consumer `id` would split\n * the label from the control and a consumer `aria-describedby` would drop\n * the hint and the error. This keeps the field's id and adds the consumer's\n * description to the field's instead of replacing it. Outside a field the\n * props pass through untouched.\n */\nexport function useFieldControlProps<P extends ControlProps>(props: P): P {\n const { field, describedBy } = useFieldDescription();\n if (!field) return props;\n const merged = [describedBy, props['aria-describedby']].filter(Boolean).join(' ');\n return { ...props, id: field.ids.control, 'aria-describedby': merged || undefined };\n}\n\nexport type FieldControl = {\n /** Id the field's label points at. Put it on the element that takes the value. */\n id: string;\n /** Id of the field's label, for `aria-labelledby` on an element a `<label for>` cannot name. */\n labelId: string;\n /** Ids of the error, while invalid, and the hint. Put it in `aria-describedby`. */\n describedBy: string | undefined;\n invalid: boolean;\n disabled: boolean;\n readOnly: boolean;\n required: boolean;\n};\n\n/**\n * The field's wiring for a control that is not an `Input` or a `Textarea`:\n * a rich-text editor, a slider, anything a product composes itself. Returns\n * `null` outside a `Field`.\n *\n * ```tsx\n * const field = useFieldControl();\n * <div role=\"textbox\" aria-multiline=\"true\" id={field?.id}\n * aria-labelledby={field?.labelId} aria-describedby={field?.describedBy}\n * aria-invalid={field?.invalid || undefined} />\n * ```\n */\nexport function useFieldControl(): FieldControl | null {\n const { field, describedBy } = useFieldDescription();\n if (!field) return null;\n return {\n id: field.ids.control,\n labelId: field.ids.label,\n describedBy,\n invalid: field.invalid,\n disabled: field.disabled,\n readOnly: field.readOnly,\n required: field.required,\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-layout.js","sourceRoot":"","sources":["../../src/form-layout/form-layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAmB;IAC3E,OAAO,CACL,KAAC,GAAG,CAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,KAAM,KAAK,YAC5D,QAAQ,GACA,CACZ,CAAC;AACJ,CAAC;AAID;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAoB;IAC7E,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IAAC,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,SAAS,CAAC,KAAM,KAAK,YACpE,QAAQ,GACD,CACX,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"form-layout.js","sourceRoot":"","sources":["../../src/form-layout/form-layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAmB;IAC3E,OAAO,CACL,KAAC,GAAG,CAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,KAAM,KAAK,YAC5D,QAAQ,GACA,CACZ,CAAC;AACJ,CAAC;AAID;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAoB;IAC7E,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IAAC,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,SAAS,CAAC,KAAM,KAAK,YACpE,QAAQ,GACD,CACX,CAAC;AACJ,CAAC","sourcesContent":["import { ark } from '@ark-ui/react/factory';\nimport type { ComponentProps } from 'react';\nimport './form-layout.css';\nimport { cx } from '../cx';\n\nexport type FormLayoutProps = ComponentProps<typeof ark.form>;\n\n/**\n * The template a form composes: its fields in a column at the form's own\n * rhythm, then its {@link FormActions}.\n *\n * Renders a `form`, so `onSubmit`, `noValidate` and the rest land where they\n * belong; pass `asChild` when a form library renders the element. The\n * rhythm between fields is `--ds-form-layout-gap`, wider than a stack's so\n * each field's label, control and message read as one group.\n */\nexport function FormLayout({ className, children, ...props }: FormLayoutProps) {\n return (\n <ark.form className={cx('ds-form-layout', className)} {...props}>\n {children}\n </ark.form>\n );\n}\n\nexport type FormActionsProps = ComponentProps<typeof ark.div>;\n\n/**\n * The form's buttons: a row aligned to the end, with the primary action last\n * in reading order. Set apart from the fields by its own block padding.\n */\nexport function FormActions({ className, children, ...props }: FormActionsProps) {\n return (\n <ark.div className={cx('ds-form-layout__actions', className)} {...props}>\n {children}\n </ark.div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/form-layout/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/form-layout/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export type { FormActionsProps, FormLayoutProps } from './form-layout';\nexport { FormActions, FormLayout } from './form-layout';\n"]}
|
package/dist/group-items.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-items.js","sourceRoot":"","sources":["../src/group-items.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAA+B,KAAU;IACjE,MAAM,SAAS,GAAQ,EAAE,CAAC;IAC1B,MAAM,MAAM,GAAG,IAAI,GAAG,EAAe,CAAC;IACtC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;aAAM,CAAC;YACN,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAC7C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IACD,OAAO;QACL,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;KACtE,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"group-items.js","sourceRoot":"","sources":["../src/group-items.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAA+B,KAAU;IACjE,MAAM,SAAS,GAAQ,EAAE,CAAC;IAC1B,MAAM,MAAM,GAAG,IAAI,GAAG,EAAe,CAAC;IACtC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;aAAM,CAAC;YACN,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAC7C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IACD,OAAO;QACL,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;KACtE,CAAC;AACJ,CAAC","sourcesContent":["/** Options under one group heading; `label` is absent for the ungrouped ones. */\nexport interface ItemGroup<T> {\n label?: string;\n items: T[];\n}\n\n/**\n * The order Select and Combobox list their options in: ungrouped options\n * first (no group, or an empty one), then each group in order of first\n * appearance, each keeping its own order. Both build their keyboard\n * collection from the same groups, so every key walks the list as drawn.\n */\nexport function groupItems<T extends { group?: string }>(items: T[]): ItemGroup<T>[] {\n const ungrouped: T[] = [];\n const groups = new Map<string, T[]>();\n for (const item of items) {\n if (!item.group) {\n ungrouped.push(item);\n } else {\n const members = groups.get(item.group) ?? [];\n members.push(item);\n groups.set(item.group, members);\n }\n }\n return [\n ...(ungrouped.length > 0 ? [{ items: ungrouped }] : []),\n ...[...groups].map(([label, members]) => ({ label, items: members })),\n ];\n}\n"]}
|
package/dist/icon/icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,aAAa,EAAiB,MAAM,OAAO,CAAC;AACzE,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA2B3B,MAAM,aAAa,GAA6B;IAC9C,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAeF;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAa;IACzF,MAAM,OAAO,GAAG,EAAE,CAChB,SAAS,EACT,YAAY,IAAI,EAAE,EAClB,IAAI,IAAI,iBAAiB,aAAa,CAAC,IAAI,CAAC,EAAE,EAC9C,SAAS,CACV,CAAC;IAEF,OAAO,aAAa,CAAC,MAAM,EAAE;QAC3B,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;QACpC,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,UAAU,IAAI,SAAS;QACtC,SAAS,EAAE,OAAO;QAClB,SAAS,EAAE,OAAO;KACnB,CAAC,CAAC;AACL,CAAC"}
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,aAAa,EAAiB,MAAM,OAAO,CAAC;AACzE,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA2B3B,MAAM,aAAa,GAA6B;IAC9C,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAeF;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAa;IACzF,MAAM,OAAO,GAAG,EAAE,CAChB,SAAS,EACT,YAAY,IAAI,EAAE,EAClB,IAAI,IAAI,iBAAiB,aAAa,CAAC,IAAI,CAAC,EAAE,EAC9C,SAAS,CACV,CAAC;IAEF,OAAO,aAAa,CAAC,MAAM,EAAE;QAC3B,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;QACpC,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,UAAU,IAAI,SAAS;QACtC,SAAS,EAAE,OAAO;QAClB,SAAS,EAAE,OAAO;KACnB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { type ComponentType, createElement, type SVGProps } from 'react';\nimport './icon.css';\nimport { cx } from '../cx';\n\n/**\n * Library-agnostic icon contract.\n *\n * An `IconSource` is a React component that renders its own `<svg>` root.\n * A filled glyph needs no `fill` of its own; an outline glyph declares\n * `fill=\"none\"` on the root, which `Icon` leaves alone. Both take the\n * surrounding text color. The wrapper `Icon` component injects `className`,\n * role, `aria-label`, `aria-hidden`, and `focusable` via passthrough props.\n *\n * Any icon library that exports React components with this shape can be\n * passed to `<Icon>` — hand-rolled SVGs, Lucide, Heroicons, or a\n * product-specific compiled icon package.\n */\nexport type IconSource = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport type IconSize = 'sm' | 'md' | 'lg';\nexport type IconTone =\n | 'default'\n | 'muted'\n | 'action'\n | 'onAction'\n | 'success'\n | 'warning'\n | 'danger';\n\nconst TONE_TO_CLASS: Record<IconTone, string> = {\n default: 'default',\n muted: 'muted',\n action: 'action',\n onAction: 'on-action',\n success: 'success',\n warning: 'warning',\n danger: 'danger',\n};\n\ntype IconA11y = { label: string; decorative?: never } | { decorative: true; label?: never };\n\nexport type IconProps = IconA11y & {\n /** Icon component supplied by the consumer or a compiled icon package. */\n source: IconSource;\n /** Size preset. Maps to `--ds-icon-size-*`. */\n size?: IconSize;\n /** Optional tone modifier. When omitted, the icon inherits `currentColor`. */\n tone?: IconTone;\n /** Extra class names appended after `ds-icon` modifiers. */\n className?: string;\n};\n\n/**\n * Renders an SVG icon by delegating to a passed-in icon component.\n *\n * Consumers must explicitly choose between an accessible label\n * (`label=\"…\"`) and `decorative` to opt into `aria-hidden`. TypeScript\n * enforces the choice via a discriminated union — neither prop omitted,\n * nor both supplied, will compile.\n *\n * Sizing is driven by `--ds-icon-size-{sm,md,lg}` and color by\n * `currentColor` (or `--ds-icon-color-{tone}` when a tone is set).\n *\n * The icon component owns its own `viewBox` and child geometry; `Icon`\n * only contributes layout, a11y, and styling concerns.\n */\nexport function Icon({ source, size = 'md', tone, className, label, decorative }: IconProps) {\n const classes = cx(\n 'ds-icon',\n `ds-icon--${size}`,\n tone && `ds-icon--tone-${TONE_TO_CLASS[tone]}`,\n className,\n );\n\n return createElement(source, {\n role: decorative ? undefined : 'img',\n 'aria-label': label,\n 'aria-hidden': decorative || undefined,\n focusable: 'false',\n className: classes,\n });\n}\n"]}
|
package/dist/icon/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC","sourcesContent":["export * from './icon';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"illustration.js","sourceRoot":"","sources":["../../src/illustration/illustration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,aAAa,EAAiB,MAAM,OAAO,CAAC;AACzE,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAsC3B;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,IAAI,EACJ,IAAI,GAIL;IACC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AAClD,CAAC;AAsCD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,MAAM,EACN,IAAI,GAAG,IAAI,EACX,EAAE,EACF,SAAS,EACT,KAAK,EACL,UAAU,GACQ;IAClB,MAAM,OAAO,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC,EAAE,IAAI,oBAAoB,IAAI,EAAE,EAAE,SAAS,CAAC,CAAC;IACpF,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IAE9E,OAAO,aAAa,CAAC,MAAM,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IAAI,SAAS;QACtC,SAAS,EAAE,OAAO;QAClB,SAAS,EAAE,OAAO;KACnB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { type ComponentType, createElement, type SVGProps } from 'react';\nimport './illustration.css';\nimport { cx } from '../cx';\n\n/**\n * Library-agnostic artwork contract, shaped like `IconSource`.\n *\n * An `IllustrationSource` is a React component that renders its own `<svg>`\n * root with a `viewBox` and passes its props through to it. `Illustration`\n * injects `className`, the ARIA attributes, `focusable`, and — when the\n * drawing is placed inside another SVG — its position and size.\n *\n * Artwork paints with roles, never colours. Every shape is stroked with the\n * line colour (`currentColor`) and left unfilled; `illustrationPaint` marks\n * the shapes that take the accented or muted line, or one of the fills.\n */\nexport type IllustrationSource = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport type IllustrationSize = 'sm' | 'md' | 'lg';\n\n/**\n * The emphasis a line or fill takes. `default` is the plain role — the line\n * colour, or the plain fill.\n */\nexport type IllustrationTone = 'default' | 'accent' | 'muted';\n\n/** Where a drawing sits inside a parent `<svg>`, in that SVG's user units. */\nexport interface IllustrationPlacement {\n x: number;\n y: number;\n /** Width and height. Artwork is square. */\n size: number;\n}\n\n/** The attributes `illustrationPaint` returns, which the base CSS maps onto the colour roles. */\nexport interface IllustrationPaintAttributes {\n 'data-line'?: IllustrationTone;\n 'data-fill'?: IllustrationTone;\n}\n\n/**\n * The paint attributes for one shape of a drawing.\n *\n * Omit `line` for the plain line colour; omit `fill` to leave the shape\n * unfilled. Spread the result onto the shape:\n * `<path {...illustrationPaint({ line: 'accent', fill: 'accent' })} d=\"…\" />`.\n */\nexport function illustrationPaint({\n line,\n fill,\n}: {\n line?: IllustrationTone;\n fill?: IllustrationTone;\n}): IllustrationPaintAttributes {\n return { 'data-line': line, 'data-fill': fill };\n}\n\ntype IllustrationA11y =\n | {\n /** What the drawing depicts, for a drawing that stands alone. Renders `role=\"img\"`. */\n label: string;\n decorative?: never;\n }\n | {\n /** The drawing repeats visible text beside it. Renders `aria-hidden`. */\n decorative: true;\n label?: never;\n };\n\ntype IllustrationLayout =\n | {\n /** Size preset. Maps to `--ds-illustration-size-*`. Defaults to `md`. */\n size?: IllustrationSize;\n at?: never;\n }\n | {\n /**\n * Places the drawing inside a parent `<svg>` instead of in the page\n * flow, at user-space coordinates. Replaces `size`: inside a scene the\n * drawing scales with the scene's own `viewBox`.\n */\n at: IllustrationPlacement;\n size?: never;\n };\n\nexport type IllustrationProps = IllustrationA11y &\n IllustrationLayout & {\n /** Artwork component supplied by the product package. */\n source: IllustrationSource;\n /** Extra class names appended after the `ds-illustration` classes. */\n className?: string;\n };\n\n/**\n * Renders a line drawing by delegating to a passed-in artwork component.\n *\n * Consumers must choose between an accessible `label` and `decorative`;\n * TypeScript rejects neither and both. A drawing beside its own visible\n * name is decorative. A drawing that stands alone, as in an empty state, is\n * labelled with what it depicts.\n *\n * Colour comes from the `--ds-illustration-*` roles: the line is\n * `currentColor`, which defaults to `--ds-illustration-line`, so a parent\n * that sets `color` recolours the plain line. Strokes do not scale, so a\n * drawing keeps `--ds-illustration-stroke-width` at every size.\n */\nexport function Illustration({\n source,\n size = 'md',\n at,\n className,\n label,\n decorative,\n}: IllustrationProps) {\n const classes = cx('ds-illustration', !at && `ds-illustration--${size}`, className);\n const placement = at && { x: at.x, y: at.y, width: at.size, height: at.size };\n\n return createElement(source, {\n ...placement,\n role: decorative ? undefined : 'img',\n 'aria-label': label,\n 'aria-hidden': decorative || undefined,\n focusable: 'false',\n className: classes,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/illustration/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/illustration/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './illustration';\n"]}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@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9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './alert';\nexport * from './avatar';\nexport * from './badge';\nexport * from './breadcrumb';\nexport * from './button';\nexport * from './calendar';\nexport * from './card';\nexport * from './centered-layout';\nexport * from './checkbox';\nexport * from './combobox';\nexport { cx } from './cx';\nexport * from './date-input';\nexport * from './dialog';\nexport * from './divider';\nexport * from './empty-state';\nexport {\n Check as FallbackCheck,\n ChevronLeft as FallbackChevronLeft,\n ChevronRight as FallbackChevronRight,\n Cross as FallbackCross,\n Pin as FallbackPin,\n} from './fallback-glyphs';\nexport * from './field';\nexport * from './form-layout';\nexport * from './icon';\nexport * from './illustration';\nexport * from './layout';\nexport * from './link';\nexport type { LinkComponentProps } from './link-component';\nexport * from './menu';\nexport * from './page-layout';\nexport * from './popover';\nexport * from './progress';\nexport * from './reorder-control';\nexport * from './scroll-area';\nexport * from './section';\nexport * from './segment-group';\nexport * from './select';\nexport * from './show';\nexport * from './skeleton';\nexport * from './slider';\nexport * from './spinner';\nexport * from './split-layout';\nexport * from './sticky';\nexport * from './switch';\nexport * from './tabs';\nexport * from './text';\nexport * from './tooltip';\nexport * from './visually-hidden';\nexport * from './wizard-layout';\n"]}
|
package/dist/iso-date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iso-date.js","sourceRoot":"","sources":["../src/iso-date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,KAAa;IACrD,IAAI,CAAC;QACH,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,oDAAoD,GAAG,GAAG,CAAC,CAAC;IACtF,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"iso-date.js","sourceRoot":"","sources":["../src/iso-date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,KAAa;IACrD,IAAI,CAAC;QACH,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,oDAAoD,GAAG,GAAG,CAAC,CAAC;IACtF,CAAC;AACH,CAAC","sourcesContent":["import { type DateValue, parseDate } from '@internationalized/date';\n\n/**\n * Parses the ISO calendar date, `YYYY-MM-DD`, that `DateInput` and\n * `Calendar` take and give, or throws naming the prop. A wrong shape throws\n * during render, where the product passed it: a timestamp or a locale\n * string is a bug in the caller, and a control that showed something else\n * would hide it.\n */\nexport function parseIsoDate(iso: string, label: string): DateValue {\n try {\n return parseDate(iso);\n } catch {\n throw new Error(`${label} must be an ISO calendar date (YYYY-MM-DD), got \"${iso}\"`);\n }\n}\n"]}
|
package/dist/layout/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export type {\n Breakpoint,\n ContainerAlign,\n ContainerProps,\n ContentWidth,\n ControlWidth,\n FrameProps,\n FrameWidth,\n GridColumns,\n GridProps,\n InlineProps,\n LayoutAlign,\n LayoutGap,\n LayoutJustify,\n LayoutPadding,\n LayoutSurface,\n Responsive,\n SpacerProps,\n StackProps,\n} from './layout';\nexport { Container, Frame, Grid, Inline, Spacer, Stack } from './layout';\n"]}
|