@public-ui/sample-react 2.1.4 → 2.1.5-rc.2
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/1069.js +1 -1
- package/dist/1085.js +1 -1
- package/dist/1184.js +1 -1
- package/dist/1222.js +1 -1
- package/dist/1278.js +1 -1
- package/dist/1325.js +1 -1
- package/dist/1333.js +1 -1
- package/dist/1661.js +1 -1
- package/dist/1703.js +1 -1
- package/dist/1711.js +1 -1
- package/dist/1792.js +1 -1
- package/dist/1793.js +1 -1
- package/dist/1878.js +1 -1
- package/dist/1957.js +1 -1
- package/dist/2305.js +1 -1
- package/dist/2471.js +1 -1
- package/dist/2538.js +1 -1
- package/dist/279.js +1 -1
- package/dist/2830.js +1 -1
- package/dist/3180.js +1 -1
- package/dist/3332.js +1 -1
- package/dist/3596.js +1 -1
- package/dist/3714.js +1 -1
- package/dist/3797.js +1 -1
- package/dist/3974.js +1 -1
- package/dist/3990.js +1 -1
- package/dist/4014.js +1 -1
- package/dist/4102.js +1 -1
- package/dist/4218.js +1 -1
- package/dist/4303.js +1 -1
- package/dist/4404.js +1 -1
- package/dist/453.js +1 -1
- package/dist/4941.js +1 -1
- package/dist/500.js +1 -1
- package/dist/5139.js +1 -1
- package/dist/5164.js +1 -1
- package/dist/5365.js +1 -1
- package/dist/5540.js +1 -1
- package/dist/5756.js +1 -1
- package/dist/6393.js +1 -1
- package/dist/6682.js +1 -1
- package/dist/6781.js +1 -1
- package/dist/{5168.js → 6787.js} +2 -2
- package/dist/7100.js +1 -1
- package/dist/7245.js +1 -1
- package/dist/7263.js +1 -1
- package/dist/7512.js +1 -1
- package/dist/7856.js +1 -1
- package/dist/{445.js → 788.js} +2 -2
- package/dist/8002.js +1 -1
- package/dist/8189.js +1 -1
- package/dist/8264.js +1 -1
- package/dist/8384.js +1 -1
- package/dist/8389.js +1 -1
- package/dist/8515.js +1 -1
- package/dist/8557.js +1 -1
- package/dist/8588.js +1 -1
- package/dist/8724.js +1 -1
- package/dist/8791.js +1 -1
- package/dist/882.js +1 -1
- package/dist/8823.js +1 -1
- package/dist/895.js +1 -1
- package/dist/8993.js +1 -1
- package/dist/902.js +1 -1
- package/dist/9175.js +1 -1
- package/dist/9202.js +1 -1
- package/dist/9833.js +1 -1
- package/dist/9961.js +1 -1
- package/dist/index.html +2 -2
- package/dist/main.css +1 -1
- package/dist/main.js +1 -1
- package/package.json +4 -4
- package/public/index.html +2 -2
- package/src/components/SampleDescription.tsx +10 -6
- package/src/components/Sidebar.tsx +4 -4
- package/src/components/abbr/basic.tsx +2 -1
- package/src/components/accordion/basic.tsx +10 -9
- package/src/components/accordion/headlines.tsx +9 -9
- package/src/components/accordion/routes.ts +0 -2
- package/src/components/alert/basic.tsx +15 -10
- package/src/components/alert/card-msg.tsx +13 -6
- package/src/components/alert/html.tsx +2 -1
- package/src/components/avatar/basic.tsx +2 -1
- package/src/components/badge/basic.tsx +7 -6
- package/src/components/badge/button.tsx +13 -18
- package/src/components/breadcrumb/basic.tsx +2 -1
- package/src/components/button/access-key.tsx +7 -2
- package/src/components/button/baselined.tsx +2 -1
- package/src/components/button/basic.tsx +3 -1
- package/src/components/button/icons.tsx +2 -1
- package/src/components/button/partials/variants.tsx +0 -1
- package/src/components/button/routes.ts +0 -2
- package/src/components/button/width.tsx +2 -1
- package/src/components/button-group/basic.tsx +7 -2
- package/src/components/button-link/basic.tsx +28 -19
- package/src/components/button-link/icons.tsx +2 -1
- package/src/components/button-link/image.tsx +2 -1
- package/src/components/card/basic.tsx +11 -4
- package/src/components/card/routes.ts +0 -6
- package/src/components/combobox/basic.tsx +5 -4
- package/src/components/details/basic.tsx +6 -5
- package/src/components/drawer/basic.tsx +4 -4
- package/src/components/drawer/controlled.tsx +4 -4
- package/src/components/form/basic.tsx +5 -4
- package/src/components/form/error-list.tsx +6 -5
- package/src/components/heading/badged.tsx +4 -1
- package/src/components/heading/basic.tsx +8 -7
- package/src/components/heading/paragraph.tsx +2 -4
- package/src/components/heading/routes.ts +1 -1
- package/src/components/icon/basic.tsx +2 -1
- package/src/components/image/basic.tsx +2 -1
- package/src/components/indented-text/basic.tsx +4 -1
- package/src/components/input-checkbox/basic.tsx +2 -5
- package/src/components/input-checkbox/button.tsx +2 -6
- package/src/components/input-checkbox/switch.tsx +2 -7
- package/src/components/input-color/basic.tsx +2 -4
- package/src/components/input-date/basic.tsx +2 -6
- package/src/components/input-email/basic.tsx +2 -1
- package/src/components/input-file/basic.tsx +2 -4
- package/src/components/input-number/basic.tsx +3 -4
- package/src/components/input-password/basic.tsx +2 -1
- package/src/components/input-password/show-password.tsx +3 -2
- package/src/components/input-radio/basic.tsx +2 -1
- package/src/components/input-radio/horizontal.tsx +2 -2
- package/src/components/input-radio/objectValue.tsx +11 -11
- package/src/components/input-radio/routes.ts +0 -2
- package/src/components/input-range/basic.tsx +5 -1
- package/src/components/input-text/basic.tsx +2 -1
- package/src/components/input-text/hide-errors.tsx +6 -2
- package/src/components/input-text/routes.ts +0 -2
- package/src/components/kolibri/basic.tsx +3 -3
- package/src/components/link/basic.tsx +4 -1
- package/src/components/link/icons.tsx +2 -1
- package/src/components/link/image.tsx +4 -9
- package/src/components/link/target.tsx +24 -7
- package/src/components/link-button/basic.tsx +2 -1
- package/src/components/link-group/basic.tsx +6 -2
- package/src/components/link-group/horizontal.tsx +6 -2
- package/src/components/modal/basic.tsx +6 -5
- package/src/components/nav/aria-current.tsx +4 -4
- package/src/components/nav/basic.tsx +3 -2
- package/src/components/nav/horizontal.tsx +2 -4
- package/src/components/pagination/basic.tsx +8 -6
- package/src/components/progress/basic.tsx +2 -1
- package/src/components/quote/basic.tsx +2 -1
- package/src/components/quote/block.tsx +2 -4
- package/src/components/select/basic.tsx +2 -4
- package/src/components/skip-nav/basic.tsx +6 -8
- package/src/components/spin/basic.tsx +2 -1
- package/src/components/spin/custom.tsx +3 -2
- package/src/components/spin/cycle.tsx +2 -1
- package/src/components/split-button/basic.tsx +3 -2
- package/src/components/table/column-alignment.tsx +3 -1
- package/src/components/table/complex-headers.tsx +3 -1
- package/src/components/table/horizontal-scrollbar.tsx +4 -2
- package/src/components/table/pagination-position.tsx +4 -1
- package/src/components/table/render-cell.tsx +2 -1
- package/src/components/table/routes.ts +0 -2
- package/src/components/table/sort-data.tsx +1 -4
- package/src/components/table/stateful-with-selection.tsx +3 -1
- package/src/components/table/stateless-with-selection.tsx +3 -1
- package/src/components/table/stateless.tsx +3 -1
- package/src/components/table/with-footer.tsx +3 -1
- package/src/components/table/with-pagination.tsx +1 -4
- package/src/components/tabs/basic.tsx +14 -15
- package/src/components/tabs/icons-only.tsx +1 -1
- package/src/components/textarea/adjust-height.tsx +7 -10
- package/src/components/textarea/basic.tsx +2 -1
- package/src/components/textarea/counter.tsx +5 -8
- package/src/components/textarea/partials/cases.tsx +1 -0
- package/src/components/textarea/resize.tsx +8 -6
- package/src/components/textarea/routes.ts +0 -6
- package/src/components/textarea/rows.tsx +4 -1
- package/src/components/toast/basic.tsx +2 -1
- package/src/components/toolbar/basic.tsx +10 -2
- package/src/components/toolbar/disabled.tsx +7 -2
- package/src/components/tree/basic.tsx +4 -0
- package/src/components/version/basic.tsx +2 -1
- package/src/components/version/context.tsx +2 -1
- package/src/react.main.tsx +1 -1
- package/src/scenarios/appointment-form/AppointmentForm.tsx +54 -43
- package/src/scenarios/custom-tooltip-width.tsx +11 -1
- package/src/scenarios/disabled-interactive-elements.tsx +1 -0
- package/src/scenarios/focus-elements.tsx +10 -2
- package/src/scenarios/inputs-get-value.tsx +1 -1
- package/src/scenarios/static-form.tsx +1 -1
- package/dist/3454.js +0 -2
- package/dist/5168.js.LICENSE.txt +0 -3
- package/src/components/accordion/list.tsx +0 -45
- package/src/components/button/hide-label.tsx +0 -41
- package/src/components/card/confirm.tsx +0 -28
- package/src/components/card/flex.tsx +0 -44
- package/src/components/card/selection.tsx +0 -83
- package/src/components/input-radio/select.tsx +0 -25
- package/src/components/input-text/blur.tsx +0 -21
- package/src/components/table/badge-size.tsx +0 -66
- package/src/components/textarea/disabled.tsx +0 -22
- package/src/components/textarea/placeholder.tsx +0 -17
- package/src/components/textarea/readonly.tsx +0 -22
- /package/dist/{3454.js.LICENSE.txt → 6787.js.LICENSE.txt} +0 -0
- /package/dist/{445.js.LICENSE.txt → 788.js.LICENSE.txt} +0 -0
|
@@ -7,14 +7,11 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
7
7
|
export const TextareaCounter: FC = () => (
|
|
8
8
|
<>
|
|
9
9
|
<SampleDescription>
|
|
10
|
-
<p>
|
|
10
|
+
<p>
|
|
11
|
+
This sample demonstrates the <code>_hasCounter</code>-property of KolTextarea. It shows how many characters have been entered.
|
|
12
|
+
</p>
|
|
11
13
|
</SampleDescription>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
_label="Textara mit Counter und Hint und Fehler"
|
|
15
|
-
_msg={{ _type: 'error', _description: 'oh no' }}
|
|
16
|
-
_hint={'Hinweis'}
|
|
17
|
-
_touched
|
|
18
|
-
/>
|
|
14
|
+
|
|
15
|
+
<KolTextarea _label="Textara with counter" _hasCounter={true} />
|
|
19
16
|
</>
|
|
20
17
|
);
|
|
@@ -12,6 +12,7 @@ export const TextareaCases = forwardRef<HTMLKolTextareaElement, Components.KolTe
|
|
|
12
12
|
<KolTextarea {...props} ref={ref} _accessKey="T" _label="Text (3 rows)" _rows={3} />
|
|
13
13
|
<KolTextarea {...props} ref={ref} _label="Text (placeholder)" _rows={3} _placeholder="Placeholder" />
|
|
14
14
|
<KolTextarea {...props} ref={ref} _label="Text (disabled & placeholder)" _rows={3} _placeholder="Placeholder" _disabled />
|
|
15
|
+
<KolTextarea {...props} ref={ref} _label="Text (readonly)" _rows={3} _placeholder="Placeholder" _readOnly />
|
|
15
16
|
<KolTextarea {...props} ref={ref} _label="Text (disabled & value)" _rows={3} _placeholder="Placeholder" _value="Lorem ipsum" _disabled />
|
|
16
17
|
</div>
|
|
17
18
|
);
|
|
@@ -4,17 +4,19 @@ import { KolForm, KolTextarea } from '@public-ui/react';
|
|
|
4
4
|
|
|
5
5
|
import type { FC } from 'react';
|
|
6
6
|
import { SampleDescription } from '../SampleDescription';
|
|
7
|
-
//Umrandung im Reactsample wird nicht angepasst bei Anpassung des Textfelds. Bug?.
|
|
8
7
|
export const TextareaResize: FC = () => (
|
|
9
8
|
<>
|
|
10
9
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
10
|
+
<p>
|
|
11
|
+
This sample demonstrates the <code>_resize</code>-property of KolTextarea. The sample textarea can (only) be resized in the given direction.
|
|
12
|
+
</p>
|
|
12
13
|
</SampleDescription>
|
|
14
|
+
|
|
13
15
|
<KolForm className="grid gap-4">
|
|
14
|
-
<KolTextarea _resize="both" _label="
|
|
15
|
-
<KolTextarea _resize="vertical" _label="
|
|
16
|
-
<KolTextarea _resize="horizontal" _label="
|
|
17
|
-
<KolTextarea _resize="none" _label="
|
|
16
|
+
<KolTextarea _resize="both" _label="Text input (both)" />
|
|
17
|
+
<KolTextarea _resize="vertical" _label="Text input (vertical)" className="mt" />
|
|
18
|
+
<KolTextarea _resize="horizontal" _label="Text input (horizontal)" className="mt" />
|
|
19
|
+
<KolTextarea _resize="none" _label="Text input (none)" className="mt" />
|
|
18
20
|
</KolForm>
|
|
19
21
|
</>
|
|
20
22
|
);
|
|
@@ -2,9 +2,6 @@ import { Routes } from '../../shares/types';
|
|
|
2
2
|
import { TextareaAdjustHeight } from './adjust-height';
|
|
3
3
|
import { TextareaBasic } from './basic';
|
|
4
4
|
import { TextareaCounter } from './counter';
|
|
5
|
-
import { TextareaDisabled } from './disabled';
|
|
6
|
-
import { TextareaPlaceholder } from './placeholder';
|
|
7
|
-
import { TextareaReadOnly } from './readonly';
|
|
8
5
|
import { TextareaResize } from './resize';
|
|
9
6
|
import { TextareaRows } from './rows';
|
|
10
7
|
|
|
@@ -12,9 +9,6 @@ export const TEXTAREA_ROUTES: Routes = {
|
|
|
12
9
|
textarea: {
|
|
13
10
|
basic: TextareaBasic,
|
|
14
11
|
'adjust-height': TextareaAdjustHeight,
|
|
15
|
-
disabled: TextareaDisabled,
|
|
16
|
-
placeholder: TextareaPlaceholder,
|
|
17
|
-
readonly: TextareaReadOnly,
|
|
18
12
|
resize: TextareaResize,
|
|
19
13
|
rows: TextareaRows,
|
|
20
14
|
'with-counter': TextareaCounter,
|
|
@@ -8,8 +8,11 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const TextareaRows: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>
|
|
12
|
+
This sample demonstrates the <code>_rows</code>-property of KolTextarea. The sample textarea has a fixed row number of 10.
|
|
13
|
+
</p>
|
|
12
14
|
</SampleDescription>
|
|
15
|
+
|
|
13
16
|
<KolForm>
|
|
14
17
|
<KolTextarea _rows={10} _label="Texteingabe" />
|
|
15
18
|
</KolForm>
|
|
@@ -68,8 +68,9 @@ export const ToastBasic: FC = () => {
|
|
|
68
68
|
return (
|
|
69
69
|
<>
|
|
70
70
|
<SampleDescription>
|
|
71
|
-
<p>
|
|
71
|
+
<p>This sample demonstrates the toast service with all its options.</p>
|
|
72
72
|
</SampleDescription>
|
|
73
|
+
|
|
73
74
|
<div>
|
|
74
75
|
<KolButton _label="Show simple toast" _on={{ onClick: handleButtonClickSimple }}></KolButton>{' '}
|
|
75
76
|
<KolButton _label="Show toast with alert variant 'msg'" _on={{ onClick: handleButtonClickVariantMessage }}></KolButton>{' '}
|
|
@@ -2,12 +2,20 @@ import type { FC } from 'react';
|
|
|
2
2
|
import React, { useContext } from 'react';
|
|
3
3
|
import { KolBadge, KolToolbar } from '@public-ui/react';
|
|
4
4
|
import { HideMenusContext } from '../../shares/HideMenusContext';
|
|
5
|
+
import { SampleDescription } from '../SampleDescription';
|
|
5
6
|
|
|
6
7
|
export const ToolbarBasic: FC = () => {
|
|
7
8
|
const hideMenus = useContext(HideMenusContext);
|
|
8
9
|
return (
|
|
9
10
|
<>
|
|
11
|
+
<SampleDescription>
|
|
12
|
+
<p>
|
|
13
|
+
KolToolbars renders a set of given control elements grouped into one toolbar where focus can be moved using the keyboard arrow keys. The sample
|
|
14
|
+
features button and link elements.
|
|
15
|
+
</p>
|
|
16
|
+
</SampleDescription>
|
|
10
17
|
{!hideMenus && <KolBadge className="block mb-3" _label="Component is a DRAFT - Don't use in production yet." _color="#db5461" />}
|
|
18
|
+
|
|
11
19
|
<KolToolbar
|
|
12
20
|
class="block w-fit"
|
|
13
21
|
_label="Toolbar"
|
|
@@ -31,11 +39,11 @@ export const ToolbarBasic: FC = () => {
|
|
|
31
39
|
},
|
|
32
40
|
},
|
|
33
41
|
{
|
|
34
|
-
_href: '
|
|
42
|
+
_href: '#/back-page',
|
|
35
43
|
_label: 'Simple Link 1',
|
|
36
44
|
},
|
|
37
45
|
{
|
|
38
|
-
_href: '
|
|
46
|
+
_href: '#/back-page',
|
|
39
47
|
_label: 'Simple Link 3',
|
|
40
48
|
},
|
|
41
49
|
{
|
|
@@ -2,12 +2,17 @@ import type { FC } from 'react';
|
|
|
2
2
|
import React, { useContext } from 'react';
|
|
3
3
|
import { KolBadge, KolToolbar } from '@public-ui/react';
|
|
4
4
|
import { HideMenusContext } from '../../shares/HideMenusContext';
|
|
5
|
+
import { SampleDescription } from '../SampleDescription';
|
|
5
6
|
|
|
6
7
|
export const ToolbarDisabled: FC = () => {
|
|
7
8
|
const hideMenus = useContext(HideMenusContext);
|
|
8
9
|
return (
|
|
9
10
|
<>
|
|
11
|
+
<SampleDescription>
|
|
12
|
+
<p>This sample shows KolToolbars with some of the elements disabled.</p>
|
|
13
|
+
</SampleDescription>
|
|
10
14
|
{!hideMenus && <KolBadge className="block mb-3" _label="Component is a DRAFT - Don't use in production yet." _color="#db5461" />}
|
|
15
|
+
|
|
11
16
|
<KolToolbar
|
|
12
17
|
_label="Toolbar"
|
|
13
18
|
class="block w-fit"
|
|
@@ -32,11 +37,11 @@ export const ToolbarDisabled: FC = () => {
|
|
|
32
37
|
},
|
|
33
38
|
},
|
|
34
39
|
{
|
|
35
|
-
_href: '
|
|
40
|
+
_href: '#/back-page',
|
|
36
41
|
_label: 'Simple Link 1',
|
|
37
42
|
},
|
|
38
43
|
{
|
|
39
|
-
_href: '
|
|
44
|
+
_href: '#/back-page',
|
|
40
45
|
_disabled: true,
|
|
41
46
|
_label: 'Simple Link 3',
|
|
42
47
|
},
|
|
@@ -4,6 +4,7 @@ import { KolBadge, KolButton, KolTree, KolTreeItem } from '@public-ui/react';
|
|
|
4
4
|
import { getRandomEmoji } from '../../shares/randomEmoji';
|
|
5
5
|
import { useParams } from 'react-router';
|
|
6
6
|
import { HideMenusContext } from '../../shares/HideMenusContext';
|
|
7
|
+
import { SampleDescription } from '../SampleDescription';
|
|
7
8
|
|
|
8
9
|
export const TreeBasic: FC = () => {
|
|
9
10
|
const hideMenus = useContext(HideMenusContext);
|
|
@@ -25,6 +26,9 @@ export const TreeBasic: FC = () => {
|
|
|
25
26
|
|
|
26
27
|
return (
|
|
27
28
|
<>
|
|
29
|
+
<SampleDescription>
|
|
30
|
+
<p>KolTree renders a keyboard accessible nested navigation. Branches of the tree can be collapsed or expanded.</p>
|
|
31
|
+
</SampleDescription>
|
|
28
32
|
{!hideMenus && <KolBadge className="block mb-3" _label="Component is a DRAFT - Don't use in production yet." _color="#db5461" />}
|
|
29
33
|
|
|
30
34
|
<KolTree _label="Sitemap" class="block w-fit">
|
|
@@ -7,8 +7,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
7
7
|
export const VersionBasic: FC = () => (
|
|
8
8
|
<>
|
|
9
9
|
<SampleDescription>
|
|
10
|
-
<p>
|
|
10
|
+
<p>KolVersion renders a label showing the given version number.</p>
|
|
11
11
|
</SampleDescription>
|
|
12
|
+
|
|
12
13
|
<KolVersion _label="1.1.1" />
|
|
13
14
|
</>
|
|
14
15
|
);
|
|
@@ -8,8 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const VersionContext: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>This sample shows KolVersion inline with text paragraph content.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
|
+
|
|
13
14
|
<p>
|
|
14
15
|
<KolVersion _label="1.0.0" /> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna
|
|
15
16
|
aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
|
package/src/react.main.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { Formik } from 'formik';
|
|
|
2
2
|
import React, { useEffect, useState, useRef } from 'react';
|
|
3
3
|
import * as Yup from 'yup';
|
|
4
4
|
|
|
5
|
-
import { KolTabs } from '@public-ui/react';
|
|
5
|
+
import { KolLink, KolTabs } from '@public-ui/react';
|
|
6
6
|
|
|
7
7
|
import { checkAppointmentAvailability } from './appointmentService';
|
|
8
8
|
import { AvailableAppointmentsForm } from './AvailableAppointmentsForm';
|
|
@@ -12,6 +12,7 @@ import { Summary } from './Summary';
|
|
|
12
12
|
|
|
13
13
|
import type { FormikHelpers, FormikProps } from 'formik';
|
|
14
14
|
import type { Iso8601 } from '@public-ui/components';
|
|
15
|
+
import { SampleDescription } from '../../components/SampleDescription';
|
|
15
16
|
// export interface FormProps {}
|
|
16
17
|
export interface FormValues {
|
|
17
18
|
district: string;
|
|
@@ -89,47 +90,57 @@ export function AppointmentForm() {
|
|
|
89
90
|
};
|
|
90
91
|
|
|
91
92
|
return (
|
|
92
|
-
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
93
|
+
<>
|
|
94
|
+
<SampleDescription>
|
|
95
|
+
<p>
|
|
96
|
+
The Appointment Form is a full form example featuring a large variety of KoliBri form components,{' '}
|
|
97
|
+
<KolLink _label="Formik" _href="https://formik.org/" _target="blank" /> and{' '}
|
|
98
|
+
<KolLink _label="Yup" _href="https://github.com/jquense/yup" _target="blank" />.
|
|
99
|
+
</p>
|
|
100
|
+
</SampleDescription>
|
|
101
|
+
|
|
102
|
+
<Formik<FormValues> innerRef={formikRef} initialValues={initialValues} validationSchema={validationSchema} onSubmit={handleSubmit}>
|
|
103
|
+
<KolTabs
|
|
104
|
+
_tabs={[
|
|
105
|
+
{
|
|
106
|
+
_label: '1. Einwohnermeldeamt wählen',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
_label: '2. Freie Termine',
|
|
110
|
+
_disabled: activeFormSection < FormSection.AVAILABLE_APPOINTMENTS,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
_label: '3. Persönliche Daten',
|
|
114
|
+
_disabled: activeFormSection < FormSection.PERSONAL_INFORMATION,
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
_label: 'Zusammenfassung',
|
|
118
|
+
_disabled: activeFormSection < FormSection.SUMMARY,
|
|
119
|
+
},
|
|
120
|
+
]}
|
|
121
|
+
_label="Formular-Navigation"
|
|
122
|
+
_selected={selectedTab}
|
|
123
|
+
_on={{
|
|
124
|
+
onSelect: (_event, selectedTab) => {
|
|
125
|
+
setActiveFormSection(selectedTab);
|
|
126
|
+
formikRef.current?.setErrors({});
|
|
127
|
+
},
|
|
128
|
+
}}
|
|
129
|
+
>
|
|
130
|
+
<div>
|
|
131
|
+
<DistrictForm />
|
|
132
|
+
</div>
|
|
133
|
+
<div>
|
|
134
|
+
<AvailableAppointmentsForm />
|
|
135
|
+
</div>
|
|
136
|
+
<div>
|
|
137
|
+
<PersonalInformationForm />
|
|
138
|
+
</div>
|
|
139
|
+
<div>
|
|
140
|
+
<Summary />
|
|
141
|
+
</div>
|
|
142
|
+
</KolTabs>
|
|
143
|
+
</Formik>
|
|
144
|
+
</>
|
|
134
145
|
);
|
|
135
146
|
}
|
|
@@ -2,7 +2,17 @@ import type { FC } from 'react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import { KolButton } from '@public-ui/react';
|
|
5
|
+
import { SampleDescription } from '../components/SampleDescription';
|
|
5
6
|
|
|
6
7
|
export const CustomTooltipWidth: FC = () => (
|
|
7
|
-
|
|
8
|
+
<>
|
|
9
|
+
<SampleDescription>
|
|
10
|
+
<p>
|
|
11
|
+
This sample demonstrates how a tooltip's width can be adjusted by defining the CSS custom property <code>--kol-tooltip-width</code> on one of the
|
|
12
|
+
parent elements.
|
|
13
|
+
</p>
|
|
14
|
+
</SampleDescription>
|
|
15
|
+
|
|
16
|
+
<KolButton _label="Tooltip with fixed width" _hideLabel style={{ '--kol-tooltip-width': '400px' }} _icons="codicon codicon-reactions"></KolButton>
|
|
17
|
+
</>
|
|
8
18
|
);
|
|
@@ -49,6 +49,7 @@ export const DisabledInteractiveElements: FC = () => (
|
|
|
49
49
|
</ul>
|
|
50
50
|
<p>This implementation ensures standardized use for all users.</p>
|
|
51
51
|
</SampleDescription>
|
|
52
|
+
|
|
52
53
|
<div className="grid gap-4">
|
|
53
54
|
<KolCard _label="Button" _level={0}>
|
|
54
55
|
<div className="flex flex-wrap gap-4">
|
|
@@ -23,6 +23,7 @@ import type { FC, ForwardRefRenderFunction } from 'react';
|
|
|
23
23
|
import { useMemo } from 'react';
|
|
24
24
|
import React, { forwardRef, useLayoutEffect, useRef } from 'react';
|
|
25
25
|
import { useSearchParams } from 'react-router-dom';
|
|
26
|
+
import { SampleDescription } from '../components/SampleDescription';
|
|
26
27
|
import type { FocusableElement } from '@public-ui/components';
|
|
27
28
|
|
|
28
29
|
const getFocusElements = () => {
|
|
@@ -96,7 +97,14 @@ const Fallback = (props: FallbackProps) => {
|
|
|
96
97
|
const componentNames = [...focusElements.keys()].map((key) => key);
|
|
97
98
|
|
|
98
99
|
return (
|
|
99
|
-
|
|
100
|
+
<>
|
|
101
|
+
<SampleDescription>
|
|
102
|
+
<p>
|
|
103
|
+
This sample serves for automated tests of the focus state for input components. When loading one of the examples linked below, focus will be set on
|
|
104
|
+
the element initially. When testing manually, you may have to reload the page after opening an example.
|
|
105
|
+
</p>
|
|
106
|
+
</SampleDescription>
|
|
107
|
+
|
|
100
108
|
{props.invalidComponent && (
|
|
101
109
|
<KolAlert _type="error" _variant="card">
|
|
102
110
|
Component not found.
|
|
@@ -111,7 +119,7 @@ const Fallback = (props: FallbackProps) => {
|
|
|
111
119
|
</li>
|
|
112
120
|
))}
|
|
113
121
|
</ul>
|
|
114
|
-
|
|
122
|
+
</>
|
|
115
123
|
);
|
|
116
124
|
};
|
|
117
125
|
|
|
@@ -93,7 +93,7 @@ export const InputsGetValue: FC = () => {
|
|
|
93
93
|
<EventLoggerActiveContext.Provider value={eventLoggerActive}>
|
|
94
94
|
<SampleDescription>
|
|
95
95
|
<p>
|
|
96
|
-
This sample
|
|
96
|
+
This sample shows how the input components <code>getValue()</code> method works. It's called when clicking the "getValue()" button
|
|
97
97
|
and prints the current value right next to itself.
|
|
98
98
|
</p>
|
|
99
99
|
</SampleDescription>
|
|
@@ -25,7 +25,7 @@ export const StaticForm: FC = () => {
|
|
|
25
25
|
return (
|
|
26
26
|
<>
|
|
27
27
|
<SampleDescription>
|
|
28
|
-
<p>This sample shows how
|
|
28
|
+
<p>This sample shows how KoliBri can be used in a static form context.</p>
|
|
29
29
|
<ol>
|
|
30
30
|
<li>
|
|
31
31
|
First you have to enable the <code>experimental mode</code>:{' '}
|
package/dist/3454.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 3454.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[3454],{3454:(n,e,t)=>{t.r(e),t.d(e,{kol_span:()=>a});var i=t(6509),o=t(2781);const a=class{constructor(n){(0,i.r)(this,n),this._accessKey=void 0,this._hideLabel=!1,this._icons=void 0,this._label=void 0}render(){return(0,i.h)(o.f,{key:"8fb014c28ff509a829798007f239eff09badb7fa",_icons:this._icons,_hideLabel:this._hideLabel,_label:this._label,_accessKey:this._accessKey,class:"kol-span"},(0,i.h)("slot",{key:"8ac9ed04dcf44846dbb8624687746c1ac34708a5",name:"expert",slot:"expert"}))}};a.style={default:"/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: 44px;\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of 44px.\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}"}}}]);
|
package/dist/5168.js.LICENSE.txt
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import { KolAccordion } from '@public-ui/react';
|
|
5
|
-
import { SampleDescription } from '../SampleDescription';
|
|
6
|
-
|
|
7
|
-
const LIST = [
|
|
8
|
-
{
|
|
9
|
-
heading: 'Überschrift Accordion Tab 1',
|
|
10
|
-
content: 'Inhalt Accordion Tab 1',
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
heading: 'Überschrift Accordion Tab 2',
|
|
14
|
-
content: 'Inhalt Accordion Tab 2',
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
heading: 'Überschrift Accordion Tab 3',
|
|
18
|
-
content: 'Inhalt Accordion Tab 3',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
heading: 'Überschrift Accordion Tab 4',
|
|
22
|
-
content: 'Inhalt Accordion Tab 4',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
heading: 'Überschrift Accordion Tab 5',
|
|
26
|
-
content: 'Inhalt Accordion Tab 5',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
heading: 'Überschrift Accordion Tab 6',
|
|
30
|
-
content: 'Inhalt Accordion Tab 6',
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
export const AccordionList: FC = () => (
|
|
35
|
-
<>
|
|
36
|
-
<SampleDescription>
|
|
37
|
-
<p>Beim klicken mit der Maus auf die einzelnen Überschriften, soll der Inhalt darunter aufgeklappt und beim erneuten klicken wieder zugeklappt werden.</p>
|
|
38
|
-
</SampleDescription>
|
|
39
|
-
{LIST.map(({ heading, content }, index) => (
|
|
40
|
-
<KolAccordion _label={heading} _level={1} _open={index === 1} key={index}>
|
|
41
|
-
<p>{content}</p>
|
|
42
|
-
</KolAccordion>
|
|
43
|
-
))}
|
|
44
|
-
</>
|
|
45
|
-
);
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { KolButton } from '@public-ui/react';
|
|
4
|
-
|
|
5
|
-
import type { FC } from 'react';
|
|
6
|
-
import { SampleDescription } from '../SampleDescription';
|
|
7
|
-
|
|
8
|
-
const ARGS = {
|
|
9
|
-
_icons: 'codicon codicon-home',
|
|
10
|
-
_hideLabel: true,
|
|
11
|
-
_on: {
|
|
12
|
-
onClick: () => alert('Klick!'),
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const ButtonIconOnly: FC = () => (
|
|
17
|
-
<>
|
|
18
|
-
<SampleDescription>
|
|
19
|
-
<p>
|
|
20
|
-
Hier sind Buttons aktiviert und deaktiviert. Sie beinhalten kein Label. Das Label wird beim anklicken oder als Tooltip angezeigt. Beim anklicken wird
|
|
21
|
-
ein alert als Popup ausgeführt.
|
|
22
|
-
</p>
|
|
23
|
-
</SampleDescription>
|
|
24
|
-
<div className="grid gap-14">
|
|
25
|
-
<div className="flex flex-wrap gap-14">
|
|
26
|
-
<KolButton _label="Primary" _variant="primary" _tooltipAlign="top" {...ARGS}></KolButton>
|
|
27
|
-
<KolButton _label="Secondary" _variant="secondary" _tooltipAlign="right" {...ARGS}></KolButton>
|
|
28
|
-
<KolButton _label="Normal" _variant="normal" _tooltipAlign="bottom" {...ARGS}></KolButton>
|
|
29
|
-
<KolButton _label="Danger" _variant="danger" _tooltipAlign="left" {...ARGS}></KolButton>
|
|
30
|
-
<KolButton _label="Ghost" _variant="ghost" {...ARGS}></KolButton>
|
|
31
|
-
</div>
|
|
32
|
-
<div className="flex flex-wrap gap-14">
|
|
33
|
-
<KolButton _disabled _label="Primary" _variant="primary" {...ARGS}></KolButton>
|
|
34
|
-
<KolButton _disabled _label="Secondary" _variant="secondary" {...ARGS}></KolButton>
|
|
35
|
-
<KolButton _disabled _label="Normal" _variant="normal" {...ARGS}></KolButton>
|
|
36
|
-
<KolButton _disabled _label="Danger" _variant="danger" {...ARGS}></KolButton>
|
|
37
|
-
<KolButton _disabled _label="Ghost" _variant="ghost" {...ARGS}></KolButton>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</>
|
|
41
|
-
);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { KolButton, KolCard } from '@public-ui/react';
|
|
4
|
-
|
|
5
|
-
import type { FC } from 'react';
|
|
6
|
-
import { SampleDescription } from '../SampleDescription';
|
|
7
|
-
|
|
8
|
-
export const CardConfirm: FC = () => (
|
|
9
|
-
<>
|
|
10
|
-
<SampleDescription>
|
|
11
|
-
<p>Hier wird eine Karte mit Beispieltext und zwei Knöpfen 'Speichern' und 'Abbrechen'.</p>
|
|
12
|
-
</SampleDescription>
|
|
13
|
-
<KolCard _has-footer _label="Überschrift">
|
|
14
|
-
<div>
|
|
15
|
-
<p className="p-2">
|
|
16
|
-
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Soluta pariatur laudantium saepe ipsa atque officia cupiditate repudiandae harum earum aut
|
|
17
|
-
doloribus autem libero exercitationem dolor ad, magni dignissimos ratione fuga. Lorem ipsum dolor sit amet consectetur adipisicing elit. Officiis
|
|
18
|
-
perferendis qui animi nesciunt illo facere, doloribus sint cupiditate nihil dolorem voluptate ab esse! Ducimus ad est commodi molestias voluptas
|
|
19
|
-
reiciendis.
|
|
20
|
-
</p>
|
|
21
|
-
<div className="flex gap-2 flex-justify-end">
|
|
22
|
-
<KolButton className="w-12rem" _variant="primary" _label="Speichern"></KolButton>
|
|
23
|
-
<KolButton className="w-12rem" _variant="secondary" _label="Abbrechen"></KolButton>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</KolCard>
|
|
27
|
-
</>
|
|
28
|
-
);
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { KolCard } from '@public-ui/react';
|
|
4
|
-
|
|
5
|
-
import type { FC } from 'react';
|
|
6
|
-
import { SampleDescription } from '../SampleDescription';
|
|
7
|
-
|
|
8
|
-
export const CardFlex: FC = () => (
|
|
9
|
-
<>
|
|
10
|
-
<SampleDescription>
|
|
11
|
-
<p>
|
|
12
|
-
Hier werden mehrere Karten mit unterschiedlichen Inhalten angezeigt. Beim anklicken des 'x' wird ein Label mit 'Schließen'
|
|
13
|
-
angezeigt.
|
|
14
|
-
</p>
|
|
15
|
-
</SampleDescription>
|
|
16
|
-
<div className="grid grid-cols-2 gap-4">
|
|
17
|
-
<KolCard _label="Titel">
|
|
18
|
-
<div>Inhalt</div>
|
|
19
|
-
</KolCard>
|
|
20
|
-
<KolCard _label="Titel" _hasCloser>
|
|
21
|
-
<div>
|
|
22
|
-
Inhalt
|
|
23
|
-
<br />
|
|
24
|
-
Inhalt
|
|
25
|
-
</div>
|
|
26
|
-
</KolCard>
|
|
27
|
-
<KolCard _label="Titel">
|
|
28
|
-
<div>
|
|
29
|
-
Inhalt
|
|
30
|
-
<br />
|
|
31
|
-
Inhalt
|
|
32
|
-
<br />
|
|
33
|
-
Inhalt
|
|
34
|
-
</div>
|
|
35
|
-
</KolCard>
|
|
36
|
-
<KolCard _label="Titel">
|
|
37
|
-
<div>Inhalt</div>
|
|
38
|
-
</KolCard>
|
|
39
|
-
<KolCard _label="Titel">
|
|
40
|
-
<div>Inhalt</div>
|
|
41
|
-
</KolCard>
|
|
42
|
-
</div>
|
|
43
|
-
</>
|
|
44
|
-
);
|