trepur_components 2.3.3 → 2.3.4
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/.eslintrc.cjs +43 -0
- package/.husky/pre-commit +4 -0
- package/.prettierrc.json +22 -0
- package/archive/Breadcrumbs/Breadcrumbs.stories.tsx +46 -0
- package/archive/Breadcrumbs/index.tsx +42 -0
- package/archive/BreadcrumbsBordered/BreadcrumbsBordered.stories.tsx +52 -0
- package/archive/BreadcrumbsBordered/index.tsx +44 -0
- package/archive/BreadcrumbsItem/BreadcrumbsItem.stories.tsx +40 -0
- package/archive/BreadcrumbsItem/index.tsx +149 -0
- package/archive/Button/Button.stories.tsx +150 -0
- package/archive/Button/index.tsx +111 -0
- package/archive/Button/style.module.css +76 -0
- package/archive/Calendar/Calendar.stories.tsx +82 -0
- package/archive/Calendar/index.tsx +76 -0
- package/archive/Calendar/style.css +233 -0
- package/archive/Card/Card.stories.tsx +75 -0
- package/archive/Card/index.tsx +102 -0
- package/archive/Card/style.module.css +75 -0
- package/archive/CardWithTopImage/CardWithTopImage.stories.tsx +50 -0
- package/archive/CardWithTopImage/index.tsx +39 -0
- package/archive/CardWithTopImage/style.module.css +11 -0
- package/archive/Carousel/Carousel.stories.tsx +451 -0
- package/archive/Carousel/index.tsx +388 -0
- package/archive/Carousel/style.module.css +99 -0
- package/archive/CarouselThumbnail/CarouselThumbnail.stories.tsx +350 -0
- package/archive/CarouselThumbnail/index.tsx +302 -0
- package/archive/CarouselThumbnail/style.module.css +67 -0
- package/archive/Checkbox/Checkbox.mdx +33 -0
- package/archive/Checkbox/Checkbox.stories.tsx +34 -0
- package/archive/Checkbox/index.tsx +51 -0
- package/archive/Checkbox/style.module.css +15 -0
- package/archive/Collapsible/Collapsible.stories.tsx +67 -0
- package/archive/Collapsible/index.tsx +116 -0
- package/archive/Collapsible/style.module.css +47 -0
- package/archive/Column/Column.stories.tsx +89 -0
- package/archive/Column/index.tsx +119 -0
- package/archive/Column/style.module.css +151 -0
- package/archive/ComponentWrapper/ComponentWrapper.stories.tsx +40 -0
- package/archive/ComponentWrapper/index.tsx +55 -0
- package/archive/ComponentWrapper/style.module.css +40 -0
- package/archive/Container/Container.stories.tsx +40 -0
- package/archive/Container/index.tsx +24 -0
- package/archive/Container/style.module.css +4 -0
- package/archive/Counter/Counter.stories.tsx +19 -0
- package/archive/Counter/index.tsx +66 -0
- package/archive/Counter/style.module.css +19 -0
- package/archive/DetailUpdater/DetailUpdater.stories.tsx +96 -0
- package/archive/DetailUpdater/index.tsx +112 -0
- package/archive/DetailUpdater/style.module.css +31 -0
- package/archive/Dialog/Dialog.stories.tsx +131 -0
- package/archive/Dialog/index.tsx +91 -0
- package/archive/Dialog/style.module.css +44 -0
- package/archive/DropdownMenu/DropdownMenu.stories.tsx +59 -0
- package/archive/DropdownMenu/index.tsx +51 -0
- package/archive/DropdownMenu/style.module.css +38 -0
- package/archive/DynamicTextSection/DynamicTextSection.stories.tsx +74 -0
- package/archive/DynamicTextSection/index.tsx +36 -0
- package/archive/DynamicTextSection/style.module.css +0 -0
- package/archive/FileUploader/FilePreview.tsx +48 -0
- package/archive/FileUploader/FileUploader.stories.tsx +28 -0
- package/archive/FileUploader/index.tsx +135 -0
- package/archive/FileUploader/style.module.css +54 -0
- package/archive/FilterItem/FilterItem.stories.tsx +33 -0
- package/archive/FilterItem/index.tsx +101 -0
- package/archive/FilterItem/style.module.css +27 -0
- package/archive/Footer/Footer.stories.tsx +59 -0
- package/archive/Footer/index.tsx +50 -0
- package/archive/Footer/style.module.css +19 -0
- package/archive/FooterNav/FooterNav.stories.tsx +125 -0
- package/archive/FooterNav/index.tsx +57 -0
- package/archive/FooterNav/style.module.css +32 -0
- package/archive/FooterNavItem/FooterNavItem.stories.tsx +53 -0
- package/archive/FooterNavItem/index.tsx +80 -0
- package/archive/FooterNavItem/style.module.css +139 -0
- package/archive/Form/Form.stories.tsx +86 -0
- package/archive/Form/index.tsx +61 -0
- package/archive/Form/style.module.css +0 -0
- package/archive/FyreCard/FyreCard.stories.tsx +31 -0
- package/archive/FyreCard/index.tsx +52 -0
- package/archive/FyreCard/style.module.css +19 -0
- package/archive/Greeting/Greeting.stories.tsx +41 -0
- package/archive/Greeting/index.tsx +32 -0
- package/archive/HamburgerIcon/HamburgerIcon.stories.tsx +32 -0
- package/archive/HamburgerIcon/index.tsx +103 -0
- package/archive/HamburgerIcon/style.module.css +85 -0
- package/archive/HorizontalLine/HorizontalLine.stories.tsx +54 -0
- package/archive/HorizontalLine/index.tsx +40 -0
- package/archive/HorizontalLine/style.module.css +55 -0
- package/archive/Icon/Icon.stories.tsx +164 -0
- package/archive/Icon/index.tsx +115 -0
- package/archive/Icon/style.module.css +253 -0
- package/archive/IconCard/IconCard.stories.tsx +46 -0
- package/archive/IconCard/index.tsx +57 -0
- package/archive/IconCard/style.module.css +18 -0
- package/archive/Image/Image.stories.tsx +87 -0
- package/archive/Image/index.tsx +132 -0
- package/archive/Image/style.module.css +109 -0
- package/archive/ImageInfo/ImageInfo.stories.tsx +39 -0
- package/archive/ImageInfo/index.tsx +95 -0
- package/archive/ImageInfo/style.module.css +47 -0
- package/archive/ImageLink/ImageLink.stories.tsx +37 -0
- package/archive/ImageLink/index.tsx +49 -0
- package/archive/ImageLink/style.module.css +23 -0
- package/archive/ImageLinkList/ImageLinkList.stories.tsx +34 -0
- package/archive/ImageLinkList/index.tsx +33 -0
- package/archive/ImageLinkList/style.module.css +3 -0
- package/archive/InformationIcon/InformationIcon.stories.tsx +83 -0
- package/archive/InformationIcon/index.tsx +128 -0
- package/archive/InformationIcon/style.module.css +71 -0
- package/archive/InformationIconBlock/InformationIconBlock.stories.tsx +32 -0
- package/archive/InformationIconBlock/index.tsx +63 -0
- package/archive/InformationIconBlock/style.module.css +7 -0
- package/archive/Input/Input.stories.tsx +84 -0
- package/archive/Input/index.tsx +131 -0
- package/archive/Input/style.module.css +60 -0
- package/archive/Jumbotron/Jumbotron.stories.tsx +21 -0
- package/archive/Jumbotron/index.tsx +31 -0
- package/archive/Jumbotron/style.module.css +8 -0
- package/archive/MenuButton/MenuButton.stories.tsx +46 -0
- package/archive/MenuButton/index.tsx +82 -0
- package/archive/MenuButton/style.module.css +45 -0
- package/archive/Modal/Modal.stories.tsx +86 -0
- package/archive/Modal/index.tsx +74 -0
- package/archive/Modal/style.module.css +35 -0
- package/archive/NavItem/NavItem.stories.tsx +90 -0
- package/archive/NavItem/index.tsx +65 -0
- package/archive/NavItem/style.module.css +71 -0
- package/archive/NavOld/NavOld.stories.tsx +193 -0
- package/archive/NavOld/StickyNav.tsx +191 -0
- package/archive/NavOld/index.tsx +273 -0
- package/archive/NavOld/style.module.css +156 -0
- package/archive/NavTwo/Dropdown.tsx +35 -0
- package/archive/NavTwo/Nav.stories.tsx +38 -0
- package/archive/NavTwo/Sidebar.tsx +34 -0
- package/archive/NavTwo/StickyNav.tsx +34 -0
- package/archive/NavTwo/index.tsx +45 -0
- package/archive/NavTwo/style.module.css +35 -0
- package/archive/NewsCard/NewsCard.stories.tsx +72 -0
- package/archive/NewsCard/index.tsx +57 -0
- package/archive/NewsCard/style.module.css +15 -0
- package/archive/Pill/Pill.stories.tsx +44 -0
- package/archive/Pill/index.tsx +64 -0
- package/archive/Pill/style.module.css +32 -0
- package/archive/ProductCard/ProductCard.stories.tsx +61 -0
- package/archive/ProductCard/index.tsx +111 -0
- package/archive/ProductCard/style.module.css +53 -0
- package/archive/ProductCardV2/ProductCardV2.stories.tsx +50 -0
- package/archive/ProductCardV2/index.tsx +119 -0
- package/archive/ProductCardV2/style.module.css +59 -0
- package/archive/Proficiencies/Proficiencies.stories.tsx +50 -0
- package/archive/Proficiencies/index.tsx +63 -0
- package/archive/Proficiencies/style.module.css +31 -0
- package/archive/Profile/Profile.stories.tsx +49 -0
- package/archive/Profile/index.tsx +103 -0
- package/archive/Profile/style.module.css +47 -0
- package/archive/Row/Row.stories.tsx +53 -0
- package/archive/Row/index.tsx +23 -0
- package/archive/Row/style.module.css +3 -0
- package/archive/Search/Search.stories.tsx +63 -0
- package/archive/Search/index.tsx +68 -0
- package/archive/Search/style.module.css +23 -0
- package/archive/Select/Select.stories.tsx +56 -0
- package/archive/Select/index.tsx +106 -0
- package/archive/Select/style.module.css +52 -0
- package/archive/Showcase/Showcase.stories.tsx +30 -0
- package/archive/Showcase/index.tsx +75 -0
- package/archive/Showcase/style.module.css +47 -0
- package/archive/SideNav/SideNav.stories.tsx +50 -0
- package/archive/SideNav/index.tsx +46 -0
- package/archive/SideNav/style.module.css +43 -0
- package/archive/SocialBlock/SocialBlock.stories.tsx +58 -0
- package/archive/SocialBlock/index.tsx +63 -0
- package/archive/SocialButton/SocialButton.stories.tsx +88 -0
- package/archive/SocialButton/index.tsx +71 -0
- package/archive/SocialButton/style.module.css +77 -0
- package/archive/StarRating/StarRating.stories.tsx +23 -0
- package/archive/StarRating/index.tsx +71 -0
- package/archive/Testimonial/Testimonial.stories.tsx +110 -0
- package/archive/Testimonial/index.tsx +61 -0
- package/archive/Testimonial/style.module.css +27 -0
- package/archive/TextAndTitle/TextAndTitle.stories.tsx +70 -0
- package/archive/TextAndTitle/index.tsx +123 -0
- package/archive/TextAndTitle/style.module.css +75 -0
- package/archive/TextArea/TextArea.stories.tsx +55 -0
- package/archive/TextArea/index.tsx +125 -0
- package/archive/TextArea/style.module.css +60 -0
- package/archive/Timeline/Timeline.stories.tsx +92 -0
- package/archive/Timeline/index.tsx +254 -0
- package/archive/Timeline/style.module.css +134 -0
- package/archive/TimelineV2/TimelineV2.stories.tsx +95 -0
- package/archive/TimelineV2/index.tsx +70 -0
- package/archive/TimelineV2/style.module.css +28 -0
- package/archive/Tubestops/Tubestops.stories.tsx +42 -0
- package/archive/Tubestops/index.tsx +58 -0
- package/archive/Tubestops/style.module.css +54 -0
- package/archive/UserIcon/UserIcon.stories.tsx +52 -0
- package/archive/UserIcon/index.tsx +46 -0
- package/archive/UserIcon/style.module.css +19 -0
- package/archive/Video/Video.stories.tsx +23 -0
- package/archive/Video/index.tsx +47 -0
- package/archive/fonts/Sora/OFL.txt +93 -0
- package/archive/fonts/Sora/README.txt +70 -0
- package/archive/fonts/Sora/Sora-VariableFont_wght.ttf +0 -0
- package/archive/fonts/Sora/static/Sora-Bold.ttf +0 -0
- package/archive/fonts/Sora/static/Sora-ExtraBold.ttf +0 -0
- package/archive/fonts/Sora/static/Sora-ExtraLight.ttf +0 -0
- package/archive/fonts/Sora/static/Sora-Light.ttf +0 -0
- package/archive/fonts/Sora/static/Sora-Medium.ttf +0 -0
- package/archive/fonts/Sora/static/Sora-Regular.ttf +0 -0
- package/archive/fonts/Sora/static/Sora-SemiBold.ttf +0 -0
- package/archive/fonts/Sora/static/Sora-Thin.ttf +0 -0
- package/archive/theme.ts +39 -0
- package/archive/typography/Fonts/Fonts.stories.tsx +14 -0
- package/archive/typography/Fonts/Fonts.tsx +181 -0
- package/lib/components/Accordion/index.js +10 -10
- package/lib/components/AlertBar/index.js +10 -10
- package/lib/components/index.d.ts +4 -0
- package/lib/index.js +1 -7
- package/package.json +6 -8
- package/src/components/Accordion/Accordion.stories.tsx +116 -0
- package/src/components/Accordion/index.tsx +30 -0
- package/src/components/AlertBar/AlertBar.stories.tsx +95 -0
- package/src/components/AlertBar/index.tsx +115 -0
- package/src/components/Avatar/Avatar.stories.tsx +19 -0
- package/src/components/Avatar/index.tsx +495 -0
- package/src/components/index.ts +119 -0
- package/src/documentation/Colours.mdx +192 -0
- package/src/documentation/Introduction.mdx +9 -0
- package/src/index.ts +1 -0
- package/src/styles/base.css +116 -0
- package/src/utils/controls.ts +44 -0
- package/src/utils/matchMedia.ts +9 -0
- package/src/utils/screens.ts +7 -0
- package/storybook-build/assets/Accordion.stories-Cn994N1H.js +103 -0
- package/storybook-build/assets/AlertBar.stories-BkzNXFBh.js +202 -0
- package/storybook-build/assets/Avatar.stories-CpH6xVwM.js +418 -0
- package/storybook-build/assets/Color-6VNJS4EI-DQV2onvt.js +1378 -0
- package/storybook-build/assets/Colours-r29qjFlW.js +324 -0
- package/storybook-build/assets/DocsRenderer-NNNQARDV-OgWasCIs.js +44 -0
- package/storybook-build/assets/Introduction-Bs1PgnBZ.js +40 -0
- package/storybook-build/assets/WithTooltip-V3YHNWJZ-vi2V5TOO.js +15 -0
- package/storybook-build/assets/_commonjsHelpers-LQfde5yM.js +35 -0
- package/storybook-build/assets/axe-DnFZVv9V.js +32561 -0
- package/storybook-build/assets/chunk-EIRT5I3Z-DFD8udmD.js +480 -0
- package/storybook-build/assets/context-CIRBAiUz.js +20 -0
- package/storybook-build/assets/controls-DJSGrQKd.js +23 -0
- package/storybook-build/assets/entry-preview-DmlPV4-3.js +41 -0
- package/storybook-build/assets/entry-preview-docs-D46Drugi.js +11861 -0
- package/storybook-build/assets/formatter-SWP5E3XI-BWIasvKP.js +14427 -0
- package/storybook-build/assets/iframe-Dzzzanqi.js +144 -0
- package/storybook-build/assets/index-0FT4HXk-.js +7222 -0
- package/storybook-build/assets/index-B9Tccxv4.js +107 -0
- package/storybook-build/assets/index-BdOSk9or.js +41 -0
- package/storybook-build/assets/index-CU7cYjZD.js +9604 -0
- package/storybook-build/assets/index-Clz-aGG3.js +39 -0
- package/storybook-build/assets/index-CpyNLP69.js +63 -0
- package/storybook-build/assets/index-DM9bPmif.js +319 -0
- package/storybook-build/assets/index-ex9_VrIg.js +3734 -0
- package/storybook-build/assets/jsx-runtime-D2-sc1j1.js +35 -0
- package/storybook-build/assets/preview-3kSipVgK.js +430 -0
- package/storybook-build/assets/preview-B4rAxPmB.js +27 -0
- package/storybook-build/assets/preview-BMkwWyrh.js +2920 -0
- package/storybook-build/assets/preview-BeQelhbu.js +204 -0
- package/storybook-build/assets/preview-BiG-rflf.js +2444 -0
- package/storybook-build/assets/preview-BiYUJ7TP.js +22 -0
- package/storybook-build/assets/preview-C4ItOQzM.js +34 -0
- package/storybook-build/assets/preview-CWyhKACi.css +886 -0
- package/storybook-build/assets/preview-CtOV68TG.js +10 -0
- package/storybook-build/assets/preview-De9E9xaR.js +140 -0
- package/storybook-build/assets/preview-bL4x2zrN.js +99 -0
- package/storybook-build/assets/preview-gxqyGMHu.js +323 -0
- package/storybook-build/assets/react-18-B-gfo82w.js +29 -0
- package/storybook-build/assets/syntaxhighlighter-B5GMVT5T-DrY_Dc6-.js +15 -0
- package/storybook-build/favicon.svg +7 -0
- package/storybook-build/iframe.html +458 -0
- package/storybook-build/index.html +163 -0
- package/storybook-build/index.json +1 -0
- package/storybook-build/preview-stats.json +172 -0
- package/storybook-build/project.json +1 -0
- package/storybook-build/sb-addons/a11y-9/manager-bundle.js +3 -0
- package/storybook-build/sb-addons/a11y-9/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
- package/storybook-build/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/essentials-backgrounds-3/manager-bundle.js +12 -0
- package/storybook-build/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/essentials-controls-1/manager-bundle.js +63 -0
- package/storybook-build/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +18 -0
- package/storybook-build/sb-addons/essentials-measure-6/manager-bundle.js +3 -0
- package/storybook-build/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/essentials-outline-7/manager-bundle.js +3 -0
- package/storybook-build/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/essentials-toolbars-5/manager-bundle.js +3 -0
- package/storybook-build/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/essentials-viewport-4/manager-bundle.js +3 -0
- package/storybook-build/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/interactions-8/manager-bundle.js +12 -0
- package/storybook-build/sb-addons/interactions-8/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/links-0/manager-bundle.js +3 -0
- package/storybook-build/sb-addons/links-0/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/storybook-12/manager-bundle.js +151 -0
- package/storybook-build/sb-addons/storybook-12/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/storybook-react-i18next-11/manager-bundle.js +3 -0
- package/storybook-build/sb-addons/storybook-react-i18next-11/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-addons/themes-10/register-bundle.js +5 -0
- package/storybook-build/sb-addons/themes-10/register-bundle.js.LEGAL.txt +0 -0
- package/storybook-build/sb-common-assets/fonts.css +31 -0
- package/storybook-build/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-build/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-build/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-build/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-build/sb-manager/WithTooltip-V3YHNWJZ-TRLNWEGW.js +1 -0
- package/storybook-build/sb-manager/chunk-4IYAVH3S.js +348 -0
- package/storybook-build/sb-manager/chunk-CXYKRFSY.js +9 -0
- package/storybook-build/sb-manager/chunk-KZYAAUOR.js +406 -0
- package/storybook-build/sb-manager/chunk-LVLAH4SI.js +7 -0
- package/storybook-build/sb-manager/chunk-ZEU7PDD3.js +1 -0
- package/storybook-build/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js +156 -0
- package/storybook-build/sb-manager/globals-module-info.js +1 -0
- package/storybook-build/sb-manager/globals.js +1 -0
- package/storybook-build/sb-manager/index.js +1 -0
- package/storybook-build/sb-manager/runtime.js +1 -0
- package/storybook-build/sb-manager/syntaxhighlighter-B5GMVT5T-EA5ASEYD.js +1 -0
- package/storybook-build/sb-preview/globals.js +1 -0
- package/storybook-build/sb-preview/runtime.js +112 -0
- package/storybook-build/src/components/Accordion/Accordion.stories.d.ts +94 -0
- package/storybook-build/src/components/Accordion/index.d.ts +9 -0
- package/storybook-build/src/components/AlertBar/AlertBar.stories.d.ts +162 -0
- package/storybook-build/src/components/AlertBar/index.d.ts +13 -0
- package/storybook-build/src/components/Avatar/Avatar.stories.d.ts +44 -0
- package/storybook-build/src/components/Avatar/index.d.ts +4 -0
- package/storybook-build/src/index.d.ts +1 -0
- package/storybook-build/src/utils/controls.d.ts +36 -0
- package/storybook-build/src/utils/matchMedia.d.ts +2 -0
- package/storybook-build/src/utils/screens.d.ts +7 -0
- package/storybook-build/src/utils/theme.d.ts +3 -0
- package/storybook-build/stories.json +1 -0
- package/storybook-build/styles/base.css +116 -0
- package/svg.d.ts +4 -0
- package/tailwind.config.ts +81 -0
- package/tsconfig.json +43 -0
- package/tsconfig.node.json +12 -0
- package/vite.config.mjs +64 -0
- package/lib/archive/Breadcrumbs/index.js +0 -12
- package/lib/archive/BreadcrumbsBordered/index.js +0 -25
- package/lib/archive/BreadcrumbsItem/index.js +0 -117
- /package/lib/{src/components → components}/Accordion/Accordion.stories.d.ts +0 -0
- /package/lib/{src/components → components}/Accordion/index.d.ts +0 -0
- /package/lib/{src/components → components}/AlertBar/AlertBar.stories.d.ts +0 -0
- /package/lib/{src/components → components}/AlertBar/index.d.ts +0 -0
- /package/lib/{src/components → components}/Avatar/Avatar.stories.d.ts +0 -0
- /package/lib/{src/components → components}/Avatar/index.d.ts +0 -0
- /package/lib/{src/index.d.ts → index.d.ts} +0 -0
- /package/lib/{src/utils → utils}/controls.d.ts +0 -0
- /package/lib/{src/utils → utils}/matchMedia.d.ts +0 -0
- /package/lib/{src/utils → utils}/screens.d.ts +0 -0
- /package/{lib → storybook-build}/src/components/index.d.ts +0 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
var _a, _b, _c;
|
|
2
|
+
import { i as idAndClassName } from "./controls-DJSGrQKd.js";
|
|
3
|
+
import { j as jsxRuntimeExports } from "./jsx-runtime-D2-sc1j1.js";
|
|
4
|
+
import { r as reactExports } from "./index-DM9bPmif.js";
|
|
5
|
+
import { c as classNames } from "./index-CpyNLP69.js";
|
|
6
|
+
import "./_commonjsHelpers-LQfde5yM.js";
|
|
7
|
+
const AlertBar = ({
|
|
8
|
+
id,
|
|
9
|
+
className,
|
|
10
|
+
type = "warning",
|
|
11
|
+
text,
|
|
12
|
+
// leftIconProps,
|
|
13
|
+
// rightIconProps,
|
|
14
|
+
textCenter = false,
|
|
15
|
+
isDismissable = false,
|
|
16
|
+
onDismissClick
|
|
17
|
+
}) => {
|
|
18
|
+
const [alertBarStatus, setAlertBarStatus] = reactExports.useState({
|
|
19
|
+
state: "open",
|
|
20
|
+
display: true
|
|
21
|
+
});
|
|
22
|
+
const bgColor = classNames({
|
|
23
|
+
"bg-success": type === "success",
|
|
24
|
+
"bg-warning": type === "warning",
|
|
25
|
+
"bg-error": type === "error",
|
|
26
|
+
"bg-info-light": type === "info"
|
|
27
|
+
});
|
|
28
|
+
const alertBarState = classNames({
|
|
29
|
+
"opacity-100": alertBarStatus.state === "open",
|
|
30
|
+
"opacity-0": alertBarStatus.state === "closed",
|
|
31
|
+
hidden: !alertBarStatus.display
|
|
32
|
+
});
|
|
33
|
+
const classList = classNames(
|
|
34
|
+
className,
|
|
35
|
+
bgColor,
|
|
36
|
+
alertBarState,
|
|
37
|
+
"flex py-2 text-white duration-700 theme-local w-parent transition-opactiy"
|
|
38
|
+
);
|
|
39
|
+
const textClassList = classNames(
|
|
40
|
+
{
|
|
41
|
+
"text-center": textCenter
|
|
42
|
+
// 'pl-20': !textCenter && leftIconProps !== null,
|
|
43
|
+
// 'pl-4': !textCenter && leftIconProps === null,
|
|
44
|
+
},
|
|
45
|
+
"w-full py-3"
|
|
46
|
+
);
|
|
47
|
+
classNames(
|
|
48
|
+
{
|
|
49
|
+
"hover:cursor-pointer": isDismissable
|
|
50
|
+
},
|
|
51
|
+
"absolute right-0 pr-8 pt-3"
|
|
52
|
+
);
|
|
53
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id, className: classList, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: textClassList, children: text }) });
|
|
54
|
+
};
|
|
55
|
+
try {
|
|
56
|
+
AlertBar.displayName = "AlertBar";
|
|
57
|
+
AlertBar.__docgenInfo = { "description": "", "displayName": "AlertBar", "props": { "id": { "defaultValue": null, "description": "", "name": "id", "required": false, "type": { "name": "string" } }, "className": { "defaultValue": null, "description": "", "name": "className", "required": false, "type": { "name": "string" } }, "type": { "defaultValue": { value: "warning" }, "description": "", "name": "type", "required": false, "type": { "name": "enum", "value": [{ "value": '"success"' }, { "value": '"warning"' }, { "value": '"error"' }, { "value": '"info"' }] } }, "text": { "defaultValue": null, "description": "", "name": "text", "required": false, "type": { "name": "string" } }, "textCenter": { "defaultValue": { value: "false" }, "description": "", "name": "textCenter", "required": false, "type": { "name": "boolean" } }, "isDismissable": { "defaultValue": { value: "false" }, "description": "", "name": "isDismissable", "required": false, "type": { "name": "boolean" } }, "onDismissClick": { "defaultValue": null, "description": "", "name": "onDismissClick", "required": false, "type": { "name": "MouseEventHandler" } } } };
|
|
58
|
+
} catch (__react_docgen_typescript_loader_error) {
|
|
59
|
+
}
|
|
60
|
+
const meta = {
|
|
61
|
+
title: "Components/Alert Bar",
|
|
62
|
+
component: AlertBar,
|
|
63
|
+
argTypes: {
|
|
64
|
+
...idAndClassName,
|
|
65
|
+
type: {
|
|
66
|
+
type: {
|
|
67
|
+
name: "string",
|
|
68
|
+
required: false
|
|
69
|
+
},
|
|
70
|
+
options: ["success", "warning", "error", "info"],
|
|
71
|
+
description: "The type of alert to render",
|
|
72
|
+
table: {
|
|
73
|
+
type: {
|
|
74
|
+
summary: "warning"
|
|
75
|
+
},
|
|
76
|
+
defaultValue: {
|
|
77
|
+
summary: "warning"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
defaultValue: "warning",
|
|
81
|
+
control: {
|
|
82
|
+
type: "radio"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
text: {
|
|
86
|
+
type: {
|
|
87
|
+
name: "string",
|
|
88
|
+
required: false
|
|
89
|
+
},
|
|
90
|
+
description: "The text to display in the component",
|
|
91
|
+
table: {
|
|
92
|
+
type: {
|
|
93
|
+
summary: "string"
|
|
94
|
+
},
|
|
95
|
+
defaultValue: {
|
|
96
|
+
summary: "undefined"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
leftIconProps: {
|
|
101
|
+
description: "The icon props for the icon to display aligned to the left",
|
|
102
|
+
table: {
|
|
103
|
+
category: "",
|
|
104
|
+
type: {
|
|
105
|
+
summary: "string"
|
|
106
|
+
},
|
|
107
|
+
defaultValue: {
|
|
108
|
+
summary: "undefined"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
rightIconProps: {
|
|
113
|
+
description: "The icon props for the icon to display aligned to the right",
|
|
114
|
+
table: {
|
|
115
|
+
category: "",
|
|
116
|
+
type: {
|
|
117
|
+
summary: "string"
|
|
118
|
+
},
|
|
119
|
+
defaultValue: {
|
|
120
|
+
summary: "undefined"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
textCenter: {
|
|
125
|
+
type: {
|
|
126
|
+
name: "boolean",
|
|
127
|
+
required: false
|
|
128
|
+
},
|
|
129
|
+
description: "Aligns the text in the center of the component",
|
|
130
|
+
table: {
|
|
131
|
+
type: {
|
|
132
|
+
summary: "boolean"
|
|
133
|
+
},
|
|
134
|
+
defaultValue: {
|
|
135
|
+
summary: "false"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
defaultValue: "false"
|
|
139
|
+
},
|
|
140
|
+
isDismissable: {
|
|
141
|
+
type: {
|
|
142
|
+
name: "boolean",
|
|
143
|
+
required: false
|
|
144
|
+
},
|
|
145
|
+
description: "Enables the component to be closed when set to true",
|
|
146
|
+
table: {
|
|
147
|
+
type: {
|
|
148
|
+
summary: "boolean"
|
|
149
|
+
},
|
|
150
|
+
defaultValue: {
|
|
151
|
+
summary: "false"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
defaultValue: "false"
|
|
155
|
+
},
|
|
156
|
+
onDismissClick: {
|
|
157
|
+
type: {
|
|
158
|
+
name: "function",
|
|
159
|
+
required: false
|
|
160
|
+
},
|
|
161
|
+
description: "The action to perform when the component is closed",
|
|
162
|
+
action: "onClick",
|
|
163
|
+
table: {
|
|
164
|
+
type: {
|
|
165
|
+
summary: "function"
|
|
166
|
+
},
|
|
167
|
+
defaultValue: {
|
|
168
|
+
summary: "undefined"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
args: {
|
|
174
|
+
text: "This is an alert bar message",
|
|
175
|
+
leftIconProps: {
|
|
176
|
+
type: "heart",
|
|
177
|
+
colour: "white",
|
|
178
|
+
hollow: true
|
|
179
|
+
},
|
|
180
|
+
rightIconProps: {
|
|
181
|
+
type: "heart",
|
|
182
|
+
colour: "white"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
const Default = {};
|
|
187
|
+
Default.parameters = {
|
|
188
|
+
...Default.parameters,
|
|
189
|
+
docs: {
|
|
190
|
+
...(_a = Default.parameters) == null ? void 0 : _a.docs,
|
|
191
|
+
source: {
|
|
192
|
+
originalSource: "{}",
|
|
193
|
+
...(_c = (_b = Default.parameters) == null ? void 0 : _b.docs) == null ? void 0 : _c.source
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
const __namedExportsOrder = ["Default"];
|
|
198
|
+
export {
|
|
199
|
+
Default,
|
|
200
|
+
__namedExportsOrder,
|
|
201
|
+
meta as default
|
|
202
|
+
};
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
var _a, _b, _c;
|
|
2
|
+
import { i as idAndClassName } from "./controls-DJSGrQKd.js";
|
|
3
|
+
import { j as jsxRuntimeExports } from "./jsx-runtime-D2-sc1j1.js";
|
|
4
|
+
import { r as reactExports } from "./index-DM9bPmif.js";
|
|
5
|
+
import "./_commonjsHelpers-LQfde5yM.js";
|
|
6
|
+
let Snap;
|
|
7
|
+
if (typeof window !== "undefined") {
|
|
8
|
+
Snap = require("snapsvg-cjs");
|
|
9
|
+
}
|
|
10
|
+
const Avatar = () => {
|
|
11
|
+
const [s, setS] = reactExports.useState(null);
|
|
12
|
+
let rightEyeWhite, rightEyePupil, leftEyeWhite, leftEyePupil, avatar, armless, torso, face, legs, rightArm, leftArm, rightHand, leftHand, arms, straps, hands, leftThigh, rightThigh, leftShoe, rightShoe;
|
|
13
|
+
const leftShoulderRotationPoints = "175, 202";
|
|
14
|
+
const rightShoulderRotationPoints = "94, 202";
|
|
15
|
+
const svgContainerHeight = 400;
|
|
16
|
+
const svgContainerWidth = 265;
|
|
17
|
+
const skinColour = "#FFCC9A";
|
|
18
|
+
const zipColour = "#315107";
|
|
19
|
+
const eyeColour = "#1389BF";
|
|
20
|
+
const hairColour = "#F1B452";
|
|
21
|
+
const beardColour = "#F1B452";
|
|
22
|
+
const rucksackColour = "#072765";
|
|
23
|
+
const trouserColour = "#D3D3D3";
|
|
24
|
+
const jacketColour = "#416E0A";
|
|
25
|
+
const mouthColour = "#DC7144";
|
|
26
|
+
const shoeColour = "#000000";
|
|
27
|
+
const eyebrowColour = "#F1B452";
|
|
28
|
+
const noseColour = "#F1B452";
|
|
29
|
+
const createAvatar = (s2, callBack) => {
|
|
30
|
+
var _a2, _b2, _c2, _d;
|
|
31
|
+
if (typeof window === "undefined")
|
|
32
|
+
return;
|
|
33
|
+
const head = s2 == null ? void 0 : s2.rect(103, 90, 68, 87, 50).attr({ fill: skinColour });
|
|
34
|
+
const leftEyebrow = s2 == null ? void 0 : s2.rect(146, 122, 12, 3, 2);
|
|
35
|
+
const rightEyebrow = s2 == null ? void 0 : s2.rect(115, 122, 12, 3, 2);
|
|
36
|
+
leftEyeWhite = s2 == null ? void 0 : s2.ellipse(152, 132, 6, 4);
|
|
37
|
+
rightEyeWhite = s2 == null ? void 0 : s2.ellipse(121, 132, 6, 4);
|
|
38
|
+
leftEyePupil = s2 == null ? void 0 : s2.ellipse(152, 132, 3, 3).attr({ fill: eyeColour });
|
|
39
|
+
rightEyePupil = s2 == null ? void 0 : s2.ellipse(121, 132, 3, 3).attr({ fill: eyeColour });
|
|
40
|
+
const leftEye = s2 == null ? void 0 : s2.group(leftEyeWhite, leftEyePupil);
|
|
41
|
+
const rightEye = s2 == null ? void 0 : s2.group(rightEyeWhite, rightEyePupil);
|
|
42
|
+
const outerBeard = s2 == null ? void 0 : s2.rect(103, 90, 68, 87, 50).attr({ fill: "white" });
|
|
43
|
+
const innerBeard = s2 == null ? void 0 : s2.rect(106, 105, 62, 62, 50);
|
|
44
|
+
const beardGroup = s2 == null ? void 0 : s2.group(outerBeard, innerBeard);
|
|
45
|
+
const beard = s2 == null ? void 0 : s2.rect(103, 140, 68, 60).attr({
|
|
46
|
+
mask: beardGroup,
|
|
47
|
+
fill: beardColour,
|
|
48
|
+
opacity: 0.6
|
|
49
|
+
});
|
|
50
|
+
const outerHair = s2 == null ? void 0 : s2.rect(103, 90, 68, 60, 25).attr({ fill: "white" });
|
|
51
|
+
const innerHair = s2 == null ? void 0 : s2.rect(109, 105, 56, 40, 10);
|
|
52
|
+
const hairGroup = s2 == null ? void 0 : s2.group(outerHair, innerHair);
|
|
53
|
+
const baseHair = s2 == null ? void 0 : s2.rect(103, 90, 68, 40).attr({
|
|
54
|
+
mask: hairGroup,
|
|
55
|
+
fill: hairColour
|
|
56
|
+
});
|
|
57
|
+
const hairLevel1 = s2 == null ? void 0 : s2.rect(113, 88, 50, 16, 10).attr({ fill: hairColour }).transform("r0");
|
|
58
|
+
const hair = s2 == null ? void 0 : s2.group(baseHair, hairLevel1);
|
|
59
|
+
const outerNose = (_a2 = s2 == null ? void 0 : s2.rect(129, 140, 12, 10, 30)) == null ? void 0 : _a2.attr({ fill: "white" });
|
|
60
|
+
const innerNose = s2 == null ? void 0 : s2.rect(130, 142, 10, 12, 30);
|
|
61
|
+
const noseGroup = s2 == null ? void 0 : s2.group(outerNose, innerNose);
|
|
62
|
+
const nose = (_b2 = s2 == null ? void 0 : s2.rect(129, 140, 12, 10)) == null ? void 0 : _b2.attr({
|
|
63
|
+
mask: noseGroup,
|
|
64
|
+
fill: noseColour
|
|
65
|
+
});
|
|
66
|
+
const leftEar = (_c2 = s2 == null ? void 0 : s2.circle(103, 135, 5)) == null ? void 0 : _c2.attr({ fill: "white" });
|
|
67
|
+
const leftEarMask = s2 == null ? void 0 : s2.rect(89, 120, 15, 30).attr({
|
|
68
|
+
mask: leftEar,
|
|
69
|
+
fill: skinColour
|
|
70
|
+
}).transform("r-2");
|
|
71
|
+
const rightEar = (_d = s2 == null ? void 0 : s2.circle(171, 135, 5)) == null ? void 0 : _d.attr({ fill: "white" });
|
|
72
|
+
const rightEarMask = s2 == null ? void 0 : s2.rect(170, 120, 15, 30).attr({
|
|
73
|
+
mask: rightEar,
|
|
74
|
+
fill: skinColour
|
|
75
|
+
}).transform("r2");
|
|
76
|
+
const body = s2 == null ? void 0 : s2.rect(100, 188, 73, 105, 16, 16).attr({ fill: jacketColour });
|
|
77
|
+
const hood = s2 == null ? void 0 : s2.ellipse(136, 182, 24, 10).attr({ fill: jacketColour });
|
|
78
|
+
const rightShoulder = s2 == null ? void 0 : s2.rect(87, 190, 27, 14, 10);
|
|
79
|
+
rightArm = s2 == null ? void 0 : s2.rect(84, 195, 16, 90, 10, 10);
|
|
80
|
+
const leftShoulder = s2 == null ? void 0 : s2.rect(155, 190, 27, 14, 10);
|
|
81
|
+
leftArm = s2 == null ? void 0 : s2.rect(170, 195, 16, 90, 10, 10);
|
|
82
|
+
leftHand = s2 == null ? void 0 : s2.circle(178, 278, 8);
|
|
83
|
+
rightHand = s2 == null ? void 0 : s2.circle(92, 278, 8);
|
|
84
|
+
const wasteBand = s2 == null ? void 0 : s2.rect(98, 277, 74, 33, 0, 0);
|
|
85
|
+
leftThigh = s2 == null ? void 0 : s2.rect(142, 300, 30, 90, 0, 0);
|
|
86
|
+
rightThigh = s2 == null ? void 0 : s2.rect(98, 300, 30, 90, 0, 0);
|
|
87
|
+
const bag = s2 == null ? void 0 : s2.rect(99, 180, 74, 78, 10);
|
|
88
|
+
const rightStrap = s2 == null ? void 0 : s2.rect(101, 185, 5, 100, 10).transform("r4.5");
|
|
89
|
+
const leftStrap = s2 == null ? void 0 : s2.rect(163, 185, 5, 100, 10).transform("r-4.5");
|
|
90
|
+
const mouth = s2 == null ? void 0 : s2.circle(136, 155, 10).attr({ fill: "white" });
|
|
91
|
+
const mouthCutOff = s2 == null ? void 0 : s2.rect(120, 155, 30, 15).attr({ fill: mouthColour });
|
|
92
|
+
const leftShoeTop = s2 == null ? void 0 : s2.rect(142, 370, 30, 20, 10);
|
|
93
|
+
const leftShoeSole = s2 == null ? void 0 : s2.rect(142, 378, 30, 12);
|
|
94
|
+
const rightShoeTop = s2 == null ? void 0 : s2.rect(98, 370, 30, 20, 10);
|
|
95
|
+
const rightShoeSole = s2 == null ? void 0 : s2.rect(98, 378, 30, 12);
|
|
96
|
+
const mainZip = s2 == null ? void 0 : s2.rect(135, 199, 3, 94);
|
|
97
|
+
const leftZip = s2 == null ? void 0 : s2.rect(141, 188, 2, 15).transform("r44.5");
|
|
98
|
+
const rightZip = s2 == null ? void 0 : s2.rect(130, 188, 2, 15).transform("r-44.5");
|
|
99
|
+
const centerNeck = s2 == null ? void 0 : s2.rect(128, 170, 17, 21);
|
|
100
|
+
const leftNeck = s2 == null ? void 0 : s2.rect(139, 181, 10, 10).transform("r-33");
|
|
101
|
+
const rightNeck = s2 == null ? void 0 : s2.rect(124, 181, 10, 10).transform("r33");
|
|
102
|
+
const frontNeck = s2 == null ? void 0 : s2.rect(129, 182, 15, 15).transform("r45");
|
|
103
|
+
const neck = s2 == null ? void 0 : s2.group(centerNeck, leftNeck, rightNeck, frontNeck).attr({ fill: skinColour });
|
|
104
|
+
const zip = s2 == null ? void 0 : s2.group(mainZip, leftZip, rightZip).attr({ fill: zipColour });
|
|
105
|
+
leftShoe = s2 == null ? void 0 : s2.group(leftShoeTop, leftShoeSole);
|
|
106
|
+
rightShoe = s2 == null ? void 0 : s2.group(rightShoeTop, rightShoeSole);
|
|
107
|
+
const rucksack = s2 == null ? void 0 : s2.group(leftStrap, rightStrap, bag).attr({ fill: rucksackColour });
|
|
108
|
+
const eyes = s2 == null ? void 0 : s2.group(leftEye, rightEye).attr({ fill: "white" });
|
|
109
|
+
const eyebrows = s2 == null ? void 0 : s2.group(leftEyebrow, rightEyebrow).attr({ fill: eyebrowColour });
|
|
110
|
+
const shoes = s2 == null ? void 0 : s2.group(leftShoe, rightShoe).attr({ fill: shoeColour });
|
|
111
|
+
const ears = s2 == null ? void 0 : s2.group(leftEarMask, rightEarMask);
|
|
112
|
+
arms = s2 == null ? void 0 : s2.group(rightShoulder, leftShoulder, leftArm, rightArm).attr({ fill: jacketColour });
|
|
113
|
+
hands = s2 == null ? void 0 : s2.group(leftHand, rightHand).attr({ fill: skinColour });
|
|
114
|
+
straps = s2 == null ? void 0 : s2.group(leftStrap, rightStrap).attr({ fill: rucksackColour });
|
|
115
|
+
face = s2 == null ? void 0 : s2.group(
|
|
116
|
+
head,
|
|
117
|
+
eyes,
|
|
118
|
+
eyebrows,
|
|
119
|
+
nose,
|
|
120
|
+
mouth,
|
|
121
|
+
mouthCutOff,
|
|
122
|
+
ears,
|
|
123
|
+
hair,
|
|
124
|
+
beard
|
|
125
|
+
);
|
|
126
|
+
torso = s2 == null ? void 0 : s2.group(rucksack, hood, body, neck, zip);
|
|
127
|
+
legs = s2 == null ? void 0 : s2.group(leftThigh, rightThigh, wasteBand, shoes).attr({ fill: trouserColour });
|
|
128
|
+
armless = s2 == null ? void 0 : s2.group(legs, torso, face);
|
|
129
|
+
avatar = s2 == null ? void 0 : s2.group(armless, arms, straps, hands);
|
|
130
|
+
mouthCutOff == null ? void 0 : mouthCutOff.attr({
|
|
131
|
+
mask: mouth
|
|
132
|
+
});
|
|
133
|
+
callBack(avatar);
|
|
134
|
+
};
|
|
135
|
+
const nextFrame = (s2, frameArray, frame) => {
|
|
136
|
+
if (frame >= frameArray.length) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
Snap.animate(
|
|
140
|
+
frameArray[frame].from,
|
|
141
|
+
frameArray[frame].to,
|
|
142
|
+
frameArray[frame].funct,
|
|
143
|
+
frameArray[frame].dur,
|
|
144
|
+
null,
|
|
145
|
+
nextFrame.bind(null, Snap, frameArray, frame + 1)
|
|
146
|
+
);
|
|
147
|
+
};
|
|
148
|
+
const rightWave = [
|
|
149
|
+
{
|
|
150
|
+
funct: function(val) {
|
|
151
|
+
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
152
|
+
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
153
|
+
},
|
|
154
|
+
from: 0,
|
|
155
|
+
to: 170,
|
|
156
|
+
dur: 100
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
funct: function(val) {
|
|
160
|
+
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
161
|
+
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
162
|
+
},
|
|
163
|
+
from: 170,
|
|
164
|
+
to: 120,
|
|
165
|
+
dur: 100
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
funct: function(val) {
|
|
169
|
+
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
170
|
+
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
171
|
+
},
|
|
172
|
+
from: 120,
|
|
173
|
+
to: 170,
|
|
174
|
+
dur: 100
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
funct: function(val) {
|
|
178
|
+
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
179
|
+
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
180
|
+
},
|
|
181
|
+
from: 170,
|
|
182
|
+
to: 120,
|
|
183
|
+
dur: 100
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
funct: function(val) {
|
|
187
|
+
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
188
|
+
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
189
|
+
},
|
|
190
|
+
from: 120,
|
|
191
|
+
to: 170,
|
|
192
|
+
dur: 100
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
funct: function(val) {
|
|
196
|
+
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
197
|
+
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
198
|
+
},
|
|
199
|
+
from: 170,
|
|
200
|
+
to: 120,
|
|
201
|
+
dur: 100
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
funct: function(val) {
|
|
205
|
+
rightArm.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
206
|
+
rightHand.transform(`r${val},${rightShoulderRotationPoints}`);
|
|
207
|
+
},
|
|
208
|
+
from: 120,
|
|
209
|
+
to: 0,
|
|
210
|
+
dur: 100
|
|
211
|
+
}
|
|
212
|
+
];
|
|
213
|
+
const leftWave = [
|
|
214
|
+
{
|
|
215
|
+
funct: function(val) {
|
|
216
|
+
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
217
|
+
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
218
|
+
},
|
|
219
|
+
from: 0,
|
|
220
|
+
to: -150,
|
|
221
|
+
dur: 100
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
funct: function(val) {
|
|
225
|
+
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
226
|
+
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
227
|
+
},
|
|
228
|
+
from: -150,
|
|
229
|
+
to: -120,
|
|
230
|
+
dur: 100
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
funct: function(val) {
|
|
234
|
+
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
235
|
+
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
236
|
+
},
|
|
237
|
+
from: -120,
|
|
238
|
+
to: -150,
|
|
239
|
+
dur: 100
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
funct: function(val) {
|
|
243
|
+
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
244
|
+
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
245
|
+
},
|
|
246
|
+
from: -150,
|
|
247
|
+
to: -120,
|
|
248
|
+
dur: 100
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
funct: function(val) {
|
|
252
|
+
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
253
|
+
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
254
|
+
},
|
|
255
|
+
from: -120,
|
|
256
|
+
to: -150,
|
|
257
|
+
dur: 100
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
funct: function(val) {
|
|
261
|
+
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
262
|
+
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
263
|
+
},
|
|
264
|
+
from: -150,
|
|
265
|
+
to: -120,
|
|
266
|
+
dur: 100
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
funct: function(val) {
|
|
270
|
+
leftArm.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
271
|
+
leftHand.transform(`r${val},${leftShoulderRotationPoints}`);
|
|
272
|
+
},
|
|
273
|
+
from: -120,
|
|
274
|
+
to: 0,
|
|
275
|
+
dur: 100
|
|
276
|
+
}
|
|
277
|
+
];
|
|
278
|
+
const jump = () => {
|
|
279
|
+
torso.animate({ transform: "t0,20" }, 500);
|
|
280
|
+
arms.animate({ transform: "t0,20" }, 500);
|
|
281
|
+
straps.animate({ transform: "t0,20" }, 500);
|
|
282
|
+
hands.animate({ transform: "t0,20" }, 500);
|
|
283
|
+
face.animate({ transform: "t0,20" }, 500, function() {
|
|
284
|
+
face.animate({ transform: "t0,-70" }, 200);
|
|
285
|
+
torso.animate({ transform: "t0,-70" }, 200);
|
|
286
|
+
arms.animate({ transform: "t0,-70" }, 200);
|
|
287
|
+
straps.animate({ transform: "t0,-70" }, 200);
|
|
288
|
+
hands.animate({ transform: "t0,-70" }, 200);
|
|
289
|
+
legs.animate({ transform: "t0,-70" }, 200, function() {
|
|
290
|
+
face.animate({ transform: "t0,0" }, 200);
|
|
291
|
+
torso.animate({ transform: "t0,0" }, 200);
|
|
292
|
+
arms.animate({ transform: "t0,0" }, 200);
|
|
293
|
+
straps.animate({ transform: "t0,0" }, 200);
|
|
294
|
+
hands.animate({ transform: "t0,0" }, 200);
|
|
295
|
+
legs.animate({ transform: "t0,0" }, 200);
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
const eyesLeft = (duration) => {
|
|
300
|
+
leftEyePupil.animate({ transform: "t2,0" }, duration);
|
|
301
|
+
rightEyePupil.animate({ transform: "t2,0" }, duration);
|
|
302
|
+
};
|
|
303
|
+
const eyesRight = (duration) => {
|
|
304
|
+
leftEyePupil.animate({ transform: "t-2,0" }, duration);
|
|
305
|
+
rightEyePupil.animate({ transform: "t-2,0" }, duration);
|
|
306
|
+
};
|
|
307
|
+
const eyesCenter = (duration) => {
|
|
308
|
+
leftEyePupil.animate({ transform: "t0,0" }, duration);
|
|
309
|
+
rightEyePupil.animate({ transform: "t0,0" }, duration);
|
|
310
|
+
};
|
|
311
|
+
const blink = (times) => {
|
|
312
|
+
if (times < 1)
|
|
313
|
+
return;
|
|
314
|
+
[...Array(times)].forEach((_) => {
|
|
315
|
+
leftEyeWhite == null ? void 0 : leftEyeWhite.animate({ ry: 0 }, 120);
|
|
316
|
+
leftEyePupil.animate({ ry: 0 }, 120);
|
|
317
|
+
rightEyeWhite == null ? void 0 : rightEyeWhite.animate({ ry: 0 }, 120);
|
|
318
|
+
rightEyePupil.animate({ ry: 0 }, 120, function() {
|
|
319
|
+
leftEyeWhite == null ? void 0 : leftEyeWhite.animate({ ry: 4 }, 200);
|
|
320
|
+
leftEyePupil == null ? void 0 : leftEyePupil.animate({ ry: 3 }, 200);
|
|
321
|
+
rightEyeWhite == null ? void 0 : rightEyeWhite.animate({ ry: 4 }, 200);
|
|
322
|
+
rightEyePupil == null ? void 0 : rightEyePupil.animate({ ry: 3 }, 200, () => {
|
|
323
|
+
blink(times - 1);
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
};
|
|
328
|
+
const animate = (s2, animation) => {
|
|
329
|
+
nextFrame(s2, animation, 0);
|
|
330
|
+
};
|
|
331
|
+
reactExports.useEffect(() => {
|
|
332
|
+
if (typeof window === "undefined")
|
|
333
|
+
return;
|
|
334
|
+
if (Snap) {
|
|
335
|
+
setS(Snap("#svg"));
|
|
336
|
+
}
|
|
337
|
+
const makeBlinkHappen = () => {
|
|
338
|
+
const randNum = Math.floor(Math.random() * 2) + 1;
|
|
339
|
+
blink(randNum);
|
|
340
|
+
};
|
|
341
|
+
const loadActions = () => {
|
|
342
|
+
if (!avatar)
|
|
343
|
+
return;
|
|
344
|
+
setTimeout(() => {
|
|
345
|
+
animate(s, leftWave);
|
|
346
|
+
}, 1e3);
|
|
347
|
+
setInterval(makeBlinkHappen, 3500);
|
|
348
|
+
rightArm == null ? void 0 : rightArm.click(() => animate(s, rightWave));
|
|
349
|
+
rightHand == null ? void 0 : rightHand.click(() => animate(s, rightWave));
|
|
350
|
+
leftArm == null ? void 0 : leftArm.click(() => animate(s, leftWave));
|
|
351
|
+
leftHand == null ? void 0 : leftHand.click(() => animate(s, leftWave));
|
|
352
|
+
armless == null ? void 0 : armless.click(jump);
|
|
353
|
+
leftArm == null ? void 0 : leftArm.hover(() => {
|
|
354
|
+
eyesLeft(200);
|
|
355
|
+
});
|
|
356
|
+
leftThigh == null ? void 0 : leftThigh.hover(() => {
|
|
357
|
+
eyesLeft(200);
|
|
358
|
+
});
|
|
359
|
+
leftShoe == null ? void 0 : leftShoe.hover(() => {
|
|
360
|
+
eyesLeft(200);
|
|
361
|
+
});
|
|
362
|
+
torso == null ? void 0 : torso.hover(() => {
|
|
363
|
+
eyesCenter(200);
|
|
364
|
+
});
|
|
365
|
+
rightArm == null ? void 0 : rightArm.hover(() => {
|
|
366
|
+
eyesRight(200);
|
|
367
|
+
});
|
|
368
|
+
rightThigh == null ? void 0 : rightThigh.hover(() => {
|
|
369
|
+
eyesRight(200);
|
|
370
|
+
});
|
|
371
|
+
rightShoe == null ? void 0 : rightShoe.hover(() => {
|
|
372
|
+
eyesRight(200);
|
|
373
|
+
});
|
|
374
|
+
};
|
|
375
|
+
createAvatar(s, loadActions);
|
|
376
|
+
}, [s]);
|
|
377
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
378
|
+
"svg",
|
|
379
|
+
{
|
|
380
|
+
id: "svg",
|
|
381
|
+
className: "mx-auto",
|
|
382
|
+
height: `${svgContainerHeight.toString()}px`,
|
|
383
|
+
width: `${svgContainerWidth.toString()}px`,
|
|
384
|
+
version: "1.1",
|
|
385
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
};
|
|
389
|
+
try {
|
|
390
|
+
Avatar.displayName = "Avatar";
|
|
391
|
+
Avatar.__docgenInfo = { "description": "", "displayName": "Avatar", "props": {} };
|
|
392
|
+
} catch (__react_docgen_typescript_loader_error) {
|
|
393
|
+
}
|
|
394
|
+
const meta = {
|
|
395
|
+
title: "Components/Avatar",
|
|
396
|
+
component: Avatar,
|
|
397
|
+
argTypes: {
|
|
398
|
+
...idAndClassName
|
|
399
|
+
},
|
|
400
|
+
args: {}
|
|
401
|
+
};
|
|
402
|
+
const Default = {};
|
|
403
|
+
Default.parameters = {
|
|
404
|
+
...Default.parameters,
|
|
405
|
+
docs: {
|
|
406
|
+
...(_a = Default.parameters) == null ? void 0 : _a.docs,
|
|
407
|
+
source: {
|
|
408
|
+
originalSource: "{}",
|
|
409
|
+
...(_c = (_b = Default.parameters) == null ? void 0 : _b.docs) == null ? void 0 : _c.source
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
const __namedExportsOrder = ["Default"];
|
|
414
|
+
export {
|
|
415
|
+
Default,
|
|
416
|
+
__namedExportsOrder,
|
|
417
|
+
meta as default
|
|
418
|
+
};
|