@semcore/feature-popover 16.1.6 → 16.2.0-prerelease.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,138 +1,3 @@
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';
9
- import type { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';
10
- import type { Box } from '@semcore/flex-box';
11
- import type { PopperContext, PopperPopperProps, Placement } from '@semcore/popper';
12
- import type Popper from '@semcore/popper';
13
-
14
- /**
15
- * Popper must have an accessible names (aria-group-name).
16
- */
17
- type AriaProps = Intergalactic.RequireAtLeastOne<{
18
- 'aria-label'?: string;
19
- 'aria-labelledby'?: string;
20
- 'title'?: string;
21
- }>;
22
-
23
- /** @deprecated */
24
- export interface IFeaturePopoverPopperProps extends FeaturePopoverPopperProps, UnknownProperties {}
25
- export type FeaturePopoverPopperProps = PopperPopperProps & {
26
- /**
27
- * The property responsible for the visibility of the closing icon
28
- * @default false
29
- */
30
- closeIcon?: boolean;
31
- /** Animation display duration in `ms`
32
- * @default 200
33
- */
34
- duration?: number;
35
-
36
- locale?: string;
37
- };
38
-
39
- /** @deprecated */
40
- export interface IFeaturePopoverContext extends FeaturePopoverContext, UnknownProperties {}
41
- export type FeaturePopoverContext = PopperContext & {
42
- getSpotProps: PropGetterFn;
43
- };
44
-
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>;
134
- Popper: Intergalactic.Component<'div', FeaturePopoverPopperProps & AriaProps>;
135
- Spot: typeof Box;
136
- };
137
-
138
- export default FeaturePopover;
1
+ import type { FeaturePopoverProps, FeaturePopoverPopperProps } from './FeaturePopover.type';
2
+ export { default } from './FeaturePopover';
3
+ export type { FeaturePopoverProps, FeaturePopoverPopperProps, };
@@ -0,0 +1,44 @@
1
+ export declare const localizedMessages: {
2
+ de: {
3
+ close: string;
4
+ };
5
+ en: {
6
+ close: string;
7
+ };
8
+ es: {
9
+ close: string;
10
+ };
11
+ fr: {
12
+ close: string;
13
+ };
14
+ it: {
15
+ close: string;
16
+ };
17
+ ja: {
18
+ close: string;
19
+ };
20
+ ko: {
21
+ close: string;
22
+ };
23
+ nl: {
24
+ close: string;
25
+ };
26
+ pt: {
27
+ close: string;
28
+ };
29
+ tr: {
30
+ close: string;
31
+ };
32
+ vi: {
33
+ close: string;
34
+ };
35
+ zh: {
36
+ close: string;
37
+ };
38
+ pl: {
39
+ close: string;
40
+ };
41
+ sv: {
42
+ close: string;
43
+ };
44
+ };
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.6",
4
+ "version": "16.2.0-prerelease.2",
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.4",
18
- "@semcore/button": "16.0.6",
19
- "@semcore/flex-box": "16.0.6",
20
- "@semcore/icon": "16.5.0",
21
- "@semcore/popper": "16.0.6"
17
+ "@semcore/animation": "16.0.5-prerelease.2",
18
+ "@semcore/button": "16.0.7-prerelease.2",
19
+ "@semcore/flex-box": "16.0.7-prerelease.2",
20
+ "@semcore/icon": "16.6.0-prerelease.2",
21
+ "@semcore/popper": "16.0.7-prerelease.2"
22
22
  },
23
23
  "peerDependencies": {
24
- "@semcore/base-components": "^16.0.0"
24
+ "@semcore/base-components": "^16.2.1-prerelease.2"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@popperjs/core": "2.11.5",
33
- "@semcore/button": "16.0.6",
34
- "@semcore/dropdown-menu": "16.1.7",
35
- "@semcore/core": "16.0.4",
33
+ "@semcore/button": "16.0.7-prerelease.2",
34
+ "@semcore/dropdown-menu": "16.1.8-prerelease.2",
36
35
  "@semcore/testing-utils": "1.0.0",
37
- "@semcore/typography": "16.2.0"
36
+ "@semcore/core": "16.1.1-prerelease.2",
37
+ "@semcore/typography": "16.2.1-prerelease.2"
38
38
  },
39
39
  "scripts": {
40
- "build": "pnpm semcore-builder --source=js && pnpm vite build"
40
+ "build": "pnpm semcore-builder && pnpm vite build"
41
41
  }
42
42
  }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=index.d.js.map
@@ -1 +0,0 @@
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":[]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.d.js.map
@@ -1 +0,0 @@
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":[]}