@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.
- package/LICENSE +21 -0
- package/README.md +19 -2
- package/dist/components/Accordion.d.ts +19 -0
- package/dist/components/Accordion.js +4 -0
- package/dist/components/AccordionItem.d.ts +24 -0
- package/dist/components/AccordionItem.js +4 -0
- package/dist/components/Alert.d.ts +28 -0
- package/dist/components/Alert.js +4 -0
- package/dist/components/Avatar.d.ts +27 -0
- package/dist/components/Avatar.js +4 -0
- package/dist/components/AvatarGroup.d.ts +23 -0
- package/dist/components/AvatarGroup.js +4 -0
- package/dist/components/BackToTop.d.ts +25 -0
- package/dist/components/BackToTop.js +4 -0
- package/dist/components/Badge.d.ts +23 -0
- package/dist/components/Badge.js +4 -0
- package/dist/components/Banner.d.ts +30 -0
- package/dist/components/Banner.js +4 -0
- package/dist/components/Breadcrumb.d.ts +23 -0
- package/dist/components/Breadcrumb.js +4 -0
- package/dist/components/BreadcrumbItem.d.ts +21 -0
- package/dist/components/BreadcrumbItem.js +4 -0
- package/dist/components/Button.d.ts +49 -0
- package/dist/components/Button.js +4 -0
- package/dist/components/ButtonGroup.d.ts +19 -0
- package/dist/components/ButtonGroup.js +4 -0
- package/dist/components/Calendar.d.ts +34 -0
- package/dist/components/Calendar.js +4 -0
- package/dist/components/Card.d.ts +25 -0
- package/dist/components/Card.js +4 -0
- package/dist/components/Carousel.d.ts +32 -0
- package/dist/components/Carousel.js +4 -0
- package/dist/components/Cascader.d.ts +42 -0
- package/dist/components/Cascader.js +4 -0
- package/dist/components/Chart.d.ts +42 -0
- package/dist/components/Chart.js +4 -0
- package/dist/components/Chat.d.ts +19 -0
- package/dist/components/Chat.js +4 -0
- package/dist/components/ChatMessage.d.ts +31 -0
- package/dist/components/ChatMessage.js +4 -0
- package/dist/components/Checkbox.d.ts +43 -0
- package/dist/components/Checkbox.js +4 -0
- package/dist/components/CheckboxGroup.d.ts +47 -0
- package/dist/components/CheckboxGroup.js +4 -0
- package/dist/components/Choice.d.ts +15 -0
- package/dist/components/Choice.js +4 -0
- package/dist/components/CodeBlock.d.ts +32 -0
- package/dist/components/CodeBlock.js +4 -0
- package/dist/components/ColorPicker.d.ts +49 -0
- package/dist/components/ColorPicker.js +4 -0
- package/dist/components/Combobox.d.ts +73 -0
- package/dist/components/Combobox.js +4 -0
- package/dist/components/Command.d.ts +50 -0
- package/dist/components/Command.js +4 -0
- package/dist/components/CommandItem.d.ts +21 -0
- package/dist/components/CommandItem.js +4 -0
- package/dist/components/Composer.d.ts +34 -0
- package/dist/components/Composer.js +4 -0
- package/dist/components/ContextMenu.d.ts +16 -0
- package/dist/components/ContextMenu.js +4 -0
- package/dist/components/CopyButton.d.ts +35 -0
- package/dist/components/CopyButton.js +4 -0
- package/dist/components/Countdown.d.ts +28 -0
- package/dist/components/Countdown.js +4 -0
- package/dist/components/DataTable.d.ts +90 -0
- package/dist/components/DataTable.js +4 -0
- package/dist/components/DatePicker.d.ts +58 -0
- package/dist/components/DatePicker.js +4 -0
- package/dist/components/DescriptionItem.d.ts +19 -0
- package/dist/components/DescriptionItem.js +4 -0
- package/dist/components/DescriptionList.d.ts +25 -0
- package/dist/components/DescriptionList.js +4 -0
- package/dist/components/Dialog.d.ts +33 -0
- package/dist/components/Dialog.js +4 -0
- package/dist/components/Divider.d.ts +19 -0
- package/dist/components/Divider.js +4 -0
- package/dist/components/Drawer.d.ts +35 -0
- package/dist/components/Drawer.js +4 -0
- package/dist/components/Editor.d.ts +33 -0
- package/dist/components/Editor.js +4 -0
- package/dist/components/EmptyState.d.ts +27 -0
- package/dist/components/EmptyState.js +4 -0
- package/dist/components/FileUpload.d.ts +41 -0
- package/dist/components/FileUpload.js +4 -0
- package/dist/components/Form.d.ts +15 -0
- package/dist/components/Form.js +4 -0
- package/dist/components/FormatNumber.d.ts +31 -0
- package/dist/components/FormatNumber.js +4 -0
- package/dist/components/Icon.d.ts +25 -0
- package/dist/components/Icon.js +4 -0
- package/dist/components/Image.d.ts +39 -0
- package/dist/components/Image.js +4 -0
- package/dist/components/Indicator.d.ts +35 -0
- package/dist/components/Indicator.js +4 -0
- package/dist/components/InlineEdit.d.ts +31 -0
- package/dist/components/InlineEdit.js +4 -0
- package/dist/components/Input.d.ts +74 -0
- package/dist/components/Input.js +4 -0
- package/dist/components/Kbd.d.ts +19 -0
- package/dist/components/Kbd.js +4 -0
- package/dist/components/List.d.ts +23 -0
- package/dist/components/List.js +4 -0
- package/dist/components/ListItem.d.ts +39 -0
- package/dist/components/ListItem.js +4 -0
- package/dist/components/Menu.d.ts +12 -0
- package/dist/components/Menu.js +4 -0
- package/dist/components/Menubar.d.ts +11 -0
- package/dist/components/Menubar.js +4 -0
- package/dist/components/Meter.d.ts +39 -0
- package/dist/components/Meter.js +4 -0
- package/dist/components/Nav.d.ts +27 -0
- package/dist/components/Nav.js +4 -0
- package/dist/components/NavGroup.d.ts +19 -0
- package/dist/components/NavGroup.js +4 -0
- package/dist/components/NavItem.d.ts +38 -0
- package/dist/components/NavItem.js +4 -0
- package/dist/components/NumberInput.d.ts +49 -0
- package/dist/components/NumberInput.js +4 -0
- package/dist/components/Pagination.d.ts +40 -0
- package/dist/components/Pagination.js +4 -0
- package/dist/components/PinInput.d.ts +48 -0
- package/dist/components/PinInput.js +4 -0
- package/dist/components/Popover.d.ts +17 -0
- package/dist/components/Popover.js +4 -0
- package/dist/components/Progress.d.ts +31 -0
- package/dist/components/Progress.js +4 -0
- package/dist/components/PullRefresh.d.ts +26 -0
- package/dist/components/PullRefresh.js +4 -0
- package/dist/components/QrCode.d.ts +27 -0
- package/dist/components/QrCode.js +4 -0
- package/dist/components/Radio.d.ts +15 -0
- package/dist/components/Radio.js +4 -0
- package/dist/components/RadioGroup.d.ts +43 -0
- package/dist/components/RadioGroup.js +4 -0
- package/dist/components/RangeSlider.d.ts +45 -0
- package/dist/components/RangeSlider.js +4 -0
- package/dist/components/Rating.d.ts +40 -0
- package/dist/components/Rating.js +4 -0
- package/dist/components/RelativeTime.d.ts +29 -0
- package/dist/components/RelativeTime.js +4 -0
- package/dist/components/Scheduler.d.ts +40 -0
- package/dist/components/Scheduler.js +4 -0
- package/dist/components/Segment.d.ts +23 -0
- package/dist/components/Segment.js +4 -0
- package/dist/components/Segmented.d.ts +36 -0
- package/dist/components/Segmented.js +4 -0
- package/dist/components/Select.d.ts +57 -0
- package/dist/components/Select.js +4 -0
- package/dist/components/ShareButton.d.ts +35 -0
- package/dist/components/ShareButton.js +4 -0
- package/dist/components/Signature.d.ts +36 -0
- package/dist/components/Signature.js +4 -0
- package/dist/components/Skeleton.d.ts +25 -0
- package/dist/components/Skeleton.js +4 -0
- package/dist/components/Slider.d.ts +53 -0
- package/dist/components/Slider.js +4 -0
- package/dist/components/Sortable.d.ts +14 -0
- package/dist/components/Sortable.js +4 -0
- package/dist/components/Sparkline.d.ts +23 -0
- package/dist/components/Sparkline.js +4 -0
- package/dist/components/Spinner.d.ts +21 -0
- package/dist/components/Spinner.js +4 -0
- package/dist/components/Splitter.d.ts +30 -0
- package/dist/components/Splitter.js +4 -0
- package/dist/components/Stat.d.ts +33 -0
- package/dist/components/Stat.js +4 -0
- package/dist/components/Step.d.ts +27 -0
- package/dist/components/Step.js +4 -0
- package/dist/components/Steps.d.ts +26 -0
- package/dist/components/Steps.js +4 -0
- package/dist/components/Switch.d.ts +43 -0
- package/dist/components/Switch.js +4 -0
- package/dist/components/Tab.d.ts +21 -0
- package/dist/components/Tab.js +4 -0
- package/dist/components/TabPanel.d.ts +9 -0
- package/dist/components/TabPanel.js +4 -0
- package/dist/components/Table.d.ts +43 -0
- package/dist/components/Table.js +4 -0
- package/dist/components/Tabs.d.ts +29 -0
- package/dist/components/Tabs.js +4 -0
- package/dist/components/Tag.d.ts +35 -0
- package/dist/components/Tag.js +4 -0
- package/dist/components/Textarea.d.ts +51 -0
- package/dist/components/Textarea.js +4 -0
- package/dist/components/ThemeSwitch.d.ts +26 -0
- package/dist/components/ThemeSwitch.js +4 -0
- package/dist/components/TimePicker.d.ts +53 -0
- package/dist/components/TimePicker.js +4 -0
- package/dist/components/Timeline.d.ts +19 -0
- package/dist/components/Timeline.js +4 -0
- package/dist/components/TimelineItem.d.ts +25 -0
- package/dist/components/TimelineItem.js +4 -0
- package/dist/components/Toaster.d.ts +17 -0
- package/dist/components/Toaster.js +4 -0
- package/dist/components/Toggle.d.ts +30 -0
- package/dist/components/Toggle.js +4 -0
- package/dist/components/ToggleGroup.d.ts +40 -0
- package/dist/components/ToggleGroup.js +4 -0
- package/dist/components/Toolbar.d.ts +13 -0
- package/dist/components/Toolbar.js +4 -0
- package/dist/components/Tooltip.d.ts +11 -0
- package/dist/components/Tooltip.js +4 -0
- package/dist/components/Tour.d.ts +16 -0
- package/dist/components/Tour.js +4 -0
- package/dist/components/Transfer.d.ts +42 -0
- package/dist/components/Transfer.js +4 -0
- package/dist/components/Tree.d.ts +45 -0
- package/dist/components/Tree.js +4 -0
- package/dist/components/TreeItem.d.ts +38 -0
- package/dist/components/TreeItem.js +4 -0
- package/dist/components/TreeSelect.d.ts +46 -0
- package/dist/components/TreeSelect.js +4 -0
- package/dist/components/VirtualList.d.ts +31 -0
- package/dist/components/VirtualList.js +4 -0
- package/dist/create-component.d.ts +9 -0
- package/dist/create-component.js +51 -0
- package/dist/index.d.ts +113 -0
- package/dist/index.js +109 -0
- package/package.json +41 -4
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmCountdown } from '@prismora/elements/countdown';
|
|
3
|
+
/** Countdown to a date and time (a launch, an offer ending, a session expiring). — `<pm-countdown>` */
|
|
4
|
+
export interface CountdownProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Target time: an ISO date-time ("2027-01-01T00:00:00Z"), or a number of seconds from now ("90"). */
|
|
6
|
+
to?: string;
|
|
7
|
+
/** Accessible name, e.g. "Offer ends in". */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Size: xs, sm, md (default), lg or xl. */
|
|
10
|
+
size?: 'sm' | 'md';
|
|
11
|
+
/** blocks (default: big numbers with labels) or inline (fits in a sentence: "2d 4h 10m 5s"). */
|
|
12
|
+
variant?: 'blocks' | 'inline';
|
|
13
|
+
/** Which units to show, largest first (default "d,h,m,s"). */
|
|
14
|
+
units?: string;
|
|
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
|
+
onPmComplete?: (event: CustomEvent) => void;
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare const Countdown: React.ForwardRefExoticComponent<CountdownProps & {
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
} & React.RefAttributes<PmCountdown>>;
|
|
@@ -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 Countdown = /* @__PURE__ */ createComponent('pm-countdown', { onPmComplete: 'pm-complete' }, () => import('@prismora/elements/countdown'));
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmDataTable } from '@prismora/elements/data-table';
|
|
3
|
+
/** Advanced data table for business apps: search, filters, sorting, frozen columns, selection, grouping, editing — `<pm-data-table>` */
|
|
4
|
+
export interface DataTableProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Column definitions: key, label, type, sorting, filters, pinning, grouping, merging, editing and rendering. */
|
|
6
|
+
columns?: unknown[];
|
|
7
|
+
/** Row objects (or a JSON string). In `manual` mode, the current page from your server. */
|
|
8
|
+
rows?: unknown[];
|
|
9
|
+
/** Accessible name (caption). */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Field that identifies a row (default "id", else its position). */
|
|
12
|
+
rowKey?: string;
|
|
13
|
+
/** Narrow containers (< 36rem): `auto` shows rows as labelled cards; `never` keeps a horizontally scrolling table. */
|
|
14
|
+
stack?: 'auto' | 'never';
|
|
15
|
+
/** Show row checkboxes (see `selection` for single or multiple). */
|
|
16
|
+
selectable?: boolean;
|
|
17
|
+
/** `multiple` (default, checkboxes) or `single` (radio buttons). */
|
|
18
|
+
selection?: 'single' | 'multiple';
|
|
19
|
+
/** Global search text (matches any visible column, raw or formatted). */
|
|
20
|
+
filter?: string;
|
|
21
|
+
/** Rows per page (0 = no paging). */
|
|
22
|
+
pageSize?: number;
|
|
23
|
+
/** Current page, starting at 1. */
|
|
24
|
+
page?: number;
|
|
25
|
+
/** Total rows on the server (with `manual`). */
|
|
26
|
+
total?: number;
|
|
27
|
+
/** Rows are already sorted, filtered and paged by the server: render them and emit events with the query. */
|
|
28
|
+
manual?: boolean;
|
|
29
|
+
/** Show a loading state (and mark the region busy for assistive tech). */
|
|
30
|
+
loading?: boolean;
|
|
31
|
+
/** Shade alternate rows. */
|
|
32
|
+
striped?: boolean;
|
|
33
|
+
/** Text shown when there is nothing to list. */
|
|
34
|
+
emptyText?: string;
|
|
35
|
+
/** Emit pm-row-click and show a pointer on rows. */
|
|
36
|
+
rowClickable?: boolean;
|
|
37
|
+
/** Show a search box in the toolbar. */
|
|
38
|
+
searchable?: boolean;
|
|
39
|
+
/** Show a Columns menu to show, hide and reset columns. */
|
|
40
|
+
columnPicker?: boolean;
|
|
41
|
+
/** Show an Export CSV button. */
|
|
42
|
+
exportable?: boolean;
|
|
43
|
+
/** Per-column actions menu in each header (default on; `column-menu="false"` to hide). */
|
|
44
|
+
columnMenu?: boolean;
|
|
45
|
+
/** Group rows by this column key (collapsible group headers with counts). */
|
|
46
|
+
groupBy?: string;
|
|
47
|
+
/** Add a toggle that shows `renderDetail(row)` under the row. */
|
|
48
|
+
expandable?: boolean;
|
|
49
|
+
/** Row keys pinned to the top (always visible, stay under the header while scrolling). */
|
|
50
|
+
pinnedRows?: string[];
|
|
51
|
+
/** BCP 47 locale for number/date formatting. */
|
|
52
|
+
locale?: string;
|
|
53
|
+
/** Scroll inside the table past this height, e.g. "28rem" (sticky header and footer). */
|
|
54
|
+
maxHeight?: string;
|
|
55
|
+
/** Save the user's view (columns, sort, filters) in localStorage under this key. */
|
|
56
|
+
persist?: string;
|
|
57
|
+
/** Rows-per-page choices shown in the footer, e.g. [10, 25, 50]. */
|
|
58
|
+
pageSizes?: number[];
|
|
59
|
+
/** Server URL for rows; the query is added as parameters (or fills `{placeholders}`). Response: JSON. Implies `manual`. */
|
|
60
|
+
src?: string;
|
|
61
|
+
/** Where the rows are in the response (dotted path; default: the response if it is an array, else `rows`, `data` or `items`). */
|
|
62
|
+
rowsPath?: string;
|
|
63
|
+
/** Where the total row count is in the response (dotted path; default `total`, then `count`). */
|
|
64
|
+
totalPath?: string;
|
|
65
|
+
/** Milliseconds to wait after typing in search or filters before asking the server. */
|
|
66
|
+
debounce?: number;
|
|
67
|
+
/** Colour role. Inherited by descendants unless they set their own. */
|
|
68
|
+
tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
69
|
+
/** Surface style override for this component (and its descendants). */
|
|
70
|
+
surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
|
|
71
|
+
radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
|
|
72
|
+
density?: 'compact' | 'comfortable' | 'spacious';
|
|
73
|
+
motion?: 'none' | 'reduced' | 'full';
|
|
74
|
+
elevation?: '0' | '1' | '2' | '3' | '4' | '5';
|
|
75
|
+
onPmSort?: (event: CustomEvent) => void;
|
|
76
|
+
onPmFilter?: (event: CustomEvent) => void;
|
|
77
|
+
onPmSelectionChange?: (event: CustomEvent) => void;
|
|
78
|
+
onPmPage?: (event: CustomEvent) => void;
|
|
79
|
+
onPmRowClick?: (event: CustomEvent) => void;
|
|
80
|
+
onPmExpand?: (event: CustomEvent) => void;
|
|
81
|
+
onPmCellEdit?: (event: CustomEvent) => void;
|
|
82
|
+
onPmStateChange?: (event: CustomEvent) => void;
|
|
83
|
+
onPmLoad?: (event: CustomEvent) => void;
|
|
84
|
+
onPmLoadError?: (event: CustomEvent) => void;
|
|
85
|
+
onPmEndReached?: (event: CustomEvent) => void;
|
|
86
|
+
children?: React.ReactNode;
|
|
87
|
+
}
|
|
88
|
+
export declare const DataTable: React.ForwardRefExoticComponent<DataTableProps & {
|
|
89
|
+
children?: React.ReactNode;
|
|
90
|
+
} & React.RefAttributes<PmDataTable<import("@prismora/elements/data-table").Row>>>;
|
|
@@ -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 DataTable = /* @__PURE__ */ createComponent('pm-data-table', { onPmSort: 'pm-sort', onPmFilter: 'pm-filter', onPmSelectionChange: 'pm-selection-change', onPmPage: 'pm-page', onPmRowClick: 'pm-row-click', onPmExpand: 'pm-expand', onPmCellEdit: 'pm-cell-edit', onPmStateChange: 'pm-state-change', onPmLoad: 'pm-load', onPmLoadError: 'pm-load-error', onPmEndReached: 'pm-end-reached' }, () => import('@prismora/elements/data-table'));
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmDatePicker } from '@prismora/elements/date-picker';
|
|
3
|
+
/** Date picker: a text field that accepts typed dates (ISO or the locale's format) plus a calendar popup. — `<pm-date-picker>` */
|
|
4
|
+
export interface DatePickerProps 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
|
+
/** Lowest allowed value. */
|
|
8
|
+
min?: string;
|
|
9
|
+
/** Highest allowed value. */
|
|
10
|
+
max?: string;
|
|
11
|
+
/** BCP 47 locale for formatting (default: the page language). */
|
|
12
|
+
locale?: string;
|
|
13
|
+
/** Select a start and end date instead of one date. */
|
|
14
|
+
range?: boolean;
|
|
15
|
+
/** Hint text shown while empty (not a replacement for `label`). */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** Months shown side by side in the popup (1–3). */
|
|
18
|
+
months?: number;
|
|
19
|
+
/** Quick picks beside the calendar: [{ label, value }]. Values are ISO dates or relative tokens (`today`, `-7d`,
|
|
20
|
+
`+1w`, `-3m`, `-1y`, `month-start`, `month-end`, `year-start`, `year-end`), joined with "/" for ranges. */
|
|
21
|
+
presets?: unknown[];
|
|
22
|
+
/** Hide the Today / Clear footer. */
|
|
23
|
+
hideFooter?: boolean;
|
|
24
|
+
/** Form field name: the value is submitted under it. */
|
|
25
|
+
name?: string;
|
|
26
|
+
/** Current value (submitted with the form). */
|
|
27
|
+
value?: string;
|
|
28
|
+
/** Visible label (required for accessibility; use `hide-label` to visually hide it). */
|
|
29
|
+
label?: string;
|
|
30
|
+
/** Help text under the field, linked to it for screen readers. */
|
|
31
|
+
hint?: string;
|
|
32
|
+
/** Custom error message. Setting it marks the control invalid. */
|
|
33
|
+
error?: string;
|
|
34
|
+
/** Control size. */
|
|
35
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
36
|
+
/** The form cannot be submitted until this has a value. */
|
|
37
|
+
required?: boolean;
|
|
38
|
+
/** Not interactive and not submitted. */
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
/** Focusable and submitted, but not editable. */
|
|
41
|
+
readonly?: boolean;
|
|
42
|
+
/** Hide the label visually; it stays the accessible name. */
|
|
43
|
+
hideLabel?: boolean;
|
|
44
|
+
/** Colour role. Inherited by descendants unless they set their own. */
|
|
45
|
+
tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
46
|
+
/** Surface style override for this component (and its descendants). */
|
|
47
|
+
surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
|
|
48
|
+
radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
|
|
49
|
+
density?: 'compact' | 'comfortable' | 'spacious';
|
|
50
|
+
motion?: 'none' | 'reduced' | 'full';
|
|
51
|
+
elevation?: '0' | '1' | '2' | '3' | '4' | '5';
|
|
52
|
+
onPmInput?: (event: CustomEvent) => void;
|
|
53
|
+
onPmChange?: (event: CustomEvent) => void;
|
|
54
|
+
children?: React.ReactNode;
|
|
55
|
+
}
|
|
56
|
+
export declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & {
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
} & React.RefAttributes<PmDatePicker>>;
|
|
@@ -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 DatePicker = /* @__PURE__ */ createComponent('pm-date-picker', { onPmInput: 'pm-input', onPmChange: 'pm-change' }, () => import('@prismora/elements/date-picker'));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmDescriptionItem } from '@prismora/elements/description-list';
|
|
3
|
+
/** One label and value pair in a `<pm-description-list>`. — `<pm-description-item>` */
|
|
4
|
+
export interface DescriptionItemProps 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 DescriptionItem: React.ForwardRefExoticComponent<DescriptionItemProps & {
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
} & React.RefAttributes<PmDescriptionItem>>;
|
|
@@ -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 DescriptionItem = /* @__PURE__ */ createComponent('pm-description-item', {}, () => import('@prismora/elements/description-list'));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmDescriptionList } from '@prismora/elements/description-list';
|
|
3
|
+
/** Description list: label and value pairs for detail views (an order, a profile, an invoice). — `<pm-description-list>` */
|
|
4
|
+
export interface DescriptionListProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** horizontal (default: label beside value) or vertical (label above value). */
|
|
6
|
+
layout?: 'horizontal' | 'vertical';
|
|
7
|
+
/** Number of columns of pairs on wide screens (default 1). */
|
|
8
|
+
columns?: number;
|
|
9
|
+
/** Draw a line between rows. */
|
|
10
|
+
divided?: boolean;
|
|
11
|
+
/** Accessible name for the list. */
|
|
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
|
+
children?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare const DescriptionList: React.ForwardRefExoticComponent<DescriptionListProps & {
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
} & React.RefAttributes<PmDescriptionList>>;
|
|
@@ -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 DescriptionList = /* @__PURE__ */ createComponent('pm-description-list', {}, () => import('@prismora/elements/description-list'));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmDialog } from '@prismora/elements/dialog';
|
|
3
|
+
/** Modal dialog built on native `<dialog>` (focus containment, inert page, Esc, focus return). — `<pm-dialog>` */
|
|
4
|
+
export interface DialogProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Phone layout when native mobile is on: bottom `sheet` (default), `center`, or `fullscreen`. */
|
|
6
|
+
mobile?: string;
|
|
7
|
+
/** Whether it is open. Set to open or close it; changes when the user opens or closes it. */
|
|
8
|
+
open?: boolean;
|
|
9
|
+
/** Title text. */
|
|
10
|
+
heading?: string;
|
|
11
|
+
/** Supporting text under the title. */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Size: xs, sm, md (default), lg or xl. */
|
|
14
|
+
size?: 'sm' | 'md' | 'lg' | 'full';
|
|
15
|
+
/** `any` = click outside or Esc · `closerequest` = Esc only · `none` = only explicit close. */
|
|
16
|
+
dismiss?: 'any' | 'closerequest' | 'none';
|
|
17
|
+
/** Layout on phones when native mobile is on. */
|
|
18
|
+
mobileVariant?: 'sheet' | 'center' | 'fullscreen';
|
|
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
|
+
onPmOpen?: (event: CustomEvent) => void;
|
|
28
|
+
onPmClose?: (event: CustomEvent) => void;
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export declare const Dialog: React.ForwardRefExoticComponent<DialogProps & {
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
} & React.RefAttributes<PmDialog>>;
|
|
@@ -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 Dialog = /* @__PURE__ */ createComponent('pm-dialog', { onPmOpen: 'pm-open', onPmClose: 'pm-close' }, () => import('@prismora/elements/dialog'));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmDivider } from '@prismora/elements/divider';
|
|
3
|
+
/** Divider (separator), optionally labelled. — `<pm-divider>` */
|
|
4
|
+
export interface DividerProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Layout and arrow-key direction: horizontal or vertical. */
|
|
6
|
+
orientation?: 'horizontal' | 'vertical';
|
|
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 Divider: React.ForwardRefExoticComponent<DividerProps & {
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
} & React.RefAttributes<PmDivider>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmDrawer } from '@prismora/elements/drawer';
|
|
3
|
+
/** Side sheet / drawer (a modal dialog anchored to an edge). `side="bottom"` is a bottom sheet with a grab handle — `<pm-drawer>` */
|
|
4
|
+
export interface DrawerProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Edge the drawer slides in from: start, end (default) or bottom (a bottom sheet). */
|
|
6
|
+
placement?: 'start' | 'end' | 'bottom' | 'top';
|
|
7
|
+
/** Phone layout when native mobile is on: bottom `sheet` (default), `center`, or `fullscreen`. */
|
|
8
|
+
mobile?: string;
|
|
9
|
+
/** Whether it is open. Set to open or close it; changes when the user opens or closes it. */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
/** Title text. */
|
|
12
|
+
heading?: string;
|
|
13
|
+
/** Supporting text under the title. */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Size: xs, sm, md (default), lg or xl. */
|
|
16
|
+
size?: 'sm' | 'md' | 'lg' | 'full';
|
|
17
|
+
/** `any` = click outside or Esc · `closerequest` = Esc only · `none` = only explicit close. */
|
|
18
|
+
dismiss?: 'any' | 'closerequest' | 'none';
|
|
19
|
+
/** Layout on phones when native mobile is on. */
|
|
20
|
+
mobileVariant?: 'sheet' | 'center' | 'fullscreen';
|
|
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
|
+
onPmOpen?: (event: CustomEvent) => void;
|
|
30
|
+
onPmClose?: (event: CustomEvent) => void;
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
export declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & {
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
} & React.RefAttributes<PmDrawer>>;
|
|
@@ -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 Drawer = /* @__PURE__ */ createComponent('pm-drawer', { onPmOpen: 'pm-open', onPmClose: 'pm-close' }, () => import('@prismora/elements/drawer'));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmEditor } from '@prismora/elements/editor';
|
|
3
|
+
/** Rich-text editor for short formatted content: comments, descriptions, notes. Form-associated; submits clean HTML. — `<pm-editor>` */
|
|
4
|
+
export interface EditorProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Visible label (required for accessibility). */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Initial HTML. */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** Shown while empty. */
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
/** Help text under the editor. */
|
|
12
|
+
hint?: string;
|
|
13
|
+
/** Custom error message. Setting it marks the field invalid. */
|
|
14
|
+
error?: string;
|
|
15
|
+
/** The form cannot be submitted while the editor is empty. */
|
|
16
|
+
required?: boolean;
|
|
17
|
+
/** Not editable and not submitted. */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Not editable, still submitted. */
|
|
20
|
+
readonly?: boolean;
|
|
21
|
+
/** Tools to show, space-separated, with `|` for a divider: bold italic underline strike h2 h3 bullet number quote code link clear undo redo. */
|
|
22
|
+
toolbar?: string;
|
|
23
|
+
/** Longest allowed text, in characters. */
|
|
24
|
+
maxlength?: number;
|
|
25
|
+
/** Form field name. */
|
|
26
|
+
name?: string;
|
|
27
|
+
onPmInput?: (event: CustomEvent) => void;
|
|
28
|
+
onPmChange?: (event: CustomEvent) => void;
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export declare const Editor: React.ForwardRefExoticComponent<EditorProps & {
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
} & React.RefAttributes<PmEditor>>;
|
|
@@ -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 Editor = /* @__PURE__ */ createComponent('pm-editor', { onPmInput: 'pm-input', onPmChange: 'pm-change' }, () => import('@prismora/elements/editor'));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmEmptyState } from '@prismora/elements/empty-state';
|
|
3
|
+
/** Empty state: what to do when there is nothing to show yet. — `<pm-empty-state>` */
|
|
4
|
+
export interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Registered icon name (see `registerIcons`); an `icon` slot overrides it. */
|
|
6
|
+
icon?: string;
|
|
7
|
+
/** Title text. */
|
|
8
|
+
heading?: string;
|
|
9
|
+
/** Heading level for the document outline (default 2). */
|
|
10
|
+
headingLevel?: number;
|
|
11
|
+
/** Supporting text under the title. */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Dashed outline (drop zones, empty panels). */
|
|
14
|
+
bordered?: boolean;
|
|
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 EmptyState: React.ForwardRefExoticComponent<EmptyStateProps & {
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
} & React.RefAttributes<PmEmptyState>>;
|
|
@@ -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 EmptyState = /* @__PURE__ */ createComponent('pm-empty-state', {}, () => import('@prismora/elements/empty-state'));
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmFileUpload } from '@prismora/elements/file-upload';
|
|
3
|
+
/** File upload: drag-and-drop zone, file picker and paste (Ctrl/⌘+V on the focused zone), with type/size/count — `<pm-file-upload>` */
|
|
4
|
+
export interface FileUploadProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Form field name: the value is submitted under it. */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** Accessible name (and visible label where the component shows one). */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Help text under the field, linked to it for screen readers. */
|
|
10
|
+
hint?: string;
|
|
11
|
+
/** Custom error message (e.g. a server-side rejection). Setting it marks the field invalid. */
|
|
12
|
+
error?: string;
|
|
13
|
+
/** Allowed types, like the native attribute: ".pdf,image/*". */
|
|
14
|
+
accept?: string;
|
|
15
|
+
/** Allow more than one value. */
|
|
16
|
+
multiple?: boolean;
|
|
17
|
+
/** Maximum size per file, in bytes. */
|
|
18
|
+
maxSize?: number;
|
|
19
|
+
/** Most files accepted when `multiple` is set. */
|
|
20
|
+
maxFiles?: number;
|
|
21
|
+
/** Not interactive (and not submitted, for form controls). */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** The form cannot be submitted until this has a value. */
|
|
24
|
+
required?: boolean;
|
|
25
|
+
/** Phones: open the camera directly (`user` front, `environment` back). */
|
|
26
|
+
capture?: 'user' | 'environment';
|
|
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
|
+
onPmReject?: (event: CustomEvent) => void;
|
|
37
|
+
children?: React.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
export declare const FileUpload: React.ForwardRefExoticComponent<FileUploadProps & {
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
} & React.RefAttributes<PmFileUpload>>;
|
|
@@ -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 FileUpload = /* @__PURE__ */ createComponent('pm-file-upload', { onPmChange: 'pm-change', onPmReject: 'pm-reject' }, () => import('@prismora/elements/file-upload'));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmForm } from '@prismora/elements/form';
|
|
3
|
+
/** Form helper around a native `<form>`: validation summary, busy submit button and server errors. — `<pm-form>` */
|
|
4
|
+
export interface FormProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Do not show the error summary; focus the first invalid field instead. */
|
|
6
|
+
'no-summary'?: boolean;
|
|
7
|
+
/** Heading of the error summary (default "Please fix the following"). */
|
|
8
|
+
'summary-title'?: string;
|
|
9
|
+
onPmInvalid?: (event: CustomEvent) => void;
|
|
10
|
+
onPmSubmit?: (event: CustomEvent) => void;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const Form: React.ForwardRefExoticComponent<FormProps & {
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
} & React.RefAttributes<PmForm>>;
|
|
@@ -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 Form = /* @__PURE__ */ createComponent('pm-form', { onPmInvalid: 'pm-invalid', onPmSubmit: 'pm-submit' }, () => import('@prismora/elements/form'));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmFormatNumber } from '@prismora/elements/format-number';
|
|
3
|
+
/** Formatted number: locale-aware decimal, currency, percent or compact ("1.2K") output, with an optional count-up — `<pm-format-number>` */
|
|
4
|
+
export interface FormatNumberProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Current value. */
|
|
6
|
+
value?: number;
|
|
7
|
+
/** decimal (default), currency, percent (0.42 → 42%) or compact (1200 → 1.2K). */
|
|
8
|
+
format?: 'decimal' | 'currency' | 'percent' | 'compact';
|
|
9
|
+
/** ISO currency code for `format="currency"` (default USD). */
|
|
10
|
+
currency?: string;
|
|
11
|
+
/** Fixed number of fraction digits. */
|
|
12
|
+
digits?: number;
|
|
13
|
+
/** BCP 47 locale; defaults to the nearest `lang` attribute, then the browser's. */
|
|
14
|
+
locale?: string;
|
|
15
|
+
/** Count up from zero when first visible, and between values afterwards. */
|
|
16
|
+
countUp?: boolean;
|
|
17
|
+
/** Animation length in ms (default 900). */
|
|
18
|
+
duration?: number;
|
|
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 FormatNumber: React.ForwardRefExoticComponent<FormatNumberProps & {
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
} & React.RefAttributes<PmFormatNumber>>;
|
|
@@ -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 FormatNumber = /* @__PURE__ */ createComponent('pm-format-number', {}, () => import('@prismora/elements/format-number'));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmIcon } from '@prismora/elements/icon';
|
|
3
|
+
/** Icon. Renders a registered stroke icon; decorative unless `label` is set. — `<pm-icon>` */
|
|
4
|
+
export interface IconProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Registered icon name (see `registerIcons`). */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** Accessible name. Omit for decorative icons. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Size: xs, sm, md (default), lg or xl. */
|
|
10
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
/** Stroke width (default `--pm-icon-stroke`, 2). */
|
|
12
|
+
strokeWidth?: number;
|
|
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
|
+
children?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare const Icon: React.ForwardRefExoticComponent<IconProps & {
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
} & React.RefAttributes<PmIcon>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmImage } from '@prismora/elements/image';
|
|
3
|
+
/** Image with a fixed ratio (no layout shift), a placeholder while it loads, a fallback when it fails, and optional — `<pm-image>` */
|
|
4
|
+
export interface ImageProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Image address. */
|
|
6
|
+
src?: string;
|
|
7
|
+
/** Describe the image; leave empty (`alt=""`) for decoration. */
|
|
8
|
+
alt?: string;
|
|
9
|
+
/** Width / height, e.g. "16/9", "1/1", "4/3". Without it the image keeps its own ratio. */
|
|
10
|
+
ratio?: string;
|
|
11
|
+
/** cover (default: fill and crop) or contain (show everything). */
|
|
12
|
+
fit?: 'cover' | 'contain';
|
|
13
|
+
/** lazy (default) or eager. */
|
|
14
|
+
loading?: 'lazy' | 'eager';
|
|
15
|
+
/** Candidate images for different screen densities and widths (as on `<img>`). */
|
|
16
|
+
srcset?: string;
|
|
17
|
+
/** Layout width hints for `srcset` (as on `<img>`). */
|
|
18
|
+
sizes?: string;
|
|
19
|
+
/** Intrinsic width in pixels; with `height` it reserves space when no `ratio` is set. */
|
|
20
|
+
width?: string;
|
|
21
|
+
/** Intrinsic height in pixels. */
|
|
22
|
+
height?: string;
|
|
23
|
+
/** Click or press Enter to view the image full screen. */
|
|
24
|
+
zoomable?: 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
|
+
onPmLoad?: (event: CustomEvent) => void;
|
|
34
|
+
onPmError?: (event: CustomEvent) => void;
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
}
|
|
37
|
+
export declare const Image: React.ForwardRefExoticComponent<ImageProps & {
|
|
38
|
+
children?: React.ReactNode;
|
|
39
|
+
} & React.RefAttributes<PmImage>>;
|