@mirai/ui 1.0.221 → 1.1.0-beta
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/Action/Action.js +5 -3
- package/build/components/Action/Action.js.map +1 -1
- package/build/components/Action/Action.module.css +49 -50
- package/build/components/Action/Action.stories.js +8 -5
- package/build/components/Action/Action.stories.js.map +1 -1
- package/build/components/Action/__tests__/__snapshots__/Action.test.js.snap +40 -26
- package/build/components/Button/Button.js +7 -5
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +30 -19
- package/build/components/Calendar/Calendar.Month.js +6 -4
- package/build/components/Calendar/Calendar.Month.js.map +1 -1
- package/build/components/Calendar/Calendar.Week.js +6 -6
- package/build/components/Calendar/Calendar.Week.js.map +1 -1
- package/build/components/Calendar/Calendar.Weekdays.js +6 -3
- package/build/components/Calendar/Calendar.Weekdays.js.map +1 -1
- package/build/components/Calendar/Calendar.js +3 -3
- package/build/components/Calendar/Calendar.js.map +1 -1
- package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +15608 -15576
- package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +9 -9
- package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +42 -42
- package/build/components/InputNumber/InputNumber.js +9 -7
- package/build/components/InputNumber/InputNumber.js.map +1 -1
- package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +129 -114
- package/build/components/InputOption/InputOption.js +7 -4
- package/build/components/InputOption/InputOption.js.map +1 -1
- package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +84 -71
- package/build/components/InputPhone/InputPhone.js +11 -11
- package/build/components/InputPhone/InputPhone.js.map +1 -1
- package/build/components/InputPhone/__tests__/__snapshots__/InputPhone.test.js.snap +331 -331
- package/build/components/InputSelect/InputSelect.js +7 -7
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +112 -112
- package/build/components/InputText/InputText.js +10 -10
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +131 -130
- package/build/components/InputText/partials/InputText.Hint.js +5 -2
- package/build/components/InputText/partials/InputText.Hint.js.map +1 -1
- package/build/components/InputText/partials/InputText.IconState.js +5 -2
- package/build/components/InputText/partials/InputText.IconState.js.map +1 -1
- package/build/components/InputText/partials/InputText.Label.js +6 -3
- package/build/components/InputText/partials/InputText.Label.js.map +1 -1
- package/build/components/Menu/Menu.Option.js +8 -5
- package/build/components/Menu/Menu.Option.js.map +1 -1
- package/build/components/Menu/Menu.js +6 -3
- package/build/components/Menu/Menu.js.map +1 -1
- package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +68 -55
- package/build/components/Modal/Modal.js +8 -8
- package/build/components/Modal/Modal.js.map +1 -1
- package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +88 -69
- package/build/components/Notification/Notification.js +8 -5
- package/build/components/Notification/Notification.js.map +1 -1
- package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +143 -142
- package/build/components/Progress/Progress.js +6 -3
- package/build/components/Progress/Progress.js.map +1 -1
- package/build/components/Progress/__tests__/__snapshots__/Progress.test.jsx.snap +18 -18
- package/build/components/Slider/Slider.js +11 -11
- package/build/components/Slider/Slider.js.map +1 -1
- package/build/components/Slider/__tests__/__snapshots__/Slider.test.js.snap +248 -230
- package/build/components/Table/Table.ColumnFilter.js +9 -9
- package/build/components/Table/Table.ColumnFilter.js.map +1 -1
- package/build/components/Table/Table.Filter.js +7 -4
- package/build/components/Table/Table.Filter.js.map +1 -1
- package/build/components/Table/Table.Row.js +7 -8
- package/build/components/Table/Table.Row.js.map +1 -1
- package/build/components/Table/Table.js +3 -3
- package/build/components/Table/Table.js.map +1 -1
- package/build/components/Table/Table.stories.js +4 -5
- package/build/components/Table/Table.stories.js.map +1 -1
- package/build/components/Table/__tests__/__snapshots__/Table.ColumnFilter.test.js.snap +222 -192
- package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +971 -949
- package/build/components/Tooltip/Tooltip.js +4 -4
- package/build/components/Tooltip/Tooltip.js.map +1 -1
- package/build/components/Tooltip/__tests__/__snapshots__/Tooltip.test.jsx.snap +34 -24
- package/build/primitives/Checkbox/Checkbox.js +7 -3
- package/build/primitives/Checkbox/Checkbox.js.map +1 -1
- package/build/primitives/Checkbox/__tests__/__snapshots__/Checkbox.test.js.snap +16 -16
- package/build/primitives/Icon/Icon.js +5 -3
- package/build/primitives/Icon/Icon.js.map +1 -1
- package/build/primitives/Icon/__tests__/__snapshots__/Icon.test.js.snap +60 -60
- package/build/primitives/Input/Input.js +2 -2
- package/build/primitives/Input/Input.js.map +1 -1
- package/build/primitives/Layer/Layer.js +4 -3
- package/build/primitives/Layer/Layer.js.map +1 -1
- package/build/primitives/Layer/__tests__/__snapshots__/Layer.test.js.snap +42 -36
- package/build/primitives/Pressable/Pressable.constants.js +1 -1
- package/build/primitives/Pressable/Pressable.constants.js.map +1 -1
- package/build/primitives/Pressable/Pressable.js +11 -5
- package/build/primitives/Pressable/Pressable.js.map +1 -1
- package/build/primitives/Pressable/__tests__/__snapshots__/Pressable.test.js.snap +14 -10
- package/build/primitives/Primitive/Primitive.js +2 -2
- package/build/primitives/Primitive/Primitive.js.map +1 -1
- package/build/primitives/Primitive/Primitive.module.css +241 -0
- package/build/primitives/Primitive/__tests__/__snapshots__/Primitive.test.js.snap +7 -7
- package/build/primitives/Primitive/helpers/getTag.js +32 -0
- package/build/primitives/Primitive/helpers/getTag.js.map +1 -0
- package/build/primitives/Primitive/helpers/index.js +11 -0
- package/build/primitives/Primitive/helpers/index.js.map +1 -1
- package/build/primitives/Radio/Radio.js +8 -5
- package/build/primitives/Radio/Radio.js.map +1 -1
- package/build/primitives/Radio/__tests__/__snapshots__/Radio.test.js.snap +21 -21
- package/build/primitives/ScrollView/ScrollView.js +3 -3
- package/build/primitives/ScrollView/ScrollView.js.map +1 -1
- package/build/primitives/ScrollView/ScrollView.stories.js +6 -5
- package/build/primitives/ScrollView/ScrollView.stories.js.map +1 -1
- package/build/primitives/ScrollView/__tests__/__snapshots__/ScrollView.test.js.snap +20 -20
- package/build/primitives/Select/Select.js +2 -2
- package/build/primitives/Select/Select.js.map +1 -1
- package/build/primitives/Switch/Switch.js +8 -5
- package/build/primitives/Switch/Switch.js.map +1 -1
- package/build/primitives/Switch/__tests__/__snapshots__/Switch.test.js.snap +25 -25
- package/build/primitives/Text/Text.js +7 -4
- package/build/primitives/Text/Text.js.map +1 -1
- package/build/primitives/Text/Text.module.css +4 -4
- package/build/primitives/Text/__tests__/__snapshots__/Text.test.js.snap +38 -38
- package/build/primitives/View/View.js +5 -3
- package/build/primitives/View/View.js.map +1 -1
- package/build/primitives/View/__tests__/__snapshots__/View.test.js.snap +10 -10
- package/package.json +5 -1
|
@@ -10,7 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _helpers = require("../../helpers");
|
|
11
11
|
var _primitives = require("../../primitives");
|
|
12
12
|
var _helpers2 = require("./helpers");
|
|
13
|
-
var
|
|
13
|
+
var style = _interopRequireWildcard(require("./Tooltip.module.css"));
|
|
14
14
|
var _excluded = ["children", "left", "pressable", "right", "Template", "text", "timestamp", "top", "visible"],
|
|
15
15
|
_excluded2 = ["fixed", "role", "testId"];
|
|
16
16
|
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); }
|
|
@@ -84,13 +84,13 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
84
84
|
return setVisible(true);
|
|
85
85
|
} : undefined), _defineProperty(_objectSpread2, (0, _helpers2.isPressableInstance)(child) ? 'onLeave' : 'onMouseLeave', function () {
|
|
86
86
|
return setVisible(false);
|
|
87
|
-
}), _defineProperty(_objectSpread2, "className", (0, _helpers.styles)(
|
|
87
|
+
}), _defineProperty(_objectSpread2, "className", (0, _helpers.styles)(style.dispatcher, child.props.className)), _defineProperty(_objectSpread2, "testId", testId ? "".concat(testId, "-dispatcher") : undefined), _objectSpread2)));
|
|
88
88
|
}), /*#__PURE__*/_react.default.createElement(_primitives.LayerContent, null, /*#__PURE__*/_react.default.createElement(_primitives.View, _extends({}, others, {
|
|
89
|
-
className: (0, _helpers.styles)(
|
|
89
|
+
className: (0, _helpers.styles)(style.tooltip, (propLeft || propRight) && style.align, left && style.left, right && style.right, top ? style.top : style.bottom, others.className)
|
|
90
90
|
}), Template ? /*#__PURE__*/_react.default.createElement(Template, null) : /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
91
91
|
bold: true,
|
|
92
92
|
small: true,
|
|
93
|
-
className:
|
|
93
|
+
className: style.text
|
|
94
94
|
}, text)))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
|
|
95
95
|
};
|
|
96
96
|
exports.Tooltip = Tooltip;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["Tooltip","children","propLeft","left","pressable","propRight","right","Template","text","timestamp","propTop","top","visible","propVisible","inherit","useState","setVisible","position","setPosition","fixed","role","testId","others","React","Children","map","child","index","cloneElement","key","props","onClick","undefined","isPressableInstance","styles","style","dispatcher","className","tooltip","align","bottom","propTypes","PropTypes","node","isRequired","bool","oneOfType","func","string","number"],"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 { isPressableInstance } from './helpers';\nimport style from './Tooltip.module.css';\n\nconst Tooltip = ({\n children,\n left: propLeft,\n pressable = false,\n right: propRight,\n Template,\n text,\n timestamp,\n top: propTop,\n visible: propVisible = false,\n ...inherit\n}) => {\n const [visible, setVisible] = useState(propVisible);\n const [position, setPosition] = useState({});\n\n const { fixed, role = 'tooltip', testId, ...others } = inherit;\n const { left, right, top = propTop } = position;\n\n return text || Template ? (\n <Layer\n {...{ fixed, role, testId, timestamp, top, visible }}\n centered\n forceRender={false}\n left={propLeft}\n right={propRight}\n onPosition={setPosition}\n >\n {React.Children.map(children, (child, index) =>\n React.cloneElement(child, {\n key: index,\n ...child.props,\n onClick: pressable ? () => setVisible(!visible) : undefined,\n [isPressableInstance(child) ? 'onEnter' : 'onMouseEnter']: !pressable ? () => setVisible(true) : undefined,\n [isPressableInstance(child) ? 'onLeave' : 'onMouseLeave']: () => setVisible(false),\n className: styles(style.dispatcher, child.props.className),\n testId: testId ? `${testId}-dispatcher` : undefined,\n }),\n )}\n\n <LayerContent>\n <View\n {...others}\n className={styles(\n style.tooltip,\n (propLeft || propRight) && style.align,\n left && style.left,\n right && style.right,\n top ? style.top : style.bottom,\n others.className,\n )}\n >\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 <>{children}</>\n );\n};\n\nTooltip.propTypes = {\n children: PropTypes.node.isRequired,\n left: PropTypes.bool,\n pressable: PropTypes.bool,\n right: PropTypes.bool,\n Template: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n text: PropTypes.string,\n timestamp: PropTypes.number,\n top: PropTypes.bool,\n visible: PropTypes.bool,\n};\n\nexport { Tooltip };\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["Tooltip","children","propLeft","left","pressable","propRight","right","Template","text","timestamp","propTop","top","visible","propVisible","inherit","useState","setVisible","position","setPosition","fixed","role","testId","others","React","Children","map","child","index","cloneElement","key","props","onClick","undefined","isPressableInstance","styles","style","dispatcher","className","tooltip","align","bottom","propTypes","PropTypes","node","isRequired","bool","oneOfType","func","string","number"],"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 { isPressableInstance } from './helpers';\nimport * as style from './Tooltip.module.css';\n\nconst Tooltip = ({\n children,\n left: propLeft,\n pressable = false,\n right: propRight,\n Template,\n text,\n timestamp,\n top: propTop,\n visible: propVisible = false,\n ...inherit\n}) => {\n const [visible, setVisible] = useState(propVisible);\n const [position, setPosition] = useState({});\n\n const { fixed, role = 'tooltip', testId, ...others } = inherit;\n const { left, right, top = propTop } = position;\n\n return text || Template ? (\n <Layer\n {...{ fixed, role, testId, timestamp, top, visible }}\n centered\n forceRender={false}\n left={propLeft}\n right={propRight}\n onPosition={setPosition}\n >\n {React.Children.map(children, (child, index) =>\n React.cloneElement(child, {\n key: index,\n ...child.props,\n onClick: pressable ? () => setVisible(!visible) : undefined,\n [isPressableInstance(child) ? 'onEnter' : 'onMouseEnter']: !pressable ? () => setVisible(true) : undefined,\n [isPressableInstance(child) ? 'onLeave' : 'onMouseLeave']: () => setVisible(false),\n className: styles(style.dispatcher, child.props.className),\n testId: testId ? `${testId}-dispatcher` : undefined,\n }),\n )}\n\n <LayerContent>\n <View\n {...others}\n className={styles(\n style.tooltip,\n (propLeft || propRight) && style.align,\n left && style.left,\n right && style.right,\n top ? style.top : style.bottom,\n others.className,\n )}\n >\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 <>{children}</>\n );\n};\n\nTooltip.propTypes = {\n children: PropTypes.node.isRequired,\n left: PropTypes.bool,\n pressable: PropTypes.bool,\n right: PropTypes.bool,\n Template: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n text: PropTypes.string,\n timestamp: PropTypes.number,\n top: PropTypes.bool,\n visible: PropTypes.bool,\n};\n\nexport { Tooltip };\n"],"mappings":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AC,SAAS,EAAE4B,KAAK,CAAC3B;EAAK,GACpCA,IAAI,CAER,CACI,CACM,CACT,gBAER,4DAAGP,QAAQ,CACZ;AACH,CAAC;AAAC;AAEFD,OAAO,CAACyC,SAAS,GAAG;EAClBxC,QAAQ,EAAEyC,kBAAS,CAACC,IAAI,CAACC,UAAU;EACnCzC,IAAI,EAAEuC,kBAAS,CAACG,IAAI;EACpBzC,SAAS,EAAEsC,kBAAS,CAACG,IAAI;EACzBvC,KAAK,EAAEoC,kBAAS,CAACG,IAAI;EACrBtC,QAAQ,EAAEmC,kBAAS,CAACI,SAAS,CAAC,CAACJ,kBAAS,CAACC,IAAI,EAAED,kBAAS,CAACK,IAAI,CAAC,CAAC;EAC/DvC,IAAI,EAAEkC,kBAAS,CAACM,MAAM;EACtBvC,SAAS,EAAEiC,kBAAS,CAACO,MAAM;EAC3BtC,GAAG,EAAE+B,kBAAS,CAACG,IAAI;EACnBjC,OAAO,EAAE8B,kBAAS,CAACG;AACrB,CAAC"}
|
|
@@ -2,61 +2,65 @@
|
|
|
2
2
|
|
|
3
3
|
exports[` 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
|
-
<
|
|
5
|
+
<ui_layer
|
|
6
6
|
data-testid="onEnter"
|
|
7
7
|
>
|
|
8
8
|
<button
|
|
9
9
|
class="pressable button dispatcher"
|
|
10
10
|
data-testid="onEnter-dispatcher"
|
|
11
|
+
tabindex="0"
|
|
11
12
|
>
|
|
12
13
|
Action
|
|
13
14
|
</button>
|
|
14
|
-
</
|
|
15
|
+
</ui_layer>
|
|
15
16
|
</DocumentFragment>
|
|
16
17
|
`;
|
|
17
18
|
|
|
18
19
|
exports[` 2`] = `
|
|
19
20
|
<DocumentFragment>
|
|
20
|
-
<
|
|
21
|
+
<ui_layer
|
|
21
22
|
data-testid="onEnter"
|
|
22
23
|
>
|
|
23
24
|
<button
|
|
24
25
|
class="pressable button dispatcher"
|
|
25
26
|
data-testid="onEnter-dispatcher"
|
|
27
|
+
tabindex="0"
|
|
26
28
|
>
|
|
27
29
|
Action
|
|
28
30
|
</button>
|
|
29
|
-
</
|
|
31
|
+
</ui_layer>
|
|
30
32
|
</DocumentFragment>
|
|
31
33
|
`;
|
|
32
34
|
|
|
33
35
|
exports[` 3`] = `
|
|
34
36
|
<DocumentFragment>
|
|
35
|
-
<
|
|
37
|
+
<ui_layer
|
|
36
38
|
data-testid="onPress"
|
|
37
39
|
>
|
|
38
40
|
<button
|
|
39
41
|
class="pressable button dispatcher"
|
|
40
42
|
data-testid="onPress-dispatcher"
|
|
43
|
+
tabindex="0"
|
|
41
44
|
>
|
|
42
45
|
Action
|
|
43
46
|
</button>
|
|
44
|
-
</
|
|
47
|
+
</ui_layer>
|
|
45
48
|
</DocumentFragment>
|
|
46
49
|
`;
|
|
47
50
|
|
|
48
51
|
exports[` 4`] = `
|
|
49
52
|
<DocumentFragment>
|
|
50
|
-
<
|
|
53
|
+
<ui_layer
|
|
51
54
|
data-testid="onPress"
|
|
52
55
|
>
|
|
53
56
|
<button
|
|
54
57
|
class="pressable button dispatcher"
|
|
55
58
|
data-testid="onPress-dispatcher"
|
|
59
|
+
tabindex="0"
|
|
56
60
|
>
|
|
57
61
|
Action
|
|
58
62
|
</button>
|
|
59
|
-
</
|
|
63
|
+
</ui_layer>
|
|
60
64
|
</DocumentFragment>
|
|
61
65
|
`;
|
|
62
66
|
|
|
@@ -64,6 +68,7 @@ exports[`component:<Tooltip> inherit:className 1`] = `
|
|
|
64
68
|
<DocumentFragment>
|
|
65
69
|
<button
|
|
66
70
|
class="pressable button"
|
|
71
|
+
tabindex="0"
|
|
67
72
|
>
|
|
68
73
|
Action
|
|
69
74
|
</button>
|
|
@@ -72,51 +77,53 @@ exports[`component:<Tooltip> inherit:className 1`] = `
|
|
|
72
77
|
|
|
73
78
|
exports[`component:<Tooltip> prop:Template 1`] = `
|
|
74
79
|
<DocumentFragment>
|
|
75
|
-
<
|
|
80
|
+
<ui_layer>
|
|
76
81
|
<button
|
|
77
82
|
class="pressable button dispatcher"
|
|
83
|
+
tabindex="0"
|
|
78
84
|
>
|
|
79
85
|
Action
|
|
80
86
|
</button>
|
|
81
|
-
</
|
|
82
|
-
<
|
|
87
|
+
</ui_layer>
|
|
88
|
+
<ui_layer_content
|
|
83
89
|
class="layer"
|
|
84
90
|
style="left: 0px; top: 0px;"
|
|
85
91
|
>
|
|
86
|
-
<
|
|
92
|
+
<ui_view
|
|
87
93
|
class="view tooltip left bottom"
|
|
88
94
|
>
|
|
89
95
|
<strong>
|
|
90
96
|
mirai
|
|
91
97
|
</strong>
|
|
92
|
-
</
|
|
93
|
-
</
|
|
98
|
+
</ui_view>
|
|
99
|
+
</ui_layer_content>
|
|
94
100
|
</DocumentFragment>
|
|
95
101
|
`;
|
|
96
102
|
|
|
97
103
|
exports[`component:<Tooltip> prop:text 1`] = `
|
|
98
104
|
<DocumentFragment>
|
|
99
|
-
<
|
|
105
|
+
<ui_layer>
|
|
100
106
|
<button
|
|
101
107
|
class="pressable button dispatcher"
|
|
108
|
+
tabindex="0"
|
|
102
109
|
>
|
|
103
110
|
Action
|
|
104
111
|
</button>
|
|
105
|
-
</
|
|
106
|
-
<
|
|
112
|
+
</ui_layer>
|
|
113
|
+
<ui_layer_content
|
|
107
114
|
class="layer"
|
|
108
115
|
style="left: 0px; top: 0px;"
|
|
109
116
|
>
|
|
110
|
-
<
|
|
117
|
+
<ui_view
|
|
111
118
|
class="view tooltip left bottom"
|
|
112
119
|
>
|
|
113
|
-
<
|
|
120
|
+
<ui_text
|
|
114
121
|
class="text bold small text"
|
|
115
122
|
>
|
|
116
123
|
mirai
|
|
117
|
-
</
|
|
118
|
-
</
|
|
119
|
-
</
|
|
124
|
+
</ui_text>
|
|
125
|
+
</ui_view>
|
|
126
|
+
</ui_layer_content>
|
|
120
127
|
</DocumentFragment>
|
|
121
128
|
`;
|
|
122
129
|
|
|
@@ -124,6 +131,7 @@ exports[`component:<Tooltip> prop:top 1`] = `
|
|
|
124
131
|
<DocumentFragment>
|
|
125
132
|
<button
|
|
126
133
|
class="pressable button"
|
|
134
|
+
tabindex="0"
|
|
127
135
|
>
|
|
128
136
|
Action
|
|
129
137
|
</button>
|
|
@@ -134,6 +142,7 @@ exports[`component:<Tooltip> renders 1`] = `
|
|
|
134
142
|
<DocumentFragment>
|
|
135
143
|
<button
|
|
136
144
|
class="pressable button"
|
|
145
|
+
tabindex="0"
|
|
137
146
|
>
|
|
138
147
|
Action
|
|
139
148
|
</button>
|
|
@@ -142,15 +151,16 @@ exports[`component:<Tooltip> renders 1`] = `
|
|
|
142
151
|
|
|
143
152
|
exports[`component:<Tooltip> testId 1`] = `
|
|
144
153
|
<DocumentFragment>
|
|
145
|
-
<
|
|
154
|
+
<ui_layer
|
|
146
155
|
data-testid="mirai"
|
|
147
156
|
>
|
|
148
157
|
<button
|
|
149
158
|
class="pressable button dispatcher"
|
|
150
159
|
data-testid="mirai-dispatcher"
|
|
160
|
+
tabindex="0"
|
|
151
161
|
>
|
|
152
162
|
Action
|
|
153
163
|
</button>
|
|
154
|
-
</
|
|
164
|
+
</ui_layer>
|
|
155
165
|
</DocumentFragment>
|
|
156
166
|
`;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -8,8 +9,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
9
10
|
var _helpers = require("../../helpers");
|
|
10
11
|
var _Primitive = require("../Primitive");
|
|
11
|
-
var
|
|
12
|
+
var style = _interopRequireWildcard(require("./Checkbox.module.css"));
|
|
12
13
|
var _excluded = ["checked", "children", "disabled", "name", "value", "onChange"];
|
|
14
|
+
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); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
17
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -31,7 +34,8 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
31
34
|
};
|
|
32
35
|
return /*#__PURE__*/_react.default.createElement(_Primitive.Primitive, {
|
|
33
36
|
role: others.role || 'checkbox',
|
|
34
|
-
|
|
37
|
+
tag: "checkbox",
|
|
38
|
+
className: (0, _helpers.styles)(style.checkbox, others.className),
|
|
35
39
|
style: others.style
|
|
36
40
|
}, /*#__PURE__*/_react.default.createElement(_Primitive.Primitive, {
|
|
37
41
|
checked: checked,
|
|
@@ -42,7 +46,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
42
46
|
value: value,
|
|
43
47
|
onChange: handleChange,
|
|
44
48
|
testId: others.testId,
|
|
45
|
-
className: (0, _helpers.styles)(checked &&
|
|
49
|
+
className: (0, _helpers.styles)(checked && style.checked, style.input)
|
|
46
50
|
}), children);
|
|
47
51
|
};
|
|
48
52
|
exports.Checkbox = Checkbox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":["Checkbox","checked","children","disabled","name","value","onChange","others","handleChange","event","target","role","styles","style","checkbox","className","testId","input","displayName","propTypes","PropTypes","bool","node","string","isRequired","oneOfType","func"],"sources":["../../../src/primitives/Checkbox/Checkbox.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Primitive } from '../Primitive';\nimport style from './Checkbox.module.css';\n\nconst Checkbox = ({ checked = false, children, disabled, name, value = '', onChange = () => {}, ...others }) => {\n const handleChange = (event) => {\n if (disabled) return;\n\n const {\n target: { checked },\n } = event;\n onChange(checked, event);\n };\n\n return (\n <Primitive\n role={others.role || 'checkbox'}\n className={styles(style.checkbox, others.className)}\n style={others.style}\n >\n <Primitive\n checked={checked}\n disabled={disabled}\n name={name}\n tag=\"input\"\n type=\"checkbox\"\n value={value}\n onChange={handleChange}\n testId={others.testId}\n className={styles(checked && style.checked, style.input)}\n />\n {children}\n </Primitive>\n );\n};\n\nCheckbox.displayName = 'Primitive:Checkbox';\n\nCheckbox.propTypes = {\n checked: PropTypes.bool,\n children: PropTypes.node,\n disabled: PropTypes.bool,\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n onChange: PropTypes.func,\n};\n\nexport { Checkbox };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["Checkbox","checked","children","disabled","name","value","onChange","others","handleChange","event","target","role","styles","style","checkbox","className","testId","input","displayName","propTypes","PropTypes","bool","node","string","isRequired","oneOfType","func"],"sources":["../../../src/primitives/Checkbox/Checkbox.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Primitive } from '../Primitive';\nimport * as style from './Checkbox.module.css';\n\nconst Checkbox = ({ checked = false, children, disabled, name, value = '', onChange = () => {}, ...others }) => {\n const handleChange = (event) => {\n if (disabled) return;\n\n const {\n target: { checked },\n } = event;\n onChange(checked, event);\n };\n\n return (\n <Primitive\n role={others.role || 'checkbox'}\n tag=\"checkbox\"\n className={styles(style.checkbox, others.className)}\n style={others.style}\n >\n <Primitive\n checked={checked}\n disabled={disabled}\n name={name}\n tag=\"input\"\n type=\"checkbox\"\n value={value}\n onChange={handleChange}\n testId={others.testId}\n className={styles(checked && style.checked, style.input)}\n />\n {children}\n </Primitive>\n );\n};\n\nCheckbox.displayName = 'Primitive:Checkbox';\n\nCheckbox.propTypes = {\n checked: PropTypes.bool,\n children: PropTypes.node,\n disabled: PropTypes.bool,\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n onChange: PropTypes.func,\n};\n\nexport { Checkbox };\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AAA+C;AAAA;AAAA;AAAA;AAAA;AAAA;AAE/C,IAAMA,QAAQ,GAAG,SAAXA,QAAQ,OAAkG;EAAA,wBAA5FC,OAAO;IAAPA,OAAO,6BAAG,KAAK;IAAEC,QAAQ,QAARA,QAAQ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UAAU;EACjCnB,KAAK,EAAEe,kBAAS,CAACK,SAAS,CAAC,CAACL,kBAAS,CAACG,MAAM,EAAEH,kBAAS,CAACC,IAAI,CAAC,CAAC;EAC9Df,QAAQ,EAAEc,kBAAS,CAACM;AACtB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`primitive:<Checkbox> inherit:className 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
|
-
<
|
|
5
|
+
<ui_checkbox
|
|
6
6
|
class="checkbox mirai"
|
|
7
7
|
>
|
|
8
8
|
<input
|
|
@@ -11,13 +11,13 @@ exports[`primitive:<Checkbox> inherit:className 1`] = `
|
|
|
11
11
|
type="checkbox"
|
|
12
12
|
value=""
|
|
13
13
|
/>
|
|
14
|
-
</
|
|
14
|
+
</ui_checkbox>
|
|
15
15
|
</DocumentFragment>
|
|
16
16
|
`;
|
|
17
17
|
|
|
18
18
|
exports[`primitive:<Checkbox> prop:checked && disabled 1`] = `
|
|
19
19
|
<DocumentFragment>
|
|
20
|
-
<
|
|
20
|
+
<ui_checkbox
|
|
21
21
|
class="checkbox"
|
|
22
22
|
>
|
|
23
23
|
<input
|
|
@@ -28,13 +28,13 @@ exports[`primitive:<Checkbox> prop:checked && disabled 1`] = `
|
|
|
28
28
|
type="checkbox"
|
|
29
29
|
value=""
|
|
30
30
|
/>
|
|
31
|
-
</
|
|
31
|
+
</ui_checkbox>
|
|
32
32
|
</DocumentFragment>
|
|
33
33
|
`;
|
|
34
34
|
|
|
35
35
|
exports[`primitive:<Checkbox> prop:checked 1`] = `
|
|
36
36
|
<DocumentFragment>
|
|
37
|
-
<
|
|
37
|
+
<ui_checkbox
|
|
38
38
|
class="checkbox"
|
|
39
39
|
>
|
|
40
40
|
<input
|
|
@@ -44,13 +44,13 @@ exports[`primitive:<Checkbox> prop:checked 1`] = `
|
|
|
44
44
|
type="checkbox"
|
|
45
45
|
value=""
|
|
46
46
|
/>
|
|
47
|
-
</
|
|
47
|
+
</ui_checkbox>
|
|
48
48
|
</DocumentFragment>
|
|
49
49
|
`;
|
|
50
50
|
|
|
51
51
|
exports[`primitive:<Checkbox> prop:children 1`] = `
|
|
52
52
|
<DocumentFragment>
|
|
53
|
-
<
|
|
53
|
+
<ui_checkbox
|
|
54
54
|
class="checkbox"
|
|
55
55
|
>
|
|
56
56
|
<input
|
|
@@ -60,13 +60,13 @@ exports[`primitive:<Checkbox> prop:children 1`] = `
|
|
|
60
60
|
value=""
|
|
61
61
|
/>
|
|
62
62
|
<div />
|
|
63
|
-
</
|
|
63
|
+
</ui_checkbox>
|
|
64
64
|
</DocumentFragment>
|
|
65
65
|
`;
|
|
66
66
|
|
|
67
67
|
exports[`primitive:<Checkbox> prop:disabled 1`] = `
|
|
68
68
|
<DocumentFragment>
|
|
69
|
-
<
|
|
69
|
+
<ui_checkbox
|
|
70
70
|
class="checkbox"
|
|
71
71
|
>
|
|
72
72
|
<input
|
|
@@ -76,13 +76,13 @@ exports[`primitive:<Checkbox> prop:disabled 1`] = `
|
|
|
76
76
|
type="checkbox"
|
|
77
77
|
value=""
|
|
78
78
|
/>
|
|
79
|
-
</
|
|
79
|
+
</ui_checkbox>
|
|
80
80
|
</DocumentFragment>
|
|
81
81
|
`;
|
|
82
82
|
|
|
83
83
|
exports[`primitive:<Checkbox> prop:value 1`] = `
|
|
84
84
|
<DocumentFragment>
|
|
85
|
-
<
|
|
85
|
+
<ui_checkbox
|
|
86
86
|
class="checkbox"
|
|
87
87
|
>
|
|
88
88
|
<input
|
|
@@ -91,13 +91,13 @@ exports[`primitive:<Checkbox> prop:value 1`] = `
|
|
|
91
91
|
type="checkbox"
|
|
92
92
|
value="value"
|
|
93
93
|
/>
|
|
94
|
-
</
|
|
94
|
+
</ui_checkbox>
|
|
95
95
|
</DocumentFragment>
|
|
96
96
|
`;
|
|
97
97
|
|
|
98
98
|
exports[`primitive:<Checkbox> render 1`] = `
|
|
99
99
|
<DocumentFragment>
|
|
100
|
-
<
|
|
100
|
+
<ui_checkbox
|
|
101
101
|
class="checkbox"
|
|
102
102
|
>
|
|
103
103
|
<input
|
|
@@ -106,13 +106,13 @@ exports[`primitive:<Checkbox> render 1`] = `
|
|
|
106
106
|
type="checkbox"
|
|
107
107
|
value=""
|
|
108
108
|
/>
|
|
109
|
-
</
|
|
109
|
+
</ui_checkbox>
|
|
110
110
|
</DocumentFragment>
|
|
111
111
|
`;
|
|
112
112
|
|
|
113
113
|
exports[`primitive:<Checkbox> testId 1`] = `
|
|
114
114
|
<DocumentFragment>
|
|
115
|
-
<
|
|
115
|
+
<ui_checkbox
|
|
116
116
|
class="checkbox"
|
|
117
117
|
>
|
|
118
118
|
<input
|
|
@@ -122,6 +122,6 @@ exports[`primitive:<Checkbox> testId 1`] = `
|
|
|
122
122
|
type="checkbox"
|
|
123
123
|
value=""
|
|
124
124
|
/>
|
|
125
|
-
</
|
|
125
|
+
</ui_checkbox>
|
|
126
126
|
</DocumentFragment>
|
|
127
127
|
`;
|
|
@@ -9,8 +9,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _helpers = require("../../helpers");
|
|
11
11
|
var _Primitive = require("../Primitive");
|
|
12
|
-
var
|
|
12
|
+
var style = _interopRequireWildcard(require("./Icon.module.css"));
|
|
13
13
|
var _excluded = ["action", "headline", "level", "paragraph", "small", "value"];
|
|
14
|
+
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); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -30,8 +32,8 @@ var Icon = function Icon(_ref) {
|
|
|
30
32
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
31
33
|
return /*#__PURE__*/_react.default.createElement(_Primitive.Primitive, _objectSpread(_objectSpread({}, others), {}, {
|
|
32
34
|
role: others.role || 'icon',
|
|
33
|
-
tag: '
|
|
34
|
-
className: (0, _helpers.styles)(
|
|
35
|
+
tag: 'icon',
|
|
36
|
+
className: (0, _helpers.styles)(style.icon, headline ? style["headline-".concat(level)] : action ? style.action : small ? style.small : paragraph ? style.paragraph : style["headline-".concat(level)], others.className)
|
|
35
37
|
}), value ? /*#__PURE__*/_react.default.createElement(value) : undefined);
|
|
36
38
|
};
|
|
37
39
|
exports.Icon = Icon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","names":["Icon","action","headline","level","paragraph","small","value","others","React","createElement","Primitive","role","tag","className","styles","style","icon","undefined","displayName","propTypes","PropTypes","bool","number","func","isRequired"],"sources":["../../../src/primitives/Icon/Icon.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Primitive } from '../Primitive';\nimport style from './Icon.module.css';\n\nconst Icon = ({ action, headline, level = 3, paragraph, small, value, ...others }) =>\n React.createElement(\n Primitive,\n {\n ...others,\n role: others.role || 'icon',\n tag: '
|
|
1
|
+
{"version":3,"file":"Icon.js","names":["Icon","action","headline","level","paragraph","small","value","others","React","createElement","Primitive","role","tag","className","styles","style","icon","undefined","displayName","propTypes","PropTypes","bool","number","func","isRequired"],"sources":["../../../src/primitives/Icon/Icon.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Primitive } from '../Primitive';\nimport * as style from './Icon.module.css';\n\nconst Icon = ({ action, headline, level = 3, paragraph, small, value, ...others }) =>\n React.createElement(\n Primitive,\n {\n ...others,\n role: others.role || 'icon',\n tag: 'icon',\n className: styles(\n style.icon,\n headline\n ? style[`headline-${level}`]\n : action\n ? style.action\n : small\n ? style.small\n : paragraph\n ? style.paragraph\n : style[`headline-${level}`],\n others.className,\n ),\n },\n value ? React.createElement(value) : undefined,\n );\n\nIcon.displayName = 'Primitive:Icon';\n\nIcon.propTypes = {\n action: PropTypes.bool,\n headline: PropTypes.bool,\n level: PropTypes.number,\n paragraph: PropTypes.bool,\n small: PropTypes.bool,\n value: PropTypes.func.isRequired,\n};\n\nexport { Icon };\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AAA2C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAE3C,IAAMA,IAAI,GA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