@a4ui/core 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +61 -7
  2. package/dist/index.js +2 -1
  3. package/dist/layout/AppShell.d.ts +19 -1
  4. package/dist/layout/EffectsToggle.d.ts +14 -0
  5. package/dist/layout/NavGroup.d.ts +15 -0
  6. package/dist/layout/SpaceBackground.d.ts +13 -0
  7. package/dist/layout/ThemeToggle.d.ts +12 -0
  8. package/dist/lib/cn.d.ts +11 -1
  9. package/dist/lib/effects.d.ts +21 -0
  10. package/dist/lib/media.d.ts +12 -0
  11. package/dist/lib/motion.d.ts +37 -0
  12. package/dist/lib/theme.d.ts +52 -3
  13. package/dist/lib/virtual.d.ts +16 -0
  14. package/dist/styles.css +344 -95
  15. package/dist/ui/Accordion.d.ts +19 -0
  16. package/dist/ui/Alert.d.ts +14 -0
  17. package/dist/ui/AlertDialog.d.ts +15 -0
  18. package/dist/ui/Avatar.d.ts +11 -0
  19. package/dist/ui/Badge.d.ts +12 -0
  20. package/dist/ui/Breadcrumb.d.ts +17 -0
  21. package/dist/ui/Button.d.ts +11 -0
  22. package/dist/ui/Card.d.ts +18 -0
  23. package/dist/ui/Checkbox.d.ts +11 -0
  24. package/dist/ui/Combobox.d.ts +16 -0
  25. package/dist/ui/ContextMenu.d.ts +14 -0
  26. package/dist/ui/DateField.d.ts +14 -0
  27. package/dist/ui/Drawer.d.ts +16 -0
  28. package/dist/ui/Dropdown.d.ts +18 -1
  29. package/dist/ui/Dropzone.d.ts +11 -0
  30. package/dist/ui/HoverCard.d.ts +13 -0
  31. package/dist/ui/Input.d.ts +12 -0
  32. package/dist/ui/Meter.d.ts +12 -0
  33. package/dist/ui/Modal.d.ts +21 -0
  34. package/dist/ui/NumberInput.d.ts +12 -0
  35. package/dist/ui/PageHeader.d.ts +17 -0
  36. package/dist/ui/Pagination.d.ts +14 -0
  37. package/dist/ui/Popover.d.ts +13 -0
  38. package/dist/ui/Progress.d.ts +11 -0
  39. package/dist/ui/RadioGroup.d.ts +20 -0
  40. package/dist/ui/SegmentedControl.d.ts +19 -0
  41. package/dist/ui/Select.d.ts +14 -0
  42. package/dist/ui/Separator.d.ts +11 -0
  43. package/dist/ui/Skeleton.d.ts +11 -0
  44. package/dist/ui/Slider.d.ts +14 -0
  45. package/dist/ui/Spinner.d.ts +10 -0
  46. package/dist/ui/Stat.d.ts +12 -0
  47. package/dist/ui/Switch.d.ts +11 -0
  48. package/dist/ui/Table.d.ts +61 -0
  49. package/dist/ui/Tabs.d.ts +20 -0
  50. package/dist/ui/Textarea.d.ts +12 -0
  51. package/dist/ui/Toast.d.ts +12 -0
  52. package/dist/ui/Toggle.d.ts +12 -0
  53. package/dist/ui/ToggleGroup.d.ts +20 -0
  54. package/dist/ui/Tooltip.d.ts +13 -0
  55. package/dist/ui/VirtualList.d.ts +14 -0
  56. package/package.json +18 -5
@@ -1,8 +1,20 @@
1
1
  import { JSX, ParentProps } from 'solid-js';
2
+ /** Semantic tone of a {@link Badge}; drives its background/text/ring color. */
2
3
  export type BadgeTone = 'neutral' | 'success' | 'warning' | 'danger' | 'info';
3
4
  interface BadgeProps extends ParentProps {
5
+ /** Visual/semantic tone. Defaults to `'neutral'`. */
4
6
  tone?: BadgeTone;
5
7
  class?: string;
6
8
  }
9
+ /**
10
+ * Small rounded pill for status/labels, e.g. counts, states, or tags.
11
+ * Generic design-system primitive — app-specific tone mappers (e.g. mapping a
12
+ * business status to a {@link BadgeTone}) should live in the consuming app.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <Badge tone="success">Active</Badge>
17
+ * ```
18
+ */
7
19
  export declare function Badge(props: BadgeProps): JSX.Element;
8
20
  export {};
@@ -1,11 +1,28 @@
1
1
  import { JSX } from 'solid-js';
2
+ /** A single crumb rendered by {@link Breadcrumb}. */
2
3
  export interface BreadcrumbItem {
3
4
  label: string;
5
+ /** Link target. Omit (or leave undefined on the last item) to render plain text for the current page. */
4
6
  href?: string;
5
7
  }
6
8
  interface BreadcrumbProps {
9
+ /** Ordered trail from root to current page; the last item is treated as the current location. */
7
10
  items: BreadcrumbItem[];
8
11
  class?: string;
9
12
  }
13
+ /**
14
+ * Navigation trail built on Kobalte's `Breadcrumbs` primitive. The last item
15
+ * in `items` is rendered as plain (non-link) text to indicate the current page.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * <Breadcrumb
20
+ * items={[
21
+ * { label: 'Projects', href: '/projects' },
22
+ * { label: 'A4ui' },
23
+ * ]}
24
+ * />
25
+ * ```
26
+ */
10
27
  export declare function Breadcrumb(props: BreadcrumbProps): JSX.Element;
11
28
  export {};
@@ -1,10 +1,21 @@
1
1
  import { JSX, ParentProps } from 'solid-js';
2
+ /** Visual style of a {@link Button}. Defaults to `'primary'`. */
2
3
  export type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost';
3
4
  interface ButtonProps extends ParentProps, Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
5
+ /** Visual style. Defaults to `'primary'`. */
4
6
  variant?: ButtonVariant;
5
7
  class?: string;
6
8
  /** Defaults to "button" so action buttons inside a form never submit it by accident. */
7
9
  type?: 'button' | 'submit' | 'reset';
8
10
  }
11
+ /**
12
+ * Base button primitive: a plain `<button>` with A4ui's variants, focus ring,
13
+ * and press/hover transitions. Accepts all standard button HTML attributes.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <Button variant="outline" onClick={() => save()}>Save</Button>
18
+ * ```
19
+ */
9
20
  export declare function Button(props: ButtonProps): JSX.Element;
10
21
  export {};
package/dist/ui/Card.d.ts CHANGED
@@ -11,8 +11,26 @@ interface CardProps extends DivProps {
11
11
  */
12
12
  glow?: boolean;
13
13
  }
14
+ /**
15
+ * Container surface for grouping related content, with an optional frosted
16
+ * "space glass" look. Compose with {@link CardHeader}, {@link CardTitle}, and
17
+ * {@link CardContent}.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <Card glass>
22
+ * <CardHeader>
23
+ * <CardTitle>Usage</CardTitle>
24
+ * </CardHeader>
25
+ * <CardContent>1,204 requests today</CardContent>
26
+ * </Card>
27
+ * ```
28
+ */
14
29
  export declare function Card(props: CardProps): JSX.Element;
30
+ /** Header region of a {@link Card}; typically wraps a {@link CardTitle}. */
15
31
  export declare function CardHeader(props: DivProps): JSX.Element;
32
+ /** Heading text (rendered as an `<h2>`) for a {@link Card}. */
16
33
  export declare function CardTitle(props: DivProps): JSX.Element;
34
+ /** Main body region of a {@link Card}, below the header. */
17
35
  export declare function CardContent(props: DivProps): JSX.Element;
18
36
  export {};
@@ -1,9 +1,20 @@
1
1
  import { JSX } from 'solid-js';
2
2
  interface CheckboxProps {
3
3
  checked: boolean;
4
+ /** Called with the new checked state whenever the input is toggled. */
4
5
  onChange: (checked: boolean) => void;
6
+ /** Visible label rendered next to the checkbox; also makes the whole row clickable. */
5
7
  label: string;
6
8
  class?: string;
7
9
  }
10
+ /**
11
+ * Plain labeled checkbox (native `<input type="checkbox">`, not a Kobalte
12
+ * wrapper) for simple boolean toggles with a visible label.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <Checkbox checked={agreed()} onChange={setAgreed} label="I agree to the terms" />
17
+ * ```
18
+ */
8
19
  export declare function Checkbox(props: CheckboxProps): JSX.Element;
9
20
  export {};
@@ -1,10 +1,26 @@
1
1
  import { JSX } from 'solid-js';
2
2
  interface ComboboxProps {
3
+ /** Full list of selectable string options (filtered as the user types). */
3
4
  options: string[];
4
5
  value: string;
6
+ /** Called with the newly selected option, or `''` if the selection is cleared. */
5
7
  onChange: (value: string) => void;
6
8
  placeholder?: string;
7
9
  class?: string;
8
10
  }
11
+ /**
12
+ * Searchable single-select dropdown for plain string options, built on
13
+ * Kobalte's `Combobox` primitive with a filterable text input and trigger.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <Combobox
18
+ * options={['Draft', 'Active', 'Archived']}
19
+ * value={status()}
20
+ * onChange={setStatus}
21
+ * placeholder="Select a status"
22
+ * />
23
+ * ```
24
+ */
9
25
  export declare function Combobox(props: ComboboxProps): JSX.Element;
10
26
  export {};
@@ -1,7 +1,10 @@
1
1
  import { JSX, ParentProps } from 'solid-js';
2
+ /** A single actionable row rendered by {@link ContextMenu}. */
2
3
  export interface ContextMenuItem {
3
4
  label: string;
5
+ /** Called when the item is chosen (click or keyboard activation). */
4
6
  onSelect: () => void;
7
+ /** Styles the label as a destructive action (e.g. "Delete"). */
5
8
  destructive?: boolean;
6
9
  disabled?: boolean;
7
10
  }
@@ -9,5 +12,16 @@ interface ContextMenuProps extends ParentProps {
9
12
  items: ContextMenuItem[];
10
13
  class?: string;
11
14
  }
15
+ /**
16
+ * Right-click (or long-press) menu built on Kobalte's `ContextMenu`
17
+ * primitive. `children` is the element that acts as the trigger/target area.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <ContextMenu items={[{ label: 'Rename', onSelect: rename }, { label: 'Delete', onSelect: remove, destructive: true }]}>
22
+ * <div class="rounded border p-4">Right-click me</div>
23
+ * </ContextMenu>
24
+ * ```
25
+ */
12
26
  export declare function ContextMenu(props: ContextMenuProps): JSX.Element;
13
27
  export {};
@@ -1,7 +1,10 @@
1
1
  import { JSX } from 'solid-js';
2
2
  interface DateFieldProps {
3
+ /** Selected date as `YYYY-MM-DD` (local, no timezone shift), or `''` for none. */
3
4
  value: string;
5
+ /** Called with the newly picked date as `YYYY-MM-DD`. */
4
6
  onChange: (value: string) => void;
7
+ /** Placeholder shown on the trigger when `value` is empty. */
5
8
  label?: string;
6
9
  disabled?: boolean;
7
10
  class?: string;
@@ -10,5 +13,16 @@ interface DateFieldProps {
10
13
  /** Weekday headers, Monday-first (7 entries). */
11
14
  weekdays?: string[];
12
15
  }
16
+ /**
17
+ * Compact hand-rolled month-grid date picker (no Kobalte primitive covers this yet).
18
+ * Trigger button opens a portaled popover calendar; closes on outside click, Escape,
19
+ * scroll, or resize. Speaks plain `YYYY-MM-DD` strings, never `Date`/`toISOString`.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * const [date, setDate] = createSignal('2026-07-14')
24
+ * <DateField value={date()} onChange={setDate} label="Due date" />
25
+ * ```
26
+ */
13
27
  export declare function DateField(props: DateFieldProps): JSX.Element;
14
28
  export {};
@@ -2,10 +2,26 @@ import { JSX, ParentProps } from 'solid-js';
2
2
  interface DrawerProps extends ParentProps {
3
3
  open: boolean;
4
4
  onOpenChange: (open: boolean) => void;
5
+ /** Sticky glass header title. Omit to render fully custom header content in `children`. */
5
6
  title?: string;
7
+ /** Small muted line under `title`; only shown when `title` is also set. */
6
8
  subtitle?: string;
7
9
  class?: string;
10
+ /** Accessible label for the close button. @default 'Close' */
8
11
  closeLabel?: string;
9
12
  }
13
+ /**
14
+ * Right-anchored slide-over panel built on Kobalte's `Dialog` (focus trap, portal,
15
+ * and open/close presence handled for you). Use for create/edit forms or detail
16
+ * panels that need more room than a centered `Modal`.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * const [open, setOpen] = createSignal(false)
21
+ * <Drawer open={open()} onOpenChange={setOpen} title="Edit invoice">
22
+ * <p>Drawer content…</p>
23
+ * </Drawer>
24
+ * ```
25
+ */
10
26
  export declare function Drawer(props: DrawerProps): JSX.Element;
11
27
  export {};
@@ -1,7 +1,9 @@
1
1
  import { JSX, ParentProps } from 'solid-js';
2
+ /** A single selectable row in a {@link Dropdown} menu. */
2
3
  export interface DropdownItem {
3
4
  label: string;
4
5
  onSelect: () => void;
6
+ /** Styles the label in the destructive color (e.g. "Delete"). */
5
7
  destructive?: boolean;
6
8
  disabled?: boolean;
7
9
  }
@@ -12,6 +14,21 @@ interface DropdownProps extends ParentProps {
12
14
  inside — the Trigger IS the button, so its children must be non-interactive. */
13
15
  label?: string;
14
16
  }
15
- /** `props.children` is the trigger's (non-interactive) content. */
17
+ /**
18
+ * Accessible dropdown/context menu on Kobalte's `DropdownMenu` primitive.
19
+ * `props.children` is the trigger's (non-interactive) content — the Trigger
20
+ * itself renders as the button, so don't nest another `<button>` inside it.
21
+ * Unlike a Dialog, it does not lock page scroll while open.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * <Dropdown label="Row actions" items={[
26
+ * { label: 'Edit', onSelect: () => edit(row) },
27
+ * { label: 'Delete', destructive: true, onSelect: () => remove(row) },
28
+ * ]}>
29
+ * <MoreVertical class="h-4 w-4" />
30
+ * </Dropdown>
31
+ * ```
32
+ */
16
33
  export declare function Dropdown(props: DropdownProps): JSX.Element;
17
34
  export {};
@@ -1,5 +1,6 @@
1
1
  import { JSX } from 'solid-js';
2
2
  interface DropzoneProps {
3
+ /** Called with the dropped or browsed files; the caller owns upload/validation. */
3
4
  onFiles: (files: File[]) => void;
4
5
  /** `accept` attribute for the hidden input, e.g. ".xml,.zip". */
5
6
  accept?: string;
@@ -9,5 +10,15 @@ interface DropzoneProps {
9
10
  hint?: string;
10
11
  label?: string;
11
12
  }
13
+ /**
14
+ * Presentational drag-and-drop (or click-to-browse) file dropzone. Not a Kobalte
15
+ * wrapper — just a styled `role="button"` region plus a hidden `<input type="file">`.
16
+ * It only collects `File[]` via `onFiles`; it does not upload or store anything.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Dropzone accept=".xml,.zip" multiple onFiles={(files) => upload(files)} />
21
+ * ```
22
+ */
12
23
  export declare function Dropzone(props: DropzoneProps): JSX.Element;
13
24
  export {};
@@ -1,7 +1,20 @@
1
1
  import { JSX, ParentProps } from 'solid-js';
2
2
  interface HoverCardProps extends ParentProps {
3
+ /** Content that opens the card on hover/focus. */
3
4
  trigger: JSX.Element;
4
5
  class?: string;
5
6
  }
7
+ /**
8
+ * Floating panel that appears on hover (or focus) of a trigger element, built on
9
+ * Kobalte's `HoverCard` primitive. Good for previews/tooltips with richer content
10
+ * than a plain `title` attribute — e.g. a user avatar preview card.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <HoverCard trigger={<Avatar src={user.avatar} />}>
15
+ * <p>{user.name}</p>
16
+ * </HoverCard>
17
+ * ```
18
+ */
6
19
  export declare function HoverCard(props: HoverCardProps): JSX.Element;
7
20
  export {};
@@ -1,8 +1,20 @@
1
1
  import { JSX } from 'solid-js';
2
2
  interface InputProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onInput'> {
3
3
  value: string;
4
+ /** Called with the raw string value on every input event (controlled). */
4
5
  onInput: (value: string) => void;
5
6
  class?: string;
6
7
  }
8
+ /**
9
+ * Themed text input with a value/onInput controlled-string API (instead of raw
10
+ * DOM events). All other native `<input>` attributes pass through, so `type`,
11
+ * `disabled`, `placeholder`, etc. work as usual.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const [name, setName] = createSignal('')
16
+ * <Input value={name()} onInput={setName} placeholder="Full name" />
17
+ * ```
18
+ */
7
19
  export declare function Input(props: InputProps): JSX.Element;
8
20
  export {};
@@ -1,9 +1,21 @@
1
1
  import { JSX } from 'solid-js';
2
2
  interface MeterProps {
3
3
  value: number;
4
+ /** @default 100 */
4
5
  max?: number;
6
+ /** Label shown above the track, paired with an auto-formatted value label. */
5
7
  label?: string;
6
8
  class?: string;
7
9
  }
10
+ /**
11
+ * Static measurement gauge (e.g. disk/quota usage) on Kobalte's `Meter` primitive.
12
+ * Unlike a progress bar, a meter represents a fixed measurement against a range,
13
+ * not an in-flight operation.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <Meter value={72} max={100} label="Storage used" />
18
+ * ```
19
+ */
8
20
  export declare function Meter(props: MeterProps): JSX.Element;
9
21
  export {};
@@ -2,10 +2,31 @@ import { JSX, ParentProps } from 'solid-js';
2
2
  interface ModalProps extends ParentProps {
3
3
  open: boolean;
4
4
  onOpenChange: (open: boolean) => void;
5
+ /** Header title; omitting it hides the whole header bar. */
5
6
  title?: string;
7
+ /**
8
+ * `'drawer'` (default): right-anchored slide-over, more room, less jarring —
9
+ * use for forms/detail panels. `'center'`: classic centered modal — use for
10
+ * short confirmations (e.g. destructive yes/no).
11
+ * @default 'drawer'
12
+ */
6
13
  variant?: 'drawer' | 'center';
7
14
  class?: string;
15
+ /** Accessible label for the close button. @default 'Close' */
8
16
  closeLabel?: string;
9
17
  }
18
+ /**
19
+ * Dialog on Kobalte's `Dialog` primitive (focus trap, portal, presence handled
20
+ * for you), rendered as either a slide-over drawer or a centered modal depending
21
+ * on `variant`.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * const [open, setOpen] = createSignal(false)
26
+ * <Modal open={open()} onOpenChange={setOpen} variant="center" title="Delete item?">
27
+ * <p>This action cannot be undone.</p>
28
+ * </Modal>
29
+ * ```
30
+ */
10
31
  export declare function Modal(props: ModalProps): JSX.Element;
11
32
  export {};
@@ -2,9 +2,21 @@ import { JSX } from 'solid-js';
2
2
  interface NumberInputProps {
3
3
  value: number;
4
4
  onChange: (value: number) => void;
5
+ /** Lower bound; the decrement trigger disables itself at this value. */
5
6
  min?: number;
7
+ /** Upper bound; the increment trigger disables itself at this value. */
6
8
  max?: number;
7
9
  class?: string;
8
10
  }
11
+ /**
12
+ * Numeric field with −/+ stepper buttons, built on Kobalte's `NumberField` primitive.
13
+ * Use for bounded numeric input (quantities, counts) where clicking to nudge the
14
+ * value is preferable to typing alone.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * <NumberInput value={qty()} onChange={setQty} min={0} max={99} />
19
+ * ```
20
+ */
9
21
  export declare function NumberInput(props: NumberInputProps): JSX.Element;
10
22
  export {};
@@ -2,8 +2,25 @@ import { JSX } from 'solid-js';
2
2
  interface PageHeaderProps {
3
3
  title: string;
4
4
  subtitle?: string;
5
+ /** Trail of crumb labels, in order; the last one is rendered highlighted as the current page. */
5
6
  breadcrumb?: string[];
7
+ /** Right-aligned slot for page-level actions (buttons, menus, etc.). */
6
8
  actions?: JSX.Element;
7
9
  }
10
+ /**
11
+ * Consistent top-of-page header: optional breadcrumb trail, title, subtitle,
12
+ * and a right-aligned actions slot. Use at the top of a route/page for a
13
+ * uniform layout across the app.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * <PageHeader
18
+ * title="Invoices"
19
+ * subtitle="Manage billing documents"
20
+ * breadcrumb={['Home', 'Billing', 'Invoices']}
21
+ * actions={<Button>New invoice</Button>}
22
+ * />
23
+ * ```
24
+ */
8
25
  export declare function PageHeader(props: PageHeaderProps): JSX.Element;
9
26
  export {};
@@ -1,14 +1,28 @@
1
1
  import { JSX } from 'solid-js';
2
2
  interface PaginationProps {
3
+ /** Current page, 1-indexed. */
3
4
  page: number;
4
5
  totalPages: number;
5
6
  onChange: (page: number) => void;
7
+ /** Left-aligned slot, e.g. a row-count summary like "1,234 registros · 1–50". */
6
8
  summary?: JSX.Element;
9
+ /** Override default English labels/text for i18n. */
7
10
  labels?: {
8
11
  previous?: string;
9
12
  next?: string;
13
+ /** Formats the center label; default is `` `Page ${page} of ${total}` ``. */
10
14
  page?: (page: number, total: number) => string;
11
15
  };
12
16
  }
17
+ /**
18
+ * Prev/next pager with a "Page X of Y" label and an optional summary slot.
19
+ * Purely client-side and controlled — the parent owns the `page` signal and
20
+ * is responsible for slicing its own data to match.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <Pagination page={page()} totalPages={totalPages()} onChange={setPage} />
25
+ * ```
26
+ */
13
27
  export declare function Pagination(props: PaginationProps): JSX.Element;
14
28
  export {};
@@ -1,7 +1,20 @@
1
1
  import { JSX, ParentProps } from 'solid-js';
2
2
  interface PopoverProps extends ParentProps {
3
+ /** Element that opens the popover on click; wrapped in an inline-flex trigger. */
3
4
  trigger: JSX.Element;
4
5
  class?: string;
5
6
  }
7
+ /**
8
+ * Click-triggered floating panel, built on Kobalte's `Popover` primitive
9
+ * (handles positioning, focus, dismiss, and portaling). Use for contextual
10
+ * content anchored to a trigger element, such as a filter panel or menu.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <Popover trigger={<Button>Filters</Button>}>
15
+ * <p>Panel content</p>
16
+ * </Popover>
17
+ * ```
18
+ */
6
19
  export declare function Popover(props: PopoverProps): JSX.Element;
7
20
  export {};
@@ -1,9 +1,20 @@
1
1
  import { JSX } from 'solid-js';
2
2
  interface ProgressProps {
3
3
  value: number;
4
+ /** Upper bound of `value`. Default: 100. */
4
5
  max?: number;
6
+ /** Label shown above the bar, paired with an auto-generated value label (e.g. "50%"). */
5
7
  label?: string;
6
8
  class?: string;
7
9
  }
10
+ /**
11
+ * Determinate progress bar, built on Kobalte's `Progress` primitive. Use to
12
+ * show completion of a known-length task (upload, multi-step form, etc.).
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <Progress value={uploaded()} max={totalBytes()} label="Uploading" />
17
+ * ```
18
+ */
8
19
  export declare function Progress(props: ProgressProps): JSX.Element;
9
20
  export {};
@@ -1,4 +1,5 @@
1
1
  import { JSX } from 'solid-js';
2
+ /** A single selectable choice within a {@link RadioGroup}. */
2
3
  export interface RadioOption {
3
4
  value: string;
4
5
  label: string;
@@ -8,8 +9,27 @@ interface RadioGroupProps {
8
9
  value: string;
9
10
  onChange: (value: string) => void;
10
11
  options: RadioOption[];
12
+ /** Group label rendered above the options. */
11
13
  label?: string;
12
14
  class?: string;
13
15
  }
16
+ /**
17
+ * Accessible single-choice group, built on Kobalte's `RadioGroup` primitive
18
+ * (arrow-key navigation, ARIA roles). Use when all options should stay
19
+ * visible at once, unlike {@link Select} which hides options until opened.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <RadioGroup
24
+ * label="Plan"
25
+ * value={plan()}
26
+ * onChange={setPlan}
27
+ * options={[
28
+ * { value: 'free', label: 'Free' },
29
+ * { value: 'pro', label: 'Pro' },
30
+ * ]}
31
+ * />
32
+ * ```
33
+ */
14
34
  export declare function RadioGroup(props: RadioGroupProps): JSX.Element;
15
35
  export {};
@@ -1,4 +1,5 @@
1
1
  import { JSX } from 'solid-js';
2
+ /** A single selectable choice within a {@link SegmentedControl}. */
2
3
  export interface SegmentedOption {
3
4
  value: string;
4
5
  label: string;
@@ -9,5 +10,23 @@ interface SegmentedControlProps {
9
10
  options: SegmentedOption[];
10
11
  class?: string;
11
12
  }
13
+ /**
14
+ * Single-choice segmented control with an animated indicator that slides
15
+ * under the selected item, built on Kobalte's `SegmentedControl` primitive.
16
+ * Use for a small, always-visible set of mutually exclusive options (e.g.
17
+ * view toggles) as a more compact alternative to {@link RadioGroup}.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <SegmentedControl
22
+ * value={view()}
23
+ * onChange={setView}
24
+ * options={[
25
+ * { value: 'list', label: 'List' },
26
+ * { value: 'grid', label: 'Grid' },
27
+ * ]}
28
+ * />
29
+ * ```
30
+ */
12
31
  export declare function SegmentedControl(props: SegmentedControlProps): JSX.Element;
13
32
  export {};
@@ -4,5 +4,19 @@ interface SelectProps extends ParentProps, Omit<JSX.SelectHTMLAttributes<HTMLSel
4
4
  onChange: (value: string) => void;
5
5
  class?: string;
6
6
  }
7
+ /**
8
+ * Controlled native `<select>`, styled to match the design system. Pass
9
+ * `<option>` elements as children. Not a Kobalte primitive — for a
10
+ * non-native, fully custom dropdown consider building on Kobalte's `Select`
11
+ * directly.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Select value={country()} onChange={setCountry}>
16
+ * <option value="mx">Mexico</option>
17
+ * <option value="us">United States</option>
18
+ * </Select>
19
+ * ```
20
+ */
7
21
  export declare function Select(props: SelectProps): JSX.Element;
8
22
  export {};
@@ -1,7 +1,18 @@
1
1
  import { JSX } from 'solid-js';
2
2
  interface SeparatorProps {
3
+ /** Default: `'horizontal'`. */
3
4
  orientation?: 'horizontal' | 'vertical';
4
5
  class?: string;
5
6
  }
7
+ /**
8
+ * Visual/semantic divider, built on Kobalte's `Separator` primitive (renders
9
+ * with the correct ARIA role for the given orientation). Use to separate
10
+ * groups of content, e.g. inside a menu or between toolbar sections.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <Separator orientation="vertical" />
15
+ * ```
16
+ */
6
17
  export declare function Separator(props: SeparatorProps): JSX.Element;
7
18
  export {};
@@ -1,6 +1,17 @@
1
1
  import { JSX } from 'solid-js';
2
2
  interface SkeletonProps {
3
+ /** Size/shape the placeholder to match the content it stands in for, e.g. `"h-4 w-32 rounded-full"`. */
3
4
  class?: string;
4
5
  }
6
+ /**
7
+ * Pulsing placeholder block for content that is still loading. Plain `div`,
8
+ * no Kobalte primitive — size it via `class` to match the shape of the real
9
+ * content (text line, avatar, card, etc.).
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * <Skeleton class="h-4 w-48" />
14
+ * ```
15
+ */
5
16
  export declare function Skeleton(props: SkeletonProps): JSX.Element;
6
17
  export {};
@@ -2,11 +2,25 @@ import { JSX } from 'solid-js';
2
2
  interface SliderProps {
3
3
  value: number;
4
4
  onChange: (value: number) => void;
5
+ /** Default: 0. */
5
6
  min?: number;
7
+ /** Default: 100. */
6
8
  max?: number;
9
+ /** Increment step. Default: 1. */
7
10
  step?: number;
11
+ /** Label shown above the track, paired with an auto-generated value label. */
8
12
  label?: string;
9
13
  class?: string;
10
14
  }
15
+ /**
16
+ * Single-value range slider, built on Kobalte's `Slider` primitive (which
17
+ * natively supports multiple thumbs). This wrapper accepts and emits a plain
18
+ * `number` instead of an array, for a simpler single-thumb API.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <Slider label="Volume" value={volume()} onChange={setVolume} min={0} max={100} />
23
+ * ```
24
+ */
11
25
  export declare function Slider(props: SliderProps): JSX.Element;
12
26
  export {};