@semcore/feature-popover 16.2.5-prerelease.1 → 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 +11 -12
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/@semcore/feature-popover)
|
|
4
4
|
[](https://www.npmjs.com/package/@semcore/feature-popover)
|
|
5
|
-
[](https://github.com/semrush/intergalactic/blob/
|
|
5
|
+
[](https://github.com/semrush/intergalactic/blob/HEAD/LICENSE)
|
|
6
6
|
|
|
7
7
|
> This component is part of the Intergalactic Design System
|
|
8
8
|
|
|
@@ -20,13 +20,13 @@ npm install @semcore/feature-popover
|
|
|
20
20
|
|
|
21
21
|
## 👤 Author
|
|
22
22
|
|
|
23
|
-
[UI-kit team](https://github.com/semrush/intergalactic/blob/
|
|
23
|
+
[UI-kit team](https://github.com/semrush/intergalactic/blob/HEAD/MAINTAINERS) and [others ❤️](https://github.com/semrush/intergalactic/graphs/contributors)
|
|
24
24
|
|
|
25
25
|
## 🤝 Contributing
|
|
26
26
|
|
|
27
27
|
Contributions, issues and feature requests are welcome!
|
|
28
28
|
|
|
29
|
-
Feel free to check [issues page](https://github.com/semrush/intergalactic/issues). You can also take a look at the [contributing guide](https://github.com/semrush/intergalactic/blob/
|
|
29
|
+
Feel free to check [issues page](https://github.com/semrush/intergalactic/issues). You can also take a look at the [contributing guide](https://github.com/semrush/intergalactic/blob/HEAD/CONTRIBUTING.md).
|
|
30
30
|
|
|
31
31
|
## Show your support
|
|
32
32
|
|
|
@@ -34,4 +34,4 @@ Give a ⭐️ if this project helped you!
|
|
|
34
34
|
|
|
35
35
|
## 📝 License
|
|
36
36
|
|
|
37
|
-
This project is [MIT](https://github.com/semrush/intergalactic/blob/
|
|
37
|
+
This project is [MIT](https://github.com/semrush/intergalactic/blob/HEAD/LICENSE) licensed.
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports
|
|
8
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
7
|
+
exports.default = void 0;
|
|
15
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
9
|
var _core = require("@semcore/core");
|
|
17
10
|
var _baseComponents = require("@semcore/base-components");
|
|
@@ -21,203 +14,199 @@ var _i18nEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhan
|
|
|
21
14
|
var _m = _interopRequireDefault(require("@semcore/icon/Close/m"));
|
|
22
15
|
var _react = _interopRequireDefault(require("react"));
|
|
23
16
|
var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
|
|
24
|
-
var _excluded = ["styles", "forwardRef", "onVisibleChange", "modifiers"];
|
|
25
17
|
/*!__reshadow-styles__:"./style/feature-popover.shadow.css"*/
|
|
26
|
-
|
|
18
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@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}}", /*__inner_css_end__*/"qjplh_gg_"),
|
|
27
19
|
/*__reshadow_css_end__*/
|
|
28
20
|
{
|
|
29
|
-
"__STrigger": "
|
|
30
|
-
"@showTrigger": "
|
|
31
|
-
"@scaleSizeAndHide": "
|
|
32
|
-
"__SFeaturePopover": "
|
|
33
|
-
"_theme_accent": "
|
|
34
|
-
"_theme_neutral": "
|
|
35
|
-
"__SClose": "
|
|
36
|
-
"__SAddon": "
|
|
37
|
-
"__SSpot": "
|
|
21
|
+
"__STrigger": "___STrigger_qjplh_gg_",
|
|
22
|
+
"@showTrigger": "showTrigger_qjplh",
|
|
23
|
+
"@scaleSizeAndHide": "scaleSizeAndHide_qjplh",
|
|
24
|
+
"__SFeaturePopover": "___SFeaturePopover_qjplh_gg_",
|
|
25
|
+
"_theme_accent": "_theme_accent_qjplh_gg_",
|
|
26
|
+
"_theme_neutral": "_theme_neutral_qjplh_gg_",
|
|
27
|
+
"__SClose": "___SClose_qjplh_gg_",
|
|
28
|
+
"__SAddon": "___SAddon_qjplh_gg_",
|
|
29
|
+
"__SSpot": "___SSpot_qjplh_gg_"
|
|
38
30
|
});
|
|
39
|
-
|
|
31
|
+
const stylePopper = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@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)}}", /*__inner_css_end__*/"1vll6_gg_"),
|
|
40
32
|
/*__reshadow_css_end__*/
|
|
41
33
|
{
|
|
42
|
-
"@enter": "
|
|
43
|
-
"@exit": "
|
|
34
|
+
"@enter": "enter_1vll6",
|
|
35
|
+
"@exit": "exit_1vll6"
|
|
44
36
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
(0,
|
|
50
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
|
-
args[_key] = arguments[_key];
|
|
52
|
-
}
|
|
53
|
-
_this = (0, _callSuper2["default"])(this, FeaturePopover, [].concat(args));
|
|
54
|
-
(0, _defineProperty2["default"])(_this, "defaultModifiers", [{
|
|
37
|
+
const enhance = [(0, _i18nEnhance.default)(_intergalacticDynamicLocales.localizedMessages)];
|
|
38
|
+
class FeaturePopover extends _core.Component {
|
|
39
|
+
constructor(...args) {
|
|
40
|
+
super(...args);
|
|
41
|
+
(0, _defineProperty2.default)(this, "defaultModifiers", [{
|
|
55
42
|
name: 'flip',
|
|
56
43
|
enabled: false
|
|
57
44
|
}]);
|
|
58
|
-
(0, _defineProperty2
|
|
59
|
-
|
|
45
|
+
(0, _defineProperty2.default)(this, "handleVisibleChange", visible => {
|
|
46
|
+
this.handlers.visible(visible);
|
|
60
47
|
});
|
|
61
|
-
(0, _defineProperty2
|
|
62
|
-
|
|
48
|
+
(0, _defineProperty2.default)(this, "handleCloseClick", e => {
|
|
49
|
+
this.handlers.visible(false, e);
|
|
63
50
|
});
|
|
64
|
-
return _this;
|
|
65
51
|
}
|
|
66
|
-
(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
114
|
-
}, other)));
|
|
115
|
-
}
|
|
116
|
-
}]);
|
|
117
|
-
}(_core.Component);
|
|
118
|
-
(0, _defineProperty2["default"])(FeaturePopover, "displayName", 'FeaturePopover');
|
|
119
|
-
(0, _defineProperty2["default"])(FeaturePopover, "style", style);
|
|
120
|
-
(0, _defineProperty2["default"])(FeaturePopover, "defaultProps", {
|
|
52
|
+
uncontrolledProps() {
|
|
53
|
+
return {
|
|
54
|
+
visible: null
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
getPopperProps() {
|
|
58
|
+
const {
|
|
59
|
+
visible,
|
|
60
|
+
getI18nText,
|
|
61
|
+
theme
|
|
62
|
+
} = this.asProps;
|
|
63
|
+
return {
|
|
64
|
+
visible,
|
|
65
|
+
$onCloseClick: this.handleCloseClick,
|
|
66
|
+
getI18nText,
|
|
67
|
+
theme
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
getSpotProps() {
|
|
71
|
+
const {
|
|
72
|
+
visible,
|
|
73
|
+
theme
|
|
74
|
+
} = this.asProps;
|
|
75
|
+
return {
|
|
76
|
+
visible,
|
|
77
|
+
theme
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
render() {
|
|
81
|
+
var _ref4;
|
|
82
|
+
const {
|
|
83
|
+
styles,
|
|
84
|
+
forwardRef,
|
|
85
|
+
onVisibleChange,
|
|
86
|
+
modifiers = [],
|
|
87
|
+
...other
|
|
88
|
+
} = this.asProps;
|
|
89
|
+
return _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(_baseComponents.Popper, _ref4.cn("Popper", {
|
|
90
|
+
"ref": forwardRef,
|
|
91
|
+
"onVisibleChange": (0, _assignProps4.callAllEventHandlers)(onVisibleChange, this.handleVisibleChange),
|
|
92
|
+
"modifiers": [...this.defaultModifiers, ...modifiers],
|
|
93
|
+
...other
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
(0, _defineProperty2.default)(FeaturePopover, "displayName", 'FeaturePopover');
|
|
98
|
+
(0, _defineProperty2.default)(FeaturePopover, "style", style);
|
|
99
|
+
(0, _defineProperty2.default)(FeaturePopover, "defaultProps", {
|
|
121
100
|
offset: [0, 12],
|
|
122
101
|
placement: 'bottom-start',
|
|
123
102
|
defaultVisible: false,
|
|
124
|
-
onOutsideClick:
|
|
125
|
-
return false;
|
|
126
|
-
},
|
|
103
|
+
onOutsideClick: () => false,
|
|
127
104
|
interaction: 'none',
|
|
128
105
|
i18n: _intergalacticDynamicLocales.localizedMessages,
|
|
129
106
|
locale: 'en',
|
|
130
107
|
theme: 'accent'
|
|
131
108
|
});
|
|
132
|
-
(0, _defineProperty2
|
|
133
|
-
function Trigger(
|
|
109
|
+
(0, _defineProperty2.default)(FeaturePopover, "enhance", enhance);
|
|
110
|
+
function Trigger({
|
|
111
|
+
Children,
|
|
112
|
+
styles
|
|
113
|
+
}) {
|
|
134
114
|
var _ref = arguments[0],
|
|
135
115
|
_ref5;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
116
|
+
const STrigger = _baseComponents.Popper.Trigger;
|
|
117
|
+
return _ref5 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(STrigger, _ref5.cn("STrigger", {
|
|
118
|
+
...(0, _core.assignProps)({
|
|
119
|
+
"tag": _baseComponents.Box,
|
|
120
|
+
"aria-haspopup": false
|
|
121
|
+
}, _ref)
|
|
122
|
+
}), /*#__PURE__*/_react.default.createElement(Children, _ref5.cn("Children", {})));
|
|
143
123
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
(
|
|
147
|
-
|
|
124
|
+
class FeaturePopoverPopper extends _core.Component {
|
|
125
|
+
constructor(...args) {
|
|
126
|
+
super(...args);
|
|
127
|
+
(0, _defineProperty2.default)(this, "popperRef", /*#__PURE__*/_react.default.createRef());
|
|
148
128
|
}
|
|
149
|
-
(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
_ref6;
|
|
155
|
-
var SFeaturePopover = _baseComponents.Box;
|
|
156
|
-
var SClose = _button["default"];
|
|
157
|
-
var _this$asProps4 = this.asProps,
|
|
158
|
-
Children = _this$asProps4.Children,
|
|
159
|
-
styles = _this$asProps4.styles,
|
|
160
|
-
visible = _this$asProps4.visible,
|
|
161
|
-
closeIcon = _this$asProps4.closeIcon,
|
|
162
|
-
duration = _this$asProps4.duration,
|
|
163
|
-
$onCloseClick = _this$asProps4.$onCloseClick,
|
|
164
|
-
animationsDisabled = _this$asProps4.animationsDisabled,
|
|
165
|
-
getI18nText = _this$asProps4.getI18nText,
|
|
166
|
-
zIndex = _this$asProps4.zIndex,
|
|
167
|
-
ariaLabel = _this$asProps4['aria-label'],
|
|
168
|
-
ariaDescribedBy = _this$asProps4['aria-describedby'],
|
|
169
|
-
ariaLabelledby = _this$asProps4['aria-labelledby'],
|
|
170
|
-
title = _this$asProps4.title,
|
|
171
|
-
theme = _this$asProps4.theme,
|
|
172
|
-
_this$asProps4$autoFo = _this$asProps4.autoFocus,
|
|
173
|
-
autoFocus = _this$asProps4$autoFo === void 0 ? true : _this$asProps4$autoFo;
|
|
174
|
-
return _ref6 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(_baseComponents.Popper.Popper, {
|
|
175
|
-
disableEnforceFocus: true,
|
|
176
|
-
zIndex: zIndex,
|
|
177
|
-
tabIndex: 0,
|
|
178
|
-
autoFocus: autoFocus,
|
|
179
|
-
role: "dialog",
|
|
180
|
-
"aria-describedby": ariaDescribedBy,
|
|
181
|
-
"aria-label": ariaLabel,
|
|
182
|
-
"aria-labelledby": ariaLabelledby,
|
|
183
|
-
title: title
|
|
184
|
-
}, /*#__PURE__*/_react["default"].createElement(_baseComponents.Animation, _ref6.cn("Animation", {
|
|
185
|
-
"visible": visible,
|
|
186
|
-
"duration": duration,
|
|
187
|
-
"keyframes": [stylePopper['@enter'], stylePopper['@exit']],
|
|
188
|
-
"initialAnimation": true,
|
|
189
|
-
"animationsDisabled": animationsDisabled
|
|
190
|
-
}), /*#__PURE__*/_react["default"].createElement(SFeaturePopover, _ref6.cn("SFeaturePopover", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
191
|
-
"__excludeProps": ['aria-label', 'aria-describedBy', 'title']
|
|
192
|
-
}, _ref2))), closeIcon && /*#__PURE__*/_react["default"].createElement(SClose, _ref6.cn("SClose", {
|
|
193
|
-
"aria-label": getI18nText('close'),
|
|
194
|
-
"onClick": $onCloseClick,
|
|
195
|
-
"use": 'tertiary',
|
|
196
|
-
"theme": theme === 'accent' ? 'muted' : 'invert',
|
|
197
|
-
"size": 'm',
|
|
198
|
-
"addonLeft": _m["default"],
|
|
199
|
-
"type": 'button'
|
|
200
|
-
})), /*#__PURE__*/_react["default"].createElement(Children, _ref6.cn("Children", {})))));
|
|
129
|
+
componentDidMount() {
|
|
130
|
+
if (this.asProps.autoFocus) {
|
|
131
|
+
setTimeout(() => {
|
|
132
|
+
this.popperRef.current?.focus();
|
|
133
|
+
}, 0);
|
|
201
134
|
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
135
|
+
}
|
|
136
|
+
render() {
|
|
137
|
+
var _ref2 = this.asProps,
|
|
138
|
+
_ref6;
|
|
139
|
+
const SFeaturePopover = _baseComponents.Box;
|
|
140
|
+
const SClose = _button.default;
|
|
141
|
+
const {
|
|
142
|
+
Children,
|
|
143
|
+
styles,
|
|
144
|
+
visible,
|
|
145
|
+
closeIcon,
|
|
146
|
+
duration,
|
|
147
|
+
$onCloseClick,
|
|
148
|
+
animationsDisabled,
|
|
149
|
+
getI18nText,
|
|
150
|
+
zIndex,
|
|
151
|
+
'aria-label': ariaLabel,
|
|
152
|
+
'aria-describedby': ariaDescribedBy,
|
|
153
|
+
'aria-labelledby': ariaLabelledby,
|
|
154
|
+
title,
|
|
155
|
+
theme
|
|
156
|
+
} = this.asProps;
|
|
157
|
+
return _ref6 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(_baseComponents.Popper.Popper, {
|
|
158
|
+
ref: this.popperRef,
|
|
159
|
+
disableEnforceFocus: true,
|
|
160
|
+
zIndex: zIndex,
|
|
161
|
+
tabIndex: 0,
|
|
162
|
+
role: "dialog",
|
|
163
|
+
"aria-describedby": ariaDescribedBy,
|
|
164
|
+
"aria-label": ariaLabel,
|
|
165
|
+
"aria-labelledby": ariaLabelledby,
|
|
166
|
+
title: title
|
|
167
|
+
}, /*#__PURE__*/_react.default.createElement(_baseComponents.Animation, _ref6.cn("Animation", {
|
|
168
|
+
"visible": visible,
|
|
169
|
+
"duration": duration,
|
|
170
|
+
"keyframes": [stylePopper['@enter'], stylePopper['@exit']],
|
|
171
|
+
"initialAnimation": true,
|
|
172
|
+
"animationsDisabled": animationsDisabled
|
|
173
|
+
}), /*#__PURE__*/_react.default.createElement(SFeaturePopover, _ref6.cn("SFeaturePopover", {
|
|
174
|
+
...(0, _core.assignProps)({
|
|
175
|
+
"__excludeProps": ['aria-label', 'aria-describedBy', 'title']
|
|
176
|
+
}, _ref2)
|
|
177
|
+
}), closeIcon && /*#__PURE__*/_react.default.createElement(SClose, _ref6.cn("SClose", {
|
|
178
|
+
"aria-label": getI18nText('close'),
|
|
179
|
+
"onClick": $onCloseClick,
|
|
180
|
+
"use": 'tertiary',
|
|
181
|
+
"theme": theme === 'accent' ? 'muted' : 'invert',
|
|
182
|
+
"size": 'm',
|
|
183
|
+
"addonLeft": _m.default,
|
|
184
|
+
"type": 'button'
|
|
185
|
+
})), /*#__PURE__*/_react.default.createElement(Children, _ref6.cn("Children", {})))));
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
(0, _defineProperty2.default)(FeaturePopoverPopper, "defaultProps", {
|
|
205
189
|
closeIcon: false,
|
|
206
|
-
duration: 200
|
|
190
|
+
duration: 200,
|
|
191
|
+
autoFocus: true
|
|
207
192
|
});
|
|
208
|
-
|
|
193
|
+
function Spot(props) {
|
|
209
194
|
var _ref3 = arguments[0],
|
|
210
195
|
_ref7;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
196
|
+
const SSpot = _baseComponents.Box;
|
|
197
|
+
const {
|
|
198
|
+
styles,
|
|
199
|
+
visible
|
|
200
|
+
} = props;
|
|
214
201
|
if (!visible) return null;
|
|
215
|
-
return _ref7 = (0, _core.sstyled)(styles), /*#__PURE__*/_react
|
|
216
|
-
}
|
|
217
|
-
|
|
202
|
+
return _ref7 = (0, _core.sstyled)(styles), /*#__PURE__*/_react.default.createElement(SSpot, _ref7.cn("SSpot", {
|
|
203
|
+
...(0, _core.assignProps)({}, _ref3)
|
|
204
|
+
}));
|
|
205
|
+
}
|
|
206
|
+
var _default = exports.default = (0, _core.createComponent)(FeaturePopover, {
|
|
218
207
|
Trigger: Trigger,
|
|
219
208
|
Popper: FeaturePopoverPopper,
|
|
220
|
-
Spot
|
|
209
|
+
Spot
|
|
221
210
|
},
|
|
222
211
|
// @ts-ignore
|
|
223
212
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeaturePopover.js","names":["_core","require","_baseComponents","_button","_interopRequireDefault","_assignProps4","_i18nEnhance","_m","_react","_intergalacticDynamicLocales","_excluded","style","sstyled","insert","stylePopper","enhance","i18nEnhance","localizedMessages","FeaturePopover","_Component","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","_callSuper2","concat","_defineProperty2","name","enabled","visible","handlers","e","_inherits2","_createClass2","key","value","uncontrolledProps","getPopperProps","_this$asProps","asProps","getI18nText","theme","$onCloseClick","handleCloseClick","getSpotProps","_this$asProps2","render","_ref4","_this$asProps3","styles","forwardRef","onVisibleChange","_this$asProps3$modifi","modifiers","other","_objectWithoutProperties2","createElement","Popper","cn","_objectSpread2","callAllEventHandlers","handleVisibleChange","_toConsumableArray2","defaultModifiers","Component","offset","placement","defaultVisible","onOutsideClick","interaction","i18n","locale","Trigger","_ref8","_ref","arguments[0]","_ref5","Children","STrigger","assignProps","Box","FeaturePopoverPopper","_Component2","_ref2","_ref6","SFeaturePopover","SClose","Button","_this$asProps4","closeIcon","duration","animationsDisabled","zIndex","ariaLabel","ariaDescribedBy","ariaLabelledby","title","_this$asProps4$autoFo","autoFocus","disableEnforceFocus","tabIndex","role","Animation","CloseIcon","Spot","props","_ref3","_ref7","SSpot","_default","exports","createComponent","parent"],"sources":["../../src/FeaturePopover.tsx"],"sourcesContent":["import { Box, Popper, Animation } from '@semcore/base-components';\nimport Button from '@semcore/button';\nimport type { IRootComponentProps } from '@semcore/core';\nimport { createComponent, Root, Component, sstyled } from '@semcore/core';\nimport { callAllEventHandlers } from '@semcore/core/lib/utils/assignProps';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport CloseIcon from '@semcore/icon/Close/m';\nimport React from 'react';\n\nimport type {\n FeaturePopoverProps,\n FeaturePopoverComponent,\n FeaturePopoverSpotProps,\n FeaturePopoverPopperProps,\n FeaturePopoverPopperInnerProps,\n} from './FeaturePopover.type';\nimport style from './style/feature-popover.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nconst stylePopper = sstyled.css`\n @keyframes enter {\n from {\n opacity: 0;\n transform: translateX(-10px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n\n @keyframes exit {\n from {\n opacity: 1;\n transform: translateX(0);\n }\n to {\n opacity: 0;\n transform: translateX(-10px);\n }\n }\n`;\n\nconst enhance = [\n i18nEnhance(localizedMessages),\n] as const;\n\nclass FeaturePopover extends Component<FeaturePopoverProps, {}, {}, typeof enhance> {\n static displayName = 'FeaturePopover';\n static style = style;\n static defaultProps = {\n offset: [0, 12],\n placement: 'bottom-start',\n defaultVisible: false,\n onOutsideClick: () => false,\n interaction: 'none',\n i18n: localizedMessages,\n locale: 'en',\n theme: 'accent',\n };\n\n static enhance = enhance;\n\n defaultModifiers = [\n {\n name: 'flip',\n enabled: false,\n },\n ];\n\n uncontrolledProps() {\n return {\n visible: null,\n };\n }\n\n handleVisibleChange = (visible: boolean) => {\n this.handlers.visible(visible);\n };\n\n handleCloseClick = (e: React.SyntheticEvent<HTMLButtonElement>) => {\n this.handlers.visible(false, e);\n };\n\n getPopperProps() {\n const { visible, getI18nText, theme } = this.asProps;\n return {\n visible,\n $onCloseClick: this.handleCloseClick,\n getI18nText,\n theme,\n };\n }\n\n getSpotProps() {\n const { visible, theme } = this.asProps;\n return { visible, theme };\n }\n\n render() {\n const { styles, forwardRef, onVisibleChange, modifiers = [], ...other } = this.asProps;\n\n return sstyled(styles)(\n <Popper\n ref={forwardRef}\n onVisibleChange={callAllEventHandlers(onVisibleChange, this.handleVisibleChange)}\n modifiers={[...this.defaultModifiers, ...modifiers]}\n {...other}\n />,\n );\n }\n}\n\nfunction Trigger({ Children, styles }: IRootComponentProps) {\n const STrigger = Root;\n return sstyled(styles)(\n <STrigger render={Popper.Trigger} tag={Box} aria-haspopup={false}>\n <Children />\n </STrigger>,\n );\n}\n\nclass FeaturePopoverPopper extends Component<FeaturePopoverPopperProps, {}, {}, [], FeaturePopoverPopperInnerProps> {\n static defaultProps = {\n closeIcon: false,\n duration: 200,\n };\n\n render() {\n const SFeaturePopover = Root;\n const SClose = Button;\n const {\n Children,\n styles,\n visible,\n closeIcon,\n duration,\n $onCloseClick,\n animationsDisabled,\n getI18nText,\n zIndex,\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedBy,\n 'aria-labelledby': ariaLabelledby,\n title,\n theme,\n autoFocus = true,\n } = this.asProps;\n\n return sstyled(styles)(\n <Popper.Popper\n disableEnforceFocus\n zIndex={zIndex}\n tabIndex={0}\n autoFocus={autoFocus}\n role='dialog'\n aria-describedby={ariaDescribedBy}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n title={title}\n >\n <Animation\n visible={visible}\n duration={duration}\n keyframes={[stylePopper['@enter'], stylePopper['@exit']]}\n initialAnimation\n animationsDisabled={animationsDisabled}\n >\n <SFeaturePopover\n render={Box}\n __excludeProps={['aria-label', 'aria-describedBy', 'title']}\n >\n {closeIcon && (\n <SClose\n aria-label={getI18nText('close')}\n onClick={$onCloseClick}\n use='tertiary'\n theme={theme === 'accent' ? 'muted' : 'invert'}\n size='m'\n addonLeft={CloseIcon}\n type='button'\n />\n )}\n <Children />\n </SFeaturePopover>\n </Animation>\n </Popper.Popper>,\n );\n }\n}\n\nconst Spot = (props: IRootComponentProps & FeaturePopoverSpotProps) => {\n const SSpot = Root;\n\n const { styles, visible } = props;\n\n if (!visible) return null;\n\n return sstyled(styles)(<SSpot render={Box} />);\n};\n\nexport default createComponent(\n FeaturePopover,\n {\n Trigger: Trigger,\n Popper: FeaturePopoverPopper,\n Spot,\n },\n // @ts-ignore\n { parent: Popper },\n) as FeaturePopoverComponent;\n"],"mappings":";;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAGA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,EAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,MAAA,GAAAJ,sBAAA,CAAAH,OAAA;AAUA,IAAAQ,4BAAA,GAAAR,OAAA;AAAmF,IAAAS,SAAA;AAAA;AAAA,IAAAC,KAAA,8BAAAX,KAAA,CAAAY,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAEnF,IAAMC,WAAW,8BAAGF,aAAO,CAAAC,MAAI;AAAA;AAAA;EAAA;EAAA;AAAA,EAsB9B;AAED,IAAME,OAAO,GAAG,CACd,IAAAC,uBAAW,EAACC,8CAAiB,CAAC,CACtB;AAAC,IAELC,cAAc,0BAAAC,UAAA;EAAA,SAAAD,eAAA;IAAA,IAAAE,KAAA;IAAA,IAAAC,gBAAA,mBAAAH,cAAA;IAAA,SAAAI,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,OAAAQ,WAAA,mBAAAV,cAAA,KAAAW,MAAA,CAAAJ,IAAA;IAAA,IAAAK,gBAAA,aAAAV,KAAA,sBAg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ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"FeaturePopover.js","names":["_core","require","_baseComponents","_button","_interopRequireDefault","_assignProps4","_i18nEnhance","_m","_react","_intergalacticDynamicLocales","style","sstyled","insert","stylePopper","enhance","i18nEnhance","localizedMessages","FeaturePopover","Component","constructor","args","_defineProperty2","default","name","enabled","visible","handlers","e","uncontrolledProps","getPopperProps","getI18nText","theme","asProps","$onCloseClick","handleCloseClick","getSpotProps","render","_ref4","styles","forwardRef","onVisibleChange","modifiers","other","createElement","Popper","cn","callAllEventHandlers","handleVisibleChange","defaultModifiers","offset","placement","defaultVisible","onOutsideClick","interaction","i18n","locale","Trigger","Children","_ref","arguments[0]","_ref5","STrigger","assignProps","Box","FeaturePopoverPopper","React","createRef","componentDidMount","autoFocus","setTimeout","popperRef","current","focus","_ref2","_ref6","SFeaturePopover","SClose","Button","closeIcon","duration","animationsDisabled","zIndex","ariaLabel","ariaDescribedBy","ariaLabelledby","title","ref","disableEnforceFocus","tabIndex","role","Animation","CloseIcon","Spot","props","_ref3","_ref7","SSpot","_default","exports","createComponent","parent"],"sources":["../../src/FeaturePopover.tsx"],"sourcesContent":["import { Box, Popper, Animation } from '@semcore/base-components';\nimport Button from '@semcore/button';\nimport type { IRootComponentProps } from '@semcore/core';\nimport { createComponent, Root, Component, sstyled } from '@semcore/core';\nimport { callAllEventHandlers } from '@semcore/core/lib/utils/assignProps';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport CloseIcon from '@semcore/icon/Close/m';\nimport React from 'react';\n\nimport type {\n FeaturePopoverProps,\n FeaturePopoverComponent,\n FeaturePopoverSpotProps,\n FeaturePopoverPopperProps,\n FeaturePopoverPopperInnerProps,\n} from './FeaturePopover.type';\nimport style from './style/feature-popover.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nconst stylePopper = sstyled.css`\n @keyframes enter {\n from {\n opacity: 0;\n transform: translateX(-10px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n }\n\n @keyframes exit {\n from {\n opacity: 1;\n transform: translateX(0);\n }\n to {\n opacity: 0;\n transform: translateX(-10px);\n }\n }\n`;\n\nconst enhance = [\n i18nEnhance(localizedMessages),\n] as const;\n\nclass FeaturePopover extends Component<FeaturePopoverProps, typeof enhance, { visible: null }> {\n static displayName = 'FeaturePopover';\n static style = style;\n static defaultProps = {\n offset: [0, 12],\n placement: 'bottom-start',\n defaultVisible: false,\n onOutsideClick: () => false,\n interaction: 'none',\n i18n: localizedMessages,\n locale: 'en',\n theme: 'accent',\n };\n\n static enhance = enhance;\n\n defaultModifiers = [\n {\n name: 'flip',\n enabled: false,\n },\n ];\n\n uncontrolledProps() {\n return {\n visible: null,\n };\n }\n\n handleVisibleChange = (visible: boolean) => {\n this.handlers.visible(visible);\n };\n\n handleCloseClick = (e: React.SyntheticEvent<HTMLButtonElement>) => {\n this.handlers.visible(false, e);\n };\n\n getPopperProps() {\n const { visible, getI18nText, theme } = this.asProps;\n return {\n visible,\n $onCloseClick: this.handleCloseClick,\n getI18nText,\n theme,\n };\n }\n\n getSpotProps() {\n const { visible, theme } = this.asProps;\n return { visible, theme };\n }\n\n render() {\n const { styles, forwardRef, onVisibleChange, modifiers = [], ...other } = this.asProps;\n\n return sstyled(styles)(\n <Popper\n ref={forwardRef}\n onVisibleChange={callAllEventHandlers(onVisibleChange, this.handleVisibleChange)}\n modifiers={[...this.defaultModifiers, ...modifiers]}\n {...other}\n />,\n );\n }\n}\n\nfunction Trigger({ Children, styles }: IRootComponentProps) {\n const STrigger = Root;\n return sstyled(styles)(\n <STrigger render={Popper.Trigger} tag={Box} aria-haspopup={false}>\n <Children />\n </STrigger>,\n );\n}\n\nclass FeaturePopoverPopper extends Component<FeaturePopoverPopperProps, [], {}, FeaturePopoverPopperInnerProps> {\n static defaultProps = {\n closeIcon: false,\n duration: 200,\n autoFocus: true,\n };\n\n popperRef = React.createRef<HTMLDivElement>();\n\n componentDidMount() {\n if (this.asProps.autoFocus) {\n setTimeout(() => {\n this.popperRef.current?.focus();\n }, 0);\n }\n }\n\n render() {\n const SFeaturePopover = Root;\n const SClose = Button;\n const {\n Children,\n styles,\n visible,\n closeIcon,\n duration,\n $onCloseClick,\n animationsDisabled,\n getI18nText,\n zIndex,\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedBy,\n 'aria-labelledby': ariaLabelledby,\n title,\n theme,\n } = this.asProps;\n\n return sstyled(styles)(\n <Popper.Popper\n ref={this.popperRef}\n disableEnforceFocus\n zIndex={zIndex}\n tabIndex={0}\n role='dialog'\n aria-describedby={ariaDescribedBy}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n title={title}\n >\n <Animation\n visible={visible}\n duration={duration}\n keyframes={[stylePopper['@enter'], stylePopper['@exit']]}\n initialAnimation\n animationsDisabled={animationsDisabled}\n >\n <SFeaturePopover\n render={Box}\n __excludeProps={['aria-label', 'aria-describedBy', 'title']}\n >\n {closeIcon && (\n <SClose\n aria-label={getI18nText('close')}\n onClick={$onCloseClick}\n use='tertiary'\n theme={theme === 'accent' ? 'muted' : 'invert'}\n size='m'\n addonLeft={CloseIcon}\n type='button'\n />\n )}\n <Children />\n </SFeaturePopover>\n </Animation>\n </Popper.Popper>,\n );\n }\n}\n\nfunction Spot(props: IRootComponentProps & FeaturePopoverSpotProps) {\n const SSpot = Root;\n\n const { styles, visible } = props;\n\n if (!visible) return null;\n\n return sstyled(styles)(<SSpot render={Box} />);\n}\n\nexport default createComponent(\n FeaturePopover,\n {\n Trigger: Trigger,\n Popper: FeaturePopoverPopper,\n Spot,\n },\n // @ts-ignore\n { parent: Popper },\n) as FeaturePopoverComponent;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAGA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAF,sBAAA,CAAAH,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oB,kBACF;EACpBc,SAAS,EAAE,KAAK;EAChBC,QAAQ,EAAE,GAAG;EACbX,SAAS,EAAE;AACb,CAAC;AA0EH,SAASwB,IAAIA,CAACC,KAAoD,EAAE;EAAA,IAAAC,KAAA,GAAAnC,YAAA;IAAAoC,KAAA;EAClE,MAAMC,KAAK,GAM2BjC,mBAAG;EAJzC,MAAM;IAAEzB,MAAM;IAAEb;EAAQ,CAAC,GAAGoE,KAAK;EAEjC,IAAI,CAACpE,OAAO,EAAE,OAAO,IAAI;EAEzB,OAAAsE,KAAA,GAAO,IAAApF,aAAO,EAAC2B,MAAM,CAAC,eAAC9B,MAAA,CAAAc,OAAA,CAAAqB,aAAA,CAACqD,KAAK,EAAAD,KAAA,CAAAlD,EAAA;IAAA,OAAA7C,KAAA,CAAA8D,WAAA,MAAAgC,KAAA;EAAA,EAAe,CAAC;AAC/C;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAA5E,OAAA,GAEc,IAAA6E,qBAAe,EAC5BlF,cAAc,EACd;EACEuC,OAAO,EAAEA,OAAO;EAChBZ,MAAM,EAAEoB,oBAAoB;EAC5B4B;AACF,CAAC;AACD;AACA;EAAEQ,MAAM,EAAExD;AAAO,CACnB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeaturePopover.type.js","names":[],"sources":["../../src/FeaturePopover.type.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 {\n AnimationProps,\n BoxProps,\n
|
|
1
|
+
{"version":3,"file":"FeaturePopover.type.js","names":[],"sources":["../../src/FeaturePopover.type.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 {\n AnimationProps,\n BoxProps,\n OutsideClickProps,\n PortalProps,\n Box, PopperContext, PopperPopperProps, Placement, Popper } from '@semcore/base-components';\nimport type { Intergalactic, PropGetterFn } from '@semcore/core';\nimport type { UniqueIDProps } from '@semcore/core/lib/utils/uniqueID';\nimport type React from 'react';\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\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 /** Specifies the locale for i18n support */\n locale?: string;\n};\n\nexport type FeaturePopoverPopperInnerProps = {\n theme: FeaturePopoverProps['theme'];\n\n visible: boolean;\n\n $onCloseClick: (e: React.SyntheticEvent<HTMLButtonElement>) => void;\n animationsDisabled: boolean;\n getI18nText: (message: string, opts?: Record<string, unknown>) => string;\n autofocus: boolean;\n};\n\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 popperMargin?: number;\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 * The theme of FeaturePopover\n * @default accent\n */\n theme?: 'accent' | 'neutral';\n};\n\nexport type FeaturePopoverTriggerProps = BoxProps & {\n theme?: FeaturePopoverProps['theme'];\n};\n\nexport type FeaturePopoverSpotProps = {\n visible?: boolean;\n theme?: FeaturePopoverProps['theme'];\n};\n\nexport type FeaturePopoverComponent = Intergalactic.Component<'div', FeaturePopoverProps, FeaturePopoverContext> & {\n Trigger: Intergalactic.Component<typeof Popper.Trigger, FeaturePopoverTriggerProps>;\n Popper: Intergalactic.Component<'div', FeaturePopoverPopperProps & AriaProps>;\n Spot: Intergalactic.Component<typeof Box, FeaturePopoverSpotProps>;\n};\n"],"mappings":"","ignoreList":[]}
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
Object.defineProperty(exports, "default", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function
|
|
10
|
-
return _FeaturePopover
|
|
9
|
+
get: function () {
|
|
10
|
+
return _FeaturePopover.default;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
var _FeaturePopover = _interopRequireDefault(require("./FeaturePopover"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -19,20 +19,20 @@ var _sv = _interopRequireDefault(require("./sv.json"));
|
|
|
19
19
|
var _tr = _interopRequireDefault(require("./tr.json"));
|
|
20
20
|
var _vi = _interopRequireDefault(require("./vi.json"));
|
|
21
21
|
var _zh = _interopRequireDefault(require("./zh.json"));
|
|
22
|
-
|
|
23
|
-
de: _de
|
|
24
|
-
en: _en
|
|
25
|
-
es: _es
|
|
26
|
-
fr: _fr
|
|
27
|
-
it: _it
|
|
28
|
-
ja: _ja
|
|
29
|
-
ko: _ko
|
|
30
|
-
nl: _nl
|
|
31
|
-
pt: _pt
|
|
32
|
-
tr: _tr
|
|
33
|
-
vi: _vi
|
|
34
|
-
zh: _zh
|
|
35
|
-
pl: _pl
|
|
36
|
-
sv: _sv
|
|
22
|
+
const localizedMessages = exports.localizedMessages = {
|
|
23
|
+
de: _de.default,
|
|
24
|
+
en: _en.default,
|
|
25
|
+
es: _es.default,
|
|
26
|
+
fr: _fr.default,
|
|
27
|
+
it: _it.default,
|
|
28
|
+
ja: _ja.default,
|
|
29
|
+
ko: _ko.default,
|
|
30
|
+
nl: _nl.default,
|
|
31
|
+
pt: _pt.default,
|
|
32
|
+
tr: _tr.default,
|
|
33
|
+
vi: _vi.default,
|
|
34
|
+
zh: _zh.default,
|
|
35
|
+
pl: _pl.default,
|
|
36
|
+
sv: _sv.default
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=__intergalactic-dynamic-locales.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__intergalactic-dynamic-locales.js","names":["_de","_interopRequireDefault","require","_en","_es","_fr","_it","_ja","_ko","_nl","_pl","_pt","_sv","_tr","_vi","_zh","localizedMessages","exports","de","en","es","fr","it","ja","ko","nl","pt","tr","vi","zh","pl","sv"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pl from './pl.json';\nimport pt from './pt.json';\nimport sv from './sv.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,GAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,GAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,GAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,GAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,GAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,GAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,GAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,GAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,GAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,GAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,GAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,GAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,GAAA,GAAAd,sBAAA,CAAAC,OAAA;AAEO,
|
|
1
|
+
{"version":3,"file":"__intergalactic-dynamic-locales.js","names":["_de","_interopRequireDefault","require","_en","_es","_fr","_it","_ja","_ko","_nl","_pl","_pt","_sv","_tr","_vi","_zh","localizedMessages","exports","de","en","es","fr","it","ja","ko","nl","pt","tr","vi","zh","pl","sv"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pl from './pl.json';\nimport pt from './pt.json';\nimport sv from './sv.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,GAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,GAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,GAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,GAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,GAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,GAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,GAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,GAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,GAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,GAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,GAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,GAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,GAAA,GAAAd,sBAAA,CAAAC,OAAA;AAEO,MAAMc,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG;EAC/BE,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA,WAAE;EACFC,EAAE,EAAFA;AACF,CAAC","ignoreList":[]}
|