@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.
- 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,25 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmSkeleton } from '@prismora/elements/skeleton';
|
|
3
|
+
/** Loading placeholder. — `<pm-skeleton>` */
|
|
4
|
+
export interface SkeletonProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Outline shape. */
|
|
6
|
+
shape?: 'rect' | 'text' | 'circle';
|
|
7
|
+
/** Number of text lines to imitate. */
|
|
8
|
+
lines?: number;
|
|
9
|
+
/** Width as a CSS length, e.g. "12rem" or "60%". */
|
|
10
|
+
width?: string;
|
|
11
|
+
/** Height as a CSS length. */
|
|
12
|
+
height?: 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 Skeleton: React.ForwardRefExoticComponent<SkeletonProps & {
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
} & React.RefAttributes<PmSkeleton>>;
|
|
@@ -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 Skeleton = /* @__PURE__ */ createComponent('pm-skeleton', {}, () => import('@prismora/elements/skeleton'));
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmSlider } from '@prismora/elements/slider';
|
|
3
|
+
/** Range slider. `marks` adds labelled ticks (clickable, and snapped to by the native control); `unit` and `locale` — `<pm-slider>` */
|
|
4
|
+
export interface SliderProps 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
|
+
/** Show the current value next to the control. */
|
|
12
|
+
showValue?: boolean;
|
|
13
|
+
/** Ticks: numbers or `{ value, label }`. */
|
|
14
|
+
marks?: unknown[];
|
|
15
|
+
/** Unit after the value, e.g. "%", "px", "kg". */
|
|
16
|
+
unit?: string;
|
|
17
|
+
/** Locale for number formatting. */
|
|
18
|
+
locale?: string;
|
|
19
|
+
/** Form field name: the value is submitted under it. */
|
|
20
|
+
name?: string;
|
|
21
|
+
/** Current value (submitted with the form). */
|
|
22
|
+
value?: string;
|
|
23
|
+
/** Visible label (required for accessibility; use `hide-label` to visually hide it). */
|
|
24
|
+
label?: string;
|
|
25
|
+
/** Help text under the field, linked to it for screen readers. */
|
|
26
|
+
hint?: string;
|
|
27
|
+
/** Custom error message. Setting it marks the control invalid. */
|
|
28
|
+
error?: string;
|
|
29
|
+
/** Control size. */
|
|
30
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
31
|
+
/** The form cannot be submitted until this has a value. */
|
|
32
|
+
required?: boolean;
|
|
33
|
+
/** Not interactive and not submitted. */
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/** Focusable and submitted, but not editable. */
|
|
36
|
+
readonly?: boolean;
|
|
37
|
+
/** Hide the label visually; it stays the accessible name. */
|
|
38
|
+
hideLabel?: boolean;
|
|
39
|
+
/** Colour role. Inherited by descendants unless they set their own. */
|
|
40
|
+
tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
41
|
+
/** Surface style override for this component (and its descendants). */
|
|
42
|
+
surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
|
|
43
|
+
radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
|
|
44
|
+
density?: 'compact' | 'comfortable' | 'spacious';
|
|
45
|
+
motion?: 'none' | 'reduced' | 'full';
|
|
46
|
+
elevation?: '0' | '1' | '2' | '3' | '4' | '5';
|
|
47
|
+
onPmInput?: (event: CustomEvent) => void;
|
|
48
|
+
onPmChange?: (event: CustomEvent) => void;
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
export declare const Slider: React.ForwardRefExoticComponent<SliderProps & {
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
} & React.RefAttributes<PmSlider>>;
|
|
@@ -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 Slider = /* @__PURE__ */ createComponent('pm-slider', { onPmInput: 'pm-input', onPmChange: 'pm-change' }, () => import('@prismora/elements/slider'));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmSortable } from '@prismora/elements/sortable';
|
|
3
|
+
/** List whose rows can be reordered by dragging or with the keyboard. — `<pm-sortable>` */
|
|
4
|
+
export interface SortableProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Accessible name of the list. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Turn reordering off. */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onPmReorder?: (event: CustomEvent) => void;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const Sortable: React.ForwardRefExoticComponent<SortableProps & {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
} & React.RefAttributes<PmSortable>>;
|
|
@@ -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 Sortable = /* @__PURE__ */ createComponent('pm-sortable', { onPmReorder: 'pm-reorder' }, () => import('@prismora/elements/sortable'));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmSparkline } from '@prismora/elements/sparkline';
|
|
3
|
+
/** Sparkline: a small trend chart without axes, for stat cards and table cells. — `<pm-sparkline>` */
|
|
4
|
+
export interface SparklineProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** The numbers to plot, in order: `values="3,5,4,8"` or an array property. */
|
|
6
|
+
values?: number[];
|
|
7
|
+
/** line (default), area or bar. */
|
|
8
|
+
type?: 'line' | 'area' | 'bar';
|
|
9
|
+
/** Accessible name, e.g. "Revenue, last 7 days". */
|
|
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 Sparkline: React.ForwardRefExoticComponent<SparklineProps & {
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
} & React.RefAttributes<PmSparkline>>;
|
|
@@ -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 Sparkline = /* @__PURE__ */ createComponent('pm-sparkline', {}, () => import('@prismora/elements/sparkline'));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmSpinner } from '@prismora/elements/spinner';
|
|
3
|
+
/** Loading spinner (announces as a status). — `<pm-spinner>` */
|
|
4
|
+
export interface SpinnerProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Accessible name (and visible label where the component shows one). */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Size: xs, sm, md (default), lg or xl. */
|
|
8
|
+
size?: 'sm' | 'md' | 'lg';
|
|
9
|
+
/** Colour role. Inherited by descendants unless they set their own. */
|
|
10
|
+
tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
11
|
+
/** Surface style override for this component (and its descendants). */
|
|
12
|
+
surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
|
|
13
|
+
radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
|
|
14
|
+
density?: 'compact' | 'comfortable' | 'spacious';
|
|
15
|
+
motion?: 'none' | 'reduced' | 'full';
|
|
16
|
+
elevation?: '0' | '1' | '2' | '3' | '4' | '5';
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & {
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
} & React.RefAttributes<PmSpinner>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmSplitter } from '@prismora/elements/splitter';
|
|
3
|
+
/** Resizable split view (window splitter pattern). Two panes, a draggable separator with arrow-key support — `<pm-splitter>` */
|
|
4
|
+
export interface SplitterProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Size of the first pane in percent. */
|
|
6
|
+
position?: number;
|
|
7
|
+
/** Lowest allowed value. */
|
|
8
|
+
min?: number;
|
|
9
|
+
/** Highest allowed value. */
|
|
10
|
+
max?: number;
|
|
11
|
+
/** horizontal = side by side (vertical bar); vertical = stacked. */
|
|
12
|
+
orientation?: 'horizontal' | 'vertical';
|
|
13
|
+
/** Accessible name of the separator (names the first pane). */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** Not interactive (and not submitted, for form controls). */
|
|
16
|
+
disabled?: boolean;
|
|
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
|
+
onPmResize?: (event: CustomEvent) => void;
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export declare const Splitter: React.ForwardRefExoticComponent<SplitterProps & {
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
} & React.RefAttributes<PmSplitter>>;
|
|
@@ -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 Splitter = /* @__PURE__ */ createComponent('pm-splitter', { onPmResize: 'pm-resize' }, () => import('@prismora/elements/splitter'));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmStat } from '@prismora/elements/stat';
|
|
3
|
+
/** Stat / KPI: a labelled number with an optional change indicator. — `<pm-stat>` */
|
|
4
|
+
export interface StatProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Registered icon name (see `registerIcons`); an `icon` slot overrides it. */
|
|
6
|
+
icon?: string;
|
|
7
|
+
/** Accessible name (and visible label where the component shows one). */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Current value. */
|
|
10
|
+
value?: string;
|
|
11
|
+
/** Change, e.g. "+12%" or "-3". */
|
|
12
|
+
delta?: string;
|
|
13
|
+
/** Supporting text under the title. */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Direction of the change: up, down or flat (colours the delta). */
|
|
16
|
+
trend?: 'up' | 'down' | 'neutral';
|
|
17
|
+
/** A decrease is good (e.g. error rate). */
|
|
18
|
+
inverse?: boolean;
|
|
19
|
+
/** Size: xs, sm, md (default), lg or xl. */
|
|
20
|
+
size?: 'sm' | 'md' | 'lg';
|
|
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
|
+
children?: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export declare const Stat: React.ForwardRefExoticComponent<StatProps & {
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
} & React.RefAttributes<PmStat>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmStep } from '@prismora/elements/steps';
|
|
3
|
+
/** One step in a `<pm-steps>` progress indicator. — `<pm-step>` */
|
|
4
|
+
export interface StepProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Registered icon name (see `registerIcons`); an `icon` slot overrides it. */
|
|
6
|
+
icon?: string;
|
|
7
|
+
/** Accessible name (and visible label where the component shows one). */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Supporting text under the title. */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** Override the derived status (e.g. `error`). */
|
|
12
|
+
status?: 'complete' | 'current' | 'upcoming' | 'error';
|
|
13
|
+
/** Not interactive (and not submitted, for form controls). */
|
|
14
|
+
disabled?: 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 Step: React.ForwardRefExoticComponent<StepProps & {
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
} & React.RefAttributes<PmStep>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmSteps } from '@prismora/elements/steps';
|
|
3
|
+
/** Steps (wizard / checkout progress). Steps before `current` are complete. — `<pm-steps>` */
|
|
4
|
+
export interface StepsProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Index (0-based) of the current step. */
|
|
6
|
+
current?: number;
|
|
7
|
+
/** Layout and arrow-key direction: horizontal or vertical. */
|
|
8
|
+
orientation?: 'horizontal' | 'vertical';
|
|
9
|
+
/** Completed steps can be revisited (emits pm-change). */
|
|
10
|
+
clickable?: boolean;
|
|
11
|
+
/** Accessible name (and visible label where the component shows one). */
|
|
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
|
+
onPmChange?: (event: CustomEvent) => void;
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare const Steps: React.ForwardRefExoticComponent<StepsProps & {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
} & React.RefAttributes<PmSteps>>;
|
|
@@ -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 Steps = /* @__PURE__ */ createComponent('pm-steps', { onPmChange: 'pm-change' }, () => import('@prismora/elements/steps'));
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmSwitch } from '@prismora/elements/switch';
|
|
3
|
+
/** On/off switch (form value like a checkbox). — `<pm-switch>` */
|
|
4
|
+
export interface SwitchProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Whether it is on (submitted with the form when on). */
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
/** Mixed state (neither on nor off), e.g. a "select all" with some items selected. */
|
|
8
|
+
indeterminate?: boolean;
|
|
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
|
+
onPmChange?: (event: CustomEvent) => void;
|
|
38
|
+
onPmInput?: (event: CustomEvent) => void;
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
}
|
|
41
|
+
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & {
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
} & React.RefAttributes<PmSwitch>>;
|
|
@@ -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 Switch = /* @__PURE__ */ createComponent('pm-switch', { onPmChange: 'pm-change', onPmInput: 'pm-input' }, () => import('@prismora/elements/switch'));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmTab } from '@prismora/elements/tabs';
|
|
3
|
+
/** A tab in `pm-tabs`; matched to the `pm-tab-panel` at the same index. — `<pm-tab>` */
|
|
4
|
+
export interface TabProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Show a close button (also closes with Delete). */
|
|
6
|
+
closable?: boolean;
|
|
7
|
+
/** Skipped by keyboard and not selectable. */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Count badge after the label (unread, results); hidden at 0 unless `show-zero`. */
|
|
10
|
+
count?: number;
|
|
11
|
+
/** Highest count shown before "+" (default 99). */
|
|
12
|
+
max?: number;
|
|
13
|
+
/** Keep the count badge at 0. */
|
|
14
|
+
'show-zero'?: boolean;
|
|
15
|
+
/** What the count means for screen readers; `{count}` is filled in ("{count} unread"). */
|
|
16
|
+
'count-label'?: string;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const Tab: React.ForwardRefExoticComponent<TabProps & {
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
} & React.RefAttributes<PmTab>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmTabPanel } from '@prismora/elements/tabs';
|
|
3
|
+
/** Panel for the `pm-tab` at the same index. Hidden with `hidden=until-found` when supported. — `<pm-tab-panel>` */
|
|
4
|
+
export interface TabPanelProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const TabPanel: React.ForwardRefExoticComponent<TabPanelProps & {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
} & React.RefAttributes<PmTabPanel>>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmTable } from '@prismora/elements/table';
|
|
3
|
+
/** Basic table: columns and rows in, an accessible table out. — `<pm-table>` */
|
|
4
|
+
export interface TableProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Column definitions: key, label, type, sorting, formatting and rendering. */
|
|
6
|
+
columns?: unknown[];
|
|
7
|
+
/** Row objects (or a JSON string). */
|
|
8
|
+
rows?: unknown[];
|
|
9
|
+
/** Accessible name (caption). */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Current sort: `{ key, direction }`. */
|
|
12
|
+
sort?: unknown;
|
|
13
|
+
/** Shade alternate rows. */
|
|
14
|
+
striped?: boolean;
|
|
15
|
+
/** Show a loading state (and mark the region busy for assistive tech). */
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
/** Text shown when there is nothing to list. */
|
|
18
|
+
emptyText?: string;
|
|
19
|
+
/** Narrow containers (< 36rem): `auto` shows rows as labelled cards; `never` keeps a scrolling table. */
|
|
20
|
+
stack?: 'auto' | 'never';
|
|
21
|
+
/** Scroll inside the table past this height (header stays visible), e.g. "24rem". */
|
|
22
|
+
maxHeight?: string;
|
|
23
|
+
/** BCP 47 locale for number/date formatting (default: the page's). */
|
|
24
|
+
locale?: string;
|
|
25
|
+
/** Rows are clickable and fire `pm-row-click`. */
|
|
26
|
+
rowClickable?: boolean;
|
|
27
|
+
/** Rows are already sorted (server-side); just emit pm-sort. */
|
|
28
|
+
manual?: 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
|
+
onPmSort?: (event: CustomEvent) => void;
|
|
38
|
+
onPmRowClick?: (event: CustomEvent) => void;
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
}
|
|
41
|
+
export declare const Table: React.ForwardRefExoticComponent<TableProps & {
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
} & React.RefAttributes<PmTable<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 Table = /* @__PURE__ */ createComponent('pm-table', { onPmSort: 'pm-sort', onPmRowClick: 'pm-row-click' }, () => import('@prismora/elements/table'));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmTabs } from '@prismora/elements/tabs';
|
|
3
|
+
/** Tabs that switch between panels of related content, with keyboard support, overflow scrolling and closable tabs. — `<pm-tabs>` */
|
|
4
|
+
export interface TabsProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Whether this item is selected. */
|
|
6
|
+
selected?: number;
|
|
7
|
+
/** Accessible name of the tab list. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Visual style. */
|
|
10
|
+
variant?: 'line' | 'pills';
|
|
11
|
+
/** Tab list direction. */
|
|
12
|
+
orientation?: 'horizontal' | 'vertical';
|
|
13
|
+
/** `auto` (default): arrow keys select. `manual`: arrow keys move focus, Enter/Space selects. */
|
|
14
|
+
activation?: 'auto' | 'manual';
|
|
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
|
+
onPmChange?: (event: CustomEvent) => void;
|
|
24
|
+
onPmClose?: (event: CustomEvent) => void;
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export declare const Tabs: React.ForwardRefExoticComponent<TabsProps & {
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
} & React.RefAttributes<PmTabs>>;
|
|
@@ -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 Tabs = /* @__PURE__ */ createComponent('pm-tabs', { onPmChange: 'pm-change', onPmClose: 'pm-close' }, () => import('@prismora/elements/tabs'));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmTag } from '@prismora/elements/tag';
|
|
3
|
+
/** Tag / chip. Static label, removable token, or toggleable filter chip (`selectable`). — `<pm-tag>` */
|
|
4
|
+
export interface TagProps 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
|
+
/** Visual style. */
|
|
8
|
+
variant?: 'soft' | 'solid' | 'outline';
|
|
9
|
+
/** Size: xs, sm, md (default), lg or xl. */
|
|
10
|
+
size?: 'sm' | 'md' | 'lg';
|
|
11
|
+
/** Shows a remove button; removes the tag unless `pm-remove` is cancelled. */
|
|
12
|
+
removable?: boolean;
|
|
13
|
+
/** Toggleable filter chip (button with aria-pressed). */
|
|
14
|
+
selectable?: boolean;
|
|
15
|
+
/** Whether this item is selected. */
|
|
16
|
+
selected?: boolean;
|
|
17
|
+
/** Not interactive (and not submitted, for form controls). */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Value reported in events (defaults to the text). */
|
|
20
|
+
value?: string;
|
|
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
|
+
onPmRemove?: (event: CustomEvent) => void;
|
|
30
|
+
onPmChange?: (event: CustomEvent) => void;
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
export declare const Tag: React.ForwardRefExoticComponent<TagProps & {
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
} & React.RefAttributes<PmTag>>;
|
|
@@ -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 Tag = /* @__PURE__ */ createComponent('pm-tag', { onPmRemove: 'pm-remove', onPmChange: 'pm-change' }, () => import('@prismora/elements/tag'));
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmTextarea } from '@prismora/elements/textarea';
|
|
3
|
+
/** Multi-line text input that grows with content (between `rows` and `max-rows`). `show-count` adds a live — `<pm-textarea>` */
|
|
4
|
+
export interface TextareaProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Hint text shown while empty (not a replacement for `label`). */
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/** Visible lines before it starts to grow. */
|
|
8
|
+
rows?: number;
|
|
9
|
+
/** Maximum number of characters. */
|
|
10
|
+
maxlength?: number;
|
|
11
|
+
/** Stop growing after this many lines (then scroll). */
|
|
12
|
+
maxRows?: number;
|
|
13
|
+
/** Show "n / max" under the field. */
|
|
14
|
+
showCount?: boolean;
|
|
15
|
+
/** Browser autofill hint (the HTML `autocomplete` token). */
|
|
16
|
+
autocomplete?: string;
|
|
17
|
+
/** Form field name: the value is submitted under it. */
|
|
18
|
+
name?: string;
|
|
19
|
+
/** Current value (submitted with the form). */
|
|
20
|
+
value?: string;
|
|
21
|
+
/** Visible label (required for accessibility; use `hide-label` to visually hide it). */
|
|
22
|
+
label?: string;
|
|
23
|
+
/** Help text under the field, linked to it for screen readers. */
|
|
24
|
+
hint?: string;
|
|
25
|
+
/** Custom error message. Setting it marks the control invalid. */
|
|
26
|
+
error?: string;
|
|
27
|
+
/** Control size. */
|
|
28
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
29
|
+
/** The form cannot be submitted until this has a value. */
|
|
30
|
+
required?: boolean;
|
|
31
|
+
/** Not interactive and not submitted. */
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
/** Focusable and submitted, but not editable. */
|
|
34
|
+
readonly?: boolean;
|
|
35
|
+
/** Hide the label visually; it stays the accessible name. */
|
|
36
|
+
hideLabel?: boolean;
|
|
37
|
+
/** Colour role. Inherited by descendants unless they set their own. */
|
|
38
|
+
tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
39
|
+
/** Surface style override for this component (and its descendants). */
|
|
40
|
+
surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
|
|
41
|
+
radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
|
|
42
|
+
density?: 'compact' | 'comfortable' | 'spacious';
|
|
43
|
+
motion?: 'none' | 'reduced' | 'full';
|
|
44
|
+
elevation?: '0' | '1' | '2' | '3' | '4' | '5';
|
|
45
|
+
onPmInput?: (event: CustomEvent) => void;
|
|
46
|
+
onPmChange?: (event: CustomEvent) => void;
|
|
47
|
+
children?: React.ReactNode;
|
|
48
|
+
}
|
|
49
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & {
|
|
50
|
+
children?: React.ReactNode;
|
|
51
|
+
} & React.RefAttributes<PmTextarea>>;
|
|
@@ -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 Textarea = /* @__PURE__ */ createComponent('pm-textarea', { onPmInput: 'pm-input', onPmChange: 'pm-change' }, () => import('@prismora/elements/textarea'));
|