@mnbsolutions/framework-frontend 0.0.0-stage → 4.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/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 +103 -4
- package/README.md +0 -3
|
@@ -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 {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MTCaptchaConfig {
|
|
3
|
+
sitekey: string;
|
|
4
|
+
lang?: string;
|
|
5
|
+
renderQueue?: any[];
|
|
6
|
+
text?: {
|
|
7
|
+
instruction?: string;
|
|
8
|
+
};
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export interface MTCaptchaStatus {
|
|
12
|
+
domId: string;
|
|
13
|
+
element: HTMLDivElement;
|
|
14
|
+
isVerified: boolean;
|
|
15
|
+
isVisible: boolean;
|
|
16
|
+
statusCode: number;
|
|
17
|
+
statusDesc: string;
|
|
18
|
+
verifiedToken: string;
|
|
19
|
+
}
|
|
20
|
+
export interface MTCaptchaAPI {
|
|
21
|
+
enableTestMode: () => void;
|
|
22
|
+
focus: () => void;
|
|
23
|
+
getConfiguration: () => void;
|
|
24
|
+
getStatus: () => MTCaptchaStatus;
|
|
25
|
+
getVerifiedToken: () => string | null;
|
|
26
|
+
remove: () => void;
|
|
27
|
+
renderUI: () => void;
|
|
28
|
+
resetUI: () => void;
|
|
29
|
+
showMandatory: () => void;
|
|
30
|
+
}
|
|
31
|
+
export interface CaptchaProviderProps {
|
|
32
|
+
sitekey: string;
|
|
33
|
+
lang?: string;
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
onVerificationChange?: (isVerified: boolean, token?: string) => void;
|
|
36
|
+
checkInterval?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface UseCaptchaReturn {
|
|
39
|
+
isVerified: boolean;
|
|
40
|
+
isLoading: boolean;
|
|
41
|
+
verifiedToken: string | null;
|
|
42
|
+
reset: () => void;
|
|
43
|
+
getStatus: () => MTCaptchaStatus | null;
|
|
44
|
+
}
|
|
45
|
+
declare global {
|
|
46
|
+
interface Window {
|
|
47
|
+
mtcaptcha?: MTCaptchaAPI;
|
|
48
|
+
mtcaptchaConfig?: MTCaptchaConfig;
|
|
49
|
+
debugMTCaptcha?: () => void;
|
|
50
|
+
testCaptchaRender?: () => void;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CheckboxProps } from '@mui/material/Checkbox/Checkbox';
|
|
3
|
+
interface ICheckboxProps extends CheckboxProps {
|
|
4
|
+
clr?: string;
|
|
5
|
+
hoverclr?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const CheckboxIcon: ({ clr, hoverclr }: {
|
|
10
|
+
clr: string;
|
|
11
|
+
hoverclr: string;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const CheckboxCheckedIcon: ({ clr, hoverclr }: {
|
|
14
|
+
clr: string;
|
|
15
|
+
hoverclr: string;
|
|
16
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<ICheckboxProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
export default Checkbox;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import MnbCheckbox from "./Checkbox";
|
|
3
|
+
declare const meta: Meta<typeof MnbCheckbox>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof MnbCheckbox>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Checked: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const DisabledChecked: Story;
|
|
10
|
+
export declare const Required: Story;
|
|
11
|
+
export declare const WithoutLabel: Story;
|
|
12
|
+
export declare const WithClickHandler: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConfigProviderProps } from './ConfigContext.types';
|
|
3
|
+
declare const PassConfigContext: {
|
|
4
|
+
config: any;
|
|
5
|
+
};
|
|
6
|
+
declare const ConfigProvider: <T extends object>({ children, fallback, projectName, configFileName, defaultConfig }: ConfigProviderProps<T>) => string | number | true | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | null;
|
|
7
|
+
declare const useConfigContext: <T>() => T;
|
|
8
|
+
export default ConfigProvider;
|
|
9
|
+
export { PassConfigContext, useConfigContext };
|
|
10
|
+
export declare const isConfigReady: () => boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import ContactLink from "./ContactLink";
|
|
3
|
+
declare const meta: Meta<typeof ContactLink>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ContactLink>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const AllTypes: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
2
|
+
import { IDataTableProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* WCAG-compliant DataTable component
|
|
5
|
+
*
|
|
6
|
+
* Accessibility features:
|
|
7
|
+
* - Full keyboard navigation support
|
|
8
|
+
* - Screen reader optimized with German locale
|
|
9
|
+
* - ARIA labels and descriptions
|
|
10
|
+
* - High contrast focus indicators
|
|
11
|
+
* - Semantic table structure
|
|
12
|
+
*/
|
|
13
|
+
declare const DataTable: <T extends GridValidRowModel>({ rows, columns, isLoading, totalRowCount, config, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...dataGridProps }: IDataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default DataTable;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import MnbDataTable from "./DataTable";
|
|
3
|
+
declare const meta: Meta<typeof MnbDataTable>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof MnbDataTable>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithPagination: Story;
|
|
8
|
+
export declare const WithRowSelection: Story;
|
|
9
|
+
export declare const WithFilters: Story;
|
|
10
|
+
export declare const WithExport: Story;
|
|
11
|
+
export declare const LoadingState: Story;
|
|
12
|
+
export declare const EmptyState: Story;
|
|
13
|
+
export declare const AutoHeight: Story;
|
|
14
|
+
export declare const FixedHeight: Story;
|
|
15
|
+
export declare const WithAllFeatures: Story;
|
|
16
|
+
export declare const ProductTable: Story;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { DataGridProProps, GridValidRowModel, GridLocaleText } from '@mui/x-data-grid-pro';
|
|
2
|
+
export interface IDataTableConfig {
|
|
3
|
+
/**
|
|
4
|
+
* Page size options for pagination
|
|
5
|
+
* @default [10, 20, 50, 100]
|
|
6
|
+
*/
|
|
7
|
+
pageSizeOptions?: number[];
|
|
8
|
+
/**
|
|
9
|
+
* Default page size
|
|
10
|
+
* @default 10
|
|
11
|
+
*/
|
|
12
|
+
defaultPageSize?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Always show pagination controls, even when all rows fit on one page
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
showPagination?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Locale text configuration for the data grid
|
|
20
|
+
* If not provided, uses German locale by default
|
|
21
|
+
*/
|
|
22
|
+
localeText?: Partial<GridLocaleText>;
|
|
23
|
+
/**
|
|
24
|
+
* Enable auto height (table adjusts to content)
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
autoHeight?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Fixed height for the table
|
|
30
|
+
* If not provided, table will use 100% of container
|
|
31
|
+
*/
|
|
32
|
+
height?: string | number;
|
|
33
|
+
/**
|
|
34
|
+
* Minimum height for the table
|
|
35
|
+
*/
|
|
36
|
+
minHeight?: string | number;
|
|
37
|
+
/**
|
|
38
|
+
* Maximum height for the table
|
|
39
|
+
*/
|
|
40
|
+
maxHeight?: string | number;
|
|
41
|
+
/**
|
|
42
|
+
* Show column menu
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
showColumnMenu?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Show toolbar
|
|
48
|
+
* @default true
|
|
49
|
+
*/
|
|
50
|
+
showToolbar?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Enable row selection
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
enableRowSelection?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Selection mode: 'single' or 'multiple'
|
|
58
|
+
* @default 'multiple'
|
|
59
|
+
*/
|
|
60
|
+
selectionMode?: 'single' | 'multiple';
|
|
61
|
+
/**
|
|
62
|
+
* Enable density selector
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
enableDensitySelector?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Enable column filter
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
enableColumnFilter?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Enable column visibility toggle
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
enableColumnVisibility?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Enable export functionality
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
enableExport?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Custom CSS class name for the table container
|
|
83
|
+
*/
|
|
84
|
+
containerClassName?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Custom CSS class name for the table
|
|
87
|
+
*/
|
|
88
|
+
tableClassName?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface IDataTableProps<T extends GridValidRowModel> extends Omit<DataGridProProps<T>, 'rows' | 'columns'> {
|
|
91
|
+
/**
|
|
92
|
+
* Table rows data
|
|
93
|
+
*/
|
|
94
|
+
rows: T[];
|
|
95
|
+
/**
|
|
96
|
+
* Table column definitions
|
|
97
|
+
*/
|
|
98
|
+
columns: DataGridProProps<T>['columns'];
|
|
99
|
+
/**
|
|
100
|
+
* Loading state
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
isLoading?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Total row count (for server-side pagination)
|
|
106
|
+
*/
|
|
107
|
+
totalRowCount?: number;
|
|
108
|
+
/**
|
|
109
|
+
* Table configuration options
|
|
110
|
+
*/
|
|
111
|
+
config?: IDataTableConfig;
|
|
112
|
+
/**
|
|
113
|
+
* WCAG: Accessible label for the table region
|
|
114
|
+
* Announced by screen readers when the table receives focus
|
|
115
|
+
*/
|
|
116
|
+
'aria-label'?: string;
|
|
117
|
+
/**
|
|
118
|
+
* WCAG: ID of an element that labels the table
|
|
119
|
+
* Use when a visible heading describes the table
|
|
120
|
+
*/
|
|
121
|
+
'aria-labelledby'?: string;
|
|
122
|
+
/**
|
|
123
|
+
* WCAG: ID of an element that describes the table
|
|
124
|
+
* Use for additional context about the table's content
|
|
125
|
+
*/
|
|
126
|
+
'aria-describedby'?: string;
|
|
127
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DatePickerProps } from '@mui/x-date-pickers';
|
|
3
|
+
import type { Moment } from 'moment';
|
|
4
|
+
/**
|
|
5
|
+
* MnbDatePicker – A themed wrapper around MUI X DatePicker that
|
|
6
|
+
* - uses the library TextField for consistent labeling and a11y
|
|
7
|
+
* - applies consistent calendar styling using theme colors
|
|
8
|
+
* - forwards all DatePicker props to MUI
|
|
9
|
+
*/
|
|
10
|
+
declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps<Moment, any> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export type { DatePickerProps } from '@mui/x-date-pickers';
|
|
12
|
+
export default DatePicker;
|