@webority/ui-react 0.53.1 → 0.55.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.
Files changed (118) hide show
  1. package/dist/components/AppActionIcon.js +1 -1
  2. package/dist/components/AppAutocomplete.js +1 -1
  3. package/dist/components/AppAvatar.js +1 -1
  4. package/dist/components/AppButton.js +1 -1
  5. package/dist/components/AppButtonGroup.js +1 -0
  6. package/dist/components/AppCarousel.js +1 -0
  7. package/dist/components/AppChipGroup.js +1 -0
  8. package/dist/components/AppCodeBlock.js +1 -0
  9. package/dist/components/AppCommandPalette.js +1 -1
  10. package/dist/components/AppCommentThread.js +1 -0
  11. package/dist/components/AppDataTable.js +1 -1
  12. package/dist/components/AppDateRangePicker.js +1 -1
  13. package/dist/components/AppDrawer.js +1 -0
  14. package/dist/components/AppDropdown.js +1 -1
  15. package/dist/components/AppEmptyState.js +1 -1
  16. package/dist/components/AppFilterBar.js +1 -1
  17. package/dist/components/AppHoverCard.js +1 -0
  18. package/dist/components/AppInlineEdit.js +1 -0
  19. package/dist/components/AppInputGroup.js +1 -0
  20. package/dist/components/AppKbd.js +1 -0
  21. package/dist/components/AppLightbox.js +1 -0
  22. package/dist/components/AppMentionInput.js +1 -0
  23. package/dist/components/AppMenubar.js +1 -0
  24. package/dist/components/AppMultiSelect.js +1 -1
  25. package/dist/components/AppNavigationMenu.js +1 -0
  26. package/dist/components/AppNotificationCenter.js +1 -0
  27. package/dist/components/AppOnboardingChecklist.js +1 -0
  28. package/dist/components/AppRating.js +1 -0
  29. package/dist/components/AppRecordPager.js +1 -0
  30. package/dist/components/AppRelativeTime.js +1 -0
  31. package/dist/components/AppResizable.js +1 -0
  32. package/dist/components/AppResizableHandle.js +1 -0
  33. package/dist/components/AppResizablePanel.js +1 -0
  34. package/dist/components/AppRollingNumber.js +1 -0
  35. package/dist/components/AppSectionCallToAction.js +1 -0
  36. package/dist/components/AppSectionFaq.js +1 -0
  37. package/dist/components/AppSectionFeatures.js +1 -0
  38. package/dist/components/AppSectionHero.js +1 -0
  39. package/dist/components/AppSectionLogos.js +1 -0
  40. package/dist/components/AppSectionPricing.js +1 -0
  41. package/dist/components/AppSectionTestimonials.js +1 -0
  42. package/dist/components/AppSelect.js +1 -1
  43. package/dist/components/AppSelectMini.js +1 -1
  44. package/dist/components/AppShortcutLegend.js +1 -0
  45. package/dist/components/AppShowMore.js +1 -0
  46. package/dist/components/AppSplitButton.js +1 -0
  47. package/dist/components/AppSplitView.js +1 -0
  48. package/dist/components/AppTableEmptyState.js +1 -1
  49. package/dist/components/AppTableToolbar.js +1 -1
  50. package/dist/components/AppTabs.js +1 -1
  51. package/dist/components/AppTooltip.js +1 -1
  52. package/dist/components/AppTour.js +1 -1
  53. package/dist/components/AppTruncate.js +1 -0
  54. package/dist/components/AppWhatsNew.js +1 -0
  55. package/dist/components/withTooltip.js +1 -1
  56. package/dist/lib/emptyIllustration.js +1 -0
  57. package/dist/lib/sectionShell.js +1 -0
  58. package/dist/lib/shortcutChip.js +1 -0
  59. package/dist/lib/useListShortcuts.js +1 -0
  60. package/dist/types/components/AppActionIcon.d.ts +4 -1
  61. package/dist/types/components/AppAutocomplete.d.ts +9 -2
  62. package/dist/types/components/AppButton.d.ts +2 -1
  63. package/dist/types/components/AppButtonGroup.d.ts +23 -0
  64. package/dist/types/components/AppCarousel.d.ts +52 -0
  65. package/dist/types/components/AppChipGroup.d.ts +22 -0
  66. package/dist/types/components/AppCodeBlock.d.ts +28 -0
  67. package/dist/types/components/AppCommandPalette.d.ts +44 -2
  68. package/dist/types/components/AppCommentThread.d.ts +115 -0
  69. package/dist/types/components/AppDataTable.d.ts +44 -1
  70. package/dist/types/components/AppDateRangePicker.d.ts +5 -0
  71. package/dist/types/components/AppDrawer.d.ts +46 -0
  72. package/dist/types/components/AppDropdown.d.ts +4 -1
  73. package/dist/types/components/AppEmptyState.d.ts +4 -1
  74. package/dist/types/components/AppFilterBar.d.ts +9 -1
  75. package/dist/types/components/AppHoverCard.d.ts +35 -0
  76. package/dist/types/components/AppInlineEdit.d.ts +57 -0
  77. package/dist/types/components/AppInputGroup.d.ts +29 -0
  78. package/dist/types/components/AppKbd.d.ts +15 -0
  79. package/dist/types/components/AppLightbox.d.ts +40 -0
  80. package/dist/types/components/AppMentionInput.d.ts +41 -0
  81. package/dist/types/components/AppMenubar.d.ts +45 -0
  82. package/dist/types/components/AppMultiSelect.d.ts +4 -1
  83. package/dist/types/components/AppNavigationMenu.d.ts +41 -0
  84. package/dist/types/components/AppNotificationCenter.d.ts +81 -0
  85. package/dist/types/components/AppOnboardingChecklist.d.ts +48 -0
  86. package/dist/types/components/AppRating.d.ts +48 -0
  87. package/dist/types/components/AppRecordPager.d.ts +38 -0
  88. package/dist/types/components/AppRelativeTime.d.ts +18 -0
  89. package/dist/types/components/AppResizable.d.ts +30 -0
  90. package/dist/types/components/AppResizableHandle.d.ts +13 -0
  91. package/dist/types/components/AppResizablePanel.d.ts +20 -0
  92. package/dist/types/components/AppRollingNumber.d.ts +27 -0
  93. package/dist/types/components/AppSectionCallToAction.d.ts +24 -0
  94. package/dist/types/components/AppSectionFaq.d.ts +28 -0
  95. package/dist/types/components/AppSectionFeatures.d.ts +37 -0
  96. package/dist/types/components/AppSectionHero.d.ts +32 -0
  97. package/dist/types/components/AppSectionLogos.d.ts +36 -0
  98. package/dist/types/components/AppSectionPricing.d.ts +28 -0
  99. package/dist/types/components/AppSectionTestimonials.d.ts +34 -0
  100. package/dist/types/components/AppShortcutLegend.d.ts +34 -0
  101. package/dist/types/components/AppShowMore.d.ts +29 -0
  102. package/dist/types/components/AppSplitButton.d.ts +53 -0
  103. package/dist/types/components/AppSplitView.d.ts +85 -0
  104. package/dist/types/components/AppTableEmptyState.d.ts +4 -1
  105. package/dist/types/components/AppTableToolbar.d.ts +13 -1
  106. package/dist/types/components/AppTabs.d.ts +12 -6
  107. package/dist/types/components/AppTooltip.d.ts +4 -1
  108. package/dist/types/components/AppTour.d.ts +35 -10
  109. package/dist/types/components/AppTruncate.d.ts +21 -0
  110. package/dist/types/components/AppWhatsNew.d.ts +44 -0
  111. package/dist/types/components/withTooltip.d.ts +1 -1
  112. package/dist/types/index.d.ts +37 -0
  113. package/dist/types/lib/emptyIllustration.d.ts +22 -0
  114. package/dist/types/lib/sectionShell.d.ts +43 -0
  115. package/dist/types/lib/shortcutChip.d.ts +11 -0
  116. package/dist/types/lib/useListShortcuts.d.ts +24 -0
  117. package/dist/ui-react.js +1 -1
  118. package/package.json +3 -3
@@ -10,6 +10,12 @@
10
10
  * and clears itself. The controls, chips and Clear all share one row, the search box wider and
11
11
  * selects and date ranges narrow; it wraps only when full, and each facet takes its own line on a phone.
12
12
  *
13
+ * Only the first `inline` facets sit in the row. The rest go in a panel behind a "Filters (n)" button,
14
+ * n counting the active ones among them (no number while none is active); their chips stay in the row.
15
+ * The panel is a `<details>` that closes on an outside click or Escape. On a phone every facet folds
16
+ * into that one button and the panel becomes a sheet from the bottom edge. The button and Clear all
17
+ * never wrap.
18
+ *
13
19
  * @param {object} props
14
20
  * @param {{ key: string, label: string, type: 'enum'|'multiEnum'|'dateRange'|'text',
15
21
  * options?: { value: string, label: string }[] }[]} props.facets `options` fills an `enum` or `multiEnum`;
@@ -17,9 +23,10 @@
17
23
  * @param {Record<string, string|string[]|{ from: string, to: string }>} props.value The current filters.
18
24
  * @param {(key: string, value: string|string[]|{ from: string, to: string }) => void} props.onChange
19
25
  * Called with the facet key and its new value. Clear all calls it once per active facet, with the empty value.
26
+ * @param {number} [props.inline=3] How many facets stay in the row; the rest fold into the Filters button.
20
27
  * @param {string} [props.className]
21
28
  */
22
- export default function AppFilterBar({ facets: allFacets, value, onChange, className, ...rest }: {
29
+ export default function AppFilterBar({ facets: allFacets, value, onChange, inline, className, ...rest }: {
23
30
  facets: {
24
31
  key: string;
25
32
  label: string;
@@ -37,5 +44,6 @@ export default function AppFilterBar({ facets: allFacets, value, onChange, class
37
44
  from: string;
38
45
  to: string;
39
46
  }) => void;
47
+ inline?: number;
40
48
  className?: string;
41
49
  }): import("react").JSX.Element;
@@ -0,0 +1,35 @@
1
+ import "@webority/ui-elements/elements/hover-card";
2
+ /**
3
+ * A small preview card that opens beside a name or record link: who someone is, a record's status,
4
+ * without opening the record. It opens after `openDelay` ms of mouse hover or when the trigger takes
5
+ * keyboard focus, and closes `closeDelay` ms after the pointer or focus leaves the trigger and the
6
+ * card (the pointer can cross into the card to read or click inside it). Escape closes it. Touch
7
+ * never opens it, so the trigger must itself lead to the same information (a link to the record).
8
+ * Distinct from `AppPopover` (opened by a click, for a panel of actions) and `AppTooltip` (one line of
9
+ * text, no interactive content). Wraps `<wui-hover-card>`, which Razor `<app-hover-card>` renders too.
10
+ *
11
+ * @param {object} props
12
+ * @param {import('react').ReactNode} props.trigger The name or link the card belongs to. Make it a link
13
+ * or button so keyboard users can focus it.
14
+ * @param {import('react').ReactNode} [props.children] The card's content. The card is phrasing content, so it can
15
+ * sit on a name inside a sentence; there, build the content from spans (a `<div>` cannot be inside a `<p>`).
16
+ * @param {boolean} [props.loading=false] Shows a spinner and `loadingLabel` in place of the children while
17
+ * the preview is fetched; open the fetch from `onOpenChange`.
18
+ * @param {string} [props.loadingLabel="Loading"] The text beside the spinner.
19
+ * @param {string} [props.label] The card's accessible name ("Asha Verma, profile").
20
+ * @param {number} [props.openDelay=300] Milliseconds of hover or focus before it opens.
21
+ * @param {number} [props.closeDelay=150] Milliseconds after leaving before it closes.
22
+ * @param {(open: boolean) => void} [props.onOpenChange] Called when the card opens or closes.
23
+ * @param {string} [props.className]
24
+ */
25
+ export default function AppHoverCard({ trigger, children, loading, loadingLabel, label, openDelay, closeDelay, onOpenChange, className, ...rest }: {
26
+ trigger: import('react').ReactNode;
27
+ children?: import('react').ReactNode;
28
+ loading?: boolean;
29
+ loadingLabel?: string;
30
+ label?: string;
31
+ openDelay?: number;
32
+ closeDelay?: number;
33
+ onOpenChange?: (open: boolean) => void;
34
+ className?: string;
35
+ }): import("react").JSX.Element;
@@ -0,0 +1,57 @@
1
+ import "@webority/ui-elements/elements/datepicker";
2
+ import "@webority/ui-elements/elements/select";
3
+ /**
4
+ * One value edited where it is shown: a table cell or a fact on a detail page. It reads as plain
5
+ * text with a pencil on hover and focus; a click or Enter turns it into the matching library control
6
+ * (a text or number input, a textarea, a select or a date picker, whose list opens at once).
7
+ *
8
+ * Enter saves a text or number, Ctrl or Cmd+Enter a textarea, picking saves a select or date, and
9
+ * leaving the control saves whatever it holds; Escape cancels. An unchanged value closes without
10
+ * saving. While `onSave` runs the new value shows with a spinner, then a tick for two seconds; a
11
+ * rejection puts the old value back and shows the rejection's message under it (so write it for the
12
+ * person editing), and the next edit starts from the value that failed. Saved and failed are
13
+ * announced to screen readers.
14
+ *
15
+ * Inside an `AppDataTable` row that opens on click or Enter, clicks and keys on the value never
16
+ * reach the row.
17
+ *
18
+ * Wraps the shared `<wui-inline-edit>` element, which owns the editing, the keys and the states;
19
+ * the Razor `<app-inline-edit>` renders the same markup.
20
+ *
21
+ * @param {object} props
22
+ * @param {string | number | null} [props.value] The saved value. A date is `yyyy-MM-dd`; a select
23
+ * value is one of the `options` values.
24
+ * @param {(next: string | number | null) => void | Promise<unknown>} [props.onSave] Persist the new
25
+ * value. A number field passes a number (null when cleared); the others pass a string. Reject to
26
+ * refuse it: the rejection's message is shown.
27
+ * @param {'text'|'number'|'select'|'date'|'textarea'} [props.type='text'] The control it turns into.
28
+ * @param {{ value: string | number, label: string }[]} [props.options] The choices of a select.
29
+ * @param {string} props.label What the value is ("Owner"): the accessible name of the value and
30
+ * the control, and the subject of what screen readers hear ("Owner saved.").
31
+ * @param {string} [props.placeholder] Shown, muted, when there is no value, and in the empty
32
+ * control. Without it an empty value shows a hyphen.
33
+ * @param {(next: string | number | null) => string | null | undefined} [props.validate] Checked
34
+ * before saving: return a message to keep the control open with that message, or nothing to save.
35
+ * @param {(value: string | number | null) => import('react').ReactNode} [props.renderValue] How a
36
+ * saved, non-empty value reads (a formatted amount, a status badge). Text and markup only: the
37
+ * value is a button, so it must not hold its own controls or links.
38
+ * @param {boolean} [props.disabled=false] Show the value without the edit affordance.
39
+ * @param {string} [props.className] Extra classes on the root element.
40
+ * @param {string} [props.id] The root's id; the control and error ids derive from it. Generated when omitted.
41
+ */
42
+ export default function AppInlineEdit({ value, onSave, type, options, label, placeholder, validate, renderValue, disabled, className, id, ...rest }: {
43
+ value?: string | number | null;
44
+ onSave?: (next: string | number | null) => void | Promise<unknown>;
45
+ type?: 'text' | 'number' | 'select' | 'date' | 'textarea';
46
+ options?: {
47
+ value: string | number;
48
+ label: string;
49
+ }[];
50
+ label: string;
51
+ placeholder?: string;
52
+ validate?: (next: string | number | null) => string | null | undefined;
53
+ renderValue?: (value: string | number | null) => import('react').ReactNode;
54
+ disabled?: boolean;
55
+ className?: string;
56
+ id?: string;
57
+ }): import("react").JSX.Element;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * A field with add-ons attached to it: text before or after the value ("₹", "https://", ".com", "kg")
3
+ * or a button or select beside it (Copy, Apply, a unit picker). The add-ons share the field's outline
4
+ * and height. Put one label-less field inside (`AppInput`, `AppSelect`) and give the group the
5
+ * `label`, tied to the field by `htmlFor` (the field's `id`). For a unit that is only text inside the
6
+ * field use `AppInput`'s `unit`, `prefix` or `suffix`; this is for add-ons that are their own control
7
+ * or that must sit outside the field. Razor counterpart: `<app-input-group>`, whose rich add-ons are
8
+ * the `<app-input-group-leading>` and `<app-input-group-trailing>` children.
9
+ *
10
+ * @param {object} props
11
+ * @param {import('react').ReactNode} props.children The field.
12
+ * @param {import('react').ReactNode} [props.leading] Before the field: text, or a node such as an `AppButton`.
13
+ * @param {import('react').ReactNode} [props.trailing] After the field.
14
+ * @param {string} [props.label] The group's label, above it.
15
+ * @param {string} [props.htmlFor] The `id` of the field the label names.
16
+ * @param {boolean} [props.required=false] Marks the label required.
17
+ * @param {'sm'|'md'|'lg'} [props.size='md'] Height of text add-ons; set the same size on the field and on button add-ons.
18
+ * @param {string} [props.className]
19
+ */
20
+ export default function AppInputGroup({ children, leading, trailing, label, htmlFor, required, size, className, ...rest }: {
21
+ children: import('react').ReactNode;
22
+ leading?: import('react').ReactNode;
23
+ trailing?: import('react').ReactNode;
24
+ label?: string;
25
+ htmlFor?: string;
26
+ required?: boolean;
27
+ size?: 'sm' | 'md' | 'lg';
28
+ className?: string;
29
+ }): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A key label: the `.wui-kbd` chip a shortcut is drawn with, for prose, help text and hand-built
3
+ * hints ("Press Esc to close"). Written the way the `shortcut` prop on `AppButton`, `AppTooltip`
4
+ * and `AppDropdown` items writes a key: one character in upper case, `esc` as Esc, `slash` as /,
5
+ * anything longer ("Ctrl K") as written. Unlike those chips it is part of the text, so assistive
6
+ * tech reads it; to bind a key, put `shortcut` on the control instead.
7
+ *
8
+ * @param {object} props
9
+ * @param {string|number} props.children The key: "K", "Enter", "Ctrl K".
10
+ * @param {string} [props.className]
11
+ */
12
+ export default function AppKbd({ children, className, ...rest }: {
13
+ children: string | number;
14
+ className?: string;
15
+ }): import("react").JSX.Element;
@@ -0,0 +1,40 @@
1
+ import "@webority/ui-elements/elements/lightbox";
2
+ /**
3
+ * A gallery of thumbnails that open full screen: click one and the image fills the screen with
4
+ * zoom, previous and next, a caption and an optional download. Use it for photo galleries and
5
+ * image attachments that would otherwise open in a new tab.
6
+ *
7
+ * Keys: Left and Right change image (wrapping), + and - zoom, 0 resets the zoom, Escape closes and
8
+ * puts focus back on the thumbnail of the image last shown. On a touch screen, swipe sideways to
9
+ * change image, pinch or double tap to zoom, drag to pan, and tap beside the image to close.
10
+ * A click with Ctrl, Cmd or Shift still opens the image's own link. The behaviour is the shared
11
+ * `<wui-lightbox>` element, which Razor `<app-lightbox>` renders too.
12
+ *
13
+ * @param {object} props
14
+ * @param {{ src: string, thumb?: string, alt?: string, caption?: string, name?: string, key?: string }[]} props.items
15
+ * The images. `src` is the full image, `thumb` the thumbnail (default: `src`), `alt` its text
16
+ * alternative (default: the caption), `caption` the line under it in the full-screen view and
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.
21
+ * @param {(index: number) => void} [props.onChange] Called with the position (from 0) of the
22
+ * image shown, when the view opens and each time it changes.
23
+ * @param {() => void} [props.onClose] Called when the full-screen view closes.
24
+ * @param {string} [props.className]
25
+ */
26
+ export default function AppLightbox({ items, download, label, onChange, onClose, className, ...rest }: {
27
+ items: {
28
+ src: string;
29
+ thumb?: string;
30
+ alt?: string;
31
+ caption?: string;
32
+ name?: string;
33
+ key?: string;
34
+ }[];
35
+ download?: boolean;
36
+ label?: string;
37
+ onChange?: (index: number) => void;
38
+ onClose?: () => void;
39
+ className?: string;
40
+ }): import("react").JSX.Element;
@@ -0,0 +1,41 @@
1
+ import "@webority/ui-elements/elements/mention-input";
2
+ /**
3
+ * A text box where "@" opens a list of people to mention. Up and Down choose, Enter or Tab
4
+ * mention, Escape closes the list; the person reads "@Asha Rao" in the text. Typing inside a
5
+ * mention turns it back into plain text, and Backspace just after one removes it whole.
6
+ *
7
+ * The value is plain text with each mention stored as `@[Asha Rao](u-12)`: never HTML, so it can
8
+ * be saved and shown anywhere without escaping worries. Show a saved value with `AppCommentThread`,
9
+ * or read it with `parseMentionValue` and `mentionedIds` from `@webority/ui-elements/elements/mention-input`
10
+ * (the server's twin is `MentionText` in Webority.Ui.Razor).
11
+ *
12
+ * Wraps the shared `<wui-mention-input>` element; Razor `<app-mention-input>` renders the same box.
13
+ *
14
+ * @param {object} props
15
+ * @param {string} [props.value] The stored value (`Thanks @[Asha Rao](u-12)`).
16
+ * @param {(value: string, meta: { mentions: { id: string, label: string }[] }) => void} [props.onChange]
17
+ * Called on every edit with the stored value and the people it mentions, each once.
18
+ * @param {{ value: string, label: string, description?: string, src?: string }[]} [props.people]
19
+ * The people to offer. `value` is the person's public id (letters, digits, `_ . : -`).
20
+ * @param {(query: string, opts?: { signal?: AbortSignal }) => Promise<{ value: string, label: string, description?: string, src?: string }[]>} [props.loadPeople]
21
+ * Look people up as the person types after "@" (instead of `people`).
22
+ * @param {number} [props.minChars=1] How many letters after "@" before `loadPeople` runs.
23
+ * @param {number} [props.debounce=250] Milliseconds to wait for typing to pause before `loadPeople` runs.
24
+ * @param {() => void} [props.onSubmit] Ctrl or Cmd+Enter in the box (send a comment).
25
+ * @param {number} [props.rows=3] Visible lines.
26
+ * @param {string} [props.placeholder]
27
+ * @param {boolean} [props.disabled=false]
28
+ * @param {string} [props.name] Posts the stored value under this name in a form.
29
+ * @param {string} [props.id] The element's id; the text box is `{id}-text`, the label's target.
30
+ * @param {import('react').ReactNode} [props.label] Shown above the box; a string also names it.
31
+ * @param {string} [props.error]
32
+ * @param {string} [props.hint]
33
+ * @param {boolean} [props.required=false]
34
+ * @param {import('react').ReactNode} [props.help] Help content in an info tip beside the label.
35
+ * @param {string} [props.helpLabel="More information"] Accessible name for that info tip.
36
+ * @param {string} [props.className] Extra classes on the element.
37
+ * @param {string} [props.fieldClassName] Extra classes on the field wrapper.
38
+ * @param {import('react').Ref<HTMLElement>} [ref] The `<wui-mention-input>` element.
39
+ */
40
+ declare const AppMentionInput: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
41
+ export default AppMentionInput;
@@ -0,0 +1,45 @@
1
+ import "@webority/ui-elements/elements/menubar";
2
+ /**
3
+ * An application menubar (File, Edit, View) whose menus open on click and on the arrow keys. The
4
+ * bar is one tab stop: Left and Right move across the menus, Down and Up open one, Right opens a
5
+ * submenu, Escape closes a level and Tab leaves; a letter jumps to the next row starting with it.
6
+ * Once a menu is open, pointing at another menu opens it instead. A row can carry a `shortcut`
7
+ * hint, drawn as a key chip at its end; like `AppDropdown` it only shows and announces the key, the
8
+ * page binds it. The behaviour is the shared `<wui-menubar>` element, the same one the Razor
9
+ * `<app-menubar>` uses. For a site's top navigation with dropdown panels use `AppNavigationMenu`.
10
+ *
11
+ * NOTE: the exported component must stay the FIRST destructured function in this file —
12
+ * the parity check reads the first signature it finds as the component's public props.
13
+ *
14
+ * @param {object} props
15
+ * @param {{ key: string, label: string, disabled?: boolean, items: { key: string, label?: string, icon?: string|import('react').ReactNode, to?: string, onClick?: () => void, shortcut?: string, danger?: boolean, disabled?: boolean, divider?: true, items?: object[] }[] }[]} props.menus
16
+ * The menus, left to right. A row is an action (`onClick`) or a link (`to`); `items` makes it a
17
+ * submenu opener (`onClick` and `to` are then ignored); `divider: true` is a separator and needs
18
+ * only a unique `key`. `icon` is a glyph name or a node. A `disabled` row is listed but skipped by
19
+ * the arrow keys and cannot be chosen.
20
+ * @param {string} [props.ariaLabel='Application menu'] Accessible name of the bar.
21
+ * @param {import('react').ElementType} [props.linkComponent] Component for `to` rows (e.g. Link).
22
+ * @param {string} [props.className]
23
+ */
24
+ export default function AppMenubar({ menus, ariaLabel, linkComponent, className, ...rest }: {
25
+ menus: {
26
+ key: string;
27
+ label: string;
28
+ disabled?: boolean;
29
+ items: {
30
+ key: string;
31
+ label?: string;
32
+ icon?: string | import('react').ReactNode;
33
+ to?: string;
34
+ onClick?: () => void;
35
+ shortcut?: string;
36
+ danger?: boolean;
37
+ disabled?: boolean;
38
+ divider?: true;
39
+ items?: object[];
40
+ }[];
41
+ }[];
42
+ ariaLabel?: string;
43
+ linkComponent?: import('react').ElementType;
44
+ className?: string;
45
+ }): import("react").JSX.Element;
@@ -17,7 +17,10 @@ import "@webority/ui-elements/elements/multiselect";
17
17
  * @param {object} props
18
18
  * @param {string[]} [props.values] Selected option values.
19
19
  * @param {(values: string[]) => void} [props.onChange]
20
- * @param {{value: string, label: string, description?: string, avatar?: string, initials?: string, disabled?: boolean, disabledHint?: string}[]} [props.options]
20
+ * @param {Array<{ value: string, label: import('react').ReactNode, description?: string, avatar?: string, initials?: string, disabled?: boolean, disabledHint?: string }>} [props.options]
21
+ * The choices. A label may be a node (`<>CO<sub>2</sub></>`): it renders as static markup in the
22
+ * menu and on the chosen chip, and search, typeahead and the accessible names (the option and the
23
+ * chip's remove button) use its text.
21
24
  * @param {string} [props.placeholder]
22
25
  * @param {string} [props.searchPlaceholder] Placeholder for the in-menu search box.
23
26
  * @param {boolean} [props.searchable=true] Ignored under `allowCustom`, whose inline input is the search.
@@ -0,0 +1,41 @@
1
+ import "@webority/ui-elements/elements/navigation-menu";
2
+ /**
3
+ * A site's top navigation with dropdown panels. An entry is a link (`to`) or a button that opens a
4
+ * panel of `links`, each with an optional description. A panel opens on a click, Enter, Space or
5
+ * Down on its button, never on hover alone; Tab walks the links in page order, Left and Right move
6
+ * along the entries, Escape closes the panel and returns focus to its button, and so does choosing
7
+ * a link or clicking out. One panel is open at a time, and one that would leave the screen aligns
8
+ * to the end of its entry. Below `md` the entries stack and a panel opens in the page flow. The
9
+ * behaviour is the shared `<wui-navigation-menu>` element, the same one the Razor
10
+ * `<app-navigation-menu>` uses. For an application menubar (File, Edit) use `AppMenubar`.
11
+ *
12
+ * NOTE: the exported component must stay the FIRST destructured function in this file —
13
+ * the parity check reads the first signature it finds as the component's public props.
14
+ *
15
+ * @param {object} props
16
+ * @param {{ key: string, label: string, to?: string, current?: boolean, links?: { key: string, label: string, to: string, description?: string, icon?: string|import('react').ReactNode, current?: boolean }[] }[]} props.items
17
+ * The entries, left to right. An entry with `links` is a button that opens them; without, it is a
18
+ * link to `to`. `current` marks the page the visitor is on (`aria-current="page"`).
19
+ * @param {string} [props.ariaLabel='Main'] Accessible name of the navigation landmark.
20
+ * @param {import('react').ElementType} [props.linkComponent] Component for `to` links (e.g. Link).
21
+ * @param {string} [props.className]
22
+ */
23
+ export default function AppNavigationMenu({ items, ariaLabel, linkComponent, className, ...rest }: {
24
+ items: {
25
+ key: string;
26
+ label: string;
27
+ to?: string;
28
+ current?: boolean;
29
+ links?: {
30
+ key: string;
31
+ label: string;
32
+ to: string;
33
+ description?: string;
34
+ icon?: string | import('react').ReactNode;
35
+ current?: boolean;
36
+ }[];
37
+ }[];
38
+ ariaLabel?: string;
39
+ linkComponent?: import('react').ElementType;
40
+ className?: string;
41
+ }): import("react").JSX.Element;
@@ -0,0 +1,81 @@
1
+ import "@webority/ui-elements/elements/notification-center";
2
+ export type NotificationItem = {
3
+ /**
4
+ * Stable id; names the item to `onItemClick` and to the server.
5
+ */
6
+ id: string;
7
+ /**
8
+ * The one line that says what happened.
9
+ */
10
+ title: string;
11
+ /**
12
+ * A second, quieter line.
13
+ */
14
+ text?: string;
15
+ /**
16
+ * The record the item opens. Without it the item is a button.
17
+ */
18
+ href?: string;
19
+ /**
20
+ * When it happened: an ISO date-time with its zone ("2026-10-11T14:05:00+05:30")
21
+ * or a "YYYY-MM-DD" day. It sets the day group and the time shown, in India Standard Time.
22
+ */
23
+ at: string;
24
+ /**
25
+ * Already read: no dot, regular weight.
26
+ */
27
+ read?: boolean;
28
+ /**
29
+ * A library icon name, drawn before the text.
30
+ */
31
+ icon?: string;
32
+ };
33
+ /**
34
+ * @typedef {object} NotificationItem
35
+ * @property {string} id Stable id; names the item to `onItemClick` and to the server.
36
+ * @property {string} title The one line that says what happened.
37
+ * @property {string} [text] A second, quieter line.
38
+ * @property {string} [href] The record the item opens. Without it the item is a button.
39
+ * @property {string} at When it happened: an ISO date-time with its zone ("2026-10-11T14:05:00+05:30")
40
+ * or a "YYYY-MM-DD" day. It sets the day group and the time shown, in India Standard Time.
41
+ * @property {boolean} [read] Already read: no dot, regular weight.
42
+ * @property {string} [icon] A library icon name, drawn before the text.
43
+ */
44
+ /**
45
+ * A bell with an unread count that opens a panel of notifications grouped by day (Today, Yesterday,
46
+ * then 04-Oct-2026), each with an unread dot, a link to its record and a "Mark all read" action.
47
+ * For a portal's own notifications; the topbar bell of `AppShell` (`notifications`) is the same idea
48
+ * fed from a server fragment. Pass `items` newest first.
49
+ *
50
+ * Read state is yours: mark items read in `onItemClick` and `onMarkAllRead`, then pass the new
51
+ * `items`. The panel opens and closes on its own: the bell, Escape (focus returns to the bell), a
52
+ * press or focus outside, and the arrow keys, Home and End between items, through
53
+ * `<wui-notification-center>`, which Razor `<app-notification-center>` renders too.
54
+ *
55
+ * @param {object} props
56
+ * @param {NotificationItem[]} props.items Newest first.
57
+ * @param {number} [props.unread] The badge count when it is larger than the items listed (the latest
58
+ * twenty of 120). Defaults to the number of unread items.
59
+ * @param {string} [props.label="Notifications"] The bell's name and the panel heading.
60
+ * @param {string} [props.emptyText="You are all caught up."] Shown when there are no items.
61
+ * @param {string} [props.viewAllHref] A "View all" link under the list. Absent: no link.
62
+ * @param {boolean} [props.defaultOpen=false] Start with the panel open; the element owns it after that.
63
+ * @param {string|number|Date} [props.now] The clock for Today and Yesterday; the current time by default.
64
+ * @param {() => void} [props.onMarkAllRead] Called by "Mark all read". Absent: no button.
65
+ * @param {(item: NotificationItem, event: import('react').MouseEvent) => void} [props.onItemClick] Called when an item is chosen, before its link is followed.
66
+ * @param {(open: boolean) => void} [props.onOpenChange] Called when the panel opens or closes.
67
+ * @param {string} [props.className]
68
+ */
69
+ export default function AppNotificationCenter({ items, unread, label, emptyText, viewAllHref, defaultOpen, now, onMarkAllRead, onItemClick, onOpenChange, className, ...rest }: {
70
+ items: NotificationItem[];
71
+ unread?: number;
72
+ label?: string;
73
+ emptyText?: string;
74
+ viewAllHref?: string;
75
+ defaultOpen?: boolean;
76
+ now?: string | number | Date;
77
+ onMarkAllRead?: () => void;
78
+ onItemClick?: (item: NotificationItem, event: import('react').MouseEvent) => void;
79
+ onOpenChange?: (open: boolean) => void;
80
+ className?: string;
81
+ }): import("react").JSX.Element;
@@ -0,0 +1,48 @@
1
+ import "@webority/ui-elements/elements/onboarding-checklist";
2
+ /**
3
+ * A first-run setup checklist: a short list of steps with the progress so far, each step linking to
4
+ * where it is done. A step is `done`, `current` (the one to do next), `skipped` or `todo`; with none
5
+ * marked current, the first step to do is. The head shows "2 of 4 done" and a bar of one segment per
6
+ * step. The heading collapses the steps, the close icon dismisses the whole checklist to a single
7
+ * "Show setup checklist" button, and a checklist whose every step is done or skipped starts collapsed.
8
+ *
9
+ * It keeps its own collapsed and dismissed state after the first render (`defaultCollapsed`,
10
+ * `defaultDismissed`); `onDismiss`, `onRestore` and `onCollapsedChange` report changes. With
11
+ * `storageKey` a dismissal is remembered in the browser. Wraps `<wui-onboarding-checklist>`, which
12
+ * Razor `<app-onboarding-checklist>` renders too.
13
+ *
14
+ * @param {object} props
15
+ * @param {{ key?: string, label: string, description?: string, href?: string, status?: 'done'|'current'|'skipped'|'todo' }[]} props.steps
16
+ * The steps in order. `href` makes the label a link to where the step is done; `status` defaults to `todo`.
17
+ * @param {string} [props.title="Get started"] The heading, and the name of the progress bar.
18
+ * @param {boolean} [props.defaultCollapsed] Whether the steps start collapsed. Defaults to whether every step is done or skipped.
19
+ * @param {boolean} [props.defaultDismissed=false] Whether the checklist starts dismissed, showing only the restore button.
20
+ * @param {string} [props.storageKey] Remembers a dismissal across visits under this key (one per checklist). Unset, it lasts the page.
21
+ * @param {string} [props.dismissLabel="Dismiss checklist"] The name and tooltip of the close icon.
22
+ * @param {string} [props.restoreLabel="Show setup checklist"] The text of the button that brings a dismissed checklist back.
23
+ * @param {() => void} [props.onDismiss] Called when the checklist is dismissed.
24
+ * @param {() => void} [props.onRestore] Called when a dismissed checklist is brought back.
25
+ * @param {(collapsed: boolean) => void} [props.onCollapsedChange] Called when the heading collapses or expands the steps.
26
+ * @param {import('react').ElementType} [props.linkComponent] Router link for a step with an `href`; it receives `to` instead of `href`.
27
+ * @param {string} [props.className]
28
+ */
29
+ export default function AppOnboardingChecklist({ steps, title, defaultCollapsed, defaultDismissed, storageKey, dismissLabel, restoreLabel, onDismiss, onRestore, onCollapsedChange, linkComponent: Link, className, ...rest }: {
30
+ steps: {
31
+ key?: string;
32
+ label: string;
33
+ description?: string;
34
+ href?: string;
35
+ status?: 'done' | 'current' | 'skipped' | 'todo';
36
+ }[];
37
+ title?: string;
38
+ defaultCollapsed?: boolean;
39
+ defaultDismissed?: boolean;
40
+ storageKey?: string;
41
+ dismissLabel?: string;
42
+ restoreLabel?: string;
43
+ onDismiss?: () => void;
44
+ onRestore?: () => void;
45
+ onCollapsedChange?: (collapsed: boolean) => void;
46
+ linkComponent?: import('react').ElementType;
47
+ className?: string;
48
+ }): import("react").JSX.Element;
@@ -0,0 +1,48 @@
1
+ import "@webority/ui-elements/elements/rating";
2
+ /**
3
+ * A star rating: an input that takes a whole number from 1 to `max` (arrow keys move and choose,
4
+ * it posts with its form), or with `readOnly` a display for a list or a card. The display names
5
+ * its value to a screen reader ("4.5 out of 5") and, with `half`, draws half stars. Wraps
6
+ * `<wui-rating>`, which Razor `<app-rating>` renders too.
7
+ *
8
+ * As an input it is a labelled radiogroup laid out like any other field. Leave `value` out to
9
+ * let it hold its own value (`defaultValue` seeds it).
10
+ *
11
+ * @param {object} props
12
+ * @param {number} [props.value] The rating (controlled as an input). A display may hold a fraction such as 4.3; an input rounds to a whole star.
13
+ * @param {number} [props.defaultValue] Initial rating of an uncontrolled input.
14
+ * @param {(value: number) => void} [props.onChange] Called with the chosen rating (input only).
15
+ * @param {number} [props.max=5] How many stars.
16
+ * @param {boolean} [props.readOnly=false] A display, not an input.
17
+ * @param {boolean} [props.half=false] Display only: draw the value to the nearest half star.
18
+ * @param {boolean} [props.showValue=false] Display only: print the number beside the stars.
19
+ * @param {"sm"|"md"|"lg"} [props.size="md"]
20
+ * @param {import('react').ReactNode} [props.label] Input: the visible group label and its name. Display: prefix of the spoken text ("Quality: 4.5 out of 5"); a string.
21
+ * @param {string} [props.name] Input only: the form field name. Defaults to a generated one.
22
+ * @param {boolean} [props.required=false] Input only.
23
+ * @param {boolean} [props.disabled=false] Input only.
24
+ * @param {string} [props.error] Input only: message below the stars. Replaces the hint.
25
+ * @param {string} [props.hint] Input only: helper text below the stars.
26
+ * @param {string} [props.id]
27
+ * @param {string} [props.className] Class on the stars (the control).
28
+ * @param {string} [props.fieldClassName] Input only: class on the `.field` wrapper.
29
+ */
30
+ export default function AppRating({ value, defaultValue, onChange, max, readOnly, half, showValue, size, label, name, required, disabled, error, hint, id, className, fieldClassName, ...rest }: {
31
+ value?: number;
32
+ defaultValue?: number;
33
+ onChange?: (value: number) => void;
34
+ max?: number;
35
+ readOnly?: boolean;
36
+ half?: boolean;
37
+ showValue?: boolean;
38
+ size?: "sm" | "md" | "lg";
39
+ label?: import('react').ReactNode;
40
+ name?: string;
41
+ required?: boolean;
42
+ disabled?: boolean;
43
+ error?: string;
44
+ hint?: string;
45
+ id?: string;
46
+ className?: string;
47
+ fieldClassName?: string;
48
+ }): import("react").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import "@webority/ui-elements/elements/record-pager";
2
+ /**
3
+ * Moves between the records of a list without going back to it: "12 of 47" and previous and next
4
+ * action icons, for a detail page's header (`AppPageHeader` `actions`) or a reading pane's header
5
+ * (`AppSplitView` draws one for its open item). Distinct from `AppPagination` and
6
+ * `AppTablePagination`, which move between pages of a list.
7
+ *
8
+ * Each direction is a link (`prevHref`, `nextHref`), a handler (`onPrev`, `onNext`) or both (the
9
+ * handler runs on the link's click and may prevent it). A direction with neither, or at either end,
10
+ * is disabled. With `keys`, J presses next and K previous, ignored in fields and when the page has
11
+ * single-key shortcuts off; leave it off where a list already owns J and K (a split view). Wraps
12
+ * `<wui-record-pager>`, which Razor `<app-record-pager>` renders too.
13
+ *
14
+ * @param {object} props
15
+ * @param {number} [props.index] The position of this record, from 1. Without it (nothing open) the
16
+ * label is empty and both icons are disabled.
17
+ * @param {number} [props.total] How many records the list holds.
18
+ * @param {string} [props.prevHref] The previous record's URL.
19
+ * @param {(event: import('react').MouseEvent) => void} [props.onPrev] Called on previous.
20
+ * @param {string} [props.nextHref] The next record's URL.
21
+ * @param {(event: import('react').MouseEvent) => void} [props.onNext] Called on next.
22
+ * @param {string} [props.prevLabel="Previous"] The previous icon's name and tooltip ("Previous invoice").
23
+ * @param {string} [props.nextLabel="Next"] The next icon's name and tooltip ("Next invoice").
24
+ * @param {boolean} [props.keys=false] J and K press next and previous.
25
+ * @param {string} [props.className]
26
+ */
27
+ export default function AppRecordPager({ index, total, prevHref, onPrev, nextHref, onNext, prevLabel, nextLabel, keys, className, ...rest }: {
28
+ index?: number;
29
+ total?: number;
30
+ prevHref?: string;
31
+ onPrev?: (event: import('react').MouseEvent) => void;
32
+ nextHref?: string;
33
+ onNext?: (event: import('react').MouseEvent) => void;
34
+ prevLabel?: string;
35
+ nextLabel?: string;
36
+ keys?: boolean;
37
+ className?: string;
38
+ }): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * A moment in plain words ("5 minutes ago", "in 2 hours") that keeps itself current, with the
3
+ * exact IST time on hover ("04-Oct-2026 14:05 IST"). A week or more away it reads as the date
4
+ * (04-Oct-2026). Renders a `<time>`, so the machine-readable value stays in the page. Wraps
5
+ * `<wui-relative-time>`, which Razor `<app-relative-time>` renders too.
6
+ *
7
+ * @param {object} props
8
+ * @param {string|number|Date} props.value The moment: an ISO string sent with its zone ("Z" or an
9
+ * offset), epoch milliseconds, or a Date. A bare "2026-10-04" is midnight IST. A missing or
10
+ * unreadable value shows "-" and no tooltip.
11
+ * @param {'auto'|'top'|'bottom'|'start'|'end'} [props.tooltipPlacement='auto'] Preferred side of the exact-time tooltip.
12
+ * @param {string} [props.className]
13
+ */
14
+ export default function AppRelativeTime({ value, tooltipPlacement, className, ...rest }: {
15
+ value: string | number | Date;
16
+ tooltipPlacement?: 'auto' | 'top' | 'bottom' | 'start' | 'end';
17
+ className?: string;
18
+ }): any;
@@ -0,0 +1,30 @@
1
+ import "@webority/ui-elements/elements/resizable";
2
+ export declare const ResizableDirection: import("react").Context<string>;
3
+ /**
4
+ * A group of panels the person resizes: drag a handle with a mouse, pen or finger, or focus it and
5
+ * press the arrow keys (5%, Shift 20%), Home and End (the panel before it to its minimum or maximum),
6
+ * or double click to restore the default sizes. Put an `AppResizableHandle` between each pair of
7
+ * `AppResizablePanel`s: a reading pane beside a list, an editor above its preview, two sides of a compare.
8
+ *
9
+ * Sizes are percentages of the room the panels share and always add up to 100; a panel without a
10
+ * `defaultSize` shares what the sized ones leave. With `storageKey` the layout is remembered per
11
+ * screen in the browser; a stored layout that no longer fits the panels is ignored. A vertical group
12
+ * stacks its panels and needs a height: set `--wui-resizable-height` through `style`, or give its
13
+ * parent one. Wraps `<wui-resizable>`, which Razor `<app-resizable>` renders too.
14
+ *
15
+ * @param {object} props
16
+ * @param {'horizontal'|'vertical'} [props.direction='horizontal'] `horizontal` puts the panels side by
17
+ * side, `vertical` stacks them.
18
+ * @param {string} [props.storageKey] Remember the sizes under this name (one per screen).
19
+ * @param {(sizes: number[]) => void} [props.onChange] Called with every panel's size in percent after a
20
+ * drag, key press or reset that changed the layout, not while a drag is still moving.
21
+ * @param {import('react').ReactNode} [props.children] `AppResizablePanel`s with an `AppResizableHandle` between each pair.
22
+ * @param {string} [props.className]
23
+ */
24
+ export default function AppResizable({ direction, storageKey, onChange, children, className, ...rest }: {
25
+ direction?: 'horizontal' | 'vertical';
26
+ storageKey?: string;
27
+ onChange?: (sizes: number[]) => void;
28
+ children?: import('react').ReactNode;
29
+ className?: string;
30
+ }): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The draggable divider between two `AppResizablePanel`s. It is a keyboard-focusable separator
3
+ * (arrow keys, Home, End) that resizes the panel before it against the panel after it; its current
4
+ * size and limits are announced to assistive technology.
5
+ *
6
+ * @param {object} props
7
+ * @param {string} [props.label='Resize panels'] Its accessible name; say what it resizes ("Resize the list").
8
+ * @param {string} [props.className]
9
+ */
10
+ export default function AppResizableHandle({ label, className, ...rest }: {
11
+ label?: string;
12
+ className?: string;
13
+ }): import("react").JSX.Element;