@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
|
@@ -8,15 +8,32 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const LinkTarget: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>
|
|
12
|
+
This sample shows KolLink with different <code>_target</code>-properties.
|
|
13
|
+
</p>
|
|
12
14
|
</SampleDescription>
|
|
15
|
+
|
|
13
16
|
<div className="d-flex gap-4">
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
<ul>
|
|
18
|
+
<li>
|
|
19
|
+
<KolLink _href="#/back-page" _label="Link without target" />
|
|
20
|
+
</li>
|
|
21
|
+
<li>
|
|
22
|
+
<KolLink _href="#/back-page" _label="Link with target (_self)" _target="_self" />
|
|
23
|
+
</li>
|
|
24
|
+
<li>
|
|
25
|
+
<KolLink _href="#/back-page" _label="Link with target (_blank)" _target="_blank" />
|
|
26
|
+
</li>
|
|
27
|
+
<li>
|
|
28
|
+
<KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Link without target" />
|
|
29
|
+
</li>
|
|
30
|
+
<li>
|
|
31
|
+
<KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Link with target (_self)" _target="_self" />
|
|
32
|
+
</li>
|
|
33
|
+
<li>
|
|
34
|
+
<KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Link with target (_blank)" _target="_blank" />
|
|
35
|
+
</li>
|
|
36
|
+
</ul>
|
|
20
37
|
</div>
|
|
21
38
|
</>
|
|
22
39
|
);
|
|
@@ -12,8 +12,9 @@ const ARGS = {
|
|
|
12
12
|
export const LinkButtonBasic: FC = () => (
|
|
13
13
|
<>
|
|
14
14
|
<SampleDescription>
|
|
15
|
-
<p>
|
|
15
|
+
<p>KolLinkButton renders a link that looks like a button. The sample shows the different styling variants.</p>
|
|
16
16
|
</SampleDescription>
|
|
17
|
+
|
|
17
18
|
<div className="grid gap-14">
|
|
18
19
|
<div className="flex flex-wrap gap-14">
|
|
19
20
|
<KolLinkButton _label="Primary" _variant="primary" {...ARGS}></KolLinkButton>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
import { KolLinkGroup } from '@public-ui/react';
|
|
4
|
+
import { KolBadge, KolLinkGroup } from '@public-ui/react';
|
|
5
5
|
import { SampleDescription } from '../SampleDescription';
|
|
6
6
|
|
|
7
7
|
const links = [
|
|
@@ -12,8 +12,12 @@ const links = [
|
|
|
12
12
|
export const LinkGroupBasic: FC = () => (
|
|
13
13
|
<>
|
|
14
14
|
<SampleDescription>
|
|
15
|
-
<p>
|
|
15
|
+
<p>KolLinkGroup renders a list of the given links.</p>
|
|
16
|
+
<p>
|
|
17
|
+
<KolBadge _label="The component is deprecated and won't be available anymore in KoliBri version 3." _color="#db5461" />
|
|
18
|
+
</p>
|
|
16
19
|
</SampleDescription>
|
|
20
|
+
|
|
17
21
|
<KolLinkGroup _links={links} _label="" />
|
|
18
22
|
</>
|
|
19
23
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
import { KolLinkGroup } from '@public-ui/react';
|
|
4
|
+
import { KolBadge, KolLinkGroup } from '@public-ui/react';
|
|
5
5
|
import { SampleDescription } from '../SampleDescription';
|
|
6
6
|
|
|
7
7
|
const links = [
|
|
@@ -12,8 +12,12 @@ const links = [
|
|
|
12
12
|
export const LinkGroupHorizontal: FC = () => (
|
|
13
13
|
<>
|
|
14
14
|
<SampleDescription>
|
|
15
|
-
<p>
|
|
15
|
+
<p>KolLinkGroup renders a list of the given links. This sample shows the horizontal alignment.</p>
|
|
16
|
+
<p>
|
|
17
|
+
<KolBadge _label="The component is deprecated and won't be available anymore in KoliBri version 3." _color="#db5461" />
|
|
18
|
+
</p>
|
|
16
19
|
</SampleDescription>
|
|
20
|
+
|
|
17
21
|
<KolLinkGroup _links={links} _orientation="horizontal" _label="" />
|
|
18
22
|
</>
|
|
19
23
|
);
|
|
@@ -11,16 +11,17 @@ export const ModalBasic: FC = () => {
|
|
|
11
11
|
<>
|
|
12
12
|
<SampleDescription>
|
|
13
13
|
<p>
|
|
14
|
-
|
|
15
|
-
&
|
|
14
|
+
KolModal renders content in a popover, disabling interactivity with elements behind it. In the sample, the modal can be opened and closed using the
|
|
15
|
+
buttons "Open modal" and "Close modal".
|
|
16
16
|
</p>
|
|
17
17
|
</SampleDescription>
|
|
18
|
+
|
|
18
19
|
<div>
|
|
19
20
|
<KolModal _label="" _width="80%" ref={modalElement} _on={{ onClose: () => console.log('Modal closed') }}>
|
|
20
|
-
<KolCard _label="
|
|
21
|
+
<KolCard _label="I am a modal." style={{ width: '100%' }}>
|
|
21
22
|
<div>
|
|
22
23
|
<KolButton
|
|
23
|
-
_label="
|
|
24
|
+
_label="Close modal"
|
|
24
25
|
_on={{
|
|
25
26
|
onClick: () => {
|
|
26
27
|
if (modalElement?.current) {
|
|
@@ -33,7 +34,7 @@ export const ModalBasic: FC = () => {
|
|
|
33
34
|
</KolCard>
|
|
34
35
|
</KolModal>
|
|
35
36
|
<KolButton
|
|
36
|
-
_label="
|
|
37
|
+
_label="Open modal"
|
|
37
38
|
_on={{
|
|
38
39
|
onClick: (event: Event) => {
|
|
39
40
|
if (modalElement?.current) {
|
|
@@ -9,8 +9,8 @@ export const NavAriaCurrent: FC = () => (
|
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
11
|
<p>
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
This sample shows KolNav with a link to the current page. This makes the component automatically assign <code>aria-current="page"</code>
|
|
13
|
+
to it.
|
|
14
14
|
</p>
|
|
15
15
|
</SampleDescription>
|
|
16
16
|
|
|
@@ -23,8 +23,8 @@ export const NavAriaCurrent: FC = () => (
|
|
|
23
23
|
_href: '#/back-page',
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
_label: 'Nav - aria-current (
|
|
27
|
-
_href: '#/
|
|
26
|
+
_label: 'Nav - aria-current (Current page)',
|
|
27
|
+
_href: '#/nav/aria-current', // Please don't change this link. It's necessary to be the "current page" for the sample.
|
|
28
28
|
_active: true,
|
|
29
29
|
},
|
|
30
30
|
]}
|
|
@@ -12,10 +12,11 @@ export const NavBasic: FC = () => {
|
|
|
12
12
|
<>
|
|
13
13
|
<SampleDescription>
|
|
14
14
|
<p>
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
KolNav renders a navigation. In this sample, icons for the navigation elements can be shown or hidden using a checkbox and the navigation can be
|
|
16
|
+
collapsed, showing only icons and no text labels.
|
|
17
17
|
</p>
|
|
18
18
|
</SampleDescription>
|
|
19
|
+
|
|
19
20
|
<KolInputCheckbox
|
|
20
21
|
_label="Show icons when expanded"
|
|
21
22
|
_checked={hasIconsWhenExpanded}
|
|
@@ -7,11 +7,9 @@ import type { FC } from 'react';
|
|
|
7
7
|
export const NavHorizontal: FC = () => (
|
|
8
8
|
<>
|
|
9
9
|
<SampleDescription>
|
|
10
|
-
<p>
|
|
11
|
-
Hier ist ein Beispiel für eine horizontale Navigation. Durch anklicken des rechten + Symbols kann die Navigation erweitert und Untermenüs geöffnet
|
|
12
|
-
werden.
|
|
13
|
-
</p>
|
|
10
|
+
<p>This sample shows KolNav with horizontal alignment.</p>
|
|
14
11
|
</SampleDescription>
|
|
12
|
+
|
|
15
13
|
<KolNav _label="Main navigation" _links={LINKS} _orientation="horizontal" />
|
|
16
14
|
</>
|
|
17
15
|
);
|
|
@@ -9,21 +9,23 @@ export const PaginationBasic: FC = () => (
|
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
11
|
<p>
|
|
12
|
-
|
|
12
|
+
KolPagination renders a pagination for datasets. The sample shows the different states and variations of a pagination and the option to change the page
|
|
13
|
+
size.
|
|
13
14
|
</p>
|
|
14
15
|
</SampleDescription>
|
|
16
|
+
|
|
15
17
|
<div className="grid gap-4">
|
|
16
|
-
<KolPagination _max={316514} _page={15475} _siblingCount={3} _label="Test
|
|
17
|
-
<KolPagination _max={14} _page={14} _siblingCount={1} _boundaryCount={2} _label="Test
|
|
18
|
-
<KolPagination _max={4} _page={1} _siblingCount={0} _boundaryCount={2} _label="Test
|
|
19
|
-
<KolPagination _max={4} _page={6} _siblingCount={0} _boundaryCount={2} _hasButtons={false} _label="Test
|
|
18
|
+
<KolPagination _max={316514} _page={15475} _siblingCount={3} _label="Test pagination 1" _on={{}} />
|
|
19
|
+
<KolPagination _max={14} _page={14} _siblingCount={1} _boundaryCount={2} _label="Test pagination 2" _on={{}} />
|
|
20
|
+
<KolPagination _max={4} _page={1} _siblingCount={0} _boundaryCount={2} _label="Test pagination 3" _on={{}} />
|
|
21
|
+
<KolPagination _max={4} _page={6} _siblingCount={0} _boundaryCount={2} _hasButtons={false} _label="Test pagination 4" _on={{}} />
|
|
20
22
|
<KolPagination
|
|
21
23
|
_max={4}
|
|
22
24
|
_page={6}
|
|
23
25
|
_siblingCount={0}
|
|
24
26
|
_boundaryCount={2}
|
|
25
27
|
_hasButtons={false}
|
|
26
|
-
_label="Test
|
|
28
|
+
_label="Test pagination 4"
|
|
27
29
|
_on={{}}
|
|
28
30
|
_pageSizeOptions={[10, 100]}
|
|
29
31
|
/>
|
|
@@ -8,8 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const ProgressBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>KolProgress renders a progress indicator. The sample shows the variants "bar" and "cycle" with and without labels.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
|
+
|
|
13
14
|
<div className="grid gap-4">
|
|
14
15
|
<KolProgress _variant="bar" _max={100} _value={0} _label="With label"></KolProgress>
|
|
15
16
|
<KolProgress _variant="bar" _max={100} _value={33}></KolProgress>
|
|
@@ -7,8 +7,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
7
7
|
export const QuoteBasic: FC = () => (
|
|
8
8
|
<>
|
|
9
9
|
<SampleDescription>
|
|
10
|
-
<p>
|
|
10
|
+
<p>KolQuote renders a quote with optional citation. This sample shows a quote in the variant "inline" with a link for citation.</p>
|
|
11
11
|
</SampleDescription>
|
|
12
|
+
|
|
12
13
|
<KolQuote _href="https://datatracker.ietf.org/doc/html/rfc1149" _quote="Avian carriers can provide high delay." _variant="inline"></KolQuote>
|
|
13
14
|
</>
|
|
14
15
|
);
|
|
@@ -7,11 +7,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
7
7
|
export const QuoteBlock: FC = () => (
|
|
8
8
|
<>
|
|
9
9
|
<SampleDescription>
|
|
10
|
-
<p>
|
|
11
|
-
Hier ist ein Beispiel für ein Zitat. Es wird eine Quelle durch ein Label angegeben. Durch anklicken des Labels wird man auf die Quellenwebseite
|
|
12
|
-
weitergeleitet.
|
|
13
|
-
</p>
|
|
10
|
+
<p>This sample shows a quote in the "block" variant.</p>
|
|
14
11
|
</SampleDescription>
|
|
12
|
+
|
|
15
13
|
<KolQuote
|
|
16
14
|
_label="RFC 1149"
|
|
17
15
|
_href="https://datatracker.ietf.org/doc/html/rfc1149"
|
|
@@ -8,11 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const SelectBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
12
|
-
Hier sind Beispiele für verschiedene Auswahlfelder. Es gibt die Varianten Dropdownmenü und Liste mit Scrollbar. Es kann nur ein Element gleichzeitig
|
|
13
|
-
ausgewählt werden.
|
|
14
|
-
</p>
|
|
11
|
+
<p>KolSelect renders a select field. The sample shows KolSelect in a form context with all variations and states.</p>
|
|
15
12
|
</SampleDescription>
|
|
13
|
+
|
|
16
14
|
<FormWrap RefComponent={SelectVariants} />
|
|
17
15
|
</>
|
|
18
16
|
);
|
|
@@ -8,26 +8,24 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const SkipNavBasic: FC = () => (
|
|
9
9
|
<div className="grid gap-4">
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
12
|
-
|
|
13
|
-
<br />
|
|
14
|
-
Um die Links zu sehen, am besten einmal in diesen Bereich klicken und Tab-Taste drücken.
|
|
15
|
-
</p>
|
|
11
|
+
<p>KolSkipNav renders a list of navigation links that are visually hidden by default and only visible on focus.</p>
|
|
12
|
+
<p>For testing purposes, click into the example and press the tab-key in order to focus the first link.</p>
|
|
16
13
|
</SampleDescription>
|
|
14
|
+
|
|
17
15
|
<KolSkipNav
|
|
18
16
|
_label="Versteckte Navigation"
|
|
19
17
|
_links={[
|
|
20
18
|
{
|
|
21
19
|
_label: 'Zum Anfang',
|
|
22
|
-
_href: '
|
|
20
|
+
_href: '#/back-page',
|
|
23
21
|
},
|
|
24
22
|
{
|
|
25
23
|
_label: 'Zum Formular',
|
|
26
|
-
_href: '
|
|
24
|
+
_href: '#/back-page',
|
|
27
25
|
},
|
|
28
26
|
{
|
|
29
27
|
_label: 'Zum Ende',
|
|
30
|
-
_href: '
|
|
28
|
+
_href: '#/back-page',
|
|
31
29
|
},
|
|
32
30
|
]}
|
|
33
31
|
></KolSkipNav>
|
|
@@ -8,8 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const SpinBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>KolSpin renders a loading indicator. This sample shows the default variant "dot".</p>
|
|
12
12
|
</SampleDescription>
|
|
13
|
+
|
|
13
14
|
<KolSpin _show />
|
|
14
15
|
</>
|
|
15
16
|
);
|
|
@@ -11,10 +11,11 @@ export const SpinCustom: FC = () => (
|
|
|
11
11
|
<>
|
|
12
12
|
<SampleDescription>
|
|
13
13
|
<p>
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
This sample shows a custom loading animation. Using the expert slot, it is possible to insert custom animations. Custom animations are not necessarily
|
|
15
|
+
barrier-free.
|
|
16
16
|
</p>
|
|
17
17
|
</SampleDescription>
|
|
18
|
+
|
|
18
19
|
<KolSpin _show _variant="none">
|
|
19
20
|
<span slot="expert" className="loader"></span>
|
|
20
21
|
</KolSpin>
|
|
@@ -8,8 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const SpinCycle: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>This sample shows the KolSpin variant "cycle".</p>
|
|
12
12
|
</SampleDescription>
|
|
13
|
+
|
|
13
14
|
<KolSpin _show _variant="cycle" />
|
|
14
15
|
</>
|
|
15
16
|
);
|
|
@@ -20,10 +20,11 @@ export const SplitButtonBasic: FC = () => {
|
|
|
20
20
|
<>
|
|
21
21
|
<SampleDescription>
|
|
22
22
|
<p>
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
SplitButton renders a button with an additional context-menu, that can be opened by clicking the arrow icon. The first sample shows the button with an
|
|
24
|
+
assigned action. In the second sample no action is assigned and clicking the button opens the context menu instead.
|
|
25
25
|
</p>
|
|
26
26
|
</SampleDescription>
|
|
27
|
+
|
|
27
28
|
<div className="flex gap-4">
|
|
28
29
|
<KolSplitButton _label="Nur der Pfeil öffnet" _on={{ onClick: handleButtonClick }}>
|
|
29
30
|
Dropdown-Inhalt
|
|
@@ -10,7 +10,9 @@ const genericNonSorter = <T,>(data: T): T => data;
|
|
|
10
10
|
|
|
11
11
|
export const TableColumnAlignment: FC = () => (
|
|
12
12
|
<>
|
|
13
|
-
<SampleDescription>
|
|
13
|
+
<SampleDescription>
|
|
14
|
+
<p>This sample shows KolTable with columns headers and data in different text alignments.</p>
|
|
15
|
+
</SampleDescription>
|
|
14
16
|
|
|
15
17
|
<KolHeading _label="Simple table" _level={3}></KolHeading>
|
|
16
18
|
<KolTable
|
|
@@ -5,7 +5,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
5
5
|
|
|
6
6
|
export const TableComplexHeaders: FC = () => (
|
|
7
7
|
<>
|
|
8
|
-
<SampleDescription>
|
|
8
|
+
<SampleDescription>
|
|
9
|
+
<p>This sample shows KolTable using vertical and horizontal headers, applying colspan and rowspan.</p>
|
|
10
|
+
</SampleDescription>
|
|
9
11
|
|
|
10
12
|
<KolTable
|
|
11
13
|
_label="Business hours"
|
|
@@ -23,8 +23,10 @@ export const TableHorizontalScrollbar: FC = () => {
|
|
|
23
23
|
return (
|
|
24
24
|
<>
|
|
25
25
|
<SampleDescription>
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
<p>
|
|
27
|
+
This sample shows KolTable with and without horizontal scrollbars. When a scrollbar is present, it should be possible to focus the table container and
|
|
28
|
+
to scroll it using arrow keys.
|
|
29
|
+
</p>
|
|
28
30
|
</SampleDescription>
|
|
29
31
|
|
|
30
32
|
<KolHeading _label="Table with scrollbar" _level={2} />
|
|
@@ -22,7 +22,10 @@ const PAGINATION: KoliBriTablePaginationProps = { _page: 2 };
|
|
|
22
22
|
|
|
23
23
|
export const PaginationPosition: FC = () => (
|
|
24
24
|
<div className="grid gap-14">
|
|
25
|
-
<SampleDescription>
|
|
25
|
+
<SampleDescription>
|
|
26
|
+
<p>This sample shows KolTable with different pagination positions.</p>
|
|
27
|
+
</SampleDescription>
|
|
28
|
+
|
|
26
29
|
<section>
|
|
27
30
|
<h2>Table with pagination at the bottom.</h2>
|
|
28
31
|
<KolTable _label="Tabellenbeschreibung" _data={DATA} _headers={HEADERS} _pagination={PAGINATION} _paginationPosition="bottom"></KolTable>
|
|
@@ -101,8 +101,9 @@ const HEADERS: KoliBriTableHeaders = {
|
|
|
101
101
|
export const TableRenderCell: FC = () => (
|
|
102
102
|
<>
|
|
103
103
|
<SampleDescription>
|
|
104
|
-
<p>This sample
|
|
104
|
+
<p>This sample shows KolTable using React render functions for the cell contents.</p>
|
|
105
105
|
</SampleDescription>
|
|
106
|
+
|
|
106
107
|
<KolTable _label="Sort by date column" _data={DATA} _headers={HEADERS} className="block min-w-75em" />
|
|
107
108
|
</>
|
|
108
109
|
);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Routes } from '../../shares/types';
|
|
2
2
|
import { PaginationPosition } from './pagination-position';
|
|
3
|
-
import { TableBadgeSize } from './badge-size';
|
|
4
3
|
import { TableColumnAlignment } from './column-alignment';
|
|
5
4
|
import { TableComplexHeaders } from './complex-headers';
|
|
6
5
|
import { TableHorizontalScrollbar } from './horizontal-scrollbar';
|
|
@@ -14,7 +13,6 @@ import { TableWithPagination } from './with-pagination';
|
|
|
14
13
|
|
|
15
14
|
export const TABLE_ROUTES: Routes = {
|
|
16
15
|
table: {
|
|
17
|
-
'badge-size': TableBadgeSize,
|
|
18
16
|
'column-alignment': TableColumnAlignment,
|
|
19
17
|
'complex-headers': TableComplexHeaders,
|
|
20
18
|
'horizontal-scrollbar': TableHorizontalScrollbar,
|
|
@@ -56,10 +56,7 @@ const HEADERS_VERTICAL: KoliBriTableHeaders = {
|
|
|
56
56
|
export const TableSortData: FC = () => (
|
|
57
57
|
<>
|
|
58
58
|
<SampleDescription>
|
|
59
|
-
<p>
|
|
60
|
-
Hier ist eine Tabelle, die durch anklicken des Knopfes sortiert werden kann. Entweder nach der Reihenfolge, nach dem ältesten Datum oder nach dem
|
|
61
|
-
jüngsten Datum.
|
|
62
|
-
</p>
|
|
59
|
+
<p>This sample shows KolTable with sortable columns. The sort-order can be changed by clicking the "date" header column.</p>
|
|
63
60
|
</SampleDescription>
|
|
64
61
|
|
|
65
62
|
<h2>Vertical</h2>
|
|
@@ -45,7 +45,9 @@ export const TableStatefulWithSelection: FC = () => {
|
|
|
45
45
|
|
|
46
46
|
return (
|
|
47
47
|
<>
|
|
48
|
-
<SampleDescription>
|
|
48
|
+
<SampleDescription>
|
|
49
|
+
<p>This sample shows KolTableStateful with checkboxes for selection enabled.</p>
|
|
50
|
+
</SampleDescription>
|
|
49
51
|
|
|
50
52
|
<KolTableStateful
|
|
51
53
|
_label="Table with selection checkboxes"
|
|
@@ -38,7 +38,9 @@ export const TableStatelessWithSelection: FC = () => {
|
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<>
|
|
41
|
-
<SampleDescription>
|
|
41
|
+
<SampleDescription>
|
|
42
|
+
<p>This sample shows KolTableStateless with checkboxes for selection enabled.</p>
|
|
43
|
+
</SampleDescription>
|
|
42
44
|
|
|
43
45
|
<KolTableStateless
|
|
44
46
|
_label="Table with selection checkboxes"
|
|
@@ -7,7 +7,9 @@ const DATA = [{ left: 'Left Example', center: 'Center Example', right: 'Right Ex
|
|
|
7
7
|
|
|
8
8
|
export const TableStateless: FC = () => (
|
|
9
9
|
<>
|
|
10
|
-
<SampleDescription>
|
|
10
|
+
<SampleDescription>
|
|
11
|
+
<p>This sample shows how KolTableStateless can be used directly, with the KolTableStateful wrapper.</p>
|
|
12
|
+
</SampleDescription>
|
|
11
13
|
|
|
12
14
|
<KolTableStateless
|
|
13
15
|
_label="Table for demonstration purposes"
|
|
@@ -5,7 +5,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
5
5
|
|
|
6
6
|
export const TableWithFooter: FC = () => (
|
|
7
7
|
<>
|
|
8
|
-
<SampleDescription>
|
|
8
|
+
<SampleDescription>
|
|
9
|
+
<p>This sample shows KolTable with footer data.</p>
|
|
10
|
+
</SampleDescription>
|
|
9
11
|
|
|
10
12
|
<KolTable
|
|
11
13
|
_label="Business hours"
|
|
@@ -23,10 +23,7 @@ const PAGINATION: KoliBriTablePaginationProps = { _page: 2 };
|
|
|
23
23
|
export const TableWithPagination: FC = () => (
|
|
24
24
|
<>
|
|
25
25
|
<SampleDescription>
|
|
26
|
-
<p>
|
|
27
|
-
Durch das Navigieren der Seitenzahlen unten kann die Tabelle umgeblättert werden. Stattdessen kann auch die komplette Tabelle mit Änderung der Einträge
|
|
28
|
-
pro Seite angezeigt werden.
|
|
29
|
-
</p>
|
|
26
|
+
<p>This sample shows how KolTable can be navigated using a pagination.</p>
|
|
30
27
|
</SampleDescription>
|
|
31
28
|
<div>
|
|
32
29
|
<KolTable _label="Tabellenbeschreibung" _data={DATA} _headers={HEADERS} _pagination={PAGINATION}></KolTable>
|
|
@@ -37,22 +37,21 @@ const tabsWithoutIcons = tabs.map((tab) => ({
|
|
|
37
37
|
export const TabsBasic: FC = () => (
|
|
38
38
|
<>
|
|
39
39
|
<SampleDescription>
|
|
40
|
-
<p>
|
|
40
|
+
<p>KolTabs renders tab captions and their associated content. This sample shows tab captions with and without icons and disabled tabs.</p>
|
|
41
41
|
</SampleDescription>
|
|
42
|
-
<>
|
|
43
|
-
<KolTabs _tabs={tabsWithoutIcons} _label="Regular tabs">
|
|
44
|
-
<div slot="tab-0">Inhalte von Tab 1</div>
|
|
45
|
-
<div slot="tab-1">Inhalte von Tab 2</div>
|
|
46
|
-
<div slot="tab-2">Inhalte von Tab 3</div>
|
|
47
|
-
<div slot="tab-3">Inhalte von Tab 4</div>
|
|
48
|
-
</KolTabs>
|
|
49
42
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
<KolTabs _tabs={tabsWithoutIcons} _label="Regular tabs">
|
|
44
|
+
<div slot="tab-0">Inhalte von Tab 1</div>
|
|
45
|
+
<div slot="tab-1">Inhalte von Tab 2</div>
|
|
46
|
+
<div slot="tab-2">Inhalte von Tab 3</div>
|
|
47
|
+
<div slot="tab-3">Inhalte von Tab 4</div>
|
|
48
|
+
</KolTabs>
|
|
49
|
+
|
|
50
|
+
<KolTabs _tabs={tabs} className="mt-4" _label="Tabs with icons">
|
|
51
|
+
<div slot="tab-0">Inhalte von Tab 1</div>
|
|
52
|
+
<div slot="tab-1">Inhalte von Tab 2</div>
|
|
53
|
+
<div slot="tab-2">Inhalte von Tab 3</div>
|
|
54
|
+
<div slot="tab-3">Inhalte von Tab 4</div>
|
|
55
|
+
</KolTabs>
|
|
57
56
|
</>
|
|
58
57
|
);
|
|
@@ -30,7 +30,7 @@ const tabs = [
|
|
|
30
30
|
export const TabsIconsOnly: FC = () => (
|
|
31
31
|
<>
|
|
32
32
|
<SampleDescription>
|
|
33
|
-
<p>
|
|
33
|
+
<p>This sample shows KolTabs with hidden labels.</p>
|
|
34
34
|
</SampleDescription>
|
|
35
35
|
|
|
36
36
|
<KolTabs _label="Tabs with icons" _tabs={tabs}>
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
|
|
3
4
|
import { KolForm, KolTextarea } from '@public-ui/react';
|
|
4
|
-
|
|
5
|
-
import type { FC } from 'react';
|
|
6
5
|
import { SampleDescription } from '../SampleDescription';
|
|
7
6
|
|
|
8
7
|
const VALUE = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore
|
|
@@ -15,15 +14,13 @@ sit amet.`;
|
|
|
15
14
|
export const TextareaAdjustHeight: FC = () => (
|
|
16
15
|
<>
|
|
17
16
|
<SampleDescription>
|
|
18
|
-
<p>
|
|
17
|
+
<p>
|
|
18
|
+
This sample demonstrates the <code>_adjustHeight</code>-property of KolTextarea. The textarea automatically grows with its content.
|
|
19
|
+
</p>
|
|
19
20
|
</SampleDescription>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</div>
|
|
24
|
-
<div className="col-sm-6">
|
|
25
|
-
<KolTextarea _adjustHeight={true} _resize="none" _value={VALUE} _label="Texteingabe (none)" />
|
|
26
|
-
</div>
|
|
21
|
+
|
|
22
|
+
<KolForm>
|
|
23
|
+
<KolTextarea _adjustHeight={true} _value={VALUE} _label="Text input (auto grow)" />
|
|
27
24
|
</KolForm>
|
|
28
25
|
</>
|
|
29
26
|
);
|
|
@@ -8,8 +8,9 @@ import { SampleDescription } from '../SampleDescription';
|
|
|
8
8
|
export const TextareaBasic: FC = () => (
|
|
9
9
|
<>
|
|
10
10
|
<SampleDescription>
|
|
11
|
-
<p>
|
|
11
|
+
<p>KolTextarea renders a text field. The sample shows KolTextarea in a form context with different variations and states.</p>
|
|
12
12
|
</SampleDescription>
|
|
13
|
+
|
|
13
14
|
<FormWrap RefComponent={TextareaVariants} />
|
|
14
15
|
</>
|
|
15
16
|
);
|