@public-ui/sample-react 2.1.7 → 2.1.8-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1487.js +1 -1
- package/dist/1636.js +1 -1
- package/dist/1792.js +1 -1
- package/dist/1795.js +1 -1
- package/dist/1938.js +2 -0
- package/dist/2017.js +1 -1
- package/dist/2322.js +1 -1
- package/dist/2538.js +1 -1
- package/dist/2567.js +1 -1
- package/dist/263.js +1 -1
- package/dist/2719.js +1 -1
- package/dist/3064.js +1 -1
- package/dist/3077.js +1 -1
- package/dist/3238.js +1 -1
- package/dist/3395.js +1 -1
- package/dist/35.js +1 -1
- package/dist/3521.js +1 -1
- package/dist/356.js +1 -1
- package/dist/3714.js +1 -1
- package/dist/3735.js +1 -1
- package/dist/3766.js +1 -1
- package/dist/3994.js +1 -1
- package/dist/4025.js +1 -1
- package/dist/4118.js +1 -1
- package/dist/4182.js +1 -1
- package/dist/4188.js +1 -1
- package/dist/4332.js +1 -1
- package/dist/4402.js +1 -1
- package/dist/4556.js +2 -0
- package/dist/4818.js +1 -1
- package/dist/4892.js +1 -1
- package/dist/4933.js +1 -1
- package/dist/4943.js +1 -1
- package/dist/495.js +1 -1
- package/dist/5034.js +1 -1
- package/dist/5056.js +1 -1
- package/dist/5138.js +1 -1
- package/dist/5296.js +1 -1
- package/dist/5356.js +1 -1
- package/dist/5551.js +1 -1
- package/dist/5835.js +1 -1
- package/dist/5840.js +1 -1
- package/dist/5889.js +1 -1
- package/dist/5912.js +1 -1
- package/dist/6082.js +1 -1
- package/dist/6099.js +1 -1
- package/dist/6181.js +1 -1
- package/dist/619.js +1 -1
- package/dist/6671.js +1 -1
- package/dist/6775.js +1 -1
- package/dist/6812.js +2 -0
- package/dist/7274.js +1 -1
- package/dist/7795.js +1 -1
- package/dist/7802.js +1 -1
- package/dist/7860.js +1 -1
- package/dist/8092.js +1 -1
- package/dist/8111.js +1 -1
- package/dist/8146.js +1 -1
- package/dist/8427.js +1 -1
- package/dist/8495.js +1 -1
- package/dist/8672.js +1 -1
- package/dist/8737.js +1 -1
- package/dist/8786.js +1 -1
- package/dist/8796.js +1 -1
- package/dist/8853.js +2 -0
- package/dist/8977.js +1 -1
- package/dist/9333.js +1 -1
- package/dist/9389.js +1 -1
- package/dist/9561.js +1 -1
- package/dist/9599.js +1 -1
- package/dist/9612.js +1 -1
- package/dist/9890.js +1 -1
- package/dist/index.html +1 -1
- package/dist/main.css +3 -3
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +2 -2
- package/package.json +13 -14
- package/public/index.html +1 -1
- package/src/@shared/_mixins.scss +3 -0
- package/src/App.tsx +1 -1
- package/src/components/FormWrap.tsx +1 -1
- package/src/components/Navigation.tsx +63 -0
- package/src/components/Sidebar.tsx +5 -41
- package/src/components/abbr/basic.tsx +12 -12
- package/src/components/alert/card-msg.tsx +3 -1
- package/src/components/alert/html.tsx +4 -2
- package/src/components/button/baselined.tsx +1 -1
- package/src/components/button/partials/variants.tsx +15 -17
- package/src/components/button/width.tsx +2 -2
- package/src/components/button-link/basic.tsx +3 -3
- package/src/components/button-link/image.tsx +0 -1
- package/src/components/card/basic.tsx +1 -1
- package/src/components/combobox/partials/variants.tsx +1 -1
- package/src/components/details/basic.tsx +2 -2
- package/src/components/form/basic.tsx +1 -1
- package/src/components/form/error-list.tsx +1 -0
- package/src/components/input-checkbox/partials/variants.tsx +22 -10
- package/src/components/input-date/reset.tsx +1 -1
- package/src/components/input-password/show-password.tsx +1 -1
- package/src/components/input-text/partials/cases.tsx +1 -1
- package/src/components/input-text/text-formatter.tsx +45 -43
- package/src/components/link/image.tsx +0 -1
- package/src/components/link/target.tsx +1 -1
- package/src/components/modal/basic.tsx +1 -1
- package/src/components/nav/basic.tsx +23 -12
- package/src/components/nav/horizontal.tsx +12 -3
- package/src/components/nav/links.ts +36 -0
- package/src/components/table/column-alignment.tsx +64 -62
- package/src/components/table/complex-headers.tsx +80 -78
- package/src/components/table/horizontal-scrollbar.tsx +30 -28
- package/src/components/table/interactive-child-elements.tsx +69 -68
- package/src/components/table/pagination-position.tsx +15 -13
- package/src/components/table/render-cell.tsx +1 -1
- package/src/components/table/sort-data.tsx +11 -8
- package/src/components/table/stateful-with-selection.tsx +36 -27
- package/src/components/table/stateful-with-single-selection.tsx +36 -27
- package/src/components/table/stateless-with-selection.tsx +26 -17
- package/src/components/table/stateless-with-single-selection.tsx +26 -17
- package/src/components/table/stateless.tsx +29 -27
- package/src/components/table/with-footer.tsx +1 -0
- package/src/components/table/with-pagination.tsx +1 -1
- package/src/components/tabs/behavior.tsx +61 -0
- package/src/components/tabs/routes.ts +2 -0
- package/src/components/textarea/adjust-height.tsx +1 -1
- package/src/components/textarea/counter.tsx +4 -1
- package/src/components/textarea/resize.tsx +1 -1
- package/src/components/textarea/rows.tsx +1 -1
- package/src/components/toast/basic.tsx +13 -11
- package/src/react.main.tsx +6 -1
- package/src/scenarios/appointment-form/AppointmentForm.tsx +1 -0
- package/src/scenarios/disabled-interactive-elements.tsx +1 -1
- package/src/scenarios/focus-elements.tsx +21 -16
- package/src/scenarios/horizontal-scrollbar-advanced/TableHorizontalScrollbarAdvanced.tsx +1 -1
- package/src/scenarios/horizontal-scrollbar-advanced/layout.scss +19 -0
- package/src/scenarios/input-group-with-error.tsx +41 -0
- package/src/scenarios/inputs-get-value.tsx +121 -119
- package/src/scenarios/routes.ts +4 -2
- package/src/scenarios/static-form.tsx +65 -62
- package/src/style.scss +10 -13
- package/tsconfig.json +1 -2
- package/unocss.config.ts +213 -0
- package/dist/3171.js +0 -2
- package/dist/4262.js +0 -2
- package/dist/479.js +0 -2
- package/dist/8710.js +0 -2
- package/src/scenarios/horizontal-scrollbar-advanced/layout.css +0 -31
- /package/dist/{3171.js.LICENSE.txt → 1938.js.LICENSE.txt} +0 -0
- /package/dist/{4262.js.LICENSE.txt → 4556.js.LICENSE.txt} +0 -0
- /package/dist/{479.js.LICENSE.txt → 6812.js.LICENSE.txt} +0 -0
- /package/dist/{8710.js.LICENSE.txt → 8853.js.LICENSE.txt} +0 -0
|
@@ -42,50 +42,52 @@ export function InputTextFormatterDemo() {
|
|
|
42
42
|
vice versa the formatting is removed again (machine format)
|
|
43
43
|
</p>
|
|
44
44
|
</SampleDescription>
|
|
45
|
-
<
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
45
|
+
<section className="w-full flex flex-col">
|
|
46
|
+
<Formik<FormValues> initialValues={initialValues} onSubmit={handleSubmit}>
|
|
47
|
+
{(form) => (
|
|
48
|
+
<>
|
|
49
|
+
<div className="p-2">
|
|
50
|
+
<KolHeading _label="Formatted Form Field" _level={2} />
|
|
51
|
+
<KolForm>
|
|
52
|
+
<Field name="iban">
|
|
53
|
+
{({ field }: FieldProps<FormValues['iban']>) => (
|
|
54
|
+
<div className="block mt-2">
|
|
55
|
+
<KolInputText
|
|
56
|
+
onBlur={() => {
|
|
57
|
+
void form.setFieldTouched('iban', true);
|
|
58
|
+
}}
|
|
59
|
+
id="field-iban"
|
|
60
|
+
_label="IBAN"
|
|
61
|
+
_value={formatter.format(field.value ?? '')}
|
|
62
|
+
_msg={{
|
|
63
|
+
_type: 'error',
|
|
64
|
+
_description: form.errors.iban || '',
|
|
65
|
+
}}
|
|
66
|
+
_touched={form.touched.iban}
|
|
67
|
+
_required
|
|
68
|
+
_on={{
|
|
69
|
+
onInput: (event, value: unknown) => {
|
|
70
|
+
if (event.target) {
|
|
71
|
+
const parsed_value = formatter.parse((value as string) ?? '');
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
73
|
+
void form.setFieldValue('iban', parsed_value, true);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
}}
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
)}
|
|
80
|
+
</Field>
|
|
81
|
+
</KolForm>
|
|
82
|
+
</div>
|
|
83
|
+
<div className="p-2">
|
|
84
|
+
<KolHeading _label="Model" _level={2} />
|
|
85
|
+
<pre className="text-base">{JSON.stringify(form.values, null, 2)}</pre>
|
|
86
|
+
</div>
|
|
87
|
+
</>
|
|
88
|
+
)}
|
|
89
|
+
</Formik>
|
|
90
|
+
</section>
|
|
89
91
|
</>
|
|
90
92
|
);
|
|
91
93
|
}
|
|
@@ -12,7 +12,6 @@ export const LinkImage: FC = () => (
|
|
|
12
12
|
|
|
13
13
|
<div className="grid gap-4">
|
|
14
14
|
<KolLink _href="#/back-page" _label="I am a link that is rendered as text" />
|
|
15
|
-
<br />
|
|
16
15
|
<KolLink _href="#/back-page" _label="">
|
|
17
16
|
<img alt="Presentation of the KoliBri theming" slot="expert" src="abgrenzung.jpg" width="300" />
|
|
18
17
|
</KolLink>
|
|
@@ -17,7 +17,7 @@ export const ModalBasic: FC = () => {
|
|
|
17
17
|
</p>
|
|
18
18
|
</SampleDescription>
|
|
19
19
|
|
|
20
|
-
<div>
|
|
20
|
+
<div className="flex">
|
|
21
21
|
<KolModal _label="Primary modal" _width="80%" ref={modalElement} _on={{ onClose: () => console.log('Modal closed') }}>
|
|
22
22
|
<KolCard _label="I am a modal.">
|
|
23
23
|
<KolButton
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { KolInputCheckbox, KolNav } from '@public-ui/react';
|
|
3
|
+
import { KolHeading, KolInputCheckbox, KolNav } from '@public-ui/react';
|
|
4
4
|
import { SampleDescription } from '../SampleDescription';
|
|
5
|
-
import { LINKS } from './links';
|
|
5
|
+
import { LINKS, LINKS_WITHOUT_SUBMENU } from './links';
|
|
6
6
|
|
|
7
7
|
import type { FC } from 'react';
|
|
8
8
|
export const NavBasic: FC = () => {
|
|
@@ -17,16 +17,27 @@ export const NavBasic: FC = () => {
|
|
|
17
17
|
</p>
|
|
18
18
|
</SampleDescription>
|
|
19
19
|
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
<section className="grid gap-8">
|
|
21
|
+
<section>
|
|
22
|
+
<KolInputCheckbox
|
|
23
|
+
_label="Show icons when expanded"
|
|
24
|
+
_checked={hasIconsWhenExpanded}
|
|
25
|
+
_on={{
|
|
26
|
+
onChange: (_event, value: unknown) => {
|
|
27
|
+
setHasIconsWhenExpanded(value as boolean);
|
|
28
|
+
},
|
|
29
|
+
}}
|
|
30
|
+
></KolInputCheckbox>
|
|
31
|
+
</section>
|
|
32
|
+
<section className="grid gap-4">
|
|
33
|
+
<KolHeading _level={2} _label="Navigation without submenu" />
|
|
34
|
+
<KolNav class="block w-fit" _label="Main navigation" _links={LINKS_WITHOUT_SUBMENU} _hasCompactButton _hasIconsWhenExpanded={hasIconsWhenExpanded} />
|
|
35
|
+
</section>
|
|
36
|
+
<section className="grid gap-4">
|
|
37
|
+
<KolHeading _level={2} _label="Navigation with submenu" />
|
|
38
|
+
<KolNav class="block w-fit" _label="Main navigation" _links={LINKS} _hasCompactButton _hasIconsWhenExpanded={hasIconsWhenExpanded} />
|
|
39
|
+
</section>
|
|
40
|
+
</section>
|
|
30
41
|
</>
|
|
31
42
|
);
|
|
32
43
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { KolNav } from '@public-ui/react';
|
|
2
|
+
import { KolHeading, KolNav } from '@public-ui/react';
|
|
3
3
|
import { SampleDescription } from '../SampleDescription';
|
|
4
|
-
import { LINKS } from './links';
|
|
4
|
+
import { LINKS, LINKS_WITHOUT_SUBMENU } from './links';
|
|
5
5
|
|
|
6
6
|
import type { FC } from 'react';
|
|
7
7
|
export const NavHorizontal: FC = () => (
|
|
@@ -10,6 +10,15 @@ export const NavHorizontal: FC = () => (
|
|
|
10
10
|
<p>This sample shows KolNav with horizontal alignment.</p>
|
|
11
11
|
</SampleDescription>
|
|
12
12
|
|
|
13
|
-
<
|
|
13
|
+
<section className="grid gap-8">
|
|
14
|
+
<section className="grid gap-4">
|
|
15
|
+
<KolHeading _level={2} _label="Navigation without submenu" />
|
|
16
|
+
<KolNav _label="Main navigation" _links={LINKS_WITHOUT_SUBMENU} _orientation="horizontal" />
|
|
17
|
+
</section>
|
|
18
|
+
<section className="grid gap-4">
|
|
19
|
+
<KolHeading _level={2} _label="Navigation with submenu" />
|
|
20
|
+
<KolNav _label="Main navigation" _links={LINKS} _orientation="horizontal" />
|
|
21
|
+
</section>
|
|
22
|
+
</section>
|
|
14
23
|
</>
|
|
15
24
|
);
|
|
@@ -92,3 +92,39 @@ export const LINKS: ButtonOrLinkOrTextWithChildrenProps[] = [
|
|
|
92
92
|
],
|
|
93
93
|
},
|
|
94
94
|
];
|
|
95
|
+
|
|
96
|
+
export const LINKS_WITHOUT_SUBMENU: ButtonOrLinkOrTextWithChildrenProps[] = [
|
|
97
|
+
{
|
|
98
|
+
_label: 'Homepage',
|
|
99
|
+
_icons: 'codicon codicon-home',
|
|
100
|
+
_on: {
|
|
101
|
+
onClick: () => console.log('Homepage clicked'),
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
_label: '2 Navigation point',
|
|
106
|
+
_href: '#/back-page',
|
|
107
|
+
_on: {
|
|
108
|
+
onClick: () => console.log('Link clicked'),
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
_label: '3 Navigation point',
|
|
113
|
+
_href: '#/back-page',
|
|
114
|
+
_icons: 'codicon codicon-home',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
_label: '4 Navigation point with children and onClick',
|
|
118
|
+
_on: {
|
|
119
|
+
onClick: () => console.log('4.1 Nested link clicked'),
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
_label: '5 No own page, only category',
|
|
124
|
+
_active: true,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
_label: '6 No own page, with icon',
|
|
128
|
+
_icons: 'codicon codicon-squirrel',
|
|
129
|
+
},
|
|
130
|
+
];
|
|
@@ -14,74 +14,76 @@ export const TableColumnAlignment: FC = () => (
|
|
|
14
14
|
<p>This sample shows KolTable with columns headers and data in different text alignments.</p>
|
|
15
15
|
</SampleDescription>
|
|
16
16
|
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
[
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
<section className="w-full flex flex-col">
|
|
18
|
+
<KolHeading _label="Simple table" _level={3}></KolHeading>
|
|
19
|
+
<KolTable
|
|
20
|
+
_label="Table for demonstration purposes with different text align properties"
|
|
21
|
+
_headers={{
|
|
22
|
+
horizontal: [
|
|
23
|
+
[
|
|
24
|
+
{ label: 'left', key: 'left', textAlign: 'left' },
|
|
25
|
+
{ label: 'center', key: 'center', textAlign: 'center' },
|
|
26
|
+
{ label: 'right', key: 'right', textAlign: 'right' },
|
|
27
|
+
],
|
|
26
28
|
],
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/>
|
|
29
|
+
}}
|
|
30
|
+
_data={DATA}
|
|
31
|
+
className="block"
|
|
32
|
+
style={{ maxWidth: '600px' }}
|
|
33
|
+
/>
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
<KolHeading _label="Table with sortable columns" _level={3} className="block mt-6"></KolHeading>
|
|
36
|
+
<KolTable
|
|
37
|
+
_label="Table for demonstration purposes with sortable columns"
|
|
38
|
+
_headers={{
|
|
39
|
+
horizontal: [
|
|
40
|
+
[
|
|
41
|
+
{ label: 'left', key: 'left', textAlign: 'left', sort: genericNonSorter },
|
|
42
|
+
{ label: 'center', key: 'center', textAlign: 'center', sort: genericNonSorter },
|
|
43
|
+
{ label: 'right', key: 'right', textAlign: 'right', sort: genericNonSorter },
|
|
44
|
+
],
|
|
43
45
|
],
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/>
|
|
46
|
+
}}
|
|
47
|
+
_data={DATA}
|
|
48
|
+
className="block"
|
|
49
|
+
style={{ maxWidth: '600px' }}
|
|
50
|
+
/>
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
<KolHeading _label="Table some sortable columns" _level={3} className="block mt-6"></KolHeading>
|
|
53
|
+
<KolTable
|
|
54
|
+
_label="Table for demonstration purposes with some but not all columns sortable"
|
|
55
|
+
_headers={{
|
|
56
|
+
horizontal: [
|
|
57
|
+
[
|
|
58
|
+
{ label: 'left', key: 'left', textAlign: 'left', sort: genericNonSorter },
|
|
59
|
+
{ label: 'center', key: 'center', textAlign: 'center', sort: genericNonSorter },
|
|
60
|
+
{ label: 'right', key: 'right', textAlign: 'right' },
|
|
61
|
+
],
|
|
60
62
|
],
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
/>
|
|
63
|
+
}}
|
|
64
|
+
_data={DATA}
|
|
65
|
+
className="block"
|
|
66
|
+
style={{ maxWidth: '600px' }}
|
|
67
|
+
/>
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
<KolHeading _label="Table with vertical heading" _level={3} className="block mt-6"></KolHeading>
|
|
70
|
+
<KolTable
|
|
71
|
+
_label="Table for demonstration purposes with vertical heading"
|
|
72
|
+
_headers={{
|
|
73
|
+
horizontal: [
|
|
74
|
+
[
|
|
75
|
+
{ label: '', asTd: true },
|
|
76
|
+
{ label: 'left', key: 'left', textAlign: 'left' },
|
|
77
|
+
{ label: 'center', key: 'center', textAlign: 'center' },
|
|
78
|
+
{ label: 'right', key: 'right', textAlign: 'right' },
|
|
79
|
+
],
|
|
78
80
|
],
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
vertical: [[{ label: 'Vertical' }]],
|
|
82
|
+
}}
|
|
83
|
+
_data={DATA}
|
|
84
|
+
className="block"
|
|
85
|
+
style={{ maxWidth: '600px' }}
|
|
86
|
+
/>
|
|
87
|
+
</section>
|
|
86
88
|
</>
|
|
87
89
|
);
|
|
@@ -9,84 +9,86 @@ export const TableComplexHeaders: FC = () => (
|
|
|
9
9
|
<p>This sample shows KolTable using vertical and horizontal headers, applying colspan and rowspan.</p>
|
|
10
10
|
</SampleDescription>
|
|
11
11
|
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
[
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
12
|
+
<section className="w-full flex flex-col">
|
|
13
|
+
<KolTable
|
|
14
|
+
_label="Business hours"
|
|
15
|
+
_data={[
|
|
16
|
+
{
|
|
17
|
+
asp: 'Center',
|
|
18
|
+
monday: '08:00',
|
|
19
|
+
tuesday: '08:00',
|
|
20
|
+
wednesday: '10:00',
|
|
21
|
+
thursday: '11:00',
|
|
22
|
+
friday: '08:00',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
asp: 'Tiergarten',
|
|
26
|
+
monday: '08:00',
|
|
27
|
+
tuesday: '08:00',
|
|
28
|
+
wednesday: '10:00',
|
|
29
|
+
thursday: '11:00',
|
|
30
|
+
friday: '08:00',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
asp: 'Maxvorstadt',
|
|
34
|
+
monday: '08:00',
|
|
35
|
+
tuesday: '08:00',
|
|
36
|
+
wednesday: '10:00',
|
|
37
|
+
thursday: '11:00',
|
|
38
|
+
friday: '08:00',
|
|
39
|
+
},
|
|
40
|
+
]}
|
|
41
|
+
_headers={{
|
|
42
|
+
vertical: [[{ label: 'Berlin', rowSpan: 2 }, { label: 'München' }]],
|
|
43
|
+
horizontal: [
|
|
44
|
+
[
|
|
45
|
+
{
|
|
46
|
+
label: '',
|
|
47
|
+
colSpan: 7,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: 'Weekend',
|
|
51
|
+
colSpan: 2,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
{ label: '' },
|
|
56
|
+
{
|
|
57
|
+
label: 'District',
|
|
58
|
+
key: 'asp',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: 'Monday',
|
|
62
|
+
key: 'monday',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: 'Tuesday',
|
|
66
|
+
key: 'tuesday',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: 'Wednesday',
|
|
70
|
+
key: 'wednesday',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: 'Thursday',
|
|
74
|
+
key: 'thursday',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: 'Friday',
|
|
78
|
+
key: 'friday',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: 'Saturday',
|
|
82
|
+
key: 'saturday',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: 'Sunday',
|
|
86
|
+
key: 'sunday',
|
|
87
|
+
},
|
|
88
|
+
],
|
|
52
89
|
],
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
label: 'District',
|
|
57
|
-
key: 'asp',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
label: 'Monday',
|
|
61
|
-
key: 'monday',
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
label: 'Tuesday',
|
|
65
|
-
key: 'tuesday',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
label: 'Wednesday',
|
|
69
|
-
key: 'wednesday',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
label: 'Thursday',
|
|
73
|
-
key: 'thursday',
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
label: 'Friday',
|
|
77
|
-
key: 'friday',
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
label: 'Saturday',
|
|
81
|
-
key: 'saturday',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
label: 'Sunday',
|
|
85
|
-
key: 'sunday',
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
],
|
|
89
|
-
}}
|
|
90
|
-
/>
|
|
90
|
+
}}
|
|
91
|
+
/>
|
|
92
|
+
</section>
|
|
91
93
|
</>
|
|
92
94
|
);
|
|
@@ -29,34 +29,36 @@ export const TableHorizontalScrollbar: FC = () => {
|
|
|
29
29
|
</p>
|
|
30
30
|
</SampleDescription>
|
|
31
31
|
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
32
|
+
<section className="w-full flex flex-col">
|
|
33
|
+
<KolHeading _label="Table with scrollbar" _level={2} />
|
|
34
|
+
|
|
35
|
+
<KolTable
|
|
36
|
+
_label="Table for demonstration purposes with horizontal scrollbar."
|
|
37
|
+
_minWidth={hasWidthRestriction ? '600px' : 'auto'}
|
|
38
|
+
_headers={HEADERS}
|
|
39
|
+
_data={DATA}
|
|
40
|
+
className="block"
|
|
41
|
+
style={{ width: '400px' }}
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
<KolInputCheckbox
|
|
45
|
+
_checked={hasWidthRestriction}
|
|
46
|
+
_label="Toggle width restriction"
|
|
47
|
+
_variant="switch"
|
|
48
|
+
_on={{
|
|
49
|
+
onChange: (_event, value) => {
|
|
50
|
+
setHasWidthRestriction(Boolean(value));
|
|
51
|
+
},
|
|
52
|
+
}}
|
|
53
|
+
></KolInputCheckbox>
|
|
54
|
+
|
|
55
|
+
<KolHeading _label="Same table without scrollbar" _level={2} className="block mt-4" />
|
|
56
|
+
<p className="mt-0">
|
|
57
|
+
<i>Scrollbar appears on very small viewport sizes</i>
|
|
58
|
+
</p>
|
|
59
|
+
|
|
60
|
+
<KolTable _label="Table for demonstration purposes without horizontal scrollbar" _minWidth="600px" _headers={HEADERS} _data={DATA} className="block" />
|
|
61
|
+
</section>
|
|
60
62
|
</>
|
|
61
63
|
);
|
|
62
64
|
};
|