@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.
Files changed (201) hide show
  1. package/dist/1069.js +1 -1
  2. package/dist/1085.js +1 -1
  3. package/dist/1184.js +1 -1
  4. package/dist/1222.js +1 -1
  5. package/dist/1278.js +1 -1
  6. package/dist/1325.js +1 -1
  7. package/dist/1333.js +1 -1
  8. package/dist/1661.js +1 -1
  9. package/dist/1703.js +1 -1
  10. package/dist/1711.js +1 -1
  11. package/dist/1792.js +1 -1
  12. package/dist/1793.js +1 -1
  13. package/dist/1878.js +1 -1
  14. package/dist/1957.js +1 -1
  15. package/dist/2305.js +1 -1
  16. package/dist/2471.js +1 -1
  17. package/dist/2538.js +1 -1
  18. package/dist/279.js +1 -1
  19. package/dist/2830.js +1 -1
  20. package/dist/3180.js +1 -1
  21. package/dist/3332.js +1 -1
  22. package/dist/3596.js +1 -1
  23. package/dist/3714.js +1 -1
  24. package/dist/3797.js +1 -1
  25. package/dist/3974.js +1 -1
  26. package/dist/3990.js +1 -1
  27. package/dist/4014.js +1 -1
  28. package/dist/4102.js +1 -1
  29. package/dist/4218.js +1 -1
  30. package/dist/4303.js +1 -1
  31. package/dist/4404.js +1 -1
  32. package/dist/453.js +1 -1
  33. package/dist/4941.js +1 -1
  34. package/dist/500.js +1 -1
  35. package/dist/5139.js +1 -1
  36. package/dist/5164.js +1 -1
  37. package/dist/5365.js +1 -1
  38. package/dist/5540.js +1 -1
  39. package/dist/5756.js +1 -1
  40. package/dist/6393.js +1 -1
  41. package/dist/6682.js +1 -1
  42. package/dist/6781.js +1 -1
  43. package/dist/{5168.js → 6787.js} +2 -2
  44. package/dist/7100.js +1 -1
  45. package/dist/7245.js +1 -1
  46. package/dist/7263.js +1 -1
  47. package/dist/7512.js +1 -1
  48. package/dist/7856.js +1 -1
  49. package/dist/{445.js → 788.js} +2 -2
  50. package/dist/8002.js +1 -1
  51. package/dist/8189.js +1 -1
  52. package/dist/8264.js +1 -1
  53. package/dist/8384.js +1 -1
  54. package/dist/8389.js +1 -1
  55. package/dist/8515.js +1 -1
  56. package/dist/8557.js +1 -1
  57. package/dist/8588.js +1 -1
  58. package/dist/8724.js +1 -1
  59. package/dist/8791.js +1 -1
  60. package/dist/882.js +1 -1
  61. package/dist/8823.js +1 -1
  62. package/dist/895.js +1 -1
  63. package/dist/8993.js +1 -1
  64. package/dist/902.js +1 -1
  65. package/dist/9175.js +1 -1
  66. package/dist/9202.js +1 -1
  67. package/dist/9833.js +1 -1
  68. package/dist/9961.js +1 -1
  69. package/dist/index.html +2 -2
  70. package/dist/main.css +1 -1
  71. package/dist/main.js +1 -1
  72. package/package.json +4 -4
  73. package/public/index.html +2 -2
  74. package/src/components/SampleDescription.tsx +10 -6
  75. package/src/components/Sidebar.tsx +4 -4
  76. package/src/components/abbr/basic.tsx +2 -1
  77. package/src/components/accordion/basic.tsx +10 -9
  78. package/src/components/accordion/headlines.tsx +9 -9
  79. package/src/components/accordion/routes.ts +0 -2
  80. package/src/components/alert/basic.tsx +15 -10
  81. package/src/components/alert/card-msg.tsx +13 -6
  82. package/src/components/alert/html.tsx +2 -1
  83. package/src/components/avatar/basic.tsx +2 -1
  84. package/src/components/badge/basic.tsx +7 -6
  85. package/src/components/badge/button.tsx +13 -18
  86. package/src/components/breadcrumb/basic.tsx +2 -1
  87. package/src/components/button/access-key.tsx +7 -2
  88. package/src/components/button/baselined.tsx +2 -1
  89. package/src/components/button/basic.tsx +3 -1
  90. package/src/components/button/icons.tsx +2 -1
  91. package/src/components/button/partials/variants.tsx +0 -1
  92. package/src/components/button/routes.ts +0 -2
  93. package/src/components/button/width.tsx +2 -1
  94. package/src/components/button-group/basic.tsx +7 -2
  95. package/src/components/button-link/basic.tsx +28 -19
  96. package/src/components/button-link/icons.tsx +2 -1
  97. package/src/components/button-link/image.tsx +2 -1
  98. package/src/components/card/basic.tsx +11 -4
  99. package/src/components/card/routes.ts +0 -6
  100. package/src/components/combobox/basic.tsx +5 -4
  101. package/src/components/details/basic.tsx +6 -5
  102. package/src/components/drawer/basic.tsx +4 -4
  103. package/src/components/drawer/controlled.tsx +4 -4
  104. package/src/components/form/basic.tsx +5 -4
  105. package/src/components/form/error-list.tsx +6 -5
  106. package/src/components/heading/badged.tsx +4 -1
  107. package/src/components/heading/basic.tsx +8 -7
  108. package/src/components/heading/paragraph.tsx +2 -4
  109. package/src/components/heading/routes.ts +1 -1
  110. package/src/components/icon/basic.tsx +2 -1
  111. package/src/components/image/basic.tsx +2 -1
  112. package/src/components/indented-text/basic.tsx +4 -1
  113. package/src/components/input-checkbox/basic.tsx +2 -5
  114. package/src/components/input-checkbox/button.tsx +2 -6
  115. package/src/components/input-checkbox/switch.tsx +2 -7
  116. package/src/components/input-color/basic.tsx +2 -4
  117. package/src/components/input-date/basic.tsx +2 -6
  118. package/src/components/input-email/basic.tsx +2 -1
  119. package/src/components/input-file/basic.tsx +2 -4
  120. package/src/components/input-number/basic.tsx +3 -4
  121. package/src/components/input-password/basic.tsx +2 -1
  122. package/src/components/input-password/show-password.tsx +3 -2
  123. package/src/components/input-radio/basic.tsx +2 -1
  124. package/src/components/input-radio/horizontal.tsx +2 -2
  125. package/src/components/input-radio/objectValue.tsx +11 -11
  126. package/src/components/input-radio/routes.ts +0 -2
  127. package/src/components/input-range/basic.tsx +5 -1
  128. package/src/components/input-text/basic.tsx +2 -1
  129. package/src/components/input-text/hide-errors.tsx +6 -2
  130. package/src/components/input-text/routes.ts +0 -2
  131. package/src/components/kolibri/basic.tsx +3 -3
  132. package/src/components/link/basic.tsx +4 -1
  133. package/src/components/link/icons.tsx +2 -1
  134. package/src/components/link/image.tsx +4 -9
  135. package/src/components/link/target.tsx +24 -7
  136. package/src/components/link-button/basic.tsx +2 -1
  137. package/src/components/link-group/basic.tsx +6 -2
  138. package/src/components/link-group/horizontal.tsx +6 -2
  139. package/src/components/modal/basic.tsx +6 -5
  140. package/src/components/nav/aria-current.tsx +4 -4
  141. package/src/components/nav/basic.tsx +3 -2
  142. package/src/components/nav/horizontal.tsx +2 -4
  143. package/src/components/pagination/basic.tsx +8 -6
  144. package/src/components/progress/basic.tsx +2 -1
  145. package/src/components/quote/basic.tsx +2 -1
  146. package/src/components/quote/block.tsx +2 -4
  147. package/src/components/select/basic.tsx +2 -4
  148. package/src/components/skip-nav/basic.tsx +6 -8
  149. package/src/components/spin/basic.tsx +2 -1
  150. package/src/components/spin/custom.tsx +3 -2
  151. package/src/components/spin/cycle.tsx +2 -1
  152. package/src/components/split-button/basic.tsx +3 -2
  153. package/src/components/table/column-alignment.tsx +3 -1
  154. package/src/components/table/complex-headers.tsx +3 -1
  155. package/src/components/table/horizontal-scrollbar.tsx +4 -2
  156. package/src/components/table/pagination-position.tsx +4 -1
  157. package/src/components/table/render-cell.tsx +2 -1
  158. package/src/components/table/routes.ts +0 -2
  159. package/src/components/table/sort-data.tsx +1 -4
  160. package/src/components/table/stateful-with-selection.tsx +3 -1
  161. package/src/components/table/stateless-with-selection.tsx +3 -1
  162. package/src/components/table/stateless.tsx +3 -1
  163. package/src/components/table/with-footer.tsx +3 -1
  164. package/src/components/table/with-pagination.tsx +1 -4
  165. package/src/components/tabs/basic.tsx +14 -15
  166. package/src/components/tabs/icons-only.tsx +1 -1
  167. package/src/components/textarea/adjust-height.tsx +7 -10
  168. package/src/components/textarea/basic.tsx +2 -1
  169. package/src/components/textarea/counter.tsx +5 -8
  170. package/src/components/textarea/partials/cases.tsx +1 -0
  171. package/src/components/textarea/resize.tsx +8 -6
  172. package/src/components/textarea/routes.ts +0 -6
  173. package/src/components/textarea/rows.tsx +4 -1
  174. package/src/components/toast/basic.tsx +2 -1
  175. package/src/components/toolbar/basic.tsx +10 -2
  176. package/src/components/toolbar/disabled.tsx +7 -2
  177. package/src/components/tree/basic.tsx +4 -0
  178. package/src/components/version/basic.tsx +2 -1
  179. package/src/components/version/context.tsx +2 -1
  180. package/src/react.main.tsx +1 -1
  181. package/src/scenarios/appointment-form/AppointmentForm.tsx +54 -43
  182. package/src/scenarios/custom-tooltip-width.tsx +11 -1
  183. package/src/scenarios/disabled-interactive-elements.tsx +1 -0
  184. package/src/scenarios/focus-elements.tsx +10 -2
  185. package/src/scenarios/inputs-get-value.tsx +1 -1
  186. package/src/scenarios/static-form.tsx +1 -1
  187. package/dist/3454.js +0 -2
  188. package/dist/5168.js.LICENSE.txt +0 -3
  189. package/src/components/accordion/list.tsx +0 -45
  190. package/src/components/button/hide-label.tsx +0 -41
  191. package/src/components/card/confirm.tsx +0 -28
  192. package/src/components/card/flex.tsx +0 -44
  193. package/src/components/card/selection.tsx +0 -83
  194. package/src/components/input-radio/select.tsx +0 -25
  195. package/src/components/input-text/blur.tsx +0 -21
  196. package/src/components/table/badge-size.tsx +0 -66
  197. package/src/components/textarea/disabled.tsx +0 -22
  198. package/src/components/textarea/placeholder.tsx +0 -17
  199. package/src/components/textarea/readonly.tsx +0 -22
  200. /package/dist/{3454.js.LICENSE.txt → 6787.js.LICENSE.txt} +0 -0
  201. /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>Hier sind sechs Links mit verschiedenen beschriebenen Weiterleitungen.</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
- <KolLink _href="#/back-page" _label="Ich bin ein Link ohne Target" />{' '}
15
- <KolLink _href="#/back-page" _label="Ich bin ein Link mit Target (_self)" _target="_self" />{' '}
16
- <KolLink _href="#/back-page" _label="Ich bin ein Link mit Target (_blank)" _target="_blank" />{' '}
17
- <KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Ich bin ein Link ohne Target" />{' '}
18
- <KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Ich bin ein Link mit Target (_self)" _target="_self" />{' '}
19
- <KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Ich bin ein Link mit Target (_blank)" _target="_blank" />
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>Hier sind fünf Buttons. Nach anklicken erscheint ein Popup mit &apos;Klick!&apos;</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>Hier ist eine LinkGroup bestehend aus drei Links die zu https://www.w3.org/ weiterleiten.</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>Hier ist eine horizontale Linkgroup bestehend aus drei Links die zu https://www.w3.org/ weiterleiten.</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
- Hier ist ein Beispiel für ein Modal. Es lässt sich öffnen. Dadurch erscheint ein Popup mit Text und &apos;Schließen&apos; Button. Durch anklicken des
15
- &apos;Schließen&apos; Button, schließt sich das Modal wieder.
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 &quot;Open modal&quot; and &quot;Close modal&quot;.
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="Ich bin ein Modal" style={{ width: '100%' }}>
21
+ <KolCard _label="I am a modal." style={{ width: '100%' }}>
21
22
  <div>
22
23
  <KolButton
23
- _label="Schließen"
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="Modal öffnen"
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
- Dieses Beispiel zeigt eine Navigation, bei welcher der zweite Link auf die aktuelle Seite verweist. Dadurch wird ihm automatisch das Attribut{' '}
13
- <code>aria-current=&quot;page&quot;</code> zugewiesen.
12
+ This sample shows KolNav with a link to the current page. This makes the component automatically assign <code>aria-current=&quot;page&quot;</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 (Aktuelle Seite)',
27
- _href: '#/back-page',
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
- Hier ist ein Beispiel für eine Navigation. Durch anklicken des rechten + Symbols kann die Navigation erweitert und Untermenüs geöffnet werden. Durch
16
- das anklicken des {'<'} Symbols kann die Navigation minimiert werden.
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
- Hier sind fünf Beispiele für eine Paginierung oder Seitennummerierung. Unten Rechts kann zwischen zwei Optionen für die Seitengröße gewechselt werden.
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 Paginierung 1" _on={{}} />
17
- <KolPagination _max={14} _page={14} _siblingCount={1} _boundaryCount={2} _label="Test Paginierung 2" _on={{}} />
18
- <KolPagination _max={4} _page={1} _siblingCount={0} _boundaryCount={2} _label="Test Paginierung 3" _on={{}} />
19
- <KolPagination _max={4} _page={6} _siblingCount={0} _boundaryCount={2} _hasButtons={false} _label="Test Paginierung 4" _on={{}} />
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 Paginierung 4"
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>Hier ist ein Fortschrittsbalken und Fortschrittskreis. Der Fortschritt verändert sich nicht.</p>
11
+ <p>KolProgress renders a progress indicator. The sample shows the variants &quot;bar&quot; and &quot;cycle&quot; 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>Hier ist ein Beispiel für ein Zitat.</p>
10
+ <p>KolQuote renders a quote with optional citation. This sample shows a quote in the variant &quot;inline&quot; 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 &quot;block&quot; 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
- <b>Links sind unsichtbar geschaltet</b>
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: '#header',
20
+ _href: '#/back-page',
23
21
  },
24
22
  {
25
23
  _label: 'Zum Formular',
26
- _href: '#form',
24
+ _href: '#/back-page',
27
25
  },
28
26
  {
29
27
  _label: 'Zum Ende',
30
- _href: '#footer',
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>Hier ist eine drehende Animation in Deutschlandfarben.</p>
11
+ <p>KolSpin renders a loading indicator. This sample shows the default variant &quot;dot&quot;.</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
- Hier ist ein Beispiel für eine custom Lade-Animation. Mittels des Expert-Slots ist es möglich, eigene Animationen einzufügen. Diese kann nach eigenen
15
- Vorstellungen angepasst werden und ist nicht zwingend barrierefrei.
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>Hier ist eine drehende Animation in verschiedenen Farben.</p>
11
+ <p>This sample shows the KolSpin variant &quot;cycle&quot;.</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
- Hier sind zwei Dropdownmenüs. Das obere Beispiel lässt sich nur durch drücken des Pfeils öffnen. Ansonsten erscheint eine Meldung. Beim unteren
24
- Beispiel kann durch drücken auf das Icon und des Pfeils das Menü geöffnet und geschlossen werden.
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>Table with columns headers and data in different text alignments.</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>Table using vertical and horizontal headers, applying colspan and rowspan.</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
- Table examples with and without horizontal scrollbars. When a scrollbar is present, it should be possible to focus the table container and to scroll it
27
- using arrow keys.
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>Tables with different pagination positions.</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 simulates the usage of React render functions for the table column contents.</p>
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 &quot;date&quot; 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>KolTableStateful with selection</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>KolTableStateless with selection</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>Direct usage of KolTableStateless</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>Table with footer data</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>Hier sind verschiedene Varianten von Tabs. Nur der Inhalt eines Tabs wird in jeder Zeile angezeigt.</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
- <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>
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>Hier sind verschiedene Varianten von Tabs mit Icons. Nur der Inhalt eines Tabs wird gleichzeitig angezeigt.</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>Hier sind zwei Freitextfelder. Im oberen kann die Größe des Textfelds angepasst werden, im unteren nicht.</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
- <KolForm className="row">
21
- <div className="col-sm-6">
22
- <KolTextarea _adjustHeight={true} _resize="vertical" _value={VALUE} _label="Texteingabe (horizontal)" />
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>Hier sind Freitextfelder die mithilfe des Reglers unten Rechts im jeweiligen Feld in ihrer Größe angepasst werden können.</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
  );