@webority/ui-react 0.127.0 → 0.129.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/dist/canvas-kit/kit.js +28735 -24316
- package/dist/canvas-kit/manifest.json +3223 -163
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppAccountSwitcher.js +1 -0
- 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/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/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/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/AppDueDate.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/AppInlineEdit.js +1 -1
- package/dist/components/AppInput.js +1 -1
- package/dist/components/AppKanban.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/AppMetricStrip.js +1 -1
- package/dist/components/AppModal.js +1 -1
- package/dist/components/AppMultiSelect.js +1 -1
- package/dist/components/AppNotificationCenter.js +1 -1
- package/dist/components/AppNumberInput.js +1 -1
- package/dist/components/AppOtpInput.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/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/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/AppSplitButton.js +1 -1
- package/dist/components/AppSplitView.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/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/AppUpdateBar.js +1 -1
- package/dist/components/AppWhatsNew.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 +235 -2
- package/dist/lib/CheckField.js +1 -1
- package/dist/lib/FileItemRow.js +1 -1
- 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/markdown-core/dist/links.js +1 -1
- package/dist/types/components/AppAccountSwitcher.d.ts +41 -0
- 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 +22 -2
- 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 +6 -0
- package/dist/types/components/AppButton.d.ts +1 -0
- package/dist/types/components/AppCalendar.d.ts +3 -1
- package/dist/types/components/AppCard.d.ts +13 -1
- package/dist/types/components/AppCell.d.ts +36 -0
- package/dist/types/components/AppChart.d.ts +7 -0
- package/dist/types/components/AppChartCard.d.ts +60 -0
- package/dist/types/components/AppCheckbox.d.ts +22 -0
- 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 +43 -4
- 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 +6 -0
- package/dist/types/components/AppCountrySelect.d.ts +5 -0
- package/dist/types/components/AppDataTable.d.ts +1 -1
- package/dist/types/components/AppDatePicker.d.ts +24 -0
- package/dist/types/components/AppDateRangePicker.d.ts +31 -1
- 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 +24 -0
- package/dist/types/components/AppDueDate.d.ts +42 -0
- 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 +75 -0
- 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 +64 -0
- package/dist/types/components/AppImagePicker.d.ts +60 -0
- package/dist/types/components/AppInlineEdit.d.ts +6 -0
- package/dist/types/components/AppInput.d.ts +37 -2
- 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 +17 -0
- package/dist/types/components/AppMetricStrip.d.ts +2 -0
- package/dist/types/components/AppModal.d.ts +6 -0
- package/dist/types/components/AppMultiSelect.d.ts +18 -1
- package/dist/types/components/AppNotificationCenter.d.ts +2 -0
- package/dist/types/components/AppNumberInput.d.ts +24 -2
- package/dist/types/components/AppOtpInput.d.ts +29 -0
- package/dist/types/components/AppPhoneNumberInput.d.ts +26 -0
- package/dist/types/components/AppProgress.d.ts +2 -2
- package/dist/types/components/AppRadio.d.ts +22 -0
- package/dist/types/components/AppRadioGroup.d.ts +24 -0
- package/dist/types/components/AppRating.d.ts +39 -0
- package/dist/types/components/AppRichText.d.ts +7 -0
- package/dist/types/components/AppRouteError.d.ts +54 -0
- package/dist/types/components/AppScoreScale.d.ts +6 -0
- package/dist/types/components/AppSearch.d.ts +17 -2
- package/dist/types/components/AppSectionLeadCapture.d.ts +48 -0
- 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 +22 -2
- package/dist/types/components/AppShell.d.ts +165 -0
- package/dist/types/components/AppSlider.d.ts +28 -0
- package/dist/types/components/AppSortableList.d.ts +5 -0
- package/dist/types/components/AppSparkline.d.ts +24 -0
- 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 +22 -0
- 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 +18 -1
- package/dist/types/components/AppTextarea.d.ts +20 -0
- package/dist/types/components/AppTimePicker.d.ts +17 -0
- package/dist/types/components/AppTimeline.d.ts +8 -0
- package/dist/types/components/AppToast.d.ts +6 -0
- package/dist/types/components/AppUpdateBar.d.ts +18 -0
- 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/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/ui-react.js +1 -1
- package/package.json +8 -8
|
@@ -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
|
hint?: 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,7 +18,11 @@
|
|
|
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
27
|
* @param {string} [props.hint]
|
|
24
28
|
* @param {import('react').ReactNode} [props.help]
|
|
@@ -65,11 +69,31 @@ 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. */
|
|
@@ -18,9 +18,16 @@ 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
32
|
* @param {string} [props.hint]
|
|
26
33
|
* @param {string} [props.id]
|
|
@@ -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,6 +106,11 @@ export default function AppRating(props: {
|
|
|
72
106
|
* @default false
|
|
73
107
|
*/
|
|
74
108
|
disabled?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Shows a busy state and blocks input while data loads.
|
|
111
|
+
* @default false
|
|
112
|
+
*/
|
|
113
|
+
loading?: boolean;
|
|
75
114
|
/** Input only: message below the stars. Replaces the hint. */
|
|
76
115
|
error?: string;
|
|
77
116
|
/** Input only: helper text below the stars. */
|
|
@@ -29,6 +29,13 @@ declare const AppRichText: import("react").ForwardRefExoticComponent<{
|
|
|
29
29
|
* @default false
|
|
30
30
|
*/
|
|
31
31
|
readOnly?: boolean;
|
|
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;
|
|
32
39
|
/** The id of the editor; the hint 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`. */
|
|
@@ -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;
|
|
@@ -21,6 +21,7 @@
|
|
|
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). */
|
|
@@ -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
|
|
@@ -6,6 +6,14 @@
|
|
|
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".
|
|
9
|
+
* @param {string} [props.nameLabel] Default "Name".
|
|
10
|
+
* @param {string} [props.emailLabel] Default "Email".
|
|
11
|
+
* @param {string} [props.phoneLabel] Default "Phone number".
|
|
12
|
+
* @param {string} [props.companyLabel] Default "Company".
|
|
13
|
+
* @param {string} [props.messageLabel] Default "Message".
|
|
14
|
+
* @param {string} [props.requiredText] Default "This field is required.".
|
|
15
|
+
* @param {string} [props.invalidEmailText] Default "Enter an email address such as name@example.com.".
|
|
16
|
+
* @param {string} [props.submitErrorText] Default "We could not send your message. Please try again.".
|
|
9
17
|
* @param {import('react').ReactNode} props.successTitle
|
|
10
18
|
* @param {import('react').ReactNode} [props.successText]
|
|
11
19
|
* @param {import('react').ReactNode} [props.consent] Text under the button.
|
|
@@ -34,6 +42,46 @@ export default function AppSectionLeadCapture(props: {
|
|
|
34
42
|
* @default "Send"
|
|
35
43
|
*/
|
|
36
44
|
submitLabel?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Replaces the built-in English text, for other languages.
|
|
47
|
+
* @default "Name"
|
|
48
|
+
*/
|
|
49
|
+
nameLabel?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Replaces the built-in English text, for other languages.
|
|
52
|
+
* @default "Email"
|
|
53
|
+
*/
|
|
54
|
+
emailLabel?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Replaces the built-in English text, for other languages.
|
|
57
|
+
* @default "Phone number"
|
|
58
|
+
*/
|
|
59
|
+
phoneLabel?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Replaces the built-in English text, for other languages.
|
|
62
|
+
* @default "Company"
|
|
63
|
+
*/
|
|
64
|
+
companyLabel?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Replaces the built-in English text, for other languages.
|
|
67
|
+
* @default "Message"
|
|
68
|
+
*/
|
|
69
|
+
messageLabel?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Replaces the built-in English text, for other languages.
|
|
72
|
+
* @default "This field is required."
|
|
73
|
+
*/
|
|
74
|
+
requiredText?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Replaces the built-in English text, for other languages.
|
|
77
|
+
* @default "Enter an email address such as name@example.com."
|
|
78
|
+
*/
|
|
79
|
+
invalidEmailText?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Replaces the built-in English text, for other languages.
|
|
82
|
+
* @default "We could not send your message. Please try again."
|
|
83
|
+
*/
|
|
84
|
+
submitErrorText?: string;
|
|
37
85
|
/** The heading of the block shown after a successful send. */
|
|
38
86
|
successTitle: import('react').ReactNode;
|
|
39
87
|
/** The sentence under the success heading. */
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* @param {import('react').ReactNode} [props.subtitle]
|
|
17
17
|
* @param {"start"|"center"} [props.align]
|
|
18
18
|
* @param {"default"|"muted"} [props.variant]
|
|
19
|
+
* @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.
|
|
19
20
|
* @param {string} [props.className]
|
|
20
21
|
*/
|
|
21
22
|
export default function AppSectionLogos(props: {
|
|
@@ -54,6 +55,7 @@ export default function AppSectionLogos(props: {
|
|
|
54
55
|
* @default "default"
|
|
55
56
|
*/
|
|
56
57
|
variant?: "default" | "muted";
|
|
58
|
+
linkComponent?: import('react').ElementType;
|
|
57
59
|
/**
|
|
58
60
|
* Extra class names added to the section.
|
|
59
61
|
* @default ""
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @param {object} props
|
|
15
15
|
* @param {{ value: string, label: string, note?: string, icon?: string, disabled?: boolean, count?: number }[]} [props.options]
|
|
16
|
-
* @param {string} props.value
|
|
16
|
+
* @param {string} [props.value]
|
|
17
|
+
* @param {string} [props.defaultValue]
|
|
17
18
|
* @param {(value: string) => void} props.onChange
|
|
18
19
|
* @param {string} props.label
|
|
19
20
|
* @param {string} [props.name]
|
|
@@ -21,7 +22,11 @@
|
|
|
21
22
|
* @param {boolean} [props.fullWidth]
|
|
22
23
|
* @param {boolean} [props.bordered]
|
|
23
24
|
* @param {boolean} [props.disabled]
|
|
25
|
+
* @param {boolean} [props.readOnly]
|
|
26
|
+
* @param {boolean} [props.loading]
|
|
24
27
|
* @param {boolean} [props.labelVisible]
|
|
28
|
+
* @param {import('react').ReactNode} [props.help] Content for an info-tip after the visible label. Needs `labelVisible`.
|
|
29
|
+
* @param {string} [props.helpLabel] aria-label of the info-tip button. Default "More information".
|
|
25
30
|
* @param {string} [props.className]
|
|
26
31
|
*/
|
|
27
32
|
export default function AppSegmented(props: {
|
|
@@ -37,8 +42,10 @@ export default function AppSegmented(props: {
|
|
|
37
42
|
disabled?: boolean;
|
|
38
43
|
count?: number;
|
|
39
44
|
}[];
|
|
40
|
-
/** The selected option's value. */
|
|
41
|
-
value
|
|
45
|
+
/** The selected option's value. Leave it out, with defaultValue, for an uncontrolled field. */
|
|
46
|
+
value?: string;
|
|
47
|
+
/** The starting value of an uncontrolled field. */
|
|
48
|
+
defaultValue?: string;
|
|
42
49
|
onChange: (value: string) => void;
|
|
43
50
|
/** The accessible name of the group. */
|
|
44
51
|
label: string;
|
|
@@ -64,11 +71,28 @@ export default function AppSegmented(props: {
|
|
|
64
71
|
* @default false
|
|
65
72
|
*/
|
|
66
73
|
disabled?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Shows the value but blocks editing. The value still posts.
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
readOnly?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Shows a busy state and blocks input while data loads.
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
loading?: boolean;
|
|
67
84
|
/**
|
|
68
85
|
* Shows the label above the control. The accessible name stays either way.
|
|
69
86
|
* @default false
|
|
70
87
|
*/
|
|
71
88
|
labelVisible?: boolean;
|
|
89
|
+
/** Content for an info-tip after the visible label. Shown only when the label is visible. */
|
|
90
|
+
help?: import('react').ReactNode;
|
|
91
|
+
/**
|
|
92
|
+
* aria-label for the info-tip button.
|
|
93
|
+
* @default "More information"
|
|
94
|
+
*/
|
|
95
|
+
helpLabel?: string;
|
|
72
96
|
/**
|
|
73
97
|
* Extra class names added to the group.
|
|
74
98
|
* @default ""
|
|
@@ -26,6 +26,8 @@ declare const AppSelect: import("react").ForwardRefExoticComponent<{
|
|
|
26
26
|
suffix?: import('react').ReactNode;
|
|
27
27
|
/** The selected option's value. Leaving it out clears the control. */
|
|
28
28
|
value?: string;
|
|
29
|
+
/** The starting value of an uncontrolled field. */
|
|
30
|
+
defaultValue?: string;
|
|
29
31
|
onChange?: (value: string) => void;
|
|
30
32
|
/**
|
|
31
33
|
* Text shown in the empty field.
|
|
@@ -52,8 +54,11 @@ declare const AppSelect: import("react").ForwardRefExoticComponent<{
|
|
|
52
54
|
* @default false
|
|
53
55
|
*/
|
|
54
56
|
clearable?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Control size: sm, md or lg (32, 36 or 44px). md is the default.
|
|
59
|
+
* @default "md"
|
|
60
|
+
*/
|
|
61
|
+
size?: "sm" | "md" | "lg";
|
|
57
62
|
/** Icon name shown in the control. */
|
|
58
63
|
icon?: string;
|
|
59
64
|
/**
|
|
@@ -63,6 +68,16 @@ declare const AppSelect: import("react").ForwardRefExoticComponent<{
|
|
|
63
68
|
floatingLabel?: "off" | "border" | "above";
|
|
64
69
|
/** Disables the control. */
|
|
65
70
|
disabled?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Shows the value but blocks editing. The value still posts.
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
readOnly?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Shows a busy state and blocks input while data loads.
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
loading?: boolean;
|
|
66
81
|
/** Shows the list open, for a design preview or a controlled caller. */
|
|
67
82
|
open?: boolean;
|
|
68
83
|
/** The visible field label. */
|
|
@@ -77,6 +92,11 @@ declare const AppSelect: import("react").ForwardRefExoticComponent<{
|
|
|
77
92
|
* @default false
|
|
78
93
|
*/
|
|
79
94
|
optional?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Replaces the built-in English text, for other languages.
|
|
97
|
+
* @default "(optional)"
|
|
98
|
+
*/
|
|
99
|
+
optionalLabel?: string;
|
|
80
100
|
/** Error message shown under the field. Marks the control invalid. */
|
|
81
101
|
error?: string;
|
|
82
102
|
/** Help text shown under the field when there is no error. */
|