@public-ui/sample-react 1.7.0-rc.10

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 (342) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.js +27 -0
  3. package/.gitignore +35 -0
  4. package/.prettierignore +4 -0
  5. package/package.json +64 -0
  6. package/prettier.config.js +5 -0
  7. package/public/.htaccess +3 -0
  8. package/public/assets/bundes/LICENSE.md +1 -0
  9. package/public/assets/bundes/sans/BundesSans-Web-Black.ttf +0 -0
  10. package/public/assets/bundes/sans/BundesSans-Web-Black.woff +0 -0
  11. package/public/assets/bundes/sans/BundesSans-Web-Black.woff2 +0 -0
  12. package/public/assets/bundes/sans/BundesSans-Web-BlackItalic.ttf +0 -0
  13. package/public/assets/bundes/sans/BundesSans-Web-BlackItalic.woff +0 -0
  14. package/public/assets/bundes/sans/BundesSans-Web-BlackItalic.woff2 +0 -0
  15. package/public/assets/bundes/sans/BundesSans-Web-Bold.ttf +0 -0
  16. package/public/assets/bundes/sans/BundesSans-Web-Bold.woff +0 -0
  17. package/public/assets/bundes/sans/BundesSans-Web-Bold.woff2 +0 -0
  18. package/public/assets/bundes/sans/BundesSans-Web-BoldItalic.ttf +0 -0
  19. package/public/assets/bundes/sans/BundesSans-Web-BoldItalic.woff +0 -0
  20. package/public/assets/bundes/sans/BundesSans-Web-BoldItalic.woff2 +0 -0
  21. package/public/assets/bundes/sans/BundesSans-Web-Light.ttf +0 -0
  22. package/public/assets/bundes/sans/BundesSans-Web-Light.woff +0 -0
  23. package/public/assets/bundes/sans/BundesSans-Web-Light.woff2 +0 -0
  24. package/public/assets/bundes/sans/BundesSans-Web-LightItalic.ttf +0 -0
  25. package/public/assets/bundes/sans/BundesSans-Web-LightItalic.woff +0 -0
  26. package/public/assets/bundes/sans/BundesSans-Web-LightItalic.woff2 +0 -0
  27. package/public/assets/bundes/sans/BundesSans-Web-Medium.ttf +0 -0
  28. package/public/assets/bundes/sans/BundesSans-Web-Medium.woff +0 -0
  29. package/public/assets/bundes/sans/BundesSans-Web-Medium.woff2 +0 -0
  30. package/public/assets/bundes/sans/BundesSans-Web-MediumItalic.ttf +0 -0
  31. package/public/assets/bundes/sans/BundesSans-Web-MediumItalic.woff +0 -0
  32. package/public/assets/bundes/sans/BundesSans-Web-MediumItalic.woff2 +0 -0
  33. package/public/assets/bundes/sans/BundesSans-Web-Regular.ttf +0 -0
  34. package/public/assets/bundes/sans/BundesSans-Web-Regular.woff +0 -0
  35. package/public/assets/bundes/sans/BundesSans-Web-Regular.woff2 +0 -0
  36. package/public/assets/bundes/sans/BundesSans-Web-RegularItalic.ttf +0 -0
  37. package/public/assets/bundes/sans/BundesSans-Web-RegularItalic.woff +0 -0
  38. package/public/assets/bundes/sans/BundesSans-Web-RegularItalic.woff2 +0 -0
  39. package/public/assets/bundes/sans-cond/BundesSansCond-Web-Regular.ttf +0 -0
  40. package/public/assets/bundes/sans-cond/BundesSansCond-Web-Regular.woff +0 -0
  41. package/public/assets/bundes/sans-cond/BundesSansCond-Web-Regular.woff2 +0 -0
  42. package/public/assets/bundes/serif/BundesSerif-Web-Bold.ttf +0 -0
  43. package/public/assets/bundes/serif/BundesSerif-Web-Bold.woff +0 -0
  44. package/public/assets/bundes/serif/BundesSerif-Web-Bold.woff2 +0 -0
  45. package/public/assets/bundes/serif/BundesSerif-Web-BoldItalic.ttf +0 -0
  46. package/public/assets/bundes/serif/BundesSerif-Web-BoldItalic.woff +0 -0
  47. package/public/assets/bundes/serif/BundesSerif-Web-BoldItalic.woff2 +0 -0
  48. package/public/assets/bundes/serif/BundesSerif-Web-Italic.ttf +0 -0
  49. package/public/assets/bundes/serif/BundesSerif-Web-Italic.woff +0 -0
  50. package/public/assets/bundes/serif/BundesSerif-Web-Italic.woff2 +0 -0
  51. package/public/assets/bundes/serif/BundesSerif-Web-Regular.ttf +0 -0
  52. package/public/assets/bundes/serif/BundesSerif-Web-Regular.woff +0 -0
  53. package/public/assets/bundes/serif/BundesSerif-Web-Regular.woff2 +0 -0
  54. package/public/assets/bundes/style.css +84 -0
  55. package/public/assets/codicons/LICENSE +395 -0
  56. package/public/assets/codicons/LICENSE-CODE +21 -0
  57. package/public/assets/codicons/codicon.css +582 -0
  58. package/public/assets/codicons/codicon.csv +426 -0
  59. package/public/assets/codicons/codicon.html +3911 -0
  60. package/public/assets/codicons/codicon.svg +1 -0
  61. package/public/assets/codicons/codicon.ttf +0 -0
  62. package/public/assets/fontawesome-free/LICENSE.txt +165 -0
  63. package/public/assets/fontawesome-free/css/all.css +7831 -0
  64. package/public/assets/fontawesome-free/css/all.min.css +6 -0
  65. package/public/assets/fontawesome-free/css/brands.css +1432 -0
  66. package/public/assets/fontawesome-free/css/brands.min.css +6 -0
  67. package/public/assets/fontawesome-free/css/fontawesome.css +6338 -0
  68. package/public/assets/fontawesome-free/css/fontawesome.min.css +6 -0
  69. package/public/assets/fontawesome-free/css/regular.css +19 -0
  70. package/public/assets/fontawesome-free/css/regular.min.css +6 -0
  71. package/public/assets/fontawesome-free/css/solid.css +19 -0
  72. package/public/assets/fontawesome-free/css/solid.min.css +6 -0
  73. package/public/assets/fontawesome-free/css/svg-with-js.css +634 -0
  74. package/public/assets/fontawesome-free/css/svg-with-js.min.css +6 -0
  75. package/public/assets/fontawesome-free/css/v4-font-face.css +26 -0
  76. package/public/assets/fontawesome-free/css/v4-font-face.min.css +6 -0
  77. package/public/assets/fontawesome-free/css/v4-shims.css +2146 -0
  78. package/public/assets/fontawesome-free/css/v4-shims.min.css +6 -0
  79. package/public/assets/fontawesome-free/css/v5-font-face.css +22 -0
  80. package/public/assets/fontawesome-free/css/v5-font-face.min.css +6 -0
  81. package/public/assets/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
  82. package/public/assets/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
  83. package/public/assets/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
  84. package/public/assets/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
  85. package/public/assets/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
  86. package/public/assets/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
  87. package/public/assets/fontawesome-free/webfonts/fa-v4compatibility.ttf +0 -0
  88. package/public/assets/fontawesome-free/webfonts/fa-v4compatibility.woff2 +0 -0
  89. package/public/assets/icofont/demo.html +18939 -0
  90. package/public/assets/icofont/fonts/icofont.eot +0 -0
  91. package/public/assets/icofont/fonts/icofont.svg +2105 -0
  92. package/public/assets/icofont/fonts/icofont.ttf +0 -0
  93. package/public/assets/icofont/fonts/icofont.woff +0 -0
  94. package/public/assets/icofont/fonts/icofont.woff2 +0 -0
  95. package/public/assets/icofont/icofont.css +10757 -0
  96. package/public/assets/icofont/icofont.min.css +7 -0
  97. package/public/assets/kolibri.ico +0 -0
  98. package/public/assets/kreon/Kreon-VariableFont_wght.ttf +0 -0
  99. package/public/assets/kreon/OFL.txt +93 -0
  100. package/public/assets/kreon/README.txt +67 -0
  101. package/public/assets/kreon/static/Kreon-Bold.ttf +0 -0
  102. package/public/assets/kreon/static/Kreon-Light.ttf +0 -0
  103. package/public/assets/kreon/static/Kreon-Medium.ttf +0 -0
  104. package/public/assets/kreon/static/Kreon-Regular.ttf +0 -0
  105. package/public/assets/kreon/static/Kreon-SemiBold.ttf +0 -0
  106. package/public/assets/kreon/style.css +41 -0
  107. package/public/assets/material-icons/LICENSE +202 -0
  108. package/public/assets/material-icons/README.md +129 -0
  109. package/public/assets/material-icons/_data/versions.json +2124 -0
  110. package/public/assets/material-icons/css/_codepoints.scss +2279 -0
  111. package/public/assets/material-icons/css/_mixins.scss +13 -0
  112. package/public/assets/material-icons/css/_variables.scss +6 -0
  113. package/public/assets/material-icons/css/material-icons.css +9208 -0
  114. package/public/assets/material-icons/css/material-icons.min.css +1 -0
  115. package/public/assets/material-icons/css/material-icons.scss +39 -0
  116. package/public/assets/material-icons/iconfont/_mixins.scss +55 -0
  117. package/public/assets/material-icons/iconfont/_variables.scss +3 -0
  118. package/public/assets/material-icons/iconfont/filled.css +24 -0
  119. package/public/assets/material-icons/iconfont/filled.scss +4 -0
  120. package/public/assets/material-icons/iconfont/material-icons-outlined.woff +0 -0
  121. package/public/assets/material-icons/iconfont/material-icons-outlined.woff2 +0 -0
  122. package/public/assets/material-icons/iconfont/material-icons-round.woff +0 -0
  123. package/public/assets/material-icons/iconfont/material-icons-round.woff2 +0 -0
  124. package/public/assets/material-icons/iconfont/material-icons-sharp.woff +0 -0
  125. package/public/assets/material-icons/iconfont/material-icons-sharp.woff2 +0 -0
  126. package/public/assets/material-icons/iconfont/material-icons-two-tone.woff +0 -0
  127. package/public/assets/material-icons/iconfont/material-icons-two-tone.woff2 +0 -0
  128. package/public/assets/material-icons/iconfont/material-icons.css +124 -0
  129. package/public/assets/material-icons/iconfont/material-icons.scss +5 -0
  130. package/public/assets/material-icons/iconfont/material-icons.woff +0 -0
  131. package/public/assets/material-icons/iconfont/material-icons.woff2 +0 -0
  132. package/public/assets/material-icons/iconfont/outlined.css +24 -0
  133. package/public/assets/material-icons/iconfont/outlined.scss +4 -0
  134. package/public/assets/material-icons/iconfont/round.css +24 -0
  135. package/public/assets/material-icons/iconfont/round.scss +4 -0
  136. package/public/assets/material-icons/iconfont/sharp.css +24 -0
  137. package/public/assets/material-icons/iconfont/sharp.scss +4 -0
  138. package/public/assets/material-icons/iconfont/two-tone.css +24 -0
  139. package/public/assets/material-icons/iconfont/two-tone.scss +4 -0
  140. package/public/assets/material-icons/index.d.ts +2128 -0
  141. package/public/assets/material-icons/package.json +52 -0
  142. package/public/assets/material-symbols/LICENSE +202 -0
  143. package/public/assets/material-symbols/README.md +114 -0
  144. package/public/assets/material-symbols/_core.scss +47 -0
  145. package/public/assets/material-symbols/index.css +74 -0
  146. package/public/assets/material-symbols/index.d.ts +2809 -0
  147. package/public/assets/material-symbols/index.scss +3 -0
  148. package/public/assets/material-symbols/material-symbols-outlined.woff2 +0 -0
  149. package/public/assets/material-symbols/material-symbols-rounded.woff2 +0 -0
  150. package/public/assets/material-symbols/material-symbols-sharp.woff2 +0 -0
  151. package/public/assets/material-symbols/outlined.css +24 -0
  152. package/public/assets/material-symbols/outlined.scss +3 -0
  153. package/public/assets/material-symbols/package.json +41 -0
  154. package/public/assets/material-symbols/rounded.css +24 -0
  155. package/public/assets/material-symbols/rounded.scss +3 -0
  156. package/public/assets/material-symbols/sharp.css +24 -0
  157. package/public/assets/material-symbols/sharp.scss +3 -0
  158. package/public/assets/noto-sans/fonts/NotoSans-Black.ttf +0 -0
  159. package/public/assets/noto-sans/fonts/NotoSans-BlackItalic.ttf +0 -0
  160. package/public/assets/noto-sans/fonts/NotoSans-Bold.ttf +0 -0
  161. package/public/assets/noto-sans/fonts/NotoSans-BoldItalic.ttf +0 -0
  162. package/public/assets/noto-sans/fonts/NotoSans-ExtraBold.ttf +0 -0
  163. package/public/assets/noto-sans/fonts/NotoSans-ExtraBoldItalic.ttf +0 -0
  164. package/public/assets/noto-sans/fonts/NotoSans-ExtraLight.ttf +0 -0
  165. package/public/assets/noto-sans/fonts/NotoSans-ExtraLightItalic.ttf +0 -0
  166. package/public/assets/noto-sans/fonts/NotoSans-Italic.ttf +0 -0
  167. package/public/assets/noto-sans/fonts/NotoSans-Light.ttf +0 -0
  168. package/public/assets/noto-sans/fonts/NotoSans-LightItalic.ttf +0 -0
  169. package/public/assets/noto-sans/fonts/NotoSans-Medium.ttf +0 -0
  170. package/public/assets/noto-sans/fonts/NotoSans-MediumItalic.ttf +0 -0
  171. package/public/assets/noto-sans/fonts/NotoSans-Regular.ttf +0 -0
  172. package/public/assets/noto-sans/fonts/NotoSans-SemiBold.ttf +0 -0
  173. package/public/assets/noto-sans/fonts/NotoSans-SemiBoldItalic.ttf +0 -0
  174. package/public/assets/noto-sans/fonts/NotoSans-Thin.ttf +0 -0
  175. package/public/assets/noto-sans/fonts/NotoSans-ThinItalic.ttf +0 -0
  176. package/public/assets/noto-sans/fonts/OFL.txt +93 -0
  177. package/public/assets/noto-sans/noto-sans.css +11 -0
  178. package/public/assets/roboto/LICENSE.txt +202 -0
  179. package/public/assets/roboto/Roboto-Black.ttf +0 -0
  180. package/public/assets/roboto/Roboto-BlackItalic.ttf +0 -0
  181. package/public/assets/roboto/Roboto-Bold.ttf +0 -0
  182. package/public/assets/roboto/Roboto-BoldItalic.ttf +0 -0
  183. package/public/assets/roboto/Roboto-Italic.ttf +0 -0
  184. package/public/assets/roboto/Roboto-Light.ttf +0 -0
  185. package/public/assets/roboto/Roboto-LightItalic.ttf +0 -0
  186. package/public/assets/roboto/Roboto-Medium.ttf +0 -0
  187. package/public/assets/roboto/Roboto-MediumItalic.ttf +0 -0
  188. package/public/assets/roboto/Roboto-Regular.ttf +0 -0
  189. package/public/assets/roboto/Roboto-Thin.ttf +0 -0
  190. package/public/assets/roboto/Roboto-ThinItalic.ttf +0 -0
  191. package/public/assets/roboto/roboto.css +27 -0
  192. package/public/assets/tabler-icons/fonts/tabler-icons.eot +0 -0
  193. package/public/assets/tabler-icons/fonts/tabler-icons.ttf +0 -0
  194. package/public/assets/tabler-icons/fonts/tabler-icons.woff +0 -0
  195. package/public/assets/tabler-icons/fonts/tabler-icons.woff2 +0 -0
  196. package/public/assets/tabler-icons/tabler-icons.css +16056 -0
  197. package/public/assets/tabler-icons/tabler-icons.html +36226 -0
  198. package/public/assets/tabler-icons/tabler-icons.min.css +4 -0
  199. package/public/assets/tabler-icons/tabler-icons.png +0 -0
  200. package/public/assets/tabler-icons/tabler-icons.scss +8058 -0
  201. package/public/index.html +28 -0
  202. package/public/robots.txt +2 -0
  203. package/src/App.tsx +131 -0
  204. package/src/components/Sidebar.tsx +95 -0
  205. package/src/components/abbr/basic.html +6 -0
  206. package/src/components/abbr/basic.tsx +39 -0
  207. package/src/components/abbr/routes.ts +9 -0
  208. package/src/components/accordion/basic.tsx +18 -0
  209. package/src/components/accordion/header.tsx +17 -0
  210. package/src/components/accordion/headlines.tsx +27 -0
  211. package/src/components/accordion/list.tsx +32 -0
  212. package/src/components/accordion/routes.ts +17 -0
  213. package/src/components/alert/basic.tsx +37 -0
  214. package/src/components/alert/card-msg.tsx +11 -0
  215. package/src/components/alert/html.tsx +29 -0
  216. package/src/components/alert/routes.ts +15 -0
  217. package/src/components/avatar/basic.tsx +10 -0
  218. package/src/components/avatar/routes.ts +8 -0
  219. package/src/components/badge/basic.tsx +18 -0
  220. package/src/components/badge/button.tsx +25 -0
  221. package/src/components/badge/routes.ts +12 -0
  222. package/src/components/breadcrumb/basic.tsx +53 -0
  223. package/src/components/breadcrumb/routes.ts +9 -0
  224. package/src/components/button/basic.tsx +29 -0
  225. package/src/components/button/hide-label.tsx +31 -0
  226. package/src/components/button/icons.tsx +27 -0
  227. package/src/components/button/routes.ts +18 -0
  228. package/src/components/button/width.tsx +30 -0
  229. package/src/components/button-group/basic.tsx +13 -0
  230. package/src/components/button-group/routes.ts +9 -0
  231. package/src/components/button-link/basic.tsx +23 -0
  232. package/src/components/button-link/icons.tsx +37 -0
  233. package/src/components/button-link/image.tsx +14 -0
  234. package/src/components/button-link/routes.ts +18 -0
  235. package/src/components/button-link/target.tsx +16 -0
  236. package/src/components/card/basic.tsx +12 -0
  237. package/src/components/card/confirm.tsx +19 -0
  238. package/src/components/card/flex.tsx +44 -0
  239. package/src/components/card/routes.ts +18 -0
  240. package/src/components/card/selection.tsx +70 -0
  241. package/src/components/details/basic.tsx +19 -0
  242. package/src/components/details/routes.ts +9 -0
  243. package/src/components/form/routes.ts +5 -0
  244. package/src/components/handout/basic.tsx +1013 -0
  245. package/src/components/handout/routes.ts +9 -0
  246. package/src/components/heading/badged.tsx +27 -0
  247. package/src/components/heading/basic.tsx +15 -0
  248. package/src/components/heading/paragraph.tsx +45 -0
  249. package/src/components/heading/routes.ts +15 -0
  250. package/src/components/icon/basic.tsx +17 -0
  251. package/src/components/icon/routes.ts +9 -0
  252. package/src/components/indented-text/basic.tsx +24 -0
  253. package/src/components/indented-text/routes.ts +9 -0
  254. package/src/components/input-checkbox/basic.tsx +37 -0
  255. package/src/components/input-checkbox/routes.ts +9 -0
  256. package/src/components/input-color/basic.tsx +29 -0
  257. package/src/components/input-color/routes.ts +9 -0
  258. package/src/components/input-date/basic.tsx +20 -0
  259. package/src/components/input-date/routes.ts +9 -0
  260. package/src/components/input-email/basic.tsx +30 -0
  261. package/src/components/input-email/routes.ts +9 -0
  262. package/src/components/input-file/basic.tsx +25 -0
  263. package/src/components/input-file/routes.ts +9 -0
  264. package/src/components/input-number/basic.tsx +30 -0
  265. package/src/components/input-number/routes.ts +9 -0
  266. package/src/components/input-password/basic.tsx +28 -0
  267. package/src/components/input-password/routes.ts +11 -0
  268. package/src/components/input-password/show-password.tsx +38 -0
  269. package/src/components/input-radio/basic.tsx +46 -0
  270. package/src/components/input-radio/horizontal.tsx +42 -0
  271. package/src/components/input-radio/routes.ts +14 -0
  272. package/src/components/input-radio/select.tsx +18 -0
  273. package/src/components/input-range/basic.tsx +29 -0
  274. package/src/components/input-range/routes.ts +9 -0
  275. package/src/components/input-text/basic.tsx +72 -0
  276. package/src/components/input-text/blur.tsx +16 -0
  277. package/src/components/input-text/focus.tsx +24 -0
  278. package/src/components/input-text/hidden-label.tsx +66 -0
  279. package/src/components/input-text/routes.ts +16 -0
  280. package/src/components/link/basic.tsx +23 -0
  281. package/src/components/link/icons.tsx +37 -0
  282. package/src/components/link/image.tsx +20 -0
  283. package/src/components/link/routes.ts +18 -0
  284. package/src/components/link/target.tsx +15 -0
  285. package/src/components/link-button/basic.tsx +22 -0
  286. package/src/components/link-button/routes.ts +9 -0
  287. package/src/components/link-group/routes.ts +5 -0
  288. package/src/components/nav/active.tsx +88 -0
  289. package/src/components/nav/aria-current.tsx +22 -0
  290. package/src/components/nav/basic.tsx +62 -0
  291. package/src/components/nav/horizontal.tsx +59 -0
  292. package/src/components/nav/routes.ts +18 -0
  293. package/src/components/pagination/basic.tsx +12 -0
  294. package/src/components/pagination/routes.ts +9 -0
  295. package/src/components/popover/basic.tsx +36 -0
  296. package/src/components/popover/routes.ts +8 -0
  297. package/src/components/progress/basic.tsx +11 -0
  298. package/src/components/progress/routes.ts +9 -0
  299. package/src/components/select/basic.tsx +51 -0
  300. package/src/components/select/routes.ts +9 -0
  301. package/src/components/skip-nav/basic.tsx +33 -0
  302. package/src/components/skip-nav/routes.ts +9 -0
  303. package/src/components/spin/basic.tsx +6 -0
  304. package/src/components/spin/custom.css +52 -0
  305. package/src/components/spin/custom.tsx +11 -0
  306. package/src/components/spin/cycle.tsx +6 -0
  307. package/src/components/spin/routes.ts +13 -0
  308. package/src/components/split-button/basic.tsx +46 -0
  309. package/src/components/split-button/routes.ts +8 -0
  310. package/src/components/table/badge-size.tsx +51 -0
  311. package/src/components/table/render-cell.tsx +48 -0
  312. package/src/components/table/routes.ts +15 -0
  313. package/src/components/table/sort-date.tsx +33 -0
  314. package/src/components/table/test-data.ts +66 -0
  315. package/src/components/textarea/adjust-height.tsx +22 -0
  316. package/src/components/textarea/basic.tsx +11 -0
  317. package/src/components/textarea/disabled.tsx +10 -0
  318. package/src/components/textarea/placeholder.tsx +10 -0
  319. package/src/components/textarea/readonly.tsx +10 -0
  320. package/src/components/textarea/resize.tsx +13 -0
  321. package/src/components/textarea/routes.ts +27 -0
  322. package/src/components/textarea/rows.tsx +10 -0
  323. package/src/components/toast/basic.tsx +21 -0
  324. package/src/components/toast/routes.ts +8 -0
  325. package/src/components/version/basic.tsx +6 -0
  326. package/src/components/version/context.tsx +12 -0
  327. package/src/components/version/routes.ts +12 -0
  328. package/src/declare.d.ts +4 -0
  329. package/src/hooks/useMobile.ts +21 -0
  330. package/src/main.ts +7 -0
  331. package/src/react.main.tsx +56 -0
  332. package/src/shares/constants.ts +2 -0
  333. package/src/shares/react-roots.ts +10 -0
  334. package/src/shares/routes.ts +87 -0
  335. package/src/shares/store.ts +85 -0
  336. package/src/shares/theme.ts +103 -0
  337. package/src/shares/types.ts +4 -0
  338. package/src/style.scss +43 -0
  339. package/test-build.sh +2 -0
  340. package/tsconfig.json +32 -0
  341. package/unocss.config.ts +7 -0
  342. package/webpack.config.js +14 -0
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { KolButton, KolToast } from '@public-ui/react';
3
+ import { ToasterService } from '@public-ui/components';
4
+
5
+ const toaster = ToasterService.getInstance(document);
6
+
7
+ import { FC } from 'react';
8
+
9
+ const handleButtonClick = () => {
10
+ void toaster.enqueue({
11
+ description: `Toasty`,
12
+ label: `Initial Toast`,
13
+ type: 'warning',
14
+ });
15
+ };
16
+
17
+ export const ToastBasic: FC = () => (
18
+ <div>
19
+ <KolButton _label="Show toast" _on={{ onClick: handleButtonClick }}></KolButton>
20
+ </div>
21
+ );
@@ -0,0 +1,8 @@
1
+ import { Routes } from '../../shares/types';
2
+ import { ToastBasic } from './basic';
3
+
4
+ export const TOAST_ROUTES: Routes = {
5
+ toast: {
6
+ basic: ToastBasic,
7
+ },
8
+ };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { KolVersion } from '@public-ui/react';
3
+
4
+ import { FC } from 'react';
5
+
6
+ export const VersionBasic: FC = () => <KolVersion _version="1.1.1" />;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { KolVersion } from '@public-ui/react';
3
+
4
+ import { FC } from 'react';
5
+
6
+ export const VersionContext: FC = () => (
7
+ <p>
8
+ <KolVersion _version="1.0.0" /> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna
9
+ aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
10
+ ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor.
11
+ </p>
12
+ );
@@ -0,0 +1,12 @@
1
+ import { Routes } from '../../shares/types';
2
+
3
+ import { VersionBasic } from './basic';
4
+
5
+ import { VersionContext } from './context';
6
+
7
+ export const VERSION_ROUTES: Routes = {
8
+ version: {
9
+ basic: VersionBasic,
10
+ context: VersionContext,
11
+ },
12
+ };
@@ -0,0 +1,4 @@
1
+ declare module '*.jpeg';
2
+ declare module '*.jpg';
3
+ declare module '*.png';
4
+ declare module '*.gif';
@@ -0,0 +1,21 @@
1
+ import { useEffect, useState } from 'react';
2
+
3
+ export function useMobile(): boolean {
4
+ const mediaQuery = matchMedia('(max-width: 1023px)');
5
+ const [matches, setMatches] = useState<boolean>(mediaQuery.matches);
6
+
7
+ const handleChange = () => {
8
+ setMatches(mediaQuery.matches);
9
+ };
10
+
11
+ useEffect(() => {
12
+ handleChange(); // handle initial value
13
+ mediaQuery.addEventListener('change', handleChange);
14
+
15
+ return () => {
16
+ mediaQuery.removeEventListener('change', handleChange);
17
+ };
18
+ }, [mediaQuery]);
19
+
20
+ return matches;
21
+ }
package/src/main.ts ADDED
@@ -0,0 +1,7 @@
1
+ import 'uno.css'; // https://github.com/antfu/unocss
2
+
3
+ // App style
4
+ import './style.scss';
5
+
6
+ // App
7
+ import './react.main';
@@ -0,0 +1,56 @@
1
+ import React, { StrictMode } from 'react';
2
+ import { createRoot } from 'react-dom/client';
3
+ import { HashRouter as Router } from 'react-router-dom';
4
+
5
+ import { defineCustomElements } from '@public-ui/components/dist/loader';
6
+ import type { Generic } from '@a11y-ui/core';
7
+ import { register } from '@public-ui/components';
8
+ import { BAMF, BMF, BZSt, DEFAULT, DESYv1, DESYv2, ECL_EC, ECL_EU, ITZBund, MAPZ, ZOLLv2 } from '@public-ui/themes';
9
+ import { TH } from '@public-oss/kolibri-themes';
10
+ import { App } from './App';
11
+
12
+ type Theme = Generic.Theming.RegisterPatch<string, string, string>;
13
+
14
+ void (async () => {
15
+ if (process.env.THEME_MODULE) {
16
+ /* Visual regression testing mode: Themes are overridden with a certain theme module, that should be used instead. */
17
+ const { [(process.env.THEME_EXPORT as string) ?? 'default']: theme } = (await import(process.env.THEME_MODULE)) as Record<string, Theme>;
18
+ try {
19
+ await register([theme], defineCustomElements);
20
+ } catch (error) {
21
+ console.warn('Theme registration failed:', error);
22
+ }
23
+ } else {
24
+ /* Regular mode: Register all known themes. */
25
+ try {
26
+ await register([BAMF, BMF, DEFAULT, BZSt, DESYv1, DESYv2, ECL_EC, ECL_EU, ITZBund, MAPZ, ZOLLv2, TH], defineCustomElements, {
27
+ theme: {
28
+ detect: 'auto',
29
+ },
30
+ });
31
+ } catch (error) {
32
+ console.warn('Theme registration failed:', error);
33
+ }
34
+ }
35
+
36
+ /**
37
+ * You should patch the theme after the components and your default theme are registered.
38
+ *
39
+ * ↓ That is a tiny sample!
40
+ */
41
+ // KoliBriDevHelper.patchTheme('my-theme', {
42
+ // 'KOL-BUTTON': 'button{border:2px solid red;}',
43
+ // });
44
+
45
+ const htmlDivElement = document.querySelector('div#app');
46
+ if (htmlDivElement instanceof HTMLDivElement) {
47
+ const root = createRoot(htmlDivElement);
48
+ root.render(
49
+ <StrictMode>
50
+ <Router>
51
+ <App />
52
+ </Router>
53
+ </StrictMode>,
54
+ );
55
+ }
56
+ })();
@@ -0,0 +1,2 @@
1
+ export const ERROR_MSG = 'Ich bin eine Fehlermeldung!';
2
+ export const HINT_MSG = 'Ich bin ein Hinweis.';
@@ -0,0 +1,10 @@
1
+ import { createRoot, Root } from 'react-dom/client';
2
+
3
+ const REACT18_ROOTS = new WeakMap<Element | DocumentFragment, Root>();
4
+
5
+ export const getRoot = (el: Element | DocumentFragment): Root => {
6
+ if (REACT18_ROOTS.has(el) === false) {
7
+ REACT18_ROOTS.set(el, createRoot(el));
8
+ }
9
+ return REACT18_ROOTS.get(el) as Root;
10
+ };
@@ -0,0 +1,87 @@
1
+ import { ABBR_ROUTES } from '../components/abbr/routes';
2
+ import { ACCORDION_ROUTES } from '../components/accordion/routes';
3
+ import { ALERT_ROUTES } from '../components/alert/routes';
4
+ import { AVATAR_ROUTES } from '../components/avatar/routes';
5
+ import { BADGE_ROUTES } from '../components/badge/routes';
6
+ import { BREADCRUMB_ROUTES } from '../components/breadcrumb/routes';
7
+ import { BUTTON_GROUP_ROUTES } from '../components/button-group/routes';
8
+ import { BUTTON_LINK_ROUTES } from '../components/button-link/routes';
9
+ import { BUTTON_ROUTES } from '../components/button/routes';
10
+ import { CARD_ROUTES } from '../components/card/routes';
11
+ import { DETAILS_ROUTES } from '../components/details/routes';
12
+ import { FORM_ROUTES } from '../components/form/routes';
13
+ import { HANDOUT_ROUTES } from '../components/handout/routes';
14
+ import { HEADING_ROUTES } from '../components/heading/routes';
15
+ import { ICON_ROUTES } from '../components/icon/routes';
16
+ import { INDENTED_ROUTES } from '../components/indented-text/routes';
17
+ import { INPUT_CHECKBOX_ROUTES } from '../components/input-checkbox/routes';
18
+ import { INPUT_COLOR_ROUTES } from '../components/input-color/routes';
19
+ import { INPUT_DATE_ROUTES } from '../components/input-date/routes';
20
+ import { INPUT_EMAIL_ROUTES } from '../components/input-email/routes';
21
+ import { INPUT_FILE_ROUTES } from '../components/input-file/routes';
22
+ import { INPUT_NUMBER_ROUTES } from '../components/input-number/routes';
23
+ import { INPUT_PASSWORD_ROUTES } from '../components/input-password/routes';
24
+ import { INPUT_RADIO_ROUTES } from '../components/input-radio/routes';
25
+ import { INPUT_RANGE_ROUTES } from '../components/input-range/routes';
26
+ import { INPUT_TEXT_ROUTES } from '../components/input-text/routes';
27
+ import { LINK_BUTTON_ROUTES } from '../components/link-button/routes';
28
+ import { LINK_GROUP_ROUTES } from '../components/link-group/routes';
29
+ import { LINK_ROUTES } from '../components/link/routes';
30
+ import { NAV_ROUTES } from '../components/nav/routes';
31
+ import { PAGINATION_ROUTES } from '../components/pagination/routes';
32
+ import { POPOVER_ROUTES } from '../components/popover/routes';
33
+ import { PROGRESS_ROUTES } from '../components/progress/routes';
34
+ import { SELECT_ROUTES } from '../components/select/routes';
35
+ import { SKIP_NAV_ROUTES } from '../components/skip-nav/routes';
36
+ import { SPIN_ROUTES } from '../components/spin/routes';
37
+ import { SPLIT_BUTTON_ROUTES } from '../components/split-button/routes';
38
+ import { TABLE_ROUTES } from '../components/table/routes';
39
+ import { TEXTAREA_ROUTES } from '../components/textarea/routes';
40
+ import { TOAST_ROUTES } from '../components/toast/routes';
41
+ import { VERSION_ROUTES } from '../components/version/routes';
42
+ import { Routes } from './types';
43
+
44
+ export const ROUTES: Routes = {
45
+ ...HANDOUT_ROUTES,
46
+ ...ABBR_ROUTES,
47
+ ...ACCORDION_ROUTES,
48
+ ...ALERT_ROUTES,
49
+ ...AVATAR_ROUTES,
50
+ ...BADGE_ROUTES,
51
+ ...BREADCRUMB_ROUTES,
52
+ ...BUTTON_ROUTES,
53
+ ...BUTTON_LINK_ROUTES,
54
+ ...BUTTON_GROUP_ROUTES,
55
+ ...CARD_ROUTES,
56
+ ...DETAILS_ROUTES,
57
+ ...FORM_ROUTES,
58
+ ...HEADING_ROUTES,
59
+ ...ICON_ROUTES,
60
+ ...INDENTED_ROUTES,
61
+ ...INPUT_CHECKBOX_ROUTES,
62
+ ...INPUT_COLOR_ROUTES,
63
+ ...INPUT_DATE_ROUTES,
64
+ ...INPUT_EMAIL_ROUTES,
65
+ ...INPUT_FILE_ROUTES,
66
+ ...INPUT_NUMBER_ROUTES,
67
+ ...INPUT_PASSWORD_ROUTES,
68
+ ...INPUT_RADIO_ROUTES,
69
+ ...INPUT_RANGE_ROUTES,
70
+ ...INPUT_TEXT_ROUTES,
71
+ ...LINK_ROUTES,
72
+ ...LINK_BUTTON_ROUTES,
73
+ ...LINK_GROUP_ROUTES,
74
+ ...NAV_ROUTES,
75
+ ...PAGINATION_ROUTES,
76
+ ...POPOVER_ROUTES,
77
+ ...PROGRESS_ROUTES,
78
+ ...SELECT_ROUTES,
79
+ ...SELECT_ROUTES,
80
+ ...SKIP_NAV_ROUTES,
81
+ ...SPIN_ROUTES,
82
+ ...SPLIT_BUTTON_ROUTES,
83
+ ...TABLE_ROUTES,
84
+ ...TEXTAREA_ROUTES,
85
+ ...TOAST_ROUTES,
86
+ ...VERSION_ROUTES,
87
+ };
@@ -0,0 +1,85 @@
1
+ import { isTheme, Store, Theme } from './theme';
2
+ import PackageJson from '@public-ui/components/package.json';
3
+ import { THEME_OPTIONS } from './theme';
4
+ import { Option } from '@public-ui/components';
5
+
6
+ const STORE_IDENTIFIER = `public-ui.v${PackageJson.version}`;
7
+
8
+ class StaticStorage {
9
+ private readonly store: Map<string, string> = new Map();
10
+
11
+ public setItem(key: string, value: string) {
12
+ this.store.set(key, value);
13
+ }
14
+
15
+ public getItem(key: string) {
16
+ return this.store.get(key) || null;
17
+ }
18
+ }
19
+
20
+ const STORE: Store = {
21
+ darkMode: false,
22
+ theme: 'default',
23
+ };
24
+
25
+ let STORAGE: Storage;
26
+ export function setStorage(storage: Storage) {
27
+ STORAGE = storage;
28
+ const RESTORE = STORAGE.getItem(STORE_IDENTIFIER);
29
+ try {
30
+ const store = JSON.parse(RESTORE as string) as Store;
31
+ if (typeof store === 'object' && store !== null) {
32
+ STORE.darkMode = store.darkMode === true;
33
+ if (isTheme(store.theme)) {
34
+ STORE.theme = store.theme;
35
+ }
36
+ }
37
+ } catch (e) {
38
+ /* empty */
39
+ }
40
+ }
41
+ setStorage(new StaticStorage() as unknown as Storage);
42
+
43
+ const setStore = () => {
44
+ STORAGE.setItem(STORE_IDENTIFIER, JSON.stringify(STORE));
45
+ };
46
+
47
+ const switchDarkMode = (mode: boolean) => {
48
+ const html = document.querySelector('html');
49
+ if (html) {
50
+ html.dataset.theme = mode ? 'dark' : 'light';
51
+ }
52
+ };
53
+
54
+ // ts-prune-ignore-next
55
+ export const setDarkMode = (value: boolean) => {
56
+ STORE.darkMode = value === true;
57
+ switchDarkMode(STORE.darkMode);
58
+ setStore();
59
+ };
60
+
61
+ // ts-prune-ignore-next
62
+ export const getDarkMode = (): boolean => {
63
+ return STORE.darkMode === true;
64
+ };
65
+
66
+ export const setTheme = (theme: Theme) => {
67
+ if (isTheme(theme)) {
68
+ STORE.theme = theme;
69
+ setStore();
70
+ } else {
71
+ throw new Error(`The theme identifier "${theme}" is not valid or an available option.`);
72
+ }
73
+ };
74
+
75
+ export const getTheme = (): Theme => {
76
+ return `${STORE.theme}`;
77
+ };
78
+
79
+ export const getThemeName = (theme: Theme): string => {
80
+ if (isTheme(theme)) {
81
+ return THEME_OPTIONS.find((option) => (option as Option<Theme>).value === theme)?.label;
82
+ } else {
83
+ throw new Error(`The theme identifier "${theme}" is not valid or an available option.`);
84
+ }
85
+ };
@@ -0,0 +1,103 @@
1
+ import { SelectOption } from '@public-ui/components';
2
+
3
+ export type Theme =
4
+ | 'bamf'
5
+ | 'bmf'
6
+ | 'by'
7
+ | 'bzst'
8
+ | 'default'
9
+ | 'desy-v1'
10
+ | 'desy-v2'
11
+ | 'ecl-ec'
12
+ | 'ecl-eu'
13
+ | 'itzbund'
14
+ | 'mapz'
15
+ | 'th'
16
+ | 'unstyled'
17
+ | 'zoll-v2';
18
+
19
+ export const isTheme = (value: unknown) => {
20
+ return (
21
+ typeof value === 'string' &&
22
+ (value === 'unstyled' ||
23
+ value === 'bamf' ||
24
+ value === 'bmf' ||
25
+ value === 'by' ||
26
+ value === 'bzst' ||
27
+ value === 'default' ||
28
+ value === 'desy-v1' ||
29
+ value === 'desy-v2' ||
30
+ value === 'ecl-ec' ||
31
+ value === 'ecl-eu' ||
32
+ value === 'itzbund' ||
33
+ value === 'mapz' ||
34
+ value === 'th' ||
35
+ value === 'zoll-v2')
36
+ );
37
+ };
38
+
39
+ export type Store = {
40
+ darkMode: boolean;
41
+ theme: Theme;
42
+ };
43
+
44
+ export const THEME_OPTIONS: SelectOption<Theme>[] = [
45
+ {
46
+ label: 'Unstyled',
47
+ value: 'unstyled',
48
+ },
49
+ // {
50
+ // disabled: true,
51
+ // label: 'Bundesamt für Migration und Flüchtlinge',
52
+ // value: 'bamf',
53
+ // },
54
+ {
55
+ label: 'Bundesministerium der Finanzen',
56
+ value: 'bmf',
57
+ },
58
+ // {
59
+ // label: 'Freistaat Bayern (StMWi)',
60
+ // value: 'by',
61
+ // },
62
+ {
63
+ label: 'Bundesamt für Zoll und Steuern',
64
+ value: 'bzst',
65
+ },
66
+ {
67
+ label: 'Default',
68
+ value: 'default',
69
+ },
70
+ // {
71
+ // disabled: true,
72
+ // label: 'DESY-Styleguide (v1)',
73
+ // value: 'desy-v1',
74
+ // },
75
+ {
76
+ label: 'DESY-Styleguide (v2)',
77
+ value: 'desy-v2',
78
+ },
79
+ {
80
+ label: 'European Commission (ECL)',
81
+ value: 'ecl-ec',
82
+ },
83
+ {
84
+ label: 'European Union (ECL)',
85
+ value: 'ecl-eu',
86
+ },
87
+ {
88
+ label: 'Informationstechnikzentrum Bund',
89
+ value: 'itzbund',
90
+ },
91
+ {
92
+ label: 'MAPZoll-Styleguide',
93
+ value: 'mapz',
94
+ },
95
+ {
96
+ label: 'Freistaat Thüringen',
97
+ value: 'th',
98
+ },
99
+ {
100
+ label: 'Design System Zoll (v2)',
101
+ value: 'zoll-v2',
102
+ },
103
+ ];
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+
3
+ export type Route = FC | Routes;
4
+ export type Routes = { [key: string]: Route };
package/src/style.scss ADDED
@@ -0,0 +1,43 @@
1
+ dl,
2
+ hr {
3
+ margin: 0;
4
+ }
5
+
6
+ .w-4rem {
7
+ width: 4rem;
8
+ }
9
+
10
+ .w-8rem {
11
+ width: 8rem;
12
+ }
13
+
14
+ .w-12rem {
15
+ width: 12rem;
16
+ }
17
+
18
+ .grid-cols-2 {
19
+ grid-template-columns: auto auto;
20
+ }
21
+
22
+ .app-sidebar {
23
+ font-family: sans-serif;
24
+ }
25
+
26
+ @media (min-width: 1024px) {
27
+ .app-container {
28
+ display: grid;
29
+ grid-template-columns: 360px auto;
30
+ height: 100%;
31
+ }
32
+
33
+ .app-sidebar {
34
+ border-right: 1px solid gray;
35
+ }
36
+ }
37
+
38
+ @media print {
39
+ .no-print,
40
+ .no-print * {
41
+ display: none !important;
42
+ }
43
+ }
package/test-build.sh ADDED
@@ -0,0 +1,2 @@
1
+ cd "$(dirname "$0")"
2
+ npm run build -- --output-path=$1
package/tsconfig.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "compilerOptions": {
3
+ "experimentalDecorators": true,
4
+ "pretty": true,
5
+ "target": "ESNext",
6
+ "module": "ESNext",
7
+ "preserveConstEnums": true,
8
+ "sourceMap": true,
9
+ "preserveSymlinks": true,
10
+ "moduleResolution": "node",
11
+ "lib": ["es2017", "dom"],
12
+ "types": ["@public-ui/components", "mocha", "node", "react", "react-dom"],
13
+ "typeRoots": ["node_modules/@types", "src/types"],
14
+ "noUnusedLocals": true,
15
+ "resolveJsonModule": true,
16
+ "noEmit": true,
17
+ "skipLibCheck": true,
18
+ "noUnusedParameters": true,
19
+ "noImplicitReturns": true,
20
+ "noFallthroughCasesInSwitch": true,
21
+ "forceConsistentCasingInFileNames": true,
22
+ "importHelpers": true,
23
+ "removeComments": true,
24
+ "strict": true,
25
+ "allowSyntheticDefaultImports": true,
26
+ "jsx": "react",
27
+ "jsxFactory": "React.createElement",
28
+ "jsxFragmentFactory": "React.Fragment"
29
+ },
30
+ "include": ["src/**/*", "tests/**/*", "node_modules/@leanup/**/*", "decs.d.ts"],
31
+ "exclude": ["node_modules/@leanup/**/template/**/*"]
32
+ }
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from '@unocss/webpack';
2
+ import { presetUno } from '@unocss/preset-uno';
3
+
4
+ // ts-prune-ignore-next
5
+ export default defineConfig({
6
+ presets: [presetUno()],
7
+ });
@@ -0,0 +1,14 @@
1
+ const webpack = require('webpack');
2
+
3
+ module.exports = (...args) => {
4
+ const config = require('@leanup/stack-react/webpack.config')(...args);
5
+ const UnoCSS = require('@unocss/webpack').default;
6
+ config.plugins.push(UnoCSS());
7
+ config.plugins.push(
8
+ new webpack.EnvironmentPlugin({
9
+ THEME_MODULE: '',
10
+ THEME_EXPORT: '',
11
+ }),
12
+ );
13
+ return config;
14
+ };