@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
|
@@ -9,22 +9,23 @@ export const DetailsBasic: FC = () => (
|
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
11
|
<p>
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
KolDetails hides its content until opened. The open state can be toggled either by clicking the label or by setting the <code>_open</code>-prop
|
|
13
|
+
programmatically. The sample includes an initially open state and a disabled but open Details component.
|
|
14
14
|
</p>
|
|
15
15
|
</SampleDescription>
|
|
16
|
+
|
|
16
17
|
<p className="grid gap-4">
|
|
17
|
-
<KolDetails _label="
|
|
18
|
+
<KolDetails _label="Closed initially">
|
|
18
19
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
19
20
|
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
|
20
21
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt.
|
|
21
22
|
</KolDetails>
|
|
22
|
-
<KolDetails _disabled _label="
|
|
23
|
+
<KolDetails _disabled _label="Open initially (disabled)" _open>
|
|
23
24
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
24
25
|
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
|
25
26
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt.
|
|
26
27
|
</KolDetails>
|
|
27
|
-
<KolDetails _label="
|
|
28
|
+
<KolDetails _label="Open initially" _open>
|
|
28
29
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
29
30
|
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
|
30
31
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt.
|
|
@@ -15,7 +15,7 @@ export const DrawerBasic: FC = () => {
|
|
|
15
15
|
const hideMenus = useContext(HideMenusContext);
|
|
16
16
|
const drawerElement = useRef<HTMLKolDrawerElement>(null);
|
|
17
17
|
const drawerModalElement = useRef<HTMLKolDrawerElement>(null);
|
|
18
|
-
const [align, setAlign] = useState<AlignPropType>(defaultAlign);
|
|
18
|
+
const [align, setAlign] = useState<AlignPropType>(defaultAlign || 'left');
|
|
19
19
|
useEffect(() => {
|
|
20
20
|
if (defaultAlign) {
|
|
21
21
|
drawerModalElement.current?.open();
|
|
@@ -26,11 +26,11 @@ export const DrawerBasic: FC = () => {
|
|
|
26
26
|
{!hideMenus && <KolBadge className="block mb-3" _label="Component is a DRAFT - Don't use in production yet." _color="#db5461" />}
|
|
27
27
|
<SampleDescription>
|
|
28
28
|
<p>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Modal (_modal) durch ESC schließen. Beide Varianten können über das Attribut _align links, oben, rechts oder unten ausgerichtet werden.
|
|
29
|
+
KolDrawer shows a dialog attached to one of the sides of the viewport, when opened. This sample illustrates the four alignments and the modal- and
|
|
30
|
+
non-modal modes.
|
|
32
31
|
</p>
|
|
33
32
|
</SampleDescription>
|
|
33
|
+
|
|
34
34
|
<DrawerRadioAlign value={align} onChange={(_, value) => setAlign(value as AlignPropType)} />
|
|
35
35
|
<div className="flex flex-wrap gap-4">
|
|
36
36
|
<KolDrawer ref={drawerElement} _label="Ich bin ein Drawer" _align={align} _on={{ onClose: () => console.log('Drawer onClose triggered!') }}>
|
|
@@ -21,20 +21,20 @@ export const DrawerControlled: FC = () => {
|
|
|
21
21
|
{!hideMenus && <KolBadge className="block mb-3" _label="Component is a DRAFT - Don't use in production yet." _color="#db5461" />}
|
|
22
22
|
<SampleDescription>
|
|
23
23
|
<p>
|
|
24
|
-
|
|
25
|
-
Dialog als Modal (_modal) durch ESC schließen. Der Drawer kann über das Attribut _align links, oben, rechts oder unten ausgerichtet werden.
|
|
24
|
+
This sample shows the KolDrawer controlled by the property <code>_open</code> instead of methods.
|
|
26
25
|
</p>
|
|
27
26
|
</SampleDescription>
|
|
27
|
+
|
|
28
28
|
<DrawerRadioAlign value={align} onChange={(_, value) => setAlign(value as AlignPropType)} />
|
|
29
29
|
<div className="flex flex-wrap gap-4">
|
|
30
|
-
<KolDrawer _open={open} _align={align} _label="
|
|
30
|
+
<KolDrawer _open={open} _align={align} _label="I'm a controlled drawer" _on={{ onClose: () => setOpen(false) }}>
|
|
31
31
|
<div>
|
|
32
32
|
<p>Lorem ipsum dolor sit amet,</p>
|
|
33
33
|
<KolButton _label="Close drawer" _on={{ onClick: () => setOpen(false) }} />
|
|
34
34
|
</div>
|
|
35
35
|
</KolDrawer>
|
|
36
36
|
<KolButton _label="Open drawer" _on={{ onClick: () => setOpen(true) }} />
|
|
37
|
-
<KolDrawer _open={modalOpen} _modal _align={align} _label="
|
|
37
|
+
<KolDrawer _open={modalOpen} _modal _align={align} _label="I'm a controlled modal drawer" _on={{ onClose: () => setModalOpen(false) }}>
|
|
38
38
|
<div>
|
|
39
39
|
<p>Lorem ipsum dolor sit amet,</p>
|
|
40
40
|
<KolButton _label="Close drawer" _on={{ onClick: () => setModalOpen(false) }} />
|
|
@@ -6,13 +6,14 @@ import { KolForm, KolInputText } from '@public-ui/react';
|
|
|
6
6
|
export const FormBasic: FC = () => (
|
|
7
7
|
<>
|
|
8
8
|
<SampleDescription>
|
|
9
|
-
<p>
|
|
9
|
+
<p>KolForm renders a form around the input components provided in a slot. This sample shows a basic form with three input fields.</p>
|
|
10
10
|
</SampleDescription>
|
|
11
|
+
|
|
11
12
|
<KolForm>
|
|
12
13
|
<div className="grid gap-2">
|
|
13
|
-
<KolInputText id="input1" _label="
|
|
14
|
-
<KolInputText id="input2" _label="
|
|
15
|
-
<KolInputText id="input3" _label="
|
|
14
|
+
<KolInputText id="input1" _label="Input 1" />
|
|
15
|
+
<KolInputText id="input2" _label="Input 2" />
|
|
16
|
+
<KolInputText id="input3" _label="Input 3" />
|
|
16
17
|
</div>
|
|
17
18
|
</KolForm>
|
|
18
19
|
</>
|
|
@@ -6,20 +6,21 @@ import { KolForm, KolInputText } from '@public-ui/react';
|
|
|
6
6
|
export const FormErrorList: FC = () => (
|
|
7
7
|
<>
|
|
8
8
|
<SampleDescription>
|
|
9
|
-
<p>
|
|
9
|
+
<p>This sample shows a form with error messages.</p>
|
|
10
10
|
</SampleDescription>
|
|
11
|
+
|
|
11
12
|
<KolForm
|
|
12
13
|
_errorList={[
|
|
13
14
|
{
|
|
14
|
-
message: '
|
|
15
|
+
message: 'Error in Input 2',
|
|
15
16
|
selector: '#input2',
|
|
16
17
|
},
|
|
17
18
|
]}
|
|
18
19
|
>
|
|
19
20
|
<div className="grid gap-2">
|
|
20
|
-
<KolInputText id="input1" _label="
|
|
21
|
-
<KolInputText id="input2" _label="
|
|
22
|
-
<KolInputText id="input3" _label="
|
|
21
|
+
<KolInputText id="input1" _label="Input 1" />
|
|
22
|
+
<KolInputText id="input2" _label="Input 2" _touched _msg={{ _description: 'Input error', _type: 'error' }} />
|
|
23
|
+
<KolInputText id="input3" _label="Input 3" />
|
|
23
24
|
</div>
|
|
24
25
|
</KolForm>
|
|
25
26
|
</>
|
|
@@ -8,8 +8,11 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const HeadingBadged: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>
|
|
12
|
+
This sample shows KolHeading with its different levels and content provided using the export slot instead of the <code>_label</code>-property.
|
|
13
|
+
</p>
|
|
12
14
|
</SampleDescription>
|
|
15
|
+
|
|
13
16
|
<div className="grid gap-4">
|
|
14
17
|
<KolHeading _label="" _level={1}>
|
|
15
18
|
<span slot="expert">
|
|
@@ -8,15 +8,16 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const HeadingBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>KolHeading renders a heading with the given level.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
|
+
|
|
13
14
|
<div className="grid gap-4">
|
|
14
|
-
<KolHeading _label="
|
|
15
|
-
<KolHeading _label="
|
|
16
|
-
<KolHeading _label="
|
|
17
|
-
<KolHeading _label="
|
|
18
|
-
<KolHeading _label="
|
|
19
|
-
<KolHeading _label="
|
|
15
|
+
<KolHeading _label="I'm a H1-heading" _level={1} />
|
|
16
|
+
<KolHeading _label="I'm a H2-heading" _level={2} />
|
|
17
|
+
<KolHeading _label="I'm a H3-heading" _level={3} />
|
|
18
|
+
<KolHeading _label="I'm a H4-heading" _level={4} />
|
|
19
|
+
<KolHeading _label="I'm a H5-heading" _level={5} />
|
|
20
|
+
<KolHeading _label="I'm a H6-heading" _level={6} />
|
|
20
21
|
</div>
|
|
21
22
|
</>
|
|
22
23
|
);
|
|
@@ -8,11 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const HeadingParagraph: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
12
|
-
Hier sind sechs verschiedene Überschriften mit unterschiedlichen Leveln dargestellt. Sie haben jeweils noch ein Beispieltext. Es gibt keine
|
|
13
|
-
Interaktionsmöglichkeit.
|
|
14
|
-
</p>
|
|
11
|
+
<p>This sample shows KolHeading with its different levels combined with some text content each.</p>
|
|
15
12
|
</SampleDescription>
|
|
13
|
+
|
|
16
14
|
<div className="grid gap-4">
|
|
17
15
|
<KolHeading _label="Ich bin eine H1-Überschrift" _level={1} />
|
|
18
16
|
<p>
|
|
@@ -8,8 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const IconBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>KolIcon renders an icon. This sample shows one regular icon and one with a custom style-property, changing the icon color.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
|
+
|
|
13
14
|
<div className="grid gap-4">
|
|
14
15
|
<KolIcon _label="" _icons="codicon codicon-home" />
|
|
15
16
|
<KolIcon
|
|
@@ -6,8 +6,9 @@ import { KolImage } from '@public-ui/react';
|
|
|
6
6
|
export const ImageBasic: FC = () => (
|
|
7
7
|
<>
|
|
8
8
|
<SampleDescription>
|
|
9
|
-
<p>
|
|
9
|
+
<p>KolImage renders an image. The sample shows an image with alternative text.</p>
|
|
10
10
|
</SampleDescription>
|
|
11
|
+
|
|
11
12
|
<KolImage className="w-80%" _src="abgrenzung.jpg" _alt="Darstellung des KoliBri-Theming" />
|
|
12
13
|
</>
|
|
13
14
|
);
|
|
@@ -8,8 +8,11 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const IndentedTextBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>
|
|
12
|
+
KolIndentedText renders the given slot content, styled as indented text. The sample shows two regular paragraphs with an indented paragraph in between.
|
|
13
|
+
</p>
|
|
12
14
|
</SampleDescription>
|
|
15
|
+
|
|
13
16
|
<div className="grid gap-4">
|
|
14
17
|
<p>
|
|
15
18
|
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
@@ -8,12 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const InputCheckboxBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
12
|
-
Hier werden verschiedene Checkboxen mit betiteltem Wunschausgangsverhalten angezeigt. Die Checkbox 'Nicht ausgewählt' ist Standardmäßig nicht
|
|
13
|
-
ausgewählt usw. Die Buttons unten haben keine direkte Funktion, außer, dass Sie ausgewählt werden können. Der Unterschied zwischen der linken und
|
|
14
|
-
Rechten Darstellung ist, dass erst nach anklicken im Rechten Teil ein Label angezeigt wird.
|
|
15
|
-
</p>
|
|
11
|
+
<p>KolInputCheckbox renders a checkbox. The sample shows KolInputCheckbox in a form context with all variations and states.</p>
|
|
16
12
|
</SampleDescription>
|
|
13
|
+
|
|
17
14
|
<FormWrap RefComponent={InputCheckboxVariants} />
|
|
18
15
|
</>
|
|
19
16
|
);
|
|
@@ -9,13 +9,9 @@ import { InputCheckboxVariants } from './partials/variants';
|
|
|
9
9
|
export const InputCheckboxButton: FC = () => (
|
|
10
10
|
<>
|
|
11
11
|
<SampleDescription>
|
|
12
|
-
<p>
|
|
13
|
-
Hier werden verschiedene Checkboxen mit betiteltem Wunschausgangsverhalten angezeigt. Die Checkbox 'Nicht ausgewählt' ist Standardmäßig nicht
|
|
14
|
-
ausgewählt usw. Die Buttons unten haben keine direkte Funktion, außer, dass Sie ausgewählt werden können. Der Unterschied zwischen der linken und
|
|
15
|
-
Rechten Darstellung ist, dass erst nach anklicken im Rechten Teil ein Label angezeigt wird. In diesem Beispiel sind die Checkboxen als Buttons
|
|
16
|
-
dargestellt.
|
|
17
|
-
</p>
|
|
12
|
+
<p>This sample shows KolInputCheckbox in the variant "button".</p>
|
|
18
13
|
</SampleDescription>
|
|
14
|
+
|
|
19
15
|
<FormWrap<Components.KolInputCheckbox> RefComponent={InputCheckboxVariants} _variant="button" />
|
|
20
16
|
</>
|
|
21
17
|
);
|
|
@@ -7,14 +7,9 @@ import { FormWrap } from '../FormWrap';
|
|
|
7
7
|
export const InputCheckboxSwitch: FC = () => (
|
|
8
8
|
<>
|
|
9
9
|
<SampleDescription>
|
|
10
|
-
<p>
|
|
11
|
-
{' '}
|
|
12
|
-
Hier werden verschiedene Checkboxen mit betiteltem Wunschausgangsverhalten angezeigt. Die Checkbox 'Nicht ausgewählt' ist Standardmäßig nicht
|
|
13
|
-
ausgewählt usw. Die Buttons unten haben keine direkte Funktion, außer, dass Sie ausgewählt werden können. Der Unterschied zwischen der linken und
|
|
14
|
-
Rechten Darstellung ist, dass erst nach anklicken im Rechten Teil ein Label angezeigt wird. In diesem Beispiel sind die Checkboxen als Switches
|
|
15
|
-
dargestellt.
|
|
16
|
-
</p>
|
|
10
|
+
<p>This sample shows KolInputCheckbox in the variant "switch".</p>
|
|
17
11
|
</SampleDescription>
|
|
12
|
+
|
|
18
13
|
<FormWrap RefComponent={InputCheckboxVariants} _variant="switch" />
|
|
19
14
|
</>
|
|
20
15
|
);
|
|
@@ -8,11 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const InputColorBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
12
|
-
Hier sind verschiedene Formular-Felder mit Farben angezeigt. Links mit Label, Rechts nur nach anklicken mit Label. Die Farben können verändert werden.
|
|
13
|
-
Die Buttons unten haben keine direkte Funktion. Sie können angeklickt werden.{' '}
|
|
14
|
-
</p>
|
|
11
|
+
<p>KolInputColor renders a color input. The sample shows KolInputColor in a form context with all variations and states.</p>
|
|
15
12
|
</SampleDescription>
|
|
13
|
+
|
|
16
14
|
<FormWrap RefComponent={InputColorVariants} />
|
|
17
15
|
</>
|
|
18
16
|
);
|
|
@@ -8,13 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const InputDateBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
12
|
-
Hier sieht man ein Formularfeld mit verschiedenen Zeiteingaben. Bei Datumseingabe kann ein Datum in einem Kalender ausgewählt werden, aber auch
|
|
13
|
-
eingetippt werden. Es gibt ein gleiches Verhalten im nächsten Feld. Die Felder Monat und Woche sind Freitextfelder. Im Feld Zeit können nur Werte von 0
|
|
14
|
-
bis 23 und 0 bis 59 angegeben werden. Mit den Feldern Zahleneingabe gibt es keine Interaktionsmöglichekeit. Ein gleiches Verhalten gibt es im Rechten
|
|
15
|
-
Feld, hier werden die Label erst nach anklicken angezeigt.{' '}
|
|
16
|
-
</p>
|
|
11
|
+
<p>KolInputDate renders all types of fields for date and time input. The sample shows KolInputDate in a form context with all variations and states.</p>
|
|
17
12
|
</SampleDescription>
|
|
13
|
+
|
|
18
14
|
<FormWrap RefComponent={InputDateVariants} />
|
|
19
15
|
</>
|
|
20
16
|
);
|
|
@@ -8,8 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const InputEmailBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>KolInputEmail renders an email input field. The sample shows KolInputEmail in a form context with all variations and states.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
|
+
|
|
13
14
|
<FormWrap RefComponent={InputEmailVariants} />
|
|
14
15
|
</>
|
|
15
16
|
);
|
|
@@ -8,11 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const InputFileBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
12
|
-
Hier können einzelne oder mehrere Files ausgewählt werden. Bei 'Datei hochladen' wird der Name der ausgewählten Datei angezeigt. Bei
|
|
13
|
-
'Datei hochladen (Multiple)' werden die Anzahl der ausgewählten Dateien angezeigt.
|
|
14
|
-
</p>
|
|
11
|
+
<p>KolInputFile renders a file input field. The sample shows KolInputFile in a form context with all variations and states.</p>
|
|
15
12
|
</SampleDescription>
|
|
13
|
+
|
|
16
14
|
<FormWrap RefComponent={InputFileVariants} />
|
|
17
15
|
</>
|
|
18
16
|
);
|
|
@@ -9,10 +9,9 @@ export const InputNumberBasic: FC = () => (
|
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
11
|
<p>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
through native HTML element validation.
|
|
12
|
+
KolInputNumber encompasses basic functionalities, utilizing the min, max, and step attributes to restrict the range of input values. Despite these
|
|
13
|
+
constraints, it allows free input that can ignore the defined minimum and maximum values, as well as step sizes. The component intentionally does not
|
|
14
|
+
emphasize validation rules, supporting examples without form validation, and refrains from additional validation through native HTML element validation.
|
|
16
15
|
</p>
|
|
17
16
|
</SampleDescription>
|
|
18
17
|
<FormWrap RefComponent={InputNumberVariants} />
|
|
@@ -8,8 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const InputPasswordBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>KolInputPassword renders a password input field. The sample shows KolInputPassword in a form context with all variations and states.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
|
+
|
|
13
14
|
<FormWrap RefComponent={InputPasswordVariants} />
|
|
14
15
|
</>
|
|
15
16
|
);
|
|
@@ -11,10 +11,11 @@ export const InputPasswordShowPassword: FC = () => {
|
|
|
11
11
|
<>
|
|
12
12
|
<SampleDescription>
|
|
13
13
|
<p>
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
This sample shows KolInputPassword in the variant "visibility-toggle". It features a button to toggle between a visible and hidden password
|
|
15
|
+
input.
|
|
16
16
|
</p>
|
|
17
17
|
</SampleDescription>
|
|
18
|
+
|
|
18
19
|
<KolForm>
|
|
19
20
|
<KolInputPassword _placeholder="Mit 'Passwort anzeigen' Button" _label="Passwort" ref={passwordRef} className="block" _variant="visibility-toggle" />
|
|
20
21
|
<KolInputPassword
|
|
@@ -8,8 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const InputRadioBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>KolInputRadio renders a set of radio buttons. The sample shows KolInputRadio in a form context with all variations and states.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
|
+
|
|
13
14
|
<FormWrap RefComponent={InputRadioVariants} />
|
|
14
15
|
</>
|
|
15
16
|
);
|
|
@@ -27,10 +27,10 @@ export const InputRadioHorizontal: FC = () => {
|
|
|
27
27
|
<div className="grid gap-4">
|
|
28
28
|
<SampleDescription>
|
|
29
29
|
<p>
|
|
30
|
-
This sample
|
|
31
|
-
component.
|
|
30
|
+
This sample shows the <code>horizontal</code> and <code>vertical</code> orientation of KolInoutRadio. It also features a button to test re-rendering.
|
|
32
31
|
</p>
|
|
33
32
|
</SampleDescription>
|
|
33
|
+
|
|
34
34
|
<div className="flex gap-4">
|
|
35
35
|
<KolButton _label="Click me a few times" _on={{ onClick: showClick }} />
|
|
36
36
|
<KolInputCheckbox _label="Switch orientation (horizontal/vertical)" _on={{ onChange: toggleOrientation }} _variant="switch" />
|
|
@@ -14,22 +14,22 @@ export const InputRadioObjectValue: FC = () => {
|
|
|
14
14
|
return (
|
|
15
15
|
<div className="grid gap-4">
|
|
16
16
|
<SampleDescription>
|
|
17
|
-
|
|
17
|
+
This sample shows KolInputRadio with <code>object</code> and <code>undefined</code> values.
|
|
18
18
|
</SampleDescription>
|
|
19
|
-
|
|
20
|
-
In this example for <code>KolInputRadio</code>, the values of the options are defined as objects.
|
|
21
|
-
</p>
|
|
19
|
+
|
|
22
20
|
<KolForm>
|
|
21
|
+
<p>
|
|
22
|
+
In this example for <code>KolInputRadio</code>, the values of the options are defined as objects.
|
|
23
|
+
</p>
|
|
23
24
|
<div className="container my-4 d-grid gap-4">
|
|
24
|
-
<KolInputRadio _value={options[1].value} _options={options} _label="Test(with object value)" />
|
|
25
|
+
<KolInputRadio _value={options[1].value} _options={options} _label="Test (with object value)" />
|
|
25
26
|
</div>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<KolForm>
|
|
27
|
+
|
|
28
|
+
<p>
|
|
29
|
+
In this example for <code>KolInputRadio</code>, no value is set.
|
|
30
|
+
</p>
|
|
31
31
|
<div className="container my-4 d-grid gap-4">
|
|
32
|
-
<KolInputRadio _options={options} _label="Test(without value)" />
|
|
32
|
+
<KolInputRadio _options={options} _label="Test (without value)" />
|
|
33
33
|
</div>
|
|
34
34
|
</KolForm>
|
|
35
35
|
</div>
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { Routes } from '../../shares/types';
|
|
2
2
|
import { InputRadioBasic } from './basic';
|
|
3
3
|
import { InputRadioHorizontal } from './horizontal';
|
|
4
|
-
import { InputRadioSelect } from './select';
|
|
5
4
|
import { InputRadioObjectValue } from './objectValue';
|
|
6
5
|
|
|
7
6
|
export const INPUT_RADIO_ROUTES: Routes = {
|
|
8
7
|
'input-radio': {
|
|
9
8
|
basic: InputRadioBasic,
|
|
10
9
|
horizontal: InputRadioHorizontal,
|
|
11
|
-
select: InputRadioSelect,
|
|
12
10
|
object: InputRadioObjectValue,
|
|
13
11
|
},
|
|
14
12
|
};
|
|
@@ -8,8 +8,12 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const InputRangeBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>
|
|
12
|
+
KolInputRange renders a pair of range- and number fields wich are synchronized with each other. The sample shows KolInputRange in a form context with
|
|
13
|
+
all variations and states.
|
|
14
|
+
</p>
|
|
12
15
|
</SampleDescription>
|
|
16
|
+
|
|
13
17
|
<FormWrap RefComponent={InputRangeVariants} />
|
|
14
18
|
</>
|
|
15
19
|
);
|
|
@@ -8,8 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const InputTextBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>KolInputText renders a text input field. The sample shows KolInputText in a form context with all variations and states.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
|
+
|
|
13
14
|
<FormWrap RefComponent={InputTextVariants} />
|
|
14
15
|
</>
|
|
15
16
|
);
|
|
@@ -6,12 +6,16 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
6
6
|
export const InputTextHideErrors: FC = () => (
|
|
7
7
|
<div className="grid gap-4">
|
|
8
8
|
<SampleDescription>
|
|
9
|
-
|
|
9
|
+
<p>
|
|
10
|
+
This sample shows the <code>_hideError</code> feature for KolInputText. It allows to hide the error message from an input field and can be used, when
|
|
11
|
+
the error is already shown somewhere else, e.g. for a group of inputs.
|
|
12
|
+
</p>
|
|
10
13
|
</SampleDescription>
|
|
14
|
+
|
|
11
15
|
<KolCard _label="Normal input field with error" _level={0}>
|
|
12
16
|
<KolInputText _msg={{ _type: 'error', _description: 'Error message' }} _label="Input with error" _touched />
|
|
13
17
|
</KolCard>
|
|
14
|
-
<KolCard _label="Input
|
|
18
|
+
<KolCard _label="Input fields with hidden error" _level={0}>
|
|
15
19
|
<fieldset className="grid md:grid-cols-2 gap-4">
|
|
16
20
|
<legend>Combined input field</legend>
|
|
17
21
|
<KolAlert className="col-span-2" _level={0} _type="error">
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Routes } from '../../shares/types';
|
|
2
2
|
import { InputTextBasic } from './basic';
|
|
3
|
-
import { InputTextBlur } from './blur';
|
|
4
3
|
import { InputTextHideErrors } from './hide-errors';
|
|
5
4
|
|
|
6
5
|
export const INPUT_TEXT_ROUTES: Routes = {
|
|
7
6
|
'input-text': {
|
|
8
7
|
basic: InputTextBasic,
|
|
9
|
-
blur: InputTextBlur,
|
|
10
8
|
'hide-errors': InputTextHideErrors,
|
|
11
9
|
},
|
|
12
10
|
};
|
|
@@ -8,14 +8,14 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const KolibriBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>KolKolibri renders the KoliBri logo. The sample show the logo with and without label and with a custom color.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
13
|
|
|
14
14
|
<KolHeading class="block" _level={3} _label="Regular" />
|
|
15
15
|
<KolKolibri class="block" style={{ width: 300 }} />
|
|
16
|
-
<KolHeading class="block" _level={3} _label="
|
|
16
|
+
<KolHeading class="block" _level={3} _label="Without Label" />
|
|
17
17
|
<KolKolibri class="block" style={{ width: 300 }} _labeled={false} />
|
|
18
|
-
<KolHeading class="block" _level={3} _label="
|
|
18
|
+
<KolHeading class="block" _level={3} _label="Customized color" />
|
|
19
19
|
<KolKolibri class="block" style={{ width: 300 }} _color="#cc006e" />
|
|
20
20
|
</>
|
|
21
21
|
);
|
|
@@ -7,8 +7,11 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
7
7
|
export const LinkBasic: FC = () => (
|
|
8
8
|
<>
|
|
9
9
|
<SampleDescription>
|
|
10
|
-
<p>
|
|
10
|
+
<p>
|
|
11
|
+
KolLink renders a link. This sample shows disabled links, links with hidden label and links with different CSS <code>display</code>-properties.
|
|
12
|
+
</p>
|
|
11
13
|
</SampleDescription>
|
|
14
|
+
|
|
12
15
|
<div className="grid gap-4">
|
|
13
16
|
<KolLink _href="#/back-page" _label="Simple Link" />
|
|
14
17
|
<KolLink _disabled _href="#/back-page" _label="Simple Link (deaktiviert)" />
|
|
@@ -8,8 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const LinkIcons: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>This sample shows KolLink with icons in different alignments and combinations.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
|
+
|
|
13
14
|
<div className="grid gap-4">
|
|
14
15
|
<KolLink _icons="codicon codicon-home" _label="Ich bin ein Link mit Icon links" _href="#/back-page" />
|
|
15
16
|
<KolLink
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import type { FC } from 'react';
|
|
4
|
+
import { KolLink } from '@public-ui/react';
|
|
6
5
|
import { SampleDescription } from '../SampleDescription';
|
|
7
6
|
|
|
8
7
|
export const LinkImage: FC = () => (
|
|
9
8
|
<>
|
|
10
9
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
10
|
+
<p>KolLink can be used with slot-content instead of a label as well. This sample demonstrates the slot content used to display an image.</p>
|
|
12
11
|
</SampleDescription>
|
|
12
|
+
|
|
13
13
|
<div className="grid gap-4">
|
|
14
14
|
<KolLink _href="#/back-page" _label="Ich bin ein Link, der als Text gerendert wird" />
|
|
15
15
|
<br />
|
|
16
|
-
<KolLink _href="#/back-page" _label="">
|
|
17
|
-
<img alt="Darstellung des KoliBri-Theming" slot="expert" src="abgrenzung.jpg" width="300" />
|
|
18
|
-
<KolKolibri style={{ width: '300px' }}></KolKolibri>
|
|
19
|
-
</KolLink>
|
|
20
|
-
<br />
|
|
21
16
|
<KolLink _href="#/back-page" _label="">
|
|
22
17
|
<img alt="Darstellung des KoliBri-Theming" slot="expert" src="abgrenzung.jpg" width="300" />
|
|
23
18
|
</KolLink>
|