@ntbjs/react-components 1.3.0-rc.9 → 2.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +7 -8
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +84 -0
- package/cjs/_virtual/index.js +7 -0
- package/cjs/_virtual/index2.js +7 -0
- package/cjs/_virtual/index3.js +7 -0
- package/cjs/_virtual/index4.js +7 -0
- package/cjs/_virtual/index5.js +7 -0
- package/cjs/_virtual/react-dom.development.js +7 -0
- package/cjs/_virtual/react-dom.production.js +7 -0
- package/cjs/_virtual/react-is.development.js +7 -0
- package/cjs/_virtual/react-is.development2.js +7 -0
- package/cjs/_virtual/react-is.production.min.js +7 -0
- package/cjs/_virtual/react-is.production.min2.js +7 -0
- package/cjs/_virtual/react.development.js +7 -0
- package/cjs/_virtual/react.production.js +7 -0
- package/cjs/components/data/Alert/Alert.js +81 -0
- package/cjs/components/data/Alert/Alert.styled.js +72 -0
- package/cjs/components/data/Alert/data/Alert/index.js +9 -0
- package/cjs/components/data/Badge/Badge.js +93 -0
- package/cjs/components/data/Badge/Badge.styled.js +156 -0
- package/cjs/components/data/Badge/data/Badge/index.js +9 -0
- package/cjs/components/data/Popover/Popover.js +102 -0
- package/cjs/components/data/Popover/Popover.styled.js +159 -0
- package/cjs/components/data/Popover/data/Popover/index.js +9 -0
- package/cjs/components/data/Tab/Tab.js +31 -0
- package/cjs/components/data/Tab/Tab.styled.js +22 -0
- package/cjs/components/data/Tab/data/Tab/index.js +9 -0
- package/cjs/components/data/Tabs/Tabs.js +91 -0
- package/cjs/components/data/Tabs/Tabs.styled.js +97 -0
- package/cjs/components/data/Tabs/data/Tabs/index.js +9 -0
- package/cjs/components/data/Tooltip/Tooltip.js +50 -0
- package/cjs/components/data/Tooltip/Tooltip.styled.js +38 -0
- package/cjs/components/data/Tooltip/data/Tooltip/index.js +9 -0
- package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.js +42 -0
- package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +79 -0
- package/cjs/components/data/data/index.js +21 -0
- package/cjs/components/inputs/ActionButton/ActionButton.js +42 -0
- package/cjs/components/inputs/ActionButton/ActionButton.styled.js +66 -0
- package/cjs/components/inputs/ActionButton/inputs/ActionButton/index.js +9 -0
- package/cjs/components/inputs/Button/Button.js +188 -0
- package/cjs/components/inputs/Button/Button.styled.js +294 -0
- package/cjs/components/inputs/Button/inputs/Button/index.js +9 -0
- package/cjs/components/inputs/Checkbox/Checkbox.js +102 -0
- package/cjs/components/inputs/Checkbox/Checkbox.styled.js +145 -0
- package/cjs/components/inputs/Checkbox/inputs/Checkbox/index.js +9 -0
- package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +268 -0
- package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +352 -0
- package/cjs/components/inputs/CompactAutocompleteSelect/inputs/CompactAutocompleteSelect/index.js +9 -0
- package/cjs/components/inputs/CompactStarRating/CompactStarRating.js +178 -0
- package/cjs/components/inputs/CompactStarRating/CompactStarRating.styled.js +258 -0
- package/cjs/components/inputs/CompactStarRating/inputs/CompactStarRating/index.js +9 -0
- package/cjs/components/inputs/CompactTextInput/CompactTextInput.js +187 -0
- package/cjs/components/inputs/CompactTextInput/CompactTextInput.styled.js +352 -0
- package/cjs/components/inputs/CompactTextInput/inputs/CompactTextInput/index.js +9 -0
- package/cjs/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +253 -0
- package/cjs/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +89 -0
- package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +185 -0
- package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +122 -0
- package/cjs/components/inputs/MultiSelect/MultiSelect.js +251 -0
- package/cjs/components/inputs/MultiSelect/MultiSelect.styled.js +279 -0
- package/cjs/components/inputs/MultiSelect/inputs/MultiSelect/index.js +9 -0
- package/cjs/components/inputs/Radio/Radio.js +67 -0
- package/cjs/components/inputs/Radio/Radio.styled.js +93 -0
- package/cjs/components/inputs/Radio/inputs/Radio/index.js +9 -0
- package/cjs/components/inputs/Switch/Switch.js +69 -0
- package/cjs/components/inputs/Switch/Switch.styled.js +123 -0
- package/cjs/components/inputs/Switch/inputs/Switch/index.js +9 -0
- package/cjs/components/inputs/TextArea/TextArea.js +186 -0
- package/cjs/components/inputs/TextArea/TextArea.styled.js +455 -0
- package/cjs/components/inputs/TextArea/inputs/TextArea/index.js +9 -0
- package/cjs/components/inputs/TextInput/TextInput.js +147 -0
- package/cjs/components/inputs/TextInput/TextInput.styled.js +276 -0
- package/cjs/components/inputs/TextInput/inputs/TextInput/index.js +9 -0
- package/cjs/components/inputs/inputs/index.js +33 -0
- package/cjs/components/layout/InputGroup/InputGroup.js +26 -0
- package/cjs/components/layout/InputGroup/InputGroup.styled.js +18 -0
- package/cjs/components/layout/InputGroup/layout/InputGroup/index.js +9 -0
- package/cjs/components/layout/SectionSeparator/SectionSeparator.js +29 -0
- package/cjs/components/layout/SectionSeparator/SectionSeparator.styled.js +21 -0
- package/cjs/components/layout/SectionSeparator/layout/SectionSeparator/index.js +9 -0
- package/cjs/components/layout/layout/index.js +11 -0
- package/cjs/components/widgets/AssetAction/AssetAction.js +106 -0
- package/cjs/components/widgets/AssetAction/AssetAction.styled.js +58 -0
- package/cjs/components/widgets/AssetActionsBase/AssetActionsBase.js +35 -0
- package/cjs/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +24 -0
- package/cjs/components/widgets/AssetGallery/AssetGallery.js +102 -0
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +392 -0
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +43 -0
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +402 -0
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +338 -0
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +396 -0
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +328 -0
- package/cjs/components/widgets/AssetGallery/asset.propType.js +58 -0
- package/cjs/components/widgets/AssetGallery/widgets/AssetGallery/index.js +9 -0
- package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +50 -0
- package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +96 -0
- package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/widgets/AssetPreview/AssetPreviewTopBar/index.js +9 -0
- package/cjs/components/widgets/ContextMenu/ContextMenu.js +28 -0
- package/cjs/components/widgets/ContextMenu/ContextMenu.styled.js +19 -0
- package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +50 -0
- package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +93 -0
- package/cjs/components/widgets/ContextMenu/ContextMenuItem/widgets/ContextMenu/ContextMenuItem/index.js +9 -0
- package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +28 -0
- package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +30 -0
- package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/widgets/ContextMenu/ContextMenuItemsGroup/index.js +9 -0
- package/cjs/components/widgets/ContextMenu/widgets/ContextMenu/index.js +9 -0
- package/cjs/components/widgets/InfoCard/InfoCard.js +39 -0
- package/cjs/components/widgets/InfoCard/InfoCard.styled.js +110 -0
- package/cjs/components/widgets/InfoCard/widgets/InfoCard/index.js +9 -0
- package/cjs/components/widgets/Instructions/Instructions.js +217 -0
- package/cjs/components/widgets/Instructions/Instructions.styled.js +47 -0
- package/cjs/components/widgets/Instructions/widgets/Instructions/index.js +9 -0
- package/cjs/components/widgets/ProgressBar/ProgressBar.js +58 -0
- package/cjs/components/widgets/ProgressBar/ProgressBar.styled.js +154 -0
- package/cjs/components/widgets/ProgressBar/widgets/ProgressBar/index.js +9 -0
- package/cjs/components/widgets/SummaryCard/SummaryCard.js +92 -0
- package/cjs/components/widgets/SummaryCard/SummaryCard.styled.js +142 -0
- package/cjs/components/widgets/widgets/index.js +25 -0
- package/cjs/hooks/useEventListner.js +26 -0
- package/cjs/hooks/useIsomorphicLayoutEffect.js +11 -0
- package/cjs/hooks/useOnClickOutside.js +17 -0
- package/cjs/icons/arrow-back.svg.js +20 -0
- package/cjs/icons/arrow-forward.svg.js +20 -0
- package/cjs/icons/check-rectangle-filled.svg.js +20 -0
- package/cjs/icons/close.svg.js +20 -0
- package/cjs/icons/edit-note.svg.js +20 -0
- package/cjs/icons/expand-more.svg.js +20 -0
- package/cjs/icons/headset.svg.js +20 -0
- package/cjs/icons/layers.svg.js +20 -0
- package/cjs/icons/link.svg.js +20 -0
- package/cjs/icons/play.svg.js +20 -0
- package/cjs/icons/search.svg.js +20 -0
- package/cjs/icons/star-filled.svg.js +20 -0
- package/cjs/icons/star.svg.js +20 -0
- package/cjs/icons/triangle-right.svg.js +20 -0
- package/cjs/icons/verification.svg.js +20 -0
- package/cjs/icons/warning-circle.svg.js +20 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +11 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +9 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +11 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +10 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +9 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/createClass.js +19 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/createSuper.js +22 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/defineProperty.js +16 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/extends.js +15 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +11 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/inherits.js +20 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +14 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +9 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +33 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +9 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +9 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +29 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +19 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +15 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +14 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +11 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +14 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +13 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +14 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +18 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +13 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/typeof.js +15 -0
- package/cjs/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +15 -0
- package/cjs/node_modules/@emotion/cache/dist/emotion-cache.esm.js +503 -0
- package/cjs/node_modules/@emotion/hash/dist/emotion-hash.esm.js +59 -0
- package/cjs/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +13 -0
- package/cjs/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js +158 -0
- package/cjs/node_modules/@emotion/react/dist/emotion-react.esm.js +66 -0
- package/cjs/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +240 -0
- package/cjs/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js +144 -0
- package/cjs/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +56 -0
- package/cjs/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js +16 -0
- package/cjs/node_modules/@emotion/utils/dist/emotion-utils.esm.js +60 -0
- package/cjs/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +20 -0
- package/cjs/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +907 -0
- package/cjs/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +374 -0
- package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +128 -0
- package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +165 -0
- package/cjs/node_modules/@restart/hooks/esm/useMergedRefs.js +46 -0
- package/cjs/node_modules/@restart/hooks/esm/useUpdateEffect.js +41 -0
- package/cjs/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +24 -0
- package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +186 -0
- package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +22 -0
- package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +13 -0
- package/cjs/node_modules/memoize-one/dist/memoize-one.esm.js +55 -0
- package/cjs/node_modules/object-assign/index.js +94 -0
- package/cjs/node_modules/prop-types/checkPropTypes.js +110 -0
- package/cjs/node_modules/prop-types/factoryWithThrowingShims.js +69 -0
- package/cjs/node_modules/prop-types/factoryWithTypeCheckers.js +621 -0
- package/cjs/node_modules/prop-types/index.js +33 -0
- package/cjs/node_modules/prop-types/lib/ReactPropTypesSecret.js +16 -0
- package/cjs/node_modules/prop-types/lib/has.js +7 -0
- package/cjs/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +186 -0
- package/cjs/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +22 -0
- package/cjs/node_modules/prop-types/node_modules/react-is/index.js +13 -0
- package/cjs/node_modules/react/cjs/react.development.js +1246 -0
- package/cjs/node_modules/react/cjs/react.production.js +552 -0
- package/cjs/node_modules/react/index.js +19 -0
- package/cjs/node_modules/react-dom/cjs/react-dom.development.js +432 -0
- package/cjs/node_modules/react-dom/cjs/react-dom.production.js +218 -0
- package/cjs/node_modules/react-dom/index.js +44 -0
- package/cjs/node_modules/react-lazy-load-image-component/src/effects/opacity.css.js +6 -0
- package/cjs/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +23 -0
- package/cjs/node_modules/react-select/dist/Select-aab027f3.esm.js +2653 -0
- package/cjs/node_modules/react-select/dist/index-641ee5b8.esm.js +1426 -0
- package/cjs/node_modules/react-select/dist/useCreatable-84008237.esm.js +101 -0
- package/cjs/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js +78 -0
- package/cjs/node_modules/style-inject/dist/style-inject.es.js +32 -0
- package/cjs/node_modules/stylis/src/Enum.js +24 -0
- package/cjs/node_modules/stylis/src/Middleware.js +37 -0
- package/cjs/node_modules/stylis/src/Parser.js +201 -0
- package/cjs/node_modules/stylis/src/Serializer.js +43 -0
- package/cjs/node_modules/stylis/src/Tokenizer.js +243 -0
- package/cjs/node_modules/stylis/src/Utility.js +134 -0
- package/cjs/node_modules/tippy.js/animations/shift-away-subtle.css.js +6 -0
- package/cjs/node_modules/tippy.js/dist/tippy.css.js +6 -0
- package/cjs/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js +12 -0
- package/{ssr → cjs/ssr/ssr}/index.js +1 -3
- package/cjs/styles/utils/colors.scss.js +11 -0
- package/cjs/utils/dateTime.js +20 -0
- package/cjs/utils/defaultTheme.js +52 -0
- package/doctor-storybook.log +20 -0
- package/esm/_virtual/_rollupPluginBabelHelpers.js +74 -0
- package/esm/_virtual/index.js +3 -0
- package/esm/_virtual/index2.js +3 -0
- package/esm/_virtual/index3.js +3 -0
- package/esm/_virtual/index4.js +3 -0
- package/esm/_virtual/index5.js +3 -0
- package/esm/_virtual/react-dom.development.js +3 -0
- package/esm/_virtual/react-dom.production.js +3 -0
- package/esm/_virtual/react-is.development.js +3 -0
- package/esm/_virtual/react-is.development2.js +3 -0
- package/esm/_virtual/react-is.production.min.js +3 -0
- package/esm/_virtual/react-is.production.min2.js +3 -0
- package/esm/_virtual/react.development.js +3 -0
- package/esm/_virtual/react.production.js +3 -0
- package/esm/components/data/Alert/Alert.js +77 -0
- package/esm/components/data/Alert/Alert.styled.js +63 -0
- package/esm/components/data/Alert/data/Alert/index.js +1 -0
- package/esm/components/data/Badge/Badge.js +89 -0
- package/esm/components/data/Badge/Badge.styled.js +145 -0
- package/esm/components/data/Badge/data/Badge/index.js +1 -0
- package/esm/components/data/Popover/Popover.js +94 -0
- package/esm/components/data/Popover/Popover.styled.js +150 -0
- package/esm/components/data/Popover/data/Popover/index.js +1 -0
- package/esm/components/data/Tab/Tab.js +27 -0
- package/esm/components/data/Tab/Tab.styled.js +14 -0
- package/esm/components/data/Tab/data/Tab/index.js +1 -0
- package/esm/components/data/Tabs/Tabs.js +87 -0
- package/esm/components/data/Tabs/Tabs.styled.js +85 -0
- package/esm/components/data/Tabs/data/Tabs/index.js +1 -0
- package/esm/components/data/Tooltip/Tooltip.js +46 -0
- package/esm/components/data/Tooltip/Tooltip.styled.js +29 -0
- package/esm/components/data/Tooltip/data/Tooltip/index.js +1 -0
- package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.js +38 -0
- package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +69 -0
- package/esm/components/data/data/index.js +7 -0
- package/esm/components/inputs/ActionButton/ActionButton.js +38 -0
- package/esm/components/inputs/ActionButton/ActionButton.styled.js +58 -0
- package/esm/components/inputs/ActionButton/inputs/ActionButton/index.js +1 -0
- package/esm/components/inputs/Button/Button.js +184 -0
- package/esm/components/inputs/Button/Button.styled.js +277 -0
- package/esm/components/inputs/Button/inputs/Button/index.js +1 -0
- package/esm/components/inputs/Checkbox/Checkbox.js +98 -0
- package/esm/components/inputs/Checkbox/Checkbox.styled.js +132 -0
- package/esm/components/inputs/Checkbox/inputs/Checkbox/index.js +1 -0
- package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +264 -0
- package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +324 -0
- package/esm/components/inputs/CompactAutocompleteSelect/inputs/CompactAutocompleteSelect/index.js +1 -0
- package/esm/components/inputs/CompactStarRating/CompactStarRating.js +174 -0
- package/esm/components/inputs/CompactStarRating/CompactStarRating.styled.js +245 -0
- package/esm/components/inputs/CompactStarRating/inputs/CompactStarRating/index.js +1 -0
- package/esm/components/inputs/CompactTextInput/CompactTextInput.js +183 -0
- package/esm/components/inputs/CompactTextInput/CompactTextInput.styled.js +335 -0
- package/esm/components/inputs/CompactTextInput/inputs/CompactTextInput/index.js +1 -0
- package/esm/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.js +247 -0
- package/esm/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +75 -0
- package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +181 -0
- package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +104 -0
- package/esm/components/inputs/MultiSelect/MultiSelect.js +247 -0
- package/esm/components/inputs/MultiSelect/MultiSelect.styled.js +251 -0
- package/esm/components/inputs/MultiSelect/inputs/MultiSelect/index.js +1 -0
- package/esm/components/inputs/Radio/Radio.js +63 -0
- package/esm/components/inputs/Radio/Radio.styled.js +84 -0
- package/esm/components/inputs/Radio/inputs/Radio/index.js +1 -0
- package/esm/components/inputs/Switch/Switch.js +65 -0
- package/esm/components/inputs/Switch/Switch.styled.js +110 -0
- package/esm/components/inputs/Switch/inputs/Switch/index.js +1 -0
- package/esm/components/inputs/TextArea/TextArea.js +182 -0
- package/esm/components/inputs/TextArea/TextArea.styled.js +437 -0
- package/esm/components/inputs/TextArea/inputs/TextArea/index.js +1 -0
- package/esm/components/inputs/TextInput/TextInput.js +143 -0
- package/esm/components/inputs/TextInput/TextInput.styled.js +261 -0
- package/esm/components/inputs/TextInput/inputs/TextInput/index.js +1 -0
- package/esm/components/inputs/inputs/index.js +13 -0
- package/esm/components/layout/InputGroup/InputGroup.js +22 -0
- package/esm/components/layout/InputGroup/InputGroup.styled.js +10 -0
- package/esm/components/layout/InputGroup/layout/InputGroup/index.js +1 -0
- package/esm/components/layout/SectionSeparator/SectionSeparator.js +25 -0
- package/esm/components/layout/SectionSeparator/SectionSeparator.styled.js +13 -0
- package/esm/components/layout/SectionSeparator/layout/SectionSeparator/index.js +1 -0
- package/esm/components/layout/layout/index.js +2 -0
- package/esm/components/widgets/AssetAction/AssetAction.js +102 -0
- package/esm/components/widgets/AssetAction/AssetAction.styled.js +46 -0
- package/esm/components/widgets/AssetActionsBase/AssetActionsBase.js +31 -0
- package/esm/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +16 -0
- package/esm/components/widgets/AssetGallery/AssetGallery.js +98 -0
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +384 -0
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +33 -0
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +398 -0
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +311 -0
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +392 -0
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +302 -0
- package/esm/components/widgets/AssetGallery/asset.propType.js +53 -0
- package/esm/components/widgets/AssetGallery/widgets/AssetGallery/index.js +1 -0
- package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +46 -0
- package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +84 -0
- package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/widgets/AssetPreview/AssetPreviewTopBar/index.js +1 -0
- package/esm/components/widgets/ContextMenu/ContextMenu.js +24 -0
- package/esm/components/widgets/ContextMenu/ContextMenu.styled.js +11 -0
- package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +46 -0
- package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +83 -0
- package/esm/components/widgets/ContextMenu/ContextMenuItem/widgets/ContextMenu/ContextMenuItem/index.js +1 -0
- package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.js +24 -0
- package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +22 -0
- package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/widgets/ContextMenu/ContextMenuItemsGroup/index.js +1 -0
- package/esm/components/widgets/ContextMenu/widgets/ContextMenu/index.js +1 -0
- package/esm/components/widgets/InfoCard/InfoCard.js +35 -0
- package/esm/components/widgets/InfoCard/InfoCard.styled.js +94 -0
- package/esm/components/widgets/InfoCard/widgets/InfoCard/index.js +1 -0
- package/esm/components/widgets/Instructions/Instructions.js +213 -0
- package/esm/components/widgets/Instructions/Instructions.styled.js +36 -0
- package/esm/components/widgets/Instructions/widgets/Instructions/index.js +1 -0
- package/esm/components/widgets/ProgressBar/ProgressBar.js +54 -0
- package/esm/components/widgets/ProgressBar/ProgressBar.styled.js +137 -0
- package/esm/components/widgets/ProgressBar/widgets/ProgressBar/index.js +1 -0
- package/esm/components/widgets/SummaryCard/SummaryCard.js +88 -0
- package/esm/components/widgets/SummaryCard/SummaryCard.styled.js +124 -0
- package/esm/components/widgets/widgets/index.js +9 -0
- package/esm/hooks/useEventListner.js +22 -0
- package/esm/hooks/useIsomorphicLayoutEffect.js +7 -0
- package/esm/hooks/useOnClickOutside.js +13 -0
- package/esm/icons/arrow-back.svg.js +16 -0
- package/esm/icons/arrow-forward.svg.js +16 -0
- package/esm/icons/check-rectangle-filled.svg.js +16 -0
- package/esm/icons/close.svg.js +16 -0
- package/esm/icons/edit-note.svg.js +16 -0
- package/esm/icons/expand-more.svg.js +16 -0
- package/esm/icons/headset.svg.js +16 -0
- package/esm/icons/layers.svg.js +16 -0
- package/esm/icons/link.svg.js +16 -0
- package/esm/icons/play.svg.js +16 -0
- package/esm/icons/search.svg.js +16 -0
- package/esm/icons/star-filled.svg.js +16 -0
- package/esm/icons/star.svg.js +16 -0
- package/esm/icons/triangle-right.svg.js +16 -0
- package/esm/icons/verification.svg.js +16 -0
- package/esm/icons/warning-circle.svg.js +16 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +7 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +5 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +7 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +6 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +5 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/createClass.js +15 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/createSuper.js +18 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/defineProperty.js +12 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/extends.js +11 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +7 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/inherits.js +16 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +10 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +5 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +29 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +5 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +5 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +25 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +15 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +11 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +10 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +7 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +10 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +9 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +10 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/typeof.js +11 -0
- package/esm/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +11 -0
- package/esm/node_modules/@emotion/cache/dist/emotion-cache.esm.js +499 -0
- package/esm/node_modules/@emotion/hash/dist/emotion-hash.esm.js +55 -0
- package/esm/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +9 -0
- package/esm/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js +149 -0
- package/esm/node_modules/@emotion/react/dist/emotion-react.esm.js +56 -0
- package/esm/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +236 -0
- package/esm/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js +140 -0
- package/esm/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +52 -0
- package/esm/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js +12 -0
- package/esm/node_modules/@emotion/utils/dist/emotion-utils.esm.js +54 -0
- package/esm/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +16 -0
- package/esm/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +894 -0
- package/esm/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +370 -0
- package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +110 -0
- package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +138 -0
- package/{useMergedRefs-b6d2f8fc.js → esm/node_modules/@restart/hooks/esm/useMergedRefs.js} +4 -5
- package/esm/node_modules/@restart/hooks/esm/useUpdateEffect.js +37 -0
- package/esm/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +22 -0
- package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +181 -0
- package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +17 -0
- package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +11 -0
- package/esm/node_modules/memoize-one/dist/memoize-one.esm.js +51 -0
- package/esm/node_modules/object-assign/index.js +90 -0
- package/esm/node_modules/prop-types/checkPropTypes.js +106 -0
- package/esm/node_modules/prop-types/factoryWithThrowingShims.js +65 -0
- package/{index-39bc450c.js → esm/node_modules/prop-types/factoryWithTypeCheckers.js} +46 -514
- package/esm/node_modules/prop-types/index.js +29 -0
- package/esm/node_modules/prop-types/lib/ReactPropTypesSecret.js +12 -0
- package/esm/node_modules/prop-types/lib/has.js +3 -0
- package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +181 -0
- package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +17 -0
- package/esm/node_modules/prop-types/node_modules/react-is/index.js +11 -0
- package/esm/node_modules/react/cjs/react.development.js +1244 -0
- package/esm/node_modules/react/cjs/react.production.js +547 -0
- package/esm/node_modules/react/index.js +15 -0
- package/esm/node_modules/react-dom/cjs/react-dom.development.js +427 -0
- package/esm/node_modules/react-dom/cjs/react-dom.production.js +213 -0
- package/esm/node_modules/react-dom/index.js +42 -0
- package/esm/node_modules/react-lazy-load-image-component/src/effects/opacity.css.js +4 -0
- package/esm/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +19 -0
- package/esm/node_modules/react-select/dist/Select-aab027f3.esm.js +2644 -0
- package/esm/node_modules/react-select/dist/index-641ee5b8.esm.js +1385 -0
- package/esm/node_modules/react-select/dist/useCreatable-84008237.esm.js +97 -0
- package/esm/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js +74 -0
- package/esm/node_modules/style-inject/dist/style-inject.es.js +28 -0
- package/esm/node_modules/stylis/src/Enum.js +12 -0
- package/esm/node_modules/stylis/src/Middleware.js +32 -0
- package/esm/node_modules/stylis/src/Parser.js +193 -0
- package/esm/node_modules/stylis/src/Serializer.js +38 -0
- package/esm/node_modules/stylis/src/Tokenizer.js +223 -0
- package/esm/node_modules/stylis/src/Utility.js +117 -0
- package/esm/node_modules/tippy.js/animations/shift-away-subtle.css.js +4 -0
- package/esm/node_modules/tippy.js/dist/tippy.css.js +4 -0
- package/esm/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js +8 -0
- package/esm/ssr/ssr/index.js +1 -0
- package/esm/styles/utils/colors.scss.js +7 -0
- package/esm/utils/dateTime.js +16 -0
- package/esm/utils/defaultTheme.js +47 -0
- package/icons/arrow-forward.svg +3 -0
- package/icons/index.js +2 -0
- package/migration-storybook.log +392 -0
- package/package.json +59 -21
- package/styles/all.scss +3 -3
- package/styles/config.scss +3 -0
- package/styles/utils/colors.scss +1 -1
- package/styles/utils/theme.scss +2 -0
- package/ActionButton-15b418c5.js +0 -62
- package/Alert-e9f818d6.js +0 -118
- package/AssetGallery-66cb0dab.js +0 -1925
- package/AssetPreviewTopBar-21b7e172.js +0 -100
- package/AsyncSelect-368b5068.js +0 -28
- package/Badge-72b369a6.js +0 -222
- package/Button-34ce13c6.js +0 -265
- package/Checkbox-d77eed5d.js +0 -141
- package/CompactAutocompleteSelect-72d523e3.js +0 -452
- package/CompactStarRating-bf45f620.js +0 -340
- package/CompactTextInput-0b1979f1.js +0 -350
- package/ContextMenu-f69599d5.js +0 -33
- package/ContextMenuItem-9c5c4c9f.js +0 -111
- package/InputGroup-e30507cb.js +0 -29
- package/Instructions-42d2bc58.js +0 -264
- package/MultiLevelCheckboxSelect-acaac96b.js +0 -699
- package/MultiSelect-ecb48e03.js +0 -378
- package/Popover-a76d0fe5.js +0 -147
- package/Radio-7d5f630d.js +0 -87
- package/SectionSeparator-2a1c720b.js +0 -38
- package/Switch-006abdbd.js +0 -108
- package/Tab-87287c6e.js +0 -36
- package/Tabs-8e4de5a5.js +0 -152
- package/TextArea-76231a3b.js +0 -376
- package/TextInput-a440374c.js +0 -237
- package/Tooltip-298f0547.js +0 -62
- package/VerificationStatusIcon-d596165f.js +0 -122
- package/close-ebf2f3cf.js +0 -41
- package/data/Alert/index.js +0 -12
- package/data/Badge/index.js +0 -11
- package/data/Popover/index.js +0 -16
- package/data/Tab/index.js +0 -11
- package/data/Tabs/index.js +0 -13
- package/data/Tooltip/index.js +0 -13
- package/data/index.js +0 -30
- package/defaultTheme-fcd45bd0.js +0 -339
- package/edit-note-c47d292e.js +0 -41
- package/expand-more-94585605.js +0 -41
- package/inputs/ActionButton/index.js +0 -12
- package/inputs/AsyncSelect/index.js +0 -11
- package/inputs/Button/index.js +0 -19
- package/inputs/Checkbox/index.js +0 -13
- package/inputs/CompactAutocompleteSelect/index.js +0 -30
- package/inputs/CompactStarRating/index.js +0 -23
- package/inputs/CompactTextInput/index.js +0 -25
- package/inputs/MultiSelect/index.js +0 -17
- package/inputs/Radio/index.js +0 -13
- package/inputs/Switch/index.js +0 -13
- package/inputs/TextArea/index.js +0 -26
- package/inputs/TextInput/index.js +0 -15
- package/inputs/index.js +0 -62
- package/layout/InputGroup/index.js +0 -11
- package/layout/SectionSeparator/index.js +0 -11
- package/layout/index.js +0 -15
- package/react-select-creatable.esm-2f23d6c6.js +0 -7709
- package/shift-away-subtle-45129125.js +0 -9
- package/warning-circle-24522402.js +0 -41
- package/widgets/AssetGallery/index.js +0 -52
- package/widgets/AssetPreview/AssetPreviewTopBar/index.js +0 -12
- package/widgets/ContextMenu/ContextMenuItem/index.js +0 -11
- package/widgets/ContextMenu/ContextMenuItemsGroup/index.js +0 -33
- package/widgets/ContextMenu/index.js +0 -11
- package/widgets/Instructions/index.js +0 -35
- package/widgets/index.js +0 -60
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var emotionSheet_esm = require('../../sheet/dist/emotion-sheet.esm.js');
|
|
6
|
+
var emotionWeakMemoize_esm = require('../../weak-memoize/dist/emotion-weak-memoize.esm.js');
|
|
7
|
+
var emotionMemoize_esm = require('../../memoize/dist/emotion-memoize.esm.js');
|
|
8
|
+
var Middleware = require('../../../stylis/src/Middleware.js');
|
|
9
|
+
var Enum = require('../../../stylis/src/Enum.js');
|
|
10
|
+
var Utility = require('../../../stylis/src/Utility.js');
|
|
11
|
+
var Serializer = require('../../../stylis/src/Serializer.js');
|
|
12
|
+
var Tokenizer = require('../../../stylis/src/Tokenizer.js');
|
|
13
|
+
var Parser = require('../../../stylis/src/Parser.js');
|
|
14
|
+
|
|
15
|
+
var isBrowser = typeof document !== 'undefined';
|
|
16
|
+
|
|
17
|
+
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
18
|
+
var previous = 0;
|
|
19
|
+
var character = 0;
|
|
20
|
+
|
|
21
|
+
while (true) {
|
|
22
|
+
previous = character;
|
|
23
|
+
character = Tokenizer.peek(); // &\f
|
|
24
|
+
|
|
25
|
+
if (previous === 38 && character === 12) {
|
|
26
|
+
points[index] = 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (Tokenizer.token(character)) {
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
Tokenizer.next();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return Tokenizer.slice(begin, Tokenizer.position);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var toRules = function toRules(parsed, points) {
|
|
40
|
+
// pretend we've started with a comma
|
|
41
|
+
var index = -1;
|
|
42
|
+
var character = 44;
|
|
43
|
+
|
|
44
|
+
do {
|
|
45
|
+
switch (Tokenizer.token(character)) {
|
|
46
|
+
case 0:
|
|
47
|
+
// &\f
|
|
48
|
+
if (character === 38 && Tokenizer.peek() === 12) {
|
|
49
|
+
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
|
|
50
|
+
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
|
|
51
|
+
// and when it should just concatenate the outer and inner selectors
|
|
52
|
+
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
|
|
53
|
+
points[index] = 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
parsed[index] += identifierWithPointTracking(Tokenizer.position - 1, points, index);
|
|
57
|
+
break;
|
|
58
|
+
|
|
59
|
+
case 2:
|
|
60
|
+
parsed[index] += Tokenizer.delimit(character);
|
|
61
|
+
break;
|
|
62
|
+
|
|
63
|
+
case 4:
|
|
64
|
+
// comma
|
|
65
|
+
if (character === 44) {
|
|
66
|
+
// colon
|
|
67
|
+
parsed[++index] = Tokenizer.peek() === 58 ? '&\f' : '';
|
|
68
|
+
points[index] = parsed[index].length;
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// fallthrough
|
|
73
|
+
|
|
74
|
+
default:
|
|
75
|
+
parsed[index] += Utility.from(character);
|
|
76
|
+
}
|
|
77
|
+
} while (character = Tokenizer.next());
|
|
78
|
+
|
|
79
|
+
return parsed;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var getRules = function getRules(value, points) {
|
|
83
|
+
return Tokenizer.dealloc(toRules(Tokenizer.alloc(value), points));
|
|
84
|
+
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
var fixedElements = /* #__PURE__ */new WeakMap();
|
|
88
|
+
var compat = function compat(element) {
|
|
89
|
+
if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
|
|
90
|
+
// negative .length indicates that this rule has been already prefixed
|
|
91
|
+
element.length < 1) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
var value = element.value;
|
|
96
|
+
var parent = element.parent;
|
|
97
|
+
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
98
|
+
|
|
99
|
+
while (parent.type !== 'rule') {
|
|
100
|
+
parent = parent.parent;
|
|
101
|
+
if (!parent) return;
|
|
102
|
+
} // short-circuit for the simplest case
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
if (element.props.length === 1 && value.charCodeAt(0) !== 58
|
|
106
|
+
/* colon */
|
|
107
|
+
&& !fixedElements.get(parent)) {
|
|
108
|
+
return;
|
|
109
|
+
} // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
|
|
110
|
+
// then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
if (isImplicitRule) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
fixedElements.set(element, true);
|
|
118
|
+
var points = [];
|
|
119
|
+
var rules = getRules(value, points);
|
|
120
|
+
var parentRules = parent.props;
|
|
121
|
+
|
|
122
|
+
for (var i = 0, k = 0; i < rules.length; i++) {
|
|
123
|
+
for (var j = 0; j < parentRules.length; j++, k++) {
|
|
124
|
+
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
var removeLabel = function removeLabel(element) {
|
|
129
|
+
if (element.type === 'decl') {
|
|
130
|
+
var value = element.value;
|
|
131
|
+
|
|
132
|
+
if ( // charcode for l
|
|
133
|
+
value.charCodeAt(0) === 108 && // charcode for b
|
|
134
|
+
value.charCodeAt(2) === 98) {
|
|
135
|
+
// this ignores label
|
|
136
|
+
element["return"] = '';
|
|
137
|
+
element.value = '';
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/* eslint-disable no-fallthrough */
|
|
143
|
+
|
|
144
|
+
function prefix(value, length) {
|
|
145
|
+
switch (Utility.hash(value, length)) {
|
|
146
|
+
// color-adjust
|
|
147
|
+
case 5103:
|
|
148
|
+
return Enum.WEBKIT + 'print-' + value + value;
|
|
149
|
+
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
150
|
+
|
|
151
|
+
case 5737:
|
|
152
|
+
case 4201:
|
|
153
|
+
case 3177:
|
|
154
|
+
case 3433:
|
|
155
|
+
case 1641:
|
|
156
|
+
case 4457:
|
|
157
|
+
case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
158
|
+
|
|
159
|
+
case 5572:
|
|
160
|
+
case 6356:
|
|
161
|
+
case 5844:
|
|
162
|
+
case 3191:
|
|
163
|
+
case 6645:
|
|
164
|
+
case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
165
|
+
|
|
166
|
+
case 6391:
|
|
167
|
+
case 5879:
|
|
168
|
+
case 5623:
|
|
169
|
+
case 6135:
|
|
170
|
+
case 4599:
|
|
171
|
+
case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
172
|
+
|
|
173
|
+
case 4215:
|
|
174
|
+
case 6389:
|
|
175
|
+
case 5109:
|
|
176
|
+
case 5365:
|
|
177
|
+
case 5621:
|
|
178
|
+
case 3829:
|
|
179
|
+
return Enum.WEBKIT + value + value;
|
|
180
|
+
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
181
|
+
|
|
182
|
+
case 5349:
|
|
183
|
+
case 4246:
|
|
184
|
+
case 4810:
|
|
185
|
+
case 6968:
|
|
186
|
+
case 2756:
|
|
187
|
+
return Enum.WEBKIT + value + Enum.MOZ + value + Enum.MS + value + value;
|
|
188
|
+
// flex, flex-direction
|
|
189
|
+
|
|
190
|
+
case 6828:
|
|
191
|
+
case 4268:
|
|
192
|
+
return Enum.WEBKIT + value + Enum.MS + value + value;
|
|
193
|
+
// order
|
|
194
|
+
|
|
195
|
+
case 6165:
|
|
196
|
+
return Enum.WEBKIT + value + Enum.MS + 'flex-' + value + value;
|
|
197
|
+
// align-items
|
|
198
|
+
|
|
199
|
+
case 5187:
|
|
200
|
+
return Enum.WEBKIT + value + Utility.replace(value, /(\w+).+(:[^]+)/, Enum.WEBKIT + 'box-$1$2' + Enum.MS + 'flex-$1$2') + value;
|
|
201
|
+
// align-self
|
|
202
|
+
|
|
203
|
+
case 5443:
|
|
204
|
+
return Enum.WEBKIT + value + Enum.MS + 'flex-item-' + Utility.replace(value, /flex-|-self/, '') + value;
|
|
205
|
+
// align-content
|
|
206
|
+
|
|
207
|
+
case 4675:
|
|
208
|
+
return Enum.WEBKIT + value + Enum.MS + 'flex-line-pack' + Utility.replace(value, /align-content|flex-|-self/, '') + value;
|
|
209
|
+
// flex-shrink
|
|
210
|
+
|
|
211
|
+
case 5548:
|
|
212
|
+
return Enum.WEBKIT + value + Enum.MS + Utility.replace(value, 'shrink', 'negative') + value;
|
|
213
|
+
// flex-basis
|
|
214
|
+
|
|
215
|
+
case 5292:
|
|
216
|
+
return Enum.WEBKIT + value + Enum.MS + Utility.replace(value, 'basis', 'preferred-size') + value;
|
|
217
|
+
// flex-grow
|
|
218
|
+
|
|
219
|
+
case 6060:
|
|
220
|
+
return Enum.WEBKIT + 'box-' + Utility.replace(value, '-grow', '') + Enum.WEBKIT + value + Enum.MS + Utility.replace(value, 'grow', 'positive') + value;
|
|
221
|
+
// transition
|
|
222
|
+
|
|
223
|
+
case 4554:
|
|
224
|
+
return Enum.WEBKIT + Utility.replace(value, /([^-])(transform)/g, '$1' + Enum.WEBKIT + '$2') + value;
|
|
225
|
+
// cursor
|
|
226
|
+
|
|
227
|
+
case 6187:
|
|
228
|
+
return Utility.replace(Utility.replace(Utility.replace(value, /(zoom-|grab)/, Enum.WEBKIT + '$1'), /(image-set)/, Enum.WEBKIT + '$1'), value, '') + value;
|
|
229
|
+
// background, background-image
|
|
230
|
+
|
|
231
|
+
case 5495:
|
|
232
|
+
case 3959:
|
|
233
|
+
return Utility.replace(value, /(image-set\([^]*)/, Enum.WEBKIT + '$1' + '$`$1');
|
|
234
|
+
// justify-content
|
|
235
|
+
|
|
236
|
+
case 4968:
|
|
237
|
+
return Utility.replace(Utility.replace(value, /(.+:)(flex-)?(.*)/, Enum.WEBKIT + 'box-pack:$3' + Enum.MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + Enum.WEBKIT + value + value;
|
|
238
|
+
// (margin|padding)-inline-(start|end)
|
|
239
|
+
|
|
240
|
+
case 4095:
|
|
241
|
+
case 3583:
|
|
242
|
+
case 4068:
|
|
243
|
+
case 2532:
|
|
244
|
+
return Utility.replace(value, /(.+)-inline(.+)/, Enum.WEBKIT + '$1$2') + value;
|
|
245
|
+
// (min|max)?(width|height|inline-size|block-size)
|
|
246
|
+
|
|
247
|
+
case 8116:
|
|
248
|
+
case 7059:
|
|
249
|
+
case 5753:
|
|
250
|
+
case 5535:
|
|
251
|
+
case 5445:
|
|
252
|
+
case 5701:
|
|
253
|
+
case 4933:
|
|
254
|
+
case 4677:
|
|
255
|
+
case 5533:
|
|
256
|
+
case 5789:
|
|
257
|
+
case 5021:
|
|
258
|
+
case 4765:
|
|
259
|
+
// stretch, max-content, min-content, fill-available
|
|
260
|
+
if (Utility.strlen(value) - 1 - length > 6) switch (Utility.charat(value, length + 1)) {
|
|
261
|
+
// (m)ax-content, (m)in-content
|
|
262
|
+
case 109:
|
|
263
|
+
// -
|
|
264
|
+
if (Utility.charat(value, length + 4) !== 45) break;
|
|
265
|
+
// (f)ill-available, (f)it-content
|
|
266
|
+
|
|
267
|
+
case 102:
|
|
268
|
+
return Utility.replace(value, /(.+:)(.+)-([^]+)/, '$1' + Enum.WEBKIT + '$2-$3' + '$1' + Enum.MOZ + (Utility.charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
269
|
+
// (s)tretch
|
|
270
|
+
|
|
271
|
+
case 115:
|
|
272
|
+
return ~Utility.indexof(value, 'stretch') ? prefix(Utility.replace(value, 'stretch', 'fill-available'), length) + value : value;
|
|
273
|
+
}
|
|
274
|
+
break;
|
|
275
|
+
// position: sticky
|
|
276
|
+
|
|
277
|
+
case 4949:
|
|
278
|
+
// (s)ticky?
|
|
279
|
+
if (Utility.charat(value, length + 1) !== 115) break;
|
|
280
|
+
// display: (flex|inline-flex)
|
|
281
|
+
|
|
282
|
+
case 6444:
|
|
283
|
+
switch (Utility.charat(value, Utility.strlen(value) - 3 - (~Utility.indexof(value, '!important') && 10))) {
|
|
284
|
+
// stic(k)y
|
|
285
|
+
case 107:
|
|
286
|
+
return Utility.replace(value, ':', ':' + Enum.WEBKIT) + value;
|
|
287
|
+
// (inline-)?fl(e)x
|
|
288
|
+
|
|
289
|
+
case 101:
|
|
290
|
+
return Utility.replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + Enum.WEBKIT + (Utility.charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + Enum.WEBKIT + '$2$3' + '$1' + Enum.MS + '$2box$3') + value;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
break;
|
|
294
|
+
// writing-mode
|
|
295
|
+
|
|
296
|
+
case 5936:
|
|
297
|
+
switch (Utility.charat(value, length + 11)) {
|
|
298
|
+
// vertical-l(r)
|
|
299
|
+
case 114:
|
|
300
|
+
return Enum.WEBKIT + value + Enum.MS + Utility.replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
301
|
+
// vertical-r(l)
|
|
302
|
+
|
|
303
|
+
case 108:
|
|
304
|
+
return Enum.WEBKIT + value + Enum.MS + Utility.replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
305
|
+
// horizontal(-)tb
|
|
306
|
+
|
|
307
|
+
case 45:
|
|
308
|
+
return Enum.WEBKIT + value + Enum.MS + Utility.replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
return Enum.WEBKIT + value + Enum.MS + value + value;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return value;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
var prefixer = function prefixer(element, index, children, callback) {
|
|
318
|
+
if (element.length > -1) if (!element["return"]) switch (element.type) {
|
|
319
|
+
case Enum.DECLARATION:
|
|
320
|
+
element["return"] = prefix(element.value, element.length);
|
|
321
|
+
break;
|
|
322
|
+
|
|
323
|
+
case Enum.KEYFRAMES:
|
|
324
|
+
return Serializer.serialize([Tokenizer.copy(element, {
|
|
325
|
+
value: Utility.replace(element.value, '@', '@' + Enum.WEBKIT)
|
|
326
|
+
})], callback);
|
|
327
|
+
|
|
328
|
+
case Enum.RULESET:
|
|
329
|
+
if (element.length) return Utility.combine(element.props, function (value) {
|
|
330
|
+
switch (Utility.match(value, /(::plac\w+|:read-\w+)/)) {
|
|
331
|
+
// :read-(only|write)
|
|
332
|
+
case ':read-only':
|
|
333
|
+
case ':read-write':
|
|
334
|
+
return Serializer.serialize([Tokenizer.copy(element, {
|
|
335
|
+
props: [Utility.replace(value, /:(read-\w+)/, ':' + Enum.MOZ + '$1')]
|
|
336
|
+
})], callback);
|
|
337
|
+
// :placeholder
|
|
338
|
+
|
|
339
|
+
case '::placeholder':
|
|
340
|
+
return Serializer.serialize([Tokenizer.copy(element, {
|
|
341
|
+
props: [Utility.replace(value, /:(plac\w+)/, ':' + Enum.WEBKIT + 'input-$1')]
|
|
342
|
+
}), Tokenizer.copy(element, {
|
|
343
|
+
props: [Utility.replace(value, /:(plac\w+)/, ':' + Enum.MOZ + '$1')]
|
|
344
|
+
}), Tokenizer.copy(element, {
|
|
345
|
+
props: [Utility.replace(value, /:(plac\w+)/, Enum.MS + 'input-$1')]
|
|
346
|
+
})], callback);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
return '';
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
var getServerStylisCache = isBrowser ? undefined : emotionWeakMemoize_esm["default"](function () {
|
|
355
|
+
return emotionMemoize_esm["default"](function () {
|
|
356
|
+
return {};
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
var defaultStylisPlugins = [prefixer];
|
|
360
|
+
|
|
361
|
+
var createCache = function createCache(options) {
|
|
362
|
+
var key = options.key;
|
|
363
|
+
|
|
364
|
+
if (isBrowser && key === 'css') {
|
|
365
|
+
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
|
366
|
+
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
|
367
|
+
// note this very very intentionally targets all style elements regardless of the key to ensure
|
|
368
|
+
// that creating a cache works inside of render of a React component
|
|
369
|
+
|
|
370
|
+
Array.prototype.forEach.call(ssrStyles, function (node) {
|
|
371
|
+
// we want to only move elements which have a space in the data-emotion attribute value
|
|
372
|
+
// because that indicates that it is an Emotion 11 server-side rendered style elements
|
|
373
|
+
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
|
|
374
|
+
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
|
|
375
|
+
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
|
|
376
|
+
// will not result in the Emotion 10 styles being destroyed
|
|
377
|
+
var dataEmotionAttribute = node.getAttribute('data-emotion');
|
|
378
|
+
|
|
379
|
+
if (dataEmotionAttribute.indexOf(' ') === -1) {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
document.head.appendChild(node);
|
|
384
|
+
node.setAttribute('data-s', '');
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
|
389
|
+
|
|
390
|
+
var inserted = {};
|
|
391
|
+
var container;
|
|
392
|
+
var nodesToHydrate = [];
|
|
393
|
+
|
|
394
|
+
if (isBrowser) {
|
|
395
|
+
container = options.container || document.head;
|
|
396
|
+
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
|
397
|
+
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
398
|
+
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
|
|
399
|
+
var attrib = node.getAttribute("data-emotion").split(' ');
|
|
400
|
+
|
|
401
|
+
for (var i = 1; i < attrib.length; i++) {
|
|
402
|
+
inserted[attrib[i]] = true;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
nodesToHydrate.push(node);
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
var _insert;
|
|
410
|
+
|
|
411
|
+
var omnipresentPlugins = [compat, removeLabel];
|
|
412
|
+
|
|
413
|
+
if (!getServerStylisCache) {
|
|
414
|
+
var currentSheet;
|
|
415
|
+
var finalizingPlugins = [Serializer.stringify, Middleware.rulesheet(function (rule) {
|
|
416
|
+
currentSheet.insert(rule);
|
|
417
|
+
})];
|
|
418
|
+
var serializer = Middleware.middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
419
|
+
|
|
420
|
+
var stylis = function stylis(styles) {
|
|
421
|
+
return Serializer.serialize(Parser.compile(styles), serializer);
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
425
|
+
currentSheet = sheet;
|
|
426
|
+
|
|
427
|
+
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
428
|
+
|
|
429
|
+
if (shouldCache) {
|
|
430
|
+
cache.inserted[serialized.name] = true;
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
} else {
|
|
434
|
+
var _finalizingPlugins = [Serializer.stringify];
|
|
435
|
+
|
|
436
|
+
var _serializer = Middleware.middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
|
|
437
|
+
|
|
438
|
+
var _stylis = function _stylis(styles) {
|
|
439
|
+
return Serializer.serialize(Parser.compile(styles), _serializer);
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
443
|
+
|
|
444
|
+
var getRules = function getRules(selector, serialized) {
|
|
445
|
+
var name = serialized.name;
|
|
446
|
+
|
|
447
|
+
if (serverStylisCache[name] === undefined) {
|
|
448
|
+
serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
return serverStylisCache[name];
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
_insert = function _insert(selector, serialized, sheet, shouldCache) {
|
|
455
|
+
var name = serialized.name;
|
|
456
|
+
var rules = getRules(selector, serialized);
|
|
457
|
+
|
|
458
|
+
if (cache.compat === undefined) {
|
|
459
|
+
// in regular mode, we don't set the styles on the inserted cache
|
|
460
|
+
// since we don't need to and that would be wasting memory
|
|
461
|
+
// we return them so that they are rendered in a style tag
|
|
462
|
+
if (shouldCache) {
|
|
463
|
+
cache.inserted[name] = true;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return rules;
|
|
467
|
+
} else {
|
|
468
|
+
// in compat mode, we put the styles on the inserted cache so
|
|
469
|
+
// that emotion-server can pull out the styles
|
|
470
|
+
// except when we don't want to cache it which was in Global but now
|
|
471
|
+
// is nowhere but we don't want to do a major right now
|
|
472
|
+
// and just in case we're going to leave the case here
|
|
473
|
+
// it's also not affecting client side bundle size
|
|
474
|
+
// so it's really not a big deal
|
|
475
|
+
if (shouldCache) {
|
|
476
|
+
cache.inserted[name] = rules;
|
|
477
|
+
} else {
|
|
478
|
+
return rules;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
var cache = {
|
|
485
|
+
key: key,
|
|
486
|
+
sheet: new emotionSheet_esm.StyleSheet({
|
|
487
|
+
key: key,
|
|
488
|
+
container: container,
|
|
489
|
+
nonce: options.nonce,
|
|
490
|
+
speedy: options.speedy,
|
|
491
|
+
prepend: options.prepend,
|
|
492
|
+
insertionPoint: options.insertionPoint
|
|
493
|
+
}),
|
|
494
|
+
nonce: options.nonce,
|
|
495
|
+
inserted: inserted,
|
|
496
|
+
registered: {},
|
|
497
|
+
insert: _insert
|
|
498
|
+
};
|
|
499
|
+
cache.sheet.hydrate(nodesToHydrate);
|
|
500
|
+
return cache;
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
exports["default"] = createCache;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
// Inspired by https://github.com/garycourt/murmurhash-js
|
|
7
|
+
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
|
|
8
|
+
function murmur2(str) {
|
|
9
|
+
// 'm' and 'r' are mixing constants generated offline.
|
|
10
|
+
// They're not really 'magic', they just happen to work well.
|
|
11
|
+
// const m = 0x5bd1e995;
|
|
12
|
+
// const r = 24;
|
|
13
|
+
// Initialize the hash
|
|
14
|
+
var h = 0; // Mix 4 bytes at a time into the hash
|
|
15
|
+
|
|
16
|
+
var k,
|
|
17
|
+
i = 0,
|
|
18
|
+
len = str.length;
|
|
19
|
+
|
|
20
|
+
for (; len >= 4; ++i, len -= 4) {
|
|
21
|
+
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
|
|
22
|
+
k =
|
|
23
|
+
/* Math.imul(k, m): */
|
|
24
|
+
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
|
|
25
|
+
k ^=
|
|
26
|
+
/* k >>> r: */
|
|
27
|
+
k >>> 24;
|
|
28
|
+
h =
|
|
29
|
+
/* Math.imul(k, m): */
|
|
30
|
+
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
|
|
31
|
+
/* Math.imul(h, m): */
|
|
32
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
33
|
+
} // Handle the last few bytes of the input array
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
switch (len) {
|
|
37
|
+
case 3:
|
|
38
|
+
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
|
|
39
|
+
|
|
40
|
+
case 2:
|
|
41
|
+
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
|
|
42
|
+
|
|
43
|
+
case 1:
|
|
44
|
+
h ^= str.charCodeAt(i) & 0xff;
|
|
45
|
+
h =
|
|
46
|
+
/* Math.imul(h, m): */
|
|
47
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
48
|
+
} // Do a few final mixes of the hash to ensure the last few
|
|
49
|
+
// bytes are well-incorporated.
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
h ^= h >>> 13;
|
|
53
|
+
h =
|
|
54
|
+
/* Math.imul(h, m): */
|
|
55
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
56
|
+
return ((h ^ h >>> 15) >>> 0).toString(36);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
exports["default"] = murmur2;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
function memoize(fn) {
|
|
6
|
+
var cache = Object.create(null);
|
|
7
|
+
return function (arg) {
|
|
8
|
+
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
9
|
+
return cache[arg];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
exports["default"] = memoize;
|