@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,42 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmChart } from '@prismora/elements/chart';
|
|
3
|
+
/** Chart: bar, line, area and donut charts drawn as SVG, with no dependencies. Colours come from the theme's roles, — `<pm-chart>` */
|
|
4
|
+
export interface ChartProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** bar (default), line, area or donut. */
|
|
6
|
+
type?: 'bar' | 'line' | 'area' | 'donut';
|
|
7
|
+
/** Accessible name and table caption, e.g. "Revenue by month". */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Category names along the x axis (or donut slices): `labels="Jan,Feb,Mar"` or an array. */
|
|
10
|
+
labels?: string[];
|
|
11
|
+
/** One or more data series: `[{ name, values, tone? }]`. */
|
|
12
|
+
series?: unknown[];
|
|
13
|
+
/** Shorthand for a single series. */
|
|
14
|
+
values?: number[];
|
|
15
|
+
/** Plot height in pixels (default 240; 200 for a donut). */
|
|
16
|
+
height?: number;
|
|
17
|
+
/** Stack bars or areas instead of placing them side by side. */
|
|
18
|
+
stacked?: boolean;
|
|
19
|
+
/** Hide the legend (shown by default for two or more series and for donuts). */
|
|
20
|
+
hideLegend?: boolean;
|
|
21
|
+
/** Text before each value, e.g. "$". */
|
|
22
|
+
valuePrefix?: string;
|
|
23
|
+
/** Text after each value, e.g. "%". */
|
|
24
|
+
valueSuffix?: string;
|
|
25
|
+
/** Show a placeholder while data loads. */
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
/** Message when there is no data (default "No data"). */
|
|
28
|
+
emptyText?: string;
|
|
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
|
+
onPmSelect?: (event: CustomEvent) => void;
|
|
38
|
+
children?: React.ReactNode;
|
|
39
|
+
}
|
|
40
|
+
export declare const Chart: React.ForwardRefExoticComponent<ChartProps & {
|
|
41
|
+
children?: React.ReactNode;
|
|
42
|
+
} & React.RefAttributes<PmChart>>;
|
|
@@ -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 Chart = /* @__PURE__ */ createComponent('pm-chart', { onPmSelect: 'pm-select' }, () => import('@prismora/elements/chart'));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmChat } from '@prismora/elements/chat';
|
|
3
|
+
/** Chat message list for support chat, team messaging and AI assistants. — `<pm-chat>` */
|
|
4
|
+
export interface ChatProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Accessible name of the conversation. */
|
|
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 Chat: React.ForwardRefExoticComponent<ChatProps & {
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
} & React.RefAttributes<PmChat>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmChatMessage } from '@prismora/elements/chat';
|
|
3
|
+
/** One chat message: a bubble with optional sender name, time, avatar and delivery status. — `<pm-chat-message>` */
|
|
4
|
+
export interface ChatMessageProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** me (own message, end side) or them (default). */
|
|
6
|
+
from?: 'me' | 'them';
|
|
7
|
+
/** Sender name shown above the bubble. */
|
|
8
|
+
name?: string;
|
|
9
|
+
/** Time text, e.g. "09:41". */
|
|
10
|
+
time?: string;
|
|
11
|
+
/** Delivery status under the bubble: "Sent", "Read", "Failed"… ("Failed" is shown in the danger colour). */
|
|
12
|
+
status?: string;
|
|
13
|
+
/** bubble (default) or plain (no bubble, full width). */
|
|
14
|
+
variant?: 'bubble' | 'plain';
|
|
15
|
+
/** Text is still arriving: shows a caret and marks the message busy. */
|
|
16
|
+
streaming?: boolean;
|
|
17
|
+
/** Show the typing indicator instead of content. */
|
|
18
|
+
typing?: 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 ChatMessage: React.ForwardRefExoticComponent<ChatMessageProps & {
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
} & React.RefAttributes<PmChatMessage>>;
|
|
@@ -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 ChatMessage = /* @__PURE__ */ createComponent('pm-chat-message', {}, () => import('@prismora/elements/chat'));
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmCheckbox } from '@prismora/elements/checkbox';
|
|
3
|
+
/** Checkbox for turning an option on or off, with an optional mixed state. — `<pm-checkbox>` */
|
|
4
|
+
export interface CheckboxProps 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 Checkbox: React.ForwardRefExoticComponent<CheckboxProps & {
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
} & React.RefAttributes<PmCheckbox>>;
|
|
@@ -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 Checkbox = /* @__PURE__ */ createComponent('pm-checkbox', { onPmChange: 'pm-change', onPmInput: 'pm-input' }, () => import('@prismora/elements/checkbox'));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmCheckboxGroup } from '@prismora/elements/checkbox-group';
|
|
3
|
+
/** Checkbox group: choose any number of options under one label. — `<pm-checkbox-group>` */
|
|
4
|
+
export interface CheckboxGroupProps 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
|
+
/** Fewest options that must be chosen. */
|
|
10
|
+
min?: number;
|
|
11
|
+
/** Most options that can be chosen; the rest are disabled once reached. */
|
|
12
|
+
max?: number;
|
|
13
|
+
/** Form field name: the value is submitted under it. */
|
|
14
|
+
name?: string;
|
|
15
|
+
/** Current value (submitted with the form). */
|
|
16
|
+
value?: string;
|
|
17
|
+
/** Visible label (required for accessibility; use `hide-label` to visually hide it). */
|
|
18
|
+
label?: string;
|
|
19
|
+
/** Help text under the field, linked to it for screen readers. */
|
|
20
|
+
hint?: string;
|
|
21
|
+
/** Custom error message. Setting it marks the control invalid. */
|
|
22
|
+
error?: string;
|
|
23
|
+
/** Control size. */
|
|
24
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
25
|
+
/** The form cannot be submitted until this has a value. */
|
|
26
|
+
required?: boolean;
|
|
27
|
+
/** Not interactive and not submitted. */
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/** Focusable and submitted, but not editable. */
|
|
30
|
+
readonly?: boolean;
|
|
31
|
+
/** Hide the label visually; it stays the accessible name. */
|
|
32
|
+
hideLabel?: boolean;
|
|
33
|
+
/** Colour role. Inherited by descendants unless they set their own. */
|
|
34
|
+
tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
35
|
+
/** Surface style override for this component (and its descendants). */
|
|
36
|
+
surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
|
|
37
|
+
radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
|
|
38
|
+
density?: 'compact' | 'comfortable' | 'spacious';
|
|
39
|
+
motion?: 'none' | 'reduced' | 'full';
|
|
40
|
+
elevation?: '0' | '1' | '2' | '3' | '4' | '5';
|
|
41
|
+
onPmChange?: (event: CustomEvent) => void;
|
|
42
|
+
onPmInput?: (event: CustomEvent) => void;
|
|
43
|
+
children?: React.ReactNode;
|
|
44
|
+
}
|
|
45
|
+
export declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & {
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
} & React.RefAttributes<PmCheckboxGroup>>;
|
|
@@ -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 CheckboxGroup = /* @__PURE__ */ createComponent('pm-checkbox-group', { onPmChange: 'pm-change', onPmInput: 'pm-input' }, () => import('@prismora/elements/checkbox-group'));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmChoice } from '@prismora/elements/checkbox-group';
|
|
3
|
+
/** Option declaration for `pm-checkbox-group` (renders nothing itself). — `<pm-choice>` */
|
|
4
|
+
export interface ChoiceProps 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 option. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const Choice: React.ForwardRefExoticComponent<ChoiceProps & {
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
} & React.RefAttributes<PmChoice>>;
|
|
@@ -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 Choice = /* @__PURE__ */ createComponent('pm-choice', {}, () => import('@prismora/elements/checkbox-group'));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmCodeBlock } from '@prismora/elements/code-block';
|
|
3
|
+
/** Code snippet with syntax colours, a copy button and optional line numbers. — `<pm-code-block>` */
|
|
4
|
+
export interface CodeBlockProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** The code to show. When not set, the element's text content is used. */
|
|
6
|
+
code?: string;
|
|
7
|
+
/** markup (HTML, Vue, Svelte), js (also TypeScript and JSX), css, shell, json or text. Detected when omitted. */
|
|
8
|
+
language?: unknown;
|
|
9
|
+
/** File name or title shown in the bar instead of the language name. */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Number each line. */
|
|
12
|
+
lineNumbers?: boolean;
|
|
13
|
+
/** Wrap long lines instead of scrolling sideways. */
|
|
14
|
+
wrap?: boolean;
|
|
15
|
+
/** Collapse snippets longer than this many lines behind a "Show all" button. */
|
|
16
|
+
maxLines?: number;
|
|
17
|
+
/** Hide the copy button. */
|
|
18
|
+
hideCopy?: 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
|
+
onPmCopy?: (event: CustomEvent) => void;
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
export declare const CodeBlock: React.ForwardRefExoticComponent<CodeBlockProps & {
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
} & React.RefAttributes<PmCodeBlock>>;
|
|
@@ -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 CodeBlock = /* @__PURE__ */ createComponent('pm-code-block', { onPmCopy: 'pm-copy' }, () => import('@prismora/elements/code-block'));
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmColorPicker } from '@prismora/elements/color-picker';
|
|
3
|
+
/** Colour picker: a swatch + hex field with a popup (or `inline` panel) holding a saturation/brightness area, hue and — `<pm-color-picker>` */
|
|
4
|
+
export interface ColorPickerProps 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
|
+
/** Allow transparency (adds an alpha slider; value becomes #rrggbbaa when not opaque). */
|
|
8
|
+
alpha?: boolean;
|
|
9
|
+
/** Render the panel inline instead of in a popup. */
|
|
10
|
+
inline?: boolean;
|
|
11
|
+
/** Preset colours: comma-separated or a JSON array. */
|
|
12
|
+
swatches?: string | string[];
|
|
13
|
+
/** Hint text shown while empty (not a replacement for `label`). */
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
/** Form field name: the value is submitted under it. */
|
|
16
|
+
name?: string;
|
|
17
|
+
/** Current value (submitted with the form). */
|
|
18
|
+
value?: string;
|
|
19
|
+
/** Visible label (required for accessibility; use `hide-label` to visually hide it). */
|
|
20
|
+
label?: string;
|
|
21
|
+
/** Help text under the field, linked to it for screen readers. */
|
|
22
|
+
hint?: string;
|
|
23
|
+
/** Custom error message. Setting it marks the control invalid. */
|
|
24
|
+
error?: string;
|
|
25
|
+
/** Control size. */
|
|
26
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
27
|
+
/** The form cannot be submitted until this has a value. */
|
|
28
|
+
required?: boolean;
|
|
29
|
+
/** Not interactive and not submitted. */
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/** Focusable and submitted, but not editable. */
|
|
32
|
+
readonly?: boolean;
|
|
33
|
+
/** Hide the label visually; it stays the accessible name. */
|
|
34
|
+
hideLabel?: boolean;
|
|
35
|
+
/** Colour role. Inherited by descendants unless they set their own. */
|
|
36
|
+
tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
37
|
+
/** Surface style override for this component (and its descendants). */
|
|
38
|
+
surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
|
|
39
|
+
radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
|
|
40
|
+
density?: 'compact' | 'comfortable' | 'spacious';
|
|
41
|
+
motion?: 'none' | 'reduced' | 'full';
|
|
42
|
+
elevation?: '0' | '1' | '2' | '3' | '4' | '5';
|
|
43
|
+
onPmInput?: (event: CustomEvent) => void;
|
|
44
|
+
onPmChange?: (event: CustomEvent) => void;
|
|
45
|
+
children?: React.ReactNode;
|
|
46
|
+
}
|
|
47
|
+
export declare const ColorPicker: React.ForwardRefExoticComponent<ColorPickerProps & {
|
|
48
|
+
children?: React.ReactNode;
|
|
49
|
+
} & React.RefAttributes<PmColorPicker>>;
|
|
@@ -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 ColorPicker = /* @__PURE__ */ createComponent('pm-color-picker', { onPmInput: 'pm-input', onPmChange: 'pm-change' }, () => import('@prismora/elements/color-picker'));
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmCombobox } from '@prismora/elements/combobox';
|
|
3
|
+
/** Combobox / autocomplete: a searchable select. — `<pm-combobox>` */
|
|
4
|
+
export interface ComboboxProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Allow more than one value. */
|
|
6
|
+
multiple?: boolean;
|
|
7
|
+
/** Hint text shown while empty (not a replacement for `label`). */
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** Offer "Create …" for queries that match nothing. */
|
|
10
|
+
creatable?: boolean;
|
|
11
|
+
/** Show a button that clears the value. */
|
|
12
|
+
clearable?: boolean;
|
|
13
|
+
/** `contains` (default), `starts-with`, or `none` (you filter, e.g. server-side on pm-search). */
|
|
14
|
+
filter?: 'contains' | 'starts-with' | 'none';
|
|
15
|
+
/** Show a loading row (async search). */
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
/** Text shown when there is nothing to list. */
|
|
18
|
+
emptyText?: string;
|
|
19
|
+
/** Search URL; `{query}` is replaced with the URL-encoded text (e.g. `/api/users?q={query}`). Response: JSON. */
|
|
20
|
+
src?: string;
|
|
21
|
+
/** Where the list is in the response, as a dotted path (e.g. `data.items`); empty = the response itself. */
|
|
22
|
+
optionsPath?: string;
|
|
23
|
+
/** Item field for the value (default `value`, then `id`). */
|
|
24
|
+
valueKey?: string;
|
|
25
|
+
/** Item field for the label (default `label`, then `name`, then `title`). */
|
|
26
|
+
labelKey?: string;
|
|
27
|
+
/** Item field for the secondary text (default `description`). */
|
|
28
|
+
descriptionKey?: string;
|
|
29
|
+
/** Item field for the group heading (default `group`). */
|
|
30
|
+
groupKey?: string;
|
|
31
|
+
/** Milliseconds to wait after typing before searching the server. */
|
|
32
|
+
debounce?: number;
|
|
33
|
+
/** Characters needed before searching the server (0 = load as soon as it opens). */
|
|
34
|
+
minChars?: number;
|
|
35
|
+
/** Form field name: the value is submitted under it. */
|
|
36
|
+
name?: string;
|
|
37
|
+
/** Current value (submitted with the form). */
|
|
38
|
+
value?: string;
|
|
39
|
+
/** Visible label (required for accessibility; use `hide-label` to visually hide it). */
|
|
40
|
+
label?: string;
|
|
41
|
+
/** Help text under the field, linked to it for screen readers. */
|
|
42
|
+
hint?: string;
|
|
43
|
+
/** Custom error message. Setting it marks the control invalid. */
|
|
44
|
+
error?: string;
|
|
45
|
+
/** Control size. */
|
|
46
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
47
|
+
/** The form cannot be submitted until this has a value. */
|
|
48
|
+
required?: boolean;
|
|
49
|
+
/** Not interactive and not submitted. */
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
/** Focusable and submitted, but not editable. */
|
|
52
|
+
readonly?: boolean;
|
|
53
|
+
/** Hide the label visually; it stays the accessible name. */
|
|
54
|
+
hideLabel?: boolean;
|
|
55
|
+
/** Colour role. Inherited by descendants unless they set their own. */
|
|
56
|
+
tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
57
|
+
/** Surface style override for this component (and its descendants). */
|
|
58
|
+
surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
|
|
59
|
+
radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
|
|
60
|
+
density?: 'compact' | 'comfortable' | 'spacious';
|
|
61
|
+
motion?: 'none' | 'reduced' | 'full';
|
|
62
|
+
elevation?: '0' | '1' | '2' | '3' | '4' | '5';
|
|
63
|
+
onPmSearch?: (event: CustomEvent) => void;
|
|
64
|
+
onPmCreate?: (event: CustomEvent) => void;
|
|
65
|
+
onPmLoad?: (event: CustomEvent) => void;
|
|
66
|
+
onPmLoadError?: (event: CustomEvent) => void;
|
|
67
|
+
onPmInput?: (event: CustomEvent) => void;
|
|
68
|
+
onPmChange?: (event: CustomEvent) => void;
|
|
69
|
+
children?: React.ReactNode;
|
|
70
|
+
}
|
|
71
|
+
export declare const Combobox: React.ForwardRefExoticComponent<ComboboxProps & {
|
|
72
|
+
children?: React.ReactNode;
|
|
73
|
+
} & React.RefAttributes<PmCombobox>>;
|
|
@@ -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 Combobox = /* @__PURE__ */ createComponent('pm-combobox', { onPmSearch: 'pm-search', onPmCreate: 'pm-create', onPmLoad: 'pm-load', onPmLoadError: 'pm-load-error', onPmInput: 'pm-input', onPmChange: 'pm-change' }, () => import('@prismora/elements/combobox'));
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmCommand } from '@prismora/elements/command';
|
|
3
|
+
/** Command palette (⌘K / Ctrl+K): a modal search over actions and pages, grouped, fuzzy-matched, keyboard driven. — `<pm-command>` */
|
|
4
|
+
export interface CommandProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Whether it is open. Set to open or close it; changes when the user opens or closes it. */
|
|
6
|
+
open?: boolean;
|
|
7
|
+
/** Hint text shown while empty (not a replacement for `label`). */
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** Accessible name (and visible label where the component shows one). */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Global shortcut ("mod+k" by default; "mod" is ⌘ on Apple, Ctrl elsewhere). Set to "" to disable. */
|
|
12
|
+
shortcut?: string;
|
|
13
|
+
/** Text shown when there is nothing to list. */
|
|
14
|
+
emptyText?: string;
|
|
15
|
+
/** Search URL; `{query}` is replaced with the URL-encoded text. Response: JSON. */
|
|
16
|
+
src?: string;
|
|
17
|
+
/** Where the list is in the response (dotted path; empty = the response itself). */
|
|
18
|
+
itemsPath?: string;
|
|
19
|
+
/** Item field for the value (default `value`, then `id`). */
|
|
20
|
+
valueKey?: string;
|
|
21
|
+
/** Item field for the label (default `label`, then `name`, then `title`). */
|
|
22
|
+
labelKey?: string;
|
|
23
|
+
/** Item field for the group heading (default: `results-group`). */
|
|
24
|
+
groupKey?: string;
|
|
25
|
+
/** Item field for a link to open (default `href`, then `url`). */
|
|
26
|
+
hrefKey?: string;
|
|
27
|
+
/** Group heading for server results without their own group. */
|
|
28
|
+
resultsGroup?: string;
|
|
29
|
+
/** Milliseconds to wait after typing before searching the server. */
|
|
30
|
+
debounce?: number;
|
|
31
|
+
/** Characters needed before searching the server. */
|
|
32
|
+
minChars?: number;
|
|
33
|
+
/** Colour role. Inherited by descendants unless they set their own. */
|
|
34
|
+
tone?: 'accent' | 'secondary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
35
|
+
/** Surface style override for this component (and its descendants). */
|
|
36
|
+
surface?: 'flat' | 'outline' | 'gradient' | 'glass' | 'neumorphic';
|
|
37
|
+
radius?: 'none' | 'sharp' | 'rounded' | 'soft' | 'pill';
|
|
38
|
+
density?: 'compact' | 'comfortable' | 'spacious';
|
|
39
|
+
motion?: 'none' | 'reduced' | 'full';
|
|
40
|
+
elevation?: '0' | '1' | '2' | '3' | '4' | '5';
|
|
41
|
+
onPmSelect?: (event: CustomEvent) => void;
|
|
42
|
+
onPmOpen?: (event: CustomEvent) => void;
|
|
43
|
+
onPmClose?: (event: CustomEvent) => void;
|
|
44
|
+
onPmLoad?: (event: CustomEvent) => void;
|
|
45
|
+
onPmLoadError?: (event: CustomEvent) => void;
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
}
|
|
48
|
+
export declare const Command: React.ForwardRefExoticComponent<CommandProps & {
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
} & React.RefAttributes<PmCommand>>;
|
|
@@ -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 Command = /* @__PURE__ */ createComponent('pm-command', { onPmSelect: 'pm-select', onPmOpen: 'pm-open', onPmClose: 'pm-close', onPmLoad: 'pm-load', onPmLoadError: 'pm-load-error' }, () => import('@prismora/elements/command'));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmCommandItem } from '@prismora/elements/command';
|
|
3
|
+
/** An action in a command palette (data only, not rendered itself). — `<pm-command-item>` */
|
|
4
|
+
export interface CommandItemProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Value reported in pm-select (defaults to the text). */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** Group heading. */
|
|
8
|
+
group?: string;
|
|
9
|
+
/** Extra search words, space or comma separated. */
|
|
10
|
+
keywords?: string;
|
|
11
|
+
/** Shortcut hint shown on the right, e.g. "Ctrl N". */
|
|
12
|
+
shortcut?: string;
|
|
13
|
+
/** Navigate here when chosen. */
|
|
14
|
+
href?: string;
|
|
15
|
+
/** Not interactive (and not submitted, for form controls). */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const CommandItem: React.ForwardRefExoticComponent<CommandItemProps & {
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
} & React.RefAttributes<PmCommandItem>>;
|
|
@@ -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 CommandItem = /* @__PURE__ */ createComponent('pm-command-item', {}, () => import('@prismora/elements/command'));
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmComposer } from '@prismora/elements/chat';
|
|
3
|
+
/** Message composer: a text box that grows with its content and a send button. — `<pm-composer>` */
|
|
4
|
+
export interface ComposerProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Current value. */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** Accessible name of the text box. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Hint text shown while empty (not a replacement for `label`). */
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
/** Not interactive (and not submitted, for form controls). */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** A reply is being produced: Send becomes Stop. */
|
|
14
|
+
busy?: boolean;
|
|
15
|
+
/** Maximum number of characters. */
|
|
16
|
+
maxlength?: number;
|
|
17
|
+
/** Text of the send button's accessible name (default "Send"). */
|
|
18
|
+
sendLabel?: string;
|
|
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
|
+
onPmSend?: (event: CustomEvent) => void;
|
|
28
|
+
onPmStop?: (event: CustomEvent) => void;
|
|
29
|
+
onPmInput?: (event: CustomEvent) => void;
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare const Composer: React.ForwardRefExoticComponent<ComposerProps & {
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
} & React.RefAttributes<PmComposer>>;
|
|
@@ -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 Composer = /* @__PURE__ */ createComponent('pm-composer', { onPmSend: 'pm-send', onPmStop: 'pm-stop', onPmInput: 'pm-input' }, () => import('@prismora/elements/chat'));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmContextMenu } from '@prismora/elements/context-menu';
|
|
3
|
+
/** Context menu: right-click (or long-press, Shift+F10, the Menu key) inside this element opens the `pm-menu` — `<pm-context-menu>` */
|
|
4
|
+
export interface ContextMenuProps 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
|
+
/** id of the `pm-menu` to open. */
|
|
8
|
+
menu?: string;
|
|
9
|
+
/** Use the browser's own context menu instead. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onPmOpen?: (event: CustomEvent) => void;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const ContextMenu: React.ForwardRefExoticComponent<ContextMenuProps & {
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
} & React.RefAttributes<PmContextMenu>>;
|
|
@@ -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 ContextMenu = /* @__PURE__ */ createComponent('pm-context-menu', { onPmOpen: 'pm-open' }, () => import('@prismora/elements/context-menu'));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { PmCopyButton } from '@prismora/elements/copy-button';
|
|
3
|
+
/** Copies text to the clipboard and confirms it (visually and to screen readers). — `<pm-copy-button>` */
|
|
4
|
+
export interface CopyButtonProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
5
|
+
/** Text to copy. */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** id of an element whose text (or value) is copied instead. */
|
|
8
|
+
for?: string;
|
|
9
|
+
/** Accessible name (and visible label where the component shows one). */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Text shown (and announced) after copying. */
|
|
12
|
+
copiedLabel?: 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 the text label next to the icon. */
|
|
18
|
+
showLabel?: 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
|
+
onPmCopy?: (event: CustomEvent) => void;
|
|
30
|
+
onPmError?: (event: CustomEvent) => void;
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
export declare const CopyButton: React.ForwardRefExoticComponent<CopyButtonProps & {
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
} & React.RefAttributes<PmCopyButton>>;
|
|
@@ -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 CopyButton = /* @__PURE__ */ createComponent('pm-copy-button', { onPmCopy: 'pm-copy', onPmError: 'pm-error' }, () => import('@prismora/elements/copy-button'));
|