@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.
Files changed (150) hide show
  1. package/dist/1487.js +1 -1
  2. package/dist/1636.js +1 -1
  3. package/dist/1792.js +1 -1
  4. package/dist/1795.js +1 -1
  5. package/dist/1938.js +2 -0
  6. package/dist/2017.js +1 -1
  7. package/dist/2322.js +1 -1
  8. package/dist/2538.js +1 -1
  9. package/dist/2567.js +1 -1
  10. package/dist/263.js +1 -1
  11. package/dist/2719.js +1 -1
  12. package/dist/3064.js +1 -1
  13. package/dist/3077.js +1 -1
  14. package/dist/3238.js +1 -1
  15. package/dist/3395.js +1 -1
  16. package/dist/35.js +1 -1
  17. package/dist/3521.js +1 -1
  18. package/dist/356.js +1 -1
  19. package/dist/3714.js +1 -1
  20. package/dist/3735.js +1 -1
  21. package/dist/3766.js +1 -1
  22. package/dist/3994.js +1 -1
  23. package/dist/4025.js +1 -1
  24. package/dist/4118.js +1 -1
  25. package/dist/4182.js +1 -1
  26. package/dist/4188.js +1 -1
  27. package/dist/4332.js +1 -1
  28. package/dist/4402.js +1 -1
  29. package/dist/4556.js +2 -0
  30. package/dist/4818.js +1 -1
  31. package/dist/4892.js +1 -1
  32. package/dist/4933.js +1 -1
  33. package/dist/4943.js +1 -1
  34. package/dist/495.js +1 -1
  35. package/dist/5034.js +1 -1
  36. package/dist/5056.js +1 -1
  37. package/dist/5138.js +1 -1
  38. package/dist/5296.js +1 -1
  39. package/dist/5356.js +1 -1
  40. package/dist/5551.js +1 -1
  41. package/dist/5835.js +1 -1
  42. package/dist/5840.js +1 -1
  43. package/dist/5889.js +1 -1
  44. package/dist/5912.js +1 -1
  45. package/dist/6082.js +1 -1
  46. package/dist/6099.js +1 -1
  47. package/dist/6181.js +1 -1
  48. package/dist/619.js +1 -1
  49. package/dist/6671.js +1 -1
  50. package/dist/6775.js +1 -1
  51. package/dist/6812.js +2 -0
  52. package/dist/7274.js +1 -1
  53. package/dist/7795.js +1 -1
  54. package/dist/7802.js +1 -1
  55. package/dist/7860.js +1 -1
  56. package/dist/8092.js +1 -1
  57. package/dist/8111.js +1 -1
  58. package/dist/8146.js +1 -1
  59. package/dist/8427.js +1 -1
  60. package/dist/8495.js +1 -1
  61. package/dist/8672.js +1 -1
  62. package/dist/8737.js +1 -1
  63. package/dist/8786.js +1 -1
  64. package/dist/8796.js +1 -1
  65. package/dist/8853.js +2 -0
  66. package/dist/8977.js +1 -1
  67. package/dist/9333.js +1 -1
  68. package/dist/9389.js +1 -1
  69. package/dist/9561.js +1 -1
  70. package/dist/9599.js +1 -1
  71. package/dist/9612.js +1 -1
  72. package/dist/9890.js +1 -1
  73. package/dist/index.html +1 -1
  74. package/dist/main.css +3 -3
  75. package/dist/main.js +1 -1
  76. package/dist/main.js.LICENSE.txt +2 -2
  77. package/package.json +13 -14
  78. package/public/index.html +1 -1
  79. package/src/@shared/_mixins.scss +3 -0
  80. package/src/App.tsx +1 -1
  81. package/src/components/FormWrap.tsx +1 -1
  82. package/src/components/Navigation.tsx +63 -0
  83. package/src/components/Sidebar.tsx +5 -41
  84. package/src/components/abbr/basic.tsx +12 -12
  85. package/src/components/alert/card-msg.tsx +3 -1
  86. package/src/components/alert/html.tsx +4 -2
  87. package/src/components/button/baselined.tsx +1 -1
  88. package/src/components/button/partials/variants.tsx +15 -17
  89. package/src/components/button/width.tsx +2 -2
  90. package/src/components/button-link/basic.tsx +3 -3
  91. package/src/components/button-link/image.tsx +0 -1
  92. package/src/components/card/basic.tsx +1 -1
  93. package/src/components/combobox/partials/variants.tsx +1 -1
  94. package/src/components/details/basic.tsx +2 -2
  95. package/src/components/form/basic.tsx +1 -1
  96. package/src/components/form/error-list.tsx +1 -0
  97. package/src/components/input-checkbox/partials/variants.tsx +22 -10
  98. package/src/components/input-date/reset.tsx +1 -1
  99. package/src/components/input-password/show-password.tsx +1 -1
  100. package/src/components/input-text/partials/cases.tsx +1 -1
  101. package/src/components/input-text/text-formatter.tsx +45 -43
  102. package/src/components/link/image.tsx +0 -1
  103. package/src/components/link/target.tsx +1 -1
  104. package/src/components/modal/basic.tsx +1 -1
  105. package/src/components/nav/basic.tsx +23 -12
  106. package/src/components/nav/horizontal.tsx +12 -3
  107. package/src/components/nav/links.ts +36 -0
  108. package/src/components/table/column-alignment.tsx +64 -62
  109. package/src/components/table/complex-headers.tsx +80 -78
  110. package/src/components/table/horizontal-scrollbar.tsx +30 -28
  111. package/src/components/table/interactive-child-elements.tsx +69 -68
  112. package/src/components/table/pagination-position.tsx +15 -13
  113. package/src/components/table/render-cell.tsx +1 -1
  114. package/src/components/table/sort-data.tsx +11 -8
  115. package/src/components/table/stateful-with-selection.tsx +36 -27
  116. package/src/components/table/stateful-with-single-selection.tsx +36 -27
  117. package/src/components/table/stateless-with-selection.tsx +26 -17
  118. package/src/components/table/stateless-with-single-selection.tsx +26 -17
  119. package/src/components/table/stateless.tsx +29 -27
  120. package/src/components/table/with-footer.tsx +1 -0
  121. package/src/components/table/with-pagination.tsx +1 -1
  122. package/src/components/tabs/behavior.tsx +61 -0
  123. package/src/components/tabs/routes.ts +2 -0
  124. package/src/components/textarea/adjust-height.tsx +1 -1
  125. package/src/components/textarea/counter.tsx +4 -1
  126. package/src/components/textarea/resize.tsx +1 -1
  127. package/src/components/textarea/rows.tsx +1 -1
  128. package/src/components/toast/basic.tsx +13 -11
  129. package/src/react.main.tsx +6 -1
  130. package/src/scenarios/appointment-form/AppointmentForm.tsx +1 -0
  131. package/src/scenarios/disabled-interactive-elements.tsx +1 -1
  132. package/src/scenarios/focus-elements.tsx +21 -16
  133. package/src/scenarios/horizontal-scrollbar-advanced/TableHorizontalScrollbarAdvanced.tsx +1 -1
  134. package/src/scenarios/horizontal-scrollbar-advanced/layout.scss +19 -0
  135. package/src/scenarios/input-group-with-error.tsx +41 -0
  136. package/src/scenarios/inputs-get-value.tsx +121 -119
  137. package/src/scenarios/routes.ts +4 -2
  138. package/src/scenarios/static-form.tsx +65 -62
  139. package/src/style.scss +10 -13
  140. package/tsconfig.json +1 -2
  141. package/unocss.config.ts +213 -0
  142. package/dist/3171.js +0 -2
  143. package/dist/4262.js +0 -2
  144. package/dist/479.js +0 -2
  145. package/dist/8710.js +0 -2
  146. package/src/scenarios/horizontal-scrollbar-advanced/layout.css +0 -31
  147. /package/dist/{3171.js.LICENSE.txt → 1938.js.LICENSE.txt} +0 -0
  148. /package/dist/{4262.js.LICENSE.txt → 4556.js.LICENSE.txt} +0 -0
  149. /package/dist/{479.js.LICENSE.txt → 6812.js.LICENSE.txt} +0 -0
  150. /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
- <Formik<FormValues> initialValues={initialValues} onSubmit={handleSubmit}>
46
- {(form) => (
47
- <>
48
- <div className="p-2">
49
- <KolHeading _label="Formatted Form Field" _level={2} />
50
- <KolForm>
51
- <Field name="iban">
52
- {({ field }: FieldProps<FormValues['iban']>) => (
53
- <div className="block mt-2">
54
- <KolInputText
55
- onBlur={() => {
56
- void form.setFieldTouched('iban', true);
57
- }}
58
- id="field-iban"
59
- _label="IBAN"
60
- _value={formatter.format(field.value ?? '')}
61
- _msg={{
62
- _type: 'error',
63
- _description: form.errors.iban || '',
64
- }}
65
- _touched={form.touched.iban}
66
- _required
67
- _on={{
68
- onInput: (event, value: unknown) => {
69
- if (event.target) {
70
- const parsed_value = formatter.parse((value as string) ?? '');
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
- void form.setFieldValue('iban', parsed_value, true);
73
- }
74
- },
75
- }}
76
- />
77
- </div>
78
- )}
79
- </Field>
80
- </KolForm>
81
- </div>
82
- <div className="p-2">
83
- <KolHeading _label="Model" _level={2} />
84
- <pre>{JSON.stringify(form.values, null, 2)}</pre>
85
- </div>
86
- </>
87
- )}
88
- </Formik>
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>
@@ -13,7 +13,7 @@ export const LinkTarget: FC = () => (
13
13
  </p>
14
14
  </SampleDescription>
15
15
 
16
- <div className="d-flex gap-4">
16
+ <div className="text-base d-flex gap-4">
17
17
  <ul>
18
18
  <li>
19
19
  <KolLink _href="#/back-page" _label="Link without target" />
@@ -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
- <KolInputCheckbox
21
- _label="Show icons when expanded"
22
- _checked={hasIconsWhenExpanded}
23
- _on={{
24
- onChange: (_event, value: unknown) => {
25
- setHasIconsWhenExpanded(value as boolean);
26
- },
27
- }}
28
- ></KolInputCheckbox>
29
- <KolNav class="block w-fit" _label="Main navigation" _links={LINKS} _hasCompactButton _hasIconsWhenExpanded={hasIconsWhenExpanded} />
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
- <KolNav _label="Main navigation" _links={LINKS} _orientation="horizontal" />
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
- <KolHeading _label="Simple table" _level={3}></KolHeading>
18
- <KolTable
19
- _label="Table for demonstration purposes with different text align properties"
20
- _headers={{
21
- horizontal: [
22
- [
23
- { label: 'left', key: 'left', textAlign: 'left' },
24
- { label: 'center', key: 'center', textAlign: 'center' },
25
- { label: 'right', key: 'right', textAlign: 'right' },
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
- _data={DATA}
30
- className="block"
31
- style={{ maxWidth: '600px' }}
32
- />
29
+ }}
30
+ _data={DATA}
31
+ className="block"
32
+ style={{ maxWidth: '600px' }}
33
+ />
33
34
 
34
- <KolHeading _label="Table with sortable columns" _level={3} className="block mt-6"></KolHeading>
35
- <KolTable
36
- _label="Table for demonstration purposes with sortable columns"
37
- _headers={{
38
- horizontal: [
39
- [
40
- { label: 'left', key: 'left', textAlign: 'left', sort: genericNonSorter },
41
- { label: 'center', key: 'center', textAlign: 'center', sort: genericNonSorter },
42
- { label: 'right', key: 'right', textAlign: 'right', sort: genericNonSorter },
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
- _data={DATA}
47
- className="block"
48
- style={{ maxWidth: '600px' }}
49
- />
46
+ }}
47
+ _data={DATA}
48
+ className="block"
49
+ style={{ maxWidth: '600px' }}
50
+ />
50
51
 
51
- <KolHeading _label="Table some sortable columns" _level={3} className="block mt-6"></KolHeading>
52
- <KolTable
53
- _label="Table for demonstration purposes with some but not all columns sortable"
54
- _headers={{
55
- horizontal: [
56
- [
57
- { label: 'left', key: 'left', textAlign: 'left', sort: genericNonSorter },
58
- { label: 'center', key: 'center', textAlign: 'center', sort: genericNonSorter },
59
- { label: 'right', key: 'right', textAlign: 'right' },
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
- _data={DATA}
64
- className="block"
65
- style={{ maxWidth: '600px' }}
66
- />
63
+ }}
64
+ _data={DATA}
65
+ className="block"
66
+ style={{ maxWidth: '600px' }}
67
+ />
67
68
 
68
- <KolHeading _label="Table with vertical heading" _level={3} className="block mt-6"></KolHeading>
69
- <KolTable
70
- _label="Table for demonstration purposes with vertical heading"
71
- _headers={{
72
- horizontal: [
73
- [
74
- { label: '', asTd: true },
75
- { label: 'left', key: 'left', textAlign: 'left' },
76
- { label: 'center', key: 'center', textAlign: 'center' },
77
- { label: 'right', key: 'right', textAlign: 'right' },
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
- vertical: [[{ label: 'Vertical' }]],
81
- }}
82
- _data={DATA}
83
- className="block"
84
- style={{ maxWidth: '600px' }}
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
- <KolTable
13
- _label="Business hours"
14
- _data={[
15
- {
16
- asp: 'Center',
17
- monday: '08:00',
18
- tuesday: '08:00',
19
- wednesday: '10:00',
20
- thursday: '11:00',
21
- friday: '08:00',
22
- },
23
- {
24
- asp: 'Tiergarten',
25
- monday: '08:00',
26
- tuesday: '08:00',
27
- wednesday: '10:00',
28
- thursday: '11:00',
29
- friday: '08:00',
30
- },
31
- {
32
- asp: 'Maxvorstadt',
33
- monday: '08:00',
34
- tuesday: '08:00',
35
- wednesday: '10:00',
36
- thursday: '11:00',
37
- friday: '08:00',
38
- },
39
- ]}
40
- _headers={{
41
- vertical: [[{ label: 'Berlin', rowSpan: 2 }, { label: 'München' }]],
42
- horizontal: [
43
- [
44
- {
45
- label: '',
46
- colSpan: 7,
47
- },
48
- {
49
- label: 'Weekend',
50
- colSpan: 2,
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
- { label: '' },
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
- <KolHeading _label="Table with scrollbar" _level={2} />
33
-
34
- <KolTable
35
- _label="Table for demonstration purposes with horizontal scrollbar."
36
- _minWidth={hasWidthRestriction ? '600px' : 'auto'}
37
- _headers={HEADERS}
38
- _data={DATA}
39
- className="block"
40
- style={{ width: '400px' }}
41
- />
42
-
43
- <KolInputCheckbox
44
- _checked={hasWidthRestriction}
45
- _label="Toggle width restriction"
46
- _variant="switch"
47
- _on={{
48
- onChange: (_event, value) => {
49
- setHasWidthRestriction(Boolean(value));
50
- },
51
- }}
52
- ></KolInputCheckbox>
53
-
54
- <KolHeading _label="Same table without scrollbar" _level={2} className="block mt-4" />
55
- <p className="mt-0">
56
- <i>Scrollbar appears on very small viewport sizes</i>
57
- </p>
58
-
59
- <KolTable _label="Table for demonstration purposes without horizontal scrollbar" _minWidth="600px" _headers={HEADERS} _data={DATA} className="block" />
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
  };