@webority/ui-react 0.7.4 → 0.7.5
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/types/components/AppBanner.d.ts +22 -0
- package/dist/types/components/AppBreadcrumbs.d.ts +28 -0
- package/dist/types/components/AppCheckbox.d.ts +1 -1
- package/dist/types/components/AppConfirmDialog.d.ts +1 -1
- package/dist/types/components/AppMeter.d.ts +32 -0
- package/dist/types/components/AppModal.d.ts +1 -1
- package/dist/types/components/AppProgress.d.ts +29 -0
- package/dist/types/components/AppTablePagination.d.ts +2 -3
- package/dist/types/index.d.ts +4 -0
- package/dist/ui-react.js +596 -465
- package/package.json +3 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A page/system-level announcement bar — a full-width strip for a message that applies to the
|
|
3
|
+
* whole screen or app (scheduled maintenance, a trial ending, a new version). It sits apart
|
|
4
|
+
* from the other status surfaces: `AppAlert` is an inline message about one section, and a
|
|
5
|
+
* toast is a transient pop; a banner is persistent, full-bleed, and page-scoped.
|
|
6
|
+
*
|
|
7
|
+
* @param {object} props
|
|
8
|
+
* @param {'info'|'success'|'warning'|'danger'|'neutral'} [props.tone='info'] The banner's colour/intent.
|
|
9
|
+
* @param {string|import('react').ReactNode} [props.icon] A leading icon — a glyph name or a node.
|
|
10
|
+
* @param {import('react').ReactNode} props.children The message; may include an inline action link.
|
|
11
|
+
* @param {boolean} [props.dismissible=false] Show a close button that removes the banner.
|
|
12
|
+
* @param {() => void} [props.onDismiss] Called after the banner is dismissed.
|
|
13
|
+
* @param {string} [props.className]
|
|
14
|
+
*/
|
|
15
|
+
export default function AppBanner({ tone, icon, children, dismissible, onDismiss, className, ...rest }: {
|
|
16
|
+
tone?: 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
17
|
+
icon?: string | import('react').ReactNode;
|
|
18
|
+
children: import('react').ReactNode;
|
|
19
|
+
dismissible?: boolean;
|
|
20
|
+
onDismiss?: () => void;
|
|
21
|
+
className?: string;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A breadcrumb trail — the path from a root to the current page. The last item is the
|
|
3
|
+
* current page: rendered as text with `aria-current="page"`, never a link. Wraps
|
|
4
|
+
* react-bootstrap's Breadcrumb (Bootstrap `.breadcrumb`), so React and the Razor
|
|
5
|
+
* `<app-breadcrumbs>` render the same markup.
|
|
6
|
+
*
|
|
7
|
+
* Router-decoupled like AppDropdown: an item with `to` renders through `linkComponent`
|
|
8
|
+
* (react-router's `Link`) when one is provided, otherwise a plain `<a href>`. The library
|
|
9
|
+
* never imports a router.
|
|
10
|
+
*
|
|
11
|
+
* @param {object} props
|
|
12
|
+
* @param {{ key?: string, label: string, href?: string, to?: string,
|
|
13
|
+
* icon?: string|import('react').ReactNode }[]} props.items The trail, root first, current
|
|
14
|
+
* page last. An item links when it has `href`/`to` and is not the last one.
|
|
15
|
+
* @param {import('react').ElementType} [props.linkComponent] Component for `to` items (e.g. Link).
|
|
16
|
+
* @param {string} [props.className]
|
|
17
|
+
*/
|
|
18
|
+
export default function AppBreadcrumbs({ items, linkComponent, className, ...rest }: {
|
|
19
|
+
items: {
|
|
20
|
+
key?: string;
|
|
21
|
+
label: string;
|
|
22
|
+
href?: string;
|
|
23
|
+
to?: string;
|
|
24
|
+
icon?: string | import('react').ReactNode;
|
|
25
|
+
}[];
|
|
26
|
+
linkComponent?: import('react').ElementType;
|
|
27
|
+
className?: string;
|
|
28
|
+
}): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared checkbox on Bootstrap `.form-check` markup (Razor <app-checkbox> matches).
|
|
3
3
|
* Theme restyles `.form-check-input` as the one selection glyph; table row-select
|
|
4
|
-
* uses the `.wui-check` alias of the same skin
|
|
4
|
+
* uses the `.wui-check` alias of the same skin.
|
|
5
5
|
*
|
|
6
6
|
* The label is bound with id/htmlFor rather than react-bootstrap's `label` prop:
|
|
7
7
|
* that rendered a <label> with no `for`, so clicking the text did nothing.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* disables Cancel and the confirm-phrase field, and blocks dismissal via the backdrop,
|
|
17
17
|
* Escape, and onClose while the async action is in flight.
|
|
18
18
|
* @param {boolean} [props.staticBackdrop=false] Forwarded to AppModal — when true, backdrop
|
|
19
|
-
* click and Escape no longer close the dialog
|
|
19
|
+
* click and Escape no longer close the dialog.
|
|
20
20
|
* @param {'center'|'top'} [props.placement='center'] Vertical placement of the card,
|
|
21
21
|
* forwarded to AppModal — centred (default) or pinned near the top.
|
|
22
22
|
*/
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A meter — a scalar measurement within a known range (disk usage, a score, remaining quota).
|
|
3
|
+
* Unlike AppProgress (a task advancing over time) this is `role="meter"`; given `low`/`high`
|
|
4
|
+
* thresholds it auto-tones green/amber/red by which end is `optimum`. It shares AppProgress's
|
|
5
|
+
* bar, and renders identically to the Razor `<app-meter>`.
|
|
6
|
+
*
|
|
7
|
+
* @param {object} props
|
|
8
|
+
* @param {number} props.value The measurement (min…max); clamped into range.
|
|
9
|
+
* @param {number} [props.min=0]
|
|
10
|
+
* @param {number} [props.max=100]
|
|
11
|
+
* @param {'info'|'success'|'warning'|'danger'|'neutral'} [props.tone='info'] Fallback fill when no thresholds.
|
|
12
|
+
* @param {'high'|'low'} [props.optimum='high'] Which end is good — `high` = bigger is better.
|
|
13
|
+
* @param {number} [props.low] At-or-below this value is the low zone.
|
|
14
|
+
* @param {number} [props.high] At-or-above this value is the high zone.
|
|
15
|
+
* @param {'sm'|'md'} [props.size='md'] Bar thickness.
|
|
16
|
+
* @param {string} [props.label] Accessible name; also shown in the bar when `showLabel`.
|
|
17
|
+
* @param {boolean} [props.showLabel=false]
|
|
18
|
+
* @param {string} [props.className]
|
|
19
|
+
*/
|
|
20
|
+
export default function AppMeter({ value, min, max, tone, optimum, low, high, size, label, showLabel, className, ...rest }: {
|
|
21
|
+
value: number;
|
|
22
|
+
min?: number;
|
|
23
|
+
max?: number;
|
|
24
|
+
tone?: 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
25
|
+
optimum?: 'high' | 'low';
|
|
26
|
+
low?: number;
|
|
27
|
+
high?: number;
|
|
28
|
+
size?: 'sm' | 'md';
|
|
29
|
+
label?: string;
|
|
30
|
+
showLabel?: boolean;
|
|
31
|
+
className?: string;
|
|
32
|
+
}): import("react").JSX.Element;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* centred (default) or pinned near the top of the viewport.
|
|
20
20
|
* @param {boolean} [props.hideHeader=false]
|
|
21
21
|
* @param {boolean} [props.staticBackdrop=false] When true, the backdrop click and Escape
|
|
22
|
-
* key no longer close the dialog — only an explicit close action can
|
|
22
|
+
* key no longer close the dialog — only an explicit close action can.
|
|
23
23
|
* @param {string} [props.className] Extra classes on the modal card.
|
|
24
24
|
* @param {import('react').ReactNode} props.children
|
|
25
25
|
*/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A determinate progress bar — a task's completion from 0 to `max`. For an indeterminate
|
|
3
|
+
* "working…" state pass `indeterminate` (an animated sweep, no value). Renders Bootstrap
|
|
4
|
+
* `.progress` markup with a brand-toned fill, identical to the Razor `<app-progress>`.
|
|
5
|
+
*
|
|
6
|
+
* @param {object} props
|
|
7
|
+
* @param {number} props.value Current amount (0…max); clamped into range. Ignored when `indeterminate`.
|
|
8
|
+
* @param {number} [props.max=100]
|
|
9
|
+
* @param {'info'|'success'|'warning'|'danger'|'neutral'} [props.tone='info'] Fill colour.
|
|
10
|
+
* @param {'sm'|'md'} [props.size='md'] Bar thickness — sm is a thin 4px bar for inline/table use.
|
|
11
|
+
* @param {string} [props.label] Accessible name for the bar; also shown inside it when `showLabel`.
|
|
12
|
+
* @param {boolean} [props.showLabel=false] Render the label text inside the bar (ignored when indeterminate).
|
|
13
|
+
* @param {boolean} [props.striped=false] Diagonal stripe overlay.
|
|
14
|
+
* @param {boolean} [props.animated=false] Animate the stripes (implies striped).
|
|
15
|
+
* @param {boolean} [props.indeterminate=false] Unknown-duration sweep; drops the value/label.
|
|
16
|
+
* @param {string} [props.className]
|
|
17
|
+
*/
|
|
18
|
+
export default function AppProgress({ value, max, tone, size, label, showLabel, striped, animated, indeterminate, className, ...rest }: {
|
|
19
|
+
value: number;
|
|
20
|
+
max?: number;
|
|
21
|
+
tone?: 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
22
|
+
size?: 'sm' | 'md';
|
|
23
|
+
label?: string;
|
|
24
|
+
showLabel?: boolean;
|
|
25
|
+
striped?: boolean;
|
|
26
|
+
animated?: boolean;
|
|
27
|
+
indeterminate?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pagination footer under a .table. Pair with usePagination.
|
|
3
3
|
*
|
|
4
|
-
* `page` is ONE-BASED, matching `<app-table-pagination page="…">`
|
|
5
|
-
* contract in react.md ("request `page` (1-based)"). It used to be zero-based here while
|
|
4
|
+
* `page` is ONE-BASED, matching `<app-table-pagination page="…">` (the shared 1-based pagination contract). It used to be zero-based here while
|
|
6
5
|
* Razor's was one-based — the same prop name meaning different things on the two surfaces,
|
|
7
6
|
* which no name-level check can see. `pageCount` is likewise now `totalPages`, the name
|
|
8
|
-
* Razor and the
|
|
7
|
+
* Razor and the shared response shape already use.
|
|
9
8
|
*
|
|
10
9
|
* @param {object} props
|
|
11
10
|
* @param {number} props.page 1-based.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export { default as AppAsyncBlock } from './components/AppAsyncBlock.jsx';
|
|
|
5
5
|
export { default as AppAutocomplete } from './components/AppAutocomplete.jsx';
|
|
6
6
|
export { default as AppAvatar } from './components/AppAvatar.jsx';
|
|
7
7
|
export { default as AppBadge } from './components/AppBadge.jsx';
|
|
8
|
+
export { default as AppBanner } from './components/AppBanner.jsx';
|
|
9
|
+
export { default as AppBreadcrumbs } from './components/AppBreadcrumbs.jsx';
|
|
8
10
|
export { default as AppButton } from './components/AppButton.jsx';
|
|
9
11
|
export { default as AppCallout } from './components/AppCallout.jsx';
|
|
10
12
|
export { default as AppCard } from './components/AppCard.jsx';
|
|
@@ -27,6 +29,7 @@ export { default as AppInfoTip } from './components/AppInfoTip.jsx';
|
|
|
27
29
|
export { default as AppInput } from './components/AppInput.jsx';
|
|
28
30
|
export { default as AppKpiTile } from './components/AppKpiTile.jsx';
|
|
29
31
|
export { default as AppLogoPicker } from './components/AppLogoPicker.jsx';
|
|
32
|
+
export { default as AppMeter } from './components/AppMeter.jsx';
|
|
30
33
|
export { default as AppModal } from './components/AppModal.jsx';
|
|
31
34
|
export { default as AppMultiSelect } from './components/AppMultiSelect.jsx';
|
|
32
35
|
export { default as AppOtpInput } from './components/AppOtpInput.jsx';
|
|
@@ -34,6 +37,7 @@ export { default as AppPageHeader } from './components/AppPageHeader.jsx';
|
|
|
34
37
|
export { default as AppPhoneNumberInput } from './components/AppPhoneNumberInput.jsx';
|
|
35
38
|
export { default as AppPopover } from './components/AppPopover.jsx';
|
|
36
39
|
export { default as AppPricingCard } from './components/AppPricingCard.jsx';
|
|
40
|
+
export { default as AppProgress } from './components/AppProgress.jsx';
|
|
37
41
|
export { default as AppRadio } from './components/AppRadio.jsx';
|
|
38
42
|
export { default as AppRepeater } from './components/AppRepeater.jsx';
|
|
39
43
|
export { default as AppResourceCard } from './components/AppResourceCard.jsx';
|