@mirai/ui 2.0.6 → 2.0.8
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 +1 -2
- package/build/components/Action/Action.js.map +1 -1
- package/build/components/Action/Action.module.css +4 -0
- package/build/components/Action/__tests__/__snapshots__/Action.test.js.snap +21 -32
- package/build/components/Button/Button.js +1 -2
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/Button/Button.module.css +27 -27
- package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +49 -60
- package/build/components/Calendar/Calendar.Month.js +1 -0
- package/build/components/Calendar/Calendar.Month.js.map +1 -1
- package/build/components/Calendar/Calendar.Weekdays.js +1 -0
- package/build/components/Calendar/Calendar.Weekdays.js.map +1 -1
- package/build/components/Calendar/Calendar.js +3 -0
- package/build/components/Calendar/Calendar.js.map +1 -1
- package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +18348 -18226
- package/build/components/Form/Form.js +1 -2
- package/build/components/Form/Form.js.map +1 -1
- package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +9 -15
- package/build/components/InputDate/InputDate.js +1 -2
- package/build/components/InputDate/InputDate.js.map +1 -1
- package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +42 -67
- package/build/components/InputNumber/InputNumber.js +5 -4
- package/build/components/InputNumber/InputNumber.js.map +1 -1
- package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +195 -240
- package/build/components/InputOption/InputOption.js +3 -3
- package/build/components/InputOption/InputOption.js.map +1 -1
- package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +80 -100
- package/build/components/InputPhone/InputPhone.js +10 -5
- package/build/components/InputPhone/InputPhone.js.map +1 -1
- package/build/components/InputPhone/__tests__/__snapshots__/InputPhone.test.js.snap +339 -421
- package/build/components/InputSelect/InputSelect.js +4 -2
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +115 -115
- package/build/components/InputText/InputText.js +4 -3
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +133 -156
- package/build/components/Menu/Menu.js +1 -2
- package/build/components/Menu/Menu.js.map +1 -1
- package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +69 -77
- package/build/components/Modal/Modal.js +10 -7
- package/build/components/Modal/Modal.js.map +1 -1
- package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +78 -92
- package/build/components/Notification/Notification.js +1 -2
- package/build/components/Notification/Notification.js.map +1 -1
- package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +288 -327
- package/build/components/Progress/Progress.js +2 -3
- package/build/components/Progress/Progress.js.map +1 -1
- package/build/components/Progress/__tests__/__snapshots__/Progress.test.jsx.snap +18 -31
- package/build/components/Slider/Slider.js +8 -5
- package/build/components/Slider/Slider.js.map +1 -1
- package/build/components/Slider/Slider.module.css +3 -3
- package/build/components/Slider/__tests__/__snapshots__/Slider.test.js.snap +349 -464
- package/build/components/Table/Table.Filter.js +1 -0
- package/build/components/Table/Table.Filter.js.map +1 -1
- package/build/components/Table/Table.Row.js +0 -1
- package/build/components/Table/Table.Row.js.map +1 -1
- package/build/components/Table/Table.js +1 -2
- package/build/components/Table/Table.js.map +1 -1
- package/build/components/Table/__tests__/__snapshots__/Table.ColumnFilter.test.js.snap +222 -222
- package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +1092 -1516
- package/build/components/Tooltip/Tooltip.js +1 -2
- package/build/components/Tooltip/Tooltip.js.map +1 -1
- package/build/components/Tooltip/__tests__/__snapshots__/Tooltip.test.jsx.snap +48 -48
- package/build/components/components.customElements.js +6 -0
- package/build/components/components.customElements.js.map +1 -0
- package/build/components/index.js +1 -0
- package/build/components/index.js.map +1 -1
- package/build/helpers/CustomElement.js +39 -0
- package/build/helpers/CustomElement.js.map +1 -0
- package/build/helpers/index.js +11 -0
- package/build/helpers/index.js.map +1 -1
- package/build/primitives/Checkbox/Checkbox.js +4 -3
- package/build/primitives/Checkbox/Checkbox.js.map +1 -1
- package/build/primitives/Checkbox/__tests__/__snapshots__/Checkbox.test.js.snap +20 -35
- package/build/primitives/Icon/Icon.js +1 -2
- package/build/primitives/Icon/Icon.js.map +1 -1
- package/build/primitives/Icon/__tests__/__snapshots__/Icon.test.js.snap +82 -108
- package/build/primitives/Input/Input.js +0 -1
- package/build/primitives/Input/Input.js.map +1 -1
- package/build/primitives/Layer/Layer.js +8 -5
- package/build/primitives/Layer/Layer.js.map +1 -1
- package/build/primitives/Layer/__tests__/__snapshots__/Layer.test.js.snap +58 -58
- package/build/primitives/Pressable/Pressable.js +7 -5
- package/build/primitives/Pressable/Pressable.js.map +1 -1
- package/build/primitives/Pressable/Pressable.module.css +8 -0
- package/build/primitives/Pressable/__tests__/__snapshots__/Pressable.test.js.snap +11 -11
- package/build/primitives/Primitive/Primitive.constants.js +18 -2
- package/build/primitives/Primitive/Primitive.constants.js.map +1 -1
- package/build/primitives/Primitive/Primitive.js +13 -3
- package/build/primitives/Primitive/Primitive.js.map +1 -1
- package/build/primitives/Primitive/__tests__/__snapshots__/Primitive.test.js.snap +18 -12
- package/build/primitives/Primitive/helpers/getTag.js +3 -24
- package/build/primitives/Primitive/helpers/getTag.js.map +1 -1
- package/build/primitives/Radio/Radio.js +4 -3
- package/build/primitives/Radio/Radio.js.map +1 -1
- package/build/primitives/Radio/__tests__/__snapshots__/Radio.test.js.snap +21 -39
- package/build/primitives/ScrollView/ScrollView.js +8 -4
- package/build/primitives/ScrollView/ScrollView.js.map +1 -1
- package/build/primitives/ScrollView/ScrollView.module.css +1 -1
- package/build/primitives/ScrollView/__tests__/__snapshots__/ScrollView.test.js.snap +20 -20
- package/build/primitives/Select/Select.js +1 -2
- package/build/primitives/Select/Select.js.map +1 -1
- package/build/primitives/Select/__tests__/__snapshots__/Select.test.js.snap +0 -35
- package/build/primitives/Switch/Switch.js +1 -2
- package/build/primitives/Switch/Switch.js.map +1 -1
- package/build/primitives/Switch/__tests__/__snapshots__/Switch.test.js.snap +40 -60
- package/build/primitives/Text/Text.js +0 -1
- package/build/primitives/Text/Text.js.map +1 -1
- package/build/primitives/Text/Text.module.css +0 -4
- package/build/primitives/Text/__tests__/__snapshots__/Text.test.js.snap +62 -62
- 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/build/primitives/index.js +1 -0
- package/build/primitives/index.js.map +1 -1
- package/build/primitives/primitives.customElements.js +20 -0
- package/build/primitives/primitives.customElements.js.map +1 -0
- package/package.json +1 -1
|
@@ -35,8 +35,7 @@ var Action = function Action(_ref) {
|
|
|
35
35
|
return /*#__PURE__*/_react.default.createElement(_primitives.Pressable, _objectSpread(_objectSpread({}, others), {}, {
|
|
36
36
|
disabled: disabled,
|
|
37
37
|
href: href,
|
|
38
|
-
|
|
39
|
-
tag: href ? 'a' : others.tag || 'action',
|
|
38
|
+
tag: href ? 'a' : 'action',
|
|
40
39
|
onPress: function onPress(event) {
|
|
41
40
|
_onPress && _onPress(event);
|
|
42
41
|
if (href && target) window.open(href, target);else if (href) window.location = href;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.js","names":["Action","bold","children","disabled","href","paragraph","small","target","tiny","underline","wide","onPress","others","React","createElement","Pressable","
|
|
1
|
+
{"version":3,"file":"Action.js","names":["Action","bold","children","disabled","href","paragraph","small","target","tiny","underline","wide","onPress","others","React","createElement","Pressable","tag","event","window","open","location","className","styles","style","action","undefined","displayName","propTypes","PropTypes","bool","oneOfType","string","node","onEnter","func","onLeave"],"sources":["../../../src/components/Action/Action.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Pressable } from '../../primitives';\nimport style from './Action.module.css';\n\nconst Action = ({\n bold,\n children,\n disabled,\n href,\n paragraph,\n small,\n target,\n tiny,\n underline,\n wide,\n onPress,\n ...others\n}) =>\n React.createElement(\n Pressable,\n {\n ...others,\n disabled,\n href,\n tag: href ? 'a' : 'action',\n onPress: (event) => {\n onPress && onPress(event);\n if (href && target) window.open(href, target);\n else if (href) window.location = href;\n },\n className: styles(\n style.action,\n bold && style.bold,\n disabled && style.disabled,\n paragraph ? style.paragraph : small ? style.small : tiny ? style.tiny : undefined,\n underline && style.underline,\n wide && style.wide,\n others.className,\n ),\n },\n children,\n );\n\nAction.displayName = 'Component:Action';\n\nAction.propTypes = {\n bold: PropTypes.bool,\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n disabled: PropTypes.bool,\n href: PropTypes.string,\n paragraph: PropTypes.bool,\n small: PropTypes.bool,\n target: PropTypes.string,\n tiny: PropTypes.bool,\n underline: PropTypes.bool,\n wide: PropTypes.bool,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n onPress: PropTypes.func,\n};\n\nexport { Action };\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AAAwC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAExC,IAAMA,MAAM,GAAG,SAATA,MAAM;EAAA,IACVC,IAAI,QAAJA,IAAI;IACJC,QAAQ,QAARA,QAAQ;IACRC,QAAQ,QAARA,QAAQ;IACRC,IAAI,QAAJA,IAAI;IACJC,SAAS,QAATA,SAAS;IACTC,KAAK,QAALA,KAAK;IACLC,MAAM,QAANA,MAAM;IACNC,IAAI,QAAJA,IAAI;IACJC,SAAS,QAATA,SAAS;IACTC,IAAI,QAAJA,IAAI;IACJC,QAAO,QAAPA,OAAO;IACJC,MAAM;EAAA,oBAETC,cAAK,CAACC,aAAa,CACjBC,qBAAS,kCAEJH,MAAM;IACTT,QAAQ,EAARA,QAAQ;IACRC,IAAI,EAAJA,IAAI;IACJY,GAAG,EAAEZ,IAAI,GAAG,GAAG,GAAG,QAAQ;IAC1BO,OAAO,EA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AI;EACpBI,OAAO,EAAEL,kBAAS,CAACM,IAAI;EACvBC,OAAO,EAAEP,kBAAS,CAACM,IAAI;EACvBvB,OAAO,EAAEiB,kBAAS,CAACM;AACrB,CAAC"}
|
|
@@ -2,34 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`component:<Action> inherit:className 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
|
-
<
|
|
5
|
+
<ui-action
|
|
6
6
|
class="pressable action mirai"
|
|
7
7
|
tabindex="0"
|
|
8
8
|
>
|
|
9
9
|
children
|
|
10
|
-
</
|
|
10
|
+
</ui-action>
|
|
11
11
|
</DocumentFragment>
|
|
12
12
|
`;
|
|
13
13
|
|
|
14
14
|
exports[`component:<Action> prop:bold 1`] = `
|
|
15
15
|
<DocumentFragment>
|
|
16
|
-
<
|
|
16
|
+
<ui-action
|
|
17
17
|
class="pressable action bold"
|
|
18
18
|
tabindex="0"
|
|
19
19
|
>
|
|
20
20
|
children
|
|
21
|
-
</
|
|
21
|
+
</ui-action>
|
|
22
22
|
</DocumentFragment>
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
25
|
exports[`component:<Action> prop:disabled 1`] = `
|
|
26
26
|
<DocumentFragment>
|
|
27
|
-
<
|
|
27
|
+
<ui-action
|
|
28
28
|
class="pressable disabled action disabled"
|
|
29
|
-
disabled=""
|
|
29
|
+
disabled="true"
|
|
30
30
|
>
|
|
31
31
|
children
|
|
32
|
-
</
|
|
32
|
+
</ui-action>
|
|
33
33
|
</DocumentFragment>
|
|
34
34
|
`;
|
|
35
35
|
|
|
@@ -59,89 +59,78 @@ exports[`component:<Action> prop:href 1`] = `
|
|
|
59
59
|
|
|
60
60
|
exports[`component:<Action> prop:paragraph 1`] = `
|
|
61
61
|
<DocumentFragment>
|
|
62
|
-
<
|
|
62
|
+
<ui-action
|
|
63
63
|
class="pressable action paragraph"
|
|
64
64
|
tabindex="0"
|
|
65
65
|
>
|
|
66
66
|
children
|
|
67
|
-
</
|
|
67
|
+
</ui-action>
|
|
68
68
|
</DocumentFragment>
|
|
69
69
|
`;
|
|
70
70
|
|
|
71
71
|
exports[`component:<Action> prop:small 1`] = `
|
|
72
72
|
<DocumentFragment>
|
|
73
|
-
<
|
|
73
|
+
<ui-action
|
|
74
74
|
class="pressable action small"
|
|
75
75
|
tabindex="0"
|
|
76
76
|
>
|
|
77
77
|
children
|
|
78
|
-
</
|
|
78
|
+
</ui-action>
|
|
79
79
|
</DocumentFragment>
|
|
80
80
|
`;
|
|
81
81
|
|
|
82
82
|
exports[`component:<Action> prop:tiny 1`] = `
|
|
83
83
|
<DocumentFragment>
|
|
84
|
-
<
|
|
84
|
+
<ui-action
|
|
85
85
|
class="pressable action tiny"
|
|
86
86
|
tabindex="0"
|
|
87
87
|
>
|
|
88
88
|
children
|
|
89
|
-
</
|
|
89
|
+
</ui-action>
|
|
90
90
|
</DocumentFragment>
|
|
91
91
|
`;
|
|
92
92
|
|
|
93
93
|
exports[`component:<Action> prop:underline 1`] = `
|
|
94
94
|
<DocumentFragment>
|
|
95
|
-
<
|
|
95
|
+
<ui-action
|
|
96
96
|
class="pressable action underline"
|
|
97
97
|
tabindex="0"
|
|
98
98
|
>
|
|
99
99
|
children
|
|
100
|
-
</
|
|
100
|
+
</ui-action>
|
|
101
101
|
</DocumentFragment>
|
|
102
102
|
`;
|
|
103
103
|
|
|
104
104
|
exports[`component:<Action> prop:wide 1`] = `
|
|
105
105
|
<DocumentFragment>
|
|
106
|
-
<
|
|
106
|
+
<ui-action
|
|
107
107
|
class="pressable action wide"
|
|
108
108
|
tabindex="0"
|
|
109
109
|
>
|
|
110
110
|
children
|
|
111
|
-
</
|
|
111
|
+
</ui-action>
|
|
112
112
|
</DocumentFragment>
|
|
113
113
|
`;
|
|
114
114
|
|
|
115
115
|
exports[`component:<Action> renders 1`] = `
|
|
116
116
|
<DocumentFragment>
|
|
117
|
-
<
|
|
117
|
+
<ui-action
|
|
118
118
|
class="pressable action"
|
|
119
119
|
tabindex="0"
|
|
120
120
|
>
|
|
121
121
|
children
|
|
122
|
-
</
|
|
123
|
-
</DocumentFragment>
|
|
124
|
-
`;
|
|
125
|
-
|
|
126
|
-
exports[`component:<Action> tag 1`] = `
|
|
127
|
-
<DocumentFragment>
|
|
128
|
-
<a
|
|
129
|
-
class="pressable action"
|
|
130
|
-
tabindex="0"
|
|
131
|
-
>
|
|
132
|
-
children
|
|
133
|
-
</a>
|
|
122
|
+
</ui-action>
|
|
134
123
|
</DocumentFragment>
|
|
135
124
|
`;
|
|
136
125
|
|
|
137
126
|
exports[`component:<Action> testId 1`] = `
|
|
138
127
|
<DocumentFragment>
|
|
139
|
-
<
|
|
128
|
+
<ui-action
|
|
140
129
|
class="pressable action"
|
|
141
130
|
data-testid="mirai"
|
|
142
131
|
tabindex="0"
|
|
143
132
|
>
|
|
144
133
|
children
|
|
145
|
-
</
|
|
134
|
+
</ui-action>
|
|
146
135
|
</DocumentFragment>
|
|
147
136
|
`;
|
|
@@ -50,8 +50,7 @@ var Button = function Button(_ref) {
|
|
|
50
50
|
top: top
|
|
51
51
|
} : undefined, /*#__PURE__*/_react.default.createElement(_primitives.Pressable, _objectSpread(_objectSpread({}, others), {}, {
|
|
52
52
|
disabled: disabled || busy,
|
|
53
|
-
|
|
54
|
-
tag: others.tag || 'button',
|
|
53
|
+
tag: 'button',
|
|
55
54
|
onPress: onPress,
|
|
56
55
|
className: (0, _helpers.styles)(_ButtonModule.default.button, busy && !disabled && _ButtonModule.default.busy, large && _ButtonModule.default.large, small && _ButtonModule.default.small, rounded && _ButtonModule.default.rounded, squared && _ButtonModule.default.squared, secondary && !transparent && !disabled && _ButtonModule.default.secondary, transparent && _ButtonModule.default.transparent, (disabled || busy) && _ButtonModule.default.disabled, wide && _ButtonModule.default.wide, others.className),
|
|
57
56
|
'aria-label': inherit['aria-label'] || (typeof tooltip === 'string' ? tooltip : undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":["Button","busy","children","disabled","large","rounded","secondary","small","squared","transparent","tooltip","wide","onPress","inherit","fixed","left","right","top","others","React","createElement","Tooltip","Fragment","text","undefined","Pressable","
|
|
1
|
+
{"version":3,"file":"Button.js","names":["Button","busy","children","disabled","large","rounded","secondary","small","squared","transparent","tooltip","wide","onPress","inherit","fixed","left","right","top","others","React","createElement","Tooltip","Fragment","text","undefined","Pressable","tag","className","styles","style","button","busyContainer","active","spinner","displayName","propTypes","PropTypes","bool","oneOfType","string","node","onEnter","func","onLeave"],"sources":["../../../src/components/Button/Button.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Pressable, View } from '../../primitives';\nimport { Tooltip } from '../Tooltip';\nimport style from './Button.module.css';\n\nconst Button = ({\n busy,\n children,\n disabled,\n large,\n rounded,\n secondary,\n small,\n squared = false,\n transparent = false,\n tooltip,\n wide,\n onPress,\n ...inherit\n}) => {\n const { fixed, left, right, top, ...others } = inherit;\n\n return React.createElement(\n tooltip ? Tooltip : React.Fragment,\n tooltip ? { fixed, left, right, text: tooltip, top } : undefined,\n React.createElement(\n Pressable,\n {\n ...others,\n disabled: disabled || busy,\n tag: 'button',\n onPress,\n className: styles(\n style.button,\n busy && !disabled && style.busy,\n large && style.large,\n small && style.small,\n rounded && style.rounded,\n squared && style.squared,\n secondary && !transparent && !disabled && style.secondary,\n transparent && style.transparent,\n (disabled || busy) && style.disabled,\n wide && style.wide,\n others.className,\n ),\n 'aria-label': inherit['aria-label'] || (typeof tooltip === 'string' ? tooltip : undefined),\n },\n busy === undefined ? (\n children\n ) : (\n <>\n <View className={styles(style.busyContainer, busy && style.active)}>\n <View className={style.spinner} />\n </View>\n <View row className={style.children}>\n {children}\n </View>\n </>\n ),\n ),\n );\n};\n\nButton.displayName = 'Component:Button';\nButton.propTypes = {\n busy: PropTypes.bool,\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n disabled: PropTypes.bool,\n large: PropTypes.bool,\n rounded: PropTypes.bool,\n secondary: PropTypes.bool,\n small: PropTypes.bool,\n squared: PropTypes.bool,\n tooltip: PropTypes.string,\n transparent: PropTypes.bool,\n wide: PropTypes.bool,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n onPress: PropTypes.func,\n};\n\nexport { Button };\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AACA;AAAwC;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAExC,IAAMA,MAAM,GAAG,SAATA,MAAM,OAcN;EAAA,IAbJC,IAAI,QAAJA,IAAI;IACJC,QAAQ,QAARA,QAAQ;IACRC,QAAQ,QAARA,QAAQ;IACRC,KAAK,QAALA,KAAK;IACLC,OAAO,QAAPA,OAAO;IACPC,SAAS,QAATA,SAAS;IACTC,KAAK,QAALA,KAAK;IAAA,oBACLC,OAAO;IAAPA,OAAO,6BAAG,KAAK;IAAA,wBACfC,WAAW;IAAXA,WAAW,iCAAG,KAAK;IACnBC,OAAO,QAAPA,OAAO;IACPC,IAAI,QAAJA,IAAI;IACJC,OAAO,QAAPA,OAAO;IACJC,OAAO;EAEV,IAAQC,KAAK,GAAkCD,OAAO,CAA9CC,KAAK;IAAEC,IAAI,GAA4BF,OAAO,CAAvCE,IAAI;IAAEC,KAAK,GAAqBH,OAAO,CAAjCG,KAAK;IAAEC,GAAG,GAAgBJ,OAAO,CAA1BI,GAAG;IAAKC,MAAM,4BAAKL,OAAO;EAEtD,oBAAOM,cAAK,CAACC,aAAa,CACxBV,OAAO,GAAGW,gBAAO,GAAGF,cAAK,CAACG,QAAQ,EAClCZ,OAAO,GAAG;IAAEI,KAAK,EAALA,KAAK;IAAEC,IAAI,EAAJA,IAAI;IAAEC,KAAK,EAALA,KAAK;IAAEO,IAAI,EAAEb,OAAO;IAAEO,GAAG,EAAHA;EAAI,CAAC,GAAGO,SAAS,eAChEL,cAAK,CAACC,aAAa,CACjBK,qBAAS,kCAEJP,MAAM;IACTf,QAAQ,EAAEA,QAAQ,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,EAAEkC,kBAAS,CAACE,SAAS,CAAC,CAACF,kBAAS,CAACG,MAAM,EAAEH,kBAAS,CAACI,IAAI,CAAC,CAAC;EACjErC,QAAQ,EAAEiC,kBAAS,CAACC,IAAI;EACxBjC,KAAK,EAAEgC,kBAAS,CAACC,IAAI;EACrBhC,OAAO,EAAE+B,kBAAS,CAACC,IAAI;EACvB/B,SAAS,EAAE8B,kBAAS,CAACC,IAAI;EACzB9B,KAAK,EAAE6B,kBAAS,CAACC,IAAI;EACrB7B,OAAO,EAAE4B,kBAAS,CAACC,IAAI;EACvB3B,OAAO,EAAE0B,kBAAS,CAACG,MAAM;EACzB9B,WAAW,EAAE2B,kBAAS,CAACC,IAAI;EAC3B1B,IAAI,EAAEyB,kBAAS,CAACC,IAAI;EACpBI,OAAO,EAAEL,kBAAS,CAACM,IAAI;EACvBC,OAAO,EAAEP,kBAAS,CAACM,IAAI;EACvB9B,OAAO,EAAEwB,kBAAS,CAACM;AACrB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
.button {
|
|
2
2
|
align-items: center;
|
|
3
3
|
background-color: var(--mirai-ui-button-background);
|
|
4
4
|
border-radius: var(--mirai-ui-button-radius);
|
|
@@ -10,112 +10,112 @@ button.button {
|
|
|
10
10
|
justify-content: center;
|
|
11
11
|
max-height: var(--mirai-ui-button-height);
|
|
12
12
|
min-height: var(--mirai-ui-button-height);
|
|
13
|
-
outline: none;
|
|
14
13
|
overflow: hidden;
|
|
15
14
|
padding: 0 var(--mirai-ui-button-padding-x);
|
|
16
15
|
position: relative;
|
|
16
|
+
text-align: center;
|
|
17
17
|
transition: background-color var(--mirai-ui-motion-collapse) var(--mirai-ui-motion-easing),
|
|
18
18
|
box-shadow var(--mirai-ui-motion-collapse) var(--mirai-ui-motion-easing),
|
|
19
19
|
color var(--mirai-ui-motion-collapse) var(--mirai-ui-motion-easing);
|
|
20
20
|
width: fit-content;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
.button,
|
|
24
|
+
.button .children {
|
|
25
25
|
gap: var(--mirai-ui-space-XXS);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/* -- variants */
|
|
29
|
-
button.
|
|
29
|
+
.button.disabled:not(.busy) {
|
|
30
30
|
background-color: var(--mirai-ui-button-disabled-background);
|
|
31
31
|
color: var(--mirai-ui-button-disabled-color);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
.secondary {
|
|
35
35
|
background-color: var(--mirai-ui-button-secondary-background);
|
|
36
36
|
box-shadow: inset 0 0 0 var(--mirai-ui-border-width) var(--mirai-ui-button-secondary-color);
|
|
37
37
|
color: var(--mirai-ui-button-secondary-color);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
.button:not(.disabled).secondary:active,
|
|
41
|
+
.button:not(.disabled).secondary:hover {
|
|
42
42
|
background-color: var(--mirai-ui-button-secondary-background-active);
|
|
43
43
|
box-shadow: inset 0 0 0 var(--mirai-ui-border-width) var(--mirai-ui-button-secondary-focus-color);
|
|
44
44
|
color: var(--mirai-ui-button-secondary-focus-color);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
.transparent {
|
|
48
48
|
background-color: transparent;
|
|
49
49
|
color: var(--mirai-ui-button-transparent-color);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
.transparent:not(.disabled):active,
|
|
53
|
+
.transparent:not(.disabled):hover {
|
|
54
54
|
background-color: var(--mirai-ui-button-transparent-background-active);
|
|
55
55
|
color: var(--mirai-ui-button-focus-color);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
.button:not(.disabled):not(.secondary):not(.transparent):active,
|
|
59
|
+
.button:not(.disabled):not(.secondary):not(.transparent):hover {
|
|
60
60
|
background-color: var(--mirai-ui-button-focus-color);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/* -- sizing */
|
|
64
|
-
|
|
64
|
+
.large {
|
|
65
65
|
font-size: var(--mirai-ui-font-size-paragraph);
|
|
66
66
|
max-height: var(--mirai-ui-button-large-height);
|
|
67
67
|
min-height: var(--mirai-ui-button-large-height);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
.rounded {
|
|
71
71
|
border-radius: var(--mirai-ui-space-XXL);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
.small {
|
|
75
75
|
font-size: var(--mirai-ui-font-size-small);
|
|
76
76
|
max-height: var(--mirai-ui-button-small-height);
|
|
77
77
|
min-height: var(--mirai-ui-button-small-height);
|
|
78
78
|
padding: 0 calc(var(--mirai-ui-button-padding-x) / 2);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
.squared {
|
|
82
82
|
padding: 0;
|
|
83
83
|
min-width: var(--mirai-ui-button-height);
|
|
84
84
|
max-width: var(--mirai-ui-button-height);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
.large.squared {
|
|
88
88
|
min-width: var(--mirai-ui-button-large-height);
|
|
89
89
|
max-width: var(--mirai-ui-button-large-height);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
.small.squared {
|
|
93
93
|
min-width: var(--mirai-ui-button-small-height);
|
|
94
94
|
max-width: var(--mirai-ui-button-small-height);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
width:
|
|
97
|
+
.wide {
|
|
98
|
+
width: auto;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/* -- children */
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
.button .children,
|
|
103
|
+
.button .spinner {
|
|
104
104
|
transition: opacity var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing),
|
|
105
105
|
transform var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
.button.busy .children {
|
|
109
109
|
opacity: 0;
|
|
110
110
|
transform: translateY(var(--mirai-ui-space-XL));
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
.button .spinner {
|
|
114
114
|
opacity: 0;
|
|
115
115
|
transform: translateY(calc(var(--mirai-ui-space-XL) * -1));
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
.button.busy .spinner {
|
|
119
119
|
opacity: 1;
|
|
120
120
|
transform: translateY(0%);
|
|
121
121
|
}
|
|
@@ -144,7 +144,7 @@ button.button.busy .spinner {
|
|
|
144
144
|
transition: opacity var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
.secondary:not(
|
|
147
|
+
.secondary:not(.disabled) .busyContainer:before {
|
|
148
148
|
background-color: var(--mirai-ui-button-background);
|
|
149
149
|
}
|
|
150
150
|
|
|
@@ -2,203 +2,192 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`component:<Button> inherit:className 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
|
-
<button
|
|
5
|
+
<ui-button
|
|
6
6
|
class="pressable button mirai"
|
|
7
7
|
tabindex="0"
|
|
8
8
|
>
|
|
9
9
|
children
|
|
10
|
-
</button>
|
|
10
|
+
</ui-button>
|
|
11
11
|
</DocumentFragment>
|
|
12
12
|
`;
|
|
13
13
|
|
|
14
14
|
exports[`component:<Button> prop:busy 1`] = `
|
|
15
15
|
<DocumentFragment>
|
|
16
|
-
<button
|
|
16
|
+
<ui-button
|
|
17
17
|
class="pressable disabled button busy disabled"
|
|
18
|
-
disabled=""
|
|
18
|
+
disabled="true"
|
|
19
19
|
>
|
|
20
|
-
<
|
|
20
|
+
<ui-view
|
|
21
21
|
class="view busyContainer active"
|
|
22
22
|
>
|
|
23
|
-
<
|
|
23
|
+
<ui-view
|
|
24
24
|
class="view spinner"
|
|
25
25
|
/>
|
|
26
|
-
</
|
|
27
|
-
<
|
|
26
|
+
</ui-view>
|
|
27
|
+
<ui-view
|
|
28
28
|
class="view row children"
|
|
29
29
|
>
|
|
30
30
|
children
|
|
31
|
-
</
|
|
32
|
-
</button>
|
|
31
|
+
</ui-view>
|
|
32
|
+
</ui-button>
|
|
33
33
|
</DocumentFragment>
|
|
34
34
|
`;
|
|
35
35
|
|
|
36
36
|
exports[`component:<Button> prop:disabled 1`] = `
|
|
37
37
|
<DocumentFragment>
|
|
38
|
-
<button
|
|
38
|
+
<ui-button
|
|
39
39
|
class="pressable disabled button disabled"
|
|
40
|
-
disabled=""
|
|
40
|
+
disabled="true"
|
|
41
41
|
>
|
|
42
42
|
children
|
|
43
|
-
</button>
|
|
43
|
+
</ui-button>
|
|
44
44
|
</DocumentFragment>
|
|
45
45
|
`;
|
|
46
46
|
|
|
47
47
|
exports[`component:<Button> prop:large 1`] = `
|
|
48
48
|
<DocumentFragment>
|
|
49
|
-
<button
|
|
49
|
+
<ui-button
|
|
50
50
|
class="pressable button large"
|
|
51
51
|
tabindex="0"
|
|
52
52
|
>
|
|
53
53
|
children
|
|
54
|
-
</button>
|
|
54
|
+
</ui-button>
|
|
55
55
|
</DocumentFragment>
|
|
56
56
|
`;
|
|
57
57
|
|
|
58
58
|
exports[`component:<Button> prop:secondary && prop:busy 1`] = `
|
|
59
59
|
<DocumentFragment>
|
|
60
|
-
<button
|
|
60
|
+
<ui-button
|
|
61
61
|
class="pressable disabled button busy secondary disabled"
|
|
62
|
-
disabled=""
|
|
62
|
+
disabled="true"
|
|
63
63
|
>
|
|
64
|
-
<
|
|
64
|
+
<ui-view
|
|
65
65
|
class="view busyContainer active"
|
|
66
66
|
>
|
|
67
|
-
<
|
|
67
|
+
<ui-view
|
|
68
68
|
class="view spinner"
|
|
69
69
|
/>
|
|
70
|
-
</
|
|
71
|
-
<
|
|
70
|
+
</ui-view>
|
|
71
|
+
<ui-view
|
|
72
72
|
class="view row children"
|
|
73
73
|
>
|
|
74
74
|
children
|
|
75
|
-
</
|
|
76
|
-
</button>
|
|
75
|
+
</ui-view>
|
|
76
|
+
</ui-button>
|
|
77
77
|
</DocumentFragment>
|
|
78
78
|
`;
|
|
79
79
|
|
|
80
80
|
exports[`component:<Button> prop:secondary && prop:busy 2`] = `
|
|
81
81
|
<DocumentFragment>
|
|
82
|
-
<button
|
|
82
|
+
<ui-button
|
|
83
83
|
class="pressable disabled button busy transparent disabled"
|
|
84
|
-
disabled=""
|
|
84
|
+
disabled="true"
|
|
85
85
|
>
|
|
86
|
-
<
|
|
86
|
+
<ui-view
|
|
87
87
|
class="view busyContainer active"
|
|
88
88
|
>
|
|
89
|
-
<
|
|
89
|
+
<ui-view
|
|
90
90
|
class="view spinner"
|
|
91
91
|
/>
|
|
92
|
-
</
|
|
93
|
-
<
|
|
92
|
+
</ui-view>
|
|
93
|
+
<ui-view
|
|
94
94
|
class="view row children"
|
|
95
95
|
>
|
|
96
96
|
children
|
|
97
|
-
</
|
|
98
|
-
</button>
|
|
97
|
+
</ui-view>
|
|
98
|
+
</ui-button>
|
|
99
99
|
</DocumentFragment>
|
|
100
100
|
`;
|
|
101
101
|
|
|
102
102
|
exports[`component:<Button> prop:secondary 1`] = `
|
|
103
103
|
<DocumentFragment>
|
|
104
|
-
<button
|
|
104
|
+
<ui-button
|
|
105
105
|
class="pressable button secondary"
|
|
106
106
|
tabindex="0"
|
|
107
107
|
>
|
|
108
108
|
children
|
|
109
|
-
</button>
|
|
109
|
+
</ui-button>
|
|
110
110
|
</DocumentFragment>
|
|
111
111
|
`;
|
|
112
112
|
|
|
113
113
|
exports[`component:<Button> prop:small 1`] = `
|
|
114
114
|
<DocumentFragment>
|
|
115
|
-
<button
|
|
115
|
+
<ui-button
|
|
116
116
|
class="pressable button small"
|
|
117
117
|
tabindex="0"
|
|
118
118
|
>
|
|
119
119
|
children
|
|
120
|
-
</button>
|
|
120
|
+
</ui-button>
|
|
121
121
|
</DocumentFragment>
|
|
122
122
|
`;
|
|
123
123
|
|
|
124
124
|
exports[`component:<Button> prop:squared 1`] = `
|
|
125
125
|
<DocumentFragment>
|
|
126
|
-
<button
|
|
126
|
+
<ui-button
|
|
127
127
|
class="pressable button squared"
|
|
128
128
|
tabindex="0"
|
|
129
129
|
>
|
|
130
130
|
children
|
|
131
|
-
</button>
|
|
131
|
+
</ui-button>
|
|
132
132
|
</DocumentFragment>
|
|
133
133
|
`;
|
|
134
134
|
|
|
135
135
|
exports[`component:<Button> prop:tooltip 1`] = `
|
|
136
136
|
<DocumentFragment>
|
|
137
|
-
<
|
|
137
|
+
<ui-tooltip
|
|
138
138
|
class="container"
|
|
139
139
|
>
|
|
140
|
-
<button
|
|
140
|
+
<ui-button
|
|
141
141
|
class="pressable dispatcher button"
|
|
142
142
|
tabindex="0"
|
|
143
143
|
>
|
|
144
144
|
children
|
|
145
|
-
</button>
|
|
146
|
-
</
|
|
145
|
+
</ui-button>
|
|
146
|
+
</ui-tooltip>
|
|
147
147
|
</DocumentFragment>
|
|
148
148
|
`;
|
|
149
149
|
|
|
150
150
|
exports[`component:<Button> prop:transparent 1`] = `
|
|
151
151
|
<DocumentFragment>
|
|
152
|
-
<button
|
|
152
|
+
<ui-button
|
|
153
153
|
class="pressable button transparent"
|
|
154
154
|
tabindex="0"
|
|
155
155
|
>
|
|
156
156
|
children
|
|
157
|
-
</button>
|
|
157
|
+
</ui-button>
|
|
158
158
|
</DocumentFragment>
|
|
159
159
|
`;
|
|
160
160
|
|
|
161
161
|
exports[`component:<Button> prop:wide 1`] = `
|
|
162
162
|
<DocumentFragment>
|
|
163
|
-
<button
|
|
163
|
+
<ui-button
|
|
164
164
|
class="pressable button wide"
|
|
165
165
|
tabindex="0"
|
|
166
166
|
>
|
|
167
167
|
children
|
|
168
|
-
</button>
|
|
168
|
+
</ui-button>
|
|
169
169
|
</DocumentFragment>
|
|
170
170
|
`;
|
|
171
171
|
|
|
172
172
|
exports[`component:<Button> renders 1`] = `
|
|
173
173
|
<DocumentFragment>
|
|
174
|
-
<button
|
|
174
|
+
<ui-button
|
|
175
175
|
class="pressable button"
|
|
176
176
|
tabindex="0"
|
|
177
177
|
>
|
|
178
178
|
children
|
|
179
|
-
</button>
|
|
180
|
-
</DocumentFragment>
|
|
181
|
-
`;
|
|
182
|
-
|
|
183
|
-
exports[`component:<Button> tag 1`] = `
|
|
184
|
-
<DocumentFragment>
|
|
185
|
-
<ui_tag
|
|
186
|
-
class="pressable button"
|
|
187
|
-
tabindex="0"
|
|
188
|
-
>
|
|
189
|
-
children
|
|
190
|
-
</ui_tag>
|
|
179
|
+
</ui-button>
|
|
191
180
|
</DocumentFragment>
|
|
192
181
|
`;
|
|
193
182
|
|
|
194
183
|
exports[`component:<Button> testId 1`] = `
|
|
195
184
|
<DocumentFragment>
|
|
196
|
-
<button
|
|
185
|
+
<ui-button
|
|
197
186
|
class="pressable button"
|
|
198
187
|
data-testid="mirai"
|
|
199
188
|
tabindex="0"
|
|
200
189
|
>
|
|
201
190
|
children
|
|
202
|
-
</button>
|
|
191
|
+
</ui-button>
|
|
203
192
|
</DocumentFragment>
|
|
204
193
|
`;
|
|
@@ -50,6 +50,7 @@ var Month = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
50
50
|
var weekNumber = (0, _helpers2.getWeekNumber)(instance);
|
|
51
51
|
var testId = others.testId;
|
|
52
52
|
return /*#__PURE__*/_react.default.createElement(_primitives.View, {
|
|
53
|
+
tag: "calendar-month",
|
|
53
54
|
ref: ref,
|
|
54
55
|
className: (0, _helpers.styles)(_CalendarModule.default.month, others.className)
|
|
55
56
|
}, /*#__PURE__*/_react.default.createElement(_primitives.View, {
|