@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
|
@@ -1,22 +1,54 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/datepicker";
|
|
2
2
|
declare const AppDatePicker: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
/** ISO date string. */
|
|
3
4
|
value?: string;
|
|
4
5
|
onChange?: (value: string) => void;
|
|
6
|
+
/** The field label, shown above the control and used as its accessible name. */
|
|
5
7
|
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Marks the field required, with the required mark on the label.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
6
12
|
required?: boolean;
|
|
13
|
+
/** Help text shown under the control. */
|
|
7
14
|
hint?: string;
|
|
15
|
+
/** An error message shown under the control. */
|
|
8
16
|
error?: string;
|
|
17
|
+
/** The form field name the ISO date posts under. */
|
|
9
18
|
name?: string;
|
|
19
|
+
/** The earliest selectable date, as an ISO date string. */
|
|
10
20
|
min?: string;
|
|
21
|
+
/** The latest selectable date, as an ISO date string. */
|
|
11
22
|
max?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Text shown in the field while no date is chosen.
|
|
25
|
+
* @default "Choose a date"
|
|
26
|
+
*/
|
|
12
27
|
placeholder?: string;
|
|
28
|
+
/** Disables the control. */
|
|
13
29
|
disabled?: boolean;
|
|
30
|
+
/** Control height tier, matching AppInput. */
|
|
14
31
|
size?: 'sm' | 'md' | 'lg';
|
|
32
|
+
/** First weekday of the calendar, 0 Sunday to 6 Saturday. Unset, it follows the theme's --wui-first-day token, which is 1 (Monday) unless the product sets it. */
|
|
15
33
|
firstDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
34
|
+
/**
|
|
35
|
+
* How the chosen date reads in the field, from the tokens yyyy, MMMM, MMM, MM, dd and d (for example dd/MM/yyyy). The onChange value stays ISO.
|
|
36
|
+
* @default "dd-MMM-yyyy"
|
|
37
|
+
*/
|
|
16
38
|
displayFormat?: string;
|
|
39
|
+
/** The id of the control; a unique one is made when left out. */
|
|
17
40
|
id?: string;
|
|
41
|
+
/** Accessible name when there is no visible label. */
|
|
18
42
|
ariaLabel?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Classes for the wui-datepicker control itself.
|
|
45
|
+
* @default ""
|
|
46
|
+
*/
|
|
19
47
|
className?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Classes for the field wrapper that holds the label, hint and error.
|
|
50
|
+
* @default ""
|
|
51
|
+
*/
|
|
20
52
|
fieldClassName?: string;
|
|
21
53
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
22
54
|
export default AppDatePicker;
|
|
@@ -1,31 +1,62 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/date-range";
|
|
2
2
|
declare const AppDateRangePicker: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
/** Range start as an ISO date string (YYYY-MM-DD). */
|
|
3
4
|
start?: string;
|
|
5
|
+
/** Range end as an ISO date string (YYYY-MM-DD). */
|
|
4
6
|
end?: string;
|
|
5
7
|
onChange?: (range: {
|
|
6
8
|
start: string;
|
|
7
9
|
end: string;
|
|
8
10
|
}) => void;
|
|
11
|
+
/** The field label, shown above the control and used as its accessible name. */
|
|
9
12
|
label?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Marks the field required, with the required mark on the label.
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
10
17
|
required?: boolean;
|
|
18
|
+
/** Help text shown under the control. */
|
|
11
19
|
hint?: string;
|
|
20
|
+
/** An error message shown under the control. */
|
|
12
21
|
error?: string;
|
|
22
|
+
/** Form field name the start date posts under. */
|
|
13
23
|
startName?: string;
|
|
24
|
+
/** Form field name the end date posts under. */
|
|
14
25
|
endName?: string;
|
|
26
|
+
/** The earliest selectable date, as an ISO date string. */
|
|
15
27
|
min?: string;
|
|
28
|
+
/** The latest selectable date, as an ISO date string. */
|
|
16
29
|
max?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Text shown in the field while no range is chosen.
|
|
32
|
+
* @default "Start to End"
|
|
33
|
+
*/
|
|
17
34
|
placeholder?: string;
|
|
35
|
+
/** Disables the control. */
|
|
18
36
|
disabled?: boolean;
|
|
37
|
+
/** Control height tier, matching AppInput. */
|
|
19
38
|
size?: 'sm' | 'md' | 'lg';
|
|
39
|
+
/** First weekday of the calendar, 0 Sunday to 6 Saturday. Unset, it follows the theme's --wui-first-day token, which is 1 (Monday) unless the product sets it. */
|
|
20
40
|
firstDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
41
|
+
/** Quick ranges, listed beside the calendar (above it on a phone); picking one fills the range and closes the calendar. An item is a name (today, yesterday, last7Days, last30Days, thisMonth, lastMonth or thisFinancialYear, resolved against today in IST) or { label, start, end } with ISO dates. */
|
|
21
42
|
presets?: (('today' | 'yesterday' | 'last7Days' | 'last30Days' | 'thisMonth' | 'lastMonth' | 'thisFinancialYear') | {
|
|
22
43
|
label: string;
|
|
23
44
|
start: string;
|
|
24
45
|
end: string;
|
|
25
46
|
})[];
|
|
47
|
+
/** The id of the control; a unique one is made when left out. */
|
|
26
48
|
id?: string;
|
|
49
|
+
/** Accessible name when there is no visible label. */
|
|
27
50
|
ariaLabel?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Class to apply to the control element.
|
|
53
|
+
* @default ""
|
|
54
|
+
*/
|
|
28
55
|
className?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Class to apply to the wrapper field div.
|
|
58
|
+
* @default ""
|
|
59
|
+
*/
|
|
29
60
|
fieldClassName?: string;
|
|
30
61
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
31
62
|
export default AppDateRangePicker;
|
|
@@ -8,16 +8,15 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @param {object} props
|
|
10
10
|
* @param {{ label: string, value: import('react').ReactNode, span?: 1|2|3, key?: string, emphasis?: boolean }[]} props.items
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {"
|
|
15
|
-
* @param {
|
|
16
|
-
* @param {
|
|
17
|
-
* @param {import('react').ReactNode} [props.title] Optional heading above the grid.
|
|
18
|
-
* @param {string} [props.className] Extra classes on the grid container.
|
|
11
|
+
* @param {1|2|3} [props.columns]
|
|
12
|
+
* @param {"sm"|"md"} [props.size]
|
|
13
|
+
* @param {boolean} [props.bordered]
|
|
14
|
+
* @param {"grid"|"summary"} [props.layout]
|
|
15
|
+
* @param {import('react').ReactNode} [props.title]
|
|
16
|
+
* @param {string} [props.className]
|
|
19
17
|
*/
|
|
20
18
|
export default function AppDescriptions(props: {
|
|
19
|
+
/** The rows, each with a label and a value. A span of 2 or 3 makes the item span multiple columns, and emphasis marks the total row. */
|
|
21
20
|
items: {
|
|
22
21
|
label: string;
|
|
23
22
|
value: import('react').ReactNode;
|
|
@@ -25,10 +24,31 @@ export default function AppDescriptions(props: {
|
|
|
25
24
|
key?: string;
|
|
26
25
|
emphasis?: boolean;
|
|
27
26
|
}[];
|
|
27
|
+
/**
|
|
28
|
+
* How many columns the grid should have, before the media-breakpoint collapse.
|
|
29
|
+
* @default 2
|
|
30
|
+
*/
|
|
28
31
|
columns?: 1 | 2 | 3;
|
|
32
|
+
/**
|
|
33
|
+
* Item padding and font size.
|
|
34
|
+
* @default "md"
|
|
35
|
+
*/
|
|
29
36
|
size?: "sm" | "md";
|
|
37
|
+
/**
|
|
38
|
+
* Adds horizontal dividing lines between rows.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
30
41
|
bordered?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* summary puts each label left of its value, with tabular figures.
|
|
44
|
+
* @default "grid"
|
|
45
|
+
*/
|
|
31
46
|
layout?: "grid" | "summary";
|
|
47
|
+
/** Optional heading above the grid. */
|
|
32
48
|
title?: import('react').ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Extra classes on the grid container.
|
|
51
|
+
* @default ""
|
|
52
|
+
*/
|
|
33
53
|
className?: string;
|
|
34
54
|
}): import("react").JSX.Element;
|
|
@@ -10,41 +10,82 @@ import "@webority/ui-elements/elements/drawer";
|
|
|
10
10
|
* viewport.
|
|
11
11
|
*
|
|
12
12
|
* @param {object} props
|
|
13
|
-
* @param {boolean} [props.open
|
|
13
|
+
* @param {boolean} [props.open]
|
|
14
14
|
* @param {() => void} [props.onClose] Called when the backdrop, Escape, the close button or a drag
|
|
15
15
|
* down asks to close it. It stays open until `open` becomes false.
|
|
16
|
-
* @param {string} [props.title]
|
|
17
|
-
* @param {string} [props.subtitle]
|
|
18
|
-
* @param {string} [props.ariaLabel]
|
|
19
|
-
* @param {'end'|'start'} [props.side
|
|
20
|
-
* @param {'sm'|'md'|'lg'} [props.size
|
|
21
|
-
* @param {number[]} [props.snapPoints
|
|
22
|
-
* @param {number} [props.defaultSnap
|
|
16
|
+
* @param {string} [props.title]
|
|
17
|
+
* @param {string} [props.subtitle]
|
|
18
|
+
* @param {string} [props.ariaLabel]
|
|
19
|
+
* @param {'end'|'start'} [props.side]
|
|
20
|
+
* @param {'sm'|'md'|'lg'} [props.size]
|
|
21
|
+
* @param {number[]} [props.snapPoints]
|
|
22
|
+
* @param {number} [props.defaultSnap]
|
|
23
23
|
* @param {(index: number, percent: number) => void} [props.onSnapChange] Called when the sheet moves to another point.
|
|
24
|
-
* @param {boolean} [props.dismissible
|
|
25
|
-
* @param {boolean} [props.staticBackdrop
|
|
26
|
-
* @param {string} [props.confirmDiscard]
|
|
27
|
-
* @param {boolean} [props.dirty
|
|
28
|
-
* @param {import('react').ReactNode} [props.footer]
|
|
24
|
+
* @param {boolean} [props.dismissible]
|
|
25
|
+
* @param {boolean} [props.staticBackdrop]
|
|
26
|
+
* @param {string} [props.confirmDiscard]
|
|
27
|
+
* @param {boolean} [props.dirty]
|
|
28
|
+
* @param {import('react').ReactNode} [props.footer]
|
|
29
29
|
* @param {string} [props.className]
|
|
30
30
|
* @param {import('react').ReactNode} props.children
|
|
31
31
|
*/
|
|
32
32
|
export default function AppDrawer(props: {
|
|
33
|
+
/**
|
|
34
|
+
* Whether the drawer is open. The caller owns it and closes it in onClose.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
33
37
|
open?: boolean;
|
|
34
38
|
onClose?: () => void;
|
|
39
|
+
/** The heading, and the dialog's accessible name. */
|
|
35
40
|
title?: string;
|
|
41
|
+
/** A line under the title. */
|
|
36
42
|
subtitle?: string;
|
|
43
|
+
/** The dialog's accessible name when there is no title. */
|
|
37
44
|
ariaLabel?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Which edge the side drawer slides from.
|
|
47
|
+
* @default "end"
|
|
48
|
+
*/
|
|
38
49
|
side?: 'end' | 'start';
|
|
50
|
+
/**
|
|
51
|
+
* The side drawer's width: 360, 480 or 640 px.
|
|
52
|
+
* @default "md"
|
|
53
|
+
*/
|
|
39
54
|
size?: 'sm' | 'md' | 'lg';
|
|
55
|
+
/**
|
|
56
|
+
* The sheet's resting heights, each 10 to 100 percent of the screen.
|
|
57
|
+
* @default [50,90]
|
|
58
|
+
*/
|
|
40
59
|
snapPoints?: number[];
|
|
60
|
+
/**
|
|
61
|
+
* Which of the sorted snap points it opens on.
|
|
62
|
+
* @default 0
|
|
63
|
+
*/
|
|
41
64
|
defaultSnap?: number;
|
|
42
65
|
onSnapChange?: (index: number, percent: number) => void;
|
|
66
|
+
/**
|
|
67
|
+
* Show the close button.
|
|
68
|
+
* @default true
|
|
69
|
+
*/
|
|
43
70
|
dismissible?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* The backdrop, Escape and a drag down no longer close it; only the close button or open can.
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
44
75
|
staticBackdrop?: boolean;
|
|
76
|
+
/** Ask before closing while dirty: this text, with Discard and Keep editing in the footer. */
|
|
45
77
|
confirmDiscard?: string;
|
|
78
|
+
/**
|
|
79
|
+
* True while a field differs from its loaded value; the caller owns it.
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
46
82
|
dirty?: boolean;
|
|
83
|
+
/** Pinned below the scrolling body. */
|
|
47
84
|
footer?: import('react').ReactNode;
|
|
85
|
+
/**
|
|
86
|
+
* Extra classes on the drawer element.
|
|
87
|
+
* @default ""
|
|
88
|
+
*/
|
|
48
89
|
className?: string;
|
|
49
90
|
children: import('react').ReactNode;
|
|
50
91
|
}): import("react").JSX.Element;
|
|
@@ -8,30 +8,53 @@
|
|
|
8
8
|
* @param {(file: File | File[]) => void} props.onChange Single mode: the validated File. Multiple
|
|
9
9
|
* mode: the validated Files of that pick or drop. Not called when nothing passes validation.
|
|
10
10
|
* @param {string} [props.label]
|
|
11
|
-
* @param {string} [props.id]
|
|
12
|
-
* @param {boolean} [props.multiple
|
|
13
|
-
* @param {string} [props.accept
|
|
14
|
-
* @param {number} [props.maxSizeMb]
|
|
15
|
-
*
|
|
16
|
-
* @param {string} [props.
|
|
17
|
-
* @param {
|
|
18
|
-
*
|
|
19
|
-
* @param {
|
|
20
|
-
* @param {string} [props.className] Class to apply to the control element, the visible zone.
|
|
21
|
-
* @param {string} [props.fieldClassName] Class to apply to the wrapper field div.
|
|
11
|
+
* @param {string} [props.id]
|
|
12
|
+
* @param {boolean} [props.multiple]
|
|
13
|
+
* @param {string} [props.accept]
|
|
14
|
+
* @param {number} [props.maxSizeMb]
|
|
15
|
+
* @param {string} [props.error]
|
|
16
|
+
* @param {string} [props.hint]
|
|
17
|
+
* @param {boolean} [props.disabled]
|
|
18
|
+
* @param {string} [props.className]
|
|
19
|
+
* @param {string} [props.fieldClassName]
|
|
22
20
|
* @param {object} [props.style] Inline style; lands on the control with `className`.
|
|
23
21
|
*/
|
|
24
22
|
export default function AppDropZone(props: {
|
|
25
23
|
onChange: (file: File | File[]) => void;
|
|
24
|
+
/** Text of the label above the zone. */
|
|
26
25
|
label?: string;
|
|
26
|
+
/** DOM id for the file input and the target of its label's for attribute. */
|
|
27
27
|
id?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Take several files per pick or drop; the change handler then gets an array of files.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
28
32
|
multiple?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Accepted file types, written as the accept attribute is. Empty takes any file.
|
|
35
|
+
* @default ""
|
|
36
|
+
*/
|
|
29
37
|
accept?: string;
|
|
38
|
+
/** Largest file size in megabytes, the shared limit when left out. 0 means no size limit: nothing is rejected for its size, and the hint names no size. */
|
|
30
39
|
maxSizeMb?: number;
|
|
40
|
+
/** Message below the zone; also styles the zone as errored. */
|
|
31
41
|
error?: string;
|
|
42
|
+
/** Helper text below the zone; an error, the caller's or a rejected pick's, replaces it while it shows. */
|
|
32
43
|
hint?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Blocks click and drop.
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
33
48
|
disabled?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Class to apply to the control element, the visible zone.
|
|
51
|
+
* @default ""
|
|
52
|
+
*/
|
|
34
53
|
className?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Class to apply to the wrapper field div.
|
|
56
|
+
* @default ""
|
|
57
|
+
*/
|
|
35
58
|
fieldClassName?: string;
|
|
36
59
|
style?: object;
|
|
37
60
|
}): import("react").JSX.Element;
|
|
@@ -9,20 +9,13 @@
|
|
|
9
9
|
* the parity check reads the first signature it finds as the component's public props.
|
|
10
10
|
*
|
|
11
11
|
* @param {object} props
|
|
12
|
-
* @param {string} props.icon
|
|
12
|
+
* @param {string} [props.icon]
|
|
13
13
|
* @param {number} [props.iconSize]
|
|
14
14
|
* @param {string} [props.toggleClassName]
|
|
15
|
-
* @param {string} [props.label]
|
|
16
|
-
* @param {"start"|"end"} [props.align
|
|
15
|
+
* @param {string} [props.label]
|
|
16
|
+
* @param {"start"|"end"} [props.align]
|
|
17
17
|
* @param {string} [props.ariaLabel]
|
|
18
|
-
* @param {{ key: string, label?: string, icon?: string|import('react').ReactNode, image?: string, to?: string, onClick?: () => void, danger?: boolean, shortcut?: string, divider?:
|
|
19
|
-
* `icon` is a glyph name OR a custom node (e.g. an iconsax glyph); `image` is a picture URL (external logo/avatar) — pass one.
|
|
20
|
-
* `shortcut` is the key that runs the item ("E"), drawn as a key chip at the end of the row; the
|
|
21
|
-
* page binds the key itself (useListShortcuts).
|
|
22
|
-
* An item with `divider: true` renders a separator instead of an action; it needs no
|
|
23
|
-
* `label`/`onClick`, just a unique `key`.
|
|
24
|
-
* An item with `header` renders a small group heading (`<div class="dropdown-header">`) instead of an action;
|
|
25
|
-
* it needs no `label`/`onClick`, just a unique `key`.
|
|
18
|
+
* @param {{ key: string, label?: string, icon?: string|import('react').ReactNode, image?: string, to?: string, onClick?: () => void, danger?: boolean, shortcut?: string, divider?: boolean, header?: string, hiddenFrom?: 'sm'|'md'|'lg'|'xl' }[]} [props.items]
|
|
26
19
|
* @param {string} [props.menuClassName]
|
|
27
20
|
* @param {import('react').ElementType} [props.linkComponent] Component for `to` items (e.g. Link).
|
|
28
21
|
* @param {import('react').ReactNode} [props.children] Rich menu content — renders inside the
|
|
@@ -30,25 +23,33 @@
|
|
|
30
23
|
* block, a form, mixed content). `items` and `children` are mutually exclusive; `children`
|
|
31
24
|
* wins when both are given. The icon toggle and react-bootstrap's open/close, outside-click,
|
|
32
25
|
* focus and Escape behavior are unchanged either way.
|
|
33
|
-
* @param {import('react').ReactNode} [props.trigger]
|
|
34
|
-
*
|
|
35
|
-
* "Sort by ▾" labeled button). Wins over `icon`. The button still owns react-bootstrap's
|
|
36
|
-
* ref/onClick/`aria-expanded` and keyboard behavior, so a11y is unchanged. Razor counterpart:
|
|
37
|
-
* the `<app-dropdown-toggle>` child slot.
|
|
38
|
-
* @param {boolean} [props.show] Controlled open state. Leave it unset and the menu manages its own;
|
|
39
|
-
* set it and the caller owns it, updating it from `onToggle`.
|
|
26
|
+
* @param {import('react').ReactNode} [props.trigger]
|
|
27
|
+
* @param {boolean} [props.show]
|
|
40
28
|
* @param {(nextShow: boolean, meta: { source?: string, originalEvent?: Event }) => void} [props.onToggle]
|
|
41
29
|
* Called whenever the menu asks to open or close: a toggle click, an outside click, Escape, an item
|
|
42
30
|
* pick (react-bootstrap's `source`), and the close on a scroll that moves the toggle or a window
|
|
43
31
|
* resize (`source` "scroll" or "resize"). Fires in both modes.
|
|
44
32
|
*/
|
|
45
33
|
export default function AppDropdown(props: {
|
|
46
|
-
|
|
34
|
+
/** Name of the glyph on the toggle button. A custom trigger replaces it. */
|
|
35
|
+
icon?: string;
|
|
36
|
+
/** Size of the toggle glyph in pixels. */
|
|
47
37
|
iconSize?: number;
|
|
38
|
+
/** Class for the toggle button, replacing the default toggle look. */
|
|
48
39
|
toggleClassName?: string;
|
|
40
|
+
/** Tooltip and accessible name fallback for the toggle. */
|
|
49
41
|
label?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Which edge of the toggle the menu lines up with.
|
|
44
|
+
* @default "end"
|
|
45
|
+
*/
|
|
50
46
|
align?: "start" | "end";
|
|
47
|
+
/** Accessible name of the toggle; it wins over label. */
|
|
51
48
|
ariaLabel?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The menu rows, used when there are no children. A row is an action, a divider or a group heading; a divider or heading needs only a unique key.
|
|
51
|
+
* @default []
|
|
52
|
+
*/
|
|
52
53
|
items?: {
|
|
53
54
|
key: string;
|
|
54
55
|
label?: string;
|
|
@@ -58,14 +59,20 @@ export default function AppDropdown(props: {
|
|
|
58
59
|
onClick?: () => void;
|
|
59
60
|
danger?: boolean;
|
|
60
61
|
shortcut?: string;
|
|
61
|
-
divider?:
|
|
62
|
+
divider?: boolean;
|
|
62
63
|
header?: string;
|
|
63
64
|
hiddenFrom?: 'sm' | 'md' | 'lg' | 'xl';
|
|
64
65
|
}[];
|
|
66
|
+
/**
|
|
67
|
+
* Class for the menu panel.
|
|
68
|
+
* @default ""
|
|
69
|
+
*/
|
|
65
70
|
menuClassName?: string;
|
|
66
71
|
linkComponent?: import('react').ElementType;
|
|
67
72
|
children?: import('react').ReactNode;
|
|
73
|
+
/** A custom trigger drawn inside the toggle button instead of the icon, such as an account chip or a labelled sort button. It wins over icon. The button keeps its open state, keyboard behavior and accessible role. */
|
|
68
74
|
trigger?: import('react').ReactNode;
|
|
75
|
+
/** Controlled open state. Leave it out and the menu manages its own; set it and the caller owns it, updating it from the toggle handler. */
|
|
69
76
|
show?: boolean;
|
|
70
77
|
onToggle?: (nextShow: boolean, meta: {
|
|
71
78
|
source?: string;
|
|
@@ -4,16 +4,27 @@
|
|
|
4
4
|
* Dates are read in India Standard Time. The Razor `<app-due-date>` renders the same markup and classes.
|
|
5
5
|
*
|
|
6
6
|
* @param {object} props
|
|
7
|
-
* @param {Date} [props.date]
|
|
8
|
-
* @param {number} [props.soonDays]
|
|
9
|
-
* @param {boolean} [props.overdue
|
|
10
|
-
* @param {string} [props.overdueLabel]
|
|
7
|
+
* @param {string|number|Date} [props.date]
|
|
8
|
+
* @param {number} [props.soonDays]
|
|
9
|
+
* @param {boolean} [props.overdue]
|
|
10
|
+
* @param {string} [props.overdueLabel]
|
|
11
11
|
* @param {string} [props.className]
|
|
12
12
|
*/
|
|
13
13
|
export default function AppDueDate(props: {
|
|
14
|
-
date
|
|
14
|
+
/** The due date: an ISO date or date-time string, or epoch milliseconds, read in India Standard Time. */
|
|
15
|
+
date?: string | number | Date;
|
|
16
|
+
/** Within this many days of the date, the text reads "N days left" in warning. */
|
|
15
17
|
soonDays?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Set by the caller from its own rule. Done items are never overdue.
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
16
22
|
overdue?: boolean;
|
|
23
|
+
/** Replaces the date text when overdue, for example "Validity ended". */
|
|
17
24
|
overdueLabel?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Extra class on the due date element.
|
|
27
|
+
* @default ""
|
|
28
|
+
*/
|
|
18
29
|
className?: string;
|
|
19
30
|
}): import("react").JSX.Element;
|
|
@@ -10,25 +10,41 @@
|
|
|
10
10
|
* the tighter widget/tile variant (smaller title + text).
|
|
11
11
|
*
|
|
12
12
|
* @param {object} props
|
|
13
|
-
* @param {string|import('react').ReactNode} [props.icon]
|
|
14
|
-
*
|
|
15
|
-
* @param {
|
|
16
|
-
* @param {
|
|
17
|
-
* @param {"md"|"sm"} [props.size="md"]
|
|
13
|
+
* @param {string|import('react').ReactNode} [props.icon]
|
|
14
|
+
* @param {string|import('react').ReactNode} [props.illustration]
|
|
15
|
+
* @param {number} [props.iconSize]
|
|
16
|
+
* @param {"md"|"sm"} [props.size]
|
|
18
17
|
* @param {import('react').ReactNode} props.title
|
|
19
18
|
* @param {import('react').ReactNode} [props.text]
|
|
20
|
-
* @param {import('react').ReactNode} [props.action]
|
|
19
|
+
* @param {import('react').ReactNode} [props.action]
|
|
21
20
|
* @param {string} [props.className]
|
|
22
21
|
* @param {import('react').CSSProperties} [props.style]
|
|
23
22
|
*/
|
|
24
23
|
export default function AppEmptyState(props: {
|
|
24
|
+
/** Semantic icon name for the bubble, or a custom node. Needed unless illustration is set, which replaces the bubble. */
|
|
25
25
|
icon?: string | import('react').ReactNode;
|
|
26
|
+
/** A named drawing (no-results, no-data, empty-inbox, no-notifications, no-files, no-access, offline or error), or your own decorative SVG node drawn unboxed at up to 120 px. Replaces the icon bubble when set. */
|
|
26
27
|
illustration?: string | import('react').ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Size of the icon in the bubble, in pixels.
|
|
30
|
+
* @default 24
|
|
31
|
+
*/
|
|
27
32
|
iconSize?: number;
|
|
33
|
+
/**
|
|
34
|
+
* The type scale: md is the page or card empty state, sm is the tighter widget or tile variant with a smaller title and text.
|
|
35
|
+
* @default "md"
|
|
36
|
+
*/
|
|
28
37
|
size?: "md" | "sm";
|
|
38
|
+
/** The headline of the empty state. */
|
|
29
39
|
title: import('react').ReactNode;
|
|
40
|
+
/** Body text under the title. */
|
|
30
41
|
text?: import('react').ReactNode;
|
|
42
|
+
/** The next step shown below the text, usually an AppButton. */
|
|
31
43
|
action?: import('react').ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Extra class on the empty state wrapper.
|
|
46
|
+
* @default ""
|
|
47
|
+
*/
|
|
32
48
|
className?: string;
|
|
33
49
|
style?: import('react').CSSProperties;
|
|
34
50
|
}): import("react").JSX.Element;
|
|
@@ -6,20 +6,33 @@
|
|
|
6
6
|
* rather than from the Save button.
|
|
7
7
|
*
|
|
8
8
|
* @param {object} props
|
|
9
|
-
* @param {{ field: string, message: string }[]} [props.errors]
|
|
10
|
-
* @param {import('react').ReactNode} [props.title]
|
|
11
|
-
* @param {boolean} [props.autoFocus
|
|
12
|
-
* summary is shown for reference, such as documentation, never on a form.
|
|
9
|
+
* @param {{ field: string, message: string }[]} [props.errors]
|
|
10
|
+
* @param {import('react').ReactNode} [props.title]
|
|
11
|
+
* @param {boolean} [props.autoFocus]
|
|
13
12
|
* @param {string} [props.id]
|
|
14
13
|
* @param {string} [props.className]
|
|
15
14
|
*/
|
|
16
15
|
export default function AppErrorSummary(props: {
|
|
16
|
+
/**
|
|
17
|
+
* The errors to list; the summary renders nothing while it is empty.
|
|
18
|
+
* @default []
|
|
19
|
+
*/
|
|
17
20
|
errors?: {
|
|
18
21
|
field: string;
|
|
19
22
|
message: string;
|
|
20
23
|
}[];
|
|
24
|
+
/** Heading of the summary. Defaults to "Fix N field(s) to continue". */
|
|
21
25
|
title?: import('react').ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Take focus when errors appear. Turn off only where the summary is shown for reference, such as documentation, never on a form.
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
22
30
|
autoFocus?: boolean;
|
|
31
|
+
/** DOM id of the summary; its heading id is built from it. */
|
|
23
32
|
id?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Extra class on the summary element.
|
|
35
|
+
* @default ""
|
|
36
|
+
*/
|
|
24
37
|
className?: string;
|
|
25
38
|
}): import("react").JSX.Element;
|
|
@@ -19,34 +19,50 @@ export type AttachmentFile = {
|
|
|
19
19
|
* to something (a ticket, a message) where the file's name/size matters more than a big preview.
|
|
20
20
|
*
|
|
21
21
|
* @param {object} props
|
|
22
|
-
* @param {string} [props.label
|
|
23
|
-
* @param {File|AttachmentFile|Array<File|AttachmentFile>|null} [props.value]
|
|
24
|
-
* @param {string} [props.name]
|
|
22
|
+
* @param {string} [props.label]
|
|
23
|
+
* @param {File|AttachmentFile|Array<File|AttachmentFile>|null} [props.value]
|
|
24
|
+
* @param {string} [props.name]
|
|
25
25
|
* @param {(file: File|null) => void | (files: File[]) => void} props.onChange single-mode → File|null; multiple → File[]
|
|
26
|
-
* @param {boolean} [props.multiple
|
|
27
|
-
* @param {string} [props.accept]
|
|
28
|
-
*
|
|
29
|
-
* @param {
|
|
30
|
-
*
|
|
31
|
-
* @param {boolean} [props.optional=false]
|
|
32
|
-
* @param {boolean} [props.validate=true] Check each pick against `accept` and `maxSizeMb` and show
|
|
33
|
-
* the field's own message for a rejected file. Set false when the caller validates the files
|
|
34
|
-
* itself and shows its own message through `error`: every pick then reaches `onChange`, so the
|
|
35
|
-
* person never sees two messages in two voices for one problem. `accept` and `maxSizeMb` still
|
|
36
|
-
* set the picker filter and the hint text.
|
|
26
|
+
* @param {boolean} [props.multiple]
|
|
27
|
+
* @param {string} [props.accept]
|
|
28
|
+
* @param {number} [props.maxSizeMb]
|
|
29
|
+
* @param {boolean} [props.optional]
|
|
30
|
+
* @param {boolean} [props.validate]
|
|
37
31
|
* @param {string} [props.error]
|
|
38
32
|
* @param {string} [props.id]
|
|
39
33
|
*/
|
|
40
34
|
export default function AppFileAttachment(props: {
|
|
35
|
+
/**
|
|
36
|
+
* The label shown above the field.
|
|
37
|
+
* @default "Attachment"
|
|
38
|
+
*/
|
|
41
39
|
label?: string;
|
|
40
|
+
/** A picked File, or an existing or uploading file: sizeBytes is its size in bytes, progress runs 0 to 100 while it uploads, error says why it failed. With multiple, an array of these. */
|
|
42
41
|
value?: File | AttachmentFile | Array<File | AttachmentFile> | null;
|
|
42
|
+
/** Form field name, so an uncontrolled form can post the file. */
|
|
43
43
|
name?: string;
|
|
44
44
|
onChange: (file: File | null) => void | ((files: File[]) => void);
|
|
45
|
+
/**
|
|
46
|
+
* Lets the person attach several files. They stack in a list and each one removes on its own.
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
45
49
|
multiple?: boolean;
|
|
50
|
+
/** The file types the field takes, as an accept list. Defaults to images; pass for example image/*,application/pdf for mixed. An empty string accepts any file type, and the hint then names no types. */
|
|
46
51
|
accept?: string;
|
|
52
|
+
/** The size limit in megabytes. Defaults to the shared limit. 0 means no size limit: nothing is rejected for its size, and the hint names no size. */
|
|
47
53
|
maxSizeMb?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Adds (optional) after the label.
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
48
58
|
optional?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Checks each pick against accept and maxSizeMb and shows the field's own message for a rejected file. Set false when the page validates the files itself and shows its own message through error, so every pick reaches onChange and the person never sees two messages in two voices for one problem. accept and maxSizeMb still set the picker filter and the hint text.
|
|
61
|
+
* @default true
|
|
62
|
+
*/
|
|
49
63
|
validate?: boolean;
|
|
64
|
+
/** A message from the page, shown below the field beside the field's own validation messages. */
|
|
50
65
|
error?: string;
|
|
66
|
+
/** DOM id of the file input; the label and the drop row point at it. Pass one when rows share a name. */
|
|
51
67
|
id?: string;
|
|
52
68
|
}): import("react").JSX.Element;
|