@semcore/feature-popover 16.2.5 → 17.0.0-prerelease.17
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/README.md +4 -4
- package/lib/cjs/FeaturePopover.js +162 -173
- package/lib/cjs/FeaturePopover.js.map +1 -1
- package/lib/cjs/FeaturePopover.type.js.map +1 -1
- package/lib/cjs/index.js +3 -3
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +16 -16
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/FeaturePopover.js +154 -165
- package/lib/es6/FeaturePopover.js.map +1 -1
- package/lib/es6/FeaturePopover.type.js.map +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +15 -15
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/esm/FeaturePopover.mjs +159 -140
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/types/FeaturePopover.type.d.ts +3 -41
- package/package.json +10 -11
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
7
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
2
|
import { createComponent, sstyled, Component, assignProps } from "@semcore/core";
|
|
10
3
|
import { Popper, Box, Animation } from "@semcore/base-components";
|
|
@@ -14,182 +7,208 @@ import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
|
14
7
|
import CloseIcon from "@semcore/icon/Close/m";
|
|
15
8
|
import React from "react";
|
|
16
9
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
17
|
-
var _excluded = ["styles", "forwardRef", "onVisibleChange", "modifiers"];
|
|
18
10
|
/*!__reshadow-styles__:"./style/feature-popover.shadow.css"*/
|
|
19
|
-
|
|
11
|
+
const style = (
|
|
20
12
|
/*__reshadow_css_start__*/
|
|
21
13
|
(sstyled.insert(
|
|
22
14
|
/*__inner_css_start__*/
|
|
23
|
-
'@keyframes
|
|
15
|
+
'@keyframes showTrigger_qjplh{0%{opacity:0}to{opacity:1}}@keyframes scaleSizeAndHide_qjplh{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}.___SFeaturePopover_qjplh_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;box-shadow:var(--intergalactic-box-shadow-popper, 0px 1px 12px 0px rgba(25, 27, 35, 0.15));position:relative}.___SFeaturePopover_qjplh_gg_._theme_accent_qjplh_gg_{background-color:var(--intergalactic-feature-popover-bg, #fce081);color:var(--intergalactic-text-primary, #191b23)}.___SFeaturePopover_qjplh_gg_._theme_neutral_qjplh_gg_{background-color:var(--intergalactic-feature-popover-bg-neutral, #1D113E);color:var(--intergalactic-text-primary-invert, #ffffff)}.___STrigger_qjplh_gg_{position:relative}.___SClose_qjplh_gg_{position:absolute;z-index:1;right:var(--intergalactic-spacing-2x, 8px);top:var(--intergalactic-spacing-2x, 8px)}.___SClose_qjplh_gg_ .___SAddon_qjplh_gg_:only-child{margin-left:calc(var(--intergalactic-spacing-2x, 8px) - 1px);margin-right:calc(var(--intergalactic-spacing-2x, 8px) - 1px)}.___SSpot_qjplh_gg_{position:absolute;bottom:calc(-1*var(--intergalactic-spacing-1x, 4px));right:calc(-1*var(--intergalactic-spacing-1x, 4px));animation-name:showTrigger_qjplh;animation-duration:.2s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards;width:12px;height:12px}.___SSpot_qjplh_gg_::before{transform-origin:50%;animation-name:scaleSizeAndHide_qjplh;animation-duration:1s;animation-iteration-count:infinite;animation-fill-mode:forwards;animation-delay:.5s}.___SSpot_qjplh_gg_::after,.___SSpot_qjplh_gg_::before{content:"";position:absolute;top:0;left:0;border-radius:50%;width:12px;height:12px}.___SSpot_qjplh_gg_._theme_accent_qjplh_gg_::before{background-color:var(--intergalactic-feature-popover-dot-outer-border, #fce081)}.___SSpot_qjplh_gg_._theme_accent_qjplh_gg_::after{background-color:var(--intergalactic-feature-popover-bg, #fce081)}.___SSpot_qjplh_gg_._theme_neutral_qjplh_gg_::before{background-color:var(--intergalactic-feature-popover-dot-neutral-outer-border, #00c192)}.___SSpot_qjplh_gg_._theme_neutral_qjplh_gg_::after{background-color:var(--intergalactic-feature-popover-dot-neutral, #00c192)}@media (prefers-reduced-motion){.___SSpot_qjplh_gg_,.___SSpot_qjplh_gg_::before{animation-name:none}}',
|
|
24
16
|
/*__inner_css_end__*/
|
|
25
|
-
"
|
|
17
|
+
"qjplh_gg_"
|
|
26
18
|
), /*__reshadow_css_end__*/
|
|
27
19
|
{
|
|
28
|
-
"__STrigger": "
|
|
29
|
-
"@showTrigger": "
|
|
30
|
-
"@scaleSizeAndHide": "
|
|
31
|
-
"__SFeaturePopover": "
|
|
32
|
-
"_theme_accent": "
|
|
33
|
-
"_theme_neutral": "
|
|
34
|
-
"__SClose": "
|
|
35
|
-
"__SAddon": "
|
|
36
|
-
"__SSpot": "
|
|
20
|
+
"__STrigger": "___STrigger_qjplh_gg_",
|
|
21
|
+
"@showTrigger": "showTrigger_qjplh",
|
|
22
|
+
"@scaleSizeAndHide": "scaleSizeAndHide_qjplh",
|
|
23
|
+
"__SFeaturePopover": "___SFeaturePopover_qjplh_gg_",
|
|
24
|
+
"_theme_accent": "_theme_accent_qjplh_gg_",
|
|
25
|
+
"_theme_neutral": "_theme_neutral_qjplh_gg_",
|
|
26
|
+
"__SClose": "___SClose_qjplh_gg_",
|
|
27
|
+
"__SAddon": "___SAddon_qjplh_gg_",
|
|
28
|
+
"__SSpot": "___SSpot_qjplh_gg_"
|
|
37
29
|
})
|
|
38
30
|
);
|
|
39
|
-
|
|
31
|
+
const stylePopper = (
|
|
40
32
|
/*__reshadow_css_start__*/
|
|
41
33
|
(sstyled.insert(
|
|
42
34
|
/*__inner_css_start__*/
|
|
43
|
-
"@keyframes
|
|
35
|
+
"@keyframes enter_1vll6{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}@keyframes exit_1vll6{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-10px)}}",
|
|
44
36
|
/*__inner_css_end__*/
|
|
45
|
-
"
|
|
37
|
+
"1vll6_gg_"
|
|
46
38
|
), /*__reshadow_css_end__*/
|
|
47
39
|
{
|
|
48
|
-
"@enter": "
|
|
49
|
-
"@exit": "
|
|
40
|
+
"@enter": "enter_1vll6",
|
|
41
|
+
"@exit": "exit_1vll6"
|
|
50
42
|
})
|
|
51
43
|
);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
58
|
-
args[_key] = arguments[_key];
|
|
59
|
-
}
|
|
60
|
-
_this = _callSuper(this, FeaturePopover2, [].concat(args));
|
|
61
|
-
_defineProperty(_this, "defaultModifiers", [{
|
|
44
|
+
const enhance = [i18nEnhance(localizedMessages)];
|
|
45
|
+
class FeaturePopover extends Component {
|
|
46
|
+
constructor(...args) {
|
|
47
|
+
super(...args);
|
|
48
|
+
_defineProperty(this, "defaultModifiers", [{
|
|
62
49
|
name: "flip",
|
|
63
50
|
enabled: false
|
|
64
51
|
}]);
|
|
65
|
-
_defineProperty(
|
|
66
|
-
|
|
52
|
+
_defineProperty(this, "handleVisibleChange", (visible) => {
|
|
53
|
+
this.handlers.visible(visible);
|
|
67
54
|
});
|
|
68
|
-
_defineProperty(
|
|
69
|
-
|
|
55
|
+
_defineProperty(this, "handleCloseClick", (e) => {
|
|
56
|
+
this.handlers.visible(false, e);
|
|
70
57
|
});
|
|
71
|
-
return _this;
|
|
72
58
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
59
|
+
uncontrolledProps() {
|
|
60
|
+
return {
|
|
61
|
+
visible: null
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
getPopperProps() {
|
|
65
|
+
const {
|
|
66
|
+
visible,
|
|
67
|
+
getI18nText,
|
|
68
|
+
theme
|
|
69
|
+
} = this.asProps;
|
|
70
|
+
return {
|
|
71
|
+
visible,
|
|
72
|
+
$onCloseClick: this.handleCloseClick,
|
|
73
|
+
getI18nText,
|
|
74
|
+
theme
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
getSpotProps() {
|
|
78
|
+
const {
|
|
79
|
+
visible,
|
|
80
|
+
theme
|
|
81
|
+
} = this.asProps;
|
|
82
|
+
return {
|
|
83
|
+
visible,
|
|
84
|
+
theme
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
render() {
|
|
88
|
+
var _ref4;
|
|
89
|
+
const {
|
|
90
|
+
styles,
|
|
91
|
+
forwardRef,
|
|
92
|
+
onVisibleChange,
|
|
93
|
+
modifiers = [],
|
|
94
|
+
...other
|
|
95
|
+
} = this.asProps;
|
|
96
|
+
return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(Popper, _ref4.cn("Popper", {
|
|
97
|
+
"ref": forwardRef,
|
|
98
|
+
"onVisibleChange": callAllEventHandlers(onVisibleChange, this.handleVisibleChange),
|
|
99
|
+
"modifiers": [...this.defaultModifiers, ...modifiers],
|
|
100
|
+
...other
|
|
101
|
+
}));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
114
104
|
_defineProperty(FeaturePopover, "displayName", "FeaturePopover");
|
|
115
105
|
_defineProperty(FeaturePopover, "style", style);
|
|
116
106
|
_defineProperty(FeaturePopover, "defaultProps", {
|
|
117
107
|
offset: [0, 12],
|
|
118
108
|
placement: "bottom-start",
|
|
119
109
|
defaultVisible: false,
|
|
120
|
-
onOutsideClick:
|
|
121
|
-
return false;
|
|
122
|
-
},
|
|
110
|
+
onOutsideClick: () => false,
|
|
123
111
|
interaction: "none",
|
|
124
112
|
i18n: localizedMessages,
|
|
125
113
|
locale: "en",
|
|
126
114
|
theme: "accent"
|
|
127
115
|
});
|
|
128
116
|
_defineProperty(FeaturePopover, "enhance", enhance);
|
|
129
|
-
function Trigger(
|
|
117
|
+
function Trigger({
|
|
118
|
+
Children,
|
|
119
|
+
styles
|
|
120
|
+
}) {
|
|
130
121
|
var _ref = arguments[0], _ref5;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
122
|
+
const STrigger = Popper.Trigger;
|
|
123
|
+
return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(STrigger, _ref5.cn("STrigger", {
|
|
124
|
+
...assignProps({
|
|
125
|
+
"tag": Box,
|
|
126
|
+
"aria-haspopup": false
|
|
127
|
+
}, _ref)
|
|
128
|
+
}), /* @__PURE__ */ React.createElement(Children, _ref5.cn("Children", {})));
|
|
137
129
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
130
|
+
class FeaturePopoverPopper extends Component {
|
|
131
|
+
constructor(...args) {
|
|
132
|
+
super(...args);
|
|
133
|
+
_defineProperty(this, "popperRef", /* @__PURE__ */ React.createRef());
|
|
142
134
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
var SClose = Button;
|
|
150
|
-
var _this$asProps4 = this.asProps, Children = _this$asProps4.Children, styles = _this$asProps4.styles, visible = _this$asProps4.visible, closeIcon = _this$asProps4.closeIcon, duration = _this$asProps4.duration, $onCloseClick = _this$asProps4.$onCloseClick, animationsDisabled = _this$asProps4.animationsDisabled, getI18nText = _this$asProps4.getI18nText, zIndex = _this$asProps4.zIndex, ariaLabel = _this$asProps4["aria-label"], ariaDescribedBy = _this$asProps4["aria-describedby"], ariaLabelledby = _this$asProps4["aria-labelledby"], title = _this$asProps4.title, theme = _this$asProps4.theme, _this$asProps4$autoFo = _this$asProps4.autoFocus, autoFocus = _this$asProps4$autoFo === void 0 ? true : _this$asProps4$autoFo;
|
|
151
|
-
return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(Popper.Popper, {
|
|
152
|
-
disableEnforceFocus: true,
|
|
153
|
-
zIndex,
|
|
154
|
-
tabIndex: 0,
|
|
155
|
-
autoFocus,
|
|
156
|
-
role: "dialog",
|
|
157
|
-
"aria-describedby": ariaDescribedBy,
|
|
158
|
-
"aria-label": ariaLabel,
|
|
159
|
-
"aria-labelledby": ariaLabelledby,
|
|
160
|
-
title
|
|
161
|
-
}, /* @__PURE__ */ React.createElement(Animation, _ref6.cn("Animation", {
|
|
162
|
-
"visible": visible,
|
|
163
|
-
"duration": duration,
|
|
164
|
-
"keyframes": [stylePopper["@enter"], stylePopper["@exit"]],
|
|
165
|
-
"initialAnimation": true,
|
|
166
|
-
"animationsDisabled": animationsDisabled
|
|
167
|
-
}), /* @__PURE__ */ React.createElement(SFeaturePopover, _ref6.cn("SFeaturePopover", _objectSpread({}, assignProps({
|
|
168
|
-
"__excludeProps": ["aria-label", "aria-describedBy", "title"]
|
|
169
|
-
}, _ref2))), closeIcon && /* @__PURE__ */ React.createElement(SClose, _ref6.cn("SClose", {
|
|
170
|
-
"aria-label": getI18nText("close"),
|
|
171
|
-
"onClick": $onCloseClick,
|
|
172
|
-
"use": "tertiary",
|
|
173
|
-
"theme": theme === "accent" ? "muted" : "invert",
|
|
174
|
-
"size": "m",
|
|
175
|
-
"addonLeft": CloseIcon,
|
|
176
|
-
"type": "button"
|
|
177
|
-
})), /* @__PURE__ */ React.createElement(Children, _ref6.cn("Children", {})))));
|
|
135
|
+
componentDidMount() {
|
|
136
|
+
if (this.asProps.autoFocus) {
|
|
137
|
+
setTimeout(() => {
|
|
138
|
+
var _a;
|
|
139
|
+
(_a = this.popperRef.current) == null ? void 0 : _a.focus();
|
|
140
|
+
}, 0);
|
|
178
141
|
}
|
|
179
|
-
}
|
|
180
|
-
|
|
142
|
+
}
|
|
143
|
+
render() {
|
|
144
|
+
var _ref2 = this.asProps, _ref6;
|
|
145
|
+
const SFeaturePopover = Box;
|
|
146
|
+
const SClose = Button;
|
|
147
|
+
const {
|
|
148
|
+
Children,
|
|
149
|
+
styles,
|
|
150
|
+
visible,
|
|
151
|
+
closeIcon,
|
|
152
|
+
duration,
|
|
153
|
+
$onCloseClick,
|
|
154
|
+
animationsDisabled,
|
|
155
|
+
getI18nText,
|
|
156
|
+
zIndex,
|
|
157
|
+
"aria-label": ariaLabel,
|
|
158
|
+
"aria-describedby": ariaDescribedBy,
|
|
159
|
+
"aria-labelledby": ariaLabelledby,
|
|
160
|
+
title,
|
|
161
|
+
theme
|
|
162
|
+
} = this.asProps;
|
|
163
|
+
return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(Popper.Popper, {
|
|
164
|
+
ref: this.popperRef,
|
|
165
|
+
disableEnforceFocus: true,
|
|
166
|
+
zIndex,
|
|
167
|
+
tabIndex: 0,
|
|
168
|
+
role: "dialog",
|
|
169
|
+
"aria-describedby": ariaDescribedBy,
|
|
170
|
+
"aria-label": ariaLabel,
|
|
171
|
+
"aria-labelledby": ariaLabelledby,
|
|
172
|
+
title
|
|
173
|
+
}, /* @__PURE__ */ React.createElement(Animation, _ref6.cn("Animation", {
|
|
174
|
+
"visible": visible,
|
|
175
|
+
"duration": duration,
|
|
176
|
+
"keyframes": [stylePopper["@enter"], stylePopper["@exit"]],
|
|
177
|
+
"initialAnimation": true,
|
|
178
|
+
"animationsDisabled": animationsDisabled
|
|
179
|
+
}), /* @__PURE__ */ React.createElement(SFeaturePopover, _ref6.cn("SFeaturePopover", {
|
|
180
|
+
...assignProps({
|
|
181
|
+
"__excludeProps": ["aria-label", "aria-describedBy", "title"]
|
|
182
|
+
}, _ref2)
|
|
183
|
+
}), closeIcon && /* @__PURE__ */ React.createElement(SClose, _ref6.cn("SClose", {
|
|
184
|
+
"aria-label": getI18nText("close"),
|
|
185
|
+
"onClick": $onCloseClick,
|
|
186
|
+
"use": "tertiary",
|
|
187
|
+
"theme": theme === "accent" ? "muted" : "invert",
|
|
188
|
+
"size": "m",
|
|
189
|
+
"addonLeft": CloseIcon,
|
|
190
|
+
"type": "button"
|
|
191
|
+
})), /* @__PURE__ */ React.createElement(Children, _ref6.cn("Children", {})))));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
181
194
|
_defineProperty(FeaturePopoverPopper, "defaultProps", {
|
|
182
195
|
closeIcon: false,
|
|
183
|
-
duration: 200
|
|
196
|
+
duration: 200,
|
|
197
|
+
autoFocus: true
|
|
184
198
|
});
|
|
185
|
-
|
|
199
|
+
function Spot(props) {
|
|
186
200
|
var _ref3 = arguments[0], _ref7;
|
|
187
|
-
|
|
188
|
-
|
|
201
|
+
const SSpot = Box;
|
|
202
|
+
const {
|
|
203
|
+
styles,
|
|
204
|
+
visible
|
|
205
|
+
} = props;
|
|
189
206
|
if (!visible) return null;
|
|
190
|
-
return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(SSpot, _ref7.cn("SSpot",
|
|
191
|
-
}
|
|
192
|
-
|
|
207
|
+
return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(SSpot, _ref7.cn("SSpot", {
|
|
208
|
+
...assignProps({}, _ref3)
|
|
209
|
+
}));
|
|
210
|
+
}
|
|
211
|
+
const FeaturePopover_default = createComponent(
|
|
193
212
|
FeaturePopover,
|
|
194
213
|
{
|
|
195
214
|
Trigger,
|
|
@@ -202,5 +221,5 @@ const FeaturePopover$1 = createComponent(
|
|
|
202
221
|
}
|
|
203
222
|
);
|
|
204
223
|
export {
|
|
205
|
-
|
|
224
|
+
FeaturePopover_default as default
|
|
206
225
|
};
|
|
@@ -5,12 +5,9 @@ import type { Options as OptionsFlip } from '@popperjs/core/lib/modifiers/flip';
|
|
|
5
5
|
import type { Options as OptionsOffset } from '@popperjs/core/lib/modifiers/offset';
|
|
6
6
|
import type { Options as OptionsPreventOverflow } from '@popperjs/core/lib/modifiers/preventOverflow';
|
|
7
7
|
import type { Modifier, Options, PositioningStrategy } from '@popperjs/core/lib/types';
|
|
8
|
-
import type { AnimationProps, BoxProps,
|
|
9
|
-
import type { Intergalactic, PropGetterFn
|
|
8
|
+
import type { AnimationProps, BoxProps, OutsideClickProps, PortalProps, Box, PopperContext, PopperPopperProps, Placement, Popper } from '@semcore/base-components';
|
|
9
|
+
import type { Intergalactic, PropGetterFn } from '@semcore/core';
|
|
10
10
|
import type { UniqueIDProps } from '@semcore/core/lib/utils/uniqueID';
|
|
11
|
-
import type { Box } from '@semcore/flex-box';
|
|
12
|
-
import type { PopperContext, PopperPopperProps, Placement } from '@semcore/popper';
|
|
13
|
-
import type Popper from '@semcore/popper';
|
|
14
11
|
import type React from 'react';
|
|
15
12
|
/**
|
|
16
13
|
* Popper must have an accessible names (aria-group-name).
|
|
@@ -20,9 +17,6 @@ type AriaProps = Intergalactic.RequireAtLeastOne<{
|
|
|
20
17
|
'aria-labelledby'?: string;
|
|
21
18
|
'title'?: string;
|
|
22
19
|
}>;
|
|
23
|
-
/** @deprecated */
|
|
24
|
-
export interface IFeaturePopoverPopperProps extends FeaturePopoverPopperProps, UnknownProperties {
|
|
25
|
-
}
|
|
26
20
|
export type FeaturePopoverPopperProps = PopperPopperProps & {
|
|
27
21
|
/**
|
|
28
22
|
* The property responsible for the visibility of the closing icon
|
|
@@ -42,10 +36,8 @@ export type FeaturePopoverPopperInnerProps = {
|
|
|
42
36
|
$onCloseClick: (e: React.SyntheticEvent<HTMLButtonElement>) => void;
|
|
43
37
|
animationsDisabled: boolean;
|
|
44
38
|
getI18nText: (message: string, opts?: Record<string, unknown>) => string;
|
|
39
|
+
autofocus: boolean;
|
|
45
40
|
};
|
|
46
|
-
/** @deprecated */
|
|
47
|
-
export interface IFeaturePopoverContext extends FeaturePopoverContext, UnknownProperties {
|
|
48
|
-
}
|
|
49
41
|
export type FeaturePopoverContext = PopperContext & {
|
|
50
42
|
getSpotProps: PropGetterFn;
|
|
51
43
|
};
|
|
@@ -84,37 +76,7 @@ export type FPPopperProps = OutsideClickProps & PortalProps & UniqueIDProps & An
|
|
|
84
76
|
* If enabled, you will need to use setTrigger function from children rendering function to set popper trigger.
|
|
85
77
|
*/
|
|
86
78
|
explicitTriggerSet?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* If set, popper will be placed near the place mouse cursor entered the trigger
|
|
89
|
-
* @deprecated
|
|
90
|
-
*/
|
|
91
|
-
cursorAnchoring?: boolean;
|
|
92
79
|
popperMargin?: number;
|
|
93
|
-
/**
|
|
94
|
-
* You shouldn't change an interaction in FeaturePopover. Comes from a Popper component.
|
|
95
|
-
* @deprecated
|
|
96
|
-
* @default none
|
|
97
|
-
*/
|
|
98
|
-
interaction?: 'click' | 'hover' | 'focus' | 'none' | eventInteraction;
|
|
99
|
-
/**
|
|
100
|
-
* You shouldn't change it in FeaturePopover as it should be controlled always. Comes from a Popper component.
|
|
101
|
-
* @deprecated
|
|
102
|
-
* @default false */
|
|
103
|
-
defaultVisible?: boolean;
|
|
104
|
-
/**
|
|
105
|
-
* Disabled focus trap, autofocus and focus return
|
|
106
|
-
* You shouldn't change it in FeaturePopover as it should be controlled always. Comes from a Popper component.
|
|
107
|
-
* @deprecated
|
|
108
|
-
*/
|
|
109
|
-
disableEnforceFocus?: boolean;
|
|
110
|
-
/**
|
|
111
|
-
* If enabled, after reaching the end of popper the browser focus goes to the start of popper and vice versa.
|
|
112
|
-
* If disabled, after reading the end of popper the browser focus returns to trigger and popper is being closed.
|
|
113
|
-
* You shouldn't change it in FeaturePopover as it should be controlled always. Comes from a Popper component.
|
|
114
|
-
* @deprecated
|
|
115
|
-
* @default `true` (`false` in Tooltip)
|
|
116
|
-
*/
|
|
117
|
-
focusLoop?: boolean;
|
|
118
80
|
};
|
|
119
81
|
export type FeaturePopoverProps = FPPopperProps & {
|
|
120
82
|
/** Popper visibility value */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/feature-popover",
|
|
3
3
|
"description": "Semrush FeaturePopover Component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "17.0.0-prerelease.17",
|
|
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,11 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/
|
|
18
|
-
"@semcore/button": "16.0.12",
|
|
19
|
-
"@semcore/flex-box": "16.0.11",
|
|
20
|
-
"@semcore/icon": "16.7.3",
|
|
21
|
-
"@semcore/popper": "16.0.11"
|
|
17
|
+
"@semcore/button": "^16.0.13-prerelease.17"
|
|
22
18
|
},
|
|
23
19
|
"peerDependencies": {
|
|
24
|
-
"@semcore/base-components": "^
|
|
20
|
+
"@semcore/base-components": "^17.0.0-prerelease.17",
|
|
21
|
+
"@semcore/icon": "^16.7.2-prerelease.17"
|
|
25
22
|
},
|
|
26
23
|
"repository": {
|
|
27
24
|
"type": "git",
|
|
@@ -30,11 +27,13 @@
|
|
|
30
27
|
},
|
|
31
28
|
"devDependencies": {
|
|
32
29
|
"@popperjs/core": "2.11.5",
|
|
33
|
-
"@semcore/
|
|
34
|
-
"@semcore/
|
|
35
|
-
"@semcore/
|
|
30
|
+
"@semcore/core": "17.0.0-prerelease.17",
|
|
31
|
+
"@semcore/base-components": "17.0.0-prerelease.17",
|
|
32
|
+
"@semcore/button": "16.0.13-prerelease.17",
|
|
33
|
+
"@semcore/dropdown-menu": "17.0.0-prerelease.17",
|
|
36
34
|
"@semcore/testing-utils": "1.0.0",
|
|
37
|
-
"@semcore/
|
|
35
|
+
"@semcore/typography": "16.3.3-prerelease.17",
|
|
36
|
+
"@semcore/icon": "16.7.2-prerelease.17"
|
|
38
37
|
},
|
|
39
38
|
"scripts": {
|
|
40
39
|
"build": "pnpm semcore-builder && pnpm vite build"
|