@mirai/ui 1.0.20 → 1.0.21

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.
Files changed (24) hide show
  1. package/build/components/Button/Button.module.css +17 -24
  2. package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +2 -22
  3. package/build/components/Calendar/Calendar.module.css +6 -6
  4. package/build/components/InputNumber/InputNumber.js +3 -1
  5. package/build/components/InputNumber/InputNumber.js.map +1 -1
  6. package/build/components/InputNumber/InputNumber.module.css +2 -2
  7. package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +29 -29
  8. package/build/components/InputOption/InputOption.module.css +1 -1
  9. package/build/components/InputText/InputText.module.css +4 -4
  10. package/build/components/Notification/Notification.js +3 -3
  11. package/build/components/Notification/Notification.js.map +1 -1
  12. package/build/components/Notification/Notification.module.css +30 -22
  13. package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +12 -12
  14. package/build/components/Table/Table.module.css +4 -4
  15. package/build/primitives/Checkbox/Checkbox.module.css +2 -2
  16. package/build/primitives/Input/Input.module.css +1 -1
  17. package/build/primitives/Radio/Radio.module.css +2 -2
  18. package/build/primitives/Switch/Switch.module.css +2 -2
  19. package/build/primitives/Text/Text.js +6 -4
  20. package/build/primitives/Text/Text.js.map +1 -1
  21. package/build/primitives/Text/Text.module.css +8 -0
  22. package/build/primitives/Text/__tests__/__snapshots__/Text.test.js.snap +10 -0
  23. package/build/theme/default.theme.css +39 -22
  24. package/package.json +1 -1
@@ -3,12 +3,15 @@
3
3
  --mirai-ui-button-color: var(--mirai-ui-base);
4
4
  --mirai-ui-button-color-active: rgba(255, 255, 255, 0.2);
5
5
  --mirai-ui-button-color-focus: var(--mirai-ui-content);
6
- --mirai-ui-button-disabled-background: var(--mirai-ui-content-300);
7
- --mirai-ui-button-disabled-color: var(--mirai-ui-content-400);
6
+ --mirai-ui-button-disabled-background: var(--mirai-ui-content-border);
7
+ --mirai-ui-button-disabled-color: var(--mirai-ui-content-light);
8
+ --mirai-ui-button-font: var(--mirai-ui-font);
9
+ --mirai-ui-button-font-weight: var(--mirai-ui-font-weight);
8
10
  --mirai-ui-button-outlined-background: var(--mirai-ui-base);
9
- --mirai-ui-button-padding-x: var(--mirai-ui-space-S);
10
- --mirai-ui-button-padding-y: var(--mirai-ui-space-L);
11
+ --mirai-ui-button-padding-y: var(--mirai-ui-space-S);
12
+ --mirai-ui-button-padding-x: var(--mirai-ui-space-L);
11
13
  --mirai-ui-button-radius: var(--mirai-ui-border-radius);
14
+ --mirai-ui-button-squared: calc(var(--mirai-ui-space-M) * 2);
12
15
  }
13
16
 
14
17
  .button {
@@ -17,11 +20,11 @@
17
20
  border-radius: var(--mirai-ui-button-radius);
18
21
  color: var(--mirai-ui-button-color);
19
22
  display: flex;
20
- font-family: var(--mirai-ui-font);
23
+ font-family: var(--mirai-ui-button-font);
21
24
  font-size: var(--mirai-ui-font-size-action);
22
- font-weight: var(--mirai-ui-font-bold-weight);
25
+ font-weight: var(--mirai-ui-button-font-weight);
23
26
  justify-content: center;
24
- padding: var(--mirai-ui-button-padding-x) var(--mirai-ui-button-padding-y);
27
+ padding: var(--mirai-ui-button-padding-y) var(--mirai-ui-button-padding-x);
25
28
  transition: background-color var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing),
26
29
  box-shadow var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing),
27
30
  color var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
@@ -34,8 +37,8 @@
34
37
  }
35
38
 
36
39
  .outlined {
37
- border: solid 1px var(--mirai-ui-button-background);
38
40
  background-color: var(--mirai-ui-button-outlined-background);
41
+ border: solid 1px var(--mirai-ui-button-background);
39
42
  color: var(--mirai-ui-button-background);
40
43
  }
41
44
 
@@ -45,11 +48,13 @@
45
48
 
46
49
  .large:not(.squared) {
47
50
  font-size: var(--mirai-ui-font-size-headline);
51
+ padding: var(--mirai-ui-button-padding-y)
52
+ calc(var(--mirai-ui-button-padding-x) + calc(var(--mirai-ui-button-padding-y) / 2));
48
53
  }
49
54
 
50
55
  .small:not(.squared) {
51
56
  font-size: var(--mirai-ui-font-size-small);
52
- padding: calc(var(--mirai-ui-button-padding-x) / 2) calc(var(--mirai-ui-button-padding-y) / 2);
57
+ padding: var(--mirai-ui-button-padding-y) calc(var(--mirai-ui-button-padding-x) / 2);
53
58
  }
54
59
 
55
60
  .rounded {
@@ -57,22 +62,10 @@
57
62
  }
58
63
 
59
64
  .squared {
65
+ height: var(--mirai-ui-button-squared);
60
66
  padding: 0;
61
- height: var(--mirai-ui-space-XL);
62
- min-width: var(--mirai-ui-space-XL);
63
- width: var(--mirai-ui-space-XL);
64
- }
65
-
66
- .squared.small {
67
- height: var(--mirai-ui-space-L);
68
- min-width: var(--mirai-ui-space-L);
69
- width: var(--mirai-ui-space-L);
70
- }
71
-
72
- .squared.large {
73
- height: var(--mirai-ui-space-XXL);
74
- min-width: var(--mirai-ui-space-XXL);
75
- width: var(--mirai-ui-space-XXL);
67
+ min-width: var(--mirai-ui-button-squared);
68
+ width: var(--mirai-ui-button-squared);
76
69
  }
77
70
 
78
71
  @media only screen and (max-width: 600px) {
@@ -1,15 +1,5 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[` 1`] = `
4
- <DocumentFragment>
5
- <button
6
- class="pressable button squared"
7
- >
8
- children
9
- </button>
10
- </DocumentFragment>
11
- `;
12
-
13
3
  exports[`component:<Button> inherit:className 1`] = `
14
4
  <DocumentFragment>
15
5
  <button
@@ -61,20 +51,10 @@ exports[`component:<Button> prop:small 1`] = `
61
51
  </DocumentFragment>
62
52
  `;
63
53
 
64
- exports[`component:<Button> prop:squared & large 1`] = `
54
+ exports[`component:<Button> prop:squared 1`] = `
65
55
  <DocumentFragment>
66
56
  <button
67
- class="pressable button large squared"
68
- >
69
- children
70
- </button>
71
- </DocumentFragment>
72
- `;
73
-
74
- exports[`component:<Button> prop:squared & small 1`] = `
75
- <DocumentFragment>
76
- <button
77
- class="pressable button small squared"
57
+ class="pressable button squared"
78
58
  >
79
59
  children
80
60
  </button>
@@ -1,11 +1,11 @@
1
1
  :root {
2
- --mirai-ui-calendar-cell: calc(var(--mirai-ui-space-XL) + var(--mirai-ui-space-S));
2
+ --mirai-ui-calendar-cell: var(--mirai-ui-space-XL);
3
3
  --mirai-ui-calendar-highlight-color: var(--mirai-ui-accent);
4
4
  --mirai-ui-calendar-week-margin: 2px;
5
- --mirai-ui-calendar-hover-background: var(--mirai-ui-accent-300);
5
+ --mirai-ui-calendar-hover-background: var(--mirai-ui-accent-background);
6
6
  --mirai-ui-calendar-selected-background: var(--mirai-ui-accent);
7
7
  --mirai-ui-calendar-selected-color: var(--mirai-ui-base);
8
- --mirai-ui-calendar-weekday-color: var(--mirai-ui-content-400);
8
+ --mirai-ui-calendar-weekday-color: var(--mirai-ui-content-light);
9
9
  }
10
10
 
11
11
  .scrollview {
@@ -66,7 +66,7 @@
66
66
  }
67
67
 
68
68
  .textDisabled {
69
- color: var(--mirai-ui-content-300);
69
+ color: var(--mirai-ui-content-border);
70
70
  }
71
71
 
72
72
  .textHighlight {
@@ -86,7 +86,7 @@
86
86
  }
87
87
 
88
88
  .caption.empty {
89
- color: var(--mirai-ui-content-300);
89
+ color: var(--mirai-ui-content-border);
90
90
  }
91
91
 
92
92
  @media only screen and (max-width: 600px) {
@@ -104,7 +104,7 @@
104
104
  }
105
105
 
106
106
  .weekdays {
107
- border-bottom: solid 1px var(--mirai-ui-content-300);
107
+ border-bottom: solid 1px var(--mirai-ui-content-border);
108
108
  }
109
109
  }
110
110
 
@@ -36,7 +36,7 @@ var InputNumber = function InputNumber(_ref) {
36
36
  min = _ref$min === void 0 ? 0 : _ref$min,
37
37
  name = _ref.name,
38
38
  _ref$rounded = _ref.rounded,
39
- rounded = _ref$rounded === void 0 ? false : _ref$rounded,
39
+ rounded = _ref$rounded === void 0 ? true : _ref$rounded,
40
40
  _ref$step = _ref.step,
41
41
  step = _ref$step === void 0 ? 1 : _ref$step,
42
42
  _ref$value = _ref.value,
@@ -51,6 +51,7 @@ var InputNumber = function InputNumber(_ref) {
51
51
  }), /*#__PURE__*/_react.default.createElement(_primitives.View, {
52
52
  className: _InputNumberModule.default.texts
53
53
  }, label && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
54
+ subheadline: true,
54
55
  className: disabled && _InputNumberModule.default.disabled
55
56
  }, label), hint && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
56
57
  small: true,
@@ -67,6 +68,7 @@ var InputNumber = function InputNumber(_ref) {
67
68
  }, /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
68
69
  name: "Minus"
69
70
  })), /*#__PURE__*/_react.default.createElement(_primitives.Text, {
71
+ headline: true,
70
72
  className: _InputNumberModule.default.value
71
73
  }, typeof value === 'number' ? value : min), /*#__PURE__*/_react.default.createElement(_Button.Button, {
72
74
  disabled: disabled || value >= max,
@@ -1 +1 @@
1
- {"version":3,"file":"InputNumber.js","names":["InputNumber","disabled","hint","label","max","min","name","rounded","step","value","onChange","others","style","inputNumber","className","texts","propTypes","PropTypes","bool","oneOfType","string","array","number","isRequired","func"],"sources":["../../../src/components/InputNumber/InputNumber.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, Text, View } from '../../primitives';\nimport { Button } from '../Button';\nimport style from './InputNumber.module.css';\n\nexport const InputNumber = ({\n disabled,\n hint,\n label,\n max,\n min = 0,\n name,\n rounded = false,\n step = 1,\n value = 0,\n onChange = () => {},\n ...others\n}) => (\n <View {...others} row className={styles(style.inputNumber, others.className)}>\n <View className={style.texts}>\n {label && <Text className={disabled && style.disabled}>{label}</Text>}\n {hint && (\n <Text small className={styles(style.hint, disabled && style.disabled)}>\n {hint}\n </Text>\n )}\n </View>\n <Button\n disabled={disabled || value <= min}\n outlined\n preventDefault\n rounded={rounded}\n squared\n onPress={() => onChange(value - step, name)}\n >\n <Icon name=\"Minus\" />\n </Button>\n <Text className={style.value}>{typeof value === 'number' ? value : min}</Text>\n <Button\n disabled={disabled || value >= max}\n outlined\n preventDefault\n rounded={rounded}\n squared\n onPress={() => onChange(value + step, name)}\n >\n <Icon name=\"Plus\" />\n </Button>\n </View>\n);\n\nInputNumber.propTypes = {\n disabled: PropTypes.bool,\n hint: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n label: PropTypes.string,\n max: PropTypes.number,\n min: PropTypes.number,\n name: PropTypes.string.isRequired,\n rounded: PropTypes.bool,\n step: PropTypes.number,\n value: PropTypes.number,\n onChange: PropTypes.func,\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEO,IAAMA,WAAW,GAAG,SAAdA,WAAc;EAAA,IACzBC,QADyB,QACzBA,QADyB;EAAA,IAEzBC,IAFyB,QAEzBA,IAFyB;EAAA,IAGzBC,KAHyB,QAGzBA,KAHyB;EAAA,IAIzBC,GAJyB,QAIzBA,GAJyB;EAAA,oBAKzBC,GALyB;EAAA,IAKzBA,GALyB,yBAKnB,CALmB;EAAA,IAMzBC,IANyB,QAMzBA,IANyB;EAAA,wBAOzBC,OAPyB;EAAA,IAOzBA,OAPyB,6BAOf,KAPe;EAAA,qBAQzBC,IARyB;EAAA,IAQzBA,IARyB,0BAQlB,CARkB;EAAA,sBASzBC,KATyB;EAAA,IASzBA,KATyB,2BASjB,CATiB;EAAA,yBAUzBC,QAVyB;EAAA,IAUzBA,QAVyB,8BAUd,YAAM,CAAE,CAVM;EAAA,IAWtBC,MAXsB;;EAAA,oBAazB,6BAAC,gBAAD,eAAUA,MAAV;IAAkB,GAAG,MAArB;IAAsB,SAAS,EAAE,qBAAOC,2BAAMC,WAAb,EAA0BF,MAAM,CAACG,SAAjC;EAAjC,iBACE,6BAAC,gBAAD;IAAM,SAAS,EAAEF,2BAAMG;EAAvB,GACGZ,KAAK,iBAAI,6BAAC,gBAAD;IAAM,SAAS,EAAEF,QAAQ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EY,mBAAUK,MALO;EAMtBhB,IAAI,EAAEW,mBAAUG,MAAV,CAAiBG,UAND;EAOtBhB,OAAO,EAAEU,mBAAUC,IAPG;EAQtBV,IAAI,EAAES,mBAAUK,MARM;EAStBb,KAAK,EAAEQ,mBAAUK,MATK;EAUtBZ,QAAQ,EAAEO,mBAAUO;AAVE,CAAxB"}
1
+ {"version":3,"file":"InputNumber.js","names":["InputNumber","disabled","hint","label","max","min","name","rounded","step","value","onChange","others","style","inputNumber","className","texts","propTypes","PropTypes","bool","oneOfType","string","array","number","isRequired","func"],"sources":["../../../src/components/InputNumber/InputNumber.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, Text, View } from '../../primitives';\nimport { Button } from '../Button';\nimport style from './InputNumber.module.css';\n\nexport const InputNumber = ({\n disabled,\n hint,\n label,\n max,\n min = 0,\n name,\n rounded = true,\n step = 1,\n value = 0,\n onChange = () => {},\n ...others\n}) => (\n <View {...others} row className={styles(style.inputNumber, others.className)}>\n <View className={style.texts}>\n {label && (\n <Text subheadline className={disabled && style.disabled}>\n {label}\n </Text>\n )}\n {hint && (\n <Text small className={styles(style.hint, disabled && style.disabled)}>\n {hint}\n </Text>\n )}\n </View>\n <Button\n disabled={disabled || value <= min}\n outlined\n preventDefault\n rounded={rounded}\n squared\n onPress={() => onChange(value - step, name)}\n >\n <Icon name=\"Minus\" />\n </Button>\n <Text headline className={style.value}>\n {typeof value === 'number' ? value : min}\n </Text>\n <Button\n disabled={disabled || value >= max}\n outlined\n preventDefault\n rounded={rounded}\n squared\n onPress={() => onChange(value + step, name)}\n >\n <Icon name=\"Plus\" />\n </Button>\n </View>\n);\n\nInputNumber.propTypes = {\n disabled: PropTypes.bool,\n hint: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n label: PropTypes.string,\n max: PropTypes.number,\n min: PropTypes.number,\n name: PropTypes.string.isRequired,\n rounded: PropTypes.bool,\n step: PropTypes.number,\n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ui-input-number-value-width: var(--mirai-ui-space-XL);
3
3
  }
4
4
 
5
5
  .inputNumber {
@@ -17,7 +17,7 @@
17
17
  }
18
18
 
19
19
  .hint {
20
- color: var(--mirai-ui-input-disabled);
20
+ color: var(--mirai-ui-content-light);
21
21
  }
22
22
 
23
23
  .disabled {
@@ -9,7 +9,7 @@ exports[`component:<InputNumber> inherit:className 1`] = `
9
9
  class="view texts"
10
10
  />
11
11
  <button
12
- class="pressable button squared"
12
+ class="pressable button rounded squared"
13
13
  disabled=""
14
14
  >
15
15
  <span
@@ -36,12 +36,12 @@ exports[`component:<InputNumber> inherit:className 1`] = `
36
36
  </span>
37
37
  </button>
38
38
  <span
39
- class="text paragraph value"
39
+ class="text headline value"
40
40
  >
41
41
  0
42
42
  </span>
43
43
  <button
44
- class="pressable button squared outlined"
44
+ class="pressable button rounded squared outlined"
45
45
  >
46
46
  <span
47
47
  class="icon"
@@ -85,7 +85,7 @@ exports[`component:<InputNumber> prop:disabled 1`] = `
85
85
  class="view texts"
86
86
  />
87
87
  <button
88
- class="pressable button squared"
88
+ class="pressable button rounded squared"
89
89
  disabled=""
90
90
  >
91
91
  <span
@@ -112,12 +112,12 @@ exports[`component:<InputNumber> prop:disabled 1`] = `
112
112
  </span>
113
113
  </button>
114
114
  <span
115
- class="text paragraph value"
115
+ class="text headline value"
116
116
  >
117
117
  0
118
118
  </span>
119
119
  <button
120
- class="pressable button squared"
120
+ class="pressable button rounded squared"
121
121
  disabled=""
122
122
  >
123
123
  <span
@@ -168,7 +168,7 @@ exports[`component:<InputNumber> prop:hint 1`] = `
168
168
  </span>
169
169
  </div>
170
170
  <button
171
- class="pressable button squared"
171
+ class="pressable button rounded squared"
172
172
  disabled=""
173
173
  >
174
174
  <span
@@ -195,12 +195,12 @@ exports[`component:<InputNumber> prop:hint 1`] = `
195
195
  </span>
196
196
  </button>
197
197
  <span
198
- class="text paragraph value"
198
+ class="text headline value"
199
199
  >
200
200
  0
201
201
  </span>
202
202
  <button
203
- class="pressable button squared outlined"
203
+ class="pressable button rounded squared outlined"
204
204
  >
205
205
  <span
206
206
  class="icon"
@@ -244,13 +244,13 @@ exports[`component:<InputNumber> prop:label 1`] = `
244
244
  class="view texts"
245
245
  >
246
246
  <span
247
- class="text paragraph"
247
+ class="text subheadline"
248
248
  >
249
249
  label
250
250
  </span>
251
251
  </div>
252
252
  <button
253
- class="pressable button squared"
253
+ class="pressable button rounded squared"
254
254
  disabled=""
255
255
  >
256
256
  <span
@@ -277,12 +277,12 @@ exports[`component:<InputNumber> prop:label 1`] = `
277
277
  </span>
278
278
  </button>
279
279
  <span
280
- class="text paragraph value"
280
+ class="text headline value"
281
281
  >
282
282
  0
283
283
  </span>
284
284
  <button
285
- class="pressable button squared outlined"
285
+ class="pressable button rounded squared outlined"
286
286
  >
287
287
  <span
288
288
  class="icon"
@@ -326,7 +326,7 @@ exports[`component:<InputNumber> prop:max 1`] = `
326
326
  class="view texts"
327
327
  />
328
328
  <button
329
- class="pressable button squared outlined"
329
+ class="pressable button rounded squared outlined"
330
330
  >
331
331
  <span
332
332
  class="icon"
@@ -352,12 +352,12 @@ exports[`component:<InputNumber> prop:max 1`] = `
352
352
  </span>
353
353
  </button>
354
354
  <span
355
- class="text paragraph value"
355
+ class="text headline value"
356
356
  >
357
357
  10
358
358
  </span>
359
359
  <button
360
- class="pressable button squared"
360
+ class="pressable button rounded squared"
361
361
  disabled=""
362
362
  >
363
363
  <span
@@ -402,7 +402,7 @@ exports[`component:<InputNumber> prop:min 1`] = `
402
402
  class="view texts"
403
403
  />
404
404
  <button
405
- class="pressable button squared"
405
+ class="pressable button rounded squared"
406
406
  disabled=""
407
407
  >
408
408
  <span
@@ -429,12 +429,12 @@ exports[`component:<InputNumber> prop:min 1`] = `
429
429
  </span>
430
430
  </button>
431
431
  <span
432
- class="text paragraph value"
432
+ class="text headline value"
433
433
  >
434
434
  10
435
435
  </span>
436
436
  <button
437
- class="pressable button squared outlined"
437
+ class="pressable button rounded squared outlined"
438
438
  >
439
439
  <span
440
440
  class="icon"
@@ -504,7 +504,7 @@ exports[`component:<InputNumber> prop:rounded 1`] = `
504
504
  </span>
505
505
  </button>
506
506
  <span
507
- class="text paragraph value"
507
+ class="text headline value"
508
508
  >
509
509
  10
510
510
  </span>
@@ -553,7 +553,7 @@ exports[`component:<InputNumber> prop:value 1`] = `
553
553
  class="view texts"
554
554
  />
555
555
  <button
556
- class="pressable button squared outlined"
556
+ class="pressable button rounded squared outlined"
557
557
  >
558
558
  <span
559
559
  class="icon"
@@ -579,12 +579,12 @@ exports[`component:<InputNumber> prop:value 1`] = `
579
579
  </span>
580
580
  </button>
581
581
  <span
582
- class="text paragraph value"
582
+ class="text headline value"
583
583
  >
584
584
  10
585
585
  </span>
586
586
  <button
587
- class="pressable button squared outlined"
587
+ class="pressable button rounded squared outlined"
588
588
  >
589
589
  <span
590
590
  class="icon"
@@ -628,7 +628,7 @@ exports[`component:<InputNumber> renders 1`] = `
628
628
  class="view texts"
629
629
  />
630
630
  <button
631
- class="pressable button squared"
631
+ class="pressable button rounded squared"
632
632
  disabled=""
633
633
  >
634
634
  <span
@@ -655,12 +655,12 @@ exports[`component:<InputNumber> renders 1`] = `
655
655
  </span>
656
656
  </button>
657
657
  <span
658
- class="text paragraph value"
658
+ class="text headline value"
659
659
  >
660
660
  0
661
661
  </span>
662
662
  <button
663
- class="pressable button squared outlined"
663
+ class="pressable button rounded squared outlined"
664
664
  >
665
665
  <span
666
666
  class="icon"
@@ -705,7 +705,7 @@ exports[`component:<InputNumber> testID 1`] = `
705
705
  class="view texts"
706
706
  />
707
707
  <button
708
- class="pressable button squared"
708
+ class="pressable button rounded squared"
709
709
  disabled=""
710
710
  >
711
711
  <span
@@ -732,12 +732,12 @@ exports[`component:<InputNumber> testID 1`] = `
732
732
  </span>
733
733
  </button>
734
734
  <span
735
- class="text paragraph value"
735
+ class="text headline value"
736
736
  >
737
737
  0
738
738
  </span>
739
739
  <button
740
- class="pressable button squared outlined"
740
+ class="pressable button rounded squared outlined"
741
741
  >
742
742
  <span
743
743
  class="icon"
@@ -1,5 +1,5 @@
1
1
  :root {
2
- --mirai-ui-input-option-disabled: var(--mirai-ui-content-300);
2
+ --mirai-ui-input-option-disabled: var(--mirai-ui-content-light);
3
3
  --mirai-ui-input-option-label-margin: var(--mirai-ui-space-S);
4
4
  --mirai-ui-input-option-padding-y: var(--mirai-ui-space-S);
5
5
  }
@@ -1,10 +1,10 @@
1
1
  :root {
2
- --mirai-ui-input-text-border: solid 1px var(--mirai-ui-content-400);
2
+ --mirai-ui-input-text-border: solid 1px var(--mirai-ui-content-border);
3
3
  --mirai-ui-input-text-focus: var(--mirai-ui-accent);
4
4
  --mirai-ui-input-text-padding-x: var(--mirai-ui-space-S);
5
5
  --mirai-ui-input-text-padding-y: var(--mirai-ui-space-S);
6
6
  --mirai-ui-input-text-radius: var(--mirai-ui-border-radius);
7
- --mirai-ui-input-text-disabled: var(--mirai-ui-content-300);
7
+ --mirai-ui-input-text-disabled: var(--mirai-ui-content-border);
8
8
  --mirai-ui-input-text-error: var(--mirai-ui-error);
9
9
  }
10
10
 
@@ -79,7 +79,7 @@
79
79
  padding: 0 calc(var(--mirai-ui-input-text-padding-x) / 2);
80
80
  pointer-events: none;
81
81
  position: absolute;
82
- top: var(--mirai-ui-input-text-padding-y);
82
+ top: calc(var(--mirai-ui-input-text-padding-y) / 1.3);
83
83
  transition: font-size var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing),
84
84
  top var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
85
85
  z-index: 1;
@@ -87,7 +87,7 @@
87
87
 
88
88
  .label.value {
89
89
  font-size: var(--mirai-ui-font-size-small);
90
- top: calc(calc(var(--mirai-ui-input-text-padding-y) * -1) + calc(var(--mirai-ui-input-text-padding-y) / 2));
90
+ top: calc(var(--mirai-ui-input-text-padding-y) * -1);
91
91
  }
92
92
 
93
93
  .text {
@@ -41,12 +41,12 @@ var Notification = function Notification(_ref) {
41
41
  name: error ? 'Error' : warning ? 'Warning' : success ? 'Success' : 'Info',
42
42
  className: _NotificationModule.default.icon
43
43
  }), /*#__PURE__*/_react.default.createElement(_primitives.View, {
44
- className: _NotificationModule.default.text
44
+ className: (0, _helpers.styles)(_NotificationModule.default.text, error ? _NotificationModule.default.error : warning ? _NotificationModule.default.warning : success ? _NotificationModule.default.success : undefined)
45
45
  }, title && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
46
46
  bold: true,
47
- small: true
47
+ action: true
48
48
  }, "Title"), /*#__PURE__*/_react.default.createElement(_primitives.Text, {
49
- small: true
49
+ action: true
50
50
  }, children)), onClose && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
51
51
  className: _NotificationModule.default.pressable,
52
52
  onPress: onClose
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.js","names":["Notification","children","error","success","title","warning","onClose","others","style","notification","undefined","className","icon","text","pressable","displayName","propTypes","PropTypes","string","isRequired","bool","func"],"sources":["../../../src/components/Notification/Notification.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, Pressable, Text, View } from '../../primitives';\nimport style from './Notification.module.css';\n\nconst Notification = ({ children, error, success, title, warning, onClose, ...others }) => (\n <View\n {...others}\n row\n className={styles(\n style.notification,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n others.className,\n )}\n >\n <Icon name={error ? 'Error' : warning ? 'Warning' : success ? 'Success' : 'Info'} className={style.icon} />\n <View className={style.text}>\n {title && (\n <Text bold small>\n Title\n </Text>\n )}\n <Text small>{children}</Text>\n </View>\n {onClose && (\n <Pressable className={style.pressable} onPress={onClose}>\n <Icon name=\"Close\" className={style.icon} />\n </Pressable>\n )}\n </View>\n);\n\nNotification.displayName = 'Component:Notification';\n\nNotification.propTypes = {\n children: PropTypes.string.isRequired,\n error: PropTypes.bool,\n success: PropTypes.bool,\n title: PropTypes.string,\n warning: PropTypes.bool,\n onClose: PropTypes.func,\n};\n\nexport { Notification };\n"],"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,EAAEgB,mBAAUC,MAAV,CAAiBC,UADJ;EAEvBjB,KAAK,EAAEe,mBAAUG,IAFM;EAGvBjB,OAAO,EAAEc,mBAAUG,IAHI;EAIvBhB,KAAK,EAAEa,mBAAUC,MAJM;EAKvBb,OAAO,EAAEY,mBAAUG,IALI;EAMvBd,OAAO,EAAEW,mBAAUI;AANI,CAAzB"}
1
+ {"version":3,"file":"Notification.js","names":["Notification","children","error","success","title","warning","onClose","others","style","notification","undefined","className","icon","text","pressable","displayName","propTypes","PropTypes","string","isRequired","bool","func"],"sources":["../../../src/components/Notification/Notification.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, Pressable, Text, View } from '../../primitives';\nimport style from './Notification.module.css';\n\nconst Notification = ({ children, error, success, title, warning, onClose, ...others }) => (\n <View\n {...others}\n row\n className={styles(\n style.notification,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n others.className,\n )}\n >\n <Icon name={error ? 'Error' : warning ? 'Warning' : success ? 'Success' : 'Info'} className={style.icon} />\n <View\n className={styles(\n style.text,\n error ? style.error : warning ? style.warning : success ? style.success : undefined,\n )}\n >\n {title && (\n <Text bold action>\n Title\n </Text>\n )}\n <Text action>{children}</Text>\n </View>\n {onClose && (\n <Pressable className={style.pressable} onPress={onClose}>\n <Icon name=\"Close\" className={style.icon} />\n </Pressable>\n )}\n </View>\n);\n\nNotification.displayName = 'Component:Notification';\n\nNotification.propTypes = {\n children: PropTypes.string.isRequired,\n error: PropTypes.bool,\n success: PropTypes.bool,\n title: PropTypes.string,\n warning: PropTypes.bool,\n onClose: PropTypes.func,\n};\n\nexport { Notification };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG,SAAfA,YAAe;EAAA,IAAGC,QAAH,QAAGA,QAAH;EAAA,IAAaC,KAAb,QAAaA,KAAb;EAAA,IAAoBC,OAApB,QAAoB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AAEe,mBAAUG,IAFM;EAGvBjB,OAAO,EAAEc,mBAAUG,IAHI;EAIvBhB,KAAK,EAAEa,mBAAUC,MAJM;EAKvBb,OAAO,EAAEY,mBAAUG,IALI;EAMvBd,OAAO,EAAEW,mBAAUI;AANI,CAAzB"}
@@ -1,54 +1,46 @@
1
1
  :root {
2
2
  --mirai-ui-notification-border-radius: var(--mirai-ui-border-radius);
3
- --mirai-ui-notification-padding: var(--mirai-ui-space-XS);
3
+ --mirai-ui-notification-padding: var(--mirai-ui-space-S);
4
4
  --mirai-ui-notification-icon: var(--mirai-ui-font-size-headline);
5
- /* colors */
6
- --mirai-ui-notification-error: var(--mirai-ui-error-300);
7
- --mirai-ui-notification-error-color: var(--mirai-ui-error);
8
- --mirai-ui-notification-default: var(--mirai-ui-accent-200);
9
- --mirai-ui-notification-default-color: var(--mirai-ui-accent);
10
- --mirai-ui-notification-success: var(--mirai-ui-success-300);
11
- --mirai-ui-notification-success-color: var(--mirai-ui-success);
12
- --mirai-ui-notification-warning: var(--mirai-ui-warning-300);
13
- --mirai-ui-notification-warning-color: var(--mirai-ui-warning);
14
5
  }
15
6
 
16
7
  .notification {
17
- background-color: var(--mirai-ui-notification-default);
8
+ align-items: flex-start;
9
+ background-color: var(--mirai-ui-accent-background);
18
10
  border-radius: var(--mirai-ui-notification-border-radius);
19
11
  padding: var(--mirai-ui-notification-padding);
20
- border: solid 1px var(--mirai-ui-notification-default-color);
12
+ border: solid 1px var(--mirai-ui-accent-border);
21
13
  }
22
14
 
23
15
  .notification * {
24
- color: var(--mirai-ui-notification-default-color);
16
+ color: var(--mirai-ui-accent);
25
17
  }
26
18
 
27
19
  .notification.success {
28
- background-color: var(--mirai-ui-notification-success);
29
- border-color: var(--mirai-ui-notification-success-color);
20
+ background-color: var(--mirai-ui-success-background);
21
+ border-color: var(--mirai-ui-success-border);
30
22
  }
31
23
 
32
24
  .notification.success * {
33
- color: var(--mirai-ui-notification-success-color);
25
+ color: var(--mirai-ui-success);
34
26
  }
35
27
 
36
28
  .notification.error {
37
- background-color: var(--mirai-ui-notification-error);
38
- border-color: var(--mirai-ui-notification-error-color);
29
+ background-color: var(--mirai-ui-error-background);
30
+ border-color: var(--mirai-ui-error-border);
39
31
  }
40
32
 
41
33
  .notification.error * {
42
- color: var(--mirai-ui-notification-error-color);
34
+ color: var(--mirai-ui-error);
43
35
  }
44
36
 
45
37
  .notification.warning {
46
- background-color: var(--mirai-ui-notification-warning);
47
- border-color: var(--mirai-ui-notification-warning-color);
38
+ background-color: var(--mirai-ui-warning-background);
39
+ border-color: var(--mirai-ui-warning-border);
48
40
  }
49
41
 
50
42
  .notification.warning * {
51
- color: var(--mirai-ui-notification-warning-color);
43
+ color: var(--mirai-ui-warning);
52
44
  }
53
45
 
54
46
  .icon {
@@ -63,3 +55,19 @@
63
55
  padding-left: var(--mirai-ui-notification-padding);
64
56
  padding-right: var(--mirai-ui-notification-padding);
65
57
  }
58
+
59
+ .text * {
60
+ color: var(--mirai-ui-accent-dark);
61
+ }
62
+
63
+ .text.error * {
64
+ color: var(--mirai-ui-error-dark);
65
+ }
66
+
67
+ .text.success * {
68
+ color: var(--mirai-ui-success-dark);
69
+ }
70
+
71
+ .text.warning * {
72
+ color: var(--mirai-ui-warning-dark);
73
+ }
@@ -30,7 +30,7 @@ exports[`component:<Notification> inherit:className 1`] = `
30
30
  class="view text"
31
31
  >
32
32
  <span
33
- class="text small"
33
+ class="text action"
34
34
  >
35
35
  Lorem Ipsum...
36
36
  </span>
@@ -66,10 +66,10 @@ exports[`component:<Notification> prop:error 1`] = `
66
66
  </svg>
67
67
  </span>
68
68
  <div
69
- class="view text"
69
+ class="view text error"
70
70
  >
71
71
  <span
72
- class="text small"
72
+ class="text action"
73
73
  >
74
74
  Lorem Ipsum...
75
75
  </span>
@@ -108,7 +108,7 @@ exports[`component:<Notification> prop:onClose 1`] = `
108
108
  class="view text"
109
109
  >
110
110
  <span
111
- class="text small"
111
+ class="text action"
112
112
  >
113
113
  Lorem Ipsum...
114
114
  </span>
@@ -176,10 +176,10 @@ exports[`component:<Notification> prop:success 1`] = `
176
176
  </svg>
177
177
  </span>
178
178
  <div
179
- class="view text"
179
+ class="view text success"
180
180
  >
181
181
  <span
182
- class="text small"
182
+ class="text action"
183
183
  >
184
184
  Lorem Ipsum...
185
185
  </span>
@@ -218,12 +218,12 @@ exports[`component:<Notification> prop:title 1`] = `
218
218
  class="view text"
219
219
  >
220
220
  <span
221
- class="text bold small"
221
+ class="text bold action"
222
222
  >
223
223
  Title
224
224
  </span>
225
225
  <span
226
- class="text small"
226
+ class="text action"
227
227
  >
228
228
  Lorem Ipsum...
229
229
  </span>
@@ -259,10 +259,10 @@ exports[`component:<Notification> prop:warning 1`] = `
259
259
  </svg>
260
260
  </span>
261
261
  <div
262
- class="view text"
262
+ class="view text warning"
263
263
  >
264
264
  <span
265
- class="text small"
265
+ class="text action"
266
266
  >
267
267
  Lorem Ipsum...
268
268
  </span>
@@ -301,7 +301,7 @@ exports[`component:<Notification> renders 1`] = `
301
301
  class="view text"
302
302
  >
303
303
  <span
304
- class="text small"
304
+ class="text action"
305
305
  >
306
306
  Lorem Ipsum...
307
307
  </span>
@@ -341,7 +341,7 @@ exports[`component:<Notification> testID 1`] = `
341
341
  class="view text"
342
342
  >
343
343
  <span
344
- class="text small"
344
+ class="text action"
345
345
  >
346
346
  Lorem Ipsum...
347
347
  </span>
@@ -1,12 +1,12 @@
1
1
  :root {
2
2
  --mirai-ui-table-base: var(--mirai-ui-base);
3
- --mirai-ui-table-border-color: var(--mirai-ui-content-300);
3
+ --mirai-ui-table-border-color: var(--mirai-ui-content-border);
4
4
  --mirai-ui-table-content: var(--mirai-ui-content);
5
- --mirai-ui-table-hover-background: var(--mirai-ui-accent-300);
6
- --mirai-ui-table-head-color: var(--mirai-ui-content-400);
5
+ --mirai-ui-table-hover-background: var(--mirai-ui-accent-background);
6
+ --mirai-ui-table-head-color: var(--mirai-ui-content-light);
7
7
  --mirai-ui-table-padding-x: var(--mirai-ui-space-M);
8
8
  --mirai-ui-table-padding-y: var(--mirai-ui-space-M);
9
- --mirai-ui-table-selected-background: var(--mirai-ui-accent-200);
9
+ --mirai-ui-table-selected-background: var(--mirai-ui-accent-background);
10
10
  --mirai-ui-table-selected-color: var(--mirai-ui-accent);
11
11
  }
12
12
 
@@ -1,9 +1,9 @@
1
1
  :root {
2
2
  --mirai-ui-checkbox-base: var(--mirai-ui-base);
3
- --mirai-ui-checkbox-border-color: var(--mirai-ui-content-400);
3
+ --mirai-ui-checkbox-border-color: var(--mirai-ui-content-light);
4
4
  --mirai-ui-checkbox-border-radius: var(--mirai-ui-border-radius);
5
5
  --mirai-ui-checkbox-checked: var(--mirai-ui-accent);
6
- --mirai-ui-checkbox-disabled: var(--mirai-ui-content-300);
6
+ --mirai-ui-checkbox-disabled: var(--mirai-ui-content-border);
7
7
  --mirai-ui-checkbox-size: var(--mirai-ui-space-L);
8
8
  }
9
9
 
@@ -1,7 +1,7 @@
1
1
  :root {
2
2
  --mirai-ui-input-background: var(--mirai-ui-base);
3
3
  --mirai-ui-input-color: var(--mirai-ui-content);
4
- --mirai-ui-input-disabled: var(--mirai-ui-content-400);
4
+ --mirai-ui-input-disabled: var(--mirai-ui-content-light);
5
5
  }
6
6
 
7
7
  .input {
@@ -1,8 +1,8 @@
1
1
  :root {
2
2
  --mirai-ui-radio-base: var(--mirai-ui-base);
3
- --mirai-ui-radio-border: var(--mirai-ui-content-400);
3
+ --mirai-ui-radio-border: var(--mirai-ui-content-light);
4
4
  --mirai-ui-radio-checked: var(--mirai-ui-accent);
5
- --mirai-ui-radio-disabled: var(--mirai-ui-content-300);
5
+ --mirai-ui-radio-disabled: var(--mirai-ui-content-border);
6
6
  --mirai-ui-radio-size: var(--mirai-ui-space-L);
7
7
  }
8
8
 
@@ -1,10 +1,10 @@
1
1
  :root {
2
2
  --mirai-ui-switch-base: var(--mirai-ui-base);
3
- --mirai-ui-switch-border-color: var(--mirai-ui-content-400);
3
+ --mirai-ui-switch-border-color: var(--mirai-ui-content-light);
4
4
  --mirai-ui-switch-border-size: calc(var(--mirai-ui-space-XS) / 4);
5
5
  --mirai-ui-switch-border-radius: var(--mirai-ui-space-L);
6
6
  --mirai-ui-switch-checked: var(--mirai-ui-accent);
7
- --mirai-ui-switch-disabled: var(--mirai-ui-content-300);
7
+ --mirai-ui-switch-disabled: var(--mirai-ui-content-border);
8
8
  --mirai-ui-switch-size: var(--mirai-ui-space-L);
9
9
  }
10
10
 
@@ -13,7 +13,7 @@ var _helpers = require("../../helpers");
13
13
 
14
14
  var _TextModule = _interopRequireDefault(require("./Text.module.css"));
15
15
 
16
- var _excluded = ["action", "bold", "children", "headline", "small", "tag", "upperCase"];
16
+ var _excluded = ["action", "bold", "children", "headline", "small", "subheadline", "tag", "upperCase"];
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
@@ -33,13 +33,14 @@ var Text = function Text(_ref) {
33
33
  children = _ref.children,
34
34
  headline = _ref.headline,
35
35
  small = _ref.small,
36
+ subheadline = _ref.subheadline,
36
37
  _ref$tag = _ref.tag,
37
38
  tag = _ref$tag === void 0 ? 'span' : _ref$tag,
38
39
  upperCase = _ref.upperCase,
39
40
  others = _objectWithoutProperties(_ref, _excluded);
40
41
 
41
42
  return /*#__PURE__*/_react.default.createElement(tag, _objectSpread(_objectSpread({}, others), {}, {
42
- className: (0, _helpers.styles)(_TextModule.default.text, bold && _TextModule.default.bold, headline ? _TextModule.default.headline : action ? _TextModule.default.action : small ? _TextModule.default.small : _TextModule.default.paragraph, upperCase && _TextModule.default.upperCase, others.className)
43
+ className: (0, _helpers.styles)(_TextModule.default.text, bold && _TextModule.default.bold, headline ? _TextModule.default.headline : subheadline ? _TextModule.default.subheadline : action ? _TextModule.default.action : small ? _TextModule.default.small : _TextModule.default.paragraph, upperCase && _TextModule.default.upperCase, others.className)
43
44
  }), children);
44
45
  };
45
46
 
@@ -50,8 +51,9 @@ Text.propTypes = {
50
51
  bold: _propTypes.default.bool,
51
52
  children: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.array]),
52
53
  headline: _propTypes.default.bool,
53
- upperCase: _propTypes.default.bool,
54
54
  small: _propTypes.default.bool,
55
- tag: _propTypes.default.string
55
+ subheadline: _propTypes.default.bool,
56
+ tag: _propTypes.default.string,
57
+ upperCase: _propTypes.default.bool
56
58
  };
57
59
  //# sourceMappingURL=Text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","names":["Text","action","bold","children","headline","small","tag","upperCase","others","React","createElement","className","style","text","paragraph","displayName","propTypes","PropTypes","bool","oneOfType","string","number","array"],"sources":["../../../src/primitives/Text/Text.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport style from './Text.module.css';\n\nconst Text = ({ action, bold, children, headline, small, tag = 'span', upperCase, ...others }) =>\n React.createElement(\n tag,\n {\n ...others,\n className: styles(\n style.text,\n bold && style.bold,\n headline ? style.headline : action ? style.action : small ? style.small : style.paragraph,\n upperCase && style.upperCase,\n others.className,\n ),\n },\n children,\n );\n\nText.displayName = 'Primitive:Text';\n\nText.propTypes = {\n action: PropTypes.bool,\n bold: PropTypes.bool,\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]),\n headline: PropTypes.bool,\n upperCase: PropTypes.bool,\n small: PropTypes.bool,\n tag: PropTypes.string,\n};\n\nexport { Text };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG,SAAPA,IAAO;EAAA,IAAGC,MAAH,QAAGA,MAAH;EAAA,IAAWC,IAAX,QAAWA,IAAX;EAAA,IAAiBC,QAAjB,QAAiBA,QAAjB;EAAA,IAA2BC,QAA3B,QAA2BA,QAA3B;EAAA,IAAqCC,KAArC,QAAqCA,KAArC;EAAA,oBAA4CC,GAA5C;EAAA,IAA4CA,GAA5C,yBAAkD,MAAlD;EAAA,IAA0DC,SAA1D,QAA0DA,SAA1D;EAAA,IAAwEC,MAAxE;;EAAA,oBACXC,eAAMC,aAAN,CACEJ,GADF,kCAGOE,MAHP;IAIIG,SAAS,EAAE,qBACTC,oBAAMC,IADG,EAETX,IAAI,IAAIU,oBAAMV,IAFL,EAGTE,QAAQ,GAAGQ,oBAAMR,QAAT,GAAoBH,MAAM,GAAGW,oBAAMX,MAAT,GAAkBI,KAAK,GAAGO,oBAAMP,KAAT,GAAiBO,oBAAME,SAHvE,EAITP,SAAS,IAAIK,oBAAML,SAJV,EAKTC,MAAM,CAACG,SALE;EAJf,IAYER,QAZF,CADW;AAAA,CAAb;;;AAgBAH,IAAI,CAACe,WAAL,GAAmB,gBAAnB;AAEAf,IAAI,CAACgB,SAAL,GAAiB;EACff,MAAM,EAAEgB,mBAAUC,IADH;EAEfhB,IAAI,EAAEe,mBAAUC,IAFD;EAGff,QAAQ,EAAEc,mBAAUE,SAAV,CAAoB,CAACF,mBAAUG,MAAX,EAAmBH,mBAAUI,MAA7B,EAAqCJ,mBAAUK,KAA/C,CAApB,CAHK;EAIflB,QAAQ,EAAEa,mBAAUC,IAJL;EAKfX,SAAS,EAAEU,mBAAUC,IALN;EAMfb,KAAK,EAAEY,mBAAUC,IANF;EAOfZ,GAAG,EAAEW,mBAAUG;AAPA,CAAjB"}
1
+ {"version":3,"file":"Text.js","names":["Text","action","bold","children","headline","small","subheadline","tag","upperCase","others","React","createElement","className","style","text","paragraph","displayName","propTypes","PropTypes","bool","oneOfType","string","number","array"],"sources":["../../../src/primitives/Text/Text.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport style from './Text.module.css';\n\nconst Text = ({ action, bold, children, headline, small, subheadline, tag = 'span', upperCase, ...others }) =>\n React.createElement(\n tag,\n {\n ...others,\n className: styles(\n style.text,\n bold && style.bold,\n headline\n ? style.headline\n : subheadline\n ? style.subheadline\n : action\n ? style.action\n : small\n ? style.small\n : style.paragraph,\n upperCase && style.upperCase,\n others.className,\n ),\n },\n children,\n );\n\nText.displayName = 'Primitive:Text';\n\nText.propTypes = {\n action: PropTypes.bool,\n bold: PropTypes.bool,\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]),\n headline: PropTypes.bool,\n small: PropTypes.bool,\n subheadline: PropTypes.bool,\n tag: PropTypes.string,\n upperCase: PropTypes.bool,\n};\n\nexport { Text };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG,SAAPA,IAAO;EAAA,IAAGC,MAAH,QAAGA,MAAH;EAAA,IAAWC,IAAX,QAAWA,IAAX;EAAA,IAAiBC,QAAjB,QAAiBA,QAAjB;EAAA,IAA2BC,QAA3B,QAA2BA,QAA3B;EAAA,IAAqCC,KAArC,QAAqCA,KAArC;EAAA,IAA4CC,WAA5C,QAA4CA,WAA5C;EAAA,oBAAyDC,GAAzD;EAAA,IAAyDA,GAAzD,yBAA+D,MAA/D;EAAA,IAAuEC,SAAvE,QAAuEA,SAAvE;EAAA,IAAqFC,MAArF;;EAAA,oBACXC,eAAMC,aAAN,CACEJ,GADF,kCAGOE,MAHP;IAIIG,SAAS,EAAE,qBACTC,oBAAMC,IADG,EAETZ,IAAI,IAAIW,oBAAMX,IAFL,EAGTE,QAAQ,GACJS,oBAAMT,QADF,GAEJE,WAAW,GACXO,oBAAMP,WADK,GAEXL,MAAM,GACNY,oBAAMZ,MADA,GAENI,KAAK,GACLQ,oBAAMR,KADD,GAELQ,oBAAME,SAXD,EAYTP,SAAS,IAAIK,oBAAML,SAZV,EAaTC,MAAM,CAACG,SAbE;EAJf,IAoBET,QApBF,CADW;AAAA,CAAb;;;AAwBAH,IAAI,CAACgB,WAAL,GAAmB,gBAAnB;AAEAhB,IAAI,CAACiB,SAAL,GAAiB;EACfhB,MAAM,EAAEiB,mBAAUC,IADH;EAEfjB,IAAI,EAAEgB,mBAAUC,IAFD;EAGfhB,QAAQ,EAAEe,mBAAUE,SAAV,CAAoB,CAACF,mBAAUG,MAAX,EAAmBH,mBAAUI,MAA7B,EAAqCJ,mBAAUK,KAA/C,CAApB,CAHK;EAIfnB,QAAQ,EAAEc,mBAAUC,IAJL;EAKfd,KAAK,EAAEa,mBAAUC,IALF;EAMfb,WAAW,EAAEY,mBAAUC,IANR;EAOfZ,GAAG,EAAEW,mBAAUG,MAPA;EAQfb,SAAS,EAAEU,mBAAUC;AARN,CAAjB"}
@@ -14,10 +14,17 @@
14
14
 
15
15
  .headline {
16
16
  font-size: var(--mirai-ui-font-size-headline);
17
+ line-height: var(--mirai-ui-line-height);
18
+ }
19
+
20
+ .subheadline {
21
+ font-size: var(--mirai-ui-font-size-subheadline);
22
+ line-height: var(--mirai-ui-line-height);
17
23
  }
18
24
 
19
25
  .paragraph {
20
26
  font-size: var(--mirai-ui-font-size-paragraph);
27
+ line-height: var(--mirai-ui-line-height);
21
28
  }
22
29
 
23
30
  .action {
@@ -26,6 +33,7 @@
26
33
 
27
34
  .small {
28
35
  font-size: var(--mirai-ui-font-size-small);
36
+ line-height: calc(var(--mirai-ui-font-size-small) * 1.5);
29
37
  }
30
38
 
31
39
  .upperCase {
@@ -60,6 +60,16 @@ exports[`primitive:<Text> prop:small 1`] = `
60
60
  </DocumentFragment>
61
61
  `;
62
62
 
63
+ exports[`primitive:<Text> prop:subheadline 1`] = `
64
+ <DocumentFragment>
65
+ <span
66
+ class="text subheadline"
67
+ >
68
+ Lorem Ipsum
69
+ </span>
70
+ </DocumentFragment>
71
+ `;
72
+
63
73
  exports[`primitive:<Text> prop:upperCase 1`] = `
64
74
  <DocumentFragment>
65
75
  <span
@@ -1,44 +1,61 @@
1
1
  :root {
2
2
  /* typography */
3
- --mirai-ui-font: Helvetica;
4
- --mirai-ui-input-font: Helvetica;
3
+ --mirai-ui-font: Arial, Regular;
4
+ --mirai-ui-input-font: Arial, Regular;
5
5
  --mirai-ui-font-weight: 400;
6
- --mirai-ui-font-bold: Helvetica;
6
+ --mirai-ui-font-bold: Arial, Regular;
7
7
  --mirai-ui-font-bold-weight: 700;
8
- --mirai-ui-font-size-headline: 24px;
9
- --mirai-ui-font-size-paragraph: 16px;
10
- --mirai-ui-font-size-action: 15px;
11
- --mirai-ui-font-size-small: 11px;
12
- --mirai-ui-input-font-size: 16px;
8
+ --mirai-ui-font-size-headline: 18px;
9
+ --mirai-ui-font-size-subheadline: 16px;
10
+ --mirai-ui-font-size-paragraph: 14px;
11
+ --mirai-ui-font-size-action: 14px;
12
+ --mirai-ui-font-size-small: 12px;
13
+ --mirai-ui-input-font-size: 14px;
14
+ --mirai-ui-line-height: 24px;
13
15
  --mirai-ui-text-direction: ltr;
14
16
  --mirai-ui-text-align: left;
15
17
 
16
18
  /* palette */
17
19
  --mirai-ui-base: #ffffff;
18
20
  /* !TODO: Change to -text ------------------------------------------------- */
19
- --mirai-ui-content: #202020;
20
- --mirai-ui-content-400: #5f6368;
21
- --mirai-ui-content-300: #d3d3d3;
21
+ --mirai-ui-content: #484848;
22
+ --mirai-ui-content-background: #f6f6f6;
23
+ --mirai-ui-content-border: #e4e4e4;
24
+ --mirai-ui-content-dark: #202020;
25
+ --mirai-ui-content-light: #999999;
22
26
  /* !TODO ------------------------------------------------------------------ */
23
27
 
24
28
  --mirai-ui-accent: #3978c5;
25
- --mirai-ui-accent-400: #61a0ed;
26
- --mirai-ui-accent-300: #89c8ff;
27
- --mirai-ui-accent-200: #edffff;
28
- --mirai-ui-error: #f44336;
29
- --mirai-ui-error-300: #fde3e1;
30
- --mirai-ui-success: #4caf50;
31
- --mirai-ui-success-300: #e4f3e5;
32
- --mirai-ui-warning: #ff9800;
33
- --mirai-ui-warning-300: #fff0d9;
29
+ --mirai-ui-accent-background: #e9f1fc;
30
+ --mirai-ui-accent-border: #b0c9e8;
31
+ --mirai-ui-accent-dark: #224876;
32
+ --mirai-ui-accent-light: #88aedc;
33
+
34
+ --mirai-ui-error: #d14343;
35
+ --mirai-ui-error-background: #fdf4f4;
36
+ --mirai-ui-error-border: #f4b6b6;
37
+ --mirai-ui-error-dark: #7d2828;
38
+ --mirai-ui-error-light: #ee9191;
39
+
40
+ --mirai-ui-success: #52bd94;
41
+ --mirai-ui-success-background: #f5fbf8;
42
+ --mirai-ui-success-border: #dcf2ea;
43
+ --mirai-ui-success-dark: #317159;
44
+ --mirai-ui-success-light: #a3e6cd;
45
+
46
+ --mirai-ui-warning: #ffb020;
47
+ --mirai-ui-warning-background: #fffaf1;
48
+ --mirai-ui-warning-border: #ffdfa6;
49
+ --mirai-ui-warning-dark: #66460d;
50
+ --mirai-ui-warning-light: #ffd079;
34
51
 
35
52
  /* spacing */
36
53
  --mirai-ui-space-XS: 8px;
37
54
  --mirai-ui-space-S: 12px;
38
55
  --mirai-ui-space-M: 16px;
39
56
  --mirai-ui-space-L: 24px;
40
- --mirai-ui-space-XL: 32px;
41
- --mirai-ui-space-XXL: 56px;
57
+ --mirai-ui-space-XL: 48px;
58
+ --mirai-ui-space-XXL: 64px;
42
59
 
43
60
  /* layer */
44
61
  --mirai-ui-layer-S: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirai/ui",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "repository": "git@gitlab.com:miraicorp/dev/frontend/ui.git",
5
5
  "author": "JΛVI <hello@soyjavi.com>",
6
6
  "license": "MIT",