@semcore/core 16.0.0-prerelease.2 → 16.0.0-prerelease.21
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 +23 -1
- package/lib/LastInteractionType.d.ts +1 -1
- package/lib/LastInteractionType.js.map +1 -0
- package/lib/LastInteractionType.mjs +51 -0
- package/lib/LastInteractionType.mjs.map +1 -0
- package/lib/{types/core-types → core-types}/Component.d.ts +2 -2
- package/lib/core-types/Component.js.map +1 -1
- package/lib/core-types/Component.mjs +28 -31
- package/lib/core-types/Component.mjs.map +1 -1
- package/lib/core-types/UnknownProperties.mjs +0 -1
- package/lib/core-types/symbols.mjs +20 -10
- package/lib/coreFactory.js.map +1 -0
- package/lib/coreFactory.mjs +324 -0
- package/lib/coreFactory.mjs.map +1 -0
- package/lib/enhancement/Children.mjs +35 -50
- package/lib/enhancement/Root.mjs +21 -35
- package/lib/enhancement/bindHandler.mjs +10 -9
- package/lib/enhancement/dataName.mjs +5 -4
- package/lib/enhancement/enhance.mjs +4 -3
- package/lib/enhancement/functionDefaultProps.mjs +5 -5
- package/lib/enhancement/hoistProps.mjs +22 -32
- package/lib/enhancement/i18n.mjs +8 -8
- package/lib/enhancement/inheritedName.mjs +5 -4
- package/lib/enhancement/staticChildren.mjs +35 -38
- package/lib/enhancement/style.mjs +15 -17
- package/lib/enhancement/uncontrolledProps.mjs +28 -44
- package/lib/esm/LastInteractionType.mjs +51 -0
- package/lib/esm/core-types/Component.mjs +51 -0
- package/lib/esm/core-types/symbols.mjs +20 -0
- package/lib/esm/coreFactory.mjs +324 -0
- package/lib/esm/enhancement/Children.mjs +96 -0
- package/lib/esm/enhancement/Root.mjs +56 -0
- package/lib/{es6/enhancement/bindHandler.js → esm/enhancement/bindHandler.mjs} +10 -9
- package/lib/esm/enhancement/dataName.mjs +13 -0
- package/lib/{es6/enhancement/enhance.js → esm/enhancement/enhance.mjs} +4 -3
- package/lib/{es6/enhancement/functionDefaultProps.js → esm/enhancement/functionDefaultProps.mjs} +5 -5
- package/lib/{es6/enhancement/hoistProps.js → esm/enhancement/hoistProps.mjs} +25 -35
- package/lib/esm/enhancement/i18n.mjs +20 -0
- package/lib/{es6/enhancement/inheritedName.js → esm/enhancement/inheritedName.mjs} +6 -5
- package/lib/{es6/enhancement/staticChildren.js → esm/enhancement/staticChildren.mjs} +38 -41
- package/lib/{es6/enhancement/style.js → esm/enhancement/style.mjs} +16 -18
- package/lib/{es6/enhancement/uncontrolledProps.js → esm/enhancement/uncontrolledProps.mjs} +30 -46
- package/lib/esm/index.mjs +24 -0
- package/lib/esm/register.mjs +31 -0
- package/lib/esm/styled/index.mjs +8 -0
- package/lib/esm/styled/reshadow-core.mjs +234 -0
- package/lib/esm/styled/sstyled.mjs +121 -0
- package/lib/{es6/utils/assignProps.js → esm/utils/assignProps.mjs} +32 -30
- package/lib/esm/utils/canUseDOM.mjs +6 -0
- package/lib/esm/utils/capitalizeFirstLetter.mjs +6 -0
- package/lib/esm/utils/createHoc.mjs +44 -0
- package/lib/esm/utils/enhances/WithI18n.mjs +78 -0
- package/lib/esm/utils/enhances/i18nEnhance.mjs +91 -0
- package/lib/esm/utils/getDisplayName.mjs +6 -0
- package/lib/esm/utils/logger.mjs +35 -0
- package/lib/{es6/utils/pick.js → esm/utils/pick.mjs} +4 -2
- package/lib/esm/utils/ref.mjs +87 -0
- package/lib/esm/utils/use/useEnhancedEffect.mjs +6 -0
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +24 -0
- package/lib/index.mjs.map +1 -0
- package/lib/register.mjs +13 -11
- package/lib/styled/index.mjs +8 -6
- package/lib/styled/reshadow-core.mjs +92 -101
- package/lib/styled/reshadow-core.mjs.map +1 -1
- package/lib/styled/sstyled.mjs +40 -61
- package/lib/theme/dark.json +2 -2
- package/lib/theme/light.json +3 -3
- package/lib/theme/processor.mjs +4 -4
- package/lib/theme/themes/auto.css +5 -5
- package/lib/theme/themes/dark.css +2 -2
- package/lib/{types/theme → theme}/themes/dark.d.ts +1 -1
- package/lib/theme/themes/dark.js +1 -1
- package/lib/theme/themes/dark.js.map +1 -1
- package/lib/theme/themes/dark.mjs +1 -1
- package/lib/theme/themes/dark.mjs.map +1 -1
- package/lib/theme/themes/default.css +3 -3
- package/lib/theme/themes/default.d.ts +1 -1
- package/lib/theme/themes/default.js +2 -2
- package/lib/theme/themes/default.js.map +1 -1
- package/lib/theme/themes/default.mjs +2 -2
- package/lib/theme/themes/default.mjs.map +1 -1
- package/lib/theme/themes/light.css +3 -3
- package/lib/{types/theme → theme}/themes/light.d.ts +1 -1
- package/lib/theme/themes/light.js +2 -2
- package/lib/theme/themes/light.js.map +1 -1
- package/lib/theme/themes/light.mjs +2 -2
- package/lib/theme/themes/light.mjs.map +1 -1
- package/lib/theme/utils.mjs +9 -9
- package/lib/theme/utils.mjs.map +1 -1
- package/lib/utils/CSSinJS.mjs +1 -1
- package/lib/utils/ScreenReaderOnly.mjs +1 -1
- package/lib/utils/ThemeProvider.mjs +4 -4
- package/lib/utils/addonText.d.ts +1 -1
- package/lib/utils/addonTextChildren.mjs +1 -1
- package/lib/utils/assignProps.mjs +35 -33
- package/lib/utils/canUseDOM.mjs +5 -3
- package/lib/utils/capitalizeFirstLetter.mjs +4 -2
- package/lib/utils/color.mjs +2 -2
- package/lib/utils/createHoc.mjs +27 -29
- package/lib/utils/enhances/WithAutoFocus.mjs +6 -6
- package/lib/utils/enhances/WithCSS.mjs +6 -6
- package/lib/utils/enhances/WithI18n.mjs +38 -43
- package/lib/utils/enhances/WithKeyboardFocus.mjs +6 -6
- package/lib/utils/enhances/WithRef.mjs +1 -1
- package/lib/utils/enhances/a11yEnhance.mjs +2 -2
- package/lib/utils/enhances/animatedSizeEnhance.mjs +15 -15
- package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -1
- package/lib/utils/enhances/autoFocusEnhance.mjs +2 -2
- package/lib/utils/enhances/contextEnhance.mjs +4 -4
- package/lib/utils/enhances/i18nEnhance.mjs +39 -40
- package/lib/utils/enhances/keyboardFocusEnhance.mjs +1 -1
- package/lib/utils/eventEmitter.mjs +3 -3
- package/lib/utils/findComponent.d.ts +2 -2
- package/lib/utils/findComponent.js.map +1 -1
- package/lib/utils/findComponent.mjs.map +1 -1
- package/lib/utils/focus-lock/isFocusable.mjs +1 -1
- package/lib/utils/getAccessibleName.mjs +1 -1
- package/lib/utils/getDisplayName.mjs +5 -3
- package/lib/utils/getEventTarget.mjs +1 -1
- package/lib/utils/hasLabels.mjs +1 -1
- package/lib/utils/injectStyle.mjs +1 -1
- package/lib/utils/isInteractiveElement.d.ts +1 -0
- package/lib/utils/isInteractiveElement.js +34 -0
- package/lib/utils/isInteractiveElement.js.map +1 -0
- package/lib/utils/isInteractiveElement.mjs +28 -0
- package/lib/utils/isInteractiveElement.mjs.map +1 -0
- package/lib/utils/isNode.mjs +1 -1
- package/lib/utils/logger.mjs +19 -16
- package/lib/utils/pick.mjs +4 -2
- package/lib/utils/propsForElement.mjs +1 -1
- package/lib/utils/ref.d.ts +4 -2
- package/lib/utils/ref.js +2 -1
- package/lib/utils/ref.js.map +1 -1
- package/lib/utils/ref.mjs +50 -46
- package/lib/utils/ref.mjs.map +1 -1
- package/lib/utils/syncScroll.mjs +1 -1
- package/lib/utils/uncontroll.mjs +1 -1
- package/lib/utils/uniqueID.mjs +2 -2
- package/lib/utils/use/useEnhancedEffect.mjs +4 -3
- package/lib/utils/use/useEventListener.js +1 -1
- package/lib/utils/use/useEventListener.js.map +1 -1
- package/lib/utils/use/useEventListener.mjs +1 -1
- package/lib/utils/use/useEventListener.mjs.map +1 -1
- package/lib/utils/use/useFocusLock.mjs +2 -2
- package/lib/utils/useCssVariable.mjs +3 -3
- package/lib/utils/zIndexStacking.mjs +3 -3
- package/package.json +44 -20
- package/vite.config.ts +24 -0
- package/lib/cjs/LastInteractionType.js.map +0 -1
- package/lib/cjs/core-types/Component.js +0 -59
- package/lib/cjs/core-types/Component.js.map +0 -1
- package/lib/cjs/core-types/UnknownProperties.js +0 -2
- package/lib/cjs/core-types/UnknownProperties.js.map +0 -1
- package/lib/cjs/core-types/reshadow.d.js +0 -2
- package/lib/cjs/core-types/reshadow.d.js.map +0 -1
- package/lib/cjs/core-types/symbols.js +0 -25
- package/lib/cjs/core-types/symbols.js.map +0 -1
- package/lib/cjs/coreFactory.js.map +0 -1
- package/lib/cjs/enhancement/Children.js +0 -119
- package/lib/cjs/enhancement/Children.js.map +0 -1
- package/lib/cjs/enhancement/Root.js +0 -78
- package/lib/cjs/enhancement/Root.js.map +0 -1
- package/lib/cjs/enhancement/bindHandler.js +0 -54
- package/lib/cjs/enhancement/bindHandler.js.map +0 -1
- package/lib/cjs/enhancement/dataName.js +0 -20
- package/lib/cjs/enhancement/dataName.js.map +0 -1
- package/lib/cjs/enhancement/enhance.js +0 -22
- package/lib/cjs/enhancement/enhance.js.map +0 -1
- package/lib/cjs/enhancement/functionDefaultProps.js +0 -36
- package/lib/cjs/enhancement/functionDefaultProps.js.map +0 -1
- package/lib/cjs/enhancement/hoistProps.js +0 -97
- package/lib/cjs/enhancement/hoistProps.js.map +0 -1
- package/lib/cjs/enhancement/i18n.js +0 -28
- package/lib/cjs/enhancement/i18n.js.map +0 -1
- package/lib/cjs/enhancement/inheritedName.js +0 -23
- package/lib/cjs/enhancement/inheritedName.js.map +0 -1
- package/lib/cjs/enhancement/staticChildren.js +0 -135
- package/lib/cjs/enhancement/staticChildren.js.map +0 -1
- package/lib/cjs/enhancement/style.js +0 -60
- package/lib/cjs/enhancement/style.js.map +0 -1
- package/lib/cjs/enhancement/uncontrolledProps.js +0 -131
- package/lib/cjs/enhancement/uncontrolledProps.js.map +0 -1
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/register.js +0 -37
- package/lib/cjs/register.js.map +0 -1
- package/lib/cjs/styled/index.js +0 -32
- package/lib/cjs/styled/index.js.map +0 -1
- package/lib/cjs/styled/reshadow-core.js +0 -256
- package/lib/cjs/styled/reshadow-core.js.map +0 -1
- package/lib/cjs/styled/sstyled.js +0 -149
- package/lib/cjs/styled/sstyled.js.map +0 -1
- package/lib/cjs/theme/dark.json +0 -2506
- package/lib/cjs/theme/exclude-tokens.json +0 -10
- package/lib/cjs/theme/light.json +0 -2584
- package/lib/cjs/theme/processor.js +0 -315
- package/lib/cjs/theme/processor.js.map +0 -1
- package/lib/cjs/theme/themes/auto.css +0 -1465
- package/lib/cjs/theme/themes/dark.css +0 -723
- package/lib/cjs/theme/themes/dark.js +0 -385
- package/lib/cjs/theme/themes/dark.js.map +0 -1
- package/lib/cjs/theme/themes/default.css +0 -742
- package/lib/cjs/theme/themes/default.js +0 -394
- package/lib/cjs/theme/themes/default.js.map +0 -1
- package/lib/cjs/theme/themes/light.css +0 -742
- package/lib/cjs/theme/themes/light.js +0 -394
- package/lib/cjs/theme/themes/light.js.map +0 -1
- package/lib/cjs/theme/utils.js +0 -297
- package/lib/cjs/theme/utils.js.map +0 -1
- package/lib/cjs/utils/CSSinJS.js +0 -36
- package/lib/cjs/utils/CSSinJS.js.map +0 -1
- package/lib/cjs/utils/ScreenReaderOnly.js +0 -31
- package/lib/cjs/utils/ScreenReaderOnly.js.map +0 -1
- package/lib/cjs/utils/ThemeProvider.js +0 -82
- package/lib/cjs/utils/ThemeProvider.js.map +0 -1
- package/lib/cjs/utils/addonText.js +0 -18
- package/lib/cjs/utils/addonText.js.map +0 -1
- package/lib/cjs/utils/addonTextChildren.js +0 -45
- package/lib/cjs/utils/addonTextChildren.js.map +0 -1
- package/lib/cjs/utils/ariaProps.js +0 -22
- package/lib/cjs/utils/ariaProps.js.map +0 -1
- package/lib/cjs/utils/assignProps.js +0 -93
- package/lib/cjs/utils/assignProps.js.map +0 -1
- package/lib/cjs/utils/canUseDOM.js +0 -10
- package/lib/cjs/utils/canUseDOM.js.map +0 -1
- package/lib/cjs/utils/capitalizeFirstLetter.js +0 -10
- package/lib/cjs/utils/capitalizeFirstLetter.js.map +0 -1
- package/lib/cjs/utils/color.js +0 -208
- package/lib/cjs/utils/color.js.map +0 -1
- package/lib/cjs/utils/compose.js +0 -21
- package/lib/cjs/utils/compose.js.map +0 -1
- package/lib/cjs/utils/createHoc.js +0 -55
- package/lib/cjs/utils/createHoc.js.map +0 -1
- package/lib/cjs/utils/createUUID.js +0 -15
- package/lib/cjs/utils/createUUID.js.map +0 -1
- package/lib/cjs/utils/cssToIntDefault.js +0 -22
- package/lib/cjs/utils/cssToIntDefault.js.map +0 -1
- package/lib/cjs/utils/enhances/WithAutoFocus.js +0 -75
- package/lib/cjs/utils/enhances/WithAutoFocus.js.map +0 -1
- package/lib/cjs/utils/enhances/WithCSS.js +0 -93
- package/lib/cjs/utils/enhances/WithCSS.js.map +0 -1
- package/lib/cjs/utils/enhances/WithI18n.js +0 -95
- package/lib/cjs/utils/enhances/WithI18n.js.map +0 -1
- package/lib/cjs/utils/enhances/WithKeyboardFocus.js +0 -93
- package/lib/cjs/utils/enhances/WithKeyboardFocus.js.map +0 -1
- package/lib/cjs/utils/enhances/WithRef.js +0 -26
- package/lib/cjs/utils/enhances/WithRef.js.map +0 -1
- package/lib/cjs/utils/enhances/a11yEnhance.js +0 -74
- package/lib/cjs/utils/enhances/a11yEnhance.js.map +0 -1
- package/lib/cjs/utils/enhances/animatedSizeEnhance.js +0 -98
- package/lib/cjs/utils/enhances/animatedSizeEnhance.js.map +0 -1
- package/lib/cjs/utils/enhances/autoFocusEnhance.js +0 -46
- package/lib/cjs/utils/enhances/autoFocusEnhance.js.map +0 -1
- package/lib/cjs/utils/enhances/contextEnhance.js +0 -22
- package/lib/cjs/utils/enhances/contextEnhance.js.map +0 -1
- package/lib/cjs/utils/enhances/i18nEnhance.js +0 -101
- package/lib/cjs/utils/enhances/i18nEnhance.js.map +0 -1
- package/lib/cjs/utils/enhances/keyboardFocusEnhance.js +0 -63
- package/lib/cjs/utils/enhances/keyboardFocusEnhance.js.map +0 -1
- package/lib/cjs/utils/enhances/resolveColorEnhance.js +0 -25
- package/lib/cjs/utils/enhances/resolveColorEnhance.js.map +0 -1
- package/lib/cjs/utils/eventEmitter.js +0 -41
- package/lib/cjs/utils/eventEmitter.js.map +0 -1
- package/lib/cjs/utils/findComponent.js +0 -106
- package/lib/cjs/utils/findComponent.js.map +0 -1
- package/lib/cjs/utils/fire.js +0 -23
- package/lib/cjs/utils/fire.js.map +0 -1
- package/lib/cjs/utils/focus-lock/focusBorders.js +0 -72
- package/lib/cjs/utils/focus-lock/focusBorders.js.map +0 -1
- package/lib/cjs/utils/focus-lock/getFocusableIn.js +0 -26
- package/lib/cjs/utils/focus-lock/getFocusableIn.js.map +0 -1
- package/lib/cjs/utils/focus-lock/isFocusInside.js +0 -16
- package/lib/cjs/utils/focus-lock/isFocusInside.js.map +0 -1
- package/lib/cjs/utils/focus-lock/isFocusable.js +0 -51
- package/lib/cjs/utils/focus-lock/isFocusable.js.map +0 -1
- package/lib/cjs/utils/focus-lock/setFocus.js +0 -63
- package/lib/cjs/utils/focus-lock/setFocus.js.map +0 -1
- package/lib/cjs/utils/getAccessibleName.js +0 -56
- package/lib/cjs/utils/getAccessibleName.js.map +0 -1
- package/lib/cjs/utils/getDisplayName.js +0 -10
- package/lib/cjs/utils/getDisplayName.js.map +0 -1
- package/lib/cjs/utils/getEventTarget.js +0 -53
- package/lib/cjs/utils/getEventTarget.js.map +0 -1
- package/lib/cjs/utils/getOriginChildren.js +0 -18
- package/lib/cjs/utils/getOriginChildren.js.map +0 -1
- package/lib/cjs/utils/getRandomInt.js +0 -11
- package/lib/cjs/utils/getRandomInt.js.map +0 -1
- package/lib/cjs/utils/getValue.js +0 -16
- package/lib/cjs/utils/getValue.js.map +0 -1
- package/lib/cjs/utils/hasLabels.js +0 -47
- package/lib/cjs/utils/hasLabels.js.map +0 -1
- package/lib/cjs/utils/hasParent.js +0 -14
- package/lib/cjs/utils/hasParent.js.map +0 -1
- package/lib/cjs/utils/if.js +0 -16
- package/lib/cjs/utils/if.js.map +0 -1
- package/lib/cjs/utils/ifChildren.js +0 -17
- package/lib/cjs/utils/ifChildren.js.map +0 -1
- package/lib/cjs/utils/injectStyle.js +0 -49
- package/lib/cjs/utils/injectStyle.js.map +0 -1
- package/lib/cjs/utils/inputProps.js +0 -22
- package/lib/cjs/utils/inputProps.js.map +0 -1
- package/lib/cjs/utils/isNode.js +0 -28
- package/lib/cjs/utils/isNode.js.map +0 -1
- package/lib/cjs/utils/isPromise.js +0 -10
- package/lib/cjs/utils/isPromise.js.map +0 -1
- package/lib/cjs/utils/isRetina.js +0 -15
- package/lib/cjs/utils/isRetina.js.map +0 -1
- package/lib/cjs/utils/logger.js +0 -40
- package/lib/cjs/utils/logger.js.map +0 -1
- package/lib/cjs/utils/numericChecker.js +0 -33
- package/lib/cjs/utils/numericChecker.js.map +0 -1
- package/lib/cjs/utils/ownerDocument.js +0 -10
- package/lib/cjs/utils/ownerDocument.js.map +0 -1
- package/lib/cjs/utils/pick.js +0 -19
- package/lib/cjs/utils/pick.js.map +0 -1
- package/lib/cjs/utils/propsForElement.js +0 -59
- package/lib/cjs/utils/propsForElement.js.map +0 -1
- package/lib/cjs/utils/rafTrottle.js +0 -33
- package/lib/cjs/utils/rafTrottle.js.map +0 -1
- package/lib/cjs/utils/reactToText.js +0 -33
- package/lib/cjs/utils/reactToText.js.map +0 -1
- package/lib/cjs/utils/ref.js +0 -95
- package/lib/cjs/utils/ref.js.map +0 -1
- package/lib/cjs/utils/setRef.js +0 -10
- package/lib/cjs/utils/setRef.js.map +0 -1
- package/lib/cjs/utils/syncScroll.js +0 -61
- package/lib/cjs/utils/syncScroll.js.map +0 -1
- package/lib/cjs/utils/uncontroll.js +0 -47
- package/lib/cjs/utils/uncontroll.js.map +0 -1
- package/lib/cjs/utils/uniqueID.js +0 -42
- package/lib/cjs/utils/uniqueID.js.map +0 -1
- package/lib/cjs/utils/use/useColorResolver.js +0 -208
- package/lib/cjs/utils/use/useColorResolver.js.map +0 -1
- package/lib/cjs/utils/use/useCss.js +0 -20
- package/lib/cjs/utils/use/useCss.js.map +0 -1
- package/lib/cjs/utils/use/useEnhancedEffect.js +0 -13
- package/lib/cjs/utils/use/useEnhancedEffect.js.map +0 -1
- package/lib/cjs/utils/use/useEventCallback.js +0 -25
- package/lib/cjs/utils/use/useEventCallback.js.map +0 -1
- package/lib/cjs/utils/use/useEventListener.js +0 -33
- package/lib/cjs/utils/use/useEventListener.js.map +0 -1
- package/lib/cjs/utils/use/useFocusLock.js +0 -289
- package/lib/cjs/utils/use/useFocusLock.js.map +0 -1
- package/lib/cjs/utils/use/usePreventScroll.js +0 -78
- package/lib/cjs/utils/use/usePreventScroll.js.map +0 -1
- package/lib/cjs/utils/useCssVariable.js +0 -55
- package/lib/cjs/utils/useCssVariable.js.map +0 -1
- package/lib/cjs/utils/zIndexStacking.js +0 -48
- package/lib/cjs/utils/zIndexStacking.js.map +0 -1
- package/lib/es6/LastInteractionType.js +0 -49
- package/lib/es6/LastInteractionType.js.map +0 -1
- package/lib/es6/core-types/Component.js +0 -54
- package/lib/es6/core-types/Component.js.map +0 -1
- package/lib/es6/core-types/UnknownProperties.js +0 -2
- package/lib/es6/core-types/UnknownProperties.js.map +0 -1
- package/lib/es6/core-types/reshadow.d.js +0 -2
- package/lib/es6/core-types/reshadow.d.js.map +0 -1
- package/lib/es6/core-types/symbols.js +0 -10
- package/lib/es6/core-types/symbols.js.map +0 -1
- package/lib/es6/coreFactory.js +0 -343
- package/lib/es6/coreFactory.js.map +0 -1
- package/lib/es6/enhancement/Children.js +0 -111
- package/lib/es6/enhancement/Children.js.map +0 -1
- package/lib/es6/enhancement/Root.js +0 -70
- package/lib/es6/enhancement/Root.js.map +0 -1
- package/lib/es6/enhancement/bindHandler.js.map +0 -1
- package/lib/es6/enhancement/dataName.js +0 -12
- package/lib/es6/enhancement/dataName.js.map +0 -1
- package/lib/es6/enhancement/enhance.js.map +0 -1
- package/lib/es6/enhancement/functionDefaultProps.js.map +0 -1
- package/lib/es6/enhancement/hoistProps.js.map +0 -1
- package/lib/es6/enhancement/i18n.js +0 -20
- package/lib/es6/enhancement/i18n.js.map +0 -1
- package/lib/es6/enhancement/inheritedName.js.map +0 -1
- package/lib/es6/enhancement/staticChildren.js.map +0 -1
- package/lib/es6/enhancement/style.js.map +0 -1
- package/lib/es6/enhancement/uncontrolledProps.js.map +0 -1
- package/lib/es6/index.js +0 -9
- package/lib/es6/index.js.map +0 -1
- package/lib/es6/register.js +0 -29
- package/lib/es6/register.js.map +0 -1
- package/lib/es6/styled/index.js +0 -6
- package/lib/es6/styled/index.js.map +0 -1
- package/lib/es6/styled/reshadow-core.js +0 -243
- package/lib/es6/styled/reshadow-core.js.map +0 -1
- package/lib/es6/styled/sstyled.js +0 -142
- package/lib/es6/styled/sstyled.js.map +0 -1
- package/lib/es6/theme/dark.json +0 -2506
- package/lib/es6/theme/exclude-tokens.json +0 -10
- package/lib/es6/theme/light.json +0 -2584
- package/lib/es6/theme/processor.js +0 -307
- package/lib/es6/theme/processor.js.map +0 -1
- package/lib/es6/theme/themes/auto.css +0 -1465
- package/lib/es6/theme/themes/dark.css +0 -723
- package/lib/es6/theme/themes/dark.js +0 -378
- package/lib/es6/theme/themes/dark.js.map +0 -1
- package/lib/es6/theme/themes/default.css +0 -742
- package/lib/es6/theme/themes/default.js +0 -387
- package/lib/es6/theme/themes/default.js.map +0 -1
- package/lib/es6/theme/themes/light.css +0 -742
- package/lib/es6/theme/themes/light.js +0 -387
- package/lib/es6/theme/themes/light.js.map +0 -1
- package/lib/es6/theme/utils.js +0 -286
- package/lib/es6/theme/utils.js.map +0 -1
- package/lib/es6/utils/CSSinJS.js +0 -28
- package/lib/es6/utils/CSSinJS.js.map +0 -1
- package/lib/es6/utils/ScreenReaderOnly.js +0 -24
- package/lib/es6/utils/ScreenReaderOnly.js.map +0 -1
- package/lib/es6/utils/ThemeProvider.js +0 -71
- package/lib/es6/utils/ThemeProvider.js.map +0 -1
- package/lib/es6/utils/addonText.js +0 -11
- package/lib/es6/utils/addonText.js.map +0 -1
- package/lib/es6/utils/addonTextChildren.js +0 -37
- package/lib/es6/utils/addonTextChildren.js.map +0 -1
- package/lib/es6/utils/ariaProps.js +0 -16
- package/lib/es6/utils/ariaProps.js.map +0 -1
- package/lib/es6/utils/assignProps.js.map +0 -1
- package/lib/es6/utils/canUseDOM.js +0 -4
- package/lib/es6/utils/canUseDOM.js.map +0 -1
- package/lib/es6/utils/capitalizeFirstLetter.js +0 -4
- package/lib/es6/utils/capitalizeFirstLetter.js.map +0 -1
- package/lib/es6/utils/color.js +0 -196
- package/lib/es6/utils/color.js.map +0 -1
- package/lib/es6/utils/compose.js +0 -15
- package/lib/es6/utils/compose.js.map +0 -1
- package/lib/es6/utils/createHoc.js +0 -46
- package/lib/es6/utils/createHoc.js.map +0 -1
- package/lib/es6/utils/createUUID.js +0 -9
- package/lib/es6/utils/createUUID.js.map +0 -1
- package/lib/es6/utils/cssToIntDefault.js +0 -16
- package/lib/es6/utils/cssToIntDefault.js.map +0 -1
- package/lib/es6/utils/enhances/WithAutoFocus.js +0 -67
- package/lib/es6/utils/enhances/WithAutoFocus.js.map +0 -1
- package/lib/es6/utils/enhances/WithCSS.js +0 -79
- package/lib/es6/utils/enhances/WithCSS.js.map +0 -1
- package/lib/es6/utils/enhances/WithI18n.js +0 -83
- package/lib/es6/utils/enhances/WithI18n.js.map +0 -1
- package/lib/es6/utils/enhances/WithKeyboardFocus.js +0 -84
- package/lib/es6/utils/enhances/WithKeyboardFocus.js.map +0 -1
- package/lib/es6/utils/enhances/WithRef.js +0 -18
- package/lib/es6/utils/enhances/WithRef.js.map +0 -1
- package/lib/es6/utils/enhances/a11yEnhance.js +0 -66
- package/lib/es6/utils/enhances/a11yEnhance.js.map +0 -1
- package/lib/es6/utils/enhances/animatedSizeEnhance.js +0 -90
- package/lib/es6/utils/enhances/animatedSizeEnhance.js.map +0 -1
- package/lib/es6/utils/enhances/autoFocusEnhance.js +0 -38
- package/lib/es6/utils/enhances/autoFocusEnhance.js.map +0 -1
- package/lib/es6/utils/enhances/contextEnhance.js +0 -14
- package/lib/es6/utils/enhances/contextEnhance.js.map +0 -1
- package/lib/es6/utils/enhances/i18nEnhance.js +0 -92
- package/lib/es6/utils/enhances/i18nEnhance.js.map +0 -1
- package/lib/es6/utils/enhances/keyboardFocusEnhance.js +0 -57
- package/lib/es6/utils/enhances/keyboardFocusEnhance.js.map +0 -1
- package/lib/es6/utils/enhances/resolveColorEnhance.js +0 -17
- package/lib/es6/utils/enhances/resolveColorEnhance.js.map +0 -1
- package/lib/es6/utils/eventEmitter.js +0 -34
- package/lib/es6/utils/eventEmitter.js.map +0 -1
- package/lib/es6/utils/findComponent.js +0 -95
- package/lib/es6/utils/findComponent.js.map +0 -1
- package/lib/es6/utils/fire.js +0 -15
- package/lib/es6/utils/fire.js.map +0 -1
- package/lib/es6/utils/focus-lock/focusBorders.js +0 -62
- package/lib/es6/utils/focus-lock/focusBorders.js.map +0 -1
- package/lib/es6/utils/focus-lock/getFocusableIn.js +0 -19
- package/lib/es6/utils/focus-lock/getFocusableIn.js.map +0 -1
- package/lib/es6/utils/focus-lock/isFocusInside.js +0 -9
- package/lib/es6/utils/focus-lock/isFocusInside.js.map +0 -1
- package/lib/es6/utils/focus-lock/isFocusable.js +0 -43
- package/lib/es6/utils/focus-lock/isFocusable.js.map +0 -1
- package/lib/es6/utils/focus-lock/setFocus.js +0 -55
- package/lib/es6/utils/focus-lock/setFocus.js.map +0 -1
- package/lib/es6/utils/getAccessibleName.js +0 -49
- package/lib/es6/utils/getAccessibleName.js.map +0 -1
- package/lib/es6/utils/getDisplayName.js +0 -4
- package/lib/es6/utils/getDisplayName.js.map +0 -1
- package/lib/es6/utils/getEventTarget.js +0 -45
- package/lib/es6/utils/getEventTarget.js.map +0 -1
- package/lib/es6/utils/getOriginChildren.js +0 -10
- package/lib/es6/utils/getOriginChildren.js.map +0 -1
- package/lib/es6/utils/getRandomInt.js +0 -5
- package/lib/es6/utils/getRandomInt.js.map +0 -1
- package/lib/es6/utils/getValue.js +0 -10
- package/lib/es6/utils/getValue.js.map +0 -1
- package/lib/es6/utils/hasLabels.js +0 -39
- package/lib/es6/utils/hasLabels.js.map +0 -1
- package/lib/es6/utils/hasParent.js +0 -7
- package/lib/es6/utils/hasParent.js.map +0 -1
- package/lib/es6/utils/if.js +0 -9
- package/lib/es6/utils/if.js.map +0 -1
- package/lib/es6/utils/ifChildren.js +0 -10
- package/lib/es6/utils/ifChildren.js.map +0 -1
- package/lib/es6/utils/injectStyle.js +0 -41
- package/lib/es6/utils/injectStyle.js.map +0 -1
- package/lib/es6/utils/inputProps.js +0 -14
- package/lib/es6/utils/inputProps.js.map +0 -1
- package/lib/es6/utils/isNode.js +0 -21
- package/lib/es6/utils/isNode.js.map +0 -1
- package/lib/es6/utils/isPromise.js +0 -4
- package/lib/es6/utils/isPromise.js.map +0 -1
- package/lib/es6/utils/isRetina.js +0 -9
- package/lib/es6/utils/isRetina.js.map +0 -1
- package/lib/es6/utils/logger.js +0 -32
- package/lib/es6/utils/logger.js.map +0 -1
- package/lib/es6/utils/numericChecker.js +0 -27
- package/lib/es6/utils/numericChecker.js.map +0 -1
- package/lib/es6/utils/ownerDocument.js +0 -4
- package/lib/es6/utils/ownerDocument.js.map +0 -1
- package/lib/es6/utils/pick.js.map +0 -1
- package/lib/es6/utils/propsForElement.js +0 -50
- package/lib/es6/utils/propsForElement.js.map +0 -1
- package/lib/es6/utils/rafTrottle.js +0 -26
- package/lib/es6/utils/rafTrottle.js.map +0 -1
- package/lib/es6/utils/reactToText.js +0 -26
- package/lib/es6/utils/reactToText.js.map +0 -1
- package/lib/es6/utils/ref.js +0 -83
- package/lib/es6/utils/ref.js.map +0 -1
- package/lib/es6/utils/setRef.js +0 -3
- package/lib/es6/utils/setRef.js.map +0 -1
- package/lib/es6/utils/syncScroll.js +0 -54
- package/lib/es6/utils/syncScroll.js.map +0 -1
- package/lib/es6/utils/uncontroll.js +0 -38
- package/lib/es6/utils/uncontroll.js.map +0 -1
- package/lib/es6/utils/uniqueID.js +0 -33
- package/lib/es6/utils/uniqueID.js.map +0 -1
- package/lib/es6/utils/use/useColorResolver.js +0 -200
- package/lib/es6/utils/use/useColorResolver.js.map +0 -1
- package/lib/es6/utils/use/useCss.js +0 -12
- package/lib/es6/utils/use/useCss.js.map +0 -1
- package/lib/es6/utils/use/useEnhancedEffect.js +0 -5
- package/lib/es6/utils/use/useEnhancedEffect.js.map +0 -1
- package/lib/es6/utils/use/useEventCallback.js +0 -19
- package/lib/es6/utils/use/useEventCallback.js.map +0 -1
- package/lib/es6/utils/use/useEventListener.js +0 -25
- package/lib/es6/utils/use/useEventListener.js.map +0 -1
- package/lib/es6/utils/use/useFocusLock.js +0 -266
- package/lib/es6/utils/use/useFocusLock.js.map +0 -1
- package/lib/es6/utils/use/usePreventScroll.js +0 -70
- package/lib/es6/utils/use/usePreventScroll.js.map +0 -1
- package/lib/es6/utils/useCssVariable.js +0 -46
- package/lib/es6/utils/useCssVariable.js.map +0 -1
- package/lib/es6/utils/zIndexStacking.js +0 -38
- package/lib/es6/utils/zIndexStacking.js.map +0 -1
- package/lib/esm/_virtual/_commonjsHelpers.mjs +0 -6
- package/lib/esm/_virtual/index.mjs +0 -4
- package/lib/esm/_virtual/index2.mjs +0 -4
- package/lib/esm/_virtual/react-is.development.mjs +0 -4
- package/lib/esm/_virtual/react-is.production.min.mjs +0 -4
- package/lib/types/LastInteractionType.d.ts +0 -11
- package/lib/types/core-types/UnknownProperties.d.ts +0 -3
- package/lib/types/core-types/symbols.d.ts +0 -9
- package/lib/types/register.d.ts +0 -8
- package/lib/types/styled/index.d.ts +0 -11
- package/lib/types/styled/reshadow-core.d.ts +0 -37
- package/lib/types/styled/sstyled.d.ts +0 -17
- package/lib/types/theme/themes/default.d.ts +0 -387
- package/lib/types/utils/CSSinJS.d.ts +0 -5
- package/lib/types/utils/ScreenReaderOnly.d.ts +0 -8
- package/lib/types/utils/ThemeProvider.d.ts +0 -15
- package/lib/types/utils/addonText.d.ts +0 -2
- package/lib/types/utils/addonTextChildren.d.ts +0 -3
- package/lib/types/utils/ariaProps.d.ts +0 -12
- package/lib/types/utils/assignProps.d.ts +0 -11
- package/lib/types/utils/canUseDOM.d.ts +0 -1
- package/lib/types/utils/capitalizeFirstLetter.d.ts +0 -1
- package/lib/types/utils/color.d.ts +0 -5
- package/lib/types/utils/compose.d.ts +0 -1
- package/lib/types/utils/createHoc.d.ts +0 -3
- package/lib/types/utils/createUUID.d.ts +0 -1
- package/lib/types/utils/cssToIntDefault.d.ts +0 -8
- package/lib/types/utils/enhances/WithAutoFocus.d.ts +0 -14
- package/lib/types/utils/enhances/WithCSS.d.ts +0 -41
- package/lib/types/utils/enhances/WithI18n.d.ts +0 -43
- package/lib/types/utils/enhances/WithKeyboardFocus.d.ts +0 -45
- package/lib/types/utils/enhances/WithRef.d.ts +0 -3
- package/lib/types/utils/enhances/a11yEnhance.d.ts +0 -10
- package/lib/types/utils/enhances/animatedSizeEnhance.d.ts +0 -12
- package/lib/types/utils/enhances/autoFocusEnhance.d.ts +0 -10
- package/lib/types/utils/enhances/contextEnhance.d.ts +0 -3
- package/lib/types/utils/enhances/i18nEnhance.d.ts +0 -25
- package/lib/types/utils/enhances/keyboardFocusEnhance.d.ts +0 -27
- package/lib/types/utils/enhances/resolveColorEnhance.d.ts +0 -2
- package/lib/types/utils/eventEmitter.d.ts +0 -9
- package/lib/types/utils/findComponent.d.ts +0 -12
- package/lib/types/utils/fire.d.ts +0 -2
- package/lib/types/utils/focus-lock/focusBorders.d.ts +0 -4
- package/lib/types/utils/focus-lock/getFocusableIn.d.ts +0 -1
- package/lib/types/utils/focus-lock/isFocusInside.d.ts +0 -1
- package/lib/types/utils/focus-lock/isFocusable.d.ts +0 -1
- package/lib/types/utils/focus-lock/setFocus.d.ts +0 -1
- package/lib/types/utils/getAccessibleName.d.ts +0 -1
- package/lib/types/utils/getDisplayName.d.ts +0 -2
- package/lib/types/utils/getEventTarget.d.ts +0 -1
- package/lib/types/utils/getOriginChildren.d.ts +0 -2
- package/lib/types/utils/getRandomInt.d.ts +0 -1
- package/lib/types/utils/getValue.d.ts +0 -1
- package/lib/types/utils/hasLabels.d.ts +0 -7
- package/lib/types/utils/hasParent.d.ts +0 -1
- package/lib/types/utils/if.d.ts +0 -11
- package/lib/types/utils/ifChildren.d.ts +0 -8
- package/lib/types/utils/injectStyle.d.ts +0 -2
- package/lib/types/utils/inputProps.d.ts +0 -2
- package/lib/types/utils/isNode.d.ts +0 -1
- package/lib/types/utils/isPromise.d.ts +0 -1
- package/lib/types/utils/isRetina.d.ts +0 -1
- package/lib/types/utils/logger.d.ts +0 -9
- package/lib/types/utils/numericChecker.d.ts +0 -5
- package/lib/types/utils/ownerDocument.d.ts +0 -1
- package/lib/types/utils/pick.d.ts +0 -1
- package/lib/types/utils/propsForElement.d.ts +0 -3
- package/lib/types/utils/rafTrottle.d.ts +0 -2
- package/lib/types/utils/reactToText.d.ts +0 -3
- package/lib/types/utils/ref.d.ts +0 -8
- package/lib/types/utils/setRef.d.ts +0 -2
- package/lib/types/utils/syncScroll.d.ts +0 -1
- package/lib/types/utils/uncontroll.d.ts +0 -4
- package/lib/types/utils/uniqueID.d.ts +0 -12
- package/lib/types/utils/use/useColorResolver.d.ts +0 -1
- package/lib/types/utils/use/useCss.d.ts +0 -4
- package/lib/types/utils/use/useEnhancedEffect.d.ts +0 -3
- package/lib/types/utils/use/useEventCallback.d.ts +0 -4
- package/lib/types/utils/use/useEventListener.d.ts +0 -2
- package/lib/types/utils/use/useFocusLock.d.ts +0 -10
- package/lib/types/utils/use/usePreventScroll.d.ts +0 -2
- package/lib/types/utils/useCssVariable.d.ts +0 -8
- package/lib/types/utils/zIndexStacking.d.ts +0 -8
- /package/lib/{cjs/LastInteractionType.js → LastInteractionType.js} +0 -0
- /package/lib/{types/coreFactory.d.ts → coreFactory.d.ts} +0 -0
- /package/lib/{cjs/coreFactory.js → coreFactory.js} +0 -0
- /package/lib/{types/enhancement → enhancement}/Children.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/Root.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/bindHandler.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/dataName.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/enhance.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/functionDefaultProps.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/hoistProps.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/i18n.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/inheritedName.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/staticChildren.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/style.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/uncontrolledProps.d.ts +0 -0
- /package/lib/{types/index.d.ts → index.d.ts} +0 -0
- /package/lib/{cjs/index.js → index.js} +0 -0
- /package/lib/{types/theme → theme}/processor.d.ts +0 -0
- /package/lib/{types/theme → theme}/utils.d.ts +0 -0
package/lib/{es6/enhancement/functionDefaultProps.js → esm/enhancement/functionDefaultProps.mjs}
RENAMED
|
@@ -5,7 +5,7 @@ function Enhancement() {
|
|
|
5
5
|
if (!Component.defaultProps) {
|
|
6
6
|
return false;
|
|
7
7
|
}
|
|
8
|
-
if (typeof Component.defaultProps ===
|
|
8
|
+
if (typeof Component.defaultProps === "function") {
|
|
9
9
|
return true;
|
|
10
10
|
}
|
|
11
11
|
return Boolean(Object.keys(Component.defaultProps).length);
|
|
@@ -17,13 +17,13 @@ function Enhancement() {
|
|
|
17
17
|
};
|
|
18
18
|
},
|
|
19
19
|
wrapperProps: function wrapperProps(props) {
|
|
20
|
-
if (typeof defaultProps ===
|
|
21
|
-
// TODO: optimization
|
|
20
|
+
if (typeof defaultProps === "function") {
|
|
22
21
|
return Object.assign({}, defaultProps(props), props);
|
|
23
22
|
}
|
|
24
23
|
return Object.assign({}, defaultProps, props);
|
|
25
24
|
}
|
|
26
25
|
};
|
|
27
26
|
}
|
|
28
|
-
export
|
|
29
|
-
|
|
27
|
+
export {
|
|
28
|
+
Enhancement as default
|
|
29
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
4
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
5
|
-
import React from
|
|
6
|
-
import assignProps from
|
|
7
|
-
import useEnhancedEffect from
|
|
8
|
-
import pick from
|
|
9
|
-
|
|
10
|
-
var HOIST_SELF = Symbol(
|
|
11
|
-
var HOIST_SET = Symbol(
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import assignProps from "../utils/assignProps.mjs";
|
|
7
|
+
import useEnhancedEffect from "../utils/use/useEnhancedEffect.mjs";
|
|
8
|
+
import pick from "../utils/pick.mjs";
|
|
9
|
+
var HOIST_CONTEXT = Symbol("HOIST_CONTEXT");
|
|
10
|
+
var HOIST_SELF = Symbol("HOIST_SELF");
|
|
11
|
+
var HOIST_SET = Symbol("HOIST_SET");
|
|
12
12
|
function flatChildComponent(childComponents) {
|
|
13
|
-
return Object.values(childComponents).reduce(function
|
|
13
|
+
return Object.values(childComponents).reduce(function(acc, Component) {
|
|
14
14
|
if (Array.isArray(Component)) {
|
|
15
15
|
acc.push(Component[0]);
|
|
16
16
|
acc.push.apply(acc, _toConsumableArray(flatChildComponent(Component[1])));
|
|
@@ -20,61 +20,49 @@ function flatChildComponent(childComponents) {
|
|
|
20
20
|
return acc;
|
|
21
21
|
}, []);
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
/** @deprecated Doesn't work in ssr and sometimes breakes rulles of hooks. We should never use it. */
|
|
25
23
|
function Enhancement(childComponents, Context) {
|
|
26
24
|
return {
|
|
27
25
|
condition: function condition(Component) {
|
|
28
|
-
return [Component].concat(_toConsumableArray(flatChildComponent(childComponents))).some(function
|
|
26
|
+
return [Component].concat(_toConsumableArray(flatChildComponent(childComponents))).some(function(Component2) {
|
|
29
27
|
var _Component$hoistProps;
|
|
30
|
-
return Boolean((_Component$hoistProps =
|
|
28
|
+
return Boolean((_Component$hoistProps = Component2.hoistProps) === null || _Component$hoistProps === void 0 ? void 0 : _Component$hoistProps.length);
|
|
31
29
|
});
|
|
32
30
|
},
|
|
33
31
|
init: function init(props, WrapperComponent, isFunction) {
|
|
34
32
|
var _this = this;
|
|
35
33
|
if (isFunction) {
|
|
36
|
-
// TODO: might breake rules of hooks (by lsroman)
|
|
37
34
|
this[HOIST_SELF] = React.useState({});
|
|
38
35
|
} else {
|
|
39
|
-
this[HOIST_SELF] = [{}, function
|
|
36
|
+
this[HOIST_SELF] = [{}, function(obj) {
|
|
40
37
|
_this[HOIST_SELF][0] = obj;
|
|
41
38
|
_this.forceUpdate();
|
|
42
39
|
}];
|
|
43
40
|
}
|
|
44
|
-
|
|
45
|
-
this[HOIST_SET] = function (obj) {
|
|
41
|
+
this[HOIST_SET] = function(obj) {
|
|
46
42
|
_this[HOIST_SELF][1](obj);
|
|
47
43
|
};
|
|
48
44
|
},
|
|
49
45
|
context: function context(_context) {
|
|
50
|
-
// TODO: need to optimizte container initialization (by lsroman)
|
|
51
|
-
// WrapperComponent.hoistProps
|
|
52
46
|
return _objectSpread(_objectSpread({}, _context), {}, _defineProperty({}, HOIST_CONTEXT, this[HOIST_SET]));
|
|
53
47
|
},
|
|
54
48
|
asProps: function asProps(props) {
|
|
55
|
-
// TODO: need to check for no props overwriting (by lsroman)
|
|
56
49
|
return assignProps(this[HOIST_SELF][0], props);
|
|
57
50
|
},
|
|
58
51
|
wrapperProps: function wrapperProps(props, WrapperComponent) {
|
|
59
52
|
var _WrapperComponent$hoi;
|
|
60
53
|
if ((_WrapperComponent$hoi = WrapperComponent.hoistProps) !== null && _WrapperComponent$hoi !== void 0 && _WrapperComponent$hoi.length) {
|
|
61
54
|
var context = React.useContext(Context);
|
|
62
|
-
var renameProps = WrapperComponent.hoistProps.reduce(function
|
|
63
|
-
var _propName$split = propName.split(
|
|
64
|
-
_propName$split2 = _slicedToArray(_propName$split, 2),
|
|
65
|
-
name = _propName$split2[0],
|
|
66
|
-
rename = _propName$split2[1];
|
|
55
|
+
var renameProps = WrapperComponent.hoistProps.reduce(function(acc, propName) {
|
|
56
|
+
var _propName$split = propName.split(":"), _propName$split2 = _slicedToArray(_propName$split, 2), name = _propName$split2[0], rename = _propName$split2[1];
|
|
67
57
|
acc[name] = rename || name;
|
|
68
58
|
return acc;
|
|
69
59
|
}, {});
|
|
70
|
-
var hoistProps = Object.entries(pick(props, Object.keys(renameProps))).reduce(function
|
|
71
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
72
|
-
name = _ref2[0],
|
|
73
|
-
value = _ref2[1];
|
|
60
|
+
var hoistProps = Object.entries(pick(props, Object.keys(renameProps))).reduce(function(acc, _ref) {
|
|
61
|
+
var _ref2 = _slicedToArray(_ref, 2), name = _ref2[0], value = _ref2[1];
|
|
74
62
|
acc[renameProps[name]] = value;
|
|
75
63
|
return acc;
|
|
76
64
|
}, {});
|
|
77
|
-
useEnhancedEffect(function
|
|
65
|
+
useEnhancedEffect(function() {
|
|
78
66
|
if (context[HOIST_CONTEXT]) {
|
|
79
67
|
context[HOIST_CONTEXT](hoistProps);
|
|
80
68
|
}
|
|
@@ -84,5 +72,7 @@ function Enhancement(childComponents, Context) {
|
|
|
84
72
|
}
|
|
85
73
|
};
|
|
86
74
|
}
|
|
87
|
-
export
|
|
88
|
-
|
|
75
|
+
export {
|
|
76
|
+
HOIST_CONTEXT,
|
|
77
|
+
Enhancement as default
|
|
78
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Context } from "../utils/enhances/WithI18n.mjs";
|
|
5
|
+
var _excluded = ["locale"];
|
|
6
|
+
function i18nAppLocaleEnhance() {
|
|
7
|
+
return {
|
|
8
|
+
wrapperProps: function wrapperProps(props) {
|
|
9
|
+
var locale = props.locale, other = _objectWithoutProperties(props, _excluded);
|
|
10
|
+
var contextLocale = React.useContext(Context);
|
|
11
|
+
if (!locale && !contextLocale) return props;
|
|
12
|
+
return _objectSpread(_objectSpread({}, other), {}, {
|
|
13
|
+
locale: locale !== null && locale !== void 0 ? locale : contextLocale
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
i18nAppLocaleEnhance as default
|
|
20
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
-
import { INHERITED_NAME } from
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
+
import { INHERITED_NAME } from "../core-types/symbols.mjs";
|
|
4
4
|
function Enhancement() {
|
|
5
5
|
return {
|
|
6
6
|
condition: function condition(Component) {
|
|
@@ -11,5 +11,6 @@ function Enhancement() {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
export
|
|
15
|
-
|
|
14
|
+
export {
|
|
15
|
+
Enhancement as default
|
|
16
|
+
};
|
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
-
import React from
|
|
5
|
-
import assignProps from
|
|
6
|
-
import pick from
|
|
7
|
-
import logger from
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import assignProps from "../utils/assignProps.mjs";
|
|
6
|
+
import pick from "../utils/pick.mjs";
|
|
7
|
+
import logger from "../utils/logger.mjs";
|
|
8
8
|
function assign(target, source) {
|
|
9
|
-
return Object.defineProperties(target, Object.keys(source).reduce(function
|
|
9
|
+
return Object.defineProperties(target, Object.keys(source).reduce(function(descriptors, key) {
|
|
10
10
|
descriptors[key] = Object.getOwnPropertyDescriptor(source, key);
|
|
11
11
|
return descriptors;
|
|
12
12
|
}, {}));
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
function getterMethodName(name) {
|
|
15
15
|
return "get".concat(name, "Props");
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
var displayName = arguments.length > 0 && arguments[0] !==
|
|
19
|
-
var displayNames = displayName.split(
|
|
20
|
-
var name = displayNames.slice(-(displayNames.length - 1)).join(
|
|
17
|
+
function getterMethodNameByDisplayName() {
|
|
18
|
+
var displayName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
19
|
+
var displayNames = displayName.split(".");
|
|
20
|
+
var name = displayNames.slice(-(displayNames.length - 1)).join("");
|
|
21
21
|
return getterMethodName(name);
|
|
22
22
|
}
|
|
23
23
|
function flatGetterMethodNames(childComponents, parentName) {
|
|
24
|
-
return Object.entries(childComponents).reduce(function
|
|
25
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
26
|
-
name = _ref2[0],
|
|
27
|
-
value = _ref2[1];
|
|
24
|
+
return Object.entries(childComponents).reduce(function(acc, _ref) {
|
|
25
|
+
var _ref2 = _slicedToArray(_ref, 2), name = _ref2[0], value = _ref2[1];
|
|
28
26
|
if (Array.isArray(value)) {
|
|
29
27
|
acc.push.apply(acc, _toConsumableArray(flatGetterMethodNames(value[1], name)));
|
|
30
28
|
}
|
|
@@ -33,9 +31,9 @@ function flatGetterMethodNames(childComponents, parentName) {
|
|
|
33
31
|
return acc;
|
|
34
32
|
}, []);
|
|
35
33
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var SELF_GETTER_METHOD = Symbol(
|
|
34
|
+
var STATIC_COMPONENT = Symbol("STATIC_COMPONENT");
|
|
35
|
+
var ROOT_COMPONENT = Symbol("ROOT_COMPONENT");
|
|
36
|
+
var SELF_GETTER_METHOD = Symbol("SELF_GETTER_METHOD");
|
|
39
37
|
function Enhancement(childComponents, createComponent, options) {
|
|
40
38
|
var getterMethodNames = flatGetterMethodNames(childComponents);
|
|
41
39
|
return {
|
|
@@ -45,20 +43,20 @@ function Enhancement(childComponents, createComponent, options) {
|
|
|
45
43
|
init: function init(props, WrapperComponent) {
|
|
46
44
|
var _this = this;
|
|
47
45
|
var getterMethods = pick(this, getterMethodNames);
|
|
48
|
-
this[SELF_GETTER_METHOD] = function
|
|
46
|
+
this[SELF_GETTER_METHOD] = function() {
|
|
49
47
|
var selfGetterMethod = getterMethodNameByDisplayName(WrapperComponent.displayName);
|
|
50
|
-
logger.warn(true, "Getter `".concat(selfGetterMethod, "` can't be fired as it is a getter of static component"), props[
|
|
48
|
+
logger.warn(true, "Getter `".concat(selfGetterMethod, "` can't be fired as it is a getter of static component"), props["data-ui-name"] || WrapperComponent.displayName);
|
|
51
49
|
};
|
|
52
|
-
assign(this, getterMethodNames.reduce(function
|
|
50
|
+
assign(this, getterMethodNames.reduce(function(acc, name) {
|
|
53
51
|
var getterMethod = getterMethods[name];
|
|
54
52
|
if (!getterMethod) return acc;
|
|
55
|
-
acc[name] = function
|
|
56
|
-
var childrenProps = arguments.length > 0 && arguments[0] !==
|
|
53
|
+
acc[name] = function() {
|
|
54
|
+
var childrenProps = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
57
55
|
var getterProps = getterMethod.call(_this, childrenProps, acc[name].index);
|
|
58
56
|
return assignProps(childrenProps, getterProps);
|
|
59
57
|
};
|
|
60
58
|
acc[name].index = -1;
|
|
61
|
-
acc[name].cache = new Set();
|
|
59
|
+
acc[name].cache = /* @__PURE__ */ new Set();
|
|
62
60
|
return acc;
|
|
63
61
|
}, {}));
|
|
64
62
|
},
|
|
@@ -66,31 +64,25 @@ function Enhancement(childComponents, createComponent, options) {
|
|
|
66
64
|
if (Object.keys(childComponents).length && !WrapperComponent.displayName) {
|
|
67
65
|
throw new Error('"displayName" is not defined');
|
|
68
66
|
}
|
|
69
|
-
return Object.entries(childComponents).reduce(function
|
|
70
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
71
|
-
|
|
72
|
-
value = _ref4[1];
|
|
73
|
-
var childComponents = {};
|
|
67
|
+
return Object.entries(childComponents).reduce(function(acc, _ref3) {
|
|
68
|
+
var _ref4 = _slicedToArray(_ref3, 2), name = _ref4[0], value = _ref4[1];
|
|
69
|
+
var childComponents2 = {};
|
|
74
70
|
if (Array.isArray(value)) {
|
|
75
|
-
|
|
71
|
+
childComponents2 = value[1];
|
|
76
72
|
value = value[0];
|
|
77
73
|
}
|
|
78
74
|
var prevStaticComponent = value[STATIC_COMPONENT];
|
|
79
|
-
// @ts-ignore
|
|
80
75
|
var prevDisplayName = value.displayName;
|
|
81
|
-
// @ts-ignore
|
|
82
76
|
value.displayName = "".concat(WrapperComponent.displayName, ".").concat(name);
|
|
83
77
|
value[STATIC_COMPONENT] = true;
|
|
84
78
|
value[ROOT_COMPONENT] = Component[ROOT_COMPONENT] || Component;
|
|
85
|
-
acc[name] = createComponent(value,
|
|
86
|
-
// @ts-ignore
|
|
79
|
+
acc[name] = createComponent(value, childComponents2, options);
|
|
87
80
|
value.displayName = prevDisplayName;
|
|
88
81
|
value[STATIC_COMPONENT] = prevStaticComponent;
|
|
89
82
|
return acc;
|
|
90
83
|
}, {});
|
|
91
84
|
},
|
|
92
85
|
context: function context(_context) {
|
|
93
|
-
// const getterMethod = getterMethodNameByDisplayName(WrapperComponent.displayName);
|
|
94
86
|
return _objectSpread(_objectSpread({}, _context), pick(this, getterMethodNames));
|
|
95
87
|
},
|
|
96
88
|
wrapperProps: function wrapperProps(props, WrapperComponent) {
|
|
@@ -110,8 +102,8 @@ function Enhancement(childComponents, createComponent, options) {
|
|
|
110
102
|
},
|
|
111
103
|
render: function render(_render) {
|
|
112
104
|
var _this2 = this;
|
|
113
|
-
getterMethodNames.forEach(function
|
|
114
|
-
if (_this2[name] ===
|
|
105
|
+
getterMethodNames.forEach(function(name) {
|
|
106
|
+
if (_this2[name] === void 0) return;
|
|
115
107
|
_this2[name].index = -1;
|
|
116
108
|
_this2[name].cache.clear();
|
|
117
109
|
});
|
|
@@ -119,5 +111,10 @@ function Enhancement(childComponents, createComponent, options) {
|
|
|
119
111
|
}
|
|
120
112
|
};
|
|
121
113
|
}
|
|
122
|
-
export
|
|
123
|
-
|
|
114
|
+
export {
|
|
115
|
+
ROOT_COMPONENT,
|
|
116
|
+
STATIC_COMPONENT,
|
|
117
|
+
Enhancement as default,
|
|
118
|
+
getterMethodName,
|
|
119
|
+
getterMethodNameByDisplayName
|
|
120
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
import { sstyled } from
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var STYLES_SELF = Symbol(
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import "../styled/index.mjs";
|
|
6
|
+
import { STATIC_COMPONENT } from "./staticChildren.mjs";
|
|
7
|
+
import { sstyled } from "../styled/sstyled.mjs";
|
|
8
|
+
var _excluded = ["_styles", "styles"], _excluded2 = ["styles"];
|
|
9
|
+
var STYLES_CONTEXT = Symbol("STYLES_CONTEXT");
|
|
10
|
+
var STYLES_SELF = Symbol("STYLES_SELF");
|
|
11
11
|
function Enhancement(childComponents, Context) {
|
|
12
12
|
return {
|
|
13
13
|
condition: function condition(Component) {
|
|
@@ -22,23 +22,19 @@ function Enhancement(childComponents, Context) {
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
context: function context(_context) {
|
|
25
|
-
// Optimization: if has no children there is no need to create new context (by lsroman)
|
|
26
25
|
if (!this[STYLES_SELF] || !Object.keys(childComponents).length) {
|
|
27
26
|
return _context;
|
|
28
27
|
}
|
|
29
28
|
return _objectSpread(_objectSpread({}, _context), {}, _defineProperty({}, STYLES_CONTEXT, this[STYLES_SELF]));
|
|
30
29
|
},
|
|
31
30
|
asProps: function asProps(_ref) {
|
|
32
|
-
var _styles = _ref._styles,
|
|
33
|
-
styles = _ref.styles,
|
|
34
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
var _styles = _ref._styles, styles = _ref.styles, props = _objectWithoutProperties(_ref, _excluded);
|
|
35
32
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
36
33
|
styles: this[STYLES_SELF]
|
|
37
34
|
});
|
|
38
35
|
},
|
|
39
36
|
wrapperProps: function wrapperProps(_ref2) {
|
|
40
|
-
var styles = _ref2.styles,
|
|
41
|
-
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
37
|
+
var styles = _ref2.styles, props = _objectWithoutProperties(_ref2, _excluded2);
|
|
42
38
|
var context = React.useContext(Context);
|
|
43
39
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
44
40
|
_styles: styles,
|
|
@@ -47,5 +43,7 @@ function Enhancement(childComponents, Context) {
|
|
|
47
43
|
}
|
|
48
44
|
};
|
|
49
45
|
}
|
|
50
|
-
export
|
|
51
|
-
|
|
46
|
+
export {
|
|
47
|
+
STYLES_CONTEXT,
|
|
48
|
+
Enhancement as default
|
|
49
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import _toArray from "@babel/runtime/helpers/toArray";
|
|
4
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
import _toPropertyKey from "@babel/runtime/helpers/toPropertyKey";
|
|
6
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
7
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
import { callAllEventHandlers } from
|
|
9
|
-
import capitalizeFirstLetter from
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import _toArray from "@babel/runtime/helpers/esm/toArray";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
import _toPropertyKey from "@babel/runtime/helpers/esm/toPropertyKey";
|
|
6
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
+
import { callAllEventHandlers } from "../utils/assignProps.mjs";
|
|
9
|
+
import capitalizeFirstLetter from "../utils/capitalizeFirstLetter.mjs";
|
|
10
10
|
function assign(target, source) {
|
|
11
|
-
return Object.defineProperties(target, Object.keys(source).reduce(function
|
|
11
|
+
return Object.defineProperties(target, Object.keys(source).reduce(function(descriptors, key) {
|
|
12
12
|
descriptors[key] = Object.getOwnPropertyDescriptor(source, key);
|
|
13
13
|
return descriptors;
|
|
14
14
|
}, {}));
|
|
@@ -17,18 +17,18 @@ function defaultProp(prop) {
|
|
|
17
17
|
return "default".concat(capitalizeFirstLetter(prop));
|
|
18
18
|
}
|
|
19
19
|
function handlerProp(prop) {
|
|
20
|
-
if (prop ===
|
|
21
|
-
if (prop ===
|
|
20
|
+
if (prop === "value") prop = "";
|
|
21
|
+
if (prop === "checked") prop = "";
|
|
22
22
|
return "on".concat(capitalizeFirstLetter(prop), "Change");
|
|
23
23
|
}
|
|
24
24
|
function isControlled(propValue) {
|
|
25
|
-
return propValue !==
|
|
25
|
+
return propValue !== void 0;
|
|
26
26
|
}
|
|
27
27
|
function uncontrolledProp(self, propName, propValue, propDefaultValue, propHandler, chainHandler) {
|
|
28
28
|
function getValue() {
|
|
29
29
|
return isControlled(propValue) ? propValue : propName in self.state ? self.state[propName] : propDefaultValue;
|
|
30
30
|
}
|
|
31
|
-
return [getValue(), function
|
|
31
|
+
return [getValue(), function(value) {
|
|
32
32
|
var oldValue = getValue();
|
|
33
33
|
if (oldValue === value) return false;
|
|
34
34
|
if (!isControlled(propValue)) self.setState(_defineProperty({}, propName, value));
|
|
@@ -38,24 +38,16 @@ function uncontrolledProp(self, propName, propValue, propDefaultValue, propHandl
|
|
|
38
38
|
return callAllEventHandlers.apply(void 0, [propHandler].concat(_toConsumableArray(chainHandler))).apply(void 0, [value].concat(args));
|
|
39
39
|
}];
|
|
40
40
|
}
|
|
41
|
-
function uncontrolledUniversal(props, config,
|
|
41
|
+
function uncontrolledUniversal(props, config, uncontrolledProp2) {
|
|
42
42
|
var handlerProps = {};
|
|
43
|
-
var uncontrolledProps = Object.keys(config).reduce(function
|
|
43
|
+
var uncontrolledProps = Object.keys(config).reduce(function(result, propName) {
|
|
44
44
|
var _objectSpread2;
|
|
45
45
|
var handlerName = handlerProp(propName);
|
|
46
46
|
var defaultPropName = defaultProp(propName);
|
|
47
|
-
var propDefaultValue = result[defaultPropName],
|
|
48
|
-
|
|
49
|
-
propHandler = result[handlerName],
|
|
50
|
-
other = _objectWithoutProperties(result, [defaultPropName, propName, handlerName].map(_toPropertyKey));
|
|
51
|
-
if (propDefaultValue === undefined) {
|
|
47
|
+
var propDefaultValue = result[defaultPropName], propValue = result[propName], propHandler = result[handlerName], other = _objectWithoutProperties(result, [defaultPropName, propName, handlerName].map(_toPropertyKey));
|
|
48
|
+
if (propDefaultValue === void 0) {
|
|
52
49
|
console.warn(defaultPropName, 'must be installed in "defaultProps"');
|
|
53
50
|
}
|
|
54
|
-
|
|
55
|
-
// if (typeof propDefaultValue === 'function' && propDefaultValue.defaultInit) {
|
|
56
|
-
// propDefaultValue = propDefaultValue(result);
|
|
57
|
-
// }
|
|
58
|
-
|
|
59
51
|
var setter = config[propName];
|
|
60
52
|
var chainHandler = [];
|
|
61
53
|
if (Array.isArray(setter)) {
|
|
@@ -64,30 +56,26 @@ function uncontrolledUniversal(props, config, uncontrolledProp) {
|
|
|
64
56
|
setter = _setter2[0];
|
|
65
57
|
chainHandler = _setter2.slice(1);
|
|
66
58
|
}
|
|
67
|
-
setter = setter || function
|
|
59
|
+
setter = setter || function(v) {
|
|
68
60
|
return v;
|
|
69
61
|
};
|
|
70
|
-
var _uncontrolledProp =
|
|
71
|
-
_uncontrolledProp2 = _slicedToArray(_uncontrolledProp, 2),
|
|
72
|
-
value = _uncontrolledProp2[0],
|
|
73
|
-
handler = _uncontrolledProp2[1];
|
|
74
|
-
// TODO: need to warn about recursion (by lsroman)
|
|
62
|
+
var _uncontrolledProp = uncontrolledProp2(propName, propValue, propDefaultValue, propHandler, chainHandler), _uncontrolledProp2 = _slicedToArray(_uncontrolledProp, 2), value = _uncontrolledProp2[0], handler = _uncontrolledProp2[1];
|
|
75
63
|
handlerProps[propName] = handler;
|
|
76
|
-
return _objectSpread(_objectSpread({}, other), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, propName, value), _defineProperty(_objectSpread2, handlerName, function
|
|
64
|
+
return _objectSpread(_objectSpread({}, other), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, propName, value), _defineProperty(_objectSpread2, handlerName, function(eventOrValue) {
|
|
77
65
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
78
66
|
args[_key2 - 1] = arguments[_key2];
|
|
79
67
|
}
|
|
80
|
-
var
|
|
68
|
+
var result2 = [setter.apply(void 0, [eventOrValue].concat(args))].concat(args);
|
|
81
69
|
if (eventOrValue !== null && eventOrValue !== void 0 && eventOrValue.target) {
|
|
82
|
-
|
|
70
|
+
result2.push(eventOrValue);
|
|
83
71
|
}
|
|
84
|
-
return handler.apply(void 0, _toConsumableArray(
|
|
72
|
+
return handler.apply(void 0, _toConsumableArray(result2));
|
|
85
73
|
}), _objectSpread2));
|
|
86
74
|
}, props);
|
|
87
75
|
return [uncontrolledProps, handlerProps];
|
|
88
76
|
}
|
|
89
77
|
function uncontrolled(self, props, config) {
|
|
90
|
-
return uncontrolledUniversal(props, config, uncontrolledProp.bind(
|
|
78
|
+
return uncontrolledUniversal(props, config, uncontrolledProp.bind(void 0, self));
|
|
91
79
|
}
|
|
92
80
|
function Enhancement() {
|
|
93
81
|
return {
|
|
@@ -98,9 +86,7 @@ function Enhancement() {
|
|
|
98
86
|
this.state = this.state || {};
|
|
99
87
|
assign(this, {
|
|
100
88
|
get handlers() {
|
|
101
|
-
var _uncontrolled = uncontrolled(this, this.props, this.uncontrolledProps()),
|
|
102
|
-
_uncontrolled2 = _slicedToArray(_uncontrolled, 2),
|
|
103
|
-
uncontrolledHandlers = _uncontrolled2[1];
|
|
89
|
+
var _uncontrolled = uncontrolled(this, this.props, this.uncontrolledProps()), _uncontrolled2 = _slicedToArray(_uncontrolled, 2), uncontrolledHandlers = _uncontrolled2[1];
|
|
104
90
|
return uncontrolledHandlers;
|
|
105
91
|
}
|
|
106
92
|
});
|
|
@@ -111,13 +97,11 @@ function Enhancement() {
|
|
|
111
97
|
});
|
|
112
98
|
},
|
|
113
99
|
asProps: function asProps(props) {
|
|
114
|
-
|
|
115
|
-
var _uncontrolled3 = uncontrolled(this, props, this.uncontrolledProps()),
|
|
116
|
-
_uncontrolled4 = _slicedToArray(_uncontrolled3, 1),
|
|
117
|
-
uncontrolledProps = _uncontrolled4[0];
|
|
100
|
+
var _uncontrolled3 = uncontrolled(this, props, this.uncontrolledProps()), _uncontrolled4 = _slicedToArray(_uncontrolled3, 1), uncontrolledProps = _uncontrolled4[0];
|
|
118
101
|
return uncontrolledProps;
|
|
119
102
|
}
|
|
120
103
|
};
|
|
121
104
|
}
|
|
122
|
-
export
|
|
123
|
-
|
|
105
|
+
export {
|
|
106
|
+
Enhancement as default
|
|
107
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { assignProps, createBaseComponent, createComponent } from "./coreFactory.mjs";
|
|
2
|
+
import "./styled/index.mjs";
|
|
3
|
+
import { Component, Intergalactic, Root, wrapIntergalacticComponent } from "./core-types/Component.mjs";
|
|
4
|
+
import { CHILDREN_COMPONENT, CONTEXT_COMPONENT, CORE_INSTANCE, CREATE_COMPONENT, INHERITED_NAME } from "./core-types/symbols.mjs";
|
|
5
|
+
import { default as default2 } from "./register.mjs";
|
|
6
|
+
import { lastInteraction } from "./LastInteractionType.mjs";
|
|
7
|
+
import { sstyled } from "./styled/sstyled.mjs";
|
|
8
|
+
export {
|
|
9
|
+
CHILDREN_COMPONENT,
|
|
10
|
+
CONTEXT_COMPONENT,
|
|
11
|
+
CORE_INSTANCE,
|
|
12
|
+
CREATE_COMPONENT,
|
|
13
|
+
Component,
|
|
14
|
+
INHERITED_NAME,
|
|
15
|
+
Intergalactic,
|
|
16
|
+
Root,
|
|
17
|
+
assignProps,
|
|
18
|
+
createBaseComponent,
|
|
19
|
+
createComponent,
|
|
20
|
+
lastInteraction,
|
|
21
|
+
default2 as register,
|
|
22
|
+
sstyled,
|
|
23
|
+
wrapIntergalacticComponent
|
|
24
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
var Register = /* @__PURE__ */ function() {
|
|
5
|
+
function Register2() {
|
|
6
|
+
_classCallCheck(this, Register2);
|
|
7
|
+
_defineProperty(this, "data", {});
|
|
8
|
+
}
|
|
9
|
+
_createClass(Register2, [{
|
|
10
|
+
key: "get",
|
|
11
|
+
value: function get(name, defaultValue) {
|
|
12
|
+
if (name in this.data) {
|
|
13
|
+
return this.data[name];
|
|
14
|
+
} else {
|
|
15
|
+
return this.set(name, defaultValue);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}, {
|
|
19
|
+
key: "set",
|
|
20
|
+
value: function set(name, value) {
|
|
21
|
+
this.data[name] = value;
|
|
22
|
+
return this.data[name];
|
|
23
|
+
}
|
|
24
|
+
}]);
|
|
25
|
+
return Register2;
|
|
26
|
+
}();
|
|
27
|
+
const register = new Register();
|
|
28
|
+
export {
|
|
29
|
+
Register,
|
|
30
|
+
register as default
|
|
31
|
+
};
|