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