@prismora/react 0.0.0-stage → 0.1.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 (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,17 @@
1
+ import type * as React from 'react';
2
+ import type { PmPopover } from '@prismora/elements/popover';
3
+ /** Non-modal popover panel. Trigger with native `popovertarget="id"` on any button. — `<pm-popover>` */
4
+ export interface PopoverProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** How it opens: by its `popovertarget` button (default), or on hover and focus of the `for` element. */
6
+ trigger?: 'click' | 'hover';
7
+ /** id of the element that opens a hover card. */
8
+ for?: string;
9
+ /** Side of the trigger it opens on (default bottom); flips when there is no room. */
10
+ placement?: 'bottom' | 'top' | 'start' | 'end';
11
+ /** Light-dismiss behaviour (default auto). */
12
+ popover?: 'auto' | 'manual';
13
+ children?: React.ReactNode;
14
+ }
15
+ export declare const Popover: React.ForwardRefExoticComponent<PopoverProps & {
16
+ children?: React.ReactNode;
17
+ } & React.RefAttributes<PmPopover>>;
@@ -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 Popover = /* @__PURE__ */ createComponent('pm-popover', {}, () => import('@prismora/elements/popover'));
@@ -0,0 +1,31 @@
1
+ import type * as React from 'react';
2
+ import type { PmProgress } from '@prismora/elements/progress';
3
+ /** Progress bar or ring (`variant="circular"`); determinate when `value` is set, indeterminate otherwise. — `<pm-progress>` */
4
+ export interface ProgressProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Current value. */
6
+ value?: number;
7
+ /** Highest allowed value. */
8
+ max?: number;
9
+ /** Visible label and accessible name. */
10
+ label?: string;
11
+ /** Size: xs, sm, md (default), lg or xl. */
12
+ size?: 'sm' | 'md' | 'lg';
13
+ /** `linear` (default) or `circular`. */
14
+ variant?: 'linear' | 'circular';
15
+ /** Keep the label as accessible name only. */
16
+ hideLabel?: boolean;
17
+ /** Show the percentage next to the label. */
18
+ showValue?: boolean;
19
+ /** Colour role. Inherited by descendants unless they set their own. */
20
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
21
+ /** Surface style override for this component (and its descendants). */
22
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
23
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
24
+ density?: 'compact' | 'comfortable' | 'spacious';
25
+ motion?: 'none' | 'reduced' | 'full';
26
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
27
+ children?: React.ReactNode;
28
+ }
29
+ export declare const Progress: React.ForwardRefExoticComponent<ProgressProps & {
30
+ children?: React.ReactNode;
31
+ } & React.RefAttributes<PmProgress>>;
@@ -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 Progress = /* @__PURE__ */ createComponent('pm-progress', {}, () => import('@prismora/elements/progress'));
@@ -0,0 +1,26 @@
1
+ import type * as React from 'react';
2
+ import type { PmPullRefresh } from '@prismora/elements/pull-refresh';
3
+ /** Pull down from the top of a list or page to reload it on touch screens, with a spinner while it refreshes. — `<pm-pull-refresh>` */
4
+ export interface PullRefreshProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** A refresh is running (spinner shown). */
6
+ refreshing?: boolean;
7
+ /** Pixels to pull before letting go refreshes. */
8
+ threshold?: number;
9
+ /** Turn pulling off. */
10
+ disabled?: boolean;
11
+ /** Announced while refreshing. */
12
+ label?: string;
13
+ /** Colour role. Inherited by descendants unless they set their own. */
14
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
15
+ /** Surface style override for this component (and its descendants). */
16
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
17
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
18
+ density?: 'compact' | 'comfortable' | 'spacious';
19
+ motion?: 'none' | 'reduced' | 'full';
20
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
21
+ onPmRefresh?: (event: CustomEvent) => void;
22
+ children?: React.ReactNode;
23
+ }
24
+ export declare const PullRefresh: React.ForwardRefExoticComponent<PullRefreshProps & {
25
+ children?: React.ReactNode;
26
+ } & React.RefAttributes<PmPullRefresh>>;
@@ -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 PullRefresh = /* @__PURE__ */ createComponent('pm-pull-refresh', { onPmRefresh: 'pm-refresh' }, () => import('@prismora/elements/pull-refresh'));
@@ -0,0 +1,27 @@
1
+ import type * as React from 'react';
2
+ import type { PmQrCode } from '@prismora/elements/qr-code';
3
+ /** QR code for a link or short text, drawn as SVG without any dependency. — `<pm-qr-code>` */
4
+ export interface QrCodeProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** The link or text to encode. */
6
+ value?: string;
7
+ /** Accessible name: say where the code leads ("Open the booking page"). */
8
+ label?: string;
9
+ /** Width and height in pixels (default 160). */
10
+ size?: number;
11
+ /** How much damage the code survives: L (7%), M (15%, default), Q (25%) or H (30%). Higher levels hold less text. */
12
+ errorCorrection?: unknown;
13
+ /** Quiet zone around the code, in modules (default 4, the standard's minimum). */
14
+ margin?: number;
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 QrCode: React.ForwardRefExoticComponent<QrCodeProps & {
26
+ children?: React.ReactNode;
27
+ } & React.RefAttributes<PmQrCode>>;
@@ -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 QrCode = /* @__PURE__ */ createComponent('pm-qr-code', {}, () => import('@prismora/elements/qr-code'));
@@ -0,0 +1,15 @@
1
+ import type * as React from 'react';
2
+ import type { PmRadio } from '@prismora/elements/radio-group';
3
+ /** Choice declaration for `pm-radio-group` (renders nothing itself). — `<pm-radio>` */
4
+ export interface RadioProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Value submitted when chosen. */
6
+ value?: string;
7
+ /** Second line under the label (card variant). */
8
+ description?: string;
9
+ /** Disable this choice. */
10
+ disabled?: boolean;
11
+ children?: React.ReactNode;
12
+ }
13
+ export declare const Radio: React.ForwardRefExoticComponent<RadioProps & {
14
+ children?: React.ReactNode;
15
+ } & React.RefAttributes<PmRadio>>;
@@ -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 Radio = /* @__PURE__ */ createComponent('pm-radio', {}, () => import('@prismora/elements/radio-group'));
@@ -0,0 +1,43 @@
1
+ import type * as React from 'react';
2
+ import type { PmRadioGroup } from '@prismora/elements/radio-group';
3
+ /** Radio group: choose one option from a short list. — `<pm-radio-group>` */
4
+ export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Layout and arrow-key direction: horizontal or vertical. */
6
+ orientation?: 'vertical' | 'horizontal';
7
+ /** list (default) or card. */
8
+ variant?: 'list' | 'card';
9
+ /** Form field name: the value is submitted under it. */
10
+ name?: string;
11
+ /** Current value (submitted with the form). */
12
+ value?: string;
13
+ /** Visible label (required for accessibility; use `hide-label` to visually hide it). */
14
+ label?: string;
15
+ /** Help text under the field, linked to it for screen readers. */
16
+ hint?: string;
17
+ /** Custom error message. Setting it marks the control invalid. */
18
+ error?: string;
19
+ /** Control size. */
20
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
21
+ /** The form cannot be submitted until this has a value. */
22
+ required?: boolean;
23
+ /** Not interactive and not submitted. */
24
+ disabled?: boolean;
25
+ /** Focusable and submitted, but not editable. */
26
+ readonly?: boolean;
27
+ /** Hide the label visually; it stays the accessible name. */
28
+ hideLabel?: boolean;
29
+ /** Colour role. Inherited by descendants unless they set their own. */
30
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
31
+ /** Surface style override for this component (and its descendants). */
32
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
33
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
34
+ density?: 'compact' | 'comfortable' | 'spacious';
35
+ motion?: 'none' | 'reduced' | 'full';
36
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
37
+ onPmInput?: (event: CustomEvent) => void;
38
+ onPmChange?: (event: CustomEvent) => void;
39
+ children?: React.ReactNode;
40
+ }
41
+ export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & {
42
+ children?: React.ReactNode;
43
+ } & React.RefAttributes<PmRadioGroup>>;
@@ -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 RadioGroup = /* @__PURE__ */ createComponent('pm-radio-group', { onPmInput: 'pm-input', onPmChange: 'pm-change' }, () => import('@prismora/elements/radio-group'));
@@ -0,0 +1,45 @@
1
+ import type * as React from 'react';
2
+ import type { PmRangeSlider } from '@prismora/elements/range-slider';
3
+ /** Two-thumb range slider (price filters, time windows). — `<pm-range-slider>` */
4
+ export interface RangeSliderProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** "low,high". */
6
+ value?: string;
7
+ /** Form field name: the value is submitted under it. */
8
+ name?: string;
9
+ /** Accessible name (and visible label where the component shows one). */
10
+ label?: string;
11
+ /** Help text under the field, linked to it for screen readers. */
12
+ hint?: string;
13
+ /** Lowest allowed value. */
14
+ min?: number;
15
+ /** Highest allowed value. */
16
+ max?: number;
17
+ /** Increment between allowed values. */
18
+ step?: number;
19
+ /** Smallest allowed distance between the thumbs. */
20
+ minGap?: number;
21
+ /** Show the current value next to the control. */
22
+ showValue?: boolean;
23
+ /** Not interactive (and not submitted, for form controls). */
24
+ disabled?: boolean;
25
+ /** Text after values in the output, e.g. "€" or " km". */
26
+ unit?: string;
27
+ /** Custom error message. Setting it marks the field invalid. */
28
+ error?: string;
29
+ /** Thumb and track size. */
30
+ size?: 'sm' | 'md' | 'lg';
31
+ /** Colour role. Inherited by descendants unless they set their own. */
32
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
33
+ /** Surface style override for this component (and its descendants). */
34
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
35
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
36
+ density?: 'compact' | 'comfortable' | 'spacious';
37
+ motion?: 'none' | 'reduced' | 'full';
38
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
39
+ onPmInput?: (event: CustomEvent) => void;
40
+ onPmChange?: (event: CustomEvent) => void;
41
+ children?: React.ReactNode;
42
+ }
43
+ export declare const RangeSlider: React.ForwardRefExoticComponent<RangeSliderProps & {
44
+ children?: React.ReactNode;
45
+ } & React.RefAttributes<PmRangeSlider>>;
@@ -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 RangeSlider = /* @__PURE__ */ createComponent('pm-range-slider', { onPmInput: 'pm-input', onPmChange: 'pm-change' }, () => import('@prismora/elements/range-slider'));
@@ -0,0 +1,40 @@
1
+ import type * as React from 'react';
2
+ import type { PmRating } from '@prismora/elements/rating';
3
+ /** Star rating. Radio-group keyboard behaviour; form-associated; `readonly` for display. — `<pm-rating>` */
4
+ export interface RatingProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Current value. */
6
+ value?: number;
7
+ /** Highest allowed value. */
8
+ max?: number;
9
+ /** Form field name: the value is submitted under it. */
10
+ name?: string;
11
+ /** Accessible name (and visible label where the component shows one). */
12
+ label?: string;
13
+ /** Size: xs, sm, md (default), lg or xl. */
14
+ size?: 'sm' | 'md' | 'lg';
15
+ /** Focusable and submitted, but not editable. */
16
+ readonly?: boolean;
17
+ /** Not interactive (and not submitted, for form controls). */
18
+ disabled?: boolean;
19
+ /** Choosing the current value again clears it. */
20
+ clearable?: boolean;
21
+ /** Help text under the field, linked to it for screen readers. */
22
+ hint?: string;
23
+ /** Custom error message. Setting it marks the field invalid. */
24
+ error?: string;
25
+ /** The form cannot be submitted until a value is chosen. */
26
+ required?: 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
+ onPmChange?: (event: CustomEvent) => void;
36
+ children?: React.ReactNode;
37
+ }
38
+ export declare const Rating: React.ForwardRefExoticComponent<RatingProps & {
39
+ children?: React.ReactNode;
40
+ } & React.RefAttributes<PmRating>>;
@@ -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 Rating = /* @__PURE__ */ createComponent('pm-rating', { onPmChange: 'pm-change' }, () => import('@prismora/elements/rating'));
@@ -0,0 +1,29 @@
1
+ import type * as React from 'react';
2
+ import type { PmRelativeTime } from '@prismora/elements/relative-time';
3
+ /** Relative time ("5 minutes ago", "in 2 days") that keeps itself up to date. Renders a `<time>` with the full date — `<pm-relative-time>` */
4
+ export interface RelativeTimeProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** ISO date/time. */
6
+ datetime?: string;
7
+ /** BCP 47 locale for formatting (default: the page language). */
8
+ locale?: string;
9
+ /** relative (default) or datetime. */
10
+ format?: 'relative' | 'datetime';
11
+ /** "auto" says "yesterday"; "always" says "1 day ago". */
12
+ numeric?: 'auto' | 'always';
13
+ /** Date format of the full timestamp in the tooltip (Intl dateStyle). */
14
+ dateStyle?: 'full' | 'long' | 'medium' | 'short';
15
+ /** Time format of the full timestamp in the tooltip (Intl timeStyle). */
16
+ timeStyle?: 'full' | 'long' | 'medium' | 'short';
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
+ children?: React.ReactNode;
26
+ }
27
+ export declare const RelativeTime: React.ForwardRefExoticComponent<RelativeTimeProps & {
28
+ children?: React.ReactNode;
29
+ } & React.RefAttributes<PmRelativeTime>>;
@@ -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 RelativeTime = /* @__PURE__ */ createComponent('pm-relative-time', {}, () => import('@prismora/elements/relative-time'));
@@ -0,0 +1,40 @@
1
+ import type * as React from 'react';
2
+ import type { PmScheduler } from '@prismora/elements/scheduler';
3
+ /** Scheduler: a week or day calendar with events on an hourly grid (bookings, shifts, meetings). — `<pm-scheduler>` */
4
+ export interface SchedulerProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** The events to show: { id, title, start, end, tone, allDay }. An array, or JSON in the attribute. */
6
+ events?: unknown[];
7
+ /** A day in the period to show, as YYYY-MM-DD (default today). */
8
+ date?: string;
9
+ /** week (default) or day. Narrow containers always show one day. */
10
+ view?: 'week' | 'day';
11
+ /** First hour on the grid, 0 to 23 (default 7). */
12
+ startHour?: number;
13
+ /** Hour the grid ends at, 1 to 24 (default 20). */
14
+ endHour?: number;
15
+ /** First day of the week: 0 Sunday, 1 Monday (default). */
16
+ weekStart?: number;
17
+ /** Accessible name of the calendar. */
18
+ label?: string;
19
+ /** Language for day and month names (default: the page language). */
20
+ locale?: string;
21
+ /** Maximum height of the grid before it scrolls: any CSS length (default 32rem). */
22
+ height?: string;
23
+ /** Leave out Saturday and Sunday in the week view. */
24
+ hideWeekends?: 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
+ onPmEventClick?: (event: CustomEvent) => void;
34
+ onPmSlotClick?: (event: CustomEvent) => void;
35
+ onPmNavigate?: (event: CustomEvent) => void;
36
+ children?: React.ReactNode;
37
+ }
38
+ export declare const Scheduler: React.ForwardRefExoticComponent<SchedulerProps & {
39
+ children?: React.ReactNode;
40
+ } & React.RefAttributes<PmScheduler>>;
@@ -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 Scheduler = /* @__PURE__ */ createComponent('pm-scheduler', { onPmEventClick: 'pm-event-click', onPmSlotClick: 'pm-slot-click', onPmNavigate: 'pm-navigate' }, () => import('@prismora/elements/scheduler'));
@@ -0,0 +1,23 @@
1
+ import type * as React from 'react';
2
+ import type { PmSegment } from '@prismora/elements/segmented';
3
+ /** One option of a segmented control. — `<pm-segment>` */
4
+ export interface SegmentProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Current value. */
6
+ value?: string;
7
+ /** Not interactive (and not submitted, for form controls). */
8
+ disabled?: boolean;
9
+ /** Accessible name for icon-only segments. */
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 Segment: React.ForwardRefExoticComponent<SegmentProps & {
22
+ children?: React.ReactNode;
23
+ } & React.RefAttributes<PmSegment>>;
@@ -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 Segment = /* @__PURE__ */ createComponent('pm-segment', {}, () => import('@prismora/elements/segmented'));
@@ -0,0 +1,36 @@
1
+ import type * as React from 'react';
2
+ import type { PmSegmented } from '@prismora/elements/segmented';
3
+ /** Segmented control: pick one of a few options (view switchers, filters). Radio-group semantics, form-associated. — `<pm-segmented>` */
4
+ export interface SegmentedProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Help text under the field, linked to it for screen readers. */
6
+ hint?: string;
7
+ /** Custom error message. Setting it marks the field invalid. */
8
+ error?: string;
9
+ /** The form cannot be submitted until a value is chosen. */
10
+ required?: boolean;
11
+ /** Current value. */
12
+ value?: string;
13
+ /** Form field name: the value is submitted under it. */
14
+ name?: string;
15
+ /** Accessible name of the group. */
16
+ label?: string;
17
+ /** Size: xs, sm, md (default), lg or xl. */
18
+ size?: 'sm' | 'md' | 'lg';
19
+ /** Stretch to the container width. */
20
+ full?: boolean;
21
+ /** Not interactive (and not submitted, for form controls). */
22
+ disabled?: boolean;
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
+ onPmChange?: (event: CustomEvent) => void;
32
+ children?: React.ReactNode;
33
+ }
34
+ export declare const Segmented: React.ForwardRefExoticComponent<SegmentedProps & {
35
+ children?: React.ReactNode;
36
+ } & React.RefAttributes<PmSegmented>>;
@@ -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 Segmented = /* @__PURE__ */ createComponent('pm-segmented', { onPmChange: 'pm-change' }, () => import('@prismora/elements/segmented'));
@@ -0,0 +1,57 @@
1
+ import type * as React from 'react';
2
+ import type { PmSelect } from '@prismora/elements/select';
3
+ /** Native-backed select for picking one option from a short list, with the platform picker on phones. — `<pm-select>` */
4
+ export interface SelectProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Empty first choice shown until a value is picked (required selects then fail validation until chosen). */
6
+ placeholder?: string;
7
+ /** Browser autofill hint, as on a native select (e.g. "country", "shipping country"). */
8
+ autocomplete?: string;
9
+ /** Choices as data: strings, `{ value, label, disabled }`, or `{ group, options: [...] }`. */
10
+ options?: unknown[];
11
+ /** URL of the options (JSON). */
12
+ src?: string;
13
+ /** Where the list is in the response (dotted path; empty = the response itself). */
14
+ optionsPath?: string;
15
+ /** Item field for the value (default `value`, then `id`). */
16
+ valueKey?: string;
17
+ /** Item field for the label (default `label`, then `name`, then `title`). */
18
+ labelKey?: string;
19
+ /** Item field for the group (`<optgroup>`) label (default `group`). */
20
+ groupKey?: string;
21
+ /** Form field name: the value is submitted under it. */
22
+ name?: string;
23
+ /** Current value (submitted with the form). */
24
+ value?: string;
25
+ /** Visible label (required for accessibility; use `hide-label` to visually hide it). */
26
+ label?: string;
27
+ /** Help text under the field, linked to it for screen readers. */
28
+ hint?: string;
29
+ /** Custom error message. Setting it marks the control invalid. */
30
+ error?: string;
31
+ /** Control size. */
32
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
33
+ /** The form cannot be submitted until this has a value. */
34
+ required?: boolean;
35
+ /** Not interactive and not submitted. */
36
+ disabled?: boolean;
37
+ /** Focusable and submitted, but not editable. */
38
+ readonly?: boolean;
39
+ /** Hide the label visually; it stays the accessible name. */
40
+ hideLabel?: boolean;
41
+ /** Colour role. Inherited by descendants unless they set their own. */
42
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
43
+ /** Surface style override for this component (and its descendants). */
44
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
45
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
46
+ density?: 'compact' | 'comfortable' | 'spacious';
47
+ motion?: 'none' | 'reduced' | 'full';
48
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
49
+ onPmLoad?: (event: CustomEvent) => void;
50
+ onPmLoadError?: (event: CustomEvent) => void;
51
+ onPmInput?: (event: CustomEvent) => void;
52
+ onPmChange?: (event: CustomEvent) => void;
53
+ children?: React.ReactNode;
54
+ }
55
+ export declare const Select: React.ForwardRefExoticComponent<SelectProps & {
56
+ children?: React.ReactNode;
57
+ } & React.RefAttributes<PmSelect>>;
@@ -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 Select = /* @__PURE__ */ createComponent('pm-select', { onPmLoad: 'pm-load', onPmLoadError: 'pm-load-error', onPmInput: 'pm-input', onPmChange: 'pm-change' }, () => import('@prismora/elements/select'));
@@ -0,0 +1,35 @@
1
+ import type * as React from 'react';
2
+ import type { PmShareButton } from '@prismora/elements/share-button';
3
+ /** Share button: opens the device's share sheet (phones, Safari, Edge) and copies the link where there is none. — `<pm-share-button>` */
4
+ export interface ShareButtonProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Address to share (default: this page). */
6
+ url?: string;
7
+ /** Title passed to the share sheet (default: the page title). */
8
+ shareTitle?: string;
9
+ /** Short text passed to the share sheet. */
10
+ text?: string;
11
+ /** Button text (default "Share"). */
12
+ label?: string;
13
+ /** Visual style. */
14
+ variant?: 'solid' | 'soft' | 'outline' | 'ghost';
15
+ /** Size: xs, sm, md (default), lg or xl. */
16
+ size?: 'xs' | 'sm' | 'md' | 'lg';
17
+ /** Show only the icon; the label becomes the accessible name. */
18
+ iconOnly?: boolean;
19
+ /** Not interactive. */
20
+ disabled?: boolean;
21
+ /** Colour role. Inherited by descendants unless they set their own. */
22
+ tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
23
+ /** Surface style override for this component (and its descendants). */
24
+ surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
25
+ radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
26
+ density?: 'compact' | 'comfortable' | 'spacious';
27
+ motion?: 'none' | 'reduced' | 'full';
28
+ elevation?: '0' | '1' | '2' | '3' | '4' | '5';
29
+ onPmShare?: (event: CustomEvent) => void;
30
+ onPmError?: (event: CustomEvent) => void;
31
+ children?: React.ReactNode;
32
+ }
33
+ export declare const ShareButton: React.ForwardRefExoticComponent<ShareButtonProps & {
34
+ children?: React.ReactNode;
35
+ } & React.RefAttributes<PmShareButton>>;
@@ -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 ShareButton = /* @__PURE__ */ createComponent('pm-share-button', { onPmShare: 'pm-share', onPmError: 'pm-error' }, () => import('@prismora/elements/share-button'));
@@ -0,0 +1,36 @@
1
+ import type * as React from 'react';
2
+ import type { PmSignature } from '@prismora/elements/signature';
3
+ /** Signature pad: sign with a finger, pen or mouse. Form-associated; submits a PNG data URL. — `<pm-signature>` */
4
+ export interface SignatureProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
5
+ /** Accessible name (and visible label where the component shows one). */
6
+ label?: string;
7
+ /** Form field name: the value is submitted under it. */
8
+ name?: string;
9
+ /** Help text under the pad. */
10
+ hint?: string;
11
+ /** Custom error message. Setting it marks the field invalid. */
12
+ error?: string;
13
+ /** The form cannot be submitted until something is drawn. */
14
+ required?: boolean;
15
+ /** Not interactive (and not submitted, for form controls). */
16
+ disabled?: boolean;
17
+ /** Height of the drawing area: any CSS length (default 10rem). */
18
+ height?: string;
19
+ /** Stroke thickness in pixels (default 2). */
20
+ lineWidth?: number;
21
+ /** Text of the clear button. */
22
+ clearLabel?: string;
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
+ onPmChange?: (event: CustomEvent) => void;
32
+ children?: React.ReactNode;
33
+ }
34
+ export declare const Signature: React.ForwardRefExoticComponent<SignatureProps & {
35
+ children?: React.ReactNode;
36
+ } & React.RefAttributes<PmSignature>>;
@@ -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 Signature = /* @__PURE__ */ createComponent('pm-signature', { onPmChange: 'pm-change' }, () => import('@prismora/elements/signature'));