@public-ui/sample-react 1.7.11 → 1.7.12
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/104.js +1 -1
- package/dist/1296.js +1 -1
- package/dist/1461.js +1 -1
- package/dist/1684.js +1 -1
- package/dist/1728.js +2 -0
- package/dist/1888.js +1 -1
- package/dist/2120.js +1 -1
- package/dist/2240.js +1 -1
- package/dist/2444.js +1 -1
- package/dist/2628.js +1 -1
- package/dist/2740.js +1 -1
- package/dist/2764.js +1 -1
- package/dist/2782.js +1 -1
- package/dist/2812.js +1 -1
- package/dist/3200.js +1 -1
- package/dist/3204.js +1 -1
- package/dist/3564.js +1 -1
- package/dist/3920.js +1 -1
- package/dist/4064.js +1 -1
- package/dist/4136.js +1 -1
- package/dist/4184.js +1 -1
- package/dist/4544.js +1 -1
- package/dist/4728.js +1 -1
- package/dist/4915.js +1 -1
- package/dist/4988.js +1 -1
- package/dist/5336.js +2 -0
- package/dist/5376.js +1 -1
- package/dist/5456.js +1 -1
- package/dist/5615.js +1 -1
- package/dist/5628.js +1 -1
- package/dist/5744.js +1 -1
- package/dist/5768.js +1 -1
- package/dist/5839.js +1 -1
- package/dist/5956.js +1 -1
- package/dist/5972.js +1 -1
- package/dist/6040.js +1 -1
- package/dist/6272.js +1 -1
- package/dist/7192.js +1 -1
- package/dist/7312.js +1 -1
- package/dist/736.js +1 -1
- package/dist/7392.js +2 -0
- package/dist/7496.js +1 -1
- package/dist/7508.js +1 -1
- package/dist/7596.js +1 -1
- package/dist/7712.js +1 -1
- package/dist/7808.js +1 -1
- package/dist/8188.js +1 -1
- package/dist/8232.js +1 -1
- package/dist/8248.js +1 -1
- package/dist/828.js +1 -1
- package/dist/8476.js +1 -1
- package/dist/8524.js +1 -1
- package/dist/9088.js +1 -1
- package/dist/9096.js +2 -0
- package/dist/9404.js +1 -1
- package/dist/9424.js +1 -1
- package/dist/9496.js +1 -1
- package/dist/9680.js +1 -1
- package/dist/9888.js +1 -1
- package/dist/9984.js +1 -1
- package/dist/index.html +1 -1
- package/dist/main.css +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +0 -2
- package/package.json +5 -6
- package/public/index.html +1 -1
- package/src/App.tsx +26 -23
- package/src/components/SampleDescription.tsx +23 -0
- package/src/components/input-text/hide-errors.tsx +25 -0
- package/src/components/input-text/routes.ts +2 -0
- package/src/scenarios/appointment-form/AppointmentForm.tsx +10 -4
- package/src/scenarios/appointment-form/AvailableAppointmentsForm.tsx +4 -9
- package/src/scenarios/appointment-form/DistrictForm.tsx +1 -8
- package/src/scenarios/appointment-form/PersonalInformationForm.tsx +20 -0
- package/src/scenarios/appointment-form/formUtils.ts +8 -0
- package/src/scenarios/routes.ts +3 -1
- package/src/scenarios/static-form.tsx +74 -0
- package/src/shares/HideMenusContext.ts +3 -0
- package/dist/4236.js +0 -2
- package/dist/4900.js +0 -2
- package/dist/5384.js +0 -2
- package/dist/616.js +0 -2
- package/src/scenarios/appointment-form/ErrorList.tsx +0 -35
- /package/dist/{4236.js.LICENSE.txt → 1728.js.LICENSE.txt} +0 -0
- /package/dist/{4900.js.LICENSE.txt → 5336.js.LICENSE.txt} +0 -0
- /package/dist/{5384.js.LICENSE.txt → 7392.js.LICENSE.txt} +0 -0
- /package/dist/{616.js.LICENSE.txt → 9096.js.LICENSE.txt} +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { KolAlert, KolLink } from '@public-ui/react';
|
|
3
|
-
|
|
4
|
-
type ErrorListPropType = {
|
|
5
|
-
errors: Record<string, string>;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export function ErrorList({ errors }: ErrorListPropType) {
|
|
9
|
-
const handleLinkClick = (event: Event) => {
|
|
10
|
-
const href = (event.target as HTMLAnchorElement | undefined)?.href;
|
|
11
|
-
if (href) {
|
|
12
|
-
const hrefUrl = new URL(href);
|
|
13
|
-
|
|
14
|
-
const targetElement = document.querySelector<HTMLElement>(hrefUrl.hash);
|
|
15
|
-
if (targetElement && typeof targetElement.focus === 'function') {
|
|
16
|
-
targetElement.focus();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<KolAlert _type="error">
|
|
23
|
-
Bitte korrigieren Sie folgende Fehler:
|
|
24
|
-
<nav aria-label="Fehlerliste">
|
|
25
|
-
<ul>
|
|
26
|
-
{Object.entries(errors).map(([field, error]) => (
|
|
27
|
-
<li key={field}>
|
|
28
|
-
<KolLink _href={`#field-${field}`} _label={error} _on={{ onClick: handleLinkClick }} />
|
|
29
|
-
</li>
|
|
30
|
-
))}
|
|
31
|
-
</ul>
|
|
32
|
-
</nav>
|
|
33
|
-
</KolAlert>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|