@askrjs/themes 0.0.22 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/capabilities.json +36 -0
- package/dist/components/_internal/jsx.js +7 -2
- package/dist/components/_internal/jsx.js.map +1 -1
- package/dist/components/_internal/style.js.map +1 -1
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/brand/brand.js +12 -10
- package/dist/components/brand/brand.js.map +1 -1
- package/dist/components/card/card.js +43 -36
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/catalog.js +18 -14
- package/dist/components/catalog.js.map +1 -1
- package/dist/components/close/close.js.map +1 -1
- package/dist/components/command-palette/command-palette.d.ts +11 -0
- package/dist/components/command-palette/command-palette.js +153 -0
- package/dist/components/command-palette/command-palette.js.map +1 -0
- package/dist/components/command-palette/command-palette.types.d.ts +30 -0
- package/dist/components/command-palette/index.d.ts +3 -0
- package/dist/components/empty-state/empty-state.js.map +1 -1
- package/dist/components/field/field.js +20 -17
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/footer/footer.js +36 -30
- package/dist/components/footer/footer.js.map +1 -1
- package/dist/components/grid/grid.js +2 -1
- package/dist/components/grid/grid.js.map +1 -1
- package/dist/components/nav/nav.js.map +1 -1
- package/dist/components/nav/nav.types.d.ts +1 -1
- package/dist/components/navbar/navbar.js.map +1 -1
- package/dist/components/overlays/dropdown-content.js.map +1 -1
- package/dist/components/page/page.js.map +1 -1
- package/dist/components/page-header/page-header.js.map +1 -1
- package/dist/components/sidebar/sidebar.js +6 -6
- package/dist/components/sidebar/sidebar.js.map +1 -1
- package/dist/components/skeleton/skeleton.js +2 -1
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/spinner/spinner.js.map +1 -1
- package/dist/components/stat/stat.js +24 -20
- package/dist/components/stat/stat.js.map +1 -1
- package/dist/components/theme/theme.js.map +1 -1
- package/dist/components/toolbar/toolbar.js.map +1 -1
- package/dist/components.d.ts +4 -1
- package/dist/components.js +3 -2
- package/dist/entries/command.d.ts +4 -1
- package/dist/entries/command.js +2 -1
- package/dist/entries/tabs.js +1 -1
- package/dist/themes/default/index.css +38 -0
- package/package.json +18 -14
- package/src/components/_internal/jsx.ts +11 -1
- package/src/components/command-palette/command-palette.tsx +242 -0
- package/src/components/command-palette/command-palette.types.ts +40 -0
- package/src/components/command-palette/index.ts +15 -0
- package/src/components/sidebar/sidebar.tsx +6 -6
- package/src/components.ts +8 -0
- package/src/entries/command.ts +15 -0
- package/src/parity.ts +1 -0
- package/src/themes/default/styles/display/catalog.css +38 -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 Typography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C;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\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,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CACjE,OAAO,YAAY,OAAO,EAAE,MAAM,SAAS,CAAC;AAC9C;AAEA,MAAa,SAAS;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 +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":";;;;AAMA,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;
|
|
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":";;;;AAMA,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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CommandPaletteContentProps, CommandPaletteLinkProps, CommandPaletteListProps, CommandPaletteProps, CommandPaletteTriggerAsChildProps, CommandPaletteTriggerProps } from "./command-palette.types.js";
|
|
2
|
+
import { JSX } from "@askrjs/askr/jsx-runtime";
|
|
3
|
+
//#region src/components/command-palette/command-palette.d.ts
|
|
4
|
+
declare function CommandPalette(props: CommandPaletteProps): JSX.Element;
|
|
5
|
+
declare function CommandPaletteTrigger(props: CommandPaletteTriggerProps): JSX.Element;
|
|
6
|
+
declare function CommandPaletteTrigger(props: CommandPaletteTriggerAsChildProps): JSX.Element;
|
|
7
|
+
declare function CommandPaletteContent(props: CommandPaletteContentProps): JSX.Element;
|
|
8
|
+
declare function CommandPaletteLink(props: CommandPaletteLinkProps): JSX.Element;
|
|
9
|
+
declare function CommandPaletteList(props: CommandPaletteListProps): JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { CommandPalette, CommandPaletteContent, CommandPaletteLink, CommandPaletteList, CommandPaletteTrigger };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { classes } from "../_internal/classes.js";
|
|
2
|
+
import { Command } from "../catalog.js";
|
|
3
|
+
import { Dialog, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "@askrjs/ui";
|
|
4
|
+
import { jsx, jsxs } from "@askrjs/askr/jsx-runtime";
|
|
5
|
+
import { defineScope, readScope, state } from "@askrjs/askr";
|
|
6
|
+
import { Link } from "@askrjs/askr/router";
|
|
7
|
+
import { controllableState } from "@askrjs/askr/foundations/state";
|
|
8
|
+
import { composeRefs } from "@askrjs/askr/foundations/utilities";
|
|
9
|
+
//#region src/components/command-palette/command-palette.tsx
|
|
10
|
+
const CommandPaletteContext = defineScope(null);
|
|
11
|
+
function readCommandPaletteContext() {
|
|
12
|
+
const context = readScope(CommandPaletteContext);
|
|
13
|
+
if (!context) throw new Error("CommandPalette components must be used within <CommandPalette>");
|
|
14
|
+
return context;
|
|
15
|
+
}
|
|
16
|
+
function CommandPalette(props) {
|
|
17
|
+
const { children, defaultOpen = false, onOpenChange, open, ...rest } = props;
|
|
18
|
+
const openState = controllableState({
|
|
19
|
+
defaultValue: defaultOpen,
|
|
20
|
+
onChange: onOpenChange,
|
|
21
|
+
value: open
|
|
22
|
+
});
|
|
23
|
+
const focusState = state({
|
|
24
|
+
open: false,
|
|
25
|
+
returnFocus: null,
|
|
26
|
+
trigger: null
|
|
27
|
+
})();
|
|
28
|
+
const isOpen = openState();
|
|
29
|
+
if (isOpen && !focusState.open && typeof document !== "undefined") {
|
|
30
|
+
const active = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
31
|
+
focusState.returnFocus = active && active !== document.body ? active : focusState.trigger instanceof HTMLElement ? focusState.trigger : null;
|
|
32
|
+
}
|
|
33
|
+
focusState.open = isOpen;
|
|
34
|
+
const restoreFocusSoon = () => {
|
|
35
|
+
const returnFocus = focusState.returnFocus;
|
|
36
|
+
if (!returnFocus) return;
|
|
37
|
+
queueMicrotask(() => {
|
|
38
|
+
queueMicrotask(() => {
|
|
39
|
+
if (returnFocus.isConnected) returnFocus.focus();
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ jsx(CommandPaletteContext, {
|
|
44
|
+
value: {
|
|
45
|
+
close: () => openState.set(false),
|
|
46
|
+
restoreFocusSoon,
|
|
47
|
+
setTrigger: (node) => {
|
|
48
|
+
focusState.trigger = node;
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
children: /* @__PURE__ */ jsx(Dialog, {
|
|
52
|
+
...rest,
|
|
53
|
+
open: isOpen,
|
|
54
|
+
onOpenChange: openState.set,
|
|
55
|
+
children
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function CommandPaletteTrigger(props) {
|
|
60
|
+
const palette = readCommandPaletteContext();
|
|
61
|
+
const ref = props.ref ? composeRefs(props.ref, palette.setTrigger) : palette.setTrigger;
|
|
62
|
+
if (props.asChild) return /* @__PURE__ */ jsx(DialogTrigger, {
|
|
63
|
+
...props,
|
|
64
|
+
ref
|
|
65
|
+
});
|
|
66
|
+
return /* @__PURE__ */ jsx(DialogTrigger, {
|
|
67
|
+
...props,
|
|
68
|
+
ref
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function preventDismiss(event, shouldDismiss) {
|
|
72
|
+
if (!shouldDismiss) event.preventDefault();
|
|
73
|
+
}
|
|
74
|
+
function CommandPaletteContent(props) {
|
|
75
|
+
const palette = readCommandPaletteContext();
|
|
76
|
+
const { children, class: className, closeOnBackdrop = true, closeOnEscape = true, description, initialFocus = "[data-slot=\"command-input\"]", onEscapeKeyDown, onInteractOutside, onPointerDownOutside, overlayProps, ref, title, ...rest } = props;
|
|
77
|
+
const focusInitialTarget = (node) => {
|
|
78
|
+
if (!node) {
|
|
79
|
+
palette.restoreFocusSoon();
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (initialFocus === false) return;
|
|
83
|
+
queueMicrotask(() => {
|
|
84
|
+
if (!node.isConnected) return;
|
|
85
|
+
(typeof initialFocus === "function" ? initialFocus() : node.querySelector(initialFocus))?.focus();
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
const contentRef = ref ? composeRefs(ref, focusInitialTarget) : focusInitialTarget;
|
|
89
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {
|
|
90
|
+
...overlayProps,
|
|
91
|
+
"data-command-palette-overlay": ""
|
|
92
|
+
}), /* @__PURE__ */ jsxs(DialogContent, {
|
|
93
|
+
...rest,
|
|
94
|
+
class: className,
|
|
95
|
+
"data-command-palette-content": "",
|
|
96
|
+
ref: contentRef,
|
|
97
|
+
onEscapeKeyDown: (event) => {
|
|
98
|
+
onEscapeKeyDown?.(event);
|
|
99
|
+
preventDismiss(event, closeOnEscape);
|
|
100
|
+
},
|
|
101
|
+
onInteractOutside: (event) => {
|
|
102
|
+
onInteractOutside?.(event);
|
|
103
|
+
preventDismiss(event, closeOnBackdrop);
|
|
104
|
+
},
|
|
105
|
+
onPointerDownOutside: (event) => {
|
|
106
|
+
onPointerDownOutside?.(event);
|
|
107
|
+
preventDismiss(event, closeOnBackdrop);
|
|
108
|
+
},
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ jsx(DialogTitle, {
|
|
111
|
+
class: "sr-only",
|
|
112
|
+
children: title
|
|
113
|
+
}),
|
|
114
|
+
description ? /* @__PURE__ */ jsx(DialogDescription, {
|
|
115
|
+
class: "sr-only",
|
|
116
|
+
children: description
|
|
117
|
+
}) : null,
|
|
118
|
+
/* @__PURE__ */ jsx(Command, { children })
|
|
119
|
+
]
|
|
120
|
+
})] });
|
|
121
|
+
}
|
|
122
|
+
function composeBeforeNavigate(close, closeOnSelect, beforeNavigate, onPress) {
|
|
123
|
+
return (event) => {
|
|
124
|
+
beforeNavigate?.();
|
|
125
|
+
if (!event.defaultPrevented) onPress?.(event);
|
|
126
|
+
if (closeOnSelect && !event.defaultPrevented) close();
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function CommandPaletteLink(props) {
|
|
130
|
+
const { children, class: className, closeOnSelect = true, onBeforeNavigate, onPress, ...rest } = props;
|
|
131
|
+
const palette = readCommandPaletteContext();
|
|
132
|
+
return /* @__PURE__ */ jsx("li", {
|
|
133
|
+
"data-command-palette-result": "",
|
|
134
|
+
children: /* @__PURE__ */ jsx(Link, {
|
|
135
|
+
...rest,
|
|
136
|
+
class: className,
|
|
137
|
+
"data-slot": "command-item",
|
|
138
|
+
onPress: composeBeforeNavigate(palette.close, closeOnSelect, onBeforeNavigate, onPress),
|
|
139
|
+
children
|
|
140
|
+
})
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function CommandPaletteList(props) {
|
|
144
|
+
const { children, class: className, ...rest } = props;
|
|
145
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
146
|
+
...rest,
|
|
147
|
+
class: classes(className),
|
|
148
|
+
"data-slot": "command-list",
|
|
149
|
+
children
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
export { CommandPalette, CommandPaletteContent, CommandPaletteLink, CommandPaletteList, CommandPaletteTrigger };
|
|
@@ -0,0 +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,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,qBAAqB;IACnB,IAAI,YAAY,aACd,YAAY,MAAM;GAEtB,CAAC;EACH,CAAC;CACH;CAEA,OACE,oBAAC,uBAAD;EACE,OAAO;GACL,aAAa,UAAU,IAAI,KAAK;GAChC;GACA,aAAa,SAAS;IACpB,WAAW,UAAU;GACvB;EACF;EAEA,UAAA,oBAAC,QAAD;GAAQ,GAAI;GAAM,MAAM;GAAQ,cAAc,UAAU;GACrD;EACK,CAAA;CACa,CAAA;AAE3B;AAIA,SAAgB,sBACd,OACa;CACb,MAAM,UAAU,0BAA0B;CAC1C,MAAM,MAAM,MAAM,MACd,YAAY,MAAM,KAAqB,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IAAI;GACtF,oBAAC,SAAD,EAAU,SAAkB,CAAA;EACf;CACH,CAAA,CAAA,EAAA,CAAA;AAElB;AAEA,SAAS,sBACP,OACA,eACA,gBACA,SACwB;CACxB,QAAQ,UAAU;EAChB,iBAAiB;EACjB,IAAI,CAAC,MAAM,kBACT,UAAU,KAAK;EAEjB,IAAI,iBAAiB,CAAC,MAAM,kBAC1B,MAAM;CAEV;AACF;AAEA,SAAgB,mBAAmB,OAA6C;CAC9E,MAAM,EACJ,UACA,OAAO,WACP,gBAAgB,MAChB,kBACA,SACA,GAAG,SACD;CACJ,MAAM,UAAU,0BAA0B;CAC1C,OACE,oBAAC,MAAD;EAAI,+BAA4B;EAC9B,UAAA,oBAAC,MAAD;GACE,GAAI;GACJ,OAAO;GACP,aAAU;GACV,SAAS,sBAAsB,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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DialogContentProps, DialogOverlayProps, DialogProps, DialogTriggerAsChildProps, DialogTriggerProps } from "@askrjs/ui";
|
|
2
|
+
import { JSX } from "@askrjs/askr/jsx-runtime";
|
|
3
|
+
import { LinkProps } from "@askrjs/askr/router";
|
|
4
|
+
import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
5
|
+
//#region src/components/command-palette/command-palette.types.d.ts
|
|
6
|
+
type CommandPaletteProps = DialogProps;
|
|
7
|
+
type CommandPaletteTriggerProps = DialogTriggerProps;
|
|
8
|
+
type CommandPaletteTriggerAsChildProps = DialogTriggerAsChildProps;
|
|
9
|
+
type CommandPaletteContentProps = Omit<DialogContentProps, "children" | "title" | "onEscapeKeyDown" | "onInteractOutside" | "onPointerDownOutside"> & {
|
|
10
|
+
children?: unknown;
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
initialFocus?: string | (() => HTMLElement | null) | false;
|
|
14
|
+
closeOnBackdrop?: boolean;
|
|
15
|
+
closeOnEscape?: boolean;
|
|
16
|
+
overlayProps?: DialogOverlayProps;
|
|
17
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
18
|
+
onInteractOutside?: (event: Event) => void;
|
|
19
|
+
onPointerDownOutside?: (event: PointerEvent) => void;
|
|
20
|
+
};
|
|
21
|
+
type CommandPaletteLinkProps = LinkProps & {
|
|
22
|
+
closeOnSelect?: boolean;
|
|
23
|
+
onBeforeNavigate?: () => void;
|
|
24
|
+
};
|
|
25
|
+
type CommandPaletteListProps = Omit<JSX.IntrinsicElements["ul"], "children" | "ref"> & {
|
|
26
|
+
children?: unknown;
|
|
27
|
+
ref?: Ref<HTMLUListElement>;
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { CommandPaletteContentProps, CommandPaletteLinkProps, CommandPaletteListProps, CommandPaletteProps, CommandPaletteTriggerAsChildProps, CommandPaletteTriggerProps };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CommandPaletteContentProps, CommandPaletteLinkProps, CommandPaletteListProps, CommandPaletteProps, CommandPaletteTriggerAsChildProps, CommandPaletteTriggerProps } from "./command-palette.types.js";
|
|
2
|
+
import { CommandPalette, CommandPaletteContent, CommandPaletteLink, CommandPaletteList, CommandPaletteTrigger } from "./command-palette.js";
|
|
3
|
+
export { CommandPalette, CommandPaletteContent, type CommandPaletteContentProps, CommandPaletteLink, type CommandPaletteLinkProps, CommandPaletteList, type CommandPaletteListProps, type CommandPaletteProps, CommandPaletteTrigger, type CommandPaletteTriggerAsChildProps, type CommandPaletteTriggerProps };
|
|
@@ -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":";;;AAIA,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;
|
|
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":";;;AAIA,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"}
|
|
@@ -4,36 +4,39 @@ import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
|
4
4
|
//#region src/components/field/field.tsx
|
|
5
5
|
function Field(props) {
|
|
6
6
|
const { children, class: className, invalid = false, ref, ...rest } = props;
|
|
7
|
+
const finalProps = mergeProps(rest, {
|
|
8
|
+
class: classes("field", className),
|
|
9
|
+
ref,
|
|
10
|
+
"data-slot": "field",
|
|
11
|
+
"data-invalid": invalid ? "true" : void 0
|
|
12
|
+
});
|
|
7
13
|
return /* @__PURE__ */ jsx("div", {
|
|
8
|
-
...
|
|
9
|
-
class: classes("field", className),
|
|
10
|
-
ref,
|
|
11
|
-
"data-slot": "field",
|
|
12
|
-
"data-invalid": invalid ? "true" : void 0
|
|
13
|
-
}),
|
|
14
|
+
...finalProps,
|
|
14
15
|
children
|
|
15
16
|
});
|
|
16
17
|
}
|
|
17
18
|
function FieldHint(props) {
|
|
18
19
|
const { children, class: className, ref, ...rest } = props;
|
|
20
|
+
const finalProps = mergeProps(rest, {
|
|
21
|
+
class: classes("field-hint", className),
|
|
22
|
+
ref,
|
|
23
|
+
"data-slot": "field-hint"
|
|
24
|
+
});
|
|
19
25
|
return /* @__PURE__ */ jsx("p", {
|
|
20
|
-
...
|
|
21
|
-
class: classes("field-hint", className),
|
|
22
|
-
ref,
|
|
23
|
-
"data-slot": "field-hint"
|
|
24
|
-
}),
|
|
26
|
+
...finalProps,
|
|
25
27
|
children
|
|
26
28
|
});
|
|
27
29
|
}
|
|
28
30
|
function FieldError(props) {
|
|
29
31
|
const { children, class: className, ref, ...rest } = props;
|
|
32
|
+
const finalProps = mergeProps(rest, {
|
|
33
|
+
class: classes("field-error", className),
|
|
34
|
+
ref,
|
|
35
|
+
role: "alert",
|
|
36
|
+
"data-slot": "field-error"
|
|
37
|
+
});
|
|
30
38
|
return /* @__PURE__ */ jsx("p", {
|
|
31
|
-
...
|
|
32
|
-
class: classes("field-error", className),
|
|
33
|
-
ref,
|
|
34
|
-
role: "alert",
|
|
35
|
-
"data-slot": "field-error"
|
|
36
|
-
}),
|
|
39
|
+
...finalProps,
|
|
37
40
|
children
|
|
38
41
|
});
|
|
39
42
|
}
|
|
@@ -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":";;;;AAKA,SAAgB,MAAM,OAAgC;CACpD,MAAM,EAAE,UAAU,OAAO,WAAW,UAAU,OAAO,KAAK,GAAG,SAAS;
|
|
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":";;;;AAKA,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;AAEA,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;AAEA,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"}
|
|
@@ -16,67 +16,73 @@ function Footer(props) {
|
|
|
16
16
|
}
|
|
17
17
|
function FooterContent(props) {
|
|
18
18
|
const { children, class: className, ref, ...rest } = props;
|
|
19
|
+
const finalProps = mergeProps(rest, {
|
|
20
|
+
ref,
|
|
21
|
+
class: classes("footer-content", className),
|
|
22
|
+
"data-slot": "footer-content"
|
|
23
|
+
});
|
|
19
24
|
return /* @__PURE__ */ jsx("div", {
|
|
20
|
-
...
|
|
21
|
-
ref,
|
|
22
|
-
class: classes("footer-content", className),
|
|
23
|
-
"data-slot": "footer-content"
|
|
24
|
-
}),
|
|
25
|
+
...finalProps,
|
|
25
26
|
children
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
function FooterSection(props) {
|
|
29
30
|
const { children, class: className, ref, ...rest } = props;
|
|
31
|
+
const finalProps = mergeProps(rest, {
|
|
32
|
+
ref,
|
|
33
|
+
class: classes("footer-section", className),
|
|
34
|
+
"data-slot": "footer-section"
|
|
35
|
+
});
|
|
30
36
|
return /* @__PURE__ */ jsx("div", {
|
|
31
|
-
...
|
|
32
|
-
ref,
|
|
33
|
-
class: classes("footer-section", className),
|
|
34
|
-
"data-slot": "footer-section"
|
|
35
|
-
}),
|
|
37
|
+
...finalProps,
|
|
36
38
|
children
|
|
37
39
|
});
|
|
38
40
|
}
|
|
39
41
|
function FooterTitle(props) {
|
|
40
42
|
const { children, class: className, ref, ...rest } = props;
|
|
43
|
+
const finalProps = mergeProps(rest, {
|
|
44
|
+
ref,
|
|
45
|
+
class: classes("footer-title", className),
|
|
46
|
+
"data-slot": "footer-title"
|
|
47
|
+
});
|
|
41
48
|
return /* @__PURE__ */ jsx("h2", {
|
|
42
|
-
...
|
|
43
|
-
ref,
|
|
44
|
-
class: classes("footer-title", className),
|
|
45
|
-
"data-slot": "footer-title"
|
|
46
|
-
}),
|
|
49
|
+
...finalProps,
|
|
47
50
|
children
|
|
48
51
|
});
|
|
49
52
|
}
|
|
50
53
|
function FooterDescription(props) {
|
|
51
54
|
const { children, class: className, ref, ...rest } = props;
|
|
55
|
+
const finalProps = mergeProps(rest, {
|
|
56
|
+
ref,
|
|
57
|
+
class: classes("footer-description", className),
|
|
58
|
+
"data-slot": "footer-description"
|
|
59
|
+
});
|
|
52
60
|
return /* @__PURE__ */ jsx("p", {
|
|
53
|
-
...
|
|
54
|
-
ref,
|
|
55
|
-
class: classes("footer-description", className),
|
|
56
|
-
"data-slot": "footer-description"
|
|
57
|
-
}),
|
|
61
|
+
...finalProps,
|
|
58
62
|
children
|
|
59
63
|
});
|
|
60
64
|
}
|
|
61
65
|
function FooterLinks(props) {
|
|
62
66
|
const { children, class: className, ref, ...rest } = props;
|
|
67
|
+
const finalProps = mergeProps(rest, {
|
|
68
|
+
ref,
|
|
69
|
+
class: classes("footer-links", className),
|
|
70
|
+
"data-slot": "footer-links"
|
|
71
|
+
});
|
|
63
72
|
return /* @__PURE__ */ jsx("nav", {
|
|
64
|
-
...
|
|
65
|
-
ref,
|
|
66
|
-
class: classes("footer-links", className),
|
|
67
|
-
"data-slot": "footer-links"
|
|
68
|
-
}),
|
|
73
|
+
...finalProps,
|
|
69
74
|
children
|
|
70
75
|
});
|
|
71
76
|
}
|
|
72
77
|
function FooterLink(props) {
|
|
73
78
|
const { children, class: className, ref, ...rest } = props;
|
|
79
|
+
const finalProps = mergeProps(rest, {
|
|
80
|
+
ref,
|
|
81
|
+
class: classes("footer-link", className),
|
|
82
|
+
"data-slot": "footer-link"
|
|
83
|
+
});
|
|
74
84
|
return /* @__PURE__ */ jsx("a", {
|
|
75
|
-
...
|
|
76
|
-
ref,
|
|
77
|
-
class: classes("footer-link", className),
|
|
78
|
-
"data-slot": "footer-link"
|
|
79
|
-
}),
|
|
85
|
+
...finalProps,
|
|
80
86
|
children
|
|
81
87
|
});
|
|
82
88
|
}
|