@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.
- package/dist/_constants.js.map +1 -1
- package/dist/chunks/FieldError.CCQnjdMd.js +161 -0
- package/dist/chunks/{FieldError.B8t3zEhf.js.map → FieldError.CCQnjdMd.js.map} +1 -1
- package/dist/chunks/compiler-runtime.hDcrsMwn.js +55 -0
- package/dist/chunks/compiler-runtime.hDcrsMwn.js.map +1 -0
- package/dist/components/atoms/_menu/menu-item/MenuItem.d.ts +2 -2
- package/dist/components/atoms/_menu/menu-item/MenuItem.d.ts.map +1 -1
- package/dist/components/atoms/_menu/menu-item/MenuItem.js +73 -128
- package/dist/components/atoms/_menu/menu-item/MenuItem.js.map +1 -1
- package/dist/components/atoms/_menu/user-menu/UserMenu.d.ts +1 -2
- package/dist/components/atoms/_menu/user-menu/UserMenu.d.ts.map +1 -1
- package/dist/components/atoms/_menu/user-menu/UserMenu.js +72 -72
- package/dist/components/atoms/_menu/user-menu/UserMenu.js.map +1 -1
- package/dist/components/atoms/button/Button.d.ts +2 -2
- package/dist/components/atoms/button/Button.d.ts.map +1 -1
- package/dist/components/atoms/button/Button.js +120 -133
- package/dist/components/atoms/button/Button.js.map +1 -1
- package/dist/components/atoms/icon-button/IconButton.d.ts +6 -1
- package/dist/components/atoms/icon-button/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/icon-button/IconButton.js +50 -50
- package/dist/components/atoms/icon-button/IconButton.js.map +1 -1
- package/dist/components/atoms/input/Input.d.ts +1 -2
- package/dist/components/atoms/input/Input.d.ts.map +1 -1
- package/dist/components/atoms/input/Input.js +51 -56
- package/dist/components/atoms/input/Input.js.map +1 -1
- package/dist/components/atoms/logo/Logo.d.ts +2 -2
- package/dist/components/atoms/logo/Logo.d.ts.map +1 -1
- package/dist/components/atoms/logo/Logo.js +298 -457
- package/dist/components/atoms/logo/Logo.js.map +1 -1
- package/dist/components/atoms/no-permission/NoPermission.d.ts +1 -1
- package/dist/components/atoms/no-permission/NoPermission.d.ts.map +1 -1
- package/dist/components/atoms/no-permission/NoPermission.js +20 -23
- package/dist/components/atoms/no-permission/NoPermission.js.map +1 -1
- package/dist/components/atoms/notification/Notification.d.ts +1 -2
- package/dist/components/atoms/notification/Notification.d.ts.map +1 -1
- package/dist/components/atoms/notification/Notification.js +29 -41
- package/dist/components/atoms/notification/Notification.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Error.d.ts +1 -1
- package/dist/components/atoms/notification/_icons/Error.d.ts.map +1 -1
- package/dist/components/atoms/notification/_icons/Error.js +25 -32
- package/dist/components/atoms/notification/_icons/Error.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Info.d.ts +1 -1
- package/dist/components/atoms/notification/_icons/Info.d.ts.map +1 -1
- package/dist/components/atoms/notification/_icons/Info.js +26 -39
- package/dist/components/atoms/notification/_icons/Info.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Success.d.ts +1 -1
- package/dist/components/atoms/notification/_icons/Success.d.ts.map +1 -1
- package/dist/components/atoms/notification/_icons/Success.js +26 -39
- package/dist/components/atoms/notification/_icons/Success.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Warning.js +23 -38
- package/dist/components/atoms/notification/_icons/Warning.js.map +1 -1
- package/dist/components/atoms/section-header/SectionHeader.d.ts +1 -1
- package/dist/components/atoms/section-header/SectionHeader.d.ts.map +1 -1
- package/dist/components/atoms/section-header/SectionHeader.js +37 -64
- package/dist/components/atoms/section-header/SectionHeader.js.map +1 -1
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.d.ts +1 -2
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.js +23 -35
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.js.map +1 -1
- package/dist/components/atoms/selection-buttons/radio-button/RadioButton.d.ts +1 -2
- package/dist/components/atoms/selection-buttons/radio-button/RadioButton.d.ts.map +1 -1
- package/dist/components/atoms/selection-buttons/radio-button/RadioButton.js +19 -29
- package/dist/components/atoms/selection-buttons/radio-button/RadioButton.js.map +1 -1
- package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.d.ts +1 -2
- package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.d.ts.map +1 -1
- package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.js +26 -29
- package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.js.map +1 -1
- package/dist/components/atoms/table/Table.d.ts +1 -0
- package/dist/components/atoms/table/Table.d.ts.map +1 -1
- package/dist/components/atoms/table/Table.js +173 -202
- package/dist/components/atoms/table/Table.js.map +1 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.d.ts +1 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.d.ts.map +1 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.js +1434 -1523
- package/dist/components/atoms/table/_QuickSearchToolbar.js.map +1 -1
- package/dist/components/atoms/tooltip/Tooltip.js +16 -27
- package/dist/components/atoms/tooltip/Tooltip.js.map +1 -1
- package/dist/components/atoms/zero-width-space/ZeroWidthSpace.d.ts +1 -2
- package/dist/components/atoms/zero-width-space/ZeroWidthSpace.d.ts.map +1 -1
- package/dist/components/atoms/zero-width-space/ZeroWidthSpace.js +16 -7
- package/dist/components/atoms/zero-width-space/ZeroWidthSpace.js.map +1 -1
- package/dist/components/molecules/field-error/FieldError.js +3 -2
- package/dist/components/molecules/field-error/FieldError.js.map +1 -1
- package/dist/components/molecules/file-dropzone/FileDropzone.d.ts +1 -1
- package/dist/components/molecules/file-dropzone/FileDropzone.d.ts.map +1 -1
- package/dist/components/molecules/file-dropzone/FileDropzone.js +90 -79
- package/dist/components/molecules/file-dropzone/FileDropzone.js.map +1 -1
- package/dist/components/molecules/file-table/FileTable.js +4 -14
- package/dist/components/molecules/file-table/FileTable.js.map +1 -1
- package/dist/components/molecules/form-error/FormError.js +3 -2
- package/dist/components/molecules/form-error/FormError.js.map +1 -1
- package/dist/components/molecules/form-modal/FormModal.js +3 -2
- package/dist/components/molecules/form-modal/FormModal.js.map +1 -1
- package/dist/components/molecules/modal/Modal.d.ts +1 -1
- package/dist/components/molecules/modal/Modal.d.ts.map +1 -1
- package/dist/components/molecules/modal/Modal.js +50 -68
- package/dist/components/molecules/modal/Modal.js.map +1 -1
- package/dist/components/molecules/modal-close-button/ModalCloseButton.d.ts +1 -1
- package/dist/components/molecules/modal-close-button/ModalCloseButton.d.ts.map +1 -1
- package/dist/components/molecules/modal-close-button/ModalCloseButton.js +20 -19
- package/dist/components/molecules/modal-close-button/ModalCloseButton.js.map +1 -1
- package/dist/components/molecules/navigation-bar/NavigationBar.d.ts +1 -2
- package/dist/components/molecules/navigation-bar/NavigationBar.d.ts.map +1 -1
- package/dist/components/molecules/navigation-bar/NavigationBar.js +96 -97
- package/dist/components/molecules/navigation-bar/NavigationBar.js.map +1 -1
- package/dist/components/molecules/upload-button/UploadButton.js +36 -33
- package/dist/components/molecules/upload-button/UploadButton.js.map +1 -1
- package/dist/components/organisms/content-page/ContentPage.d.ts +1 -1
- package/dist/components/organisms/content-page/ContentPage.d.ts.map +1 -1
- package/dist/components/organisms/content-page/ContentPage.js +22 -11
- package/dist/components/organisms/content-page/ContentPage.js.map +1 -1
- package/dist/contexts/TanstackFormContext.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +21 -21
- 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": "
|
|
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.
|
|
31
|
+
"@tanstack/react-router": "^1.128.0",
|
|
32
32
|
"clsx": "^2.1.1",
|
|
33
33
|
"lodash": "^4.17.21",
|
|
34
|
-
"react": "^
|
|
35
|
-
"react-dom": "^
|
|
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": "
|
|
45
|
-
"@mui/x-data-grid-generator": "
|
|
46
|
-
"@storybook/addon-a11y": "^9.0.
|
|
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.
|
|
49
|
-
"@storybook/addon-onboarding": "^9.0.
|
|
50
|
-
"@storybook/addon-themes": "^9.0.
|
|
51
|
-
"@storybook/addon-vitest": "9.0.
|
|
52
|
-
"@storybook/react-vite": "^9.0.
|
|
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": "^
|
|
57
|
-
"@types/react-dom": "^
|
|
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
|
-
"
|
|
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.
|
|
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.
|
|
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.
|
|
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": "^
|
|
88
|
-
"react-dom": "^
|
|
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
|