@webority/ui-react 0.88.1 → 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 +10 -7
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/tour";
|
|
2
2
|
declare const AppTour: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
/** Runs the tour. Set it back to false from onClose. */
|
|
3
4
|
open: boolean;
|
|
4
5
|
onClose: (reason: 'finished' | 'skipped' | 'alreadySeen' | 'noTargets', details: {
|
|
5
6
|
index: number | null;
|
|
6
7
|
position: number | null;
|
|
7
8
|
total: number | null;
|
|
8
9
|
}) => void;
|
|
10
|
+
/** Names the tour in the seen store. */
|
|
9
11
|
tourId: string;
|
|
12
|
+
/** The steps, in order. A step whose target is missing or hidden is dropped. */
|
|
10
13
|
steps: {
|
|
11
14
|
target: string;
|
|
12
15
|
title?: string;
|
|
@@ -18,11 +21,13 @@ declare const AppTour: import("react").ForwardRefExoticComponent<{
|
|
|
18
21
|
advanceOn?: 'click';
|
|
19
22
|
actionLabel?: string;
|
|
20
23
|
}[];
|
|
24
|
+
/** Remembers that a person has seen the tour: it is asked before showing and written when the tour finishes or is skipped, with that outcome. Read through a ref, so an inline object does not restart a running tour. */
|
|
21
25
|
seenStore?: {
|
|
22
26
|
isSeen: (tourId: string) => Promise<boolean>;
|
|
23
27
|
markSeen: (tourId: string, outcome: 'finished' | 'skipped') => Promise<void>;
|
|
24
28
|
};
|
|
25
29
|
onBeforeStep?: (step: object, index: number) => void | Promise<void>;
|
|
30
|
+
/** Button text, defaults Back, Next, Skip, Done. `done` is the last step's button only with `endDialog` false; while the closing dialog is on, the last step reads `next`, because the dialog follows. */
|
|
26
31
|
labels?: {
|
|
27
32
|
back?: string;
|
|
28
33
|
next?: string;
|
|
@@ -36,7 +41,12 @@ declare const AppTour: import("react").ForwardRefExoticComponent<{
|
|
|
36
41
|
endMessage?: string;
|
|
37
42
|
endButton?: string;
|
|
38
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Show the closing dialog after the last step.
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
39
48
|
endDialog?: boolean;
|
|
49
|
+
/** Extra class names on the tour element. */
|
|
40
50
|
className?: string;
|
|
41
51
|
} & import("react").RefAttributes<any>>;
|
|
42
52
|
export default AppTour;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/tree";
|
|
2
2
|
declare const AppTreeView: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
/** The hierarchy to show. Ids are strings, unique across the whole tree. `children: []` is a leaf; `hasChildren: true` with no `children` is a node whose children are fetched the first time it opens. */
|
|
3
4
|
nodes: {
|
|
4
5
|
id: string;
|
|
5
6
|
label: string;
|
|
@@ -12,22 +13,44 @@ declare const AppTreeView: import("react").ForwardRefExoticComponent<{
|
|
|
12
13
|
checked?: boolean;
|
|
13
14
|
disabled?: boolean;
|
|
14
15
|
}[];
|
|
16
|
+
/**
|
|
17
|
+
* How rows are chosen: none, single (one selected row) or multiple (a tri-state checkbox per node).
|
|
18
|
+
* @default "none"
|
|
19
|
+
*/
|
|
15
20
|
selection?: 'none' | 'single' | 'multiple';
|
|
21
|
+
/** Selected id (single mode, controlled). The tree shows this id whatever the user clicks until you change it; null selects nothing, and dropping the prop clears it. */
|
|
16
22
|
selected?: string | null;
|
|
17
23
|
onSelect?: (id: string, node: object) => void;
|
|
24
|
+
/** Checked ids (multiple mode, controlled). */
|
|
18
25
|
checked?: string[];
|
|
19
26
|
onCheck?: (ids: string[], detail: {
|
|
20
27
|
id: string;
|
|
21
28
|
checked: boolean;
|
|
22
29
|
}) => void;
|
|
23
30
|
loadChildren?: (node: object) => Promise<object[]>;
|
|
31
|
+
/** Children endpoint used when loadChildren is not set: a GET with parentId=<id> added, answering a JSON array of nodes. */
|
|
24
32
|
loadUrl?: string;
|
|
25
33
|
onLoadError?: (id: string, message: string) => void;
|
|
34
|
+
/** Form field name: multiple posts one value per checked id, single posts the selected id. */
|
|
26
35
|
name?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Announced while children load.
|
|
38
|
+
* @default "Loading"
|
|
39
|
+
*/
|
|
27
40
|
loadingText?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Announced when they fail.
|
|
43
|
+
* @default "Could not load. Try again."
|
|
44
|
+
*/
|
|
28
45
|
errorText?: string;
|
|
46
|
+
/** Accessible name of the tree. */
|
|
29
47
|
ariaLabel?: string;
|
|
48
|
+
/** The id of the tree element. */
|
|
30
49
|
id?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Extra class names on the tree.
|
|
52
|
+
* @default ""
|
|
53
|
+
*/
|
|
31
54
|
className?: string;
|
|
32
55
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
33
56
|
export default AppTreeView;
|
|
@@ -7,15 +7,24 @@ import "@webority/ui-elements/elements/truncate";
|
|
|
7
7
|
*
|
|
8
8
|
* @param {object} props
|
|
9
9
|
* @param {import('react').ReactNode} props.children The text.
|
|
10
|
-
* @param {number} [props.lines
|
|
11
|
-
* @param {string} [props.width]
|
|
10
|
+
* @param {number} [props.lines]
|
|
11
|
+
* @param {string} [props.width]
|
|
12
12
|
* @param {import('react').CSSProperties} [props.style]
|
|
13
13
|
* @param {string} [props.className]
|
|
14
14
|
*/
|
|
15
15
|
export default function AppTruncate(props: {
|
|
16
16
|
children: import('react').ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* How many lines show before the cut. 1 is a single line cut by width.
|
|
19
|
+
* @default 1
|
|
20
|
+
*/
|
|
17
21
|
lines?: number;
|
|
22
|
+
/** A CSS length the text never exceeds, such as 12rem or 240px. Without it the text takes the width it is given. */
|
|
18
23
|
width?: string;
|
|
19
24
|
style?: import('react').CSSProperties;
|
|
25
|
+
/**
|
|
26
|
+
* Extra classes on the element.
|
|
27
|
+
* @default ""
|
|
28
|
+
*/
|
|
20
29
|
className?: string;
|
|
21
30
|
}): import("react").JSX.Element;
|
|
@@ -8,13 +8,21 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @param {object} props
|
|
10
10
|
* @param {() => void} [props.onReload] What "Reload" does. Default: reload the page.
|
|
11
|
-
* @param {boolean} [props.dismissible
|
|
11
|
+
* @param {boolean} [props.dismissible]
|
|
12
12
|
* @param {() => void} [props.onDismiss] Called after the bar is closed.
|
|
13
|
-
* @param {string} [props.className]
|
|
13
|
+
* @param {string} [props.className]
|
|
14
14
|
*/
|
|
15
15
|
export default function AppUpdateBar(props: {
|
|
16
16
|
onReload?: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Shows a close button. The bar then stays closed until it remounts.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
17
21
|
dismissible?: boolean;
|
|
18
22
|
onDismiss?: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Extra classes on the bar, such as sticky-top to keep it in view.
|
|
25
|
+
* @default ""
|
|
26
|
+
*/
|
|
19
27
|
className?: string;
|
|
20
28
|
}): import("react").JSX.Element;
|
|
@@ -14,17 +14,19 @@ import "@webority/ui-elements/elements/whats-new";
|
|
|
14
14
|
*
|
|
15
15
|
* @param {object} props
|
|
16
16
|
* @param {{ id?: string, date: string, title: string, body?: string, imageSrc?: string,
|
|
17
|
-
* imageAlt?: string, href?: string, linkLabel?: string }[]} [props.entries]
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* @param {string} [props.
|
|
21
|
-
* @param {string} [props.
|
|
22
|
-
* @param {string} [props.unreadLabel="unread"] Added to the trigger's name while there are unread entries.
|
|
23
|
-
* @param {string} [props.emptyText="Nothing new yet"] Shown when there are no entries.
|
|
17
|
+
* imageAlt?: string, href?: string, linkLabel?: string }[]} [props.entries]
|
|
18
|
+
* @param {string} [props.storageKey]
|
|
19
|
+
* @param {string} [props.label]
|
|
20
|
+
* @param {string} [props.unreadLabel]
|
|
21
|
+
* @param {string} [props.emptyText]
|
|
24
22
|
* @param {(through: string) => void} [props.onRead] Called with the newest entry's date when opening marks entries read.
|
|
25
23
|
* @param {string} [props.className]
|
|
26
24
|
*/
|
|
27
25
|
export default function AppWhatsNew(props: {
|
|
26
|
+
/**
|
|
27
|
+
* The release notes, shown in the order passed.
|
|
28
|
+
* @default []
|
|
29
|
+
*/
|
|
28
30
|
entries?: {
|
|
29
31
|
id?: string;
|
|
30
32
|
date: string;
|
|
@@ -35,10 +37,27 @@ export default function AppWhatsNew(props: {
|
|
|
35
37
|
href?: string;
|
|
36
38
|
linkLabel?: string;
|
|
37
39
|
}[];
|
|
40
|
+
/** Names where read state is kept. Include the user's id. */
|
|
38
41
|
storageKey?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The trigger's name and the panel's heading.
|
|
44
|
+
* @default "What's new"
|
|
45
|
+
*/
|
|
39
46
|
label?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Added to the trigger's name while there are unread entries.
|
|
49
|
+
* @default "unread"
|
|
50
|
+
*/
|
|
40
51
|
unreadLabel?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Shown when there are no entries.
|
|
54
|
+
* @default "Nothing new yet"
|
|
55
|
+
*/
|
|
41
56
|
emptyText?: string;
|
|
42
57
|
onRead?: (through: string) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Extra classes on the element.
|
|
60
|
+
* @default ""
|
|
61
|
+
*/
|
|
43
62
|
className?: string;
|
|
44
63
|
}): import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/wizard";
|
|
2
2
|
declare const AppWizard: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
/** One entry per step, in step order. A list that is not an array of objects with a text label is refused with a thrown error, and an unknown field warns in development. */
|
|
3
4
|
steps: {
|
|
4
5
|
key?: string;
|
|
5
6
|
label: string;
|
|
@@ -9,7 +10,12 @@ declare const AppWizard: import("react").ForwardRefExoticComponent<{
|
|
|
9
10
|
status?: 'done' | 'active' | 'pending' | 'error';
|
|
10
11
|
}[];
|
|
11
12
|
children: import('react').ReactNode;
|
|
13
|
+
/** The current step's index when the wizard is controlled, used together with onStepChange. */
|
|
12
14
|
active?: number;
|
|
15
|
+
/**
|
|
16
|
+
* The step the wizard starts on when it is not controlled.
|
|
17
|
+
* @default 0
|
|
18
|
+
*/
|
|
13
19
|
defaultActive?: number;
|
|
14
20
|
onStepChange?: (index: number, detail: {
|
|
15
21
|
previous: number;
|
|
@@ -21,30 +27,103 @@ declare const AppWizard: import("react").ForwardRefExoticComponent<{
|
|
|
21
27
|
onSkip?: (index: number) => void;
|
|
22
28
|
beforeNext?: (index: number) => boolean | Promise<boolean>;
|
|
23
29
|
onInvalid?: (index: number) => void;
|
|
30
|
+
/**
|
|
31
|
+
* The stepper header style: compact circles, the wide journey bar, large connected icon badges with a STEP n eyebrow, or a row of tiles with an icon square, a label and a Done, Current or To do line.
|
|
32
|
+
* @default "steps"
|
|
33
|
+
*/
|
|
24
34
|
variant?: 'steps' | 'journey' | 'icons' | 'tiles';
|
|
35
|
+
/** Recolours the whole stepper accent (active fill, done rail, ring, done tint) to a semantic ramp. Unset keeps the variant's default: primary for steps and journey, success for icons. */
|
|
25
36
|
tone?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
37
|
+
/** Recolours completed steps only (their badge, STEP n eyebrow and the filled line after them). The current step keeps the tone accent; unset, completed steps follow tone. */
|
|
26
38
|
doneTone?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
39
|
+
/**
|
|
40
|
+
* Lays the stepper out as a row or as a column.
|
|
41
|
+
* @default "horizontal"
|
|
42
|
+
*/
|
|
27
43
|
orientation?: 'horizontal' | 'vertical';
|
|
44
|
+
/**
|
|
45
|
+
* Where each step's badge, label and description sit in its column on a horizontal stepper: centred, or at the start with the line running from badge to badge. It applies to the steps and icons variants.
|
|
46
|
+
* @default "center"
|
|
47
|
+
*/
|
|
28
48
|
align?: 'center' | 'start';
|
|
49
|
+
/** The iconsax style of every header glyph: the done tick, the error alert, the skipped dash and each step's own icon. Unset draws the linear style. */
|
|
29
50
|
iconVariant?: 'linear' | 'outline' | 'bold' | 'bulk' | 'broken' | 'twotone';
|
|
51
|
+
/**
|
|
52
|
+
* Scales the stepper header: the badge, its number, the labels and the glyphs.
|
|
53
|
+
* @default "md"
|
|
54
|
+
*/
|
|
30
55
|
size?: 'sm' | 'md' | 'lg';
|
|
56
|
+
/** Every header glyph's width and height in px. Unset, it follows size (14, 16 or 20). */
|
|
31
57
|
iconSize?: number;
|
|
58
|
+
/**
|
|
59
|
+
* Shows a Skip button on every step but the last, without needing optional on each step.
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
32
62
|
skippable?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Allows jumping to any step, not only completed ones.
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
33
67
|
nonLinear?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Hides the progress header.
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
34
72
|
hideStepper?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Drops the line joining the steps, on every variant and orientation. Lines show by default.
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
35
77
|
hideConnectors?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Disables all navigation.
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
36
82
|
disabled?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* The accessible name of the stepper.
|
|
85
|
+
* @default "Progress"
|
|
86
|
+
*/
|
|
37
87
|
label?: string;
|
|
88
|
+
/**
|
|
89
|
+
* The text of the Back button.
|
|
90
|
+
* @default "Back"
|
|
91
|
+
*/
|
|
38
92
|
backLabel?: string;
|
|
93
|
+
/**
|
|
94
|
+
* The text of the Next button.
|
|
95
|
+
* @default "Next"
|
|
96
|
+
*/
|
|
39
97
|
nextLabel?: string;
|
|
98
|
+
/**
|
|
99
|
+
* The text of the Skip button.
|
|
100
|
+
* @default "Skip"
|
|
101
|
+
*/
|
|
40
102
|
skipLabel?: string;
|
|
103
|
+
/**
|
|
104
|
+
* The text of the Finish button on the last step.
|
|
105
|
+
* @default "Finish"
|
|
106
|
+
*/
|
|
41
107
|
finishLabel?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Shows a 56px bar above the stepper with barTitle, Step N of M and a close button.
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
42
112
|
topBar?: boolean;
|
|
113
|
+
/** The title at the start of the top bar. */
|
|
43
114
|
barTitle?: string;
|
|
115
|
+
/**
|
|
116
|
+
* The accessible name of the top bar's close button.
|
|
117
|
+
* @default "Close"
|
|
118
|
+
*/
|
|
44
119
|
closeLabel?: string;
|
|
45
120
|
onClose?: (detail: {
|
|
46
121
|
index: number;
|
|
47
122
|
}) => void;
|
|
123
|
+
/**
|
|
124
|
+
* Extra classes on the wizard.
|
|
125
|
+
* @default ""
|
|
126
|
+
*/
|
|
48
127
|
className?: string;
|
|
49
128
|
} & import("react").RefAttributes<any>>;
|
|
50
129
|
export default AppWizard;
|
|
@@ -15,49 +15,68 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @param {object} props
|
|
17
17
|
* @param {{ id: string, name: string, logoUrl?: string, badge?: string }[]} [props.tenants]
|
|
18
|
-
*
|
|
19
|
-
* @param {string} [props.currentId] Id of the active workspace — drives the trigger and the tick.
|
|
18
|
+
* @param {string} [props.currentId]
|
|
20
19
|
* @param {(tenant: object) => void} [props.onSelect] Fired with the chosen tenant. No navigation.
|
|
21
|
-
* @param {string} [props.menuLabel]
|
|
20
|
+
* @param {string} [props.menuLabel]
|
|
22
21
|
* @param {import('react').ReactNode | { label: string, icon?: string, href?: string }} [props.footerAction]
|
|
23
|
-
* A pinned row under the list — a node rendered as-is, or a descriptor the library renders
|
|
24
|
-
* as a menu row (through `linkComponent` when it carries an `href`).
|
|
25
22
|
* @param {import('react').ElementType} [props.linkComponent] Component for `href` rows (e.g. Link).
|
|
26
|
-
* @param {boolean} [props.searchable
|
|
27
|
-
* place past roughly eight workspaces.
|
|
23
|
+
* @param {boolean} [props.searchable]
|
|
28
24
|
* @param {() => void} [props.onCreate] Fired by the create row.
|
|
29
|
-
* @param {boolean} [props.canCreate
|
|
30
|
-
*
|
|
31
|
-
* @param {
|
|
32
|
-
* @param {
|
|
33
|
-
*
|
|
34
|
-
* @param {"sm"|"md"|"lg"} [props.size="md"] Size tier — scales the trigger (the card / compact
|
|
35
|
-
* square, its mark and name) AND the dropdown menu (width, row padding, avatars, the create
|
|
36
|
-
* "+" chip and the footer), so trigger and panel read at one size.
|
|
37
|
-
* @param {string} [props.ariaLabel] Accessible name for the trigger. Defaults to
|
|
38
|
-
* "Workspace <name>".
|
|
25
|
+
* @param {boolean} [props.canCreate]
|
|
26
|
+
* @param {string} [props.createLabel]
|
|
27
|
+
* @param {boolean} [props.compact]
|
|
28
|
+
* @param {"sm"|"md"|"lg"} [props.size]
|
|
29
|
+
* @param {string} [props.ariaLabel]
|
|
39
30
|
*/
|
|
40
31
|
export default function AppWorkspaceSwitcher(props: {
|
|
32
|
+
/**
|
|
33
|
+
* The switchable workspaces.
|
|
34
|
+
* @default []
|
|
35
|
+
*/
|
|
41
36
|
tenants?: {
|
|
42
37
|
id: string;
|
|
43
38
|
name: string;
|
|
44
39
|
logoUrl?: string;
|
|
45
40
|
badge?: string;
|
|
46
41
|
}[];
|
|
42
|
+
/** The id of the active workspace. It drives the trigger and the tick, and falls back to the first workspace when it matches none. */
|
|
47
43
|
currentId?: string;
|
|
48
44
|
onSelect?: (tenant: object) => void;
|
|
45
|
+
/** An optional heading above the list, such as Workspaces. */
|
|
49
46
|
menuLabel?: string;
|
|
47
|
+
/** A pinned row under the list. Pass any node, or a descriptor with a label, an optional icon and an optional href that the library renders as a menu row. */
|
|
50
48
|
footerAction?: import('react').ReactNode | {
|
|
51
49
|
label: string;
|
|
52
50
|
icon?: string;
|
|
53
51
|
href?: string;
|
|
54
52
|
};
|
|
55
53
|
linkComponent?: import('react').ElementType;
|
|
54
|
+
/**
|
|
55
|
+
* Adds a filter box above the list. It only earns its place past roughly eight workspaces.
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
56
58
|
searchable?: boolean;
|
|
57
59
|
onCreate?: () => void;
|
|
60
|
+
/**
|
|
61
|
+
* Shows the create row. It is off by default because most members cannot create a workspace.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
58
64
|
canCreate?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The text of the create row.
|
|
67
|
+
* @default "Create workspace"
|
|
68
|
+
*/
|
|
59
69
|
createLabel?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Draws a 36px monogram button instead of the full card, the shape a collapsed rail slot wants. The menu is the same either way.
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
60
74
|
compact?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Scales the trigger (the card or compact square, its mark and name) and the menu (width, row padding, avatars, the create plus chip and the footer), so trigger and panel read at one size.
|
|
77
|
+
* @default "md"
|
|
78
|
+
*/
|
|
61
79
|
size?: "sm" | "md" | "lg";
|
|
80
|
+
/** The accessible name of the trigger. Without it the name is Workspace followed by the current workspace's name. */
|
|
62
81
|
ariaLabel?: string;
|
|
63
82
|
}): import("react").JSX.Element;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
export declare const WUI_MARKER_ATTRIBUTE = "data-wui";
|
|
3
3
|
/** The attribute props mode adds: the plain props the component was given, as JSON. Written only when props mode is on. */
|
|
4
4
|
export declare const WUI_MARKER_PROPS_ATTRIBUTE = "data-wui-props";
|
|
5
|
+
/** The attribute that links an element to its Canvas board node where a part is ambiguous; the marker element carries the key the component was given, in every build. */
|
|
6
|
+
export declare const WUI_CANVAS_KEY_ATTRIBUTE = "data-canvas";
|
|
5
7
|
/** The global the importer sets through an init script before the page loads. */
|
|
6
8
|
export declare const WUI_MARKERS_GLOBAL = "__WUI_MARKERS__";
|
|
7
9
|
/** The value of WUI_MARKERS_GLOBAL that turns props mode on. */
|
|
@@ -15,6 +17,8 @@ export declare function wuiMarkerPropsOn(): boolean;
|
|
|
15
17
|
* The attributes an App* root spreads onto its host element, placed before the component's rest
|
|
16
18
|
* spread so a wrapper passing its own marker wins.
|
|
17
19
|
*
|
|
20
|
+
* A data-canvas key the component was given rides on the marker element in every build.
|
|
21
|
+
*
|
|
18
22
|
* In props mode the plain values the component was given ride along as JSON. The kit manifest stays
|
|
19
23
|
* the one list of which props are plain: the importer keeps only those, so nothing here repeats it.
|
|
20
24
|
* The props attribute is written even when empty, so a wrapper's marker never carries the inner
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.89.0",
|
|
4
4
|
"description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -23,15 +23,17 @@
|
|
|
23
23
|
"types": "./dist/types/index.d.ts",
|
|
24
24
|
"default": "./dist/ui-react.js"
|
|
25
25
|
},
|
|
26
|
+
"./guidance.json": "./dist/guidance.json",
|
|
27
|
+
"./canvas-kit/*": "./dist/canvas-kit/*",
|
|
26
28
|
"./package.json": "./package.json"
|
|
27
29
|
},
|
|
28
30
|
"sideEffects": false,
|
|
29
31
|
"dependencies": {
|
|
30
|
-
"@webority/
|
|
31
|
-
"@webority/
|
|
32
|
+
"@webority/ui-elements": "0.89.0",
|
|
33
|
+
"@webority/theme": "0.89.0"
|
|
32
34
|
},
|
|
33
35
|
"peerDependencies": {
|
|
34
|
-
"@webority/analytics": "^0.
|
|
36
|
+
"@webority/analytics": "^0.26.0",
|
|
35
37
|
"bootstrap": "5.3.3",
|
|
36
38
|
"react": "^19.0.0",
|
|
37
39
|
"react-bootstrap": "^2.10.0",
|
|
@@ -45,7 +47,7 @@
|
|
|
45
47
|
"@types/react": "^19.2.17",
|
|
46
48
|
"@vitejs/plugin-react": "^6.0.1",
|
|
47
49
|
"@vitest/coverage-v8": "5.0.1",
|
|
48
|
-
"@webority/analytics": "0.
|
|
50
|
+
"@webority/analytics": "0.26.0",
|
|
49
51
|
"bootstrap": "5.3.3",
|
|
50
52
|
"jsdom": "30.1.1",
|
|
51
53
|
"react": "^19.2.6",
|
|
@@ -54,10 +56,11 @@
|
|
|
54
56
|
"typescript": "^7.0.2",
|
|
55
57
|
"vite": "^8.0.12",
|
|
56
58
|
"vitest": "5.0.1",
|
|
57
|
-
"@webority/canvas-kit": "0.
|
|
59
|
+
"@webority/canvas-kit": "0.89.0",
|
|
60
|
+
"@webority/tokens": "0.89.0"
|
|
58
61
|
},
|
|
59
62
|
"scripts": {
|
|
60
|
-
"build": "vite build && tsc -p tsconfig.json && node ../../scripts/sync-rcl-assets.mjs analytics",
|
|
63
|
+
"build": "vite build && tsc -p tsconfig.json && node ../../scripts/inject-meta-docs.mjs && node ../canvas-kit/dist/cli.js build --config canvas-kit.json --out dist/canvas-kit && node ../canvas-kit/dist/cli.js guidance --config canvas-kit.json --out dist/guidance.json && node ../../scripts/sync-rcl-assets.mjs analytics",
|
|
61
64
|
"test": "vitest run",
|
|
62
65
|
"test:watch": "vitest",
|
|
63
66
|
"test:coverage": "vitest run --coverage"
|