@webority/ui-react 0.88.0 → 0.89.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.css +0 -0
- package/dist/canvas-kit/kit.js +155261 -0
- package/dist/canvas-kit/manifest.json +26177 -0
- package/dist/canvas-kit/release.json +25 -0
- package/dist/components/AppAutocomplete.js +1 -1
- package/dist/components/AppAvatarPicker.js +1 -1
- package/dist/components/AppChipGroup.js +1 -1
- package/dist/components/AppColorField.js +1 -1
- package/dist/components/AppCommandPalette.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/AppFileAttachment.js +1 -1
- package/dist/components/AppFilePicker.js +1 -1
- package/dist/components/AppIcon.js +1 -1
- package/dist/components/AppInput.js +1 -1
- package/dist/components/AppLogoPicker.js +1 -1
- package/dist/components/AppMentionInput.js +1 -1
- package/dist/components/AppMeter.js +1 -1
- package/dist/components/AppModal.js +1 -1
- package/dist/components/AppMultiSelect.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/AppProgress.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/AppSearch.js +1 -1
- package/dist/components/AppSegmented.js +1 -1
- package/dist/components/AppSelect.js +1 -1
- package/dist/components/AppSidebarMenu.js +1 -1
- package/dist/components/AppSlider.js +1 -1
- package/dist/components/AppSplitView.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/guidance.json +9623 -0
- package/dist/lib/wuiMarker.js +1 -1
- package/dist/types/components/AppAccordion.d.ts +14 -4
- package/dist/types/components/AppActionIcon.d.ts +40 -15
- package/dist/types/components/AppAlert.d.ts +50 -17
- package/dist/types/components/AppAsyncBlock.d.ts +19 -9
- package/dist/types/components/AppAutocomplete.d.ts +36 -0
- package/dist/types/components/AppAvatar.d.ts +48 -12
- package/dist/types/components/AppAvatarGroup.d.ts +14 -4
- package/dist/types/components/AppAvatarPicker.d.ts +50 -19
- package/dist/types/components/AppBadge.d.ts +14 -3
- package/dist/types/components/AppBanner.d.ts +13 -3
- package/dist/types/components/AppBreadcrumbs.d.ts +3 -3
- package/dist/types/components/AppButton.d.ts +72 -20
- package/dist/types/components/AppButtonGroup.d.ts +18 -4
- package/dist/types/components/AppCalendar.d.ts +13 -0
- package/dist/types/components/AppCard.d.ts +60 -21
- package/dist/types/components/AppCarousel.d.ts +56 -14
- package/dist/types/components/AppChart.d.ts +38 -0
- package/dist/types/components/AppChartCard.d.ts +13 -5
- package/dist/types/components/AppCheckbox.d.ts +9 -0
- package/dist/types/components/AppChip.d.ts +29 -10
- package/dist/types/components/AppChipGroup.d.ts +16 -3
- package/dist/types/components/AppChoiceCard.d.ts +55 -14
- package/dist/types/components/AppChoiceChip.d.ts +26 -6
- package/dist/types/components/AppCodeBlock.d.ts +27 -7
- package/dist/types/components/AppColorField.d.ts +36 -8
- package/dist/types/components/AppColumnMenu.d.ts +17 -4
- package/dist/types/components/AppCommandPalette.d.ts +72 -29
- package/dist/types/components/AppCommentThread.d.ts +25 -7
- package/dist/types/components/AppCompareTable.d.ts +9 -4
- package/dist/types/components/AppConfirmDialog.d.ts +54 -15
- package/dist/types/components/AppConsentBanner.d.ts +45 -12
- package/dist/types/components/AppContextMenu.d.ts +23 -10
- package/dist/types/components/AppCopyButton.d.ts +39 -9
- package/dist/types/components/AppCountrySelect.d.ts +50 -1
- package/dist/types/components/AppDashboardCell.d.ts +10 -2
- package/dist/types/components/AppDashboardGrid.d.ts +5 -1
- package/dist/types/components/AppDataTable.d.ts +103 -50
- package/dist/types/components/AppDatePicker.d.ts +32 -0
- package/dist/types/components/AppDateRangePicker.d.ts +31 -0
- package/dist/types/components/AppDescriptions.d.ts +28 -8
- package/dist/types/components/AppDrawer.d.ts +54 -13
- package/dist/types/components/AppDropZone.d.ts +34 -11
- package/dist/types/components/AppDropdown.d.ts +27 -20
- package/dist/types/components/AppDueDate.d.ts +16 -5
- package/dist/types/components/AppEmptyState.d.ts +22 -6
- package/dist/types/components/AppErrorSummary.d.ts +17 -4
- package/dist/types/components/AppFileAttachment.d.ts +30 -14
- package/dist/types/components/AppFilePicker.d.ts +39 -13
- package/dist/types/components/AppFileViewer.d.ts +21 -0
- package/dist/types/components/AppFilterBar.d.ts +23 -8
- package/dist/types/components/AppFloatingDock.d.ts +20 -6
- package/dist/types/components/AppFormActions.d.ts +11 -2
- package/dist/types/components/AppFormRow.d.ts +11 -2
- package/dist/types/components/AppFormSection.d.ts +25 -9
- package/dist/types/components/AppHoverCard.d.ts +25 -8
- package/dist/types/components/AppIcon.d.ts +18 -8
- package/dist/types/components/AppInfoList.d.ts +2 -0
- package/dist/types/components/AppInfoTip.d.ts +17 -4
- package/dist/types/components/AppInlineEdit.d.ts +22 -11
- package/dist/types/components/AppInput.d.ts +81 -2
- package/dist/types/components/AppInputGroup.d.ts +19 -6
- package/dist/types/components/AppKanban.d.ts +51 -23
- package/dist/types/components/AppKbd.d.ts +1 -0
- package/dist/types/components/AppKpiTile.d.ts +61 -31
- package/dist/types/components/AppLightbox.d.ts +12 -6
- package/dist/types/components/AppLink.d.ts +38 -17
- package/dist/types/components/AppLogoPicker.d.ts +88 -23
- package/dist/types/components/AppMarkdown.d.ts +3 -1
- package/dist/types/components/AppMentionInput.d.ts +35 -0
- package/dist/types/components/AppMenubar.d.ts +9 -7
- package/dist/types/components/AppMeter.d.ts +39 -10
- package/dist/types/components/AppMetricStrip.d.ts +11 -2
- package/dist/types/components/AppModal.d.ts +48 -19
- package/dist/types/components/AppMultiSelect.d.ts +44 -0
- package/dist/types/components/AppNavigationMenu.d.ts +6 -3
- package/dist/types/components/AppNotificationCenter.d.ts +23 -8
- package/dist/types/components/AppNumberInput.d.ts +38 -1
- package/dist/types/components/AppOnboardingChecklist.d.ts +27 -8
- package/dist/types/components/AppOtpInput.d.ts +24 -0
- package/dist/types/components/AppPageHeader.d.ts +60 -19
- package/dist/types/components/AppPagination.d.ts +21 -7
- package/dist/types/components/AppPhoneNumberInput.d.ts +37 -0
- package/dist/types/components/AppPopover.d.ts +23 -16
- package/dist/types/components/AppPricingCard.d.ts +27 -8
- package/dist/types/components/AppProgress.d.ts +44 -10
- package/dist/types/components/AppQrCode.d.ts +13 -5
- package/dist/types/components/AppRadio.d.ts +10 -0
- package/dist/types/components/AppRadioGroup.d.ts +47 -17
- package/dist/types/components/AppRating.d.ts +52 -15
- package/dist/types/components/AppRecordPager.d.ts +24 -8
- package/dist/types/components/AppRelativeTime.d.ts +9 -5
- package/dist/types/components/AppRepeater.d.ts +34 -8
- package/dist/types/components/AppResizable.d.ts +11 -3
- package/dist/types/components/AppResizableHandle.d.ts +9 -1
- package/dist/types/components/AppResizablePanel.d.ts +10 -3
- package/dist/types/components/AppResourceCard.d.ts +14 -2
- package/dist/types/components/AppResult.d.ts +23 -7
- package/dist/types/components/AppRichText.d.ts +34 -0
- package/dist/types/components/AppRollingNumber.d.ts +17 -7
- package/dist/types/components/AppRouteError.d.ts +22 -5
- package/dist/types/components/AppScoreScale.d.ts +40 -12
- package/dist/types/components/AppScrollbar.d.ts +7 -3
- package/dist/types/components/AppSearch.d.ts +32 -7
- package/dist/types/components/AppSectionCallToAction.d.ts +27 -7
- package/dist/types/components/AppSectionFaq.d.ts +27 -7
- package/dist/types/components/AppSectionFeatures.d.ts +34 -8
- package/dist/types/components/AppSectionHero.d.ts +29 -8
- package/dist/types/components/AppSectionLogos.d.ts +29 -7
- package/dist/types/components/AppSectionPricing.d.ts +25 -6
- package/dist/types/components/AppSectionTestimonials.d.ts +29 -7
- package/dist/types/components/AppSegmented.d.ts +41 -13
- package/dist/types/components/AppSelect.d.ts +53 -1
- package/dist/types/components/AppSelectMini.d.ts +28 -11
- package/dist/types/components/AppShell.d.ts +81 -35
- package/dist/types/components/AppShortcutLegend.d.ts +12 -4
- package/dist/types/components/AppShowMore.d.ts +26 -5
- package/dist/types/components/AppSidebarMenu.d.ts +59 -18
- package/dist/types/components/AppSkeleton.d.ts +33 -4
- package/dist/types/components/AppSlider.d.ts +43 -0
- package/dist/types/components/AppSortableList.d.ts +20 -0
- package/dist/types/components/AppSparkline.d.ts +19 -5
- package/dist/types/components/AppSpinner.d.ts +14 -3
- package/dist/types/components/AppSplash.d.ts +24 -7
- package/dist/types/components/AppSplitButton.d.ts +47 -14
- package/dist/types/components/AppSplitView.d.ts +53 -27
- package/dist/types/components/AppStatusBadge.d.ts +11 -3
- package/dist/types/components/AppStepper.d.ts +36 -11
- package/dist/types/components/AppSwitch.d.ts +16 -0
- package/dist/types/components/AppTableEmptyState.d.ts +7 -3
- package/dist/types/components/AppTablePagination.d.ts +23 -9
- package/dist/types/components/AppTableToolbar.d.ts +24 -10
- package/dist/types/components/AppTabs.d.ts +47 -18
- package/dist/types/components/AppTagInput.d.ts +38 -0
- package/dist/types/components/AppTextarea.d.ts +46 -0
- package/dist/types/components/AppThemeToggle.d.ts +58 -12
- package/dist/types/components/AppTimePicker.d.ts +38 -1
- package/dist/types/components/AppTimeline.d.ts +22 -20
- package/dist/types/components/AppToast.d.ts +30 -12
- package/dist/types/components/AppToolbar.d.ts +24 -9
- package/dist/types/components/AppTooltip.d.ts +24 -14
- package/dist/types/components/AppTour.d.ts +10 -0
- package/dist/types/components/AppTreeView.d.ts +23 -0
- package/dist/types/components/AppTruncate.d.ts +11 -2
- package/dist/types/components/AppUpdateBar.d.ts +10 -2
- package/dist/types/components/AppWhatsNew.d.ts +26 -7
- package/dist/types/components/AppWizard.d.ts +79 -0
- package/dist/types/components/AppWorkspaceSwitcher.d.ts +36 -17
- package/dist/types/lib/wuiMarker.d.ts +4 -0
- package/package.json +11 -7
|
@@ -5,56 +5,121 @@ import "@webority/ui-elements/elements/image-crop";
|
|
|
5
5
|
* (optimistic) while the caller uploads and reflects it back via `value`.
|
|
6
6
|
*
|
|
7
7
|
* @param {object} props
|
|
8
|
-
* @param {string|null} [props.value]
|
|
9
|
-
* @param {import('react').ReactNode} [props.fallback]
|
|
10
|
-
* @param {string} [props.name]
|
|
8
|
+
* @param {string|null} [props.value]
|
|
9
|
+
* @param {import('react').ReactNode} [props.fallback]
|
|
10
|
+
* @param {string} [props.name]
|
|
11
11
|
* @param {(file: File) => void} props.onPick Receives a validated File, the cropped one when `crop` is set.
|
|
12
12
|
* @param {() => void} [props.onRemove] Called when the × clears the logo. A just-picked image always shows the ×; an existing `value` needs onRemove for its × to appear, because the parent owns it.
|
|
13
|
-
* @param {boolean} [props.loading
|
|
14
|
-
* @param {boolean} [props.disabled
|
|
15
|
-
* @param {string} [props.accept
|
|
16
|
-
* @param {number} [props.maxSizeMb
|
|
17
|
-
* @param {number|'free'} [props.crop]
|
|
18
|
-
* @param {string} [props.overlayIcon
|
|
19
|
-
* @param {string} [props.overlayLabel
|
|
20
|
-
* @param {string} [props.ariaLabel
|
|
21
|
-
* @param {string} [props.removeLabel
|
|
22
|
-
* @param {string} [props.label]
|
|
23
|
-
* @param {string} [props.hint]
|
|
24
|
-
* @param {string} [props.error]
|
|
25
|
-
* @param {'stacked'|'inline'|'profile'} [props.layout
|
|
26
|
-
* @param {import('react').ReactNode} [props.title]
|
|
27
|
-
* @param {import('react').ReactNode} [props.subtitle]
|
|
28
|
-
* @param {boolean} [props.required
|
|
29
|
-
* @param {'initials'|'avatar'} [props.variant
|
|
30
|
-
* @param {'sm'|'md'|'lg'|number} [props.size
|
|
31
|
-
* @param {'circle'|'rounded'|'square'} [props.shape
|
|
32
|
-
* @param {string} [props.className
|
|
13
|
+
* @param {boolean} [props.loading]
|
|
14
|
+
* @param {boolean} [props.disabled]
|
|
15
|
+
* @param {string} [props.accept]
|
|
16
|
+
* @param {number} [props.maxSizeMb]
|
|
17
|
+
* @param {number|'free'} [props.crop]
|
|
18
|
+
* @param {string} [props.overlayIcon]
|
|
19
|
+
* @param {string} [props.overlayLabel]
|
|
20
|
+
* @param {string} [props.ariaLabel]
|
|
21
|
+
* @param {string} [props.removeLabel]
|
|
22
|
+
* @param {string} [props.label]
|
|
23
|
+
* @param {string} [props.hint]
|
|
24
|
+
* @param {string} [props.error]
|
|
25
|
+
* @param {'stacked'|'inline'|'profile'} [props.layout]
|
|
26
|
+
* @param {import('react').ReactNode} [props.title]
|
|
27
|
+
* @param {import('react').ReactNode} [props.subtitle]
|
|
28
|
+
* @param {boolean} [props.required]
|
|
29
|
+
* @param {'initials'|'avatar'} [props.variant]
|
|
30
|
+
* @param {'sm'|'md'|'lg'|number} [props.size]
|
|
31
|
+
* @param {'circle'|'rounded'|'square'} [props.shape]
|
|
32
|
+
* @param {string} [props.className]
|
|
33
33
|
*/
|
|
34
34
|
export default function AppLogoPicker(props: {
|
|
35
|
+
/** The current image URL. Null and absent both mean no image. */
|
|
35
36
|
value?: string | null;
|
|
37
|
+
/** Shown when there is no image, for example initials. */
|
|
36
38
|
fallback?: import('react').ReactNode;
|
|
39
|
+
/** The form field name, so an uncontrolled form can post the file. */
|
|
37
40
|
name?: string;
|
|
38
41
|
onPick: (file: File) => void;
|
|
39
42
|
onRemove?: () => void;
|
|
43
|
+
/**
|
|
44
|
+
* Shows a spinner and blocks interaction while the picked file uploads.
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
40
47
|
loading?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* A non-busy, non-interactive state.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
41
52
|
disabled?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* The file types the picker accepts.
|
|
55
|
+
* @default "image/png,image/jpeg,image/webp"
|
|
56
|
+
*/
|
|
42
57
|
accept?: string;
|
|
58
|
+
/**
|
|
59
|
+
* The largest accepted file in megabytes. 0 means no size limit.
|
|
60
|
+
* @default 5
|
|
61
|
+
*/
|
|
43
62
|
maxSizeMb?: number;
|
|
63
|
+
/** Adds a crop step before upload: a dialog lets the person drag and zoom a frame, and the picked file is the cropped one. A number is the frame's width divided by its height, such as 1 for an avatar; free lets them resize the frame. */
|
|
44
64
|
crop?: number | 'free';
|
|
65
|
+
/**
|
|
66
|
+
* The icon name for the hover overlay.
|
|
67
|
+
* @default "image"
|
|
68
|
+
*/
|
|
45
69
|
overlayIcon?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The text of the hover overlay.
|
|
72
|
+
* @default "Update photo"
|
|
73
|
+
*/
|
|
46
74
|
overlayLabel?: string;
|
|
75
|
+
/**
|
|
76
|
+
* The accessible name of the upload button.
|
|
77
|
+
* @default "Upload photo"
|
|
78
|
+
*/
|
|
47
79
|
ariaLabel?: string;
|
|
80
|
+
/**
|
|
81
|
+
* The accessible name and tooltip of the remove control. Use Remove logo on a logo picker.
|
|
82
|
+
* @default "Remove photo"
|
|
83
|
+
*/
|
|
48
84
|
removeLabel?: string;
|
|
85
|
+
/** An optional field label above the ring. */
|
|
49
86
|
label?: string;
|
|
87
|
+
/** Optional helper text: below the ring when stacked, in the side column when inline or profile. */
|
|
50
88
|
hint?: string;
|
|
89
|
+
/** An inline error from the caller. It wins over an automatic rejection reason. */
|
|
51
90
|
error?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Stacked is the ring with the hint below. Inline is a profile row with the ring on the left and a title, subtitle and hint column beside it. Profile stacks the same identity block, centred, beneath the ring.
|
|
93
|
+
* @default "stacked"
|
|
94
|
+
*/
|
|
52
95
|
layout?: 'stacked' | 'inline' | 'profile';
|
|
96
|
+
/** Bold primary text beside the ring. Inline and profile layouts only. */
|
|
53
97
|
title?: import('react').ReactNode;
|
|
98
|
+
/** Muted secondary text beside the ring. Inline and profile layouts only. */
|
|
54
99
|
subtitle?: import('react').ReactNode;
|
|
100
|
+
/**
|
|
101
|
+
* Marks the field as required.
|
|
102
|
+
* @default false
|
|
103
|
+
*/
|
|
55
104
|
required?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* The placeholder style: initials text, or a standard avatar with a muted disc and a person icon when there are no initials.
|
|
107
|
+
* @default "initials"
|
|
108
|
+
*/
|
|
56
109
|
variant?: 'initials' | 'avatar';
|
|
110
|
+
/**
|
|
111
|
+
* A preset (sm 72, md 120, lg 160 pixels) or an exact ring diameter in pixels. The whole control scales from it.
|
|
112
|
+
* @default "md"
|
|
113
|
+
*/
|
|
57
114
|
size?: 'sm' | 'md' | 'lg' | number;
|
|
115
|
+
/**
|
|
116
|
+
* The ring shape.
|
|
117
|
+
* @default "circle"
|
|
118
|
+
*/
|
|
58
119
|
shape?: 'circle' | 'rounded' | 'square';
|
|
120
|
+
/**
|
|
121
|
+
* Extra classes on the field wrapper.
|
|
122
|
+
* @default ""
|
|
123
|
+
*/
|
|
59
124
|
className?: string;
|
|
60
125
|
}): import("react").JSX.Element;
|
|
@@ -9,7 +9,7 @@ import "@webority/ui-elements/elements/markdown";
|
|
|
9
9
|
* The root is the shared `<wui-markdown>` element that Razor `<app-markdown>` writes, so both draw the same markup.
|
|
10
10
|
*
|
|
11
11
|
* @param {object} props
|
|
12
|
-
* @param {string} [props.value]
|
|
12
|
+
* @param {string} [props.value]
|
|
13
13
|
* @param {(href: string) => string|null|undefined} [props.resolveLink] Maps a `scheme:kind/id` link
|
|
14
14
|
* to an in-app route such as "/support?ticket=3f2a", or null to show its label as text.
|
|
15
15
|
* @param {import('react').ElementType} [props.linkComponent] A router link. It receives `to` for an
|
|
@@ -17,8 +17,10 @@ import "@webority/ui-elements/elements/markdown";
|
|
|
17
17
|
* @param {string} [props.className]
|
|
18
18
|
*/
|
|
19
19
|
export default function AppMarkdown(props: {
|
|
20
|
+
/** The Markdown source. Missing text renders nothing. */
|
|
20
21
|
value?: string;
|
|
21
22
|
resolveLink?: (href: string) => string | null | undefined;
|
|
22
23
|
linkComponent?: import('react').ElementType;
|
|
24
|
+
/** Extra classes on the root element. */
|
|
23
25
|
className?: string;
|
|
24
26
|
}): import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/mention-input";
|
|
2
2
|
declare const AppMentionInput: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
/** The stored value, plain text with each mention written as @[Asha Rao](u-12). */
|
|
3
4
|
value?: string;
|
|
4
5
|
onChange?: (value: string, meta: {
|
|
5
6
|
mentions: {
|
|
@@ -7,6 +8,7 @@ declare const AppMentionInput: import("react").ForwardRefExoticComponent<{
|
|
|
7
8
|
label: string;
|
|
8
9
|
}[];
|
|
9
10
|
}) => void;
|
|
11
|
+
/** The people to offer when the person types @. */
|
|
10
12
|
people?: {
|
|
11
13
|
value: string;
|
|
12
14
|
label: string;
|
|
@@ -21,21 +23,54 @@ declare const AppMentionInput: import("react").ForwardRefExoticComponent<{
|
|
|
21
23
|
description?: string;
|
|
22
24
|
src?: string;
|
|
23
25
|
}[]>;
|
|
26
|
+
/**
|
|
27
|
+
* How many letters after @ before the lookup runs.
|
|
28
|
+
* @default 1
|
|
29
|
+
*/
|
|
24
30
|
minChars?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Milliseconds to wait for typing to pause before the lookup runs.
|
|
33
|
+
* @default 250
|
|
34
|
+
*/
|
|
25
35
|
debounce?: number;
|
|
26
36
|
onSubmit?: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* The number of visible lines.
|
|
39
|
+
* @default 3
|
|
40
|
+
*/
|
|
27
41
|
rows?: number;
|
|
42
|
+
/** Hint text shown while the box is empty. */
|
|
28
43
|
placeholder?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Turns the box off.
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
29
48
|
disabled?: boolean;
|
|
49
|
+
/** Posts the stored value under this name in a form. */
|
|
30
50
|
name?: string;
|
|
51
|
+
/** The element id. The text box is the id plus -text, which is the label's target. */
|
|
31
52
|
id?: string;
|
|
53
|
+
/** Shown above the box. A string label also names the box. */
|
|
32
54
|
label?: import('react').ReactNode;
|
|
55
|
+
/** An error message shown under the box. */
|
|
33
56
|
error?: string;
|
|
57
|
+
/** Helper text shown under the box when there is no error. */
|
|
34
58
|
hint?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Marks the field as required.
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
35
63
|
required?: boolean;
|
|
64
|
+
/** Help content shown in an info tip beside the label. */
|
|
36
65
|
help?: import('react').ReactNode;
|
|
66
|
+
/**
|
|
67
|
+
* The accessible name of that info tip.
|
|
68
|
+
* @default "More information"
|
|
69
|
+
*/
|
|
37
70
|
helpLabel?: string;
|
|
71
|
+
/** Extra classes on the element. */
|
|
38
72
|
className?: string;
|
|
73
|
+
/** Extra classes on the field wrapper. */
|
|
39
74
|
fieldClassName?: string;
|
|
40
75
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
41
76
|
export default AppMentionInput;
|
|
@@ -12,16 +12,13 @@ import "@webority/ui-elements/elements/menubar";
|
|
|
12
12
|
* the parity check reads the first signature it finds as the component's public props.
|
|
13
13
|
*
|
|
14
14
|
* @param {object} props
|
|
15
|
-
* @param {{ key: string, label: string, disabled?: boolean, items: { key: string, label?: string, icon?: string|import('react').ReactNode, to?: string, onClick?: () => void, shortcut?: string, danger?: boolean, disabled?: boolean, divider?:
|
|
16
|
-
*
|
|
17
|
-
* submenu opener (`onClick` and `to` are then ignored); `divider: true` is a separator and needs
|
|
18
|
-
* only a unique `key`. `icon` is a glyph name or a node. A `disabled` row is listed but skipped by
|
|
19
|
-
* the arrow keys and cannot be chosen.
|
|
20
|
-
* @param {string} [props.ariaLabel='Application menu'] Accessible name of the bar.
|
|
15
|
+
* @param {{ key: string, label: string, disabled?: boolean, items: { key: string, label?: string, icon?: string|import('react').ReactNode, to?: string, onClick?: () => void, shortcut?: string, danger?: boolean, disabled?: boolean, divider?: boolean, items?: object[] }[] }[]} props.menus
|
|
16
|
+
* @param {string} [props.ariaLabel]
|
|
21
17
|
* @param {import('react').ElementType} [props.linkComponent] Component for `to` rows (e.g. Link).
|
|
22
18
|
* @param {string} [props.className]
|
|
23
19
|
*/
|
|
24
20
|
export default function AppMenubar(props: {
|
|
21
|
+
/** The menus, left to right. A row is an action or a link; a row with items opens a submenu; a divider row is a separator. */
|
|
25
22
|
menus: {
|
|
26
23
|
key: string;
|
|
27
24
|
label: string;
|
|
@@ -35,11 +32,16 @@ export default function AppMenubar(props: {
|
|
|
35
32
|
shortcut?: string;
|
|
36
33
|
danger?: boolean;
|
|
37
34
|
disabled?: boolean;
|
|
38
|
-
divider?:
|
|
35
|
+
divider?: boolean;
|
|
39
36
|
items?: object[];
|
|
40
37
|
}[];
|
|
41
38
|
}[];
|
|
39
|
+
/**
|
|
40
|
+
* The accessible name of the bar.
|
|
41
|
+
* @default "Application menu"
|
|
42
|
+
*/
|
|
42
43
|
ariaLabel?: string;
|
|
43
44
|
linkComponent?: import('react').ElementType;
|
|
45
|
+
/** Extra classes on the bar. */
|
|
44
46
|
className?: string;
|
|
45
47
|
}): import("react").JSX.Element;
|
|
@@ -5,28 +5,57 @@
|
|
|
5
5
|
* bar, and renders identically to the Razor `<app-meter>`.
|
|
6
6
|
*
|
|
7
7
|
* @param {object} props
|
|
8
|
-
* @param {number} props.value
|
|
9
|
-
* @param {number} [props.min
|
|
10
|
-
* @param {number} [props.max
|
|
11
|
-
* @param {'info'|'success'|'warning'|'danger'|'neutral'} [props.tone
|
|
12
|
-
* @param {'high'|'low'} [props.optimum
|
|
13
|
-
* @param {number} [props.low]
|
|
14
|
-
* @param {number} [props.high]
|
|
15
|
-
* @param {'sm'|'md'} [props.size
|
|
16
|
-
* @param {string} [props.label]
|
|
17
|
-
* @param {boolean} [props.showLabel
|
|
8
|
+
* @param {number} props.value
|
|
9
|
+
* @param {number} [props.min]
|
|
10
|
+
* @param {number} [props.max]
|
|
11
|
+
* @param {'info'|'success'|'warning'|'danger'|'neutral'} [props.tone]
|
|
12
|
+
* @param {'high'|'low'} [props.optimum]
|
|
13
|
+
* @param {number} [props.low]
|
|
14
|
+
* @param {number} [props.high]
|
|
15
|
+
* @param {'sm'|'md'} [props.size]
|
|
16
|
+
* @param {string} [props.label]
|
|
17
|
+
* @param {boolean} [props.showLabel]
|
|
18
18
|
* @param {string} [props.className]
|
|
19
19
|
*/
|
|
20
20
|
export default function AppMeter(props: {
|
|
21
|
+
/** The measurement, from min to max. It is clamped into range. */
|
|
21
22
|
value: number;
|
|
23
|
+
/**
|
|
24
|
+
* The low end of the range.
|
|
25
|
+
* @default 0
|
|
26
|
+
*/
|
|
22
27
|
min?: number;
|
|
28
|
+
/**
|
|
29
|
+
* The high end of the range.
|
|
30
|
+
* @default 100
|
|
31
|
+
*/
|
|
23
32
|
max?: number;
|
|
33
|
+
/**
|
|
34
|
+
* The fill colour when no thresholds are set.
|
|
35
|
+
* @default "info"
|
|
36
|
+
*/
|
|
24
37
|
tone?: 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
38
|
+
/**
|
|
39
|
+
* Which end is good. High means bigger is better.
|
|
40
|
+
* @default "high"
|
|
41
|
+
*/
|
|
25
42
|
optimum?: 'high' | 'low';
|
|
43
|
+
/** A value at or below this is the low zone. */
|
|
26
44
|
low?: number;
|
|
45
|
+
/** A value at or above this is the high zone. */
|
|
27
46
|
high?: number;
|
|
47
|
+
/**
|
|
48
|
+
* The bar thickness.
|
|
49
|
+
* @default "md"
|
|
50
|
+
*/
|
|
28
51
|
size?: 'sm' | 'md';
|
|
52
|
+
/** The accessible name of the bar. It is also shown above the bar when showLabel is set. */
|
|
29
53
|
label?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Shows the label text above the bar.
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
30
58
|
showLabel?: boolean;
|
|
59
|
+
/** Extra classes on the component. */
|
|
31
60
|
className?: string;
|
|
32
61
|
}): import("react").JSX.Element;
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @param {object} props
|
|
6
6
|
* @param {{ label: string, value: import('react').ReactNode, note?: string, href?: string, tone?: 'neutral'|'success'|'warning'|'danger'|'info' }[]} props.items
|
|
7
|
-
* @param {3|4|5} [props.columns
|
|
8
|
-
* @param {'sm'|'md'} [props.size
|
|
7
|
+
* @param {3|4|5} [props.columns]
|
|
8
|
+
* @param {'sm'|'md'} [props.size]
|
|
9
9
|
* @param {string} [props.className]
|
|
10
10
|
*/
|
|
11
11
|
export default function AppMetricStrip(props: {
|
|
12
|
+
/** The values in the strip, three to five of them. */
|
|
12
13
|
items: {
|
|
13
14
|
label: string;
|
|
14
15
|
value: import('react').ReactNode;
|
|
@@ -16,7 +17,15 @@ export default function AppMetricStrip(props: {
|
|
|
16
17
|
href?: string;
|
|
17
18
|
tone?: 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
18
19
|
}[];
|
|
20
|
+
/**
|
|
21
|
+
* How many values sit in a row.
|
|
22
|
+
* @default 4
|
|
23
|
+
*/
|
|
19
24
|
columns?: 3 | 4 | 5;
|
|
25
|
+
/**
|
|
26
|
+
* The value and label scale.
|
|
27
|
+
* @default "md"
|
|
28
|
+
*/
|
|
20
29
|
size?: 'sm' | 'md';
|
|
21
30
|
className?: string;
|
|
22
31
|
}): import("react").JSX.Element;
|
|
@@ -3,47 +3,76 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param {object} props
|
|
5
5
|
* @param {boolean} props.open
|
|
6
|
-
* @param {import('react').ReactNode} [props.eyebrow]
|
|
6
|
+
* @param {import('react').ReactNode} [props.eyebrow]
|
|
7
7
|
* @param {import('react').ReactNode} [props.title]
|
|
8
8
|
* @param {import('react').ReactNode} [props.subtitle]
|
|
9
|
-
* @param {string} [props.headerIcon]
|
|
10
|
-
* @param {'default'|'danger'|'success'|'warning'} [props.tone
|
|
11
|
-
*
|
|
12
|
-
* @param {boolean} [props.dismissible=true] Show the header close (×) button. Pair with
|
|
13
|
-
* `staticBackdrop` for a forced-choice dialog with no way out but an explicit action.
|
|
9
|
+
* @param {string} [props.headerIcon]
|
|
10
|
+
* @param {'default'|'danger'|'success'|'warning'} [props.tone]
|
|
11
|
+
* @param {boolean} [props.dismissible]
|
|
14
12
|
* @param {() => void} props.onClose
|
|
15
13
|
* @param {import('react').ReactNode} [props.footer]
|
|
16
|
-
* @param {'sm'|'md'|'lg'|'xl'|'fullscreen'|number} [props.size
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @param {
|
|
20
|
-
*
|
|
21
|
-
* @param {
|
|
22
|
-
* @param {
|
|
23
|
-
*
|
|
24
|
-
* @param {boolean} [props.staticBackdrop=false] When true, the backdrop click and Escape
|
|
25
|
-
* key no longer close the dialog — only an explicit close action can.
|
|
26
|
-
* @param {string} [props.confirmDiscard] Ask before closing while dirty: this text, with Discard and Keep editing in the footer.
|
|
27
|
-
* @param {boolean} [props.dirty=false] True while a field differs from its loaded value; the caller owns it.
|
|
28
|
-
* @param {string} [props.className] Extra classes on the modal card.
|
|
14
|
+
* @param {'sm'|'md'|'lg'|'xl'|'fullscreen'|number} [props.size]
|
|
15
|
+
* @param {'center'|'top'} [props.placement]
|
|
16
|
+
* @param {boolean} [props.hideHeader]
|
|
17
|
+
* @param {string} [props.ariaLabel]
|
|
18
|
+
* @param {boolean} [props.staticBackdrop]
|
|
19
|
+
* @param {string} [props.confirmDiscard]
|
|
20
|
+
* @param {boolean} [props.dirty]
|
|
21
|
+
* @param {string} [props.className]
|
|
29
22
|
* @param {import('react').ReactNode} props.children
|
|
30
23
|
*/
|
|
31
24
|
export default function AppModal(props: {
|
|
25
|
+
/** Whether the dialog is shown. */
|
|
32
26
|
open: boolean;
|
|
27
|
+
/** A small kicker label above the title. */
|
|
33
28
|
eyebrow?: import('react').ReactNode;
|
|
29
|
+
/** The dialog title, shown in the header. */
|
|
34
30
|
title?: import('react').ReactNode;
|
|
31
|
+
/** A quieter line under the title. */
|
|
35
32
|
subtitle?: import('react').ReactNode;
|
|
33
|
+
/** A library icon name drawn in the header. */
|
|
36
34
|
headerIcon?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Tints the header icon and eyebrow to signal intent, such as a destructive or a success dialog.
|
|
37
|
+
* @default "default"
|
|
38
|
+
*/
|
|
37
39
|
tone?: 'default' | 'danger' | 'success' | 'warning';
|
|
40
|
+
/**
|
|
41
|
+
* Shows the close button in the header. Pair it with staticBackdrop for a forced-choice dialog.
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
38
44
|
dismissible?: boolean;
|
|
39
45
|
onClose: () => void;
|
|
46
|
+
/** Content pinned at the bottom, usually the action buttons. */
|
|
40
47
|
footer?: import('react').ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* The card width: a preset, fullscreen for the whole viewport with header and footer pinned, or a number for an exact max width in pixels.
|
|
50
|
+
* @default "md"
|
|
51
|
+
*/
|
|
41
52
|
size?: 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen' | number;
|
|
53
|
+
/**
|
|
54
|
+
* Vertical placement of the card: centred, or pinned near the top of the viewport.
|
|
55
|
+
* @default "center"
|
|
56
|
+
*/
|
|
42
57
|
placement?: 'center' | 'top';
|
|
58
|
+
/**
|
|
59
|
+
* Hides the header, leaving the body and footer.
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
43
62
|
hideHeader?: boolean;
|
|
63
|
+
/** The accessible name when the title is not plain text, or when the header is hidden. */
|
|
44
64
|
ariaLabel?: string;
|
|
65
|
+
/**
|
|
66
|
+
* When true, a backdrop click and the Escape key no longer close the dialog.
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
45
69
|
staticBackdrop?: boolean;
|
|
70
|
+
/** Asks before closing while dirty, with this text and Discard and Keep editing in the footer. */
|
|
46
71
|
confirmDiscard?: string;
|
|
72
|
+
/**
|
|
73
|
+
* True while a field differs from its loaded value. The caller owns it.
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
47
76
|
dirty?: boolean;
|
|
48
77
|
className?: string;
|
|
49
78
|
children: import('react').ReactNode;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/multiselect";
|
|
2
2
|
declare const AppMultiSelect: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
/** The values of the chosen options. */
|
|
3
4
|
values?: string[];
|
|
4
5
|
onChange?: (values: string[]) => void;
|
|
6
|
+
/** The choices. A label may be a node; search, typeahead and the accessible names use its text. */
|
|
5
7
|
options?: Array<{
|
|
6
8
|
value: string;
|
|
7
9
|
label: import('react').ReactNode;
|
|
@@ -11,24 +13,66 @@ declare const AppMultiSelect: import("react").ForwardRefExoticComponent<{
|
|
|
11
13
|
disabled?: boolean;
|
|
12
14
|
disabledHint?: string;
|
|
13
15
|
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Shown while nothing is chosen.
|
|
18
|
+
* @default "Select…"
|
|
19
|
+
*/
|
|
14
20
|
placeholder?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Placeholder of the search box inside the menu.
|
|
23
|
+
* @default "Search…"
|
|
24
|
+
*/
|
|
15
25
|
searchPlaceholder?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Shows a search box in the menu. Ignored when allowCustom is on, because the inline input is the search.
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
16
30
|
searchable?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Accepts typed entries that are not options.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
17
35
|
allowCustom?: boolean;
|
|
18
36
|
validateCustom?: (value: string) => boolean | string;
|
|
37
|
+
/** A regular expression a typed entry must match in full. */
|
|
19
38
|
customPattern?: string;
|
|
39
|
+
/** The message for a refused typed entry. Without it the message is Enter a valid value. */
|
|
20
40
|
customInvalidMessage?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Stops the control from opening or changing.
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
21
45
|
disabled?: boolean;
|
|
46
|
+
/** A library icon name drawn at the start of the control. */
|
|
22
47
|
icon?: string;
|
|
48
|
+
/** The control size around the default. */
|
|
23
49
|
size?: 'sm' | 'lg';
|
|
50
|
+
/**
|
|
51
|
+
* Keeps the chosen chips on one row and folds the overflow into a +N counter.
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
24
54
|
collapseChips?: boolean;
|
|
55
|
+
/** The field name posted with the form. */
|
|
25
56
|
name?: string;
|
|
57
|
+
/** The DOM id of the control and the target of the label. */
|
|
26
58
|
id?: string;
|
|
59
|
+
/** The field label. */
|
|
27
60
|
label?: import('react').ReactNode;
|
|
61
|
+
/** An error message shown under the control. */
|
|
28
62
|
error?: string;
|
|
63
|
+
/** A hint shown under the control. */
|
|
29
64
|
hint?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Marks the field as required.
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
30
69
|
required?: boolean;
|
|
70
|
+
/** Help content shown in an info tip beside the label. */
|
|
31
71
|
help?: import('react').ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* The accessible name of that info tip.
|
|
74
|
+
* @default "More information"
|
|
75
|
+
*/
|
|
32
76
|
helpLabel?: string;
|
|
33
77
|
fieldClassName?: string;
|
|
34
78
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -14,13 +14,12 @@ import "@webority/ui-elements/elements/navigation-menu";
|
|
|
14
14
|
*
|
|
15
15
|
* @param {object} props
|
|
16
16
|
* @param {{ key: string, label: string, to?: string, current?: boolean, links?: { key: string, label: string, to: string, description?: string, icon?: string|import('react').ReactNode, current?: boolean }[] }[]} props.items
|
|
17
|
-
*
|
|
18
|
-
* link to `to`. `current` marks the page the visitor is on (`aria-current="page"`).
|
|
19
|
-
* @param {string} [props.ariaLabel='Main'] Accessible name of the navigation landmark.
|
|
17
|
+
* @param {string} [props.ariaLabel]
|
|
20
18
|
* @param {import('react').ElementType} [props.linkComponent] Component for `to` links (e.g. Link).
|
|
21
19
|
* @param {string} [props.className]
|
|
22
20
|
*/
|
|
23
21
|
export default function AppNavigationMenu(props: {
|
|
22
|
+
/** The entries, left to right. An entry with links is a button that opens them; without links it is a link to its target. */
|
|
24
23
|
items: {
|
|
25
24
|
key: string;
|
|
26
25
|
label: string;
|
|
@@ -35,6 +34,10 @@ export default function AppNavigationMenu(props: {
|
|
|
35
34
|
current?: boolean;
|
|
36
35
|
}[];
|
|
37
36
|
}[];
|
|
37
|
+
/**
|
|
38
|
+
* The accessible name of the navigation landmark.
|
|
39
|
+
* @default "Main"
|
|
40
|
+
*/
|
|
38
41
|
ariaLabel?: string;
|
|
39
42
|
linkComponent?: import('react').ElementType;
|
|
40
43
|
className?: string;
|
|
@@ -53,26 +53,41 @@ export type NotificationItem = {
|
|
|
53
53
|
* `<wui-notification-center>`, which Razor `<app-notification-center>` renders too.
|
|
54
54
|
*
|
|
55
55
|
* @param {object} props
|
|
56
|
-
* @param {NotificationItem[]} props.items
|
|
57
|
-
* @param {number} [props.unread]
|
|
58
|
-
*
|
|
59
|
-
* @param {string} [props.
|
|
60
|
-
* @param {string} [props.
|
|
61
|
-
* @param {
|
|
62
|
-
* @param {
|
|
63
|
-
* @param {string|number|Date} [props.now] The clock for Today and Yesterday; the current time by default.
|
|
56
|
+
* @param {NotificationItem[]} props.items
|
|
57
|
+
* @param {number} [props.unread]
|
|
58
|
+
* @param {string} [props.label]
|
|
59
|
+
* @param {string} [props.emptyText]
|
|
60
|
+
* @param {string} [props.viewAllHref]
|
|
61
|
+
* @param {boolean} [props.defaultOpen]
|
|
62
|
+
* @param {string|number|Date} [props.now]
|
|
64
63
|
* @param {() => void} [props.onMarkAllRead] Called by "Mark all read". Absent: no button.
|
|
65
64
|
* @param {(item: NotificationItem, event: import('react').MouseEvent) => void} [props.onItemClick] Called when an item is chosen, before its link is followed.
|
|
66
65
|
* @param {(open: boolean) => void} [props.onOpenChange] Called when the panel opens or closes.
|
|
67
66
|
* @param {string} [props.className]
|
|
68
67
|
*/
|
|
69
68
|
export default function AppNotificationCenter(props: {
|
|
69
|
+
/** The notifications, newest first. Read state is the caller's: pass the new items after marking some read. */
|
|
70
70
|
items: NotificationItem[];
|
|
71
|
+
/** The badge count when it is larger than the items listed, for example the latest twenty of 120. Without it the count is the number of unread items. */
|
|
71
72
|
unread?: number;
|
|
73
|
+
/**
|
|
74
|
+
* The bell's name and the panel heading.
|
|
75
|
+
* @default "Notifications"
|
|
76
|
+
*/
|
|
72
77
|
label?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Shown when there are no items.
|
|
80
|
+
* @default "You are all caught up."
|
|
81
|
+
*/
|
|
73
82
|
emptyText?: string;
|
|
83
|
+
/** A View all link under the list. Without it there is no link. */
|
|
74
84
|
viewAllHref?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Starts with the panel open. The element owns the state after that.
|
|
87
|
+
* @default false
|
|
88
|
+
*/
|
|
75
89
|
defaultOpen?: boolean;
|
|
90
|
+
/** The clock for Today and Yesterday, as ISO text or epoch milliseconds. The current time when omitted. */
|
|
76
91
|
now?: string | number | Date;
|
|
77
92
|
onMarkAllRead?: () => void;
|
|
78
93
|
onItemClick?: (item: NotificationItem, event: import('react').MouseEvent) => void;
|