@mnbsolutions/framework-frontend 0.0.0-stage → 4.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/LICENSE +202 -0
- package/README.md +88 -2
- package/dist/esm/types/MuiClassNameSetup.d.ts +1 -0
- package/dist/esm/types/components/AdminLoginForm/AdminLoginForm.d.ts +89 -0
- package/dist/esm/types/components/AdminLoginForm/AdminLoginForm.stories.d.ts +11 -0
- package/dist/esm/types/components/AdminLoginForm/index.d.ts +3 -0
- package/dist/esm/types/components/Autocomplete/Autocomplete.d.ts +8 -0
- package/dist/esm/types/components/Autocomplete/Autocomplete.stories.d.ts +17 -0
- package/dist/esm/types/components/Autocomplete/AutocompleteOld.d.ts +7 -0
- package/dist/esm/types/components/Button/Button.d.ts +10 -0
- package/dist/esm/types/components/Button/Button.stories.d.ts +10 -0
- package/dist/esm/types/components/Captcha/CaptchaAccessibilityTest.d.ts +1 -0
- package/dist/esm/types/components/Captcha/CaptchaClientTest.d.ts +1 -0
- package/dist/esm/types/components/Captcha/CaptchaDebugTest.d.ts +1 -0
- package/dist/esm/types/components/Captcha/CaptchaDebugger.d.ts +1 -0
- package/dist/esm/types/components/Captcha/CaptchaExample.d.ts +1 -0
- package/dist/esm/types/components/Captcha/CaptchaStatusDebugger.d.ts +1 -0
- package/dist/esm/types/components/Captcha/CaptchaTest.d.ts +1 -0
- package/dist/esm/types/components/Captcha/CaptchaTroubleshoot.d.ts +2 -0
- package/dist/esm/types/components/Captcha/CaptchaWidget.d.ts +27 -0
- package/dist/esm/types/components/Captcha/CaptchaWidget.stories.d.ts +31 -0
- package/dist/esm/types/components/Captcha/CaptchaWidgetTest.d.ts +4 -0
- package/dist/esm/types/components/Captcha/ComprehensiveTest.d.ts +1 -0
- package/dist/esm/types/components/Captcha/FinalValidationTest.d.ts +1 -0
- package/dist/esm/types/components/Captcha/SimpleValidationTest.d.ts +1 -0
- package/dist/esm/types/components/Captcha/SubmitOnlyValidationTest.d.ts +1 -0
- package/dist/esm/types/components/Captcha/ValidationTest.d.ts +1 -0
- package/dist/esm/types/components/Captcha/hooks/useCaptchaForm.d.ts +14 -0
- package/dist/esm/types/components/Captcha/hooks/useCaptchaToken.d.ts +9 -0
- package/dist/esm/types/components/Captcha/hooks/useCaptchaValidation.d.ts +11 -0
- package/dist/esm/types/components/Captcha/types/captcha.d.ts +52 -0
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +18 -0
- package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +12 -0
- package/dist/esm/types/components/ConfigContext/ConfigContext.d.ts +10 -0
- package/dist/esm/types/components/ConfigContext/ConfigContext.types.d.ts +8 -0
- package/dist/esm/types/components/ConfigContext/index.d.ts +2 -0
- package/dist/esm/types/components/ContactLink/ContactLink.d.ts +7 -0
- package/dist/esm/types/components/ContactLink/ContactLink.stories.d.ts +7 -0
- package/dist/esm/types/components/ContactLink/index.d.ts +2 -0
- package/dist/esm/types/components/DataTable/DataTable.d.ts +14 -0
- package/dist/esm/types/components/DataTable/DataTable.stories.d.ts +16 -0
- package/dist/esm/types/components/DataTable/index.d.ts +3 -0
- package/dist/esm/types/components/DataTable/locales/deDE.d.ts +6 -0
- package/dist/esm/types/components/DataTable/locales/index.d.ts +7 -0
- package/dist/esm/types/components/DataTable/types.d.ts +127 -0
- package/dist/esm/types/components/DatePicker/DatePicker.d.ts +12 -0
- package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +15 -0
- package/dist/esm/types/components/Dropdown/Dropdown.d.ts +14 -0
- package/dist/esm/types/components/Experimental/UrlField/UrlField.d.ts +34 -0
- package/dist/esm/types/components/Experimental/UrlField/UrlField.stories.d.ts +6 -0
- package/dist/esm/types/components/Experimental/UrlField/index.d.ts +3 -0
- package/dist/esm/types/components/Fields/makeCustomAddressAutocompleteRHF.d.ts +40 -0
- package/dist/esm/types/components/Fields/makeCustomAutocompleteRHF.d.ts +40 -0
- package/dist/esm/types/components/Fields/makeCustomCheckboxRHF.d.ts +53 -0
- package/dist/esm/types/components/Fields/makeCustomDatePickerRHF.d.ts +22 -0
- package/dist/esm/types/components/Fields/makeCustomInputRHF.d.ts +25 -0
- package/dist/esm/types/components/Fields/makeCustomRadioRHF.d.ts +41 -0
- package/dist/esm/types/components/FieldsetLegend/FieldsetLegend.d.ts +58 -0
- package/dist/esm/types/components/FileUpload/FileUpload.d.ts +23 -0
- package/dist/esm/types/components/FileUpload/FileUpload.stories.d.ts +16 -0
- package/dist/esm/types/components/FileUpload/FileUpload2.d.ts +18 -0
- package/dist/esm/types/components/FileUpload/ShowUploadFiles.d.ts +20 -0
- package/dist/esm/types/components/FileUpload/ShowUploadFiles2.d.ts +19 -0
- package/dist/esm/types/components/FileUpload/UploadField.d.ts +28 -0
- package/dist/esm/types/components/FileUpload/UploadField.stories.d.ts +8 -0
- package/dist/esm/types/components/FileUpload/UploadField2.d.ts +33 -0
- package/dist/esm/types/components/FileUpload/UploadField2.stories.d.ts +10 -0
- package/dist/esm/types/components/FileUpload/types.d.ts +8 -0
- package/dist/esm/types/components/FormControlLabel/FormControlLabel.d.ts +7 -0
- package/dist/esm/types/components/ImageUploadCrop/ImageUploadCrop.d.ts +34 -0
- package/dist/esm/types/components/ImageUploadCrop/ImageUploadCrop.stories.d.ts +6 -0
- package/dist/esm/types/components/ImageUploadCrop/index.d.ts +3 -0
- package/dist/esm/types/components/InfoTooltipIcon/InfoTooltipIcon.d.ts +18 -0
- package/dist/esm/types/components/InfoTooltipIcon/InfoTooltipIcon.stories.d.ts +7 -0
- package/dist/esm/types/components/InfoTooltipIcon/TooltipWrapper.d.ts +35 -0
- package/dist/esm/types/components/InfoTooltipIcon/TooltipWrapper.stories.d.ts +7 -0
- package/dist/esm/types/components/LinkButton/LinkButton.d.ts +16 -0
- package/dist/esm/types/components/LinkButton/LinkButton.stories.d.ts +16 -0
- package/dist/esm/types/components/LocalizationProvider/LocalizationProvider.d.ts +8 -0
- package/dist/esm/types/components/Modal/MnbModal.d.ts +31 -0
- package/dist/esm/types/components/Modal/MnbModal.stories.d.ts +9 -0
- package/dist/esm/types/components/Notification/NotificationExample.d.ts +1 -0
- package/dist/esm/types/components/Notification/NotificationSystem.d.ts +81 -0
- package/dist/esm/types/components/Notification/NotificationTest.d.ts +1 -0
- package/dist/esm/types/components/Notification/ToastContainer.d.ts +182 -0
- package/dist/esm/types/components/PrivacyLink/PrivacyLink.d.ts +13 -0
- package/dist/esm/types/components/PrivacyLink/PrivacyLink.stories.d.ts +6 -0
- package/dist/esm/types/components/Radio/Radio.d.ts +31 -0
- package/dist/esm/types/components/Radio/Radio.stories.d.ts +13 -0
- package/dist/esm/types/components/Radio/RadioWCAG.d.ts +35 -0
- package/dist/esm/types/components/RequiredFieldsInfo/RequiredFieldsInfo.d.ts +34 -0
- package/dist/esm/types/components/RequiredFieldsInfo/RequiredFieldsInfo.stories.d.ts +7 -0
- package/dist/esm/types/components/RichTextEditor/RichTextEditor.d.ts +13 -0
- package/dist/esm/types/components/RichTextEditor/RichTextEditor.stories.d.ts +6 -0
- package/dist/esm/types/components/RichTextEditor/index.d.ts +3 -0
- package/dist/esm/types/components/Select/Select.d.ts +19 -0
- package/dist/esm/types/components/Select/Select.stories.d.ts +14 -0
- package/dist/esm/types/components/StatusTimeline/StatusTimeline.d.ts +38 -0
- package/dist/esm/types/components/StatusTimeline/StatusTimeline.stories.d.ts +7 -0
- package/dist/esm/types/components/StatusTimeline/index.d.ts +3 -0
- package/dist/esm/types/components/SvgIcon/SvgIcon.d.ts +27 -0
- package/dist/esm/types/components/SvgIcon/SvgIcon.stories.d.ts +7 -0
- package/dist/esm/types/components/TextField/TextField.d.ts +6 -0
- package/dist/esm/types/components/TextField/TextField.stories.d.ts +14 -0
- package/dist/esm/types/components/ThemeWrapper/ThemeWrapper.d.ts +9 -0
- package/dist/esm/types/components/UsercentricsAllowScreen/UsercentricsAllowScreen.d.ts +8 -0
- package/dist/esm/types/components/Wizard/NavigateItem.d.ts +28 -0
- package/dist/esm/types/components/Wizard/Wizard.d.ts +30 -0
- package/dist/esm/types/components/Wizard/Wizard.stories.d.ts +7 -0
- package/dist/esm/types/components/Wizard/Wizard.types.d.ts +17 -0
- package/dist/esm/types/components/Wizard/WizardAccessibilityTest.d.ts +1 -0
- package/dist/esm/types/components/Wizard/WizardTest.d.ts +1 -0
- package/dist/esm/types/hooks/useUserCentrics.d.ts +42 -0
- package/dist/esm/types/index.d.ts +95 -0
- package/dist/esm/types/stories/ThemeViewer.stories.d.ts +7 -0
- package/dist/esm/types/stories/decorators.d.ts +2 -0
- package/dist/esm/types/utils/accessibility.d.ts +94 -0
- package/dist/esm/types/utils/createFormField.d.ts +19 -0
- package/dist/esm/types/utils/pdfAccessibilityUtils.d.ts +213 -0
- package/dist/esm/types/utils/utils.d.ts +6 -0
- package/dist/index.d.ts +1777 -0
- package/dist/index.esm.js +29 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/package.json +112 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,89 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @mnbsolutions/framework-frontend
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
React component library of the MNB Framework, built on [MUI](https://mui.com/) 6 and
|
|
4
|
+
[MUI X](https://mui.com/x/) 7. It provides accessible (WCAG) form fields, a wizard, a data table,
|
|
5
|
+
notifications, a rich text editor and other building blocks for MNB applications, with
|
|
6
|
+
[React Hook Form](https://react-hook-form.com/) integration.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install @mnbsolutions/framework-frontend
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The library does not bundle React, MUI or the other UI libraries it builds on. Install them in your
|
|
15
|
+
application (versions as listed in `peerDependencies`):
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install react react-dom \
|
|
19
|
+
@mui/material @mui/icons-material @mui/styled-engine \
|
|
20
|
+
@mui/x-data-grid @mui/x-data-grid-pro @mui/x-date-pickers-pro @mui/x-license \
|
|
21
|
+
@emotion/react @emotion/styled @emotion/cache @emotion/server \
|
|
22
|
+
react-hook-form moment lodash classnames nanoid \
|
|
23
|
+
react-quill-new quill-table-better cropperjs react-cropper
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Pre-release builds of pull requests are published with the `preview` dist-tag
|
|
27
|
+
(`npm install @mnbsolutions/framework-frontend@preview`).
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
Wrap the application in `MnbThemeWrapper` (MUI `ThemeProvider` + `CssBaseline`) and use the components:
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import {
|
|
35
|
+
MnbThemeWrapper,
|
|
36
|
+
MnbButton,
|
|
37
|
+
MnbTextField,
|
|
38
|
+
NotificationProvider,
|
|
39
|
+
createTheme
|
|
40
|
+
} from '@mnbsolutions/framework-frontend';
|
|
41
|
+
|
|
42
|
+
const theme = createTheme();
|
|
43
|
+
|
|
44
|
+
export function App() {
|
|
45
|
+
return (
|
|
46
|
+
<MnbThemeWrapper theme={theme}>
|
|
47
|
+
<NotificationProvider>
|
|
48
|
+
<MnbTextField label="Name" />
|
|
49
|
+
<MnbButton variant="contained">Save</MnbButton>
|
|
50
|
+
</NotificationProvider>
|
|
51
|
+
</MnbThemeWrapper>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The package also re-exports MUI (`@mui/material`, `@mui/material/styles`), MUI X (data grid, date
|
|
57
|
+
pickers) and React Hook Form, so an application can import everything from one place and always
|
|
58
|
+
gets the versions the components were built with.
|
|
59
|
+
|
|
60
|
+
The data grid and date pickers are MUI X **Pro** components. Set your MUI X license key once at startup:
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { LicenseInfo } from '@mnbsolutions/framework-frontend';
|
|
64
|
+
|
|
65
|
+
LicenseInfo.setLicenseKey('<your MUI X license key>');
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Components
|
|
69
|
+
|
|
70
|
+
| Area | Exports |
|
|
71
|
+
|---|---|
|
|
72
|
+
| Form fields | `MnbTextField`, `MnbSelect`, `MnbDropdown`, `MnbAutocomplete`, `MnbCheckbox`, `MnbRadio`, `MnbRadioGroup`, `MnbRadioWCAG`, `MnbRadioGroupWCAG`, `MnbDatePicker`, `MnbFormControlLabel`, `MnbRichTextEditor`, `MnbImageUploadCrop` |
|
|
73
|
+
| React Hook Form | `createFormField`, `makeCustomInputRHF`, `makeCustomCheckboxRHF`, `makeCustomRadioRHF`, `makeCustomAutocompleteRHF`, `makeCustomAddressAutocompleteRHF`, `makeCustomDatePickerRHF` |
|
|
74
|
+
| Layout and flow | `MnbWizard`, `MnbModal`, `MnbDataTable`, `MnbStatusTimeline`, `AdminLoginForm` |
|
|
75
|
+
| Buttons and links | `MnbButton`, `MnbLinkButton`, `MnbPrivacyLink`, `MnbContactLink` |
|
|
76
|
+
| Feedback | `NotificationProvider`, `useNotification`, `MnbInfoTooltipIcon`, `MnbTooltipWrapper` |
|
|
77
|
+
| Setup | `MnbThemeWrapper`, `MnbLocalizationProvider`, `ConfigProvider`, `useConfigContext` |
|
|
78
|
+
| Accessibility | PDF accessibility helpers (`pdfAccessibilityUtils`) |
|
|
79
|
+
|
|
80
|
+
All components are typed; the type definitions ship with the package.
|
|
81
|
+
|
|
82
|
+
## Versioning
|
|
83
|
+
|
|
84
|
+
Releases follow [semantic versioning](https://semver.org/). Every release from `main` increments
|
|
85
|
+
the patch version; breaking changes increment the major version.
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
[Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AdminLoginFormColors {
|
|
3
|
+
/** Background gradient for the main container */
|
|
4
|
+
backgroundGradient?: string;
|
|
5
|
+
/** Background color for the paper card */
|
|
6
|
+
paperBackground?: string;
|
|
7
|
+
/** Icon container gradient */
|
|
8
|
+
iconGradient?: string;
|
|
9
|
+
/** Icon container shadow color */
|
|
10
|
+
iconShadowColor?: string;
|
|
11
|
+
/** Title text color */
|
|
12
|
+
titleColor?: string;
|
|
13
|
+
/** Subtitle text color */
|
|
14
|
+
subtitleColor?: string;
|
|
15
|
+
/** Description text color */
|
|
16
|
+
descriptionColor?: string;
|
|
17
|
+
/** Button gradient */
|
|
18
|
+
buttonGradient?: string;
|
|
19
|
+
/** Button hover gradient */
|
|
20
|
+
buttonHoverGradient?: string;
|
|
21
|
+
/** Button shadow color */
|
|
22
|
+
buttonShadowColor?: string;
|
|
23
|
+
/** Button hover shadow color */
|
|
24
|
+
buttonHoverShadowColor?: string;
|
|
25
|
+
/** Error alert text color */
|
|
26
|
+
errorTextColor?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface AdminLoginFormTexts {
|
|
29
|
+
/** Main title (e.g., "Willkommen") */
|
|
30
|
+
title?: string;
|
|
31
|
+
/** Subtitle (e.g., "HS Kundenportal Administration") */
|
|
32
|
+
subtitle?: string;
|
|
33
|
+
/** Description text above the login button */
|
|
34
|
+
description?: string;
|
|
35
|
+
/** Login button text */
|
|
36
|
+
loginButtonText?: string;
|
|
37
|
+
/** Loading/processing button text */
|
|
38
|
+
processingButtonText?: string;
|
|
39
|
+
/** Error message for missing configuration */
|
|
40
|
+
configErrorText?: string;
|
|
41
|
+
/** Error message for login in progress */
|
|
42
|
+
loginInProgressErrorText?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface AdminLoginFormProps {
|
|
45
|
+
/** Handler function called when login button is clicked */
|
|
46
|
+
onLogin: () => void | Promise<void>;
|
|
47
|
+
/** Error message to display (if any) */
|
|
48
|
+
errorMessage?: string | null;
|
|
49
|
+
/** Whether the form is ready (config loaded) */
|
|
50
|
+
isReady: boolean;
|
|
51
|
+
/** Whether an interaction is in progress (e.g., MSAL InteractionStatus.None check) */
|
|
52
|
+
isInteractionInProgress?: boolean;
|
|
53
|
+
/** Whether login is currently in progress */
|
|
54
|
+
isLoggingIn: boolean;
|
|
55
|
+
/** Custom colors for styling */
|
|
56
|
+
colors?: AdminLoginFormColors;
|
|
57
|
+
/** Custom texts for labels and messages */
|
|
58
|
+
texts?: AdminLoginFormTexts;
|
|
59
|
+
/** Additional CSS class name */
|
|
60
|
+
className?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* AdminLoginForm Component
|
|
64
|
+
*
|
|
65
|
+
* A flexible login form component for Azure AD authentication with customizable
|
|
66
|
+
* texts and colors. Designed to be used within MSAL's UnauthenticatedTemplate.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* <UnauthenticatedTemplate>
|
|
71
|
+
* <AdminLoginForm
|
|
72
|
+
* onLogin={handleLogin}
|
|
73
|
+
* errorMessage={errorMessage}
|
|
74
|
+
* isReady={isReady}
|
|
75
|
+
* inProgress={inProgress}
|
|
76
|
+
* isLoggingIn={isLoggingIn}
|
|
77
|
+
* texts={{
|
|
78
|
+
* title: "Welcome",
|
|
79
|
+
* subtitle: "My Application"
|
|
80
|
+
* }}
|
|
81
|
+
* colors={{
|
|
82
|
+
* buttonGradient: "linear-gradient(135deg, #00749d 0%, #006081 100%)"
|
|
83
|
+
* }}
|
|
84
|
+
* />
|
|
85
|
+
* </UnauthenticatedTemplate>
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
declare const AdminLoginForm: React.FC<AdminLoginFormProps>;
|
|
89
|
+
export default AdminLoginForm;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import AdminLoginForm from "./AdminLoginForm";
|
|
3
|
+
declare const meta: Meta<typeof AdminLoginForm>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AdminLoginForm>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithError: Story;
|
|
8
|
+
export declare const CustomTexts: Story;
|
|
9
|
+
export declare const CustomColors: Story;
|
|
10
|
+
export declare const FullCustomization: Story;
|
|
11
|
+
export declare const WithLongError: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AutocompleteProps } from '@mui/material';
|
|
3
|
+
export interface MyAutocompleteProps extends AutocompleteProps<any, any, any, any, any> {
|
|
4
|
+
label: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Autocomplete: React.ForwardRefExoticComponent<Omit<MyAutocompleteProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export default Autocomplete;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import MnbAutocomplete from "./Autocomplete";
|
|
3
|
+
declare const meta: Meta<typeof MnbAutocomplete>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof MnbAutocomplete>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Required: Story;
|
|
8
|
+
export declare const WithObjectOptions: Story;
|
|
9
|
+
export declare const Multiple: Story;
|
|
10
|
+
export declare const FreeSolo: Story;
|
|
11
|
+
export declare const Disabled: Story;
|
|
12
|
+
export declare const WithDefaultValue: Story;
|
|
13
|
+
export declare const MultipleWithDefaults: Story;
|
|
14
|
+
export declare const LimitTags: Story;
|
|
15
|
+
export declare const WithCustomHandler: Story;
|
|
16
|
+
export declare const NoOptionsText: Story;
|
|
17
|
+
export declare const LoadingState: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AutocompleteProps } from '@mui/material';
|
|
3
|
+
export interface MyAutocompleteProps extends AutocompleteProps<any, any, any, any, any> {
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
declare const AutocompleteOld: React.ForwardRefExoticComponent<Omit<MyAutocompleteProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default AutocompleteOld;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps } from '@mui/material/Button';
|
|
3
|
+
interface MyButtonProps extends ButtonProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
ariaDisabled?: boolean;
|
|
6
|
+
disableAutoAriaLabel?: boolean;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const Button: React.FC<MyButtonProps>;
|
|
10
|
+
export default Button;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import MnbButton from "./Button";
|
|
3
|
+
declare const meta: Meta<typeof MnbButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof MnbButton>;
|
|
6
|
+
export declare const Primary: Story;
|
|
7
|
+
export declare const Disabled: Story;
|
|
8
|
+
export declare const WithLongText: Story;
|
|
9
|
+
export declare const WithClickHandler: Story;
|
|
10
|
+
export declare const Loading: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CaptchaAccessibilityTest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CaptchaClientTest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CaptchaDebugTest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CaptchaDebugger(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CaptchaExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CaptchaStatusDebugger(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CaptchaTest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface CaptchaWidgetProps {
|
|
2
|
+
sitekey: string;
|
|
3
|
+
lang?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
width?: number | string;
|
|
7
|
+
inputPrompt?: string;
|
|
8
|
+
isValid?: boolean;
|
|
9
|
+
error?: string | null;
|
|
10
|
+
onValidationChange?: (isValid: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* CaptchaWidgetProps describes the props accepted by CaptchaWidget.
|
|
14
|
+
* For reset captcha functionality, use a `resetCaptcha` and `removeCaptcha` from useCaptchaToken hook.
|
|
15
|
+
*
|
|
16
|
+
* @property {string} sitekey - MTCaptcha site key (required).
|
|
17
|
+
* @property {string} [lang='de'] - Language code used for captcha text/labels.
|
|
18
|
+
* @property {string} [className] - Optional CSS class applied to the root container.
|
|
19
|
+
* @property {boolean} [required=true] - Whether the captcha input is required.
|
|
20
|
+
* @property {number|string} [width=300] - Width of the captcha container (px or CSS string).
|
|
21
|
+
* @property {string} [inputPrompt] - Custom input prompt text shown inside captcha.
|
|
22
|
+
* @property {boolean} [isValid=true] - Current validation state (passed from parent).
|
|
23
|
+
* @property {string|null} [error=null] - Error message to display under the widget.
|
|
24
|
+
* @property {(isValid: boolean) => void} [onValidationChange] - Callback invoked when captcha internal validity changes.
|
|
25
|
+
*/
|
|
26
|
+
export declare const CaptchaWidget: ({ sitekey, lang, className, required, width, inputPrompt, isValid, error, onValidationChange }: CaptchaWidgetProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default CaptchaWidget;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CaptchaWidget } from './CaptchaWidget';
|
|
3
|
+
declare global {
|
|
4
|
+
interface Window {
|
|
5
|
+
mtcaptcha?: {
|
|
6
|
+
renderUI: () => void;
|
|
7
|
+
resetUI: () => void;
|
|
8
|
+
};
|
|
9
|
+
mtcaptchaConfig?: {
|
|
10
|
+
sitekey: string;
|
|
11
|
+
lang: string;
|
|
12
|
+
render: string;
|
|
13
|
+
renderQueue?: string[];
|
|
14
|
+
customLangText?: {
|
|
15
|
+
[key: string]: {
|
|
16
|
+
inputPrompt?: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
declare const meta: Meta<typeof CaptchaWidget>;
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof CaptchaWidget>;
|
|
25
|
+
export declare const Default: Story;
|
|
26
|
+
export declare const WithError: Story;
|
|
27
|
+
export declare const Optional: Story;
|
|
28
|
+
export declare const CustomWidth: Story;
|
|
29
|
+
export declare const English: Story;
|
|
30
|
+
export declare const CustomPrompt: Story;
|
|
31
|
+
export declare const WideContainer: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ComprehensiveTest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function FinalValidationTest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SimpleValidationTest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SubmitOnlyValidationTest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ValidationTest(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface UseCaptchaFormOptions {
|
|
2
|
+
onSubmit?: (data: any, captchaToken: string) => Promise<void> | void;
|
|
3
|
+
onError?: (error: Error) => void;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface UseCaptchaFormReturn {
|
|
7
|
+
canSubmit: boolean;
|
|
8
|
+
isVerified: boolean;
|
|
9
|
+
verifiedToken: string | null;
|
|
10
|
+
handleSubmit: (data: any) => Promise<void>;
|
|
11
|
+
reset: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const useCaptchaForm: (options?: UseCaptchaFormOptions) => UseCaptchaFormReturn;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface UseCaptchaValidationOptions {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
onValidationChange?: (isValid: boolean) => void;
|
|
4
|
+
}
|
|
5
|
+
interface UseCaptchaValidationReturn {
|
|
6
|
+
isValid: boolean;
|
|
7
|
+
error: string | null;
|
|
8
|
+
setHasInteracted: (value: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const useCaptchaValidation: (options?: UseCaptchaValidationOptions) => UseCaptchaValidationReturn;
|
|
11
|
+
export {};
|