@public-ui/sample-react 1.5.3
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.
- package/.eslintignore +1 -0
- package/.eslintrc.js +27 -0
- package/.gitignore +35 -0
- package/.prettierignore +4 -0
- package/package.json +64 -0
- package/prettier.config.js +5 -0
- package/public/.htaccess +3 -0
- package/public/assets/bundes/LICENSE.md +1 -0
- package/public/assets/bundes/sans/BundesSans-Web-Black.ttf +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Black.woff +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Black.woff2 +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-BlackItalic.ttf +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-BlackItalic.woff +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-BlackItalic.woff2 +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Bold.ttf +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Bold.woff +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Bold.woff2 +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-BoldItalic.ttf +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-BoldItalic.woff +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-BoldItalic.woff2 +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Light.ttf +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Light.woff +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Light.woff2 +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-LightItalic.ttf +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-LightItalic.woff +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-LightItalic.woff2 +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Medium.ttf +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Medium.woff +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Medium.woff2 +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-MediumItalic.ttf +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-MediumItalic.woff +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-MediumItalic.woff2 +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Regular.ttf +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Regular.woff +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-Regular.woff2 +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-RegularItalic.ttf +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-RegularItalic.woff +0 -0
- package/public/assets/bundes/sans/BundesSans-Web-RegularItalic.woff2 +0 -0
- package/public/assets/bundes/sans-cond/BundesSansCond-Web-Regular.ttf +0 -0
- package/public/assets/bundes/sans-cond/BundesSansCond-Web-Regular.woff +0 -0
- package/public/assets/bundes/sans-cond/BundesSansCond-Web-Regular.woff2 +0 -0
- package/public/assets/bundes/serif/BundesSerif-Web-Bold.ttf +0 -0
- package/public/assets/bundes/serif/BundesSerif-Web-Bold.woff +0 -0
- package/public/assets/bundes/serif/BundesSerif-Web-Bold.woff2 +0 -0
- package/public/assets/bundes/serif/BundesSerif-Web-BoldItalic.ttf +0 -0
- package/public/assets/bundes/serif/BundesSerif-Web-BoldItalic.woff +0 -0
- package/public/assets/bundes/serif/BundesSerif-Web-BoldItalic.woff2 +0 -0
- package/public/assets/bundes/serif/BundesSerif-Web-Italic.ttf +0 -0
- package/public/assets/bundes/serif/BundesSerif-Web-Italic.woff +0 -0
- package/public/assets/bundes/serif/BundesSerif-Web-Italic.woff2 +0 -0
- package/public/assets/bundes/serif/BundesSerif-Web-Regular.ttf +0 -0
- package/public/assets/bundes/serif/BundesSerif-Web-Regular.woff +0 -0
- package/public/assets/bundes/serif/BundesSerif-Web-Regular.woff2 +0 -0
- package/public/assets/bundes/style.css +84 -0
- package/public/assets/codicons/LICENSE +395 -0
- package/public/assets/codicons/LICENSE-CODE +21 -0
- package/public/assets/codicons/codicon.css +582 -0
- package/public/assets/codicons/codicon.csv +426 -0
- package/public/assets/codicons/codicon.html +3911 -0
- package/public/assets/codicons/codicon.svg +1 -0
- package/public/assets/codicons/codicon.ttf +0 -0
- package/public/assets/fontawesome-free/LICENSE.txt +165 -0
- package/public/assets/fontawesome-free/css/all.css +7831 -0
- package/public/assets/fontawesome-free/css/all.min.css +6 -0
- package/public/assets/fontawesome-free/css/brands.css +1432 -0
- package/public/assets/fontawesome-free/css/brands.min.css +6 -0
- package/public/assets/fontawesome-free/css/fontawesome.css +6338 -0
- package/public/assets/fontawesome-free/css/fontawesome.min.css +6 -0
- package/public/assets/fontawesome-free/css/regular.css +19 -0
- package/public/assets/fontawesome-free/css/regular.min.css +6 -0
- package/public/assets/fontawesome-free/css/solid.css +19 -0
- package/public/assets/fontawesome-free/css/solid.min.css +6 -0
- package/public/assets/fontawesome-free/css/svg-with-js.css +634 -0
- package/public/assets/fontawesome-free/css/svg-with-js.min.css +6 -0
- package/public/assets/fontawesome-free/css/v4-font-face.css +26 -0
- package/public/assets/fontawesome-free/css/v4-font-face.min.css +6 -0
- package/public/assets/fontawesome-free/css/v4-shims.css +2146 -0
- package/public/assets/fontawesome-free/css/v4-shims.min.css +6 -0
- package/public/assets/fontawesome-free/css/v5-font-face.css +22 -0
- package/public/assets/fontawesome-free/css/v5-font-face.min.css +6 -0
- package/public/assets/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-v4compatibility.ttf +0 -0
- package/public/assets/fontawesome-free/webfonts/fa-v4compatibility.woff2 +0 -0
- package/public/assets/icofont/demo.html +18939 -0
- package/public/assets/icofont/fonts/icofont.eot +0 -0
- package/public/assets/icofont/fonts/icofont.svg +2105 -0
- package/public/assets/icofont/fonts/icofont.ttf +0 -0
- package/public/assets/icofont/fonts/icofont.woff +0 -0
- package/public/assets/icofont/fonts/icofont.woff2 +0 -0
- package/public/assets/icofont/icofont.css +10757 -0
- package/public/assets/icofont/icofont.min.css +7 -0
- package/public/assets/kolibri.ico +0 -0
- package/public/assets/kreon/Kreon-VariableFont_wght.ttf +0 -0
- package/public/assets/kreon/OFL.txt +93 -0
- package/public/assets/kreon/README.txt +67 -0
- package/public/assets/kreon/static/Kreon-Bold.ttf +0 -0
- package/public/assets/kreon/static/Kreon-Light.ttf +0 -0
- package/public/assets/kreon/static/Kreon-Medium.ttf +0 -0
- package/public/assets/kreon/static/Kreon-Regular.ttf +0 -0
- package/public/assets/kreon/static/Kreon-SemiBold.ttf +0 -0
- package/public/assets/kreon/style.css +41 -0
- package/public/assets/material-icons/LICENSE +202 -0
- package/public/assets/material-icons/README.md +129 -0
- package/public/assets/material-icons/_data/versions.json +2124 -0
- package/public/assets/material-icons/css/_codepoints.scss +2279 -0
- package/public/assets/material-icons/css/_mixins.scss +13 -0
- package/public/assets/material-icons/css/_variables.scss +6 -0
- package/public/assets/material-icons/css/material-icons.css +9208 -0
- package/public/assets/material-icons/css/material-icons.min.css +1 -0
- package/public/assets/material-icons/css/material-icons.scss +39 -0
- package/public/assets/material-icons/iconfont/_mixins.scss +55 -0
- package/public/assets/material-icons/iconfont/_variables.scss +3 -0
- package/public/assets/material-icons/iconfont/filled.css +24 -0
- package/public/assets/material-icons/iconfont/filled.scss +4 -0
- package/public/assets/material-icons/iconfont/material-icons-outlined.woff +0 -0
- package/public/assets/material-icons/iconfont/material-icons-outlined.woff2 +0 -0
- package/public/assets/material-icons/iconfont/material-icons-round.woff +0 -0
- package/public/assets/material-icons/iconfont/material-icons-round.woff2 +0 -0
- package/public/assets/material-icons/iconfont/material-icons-sharp.woff +0 -0
- package/public/assets/material-icons/iconfont/material-icons-sharp.woff2 +0 -0
- package/public/assets/material-icons/iconfont/material-icons-two-tone.woff +0 -0
- package/public/assets/material-icons/iconfont/material-icons-two-tone.woff2 +0 -0
- package/public/assets/material-icons/iconfont/material-icons.css +124 -0
- package/public/assets/material-icons/iconfont/material-icons.scss +5 -0
- package/public/assets/material-icons/iconfont/material-icons.woff +0 -0
- package/public/assets/material-icons/iconfont/material-icons.woff2 +0 -0
- package/public/assets/material-icons/iconfont/outlined.css +24 -0
- package/public/assets/material-icons/iconfont/outlined.scss +4 -0
- package/public/assets/material-icons/iconfont/round.css +24 -0
- package/public/assets/material-icons/iconfont/round.scss +4 -0
- package/public/assets/material-icons/iconfont/sharp.css +24 -0
- package/public/assets/material-icons/iconfont/sharp.scss +4 -0
- package/public/assets/material-icons/iconfont/two-tone.css +24 -0
- package/public/assets/material-icons/iconfont/two-tone.scss +4 -0
- package/public/assets/material-icons/index.d.ts +2128 -0
- package/public/assets/material-icons/package.json +52 -0
- package/public/assets/material-symbols/LICENSE +202 -0
- package/public/assets/material-symbols/README.md +114 -0
- package/public/assets/material-symbols/_core.scss +47 -0
- package/public/assets/material-symbols/index.css +74 -0
- package/public/assets/material-symbols/index.d.ts +2809 -0
- package/public/assets/material-symbols/index.scss +3 -0
- package/public/assets/material-symbols/material-symbols-outlined.woff2 +0 -0
- package/public/assets/material-symbols/material-symbols-rounded.woff2 +0 -0
- package/public/assets/material-symbols/material-symbols-sharp.woff2 +0 -0
- package/public/assets/material-symbols/outlined.css +24 -0
- package/public/assets/material-symbols/outlined.scss +3 -0
- package/public/assets/material-symbols/package.json +41 -0
- package/public/assets/material-symbols/rounded.css +24 -0
- package/public/assets/material-symbols/rounded.scss +3 -0
- package/public/assets/material-symbols/sharp.css +24 -0
- package/public/assets/material-symbols/sharp.scss +3 -0
- package/public/assets/noto-sans/fonts/NotoSans-Black.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-BlackItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-Bold.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-BoldItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-ExtraBold.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-ExtraBoldItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-ExtraLight.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-ExtraLightItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-Italic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-Light.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-LightItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-Medium.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-MediumItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-Regular.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-SemiBold.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-SemiBoldItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-Thin.ttf +0 -0
- package/public/assets/noto-sans/fonts/NotoSans-ThinItalic.ttf +0 -0
- package/public/assets/noto-sans/fonts/OFL.txt +93 -0
- package/public/assets/noto-sans/noto-sans.css +11 -0
- package/public/assets/roboto/LICENSE.txt +202 -0
- package/public/assets/roboto/Roboto-Black.ttf +0 -0
- package/public/assets/roboto/Roboto-BlackItalic.ttf +0 -0
- package/public/assets/roboto/Roboto-Bold.ttf +0 -0
- package/public/assets/roboto/Roboto-BoldItalic.ttf +0 -0
- package/public/assets/roboto/Roboto-Italic.ttf +0 -0
- package/public/assets/roboto/Roboto-Light.ttf +0 -0
- package/public/assets/roboto/Roboto-LightItalic.ttf +0 -0
- package/public/assets/roboto/Roboto-Medium.ttf +0 -0
- package/public/assets/roboto/Roboto-MediumItalic.ttf +0 -0
- package/public/assets/roboto/Roboto-Regular.ttf +0 -0
- package/public/assets/roboto/Roboto-Thin.ttf +0 -0
- package/public/assets/roboto/Roboto-ThinItalic.ttf +0 -0
- package/public/assets/roboto/roboto.css +27 -0
- package/public/assets/tabler-icons/fonts/tabler-icons.eot +0 -0
- package/public/assets/tabler-icons/fonts/tabler-icons.ttf +0 -0
- package/public/assets/tabler-icons/fonts/tabler-icons.woff +0 -0
- package/public/assets/tabler-icons/fonts/tabler-icons.woff2 +0 -0
- package/public/assets/tabler-icons/tabler-icons.css +16056 -0
- package/public/assets/tabler-icons/tabler-icons.html +36226 -0
- package/public/assets/tabler-icons/tabler-icons.min.css +4 -0
- package/public/assets/tabler-icons/tabler-icons.png +0 -0
- package/public/assets/tabler-icons/tabler-icons.scss +8058 -0
- package/public/index.html +28 -0
- package/public/robots.txt +2 -0
- package/src/App.tsx +131 -0
- package/src/components/Sidebar.tsx +95 -0
- package/src/components/abbr/basic.html +6 -0
- package/src/components/abbr/basic.tsx +39 -0
- package/src/components/abbr/routes.ts +9 -0
- package/src/components/accordion/basic.tsx +18 -0
- package/src/components/accordion/header.tsx +17 -0
- package/src/components/accordion/headlines.tsx +27 -0
- package/src/components/accordion/list.tsx +32 -0
- package/src/components/accordion/routes.ts +17 -0
- package/src/components/alert/basic.tsx +37 -0
- package/src/components/alert/card-msg.tsx +11 -0
- package/src/components/alert/html.tsx +29 -0
- package/src/components/alert/routes.ts +15 -0
- package/src/components/avatar/basic.tsx +10 -0
- package/src/components/avatar/routes.ts +8 -0
- package/src/components/badge/basic.tsx +18 -0
- package/src/components/badge/button.tsx +25 -0
- package/src/components/badge/routes.ts +12 -0
- package/src/components/breadcrumb/basic.tsx +53 -0
- package/src/components/breadcrumb/routes.ts +9 -0
- package/src/components/button/basic.tsx +29 -0
- package/src/components/button/hide-label.tsx +31 -0
- package/src/components/button/icons.tsx +27 -0
- package/src/components/button/routes.ts +18 -0
- package/src/components/button/width.tsx +30 -0
- package/src/components/button-group/basic.tsx +13 -0
- package/src/components/button-group/routes.ts +9 -0
- package/src/components/button-link/basic.tsx +23 -0
- package/src/components/button-link/icons.tsx +37 -0
- package/src/components/button-link/image.tsx +14 -0
- package/src/components/button-link/routes.ts +18 -0
- package/src/components/button-link/target.tsx +16 -0
- package/src/components/card/basic.tsx +12 -0
- package/src/components/card/confirm.tsx +19 -0
- package/src/components/card/flex.tsx +44 -0
- package/src/components/card/routes.ts +18 -0
- package/src/components/card/selection.tsx +70 -0
- package/src/components/details/basic.tsx +19 -0
- package/src/components/details/routes.ts +9 -0
- package/src/components/form/routes.ts +5 -0
- package/src/components/handout/basic.tsx +1013 -0
- package/src/components/handout/routes.ts +9 -0
- package/src/components/heading/badged.tsx +27 -0
- package/src/components/heading/basic.tsx +15 -0
- package/src/components/heading/paragraph.tsx +45 -0
- package/src/components/heading/routes.ts +15 -0
- package/src/components/icon/basic.tsx +17 -0
- package/src/components/icon/routes.ts +9 -0
- package/src/components/indented-text/basic.tsx +24 -0
- package/src/components/indented-text/routes.ts +9 -0
- package/src/components/input-checkbox/basic.tsx +37 -0
- package/src/components/input-checkbox/routes.ts +9 -0
- package/src/components/input-color/basic.tsx +29 -0
- package/src/components/input-color/routes.ts +9 -0
- package/src/components/input-date/basic.tsx +20 -0
- package/src/components/input-date/routes.ts +9 -0
- package/src/components/input-email/basic.tsx +30 -0
- package/src/components/input-email/routes.ts +9 -0
- package/src/components/input-file/basic.tsx +25 -0
- package/src/components/input-file/routes.ts +9 -0
- package/src/components/input-number/basic.tsx +30 -0
- package/src/components/input-number/routes.ts +9 -0
- package/src/components/input-password/basic.tsx +28 -0
- package/src/components/input-password/routes.ts +11 -0
- package/src/components/input-password/show-password.tsx +38 -0
- package/src/components/input-radio/basic.tsx +46 -0
- package/src/components/input-radio/horizontal.tsx +42 -0
- package/src/components/input-radio/routes.ts +14 -0
- package/src/components/input-radio/select.tsx +18 -0
- package/src/components/input-range/basic.tsx +29 -0
- package/src/components/input-range/routes.ts +9 -0
- package/src/components/input-text/basic.tsx +72 -0
- package/src/components/input-text/blur.tsx +16 -0
- package/src/components/input-text/focus.tsx +24 -0
- package/src/components/input-text/hidden-label.tsx +66 -0
- package/src/components/input-text/routes.ts +16 -0
- package/src/components/link/basic.tsx +23 -0
- package/src/components/link/icons.tsx +37 -0
- package/src/components/link/image.tsx +20 -0
- package/src/components/link/routes.ts +18 -0
- package/src/components/link/target.tsx +15 -0
- package/src/components/link-button/basic.tsx +22 -0
- package/src/components/link-button/routes.ts +9 -0
- package/src/components/link-group/routes.ts +5 -0
- package/src/components/nav/active.tsx +88 -0
- package/src/components/nav/aria-current.tsx +22 -0
- package/src/components/nav/basic.tsx +62 -0
- package/src/components/nav/horizontal.tsx +59 -0
- package/src/components/nav/routes.ts +18 -0
- package/src/components/pagination/basic.tsx +12 -0
- package/src/components/pagination/routes.ts +9 -0
- package/src/components/popover/basic.tsx +36 -0
- package/src/components/popover/routes.ts +8 -0
- package/src/components/progress/basic.tsx +11 -0
- package/src/components/progress/routes.ts +9 -0
- package/src/components/select/basic.tsx +51 -0
- package/src/components/select/routes.ts +9 -0
- package/src/components/skip-nav/basic.tsx +33 -0
- package/src/components/skip-nav/routes.ts +9 -0
- package/src/components/spin/basic.tsx +6 -0
- package/src/components/spin/custom.css +52 -0
- package/src/components/spin/custom.tsx +11 -0
- package/src/components/spin/cycle.tsx +6 -0
- package/src/components/spin/routes.ts +13 -0
- package/src/components/split-button/basic.tsx +46 -0
- package/src/components/split-button/routes.ts +8 -0
- package/src/components/table/badge-size.tsx +51 -0
- package/src/components/table/render-cell.tsx +48 -0
- package/src/components/table/routes.ts +15 -0
- package/src/components/table/sort-date.tsx +33 -0
- package/src/components/table/test-data.ts +66 -0
- package/src/components/textarea/adjust-height.tsx +22 -0
- package/src/components/textarea/basic.tsx +11 -0
- package/src/components/textarea/disabled.tsx +10 -0
- package/src/components/textarea/placeholder.tsx +10 -0
- package/src/components/textarea/readonly.tsx +10 -0
- package/src/components/textarea/resize.tsx +13 -0
- package/src/components/textarea/routes.ts +27 -0
- package/src/components/textarea/rows.tsx +10 -0
- package/src/components/toast/basic.tsx +21 -0
- package/src/components/toast/routes.ts +8 -0
- package/src/components/version/basic.tsx +6 -0
- package/src/components/version/context.tsx +12 -0
- package/src/components/version/routes.ts +12 -0
- package/src/declare.d.ts +4 -0
- package/src/hooks/useMobile.ts +21 -0
- package/src/main.ts +7 -0
- package/src/react.main.tsx +56 -0
- package/src/shares/constants.ts +2 -0
- package/src/shares/react-roots.ts +10 -0
- package/src/shares/routes.ts +87 -0
- package/src/shares/store.ts +85 -0
- package/src/shares/theme.ts +103 -0
- package/src/shares/types.ts +4 -0
- package/src/style.scss +43 -0
- package/test-build.sh +2 -0
- package/tsconfig.json +32 -0
- package/unocss.config.ts +7 -0
- 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,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
|
+
);
|
package/src/declare.d.ts
ADDED
|
@@ -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,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,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
|
+
];
|
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
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
|
+
}
|
package/unocss.config.ts
ADDED
|
@@ -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
|
+
};
|