@webority/ui-react 0.163.0 → 0.165.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/LICENSE +1 -1
- package/README.md +2 -2
- package/dist/canvas-kit/kit.js +212 -212
- package/dist/canvas-kit/manifest.json +1127 -389
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppAccountSwitcher.js +1 -1
- package/dist/components/AppAlert.js +1 -1
- package/dist/components/AppAsyncBlock.js +1 -1
- package/dist/components/AppBreadcrumbs.js +1 -1
- package/dist/components/AppButton.js +1 -1
- package/dist/components/AppCard.js +1 -1
- package/dist/components/AppChartCard.js +1 -1
- package/dist/components/AppChoiceChip.js +1 -1
- package/dist/components/AppCodeBlock.js +1 -1
- package/dist/components/AppColorField.js +1 -1
- package/dist/components/AppCommentThread.js +1 -1
- package/dist/components/AppContextMenu.js +1 -1
- package/dist/components/AppDataTable.js +1 -1
- package/dist/components/AppDatePicker.js +1 -1
- package/dist/components/AppDateRangePicker.js +1 -1
- package/dist/components/AppDescriptions.js +1 -1
- package/dist/components/AppDrawer.js +1 -1
- package/dist/components/AppDropZone.js +1 -1
- package/dist/components/AppDropdown.js +1 -1
- package/dist/components/AppDueDate.js +1 -1
- package/dist/components/AppEntryGrid.js +1 -0
- package/dist/components/AppFileAttachment.js +1 -1
- package/dist/components/AppFilePicker.js +1 -1
- package/dist/components/AppFileViewer.js +1 -1
- package/dist/components/AppFilterBar.js +1 -1
- package/dist/components/AppFloatingButton.js +1 -1
- package/dist/components/AppForm.js +1 -1
- package/dist/components/AppFormulaSteps.js +1 -0
- package/dist/components/AppHoverCard.js +1 -1
- package/dist/components/AppImagePicker.js +1 -1
- package/dist/components/AppInlineEdit.js +1 -1
- package/dist/components/AppInput.js +1 -1
- package/dist/components/AppMarkdown.js +1 -1
- package/dist/components/AppMentionInput.js +1 -1
- package/dist/components/AppMetricStrip.js +1 -1
- package/dist/components/AppModal.js +1 -1
- package/dist/components/AppNotificationCenter.js +1 -1
- package/dist/components/AppNumberInput.js +1 -1
- package/dist/components/AppOtpInput.js +1 -1
- package/dist/components/AppPageHeader.js +1 -1
- package/dist/components/AppPhoneNumberInput.js +1 -1
- package/dist/components/AppPopover.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/AppRowActions.js +1 -0
- package/dist/components/AppScoreScale.js +1 -1
- package/dist/components/AppSearch.js +1 -1
- package/dist/components/AppSectionFeatures.js +1 -1
- package/dist/components/AppSectionLogos.js +1 -1
- package/dist/components/AppSelect.js +1 -1
- package/dist/components/AppShell.js +1 -1
- package/dist/components/AppSlider.js +1 -1
- package/dist/components/AppSparkline.js +1 -1
- package/dist/components/AppTextarea.js +1 -1
- package/dist/components/AppThemeToggle.js +1 -1
- package/dist/components/AppTimePicker.js +1 -1
- package/dist/components/AppToast.js +1 -1
- package/dist/components/AppTooltip.js +1 -1
- package/dist/components/AppWhatsNew.js +1 -1
- package/dist/components/AppWorkspaceSwitcher.js +1 -1
- package/dist/components/warnUnknownProps.js +1 -1
- package/dist/guidance.json +216 -141
- package/dist/hookForm/index.js +1 -0
- package/dist/lib/CheckField.js +1 -1
- package/dist/lib/formFields.js +1 -0
- package/dist/lib/indianGrouping.js +1 -0
- package/dist/lib/unsavedText.js +1 -0
- package/dist/lib/useOverlayRoot.js +1 -0
- package/dist/types/components/AppAccordion.d.ts +1 -1
- package/dist/types/components/AppAlert.d.ts +1 -1
- package/dist/types/components/AppAsyncBlock.d.ts +3 -3
- package/dist/types/components/AppBreadcrumbs.d.ts +6 -0
- package/dist/types/components/AppCard.d.ts +1 -1
- package/dist/types/components/AppChart.d.ts +12 -4
- package/dist/types/components/AppChip.d.ts +2 -2
- package/dist/types/components/AppCodeBlock.d.ts +1 -1
- package/dist/types/components/AppCommandPalette.d.ts +2 -2
- package/dist/types/components/AppDataTable.d.ts +32 -3
- package/dist/types/components/AppDateRangePicker.d.ts +4 -0
- package/dist/types/components/AppDescriptions.d.ts +7 -1
- package/dist/types/components/AppDrawer.d.ts +1 -1
- package/dist/types/components/AppDropdown.d.ts +7 -7
- package/dist/types/components/AppEntryGrid.d.ts +122 -0
- package/dist/types/components/AppFilePicker.d.ts +1 -1
- package/dist/types/components/AppFilterBar.d.ts +12 -1
- package/dist/types/components/AppFloatingDock.d.ts +2 -2
- package/dist/types/components/AppForm.d.ts +18 -0
- package/dist/types/components/AppFormActions.d.ts +1 -1
- package/dist/types/components/AppFormSection.d.ts +1 -1
- package/dist/types/components/AppFormulaSteps.d.ts +64 -0
- package/dist/types/components/AppIcon.d.ts +2 -2
- package/dist/types/components/AppInfoTip.d.ts +1 -1
- package/dist/types/components/AppInlineEdit.d.ts +5 -0
- package/dist/types/components/AppKpiTile.d.ts +1 -1
- package/dist/types/components/AppMeter.d.ts +1 -1
- package/dist/types/components/AppMetricStrip.d.ts +5 -0
- package/dist/types/components/AppModal.d.ts +9 -4
- package/dist/types/components/AppNumberInput.d.ts +7 -0
- package/dist/types/components/AppPageHeader.d.ts +5 -0
- package/dist/types/components/AppPopover.d.ts +3 -3
- package/dist/types/components/AppRequiredMark.d.ts +1 -1
- package/dist/types/components/AppResourceCard.d.ts +1 -1
- package/dist/types/components/AppResult.d.ts +2 -2
- package/dist/types/components/AppRowActions.d.ts +40 -0
- package/dist/types/components/AppScrollbar.d.ts +1 -1
- package/dist/types/components/AppSectionFeatures.d.ts +5 -1
- package/dist/types/components/AppSectionLogos.d.ts +1 -0
- package/dist/types/components/AppShell.d.ts +8 -6
- package/dist/types/components/AppSlider.d.ts +5 -0
- package/dist/types/components/AppSparkline.d.ts +3 -0
- package/dist/types/components/AppSpinner.d.ts +2 -2
- package/dist/types/components/AppSplash.d.ts +2 -2
- package/dist/types/components/AppTabs.d.ts +3 -3
- package/dist/types/components/AppToast.d.ts +6 -1
- package/dist/types/components/AppToolbar.d.ts +5 -5
- package/dist/types/components/AppTooltip.d.ts +5 -5
- package/dist/types/components/AppWorkspaceSwitcher.d.ts +3 -3
- package/dist/types/components/toastStore.d.ts +2 -2
- package/dist/types/components/warnUnknownProps.d.ts +3 -3
- package/dist/types/hookForm/index.d.ts +14 -0
- package/dist/types/index.d.ts +8 -6
- package/dist/types/lib/CheckField.d.ts +1 -1
- package/dist/types/lib/FieldMessage.d.ts +1 -1
- package/dist/types/lib/FileItemRow.d.ts +1 -1
- package/dist/types/lib/fileItem.d.ts +3 -3
- package/dist/types/lib/formFields.d.ts +12 -0
- package/dist/types/lib/indianGrouping.d.ts +2 -0
- package/dist/types/lib/unsavedText.d.ts +5 -0
- package/dist/types/lib/useOverlayRoot.d.ts +2 -0
- package/dist/ui-react.js +1 -1
- package/dist/web-core/dist/errors/extractApiError.js +2 -0
- package/dist/web-core/dist/errors/requestPlatform.js +1 -0
- package/package.json +21 -10
- package/dist/components/AppResizable.js +0 -1
- package/dist/components/AppResizableHandle.js +0 -1
- package/dist/components/AppResizablePanel.js +0 -1
- package/dist/components/AppRollingNumber.js +0 -1
- package/dist/components/AppRowSwitch.js +0 -1
- package/dist/lib/FocusPanel.js +0 -1
- package/dist/lib/pageScrollLock.js +0 -1
- package/dist/types/components/AppResizable.d.ts +0 -37
- package/dist/types/components/AppResizableHandle.d.ts +0 -14
- package/dist/types/components/AppResizablePanel.d.ts +0 -14
- package/dist/types/components/AppRollingNumber.d.ts +0 -30
- package/dist/types/components/AppRowSwitch.d.ts +0 -18
- package/dist/types/lib/FocusPanel.d.ts +0 -11
- package/dist/types/lib/pageScrollLock.d.ts +0 -1
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { ComponentPropsWithoutRef, CSSProperties } from "react";
|
|
2
2
|
export type ChartType = "line" | "area" | "column" | "bar" | "donut" | "heatmap" | "calendar" | "funnel" | "gauge" | "waterfall" | "treemap" | "sankey" | "scatter" | "bubble" | "multiples";
|
|
3
3
|
export type ChartStack = "none" | "stacked" | "percent";
|
|
4
|
+
/** How a value prints. Every part is optional: a part left out reads as its default. */
|
|
5
|
+
export interface ChartFormat {
|
|
6
|
+
style?: "number" | "currency" | "percent" | "compact" | "duration" | "date" | undefined;
|
|
7
|
+
currency?: string | undefined;
|
|
8
|
+
unit?: "rupees" | "paise" | "ms" | "s" | "min" | "h" | undefined;
|
|
9
|
+
decimals?: number | undefined;
|
|
10
|
+
pattern?: "day" | "month" | "year" | "datetime" | "time" | undefined;
|
|
11
|
+
}
|
|
4
12
|
export type ChartState = "ready" | "loading" | "empty" | "error";
|
|
5
13
|
export type ChartRenderer = "auto" | "svg" | "canvas";
|
|
6
14
|
export type ChartView = "chart" | "table";
|
|
@@ -31,7 +39,7 @@ export interface AppChartProps extends Omit<ComponentPropsWithoutRef<"div">, "on
|
|
|
31
39
|
x: {
|
|
32
40
|
key: string;
|
|
33
41
|
kind?: "category" | "time" | "value" | undefined;
|
|
34
|
-
format?:
|
|
42
|
+
format?: ChartFormat | undefined;
|
|
35
43
|
label?: string | undefined;
|
|
36
44
|
labelFit?: "auto" | "all" | "rotate" | "ellipsis" | undefined;
|
|
37
45
|
};
|
|
@@ -39,7 +47,7 @@ export interface AppChartProps extends Omit<ComponentPropsWithoutRef<"div">, "on
|
|
|
39
47
|
series: {
|
|
40
48
|
key: string;
|
|
41
49
|
label: string;
|
|
42
|
-
format?:
|
|
50
|
+
format?: ChartFormat | undefined;
|
|
43
51
|
}[];
|
|
44
52
|
/** The second dimension: a heatmap's rows, a treemap's parents, a scatter or bubble's colour groups (at most 3). Required for a heatmap and a treemap. */
|
|
45
53
|
group?: {
|
|
@@ -55,7 +63,7 @@ export interface AppChartProps extends Omit<ComponentPropsWithoutRef<"div">, "on
|
|
|
55
63
|
size?: {
|
|
56
64
|
key: string;
|
|
57
65
|
label?: string | undefined;
|
|
58
|
-
format?:
|
|
66
|
+
format?: ChartFormat | undefined;
|
|
59
67
|
} | undefined;
|
|
60
68
|
/** A scatter or bubble's straight trend line through the visible points. */
|
|
61
69
|
trend?: boolean | undefined;
|
|
@@ -74,7 +82,7 @@ export interface AppChartProps extends Omit<ComponentPropsWithoutRef<"div">, "on
|
|
|
74
82
|
/** The one value axis. There is no second axis: show another measure as its own chart. */
|
|
75
83
|
y?: {
|
|
76
84
|
label?: string | undefined;
|
|
77
|
-
format?:
|
|
85
|
+
format?: ChartFormat | undefined;
|
|
78
86
|
min?: number | undefined;
|
|
79
87
|
max?: number | undefined;
|
|
80
88
|
wholeNumbers?: boolean | undefined;
|
|
@@ -45,9 +45,9 @@ export interface AppChipProps extends Omit<ComponentPropsWithoutRef<"span">, "on
|
|
|
45
45
|
className?: string | undefined;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* Token / tag chip
|
|
48
|
+
* Token / tag chip: a compact labelled token, optionally with a leading icon or
|
|
49
49
|
* avatar and a dismiss button. Distinct from `AppChoiceChip` (a *selectable* pill):
|
|
50
|
-
* `AppChip` is a *display / removable* token
|
|
50
|
+
* `AppChip` is a *display / removable* token: the thing a multi-select renders for
|
|
51
51
|
* each chosen value, a filter tag, or a removable label.
|
|
52
52
|
*
|
|
53
53
|
* Behaviour follows the props present:
|
|
@@ -6,7 +6,7 @@ export interface AppCodeBlockProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
6
6
|
* What to colour; `text` shows it as written.
|
|
7
7
|
* @default "text"
|
|
8
8
|
*/
|
|
9
|
-
language?: "text" | "json" | "js" | "cs" | "sql" | "bash" | "http" | "html" | "css" | undefined;
|
|
9
|
+
language?: "text" | "json" | "js" | "cs" | "sql" | "bash" | "http" | "html" | "razor" | "css" | undefined;
|
|
10
10
|
/**
|
|
11
11
|
* Number the lines. The numbers are not copied or selected.
|
|
12
12
|
* @default false
|
|
@@ -113,8 +113,8 @@ export interface AppCommandPaletteProps extends React.HTMLAttributes<HTMLElement
|
|
|
113
113
|
* App-wide "search and jump": a top-anchored dialog with a search input over a grouped list
|
|
114
114
|
* of results. Pair it with `useCommandPaletteShortcut` to open it on Ctrl+K / Cmd+K.
|
|
115
115
|
*
|
|
116
|
-
* The overlay is `AppModal`, so the backdrop, Escape
|
|
117
|
-
*
|
|
116
|
+
* The overlay is `AppModal`, so the backdrop, Escape and the close callback come from there; the
|
|
117
|
+
* browser's modal dialog keeps focus inside the palette and returns it on close. The list behaviour (the active
|
|
118
118
|
* result, ArrowUp / ArrowDown across groups with wrap-around, Enter, the pointer, scrolling the
|
|
119
119
|
* active result into view) is the shared `<wui-command-palette>` element, the same one the
|
|
120
120
|
* Razor `<app-command-palette>` uses.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef, type CSSProperties, type JSX, type ReactNode } from "react";
|
|
2
|
+
import type { AppLinkComponent } from "../lib/linkTarget.ts";
|
|
3
|
+
import { type AppRowActionEntry } from "./AppRowActions.tsx";
|
|
2
4
|
/** A row's identity as `rowKey` returns it. */
|
|
3
5
|
export type AppDataTableKey = string | number;
|
|
4
6
|
export type AppDataTableAlign = "end" | "num" | "center";
|
|
@@ -27,6 +29,8 @@ export interface AppDataTablePagination {
|
|
|
27
29
|
export interface AppDataTableColumn<Row> {
|
|
28
30
|
key: string;
|
|
29
31
|
label: ReactNode;
|
|
32
|
+
/** Help shown in an AppInfoTip beside the header label. */
|
|
33
|
+
help?: ReactNode | undefined;
|
|
30
34
|
sortable?: boolean | undefined;
|
|
31
35
|
align?: AppDataTableAlign | undefined;
|
|
32
36
|
width?: string | number | undefined;
|
|
@@ -58,6 +62,11 @@ export interface AppDataTableProps<Row> extends Omit<ComponentPropsWithoutRef<"d
|
|
|
58
62
|
* @default false
|
|
59
63
|
*/
|
|
60
64
|
loading?: boolean | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Keeps the current rows on screen, dimmed and marked busy, while new rows load. Has no effect with no rows; loading shows skeleton rows instead.
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
refreshing?: boolean | undefined;
|
|
61
70
|
/**
|
|
62
71
|
* How many skeleton rows to draw while loading.
|
|
63
72
|
* @default 5
|
|
@@ -72,7 +81,10 @@ export interface AppDataTableProps<Row> extends Omit<ComponentPropsWithoutRef<"d
|
|
|
72
81
|
emptyFiltered?: ReactNode | undefined;
|
|
73
82
|
/** The number of rows before filtering. 0 means the source is empty and empty shows; unset means the table was filtered. */
|
|
74
83
|
sourceCount?: number | undefined;
|
|
75
|
-
|
|
84
|
+
/** The row's actions as a list: icon buttons from sm up, one "more" menu below it. Leave an action out of the list to hide it for a row. */
|
|
85
|
+
rowActions?: ((row: Row) => readonly AppRowActionEntry[]) | undefined;
|
|
86
|
+
/** The product's router link, for actions that carry `to`. */
|
|
87
|
+
linkComponent?: AppLinkComponent | undefined;
|
|
76
88
|
/** The heading text of the trailing actions column. */
|
|
77
89
|
rowActionsLabel?: string | undefined;
|
|
78
90
|
/** 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. */
|
|
@@ -112,6 +124,8 @@ export interface AppDataTableProps<Row> extends Omit<ComponentPropsWithoutRef<"d
|
|
|
112
124
|
flush?: boolean | undefined;
|
|
113
125
|
/** The inset around the table, in px; the wrapper's 20px is the default and flush wins over it. */
|
|
114
126
|
pad?: number | undefined;
|
|
127
|
+
/** Lines a ledger name wraps to before it is cut, 1 to 4; the default is 2. A compact or virtual table shows one line. */
|
|
128
|
+
nameLines?: number | undefined;
|
|
115
129
|
/** The column header band's colour, a CSS colour or a $color token the Canvas renderer resolves. */
|
|
116
130
|
headerTone?: string | undefined;
|
|
117
131
|
/**
|
|
@@ -134,10 +148,20 @@ export interface AppDataTableProps<Row> extends Omit<ComponentPropsWithoutRef<"d
|
|
|
134
148
|
*/
|
|
135
149
|
stickyFirstColumn?: boolean | undefined;
|
|
136
150
|
/**
|
|
137
|
-
* Pins the last column, where rowActions
|
|
151
|
+
* Pins the last column, where the rowActions list renders, to the end edge while a wide table scrolls sideways, so a row's actions stay in view in a narrow box.
|
|
138
152
|
* @default false
|
|
139
153
|
*/
|
|
140
154
|
stickyActions?: boolean | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* Gives every labelled button in the row actions column the same width, so the column lines up from row to row. Icon-only actions are not widened.
|
|
157
|
+
* @default false
|
|
158
|
+
*/
|
|
159
|
+
equalActions?: boolean | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* Draws the first column's name as a link. Needs rowHref or onRowClick.
|
|
162
|
+
* @default false
|
|
163
|
+
*/
|
|
164
|
+
linkFirstColumn?: boolean | undefined;
|
|
141
165
|
/**
|
|
142
166
|
* Makes the whole row open this URL on click or Enter (Ctrl/Cmd or middle click opens a new tab).
|
|
143
167
|
* Checkboxes, buttons, links and menus in the row keep their own behaviour. Razor: `data-href` on the <tr>.
|
|
@@ -183,6 +207,11 @@ export interface AppDataTableProps<Row> extends Omit<ComponentPropsWithoutRef<"d
|
|
|
183
207
|
* beneath it.
|
|
184
208
|
*/
|
|
185
209
|
renderExpanded?: ((row: Row) => ReactNode) | undefined;
|
|
210
|
+
/**
|
|
211
|
+
* With renderExpanded, opening a row closes the one that was open, so at most one row is expanded.
|
|
212
|
+
* @default false
|
|
213
|
+
*/
|
|
214
|
+
singleExpand?: boolean | undefined;
|
|
186
215
|
/**
|
|
187
216
|
* 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.
|
|
188
217
|
* @default false
|
|
@@ -190,7 +219,7 @@ export interface AppDataTableProps<Row> extends Omit<ComponentPropsWithoutRef<"d
|
|
|
190
219
|
resizableColumns?: boolean | undefined;
|
|
191
220
|
/** Remembers resized widths in this browser under this name, the same name useTableView takes. */
|
|
192
221
|
viewKey?: string | undefined;
|
|
193
|
-
/** 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. */
|
|
222
|
+
/** 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. On a server-paged list each page's rows gather the same way, and the count is the rows on that page. */
|
|
194
223
|
groupBy?: string | undefined;
|
|
195
224
|
/** A group header's label; without it the value shows as a cell would. */
|
|
196
225
|
groupLabel?: ((value: unknown, rows: readonly Row[]) => ReactNode) | undefined;
|
|
@@ -19,6 +19,10 @@ export interface AppDateRangePickerProps extends Omit<React.HTMLAttributes<HTMLE
|
|
|
19
19
|
/** The starting end date of an uncontrolled field. */
|
|
20
20
|
defaultEnd?: string | undefined;
|
|
21
21
|
onChange?: ((range: DateRangeValue) => void) | undefined;
|
|
22
|
+
/** Opens (true) or closes (false) the calendar from outside. Pair it with onOpenChange; leave it unset for a field that opens itself. */
|
|
23
|
+
open?: boolean | undefined;
|
|
24
|
+
/** Called with the new state when the calendar opens or closes, from a click, Escape or an outside press. */
|
|
25
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
22
26
|
/** The field label, shown above the control and used as its accessible name. */
|
|
23
27
|
label?: React.ReactNode | undefined;
|
|
24
28
|
/** The content of the info-tip beside the label, opened by a button. */
|
|
@@ -7,6 +7,12 @@ interface AppDescriptionItemBase {
|
|
|
7
7
|
multiline?: boolean | undefined;
|
|
8
8
|
icon?: string | React.ReactNode | undefined;
|
|
9
9
|
href?: string | undefined;
|
|
10
|
+
/** Set on the item's root, so a link can jump to the row. */
|
|
11
|
+
id?: string | undefined;
|
|
12
|
+
/** Set on the item's root: 0 or -1 makes the row focusable. */
|
|
13
|
+
tabIndex?: number | undefined;
|
|
14
|
+
/** Any `data-*` attribute lands on the item's root. */
|
|
15
|
+
[attribute: `data-${string}`]: unknown;
|
|
10
16
|
}
|
|
11
17
|
/** A text label may leave `key` out (the row is keyed by its label); any other label needs a `key`, so the row's React key is never "[object Object]". */
|
|
12
18
|
export type AppDescriptionItem = AppDescriptionItemBase & ({
|
|
@@ -53,7 +59,7 @@ export interface AppDescriptionsProps extends Omit<React.ComponentPropsWithoutRe
|
|
|
53
59
|
className?: string | undefined;
|
|
54
60
|
}
|
|
55
61
|
/**
|
|
56
|
-
* A labeled key-value grid for displaying record details
|
|
62
|
+
* A labeled key-value grid for displaying record details, like an Ant "Descriptions" or
|
|
57
63
|
* a definition list. Renders a two-column (or single-column on small screens) grid of
|
|
58
64
|
* label/value pairs.
|
|
59
65
|
*
|
|
@@ -100,7 +100,7 @@ export interface AppDrawerProps {
|
|
|
100
100
|
* A panel over the page that is a side drawer from md up and a bottom sheet below it. The sheet
|
|
101
101
|
* rests on `snapPoints` (percent of the screen height), follows a finger on its handle or header,
|
|
102
102
|
* flicks to the next point and is dragged down to close; its handle is a vertical slider the arrow
|
|
103
|
-
* keys, Home and End also move. Focus moves in on open, Tab
|
|
103
|
+
* keys, Home and End also move. Focus moves in on open, Tab moves through the drawer, then on to the browser, without wrapping, Escape closes, and
|
|
104
104
|
* focus returns to what opened it. Controlled: set `open` and close it in `onClose`. Distinct from
|
|
105
105
|
* `AppModal`, which is a centred dialog on every screen. Wraps `<wui-drawer>`, which Razor
|
|
106
106
|
* `<app-drawer>` renders too. Place it where no ancestor has a transform, since it is fixed to the
|
|
@@ -18,8 +18,7 @@ export interface AppDropdownItem {
|
|
|
18
18
|
hiddenFrom?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
19
19
|
}
|
|
20
20
|
export interface AppDropdownOpenMeta {
|
|
21
|
-
source?:
|
|
22
|
-
originalEvent?: React.SyntheticEvent | Event | undefined;
|
|
21
|
+
source?: "trigger" | "select" | "dismiss" | "scroll" | "resize" | undefined;
|
|
23
22
|
}
|
|
24
23
|
export interface AppDropdownProps extends Omit<React.ComponentPropsWithoutRef<"div">, "onToggle" | "onSelect"> {
|
|
25
24
|
/** Name of the glyph on the toggle button. A custom trigger replaces it. */
|
|
@@ -72,7 +71,8 @@ export interface AppDropdownProps extends Omit<React.ComponentPropsWithoutRef<"d
|
|
|
72
71
|
noMatchText?: string | undefined;
|
|
73
72
|
}
|
|
74
73
|
/**
|
|
75
|
-
* Icon-triggered menu
|
|
74
|
+
* Icon-triggered menu over `<wui-dropdown>`, which owns the trigger, the placed menu, the arrow keys and the close on
|
|
75
|
+
* a pick, a scroll that moves the toggle, a window resize and a click outside.
|
|
76
76
|
*
|
|
77
77
|
* Decoupled from the router: menu items with a `to` render through `linkComponent`
|
|
78
78
|
* when provided (e.g. react-router's `Link`), otherwise a plain `<a href>`. The library
|
|
@@ -83,12 +83,12 @@ export interface AppDropdownProps extends Omit<React.ComponentPropsWithoutRef<"d
|
|
|
83
83
|
*
|
|
84
84
|
* `children` renders inside the menu INSTEAD of mapping `items`, for a panel that isn't a flat action list (an identity
|
|
85
85
|
* block, a form, mixed content). `items` and `children` are mutually exclusive; `children`
|
|
86
|
-
* wins when both are given. The icon toggle and
|
|
87
|
-
* focus and Escape behavior are unchanged either way.
|
|
86
|
+
* wins when both are given. The icon toggle and the menu's open, close, focus and Escape behaviour are the same either way.
|
|
88
87
|
*
|
|
89
88
|
* `onOpenChange` is called whenever the menu asks to open or close: a toggle click, an outside click, Escape, an item
|
|
90
|
-
* pick
|
|
91
|
-
*
|
|
89
|
+
* pick, and the close on a scroll that moves the toggle or a window resize (`source` "scroll" or "resize").
|
|
90
|
+
* Fires in both modes. The wrapper always answers the request itself: uncontrolled, it keeps the state; controlled, the
|
|
91
|
+
* caller sets `open` from `onOpenChange`.
|
|
92
92
|
*
|
|
93
93
|
* `searchable` puts a search box above the rows and filters them by label as the user types; it
|
|
94
94
|
* takes `items` only, not `children`. `searchPlaceholder` and `noMatchText` set its words and need `searchable`.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { type JSX, type ReactNode } from "react";
|
|
2
|
+
export type AppEntryGridRowStatus = "clean" | "dirty" | "saving" | "saved" | "failed";
|
|
3
|
+
export type AppEntryGridColumnKind = "text" | "number";
|
|
4
|
+
export interface AppEntryGridColumn<Row> {
|
|
5
|
+
key: string;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
/** "number" right-aligns the column and selects a focused input's text. Default "text". */
|
|
8
|
+
kind?: AppEntryGridColumnKind | undefined;
|
|
9
|
+
width?: string | number | undefined;
|
|
10
|
+
/** Help shown in an AppInfoTip beside the header label. */
|
|
11
|
+
help?: ReactNode | undefined;
|
|
12
|
+
/** Renders this column's cell of the sticky totals row. */
|
|
13
|
+
footer?: ((rows: readonly Row[]) => ReactNode) | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface AppEntryGridProps<Row> {
|
|
16
|
+
/** The columns, left to right, each with a key and a label, plus optional kind, width and help. */
|
|
17
|
+
columns: readonly AppEntryGridColumn<Row>[];
|
|
18
|
+
/** The row objects shown in the grid, one per line, in the order they appear. */
|
|
19
|
+
rows: readonly Row[];
|
|
20
|
+
rowKey: (row: Row) => string;
|
|
21
|
+
/** The key, as rowKey returns it, of the row the person is working on; that row is drawn as active. */
|
|
22
|
+
activeRowKey?: string | null | undefined;
|
|
23
|
+
onActiveRowChange?: ((rowKey: string) => void) | undefined;
|
|
24
|
+
renderCell: (row: Row, column: AppEntryGridColumn<Row>, isActive: boolean) => ReactNode;
|
|
25
|
+
rowState?: ((row: Row) => AppEntryGridRowStatus) | undefined;
|
|
26
|
+
/** The failure shown under a failed row (role alert). */
|
|
27
|
+
rowError?: ((row: Row) => ReactNode) | undefined;
|
|
28
|
+
onCommitRow?: ((row: Row, move: "next" | "stay") => void) | undefined;
|
|
29
|
+
onDiscardRow?: ((row: Row) => void) | undefined;
|
|
30
|
+
onAddRow?: (() => void) | undefined;
|
|
31
|
+
renderRowDetail?: ((row: Row) => ReactNode) | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Shows the keyboard legend under the grid.
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
hint?: boolean | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The accessible name of the table.
|
|
39
|
+
* @default "Entry lines"
|
|
40
|
+
*/
|
|
41
|
+
label?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The text of the button that adds an empty line at the end.
|
|
44
|
+
* @default "Add line"
|
|
45
|
+
*/
|
|
46
|
+
addLabel?: string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* The message shown when there are no rows.
|
|
49
|
+
* @default "No lines yet"
|
|
50
|
+
*/
|
|
51
|
+
emptyLabel?: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* The name of the status column, read by screen readers but not shown.
|
|
54
|
+
* @default "Status"
|
|
55
|
+
*/
|
|
56
|
+
statusLabel?: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* The status word for a line with changes not yet saved.
|
|
59
|
+
* @default "Changed"
|
|
60
|
+
*/
|
|
61
|
+
dirtyLabel?: string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* The status word for a line being saved.
|
|
64
|
+
* @default "Saving"
|
|
65
|
+
*/
|
|
66
|
+
savingLabel?: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* The status word for a line that was saved.
|
|
69
|
+
* @default "Saved"
|
|
70
|
+
*/
|
|
71
|
+
savedLabel?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* The status word for a line whose save failed.
|
|
74
|
+
* @default "Not saved"
|
|
75
|
+
*/
|
|
76
|
+
failedLabel?: string | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* The keyboard legend for Enter.
|
|
79
|
+
* @default "Save and go to the next line"
|
|
80
|
+
*/
|
|
81
|
+
commitNextLabel?: string | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* The keyboard legend for Ctrl and S.
|
|
84
|
+
* @default "Save"
|
|
85
|
+
*/
|
|
86
|
+
commitStayLabel?: string | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* The keyboard legend for Escape.
|
|
89
|
+
* @default "Discard changes"
|
|
90
|
+
*/
|
|
91
|
+
discardLabel?: string | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* The keyboard legend for Ctrl and the arrow keys.
|
|
94
|
+
* @default "Move between lines"
|
|
95
|
+
*/
|
|
96
|
+
moveLabel?: string | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Extra class names added to the grid's root element.
|
|
99
|
+
* @default ""
|
|
100
|
+
*/
|
|
101
|
+
className?: string | undefined;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* A keyboard-first grid for entering lines (an invoice, a stock count, a journal): one row is
|
|
105
|
+
* active, its cells are editable inputs the caller renders, and the keys work without the mouse.
|
|
106
|
+
*
|
|
107
|
+
* Enter save the active row and go to the next line (not in a textarea, a button or
|
|
108
|
+
* an open list, and never while an input method is composing)
|
|
109
|
+
* Ctrl+S / Meta+S save and stay on the row
|
|
110
|
+
* Esc discard the row's changes (not while a list is open: that closes the list)
|
|
111
|
+
* Ctrl+Up / Down move to the previous or next row
|
|
112
|
+
* Tab native order, field by field; never intercepted
|
|
113
|
+
*
|
|
114
|
+
* The grid reports intent and never moves on its own: after `onCommitRow(row, "next")` the caller
|
|
115
|
+
* saves, and only when the save succeeds sets `activeRowKey` to the next row. A failed row stays
|
|
116
|
+
* active and shows `rowError`. Focus follows `activeRowKey`, so the caller drives the cursor.
|
|
117
|
+
*
|
|
118
|
+
* Each row shows a status mark (changed, saving, saved, not saved); a column with `footer` adds a
|
|
119
|
+
* totals row. The keys and focus live in `<wui-entry-grid>`, the element the Razor `<app-entry-grid>`
|
|
120
|
+
* prints too; this component answers its events with the callbacks.
|
|
121
|
+
*/
|
|
122
|
+
export default function AppEntryGrid<Row>(props: AppEntryGridProps<Row>): JSX.Element;
|
|
@@ -141,7 +141,7 @@ export interface AppFilePickerMultipleProps extends AppFilePickerBaseProps {
|
|
|
141
141
|
}
|
|
142
142
|
export type AppFilePickerProps = AppFilePickerSingleProps | AppFilePickerMultipleProps;
|
|
143
143
|
/**
|
|
144
|
-
* File picker
|
|
144
|
+
* File picker: a drag-and-drop dropzone. In single mode it swaps to a large preview once a
|
|
145
145
|
* file is chosen (hover to change, × to remove). With `multiple`, the dropzone stays put and
|
|
146
146
|
* picked files stack in a list inside it, below the prompt (image thumbnail or file-type icon +
|
|
147
147
|
* name/size, each removable). Accepts freshly-picked Files or existing `{ url, name }` values; reports the
|
|
@@ -4,6 +4,8 @@ import { type AppDateRangePickerProps } from "./AppDateRangePicker.tsx";
|
|
|
4
4
|
export interface AppFilterOption {
|
|
5
5
|
value: string;
|
|
6
6
|
label: string;
|
|
7
|
+
count?: number | undefined;
|
|
8
|
+
icon?: string | undefined;
|
|
7
9
|
}
|
|
8
10
|
export interface AppFilterDateRange {
|
|
9
11
|
from: string;
|
|
@@ -25,11 +27,18 @@ export interface AppFilterBarProps extends Omit<ComponentPropsWithoutRef<"div">,
|
|
|
25
27
|
/** The current filters, keyed by facet key: a string, a list of strings, or a { from, to } date range. */
|
|
26
28
|
value: Readonly<Record<string, ListFilterValue>>;
|
|
27
29
|
onChange: (key: string, value: AppFilterValue) => void;
|
|
30
|
+
/** Called once per user action with every changed key and its new value: Clear all and Apply. Without it each key calls onChange. Use it when filters live in the page address, where one write per key overwrites the last. */
|
|
31
|
+
onChangeMany?: ((values: Record<string, AppFilterValue>) => void) | undefined;
|
|
28
32
|
/**
|
|
29
33
|
* How many facets stay in the row; the rest fold into the Filters button.
|
|
30
34
|
* @default 3
|
|
31
35
|
*/
|
|
32
36
|
inline?: number | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Draws each inline facet's label above its control. The folded Filters panel always shows labels.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
facetLabels?: boolean | undefined;
|
|
33
42
|
/**
|
|
34
43
|
* A floating panel: hover, click or F opens the facets in a non-modal panel under the Filters button, with a chip summary in the row.
|
|
35
44
|
* @default false
|
|
@@ -132,8 +141,10 @@ export interface AppFilterBarProps extends Omit<ComponentPropsWithoutRef<"div">,
|
|
|
132
141
|
* @param props.facets
|
|
133
142
|
* @param props.value
|
|
134
143
|
* @param props.onChange
|
|
135
|
-
* Called with the facet key and its new value.
|
|
144
|
+
* Called with the facet key and its new value.
|
|
145
|
+
* @param [props.onChangeMany] Called once per user action with every changed key and its new value: Clear all and Apply. Without it each key calls onChange. Use it when filters live in the page address, where one write per key overwrites the last.
|
|
136
146
|
* @param [props.inline]
|
|
147
|
+
* @param [props.facetLabels] Default false. Draws each inline facet's label above its control; the folded panel always shows labels.
|
|
137
148
|
* @param [props.floating]
|
|
138
149
|
* @param [props.apply]
|
|
139
150
|
* @param [props.size]
|
|
@@ -37,12 +37,12 @@ export interface AppFloatingDockProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
37
37
|
className?: string | undefined;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
* A macOS-style floating dock
|
|
40
|
+
* A macOS-style floating dock: a pill of icon links whose items magnify as the pointer
|
|
41
41
|
* approaches them. Marketing / landing-page chrome, not a replacement for `AppShell`
|
|
42
42
|
* primary navigation.
|
|
43
43
|
*
|
|
44
44
|
* Wraps the shared `<wui-dock>` element, which owns the pointer-tracking magnification
|
|
45
|
-
* and turns itself off on coarse pointers and under `prefers-reduced-motion
|
|
45
|
+
* and turns itself off on coarse pointers and under `prefers-reduced-motion`, so the
|
|
46
46
|
* dock is a plain, fully usable icon row wherever the effect would misbehave. Every item
|
|
47
47
|
* is a real link (or button) with an accessible name; the visible tooltip is decorative.
|
|
48
48
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UnsavedChangesGuard } from "@webority/web-core/router";
|
|
1
2
|
import { type ComponentPropsWithRef, type JSX, type ReactNode, type SubmitEvent } from "react";
|
|
2
3
|
export interface AppFormSubmitContext {
|
|
3
4
|
/** One key per send; a new one is made only after onSubmit returns true. */
|
|
@@ -12,6 +13,23 @@ export interface AppFormProps extends Omit<ComponentPropsWithRef<"form">, "onSub
|
|
|
12
13
|
*/
|
|
13
14
|
className?: string | undefined;
|
|
14
15
|
children?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Field name to message. A field inside the form with that name and no error of its own shows it; one no field claims is drawn at the top of the form.
|
|
18
|
+
* @default {}
|
|
19
|
+
*/
|
|
20
|
+
fieldErrors?: Readonly<Record<string, string>> | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Errors that name no field, drawn at the top of the form.
|
|
23
|
+
* @default []
|
|
24
|
+
*/
|
|
25
|
+
formErrors?: readonly string[] | undefined;
|
|
26
|
+
/** The guard from useUnsavedChanges (@webority/web-core/router); the form asks before a held navigation goes ahead. */
|
|
27
|
+
unsavedChanges?: UnsavedChangesGuard | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Replaces the question's message.
|
|
30
|
+
* @default "Your changes on this page are not saved. If you leave now, they are lost."
|
|
31
|
+
*/
|
|
32
|
+
unsavedChangesMessage?: string | undefined;
|
|
15
33
|
}
|
|
16
34
|
export interface FormSubmitState {
|
|
17
35
|
submitting: boolean;
|
|
@@ -18,7 +18,7 @@ export interface AppFormActionsProps extends ComponentPropsWithoutRef<"div"> {
|
|
|
18
18
|
className?: string | undefined;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Form action footer
|
|
21
|
+
* Form action footer: a sticky or inline controls row at a form's end.
|
|
22
22
|
*
|
|
23
23
|
* Typically holds submit/cancel buttons; can be fixed to the viewport bottom
|
|
24
24
|
* with a top border and surface background. Supports alignment: trailing
|
|
@@ -45,7 +45,7 @@ export interface AppFormSectionProps extends Omit<ComponentPropsWithoutRef<"sect
|
|
|
45
45
|
className?: string | undefined;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* Form section
|
|
48
|
+
* Form section: a logical group within a form, with an optional title and description.
|
|
49
49
|
*
|
|
50
50
|
* Wraps a set of related fields with a section heading and intro text. Useful for
|
|
51
51
|
* breaking large forms into digestible chunks. The body receives the fields; the
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, JSX } from "react";
|
|
2
|
+
export type AppFormulaSign = "plus" | "minus" | "times" | "divide" | "equal";
|
|
3
|
+
export interface AppFormulaStep {
|
|
4
|
+
key?: string | undefined;
|
|
5
|
+
/** The operator before this line; unset on the first line. "equal" marks a result line. */
|
|
6
|
+
sign?: AppFormulaSign | undefined;
|
|
7
|
+
label: string;
|
|
8
|
+
/** The working in words and numbers, such as "0.1% of ₹10,00,000.00, rounded to the rupee". */
|
|
9
|
+
working?: string | undefined;
|
|
10
|
+
/** The line's figure, already formatted. */
|
|
11
|
+
result: string;
|
|
12
|
+
note?: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface AppFormulaStepsProps extends ComponentPropsWithoutRef<"ol"> {
|
|
15
|
+
/**
|
|
16
|
+
* The lines of the calculation, top to bottom. The first line has no sign; each later line names its operator.
|
|
17
|
+
* @default []
|
|
18
|
+
*/
|
|
19
|
+
steps?: AppFormulaStep[] | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The accessible name of the list.
|
|
22
|
+
* @default "Calculation"
|
|
23
|
+
*/
|
|
24
|
+
label?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The word a plus line is read as. Replaces the built-in English text, for other languages.
|
|
27
|
+
* @default "plus"
|
|
28
|
+
*/
|
|
29
|
+
plusLabel?: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* The word a minus line is read as. Replaces the built-in English text, for other languages.
|
|
32
|
+
* @default "minus"
|
|
33
|
+
*/
|
|
34
|
+
minusLabel?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The word a times line is read as. Replaces the built-in English text, for other languages.
|
|
37
|
+
* @default "times"
|
|
38
|
+
*/
|
|
39
|
+
timesLabel?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* The word a divide line is read as. Replaces the built-in English text, for other languages.
|
|
42
|
+
* @default "divided by"
|
|
43
|
+
*/
|
|
44
|
+
divideLabel?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The word an equal line is read as. Replaces the built-in English text, for other languages.
|
|
47
|
+
* @default "equals"
|
|
48
|
+
*/
|
|
49
|
+
equalLabel?: string | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Extra class names added to the list's root element.
|
|
52
|
+
* @default ""
|
|
53
|
+
*/
|
|
54
|
+
className?: string | undefined;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A figure worked out one line at a time: each line applies an operator to the running
|
|
58
|
+
* total, shows its working and its figure, and the line marked `equal` is the result.
|
|
59
|
+
*
|
|
60
|
+
* The operator is drawn as a glyph hidden from assistive tech, with its word read
|
|
61
|
+
* in its place, so a screen reader hears "minus TDS" rather than a bare symbol. A
|
|
62
|
+
* line with no `sign` (the first) keeps an empty sign column so the figures align.
|
|
63
|
+
*/
|
|
64
|
+
export default function AppFormulaSteps(props: AppFormulaStepsProps): JSX.Element;
|
|
@@ -8,7 +8,7 @@ export type IconRenderer = (props: {
|
|
|
8
8
|
style?: CSSProperties | undefined;
|
|
9
9
|
}) => ReactNode;
|
|
10
10
|
/**
|
|
11
|
-
* Register product-specific glyphs
|
|
11
|
+
* Register product-specific glyphs. Call once at app init, before first render. Each value is a
|
|
12
12
|
* render function `({ size, color, className, style }) => ReactNode` that returns your own glyph
|
|
13
13
|
* applied to those props. A registered name wins over the built-in iconsax resolution; every
|
|
14
14
|
* unregistered name still resolves to the generated iconsax glyph.
|
|
@@ -38,7 +38,7 @@ export interface AppIconProps extends Omit<ComponentPropsWithoutRef<"svg">, "cla
|
|
|
38
38
|
style?: CSSProperties | undefined;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
-
* The library's icon component
|
|
41
|
+
* The library's icon component: iconsax (Linear) glyphs, keyed by the semantic
|
|
42
42
|
* kebab-case names in scripts/icon-map.json: <AppIcon name="file-text" />. Renders inline
|
|
43
43
|
* SVG (24x24 viewBox, currentColor) with data-icon={name} so CSS can target a specific
|
|
44
44
|
* glyph. `size` maps to width/height; `color` to the icon colour.
|
|
@@ -21,7 +21,7 @@ export interface AppInfoTipProps {
|
|
|
21
21
|
className?: string | undefined;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Generic info popover beside a field label, the same
|
|
24
|
+
* Generic info popover beside a field label, the same popover element the Razor app-info-tip renders.
|
|
25
25
|
*
|
|
26
26
|
* A small "?" trigger opens the popover on hover or focus. A glossary-backed tip wraps this and
|
|
27
27
|
* passes the looked-up entry as children, so the glossary never enters the shared library.
|
|
@@ -34,6 +34,11 @@ export interface AppInlineEditProps {
|
|
|
34
34
|
* value is a button, so it must not hold its own controls or links.
|
|
35
35
|
*/
|
|
36
36
|
renderValue?: ((value: InlineEditValue) => ReactNode) | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Digit grouping of a number at rest: indian shows 15,00,000, none shows 1500000.
|
|
39
|
+
* @default "none"
|
|
40
|
+
*/
|
|
41
|
+
grouping?: "none" | "indian" | undefined;
|
|
37
42
|
/**
|
|
38
43
|
* Wraps a long value across lines. false keeps it on one line, and a newline in a textarea value reads as a space.
|
|
39
44
|
* @default true
|
|
@@ -94,7 +94,7 @@ export interface AppKpiTileProps extends Omit<HTMLAttributes<HTMLElement>, "clas
|
|
|
94
94
|
sparklineClassName?: string | undefined;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
-
* A single headline number
|
|
97
|
+
* A single headline number: a dashboard stat, a summary figure above a table.
|
|
98
98
|
* Label, value, and an optional period-over-period delta.
|
|
99
99
|
*
|
|
100
100
|
* @param linkComponent Router link; receives `to` instead of `href`.
|
|
@@ -52,7 +52,7 @@ export interface AppMeterProps extends Omit<React.ComponentPropsWithoutRef<"div"
|
|
|
52
52
|
className?: string | undefined;
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* A meter
|
|
55
|
+
* A meter: a scalar measurement within a known range (disk usage, a score, remaining quota).
|
|
56
56
|
* Unlike AppProgress (a task advancing over time) this is `role="meter"`; given `low`/`high`
|
|
57
57
|
* thresholds it auto-tones green/amber/red by which end is `optimum`. It shares AppProgress's
|
|
58
58
|
* bar, and renders identically to the Razor `<app-meter>`.
|
|
@@ -25,6 +25,11 @@ export interface AppMetricStripProps extends Omit<React.ComponentPropsWithoutRef
|
|
|
25
25
|
* @default "md"
|
|
26
26
|
*/
|
|
27
27
|
size?: (typeof SIZES)[number] | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Draws the strip as one flush row with a rule between figures from the medium breakpoint up, for a strip inside a flush card.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
divided?: boolean | undefined;
|
|
28
33
|
/** Router link (e.g. react-router Link) for in-app destinations; it receives `to` instead of `href`. Absolute, `#` and scheme hrefs stay plain anchors. Keeps the library router-agnostic. */
|
|
29
34
|
linkComponent?: AppLinkComponent | undefined;
|
|
30
35
|
className?: string | undefined;
|