@webority/ui-react 0.88.1 → 0.90.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,36 +1,115 @@
|
|
|
1
1
|
declare const AppInput: import("react").ForwardRefExoticComponent<{
|
|
2
|
+
/** The field label, shown above the control. */
|
|
2
3
|
label?: import('react').ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Marks the field as required, with a visible mark and the native required attribute.
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
3
8
|
required?: boolean;
|
|
9
|
+
/** A validation message under the field. It marks the control invalid for assistive technology. */
|
|
4
10
|
error?: string;
|
|
11
|
+
/** Help text under the field. An error replaces it while both are set. */
|
|
5
12
|
hint?: string;
|
|
13
|
+
/** Text shown in an empty field. */
|
|
6
14
|
placeholder?: string;
|
|
15
|
+
/** The content of the info-tip beside the label, opened by a button. */
|
|
7
16
|
help?: import('react').ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* The accessible name of the info-tip button.
|
|
19
|
+
* @default "More information"
|
|
20
|
+
*/
|
|
8
21
|
helpLabel?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The native input type, such as email, tel, number or password.
|
|
24
|
+
* @default "text"
|
|
25
|
+
*/
|
|
9
26
|
type?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The control size. Sm and lg opt out of the shared height. Xl is the tallest, with its floating label inside the box.
|
|
29
|
+
* @default "md"
|
|
30
|
+
*/
|
|
10
31
|
size?: "sm" | "md" | "lg" | "xl";
|
|
32
|
+
/** A leading icon, given as a semantic icon name. */
|
|
11
33
|
leftIcon?: string;
|
|
34
|
+
/** A trailing icon button, given as a semantic icon name. It calls onRightIconClick when pressed. */
|
|
12
35
|
rightIcon?: string;
|
|
13
36
|
onRightIconClick?: () => void;
|
|
37
|
+
/** The accessible name of the right-icon button. It falls back to the icon name. */
|
|
14
38
|
rightIconLabel?: string;
|
|
39
|
+
/** A unit shown after the value, such as kg. */
|
|
15
40
|
unit?: string;
|
|
41
|
+
/** The id of the control. The label points at it. */
|
|
16
42
|
id?: string;
|
|
43
|
+
/** The form field name. */
|
|
17
44
|
name?: string;
|
|
45
|
+
/** The controlled value. Pair it with onChange. */
|
|
18
46
|
value?: string | number;
|
|
47
|
+
/** The starting value of an uncontrolled field. */
|
|
19
48
|
defaultValue?: string | number;
|
|
49
|
+
/** Extra classes on the control. */
|
|
20
50
|
className?: string;
|
|
51
|
+
/** Extra classes on the field wrapper. */
|
|
21
52
|
fieldClassName?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Disables the field.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
22
57
|
disabled?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Shows a clear button while the field has a value.
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
23
62
|
clearable?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Shows a live character count under the field.
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
24
67
|
showCount?: boolean;
|
|
68
|
+
/** The character cap. The count turns red as the cap is approached. */
|
|
25
69
|
maxLength?: number;
|
|
70
|
+
/** A bordered box before the input, such as a currency sign or a scheme. */
|
|
26
71
|
prefix?: import('react').ReactNode;
|
|
72
|
+
/** A bordered box after the input, such as a decimal part or a domain. */
|
|
27
73
|
suffix?: import('react').ReactNode;
|
|
74
|
+
/** A control rendered beside the field, outside its border, such as a verify button. */
|
|
28
75
|
action?: import('react').ReactNode;
|
|
29
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Where the label rests. Off keeps it above the field. Border sits it inside as a placeholder, then slides it onto the top border once the field is focused or filled. Above rests it above the box, clear of the border.
|
|
78
|
+
* @default "off"
|
|
79
|
+
*/
|
|
80
|
+
floatingLabel?: "off" | "border" | "above";
|
|
81
|
+
/** A borderless look with no border or background, for inline editing. */
|
|
30
82
|
variant?: "bare";
|
|
31
|
-
|
|
83
|
+
/**
|
|
84
|
+
* On a password field, shows a live checklist of the password rules as the user types. It uses the default policy unless passwordPolicy is set.
|
|
85
|
+
* @default "off"
|
|
86
|
+
*/
|
|
87
|
+
passwordRequirements?: "off" | "shown";
|
|
88
|
+
/** A custom password policy that replaces the default rules. It is used only while passwordRequirements is shown. */
|
|
89
|
+
passwordPolicy?: {
|
|
90
|
+
minLength?: number;
|
|
91
|
+
uppercase?: boolean;
|
|
92
|
+
lowercase?: boolean;
|
|
93
|
+
digit?: boolean;
|
|
94
|
+
special?: boolean;
|
|
95
|
+
uniqueChars?: number;
|
|
96
|
+
customRules?: Array<{
|
|
97
|
+
label: string;
|
|
98
|
+
pattern: string;
|
|
99
|
+
}>;
|
|
100
|
+
title?: string;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* The side the requirements popover opens on. Auto flips to stay in view. Inline puts the checklist under the field, in place of the hint.
|
|
104
|
+
* @default "auto"
|
|
105
|
+
*/
|
|
32
106
|
requirementsPlacement?: "auto" | "top" | "bottom" | "start" | "end" | "inline";
|
|
107
|
+
/** A named mask such as pan, phone-in, gstin, aadhaar, ifsc, pin-code, date or amount, or a pattern where 9 is a digit and A a letter. The value is formatted as it is typed. */
|
|
33
108
|
mask?: string;
|
|
109
|
+
/**
|
|
110
|
+
* With a mask, a native form submit posts the formatted value instead of the raw characters.
|
|
111
|
+
* @default false
|
|
112
|
+
*/
|
|
34
113
|
postFormatted?: boolean;
|
|
35
114
|
onMaskChange?: (raw: string, formatted: string) => void;
|
|
36
115
|
onChange?: (e: import('react').ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -9,21 +9,34 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @param {object} props
|
|
11
11
|
* @param {import('react').ReactNode} props.children The field.
|
|
12
|
-
* @param {import('react').ReactNode} [props.leading]
|
|
13
|
-
* @param {import('react').ReactNode} [props.trailing]
|
|
14
|
-
* @param {string} [props.label]
|
|
15
|
-
* @param {string} [props.htmlFor]
|
|
16
|
-
* @param {boolean} [props.required
|
|
17
|
-
* @param {'sm'|'md'|'lg'} [props.size
|
|
12
|
+
* @param {import('react').ReactNode} [props.leading]
|
|
13
|
+
* @param {import('react').ReactNode} [props.trailing]
|
|
14
|
+
* @param {string} [props.label]
|
|
15
|
+
* @param {string} [props.htmlFor]
|
|
16
|
+
* @param {boolean} [props.required]
|
|
17
|
+
* @param {'sm'|'md'|'lg'} [props.size]
|
|
18
18
|
* @param {string} [props.className]
|
|
19
19
|
*/
|
|
20
20
|
export default function AppInputGroup(props: {
|
|
21
21
|
children: import('react').ReactNode;
|
|
22
|
+
/** Before the field: text, or a node such as an AppButton. */
|
|
22
23
|
leading?: import('react').ReactNode;
|
|
24
|
+
/** After the field. */
|
|
23
25
|
trailing?: import('react').ReactNode;
|
|
26
|
+
/** The group's label, above it. */
|
|
24
27
|
label?: string;
|
|
28
|
+
/** The id of the field the label names. */
|
|
25
29
|
htmlFor?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Marks the label required.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
26
34
|
required?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Height of text add-ons; set the same size on the field and on button add-ons.
|
|
37
|
+
* @default "md"
|
|
38
|
+
*/
|
|
27
39
|
size?: 'sm' | 'md' | 'lg';
|
|
40
|
+
/** Extra class on the root. */
|
|
28
41
|
className?: string;
|
|
29
42
|
}): import("react").JSX.Element;
|
|
@@ -21,11 +21,7 @@
|
|
|
21
21
|
* href?: string, summary?: import('react').ReactNode | ((cards: object[]) => import('react').ReactNode),
|
|
22
22
|
* acceptFrom?: string[], collapsible?: boolean, collapsed?: boolean, emptyText?: string,
|
|
23
23
|
* visibleLimit?: number }[]} props.columns
|
|
24
|
-
*
|
|
25
|
-
* `collapsible` columns fold to a strip, remembered per `boardId`; `collapsed` is the first state.
|
|
26
|
-
* `visibleLimit` shows the first N cards the filter lets through, with "Show N more" for the
|
|
27
|
-
* rest; the count still covers every card, and a card dropped there always shows.
|
|
28
|
-
* @param {object[]} props.cards Every card on the board.
|
|
24
|
+
* @param {object[]} props.cards
|
|
29
25
|
* @param {(card: object) => import('react').ReactNode} props.renderCard The card's content.
|
|
30
26
|
* @param {(column: object, cards: object[]) => import('react').ReactNode} [props.renderColumnActions]
|
|
31
27
|
* Controls at the right of a column's head (a "+" that adds a card, say), given the column and
|
|
@@ -44,27 +40,23 @@
|
|
|
44
40
|
* @param {(card: object, from: string, to: string) => boolean | string} [props.accept] Refuse a move:
|
|
45
41
|
* false, or a string saying why (shown in the column while the card is carried).
|
|
46
42
|
* @param {(card: object) => boolean} [props.filter] Show only the cards it returns true for; counts follow.
|
|
47
|
-
* @param {string} [props.boardId]
|
|
48
|
-
* @param {string} [props.ariaLabel
|
|
49
|
-
* @param {string} [props.emptyText
|
|
50
|
-
* @param {boolean} [props.readOnly
|
|
51
|
-
* @param {boolean} [props.swipeHint
|
|
52
|
-
* @param {number} [props.columnWidth]
|
|
53
|
-
* @param {number} [props.fillOffset]
|
|
54
|
-
* @param {string} [props.activeCardKey]
|
|
55
|
-
* @param {'inline'|'stacked'} [props.headLayout
|
|
56
|
-
* @param {boolean} [props.fill
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* the page. While a card is carried, a column's list scrolls when the pointer nears its top or
|
|
60
|
-
* bottom. Phones keep the one-column layout, scrolling the page.
|
|
61
|
-
* @param {'number'|'currency'|'compact'} [props.summaryFormat] Each column's summary becomes the sum
|
|
62
|
-
* of its visible cards' `getCardValue`, in this format.
|
|
63
|
-
* @param {'rupees'|'paise'} [props.summaryUnit='rupees'] The unit of the card values.
|
|
43
|
+
* @param {string} [props.boardId]
|
|
44
|
+
* @param {string} [props.ariaLabel]
|
|
45
|
+
* @param {string} [props.emptyText]
|
|
46
|
+
* @param {boolean} [props.readOnly]
|
|
47
|
+
* @param {boolean} [props.swipeHint]
|
|
48
|
+
* @param {number} [props.columnWidth]
|
|
49
|
+
* @param {number} [props.fillOffset]
|
|
50
|
+
* @param {string} [props.activeCardKey]
|
|
51
|
+
* @param {'inline'|'stacked'} [props.headLayout]
|
|
52
|
+
* @param {boolean} [props.fill]
|
|
53
|
+
* @param {'number'|'currency'|'compact'} [props.summaryFormat]
|
|
54
|
+
* @param {'rupees'|'paise'} [props.summaryUnit]
|
|
64
55
|
* @param {string} [props.className]
|
|
65
|
-
* @param {string} [props.id]
|
|
56
|
+
* @param {string} [props.id]
|
|
66
57
|
*/
|
|
67
58
|
export default function AppKanban(props: {
|
|
59
|
+
/** The columns, left to right. A column takes cards only from the columns in its `acceptFrom`; a `collapsible` column folds to a strip that is remembered per `boardId`. Each column also needs a unique `key`. */
|
|
68
60
|
columns: {
|
|
69
61
|
key: string;
|
|
70
62
|
title: string;
|
|
@@ -77,6 +69,7 @@ export default function AppKanban(props: {
|
|
|
77
69
|
emptyText?: string;
|
|
78
70
|
visibleLimit?: number;
|
|
79
71
|
}[];
|
|
72
|
+
/** Every card on the board. A card is a plain object; it sits in the column named by its `column` and is identified by its `key` or `id`. */
|
|
80
73
|
cards: object[];
|
|
81
74
|
renderCard: (card: object) => import('react').ReactNode;
|
|
82
75
|
renderColumnActions?: (column: object, cards: object[]) => import('react').ReactNode;
|
|
@@ -99,18 +92,53 @@ export default function AppKanban(props: {
|
|
|
99
92
|
}) => void | Promise<unknown>;
|
|
100
93
|
accept?: (card: object, from: string, to: string) => boolean | string;
|
|
101
94
|
filter?: (card: object) => boolean;
|
|
95
|
+
/** Remembers which columns are folded per browser, under this id. */
|
|
102
96
|
boardId?: string;
|
|
97
|
+
/**
|
|
98
|
+
* The accessible name of the board region.
|
|
99
|
+
* @default "Board"
|
|
100
|
+
*/
|
|
103
101
|
ariaLabel?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Text of an empty column.
|
|
104
|
+
* @default "Nothing here"
|
|
105
|
+
*/
|
|
104
106
|
emptyText?: string;
|
|
107
|
+
/**
|
|
108
|
+
* No card can be moved.
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
105
111
|
readOnly?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* On phones, a Swipe sideways or tap a column line under the column switcher.
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
106
116
|
swipeHint?: boolean;
|
|
117
|
+
/** The width of each column in px. */
|
|
107
118
|
columnWidth?: number;
|
|
119
|
+
/** The px taken off the viewport height when the board fills the screen, in place of the 240px default. */
|
|
108
120
|
fillOffset?: number;
|
|
121
|
+
/** The key of the card just added; it is highlighted until the next render. */
|
|
109
122
|
activeCardKey?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Stacked puts each stage name on its own line, with no tone dot.
|
|
125
|
+
* @default "inline"
|
|
126
|
+
*/
|
|
110
127
|
headLayout?: 'inline' | 'stacked';
|
|
128
|
+
/**
|
|
129
|
+
* From md up the board fits the screen and each column's cards scroll inside the column under its fixed head. Phones keep the one-column layout.
|
|
130
|
+
* @default false
|
|
131
|
+
*/
|
|
111
132
|
fill?: boolean;
|
|
133
|
+
/** Makes each column's summary the sum of its visible cards' values, in this format. The values come from a function in code. */
|
|
112
134
|
summaryFormat?: 'number' | 'currency' | 'compact';
|
|
135
|
+
/**
|
|
136
|
+
* The unit of the card values that summaryFormat adds up.
|
|
137
|
+
* @default "rupees"
|
|
138
|
+
*/
|
|
113
139
|
summaryUnit?: 'rupees' | 'paise';
|
|
140
|
+
/** Extra classes on the board. */
|
|
114
141
|
className?: string;
|
|
142
|
+
/** The board's id; the column, body and help ids derive from it. Generated when omitted. */
|
|
115
143
|
id?: string;
|
|
116
144
|
}): import("react").JSX.Element;
|
|
@@ -3,65 +3,95 @@
|
|
|
3
3
|
* Label, value, and an optional period-over-period delta.
|
|
4
4
|
*
|
|
5
5
|
* @param {object} props
|
|
6
|
-
* @param {string} props.label
|
|
7
|
-
* @param {import('react').ReactNode} props.value
|
|
8
|
-
* @param {import('react').ReactNode} [props.caption]
|
|
9
|
-
* @param {string|import('react').ReactNode} [props.icon]
|
|
10
|
-
* @param {'primary'|'success'|'warning'|'danger'|'info'|'neutral'} [props.iconTone]
|
|
11
|
-
* @param {'linear'|'outline'|'bold'|'bulk'|'broken'|'twotone'} [props.iconVariant
|
|
12
|
-
*
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {'
|
|
15
|
-
*
|
|
16
|
-
* @param {'
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @param {
|
|
20
|
-
* @param {
|
|
21
|
-
*
|
|
22
|
-
* spotlight (editorial feature tile — icon pinned top-right, large value, caption below).
|
|
23
|
-
* @param {'sm'|'md'|'lg'} [props.size='md'] Tile scale: sm (compact), md (default), lg (a hero
|
|
24
|
-
* tile with an enlarged value — for the single headline stat above a dashboard).
|
|
25
|
-
* @param {number} [props.valueSize] Custom value ("main heading") font-size in px. Overrides the
|
|
26
|
-
* size/variant default — use it to tame a too-large headline (e.g. the spotlight value).
|
|
27
|
-
* @param {boolean} [props.inline=false] Put the icon beside the text instead of above it.
|
|
28
|
-
* @param {boolean} [props.attention=false] Marks the tile as needing action (warning-tinted).
|
|
29
|
-
* @param {string} [props.href] Renders the whole tile as a link to this URL.
|
|
6
|
+
* @param {string} props.label
|
|
7
|
+
* @param {import('react').ReactNode} props.value
|
|
8
|
+
* @param {import('react').ReactNode} [props.caption]
|
|
9
|
+
* @param {string|import('react').ReactNode} [props.icon]
|
|
10
|
+
* @param {'primary'|'success'|'warning'|'danger'|'info'|'neutral'} [props.iconTone]
|
|
11
|
+
* @param {'linear'|'outline'|'bold'|'bulk'|'broken'|'twotone'} [props.iconVariant]
|
|
12
|
+
* @param {import('react').ReactNode} [props.delta]
|
|
13
|
+
* @param {'up'|'down'|'flat'} [props.deltaDirection]
|
|
14
|
+
* @param {'success'|'danger'|'neutral'} [props.deltaTone]
|
|
15
|
+
* @param {number[]} [props.sparkline]
|
|
16
|
+
* @param {'plain'|'filled'|'accent'|'spotlight'} [props.variant]
|
|
17
|
+
* @param {'sm'|'md'|'lg'} [props.size]
|
|
18
|
+
* @param {number} [props.valueSize]
|
|
19
|
+
* @param {boolean} [props.inline]
|
|
20
|
+
* @param {boolean} [props.attention]
|
|
21
|
+
* @param {string} [props.href]
|
|
30
22
|
* @param {import('react').ElementType} [props.linkComponent] Router link; receives `to` instead of `href`.
|
|
31
|
-
* @param {string} [props.className]
|
|
23
|
+
* @param {string} [props.className]
|
|
32
24
|
* @param {import('react').CSSProperties} [props.style] Inline style on the tile root; the
|
|
33
25
|
* `valueSize` var is merged into it.
|
|
34
|
-
* @param {string} [props.iconClassName]
|
|
35
|
-
* @param {string} [props.labelClassName]
|
|
36
|
-
* @param {string} [props.valueClassName]
|
|
37
|
-
* @param {string} [props.captionClassName]
|
|
38
|
-
* @param {string} [props.deltaClassName]
|
|
39
|
-
* @param {string} [props.sparklineClassName]
|
|
26
|
+
* @param {string} [props.iconClassName]
|
|
27
|
+
* @param {string} [props.labelClassName]
|
|
28
|
+
* @param {string} [props.valueClassName]
|
|
29
|
+
* @param {string} [props.captionClassName]
|
|
30
|
+
* @param {string} [props.deltaClassName]
|
|
31
|
+
* @param {string} [props.sparklineClassName]
|
|
40
32
|
*/
|
|
41
33
|
export default function AppKpiTile(props: {
|
|
34
|
+
/** What the number measures. */
|
|
42
35
|
label: string;
|
|
36
|
+
/** The number itself, already formatted. */
|
|
43
37
|
value: import('react').ReactNode;
|
|
38
|
+
/** A sub-line under the value, such as Total sent. */
|
|
44
39
|
caption?: import('react').ReactNode;
|
|
40
|
+
/** An icon name for the leading tile, or a custom node. */
|
|
45
41
|
icon?: string | import('react').ReactNode;
|
|
42
|
+
/** Tints the icon chip. */
|
|
46
43
|
iconTone?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
|
|
44
|
+
/**
|
|
45
|
+
* The icon style of a named icon; a node icon is drawn as given.
|
|
46
|
+
* @default "linear"
|
|
47
|
+
*/
|
|
47
48
|
iconVariant?: 'linear' | 'outline' | 'bold' | 'bulk' | 'broken' | 'twotone';
|
|
49
|
+
/** The change text, such as 12% vs last month. */
|
|
48
50
|
delta?: import('react').ReactNode;
|
|
51
|
+
/** Colours the delta and picks its arrow. Left out, it is read from a leading plus or minus sign on the delta and falls back to flat. */
|
|
49
52
|
deltaDirection?: 'up' | 'down' | 'flat';
|
|
53
|
+
/** The delta's colour, overriding the one its direction implies, for a figure where a rise is bad news such as refunds or cost. The arrow still follows the direction. */
|
|
50
54
|
deltaTone?: 'success' | 'danger' | 'neutral';
|
|
55
|
+
/** A trend series drawn as a small inline chart. */
|
|
51
56
|
sparkline?: number[];
|
|
57
|
+
/**
|
|
58
|
+
* The tile surface and layout: plain is a borderless tile, filled a subtle fill, accent a brand-tinted fill, spotlight a feature tile with the icon top right, a large value and the caption below.
|
|
59
|
+
* @default "plain"
|
|
60
|
+
*/
|
|
52
61
|
variant?: 'plain' | 'filled' | 'accent' | 'spotlight';
|
|
62
|
+
/**
|
|
63
|
+
* The tile scale: sm is compact, md the default, lg a hero tile with an enlarged value.
|
|
64
|
+
* @default "md"
|
|
65
|
+
*/
|
|
53
66
|
size?: 'sm' | 'md' | 'lg';
|
|
67
|
+
/** A custom value font size in px. It overrides the size and variant default, to tame a too-large headline. */
|
|
54
68
|
valueSize?: number;
|
|
69
|
+
/**
|
|
70
|
+
* Puts the icon beside the text instead of above it.
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
55
73
|
inline?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Marks the tile as needing action, with a warning tint.
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
56
78
|
attention?: boolean;
|
|
79
|
+
/** Renders the whole tile as a link to this address. */
|
|
57
80
|
href?: string;
|
|
58
81
|
linkComponent?: import('react').ElementType;
|
|
82
|
+
/** Extra classes on the tile root. */
|
|
59
83
|
className?: string;
|
|
60
84
|
style?: import('react').CSSProperties;
|
|
85
|
+
/** Extra classes on the icon chip. */
|
|
61
86
|
iconClassName?: string;
|
|
87
|
+
/** Extra classes on the label. */
|
|
62
88
|
labelClassName?: string;
|
|
89
|
+
/** Extra classes on the value. */
|
|
63
90
|
valueClassName?: string;
|
|
91
|
+
/** Extra classes on the caption. */
|
|
64
92
|
captionClassName?: string;
|
|
93
|
+
/** Extra classes on the delta. */
|
|
65
94
|
deltaClassName?: string;
|
|
95
|
+
/** Extra classes on the sparkline. */
|
|
66
96
|
sparklineClassName?: string;
|
|
67
97
|
}): import("react").JSX.Element;
|
|
@@ -12,18 +12,15 @@ import "@webority/ui-elements/elements/lightbox";
|
|
|
12
12
|
*
|
|
13
13
|
* @param {object} props
|
|
14
14
|
* @param {{ src: string, thumb?: string, alt?: string, caption?: string, name?: string, key?: string }[]} props.items
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* `name` the file name a download saves under (default: the last part of `src`).
|
|
18
|
-
* @param {boolean} [props.download=false] Shows a download action. A browser ignores `name` for an
|
|
19
|
-
* image on another origin.
|
|
20
|
-
* @param {string} [props.label="Image viewer"] The full-screen dialog's name for screen readers.
|
|
15
|
+
* @param {boolean} [props.download]
|
|
16
|
+
* @param {string} [props.label]
|
|
21
17
|
* @param {(index: number) => void} [props.onChange] Called with the position (from 0) of the
|
|
22
18
|
* image shown, when the view opens and each time it changes.
|
|
23
19
|
* @param {() => void} [props.onClose] Called when the full-screen view closes.
|
|
24
20
|
* @param {string} [props.className]
|
|
25
21
|
*/
|
|
26
22
|
export default function AppLightbox(props: {
|
|
23
|
+
/** The images, each opening full screen from its thumbnail. */
|
|
27
24
|
items: {
|
|
28
25
|
src: string;
|
|
29
26
|
thumb?: string;
|
|
@@ -32,9 +29,18 @@ export default function AppLightbox(props: {
|
|
|
32
29
|
name?: string;
|
|
33
30
|
key?: string;
|
|
34
31
|
}[];
|
|
32
|
+
/**
|
|
33
|
+
* Shows a download action. A browser ignores `name` for an image on another origin.
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
35
36
|
download?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The full-screen dialog's name for screen readers.
|
|
39
|
+
* @default "Image viewer"
|
|
40
|
+
*/
|
|
36
41
|
label?: string;
|
|
37
42
|
onChange?: (index: number) => void;
|
|
38
43
|
onClose?: () => void;
|
|
44
|
+
/** Extra classes on the gallery. */
|
|
39
45
|
className?: string;
|
|
40
46
|
}): import("react").JSX.Element;
|
|
@@ -12,36 +12,57 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @param {object} props
|
|
14
14
|
* @param {import('react').ReactNode} [props.children] Link text. Wins over `label` when both are given.
|
|
15
|
-
* @param {import('react').ReactNode} [props.label]
|
|
16
|
-
* @param {string} [props.href]
|
|
17
|
-
* @param {"underline"|"underline-center"|"static"|"slide"|"icon"|"highlight"|"bracket"|"fade"|"grow"|"glow"|"shine"|"none"} [props.animation
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* sweeps across the label), `none` (a plain coloured link, no underline, no motion).
|
|
25
|
-
* @param {string|import('react').ReactNode} [props.leftIcon=null] Leading glyph: a semantic icon name or a node.
|
|
26
|
-
* @param {string|import('react').ReactNode} [props.rightIcon=null] Trailing glyph: a semantic icon name or a node.
|
|
27
|
-
* @param {"sm"|"md"|"lg"} [props.size="md"] Text and icon size.
|
|
28
|
-
* @param {"default"|"dark"} [props.surface="default"] Set "dark" when the link sits on a dark panel, such as a dark hero or footer; the text turns light.
|
|
29
|
-
* @param {boolean} [props.external=false] Open in a new tab (adds `target` and `rel`).
|
|
30
|
-
* @param {boolean} [props.disabled=false] Render as unavailable (no navigation, `aria-disabled`).
|
|
15
|
+
* @param {import('react').ReactNode} [props.label]
|
|
16
|
+
* @param {string} [props.href]
|
|
17
|
+
* @param {"underline"|"underline-center"|"static"|"slide"|"icon"|"highlight"|"bracket"|"fade"|"grow"|"glow"|"shine"|"none"} [props.animation]
|
|
18
|
+
* @param {string|import('react').ReactNode} [props.leftIcon]
|
|
19
|
+
* @param {string|import('react').ReactNode} [props.rightIcon]
|
|
20
|
+
* @param {"sm"|"md"|"lg"} [props.size]
|
|
21
|
+
* @param {"default"|"dark"} [props.surface]
|
|
22
|
+
* @param {boolean} [props.external]
|
|
23
|
+
* @param {boolean} [props.disabled]
|
|
31
24
|
* @param {import('react').ElementType} [props.linkComponent] Router link component; it receives `to` instead of `href`. Keeps the library router-agnostic.
|
|
32
|
-
* @param {string} [props.className
|
|
25
|
+
* @param {string} [props.className]
|
|
33
26
|
*/
|
|
34
27
|
export default function AppLink(props: {
|
|
35
28
|
children?: import('react').ReactNode;
|
|
29
|
+
/** The link text as a prop, an alternative to children. When both are given, children wins. */
|
|
36
30
|
label?: import('react').ReactNode;
|
|
31
|
+
/** The destination, or the `to` path when a link component is given. Left out, the anchor has no href. */
|
|
37
32
|
href?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The hover treatment: underline slides a line in from the left, underline-center grows it from the middle, static is an always-visible underline with no motion, slide nudges the label and icons right, icon slides a trailing icon in (an arrow when none is given), highlight wipes a tinted background across, bracket slides brackets in around the label, fade shifts colour only, grow opens up the letter spacing, glow adds a soft glow, shine sweeps a light shimmer across the label, and none is a plain coloured link.
|
|
35
|
+
* @default "underline"
|
|
36
|
+
*/
|
|
38
37
|
animation?: "underline" | "underline-center" | "static" | "slide" | "icon" | "highlight" | "bracket" | "fade" | "grow" | "glow" | "shine" | "none";
|
|
38
|
+
/** The leading glyph: an icon name or a node. */
|
|
39
39
|
leftIcon?: string | import('react').ReactNode;
|
|
40
|
+
/** The trailing glyph: an icon name or a node. */
|
|
40
41
|
rightIcon?: string | import('react').ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* The text and icon size.
|
|
44
|
+
* @default "md"
|
|
45
|
+
*/
|
|
41
46
|
size?: "sm" | "md" | "lg";
|
|
47
|
+
/**
|
|
48
|
+
* Set dark when the link sits on a dark panel such as a dark hero or footer; the text turns light.
|
|
49
|
+
* @default "default"
|
|
50
|
+
*/
|
|
42
51
|
surface?: "default" | "dark";
|
|
52
|
+
/**
|
|
53
|
+
* Opens the link in a new tab, with the matching target and rel.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
43
56
|
external?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Renders the link as unavailable: no navigation, and aria-disabled is set.
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
44
61
|
disabled?: boolean;
|
|
45
62
|
linkComponent?: import('react').ElementType;
|
|
63
|
+
/**
|
|
64
|
+
* Extra classes on the anchor.
|
|
65
|
+
* @default ""
|
|
66
|
+
*/
|
|
46
67
|
className?: string;
|
|
47
68
|
}): import("react").JSX.Element;
|