@webority/ui-react 0.128.0 → 0.130.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/canvas-kit/kit.js +29757 -25503
- package/dist/canvas-kit/manifest.json +3343 -275
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppAccountSwitcher.js +1 -0
- package/dist/components/AppActionIcon.js +1 -1
- package/dist/components/AppAlert.js +1 -1
- package/dist/components/AppAsyncBlock.js +1 -1
- package/dist/components/AppAuthLayout.js +1 -0
- package/dist/components/AppAutocomplete.js +1 -1
- package/dist/components/AppAvatar.js +1 -1
- package/dist/components/AppAvatarGroup.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/AppCalendar.js +1 -1
- package/dist/components/AppCard.js +1 -1
- package/dist/components/AppCell.js +1 -0
- package/dist/components/AppChart.js +1 -1
- package/dist/components/AppChartCard.js +1 -1
- package/dist/components/AppCheckbox.js +1 -1
- package/dist/components/AppChip.js +1 -1
- package/dist/components/AppChoiceCard.js +1 -1
- package/dist/components/AppChoiceChip.js +1 -1
- package/dist/components/AppColorField.js +1 -1
- package/dist/components/AppCommandPalette.js +1 -1
- package/dist/components/AppCommentThread.js +1 -1
- package/dist/components/AppCompareTable.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/AppDataTable.js +1 -1
- package/dist/components/AppDatePicker.js +1 -1
- package/dist/components/AppDateRangePicker.js +1 -1
- package/dist/components/AppDescriptions.js +1 -1
- package/dist/components/AppDrawer.js +1 -1
- package/dist/components/AppDropZone.js +1 -1
- package/dist/components/AppDropdown.js +1 -1
- package/dist/components/AppDueDate.js +1 -1
- package/dist/components/AppEmptyState.js +1 -1
- package/dist/components/AppErrorBoundary.js +1 -0
- package/dist/components/AppFileAttachment.js +1 -1
- package/dist/components/AppFilePicker.js +1 -1
- package/dist/components/AppFileTiles.js +1 -1
- package/dist/components/AppFilterBar.js +1 -1
- package/dist/components/AppFloatingButton.js +1 -0
- package/dist/components/AppImagePicker.js +1 -1
- package/dist/components/AppInfoTip.js +1 -1
- package/dist/components/AppInlineEdit.js +1 -1
- package/dist/components/AppInput.js +1 -1
- package/dist/components/AppKanban.js +1 -1
- package/dist/components/AppKpiTile.js +1 -1
- package/dist/components/AppLeadPopup.js +1 -0
- package/dist/components/AppLink.js +1 -1
- package/dist/components/AppMarkdown.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/AppNotificationCenter.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/AppSearch.js +1 -1
- package/dist/components/AppSectionHero.js +1 -1
- package/dist/components/AppSectionLeadCapture.js +1 -1
- package/dist/components/AppSectionLogos.js +1 -1
- package/dist/components/AppSegmented.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/AppSortableList.js +1 -1
- package/dist/components/AppSparkline.js +1 -1
- package/dist/components/AppSplash.js +1 -1
- package/dist/components/AppSplitButton.js +1 -1
- package/dist/components/AppSplitView.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/AppTablePagination.js +1 -1
- package/dist/components/AppTableToolbar.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/AppToast.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/AppWhatsNew.js +1 -1
- package/dist/components/AppWizard.js +1 -1
- package/dist/components/AppWorkspaceSwitcher.js +1 -1
- package/dist/components/iconCatalogNames.g.js +1 -1
- package/dist/components/iconGlyphs.g.js +1 -1
- package/dist/components/iconVariants.g.js +1 -1
- package/dist/components/useWuiControl.js +1 -1
- package/dist/guidance.json +273 -47
- package/dist/lib/CheckField.js +1 -1
- package/dist/lib/DiscardPrompt.js +1 -1
- package/dist/lib/FileItemRow.js +1 -1
- package/dist/lib/buttonClass.js +1 -0
- package/dist/lib/fieldState.js +1 -0
- package/dist/lib/fillLabel.js +1 -0
- package/dist/lib/labelWithHelp.js +1 -0
- package/dist/lib/linkTarget.js +1 -0
- package/dist/lib/sectionShell.js +1 -1
- package/dist/lib/vocabulary.js +1 -0
- package/dist/markdown-core/dist/links.js +1 -1
- package/dist/types/components/AppAccountSwitcher.d.ts +41 -0
- package/dist/types/components/AppActionIcon.d.ts +3 -12
- package/dist/types/components/AppAsyncBlock.d.ts +24 -0
- package/dist/types/components/AppAuthLayout.d.ts +45 -0
- package/dist/types/components/AppAutocomplete.d.ts +23 -3
- package/dist/types/components/AppAvatar.d.ts +6 -0
- package/dist/types/components/AppAvatarGroup.d.ts +6 -0
- package/dist/types/components/AppBanner.d.ts +8 -2
- package/dist/types/components/AppButton.d.ts +9 -4
- package/dist/types/components/AppCalendar.d.ts +3 -1
- package/dist/types/components/AppCard.d.ts +16 -4
- package/dist/types/components/AppCell.d.ts +36 -0
- package/dist/types/components/AppChart.d.ts +14 -0
- package/dist/types/components/AppChartCard.d.ts +60 -0
- package/dist/types/components/AppCheckbox.d.ts +23 -1
- package/dist/types/components/AppChoiceCard.d.ts +21 -0
- package/dist/types/components/AppChoiceChip.d.ts +21 -0
- package/dist/types/components/AppColorField.d.ts +45 -6
- package/dist/types/components/AppCommandPalette.d.ts +6 -0
- package/dist/types/components/AppCommentThread.d.ts +102 -3
- package/dist/types/components/AppCompareTable.d.ts +24 -0
- package/dist/types/components/AppConfirmDialog.d.ts +10 -10
- 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 +6 -1
- package/dist/types/components/AppDataTable.d.ts +1 -1
- package/dist/types/components/AppDatePicker.d.ts +26 -2
- package/dist/types/components/AppDateRangePicker.d.ts +32 -2
- package/dist/types/components/AppDescriptions.d.ts +4 -1
- package/dist/types/components/AppDrawer.d.ts +6 -0
- package/dist/types/components/AppDropZone.d.ts +26 -2
- package/dist/types/components/AppDropdown.d.ts +7 -7
- package/dist/types/components/AppDueDate.d.ts +42 -0
- package/dist/types/components/AppEmptyState.d.ts +3 -3
- package/dist/types/components/AppErrorBoundary.d.ts +39 -0
- package/dist/types/components/AppFileAttachment.d.ts +54 -1
- package/dist/types/components/AppFilePicker.d.ts +80 -5
- package/dist/types/components/AppFileTiles.d.ts +6 -3
- package/dist/types/components/AppFilterBar.d.ts +73 -0
- package/dist/types/components/AppFloatingButton.d.ts +70 -0
- package/dist/types/components/AppImagePicker.d.ts +64 -4
- package/dist/types/components/AppInlineEdit.d.ts +6 -0
- package/dist/types/components/AppInput.d.ts +38 -3
- package/dist/types/components/AppKanban.d.ts +32 -0
- package/dist/types/components/AppLeadPopup.d.ts +122 -0
- package/dist/types/components/AppLink.d.ts +3 -0
- package/dist/types/components/AppMentionInput.d.ts +18 -1
- package/dist/types/components/AppMetricStrip.d.ts +2 -0
- package/dist/types/components/AppModal.d.ts +9 -3
- package/dist/types/components/AppMultiSelect.d.ts +20 -3
- package/dist/types/components/AppNotificationCenter.d.ts +2 -0
- package/dist/types/components/AppNumberInput.d.ts +25 -3
- package/dist/types/components/AppOnboardingChecklist.d.ts +3 -3
- package/dist/types/components/AppOtpInput.d.ts +31 -2
- package/dist/types/components/AppPhoneNumberInput.d.ts +25 -1
- package/dist/types/components/AppPopover.d.ts +5 -5
- package/dist/types/components/AppRadio.d.ts +23 -1
- package/dist/types/components/AppRadioGroup.d.ts +26 -2
- package/dist/types/components/AppRating.d.ts +42 -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 +10 -3
- package/dist/types/components/AppRouteError.d.ts +54 -0
- package/dist/types/components/AppScoreScale.d.ts +9 -3
- package/dist/types/components/AppSearch.d.ts +17 -2
- package/dist/types/components/AppSectionLeadCapture.d.ts +50 -2
- package/dist/types/components/AppSectionLogos.d.ts +2 -0
- package/dist/types/components/AppSegmented.d.ts +27 -3
- package/dist/types/components/AppSelect.d.ts +23 -3
- package/dist/types/components/AppShell.d.ts +151 -4
- package/dist/types/components/AppSlider.d.ts +29 -1
- package/dist/types/components/AppSortableList.d.ts +5 -0
- package/dist/types/components/AppSparkline.d.ts +24 -0
- package/dist/types/components/AppSplash.d.ts +2 -2
- package/dist/types/components/AppSplitButton.d.ts +10 -4
- package/dist/types/components/AppSplitView.d.ts +68 -0
- package/dist/types/components/AppStepper.d.ts +6 -0
- package/dist/types/components/AppSwitch.d.ts +24 -2
- package/dist/types/components/AppTablePagination.d.ts +44 -2
- package/dist/types/components/AppTableToolbar.d.ts +30 -0
- package/dist/types/components/AppTagInput.d.ts +20 -3
- package/dist/types/components/AppTextarea.d.ts +21 -1
- package/dist/types/components/AppTimePicker.d.ts +19 -2
- package/dist/types/components/AppTimeline.d.ts +8 -0
- package/dist/types/components/AppToast.d.ts +6 -0
- 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 +20 -2
- package/dist/types/components/AppWhatsNew.d.ts +2 -0
- package/dist/types/components/AppWorkspaceSwitcher.d.ts +18 -0
- package/dist/types/components/iconGlyphs.g.d.ts +1 -0
- package/dist/types/components/iconVariants.g.d.ts +5 -0
- package/dist/types/components/useWuiControl.d.ts +3 -1
- package/dist/types/index.d.ts +6 -0
- package/dist/types/lib/FileItemRow.d.ts +9 -2
- package/dist/types/lib/buttonClass.d.ts +9 -0
- package/dist/types/lib/fieldState.d.ts +3 -0
- package/dist/types/lib/fillLabel.d.ts +1 -0
- package/dist/types/lib/labelWithHelp.d.ts +10 -0
- package/dist/types/lib/linkTarget.d.ts +30 -0
- package/dist/types/lib/sectionShell.d.ts +0 -1
- package/dist/types/lib/vocabulary.d.ts +3 -0
- package/dist/ui-react.js +1 -1
- package/dist/web-core/dist/query/listQuery.js +1 -0
- package/package.json +8 -7
|
@@ -38,15 +38,27 @@ declare const AppMultiSelect: import("react").ForwardRefExoticComponent<{
|
|
|
38
38
|
customPattern?: string;
|
|
39
39
|
/** The message for a refused typed entry. Without it the message is Enter a valid value. */
|
|
40
40
|
customInvalidMessage?: string;
|
|
41
|
+
/** The starting selection of an uncontrolled field. */
|
|
42
|
+
defaultValues?: string[];
|
|
41
43
|
/**
|
|
42
44
|
* Stops the control from opening or changing.
|
|
43
45
|
* @default false
|
|
44
46
|
*/
|
|
45
47
|
disabled?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Shows the value but blocks editing. The value still posts.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
readOnly?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Shows a busy state and blocks input while data loads.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
loading?: boolean;
|
|
46
58
|
/** A library icon name drawn at the start of the control. */
|
|
47
59
|
icon?: string;
|
|
48
60
|
/** The control size around the default. */
|
|
49
|
-
size?: 'sm' | 'lg';
|
|
61
|
+
size?: 'sm' | 'md' | 'lg';
|
|
50
62
|
/**
|
|
51
63
|
* Keeps the chosen chips on one row and folds the overflow into a +N counter.
|
|
52
64
|
* @default false
|
|
@@ -60,8 +72,8 @@ declare const AppMultiSelect: import("react").ForwardRefExoticComponent<{
|
|
|
60
72
|
label?: import('react').ReactNode;
|
|
61
73
|
/** An error message shown under the control. */
|
|
62
74
|
error?: string;
|
|
63
|
-
/**
|
|
64
|
-
|
|
75
|
+
/** Helper text shown under the control. */
|
|
76
|
+
helperText?: string;
|
|
65
77
|
/**
|
|
66
78
|
* Marks the field as required.
|
|
67
79
|
* @default false
|
|
@@ -72,6 +84,11 @@ declare const AppMultiSelect: import("react").ForwardRefExoticComponent<{
|
|
|
72
84
|
* @default false
|
|
73
85
|
*/
|
|
74
86
|
optional?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Replaces the built-in English text, for other languages.
|
|
89
|
+
* @default "(optional)"
|
|
90
|
+
*/
|
|
91
|
+
optionalLabel?: string;
|
|
75
92
|
/** Help content shown in an info tip beside the label. */
|
|
76
93
|
help?: import('react').ReactNode;
|
|
77
94
|
/**
|
|
@@ -71,6 +71,7 @@ export type NotificationItem = {
|
|
|
71
71
|
* @param {true | { key: "all" | "unread" | "archived", label?: string }[]} [props.tabs] `true` for All, Unread and Archived; or the tabs to show, in order. Absent: no tab strip.
|
|
72
72
|
* @param {(key: string) => void} [props.onTabChange] Called with the key of the tab the person picks.
|
|
73
73
|
* @param {(open: boolean) => void} [props.onOpenChange] Called when the panel opens or closes.
|
|
74
|
+
* @param {import('react').ElementType} [props.linkComponent] Router link (e.g. react-router Link) for in-app destinations; it receives `to` instead of `href`. Absolute, `#` and scheme hrefs stay plain anchors. Keeps the library router-agnostic.
|
|
74
75
|
* @param {string} [props.className]
|
|
75
76
|
*/
|
|
76
77
|
export default function AppNotificationCenter(props: {
|
|
@@ -107,5 +108,6 @@ export default function AppNotificationCenter(props: {
|
|
|
107
108
|
}[];
|
|
108
109
|
onTabChange?: (key: string) => void;
|
|
109
110
|
onOpenChange?: (open: boolean) => void;
|
|
111
|
+
linkComponent?: import('react').ElementType;
|
|
110
112
|
className?: string;
|
|
111
113
|
}): import("react").JSX.Element;
|
|
@@ -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. */
|
|
@@ -27,6 +27,21 @@ declare const AppNumberInput: import("react").ForwardRefExoticComponent<{
|
|
|
27
27
|
* @default "More information"
|
|
28
28
|
*/
|
|
29
29
|
helpLabel?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Replaces the built-in English text, for other languages.
|
|
32
|
+
* @default "Decrease"
|
|
33
|
+
*/
|
|
34
|
+
decreaseLabel?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Replaces the built-in English text, for other languages.
|
|
37
|
+
* @default "Increase"
|
|
38
|
+
*/
|
|
39
|
+
increaseLabel?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Replaces the built-in English text, for other languages.
|
|
42
|
+
* @default "(optional)"
|
|
43
|
+
*/
|
|
44
|
+
optionalLabel?: string;
|
|
30
45
|
/** The lowest value, inclusive. The decrease stepper disables at it. */
|
|
31
46
|
min?: number;
|
|
32
47
|
/** The highest value, inclusive. The increase stepper disables at it. */
|
|
@@ -44,10 +59,10 @@ declare const AppNumberInput: import("react").ForwardRefExoticComponent<{
|
|
|
44
59
|
/** A unit suffix shown inside the field after the input, such as kg or %. */
|
|
45
60
|
unit?: string;
|
|
46
61
|
/**
|
|
47
|
-
*
|
|
62
|
+
* Control size: sm, md or lg (32, 36 or 44px). md is the default.
|
|
48
63
|
* @default "md"
|
|
49
64
|
*/
|
|
50
|
-
size?:
|
|
65
|
+
size?: "sm" | "md" | "lg";
|
|
51
66
|
/** The input's id. Unset, a generated id is used. */
|
|
52
67
|
id?: string;
|
|
53
68
|
/** The input's name, for forms. */
|
|
@@ -72,5 +87,12 @@ declare const AppNumberInput: import("react").ForwardRefExoticComponent<{
|
|
|
72
87
|
* @default false
|
|
73
88
|
*/
|
|
74
89
|
readOnly?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Shows a busy state and blocks input while data loads.
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
loading?: boolean;
|
|
95
|
+
/** The starting value of an uncontrolled field. */
|
|
96
|
+
defaultValue?: number | null;
|
|
75
97
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
76
98
|
export default AppNumberInput;
|
|
@@ -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;
|
|
@@ -26,15 +26,44 @@ declare const AppOtpInput: import("react").ForwardRefExoticComponent<{
|
|
|
26
26
|
* @default false
|
|
27
27
|
*/
|
|
28
28
|
optional?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Replaces the built-in English text, for other languages.
|
|
31
|
+
* @default "(optional)"
|
|
32
|
+
*/
|
|
33
|
+
optionalLabel?: string;
|
|
29
34
|
/** Help text under the code. It is hidden while an error is shown. */
|
|
30
|
-
|
|
31
|
-
/** 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. */
|
|
32
37
|
error?: string;
|
|
33
38
|
/**
|
|
34
39
|
* Disables the field so the code cannot be entered.
|
|
35
40
|
* @default false
|
|
36
41
|
*/
|
|
37
42
|
disabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Shows the value but blocks editing. The value still posts.
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
readOnly?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Shows a busy state and blocks input while data loads.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
loading?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* The control size: sm, md or lg.
|
|
55
|
+
* @default "md"
|
|
56
|
+
*/
|
|
57
|
+
size?: "sm" | "md" | "lg";
|
|
58
|
+
/** The content of the info-tip beside the label, opened by a button. */
|
|
59
|
+
help?: import('react').ReactNode;
|
|
60
|
+
/**
|
|
61
|
+
* The accessible name of the info-tip button.
|
|
62
|
+
* @default "More information"
|
|
63
|
+
*/
|
|
64
|
+
helpLabel?: string;
|
|
65
|
+
/** The starting value of an uncontrolled field. */
|
|
66
|
+
defaultValue?: string;
|
|
38
67
|
/** The form field name, so a plain form post includes the code. */
|
|
39
68
|
name?: string;
|
|
40
69
|
/** The element id. A generated id is used when this is omitted. */
|
|
@@ -12,6 +12,25 @@ declare const AppPhoneNumberInput: import("react").ForwardRefExoticComponent<{
|
|
|
12
12
|
* @default false
|
|
13
13
|
*/
|
|
14
14
|
disabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Shows the value but blocks editing. The value still posts.
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Shows a busy state and blocks input while data loads.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
loading?: boolean;
|
|
25
|
+
/** The starting value of an uncontrolled field. */
|
|
26
|
+
defaultValue?: string;
|
|
27
|
+
/** The content of the info-tip beside the label, opened by a button. */
|
|
28
|
+
help?: import('react').ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* The accessible name of the info-tip button.
|
|
31
|
+
* @default "More information"
|
|
32
|
+
*/
|
|
33
|
+
helpLabel?: string;
|
|
15
34
|
/** The form field name. */
|
|
16
35
|
name?: string;
|
|
17
36
|
/** The id of the phone control. Left unset, one is generated. */
|
|
@@ -33,8 +52,13 @@ declare const AppPhoneNumberInput: import("react").ForwardRefExoticComponent<{
|
|
|
33
52
|
* @default false
|
|
34
53
|
*/
|
|
35
54
|
optional?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Replaces the built-in English text, for other languages.
|
|
57
|
+
* @default "(optional)"
|
|
58
|
+
*/
|
|
59
|
+
optionalLabel?: string;
|
|
36
60
|
/** Help text under the field. The error replaces it while one is shown. */
|
|
37
|
-
|
|
61
|
+
helperText?: string;
|
|
38
62
|
/** An error message under the field, which also turns the border red. */
|
|
39
63
|
error?: string;
|
|
40
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. */
|
|
@@ -13,11 +13,33 @@ declare const AppRadio: import("react").ForwardRefExoticComponent<{
|
|
|
13
13
|
defaultChecked?: boolean;
|
|
14
14
|
/** Locks the radio and dims it. */
|
|
15
15
|
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Shows the value but blocks editing. The value still posts.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
readOnly?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Shows a busy state and blocks input while data loads.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The control size: sm, md or lg.
|
|
28
|
+
* @default "md"
|
|
29
|
+
*/
|
|
30
|
+
size?: "sm" | "md" | "lg";
|
|
16
31
|
onChange?: (event: import('react').ChangeEvent<HTMLInputElement>) => void;
|
|
17
32
|
/** Error message, rendered below the control. Replaces the hint. */
|
|
18
33
|
error?: string;
|
|
19
34
|
/** Helper text below the control. Hidden while an error is shown. */
|
|
20
|
-
|
|
35
|
+
helperText?: string;
|
|
36
|
+
/** Content for the info-tip after the label. Shown only when a label is set. */
|
|
37
|
+
help?: import('react').ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* aria-label for the info-tip button.
|
|
40
|
+
* @default "More information"
|
|
41
|
+
*/
|
|
42
|
+
helpLabel?: string;
|
|
21
43
|
/**
|
|
22
44
|
* Extra class on the form-check wrapper that holds the input, label and message.
|
|
23
45
|
* @default ""
|
|
@@ -18,9 +18,13 @@
|
|
|
18
18
|
* @param {boolean} [props.inline]
|
|
19
19
|
* @param {boolean} [props.required]
|
|
20
20
|
* @param {boolean} [props.optional] Ends the label with "(optional)". Required wins when both are set.
|
|
21
|
+
* @param {string} [props.optionalLabel] Default "(optional)".
|
|
21
22
|
* @param {boolean} [props.disabled]
|
|
23
|
+
* @param {boolean} [props.readOnly] Shows the value but blocks editing. The value still posts.
|
|
24
|
+
* @param {boolean} [props.loading] Shows a busy state and blocks input while data loads.
|
|
25
|
+
* @param {'sm'|'md'|'lg'} [props.size] Steps the radios and their labels.
|
|
22
26
|
* @param {string} [props.error]
|
|
23
|
-
* @param {string} [props.
|
|
27
|
+
* @param {string} [props.helperText]
|
|
24
28
|
* @param {import('react').ReactNode} [props.help]
|
|
25
29
|
* @param {string} [props.helpLabel]
|
|
26
30
|
* @param {string} [props.id]
|
|
@@ -65,15 +69,35 @@ export default function AppRadioGroup(props: {
|
|
|
65
69
|
* @default false
|
|
66
70
|
*/
|
|
67
71
|
optional?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Replaces the built-in English text, for other languages.
|
|
74
|
+
* @default "(optional)"
|
|
75
|
+
*/
|
|
76
|
+
optionalLabel?: string;
|
|
68
77
|
/**
|
|
69
78
|
* Disables every option.
|
|
70
79
|
* @default false
|
|
71
80
|
*/
|
|
72
81
|
disabled?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Shows the value but blocks editing. The value still posts.
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
readOnly?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Shows a busy state and blocks input while data loads.
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
loading?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Steps the radios and their labels.
|
|
94
|
+
* @default "md"
|
|
95
|
+
*/
|
|
96
|
+
size?: 'sm' | 'md' | 'lg';
|
|
73
97
|
/** Error message below the group. Replaces the hint. */
|
|
74
98
|
error?: string;
|
|
75
99
|
/** Helper text below the group. */
|
|
76
|
-
|
|
100
|
+
helperText?: string;
|
|
77
101
|
/** Content for the label info-tip. */
|
|
78
102
|
help?: import('react').ReactNode;
|
|
79
103
|
/**
|
|
@@ -18,11 +18,18 @@ import "@webority/ui-elements/elements/rating";
|
|
|
18
18
|
* @param {boolean} [props.showValue]
|
|
19
19
|
* @param {"sm"|"md"|"lg"} [props.size]
|
|
20
20
|
* @param {import('react').ReactNode} [props.label]
|
|
21
|
+
* @param {import('react').ReactNode} [props.help]
|
|
22
|
+
* @param {string} [props.helpLabel]
|
|
23
|
+
* @param {string} [props.ratingLabel] Default "Rating".
|
|
24
|
+
* @param {string} [props.starLabel] Default "{count} star". Token: {count}.
|
|
25
|
+
* @param {string} [props.starsLabel] Default "{count} stars". Token: {count}.
|
|
26
|
+
* @param {string} [props.valueText] Default "{value} out of {max}". Tokens: {value}, {max}.
|
|
21
27
|
* @param {string} [props.name]
|
|
22
28
|
* @param {boolean} [props.required]
|
|
23
29
|
* @param {boolean} [props.disabled]
|
|
30
|
+
* @param {boolean} [props.loading]
|
|
24
31
|
* @param {string} [props.error]
|
|
25
|
-
* @param {string} [props.
|
|
32
|
+
* @param {string} [props.helperText]
|
|
26
33
|
* @param {string} [props.id]
|
|
27
34
|
* @param {string} [props.className]
|
|
28
35
|
* @param {string} [props.fieldClassName]
|
|
@@ -60,6 +67,33 @@ export default function AppRating(props: {
|
|
|
60
67
|
size?: "sm" | "md" | "lg";
|
|
61
68
|
/** Input: the visible group label and its name. Display: prefix of the spoken text, such as Quality: 4.5 out of 5; a string. */
|
|
62
69
|
label?: import('react').ReactNode;
|
|
70
|
+
/** The content of the info-tip beside the label, opened by a button. */
|
|
71
|
+
help?: import('react').ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* The accessible name of the info-tip button.
|
|
74
|
+
* @default "More information"
|
|
75
|
+
*/
|
|
76
|
+
helpLabel?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Replaces the built-in English text, for other languages.
|
|
79
|
+
* @default "Rating"
|
|
80
|
+
*/
|
|
81
|
+
ratingLabel?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Replaces the built-in English text, for other languages. Token: {count}.
|
|
84
|
+
* @default "{count} star"
|
|
85
|
+
*/
|
|
86
|
+
starLabel?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Replaces the built-in English text, for other languages. Token: {count}.
|
|
89
|
+
* @default "{count} stars"
|
|
90
|
+
*/
|
|
91
|
+
starsLabel?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Replaces the built-in English text, for other languages. Tokens: {value}, {max}.
|
|
94
|
+
* @default "{value} out of {max}"
|
|
95
|
+
*/
|
|
96
|
+
valueText?: string;
|
|
63
97
|
/** Input only: the form field name. Defaults to a generated one. */
|
|
64
98
|
name?: string;
|
|
65
99
|
/**
|
|
@@ -72,10 +106,15 @@ export default function AppRating(props: {
|
|
|
72
106
|
* @default false
|
|
73
107
|
*/
|
|
74
108
|
disabled?: boolean;
|
|
75
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* Shows a busy state and blocks input while data loads.
|
|
111
|
+
* @default false
|
|
112
|
+
*/
|
|
113
|
+
loading?: boolean;
|
|
114
|
+
/** Input only: message below the stars. Replaces the helper text. */
|
|
76
115
|
error?: string;
|
|
77
116
|
/** Input only: helper text below the stars. */
|
|
78
|
-
|
|
117
|
+
helperText?: string;
|
|
79
118
|
/** The rating control's id; generated when left out. */
|
|
80
119
|
id?: string;
|
|
81
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
|
|
@@ -29,7 +29,14 @@ declare const AppRichText: import("react").ForwardRefExoticComponent<{
|
|
|
29
29
|
* @default false
|
|
30
30
|
*/
|
|
31
31
|
readOnly?: boolean;
|
|
32
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Shows a busy state and blocks input while data loads.
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
loading?: boolean;
|
|
37
|
+
/** The starting value of an uncontrolled field. */
|
|
38
|
+
defaultValue?: string;
|
|
39
|
+
/** The id of the editor; the helper text and error ids derive from it. Generated when omitted. */
|
|
33
40
|
id?: string;
|
|
34
41
|
/** Accessible name for the editor; defaults to a string `label`. */
|
|
35
42
|
ariaLabel?: string;
|
|
@@ -20,6 +20,15 @@
|
|
|
20
20
|
* @param {boolean} [props.fullPage]
|
|
21
21
|
* @param {import('react').ReactNode} [props.children] Extra content below the actions, such as a support link.
|
|
22
22
|
* @param {string} [props.className]
|
|
23
|
+
* @param {string} [props.homeLabel] Default "Go to the home page".
|
|
24
|
+
* @param {string} [props.reloadLabel] Default "Reload".
|
|
25
|
+
* @param {string} [props.retryLabel] Default "Try again".
|
|
26
|
+
* @param {string} [props.staleTitle] Default "A new version is ready".
|
|
27
|
+
* @param {string} [props.staleText] Default "This app was updated while you had it open. Reload to get the new version."
|
|
28
|
+
* @param {string} [props.notFoundTitle] Default "We could not find that page".
|
|
29
|
+
* @param {string} [props.notFoundText] Default "Check the address, or go to the home page."
|
|
30
|
+
* @param {string} [props.errorTitle] Default "This page did not load".
|
|
31
|
+
* @param {string} [props.errorText] Default "Something went wrong on our side. Try again in a moment."
|
|
23
32
|
*/
|
|
24
33
|
export default function AppRouteError(props: {
|
|
25
34
|
/**
|
|
@@ -46,4 +55,49 @@ export default function AppRouteError(props: {
|
|
|
46
55
|
* @default ""
|
|
47
56
|
*/
|
|
48
57
|
className?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Replaces the built-in English text, for other languages.
|
|
60
|
+
* @default "Go to the home page"
|
|
61
|
+
*/
|
|
62
|
+
homeLabel?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Replaces the built-in English text, for other languages.
|
|
65
|
+
* @default "Reload"
|
|
66
|
+
*/
|
|
67
|
+
reloadLabel?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Replaces the built-in English text, for other languages.
|
|
70
|
+
* @default "Try again"
|
|
71
|
+
*/
|
|
72
|
+
retryLabel?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Replaces the built-in English text, for other languages.
|
|
75
|
+
* @default "A new version is ready"
|
|
76
|
+
*/
|
|
77
|
+
staleTitle?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Replaces the built-in English text, for other languages.
|
|
80
|
+
* @default "This app was updated while you had it open. Reload to get the new version."
|
|
81
|
+
*/
|
|
82
|
+
staleText?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Replaces the built-in English text, for other languages.
|
|
85
|
+
* @default "We could not find that page"
|
|
86
|
+
*/
|
|
87
|
+
notFoundTitle?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Replaces the built-in English text, for other languages.
|
|
90
|
+
* @default "Check the address, or go to the home page."
|
|
91
|
+
*/
|
|
92
|
+
notFoundText?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Replaces the built-in English text, for other languages.
|
|
95
|
+
* @default "This page did not load"
|
|
96
|
+
*/
|
|
97
|
+
errorTitle?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Replaces the built-in English text, for other languages.
|
|
100
|
+
* @default "Something went wrong on our side. Try again in a moment."
|
|
101
|
+
*/
|
|
102
|
+
errorText?: string;
|
|
49
103
|
}): import("react").JSX.Element;
|
|
@@ -17,10 +17,11 @@
|
|
|
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]
|
|
24
|
+
* @param {string} [props.scoreLabel] Default "Score".
|
|
24
25
|
*/
|
|
25
26
|
export default function AppScoreScale(props: {
|
|
26
27
|
/** The chosen value, or null for no choice yet. The parent holds it (controlled). */
|
|
@@ -49,10 +50,10 @@ export default function AppScoreScale(props: {
|
|
|
49
50
|
* @default false
|
|
50
51
|
*/
|
|
51
52
|
disabled?: boolean;
|
|
52
|
-
/** Message below the scale. Replaces the
|
|
53
|
+
/** Message below the scale. Replaces the helper text. */
|
|
53
54
|
error?: string;
|
|
54
55
|
/** Helper text below the scale. */
|
|
55
|
-
|
|
56
|
+
helperText?: string;
|
|
56
57
|
/** The id of the radio group; the label, hint and error ids derive from it. Generated when omitted. */
|
|
57
58
|
id?: string;
|
|
58
59
|
/**
|
|
@@ -65,4 +66,9 @@ export default function AppScoreScale(props: {
|
|
|
65
66
|
* @default ""
|
|
66
67
|
*/
|
|
67
68
|
fieldClassName?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Replaces the built-in English text, for other languages.
|
|
71
|
+
* @default "Score"
|
|
72
|
+
*/
|
|
73
|
+
scoreLabel?: string;
|
|
68
74
|
}): import("react").JSX.Element;
|
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param {object} props
|
|
5
5
|
* @param {string} props.value
|
|
6
|
+
* @param {string} [props.defaultValue] The starting value of an uncontrolled field.
|
|
6
7
|
* @param {(value: string) => void} [props.onChange] Called with the new value on every change, and with an empty string when the clear button is pressed.
|
|
7
8
|
* @param {string} [props.placeholder]
|
|
8
9
|
* @param {string} [props.ariaLabel]
|
|
10
|
+
* @param {string} [props.clearLabel] Name of the clear button. Default "Clear search".
|
|
11
|
+
* @param {string} [props.searchLabel] Name of the collapsed search button when there is no ariaLabel or placeholder. Default "Search".
|
|
9
12
|
* @param {number} [props.iconSize]
|
|
10
|
-
* @param {'sm'|'lg'} [props.size]
|
|
13
|
+
* @param {'sm'|'md'|'lg'} [props.size]
|
|
11
14
|
* @param {boolean} [props.loading]
|
|
12
15
|
* @param {boolean} [props.collapsible]
|
|
13
16
|
* @param {boolean} [props.disabled]
|
|
@@ -18,6 +21,8 @@
|
|
|
18
21
|
export default function AppSearch(props: {
|
|
19
22
|
/** The text in the field. */
|
|
20
23
|
value: string;
|
|
24
|
+
/** The starting value of an uncontrolled field. */
|
|
25
|
+
defaultValue?: string;
|
|
21
26
|
onChange?: (value: string) => void;
|
|
22
27
|
/**
|
|
23
28
|
* Hint text shown while the field is empty.
|
|
@@ -26,10 +31,20 @@ export default function AppSearch(props: {
|
|
|
26
31
|
placeholder?: string;
|
|
27
32
|
/** The accessible name of the field. */
|
|
28
33
|
ariaLabel?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Accessible name of the clear button. Replaces the built-in English text, for other languages.
|
|
36
|
+
* @default "Clear search"
|
|
37
|
+
*/
|
|
38
|
+
clearLabel?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Accessible name of the collapsed search button when there is no ariaLabel or placeholder. Replaces the built-in English text, for other languages.
|
|
41
|
+
* @default "Search"
|
|
42
|
+
*/
|
|
43
|
+
searchLabel?: string;
|
|
29
44
|
/** The size in pixels of the leading magnifier. It is 18 when left out. */
|
|
30
45
|
iconSize?: number;
|
|
31
46
|
/** Control size around the default. */
|
|
32
|
-
size?: 'sm' | 'lg';
|
|
47
|
+
size?: 'sm' | 'md' | 'lg';
|
|
33
48
|
/**
|
|
34
49
|
* Swap the leading glyph for a spinner while a search is in flight.
|
|
35
50
|
* @default false
|