@semcore/feature-popover 3.2.21 → 3.2.23
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 +14 -2
- package/lib/cjs/FeaturePopover.js +15 -13
- package/lib/cjs/FeaturePopover.js.map +1 -1
- package/lib/es6/FeaturePopover.js +15 -13
- package/lib/es6/FeaturePopover.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [3.2.
|
|
5
|
+
## [3.2.23] - 2023-03-03
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
|
-
- Version patch update due to children dependencies update (`@semcore/icon` [3.13.
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [3.13.1 ~> 3.13.2]).
|
|
10
|
+
|
|
11
|
+
## [3.2.22] - 2023-03-01
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Fixed `animationsDisabled` prop passing.
|
|
16
|
+
|
|
17
|
+
## [3.2.20] - 2023-02-28
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Version patch update due to children dependencies update (`@semcore/animation` [1.9.1 ~> 1.9.2]).
|
|
10
22
|
|
|
11
23
|
## [3.2.18] - 2023-02-22
|
|
12
24
|
|
|
@@ -48,28 +48,28 @@ var style = (
|
|
|
48
48
|
/*__reshadow_css_start__*/
|
|
49
49
|
_core.sstyled.insert(
|
|
50
50
|
/*__inner_css_start__*/
|
|
51
|
-
"@keyframes
|
|
51
|
+
"@keyframes showTrigger_rwchx{0%{opacity:0}to{opacity:1}}@keyframes scaleSizeAndHide_rwchx{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}.___SFeaturePopover_rwchx_gg_{padding-top:var(--intergalactic-spacing-4x, 16px);padding-right:var(--intergalactic-spacing-8x, 32px);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))}.___SClose_rwchx_gg_{position:absolute;right:0;top:0;padding:var(--intergalactic-spacing-2x, 8px);cursor:pointer;color:var(--intergalactic-text-primary, #191b23);font-size:0}.___SSpot_rwchx_gg_{position:absolute;bottom:calc(-1*var(--intergalactic-spacing-1x, 4px));right:calc(-1*var(--intergalactic-spacing-1x, 4px));animation-name:showTrigger_rwchx;animation-duration:.2s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards;width:12px;height:12px}.___SSpot_rwchx_gg_::before{transform-origin:50%;animation-name:scaleSizeAndHide_rwchx;animation-duration:1s;animation-iteration-count:infinite;animation-fill-mode:forwards;animation-delay:.5s}.___SSpot_rwchx_gg_::after,.___SSpot_rwchx_gg_::before{content:\"\";position:absolute;top:0;left:0;border-radius:50%;width:12px;height:12px;background-color:var(--intergalactic-bg-primary-highlight, #fce081)}@media (prefers-reduced-motion){.___SSpot_rwchx_gg_,.___SSpot_rwchx_gg_::before{animation-name:none}}"
|
|
52
52
|
/*__inner_css_end__*/
|
|
53
|
-
, "
|
|
53
|
+
, "rwchx_gg_")
|
|
54
54
|
/*__reshadow_css_end__*/
|
|
55
55
|
, {
|
|
56
|
-
"__SFeaturePopover": "
|
|
57
|
-
"__SClose": "
|
|
58
|
-
"@showTrigger": "
|
|
59
|
-
"@scaleSizeAndHide": "
|
|
60
|
-
"__SSpot": "
|
|
56
|
+
"__SFeaturePopover": "___SFeaturePopover_rwchx_gg_",
|
|
57
|
+
"__SClose": "___SClose_rwchx_gg_",
|
|
58
|
+
"@showTrigger": "showTrigger_rwchx",
|
|
59
|
+
"@scaleSizeAndHide": "scaleSizeAndHide_rwchx",
|
|
60
|
+
"__SSpot": "___SSpot_rwchx_gg_"
|
|
61
61
|
});
|
|
62
62
|
var stylePopper = (
|
|
63
63
|
/*__reshadow_css_start__*/
|
|
64
64
|
_core.sstyled.insert(
|
|
65
65
|
/*__inner_css_start__*/
|
|
66
|
-
"@keyframes
|
|
66
|
+
"@keyframes enter_1sv5j{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}@keyframes exit_1sv5j{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-10px)}}"
|
|
67
67
|
/*__inner_css_end__*/
|
|
68
|
-
, "
|
|
68
|
+
, "1sv5j_gg_")
|
|
69
69
|
/*__reshadow_css_end__*/
|
|
70
70
|
, {
|
|
71
|
-
"@enter": "
|
|
72
|
-
"@exit": "
|
|
71
|
+
"@enter": "enter_1sv5j",
|
|
72
|
+
"@exit": "exit_1sv5j"
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
var FeaturePopover = /*#__PURE__*/function (_Component) {
|
|
@@ -185,14 +185,16 @@ var FeaturePopoverPopper = /*#__PURE__*/function (_Component2) {
|
|
|
185
185
|
visible = _this$asProps2.visible,
|
|
186
186
|
closeIcon = _this$asProps2.closeIcon,
|
|
187
187
|
duration = _this$asProps2.duration,
|
|
188
|
-
$onCloseClick = _this$asProps2.$onCloseClick
|
|
188
|
+
$onCloseClick = _this$asProps2.$onCloseClick,
|
|
189
|
+
animationsDisabled = _this$asProps2.animationsDisabled;
|
|
189
190
|
return _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(_popper["default"].Popper, {
|
|
190
191
|
disableEnforceFocus: true
|
|
191
192
|
}, /*#__PURE__*/_react["default"].createElement(_animation.Animation, _ref4.cn("Animation", {
|
|
192
193
|
"visible": visible,
|
|
193
194
|
"duration": duration,
|
|
194
195
|
"keyframes": [stylePopper['@enter'], stylePopper['@exit']],
|
|
195
|
-
"initialAnimation": true
|
|
196
|
+
"initialAnimation": true,
|
|
197
|
+
"animationsDisabled": animationsDisabled
|
|
196
198
|
}), /*#__PURE__*/_react["default"].createElement(SFeaturePopover, _ref4.cn("SFeaturePopover", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref))), closeIcon ? /*#__PURE__*/_react["default"].createElement(SClose, _ref4.cn("SClose", {
|
|
197
199
|
"onClick": $onCloseClick
|
|
198
200
|
})) : null, /*#__PURE__*/_react["default"].createElement(Children, _ref4.cn("Children", {})))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeaturePopover.js","names":["stylePopper","sstyled","FeaturePopover","name","enabled","visible","handlers","e","asProps","$onCloseClick","handleCloseClick","styles","forwardRef","onVisibleChange","modifiers","other","callAllEventHandlers","handleVisibleChange","defaultModifiers","Component","style","offset","placement","defaultVisible","onOutsideClick","interaction","trigger","popper","FeaturePopoverPopper","SFeaturePopover","Box","SClose","Close","Children","closeIcon","duration","Spot","props","SSpot","createComponent","Trigger","Popper","parent"],"sources":["../../src/FeaturePopover.jsx"],"sourcesContent":["import React from 'react';\nimport { Animation } from '@semcore/animation';\nimport createComponent, { Root, Component, sstyled } from '@semcore/core';\nimport Popper from '@semcore/popper';\nimport { Box } from '@semcore/flex-box';\nimport Close from '@semcore/icon/Close/m';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\n\nimport style from './style/feature-popover.shadow.css';\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\nclass FeaturePopover extends Component {\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: {\n trigger: [['onClick']],\n popper: [],\n },\n };\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) => {\n this.handlers.visible(visible);\n };\n\n handleCloseClick = (e) => {\n this.handlers.visible(false, e);\n };\n\n getPopperProps() {\n const { visible } = this.asProps;\n return {\n visible,\n $onCloseClick: this.handleCloseClick,\n };\n }\n\n getSpotProps() {\n const { visible } = this.asProps;\n return { visible };\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\nclass FeaturePopoverPopper extends Component {\n static defaultProps = {\n closeIcon: false,\n duration: 200,\n };\n\n render() {\n const SFeaturePopover = Root;\n const SClose = Close;\n const { Children, styles, visible, closeIcon, duration, $onCloseClick }
|
|
1
|
+
{"version":3,"file":"FeaturePopover.js","names":["stylePopper","sstyled","FeaturePopover","name","enabled","visible","handlers","e","asProps","$onCloseClick","handleCloseClick","styles","forwardRef","onVisibleChange","modifiers","other","callAllEventHandlers","handleVisibleChange","defaultModifiers","Component","style","offset","placement","defaultVisible","onOutsideClick","interaction","trigger","popper","FeaturePopoverPopper","SFeaturePopover","Box","SClose","Close","Children","closeIcon","duration","animationsDisabled","Spot","props","SSpot","createComponent","Trigger","Popper","parent"],"sources":["../../src/FeaturePopover.jsx"],"sourcesContent":["import React from 'react';\nimport { Animation } from '@semcore/animation';\nimport createComponent, { Root, Component, sstyled } from '@semcore/core';\nimport Popper from '@semcore/popper';\nimport { Box } from '@semcore/flex-box';\nimport Close from '@semcore/icon/Close/m';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\n\nimport style from './style/feature-popover.shadow.css';\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\nclass FeaturePopover extends Component {\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: {\n trigger: [['onClick']],\n popper: [],\n },\n };\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) => {\n this.handlers.visible(visible);\n };\n\n handleCloseClick = (e) => {\n this.handlers.visible(false, e);\n };\n\n getPopperProps() {\n const { visible } = this.asProps;\n return {\n visible,\n $onCloseClick: this.handleCloseClick,\n };\n }\n\n getSpotProps() {\n const { visible } = this.asProps;\n return { visible };\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\nclass FeaturePopoverPopper extends Component {\n static defaultProps = {\n closeIcon: false,\n duration: 200,\n };\n\n render() {\n const SFeaturePopover = Root;\n const SClose = Close;\n const { Children, styles, visible, closeIcon, duration, $onCloseClick, animationsDisabled } =\n this.asProps;\n\n return sstyled(styles)(\n <Popper.Popper disableEnforceFocus>\n <Animation\n visible={visible}\n duration={duration}\n keyframes={[stylePopper['@enter'], stylePopper['@exit']]}\n initialAnimation\n animationsDisabled={animationsDisabled}\n >\n <SFeaturePopover render={Box}>\n {closeIcon ? <SClose onClick={$onCloseClick} /> : null}\n <Children />\n </SFeaturePopover>\n </Animation>\n </Popper.Popper>,\n );\n }\n}\n\nconst Spot = (props) => {\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: Popper.Trigger,\n Popper: FeaturePopoverPopper,\n Spot,\n },\n { parent: Popper },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAFA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,WAAW;AAAA;AAAGC,aAAA,OAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAAA;EAAA;AAAA,EAAjB;;IAwBMC,c;;;;;;;;;;;;;;;yGAce,CACjB;MACEC,IAAI,EAAE,MADR;MAEEC,OAAO,EAAE;IAFX,CADiB,C;4GAaG,UAACC,OAAD,EAAa;MACjC,MAAKC,QAAL,CAAcD,OAAd,CAAsBA,OAAtB;IACD,C;yGAEkB,UAACE,CAAD,EAAO;MACxB,MAAKD,QAAL,CAAcD,OAAd,CAAsB,KAAtB,EAA6BE,CAA7B;IACD,C;;;;;;WAZD,6BAAoB;MAClB,OAAO;QACLF,OAAO,EAAE;MADJ,CAAP;IAGD;;;WAUD,0BAAiB;MACf,IAAQA,OAAR,GAAoB,KAAKG,OAAzB,CAAQH,OAAR;MACA,OAAO;QACLA,OAAO,EAAPA,OADK;QAELI,aAAa,EAAE,KAAKC;MAFf,CAAP;IAID;;;WAED,wBAAe;MACb,IAAQL,OAAR,GAAoB,KAAKG,OAAzB,CAAQH,OAAR;MACA,OAAO;QAAEA,OAAO,EAAPA;MAAF,CAAP;IACD;;;WAED,kBAAS;MAAA;;MACP,oBAA0E,KAAKG,OAA/E;MAAA,IAAQG,MAAR,iBAAQA,MAAR;MAAA,IAAgBC,UAAhB,iBAAgBA,UAAhB;MAAA,IAA4BC,eAA5B,iBAA4BA,eAA5B;MAAA,0CAA6CC,SAA7C;MAAA,IAA6CA,SAA7C,sCAAyD,EAAzD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AAD,CAAnC,CAHb;QAAA;QAAA,sBAKsBoC;MALtB,iBAOE,gCAAC,eAAD,qGACGF,SAAS,gBAAG,gCAAC,MAAD;QAAA,WAAiBzB;MAAjB,GAAH,GAAwC,IADpD,eAEE,gCAAC,QAAD,2BAFF,CAPF,CADF,CADF;IAgBD;;;EA5BgCU,e;;iCAA7BS,oB,kBACkB;EACpBM,SAAS,EAAE,KADS;EAEpBC,QAAQ,EAAE;AAFU,C;;AA8BxB,IAAME,IAAI,GAAG,SAAPA,IAAO,CAACC,KAAD,EAAW;EAAA;EAAA;;EACtB,IAAMC,KAAK,GAM2BT,YANtC;EAEA,IAAQnB,MAAR,GAA4B2B,KAA5B,CAAQ3B,MAAR;EAAA,IAAgBN,OAAhB,GAA4BiC,KAA5B,CAAgBjC,OAAhB;EAEA,IAAI,CAACA,OAAL,EAAc,OAAO,IAAP;EAEd,eAAO,IAAAJ,aAAA,EAAQU,MAAR,CAAP,eAAuB,gCAAC,KAAD,2FAAvB;AACD,CARD;;eAUe,IAAA6B,gBAAA,EACbtC,cADa,EAEb;EACEuC,OAAO,EAAEC,kBAAA,CAAOD,OADlB;EAEEC,MAAM,EAAEd,oBAFV;EAGES,IAAI,EAAJA;AAHF,CAFa,EAOb;EAAEM,MAAM,EAAED;AAAV,CAPa,C"}
|
|
@@ -24,28 +24,28 @@ var style = (
|
|
|
24
24
|
/*__reshadow_css_start__*/
|
|
25
25
|
_sstyled.insert(
|
|
26
26
|
/*__inner_css_start__*/
|
|
27
|
-
"@keyframes
|
|
27
|
+
"@keyframes showTrigger_rwchx{0%{opacity:0}to{opacity:1}}@keyframes scaleSizeAndHide_rwchx{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}.___SFeaturePopover_rwchx_gg_{padding-top:var(--intergalactic-spacing-4x, 16px);padding-right:var(--intergalactic-spacing-8x, 32px);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))}.___SClose_rwchx_gg_{position:absolute;right:0;top:0;padding:var(--intergalactic-spacing-2x, 8px);cursor:pointer;color:var(--intergalactic-text-primary, #191b23);font-size:0}.___SSpot_rwchx_gg_{position:absolute;bottom:calc(-1*var(--intergalactic-spacing-1x, 4px));right:calc(-1*var(--intergalactic-spacing-1x, 4px));animation-name:showTrigger_rwchx;animation-duration:.2s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards;width:12px;height:12px}.___SSpot_rwchx_gg_::before{transform-origin:50%;animation-name:scaleSizeAndHide_rwchx;animation-duration:1s;animation-iteration-count:infinite;animation-fill-mode:forwards;animation-delay:.5s}.___SSpot_rwchx_gg_::after,.___SSpot_rwchx_gg_::before{content:\"\";position:absolute;top:0;left:0;border-radius:50%;width:12px;height:12px;background-color:var(--intergalactic-bg-primary-highlight, #fce081)}@media (prefers-reduced-motion){.___SSpot_rwchx_gg_,.___SSpot_rwchx_gg_::before{animation-name:none}}"
|
|
28
28
|
/*__inner_css_end__*/
|
|
29
|
-
, "
|
|
29
|
+
, "rwchx_gg_")
|
|
30
30
|
/*__reshadow_css_end__*/
|
|
31
31
|
, {
|
|
32
|
-
"__SFeaturePopover": "
|
|
33
|
-
"__SClose": "
|
|
34
|
-
"@showTrigger": "
|
|
35
|
-
"@scaleSizeAndHide": "
|
|
36
|
-
"__SSpot": "
|
|
32
|
+
"__SFeaturePopover": "___SFeaturePopover_rwchx_gg_",
|
|
33
|
+
"__SClose": "___SClose_rwchx_gg_",
|
|
34
|
+
"@showTrigger": "showTrigger_rwchx",
|
|
35
|
+
"@scaleSizeAndHide": "scaleSizeAndHide_rwchx",
|
|
36
|
+
"__SSpot": "___SSpot_rwchx_gg_"
|
|
37
37
|
});
|
|
38
38
|
var stylePopper = (
|
|
39
39
|
/*__reshadow_css_start__*/
|
|
40
40
|
sstyled.insert(
|
|
41
41
|
/*__inner_css_start__*/
|
|
42
|
-
"@keyframes
|
|
42
|
+
"@keyframes enter_1sv5j{0%{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}@keyframes exit_1sv5j{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-10px)}}"
|
|
43
43
|
/*__inner_css_end__*/
|
|
44
|
-
, "
|
|
44
|
+
, "1sv5j_gg_")
|
|
45
45
|
/*__reshadow_css_end__*/
|
|
46
46
|
, {
|
|
47
|
-
"@enter": "
|
|
48
|
-
"@exit": "
|
|
47
|
+
"@enter": "enter_1sv5j",
|
|
48
|
+
"@exit": "exit_1sv5j"
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
var FeaturePopover = /*#__PURE__*/function (_Component) {
|
|
@@ -170,14 +170,16 @@ var FeaturePopoverPopper = /*#__PURE__*/function (_Component2) {
|
|
|
170
170
|
visible = _this$asProps2.visible,
|
|
171
171
|
closeIcon = _this$asProps2.closeIcon,
|
|
172
172
|
duration = _this$asProps2.duration,
|
|
173
|
-
$onCloseClick = _this$asProps2.$onCloseClick
|
|
173
|
+
$onCloseClick = _this$asProps2.$onCloseClick,
|
|
174
|
+
animationsDisabled = _this$asProps2.animationsDisabled;
|
|
174
175
|
return _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(Popper.Popper, {
|
|
175
176
|
disableEnforceFocus: true
|
|
176
177
|
}, /*#__PURE__*/React.createElement(Animation, _ref4.cn("Animation", {
|
|
177
178
|
"visible": visible,
|
|
178
179
|
"duration": duration,
|
|
179
180
|
"keyframes": [stylePopper['@enter'], stylePopper['@exit']],
|
|
180
|
-
"initialAnimation": true
|
|
181
|
+
"initialAnimation": true,
|
|
182
|
+
"animationsDisabled": animationsDisabled
|
|
181
183
|
}), /*#__PURE__*/React.createElement(SFeaturePopover, _ref4.cn("SFeaturePopover", _objectSpread({}, _assignProps({}, _ref))), closeIcon ? /*#__PURE__*/React.createElement(SClose, _ref4.cn("SClose", {
|
|
182
184
|
"onClick": $onCloseClick
|
|
183
185
|
})) : null, /*#__PURE__*/React.createElement(Children, _ref4.cn("Children", {})))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeaturePopover.js","names":["React","Animation","createComponent","Root","Component","sstyled","Popper","Box","Close","callAllEventHandlers","stylePopper","FeaturePopover","name","enabled","visible","handlers","e","asProps","$onCloseClick","handleCloseClick","styles","forwardRef","onVisibleChange","modifiers","other","handleVisibleChange","defaultModifiers","style","offset","placement","defaultVisible","onOutsideClick","interaction","trigger","popper","FeaturePopoverPopper","SFeaturePopover","SClose","Children","closeIcon","duration","Spot","props","SSpot","Trigger","parent"],"sources":["../../src/FeaturePopover.jsx"],"sourcesContent":["import React from 'react';\nimport { Animation } from '@semcore/animation';\nimport createComponent, { Root, Component, sstyled } from '@semcore/core';\nimport Popper from '@semcore/popper';\nimport { Box } from '@semcore/flex-box';\nimport Close from '@semcore/icon/Close/m';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\n\nimport style from './style/feature-popover.shadow.css';\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\nclass FeaturePopover extends Component {\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: {\n trigger: [['onClick']],\n popper: [],\n },\n };\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) => {\n this.handlers.visible(visible);\n };\n\n handleCloseClick = (e) => {\n this.handlers.visible(false, e);\n };\n\n getPopperProps() {\n const { visible } = this.asProps;\n return {\n visible,\n $onCloseClick: this.handleCloseClick,\n };\n }\n\n getSpotProps() {\n const { visible } = this.asProps;\n return { visible };\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\nclass FeaturePopoverPopper extends Component {\n static defaultProps = {\n closeIcon: false,\n duration: 200,\n };\n\n render() {\n const SFeaturePopover = Root;\n const SClose = Close;\n const { Children, styles, visible, closeIcon, duration, $onCloseClick }
|
|
1
|
+
{"version":3,"file":"FeaturePopover.js","names":["React","Animation","createComponent","Root","Component","sstyled","Popper","Box","Close","callAllEventHandlers","stylePopper","FeaturePopover","name","enabled","visible","handlers","e","asProps","$onCloseClick","handleCloseClick","styles","forwardRef","onVisibleChange","modifiers","other","handleVisibleChange","defaultModifiers","style","offset","placement","defaultVisible","onOutsideClick","interaction","trigger","popper","FeaturePopoverPopper","SFeaturePopover","SClose","Children","closeIcon","duration","animationsDisabled","Spot","props","SSpot","Trigger","parent"],"sources":["../../src/FeaturePopover.jsx"],"sourcesContent":["import React from 'react';\nimport { Animation } from '@semcore/animation';\nimport createComponent, { Root, Component, sstyled } from '@semcore/core';\nimport Popper from '@semcore/popper';\nimport { Box } from '@semcore/flex-box';\nimport Close from '@semcore/icon/Close/m';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\n\nimport style from './style/feature-popover.shadow.css';\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\nclass FeaturePopover extends Component {\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: {\n trigger: [['onClick']],\n popper: [],\n },\n };\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) => {\n this.handlers.visible(visible);\n };\n\n handleCloseClick = (e) => {\n this.handlers.visible(false, e);\n };\n\n getPopperProps() {\n const { visible } = this.asProps;\n return {\n visible,\n $onCloseClick: this.handleCloseClick,\n };\n }\n\n getSpotProps() {\n const { visible } = this.asProps;\n return { visible };\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\nclass FeaturePopoverPopper extends Component {\n static defaultProps = {\n closeIcon: false,\n duration: 200,\n };\n\n render() {\n const SFeaturePopover = Root;\n const SClose = Close;\n const { Children, styles, visible, closeIcon, duration, $onCloseClick, animationsDisabled } =\n this.asProps;\n\n return sstyled(styles)(\n <Popper.Popper disableEnforceFocus>\n <Animation\n visible={visible}\n duration={duration}\n keyframes={[stylePopper['@enter'], stylePopper['@exit']]}\n initialAnimation\n animationsDisabled={animationsDisabled}\n >\n <SFeaturePopover render={Box}>\n {closeIcon ? <SClose onClick={$onCloseClick} /> : null}\n <Children />\n </SFeaturePopover>\n </Animation>\n </Popper.Popper>,\n );\n }\n}\n\nconst Spot = (props) => {\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: Popper.Trigger,\n Popper: FeaturePopoverPopper,\n Spot,\n },\n { parent: Popper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