@webority/ui-react 0.129.0 → 0.130.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/README.md +1 -1
- package/dist/canvas-kit/kit.js +8866 -8571
- package/dist/canvas-kit/manifest.json +722 -241
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppActionIcon.js +1 -1
- package/dist/components/AppAlert.js +1 -1
- package/dist/components/AppAsyncBlock.js +1 -1
- package/dist/components/AppAutocomplete.js +1 -1
- package/dist/components/AppAvatar.js +1 -1
- package/dist/components/AppBadge.js +1 -1
- package/dist/components/AppBanner.js +1 -1
- package/dist/components/AppButton.js +1 -1
- package/dist/components/AppCard.js +1 -1
- package/dist/components/AppChart.js +1 -1
- package/dist/components/AppCheckbox.js +1 -1
- package/dist/components/AppChip.js +1 -1
- package/dist/components/AppColorField.js +1 -1
- package/dist/components/AppCommentThread.js +1 -1
- package/dist/components/AppConfirmDialog.js +1 -1
- package/dist/components/AppConfirmProvider.js +1 -1
- package/dist/components/AppConsentBanner.js +1 -1
- package/dist/components/AppContextMenu.js +1 -1
- package/dist/components/AppCopyButton.js +1 -1
- package/dist/components/AppCountrySelect.js +1 -1
- package/dist/components/AppDatePicker.js +1 -1
- package/dist/components/AppDateRangePicker.js +1 -1
- package/dist/components/AppDropZone.js +1 -1
- package/dist/components/AppDropdown.js +1 -1
- package/dist/components/AppEmptyState.js +1 -1
- package/dist/components/AppFilePicker.js +1 -1
- package/dist/components/AppFilterBar.js +1 -1
- package/dist/components/AppFloatingButton.js +1 -1
- package/dist/components/AppImagePicker.js +1 -1
- package/dist/components/AppInfoTip.js +1 -1
- package/dist/components/AppInput.js +1 -1
- package/dist/components/AppKpiTile.js +1 -1
- package/dist/components/AppLeadPopup.js +1 -1
- package/dist/components/AppMentionInput.js +1 -1
- package/dist/components/AppMeter.js +1 -1
- package/dist/components/AppMetricStrip.js +1 -1
- package/dist/components/AppModal.js +1 -1
- package/dist/components/AppMultiSelect.js +1 -1
- package/dist/components/AppNavList.js +1 -1
- package/dist/components/AppNumberInput.js +1 -1
- package/dist/components/AppOnboardingChecklist.js +1 -1
- package/dist/components/AppOtpInput.js +1 -1
- package/dist/components/AppPageHeader.js +1 -1
- package/dist/components/AppPhoneNumberInput.js +1 -1
- package/dist/components/AppPopover.js +1 -1
- package/dist/components/AppProgress.js +1 -1
- package/dist/components/AppRadio.js +1 -1
- package/dist/components/AppRadioGroup.js +1 -1
- package/dist/components/AppRating.js +1 -1
- package/dist/components/AppRepeater.js +1 -1
- package/dist/components/AppResourceCard.js +1 -1
- package/dist/components/AppRichText.js +1 -1
- package/dist/components/AppRouteError.js +1 -1
- package/dist/components/AppScoreScale.js +1 -1
- package/dist/components/AppSectionHero.js +1 -1
- package/dist/components/AppSectionLeadCapture.js +1 -1
- package/dist/components/AppSelect.js +1 -1
- package/dist/components/AppShell.js +1 -1
- package/dist/components/AppSlider.js +1 -1
- package/dist/components/AppSplash.js +1 -1
- package/dist/components/AppSplitButton.js +1 -1
- package/dist/components/AppStatusBadge.js +1 -1
- package/dist/components/AppStepper.js +1 -1
- package/dist/components/AppSwitch.js +1 -1
- package/dist/components/AppTabs.js +1 -1
- package/dist/components/AppTagInput.js +1 -1
- package/dist/components/AppTextarea.js +1 -1
- package/dist/components/AppTimePicker.js +1 -1
- package/dist/components/AppTimeline.js +1 -1
- package/dist/components/AppToolbar.js +1 -1
- package/dist/components/AppTooltip.js +1 -1
- package/dist/components/AppUpdateBar.js +1 -1
- package/dist/components/AppWizard.js +1 -1
- package/dist/guidance.json +39 -46
- package/dist/lib/DiscardPrompt.js +1 -1
- package/dist/lib/buttonClass.js +1 -0
- package/dist/lib/sectionShell.js +1 -1
- package/dist/lib/vocabulary.js +1 -0
- package/dist/types/components/AppActionIcon.d.ts +3 -12
- package/dist/types/components/AppAutocomplete.d.ts +1 -1
- package/dist/types/components/AppBanner.d.ts +2 -2
- package/dist/types/components/AppButton.d.ts +9 -5
- package/dist/types/components/AppCard.d.ts +3 -3
- package/dist/types/components/AppChart.d.ts +7 -0
- package/dist/types/components/AppCheckbox.d.ts +1 -1
- package/dist/types/components/AppColorField.d.ts +2 -2
- package/dist/types/components/AppConfirmDialog.d.ts +6 -12
- package/dist/types/components/AppConfirmProvider.d.ts +5 -6
- package/dist/types/components/AppConsentBanner.d.ts +3 -3
- package/dist/types/components/AppContextMenu.d.ts +2 -2
- package/dist/types/components/AppCopyButton.d.ts +8 -2
- package/dist/types/components/AppCountrySelect.d.ts +1 -1
- package/dist/types/components/AppDatePicker.d.ts +2 -2
- package/dist/types/components/AppDateRangePicker.d.ts +1 -1
- package/dist/types/components/AppDropZone.d.ts +2 -2
- package/dist/types/components/AppDropdown.d.ts +7 -7
- package/dist/types/components/AppEmptyState.d.ts +3 -3
- package/dist/types/components/AppFilePicker.d.ts +5 -5
- package/dist/types/components/AppFloatingButton.d.ts +10 -4
- package/dist/types/components/AppImagePicker.d.ts +4 -4
- package/dist/types/components/AppInput.d.ts +1 -1
- package/dist/types/components/AppLeadPopup.d.ts +1 -1
- package/dist/types/components/AppMentionInput.d.ts +1 -1
- package/dist/types/components/AppModal.d.ts +3 -3
- package/dist/types/components/AppMultiSelect.d.ts +2 -2
- package/dist/types/components/AppNumberInput.d.ts +1 -1
- package/dist/types/components/AppOnboardingChecklist.d.ts +3 -3
- package/dist/types/components/AppOtpInput.d.ts +2 -2
- package/dist/types/components/AppPhoneNumberInput.d.ts +1 -1
- package/dist/types/components/AppPopover.d.ts +5 -5
- package/dist/types/components/AppRadio.d.ts +1 -1
- package/dist/types/components/AppRadioGroup.d.ts +2 -2
- package/dist/types/components/AppRating.d.ts +3 -3
- package/dist/types/components/AppRepeater.d.ts +3 -3
- package/dist/types/components/AppResourceCard.d.ts +2 -2
- package/dist/types/components/AppRichText.d.ts +3 -3
- package/dist/types/components/AppScoreScale.d.ts +3 -3
- package/dist/types/components/AppSectionLeadCapture.d.ts +2 -2
- package/dist/types/components/AppSelect.d.ts +1 -1
- package/dist/types/components/AppShell.d.ts +4 -4
- package/dist/types/components/AppSlider.d.ts +1 -1
- package/dist/types/components/AppSplash.d.ts +2 -2
- package/dist/types/components/AppSplitButton.d.ts +10 -4
- package/dist/types/components/AppSwitch.d.ts +2 -2
- package/dist/types/components/AppTagInput.d.ts +2 -2
- package/dist/types/components/AppTextarea.d.ts +1 -1
- package/dist/types/components/AppTimePicker.d.ts +2 -2
- package/dist/types/components/AppToolbar.d.ts +3 -3
- package/dist/types/components/AppTooltip.d.ts +7 -4
- package/dist/types/components/AppUpdateBar.d.ts +4 -4
- package/dist/types/lib/buttonClass.d.ts +9 -0
- package/dist/types/lib/sectionShell.d.ts +0 -1
- package/dist/types/lib/vocabulary.d.ts +3 -0
- package/dist/web-core/dist/query/listQuery.js +1 -0
- package/package.json +7 -6
|
@@ -19,7 +19,7 @@ import "@webority/ui-elements/elements/context-menu";
|
|
|
19
19
|
* the parity check reads the first signature it finds as the component's public props.
|
|
20
20
|
*
|
|
21
21
|
* @param {object} props
|
|
22
|
-
* @param {{ key: string, label?: string, icon?: string|import('react').ReactNode, image?: string, hint?: string, shortcut?: string, checked?: boolean, to?: string, onClick?: () => void,
|
|
22
|
+
* @param {{ key: string, label?: string, icon?: string|import('react').ReactNode, image?: string, hint?: string, shortcut?: string, checked?: boolean, to?: string, onClick?: () => void, tone?: 'danger', disabled?: boolean, divider?: boolean, searchable?: boolean, searchPlaceholder?: string, items?: object[] }[]} [props.items]
|
|
23
23
|
* A row's `shortcut` is the key that runs it, such as "E": a key chip at the row's end and `aria-keyshortcuts`. The page binds the key itself.
|
|
24
24
|
* @param {string} [props.target]
|
|
25
25
|
* @param {string} [props.trigger] A CSS selector inside the region; a click or Enter on a match opens the menu under it.
|
|
@@ -50,7 +50,7 @@ export default function AppContextMenu(props: {
|
|
|
50
50
|
checked?: boolean;
|
|
51
51
|
to?: string;
|
|
52
52
|
onClick?: () => void;
|
|
53
|
-
|
|
53
|
+
tone?: 'danger';
|
|
54
54
|
disabled?: boolean;
|
|
55
55
|
divider?: boolean;
|
|
56
56
|
searchable?: boolean;
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* @param {string} [props.copiedLabel]
|
|
12
12
|
* @param {boolean} [props.iconOnly]
|
|
13
13
|
* @param {"sm"|"md"|"lg"} [props.size]
|
|
14
|
-
* @param {"
|
|
14
|
+
* @param {"primary"|"success"|"warning"|"danger"|"info"|"neutral"} [props.tone]
|
|
15
|
+
* @param {"solid"|"soft"|"outline"|"ghost"|"link"|"glass"} [props.variant]
|
|
15
16
|
* @param {() => void} [props.onCopied] Callback fired on successful copy
|
|
16
17
|
* @param {string} [props.className]
|
|
17
18
|
* @param {string} [props.tooltip]
|
|
@@ -40,11 +41,16 @@ export default function AppCopyButton(props: {
|
|
|
40
41
|
* @default "md"
|
|
41
42
|
*/
|
|
42
43
|
size?: "sm" | "md" | "lg";
|
|
44
|
+
/**
|
|
45
|
+
* Semantic colour.
|
|
46
|
+
* @default "primary"
|
|
47
|
+
*/
|
|
48
|
+
tone?: "primary" | "success" | "warning" | "danger" | "info" | "neutral";
|
|
43
49
|
/**
|
|
44
50
|
* Button variant.
|
|
45
51
|
* @default "ghost"
|
|
46
52
|
*/
|
|
47
|
-
variant?: "
|
|
53
|
+
variant?: "solid" | "soft" | "outline" | "ghost" | "link" | "glass";
|
|
48
54
|
onCopied?: () => void;
|
|
49
55
|
/**
|
|
50
56
|
* Custom className.
|
|
@@ -69,7 +69,7 @@ declare const AppCountrySelect: import("react").ForwardRefExoticComponent<{
|
|
|
69
69
|
/** Error message shown under the field; marks the control invalid. */
|
|
70
70
|
error?: string;
|
|
71
71
|
/** Help text shown under the field when there is no error. */
|
|
72
|
-
|
|
72
|
+
helperText?: string;
|
|
73
73
|
/** Help content shown in an info tip beside the label. */
|
|
74
74
|
help?: import('react').ReactNode;
|
|
75
75
|
/**
|
|
@@ -21,7 +21,7 @@ declare const AppDatePicker: import("react").ForwardRefExoticComponent<{
|
|
|
21
21
|
*/
|
|
22
22
|
optionalLabel?: string;
|
|
23
23
|
/** Help text shown under the control. */
|
|
24
|
-
|
|
24
|
+
helperText?: string;
|
|
25
25
|
/** An error message shown under the control. */
|
|
26
26
|
error?: string;
|
|
27
27
|
/** The form field name the ISO date posts under. */
|
|
@@ -75,7 +75,7 @@ declare const AppDatePicker: import("react").ForwardRefExoticComponent<{
|
|
|
75
75
|
*/
|
|
76
76
|
className?: string;
|
|
77
77
|
/**
|
|
78
|
-
* Classes for the field wrapper that holds the label,
|
|
78
|
+
* Classes for the field wrapper that holds the label, helper text and error.
|
|
79
79
|
* @default ""
|
|
80
80
|
*/
|
|
81
81
|
fieldClassName?: string;
|
|
@@ -37,7 +37,7 @@ declare const AppDateRangePicker: import("react").ForwardRefExoticComponent<{
|
|
|
37
37
|
*/
|
|
38
38
|
optionalLabel?: string;
|
|
39
39
|
/** Help text shown under the control. */
|
|
40
|
-
|
|
40
|
+
helperText?: string;
|
|
41
41
|
/** An error message shown under the control. */
|
|
42
42
|
error?: string;
|
|
43
43
|
/** Form field name the start date posts under. */
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @param {string} [props.accept]
|
|
14
14
|
* @param {number} [props.maxSizeMb]
|
|
15
15
|
* @param {string} [props.error]
|
|
16
|
-
* @param {string} [props.
|
|
16
|
+
* @param {string} [props.helperText]
|
|
17
17
|
* @param {boolean} [props.disabled]
|
|
18
18
|
* @param {string} [props.className]
|
|
19
19
|
* @param {string} [props.fieldClassName]
|
|
@@ -44,7 +44,7 @@ export default function AppDropZone(props: {
|
|
|
44
44
|
/** Message below the zone; also styles the zone as errored. */
|
|
45
45
|
error?: string;
|
|
46
46
|
/** Helper text below the zone; an error, the caller's or a rejected pick's, replaces it while it shows. */
|
|
47
|
-
|
|
47
|
+
helperText?: string;
|
|
48
48
|
/**
|
|
49
49
|
* Blocks click and drop.
|
|
50
50
|
* @default false
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* @param {string} [props.label]
|
|
20
20
|
* @param {"start"|"end"} [props.align]
|
|
21
21
|
* @param {string} [props.ariaLabel]
|
|
22
|
-
* @param {{ key: string, label?: string, icon?: string|import('react').ReactNode, image?: string, to?: string, onClick?: () => void,
|
|
22
|
+
* @param {{ key: string, label?: string, icon?: string|import('react').ReactNode, image?: string, to?: string, onClick?: () => void, tone?: 'danger', disabled?: boolean, disabledReason?: string, shortcut?: string, divider?: boolean, header?: string, hiddenFrom?: 'sm'|'md'|'lg'|'xl' }[]} [props.items]
|
|
23
23
|
* @param {string} [props.menuClassName]
|
|
24
24
|
* @param {import('react').ElementType} [props.linkComponent] Component for `to` items (e.g. Link).
|
|
25
25
|
* @param {import('react').ReactNode} [props.children] Rich menu content — renders inside the
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
* wins when both are given. The icon toggle and react-bootstrap's open/close, outside-click,
|
|
29
29
|
* focus and Escape behavior are unchanged either way.
|
|
30
30
|
* @param {import('react').ReactNode} [props.trigger]
|
|
31
|
-
* @param {boolean} [props.
|
|
32
|
-
* @param {(
|
|
31
|
+
* @param {boolean} [props.open]
|
|
32
|
+
* @param {(open: boolean, meta: { source?: string, originalEvent?: Event }) => void} [props.onOpenChange]
|
|
33
33
|
* Called whenever the menu asks to open or close: a toggle click, an outside click, Escape, an item
|
|
34
34
|
* pick (react-bootstrap's `source`), and the close on a scroll that moves the toggle or a window
|
|
35
35
|
* resize (`source` "scroll" or "resize"). Fires in both modes.
|
|
@@ -65,7 +65,7 @@ export default function AppDropdown(props: {
|
|
|
65
65
|
image?: string;
|
|
66
66
|
to?: string;
|
|
67
67
|
onClick?: () => void;
|
|
68
|
-
|
|
68
|
+
tone?: 'danger';
|
|
69
69
|
disabled?: boolean;
|
|
70
70
|
disabledReason?: string;
|
|
71
71
|
shortcut?: string;
|
|
@@ -82,9 +82,9 @@ export default function AppDropdown(props: {
|
|
|
82
82
|
children?: import('react').ReactNode;
|
|
83
83
|
/** A custom trigger drawn inside the toggle button instead of the icon, such as an account chip or a labelled sort button. It wins over icon. The button keeps its open state, keyboard behavior and accessible role. */
|
|
84
84
|
trigger?: import('react').ReactNode;
|
|
85
|
-
/** Controlled open state. Leave it out and the menu manages its own; set it and the caller owns it, updating it from
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
/** Controlled open state. Leave it out and the menu manages its own; set it and the caller owns it, updating it from onOpenChange. */
|
|
86
|
+
open?: boolean;
|
|
87
|
+
onOpenChange?: (open: boolean, meta: {
|
|
88
88
|
source?: string;
|
|
89
89
|
originalEvent?: Event;
|
|
90
90
|
}) => void;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* look has no tighter scale, so `size="sm"` with `variant="table"` warns in dev.
|
|
9
9
|
*
|
|
10
10
|
* `size` picks the type scale: "md" (default) is the page/card empty state; "sm" is
|
|
11
|
-
* the tighter widget/tile variant (smaller title +
|
|
11
|
+
* the tighter widget/tile variant (smaller title + description).
|
|
12
12
|
*
|
|
13
13
|
* @param {object} props
|
|
14
14
|
* @param {string|import('react').ReactNode} [props.icon]
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* @param {"md"|"sm"} [props.size]
|
|
18
18
|
* @param {"card"|"table"} [props.variant]
|
|
19
19
|
* @param {import('react').ReactNode} props.title
|
|
20
|
-
* @param {import('react').ReactNode} [props.
|
|
20
|
+
* @param {import('react').ReactNode} [props.description]
|
|
21
21
|
* @param {import('react').ReactNode} [props.action]
|
|
22
22
|
* @param {string} [props.className]
|
|
23
23
|
* @param {import('react').CSSProperties} [props.style]
|
|
@@ -45,7 +45,7 @@ export default function AppEmptyState(props: {
|
|
|
45
45
|
/** The headline of the empty state. */
|
|
46
46
|
title: import('react').ReactNode;
|
|
47
47
|
/** Body text under the title. */
|
|
48
|
-
|
|
48
|
+
description?: import('react').ReactNode;
|
|
49
49
|
/** The next step shown below the text, usually an AppButton. */
|
|
50
50
|
action?: import('react').ReactNode;
|
|
51
51
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* file is chosen (hover to change, × to remove). With `multiple`, the dropzone stays put and
|
|
4
4
|
* picked files stack in a list inside it, below the prompt (image thumbnail or file-type icon +
|
|
5
5
|
* name/size, each removable). Accepts freshly-picked Files or existing `{ url, name }` values; reports the
|
|
6
|
-
* choice via
|
|
6
|
+
* choice via onChange: a File|null in single mode, a File[] in multiple mode.
|
|
7
7
|
*
|
|
8
8
|
* Not just images: widen `accept` (e.g. "image/*,application/pdf") and non-image files show a
|
|
9
9
|
* file-type icon instead of a thumbnail. A single PDF shows its first page instead, drawn by the
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* @param {File|{ url: string, name?: string }|Array<File|{ url: string, name?: string }>|null} [props.value]
|
|
15
15
|
* @param {string} [props.name]
|
|
16
16
|
* @param {string} [props.id]
|
|
17
|
-
* @param {(file: File|null) => void | (files: File[]) => void} props.
|
|
17
|
+
* @param {(file: File|null) => void | (files: File[]) => void} props.onChange single → File|null; multiple → File[]
|
|
18
18
|
* @param {boolean} [props.multiple]
|
|
19
19
|
* @param {"dropzone" | "button"} [props.variant] dropzone (default) | button: a small outline button that opens the file dialog; no previews.
|
|
20
20
|
* @param {string} [props.buttonLabel] The button form's text.
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* @param {boolean} [props.required]
|
|
33
33
|
* @param {boolean} [props.optional] Ends the label with "(optional)". Required wins when both are set.
|
|
34
34
|
* @param {string} [props.error]
|
|
35
|
-
* @param {string} [props.
|
|
35
|
+
* @param {string} [props.helperText]
|
|
36
36
|
* @param {boolean} [props.loading]
|
|
37
37
|
* @param {boolean} [props.readOnly] Shows the value but blocks picking, dropping, changing and removing. The control takes aria-readonly.
|
|
38
38
|
* @param {"sm"|"md"|"lg"} [props.size] The control height: sm, md or lg.
|
|
@@ -58,7 +58,7 @@ export default function AppFilePicker(props: {
|
|
|
58
58
|
name?: string;
|
|
59
59
|
/** DOM id for the file input and its labels' for target. */
|
|
60
60
|
id?: string;
|
|
61
|
-
|
|
61
|
+
onChange: (file: File | null) => void | ((files: File[]) => void);
|
|
62
62
|
/**
|
|
63
63
|
* Lets the person pick several files. They stack in a list inside the dropzone.
|
|
64
64
|
* @default false
|
|
@@ -133,7 +133,7 @@ export default function AppFilePicker(props: {
|
|
|
133
133
|
/** A message from the page, shown below the control. */
|
|
134
134
|
error?: string;
|
|
135
135
|
/** Helper text below the control. An error (the page's or a rejected pick's) replaces it while it shows. */
|
|
136
|
-
|
|
136
|
+
helperText?: string;
|
|
137
137
|
/**
|
|
138
138
|
* Spinner over the control and picking blocked, for example while the chosen file uploads.
|
|
139
139
|
* @default false
|
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
* @param {"end"|"start"} [props.position="end"] Bottom corner of the stack.
|
|
13
13
|
* @param {"primary"|"secondary"} [props.order="primary"] Slot in the stack: primary sits in the corner, secondary stacks above it.
|
|
14
14
|
* @param {"sm"|"md"|"lg"} [props.size="md"] 40px, 48px, 56px circle.
|
|
15
|
-
* @param {"primary"|"
|
|
16
|
-
*
|
|
15
|
+
* @param {"primary"|"success"|"warning"|"danger"|"info"|"neutral"} [props.tone="primary"]
|
|
16
|
+
* @param {"solid"|"soft"|"outline"|"ghost"|"link"|"glass"} [props.variant="solid"]
|
|
17
|
+
* Any AppButton tone and variant.
|
|
17
18
|
* @param {boolean} [props.stacked=true] false renders the bare button with no portal and no stack item (caller places it).
|
|
18
19
|
* @param {boolean} [props.disabled=false]
|
|
19
20
|
* @param {string} [props.className]
|
|
@@ -41,10 +42,15 @@ export default function AppFloatingButton(props: {
|
|
|
41
42
|
*/
|
|
42
43
|
size?: "sm" | "md" | "lg";
|
|
43
44
|
/**
|
|
44
|
-
* Button
|
|
45
|
+
* Button tone.
|
|
45
46
|
* @default "primary"
|
|
46
47
|
*/
|
|
47
|
-
|
|
48
|
+
tone?: "primary" | "success" | "warning" | "danger" | "info" | "neutral";
|
|
49
|
+
/**
|
|
50
|
+
* Button variant.
|
|
51
|
+
* @default "solid"
|
|
52
|
+
*/
|
|
53
|
+
variant?: "solid" | "soft" | "outline" | "ghost" | "link" | "glass";
|
|
48
54
|
/**
|
|
49
55
|
* False renders the bare button with no stack item; the caller places it.
|
|
50
56
|
* @default true
|
|
@@ -8,7 +8,7 @@ import "@webority/ui-elements/elements/image-crop";
|
|
|
8
8
|
* @param {import('react').ReactNode} [props.fallback] Shown with no image.
|
|
9
9
|
* @param {"initials"|"avatar"} [props.variant] With no fallback, "avatar" draws a person glyph. Default "initials".
|
|
10
10
|
* @param {string} [props.name] Field name; the chosen file (the crop when cropping) is written into the named file input.
|
|
11
|
-
* @param {(file: File) => void} [props.
|
|
11
|
+
* @param {(file: File) => void} [props.onChange]
|
|
12
12
|
* @param {() => void} [props.onRemove] Shows Remove when given.
|
|
13
13
|
* @param {string} [props.removeName] Hidden field set to "true" after Remove, for a posted form.
|
|
14
14
|
* @param {boolean} [props.loading]
|
|
@@ -31,7 +31,7 @@ import "@webority/ui-elements/elements/image-crop";
|
|
|
31
31
|
* @param {string} [props.removeLabel] Default "Remove photo".
|
|
32
32
|
* @param {string} [props.ariaLabel] Default "Upload photo".
|
|
33
33
|
* @param {import('react').ReactNode} [props.label]
|
|
34
|
-
* @param {string} [props.
|
|
34
|
+
* @param {string} [props.helperText]
|
|
35
35
|
* @param {string} [props.error]
|
|
36
36
|
* @param {boolean} [props.required]
|
|
37
37
|
* @param {boolean} [props.optional] Ends the label with "(optional)". Required wins when both are set.
|
|
@@ -68,7 +68,7 @@ export default function AppImagePicker(props: {
|
|
|
68
68
|
variant?: "initials" | "avatar";
|
|
69
69
|
/** The form field name. The chosen file, or the crop when cropping, is written into the file input, so an uncontrolled form posts it. */
|
|
70
70
|
name?: string;
|
|
71
|
-
|
|
71
|
+
onChange?: (file: File) => void;
|
|
72
72
|
onRemove?: () => void;
|
|
73
73
|
/** A form field that posts true once Remove is pressed. */
|
|
74
74
|
removeName?: string;
|
|
@@ -137,7 +137,7 @@ export default function AppImagePicker(props: {
|
|
|
137
137
|
/** An optional field label above the picker. */
|
|
138
138
|
label?: import('react').ReactNode;
|
|
139
139
|
/** Help text under the picker. An error replaces it. */
|
|
140
|
-
|
|
140
|
+
helperText?: string;
|
|
141
141
|
/** An error from the caller. It wins over a rejection reason. */
|
|
142
142
|
error?: string;
|
|
143
143
|
/**
|
|
@@ -14,7 +14,7 @@ declare const AppInput: import("react").ForwardRefExoticComponent<{
|
|
|
14
14
|
/** A validation message under the field. It marks the control invalid for assistive technology. */
|
|
15
15
|
error?: string;
|
|
16
16
|
/** Help text under the field. An error replaces it while both are set. */
|
|
17
|
-
|
|
17
|
+
helperText?: string;
|
|
18
18
|
/** Text shown in an empty field. */
|
|
19
19
|
placeholder?: string;
|
|
20
20
|
/** The content of the info-tip beside the label, opened by a button. */
|
|
@@ -5,7 +5,7 @@ declare const AppLeadPopup: import("react").ForwardRefExoticComponent<{
|
|
|
5
5
|
/** The server's PublicForm name, used as the captcha action. */
|
|
6
6
|
publicForm: string;
|
|
7
7
|
/** The dialog's heading, and its accessible name. */
|
|
8
|
-
|
|
8
|
+
title: string;
|
|
9
9
|
/** A sentence under the heading. */
|
|
10
10
|
description?: string;
|
|
11
11
|
/**
|
|
@@ -72,7 +72,7 @@ declare const AppMentionInput: import("react").ForwardRefExoticComponent<{
|
|
|
72
72
|
/** An error message shown under the box. */
|
|
73
73
|
error?: string;
|
|
74
74
|
/** Helper text shown under the box when there is no error. */
|
|
75
|
-
|
|
75
|
+
helperText?: string;
|
|
76
76
|
/**
|
|
77
77
|
* Marks the field as required.
|
|
78
78
|
* @default false
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @param {import('react').ReactNode} [props.title]
|
|
8
8
|
* @param {import('react').ReactNode} [props.subtitle]
|
|
9
9
|
* @param {string} [props.headerIcon]
|
|
10
|
-
* @param {'
|
|
10
|
+
* @param {'neutral'|'danger'|'success'|'warning'} [props.tone]
|
|
11
11
|
* @param {boolean} [props.dismissible]
|
|
12
12
|
* @param {() => void} props.onClose
|
|
13
13
|
* @param {() => void} [props.onBack] Shows a back arrow before the title and runs this when it is pressed.
|
|
@@ -38,9 +38,9 @@ export default function AppModal(props: {
|
|
|
38
38
|
headerIcon?: string;
|
|
39
39
|
/**
|
|
40
40
|
* Tints the header icon and eyebrow to signal intent, such as a destructive or a success dialog.
|
|
41
|
-
* @default "
|
|
41
|
+
* @default "neutral"
|
|
42
42
|
*/
|
|
43
|
-
tone?: '
|
|
43
|
+
tone?: 'neutral' | 'danger' | 'success' | 'warning';
|
|
44
44
|
/**
|
|
45
45
|
* Shows the close button in the header. Pair it with staticBackdrop for a forced-choice dialog.
|
|
46
46
|
* @default true
|
|
@@ -72,8 +72,8 @@ declare const AppMultiSelect: import("react").ForwardRefExoticComponent<{
|
|
|
72
72
|
label?: import('react').ReactNode;
|
|
73
73
|
/** An error message shown under the control. */
|
|
74
74
|
error?: string;
|
|
75
|
-
/**
|
|
76
|
-
|
|
75
|
+
/** Helper text shown under the control. */
|
|
76
|
+
helperText?: string;
|
|
77
77
|
/**
|
|
78
78
|
* Marks the field as required.
|
|
79
79
|
* @default false
|
|
@@ -17,7 +17,7 @@ declare const AppNumberInput: import("react").ForwardRefExoticComponent<{
|
|
|
17
17
|
/** An error message under the field. It sets the error state and aria-invalid on the input. */
|
|
18
18
|
error?: string;
|
|
19
19
|
/** Help text under the field, linked to the input for screen readers. */
|
|
20
|
-
|
|
20
|
+
helperText?: string;
|
|
21
21
|
/** Text shown in the empty field. */
|
|
22
22
|
placeholder?: string;
|
|
23
23
|
/** Content for the info-tip beside the label. The caller supplies the node. */
|
|
@@ -7,7 +7,7 @@ import "@webority/ui-elements/elements/onboarding-checklist";
|
|
|
7
7
|
* "Show setup checklist" button, and a checklist whose every step is done or skipped starts collapsed.
|
|
8
8
|
*
|
|
9
9
|
* It keeps its own collapsed and dismissed state after the first render (`defaultCollapsed`,
|
|
10
|
-
* `defaultDismissed`); `
|
|
10
|
+
* `defaultDismissed`); `onClose`, `onRestore` and `onCollapsedChange` report changes. With
|
|
11
11
|
* `storageKey` a dismissal is remembered in the browser. Wraps `<wui-onboarding-checklist>`, which
|
|
12
12
|
* Razor `<app-onboarding-checklist>` renders too.
|
|
13
13
|
*
|
|
@@ -19,7 +19,7 @@ import "@webority/ui-elements/elements/onboarding-checklist";
|
|
|
19
19
|
* @param {string} [props.storageKey]
|
|
20
20
|
* @param {string} [props.dismissLabel]
|
|
21
21
|
* @param {string} [props.restoreLabel]
|
|
22
|
-
* @param {() => void} [props.
|
|
22
|
+
* @param {() => void} [props.onClose] Called when the checklist is dismissed.
|
|
23
23
|
* @param {() => void} [props.onRestore] Called when a dismissed checklist is brought back.
|
|
24
24
|
* @param {(collapsed: boolean) => void} [props.onCollapsedChange] Called when the heading collapses or expands the steps.
|
|
25
25
|
* @param {import('react').ElementType} [props.linkComponent]
|
|
@@ -58,7 +58,7 @@ export default function AppOnboardingChecklist(props: {
|
|
|
58
58
|
* @default "Show setup checklist"
|
|
59
59
|
*/
|
|
60
60
|
restoreLabel?: string;
|
|
61
|
-
|
|
61
|
+
onClose?: () => void;
|
|
62
62
|
onRestore?: () => void;
|
|
63
63
|
onCollapsedChange?: (collapsed: boolean) => void;
|
|
64
64
|
linkComponent?: import('react').ElementType;
|
|
@@ -32,8 +32,8 @@ declare const AppOtpInput: import("react").ForwardRefExoticComponent<{
|
|
|
32
32
|
*/
|
|
33
33
|
optionalLabel?: string;
|
|
34
34
|
/** Help text under the code. It is hidden while an error is shown. */
|
|
35
|
-
|
|
36
|
-
/** The error message under the code. It replaces the
|
|
35
|
+
helperText?: string;
|
|
36
|
+
/** The error message under the code. It replaces the helper text and marks the field invalid. */
|
|
37
37
|
error?: string;
|
|
38
38
|
/**
|
|
39
39
|
* Disables the field so the code cannot be entered.
|
|
@@ -58,7 +58,7 @@ declare const AppPhoneNumberInput: import("react").ForwardRefExoticComponent<{
|
|
|
58
58
|
*/
|
|
59
59
|
optionalLabel?: string;
|
|
60
60
|
/** Help text under the field. The error replaces it while one is shown. */
|
|
61
|
-
|
|
61
|
+
helperText?: string;
|
|
62
62
|
/** An error message under the field, which also turns the border red. */
|
|
63
63
|
error?: string;
|
|
64
64
|
/**
|
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
* @param {string} [props.title]
|
|
12
12
|
* @param {'top'|'bottom'|'start'|'end'|'auto'} [props.placement]
|
|
13
13
|
* @param {'click'|'hover'|'focus'|('click'|'hover'|'focus')[]} [props.triggerType]
|
|
14
|
-
* @param {(
|
|
14
|
+
* @param {(open: boolean) => void} [props.onOpenChange] Callback fired when the panel opens/closes.
|
|
15
15
|
* @param {string} [props.className]
|
|
16
|
-
* @param {boolean} [props.
|
|
16
|
+
* @param {boolean} [props.open]
|
|
17
17
|
* @param {'dialog'} [props.role]
|
|
18
18
|
* @param {string} [props.labelledBy]
|
|
19
19
|
* @param {boolean} [props.autoFocus]
|
|
20
20
|
* @param {number} [props.openDelay] Milliseconds a hover popover waits before it opens.
|
|
21
21
|
* @param {number} [props.closeDelay] Milliseconds a hover popover waits before it closes after the pointer leaves the trigger and the panel.
|
|
22
22
|
*/
|
|
23
|
-
export default function AppPopover({ trigger, children, title, placement, triggerType,
|
|
23
|
+
export default function AppPopover({ trigger, children, title, placement, triggerType, onOpenChange, className, open, role, labelledBy, autoFocus, openDelay, closeDelay, ...rest }: {
|
|
24
24
|
/** The element the panel opens from. It must be a single element that forwards a ref, such as a plain element, AppButton or AppActionIcon. */
|
|
25
25
|
trigger: import('react').ReactElement;
|
|
26
26
|
children: import('react').ReactNode;
|
|
@@ -32,14 +32,14 @@ export default function AppPopover({ trigger, children, title, placement, trigge
|
|
|
32
32
|
*/
|
|
33
33
|
placement?: 'top' | 'bottom' | 'start' | 'end' | 'auto';
|
|
34
34
|
triggerType?: 'click' | 'hover' | 'focus' | ('click' | 'hover' | 'focus')[];
|
|
35
|
-
|
|
35
|
+
onOpenChange?: (open: boolean) => void;
|
|
36
36
|
/**
|
|
37
37
|
* Extra classes on the popover panel.
|
|
38
38
|
* @default ""
|
|
39
39
|
*/
|
|
40
40
|
className?: string;
|
|
41
41
|
/** Controls the open state. When set, the panel follows it. */
|
|
42
|
-
|
|
42
|
+
open?: boolean;
|
|
43
43
|
/** dialog names the panel after the title or labelledBy, marks it not modal, and lets Escape close it. */
|
|
44
44
|
role?: 'dialog';
|
|
45
45
|
/** The id of the element that names a dialog panel. It wins over the title. */
|
|
@@ -32,7 +32,7 @@ declare const AppRadio: import("react").ForwardRefExoticComponent<{
|
|
|
32
32
|
/** Error message, rendered below the control. Replaces the hint. */
|
|
33
33
|
error?: string;
|
|
34
34
|
/** Helper text below the control. Hidden while an error is shown. */
|
|
35
|
-
|
|
35
|
+
helperText?: string;
|
|
36
36
|
/** Content for the info-tip after the label. Shown only when a label is set. */
|
|
37
37
|
help?: import('react').ReactNode;
|
|
38
38
|
/**
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @param {boolean} [props.loading] Shows a busy state and blocks input while data loads.
|
|
25
25
|
* @param {'sm'|'md'|'lg'} [props.size] Steps the radios and their labels.
|
|
26
26
|
* @param {string} [props.error]
|
|
27
|
-
* @param {string} [props.
|
|
27
|
+
* @param {string} [props.helperText]
|
|
28
28
|
* @param {import('react').ReactNode} [props.help]
|
|
29
29
|
* @param {string} [props.helpLabel]
|
|
30
30
|
* @param {string} [props.id]
|
|
@@ -97,7 +97,7 @@ export default function AppRadioGroup(props: {
|
|
|
97
97
|
/** Error message below the group. Replaces the hint. */
|
|
98
98
|
error?: string;
|
|
99
99
|
/** Helper text below the group. */
|
|
100
|
-
|
|
100
|
+
helperText?: string;
|
|
101
101
|
/** Content for the label info-tip. */
|
|
102
102
|
help?: import('react').ReactNode;
|
|
103
103
|
/**
|
|
@@ -29,7 +29,7 @@ import "@webority/ui-elements/elements/rating";
|
|
|
29
29
|
* @param {boolean} [props.disabled]
|
|
30
30
|
* @param {boolean} [props.loading]
|
|
31
31
|
* @param {string} [props.error]
|
|
32
|
-
* @param {string} [props.
|
|
32
|
+
* @param {string} [props.helperText]
|
|
33
33
|
* @param {string} [props.id]
|
|
34
34
|
* @param {string} [props.className]
|
|
35
35
|
* @param {string} [props.fieldClassName]
|
|
@@ -111,10 +111,10 @@ export default function AppRating(props: {
|
|
|
111
111
|
* @default false
|
|
112
112
|
*/
|
|
113
113
|
loading?: boolean;
|
|
114
|
-
/** Input only: message below the stars. Replaces the
|
|
114
|
+
/** Input only: message below the stars. Replaces the helper text. */
|
|
115
115
|
error?: string;
|
|
116
116
|
/** Input only: helper text below the stars. */
|
|
117
|
-
|
|
117
|
+
helperText?: string;
|
|
118
118
|
/** The rating control's id; generated when left out. */
|
|
119
119
|
id?: string;
|
|
120
120
|
/**
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* @param {() => void} props.onAdd
|
|
22
22
|
* @param {(index: number) => void} [props.onRemove] Omit to make rows non-removable.
|
|
23
23
|
* @param {string} [props.addLabel]
|
|
24
|
-
* @param {string} [props.addVariant] An AppButton variant (
|
|
24
|
+
* @param {string} [props.addVariant] An AppButton variant (soft default, solid, outline, ghost, ...), or "link": the add control is then a small AppLink with a plus icon.
|
|
25
25
|
* @param {string} [props.removeLabel]
|
|
26
26
|
* @param {string} [props.emptyText]
|
|
27
27
|
* @param {number} [props.min]
|
|
@@ -44,8 +44,8 @@ export default function AppRepeater(props: {
|
|
|
44
44
|
*/
|
|
45
45
|
addLabel?: string;
|
|
46
46
|
/**
|
|
47
|
-
* The add control's variant: an AppButton variant such as
|
|
48
|
-
* @default "
|
|
47
|
+
* The add control's variant: an AppButton variant such as solid, outline or ghost, or link for a small text link with a plus icon. An unknown value warns in development.
|
|
48
|
+
* @default "soft"
|
|
49
49
|
*/
|
|
50
50
|
addVariant?: string;
|
|
51
51
|
/**
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @param {object} props
|
|
10
10
|
* @param {string} props.icon
|
|
11
11
|
* @param {string} props.title
|
|
12
|
-
* @param {string} [props.
|
|
12
|
+
* @param {string} [props.description] One line of supporting detail.
|
|
13
13
|
* @param {string} props.href
|
|
14
14
|
* @param {boolean} [props.external]
|
|
15
15
|
* @param {import('react').ElementType} [props.linkComponent] Router link (e.g. react-router's
|
|
@@ -23,7 +23,7 @@ export default function AppResourceCard(props: {
|
|
|
23
23
|
/** The resource's name. It is the link text. */
|
|
24
24
|
title: string;
|
|
25
25
|
/** One line of supporting detail. */
|
|
26
|
-
|
|
26
|
+
description?: string;
|
|
27
27
|
/** Where the card links to. */
|
|
28
28
|
href: string;
|
|
29
29
|
/**
|
|
@@ -10,10 +10,10 @@ declare const AppRichText: import("react").ForwardRefExoticComponent<{
|
|
|
10
10
|
name?: string;
|
|
11
11
|
/** The visible label above the editor. A string label also names the editor for screen readers. */
|
|
12
12
|
label?: import('react').ReactNode;
|
|
13
|
-
/** Message below the editor. It replaces the
|
|
13
|
+
/** Message below the editor. It replaces the helper text. */
|
|
14
14
|
error?: string;
|
|
15
15
|
/** Helper text below the editor. */
|
|
16
|
-
|
|
16
|
+
helperText?: string;
|
|
17
17
|
/**
|
|
18
18
|
* Marks the field required; an empty editor is invalid.
|
|
19
19
|
* @default false
|
|
@@ -36,7 +36,7 @@ declare const AppRichText: import("react").ForwardRefExoticComponent<{
|
|
|
36
36
|
loading?: boolean;
|
|
37
37
|
/** The starting value of an uncontrolled field. */
|
|
38
38
|
defaultValue?: string;
|
|
39
|
-
/** The id of the editor; the
|
|
39
|
+
/** The id of the editor; the helper text and error ids derive from it. Generated when omitted. */
|
|
40
40
|
id?: string;
|
|
41
41
|
/** Accessible name for the editor; defaults to a string `label`. */
|
|
42
42
|
ariaLabel?: string;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* @param {string} [props.name]
|
|
18
18
|
* @param {boolean} [props.disabled]
|
|
19
19
|
* @param {string} [props.error]
|
|
20
|
-
* @param {string} [props.
|
|
20
|
+
* @param {string} [props.helperText]
|
|
21
21
|
* @param {string} [props.id]
|
|
22
22
|
* @param {string} [props.className]
|
|
23
23
|
* @param {string} [props.fieldClassName]
|
|
@@ -50,10 +50,10 @@ export default function AppScoreScale(props: {
|
|
|
50
50
|
* @default false
|
|
51
51
|
*/
|
|
52
52
|
disabled?: boolean;
|
|
53
|
-
/** Message below the scale. Replaces the
|
|
53
|
+
/** Message below the scale. Replaces the helper text. */
|
|
54
54
|
error?: string;
|
|
55
55
|
/** Helper text below the scale. */
|
|
56
|
-
|
|
56
|
+
helperText?: string;
|
|
57
57
|
/** The id of the radio group; the label, hint and error ids derive from it. Generated when omitted. */
|
|
58
58
|
id?: string;
|
|
59
59
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The lead form section of a marketing page. The product saves the lead; the section only renders and validates.
|
|
3
3
|
* @param {object} props
|
|
4
4
|
* @param {import('react').ReactNode} props.title
|
|
5
|
-
* @param {import('react').ReactNode} [props.
|
|
5
|
+
* @param {import('react').ReactNode} [props.description]
|
|
6
6
|
* @param {{ name: "name"|"email"|"phone"|"company"|"message", label?: string, required?: boolean }[]} props.fields
|
|
7
7
|
* @param {(values: Record<string, string>) => Promise<void>} props.onSubmit A rejection shows its message in an AppAlert above the button.
|
|
8
8
|
* @param {string} [props.submitLabel] Default "Send".
|
|
@@ -29,7 +29,7 @@ export default function AppSectionLeadCapture(props: {
|
|
|
29
29
|
/** The section's heading. */
|
|
30
30
|
title: import('react').ReactNode;
|
|
31
31
|
/** A paragraph above the form. */
|
|
32
|
-
|
|
32
|
+
description?: import('react').ReactNode;
|
|
33
33
|
/** The fields in order: name, email, phone, company or message, each optionally labelled and required. */
|
|
34
34
|
fields: {
|
|
35
35
|
name: "name" | "email" | "phone" | "company" | "message";
|
|
@@ -100,7 +100,7 @@ declare const AppSelect: import("react").ForwardRefExoticComponent<{
|
|
|
100
100
|
/** Error message shown under the field. Marks the control invalid. */
|
|
101
101
|
error?: string;
|
|
102
102
|
/** Help text shown under the field when there is no error. */
|
|
103
|
-
|
|
103
|
+
helperText?: string;
|
|
104
104
|
/** Help content shown in an info tip beside the label. */
|
|
105
105
|
help?: import('react').ReactNode;
|
|
106
106
|
/**
|