@semcore/core 2.39.1-prerelease.8 → 16.0.0-prerelease.2
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/CHANGELOG.md +7 -0
- package/README.md +2 -2
- package/lib/LastInteractionType.d.ts +11 -0
- package/lib/cjs/LastInteractionType.js +57 -0
- package/lib/cjs/LastInteractionType.js.map +1 -0
- package/lib/cjs/core-types/Component.js +59 -0
- package/lib/cjs/core-types/Component.js.map +1 -0
- package/lib/cjs/core-types/UnknownProperties.js +2 -0
- package/lib/cjs/core-types/UnknownProperties.js.map +1 -0
- package/lib/cjs/core-types/reshadow.d.js +2 -0
- package/lib/cjs/core-types/reshadow.d.js.map +1 -0
- package/lib/cjs/core-types/symbols.js +25 -0
- package/lib/cjs/core-types/symbols.js.map +1 -0
- package/lib/cjs/coreFactory.js +352 -0
- package/lib/cjs/coreFactory.js.map +1 -0
- package/lib/cjs/enhancement/Children.js +119 -0
- package/lib/cjs/enhancement/Children.js.map +1 -0
- package/lib/cjs/enhancement/Root.js +78 -0
- package/lib/cjs/enhancement/Root.js.map +1 -0
- package/lib/cjs/enhancement/bindHandler.js +54 -0
- package/lib/cjs/enhancement/bindHandler.js.map +1 -0
- package/lib/cjs/enhancement/dataName.js +20 -0
- package/lib/cjs/enhancement/dataName.js.map +1 -0
- package/lib/cjs/enhancement/enhance.js +22 -0
- package/lib/cjs/enhancement/enhance.js.map +1 -0
- package/lib/cjs/enhancement/functionDefaultProps.js +36 -0
- package/lib/cjs/enhancement/functionDefaultProps.js.map +1 -0
- package/lib/cjs/enhancement/hoistProps.js +97 -0
- package/lib/cjs/enhancement/hoistProps.js.map +1 -0
- package/lib/cjs/enhancement/i18n.js +28 -0
- package/lib/cjs/enhancement/i18n.js.map +1 -0
- package/lib/cjs/enhancement/inheritedName.js +23 -0
- package/lib/cjs/enhancement/inheritedName.js.map +1 -0
- package/lib/cjs/enhancement/staticChildren.js +135 -0
- package/lib/cjs/enhancement/staticChildren.js.map +1 -0
- package/lib/cjs/enhancement/style.js +60 -0
- package/lib/cjs/enhancement/style.js.map +1 -0
- package/lib/cjs/enhancement/uncontrolledProps.js +131 -0
- package/lib/cjs/enhancement/uncontrolledProps.js.map +1 -0
- package/lib/cjs/index.js +97 -17
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/register.js +37 -0
- package/lib/cjs/register.js.map +1 -0
- package/lib/cjs/styled/index.js +32 -0
- package/lib/cjs/styled/index.js.map +1 -0
- package/lib/cjs/styled/reshadow-core.js +256 -0
- package/lib/cjs/styled/reshadow-core.js.map +1 -0
- package/lib/cjs/styled/sstyled.js +149 -0
- package/lib/cjs/styled/sstyled.js.map +1 -0
- package/lib/cjs/theme/dark.json +2506 -0
- package/lib/cjs/theme/exclude-tokens.json +10 -0
- package/lib/cjs/theme/light.json +2584 -0
- package/lib/cjs/theme/processor.js +315 -0
- package/lib/cjs/theme/processor.js.map +1 -0
- package/lib/cjs/theme/themes/auto.css +1465 -0
- package/lib/cjs/theme/themes/dark.css +723 -0
- package/lib/cjs/theme/themes/dark.js +385 -0
- package/lib/cjs/theme/themes/dark.js.map +1 -0
- package/lib/cjs/theme/themes/default.css +742 -0
- package/lib/cjs/theme/themes/default.js +394 -0
- package/lib/cjs/theme/themes/default.js.map +1 -0
- package/lib/cjs/theme/themes/light.css +742 -0
- package/lib/cjs/theme/themes/light.js +394 -0
- package/lib/cjs/theme/themes/light.js.map +1 -0
- package/lib/cjs/theme/utils.js +297 -0
- package/lib/cjs/theme/utils.js.map +1 -0
- package/lib/cjs/utils/CSSinJS.js +36 -0
- package/lib/cjs/utils/CSSinJS.js.map +1 -0
- package/lib/cjs/utils/ScreenReaderOnly.js +31 -0
- package/lib/cjs/utils/ScreenReaderOnly.js.map +1 -0
- package/lib/cjs/utils/ThemeProvider.js +82 -0
- package/lib/cjs/utils/ThemeProvider.js.map +1 -0
- package/lib/cjs/utils/addonText.js +18 -0
- package/lib/cjs/utils/addonText.js.map +1 -0
- package/lib/cjs/utils/addonTextChildren.js +45 -0
- package/lib/cjs/utils/addonTextChildren.js.map +1 -0
- package/lib/cjs/utils/ariaProps.js +22 -0
- package/lib/cjs/utils/ariaProps.js.map +1 -0
- package/lib/cjs/utils/assignProps.js +93 -0
- package/lib/cjs/utils/assignProps.js.map +1 -0
- package/lib/cjs/utils/canUseDOM.js +10 -0
- package/lib/cjs/utils/canUseDOM.js.map +1 -0
- package/lib/cjs/utils/capitalizeFirstLetter.js +10 -0
- package/lib/cjs/utils/capitalizeFirstLetter.js.map +1 -0
- package/lib/cjs/utils/color.js +208 -0
- package/lib/cjs/utils/color.js.map +1 -0
- package/lib/cjs/utils/compose.js +21 -0
- package/lib/cjs/utils/compose.js.map +1 -0
- package/lib/cjs/utils/createHoc.js +55 -0
- package/lib/cjs/utils/createHoc.js.map +1 -0
- package/lib/cjs/utils/createUUID.js +15 -0
- package/lib/cjs/utils/createUUID.js.map +1 -0
- package/lib/cjs/utils/cssToIntDefault.js +22 -0
- package/lib/cjs/utils/cssToIntDefault.js.map +1 -0
- package/lib/cjs/utils/enhances/WithAutoFocus.js +75 -0
- package/lib/cjs/utils/enhances/WithAutoFocus.js.map +1 -0
- package/lib/cjs/utils/enhances/WithCSS.js +93 -0
- package/lib/cjs/utils/enhances/WithCSS.js.map +1 -0
- package/lib/cjs/utils/enhances/WithI18n.js +95 -0
- package/lib/cjs/utils/enhances/WithI18n.js.map +1 -0
- package/lib/cjs/utils/enhances/WithKeyboardFocus.js +93 -0
- package/lib/cjs/utils/enhances/WithKeyboardFocus.js.map +1 -0
- package/lib/cjs/utils/enhances/WithRef.js +26 -0
- package/lib/cjs/utils/enhances/WithRef.js.map +1 -0
- package/lib/cjs/utils/enhances/a11yEnhance.js +74 -0
- package/lib/cjs/utils/enhances/a11yEnhance.js.map +1 -0
- package/lib/cjs/utils/enhances/animatedSizeEnhance.js +98 -0
- package/lib/cjs/utils/enhances/animatedSizeEnhance.js.map +1 -0
- package/lib/cjs/utils/enhances/autoFocusEnhance.js +46 -0
- package/lib/cjs/utils/enhances/autoFocusEnhance.js.map +1 -0
- package/lib/cjs/utils/enhances/contextEnhance.js +22 -0
- package/lib/cjs/utils/enhances/contextEnhance.js.map +1 -0
- package/lib/cjs/utils/enhances/i18nEnhance.js +101 -0
- package/lib/cjs/utils/enhances/i18nEnhance.js.map +1 -0
- package/lib/cjs/utils/enhances/keyboardFocusEnhance.js +63 -0
- package/lib/cjs/utils/enhances/keyboardFocusEnhance.js.map +1 -0
- package/lib/cjs/utils/enhances/resolveColorEnhance.js +25 -0
- package/lib/cjs/utils/enhances/resolveColorEnhance.js.map +1 -0
- package/lib/cjs/utils/eventEmitter.js +41 -0
- package/lib/cjs/utils/eventEmitter.js.map +1 -0
- package/lib/cjs/utils/findComponent.js +106 -0
- package/lib/cjs/utils/findComponent.js.map +1 -0
- package/lib/cjs/utils/fire.js +23 -0
- package/lib/cjs/utils/fire.js.map +1 -0
- package/lib/cjs/utils/focus-lock/focusBorders.js +72 -0
- package/lib/cjs/utils/focus-lock/focusBorders.js.map +1 -0
- package/lib/cjs/utils/focus-lock/getFocusableIn.js +26 -0
- package/lib/cjs/utils/focus-lock/getFocusableIn.js.map +1 -0
- package/lib/cjs/utils/focus-lock/isFocusInside.js +16 -0
- package/lib/cjs/utils/focus-lock/isFocusInside.js.map +1 -0
- package/lib/cjs/utils/focus-lock/isFocusable.js +51 -0
- package/lib/cjs/utils/focus-lock/isFocusable.js.map +1 -0
- package/lib/cjs/utils/focus-lock/setFocus.js +63 -0
- package/lib/cjs/utils/focus-lock/setFocus.js.map +1 -0
- package/lib/cjs/utils/getAccessibleName.js +56 -0
- package/lib/cjs/utils/getAccessibleName.js.map +1 -0
- package/lib/cjs/utils/getDisplayName.js +10 -0
- package/lib/cjs/utils/getDisplayName.js.map +1 -0
- package/lib/cjs/utils/getEventTarget.js +53 -0
- package/lib/cjs/utils/getEventTarget.js.map +1 -0
- package/lib/cjs/utils/getOriginChildren.js +18 -0
- package/lib/cjs/utils/getOriginChildren.js.map +1 -0
- package/lib/cjs/utils/getRandomInt.js +11 -0
- package/lib/cjs/utils/getRandomInt.js.map +1 -0
- package/lib/cjs/utils/getValue.js +16 -0
- package/lib/cjs/utils/getValue.js.map +1 -0
- package/lib/cjs/utils/hasLabels.js +47 -0
- package/lib/cjs/utils/hasLabels.js.map +1 -0
- package/lib/cjs/utils/hasParent.js +14 -0
- package/lib/cjs/utils/hasParent.js.map +1 -0
- package/lib/cjs/utils/if.js +16 -0
- package/lib/cjs/utils/if.js.map +1 -0
- package/lib/cjs/utils/ifChildren.js +17 -0
- package/lib/cjs/utils/ifChildren.js.map +1 -0
- package/lib/cjs/utils/injectStyle.js +49 -0
- package/lib/cjs/utils/injectStyle.js.map +1 -0
- package/lib/cjs/utils/inputProps.js +22 -0
- package/lib/cjs/utils/inputProps.js.map +1 -0
- package/lib/cjs/utils/isNode.js +28 -0
- package/lib/cjs/utils/isNode.js.map +1 -0
- package/lib/cjs/utils/isPromise.js +10 -0
- package/lib/cjs/utils/isPromise.js.map +1 -0
- package/lib/cjs/utils/isRetina.js +15 -0
- package/lib/cjs/utils/isRetina.js.map +1 -0
- package/lib/cjs/utils/logger.js +40 -0
- package/lib/cjs/utils/logger.js.map +1 -0
- package/lib/cjs/utils/numericChecker.js +33 -0
- package/lib/cjs/utils/numericChecker.js.map +1 -0
- package/lib/cjs/utils/ownerDocument.js +10 -0
- package/lib/cjs/utils/ownerDocument.js.map +1 -0
- package/lib/cjs/utils/pick.js +19 -0
- package/lib/cjs/utils/pick.js.map +1 -0
- package/lib/cjs/utils/propsForElement.js +59 -0
- package/lib/cjs/utils/propsForElement.js.map +1 -0
- package/lib/cjs/utils/rafTrottle.js +33 -0
- package/lib/cjs/utils/rafTrottle.js.map +1 -0
- package/lib/cjs/utils/reactToText.js +33 -0
- package/lib/cjs/utils/reactToText.js.map +1 -0
- package/lib/cjs/utils/ref.js +95 -0
- package/lib/cjs/utils/ref.js.map +1 -0
- package/lib/cjs/utils/setRef.js +10 -0
- package/lib/cjs/utils/setRef.js.map +1 -0
- package/lib/cjs/utils/syncScroll.js +61 -0
- package/lib/cjs/utils/syncScroll.js.map +1 -0
- package/lib/cjs/utils/uncontroll.js +47 -0
- package/lib/cjs/utils/uncontroll.js.map +1 -0
- package/lib/cjs/utils/uniqueID.js +42 -0
- package/lib/cjs/utils/uniqueID.js.map +1 -0
- package/lib/cjs/utils/use/useColorResolver.js +208 -0
- package/lib/cjs/utils/use/useColorResolver.js.map +1 -0
- package/lib/cjs/utils/use/useCss.js +20 -0
- package/lib/cjs/utils/use/useCss.js.map +1 -0
- package/lib/cjs/utils/use/useEnhancedEffect.js +13 -0
- package/lib/cjs/utils/use/useEnhancedEffect.js.map +1 -0
- package/lib/cjs/utils/use/useEventCallback.js +25 -0
- package/lib/cjs/utils/use/useEventCallback.js.map +1 -0
- package/lib/cjs/utils/use/useEventListener.js +33 -0
- package/lib/cjs/utils/use/useEventListener.js.map +1 -0
- package/lib/cjs/utils/use/useFocusLock.js +289 -0
- package/lib/cjs/utils/use/useFocusLock.js.map +1 -0
- package/lib/cjs/utils/use/usePreventScroll.js +78 -0
- package/lib/cjs/utils/use/usePreventScroll.js.map +1 -0
- package/lib/cjs/utils/useCssVariable.js +55 -0
- package/lib/cjs/utils/useCssVariable.js.map +1 -0
- package/lib/cjs/utils/zIndexStacking.js +48 -0
- package/lib/cjs/utils/zIndexStacking.js.map +1 -0
- package/lib/core-types/Component.js +59 -0
- package/lib/core-types/Component.js.map +1 -0
- package/lib/core-types/Component.mjs +54 -0
- package/lib/core-types/Component.mjs.map +1 -0
- package/lib/core-types/UnknownProperties.d.ts +3 -0
- package/lib/core-types/UnknownProperties.js +2 -0
- package/lib/core-types/UnknownProperties.js.map +1 -0
- package/lib/core-types/UnknownProperties.mjs +3 -0
- package/lib/core-types/UnknownProperties.mjs.map +1 -0
- package/lib/core-types/reshadow.d.js +2 -0
- package/lib/core-types/reshadow.d.js.map +1 -0
- package/lib/core-types/reshadow.d.mjs +2 -0
- package/lib/core-types/reshadow.d.mjs.map +1 -0
- package/lib/core-types/symbols.d.ts +9 -0
- package/lib/core-types/symbols.js +25 -0
- package/lib/core-types/symbols.js.map +1 -0
- package/lib/core-types/symbols.mjs +10 -0
- package/lib/core-types/symbols.mjs.map +1 -0
- package/lib/enhancement/Children.js +119 -0
- package/lib/enhancement/Children.js.map +1 -0
- package/lib/enhancement/Children.mjs +111 -0
- package/lib/enhancement/Children.mjs.map +1 -0
- package/lib/enhancement/Root.js +78 -0
- package/lib/enhancement/Root.js.map +1 -0
- package/lib/enhancement/Root.mjs +70 -0
- package/lib/enhancement/Root.mjs.map +1 -0
- package/lib/enhancement/bindHandler.js +54 -0
- package/lib/enhancement/bindHandler.js.map +1 -0
- package/lib/enhancement/bindHandler.mjs +47 -0
- package/lib/enhancement/bindHandler.mjs.map +1 -0
- package/lib/enhancement/dataName.js +20 -0
- package/lib/enhancement/dataName.js.map +1 -0
- package/lib/enhancement/dataName.mjs +12 -0
- package/lib/enhancement/dataName.mjs.map +1 -0
- package/lib/enhancement/enhance.js +22 -0
- package/lib/enhancement/enhance.js.map +1 -0
- package/lib/enhancement/enhance.mjs +15 -0
- package/lib/enhancement/enhance.mjs.map +1 -0
- package/lib/enhancement/functionDefaultProps.js +36 -0
- package/lib/enhancement/functionDefaultProps.js.map +1 -0
- package/lib/enhancement/functionDefaultProps.mjs +29 -0
- package/lib/enhancement/functionDefaultProps.mjs.map +1 -0
- package/lib/enhancement/hoistProps.js +97 -0
- package/lib/enhancement/hoistProps.js.map +1 -0
- package/lib/enhancement/hoistProps.mjs +88 -0
- package/lib/enhancement/hoistProps.mjs.map +1 -0
- package/lib/enhancement/i18n.js +28 -0
- package/lib/enhancement/i18n.js.map +1 -0
- package/lib/enhancement/i18n.mjs +20 -0
- package/lib/enhancement/i18n.mjs.map +1 -0
- package/lib/enhancement/inheritedName.js +23 -0
- package/lib/enhancement/inheritedName.js.map +1 -0
- package/lib/enhancement/inheritedName.mjs +15 -0
- package/lib/enhancement/inheritedName.mjs.map +1 -0
- package/lib/enhancement/staticChildren.js +135 -0
- package/lib/enhancement/staticChildren.js.map +1 -0
- package/lib/enhancement/staticChildren.mjs +123 -0
- package/lib/enhancement/staticChildren.mjs.map +1 -0
- package/lib/enhancement/style.js +60 -0
- package/lib/enhancement/style.js.map +1 -0
- package/lib/enhancement/style.mjs +51 -0
- package/lib/enhancement/style.mjs.map +1 -0
- package/lib/enhancement/uncontrolledProps.js +131 -0
- package/lib/enhancement/uncontrolledProps.js.map +1 -0
- package/lib/enhancement/uncontrolledProps.mjs +123 -0
- package/lib/enhancement/uncontrolledProps.mjs.map +1 -0
- package/lib/es6/LastInteractionType.js +49 -0
- package/lib/es6/LastInteractionType.js.map +1 -0
- package/lib/es6/core-types/Component.js +54 -0
- package/lib/es6/core-types/Component.js.map +1 -0
- package/lib/es6/core-types/UnknownProperties.js +2 -0
- package/lib/es6/core-types/UnknownProperties.js.map +1 -0
- package/lib/es6/core-types/reshadow.d.js +2 -0
- package/lib/es6/core-types/reshadow.d.js.map +1 -0
- package/lib/es6/core-types/symbols.js +10 -0
- package/lib/es6/core-types/symbols.js.map +1 -0
- package/lib/es6/coreFactory.js +343 -0
- package/lib/es6/coreFactory.js.map +1 -0
- package/lib/es6/enhancement/Children.js +111 -0
- package/lib/es6/enhancement/Children.js.map +1 -0
- package/lib/es6/enhancement/Root.js +70 -0
- package/lib/es6/enhancement/Root.js.map +1 -0
- package/lib/es6/enhancement/bindHandler.js +47 -0
- package/lib/es6/enhancement/bindHandler.js.map +1 -0
- package/lib/es6/enhancement/dataName.js +12 -0
- package/lib/es6/enhancement/dataName.js.map +1 -0
- package/lib/es6/enhancement/enhance.js +15 -0
- package/lib/es6/enhancement/enhance.js.map +1 -0
- package/lib/es6/enhancement/functionDefaultProps.js +29 -0
- package/lib/es6/enhancement/functionDefaultProps.js.map +1 -0
- package/lib/es6/enhancement/hoistProps.js +88 -0
- package/lib/es6/enhancement/hoistProps.js.map +1 -0
- package/lib/es6/enhancement/i18n.js +20 -0
- package/lib/es6/enhancement/i18n.js.map +1 -0
- package/lib/es6/enhancement/inheritedName.js +15 -0
- package/lib/es6/enhancement/inheritedName.js.map +1 -0
- package/lib/es6/enhancement/staticChildren.js +123 -0
- package/lib/es6/enhancement/staticChildren.js.map +1 -0
- package/lib/es6/enhancement/style.js +51 -0
- package/lib/es6/enhancement/style.js.map +1 -0
- package/lib/es6/enhancement/uncontrolledProps.js +123 -0
- package/lib/es6/enhancement/uncontrolledProps.js.map +1 -0
- package/lib/es6/index.js +8 -3
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/register.js +29 -0
- package/lib/es6/register.js.map +1 -0
- package/lib/es6/styled/index.js +6 -0
- package/lib/es6/styled/index.js.map +1 -0
- package/lib/es6/styled/reshadow-core.js +243 -0
- package/lib/es6/styled/reshadow-core.js.map +1 -0
- package/lib/es6/styled/sstyled.js +142 -0
- package/lib/es6/styled/sstyled.js.map +1 -0
- package/lib/es6/theme/dark.json +2506 -0
- package/lib/es6/theme/exclude-tokens.json +10 -0
- package/lib/es6/theme/light.json +2584 -0
- package/lib/es6/theme/processor.js +307 -0
- package/lib/es6/theme/processor.js.map +1 -0
- package/lib/es6/theme/themes/auto.css +1465 -0
- package/lib/es6/theme/themes/dark.css +723 -0
- package/lib/es6/theme/themes/dark.js +378 -0
- package/lib/es6/theme/themes/dark.js.map +1 -0
- package/lib/es6/theme/themes/default.css +742 -0
- package/lib/es6/theme/themes/default.js +387 -0
- package/lib/es6/theme/themes/default.js.map +1 -0
- package/lib/es6/theme/themes/light.css +742 -0
- package/lib/es6/theme/themes/light.js +387 -0
- package/lib/es6/theme/themes/light.js.map +1 -0
- package/lib/es6/theme/utils.js +286 -0
- package/lib/es6/theme/utils.js.map +1 -0
- package/lib/es6/utils/CSSinJS.js +28 -0
- package/lib/es6/utils/CSSinJS.js.map +1 -0
- package/lib/es6/utils/ScreenReaderOnly.js +24 -0
- package/lib/es6/utils/ScreenReaderOnly.js.map +1 -0
- package/lib/es6/utils/ThemeProvider.js +71 -0
- package/lib/es6/utils/ThemeProvider.js.map +1 -0
- package/lib/es6/utils/addonText.js +11 -0
- package/lib/es6/utils/addonText.js.map +1 -0
- package/lib/es6/utils/addonTextChildren.js +37 -0
- package/lib/es6/utils/addonTextChildren.js.map +1 -0
- package/lib/es6/utils/ariaProps.js +16 -0
- package/lib/es6/utils/ariaProps.js.map +1 -0
- package/lib/es6/utils/assignProps.js +84 -0
- package/lib/es6/utils/assignProps.js.map +1 -0
- package/lib/es6/utils/canUseDOM.js +4 -0
- package/lib/es6/utils/canUseDOM.js.map +1 -0
- package/lib/es6/utils/capitalizeFirstLetter.js +4 -0
- package/lib/es6/utils/capitalizeFirstLetter.js.map +1 -0
- package/lib/es6/utils/color.js +196 -0
- package/lib/es6/utils/color.js.map +1 -0
- package/lib/es6/utils/compose.js +15 -0
- package/lib/es6/utils/compose.js.map +1 -0
- package/lib/es6/utils/createHoc.js +46 -0
- package/lib/es6/utils/createHoc.js.map +1 -0
- package/lib/es6/utils/createUUID.js +9 -0
- package/lib/es6/utils/createUUID.js.map +1 -0
- package/lib/es6/utils/cssToIntDefault.js +16 -0
- package/lib/es6/utils/cssToIntDefault.js.map +1 -0
- package/lib/es6/utils/enhances/WithAutoFocus.js +67 -0
- package/lib/es6/utils/enhances/WithAutoFocus.js.map +1 -0
- package/lib/es6/utils/enhances/WithCSS.js +79 -0
- package/lib/es6/utils/enhances/WithCSS.js.map +1 -0
- package/lib/es6/utils/enhances/WithI18n.js +83 -0
- package/lib/es6/utils/enhances/WithI18n.js.map +1 -0
- package/lib/es6/utils/enhances/WithKeyboardFocus.js +84 -0
- package/lib/es6/utils/enhances/WithKeyboardFocus.js.map +1 -0
- package/lib/es6/utils/enhances/WithRef.js +18 -0
- package/lib/es6/utils/enhances/WithRef.js.map +1 -0
- package/lib/es6/utils/enhances/a11yEnhance.js +66 -0
- package/lib/es6/utils/enhances/a11yEnhance.js.map +1 -0
- package/lib/es6/utils/enhances/animatedSizeEnhance.js +90 -0
- package/lib/es6/utils/enhances/animatedSizeEnhance.js.map +1 -0
- package/lib/es6/utils/enhances/autoFocusEnhance.js +38 -0
- package/lib/es6/utils/enhances/autoFocusEnhance.js.map +1 -0
- package/lib/es6/utils/enhances/contextEnhance.js +14 -0
- package/lib/es6/utils/enhances/contextEnhance.js.map +1 -0
- package/lib/es6/utils/enhances/i18nEnhance.js +92 -0
- package/lib/es6/utils/enhances/i18nEnhance.js.map +1 -0
- package/lib/es6/utils/enhances/keyboardFocusEnhance.js +57 -0
- package/lib/es6/utils/enhances/keyboardFocusEnhance.js.map +1 -0
- package/lib/es6/utils/enhances/resolveColorEnhance.js +17 -0
- package/lib/es6/utils/enhances/resolveColorEnhance.js.map +1 -0
- package/lib/es6/utils/eventEmitter.js +34 -0
- package/lib/es6/utils/eventEmitter.js.map +1 -0
- package/lib/es6/utils/findComponent.js +95 -0
- package/lib/es6/utils/findComponent.js.map +1 -0
- package/lib/es6/utils/fire.js +15 -0
- package/lib/es6/utils/fire.js.map +1 -0
- package/lib/es6/utils/focus-lock/focusBorders.js +62 -0
- package/lib/es6/utils/focus-lock/focusBorders.js.map +1 -0
- package/lib/es6/utils/focus-lock/getFocusableIn.js +19 -0
- package/lib/es6/utils/focus-lock/getFocusableIn.js.map +1 -0
- package/lib/es6/utils/focus-lock/isFocusInside.js +9 -0
- package/lib/es6/utils/focus-lock/isFocusInside.js.map +1 -0
- package/lib/es6/utils/focus-lock/isFocusable.js +43 -0
- package/lib/es6/utils/focus-lock/isFocusable.js.map +1 -0
- package/lib/es6/utils/focus-lock/setFocus.js +55 -0
- package/lib/es6/utils/focus-lock/setFocus.js.map +1 -0
- package/lib/es6/utils/getAccessibleName.js +49 -0
- package/lib/es6/utils/getAccessibleName.js.map +1 -0
- package/lib/es6/utils/getDisplayName.js +4 -0
- package/lib/es6/utils/getDisplayName.js.map +1 -0
- package/lib/es6/utils/getEventTarget.js +45 -0
- package/lib/es6/utils/getEventTarget.js.map +1 -0
- package/lib/es6/utils/getOriginChildren.js +10 -0
- package/lib/es6/utils/getOriginChildren.js.map +1 -0
- package/lib/es6/utils/getRandomInt.js +5 -0
- package/lib/es6/utils/getRandomInt.js.map +1 -0
- package/lib/es6/utils/getValue.js +10 -0
- package/lib/es6/utils/getValue.js.map +1 -0
- package/lib/es6/utils/hasLabels.js +39 -0
- package/lib/es6/utils/hasLabels.js.map +1 -0
- package/lib/es6/utils/hasParent.js +7 -0
- package/lib/es6/utils/hasParent.js.map +1 -0
- package/lib/es6/utils/if.js +9 -0
- package/lib/es6/utils/if.js.map +1 -0
- package/lib/es6/utils/ifChildren.js +10 -0
- package/lib/es6/utils/ifChildren.js.map +1 -0
- package/lib/es6/utils/injectStyle.js +41 -0
- package/lib/es6/utils/injectStyle.js.map +1 -0
- package/lib/es6/utils/inputProps.js +14 -0
- package/lib/es6/utils/inputProps.js.map +1 -0
- package/lib/es6/utils/isNode.js +21 -0
- package/lib/es6/utils/isNode.js.map +1 -0
- package/lib/es6/utils/isPromise.js +4 -0
- package/lib/es6/utils/isPromise.js.map +1 -0
- package/lib/es6/utils/isRetina.js +9 -0
- package/lib/es6/utils/isRetina.js.map +1 -0
- package/lib/es6/utils/logger.js +32 -0
- package/lib/es6/utils/logger.js.map +1 -0
- package/lib/es6/utils/numericChecker.js +27 -0
- package/lib/es6/utils/numericChecker.js.map +1 -0
- package/lib/es6/utils/ownerDocument.js +4 -0
- package/lib/es6/utils/ownerDocument.js.map +1 -0
- package/lib/es6/utils/pick.js +13 -0
- package/lib/es6/utils/pick.js.map +1 -0
- package/lib/es6/utils/propsForElement.js +50 -0
- package/lib/es6/utils/propsForElement.js.map +1 -0
- package/lib/es6/utils/rafTrottle.js +26 -0
- package/lib/es6/utils/rafTrottle.js.map +1 -0
- package/lib/es6/utils/reactToText.js +26 -0
- package/lib/es6/utils/reactToText.js.map +1 -0
- package/lib/es6/utils/ref.js +83 -0
- package/lib/es6/utils/ref.js.map +1 -0
- package/lib/es6/utils/setRef.js +3 -0
- package/lib/es6/utils/setRef.js.map +1 -0
- package/lib/es6/utils/syncScroll.js +54 -0
- package/lib/es6/utils/syncScroll.js.map +1 -0
- package/lib/es6/utils/uncontroll.js +38 -0
- package/lib/es6/utils/uncontroll.js.map +1 -0
- package/lib/es6/utils/uniqueID.js +33 -0
- package/lib/es6/utils/uniqueID.js.map +1 -0
- package/lib/es6/utils/use/useColorResolver.js +200 -0
- package/lib/es6/utils/use/useColorResolver.js.map +1 -0
- package/lib/es6/utils/use/useCss.js +12 -0
- package/lib/es6/utils/use/useCss.js.map +1 -0
- package/lib/es6/utils/use/useEnhancedEffect.js +5 -0
- package/lib/es6/utils/use/useEnhancedEffect.js.map +1 -0
- package/lib/es6/utils/use/useEventCallback.js +19 -0
- package/lib/es6/utils/use/useEventCallback.js.map +1 -0
- package/lib/es6/utils/use/useEventListener.js +25 -0
- package/lib/es6/utils/use/useEventListener.js.map +1 -0
- package/lib/es6/utils/use/useFocusLock.js +266 -0
- package/lib/es6/utils/use/useFocusLock.js.map +1 -0
- package/lib/es6/utils/use/usePreventScroll.js +70 -0
- package/lib/es6/utils/use/usePreventScroll.js.map +1 -0
- package/lib/es6/utils/useCssVariable.js +46 -0
- package/lib/es6/utils/useCssVariable.js.map +1 -0
- package/lib/es6/utils/zIndexStacking.js +38 -0
- package/lib/es6/utils/zIndexStacking.js.map +1 -0
- package/lib/esm/_virtual/_commonjsHelpers.mjs +6 -0
- package/lib/esm/_virtual/index.mjs +4 -0
- package/lib/esm/_virtual/index2.mjs +4 -0
- package/lib/esm/_virtual/react-is.development.mjs +4 -0
- package/lib/esm/_virtual/react-is.production.min.mjs +4 -0
- package/lib/register.d.ts +8 -0
- package/lib/register.js +37 -0
- package/lib/register.js.map +1 -0
- package/lib/register.mjs +29 -0
- package/lib/register.mjs.map +1 -0
- package/lib/styled/index.d.ts +11 -0
- package/lib/styled/index.js +32 -0
- package/lib/styled/index.js.map +1 -0
- package/lib/styled/index.mjs +6 -0
- package/lib/styled/index.mjs.map +1 -0
- package/lib/styled/reshadow-core.d.ts +37 -0
- package/lib/styled/reshadow-core.js +256 -0
- package/lib/styled/reshadow-core.js.map +1 -0
- package/lib/styled/reshadow-core.mjs +243 -0
- package/lib/styled/reshadow-core.mjs.map +1 -0
- package/lib/styled/sstyled.d.ts +17 -0
- package/lib/styled/sstyled.js +149 -0
- package/lib/styled/sstyled.js.map +1 -0
- package/lib/styled/sstyled.mjs +142 -0
- package/lib/styled/sstyled.mjs.map +1 -0
- package/lib/theme/dark.json +2506 -0
- package/lib/theme/exclude-tokens.json +10 -0
- package/lib/theme/light.json +2584 -0
- package/lib/theme/processor.js +315 -0
- package/lib/theme/processor.js.map +1 -0
- package/lib/theme/processor.mjs +307 -0
- package/lib/theme/processor.mjs.map +1 -0
- package/lib/theme/themes/auto.css +1465 -0
- package/lib/theme/themes/dark.css +723 -0
- package/lib/theme/themes/dark.js +385 -0
- package/lib/theme/themes/dark.js.map +1 -0
- package/lib/theme/themes/dark.mjs +378 -0
- package/lib/theme/themes/dark.mjs.map +1 -0
- package/lib/theme/themes/default.css +742 -0
- package/lib/theme/themes/default.d.ts +387 -0
- package/lib/theme/themes/default.js +394 -0
- package/lib/theme/themes/default.js.map +1 -0
- package/lib/theme/themes/default.mjs +387 -0
- package/lib/theme/themes/default.mjs.map +1 -0
- package/lib/theme/themes/light.css +742 -0
- package/lib/theme/themes/light.js +394 -0
- package/lib/theme/themes/light.js.map +1 -0
- package/lib/theme/themes/light.mjs +387 -0
- package/lib/theme/themes/light.mjs.map +1 -0
- package/lib/theme/utils.js +297 -0
- package/lib/theme/utils.js.map +1 -0
- package/lib/theme/utils.mjs +286 -0
- package/lib/theme/utils.mjs.map +1 -0
- package/lib/types/LastInteractionType.d.ts +11 -0
- package/lib/types/core-types/Component.d.ts +189 -0
- package/lib/types/core-types/UnknownProperties.d.ts +3 -0
- package/lib/types/core-types/symbols.d.ts +9 -0
- package/lib/types/coreFactory.d.ts +27 -0
- package/lib/types/enhancement/Children.d.ts +5 -0
- package/lib/types/enhancement/Root.d.ts +6 -0
- package/lib/types/enhancement/bindHandler.d.ts +5 -0
- package/lib/types/enhancement/dataName.d.ts +4 -0
- package/lib/types/enhancement/enhance.d.ts +5 -0
- package/lib/types/enhancement/functionDefaultProps.d.ts +8 -0
- package/lib/types/enhancement/hoistProps.d.ts +10 -0
- package/lib/types/enhancement/i18n.d.ts +4 -0
- package/lib/types/enhancement/inheritedName.d.ts +8 -0
- package/lib/types/enhancement/staticChildren.d.ts +13 -0
- package/lib/types/enhancement/style.d.ts +9 -0
- package/lib/types/enhancement/uncontrolledProps.d.ts +7 -0
- package/lib/types/index.d.ts +11 -3
- package/lib/types/register.d.ts +8 -0
- package/lib/types/styled/index.d.ts +11 -0
- package/lib/types/styled/reshadow-core.d.ts +37 -0
- package/lib/types/styled/sstyled.d.ts +17 -0
- package/lib/types/theme/processor.d.ts +1 -0
- package/lib/types/theme/themes/dark.d.ts +378 -0
- package/lib/types/theme/themes/default.d.ts +387 -0
- package/lib/types/theme/themes/light.d.ts +387 -0
- package/lib/types/theme/utils.d.ts +52 -0
- package/lib/types/utils/CSSinJS.d.ts +5 -0
- package/lib/types/utils/ScreenReaderOnly.d.ts +8 -0
- package/lib/types/utils/ThemeProvider.d.ts +15 -0
- package/lib/types/utils/addonText.d.ts +2 -0
- package/lib/types/utils/addonTextChildren.d.ts +3 -0
- package/lib/types/utils/ariaProps.d.ts +12 -0
- package/lib/types/utils/assignProps.d.ts +11 -0
- package/lib/types/utils/canUseDOM.d.ts +1 -0
- package/lib/types/utils/capitalizeFirstLetter.d.ts +1 -0
- package/lib/types/utils/color.d.ts +5 -0
- package/lib/types/utils/compose.d.ts +1 -0
- package/lib/types/utils/createHoc.d.ts +3 -0
- package/lib/types/utils/createUUID.d.ts +1 -0
- package/lib/types/utils/cssToIntDefault.d.ts +8 -0
- package/lib/types/utils/enhances/WithAutoFocus.d.ts +14 -0
- package/lib/types/utils/enhances/WithCSS.d.ts +41 -0
- package/lib/types/utils/enhances/WithI18n.d.ts +43 -0
- package/lib/types/utils/enhances/WithKeyboardFocus.d.ts +45 -0
- package/lib/types/utils/enhances/WithRef.d.ts +3 -0
- package/lib/types/utils/enhances/a11yEnhance.d.ts +10 -0
- package/lib/types/utils/enhances/animatedSizeEnhance.d.ts +12 -0
- package/lib/types/utils/enhances/autoFocusEnhance.d.ts +10 -0
- package/lib/types/utils/enhances/contextEnhance.d.ts +3 -0
- package/lib/types/utils/enhances/i18nEnhance.d.ts +25 -0
- package/lib/types/utils/enhances/keyboardFocusEnhance.d.ts +27 -0
- package/lib/types/utils/enhances/resolveColorEnhance.d.ts +2 -0
- package/lib/types/utils/eventEmitter.d.ts +9 -0
- package/lib/types/utils/findComponent.d.ts +12 -0
- package/lib/types/utils/fire.d.ts +2 -0
- package/lib/types/utils/focus-lock/focusBorders.d.ts +4 -0
- package/lib/types/utils/focus-lock/getFocusableIn.d.ts +1 -0
- package/lib/types/utils/focus-lock/isFocusInside.d.ts +1 -0
- package/lib/types/utils/focus-lock/isFocusable.d.ts +1 -0
- package/lib/types/utils/focus-lock/setFocus.d.ts +1 -0
- package/lib/types/utils/getAccessibleName.d.ts +1 -0
- package/lib/types/utils/getDisplayName.d.ts +2 -0
- package/lib/types/utils/getEventTarget.d.ts +1 -0
- package/lib/types/utils/getOriginChildren.d.ts +2 -0
- package/lib/types/utils/getRandomInt.d.ts +1 -0
- package/lib/types/utils/getValue.d.ts +1 -0
- package/lib/types/utils/hasLabels.d.ts +7 -0
- package/lib/types/utils/hasParent.d.ts +1 -0
- package/lib/types/utils/if.d.ts +11 -0
- package/lib/types/utils/ifChildren.d.ts +8 -0
- package/lib/types/utils/injectStyle.d.ts +2 -0
- package/lib/types/utils/inputProps.d.ts +2 -0
- package/lib/types/utils/isNode.d.ts +1 -0
- package/lib/types/utils/isPromise.d.ts +1 -0
- package/lib/types/utils/isRetina.d.ts +1 -0
- package/lib/types/utils/logger.d.ts +9 -0
- package/lib/types/utils/numericChecker.d.ts +5 -0
- package/lib/types/utils/ownerDocument.d.ts +1 -0
- package/lib/types/utils/pick.d.ts +1 -0
- package/lib/types/utils/propsForElement.d.ts +3 -0
- package/lib/types/utils/rafTrottle.d.ts +2 -0
- package/lib/types/utils/reactToText.d.ts +3 -0
- package/lib/types/utils/ref.d.ts +8 -0
- package/lib/types/utils/setRef.d.ts +2 -0
- package/lib/types/utils/syncScroll.d.ts +1 -0
- package/lib/types/utils/uncontroll.d.ts +4 -0
- package/lib/types/utils/uniqueID.d.ts +12 -0
- package/lib/types/utils/use/useColorResolver.d.ts +1 -0
- package/lib/types/utils/use/useCss.d.ts +4 -0
- package/lib/types/utils/use/useEnhancedEffect.d.ts +3 -0
- package/lib/types/utils/use/useEventCallback.d.ts +4 -0
- package/lib/types/utils/use/useEventListener.d.ts +2 -0
- package/lib/types/utils/use/useFocusLock.d.ts +10 -0
- package/lib/types/utils/use/usePreventScroll.d.ts +2 -0
- package/lib/types/utils/useCssVariable.d.ts +8 -0
- package/lib/types/utils/zIndexStacking.d.ts +8 -0
- package/lib/utils/CSSinJS.d.ts +5 -0
- package/lib/utils/CSSinJS.js +36 -0
- package/lib/utils/CSSinJS.js.map +1 -0
- package/lib/utils/CSSinJS.mjs +28 -0
- package/lib/utils/CSSinJS.mjs.map +1 -0
- package/lib/utils/ScreenReaderOnly.d.ts +8 -0
- package/lib/utils/ScreenReaderOnly.js +31 -0
- package/lib/utils/ScreenReaderOnly.js.map +1 -0
- package/lib/utils/ScreenReaderOnly.mjs +24 -0
- package/lib/utils/ScreenReaderOnly.mjs.map +1 -0
- package/lib/utils/ThemeProvider.d.ts +15 -0
- package/lib/utils/ThemeProvider.js +82 -0
- package/lib/utils/ThemeProvider.js.map +1 -0
- package/lib/utils/ThemeProvider.mjs +71 -0
- package/lib/utils/ThemeProvider.mjs.map +1 -0
- package/lib/utils/addonText.d.ts +2 -0
- package/lib/utils/addonText.js +18 -0
- package/lib/utils/addonText.js.map +1 -0
- package/lib/utils/addonText.mjs +11 -0
- package/lib/utils/addonText.mjs.map +1 -0
- package/lib/utils/addonTextChildren.d.ts +3 -0
- package/lib/utils/addonTextChildren.js +45 -0
- package/lib/utils/addonTextChildren.js.map +1 -0
- package/lib/utils/addonTextChildren.mjs +37 -0
- package/lib/utils/addonTextChildren.mjs.map +1 -0
- package/lib/utils/ariaProps.d.ts +12 -0
- package/lib/utils/ariaProps.js +22 -0
- package/lib/utils/ariaProps.js.map +1 -0
- package/lib/utils/ariaProps.mjs +16 -0
- package/lib/utils/ariaProps.mjs.map +1 -0
- package/lib/utils/assignProps.d.ts +11 -0
- package/lib/utils/assignProps.js +93 -0
- package/lib/utils/assignProps.js.map +1 -0
- package/lib/utils/assignProps.mjs +84 -0
- package/lib/utils/assignProps.mjs.map +1 -0
- package/lib/utils/canUseDOM.d.ts +1 -0
- package/lib/utils/canUseDOM.js +10 -0
- package/lib/utils/canUseDOM.js.map +1 -0
- package/lib/utils/canUseDOM.mjs +4 -0
- package/lib/utils/canUseDOM.mjs.map +1 -0
- package/lib/utils/capitalizeFirstLetter.d.ts +1 -0
- package/lib/utils/capitalizeFirstLetter.js +10 -0
- package/lib/utils/capitalizeFirstLetter.js.map +1 -0
- package/lib/utils/capitalizeFirstLetter.mjs +4 -0
- package/lib/utils/capitalizeFirstLetter.mjs.map +1 -0
- package/lib/utils/color.d.ts +5 -0
- package/lib/utils/color.js +208 -0
- package/lib/utils/color.js.map +1 -0
- package/lib/utils/color.mjs +196 -0
- package/lib/utils/color.mjs.map +1 -0
- package/lib/utils/compose.d.ts +1 -0
- package/lib/utils/compose.js +21 -0
- package/lib/utils/compose.js.map +1 -0
- package/lib/utils/compose.mjs +15 -0
- package/lib/utils/compose.mjs.map +1 -0
- package/lib/utils/createHoc.d.ts +3 -0
- package/lib/utils/createHoc.js +55 -0
- package/lib/utils/createHoc.js.map +1 -0
- package/lib/utils/createHoc.mjs +46 -0
- package/lib/utils/createHoc.mjs.map +1 -0
- package/lib/utils/createUUID.d.ts +1 -0
- package/lib/utils/createUUID.js +15 -0
- package/lib/utils/createUUID.js.map +1 -0
- package/lib/utils/createUUID.mjs +9 -0
- package/lib/utils/createUUID.mjs.map +1 -0
- package/lib/utils/cssToIntDefault.d.ts +8 -0
- package/lib/utils/cssToIntDefault.js +22 -0
- package/lib/utils/cssToIntDefault.js.map +1 -0
- package/lib/utils/cssToIntDefault.mjs +16 -0
- package/lib/utils/cssToIntDefault.mjs.map +1 -0
- package/lib/utils/enhances/WithAutoFocus.d.ts +14 -0
- package/lib/utils/enhances/WithAutoFocus.js +75 -0
- package/lib/utils/enhances/WithAutoFocus.js.map +1 -0
- package/lib/utils/enhances/WithAutoFocus.mjs +67 -0
- package/lib/utils/enhances/WithAutoFocus.mjs.map +1 -0
- package/lib/utils/enhances/WithCSS.d.ts +41 -0
- package/lib/utils/enhances/WithCSS.js +93 -0
- package/lib/utils/enhances/WithCSS.js.map +1 -0
- package/lib/utils/enhances/WithCSS.mjs +79 -0
- package/lib/utils/enhances/WithCSS.mjs.map +1 -0
- package/lib/utils/enhances/WithI18n.d.ts +43 -0
- package/lib/utils/enhances/WithI18n.js +95 -0
- package/lib/utils/enhances/WithI18n.js.map +1 -0
- package/lib/utils/enhances/WithI18n.mjs +83 -0
- package/lib/utils/enhances/WithI18n.mjs.map +1 -0
- package/lib/utils/enhances/WithKeyboardFocus.d.ts +45 -0
- package/lib/utils/enhances/WithKeyboardFocus.js +93 -0
- package/lib/utils/enhances/WithKeyboardFocus.js.map +1 -0
- package/lib/utils/enhances/WithKeyboardFocus.mjs +84 -0
- package/lib/utils/enhances/WithKeyboardFocus.mjs.map +1 -0
- package/lib/utils/enhances/WithRef.d.ts +3 -0
- package/lib/utils/enhances/WithRef.js +26 -0
- package/lib/utils/enhances/WithRef.js.map +1 -0
- package/lib/utils/enhances/WithRef.mjs +18 -0
- package/lib/utils/enhances/WithRef.mjs.map +1 -0
- package/lib/utils/enhances/a11yEnhance.d.ts +10 -0
- package/lib/utils/enhances/a11yEnhance.js +74 -0
- package/lib/utils/enhances/a11yEnhance.js.map +1 -0
- package/lib/utils/enhances/a11yEnhance.mjs +66 -0
- package/lib/utils/enhances/a11yEnhance.mjs.map +1 -0
- package/lib/utils/enhances/animatedSizeEnhance.d.ts +12 -0
- package/lib/utils/enhances/animatedSizeEnhance.js +98 -0
- package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -0
- package/lib/utils/enhances/animatedSizeEnhance.mjs +90 -0
- package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -0
- package/lib/utils/enhances/autoFocusEnhance.d.ts +10 -0
- package/lib/utils/enhances/autoFocusEnhance.js +46 -0
- package/lib/utils/enhances/autoFocusEnhance.js.map +1 -0
- package/lib/utils/enhances/autoFocusEnhance.mjs +38 -0
- package/lib/utils/enhances/autoFocusEnhance.mjs.map +1 -0
- package/lib/utils/enhances/contextEnhance.d.ts +3 -0
- package/lib/utils/enhances/contextEnhance.js +22 -0
- package/lib/utils/enhances/contextEnhance.js.map +1 -0
- package/lib/utils/enhances/contextEnhance.mjs +14 -0
- package/lib/utils/enhances/contextEnhance.mjs.map +1 -0
- package/lib/utils/enhances/i18nEnhance.d.ts +25 -0
- package/lib/utils/enhances/i18nEnhance.js +101 -0
- package/lib/utils/enhances/i18nEnhance.js.map +1 -0
- package/lib/utils/enhances/i18nEnhance.mjs +92 -0
- package/lib/utils/enhances/i18nEnhance.mjs.map +1 -0
- package/lib/utils/enhances/keyboardFocusEnhance.d.ts +27 -0
- package/lib/utils/enhances/keyboardFocusEnhance.js +63 -0
- package/lib/utils/enhances/keyboardFocusEnhance.js.map +1 -0
- package/lib/utils/enhances/keyboardFocusEnhance.mjs +57 -0
- package/lib/utils/enhances/keyboardFocusEnhance.mjs.map +1 -0
- package/lib/utils/enhances/resolveColorEnhance.d.ts +2 -0
- package/lib/utils/enhances/resolveColorEnhance.js +25 -0
- package/lib/utils/enhances/resolveColorEnhance.js.map +1 -0
- package/lib/utils/enhances/resolveColorEnhance.mjs +17 -0
- package/lib/utils/enhances/resolveColorEnhance.mjs.map +1 -0
- package/lib/utils/eventEmitter.d.ts +9 -0
- package/lib/utils/eventEmitter.js +41 -0
- package/lib/utils/eventEmitter.js.map +1 -0
- package/lib/utils/eventEmitter.mjs +34 -0
- package/lib/utils/eventEmitter.mjs.map +1 -0
- package/lib/utils/findComponent.d.ts +12 -0
- package/lib/utils/findComponent.js +106 -0
- package/lib/utils/findComponent.js.map +1 -0
- package/lib/utils/findComponent.mjs +95 -0
- package/lib/utils/findComponent.mjs.map +1 -0
- package/lib/utils/fire.d.ts +2 -0
- package/lib/utils/fire.js +23 -0
- package/lib/utils/fire.js.map +1 -0
- package/lib/utils/fire.mjs +15 -0
- package/lib/utils/fire.mjs.map +1 -0
- package/lib/utils/focus-lock/focusBorders.d.ts +4 -0
- package/lib/utils/focus-lock/focusBorders.js +72 -0
- package/lib/utils/focus-lock/focusBorders.js.map +1 -0
- package/lib/utils/focus-lock/focusBorders.mjs +62 -0
- package/lib/utils/focus-lock/focusBorders.mjs.map +1 -0
- package/lib/utils/focus-lock/getFocusableIn.d.ts +1 -0
- package/lib/utils/focus-lock/getFocusableIn.js +26 -0
- package/lib/utils/focus-lock/getFocusableIn.js.map +1 -0
- package/lib/utils/focus-lock/getFocusableIn.mjs +19 -0
- package/lib/utils/focus-lock/getFocusableIn.mjs.map +1 -0
- package/lib/utils/focus-lock/isFocusInside.d.ts +1 -0
- package/lib/utils/focus-lock/isFocusInside.js +16 -0
- package/lib/utils/focus-lock/isFocusInside.js.map +1 -0
- package/lib/utils/focus-lock/isFocusInside.mjs +9 -0
- package/lib/utils/focus-lock/isFocusInside.mjs.map +1 -0
- package/lib/utils/focus-lock/isFocusable.d.ts +1 -0
- package/lib/utils/focus-lock/isFocusable.js +51 -0
- package/lib/utils/focus-lock/isFocusable.js.map +1 -0
- package/lib/utils/focus-lock/isFocusable.mjs +43 -0
- package/lib/utils/focus-lock/isFocusable.mjs.map +1 -0
- package/lib/utils/focus-lock/setFocus.d.ts +1 -0
- package/lib/utils/focus-lock/setFocus.js +63 -0
- package/lib/utils/focus-lock/setFocus.js.map +1 -0
- package/lib/utils/focus-lock/setFocus.mjs +55 -0
- package/lib/utils/focus-lock/setFocus.mjs.map +1 -0
- package/lib/utils/getAccessibleName.d.ts +1 -0
- package/lib/utils/getAccessibleName.js +56 -0
- package/lib/utils/getAccessibleName.js.map +1 -0
- package/lib/utils/getAccessibleName.mjs +49 -0
- package/lib/utils/getAccessibleName.mjs.map +1 -0
- package/lib/utils/getDisplayName.d.ts +2 -0
- package/lib/utils/getDisplayName.js +10 -0
- package/lib/utils/getDisplayName.js.map +1 -0
- package/lib/utils/getDisplayName.mjs +4 -0
- package/lib/utils/getDisplayName.mjs.map +1 -0
- package/lib/utils/getEventTarget.d.ts +1 -0
- package/lib/utils/getEventTarget.js +53 -0
- package/lib/utils/getEventTarget.js.map +1 -0
- package/lib/utils/getEventTarget.mjs +45 -0
- package/lib/utils/getEventTarget.mjs.map +1 -0
- package/lib/utils/getOriginChildren.d.ts +2 -0
- package/lib/utils/getOriginChildren.js +18 -0
- package/lib/utils/getOriginChildren.js.map +1 -0
- package/lib/utils/getOriginChildren.mjs +10 -0
- package/lib/utils/getOriginChildren.mjs.map +1 -0
- package/lib/utils/getRandomInt.d.ts +1 -0
- package/lib/utils/getRandomInt.js +11 -0
- package/lib/utils/getRandomInt.js.map +1 -0
- package/lib/utils/getRandomInt.mjs +5 -0
- package/lib/utils/getRandomInt.mjs.map +1 -0
- package/lib/utils/getValue.d.ts +1 -0
- package/lib/utils/getValue.js +16 -0
- package/lib/utils/getValue.js.map +1 -0
- package/lib/utils/getValue.mjs +10 -0
- package/lib/utils/getValue.mjs.map +1 -0
- package/lib/utils/hasLabels.d.ts +7 -0
- package/lib/utils/hasLabels.js +47 -0
- package/lib/utils/hasLabels.js.map +1 -0
- package/lib/utils/hasLabels.mjs +39 -0
- package/lib/utils/hasLabels.mjs.map +1 -0
- package/lib/utils/hasParent.d.ts +1 -0
- package/lib/utils/hasParent.js +14 -0
- package/lib/utils/hasParent.js.map +1 -0
- package/lib/utils/hasParent.mjs +7 -0
- package/lib/utils/hasParent.mjs.map +1 -0
- package/lib/utils/if.d.ts +11 -0
- package/lib/utils/if.js +16 -0
- package/lib/utils/if.js.map +1 -0
- package/lib/utils/if.mjs +9 -0
- package/lib/utils/if.mjs.map +1 -0
- package/lib/utils/ifChildren.d.ts +8 -0
- package/lib/utils/ifChildren.js +17 -0
- package/lib/utils/ifChildren.js.map +1 -0
- package/lib/utils/ifChildren.mjs +10 -0
- package/lib/utils/ifChildren.mjs.map +1 -0
- package/lib/utils/injectStyle.d.ts +2 -0
- package/lib/utils/injectStyle.js +49 -0
- package/lib/utils/injectStyle.js.map +1 -0
- package/lib/utils/injectStyle.mjs +41 -0
- package/lib/utils/injectStyle.mjs.map +1 -0
- package/lib/utils/inputProps.d.ts +2 -0
- package/lib/utils/inputProps.js +22 -0
- package/lib/utils/inputProps.js.map +1 -0
- package/lib/utils/inputProps.mjs +14 -0
- package/lib/utils/inputProps.mjs.map +1 -0
- package/lib/utils/isNode.d.ts +1 -0
- package/lib/utils/isNode.js +28 -0
- package/lib/utils/isNode.js.map +1 -0
- package/lib/utils/isNode.mjs +21 -0
- package/lib/utils/isNode.mjs.map +1 -0
- package/lib/utils/isPromise.d.ts +1 -0
- package/lib/utils/isPromise.js +10 -0
- package/lib/utils/isPromise.js.map +1 -0
- package/lib/utils/isPromise.mjs +4 -0
- package/lib/utils/isPromise.mjs.map +1 -0
- package/lib/utils/isRetina.d.ts +1 -0
- package/lib/utils/isRetina.js +15 -0
- package/lib/utils/isRetina.js.map +1 -0
- package/lib/utils/isRetina.mjs +9 -0
- package/lib/utils/isRetina.mjs.map +1 -0
- package/lib/utils/logger.d.ts +9 -0
- package/lib/utils/logger.js +40 -0
- package/lib/utils/logger.js.map +1 -0
- package/lib/utils/logger.mjs +32 -0
- package/lib/utils/logger.mjs.map +1 -0
- package/lib/utils/numericChecker.d.ts +5 -0
- package/lib/utils/numericChecker.js +33 -0
- package/lib/utils/numericChecker.js.map +1 -0
- package/lib/utils/numericChecker.mjs +27 -0
- package/lib/utils/numericChecker.mjs.map +1 -0
- package/lib/utils/ownerDocument.d.ts +1 -0
- package/lib/utils/ownerDocument.js +10 -0
- package/lib/utils/ownerDocument.js.map +1 -0
- package/lib/utils/ownerDocument.mjs +4 -0
- package/lib/utils/ownerDocument.mjs.map +1 -0
- package/lib/utils/pick.d.ts +1 -0
- package/lib/utils/pick.js +19 -0
- package/lib/utils/pick.js.map +1 -0
- package/lib/utils/pick.mjs +13 -0
- package/lib/utils/pick.mjs.map +1 -0
- package/lib/utils/propsForElement.d.ts +3 -0
- package/lib/utils/propsForElement.js +59 -0
- package/lib/utils/propsForElement.js.map +1 -0
- package/lib/utils/propsForElement.mjs +50 -0
- package/lib/utils/propsForElement.mjs.map +1 -0
- package/lib/utils/rafTrottle.d.ts +2 -0
- package/lib/utils/rafTrottle.js +33 -0
- package/lib/utils/rafTrottle.js.map +1 -0
- package/lib/utils/rafTrottle.mjs +26 -0
- package/lib/utils/rafTrottle.mjs.map +1 -0
- package/lib/utils/reactToText.d.ts +3 -0
- package/lib/utils/reactToText.js +33 -0
- package/lib/utils/reactToText.js.map +1 -0
- package/lib/utils/reactToText.mjs +26 -0
- package/lib/utils/reactToText.mjs.map +1 -0
- package/lib/utils/ref.d.ts +8 -0
- package/lib/utils/ref.js +95 -0
- package/lib/utils/ref.js.map +1 -0
- package/lib/utils/ref.mjs +83 -0
- package/lib/utils/ref.mjs.map +1 -0
- package/lib/utils/setRef.d.ts +2 -0
- package/lib/utils/setRef.js +10 -0
- package/lib/utils/setRef.js.map +1 -0
- package/lib/utils/setRef.mjs +3 -0
- package/lib/utils/setRef.mjs.map +1 -0
- package/lib/utils/syncScroll.d.ts +1 -0
- package/lib/utils/syncScroll.js +61 -0
- package/lib/utils/syncScroll.js.map +1 -0
- package/lib/utils/syncScroll.mjs +54 -0
- package/lib/utils/syncScroll.mjs.map +1 -0
- package/lib/utils/uncontroll.d.ts +4 -0
- package/lib/utils/uncontroll.js +47 -0
- package/lib/utils/uncontroll.js.map +1 -0
- package/lib/utils/uncontroll.mjs +38 -0
- package/lib/utils/uncontroll.mjs.map +1 -0
- package/lib/utils/uniqueID.d.ts +12 -0
- package/lib/utils/uniqueID.js +42 -0
- package/lib/utils/uniqueID.js.map +1 -0
- package/lib/utils/uniqueID.mjs +33 -0
- package/lib/utils/uniqueID.mjs.map +1 -0
- package/lib/utils/use/useColorResolver.d.ts +1 -0
- package/lib/utils/use/useColorResolver.js +208 -0
- package/lib/utils/use/useColorResolver.js.map +1 -0
- package/lib/utils/use/useColorResolver.mjs +200 -0
- package/lib/utils/use/useColorResolver.mjs.map +1 -0
- package/lib/utils/use/useCss.d.ts +4 -0
- package/lib/utils/use/useCss.js +20 -0
- package/lib/utils/use/useCss.js.map +1 -0
- package/lib/utils/use/useCss.mjs +12 -0
- package/lib/utils/use/useCss.mjs.map +1 -0
- package/lib/utils/use/useEnhancedEffect.d.ts +3 -0
- package/lib/utils/use/useEnhancedEffect.js +13 -0
- package/lib/utils/use/useEnhancedEffect.js.map +1 -0
- package/lib/utils/use/useEnhancedEffect.mjs +5 -0
- package/lib/utils/use/useEnhancedEffect.mjs.map +1 -0
- package/lib/utils/use/useEventCallback.d.ts +4 -0
- package/lib/utils/use/useEventCallback.js +25 -0
- package/lib/utils/use/useEventCallback.js.map +1 -0
- package/lib/utils/use/useEventCallback.mjs +19 -0
- package/lib/utils/use/useEventCallback.mjs.map +1 -0
- package/lib/utils/use/useEventListener.d.ts +2 -0
- package/lib/utils/use/useEventListener.js +33 -0
- package/lib/utils/use/useEventListener.js.map +1 -0
- package/lib/utils/use/useEventListener.mjs +25 -0
- package/lib/utils/use/useEventListener.mjs.map +1 -0
- package/lib/utils/use/useFocusLock.d.ts +10 -0
- package/lib/utils/use/useFocusLock.js +289 -0
- package/lib/utils/use/useFocusLock.js.map +1 -0
- package/lib/utils/use/useFocusLock.mjs +266 -0
- package/lib/utils/use/useFocusLock.mjs.map +1 -0
- package/lib/utils/use/usePreventScroll.d.ts +2 -0
- package/lib/utils/use/usePreventScroll.js +78 -0
- package/lib/utils/use/usePreventScroll.js.map +1 -0
- package/lib/utils/use/usePreventScroll.mjs +70 -0
- package/lib/utils/use/usePreventScroll.mjs.map +1 -0
- package/lib/utils/useCssVariable.d.ts +8 -0
- package/lib/utils/useCssVariable.js +55 -0
- package/lib/utils/useCssVariable.js.map +1 -0
- package/lib/utils/useCssVariable.mjs +46 -0
- package/lib/utils/useCssVariable.mjs.map +1 -0
- package/lib/utils/zIndexStacking.d.ts +8 -0
- package/lib/utils/zIndexStacking.js +48 -0
- package/lib/utils/zIndexStacking.js.map +1 -0
- package/lib/utils/zIndexStacking.mjs +38 -0
- package/lib/utils/zIndexStacking.mjs.map +1 -0
- package/package.json +270 -7
- package/tsconfig-utils.json +4 -0
- package/lib/esm/index.mjs +0 -6
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
16
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
18
|
+
var _hoistNonReactStatics = _interopRequireDefault(require("hoist-non-react-statics"));
|
|
19
|
+
var _getDisplayName = _interopRequireDefault(require("./getDisplayName"));
|
|
20
|
+
var _excluded = ["forwardedRef"];
|
|
21
|
+
function createHoc(EnhancedComponent) {
|
|
22
|
+
return function createWrapper() {
|
|
23
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
24
|
+
return function (WrappedComponent) {
|
|
25
|
+
var Component = /*#__PURE__*/function (_PureComponent) {
|
|
26
|
+
(0, _inherits2["default"])(Component, _PureComponent);
|
|
27
|
+
var _super = (0, _createSuper2["default"])(Component);
|
|
28
|
+
function Component() {
|
|
29
|
+
(0, _classCallCheck2["default"])(this, Component);
|
|
30
|
+
return _super.apply(this, arguments);
|
|
31
|
+
}
|
|
32
|
+
(0, _createClass2["default"])(Component, [{
|
|
33
|
+
key: "render",
|
|
34
|
+
value: function render() {
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
var _WrappedComponent$def = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, WrappedComponent.defaultProps), this.props),
|
|
37
|
+
forwardedRef = _WrappedComponent$def.forwardedRef,
|
|
38
|
+
others = (0, _objectWithoutProperties2["default"])(_WrappedComponent$def, _excluded);
|
|
39
|
+
return /*#__PURE__*/_react["default"].createElement(EnhancedComponent, (0, _extends2["default"])({}, options, this.props), function (enhancedComponentProps) {
|
|
40
|
+
return /*#__PURE__*/_react["default"].createElement(WrappedComponent, (0, _extends2["default"])({
|
|
41
|
+
forwardedRef: forwardedRef
|
|
42
|
+
}, others, enhancedComponentProps));
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}]);
|
|
46
|
+
return Component;
|
|
47
|
+
}(_react.PureComponent);
|
|
48
|
+
(0, _defineProperty2["default"])(Component, "displayName", (0, _getDisplayName["default"])(WrappedComponent));
|
|
49
|
+
return (0, _hoistNonReactStatics["default"])(Component, WrappedComponent);
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
var _default = createHoc;
|
|
54
|
+
exports["default"] = _default;
|
|
55
|
+
//# sourceMappingURL=createHoc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createHoc.js","names":["_react","_interopRequireWildcard","require","_hoistNonReactStatics","_interopRequireDefault","_getDisplayName","_excluded","createHoc","EnhancedComponent","createWrapper","options","arguments","length","undefined","WrappedComponent","Component","_PureComponent","_inherits2","_super","_createSuper2","_classCallCheck2","apply","_createClass2","key","value","render","_WrappedComponent$def","_objectSpread2","defaultProps","props","forwardedRef","others","_objectWithoutProperties2","createElement","_extends2","enhancedComponentProps","PureComponent","_defineProperty2","getDisplayName","hoistNonReactStatics","_default","exports"],"sources":["../../src/utils/createHoc.tsx"],"sourcesContent":["import React, { ComponentClass, ComponentType, PureComponent } from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport getDisplayName from './getDisplayName';\n\nfunction createHoc(\n EnhancedComponent: any,\n): (options?: {}) => (WrappedComponent: ComponentType) => ComponentClass {\n return function createWrapper(options = {}) {\n return (WrappedComponent) => {\n class Component extends PureComponent {\n static displayName = getDisplayName(WrappedComponent);\n\n render() {\n // @ts-ignore\n const { forwardedRef, ...others } = { ...WrappedComponent.defaultProps, ...this.props };\n return (\n <EnhancedComponent {...options} {...this.props}>\n {(enhancedComponentProps: any) => (\n <WrappedComponent\n forwardedRef={forwardedRef}\n {...others}\n {...enhancedComponentProps}\n />\n )}\n </EnhancedComponent>\n );\n }\n }\n\n return hoistNonReactStatics(Component, WrappedComponent);\n };\n };\n}\n\nexport default createHoc;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AAA8C,IAAAI,SAAA;AAE9C,SAASC,SAASA,CAChBC,iBAAsB,EACiD;EACvE,OAAO,SAASC,aAAaA,CAAA,EAAe;IAAA,IAAdC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IACxC,OAAO,UAACG,gBAAgB,EAAK;MAAA,IACrBC,SAAS,0BAAAC,cAAA;QAAA,IAAAC,UAAA,aAAAF,SAAA,EAAAC,cAAA;QAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,SAAA;QAAA,SAAAA,UAAA;UAAA,IAAAK,gBAAA,mBAAAL,SAAA;UAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAV,SAAA;QAAA;QAAA,IAAAW,aAAA,aAAAP,SAAA;UAAAQ,GAAA;UAAAC,KAAA,EAGb,SAAAC,OAAA,EAAS;YACP;YACA,IAAAC,qBAAA,OAAAC,cAAA,iBAAAA,cAAA,iBAAyCb,gBAAgB,CAACc,YAAY,GAAK,IAAI,CAACC,KAAK;cAA7EC,YAAY,GAAAJ,qBAAA,CAAZI,YAAY;cAAKC,MAAM,OAAAC,yBAAA,aAAAN,qBAAA,EAAApB,SAAA;YAC/B,oBACEN,MAAA,YAAAiC,aAAA,CAACzB,iBAAiB,MAAA0B,SAAA,iBAAKxB,OAAO,EAAM,IAAI,CAACmB,KAAK,GAC3C,UAACM,sBAA2B;cAAA,oBAC3BnC,MAAA,YAAAiC,aAAA,CAACnB,gBAAgB,MAAAoB,SAAA;gBACfJ,YAAY,EAAEA;cAAa,GACvBC,MAAM,EACNI,sBAAsB,EAC1B;YAAA,CACH,CACiB;UAExB;QAAC;QAAA,OAAApB,SAAA;MAAA,EAjBqBqB,oBAAa;MAAA,IAAAC,gBAAA,aAA/BtB,SAAS,iBACQ,IAAAuB,0BAAc,EAACxB,gBAAgB,CAAC;MAmBvD,OAAO,IAAAyB,gCAAoB,EAACxB,SAAS,EAAED,gBAAgB,CAAC;IAC1D,CAAC;EACH,CAAC;AACH;AAAC,IAAA0B,QAAA,GAEcjC,SAAS;AAAAkC,OAAA,cAAAD,QAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
var _excluded = ["forwardedRef"];
|
|
10
|
+
import React, { PureComponent } from 'react';
|
|
11
|
+
import hoistNonReactStatics from 'hoist-non-react-statics';
|
|
12
|
+
import getDisplayName from "./getDisplayName.mjs";
|
|
13
|
+
function createHoc(EnhancedComponent) {
|
|
14
|
+
return function createWrapper() {
|
|
15
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16
|
+
return function (WrappedComponent) {
|
|
17
|
+
var Component = /*#__PURE__*/function (_PureComponent) {
|
|
18
|
+
_inherits(Component, _PureComponent);
|
|
19
|
+
var _super = _createSuper(Component);
|
|
20
|
+
function Component() {
|
|
21
|
+
_classCallCheck(this, Component);
|
|
22
|
+
return _super.apply(this, arguments);
|
|
23
|
+
}
|
|
24
|
+
_createClass(Component, [{
|
|
25
|
+
key: "render",
|
|
26
|
+
value: function render() {
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
var _WrappedComponent$def = _objectSpread(_objectSpread({}, WrappedComponent.defaultProps), this.props),
|
|
29
|
+
forwardedRef = _WrappedComponent$def.forwardedRef,
|
|
30
|
+
others = _objectWithoutProperties(_WrappedComponent$def, _excluded);
|
|
31
|
+
return /*#__PURE__*/React.createElement(EnhancedComponent, _extends({}, options, this.props), function (enhancedComponentProps) {
|
|
32
|
+
return /*#__PURE__*/React.createElement(WrappedComponent, _extends({
|
|
33
|
+
forwardedRef: forwardedRef
|
|
34
|
+
}, others, enhancedComponentProps));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}]);
|
|
38
|
+
return Component;
|
|
39
|
+
}(PureComponent);
|
|
40
|
+
_defineProperty(Component, "displayName", getDisplayName(WrappedComponent));
|
|
41
|
+
return hoistNonReactStatics(Component, WrappedComponent);
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export default createHoc;
|
|
46
|
+
//# sourceMappingURL=createHoc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createHoc.mjs","names":["React","PureComponent","hoistNonReactStatics","getDisplayName","createHoc","EnhancedComponent","createWrapper","options","arguments","length","undefined","WrappedComponent","Component","_PureComponent","_inherits","_super","_createSuper","_classCallCheck","apply","_createClass","key","value","render","_WrappedComponent$def","_objectSpread","defaultProps","props","forwardedRef","others","_objectWithoutProperties","_excluded","createElement","_extends","enhancedComponentProps","_defineProperty"],"sources":["../../src/utils/createHoc.tsx"],"sourcesContent":["import React, { ComponentClass, ComponentType, PureComponent } from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport getDisplayName from './getDisplayName';\n\nfunction createHoc(\n EnhancedComponent: any,\n): (options?: {}) => (WrappedComponent: ComponentType) => ComponentClass {\n return function createWrapper(options = {}) {\n return (WrappedComponent) => {\n class Component extends PureComponent {\n static displayName = getDisplayName(WrappedComponent);\n\n render() {\n // @ts-ignore\n const { forwardedRef, ...others } = { ...WrappedComponent.defaultProps, ...this.props };\n return (\n <EnhancedComponent {...options} {...this.props}>\n {(enhancedComponentProps: any) => (\n <WrappedComponent\n forwardedRef={forwardedRef}\n {...others}\n {...enhancedComponentProps}\n />\n )}\n </EnhancedComponent>\n );\n }\n }\n\n return hoistNonReactStatics(Component, WrappedComponent);\n };\n };\n}\n\nexport default createHoc;\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,IAAmCC,aAAa,QAAQ,OAAO;AAC3E,OAAOC,oBAAoB,MAAM,yBAAyB;AAC1D,OAAOC,cAAc,MAAM,sBAAkB;AAE7C,SAASC,SAASA,CAChBC,iBAAsB,EACiD;EACvE,OAAO,SAASC,aAAaA,CAAA,EAAe;IAAA,IAAdC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IACxC,OAAO,UAACG,gBAAgB,EAAK;MAAA,IACrBC,SAAS,0BAAAC,cAAA;QAAAC,SAAA,CAAAF,SAAA,EAAAC,cAAA;QAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,SAAA;QAAA,SAAAA,UAAA;UAAAK,eAAA,OAAAL,SAAA;UAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAV,SAAA;QAAA;QAAAW,YAAA,CAAAP,SAAA;UAAAQ,GAAA;UAAAC,KAAA,EAGb,SAAAC,OAAA,EAAS;YACP;YACA,IAAAC,qBAAA,GAAAC,aAAA,CAAAA,aAAA,KAAyCb,gBAAgB,CAACc,YAAY,GAAK,IAAI,CAACC,KAAK;cAA7EC,YAAY,GAAAJ,qBAAA,CAAZI,YAAY;cAAKC,MAAM,GAAAC,wBAAA,CAAAN,qBAAA,EAAAO,SAAA;YAC/B,oBACE9B,KAAA,CAAA+B,aAAA,CAAC1B,iBAAiB,EAAA2B,QAAA,KAAKzB,OAAO,EAAM,IAAI,CAACmB,KAAK,GAC3C,UAACO,sBAA2B;cAAA,oBAC3BjC,KAAA,CAAA+B,aAAA,CAACpB,gBAAgB,EAAAqB,QAAA;gBACfL,YAAY,EAAEA;cAAa,GACvBC,MAAM,EACNK,sBAAsB,EAC1B;YAAA,CACH,CACiB;UAExB;QAAC;QAAA,OAAArB,SAAA;MAAA,EAjBqBX,aAAa;MAAAiC,eAAA,CAA/BtB,SAAS,iBACQT,cAAc,CAACQ,gBAAgB,CAAC;MAmBvD,OAAOT,oBAAoB,CAACU,SAAS,EAAED,gBAAgB,CAAC;IAC1D,CAAC;EACH,CAAC;AACH;AAEA,eAAeP,SAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function createUUID(): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = createUUID;
|
|
7
|
+
function createUUID() {
|
|
8
|
+
var pattern = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
|
|
9
|
+
return pattern.replace(/[xy]/g, function (c) {
|
|
10
|
+
var r = Math.random() * 16 | 0;
|
|
11
|
+
var v = c === 'x' ? r : r & 0x3 | 0x8;
|
|
12
|
+
return v.toString(16);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=createUUID.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createUUID.js","names":["createUUID","pattern","replace","c","r","Math","random","v","toString"],"sources":["../../src/utils/createUUID.ts"],"sourcesContent":["export default function createUUID() {\n const pattern = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n return pattern.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16) | 0;\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n"],"mappings":";;;;;;AAAe,SAASA,UAAUA,CAAA,EAAG;EACnC,IAAMC,OAAO,GAAG,sCAAsC;EACtD,OAAOA,OAAO,CAACC,OAAO,CAAC,OAAO,EAAE,UAACC,CAAC,EAAK;IACrC,IAAMC,CAAC,GAAIC,IAAI,CAACC,MAAM,EAAE,GAAG,EAAE,GAAI,CAAC;IAClC,IAAMC,CAAC,GAAGJ,CAAC,KAAK,GAAG,GAAGC,CAAC,GAAIA,CAAC,GAAG,GAAG,GAAI,GAAG;IACzC,OAAOG,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC;EACvB,CAAC,CAAC;AACJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default function createUUID() {
|
|
2
|
+
var pattern = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
|
|
3
|
+
return pattern.replace(/[xy]/g, function (c) {
|
|
4
|
+
var r = Math.random() * 16 | 0;
|
|
5
|
+
var v = c === 'x' ? r : r & 0x3 | 0x8;
|
|
6
|
+
return v.toString(16);
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=createUUID.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createUUID.mjs","names":["createUUID","pattern","replace","c","r","Math","random","v","toString"],"sources":["../../src/utils/createUUID.ts"],"sourcesContent":["export default function createUUID() {\n const pattern = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n return pattern.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16) | 0;\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n"],"mappings":"AAAA,eAAe,SAASA,UAAUA,CAAA,EAAG;EACnC,IAAMC,OAAO,GAAG,sCAAsC;EACtD,OAAOA,OAAO,CAACC,OAAO,CAAC,OAAO,EAAE,UAACC,CAAC,EAAK;IACrC,IAAMC,CAAC,GAAIC,IAAI,CAACC,MAAM,EAAE,GAAG,EAAE,GAAI,CAAC;IAClC,IAAMC,CAAC,GAAGJ,CAAC,KAAK,GAAG,GAAGC,CAAC,GAAIA,CAAC,GAAG,GAAG,GAAI,GAAG;IACzC,OAAOG,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC;EACvB,CAAC,CAAC;AACJ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts CSS numeric value to int or returns defaultValue if
|
|
3
|
+
* value is not numeric
|
|
4
|
+
* @param {string} value
|
|
5
|
+
* @param {number} defaultValue
|
|
6
|
+
* @returns {Number|number}
|
|
7
|
+
*/
|
|
8
|
+
export default function cssToIntDefault(value: string, defaultValue?: number): number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = cssToIntDefault;
|
|
7
|
+
/**
|
|
8
|
+
* Converts CSS numeric value to int or returns defaultValue if
|
|
9
|
+
* value is not numeric
|
|
10
|
+
* @param {string} value
|
|
11
|
+
* @param {number} defaultValue
|
|
12
|
+
* @returns {Number|number}
|
|
13
|
+
*/
|
|
14
|
+
function cssToIntDefault(value) {
|
|
15
|
+
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
16
|
+
var result = parseFloat(value);
|
|
17
|
+
if (Number.isNaN(result)) {
|
|
18
|
+
result = defaultValue;
|
|
19
|
+
}
|
|
20
|
+
return Math.ceil(result);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=cssToIntDefault.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cssToIntDefault.js","names":["cssToIntDefault","value","defaultValue","arguments","length","undefined","result","parseFloat","Number","isNaN","Math","ceil"],"sources":["../../src/utils/cssToIntDefault.ts"],"sourcesContent":["/**\n * Converts CSS numeric value to int or returns defaultValue if\n * value is not numeric\n * @param {string} value\n * @param {number} defaultValue\n * @returns {Number|number}\n */\nexport default function cssToIntDefault(value: string, defaultValue = 0) {\n let result = parseFloat(value);\n if (Number.isNaN(result)) {\n result = defaultValue;\n }\n\n return Math.ceil(result);\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,eAAeA,CAACC,KAAa,EAAoB;EAAA,IAAlBC,YAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EACrE,IAAIG,MAAM,GAAGC,UAAU,CAACN,KAAK,CAAC;EAC9B,IAAIO,MAAM,CAACC,KAAK,CAACH,MAAM,CAAC,EAAE;IACxBA,MAAM,GAAGJ,YAAY;EACvB;EAEA,OAAOQ,IAAI,CAACC,IAAI,CAACL,MAAM,CAAC;AAC1B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts CSS numeric value to int or returns defaultValue if
|
|
3
|
+
* value is not numeric
|
|
4
|
+
* @param {string} value
|
|
5
|
+
* @param {number} defaultValue
|
|
6
|
+
* @returns {Number|number}
|
|
7
|
+
*/
|
|
8
|
+
export default function cssToIntDefault(value) {
|
|
9
|
+
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
10
|
+
var result = parseFloat(value);
|
|
11
|
+
if (Number.isNaN(result)) {
|
|
12
|
+
result = defaultValue;
|
|
13
|
+
}
|
|
14
|
+
return Math.ceil(result);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=cssToIntDefault.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cssToIntDefault.mjs","names":["cssToIntDefault","value","defaultValue","arguments","length","undefined","result","parseFloat","Number","isNaN","Math","ceil"],"sources":["../../src/utils/cssToIntDefault.ts"],"sourcesContent":["/**\n * Converts CSS numeric value to int or returns defaultValue if\n * value is not numeric\n * @param {string} value\n * @param {number} defaultValue\n * @returns {Number|number}\n */\nexport default function cssToIntDefault(value: string, defaultValue = 0) {\n let result = parseFloat(value);\n if (Number.isNaN(result)) {\n result = defaultValue;\n }\n\n return Math.ceil(result);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,eAAeA,CAACC,KAAa,EAAoB;EAAA,IAAlBC,YAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EACrE,IAAIG,MAAM,GAAGC,UAAU,CAACN,KAAK,CAAC;EAC9B,IAAIO,MAAM,CAACC,KAAK,CAACH,MAAM,CAAC,EAAE;IACxBA,MAAM,GAAGJ,YAAY;EACvB;EAEA,OAAOQ,IAAI,CAACC,IAAI,CAACL,MAAM,CAAC;AAC1B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UnknownProperties } from '../../core-types/UnknownProperties';
|
|
3
|
+
/** @deprecated */
|
|
4
|
+
export interface IEnhancedWithAutoFocusProps extends EnhancedWithAutoFocusProps, UnknownProperties {
|
|
5
|
+
}
|
|
6
|
+
export type EnhancedWithAutoFocusProps = {
|
|
7
|
+
/**
|
|
8
|
+
* @default undefined
|
|
9
|
+
*/
|
|
10
|
+
autoFocus?: string | number | boolean;
|
|
11
|
+
children?: (props: IEnhancedWithAutoFocusProps) => React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: (options?: {} | undefined) => (WrappedComponent: React.ComponentType) => React.ComponentClass<{}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
11
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
13
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
+
var _react = require("react");
|
|
15
|
+
var _reactDom = require("react-dom");
|
|
16
|
+
var _createHoc = _interopRequireDefault(require("../createHoc"));
|
|
17
|
+
var EnhancedWithAutoFocus = /*#__PURE__*/function (_PureComponent) {
|
|
18
|
+
(0, _inherits2["default"])(EnhancedWithAutoFocus, _PureComponent);
|
|
19
|
+
var _super = (0, _createSuper2["default"])(EnhancedWithAutoFocus);
|
|
20
|
+
function EnhancedWithAutoFocus() {
|
|
21
|
+
var _this;
|
|
22
|
+
(0, _classCallCheck2["default"])(this, EnhancedWithAutoFocus);
|
|
23
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
24
|
+
args[_key] = arguments[_key];
|
|
25
|
+
}
|
|
26
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
27
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "timer", void 0);
|
|
28
|
+
return _this;
|
|
29
|
+
}
|
|
30
|
+
(0, _createClass2["default"])(EnhancedWithAutoFocus, [{
|
|
31
|
+
key: "notUsingNativeAutoFocus",
|
|
32
|
+
value: function notUsingNativeAutoFocus() {
|
|
33
|
+
var autoFocus = this.props.autoFocus;
|
|
34
|
+
return typeof autoFocus === 'boolean' || typeof autoFocus === 'number';
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
key: "componentDidMount",
|
|
38
|
+
value: function componentDidMount() {
|
|
39
|
+
if (this.notUsingNativeAutoFocus()) {
|
|
40
|
+
var autoFocus = this.props.autoFocus;
|
|
41
|
+
if (autoFocus === false) return;
|
|
42
|
+
var node = (0, _reactDom.findDOMNode)(this);
|
|
43
|
+
if (!node) return;
|
|
44
|
+
//@ts-ignore
|
|
45
|
+
this.timer = setTimeout(function () {
|
|
46
|
+
return node.focus();
|
|
47
|
+
}, autoFocus || 0);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
key: "componentWillUnmount",
|
|
52
|
+
value: function componentWillUnmount() {
|
|
53
|
+
clearTimeout(this.timer);
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
key: "render",
|
|
57
|
+
value: function render() {
|
|
58
|
+
var _ref = this.props,
|
|
59
|
+
children = _ref.children;
|
|
60
|
+
var props = {};
|
|
61
|
+
if (this.notUsingNativeAutoFocus()) {
|
|
62
|
+
props.autoFocus = undefined;
|
|
63
|
+
}
|
|
64
|
+
return children(props);
|
|
65
|
+
}
|
|
66
|
+
}]);
|
|
67
|
+
return EnhancedWithAutoFocus;
|
|
68
|
+
}(_react.PureComponent);
|
|
69
|
+
(0, _defineProperty2["default"])(EnhancedWithAutoFocus, "displayName", 'EnhancedWithAutoFocus');
|
|
70
|
+
(0, _defineProperty2["default"])(EnhancedWithAutoFocus, "defaultProps", {
|
|
71
|
+
autoFocus: undefined
|
|
72
|
+
});
|
|
73
|
+
var _default = (0, _createHoc["default"])(EnhancedWithAutoFocus);
|
|
74
|
+
exports["default"] = _default;
|
|
75
|
+
//# sourceMappingURL=WithAutoFocus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithAutoFocus.js","names":["_react","require","_reactDom","_createHoc","_interopRequireDefault","EnhancedWithAutoFocus","_PureComponent","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","_createClass2","key","value","notUsingNativeAutoFocus","autoFocus","props","componentDidMount","node","findDOMNode","timer","setTimeout","focus","componentWillUnmount","clearTimeout","render","_ref","children","undefined","PureComponent","_default","createHoc","exports"],"sources":["../../../src/utils/enhances/WithAutoFocus.tsx"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { findDOMNode } from 'react-dom';\nimport createHoc from '../createHoc';\nimport { UnknownProperties } from '../../core-types/UnknownProperties';\n\n/** @deprecated */\nexport interface IEnhancedWithAutoFocusProps\n extends EnhancedWithAutoFocusProps,\n UnknownProperties {}\nexport type EnhancedWithAutoFocusProps = {\n /**\n * @default undefined\n */\n autoFocus?: string | number | boolean;\n children?: (props: IEnhancedWithAutoFocusProps) => React.ReactNode;\n};\n\nclass EnhancedWithAutoFocus extends PureComponent<IEnhancedWithAutoFocusProps> {\n static displayName = 'EnhancedWithAutoFocus';\n\n static defaultProps = {\n autoFocus: undefined,\n };\n\n private timer: ReturnType<typeof setTimeout> | undefined;\n\n notUsingNativeAutoFocus() {\n const { autoFocus } = this.props;\n return typeof autoFocus === 'boolean' || typeof autoFocus === 'number';\n }\n\n componentDidMount() {\n if (this.notUsingNativeAutoFocus()) {\n const { autoFocus } = this.props;\n if (autoFocus === false) return;\n const node = findDOMNode(this);\n if (!node) return;\n //@ts-ignore\n this.timer = setTimeout(() => node.focus(), (autoFocus as number) || 0);\n }\n }\n\n componentWillUnmount() {\n clearTimeout(this.timer);\n }\n\n render() {\n const { children } = this.props as any;\n const props = {} as IEnhancedWithAutoFocusProps;\n if (this.notUsingNativeAutoFocus()) {\n props.autoFocus = undefined;\n }\n return children(props);\n }\n}\n\nexport default createHoc(EnhancedWithAutoFocus);\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAqC,IAe/BI,qBAAqB,0BAAAC,cAAA;EAAA,IAAAC,UAAA,aAAAF,qBAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,qBAAA;EAAA,SAAAA,sBAAA;IAAA,IAAAK,KAAA;IAAA,IAAAC,gBAAA,mBAAAN,qBAAA;IAAA,SAAAO,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAL,IAAA;IAAA,IAAAM,gBAAA,iBAAAC,uBAAA,aAAAZ,KAAA;IAAA,OAAAA,KAAA;EAAA;EAAA,IAAAa,aAAA,aAAAlB,qBAAA;IAAAmB,GAAA;IAAAC,KAAA,EASzB,SAAAC,wBAAA,EAA0B;MACxB,IAAQC,SAAS,GAAK,IAAI,CAACC,KAAK,CAAxBD,SAAS;MACjB,OAAO,OAAOA,SAAS,KAAK,SAAS,IAAI,OAAOA,SAAS,KAAK,QAAQ;IACxE;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAI,kBAAA,EAAoB;MAClB,IAAI,IAAI,CAACH,uBAAuB,EAAE,EAAE;QAClC,IAAQC,SAAS,GAAK,IAAI,CAACC,KAAK,CAAxBD,SAAS;QACjB,IAAIA,SAAS,KAAK,KAAK,EAAE;QACzB,IAAMG,IAAI,GAAG,IAAAC,qBAAW,EAAC,IAAI,CAAC;QAC9B,IAAI,CAACD,IAAI,EAAE;QACX;QACA,IAAI,CAACE,KAAK,GAAGC,UAAU,CAAC;UAAA,OAAMH,IAAI,CAACI,KAAK,EAAE;QAAA,GAAGP,SAAS,IAAe,CAAC,CAAC;MACzE;IACF;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAU,qBAAA,EAAuB;MACrBC,YAAY,CAAC,IAAI,CAACJ,KAAK,CAAC;IAC1B;EAAC;IAAAR,GAAA;IAAAC,KAAA,EAED,SAAAY,OAAA,EAAS;MACP,IAAAC,IAAA,GAAqB,IAAI,CAACV,KAAK;QAAvBW,QAAQ,GAAAD,IAAA,CAARC,QAAQ;MAChB,IAAMX,KAAK,GAAG,CAAC,CAAgC;MAC/C,IAAI,IAAI,CAACF,uBAAuB,EAAE,EAAE;QAClCE,KAAK,CAACD,SAAS,GAAGa,SAAS;MAC7B;MACA,OAAOD,QAAQ,CAACX,KAAK,CAAC;IACxB;EAAC;EAAA,OAAAvB,qBAAA;AAAA,EApCiCoC,oBAAa;AAAA,IAAApB,gBAAA,aAA3ChB,qBAAqB,iBACJ,uBAAuB;AAAA,IAAAgB,gBAAA,aADxChB,qBAAqB,kBAGH;EACpBsB,SAAS,EAAEa;AACb,CAAC;AAAA,IAAAE,QAAA,GAkCY,IAAAC,qBAAS,EAACtC,qBAAqB,CAAC;AAAAuC,OAAA,cAAAF,QAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
+
import { PureComponent } from 'react';
|
|
8
|
+
import { findDOMNode } from 'react-dom';
|
|
9
|
+
import createHoc from "../createHoc.mjs";
|
|
10
|
+
var EnhancedWithAutoFocus = /*#__PURE__*/function (_PureComponent) {
|
|
11
|
+
_inherits(EnhancedWithAutoFocus, _PureComponent);
|
|
12
|
+
var _super = _createSuper(EnhancedWithAutoFocus);
|
|
13
|
+
function EnhancedWithAutoFocus() {
|
|
14
|
+
var _this;
|
|
15
|
+
_classCallCheck(this, EnhancedWithAutoFocus);
|
|
16
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
+
args[_key] = arguments[_key];
|
|
18
|
+
}
|
|
19
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
20
|
+
_defineProperty(_assertThisInitialized(_this), "timer", void 0);
|
|
21
|
+
return _this;
|
|
22
|
+
}
|
|
23
|
+
_createClass(EnhancedWithAutoFocus, [{
|
|
24
|
+
key: "notUsingNativeAutoFocus",
|
|
25
|
+
value: function notUsingNativeAutoFocus() {
|
|
26
|
+
var autoFocus = this.props.autoFocus;
|
|
27
|
+
return typeof autoFocus === 'boolean' || typeof autoFocus === 'number';
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
key: "componentDidMount",
|
|
31
|
+
value: function componentDidMount() {
|
|
32
|
+
if (this.notUsingNativeAutoFocus()) {
|
|
33
|
+
var autoFocus = this.props.autoFocus;
|
|
34
|
+
if (autoFocus === false) return;
|
|
35
|
+
var node = findDOMNode(this);
|
|
36
|
+
if (!node) return;
|
|
37
|
+
//@ts-ignore
|
|
38
|
+
this.timer = setTimeout(function () {
|
|
39
|
+
return node.focus();
|
|
40
|
+
}, autoFocus || 0);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
key: "componentWillUnmount",
|
|
45
|
+
value: function componentWillUnmount() {
|
|
46
|
+
clearTimeout(this.timer);
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
key: "render",
|
|
50
|
+
value: function render() {
|
|
51
|
+
var _ref = this.props,
|
|
52
|
+
children = _ref.children;
|
|
53
|
+
var props = {};
|
|
54
|
+
if (this.notUsingNativeAutoFocus()) {
|
|
55
|
+
props.autoFocus = undefined;
|
|
56
|
+
}
|
|
57
|
+
return children(props);
|
|
58
|
+
}
|
|
59
|
+
}]);
|
|
60
|
+
return EnhancedWithAutoFocus;
|
|
61
|
+
}(PureComponent);
|
|
62
|
+
_defineProperty(EnhancedWithAutoFocus, "displayName", 'EnhancedWithAutoFocus');
|
|
63
|
+
_defineProperty(EnhancedWithAutoFocus, "defaultProps", {
|
|
64
|
+
autoFocus: undefined
|
|
65
|
+
});
|
|
66
|
+
export default createHoc(EnhancedWithAutoFocus);
|
|
67
|
+
//# sourceMappingURL=WithAutoFocus.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithAutoFocus.mjs","names":["PureComponent","findDOMNode","createHoc","EnhancedWithAutoFocus","_PureComponent","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","value","notUsingNativeAutoFocus","autoFocus","props","componentDidMount","node","timer","setTimeout","focus","componentWillUnmount","clearTimeout","render","_ref","children","undefined"],"sources":["../../../src/utils/enhances/WithAutoFocus.tsx"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { findDOMNode } from 'react-dom';\nimport createHoc from '../createHoc';\nimport { UnknownProperties } from '../../core-types/UnknownProperties';\n\n/** @deprecated */\nexport interface IEnhancedWithAutoFocusProps\n extends EnhancedWithAutoFocusProps,\n UnknownProperties {}\nexport type EnhancedWithAutoFocusProps = {\n /**\n * @default undefined\n */\n autoFocus?: string | number | boolean;\n children?: (props: IEnhancedWithAutoFocusProps) => React.ReactNode;\n};\n\nclass EnhancedWithAutoFocus extends PureComponent<IEnhancedWithAutoFocusProps> {\n static displayName = 'EnhancedWithAutoFocus';\n\n static defaultProps = {\n autoFocus: undefined,\n };\n\n private timer: ReturnType<typeof setTimeout> | undefined;\n\n notUsingNativeAutoFocus() {\n const { autoFocus } = this.props;\n return typeof autoFocus === 'boolean' || typeof autoFocus === 'number';\n }\n\n componentDidMount() {\n if (this.notUsingNativeAutoFocus()) {\n const { autoFocus } = this.props;\n if (autoFocus === false) return;\n const node = findDOMNode(this);\n if (!node) return;\n //@ts-ignore\n this.timer = setTimeout(() => node.focus(), (autoFocus as number) || 0);\n }\n }\n\n componentWillUnmount() {\n clearTimeout(this.timer);\n }\n\n render() {\n const { children } = this.props as any;\n const props = {} as IEnhancedWithAutoFocusProps;\n if (this.notUsingNativeAutoFocus()) {\n props.autoFocus = undefined;\n }\n return children(props);\n }\n}\n\nexport default createHoc(EnhancedWithAutoFocus);\n"],"mappings":";;;;;;AAAA,SAAgBA,aAAa,QAAQ,OAAO;AAC5C,SAASC,WAAW,QAAQ,WAAW;AACvC,OAAOC,SAAS,MAAM,kBAAc;AAAC,IAe/BC,qBAAqB,0BAAAC,cAAA;EAAAC,SAAA,CAAAF,qBAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,qBAAA;EAAA,SAAAA,sBAAA;IAAA,IAAAK,KAAA;IAAAC,eAAA,OAAAN,qBAAA;IAAA,SAAAO,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAL,IAAA;IAAAM,eAAA,CAAAC,sBAAA,CAAAZ,KAAA;IAAA,OAAAA,KAAA;EAAA;EAAAa,YAAA,CAAAlB,qBAAA;IAAAmB,GAAA;IAAAC,KAAA,EASzB,SAAAC,wBAAA,EAA0B;MACxB,IAAQC,SAAS,GAAK,IAAI,CAACC,KAAK,CAAxBD,SAAS;MACjB,OAAO,OAAOA,SAAS,KAAK,SAAS,IAAI,OAAOA,SAAS,KAAK,QAAQ;IACxE;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAI,kBAAA,EAAoB;MAClB,IAAI,IAAI,CAACH,uBAAuB,EAAE,EAAE;QAClC,IAAQC,SAAS,GAAK,IAAI,CAACC,KAAK,CAAxBD,SAAS;QACjB,IAAIA,SAAS,KAAK,KAAK,EAAE;QACzB,IAAMG,IAAI,GAAG3B,WAAW,CAAC,IAAI,CAAC;QAC9B,IAAI,CAAC2B,IAAI,EAAE;QACX;QACA,IAAI,CAACC,KAAK,GAAGC,UAAU,CAAC;UAAA,OAAMF,IAAI,CAACG,KAAK,EAAE;QAAA,GAAGN,SAAS,IAAe,CAAC,CAAC;MACzE;IACF;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAS,qBAAA,EAAuB;MACrBC,YAAY,CAAC,IAAI,CAACJ,KAAK,CAAC;IAC1B;EAAC;IAAAP,GAAA;IAAAC,KAAA,EAED,SAAAW,OAAA,EAAS;MACP,IAAAC,IAAA,GAAqB,IAAI,CAACT,KAAK;QAAvBU,QAAQ,GAAAD,IAAA,CAARC,QAAQ;MAChB,IAAMV,KAAK,GAAG,CAAC,CAAgC;MAC/C,IAAI,IAAI,CAACF,uBAAuB,EAAE,EAAE;QAClCE,KAAK,CAACD,SAAS,GAAGY,SAAS;MAC7B;MACA,OAAOD,QAAQ,CAACV,KAAK,CAAC;IACxB;EAAC;EAAA,OAAAvB,qBAAA;AAAA,EApCiCH,aAAa;AAAAmB,eAAA,CAA3ChB,qBAAqB,iBACJ,uBAAuB;AAAAgB,eAAA,CADxChB,qBAAqB,kBAGH;EACpBsB,SAAS,EAAEY;AACb,CAAC;AAkCH,eAAenC,SAAS,CAACC,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
|
+
import { NanoOptions } from '@phytonmk/nano-css';
|
|
3
|
+
import { CssLikeObject } from '@phytonmk/nano-css/types/common';
|
|
4
|
+
import { UnknownProperties } from '../../core-types/UnknownProperties';
|
|
5
|
+
declare const getStylesheet: () => string;
|
|
6
|
+
/**
|
|
7
|
+
* Function to clear the nano CSS styles object from keys with undefined value
|
|
8
|
+
* @param {Object} obj - nano CSS styles object
|
|
9
|
+
* @returns {Object}
|
|
10
|
+
*/
|
|
11
|
+
declare function normaliseCss(obj: CssLikeObject): any;
|
|
12
|
+
declare const WithCssContext: React.Context<NanoOptions>;
|
|
13
|
+
declare const Provider: React.Provider<NanoOptions>;
|
|
14
|
+
declare function initNanoCss(options?: NanoOptions): import("@phytonmk/nano-css").NanoRenderer;
|
|
15
|
+
/** @deprecated */
|
|
16
|
+
export interface IEnhancedWithCSSProps extends EnhancedWithCSSProps, UnknownProperties {
|
|
17
|
+
}
|
|
18
|
+
export type EnhancedWithCSSProps = {
|
|
19
|
+
className?: string;
|
|
20
|
+
css?: {};
|
|
21
|
+
children(props: {
|
|
22
|
+
className: string | undefined;
|
|
23
|
+
}): React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
declare class EnhancedWithCSS extends PureComponent<IEnhancedWithCSSProps> {
|
|
26
|
+
static contextType: React.Context<NanoOptions>;
|
|
27
|
+
static defaultProps: {
|
|
28
|
+
css: {};
|
|
29
|
+
};
|
|
30
|
+
state: {
|
|
31
|
+
dynamicClassName: string;
|
|
32
|
+
};
|
|
33
|
+
static getDerivedStateFromProps(props: any): {
|
|
34
|
+
dynamicClassName: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
constructor(props: any, context: any);
|
|
37
|
+
render(): React.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
export { getStylesheet, EnhancedWithCSS, Provider, WithCssContext, initNanoCss, normaliseCss };
|
|
40
|
+
declare const _default: (options?: {} | undefined) => (WrappedComponent: React.ComponentType) => React.ComponentClass<{}, any>;
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.getStylesheet = exports["default"] = exports.WithCssContext = exports.Provider = exports.EnhancedWithCSS = void 0;
|
|
9
|
+
exports.initNanoCss = initNanoCss;
|
|
10
|
+
exports.normaliseCss = normaliseCss;
|
|
11
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
16
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
18
|
+
var _createHoc = _interopRequireDefault(require("../createHoc"));
|
|
19
|
+
var _CSSinJS2 = _interopRequireDefault(require("../CSSinJS"));
|
|
20
|
+
var getStylesheet = function getStylesheet() {
|
|
21
|
+
return (0, _CSSinJS2["default"])().raw;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Function to clear the nano CSS styles object from keys with undefined value
|
|
26
|
+
* @param {Object} obj - nano CSS styles object
|
|
27
|
+
* @returns {Object}
|
|
28
|
+
*/
|
|
29
|
+
exports.getStylesheet = getStylesheet;
|
|
30
|
+
function normaliseCss(obj) {
|
|
31
|
+
return Object.keys(obj).reduce(function (acc, key) {
|
|
32
|
+
var result = acc;
|
|
33
|
+
if (obj[key] !== undefined) {
|
|
34
|
+
result[key] = obj[key];
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}, {});
|
|
38
|
+
}
|
|
39
|
+
var WithCssContext = /*#__PURE__*/_react["default"].createContext({});
|
|
40
|
+
exports.WithCssContext = WithCssContext;
|
|
41
|
+
var Provider = WithCssContext.Provider;
|
|
42
|
+
exports.Provider = Provider;
|
|
43
|
+
function initNanoCss() {
|
|
44
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
45
|
+
return (0, _CSSinJS2["default"])(options);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** @deprecated */
|
|
49
|
+
var EnhancedWithCSS = /*#__PURE__*/function (_PureComponent) {
|
|
50
|
+
(0, _inherits2["default"])(EnhancedWithCSS, _PureComponent);
|
|
51
|
+
var _super = (0, _createSuper2["default"])(EnhancedWithCSS);
|
|
52
|
+
function EnhancedWithCSS(props, context) {
|
|
53
|
+
var _this;
|
|
54
|
+
(0, _classCallCheck2["default"])(this, EnhancedWithCSS);
|
|
55
|
+
_this = _super.call(this, props, context);
|
|
56
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
|
|
57
|
+
dynamicClassName: ''
|
|
58
|
+
});
|
|
59
|
+
initNanoCss(context);
|
|
60
|
+
return _this;
|
|
61
|
+
}
|
|
62
|
+
(0, _createClass2["default"])(EnhancedWithCSS, [{
|
|
63
|
+
key: "render",
|
|
64
|
+
value: function render() {
|
|
65
|
+
var _this$props = this.props,
|
|
66
|
+
children = _this$props.children,
|
|
67
|
+
_this$props$className = _this$props.className,
|
|
68
|
+
className = _this$props$className === void 0 ? '' : _this$props$className;
|
|
69
|
+
var dynamicClassName = this.state.dynamicClassName;
|
|
70
|
+
return children({
|
|
71
|
+
className: className + dynamicClassName || undefined
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}], [{
|
|
75
|
+
key: "getDerivedStateFromProps",
|
|
76
|
+
value: function getDerivedStateFromProps(props) {
|
|
77
|
+
var _CSSinJS$cache, _CSSinJS;
|
|
78
|
+
var cleanCss = normaliseCss(props.css);
|
|
79
|
+
return {
|
|
80
|
+
dynamicClassName: Object.keys(cleanCss).length ? (_CSSinJS$cache = (_CSSinJS = (0, _CSSinJS2["default"])()).cache) === null || _CSSinJS$cache === void 0 ? void 0 : _CSSinJS$cache.call(_CSSinJS, cleanCss) : ''
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}]);
|
|
84
|
+
return EnhancedWithCSS;
|
|
85
|
+
}(_react.PureComponent);
|
|
86
|
+
exports.EnhancedWithCSS = EnhancedWithCSS;
|
|
87
|
+
(0, _defineProperty2["default"])(EnhancedWithCSS, "contextType", WithCssContext);
|
|
88
|
+
(0, _defineProperty2["default"])(EnhancedWithCSS, "defaultProps", {
|
|
89
|
+
css: {}
|
|
90
|
+
});
|
|
91
|
+
var _default = (0, _createHoc["default"])(EnhancedWithCSS);
|
|
92
|
+
exports["default"] = _default;
|
|
93
|
+
//# sourceMappingURL=WithCSS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithCSS.js","names":["_react","_interopRequireWildcard","require","_createHoc","_interopRequireDefault","_CSSinJS2","getStylesheet","CSSinJS","raw","exports","normaliseCss","obj","Object","keys","reduce","acc","key","result","undefined","WithCssContext","React","createContext","Provider","initNanoCss","options","arguments","length","EnhancedWithCSS","_PureComponent","_inherits2","_super","_createSuper2","props","context","_this","_classCallCheck2","call","_defineProperty2","_assertThisInitialized2","dynamicClassName","_createClass2","value","render","_this$props","children","_this$props$className","className","state","getDerivedStateFromProps","_CSSinJS$cache","_CSSinJS","cleanCss","css","cache","PureComponent","_default","createHoc"],"sources":["../../../src/utils/enhances/WithCSS.tsx"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { NanoOptions } from '@phytonmk/nano-css';\nimport { CssLikeObject } from '@phytonmk/nano-css/types/common';\nimport createHoc from '../createHoc';\nimport CSSinJS from '../CSSinJS';\nimport { UnknownProperties } from '../../core-types/UnknownProperties';\n\nconst getStylesheet = () => CSSinJS().raw;\n\n/**\n * Function to clear the nano CSS styles object from keys with undefined value\n * @param {Object} obj - nano CSS styles object\n * @returns {Object}\n */\nfunction normaliseCss(obj: CssLikeObject) {\n return Object.keys(obj).reduce((acc: any, key) => {\n const result = acc;\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n return result;\n }, {});\n}\n\nconst WithCssContext = React.createContext<NanoOptions>({});\nconst { Provider } = WithCssContext;\n\nfunction initNanoCss(options: NanoOptions = {}) {\n return CSSinJS(options);\n}\n\n/** @deprecated */\nexport interface IEnhancedWithCSSProps extends EnhancedWithCSSProps, UnknownProperties {}\nexport type EnhancedWithCSSProps = {\n className?: string;\n css?: {};\n\n children(props: { className: string | undefined }): React.ReactNode;\n};\n\nclass EnhancedWithCSS extends PureComponent<IEnhancedWithCSSProps> {\n static contextType = WithCssContext;\n\n static defaultProps = {\n css: {},\n };\n\n state = {\n dynamicClassName: '',\n };\n\n static getDerivedStateFromProps(props: any) {\n const cleanCss = normaliseCss(props.css);\n return {\n dynamicClassName: Object.keys(cleanCss).length ? CSSinJS().cache?.(cleanCss) : '',\n };\n }\n\n constructor(props: any, context: any) {\n super(props, context);\n\n initNanoCss(context);\n }\n\n render() {\n const { children, className = '' } = this.props;\n const { dynamicClassName } = this.state;\n return children({\n className: className + dynamicClassName || undefined,\n });\n }\n}\n\nexport { getStylesheet, EnhancedWithCSS, Provider, WithCssContext, initNanoCss, normaliseCss };\nexport default createHoc(EnhancedWithCSS);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAD,sBAAA,CAAAF,OAAA;AAGA,IAAMI,aAAa,GAAG,SAAhBA,aAAaA,CAAA;EAAA,OAAS,IAAAC,oBAAO,GAAE,CAACC,GAAG;AAAA;;AAEzC;AACA;AACA;AACA;AACA;AAJAC,OAAA,CAAAH,aAAA,GAAAA,aAAA;AAKA,SAASI,YAAYA,CAACC,GAAkB,EAAE;EACxC,OAAOC,MAAM,CAACC,IAAI,CAACF,GAAG,CAAC,CAACG,MAAM,CAAC,UAACC,GAAQ,EAAEC,GAAG,EAAK;IAChD,IAAMC,MAAM,GAAGF,GAAG;IAClB,IAAIJ,GAAG,CAACK,GAAG,CAAC,KAAKE,SAAS,EAAE;MAC1BD,MAAM,CAACD,GAAG,CAAC,GAAGL,GAAG,CAACK,GAAG,CAAC;IACxB;IACA,OAAOC,MAAM;EACf,CAAC,EAAE,CAAC,CAAC,CAAC;AACR;AAEA,IAAME,cAAc,gBAAGC,iBAAK,CAACC,aAAa,CAAc,CAAC,CAAC,CAAC;AAACZ,OAAA,CAAAU,cAAA,GAAAA,cAAA;AAC5D,IAAQG,QAAQ,GAAKH,cAAc,CAA3BG,QAAQ;AAAoBb,OAAA,CAAAa,QAAA,GAAAA,QAAA;AAEpC,SAASC,WAAWA,CAAA,EAA4B;EAAA,IAA3BC,OAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAP,SAAA,GAAAO,SAAA,MAAG,CAAC,CAAC;EAC5C,OAAO,IAAAlB,oBAAO,EAACiB,OAAO,CAAC;AACzB;;AAEA;AAAA,IASMG,eAAe,0BAAAC,cAAA;EAAA,IAAAC,UAAA,aAAAF,eAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,eAAA;EAkBnB,SAAAA,gBAAYK,KAAU,EAAEC,OAAY,EAAE;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,mBAAAR,eAAA;IACpCO,KAAA,GAAAJ,MAAA,CAAAM,IAAA,OAAMJ,KAAK,EAAEC,OAAO;IAAE,IAAAI,gBAAA,iBAAAC,uBAAA,aAAAJ,KAAA,YAZhB;MACNK,gBAAgB,EAAE;IACpB,CAAC;IAYChB,WAAW,CAACU,OAAO,CAAC;IAAC,OAAAC,KAAA;EACvB;EAAC,IAAAM,aAAA,aAAAb,eAAA;IAAAX,GAAA;IAAAyB,KAAA,EAED,SAAAC,OAAA,EAAS;MACP,IAAAC,WAAA,GAAqC,IAAI,CAACX,KAAK;QAAvCY,QAAQ,GAAAD,WAAA,CAARC,QAAQ;QAAAC,qBAAA,GAAAF,WAAA,CAAEG,SAAS;QAATA,SAAS,GAAAD,qBAAA,cAAG,EAAE,GAAAA,qBAAA;MAChC,IAAQN,gBAAgB,GAAK,IAAI,CAACQ,KAAK,CAA/BR,gBAAgB;MACxB,OAAOK,QAAQ,CAAC;QACdE,SAAS,EAAEA,SAAS,GAAGP,gBAAgB,IAAIrB;MAC7C,CAAC,CAAC;IACJ;EAAC;IAAAF,GAAA;IAAAyB,KAAA,EAnBD,SAAAO,yBAAgChB,KAAU,EAAE;MAAA,IAAAiB,cAAA,EAAAC,QAAA;MAC1C,IAAMC,QAAQ,GAAGzC,YAAY,CAACsB,KAAK,CAACoB,GAAG,CAAC;MACxC,OAAO;QACLb,gBAAgB,EAAE3B,MAAM,CAACC,IAAI,CAACsC,QAAQ,CAAC,CAACzB,MAAM,IAAAuB,cAAA,GAAG,CAAAC,QAAA,OAAA3C,oBAAO,GAAE,EAAC8C,KAAK,cAAAJ,cAAA,uBAAfA,cAAA,CAAAb,IAAA,CAAAc,QAAA,EAAkBC,QAAQ,CAAC,GAAG;MACjF,CAAC;IACH;EAAC;EAAA,OAAAxB,eAAA;AAAA,EAhB2B2B,oBAAa;AAAA7C,OAAA,CAAAkB,eAAA,GAAAA,eAAA;AAAA,IAAAU,gBAAA,aAArCV,eAAe,iBACER,cAAc;AAAA,IAAAkB,gBAAA,aAD/BV,eAAe,kBAGG;EACpByB,GAAG,EAAE,CAAC;AACR,CAAC;AAAA,IAAAG,QAAA,GA6BY,IAAAC,qBAAS,EAAC7B,eAAe,CAAC;AAAAlB,OAAA,cAAA8C,QAAA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
+
import React, { PureComponent } from 'react';
|
|
8
|
+
import createHoc from "../createHoc.mjs";
|
|
9
|
+
import CSSinJS from "../CSSinJS.mjs";
|
|
10
|
+
var getStylesheet = function getStylesheet() {
|
|
11
|
+
return CSSinJS().raw;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Function to clear the nano CSS styles object from keys with undefined value
|
|
16
|
+
* @param {Object} obj - nano CSS styles object
|
|
17
|
+
* @returns {Object}
|
|
18
|
+
*/
|
|
19
|
+
function normaliseCss(obj) {
|
|
20
|
+
return Object.keys(obj).reduce(function (acc, key) {
|
|
21
|
+
var result = acc;
|
|
22
|
+
if (obj[key] !== undefined) {
|
|
23
|
+
result[key] = obj[key];
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
}, {});
|
|
27
|
+
}
|
|
28
|
+
var WithCssContext = /*#__PURE__*/React.createContext({});
|
|
29
|
+
var Provider = WithCssContext.Provider;
|
|
30
|
+
function initNanoCss() {
|
|
31
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
32
|
+
return CSSinJS(options);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** @deprecated */
|
|
36
|
+
var EnhancedWithCSS = /*#__PURE__*/function (_PureComponent) {
|
|
37
|
+
_inherits(EnhancedWithCSS, _PureComponent);
|
|
38
|
+
var _super = _createSuper(EnhancedWithCSS);
|
|
39
|
+
function EnhancedWithCSS(props, context) {
|
|
40
|
+
var _this;
|
|
41
|
+
_classCallCheck(this, EnhancedWithCSS);
|
|
42
|
+
_this = _super.call(this, props, context);
|
|
43
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
44
|
+
dynamicClassName: ''
|
|
45
|
+
});
|
|
46
|
+
initNanoCss(context);
|
|
47
|
+
return _this;
|
|
48
|
+
}
|
|
49
|
+
_createClass(EnhancedWithCSS, [{
|
|
50
|
+
key: "render",
|
|
51
|
+
value: function render() {
|
|
52
|
+
var _this$props = this.props,
|
|
53
|
+
children = _this$props.children,
|
|
54
|
+
_this$props$className = _this$props.className,
|
|
55
|
+
className = _this$props$className === void 0 ? '' : _this$props$className;
|
|
56
|
+
var dynamicClassName = this.state.dynamicClassName;
|
|
57
|
+
return children({
|
|
58
|
+
className: className + dynamicClassName || undefined
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}], [{
|
|
62
|
+
key: "getDerivedStateFromProps",
|
|
63
|
+
value: function getDerivedStateFromProps(props) {
|
|
64
|
+
var _CSSinJS$cache, _CSSinJS;
|
|
65
|
+
var cleanCss = normaliseCss(props.css);
|
|
66
|
+
return {
|
|
67
|
+
dynamicClassName: Object.keys(cleanCss).length ? (_CSSinJS$cache = (_CSSinJS = CSSinJS()).cache) === null || _CSSinJS$cache === void 0 ? void 0 : _CSSinJS$cache.call(_CSSinJS, cleanCss) : ''
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}]);
|
|
71
|
+
return EnhancedWithCSS;
|
|
72
|
+
}(PureComponent);
|
|
73
|
+
_defineProperty(EnhancedWithCSS, "contextType", WithCssContext);
|
|
74
|
+
_defineProperty(EnhancedWithCSS, "defaultProps", {
|
|
75
|
+
css: {}
|
|
76
|
+
});
|
|
77
|
+
export { getStylesheet, EnhancedWithCSS, Provider, WithCssContext, initNanoCss, normaliseCss };
|
|
78
|
+
export default createHoc(EnhancedWithCSS);
|
|
79
|
+
//# sourceMappingURL=WithCSS.mjs.map
|