@semcore/feature-popover 16.1.5-prerelease.4 → 16.1.6-prerelease.1
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 +6 -0
- package/lib/cjs/FeaturePopover.js +11 -11
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/es6/FeaturePopover.js +11 -11
- package/lib/es6/index.d.js.map +1 -1
- package/lib/esm/FeaturePopover.mjs +13 -13
- package/lib/types/index.d.ts +98 -3
- package/package.json +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [16.1.6] - 2025-08-06
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/animation` [16.0.3 ~> 16.0.4], `@semcore/button` [16.0.5 ~> 16.0.6], `@semcore/icon` [16.4.0 ~> 16.5.0], `@semcore/base-components` [16.1.2 ~> 16.2.0]).
|
|
10
|
+
|
|
5
11
|
## [16.1.5] - 2025-07-23
|
|
6
12
|
|
|
7
13
|
### Changed
|
|
@@ -28,22 +28,22 @@ var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynam
|
|
|
28
28
|
var _excluded = ["styles", "forwardRef", "onVisibleChange", "modifiers"];
|
|
29
29
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
30
30
|
/*!__reshadow-styles__:"./style/feature-popover.shadow.css"*/
|
|
31
|
-
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
31
|
+
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@keyframes showTrigger_1q0i6{0%{opacity:0}to{opacity:1}}@keyframes scaleSizeAndHide_1q0i6{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}.___SFeaturePopover_1q0i6_gg_{padding-top:var(--intergalactic-spacing-4x, 16px);padding-right:var(--intergalactic-spacing-10x, 40px);padding-bottom:var(--intergalactic-spacing-4x, 16px);padding-left:var(--intergalactic-spacing-4x, 16px);border-radius:var(--intergalactic-popper-rounded, 6px);box-sizing:border-box;background-color:var(--intergalactic-bg-primary-highlight, #fce081);color:var(--intergalactic-text-primary, #191b23);box-shadow:var(--intergalactic-box-shadow-popper, 0px 1px 12px 0px rgba(25, 27, 35, 0.15));position:relative}.___STrigger_1q0i6_gg_{position:relative}.___SClose_1q0i6_gg_{position:absolute;z-index:1;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SClose_1q0i6_gg_ .___SAddon_1q0i6_gg_:only-child{margin-left:calc(var(--intergalactic-spacing-2x, 8px) - 1px);margin-right:calc(var(--intergalactic-spacing-2x, 8px) - 1px)}.___SSpot_1q0i6_gg_{position:absolute;bottom:calc(-1*var(--intergalactic-spacing-1x, 4px));right:calc(-1*var(--intergalactic-spacing-1x, 4px));animation-name:showTrigger_1q0i6;animation-duration:.2s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards;width:12px;height:12px}.___SSpot_1q0i6_gg_::after,.___SSpot_1q0i6_gg_::before{content:\"\";position:absolute;top:0;left:0;border-radius:50%;width:12px;height:12px}.___SSpot_1q0i6_gg_::before{transform-origin:50%;animation-name:scaleSizeAndHide_1q0i6;animation-duration:1s;animation-iteration-count:infinite;animation-fill-mode:forwards;animation-delay:.5s;background-color:var(--intergalactic-feature-popover-dot-outer-border, #fce081)}.___SSpot_1q0i6_gg_::after{background-color:var(--intergalactic-bg-primary-highlight, #fce081)}@media (prefers-reduced-motion){.___SSpot_1q0i6_gg_,.___SSpot_1q0i6_gg_::before{animation-name:none}}", /*__inner_css_end__*/"1q0i6_gg_"),
|
|
32
32
|
/*__reshadow_css_end__*/
|
|
33
33
|
{
|
|
34
|
-
"__SFeaturePopover": "
|
|
35
|
-
"__STrigger": "
|
|
36
|
-
"@showTrigger": "
|
|
37
|
-
"@scaleSizeAndHide": "
|
|
38
|
-
"__SClose": "
|
|
39
|
-
"__SAddon": "
|
|
40
|
-
"__SSpot": "
|
|
34
|
+
"__SFeaturePopover": "___SFeaturePopover_1q0i6_gg_",
|
|
35
|
+
"__STrigger": "___STrigger_1q0i6_gg_",
|
|
36
|
+
"@showTrigger": "showTrigger_1q0i6",
|
|
37
|
+
"@scaleSizeAndHide": "scaleSizeAndHide_1q0i6",
|
|
38
|
+
"__SClose": "___SClose_1q0i6_gg_",
|
|
39
|
+
"__SAddon": "___SAddon_1q0i6_gg_",
|
|
40
|
+
"__SSpot": "___SSpot_1q0i6_gg_"
|
|
41
41
|
});
|
|
42
|
-
var stylePopper = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
42
|
+
var stylePopper = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@keyframes enter_1b9wj{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}@keyframes exit_1b9wj{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-10px)}}", /*__inner_css_end__*/"1b9wj_gg_"),
|
|
43
43
|
/*__reshadow_css_end__*/
|
|
44
44
|
{
|
|
45
|
-
"@enter": "
|
|
46
|
-
"@exit": "
|
|
45
|
+
"@enter": "enter_1b9wj",
|
|
46
|
+
"@exit": "exit_1b9wj"
|
|
47
47
|
});
|
|
48
48
|
var FeaturePopover = /*#__PURE__*/function (_Component) {
|
|
49
49
|
function FeaturePopover() {
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';\nimport type { Box } from '@semcore/flex-box';\nimport type { PopperContext, PopperPopperProps,
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { Options as OptionsArrow } from '@popperjs/core/lib/modifiers/arrow';\nimport type { Options as OptionsComputeStyles } from '@popperjs/core/lib/modifiers/computeStyles';\nimport type { Options as OptionsEventListeners } from '@popperjs/core/lib/modifiers/eventListeners';\nimport type { Options as OptionsFlip } from '@popperjs/core/lib/modifiers/flip';\nimport type { Options as OptionsOffset } from '@popperjs/core/lib/modifiers/offset';\nimport type { Options as OptionsPreventOverflow } from '@popperjs/core/lib/modifiers/preventOverflow';\nimport type { Modifier, Options, PositioningStrategy } from '@popperjs/core/lib/types';\nimport type { AnimationProps, BoxProps, OutsideClickProps, PortalProps } from '@semcore/base-components';\nimport type { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';\nimport type { Box } from '@semcore/flex-box';\nimport type { PopperContext, PopperPopperProps, Placement } from '@semcore/popper';\nimport type Popper from '@semcore/popper';\n\n/**\n * Popper must have an accessible names (aria-group-name).\n */\ntype AriaProps = Intergalactic.RequireAtLeastOne<{\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'title'?: string;\n}>;\n\n/** @deprecated */\nexport interface IFeaturePopoverPopperProps extends FeaturePopoverPopperProps, UnknownProperties {}\nexport type FeaturePopoverPopperProps = PopperPopperProps & {\n /**\n * The property responsible for the visibility of the closing icon\n * @default false\n */\n closeIcon?: boolean;\n /** Animation display duration in `ms`\n * @default 200\n */\n duration?: number;\n\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IFeaturePopoverContext extends FeaturePopoverContext, UnknownProperties {}\nexport type FeaturePopoverContext = PopperContext & {\n getSpotProps: PropGetterFn;\n};\n\nexport type FPPopperProps = OutsideClickProps &\n PortalProps &\n UniqueIDProps &\n AnimationProps & {\n /**\n * Popper can have different positioning options\n * @default absolute\n */\n strategy?: PositioningStrategy;\n /**\n * Modifiers for popper.js\n */\n modifiers?: Array<Partial<Modifier<any, any>>>;\n /** Timer to show and hide the popper */\n timeout?: number | [number, number];\n /** PopperJS modifier settings for popper indent */\n offset?: Partial<OptionsOffset> | number | [number, number];\n /** PopperJS modifier settings for finding borders */\n preventOverflow?: Partial<OptionsPreventOverflow>;\n /** PopperJS modifier settings responsible for the arrow */\n arrow?: Partial<OptionsArrow>;\n /** PopperJS modifier settings responsible for turning the popper when there is not enough space */\n flip?: Partial<OptionsFlip>;\n /** PopperJS modifier settings for applying styles */\n computeStyles?: Partial<OptionsComputeStyles>;\n /** PopperJS modifier settings responsible for subscribing to global events */\n eventListeners?: Partial<OptionsEventListeners>;\n /** @ignore */\n onFirstUpdate?: Options['onFirstUpdate'];\n /**\n * Flag for disable Popover (if true, it will close Popper and it will not respond to handlers)\n * @default false\n */\n disabled?: boolean;\n /**\n * If enabled, you will need to use setTrigger function from children rendering function to set popper trigger.\n */\n explicitTriggerSet?: boolean;\n /**\n * If set, popper will be placed near the place mouse cursor entered the trigger\n * @deprecated\n */\n cursorAnchoring?: boolean;\n\n popperMargin?: number;\n\n /**\n * You shouldn't change an interaction in FeaturePopover. Comes from a Popper component.\n * @deprecated\n * @default none\n */\n interaction?: 'click' | 'hover' | 'focus' | 'none' | eventInteraction;\n /**\n * You shouldn't change it in FeaturePopover as it should be controlled always. Comes from a Popper component.\n * @deprecated\n * @default false */\n defaultVisible?: boolean;\n /**\n * Disabled focus trap, autofocus and focus return\n * You shouldn't change it in FeaturePopover as it should be controlled always. Comes from a Popper component.\n * @deprecated\n */\n disableEnforceFocus?: boolean;\n /**\n * If enabled, after reaching the end of popper the browser focus goes to the start of popper and vice versa.\n * If disabled, after reading the end of popper the browser focus returns to trigger and popper is being closed.\n * You shouldn't change it in FeaturePopover as it should be controlled always. Comes from a Popper component.\n * @deprecated\n * @default `true` (`false` in Tooltip)\n */\n focusLoop?: boolean;\n };\n\nexport type FeaturePopoverProps = FPPopperProps & {\n /** Popper visibility value */\n visible?: boolean;\n /** Function called when visibility changes */\n onVisibleChange?: (visible: boolean, e?: Event) => boolean | void;\n /**\n * The position of the popper relative to the trigger that called it.\n * @default auto\n */\n placement?: Placement;\n};\n\nexport type FeaturePopoverTriggerProps = BoxProps;\n\ndeclare const FeaturePopover: Intergalactic.Component<'div', FeaturePopoverProps, FeaturePopoverContext> & {\n Trigger: Intergalactic.Component<typeof Popper.Trigger, FeaturePopoverTriggerProps>;\n Popper: Intergalactic.Component<'div', FeaturePopoverPopperProps & AriaProps>;\n Spot: typeof Box;\n};\n\nexport default FeaturePopover;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -24,23 +24,23 @@ import CloseIcon from '@semcore/icon/Close/m';
|
|
|
24
24
|
import Popper from '@semcore/popper';
|
|
25
25
|
import React from 'react';
|
|
26
26
|
/*!__reshadow-styles__:"./style/feature-popover.shadow.css"*/
|
|
27
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
27
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes showTrigger_1q0i6{0%{opacity:0}to{opacity:1}}@keyframes scaleSizeAndHide_1q0i6{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}.___SFeaturePopover_1q0i6_gg_{padding-top:var(--intergalactic-spacing-4x, 16px);padding-right:var(--intergalactic-spacing-10x, 40px);padding-bottom:var(--intergalactic-spacing-4x, 16px);padding-left:var(--intergalactic-spacing-4x, 16px);border-radius:var(--intergalactic-popper-rounded, 6px);box-sizing:border-box;background-color:var(--intergalactic-bg-primary-highlight, #fce081);color:var(--intergalactic-text-primary, #191b23);box-shadow:var(--intergalactic-box-shadow-popper, 0px 1px 12px 0px rgba(25, 27, 35, 0.15));position:relative}.___STrigger_1q0i6_gg_{position:relative}.___SClose_1q0i6_gg_{position:absolute;z-index:1;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SClose_1q0i6_gg_ .___SAddon_1q0i6_gg_:only-child{margin-left:calc(var(--intergalactic-spacing-2x, 8px) - 1px);margin-right:calc(var(--intergalactic-spacing-2x, 8px) - 1px)}.___SSpot_1q0i6_gg_{position:absolute;bottom:calc(-1*var(--intergalactic-spacing-1x, 4px));right:calc(-1*var(--intergalactic-spacing-1x, 4px));animation-name:showTrigger_1q0i6;animation-duration:.2s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards;width:12px;height:12px}.___SSpot_1q0i6_gg_::after,.___SSpot_1q0i6_gg_::before{content:\"\";position:absolute;top:0;left:0;border-radius:50%;width:12px;height:12px}.___SSpot_1q0i6_gg_::before{transform-origin:50%;animation-name:scaleSizeAndHide_1q0i6;animation-duration:1s;animation-iteration-count:infinite;animation-fill-mode:forwards;animation-delay:.5s;background-color:var(--intergalactic-feature-popover-dot-outer-border, #fce081)}.___SSpot_1q0i6_gg_::after{background-color:var(--intergalactic-bg-primary-highlight, #fce081)}@media (prefers-reduced-motion){.___SSpot_1q0i6_gg_,.___SSpot_1q0i6_gg_::before{animation-name:none}}", /*__inner_css_end__*/"1q0i6_gg_"),
|
|
28
28
|
/*__reshadow_css_end__*/
|
|
29
29
|
{
|
|
30
|
-
"__SFeaturePopover": "
|
|
31
|
-
"__STrigger": "
|
|
32
|
-
"@showTrigger": "
|
|
33
|
-
"@scaleSizeAndHide": "
|
|
34
|
-
"__SClose": "
|
|
35
|
-
"__SAddon": "
|
|
36
|
-
"__SSpot": "
|
|
30
|
+
"__SFeaturePopover": "___SFeaturePopover_1q0i6_gg_",
|
|
31
|
+
"__STrigger": "___STrigger_1q0i6_gg_",
|
|
32
|
+
"@showTrigger": "showTrigger_1q0i6",
|
|
33
|
+
"@scaleSizeAndHide": "scaleSizeAndHide_1q0i6",
|
|
34
|
+
"__SClose": "___SClose_1q0i6_gg_",
|
|
35
|
+
"__SAddon": "___SAddon_1q0i6_gg_",
|
|
36
|
+
"__SSpot": "___SSpot_1q0i6_gg_"
|
|
37
37
|
});
|
|
38
38
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
39
|
-
var stylePopper = (/*__reshadow_css_start__*/sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
39
|
+
var stylePopper = (/*__reshadow_css_start__*/sstyled.insert(/*__inner_css_start__*/"@keyframes enter_1b9wj{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}@keyframes exit_1b9wj{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-10px)}}", /*__inner_css_end__*/"1b9wj_gg_"),
|
|
40
40
|
/*__reshadow_css_end__*/
|
|
41
41
|
{
|
|
42
|
-
"@enter": "
|
|
43
|
-
"@exit": "
|
|
42
|
+
"@enter": "enter_1b9wj",
|
|
43
|
+
"@exit": "exit_1b9wj"
|
|
44
44
|
});
|
|
45
45
|
var FeaturePopover = /*#__PURE__*/function (_Component) {
|
|
46
46
|
function FeaturePopover() {
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';\nimport type { Box } from '@semcore/flex-box';\nimport type { PopperContext, PopperPopperProps,
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { Options as OptionsArrow } from '@popperjs/core/lib/modifiers/arrow';\nimport type { Options as OptionsComputeStyles } from '@popperjs/core/lib/modifiers/computeStyles';\nimport type { Options as OptionsEventListeners } from '@popperjs/core/lib/modifiers/eventListeners';\nimport type { Options as OptionsFlip } from '@popperjs/core/lib/modifiers/flip';\nimport type { Options as OptionsOffset } from '@popperjs/core/lib/modifiers/offset';\nimport type { Options as OptionsPreventOverflow } from '@popperjs/core/lib/modifiers/preventOverflow';\nimport type { Modifier, Options, PositioningStrategy } from '@popperjs/core/lib/types';\nimport type { AnimationProps, BoxProps, OutsideClickProps, PortalProps } from '@semcore/base-components';\nimport type { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';\nimport type { Box } from '@semcore/flex-box';\nimport type { PopperContext, PopperPopperProps, Placement } from '@semcore/popper';\nimport type Popper from '@semcore/popper';\n\n/**\n * Popper must have an accessible names (aria-group-name).\n */\ntype AriaProps = Intergalactic.RequireAtLeastOne<{\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'title'?: string;\n}>;\n\n/** @deprecated */\nexport interface IFeaturePopoverPopperProps extends FeaturePopoverPopperProps, UnknownProperties {}\nexport type FeaturePopoverPopperProps = PopperPopperProps & {\n /**\n * The property responsible for the visibility of the closing icon\n * @default false\n */\n closeIcon?: boolean;\n /** Animation display duration in `ms`\n * @default 200\n */\n duration?: number;\n\n locale?: string;\n};\n\n/** @deprecated */\nexport interface IFeaturePopoverContext extends FeaturePopoverContext, UnknownProperties {}\nexport type FeaturePopoverContext = PopperContext & {\n getSpotProps: PropGetterFn;\n};\n\nexport type FPPopperProps = OutsideClickProps &\n PortalProps &\n UniqueIDProps &\n AnimationProps & {\n /**\n * Popper can have different positioning options\n * @default absolute\n */\n strategy?: PositioningStrategy;\n /**\n * Modifiers for popper.js\n */\n modifiers?: Array<Partial<Modifier<any, any>>>;\n /** Timer to show and hide the popper */\n timeout?: number | [number, number];\n /** PopperJS modifier settings for popper indent */\n offset?: Partial<OptionsOffset> | number | [number, number];\n /** PopperJS modifier settings for finding borders */\n preventOverflow?: Partial<OptionsPreventOverflow>;\n /** PopperJS modifier settings responsible for the arrow */\n arrow?: Partial<OptionsArrow>;\n /** PopperJS modifier settings responsible for turning the popper when there is not enough space */\n flip?: Partial<OptionsFlip>;\n /** PopperJS modifier settings for applying styles */\n computeStyles?: Partial<OptionsComputeStyles>;\n /** PopperJS modifier settings responsible for subscribing to global events */\n eventListeners?: Partial<OptionsEventListeners>;\n /** @ignore */\n onFirstUpdate?: Options['onFirstUpdate'];\n /**\n * Flag for disable Popover (if true, it will close Popper and it will not respond to handlers)\n * @default false\n */\n disabled?: boolean;\n /**\n * If enabled, you will need to use setTrigger function from children rendering function to set popper trigger.\n */\n explicitTriggerSet?: boolean;\n /**\n * If set, popper will be placed near the place mouse cursor entered the trigger\n * @deprecated\n */\n cursorAnchoring?: boolean;\n\n popperMargin?: number;\n\n /**\n * You shouldn't change an interaction in FeaturePopover. Comes from a Popper component.\n * @deprecated\n * @default none\n */\n interaction?: 'click' | 'hover' | 'focus' | 'none' | eventInteraction;\n /**\n * You shouldn't change it in FeaturePopover as it should be controlled always. Comes from a Popper component.\n * @deprecated\n * @default false */\n defaultVisible?: boolean;\n /**\n * Disabled focus trap, autofocus and focus return\n * You shouldn't change it in FeaturePopover as it should be controlled always. Comes from a Popper component.\n * @deprecated\n */\n disableEnforceFocus?: boolean;\n /**\n * If enabled, after reaching the end of popper the browser focus goes to the start of popper and vice versa.\n * If disabled, after reading the end of popper the browser focus returns to trigger and popper is being closed.\n * You shouldn't change it in FeaturePopover as it should be controlled always. Comes from a Popper component.\n * @deprecated\n * @default `true` (`false` in Tooltip)\n */\n focusLoop?: boolean;\n };\n\nexport type FeaturePopoverProps = FPPopperProps & {\n /** Popper visibility value */\n visible?: boolean;\n /** Function called when visibility changes */\n onVisibleChange?: (visible: boolean, e?: Event) => boolean | void;\n /**\n * The position of the popper relative to the trigger that called it.\n * @default auto\n */\n placement?: Placement;\n};\n\nexport type FeaturePopoverTriggerProps = BoxProps;\n\ndeclare const FeaturePopover: Intergalactic.Component<'div', FeaturePopoverProps, FeaturePopoverContext> & {\n Trigger: Intergalactic.Component<typeof Popper.Trigger, FeaturePopoverTriggerProps>;\n Popper: Intergalactic.Component<'div', FeaturePopoverPopperProps & AriaProps>;\n Spot: typeof Box;\n};\n\nexport default FeaturePopover;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -27,31 +27,31 @@ var style = (
|
|
|
27
27
|
/*__reshadow_css_start__*/
|
|
28
28
|
(sstyled.insert(
|
|
29
29
|
/*__inner_css_start__*/
|
|
30
|
-
'@keyframes
|
|
30
|
+
'@keyframes showTrigger_1q0i6{0%{opacity:0}to{opacity:1}}@keyframes scaleSizeAndHide_1q0i6{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}.___SFeaturePopover_1q0i6_gg_{padding-top:var(--intergalactic-spacing-4x, 16px);padding-right:var(--intergalactic-spacing-10x, 40px);padding-bottom:var(--intergalactic-spacing-4x, 16px);padding-left:var(--intergalactic-spacing-4x, 16px);border-radius:var(--intergalactic-popper-rounded, 6px);box-sizing:border-box;background-color:var(--intergalactic-bg-primary-highlight, #fce081);color:var(--intergalactic-text-primary, #191b23);box-shadow:var(--intergalactic-box-shadow-popper, 0px 1px 12px 0px rgba(25, 27, 35, 0.15));position:relative}.___STrigger_1q0i6_gg_{position:relative}.___SClose_1q0i6_gg_{position:absolute;z-index:1;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SClose_1q0i6_gg_ .___SAddon_1q0i6_gg_:only-child{margin-left:calc(var(--intergalactic-spacing-2x, 8px) - 1px);margin-right:calc(var(--intergalactic-spacing-2x, 8px) - 1px)}.___SSpot_1q0i6_gg_{position:absolute;bottom:calc(-1*var(--intergalactic-spacing-1x, 4px));right:calc(-1*var(--intergalactic-spacing-1x, 4px));animation-name:showTrigger_1q0i6;animation-duration:.2s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards;width:12px;height:12px}.___SSpot_1q0i6_gg_::after,.___SSpot_1q0i6_gg_::before{content:"";position:absolute;top:0;left:0;border-radius:50%;width:12px;height:12px}.___SSpot_1q0i6_gg_::before{transform-origin:50%;animation-name:scaleSizeAndHide_1q0i6;animation-duration:1s;animation-iteration-count:infinite;animation-fill-mode:forwards;animation-delay:.5s;background-color:var(--intergalactic-feature-popover-dot-outer-border, #fce081)}.___SSpot_1q0i6_gg_::after{background-color:var(--intergalactic-bg-primary-highlight, #fce081)}@media (prefers-reduced-motion){.___SSpot_1q0i6_gg_,.___SSpot_1q0i6_gg_::before{animation-name:none}}',
|
|
31
31
|
/*__inner_css_end__*/
|
|
32
|
-
"
|
|
32
|
+
"1q0i6_gg_"
|
|
33
33
|
), /*__reshadow_css_end__*/
|
|
34
34
|
{
|
|
35
|
-
"__SFeaturePopover": "
|
|
36
|
-
"__STrigger": "
|
|
37
|
-
"@showTrigger": "
|
|
38
|
-
"@scaleSizeAndHide": "
|
|
39
|
-
"__SClose": "
|
|
40
|
-
"__SAddon": "
|
|
41
|
-
"__SSpot": "
|
|
35
|
+
"__SFeaturePopover": "___SFeaturePopover_1q0i6_gg_",
|
|
36
|
+
"__STrigger": "___STrigger_1q0i6_gg_",
|
|
37
|
+
"@showTrigger": "showTrigger_1q0i6",
|
|
38
|
+
"@scaleSizeAndHide": "scaleSizeAndHide_1q0i6",
|
|
39
|
+
"__SClose": "___SClose_1q0i6_gg_",
|
|
40
|
+
"__SAddon": "___SAddon_1q0i6_gg_",
|
|
41
|
+
"__SSpot": "___SSpot_1q0i6_gg_"
|
|
42
42
|
})
|
|
43
43
|
);
|
|
44
44
|
var stylePopper = (
|
|
45
45
|
/*__reshadow_css_start__*/
|
|
46
46
|
(sstyled.insert(
|
|
47
47
|
/*__inner_css_start__*/
|
|
48
|
-
"@keyframes
|
|
48
|
+
"@keyframes enter_1b9wj{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}@keyframes exit_1b9wj{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-10px)}}",
|
|
49
49
|
/*__inner_css_end__*/
|
|
50
|
-
"
|
|
50
|
+
"1b9wj_gg_"
|
|
51
51
|
), /*__reshadow_css_end__*/
|
|
52
52
|
{
|
|
53
|
-
"@enter": "
|
|
54
|
-
"@exit": "
|
|
53
|
+
"@enter": "enter_1b9wj",
|
|
54
|
+
"@exit": "exit_1b9wj"
|
|
55
55
|
})
|
|
56
56
|
);
|
|
57
57
|
var FeaturePopover = /* @__PURE__ */ function(_Component) {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
import type { Options as OptionsArrow } from '@popperjs/core/lib/modifiers/arrow';
|
|
2
|
+
import type { Options as OptionsComputeStyles } from '@popperjs/core/lib/modifiers/computeStyles';
|
|
3
|
+
import type { Options as OptionsEventListeners } from '@popperjs/core/lib/modifiers/eventListeners';
|
|
4
|
+
import type { Options as OptionsFlip } from '@popperjs/core/lib/modifiers/flip';
|
|
5
|
+
import type { Options as OptionsOffset } from '@popperjs/core/lib/modifiers/offset';
|
|
6
|
+
import type { Options as OptionsPreventOverflow } from '@popperjs/core/lib/modifiers/preventOverflow';
|
|
7
|
+
import type { Modifier, Options, PositioningStrategy } from '@popperjs/core/lib/types';
|
|
8
|
+
import type { AnimationProps, BoxProps, OutsideClickProps, PortalProps } from '@semcore/base-components';
|
|
1
9
|
import type { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';
|
|
2
10
|
import type { Box } from '@semcore/flex-box';
|
|
3
|
-
import type { PopperContext, PopperPopperProps,
|
|
11
|
+
import type { PopperContext, PopperPopperProps, Placement } from '@semcore/popper';
|
|
4
12
|
import type Popper from '@semcore/popper';
|
|
5
13
|
|
|
6
14
|
/**
|
|
@@ -34,8 +42,95 @@ export type FeaturePopoverContext = PopperContext & {
|
|
|
34
42
|
getSpotProps: PropGetterFn;
|
|
35
43
|
};
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
export type FPPopperProps = OutsideClickProps &
|
|
46
|
+
PortalProps &
|
|
47
|
+
UniqueIDProps &
|
|
48
|
+
AnimationProps & {
|
|
49
|
+
/**
|
|
50
|
+
* Popper can have different positioning options
|
|
51
|
+
* @default absolute
|
|
52
|
+
*/
|
|
53
|
+
strategy?: PositioningStrategy;
|
|
54
|
+
/**
|
|
55
|
+
* Modifiers for popper.js
|
|
56
|
+
*/
|
|
57
|
+
modifiers?: Array<Partial<Modifier<any, any>>>;
|
|
58
|
+
/** Timer to show and hide the popper */
|
|
59
|
+
timeout?: number | [number, number];
|
|
60
|
+
/** PopperJS modifier settings for popper indent */
|
|
61
|
+
offset?: Partial<OptionsOffset> | number | [number, number];
|
|
62
|
+
/** PopperJS modifier settings for finding borders */
|
|
63
|
+
preventOverflow?: Partial<OptionsPreventOverflow>;
|
|
64
|
+
/** PopperJS modifier settings responsible for the arrow */
|
|
65
|
+
arrow?: Partial<OptionsArrow>;
|
|
66
|
+
/** PopperJS modifier settings responsible for turning the popper when there is not enough space */
|
|
67
|
+
flip?: Partial<OptionsFlip>;
|
|
68
|
+
/** PopperJS modifier settings for applying styles */
|
|
69
|
+
computeStyles?: Partial<OptionsComputeStyles>;
|
|
70
|
+
/** PopperJS modifier settings responsible for subscribing to global events */
|
|
71
|
+
eventListeners?: Partial<OptionsEventListeners>;
|
|
72
|
+
/** @ignore */
|
|
73
|
+
onFirstUpdate?: Options['onFirstUpdate'];
|
|
74
|
+
/**
|
|
75
|
+
* Flag for disable Popover (if true, it will close Popper and it will not respond to handlers)
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
disabled?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* If enabled, you will need to use setTrigger function from children rendering function to set popper trigger.
|
|
81
|
+
*/
|
|
82
|
+
explicitTriggerSet?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* If set, popper will be placed near the place mouse cursor entered the trigger
|
|
85
|
+
* @deprecated
|
|
86
|
+
*/
|
|
87
|
+
cursorAnchoring?: boolean;
|
|
88
|
+
|
|
89
|
+
popperMargin?: number;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* You shouldn't change an interaction in FeaturePopover. Comes from a Popper component.
|
|
93
|
+
* @deprecated
|
|
94
|
+
* @default none
|
|
95
|
+
*/
|
|
96
|
+
interaction?: 'click' | 'hover' | 'focus' | 'none' | eventInteraction;
|
|
97
|
+
/**
|
|
98
|
+
* You shouldn't change it in FeaturePopover as it should be controlled always. Comes from a Popper component.
|
|
99
|
+
* @deprecated
|
|
100
|
+
* @default false */
|
|
101
|
+
defaultVisible?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Disabled focus trap, autofocus and focus return
|
|
104
|
+
* You shouldn't change it in FeaturePopover as it should be controlled always. Comes from a Popper component.
|
|
105
|
+
* @deprecated
|
|
106
|
+
*/
|
|
107
|
+
disableEnforceFocus?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* If enabled, after reaching the end of popper the browser focus goes to the start of popper and vice versa.
|
|
110
|
+
* If disabled, after reading the end of popper the browser focus returns to trigger and popper is being closed.
|
|
111
|
+
* You shouldn't change it in FeaturePopover as it should be controlled always. Comes from a Popper component.
|
|
112
|
+
* @deprecated
|
|
113
|
+
* @default `true` (`false` in Tooltip)
|
|
114
|
+
*/
|
|
115
|
+
focusLoop?: boolean;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export type FeaturePopoverProps = FPPopperProps & {
|
|
119
|
+
/** Popper visibility value */
|
|
120
|
+
visible?: boolean;
|
|
121
|
+
/** Function called when visibility changes */
|
|
122
|
+
onVisibleChange?: (visible: boolean, e?: Event) => boolean | void;
|
|
123
|
+
/**
|
|
124
|
+
* The position of the popper relative to the trigger that called it.
|
|
125
|
+
* @default auto
|
|
126
|
+
*/
|
|
127
|
+
placement?: Placement;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export type FeaturePopoverTriggerProps = BoxProps;
|
|
131
|
+
|
|
132
|
+
declare const FeaturePopover: Intergalactic.Component<'div', FeaturePopoverProps, FeaturePopoverContext> & {
|
|
133
|
+
Trigger: Intergalactic.Component<typeof Popper.Trigger, FeaturePopoverTriggerProps>;
|
|
39
134
|
Popper: Intergalactic.Component<'div', FeaturePopoverPopperProps & AriaProps>;
|
|
40
135
|
Spot: typeof Box;
|
|
41
136
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/feature-popover",
|
|
3
3
|
"description": "Semrush FeaturePopover Component",
|
|
4
|
-
"version": "16.1.
|
|
4
|
+
"version": "16.1.6-prerelease.1",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/animation": "16.0.
|
|
18
|
-
"@semcore/button": "16.0.
|
|
19
|
-
"@semcore/flex-box": "16.0.
|
|
20
|
-
"@semcore/icon": "16.
|
|
21
|
-
"@semcore/popper": "16.0.
|
|
17
|
+
"@semcore/animation": "16.0.4-prerelease.1",
|
|
18
|
+
"@semcore/button": "16.0.6-prerelease.1",
|
|
19
|
+
"@semcore/flex-box": "16.0.6-prerelease.1",
|
|
20
|
+
"@semcore/icon": "16.5.0-prerelease.1",
|
|
21
|
+
"@semcore/popper": "16.0.6-prerelease.1"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@semcore/base-components": "^16.
|
|
24
|
+
"@semcore/base-components": "^16.2.0-prerelease.1"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
@@ -29,11 +29,12 @@
|
|
|
29
29
|
"directory": "semcore/feature-popover"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"@semcore/
|
|
32
|
+
"@popperjs/core": "2.11.5",
|
|
33
|
+
"@semcore/core": "16.0.4",
|
|
34
|
+
"@semcore/button": "16.0.6-prerelease.1",
|
|
35
|
+
"@semcore/dropdown-menu": "16.1.7-prerelease.1",
|
|
34
36
|
"@semcore/testing-utils": "1.0.0",
|
|
35
|
-
"@semcore/
|
|
36
|
-
"@semcore/typography": "16.1.5-prerelease.4"
|
|
37
|
+
"@semcore/typography": "16.2.0-prerelease.1"
|
|
37
38
|
},
|
|
38
39
|
"scripts": {
|
|
39
40
|
"build": "pnpm semcore-builder --source=js && pnpm vite build"
|