@webority/ui-react 0.147.0 → 0.149.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.
@@ -2,7 +2,7 @@
2
2
  "format": "webority-guidance/1",
3
3
  "package": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.147.0"
5
+ "version": "0.149.0"
6
6
  },
7
7
  "components": [
8
8
  {
@@ -4952,7 +4952,7 @@
4952
4952
  "a11y": [
4953
4953
  "Focus stays inside the dialog: Tab and Shift+Tab wrap between its first and last control.",
4954
4954
  "The page behind an open dialog is made inert, and the dialog is named by a plain-text title or by ariaLabel; a headerless dialog with neither warns in development.",
4955
- "Escape and an outside click leave it open by default; set staticBackdrop to false to let them close it."
4955
+ "An outside click leaves it open by default (staticBackdrop); Escape closes it unless closeOnEscape is false."
4956
4956
  ]
4957
4957
  }
4958
4958
  },
@@ -69,8 +69,8 @@ export type CommentThreadItem = {
69
69
  *
70
70
  * The comments are yours: each callback persists a change and the thread waits for it, then you
71
71
  * pass the updated `comments` back. Throw (or reject) with a message written for the person and it
72
- * shows where they acted. Bodies are stored mention values (`Thanks @[Asha Rao](u-12)`) and always
73
- * render as text, never HTML.
72
+ * shows where they acted. Bodies are stored mention values (`Thanks @[Asha Rao](u-12)`). They render
73
+ * as text by default and as Markdown when `markdown` is set; never as HTML.
74
74
  *
75
75
  * Wraps the shared `<wui-comment-thread>` element, which owns the boxes, keys and states; Razor
76
76
  * `<app-comment-thread>` renders the same markup.
@@ -111,6 +111,7 @@ export type CommentThreadItem = {
111
111
  * @param {string} [props.postLabel] The post button's text; without it "Comment".
112
112
  * @param {number} [props.composerRows] The composer box's rows; without it 3 stacked and 1 inline.
113
113
  * @param {boolean} [props.readOnly]
114
+ * @param {boolean} [props.markdown] Draws each comment body as Markdown through the shared Markdown element, which never renders raw HTML. A mention then reads as plain "@Name" text. Default false: plain text.
114
115
  * @param {import('react').ElementType} [props.linkComponent] 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.
115
116
  * @param {string} [props.label]
116
117
  * @param {string} [props.internalLabel] Default "Internal note".
@@ -194,6 +195,11 @@ export default function AppCommentThread(props: {
194
195
  * @default false
195
196
  */
196
197
  readOnly?: boolean;
198
+ /**
199
+ * Draws each comment body as Markdown (bold, italics, lists, links, code); raw HTML shows as text and a mention reads as plain @Name. Unset, bodies show as plain text.
200
+ * @default false
201
+ */
202
+ markdown?: boolean;
197
203
  linkComponent?: import('react').ElementType;
198
204
  /**
199
205
  * The list's accessible name.
@@ -14,8 +14,9 @@
14
14
  * @param {string} [props.toggleClassName]
15
15
  * @param {"neutral"} [props.toggleVariant] A custom trigger that keeps the surrounding font and colour, with a
16
16
  * muted fill on hover and while open. Needs `trigger`.
17
- * @param {"sm"|"md"|"lg"} [props.menuWidth] A fixed menu width (15, 20 or 25rem); long rows wrap instead of
18
- * widening the menu. Unset, the menu fits its rows.
17
+ * @param {"sm"|"md"|"lg"|"fit"} [props.menuWidth] A fixed menu width (15, 20 or 25rem; long rows wrap instead of
18
+ * widening the menu), or fit: no minimum, the menu is as wide as its widest row. Unset, the menu is at least
19
+ * 12rem wide.
19
20
  * @param {string} [props.label]
20
21
  * @param {"start"|"end"} [props.align]
21
22
  * @param {string} [props.ariaLabel]
@@ -43,8 +44,8 @@ export default function AppDropdown(props: {
43
44
  toggleClassName?: string;
44
45
  /** neutral: a custom trigger that keeps the surrounding font and colour, with a muted fill on hover and while open. Needs trigger. */
45
46
  toggleVariant?: "neutral";
46
- /** A fixed menu width (15, 20 or 25rem); long rows wrap instead of widening the menu. Unset, the menu fits its rows. */
47
- menuWidth?: "sm" | "md" | "lg";
47
+ /** A fixed menu width (15, 20 or 25rem; long rows wrap instead of widening the menu), or fit: no minimum, the menu is as wide as its widest row. Unset, the menu is at least 12rem wide. */
48
+ menuWidth?: "sm" | "md" | "lg" | "fit";
48
49
  /** Tooltip and accessible name fallback for the toggle. */
49
50
  label?: string;
50
51
  /**
@@ -19,7 +19,8 @@
19
19
  * @param {boolean} [props.hideHeader]
20
20
  * @param {string} [props.ariaLabel]
21
21
  * @param {string} [props.closeLabel] Default "Close".
22
- * @param {boolean} [props.staticBackdrop] Defaults to true: Escape and an outside click leave the modal open. Pass false to let them close it.
22
+ * @param {boolean} [props.staticBackdrop] Defaults to true: an outside click leaves the modal open. Pass false to let it close the modal. Escape is closeOnEscape's.
23
+ * @param {boolean} [props.closeOnEscape] Defaults to true: Escape closes the modal through onClose (and through confirmDiscard's question when a form changed). Pass false for a dialog that must not close from the keyboard.
23
24
  * @param {string} [props.confirmDiscard]
24
25
  * @param {boolean} [props.dirty]
25
26
  * @param {string} [props.className]
@@ -42,7 +43,7 @@ export default function AppModal(props: {
42
43
  */
43
44
  tone?: 'neutral' | 'danger' | 'success' | 'warning';
44
45
  /**
45
- * Shows the close button in the header. Pair it with staticBackdrop for a forced-choice dialog.
46
+ * Shows the close button in the header. For a forced-choice dialog, pair false with staticBackdrop and closeOnEscape false.
46
47
  * @default true
47
48
  */
48
49
  dismissible?: boolean;
@@ -80,10 +81,15 @@ export default function AppModal(props: {
80
81
  */
81
82
  closeLabel?: string;
82
83
  /**
83
- * The pop-up closes only through its own Close or Cancel by default. false lets Escape and an outside click close it.
84
+ * Covers outside clicks only: by default an outside click leaves the pop-up open. false lets an outside click close it.
84
85
  * @default true
85
86
  */
86
87
  staticBackdrop?: boolean;
88
+ /**
89
+ * Escape closes the modal through onClose, asking first when confirmDiscard applies. Set false for a dialog that must not close from the keyboard.
90
+ * @default true
91
+ */
92
+ closeOnEscape?: boolean;
87
93
  /** Asks before closing while dirty, with this text and Discard and Keep editing in the footer. */
88
94
  confirmDiscard?: string;
89
95
  /**
@@ -157,6 +157,18 @@ declare const AppSelect: import("react").ForwardRefExoticComponent<{
157
157
  * @default "All countries"
158
158
  */
159
159
  allCountriesLabel?: string;
160
+ /** Single, search, multiple and country modes: a localStorage key to remember the options a person chooses on this device. The open list shows them first, under a Recent heading, while the search box is empty. Build it per user, for example from the user's public id. Only options still in the list show, so a search that fetches its options per query shows none. Not used in tag mode. */
161
+ recentsKey?: string;
162
+ /**
163
+ * How many recent options to show and keep, 1 to 20.
164
+ * @default 5
165
+ */
166
+ recentsLimit?: number;
167
+ /**
168
+ * The heading of the recent options.
169
+ * @default "Recent"
170
+ */
171
+ recentsLabel?: string;
160
172
  /** Disables the control. */
161
173
  disabled?: boolean;
162
174
  /**
@@ -221,6 +221,8 @@ export type SearchShape = {
221
221
  * @param {string} [props.markLight] Image URL of the square mark shown on the collapsed rail.
222
222
  * @param {string} [props.markDark] Dark-mode twin of `markLight`.
223
223
  * @param {string} [props.brandName] The brand name, read by screen readers from the logo, or from the mark when there is no logo.
224
+ * @param {string} [props.brandHref] Makes the logo row a link to this address, through linkComponent when one is passed, and a tap on it closes the phone drawer. The link wraps the logo, mark and brand node, so brand must hold no link of its own. Needs brandLabel or brandName, and a brand, logo or mark to link.
225
+ * @param {string} [props.brandLabel] The brand link's accessible name, such as "Acme home". Used only with brandHref; defaults to brandName.
224
226
  * @param {import('react').ReactNode} [props.sidebarStart]
225
227
  * @param {import('react').ReactNode} [props.sidebarStartCompact]
226
228
  * @param {import('react').ReactNode} [props.sidebarFooter]
@@ -295,6 +297,10 @@ export default function AppShell(props: {
295
297
  markDark?: string;
296
298
  /** The brand name, read by screen readers from the logo, or from the mark when there is no logo. */
297
299
  brandName?: string;
300
+ /** Makes the logo row a link to this address, through linkComponent when one is passed. The link wraps the logo, mark and brand, so brand must hold no link of its own. Needs brandLabel or brandName. */
301
+ brandHref?: string;
302
+ /** The brand link's accessible name, such as Acme home. Used only with brandHref; defaults to brandName. */
303
+ brandLabel?: string;
298
304
  /** Between the brand row and the nav, such as a workspace switcher or an environment badge. Hidden on the collapsed rail. */
299
305
  sidebarStart?: import('react').ReactNode;
300
306
  /** The same slot for the collapsed rail, typically a compact monogram control. Shown only on the desktop collapsed rail. */
@@ -30,6 +30,7 @@
30
30
  * @param {string} [props.className]
31
31
  * @param {import('react').CSSProperties} [props.style]
32
32
  * @param {string} [props.stepLabel] Default "Step {number}". The {number} token is the step's position, counted from 1.
33
+ * @param {boolean} [props.markdown] Draws each item's description and note as Markdown (bold, italics, lists, links, code), through the shared Markdown element, which never renders raw HTML. Both must then be strings. Default false: plain text.
33
34
  */
34
35
  export default function AppTimeline(props: {
35
36
  /**
@@ -74,4 +75,9 @@ export default function AppTimeline(props: {
74
75
  * @default "Step {number}"
75
76
  */
76
77
  stepLabel?: string;
78
+ /**
79
+ * Draws each item's description and note as Markdown (bold, italics, lists, links, code); raw HTML shows as text. Both must then be strings. Unset, they show as plain text.
80
+ * @default false
81
+ */
82
+ markdown?: boolean;
77
83
  }): import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-react",
3
- "version": "0.147.0",
3
+ "version": "0.149.0",
4
4
  "description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -29,14 +29,14 @@
29
29
  },
30
30
  "sideEffects": false,
31
31
  "dependencies": {
32
- "@webority/markdown-core": "0.147.0",
33
- "@webority/theme": "0.147.0",
34
- "@webority/ui-elements": "0.147.0",
35
- "@webority/web-core": "0.147.0"
32
+ "@webority/markdown-core": "0.149.0",
33
+ "@webority/theme": "0.149.0",
34
+ "@webority/ui-elements": "0.149.0",
35
+ "@webority/web-core": "0.149.0"
36
36
  },
37
37
  "peerDependencies": {
38
- "@webority/analytics": "^0.36.0",
39
- "bootstrap": "5.3.3",
38
+ "@webority/analytics": "^0.37.0",
39
+ "bootstrap": "5.3.8",
40
40
  "react": "^19.0.0",
41
41
  "react-bootstrap": "^2.10.0",
42
42
  "react-dom": "^19.0.0"
@@ -48,18 +48,18 @@
48
48
  "@testing-library/user-event": "^14.6.1",
49
49
  "@types/react": "^19.2.17",
50
50
  "@vitejs/plugin-react": "^6.0.1",
51
- "@vitest/coverage-v8": "5.0.1",
52
- "@webority/analytics": "0.36.1",
53
- "@webority/canvas-kit": "0.147.0",
54
- "@webority/tokens": "0.147.0",
55
- "bootstrap": "5.3.3",
51
+ "@vitest/coverage-v8": "5.1.0",
52
+ "@webority/analytics": "0.37.0",
53
+ "@webority/canvas-kit": "0.149.0",
54
+ "@webority/tokens": "0.149.0",
55
+ "bootstrap": "5.3.8",
56
56
  "jsdom": "30.1.1",
57
- "react": "^19.2.6",
57
+ "react": "^19.3.1",
58
58
  "react-bootstrap": "^2.10.6",
59
- "react-dom": "^19.2.6",
59
+ "react-dom": "^19.3.1",
60
60
  "typescript": "^7.0.2",
61
- "vite": "^8.0.12",
62
- "vitest": "5.0.1"
61
+ "vite": "^8.3.6",
62
+ "vitest": "5.1.0"
63
63
  },
64
64
  "scripts": {
65
65
  "build": "vite build && tsc -p tsconfig.json && node ../../scripts/inject-meta-docs.mjs && node ../canvas-kit/dist/cli.js build --config canvas-kit.json --out dist/canvas-kit && node ../canvas-kit/dist/cli.js guidance --config canvas-kit.json --out dist/guidance.json && node ../../scripts/sync-rcl-assets.mjs analytics",