@webority/ui-react 0.7.0 → 0.7.2

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.
Files changed (32) hide show
  1. package/dist/types/components/AppAsyncBlock.d.ts +32 -0
  2. package/dist/types/components/AppAutocomplete.d.ts +12 -3
  3. package/dist/types/components/AppCheckbox.d.ts +2 -0
  4. package/dist/types/components/AppChip.d.ts +1 -1
  5. package/dist/types/components/AppConfirmDialog.d.ts +11 -1
  6. package/dist/types/components/AppDataTable.d.ts +2 -2
  7. package/dist/types/components/AppDropdown.d.ts +2 -1
  8. package/dist/types/components/AppEmptyState.d.ts +1 -1
  9. package/dist/types/components/AppFileAttachment.d.ts +19 -11
  10. package/dist/types/components/AppFilePicker.d.ts +23 -8
  11. package/dist/types/components/AppInfoTip.d.ts +2 -1
  12. package/dist/types/components/AppKpiTile.d.ts +4 -1
  13. package/dist/types/components/AppLogoPicker.d.ts +19 -22
  14. package/dist/types/components/AppModal.d.ts +20 -13
  15. package/dist/types/components/AppRadio.d.ts +2 -0
  16. package/dist/types/components/AppScrollbar.d.ts +22 -0
  17. package/dist/types/components/AppSegmented.d.ts +5 -1
  18. package/dist/types/components/AppSelect.d.ts +4 -1
  19. package/dist/types/components/AppShell.d.ts +43 -10
  20. package/dist/types/components/AppSidebarMenu.d.ts +2 -1
  21. package/dist/types/components/AppSpinner.d.ts +15 -3
  22. package/dist/types/components/AppSplash.d.ts +30 -6
  23. package/dist/types/components/AppSwitch.d.ts +2 -0
  24. package/dist/types/components/AppTablePagination.d.ts +5 -1
  25. package/dist/types/components/AppTabs.d.ts +6 -1
  26. package/dist/types/components/AppToastContainer.d.ts +13 -0
  27. package/dist/types/components/Icon.d.ts +15 -1
  28. package/dist/types/components/toastStore.d.ts +9 -0
  29. package/dist/types/index.d.ts +4 -1
  30. package/dist/types/lib/pageWindow.d.ts +10 -0
  31. package/dist/ui-react.js +1605 -1015
  32. package/package.json +4 -5
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The loading / error / empty / content switcher every screen that fetches data needs
3
+ * (react.md's "Shared AsyncBlock"). React-only by design: Razor is server-rendered, so a
4
+ * page model already knows whether it has data by the time it renders — there is no
5
+ * client-side loading/error state to switch on, and so no `<app-async-block>` counterpart.
6
+ *
7
+ * Precedence is fixed: `loading` wins over everything, then `error`, then `empty`, then
8
+ * `children`. A fetch that is simultaneously loading and holding a stale error only shows
9
+ * the loading state, which is the least surprising reading of "still in flight".
10
+ *
11
+ * @param {object} props
12
+ * @param {boolean} [props.loading=false] Show the skeleton (or spinner) instead of content.
13
+ * @param {string|import('react').ReactNode} [props.error] An error to show in place of content.
14
+ * Falsy (including `null`/`undefined`) means no error.
15
+ * @param {boolean} [props.empty=false] Show the empty state instead of content — the fetch
16
+ * succeeded with nothing to display.
17
+ * @param {import('react').ReactNode} props.children Real content, shown once loaded,
18
+ * error-free and non-empty.
19
+ * @param {() => void} [props.onRetry] Shown as a Retry button on the error state when set.
20
+ * @param {import('react').ReactNode} [props.skeleton] Loading placeholder shaped like the
21
+ * content. Falls back to a centered `AppSpinner` when omitted.
22
+ * @param {string} [props.className] Extra classes on the wrapper.
23
+ */
24
+ export default function AppAsyncBlock({ loading, error, empty, children, onRetry, skeleton, className, ...rest }: {
25
+ loading?: boolean;
26
+ error?: string | import('react').ReactNode;
27
+ empty?: boolean;
28
+ children: import('react').ReactNode;
29
+ onRetry?: () => void;
30
+ skeleton?: import('react').ReactNode;
31
+ className?: string;
32
+ }): import("react").JSX.Element;
@@ -10,7 +10,9 @@ import '@webority/ui-elements';
10
10
  *
11
11
  * @param {object} props
12
12
  * @param {string} [props.value] Selected option value.
13
- * @param {(value: string) => void} [props.onChange]
13
+ * @param {(value: string, meta?: { isCustom: boolean }) => void} [props.onChange] The second
14
+ * argument reports whether the commit was a freeform entry (`allowCustom`) rather than a
15
+ * listed option — existing callers reading only the first argument are unaffected.
14
16
  * @param {{value: string, label: string}[]} [props.options] Static options.
15
17
  * @param {(query: string) => Promise<{value: string, label: string}[]>} [props.loadOptions] Remote loader.
16
18
  * @param {string} [props.placeholder]
@@ -18,6 +20,10 @@ import '@webority/ui-elements';
18
20
  * @param {number} [props.debounce] Debounce ms for remote search (default 250).
19
21
  * @param {boolean} [props.disabled]
20
22
  * @param {'sm'|'lg'} [props.size] Control size around the default.
23
+ * @param {boolean} [props.allowCustom] When the typed text matches no option and the user
24
+ * commits (Enter, or blur with text), offers it as its own selectable "Add "…"" row and,
25
+ * once picked, commits that raw text as the value with `onChange`'s second argument
26
+ * reporting `{ isCustom: true }`.
21
27
  * @param {string} [props.name]
22
28
  * @param {import('react').ReactNode} [props.label]
23
29
  * @param {string} [props.error]
@@ -25,9 +31,11 @@ import '@webority/ui-elements';
25
31
  * @param {boolean} [props.required]
26
32
  * @param {string} [props.fieldClassName]
27
33
  */
28
- export default function AppAutocomplete({ value, onChange, options, loadOptions, placeholder, minChars, debounce, disabled, size, name, label, error, hint, required, fieldClassName, ...rest }: {
34
+ export default function AppAutocomplete({ value, onChange, options, loadOptions, placeholder, minChars, debounce, disabled, size, allowCustom, name, label, error, hint, required, fieldClassName, ...rest }: {
29
35
  value?: string;
30
- onChange?: (value: string) => void;
36
+ onChange?: (value: string, meta?: {
37
+ isCustom: boolean;
38
+ }) => void;
31
39
  options?: {
32
40
  value: string;
33
41
  label: string;
@@ -41,6 +49,7 @@ export default function AppAutocomplete({ value, onChange, options, loadOptions,
41
49
  debounce?: number;
42
50
  disabled?: boolean;
43
51
  size?: 'sm' | 'lg';
52
+ allowCustom?: boolean;
44
53
  name?: string;
45
54
  label?: import('react').ReactNode;
46
55
  error?: string;
@@ -10,6 +10,8 @@
10
10
  * @param {import('react').ReactNode} [props.label]
11
11
  * @param {string} [props.id]
12
12
  * @param {string} [props.name]
13
+ * @param {string} [props.error] Error message, rendered below the control. Replaces the hint.
14
+ * @param {string} [props.hint] Helper text below the control. Hidden while an error is shown.
13
15
  * @param {string} [props.className]
14
16
  * @param {import('react').Ref} [ref]
15
17
  */
@@ -14,7 +14,7 @@
14
14
  * @param {import('react').ReactNode} [props.children]
15
15
  * @param {"neutral"|"primary"|"success"|"warning"|"danger"|"info"} [props.tone="neutral"]
16
16
  * @param {"sm"|"md"} [props.size="md"]
17
- * @param {string} [props.leadingIcon] Iconsax/Bootstrap icon name for a leading glyph.
17
+ * @param {string} [props.leadingIcon] Bootstrap Icons name for a leading glyph.
18
18
  * @param {string|import('react').ReactNode} [props.avatar] Leading avatar — an image URL or a node.
19
19
  * @param {() => void} [props.onRemove] Present → shows the dismiss ✕.
20
20
  * @param {() => void} [props.onClick] Present → the chip body is clickable.
@@ -12,8 +12,15 @@
12
12
  * @param {() => void} props.onConfirm
13
13
  * @param {string} [props.cancelLabel="Cancel"]
14
14
  * @param {() => void} props.onClose
15
+ * @param {boolean} [props.loading=false] Busy state — shows a spinner and disables Confirm,
16
+ * disables Cancel and the confirm-phrase field, and blocks dismissal via the backdrop,
17
+ * Escape, and onClose while the async action is in flight.
18
+ * @param {boolean} [props.staticBackdrop=false] Forwarded to AppModal — when true, backdrop
19
+ * click and Escape no longer close the dialog (BUG-06649).
20
+ * @param {'center'|'top'} [props.placement='center'] Vertical placement of the card,
21
+ * forwarded to AppModal — centred (default) or pinned near the top.
15
22
  */
16
- export default function AppConfirmDialog({ open, title, message, confirmLabel, cancelLabel, danger, tone, confirmPhrase, onConfirm, onClose, ...rest }: {
23
+ export default function AppConfirmDialog({ open, title, message, confirmLabel, cancelLabel, danger, tone, confirmPhrase, onConfirm, onClose, loading, staticBackdrop, placement, ...rest }: {
17
24
  open: boolean;
18
25
  title: string;
19
26
  message?: import('react').ReactNode;
@@ -24,4 +31,7 @@ export default function AppConfirmDialog({ open, title, message, confirmLabel, c
24
31
  onConfirm: () => void;
25
32
  cancelLabel?: string;
26
33
  onClose: () => void;
34
+ loading?: boolean;
35
+ staticBackdrop?: boolean;
36
+ placement?: 'center' | 'top';
27
37
  }): import("react").JSX.Element;
@@ -4,7 +4,7 @@
4
4
  * @param {object} props
5
5
  * @param {object[]} props.columns
6
6
  * @param {object[]} props.rows
7
- * @param {(row: object) => string|number} [props.rowKey]
7
+ * @param {(row: object, index: number) => string|number} [props.rowKey]
8
8
  * @param {{ key: string, dir: "asc"|"desc" }} [props.sort]
9
9
  * @param {(key: string) => void} [props.onSort]
10
10
  * @param {boolean} [props.loading=false]
@@ -25,7 +25,7 @@
25
25
  export default function AppDataTable({ columns, rows, rowKey, sort, onSort, loading, skeletonRows, empty, emptyFiltered, sourceCount, rowActions, rowActionsLabel, pagination, ariaLabel, className, selectable, selectedIds, onToggleRow, onToggleAll, ...rest }: {
26
26
  columns: object[];
27
27
  rows: object[];
28
- rowKey?: (row: object) => string | number;
28
+ rowKey?: (row: object, index: number) => string | number;
29
29
  sort?: {
30
30
  key: string;
31
31
  dir: "asc" | "desc";
@@ -1,7 +1,8 @@
1
- export default function AppDropdown({ icon, iconSize, toggleClassName, label, ariaLabel, align, items, menuClassName, linkComponent, ...rest }: {
1
+ export default function AppDropdown({ icon, iconSize, toggleClassName, label, ariaLabel, align, items, menuClassName, linkComponent, children, ...rest }: {
2
2
  [x: string]: any;
3
3
  align?: string;
4
4
  ariaLabel: any;
5
+ children: any;
5
6
  icon: any;
6
7
  iconSize: any;
7
8
  items?: any[];
@@ -10,7 +10,7 @@
10
10
  * the tighter widget/tile variant (smaller title + text).
11
11
  *
12
12
  * @param {object} props
13
- * @param {string} props.icon Iconsax name for the bubble
13
+ * @param {string} props.icon Bootstrap Icons name for the bubble
14
14
  * @param {number} [props.iconSize=24]
15
15
  * @param {"md"|"sm"} [props.size="md"]
16
16
  * @param {import('react').ReactNode} props.title
@@ -1,33 +1,41 @@
1
1
  /**
2
- * Compact image attachment field — a browse row that swaps to a thumbnail + filename/size
3
- * once a file is chosen (× to remove). Self-manages the preview object URL and validates
4
- * type + size, reporting the choice via onChange(file | null).
2
+ * Compact attachment field — a browse row that swaps to a preview (image thumbnail or a
3
+ * file-type icon) plus filename/size once a file is chosen (× to remove). Self-manages the
4
+ * preview object URL and validates type + size, reporting the choice via onChange.
5
+ *
6
+ * Handles both images and any other file type (PDF, doc, zip) — narrow it with `accept`.
7
+ * With `multiple`, several files stack in a list and each removes on its own; `value` is then
8
+ * an array and `onChange` receives the updated array.
5
9
  *
6
10
  * Distinct from AppFilePicker (a tall visual image dropzone): this is for attaching a file
7
11
  * to something (a ticket, a message) where the file's name/size matters more than a big preview.
8
12
  *
9
13
  * @param {object} props
10
14
  * @param {string} [props.label="Attachment"]
11
- * @param {File|{ url: string, name?: string }|null} [props.value]
15
+ * @param {File|{ url: string, name?: string }|Array<File|{ url: string, name?: string }>|null} [props.value]
12
16
  * @param {string} [props.name] Form field name, so an uncontrolled form can post the file.
13
- * @param {(file: File|null) => void} props.onChange
14
- * @param {string} [props.accept]
17
+ * @param {(file: File|null) => void | (files: File[]) => void} props.onChange single-mode → File|null; multiple → File[]
18
+ * @param {boolean} [props.multiple=false]
19
+ * @param {string} [props.accept] Defaults to images; pass e.g. "image/*,application/pdf" for mixed.
15
20
  * @param {number} [props.maxSizeMb=5]
16
21
  * @param {boolean} [props.optional=false]
17
22
  * @param {string} [props.error]
18
23
  * @param {string} [props.id]
19
24
  */
20
- export default function AppFileAttachment({ label, value, // File | { url, name } | null
21
- name, onChange, // (file | null) => void
22
- accept, maxSizeMb, optional, error, // external error, shown alongside internal validation errors
25
+ export default function AppFileAttachment({ label, value, // File | { url, name } | array | null
26
+ name, onChange, multiple, accept, maxSizeMb, optional, error, // external error, shown alongside internal validation errors
23
27
  id, ...rest }: {
24
28
  label?: string;
25
29
  value?: File | {
26
30
  url: string;
27
31
  name?: string;
28
- } | null;
32
+ } | Array<File | {
33
+ url: string;
34
+ name?: string;
35
+ }> | null;
29
36
  name?: string;
30
- onChange: (file: File | null) => void;
37
+ onChange: (file: File | null) => void | ((files: File[]) => void);
38
+ multiple?: boolean;
31
39
  accept?: string;
32
40
  maxSizeMb?: number;
33
41
  optional?: boolean;
@@ -1,27 +1,42 @@
1
1
  /**
2
- * Image file picker — a drag-and-drop dropzone that swaps to a large preview once a file
3
- * is chosen (hover to change, × to remove). Accepts a freshly-picked File or an existing
4
- * `{ url }` value; reports the choice via onPick(file | null).
2
+ * File picker — a drag-and-drop dropzone. In single mode it swaps to a large preview once a
3
+ * file is chosen (hover to change, × to remove). With `multiple`, the dropzone stays put and
4
+ * picked files stack in a list inside it, below the prompt (image thumbnail or file-type icon +
5
+ * name/size, each removable). Accepts freshly-picked Files or existing `{ url, name }` values; reports the
6
+ * choice via onPick — a File|null in single mode, a File[] in multiple mode.
7
+ *
8
+ * Not just images: widen `accept` (e.g. "image/*,application/pdf") and non-image files show a
9
+ * file-type icon instead of a thumbnail.
5
10
  *
6
11
  * @param {object} props
7
12
  * @param {string} props.label
8
- * @param {File|{ url: string }|null} [props.value]
13
+ * @param {File|{ url: string, name?: string }|Array<File|{ url: string, name?: string }>|null} [props.value]
9
14
  * @param {string} [props.name] Form field name; also the input id the label points at.
10
- * @param {(file: File|null) => void} props.onPick
15
+ * @param {(file: File|null) => void | (files: File[]) => void} props.onPick single → File|null; multiple → File[]
16
+ * @param {boolean} [props.multiple=false]
17
+ * @param {number} [props.maxFiles] Cap on total files in multiple mode.
11
18
  * @param {string} [props.accept=".jpg,.jpeg,.png"] Accepted file types (the `accept` attribute).
12
19
  * @param {number} [props.maxSizeMb=5]
13
20
  * @param {boolean} [props.required]
14
21
  * @param {string} [props.error]
22
+ * @param {string} [props.className] Extra class on the field wrapper — e.g. a `file-w-*` width preset.
15
23
  */
16
- export default function AppFilePicker({ label, value, name, onPick, accept, maxSizeMb, required, error, ...rest }: {
24
+ export default function AppFilePicker({ label, value, name, onPick, multiple, maxFiles, accept, maxSizeMb, required, error, className, ...rest }: {
17
25
  label: string;
18
26
  value?: File | {
19
27
  url: string;
20
- } | null;
28
+ name?: string;
29
+ } | Array<File | {
30
+ url: string;
31
+ name?: string;
32
+ }> | null;
21
33
  name?: string;
22
- onPick: (file: File | null) => void;
34
+ onPick: (file: File | null) => void | ((files: File[]) => void);
35
+ multiple?: boolean;
36
+ maxFiles?: number;
23
37
  accept?: string;
24
38
  maxSizeMb?: number;
25
39
  required?: boolean;
26
40
  error?: string;
41
+ className?: string;
27
42
  }): import("react").JSX.Element;
@@ -1,5 +1,6 @@
1
- export default function AppInfoTip({ label, children, ...rest }: {
1
+ export default function AppInfoTip({ label, children, placement, ...rest }: {
2
2
  [x: string]: any;
3
3
  children: any;
4
4
  label: any;
5
+ placement?: string;
5
6
  }): import("react").JSX.Element;
@@ -8,15 +8,18 @@
8
8
  * @param {string} [props.icon] Icon name for the leading tile.
9
9
  * @param {import('react').ReactNode} [props.delta] Change text, e.g. "12% vs last month".
10
10
  * @param {'up'|'down'|'flat'} [props.deltaDirection='flat'] Colours the delta and picks its arrow.
11
+ * @param {'plain'|'filled'|'accent'} [props.variant='plain'] The tile surface: plain (today's
12
+ * bordered card), filled (a subtle surface fill), accent (a brand-tinted fill).
11
13
  * @param {boolean} [props.inline=false] Put the icon beside the text instead of above it.
12
14
  * @param {string} [props.className]
13
15
  */
14
- export default function AppKpiTile({ label, value, icon, delta, deltaDirection, inline, className, ...rest }: {
16
+ export default function AppKpiTile({ label, value, icon, delta, deltaDirection, variant, inline, className, ...rest }: {
15
17
  label: string;
16
18
  value: import('react').ReactNode;
17
19
  icon?: string;
18
20
  delta?: import('react').ReactNode;
19
21
  deltaDirection?: 'up' | 'down' | 'flat';
22
+ variant?: 'plain' | 'filled' | 'accent';
20
23
  inline?: boolean;
21
24
  className?: string;
22
25
  }): import("react").JSX.Element;
@@ -1,31 +1,28 @@
1
- /**
2
- * Circular logo/avatar picker with update overlay.
3
- *
4
- * @param {object} props
5
- * @param {string|null} [props.value]
6
- * @param {import('react').ReactNode} [props.fallback]
7
- * @param {string} [props.name] Form field name, so an uncontrolled form can post the file.
8
- * @param {(file: File) => void} props.onPick
9
- * @param {boolean} [props.loading=false]
10
- * @param {string} [props.accept]
11
- * @param {number} [props.maxSizeMb=5]
12
- * @param {string} [props.overlayIcon]
13
- * @param {string} [props.overlayLabel]
14
- * @param {string} [props.ariaLabel]
15
- */
16
1
  export default function AppLogoPicker({ value, // current image URL | null
17
2
  fallback, // node shown when there's no image (e.g. initials)
18
3
  name, onPick, // (file) => void — receives a validated File
4
+ onRemove, // () => void — clears the current logo
19
5
  loading, // show a spinner + block interaction while the pick is uploading
20
- accept, maxSizeMb, overlayIcon, overlayLabel, ariaLabel, ...rest }: {
21
- value?: string | null;
22
- fallback?: import('react').ReactNode;
23
- name?: string;
24
- onPick: (file: File) => void;
25
- loading?: boolean;
6
+ disabled, accept, maxSizeMb, overlayIcon, overlayLabel, ariaLabel, label, hint, error, required, variant, size, shape, className, ...rest }: {
7
+ [x: string]: any;
26
8
  accept?: string;
9
+ ariaLabel?: string;
10
+ className?: string;
11
+ disabled?: boolean;
12
+ error: any;
13
+ fallback: any;
14
+ hint: any;
15
+ label: any;
16
+ loading?: boolean;
27
17
  maxSizeMb?: number;
18
+ name: any;
19
+ onPick: any;
20
+ onRemove: any;
28
21
  overlayIcon?: string;
29
22
  overlayLabel?: string;
30
- ariaLabel?: string;
23
+ required?: boolean;
24
+ shape?: string;
25
+ size?: string;
26
+ value: any;
27
+ variant?: string;
31
28
  }): import("react").JSX.Element;
@@ -3,33 +3,40 @@
3
3
  *
4
4
  * @param {object} props
5
5
  * @param {boolean} props.open
6
+ * @param {import('react').ReactNode} [props.eyebrow] A small kicker label above the title.
6
7
  * @param {import('react').ReactNode} [props.title]
7
8
  * @param {import('react').ReactNode} [props.subtitle]
8
- * @param {string} [props.headerIcon] Iconsax name
9
+ * @param {string} [props.headerIcon] Bootstrap Icons name
10
+ * @param {'default'|'danger'|'success'|'warning'} [props.tone='default'] Tints the header icon
11
+ * and eyebrow to signal intent — a destructive or a success dialog reads it from the header.
12
+ * @param {boolean} [props.dismissible=true] Show the header close (×) button. Pair with
13
+ * `staticBackdrop` for a forced-choice dialog with no way out but an explicit action.
9
14
  * @param {() => void} props.onClose
10
15
  * @param {import('react').ReactNode} [props.footer]
11
- * @param {"sm"|"lg"|"xl"} [props.size] Bootstrap dialog width. Razor's `<app-modal>` has
12
- * taken this since it shipped; React did not, so the same markup could not be written
13
- * on both surfaces. `bootstrap-ui.md` lists `size` as part of AppModal's contract.
14
- * @param {boolean} [props.wide=false]
15
- * @param {boolean} [props.side=false]
16
- * @param {number|string} [props.maxWidth]
16
+ * @param {'sm'|'md'|'lg'|'xl'|number} [props.size='md'] Card width — a preset, or an exact
17
+ * max-width in px for a custom size.
18
+ * @param {'center'|'top'} [props.placement='center'] Vertical placement of the card —
19
+ * centred (default) or pinned near the top of the viewport.
17
20
  * @param {boolean} [props.hideHeader=false]
18
- * @param {string} [props.className]
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 (BUG-06649).
23
+ * @param {string} [props.className] Extra classes on the modal card.
19
24
  * @param {import('react').ReactNode} props.children
20
25
  */
21
- export default function AppModal({ open, title, subtitle, headerIcon, onClose, footer, size, wide, side, maxWidth, hideHeader, className, children, ...rest }: {
26
+ export default function AppModal({ open, eyebrow, title, subtitle, headerIcon, tone, dismissible, onClose, footer, size, placement, hideHeader, staticBackdrop, className, children, ...rest }: {
22
27
  open: boolean;
28
+ eyebrow?: import('react').ReactNode;
23
29
  title?: import('react').ReactNode;
24
30
  subtitle?: import('react').ReactNode;
25
31
  headerIcon?: string;
32
+ tone?: 'default' | 'danger' | 'success' | 'warning';
33
+ dismissible?: boolean;
26
34
  onClose: () => void;
27
35
  footer?: import('react').ReactNode;
28
- size?: "sm" | "lg" | "xl";
29
- wide?: boolean;
30
- side?: boolean;
31
- maxWidth?: number | string;
36
+ size?: 'sm' | 'md' | 'lg' | 'xl' | number;
37
+ placement?: 'center' | 'top';
32
38
  hideHeader?: boolean;
39
+ staticBackdrop?: boolean;
33
40
  className?: string;
34
41
  children: import('react').ReactNode;
35
42
  }): import("react").JSX.Element;
@@ -10,6 +10,8 @@
10
10
  * @param {import('react').ReactNode} [props.label]
11
11
  * @param {string} [props.id]
12
12
  * @param {string} [props.name]
13
+ * @param {string} [props.error] Error message, rendered below the control. Replaces the hint.
14
+ * @param {string} [props.hint] Helper text below the control. Hidden while an error is shown.
13
15
  * @param {string} [props.className]
14
16
  * @param {import('react').Ref} [ref]
15
17
  */
@@ -0,0 +1,22 @@
1
+ /**
2
+ * A scroll container with a thin, themed scrollbar in place of the browser's default chunky one.
3
+ * Pure CSS — native scrolling, keyboard navigation and in-page anchoring are untouched; only the
4
+ * visible track is restyled, via the `.wui-scroll` rules in `@webority/theme`. No JavaScript and
5
+ * no dependency: the thin overlay look comes from native `scrollbar-width` / `::-webkit-scrollbar`.
6
+ *
7
+ * React-only by design so far: a Razor `<app-scrollbar>` would just apply the same `.wui-scroll`
8
+ * class, so this is "not ported yet", not "cannot be ported".
9
+ *
10
+ * @param {object} props
11
+ * @param {import('react').ReactNode} props.children The scrollable content.
12
+ * @param {string} [props.className] Extra classes on the scroll container.
13
+ * @param {number|string} [props.maxHeight] Caps the container height so content overflows and
14
+ * scrolls. A number is treated as pixels.
15
+ * @param {object} [props.style] Extra inline styles, merged with maxHeight.
16
+ */
17
+ export default function AppScrollbar({ children, className, maxHeight, style, ...rest }: {
18
+ children: import('react').ReactNode;
19
+ className?: string;
20
+ maxHeight?: number | string;
21
+ style?: object;
22
+ }): import("react").JSX.Element;
@@ -12,7 +12,10 @@
12
12
  * posts inside a plain form with no JavaScript.
13
13
  *
14
14
  * @param {object} props
15
- * @param {{ value: string, label: string, icon?: string, disabled?: boolean }[]} props.options
15
+ * @param {{ value: string, label: string, note?: string, icon?: string, disabled?: boolean }[]} props.options
16
+ * `note` renders as a smaller, muted sub-line under the label — a supporting detail
17
+ * ("Last 7 days") without shrinking the label itself. Optional; segments without one are
18
+ * unaffected.
16
19
  * @param {string} props.value The selected option's value.
17
20
  * @param {(value: string) => void} props.onChange
18
21
  * @param {string} props.label Accessible name for the group.
@@ -26,6 +29,7 @@ export default function AppSegmented({ options, value, onChange, label, name, si
26
29
  options: {
27
30
  value: string;
28
31
  label: string;
32
+ note?: string;
29
33
  icon?: string;
30
34
  disabled?: boolean;
31
35
  }[];
@@ -1,6 +1,9 @@
1
1
  import '@webority/ui-elements';
2
- export default function AppSelect({ value, onChange, options, placeholder, searchPlaceholder, searchable, clearable, size, icon, floatingLabel, disabled, label, required, error, hint, help, helpLabel, id, name, className, fieldClassName, ...rest }: {
2
+ export default function AppSelect({ value, onChange, options, placeholder, searchPlaceholder, searchable, clearable, size, icon, floatingLabel, disabled, label, required, error, hint, help, helpLabel, id, name, className, fieldClassName, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...rest }: {
3
3
  [x: string]: any;
4
+ "aria-describedby": any;
5
+ "aria-label": any;
6
+ "aria-labelledby": any;
4
7
  className?: string;
5
8
  clearable?: boolean;
6
9
  disabled: any;
@@ -1,3 +1,44 @@
1
+ export type NavItemShape = {
2
+ key?: string;
3
+ label: string;
4
+ /**
5
+ * Bootstrap Icons name for the row's leading glyph.
6
+ */
7
+ icon?: string;
8
+ href: string;
9
+ /**
10
+ * A count or short status at the row's end.
11
+ */
12
+ badge?: import('react').ReactNode;
13
+ /**
14
+ * Tints the badge for an alert count.
15
+ */
16
+ badgeTone?: 'danger' | 'success' | 'warning';
17
+ /**
18
+ * A right-aligned secondary glyph (lock, external arrow, new dot).
19
+ */
20
+ trailingIcon?: string;
21
+ /**
22
+ * The current page — takes the brand tint + aria-current.
23
+ */
24
+ active?: boolean;
25
+ /**
26
+ * Sub-items — the row becomes an expandable parent.
27
+ */
28
+ children?: NavItemShape[];
29
+ };
30
+ /**
31
+ * @typedef {object} NavItemShape
32
+ * @property {string} [key]
33
+ * @property {string} label
34
+ * @property {string} [icon] Bootstrap Icons name for the row's leading glyph.
35
+ * @property {string} href
36
+ * @property {import('react').ReactNode} [badge] A count or short status at the row's end.
37
+ * @property {'danger'|'success'|'warning'} [badgeTone] Tints the badge for an alert count.
38
+ * @property {string} [trailingIcon] A right-aligned secondary glyph (lock, external arrow, new dot).
39
+ * @property {boolean} [active] The current page — takes the brand tint + aria-current.
40
+ * @property {NavItemShape[]} [children] Sub-items — the row becomes an expandable parent.
41
+ */
1
42
  /**
2
43
  * The persistent frame every authenticated portal sits inside — a sidebar of
3
44
  * navigation, a sticky topbar, the routed content, and an optional footer.
@@ -11,8 +52,7 @@
11
52
  * `to`; without it they render as plain `<a href>`, which is what Razor emits.
12
53
  *
13
54
  * @param {object} props
14
- * @param {{ label?: string, items: { key?: string, label: string, icon?: string, href: string,
15
- * badge?: import('react').ReactNode, active?: boolean }[] }[]} props.groups Nav groups, in order.
55
+ * @param {{ label?: string, items: NavItemShape[] }[]} props.groups Nav groups, in order.
16
56
  * Groups after the first are separated by a rule.
17
57
  * @param {import('react').ReactNode} [props.brand] The logo row at the top of the sidebar.
18
58
  * @param {import('react').ReactNode} [props.sidebarFooter] Pinned below the scrolling nav.
@@ -29,14 +69,7 @@
29
69
  export default function AppShell({ groups, brand, sidebarFooter, topbarStart, topbarEnd, footer, children, collapsed, onCollapsedChange, noSidebar, navLabel, linkComponent: Link, className, ...rest }: {
30
70
  groups: {
31
71
  label?: string;
32
- items: {
33
- key?: string;
34
- label: string;
35
- icon?: string;
36
- href: string;
37
- badge?: import('react').ReactNode;
38
- active?: boolean;
39
- }[];
72
+ items: NavItemShape[];
40
73
  }[];
41
74
  brand?: import('react').ReactNode;
42
75
  sidebarFooter?: import('react').ReactNode;
@@ -1,4 +1,4 @@
1
- export default function AppSidebarMenu({ show, onHide, side, title, titleIcon, header, children, footer, width, backdrop, scroll, keyboard, closeButton, responsive, className, bodyClassName, ariaLabel, ...rest }: {
1
+ export default function AppSidebarMenu({ show, onHide, side, title, titleIcon, header, children, footer, width, maxWidth, backdrop, scroll, keyboard, closeButton, responsive, className, bodyClassName, ariaLabel, ...rest }: {
2
2
  [x: string]: any;
3
3
  ariaLabel: any;
4
4
  backdrop?: boolean;
@@ -9,6 +9,7 @@ export default function AppSidebarMenu({ show, onHide, side, title, titleIcon, h
9
9
  footer: any;
10
10
  header: any;
11
11
  keyboard?: boolean;
12
+ maxWidth: any;
12
13
  onHide: any;
13
14
  responsive: any;
14
15
  scroll?: boolean;
@@ -1,6 +1,18 @@
1
+ /**
2
+ * A themed loading spinner — Bootstrap's `.spinner-border`, tinted by the theme.
3
+ * The React counterpart of `<app-spinner>`.
4
+ *
5
+ * For a whole section that is loading, prefer `AppSkeleton` — a content-shaped
6
+ * placeholder reads better than a spinner above the fold.
7
+ *
8
+ * @param {object} props
9
+ * @param {'sm'|'md'|number} [props.size='md'] A preset, or an exact diameter in px — pass any
10
+ * positive number so the spinner matches whatever it sits in; the border scales with it.
11
+ * @param {string} [props.label='Loading'] Accessible name.
12
+ * @param {string} [props.className]
13
+ */
1
14
  export default function AppSpinner({ size, label, className, ...rest }: {
2
- [x: string]: any;
3
- className?: string;
15
+ size?: 'sm' | 'md' | number;
4
16
  label?: string;
5
- size?: string;
17
+ className?: string;
6
18
  }): import("react").JSX.Element;
@@ -1,8 +1,32 @@
1
- export default function AppSplash({ logo, initials, text, label, className, ...rest }: {
2
- [x: string]: any;
3
- className?: string;
4
- initials: any;
1
+ /**
2
+ * The full-viewport boot screen shown while the app resolves its session, before
3
+ * the first route can render — the thing `ApplicationNavigator` returns while
4
+ * `authStatus` is still unresolved.
5
+ *
6
+ * Without it the app flashes the login screen at an already-authenticated user for
7
+ * the length of one session check.
8
+ *
9
+ * The indicator is indeterminate, not a progress value: boot has no measurable
10
+ * percentage, and something that appears to measure one would be lying. Pick its
11
+ * style with `variant` (a sweeping bar, a spinning ring, or bouncing dots).
12
+ *
13
+ * @param {object} props
14
+ * @param {import('react').ReactNode} [props.logo] Brand mark — an `<img>` or an SVG.
15
+ * @param {string} [props.initials] Fallback mark when there is no logo.
16
+ * @param {string} [props.text] One line, e.g. "Signing you in…".
17
+ * @param {string} [props.subtext] A quieter second line under the text.
18
+ * @param {'bar'|'ring'|'dots'} [props.variant='bar'] The indeterminate boot indicator.
19
+ * @param {'sm'|'md'|'lg'|number} [props.size='md'] Mark size — a preset or an exact px diameter.
20
+ * @param {string} [props.label='Loading'] Accessible name for the live region.
21
+ * @param {string} [props.className]
22
+ */
23
+ export default function AppSplash({ logo, initials, text, subtext, variant, size, label, className, ...rest }: {
24
+ logo?: import('react').ReactNode;
25
+ initials?: string;
26
+ text?: string;
27
+ subtext?: string;
28
+ variant?: 'bar' | 'ring' | 'dots';
29
+ size?: 'sm' | 'md' | 'lg' | number;
5
30
  label?: string;
6
- logo: any;
7
- text: any;
31
+ className?: string;
8
32
  }): import("react").JSX.Element;
@@ -10,6 +10,8 @@
10
10
  * @param {import('react').ReactNode} [props.label]
11
11
  * @param {string} [props.id]
12
12
  * @param {string} [props.name]
13
+ * @param {string} [props.error] Error message, rendered below the control. Replaces the hint.
14
+ * @param {string} [props.hint] Helper text below the control. Hidden while an error is shown.
13
15
  * @param {string} [props.className]
14
16
  * @param {import('react').Ref} [ref]
15
17
  */