@rws-aoa/react-library 6.0.1 → 7.0.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.
Files changed (115) hide show
  1. package/dist/_constants.js.map +1 -1
  2. package/dist/chunks/FieldError.CCQnjdMd.js +161 -0
  3. package/dist/chunks/{FieldError.B8t3zEhf.js.map → FieldError.CCQnjdMd.js.map} +1 -1
  4. package/dist/chunks/compiler-runtime.hDcrsMwn.js +55 -0
  5. package/dist/chunks/compiler-runtime.hDcrsMwn.js.map +1 -0
  6. package/dist/components/atoms/_menu/menu-item/MenuItem.d.ts +2 -2
  7. package/dist/components/atoms/_menu/menu-item/MenuItem.d.ts.map +1 -1
  8. package/dist/components/atoms/_menu/menu-item/MenuItem.js +73 -128
  9. package/dist/components/atoms/_menu/menu-item/MenuItem.js.map +1 -1
  10. package/dist/components/atoms/_menu/user-menu/UserMenu.d.ts +1 -2
  11. package/dist/components/atoms/_menu/user-menu/UserMenu.d.ts.map +1 -1
  12. package/dist/components/atoms/_menu/user-menu/UserMenu.js +72 -72
  13. package/dist/components/atoms/_menu/user-menu/UserMenu.js.map +1 -1
  14. package/dist/components/atoms/button/Button.d.ts +2 -2
  15. package/dist/components/atoms/button/Button.d.ts.map +1 -1
  16. package/dist/components/atoms/button/Button.js +120 -133
  17. package/dist/components/atoms/button/Button.js.map +1 -1
  18. package/dist/components/atoms/icon-button/IconButton.d.ts +6 -1
  19. package/dist/components/atoms/icon-button/IconButton.d.ts.map +1 -1
  20. package/dist/components/atoms/icon-button/IconButton.js +50 -50
  21. package/dist/components/atoms/icon-button/IconButton.js.map +1 -1
  22. package/dist/components/atoms/input/Input.d.ts +1 -2
  23. package/dist/components/atoms/input/Input.d.ts.map +1 -1
  24. package/dist/components/atoms/input/Input.js +51 -56
  25. package/dist/components/atoms/input/Input.js.map +1 -1
  26. package/dist/components/atoms/logo/Logo.d.ts +2 -2
  27. package/dist/components/atoms/logo/Logo.d.ts.map +1 -1
  28. package/dist/components/atoms/logo/Logo.js +298 -457
  29. package/dist/components/atoms/logo/Logo.js.map +1 -1
  30. package/dist/components/atoms/no-permission/NoPermission.d.ts +1 -1
  31. package/dist/components/atoms/no-permission/NoPermission.d.ts.map +1 -1
  32. package/dist/components/atoms/no-permission/NoPermission.js +20 -23
  33. package/dist/components/atoms/no-permission/NoPermission.js.map +1 -1
  34. package/dist/components/atoms/notification/Notification.d.ts +1 -2
  35. package/dist/components/atoms/notification/Notification.d.ts.map +1 -1
  36. package/dist/components/atoms/notification/Notification.js +29 -41
  37. package/dist/components/atoms/notification/Notification.js.map +1 -1
  38. package/dist/components/atoms/notification/_icons/Error.d.ts +1 -1
  39. package/dist/components/atoms/notification/_icons/Error.d.ts.map +1 -1
  40. package/dist/components/atoms/notification/_icons/Error.js +25 -32
  41. package/dist/components/atoms/notification/_icons/Error.js.map +1 -1
  42. package/dist/components/atoms/notification/_icons/Info.d.ts +1 -1
  43. package/dist/components/atoms/notification/_icons/Info.d.ts.map +1 -1
  44. package/dist/components/atoms/notification/_icons/Info.js +26 -39
  45. package/dist/components/atoms/notification/_icons/Info.js.map +1 -1
  46. package/dist/components/atoms/notification/_icons/Success.d.ts +1 -1
  47. package/dist/components/atoms/notification/_icons/Success.d.ts.map +1 -1
  48. package/dist/components/atoms/notification/_icons/Success.js +26 -39
  49. package/dist/components/atoms/notification/_icons/Success.js.map +1 -1
  50. package/dist/components/atoms/notification/_icons/Warning.js +23 -38
  51. package/dist/components/atoms/notification/_icons/Warning.js.map +1 -1
  52. package/dist/components/atoms/section-header/SectionHeader.d.ts +1 -1
  53. package/dist/components/atoms/section-header/SectionHeader.d.ts.map +1 -1
  54. package/dist/components/atoms/section-header/SectionHeader.js +37 -64
  55. package/dist/components/atoms/section-header/SectionHeader.js.map +1 -1
  56. package/dist/components/atoms/selection-buttons/checkbox/Checkbox.d.ts +1 -2
  57. package/dist/components/atoms/selection-buttons/checkbox/Checkbox.d.ts.map +1 -1
  58. package/dist/components/atoms/selection-buttons/checkbox/Checkbox.js +23 -35
  59. package/dist/components/atoms/selection-buttons/checkbox/Checkbox.js.map +1 -1
  60. package/dist/components/atoms/selection-buttons/radio-button/RadioButton.d.ts +1 -2
  61. package/dist/components/atoms/selection-buttons/radio-button/RadioButton.d.ts.map +1 -1
  62. package/dist/components/atoms/selection-buttons/radio-button/RadioButton.js +19 -29
  63. package/dist/components/atoms/selection-buttons/radio-button/RadioButton.js.map +1 -1
  64. package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.d.ts +1 -2
  65. package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.d.ts.map +1 -1
  66. package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.js +26 -29
  67. package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.js.map +1 -1
  68. package/dist/components/atoms/table/Table.d.ts +1 -0
  69. package/dist/components/atoms/table/Table.d.ts.map +1 -1
  70. package/dist/components/atoms/table/Table.js +173 -202
  71. package/dist/components/atoms/table/Table.js.map +1 -1
  72. package/dist/components/atoms/table/_QuickSearchToolbar.d.ts +1 -1
  73. package/dist/components/atoms/table/_QuickSearchToolbar.d.ts.map +1 -1
  74. package/dist/components/atoms/table/_QuickSearchToolbar.js +1434 -1523
  75. package/dist/components/atoms/table/_QuickSearchToolbar.js.map +1 -1
  76. package/dist/components/atoms/tooltip/Tooltip.js +16 -27
  77. package/dist/components/atoms/tooltip/Tooltip.js.map +1 -1
  78. package/dist/components/atoms/zero-width-space/ZeroWidthSpace.d.ts +1 -2
  79. package/dist/components/atoms/zero-width-space/ZeroWidthSpace.d.ts.map +1 -1
  80. package/dist/components/atoms/zero-width-space/ZeroWidthSpace.js +16 -7
  81. package/dist/components/atoms/zero-width-space/ZeroWidthSpace.js.map +1 -1
  82. package/dist/components/molecules/field-error/FieldError.js +3 -2
  83. package/dist/components/molecules/field-error/FieldError.js.map +1 -1
  84. package/dist/components/molecules/file-dropzone/FileDropzone.d.ts +1 -1
  85. package/dist/components/molecules/file-dropzone/FileDropzone.d.ts.map +1 -1
  86. package/dist/components/molecules/file-dropzone/FileDropzone.js +90 -79
  87. package/dist/components/molecules/file-dropzone/FileDropzone.js.map +1 -1
  88. package/dist/components/molecules/file-table/FileTable.js +4 -14
  89. package/dist/components/molecules/file-table/FileTable.js.map +1 -1
  90. package/dist/components/molecules/form-error/FormError.js +3 -2
  91. package/dist/components/molecules/form-error/FormError.js.map +1 -1
  92. package/dist/components/molecules/form-modal/FormModal.js +3 -2
  93. package/dist/components/molecules/form-modal/FormModal.js.map +1 -1
  94. package/dist/components/molecules/modal/Modal.d.ts +1 -1
  95. package/dist/components/molecules/modal/Modal.d.ts.map +1 -1
  96. package/dist/components/molecules/modal/Modal.js +50 -68
  97. package/dist/components/molecules/modal/Modal.js.map +1 -1
  98. package/dist/components/molecules/modal-close-button/ModalCloseButton.d.ts +1 -1
  99. package/dist/components/molecules/modal-close-button/ModalCloseButton.d.ts.map +1 -1
  100. package/dist/components/molecules/modal-close-button/ModalCloseButton.js +20 -19
  101. package/dist/components/molecules/modal-close-button/ModalCloseButton.js.map +1 -1
  102. package/dist/components/molecules/navigation-bar/NavigationBar.d.ts +1 -2
  103. package/dist/components/molecules/navigation-bar/NavigationBar.d.ts.map +1 -1
  104. package/dist/components/molecules/navigation-bar/NavigationBar.js +96 -97
  105. package/dist/components/molecules/navigation-bar/NavigationBar.js.map +1 -1
  106. package/dist/components/molecules/upload-button/UploadButton.js +36 -33
  107. package/dist/components/molecules/upload-button/UploadButton.js.map +1 -1
  108. package/dist/components/organisms/content-page/ContentPage.d.ts +1 -1
  109. package/dist/components/organisms/content-page/ContentPage.d.ts.map +1 -1
  110. package/dist/components/organisms/content-page/ContentPage.js +22 -11
  111. package/dist/components/organisms/content-page/ContentPage.js.map +1 -1
  112. package/dist/contexts/TanstackFormContext.js +1 -1
  113. package/dist/index.js +1 -1
  114. package/package.json +21 -21
  115. package/dist/chunks/FieldError.B8t3zEhf.js +0 -143
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rws-aoa/react-library",
3
- "version": "6.0.1",
3
+ "version": "7.0.1",
4
4
  "description": "RWS AOA Design System",
5
5
  "author": "@rws-aoa",
6
6
  "license": "Apache-2.0",
@@ -28,12 +28,11 @@
28
28
  "@emotion/styled": "^11.14.1",
29
29
  "@mui/icons-material": "^7.2.0",
30
30
  "@mui/material": "^7.2.0",
31
- "@tanstack/react-router": "^1.125.6",
31
+ "@tanstack/react-router": "^1.128.0",
32
32
  "clsx": "^2.1.1",
33
33
  "lodash": "^4.17.21",
34
- "react": "^18.3.1",
35
- "react-dom": "^18.3.1",
36
- "react-is": "^18.3.1"
34
+ "react": "^19.1.0",
35
+ "react-dom": "^19.1.0"
37
36
  },
38
37
  "devDependencies": {
39
38
  "@chromatic-com/storybook": "^4.0.1",
@@ -41,36 +40,37 @@
41
40
  "@fontsource/material-icons": "^5.2.5",
42
41
  "@fontsource/roboto": "^5.2.6",
43
42
  "@mui/system": "^7.2.0",
44
- "@mui/x-data-grid": "latest",
45
- "@mui/x-data-grid-generator": "latest",
46
- "@storybook/addon-a11y": "^9.0.16",
43
+ "@mui/x-data-grid": "^8.8.0",
44
+ "@mui/x-data-grid-generator": "^8.8.0",
45
+ "@storybook/addon-a11y": "^9.0.17",
47
46
  "@storybook/addon-console": "^3.0.0",
48
- "@storybook/addon-docs": "^9.0.16",
49
- "@storybook/addon-onboarding": "^9.0.16",
50
- "@storybook/addon-themes": "^9.0.16",
51
- "@storybook/addon-vitest": "9.0.16",
52
- "@storybook/react-vite": "^9.0.16",
47
+ "@storybook/addon-docs": "^9.0.17",
48
+ "@storybook/addon-onboarding": "^9.0.17",
49
+ "@storybook/addon-themes": "^9.0.17",
50
+ "@storybook/addon-vitest": "9.0.17",
51
+ "@storybook/react-vite": "^9.0.17",
53
52
  "@tanstack/react-form": "1.14.1",
54
53
  "@types/lodash": "^4.17.20",
55
54
  "@types/lodash.merge": "^4.6.9",
56
- "@types/react": "^18.3.23",
57
- "@types/react-dom": "^18.3.7",
55
+ "@types/react": "^19.1.8",
56
+ "@types/react-dom": "^19.1.6",
58
57
  "@vitejs/plugin-react": "^4.6.0",
59
58
  "@vitest/browser": "^3.2.4",
60
59
  "@vitest/coverage-v8": "^3.2.4",
61
- "eslint": "^9.30.1",
60
+ "babel-plugin-react-compiler": "^19.1.0-rc.2",
61
+ "eslint": "^9.31.0",
62
62
  "glob": "^11.0.3",
63
63
  "npm-run-all2": "^8.0.4",
64
- "playwright": "^1.53.2",
64
+ "playwright": "^1.54.1",
65
65
  "prettier": "^3.6.2",
66
66
  "react-dropzone": "^14.3.8",
67
67
  "react-toastify": "^11.0.5",
68
68
  "remark-gfm": "^4.0.1",
69
- "storybook": "^9.0.16",
69
+ "storybook": "^9.0.17",
70
70
  "stylelint": "^16.21.1",
71
71
  "tslib": "^2.8.1",
72
72
  "typescript": "^5.8.3",
73
- "vite": "^7.0.3",
73
+ "vite": "^7.0.5",
74
74
  "vite-plugin-checker": "^0.10.0",
75
75
  "vite-plugin-dts": "^4.5.4",
76
76
  "vite-plugin-lib-inject-css": "^2.2.2",
@@ -84,8 +84,8 @@
84
84
  "@mui/x-data-grid": "*",
85
85
  "@tanstack/react-form": "^1.14.1",
86
86
  "@tanstack/react-router": "*",
87
- "react": "^18.3.1",
88
- "react-dom": "^18.3.1",
87
+ "react": "^19.1.0",
88
+ "react-dom": "^19.1.0",
89
89
  "react-dropzone": "^14.3.8",
90
90
  "react-toastify": "^11.0.5"
91
91
  },
@@ -1,143 +0,0 @@
1
- import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
- import { createFormHookContexts as q, createFormHook as A } from "@tanstack/react-form";
3
- import { AoaNotification as i } from "../components/atoms/notification/Notification.js";
4
- import { Dialog as v, DialogTitle as B, DialogContent as w, DialogActions as S } from "@mui/material";
5
- import { l as j } from "./lodash.CA_K01A9.js";
6
- import { AoaButton as d } from "../components/atoms/button/Button.js";
7
- import { AoaModalCloseButton as D } from "../components/molecules/modal-close-button/ModalCloseButton.js";
8
- function T({ "data-qa": r }) {
9
- const a = g();
10
- return /* @__PURE__ */ t(a.Subscribe, { selector: (e) => e.errors, children: (e) => {
11
- if (e.length) {
12
- const o = e.at(0);
13
- if (typeof o == "string")
14
- return /* @__PURE__ */ t(i, { "data-qa": r ?? "form-error", message: o, severity: "error" });
15
- if (o && typeof o == "object") {
16
- const s = ["error", "info", "success", "warning"].includes(o.level) ? o.level : "error";
17
- return /* @__PURE__ */ t(i, { "data-qa": r ?? "form-error", message: o.message, severity: s });
18
- }
19
- }
20
- return null;
21
- } });
22
- }
23
- function k({
24
- formModalQas: r,
25
- formLabels: a,
26
- formName: e,
27
- DialogProps: o,
28
- DialogTitleProps: s,
29
- DialogContentProps: u,
30
- AoaSubmitButtonProps: { disableWithFormState: x, ...f } = {},
31
- modalQas: m,
32
- open: h,
33
- topic: y,
34
- dialogContent: C,
35
- closeAction: p
36
- }) {
37
- const l = g(), F = x ? /* @__PURE__ */ t(l.Subscribe, { selector: (n) => [n.isSubmitting, n.canSubmit], children: ([n, b]) => /* @__PURE__ */ t(
38
- d,
39
- {
40
- ...f,
41
- "aria-disabled": n || !b,
42
- buttonType: "submit",
43
- "data-qa": r?.submitButton ?? "submit-form",
44
- disabled: n || !b,
45
- type: "primary",
46
- children: a.submit
47
- }
48
- ) }) : /* @__PURE__ */ t(
49
- d,
50
- {
51
- ...f,
52
- buttonType: "submit",
53
- "data-qa": r?.submitButton ?? "submit-form",
54
- type: "primary",
55
- children: a.submit
56
- }
57
- );
58
- return /* @__PURE__ */ c(v, { ...o, "data-qa": m?.modal ?? "modal", open: !!h, children: [
59
- /* @__PURE__ */ t(B, { ...s, "data-qa": m?.title ?? "modal-title", maxWidth: "sm", sx: { m: 0, p: 2 }, children: y }),
60
- /* @__PURE__ */ t(D, { closeAction: p }),
61
- /* @__PURE__ */ c(
62
- "form",
63
- {
64
- "data-qa": r?.form ?? "form",
65
- name: e,
66
- onSubmit: async (n) => {
67
- n.preventDefault(), n.stopPropagation(), await l.handleSubmit();
68
- },
69
- children: [
70
- /* @__PURE__ */ t(
71
- w,
72
- {
73
- ...u,
74
- "data-qa": m?.content ?? "modal-content",
75
- sx: j.merge(
76
- {
77
- padding: "0 3rem 2rem"
78
- },
79
- u?.sx
80
- ),
81
- children: C
82
- }
83
- ),
84
- /* @__PURE__ */ c(S, { "data-qa": r?.dialogActions ?? "dialog-actions", children: [
85
- /* @__PURE__ */ t(
86
- d,
87
- {
88
- "data-qa": r?.cancelButton ?? "cancel-form",
89
- onClick: () => {
90
- l.reset(), p();
91
- },
92
- type: "secondary",
93
- children: a.cancel
94
- }
95
- ),
96
- F
97
- ] })
98
- ]
99
- }
100
- )
101
- ] });
102
- }
103
- const {
104
- fieldContext: E,
105
- formContext: H,
106
- useFieldContext: N,
107
- useFormContext: g
108
- } = q(), { useAppForm: P, withForm: R } = A({
109
- fieldContext: E,
110
- formContext: H,
111
- fieldComponents: {
112
- AoaFieldError: W
113
- },
114
- formComponents: {
115
- AoaFormModal: k,
116
- AoaFormError: T
117
- }
118
- });
119
- function W({ "data-qa": r }) {
120
- const a = N();
121
- if (a.state.meta.isTouched && a.state.meta.errors.length) {
122
- const e = a.state.meta.errors.at(0);
123
- if (typeof e == "string")
124
- return /* @__PURE__ */ t(i, { "data-qa": r ?? "field-error", message: e, severity: "error" });
125
- if (e && typeof e == "object") {
126
- const o = ["error", "info", "success", "warning"].includes(e.level) ? e.level : "error";
127
- return /* @__PURE__ */ t(i, { "data-qa": r ?? "field-error", message: e.message, severity: o });
128
- }
129
- }
130
- return null;
131
- }
132
- export {
133
- W as A,
134
- T as a,
135
- k as b,
136
- E as c,
137
- H as d,
138
- N as e,
139
- g as f,
140
- P as u,
141
- R as w
142
- };
143
- //# sourceMappingURL=FieldError.B8t3zEhf.js.map