@mirai/ui 1.0.24 → 1.0.25
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/build/components/Menu/Menu.js +3 -1
- package/build/components/Menu/Menu.js.map +1 -1
- package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +2 -2
- package/build/components/Tooltip/Tooltip.js +3 -1
- package/build/components/Tooltip/Tooltip.js.map +1 -1
- package/build/primitives/Layer/Layer.js +7 -4
- package/build/primitives/Layer/Layer.js.map +1 -1
- package/build/primitives/Layer/Layer.module.css +5 -0
- package/build/primitives/Layer/__tests__/__snapshots__/Layer.test.js.snap +39 -4
- package/package.json +1 -1
|
@@ -38,7 +38,9 @@ var Menu = function Menu(_ref) {
|
|
|
38
38
|
onPress = _ref$onPress === void 0 ? function () {} : _ref$onPress,
|
|
39
39
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
40
40
|
|
|
41
|
-
return /*#__PURE__*/_react.default.createElement(_primitives.Layer, _extends({
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Layer, _extends({
|
|
42
|
+
forceRender: false
|
|
43
|
+
}, others, {
|
|
42
44
|
className: (0, _helpers.styles)(_MenuModule.default.menu, visible && _MenuModule.default.visible, others.className),
|
|
43
45
|
visible: visible
|
|
44
46
|
}), children, /*#__PURE__*/_react.default.createElement(_primitives.LayerContent, null, options.map(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","names":["Menu","children","options","Template","Option","visible","onPress","others","style","menu","className","map","option","index","undefined","disabled","event","value","displayName","propTypes","PropTypes","node","arrayOf","shape","bool","divider","icon","string","label","oneOfType","number","isRequired","func"],"sources":["../../../src/components/Menu/Menu.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Layer, LayerContent } from '../../primitives';\nimport style from './Menu.module.css';\nimport { Option } from './Menu.Option';\n\nconst Menu = ({ children, options = [], Template = Option, visible, onPress = () => {}, ...others }) => {\n return (\n <Layer
|
|
1
|
+
{"version":3,"file":"Menu.js","names":["Menu","children","options","Template","Option","visible","onPress","others","style","menu","className","map","option","index","undefined","disabled","event","value","displayName","propTypes","PropTypes","node","arrayOf","shape","bool","divider","icon","string","label","oneOfType","number","isRequired","func"],"sources":["../../../src/components/Menu/Menu.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Layer, LayerContent } from '../../primitives';\nimport style from './Menu.module.css';\nimport { Option } from './Menu.Option';\n\nconst Menu = ({ children, options = [], Template = Option, visible, onPress = () => {}, ...others }) => {\n return (\n <Layer\n forceRender={false}\n {...others}\n className={styles(style.menu, visible && style.visible, others.className)}\n visible={visible}\n >\n {children}\n <LayerContent>\n {options.map((option = {}, index) => (\n <Template\n {...option}\n data-testid={others['data-testid'] ? `${others['data-testid']}-${index}` : undefined}\n key={index}\n onPress={!option.disabled ? (event) => onPress(option.value, event) : undefined}\n />\n ))}\n </LayerContent>\n </Layer>\n );\n};\n\nMenu.displayName = 'Component:Menu';\n\nMenu.propTypes = {\n children: PropTypes.node,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n children: PropTypes.node,\n disabled: PropTypes.bool,\n divider: PropTypes.bool,\n icon: PropTypes.string,\n label: PropTypes.string,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n }),\n ),\n Template: PropTypes.node,\n visible: PropTypes.bool,\n onPress: PropTypes.func,\n};\n\nexport { Menu };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG,SAAPA,IAAO,OAA2F;EAAA,IAAxFC,QAAwF,QAAxFA,QAAwF;EAAA,wBAA9EC,OAA8E;EAAA,IAA9EA,OAA8E,6BAApE,EAAoE;EAAA,yBAAhEC,QAAgE;EAAA,IAAhEA,QAAgE,8BAArDC,YAAqD;E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U,MAA7B,CAApB,EAA0DC;EANnD,CAAhB,CADO,CAFM;EAYf5B,QAAQ,EAAEiB,mBAAUC,IAZL;EAafhB,OAAO,EAAEe,mBAAUI,IAbJ;EAcflB,OAAO,EAAEc,mBAAUY;AAdJ,CAAjB"}
|
|
@@ -53,7 +53,7 @@ exports[`component:<Menu> w/ options & visible 1`] = `
|
|
|
53
53
|
Action
|
|
54
54
|
</button>
|
|
55
55
|
</span>
|
|
56
|
-
<
|
|
56
|
+
<div
|
|
57
57
|
class="layer menu visible"
|
|
58
58
|
style="left: 0px; top: 0px;"
|
|
59
59
|
>
|
|
@@ -161,7 +161,7 @@ exports[`component:<Menu> w/ options & visible 1`] = `
|
|
|
161
161
|
Add
|
|
162
162
|
</button>
|
|
163
163
|
</div>
|
|
164
|
-
</
|
|
164
|
+
</div>
|
|
165
165
|
</DocumentFragment>
|
|
166
166
|
`;
|
|
167
167
|
|
|
@@ -60,7 +60,9 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
60
60
|
visible = _useState2[0],
|
|
61
61
|
setVisible = _useState2[1];
|
|
62
62
|
|
|
63
|
-
return /*#__PURE__*/_react.default.createElement(_primitives.Layer, _extends({
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Layer, _extends({
|
|
64
|
+
forceRender: false
|
|
65
|
+
}, others, {
|
|
64
66
|
centered: true,
|
|
65
67
|
visible: visible
|
|
66
68
|
}), _react.default.Children.map(children, function (child, index) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["Tooltip","children","Template","text","others","visible","setVisible","React","Children","map","child","index","cloneElement","props","key","undefined","className","style","dispatcher","onMouseEnter","onMouseLeave","tooltip","displayName","propTypes","PropTypes","node","oneOfType","func","string","bool"],"sources":["../../../src/components/Tooltip/Tooltip.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { Layer, LayerContent, Text, View } from '../../primitives';\nimport style from './Tooltip.module.css';\n\nconst Tooltip = ({ children, Template, text, ...others }) => {\n const [visible, setVisible] = useState(others.visible || false);\n\n return (\n <Layer {...others} centered visible={visible}>\n {React.Children.map(children, (child, index) =>\n React.cloneElement(child, {\n ...child.props,\n key: index,\n 'data-testid': others['data-testid'] ? `${others['data-testid']}-dispatcher` : undefined,\n className: styles(style.dispatcher, child.props.className),\n onMouseEnter: () => setVisible(true),\n onMouseLeave: () => setVisible(false),\n }),\n )}\n\n <LayerContent>\n <View className={style.tooltip}>\n {Template ? (\n <Template />\n ) : (\n <Text bold small className={style.text}>\n {text}\n </Text>\n )}\n </View>\n </LayerContent>\n </Layer>\n );\n};\n\nTooltip.displayName = 'Component:Tooltip';\n\nTooltip.propTypes = {\n children: PropTypes.node,\n Template: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n text: PropTypes.string,\n visible: PropTypes.bool,\n};\n\nexport { Tooltip };\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,OAA6C;EAAA,IAA1CC,QAA0C,QAA1CA,QAA0C;EAAA,IAAhCC,QAAgC,QAAhCA,QAAgC;EAAA,IAAtBC,IAAsB,QAAtBA,IAAsB;EAAA,IAAbC,MAAa;;EAC3D,gBAA8B,qBAASA,MAAM,CAACC,OAAP,IAAkB,KAA3B,CAA9B;EAAA;EAAA,IAAOA,OAAP;EAAA,IAAgBC,UAAhB;;EAEA,oBACE,6BAAC,iBAAD,
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["Tooltip","children","Template","text","others","visible","setVisible","React","Children","map","child","index","cloneElement","props","key","undefined","className","style","dispatcher","onMouseEnter","onMouseLeave","tooltip","displayName","propTypes","PropTypes","node","oneOfType","func","string","bool"],"sources":["../../../src/components/Tooltip/Tooltip.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { Layer, LayerContent, Text, View } from '../../primitives';\nimport style from './Tooltip.module.css';\n\nconst Tooltip = ({ children, Template, text, ...others }) => {\n const [visible, setVisible] = useState(others.visible || false);\n\n return (\n <Layer forceRender={false} {...others} centered visible={visible}>\n {React.Children.map(children, (child, index) =>\n React.cloneElement(child, {\n ...child.props,\n key: index,\n 'data-testid': others['data-testid'] ? `${others['data-testid']}-dispatcher` : undefined,\n className: styles(style.dispatcher, child.props.className),\n onMouseEnter: () => setVisible(true),\n onMouseLeave: () => setVisible(false),\n }),\n )}\n\n <LayerContent>\n <View className={style.tooltip}>\n {Template ? (\n <Template />\n ) : (\n <Text bold small className={style.text}>\n {text}\n </Text>\n )}\n </View>\n </LayerContent>\n </Layer>\n );\n};\n\nTooltip.displayName = 'Component:Tooltip';\n\nTooltip.propTypes = {\n children: PropTypes.node,\n Template: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n text: PropTypes.string,\n visible: PropTypes.bool,\n};\n\nexport { Tooltip };\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,OAA6C;EAAA,IAA1CC,QAA0C,QAA1CA,QAA0C;EAAA,IAAhCC,QAAgC,QAAhCA,QAAgC;EAAA,IAAtBC,IAAsB,QAAtBA,IAAsB;EAAA,IAAbC,MAAa;;EAC3D,gBAA8B,qBAASA,MAAM,CAACC,OAAP,IAAkB,KAA3B,CAA9B;EAAA;EAAA,IAAOA,OAAP;EAAA,IAAgBC,UAAhB;;EAEA,oBACE,6BAAC,iBAAD;IAAO,WAAW,EAAE;EAApB,GAA+BF,MAA/B;IAAuC,QAAQ,MAA/C;IAAgD,OAAO,EAAEC;EAAzD,IACGE,eAAMC,QAAN,CAAeC,GAAf,CAAmBR,QAAnB,EAA6B,UAACS,KAAD,EAAQC,KAAR;IAAA,oBAC5BJ,eAAMK,YAAN,CAAmBF,KAAnB,kCACKA,KAAK,CAACG,KADX;MAEEC,GAAG,EAAEH,KAFP;MAGE,eAAeP,MAAM,CAAC,aAAD,CAAN,aAA2BA,MAAM,CAAC,aAAD,CAAjC,mBAAgEW,SAHjF;MAIEC,SAAS,EAAE,qBAAOC,uBAAMC,UAAb,EAAyBR,KAAK,CAACG,KAAN,CAAYG,SAArC,CAJb;MAKEG,YAAY,EAAE;QAAA,OAAMb,UAAU,CAAC,IAAD,CAAhB;MAAA,CALhB;MAMEc,YAAY,EAAE;QAAA,OAAMd,UAAU,CAAC,KAAD,CAAhB;MAAA;IANhB,GAD4B;EAAA,CAA7B,CADH,eAYE,6BAAC,wBAAD,qBACE,6BAAC,gBAAD;IAAM,SAAS,EAAEW,uBAAMI;EAAvB,GACGnB,QAAQ,gBACP,6BAAC,QAAD,OADO,gBAGP,6BAAC,gBAAD;IAAM,IAAI,MAAV;IAAW,KAAK,MAAhB;IAAiB,SAAS,EAAEe,uBAAMd;EAAlC,GACGA,IADH,CAJJ,CADF,CAZF,CADF;AA0BD,CA7BD;;;AA+BAH,OAAO,CAACsB,WAAR,GAAsB,mBAAtB;AAEAtB,OAAO,CAACuB,SAAR,GAAoB;EAClBtB,QAAQ,EAAEuB,mBAAUC,IADF;EAElBvB,QAAQ,EAAEsB,mBAAUE,SAAV,CAAoB,CAACF,mBAAUC,IAAX,EAAiBD,mBAAUG,IAA3B,CAApB,CAFQ;EAGlBxB,IAAI,EAAEqB,mBAAUI,MAHE;EAIlBvB,OAAO,EAAEmB,mBAAUK;AAJD,CAApB"}
|
|
@@ -21,7 +21,7 @@ var _LayerModule = _interopRequireDefault(require("./Layer.module.css"));
|
|
|
21
21
|
|
|
22
22
|
var _LayerContent = require("./LayerContent");
|
|
23
23
|
|
|
24
|
-
var _excluded = ["centered", "visible"];
|
|
24
|
+
var _excluded = ["centered", "forceRender", "visible"];
|
|
25
25
|
|
|
26
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
27
|
|
|
@@ -53,6 +53,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
53
53
|
|
|
54
54
|
var Layer = function Layer(_ref) {
|
|
55
55
|
var centered = _ref.centered,
|
|
56
|
+
_ref$forceRender = _ref.forceRender,
|
|
57
|
+
forceRender = _ref$forceRender === void 0 ? true : _ref$forceRender,
|
|
56
58
|
visible = _ref.visible,
|
|
57
59
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
58
60
|
|
|
@@ -96,11 +98,11 @@ var Layer = function Layer(_ref) {
|
|
|
96
98
|
}, children.find(function (_ref2) {
|
|
97
99
|
var name = _ref2.type.name;
|
|
98
100
|
return name !== _LayerContent.LayerContent.name;
|
|
99
|
-
})), visible && /*#__PURE__*/_react.default.createElement("
|
|
101
|
+
})), (forceRender || visible) && /*#__PURE__*/_react.default.createElement("div", {
|
|
100
102
|
ref: contentRef,
|
|
101
|
-
className: (0, _helpers.styles)(_LayerModule.default.layer, others.className),
|
|
103
|
+
className: (0, _helpers.styles)(_LayerModule.default.layer, !visible && _LayerModule.default.hidden, others.className),
|
|
102
104
|
style: _objectSpread(_objectSpread({}, others.style), position)
|
|
103
|
-
}, children.find(function (_ref3) {
|
|
105
|
+
}, children === null || children === void 0 ? void 0 : children.find(function (_ref3) {
|
|
104
106
|
var name = _ref3.type.name;
|
|
105
107
|
return name === _LayerContent.LayerContent.name;
|
|
106
108
|
})));
|
|
@@ -108,6 +110,7 @@ var Layer = function Layer(_ref) {
|
|
|
108
110
|
|
|
109
111
|
exports.Layer = Layer;
|
|
110
112
|
Layer.propTypes = {
|
|
113
|
+
forceRender: _propTypes.default.bool,
|
|
111
114
|
children: _propTypes.default.node,
|
|
112
115
|
centered: _propTypes.default.bool,
|
|
113
116
|
visible: _propTypes.default.bool
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layer.js","names":["Layer","centered","visible","others","device","componentRef","contentRef","position","setPosition","current","componentEl","firstChild","contentEl","componentLayout","contentLayout","left","top","children","React","Children","map","child","find","name","type","LayerContent","style","layer","className","propTypes","PropTypes","
|
|
1
|
+
{"version":3,"file":"Layer.js","names":["Layer","centered","forceRender","visible","others","device","componentRef","contentRef","position","setPosition","current","componentEl","firstChild","contentEl","componentLayout","contentLayout","left","top","children","React","Children","map","child","find","name","type","LayerContent","style","layer","hidden","className","propTypes","PropTypes","bool","node"],"sources":["../../../src/primitives/Layer/Layer.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { getElementLayout, getLayerPosition } from './helpers';\nimport style from './Layer.module.css';\nimport { LayerContent } from './LayerContent';\n\nconst Layer = ({ centered, forceRender = true, visible, ...others }) => {\n const device = useDevice();\n const componentRef = useRef();\n const contentRef = useRef();\n\n const [position, setPosition] = useState();\n\n useLayoutEffect(() => {\n const { current: { firstChild: componentEl } = {} } = componentRef;\n const { current: contentEl } = contentRef;\n\n if (!componentEl || !contentEl) return setPosition();\n\n const componentLayout = getElementLayout(componentEl);\n const contentLayout = getElementLayout(contentEl);\n const { left = 0, top = 0 } = getLayerPosition(componentLayout, contentLayout, device, centered);\n\n setPosition({ left: `${left}px`, top: `${top}px` });\n }, [centered, device, visible]);\n\n const children = React.Children.map(others.children || [], (child) => child);\n\n return (\n <>\n <span data-testid={others['data-testid']} ref={componentRef}>\n {children.find(({ type: { name } }) => name !== LayerContent.name)}\n </span>\n\n {(forceRender || visible) && (\n <div\n ref={contentRef}\n className={styles(style.layer, !visible && style.hidden, others.className)}\n style={{ ...others.style, ...position }}\n >\n {children?.find(({ type: { name } }) => name === LayerContent.name)}\n </div>\n )}\n </>\n );\n};\n\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
|
6
9
|
</DocumentFragment>
|
|
7
10
|
`;
|
|
8
11
|
|
|
9
12
|
exports[`primitive:<Layer> renders 1`] = `
|
|
10
13
|
<DocumentFragment>
|
|
11
14
|
<span />
|
|
15
|
+
<div
|
|
16
|
+
class="layer hidden"
|
|
17
|
+
/>
|
|
12
18
|
</DocumentFragment>
|
|
13
19
|
`;
|
|
14
20
|
|
|
@@ -17,6 +23,9 @@ exports[`primitive:<Layer> testID 1`] = `
|
|
|
17
23
|
<span
|
|
18
24
|
data-testid="mirai"
|
|
19
25
|
/>
|
|
26
|
+
<div
|
|
27
|
+
class="layer hidden"
|
|
28
|
+
/>
|
|
20
29
|
</DocumentFragment>
|
|
21
30
|
`;
|
|
22
31
|
|
|
@@ -29,7 +38,7 @@ exports[`primitive:<Layer> w/ centered && visible 1`] = `
|
|
|
29
38
|
Action
|
|
30
39
|
</button>
|
|
31
40
|
</span>
|
|
32
|
-
<
|
|
41
|
+
<div
|
|
33
42
|
class="layer"
|
|
34
43
|
style="left: 0px; top: 0px;"
|
|
35
44
|
>
|
|
@@ -38,7 +47,7 @@ exports[`primitive:<Layer> w/ centered && visible 1`] = `
|
|
|
38
47
|
>
|
|
39
48
|
Mirai
|
|
40
49
|
</span>
|
|
41
|
-
</
|
|
50
|
+
</div>
|
|
42
51
|
</DocumentFragment>
|
|
43
52
|
`;
|
|
44
53
|
|
|
@@ -51,10 +60,36 @@ exports[`primitive:<Layer> w/ component & <LayerContent> 1`] = `
|
|
|
51
60
|
Action
|
|
52
61
|
</button>
|
|
53
62
|
</span>
|
|
63
|
+
<div
|
|
64
|
+
class="layer hidden"
|
|
65
|
+
style="left: 0px; top: 0px;"
|
|
66
|
+
>
|
|
67
|
+
<span
|
|
68
|
+
class="text paragraph"
|
|
69
|
+
>
|
|
70
|
+
Mirai
|
|
71
|
+
</span>
|
|
72
|
+
</div>
|
|
54
73
|
</DocumentFragment>
|
|
55
74
|
`;
|
|
56
75
|
|
|
57
76
|
exports[`primitive:<Layer> w/ component 1`] = `
|
|
77
|
+
<DocumentFragment>
|
|
78
|
+
<span>
|
|
79
|
+
<button
|
|
80
|
+
class="pressable button"
|
|
81
|
+
>
|
|
82
|
+
Action
|
|
83
|
+
</button>
|
|
84
|
+
</span>
|
|
85
|
+
<div
|
|
86
|
+
class="layer hidden"
|
|
87
|
+
style="left: 0px; top: 0px;"
|
|
88
|
+
/>
|
|
89
|
+
</DocumentFragment>
|
|
90
|
+
`;
|
|
91
|
+
|
|
92
|
+
exports[`primitive:<Layer> w/ forceRender={false} & <LayerContent> 1`] = `
|
|
58
93
|
<DocumentFragment>
|
|
59
94
|
<span>
|
|
60
95
|
<button
|
|
@@ -75,7 +110,7 @@ exports[`primitive:<Layer> w/ visible 1`] = `
|
|
|
75
110
|
Action
|
|
76
111
|
</button>
|
|
77
112
|
</span>
|
|
78
|
-
<
|
|
113
|
+
<div
|
|
79
114
|
class="layer"
|
|
80
115
|
style="left: 0px; top: 0px;"
|
|
81
116
|
>
|
|
@@ -84,6 +119,6 @@ exports[`primitive:<Layer> w/ visible 1`] = `
|
|
|
84
119
|
>
|
|
85
120
|
Mirai
|
|
86
121
|
</span>
|
|
87
|
-
</
|
|
122
|
+
</div>
|
|
88
123
|
</DocumentFragment>
|
|
89
124
|
`;
|