@semcore/core 16.0.0-prerelease.9 → 16.0.1-prerelease.0
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 +33 -1
- package/README.md +1 -31
- package/lib/{LastInteractionType.cjs → LastInteractionType.js} +4 -6
- package/lib/LastInteractionType.js.map +1 -0
- package/lib/LastInteractionType.mjs +1 -2
- package/lib/LastInteractionType.mjs.map +1 -1
- package/lib/core-types/Component.d.ts +11 -13
- package/lib/core-types/Component.js +88 -0
- package/lib/core-types/Component.js.map +1 -0
- package/lib/core-types/Component.mjs +11 -14
- package/lib/core-types/Component.mjs.map +1 -1
- package/lib/core-types/UnknownProperties.js +2 -0
- package/lib/core-types/UnknownProperties.js.map +1 -0
- package/lib/core-types/UnknownProperties.mjs.map +1 -1
- 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.map +1 -1
- package/lib/core-types/symbols.js +16 -0
- package/lib/core-types/symbols.js.map +1 -0
- package/lib/core-types/symbols.mjs.map +1 -1
- package/lib/coreFactory.d.ts +4 -4
- package/lib/{coreFactory.cjs → coreFactory.js} +38 -39
- package/lib/coreFactory.js.map +1 -0
- package/lib/coreFactory.mjs +39 -34
- package/lib/coreFactory.mjs.map +1 -1
- package/lib/enhancement/{Children.cjs → Children.js} +10 -11
- package/lib/enhancement/Children.js.map +1 -0
- package/lib/enhancement/Children.mjs +8 -8
- package/lib/enhancement/Children.mjs.map +1 -1
- package/lib/enhancement/Root.d.ts +1 -1
- package/lib/enhancement/{Root.cjs → Root.js} +6 -7
- package/lib/enhancement/Root.js.map +1 -0
- package/lib/enhancement/Root.mjs +2 -6
- package/lib/enhancement/Root.mjs.map +1 -1
- package/lib/enhancement/bindHandler.d.ts +1 -1
- package/lib/enhancement/{bindHandler.cjs → bindHandler.js} +3 -4
- package/lib/enhancement/bindHandler.js.map +1 -0
- package/lib/enhancement/bindHandler.mjs +1 -1
- package/lib/enhancement/bindHandler.mjs.map +1 -1
- package/lib/enhancement/{dataName.cjs → dataName.js} +3 -4
- package/lib/enhancement/dataName.js.map +1 -0
- package/lib/enhancement/dataName.mjs.map +1 -1
- package/lib/enhancement/{enhance.cjs → enhance.js} +2 -3
- package/lib/enhancement/enhance.js.map +1 -0
- package/lib/enhancement/enhance.mjs.map +1 -1
- package/lib/enhancement/{functionDefaultProps.cjs → functionDefaultProps.js} +2 -3
- package/lib/enhancement/functionDefaultProps.js.map +1 -0
- package/lib/enhancement/functionDefaultProps.mjs.map +1 -1
- package/lib/enhancement/hoistProps.d.ts +1 -1
- package/lib/enhancement/{hoistProps.cjs → hoistProps.js} +6 -8
- package/lib/enhancement/hoistProps.js.map +1 -0
- package/lib/enhancement/hoistProps.mjs +2 -2
- package/lib/enhancement/hoistProps.mjs.map +1 -1
- package/lib/enhancement/{i18n.cjs → i18n.js} +3 -4
- package/lib/enhancement/i18n.js.map +1 -0
- package/lib/enhancement/i18n.mjs.map +1 -1
- package/lib/enhancement/{inheritedName.cjs → inheritedName.js} +3 -4
- package/lib/enhancement/inheritedName.js.map +1 -0
- package/lib/enhancement/inheritedName.mjs.map +1 -1
- package/lib/enhancement/{staticChildren.cjs → staticChildren.js} +6 -9
- package/lib/enhancement/staticChildren.js.map +1 -0
- package/lib/enhancement/staticChildren.mjs +1 -1
- package/lib/enhancement/staticChildren.mjs.map +1 -1
- package/lib/enhancement/{style.cjs → style.js} +5 -7
- package/lib/enhancement/style.js.map +1 -0
- package/lib/enhancement/style.mjs +2 -3
- package/lib/enhancement/style.mjs.map +1 -1
- package/lib/enhancement/{uncontrolledProps.cjs → uncontrolledProps.js} +5 -7
- package/lib/enhancement/uncontrolledProps.js.map +1 -0
- package/lib/enhancement/uncontrolledProps.mjs +2 -3
- package/lib/enhancement/uncontrolledProps.mjs.map +1 -1
- package/lib/esm/LastInteractionType.mjs +1 -2
- package/lib/esm/core-types/Component.mjs +11 -14
- package/lib/esm/coreFactory.mjs +39 -34
- package/lib/esm/enhancement/Children.mjs +8 -8
- package/lib/esm/enhancement/Root.mjs +2 -6
- package/lib/esm/enhancement/bindHandler.mjs +1 -1
- package/lib/esm/enhancement/hoistProps.mjs +2 -2
- package/lib/esm/enhancement/staticChildren.mjs +1 -1
- package/lib/esm/enhancement/style.mjs +2 -3
- package/lib/esm/enhancement/uncontrolledProps.mjs +2 -3
- package/lib/esm/index.mjs +3 -2
- package/lib/esm/register.mjs +1 -2
- package/lib/esm/styled/index.mjs +8 -0
- package/lib/esm/styled/reshadow-core.mjs +219 -3
- package/lib/esm/styled/sstyled.mjs +1 -1
- package/lib/esm/utils/assignProps.mjs +10 -0
- package/lib/esm/utils/createHoc.mjs +47 -0
- package/lib/esm/utils/enhances/WithI18n.mjs +41 -15
- package/lib/esm/utils/enhances/i18nEnhance.mjs +91 -0
- package/lib/esm/utils/getDisplayName.mjs +6 -0
- package/lib/esm/utils/logger.mjs +1 -2
- package/lib/esm/utils/ref.mjs +46 -2
- package/lib/index.d.ts +5 -5
- package/lib/{index.cjs → index.js} +5 -5
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +3 -2
- package/lib/index.mjs.map +1 -1
- package/lib/{register.cjs → register.js} +5 -8
- package/lib/register.js.map +1 -0
- package/lib/register.mjs +1 -2
- package/lib/register.mjs.map +1 -1
- package/lib/styled/index.d.ts +1 -2
- package/lib/styled/{index.cjs → index.js} +1 -1
- package/lib/styled/index.js.map +1 -0
- package/lib/styled/index.mjs +8 -6
- package/lib/styled/index.mjs.map +1 -1
- package/lib/styled/{reshadow-core.cjs → reshadow-core.js} +28 -51
- package/lib/styled/reshadow-core.js.map +1 -0
- package/lib/styled/reshadow-core.mjs +219 -3
- package/lib/styled/reshadow-core.mjs.map +1 -1
- package/lib/styled/sstyled.d.ts +2 -2
- package/lib/styled/{sstyled.cjs → sstyled.js} +4 -4
- package/lib/styled/sstyled.js.map +1 -0
- package/lib/styled/sstyled.mjs +1 -1
- package/lib/styled/sstyled.mjs.map +1 -1
- package/lib/theme/dark.json +4 -4
- package/lib/theme/light.json +4 -44
- package/lib/theme/{processor.cjs → processor.js} +62 -64
- package/lib/theme/processor.js.map +1 -0
- package/lib/theme/processor.mjs +52 -53
- package/lib/theme/processor.mjs.map +1 -1
- package/lib/theme/themes/auto.css +228 -6
- package/lib/theme/themes/dark.css +114 -3
- package/lib/theme/themes/dark.d.ts +92 -1
- package/lib/theme/themes/{dark.cjs → dark.js} +95 -5
- package/lib/theme/themes/dark.js.map +1 -0
- package/lib/theme/themes/dark.mjs +93 -2
- package/lib/theme/themes/dark.mjs.map +1 -1
- package/lib/theme/themes/default.css +114 -3
- package/lib/theme/themes/default.d.ts +92 -1
- package/lib/theme/themes/{light.cjs → default.js} +95 -5
- package/lib/theme/themes/default.js.map +1 -0
- package/lib/theme/themes/default.mjs +93 -2
- package/lib/theme/themes/default.mjs.map +1 -1
- package/lib/theme/themes/light.css +114 -3
- package/lib/theme/themes/light.d.ts +92 -1
- package/lib/theme/themes/{default.cjs → light.js} +95 -5
- package/lib/theme/themes/light.js.map +1 -0
- package/lib/theme/themes/light.mjs +93 -2
- package/lib/theme/themes/light.mjs.map +1 -1
- package/lib/theme/utils.d.ts +2 -1
- package/lib/theme/{utils.cjs → utils.js} +37 -33
- package/lib/theme/utils.js.map +1 -0
- package/lib/theme/utils.mjs +31 -23
- package/lib/theme/utils.mjs.map +1 -1
- package/lib/utils/CSSinJS.d.ts +1 -1
- package/lib/utils/{CSSinJS.cjs → CSSinJS.js} +5 -6
- package/lib/utils/CSSinJS.js.map +1 -0
- package/lib/utils/CSSinJS.mjs +2 -2
- package/lib/utils/CSSinJS.mjs.map +1 -1
- package/lib/utils/ScreenReaderOnly.d.ts +1 -1
- package/lib/utils/{ScreenReaderOnly.cjs → ScreenReaderOnly.js} +3 -4
- package/lib/utils/ScreenReaderOnly.js.map +1 -0
- package/lib/utils/ScreenReaderOnly.mjs.map +1 -1
- package/lib/utils/ThemeProvider.d.ts +1 -1
- package/lib/utils/{ThemeProvider.cjs → ThemeProvider.js} +6 -10
- package/lib/utils/ThemeProvider.js.map +1 -0
- package/lib/utils/ThemeProvider.mjs.map +1 -1
- package/lib/utils/addonText.d.ts +1 -1
- package/lib/utils/{addonText.cjs → addonText.js} +2 -2
- package/lib/utils/addonText.js.map +1 -0
- package/lib/utils/addonText.mjs.map +1 -1
- package/lib/utils/addonTextChildren.d.ts +1 -1
- package/lib/utils/{addonTextChildren.cjs → addonTextChildren.js} +4 -5
- package/lib/utils/addonTextChildren.js.map +1 -0
- package/lib/utils/addonTextChildren.mjs +1 -1
- package/lib/utils/addonTextChildren.mjs.map +1 -1
- package/lib/utils/ariaProps.d.ts +1 -1
- package/lib/utils/{ariaProps.cjs → ariaProps.js} +1 -1
- package/lib/utils/ariaProps.js.map +1 -0
- package/lib/utils/ariaProps.mjs.map +1 -1
- package/lib/utils/assignProps.d.ts +1 -1
- package/lib/utils/{assignProps.cjs → assignProps.js} +3 -3
- package/lib/utils/assignProps.js.map +1 -0
- package/lib/utils/assignProps.mjs +10 -0
- package/lib/utils/assignProps.mjs.map +1 -1
- package/lib/utils/{canUseDOM.cjs → canUseDOM.js} +1 -1
- package/lib/utils/canUseDOM.js.map +1 -0
- package/lib/utils/canUseDOM.mjs.map +1 -1
- package/lib/utils/{capitalizeFirstLetter.cjs → capitalizeFirstLetter.js} +1 -1
- package/lib/utils/capitalizeFirstLetter.js.map +1 -0
- package/lib/utils/capitalizeFirstLetter.mjs.map +1 -1
- package/lib/utils/{color.cjs → color.js} +19 -19
- package/lib/utils/color.js.map +1 -0
- package/lib/utils/color.mjs +16 -15
- package/lib/utils/color.mjs.map +1 -1
- package/lib/utils/{compose.cjs → compose.js} +1 -1
- package/lib/utils/compose.js.map +1 -0
- package/lib/utils/compose.mjs.map +1 -1
- package/lib/utils/createHoc.d.ts +1 -1
- package/lib/utils/{createHoc.cjs → createHoc.js} +12 -12
- package/lib/utils/createHoc.js.map +1 -0
- package/lib/utils/createHoc.mjs +24 -23
- package/lib/utils/createHoc.mjs.map +1 -1
- package/lib/utils/{createUUID.cjs → createUUID.js} +1 -1
- package/lib/utils/createUUID.js.map +1 -0
- package/lib/utils/createUUID.mjs.map +1 -1
- package/lib/utils/cssToIntDefault.d.ts +1 -1
- package/lib/utils/{cssToIntDefault.cjs → cssToIntDefault.js} +3 -3
- package/lib/utils/cssToIntDefault.js.map +1 -0
- package/lib/utils/cssToIntDefault.mjs +2 -2
- package/lib/utils/cssToIntDefault.mjs.map +1 -1
- package/lib/utils/enhances/WithAutoFocus.d.ts +3 -3
- package/lib/utils/enhances/{WithAutoFocus.cjs → WithAutoFocus.js} +13 -13
- package/lib/utils/enhances/WithAutoFocus.js.map +1 -0
- package/lib/utils/enhances/WithAutoFocus.mjs +11 -9
- package/lib/utils/enhances/WithAutoFocus.mjs.map +1 -1
- package/lib/utils/enhances/WithCSS.d.ts +4 -4
- package/lib/utils/enhances/{WithCSS.cjs → WithCSS.js} +16 -21
- package/lib/utils/enhances/WithCSS.js.map +1 -0
- package/lib/utils/enhances/WithCSS.mjs +8 -8
- package/lib/utils/enhances/WithCSS.mjs.map +1 -1
- package/lib/utils/enhances/WithI18n.d.ts +3 -3
- package/lib/utils/enhances/{WithI18n.cjs → WithI18n.js} +20 -23
- package/lib/utils/enhances/WithI18n.js.map +1 -0
- package/lib/utils/enhances/WithI18n.mjs +41 -15
- package/lib/utils/enhances/WithI18n.mjs.map +1 -1
- package/lib/utils/enhances/WithKeyboardFocus.d.ts +4 -3
- package/lib/utils/enhances/{WithKeyboardFocus.cjs → WithKeyboardFocus.js} +29 -25
- package/lib/utils/enhances/WithKeyboardFocus.js.map +1 -0
- package/lib/utils/enhances/WithKeyboardFocus.mjs +26 -19
- package/lib/utils/enhances/WithKeyboardFocus.mjs.map +1 -1
- package/lib/utils/enhances/WithRef.d.ts +1 -1
- package/lib/utils/enhances/{WithRef.cjs → WithRef.js} +4 -5
- package/lib/utils/enhances/WithRef.js.map +1 -0
- package/lib/utils/enhances/WithRef.mjs +1 -1
- package/lib/utils/enhances/WithRef.mjs.map +1 -1
- package/lib/utils/enhances/{a11yEnhance.cjs → a11yEnhance.js} +10 -11
- package/lib/utils/enhances/a11yEnhance.js.map +1 -0
- package/lib/utils/enhances/a11yEnhance.mjs +7 -7
- package/lib/utils/enhances/a11yEnhance.mjs.map +1 -1
- package/lib/utils/enhances/animatedSizeEnhance.d.ts +1 -1
- package/lib/utils/enhances/{animatedSizeEnhance.cjs → animatedSizeEnhance.js} +13 -11
- package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -0
- package/lib/utils/enhances/animatedSizeEnhance.mjs +11 -7
- package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -1
- package/lib/utils/enhances/autoFocusEnhance.d.ts +1 -1
- package/lib/utils/enhances/{autoFocusEnhance.cjs → autoFocusEnhance.js} +3 -4
- package/lib/utils/enhances/autoFocusEnhance.js.map +1 -0
- package/lib/utils/enhances/autoFocusEnhance.mjs.map +1 -1
- package/lib/utils/enhances/{contextEnhance.cjs → contextEnhance.js} +3 -4
- package/lib/utils/enhances/contextEnhance.js.map +1 -0
- package/lib/utils/enhances/contextEnhance.mjs.map +1 -1
- package/lib/utils/enhances/i18nEnhance.d.ts +2 -2
- package/lib/utils/enhances/{i18nEnhance.cjs → i18nEnhance.js} +11 -11
- package/lib/utils/enhances/i18nEnhance.js.map +1 -0
- package/lib/utils/enhances/i18nEnhance.mjs +36 -37
- package/lib/utils/enhances/i18nEnhance.mjs.map +1 -1
- package/lib/utils/enhances/keyboardFocusEnhance.d.ts +1 -1
- package/lib/utils/enhances/{keyboardFocusEnhance.cjs → keyboardFocusEnhance.js} +8 -8
- package/lib/utils/enhances/keyboardFocusEnhance.js.map +1 -0
- package/lib/utils/enhances/keyboardFocusEnhance.mjs +2 -2
- package/lib/utils/enhances/keyboardFocusEnhance.mjs.map +1 -1
- package/lib/utils/enhances/{resolveColorEnhance.cjs → resolveColorEnhance.js} +5 -6
- package/lib/utils/enhances/resolveColorEnhance.js.map +1 -0
- package/lib/utils/enhances/resolveColorEnhance.mjs +2 -2
- package/lib/utils/enhances/resolveColorEnhance.mjs.map +1 -1
- package/lib/utils/{eventEmitter.cjs → eventEmitter.js} +3 -4
- package/lib/utils/eventEmitter.js.map +1 -0
- package/lib/utils/eventEmitter.mjs.map +1 -1
- package/lib/utils/findComponent.d.ts +2 -2
- package/lib/utils/{findComponent.cjs → findComponent.js} +15 -16
- package/lib/utils/findComponent.js.map +1 -0
- package/lib/utils/findComponent.mjs +12 -12
- package/lib/utils/findComponent.mjs.map +1 -1
- package/lib/utils/{fire.cjs → fire.js} +2 -2
- package/lib/utils/fire.js.map +1 -0
- package/lib/utils/fire.mjs.map +1 -1
- package/lib/utils/focus-lock/{focusBorders.cjs → focusBorders.js} +13 -17
- package/lib/utils/focus-lock/focusBorders.js.map +1 -0
- package/lib/utils/focus-lock/focusBorders.mjs +8 -8
- package/lib/utils/focus-lock/focusBorders.mjs.map +1 -1
- package/lib/utils/focus-lock/{getFocusableIn.cjs → getFocusableIn.js} +3 -4
- package/lib/utils/focus-lock/getFocusableIn.js.map +1 -0
- package/lib/utils/focus-lock/getFocusableIn.mjs +1 -1
- package/lib/utils/focus-lock/getFocusableIn.mjs.map +1 -1
- package/lib/utils/focus-lock/{isFocusInside.cjs → isFocusInside.js} +2 -3
- package/lib/utils/focus-lock/isFocusInside.js.map +1 -0
- package/lib/utils/focus-lock/isFocusInside.mjs.map +1 -1
- package/lib/utils/focus-lock/{isFocusable.cjs → isFocusable.js} +3 -4
- package/lib/utils/focus-lock/isFocusable.js.map +1 -0
- package/lib/utils/focus-lock/isFocusable.mjs.map +1 -1
- package/lib/utils/focus-lock/{setFocus.cjs → setFocus.js} +5 -6
- package/lib/utils/focus-lock/setFocus.js.map +1 -0
- package/lib/utils/focus-lock/setFocus.mjs +2 -2
- package/lib/utils/focus-lock/setFocus.mjs.map +1 -1
- package/lib/utils/{getAccessibleName.cjs → getAccessibleName.js} +2 -2
- package/lib/utils/getAccessibleName.js.map +1 -0
- package/lib/utils/getAccessibleName.mjs.map +1 -1
- package/lib/utils/getDisplayName.d.ts +1 -1
- package/lib/utils/{getDisplayName.cjs → getDisplayName.js} +1 -1
- package/lib/utils/getDisplayName.js.map +1 -0
- package/lib/utils/getDisplayName.mjs +5 -3
- package/lib/utils/getDisplayName.mjs.map +1 -1
- package/lib/utils/{getEventTarget.cjs → getEventTarget.js} +3 -4
- package/lib/utils/getEventTarget.js.map +1 -0
- package/lib/utils/getEventTarget.mjs.map +1 -1
- package/lib/utils/{getOriginChildren.cjs → getOriginChildren.js} +4 -5
- package/lib/utils/getOriginChildren.js.map +1 -0
- package/lib/utils/getOriginChildren.mjs +1 -1
- package/lib/utils/getOriginChildren.mjs.map +1 -1
- package/lib/utils/{getRandomInt.cjs → getRandomInt.js} +1 -1
- package/lib/utils/getRandomInt.js.map +1 -0
- package/lib/utils/getRandomInt.mjs.map +1 -1
- package/lib/utils/{getValue.cjs → getValue.js} +2 -4
- package/lib/utils/getValue.js.map +1 -0
- package/lib/utils/getValue.mjs +1 -3
- package/lib/utils/getValue.mjs.map +1 -1
- package/lib/utils/{hasLabels.cjs → hasLabels.js} +6 -7
- package/lib/utils/hasLabels.js.map +1 -0
- package/lib/utils/hasLabels.mjs +3 -3
- package/lib/utils/hasLabels.mjs.map +1 -1
- package/lib/utils/{hasParent.cjs → hasParent.js} +3 -4
- package/lib/utils/hasParent.js.map +1 -0
- package/lib/utils/hasParent.mjs +3 -2
- package/lib/utils/hasParent.mjs.map +1 -1
- package/lib/utils/if.d.ts +2 -2
- package/lib/utils/{if.cjs → if.js} +2 -3
- package/lib/utils/if.js.map +1 -0
- package/lib/utils/if.mjs.map +1 -1
- package/lib/utils/ifChildren.d.ts +1 -1
- package/lib/utils/{ifChildren.cjs → ifChildren.js} +2 -3
- package/lib/utils/ifChildren.js.map +1 -0
- package/lib/utils/ifChildren.mjs.map +1 -1
- package/lib/utils/{injectStyle.cjs → injectStyle.js} +4 -6
- package/lib/utils/injectStyle.js.map +1 -0
- package/lib/utils/injectStyle.mjs +1 -2
- package/lib/utils/injectStyle.mjs.map +1 -1
- package/lib/utils/{inputProps.cjs → inputProps.js} +2 -3
- package/lib/utils/inputProps.js.map +1 -0
- package/lib/utils/inputProps.mjs.map +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.cjs → isNode.js} +2 -2
- package/lib/utils/isNode.js.map +1 -0
- package/lib/utils/isNode.mjs.map +1 -1
- package/lib/utils/{isPromise.cjs → isPromise.js} +1 -1
- package/lib/utils/isPromise.js.map +1 -0
- package/lib/utils/isPromise.mjs.map +1 -1
- package/lib/utils/{isRetina.cjs → isRetina.js} +1 -1
- package/lib/utils/isRetina.js.map +1 -0
- package/lib/utils/isRetina.mjs.map +1 -1
- package/lib/utils/{logger.cjs → logger.js} +5 -8
- package/lib/utils/logger.js.map +1 -0
- package/lib/utils/logger.mjs +1 -2
- package/lib/utils/logger.mjs.map +1 -1
- package/lib/utils/{numericChecker.cjs → numericChecker.js} +1 -1
- package/lib/utils/numericChecker.js.map +1 -0
- package/lib/utils/numericChecker.mjs.map +1 -1
- package/lib/utils/{ownerDocument.cjs → ownerDocument.js} +1 -1
- package/lib/utils/ownerDocument.js.map +1 -0
- package/lib/utils/ownerDocument.mjs.map +1 -1
- package/lib/utils/{pick.cjs → pick.js} +1 -1
- package/lib/utils/pick.js.map +1 -0
- package/lib/utils/pick.mjs.map +1 -1
- package/lib/utils/propsForElement.d.ts +1 -1
- package/lib/utils/{propsForElement.cjs → propsForElement.js} +3 -4
- package/lib/utils/propsForElement.js.map +1 -0
- package/lib/utils/propsForElement.mjs.map +1 -1
- package/lib/utils/{rafTrottle.cjs → rafTrottle.js} +2 -3
- package/lib/utils/rafTrottle.js.map +1 -0
- package/lib/utils/rafTrottle.mjs.map +1 -1
- package/lib/utils/reactToText.d.ts +1 -1
- package/lib/utils/{reactToText.cjs → reactToText.js} +2 -3
- package/lib/utils/reactToText.js.map +1 -0
- package/lib/utils/reactToText.mjs.map +1 -1
- package/lib/utils/ref.d.ts +4 -2
- package/lib/utils/{ref.cjs → ref.js} +4 -3
- package/lib/utils/ref.js.map +1 -0
- package/lib/utils/ref.mjs +46 -2
- package/lib/utils/ref.mjs.map +1 -1
- package/lib/utils/{setRef.cjs → setRef.js} +2 -3
- package/lib/utils/setRef.js.map +1 -0
- package/lib/utils/setRef.mjs.map +1 -1
- package/lib/utils/{syncScroll.cjs → syncScroll.js} +3 -3
- package/lib/utils/syncScroll.js.map +1 -0
- package/lib/utils/syncScroll.mjs +1 -1
- package/lib/utils/syncScroll.mjs.map +1 -1
- package/lib/utils/uncontroll.d.ts +1 -1
- package/lib/utils/{uncontroll.cjs → uncontroll.js} +2 -2
- package/lib/utils/uncontroll.js.map +1 -0
- package/lib/utils/uncontroll.mjs.map +1 -1
- package/lib/utils/uniqueID.d.ts +1 -1
- package/lib/utils/{uniqueID.cjs → uniqueID.js} +6 -6
- package/lib/utils/uniqueID.js.map +1 -0
- package/lib/utils/uniqueID.mjs +3 -0
- package/lib/utils/uniqueID.mjs.map +1 -1
- package/lib/utils/use/{useColorResolver.cjs → useColorResolver.js} +8 -107
- package/lib/utils/use/useColorResolver.js.map +1 -0
- package/lib/utils/use/useColorResolver.mjs +5 -103
- package/lib/utils/use/useColorResolver.mjs.map +1 -1
- package/lib/utils/use/useCss.d.ts +1 -1
- package/lib/utils/use/{useCss.cjs → useCss.js} +3 -4
- package/lib/utils/use/useCss.js.map +1 -0
- package/lib/utils/use/useCss.mjs.map +1 -1
- package/lib/utils/use/{useEnhancedEffect.cjs → useEnhancedEffect.js} +3 -4
- package/lib/utils/use/useEnhancedEffect.js.map +1 -0
- package/lib/utils/use/useEnhancedEffect.mjs.map +1 -1
- package/lib/utils/use/{useEventCallback.cjs → useEventCallback.js} +2 -2
- package/lib/utils/use/useEventCallback.js.map +1 -0
- package/lib/utils/use/useEventCallback.mjs.map +1 -1
- package/lib/utils/use/{useEventListener.cjs → useEventListener.js} +4 -5
- package/lib/utils/use/useEventListener.js.map +1 -0
- package/lib/utils/use/useEventListener.mjs +1 -1
- package/lib/utils/use/useEventListener.mjs.map +1 -1
- package/lib/utils/use/useFocusLock.d.ts +1 -1
- package/lib/utils/use/{useFocusLock.cjs → useFocusLock.js} +9 -12
- package/lib/utils/use/useFocusLock.js.map +1 -0
- package/lib/utils/use/useFocusLock.mjs +4 -4
- package/lib/utils/use/useFocusLock.mjs.map +1 -1
- package/lib/utils/use/{usePreventScroll.cjs → usePreventScroll.js} +3 -3
- package/lib/utils/use/usePreventScroll.js.map +1 -0
- package/lib/utils/use/usePreventScroll.mjs +1 -1
- package/lib/utils/use/usePreventScroll.mjs.map +1 -1
- package/lib/utils/useCssVariable.d.ts +2 -2
- package/lib/utils/{useCssVariable.cjs → useCssVariable.js} +4 -6
- package/lib/utils/useCssVariable.js.map +1 -0
- package/lib/utils/useCssVariable.mjs.map +1 -1
- package/lib/utils/{zIndexStacking.cjs → zIndexStacking.js} +7 -10
- package/lib/utils/zIndexStacking.js.map +1 -0
- package/lib/utils/zIndexStacking.mjs +2 -2
- package/lib/utils/zIndexStacking.mjs.map +1 -1
- package/package.json +45 -23
- package/vite.config.ts +1 -1
- package/lib/LastInteractionType.cjs.map +0 -1
- package/lib/core-types/Component.cjs +0 -59
- package/lib/core-types/Component.cjs.map +0 -1
- package/lib/core-types/UnknownProperties.cjs +0 -2
- package/lib/core-types/UnknownProperties.cjs.map +0 -1
- package/lib/core-types/reshadow.d.cjs +0 -2
- package/lib/core-types/reshadow.d.cjs.map +0 -1
- package/lib/core-types/symbols.cjs +0 -25
- package/lib/core-types/symbols.cjs.map +0 -1
- package/lib/coreFactory.cjs.map +0 -1
- package/lib/enhancement/Children.cjs.map +0 -1
- package/lib/enhancement/Root.cjs.map +0 -1
- package/lib/enhancement/bindHandler.cjs.map +0 -1
- package/lib/enhancement/dataName.cjs.map +0 -1
- package/lib/enhancement/enhance.cjs.map +0 -1
- package/lib/enhancement/functionDefaultProps.cjs.map +0 -1
- package/lib/enhancement/hoistProps.cjs.map +0 -1
- package/lib/enhancement/i18n.cjs.map +0 -1
- package/lib/enhancement/inheritedName.cjs.map +0 -1
- package/lib/enhancement/staticChildren.cjs.map +0 -1
- package/lib/enhancement/style.cjs.map +0 -1
- package/lib/enhancement/uncontrolledProps.cjs.map +0 -1
- package/lib/index.cjs.map +0 -1
- package/lib/register.cjs.map +0 -1
- package/lib/styled/index.cjs.map +0 -1
- package/lib/styled/reshadow-core.cjs.map +0 -1
- package/lib/styled/sstyled.cjs.map +0 -1
- package/lib/theme/processor.cjs.map +0 -1
- package/lib/theme/themes/dark.cjs.map +0 -1
- package/lib/theme/themes/default.cjs.map +0 -1
- package/lib/theme/themes/light.cjs.map +0 -1
- package/lib/theme/utils.cjs.map +0 -1
- package/lib/utils/CSSinJS.cjs.map +0 -1
- package/lib/utils/ScreenReaderOnly.cjs.map +0 -1
- package/lib/utils/ThemeProvider.cjs.map +0 -1
- package/lib/utils/addonText.cjs.map +0 -1
- package/lib/utils/addonTextChildren.cjs.map +0 -1
- package/lib/utils/ariaProps.cjs.map +0 -1
- package/lib/utils/assignProps.cjs.map +0 -1
- package/lib/utils/canUseDOM.cjs.map +0 -1
- package/lib/utils/capitalizeFirstLetter.cjs.map +0 -1
- package/lib/utils/color.cjs.map +0 -1
- package/lib/utils/compose.cjs.map +0 -1
- package/lib/utils/createHoc.cjs.map +0 -1
- package/lib/utils/createUUID.cjs.map +0 -1
- package/lib/utils/cssToIntDefault.cjs.map +0 -1
- package/lib/utils/enhances/WithAutoFocus.cjs.map +0 -1
- package/lib/utils/enhances/WithCSS.cjs.map +0 -1
- package/lib/utils/enhances/WithI18n.cjs.map +0 -1
- package/lib/utils/enhances/WithKeyboardFocus.cjs.map +0 -1
- package/lib/utils/enhances/WithRef.cjs.map +0 -1
- package/lib/utils/enhances/a11yEnhance.cjs.map +0 -1
- package/lib/utils/enhances/animatedSizeEnhance.cjs.map +0 -1
- package/lib/utils/enhances/autoFocusEnhance.cjs.map +0 -1
- package/lib/utils/enhances/contextEnhance.cjs.map +0 -1
- package/lib/utils/enhances/i18nEnhance.cjs.map +0 -1
- package/lib/utils/enhances/keyboardFocusEnhance.cjs.map +0 -1
- package/lib/utils/enhances/resolveColorEnhance.cjs.map +0 -1
- package/lib/utils/eventEmitter.cjs.map +0 -1
- package/lib/utils/findComponent.cjs.map +0 -1
- package/lib/utils/fire.cjs.map +0 -1
- package/lib/utils/focus-lock/focusBorders.cjs.map +0 -1
- package/lib/utils/focus-lock/getFocusableIn.cjs.map +0 -1
- package/lib/utils/focus-lock/isFocusInside.cjs.map +0 -1
- package/lib/utils/focus-lock/isFocusable.cjs.map +0 -1
- package/lib/utils/focus-lock/setFocus.cjs.map +0 -1
- package/lib/utils/getAccessibleName.cjs.map +0 -1
- package/lib/utils/getDisplayName.cjs.map +0 -1
- package/lib/utils/getEventTarget.cjs.map +0 -1
- package/lib/utils/getOriginChildren.cjs.map +0 -1
- package/lib/utils/getRandomInt.cjs.map +0 -1
- package/lib/utils/getValue.cjs.map +0 -1
- package/lib/utils/hasLabels.cjs.map +0 -1
- package/lib/utils/hasParent.cjs.map +0 -1
- package/lib/utils/if.cjs.map +0 -1
- package/lib/utils/ifChildren.cjs.map +0 -1
- package/lib/utils/injectStyle.cjs.map +0 -1
- package/lib/utils/inputProps.cjs.map +0 -1
- package/lib/utils/isNode.cjs.map +0 -1
- package/lib/utils/isPromise.cjs.map +0 -1
- package/lib/utils/isRetina.cjs.map +0 -1
- package/lib/utils/logger.cjs.map +0 -1
- package/lib/utils/numericChecker.cjs.map +0 -1
- package/lib/utils/ownerDocument.cjs.map +0 -1
- package/lib/utils/pick.cjs.map +0 -1
- package/lib/utils/propsForElement.cjs.map +0 -1
- package/lib/utils/rafTrottle.cjs.map +0 -1
- package/lib/utils/reactToText.cjs.map +0 -1
- package/lib/utils/ref.cjs.map +0 -1
- package/lib/utils/setRef.cjs.map +0 -1
- package/lib/utils/syncScroll.cjs.map +0 -1
- package/lib/utils/uncontroll.cjs.map +0 -1
- package/lib/utils/uniqueID.cjs.map +0 -1
- package/lib/utils/use/useColorResolver.cjs.map +0 -1
- package/lib/utils/use/useCss.cjs.map +0 -1
- package/lib/utils/use/useEnhancedEffect.cjs.map +0 -1
- package/lib/utils/use/useEventCallback.cjs.map +0 -1
- package/lib/utils/use/useEventListener.cjs.map +0 -1
- package/lib/utils/use/useFocusLock.cjs.map +0 -1
- package/lib/utils/use/usePreventScroll.cjs.map +0 -1
- package/lib/utils/useCssVariable.cjs.map +0 -1
- package/lib/utils/zIndexStacking.cjs.map +0 -1
|
@@ -3,7 +3,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
5
|
import React from "react";
|
|
6
|
-
import {
|
|
6
|
+
import { CHILDREN_COMPONENT, CONTEXT_COMPONENT } from "../core-types/symbols.mjs";
|
|
7
7
|
var _excluded = ["handlers", "getters"], _excluded2 = ["handlers"];
|
|
8
8
|
var CHILDREN_SELF = Symbol("CHILDREN_SELF");
|
|
9
9
|
var GETTER_REG = /^get[\w]+Props$/;
|
|
@@ -47,8 +47,8 @@ function assignGettersChain(getters) {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
function createChildren(Context, contexts) {
|
|
50
|
-
var
|
|
51
|
-
var children =
|
|
50
|
+
var _Children = function Children() {
|
|
51
|
+
var children = _Children.origin;
|
|
52
52
|
if (typeof children === "function") {
|
|
53
53
|
var _reduce = [].concat(_toConsumableArray(contexts), [Context]).reduce(function(acc, ctx) {
|
|
54
54
|
var _ref3 = React.useContext(ctx), handlers2 = _ref3.handlers, propsAndGetters = _objectWithoutProperties(_ref3, _excluded2);
|
|
@@ -57,7 +57,7 @@ function createChildren(Context, contexts) {
|
|
|
57
57
|
handlers: Object.assign({}, acc.handlers, handlers2),
|
|
58
58
|
getters: mergeObjects(acc.getters, getters2)
|
|
59
59
|
}, props2));
|
|
60
|
-
},
|
|
60
|
+
}, _Children.props), _reduce$handlers = _reduce.handlers, handlers = _reduce$handlers === void 0 ? {} : _reduce$handlers, _reduce$getters = _reduce.getters, getters = _reduce$getters === void 0 ? {} : _reduce$getters, props = _objectWithoutProperties(_reduce, _excluded);
|
|
61
61
|
var mergedGetters = Object.entries(getters).reduce(function(acc, _ref4) {
|
|
62
62
|
var _ref5 = _slicedToArray(_ref4, 2), key = _ref5[0], value = _ref5[1];
|
|
63
63
|
acc[key] = assignGettersChain(value);
|
|
@@ -69,10 +69,10 @@ function createChildren(Context, contexts) {
|
|
|
69
69
|
}
|
|
70
70
|
return children;
|
|
71
71
|
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return
|
|
72
|
+
_Children.origin = null;
|
|
73
|
+
_Children.props = {};
|
|
74
|
+
_Children[CHILDREN_COMPONENT] = true;
|
|
75
|
+
return _Children;
|
|
76
76
|
}
|
|
77
77
|
function Enhancement(Context, parent) {
|
|
78
78
|
return {
|
|
@@ -8,11 +8,7 @@ var _excluded = ["render"], _excluded2 = ["Root", "styles", "children", "Childre
|
|
|
8
8
|
function createRootRender() {
|
|
9
9
|
var Root = /* @__PURE__ */ React.forwardRef(function(_ref, ref) {
|
|
10
10
|
var Tag = _ref.render, source = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
-
var _Root$props = Root.props;
|
|
12
|
-
_Root$props.Root;
|
|
13
|
-
_Root$props.styles;
|
|
14
|
-
_Root$props.children;
|
|
15
|
-
var Children = _Root$props.Children, _Root$props$forwardRe = _Root$props.forwardRef, forwardRef = _Root$props$forwardRe === void 0 ? null : _Root$props$forwardRe, props = _objectWithoutProperties(_Root$props, _excluded2);
|
|
11
|
+
var _Root$props = Root.props, _Root = _Root$props.Root, _styles = _Root$props.styles, _children = _Root$props.children, Children = _Root$props.Children, _Root$props$forwardRe = _Root$props.forwardRef, forwardRef = _Root$props$forwardRe === void 0 ? null : _Root$props$forwardRe, props = _objectWithoutProperties(_Root$props, _excluded2);
|
|
16
12
|
var clearProps = Object.entries(props).reduce(function(props2, _ref2) {
|
|
17
13
|
var _ref3 = _slicedToArray(_ref2, 2), name = _ref3[0], value = _ref3[1];
|
|
18
14
|
if (value !== void 0) {
|
|
@@ -41,7 +37,7 @@ function Enhancement() {
|
|
|
41
37
|
init: function init() {
|
|
42
38
|
this.Root = createRootRender();
|
|
43
39
|
},
|
|
44
|
-
asProps: function asProps(props,
|
|
40
|
+
asProps: function asProps(props, _WrapperComponent, isFunction) {
|
|
45
41
|
if (isFunction) {
|
|
46
42
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
47
43
|
Root: this.Root
|
|
@@ -30,7 +30,7 @@ function handlerBinder(fn) {
|
|
|
30
30
|
handlerBinder.hasher = /* @__PURE__ */ new WeakMap();
|
|
31
31
|
function Enhancement() {
|
|
32
32
|
return {
|
|
33
|
-
condition: function condition(
|
|
33
|
+
condition: function condition(_Component, isFunction) {
|
|
34
34
|
return !isFunction;
|
|
35
35
|
},
|
|
36
36
|
init: function init() {
|
|
@@ -4,8 +4,8 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
4
4
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
5
5
|
import React from "react";
|
|
6
6
|
import assignProps from "../utils/assignProps.mjs";
|
|
7
|
-
import useEnhancedEffect from "../utils/use/useEnhancedEffect.mjs";
|
|
8
7
|
import pick from "../utils/pick.mjs";
|
|
8
|
+
import useEnhancedEffect from "../utils/use/useEnhancedEffect.mjs";
|
|
9
9
|
var HOIST_CONTEXT = Symbol("HOIST_CONTEXT");
|
|
10
10
|
var HOIST_SELF = Symbol("HOIST_SELF");
|
|
11
11
|
var HOIST_SET = Symbol("HOIST_SET");
|
|
@@ -28,7 +28,7 @@ function Enhancement(childComponents, Context) {
|
|
|
28
28
|
return Boolean((_Component$hoistProps = Component2.hoistProps) === null || _Component$hoistProps === void 0 ? void 0 : _Component$hoistProps.length);
|
|
29
29
|
});
|
|
30
30
|
},
|
|
31
|
-
init: function init(
|
|
31
|
+
init: function init(_props, _WrapperComponent, isFunction) {
|
|
32
32
|
var _this = this;
|
|
33
33
|
if (isFunction) {
|
|
34
34
|
this[HOIST_SELF] = React.useState({});
|
|
@@ -3,8 +3,8 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import assignProps from "../utils/assignProps.mjs";
|
|
6
|
-
import pick from "../utils/pick.mjs";
|
|
7
6
|
import logger from "../utils/logger.mjs";
|
|
7
|
+
import pick from "../utils/pick.mjs";
|
|
8
8
|
function assign(target, source) {
|
|
9
9
|
return Object.defineProperties(target, Object.keys(source).reduce(function(descriptors, key) {
|
|
10
10
|
descriptors[key] = Object.getOwnPropertyDescriptor(source, key);
|
|
@@ -3,6 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { STATIC_COMPONENT } from "./staticChildren.mjs";
|
|
6
|
+
import "../styled/index.mjs";
|
|
6
7
|
import { sstyled } from "../styled/sstyled.mjs";
|
|
7
8
|
var _excluded = ["_styles", "styles"], _excluded2 = ["styles"];
|
|
8
9
|
var STYLES_CONTEXT = Symbol("STYLES_CONTEXT");
|
|
@@ -27,9 +28,7 @@ function Enhancement(childComponents, Context) {
|
|
|
27
28
|
return _objectSpread(_objectSpread({}, _context), {}, _defineProperty({}, STYLES_CONTEXT, this[STYLES_SELF]));
|
|
28
29
|
},
|
|
29
30
|
asProps: function asProps(_ref) {
|
|
30
|
-
_ref._styles;
|
|
31
|
-
_ref.styles;
|
|
32
|
-
var props = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
var _styles = _ref._styles, styles = _ref.styles, props = _objectWithoutProperties(_ref, _excluded);
|
|
33
32
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
34
33
|
styles: this[STYLES_SELF]
|
|
35
34
|
});
|
|
@@ -41,7 +41,6 @@ function uncontrolledProp(self, propName, propValue, propDefaultValue, propHandl
|
|
|
41
41
|
function uncontrolledUniversal(props, config, uncontrolledProp2) {
|
|
42
42
|
var handlerProps = {};
|
|
43
43
|
var uncontrolledProps = Object.keys(config).reduce(function(result, propName) {
|
|
44
|
-
var _objectSpread2;
|
|
45
44
|
var handlerName = handlerProp(propName);
|
|
46
45
|
var defaultPropName = defaultProp(propName);
|
|
47
46
|
var propDefaultValue = result[defaultPropName], propValue = result[propName], propHandler = result[handlerName], other = _objectWithoutProperties(result, [defaultPropName, propName, handlerName].map(_toPropertyKey));
|
|
@@ -61,7 +60,7 @@ function uncontrolledUniversal(props, config, uncontrolledProp2) {
|
|
|
61
60
|
};
|
|
62
61
|
var _uncontrolledProp = uncontrolledProp2(propName, propValue, propDefaultValue, propHandler, chainHandler), _uncontrolledProp2 = _slicedToArray(_uncontrolledProp, 2), value = _uncontrolledProp2[0], handler = _uncontrolledProp2[1];
|
|
63
62
|
handlerProps[propName] = handler;
|
|
64
|
-
return _objectSpread(_objectSpread({}, other), {}, (
|
|
63
|
+
return _objectSpread(_objectSpread({}, other), {}, _defineProperty(_defineProperty({}, propName, value), handlerName, function(eventOrValue) {
|
|
65
64
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
66
65
|
args[_key2 - 1] = arguments[_key2];
|
|
67
66
|
}
|
|
@@ -70,7 +69,7 @@ function uncontrolledUniversal(props, config, uncontrolledProp2) {
|
|
|
70
69
|
result2.push(eventOrValue);
|
|
71
70
|
}
|
|
72
71
|
return handler.apply(void 0, _toConsumableArray(result2));
|
|
73
|
-
})
|
|
72
|
+
}));
|
|
74
73
|
}, props);
|
|
75
74
|
return [uncontrolledProps, handlerProps];
|
|
76
75
|
}
|
package/lib/esm/index.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { assignProps, createBaseComponent, createComponent } from "./coreFactory.mjs";
|
|
2
1
|
import { Component, Intergalactic, Root, wrapIntergalacticComponent } from "./core-types/Component.mjs";
|
|
3
2
|
import { CHILDREN_COMPONENT, CONTEXT_COMPONENT, CORE_INSTANCE, CREATE_COMPONENT, INHERITED_NAME } from "./core-types/symbols.mjs";
|
|
4
|
-
import {
|
|
3
|
+
import { assignProps, createBaseComponent, createComponent } from "./coreFactory.mjs";
|
|
5
4
|
import { lastInteraction } from "./LastInteractionType.mjs";
|
|
5
|
+
import { default as default2 } from "./register.mjs";
|
|
6
|
+
import "./styled/index.mjs";
|
|
6
7
|
import { sstyled } from "./styled/sstyled.mjs";
|
|
7
8
|
export {
|
|
8
9
|
CHILDREN_COMPONENT,
|
package/lib/esm/register.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var Register = /* @__PURE__ */ function() {
|
|
|
6
6
|
_classCallCheck(this, Register2);
|
|
7
7
|
_defineProperty(this, "data", {});
|
|
8
8
|
}
|
|
9
|
-
_createClass(Register2, [{
|
|
9
|
+
return _createClass(Register2, [{
|
|
10
10
|
key: "get",
|
|
11
11
|
value: function get(name, defaultValue) {
|
|
12
12
|
if (name in this.data) {
|
|
@@ -22,7 +22,6 @@ var Register = /* @__PURE__ */ function() {
|
|
|
22
22
|
return this.data[name];
|
|
23
23
|
}
|
|
24
24
|
}]);
|
|
25
|
-
return Register2;
|
|
26
25
|
}();
|
|
27
26
|
const register = new Register();
|
|
28
27
|
export {
|
|
@@ -1,5 +1,70 @@
|
|
|
1
|
-
import "@babel/runtime/helpers/esm/typeof";
|
|
2
|
-
import "@babel/runtime/helpers/esm/defineProperty";
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
var _Symbol = function _Symbol2(key) {
|
|
4
|
+
return typeof Symbol !== "undefined" ? Symbol(key) : key;
|
|
5
|
+
};
|
|
6
|
+
var KEYS = {
|
|
7
|
+
__id__: _Symbol("__id__"),
|
|
8
|
+
__store__: _Symbol("__store__"),
|
|
9
|
+
__prev__: _Symbol("__prev__"),
|
|
10
|
+
__use__: _Symbol("__use__"),
|
|
11
|
+
__elements__: "__elements__",
|
|
12
|
+
__style__: "$$style",
|
|
13
|
+
__styles__: "styles",
|
|
14
|
+
__css__: "__css__",
|
|
15
|
+
__hash__: "__hash__",
|
|
16
|
+
/**
|
|
17
|
+
* This prop is needed for the interop between different component frameworks
|
|
18
|
+
*/
|
|
19
|
+
__classProp__: "className"
|
|
20
|
+
};
|
|
21
|
+
var index = 0;
|
|
22
|
+
var use = function use2(obj) {
|
|
23
|
+
var result = {};
|
|
24
|
+
result[KEYS.__use__] = obj;
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
var create = function create2(args) {
|
|
28
|
+
var len = args.length;
|
|
29
|
+
var newStyle = {};
|
|
30
|
+
var id = "";
|
|
31
|
+
var vars = null;
|
|
32
|
+
var uses = null;
|
|
33
|
+
for (var i = 0; i < len; i++) {
|
|
34
|
+
var _style = args[i];
|
|
35
|
+
if (!_style) continue;
|
|
36
|
+
if (!_style[KEYS.__id__]) {
|
|
37
|
+
_style[KEYS.__id__] = ++index;
|
|
38
|
+
_style[KEYS.__store__] = _defineProperty({}, "_" + _style[KEYS.__id__], _style);
|
|
39
|
+
}
|
|
40
|
+
id += "_" + _style[KEYS.__id__];
|
|
41
|
+
if (_style[KEYS.__style__]) {
|
|
42
|
+
vars = Object.assign(vars || {}, _style[KEYS.__style__]);
|
|
43
|
+
}
|
|
44
|
+
if (_style[KEYS.__use__]) {
|
|
45
|
+
uses = Object.assign(uses || {}, _style[KEYS.__use__]);
|
|
46
|
+
}
|
|
47
|
+
if (_style[KEYS.__store__][id]) {
|
|
48
|
+
newStyle = _style[KEYS.__store__][id];
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
newStyle = Object.create(newStyle);
|
|
52
|
+
for (var key in _style) {
|
|
53
|
+
if (key in KEYS) continue;
|
|
54
|
+
newStyle[key] = appendClassName(_style[key], newStyle[key]);
|
|
55
|
+
}
|
|
56
|
+
_style[KEYS.__store__][id] = newStyle;
|
|
57
|
+
newStyle[KEYS.__id__] = index;
|
|
58
|
+
newStyle[KEYS.__store__] = _defineProperty({}, "_" + _style[KEYS.__id__], newStyle);
|
|
59
|
+
}
|
|
60
|
+
if (vars || use) {
|
|
61
|
+
newStyle = Object.create(newStyle);
|
|
62
|
+
newStyle[KEYS.__style__] = vars;
|
|
63
|
+
newStyle[KEYS.__use__] = uses;
|
|
64
|
+
}
|
|
65
|
+
return newStyle;
|
|
66
|
+
};
|
|
67
|
+
var isSSR = !(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
3
68
|
var serverMap = {};
|
|
4
69
|
var getStyles = function getStyles2() {
|
|
5
70
|
return {
|
|
@@ -13,6 +78,157 @@ var getStyles = function getStyles2() {
|
|
|
13
78
|
}
|
|
14
79
|
};
|
|
15
80
|
};
|
|
81
|
+
var clearStyles = function clearStyles2() {
|
|
82
|
+
serverStyles = "";
|
|
83
|
+
};
|
|
84
|
+
var RESHADOW_ID = "__reshadow__";
|
|
85
|
+
var appendChildToDocumentHead = function appendChildToDocumentHead2(element) {
|
|
86
|
+
return document.head.appendChild(element);
|
|
87
|
+
};
|
|
88
|
+
var css = function css2(code, hash) {
|
|
89
|
+
var id = "reshadow-".concat(hash);
|
|
90
|
+
if (isSSR) {
|
|
91
|
+
serverMap[id] = code;
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
var container = document.getElementById(RESHADOW_ID);
|
|
95
|
+
if (!container) {
|
|
96
|
+
container = document.createElement("object");
|
|
97
|
+
container.id = RESHADOW_ID;
|
|
98
|
+
if (document.head) {
|
|
99
|
+
appendChildToDocumentHead(container);
|
|
100
|
+
} else {
|
|
101
|
+
document.addEventListener("DOMContentLoaded", function() {
|
|
102
|
+
appendChildToDocumentHead(container);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
var css3 = document.getElementById(id);
|
|
107
|
+
if (!css3) {
|
|
108
|
+
css3 = document.createElement("style");
|
|
109
|
+
css3.id = id;
|
|
110
|
+
css3.type = "text/css";
|
|
111
|
+
container.appendChild(css3);
|
|
112
|
+
}
|
|
113
|
+
css3.innerHTML = code;
|
|
114
|
+
};
|
|
115
|
+
var styles = {};
|
|
116
|
+
var style;
|
|
117
|
+
var stack = [];
|
|
118
|
+
var _styled = function styled(elem) {
|
|
119
|
+
var curr = stack.pop() || [];
|
|
120
|
+
styles = curr[0] || styles;
|
|
121
|
+
style = curr[1] || style;
|
|
122
|
+
_styled[KEYS.__styles__] = styles;
|
|
123
|
+
_styled[KEYS.__style__] = style;
|
|
124
|
+
return elem;
|
|
125
|
+
};
|
|
126
|
+
_styled[KEYS.__styles__] = styles;
|
|
127
|
+
var set = function set2(args, newStyle) {
|
|
128
|
+
var newStyles = create(args);
|
|
129
|
+
stack.push([styles, style]);
|
|
130
|
+
styles = newStyles;
|
|
131
|
+
style = newStyle;
|
|
132
|
+
if (styles[KEYS.__style__]) {
|
|
133
|
+
style = style ? Object.assign({}, style, styles[KEYS.__style__]) : styles[KEYS.__style__];
|
|
134
|
+
}
|
|
135
|
+
_styled[KEYS.__styles__] = styles;
|
|
136
|
+
_styled[KEYS.__style__] = style;
|
|
137
|
+
};
|
|
138
|
+
var USE_PREFIX = "use--";
|
|
139
|
+
var ELEMENT_PREFIX = "__";
|
|
140
|
+
var MOD_PREFIX = "_";
|
|
141
|
+
var MOD_SEPARATOR = "_";
|
|
142
|
+
var parseElement = function parseElement2(name) {
|
|
143
|
+
return name.replace(ELEMENT_PREFIX, "");
|
|
144
|
+
};
|
|
145
|
+
var parseAttribute = function parseAttribute2(name) {
|
|
146
|
+
return name.replace(MOD_PREFIX, "").split(MOD_SEPARATOR);
|
|
147
|
+
};
|
|
148
|
+
var appendClassName = function appendClassName2(className) {
|
|
149
|
+
var cn = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
150
|
+
if (className) {
|
|
151
|
+
cn += (cn ? " " : "") + className;
|
|
152
|
+
}
|
|
153
|
+
return cn;
|
|
154
|
+
};
|
|
155
|
+
var appendElement = function appendElement2(styles2, key) {
|
|
156
|
+
var cn = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
157
|
+
return appendClassName(styles2[ELEMENT_PREFIX + key], cn);
|
|
158
|
+
};
|
|
159
|
+
var appendModifier = function appendModifier2(styles2, key, value) {
|
|
160
|
+
var cn = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "";
|
|
161
|
+
if (value === void 0 || value === null || value === false || value === "") return cn;
|
|
162
|
+
cn = appendClassName(styles2[MOD_PREFIX + key], cn);
|
|
163
|
+
if (typeof value === "boolean" || _typeof(value) === "object" || typeof value === "function") return cn;
|
|
164
|
+
cn = appendClassName(styles2[MOD_SEPARATOR + key + MOD_SEPARATOR + value], cn);
|
|
165
|
+
return cn;
|
|
166
|
+
};
|
|
167
|
+
function map(element) {
|
|
168
|
+
var currStyles = _styled[KEYS.__styles__];
|
|
169
|
+
var nextProps = {};
|
|
170
|
+
var cn = appendElement(currStyles, element);
|
|
171
|
+
var vars = null;
|
|
172
|
+
var uses = currStyles[KEYS.__use__] || {};
|
|
173
|
+
var len = arguments.length;
|
|
174
|
+
var useProps;
|
|
175
|
+
for (var i = len - 1; i > 0; i--) {
|
|
176
|
+
var currProps = arguments[i];
|
|
177
|
+
if (!currProps) continue;
|
|
178
|
+
useProps = useProps || currProps[KEYS.__use__];
|
|
179
|
+
if (!vars && KEYS.__style__ in currProps) {
|
|
180
|
+
vars = _styled[KEYS.__style__];
|
|
181
|
+
}
|
|
182
|
+
for (var key in currProps) {
|
|
183
|
+
if (key === KEYS.__use__ || key === KEYS.__style__ || key in nextProps) {
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
var value = currProps[key];
|
|
187
|
+
cn = appendModifier(currStyles, key, value, cn);
|
|
188
|
+
var valueType = _typeof(value);
|
|
189
|
+
if (valueType === "string" || valueType === "boolean" || valueType === "number") {
|
|
190
|
+
var useKey = key + "_" + value;
|
|
191
|
+
if (key + "_true" in uses || useKey in uses) {
|
|
192
|
+
cn = appendModifier(currStyles, USE_PREFIX + key, value, cn);
|
|
193
|
+
if (uses[useKey]) {
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
nextProps[key] = value;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (useProps) {
|
|
202
|
+
for (var _key in useProps) {
|
|
203
|
+
var _value = useProps[_key];
|
|
204
|
+
cn = appendModifier(currStyles, USE_PREFIX + _key, _value, cn);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
cn = appendClassName(nextProps[KEYS.__classProp__], cn);
|
|
208
|
+
if (cn) nextProps[KEYS.__classProp__] = cn;
|
|
209
|
+
if (vars) {
|
|
210
|
+
nextProps.style = typeof style === "string" ? vars + (nextProps.style || "") : Object.assign({}, vars, nextProps.style || {});
|
|
211
|
+
}
|
|
212
|
+
return nextProps;
|
|
213
|
+
}
|
|
16
214
|
export {
|
|
17
|
-
|
|
215
|
+
ELEMENT_PREFIX,
|
|
216
|
+
KEYS,
|
|
217
|
+
MOD_PREFIX,
|
|
218
|
+
MOD_SEPARATOR,
|
|
219
|
+
RESHADOW_ID,
|
|
220
|
+
USE_PREFIX,
|
|
221
|
+
appendClassName,
|
|
222
|
+
appendElement,
|
|
223
|
+
appendModifier,
|
|
224
|
+
clearStyles,
|
|
225
|
+
create,
|
|
226
|
+
css,
|
|
227
|
+
getStyles,
|
|
228
|
+
map,
|
|
229
|
+
parseAttribute,
|
|
230
|
+
parseElement,
|
|
231
|
+
set,
|
|
232
|
+
_styled as styled,
|
|
233
|
+
use
|
|
18
234
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _cn from "classnames";
|
|
3
3
|
import { forkRef } from "./ref.mjs";
|
|
4
|
+
import "../styled/index.mjs";
|
|
4
5
|
import { sstyled } from "../styled/sstyled.mjs";
|
|
5
6
|
function callAllEventHandlers() {
|
|
6
7
|
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -19,6 +20,14 @@ function callAllEventHandlers() {
|
|
|
19
20
|
});
|
|
20
21
|
};
|
|
21
22
|
}
|
|
23
|
+
function assignHandlers(props, source) {
|
|
24
|
+
return Object.keys(source).reduce(function(proxySource, propName) {
|
|
25
|
+
if (typeof source[propName] === "function" && propName.startsWith("on")) {
|
|
26
|
+
proxySource[propName] = callAllEventHandlers(props[propName], source[propName]);
|
|
27
|
+
}
|
|
28
|
+
return proxySource;
|
|
29
|
+
}, {});
|
|
30
|
+
}
|
|
22
31
|
function assignHandlersInner(props, source) {
|
|
23
32
|
return Object.keys(source).reduce(function(proxySource, propName) {
|
|
24
33
|
if (propName !== "ref" && propName.startsWith("on")) {
|
|
@@ -71,6 +80,7 @@ function assignProps() {
|
|
|
71
80
|
return newProps;
|
|
72
81
|
}
|
|
73
82
|
export {
|
|
83
|
+
assignHandlers,
|
|
74
84
|
callAllEventHandlers,
|
|
75
85
|
assignProps as default
|
|
76
86
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
8
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
9
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
10
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
11
|
+
import hoistNonReactStatics from "hoist-non-react-statics";
|
|
12
|
+
import React, { PureComponent } from "react";
|
|
13
|
+
import getDisplayName from "./getDisplayName.mjs";
|
|
14
|
+
var _excluded = ["forwardedRef"];
|
|
15
|
+
function _callSuper(t, o, e) {
|
|
16
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
17
|
+
}
|
|
18
|
+
function createHoc(EnhancedComponent) {
|
|
19
|
+
return function createWrapper() {
|
|
20
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
21
|
+
return function(WrappedComponent) {
|
|
22
|
+
var Component = /* @__PURE__ */ function(_PureComponent) {
|
|
23
|
+
function Component2() {
|
|
24
|
+
_classCallCheck(this, Component2);
|
|
25
|
+
return _callSuper(this, Component2, arguments);
|
|
26
|
+
}
|
|
27
|
+
_inherits(Component2, _PureComponent);
|
|
28
|
+
return _createClass(Component2, [{
|
|
29
|
+
key: "render",
|
|
30
|
+
value: function render() {
|
|
31
|
+
var _WrappedComponent$def = _objectSpread(_objectSpread({}, WrappedComponent.defaultProps), this.props), forwardedRef = _WrappedComponent$def.forwardedRef, others = _objectWithoutProperties(_WrappedComponent$def, _excluded);
|
|
32
|
+
return /* @__PURE__ */ React.createElement(EnhancedComponent, _extends({}, options, this.props), function(enhancedComponentProps) {
|
|
33
|
+
return /* @__PURE__ */ React.createElement(WrappedComponent, _extends({
|
|
34
|
+
forwardedRef
|
|
35
|
+
}, others, enhancedComponentProps));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}]);
|
|
39
|
+
}(PureComponent);
|
|
40
|
+
_defineProperty(Component, "displayName", getDisplayName(WrappedComponent));
|
|
41
|
+
return hoistNonReactStatics(Component, WrappedComponent);
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
createHoc as default
|
|
47
|
+
};
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import
|
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
4
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
4
6
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
7
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { createIntlCache, createIntl } from "@formatjs/intl";
|
|
9
|
+
import React, { createContext, Component } from "react";
|
|
10
|
+
import createHoc from "../createHoc.mjs";
|
|
11
|
+
import { useAsyncI18nMessages } from "./i18nEnhance.mjs";
|
|
12
|
+
function _callSuper(t, o, e) {
|
|
13
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
14
|
+
}
|
|
9
15
|
var Context = /* @__PURE__ */ createContext(void 0);
|
|
10
|
-
Context.Provider;
|
|
11
|
-
|
|
12
|
-
createIntlCache();
|
|
16
|
+
var I18nProvider = Context.Provider, I18nConsumer = Context.Consumer;
|
|
17
|
+
var messagesCache = createIntlCache();
|
|
13
18
|
function getText(dictionaries, locale) {
|
|
14
19
|
return function(key) {
|
|
15
20
|
var dictionary = dictionaries[locale];
|
|
@@ -17,24 +22,23 @@ function getText(dictionaries, locale) {
|
|
|
17
22
|
};
|
|
18
23
|
}
|
|
19
24
|
var WithI18n = /* @__PURE__ */ function(_Component) {
|
|
20
|
-
_inherits(WithI18n2, _Component);
|
|
21
|
-
var _super = _createSuper(WithI18n2);
|
|
22
25
|
function WithI18n2() {
|
|
23
26
|
var _this;
|
|
24
27
|
_classCallCheck(this, WithI18n2);
|
|
25
28
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
29
|
args[_key] = arguments[_key];
|
|
27
30
|
}
|
|
28
|
-
_this =
|
|
29
|
-
_defineProperty(
|
|
30
|
-
_defineProperty(
|
|
31
|
+
_this = _callSuper(this, WithI18n2, [].concat(args));
|
|
32
|
+
_defineProperty(_this, "context", void 0);
|
|
33
|
+
_defineProperty(_this, "getText", function(dictionary, selfLocale) {
|
|
31
34
|
var _this$props = _this.props, locale = _this$props.locale, getText2 = _this$props.getText;
|
|
32
35
|
var contextLocale = _this.context;
|
|
33
36
|
return getText2(dictionary, selfLocale || locale || contextLocale);
|
|
34
37
|
});
|
|
35
38
|
return _this;
|
|
36
39
|
}
|
|
37
|
-
|
|
40
|
+
_inherits(WithI18n2, _Component);
|
|
41
|
+
return _createClass(WithI18n2, [{
|
|
38
42
|
key: "render",
|
|
39
43
|
value: function render() {
|
|
40
44
|
var _ref = this.props, children = _ref.children;
|
|
@@ -43,12 +47,34 @@ var WithI18n = /* @__PURE__ */ function(_Component) {
|
|
|
43
47
|
});
|
|
44
48
|
}
|
|
45
49
|
}]);
|
|
46
|
-
return WithI18n2;
|
|
47
50
|
}(Component);
|
|
48
51
|
_defineProperty(WithI18n, "contextType", Context);
|
|
49
52
|
_defineProperty(WithI18n, "defaultProps", {
|
|
50
53
|
getText
|
|
51
54
|
});
|
|
55
|
+
var useI18n = function useI18n2(dictionary) {
|
|
56
|
+
var _React$useContext;
|
|
57
|
+
var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en";
|
|
58
|
+
var fallbackDictionary = arguments.length > 2 ? arguments[2] : void 0;
|
|
59
|
+
var lang = (_React$useContext = React.useContext(Context)) !== null && _React$useContext !== void 0 ? _React$useContext : locale;
|
|
60
|
+
var resolvedDictionary = useAsyncI18nMessages(dictionary, lang, fallbackDictionary);
|
|
61
|
+
var intl = React.useMemo(function() {
|
|
62
|
+
return createIntl({
|
|
63
|
+
locale: lang,
|
|
64
|
+
messages: resolvedDictionary
|
|
65
|
+
}, messagesCache);
|
|
66
|
+
}, [resolvedDictionary, lang]);
|
|
67
|
+
return React.useCallback(function(messageId, variables) {
|
|
68
|
+
return intl.formatMessage({
|
|
69
|
+
id: messageId !== null && messageId !== void 0 ? messageId : ""
|
|
70
|
+
}, variables);
|
|
71
|
+
}, [intl]);
|
|
72
|
+
};
|
|
73
|
+
const WithI18n$1 = createHoc(WithI18n);
|
|
52
74
|
export {
|
|
53
|
-
Context
|
|
75
|
+
Context,
|
|
76
|
+
I18nConsumer,
|
|
77
|
+
I18nProvider,
|
|
78
|
+
WithI18n$1 as default,
|
|
79
|
+
useI18n
|
|
54
80
|
};
|