@semcore/core 16.5.1 → 17.0.0-prerelease.14
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 +12 -1
- package/README.md +4 -4
- package/lib/LastInteractionType.js +22 -36
- package/lib/LastInteractionType.js.map +1 -1
- package/lib/LastInteractionType.mjs +19 -33
- package/lib/LastInteractionType.mjs.map +1 -1
- package/lib/core-types/Component.d.ts +26 -79
- package/lib/core-types/Component.js +24 -72
- package/lib/core-types/Component.js.map +1 -1
- package/lib/core-types/Component.mjs +18 -34
- package/lib/core-types/Component.mjs.map +1 -1
- package/lib/core-types/symbols.js +9 -9
- package/lib/core-types/symbols.js.map +1 -1
- package/lib/core-types/symbols.mjs +9 -9
- package/lib/core-types/symbols.mjs.map +1 -1
- package/lib/coreFactory.d.ts +6 -23
- package/lib/coreFactory.js +150 -217
- package/lib/coreFactory.js.map +1 -1
- package/lib/coreFactory.mjs +139 -194
- package/lib/coreFactory.mjs.map +1 -1
- package/lib/decorators/propsObserver.d.ts +11 -0
- package/lib/decorators/reactive.d.ts +11 -0
- package/lib/enhancement/Children.js +51 -59
- package/lib/enhancement/Children.js.map +1 -1
- package/lib/enhancement/Children.mjs +47 -41
- package/lib/enhancement/Children.mjs.map +1 -1
- package/lib/enhancement/Root.js +36 -37
- package/lib/enhancement/Root.js.map +1 -1
- package/lib/enhancement/Root.mjs +28 -18
- package/lib/enhancement/Root.mjs.map +1 -1
- package/lib/enhancement/dataName.js +7 -8
- package/lib/enhancement/dataName.js.map +1 -1
- package/lib/enhancement/dataName.mjs +5 -5
- package/lib/enhancement/dataName.mjs.map +1 -1
- package/lib/enhancement/enhance.js +6 -9
- package/lib/enhancement/enhance.js.map +1 -1
- package/lib/enhancement/enhance.mjs +5 -7
- package/lib/enhancement/enhance.mjs.map +1 -1
- package/lib/enhancement/functionDefaultProps.js +6 -6
- package/lib/enhancement/functionDefaultProps.js.map +1 -1
- package/lib/enhancement/functionDefaultProps.mjs +4 -4
- package/lib/enhancement/functionDefaultProps.mjs.map +1 -1
- package/lib/enhancement/i18n.js +13 -13
- package/lib/enhancement/i18n.js.map +1 -1
- package/lib/enhancement/i18n.mjs +10 -9
- package/lib/enhancement/i18n.mjs.map +1 -1
- package/lib/enhancement/inheritedName.js +7 -8
- package/lib/enhancement/inheritedName.js.map +1 -1
- package/lib/enhancement/inheritedName.mjs +5 -5
- package/lib/enhancement/inheritedName.mjs.map +1 -1
- package/lib/enhancement/staticChildren.js +47 -56
- package/lib/enhancement/staticChildren.js.map +1 -1
- package/lib/enhancement/staticChildren.mjs +43 -48
- package/lib/enhancement/staticChildren.mjs.map +1 -1
- package/lib/enhancement/style.js +29 -27
- package/lib/enhancement/style.js.map +1 -1
- package/lib/enhancement/style.mjs +26 -20
- package/lib/enhancement/style.mjs.map +1 -1
- package/lib/enhancement/uncontrolledProps.js +46 -64
- package/lib/enhancement/uncontrolledProps.js.map +1 -1
- package/lib/enhancement/uncontrolledProps.mjs +43 -51
- package/lib/enhancement/uncontrolledProps.mjs.map +1 -1
- package/lib/esm/LastInteractionType.mjs +19 -33
- package/lib/esm/core-types/Component.mjs +18 -34
- package/lib/esm/core-types/symbols.mjs +9 -9
- package/lib/esm/coreFactory.mjs +139 -194
- package/lib/esm/enhancement/Children.mjs +47 -41
- package/lib/esm/enhancement/Root.mjs +28 -18
- package/lib/esm/enhancement/dataName.mjs +5 -5
- package/lib/esm/enhancement/enhance.mjs +5 -7
- package/lib/esm/enhancement/functionDefaultProps.mjs +4 -4
- package/lib/esm/enhancement/i18n.mjs +10 -9
- package/lib/esm/enhancement/inheritedName.mjs +5 -5
- package/lib/esm/enhancement/staticChildren.mjs +43 -48
- package/lib/esm/enhancement/style.mjs +26 -20
- package/lib/esm/enhancement/uncontrolledProps.mjs +43 -51
- package/lib/esm/register.mjs +12 -20
- package/lib/esm/styled/reshadow-core.mjs +98 -111
- package/lib/esm/styled/sstyled.mjs +31 -41
- package/lib/esm/utils/assignProps.mjs +32 -36
- package/lib/esm/utils/enhances/WithI18n.mjs +16 -63
- package/lib/esm/utils/enhances/i18nEnhance.mjs +47 -61
- package/lib/esm/utils/logger.mjs +13 -21
- package/lib/esm/utils/pick.mjs +4 -4
- package/lib/esm/utils/ref.mjs +27 -57
- package/lib/esm/utils/use/useEnhancedEffect.mjs +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +17 -17
- package/lib/index.js.map +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/register.js +17 -24
- package/lib/register.js.map +1 -1
- package/lib/register.mjs +12 -20
- package/lib/register.mjs.map +1 -1
- package/lib/styled/index.d.ts +1 -5
- package/lib/styled/index.js +4 -4
- package/lib/styled/index.js.map +1 -1
- package/lib/styled/index.mjs.map +1 -1
- package/lib/styled/reshadow-core.js +102 -104
- package/lib/styled/reshadow-core.js.map +1 -1
- package/lib/styled/reshadow-core.mjs +98 -111
- package/lib/styled/reshadow-core.mjs.map +1 -1
- package/lib/styled/sstyled.js +31 -53
- package/lib/styled/sstyled.js.map +1 -1
- package/lib/styled/sstyled.mjs +31 -41
- package/lib/styled/sstyled.mjs.map +1 -1
- package/lib/theme/processor.js +150 -222
- package/lib/theme/processor.js.map +1 -1
- package/lib/theme/processor.mjs +148 -221
- package/lib/theme/processor.mjs.map +1 -1
- package/lib/theme/themes/dark.js +2 -2
- package/lib/theme/themes/dark.js.map +1 -1
- package/lib/theme/themes/default.js +2 -2
- package/lib/theme/themes/default.js.map +1 -1
- package/lib/theme/themes/highlights-dark.js +2 -2
- package/lib/theme/themes/highlights-dark.js.map +1 -1
- package/lib/theme/themes/highlights-light.js +2 -2
- package/lib/theme/themes/highlights-light.js.map +1 -1
- package/lib/theme/themes/light.js +2 -2
- package/lib/theme/themes/light.js.map +1 -1
- package/lib/theme/utils.js +140 -215
- package/lib/theme/utils.js.map +1 -1
- package/lib/theme/utils.mjs +135 -214
- package/lib/theme/utils.mjs.map +1 -1
- package/lib/utils/CSSinJS.js +8 -10
- package/lib/utils/CSSinJS.js.map +1 -1
- package/lib/utils/CSSinJS.mjs +6 -7
- package/lib/utils/CSSinJS.mjs.map +1 -1
- package/lib/utils/ThemeProvider.js +44 -51
- package/lib/utils/ThemeProvider.js.map +1 -1
- package/lib/utils/ThemeProvider.mjs +36 -47
- package/lib/utils/ThemeProvider.mjs.map +1 -1
- package/lib/utils/addonText.js +4 -7
- package/lib/utils/addonText.js.map +1 -1
- package/lib/utils/addonText.mjs +2 -5
- package/lib/utils/addonText.mjs.map +1 -1
- package/lib/utils/addonTextChildren.js +15 -21
- package/lib/utils/addonTextChildren.js.map +1 -1
- package/lib/utils/addonTextChildren.mjs +7 -13
- package/lib/utils/addonTextChildren.mjs.map +1 -1
- package/lib/utils/ariaProps.js +7 -5
- package/lib/utils/ariaProps.js.map +1 -1
- package/lib/utils/ariaProps.mjs +7 -5
- package/lib/utils/ariaProps.mjs.map +1 -1
- package/lib/utils/assignProps.js +33 -37
- package/lib/utils/assignProps.js.map +1 -1
- package/lib/utils/assignProps.mjs +32 -36
- package/lib/utils/assignProps.mjs.map +1 -1
- package/lib/utils/canUseDOM.js +1 -1
- package/lib/utils/capitalizeFirstLetter.js +1 -1
- package/lib/utils/color.js +72 -95
- package/lib/utils/color.js.map +1 -1
- package/lib/utils/color.mjs +71 -94
- package/lib/utils/color.mjs.map +1 -1
- package/lib/utils/compose.js +3 -12
- package/lib/utils/compose.js.map +1 -1
- package/lib/utils/compose.mjs +2 -11
- package/lib/utils/compose.mjs.map +1 -1
- package/lib/utils/createUUID.js +5 -5
- package/lib/utils/createUUID.js.map +1 -1
- package/lib/utils/createUUID.mjs +4 -4
- package/lib/utils/createUUID.mjs.map +1 -1
- package/lib/utils/cssToIntDefault.js +3 -4
- package/lib/utils/cssToIntDefault.js.map +1 -1
- package/lib/utils/cssToIntDefault.mjs +2 -3
- package/lib/utils/cssToIntDefault.mjs.map +1 -1
- package/lib/utils/enhances/WithCSS.d.ts +2 -30
- package/lib/utils/enhances/WithCSS.js +13 -64
- package/lib/utils/enhances/WithCSS.js.map +1 -1
- package/lib/utils/enhances/WithCSS.mjs +9 -59
- package/lib/utils/enhances/WithCSS.mjs.map +1 -1
- package/lib/utils/enhances/WithI18n.d.ts +1 -30
- package/lib/utils/enhances/WithI18n.js +20 -76
- package/lib/utils/enhances/WithI18n.js.map +1 -1
- package/lib/utils/enhances/WithI18n.mjs +16 -63
- package/lib/utils/enhances/WithI18n.mjs.map +1 -1
- package/lib/utils/enhances/a11yEnhance.js +34 -39
- package/lib/utils/enhances/a11yEnhance.js.map +1 -1
- package/lib/utils/enhances/a11yEnhance.mjs +32 -36
- package/lib/utils/enhances/a11yEnhance.mjs.map +1 -1
- package/lib/utils/enhances/animatedSizeEnhance.d.ts +0 -4
- package/lib/utils/enhances/animatedSizeEnhance.js +55 -65
- package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -1
- package/lib/utils/enhances/animatedSizeEnhance.mjs +50 -61
- package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -1
- package/lib/utils/enhances/contextEnhance.js +12 -11
- package/lib/utils/enhances/contextEnhance.js.map +1 -1
- package/lib/utils/enhances/contextEnhance.mjs +9 -8
- package/lib/utils/enhances/contextEnhance.mjs.map +1 -1
- package/lib/utils/enhances/i18nEnhance.d.ts +0 -4
- package/lib/utils/enhances/i18nEnhance.js +51 -69
- package/lib/utils/enhances/i18nEnhance.js.map +1 -1
- package/lib/utils/enhances/i18nEnhance.mjs +47 -61
- package/lib/utils/enhances/i18nEnhance.mjs.map +1 -1
- package/lib/utils/enhances/resolveColorEnhance.js +12 -10
- package/lib/utils/enhances/resolveColorEnhance.js.map +1 -1
- package/lib/utils/enhances/resolveColorEnhance.mjs +8 -6
- package/lib/utils/enhances/resolveColorEnhance.mjs.map +1 -1
- package/lib/utils/eventEmitter.d.ts +10 -6
- package/lib/utils/eventEmitter.js +33 -32
- package/lib/utils/eventEmitter.js.map +1 -1
- package/lib/utils/eventEmitter.mjs +30 -31
- package/lib/utils/eventEmitter.mjs.map +1 -1
- package/lib/utils/findComponent.js +35 -42
- package/lib/utils/findComponent.js.map +1 -1
- package/lib/utils/findComponent.mjs +26 -33
- package/lib/utils/findComponent.mjs.map +1 -1
- package/lib/utils/fire.js +7 -13
- package/lib/utils/fire.js.map +1 -1
- package/lib/utils/fire.mjs +5 -11
- package/lib/utils/fire.mjs.map +1 -1
- package/lib/utils/focus-lock/focusBorders.js +28 -32
- package/lib/utils/focus-lock/focusBorders.js.map +1 -1
- package/lib/utils/focus-lock/focusBorders.mjs +26 -32
- package/lib/utils/focus-lock/focusBorders.mjs.map +1 -1
- package/lib/utils/focus-lock/getFocusableIn.js +4 -6
- package/lib/utils/focus-lock/getFocusableIn.js.map +1 -1
- package/lib/utils/focus-lock/getFocusableIn.mjs +3 -6
- package/lib/utils/focus-lock/getFocusableIn.mjs.map +1 -1
- package/lib/utils/focus-lock/isFocusInside.js +5 -6
- package/lib/utils/focus-lock/isFocusInside.js.map +1 -1
- package/lib/utils/focus-lock/isFocusInside.mjs +4 -6
- package/lib/utils/focus-lock/isFocusInside.mjs.map +1 -1
- package/lib/utils/focus-lock/isFocusable.js +9 -12
- package/lib/utils/focus-lock/isFocusable.js.map +1 -1
- package/lib/utils/focus-lock/isFocusable.mjs +8 -11
- package/lib/utils/focus-lock/isFocusable.mjs.map +1 -1
- package/lib/utils/focus-lock/setFocus.js +21 -27
- package/lib/utils/focus-lock/setFocus.js.map +1 -1
- package/lib/utils/focus-lock/setFocus.mjs +19 -25
- package/lib/utils/focus-lock/setFocus.mjs.map +1 -1
- package/lib/utils/getAccessibleName.js +10 -22
- package/lib/utils/getAccessibleName.js.map +1 -1
- package/lib/utils/getAccessibleName.mjs +10 -21
- package/lib/utils/getAccessibleName.mjs.map +1 -1
- package/lib/utils/getDisplayName.js +1 -1
- package/lib/utils/getDisplayName.mjs +3 -5
- package/lib/utils/getEventTarget.js +13 -32
- package/lib/utils/getEventTarget.js.map +1 -1
- package/lib/utils/getEventTarget.mjs +12 -31
- package/lib/utils/getEventTarget.mjs.map +1 -1
- package/lib/utils/getOriginChildren.js +4 -4
- package/lib/utils/getOriginChildren.js.map +1 -1
- package/lib/utils/getRandomInt.js +1 -1
- package/lib/utils/getValue.js +4 -6
- package/lib/utils/getValue.js.map +1 -1
- package/lib/utils/getValue.mjs +3 -5
- package/lib/utils/getValue.mjs.map +1 -1
- package/lib/utils/hasLabels.js +16 -27
- package/lib/utils/hasLabels.js.map +1 -1
- package/lib/utils/hasLabels.mjs +14 -24
- package/lib/utils/hasLabels.mjs.map +1 -1
- package/lib/utils/hasParent.js +3 -2
- package/lib/utils/hasParent.js.map +1 -1
- package/lib/utils/hasParent.mjs +2 -3
- package/lib/utils/hasParent.mjs.map +1 -1
- package/lib/utils/ifChildren.js +6 -4
- package/lib/utils/ifChildren.js.map +1 -1
- package/lib/utils/ifChildren.mjs +4 -2
- package/lib/utils/ifChildren.mjs.map +1 -1
- package/lib/utils/injectStyle.js +11 -13
- package/lib/utils/injectStyle.js.map +1 -1
- package/lib/utils/injectStyle.mjs +9 -10
- package/lib/utils/injectStyle.mjs.map +1 -1
- package/lib/utils/inputProps.js +5 -5
- package/lib/utils/inputProps.js.map +1 -1
- package/lib/utils/inputProps.mjs +4 -4
- package/lib/utils/inputProps.mjs.map +1 -1
- package/lib/utils/isInteractiveElement.js +7 -9
- package/lib/utils/isInteractiveElement.js.map +1 -1
- package/lib/utils/isInteractiveElement.mjs +7 -9
- package/lib/utils/isInteractiveElement.mjs.map +1 -1
- package/lib/utils/isNode.js +4 -5
- package/lib/utils/isNode.js.map +1 -1
- package/lib/utils/isNode.mjs +1 -2
- package/lib/utils/isNode.mjs.map +1 -1
- package/lib/utils/isPromise.js +1 -1
- package/lib/utils/isRetina.js +7 -2
- package/lib/utils/isRetina.js.map +1 -1
- package/lib/utils/isRetina.mjs +6 -1
- package/lib/utils/isRetina.mjs.map +1 -1
- package/lib/utils/logger.js +18 -25
- package/lib/utils/logger.js.map +1 -1
- package/lib/utils/logger.mjs +13 -21
- package/lib/utils/logger.mjs.map +1 -1
- package/lib/utils/numericChecker.js +11 -18
- package/lib/utils/numericChecker.js.map +1 -1
- package/lib/utils/numericChecker.mjs +10 -17
- package/lib/utils/numericChecker.mjs.map +1 -1
- package/lib/utils/ownerDocument.js +2 -2
- package/lib/utils/ownerDocument.js.map +1 -1
- package/lib/utils/ownerDocument.mjs +1 -1
- package/lib/utils/ownerDocument.mjs.map +1 -1
- package/lib/utils/pick.js +5 -5
- package/lib/utils/pick.js.map +1 -1
- package/lib/utils/pick.mjs +4 -4
- package/lib/utils/pick.mjs.map +1 -1
- package/lib/utils/propsForElement.js +10 -12
- package/lib/utils/propsForElement.js.map +1 -1
- package/lib/utils/propsForElement.mjs +8 -10
- package/lib/utils/propsForElement.mjs.map +1 -1
- package/lib/utils/rafTrottle.js +9 -14
- package/lib/utils/rafTrottle.js.map +1 -1
- package/lib/utils/rafTrottle.mjs +7 -12
- package/lib/utils/rafTrottle.mjs.map +1 -1
- package/lib/utils/reactToText.js +5 -8
- package/lib/utils/reactToText.js.map +1 -1
- package/lib/utils/reactToText.mjs +3 -6
- package/lib/utils/reactToText.mjs.map +1 -1
- package/lib/utils/ref.d.ts +1 -3
- package/lib/utils/ref.js +29 -61
- package/lib/utils/ref.js.map +1 -1
- package/lib/utils/ref.mjs +27 -57
- package/lib/utils/ref.mjs.map +1 -1
- package/lib/utils/setRef.js +2 -2
- package/lib/utils/setRef.js.map +1 -1
- package/lib/utils/syncScroll.js +24 -24
- package/lib/utils/syncScroll.js.map +1 -1
- package/lib/utils/syncScroll.mjs +21 -21
- package/lib/utils/syncScroll.mjs.map +1 -1
- package/lib/utils/uncontroll.js +8 -18
- package/lib/utils/uncontroll.js.map +1 -1
- package/lib/utils/uncontroll.mjs +8 -17
- package/lib/utils/uncontroll.mjs.map +1 -1
- package/lib/utils/uniqueID.d.ts +0 -4
- package/lib/utils/uniqueID.js +23 -30
- package/lib/utils/uniqueID.js.map +1 -1
- package/lib/utils/uniqueID.mjs +19 -29
- package/lib/utils/uniqueID.mjs.map +1 -1
- package/lib/utils/use/useColorResolver.js +20 -21
- package/lib/utils/use/useColorResolver.js.map +1 -1
- package/lib/utils/use/useColorResolver.mjs +16 -18
- package/lib/utils/use/useColorResolver.mjs.map +1 -1
- package/lib/utils/use/useEnhancedEffect.d.ts +1 -1
- package/lib/utils/use/useEnhancedEffect.js +4 -4
- package/lib/utils/use/useEnhancedEffect.js.map +1 -1
- package/lib/utils/use/useEnhancedEffect.mjs +1 -1
- package/lib/utils/use/useEnhancedEffect.mjs.map +1 -1
- package/lib/utils/use/useEventCallback.js +5 -10
- package/lib/utils/use/useEventCallback.js.map +1 -1
- package/lib/utils/use/useEventCallback.mjs +3 -8
- package/lib/utils/use/useEventCallback.mjs.map +1 -1
- package/lib/utils/use/useEventListener.js +11 -15
- package/lib/utils/use/useEventListener.js.map +1 -1
- package/lib/utils/use/useEventListener.mjs +7 -11
- package/lib/utils/use/useEventListener.mjs.map +1 -1
- package/lib/utils/use/useFocusLock.js +80 -94
- package/lib/utils/use/useFocusLock.js.map +1 -1
- package/lib/utils/use/useFocusLock.mjs +71 -88
- package/lib/utils/use/useFocusLock.mjs.map +1 -1
- package/lib/utils/use/usePreventScroll.js +26 -28
- package/lib/utils/use/usePreventScroll.js.map +1 -1
- package/lib/utils/use/usePreventScroll.mjs +21 -23
- package/lib/utils/use/usePreventScroll.mjs.map +1 -1
- package/lib/utils/use/useScrollBarWidth.js +8 -14
- package/lib/utils/use/useScrollBarWidth.js.map +1 -1
- package/lib/utils/use/useScrollBarWidth.mjs +8 -13
- package/lib/utils/use/useScrollBarWidth.mjs.map +1 -1
- package/lib/utils/useCssVariable.js +32 -37
- package/lib/utils/useCssVariable.js.map +1 -1
- package/lib/utils/useCssVariable.mjs +27 -34
- package/lib/utils/useCssVariable.mjs.map +1 -1
- package/lib/utils/zIndexStacking.d.ts +3 -1
- package/lib/utils/zIndexStacking.js +28 -24
- package/lib/utils/zIndexStacking.js.map +1 -1
- package/lib/utils/zIndexStacking.mjs +23 -22
- package/lib/utils/zIndexStacking.mjs.map +1 -1
- package/package.json +129 -129
- package/lib/enhancement/bindHandler.d.ts +0 -5
- package/lib/enhancement/bindHandler.js +0 -53
- package/lib/enhancement/bindHandler.js.map +0 -1
- package/lib/enhancement/bindHandler.mjs +0 -48
- package/lib/enhancement/bindHandler.mjs.map +0 -1
- package/lib/enhancement/hoistProps.d.ts +0 -10
- package/lib/enhancement/hoistProps.js +0 -95
- package/lib/enhancement/hoistProps.js.map +0 -1
- package/lib/enhancement/hoistProps.mjs +0 -78
- package/lib/enhancement/hoistProps.mjs.map +0 -1
- package/lib/esm/enhancement/bindHandler.mjs +0 -48
- package/lib/esm/enhancement/hoistProps.mjs +0 -78
- package/lib/esm/utils/createHoc.mjs +0 -42
- package/lib/esm/utils/getDisplayName.mjs +0 -6
- package/lib/utils/ScreenReaderOnly.d.ts +0 -8
- package/lib/utils/ScreenReaderOnly.js +0 -30
- package/lib/utils/ScreenReaderOnly.js.map +0 -1
- package/lib/utils/ScreenReaderOnly.mjs +0 -24
- package/lib/utils/ScreenReaderOnly.mjs.map +0 -1
- package/lib/utils/createHoc.d.ts +0 -3
- package/lib/utils/createHoc.js +0 -52
- package/lib/utils/createHoc.js.map +0 -1
- package/lib/utils/createHoc.mjs +0 -42
- package/lib/utils/createHoc.mjs.map +0 -1
- package/lib/utils/enhances/WithAutoFocus.d.ts +0 -14
- package/lib/utils/enhances/WithAutoFocus.js +0 -72
- package/lib/utils/enhances/WithAutoFocus.js.map +0 -1
- package/lib/utils/enhances/WithAutoFocus.mjs +0 -66
- package/lib/utils/enhances/WithAutoFocus.mjs.map +0 -1
- package/lib/utils/enhances/WithKeyboardFocus.d.ts +0 -46
- package/lib/utils/enhances/WithKeyboardFocus.js +0 -94
- package/lib/utils/enhances/WithKeyboardFocus.js.map +0 -1
- package/lib/utils/enhances/WithKeyboardFocus.mjs +0 -88
- package/lib/utils/enhances/WithKeyboardFocus.mjs.map +0 -1
- package/lib/utils/enhances/WithRef.d.ts +0 -3
- package/lib/utils/enhances/WithRef.js +0 -25
- package/lib/utils/enhances/WithRef.js.map +0 -1
- package/lib/utils/enhances/WithRef.mjs +0 -18
- package/lib/utils/enhances/WithRef.mjs.map +0 -1
- package/lib/utils/enhances/autoFocusEnhance.d.ts +0 -10
- package/lib/utils/enhances/autoFocusEnhance.js +0 -45
- package/lib/utils/enhances/autoFocusEnhance.js.map +0 -1
- package/lib/utils/enhances/autoFocusEnhance.mjs +0 -38
- package/lib/utils/enhances/autoFocusEnhance.mjs.map +0 -1
- package/lib/utils/enhances/keyboardFocusEnhance.d.ts +0 -27
- package/lib/utils/enhances/keyboardFocusEnhance.js +0 -63
- package/lib/utils/enhances/keyboardFocusEnhance.js.map +0 -1
- package/lib/utils/enhances/keyboardFocusEnhance.mjs +0 -57
- package/lib/utils/enhances/keyboardFocusEnhance.mjs.map +0 -1
- package/lib/utils/if.d.ts +0 -11
- package/lib/utils/if.js +0 -15
- package/lib/utils/if.js.map +0 -1
- package/lib/utils/if.mjs +0 -9
- package/lib/utils/if.mjs.map +0 -1
- package/lib/utils/use/useCss.d.ts +0 -4
- package/lib/utils/use/useCss.js +0 -19
- package/lib/utils/use/useCss.js.map +0 -1
- package/lib/utils/use/useCss.mjs +0 -12
- package/lib/utils/use/useCss.mjs.map +0 -1
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _objectDestructuringEmpty from "@babel/runtime/helpers/esm/objectDestructuringEmpty";
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
1
|
import React from 'react';
|
|
5
2
|
import { useContextTokens } from "./ThemeProvider.mjs";
|
|
6
3
|
import defaultDesignThemeJson from "../theme/themes/default.mjs";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
const defaultDesignThemeTokens = defaultDesignThemeJson;
|
|
5
|
+
const zIndexStackingContext = /*#__PURE__*/React.createContext(0);
|
|
6
|
+
export const useZIndexStacking = designToken => {
|
|
7
|
+
const contextTokens = useContextTokens();
|
|
8
|
+
const parentContextValue = React.useContext(zIndexStackingContext);
|
|
9
|
+
const contextValue = React.useMemo(() => {
|
|
13
10
|
if (!designToken) return parentContextValue;
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const tokenName = designToken.startsWith('--intergalactic-') ? designToken : `--intergalactic-${designToken}`;
|
|
12
|
+
const tokenValue = Number.parseInt(contextTokens?.[tokenName] || defaultDesignThemeTokens[tokenName], 10);
|
|
16
13
|
if (Number.isNaN(tokenValue)) return parentContextValue;
|
|
17
14
|
return parentContextValue + tokenValue;
|
|
18
15
|
}, [designToken, contextTokens, parentContextValue]);
|
|
19
16
|
return contextValue;
|
|
20
17
|
};
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
export const ZIndexStackingContextProvider = ({
|
|
19
|
+
designToken,
|
|
20
|
+
children
|
|
21
|
+
}) => {
|
|
22
|
+
const contextValue = useZIndexStacking(designToken);
|
|
25
23
|
return /*#__PURE__*/React.createElement(zIndexStackingContext.Provider, {
|
|
26
24
|
value: contextValue
|
|
27
25
|
}, children);
|
|
28
26
|
};
|
|
29
|
-
export
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
export const zIndexStackingEnhance = designToken => {
|
|
28
|
+
return props => {
|
|
29
|
+
const {
|
|
30
|
+
...other
|
|
31
|
+
} = props;
|
|
32
|
+
const parentZIndexStacking = useZIndexStacking(designToken);
|
|
33
|
+
return {
|
|
34
|
+
...other,
|
|
35
|
+
parentZIndexStacking
|
|
36
|
+
};
|
|
36
37
|
};
|
|
37
38
|
};
|
|
38
39
|
//# sourceMappingURL=zIndexStacking.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zIndexStacking.mjs","names":["React","useContextTokens","defaultDesignThemeJson","defaultDesignThemeTokens","zIndexStackingContext","createContext","useZIndexStacking","designToken","contextTokens","parentContextValue","useContext","contextValue","useMemo","tokenName","startsWith","
|
|
1
|
+
{"version":3,"file":"zIndexStacking.mjs","names":["React","useContextTokens","defaultDesignThemeJson","defaultDesignThemeTokens","zIndexStackingContext","createContext","useZIndexStacking","designToken","contextTokens","parentContextValue","useContext","contextValue","useMemo","tokenName","startsWith","tokenValue","Number","parseInt","isNaN","ZIndexStackingContextProvider","children","createElement","Provider","value","zIndexStackingEnhance","props","other","parentZIndexStacking"],"sources":["../../src/utils/zIndexStacking.tsx"],"sourcesContent":["import React from 'react';\n\nimport { useContextTokens } from './ThemeProvider';\nimport defaultDesignThemeJson from '../theme/themes/default';\nconst defaultDesignThemeTokens = defaultDesignThemeJson as Record<string, string>;\n\nconst zIndexStackingContext = React.createContext(0);\n\nexport type ZIndexDesignTokens =\n | 'z-index-deep'\n | 'z-index-overlay'\n | 'z-index-modal'\n | 'z-index-popper'\n | 'z-index-dropdown'\n | 'z-index-tooltip'\n | 'z-index-notice-bubble';\n\nexport const useZIndexStacking = (designToken?: ZIndexDesignTokens) => {\n const contextTokens = useContextTokens();\n const parentContextValue = React.useContext(zIndexStackingContext);\n const contextValue = React.useMemo(() => {\n if (!designToken) return parentContextValue;\n const tokenName = designToken.startsWith('--intergalactic-')\n ? designToken\n : `--intergalactic-${designToken}`;\n const tokenValue = Number.parseInt(\n contextTokens?.[tokenName] || defaultDesignThemeTokens[tokenName],\n 10,\n );\n if (Number.isNaN(tokenValue)) return parentContextValue;\n return parentContextValue + tokenValue;\n }, [designToken, contextTokens, parentContextValue]);\n return contextValue;\n};\nexport const ZIndexStackingContextProvider: React.FC<{\n designToken: ZIndexDesignTokens;\n children: React.ReactNode;\n}> = ({ designToken, children }) => {\n const contextValue = useZIndexStacking(designToken);\n return (\n <zIndexStackingContext.Provider value={contextValue}>{children}</zIndexStackingContext.Provider>\n );\n};\nexport const zIndexStackingEnhance = (designToken?: ZIndexDesignTokens) => {\n return (props: any): { parentZIndexStacking: ReturnType<typeof useZIndexStacking> } => {\n const { ...other } = props;\n const parentZIndexStacking = useZIndexStacking(designToken);\n return {\n ...other,\n parentZIndexStacking,\n };\n };\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,gBAAgB,QAAQ,qBAAiB;AAClD,OAAOC,sBAAsB,MAAM,6BAAyB;AAC5D,MAAMC,wBAAwB,GAAGD,sBAAgD;AAEjF,MAAME,qBAAqB,gBAAGJ,KAAK,CAACK,aAAa,CAAC,CAAC,CAAC;AAWpD,OAAO,MAAMC,iBAAiB,GAAIC,WAAgC,IAAK;EACrE,MAAMC,aAAa,GAAGP,gBAAgB,CAAC,CAAC;EACxC,MAAMQ,kBAAkB,GAAGT,KAAK,CAACU,UAAU,CAACN,qBAAqB,CAAC;EAClE,MAAMO,YAAY,GAAGX,KAAK,CAACY,OAAO,CAAC,MAAM;IACvC,IAAI,CAACL,WAAW,EAAE,OAAOE,kBAAkB;IAC3C,MAAMI,SAAS,GAAGN,WAAW,CAACO,UAAU,CAAC,kBAAkB,CAAC,GACxDP,WAAW,GACX,mBAAmBA,WAAW,EAAE;IACpC,MAAMQ,UAAU,GAAGC,MAAM,CAACC,QAAQ,CAChCT,aAAa,GAAGK,SAAS,CAAC,IAAIV,wBAAwB,CAACU,SAAS,CAAC,EACjE,EACF,CAAC;IACD,IAAIG,MAAM,CAACE,KAAK,CAACH,UAAU,CAAC,EAAE,OAAON,kBAAkB;IACvD,OAAOA,kBAAkB,GAAGM,UAAU;EACxC,CAAC,EAAE,CAACR,WAAW,EAAEC,aAAa,EAAEC,kBAAkB,CAAC,CAAC;EACpD,OAAOE,YAAY;AACrB,CAAC;AACD,OAAO,MAAMQ,6BAGX,GAAGA,CAAC;EAAEZ,WAAW;EAAEa;AAAS,CAAC,KAAK;EAClC,MAAMT,YAAY,GAAGL,iBAAiB,CAACC,WAAW,CAAC;EACnD,oBACEP,KAAA,CAAAqB,aAAA,CAACjB,qBAAqB,CAACkB,QAAQ;IAACC,KAAK,EAAEZ;EAAa,GAAES,QAAyC,CAAC;AAEpG,CAAC;AACD,OAAO,MAAMI,qBAAqB,GAAIjB,WAAgC,IAAK;EACzE,OAAQkB,KAAU,IAAqE;IACrF,MAAM;MAAE,GAAGC;IAAM,CAAC,GAAGD,KAAK;IAC1B,MAAME,oBAAoB,GAAGrB,iBAAiB,CAACC,WAAW,CAAC;IAC3D,OAAO;MACL,GAAGmB,KAAK;MACRC;IACF,CAAC;EACH,CAAC;AACH,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/core",
|
|
3
3
|
"description": "Semrush Core Component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "17.0.0-prerelease.14",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
7
7
|
"typings": "lib/index.d.ts",
|
|
@@ -10,298 +10,298 @@
|
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
-
"
|
|
13
|
+
"types": "./lib/index.d.ts",
|
|
14
14
|
"import": "./lib/index.mjs",
|
|
15
|
-
"
|
|
15
|
+
"require": "./lib/index.js"
|
|
16
16
|
},
|
|
17
17
|
"./src": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"types": "./src/index.ts",
|
|
19
|
+
"import": "./src/index.ts"
|
|
20
20
|
},
|
|
21
21
|
"./lib/theme/themes/default.css": {
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"import": "./lib/theme/themes/default.css",
|
|
23
|
+
"require": "./lib/theme/themes/default.css"
|
|
24
24
|
},
|
|
25
25
|
"./lib/theme/themes/light.css": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
26
|
+
"import": "./lib/theme/themes/light.css",
|
|
27
|
+
"require": "./lib/theme/themes/light.css"
|
|
28
28
|
},
|
|
29
29
|
"./lib/theme/themes/dark.css": {
|
|
30
|
-
"
|
|
31
|
-
"
|
|
30
|
+
"import": "./lib/theme/themes/dark.css",
|
|
31
|
+
"require": "./lib/theme/themes/dark.css"
|
|
32
32
|
},
|
|
33
33
|
"./lib/theme/themes/auto.css": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
34
|
+
"import": "./lib/theme/themes/auto.css",
|
|
35
|
+
"require": "./lib/theme/themes/auto.css"
|
|
36
36
|
},
|
|
37
37
|
"./lib/theme/themes/highlights-light.css": {
|
|
38
|
-
"
|
|
39
|
-
"
|
|
38
|
+
"import": "./lib/theme/themes/highlights-light.css",
|
|
39
|
+
"require": "./lib/theme/themes/highlights-light.css"
|
|
40
40
|
},
|
|
41
41
|
"./lib/utils/focus-lock/getFocusableIn": {
|
|
42
|
-
"
|
|
42
|
+
"types": "./lib/utils/focus-lock/getFocusableIn.d.ts",
|
|
43
43
|
"import": "./lib/utils/focus-lock/getFocusableIn.mjs",
|
|
44
|
-
"
|
|
44
|
+
"require": "./lib/utils/focus-lock/getFocusableIn.js"
|
|
45
45
|
},
|
|
46
46
|
"./lib/utils/focus-lock/isFocusable": {
|
|
47
|
-
"
|
|
47
|
+
"types": "./lib/utils/focus-lock/isFocusable.d.ts",
|
|
48
48
|
"import": "./lib/utils/focus-lock/isFocusable.mjs",
|
|
49
|
-
"
|
|
49
|
+
"require": "./lib/utils/focus-lock/isFocusable.js"
|
|
50
50
|
},
|
|
51
51
|
"./lib/utils/focus-lock/isFocusInside": {
|
|
52
|
-
"
|
|
52
|
+
"types": "./lib/utils/focus-lock/isFocusInside.d.ts",
|
|
53
53
|
"import": "./lib/utils/focus-lock/isFocusInside.mjs",
|
|
54
|
-
"
|
|
54
|
+
"require": "./lib/utils/focus-lock/isFocusInside.js"
|
|
55
55
|
},
|
|
56
56
|
"./lib/utils/focus-lock/setFocus": {
|
|
57
|
-
"
|
|
57
|
+
"types": "./lib/utils/focus-lock/setFocus.d.ts",
|
|
58
58
|
"import": "./lib/utils/focus-lock/setFocus.mjs",
|
|
59
|
-
"
|
|
59
|
+
"require": "./lib/utils/focus-lock/setFocus.js"
|
|
60
60
|
},
|
|
61
61
|
"./lib/utils/enhances/a11yEnhance": {
|
|
62
|
-
"
|
|
62
|
+
"types": "./lib/utils/enhances/a11yEnhance.d.ts",
|
|
63
63
|
"import": "./lib/utils/enhances/a11yEnhance.mjs",
|
|
64
|
-
"
|
|
64
|
+
"require": "./lib/utils/enhances/a11yEnhance.js"
|
|
65
65
|
},
|
|
66
66
|
"./lib/utils/enhances/animatedSizeEnhance": {
|
|
67
|
-
"
|
|
67
|
+
"types": "./lib/utils/enhances/animatedSizeEnhance.d.ts",
|
|
68
68
|
"import": "./lib/utils/enhances/animatedSizeEnhance.mjs",
|
|
69
|
-
"
|
|
70
|
-
},
|
|
71
|
-
"./lib/utils/enhances/autoFocusEnhance": {
|
|
72
|
-
"require": "./lib/utils/enhances/autoFocusEnhance.js",
|
|
73
|
-
"import": "./lib/utils/enhances/autoFocusEnhance.mjs",
|
|
74
|
-
"types": "./lib/utils/enhances/autoFocusEnhance.d.ts"
|
|
69
|
+
"require": "./lib/utils/enhances/animatedSizeEnhance.js"
|
|
75
70
|
},
|
|
76
71
|
"./lib/utils/enhances/contextEnhance": {
|
|
77
|
-
"
|
|
72
|
+
"types": "./lib/utils/enhances/contextEnhance.d.ts",
|
|
78
73
|
"import": "./lib/utils/enhances/contextEnhance.mjs",
|
|
79
|
-
"
|
|
74
|
+
"require": "./lib/utils/enhances/contextEnhance.js"
|
|
80
75
|
},
|
|
81
76
|
"./lib/utils/enhances/focusSourceEnhance": {
|
|
82
|
-
"
|
|
77
|
+
"types": "./lib/utils/enhances/focusSourceEnhance.d.ts",
|
|
83
78
|
"import": "./lib/utils/enhances/focusSourceEnhance.mjs",
|
|
84
|
-
"
|
|
85
|
-
},
|
|
86
|
-
"./lib/utils/enhances/keyboardFocusEnhance": {
|
|
87
|
-
"require": "./lib/utils/enhances/keyboardFocusEnhance.js",
|
|
88
|
-
"import": "./lib/utils/enhances/keyboardFocusEnhance.mjs",
|
|
89
|
-
"types": "./lib/utils/enhances/keyboardFocusEnhance.d.ts"
|
|
79
|
+
"require": "./lib/utils/enhances/focusSourceEnhance.js"
|
|
90
80
|
},
|
|
91
81
|
"./lib/utils/enhances/i18nEnhance": {
|
|
92
|
-
"
|
|
82
|
+
"types": "./lib/utils/enhances/i18nEnhance.d.ts",
|
|
93
83
|
"import": "./lib/utils/enhances/i18nEnhance.mjs",
|
|
94
|
-
"
|
|
84
|
+
"require": "./lib/utils/enhances/i18nEnhance.js"
|
|
95
85
|
},
|
|
96
86
|
"./lib/utils/enhances/resolveColorEnhance": {
|
|
97
|
-
"
|
|
87
|
+
"types": "./lib/utils/enhances/resolveColorEnhance.d.ts",
|
|
98
88
|
"import": "./lib/utils/enhances/resolveColorEnhance.mjs",
|
|
99
|
-
"
|
|
89
|
+
"require": "./lib/utils/enhances/resolveColorEnhance.js"
|
|
100
90
|
},
|
|
101
91
|
"./lib/utils/enhances/WithI18n": {
|
|
102
|
-
"
|
|
92
|
+
"types": "./lib/utils/enhances/WithI18n.d.ts",
|
|
103
93
|
"import": "./lib/utils/enhances/WithI18n.mjs",
|
|
104
|
-
"
|
|
94
|
+
"require": "./lib/utils/enhances/WithI18n.js"
|
|
105
95
|
},
|
|
106
96
|
"./lib/utils/use/useEnhancedEffect": {
|
|
107
|
-
"
|
|
97
|
+
"types": "./lib/utils/use/useEnhancedEffect.d.ts",
|
|
108
98
|
"import": "./lib/utils/use/useEnhancedEffect.mjs",
|
|
109
|
-
"
|
|
99
|
+
"require": "./lib/utils/use/useEnhancedEffect.js"
|
|
110
100
|
},
|
|
111
101
|
"./lib/utils/use/useFocusLock": {
|
|
112
|
-
"
|
|
102
|
+
"types": "./lib/utils/use/useFocusLock.d.ts",
|
|
113
103
|
"import": "./lib/utils/use/useFocusLock.mjs",
|
|
114
|
-
"
|
|
104
|
+
"require": "./lib/utils/use/useFocusLock.js"
|
|
115
105
|
},
|
|
116
106
|
"./lib/utils/use/useColorResolver": {
|
|
117
|
-
"
|
|
107
|
+
"types": "./lib/utils/use/useColorResolver.d.ts",
|
|
118
108
|
"import": "./lib/utils/use/useColorResolver.mjs",
|
|
119
|
-
"
|
|
109
|
+
"require": "./lib/utils/use/useColorResolver.js"
|
|
120
110
|
},
|
|
121
111
|
"./lib/utils/use/useEventCallback": {
|
|
122
|
-
"
|
|
112
|
+
"types": "./lib/utils/use/useEventCallback.d.ts",
|
|
123
113
|
"import": "./lib/utils/use/useEventCallback.mjs",
|
|
124
|
-
"
|
|
114
|
+
"require": "./lib/utils/use/useEventCallback.js"
|
|
125
115
|
},
|
|
126
116
|
"./lib/utils/use/usePreventScroll": {
|
|
127
|
-
"
|
|
117
|
+
"types": "./lib/utils/use/usePreventScroll.d.ts",
|
|
128
118
|
"import": "./lib/utils/use/usePreventScroll.mjs",
|
|
129
|
-
"
|
|
119
|
+
"require": "./lib/utils/use/usePreventScroll.js"
|
|
130
120
|
},
|
|
131
121
|
"./lib/utils/addonTextChildren": {
|
|
132
|
-
"
|
|
122
|
+
"types": "./lib/utils/addonTextChildren.d.ts",
|
|
133
123
|
"import": "./lib/utils/addonTextChildren.mjs",
|
|
134
|
-
"
|
|
124
|
+
"require": "./lib/utils/addonTextChildren.js"
|
|
135
125
|
},
|
|
136
126
|
"./lib/utils/ariaProps": {
|
|
137
|
-
"
|
|
127
|
+
"types": "./lib/utils/ariaProps.d.ts",
|
|
138
128
|
"import": "./lib/utils/ariaProps.mjs",
|
|
139
|
-
"
|
|
129
|
+
"require": "./lib/utils/ariaProps.js"
|
|
140
130
|
},
|
|
141
131
|
"./lib/utils/assignProps": {
|
|
142
|
-
"
|
|
132
|
+
"types": "./lib/utils/assignProps.d.ts",
|
|
143
133
|
"import": "./lib/utils/assignProps.mjs",
|
|
144
|
-
"
|
|
134
|
+
"require": "./lib/utils/assignProps.js"
|
|
145
135
|
},
|
|
146
136
|
"./lib/utils/capitalizeFirstLetter": {
|
|
147
|
-
"
|
|
137
|
+
"types": "./lib/utils/capitalizeFirstLetter.d.ts",
|
|
148
138
|
"import": "./lib/utils/capitalizeFirstLetter.mjs",
|
|
149
|
-
"
|
|
139
|
+
"require": "./lib/utils/capitalizeFirstLetter.js"
|
|
150
140
|
},
|
|
151
141
|
"./lib/utils/canUseDOM": {
|
|
152
|
-
"
|
|
142
|
+
"types": "./lib/utils/canUseDOM.d.ts",
|
|
153
143
|
"import": "./lib/utils/canUseDOM.mjs",
|
|
154
|
-
"
|
|
144
|
+
"require": "./lib/utils/canUseDOM.js"
|
|
155
145
|
},
|
|
156
146
|
"./lib/utils/CSSinJS": {
|
|
157
|
-
"
|
|
147
|
+
"types": "./lib/utils/CSSinJS.d.ts",
|
|
158
148
|
"import": "./lib/utils/CSSinJS.mjs",
|
|
159
|
-
"
|
|
149
|
+
"require": "./lib/utils/CSSinJS.js"
|
|
160
150
|
},
|
|
161
151
|
"./lib/utils/cssToIntDefault": {
|
|
162
|
-
"
|
|
152
|
+
"types": "./lib/utils/cssToIntDefault.d.ts",
|
|
163
153
|
"import": "./lib/utils/cssToIntDefault.mjs",
|
|
164
|
-
"
|
|
154
|
+
"require": "./lib/utils/cssToIntDefault.js"
|
|
165
155
|
},
|
|
166
156
|
"./lib/utils/eventEmitter": {
|
|
167
|
-
"
|
|
157
|
+
"types": "./lib/utils/eventEmitter.d.ts",
|
|
168
158
|
"import": "./lib/utils/eventEmitter.mjs",
|
|
169
|
-
"
|
|
159
|
+
"require": "./lib/utils/eventEmitter.js"
|
|
170
160
|
},
|
|
171
161
|
"./lib/utils/fire": {
|
|
172
|
-
"
|
|
162
|
+
"types": "./lib/utils/fire.d.ts",
|
|
173
163
|
"import": "./lib/utils/fire.mjs",
|
|
174
|
-
"
|
|
164
|
+
"require": "./lib/utils/fire.js"
|
|
175
165
|
},
|
|
176
166
|
"./lib/utils/findComponent": {
|
|
177
|
-
"
|
|
167
|
+
"types": "./lib/utils/findComponent.d.ts",
|
|
178
168
|
"import": "./lib/utils/findComponent.mjs",
|
|
179
|
-
"
|
|
169
|
+
"require": "./lib/utils/findComponent.js"
|
|
180
170
|
},
|
|
181
171
|
"./lib/utils/getAccessibleName": {
|
|
182
|
-
"
|
|
172
|
+
"types": "./lib/utils/getAccessibleName.d.ts",
|
|
183
173
|
"import": "./lib/utils/getAccessibleName.mjs",
|
|
184
|
-
"
|
|
174
|
+
"require": "./lib/utils/getAccessibleName.js"
|
|
185
175
|
},
|
|
186
176
|
"./lib/utils/getDisplayName": {
|
|
187
|
-
"
|
|
177
|
+
"types": "./lib/utils/getDisplayName.d.ts",
|
|
188
178
|
"import": "./lib/utils/getDisplayName.mjs",
|
|
189
|
-
"
|
|
179
|
+
"require": "./lib/utils/getDisplayName.js"
|
|
190
180
|
},
|
|
191
181
|
"./lib/utils/getEventTarget": {
|
|
192
|
-
"
|
|
182
|
+
"types": "./lib/utils/getEventTarget.d.ts",
|
|
193
183
|
"import": "./lib/utils/getEventTarget.mjs",
|
|
194
|
-
"
|
|
184
|
+
"require": "./lib/utils/getEventTarget.js"
|
|
195
185
|
},
|
|
196
186
|
"./lib/utils/getOriginChildren": {
|
|
197
|
-
"
|
|
187
|
+
"types": "./lib/utils/getOriginChildren.d.ts",
|
|
198
188
|
"import": "./lib/utils/getOriginChildren.mjs",
|
|
199
|
-
"
|
|
189
|
+
"require": "./lib/utils/getOriginChildren.js"
|
|
200
190
|
},
|
|
201
191
|
"./lib/utils/hasLabels": {
|
|
202
|
-
"
|
|
192
|
+
"types": "./lib/utils/hasLabels.d.ts",
|
|
203
193
|
"import": "./lib/utils/hasLabels.mjs",
|
|
204
|
-
"
|
|
194
|
+
"require": "./lib/utils/hasLabels.js"
|
|
205
195
|
},
|
|
206
196
|
"./lib/utils/hasParent": {
|
|
207
|
-
"
|
|
197
|
+
"types": "./lib/utils/hasParent.d.ts",
|
|
208
198
|
"import": "./lib/utils/hasParent.mjs",
|
|
209
|
-
"
|
|
199
|
+
"require": "./lib/utils/hasParent.js"
|
|
210
200
|
},
|
|
211
201
|
"./lib/utils/inputProps": {
|
|
212
|
-
"
|
|
202
|
+
"types": "./lib/utils/inputProps.d.ts",
|
|
213
203
|
"import": "./lib/utils/inputProps.mjs",
|
|
214
|
-
"
|
|
204
|
+
"require": "./lib/utils/inputProps.js"
|
|
215
205
|
},
|
|
216
206
|
"./lib/utils/isInteractiveElement": {
|
|
217
|
-
"
|
|
207
|
+
"types": "./lib/utils/isInteractiveElement.d.ts",
|
|
218
208
|
"import": "./lib/utils/isInteractiveElement.mjs",
|
|
219
|
-
"
|
|
209
|
+
"require": "./lib/utils/isInteractiveElement.js"
|
|
220
210
|
},
|
|
221
211
|
"./lib/utils/isNode": {
|
|
222
|
-
"
|
|
212
|
+
"types": "./lib/utils/isNode.d.ts",
|
|
223
213
|
"import": "./lib/utils/isNode.mjs",
|
|
224
|
-
"
|
|
214
|
+
"require": "./lib/utils/isNode.js"
|
|
225
215
|
},
|
|
226
216
|
"./lib/utils/isRetina": {
|
|
227
|
-
"
|
|
217
|
+
"types": "./lib/utils/isRetina.d.ts",
|
|
228
218
|
"import": "./lib/utils/isRetina.mjs",
|
|
229
|
-
"
|
|
219
|
+
"require": "./lib/utils/isRetina.js"
|
|
230
220
|
},
|
|
231
221
|
"./lib/utils/ownerDocument": {
|
|
232
|
-
"
|
|
222
|
+
"types": "./lib/utils/ownerDocument.d.ts",
|
|
233
223
|
"import": "./lib/utils/ownerDocument.mjs",
|
|
234
|
-
"
|
|
224
|
+
"require": "./lib/utils/ownerDocument.js"
|
|
235
225
|
},
|
|
236
226
|
"./lib/utils/pick": {
|
|
237
|
-
"
|
|
227
|
+
"types": "./lib/utils/pick.d.ts",
|
|
238
228
|
"import": "./lib/utils/pick.mjs",
|
|
239
|
-
"
|
|
229
|
+
"require": "./lib/utils/pick.js"
|
|
240
230
|
},
|
|
241
231
|
"./lib/utils/propsForElement": {
|
|
242
|
-
"
|
|
232
|
+
"types": "./lib/utils/propsForElement.d.ts",
|
|
243
233
|
"import": "./lib/utils/propsForElement.mjs",
|
|
244
|
-
"
|
|
234
|
+
"require": "./lib/utils/propsForElement.js"
|
|
245
235
|
},
|
|
246
236
|
"./lib/utils/logger": {
|
|
247
|
-
"
|
|
237
|
+
"types": "./lib/utils/logger.d.ts",
|
|
248
238
|
"import": "./lib/utils/logger.mjs",
|
|
249
|
-
"
|
|
239
|
+
"require": "./lib/utils/logger.js"
|
|
250
240
|
},
|
|
251
241
|
"./lib/utils/rafTrottle": {
|
|
252
|
-
"
|
|
242
|
+
"types": "./lib/utils/rafTrottle.d.ts",
|
|
253
243
|
"import": "./lib/utils/rafTrottle.mjs",
|
|
254
|
-
"
|
|
244
|
+
"require": "./lib/utils/rafTrottle.js"
|
|
255
245
|
},
|
|
256
246
|
"./lib/utils/reactToText": {
|
|
257
|
-
"
|
|
247
|
+
"types": "./lib/utils/reactToText.d.ts",
|
|
258
248
|
"import": "./lib/utils/reactToText.mjs",
|
|
259
|
-
"
|
|
249
|
+
"require": "./lib/utils/reactToText.js"
|
|
260
250
|
},
|
|
261
251
|
"./lib/utils/ref": {
|
|
262
|
-
"
|
|
252
|
+
"types": "./lib/utils/ref.d.ts",
|
|
263
253
|
"import": "./lib/utils/ref.mjs",
|
|
264
|
-
"
|
|
254
|
+
"require": "./lib/utils/ref.js"
|
|
265
255
|
},
|
|
266
256
|
"./lib/utils/setRef": {
|
|
267
|
-
"
|
|
257
|
+
"types": "./lib/utils/setRef.d.ts",
|
|
268
258
|
"import": "./lib/utils/setRef.mjs",
|
|
269
|
-
"
|
|
259
|
+
"require": "./lib/utils/setRef.js"
|
|
270
260
|
},
|
|
271
261
|
"./lib/utils/ScreenReaderOnly": {
|
|
272
|
-
"
|
|
262
|
+
"types": "./lib/utils/ScreenReaderOnly.d.ts",
|
|
273
263
|
"import": "./lib/utils/ScreenReaderOnly.mjs",
|
|
274
|
-
"
|
|
264
|
+
"require": "./lib/utils/ScreenReaderOnly.js"
|
|
275
265
|
},
|
|
276
266
|
"./lib/utils/syncScroll": {
|
|
277
|
-
"
|
|
267
|
+
"types": "./lib/utils/syncScroll.d.ts",
|
|
278
268
|
"import": "./lib/utils/syncScroll.mjs",
|
|
279
|
-
"
|
|
269
|
+
"require": "./lib/utils/syncScroll.js"
|
|
280
270
|
},
|
|
281
271
|
"./lib/utils/ThemeProvider": {
|
|
282
|
-
"
|
|
272
|
+
"types": "./lib/utils/ThemeProvider.d.ts",
|
|
283
273
|
"import": "./lib/utils/ThemeProvider.mjs",
|
|
284
|
-
"
|
|
274
|
+
"require": "./lib/utils/ThemeProvider.js"
|
|
285
275
|
},
|
|
286
276
|
"./lib/utils/uniqueID": {
|
|
287
|
-
"
|
|
277
|
+
"types": "./lib/utils/uniqueID.d.ts",
|
|
288
278
|
"import": "./lib/utils/uniqueID.mjs",
|
|
289
|
-
"
|
|
279
|
+
"require": "./lib/utils/uniqueID.js"
|
|
290
280
|
},
|
|
291
281
|
"./lib/utils/useCssVariable": {
|
|
292
|
-
"
|
|
282
|
+
"types": "./lib/utils/useCssVariable.d.ts",
|
|
293
283
|
"import": "./lib/utils/useCssVariable.mjs",
|
|
294
|
-
"
|
|
284
|
+
"require": "./lib/utils/useCssVariable.js"
|
|
295
285
|
},
|
|
296
286
|
"./lib/utils/zIndexStacking": {
|
|
297
|
-
"
|
|
287
|
+
"types": "./lib/utils/zIndexStacking.d.ts",
|
|
298
288
|
"import": "./lib/utils/zIndexStacking.mjs",
|
|
299
|
-
"
|
|
289
|
+
"require": "./lib/utils/zIndexStacking.js"
|
|
300
290
|
},
|
|
301
291
|
"./lib/utils/use/useScrollBarWidth": {
|
|
302
|
-
"
|
|
292
|
+
"types": "./lib/utils/use/useScrollBarWidth.d.ts",
|
|
303
293
|
"import": "./lib/utils/use/useScrollBarWidth.mjs",
|
|
304
|
-
"
|
|
294
|
+
"require": "./lib/utils/use/useScrollBarWidth.js"
|
|
295
|
+
},
|
|
296
|
+
"./lib/decorators/reactive": {
|
|
297
|
+
"types": "./lib/decorators/reactive.d.ts",
|
|
298
|
+
"import": "./lib/decorators/reactive.mjs",
|
|
299
|
+
"require": "./lib/decorators/reactive.js"
|
|
300
|
+
},
|
|
301
|
+
"./lib/decorators/propsObserver": {
|
|
302
|
+
"types": "./lib/decorators/propsObserver.d.ts",
|
|
303
|
+
"import": "./lib/decorators/propsObserver.mjs",
|
|
304
|
+
"require": "./lib/decorators/propsObserver.js"
|
|
305
305
|
}
|
|
306
306
|
},
|
|
307
307
|
"dependencies": {
|
|
@@ -312,8 +312,8 @@
|
|
|
312
312
|
"@babel/runtime": "7.27.6"
|
|
313
313
|
},
|
|
314
314
|
"peerDependencies": {
|
|
315
|
-
"react": "16.8 -
|
|
316
|
-
"react-dom": "16.8 -
|
|
315
|
+
"react": "16.8 - 19",
|
|
316
|
+
"react-dom": "16.8 - 19"
|
|
317
317
|
},
|
|
318
318
|
"repository": {
|
|
319
319
|
"type": "git",
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
function arraysEqual(a, b) {
|
|
8
|
-
if (a.length !== b.length) return false;
|
|
9
|
-
for (var i = 0; i < a.length; i++) {
|
|
10
|
-
if (a[i] !== b[i]) return false;
|
|
11
|
-
}
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
function handlerBinder(fn) {
|
|
15
|
-
return function () {
|
|
16
|
-
for (var _len = arguments.length, depsArgs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
-
depsArgs[_key] = arguments[_key];
|
|
18
|
-
}
|
|
19
|
-
var memoizeds = [];
|
|
20
|
-
if (handlerBinder.hasher.has(fn)) {
|
|
21
|
-
memoizeds = handlerBinder.hasher.get(fn);
|
|
22
|
-
var memoized = memoizeds.find(function (memoized) {
|
|
23
|
-
return arraysEqual(memoized.deps, depsArgs);
|
|
24
|
-
});
|
|
25
|
-
if (memoized) return memoized.fn;
|
|
26
|
-
}
|
|
27
|
-
var bindFn = fn.apply(void 0, depsArgs).bind(fn);
|
|
28
|
-
memoizeds.push({
|
|
29
|
-
deps: depsArgs,
|
|
30
|
-
fn: bindFn
|
|
31
|
-
});
|
|
32
|
-
handlerBinder.hasher.set(fn, memoizeds);
|
|
33
|
-
return bindFn;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
handlerBinder.hasher = new WeakMap();
|
|
37
|
-
function Enhancement() {
|
|
38
|
-
return {
|
|
39
|
-
condition: function condition(_Component, isFunction) {
|
|
40
|
-
return !isFunction;
|
|
41
|
-
},
|
|
42
|
-
init: function init() {
|
|
43
|
-
var _this = this;
|
|
44
|
-
Object.keys(this).filter(function (field) {
|
|
45
|
-
return field.startsWith('bindHandler');
|
|
46
|
-
}).forEach(function (name) {
|
|
47
|
-
_this[name] = handlerBinder(_this[name].bind(_this));
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
var _default = exports["default"] = Enhancement;
|
|
53
|
-
//# sourceMappingURL=bindHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bindHandler.js","names":["arraysEqual","a","b","length","i","handlerBinder","fn","_len","arguments","depsArgs","Array","_key","memoizeds","hasher","has","get","memoized","find","deps","bindFn","apply","bind","push","set","WeakMap","Enhancement","condition","_Component","isFunction","init","_this","Object","keys","filter","field","startsWith","forEach","name","_default","exports"],"sources":["../../src/enhancement/bindHandler.tsx"],"sourcesContent":["function arraysEqual(a: any, b: any) {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) return false;\n }\n return true;\n}\n\nfunction handlerBinder(fn: any) {\n return function (...depsArgs: any[]) {\n let memoizeds = [];\n if (handlerBinder.hasher.has(fn)) {\n memoizeds = handlerBinder.hasher.get(fn);\n const memoized = memoizeds.find((memoized: any) => arraysEqual(memoized.deps, depsArgs));\n if (memoized) return memoized.fn;\n }\n\n const bindFn = fn(...depsArgs).bind(fn);\n memoizeds.push({\n deps: depsArgs,\n fn: bindFn,\n });\n handlerBinder.hasher.set(fn, memoizeds);\n return bindFn;\n };\n}\n\nhandlerBinder.hasher = new WeakMap();\n\nfunction Enhancement() {\n return {\n condition: function (_Component: any, isFunction: boolean) {\n return !isFunction;\n },\n init: function (this: any) {\n Object.keys(this)\n .filter((field) => field.startsWith('bindHandler'))\n .forEach((name) => {\n this[name] = handlerBinder(this[name].bind(this));\n });\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":";;;;;;AAAA,SAASA,WAAWA,CAACC,CAAM,EAAEC,CAAM,EAAE;EACnC,IAAID,CAAC,CAACE,MAAM,KAAKD,CAAC,CAACC,MAAM,EAAE,OAAO,KAAK;EACvC,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,CAAC,CAACE,MAAM,EAAEC,CAAC,EAAE,EAAE;IACjC,IAAIH,CAAC,CAACG,CAAC,CAAC,KAAKF,CAAC,CAACE,CAAC,CAAC,EAAE,OAAO,KAAK;EACjC;EACA,OAAO,IAAI;AACb;AAEA,SAASC,aAAaA,CAACC,EAAO,EAAE;EAC9B,OAAO,YAA8B;IAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAL,MAAA,EAAjBM,QAAQ,OAAAC,KAAA,CAAAH,IAAA,GAAAI,IAAA,MAAAA,IAAA,GAAAJ,IAAA,EAAAI,IAAA;MAARF,QAAQ,CAAAE,IAAA,IAAAH,SAAA,CAAAG,IAAA;IAAA;IAC1B,IAAIC,SAAS,GAAG,EAAE;IAClB,IAAIP,aAAa,CAACQ,MAAM,CAACC,GAAG,CAACR,EAAE,CAAC,EAAE;MAChCM,SAAS,GAAGP,aAAa,CAACQ,MAAM,CAACE,GAAG,CAACT,EAAE,CAAC;MACxC,IAAMU,QAAQ,GAAGJ,SAAS,CAACK,IAAI,CAAC,UAACD,QAAa;QAAA,OAAKhB,WAAW,CAACgB,QAAQ,CAACE,IAAI,EAAET,QAAQ,CAAC;MAAA,EAAC;MACxF,IAAIO,QAAQ,EAAE,OAAOA,QAAQ,CAACV,EAAE;IAClC;IAEA,IAAMa,MAAM,GAAGb,EAAE,CAAAc,KAAA,SAAIX,QAAQ,CAAC,CAACY,IAAI,CAACf,EAAE,CAAC;IACvCM,SAAS,CAACU,IAAI,CAAC;MACbJ,IAAI,EAAET,QAAQ;MACdH,EAAE,EAAEa;IACN,CAAC,CAAC;IACFd,aAAa,CAACQ,MAAM,CAACU,GAAG,CAACjB,EAAE,EAAEM,SAAS,CAAC;IACvC,OAAOO,MAAM;EACf,CAAC;AACH;AAEAd,aAAa,CAACQ,MAAM,GAAG,IAAIW,OAAO,CAAC,CAAC;AAEpC,SAASC,WAAWA,CAAA,EAAG;EACrB,OAAO;IACLC,SAAS,EAAE,SAAXA,SAASA,CAAYC,UAAe,EAAEC,UAAmB,EAAE;MACzD,OAAO,CAACA,UAAU;IACpB,CAAC;IACDC,IAAI,EAAE,SAANA,IAAIA,CAAA,EAAuB;MAAA,IAAAC,KAAA;MACzBC,MAAM,CAACC,IAAI,CAAC,IAAI,CAAC,CACdC,MAAM,CAAC,UAACC,KAAK;QAAA,OAAKA,KAAK,CAACC,UAAU,CAAC,aAAa,CAAC;MAAA,EAAC,CAClDC,OAAO,CAAC,UAACC,IAAI,EAAK;QACjBP,KAAI,CAACO,IAAI,CAAC,GAAGhC,aAAa,CAACyB,KAAI,CAACO,IAAI,CAAC,CAAChB,IAAI,CAACS,KAAI,CAAC,CAAC;MACnD,CAAC,CAAC;IACN;EACF,CAAC;AACH;AAAC,IAAAQ,QAAA,GAAAC,OAAA,cAEcd,WAAW","ignoreList":[]}
|