@public-ui/sample-react 1.7.24 → 1.7.26-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 (298) hide show
  1. package/dist/1069.js +2 -0
  2. package/dist/1085.js +2 -0
  3. package/dist/{8928.js → 1184.js} +2 -2
  4. package/dist/1222.js +2 -0
  5. package/dist/1278.js +1 -1
  6. package/dist/1325.js +2 -0
  7. package/dist/1333.js +2 -0
  8. package/dist/1661.js +2 -0
  9. package/dist/{9031.js → 1703.js} +2 -2
  10. package/dist/{7055.js → 1711.js} +2 -2
  11. package/dist/1792.js +2 -0
  12. package/dist/1793.js +2 -0
  13. package/dist/187.js +1 -0
  14. package/dist/{4486.js → 1878.js} +2 -2
  15. package/dist/{4626.js → 1941.js} +2 -2
  16. package/dist/1957.js +2 -0
  17. package/dist/{5155.js → 2195.js} +2 -2
  18. package/dist/2305.js +2 -0
  19. package/dist/{2858.js → 2538.js} +2 -2
  20. package/dist/279.js +1 -0
  21. package/dist/2830.js +2 -0
  22. package/dist/3128.js +2 -0
  23. package/dist/3180.js +2 -0
  24. package/dist/{8516.js → 3332.js} +2 -2
  25. package/dist/{1376.js → 3344.js} +2 -2
  26. package/dist/3596.js +2 -0
  27. package/dist/3714.js +2 -0
  28. package/dist/3974.js +2 -0
  29. package/dist/4014.js +1 -1
  30. package/dist/{5670.js → 4102.js} +2 -2
  31. package/dist/4218.js +2 -0
  32. package/dist/4404.js +2 -0
  33. package/dist/4941.js +2 -0
  34. package/dist/500.js +2 -0
  35. package/dist/{4179.js → 5139.js} +2 -2
  36. package/dist/5164.js +2 -0
  37. package/dist/{4412.js → 5484.js} +2 -2
  38. package/dist/5540.js +2 -0
  39. package/dist/5756.js +2 -0
  40. package/dist/6682.js +2 -0
  41. package/dist/{8797.js → 6781.js} +2 -2
  42. package/dist/7245.js +2 -0
  43. package/dist/{2879.js → 7263.js} +2 -2
  44. package/dist/7512.js +2 -0
  45. package/dist/7856.js +2 -0
  46. package/dist/8002.js +2 -0
  47. package/dist/8049.js +2 -0
  48. package/dist/{2381.js → 8189.js} +2 -2
  49. package/dist/8264.js +2 -0
  50. package/dist/8389.js +2 -0
  51. package/dist/{1443.js → 8515.js} +2 -2
  52. package/dist/{2221.js → 8557.js} +2 -2
  53. package/dist/8588.js +2 -0
  54. package/dist/{1524.js → 8724.js} +2 -2
  55. package/dist/882.js +2 -0
  56. package/dist/895.js +2 -0
  57. package/dist/8993.js +2 -0
  58. package/dist/902.js +2 -0
  59. package/dist/9175.js +2 -0
  60. package/dist/9202.js +2 -0
  61. package/dist/{7142.js → 9558.js} +2 -2
  62. package/dist/9567.js +2 -0
  63. package/dist/9654.js +2 -0
  64. package/dist/9833.js +2 -0
  65. package/dist/9961.js +2 -0
  66. package/dist/{6090.js → 9962.js} +2 -2
  67. package/dist/index.html +2 -2
  68. package/dist/main.css +1 -1
  69. package/dist/main.js +1 -1
  70. package/dist/main.js.LICENSE.txt +2 -2
  71. package/package.json +16 -12
  72. package/public/index.html +2 -2
  73. package/src/components/SampleDescription.tsx +16 -9
  74. package/src/components/Sidebar.tsx +4 -4
  75. package/src/components/abbr/basic.tsx +5 -0
  76. package/src/components/accordion/basic.tsx +21 -11
  77. package/src/components/accordion/headlines.tsx +26 -20
  78. package/src/components/accordion/routes.ts +0 -5
  79. package/src/components/alert/basic.tsx +15 -1
  80. package/src/components/alert/card-msg.tsx +15 -6
  81. package/src/components/alert/html.tsx +7 -3
  82. package/src/components/avatar/basic.tsx +13 -6
  83. package/src/components/badge/basic.tsx +14 -7
  84. package/src/components/badge/button.tsx +7 -0
  85. package/src/components/breadcrumb/basic.tsx +53 -46
  86. package/src/components/button/basic.tsx +13 -2
  87. package/src/components/button/icons.tsx +26 -19
  88. package/src/components/button/routes.ts +0 -3
  89. package/src/components/button/width.tsx +22 -15
  90. package/src/components/button-group/basic.tsx +18 -7
  91. package/src/components/button-link/basic.tsx +26 -16
  92. package/src/components/button-link/icons.tsx +37 -30
  93. package/src/components/button-link/image.tsx +14 -7
  94. package/src/components/card/basic.tsx +12 -5
  95. package/src/components/card/routes.ts +0 -9
  96. package/src/components/details/basic.tsx +21 -12
  97. package/src/components/heading/badged.tsx +28 -20
  98. package/src/components/heading/basic.tsx +14 -8
  99. package/src/components/heading/paragraph.tsx +44 -38
  100. package/src/components/icon/basic.tsx +16 -10
  101. package/src/components/image/basic.tsx +9 -1
  102. package/src/components/indented-text/basic.tsx +25 -17
  103. package/src/components/input-checkbox/basic.tsx +9 -1
  104. package/src/components/input-checkbox/button.tsx +9 -1
  105. package/src/components/input-checkbox/switch.tsx +9 -1
  106. package/src/components/input-color/basic.tsx +9 -1
  107. package/src/components/input-date/basic.tsx +9 -1
  108. package/src/components/input-email/basic.tsx +9 -1
  109. package/src/components/input-file/basic.tsx +9 -1
  110. package/src/components/input-number/basic.tsx +13 -1
  111. package/src/components/input-password/basic.tsx +9 -1
  112. package/src/components/input-password/show-password.tsx +26 -19
  113. package/src/components/input-radio/basic.tsx +9 -1
  114. package/src/components/input-radio/horizontal.tsx +5 -5
  115. package/src/components/input-radio/routes.ts +0 -3
  116. package/src/components/input-range/basic.tsx +12 -1
  117. package/src/components/input-text/basic.tsx +9 -1
  118. package/src/components/input-text/focus.tsx +14 -8
  119. package/src/components/input-text/hide-errors.tsx +4 -1
  120. package/src/components/input-text/routes.ts +0 -2
  121. package/src/components/kolibri/basic.tsx +5 -0
  122. package/src/components/link/basic.tsx +25 -17
  123. package/src/components/link/icons.tsx +40 -34
  124. package/src/components/link/image.tsx +18 -12
  125. package/src/components/link/target.tsx +16 -8
  126. package/src/components/link-button/basic.tsx +14 -8
  127. package/src/components/link-group/basic.tsx +13 -2
  128. package/src/components/link-group/horizontal.tsx +13 -2
  129. package/src/components/logo/basic.tsx +13 -2
  130. package/src/components/modal/basic.tsx +9 -2
  131. package/src/components/nav/aria-current.tsx +24 -15
  132. package/src/components/nav/basic.tsx +64 -55
  133. package/src/components/nav/horizontal.tsx +58 -52
  134. package/src/components/nav/routes.ts +0 -3
  135. package/src/components/pagination/basic.tsx +15 -6
  136. package/src/components/progress/basic.tsx +10 -4
  137. package/src/components/quote/basic.tsx +7 -1
  138. package/src/components/quote/block.tsx +12 -6
  139. package/src/components/select/basic.tsx +9 -1
  140. package/src/components/skip-nav/basic.tsx +7 -11
  141. package/src/components/spin/basic.tsx +10 -1
  142. package/src/components/spin/custom.tsx +13 -3
  143. package/src/components/spin/cycle.tsx +10 -1
  144. package/src/components/split-button/basic.tsx +9 -2
  145. package/src/components/table/column-alignment.tsx +4 -0
  146. package/src/components/table/horizontal-scrollbar.tsx +7 -0
  147. package/src/components/table/render-cell.tsx +9 -1
  148. package/src/components/table/routes.ts +0 -3
  149. package/src/components/table/sort-date.tsx +9 -1
  150. package/src/components/table/with-pagination.tsx +1 -4
  151. package/src/components/tabs/basic.tsx +4 -0
  152. package/src/components/tabs/icons-only.tsx +12 -6
  153. package/src/components/textarea/adjust-height.tsx +12 -8
  154. package/src/components/textarea/basic.tsx +10 -1
  155. package/src/components/textarea/counter.tsx +10 -1
  156. package/src/components/textarea/resize.tsx +15 -6
  157. package/src/components/textarea/routes.ts +0 -9
  158. package/src/components/textarea/rows.tsx +12 -3
  159. package/src/components/toast/basic.tsx +17 -10
  160. package/src/components/toast-legacy/basic.tsx +17 -8
  161. package/src/components/version/basic.tsx +10 -1
  162. package/src/components/version/context.tsx +12 -5
  163. package/src/react.main.tsx +1 -1
  164. package/src/scenarios/appointment-form/AppointmentForm.tsx +53 -43
  165. package/src/scenarios/custom-tooltip-width.tsx +10 -1
  166. package/src/scenarios/static-form.tsx +1 -1
  167. package/src/shares/constants.ts +1 -0
  168. package/dist/1016.js +0 -2
  169. package/dist/149.js +0 -2
  170. package/dist/1531.js +0 -2
  171. package/dist/1818.js +0 -1
  172. package/dist/1999.js +0 -2
  173. package/dist/2072.js +0 -2
  174. package/dist/2252.js +0 -2
  175. package/dist/2256.js +0 -2
  176. package/dist/2545.js +0 -2
  177. package/dist/263.js +0 -2
  178. package/dist/2639.js +0 -2
  179. package/dist/2657.js +0 -2
  180. package/dist/2669.js +0 -2
  181. package/dist/3110.js +0 -2
  182. package/dist/3261.js +0 -2
  183. package/dist/3353.js +0 -2
  184. package/dist/3833.js +0 -2
  185. package/dist/3869.js +0 -2
  186. package/dist/4082.js +0 -2
  187. package/dist/4156.js +0 -2
  188. package/dist/4177.js +0 -2
  189. package/dist/4178.js +0 -2
  190. package/dist/4212.js +0 -2
  191. package/dist/4318.js +0 -2
  192. package/dist/4346.js +0 -2
  193. package/dist/4702.js +0 -2
  194. package/dist/5018.js +0 -2
  195. package/dist/5157.js +0 -2
  196. package/dist/5233.js +0 -2
  197. package/dist/5327.js +0 -2
  198. package/dist/5350.js +0 -2
  199. package/dist/5716.js +0 -2
  200. package/dist/605.js +0 -2
  201. package/dist/6402.js +0 -2
  202. package/dist/6596.js +0 -2
  203. package/dist/6636.js +0 -2
  204. package/dist/6716.js +0 -2
  205. package/dist/7132.js +0 -2
  206. package/dist/7219.js +0 -2
  207. package/dist/7367.js +0 -1
  208. package/dist/7533.js +0 -2
  209. package/dist/7677.js +0 -2
  210. package/dist/8274.js +0 -2
  211. package/dist/8310.js +0 -2
  212. package/dist/8642.js +0 -2
  213. package/dist/8804.js +0 -2
  214. package/dist/8928.js.LICENSE.txt +0 -3
  215. package/dist/9031.js.LICENSE.txt +0 -3
  216. package/dist/9064.js +0 -2
  217. package/dist/9064.js.LICENSE.txt +0 -3
  218. package/dist/9344.js +0 -2
  219. package/dist/9344.js.LICENSE.txt +0 -3
  220. package/dist/9673.js +0 -2
  221. package/dist/9673.js.LICENSE.txt +0 -3
  222. package/dist/9730.js +0 -2
  223. package/dist/9730.js.LICENSE.txt +0 -3
  224. package/src/components/accordion/header.tsx +0 -17
  225. package/src/components/accordion/list.tsx +0 -32
  226. package/src/components/button/hide-label.tsx +0 -31
  227. package/src/components/card/confirm.tsx +0 -19
  228. package/src/components/card/flex.tsx +0 -44
  229. package/src/components/card/selection.tsx +0 -70
  230. package/src/components/input-radio/select.tsx +0 -18
  231. package/src/components/input-text/blur.tsx +0 -14
  232. package/src/components/nav/active.tsx +0 -89
  233. package/src/components/table/badge-size.tsx +0 -51
  234. package/src/components/textarea/disabled.tsx +0 -10
  235. package/src/components/textarea/placeholder.tsx +0 -10
  236. package/src/components/textarea/readonly.tsx +0 -10
  237. /package/dist/{1016.js.LICENSE.txt → 1069.js.LICENSE.txt} +0 -0
  238. /package/dist/{1376.js.LICENSE.txt → 1085.js.LICENSE.txt} +0 -0
  239. /package/dist/{1443.js.LICENSE.txt → 1184.js.LICENSE.txt} +0 -0
  240. /package/dist/{149.js.LICENSE.txt → 1222.js.LICENSE.txt} +0 -0
  241. /package/dist/{1524.js.LICENSE.txt → 1325.js.LICENSE.txt} +0 -0
  242. /package/dist/{1531.js.LICENSE.txt → 1333.js.LICENSE.txt} +0 -0
  243. /package/dist/{1999.js.LICENSE.txt → 1661.js.LICENSE.txt} +0 -0
  244. /package/dist/{2072.js.LICENSE.txt → 1703.js.LICENSE.txt} +0 -0
  245. /package/dist/{2221.js.LICENSE.txt → 1711.js.LICENSE.txt} +0 -0
  246. /package/dist/{2252.js.LICENSE.txt → 1792.js.LICENSE.txt} +0 -0
  247. /package/dist/{2256.js.LICENSE.txt → 1793.js.LICENSE.txt} +0 -0
  248. /package/dist/{2381.js.LICENSE.txt → 1878.js.LICENSE.txt} +0 -0
  249. /package/dist/{2545.js.LICENSE.txt → 1941.js.LICENSE.txt} +0 -0
  250. /package/dist/{263.js.LICENSE.txt → 1957.js.LICENSE.txt} +0 -0
  251. /package/dist/{2639.js.LICENSE.txt → 2195.js.LICENSE.txt} +0 -0
  252. /package/dist/{2657.js.LICENSE.txt → 2305.js.LICENSE.txt} +0 -0
  253. /package/dist/{2669.js.LICENSE.txt → 2538.js.LICENSE.txt} +0 -0
  254. /package/dist/{2858.js.LICENSE.txt → 2830.js.LICENSE.txt} +0 -0
  255. /package/dist/{2879.js.LICENSE.txt → 3128.js.LICENSE.txt} +0 -0
  256. /package/dist/{3110.js.LICENSE.txt → 3180.js.LICENSE.txt} +0 -0
  257. /package/dist/{3261.js.LICENSE.txt → 3332.js.LICENSE.txt} +0 -0
  258. /package/dist/{3353.js.LICENSE.txt → 3344.js.LICENSE.txt} +0 -0
  259. /package/dist/{3833.js.LICENSE.txt → 3596.js.LICENSE.txt} +0 -0
  260. /package/dist/{3869.js.LICENSE.txt → 3714.js.LICENSE.txt} +0 -0
  261. /package/dist/{4082.js.LICENSE.txt → 3974.js.LICENSE.txt} +0 -0
  262. /package/dist/{4156.js.LICENSE.txt → 4102.js.LICENSE.txt} +0 -0
  263. /package/dist/{4177.js.LICENSE.txt → 4218.js.LICENSE.txt} +0 -0
  264. /package/dist/{4178.js.LICENSE.txt → 4404.js.LICENSE.txt} +0 -0
  265. /package/dist/{4179.js.LICENSE.txt → 4941.js.LICENSE.txt} +0 -0
  266. /package/dist/{4212.js.LICENSE.txt → 500.js.LICENSE.txt} +0 -0
  267. /package/dist/{4318.js.LICENSE.txt → 5139.js.LICENSE.txt} +0 -0
  268. /package/dist/{4346.js.LICENSE.txt → 5164.js.LICENSE.txt} +0 -0
  269. /package/dist/{4412.js.LICENSE.txt → 5484.js.LICENSE.txt} +0 -0
  270. /package/dist/{4486.js.LICENSE.txt → 5540.js.LICENSE.txt} +0 -0
  271. /package/dist/{4626.js.LICENSE.txt → 5756.js.LICENSE.txt} +0 -0
  272. /package/dist/{4702.js.LICENSE.txt → 6682.js.LICENSE.txt} +0 -0
  273. /package/dist/{5018.js.LICENSE.txt → 6781.js.LICENSE.txt} +0 -0
  274. /package/dist/{5155.js.LICENSE.txt → 7245.js.LICENSE.txt} +0 -0
  275. /package/dist/{5157.js.LICENSE.txt → 7263.js.LICENSE.txt} +0 -0
  276. /package/dist/{5233.js.LICENSE.txt → 7512.js.LICENSE.txt} +0 -0
  277. /package/dist/{5327.js.LICENSE.txt → 7856.js.LICENSE.txt} +0 -0
  278. /package/dist/{5350.js.LICENSE.txt → 8002.js.LICENSE.txt} +0 -0
  279. /package/dist/{5670.js.LICENSE.txt → 8049.js.LICENSE.txt} +0 -0
  280. /package/dist/{5716.js.LICENSE.txt → 8189.js.LICENSE.txt} +0 -0
  281. /package/dist/{605.js.LICENSE.txt → 8264.js.LICENSE.txt} +0 -0
  282. /package/dist/{6090.js.LICENSE.txt → 8389.js.LICENSE.txt} +0 -0
  283. /package/dist/{6402.js.LICENSE.txt → 8515.js.LICENSE.txt} +0 -0
  284. /package/dist/{6596.js.LICENSE.txt → 8557.js.LICENSE.txt} +0 -0
  285. /package/dist/{6636.js.LICENSE.txt → 8588.js.LICENSE.txt} +0 -0
  286. /package/dist/{6716.js.LICENSE.txt → 8724.js.LICENSE.txt} +0 -0
  287. /package/dist/{7055.js.LICENSE.txt → 882.js.LICENSE.txt} +0 -0
  288. /package/dist/{7132.js.LICENSE.txt → 895.js.LICENSE.txt} +0 -0
  289. /package/dist/{7142.js.LICENSE.txt → 8993.js.LICENSE.txt} +0 -0
  290. /package/dist/{7219.js.LICENSE.txt → 902.js.LICENSE.txt} +0 -0
  291. /package/dist/{7533.js.LICENSE.txt → 9175.js.LICENSE.txt} +0 -0
  292. /package/dist/{7677.js.LICENSE.txt → 9202.js.LICENSE.txt} +0 -0
  293. /package/dist/{8274.js.LICENSE.txt → 9558.js.LICENSE.txt} +0 -0
  294. /package/dist/{8310.js.LICENSE.txt → 9567.js.LICENSE.txt} +0 -0
  295. /package/dist/{8516.js.LICENSE.txt → 9654.js.LICENSE.txt} +0 -0
  296. /package/dist/{8642.js.LICENSE.txt → 9833.js.LICENSE.txt} +0 -0
  297. /package/dist/{8797.js.LICENSE.txt → 9961.js.LICENSE.txt} +0 -0
  298. /package/dist/{8804.js.LICENSE.txt → 9962.js.LICENSE.txt} +0 -0
@@ -1,44 +0,0 @@
1
- import React from 'react';
2
- import { KolCard } from '@public-ui/react';
3
-
4
- import { FC } from 'react';
5
-
6
- export const CardFlex: FC = () => (
7
- <div className="grid grid-cols-2 gap-4">
8
- <KolCard _heading="Titel" _hasFooter>
9
- <div slot="header">Zusätzlicher Header</div>
10
- <div slot="content">Inhalt</div>
11
- <div slot="footer">Fusszeile</div>
12
- </KolCard>
13
- <KolCard _heading="Titel" _hasFooter>
14
- <div slot="header">Zusätzlicher Header</div>
15
- <div slot="content">
16
- Inhalt
17
- <br />
18
- Inhalt
19
- </div>
20
- <div slot="footer">Fusszeile</div>
21
- </KolCard>
22
- <KolCard _heading="Titel" _hasFooter>
23
- <div slot="header">Zusätzlicher Header</div>
24
- <div slot="content">
25
- Inhalt
26
- <br />
27
- Inhalt
28
- <br />
29
- Inhalt
30
- </div>
31
- <div slot="footer">Fusszeile</div>
32
- </KolCard>
33
- <KolCard _heading="Titel" _hasFooter>
34
- <div slot="header">Zusätzlicher Header</div>
35
- <div slot="content">Inhalt</div>
36
- <div slot="footer">Fusszeile</div>
37
- </KolCard>
38
- <KolCard _heading="Titel" _hasFooter>
39
- <div slot="header">Zusätzlicher Header</div>
40
- <div slot="content">Inhalt</div>
41
- <div slot="footer">Fusszeile</div>
42
- </KolCard>
43
- </div>
44
- );
@@ -1,70 +0,0 @@
1
- import React from 'react';
2
- import { KolButton, KolCard, KolInputCheckbox } from '@public-ui/react';
3
-
4
- import { FC } from 'react';
5
-
6
- const STYLE = {
7
- display: 'flex',
8
- justifyContent: 'space-between',
9
- alignItems: 'center',
10
- gap: '.5rem',
11
- };
12
-
13
- export const CardSelection: FC = () => (
14
- <div className="flex gap-2">
15
- <KolCard _hasFooter _heading="DEBTI-25437/17-1">
16
- <div slot="header">
17
- TeCorp Endplatte
18
- <br />
19
- VZTA
20
- </div>
21
- <div slot="content">
22
- <div>
23
- <img alt="Darstellung des KoliBri-Theming" src="abgrenzung.jpg" width="100%" />
24
- </div>
25
- </div>
26
- <div slot="footer">
27
- <div style={STYLE}>
28
- <KolInputCheckbox>Auswählen</KolInputCheckbox>
29
- <KolButton _variant="primary" _label="Öffnen"></KolButton>
30
- </div>
31
- </div>
32
- </KolCard>
33
- <KolCard _hasFooter _heading="DEBTI-25437/17-1">
34
- <div slot="header">
35
- TeCorp Endplatte
36
- <br />
37
- VZTA
38
- </div>
39
- <div slot="content">
40
- <div>
41
- <img alt="Darstellung des KoliBri-Theming" src="abgrenzung.jpg" width="100%" />
42
- </div>
43
- </div>
44
- <div slot="footer">
45
- <div style={STYLE}>
46
- <KolInputCheckbox>Auswählen</KolInputCheckbox>
47
- <KolButton _variant="primary" _label="Öffnen"></KolButton>
48
- </div>
49
- </div>
50
- </KolCard>
51
- <KolCard _hasFooter _heading="DEBTI-25437/17-1">
52
- <div slot="header">
53
- TeCorp Endplatte
54
- <br />
55
- VZTA
56
- </div>
57
- <div slot="content">
58
- <div>
59
- <img alt="Darstellung des KoliBri-Theming" src="abgrenzung.jpg" width="100%" />
60
- </div>
61
- </div>
62
- <div slot="footer">
63
- <div style={STYLE}>
64
- <KolInputCheckbox>Auswählen</KolInputCheckbox>
65
- <KolButton _variant="primary" _label="Öffnen"></KolButton>
66
- </div>
67
- </div>
68
- </KolCard>
69
- </div>
70
- );
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { KolForm, KolInputRadio } from '@public-ui/react';
3
-
4
- import { FC } from 'react';
5
-
6
- import { ERROR_MSG } from '../../shares/constants';
7
-
8
- const options = [
9
- { label: 'Frau', value: 'Frau' },
10
- { disabled: true, label: 'Herr (disabled)', value: 'Herr' },
11
- { label: 'Firma', value: 'Firma' },
12
- ];
13
-
14
- export const InputRadioSelect: FC = () => (
15
- <KolForm className="grid gap-4">
16
- <KolInputRadio _error={ERROR_MSG} _options={options} _label="Anrede" />
17
- </KolForm>
18
- );
@@ -1,14 +0,0 @@
1
- import { KolForm, KolInputText } from '@public-ui/react';
2
- import React, { FC } from 'react';
3
-
4
- export const InputTextBlur: FC = () => (
5
- <KolForm>
6
- <KolInputText
7
- _on={{
8
- onBlur: console.log,
9
- }}
10
- _type="search"
11
- _label="Suche"
12
- />
13
- </KolForm>
14
- );
@@ -1,89 +0,0 @@
1
- import React from 'react';
2
- import { KolNav } from '@public-ui/react';
3
-
4
- import { FC, useEffect, useState } from 'react';
5
- import { ButtonOrLinkOrTextWithChildrenProps } from '@public-ui/components';
6
-
7
- export const NavActive: FC = () => {
8
- const [links, setLinks] = useState<ButtonOrLinkOrTextWithChildrenProps[]>([]);
9
-
10
- const handleLinks = (route: string) => {
11
- const link = links.find((link) => link._label === route);
12
- if (!link) return;
13
- link._active = !link._active;
14
- setLinks(links);
15
- };
16
-
17
- useEffect(() => {
18
- setLinks([
19
- {
20
- _label: 'Main',
21
- _icons: 'codicon codicon-home',
22
- _on: {
23
- onClick: () => handleLinks('Main'),
24
- },
25
- },
26
- {
27
- _label: 'Abbr',
28
- _on: {
29
- onClick: () => handleLinks('Abbr'),
30
- },
31
- },
32
- {
33
- _label: 'Accordion',
34
- _on: {
35
- onClick: () => handleLinks('Accordion'),
36
- },
37
- },
38
- {
39
- _active: true,
40
- _label: 'Alert',
41
- _on: {
42
- onClick: () => handleLinks('Alert'),
43
- },
44
- _children: [
45
- {
46
- _label: 'Main',
47
- _icons: 'codicon codicon-home',
48
- _on: {
49
- onClick: () => handleLinks('/'),
50
- },
51
- },
52
- {
53
- _active: true,
54
- _label: 'Abbr',
55
- _href: '#/back-page',
56
- _on: {
57
- onClick: () => handleLinks('/abbr'),
58
- },
59
- },
60
- {
61
- _label: 'Accordion',
62
- _href: '#/back-page',
63
- _on: {
64
- onClick: () => handleLinks('/accordion'),
65
- },
66
- },
67
- {
68
- _label: 'Alert',
69
- _href: '#/back-page',
70
- },
71
- {
72
- _label: 'Badget',
73
- _on: {
74
- onClick: () => handleLinks('/badget'),
75
- },
76
- },
77
- ],
78
- },
79
- {
80
- _label: 'Badget',
81
- _on: {
82
- onClick: () => handleLinks('Badget'),
83
- },
84
- },
85
- ]);
86
- }, []);
87
-
88
- return <KolNav _ariaLabel="Main navigation" _links={links} />;
89
- };
@@ -1,51 +0,0 @@
1
- import React, { FC } from 'react';
2
-
3
- import { KolBadge, KolTable } from '@public-ui/react';
4
-
5
- import { getRoot } from '../../shares/react-roots';
6
- import { KoliBriTableHeaders } from '@public-ui/components';
7
- import { DATA, Data } from './test-data';
8
-
9
- const DATE_FORMATTER = Intl.DateTimeFormat('de-DE', {
10
- day: '2-digit',
11
- month: '2-digit',
12
- year: 'numeric',
13
- });
14
-
15
- const HEADERS: KoliBriTableHeaders = {
16
- horizontal: [
17
- [
18
- { label: 'order', key: 'order', textAlign: 'center' },
19
- {
20
- label: 'date',
21
- key: 'date',
22
- textAlign: 'center',
23
- render: (_el, _cell, tupel) => DATE_FORMATTER.format((tupel as Data).date),
24
- sort: (data: Data[]) =>
25
- data.sort((data0, data1) => {
26
- if (data0.date < data1.date) return -1;
27
- else if (data1.date < data0.date) return 1;
28
- else return 0;
29
- }),
30
- },
31
- {
32
- label: 'Aktion',
33
- key: 'order',
34
- render: (el, cell, tupel) => {
35
- getRoot(el).render(
36
- <KolBadge
37
- style={{
38
- backgroundColor: 'red',
39
- width: '80%',
40
- }}
41
- _icons="codicon codicon-location"
42
- _label={'Speichern'}
43
- />,
44
- );
45
- },
46
- },
47
- ],
48
- ],
49
- };
50
-
51
- export const TableBadgeSize: FC = () => <KolTable _caption="Sort a date column" _data={DATA} _headers={HEADERS} className="block" />;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { KolForm, KolTextarea } from '@public-ui/react';
3
-
4
- import { FC } from 'react';
5
-
6
- export const TextareaDisabled: FC = () => (
7
- <KolForm>
8
- <KolTextarea _disabled _error="Es ist ein Fehler aufgetreten." _value="Kleiner Text im Eingabefeld ..." _label="Texteingabe" />
9
- </KolForm>
10
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { KolForm, KolTextarea } from '@public-ui/react';
3
-
4
- import { FC } from 'react';
5
-
6
- export const TextareaPlaceholder: FC = () => (
7
- <KolForm>
8
- <KolTextarea _placeholder="Hier steht ein Platzhaltertext" _label="Texteingabe" />
9
- </KolForm>
10
- );
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { KolForm, KolTextarea } from '@public-ui/react';
3
-
4
- import { FC } from 'react';
5
-
6
- export const TextareaReadOnly: FC = () => (
7
- <KolForm>
8
- <KolTextarea _error="Es ist ein Fehler aufgetreten." _readOnly _value="Kleiner Text im Eingabefeld ..." _label="Texteingabe" />
9
- </KolForm>
10
- );