@askrjs/themes 0.0.25 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/_internal/style.js +2 -1
- package/dist/components/_internal/style.js.map +1 -1
- package/dist/components/alert/alert.d.ts +5 -0
- package/dist/components/alert/alert.js +5 -0
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/alert/alert.types.d.ts +3 -0
- package/dist/components/aside/aside.d.ts +1 -0
- package/dist/components/aside/aside.js +1 -0
- package/dist/components/aside/aside.js.map +1 -1
- package/dist/components/aside/aside.types.d.ts +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +5 -0
- package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -1
- package/dist/components/aspect-ratio/aspect-ratio.types.d.ts +3 -0
- package/dist/components/badge/badge.d.ts +1 -0
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/badge/badge.types.d.ts +4 -0
- package/dist/components/block/block.d.ts +6 -0
- package/dist/components/block/block.js.map +1 -1
- package/dist/components/block/block.types.d.ts +8 -0
- package/dist/components/brand/brand.d.ts +3 -0
- package/dist/components/brand/brand.js +3 -0
- package/dist/components/brand/brand.js.map +1 -1
- package/dist/components/brand/brand.types.d.ts +6 -0
- package/dist/components/button-group/button-group.d.ts +1 -0
- package/dist/components/button-group/button-group.js +1 -0
- package/dist/components/button-group/button-group.js.map +1 -1
- package/dist/components/button-group/button-group.types.d.ts +2 -0
- package/dist/components/card/card.d.ts +7 -0
- package/dist/components/card/card.js +7 -0
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/card/card.types.d.ts +9 -0
- package/dist/components/catalog.d.ts +122 -0
- package/dist/components/catalog.js +118 -0
- package/dist/components/catalog.js.map +1 -1
- package/dist/components/close/close.d.ts +1 -0
- package/dist/components/close/close.js.map +1 -1
- package/dist/components/close/close.types.d.ts +2 -0
- package/dist/components/command-palette/command-palette.d.ts +14 -0
- package/dist/components/command-palette/command-palette.js +13 -0
- package/dist/components/command-palette/command-palette.js.map +1 -1
- package/dist/components/command-palette/command-palette.types.d.ts +6 -0
- package/dist/components/container/container.d.ts +1 -0
- package/dist/components/container/container.js +1 -0
- package/dist/components/container/container.js.map +1 -1
- package/dist/components/container/container.types.d.ts +1 -0
- package/dist/components/empty-state/empty-state.d.ts +1 -0
- package/dist/components/empty-state/empty-state.js +1 -0
- package/dist/components/empty-state/empty-state.js.map +1 -1
- package/dist/components/empty-state/empty-state.types.d.ts +2 -0
- package/dist/components/field/field.d.ts +3 -0
- package/dist/components/field/field.js +3 -0
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/field/field.types.d.ts +3 -0
- package/dist/components/footer/footer.d.ts +7 -0
- package/dist/components/footer/footer.js +7 -0
- package/dist/components/footer/footer.js.map +1 -1
- package/dist/components/footer/footer.types.d.ts +7 -0
- package/dist/components/grid/grid.d.ts +1 -0
- package/dist/components/grid/grid.js +1 -0
- package/dist/components/grid/grid.js.map +1 -1
- package/dist/components/grid/grid.types.d.ts +4 -0
- package/dist/components/header/header.d.ts +1 -0
- package/dist/components/header/header.js +1 -0
- package/dist/components/header/header.js.map +1 -1
- package/dist/components/header/header.types.d.ts +1 -0
- package/dist/components/input-group/input-group.d.ts +2 -0
- package/dist/components/input-group/input-group.js +1 -0
- package/dist/components/input-group/input-group.js.map +1 -1
- package/dist/components/input-group/input-group.types.d.ts +4 -0
- package/dist/components/main/main.d.ts +1 -0
- package/dist/components/main/main.js +1 -0
- package/dist/components/main/main.js.map +1 -1
- package/dist/components/main/main.types.d.ts +1 -0
- package/dist/components/nav/nav.d.ts +6 -0
- package/dist/components/nav/nav.js +3 -0
- package/dist/components/nav/nav.js.map +1 -1
- package/dist/components/nav/nav.types.d.ts +14 -0
- package/dist/components/navbar/navbar.d.ts +8 -0
- package/dist/components/navbar/navbar.js +8 -0
- package/dist/components/navbar/navbar.js.map +1 -1
- package/dist/components/navbar/navbar.types.d.ts +5 -0
- package/dist/components/overlays/dropdown-content.d.ts +5 -0
- package/dist/components/overlays/dropdown-content.js.map +1 -1
- package/dist/components/page/page.d.ts +1 -0
- package/dist/components/page/page.js +1 -0
- package/dist/components/page/page.js.map +1 -1
- package/dist/components/page/page.types.d.ts +1 -0
- package/dist/components/page-header/page-header.d.ts +1 -0
- package/dist/components/page-header/page-header.js +1 -0
- package/dist/components/page-header/page-header.js.map +1 -1
- package/dist/components/page-header/page-header.types.d.ts +1 -0
- package/dist/components/section/section.d.ts +1 -0
- package/dist/components/section/section.js +1 -0
- package/dist/components/section/section.js.map +1 -1
- package/dist/components/section/section.types.d.ts +1 -0
- package/dist/components/separator/separator.d.ts +5 -0
- package/dist/components/separator/separator.js.map +1 -1
- package/dist/components/separator/separator.types.d.ts +4 -0
- package/dist/components/sidebar/sidebar.d.ts +16 -0
- package/dist/components/sidebar/sidebar.js +16 -0
- package/dist/components/sidebar/sidebar.js.map +1 -1
- package/dist/components/sidebar/sidebar.types.d.ts +8 -0
- package/dist/components/skeleton/skeleton.d.ts +1 -0
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/skeleton/skeleton.types.d.ts +3 -0
- package/dist/components/spinner/spinner.d.ts +1 -0
- package/dist/components/spinner/spinner.js +1 -0
- package/dist/components/spinner/spinner.js.map +1 -1
- package/dist/components/spinner/spinner.types.d.ts +3 -0
- package/dist/components/stat/stat.d.ts +4 -0
- package/dist/components/stat/stat.js +4 -0
- package/dist/components/stat/stat.js.map +1 -1
- package/dist/components/stat/stat.types.d.ts +4 -0
- package/dist/components/text/text.d.ts +1 -0
- package/dist/components/text/text.js +1 -0
- package/dist/components/text/text.js.map +1 -1
- package/dist/components/text/text.types.d.ts +8 -0
- package/dist/components/theme/theme.d.ts +25 -0
- package/dist/components/theme/theme.js +22 -3
- package/dist/components/theme/theme.js.map +1 -1
- package/dist/components/toolbar/toolbar.d.ts +1 -0
- package/dist/components/toolbar/toolbar.js +1 -0
- package/dist/components/toolbar/toolbar.js.map +1 -1
- package/dist/components/toolbar/toolbar.types.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/_internal/style.ts +8 -1
- package/src/components/alert/alert.tsx +5 -0
- package/src/components/alert/alert.types.ts +3 -0
- package/src/components/aside/aside.tsx +1 -0
- package/src/components/aside/aside.types.ts +1 -0
- package/src/components/aspect-ratio/aspect-ratio.tsx +5 -0
- package/src/components/aspect-ratio/aspect-ratio.types.ts +3 -0
- package/src/components/badge/badge.tsx +1 -0
- package/src/components/badge/badge.types.ts +4 -0
- package/src/components/block/block.tsx +6 -0
- package/src/components/block/block.types.ts +8 -0
- package/src/components/brand/brand.tsx +3 -0
- package/src/components/brand/brand.types.ts +6 -0
- package/src/components/button-group/button-group.tsx +1 -0
- package/src/components/button-group/button-group.types.ts +2 -0
- package/src/components/card/card.tsx +7 -0
- package/src/components/card/card.types.ts +9 -0
- package/src/components/catalog.tsx +122 -0
- package/src/components/close/close.tsx +1 -0
- package/src/components/close/close.types.ts +2 -0
- package/src/components/command-palette/command-palette.tsx +14 -0
- package/src/components/command-palette/command-palette.types.ts +6 -0
- package/src/components/container/container.tsx +1 -0
- package/src/components/container/container.types.ts +1 -0
- package/src/components/empty-state/empty-state.tsx +1 -0
- package/src/components/empty-state/empty-state.types.ts +2 -0
- package/src/components/field/field.tsx +3 -0
- package/src/components/field/field.types.ts +3 -0
- package/src/components/footer/footer.tsx +7 -0
- package/src/components/footer/footer.types.ts +7 -0
- package/src/components/grid/grid.tsx +1 -0
- package/src/components/grid/grid.types.ts +4 -0
- package/src/components/header/header.tsx +1 -0
- package/src/components/header/header.types.ts +1 -0
- package/src/components/input-group/input-group.tsx +2 -0
- package/src/components/input-group/input-group.types.ts +4 -0
- package/src/components/main/main.tsx +1 -0
- package/src/components/main/main.types.ts +1 -0
- package/src/components/nav/nav.tsx +6 -0
- package/src/components/nav/nav.types.ts +14 -0
- package/src/components/navbar/navbar.tsx +8 -0
- package/src/components/navbar/navbar.types.ts +5 -0
- package/src/components/overlays/dropdown-content.tsx +5 -0
- package/src/components/page/page.tsx +1 -0
- package/src/components/page/page.types.ts +1 -0
- package/src/components/page-header/page-header.tsx +1 -0
- package/src/components/page-header/page-header.types.ts +1 -0
- package/src/components/section/section.tsx +1 -0
- package/src/components/section/section.types.ts +1 -0
- package/src/components/separator/separator.tsx +5 -0
- package/src/components/separator/separator.types.ts +4 -0
- package/src/components/sidebar/sidebar.tsx +16 -0
- package/src/components/sidebar/sidebar.types.ts +8 -0
- package/src/components/skeleton/skeleton.tsx +1 -0
- package/src/components/skeleton/skeleton.types.ts +3 -0
- package/src/components/spinner/spinner.tsx +1 -0
- package/src/components/spinner/spinner.types.ts +3 -0
- package/src/components/stat/stat.tsx +4 -0
- package/src/components/stat/stat.types.ts +4 -0
- package/src/components/text/text.tsx +1 -0
- package/src/components/text/text.types.ts +8 -0
- package/src/components/theme/theme.tsx +35 -2
- package/src/components/toolbar/toolbar.tsx +1 -0
- package/src/components/toolbar/toolbar.types.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","names":[],"sources":["../../src/components/catalog.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { Slot } from \"@askrjs/askr/foundations\";\nimport type { Ref } from \"@askrjs/askr/foundations/utilities\";\nimport { DialogContent, DialogDescription, DialogTitle } from \"@askrjs/ui\";\nimport { Block } from \"./block\";\nimport { classes } from \"./_internal/classes\";\nimport { mergeProps } from \"./_internal/merge-props\";\n\nconst CatalogDialogContent = DialogContent as (props: Record<string, unknown>) => JSX.Element;\nconst CatalogDialogTitle = DialogTitle as (props: Record<string, unknown>) => JSX.Element;\nconst CatalogDialogDescription = DialogDescription as (\n props: Record<string, unknown>,\n) => JSX.Element;\n\ntype CatalogElement = keyof JSX.IntrinsicElements;\n\nexport type CatalogComponentProps = Record<string, unknown> & {\n as?: CatalogElement;\n asChild?: boolean;\n children?: unknown;\n class?: string;\n ref?: Ref<HTMLElement>;\n};\n\ntype CatalogDefaults = {\n className?: string;\n element?: CatalogElement;\n role?: string;\n slot: string;\n};\n\nfunction catalogPart(props: CatalogComponentProps, defaults: CatalogDefaults): JSX.Element {\n const { as, asChild, children, class: className, ref, ...rest } = props;\n const Element = (as ?? defaults.element ?? \"div\") as \"div\";\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(defaults.className, className),\n \"data-slot\": defaults.slot,\n role: defaults.role,\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children as JSX.Element} />;\n }\n\n return <Element {...finalProps}>{children}</Element>;\n}\n\nfunction buttonPart(props: CatalogComponentProps, slot: string, className?: string): JSX.Element {\n const { as, asChild, children, ref, class: classProp, type = \"button\", ...rest } = props;\n void as;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(className, classProp),\n \"data-slot\": slot,\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children as JSX.Element} />;\n }\n\n return (\n <button type={type as \"button\" | \"submit\" | \"reset\"} {...finalProps}>\n {children}\n </button>\n );\n}\n\nfunction normalizeLegacySpace(value: unknown): unknown {\n if (value === \"none\") return \"0\";\n if (value === \"1\") return \"xs\";\n if (value === \"2\") return \"xs\";\n if (value === \"3\") return \"sm\";\n if (value === \"4\") return \"md\";\n if (value === \"5\") return \"lg\";\n if (value === \"6\") return \"xl\";\n if (value === \"8\") return \"2xl\";\n return value;\n}\n\nfunction layoutAlias(props: CatalogComponentProps, defaults: Record<string, unknown>): JSX.Element {\n const { gap, p, padding, style, wrap, ...rest } = props as CatalogComponentProps & {\n gap?: unknown;\n p?: unknown;\n padding?: unknown;\n style?: Record<string, unknown>;\n wrap?: boolean | string;\n };\n const BlockComponent = Block as (blockProps: Record<string, unknown>) => JSX.Element;\n const wrapStyle = wrap\n ? {\n ...style,\n flexWrap: \"wrap\",\n }\n : style;\n\n return (\n <BlockComponent\n {...defaults}\n {...rest}\n gap={normalizeLegacySpace(gap)}\n padding={padding ?? normalizeLegacySpace(p)}\n style={wrapStyle}\n />\n );\n}\n\nexport function Box(props: CatalogComponentProps): JSX.Element {\n return layoutAlias(props, {});\n}\n\nexport function Stack(props: CatalogComponentProps): JSX.Element {\n return layoutAlias(props, { direction: \"column\" });\n}\n\nexport function Inline(props: CatalogComponentProps): JSX.Element {\n return layoutAlias(props, { direction: \"row\" });\n}\n\nexport function Shell(props: CatalogComponentProps & { variant?: unknown }): JSX.Element {\n const { variant: _variant, ...rest } = props;\n void _variant;\n return layoutAlias(rest, {});\n}\n\nexport function ShellNav(props: CatalogComponentProps): JSX.Element {\n return layoutAlias(props, {});\n}\n\nexport function ShellMain(props: CatalogComponentProps): JSX.Element {\n return layoutAlias(props, { as: \"main\", grow: true });\n}\n\nexport function AlertTitle(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"alert-title\", element: \"h3\", className: \"alert-title\" });\n}\n\nexport function AlertDescription(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, {\n slot: \"alert-description\",\n element: \"p\",\n className: \"alert-description\",\n });\n}\n\nexport function Breadcrumb(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"breadcrumb\", element: \"nav\", role: \"navigation\" });\n}\n\nexport function BreadcrumbList(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"breadcrumb-list\", element: \"ol\" });\n}\n\nexport function BreadcrumbItem(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"breadcrumb-item\", element: \"li\" });\n}\n\nexport function BreadcrumbLink(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"breadcrumb-link\", element: \"a\" });\n}\n\nexport function BreadcrumbPage(props: CatalogComponentProps): JSX.Element {\n return catalogPart(\n { \"aria-current\": \"page\", ...props },\n {\n slot: \"breadcrumb-page\",\n element: \"span\",\n },\n );\n}\n\nexport function BreadcrumbSeparator(props: CatalogComponentProps): JSX.Element {\n const { children = \"/\", ...rest } = props;\n return catalogPart(\n { \"aria-hidden\": \"true\", children, ...rest },\n {\n slot: \"breadcrumb-separator\",\n element: \"li\",\n },\n );\n}\n\nexport function BreadcrumbEllipsis(props: CatalogComponentProps): JSX.Element {\n const { children = \"...\", ...rest } = props;\n return catalogPart(\n { \"aria-hidden\": \"true\", children, ...rest },\n {\n slot: \"breadcrumb-ellipsis\",\n element: \"span\",\n },\n );\n}\n\nexport function Calendar(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar\" });\n}\n\nexport function CalendarHeader(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-header\" });\n}\n\nexport function CalendarCaption(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-caption\" });\n}\n\nexport function CalendarNav(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-nav\" });\n}\n\nexport function CalendarPreviousButton(props: CatalogComponentProps): JSX.Element {\n const { children = \"Previous month\", ...rest } = props;\n return buttonPart(\n { \"aria-label\": \"Previous month\", children, ...rest },\n \"calendar-previous\",\n \"btn btn-icon btn-ghost\",\n );\n}\n\nexport function CalendarNextButton(props: CatalogComponentProps): JSX.Element {\n const { children = \"Next month\", ...rest } = props;\n return buttonPart(\n { \"aria-label\": \"Next month\", children, ...rest },\n \"calendar-next\",\n \"btn btn-icon btn-ghost\",\n );\n}\n\nexport function CalendarGrid(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-grid\", role: \"grid\" });\n}\n\nexport function CalendarHead(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-head\", role: \"row\" });\n}\n\nexport function CalendarBody(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-body\" });\n}\n\nexport function CalendarRow(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-row\", role: \"row\" });\n}\n\nexport function CalendarCell(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-cell\", role: \"gridcell\" });\n}\n\nexport function CalendarDay(\n props: CatalogComponentProps & {\n disabled?: boolean;\n outside?: boolean;\n rangeEnd?: boolean;\n rangeMiddle?: boolean;\n rangeStart?: boolean;\n selected?: boolean;\n today?: boolean;\n },\n): JSX.Element {\n const { disabled, outside, rangeEnd, rangeMiddle, rangeStart, selected, today, ...rest } = props;\n return buttonPart(\n {\n disabled,\n \"aria-disabled\": disabled ? \"true\" : undefined,\n \"aria-selected\": selected ? \"true\" : undefined,\n \"data-disabled\": disabled ? \"\" : undefined,\n \"data-outside\": outside ? \"true\" : undefined,\n \"data-range-end\": rangeEnd ? \"true\" : undefined,\n \"data-range-middle\": rangeMiddle ? \"true\" : undefined,\n \"data-range-start\": rangeStart ? \"true\" : undefined,\n \"data-selected\": selected ? \"true\" : undefined,\n \"data-today\": today ? \"true\" : undefined,\n ...rest,\n },\n \"calendar-day\",\n );\n}\n\nexport function Carousel(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"carousel\" });\n}\n\nexport function CarouselContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"carousel-content\" });\n}\n\nexport function CarouselItem(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"carousel-item\" });\n}\n\nexport function CarouselPrevious(props: CatalogComponentProps): JSX.Element {\n const { children = \"Previous\", ...rest } = props;\n return buttonPart({ children, ...rest }, \"carousel-previous\", \"btn btn-icon\");\n}\n\nexport function CarouselNext(props: CatalogComponentProps): JSX.Element {\n const { children = \"Next\", ...rest } = props;\n return buttonPart({ children, ...rest }, \"carousel-next\", \"btn btn-icon\");\n}\n\nexport function Combobox(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"combobox\" });\n}\n\nexport function ComboboxInput(props: CatalogComponentProps): JSX.Element {\n const { ref, class: className, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"input\", className),\n \"data-slot\": \"combobox-input\",\n role: \"combobox\",\n });\n\n return <input {...finalProps} />;\n}\n\nexport function ComboboxList(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"combobox-list\", role: \"listbox\" });\n}\n\nexport function ComboboxOption(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"combobox-option\", role: \"option\" });\n}\n\nexport function Command(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command\" });\n}\n\nexport function CommandDialog(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-dialog\" });\n}\n\nexport function CommandInput(props: CatalogComponentProps): JSX.Element {\n const { ref, class: className, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"input\", className),\n \"data-slot\": \"command-input\",\n });\n\n return <input {...finalProps} />;\n}\n\nexport function CommandHeader(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-header\" });\n}\n\nexport function CommandList(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-list\", role: \"listbox\" });\n}\n\nexport function CommandEmpty(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-empty\" });\n}\n\nexport function CommandGroup(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-group\", role: \"group\" });\n}\n\nexport function CommandGroupHeading(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-group-heading\", element: \"div\" });\n}\n\nexport function CommandItem(\n props: CatalogComponentProps & { active?: boolean; disabled?: boolean; selected?: boolean },\n): JSX.Element {\n const { active, disabled, selected, ...rest } = props;\n return catalogPart(\n {\n \"aria-disabled\": disabled ? \"true\" : undefined,\n \"aria-selected\": selected || active ? \"true\" : undefined,\n \"data-disabled\": disabled ? \"\" : undefined,\n \"data-selected\": selected || active ? \"true\" : undefined,\n ...rest,\n },\n { slot: \"command-item\", role: \"option\" },\n );\n}\n\nexport function CommandSeparator(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-separator\", element: \"div\", role: \"separator\" });\n}\n\nexport function CommandShortcut(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-shortcut\", element: \"span\" });\n}\n\nexport function DataTable(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"data-table\" });\n}\n\nexport function DatePicker(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"date-picker\" });\n}\n\nexport function DatePickerInput(props: CatalogComponentProps): JSX.Element {\n const { ref, class: className, type = \"date\", ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"input\", className),\n \"data-slot\": \"date-picker-input\",\n });\n\n return <input type={type as string} {...finalProps} />;\n}\n\nexport function Direction(props: CatalogComponentProps & { dir?: \"ltr\" | \"rtl\" }): JSX.Element {\n const { dir = \"ltr\", ...rest } = props;\n return catalogPart({ dir, ...rest }, { slot: \"direction\" });\n}\n\nexport function Empty(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"empty\" });\n}\n\nexport function EmptyHeader(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"empty-header\" });\n}\n\nexport function EmptyTitle(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"empty-title\", element: \"h3\" });\n}\n\nexport function EmptyDescription(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"empty-description\", element: \"p\" });\n}\n\nexport function EmptyContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"empty-content\" });\n}\n\nexport function EmptyMedia(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"empty-media\" });\n}\n\nexport function FieldGroup(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-group\" });\n}\n\nexport function FieldSet(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-set\", element: \"fieldset\" });\n}\n\nexport function FieldLegend(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-legend\", element: \"legend\" });\n}\n\nexport function FieldLabel(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-label\", element: \"label\", className: \"label\" });\n}\n\nexport function FieldDescription(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-description\", element: \"p\", className: \"field-hint\" });\n}\n\nexport function FieldContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-content\" });\n}\n\nexport function FieldTitle(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-title\", element: \"div\" });\n}\n\nexport function FieldSeparator(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-separator\", role: \"separator\" });\n}\n\nexport function InputOTP(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"input-otp\", role: \"group\" });\n}\n\nexport function InputOTPGroup(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"input-otp-group\", role: \"group\" });\n}\n\nexport function InputOTPSlot(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"input-otp-slot\", element: \"span\" });\n}\n\nexport function InputOTPSeparator(props: CatalogComponentProps): JSX.Element {\n const { children = \"-\", ...rest } = props;\n return catalogPart(\n { \"aria-hidden\": \"true\", children, ...rest },\n {\n slot: \"input-otp-separator\",\n element: \"span\",\n },\n );\n}\n\nexport function Item(\n props: CatalogComponentProps & {\n active?: boolean;\n size?: \"default\" | \"sm\" | \"xs\";\n variant?: \"default\" | \"outline\" | \"muted\";\n },\n): JSX.Element {\n const { active, size, variant, ...rest } = props;\n return catalogPart(\n {\n \"data-active\": active ? \"true\" : undefined,\n \"data-size\": size && size !== \"default\" ? size : undefined,\n \"data-variant\": variant && variant !== \"default\" ? variant : undefined,\n ...rest,\n },\n { slot: \"item\" },\n );\n}\n\nexport function ItemGroup(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-group\" });\n}\n\nexport function ItemHeader(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-header\" });\n}\n\nexport function ItemMedia(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-media\" });\n}\n\nexport function ItemContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-content\" });\n}\n\nexport function ItemTitle(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-title\" });\n}\n\nexport function ItemDescription(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-description\" });\n}\n\nexport function ItemActions(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-actions\" });\n}\n\nexport function ItemFooter(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-footer\" });\n}\n\nexport function Kbd(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"kbd\", element: \"kbd\" });\n}\n\nexport function NativeSelect(props: CatalogComponentProps): JSX.Element {\n const { children, ref, class: className, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"input\", className),\n \"data-slot\": \"native-select\",\n });\n\n return <select {...finalProps}>{children}</select>;\n}\n\nexport function NavigationMenu(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu\", element: \"nav\" });\n}\n\nexport function NavigationMenuList(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu-list\", element: \"ul\" });\n}\n\nexport function NavigationMenuItem(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu-item\", element: \"li\" });\n}\n\nexport function NavigationMenuTrigger(props: CatalogComponentProps): JSX.Element {\n return buttonPart(props, \"navigation-menu-trigger\", \"nav-item\");\n}\n\nexport function NavigationMenuContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu-content\" });\n}\n\nexport function NavigationMenuLink(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu-link\", element: \"a\" });\n}\n\nexport function NavigationMenuViewport(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu-viewport\" });\n}\n\nexport function NavigationMenuIndicator(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu-indicator\" });\n}\n\nexport function Pagination(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"pagination\", element: \"nav\", role: \"navigation\" });\n}\n\nexport function PaginationContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"pagination-content\", element: \"ul\" });\n}\n\nexport function PaginationItem(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"pagination-item\", element: \"li\" });\n}\n\nexport function PaginationLink(props: CatalogComponentProps & { active?: boolean }): JSX.Element {\n const { active, ...rest } = props;\n return catalogPart(\n {\n \"aria-current\": active ? \"page\" : undefined,\n \"data-active\": active ? \"true\" : undefined,\n ...rest,\n },\n { slot: \"pagination-link\", element: \"a\" },\n );\n}\n\nexport function PaginationPrevious(props: CatalogComponentProps): JSX.Element {\n const { children = \"Previous\", ...rest } = props;\n return catalogPart({ children, ...rest }, { slot: \"pagination-previous\", element: \"a\" });\n}\n\nexport function PaginationNext(props: CatalogComponentProps): JSX.Element {\n const { children = \"Next\", ...rest } = props;\n return catalogPart({ children, ...rest }, { slot: \"pagination-next\", element: \"a\" });\n}\n\nexport function PaginationEllipsis(props: CatalogComponentProps): JSX.Element {\n const { children = \"...\", ...rest } = props;\n return catalogPart(\n { \"aria-hidden\": \"true\", children, ...rest },\n {\n slot: \"pagination-ellipsis\",\n element: \"span\",\n },\n );\n}\n\nexport function ResizablePanelGroup(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"resizable-panel-group\" });\n}\n\nexport function ResizablePanel(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"resizable-panel\" });\n}\n\nexport function ResizableHandle(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"resizable-handle\", role: \"separator\" });\n}\n\nexport function TabsList(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"tabs-list\", role: \"tablist\" });\n}\n\nexport function TabsTrigger(props: CatalogComponentProps): JSX.Element {\n return buttonPart(props, \"tabs-trigger\", \"tab\");\n}\n\nexport function TabsContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"tabs-content\", role: \"tabpanel\" });\n}\n\nexport function SheetContent(\n props: CatalogComponentProps & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n },\n): JSX.Element {\n const { side = \"right\", ...rest } = props;\n return <CatalogDialogContent {...rest} data-side={side} data-slot=\"sheet-content\" />;\n}\n\nexport function SheetHeader(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"sheet-header\" });\n}\n\nexport function SheetFooter(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"sheet-footer\" });\n}\n\nexport function SheetTitle(props: CatalogComponentProps): JSX.Element {\n return <CatalogDialogTitle {...props} data-slot=\"sheet-title\" />;\n}\n\nexport function SheetDescription(props: CatalogComponentProps): JSX.Element {\n return <CatalogDialogDescription {...props} data-slot=\"sheet-description\" />;\n}\n\nexport function Toaster(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"sonner\" });\n}\n\nexport const Sonner = Toaster;\n\nexport function Typography(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography\" });\n}\n\nexport function TypographyH1(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-h1\", element: \"h1\" });\n}\n\nexport function TypographyH2(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-h2\", element: \"h2\" });\n}\n\nexport function TypographyH3(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-h3\", element: \"h3\" });\n}\n\nexport function TypographyH4(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-h4\", element: \"h4\" });\n}\n\nexport function TypographyP(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-p\", element: \"p\" });\n}\n\nexport function TypographyBlockquote(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-blockquote\", element: \"blockquote\" });\n}\n\nexport function TypographyList(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-list\", element: \"ul\" });\n}\n\nexport function TypographyLead(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-lead\", element: \"p\" });\n}\n\nexport function TypographyMuted(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-muted\", element: \"p\" });\n}\n"],"mappings":";;;;;;;AAQA,MAAM,uBAAuB;AAC7B,MAAM,qBAAqB;AAC3B,MAAM,2BAA2B;AAqBjC,SAAS,YAAY,OAA8B,UAAwC;CACzF,MAAM,EAAE,IAAI,SAAS,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAClE,MAAM,UAAW,MAAM,SAAS,WAAW;CAC3C,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,OAAO,QAAQ,SAAS,WAAW,SAAS;EAC5C,aAAa,SAAS;EACtB,MAAM,SAAS;CACjB,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAA0B,CAAA;CAG3E,OAAO,oBAAC,SAAD;EAAS,GAAI;EAAa;CAAkB,CAAA;AACrD;AAEA,SAAS,WAAW,OAA8B,MAAc,WAAiC;CAC/F,MAAM,EAAE,IAAI,SAAS,UAAU,KAAK,OAAO,WAAW,OAAO,UAAU,GAAG,SAAS;CAEnF,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,OAAO,QAAQ,WAAW,SAAS;EACnC,aAAa;CACf,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAA0B,CAAA;CAG3E,OACE,oBAAC,UAAD;EAAc;EAAuC,GAAI;EACtD;CACK,CAAA;AAEZ;AAEA,SAAS,qBAAqB,OAAyB;CACrD,IAAI,UAAU,QAAQ,OAAO;CAC7B,IAAI,UAAU,KAAK,OAAO;CAC1B,IAAI,UAAU,KAAK,OAA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AAEtB,SAAgB,WAAW,OAA2C;CACpE,OAAO,YAAY,OAAO,EAAE,MAAM,aAAa,CAAC;AAClD;AAEA,SAAgB,aAAa,OAA2C;CACtE,OAAO,YAAY,OAAO;EAAE,MAAM;EAAiB,SAAS;CAAK,CAAC;AACpE;AAEA,SAAgB,aAAa,OAA2C;CACtE,OAAO,YAAY,OAAO;EAAE,MAAM;EAAiB,SAAS;CAAK,CAAC;AACpE;AAEA,SAAgB,aAAa,OAA2C;CACtE,OAAO,YAAY,OAAO;EAAE,MAAM;EAAiB,SAAS;CAAK,CAAC;AACpE;AAEA,SAAgB,aAAa,OAA2C;CACtE,OAAO,YAAY,OAAO;EAAE,MAAM;EAAiB,SAAS;CAAK,CAAC;AACpE;AAEA,SAAgB,YAAY,OAA2C;CACrE,OAAO,YAAY,OAAO;EAAE,MAAM;EAAgB,SAAS;CAAI,CAAC;AAClE;AAEA,SAAgB,qBAAqB,OAA2C;CAC9E,OAAO,YAAY,OAAO;EAAE,MAAM;EAAyB,SAAS;CAAa,CAAC;AACpF;AAEA,SAAgB,eAAe,OAA2C;CACxE,OAAO,YAAY,OAAO;EAAE,MAAM;EAAmB,SAAS;CAAK,CAAC;AACtE;AAEA,SAAgB,eAAe,OAA2C;CACxE,OAAO,YAAY,OAAO;EAAE,MAAM;EAAmB,SAAS;CAAI,CAAC;AACrE;AAEA,SAAgB,gBAAgB,OAA2C;CACzE,OAAO,YAAY,OAAO;EAAE,MAAM;EAAoB,SAAS;CAAI,CAAC;AACtE"}
|
|
1
|
+
{"version":3,"file":"catalog.js","names":[],"sources":["../../src/components/catalog.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { Slot } from \"@askrjs/askr/foundations\";\nimport type { Ref } from \"@askrjs/askr/foundations/utilities\";\nimport { DialogContent, DialogDescription, DialogTitle } from \"@askrjs/ui\";\nimport { Block } from \"./block\";\nimport { classes } from \"./_internal/classes\";\nimport { mergeProps } from \"./_internal/merge-props\";\n\nconst CatalogDialogContent = DialogContent as (props: Record<string, unknown>) => JSX.Element;\nconst CatalogDialogTitle = DialogTitle as (props: Record<string, unknown>) => JSX.Element;\nconst CatalogDialogDescription = DialogDescription as (\n props: Record<string, unknown>,\n) => JSX.Element;\n\ntype CatalogElement = keyof JSX.IntrinsicElements;\n\n/**\n * Shared prop shape for the shadcn-compatible catalog primitives below: a\n * polymorphic `as`/`asChild` element plus passthrough attributes.\n */\nexport type CatalogComponentProps = Record<string, unknown> & {\n as?: CatalogElement;\n asChild?: boolean;\n children?: unknown;\n class?: string;\n ref?: Ref<HTMLElement>;\n};\n\ntype CatalogDefaults = {\n className?: string;\n element?: CatalogElement;\n role?: string;\n slot: string;\n};\n\nfunction catalogPart(props: CatalogComponentProps, defaults: CatalogDefaults): JSX.Element {\n const { as, asChild, children, class: className, ref, ...rest } = props;\n const Element = (as ?? defaults.element ?? \"div\") as \"div\";\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(defaults.className, className),\n \"data-slot\": defaults.slot,\n role: defaults.role,\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children as JSX.Element} />;\n }\n\n return <Element {...finalProps}>{children}</Element>;\n}\n\nfunction buttonPart(props: CatalogComponentProps, slot: string, className?: string): JSX.Element {\n const { as, asChild, children, ref, class: classProp, type = \"button\", ...rest } = props;\n void as;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(className, classProp),\n \"data-slot\": slot,\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children as JSX.Element} />;\n }\n\n return (\n <button type={type as \"button\" | \"submit\" | \"reset\"} {...finalProps}>\n {children}\n </button>\n );\n}\n\nfunction normalizeLegacySpace(value: unknown): unknown {\n if (value === \"none\") return \"0\";\n if (value === \"1\") return \"xs\";\n if (value === \"2\") return \"xs\";\n if (value === \"3\") return \"sm\";\n if (value === \"4\") return \"md\";\n if (value === \"5\") return \"lg\";\n if (value === \"6\") return \"xl\";\n if (value === \"8\") return \"2xl\";\n return value;\n}\n\nfunction layoutAlias(props: CatalogComponentProps, defaults: Record<string, unknown>): JSX.Element {\n const { gap, p, padding, style, wrap, ...rest } = props as CatalogComponentProps & {\n gap?: unknown;\n p?: unknown;\n padding?: unknown;\n style?: Record<string, unknown>;\n wrap?: boolean | string;\n };\n const BlockComponent = Block as (blockProps: Record<string, unknown>) => JSX.Element;\n const wrapStyle = wrap\n ? {\n ...style,\n flexWrap: \"wrap\",\n }\n : style;\n\n return (\n <BlockComponent\n {...defaults}\n {...rest}\n gap={normalizeLegacySpace(gap)}\n padding={padding ?? normalizeLegacySpace(p)}\n style={wrapStyle}\n />\n );\n}\n\n/** Legacy `Box` layout alias for {@link Block} with no default direction. */\nexport function Box(props: CatalogComponentProps): JSX.Element {\n return layoutAlias(props, {});\n}\n\n/** Legacy `Stack` layout alias for {@link Block} that defaults to a column direction. */\nexport function Stack(props: CatalogComponentProps): JSX.Element {\n return layoutAlias(props, { direction: \"column\" });\n}\n\n/** Legacy `Inline` layout alias for {@link Block} that defaults to a row direction. */\nexport function Inline(props: CatalogComponentProps): JSX.Element {\n return layoutAlias(props, { direction: \"row\" });\n}\n\n/** Legacy `Shell` layout alias for {@link Block}; the `variant` prop is accepted but ignored. */\nexport function Shell(props: CatalogComponentProps & { variant?: unknown }): JSX.Element {\n const { variant: _variant, ...rest } = props;\n void _variant;\n return layoutAlias(rest, {});\n}\n\n/** Legacy `ShellNav` layout alias for {@link Block}. */\nexport function ShellNav(props: CatalogComponentProps): JSX.Element {\n return layoutAlias(props, {});\n}\n\n/** Legacy `ShellMain` layout alias for {@link Block} that renders a growing `<main>` element. */\nexport function ShellMain(props: CatalogComponentProps): JSX.Element {\n return layoutAlias(props, { as: \"main\", grow: true });\n}\n\n/** Renders the `alert-title` part of the shadcn-compatible catalog primitives. */\nexport function AlertTitle(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"alert-title\", element: \"h3\", className: \"alert-title\" });\n}\n\n/** Renders the `alert-description` part of the shadcn-compatible catalog primitives. */\nexport function AlertDescription(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, {\n slot: \"alert-description\",\n element: \"p\",\n className: \"alert-description\",\n });\n}\n\n/** Renders the `breadcrumb` part of the shadcn-compatible catalog primitives. */\nexport function Breadcrumb(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"breadcrumb\", element: \"nav\", role: \"navigation\" });\n}\n\n/** Renders the `breadcrumb-list` part of the shadcn-compatible catalog primitives. */\nexport function BreadcrumbList(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"breadcrumb-list\", element: \"ol\" });\n}\n\n/** Renders the `breadcrumb-item` part of the shadcn-compatible catalog primitives. */\nexport function BreadcrumbItem(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"breadcrumb-item\", element: \"li\" });\n}\n\n/** Renders the `breadcrumb-link` part of the shadcn-compatible catalog primitives. */\nexport function BreadcrumbLink(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"breadcrumb-link\", element: \"a\" });\n}\n\n/** Renders the current (non-link) breadcrumb page, marked `aria-current=\"page\"`. */\nexport function BreadcrumbPage(props: CatalogComponentProps): JSX.Element {\n return catalogPart(\n { \"aria-current\": \"page\", ...props },\n {\n slot: \"breadcrumb-page\",\n element: \"span\",\n },\n );\n}\n\n/** Renders the separator between breadcrumb items (defaults to `\"/\"`). */\nexport function BreadcrumbSeparator(props: CatalogComponentProps): JSX.Element {\n const { children = \"/\", ...rest } = props;\n return catalogPart(\n { \"aria-hidden\": \"true\", children, ...rest },\n {\n slot: \"breadcrumb-separator\",\n element: \"li\",\n },\n );\n}\n\n/** Renders a non-interactive ellipsis marker in a breadcrumb trail. */\nexport function BreadcrumbEllipsis(props: CatalogComponentProps): JSX.Element {\n const { children = \"...\", ...rest } = props;\n return catalogPart(\n { \"aria-hidden\": \"true\", children, ...rest },\n {\n slot: \"breadcrumb-ellipsis\",\n element: \"span\",\n },\n );\n}\n\n/** Renders the `calendar` part of the shadcn-compatible catalog primitives. */\nexport function Calendar(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar\" });\n}\n\n/** Renders the `calendar-header` part of the shadcn-compatible catalog primitives. */\nexport function CalendarHeader(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-header\" });\n}\n\n/** Renders the `calendar-caption` part of the shadcn-compatible catalog primitives. */\nexport function CalendarCaption(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-caption\" });\n}\n\n/** Renders the `calendar-nav` part of the shadcn-compatible catalog primitives. */\nexport function CalendarNav(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-nav\" });\n}\n\n/** Button that navigates the calendar to the previous month. */\nexport function CalendarPreviousButton(props: CatalogComponentProps): JSX.Element {\n const { children = \"Previous month\", ...rest } = props;\n return buttonPart(\n { \"aria-label\": \"Previous month\", children, ...rest },\n \"calendar-previous\",\n \"btn btn-icon btn-ghost\",\n );\n}\n\n/** Button that navigates the calendar to the next month. */\nexport function CalendarNextButton(props: CatalogComponentProps): JSX.Element {\n const { children = \"Next month\", ...rest } = props;\n return buttonPart(\n { \"aria-label\": \"Next month\", children, ...rest },\n \"calendar-next\",\n \"btn btn-icon btn-ghost\",\n );\n}\n\n/** Renders the `calendar-grid` part of the shadcn-compatible catalog primitives. */\nexport function CalendarGrid(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-grid\", role: \"grid\" });\n}\n\n/** Renders the `calendar-head` part of the shadcn-compatible catalog primitives. */\nexport function CalendarHead(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-head\", role: \"row\" });\n}\n\n/** Renders the `calendar-body` part of the shadcn-compatible catalog primitives. */\nexport function CalendarBody(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-body\" });\n}\n\n/** Renders the `calendar-row` part of the shadcn-compatible catalog primitives. */\nexport function CalendarRow(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-row\", role: \"row\" });\n}\n\n/** Renders the `calendar-cell` part of the shadcn-compatible catalog primitives. */\nexport function CalendarCell(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"calendar-cell\", role: \"gridcell\" });\n}\n\n/** Renders a single selectable day cell in the calendar grid, with selection/range/today state exposed as data attributes. */\nexport function CalendarDay(\n props: CatalogComponentProps & {\n disabled?: boolean;\n outside?: boolean;\n rangeEnd?: boolean;\n rangeMiddle?: boolean;\n rangeStart?: boolean;\n selected?: boolean;\n today?: boolean;\n },\n): JSX.Element {\n const { disabled, outside, rangeEnd, rangeMiddle, rangeStart, selected, today, ...rest } = props;\n return buttonPart(\n {\n disabled,\n \"aria-disabled\": disabled ? \"true\" : undefined,\n \"aria-selected\": selected ? \"true\" : undefined,\n \"data-disabled\": disabled ? \"\" : undefined,\n \"data-outside\": outside ? \"true\" : undefined,\n \"data-range-end\": rangeEnd ? \"true\" : undefined,\n \"data-range-middle\": rangeMiddle ? \"true\" : undefined,\n \"data-range-start\": rangeStart ? \"true\" : undefined,\n \"data-selected\": selected ? \"true\" : undefined,\n \"data-today\": today ? \"true\" : undefined,\n ...rest,\n },\n \"calendar-day\",\n );\n}\n\n/** Renders the `carousel` part of the shadcn-compatible catalog primitives. */\nexport function Carousel(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"carousel\" });\n}\n\n/** Renders the `carousel-content` part of the shadcn-compatible catalog primitives. */\nexport function CarouselContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"carousel-content\" });\n}\n\n/** Renders the `carousel-item` part of the shadcn-compatible catalog primitives. */\nexport function CarouselItem(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"carousel-item\" });\n}\n\n/** Button that navigates the carousel to the previous item. */\nexport function CarouselPrevious(props: CatalogComponentProps): JSX.Element {\n const { children = \"Previous\", ...rest } = props;\n return buttonPart({ children, ...rest }, \"carousel-previous\", \"btn btn-icon\");\n}\n\n/** Button that navigates the carousel to the next item. */\nexport function CarouselNext(props: CatalogComponentProps): JSX.Element {\n const { children = \"Next\", ...rest } = props;\n return buttonPart({ children, ...rest }, \"carousel-next\", \"btn btn-icon\");\n}\n\n/** Renders the `combobox` part of the shadcn-compatible catalog primitives. */\nexport function Combobox(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"combobox\" });\n}\n\n/** Renders the combobox's text input, wired up with `role=\"combobox\"`. */\nexport function ComboboxInput(props: CatalogComponentProps): JSX.Element {\n const { ref, class: className, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"input\", className),\n \"data-slot\": \"combobox-input\",\n role: \"combobox\",\n });\n\n return <input {...finalProps} />;\n}\n\n/** Renders the `combobox-list` part of the shadcn-compatible catalog primitives. */\nexport function ComboboxList(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"combobox-list\", role: \"listbox\" });\n}\n\n/** Renders the `combobox-option` part of the shadcn-compatible catalog primitives. */\nexport function ComboboxOption(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"combobox-option\", role: \"option\" });\n}\n\n/** Renders the `command` part of the shadcn-compatible catalog primitives. */\nexport function Command(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command\" });\n}\n\n/** Renders the `command-dialog` part of the shadcn-compatible catalog primitives. */\nexport function CommandDialog(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-dialog\" });\n}\n\n/** Renders the command palette's search `<input>`. */\nexport function CommandInput(props: CatalogComponentProps): JSX.Element {\n const { ref, class: className, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"input\", className),\n \"data-slot\": \"command-input\",\n });\n\n return <input {...finalProps} />;\n}\n\n/** Renders the `command-header` part of the shadcn-compatible catalog primitives. */\nexport function CommandHeader(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-header\" });\n}\n\n/** Renders the `command-list` part of the shadcn-compatible catalog primitives. */\nexport function CommandList(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-list\", role: \"listbox\" });\n}\n\n/** Renders the `command-empty` part of the shadcn-compatible catalog primitives. */\nexport function CommandEmpty(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-empty\" });\n}\n\n/** Renders the `command-group` part of the shadcn-compatible catalog primitives. */\nexport function CommandGroup(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-group\", role: \"group\" });\n}\n\n/** Renders the `command-group-heading` part of the shadcn-compatible catalog primitives. */\nexport function CommandGroupHeading(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-group-heading\", element: \"div\" });\n}\n\n/** Renders a selectable command list entry, exposing `active`/`disabled`/`selected` as ARIA and data attributes. */\nexport function CommandItem(\n props: CatalogComponentProps & { active?: boolean; disabled?: boolean; selected?: boolean },\n): JSX.Element {\n const { active, disabled, selected, ...rest } = props;\n return catalogPart(\n {\n \"aria-disabled\": disabled ? \"true\" : undefined,\n \"aria-selected\": selected || active ? \"true\" : undefined,\n \"data-disabled\": disabled ? \"\" : undefined,\n \"data-selected\": selected || active ? \"true\" : undefined,\n ...rest,\n },\n { slot: \"command-item\", role: \"option\" },\n );\n}\n\n/** Renders the `command-separator` part of the shadcn-compatible catalog primitives. */\nexport function CommandSeparator(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-separator\", element: \"div\", role: \"separator\" });\n}\n\n/** Renders the `command-shortcut` part of the shadcn-compatible catalog primitives. */\nexport function CommandShortcut(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"command-shortcut\", element: \"span\" });\n}\n\n/** Renders the `data-table` part of the shadcn-compatible catalog primitives. */\nexport function DataTable(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"data-table\" });\n}\n\n/** Renders the `date-picker` part of the shadcn-compatible catalog primitives. */\nexport function DatePicker(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"date-picker\" });\n}\n\n/** Renders the date picker's `<input type=\"date\">` by default. */\nexport function DatePickerInput(props: CatalogComponentProps): JSX.Element {\n const { ref, class: className, type = \"date\", ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"input\", className),\n \"data-slot\": \"date-picker-input\",\n });\n\n return <input type={type as string} {...finalProps} />;\n}\n\n/** Sets the `dir` attribute (defaulting to `\"ltr\"`) on its wrapping element for RTL/LTR scoping. */\nexport function Direction(props: CatalogComponentProps & { dir?: \"ltr\" | \"rtl\" }): JSX.Element {\n const { dir = \"ltr\", ...rest } = props;\n return catalogPart({ dir, ...rest }, { slot: \"direction\" });\n}\n\n/** Renders the `empty` part of the shadcn-compatible catalog primitives. */\nexport function Empty(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"empty\" });\n}\n\n/** Renders the `empty-header` part of the shadcn-compatible catalog primitives. */\nexport function EmptyHeader(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"empty-header\" });\n}\n\n/** Renders the `empty-title` part of the shadcn-compatible catalog primitives. */\nexport function EmptyTitle(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"empty-title\", element: \"h3\" });\n}\n\n/** Renders the `empty-description` part of the shadcn-compatible catalog primitives. */\nexport function EmptyDescription(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"empty-description\", element: \"p\" });\n}\n\n/** Renders the `empty-content` part of the shadcn-compatible catalog primitives. */\nexport function EmptyContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"empty-content\" });\n}\n\n/** Renders the `empty-media` part of the shadcn-compatible catalog primitives. */\nexport function EmptyMedia(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"empty-media\" });\n}\n\n/** Renders the `field-group` part of the shadcn-compatible catalog primitives. */\nexport function FieldGroup(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-group\" });\n}\n\n/** Renders the `field-set` part of the shadcn-compatible catalog primitives. */\nexport function FieldSet(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-set\", element: \"fieldset\" });\n}\n\n/** Renders the `field-legend` part of the shadcn-compatible catalog primitives. */\nexport function FieldLegend(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-legend\", element: \"legend\" });\n}\n\n/** Renders the `field-label` part of the shadcn-compatible catalog primitives. */\nexport function FieldLabel(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-label\", element: \"label\", className: \"label\" });\n}\n\n/** Renders the `field-description` part of the shadcn-compatible catalog primitives. */\nexport function FieldDescription(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-description\", element: \"p\", className: \"field-hint\" });\n}\n\n/** Renders the `field-content` part of the shadcn-compatible catalog primitives. */\nexport function FieldContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-content\" });\n}\n\n/** Renders the `field-title` part of the shadcn-compatible catalog primitives. */\nexport function FieldTitle(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-title\", element: \"div\" });\n}\n\n/** Renders the `field-separator` part of the shadcn-compatible catalog primitives. */\nexport function FieldSeparator(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"field-separator\", role: \"separator\" });\n}\n\n/** Renders the `input-otp` part of the shadcn-compatible catalog primitives. */\nexport function InputOTP(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"input-otp\", role: \"group\" });\n}\n\n/** Renders the `input-otp-group` part of the shadcn-compatible catalog primitives. */\nexport function InputOTPGroup(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"input-otp-group\", role: \"group\" });\n}\n\n/** Renders the `input-otp-slot` part of the shadcn-compatible catalog primitives. */\nexport function InputOTPSlot(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"input-otp-slot\", element: \"span\" });\n}\n\n/** Renders the visual separator between InputOTP groups (defaults to `\"-\"`). */\nexport function InputOTPSeparator(props: CatalogComponentProps): JSX.Element {\n const { children = \"-\", ...rest } = props;\n return catalogPart(\n { \"aria-hidden\": \"true\", children, ...rest },\n {\n slot: \"input-otp-separator\",\n element: \"span\",\n },\n );\n}\n\n/** Renders a generic list item part, exposing `active`/`size`/`variant` as data attributes. */\nexport function Item(\n props: CatalogComponentProps & {\n active?: boolean;\n size?: \"default\" | \"sm\" | \"xs\";\n variant?: \"default\" | \"outline\" | \"muted\";\n },\n): JSX.Element {\n const { active, size, variant, ...rest } = props;\n return catalogPart(\n {\n \"data-active\": active ? \"true\" : undefined,\n \"data-size\": size && size !== \"default\" ? size : undefined,\n \"data-variant\": variant && variant !== \"default\" ? variant : undefined,\n ...rest,\n },\n { slot: \"item\" },\n );\n}\n\n/** Renders the `item-group` part of the shadcn-compatible catalog primitives. */\nexport function ItemGroup(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-group\" });\n}\n\n/** Renders the `item-header` part of the shadcn-compatible catalog primitives. */\nexport function ItemHeader(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-header\" });\n}\n\n/** Renders the `item-media` part of the shadcn-compatible catalog primitives. */\nexport function ItemMedia(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-media\" });\n}\n\n/** Renders the `item-content` part of the shadcn-compatible catalog primitives. */\nexport function ItemContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-content\" });\n}\n\n/** Renders the `item-title` part of the shadcn-compatible catalog primitives. */\nexport function ItemTitle(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-title\" });\n}\n\n/** Renders the `item-description` part of the shadcn-compatible catalog primitives. */\nexport function ItemDescription(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-description\" });\n}\n\n/** Renders the `item-actions` part of the shadcn-compatible catalog primitives. */\nexport function ItemActions(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-actions\" });\n}\n\n/** Renders the `item-footer` part of the shadcn-compatible catalog primitives. */\nexport function ItemFooter(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"item-footer\" });\n}\n\n/** Renders the `kbd` part of the shadcn-compatible catalog primitives. */\nexport function Kbd(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"kbd\", element: \"kbd\" });\n}\n\n/** Renders a styled native `<select>` element. */\nexport function NativeSelect(props: CatalogComponentProps): JSX.Element {\n const { children, ref, class: className, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"input\", className),\n \"data-slot\": \"native-select\",\n });\n\n return <select {...finalProps}>{children}</select>;\n}\n\n/** Renders the `navigation-menu` part of the shadcn-compatible catalog primitives. */\nexport function NavigationMenu(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu\", element: \"nav\" });\n}\n\n/** Renders the `navigation-menu-list` part of the shadcn-compatible catalog primitives. */\nexport function NavigationMenuList(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu-list\", element: \"ul\" });\n}\n\n/** Renders the `navigation-menu-item` part of the shadcn-compatible catalog primitives. */\nexport function NavigationMenuItem(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu-item\", element: \"li\" });\n}\n\n/** Renders the `navigation-menu-content` part of the shadcn-compatible catalog primitives. */\nexport function NavigationMenuTrigger(props: CatalogComponentProps): JSX.Element {\n return buttonPart(props, \"navigation-menu-trigger\", \"nav-item\");\n}\n\n/** Renders the `navigation-menu-content` part of the shadcn-compatible catalog primitives. */\nexport function NavigationMenuContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu-content\" });\n}\n\n/** Renders the `navigation-menu-link` part of the shadcn-compatible catalog primitives. */\nexport function NavigationMenuLink(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu-link\", element: \"a\" });\n}\n\n/** Renders the `navigation-menu-viewport` part of the shadcn-compatible catalog primitives. */\nexport function NavigationMenuViewport(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu-viewport\" });\n}\n\n/** Renders the `navigation-menu-indicator` part of the shadcn-compatible catalog primitives. */\nexport function NavigationMenuIndicator(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"navigation-menu-indicator\" });\n}\n\n/** Renders the `pagination` part of the shadcn-compatible catalog primitives. */\nexport function Pagination(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"pagination\", element: \"nav\", role: \"navigation\" });\n}\n\n/** Renders the `pagination-content` part of the shadcn-compatible catalog primitives. */\nexport function PaginationContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"pagination-content\", element: \"ul\" });\n}\n\n/** Renders the `pagination-item` part of the shadcn-compatible catalog primitives. */\nexport function PaginationItem(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"pagination-item\", element: \"li\" });\n}\n\n/** Renders a pagination page link, marking it `aria-current=\"page\"` when `active`. */\nexport function PaginationLink(props: CatalogComponentProps & { active?: boolean }): JSX.Element {\n const { active, ...rest } = props;\n return catalogPart(\n {\n \"aria-current\": active ? \"page\" : undefined,\n \"data-active\": active ? \"true\" : undefined,\n ...rest,\n },\n { slot: \"pagination-link\", element: \"a\" },\n );\n}\n\n/** Pagination link that moves to the previous page. */\nexport function PaginationPrevious(props: CatalogComponentProps): JSX.Element {\n const { children = \"Previous\", ...rest } = props;\n return catalogPart({ children, ...rest }, { slot: \"pagination-previous\", element: \"a\" });\n}\n\n/** Pagination link that moves to the next page. */\nexport function PaginationNext(props: CatalogComponentProps): JSX.Element {\n const { children = \"Next\", ...rest } = props;\n return catalogPart({ children, ...rest }, { slot: \"pagination-next\", element: \"a\" });\n}\n\n/** Renders a non-interactive ellipsis marker between pagination links. */\nexport function PaginationEllipsis(props: CatalogComponentProps): JSX.Element {\n const { children = \"...\", ...rest } = props;\n return catalogPart(\n { \"aria-hidden\": \"true\", children, ...rest },\n {\n slot: \"pagination-ellipsis\",\n element: \"span\",\n },\n );\n}\n\n/** Renders the `resizable-panel-group` part of the shadcn-compatible catalog primitives. */\nexport function ResizablePanelGroup(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"resizable-panel-group\" });\n}\n\n/** Renders the `resizable-panel` part of the shadcn-compatible catalog primitives. */\nexport function ResizablePanel(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"resizable-panel\" });\n}\n\n/** Renders the `resizable-handle` part of the shadcn-compatible catalog primitives. */\nexport function ResizableHandle(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"resizable-handle\", role: \"separator\" });\n}\n\n/** Renders the `tabs-list` part of the shadcn-compatible catalog primitives. */\nexport function TabsList(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"tabs-list\", role: \"tablist\" });\n}\n\n/** Renders the `tabs-content` part of the shadcn-compatible catalog primitives. */\nexport function TabsTrigger(props: CatalogComponentProps): JSX.Element {\n return buttonPart(props, \"tabs-trigger\", \"tab\");\n}\n\n/** Renders the `tabs-content` part of the shadcn-compatible catalog primitives. */\nexport function TabsContent(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"tabs-content\", role: \"tabpanel\" });\n}\n\n/** Sheet variant of the dialog content part; defaults to sliding in from the right. */\nexport function SheetContent(\n props: CatalogComponentProps & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n },\n): JSX.Element {\n const { side = \"right\", ...rest } = props;\n return <CatalogDialogContent {...rest} data-side={side} data-slot=\"sheet-content\" />;\n}\n\n/** Renders the `sheet-header` part of the shadcn-compatible catalog primitives. */\nexport function SheetHeader(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"sheet-header\" });\n}\n\n/** Renders the `sheet-footer` part of the shadcn-compatible catalog primitives. */\nexport function SheetFooter(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"sheet-footer\" });\n}\n\n/** Sheet variant of the dialog title part. */\nexport function SheetTitle(props: CatalogComponentProps): JSX.Element {\n return <CatalogDialogTitle {...props} data-slot=\"sheet-title\" />;\n}\n\n/** Sheet variant of the dialog description part. */\nexport function SheetDescription(props: CatalogComponentProps): JSX.Element {\n return <CatalogDialogDescription {...props} data-slot=\"sheet-description\" />;\n}\n\n/** Renders the `sonner` part of the shadcn-compatible catalog primitives. */\nexport function Toaster(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"sonner\" });\n}\n\n/** Alias of {@link Toaster} kept for shadcn/sonner API compatibility. */\nexport const Sonner = Toaster;\n\n/** Renders the `typography` part of the shadcn-compatible catalog primitives. */\nexport function Typography(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography\" });\n}\n\n/** Renders the `typography-h1` part of the shadcn-compatible catalog primitives. */\nexport function TypographyH1(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-h1\", element: \"h1\" });\n}\n\n/** Renders the `typography-h2` part of the shadcn-compatible catalog primitives. */\nexport function TypographyH2(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-h2\", element: \"h2\" });\n}\n\n/** Renders the `typography-h3` part of the shadcn-compatible catalog primitives. */\nexport function TypographyH3(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-h3\", element: \"h3\" });\n}\n\n/** Renders the `typography-h4` part of the shadcn-compatible catalog primitives. */\nexport function TypographyH4(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-h4\", element: \"h4\" });\n}\n\n/** Renders the `typography-p` part of the shadcn-compatible catalog primitives. */\nexport function TypographyP(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-p\", element: \"p\" });\n}\n\n/** Renders the `typography-blockquote` part of the shadcn-compatible catalog primitives. */\nexport function TypographyBlockquote(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-blockquote\", element: \"blockquote\" });\n}\n\n/** Renders the `typography-list` part of the shadcn-compatible catalog primitives. */\nexport function TypographyList(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-list\", element: \"ul\" });\n}\n\n/** Renders the `typography-lead` part of the shadcn-compatible catalog primitives. */\nexport function TypographyLead(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-lead\", element: \"p\" });\n}\n\n/** Renders the `typography-muted` part of the shadcn-compatible catalog primitives. */\nexport function TypographyMuted(props: CatalogComponentProps): JSX.Element {\n return catalogPart(props, { slot: \"typography-muted\", element: \"p\" });\n}\n"],"mappings":";;;;;;;AAQA,MAAM,uBAAuB;AAC7B,MAAM,qBAAqB;AAC3B,MAAM,2BAA2B;AAyBjC,SAAS,YAAY,OAA8B,UAAwC;CACzF,MAAM,EAAE,IAAI,SAAS,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAClE,MAAM,UAAW,MAAM,SAAS,WAAW;CAC3C,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,OAAO,QAAQ,SAAS,WAAW,SAAS;EAC5C,aAAa,SAAS;EACtB,MAAM,SAAS;CACjB,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAA0B,CAAA;CAG3E,OAAO,oBAAC,SAAD;EAAS,GAAI;EAAa;CAAkB,CAAA;AACrD;AAEA,SAAS,WAAW,OAA8B,MAAc,WAAiC;CAC/F,MAAM,EAAE,IAAI,SAAS,UAAU,KAAK,OAAO,WAAW,OAAO,UAAU,GAAG,SAAS;CAEnF,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,OAAO,QAAQ,WAAW,SAAS;EACnC,aAAa;CACf,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAA0B,CAAA;CAG3E,OACE,oBAAC,UAAD;EAAc;EAAuC,GAA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1,6 +1,7 @@
|
|
|
1
1
|
import { CloseNativeProps } from "./close.types.js";
|
|
2
2
|
import { JSX } from "@askrjs/askr/jsx-runtime";
|
|
3
3
|
//#region src/components/close/close.d.ts
|
|
4
|
+
/** Renders a dismiss ("×") icon button, built on top of `Button`, defaulting to an icon-sized ghost variant with an accessible `label`. */
|
|
4
5
|
declare function Close(props: CloseNativeProps): JSX.Element;
|
|
5
6
|
//#endregion
|
|
6
7
|
export { Close };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close.js","names":[],"sources":["../../../src/components/close/close.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { Button, type ButtonNativeProps } from \"@askrjs/ui\";\nimport { classes } from \"../_internal/classes\";\nimport type { CloseNativeProps } from \"./close.types\";\n\nexport function Close(props: CloseNativeProps): JSX.Element;\nexport function Close(props: CloseNativeProps): JSX.Element {\n const { children, class: className, label = \"Close\", size, variant, ...rest } = props;\n return (\n <Button\n {...(rest as ButtonNativeProps)}\n class={classes(\"btn-close\", className)}\n aria-label={label}\n size={size ?? \"icon\"}\n variant={variant ?? \"ghost\"}\n >\n {children ?? <span aria-hidden=\"true\">×</span>}\n </Button>\n );\n}\n"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"close.js","names":[],"sources":["../../../src/components/close/close.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { Button, type ButtonNativeProps } from \"@askrjs/ui\";\nimport { classes } from \"../_internal/classes\";\nimport type { CloseNativeProps } from \"./close.types\";\n\n/** Renders a dismiss (\"×\") icon button, built on top of `Button`, defaulting to an icon-sized ghost variant with an accessible `label`. */\nexport function Close(props: CloseNativeProps): JSX.Element;\nexport function Close(props: CloseNativeProps): JSX.Element {\n const { children, class: className, label = \"Close\", size, variant, ...rest } = props;\n return (\n <Button\n {...(rest as ButtonNativeProps)}\n class={classes(\"btn-close\", className)}\n aria-label={label}\n size={size ?? \"icon\"}\n variant={variant ?? \"ghost\"}\n >\n {children ?? <span aria-hidden=\"true\">×</span>}\n </Button>\n );\n}\n"],"mappings":";;;;AAOA,SAAgB,MAAM,OAAsC;CAC1D,MAAM,EAAE,UAAU,OAAO,WAAW,QAAQ,SAAS,MAAM,SAAS,GAAG,SAAS;CAChF,OACE,oBAAC,QAAD;EACE,GAAK;EACL,OAAO,QAAQ,aAAa,SAAS;EACrC,cAAY;EACZ,MAAM,QAAQ;EACd,SAAS,WAAW;EAEnB,UAAA,YAAY,oBAAC,QAAD;GAAM,eAAY;GAAO,UAAA;EAAO,CAAA;CACvC,CAAA;AAEZ"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ButtonNativeProps } from "@askrjs/ui";
|
|
2
2
|
//#region src/components/close/close.types.d.ts
|
|
3
|
+
/** Props specific to {@link Close}, layered on top of {@link ButtonNativeProps}. */
|
|
3
4
|
type CloseOwnProps = {
|
|
4
5
|
label?: string;
|
|
5
6
|
};
|
|
7
|
+
/** Props for the {@link Close} component. */
|
|
6
8
|
type CloseNativeProps = ButtonNativeProps & CloseOwnProps;
|
|
7
9
|
//#endregion
|
|
8
10
|
export { CloseNativeProps, CloseOwnProps };
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { CommandPaletteContentProps, CommandPaletteLinkProps, CommandPaletteListProps, CommandPaletteProps, CommandPaletteTriggerAsChildProps, CommandPaletteTriggerProps } from "./command-palette.types.js";
|
|
2
2
|
import { JSX } from "@askrjs/askr/jsx-runtime";
|
|
3
3
|
//#region src/components/command-palette/command-palette.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Root dialog wrapper for a searchable command palette. Manages open state
|
|
6
|
+
* (controlled or uncontrolled), tracks the triggering element, and restores
|
|
7
|
+
* focus to it after the palette closes.
|
|
8
|
+
*/
|
|
4
9
|
declare function CommandPalette(props: CommandPaletteProps): JSX.Element;
|
|
10
|
+
/** Trigger that opens the {@link CommandPalette}, registering itself so focus returns here on close. */
|
|
5
11
|
declare function CommandPaletteTrigger(props: CommandPaletteTriggerProps): JSX.Element;
|
|
6
12
|
declare function CommandPaletteTrigger(props: CommandPaletteTriggerAsChildProps): JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* Dialog content for a {@link CommandPalette}: renders the overlay, an
|
|
15
|
+
* accessible (visually hidden) title/description, and a `Command` list,
|
|
16
|
+
* moving initial focus to `initialFocus` (defaults to the search input) once
|
|
17
|
+
* mounted, and optionally suppressing dismiss-on-escape/backdrop.
|
|
18
|
+
*/
|
|
7
19
|
declare function CommandPaletteContent(props: CommandPaletteContentProps): JSX.Element;
|
|
20
|
+
/** A navigable result row that closes the palette on selection (unless `closeOnSelect` is `false`) and supports cancelling navigation via `onBeforeNavigate`. */
|
|
8
21
|
declare function CommandPaletteLink(props: CommandPaletteLinkProps): JSX.Element;
|
|
22
|
+
/** Renders the `<ul>` list wrapper for {@link CommandPalette} results. */
|
|
9
23
|
declare function CommandPaletteList(props: CommandPaletteListProps): JSX.Element;
|
|
10
24
|
//#endregion
|
|
11
25
|
export { CommandPalette, CommandPaletteContent, CommandPaletteLink, CommandPaletteList, CommandPaletteTrigger };
|
|
@@ -13,6 +13,11 @@ function readCommandPaletteContext() {
|
|
|
13
13
|
if (!context) throw new Error("CommandPalette components must be used within <CommandPalette>");
|
|
14
14
|
return context;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Root dialog wrapper for a searchable command palette. Manages open state
|
|
18
|
+
* (controlled or uncontrolled), tracks the triggering element, and restores
|
|
19
|
+
* focus to it after the palette closes.
|
|
20
|
+
*/
|
|
16
21
|
function CommandPalette(props) {
|
|
17
22
|
const { children, defaultOpen = false, onOpenChange, open, ...rest } = props;
|
|
18
23
|
const openState = controllableState({
|
|
@@ -71,6 +76,12 @@ function CommandPaletteTrigger(props) {
|
|
|
71
76
|
function preventDismiss(event, shouldDismiss) {
|
|
72
77
|
if (!shouldDismiss) event.preventDefault();
|
|
73
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Dialog content for a {@link CommandPalette}: renders the overlay, an
|
|
81
|
+
* accessible (visually hidden) title/description, and a `Command` list,
|
|
82
|
+
* moving initial focus to `initialFocus` (defaults to the search input) once
|
|
83
|
+
* mounted, and optionally suppressing dismiss-on-escape/backdrop.
|
|
84
|
+
*/
|
|
74
85
|
function CommandPaletteContent(props) {
|
|
75
86
|
const palette = readCommandPaletteContext();
|
|
76
87
|
const { children, class: className, closeOnBackdrop = true, closeOnEscape = true, description, initialFocus = "[data-slot=\"command-input\"]", onEscapeKeyDown, onInteractOutside, onPointerDownOutside, overlayProps, ref, title, ...rest } = props;
|
|
@@ -126,6 +137,7 @@ function composeBeforeNavigate(close, closeOnSelect, beforeNavigate, onPress) {
|
|
|
126
137
|
if (closeOnSelect && !event.defaultPrevented) close();
|
|
127
138
|
};
|
|
128
139
|
}
|
|
140
|
+
/** A navigable result row that closes the palette on selection (unless `closeOnSelect` is `false`) and supports cancelling navigation via `onBeforeNavigate`. */
|
|
129
141
|
function CommandPaletteLink(props) {
|
|
130
142
|
const { children, class: className, closeOnSelect = true, onBeforeNavigate, onPress, ...rest } = props;
|
|
131
143
|
const palette = readCommandPaletteContext();
|
|
@@ -140,6 +152,7 @@ function CommandPaletteLink(props) {
|
|
|
140
152
|
})
|
|
141
153
|
});
|
|
142
154
|
}
|
|
155
|
+
/** Renders the `<ul>` list wrapper for {@link CommandPalette} results. */
|
|
143
156
|
function CommandPaletteList(props) {
|
|
144
157
|
const { children, class: className, ...rest } = props;
|
|
145
158
|
return /* @__PURE__ */ jsx("ul", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-palette.js","names":[],"sources":["../../../src/components/command-palette/command-palette.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { Link } from \"@askrjs/askr/router\";\nimport { defineScope, readScope, state } from \"@askrjs/askr\";\nimport { controllableState } from \"@askrjs/askr/foundations/state\";\nimport { composeRefs, type Ref } from \"@askrjs/askr/foundations/utilities\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n} from \"@askrjs/ui\";\nimport { Command } from \"../catalog\";\nimport { classes } from \"../_internal/classes\";\nimport type {\n CommandPaletteContentProps,\n CommandPaletteLinkProps,\n CommandPaletteListProps,\n CommandPaletteProps,\n CommandPaletteTriggerAsChildProps,\n CommandPaletteTriggerProps,\n} from \"./command-palette.types\";\n\ntype CommandPaletteContextValue = {\n close: () => void;\n restoreFocusSoon: () => void;\n setTrigger: (node: Element | null) => void;\n};\n\nconst CommandPaletteContext = defineScope<CommandPaletteContextValue | null>(null);\n\nfunction readCommandPaletteContext(): CommandPaletteContextValue {\n const context = readScope(CommandPaletteContext);\n if (!context) {\n throw new Error(\"CommandPalette components must be used within <CommandPalette>\");\n }\n return context;\n}\n\nexport function CommandPalette(props: CommandPaletteProps): JSX.Element {\n const { children, defaultOpen = false, onOpenChange, open, ...rest } = props;\n const openState = controllableState({\n defaultValue: defaultOpen,\n onChange: onOpenChange,\n value: open,\n });\n const focusState = state({\n open: false,\n returnFocus: null as HTMLElement | null,\n trigger: null as Element | null,\n })();\n const isOpen = openState();\n\n if (isOpen && !focusState.open && typeof document !== \"undefined\") {\n const active = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n focusState.returnFocus =\n active && active !== document.body\n ? active\n : focusState.trigger instanceof HTMLElement\n ? focusState.trigger\n : null;\n }\n focusState.open = isOpen;\n\n const restoreFocusSoon = () => {\n const returnFocus = focusState.returnFocus;\n if (!returnFocus) {\n return;\n }\n\n queueMicrotask(() => {\n queueMicrotask(() => {\n if (returnFocus.isConnected) {\n returnFocus.focus();\n }\n });\n });\n };\n\n return (\n <CommandPaletteContext\n value={{\n close: () => openState.set(false),\n restoreFocusSoon,\n setTrigger: (node) => {\n focusState.trigger = node;\n },\n }}\n >\n <Dialog {...rest} open={isOpen} onOpenChange={openState.set}>\n {children}\n </Dialog>\n </CommandPaletteContext>\n );\n}\n\nexport function CommandPaletteTrigger(props: CommandPaletteTriggerProps): JSX.Element;\nexport function CommandPaletteTrigger(props: CommandPaletteTriggerAsChildProps): JSX.Element;\nexport function CommandPaletteTrigger(\n props: CommandPaletteTriggerProps | CommandPaletteTriggerAsChildProps,\n): JSX.Element {\n const palette = readCommandPaletteContext();\n const ref = props.ref\n ? composeRefs(props.ref as Ref<Element>, palette.setTrigger)\n : palette.setTrigger;\n\n if (props.asChild) {\n return <DialogTrigger {...props} ref={ref} />;\n }\n\n return <DialogTrigger {...props} ref={ref as Ref<HTMLButtonElement>} />;\n}\n\nfunction preventDismiss(event: Event, shouldDismiss: boolean): void {\n if (!shouldDismiss) {\n event.preventDefault();\n }\n}\n\nexport function CommandPaletteContent(props: CommandPaletteContentProps): JSX.Element {\n const palette = readCommandPaletteContext();\n const {\n children,\n class: className,\n closeOnBackdrop = true,\n closeOnEscape = true,\n description,\n initialFocus = '[data-slot=\"command-input\"]',\n onEscapeKeyDown,\n onInteractOutside,\n onPointerDownOutside,\n overlayProps,\n ref,\n title,\n ...rest\n } = props;\n const focusInitialTarget = (node: HTMLDivElement | null) => {\n if (!node) {\n palette.restoreFocusSoon();\n return;\n }\n\n if (initialFocus === false) {\n return;\n }\n\n queueMicrotask(() => {\n if (!node.isConnected) {\n return;\n }\n\n const target =\n typeof initialFocus === \"function\"\n ? initialFocus()\n : node.querySelector<HTMLElement>(initialFocus);\n target?.focus();\n });\n };\n const contentRef = ref\n ? composeRefs(ref as Ref<HTMLDivElement>, focusInitialTarget)\n : focusInitialTarget;\n\n return (\n <DialogPortal>\n <DialogOverlay {...overlayProps} data-command-palette-overlay=\"\" />\n <DialogContent\n {...rest}\n class={className}\n data-command-palette-content=\"\"\n ref={contentRef}\n onEscapeKeyDown={(event) => {\n onEscapeKeyDown?.(event);\n preventDismiss(event, closeOnEscape);\n }}\n onInteractOutside={(event) => {\n onInteractOutside?.(event);\n preventDismiss(event, closeOnBackdrop);\n }}\n onPointerDownOutside={(event) => {\n onPointerDownOutside?.(event);\n preventDismiss(event, closeOnBackdrop);\n }}\n >\n <DialogTitle class=\"sr-only\">{title}</DialogTitle>\n {description ? <DialogDescription class=\"sr-only\">{description}</DialogDescription> : null}\n <Command>{children}</Command>\n </DialogContent>\n </DialogPortal>\n );\n}\n\nfunction composeBeforeNavigate(\n close: () => void,\n closeOnSelect: boolean,\n beforeNavigate: CommandPaletteLinkProps[\"onBeforeNavigate\"],\n onPress: CommandPaletteLinkProps[\"onPress\"],\n): (event: Event) => void {\n return (event) => {\n beforeNavigate?.();\n if (!event.defaultPrevented) {\n onPress?.(event);\n }\n if (closeOnSelect && !event.defaultPrevented) {\n close();\n }\n };\n}\n\nexport function CommandPaletteLink(props: CommandPaletteLinkProps): JSX.Element {\n const {\n children,\n class: className,\n closeOnSelect = true,\n onBeforeNavigate,\n onPress,\n ...rest\n } = props;\n const palette = readCommandPaletteContext();\n return (\n <li data-command-palette-result=\"\">\n <Link\n {...rest}\n class={className}\n data-slot=\"command-item\"\n onPress={composeBeforeNavigate(palette.close, closeOnSelect, onBeforeNavigate, onPress)}\n >\n {children}\n </Link>\n </li>\n );\n}\n\nexport function CommandPaletteList(props: CommandPaletteListProps): JSX.Element {\n const { children, class: className, ...rest } = props;\n return (\n <ul {...rest} class={classes(className)} data-slot=\"command-list\">\n {children}\n </ul>\n );\n}\n"],"mappings":";;;;;;;;;AA+BA,MAAM,wBAAwB,YAA+C,IAAI;AAEjF,SAAS,4BAAwD;CAC/D,MAAM,UAAU,UAAU,qBAAqB;CAC/C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,gEAAgE;CAElF,OAAO;AACT;AAEA,SAAgB,eAAe,OAAyC;CACtE,MAAM,EAAE,UAAU,cAAc,OAAO,cAAc,MAAM,GAAG,SAAS;CACvE,MAAM,YAAY,kBAAkB;EAClC,cAAc;EACd,UAAU;EACV,OAAO;CACT,CAAC;CACD,MAAM,aAAa,MAAM;EACvB,MAAM;EACN,aAAa;EACb,SAAS;CACX,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AAsB,QAAQ,OAAO,eAAe,kBAAkB,OAAO;GAErF;EACG,CAAA;CACJ,CAAA;AAER;AAEA,SAAgB,mBAAmB,OAA6C;CAC9E,MAAM,EAAE,UAAU,OAAO,WAAW,GAAG,SAAS;CAChD,OACE,oBAAC,MAAD;EAAI,GAAI;EAAM,OAAO,QAAQ,SAAS;EAAG,aAAU;EAChD;CACC,CAAA;AAER"}
|
|
1
|
+
{"version":3,"file":"command-palette.js","names":[],"sources":["../../../src/components/command-palette/command-palette.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { Link } from \"@askrjs/askr/router\";\nimport { defineScope, readScope, state } from \"@askrjs/askr\";\nimport { controllableState } from \"@askrjs/askr/foundations/state\";\nimport { composeRefs, type Ref } from \"@askrjs/askr/foundations/utilities\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n} from \"@askrjs/ui\";\nimport { Command } from \"../catalog\";\nimport { classes } from \"../_internal/classes\";\nimport type {\n CommandPaletteContentProps,\n CommandPaletteLinkProps,\n CommandPaletteListProps,\n CommandPaletteProps,\n CommandPaletteTriggerAsChildProps,\n CommandPaletteTriggerProps,\n} from \"./command-palette.types\";\n\ntype CommandPaletteContextValue = {\n close: () => void;\n restoreFocusSoon: () => void;\n setTrigger: (node: Element | null) => void;\n};\n\nconst CommandPaletteContext = defineScope<CommandPaletteContextValue | null>(null);\n\nfunction readCommandPaletteContext(): CommandPaletteContextValue {\n const context = readScope(CommandPaletteContext);\n if (!context) {\n throw new Error(\"CommandPalette components must be used within <CommandPalette>\");\n }\n return context;\n}\n\n/**\n * Root dialog wrapper for a searchable command palette. Manages open state\n * (controlled or uncontrolled), tracks the triggering element, and restores\n * focus to it after the palette closes.\n */\nexport function CommandPalette(props: CommandPaletteProps): JSX.Element {\n const { children, defaultOpen = false, onOpenChange, open, ...rest } = props;\n const openState = controllableState({\n defaultValue: defaultOpen,\n onChange: onOpenChange,\n value: open,\n });\n const focusState = state({\n open: false,\n returnFocus: null as HTMLElement | null,\n trigger: null as Element | null,\n })();\n const isOpen = openState();\n\n if (isOpen && !focusState.open && typeof document !== \"undefined\") {\n const active = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n focusState.returnFocus =\n active && active !== document.body\n ? active\n : focusState.trigger instanceof HTMLElement\n ? focusState.trigger\n : null;\n }\n focusState.open = isOpen;\n\n const restoreFocusSoon = () => {\n const returnFocus = focusState.returnFocus;\n if (!returnFocus) {\n return;\n }\n\n queueMicrotask(() => {\n queueMicrotask(() => {\n if (returnFocus.isConnected) {\n returnFocus.focus();\n }\n });\n });\n };\n\n return (\n <CommandPaletteContext\n value={{\n close: () => openState.set(false),\n restoreFocusSoon,\n setTrigger: (node) => {\n focusState.trigger = node;\n },\n }}\n >\n <Dialog {...rest} open={isOpen} onOpenChange={openState.set}>\n {children}\n </Dialog>\n </CommandPaletteContext>\n );\n}\n\n/** Trigger that opens the {@link CommandPalette}, registering itself so focus returns here on close. */\nexport function CommandPaletteTrigger(props: CommandPaletteTriggerProps): JSX.Element;\nexport function CommandPaletteTrigger(props: CommandPaletteTriggerAsChildProps): JSX.Element;\nexport function CommandPaletteTrigger(\n props: CommandPaletteTriggerProps | CommandPaletteTriggerAsChildProps,\n): JSX.Element {\n const palette = readCommandPaletteContext();\n const ref = props.ref\n ? composeRefs(props.ref as Ref<Element>, palette.setTrigger)\n : palette.setTrigger;\n\n if (props.asChild) {\n return <DialogTrigger {...props} ref={ref} />;\n }\n\n return <DialogTrigger {...props} ref={ref as Ref<HTMLButtonElement>} />;\n}\n\nfunction preventDismiss(event: Event, shouldDismiss: boolean): void {\n if (!shouldDismiss) {\n event.preventDefault();\n }\n}\n\n/**\n * Dialog content for a {@link CommandPalette}: renders the overlay, an\n * accessible (visually hidden) title/description, and a `Command` list,\n * moving initial focus to `initialFocus` (defaults to the search input) once\n * mounted, and optionally suppressing dismiss-on-escape/backdrop.\n */\nexport function CommandPaletteContent(props: CommandPaletteContentProps): JSX.Element {\n const palette = readCommandPaletteContext();\n const {\n children,\n class: className,\n closeOnBackdrop = true,\n closeOnEscape = true,\n description,\n initialFocus = '[data-slot=\"command-input\"]',\n onEscapeKeyDown,\n onInteractOutside,\n onPointerDownOutside,\n overlayProps,\n ref,\n title,\n ...rest\n } = props;\n const focusInitialTarget = (node: HTMLDivElement | null) => {\n if (!node) {\n palette.restoreFocusSoon();\n return;\n }\n\n if (initialFocus === false) {\n return;\n }\n\n queueMicrotask(() => {\n if (!node.isConnected) {\n return;\n }\n\n const target =\n typeof initialFocus === \"function\"\n ? initialFocus()\n : node.querySelector<HTMLElement>(initialFocus);\n target?.focus();\n });\n };\n const contentRef = ref\n ? composeRefs(ref as Ref<HTMLDivElement>, focusInitialTarget)\n : focusInitialTarget;\n\n return (\n <DialogPortal>\n <DialogOverlay {...overlayProps} data-command-palette-overlay=\"\" />\n <DialogContent\n {...rest}\n class={className}\n data-command-palette-content=\"\"\n ref={contentRef}\n onEscapeKeyDown={(event) => {\n onEscapeKeyDown?.(event);\n preventDismiss(event, closeOnEscape);\n }}\n onInteractOutside={(event) => {\n onInteractOutside?.(event);\n preventDismiss(event, closeOnBackdrop);\n }}\n onPointerDownOutside={(event) => {\n onPointerDownOutside?.(event);\n preventDismiss(event, closeOnBackdrop);\n }}\n >\n <DialogTitle class=\"sr-only\">{title}</DialogTitle>\n {description ? <DialogDescription class=\"sr-only\">{description}</DialogDescription> : null}\n <Command>{children}</Command>\n </DialogContent>\n </DialogPortal>\n );\n}\n\nfunction composeBeforeNavigate(\n close: () => void,\n closeOnSelect: boolean,\n beforeNavigate: CommandPaletteLinkProps[\"onBeforeNavigate\"],\n onPress: CommandPaletteLinkProps[\"onPress\"],\n): (event: Event) => void {\n return (event) => {\n beforeNavigate?.();\n if (!event.defaultPrevented) {\n onPress?.(event);\n }\n if (closeOnSelect && !event.defaultPrevented) {\n close();\n }\n };\n}\n\n/** A navigable result row that closes the palette on selection (unless `closeOnSelect` is `false`) and supports cancelling navigation via `onBeforeNavigate`. */\nexport function CommandPaletteLink(props: CommandPaletteLinkProps): JSX.Element {\n const {\n children,\n class: className,\n closeOnSelect = true,\n onBeforeNavigate,\n onPress,\n ...rest\n } = props;\n const palette = readCommandPaletteContext();\n return (\n <li data-command-palette-result=\"\">\n <Link\n {...rest}\n class={className}\n data-slot=\"command-item\"\n onPress={composeBeforeNavigate(palette.close, closeOnSelect, onBeforeNavigate, onPress)}\n >\n {children}\n </Link>\n </li>\n );\n}\n\n/** Renders the `<ul>` list wrapper for {@link CommandPalette} results. */\nexport function CommandPaletteList(props: CommandPaletteListProps): JSX.Element {\n const { children, class: className, ...rest } = props;\n return (\n <ul {...rest} class={classes(className)} data-slot=\"command-list\">\n {children}\n </ul>\n );\n}\n"],"mappings":";;;;;;;;;AA+BA,MAAM,wBAAwB,YAA+C,IAAI;AAEjF,SAAS,4BAAwD;CAC/D,MAAM,UAAU,UAAU,qBAAqB;CAC/C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,gEAAgE;CAElF,OAAO;AACT;;;;;;AAOA,SAAgB,eAAe,OAAyC;CACtE,MAAM,EAAE,UAAU,cAAc,OAAO,cAAc,MAAM,GAAG,SAAS;CACvE,MAAM,YAAY,kBAAkB;EAClC,cAAc;EACd,UAAU;EACV,OAAO;CACT,CAAC;CACD,MAAM,aAAa,MAAM;EACvB,MAAM;EACN,aAAa;EACb,SAAS;CACX,CAAC,CAAC,CAAC;CACH,MAAM,SAAS,UAAU;CAEzB,IAAI,UAAU,CAAC,WAAW,QAAQ,OAAO,aAAa,aAAa;EACjE,MAAM,SAAS,SAAS,yBAAyB,cAAc,SAAS,gBAAgB;EACxF,WAAW,cACT,UAAU,WAAW,SAAS,OAC1B,SACA,WAAW,mBAAmB,cAC5B,WAAW,UACX;CACV;CACA,WAAW,OAAO;CAElB,MAAM,yBAAyB;EAC7B,MAAM,cAAc,WAAW;EAC/B,IAAI,CAAC,aACH;EAGF,qBAAqB;GACnB,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askrjs/askr/router";
|
|
4
4
|
import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
5
5
|
//#region src/components/command-palette/command-palette.types.d.ts
|
|
6
|
+
/** Props for the {@link CommandPalette} component. */
|
|
6
7
|
type CommandPaletteProps = DialogProps;
|
|
8
|
+
/** Props for the {@link CommandPaletteTrigger} component. */
|
|
7
9
|
type CommandPaletteTriggerProps = DialogTriggerProps;
|
|
10
|
+
/** Props for {@link CommandPaletteTrigger} rendered with `asChild`. */
|
|
8
11
|
type CommandPaletteTriggerAsChildProps = DialogTriggerAsChildProps;
|
|
12
|
+
/** Props for the {@link CommandPaletteContent} component. */
|
|
9
13
|
type CommandPaletteContentProps = Omit<DialogContentProps, "children" | "title" | "onEscapeKeyDown" | "onInteractOutside" | "onPointerDownOutside"> & {
|
|
10
14
|
children?: unknown;
|
|
11
15
|
title: string;
|
|
@@ -18,10 +22,12 @@ type CommandPaletteContentProps = Omit<DialogContentProps, "children" | "title"
|
|
|
18
22
|
onInteractOutside?: (event: Event) => void;
|
|
19
23
|
onPointerDownOutside?: (event: PointerEvent) => void;
|
|
20
24
|
};
|
|
25
|
+
/** Props for the {@link CommandPaletteLink} component. */
|
|
21
26
|
type CommandPaletteLinkProps = LinkProps & {
|
|
22
27
|
closeOnSelect?: boolean;
|
|
23
28
|
onBeforeNavigate?: () => void;
|
|
24
29
|
};
|
|
30
|
+
/** Props for the {@link CommandPaletteList} component. */
|
|
25
31
|
type CommandPaletteListProps = Omit<JSX.IntrinsicElements["ul"], "children" | "ref"> & {
|
|
26
32
|
children?: unknown;
|
|
27
33
|
ref?: Ref<HTMLUListElement>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ContainerProps } from "./container.types.js";
|
|
2
2
|
import { JSX } from "@askrjs/askr/jsx-runtime";
|
|
3
3
|
//#region src/components/container/container.d.ts
|
|
4
|
+
/** Centers content in a max-width column with page gutters (defaults to the `"page"` {@link BlockSize}). */
|
|
4
5
|
declare function Container(props: ContainerProps): JSX.Element;
|
|
5
6
|
//#endregion
|
|
6
7
|
export { Container };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Block } from "../block/block.js";
|
|
2
2
|
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
3
3
|
//#region src/components/container/container.tsx
|
|
4
|
+
/** Centers content in a max-width column with page gutters (defaults to the `"page"` {@link BlockSize}). */
|
|
4
5
|
function Container(props) {
|
|
5
6
|
const { children, size = "page", ...rest } = props;
|
|
6
7
|
return /* @__PURE__ */ jsx(Block, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","names":[],"sources":["../../../src/components/container/container.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { Block } from \"../block\";\nimport type { ContainerProps } from \"./container.types\";\n\nexport function Container(props: ContainerProps): JSX.Element {\n const { children, size = \"page\", ...rest } = props;\n\n return (\n <Block\n maxWidth={size}\n marginX=\"auto\"\n paddingX=\"page\"\n width=\"full\"\n {...rest}\n data-slot=\"container\"\n >\n {children}\n </Block>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"container.js","names":[],"sources":["../../../src/components/container/container.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { Block } from \"../block\";\nimport type { ContainerProps } from \"./container.types\";\n\n/** Centers content in a max-width column with page gutters (defaults to the `\"page\"` {@link BlockSize}). */\nexport function Container(props: ContainerProps): JSX.Element {\n const { children, size = \"page\", ...rest } = props;\n\n return (\n <Block\n maxWidth={size}\n marginX=\"auto\"\n paddingX=\"page\"\n width=\"full\"\n {...rest}\n data-slot=\"container\"\n >\n {children}\n </Block>\n );\n}\n"],"mappings":";;;;AAKA,SAAgB,UAAU,OAAoC;CAC5D,MAAM,EAAE,UAAU,OAAO,QAAQ,GAAG,SAAS;CAE7C,OACE,oBAAC,OAAD;EACE,UAAU;EACV,SAAQ;EACR,UAAS;EACT,OAAM;EACN,GAAI;EACJ,aAAU;EAET;CACI,CAAA;AAEX"}
|
|
@@ -2,6 +2,7 @@ import { BlockSize } from "../_internal/block-layout.js";
|
|
|
2
2
|
import { BlockDivProps } from "../block/block.types.js";
|
|
3
3
|
import "../block/index.js";
|
|
4
4
|
//#region src/components/container/container.types.d.ts
|
|
5
|
+
/** Props for the {@link Container} component. */
|
|
5
6
|
type ContainerProps = Omit<BlockDivProps, "maxWidth"> & {
|
|
6
7
|
size?: BlockSize;
|
|
7
8
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EmptyStateProps } from "./empty-state.types.js";
|
|
2
2
|
import { JSX } from "@askrjs/askr/jsx-runtime";
|
|
3
3
|
//#region src/components/empty-state/empty-state.d.ts
|
|
4
|
+
/** Centered placeholder for empty lists/views: an icon, title (default `<h2>`), description, extra content, and an action row. */
|
|
4
5
|
declare function EmptyState(props: EmptyStateProps): JSX.Element;
|
|
5
6
|
//#endregion
|
|
6
7
|
export { EmptyState };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Block } from "../block/block.js";
|
|
2
2
|
import { jsx, jsxs } from "@askrjs/askr/jsx-runtime";
|
|
3
3
|
//#region src/components/empty-state/empty-state.tsx
|
|
4
|
+
/** Centered placeholder for empty lists/views: an icon, title (default `<h2>`), description, extra content, and an action row. */
|
|
4
5
|
function EmptyState(props) {
|
|
5
6
|
const { icon, title, titleAs: TitleTag = "h2", description, action, children, ...rest } = props;
|
|
6
7
|
return /* @__PURE__ */ jsx(Block, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.js","names":[],"sources":["../../../src/components/empty-state/empty-state.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { Block } from \"../block\";\nimport type { EmptyStateProps } from \"./empty-state.types\";\n\nexport function EmptyState(props: EmptyStateProps): JSX.Element {\n const { icon, title, titleAs: TitleTag = \"h2\", description, action, children, ...rest } = props;\n\n return (\n <Block center minHeight=\"content\" padding=\"xl\" {...rest} data-slot=\"empty-state\">\n <Block align=\"center\" gap=\"md\" maxWidth=\"sm\" data-slot=\"empty-state-content\">\n {icon !== undefined ? <div data-slot=\"empty-state-icon\">{icon}</div> : null}\n {title !== undefined ? <TitleTag data-slot=\"empty-state-title\">{title}</TitleTag> : null}\n {description !== undefined ? (\n <p data-slot=\"empty-state-description\">{description}</p>\n ) : null}\n {children}\n {action !== undefined ? (\n <Block direction=\"row\" justify=\"center\" gap=\"sm\" data-slot=\"empty-state-actions\">\n {action}\n </Block>\n ) : null}\n </Block>\n </Block>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty-state.js","names":[],"sources":["../../../src/components/empty-state/empty-state.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { Block } from \"../block\";\nimport type { EmptyStateProps } from \"./empty-state.types\";\n\n/** Centered placeholder for empty lists/views: an icon, title (default `<h2>`), description, extra content, and an action row. */\nexport function EmptyState(props: EmptyStateProps): JSX.Element {\n const { icon, title, titleAs: TitleTag = \"h2\", description, action, children, ...rest } = props;\n\n return (\n <Block center minHeight=\"content\" padding=\"xl\" {...rest} data-slot=\"empty-state\">\n <Block align=\"center\" gap=\"md\" maxWidth=\"sm\" data-slot=\"empty-state-content\">\n {icon !== undefined ? <div data-slot=\"empty-state-icon\">{icon}</div> : null}\n {title !== undefined ? <TitleTag data-slot=\"empty-state-title\">{title}</TitleTag> : null}\n {description !== undefined ? (\n <p data-slot=\"empty-state-description\">{description}</p>\n ) : null}\n {children}\n {action !== undefined ? (\n <Block direction=\"row\" justify=\"center\" gap=\"sm\" data-slot=\"empty-state-actions\">\n {action}\n </Block>\n ) : null}\n </Block>\n </Block>\n );\n}\n"],"mappings":";;;;AAKA,SAAgB,WAAW,OAAqC;CAC9D,MAAM,EAAE,MAAM,OAAO,SAAS,WAAW,MAAM,aAAa,QAAQ,UAAU,GAAG,SAAS;CAE1F,OACE,oBAAC,OAAD;EAAO,QAAA;EAAO,WAAU;EAAU,SAAQ;EAAK,GAAI;EAAM,aAAU;EACjE,UAAA,qBAAC,OAAD;GAAO,OAAM;GAAS,KAAI;GAAK,UAAS;GAAK,aAAU;GAAvD,UAAA;IACG,SAAS,KAAA,IAAY,oBAAC,OAAD;KAAK,aAAU;KAAoB,UAAA;IAAU,CAAA,IAAI;IACtE,UAAU,KAAA,IAAY,oBAAC,UAAD;KAAU,aAAU;KAAqB,UAAA;IAAgB,CAAA,IAAI;IACnF,gBAAgB,KAAA,IACf,oBAAC,KAAD;KAAG,aAAU;KAA2B,UAAA;IAAe,CAAA,IACrD;IACH;IACA,WAAW,KAAA,IACV,oBAAC,OAAD;KAAO,WAAU;KAAM,SAAQ;KAAS,KAAI;KAAK,aAAU;KACxD,UAAA;IACI,CAAA,IACL;GACC;;CACF,CAAA;AAEX"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { BlockDivProps } from "../block/block.types.js";
|
|
2
2
|
import "../block/index.js";
|
|
3
3
|
//#region src/components/empty-state/empty-state.types.d.ts
|
|
4
|
+
/** Heading tag allowed for an empty state's title via `titleAs`. */
|
|
4
5
|
type EmptyStateHeadingTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
6
|
+
/** Props for the {@link EmptyState} component. */
|
|
5
7
|
type EmptyStateProps = BlockDivProps & {
|
|
6
8
|
icon?: unknown;
|
|
7
9
|
title?: unknown;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { FieldErrorProps, FieldHintProps, FieldProps } from "./field.types.js";
|
|
2
2
|
import { JSX } from "@askrjs/askr/jsx-runtime";
|
|
3
3
|
//#region src/components/field/field.d.ts
|
|
4
|
+
/** Groups a form control with its hint/error text, marking `data-invalid` when `invalid` is set. */
|
|
4
5
|
declare function Field(props: FieldProps): JSX.Element;
|
|
6
|
+
/** Renders supporting hint text for a {@link Field}. */
|
|
5
7
|
declare function FieldHint(props: FieldHintProps): JSX.Element;
|
|
8
|
+
/** Renders validation error text for a {@link Field}, exposed with `role="alert"`. */
|
|
6
9
|
declare function FieldError(props: FieldErrorProps): JSX.Element;
|
|
7
10
|
//#endregion
|
|
8
11
|
export { Field, FieldError, FieldHint };
|
|
@@ -2,6 +2,7 @@ import { classes } from "../_internal/classes.js";
|
|
|
2
2
|
import { mergeProps } from "../_internal/merge-props.js";
|
|
3
3
|
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
4
4
|
//#region src/components/field/field.tsx
|
|
5
|
+
/** Groups a form control with its hint/error text, marking `data-invalid` when `invalid` is set. */
|
|
5
6
|
function Field(props) {
|
|
6
7
|
const { children, class: className, invalid = false, ref, ...rest } = props;
|
|
7
8
|
const finalProps = mergeProps(rest, {
|
|
@@ -15,6 +16,7 @@ function Field(props) {
|
|
|
15
16
|
children
|
|
16
17
|
});
|
|
17
18
|
}
|
|
19
|
+
/** Renders supporting hint text for a {@link Field}. */
|
|
18
20
|
function FieldHint(props) {
|
|
19
21
|
const { children, class: className, ref, ...rest } = props;
|
|
20
22
|
const finalProps = mergeProps(rest, {
|
|
@@ -27,6 +29,7 @@ function FieldHint(props) {
|
|
|
27
29
|
children
|
|
28
30
|
});
|
|
29
31
|
}
|
|
32
|
+
/** Renders validation error text for a {@link Field}, exposed with `role="alert"`. */
|
|
30
33
|
function FieldError(props) {
|
|
31
34
|
const { children, class: className, ref, ...rest } = props;
|
|
32
35
|
const finalProps = mergeProps(rest, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","names":[],"sources":["../../../src/components/field/field.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { classes } from \"../_internal/classes\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport type { FieldErrorProps, FieldHintProps, FieldProps } from \"./field.types\";\n\nexport function Field(props: FieldProps): JSX.Element {\n const { children, class: className, invalid = false, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\"field\", className),\n ref,\n \"data-slot\": \"field\",\n \"data-invalid\": invalid ? \"true\" : undefined,\n });\n\n return <div {...finalProps}>{children}</div>;\n}\n\nexport function FieldHint(props: FieldHintProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\"field-hint\", className),\n ref,\n \"data-slot\": \"field-hint\",\n });\n\n return <p {...finalProps}>{children}</p>;\n}\n\nexport function FieldError(props: FieldErrorProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\"field-error\", className),\n ref,\n role: \"alert\",\n \"data-slot\": \"field-error\",\n });\n\n return <p {...finalProps}>{children}</p>;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"field.js","names":[],"sources":["../../../src/components/field/field.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { classes } from \"../_internal/classes\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport type { FieldErrorProps, FieldHintProps, FieldProps } from \"./field.types\";\n\n/** Groups a form control with its hint/error text, marking `data-invalid` when `invalid` is set. */\nexport function Field(props: FieldProps): JSX.Element {\n const { children, class: className, invalid = false, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\"field\", className),\n ref,\n \"data-slot\": \"field\",\n \"data-invalid\": invalid ? \"true\" : undefined,\n });\n\n return <div {...finalProps}>{children}</div>;\n}\n\n/** Renders supporting hint text for a {@link Field}. */\nexport function FieldHint(props: FieldHintProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\"field-hint\", className),\n ref,\n \"data-slot\": \"field-hint\",\n });\n\n return <p {...finalProps}>{children}</p>;\n}\n\n/** Renders validation error text for a {@link Field}, exposed with `role=\"alert\"`. */\nexport function FieldError(props: FieldErrorProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\"field-error\", className),\n ref,\n role: \"alert\",\n \"data-slot\": \"field-error\",\n });\n\n return <p {...finalProps}>{children}</p>;\n}\n"],"mappings":";;;;;AAMA,SAAgB,MAAM,OAAgC;CACpD,MAAM,EAAE,UAAU,OAAO,WAAW,UAAU,OAAO,KAAK,GAAG,SAAS;CACtE,MAAM,aAAa,WAAW,MAAM;EAClC,OAAO,QAAQ,SAAS,SAAS;EACjC;EACA,aAAa;EACb,gBAAgB,UAAU,SAAS,KAAA;CACrC,CAAC;CAED,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;CAAc,CAAA;AAC7C;;AAGA,SAAgB,UAAU,OAAoC;CAC5D,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CACrD,MAAM,aAAa,WAAW,MAAM;EAClC,OAAO,QAAQ,cAAc,SAAS;EACtC;EACA,aAAa;CACf,CAAC;CAED,OAAO,oBAAC,KAAD;EAAG,GAAI;EAAa;CAAY,CAAA;AACzC;;AAGA,SAAgB,WAAW,OAAqC;CAC9D,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CACrD,MAAM,aAAa,WAAW,MAAM;EAClC,OAAO,QAAQ,eAAe,SAAS;EACvC;EACA,MAAM;EACN,aAAa;CACf,CAAC;CAED,OAAO,oBAAC,KAAD;EAAG,GAAI;EAAa;CAAY,CAAA;AACzC"}
|
|
@@ -3,15 +3,18 @@ import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
|
3
3
|
//#region src/components/field/field.types.d.ts
|
|
4
4
|
type DivProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref">;
|
|
5
5
|
type ParagraphProps = Omit<JSX.IntrinsicElements["p"], "children" | "ref">;
|
|
6
|
+
/** Props for the {@link Field} component. */
|
|
6
7
|
type FieldProps = DivProps & {
|
|
7
8
|
children?: unknown;
|
|
8
9
|
invalid?: boolean;
|
|
9
10
|
ref?: Ref<HTMLDivElement>;
|
|
10
11
|
};
|
|
12
|
+
/** Props for the {@link FieldHint} component. */
|
|
11
13
|
type FieldHintProps = ParagraphProps & {
|
|
12
14
|
children?: unknown;
|
|
13
15
|
ref?: Ref<HTMLParagraphElement>;
|
|
14
16
|
};
|
|
17
|
+
/** Props for the {@link FieldError} component. */
|
|
15
18
|
type FieldErrorProps = ParagraphProps & {
|
|
16
19
|
children?: unknown;
|
|
17
20
|
ref?: Ref<HTMLParagraphElement>;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { FooterContentProps, FooterDescriptionProps, FooterLinkProps, FooterLinksProps, FooterProps, FooterSectionProps, FooterTitleProps } from "./footer.types.js";
|
|
2
2
|
import { JSX } from "@askrjs/askr/jsx-runtime";
|
|
3
3
|
//#region src/components/footer/footer.d.ts
|
|
4
|
+
/** Renders a `<footer>`-element {@link Block} with a muted background and top border. */
|
|
4
5
|
declare function Footer(props: FooterProps): JSX.Element;
|
|
6
|
+
/** Renders the main content wrapper of a {@link Footer}. */
|
|
5
7
|
declare function FooterContent(props: FooterContentProps): JSX.Element;
|
|
8
|
+
/** Renders a grouped section within a {@link Footer}. */
|
|
6
9
|
declare function FooterSection(props: FooterSectionProps): JSX.Element;
|
|
10
|
+
/** Renders a section title (`<h2>`) within a {@link Footer}. */
|
|
7
11
|
declare function FooterTitle(props: FooterTitleProps): JSX.Element;
|
|
12
|
+
/** Renders supporting description text within a {@link Footer}. */
|
|
8
13
|
declare function FooterDescription(props: FooterDescriptionProps): JSX.Element;
|
|
14
|
+
/** Renders a `<nav>` wrapper for a group of {@link FooterLink}s. */
|
|
9
15
|
declare function FooterLinks(props: FooterLinksProps): JSX.Element;
|
|
16
|
+
/** Renders a single link within a {@link Footer}. */
|
|
10
17
|
declare function FooterLink(props: FooterLinkProps): JSX.Element;
|
|
11
18
|
//#endregion
|
|
12
19
|
export { Footer, FooterContent, FooterDescription, FooterLink, FooterLinks, FooterSection, FooterTitle };
|