trepur_components 2.3.2 → 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/Accordion.stories.d.ts +94 -0
- package/lib/components/Accordion/index.d.ts +9 -0
- package/lib/components/Accordion/index.js +15 -0
- package/lib/components/AlertBar/AlertBar.stories.d.ts +162 -0
- package/lib/components/AlertBar/index.d.ts +13 -0
- package/lib/components/AlertBar/index.js +49 -0
- package/lib/components/Avatar/Avatar.stories.d.ts +44 -0
- package/lib/components/Avatar/index.d.ts +4 -0
- package/lib/components/index.d.ts +4 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +6 -0
- package/lib/styles/base.css +116 -0
- package/lib/utils/controls.d.ts +36 -0
- package/lib/utils/matchMedia.d.ts +2 -0
- package/lib/utils/screens.d.ts +7 -0
- package/package.json +8 -9
- 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/components/index.d.ts +7 -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
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
const { global } = __STORYBOOK_MODULE_GLOBAL__;
|
|
2
|
+
const { logger } = __STORYBOOK_MODULE_CLIENT_LOGGER__;
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJS = (cb, mod) => function() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
18
|
+
function _extends() {
|
|
19
|
+
return _extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
20
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
21
|
+
var source = arguments[i];
|
|
22
|
+
for (var key in source)
|
|
23
|
+
Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
|
|
24
|
+
}
|
|
25
|
+
return target;
|
|
26
|
+
}, _extends.apply(this, arguments);
|
|
27
|
+
}
|
|
28
|
+
function _assertThisInitialized(self) {
|
|
29
|
+
if (self === void 0)
|
|
30
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
31
|
+
return self;
|
|
32
|
+
}
|
|
33
|
+
function _setPrototypeOf(o, p) {
|
|
34
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o2, p2) {
|
|
35
|
+
return o2.__proto__ = p2, o2;
|
|
36
|
+
}, _setPrototypeOf(o, p);
|
|
37
|
+
}
|
|
38
|
+
function _inheritsLoose(subClass, superClass) {
|
|
39
|
+
subClass.prototype = Object.create(superClass.prototype), subClass.prototype.constructor = subClass, _setPrototypeOf(subClass, superClass);
|
|
40
|
+
}
|
|
41
|
+
function _getPrototypeOf(o) {
|
|
42
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(o2) {
|
|
43
|
+
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
44
|
+
}, _getPrototypeOf(o);
|
|
45
|
+
}
|
|
46
|
+
function _isNativeFunction(fn) {
|
|
47
|
+
try {
|
|
48
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
49
|
+
} catch {
|
|
50
|
+
return typeof fn == "function";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function _isNativeReflectConstruct() {
|
|
54
|
+
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
55
|
+
return false;
|
|
56
|
+
if (typeof Proxy == "function")
|
|
57
|
+
return true;
|
|
58
|
+
try {
|
|
59
|
+
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
60
|
+
})), true;
|
|
61
|
+
} catch {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function _construct(Parent, args, Class) {
|
|
66
|
+
return _isNativeReflectConstruct() ? _construct = Reflect.construct.bind() : _construct = function(Parent2, args2, Class2) {
|
|
67
|
+
var a = [null];
|
|
68
|
+
a.push.apply(a, args2);
|
|
69
|
+
var Constructor = Function.bind.apply(Parent2, a), instance = new Constructor();
|
|
70
|
+
return Class2 && _setPrototypeOf(instance, Class2.prototype), instance;
|
|
71
|
+
}, _construct.apply(null, arguments);
|
|
72
|
+
}
|
|
73
|
+
function _wrapNativeSuper(Class) {
|
|
74
|
+
var _cache = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
75
|
+
return _wrapNativeSuper = function(Class2) {
|
|
76
|
+
if (Class2 === null || !_isNativeFunction(Class2))
|
|
77
|
+
return Class2;
|
|
78
|
+
if (typeof Class2 != "function")
|
|
79
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
80
|
+
if (typeof _cache < "u") {
|
|
81
|
+
if (_cache.has(Class2))
|
|
82
|
+
return _cache.get(Class2);
|
|
83
|
+
_cache.set(Class2, Wrapper);
|
|
84
|
+
}
|
|
85
|
+
function Wrapper() {
|
|
86
|
+
return _construct(Class2, arguments, _getPrototypeOf(this).constructor);
|
|
87
|
+
}
|
|
88
|
+
return Wrapper.prototype = Object.create(Class2.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }), _setPrototypeOf(Wrapper, Class2);
|
|
89
|
+
}, _wrapNativeSuper(Class);
|
|
90
|
+
}
|
|
91
|
+
var ERRORS = { 1: `Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).
|
|
92
|
+
|
|
93
|
+
`, 2: `Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).
|
|
94
|
+
|
|
95
|
+
`, 3: `Passed an incorrect argument to a color function, please pass a string representation of a color.
|
|
96
|
+
|
|
97
|
+
`, 4: `Couldn't generate valid rgb string from %s, it returned %s.
|
|
98
|
+
|
|
99
|
+
`, 5: `Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.
|
|
100
|
+
|
|
101
|
+
`, 6: `Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).
|
|
102
|
+
|
|
103
|
+
`, 7: `Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).
|
|
104
|
+
|
|
105
|
+
`, 8: `Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.
|
|
106
|
+
|
|
107
|
+
`, 9: `Please provide a number of steps to the modularScale helper.
|
|
108
|
+
|
|
109
|
+
`, 10: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
|
|
110
|
+
|
|
111
|
+
`, 11: `Invalid value passed as base to modularScale, expected number or em string but got "%s"
|
|
112
|
+
|
|
113
|
+
`, 12: `Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.
|
|
114
|
+
|
|
115
|
+
`, 13: `Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.
|
|
116
|
+
|
|
117
|
+
`, 14: `Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.
|
|
118
|
+
|
|
119
|
+
`, 15: `Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.
|
|
120
|
+
|
|
121
|
+
`, 16: `You must provide a template to this method.
|
|
122
|
+
|
|
123
|
+
`, 17: `You passed an unsupported selector state to this method.
|
|
124
|
+
|
|
125
|
+
`, 18: `minScreen and maxScreen must be provided as stringified numbers with the same units.
|
|
126
|
+
|
|
127
|
+
`, 19: `fromSize and toSize must be provided as stringified numbers with the same units.
|
|
128
|
+
|
|
129
|
+
`, 20: `expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
|
|
130
|
+
|
|
131
|
+
`, 21: "expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n", 22: "expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n", 23: `fontFace expects a name of a font-family.
|
|
132
|
+
|
|
133
|
+
`, 24: `fontFace expects either the path to the font file(s) or a name of a local copy.
|
|
134
|
+
|
|
135
|
+
`, 25: `fontFace expects localFonts to be an array.
|
|
136
|
+
|
|
137
|
+
`, 26: `fontFace expects fileFormats to be an array.
|
|
138
|
+
|
|
139
|
+
`, 27: `radialGradient requries at least 2 color-stops to properly render.
|
|
140
|
+
|
|
141
|
+
`, 28: `Please supply a filename to retinaImage() as the first argument.
|
|
142
|
+
|
|
143
|
+
`, 29: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
|
|
144
|
+
|
|
145
|
+
`, 30: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n", 31: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation
|
|
146
|
+
|
|
147
|
+
`, 32: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])
|
|
148
|
+
To pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')
|
|
149
|
+
|
|
150
|
+
`, 33: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation
|
|
151
|
+
|
|
152
|
+
`, 34: `borderRadius expects a radius value as a string or number as the second argument.
|
|
153
|
+
|
|
154
|
+
`, 35: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
|
|
155
|
+
|
|
156
|
+
`, 36: `Property must be a string value.
|
|
157
|
+
|
|
158
|
+
`, 37: `Syntax Error at %s.
|
|
159
|
+
|
|
160
|
+
`, 38: `Formula contains a function that needs parentheses at %s.
|
|
161
|
+
|
|
162
|
+
`, 39: `Formula is missing closing parenthesis at %s.
|
|
163
|
+
|
|
164
|
+
`, 40: `Formula has too many closing parentheses at %s.
|
|
165
|
+
|
|
166
|
+
`, 41: `All values in a formula must have the same unit or be unitless.
|
|
167
|
+
|
|
168
|
+
`, 42: `Please provide a number of steps to the modularScale helper.
|
|
169
|
+
|
|
170
|
+
`, 43: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
|
|
171
|
+
|
|
172
|
+
`, 44: `Invalid value passed as base to modularScale, expected number or em/rem string but got %s.
|
|
173
|
+
|
|
174
|
+
`, 45: `Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.
|
|
175
|
+
|
|
176
|
+
`, 46: `Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.
|
|
177
|
+
|
|
178
|
+
`, 47: `minScreen and maxScreen must be provided as stringified numbers with the same units.
|
|
179
|
+
|
|
180
|
+
`, 48: `fromSize and toSize must be provided as stringified numbers with the same units.
|
|
181
|
+
|
|
182
|
+
`, 49: `Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
|
|
183
|
+
|
|
184
|
+
`, 50: `Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.
|
|
185
|
+
|
|
186
|
+
`, 51: `Expects the first argument object to have the properties prop, fromSize, and toSize.
|
|
187
|
+
|
|
188
|
+
`, 52: `fontFace expects either the path to the font file(s) or a name of a local copy.
|
|
189
|
+
|
|
190
|
+
`, 53: `fontFace expects localFonts to be an array.
|
|
191
|
+
|
|
192
|
+
`, 54: `fontFace expects fileFormats to be an array.
|
|
193
|
+
|
|
194
|
+
`, 55: `fontFace expects a name of a font-family.
|
|
195
|
+
|
|
196
|
+
`, 56: `linearGradient requries at least 2 color-stops to properly render.
|
|
197
|
+
|
|
198
|
+
`, 57: `radialGradient requries at least 2 color-stops to properly render.
|
|
199
|
+
|
|
200
|
+
`, 58: `Please supply a filename to retinaImage() as the first argument.
|
|
201
|
+
|
|
202
|
+
`, 59: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
|
|
203
|
+
|
|
204
|
+
`, 60: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n", 61: `Property must be a string value.
|
|
205
|
+
|
|
206
|
+
`, 62: `borderRadius expects a radius value as a string or number as the second argument.
|
|
207
|
+
|
|
208
|
+
`, 63: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
|
|
209
|
+
|
|
210
|
+
`, 64: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.
|
|
211
|
+
|
|
212
|
+
`, 65: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').
|
|
213
|
+
|
|
214
|
+
`, 66: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.
|
|
215
|
+
|
|
216
|
+
`, 67: `You must provide a template to this method.
|
|
217
|
+
|
|
218
|
+
`, 68: `You passed an unsupported selector state to this method.
|
|
219
|
+
|
|
220
|
+
`, 69: `Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.
|
|
221
|
+
|
|
222
|
+
`, 70: `Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.
|
|
223
|
+
|
|
224
|
+
`, 71: `Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.
|
|
225
|
+
|
|
226
|
+
`, 72: `Passed invalid base value %s to %s(), please pass a value like "12px" or 12.
|
|
227
|
+
|
|
228
|
+
`, 73: `Please provide a valid CSS variable.
|
|
229
|
+
|
|
230
|
+
`, 74: `CSS variable not found and no default was provided.
|
|
231
|
+
|
|
232
|
+
`, 75: `important requires a valid style object, got a %s instead.
|
|
233
|
+
|
|
234
|
+
`, 76: `fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.
|
|
235
|
+
|
|
236
|
+
`, 77: `remToPx expects a value in "rem" but you provided it in "%s".
|
|
237
|
+
|
|
238
|
+
`, 78: `base must be set in "px" or "%" but you set it in "%s".
|
|
239
|
+
` };
|
|
240
|
+
function format() {
|
|
241
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
|
|
242
|
+
args[_key] = arguments[_key];
|
|
243
|
+
var a = args[0], b = [], c;
|
|
244
|
+
for (c = 1; c < args.length; c += 1)
|
|
245
|
+
b.push(args[c]);
|
|
246
|
+
return b.forEach(function(d) {
|
|
247
|
+
a = a.replace(/%[a-z]/, d);
|
|
248
|
+
}), a;
|
|
249
|
+
}
|
|
250
|
+
var PolishedError = function(_Error) {
|
|
251
|
+
_inheritsLoose(PolishedError2, _Error);
|
|
252
|
+
function PolishedError2(code) {
|
|
253
|
+
for (var _this, _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++)
|
|
254
|
+
args[_key2 - 1] = arguments[_key2];
|
|
255
|
+
return _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this, _assertThisInitialized(_this);
|
|
256
|
+
}
|
|
257
|
+
return PolishedError2;
|
|
258
|
+
}(_wrapNativeSuper(Error));
|
|
259
|
+
function colorToInt(color2) {
|
|
260
|
+
return Math.round(color2 * 255);
|
|
261
|
+
}
|
|
262
|
+
function convertToInt(red, green, blue) {
|
|
263
|
+
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
264
|
+
}
|
|
265
|
+
function hslToRgb(hue, saturation, lightness, convert) {
|
|
266
|
+
if (convert === void 0 && (convert = convertToInt), saturation === 0)
|
|
267
|
+
return convert(lightness, lightness, lightness);
|
|
268
|
+
var huePrime = (hue % 360 + 360) % 360 / 60, chroma = (1 - Math.abs(2 * lightness - 1)) * saturation, secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1)), red = 0, green = 0, blue = 0;
|
|
269
|
+
huePrime >= 0 && huePrime < 1 ? (red = chroma, green = secondComponent) : huePrime >= 1 && huePrime < 2 ? (red = secondComponent, green = chroma) : huePrime >= 2 && huePrime < 3 ? (green = chroma, blue = secondComponent) : huePrime >= 3 && huePrime < 4 ? (green = secondComponent, blue = chroma) : huePrime >= 4 && huePrime < 5 ? (red = secondComponent, blue = chroma) : huePrime >= 5 && huePrime < 6 && (red = chroma, blue = secondComponent);
|
|
270
|
+
var lightnessModification = lightness - chroma / 2, finalRed = red + lightnessModification, finalGreen = green + lightnessModification, finalBlue = blue + lightnessModification;
|
|
271
|
+
return convert(finalRed, finalGreen, finalBlue);
|
|
272
|
+
}
|
|
273
|
+
var namedColorMap = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "00ffff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "0000ff", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "00ffff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "ff00ff", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "639", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" };
|
|
274
|
+
function nameToHex(color2) {
|
|
275
|
+
if (typeof color2 != "string")
|
|
276
|
+
return color2;
|
|
277
|
+
var normalizedColorName = color2.toLowerCase();
|
|
278
|
+
return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color2;
|
|
279
|
+
}
|
|
280
|
+
var hexRegex = /^#[a-fA-F0-9]{6}$/, hexRgbaRegex = /^#[a-fA-F0-9]{8}$/, reducedHexRegex = /^#[a-fA-F0-9]{3}$/, reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/, rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i, rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i, hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
281
|
+
function parseToRgb(color2) {
|
|
282
|
+
if (typeof color2 != "string")
|
|
283
|
+
throw new PolishedError(3);
|
|
284
|
+
var normalizedColor = nameToHex(color2);
|
|
285
|
+
if (normalizedColor.match(hexRegex))
|
|
286
|
+
return { red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16), green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16), blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16) };
|
|
287
|
+
if (normalizedColor.match(hexRgbaRegex)) {
|
|
288
|
+
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
289
|
+
return { red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16), green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16), blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16), alpha };
|
|
290
|
+
}
|
|
291
|
+
if (normalizedColor.match(reducedHexRegex))
|
|
292
|
+
return { red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16), green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16), blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16) };
|
|
293
|
+
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
294
|
+
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
295
|
+
return { red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16), green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16), blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16), alpha: _alpha };
|
|
296
|
+
}
|
|
297
|
+
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
298
|
+
if (rgbMatched)
|
|
299
|
+
return { red: parseInt("" + rgbMatched[1], 10), green: parseInt("" + rgbMatched[2], 10), blue: parseInt("" + rgbMatched[3], 10) };
|
|
300
|
+
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
301
|
+
if (rgbaMatched)
|
|
302
|
+
return { red: parseInt("" + rgbaMatched[1], 10), green: parseInt("" + rgbaMatched[2], 10), blue: parseInt("" + rgbaMatched[3], 10), alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4]) };
|
|
303
|
+
var hslMatched = hslRegex.exec(normalizedColor);
|
|
304
|
+
if (hslMatched) {
|
|
305
|
+
var hue = parseInt("" + hslMatched[1], 10), saturation = parseInt("" + hslMatched[2], 10) / 100, lightness = parseInt("" + hslMatched[3], 10) / 100, rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")", hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
306
|
+
if (!hslRgbMatched)
|
|
307
|
+
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
308
|
+
return { red: parseInt("" + hslRgbMatched[1], 10), green: parseInt("" + hslRgbMatched[2], 10), blue: parseInt("" + hslRgbMatched[3], 10) };
|
|
309
|
+
}
|
|
310
|
+
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
311
|
+
if (hslaMatched) {
|
|
312
|
+
var _hue = parseInt("" + hslaMatched[1], 10), _saturation = parseInt("" + hslaMatched[2], 10) / 100, _lightness = parseInt("" + hslaMatched[3], 10) / 100, _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")", _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
313
|
+
if (!_hslRgbMatched)
|
|
314
|
+
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
315
|
+
return { red: parseInt("" + _hslRgbMatched[1], 10), green: parseInt("" + _hslRgbMatched[2], 10), blue: parseInt("" + _hslRgbMatched[3], 10), alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4]) };
|
|
316
|
+
}
|
|
317
|
+
throw new PolishedError(5);
|
|
318
|
+
}
|
|
319
|
+
function rgbToHsl(color2) {
|
|
320
|
+
var red = color2.red / 255, green = color2.green / 255, blue = color2.blue / 255, max = Math.max(red, green, blue), min = Math.min(red, green, blue), lightness = (max + min) / 2;
|
|
321
|
+
if (max === min)
|
|
322
|
+
return color2.alpha !== void 0 ? { hue: 0, saturation: 0, lightness, alpha: color2.alpha } : { hue: 0, saturation: 0, lightness };
|
|
323
|
+
var hue, delta = max - min, saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
324
|
+
switch (max) {
|
|
325
|
+
case red:
|
|
326
|
+
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
327
|
+
break;
|
|
328
|
+
case green:
|
|
329
|
+
hue = (blue - red) / delta + 2;
|
|
330
|
+
break;
|
|
331
|
+
default:
|
|
332
|
+
hue = (red - green) / delta + 4;
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
return hue *= 60, color2.alpha !== void 0 ? { hue, saturation, lightness, alpha: color2.alpha } : { hue, saturation, lightness };
|
|
336
|
+
}
|
|
337
|
+
function parseToHsl(color2) {
|
|
338
|
+
return rgbToHsl(parseToRgb(color2));
|
|
339
|
+
}
|
|
340
|
+
var reduceHexValue = function(value) {
|
|
341
|
+
return value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6] ? "#" + value[1] + value[3] + value[5] : value;
|
|
342
|
+
}, reduceHexValue$1 = reduceHexValue;
|
|
343
|
+
function numberToHex(value) {
|
|
344
|
+
var hex = value.toString(16);
|
|
345
|
+
return hex.length === 1 ? "0" + hex : hex;
|
|
346
|
+
}
|
|
347
|
+
function colorToHex(color2) {
|
|
348
|
+
return numberToHex(Math.round(color2 * 255));
|
|
349
|
+
}
|
|
350
|
+
function convertToHex(red, green, blue) {
|
|
351
|
+
return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
|
|
352
|
+
}
|
|
353
|
+
function hslToHex(hue, saturation, lightness) {
|
|
354
|
+
return hslToRgb(hue, saturation, lightness, convertToHex);
|
|
355
|
+
}
|
|
356
|
+
function hsl(value, saturation, lightness) {
|
|
357
|
+
if (typeof value == "number" && typeof saturation == "number" && typeof lightness == "number")
|
|
358
|
+
return hslToHex(value, saturation, lightness);
|
|
359
|
+
if (typeof value == "object" && saturation === void 0 && lightness === void 0)
|
|
360
|
+
return hslToHex(value.hue, value.saturation, value.lightness);
|
|
361
|
+
throw new PolishedError(1);
|
|
362
|
+
}
|
|
363
|
+
function hsla(value, saturation, lightness, alpha) {
|
|
364
|
+
if (typeof value == "number" && typeof saturation == "number" && typeof lightness == "number" && typeof alpha == "number")
|
|
365
|
+
return "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
|
|
366
|
+
if (typeof value == "object" && saturation === void 0 && lightness === void 0 && alpha === void 0)
|
|
367
|
+
return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
368
|
+
throw new PolishedError(2);
|
|
369
|
+
}
|
|
370
|
+
function rgb(value, green, blue) {
|
|
371
|
+
if (typeof value == "number" && typeof green == "number" && typeof blue == "number")
|
|
372
|
+
return reduceHexValue$1("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue));
|
|
373
|
+
if (typeof value == "object" && green === void 0 && blue === void 0)
|
|
374
|
+
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
375
|
+
throw new PolishedError(6);
|
|
376
|
+
}
|
|
377
|
+
function rgba(firstValue, secondValue, thirdValue, fourthValue) {
|
|
378
|
+
if (typeof firstValue == "string" && typeof secondValue == "number") {
|
|
379
|
+
var rgbValue = parseToRgb(firstValue);
|
|
380
|
+
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
|
|
381
|
+
} else {
|
|
382
|
+
if (typeof firstValue == "number" && typeof secondValue == "number" && typeof thirdValue == "number" && typeof fourthValue == "number")
|
|
383
|
+
return "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
|
|
384
|
+
if (typeof firstValue == "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0)
|
|
385
|
+
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
386
|
+
}
|
|
387
|
+
throw new PolishedError(7);
|
|
388
|
+
}
|
|
389
|
+
var isRgb = function(color2) {
|
|
390
|
+
return typeof color2.red == "number" && typeof color2.green == "number" && typeof color2.blue == "number" && (typeof color2.alpha != "number" || typeof color2.alpha > "u");
|
|
391
|
+
}, isRgba = function(color2) {
|
|
392
|
+
return typeof color2.red == "number" && typeof color2.green == "number" && typeof color2.blue == "number" && typeof color2.alpha == "number";
|
|
393
|
+
}, isHsl = function(color2) {
|
|
394
|
+
return typeof color2.hue == "number" && typeof color2.saturation == "number" && typeof color2.lightness == "number" && (typeof color2.alpha != "number" || typeof color2.alpha > "u");
|
|
395
|
+
}, isHsla = function(color2) {
|
|
396
|
+
return typeof color2.hue == "number" && typeof color2.saturation == "number" && typeof color2.lightness == "number" && typeof color2.alpha == "number";
|
|
397
|
+
};
|
|
398
|
+
function toColorString(color2) {
|
|
399
|
+
if (typeof color2 != "object")
|
|
400
|
+
throw new PolishedError(8);
|
|
401
|
+
if (isRgba(color2))
|
|
402
|
+
return rgba(color2);
|
|
403
|
+
if (isRgb(color2))
|
|
404
|
+
return rgb(color2);
|
|
405
|
+
if (isHsla(color2))
|
|
406
|
+
return hsla(color2);
|
|
407
|
+
if (isHsl(color2))
|
|
408
|
+
return hsl(color2);
|
|
409
|
+
throw new PolishedError(8);
|
|
410
|
+
}
|
|
411
|
+
function curried(f, length, acc) {
|
|
412
|
+
return function() {
|
|
413
|
+
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
414
|
+
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
function curry(f) {
|
|
418
|
+
return curried(f, f.length, []);
|
|
419
|
+
}
|
|
420
|
+
function guard(lowerBoundary, upperBoundary, value) {
|
|
421
|
+
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
422
|
+
}
|
|
423
|
+
function darken(amount, color2) {
|
|
424
|
+
if (color2 === "transparent")
|
|
425
|
+
return color2;
|
|
426
|
+
var hslColor = parseToHsl(color2);
|
|
427
|
+
return toColorString(_extends({}, hslColor, { lightness: guard(0, 1, hslColor.lightness - parseFloat(amount)) }));
|
|
428
|
+
}
|
|
429
|
+
var curriedDarken = curry(darken), curriedDarken$1 = curriedDarken;
|
|
430
|
+
function lighten(amount, color2) {
|
|
431
|
+
if (color2 === "transparent")
|
|
432
|
+
return color2;
|
|
433
|
+
var hslColor = parseToHsl(color2);
|
|
434
|
+
return toColorString(_extends({}, hslColor, { lightness: guard(0, 1, hslColor.lightness + parseFloat(amount)) }));
|
|
435
|
+
}
|
|
436
|
+
var curriedLighten = curry(lighten), curriedLighten$1 = curriedLighten;
|
|
437
|
+
function opacify(amount, color2) {
|
|
438
|
+
if (color2 === "transparent")
|
|
439
|
+
return color2;
|
|
440
|
+
var parsedColor = parseToRgb(color2), alpha = typeof parsedColor.alpha == "number" ? parsedColor.alpha : 1, colorWithAlpha = _extends({}, parsedColor, { alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100) });
|
|
441
|
+
return rgba(colorWithAlpha);
|
|
442
|
+
}
|
|
443
|
+
var curriedOpacify = curry(opacify), curriedOpacify$1 = curriedOpacify;
|
|
444
|
+
function transparentize(amount, color2) {
|
|
445
|
+
if (color2 === "transparent")
|
|
446
|
+
return color2;
|
|
447
|
+
var parsedColor = parseToRgb(color2), alpha = typeof parsedColor.alpha == "number" ? parsedColor.alpha : 1, colorWithAlpha = _extends({}, parsedColor, { alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100) });
|
|
448
|
+
return rgba(colorWithAlpha);
|
|
449
|
+
}
|
|
450
|
+
var curriedTransparentize = curry(transparentize), curriedTransparentize$1 = curriedTransparentize;
|
|
451
|
+
var color = { primary: "#FF4785", secondary: "#029CFD", tertiary: "#FAFBFC", ancillary: "#22a699", orange: "#FC521F", gold: "#FFAE00", green: "#66BF3C", seafoam: "#37D5D3", purple: "#6F2CAC", ultraviolet: "#2A0481", lightest: "#FFFFFF", lighter: "#F7FAFC", light: "#EEF3F6", mediumlight: "#ECF4F9", medium: "#D9E8F2", mediumdark: "#73828C", dark: "#5C6870", darker: "#454E54", darkest: "#2E3438", border: "hsla(203, 50%, 30%, 0.15)", positive: "#66BF3C", negative: "#FF4400", warning: "#E69D00", critical: "#FFFFFF", defaultText: "#2E3438", inverseText: "#FFFFFF", positiveText: "#448028", negativeText: "#D43900", warningText: "#A15C20" }, background = { app: "#F6F9FC", bar: color.lightest, content: color.lightest, preview: color.lightest, gridCellSize: 10, hoverable: curriedTransparentize$1(0.9, color.secondary), positive: "#E1FFD4", negative: "#FEDED2", warning: "#FFF5CF", critical: "#FF4400" }, typography = { fonts: { base: ['"Nunito Sans"', "-apple-system", '".SFNSText-Regular"', '"San Francisco"', "BlinkMacSystemFont", '"Segoe UI"', '"Helvetica Neue"', "Helvetica", "Arial", "sans-serif"].join(", "), mono: ["ui-monospace", "Menlo", "Monaco", '"Roboto Mono"', '"Oxygen Mono"', '"Ubuntu Monospace"', '"Source Code Pro"', '"Droid Sans Mono"', '"Courier New"', "monospace"].join(", ") }, weight: { regular: 400, bold: 700 }, size: { s1: 12, s2: 14, s3: 16, m1: 20, m2: 24, m3: 28, l1: 32, l2: 40, l3: 48, code: 90 } };
|
|
452
|
+
var theme = { base: "light", colorPrimary: "#FF4785", colorSecondary: "#029CFD", appBg: background.app, appContentBg: color.lightest, appPreviewBg: color.lightest, appBorderColor: color.border, appBorderRadius: 4, fontBase: typography.fonts.base, fontCode: typography.fonts.mono, textColor: color.darkest, textInverseColor: color.lightest, textMutedColor: color.dark, barTextColor: color.mediumdark, barHoverColor: color.secondary, barSelectedColor: color.secondary, barBg: color.lightest, buttonBg: background.app, buttonBorder: color.medium, booleanBg: color.mediumlight, booleanSelectedBg: color.lightest, inputBg: color.lightest, inputBorder: color.border, inputTextColor: color.darkest, inputBorderRadius: 4 }, light_default = theme;
|
|
453
|
+
var theme2 = { base: "dark", colorPrimary: "#FF4785", colorSecondary: "#029CFD", appBg: "#222425", appContentBg: "#1B1C1D", appPreviewBg: color.lightest, appBorderColor: "rgba(255,255,255,.1)", appBorderRadius: 4, fontBase: typography.fonts.base, fontCode: typography.fonts.mono, textColor: "#C9CDCF", textInverseColor: "#222425", textMutedColor: "#798186", barTextColor: "#798186", barHoverColor: color.secondary, barSelectedColor: color.secondary, barBg: "#292C2E", buttonBg: "#222425", buttonBorder: "rgba(255,255,255,.1)", booleanBg: "#222425", booleanSelectedBg: "#2E3438", inputBg: "#1B1C1D", inputBorder: "rgba(255,255,255,.1)", inputTextColor: color.lightest, inputBorderRadius: 4 }, dark_default = theme2;
|
|
454
|
+
var { window: globalWindow } = global, mkColor = (color2) => ({ color: color2 }), isColorString = (color2) => typeof color2 != "string" ? (logger.warn(`Color passed to theme object should be a string. Instead ${color2}(${typeof color2}) was passed.`), false) : true, isValidColorForPolished = (color2) => !/(gradient|var|calc)/.test(color2), applyPolished = (type, color2) => type === "darken" ? rgba(`${curriedDarken$1(1, color2)}`, 0.95) : type === "lighten" ? rgba(`${curriedLighten$1(1, color2)}`, 0.95) : color2, colorFactory = (type) => (color2) => {
|
|
455
|
+
if (!isColorString(color2) || !isValidColorForPolished(color2))
|
|
456
|
+
return color2;
|
|
457
|
+
try {
|
|
458
|
+
return applyPolished(type, color2);
|
|
459
|
+
} catch {
|
|
460
|
+
return color2;
|
|
461
|
+
}
|
|
462
|
+
}, lightenColor = colorFactory("lighten"), getPreferredColorScheme = () => !globalWindow || !globalWindow.matchMedia ? "light" : globalWindow.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
463
|
+
var themes = { light: light_default, dark: dark_default, normal: light_default }, preferredColorScheme = getPreferredColorScheme(), create = (vars = { base: preferredColorScheme }, rest) => {
|
|
464
|
+
let inherit = { ...themes[preferredColorScheme], ...themes[vars.base] || {}, ...vars, base: themes[vars.base] ? vars.base : preferredColorScheme };
|
|
465
|
+
return { ...rest, ...inherit, barSelectedColor: vars.barSelectedColor || inherit.colorSecondary };
|
|
466
|
+
};
|
|
467
|
+
export {
|
|
468
|
+
__toESM as _,
|
|
469
|
+
__commonJS as a,
|
|
470
|
+
background as b,
|
|
471
|
+
create as c,
|
|
472
|
+
curriedOpacify$1 as d,
|
|
473
|
+
themes as e,
|
|
474
|
+
color as f,
|
|
475
|
+
getPreferredColorScheme as g,
|
|
476
|
+
lightenColor as h,
|
|
477
|
+
light_default as l,
|
|
478
|
+
mkColor as m,
|
|
479
|
+
typography as t
|
|
480
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { r as reactExports } from "./index-DM9bPmif.js";
|
|
2
|
+
const I18nContext = reactExports.createContext();
|
|
3
|
+
class ReportNamespaces {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.usedNamespaces = {};
|
|
6
|
+
}
|
|
7
|
+
addUsedNamespaces(namespaces) {
|
|
8
|
+
namespaces.forEach((ns) => {
|
|
9
|
+
if (!this.usedNamespaces[ns])
|
|
10
|
+
this.usedNamespaces[ns] = true;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
getUsedNamespaces() {
|
|
14
|
+
return Object.keys(this.usedNamespaces);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
I18nContext as I,
|
|
19
|
+
ReportNamespaces as R
|
|
20
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const idAndClassName = {
|
|
2
|
+
id: {
|
|
3
|
+
description: "Defines the id of the component",
|
|
4
|
+
control: { type: "text", default: false },
|
|
5
|
+
table: {
|
|
6
|
+
category: "Id",
|
|
7
|
+
type: { summary: "string" },
|
|
8
|
+
defaultValue: { summary: "undefined" }
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
className: {
|
|
12
|
+
description: "Defines any additional classes for the component",
|
|
13
|
+
control: { type: "text", default: false },
|
|
14
|
+
table: {
|
|
15
|
+
category: "ClassName",
|
|
16
|
+
type: { summary: "string" },
|
|
17
|
+
defaultValue: { summary: "undefined" }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
idAndClassName as i
|
|
23
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { R as React, r as reactExports } from "./index-DM9bPmif.js";
|
|
2
|
+
import { u as unmountElement, r as renderElement } from "./react-18-B-gfo82w.js";
|
|
3
|
+
import "./_commonjsHelpers-LQfde5yM.js";
|
|
4
|
+
import "./index-0FT4HXk-.js";
|
|
5
|
+
const { global } = __STORYBOOK_MODULE_GLOBAL__;
|
|
6
|
+
var { FRAMEWORK_OPTIONS } = global, render = (args, context) => {
|
|
7
|
+
let { id, component: Component } = context;
|
|
8
|
+
if (!Component)
|
|
9
|
+
throw new Error(`Unable to render story ${id} as the component annotation is missing from the default export`);
|
|
10
|
+
return React.createElement(Component, { ...args });
|
|
11
|
+
}, ErrorBoundary = class extends reactExports.Component {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.state = { hasError: false };
|
|
15
|
+
}
|
|
16
|
+
static getDerivedStateFromError() {
|
|
17
|
+
return { hasError: true };
|
|
18
|
+
}
|
|
19
|
+
componentDidMount() {
|
|
20
|
+
let { hasError } = this.state, { showMain } = this.props;
|
|
21
|
+
hasError || showMain();
|
|
22
|
+
}
|
|
23
|
+
componentDidCatch(err) {
|
|
24
|
+
let { showException } = this.props;
|
|
25
|
+
showException(err);
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
let { hasError } = this.state, { children } = this.props;
|
|
29
|
+
return hasError ? null : children;
|
|
30
|
+
}
|
|
31
|
+
}, Wrapper = (FRAMEWORK_OPTIONS == null ? void 0 : FRAMEWORK_OPTIONS.strictMode) ? reactExports.StrictMode : reactExports.Fragment;
|
|
32
|
+
async function renderToCanvas({ storyContext, unboundStoryFn, showMain, showException, forceRemount }, canvasElement) {
|
|
33
|
+
let content = React.createElement(ErrorBoundary, { showMain, showException }, React.createElement(unboundStoryFn, { ...storyContext })), element = Wrapper ? React.createElement(Wrapper, null, content) : content;
|
|
34
|
+
return forceRemount && unmountElement(canvasElement), await renderElement(element, canvasElement), () => unmountElement(canvasElement);
|
|
35
|
+
}
|
|
36
|
+
var parameters = { renderer: "react" };
|
|
37
|
+
export {
|
|
38
|
+
parameters,
|
|
39
|
+
render,
|
|
40
|
+
renderToCanvas
|
|
41
|
+
};
|