@prismora/react 0.0.0-stage → 0.1.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 (219) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +19 -2
  3. package/dist/components/Accordion.d.ts +19 -0
  4. package/dist/components/Accordion.js +4 -0
  5. package/dist/components/AccordionItem.d.ts +24 -0
  6. package/dist/components/AccordionItem.js +4 -0
  7. package/dist/components/Alert.d.ts +28 -0
  8. package/dist/components/Alert.js +4 -0
  9. package/dist/components/Avatar.d.ts +27 -0
  10. package/dist/components/Avatar.js +4 -0
  11. package/dist/components/AvatarGroup.d.ts +23 -0
  12. package/dist/components/AvatarGroup.js +4 -0
  13. package/dist/components/BackToTop.d.ts +25 -0
  14. package/dist/components/BackToTop.js +4 -0
  15. package/dist/components/Badge.d.ts +23 -0
  16. package/dist/components/Badge.js +4 -0
  17. package/dist/components/Banner.d.ts +30 -0
  18. package/dist/components/Banner.js +4 -0
  19. package/dist/components/Breadcrumb.d.ts +23 -0
  20. package/dist/components/Breadcrumb.js +4 -0
  21. package/dist/components/BreadcrumbItem.d.ts +21 -0
  22. package/dist/components/BreadcrumbItem.js +4 -0
  23. package/dist/components/Button.d.ts +49 -0
  24. package/dist/components/Button.js +4 -0
  25. package/dist/components/ButtonGroup.d.ts +19 -0
  26. package/dist/components/ButtonGroup.js +4 -0
  27. package/dist/components/Calendar.d.ts +34 -0
  28. package/dist/components/Calendar.js +4 -0
  29. package/dist/components/Card.d.ts +25 -0
  30. package/dist/components/Card.js +4 -0
  31. package/dist/components/Carousel.d.ts +32 -0
  32. package/dist/components/Carousel.js +4 -0
  33. package/dist/components/Cascader.d.ts +42 -0
  34. package/dist/components/Cascader.js +4 -0
  35. package/dist/components/Chart.d.ts +42 -0
  36. package/dist/components/Chart.js +4 -0
  37. package/dist/components/Chat.d.ts +19 -0
  38. package/dist/components/Chat.js +4 -0
  39. package/dist/components/ChatMessage.d.ts +31 -0
  40. package/dist/components/ChatMessage.js +4 -0
  41. package/dist/components/Checkbox.d.ts +43 -0
  42. package/dist/components/Checkbox.js +4 -0
  43. package/dist/components/CheckboxGroup.d.ts +47 -0
  44. package/dist/components/CheckboxGroup.js +4 -0
  45. package/dist/components/Choice.d.ts +15 -0
  46. package/dist/components/Choice.js +4 -0
  47. package/dist/components/CodeBlock.d.ts +32 -0
  48. package/dist/components/CodeBlock.js +4 -0
  49. package/dist/components/ColorPicker.d.ts +49 -0
  50. package/dist/components/ColorPicker.js +4 -0
  51. package/dist/components/Combobox.d.ts +73 -0
  52. package/dist/components/Combobox.js +4 -0
  53. package/dist/components/Command.d.ts +50 -0
  54. package/dist/components/Command.js +4 -0
  55. package/dist/components/CommandItem.d.ts +21 -0
  56. package/dist/components/CommandItem.js +4 -0
  57. package/dist/components/Composer.d.ts +34 -0
  58. package/dist/components/Composer.js +4 -0
  59. package/dist/components/ContextMenu.d.ts +16 -0
  60. package/dist/components/ContextMenu.js +4 -0
  61. package/dist/components/CopyButton.d.ts +35 -0
  62. package/dist/components/CopyButton.js +4 -0
  63. package/dist/components/Countdown.d.ts +28 -0
  64. package/dist/components/Countdown.js +4 -0
  65. package/dist/components/DataTable.d.ts +90 -0
  66. package/dist/components/DataTable.js +4 -0
  67. package/dist/components/DatePicker.d.ts +58 -0
  68. package/dist/components/DatePicker.js +4 -0
  69. package/dist/components/DescriptionItem.d.ts +19 -0
  70. package/dist/components/DescriptionItem.js +4 -0
  71. package/dist/components/DescriptionList.d.ts +25 -0
  72. package/dist/components/DescriptionList.js +4 -0
  73. package/dist/components/Dialog.d.ts +33 -0
  74. package/dist/components/Dialog.js +4 -0
  75. package/dist/components/Divider.d.ts +19 -0
  76. package/dist/components/Divider.js +4 -0
  77. package/dist/components/Drawer.d.ts +35 -0
  78. package/dist/components/Drawer.js +4 -0
  79. package/dist/components/Editor.d.ts +33 -0
  80. package/dist/components/Editor.js +4 -0
  81. package/dist/components/EmptyState.d.ts +27 -0
  82. package/dist/components/EmptyState.js +4 -0
  83. package/dist/components/FileUpload.d.ts +41 -0
  84. package/dist/components/FileUpload.js +4 -0
  85. package/dist/components/Form.d.ts +15 -0
  86. package/dist/components/Form.js +4 -0
  87. package/dist/components/FormatNumber.d.ts +31 -0
  88. package/dist/components/FormatNumber.js +4 -0
  89. package/dist/components/Icon.d.ts +25 -0
  90. package/dist/components/Icon.js +4 -0
  91. package/dist/components/Image.d.ts +39 -0
  92. package/dist/components/Image.js +4 -0
  93. package/dist/components/Indicator.d.ts +35 -0
  94. package/dist/components/Indicator.js +4 -0
  95. package/dist/components/InlineEdit.d.ts +31 -0
  96. package/dist/components/InlineEdit.js +4 -0
  97. package/dist/components/Input.d.ts +74 -0
  98. package/dist/components/Input.js +4 -0
  99. package/dist/components/Kbd.d.ts +19 -0
  100. package/dist/components/Kbd.js +4 -0
  101. package/dist/components/List.d.ts +23 -0
  102. package/dist/components/List.js +4 -0
  103. package/dist/components/ListItem.d.ts +39 -0
  104. package/dist/components/ListItem.js +4 -0
  105. package/dist/components/Menu.d.ts +12 -0
  106. package/dist/components/Menu.js +4 -0
  107. package/dist/components/Menubar.d.ts +11 -0
  108. package/dist/components/Menubar.js +4 -0
  109. package/dist/components/Meter.d.ts +39 -0
  110. package/dist/components/Meter.js +4 -0
  111. package/dist/components/Nav.d.ts +27 -0
  112. package/dist/components/Nav.js +4 -0
  113. package/dist/components/NavGroup.d.ts +19 -0
  114. package/dist/components/NavGroup.js +4 -0
  115. package/dist/components/NavItem.d.ts +38 -0
  116. package/dist/components/NavItem.js +4 -0
  117. package/dist/components/NumberInput.d.ts +49 -0
  118. package/dist/components/NumberInput.js +4 -0
  119. package/dist/components/Pagination.d.ts +40 -0
  120. package/dist/components/Pagination.js +4 -0
  121. package/dist/components/PinInput.d.ts +48 -0
  122. package/dist/components/PinInput.js +4 -0
  123. package/dist/components/Popover.d.ts +17 -0
  124. package/dist/components/Popover.js +4 -0
  125. package/dist/components/Progress.d.ts +31 -0
  126. package/dist/components/Progress.js +4 -0
  127. package/dist/components/PullRefresh.d.ts +26 -0
  128. package/dist/components/PullRefresh.js +4 -0
  129. package/dist/components/QrCode.d.ts +27 -0
  130. package/dist/components/QrCode.js +4 -0
  131. package/dist/components/Radio.d.ts +15 -0
  132. package/dist/components/Radio.js +4 -0
  133. package/dist/components/RadioGroup.d.ts +43 -0
  134. package/dist/components/RadioGroup.js +4 -0
  135. package/dist/components/RangeSlider.d.ts +45 -0
  136. package/dist/components/RangeSlider.js +4 -0
  137. package/dist/components/Rating.d.ts +40 -0
  138. package/dist/components/Rating.js +4 -0
  139. package/dist/components/RelativeTime.d.ts +29 -0
  140. package/dist/components/RelativeTime.js +4 -0
  141. package/dist/components/Scheduler.d.ts +40 -0
  142. package/dist/components/Scheduler.js +4 -0
  143. package/dist/components/Segment.d.ts +23 -0
  144. package/dist/components/Segment.js +4 -0
  145. package/dist/components/Segmented.d.ts +36 -0
  146. package/dist/components/Segmented.js +4 -0
  147. package/dist/components/Select.d.ts +57 -0
  148. package/dist/components/Select.js +4 -0
  149. package/dist/components/ShareButton.d.ts +35 -0
  150. package/dist/components/ShareButton.js +4 -0
  151. package/dist/components/Signature.d.ts +36 -0
  152. package/dist/components/Signature.js +4 -0
  153. package/dist/components/Skeleton.d.ts +25 -0
  154. package/dist/components/Skeleton.js +4 -0
  155. package/dist/components/Slider.d.ts +53 -0
  156. package/dist/components/Slider.js +4 -0
  157. package/dist/components/Sortable.d.ts +14 -0
  158. package/dist/components/Sortable.js +4 -0
  159. package/dist/components/Sparkline.d.ts +23 -0
  160. package/dist/components/Sparkline.js +4 -0
  161. package/dist/components/Spinner.d.ts +21 -0
  162. package/dist/components/Spinner.js +4 -0
  163. package/dist/components/Splitter.d.ts +30 -0
  164. package/dist/components/Splitter.js +4 -0
  165. package/dist/components/Stat.d.ts +33 -0
  166. package/dist/components/Stat.js +4 -0
  167. package/dist/components/Step.d.ts +27 -0
  168. package/dist/components/Step.js +4 -0
  169. package/dist/components/Steps.d.ts +26 -0
  170. package/dist/components/Steps.js +4 -0
  171. package/dist/components/Switch.d.ts +43 -0
  172. package/dist/components/Switch.js +4 -0
  173. package/dist/components/Tab.d.ts +21 -0
  174. package/dist/components/Tab.js +4 -0
  175. package/dist/components/TabPanel.d.ts +9 -0
  176. package/dist/components/TabPanel.js +4 -0
  177. package/dist/components/Table.d.ts +43 -0
  178. package/dist/components/Table.js +4 -0
  179. package/dist/components/Tabs.d.ts +29 -0
  180. package/dist/components/Tabs.js +4 -0
  181. package/dist/components/Tag.d.ts +35 -0
  182. package/dist/components/Tag.js +4 -0
  183. package/dist/components/Textarea.d.ts +51 -0
  184. package/dist/components/Textarea.js +4 -0
  185. package/dist/components/ThemeSwitch.d.ts +26 -0
  186. package/dist/components/ThemeSwitch.js +4 -0
  187. package/dist/components/TimePicker.d.ts +53 -0
  188. package/dist/components/TimePicker.js +4 -0
  189. package/dist/components/Timeline.d.ts +19 -0
  190. package/dist/components/Timeline.js +4 -0
  191. package/dist/components/TimelineItem.d.ts +25 -0
  192. package/dist/components/TimelineItem.js +4 -0
  193. package/dist/components/Toaster.d.ts +17 -0
  194. package/dist/components/Toaster.js +4 -0
  195. package/dist/components/Toggle.d.ts +30 -0
  196. package/dist/components/Toggle.js +4 -0
  197. package/dist/components/ToggleGroup.d.ts +40 -0
  198. package/dist/components/ToggleGroup.js +4 -0
  199. package/dist/components/Toolbar.d.ts +13 -0
  200. package/dist/components/Toolbar.js +4 -0
  201. package/dist/components/Tooltip.d.ts +11 -0
  202. package/dist/components/Tooltip.js +4 -0
  203. package/dist/components/Tour.d.ts +16 -0
  204. package/dist/components/Tour.js +4 -0
  205. package/dist/components/Transfer.d.ts +42 -0
  206. package/dist/components/Transfer.js +4 -0
  207. package/dist/components/Tree.d.ts +45 -0
  208. package/dist/components/Tree.js +4 -0
  209. package/dist/components/TreeItem.d.ts +38 -0
  210. package/dist/components/TreeItem.js +4 -0
  211. package/dist/components/TreeSelect.d.ts +46 -0
  212. package/dist/components/TreeSelect.js +4 -0
  213. package/dist/components/VirtualList.d.ts +31 -0
  214. package/dist/components/VirtualList.js +4 -0
  215. package/dist/create-component.d.ts +9 -0
  216. package/dist/create-component.js +51 -0
  217. package/dist/index.d.ts +113 -0
  218. package/dist/index.js +109 -0
  219. package/package.json +41 -4
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const Image = /* @__PURE__ */ createComponent('pm-image', { onPmLoad: 'pm-load', onPmError: 'pm-error' }, () => import('@prismora/elements/image'));
@@ -0,0 +1,35 @@
1
+ import type * as React from 'react';
2
+ import type { PmIndicator } from '@prismora/elements/indicator';
3
+ /** Count or dot on the corner of an icon, button or avatar: unread notifications, messages, cart items, status. — `<pm-indicator>` */
4
+ export interface IndicatorProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Number to show. */
6
+ count?: number;
7
+ /** Highest number shown before "+" (default 99; 0 = no cap). */
8
+ max?: number;
9
+ /** Show a dot instead of a number (with or without `count`). */
10
+ dot?: boolean;
11
+ /** Keep showing the badge when `count` is 0. */
12
+ showZero?: boolean;
13
+ /** Corner: top-end (default), top-start, bottom-end or bottom-start. */
14
+ placement?: 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start';
15
+ /** Screen reader description; `{count}` is filled in (default "{count} new", or "New" for a dot). */
16
+ label?: string;
17
+ /** Pulse to draw attention (off when the user prefers reduced motion). */
18
+ pulse?: boolean;
19
+ /** Announce count changes politely to screen readers. */
20
+ live?: boolean;
21
+ /** Badge size. */
22
+ size?: 'sm' | 'md' | 'lg';
23
+ /** Colour role. Inherited by descendants unless they set their own. */
24
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
25
+ /** Surface style override for this component (and its descendants). */
26
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
27
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
28
+ density?: 'compact' | 'comfortable' | 'spacious';
29
+ motion?: 'none' | 'reduced' | 'full';
30
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
31
+ children?: React.ReactNode;
32
+ }
33
+ export declare const Indicator: React.ForwardRefExoticComponent<IndicatorProps & {
34
+ children?: React.ReactNode;
35
+ } & React.RefAttributes<PmIndicator>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const Indicator = /* @__PURE__ */ createComponent('pm-indicator', {}, () => import('@prismora/elements/indicator'));
@@ -0,0 +1,31 @@
1
+ import type * as React from 'react';
2
+ import type { PmInlineEdit } from '@prismora/elements/inline-edit';
3
+ /** Inline edit: text that turns into an input in place, for renaming a project, a title or a table cell. — `<pm-inline-edit>` */
4
+ export interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** The current text. */
6
+ value?: string;
7
+ /** Accessible name, e.g. "Project name" (required for accessibility). */
8
+ label?: string;
9
+ /** Shown while the value is empty. */
10
+ placeholder?: string;
11
+ /** Refuse to save an empty value. */
12
+ required?: boolean;
13
+ /** Not editable. */
14
+ disabled?: boolean;
15
+ /** Longest allowed value, in characters. */
16
+ maxlength?: number;
17
+ /** Colour role. Inherited by descendants unless they set their own. */
18
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
19
+ /** Surface style override for this component (and its descendants). */
20
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
21
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
22
+ density?: 'compact' | 'comfortable' | 'spacious';
23
+ motion?: 'none' | 'reduced' | 'full';
24
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
25
+ onPmChange?: (event: CustomEvent) => void;
26
+ onPmCancel?: (event: CustomEvent) => void;
27
+ children?: React.ReactNode;
28
+ }
29
+ export declare const InlineEdit: React.ForwardRefExoticComponent<InlineEditProps & {
30
+ children?: React.ReactNode;
31
+ } & React.RefAttributes<PmInlineEdit>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const InlineEdit = /* @__PURE__ */ createComponent('pm-inline-edit', { onPmChange: 'pm-change', onPmCancel: 'pm-cancel' }, () => import('@prismora/elements/inline-edit'));
@@ -0,0 +1,74 @@
1
+ import type * as React from 'react';
2
+ import type { PmInput } from '@prismora/elements/input';
3
+ /** Single-line text field for text, email, numbers, passwords, search and more. — `<pm-input>` */
4
+ export interface InputProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Input mask: `9` a digit, `a` a letter, `*` either; other characters are typed for the user. E.g. `mask="(999) 999-9999"`, `mask="99/99"`, `mask="aa-9999"`. */
6
+ mask?: string;
7
+ /** Show a strength bar under a password field (length and character variety; a guide, not a security check). */
8
+ strength?: boolean;
9
+ /** Registered icon name shown before the content (see `registerIcons`); a `start` slot overrides it. */
10
+ iconStart?: string;
11
+ /** Registered icon name shown after the content (see `registerIcons`); an `end` slot overrides it. */
12
+ iconEnd?: string;
13
+ /** Native type of the underlying control. */
14
+ type?: string;
15
+ /** Hint text shown while empty (not a replacement for `label`). */
16
+ placeholder?: string;
17
+ /** Browser autofill hint (the HTML `autocomplete` token). */
18
+ autocomplete?: string;
19
+ /** Virtual keyboard to show on touch devices (the HTML `inputmode`). */
20
+ inputmode?: string;
21
+ /** Regular expression the value must match. */
22
+ pattern?: string;
23
+ /** Minimum number of characters. */
24
+ minlength?: number;
25
+ /** Maximum number of characters. */
26
+ maxlength?: number;
27
+ /** Lowest allowed value. */
28
+ min?: string;
29
+ /** Highest allowed value. */
30
+ max?: string;
31
+ /** Increment between allowed values. */
32
+ step?: string;
33
+ /** Shows a clear (✕) button when there is a value. */
34
+ clearable?: boolean;
35
+ /** For `type="password"`: a button to show/hide the password. */
36
+ passwordToggle?: boolean;
37
+ /** Shows "n / maxlength" (or "n" without maxlength) under the input. */
38
+ showCount?: boolean;
39
+ /** Form field name: the value is submitted under it. */
40
+ name?: string;
41
+ /** Current value (submitted with the form). */
42
+ value?: string;
43
+ /** Visible label (required for accessibility; use `hide-label` to visually hide it). */
44
+ label?: string;
45
+ /** Help text under the field, linked to it for screen readers. */
46
+ hint?: string;
47
+ /** Custom error message. Setting it marks the control invalid. */
48
+ error?: string;
49
+ /** Control size. */
50
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
51
+ /** The form cannot be submitted until this has a value. */
52
+ required?: boolean;
53
+ /** Not interactive and not submitted. */
54
+ disabled?: boolean;
55
+ /** Focusable and submitted, but not editable. */
56
+ readonly?: boolean;
57
+ /** Hide the label visually; it stays the accessible name. */
58
+ hideLabel?: boolean;
59
+ /** Colour role. Inherited by descendants unless they set their own. */
60
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
61
+ /** Surface style override for this component (and its descendants). */
62
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
63
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
64
+ density?: 'compact' | 'comfortable' | 'spacious';
65
+ motion?: 'none' | 'reduced' | 'full';
66
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
67
+ onPmClear?: (event: CustomEvent) => void;
68
+ onPmInput?: (event: CustomEvent) => void;
69
+ onPmChange?: (event: CustomEvent) => void;
70
+ children?: React.ReactNode;
71
+ }
72
+ export declare const Input: React.ForwardRefExoticComponent<InputProps & {
73
+ children?: React.ReactNode;
74
+ } & React.RefAttributes<PmInput>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const Input = /* @__PURE__ */ createComponent('pm-input', { onPmClear: 'pm-clear', onPmInput: 'pm-input', onPmChange: 'pm-change' }, () => import('@prismora/elements/input'));
@@ -0,0 +1,19 @@
1
+ import type * as React from 'react';
2
+ import type { PmKbd } from '@prismora/elements/kbd';
3
+ /** Keyboard key or shortcut. — `<pm-kbd>` */
4
+ export interface KbdProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Size: xs, sm, md (default), lg or xl. */
6
+ size?: 'sm' | 'md' | 'lg';
7
+ /** Colour role. Inherited by descendants unless they set their own. */
8
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
9
+ /** Surface style override for this component (and its descendants). */
10
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
11
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
12
+ density?: 'compact' | 'comfortable' | 'spacious';
13
+ motion?: 'none' | 'reduced' | 'full';
14
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
15
+ children?: React.ReactNode;
16
+ }
17
+ export declare const Kbd: React.ForwardRefExoticComponent<KbdProps & {
18
+ children?: React.ReactNode;
19
+ } & React.RefAttributes<PmKbd>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const Kbd = /* @__PURE__ */ createComponent('pm-kbd', {}, () => import('@prismora/elements/kbd'));
@@ -0,0 +1,23 @@
1
+ import type * as React from 'react';
2
+ import type { PmList } from '@prismora/elements/list';
3
+ /** List of rows (settings, inboxes, contacts, search results). Rows have leading media, a heading, a description and — `<pm-list>` */
4
+ export interface ListProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Lines between rows. */
6
+ divided?: boolean;
7
+ /** Border around the list. */
8
+ bordered?: boolean;
9
+ /** Accessible name of the list. */
10
+ label?: string;
11
+ /** Colour role. Inherited by descendants unless they set their own. */
12
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
13
+ /** Surface style override for this component (and its descendants). */
14
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
15
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
16
+ density?: 'compact' | 'comfortable' | 'spacious';
17
+ motion?: 'none' | 'reduced' | 'full';
18
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
19
+ children?: React.ReactNode;
20
+ }
21
+ export declare const List: React.ForwardRefExoticComponent<ListProps & {
22
+ children?: React.ReactNode;
23
+ } & React.RefAttributes<PmList>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const List = /* @__PURE__ */ createComponent('pm-list', {}, () => import('@prismora/elements/list'));
@@ -0,0 +1,39 @@
1
+ import type * as React from 'react';
2
+ import type { PmListItem } from '@prismora/elements/list';
3
+ /** One list row. With `href` the row is a link; with `interactive` it is a button that fires `pm-select`. — `<pm-list-item>` */
4
+ export interface ListItemProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Registered icon name shown before the content (see `registerIcons`); a `start` slot overrides it. */
6
+ iconStart?: string;
7
+ /** Registered icon name shown after the content (see `registerIcons`); an `end` slot overrides it. */
8
+ iconEnd?: string;
9
+ /** Title text. */
10
+ heading?: string;
11
+ /** Supporting text under the title. */
12
+ description?: string;
13
+ /** Make the whole row a link. */
14
+ href?: string;
15
+ /** Current value. */
16
+ value?: string;
17
+ /** Make the whole row a button. */
18
+ interactive?: boolean;
19
+ /** Whether this item is selected. */
20
+ selected?: boolean;
21
+ /** Not interactive (and not submitted, for form controls). */
22
+ disabled?: boolean;
23
+ /** Which swipe actions are showing: `start`, `end`, or none. */
24
+ open?: 'start' | 'end';
25
+ /** Colour role. Inherited by descendants unless they set their own. */
26
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
27
+ /** Surface style override for this component (and its descendants). */
28
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
29
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
30
+ density?: 'compact' | 'comfortable' | 'spacious';
31
+ motion?: 'none' | 'reduced' | 'full';
32
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
33
+ onPmSwipe?: (event: CustomEvent) => void;
34
+ onPmSelect?: (event: CustomEvent) => void;
35
+ children?: React.ReactNode;
36
+ }
37
+ export declare const ListItem: React.ForwardRefExoticComponent<ListItemProps & {
38
+ children?: React.ReactNode;
39
+ } & React.RefAttributes<PmListItem>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const ListItem = /* @__PURE__ */ createComponent('pm-list-item', { onPmSwipe: 'pm-swipe', onPmSelect: 'pm-select' }, () => import('@prismora/elements/list'));
@@ -0,0 +1,12 @@
1
+ import type * as React from 'react';
2
+ import type { PmMenu } from '@prismora/elements/menu';
3
+ /** Menu (role="menu") opened from a button with `popovertarget`. Arrow keys, Home/End and typeahead. — `<pm-menu>` */
4
+ export interface MenuProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Native mobile pattern on phones: opens as a swipeable bottom sheet (inherits from ancestors such as `<html mobile>`; `mobile="false"` opts out). */
6
+ mobile?: boolean;
7
+ onPmSelect?: (event: CustomEvent) => void;
8
+ children?: React.ReactNode;
9
+ }
10
+ export declare const Menu: React.ForwardRefExoticComponent<MenuProps & {
11
+ children?: React.ReactNode;
12
+ } & React.RefAttributes<PmMenu>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const Menu = /* @__PURE__ */ createComponent('pm-menu', { onPmSelect: 'pm-select' }, () => import('@prismora/elements/menu'));
@@ -0,0 +1,11 @@
1
+ import type * as React from 'react';
2
+ import type { PmMenubar } from '@prismora/elements/menubar';
3
+ /** Menu bar (role="menubar"): a row of buttons that each open a `<pm-menu>`, as in desktop applications. — `<pm-menubar>` */
4
+ export interface MenubarProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Accessible name of the bar. */
6
+ label?: string;
7
+ children?: React.ReactNode;
8
+ }
9
+ export declare const Menubar: React.ForwardRefExoticComponent<MenubarProps & {
10
+ children?: React.ReactNode;
11
+ } & React.RefAttributes<PmMenubar>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const Menubar = /* @__PURE__ */ createComponent('pm-menubar', {}, () => import('@prismora/elements/menubar'));
@@ -0,0 +1,39 @@
1
+ import type * as React from 'react';
2
+ import type { PmMeter } from '@prismora/elements/meter';
3
+ /** Meter: a measurement within a known range, such as storage used, a score or password strength. For the progress — `<pm-meter>` */
4
+ export interface MeterProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Current value. */
6
+ value?: number;
7
+ /** Lowest allowed value. */
8
+ min?: number;
9
+ /** Highest allowed value. */
10
+ max?: number;
11
+ /** Upper end of the low region. */
12
+ low?: number;
13
+ /** Lower end of the high region. */
14
+ high?: number;
15
+ /** The best value; decides which regions are good. */
16
+ optimum?: number;
17
+ /** Accessible name (and visible label where the component shows one). */
18
+ label?: string;
19
+ /** Text for the value, shown and announced (e.g. "72 GB of 100 GB", "Strong"). */
20
+ valueText?: string;
21
+ /** Size: xs, sm, md (default), lg or xl. */
22
+ size?: 'sm' | 'md' | 'lg';
23
+ /** Split the bar into this many equal steps. */
24
+ segments?: number;
25
+ /** Hide the value text beside the label (it is still announced). */
26
+ hideValue?: boolean;
27
+ /** Colour role. Inherited by descendants unless they set their own. */
28
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
29
+ /** Surface style override for this component (and its descendants). */
30
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
31
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
32
+ density?: 'compact' | 'comfortable' | 'spacious';
33
+ motion?: 'none' | 'reduced' | 'full';
34
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
35
+ children?: React.ReactNode;
36
+ }
37
+ export declare const Meter: React.ForwardRefExoticComponent<MeterProps & {
38
+ children?: React.ReactNode;
39
+ } & React.RefAttributes<PmMeter>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const Meter = /* @__PURE__ */ createComponent('pm-meter', {}, () => import('@prismora/elements/meter'));
@@ -0,0 +1,27 @@
1
+ import type * as React from 'react';
2
+ import type { PmNav } from '@prismora/elements/nav';
3
+ /** App sidebar navigation: a `<nav>` landmark with labelled groups, icons, badges, collapsible sub-menus and a — `<pm-nav>` */
4
+ export interface NavProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Native mobile patterns on phones (inherits from ancestors; `mobile="false"` opts out). */
6
+ mobile?: string;
7
+ /** Accessible name of the navigation landmark. */
8
+ label?: string;
9
+ /** Show icons only (labels become tooltips and accessible names). */
10
+ collapsed?: boolean;
11
+ /** Mark the item matching `location.pathname` as current. */
12
+ autoCurrent?: boolean;
13
+ /** Phone layout when native mobile is on: bottom tab `bar` (default), `sidebar`, or `none`. */
14
+ mobileVariant?: 'bar' | 'sidebar' | 'none';
15
+ /** Colour role. Inherited by descendants unless they set their own. */
16
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
17
+ /** Surface style override for this component (and its descendants). */
18
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
19
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
20
+ density?: 'compact' | 'comfortable' | 'spacious';
21
+ motion?: 'none' | 'reduced' | 'full';
22
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
23
+ children?: React.ReactNode;
24
+ }
25
+ export declare const Nav: React.ForwardRefExoticComponent<NavProps & {
26
+ children?: React.ReactNode;
27
+ } & React.RefAttributes<PmNav>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const Nav = /* @__PURE__ */ createComponent('pm-nav', {}, () => import('@prismora/elements/nav'));
@@ -0,0 +1,19 @@
1
+ import type * as React from 'react';
2
+ import type { PmNavGroup } from '@prismora/elements/nav';
3
+ /** A labelled section of a `pm-nav`. — `<pm-nav-group>` */
4
+ export interface NavGroupProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Accessible name (and visible label where the component shows one). */
6
+ label?: string;
7
+ /** Colour role. Inherited by descendants unless they set their own. */
8
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
9
+ /** Surface style override for this component (and its descendants). */
10
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
11
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
12
+ density?: 'compact' | 'comfortable' | 'spacious';
13
+ motion?: 'none' | 'reduced' | 'full';
14
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
15
+ children?: React.ReactNode;
16
+ }
17
+ export declare const NavGroup: React.ForwardRefExoticComponent<NavGroupProps & {
18
+ children?: React.ReactNode;
19
+ } & React.RefAttributes<PmNavGroup>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const NavGroup = /* @__PURE__ */ createComponent('pm-nav-group', {}, () => import('@prismora/elements/nav'));
@@ -0,0 +1,38 @@
1
+ import type * as React from 'react';
2
+ import type { PmNavItem } from '@prismora/elements/nav';
3
+ /** Navigation link, or a collapsible parent when it contains `pm-nav-item` children. — `<pm-nav-item>` */
4
+ export interface NavItemProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Registered icon name (see `registerIcons`); an `icon` slot overrides it. */
6
+ icon?: string;
7
+ /** Link target: renders a link instead of a button. */
8
+ href?: string;
9
+ /** Accessible name (and visible label where the component shows one). */
10
+ label?: string;
11
+ /** This item is the current page (aria-current="page"). */
12
+ current?: boolean;
13
+ /** Parent items: show children. Opens automatically when a child is current. */
14
+ expanded?: boolean;
15
+ /** Not interactive (and not submitted, for form controls). */
16
+ disabled?: boolean;
17
+ /** Count shown on the item (unread, pending); hidden at 0. */
18
+ count?: number;
19
+ /** Highest count shown before "+" (default 99). */
20
+ max?: number;
21
+ /** What the count means for screen readers; `{count}` is filled in (default: just the number). */
22
+ countLabel?: string;
23
+ /** Show a dot ("something new") instead of a number. */
24
+ dot?: boolean;
25
+ /** Colour role. Inherited by descendants unless they set their own. */
26
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
27
+ /** Surface style override for this component (and its descendants). */
28
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
29
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
30
+ density?: 'compact' | 'comfortable' | 'spacious';
31
+ motion?: 'none' | 'reduced' | 'full';
32
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
33
+ onPmToggle?: (event: CustomEvent) => void;
34
+ children?: React.ReactNode;
35
+ }
36
+ export declare const NavItem: React.ForwardRefExoticComponent<NavItemProps & {
37
+ children?: React.ReactNode;
38
+ } & React.RefAttributes<PmNavItem>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const NavItem = /* @__PURE__ */ createComponent('pm-nav-item', { onPmToggle: 'pm-toggle' }, () => import('@prismora/elements/nav'));
@@ -0,0 +1,49 @@
1
+ import type * as React from 'react';
2
+ import type { PmNumberInput } from '@prismora/elements/number-input';
3
+ /** Number input with − / + steppers. Arrow keys step, Page Up/Down step ×10; min/max/step are validated natively. — `<pm-number-input>` */
4
+ export interface NumberInputProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Lowest allowed value. */
6
+ min?: number;
7
+ /** Highest allowed value. */
8
+ max?: number;
9
+ /** Increment between allowed values. */
10
+ step?: number;
11
+ /** Hint text shown while empty (not a replacement for `label`). */
12
+ placeholder?: string;
13
+ /** Hide the − / + buttons. */
14
+ hideButtons?: boolean;
15
+ /** Form field name: the value is submitted under it. */
16
+ name?: string;
17
+ /** Current value (submitted with the form). */
18
+ value?: string;
19
+ /** Visible label (required for accessibility; use `hide-label` to visually hide it). */
20
+ label?: string;
21
+ /** Help text under the field, linked to it for screen readers. */
22
+ hint?: string;
23
+ /** Custom error message. Setting it marks the control invalid. */
24
+ error?: string;
25
+ /** Control size. */
26
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
27
+ /** The form cannot be submitted until this has a value. */
28
+ required?: boolean;
29
+ /** Not interactive and not submitted. */
30
+ disabled?: boolean;
31
+ /** Focusable and submitted, but not editable. */
32
+ readonly?: boolean;
33
+ /** Hide the label visually; it stays the accessible name. */
34
+ hideLabel?: boolean;
35
+ /** Colour role. Inherited by descendants unless they set their own. */
36
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
37
+ /** Surface style override for this component (and its descendants). */
38
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
39
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
40
+ density?: 'compact' | 'comfortable' | 'spacious';
41
+ motion?: 'none' | 'reduced' | 'full';
42
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
43
+ onPmInput?: (event: CustomEvent) => void;
44
+ onPmChange?: (event: CustomEvent) => void;
45
+ children?: React.ReactNode;
46
+ }
47
+ export declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & {
48
+ children?: React.ReactNode;
49
+ } & React.RefAttributes<PmNumberInput>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const NumberInput = /* @__PURE__ */ createComponent('pm-number-input', { onPmInput: 'pm-input', onPmChange: 'pm-change' }, () => import('@prismora/elements/number-input'));
@@ -0,0 +1,40 @@
1
+ import type * as React from 'react';
2
+ import type { PmPagination } from '@prismora/elements/pagination';
3
+ /** Pagination. Give `pages`, or `total` items with `page-size`. Buttons by default; links with `href-template`. — `<pm-pagination>` */
4
+ export interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Current page (1-based). */
6
+ page?: number;
7
+ /** Number of pages (or use `total` + `page-size`). */
8
+ pages?: number;
9
+ /** Total number of items. */
10
+ total?: number;
11
+ /** Rows per page, used with `total` to count pages. */
12
+ pageSize?: number;
13
+ /** Pages shown either side of the current one. */
14
+ siblings?: number;
15
+ /** Pages always shown at the start and end. */
16
+ boundaries?: number;
17
+ /** `simple`: Previous · Page x of y · Next. */
18
+ variant?: 'full' | 'simple';
19
+ /** Render links, e.g. "?page={page}". */
20
+ hrefTemplate?: string;
21
+ /** Accessible name (and visible label where the component shows one). */
22
+ label?: string;
23
+ /** Every page control is disabled (e.g. while a page loads). */
24
+ disabled?: boolean;
25
+ /** Control size. */
26
+ size?: 'sm' | 'md' | 'lg';
27
+ /** Colour role. Inherited by descendants unless they set their own. */
28
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
29
+ /** Surface style override for this component (and its descendants). */
30
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
31
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
32
+ density?: 'compact' | 'comfortable' | 'spacious';
33
+ motion?: 'none' | 'reduced' | 'full';
34
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
35
+ onPmChange?: (event: CustomEvent) => void;
36
+ children?: React.ReactNode;
37
+ }
38
+ export declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & {
39
+ children?: React.ReactNode;
40
+ } & React.RefAttributes<PmPagination>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const Pagination = /* @__PURE__ */ createComponent('pm-pagination', { onPmChange: 'pm-change' }, () => import('@prismora/elements/pagination'));
@@ -0,0 +1,48 @@
1
+ import type * as React from 'react';
2
+ import type { PmPinInput } from '@prismora/elements/pin-input';
3
+ /** PIN / one-time code input: one box per character, paste-aware, autofills SMS codes (`autocomplete="one-time-code"`). — `<pm-pin-input>` */
4
+ export interface PinInputProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Number of characters. */
6
+ length?: number;
7
+ /** `numeric` (default) or `alphanumeric`. */
8
+ type?: 'numeric' | 'alphanumeric';
9
+ /** Hide characters like a password. */
10
+ mask?: boolean;
11
+ /** Visual separator after this many boxes (e.g. 3 → "123-456"). */
12
+ separator?: number;
13
+ /** Form field name: the value is submitted under it. */
14
+ name?: string;
15
+ /** Current value (submitted with the form). */
16
+ value?: string;
17
+ /** Visible label (required for accessibility; use `hide-label` to visually hide it). */
18
+ label?: string;
19
+ /** Help text under the field, linked to it for screen readers. */
20
+ hint?: string;
21
+ /** Custom error message. Setting it marks the control invalid. */
22
+ error?: string;
23
+ /** Control size. */
24
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
25
+ /** The form cannot be submitted until this has a value. */
26
+ required?: boolean;
27
+ /** Not interactive and not submitted. */
28
+ disabled?: boolean;
29
+ /** Focusable and submitted, but not editable. */
30
+ readonly?: boolean;
31
+ /** Hide the label visually; it stays the accessible name. */
32
+ hideLabel?: boolean;
33
+ /** Colour role. Inherited by descendants unless they set their own. */
34
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
35
+ /** Surface style override for this component (and its descendants). */
36
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
37
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
38
+ density?: 'compact' | 'comfortable' | 'spacious';
39
+ motion?: 'none' | 'reduced' | 'full';
40
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
41
+ onPmComplete?: (event: CustomEvent) => void;
42
+ onPmInput?: (event: CustomEvent) => void;
43
+ onPmChange?: (event: CustomEvent) => void;
44
+ children?: React.ReactNode;
45
+ }
46
+ export declare const PinInput: React.ForwardRefExoticComponent<PinInputProps & {
47
+ children?: React.ReactNode;
48
+ } & React.RefAttributes<PmPinInput>>;
@@ -0,0 +1,4 @@
1
+ // Generated by tools/codegen-wrappers.ts from components.json — do not edit.
2
+ 'use client';
3
+ import { createComponent } from '../create-component.js';
4
+ export const PinInput = /* @__PURE__ */ createComponent('pm-pin-input', { onPmComplete: 'pm-complete', onPmInput: 'pm-input', onPmChange: 'pm-change' }, () => import('@prismora/elements/pin-input'));