@webority/ui-react 0.139.4 → 0.140.1

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.139.4"
5
+ "version": "0.140.1"
6
6
  },
7
7
  "components": [
8
8
  {
@@ -1035,6 +1035,70 @@
1035
1035
  "A shortcut sets aria-keyshortcuts; the page binds the key itself.",
1036
1036
  "A static button renders as a plain span, never a button, so assistive technology reads it as text.",
1037
1037
  "The roll animation's copy of the label is aria-hidden, so the label is read once."
1038
+ ],
1039
+ "keyboard": [
1040
+ {
1041
+ "key": "Tab",
1042
+ "does": "Moves focus onto the button.",
1043
+ "notes": "In page order. A disabled or loading button is skipped."
1044
+ },
1045
+ {
1046
+ "key": "Shift + Tab",
1047
+ "does": "Moves focus to the previous control.",
1048
+ "notes": "Reverse of Tab; the order never changes."
1049
+ },
1050
+ {
1051
+ "key": "Enter",
1052
+ "does": "Activates the button.",
1053
+ "notes": "On a link button (href) it follows the link."
1054
+ },
1055
+ {
1056
+ "key": "Space",
1057
+ "does": "Activates the button.",
1058
+ "notes": "Runs on key up, like a native button. A link button ignores it."
1059
+ },
1060
+ {
1061
+ "key": "The shortcut key, for example N",
1062
+ "does": "Runs the action.",
1063
+ "notes": "Only when the page binds the key. The button exposes it as aria-keyshortcuts."
1064
+ }
1065
+ ],
1066
+ "contrast": [
1067
+ {
1068
+ "pair": "primary-text on primary",
1069
+ "light": "6.29:1 AA",
1070
+ "dark": "6.29:1 AA"
1071
+ },
1072
+ {
1073
+ "pair": "primary as text on bg-light",
1074
+ "light": "6.29:1 AA",
1075
+ "dark": "6.23:1 AA"
1076
+ },
1077
+ {
1078
+ "pair": "primary-hover as text on bg-light",
1079
+ "light": "4.47:1 Large only",
1080
+ "dark": "7.36:1 AAA"
1081
+ },
1082
+ {
1083
+ "pair": "danger-text on danger-10",
1084
+ "light": "4.77:1 AA",
1085
+ "dark": "4.77:1 AA"
1086
+ },
1087
+ {
1088
+ "pair": "success-text on the soft success tint (the success variant)",
1089
+ "light": "5.02:1 AA",
1090
+ "dark": "Set by the dark theme"
1091
+ },
1092
+ {
1093
+ "pair": "white on success-strong (solid green surfaces)",
1094
+ "light": "5.82:1 AA",
1095
+ "dark": "5.82:1 AA"
1096
+ },
1097
+ {
1098
+ "pair": "white on danger-strong (the danger variant)",
1099
+ "light": "5.80:1 AA",
1100
+ "dark": "5.80:1 AA"
1101
+ }
1038
1102
  ]
1039
1103
  }
1040
1104
  },
@@ -2651,6 +2715,33 @@
2651
2715
  "Sortable headers carry aria-sort and sort on Enter or Space.",
2652
2716
  "Row checkboxes are labelled Select row, the header one Select all rows, and the expand toggle Expand row or Collapse row with aria-expanded.",
2653
2717
  "The open row carries aria-current, and a saved or failed row change is announced through a polite status region."
2718
+ ],
2719
+ "keyboard": [
2720
+ {
2721
+ "key": "Tab",
2722
+ "does": "Moves focus through the table's stops: the scroll region, each sortable heading, each row that opens, each checkbox and each column resize handle, in page order.",
2723
+ "notes": "Arrow keys do nothing in the table."
2724
+ },
2725
+ {
2726
+ "key": "Enter",
2727
+ "does": "Sorts by a focused sortable column heading.",
2728
+ "notes": "Space does the same. Only sortable headings respond."
2729
+ },
2730
+ {
2731
+ "key": "Space",
2732
+ "does": "Sorts by a focused sortable column heading, or ticks a focused row checkbox.",
2733
+ "notes": "The checkbox is a native input; its state follows the browser."
2734
+ },
2735
+ {
2736
+ "key": "Enter",
2737
+ "does": "Opens a focused row.",
2738
+ "notes": "Only on a table with rowHref or onRowClick, and only when the row itself has focus."
2739
+ },
2740
+ {
2741
+ "key": "Shift + click",
2742
+ "does": "Selects or clears every row from the last ticked row to the clicked one.",
2743
+ "notes": "Mouse; set on a row checkbox, only when selection is on."
2744
+ }
2654
2745
  ]
2655
2746
  }
2656
2747
  },
@@ -3152,7 +3243,7 @@
3152
3243
  ],
3153
3244
  "a11y": [
3154
3245
  "The toggle is a button named by ariaLabel, else by label; an icon-only toggle with neither is an unnamed button, and a development warning says so.",
3155
- "Open state, outside click, Escape and arrow key navigation come from react-bootstrap Dropdown, and a custom trigger keeps them.",
3246
+ "The menu closes on an outside click or Escape and moves between items with the arrow keys, and a custom trigger keeps all of it.",
3156
3247
  "An item with a shortcut names its key to assistive technology through aria-keyshortcuts; picture rows use empty alt text."
3157
3248
  ]
3158
3249
  }
@@ -9084,7 +9175,7 @@
9084
9175
  "dont": [],
9085
9176
  "a11y": [
9086
9177
  "The tooltip opens on hover and on keyboard focus of the trigger, so keyboard users get the same hint.",
9087
- "The tooltip carries a generated id and react-bootstrap links it to the trigger with aria-describedby while it is open.",
9178
+ "The tooltip carries a generated id, and the trigger points at it with aria-describedby while it is open.",
9088
9179
  "Placement flips to stay inside the viewport, but essential information still belongs in visible copy."
9089
9180
  ]
9090
9181
  }
@@ -13,6 +13,7 @@
13
13
  * @param {string[]} [props.openItems]
14
14
  * @param {"bordered"|"flat"} [props.variant]
15
15
  * @param {string} [props.id]
16
+ * @param {string} [props.closeLabel] Set on every trigger as `data-close-label`, for a stylesheet to show while the pane is open. Omitted when unset.
16
17
  * @param {string} [props.className]
17
18
  */
18
19
  export default function AppAccordion(props: {
@@ -38,6 +39,8 @@ export default function AppAccordion(props: {
38
39
  variant?: "bordered" | "flat";
39
40
  /** Prefix for the generated pane ids. Set it when a pane needs a stable anchor to link to. */
40
41
  id?: string;
42
+ /** The label every trigger carries as data-close-label, for a stylesheet to show while the pane is open. Omitted when unset. */
43
+ closeLabel?: string;
41
44
  /**
42
45
  * Extra classes on the list.
43
46
  * @default ""
@@ -30,7 +30,7 @@ import "@webority/ui-elements/elements/command-palette";
30
30
  * @param {{ key: string, label: import('react').ReactNode, items: { key: string,
31
31
  * label: import('react').ReactNode, description?: import('react').ReactNode,
32
32
  * icon?: string | import('react').ReactNode, meta?: import('react').ReactNode,
33
- * disabled?: boolean, ariaLabel?: string, shortcut?: string,
33
+ * disabled?: boolean, ariaLabel?: string, shortcut?: string, keywords?: string[],
34
34
  * page?: { key: string, label: string }, onSelect?: () => void }[] }[]} [props.groups]
35
35
  * @param {{ key: string, label: string }[]} [props.path]
36
36
  * @param {(path: { key: string, label: string }[]) => void} [props.onPathChange] Called with the
@@ -47,6 +47,9 @@ import "@webority/ui-elements/elements/command-palette";
47
47
  * @param {string} [props.ariaLabel]
48
48
  * @param {string} [props.resultsLabel] Default "Results".
49
49
  * @param {boolean} [props.highlight]
50
+ * @param {boolean} [props.groupFilter] Shows a pill per group under the query, "All" first with the
51
+ * total; the picked group's results are the only ones drawn. Tab and Shift+Tab in the search
52
+ * move to the next and previous pill. The pick resets when the query changes.
50
53
  * @param {string} [props.id]
51
54
  * @param {string} [props.className]
52
55
  */
@@ -81,6 +84,7 @@ export default function AppCommandPalette(props: {
81
84
  disabled?: boolean;
82
85
  ariaLabel?: string;
83
86
  shortcut?: string;
87
+ keywords?: string[];
84
88
  page?: {
85
89
  key: string;
86
90
  label: string;
@@ -149,6 +153,11 @@ export default function AppCommandPalette(props: {
149
153
  * @default true
150
154
  */
151
155
  highlight?: boolean;
156
+ /**
157
+ * Shows a pill per group under the query, All first with the total. Only the picked group's results are drawn. Tab and Shift+Tab in the search move to the next and previous pill; a changed query picks All again.
158
+ * @default false
159
+ */
160
+ groupFilter?: boolean;
152
161
  /** Seeds the result and heading ids; defaults to a generated id. */
153
162
  id?: string;
154
163
  /**
@@ -9,15 +9,15 @@ declare const AppLeadPopup: import("react").ForwardRefExoticComponent<{
9
9
  /** A sentence under the heading. */
10
10
  description?: string;
11
11
  /**
12
- * The fields in order: name, email, phone, company, message.
12
+ * The fields in order: name, email, phone, company, message, consent.
13
13
  * @default ["name","email"]
14
14
  */
15
- fields?: Array<"name" | "email" | "phone" | "company" | "message">;
15
+ fields?: Array<"name" | "email" | "phone" | "company" | "message" | "consent">;
16
16
  /**
17
17
  * The fields that must have a value.
18
18
  * @default []
19
19
  */
20
- required?: Array<"name" | "email" | "phone" | "company" | "message">;
20
+ required?: Array<"name" | "email" | "phone" | "company" | "message" | "consent">;
21
21
  /** Text put before every posted field name, such as Input. */
22
22
  fieldPrefix?: string;
23
23
  /** Posted name per field, for a server that names it differently. */
@@ -26,6 +26,8 @@ declare const AppLeadPopup: import("react").ForwardRefExoticComponent<{
26
26
  labels?: Record<string, string>;
27
27
  /** Maximum length per field. */
28
28
  maxLengths?: Record<string, number>;
29
+ /** Adds a Privacy policy link beside the consent checkbox, opened in the same tab. Only with fields including consent. */
30
+ consentHref?: string;
29
31
  /**
30
32
  * The submit button's text.
31
33
  * @default "Send"
@@ -9,7 +9,7 @@
9
9
  * @param {import('react').ReactNode} [props.eyebrow]
10
10
  * @param {import('react').ReactNode} [props.subtitle]
11
11
  * @param {"start"|"center"} [props.align]
12
- * @param {"default"|"muted"} [props.variant]
12
+ * @param {"default"|"muted"|"band"} [props.variant] `band` sets the call to action as a full-width band.
13
13
  * @param {string} [props.className]
14
14
  */
15
15
  export default function AppSectionCallToAction(props: {
@@ -32,10 +32,10 @@ export default function AppSectionCallToAction(props: {
32
32
  */
33
33
  align?: "start" | "center";
34
34
  /**
35
- * The section's background around the panel.
35
+ * The section's background around the panel. `band` sets the call to action as a full-width band.
36
36
  * @default "default"
37
37
  */
38
- variant?: "default" | "muted";
38
+ variant?: "default" | "muted" | "band";
39
39
  /**
40
40
  * Extra class names for the root element.
41
41
  * @default ""
@@ -11,10 +11,11 @@
11
11
  * @param {"h1"|"h2"|"h3"|"h4"|"h5"|"h6"} [props.as]
12
12
  * @param {import('react').ReactNode} [props.eyebrow]
13
13
  * @param {import('react').ReactNode} [props.subtitle]
14
- * @param {"start"|"center"} [props.align]
15
- * @param {"default"|"muted"} [props.variant]
14
+ * @param {"start"|"center"} [props.align] Defaults to `center`, or to `start` under `split`.
15
+ * @param {"default"|"muted"|"split"} [props.variant] `split` sets the heading block beside the questions.
16
16
  * @param {import('react').ReactNode} [props.children] The `AppAccordion` of questions.
17
17
  * @param {number[]} [props.openItems]
18
+ * @param {string} [props.closeLabel] Set on every question's toggle as `data-close-label`, for a stylesheet to show while the question is open. Omitted when unset.
18
19
  * @param {string} [props.className]
19
20
  */
20
21
  export default function AppSectionFaq(props: {
@@ -30,18 +31,20 @@ export default function AppSectionFaq(props: {
30
31
  /** A sentence under the heading ("Still stuck? Write to us."). */
31
32
  subtitle?: import('react').ReactNode;
32
33
  /**
33
- * Where the heading block sits.
34
+ * Where the heading block sits. Under `split` the default is `start`.
34
35
  * @default "center"
35
36
  */
36
37
  align?: "start" | "center";
37
38
  /**
38
- * The section's background.
39
+ * The section's layout and background. `split` sets the heading block beside the questions.
39
40
  * @default "default"
40
41
  */
41
- variant?: "default" | "muted";
42
+ variant?: "default" | "muted" | "split";
42
43
  children?: import('react').ReactNode;
43
44
  /** The positions of the questions that start open, counted from 0. They are passed to the AppAccordion among the children. */
44
45
  openItems?: number[];
46
+ /** The label every question's toggle carries as data-close-label, for a stylesheet to show while the question is open. Omitted when unset. */
47
+ closeLabel?: string;
45
48
  /**
46
49
  * Extra class names for the root element.
47
50
  * @default ""
@@ -188,6 +188,10 @@ export type SearchShape = {
188
188
  * Enter with no suggestion chosen.
189
189
  */
190
190
  onSubmit?: (value: string) => void;
191
+ /**
192
+ * The field got focus (a click, Tab, or the "/" shortcut).
193
+ */
194
+ onFocus?: (event: FocusEvent) => void;
191
195
  /**
192
196
  * Default "Search"; also the field's accessible name.
193
197
  */
@@ -479,7 +483,7 @@ export default function AppShell(props: {
479
483
  userMenu?: UserMenuShape;
480
484
  /** The notification bell. */
481
485
  notifications?: NotificationsShape;
482
- /** The topbar search. */
486
+ /** The topbar search. Its onChange, onSelect, onSubmit and onFocus handlers are passed in code; onFocus runs when the field gets focus, for example to open a command palette. */
483
487
  search?: SearchShape;
484
488
  /**
485
489
  * Extra classes on the shell root.
@@ -6,6 +6,7 @@ export declare const GLYPHS: {
6
6
  "alert-circle": string;
7
7
  "alert-triangle": string;
8
8
  "arrow-down": string;
9
+ "arrow-down-2": string;
9
10
  "arrow-down-up": string;
10
11
  "arrow-left": string;
11
12
  "arrow-left-2": string;
@@ -13,6 +14,7 @@ export declare const GLYPHS: {
13
14
  "arrow-right-2": string;
14
15
  "arrow-swap-horizontal": string;
15
16
  "arrow-up": string;
17
+ "arrow-up-2": string;
16
18
  "arrow-up-right": string;
17
19
  at: string;
18
20
  "badge-check": string;
@@ -122,6 +124,7 @@ export declare const GLYPHS: {
122
124
  "layout-dashboard": string;
123
125
  "layout-grid": string;
124
126
  lightbulb: string;
127
+ "link-2": string;
125
128
  linkedin: string;
126
129
  list: string;
127
130
  lock: string;
@@ -7,6 +7,7 @@ export declare const VARIANT_GLYPHS: {
7
7
  "alert-circle": string;
8
8
  "alert-triangle": string;
9
9
  "arrow-down": string;
10
+ "arrow-down-2": string;
10
11
  "arrow-down-up": string;
11
12
  "arrow-left": string;
12
13
  "arrow-left-2": string;
@@ -14,6 +15,7 @@ export declare const VARIANT_GLYPHS: {
14
15
  "arrow-right-2": string;
15
16
  "arrow-swap-horizontal": string;
16
17
  "arrow-up": string;
18
+ "arrow-up-2": string;
17
19
  "arrow-up-right": string;
18
20
  at: string;
19
21
  "badge-check": string;
@@ -123,6 +125,7 @@ export declare const VARIANT_GLYPHS: {
123
125
  "layout-dashboard": string;
124
126
  "layout-grid": string;
125
127
  lightbulb: string;
128
+ "link-2": string;
126
129
  linkedin: string;
127
130
  list: string;
128
131
  lock: string;
@@ -237,6 +240,7 @@ export declare const VARIANT_GLYPHS: {
237
240
  "alert-circle": string;
238
241
  "alert-triangle": string;
239
242
  "arrow-down": string;
243
+ "arrow-down-2": string;
240
244
  "arrow-down-up": string;
241
245
  "arrow-left": string;
242
246
  "arrow-left-2": string;
@@ -244,6 +248,7 @@ export declare const VARIANT_GLYPHS: {
244
248
  "arrow-right-2": string;
245
249
  "arrow-swap-horizontal": string;
246
250
  "arrow-up": string;
251
+ "arrow-up-2": string;
247
252
  "arrow-up-right": string;
248
253
  at: string;
249
254
  "badge-check": string;
@@ -353,6 +358,7 @@ export declare const VARIANT_GLYPHS: {
353
358
  "layout-dashboard": string;
354
359
  "layout-grid": string;
355
360
  lightbulb: string;
361
+ "link-2": string;
356
362
  linkedin: string;
357
363
  list: string;
358
364
  lock: string;
@@ -467,6 +473,7 @@ export declare const VARIANT_GLYPHS: {
467
473
  "alert-circle": string;
468
474
  "alert-triangle": string;
469
475
  "arrow-down": string;
476
+ "arrow-down-2": string;
470
477
  "arrow-down-up": string;
471
478
  "arrow-left": string;
472
479
  "arrow-left-2": string;
@@ -474,6 +481,7 @@ export declare const VARIANT_GLYPHS: {
474
481
  "arrow-right-2": string;
475
482
  "arrow-swap-horizontal": string;
476
483
  "arrow-up": string;
484
+ "arrow-up-2": string;
477
485
  "arrow-up-right": string;
478
486
  at: string;
479
487
  "badge-check": string;
@@ -583,6 +591,7 @@ export declare const VARIANT_GLYPHS: {
583
591
  "layout-dashboard": string;
584
592
  "layout-grid": string;
585
593
  lightbulb: string;
594
+ "link-2": string;
586
595
  linkedin: string;
587
596
  list: string;
588
597
  lock: string;
@@ -697,6 +706,7 @@ export declare const VARIANT_GLYPHS: {
697
706
  "alert-circle": string;
698
707
  "alert-triangle": string;
699
708
  "arrow-down": string;
709
+ "arrow-down-2": string;
700
710
  "arrow-down-up": string;
701
711
  "arrow-left": string;
702
712
  "arrow-left-2": string;
@@ -704,6 +714,7 @@ export declare const VARIANT_GLYPHS: {
704
714
  "arrow-right-2": string;
705
715
  "arrow-swap-horizontal": string;
706
716
  "arrow-up": string;
717
+ "arrow-up-2": string;
707
718
  "arrow-up-right": string;
708
719
  at: string;
709
720
  "badge-check": string;
@@ -813,6 +824,7 @@ export declare const VARIANT_GLYPHS: {
813
824
  "layout-dashboard": string;
814
825
  "layout-grid": string;
815
826
  lightbulb: string;
827
+ "link-2": string;
816
828
  linkedin: string;
817
829
  list: string;
818
830
  lock: string;
@@ -927,6 +939,7 @@ export declare const VARIANT_GLYPHS: {
927
939
  "alert-circle": string;
928
940
  "alert-triangle": string;
929
941
  "arrow-down": string;
942
+ "arrow-down-2": string;
930
943
  "arrow-down-up": string;
931
944
  "arrow-left": string;
932
945
  "arrow-left-2": string;
@@ -934,6 +947,7 @@ export declare const VARIANT_GLYPHS: {
934
947
  "arrow-right-2": string;
935
948
  "arrow-swap-horizontal": string;
936
949
  "arrow-up": string;
950
+ "arrow-up-2": string;
937
951
  "arrow-up-right": string;
938
952
  at: string;
939
953
  "badge-check": string;
@@ -1043,6 +1057,7 @@ export declare const VARIANT_GLYPHS: {
1043
1057
  "layout-dashboard": string;
1044
1058
  "layout-grid": string;
1045
1059
  lightbulb: string;
1060
+ "link-2": string;
1046
1061
  linkedin: string;
1047
1062
  list: string;
1048
1063
  lock: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-react",
3
- "version": "0.139.4",
3
+ "version": "0.140.1",
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,10 +29,10 @@
29
29
  },
30
30
  "sideEffects": false,
31
31
  "dependencies": {
32
- "@webority/markdown-core": "0.139.4",
33
- "@webority/theme": "0.139.4",
34
- "@webority/ui-elements": "0.139.4",
35
- "@webority/web-core": "0.139.4"
32
+ "@webority/markdown-core": "0.140.1",
33
+ "@webority/theme": "0.140.1",
34
+ "@webority/ui-elements": "0.140.1",
35
+ "@webority/web-core": "0.140.1"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@webority/analytics": "^0.35.0",
@@ -50,8 +50,8 @@
50
50
  "@vitejs/plugin-react": "^6.0.1",
51
51
  "@vitest/coverage-v8": "5.0.1",
52
52
  "@webority/analytics": "0.35.1",
53
- "@webority/canvas-kit": "0.139.4",
54
- "@webority/tokens": "0.139.4",
53
+ "@webority/canvas-kit": "0.140.1",
54
+ "@webority/tokens": "0.140.1",
55
55
  "bootstrap": "5.3.3",
56
56
  "jsdom": "30.1.1",
57
57
  "react": "^19.2.6",