@mirai/ui 1.0.215 → 1.0.217
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 -1
- package/build/components/Action/Action.js.map +1 -1
- package/build/components/Action/Action.module.css +5 -5
- package/build/components/Action/__tests__/__snapshots__/Action.test.js.snap +15 -15
- package/build/components/Button/Button.js +1 -1
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/Button/Button.module.css +16 -10
- package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +15 -15
- package/build/components/Calendar/Calendar.Week.js +1 -1
- package/build/components/Calendar/Calendar.Week.js.map +1 -1
- package/build/components/Calendar/Calendar.js +1 -1
- package/build/components/Calendar/Calendar.js.map +1 -1
- package/build/components/Calendar/Calendar.module.css +7 -6
- package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +2010 -2010
- package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +1 -1
- package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +7 -7
- package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +24 -24
- package/build/components/InputPhone/InputPhone.js +2 -2
- package/build/components/InputPhone/InputPhone.js.map +1 -1
- package/build/components/InputPhone/__tests__/__snapshots__/InputPhone.test.js.snap +40 -40
- package/build/components/InputText/InputText.js +2 -2
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/InputText.module.css +7 -3
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +16 -16
- package/build/components/Menu/Menu.Option.js +1 -1
- package/build/components/Menu/Menu.Option.js.map +1 -1
- package/build/components/Menu/Menu.module.css +3 -3
- package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +12 -12
- package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +3 -3
- package/build/components/Notification/Notification.js +1 -1
- package/build/components/Notification/Notification.js.map +1 -1
- package/build/components/Notification/Notification.module.css +10 -7
- package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +6 -6
- package/build/components/Table/Table.Row.js +1 -1
- package/build/components/Table/Table.Row.js.map +1 -1
- package/build/components/Table/Table.module.css +6 -2
- package/build/components/Table/__tests__/__snapshots__/Table.ColumnFilter.test.js.snap +36 -36
- package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +141 -39
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/components/Tooltip/Tooltip.js.map +1 -1
- package/build/components/Tooltip/Tooltip.module.css +5 -5
- package/build/components/Tooltip/__tests__/__snapshots__/Tooltip.test.jsx.snap +12 -12
- package/build/primitives/Checkbox/Checkbox.module.css +2 -1
- package/build/primitives/Layer/Layer.module.css +1 -4
- package/build/primitives/Layer/__tests__/__snapshots__/Layer.test.js.snap +6 -6
- package/build/primitives/Radio/Radio.module.css +2 -2
- package/build/primitives/Select/Select.module.css +5 -1
- package/build/primitives/Switch/Switch.module.css +5 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ exports[`component:<Menu> prop:Template 1`] = `
|
|
|
10
10
|
<DocumentFragment>
|
|
11
11
|
<span>
|
|
12
12
|
<button
|
|
13
|
-
class="pressable button"
|
|
13
|
+
class="pressable button active default primary solid enabled"
|
|
14
14
|
>
|
|
15
15
|
Action
|
|
16
16
|
</button>
|
|
@@ -22,7 +22,7 @@ exports[`component:<Menu> prop:children 1`] = `
|
|
|
22
22
|
<DocumentFragment>
|
|
23
23
|
<span>
|
|
24
24
|
<button
|
|
25
|
-
class="pressable button"
|
|
25
|
+
class="pressable button active default primary solid enabled"
|
|
26
26
|
>
|
|
27
27
|
Action
|
|
28
28
|
</button>
|
|
@@ -34,7 +34,7 @@ exports[`component:<Menu> prop:options & visible 1`] = `
|
|
|
34
34
|
<DocumentFragment>
|
|
35
35
|
<span>
|
|
36
36
|
<button
|
|
37
|
-
class="pressable button"
|
|
37
|
+
class="pressable button active default primary solid enabled"
|
|
38
38
|
>
|
|
39
39
|
Action
|
|
40
40
|
</button>
|
|
@@ -47,7 +47,7 @@ exports[`component:<Menu> prop:options & visible 1`] = `
|
|
|
47
47
|
class="menu visible"
|
|
48
48
|
>
|
|
49
49
|
<div
|
|
50
|
-
class="pressable option divider"
|
|
50
|
+
class="pressable option divider enabled"
|
|
51
51
|
>
|
|
52
52
|
<div
|
|
53
53
|
class="view row wide content"
|
|
@@ -60,7 +60,7 @@ exports[`component:<Menu> prop:options & visible 1`] = `
|
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
62
62
|
<div
|
|
63
|
-
class="pressable option value"
|
|
63
|
+
class="pressable option value enabled"
|
|
64
64
|
>
|
|
65
65
|
<div
|
|
66
66
|
class="view row wide content"
|
|
@@ -129,7 +129,7 @@ exports[`component:<Menu> prop:options & visible 1`] = `
|
|
|
129
129
|
</div>
|
|
130
130
|
</div>
|
|
131
131
|
<div
|
|
132
|
-
class="pressable option value divider"
|
|
132
|
+
class="pressable option value divider enabled"
|
|
133
133
|
>
|
|
134
134
|
<div
|
|
135
135
|
class="view row wide content"
|
|
@@ -142,7 +142,7 @@ exports[`component:<Menu> prop:options & visible 1`] = `
|
|
|
142
142
|
</div>
|
|
143
143
|
</div>
|
|
144
144
|
<div
|
|
145
|
-
class="pressable option value"
|
|
145
|
+
class="pressable option value enabled"
|
|
146
146
|
>
|
|
147
147
|
<div
|
|
148
148
|
class="view row wide content"
|
|
@@ -153,20 +153,20 @@ exports[`component:<Menu> prop:options & visible 1`] = `
|
|
|
153
153
|
Item 4
|
|
154
154
|
</span>
|
|
155
155
|
<button
|
|
156
|
-
class="pressable button small"
|
|
156
|
+
class="pressable button active small default primary solid enabled"
|
|
157
157
|
>
|
|
158
158
|
Add
|
|
159
159
|
</button>
|
|
160
160
|
</div>
|
|
161
161
|
</div>
|
|
162
162
|
<div
|
|
163
|
-
class="pressable option"
|
|
163
|
+
class="pressable option enabled"
|
|
164
164
|
>
|
|
165
165
|
<div
|
|
166
166
|
class="view row wide content"
|
|
167
167
|
>
|
|
168
168
|
<button
|
|
169
|
-
class="pressable button"
|
|
169
|
+
class="pressable button active default primary solid enabled"
|
|
170
170
|
>
|
|
171
171
|
Add
|
|
172
172
|
</button>
|
|
@@ -181,7 +181,7 @@ exports[`component:<Menu> prop:options 1`] = `
|
|
|
181
181
|
<DocumentFragment>
|
|
182
182
|
<span>
|
|
183
183
|
<button
|
|
184
|
-
class="pressable button"
|
|
184
|
+
class="pressable button active default primary solid enabled"
|
|
185
185
|
>
|
|
186
186
|
Action
|
|
187
187
|
</button>
|
|
@@ -193,7 +193,7 @@ exports[`component:<Menu> prop:title 1`] = `
|
|
|
193
193
|
<DocumentFragment>
|
|
194
194
|
<span>
|
|
195
195
|
<button
|
|
196
|
-
class="pressable button"
|
|
196
|
+
class="pressable button active default primary solid enabled"
|
|
197
197
|
>
|
|
198
198
|
Action
|
|
199
199
|
</button>
|
|
@@ -15,7 +15,7 @@ exports[`component:<Modal> Mobile environment prop:onClose 1`] = `
|
|
|
15
15
|
class="view forceRow header"
|
|
16
16
|
>
|
|
17
17
|
<button
|
|
18
|
-
class="pressable button small squared transparent button"
|
|
18
|
+
class="pressable button active small squared primary transparent enabled button"
|
|
19
19
|
data-testid="mirai-onClose-button-close"
|
|
20
20
|
>
|
|
21
21
|
<span
|
|
@@ -120,7 +120,7 @@ exports[`component:<Modal> prop:onBack 1`] = `
|
|
|
120
120
|
class="view forceRow header"
|
|
121
121
|
>
|
|
122
122
|
<button
|
|
123
|
-
class="pressable button small squared transparent"
|
|
123
|
+
class="pressable button active small squared primary transparent enabled"
|
|
124
124
|
data-testid="mirai-onBack-button-back"
|
|
125
125
|
>
|
|
126
126
|
<span
|
|
@@ -166,7 +166,7 @@ exports[`component:<Modal> prop:onClose 1`] = `
|
|
|
166
166
|
class="view forceRow header"
|
|
167
167
|
>
|
|
168
168
|
<button
|
|
169
|
-
class="pressable button small squared transparent button"
|
|
169
|
+
class="pressable button active small squared primary transparent enabled button"
|
|
170
170
|
data-testid="mirai-onClose-button-close"
|
|
171
171
|
>
|
|
172
172
|
<span
|
|
@@ -30,7 +30,7 @@ var Notification = function Notification(_ref) {
|
|
|
30
30
|
return /*#__PURE__*/_react.default.createElement(_primitives.View, _extends({}, others, {
|
|
31
31
|
row: true,
|
|
32
32
|
role: others.role || 'notification',
|
|
33
|
-
className: (0, _helpers.styles)(_NotificationModule.default.notification, error ? _NotificationModule.default.error : warning ? _NotificationModule.default.warning : success ? _NotificationModule.default.success : info ? _NotificationModule.default.info : undefined, inline ? _NotificationModule.default.inline : _NotificationModule.default.outlined,
|
|
33
|
+
className: (0, _helpers.styles)(_NotificationModule.default.notification, error ? _NotificationModule.default.error : warning ? _NotificationModule.default.warning : success ? _NotificationModule.default.success : info ? _NotificationModule.default.info : undefined, inline ? _NotificationModule.default.inline : _NotificationModule.default.outlined, large ? _NotificationModule.default.large : small && _NotificationModule.default.small, wide && _NotificationModule.default.wide, others.className)
|
|
34
34
|
}), /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
|
|
35
35
|
headline: large,
|
|
36
36
|
level: large ? 1 : undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.js","names":["Notification","children","error","info","inline","large","small","success","warning","wide","onClose","others","role","styles","style","notification","undefined","outlined","className","getIconState","icon","text","pressable","testId","ICON","CLOSE","displayName","propTypes","PropTypes","any","isRequired","bool","func"],"sources":["../../../src/components/Notification/Notification.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { getIconState, styles } from '../../helpers';\nimport { Icon, ICON, Pressable, Text, View } from '../../primitives';\nimport style from './Notification.module.css';\n\nconst Notification = ({\n children,\n error,\n info,\n inline = false,\n large,\n small,\n success,\n warning,\n wide,\n onClose,\n ...others\n}) => (\n <View\n {...others}\n row\n role={others.role || 'notification'}\n className={styles(\n style.notification,\n error ? style.error : warning ? style.warning : success ? style.success : info ? style.info : undefined,\n inline ? style.inline : style.outlined,\n
|
|
1
|
+
{"version":3,"file":"Notification.js","names":["Notification","children","error","info","inline","large","small","success","warning","wide","onClose","others","role","styles","style","notification","undefined","outlined","className","getIconState","icon","text","pressable","testId","ICON","CLOSE","displayName","propTypes","PropTypes","any","isRequired","bool","func"],"sources":["../../../src/components/Notification/Notification.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { getIconState, styles } from '../../helpers';\nimport { Icon, ICON, Pressable, Text, View } from '../../primitives';\nimport style from './Notification.module.css';\n\nconst Notification = ({\n children,\n error,\n info,\n inline = false,\n large,\n small,\n success,\n warning,\n wide,\n onClose,\n ...others\n}) => (\n <View\n {...others}\n row\n role={others.role || 'notification'}\n className={styles(\n style.notification,\n error ? style.error : warning ? style.warning : success ? style.success : info ? style.info : undefined,\n inline ? style.inline : style.outlined,\n large ? style.large : small && style.small,\n wide && style.wide,\n others.className,\n )}\n >\n <Icon\n headline={large}\n level={large ? 1 : undefined}\n paragraph={small}\n value={getIconState({ error, success, warning })}\n className={style.icon}\n />\n <Text\n small={small}\n className={styles(\n style.text,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n )}\n >\n {children}\n </Text>\n {!large && onClose && (\n <Pressable\n onPress={onClose}\n className={styles(style.pressable, style.icon)}\n testId={others.testId ? `${others.testId}-button-close` : undefined}\n >\n <Icon value={ICON.CLOSE} paragraph={small} />\n </Pressable>\n )}\n </View>\n);\n\nNotification.displayName = 'Component:Notification';\n\nNotification.propTypes = {\n children: PropTypes.any.isRequired,\n error: PropTypes.bool,\n info: PropTypes.bool,\n inline: PropTypes.bool,\n large: PropTypes.bool,\n small: PropTypes.bool,\n success: PropTypes.bool,\n warning: PropTypes.bool,\n wide: PropTypes.bool,\n onClose: PropTypes.func,\n};\n\nexport { Notification };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AAA8C;AAAA;AAAA;AAAA;AAAA;AAE9C,IAAMA,YAAY,GAAG,SAAfA,YAAY;EAAA,IAChBC,QAAQ,QAARA,QAAQ;IACRC,KAAK,QAALA,KAAK;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O,GAAGM,2BAAK,CAACN,OAAO,GAAGD,OAAO,GAAGO,2BAAK,CAACP,OAAO,GAAGS,SAAS;EACnF,GAEDf,QAAQ,CACJ,EACN,CAACI,KAAK,IAAIK,OAAO,iBAChB,6BAAC,qBAAS;IACR,OAAO,EAAEA,OAAQ;IACjB,SAAS,EAAE,IAAAG,eAAM,EAACC,2BAAK,CAACQ,SAAS,EAAER,2BAAK,CAACM,IAAI,CAAE;IAC/C,MAAM,EAAET,MAAM,CAACY,MAAM,aAAMZ,MAAM,CAACY,MAAM,qBAAkBP;EAAU,gBAEpE,6BAAC,gBAAI;IAAC,KAAK,EAAEQ,gBAAI,CAACC,KAAM;IAAC,SAAS,EAAEnB;EAAM,EAAG,CAEhD,CACI;AAAA,CACR;AAAC;AAEFN,YAAY,CAAC0B,WAAW,GAAG,wBAAwB;AAEnD1B,YAAY,CAAC2B,SAAS,GAAG;EACvB1B,QAAQ,EAAE2B,kBAAS,CAACC,GAAG,CAACC,UAAU;EAClC5B,KAAK,EAAE0B,kBAAS,CAACG,IAAI;EACrB5B,IAAI,EAAEyB,kBAAS,CAACG,IAAI;EACpB3B,MAAM,EAAEwB,kBAAS,CAACG,IAAI;EACtB1B,KAAK,EAAEuB,kBAAS,CAACG,IAAI;EACrBzB,KAAK,EAAEsB,kBAAS,CAACG,IAAI;EACrBxB,OAAO,EAAEqB,kBAAS,CAACG,IAAI;EACvBvB,OAAO,EAAEoB,kBAAS,CAACG,IAAI;EACvBtB,IAAI,EAAEmB,kBAAS,CAACG,IAAI;EACpBrB,OAAO,EAAEkB,kBAAS,CAACI;AACrB,CAAC"}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
color: var(--mirai-ui-content);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.notification.success
|
|
34
|
+
.notification.success.outlined {
|
|
35
35
|
background-color: var(--mirai-ui-success-background);
|
|
36
36
|
border-color: var(--mirai-ui-success-border);
|
|
37
37
|
}
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
color: var(--mirai-ui-success);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
.notification.error
|
|
43
|
+
.notification.error.outlined {
|
|
44
44
|
background-color: var(--mirai-ui-error-background);
|
|
45
45
|
border-color: var(--mirai-ui-error-border);
|
|
46
46
|
}
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
color: var(--mirai-ui-error);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.notification.warning
|
|
52
|
+
.notification.warning.outlined {
|
|
53
53
|
background-color: var(--mirai-ui-warning-background);
|
|
54
54
|
border-color: var(--mirai-ui-warning-border);
|
|
55
55
|
}
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
color: var(--mirai-ui-warning);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.notification.info
|
|
61
|
+
.notification.info.outlined {
|
|
62
62
|
background-color: var(--mirai-ui-info-background);
|
|
63
63
|
border-color: var(--mirai-ui-info-border);
|
|
64
64
|
}
|
|
@@ -67,12 +67,14 @@
|
|
|
67
67
|
color: var(--mirai-ui-info);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.notification
|
|
70
|
+
.notification .text {
|
|
71
71
|
margin-left: var(--mirai-ui-notification-padding);
|
|
72
72
|
margin-right: var(--mirai-ui-notification-padding);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.notification.large .text {
|
|
76
|
+
margin-left: var(--mirai-ui-notification-padding);
|
|
77
|
+
margin-right: var(--mirai-ui-notification-padding);
|
|
76
78
|
margin-top: var(--mirai-ui-notification-padding-large);
|
|
77
79
|
text-align: center;
|
|
78
80
|
}
|
|
@@ -86,11 +88,11 @@
|
|
|
86
88
|
flex: 1;
|
|
87
89
|
}
|
|
88
90
|
|
|
89
|
-
.notification.large
|
|
91
|
+
.notification.large.inline .text {
|
|
90
92
|
color: var(--mirai-ui-content);
|
|
91
93
|
}
|
|
92
94
|
|
|
93
|
-
.notification
|
|
95
|
+
.notification .icon {
|
|
94
96
|
margin-top: calc(calc(var(--mirai-ui-line-height-headline-3) - var(--mirai-ui-font-size-headline-3)) / 2);
|
|
95
97
|
}
|
|
96
98
|
|
|
@@ -98,6 +100,7 @@
|
|
|
98
100
|
font-size: var(--mirai-ui-space-XL);
|
|
99
101
|
line-height: var(--mirai-ui-space-XL);
|
|
100
102
|
height: var(--mirai-ui-space-XL);
|
|
103
|
+
margin-top: 0;
|
|
101
104
|
width: var(--mirai-ui-space-XL);
|
|
102
105
|
}
|
|
103
106
|
|
|
@@ -73,7 +73,7 @@ exports[`component:<Notification> prop:error 1`] = `
|
|
|
73
73
|
exports[`component:<Notification> prop:info & inline 1`] = `
|
|
74
74
|
<DocumentFragment>
|
|
75
75
|
<div
|
|
76
|
-
class="view row notification info inline
|
|
76
|
+
class="view row notification info inline"
|
|
77
77
|
>
|
|
78
78
|
<span
|
|
79
79
|
class="icon headline-3 icon"
|
|
@@ -213,7 +213,7 @@ exports[`component:<Notification> prop:info 1`] = `
|
|
|
213
213
|
exports[`component:<Notification> prop:inline 1`] = `
|
|
214
214
|
<DocumentFragment>
|
|
215
215
|
<div
|
|
216
|
-
class="view row notification inline
|
|
216
|
+
class="view row notification inline"
|
|
217
217
|
>
|
|
218
218
|
<span
|
|
219
219
|
class="icon headline-3 icon"
|
|
@@ -248,7 +248,7 @@ exports[`component:<Notification> prop:inline 1`] = `
|
|
|
248
248
|
exports[`component:<Notification> prop:large & prop:inline 1`] = `
|
|
249
249
|
<DocumentFragment>
|
|
250
250
|
<div
|
|
251
|
-
class="view row notification inline
|
|
251
|
+
class="view row notification inline large"
|
|
252
252
|
>
|
|
253
253
|
<span
|
|
254
254
|
class="icon headline-1 icon"
|
|
@@ -380,7 +380,7 @@ exports[`component:<Notification> prop:onClose 1`] = `
|
|
|
380
380
|
exports[`component:<Notification> prop:small & prop:inline 1`] = `
|
|
381
381
|
<DocumentFragment>
|
|
382
382
|
<div
|
|
383
|
-
class="view row notification inline
|
|
383
|
+
class="view row notification inline small"
|
|
384
384
|
>
|
|
385
385
|
<span
|
|
386
386
|
class="icon paragraph icon"
|
|
@@ -450,7 +450,7 @@ exports[`component:<Notification> prop:small 1`] = `
|
|
|
450
450
|
exports[`component:<Notification> prop:success & inline 1`] = `
|
|
451
451
|
<DocumentFragment>
|
|
452
452
|
<div
|
|
453
|
-
class="view row notification success inline
|
|
453
|
+
class="view row notification success inline"
|
|
454
454
|
>
|
|
455
455
|
<span
|
|
456
456
|
class="icon headline-3 icon"
|
|
@@ -590,7 +590,7 @@ exports[`component:<Notification> prop:success 1`] = `
|
|
|
590
590
|
exports[`component:<Notification> prop:warning & inline 1`] = `
|
|
591
591
|
<DocumentFragment>
|
|
592
592
|
<div
|
|
593
|
-
class="view row notification warning inline
|
|
593
|
+
class="view row notification warning inline"
|
|
594
594
|
>
|
|
595
595
|
<span
|
|
596
596
|
class="icon headline-3 icon"
|
|
@@ -64,7 +64,7 @@ var Row = function Row(_ref) {
|
|
|
64
64
|
return /*#__PURE__*/_react.default.createElement(_primitives.Primitive, _extends({
|
|
65
65
|
tag: "tr"
|
|
66
66
|
}, others, {
|
|
67
|
-
className: (0, _helpers.styles)(checked
|
|
67
|
+
className: (0, _helpers.styles)(checked ? _TableModule.default.selected : _TableModule.default.notSelected, onPress && _TableModule.default.onPress)
|
|
68
68
|
}), Object.keys(schema).filter(function (field) {
|
|
69
69
|
return !schema[field].hidden;
|
|
70
70
|
}).map(function (field, index) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.Row.js","names":["CUSTOM_EVENT_TYPES","Row","checked","dataSource","indeterminate","l10n","schema","sort","onFilter","onPress","onSelect","onSort","others","useState","focus","setFocus","isHead","undefined","testId","handlePress","field","event","target","type","includes","handleFocus","handleSelect","preventDefault","styles","style","selected","Object","keys","filter","hidden","map","index","hasFilter","label","hasSort","tooltip","fieldFilter","bind","React","createElement","Primitive","tag","key","onClick","column","selectable","value","checkbox","icons","ICON","UP","DOWN","icon","disabled","displayName","propTypes","PropTypes","bool","shape","L10N_SHAPE","isRequired","func"],"sources":["../../../src/components/Table/Table.Row.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, ICON, Primitive, View } from '../../primitives';\nimport { InputOption } from '../InputOption';\nimport { Tooltip } from '../Tooltip';\nimport { ColumnFilter } from './Table.ColumnFilter';\nimport { L10N_SHAPE } from './Table.constants';\nimport style from './Table.module.css';\n\nconst CUSTOM_EVENT_TYPES = ['button', 'checkbox', 'input', 'radio', 'submit'];\n\nconst Row = ({\n checked,\n dataSource,\n indeterminate,\n l10n,\n schema,\n sort = {},\n onFilter,\n onPress,\n onSelect,\n onSort,\n ...others\n}) => {\n const [focus, setFocus] = useState();\n\n const isHead = dataSource === undefined;\n const { testId } = others;\n\n const handlePress = (field, event) => {\n const { target: { type } = {} } = event;\n if (CUSTOM_EVENT_TYPES.includes(type)) return;\n\n isHead ? onSort(field) : onPress ? onPress(dataSource, event) : undefined;\n };\n\n const handleFocus = (field) => {\n setFocus(field);\n };\n\n const handleSelect = (dataSource, event) => {\n event.preventDefault();\n onSelect(dataSource, event);\n };\n\n return (\n <Primitive
|
|
1
|
+
{"version":3,"file":"Table.Row.js","names":["CUSTOM_EVENT_TYPES","Row","checked","dataSource","indeterminate","l10n","schema","sort","onFilter","onPress","onSelect","onSort","others","useState","focus","setFocus","isHead","undefined","testId","handlePress","field","event","target","type","includes","handleFocus","handleSelect","preventDefault","styles","style","selected","notSelected","Object","keys","filter","hidden","map","index","hasFilter","label","hasSort","tooltip","fieldFilter","bind","React","createElement","Primitive","tag","key","onClick","column","selectable","value","checkbox","icons","ICON","UP","DOWN","icon","disabled","displayName","propTypes","PropTypes","bool","shape","L10N_SHAPE","isRequired","func"],"sources":["../../../src/components/Table/Table.Row.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, ICON, Primitive, View } from '../../primitives';\nimport { InputOption } from '../InputOption';\nimport { Tooltip } from '../Tooltip';\nimport { ColumnFilter } from './Table.ColumnFilter';\nimport { L10N_SHAPE } from './Table.constants';\nimport style from './Table.module.css';\n\nconst CUSTOM_EVENT_TYPES = ['button', 'checkbox', 'input', 'radio', 'submit'];\n\nconst Row = ({\n checked,\n dataSource,\n indeterminate,\n l10n,\n schema,\n sort = {},\n onFilter,\n onPress,\n onSelect,\n onSort,\n ...others\n}) => {\n const [focus, setFocus] = useState();\n\n const isHead = dataSource === undefined;\n const { testId } = others;\n\n const handlePress = (field, event) => {\n const { target: { type } = {} } = event;\n if (CUSTOM_EVENT_TYPES.includes(type)) return;\n\n isHead ? onSort(field) : onPress ? onPress(dataSource, event) : undefined;\n };\n\n const handleFocus = (field) => {\n setFocus(field);\n };\n\n const handleSelect = (dataSource, event) => {\n event.preventDefault();\n onSelect(dataSource, event);\n };\n\n return (\n <Primitive\n tag=\"tr\"\n {...others}\n className={styles(checked ? style.selected : style.notSelected, onPress && style.onPress)}\n >\n {Object.keys(schema)\n .filter((field) => !schema[field].hidden)\n .map((field, index) => {\n const { filter: hasFilter = true, label, sort: hasSort = true, tooltip, type = 'text' } = schema[field];\n const fieldFilter = schema[field]?.bind || field;\n\n return React.createElement(\n Primitive,\n {\n tag: isHead ? 'th' : 'td',\n testId: testId ? `${testId}-${field}` : undefined,\n key: field,\n onClick: !isHead || hasSort ? (event) => handlePress(field, event) : undefined,\n },\n <View\n forceRow\n tag=\"span\"\n className={styles(\n style.column,\n onSelect && index === 0 && style.selectable,\n !isHead && !(onSelect && index === 0) && style[type],\n )}\n >\n {onSelect && index === 0 && (\n <InputOption\n checked={checked}\n indeterminate={indeterminate}\n name=\"checkbox\"\n onChange={(value, event) => handleSelect(dataSource, event)}\n className={style.checkbox}\n testId={testId ? `${testId}-checkbox` : undefined}\n />\n )}\n\n {isHead ? (\n tooltip ? (\n <Tooltip text={tooltip}>\n <Primitive className={style.tooltip}>{label}</Primitive>\n </Tooltip>\n ) : (\n label\n )\n ) : (\n dataSource[field]\n )}\n\n {isHead && ((onSort && hasSort) || (onFilter && hasFilter)) && (\n <View row className={style.icons}>\n {onSort && hasSort && (\n <Icon\n value={sort[field] === false ? ICON.UP : ICON.DOWN}\n className={styles(style.icon, sort[field] === undefined && style.disabled)}\n />\n )}\n {onFilter && hasFilter && (\n <ColumnFilter\n field={fieldFilter}\n l10n={l10n}\n schema={schema}\n visible={fieldFilter === focus}\n onFocus={handleFocus}\n onSubmit={onFilter}\n />\n )}\n </View>\n )}\n </View>,\n );\n })}\n </Primitive>\n );\n};\n\nRow.displayName = 'Component:Table:Row';\n\nRow.propTypes = {\n checked: PropTypes.bool,\n dataSource: PropTypes.shape({}),\n indeterminate: PropTypes.bool,\n l10n: L10N_SHAPE,\n schema: PropTypes.shape({}).isRequired,\n sort: PropTypes.shape({}),\n onFilter: PropTypes.func,\n onPress: PropTypes.func,\n onSelect: PropTypes.func,\n onSort: PropTypes.func,\n};\n\nexport { Row };\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAuC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEvC,IAAMA,kBAAkB,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC;AAE7E,IAAMC,GAAG,GAAG,SAANA,GAAG,OAYH;EAAA,IAXJC,OAAO,QAAPA,OAAO;IACPC,UAAU,QAAVA,UAAU;IACVC,aAAa,QAAbA,aAAa;IACbC,IAAI,QAAJA,IAAI;IACJC,MAAM,QAANA,MAAM;IAAA,iBACNC,IAAI;IAAJA,IAAI,0BAAG,CAAC,CAAC;IACTC,QAAQ,QAARA,QAAQ;IACRC,OAAO,QAAPA,OAAO;IACPC,QAAQ,QAARA,QAAQ;IACRC,MAAM,QAANA,MAAM;IACHC,MAAM;EAET,gBAA0B,IAAAC,eAAQ,GAAE;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EAAE4D,kBAAU;EAChB3D,MAAM,EAAEwD,kBAAS,CAACE,KAAK,CAAC,CAAC,CAAC,CAAC,CAACE,UAAU;EACtC3D,IAAI,EAAEuD,kBAAS,CAACE,KAAK,CAAC,CAAC,CAAC,CAAC;EACzBxD,QAAQ,EAAEsD,kBAAS,CAACK,IAAI;EACxB1D,OAAO,EAAEqD,kBAAS,CAACK,IAAI;EACvBzD,QAAQ,EAAEoD,kBAAS,CAACK,IAAI;EACxBxD,MAAM,EAAEmD,kBAAS,CAACK;AACpB,CAAC"}
|
|
@@ -50,10 +50,14 @@
|
|
|
50
50
|
background-color: var(--mirai-ui-table-selected-background);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.table tbody tr
|
|
53
|
+
.table tbody tr {
|
|
54
54
|
border-bottom: solid var(--mirai-ui-border-width) var(--mirai-ui-table-border-color);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
.table tbody tr:last-child {
|
|
58
|
+
border-bottom: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
57
61
|
.table th {
|
|
58
62
|
user-select: none;
|
|
59
63
|
}
|
|
@@ -172,7 +176,7 @@
|
|
|
172
176
|
cursor: pointer;
|
|
173
177
|
}
|
|
174
178
|
|
|
175
|
-
.table tbody tr:hover.onPress
|
|
179
|
+
.table tbody tr:hover.onPress.notSelected td:first-child {
|
|
176
180
|
background-color: var(--mirai-ui-table-selected-background);
|
|
177
181
|
}
|
|
178
182
|
|