@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.
- 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,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { KolButton, KolInputPassword, KolInputText, KolPopover } from '@public-ui/react';
|
|
3
|
+
|
|
4
|
+
import { FC } from 'react';
|
|
5
|
+
|
|
6
|
+
export const PopoverBasic: FC = () => {
|
|
7
|
+
const [top, setTop] = React.useState(false);
|
|
8
|
+
const [right, setRight] = React.useState(false);
|
|
9
|
+
const [bottom, setBottom] = React.useState(false);
|
|
10
|
+
const [left, setLeft] = React.useState(false);
|
|
11
|
+
const [login, setLogin] = React.useState(false);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div className="grid gap-4 max-w-[400px] mx-auto pt-8">
|
|
15
|
+
<KolButton _label="Oben" _icon="codicon codicon-arrow-up" _variant="primary" _on={{ onClick: () => setTop(!top) }}></KolButton>
|
|
16
|
+
<KolPopover _show={top}>Ich bin oberhalb</KolPopover>
|
|
17
|
+
<KolButton _label="Rechts" _icon="codicon codicon-arrow-right" _variant="danger" _on={{ onClick: () => setRight(!right) }}></KolButton>
|
|
18
|
+
<KolPopover _align="right" _show={right}>
|
|
19
|
+
Ich bin rechts
|
|
20
|
+
</KolPopover>
|
|
21
|
+
<KolButton _label="Unten" _icon="codicon codicon-arrow-down" _variant="secondary" _on={{ onClick: () => setBottom(!bottom) }}></KolButton>
|
|
22
|
+
<KolPopover _align="bottom" _show={bottom}>
|
|
23
|
+
Ich bin unterhalb
|
|
24
|
+
</KolPopover>
|
|
25
|
+
<KolButton _label="Links" _icon="codicon codicon-arrow-left" _variant="normal" _on={{ onClick: () => setLeft(!left) }}></KolButton>
|
|
26
|
+
<KolPopover _align="left" _show={left}>
|
|
27
|
+
Ich bin links
|
|
28
|
+
</KolPopover>
|
|
29
|
+
<KolButton _label="PR starten" _icon="codicon codicon-git-pull-request" _variant="normal" _on={{ onClick: () => setLogin(!login) }}></KolButton>
|
|
30
|
+
<KolPopover _show={login}>
|
|
31
|
+
<KolInputText>Benutzername</KolInputText>
|
|
32
|
+
<KolInputPassword>Passwort</KolInputPassword>
|
|
33
|
+
</KolPopover>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { KolProgress } from '@public-ui/react';
|
|
3
|
+
|
|
4
|
+
import { FC } from 'react';
|
|
5
|
+
|
|
6
|
+
export const ProgressBasic: FC = () => (
|
|
7
|
+
<div className="grid gap-4">
|
|
8
|
+
<KolProgress _variant="bar" _max={100} _value={33}></KolProgress>
|
|
9
|
+
<KolProgress _variant="cycle" _max={100} _value={33}></KolProgress>
|
|
10
|
+
</div>
|
|
11
|
+
);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectOption } from '@public-ui/components';
|
|
3
|
+
|
|
4
|
+
import { KolForm, KolSelect } from '@public-ui/react';
|
|
5
|
+
|
|
6
|
+
import { FC } from 'react';
|
|
7
|
+
|
|
8
|
+
import countries from 'world_countries_lists/data/countries/de/countries.json';
|
|
9
|
+
|
|
10
|
+
import { ERROR_MSG } from '../../shares/constants';
|
|
11
|
+
|
|
12
|
+
const STATUS_OPTIONS: SelectOption<string>[] = [
|
|
13
|
+
{
|
|
14
|
+
label: '- Keine Auswahl',
|
|
15
|
+
value: '',
|
|
16
|
+
disabled: true,
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
type Country = {
|
|
21
|
+
id: number;
|
|
22
|
+
alpha2: string;
|
|
23
|
+
alpha3: string;
|
|
24
|
+
name: string;
|
|
25
|
+
};
|
|
26
|
+
(countries as Country[]).forEach((country) =>
|
|
27
|
+
STATUS_OPTIONS.push({
|
|
28
|
+
label: country.name,
|
|
29
|
+
value: country.alpha2,
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export const SelectBasic: FC = () => (
|
|
34
|
+
<KolForm className="grid gap-4">
|
|
35
|
+
<KolSelect
|
|
36
|
+
_id=""
|
|
37
|
+
_options={STATUS_OPTIONS}
|
|
38
|
+
_error={ERROR_MSG}
|
|
39
|
+
_label="Anrede"
|
|
40
|
+
_icon={{
|
|
41
|
+
left: {
|
|
42
|
+
icon: 'codicon codicon-arrow-left',
|
|
43
|
+
},
|
|
44
|
+
right: {
|
|
45
|
+
icon: 'codicon codicon-arrow-right',
|
|
46
|
+
},
|
|
47
|
+
}}
|
|
48
|
+
/>
|
|
49
|
+
<KolSelect _id="" _options={STATUS_OPTIONS} _label="Anrede" _multiple _required _error={ERROR_MSG} />
|
|
50
|
+
</KolForm>
|
|
51
|
+
);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { KolIndentedText, KolSkipNav } from '@public-ui/react';
|
|
3
|
+
|
|
4
|
+
import { FC } from 'react';
|
|
5
|
+
|
|
6
|
+
export const SkipNavBasic: FC = () => (
|
|
7
|
+
<div className="grid gap-4">
|
|
8
|
+
<KolIndentedText>
|
|
9
|
+
<p>
|
|
10
|
+
<b>Links sind unsichtbar geschalten</b>
|
|
11
|
+
<br />
|
|
12
|
+
Um die Links zu sehen, am besten einmal in diesen Bereich klicken und Tab-Taste drücken.
|
|
13
|
+
</p>
|
|
14
|
+
</KolIndentedText>
|
|
15
|
+
<KolSkipNav
|
|
16
|
+
_ariaLabel="Versteckte Navigation"
|
|
17
|
+
_links={[
|
|
18
|
+
{
|
|
19
|
+
_label: 'Zum Anfang',
|
|
20
|
+
_selector: 'header',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
_label: 'Zum Formular',
|
|
24
|
+
_selector: '#form',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
_label: 'Zum Ende',
|
|
28
|
+
_selector: 'footer',
|
|
29
|
+
},
|
|
30
|
+
]}
|
|
31
|
+
></KolSkipNav>
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.loader {
|
|
2
|
+
width: 48px;
|
|
3
|
+
height: 48px;
|
|
4
|
+
border: 5px solid #333;
|
|
5
|
+
border-radius: 50%;
|
|
6
|
+
display: inline-block;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
position: relative;
|
|
9
|
+
animation: pulse 1s linear infinite;
|
|
10
|
+
}
|
|
11
|
+
.loader:after {
|
|
12
|
+
content: '';
|
|
13
|
+
position: absolute;
|
|
14
|
+
width: 48px;
|
|
15
|
+
height: 48px;
|
|
16
|
+
border: 5px solid #f00;
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
display: inline-block;
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
left: 50%;
|
|
21
|
+
top: 50%;
|
|
22
|
+
transform: translate(-50%, -50%);
|
|
23
|
+
animation: scaleUp 1s linear infinite;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes scaleUp {
|
|
27
|
+
0% {
|
|
28
|
+
transform: translate(-50%, -50%) scale(0);
|
|
29
|
+
}
|
|
30
|
+
60%,
|
|
31
|
+
100% {
|
|
32
|
+
transform: translate(-50%, -50%) scale(1);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
@keyframes pulse {
|
|
36
|
+
0%,
|
|
37
|
+
60%,
|
|
38
|
+
100% {
|
|
39
|
+
transform: scale(1);
|
|
40
|
+
}
|
|
41
|
+
80% {
|
|
42
|
+
transform: scale(1.2);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */
|
|
47
|
+
@media (prefers-reduced-motion) {
|
|
48
|
+
.loader,
|
|
49
|
+
.loader:after {
|
|
50
|
+
animation-duration: 2s;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { KolSpin } from '@public-ui/react';
|
|
3
|
+
import './custom.css';
|
|
4
|
+
|
|
5
|
+
import { FC } from 'react';
|
|
6
|
+
|
|
7
|
+
export const SpinCustom: FC = () => (
|
|
8
|
+
<KolSpin _show _variant="none">
|
|
9
|
+
<span slot="expert" className="loader"></span>
|
|
10
|
+
</KolSpin>
|
|
11
|
+
);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Routes } from '../../shares/types';
|
|
2
|
+
|
|
3
|
+
import { SpinBasic } from './basic';
|
|
4
|
+
import { SpinCustom } from './custom';
|
|
5
|
+
import { SpinCycle } from './cycle';
|
|
6
|
+
|
|
7
|
+
export const SPIN_ROUTES: Routes = {
|
|
8
|
+
spin: {
|
|
9
|
+
basic: SpinBasic,
|
|
10
|
+
cycle: SpinCycle,
|
|
11
|
+
custom: SpinCustom,
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { KolSplitButton } from '@public-ui/react';
|
|
3
|
+
|
|
4
|
+
import { FC } from 'react';
|
|
5
|
+
|
|
6
|
+
export const SplitButtonBasic: FC = () => {
|
|
7
|
+
const [showDropdown, setShowDropdown] = useState(false);
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<div className="grid gap-4">
|
|
11
|
+
<KolSplitButton _label="Nur der Pfeil öffnet" _onClick={console.log}>
|
|
12
|
+
I am
|
|
13
|
+
<br />a dwarf
|
|
14
|
+
</KolSplitButton>
|
|
15
|
+
<KolSplitButton _label="ohne label" _hide-label _icon="codicon codicon-git-pull-request">
|
|
16
|
+
and
|
|
17
|
+
<br />
|
|
18
|
+
I'm
|
|
19
|
+
<br />
|
|
20
|
+
digging
|
|
21
|
+
<br />a hole
|
|
22
|
+
</KolSplitButton>
|
|
23
|
+
<KolSplitButton _label="kick me">
|
|
24
|
+
diggy
|
|
25
|
+
<br />
|
|
26
|
+
diggy
|
|
27
|
+
<br />
|
|
28
|
+
hole
|
|
29
|
+
</KolSplitButton>
|
|
30
|
+
<KolSplitButton _label="schon offen" _show-dropdown={showDropdown}>
|
|
31
|
+
diggy
|
|
32
|
+
<br />
|
|
33
|
+
diggy
|
|
34
|
+
<br />
|
|
35
|
+
hole
|
|
36
|
+
</KolSplitButton>
|
|
37
|
+
<KolSplitButton _label={`vorherigen ${showDropdown ? 'schließen' : 'öffnen'}`} _onClick={() => setShowDropdown(!showDropdown)}>
|
|
38
|
+
diggy
|
|
39
|
+
<br />
|
|
40
|
+
diggy
|
|
41
|
+
<br />
|
|
42
|
+
hole
|
|
43
|
+
</KolSplitButton>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
_icon="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} />;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
import { KolButton, KolInputText, 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: '#', key: 'order', textAlign: 'center' },
|
|
19
|
+
{
|
|
20
|
+
label: 'Datum (string)',
|
|
21
|
+
key: 'date',
|
|
22
|
+
textAlign: 'center',
|
|
23
|
+
render: (_el, _cell, tupel) => `<strong>${DATE_FORMATTER.format((tupel as Data).date)}</strong>`,
|
|
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 (react)',
|
|
33
|
+
key: 'order',
|
|
34
|
+
render: (el, cell, tupel) => {
|
|
35
|
+
// https://reactjs.org/docs/portals.html
|
|
36
|
+
getRoot(el).render(
|
|
37
|
+
<>
|
|
38
|
+
<KolButton _label={'Speichern'} />
|
|
39
|
+
<KolInputText _id="test">Eingabe</KolInputText>
|
|
40
|
+
</>,
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const TableRenderCell: FC = () => <KolTable _caption="Sort a date column" _data={DATA} _headers={HEADERS} />;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Routes } from '../../shares/types';
|
|
2
|
+
|
|
3
|
+
import { TableBadgeSize } from './badge-size';
|
|
4
|
+
|
|
5
|
+
import { TableRenderCell } from './render-cell';
|
|
6
|
+
|
|
7
|
+
import { TableSortTabel } from './sort-date';
|
|
8
|
+
|
|
9
|
+
export const TABLE_ROUTES: Routes = {
|
|
10
|
+
table: {
|
|
11
|
+
'badge-size': TableBadgeSize,
|
|
12
|
+
'render-cell': TableRenderCell,
|
|
13
|
+
'sort-data': TableSortTabel,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
import { KolTable } from '@public-ui/react';
|
|
4
|
+
import { KoliBriTableHeaders } from '@public-ui/components';
|
|
5
|
+
import { DATA, Data } from './test-data';
|
|
6
|
+
|
|
7
|
+
const DATE_FORMATTER = Intl.DateTimeFormat('de-DE', {
|
|
8
|
+
day: '2-digit',
|
|
9
|
+
month: '2-digit',
|
|
10
|
+
year: 'numeric',
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const HEADERS: KoliBriTableHeaders = {
|
|
14
|
+
horizontal: [
|
|
15
|
+
[
|
|
16
|
+
{ label: 'order', key: 'order', textAlign: 'center' },
|
|
17
|
+
{
|
|
18
|
+
label: 'date',
|
|
19
|
+
key: 'date',
|
|
20
|
+
textAlign: 'center',
|
|
21
|
+
render: (_el, _cell, tupel) => DATE_FORMATTER.format((tupel as Data).date),
|
|
22
|
+
sort: (data: Data[]) =>
|
|
23
|
+
data.sort((data0, data1) => {
|
|
24
|
+
if (data0.date < data1.date) return -1;
|
|
25
|
+
else if (data1.date < data0.date) return 1;
|
|
26
|
+
else return 0;
|
|
27
|
+
}),
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const TableSortTabel: FC = () => <KolTable _caption="Sort a date column" _data={DATA} _headers={HEADERS} />;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export type Data = {
|
|
2
|
+
order: number;
|
|
3
|
+
date: Date;
|
|
4
|
+
};
|
|
5
|
+
export const DATA: Data[] = [
|
|
6
|
+
{
|
|
7
|
+
order: 0,
|
|
8
|
+
date: new Date('1981-05-26T21:33:43.612Z'),
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
order: 1,
|
|
12
|
+
date: new Date('1971-04-25T19:44:17.014Z'),
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
order: 2,
|
|
16
|
+
date: new Date('1986-07-10T11:39:29.539Z'),
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
order: 3,
|
|
20
|
+
date: new Date('1976-02-02T10:00:36.346Z'),
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
order: 4,
|
|
24
|
+
date: new Date('1998-07-07T12:50:36.016Z'),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
order: 5,
|
|
28
|
+
date: new Date('1994-09-05T05:10:44.078Z'),
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
order: 6,
|
|
32
|
+
date: new Date('1986-05-23T13:05:01.874Z'),
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
order: 7,
|
|
36
|
+
date: new Date('1975-06-29T21:51:29.359Z'),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
order: 8,
|
|
40
|
+
date: new Date('1974-05-15T23:47:02.499Z'),
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
order: 9,
|
|
44
|
+
date: new Date('1990-05-27T10:13:19.641Z'),
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
order: 10,
|
|
48
|
+
date: new Date('1993-10-20T03:54:08.739Z'),
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
order: 11,
|
|
52
|
+
date: new Date('2000-02-25T11:55:43.705Z'),
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
order: 12,
|
|
56
|
+
date: new Date('1988-08-27T09:59:12.251Z'),
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
order: 13,
|
|
60
|
+
date: new Date('1980-10-24T10:41:24.897Z'),
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
order: 14,
|
|
64
|
+
date: new Date('1995-01-25T12:31:27.983Z'),
|
|
65
|
+
},
|
|
66
|
+
];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { KolForm, KolTextarea } from '@public-ui/react';
|
|
3
|
+
|
|
4
|
+
import { FC } from 'react';
|
|
5
|
+
|
|
6
|
+
const VALUE = `Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore
|
|
7
|
+
magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
|
|
8
|
+
gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing
|
|
9
|
+
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos
|
|
10
|
+
et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
|
|
11
|
+
sit amet.`;
|
|
12
|
+
|
|
13
|
+
export const TextareaAdjustHeight: FC = () => (
|
|
14
|
+
<KolForm className="row">
|
|
15
|
+
<div className="col-sm-6">
|
|
16
|
+
<KolTextarea _adjustHeight={true} _id="text-vertical" _resize="vertical" _value={VALUE} _label="Texteingabe (horizontal)" />
|
|
17
|
+
</div>
|
|
18
|
+
<div className="col-sm-6">
|
|
19
|
+
<KolTextarea _adjustHeight={true} _id="text-none" _resize="none" _value={VALUE} _label="Texteingabe (none)" />
|
|
20
|
+
</div>
|
|
21
|
+
</KolForm>
|
|
22
|
+
);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { KolForm, KolTextarea } from '@public-ui/react';
|
|
3
|
+
|
|
4
|
+
import { FC } from 'react';
|
|
5
|
+
import { ERROR_MSG } from '../../shares/constants';
|
|
6
|
+
|
|
7
|
+
export const TextareaBasic: FC = () => (
|
|
8
|
+
<KolForm>
|
|
9
|
+
<KolTextarea _id="text" _error={ERROR_MSG} _label="Texteingabe" />
|
|
10
|
+
</KolForm>
|
|
11
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
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." _id="text" _value="Kleiner Text im Eingabefeld ..." _label="Texteingabe" />
|
|
9
|
+
</KolForm>
|
|
10
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
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 _id="text" _placeholder="Hier steht ein Platzhaltertext" _label="Texteingabe" />
|
|
9
|
+
</KolForm>
|
|
10
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
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." _id="text" _readOnly _value="Kleiner Text im Eingabefeld ..." _label="Texteingabe" />
|
|
9
|
+
</KolForm>
|
|
10
|
+
);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { KolForm, KolTextarea } from '@public-ui/react';
|
|
3
|
+
|
|
4
|
+
import { FC } from 'react';
|
|
5
|
+
|
|
6
|
+
export const TextareaResize: FC = () => (
|
|
7
|
+
<KolForm className="grid gap-4">
|
|
8
|
+
<KolTextarea _id="text-both" _resize="both" _label="Texteingabe (both)" />
|
|
9
|
+
<KolTextarea _id="text-verical" _resize="vertical" _label="Texteingabe (vertical)" />
|
|
10
|
+
<KolTextarea _id="text-horizontal" _resize="horizontal" _label="Texteingabe (horizontal)" />
|
|
11
|
+
<KolTextarea _id="text-none" _resize="none" _label="Texteingabe (none)" />
|
|
12
|
+
</KolForm>
|
|
13
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Routes } from '../../shares/types';
|
|
2
|
+
|
|
3
|
+
import { TextareaBasic } from './basic';
|
|
4
|
+
|
|
5
|
+
import { TextareaAdjustHeight } from './adjust-height';
|
|
6
|
+
|
|
7
|
+
import { TextareaDisabled } from './disabled';
|
|
8
|
+
|
|
9
|
+
import { TextareaPlaceholder } from './placeholder';
|
|
10
|
+
|
|
11
|
+
import { TextareaReadOnly } from './readonly';
|
|
12
|
+
|
|
13
|
+
import { TextareaResize } from './resize';
|
|
14
|
+
|
|
15
|
+
import { TextareaRows } from './rows';
|
|
16
|
+
|
|
17
|
+
export const TEXTAREA_ROUTES: Routes = {
|
|
18
|
+
textarea: {
|
|
19
|
+
basic: TextareaBasic,
|
|
20
|
+
'adjust-height': TextareaAdjustHeight,
|
|
21
|
+
disabled: TextareaDisabled,
|
|
22
|
+
placeholder: TextareaPlaceholder,
|
|
23
|
+
readonly: TextareaReadOnly,
|
|
24
|
+
resize: TextareaResize,
|
|
25
|
+
rows: TextareaRows,
|
|
26
|
+
},
|
|
27
|
+
};
|