@a4ui/core 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +23 -0
  2. package/dist/index.js +451 -432
  3. package/dist/layout/AppShell.d.ts +19 -1
  4. package/dist/layout/EffectsToggle.d.ts +19 -1
  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 +17 -1
  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 +4 -4
  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 +18 -0
  27. package/dist/ui/Drawer.d.ts +17 -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 +22 -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 +19 -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 +4 -3
@@ -1,8 +1,20 @@
1
1
  import { JSX, ParentProps } from 'solid-js';
2
2
  interface ToggleProps extends ParentProps {
3
+ /** Whether the toggle is pressed/"on". Controlled — pair with `onChange`. */
3
4
  pressed: boolean;
4
5
  onChange: (pressed: boolean) => void;
5
6
  class?: string;
6
7
  }
8
+ /**
9
+ * Two-state toggle button (e.g. bold/italic, mute, favorite), built on
10
+ * Kobalte's ToggleButton primitive. `children` is the button's content
11
+ * (icon and/or text).
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const [pressed, setPressed] = createSignal(false)
16
+ * <Toggle pressed={pressed()} onChange={setPressed}><StarIcon /></Toggle>
17
+ * ```
18
+ */
7
19
  export declare function Toggle(props: ToggleProps): JSX.Element;
8
20
  export {};
@@ -1,13 +1,33 @@
1
1
  import { JSX } from 'solid-js';
2
+ /** One option in a {@link ToggleGroup}: its `value` and visible `label`. */
2
3
  export interface ToggleGroupOption {
3
4
  value: string;
4
5
  label: string;
5
6
  }
6
7
  interface ToggleGroupProps {
8
+ /** Currently selected option's `value`, or `null` if none is selected. Controlled — pair with `onChange`. */
7
9
  value: string | null;
8
10
  onChange: (value: string | null) => void;
11
+ /** Options to render, in order, as segmented buttons. */
9
12
  options: ToggleGroupOption[];
10
13
  class?: string;
11
14
  }
15
+ /**
16
+ * Single-select segmented button row, built on Kobalte's ToggleGroup
17
+ * primitive — for exclusive-choice controls like view mode or alignment.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * const [align, setAlign] = createSignal<string | null>('left')
22
+ * <ToggleGroup
23
+ * value={align()}
24
+ * onChange={setAlign}
25
+ * options={[
26
+ * { value: 'left', label: 'Left' },
27
+ * { value: 'center', label: 'Center' },
28
+ * ]}
29
+ * />
30
+ * ```
31
+ */
12
32
  export declare function ToggleGroup(props: ToggleGroupProps): JSX.Element;
13
33
  export {};
@@ -1,7 +1,20 @@
1
1
  import { JSX, ParentProps } from 'solid-js';
2
2
  interface TooltipProps extends ParentProps {
3
+ /** Content shown inside the tooltip popover. */
3
4
  content: JSX.Element;
5
+ /** Applied to the tooltip popover (`KTooltip.Content`), not the trigger. */
4
6
  class?: string;
5
7
  }
8
+ /**
9
+ * Hover/focus tooltip, built on Kobalte's Tooltip primitive. `children` is
10
+ * the trigger element; `content` is rendered in a portal on hover/focus.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <Tooltip content="Delete this item">
15
+ * <IconButton icon={<TrashIcon />} aria-label="Delete" />
16
+ * </Tooltip>
17
+ * ```
18
+ */
6
19
  export declare function Tooltip(props: TooltipProps): JSX.Element;
7
20
  export {};
@@ -11,5 +11,19 @@ interface VirtualListProps<T> {
11
11
  /** Row renderer. `index` is an accessor so it stays reactive as rows recycle. */
12
12
  children: (item: T, index: Accessor<number>) => JSX.Element;
13
13
  }
14
+ /**
15
+ * Virtualized list built on `@tanstack/solid-virtual` — renders only the
16
+ * visible rows (plus `overscan`) so lists of any length mount and scroll
17
+ * instantly. The scroll container's height MUST be constrained via `class`
18
+ * (e.g. `"h-[65vh]"`); virtualization requires a fixed viewport to measure
19
+ * against.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <VirtualList each={rows()} estimateSize={40} class="h-[65vh]">
24
+ * {(row, index) => <div>{index()}: {row.name}</div>}
25
+ * </VirtualList>
26
+ * ```
27
+ */
14
28
  export declare function VirtualList<T>(props: VirtualListProps<T>): JSX.Element;
15
29
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a4ui/core",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "A4ui — Spatial Glass design system & component library for SolidJS (Kobalte behavior + Tailwind glass tokens + motion).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -48,8 +48,9 @@
48
48
  "scripts": {
49
49
  "build": "vite build",
50
50
  "dev": "vite build --watch",
51
- "preview": "vite --config vite.preview.config.ts",
52
- "preview:build": "vite build --config vite.preview.config.ts",
51
+ "preview": "node scripts/gen-llms.mjs && vite --config vite.preview.config.ts",
52
+ "preview:build": "node scripts/gen-llms.mjs && vite build --config vite.preview.config.ts",
53
+ "gen:llms": "node scripts/gen-llms.mjs",
53
54
  "typecheck": "tsc --noEmit",
54
55
  "lint": "eslint src",
55
56
  "test": "playwright test",