@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
|
@@ -2,40 +2,79 @@
|
|
|
2
2
|
* Destructive or confirm step built on AppModal.
|
|
3
3
|
*
|
|
4
4
|
* @param {object} props
|
|
5
|
-
* @param {boolean} props.open
|
|
6
|
-
* @param {string} props.title
|
|
7
|
-
* @param {import('react').ReactNode} [props.message]
|
|
8
|
-
* @param {string} [props.confirmLabel
|
|
9
|
-
* @param {string} [props.cancelLabel
|
|
10
|
-
* @param {boolean} [props.danger
|
|
11
|
-
* @param {"success"|"error"|"warning"|"info"|"delete"|"primary"} [props.tone]
|
|
12
|
-
* @param {string} [props.image]
|
|
13
|
-
* @param {number} [props.iconSize]
|
|
14
|
-
* @param {string} [props.confirmPhrase]
|
|
5
|
+
* @param {boolean} props.open
|
|
6
|
+
* @param {string} props.title
|
|
7
|
+
* @param {import('react').ReactNode} [props.message]
|
|
8
|
+
* @param {string} [props.confirmLabel]
|
|
9
|
+
* @param {string} [props.cancelLabel]
|
|
10
|
+
* @param {boolean} [props.danger]
|
|
11
|
+
* @param {"success"|"error"|"warning"|"info"|"delete"|"primary"} [props.tone]
|
|
12
|
+
* @param {string} [props.image]
|
|
13
|
+
* @param {number} [props.iconSize]
|
|
14
|
+
* @param {string} [props.confirmPhrase]
|
|
15
15
|
* @param {() => void} props.onConfirm Runs when Confirm is pressed.
|
|
16
16
|
* @param {() => void} [props.onClose] Runs when the dialog is dismissed through Cancel, the backdrop or Escape, unless `loading` blocks it.
|
|
17
|
-
* @param {boolean} [props.loading
|
|
18
|
-
* @param {boolean} [props.staticBackdrop
|
|
19
|
-
* @param {'center'|'top'} [props.placement
|
|
20
|
-
* @param {'sm'|'md'|'lg'|'xl'|number} [props.size
|
|
21
|
-
* @param {string} [props.className
|
|
17
|
+
* @param {boolean} [props.loading]
|
|
18
|
+
* @param {boolean} [props.staticBackdrop]
|
|
19
|
+
* @param {'center'|'top'} [props.placement]
|
|
20
|
+
* @param {'sm'|'md'|'lg'|'xl'|number} [props.size]
|
|
21
|
+
* @param {string} [props.className]
|
|
22
22
|
*/
|
|
23
23
|
export default function AppConfirmDialog(props: {
|
|
24
|
+
/** Shows the dialog while true. */
|
|
24
25
|
open: boolean;
|
|
26
|
+
/** The dialog heading. */
|
|
25
27
|
title: string;
|
|
28
|
+
/** The text that explains what the user is confirming. */
|
|
26
29
|
message?: import('react').ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* The confirm button's text.
|
|
32
|
+
* @default "Confirm"
|
|
33
|
+
*/
|
|
27
34
|
confirmLabel?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The cancel button's text.
|
|
37
|
+
* @default "Cancel"
|
|
38
|
+
*/
|
|
28
39
|
cancelLabel?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Styles the confirm button as destructive; with no tone it also picks the delete icon.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
29
44
|
danger?: boolean;
|
|
45
|
+
/** The status icon. Unset, it is delete when danger is set and info otherwise. */
|
|
30
46
|
tone?: "success" | "error" | "warning" | "info" | "delete" | "primary";
|
|
47
|
+
/** URL of a custom illustration that replaces the tone artwork. Any source size is fine: the theme boxes it to the same footprint. It is decorative, so the title and message carry the meaning. */
|
|
31
48
|
image?: string;
|
|
49
|
+
/** Width and height of the illustration in px, for the tone artwork and a custom image alike. Unset, it is 120px with a message and 84px without. */
|
|
32
50
|
iconSize?: number;
|
|
51
|
+
/** Exact text the user must type before Confirm unlocks, such as a workspace name. */
|
|
33
52
|
confirmPhrase?: string;
|
|
34
53
|
onConfirm: () => void;
|
|
35
54
|
onClose?: () => void;
|
|
55
|
+
/**
|
|
56
|
+
* Busy state: shows a spinner and disables Confirm, Cancel and the confirm-phrase field, and blocks dismissal while the async action is in flight.
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
36
59
|
loading?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Passed to AppModal: when true, a backdrop click and Escape no longer close the dialog.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
37
64
|
staticBackdrop?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Vertical placement of the card: centred, or pinned near the top.
|
|
67
|
+
* @default "center"
|
|
68
|
+
*/
|
|
38
69
|
placement?: 'center' | 'top';
|
|
70
|
+
/**
|
|
71
|
+
* Card width: a preset, or an exact max-width in px for a custom size.
|
|
72
|
+
* @default "md"
|
|
73
|
+
*/
|
|
39
74
|
size?: 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
75
|
+
/**
|
|
76
|
+
* Merged with the dialog's own wui-confirm class.
|
|
77
|
+
* @default ""
|
|
78
|
+
*/
|
|
40
79
|
className?: string;
|
|
41
80
|
}): import("react").JSX.Element;
|
|
@@ -23,32 +23,65 @@ import "@webority/ui-elements/elements/consent-banner";
|
|
|
23
23
|
* ```
|
|
24
24
|
*
|
|
25
25
|
* @param {object} props
|
|
26
|
-
* @param {string} [props.heading
|
|
27
|
-
* @param {string} [props.description]
|
|
28
|
-
* @param {string} [props.policyHref]
|
|
29
|
-
* @param {string} [props.policyLabel
|
|
30
|
-
* @param {string} [props.analyticsDescription]
|
|
31
|
-
* @param {string} [props.functionalDescription]
|
|
32
|
-
* @param {string} [props.marketingDescription]
|
|
33
|
-
* @param {Array<"analytics"|"functional"|"marketing">} [props.categories
|
|
34
|
-
* @param {"bottom-left"|"bottom-right"|"bar"} [props.position
|
|
35
|
-
* @param {boolean} [props.standalone
|
|
36
|
-
* @param {boolean} [props.preview
|
|
37
|
-
* @param {string} [props.className]
|
|
26
|
+
* @param {string} [props.heading]
|
|
27
|
+
* @param {string} [props.description]
|
|
28
|
+
* @param {string} [props.policyHref]
|
|
29
|
+
* @param {string} [props.policyLabel]
|
|
30
|
+
* @param {string} [props.analyticsDescription]
|
|
31
|
+
* @param {string} [props.functionalDescription]
|
|
32
|
+
* @param {string} [props.marketingDescription]
|
|
33
|
+
* @param {Array<"analytics"|"functional"|"marketing">} [props.categories]
|
|
34
|
+
* @param {"bottom-left"|"bottom-right"|"bar"} [props.position]
|
|
35
|
+
* @param {boolean} [props.standalone]
|
|
36
|
+
* @param {boolean} [props.preview]
|
|
37
|
+
* @param {string} [props.className]
|
|
38
38
|
* @param {import('react').CSSProperties} [props.style] Inline style; lands on the element with `className`.
|
|
39
39
|
*/
|
|
40
40
|
export default function AppConsentBanner(props: {
|
|
41
|
+
/**
|
|
42
|
+
* Heading, and the dialog's accessible name.
|
|
43
|
+
* @default "Cookies on this site"
|
|
44
|
+
*/
|
|
41
45
|
heading?: string;
|
|
46
|
+
/** The explanation above the buttons. */
|
|
42
47
|
description?: string;
|
|
48
|
+
/** Link to the cookie policy; no link when omitted. */
|
|
43
49
|
policyHref?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The policy link's text.
|
|
52
|
+
* @default "Cookie policy"
|
|
53
|
+
*/
|
|
44
54
|
policyLabel?: string;
|
|
55
|
+
/** What the analytics category covers. */
|
|
45
56
|
analyticsDescription?: string;
|
|
57
|
+
/** What the functional category covers. */
|
|
46
58
|
functionalDescription?: string;
|
|
59
|
+
/** What the marketing category covers. */
|
|
47
60
|
marketingDescription?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The optional categories to show; essential always shows. A category left out has no row, saves as off and is never granted by Accept all.
|
|
63
|
+
* @default ["analytics","functional","marketing"]
|
|
64
|
+
*/
|
|
48
65
|
categories?: Array<"analytics" | "functional" | "marketing">;
|
|
66
|
+
/**
|
|
67
|
+
* The corner it pins to, or the full-width bar. bar is a slim full-width bar along the bottom at every width.
|
|
68
|
+
* @default "bottom-left"
|
|
69
|
+
*/
|
|
49
70
|
position?: "bottom-left" | "bottom-right" | "bar";
|
|
71
|
+
/**
|
|
72
|
+
* Render sealed in a shadow root with bundled styles, for a page that does not load `@webority/theme`.
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
50
75
|
standalone?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Draw the banner open without reading or saving consent, for a design surface that never ran initConsent. Nothing is stored.
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
51
80
|
preview?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Extra classes on the element.
|
|
83
|
+
* @default ""
|
|
84
|
+
*/
|
|
52
85
|
className?: string;
|
|
53
86
|
style?: import('react').CSSProperties;
|
|
54
87
|
}): import("react").JSX.Element;
|
|
@@ -16,21 +16,21 @@ import "@webority/ui-elements/elements/context-menu";
|
|
|
16
16
|
* the parity check reads the first signature it finds as the component's public props.
|
|
17
17
|
*
|
|
18
18
|
* @param {object} props
|
|
19
|
-
* @param {{ key: string, label?: string, icon?: string|import('react').ReactNode, image?: string, to?: string, onClick?: () => void, danger?: boolean, disabled?: boolean, divider?:
|
|
20
|
-
*
|
|
21
|
-
* `disabled` item is listed but skipped by the arrow keys and cannot be chosen. An item with
|
|
22
|
-
* `divider: true` renders a separator and needs only a unique `key`.
|
|
23
|
-
* @param {string} [props.target] CSS selector of the elements the menu serves. Without it, the
|
|
24
|
-
* menu serves `children`.
|
|
19
|
+
* @param {{ key: string, label?: string, icon?: string|import('react').ReactNode, image?: string, to?: string, onClick?: () => void, danger?: boolean, disabled?: boolean, divider?: boolean }[]} [props.items]
|
|
20
|
+
* @param {string} [props.target]
|
|
25
21
|
* @param {import('react').ReactNode} [props.children] The region to attach to, when `target` is not used.
|
|
26
|
-
* @param {string} [props.ariaLabel
|
|
27
|
-
* @param {boolean} [props.disabled
|
|
22
|
+
* @param {string} [props.ariaLabel]
|
|
23
|
+
* @param {boolean} [props.disabled]
|
|
28
24
|
* @param {(detail: { region: Element, origin: Element, x: number, y: number }) => void} [props.onOpen]
|
|
29
25
|
* Called as the menu opens. `region` is the matched target, `origin` the element the user acted on inside it.
|
|
30
|
-
* @param {string} [props.menuClassName]
|
|
26
|
+
* @param {string} [props.menuClassName]
|
|
31
27
|
* @param {import('react').ElementType} [props.linkComponent] Component for `to` items (e.g. Link).
|
|
32
28
|
*/
|
|
33
29
|
export default function AppContextMenu(props: {
|
|
30
|
+
/**
|
|
31
|
+
* The AppDropdown item model: one entry per row, or a separator when divider is true.
|
|
32
|
+
* @default []
|
|
33
|
+
*/
|
|
34
34
|
items?: {
|
|
35
35
|
key: string;
|
|
36
36
|
label?: string;
|
|
@@ -40,11 +40,20 @@ export default function AppContextMenu(props: {
|
|
|
40
40
|
onClick?: () => void;
|
|
41
41
|
danger?: boolean;
|
|
42
42
|
disabled?: boolean;
|
|
43
|
-
divider?:
|
|
43
|
+
divider?: boolean;
|
|
44
44
|
}[];
|
|
45
|
+
/** CSS selector of the elements the menu serves. Without it, the menu serves `children`. */
|
|
45
46
|
target?: string;
|
|
46
47
|
children?: import('react').ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Accessible name of the menu.
|
|
50
|
+
* @default "Context menu"
|
|
51
|
+
*/
|
|
47
52
|
ariaLabel?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Turns the menu off; the browser's own menu shows instead.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
48
57
|
disabled?: boolean;
|
|
49
58
|
onOpen?: (detail: {
|
|
50
59
|
region: Element;
|
|
@@ -52,6 +61,10 @@ export default function AppContextMenu(props: {
|
|
|
52
61
|
x: number;
|
|
53
62
|
y: number;
|
|
54
63
|
}) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Extra classes on the menu panel.
|
|
66
|
+
* @default ""
|
|
67
|
+
*/
|
|
55
68
|
menuClassName?: string;
|
|
56
69
|
linkComponent?: import('react').ElementType;
|
|
57
70
|
}): import("react").JSX.Element;
|
|
@@ -6,26 +6,56 @@
|
|
|
6
6
|
* Supports both button form (label + icon) and icon-only form (actionable icon).
|
|
7
7
|
*
|
|
8
8
|
* @param {object} props
|
|
9
|
-
* @param {string} props.text
|
|
10
|
-
* @param {string} [props.label
|
|
11
|
-
* @param {string} [props.copiedLabel
|
|
12
|
-
* @param {boolean} [props.iconOnly]
|
|
13
|
-
* @param {"sm"|"md"|"lg"} [props.size
|
|
14
|
-
* @param {"ghost"|"outline"|"secondary"|"light"} [props.variant
|
|
9
|
+
* @param {string} props.text
|
|
10
|
+
* @param {string} [props.label]
|
|
11
|
+
* @param {string} [props.copiedLabel]
|
|
12
|
+
* @param {boolean} [props.iconOnly]
|
|
13
|
+
* @param {"sm"|"md"|"lg"} [props.size]
|
|
14
|
+
* @param {"ghost"|"outline"|"secondary"|"light"} [props.variant]
|
|
15
15
|
* @param {() => void} [props.onCopied] Callback fired on successful copy
|
|
16
|
-
* @param {string} [props.className]
|
|
17
|
-
* @param {string} [props.tooltip]
|
|
18
|
-
* @param {"auto"|"top"|"bottom"|"start"|"end"} [props.tooltipPlacement
|
|
16
|
+
* @param {string} [props.className]
|
|
17
|
+
* @param {string} [props.tooltip]
|
|
18
|
+
* @param {"auto"|"top"|"bottom"|"start"|"end"} [props.tooltipPlacement]
|
|
19
19
|
*/
|
|
20
20
|
export default function AppCopyButton(props: {
|
|
21
|
+
/** The text to copy. */
|
|
21
22
|
text: string;
|
|
23
|
+
/**
|
|
24
|
+
* Button label.
|
|
25
|
+
* @default "Copy"
|
|
26
|
+
*/
|
|
22
27
|
label?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Label shown after a successful copy.
|
|
30
|
+
* @default "Copied"
|
|
31
|
+
*/
|
|
23
32
|
copiedLabel?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Render as an icon-only button (like AppActionIcon); label becomes aria-label.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
24
37
|
iconOnly?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Button size.
|
|
40
|
+
* @default "md"
|
|
41
|
+
*/
|
|
25
42
|
size?: "sm" | "md" | "lg";
|
|
43
|
+
/**
|
|
44
|
+
* Button variant.
|
|
45
|
+
* @default "ghost"
|
|
46
|
+
*/
|
|
26
47
|
variant?: "ghost" | "outline" | "secondary" | "light";
|
|
27
48
|
onCopied?: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Custom className.
|
|
51
|
+
* @default ""
|
|
52
|
+
*/
|
|
28
53
|
className?: string;
|
|
54
|
+
/** A collision-aware hover and focus tooltip (via AppTooltip) that flips to stay on screen. */
|
|
29
55
|
tooltip?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Preferred tooltip side; `auto` picks the side with the most room.
|
|
58
|
+
* @default "auto"
|
|
59
|
+
*/
|
|
30
60
|
tooltipPlacement?: "auto" | "top" | "bottom" | "start" | "end";
|
|
31
61
|
}): any;
|
|
@@ -1,24 +1,73 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/country-select";
|
|
2
2
|
declare const AppCountrySelect: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
/** Selected ISO 3166-1 alpha-2 code, e.g. "IN". */
|
|
3
4
|
value?: string;
|
|
4
5
|
onChange?: (value: string) => void;
|
|
6
|
+
/** Limit the list to these ISO codes (alphabetical by name). Omitted, every country is listed. */
|
|
5
7
|
countries?: string[];
|
|
8
|
+
/**
|
|
9
|
+
* Show the search box in the menu.
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
6
12
|
searchable?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Control size, same as AppInput.
|
|
15
|
+
* @default "md"
|
|
16
|
+
*/
|
|
7
17
|
size?: 'sm' | 'md' | 'lg';
|
|
18
|
+
/**
|
|
19
|
+
* Class to apply to the control element.
|
|
20
|
+
* @default ""
|
|
21
|
+
*/
|
|
8
22
|
className?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Class to apply to the wrapper field div.
|
|
25
|
+
* @default ""
|
|
26
|
+
*/
|
|
9
27
|
fieldClassName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Text shown in the empty field.
|
|
30
|
+
* @default "Select country"
|
|
31
|
+
*/
|
|
10
32
|
placeholder?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Text shown in the search box of the menu.
|
|
35
|
+
* @default "Search countries..."
|
|
36
|
+
*/
|
|
11
37
|
searchPlaceholder?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Show a control that clears the chosen country.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
12
42
|
clearable?: boolean;
|
|
13
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Where the label rests. Off keeps it above the control. Border sits the label inside as a placeholder, then slides it onto the top border on focus or once a country is chosen. Needs `label`.
|
|
45
|
+
* @default "off"
|
|
46
|
+
*/
|
|
47
|
+
floatingLabel?: "off" | "border";
|
|
48
|
+
/** Disables the control. */
|
|
14
49
|
disabled?: boolean;
|
|
50
|
+
/** The visible field label. */
|
|
15
51
|
label?: import('react').ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Marks the field required.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
16
56
|
required?: boolean;
|
|
57
|
+
/** Error message shown under the field; marks the control invalid. */
|
|
17
58
|
error?: string;
|
|
59
|
+
/** Help text shown under the field when there is no error. */
|
|
18
60
|
hint?: string;
|
|
61
|
+
/** Help content shown in an info tip beside the label. */
|
|
19
62
|
help?: import('react').ReactNode;
|
|
63
|
+
/**
|
|
64
|
+
* Accessible name for that info tip.
|
|
65
|
+
* @default "More information"
|
|
66
|
+
*/
|
|
20
67
|
helpLabel?: string;
|
|
68
|
+
/** DOM id for the control and the label's `for` target. */
|
|
21
69
|
id?: string;
|
|
70
|
+
/** Form field name. */
|
|
22
71
|
name?: string;
|
|
23
72
|
} & import("react").RefAttributes<any>>;
|
|
24
73
|
export default AppCountrySelect;
|
|
@@ -3,12 +3,20 @@
|
|
|
3
3
|
* width under 576px. A card or tile inside fills the cell's height.
|
|
4
4
|
*
|
|
5
5
|
* @param {object} props
|
|
6
|
-
* @param {3|4|6|12} [props.span
|
|
6
|
+
* @param {3|4|6|12} [props.span]
|
|
7
7
|
* @param {import('react').ReactNode} props.children The card or tile.
|
|
8
|
-
* @param {string} [props.className]
|
|
8
|
+
* @param {string} [props.className]
|
|
9
9
|
*/
|
|
10
10
|
export default function AppDashboardCell(props: {
|
|
11
|
+
/**
|
|
12
|
+
* How many of the twelve columns the cell spans.
|
|
13
|
+
* @default 12
|
|
14
|
+
*/
|
|
11
15
|
span?: 3 | 4 | 6 | 12;
|
|
12
16
|
children: import('react').ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Extra classes on the cell.
|
|
19
|
+
* @default ""
|
|
20
|
+
*/
|
|
13
21
|
className?: string;
|
|
14
22
|
}): import("react").JSX.Element;
|
|
@@ -14,9 +14,13 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @param {object} props
|
|
16
16
|
* @param {import('react').ReactNode} props.children `AppDashboardCell`s.
|
|
17
|
-
* @param {string} [props.className]
|
|
17
|
+
* @param {string} [props.className]
|
|
18
18
|
*/
|
|
19
19
|
export default function AppDashboardGrid(props: {
|
|
20
20
|
children: import('react').ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Extra classes on the grid.
|
|
23
|
+
* @default ""
|
|
24
|
+
*/
|
|
21
25
|
className?: string;
|
|
22
26
|
}): import("react").JSX.Element;
|
|
@@ -11,41 +11,27 @@
|
|
|
11
11
|
* @param {(row: object, index: number) => string|number} [props.rowKey]
|
|
12
12
|
* @param {{ key: string, dir: "asc"|"desc" }} [props.sort]
|
|
13
13
|
* @param {(key: string) => void} [props.onSort]
|
|
14
|
-
* @param {boolean} [props.loading
|
|
15
|
-
* @param {number} [props.skeletonRows
|
|
16
|
-
* @param {import('react').ReactNode} [props.empty]
|
|
17
|
-
* @param {import('react').ReactNode} [props.emptyFiltered]
|
|
18
|
-
* @param {number} [props.sourceCount]
|
|
19
|
-
* unset means the table was filtered.
|
|
14
|
+
* @param {boolean} [props.loading]
|
|
15
|
+
* @param {number} [props.skeletonRows]
|
|
16
|
+
* @param {import('react').ReactNode} [props.empty]
|
|
17
|
+
* @param {import('react').ReactNode} [props.emptyFiltered]
|
|
18
|
+
* @param {number} [props.sourceCount]
|
|
20
19
|
* @param {(row: object) => import('react').ReactNode} [props.rowActions]
|
|
21
20
|
* @param {string} [props.rowActionsLabel]
|
|
22
|
-
* @param {object} [props.pagination]
|
|
23
|
-
* `{ page, totalPages, pageSize, total, setPage, setPageSize }`, plus the optional `pageSizes`
|
|
24
|
-
* and `mode` that AppTablePagination takes. The footer shows once `total` is above the smallest of
|
|
25
|
-
* `pageSizes` (or `pageSize` when there are none) and stays
|
|
26
|
-
* in place while `loading`, so the table does not jump between pages.
|
|
21
|
+
* @param {object} [props.pagination]
|
|
27
22
|
* @param {string} [props.ariaLabel]
|
|
28
|
-
* @param {string} [props.className]
|
|
29
|
-
* @param {string} [props.wrapperClassName]
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* @param {
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* @param {
|
|
36
|
-
* @param {
|
|
37
|
-
* @param {boolean} [props.
|
|
38
|
-
* @param {boolean} [props.
|
|
39
|
-
* @param {
|
|
40
|
-
* the header pinned. Without it there is no scroll box for the header to stick to.
|
|
41
|
-
* @param {string[]} [props.hiddenColumns] Keys of `hideable` columns to leave out (from useTableView).
|
|
42
|
-
* A column that is not hideable always shows.
|
|
43
|
-
* @param {boolean} [props.stackOnMobile=false] Below 768px, shows each row as a card: the first
|
|
44
|
-
* column on top, then "label: value" lines from the column labels, actions at the bottom.
|
|
45
|
-
* @param {boolean} [props.stickyFirstColumn=false] Pins the first column (and the select/expand
|
|
46
|
-
* column before it) while a wide table scrolls sideways.
|
|
47
|
-
* @param {boolean} [props.stickyActions=false] Pins the last column, where `rowActions` render, to the
|
|
48
|
-
* end edge while a wide table scrolls sideways, so a row's actions stay in view in a narrow box.
|
|
23
|
+
* @param {string} [props.className]
|
|
24
|
+
* @param {string} [props.wrapperClassName]
|
|
25
|
+
* @param {'comfortable'|'cozy'|'compact'} [props.density]
|
|
26
|
+
* @param {'auto'|'fixed'} [props.tableLayout]
|
|
27
|
+
* @param {boolean} [props.striped]
|
|
28
|
+
* @param {boolean} [props.flush]
|
|
29
|
+
* @param {boolean} [props.rowDrag]
|
|
30
|
+
* @param {string|number} [props.maxHeight]
|
|
31
|
+
* @param {string[]} [props.hiddenColumns]
|
|
32
|
+
* @param {boolean} [props.stackOnMobile]
|
|
33
|
+
* @param {boolean} [props.stickyFirstColumn]
|
|
34
|
+
* @param {boolean} [props.stickyActions]
|
|
49
35
|
* @param {(row: object) => string} [props.rowHref] Makes the whole row open this URL on click or Enter
|
|
50
36
|
* (Ctrl/Cmd or middle click opens a new tab). Checkboxes, buttons, links and menus in the row keep
|
|
51
37
|
* their own behaviour. Razor: `data-href` on the <tr>.
|
|
@@ -53,12 +39,9 @@
|
|
|
53
39
|
* on it, for in-page actions (open a drawer). Same nested-control rule as rowHref.
|
|
54
40
|
* @param {(row: object) => 'success'|'warning'|'danger'|'info'|undefined} [props.rowStatus] A coloured
|
|
55
41
|
* bar on the row's leading edge, e.g. danger for an overdue invoice. Undefined draws none.
|
|
56
|
-
* @param {string|number} [props.activeRowKey]
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* Razor: `active-row-key` against each row's `data-row-key`.
|
|
60
|
-
* @param {boolean} [props.selectable=false] Render a leading checkbox column. Fires a bubbling `selectionchange` ({ selected, total, keys }) when the ticked count changes, as Razor does.
|
|
61
|
-
* @param {Set<string|number>} [props.selectedIds] Currently selected row keys.
|
|
42
|
+
* @param {string|number} [props.activeRowKey]
|
|
43
|
+
* @param {boolean} [props.selectable]
|
|
44
|
+
* @param {Set<string|number>} [props.selectedIds]
|
|
62
45
|
* @param {(row: object, index: number) => boolean} [props.isRowSelectable] A row it returns false for shows a disabled
|
|
63
46
|
* box and is skipped by select all, the selected count and bulk actions. With it, select all calls `onToggleRow`
|
|
64
47
|
* for each selectable row whose state changes, not `onToggleAll`. Unset, every row is selectable.
|
|
@@ -70,20 +53,12 @@
|
|
|
70
53
|
* to call several times in a row (a functional state update). Razor: built in.
|
|
71
54
|
* @param {(row: object) => import('react').ReactNode} [props.renderExpanded] When given, each row
|
|
72
55
|
* gets a leading expand toggle; the returned content renders in a full-width row beneath it.
|
|
73
|
-
* @param {boolean} [props.resizableColumns
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* Razor: `resizable-columns`.
|
|
77
|
-
* @param {string} [props.viewKey] Remembers resized widths in this browser under this name (the same name
|
|
78
|
-
* `useTableView` takes). Razor: `view-key`, with `data-key` on each header cell.
|
|
79
|
-
* @param {string} [props.groupBy] A column key: rows gather under a header row per value of it, in the
|
|
80
|
-
* order each value first appears (sort within groups by sorting `rows`), each header collapsing its
|
|
81
|
-
* rows and showing their count. Razor: `group-by`, against the header cells' `data-key`.
|
|
56
|
+
* @param {boolean} [props.resizableColumns]
|
|
57
|
+
* @param {string} [props.viewKey]
|
|
58
|
+
* @param {string} [props.groupBy]
|
|
82
59
|
* @param {(value: unknown, rows: object[]) => import('react').ReactNode} [props.groupLabel] A group
|
|
83
60
|
* header's label; without it the value shows as a cell would.
|
|
84
|
-
* @param {boolean} [props.virtual
|
|
85
|
-
* client-side list. Needs `maxHeight`; rows are taken to share one height, so it is not for
|
|
86
|
-
* `renderExpanded` or `stackOnMobile`. Razor: `virtual`.
|
|
61
|
+
* @param {boolean} [props.virtual]
|
|
87
62
|
* @param {(row: object) => boolean} [props.rowSaving] True while the row's add or change is on its way to
|
|
88
63
|
* the server: the row shows at once, tinted and marked busy, instead of waiting for the answer. Put an
|
|
89
64
|
* added row in `rows` straight away with this true (give it its final key if you can, so the outcome is
|
|
@@ -98,50 +73,128 @@
|
|
|
98
73
|
* on a `virtual` table.
|
|
99
74
|
*/
|
|
100
75
|
export default function AppDataTable(props: {
|
|
76
|
+
/** The columns, each an object with a key and a label, plus optional settings such as sortable, hideable, pin, align and grow. */
|
|
101
77
|
columns: object[];
|
|
78
|
+
/** The row objects shown in the table, one per row, read through each column's key. */
|
|
102
79
|
rows: object[];
|
|
103
80
|
rowKey?: (row: object, index: number) => string | number;
|
|
81
|
+
/** The column the rows are sorted by and the direction, as the caller holds them. */
|
|
104
82
|
sort?: {
|
|
105
83
|
key: string;
|
|
106
84
|
dir: "asc" | "desc";
|
|
107
85
|
};
|
|
108
86
|
onSort?: (key: string) => void;
|
|
87
|
+
/**
|
|
88
|
+
* Shows skeleton rows in place of the rows.
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
109
91
|
loading?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* How many skeleton rows to draw while loading.
|
|
94
|
+
* @default 5
|
|
95
|
+
*/
|
|
110
96
|
skeletonRows?: number;
|
|
97
|
+
/**
|
|
98
|
+
* Shown when there are no rows and the source is empty (sourceCount 0), or no emptyFiltered is given.
|
|
99
|
+
* @default "No records found."
|
|
100
|
+
*/
|
|
111
101
|
empty?: import('react').ReactNode;
|
|
102
|
+
/** Shown when there are no rows and sourceCount is unset or above 0. */
|
|
112
103
|
emptyFiltered?: import('react').ReactNode;
|
|
104
|
+
/** The number of rows before filtering. 0 means the source is empty and empty shows; unset means the table was filtered. */
|
|
113
105
|
sourceCount?: number;
|
|
114
106
|
rowActions?: (row: object) => import('react').ReactNode;
|
|
107
|
+
/** The heading text of the trailing actions column. */
|
|
115
108
|
rowActionsLabel?: string;
|
|
109
|
+
/** The footer's state, usually straight from usePagination. The footer shows once total is above the smallest page size and stays in place while loading. */
|
|
116
110
|
pagination?: object;
|
|
111
|
+
/** Accessible name for the table. */
|
|
117
112
|
ariaLabel?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Extra classes on the table element.
|
|
115
|
+
* @default ""
|
|
116
|
+
*/
|
|
118
117
|
className?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Extra classes on the outer table-wrap div, the padding hook. Manage the table's inset from here, for example a class that sets --wui-table-pad.
|
|
120
|
+
* @default ""
|
|
121
|
+
*/
|
|
119
122
|
wrapperClassName?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Row height: 54, 48 or 40 px. Compact is one line per row and hides the identity subline.
|
|
125
|
+
* @default "comfortable"
|
|
126
|
+
*/
|
|
120
127
|
density?: 'comfortable' | 'cozy' | 'compact';
|
|
128
|
+
/**
|
|
129
|
+
* fixed holds every column to its width or minWidth and clips overflowing text; auto sizes columns to their content.
|
|
130
|
+
* @default "auto"
|
|
131
|
+
*/
|
|
121
132
|
tableLayout?: 'auto' | 'fixed';
|
|
133
|
+
/**
|
|
134
|
+
* Alternate-row shading in place of divider lines.
|
|
135
|
+
* @default false
|
|
136
|
+
*/
|
|
122
137
|
striped?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* No wrapper padding above the column header row.
|
|
140
|
+
* @default false
|
|
141
|
+
*/
|
|
123
142
|
flush?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Rows drag onto page elements marked data-wui-drop-target; a ticked row drags the whole selection. Fires wui:row-drop with keys and target on the wrapper.
|
|
145
|
+
* @default false
|
|
146
|
+
*/
|
|
124
147
|
rowDrag?: boolean;
|
|
148
|
+
/** Caps the table's height; the body scrolls inside it with the header pinned. Without it there is no scroll box for the header to stick to. */
|
|
125
149
|
maxHeight?: string | number;
|
|
150
|
+
/** Keys of hideable columns to leave out, from useTableView. A column that is not hideable always shows. */
|
|
126
151
|
hiddenColumns?: string[];
|
|
152
|
+
/**
|
|
153
|
+
* Below 768px, shows each row as a card: the first column on top, then label and value lines from the column labels, actions at the bottom.
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
127
156
|
stackOnMobile?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Pins the first column, and the select or expand column before it, while a wide table scrolls sideways.
|
|
159
|
+
* @default false
|
|
160
|
+
*/
|
|
128
161
|
stickyFirstColumn?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Pins the last column, where rowActions render, to the end edge while a wide table scrolls sideways, so a row's actions stay in view in a narrow box.
|
|
164
|
+
* @default false
|
|
165
|
+
*/
|
|
129
166
|
stickyActions?: boolean;
|
|
130
167
|
rowHref?: (row: object) => string;
|
|
131
168
|
onRowClick?: (row: object) => void;
|
|
132
169
|
rowStatus?: (row: object) => 'success' | 'warning' | 'danger' | 'info' | undefined;
|
|
170
|
+
/** The key, as rowKey returns it, of the row whose record is open, for example in a detail pane beside the table. That row gets aria-current and a subtle primary background, apart from the row status bar and selected rows. */
|
|
133
171
|
activeRowKey?: string | number;
|
|
172
|
+
/**
|
|
173
|
+
* Renders a leading checkbox column. Fires a bubbling selectionchange with selected, total and keys when the ticked count changes.
|
|
174
|
+
* @default false
|
|
175
|
+
*/
|
|
134
176
|
selectable?: boolean;
|
|
177
|
+
/** Currently selected row keys, as a Set. */
|
|
135
178
|
selectedIds?: Set<string | number>;
|
|
136
179
|
isRowSelectable?: (row: object, index: number) => boolean;
|
|
137
180
|
onToggleRow?: (id: string | number) => void;
|
|
138
181
|
onToggleAll?: (checked: boolean) => void;
|
|
139
182
|
onSelectRange?: (keys: Array<string | number>, checked: boolean) => void;
|
|
140
183
|
renderExpanded?: (row: object) => import('react').ReactNode;
|
|
184
|
+
/**
|
|
185
|
+
* Each column but the last gets a handle on its end edge: drag it, or focus it and press the arrow keys. The table then keeps fixed widths measured from its rows, and the last column takes the rest.
|
|
186
|
+
* @default false
|
|
187
|
+
*/
|
|
141
188
|
resizableColumns?: boolean;
|
|
189
|
+
/** Remembers resized widths in this browser under this name, the same name useTableView takes. */
|
|
142
190
|
viewKey?: string;
|
|
191
|
+
/** A column key: rows gather under a header row per value of it, in the order each value first appears, each header collapsing its rows and showing their count. */
|
|
143
192
|
groupBy?: string;
|
|
144
193
|
groupLabel?: (value: unknown, rows: object[]) => import('react').ReactNode;
|
|
194
|
+
/**
|
|
195
|
+
* Renders only the rows in view, plus a margin, for a long client-side list. Needs maxHeight; rows are taken to share one height, so it is not for renderExpanded or stackOnMobile.
|
|
196
|
+
* @default false
|
|
197
|
+
*/
|
|
145
198
|
virtual?: boolean;
|
|
146
199
|
rowSaving?: (row: object) => boolean;
|
|
147
200
|
rowSaveError?: (row: object) => string | undefined;
|