@mirai/ui 1.1.0-d → 1.1.1
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/README.md +109 -60
- package/build/components/Action/Action.js +1 -1
- package/build/components/Action/Action.js.map +1 -1
- package/build/components/Action/Action.module.css +4 -7
- package/build/components/Action/Action.stories.js +1 -1
- package/build/components/Action/Action.stories.js.map +1 -1
- package/build/components/Action/__tests__/__snapshots__/Action.test.js.snap +26 -40
- package/build/components/Button/Button.module.css +30 -33
- package/build/components/Button/Button.stories.js +9 -0
- package/build/components/Button/Button.stories.js.map +1 -1
- package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +21 -30
- package/build/components/Calendar/Calendar.Month.js +12 -8
- package/build/components/Calendar/Calendar.Month.js.map +1 -1
- package/build/components/Calendar/Calendar.Week.js +7 -10
- package/build/components/Calendar/Calendar.Week.js.map +1 -1
- package/build/components/Calendar/Calendar.js +9 -1
- package/build/components/Calendar/Calendar.js.map +1 -1
- package/build/components/Calendar/Calendar.module.css +3 -4
- package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +15736 -15768
- package/build/components/Form/Form.constants.js +1 -1
- package/build/components/Form/Form.constants.js.map +1 -1
- package/build/components/Form/Form.js +3 -1
- package/build/components/Form/Form.js.map +1 -1
- package/build/components/Form/Form.stories.js +6 -1
- package/build/components/Form/Form.stories.js.map +1 -1
- package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +9 -9
- package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +42 -42
- package/build/components/InputNumber/InputNumber.js +2 -1
- package/build/components/InputNumber/InputNumber.js.map +1 -1
- package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +138 -153
- package/build/components/InputOption/InputOption.js +8 -1
- package/build/components/InputOption/InputOption.js.map +1 -1
- package/build/components/InputOption/InputOption.module.css +13 -2
- package/build/components/InputOption/InputOption.stories.js +2 -1
- package/build/components/InputOption/InputOption.stories.js.map +1 -1
- package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +96 -90
- package/build/components/InputPhone/InputPhone.js +22 -19
- package/build/components/InputPhone/InputPhone.js.map +1 -1
- package/build/components/InputPhone/InputPhone.module.css +18 -5
- package/build/components/InputPhone/InputPhone.stories.js +3 -3
- package/build/components/InputPhone/InputPhone.stories.js.map +1 -1
- package/build/components/InputPhone/__tests__/__snapshots__/InputPhone.test.js.snap +389 -389
- package/build/components/InputPhone/helpers/index.js +11 -0
- package/build/components/InputPhone/helpers/index.js.map +1 -1
- package/build/components/InputPhone/helpers/sanitizePrefixes.js +24 -0
- package/build/components/InputPhone/helpers/sanitizePrefixes.js.map +1 -0
- package/build/components/InputSelect/InputSelect.js +3 -5
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/InputSelect.stories.js +1 -0
- package/build/components/InputSelect/InputSelect.stories.js.map +1 -1
- package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +136 -136
- package/build/components/InputSelect/partials/InputSelect.Expand.js +23 -0
- package/build/components/InputSelect/partials/InputSelect.Expand.js.map +1 -0
- package/build/components/InputSelect/partials/index.js +17 -0
- package/build/components/InputSelect/partials/index.js.map +1 -0
- package/build/components/InputText/InputText.js +6 -4
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/InputText.module.css +18 -6
- package/build/components/InputText/InputText.stories.js +7 -2
- package/build/components/InputText/InputText.stories.js.map +1 -1
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +142 -143
- package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +72 -70
- package/build/components/Modal/Modal.js +15 -8
- package/build/components/Modal/Modal.js.map +1 -1
- package/build/components/Modal/Modal.module.css +30 -13
- package/build/components/Modal/Modal.stories.js +1 -0
- package/build/components/Modal/Modal.stories.js.map +1 -1
- package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +92 -98
- package/build/components/Notification/Notification.js +20 -12
- package/build/components/Notification/Notification.js.map +1 -1
- package/build/components/Notification/Notification.module.css +44 -58
- package/build/components/Notification/Notification.stories.js +15 -2
- package/build/components/Notification/Notification.stories.js.map +1 -1
- package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +600 -254
- package/build/components/Progress/Progress.js +2 -0
- package/build/components/Progress/Progress.js.map +1 -1
- package/build/components/Progress/__tests__/__snapshots__/Progress.test.jsx.snap +18 -18
- package/build/components/Slider/Slider.constants.js +3 -1
- package/build/components/Slider/Slider.constants.js.map +1 -1
- package/build/components/Slider/Slider.js +67 -66
- package/build/components/Slider/Slider.js.map +1 -1
- package/build/components/Slider/Slider.module.css +54 -54
- package/build/components/Slider/Slider.stories.js +9 -6
- package/build/components/Slider/Slider.stories.js.map +1 -1
- package/build/components/Slider/__tests__/__snapshots__/Slider.test.js.snap +708 -327
- package/build/components/Table/Table.ColumnFilter.js +17 -14
- package/build/components/Table/Table.ColumnFilter.js.map +1 -1
- package/build/components/Table/Table.Row.js +2 -1
- package/build/components/Table/Table.Row.js.map +1 -1
- package/build/components/Table/Table.constants.js +3 -1
- package/build/components/Table/Table.constants.js.map +1 -1
- package/build/components/Table/Table.js +54 -17
- package/build/components/Table/Table.js.map +1 -1
- package/build/components/Table/Table.module.css +12 -6
- package/build/components/Table/Table.stories.js +39 -19
- package/build/components/Table/Table.stories.js.map +1 -1
- package/build/components/Table/Table.stories.module.css +4 -5
- package/build/components/Table/__tests__/__snapshots__/Table.ColumnFilter.test.js.snap +221 -240
- package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +1725 -1085
- package/build/components/Table/helpers/exists.js +2 -3
- package/build/components/Table/helpers/exists.js.map +1 -1
- package/build/components/Table/helpers/select.js +24 -16
- package/build/components/Table/helpers/select.js.map +1 -1
- package/build/components/Tooltip/Tooltip.js +29 -6
- package/build/components/Tooltip/Tooltip.js.map +1 -1
- package/build/components/Tooltip/__tests__/__snapshots__/Tooltip.test.jsx.snap +51 -44
- package/build/components/index.js +11 -0
- package/build/components/index.js.map +1 -1
- package/build/helpers/getInputPhoneErrors.js +3 -2
- package/build/helpers/getInputPhoneErrors.js.map +1 -1
- package/build/hooks/useDevice.js +1 -1
- package/build/hooks/useDevice.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/Checkbox.module.css +42 -6
- package/build/primitives/Checkbox/__tests__/__snapshots__/Checkbox.test.js.snap +47 -16
- package/build/primitives/Icon/Icon.constants.js +43 -21
- package/build/primitives/Icon/Icon.constants.js.map +1 -1
- package/build/primitives/Icon/Icon.js +15 -5
- package/build/primitives/Icon/Icon.js.map +1 -1
- package/build/primitives/Icon/Icon.module.css +32 -19
- package/build/primitives/Icon/Icon.stories.js +5 -0
- package/build/primitives/Icon/Icon.stories.js.map +1 -1
- package/build/primitives/Icon/__tests__/__snapshots__/Icon.test.js.snap +291 -100
- package/build/primitives/Input/Input.js +9 -3
- package/build/primitives/Input/Input.js.map +1 -1
- package/build/primitives/Input/Input.stories.js +2 -0
- package/build/primitives/Input/Input.stories.js.map +1 -1
- package/build/primitives/Input/__tests__/__snapshots__/Input.test.js.snap +22 -0
- package/build/primitives/Layer/Layer.js +11 -5
- package/build/primitives/Layer/Layer.js.map +1 -1
- package/build/primitives/Layer/Layer.module.css +4 -0
- package/build/primitives/Layer/__tests__/__snapshots__/Layer.test.js.snap +78 -42
- package/build/primitives/Layer/helpers/index.js +11 -0
- package/build/primitives/Layer/helpers/index.js.map +1 -1
- package/build/primitives/Layer/helpers/isComponentFixed.js +32 -0
- package/build/primitives/Layer/helpers/isComponentFixed.js.map +1 -0
- package/build/primitives/Pressable/Pressable.constants.js +1 -1
- package/build/primitives/Pressable/Pressable.constants.js.map +1 -1
- package/build/primitives/Pressable/Pressable.js +3 -7
- package/build/primitives/Pressable/Pressable.js.map +1 -1
- package/build/primitives/Pressable/Pressable.module.css +0 -1
- package/build/primitives/Pressable/__tests__/__snapshots__/Pressable.test.js.snap +10 -14
- package/build/primitives/Primitive/Primitive.js +2 -2
- package/build/primitives/Primitive/Primitive.js.map +1 -1
- package/build/primitives/Primitive/__tests__/__snapshots__/Primitive.test.js.snap +7 -7
- package/build/primitives/Primitive/helpers/index.js +0 -11
- package/build/primitives/Primitive/helpers/index.js.map +1 -1
- package/build/primitives/Radio/Radio.js +1 -1
- package/build/primitives/Radio/Radio.js.map +1 -1
- package/build/primitives/Radio/Radio.module.css +18 -2
- package/build/primitives/Radio/__tests__/__snapshots__/Radio.test.js.snap +21 -21
- package/build/primitives/ScrollView/ScrollView.js +1 -1
- package/build/primitives/ScrollView/ScrollView.js.map +1 -1
- package/build/primitives/ScrollView/ScrollView.module.css +1 -0
- package/build/primitives/ScrollView/ScrollView.stories.js +5 -6
- package/build/primitives/ScrollView/ScrollView.stories.js.map +1 -1
- package/build/primitives/ScrollView/__tests__/__snapshots__/ScrollView.test.js.snap +20 -20
- package/build/primitives/Select/Select.js +13 -6
- package/build/primitives/Select/Select.js.map +1 -1
- package/build/primitives/Select/Select.stories.js +1 -0
- package/build/primitives/Select/Select.stories.js.map +1 -1
- package/build/primitives/Select/__tests__/__snapshots__/Select.test.js.snap +36 -0
- package/build/primitives/Switch/Switch.js +5 -3
- package/build/primitives/Switch/Switch.js.map +1 -1
- package/build/primitives/Switch/Switch.module.css +36 -8
- package/build/primitives/Switch/Switch.stories.js +1 -0
- package/build/primitives/Switch/Switch.stories.js.map +1 -1
- package/build/primitives/Switch/__tests__/__snapshots__/Switch.test.js.snap +88 -25
- package/build/primitives/Text/Text.js +12 -5
- package/build/primitives/Text/Text.js.map +1 -1
- package/build/primitives/Text/Text.module.css +29 -14
- package/build/primitives/Text/Text.stories.js +4 -0
- package/build/primitives/Text/Text.stories.js.map +1 -1
- package/build/primitives/Text/__tests__/__snapshots__/Text.test.js.snap +78 -38
- package/build/primitives/View/View.js +1 -1
- package/build/primitives/View/View.js.map +1 -1
- package/build/primitives/View/__tests__/__snapshots__/View.test.js.snap +10 -10
- package/build/theme/default.theme.css +54 -53
- package/build/theme/theme.constants.js +3 -1
- package/build/theme/theme.constants.js.map +1 -1
- package/build/theme/theme.js +34 -11
- package/build/theme/theme.js.map +1 -1
- package/package.json +4 -5
- package/build/primitives/Primitive/helpers/getTag.js +0 -32
- package/build/primitives/Primitive/helpers/getTag.js.map +0 -1
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ This primitive returns a checkbox button based on the following properties:
|
|
|
19
19
|
- `checked:boolean` if true, the checkbox button is checked
|
|
20
20
|
- `children:node`
|
|
21
21
|
- `disabled:boolean` applying 'disabled' attribute
|
|
22
|
+
- `error:boolean` shows error style
|
|
22
23
|
- `name:string` input name (required)
|
|
23
24
|
- `value:string` input value
|
|
24
25
|
- `onChange:function` executed when input value changes
|
|
@@ -38,16 +39,33 @@ const MyComponent = () => (
|
|
|
38
39
|
</View>
|
|
39
40
|
```
|
|
40
41
|
|
|
42
|
+
**Theming variables**
|
|
43
|
+
|
|
44
|
+
```css
|
|
45
|
+
--mirai-ui-checkbox-base: var(--mirai-ui-base);
|
|
46
|
+
--mirai-ui-checkbox-border-color: var(--mirai-ui-content-light);
|
|
47
|
+
--mirai-ui-checkbox-border-radius: var(--mirai-ui-border-radius);
|
|
48
|
+
--mirai-ui-checkbox-checked: var(--mirai-ui-accent);
|
|
49
|
+
--mirai-ui-checkbox-disabled: var(--mirai-ui-content-border);
|
|
50
|
+
--mirai-ui-checkbox-size: calc(var(--mirai-ui-space-M) + calc(var(--mirai-ui-space-XXS) / 2));
|
|
51
|
+
--mirai-ui-checkbox-size-mobile: var(--mirai-ui-space-L);
|
|
52
|
+
```
|
|
53
|
+
|
|
41
54
|
### Icon
|
|
42
55
|
|
|
43
56
|
This primitive returns a span with an icon based on a mandatory string prop `name`.
|
|
44
57
|
|
|
58
|
+
- `accent:boolean` use theme's accent color
|
|
45
59
|
- `action:boolean` modifying font-size
|
|
60
|
+
- `error:boolean` use theme's error color
|
|
46
61
|
- `headline:boolean` modifying font-size (default headline:3)
|
|
47
62
|
- `level:number` assign the level of heading (1, 2, 3 or 4)
|
|
63
|
+
- `lighten:boolean` use theme's content-light color
|
|
48
64
|
- `paragraph:boolean` modifying font-size
|
|
49
65
|
- `small:boolean` modifying font-size
|
|
66
|
+
- `success:boolean` use theme's success color
|
|
50
67
|
- `value:func` Enum value
|
|
68
|
+
- `warning:boolean` use theme's warning color
|
|
51
69
|
|
|
52
70
|
```jsx
|
|
53
71
|
import { Icon, ICON, View } from '@mirai/ui';
|
|
@@ -66,6 +84,8 @@ const MyComponent = () => (
|
|
|
66
84
|
This primitive returns an input or a textarea based on the following props:
|
|
67
85
|
|
|
68
86
|
- `disabled:boolean` applying 'disabled' attribute
|
|
87
|
+
- `max:number` specifies the maximum allowed value for numeric input
|
|
88
|
+
- `min:number` specifies the minimun allowed value for numeric input
|
|
69
89
|
- `multiline:boolean` if true returning textarea
|
|
70
90
|
- `name:string` input name
|
|
71
91
|
- `type:string` type attribute value
|
|
@@ -141,7 +161,6 @@ const MyComponent = () => {
|
|
|
141
161
|
|
|
142
162
|
```css
|
|
143
163
|
--mirai-ui-layer-content: var(--mirai-ui-layer-XL);
|
|
144
|
-
/* position (z-index) */
|
|
145
164
|
--mirai-ui-layer-XS: -1;
|
|
146
165
|
--mirai-ui-layer-S: 0;
|
|
147
166
|
--mirai-ui-layer-M: 1;
|
|
@@ -205,7 +224,8 @@ const MyComponent = () => (
|
|
|
205
224
|
--mirai-ui-radio-border: var(--mirai-ui-content-light);
|
|
206
225
|
--mirai-ui-radio-checked: var(--mirai-ui-accent);
|
|
207
226
|
--mirai-ui-radio-disabled: var(--mirai-ui-content-border);
|
|
208
|
-
--mirai-ui-radio-size: var(--mirai-ui-
|
|
227
|
+
--mirai-ui-radio-size: var(--mirai-ui-checkbox-size);
|
|
228
|
+
--mirai-ui-radio-size-mobile: var(--mirai-ui-checkbox-size-mobile);
|
|
209
229
|
```
|
|
210
230
|
|
|
211
231
|
### ScrollView
|
|
@@ -240,6 +260,7 @@ const MyComponent = ({ isDesktop }) => (
|
|
|
240
260
|
This primitive returns a select element and receives the following props:
|
|
241
261
|
|
|
242
262
|
- `disabled:boolean` applying 'disabled' attribute
|
|
263
|
+
- `disabledOptions:boolean[]` applying 'disabled' for an specific option
|
|
243
264
|
- `emptyOption:string` label for the empty default value (e.g. 'Select an option')
|
|
244
265
|
- `options:string[]` select options text and values
|
|
245
266
|
- `value:string` current value
|
|
@@ -260,6 +281,7 @@ const Example = (props) => {
|
|
|
260
281
|
|
|
261
282
|
return (
|
|
262
283
|
<Select
|
|
284
|
+
disabledOptions={[, true]}
|
|
263
285
|
emptyOption="Select one option..."
|
|
264
286
|
name="Select"
|
|
265
287
|
options={['foo', 'bar']}
|
|
@@ -276,6 +298,7 @@ This primitive returns a _mobile_ checkbox button based on the following propert
|
|
|
276
298
|
|
|
277
299
|
- `checked:boolean` if true, the checkbox button is checked
|
|
278
300
|
- `disabled:boolean` applying 'disabled' attribute
|
|
301
|
+
- `error:boolean` shows error style
|
|
279
302
|
- `name:string` input name (required)
|
|
280
303
|
- `onChange:function` executed when input value changes
|
|
281
304
|
|
|
@@ -296,12 +319,12 @@ const MyComponent = () => (
|
|
|
296
319
|
```css
|
|
297
320
|
--mirai-ui-switch-base: var(--mirai-ui-base);
|
|
298
321
|
--mirai-ui-switch-border-color: var(--mirai-ui-content-light);
|
|
299
|
-
--mirai-ui-switch-border-size:
|
|
322
|
+
--mirai-ui-switch-border-size: var(--mirai-ui-space-XXS);
|
|
300
323
|
--mirai-ui-switch-border-radius: var(--mirai-ui-space-L);
|
|
301
324
|
--mirai-ui-switch-checked: var(--mirai-ui-accent);
|
|
302
325
|
--mirai-ui-switch-disabled: var(--mirai-ui-content-border);
|
|
303
|
-
--mirai-ui-switch-
|
|
304
|
-
--mirai-ui-switch-size: var(--mirai-ui-space-L);
|
|
326
|
+
--mirai-ui-switch-size: var(--mirai-ui-space-M);
|
|
327
|
+
--mirai-ui-switch-size-mobile: calc(var(--mirai-ui-space-L) - var(--mirai-ui-space-XXS));
|
|
305
328
|
```
|
|
306
329
|
|
|
307
330
|
### Text
|
|
@@ -311,16 +334,20 @@ A primitive for displaying text. It receives the following props:
|
|
|
311
334
|
- `accent:boolean` use theme's accent color
|
|
312
335
|
- `action:boolean` modifying font-size
|
|
313
336
|
- `bold:boolean` modifying font-weight
|
|
337
|
+
- `capitalize:boolean` capitalize the first word of a sentence
|
|
314
338
|
- `children:string`
|
|
339
|
+
- `error:boolean` use theme's error color
|
|
315
340
|
- `headline:boolean` modifying font-size
|
|
316
341
|
- `level:number` assign the level of heading (1, 2, 3 or 4)
|
|
317
342
|
- `lighten:boolean` use theme's content-light color
|
|
318
343
|
- `markdown:boolean` if true renders content as parsed markdown
|
|
319
344
|
- `small:boolean` modifying font-size
|
|
345
|
+
- `success:boolean` use theme's success color
|
|
320
346
|
- `tag:string` html tag of resulting element
|
|
321
347
|
- `tiny:bool` modifying font-size
|
|
322
348
|
- `underline:boolean` use an underline text decoration
|
|
323
349
|
- `upperCase:boolean` switching text to upper case
|
|
350
|
+
- `warning:boolean` use theme's warning color
|
|
324
351
|
- `wide:boolean` specifies whether the component should have more width or not
|
|
325
352
|
|
|
326
353
|
```jsx
|
|
@@ -400,7 +427,6 @@ const MyComponent = (props) => {
|
|
|
400
427
|
|
|
401
428
|
```css
|
|
402
429
|
--mirai-ui-action-color: var(--mirai-ui-accent);
|
|
403
|
-
--mirai-ui-action-color-active: var(--mirai-ui-content);
|
|
404
430
|
--mirai-ui-action-color-disabled: var(--mirai-ui-content-light);
|
|
405
431
|
--mirai-ui-action-font-weight: var(--mirai-ui-font-weight);
|
|
406
432
|
```
|
|
@@ -448,7 +474,6 @@ const MyComponent = (props) => {
|
|
|
448
474
|
--mirai-ui-button-busy-motion: calc(var(--mirai-ui-motion-expand) * 10);
|
|
449
475
|
--mirai-ui-button-color: var(--mirai-ui-base);
|
|
450
476
|
--mirai-ui-button-color-active: rgba(255, 255, 255, 0.2);
|
|
451
|
-
--mirai-ui-button-color-hover: var(--mirai-ui-content);
|
|
452
477
|
--mirai-ui-button-disabled-background: var(--mirai-ui-content-border);
|
|
453
478
|
--mirai-ui-button-disabled-color: var(--mirai-ui-content-light);
|
|
454
479
|
--mirai-ui-button-font-weight: var(--mirai-ui-font-weight);
|
|
@@ -679,6 +704,7 @@ This component is used to display a radio button or checkbox base on a mandatory
|
|
|
679
704
|
|
|
680
705
|
- `checked:boolean` if true, the input is checked
|
|
681
706
|
- `disabled:boolean` applying 'disabled' attribute
|
|
707
|
+
- `error:boolean` shows error style
|
|
682
708
|
- `indeterminate:boolean` applying 'indeterminate' attribute (only for type checkbox)
|
|
683
709
|
- `label:string` input label
|
|
684
710
|
- `name:string` input name
|
|
@@ -733,7 +759,7 @@ const MyComponent = () => {
|
|
|
733
759
|
|
|
734
760
|
```css
|
|
735
761
|
--mirai-ui-input-option-disabled: var(--mirai-ui-content-light);
|
|
736
|
-
--mirai-ui-input-option-
|
|
762
|
+
--mirai-ui-input-option-gap: var(--mirai-ui-space-XS);
|
|
737
763
|
--mirai-ui-input-option-padding-y: var(--mirai-ui-space-S);
|
|
738
764
|
```
|
|
739
765
|
|
|
@@ -840,7 +866,7 @@ Text input component receiving the following props:
|
|
|
840
866
|
|
|
841
867
|
- `caption:string` a support text (Ex. currency symbol)
|
|
842
868
|
- `disabled:boolean` applying 'disabled' attribute
|
|
843
|
-
- `error:boolean`
|
|
869
|
+
- `error:boolean` shows error style
|
|
844
870
|
- `hint:string` brief message
|
|
845
871
|
- `icon:string` if you want use an `<Icon>` within the component
|
|
846
872
|
- `label:string` input label
|
|
@@ -879,13 +905,13 @@ const MyComponent = (props) => {
|
|
|
879
905
|
**Theming variables**
|
|
880
906
|
|
|
881
907
|
```css
|
|
882
|
-
--mirai-ui-input-text-border: solid
|
|
908
|
+
--mirai-ui-input-text-border: solid var(--mirai-ui-border-width) var(--mirai-ui-content-border);
|
|
883
909
|
--mirai-ui-input-text-disabled: var(--mirai-ui-content-border);
|
|
884
910
|
--mirai-ui-input-text-error: var(--mirai-ui-error);
|
|
885
|
-
--mirai-ui-input-text-focus: var(--mirai-ui-
|
|
886
|
-
--mirai-ui-input-text-icon: var(--mirai-ui-font-size-headline-
|
|
887
|
-
--mirai-ui-input-text-padding-x: var(--mirai-ui-space-
|
|
888
|
-
--mirai-ui-input-text-padding-y: var(--mirai-ui-space-
|
|
911
|
+
--mirai-ui-input-text-focus: var(--mirai-ui-content);
|
|
912
|
+
--mirai-ui-input-text-icon: var(--mirai-ui-font-size-headline-3);
|
|
913
|
+
--mirai-ui-input-text-padding-x: var(--mirai-ui-space-M);
|
|
914
|
+
--mirai-ui-input-text-padding-y: var(--mirai-ui-space-XS);
|
|
889
915
|
--mirai-ui-input-text-radius: var(--mirai-ui-border-radius);
|
|
890
916
|
```
|
|
891
917
|
|
|
@@ -937,11 +963,11 @@ const MyComponent = () => {
|
|
|
937
963
|
```css
|
|
938
964
|
--mirai-ui-menu-base: var(--mirai-ui-base);
|
|
939
965
|
--mirai-ui-menu-border-radius: var(--mirai-ui-border-radius);
|
|
940
|
-
--mirai-ui-menu-min-width:
|
|
966
|
+
--mirai-ui-menu-min-width: calc(var(--mirai-ui-breakpoint-S) / 2);
|
|
941
967
|
--mirai-ui-menu-shadow: var(--mirai-ui-shadow);
|
|
942
968
|
--mirai-ui-menu-option-disabled: var(--mirai-ui-content-border);
|
|
943
|
-
--mirai-ui-menu-option-hover-background: var(--mirai-ui-
|
|
944
|
-
--mirai-ui-menu-option-hover-color: var(--mirai-ui-
|
|
969
|
+
--mirai-ui-menu-option-hover-background: var(--mirai-ui-content-background);
|
|
970
|
+
--mirai-ui-menu-option-hover-color: var(--mirai-ui-content);
|
|
945
971
|
--mirai-ui-menu-option-padding: var(--mirai-ui-space-M);
|
|
946
972
|
```
|
|
947
973
|
|
|
@@ -952,6 +978,7 @@ A modal component receiving the following props:
|
|
|
952
978
|
- `blur:bool` if you want use a _glashmorphism_ effect in the overflow
|
|
953
979
|
- `children:node`
|
|
954
980
|
- `fit:bool` if you want use fit width with the content
|
|
981
|
+
- `mobileBehavior:bool` if you want use mobile behavior
|
|
955
982
|
- `overflow:bool` wraps all modal in a semi-transparent layer
|
|
956
983
|
- `portal:bool` if you want use _portal feature_ of React API
|
|
957
984
|
- `preventDefault:bool` if you want stop the event tunneling (default true)
|
|
@@ -979,10 +1006,11 @@ const MyComponent = (props) => {
|
|
|
979
1006
|
|
|
980
1007
|
```css
|
|
981
1008
|
--mirai-ui-modal-background: var(--mirai-ui-base);
|
|
1009
|
+
--mirai-ui-modal-border-radius: calc(var(--mirai-ui-border-radius) * 2);
|
|
982
1010
|
--mirai-ui-modal-header-padding: var(--mirai-ui-space-M);
|
|
983
1011
|
--mirai-ui-modal-icon: var(--mirai-ui-font-size-headline-2);
|
|
984
1012
|
--mirai-ui-modal-layer: var(--mirai-ui-layer-L);
|
|
985
|
-
--mirai-ui-modal-overflow: rgba(
|
|
1013
|
+
--mirai-ui-modal-overflow: rgba(72, 72, 72, 0.2);
|
|
986
1014
|
--mirai-ui-modal-shadow: var(--mirai-ui-shadow);
|
|
987
1015
|
```
|
|
988
1016
|
|
|
@@ -1011,6 +1039,15 @@ const Example = (props) => (
|
|
|
1011
1039
|
);
|
|
1012
1040
|
```
|
|
1013
1041
|
|
|
1042
|
+
**Theming variables**
|
|
1043
|
+
|
|
1044
|
+
```css
|
|
1045
|
+
--mirai-ui-notification-border-radius: var(--mirai-ui-border-radius);
|
|
1046
|
+
--mirai-ui-notification-padding: var(--mirai-ui-space-S);
|
|
1047
|
+
--mirai-ui-notification-padding-large: var(--mirai-ui-space-M);
|
|
1048
|
+
--mirai-ui-notification-padding-small: var(--mirai-ui-space-XS);
|
|
1049
|
+
```
|
|
1050
|
+
|
|
1014
1051
|
### Progress
|
|
1015
1052
|
|
|
1016
1053
|
A progress component receiving the following props:
|
|
@@ -1043,15 +1080,18 @@ const MyComponent = (props) => {
|
|
|
1043
1080
|
A Slider component receiving the following props:
|
|
1044
1081
|
|
|
1045
1082
|
- `auto:bool` if you want auto slide feature (default is false).
|
|
1083
|
+
- `behavior:string` type of scroll animation
|
|
1046
1084
|
- `captions:arrayOf:string` if you want show a determinate caption for a determinate image.
|
|
1047
1085
|
- `fullScreen:boolean` if you want start in fullScreen mode.
|
|
1048
1086
|
- `height:number` Height of component (required).
|
|
1049
1087
|
- `images:arrayOf:string` images to show (required).
|
|
1050
1088
|
- `index:number` If you want show a determinate image at atart.
|
|
1089
|
+
- `indicator:boolean` if true shows the amount of pictures viewed using a progress component.
|
|
1090
|
+
- `replay:boolean` restart slider when we go forwards after the last image
|
|
1051
1091
|
- `thumbnails:arrayOf:string` if you want use thumbnails of images in fullScreen mode.
|
|
1052
1092
|
- `width:number` width of component (required).
|
|
1053
1093
|
- `onChange:function` executed when image (index) is visible
|
|
1054
|
-
- `
|
|
1094
|
+
- `onCounter:function` show a pressable counter
|
|
1055
1095
|
|
|
1056
1096
|
```jsx
|
|
1057
1097
|
import { Slider } from '@mirai/ui';
|
|
@@ -1065,9 +1105,10 @@ const MyComponent = (props) => {
|
|
|
1065
1105
|
**Theming variables**
|
|
1066
1106
|
|
|
1067
1107
|
```css
|
|
1068
|
-
--mirai-ui-slider-
|
|
1108
|
+
--mirai-ui-slider-button: var(--mirai-ui-base);
|
|
1109
|
+
--mirai-ui-slider-button-icon: var(--mirai-ui-content);
|
|
1069
1110
|
--mirai-ui-slider-overlay: rgba(0, 0, 0, 0.66);
|
|
1070
|
-
--mirai-ui-slider-color: var(--mirai-ui-base);
|
|
1111
|
+
--mirai-ui-slider-overlay-color: var(--mirai-ui-base);
|
|
1071
1112
|
--mirai-ui-slider-border-radius: var(--mirai-ui-border-radius);
|
|
1072
1113
|
```
|
|
1073
1114
|
|
|
@@ -1077,10 +1118,12 @@ This component helps you to create a pure html table receiving the following pro
|
|
|
1077
1118
|
|
|
1078
1119
|
- `dataSource:arrayOf(shape)` datasource of your model data schema
|
|
1079
1120
|
- `filter:object[]` array of filter items that are applied to the table data. Each filter item represents a specific filter configuration.
|
|
1080
|
-
- `inline:
|
|
1121
|
+
- `inline:bool` specifies whether the table should be displayed inline
|
|
1081
1122
|
- `schema:shape` the model data schema
|
|
1123
|
+
- `pagination:number` the number of rows you will paginate
|
|
1082
1124
|
- `search:string` the query string you want use for filter the datasource
|
|
1083
1125
|
- `selected:arrayOf(dataSource.row)` if you want pre-select some rows in 1st render
|
|
1126
|
+
- `sort:bool` specifies whether the table can be sorted or not
|
|
1084
1127
|
- `store:string` if you want use storage feature for some features of your table (ex. keep the current filters).
|
|
1085
1128
|
- `onPress:function` executed once press in any row
|
|
1086
1129
|
- `onScroll:function` executed once scroll the table
|
|
@@ -1144,8 +1187,8 @@ const MyComponent = () => {
|
|
|
1144
1187
|
--mirai-ui-table-color-disabled: var(--mirai-ui-content-border);
|
|
1145
1188
|
--mirai-ui-table-padding-x: var(--mirai-ui-space-M);
|
|
1146
1189
|
--mirai-ui-table-padding-y: var(--mirai-ui-space-M);
|
|
1147
|
-
--mirai-ui-table-selected-background: var(--mirai-ui-
|
|
1148
|
-
--mirai-ui-table-selected-color: var(--mirai-ui-
|
|
1190
|
+
--mirai-ui-table-selected-background: var(--mirai-ui-content-background);
|
|
1191
|
+
--mirai-ui-table-selected-color: var(--mirai-ui-content);
|
|
1149
1192
|
```
|
|
1150
1193
|
|
|
1151
1194
|
### Tooltip
|
|
@@ -1177,7 +1220,7 @@ const MyComponent = () => {
|
|
|
1177
1220
|
**Theming variables**
|
|
1178
1221
|
|
|
1179
1222
|
```css
|
|
1180
|
-
--mirai-ui-tooltip-background:
|
|
1223
|
+
--mirai-ui-tooltip-background: var(--mirai-ui-content-dark);
|
|
1181
1224
|
--mirai-ui-tooltip-border-radius: var(--mirai-ui-border-radius);
|
|
1182
1225
|
--mirai-ui-tooltip-color: var(--mirai-ui-base);
|
|
1183
1226
|
--mirai-ui-tooltip-space: var(--mirai-ui-space-XS);
|
|
@@ -1258,25 +1301,26 @@ Theme.setDirection(DIRECTION_TYPE.RIGHT);
|
|
|
1258
1301
|
|
|
1259
1302
|
```css
|
|
1260
1303
|
/* typography */
|
|
1261
|
-
--mirai-ui-font: Arial,
|
|
1262
|
-
|
|
1304
|
+
--mirai-ui-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
|
|
1305
|
+
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
1306
|
+
--mirai-ui-input-font: var(--mirai-ui-font);
|
|
1263
1307
|
--mirai-ui-font-weight: 400;
|
|
1264
|
-
--mirai-ui-font-bold:
|
|
1308
|
+
--mirai-ui-font-bold: var(--mirai-ui-font);
|
|
1265
1309
|
--mirai-ui-font-bold-weight: 700;
|
|
1266
1310
|
--mirai-ui-font-size-headline-1: 32px;
|
|
1267
|
-
--mirai-ui-line-height-headline-1:
|
|
1311
|
+
--mirai-ui-line-height-headline-1: 40px;
|
|
1268
1312
|
--mirai-ui-font-size-headline-2: 24px;
|
|
1269
|
-
--mirai-ui-line-height-headline-2:
|
|
1270
|
-
--mirai-ui-font-size-headline-3:
|
|
1271
|
-
--mirai-ui-line-height-headline-3:
|
|
1272
|
-
--mirai-ui-font-size-
|
|
1273
|
-
--mirai-ui-line-height-
|
|
1274
|
-
--mirai-ui-font-size-paragraph: 14px;
|
|
1275
|
-
--mirai-ui-line-height-paragraph: 22px;
|
|
1313
|
+
--mirai-ui-line-height-headline-2: 32px;
|
|
1314
|
+
--mirai-ui-font-size-headline-3: 20px;
|
|
1315
|
+
--mirai-ui-line-height-headline-3: 24px;
|
|
1316
|
+
--mirai-ui-font-size-paragraph: 16px;
|
|
1317
|
+
--mirai-ui-line-height-paragraph: 20px;
|
|
1276
1318
|
--mirai-ui-font-size-action: 14px;
|
|
1277
|
-
--mirai-ui-line-height-action:
|
|
1319
|
+
--mirai-ui-line-height-action: 18px;
|
|
1278
1320
|
--mirai-ui-font-size-small: 12px;
|
|
1279
|
-
--mirai-ui-line-height-small:
|
|
1321
|
+
--mirai-ui-line-height-small: 16px;
|
|
1322
|
+
--mirai-ui-font-size-tiny: 10px;
|
|
1323
|
+
--mirai-ui-line-height-tiny: 12px;
|
|
1280
1324
|
--mirai-ui-text-direction: ltr;
|
|
1281
1325
|
--mirai-ui-text-align: left;
|
|
1282
1326
|
|
|
@@ -1285,35 +1329,34 @@ Theme.setDirection(DIRECTION_TYPE.RIGHT);
|
|
|
1285
1329
|
|
|
1286
1330
|
--mirai-ui-content: #484848;
|
|
1287
1331
|
--mirai-ui-content-background: #f6f6f6;
|
|
1288
|
-
--mirai-ui-content-border: #
|
|
1332
|
+
--mirai-ui-content-border: #dedede;
|
|
1333
|
+
--mirai-ui-content-light: #6e6e6e;
|
|
1289
1334
|
--mirai-ui-content-dark: #202020;
|
|
1290
|
-
--mirai-ui-content-light: #999999;
|
|
1291
1335
|
|
|
1292
1336
|
--mirai-ui-accent: #3978c5;
|
|
1293
1337
|
--mirai-ui-accent-background: #e9f1fc;
|
|
1294
1338
|
--mirai-ui-accent-border: #b0c9e8;
|
|
1295
|
-
--mirai-ui-accent-dark: #224876;
|
|
1296
1339
|
--mirai-ui-accent-light: #88aedc;
|
|
1340
|
+
--mirai-ui-accent-dark: #224876;
|
|
1297
1341
|
|
|
1298
|
-
--mirai-ui-error: #
|
|
1299
|
-
--mirai-ui-error-background: #
|
|
1300
|
-
--mirai-ui-error-border: #
|
|
1301
|
-
--mirai-ui-error-dark: #7d2828;
|
|
1302
|
-
--mirai-ui-error-light: #ee9191;
|
|
1342
|
+
--mirai-ui-error: #d32f2f;
|
|
1343
|
+
--mirai-ui-error-background: #fdeded;
|
|
1344
|
+
--mirai-ui-error-border: #fad6d6;
|
|
1303
1345
|
|
|
1304
|
-
--mirai-ui-
|
|
1305
|
-
--mirai-ui-
|
|
1306
|
-
--mirai-ui-
|
|
1307
|
-
--mirai-ui-success-dark: #317159;
|
|
1308
|
-
--mirai-ui-success-light: #a3e6cd;
|
|
1346
|
+
--mirai-ui-warning: #663c00;
|
|
1347
|
+
--mirai-ui-warning-background: #fff4e5;
|
|
1348
|
+
--mirai-ui-warning-border: #ffe5c2;
|
|
1309
1349
|
|
|
1310
|
-
--mirai-ui-
|
|
1311
|
-
--mirai-ui-
|
|
1312
|
-
--mirai-ui-
|
|
1313
|
-
|
|
1314
|
-
--mirai-ui-
|
|
1350
|
+
--mirai-ui-success: #1e4620;
|
|
1351
|
+
--mirai-ui-success-background: #edf7ed;
|
|
1352
|
+
--mirai-ui-success-border: #d5ecd5;
|
|
1353
|
+
|
|
1354
|
+
--mirai-ui-info: #014361;
|
|
1355
|
+
--mirai-ui-info-background: #e6f5fd;
|
|
1356
|
+
--mirai-ui-info-border: #c6e8fa;
|
|
1315
1357
|
|
|
1316
1358
|
/* spacing */
|
|
1359
|
+
--mirai-ui-space-XXS: 4px;
|
|
1317
1360
|
--mirai-ui-space-XS: 8px;
|
|
1318
1361
|
--mirai-ui-space-S: 12px;
|
|
1319
1362
|
--mirai-ui-space-M: 16px;
|
|
@@ -1323,7 +1366,7 @@ Theme.setDirection(DIRECTION_TYPE.RIGHT);
|
|
|
1323
1366
|
|
|
1324
1367
|
/* breakpoints */
|
|
1325
1368
|
--mirai-ui-breakpoint-S: 430px;
|
|
1326
|
-
--mirai-ui-breakpoint-M:
|
|
1369
|
+
--mirai-ui-breakpoint-M: 820px;
|
|
1327
1370
|
--mirai-ui-breakpoint-content: 1280px;
|
|
1328
1371
|
|
|
1329
1372
|
/* motion */
|
|
@@ -1340,7 +1383,12 @@ Theme.setDirection(DIRECTION_TYPE.RIGHT);
|
|
|
1340
1383
|
--mirai-ui-border-width: 1px;
|
|
1341
1384
|
|
|
1342
1385
|
/* shadow */
|
|
1343
|
-
--mirai-ui-shadow: 0 0 var(--mirai-ui-space-
|
|
1386
|
+
--mirai-ui-shadow: 0 0 var(--mirai-ui-space-S) rgba(0, 0, 0, 0.1);
|
|
1387
|
+
|
|
1388
|
+
/* focus */
|
|
1389
|
+
--mirai-ui-focus-color: var(--mirai-ui-content);
|
|
1390
|
+
--mirai-ui-focus-shadow: 0 0 0 var(--mirai-ui-space-XXS) var(--mirai-ui-content-border);
|
|
1391
|
+
--mirai-ui-focus-shadow-error: 0 0 0 var(--mirai-ui-space-XXS) var(--mirai-ui-error-border);
|
|
1344
1392
|
```
|
|
1345
1393
|
|
|
1346
1394
|
## Hooks
|
|
@@ -1367,8 +1415,9 @@ This _hook_ can help you know what type of device your application or component
|
|
|
1367
1415
|
- `isLandscape:bool` orientation is landscape
|
|
1368
1416
|
- `isPortrait:bool` orientation is portrait
|
|
1369
1417
|
<!-- type -->
|
|
1370
|
-
- `isMobile:bool` is in the mobile breakpoint (
|
|
1371
|
-
- `
|
|
1418
|
+
- `isMobile:bool` is in the mobile breakpoint (<=430)
|
|
1419
|
+
- `isTable:bool` is in the mobile breakpoint (>430px && <=820px)
|
|
1420
|
+
- `isDesktop:bool` in in the desktop breakpoint (>820px)
|
|
1372
1421
|
|
|
1373
1422
|
Let's see a simple use of the hook:
|
|
1374
1423
|
|
|
@@ -28,7 +28,7 @@ var Action = function Action(_ref) {
|
|
|
28
28
|
large = _ref.large,
|
|
29
29
|
small = _ref.small,
|
|
30
30
|
_ref$tag = _ref.tag,
|
|
31
|
-
tag = _ref$tag === void 0 ? '
|
|
31
|
+
tag = _ref$tag === void 0 ? 'button' : _ref$tag,
|
|
32
32
|
target = _ref.target,
|
|
33
33
|
underline = _ref.underline,
|
|
34
34
|
wide = _ref.wide,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.js","names":["Action","bold","children","disabled","href","inline","large","small","tag","target","underline","wide","onPress","others","React","createElement","Pressable","role","event","window","open","location","className","styles","style","action","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 inline,\n large,\n small,\n tag = '
|
|
1
|
+
{"version":3,"file":"Action.js","names":["Action","bold","children","disabled","href","inline","large","small","tag","target","underline","wide","onPress","others","React","createElement","Pressable","role","event","window","open","location","className","styles","style","action","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 inline,\n large,\n small,\n tag = 'button',\n target,\n underline,\n wide,\n onPress,\n ...others\n}) =>\n React.createElement(\n Pressable,\n {\n ...others,\n disabled,\n href,\n role: others.role || 'action',\n tag: href ? 'a' : tag,\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 inline && style.inline,\n large && style.large,\n small && style.small,\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 inline: PropTypes.bool,\n large: PropTypes.bool,\n small: PropTypes.bool,\n tag: PropTypes.string,\n target: PropTypes.string,\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,MAAM,QAANA,MAAM;IACNC,KAAK,QAALA,KAAK;IACLC,KAAK,QAALA,KAAK;IAAA,gBACLC,GAAG;IAAHA,GAAG,yBAAG,QAAQ;IACdC,MAAM,QAANA,MAAM;IACNC,SAAS,QAATA,SAAS;IACTC,IAAI,QAAJA,IAAI;IACJC,QAAO,QAAPA,OAAO;IACJC,MAAM;EAAA,oBAETC,cAAK,CAACC,aAAa,CACjBC,qBAAS,kCAEJH,MAAM;IACTV,QAAQ,EAARA,QAAQ;IACRC,IAAI,EAAJA,IAAI;IACJa,IAAI,EAAEJ,MAAM,CAACI,IAAI,IAAI,QAAQ;IAC7BT,GAAG,EAAEJ,IAAI,GAAG,GAAG,GAAGI,GAAG;IACrBI,OAAO,EAAE,iBAACM,KAAK,EAAK;MAClBN,QAAO,IAAIA,QAAO,CAACM,KAAK,CAAC;MACzB,IAAId,IAAI,IAAIK,MAAM,EAAEU,MAAM,CAACC,IAAI,CAAChB,IAAI,EAAEK,MAAM,CAAC,CAAC,KACzC,IAAIL,IAAI,EAAEe,MAAM,CAACE,QAAQ,GAAGjB,IAAI;IACvC,CAAC;IACDkB,SAAS,EAAE,IAAAC,eAAM,EACfC,qBAAK,CAACC,MAAM,EACZxB,IAAI,IAAIuB,qBAAK,CAACvB,IAAI,EAClBE,QAAQ,IAAIqB,qBAAK,CAACrB,QAAQ,EAC1BE,MAAM,IAAImB,qBAAK,CAACnB,MAAM,EACtBC,KAAK,IAAIkB,qBAAK,CAAClB,KAAK,EACpBC,KAAK,IAAIiB,qBAAK,CAACjB,KAAK,EACpBG,SAAS,IAAIc,qBAAK,CAACd,SAAS,EAC5BC,IAAI,IAAIa,qBAAK,CAACb,IAAI,EAClBE,MAAM,CAACS,SAAS;EACjB,IAEHpB,QAAQ,CACT;AAAA;AAAC;AAEJF,MAAM,CAAC0B,WAAW,GAAG,kBAAkB;AAEvC1B,MAAM,CAAC2B,SAAS,GAAG;EACjB1B,IAAI,EAAE2B,kBAAS,CAACC,IAAI;EACpB3B,QAAQ,EAAE0B,kBAAS,CAACE,SAAS,CAAC,CAACF,kBAAS,CAACG,MAAM,EAAEH,kBAAS,CAACI,IAAI,CAAC,CAAC;EACjE7B,QAAQ,EAAEyB,kBAAS,CAACC,IAAI;EACxBzB,IAAI,EAAEwB,kBAAS,CAACG,MAAM;EACtB1B,MAAM,EAAEuB,kBAAS,CAACC,IAAI;EACtBvB,KAAK,EAAEsB,kBAAS,CAACC,IAAI;EACrBtB,KAAK,EAAEqB,kBAAS,CAACC,IAAI;EACrBrB,GAAG,EAAEoB,kBAAS,CAACG,MAAM;EACrBtB,MAAM,EAAEmB,kBAAS,CAACG,MAAM;EACxBrB,SAAS,EAAEkB,kBAAS,CAACC,IAAI;EACzBlB,IAAI,EAAEiB,kBAAS,CAACC,IAAI;EACpBI,OAAO,EAAEL,kBAAS,CAACM,IAAI;EACvBC,OAAO,EAAEP,kBAAS,CAACM,IAAI;EACvBtB,OAAO,EAAEgB,kBAAS,CAACM;AACrB,CAAC"}
|
|
@@ -10,10 +10,6 @@
|
|
|
10
10
|
width: fit-content;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.action:not(.disabled):hover {
|
|
14
|
-
color: var(--mirai-ui-content);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
13
|
.action.bold {
|
|
18
14
|
font-family: var(--mirai-ui-font-bold);
|
|
19
15
|
font-weight: var(--mirai-ui-font-bold-weight);
|
|
@@ -24,8 +20,9 @@
|
|
|
24
20
|
color: var(--mirai-ui-action-color-disabled);
|
|
25
21
|
}
|
|
26
22
|
|
|
27
|
-
.action:not(.disabled):
|
|
28
|
-
|
|
23
|
+
.action:not(.disabled):focus,
|
|
24
|
+
.action:not(.disabled):hover {
|
|
25
|
+
color: var(--mirai-ui-focus-color);
|
|
29
26
|
}
|
|
30
27
|
|
|
31
28
|
.action:not(.inline):not(.large):not(.small) {
|
|
@@ -58,5 +55,5 @@
|
|
|
58
55
|
}
|
|
59
56
|
|
|
60
57
|
.action * {
|
|
61
|
-
margin-right:
|
|
58
|
+
margin-right: var(--mirai-ui-space-XXS);
|
|
62
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.stories.js","names":["title","Story","props","storyName","args","children","ICON","INFO","disabled","href","icon","inline","large","small","tag","target","underline","wide","testId","style","argTypes","onEnter","action","onLeave","onPress"],"sources":["../../../src/components/Action/Action.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { Action } from './Action';\nimport { Icon, ICON } from '../../primitives/Icon';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <Action {...props} />;\n\nStory.storyName = 'Action';\n\nStory.args = {\n children: (\n <>\n <Icon value={ICON.INFO} />\n children\n </>\n ),\n disabled: false,\n href: '',\n icon: '',\n inline: false,\n large: false,\n small: false,\n tag: '
|
|
1
|
+
{"version":3,"file":"Action.stories.js","names":["title","Story","props","storyName","args","children","ICON","INFO","disabled","href","icon","inline","large","small","tag","target","underline","wide","testId","style","argTypes","onEnter","action","onLeave","onPress"],"sources":["../../../src/components/Action/Action.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { Action } from './Action';\nimport { Icon, ICON } from '../../primitives/Icon';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => <Action {...props} />;\n\nStory.storyName = 'Action';\n\nStory.args = {\n children: (\n <>\n <Icon value={ICON.INFO} />\n children\n </>\n ),\n disabled: false,\n href: '',\n icon: '',\n inline: false,\n large: false,\n small: false,\n tag: 'button',\n target: '',\n underline: false,\n wide: false,\n // inherited properties\n testId: 'test-story',\n style: {},\n};\n\nStory.argTypes = {\n onEnter: { action: 'onEnter' },\n onLeave: { action: 'onLeave' },\n onPress: { action: 'onPress' },\n};\n"],"mappings":";;;;;;AAAA;AAEA;AACA;AAAmD;AAAA,eAEpC;EAAEA,KAAK,EAAE;AAAa,CAAC;AAAA;AAE/B,IAAMC,KAAK,GAAG,SAARA,KAAK,CAAIC,KAAK;EAAA,oBAAK,6BAAC,cAAM,EAAKA,KAAK,CAAI;AAAA;AAAC;AAEtDD,KAAK,CAACE,SAAS,GAAG,QAAQ;AAE1BF,KAAK,CAACG,IAAI,GAAG;EACXC,QAAQ,eACN,yEACE,6BAAC,UAAI;IAAC,KAAK,EAAEC,UAAI,CAACC;EAAK,EAAG,aAG7B;EACDC,QAAQ,EAAE,KAAK;EACfC,IAAI,EAAE,EAAE;EACRC,IAAI,EAAE,EAAE;EACRC,MAAM,EAAE,KAAK;EACbC,KAAK,EAAE,KAAK;EACZC,KAAK,EAAE,KAAK;EACZC,GAAG,EAAE,QAAQ;EACbC,MAAM,EAAE,EAAE;EACVC,SAAS,EAAE,KAAK;EAChBC,IAAI,EAAE,KAAK;EACX;EACAC,MAAM,EAAE,YAAY;EACpBC,KAAK,EAAE,CAAC;AACV,CAAC;AAEDlB,KAAK,CAACmB,QAAQ,GAAG;EACfC,OAAO,EAAE;IAAEC,MAAM,EAAE;EAAU,CAAC;EAC9BC,OAAO,EAAE;IAAED,MAAM,EAAE;EAAU,CAAC;EAC9BE,OAAO,EAAE;IAAEF,MAAM,EAAE;EAAU;AAC/B,CAAC"}
|