@public-ui/sample-react 2.0.7 → 2.0.9

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 (292) hide show
  1. package/dist/1090.js +2 -0
  2. package/dist/1181.js +2 -0
  3. package/dist/1218.js +2 -0
  4. package/dist/1280.js +2 -0
  5. package/dist/1338.js +2 -0
  6. package/dist/1517.js +2 -0
  7. package/dist/1596.js +2 -0
  8. package/dist/{9224.js → 2079.js} +2 -2
  9. package/dist/2163.js +2 -0
  10. package/dist/2415.js +2 -0
  11. package/dist/2594.js +2 -0
  12. package/dist/2611.js +2 -0
  13. package/dist/2643.js +2 -0
  14. package/dist/{3384.js → 3034.js} +2 -2
  15. package/dist/3099.js +2 -0
  16. package/dist/3145.js +2 -0
  17. package/dist/3345.js +2 -0
  18. package/dist/3388.js +2 -0
  19. package/dist/3466.js +2 -0
  20. package/dist/3580.js +2 -0
  21. package/dist/{6112.js → 3600.js} +2 -2
  22. package/dist/3619.js +2 -0
  23. package/dist/3776.js +2 -0
  24. package/dist/{2984.js → 3845.js} +2 -2
  25. package/dist/4150.js +2 -0
  26. package/dist/42.js +2 -0
  27. package/dist/4279.js +2 -0
  28. package/dist/4463.js +2 -0
  29. package/dist/4669.js +2 -0
  30. package/dist/4686.js +2 -0
  31. package/dist/4689.js +2 -0
  32. package/dist/4756.js +2 -0
  33. package/dist/5027.js +2 -0
  34. package/dist/521.js +2 -0
  35. package/dist/5324.js +2 -0
  36. package/dist/5373.js +2 -0
  37. package/dist/5518.js +2 -0
  38. package/dist/5615.js +1 -1
  39. package/dist/5853.js +2 -0
  40. package/dist/6010.js +2 -0
  41. package/dist/6308.js +2 -0
  42. package/dist/6826.js +2 -0
  43. package/dist/7170.js +2 -0
  44. package/dist/755.js +2 -0
  45. package/dist/7654.js +2 -0
  46. package/dist/8037.js +2 -0
  47. package/dist/817.js +2 -0
  48. package/dist/8180.js +2 -0
  49. package/dist/8341.js +2 -0
  50. package/dist/8612.js +2 -0
  51. package/dist/8734.js +2 -0
  52. package/dist/881.js +2 -0
  53. package/dist/8869.js +2 -0
  54. package/dist/892.js +2 -0
  55. package/dist/8948.js +2 -0
  56. package/dist/8951.js +2 -0
  57. package/dist/9150.js +2 -0
  58. package/dist/9317.js +2 -0
  59. package/dist/9330.js +2 -0
  60. package/dist/{1892.js → 9681.js} +2 -2
  61. package/dist/9700.js +2 -0
  62. package/dist/9727.js +2 -0
  63. package/dist/9797.js +2 -0
  64. package/dist/9865.js +2 -0
  65. package/dist/9886.js +2 -0
  66. package/dist/9912.js +2 -0
  67. package/dist/9912.js.LICENSE.txt +3 -0
  68. package/dist/9984.js +1 -1
  69. package/dist/main.css +1 -1
  70. package/dist/main.js +1 -17748
  71. package/dist/main.js.LICENSE.txt +2 -2
  72. package/package.json +13 -13
  73. package/src/App.tsx +15 -17
  74. package/src/components/Sidebar.tsx +1 -1
  75. package/src/components/abbr/basic.tsx +9 -5
  76. package/src/components/accordion/basic.tsx +17 -11
  77. package/src/components/accordion/headlines.tsx +26 -20
  78. package/src/components/accordion/list.tsx +13 -7
  79. package/src/components/alert/basic.tsx +16 -9
  80. package/src/components/alert/html.tsx +26 -21
  81. package/src/components/avatar/basic.tsx +14 -9
  82. package/src/components/badge/basic.tsx +13 -7
  83. package/src/components/badge/button.tsx +19 -10
  84. package/src/components/breadcrumb/basic.tsx +52 -46
  85. package/src/components/button/access-key.tsx +22 -17
  86. package/src/components/button/baselined.tsx +12 -6
  87. package/src/components/button/basic.tsx +9 -1
  88. package/src/components/button/hide-label.tsx +24 -15
  89. package/src/components/button/icons.tsx +25 -19
  90. package/src/components/button/width.tsx +21 -15
  91. package/src/components/button-group/basic.tsx +12 -6
  92. package/src/components/button-link/icons.tsx +36 -30
  93. package/src/components/button-link/image.tsx +13 -7
  94. package/src/components/card/basic.tsx +9 -3
  95. package/src/components/card/confirm.tsx +19 -13
  96. package/src/components/card/flex.tsx +36 -27
  97. package/src/components/card/routes.ts +2 -0
  98. package/src/components/card/selection.tsx +53 -47
  99. package/src/components/details/basic.tsx +26 -17
  100. package/src/components/handout/basic.tsx +9 -9
  101. package/src/components/heading/badged.tsx +38 -32
  102. package/src/components/heading/basic.tsx +14 -8
  103. package/src/components/heading/paragraph.tsx +47 -38
  104. package/src/components/icon/basic.tsx +16 -10
  105. package/src/components/image/basic.tsx +9 -2
  106. package/src/components/indented-text/basic.tsx +23 -17
  107. package/src/components/input-checkbox/basic.tsx +13 -1
  108. package/src/components/input-checkbox/button.tsx +14 -1
  109. package/src/components/input-checkbox/switch.tsx +16 -3
  110. package/src/components/input-color/basic.tsx +12 -1
  111. package/src/components/input-date/basic.tsx +14 -1
  112. package/src/components/input-email/basic.tsx +9 -1
  113. package/src/components/input-file/basic.tsx +12 -1
  114. package/src/components/input-password/basic.tsx +9 -1
  115. package/src/components/input-password/show-password.tsx +28 -19
  116. package/src/components/input-radio/basic.tsx +9 -1
  117. package/src/components/input-radio/select.tsx +9 -3
  118. package/src/components/input-range/basic.tsx +9 -1
  119. package/src/components/input-text/basic.tsx +9 -1
  120. package/src/components/input-text/blur.tsx +17 -12
  121. package/src/components/input-text/focus.tsx +14 -8
  122. package/src/components/input-text/partials/cases.tsx +3 -4
  123. package/src/components/link/basic.tsx +25 -19
  124. package/src/components/link/icons.tsx +40 -34
  125. package/src/components/link/image.tsx +18 -12
  126. package/src/components/link/target.tsx +14 -8
  127. package/src/components/link-button/basic.tsx +14 -8
  128. package/src/components/link-group/basic.tsx +9 -1
  129. package/src/components/link-group/horizontal.tsx +9 -1
  130. package/src/components/logo/basic.tsx +9 -1
  131. package/src/components/modal/basic.tsx +37 -28
  132. package/src/components/nav/basic.tsx +7 -1
  133. package/src/components/nav/horizontal.tsx +12 -3
  134. package/src/components/pagination/basic.tsx +24 -16
  135. package/src/components/progress/basic.tsx +10 -4
  136. package/src/components/quote/basic.tsx +7 -1
  137. package/src/components/quote/block.tsx +15 -6
  138. package/src/components/select/basic.tsx +12 -1
  139. package/src/components/spin/basic.tsx +9 -1
  140. package/src/components/spin/custom.tsx +9 -3
  141. package/src/components/spin/cycle.tsx +9 -1
  142. package/src/components/split-button/basic.tsx +17 -8
  143. package/src/components/table/badge-size.tsx +12 -1
  144. package/src/components/table/sort-data.tsx +14 -4
  145. package/src/components/table/with-pagination.tsx +12 -3
  146. package/src/components/tabs/basic.tsx +18 -12
  147. package/src/components/tabs/icons-only.tsx +12 -6
  148. package/src/components/textarea/adjust-height.tsx +14 -8
  149. package/src/components/textarea/basic.tsx +9 -1
  150. package/src/components/textarea/counter.tsx +7 -1
  151. package/src/components/textarea/disabled.tsx +9 -3
  152. package/src/components/textarea/placeholder.tsx +9 -3
  153. package/src/components/textarea/readonly.tsx +9 -3
  154. package/src/components/textarea/resize.tsx +13 -7
  155. package/src/components/textarea/rows.tsx +9 -3
  156. package/src/components/toast/basic.tsx +17 -11
  157. package/src/components/version/basic.tsx +9 -2
  158. package/src/components/version/context.tsx +11 -5
  159. package/src/react.main.tsx +11 -3
  160. package/src/scenarios/complex-form/component.tsx +2 -1
  161. package/src/scenarios/complex-form/kopfdaten/component.tsx +2 -1
  162. package/src/scenarios/complex-form/location/component.tsx +2 -1
  163. package/src/scenarios/complex-form/schedule/component.tsx +2 -1
  164. package/src/scenarios/disabled-interactive-elements.tsx +161 -0
  165. package/src/scenarios/routes.ts +2 -0
  166. package/src/scenarios/static-form.tsx +28 -2
  167. package/src/shares/theme.ts +3 -5
  168. package/src/shares/types.ts +1 -1
  169. package/dist/104.js +0 -2
  170. package/dist/1296.js +0 -2
  171. package/dist/1461.js +0 -2
  172. package/dist/1684.js +0 -2
  173. package/dist/1685.js +0 -2
  174. package/dist/1804.js +0 -2
  175. package/dist/1888.js +0 -2
  176. package/dist/2120.js +0 -2
  177. package/dist/2240.js +0 -2
  178. package/dist/2364.js +0 -2
  179. package/dist/2392.js +0 -2
  180. package/dist/2444.js +0 -2
  181. package/dist/2544.js +0 -2
  182. package/dist/2628.js +0 -2
  183. package/dist/2740.js +0 -2
  184. package/dist/2764.js +0 -2
  185. package/dist/2782.js +0 -2
  186. package/dist/2812.js +0 -2
  187. package/dist/3200.js +0 -2
  188. package/dist/3204.js +0 -2
  189. package/dist/352.js +0 -2
  190. package/dist/3564.js +0 -2
  191. package/dist/3920.js +0 -2
  192. package/dist/4064.js +0 -2
  193. package/dist/4136.js +0 -1
  194. package/dist/4544.js +0 -2
  195. package/dist/4728.js +0 -2
  196. package/dist/4915.js +0 -2
  197. package/dist/4988.js +0 -2
  198. package/dist/5376.js +0 -2
  199. package/dist/5456.js +0 -2
  200. package/dist/5628.js +0 -2
  201. package/dist/5744.js +0 -2
  202. package/dist/5768.js +0 -2
  203. package/dist/5839.js +0 -2
  204. package/dist/5956.js +0 -2
  205. package/dist/5972.js +0 -2
  206. package/dist/6040.js +0 -2
  207. package/dist/6476.js +0 -2
  208. package/dist/7192.js +0 -2
  209. package/dist/7312.js +0 -2
  210. package/dist/736.js +0 -2
  211. package/dist/7496.js +0 -2
  212. package/dist/7508.js +0 -2
  213. package/dist/7596.js +0 -2
  214. package/dist/7712.js +0 -2
  215. package/dist/7804.js +0 -2
  216. package/dist/7808.js +0 -2
  217. package/dist/8188.js +0 -2
  218. package/dist/8232.js +0 -2
  219. package/dist/8248.js +0 -2
  220. package/dist/828.js +0 -2
  221. package/dist/8476.js +0 -2
  222. package/dist/8524.js +0 -2
  223. package/dist/9072.js +0 -2
  224. package/dist/9088.js +0 -2
  225. package/dist/9404.js +0 -2
  226. package/dist/9424.js +0 -2
  227. package/dist/9680.js +0 -2
  228. package/dist/9888.js +0 -2
  229. /package/dist/{104.js.LICENSE.txt → 1090.js.LICENSE.txt} +0 -0
  230. /package/dist/{1296.js.LICENSE.txt → 1181.js.LICENSE.txt} +0 -0
  231. /package/dist/{1461.js.LICENSE.txt → 1218.js.LICENSE.txt} +0 -0
  232. /package/dist/{1684.js.LICENSE.txt → 1280.js.LICENSE.txt} +0 -0
  233. /package/dist/{1685.js.LICENSE.txt → 1338.js.LICENSE.txt} +0 -0
  234. /package/dist/{1804.js.LICENSE.txt → 1517.js.LICENSE.txt} +0 -0
  235. /package/dist/{1888.js.LICENSE.txt → 1596.js.LICENSE.txt} +0 -0
  236. /package/dist/{1892.js.LICENSE.txt → 2079.js.LICENSE.txt} +0 -0
  237. /package/dist/{2120.js.LICENSE.txt → 2163.js.LICENSE.txt} +0 -0
  238. /package/dist/{2240.js.LICENSE.txt → 2415.js.LICENSE.txt} +0 -0
  239. /package/dist/{2364.js.LICENSE.txt → 2594.js.LICENSE.txt} +0 -0
  240. /package/dist/{2392.js.LICENSE.txt → 2611.js.LICENSE.txt} +0 -0
  241. /package/dist/{2444.js.LICENSE.txt → 2643.js.LICENSE.txt} +0 -0
  242. /package/dist/{2544.js.LICENSE.txt → 3034.js.LICENSE.txt} +0 -0
  243. /package/dist/{2628.js.LICENSE.txt → 3099.js.LICENSE.txt} +0 -0
  244. /package/dist/{2740.js.LICENSE.txt → 3145.js.LICENSE.txt} +0 -0
  245. /package/dist/{2764.js.LICENSE.txt → 3345.js.LICENSE.txt} +0 -0
  246. /package/dist/{2782.js.LICENSE.txt → 3388.js.LICENSE.txt} +0 -0
  247. /package/dist/{2812.js.LICENSE.txt → 3466.js.LICENSE.txt} +0 -0
  248. /package/dist/{2984.js.LICENSE.txt → 3580.js.LICENSE.txt} +0 -0
  249. /package/dist/{3200.js.LICENSE.txt → 3600.js.LICENSE.txt} +0 -0
  250. /package/dist/{3204.js.LICENSE.txt → 3619.js.LICENSE.txt} +0 -0
  251. /package/dist/{3384.js.LICENSE.txt → 3776.js.LICENSE.txt} +0 -0
  252. /package/dist/{352.js.LICENSE.txt → 3845.js.LICENSE.txt} +0 -0
  253. /package/dist/{3564.js.LICENSE.txt → 4150.js.LICENSE.txt} +0 -0
  254. /package/dist/{3920.js.LICENSE.txt → 42.js.LICENSE.txt} +0 -0
  255. /package/dist/{4064.js.LICENSE.txt → 4279.js.LICENSE.txt} +0 -0
  256. /package/dist/{4544.js.LICENSE.txt → 4463.js.LICENSE.txt} +0 -0
  257. /package/dist/{4728.js.LICENSE.txt → 4669.js.LICENSE.txt} +0 -0
  258. /package/dist/{4915.js.LICENSE.txt → 4686.js.LICENSE.txt} +0 -0
  259. /package/dist/{4988.js.LICENSE.txt → 4689.js.LICENSE.txt} +0 -0
  260. /package/dist/{5376.js.LICENSE.txt → 4756.js.LICENSE.txt} +0 -0
  261. /package/dist/{5456.js.LICENSE.txt → 5027.js.LICENSE.txt} +0 -0
  262. /package/dist/{5628.js.LICENSE.txt → 521.js.LICENSE.txt} +0 -0
  263. /package/dist/{5744.js.LICENSE.txt → 5324.js.LICENSE.txt} +0 -0
  264. /package/dist/{5768.js.LICENSE.txt → 5373.js.LICENSE.txt} +0 -0
  265. /package/dist/{5839.js.LICENSE.txt → 5518.js.LICENSE.txt} +0 -0
  266. /package/dist/{5956.js.LICENSE.txt → 5853.js.LICENSE.txt} +0 -0
  267. /package/dist/{5972.js.LICENSE.txt → 6010.js.LICENSE.txt} +0 -0
  268. /package/dist/{6040.js.LICENSE.txt → 6308.js.LICENSE.txt} +0 -0
  269. /package/dist/{6112.js.LICENSE.txt → 6826.js.LICENSE.txt} +0 -0
  270. /package/dist/{6476.js.LICENSE.txt → 7170.js.LICENSE.txt} +0 -0
  271. /package/dist/{7192.js.LICENSE.txt → 755.js.LICENSE.txt} +0 -0
  272. /package/dist/{7312.js.LICENSE.txt → 7654.js.LICENSE.txt} +0 -0
  273. /package/dist/{736.js.LICENSE.txt → 8037.js.LICENSE.txt} +0 -0
  274. /package/dist/{7496.js.LICENSE.txt → 817.js.LICENSE.txt} +0 -0
  275. /package/dist/{7508.js.LICENSE.txt → 8180.js.LICENSE.txt} +0 -0
  276. /package/dist/{7596.js.LICENSE.txt → 8341.js.LICENSE.txt} +0 -0
  277. /package/dist/{7712.js.LICENSE.txt → 8612.js.LICENSE.txt} +0 -0
  278. /package/dist/{7804.js.LICENSE.txt → 8734.js.LICENSE.txt} +0 -0
  279. /package/dist/{7808.js.LICENSE.txt → 881.js.LICENSE.txt} +0 -0
  280. /package/dist/{8188.js.LICENSE.txt → 8869.js.LICENSE.txt} +0 -0
  281. /package/dist/{8232.js.LICENSE.txt → 892.js.LICENSE.txt} +0 -0
  282. /package/dist/{8248.js.LICENSE.txt → 8948.js.LICENSE.txt} +0 -0
  283. /package/dist/{828.js.LICENSE.txt → 8951.js.LICENSE.txt} +0 -0
  284. /package/dist/{8476.js.LICENSE.txt → 9150.js.LICENSE.txt} +0 -0
  285. /package/dist/{8524.js.LICENSE.txt → 9317.js.LICENSE.txt} +0 -0
  286. /package/dist/{9072.js.LICENSE.txt → 9330.js.LICENSE.txt} +0 -0
  287. /package/dist/{9088.js.LICENSE.txt → 9681.js.LICENSE.txt} +0 -0
  288. /package/dist/{9224.js.LICENSE.txt → 9700.js.LICENSE.txt} +0 -0
  289. /package/dist/{9404.js.LICENSE.txt → 9727.js.LICENSE.txt} +0 -0
  290. /package/dist/{9424.js.LICENSE.txt → 9797.js.LICENSE.txt} +0 -0
  291. /package/dist/{9680.js.LICENSE.txt → 9865.js.LICENSE.txt} +0 -0
  292. /package/dist/{9888.js.LICENSE.txt → 9886.js.LICENSE.txt} +0 -0
@@ -2,6 +2,7 @@ import type { FC } from 'react';
2
2
  import React, { useEffect, useRef, useState } from 'react';
3
3
 
4
4
  import { KolForm, KolInputPassword } from '@public-ui/react';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const InputPasswordShowPassword: FC = () => {
7
8
  const [isPasswordVisible, setIsPasswordVisible] = useState(false);
@@ -17,25 +18,33 @@ export const InputPasswordShowPassword: FC = () => {
17
18
  }, [isPasswordVisible]);
18
19
 
19
20
  return (
20
- <KolForm>
21
- <KolInputPassword
22
- _placeholder="Mit 'Passwort anzeigen' Button"
23
- _label="Passwort"
24
- ref={passwordRef}
25
- _smartButton={{
26
- _icons: {
27
- left: {
28
- icon: 'codicon codicon-eye',
21
+ <>
22
+ <SampleDescription>
23
+ <p>
24
+ Hier wird ein Passwort Eingabefeld angezeigt. Durch klicken auf den im Feld Rechts stehenden Button, kann zwischen verdecktem und angezeigtem Passwort
25
+ gewechselt werden.
26
+ </p>
27
+ </SampleDescription>
28
+ <KolForm>
29
+ <KolInputPassword
30
+ _placeholder="Mit 'Passwort anzeigen' Button"
31
+ _label="Passwort"
32
+ ref={passwordRef}
33
+ _smartButton={{
34
+ _icons: {
35
+ left: {
36
+ icon: 'codicon codicon-eye',
37
+ },
29
38
  },
30
- },
31
- _hideLabel: true,
32
- _label: `Passwort ${isPasswordVisible ? 'ausblenden' : 'einblenden'}`,
33
- _on: {
34
- onClick: handleTogglePasswordClick,
35
- },
36
- }}
37
- className="block"
38
- />
39
- </KolForm>
39
+ _hideLabel: true,
40
+ _label: `Passwort ${isPasswordVisible ? 'ausblenden' : 'einblenden'}`,
41
+ _on: {
42
+ onClick: handleTogglePasswordClick,
43
+ },
44
+ }}
45
+ className="block"
46
+ />
47
+ </KolForm>
48
+ </>
40
49
  );
41
50
  };
@@ -3,5 +3,13 @@ import React from 'react';
3
3
 
4
4
  import { FormWrap } from '../FormWrap';
5
5
  import { InputRadioVariants } from './partials/variants';
6
+ import { SampleDescription } from '../SampleDescription';
6
7
 
7
- export const InputRadioBasic: FC = () => <FormWrap RefComponent={InputRadioVariants} />;
8
+ export const InputRadioBasic: FC = () => (
9
+ <>
10
+ <SampleDescription>
11
+ <p>Hier sind Radio-Buttons in verschiedenen Ausführungen angezeigt. Es kann immer nur einer der drei Radio-Buttons gleichzeitig angeklickt werden.</p>
12
+ </SampleDescription>
13
+ <FormWrap RefComponent={InputRadioVariants} />
14
+ </>
15
+ );
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import { KolForm, KolInputRadio } from '@public-ui/react';
4
4
 
5
5
  import { ERROR_MSG } from '../../shares/constants';
6
+ import { SampleDescription } from '../SampleDescription';
6
7
 
7
8
  import type { FC } from 'react';
8
9
 
@@ -13,7 +14,12 @@ const options = [
13
14
  ];
14
15
 
15
16
  export const InputRadioSelect: FC = () => (
16
- <KolForm className="grid gap-4">
17
- <KolInputRadio _error={ERROR_MSG} _options={options} _label="Anrede" />
18
- </KolForm>
17
+ <>
18
+ <SampleDescription>
19
+ <p>Hier ist ein Beispiel Radio-Button. Nur eine gleichzeitige Auswahl ist möglich. </p>
20
+ </SampleDescription>
21
+ <KolForm className="grid gap-4">
22
+ <KolInputRadio _error={ERROR_MSG} _options={options} _label="Anrede" />
23
+ </KolForm>
24
+ </>
19
25
  );
@@ -3,5 +3,13 @@ import React from 'react';
3
3
 
4
4
  import { FormWrap } from '../FormWrap';
5
5
  import { InputRangeVariants } from './partials/variants';
6
+ import { SampleDescription } from '../SampleDescription';
6
7
 
7
- export const InputRangeBasic: FC = () => <FormWrap RefComponent={InputRangeVariants} />;
8
+ export const InputRangeBasic: FC = () => (
9
+ <>
10
+ <SampleDescription>
11
+ <p>Hier ist ein Schieberegler mit Schalter am Rand. Der Wert kann von 0 bis 50 verändert werden.</p>
12
+ </SampleDescription>
13
+ <FormWrap RefComponent={InputRangeVariants} />
14
+ </>
15
+ );
@@ -3,5 +3,13 @@ import React from 'react';
3
3
 
4
4
  import { FormWrap } from '../FormWrap';
5
5
  import { InputTextVariants } from './partials/variants';
6
+ import { SampleDescription } from '../SampleDescription';
6
7
 
7
- export const InputTextBasic: FC = () => <FormWrap RefComponent={InputTextVariants} />;
8
+ export const InputTextBasic: FC = () => (
9
+ <>
10
+ <SampleDescription>
11
+ <p>Hier sind verschiedene Freitexteingabefelder.</p>
12
+ </SampleDescription>
13
+ <FormWrap RefComponent={InputTextVariants} />
14
+ </>
15
+ );
@@ -1,16 +1,21 @@
1
- import React from 'react';
2
-
3
1
  import { KolForm, KolInputText } from '@public-ui/react';
4
-
2
+ import React from 'react';
3
+ import { SampleDescription } from '../SampleDescription';
5
4
  import type { FC } from 'react';
5
+
6
6
  export const InputTextBlur: FC = () => (
7
- <KolForm>
8
- <KolInputText
9
- _on={{
10
- onBlur: console.log,
11
- }}
12
- _type="search"
13
- _label="Suche"
14
- />
15
- </KolForm>
7
+ <>
8
+ <SampleDescription>
9
+ <p>Hier ist ein Freitexteingabefeld. </p>
10
+ </SampleDescription>
11
+ <KolForm>
12
+ <KolInputText
13
+ _on={{
14
+ onBlur: console.log,
15
+ }}
16
+ _type="search"
17
+ _label="Suche"
18
+ />
19
+ </KolForm>
20
+ </>
16
21
  );
@@ -3,6 +3,7 @@ import React, { useLayoutEffect, useRef } from 'react';
3
3
  import { KolButton, KolForm, KolInputText } from '@public-ui/react';
4
4
 
5
5
  import type { FC } from 'react';
6
+ import { SampleDescription } from '../SampleDescription';
6
7
 
7
8
  export const InputTextFocus: FC = () => {
8
9
  const ref = useRef<HTMLKolInputTextElement | null>(null);
@@ -14,14 +15,19 @@ export const InputTextFocus: FC = () => {
14
15
  }, [ref]);
15
16
 
16
17
  return (
17
- <KolForm>
18
- <div className="grid gap-4">
19
- <KolInputText ref={ref} _label="Vorname" />
20
- <KolInputText _label="Nachname" />
21
- <div>
22
- <KolButton _label="Submit"></KolButton>
18
+ <>
19
+ <SampleDescription>
20
+ <p>Hier sind zwei Freitexteingabefelder.</p>
21
+ </SampleDescription>
22
+ <KolForm>
23
+ <div className="grid gap-4">
24
+ <KolInputText ref={ref} _label="Vorname" />
25
+ <KolInputText _label="Nachname" />
26
+ <div>
27
+ <KolButton _label="Submit"></KolButton>
28
+ </div>
23
29
  </div>
24
- </div>
25
- </KolForm>
30
+ </KolForm>
31
+ </>
26
32
  );
27
33
  };
@@ -14,7 +14,6 @@ export const InputTextCases = forwardRef<HTMLKolInputTextElement, Components.Kol
14
14
  _error={ERROR_MSG}
15
15
  _placeholder="Mit Icons"
16
16
  _icons={{
17
- left: 'codicon codicon-arrow-left',
18
17
  right: {
19
18
  icon: 'codicon codicon-arrow-right',
20
19
  style: {
@@ -28,13 +27,13 @@ export const InputTextCases = forwardRef<HTMLKolInputTextElement, Components.Kol
28
27
  onClick: console.log,
29
28
  onFocus: console.log,
30
29
  }}
31
- _hideLabel
32
30
  _required
33
31
  _type="search"
34
32
  _touched
35
- _label="Suche"
33
+ _label="Vorname (text)"
34
+ _accessKey="V"
35
+ ref={ref}
36
36
  />
37
- <KolInputText {...props} ref={ref} _accessKey="V" _placeholder="Placeholder" _label="Vorname (text)" _required />
38
37
  <KolInputText {...props} _placeholder="Placeholder" _label="Suche (search)" _type="search" />
39
38
  <KolInputText {...props} _placeholder="Placeholder" _error={ERROR_MSG} _touched _type="url" _label="URL (url)" />
40
39
  <KolInputText {...props} _placeholder="Placeholder" _type="tel" _label="Telefon (tel)" />
@@ -2,25 +2,31 @@ import type { FC } from 'react';
2
2
  import React from 'react';
3
3
 
4
4
  import { KolLink } from '@public-ui/react';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const LinkBasic: FC = () => (
7
- <div className="grid gap-4">
8
- <KolLink _href="#/back-page" _label="Simple Link" />
9
- <KolLink _disabled _href="#/back-page" _label="Simple Link (deaktiviert)" />
10
- <KolLink _hideLabel _icons="codicon codicon-home" _href="#/back-page" _label="Icon Link" />
11
- <KolLink _disabled _hideLabel _icons="codicon codicon-home" _href="#/back-page" _label="Icon Link (deaktiviert)" />
12
- <p>
13
- In diesem Absatz wird ein Link gesetzt, der keine weiteren Attribute enthält. <KolLink _href="#/back-page" _label="Simple Link" /> Er wird standardmäßig
14
- als <strong>inline-Element</strong> ausgegeben.
15
- </p>
16
- <p>
17
- In diesem Absatz wird ein Link gesetzt, der einmal als inline-block-Element ausgegeben wird.{' '}
18
- <KolLink class="d-inline-block" _accessKey="S" _href="#/back-page" _label="Simple Link" />. Damit kann man mir per CSS-Styles eine Breite, eine Höhe und
19
- andere Eigenschaften zuweisen.
20
- <br />
21
- <br />
22
- Danach folgt ein Link, der als block-Element ausgegeben wird. <KolLink class="d-block" _href="#/back-page" _label="Simple Link" />, daher gehe ich über
23
- die ganze Breite des Eltern-Elements erzeuge so einen Zeilenumbruch.
24
- </p>
25
- </div>
8
+ <>
9
+ <SampleDescription>
10
+ <p>Hier sind Beispiele für verschiedene Links.</p>
11
+ </SampleDescription>
12
+ <div className="grid gap-4">
13
+ <KolLink _href="#/back-page" _label="Simple Link" />
14
+ <KolLink _disabled _href="#/back-page" _label="Simple Link (deaktiviert)" />
15
+ <KolLink _hideLabel _icons="codicon codicon-home" _href="#/back-page" _label="Icon Link" />
16
+ <KolLink _disabled _hideLabel _icons="codicon codicon-home" _href="#/back-page" _label="Icon Link (deaktiviert)" />
17
+ <p>
18
+ In diesem Absatz wird ein Link gesetzt, der keine weiteren Attribute enthält. <KolLink _href="#/back-page" _label="Simple Link" /> Er wird standardmäßig
19
+ als <strong>inline-Element</strong> ausgegeben.
20
+ </p>
21
+ <p>
22
+ In diesem Absatz wird ein Link gesetzt, der einmal als inline-block-Element ausgegeben wird.{' '}
23
+ <KolLink class="d-inline-block" _accessKey="S" _href="#/back-page" _label="Simple Link" />. Damit kann man mir per CSS-Styles eine Breite, eine Höhe und
24
+ andere Eigenschaften zuweisen.
25
+ <br />
26
+ <br />
27
+ Danach folgt ein Link, der als block-Element ausgegeben wird. <KolLink class="d-block" _href="#/back-page" _label="Simple Link" />, daher gehe ich über
28
+ die ganze Breite des Eltern-Elements erzeuge so einen Zeilenumbruch.
29
+ </p>
30
+ </div>
31
+ </>
26
32
  );
@@ -3,40 +3,46 @@ import React from 'react';
3
3
  import { KolLink } from '@public-ui/react';
4
4
 
5
5
  import type { FC } from 'react';
6
+ import { SampleDescription } from '../SampleDescription';
6
7
 
7
8
  export const LinkIcons: FC = () => (
8
- <div className="grid gap-4">
9
- <KolLink _icons="codicon codicon-home" _label="Ich bin ein Link mit Icon links" _href="#/back-page" />
10
- <KolLink
11
- _icons={{
12
- right: 'codicon codicon-home',
13
- }}
14
- _label="Ich bin ein Link mit Icon rechts"
15
- _href="#/back-page"
16
- />
17
- <KolLink
18
- _icons={{
19
- top: 'codicon codicon-home',
20
- }}
21
- _label="Ich bin ein Link mit Icon oben"
22
- _href="#/back-page"
23
- />
24
- <KolLink
25
- _icons={{
26
- bottom: 'codicon codicon-home',
27
- }}
28
- _label="Ich bin ein Link mit Icon unten"
29
- _href="#/back-page"
30
- />
31
- <KolLink
32
- _icons={{
33
- top: 'codicon codicon-home',
34
- right: 'codicon codicon-home',
35
- bottom: 'codicon codicon-home',
36
- left: 'codicon codicon-home',
37
- }}
38
- _label="Ich bin ein Link mit allen Icons"
39
- _href="#/back-page"
40
- />
41
- </div>
9
+ <>
10
+ <SampleDescription>
11
+ <p>Hier sind verschiedene Darstellungsweisen von Links mit Icons.</p>
12
+ </SampleDescription>
13
+ <div className="grid gap-4">
14
+ <KolLink _icons="codicon codicon-home" _label="Ich bin ein Link mit Icon links" _href="#/back-page" />
15
+ <KolLink
16
+ _icons={{
17
+ right: 'codicon codicon-home',
18
+ }}
19
+ _label="Ich bin ein Link mit Icon rechts"
20
+ _href="#/back-page"
21
+ />
22
+ <KolLink
23
+ _icons={{
24
+ top: 'codicon codicon-home',
25
+ }}
26
+ _label="Ich bin ein Link mit Icon oben"
27
+ _href="#/back-page"
28
+ />
29
+ <KolLink
30
+ _icons={{
31
+ bottom: 'codicon codicon-home',
32
+ }}
33
+ _label="Ich bin ein Link mit Icon unten"
34
+ _href="#/back-page"
35
+ />
36
+ <KolLink
37
+ _icons={{
38
+ top: 'codicon codicon-home',
39
+ right: 'codicon codicon-home',
40
+ bottom: 'codicon codicon-home',
41
+ left: 'codicon codicon-home',
42
+ }}
43
+ _label="Ich bin ein Link mit allen Icons"
44
+ _href="#/back-page"
45
+ />
46
+ </div>
47
+ </>
42
48
  );
@@ -3,18 +3,24 @@ import React from 'react';
3
3
  import { KolKolibri, KolLink } from '@public-ui/react';
4
4
 
5
5
  import type { FC } from 'react';
6
+ import { SampleDescription } from '../SampleDescription';
6
7
 
7
8
  export const LinkImage: FC = () => (
8
- <div className="grid gap-4">
9
- <KolLink _href="#/back-page" _label="Ich bin ein Link, der als Text gerendert wird" />
10
- <br />
11
- <KolLink _href="#/back-page" _label="">
12
- <img alt="Darstellung des KoliBri-Theming" slot="expert" src="abgrenzung.jpg" width="300" />
13
- <KolKolibri style={{ width: '300px' }}></KolKolibri>
14
- </KolLink>
15
- <br />
16
- <KolLink _href="#/back-page" _label="">
17
- <img alt="Darstellung des KoliBri-Theming" slot="expert" src="abgrenzung.jpg" width="300" />
18
- </KolLink>
19
- </div>
9
+ <>
10
+ <SampleDescription>
11
+ <p>Hier ist ein Link, der als Text gerendert wird und zwei Darstellungen des KoliBri-Theming.</p>
12
+ </SampleDescription>
13
+ <div className="grid gap-4">
14
+ <KolLink _href="#/back-page" _label="Ich bin ein Link, der als Text gerendert wird" />
15
+ <br />
16
+ <KolLink _href="#/back-page" _label="">
17
+ <img alt="Darstellung des KoliBri-Theming" slot="expert" src="abgrenzung.jpg" width="300" />
18
+ <KolKolibri style={{ width: '300px' }}></KolKolibri>
19
+ </KolLink>
20
+ <br />
21
+ <KolLink _href="#/back-page" _label="">
22
+ <img alt="Darstellung des KoliBri-Theming" slot="expert" src="abgrenzung.jpg" width="300" />
23
+ </KolLink>
24
+ </div>
25
+ </>
20
26
  );
@@ -3,14 +3,20 @@ import React from 'react';
3
3
  import { KolLink } from '@public-ui/react';
4
4
 
5
5
  import type { FC } from 'react';
6
+ import { SampleDescription } from '../SampleDescription';
6
7
 
7
8
  export const LinkTarget: FC = () => (
8
- <div className="d-flex gap-4">
9
- <KolLink _href="#/back-page" _label="Ich bin ein Link ohne Target" />{' '}
10
- <KolLink _href="#/back-page" _label="Ich bin ein Link mit Target (_self)" _target="_self" />{' '}
11
- <KolLink _href="#/back-page" _label="Ich bin ein Link mit Target (_blank)" _target="_blank" />{' '}
12
- <KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Ich bin ein Link ohne Target" />{' '}
13
- <KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Ich bin ein Link mit Target (_self)" _target="_self" />{' '}
14
- <KolLink _href="#/back-page" _icons="codicon codicon-home" _hideLabel _label="Ich bin ein Link mit Target (_blank)" _target="_blank" />
15
- </div>
9
+ <>
10
+ <SampleDescription>
11
+ <p>Hier sind sechs Links mit verschiedenen beschriebenen Weiterleitungen.</p>
12
+ </SampleDescription>
13
+ <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" />
20
+ </div>
21
+ </>
16
22
  );
@@ -3,19 +3,25 @@ import React from 'react';
3
3
  import { KolLinkButton } from '@public-ui/react';
4
4
 
5
5
  import type { FC } from 'react';
6
+ import { SampleDescription } from '../SampleDescription';
6
7
 
7
8
  const ARGS = {
8
9
  _href: '#/back-page',
9
10
  };
10
11
 
11
12
  export const LinkButtonBasic: FC = () => (
12
- <div className="grid gap-14">
13
- <div className="flex flex-wrap gap-14">
14
- <KolLinkButton _label="Primary" _variant="primary" {...ARGS}></KolLinkButton>
15
- <KolLinkButton _label="Secondary" _variant="secondary" {...ARGS}></KolLinkButton>
16
- <KolLinkButton _label="Normal" _variant="normal" {...ARGS}></KolLinkButton>
17
- <KolLinkButton _label="Danger" _variant="danger" {...ARGS}></KolLinkButton>
18
- <KolLinkButton _label="Ghost" _variant="ghost" {...ARGS}></KolLinkButton>
13
+ <>
14
+ <SampleDescription>
15
+ <p>Hier sind fünf Buttons. Nach anklicken erscheint ein Popup mit &apos;Klick!&apos;</p>
16
+ </SampleDescription>
17
+ <div className="grid gap-14">
18
+ <div className="flex flex-wrap gap-14">
19
+ <KolLinkButton _label="Primary" _variant="primary" {...ARGS}></KolLinkButton>
20
+ <KolLinkButton _label="Secondary" _variant="secondary" {...ARGS}></KolLinkButton>
21
+ <KolLinkButton _label="Normal" _variant="normal" {...ARGS}></KolLinkButton>
22
+ <KolLinkButton _label="Danger" _variant="danger" {...ARGS}></KolLinkButton>
23
+ <KolLinkButton _label="Ghost" _variant="ghost" {...ARGS}></KolLinkButton>
24
+ </div>
19
25
  </div>
20
- </div>
26
+ </>
21
27
  );
@@ -2,10 +2,18 @@ import type { FC } from 'react';
2
2
  import React from 'react';
3
3
 
4
4
  import { KolLinkGroup } from '@public-ui/react';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  const links = [
7
8
  { _label: 'Link 1', _href: '#/back-page' },
8
9
  { _label: 'Link 2', _href: '#/back-page' },
9
10
  { _label: 'Link 3', _href: '#/back-page' },
10
11
  ];
11
- export const LinkGroupBasic: FC = () => <KolLinkGroup _links={links} _label="" />;
12
+ export const LinkGroupBasic: FC = () => (
13
+ <>
14
+ <SampleDescription>
15
+ <p>Hier ist eine LinkGroup bestehend aus drei Links die zu https://www.w3.org/ weiterleiten.</p>
16
+ </SampleDescription>
17
+ <KolLinkGroup _links={links} _label="" />
18
+ </>
19
+ );
@@ -2,10 +2,18 @@ import type { FC } from 'react';
2
2
  import React from 'react';
3
3
 
4
4
  import { KolLinkGroup } from '@public-ui/react';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  const links = [
7
8
  { _label: 'Link 1', _href: '#/back-page' },
8
9
  { _label: 'Link 2', _href: '#/back-page' },
9
10
  { _label: 'Link 3', _href: '#/back-page' },
10
11
  ];
11
- export const LinkGroupHorizontal: FC = () => <KolLinkGroup _links={links} _orientation="horizontal" _label="" />;
12
+ export const LinkGroupHorizontal: FC = () => (
13
+ <>
14
+ <SampleDescription>
15
+ <p>Hier ist eine horizontale Linkgroup bestehend aus drei Links die zu https://www.w3.org/ weiterleiten.</p>
16
+ </SampleDescription>
17
+ <KolLinkGroup _links={links} _orientation="horizontal" _label="" />
18
+ </>
19
+ );
@@ -2,6 +2,14 @@ import type { FC } from 'react';
2
2
  import React from 'react';
3
3
 
4
4
  import { Bundesministerium } from '@public-ui/components';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
  import { KolLogo } from '@public-ui/react';
6
7
 
7
- export const LogoBasic: FC = () => <KolLogo className="w-50%" _org={Bundesministerium['Die Bundesregierung']} />;
8
+ export const LogoBasic: FC = () => (
9
+ <>
10
+ <SampleDescription>
11
+ <p>Hier ist ein Logo der Bundesregierung.</p>
12
+ </SampleDescription>
13
+ <KolLogo className="w-50%" _org={Bundesministerium['Die Bundesregierung']} />
14
+ </>
15
+ );
@@ -2,38 +2,47 @@ import type { FC } from 'react';
2
2
  import React, { useRef } from 'react';
3
3
 
4
4
  import { KolButton, KolCard, KolModal } from '@public-ui/react';
5
+ import { SampleDescription } from '../SampleDescription';
5
6
 
6
7
  export const ModalBasic: FC = () => {
7
8
  const modalElement = useRef<HTMLKolModalElement>(null);
8
9
 
9
10
  return (
10
- <div>
11
- <KolModal _label="" _width="80%" ref={modalElement} _on={{ onClose: () => console.log('Modal closed') }}>
12
- <KolCard _label="Ich bin ein Modal" style={{ width: '100%' }}>
13
- <div>
14
- <KolButton
15
- _label="Schließen"
16
- _on={{
17
- onClick: () => {
18
- if (modalElement?.current) {
19
- modalElement.current._activeElement = null;
20
- }
21
- },
22
- }}
23
- />
24
- </div>
25
- </KolCard>
26
- </KolModal>
27
- <KolButton
28
- _label="Modal öffnen"
29
- _on={{
30
- onClick: (event: Event) => {
31
- if (modalElement?.current) {
32
- modalElement.current._activeElement = event.target as HTMLElement;
33
- }
34
- },
35
- }}
36
- />
37
- </div>
11
+ <>
12
+ <SampleDescription>
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.
16
+ </p>
17
+ </SampleDescription>
18
+ <div>
19
+ <KolModal _label="" _width="80%" ref={modalElement} _on={{ onClose: () => console.log('Modal closed') }}>
20
+ <KolCard _label="Ich bin ein Modal" style={{ width: '100%' }}>
21
+ <div>
22
+ <KolButton
23
+ _label="Schließen"
24
+ _on={{
25
+ onClick: () => {
26
+ if (modalElement?.current) {
27
+ modalElement.current._activeElement = null;
28
+ }
29
+ },
30
+ }}
31
+ />
32
+ </div>
33
+ </KolCard>
34
+ </KolModal>
35
+ <KolButton
36
+ _label="Modal öffnen"
37
+ _on={{
38
+ onClick: (event: Event) => {
39
+ if (modalElement?.current) {
40
+ modalElement.current._activeElement = event.target as HTMLElement;
41
+ }
42
+ },
43
+ }}
44
+ />
45
+ </div>
46
+ </>
38
47
  );
39
48
  };
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
 
3
3
  import { KolInputCheckbox, KolNav } from '@public-ui/react';
4
-
4
+ import { SampleDescription } from '../SampleDescription';
5
5
  import { LINKS } from './links';
6
6
 
7
7
  import type { FC } from 'react';
@@ -10,6 +10,12 @@ export const NavBasic: FC = () => {
10
10
 
11
11
  return (
12
12
  <>
13
+ <SampleDescription>
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.
17
+ </p>
18
+ </SampleDescription>
13
19
  <KolInputCheckbox
14
20
  _label="Show icons when expanded"
15
21
  _checked={hasIconsWhenExpanded}