@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
package/dist/lib/wuiMarker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`data-wui`,t=`data-wui-props`,n=`
|
|
1
|
+
var e=`data-wui`,t=`data-wui-props`,n=`data-canvas`,r=`__WUI_MARKERS__`,i=`props`,a=new Set([`children`,`className`,`style`,`id`,`key`,`ref`,`as`,`linkComponent`,`src`]),o=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`;function s(){return globalThis[r]===i}function c(r,i){let c={[e]:r},l=i?.[n];if(typeof l==`string`&&l!==``&&(c[n]=l),!s())return c;let u={};for(let[e,t]of Object.entries(i||{}))a.has(e)||e.startsWith(`aria-`)||e.startsWith(`data-`)||/^on[A-Z]/.test(e)||o(t)&&(u[e]=t);return c[t]=JSON.stringify(u),c}export{n as WUI_CANVAS_KEY_ATTRIBUTE,r as WUI_MARKERS_GLOBAL,i as WUI_MARKERS_PROPS_MODE,e as WUI_MARKER_ATTRIBUTE,t as WUI_MARKER_PROPS_ATTRIBUTE,c as wuiMarkerAttributes,s as wuiMarkerPropsOn};
|
|
@@ -9,21 +9,31 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @param {object} props
|
|
11
11
|
* @param {{ key?: string, title: import('react').ReactNode, content: import('react').ReactNode, open?: boolean }[]} props.items
|
|
12
|
-
* @param {boolean} [props.multiple
|
|
13
|
-
* @param {string[]} [props.openItems]
|
|
14
|
-
* @param {string} [props.id]
|
|
15
|
-
* needs a stable anchor to deep-link to; otherwise a unique one is generated.
|
|
12
|
+
* @param {boolean} [props.multiple]
|
|
13
|
+
* @param {string[]} [props.openItems]
|
|
14
|
+
* @param {string} [props.id]
|
|
16
15
|
* @param {string} [props.className]
|
|
17
16
|
*/
|
|
18
17
|
export default function AppAccordion(props: {
|
|
18
|
+
/** The panes, each with a title row and a content body. */
|
|
19
19
|
items: {
|
|
20
20
|
key?: string;
|
|
21
21
|
title: import('react').ReactNode;
|
|
22
22
|
content: import('react').ReactNode;
|
|
23
23
|
open?: boolean;
|
|
24
24
|
}[];
|
|
25
|
+
/**
|
|
26
|
+
* Allows more than one pane open at a time. Leave it off for a list the reader scans.
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
25
29
|
multiple?: boolean;
|
|
30
|
+
/** The keys of the panes that start open. It replaces each item's own open flag and is read again when its content changes. Without multiple only the first key opens. */
|
|
26
31
|
openItems?: string[];
|
|
32
|
+
/** Prefix for the generated pane ids. Set it when a pane needs a stable anchor to link to. */
|
|
27
33
|
id?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Extra classes on the list.
|
|
36
|
+
* @default ""
|
|
37
|
+
*/
|
|
28
38
|
className?: string;
|
|
29
39
|
}): import("react").JSX.Element;
|
|
@@ -10,44 +10,69 @@
|
|
|
10
10
|
* A camera on a defect or a paperclip on a ticket uses its file mode (`onFiles`).
|
|
11
11
|
*
|
|
12
12
|
* @param {object} props
|
|
13
|
-
* @param {string|import('react').ReactNode} props.icon
|
|
14
|
-
* @param {'linear'|'outline'|'bold'|'bulk'|'broken'|'twotone'} [props.iconVariant
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* @param {string} props.
|
|
18
|
-
* @param {
|
|
19
|
-
* tooltip prefers. `auto` (default) lets Popper pick the side with the most room; a named side
|
|
20
|
-
* is preferred but still flips to stay in view. Powered by `AppTooltip`, so it never clips.
|
|
21
|
-
* @param {string} [props.shortcut] the key that runs this action ("J", "E", "/"), drawn as a key chip in the tooltip
|
|
22
|
-
* after the label. Sets aria-keyshortcuts; the page binds the key itself (useListShortcuts). Needs a `label`, which supplies the tooltip.
|
|
23
|
-
* @param {boolean} [props.danger] destructive tint
|
|
13
|
+
* @param {string|import('react').ReactNode} props.icon
|
|
14
|
+
* @param {'linear'|'outline'|'bold'|'bulk'|'broken'|'twotone'} [props.iconVariant]
|
|
15
|
+
* @param {string} props.label
|
|
16
|
+
* @param {'auto'|'top'|'bottom'|'start'|'end'} [props.tooltipPlacement]
|
|
17
|
+
* @param {string} [props.shortcut]
|
|
18
|
+
* @param {boolean} [props.danger]
|
|
24
19
|
* @param {boolean} [props.disabled]
|
|
25
|
-
* @param {number} [props.size
|
|
20
|
+
* @param {number} [props.size]
|
|
26
21
|
* @param {() => void} [props.onClick]
|
|
27
22
|
* @param {string} [props.className]
|
|
28
23
|
* @param {React.ElementType} [props.as] render as something else — a router `Link`, `"a"`. When a
|
|
29
24
|
* `label` is set the control is the tooltip trigger, so `as` must FORWARD A REF to its DOM node
|
|
30
25
|
* for the tooltip (Popper) to anchor correctly — router `Link`s already do; a hand-rolled `as`
|
|
31
26
|
* wrapper must use `forwardRef` (the tooltip still opens without it, but may be mispositioned).
|
|
32
|
-
* @param {string} [props.href]
|
|
27
|
+
* @param {string} [props.href]
|
|
33
28
|
* @param {(files: File[]) => void} [props.onFiles] turns the button into a file chooser: a hidden file input opens on click, Enter and Space, and the chosen files arrive here. The control is always a button in this mode.
|
|
34
|
-
* @param {string} [props.accept]
|
|
35
|
-
* @param {boolean} [props.multiple
|
|
29
|
+
* @param {string} [props.accept]
|
|
30
|
+
* @param {boolean} [props.multiple]
|
|
36
31
|
*/
|
|
37
32
|
export default function AppActionIcon(props: {
|
|
33
|
+
/** The glyph, given as a semantic icon name. */
|
|
38
34
|
icon: string | import('react').ReactNode;
|
|
35
|
+
/** The iconsax style of a named icon. */
|
|
39
36
|
iconVariant?: 'linear' | 'outline' | 'bold' | 'bulk' | 'broken' | 'twotone';
|
|
37
|
+
/** The accessible name of the control. It also shows as a tooltip on hover and focus. */
|
|
40
38
|
label: string;
|
|
39
|
+
/**
|
|
40
|
+
* The side the tooltip prefers. Auto picks the side with the most room.
|
|
41
|
+
* @default "auto"
|
|
42
|
+
*/
|
|
41
43
|
tooltipPlacement?: 'auto' | 'top' | 'bottom' | 'start' | 'end';
|
|
44
|
+
/** The key that runs this action, such as J or E. It is drawn as a key chip in the tooltip. */
|
|
42
45
|
shortcut?: string;
|
|
46
|
+
/**
|
|
47
|
+
* A destructive tint.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
43
50
|
danger?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Turns the action off.
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
44
55
|
disabled?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* The glyph size in px. The disc around it scales with it.
|
|
58
|
+
* @default 20
|
|
59
|
+
*/
|
|
45
60
|
size?: number;
|
|
46
61
|
onClick?: () => void;
|
|
62
|
+
/**
|
|
63
|
+
* Extra classes on the control.
|
|
64
|
+
* @default ""
|
|
65
|
+
*/
|
|
47
66
|
className?: string;
|
|
48
67
|
as?: React.ElementType;
|
|
68
|
+
/** Makes the action a link to this address. */
|
|
49
69
|
href?: string;
|
|
50
70
|
onFiles?: (files: File[]) => void;
|
|
71
|
+
/** The file types the chooser offers. File mode only. */
|
|
51
72
|
accept?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Allows several files. File mode only.
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
52
77
|
multiple?: boolean;
|
|
53
78
|
}): any;
|
|
@@ -11,43 +11,76 @@
|
|
|
11
11
|
* `accent` adds the thick left edge that marks such an aside.
|
|
12
12
|
*
|
|
13
13
|
* @param {object} props
|
|
14
|
-
* @param {"info"|"success"|"warning"|"danger"|"neutral"} [props.variant
|
|
14
|
+
* @param {"info"|"success"|"warning"|"danger"|"neutral"} [props.variant]
|
|
15
15
|
* @param {import('react').ReactNode} props.children The alert body.
|
|
16
|
-
* @param {import('react').ReactNode} [props.title]
|
|
17
|
-
* @param {string|import('react').ReactNode} [props.icon]
|
|
18
|
-
* @param {'linear'|'outline'|'bold'|'bulk'|'broken'|'twotone'} [props.iconVariant
|
|
19
|
-
*
|
|
20
|
-
* @param {
|
|
21
|
-
* @param {string} [props.
|
|
22
|
-
* @param {
|
|
23
|
-
* @param {number} [props.imageSize] Width and height of the image badge in px. Unset, it follows `size`.
|
|
16
|
+
* @param {import('react').ReactNode} [props.title]
|
|
17
|
+
* @param {string|import('react').ReactNode} [props.icon]
|
|
18
|
+
* @param {'linear'|'outline'|'bold'|'bulk'|'broken'|'twotone'} [props.iconVariant]
|
|
19
|
+
* @param {number} [props.iconSize]
|
|
20
|
+
* @param {string} [props.image]
|
|
21
|
+
* @param {string} [props.imageAlt]
|
|
22
|
+
* @param {number} [props.imageSize]
|
|
24
23
|
* @param {string} [props.className]
|
|
25
24
|
* @param {() => void} [props.onClose] Called when dismissed
|
|
26
|
-
* @param {boolean} [props.dismissible]
|
|
27
|
-
* @param {boolean} [props.bordered
|
|
28
|
-
* @param {boolean} [props.accent
|
|
29
|
-
* @param {"sm"|"md"|"lg"} [props.size
|
|
30
|
-
*
|
|
31
|
-
* @param {
|
|
32
|
-
* @param {"alert"|"status"|"none"} [props.role="alert"] "status" for non-assertive notices; "none" for
|
|
33
|
-
* explanatory page content, which must not interrupt a screen reader.
|
|
25
|
+
* @param {boolean} [props.dismissible]
|
|
26
|
+
* @param {boolean} [props.bordered]
|
|
27
|
+
* @param {boolean} [props.accent]
|
|
28
|
+
* @param {"sm"|"md"|"lg"} [props.size]
|
|
29
|
+
* @param {import('react').ReactNode} [props.action]
|
|
30
|
+
* @param {"alert"|"status"|"none"} [props.role]
|
|
34
31
|
*/
|
|
35
32
|
export default function AppAlert(props: {
|
|
33
|
+
/**
|
|
34
|
+
* The status tone. Neutral is a plain notice in ink on a grey surface, with no semantic colour.
|
|
35
|
+
* @default "info"
|
|
36
|
+
*/
|
|
36
37
|
variant?: "info" | "success" | "warning" | "danger" | "neutral";
|
|
37
38
|
children: import('react').ReactNode;
|
|
39
|
+
/** A bold heading line above the body. */
|
|
38
40
|
title?: import('react').ReactNode;
|
|
41
|
+
/** A leading glyph, given as a semantic icon name. It defaults to the glyph of the variant; pass null for no badge. */
|
|
39
42
|
icon?: string | import('react').ReactNode;
|
|
43
|
+
/** The iconsax style of a named icon. It does not change an image. */
|
|
40
44
|
iconVariant?: 'linear' | 'outline' | 'bold' | 'bulk' | 'broken' | 'twotone';
|
|
45
|
+
/** The badge glyph's width and height in px. Unset, it follows size. */
|
|
41
46
|
iconSize?: number;
|
|
47
|
+
/** A custom image URL shown in the badge instead of the icon glyph. */
|
|
42
48
|
image?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Alt text for the custom image.
|
|
51
|
+
* @default ""
|
|
52
|
+
*/
|
|
43
53
|
imageAlt?: string;
|
|
54
|
+
/** Width and height of the image badge in px. Unset, it follows size. */
|
|
44
55
|
imageSize?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Extra classes on the alert.
|
|
58
|
+
* @default ""
|
|
59
|
+
*/
|
|
45
60
|
className?: string;
|
|
46
61
|
onClose?: () => void;
|
|
62
|
+
/** Shows the close button. It is on by default when a close handler is set. */
|
|
47
63
|
dismissible?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Draws the soft border of the variant. False keeps only the tint fill.
|
|
66
|
+
* @default true
|
|
67
|
+
*/
|
|
48
68
|
bordered?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* A thick left edge in the variant colour, marking the alert as an aside.
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
49
73
|
accent?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Sm is a compact single line. Lg is roomier, with a larger heading, body and badge.
|
|
76
|
+
* @default "md"
|
|
77
|
+
*/
|
|
50
78
|
size?: "sm" | "md" | "lg";
|
|
79
|
+
/** A trailing action pinned to the right, usually a button. */
|
|
51
80
|
action?: import('react').ReactNode;
|
|
81
|
+
/**
|
|
82
|
+
* Status is for notices that must not interrupt a screen reader. None is for explanatory page content.
|
|
83
|
+
* @default "alert"
|
|
84
|
+
*/
|
|
52
85
|
role?: "alert" | "status" | "none";
|
|
53
86
|
}): import("react").JSX.Element;
|
|
@@ -9,25 +9,35 @@
|
|
|
9
9
|
* the loading state, which is the least surprising reading of "still in flight".
|
|
10
10
|
*
|
|
11
11
|
* @param {object} props
|
|
12
|
-
* @param {boolean} [props.loading
|
|
13
|
-
* @param {string|import('react').ReactNode} [props.error]
|
|
14
|
-
*
|
|
15
|
-
* @param {boolean} [props.empty=false] Show the empty state instead of content — the fetch
|
|
16
|
-
* succeeded with nothing to display.
|
|
12
|
+
* @param {boolean} [props.loading]
|
|
13
|
+
* @param {string|import('react').ReactNode} [props.error]
|
|
14
|
+
* @param {boolean} [props.empty]
|
|
17
15
|
* @param {import('react').ReactNode} props.children Real content, shown once loaded,
|
|
18
16
|
* error-free and non-empty.
|
|
19
17
|
* @param {() => void} [props.onRetry] Shown as a Retry button on the error state when set.
|
|
20
|
-
* @param {import('react').ReactNode} [props.skeleton]
|
|
21
|
-
*
|
|
22
|
-
* omitted.
|
|
23
|
-
* @param {string} [props.className] Extra classes on the wrapper.
|
|
18
|
+
* @param {import('react').ReactNode} [props.skeleton]
|
|
19
|
+
* @param {string} [props.className]
|
|
24
20
|
*/
|
|
25
21
|
export default function AppAsyncBlock(props: {
|
|
22
|
+
/**
|
|
23
|
+
* Shows the skeleton, or a thin progress line when there is none, instead of the content.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
26
|
loading?: boolean;
|
|
27
|
+
/** An error to show in place of the content. A falsy value means no error. */
|
|
27
28
|
error?: string | import('react').ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Shows the empty state instead of the content, for a fetch that succeeded with nothing to display.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
28
33
|
empty?: boolean;
|
|
29
34
|
children: import('react').ReactNode;
|
|
30
35
|
onRetry?: () => void;
|
|
36
|
+
/** A loading placeholder shaped like the content. Without it a thin indeterminate progress line shows. */
|
|
31
37
|
skeleton?: import('react').ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Extra classes on the wrapper.
|
|
40
|
+
* @default ""
|
|
41
|
+
*/
|
|
32
42
|
className?: string;
|
|
33
43
|
}): import("react").JSX.Element;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/autocomplete";
|
|
2
2
|
declare const AppAutocomplete: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
/** The value of the selected option. */
|
|
3
4
|
value?: string;
|
|
4
5
|
onChange?: (value: string, meta?: {
|
|
5
6
|
isCustom: boolean;
|
|
6
7
|
}) => void;
|
|
8
|
+
/** The options to filter as the user types. Each has a value and a label. */
|
|
7
9
|
options?: Array<{
|
|
8
10
|
value: string;
|
|
9
11
|
label: import('react').ReactNode;
|
|
10
12
|
}>;
|
|
13
|
+
/** Text shown for the value when the options do not contain it, such as a selection loaded from the server. */
|
|
11
14
|
valueLabel?: string;
|
|
12
15
|
loadOptions?: (query: string, opts?: {
|
|
13
16
|
signal?: AbortSignal;
|
|
@@ -15,20 +18,53 @@ declare const AppAutocomplete: import("react").ForwardRefExoticComponent<{
|
|
|
15
18
|
value: string;
|
|
16
19
|
label: string;
|
|
17
20
|
}[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Hint text shown in the empty field.
|
|
23
|
+
* @default "Search…"
|
|
24
|
+
*/
|
|
18
25
|
placeholder?: string;
|
|
26
|
+
/** The least number of characters typed before a remote search starts. The default is 1 in remote mode. */
|
|
19
27
|
minChars?: number;
|
|
28
|
+
/** The wait in milliseconds before a remote search runs. The default is 250. */
|
|
20
29
|
debounce?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Turns the field off.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
21
34
|
disabled?: boolean;
|
|
35
|
+
/** The control size. Leave it out for the default size. */
|
|
22
36
|
size?: 'sm' | 'lg';
|
|
37
|
+
/**
|
|
38
|
+
* Offers the typed text as its own row when it matches no option, so a new value can be added.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
23
41
|
allowCustom?: boolean;
|
|
42
|
+
/** The form name of the control. */
|
|
24
43
|
name?: string;
|
|
44
|
+
/** The DOM id of the control and the target of the label. */
|
|
25
45
|
id?: string;
|
|
46
|
+
/** The label shown above the field. */
|
|
26
47
|
label?: import('react').ReactNode;
|
|
48
|
+
/** An error message shown under the field. */
|
|
27
49
|
error?: string;
|
|
50
|
+
/** A hint shown under the field when there is no error. */
|
|
28
51
|
hint?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Marks the field as required, with the mark on the label.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
29
56
|
required?: boolean;
|
|
57
|
+
/** Help content shown in an info tip beside the label. */
|
|
30
58
|
help?: import('react').ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* The accessible name of that info tip.
|
|
61
|
+
* @default "More information"
|
|
62
|
+
*/
|
|
31
63
|
helpLabel?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Extra classes on the field wrapper.
|
|
66
|
+
* @default ""
|
|
67
|
+
*/
|
|
32
68
|
fieldClassName?: string;
|
|
33
69
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
34
70
|
export default AppAutocomplete;
|
|
@@ -4,38 +4,74 @@
|
|
|
4
4
|
* @param {object} props
|
|
5
5
|
* @param {string} [props.name]
|
|
6
6
|
* @param {string} [props.src]
|
|
7
|
-
* @param {"xs"|"sm"|"md"|"lg"|"xl"|"2xl"|number|string} [props.size
|
|
8
|
-
* @param {"circle"|"rounded"|"square"} [props.shape
|
|
9
|
-
* @param {"primary"|"neutral"|"success"|"warning"|"danger"|"info"|"auto"} [props.tone
|
|
10
|
-
* @param {"none"|"online"|"offline"|"away"|"busy"} [props.status
|
|
11
|
-
* @param {boolean} [props.ring
|
|
12
|
-
* @param {string} [props.label]
|
|
13
|
-
* @param {string|import('react').ReactNode} [props.icon]
|
|
14
|
-
* @param {"linear"|"outline"|"bold"|"bulk"|"broken"|"twotone"} [props.iconVariant
|
|
15
|
-
* @param {import('react').ReactNode} [props.badge]
|
|
16
|
-
* @param {string} [props.href]
|
|
7
|
+
* @param {"xs"|"sm"|"md"|"lg"|"xl"|"2xl"|number|string} [props.size]
|
|
8
|
+
* @param {"circle"|"rounded"|"square"} [props.shape]
|
|
9
|
+
* @param {"primary"|"neutral"|"success"|"warning"|"danger"|"info"|"auto"} [props.tone]
|
|
10
|
+
* @param {"none"|"online"|"offline"|"away"|"busy"} [props.status]
|
|
11
|
+
* @param {boolean} [props.ring]
|
|
12
|
+
* @param {string} [props.label]
|
|
13
|
+
* @param {string|import('react').ReactNode} [props.icon]
|
|
14
|
+
* @param {"linear"|"outline"|"bold"|"bulk"|"broken"|"twotone"} [props.iconVariant]
|
|
15
|
+
* @param {import('react').ReactNode} [props.badge]
|
|
16
|
+
* @param {string} [props.href]
|
|
17
17
|
* @param {(e) => void} [props.onClick] Makes the avatar a button (when no href).
|
|
18
18
|
* @param {import('react').ElementType} [props.linkComponent] Router link; receives `to` instead of `href`.
|
|
19
|
-
* @param {string} [props.tooltip]
|
|
20
|
-
* @param {"auto"|"top"|"bottom"|"start"|"end"} [props.tooltipPlacement
|
|
19
|
+
* @param {string} [props.tooltip]
|
|
20
|
+
* @param {"auto"|"top"|"bottom"|"start"|"end"} [props.tooltipPlacement]
|
|
21
21
|
* @param {string} [props.className]
|
|
22
22
|
*/
|
|
23
23
|
export default function AppAvatar(props: {
|
|
24
|
+
/** The person's name. Used for the initials fallback and the image alt text. */
|
|
24
25
|
name?: string;
|
|
26
|
+
/** The profile photo URL, usually a data or object URL. When set, the photo shows over the initials. */
|
|
25
27
|
src?: string;
|
|
28
|
+
/**
|
|
29
|
+
* A preset from xs to 2xl, or a custom pixel size as a number or any CSS length.
|
|
30
|
+
* @default "md"
|
|
31
|
+
*/
|
|
26
32
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | number | string;
|
|
33
|
+
/**
|
|
34
|
+
* The disc shape.
|
|
35
|
+
* @default "circle"
|
|
36
|
+
*/
|
|
27
37
|
shape?: "circle" | "rounded" | "square";
|
|
38
|
+
/**
|
|
39
|
+
* The colour of the initials face. auto gives each name a stable colour.
|
|
40
|
+
* @default "primary"
|
|
41
|
+
*/
|
|
28
42
|
tone?: "primary" | "neutral" | "success" | "warning" | "danger" | "info" | "auto";
|
|
43
|
+
/**
|
|
44
|
+
* A presence dot at the lower right.
|
|
45
|
+
* @default "none"
|
|
46
|
+
*/
|
|
29
47
|
status?: "none" | "online" | "offline" | "away" | "busy";
|
|
48
|
+
/**
|
|
49
|
+
* A ring around the avatar.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
30
52
|
ring?: boolean;
|
|
53
|
+
/** Text shown as a tooltip above the avatar on hover or focus. It is also the accessible name of a link or button avatar. */
|
|
31
54
|
label?: string;
|
|
55
|
+
/** The face shown instead of initials when there is no photo: a library icon name or any node. */
|
|
32
56
|
icon?: string | import('react').ReactNode;
|
|
57
|
+
/**
|
|
58
|
+
* The icon style of a named icon. A node icon is drawn as given.
|
|
59
|
+
* @default "linear"
|
|
60
|
+
*/
|
|
33
61
|
iconVariant?: "linear" | "outline" | "bold" | "bulk" | "broken" | "twotone";
|
|
62
|
+
/** A small count or marker in the top-right corner. */
|
|
34
63
|
badge?: import('react').ReactNode;
|
|
64
|
+
/** Makes the avatar a link. */
|
|
35
65
|
href?: string;
|
|
36
66
|
onClick?: (e: any) => void;
|
|
37
67
|
linkComponent?: import('react').ElementType;
|
|
68
|
+
/** A tooltip on hover or focus that flips to stay on screen. Distinct from label, which is a fixed bubble. */
|
|
38
69
|
tooltip?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The preferred tooltip side. auto picks the side with the most room.
|
|
72
|
+
* @default "auto"
|
|
73
|
+
*/
|
|
39
74
|
tooltipPlacement?: "auto" | "top" | "bottom" | "start" | "end";
|
|
75
|
+
/** Extra classes on the avatar. */
|
|
40
76
|
className?: string;
|
|
41
77
|
}): any;
|
|
@@ -8,15 +8,25 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @param {object} props
|
|
10
10
|
* @param {import('react').ReactNode} props.children The `AppAvatar`s to overlap.
|
|
11
|
-
* @param {"xs"|"sm"|"md"|"lg"|"xl"|"2xl"|number|string} [props.size]
|
|
12
|
-
* @param {"tight"|"normal"|"loose"} [props.spacing
|
|
13
|
-
* @param {number|string} [props.overflow]
|
|
14
|
-
* @param {string} [props.className
|
|
11
|
+
* @param {"xs"|"sm"|"md"|"lg"|"xl"|"2xl"|number|string} [props.size]
|
|
12
|
+
* @param {"tight"|"normal"|"loose"} [props.spacing]
|
|
13
|
+
* @param {number|string} [props.overflow]
|
|
14
|
+
* @param {string} [props.className]
|
|
15
15
|
*/
|
|
16
16
|
export default function AppAvatarGroup(props: {
|
|
17
17
|
children: import('react').ReactNode;
|
|
18
|
+
/** Sizes the whole row at once. Each avatar and the +N chip inherit it; an avatar with its own size still wins. */
|
|
18
19
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | number | string;
|
|
20
|
+
/**
|
|
21
|
+
* How far the avatars overlap.
|
|
22
|
+
* @default "normal"
|
|
23
|
+
*/
|
|
19
24
|
spacing?: "tight" | "normal" | "loose";
|
|
25
|
+
/** The hidden count, shown as a +N chip after the avatars. Zero or unset shows no chip. */
|
|
20
26
|
overflow?: number | string;
|
|
27
|
+
/**
|
|
28
|
+
* Extra classes on the group.
|
|
29
|
+
* @default ""
|
|
30
|
+
*/
|
|
21
31
|
className?: string;
|
|
22
32
|
}): import("react").JSX.Element;
|
|
@@ -6,50 +6,81 @@ import "@webority/ui-elements/elements/image-crop";
|
|
|
6
6
|
* (PNG where the browser cannot encode WebP).
|
|
7
7
|
*
|
|
8
8
|
* @param {object} props
|
|
9
|
-
* @param {string|null} [props.value]
|
|
10
|
-
* @param {string} [props.initials]
|
|
9
|
+
* @param {string|null} [props.value]
|
|
10
|
+
* @param {string} [props.initials]
|
|
11
11
|
* @param {(file: File) => void} props.onPick Receives the cropped square photo.
|
|
12
12
|
* @param {() => void} [props.onRemove] Shows Remove while there is a photo; called when it is pressed.
|
|
13
|
-
* @param {string} [props.name]
|
|
14
|
-
*
|
|
15
|
-
* @param {string} [props.
|
|
16
|
-
*
|
|
17
|
-
* @param {
|
|
18
|
-
*
|
|
19
|
-
* @param {number} [props.maxSizeMb=10] Limit on the chosen photo; 0 means none. The saved crop is
|
|
20
|
-
* far smaller.
|
|
21
|
-
* @param {number} [props.outputSize=512] Width and height of the saved square, in px.
|
|
22
|
-
* @param {'sm'|'md'|'lg'|number} [props.size='md'] Photo diameter: a preset or px.
|
|
13
|
+
* @param {string} [props.name]
|
|
14
|
+
* @param {string} [props.removeName]
|
|
15
|
+
* @param {string} [props.accept]
|
|
16
|
+
* @param {number} [props.maxSizeMb]
|
|
17
|
+
* @param {number} [props.outputSize]
|
|
18
|
+
* @param {'sm'|'md'|'lg'|number} [props.size]
|
|
23
19
|
* @param {string} [props.label]
|
|
24
20
|
* @param {string} [props.hint]
|
|
25
|
-
* @param {string} [props.error]
|
|
26
|
-
* @param {boolean} [props.required
|
|
27
|
-
* @param {boolean} [props.loading
|
|
28
|
-
* @param {boolean} [props.disabled
|
|
29
|
-
* @param {string} [props.ariaLabel]
|
|
30
|
-
* @param {string} [props.className]
|
|
31
|
-
* @param {string} [props.fieldClassName]
|
|
21
|
+
* @param {string} [props.error]
|
|
22
|
+
* @param {boolean} [props.required]
|
|
23
|
+
* @param {boolean} [props.loading]
|
|
24
|
+
* @param {boolean} [props.disabled]
|
|
25
|
+
* @param {string} [props.ariaLabel]
|
|
26
|
+
* @param {string} [props.className]
|
|
27
|
+
* @param {string} [props.fieldClassName]
|
|
32
28
|
* @param {object} [props.style] Inline style; lands on the picker with `className`.
|
|
33
29
|
*/
|
|
34
30
|
export default function AppAvatarPicker(props: {
|
|
31
|
+
/** The current photo URL, or null when there is none. */
|
|
35
32
|
value?: string | null;
|
|
33
|
+
/** Shown when there is no photo. A person icon shows when it is empty. */
|
|
36
34
|
initials?: string;
|
|
37
35
|
onPick: (file: File) => void;
|
|
38
36
|
onRemove?: () => void;
|
|
37
|
+
/** The form field name. The cropped photo is written into the file input, so an uncontrolled form posts it. */
|
|
39
38
|
name?: string;
|
|
39
|
+
/** A form field that posts true once Remove is pressed. It also shows Remove while there is a photo. */
|
|
40
40
|
removeName?: string;
|
|
41
|
+
/** The file types a person may choose. Defaults to JPG, PNG, WebP and HEIC; HEIC opens only where the browser can decode it. */
|
|
41
42
|
accept?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The size limit of the chosen photo in megabytes. 0 means no limit.
|
|
45
|
+
* @default 10
|
|
46
|
+
*/
|
|
42
47
|
maxSizeMb?: number;
|
|
48
|
+
/**
|
|
49
|
+
* The width and height of the saved square, in pixels.
|
|
50
|
+
* @default 512
|
|
51
|
+
*/
|
|
43
52
|
outputSize?: number;
|
|
53
|
+
/**
|
|
54
|
+
* The photo diameter: sm, md or lg, or a number of pixels.
|
|
55
|
+
* @default "md"
|
|
56
|
+
*/
|
|
44
57
|
size?: 'sm' | 'md' | 'lg' | number;
|
|
58
|
+
/** The text shown above the picker. */
|
|
45
59
|
label?: string;
|
|
60
|
+
/** Help text shown below the picker. An error replaces it. */
|
|
46
61
|
hint?: string;
|
|
62
|
+
/** An error message shown below the picker. It wins over a rejection reason. */
|
|
47
63
|
error?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Marks the field as required.
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
48
68
|
required?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Shows a spinner on the photo and blocks every action while a photo uploads.
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
49
73
|
loading?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Blocks every action.
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
50
78
|
disabled?: boolean;
|
|
79
|
+
/** The accessible name of the photo button. Defaults to the words of the action. */
|
|
51
80
|
ariaLabel?: string;
|
|
81
|
+
/** Extra class on the picker (the photo and its actions). */
|
|
52
82
|
className?: string;
|
|
83
|
+
/** Extra class on the field wrapper. */
|
|
53
84
|
fieldClassName?: string;
|
|
54
85
|
style?: object;
|
|
55
86
|
}): import("react").JSX.Element;
|
|
@@ -8,16 +8,27 @@
|
|
|
8
8
|
* @param {object} props
|
|
9
9
|
* @param {import('react').ReactNode} props.children
|
|
10
10
|
* @param {"neutral"|"primary"|"success"|"warning"|"danger"|"info"} [props.tone]
|
|
11
|
-
* @param {boolean} [props.dot
|
|
12
|
-
* @param {string} [props.tooltip]
|
|
13
|
-
* @param {"auto"|"top"|"bottom"|"start"|"end"} [props.tooltipPlacement
|
|
11
|
+
* @param {boolean} [props.dot]
|
|
12
|
+
* @param {string} [props.tooltip]
|
|
13
|
+
* @param {"auto"|"top"|"bottom"|"start"|"end"} [props.tooltipPlacement]
|
|
14
14
|
* @param {string} [props.className]
|
|
15
15
|
*/
|
|
16
16
|
export default function AppBadge(props: {
|
|
17
17
|
children: import('react').ReactNode;
|
|
18
|
+
/** The badge colour. */
|
|
18
19
|
tone?: "neutral" | "primary" | "success" | "warning" | "danger" | "info";
|
|
20
|
+
/**
|
|
21
|
+
* Shows the badge in its compact dot style.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
19
24
|
dot?: boolean;
|
|
25
|
+
/** A tooltip on hover or focus that flips to stay on screen. */
|
|
20
26
|
tooltip?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The preferred tooltip side. auto picks the side with the most room.
|
|
29
|
+
* @default "auto"
|
|
30
|
+
*/
|
|
21
31
|
tooltipPlacement?: "auto" | "top" | "bottom" | "start" | "end";
|
|
32
|
+
/** Extra classes on the badge. */
|
|
22
33
|
className?: string;
|
|
23
34
|
}): any;
|
|
@@ -5,18 +5,28 @@
|
|
|
5
5
|
* toast is a transient pop; a banner is persistent, full-bleed, and page-scoped.
|
|
6
6
|
*
|
|
7
7
|
* @param {object} props
|
|
8
|
-
* @param {'info'|'success'|'warning'|'danger'|'neutral'} [props.tone
|
|
9
|
-
* @param {string|import('react').ReactNode} [props.icon]
|
|
8
|
+
* @param {'info'|'success'|'warning'|'danger'|'neutral'} [props.tone]
|
|
9
|
+
* @param {string|import('react').ReactNode} [props.icon]
|
|
10
10
|
* @param {import('react').ReactNode} props.children The message; may include an inline action link.
|
|
11
|
-
* @param {boolean} [props.dismissible
|
|
11
|
+
* @param {boolean} [props.dismissible]
|
|
12
12
|
* @param {() => void} [props.onDismiss] Called after the banner is dismissed.
|
|
13
13
|
* @param {string} [props.className]
|
|
14
14
|
*/
|
|
15
15
|
export default function AppBanner(props: {
|
|
16
|
+
/**
|
|
17
|
+
* The colour and intent of the banner.
|
|
18
|
+
* @default "info"
|
|
19
|
+
*/
|
|
16
20
|
tone?: 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
21
|
+
/** A leading icon: a library icon name or any node. */
|
|
17
22
|
icon?: string | import('react').ReactNode;
|
|
18
23
|
children: import('react').ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Shows a close button that removes the banner.
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
19
28
|
dismissible?: boolean;
|
|
20
29
|
onDismiss?: () => void;
|
|
30
|
+
/** Extra classes on the banner. */
|
|
21
31
|
className?: string;
|
|
22
32
|
}): import("react").JSX.Element;
|
|
@@ -12,13 +12,12 @@ export declare const BreadcrumbTrailContext: import("react").Context<boolean>;
|
|
|
12
12
|
* never imports a router.
|
|
13
13
|
*
|
|
14
14
|
* @param {object} props
|
|
15
|
-
* @param {{ key?: string, label: string, href?: string, to?: string,
|
|
16
|
-
* icon?: string|import('react').ReactNode }[]} props.items The trail, root first, current
|
|
17
|
-
* page last. An item links when it has `href`/`to`, unless it is the current page.
|
|
15
|
+
* @param {{ key?: string, label: string, href?: string, to?: string, icon?: string|import('react').ReactNode }[]} props.items
|
|
18
16
|
* @param {import('react').ElementType} [props.linkComponent] Component for `to` items (e.g. Link).
|
|
19
17
|
* @param {string} [props.className]
|
|
20
18
|
*/
|
|
21
19
|
export default function AppBreadcrumbs(props: {
|
|
20
|
+
/** The trail, root first, current page last. An item links when it has `href` or `to`, unless it is the current page. */
|
|
22
21
|
items: {
|
|
23
22
|
key?: string;
|
|
24
23
|
label: string;
|
|
@@ -27,5 +26,6 @@ export default function AppBreadcrumbs(props: {
|
|
|
27
26
|
icon?: string | import('react').ReactNode;
|
|
28
27
|
}[];
|
|
29
28
|
linkComponent?: import('react').ElementType;
|
|
29
|
+
/** Extra classes on the trail. */
|
|
30
30
|
className?: string;
|
|
31
31
|
}): import("react").JSX.Element;
|