@mirai/ui 1.0.49 → 1.0.51
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 +201 -0
- package/build/components/Button/Button.js +4 -2
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/Button/Button.module.css +4 -0
- package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +10 -0
- package/build/components/Menu/Menu.Option.js +9 -5
- package/build/components/Menu/Menu.Option.js.map +1 -1
- package/build/components/Menu/Menu.js +4 -4
- package/build/components/Menu/Menu.js.map +1 -1
- package/build/components/Menu/Menu.module.css +24 -12
- package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +24 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,6 +85,14 @@ const MyComponent = () => (
|
|
|
85
85
|
);
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
**Theming variables**
|
|
89
|
+
|
|
90
|
+
```css
|
|
91
|
+
--mirai-ui-input-background: var(--mirai-ui-base);
|
|
92
|
+
--mirai-ui-input-color: var(--mirai-ui-content);
|
|
93
|
+
--mirai-ui-input-disabled: var(--mirai-ui-content-light);
|
|
94
|
+
```
|
|
95
|
+
|
|
88
96
|
### Layer
|
|
89
97
|
|
|
90
98
|
This primitive returns an element that displays with relative position to other element based on the following props:
|
|
@@ -119,6 +127,12 @@ const MyComponent = () => {
|
|
|
119
127
|
};
|
|
120
128
|
```
|
|
121
129
|
|
|
130
|
+
**Theming variables**
|
|
131
|
+
|
|
132
|
+
```css
|
|
133
|
+
--mirai-ui-layer-content: var(--mirai-ui-layer-XL);
|
|
134
|
+
```
|
|
135
|
+
|
|
122
136
|
### Pressable
|
|
123
137
|
|
|
124
138
|
This primitive returns pressable elements based on the following properties:
|
|
@@ -168,6 +182,16 @@ const MyComponent = () => (
|
|
|
168
182
|
</View>
|
|
169
183
|
```
|
|
170
184
|
|
|
185
|
+
**Theming variables**
|
|
186
|
+
|
|
187
|
+
```css
|
|
188
|
+
--mirai-ui-radio-base: var(--mirai-ui-base);
|
|
189
|
+
--mirai-ui-radio-border: var(--mirai-ui-content-light);
|
|
190
|
+
--mirai-ui-radio-checked: var(--mirai-ui-accent);
|
|
191
|
+
--mirai-ui-radio-disabled: var(--mirai-ui-content-border);
|
|
192
|
+
--mirai-ui-radio-size: var(--mirai-ui-space-L);
|
|
193
|
+
```
|
|
194
|
+
|
|
171
195
|
### ScrollView
|
|
172
196
|
|
|
173
197
|
This primitive is used to make vertically scrollable views and receives the following props:
|
|
@@ -259,6 +283,7 @@ A button component that receives the following props:
|
|
|
259
283
|
- `small:boolean` modifying the button size
|
|
260
284
|
- `squared:boolean` if true gives rectangular shape to the button (false by default)
|
|
261
285
|
- `tag:string` html tag of resulting element ('button' by default)
|
|
286
|
+
- `wide:bool` modifying the button to full-width
|
|
262
287
|
- `onEnter:function` executed when the user hovers over
|
|
263
288
|
- `onLeave:function` executed when the user hovers away
|
|
264
289
|
- `onPress:function` executed on mouse click on the element
|
|
@@ -277,6 +302,26 @@ const MyComponent = (props) => {
|
|
|
277
302
|
};
|
|
278
303
|
```
|
|
279
304
|
|
|
305
|
+
**Theming variables**
|
|
306
|
+
|
|
307
|
+
```css
|
|
308
|
+
--mirai-ui-button-background: var(--mirai-ui-accent);
|
|
309
|
+
--mirai-ui-button-busy-width: 0%;
|
|
310
|
+
--mirai-ui-button-busy-motion: calc(var(--mirai-ui-motion-expand) * 10);
|
|
311
|
+
--mirai-ui-button-color: var(--mirai-ui-base);
|
|
312
|
+
--mirai-ui-button-color-active: rgba(255, 255, 255, 0.2);
|
|
313
|
+
--mirai-ui-button-color-focus: var(--mirai-ui-content);
|
|
314
|
+
--mirai-ui-button-disabled-background: var(--mirai-ui-content-border);
|
|
315
|
+
--mirai-ui-button-disabled-color: var(--mirai-ui-content-light);
|
|
316
|
+
--mirai-ui-button-font: var(--mirai-ui-font);
|
|
317
|
+
--mirai-ui-button-font-weight: var(--mirai-ui-font-weight);
|
|
318
|
+
--mirai-ui-button-outlined-background: var(--mirai-ui-base);
|
|
319
|
+
--mirai-ui-button-padding-y: var(--mirai-ui-space-S);
|
|
320
|
+
--mirai-ui-button-padding-x: var(--mirai-ui-space-L);
|
|
321
|
+
--mirai-ui-button-radius: var(--mirai-ui-border-radius);
|
|
322
|
+
--mirai-ui-button-squared: calc(var(--mirai-ui-space-M) * 2);
|
|
323
|
+
```
|
|
324
|
+
|
|
280
325
|
### Calendar
|
|
281
326
|
|
|
282
327
|
A calendar component that receives the following props:
|
|
@@ -325,6 +370,20 @@ const MyComponent = props => {
|
|
|
325
370
|
}
|
|
326
371
|
```
|
|
327
372
|
|
|
373
|
+
**Theming variables**
|
|
374
|
+
|
|
375
|
+
```css
|
|
376
|
+
--mirai-ui-calendar-caption-color: var(--mirai-ui-content-light);
|
|
377
|
+
--mirai-ui-calendar-cell: var(--mirai-ui-space-XL);
|
|
378
|
+
--mirai-ui-calendar-highlight-color: var(--mirai-ui-accent);
|
|
379
|
+
--mirai-ui-calendar-padding: var(--mirai-ui-space-XS);
|
|
380
|
+
--mirai-ui-calendar-range-background: var(--mirai-ui-content-background);
|
|
381
|
+
--mirai-ui-calendar-selected-background: var(--mirai-ui-accent);
|
|
382
|
+
--mirai-ui-calendar-selected-color: var(--mirai-ui-base);
|
|
383
|
+
--mirai-ui-calendar-weekday-color: var(--mirai-ui-content-light);
|
|
384
|
+
--mirai-ui-calendar-week-margin: 2px;
|
|
385
|
+
```
|
|
386
|
+
|
|
328
387
|
### InputNumber
|
|
329
388
|
|
|
330
389
|
Input number component controlling the value with 2 buttons. Receives the following props:
|
|
@@ -350,6 +409,12 @@ const MyComponent = (props) => {
|
|
|
350
409
|
};
|
|
351
410
|
```
|
|
352
411
|
|
|
412
|
+
**Theming variables**
|
|
413
|
+
|
|
414
|
+
```css
|
|
415
|
+
--mirai-ui-input-number-value-width: var(--mirai-ui-space-XL);
|
|
416
|
+
```
|
|
417
|
+
|
|
353
418
|
### InputOption
|
|
354
419
|
|
|
355
420
|
This component is used to display a radio button or checkbox base on a mandatory string prop `type`. It receives the following props:
|
|
@@ -404,6 +469,14 @@ const MyComponent = () => {
|
|
|
404
469
|
};
|
|
405
470
|
```
|
|
406
471
|
|
|
472
|
+
**Theming variables**
|
|
473
|
+
|
|
474
|
+
```css
|
|
475
|
+
--mirai-ui-input-option-disabled: var(--mirai-ui-content-light);
|
|
476
|
+
--mirai-ui-input-option-label-margin: var(--mirai-ui-space-S);
|
|
477
|
+
--mirai-ui-input-option-padding-y: var(--mirai-ui-space-S);
|
|
478
|
+
```
|
|
479
|
+
|
|
407
480
|
### InputText
|
|
408
481
|
|
|
409
482
|
Text input component receiving the following props:
|
|
@@ -440,6 +513,19 @@ const MyComponent = (props) => {
|
|
|
440
513
|
};
|
|
441
514
|
```
|
|
442
515
|
|
|
516
|
+
**Theming variables**
|
|
517
|
+
|
|
518
|
+
```css
|
|
519
|
+
--mirai-ui-input-text-border: solid 1px var(--mirai-ui-content-border);
|
|
520
|
+
--mirai-ui-input-text-disabled: var(--mirai-ui-content-border);
|
|
521
|
+
--mirai-ui-input-text-error: var(--mirai-ui-error);
|
|
522
|
+
--mirai-ui-input-text-focus: var(--mirai-ui-accent);
|
|
523
|
+
--mirai-ui-input-text-icon: var(--mirai-ui-icon);
|
|
524
|
+
--mirai-ui-input-text-padding-x: var(--mirai-ui-space-S);
|
|
525
|
+
--mirai-ui-input-text-padding-y: var(--mirai-ui-space-S);
|
|
526
|
+
--mirai-ui-input-text-radius: var(--mirai-ui-border-radius);
|
|
527
|
+
```
|
|
528
|
+
|
|
443
529
|
### Menu
|
|
444
530
|
|
|
445
531
|
This component helps you to create a menu over a determinate component receiving the following props:
|
|
@@ -482,6 +568,19 @@ const MyComponent = () => {
|
|
|
482
568
|
};
|
|
483
569
|
```
|
|
484
570
|
|
|
571
|
+
**Theming variables**
|
|
572
|
+
|
|
573
|
+
```css
|
|
574
|
+
--mirai-ui-menu-base: var(--mirai-ui-base);
|
|
575
|
+
--mirai-ui-menu-border-radius: var(--mirai-ui-border-radius);
|
|
576
|
+
--mirai-ui-menu-min-width: 192px;
|
|
577
|
+
--mirai-ui-menu-shadow: var(--mirai-ui-shadow);
|
|
578
|
+
--mirai-ui-menu-option-disabled: var(--mirai-ui-content-border);
|
|
579
|
+
--mirai-ui-menu-option-hover-background: var(--mirai-ui-accent);
|
|
580
|
+
--mirai-ui-menu-option-hover-color: var(--mirai-ui-base);
|
|
581
|
+
--mirai-ui-menu-option-padding: var(--mirai-ui-space-M);
|
|
582
|
+
```
|
|
583
|
+
|
|
485
584
|
### Modal
|
|
486
585
|
|
|
487
586
|
A modal component receiving the following props:
|
|
@@ -508,6 +607,17 @@ const MyComponent = (props) => {
|
|
|
508
607
|
};
|
|
509
608
|
```
|
|
510
609
|
|
|
610
|
+
**Theming variables**
|
|
611
|
+
|
|
612
|
+
```css
|
|
613
|
+
--mirai-ui-modal-background: var(--mirai-ui-base);
|
|
614
|
+
--mirai-ui-modal-header-padding: var(--mirai-ui-space-M);
|
|
615
|
+
--mirai-ui-modal-icon: var(--mirai-ui-space-L);
|
|
616
|
+
--mirai-ui-modal-layer: var(--mirai-ui-layer-L);
|
|
617
|
+
--mirai-ui-modal-overflow: rgba(0, 0, 0, 0.15);
|
|
618
|
+
--mirai-ui-modal-shadow: var(--mirai-ui-shadow);
|
|
619
|
+
```
|
|
620
|
+
|
|
511
621
|
### Tooltip
|
|
512
622
|
|
|
513
623
|
This component helps you to create a tooltip over a determinate component receiving the following props:
|
|
@@ -529,6 +639,16 @@ const MyComponent = () => {
|
|
|
529
639
|
};
|
|
530
640
|
```
|
|
531
641
|
|
|
642
|
+
**Theming variables**
|
|
643
|
+
|
|
644
|
+
```css
|
|
645
|
+
--mirai-ui-tooltip-background: rgba(0, 0, 0, 0.8);
|
|
646
|
+
--mirai-ui-tooltip-border-radius: var(--mirai-ui-border-radius);
|
|
647
|
+
--mirai-ui-tooltip-color: var(--mirai-ui-base);
|
|
648
|
+
--mirai-ui-tooltip-space: var(--mirai-ui-space-XS);
|
|
649
|
+
--mirai-ui-tooltip-max-width: calc(var(--mirai-ui-space-XXL) * 4);
|
|
650
|
+
```
|
|
651
|
+
|
|
532
652
|
## Theme
|
|
533
653
|
|
|
534
654
|
Styles can be customised by using Theme utility.
|
|
@@ -578,6 +698,86 @@ Theme.shadeColors()
|
|
|
578
698
|
ACCENT:200 #edffff
|
|
579
699
|
```
|
|
580
700
|
|
|
701
|
+
### List of Theming variables
|
|
702
|
+
|
|
703
|
+
```css
|
|
704
|
+
/* typography */
|
|
705
|
+
--mirai-ui-font: Arial, Regular;
|
|
706
|
+
--mirai-ui-input-font: Arial, Regular;
|
|
707
|
+
--mirai-ui-font-weight: 400;
|
|
708
|
+
--mirai-ui-font-bold: Arial, Regular;
|
|
709
|
+
--mirai-ui-font-bold-weight: 700;
|
|
710
|
+
--mirai-ui-font-size-headline: 18px;
|
|
711
|
+
--mirai-ui-font-size-subheadline: 16px;
|
|
712
|
+
--mirai-ui-font-size-paragraph: 14px;
|
|
713
|
+
--mirai-ui-font-size-action: 14px;
|
|
714
|
+
--mirai-ui-font-size-small: 12px;
|
|
715
|
+
--mirai-ui-line-height: 24px;
|
|
716
|
+
--mirai-ui-text-direction: ltr;
|
|
717
|
+
--mirai-ui-text-align: left;
|
|
718
|
+
|
|
719
|
+
/* palette */
|
|
720
|
+
--mirai-ui-base: #ffffff;
|
|
721
|
+
/* !TODO: Change to -text ------------------------------------------------- */
|
|
722
|
+
--mirai-ui-content: #484848;
|
|
723
|
+
--mirai-ui-content-background: #f6f6f6;
|
|
724
|
+
--mirai-ui-content-border: #e4e4e4;
|
|
725
|
+
--mirai-ui-content-dark: #202020;
|
|
726
|
+
--mirai-ui-content-light: #999999;
|
|
727
|
+
/* !TODO ------------------------------------------------------------------ */
|
|
728
|
+
|
|
729
|
+
--mirai-ui-accent: #3978c5;
|
|
730
|
+
--mirai-ui-accent-background: #e9f1fc;
|
|
731
|
+
--mirai-ui-accent-border: #b0c9e8;
|
|
732
|
+
--mirai-ui-accent-dark: #224876;
|
|
733
|
+
--mirai-ui-accent-light: #88aedc;
|
|
734
|
+
|
|
735
|
+
--mirai-ui-error: #d14343;
|
|
736
|
+
--mirai-ui-error-background: #fdf4f4;
|
|
737
|
+
--mirai-ui-error-border: #f4b6b6;
|
|
738
|
+
--mirai-ui-error-dark: #7d2828;
|
|
739
|
+
--mirai-ui-error-light: #ee9191;
|
|
740
|
+
|
|
741
|
+
--mirai-ui-success: #52bd94;
|
|
742
|
+
--mirai-ui-success-background: #f5fbf8;
|
|
743
|
+
--mirai-ui-success-border: #dcf2ea;
|
|
744
|
+
--mirai-ui-success-dark: #317159;
|
|
745
|
+
--mirai-ui-success-light: #a3e6cd;
|
|
746
|
+
|
|
747
|
+
--mirai-ui-warning: #ffb020;
|
|
748
|
+
--mirai-ui-warning-background: #fffaf1;
|
|
749
|
+
--mirai-ui-warning-border: #ffdfa6;
|
|
750
|
+
--mirai-ui-warning-dark: #66460d;
|
|
751
|
+
--mirai-ui-warning-light: #ffd079;
|
|
752
|
+
|
|
753
|
+
/* spacing */
|
|
754
|
+
--mirai-ui-space-XS: 8px;
|
|
755
|
+
--mirai-ui-space-S: 12px;
|
|
756
|
+
--mirai-ui-space-M: 16px;
|
|
757
|
+
--mirai-ui-space-L: 24px;
|
|
758
|
+
--mirai-ui-space-XL: 48px;
|
|
759
|
+
--mirai-ui-space-XXL: 64px;
|
|
760
|
+
|
|
761
|
+
/* layer */
|
|
762
|
+
--mirai-ui-layer-S: 0;
|
|
763
|
+
--mirai-ui-layer-M: 1;
|
|
764
|
+
--mirai-ui-layer-L: 10;
|
|
765
|
+
--mirai-ui-layer-XL: 100;
|
|
766
|
+
|
|
767
|
+
/* motion */
|
|
768
|
+
--mirai-ui-motion-collapse: 200ms;
|
|
769
|
+
--mirai-ui-motion-expand: 300ms;
|
|
770
|
+
--mirai-ui-motion-easing: cubic-bezier(0.1, 0.1, 0.25, 0.9);
|
|
771
|
+
|
|
772
|
+
/* input */
|
|
773
|
+
--mirai-ui-input-font-size: var(--mirai-ui-font-size-paragraph);
|
|
774
|
+
--mirai-ui-input-min-height: var(--mirai-ui-space-XL);
|
|
775
|
+
|
|
776
|
+
/* defaults */
|
|
777
|
+
--mirai-ui-border-radius: 4px;
|
|
778
|
+
--mirai-ui-shadow: 0 0 var(--mirai-ui-space-XS) var(--mirai-ui-content-border);
|
|
779
|
+
```
|
|
780
|
+
|
|
581
781
|
## Hooks
|
|
582
782
|
|
|
583
783
|
a repository of hooks which will help you create simpler solutions.
|
|
@@ -587,6 +787,7 @@ a repository of hooks which will help you create simpler solutions.
|
|
|
587
787
|
This _hook_ can help you know what type of device your application or component is running on. Lets see the properties that this _hook_ is going to expose for you:
|
|
588
788
|
|
|
589
789
|
<!-- screen -->
|
|
790
|
+
|
|
590
791
|
- `height:number` height resolution of device
|
|
591
792
|
- `width:number` width resolution of device
|
|
592
793
|
<!-- navigator -->
|
|
@@ -15,7 +15,7 @@ var _primitives = require("../../primitives");
|
|
|
15
15
|
|
|
16
16
|
var _ButtonModule = _interopRequireDefault(require("./Button.module.css"));
|
|
17
17
|
|
|
18
|
-
var _excluded = ["busy", "children", "disabled", "large", "outlined", "rounded", "small", "squared", "tag", "onPress"];
|
|
18
|
+
var _excluded = ["busy", "children", "disabled", "large", "outlined", "rounded", "small", "squared", "tag", "wide", "onPress"];
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
@@ -41,13 +41,14 @@ var Button = function Button(_ref) {
|
|
|
41
41
|
squared = _ref$squared === void 0 ? false : _ref$squared,
|
|
42
42
|
_ref$tag = _ref.tag,
|
|
43
43
|
tag = _ref$tag === void 0 ? 'button' : _ref$tag,
|
|
44
|
+
wide = _ref.wide,
|
|
44
45
|
onPress = _ref.onPress,
|
|
45
46
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
46
47
|
|
|
47
48
|
return /*#__PURE__*/_react.default.createElement(_primitives.Pressable, _objectSpread(_objectSpread({}, others), {}, {
|
|
48
49
|
disabled: disabled || busy,
|
|
49
50
|
tag: tag,
|
|
50
|
-
className: (0, _helpers.styles)(_ButtonModule.default.button, busy && _ButtonModule.default.busy, large && _ButtonModule.default.large, small && _ButtonModule.default.small, rounded && _ButtonModule.default.rounded, squared && _ButtonModule.default.squared, outlined && _ButtonModule.default.outlined, outlined && (disabled || busy) && _ButtonModule.default.disabled, others.className),
|
|
51
|
+
className: (0, _helpers.styles)(_ButtonModule.default.button, busy && _ButtonModule.default.busy, large && _ButtonModule.default.large, small && _ButtonModule.default.small, rounded && _ButtonModule.default.rounded, squared && _ButtonModule.default.squared, outlined && _ButtonModule.default.outlined, outlined && (disabled || busy) && _ButtonModule.default.disabled, wide && _ButtonModule.default.wide, others.className),
|
|
51
52
|
onPress: !disabled && !busy ? onPress : undefined
|
|
52
53
|
}), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, busy !== undefined && /*#__PURE__*/_react.default.createElement(_primitives.View, {
|
|
53
54
|
className: (0, _helpers.styles)(_ButtonModule.default.busyProgress, busy && _ButtonModule.default.active)
|
|
@@ -66,6 +67,7 @@ Button.propTypes = {
|
|
|
66
67
|
small: _propTypes.default.bool,
|
|
67
68
|
squared: _propTypes.default.bool,
|
|
68
69
|
tag: _propTypes.default.string,
|
|
70
|
+
wide: _propTypes.default.bool,
|
|
69
71
|
onEnter: _propTypes.default.func,
|
|
70
72
|
onLeave: _propTypes.default.func,
|
|
71
73
|
onPress: _propTypes.default.func
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":["Button","busy","children","disabled","large","outlined","rounded","small","squared","tag","onPress","others","React","createElement","Pressable","className","style","button","undefined","busyProgress","active","displayName","propTypes","PropTypes","bool","oneOfType","string","node","onEnter","func","onLeave"],"sources":["../../../src/components/Button/Button.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Pressable, View } from '../../primitives';\nimport style from './Button.module.css';\n\nconst Button = ({\n busy,\n children,\n disabled,\n large,\n outlined,\n rounded,\n small,\n squared = false,\n tag = 'button',\n onPress,\n ...others\n}) =>\n React.createElement(\n Pressable,\n {\n ...others,\n disabled: disabled || busy,\n tag,\n className: styles(\n style.button,\n busy && style.busy,\n large && style.large,\n small && style.small,\n rounded && style.rounded,\n squared && style.squared,\n outlined && style.outlined,\n outlined && (disabled || busy) && style.disabled,\n others.className,\n ),\n onPress: !disabled && !busy ? onPress : undefined,\n },\n <>\n {busy !== undefined && <View className={styles(style.busyProgress, busy && style.active)} />}\n {children}\n </>,\n );\n\nButton.displayName = 'Component:Button';\n\nButton.propTypes = {\n busy: PropTypes.bool,\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n disabled: PropTypes.bool,\n large: PropTypes.bool,\n outlined: PropTypes.bool,\n rounded: PropTypes.bool,\n small: PropTypes.bool,\n squared: PropTypes.bool,\n tag: PropTypes.string,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n onPress: PropTypes.func,\n};\n\nexport { Button };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS;EAAA,IACbC,IADa,QACbA,IADa;EAAA,IAEbC,QAFa,QAEbA,QAFa;EAAA,IAGbC,QAHa,QAGbA,QAHa;EAAA,IAIbC,KAJa,QAIbA,KAJa;EAAA,IAKbC,QALa,QAKbA,QALa;EAAA,IAMbC,OANa,QAMbA,OANa;EAAA,IAObC,KAPa,QAObA,KAPa;EAAA,wBAQbC,OARa;EAAA,IAQbA,OARa,6BAQH,KARG;EAAA,oBASbC,GATa;EAAA,IASbA,GATa,yBASP,QATO;EAAA,IAUbC,
|
|
1
|
+
{"version":3,"file":"Button.js","names":["Button","busy","children","disabled","large","outlined","rounded","small","squared","tag","wide","onPress","others","React","createElement","Pressable","className","style","button","undefined","busyProgress","active","displayName","propTypes","PropTypes","bool","oneOfType","string","node","onEnter","func","onLeave"],"sources":["../../../src/components/Button/Button.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Pressable, View } from '../../primitives';\nimport style from './Button.module.css';\n\nconst Button = ({\n busy,\n children,\n disabled,\n large,\n outlined,\n rounded,\n small,\n squared = false,\n tag = 'button',\n wide,\n onPress,\n ...others\n}) =>\n React.createElement(\n Pressable,\n {\n ...others,\n disabled: disabled || busy,\n tag,\n className: styles(\n style.button,\n busy && style.busy,\n large && style.large,\n small && style.small,\n rounded && style.rounded,\n squared && style.squared,\n outlined && style.outlined,\n outlined && (disabled || busy) && style.disabled,\n wide && style.wide,\n others.className,\n ),\n onPress: !disabled && !busy ? onPress : undefined,\n },\n <>\n {busy !== undefined && <View className={styles(style.busyProgress, busy && style.active)} />}\n {children}\n </>,\n );\n\nButton.displayName = 'Component:Button';\n\nButton.propTypes = {\n busy: PropTypes.bool,\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n disabled: PropTypes.bool,\n large: PropTypes.bool,\n outlined: PropTypes.bool,\n rounded: PropTypes.bool,\n small: PropTypes.bool,\n squared: PropTypes.bool,\n tag: PropTypes.string,\n wide: PropTypes.bool,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n onPress: PropTypes.func,\n};\n\nexport { Button };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS;EAAA,IACbC,IADa,QACbA,IADa;EAAA,IAEbC,QAFa,QAEbA,QAFa;EAAA,IAGbC,QAHa,QAGbA,QAHa;EAAA,IAIbC,KAJa,QAIbA,KAJa;EAAA,IAKbC,QALa,QAKbA,QALa;EAAA,IAMbC,OANa,QAMbA,OANa;EAAA,IAObC,KAPa,QAObA,KAPa;EAAA,wBAQbC,OARa;EAAA,IAQbA,OARa,6BAQH,KARG;EAAA,oBASbC,GATa;EAAA,IASbA,GATa,yBASP,QATO;EAAA,IAUbC,IAVa,QAUbA,IAVa;EAAA,IAWbC,OAXa,QAWbA,OAXa;EAAA,IAYVC,MAZU;;EAAA,oBAcbC,eAAMC,aAAN,CACEC,qBADF,kCAGOH,MAHP;IAIIT,QAAQ,EAAEA,QAAQ,IAAIF,IAJ1B;IAKIQ,GAAG,EAAHA,GALJ;IAMIO,SAAS,EAAE,qBACTC,sBAAMC,MADG,EAETjB,IAAI,IAAIgB,sBAAMhB,IAFL,EAGTG,KAAK,IAAIa,sBAAMb,KAHN,EAITG,KAAK,IAAIU,sBAAMV,KAJN,EAKTD,OAAO,IAAIW,sBAAMX,OALR,EAMTE,OAAO,IAAIS,sBAAMT,OANR,EAOTH,QAAQ,IAAIY,sBAAMZ,QAPT,EAQTA,QAAQ,KAAKF,QAAQ,IAAIF,IAAjB,CAAR,IAAkCgB,sBAAMd,QAR/B,EASTO,IAAI,IAAIO,sBAAMP,IATL,EAUTE,MAAM,CAACI,SAVE,CANf;IAkBIL,OAAO,EAAE,CAACR,QAAD,IAAa,CAACF,IAAd,GAAqBU,OAArB,GAA+BQ;EAlB5C,iBAoBE,4DACGlB,IAAI,KAAKkB,SAAT,iBAAsB,6BAAC,gBAAD;IAAM,SAAS,EAAE,qBAAOF,sBAAMG,YAAb,EAA2BnB,IAAI,IAAIgB,sBAAMI,MAAzC;EAAjB,EADzB,EAEGnB,QAFH,CApBF,CAda;AAAA,CAAf;;;AAwCAF,MAAM,CAACsB,WAAP,GAAqB,kBAArB;AAEAtB,MAAM,CAACuB,SAAP,GAAmB;EACjBtB,IAAI,EAAEuB,mBAAUC,IADC;EAEjBvB,QAAQ,EAAEsB,mBAAUE,SAAV,CAAoB,CAACF,mBAAUG,MAAX,EAAmBH,mBAAUI,IAA7B,CAApB,CAFO;EAGjBzB,QAAQ,EAAEqB,mBAAUC,IAHH;EAIjBrB,KAAK,EAAEoB,mBAAUC,IAJA;EAKjBpB,QAAQ,EAAEmB,mBAAUC,IALH;EAMjBnB,OAAO,EAAEkB,mBAAUC,IANF;EAOjBlB,KAAK,EAAEiB,mBAAUC,IAPA;EAQjBjB,OAAO,EAAEgB,mBAAUC,IARF;EASjBhB,GAAG,EAAEe,mBAAUG,MATE;EAUjBjB,IAAI,EAAEc,mBAAUC,IAVC;EAWjBI,OAAO,EAAEL,mBAAUM,IAXF;EAYjBC,OAAO,EAAEP,mBAAUM,IAZF;EAajBnB,OAAO,EAAEa,mBAAUM;AAbF,CAAnB"}
|
|
@@ -99,6 +99,16 @@ exports[`component:<Button> prop:tag 1`] = `
|
|
|
99
99
|
</DocumentFragment>
|
|
100
100
|
`;
|
|
101
101
|
|
|
102
|
+
exports[`component:<Button> prop:wide 1`] = `
|
|
103
|
+
<DocumentFragment>
|
|
104
|
+
<button
|
|
105
|
+
class="pressable button wide"
|
|
106
|
+
>
|
|
107
|
+
children
|
|
108
|
+
</button>
|
|
109
|
+
</DocumentFragment>
|
|
110
|
+
`;
|
|
111
|
+
|
|
102
112
|
exports[`component:<Button> renders 1`] = `
|
|
103
113
|
<DocumentFragment>
|
|
104
114
|
<button
|
|
@@ -15,7 +15,7 @@ var _primitives = require("../../primitives");
|
|
|
15
15
|
|
|
16
16
|
var _MenuModule = _interopRequireDefault(require("./Menu.module.css"));
|
|
17
17
|
|
|
18
|
-
var _excluded = ["children", "disabled", "divider", "icon", "label"];
|
|
18
|
+
var _excluded = ["children", "disabled", "divider", "icon", "label", "value", "onPress"];
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
@@ -31,16 +31,20 @@ var Option = function Option(_ref) {
|
|
|
31
31
|
divider = _ref.divider,
|
|
32
32
|
icon = _ref.icon,
|
|
33
33
|
label = _ref.label,
|
|
34
|
+
value = _ref.value,
|
|
35
|
+
onPress = _ref.onPress,
|
|
34
36
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
35
37
|
|
|
36
38
|
return /*#__PURE__*/_react.default.createElement(_primitives.Pressable, _extends({}, others, {
|
|
39
|
+
preventDefault: false,
|
|
37
40
|
tag: "div",
|
|
38
|
-
className: (0, _helpers.styles)(_MenuModule.default.option, divider && _MenuModule.default.divider, disabled && _MenuModule.default.disabled)
|
|
41
|
+
className: (0, _helpers.styles)(_MenuModule.default.option, value && _MenuModule.default.value, divider && _MenuModule.default.divider, disabled && _MenuModule.default.disabled),
|
|
42
|
+
onPress: !disabled && value ? onPress : undefined
|
|
39
43
|
}), icon && /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
|
|
40
44
|
name: icon,
|
|
41
|
-
className:
|
|
42
|
-
}), /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
43
|
-
className:
|
|
45
|
+
className: _MenuModule.default.icon
|
|
46
|
+
}), label && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
47
|
+
className: _MenuModule.default.label
|
|
44
48
|
}, label), children);
|
|
45
49
|
};
|
|
46
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.Option.js","names":["Option","children","disabled","divider","icon","label","others","style","option","displayName","propTypes","PropTypes","node","bool","string","
|
|
1
|
+
{"version":3,"file":"Menu.Option.js","names":["Option","children","disabled","divider","icon","label","value","onPress","others","style","option","undefined","displayName","propTypes","PropTypes","node","bool","string","oneOfType","number","isRequired","func"],"sources":["../../../src/components/Menu/Menu.Option.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Icon, Pressable, Text } from '../../primitives';\nimport style from './Menu.module.css';\n\nconst Option = ({ children, disabled, divider, icon, label, value, onPress, ...others }) => (\n <Pressable\n {...others}\n preventDefault={false}\n tag=\"div\"\n className={styles(style.option, value && style.value, divider && style.divider, disabled && style.disabled)}\n onPress={!disabled && value ? onPress : undefined}\n >\n {icon && <Icon name={icon} className={style.icon} />}\n {label && <Text className={style.label}>{label}</Text>}\n {children}\n </Pressable>\n);\n\nOption.displayName = 'Component:Menu:Option';\n\nOption.propTypes = {\n children: PropTypes.node,\n disabled: PropTypes.bool,\n divider: PropTypes.bool,\n icon: PropTypes.string,\n label: PropTypes.string,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n onPress: PropTypes.func,\n};\n\nexport { Option };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS;EAAA,IAAGC,QAAH,QAAGA,QAAH;EAAA,IAAaC,QAAb,QAAaA,QAAb;EAAA,IAAuBC,OAAvB,QAAuBA,OAAvB;EAAA,IAAgCC,IAAhC,QAAgCA,IAAhC;EAAA,IAAsCC,KAAtC,QAAsCA,KAAtC;EAAA,IAA6CC,KAA7C,QAA6CA,KAA7C;EAAA,IAAoDC,OAApD,QAAoDA,OAApD;EAAA,IAAgEC,MAAhE;;EAAA,oBACb,6BAAC,qBAAD,eACMA,MADN;IAEE,cAAc,EAAE,KAFlB;IAGE,GAAG,EAAC,KAHN;IAIE,SAAS,EAAE,qBAAOC,oBAAMC,MAAb,EAAqBJ,KAAK,IAAIG,oBAAMH,KAApC,EAA2CH,OAAO,IAAIM,oBAAMN,OAA5D,EAAqED,QAAQ,IAAIO,oBAAMP,QAAvF,CAJb;IAKE,OAAO,EAAE,CAACA,QAAD,IAAaI,KAAb,GAAqBC,OAArB,GAA+BI;EAL1C,IAOGP,IAAI,iBAAI,6BAAC,gBAAD;IAAM,IAAI,EAAEA,IAAZ;IAAkB,SAAS,EAAEK,oBAAML;EAAnC,EAPX,EAQGC,KAAK,iBAAI,6BAAC,gBAAD;IAAM,SAAS,EAAEI,oBAAMJ;EAAvB,GAA+BA,KAA/B,CARZ,EASGJ,QATH,CADa;AAAA,CAAf;;;AAcAD,MAAM,CAACY,WAAP,GAAqB,uBAArB;AAEAZ,MAAM,CAACa,SAAP,GAAmB;EACjBZ,QAAQ,EAAEa,mBAAUC,IADH;EAEjBb,QAAQ,EAAEY,mBAAUE,IAFH;EAGjBb,OAAO,EAAEW,mBAAUE,IAHF;EAIjBZ,IAAI,EAAEU,mBAAUG,MAJC;EAKjBZ,KAAK,EAAES,mBAAUG,MALA;EAMjBX,KAAK,EAAEQ,mBAAUI,SAAV,CAAoB,CAACJ,mBAAUG,MAAX,EAAmBH,mBAAUK,MAA7B,CAApB,EAA0DC,UANhD;EAOjBb,OAAO,EAAEO,mBAAUO;AAPF,CAAnB"}
|
|
@@ -35,7 +35,7 @@ var Menu = function Menu(_ref) {
|
|
|
35
35
|
Template = _ref$Template === void 0 ? _Menu.Option : _ref$Template,
|
|
36
36
|
visible = _ref.visible,
|
|
37
37
|
_ref$onPress = _ref.onPress,
|
|
38
|
-
|
|
38
|
+
_onPress = _ref$onPress === void 0 ? function () {} : _ref$onPress,
|
|
39
39
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
40
40
|
|
|
41
41
|
return /*#__PURE__*/_react.default.createElement(_primitives.Layer, _extends({
|
|
@@ -49,9 +49,9 @@ var Menu = function Menu(_ref) {
|
|
|
49
49
|
return /*#__PURE__*/_react.default.createElement(Template, _extends({}, option, {
|
|
50
50
|
"data-testid": others['data-testid'] ? "".concat(others['data-testid'], "-").concat(index) : undefined,
|
|
51
51
|
key: index,
|
|
52
|
-
onPress:
|
|
53
|
-
return
|
|
54
|
-
}
|
|
52
|
+
onPress: function onPress(event) {
|
|
53
|
+
return _onPress(option.value, event);
|
|
54
|
+
}
|
|
55
55
|
}));
|
|
56
56
|
})));
|
|
57
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","names":["Menu","children","options","Template","Option","visible","onPress","others","style","menu","className","map","option","index","undefined","
|
|
1
|
+
{"version":3,"file":"Menu.js","names":["Menu","children","options","Template","Option","visible","onPress","others","style","menu","className","map","option","index","undefined","event","value","displayName","propTypes","PropTypes","node","arrayOf","shape","disabled","bool","divider","icon","string","label","oneOfType","number","isRequired","func"],"sources":["../../../src/components/Menu/Menu.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Layer, LayerContent } from '../../primitives';\nimport style from './Menu.module.css';\nimport { Option } from './Menu.Option';\n\nconst Menu = ({ children, options = [], Template = Option, visible, onPress = () => {}, ...others }) => {\n return (\n <Layer\n forceRender={false}\n {...others}\n className={styles(style.menu, visible && style.visible, others.className)}\n visible={visible}\n >\n {children}\n <LayerContent>\n {options.map((option = {}, index) => (\n <Template\n {...option}\n data-testid={others['data-testid'] ? `${others['data-testid']}-${index}` : undefined}\n key={index}\n onPress={(event) => onPress(option.value, event)}\n />\n ))}\n </LayerContent>\n </Layer>\n );\n};\n\nMenu.displayName = 'Component:Menu';\n\nMenu.propTypes = {\n children: PropTypes.node,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n children: PropTypes.node,\n disabled: PropTypes.bool,\n divider: PropTypes.bool,\n icon: PropTypes.string,\n label: PropTypes.string,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n }),\n ),\n Template: PropTypes.node,\n visible: PropTypes.bool,\n onPress: PropTypes.func,\n};\n\nexport { Menu };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG,SAAPA,IAAO,OAA2F;EAAA,IAAxFC,QAAwF,QAAxFA,QAAwF;EAAA,wBAA9EC,OAA8E;EAAA,IAA9EA,OAA8E,6BAApE,EAAoE;EAAA,yBAAhEC,QAAgE;EAAA,IAAhEA,QAAgE,8BAArDC,YAAqD;EAAA,IAA7CC,OAA6C,QAA7CA,OAA6C;EAAA,wBAApCC,OAAoC;EAAA,IAApCA,QAAoC,6BAA1B,YAAM,CAAE,CAAkB;EAAA,IAAbC,MAAa;;EACtG,oBACE,6BAAC,iBAAD;IACE,WAAW,EAAE;EADf,GAEMA,MAFN;IAGE,SAAS,EAAE,qBAAOC,oBAAMC,IAAb,EAAmBJ,OAAO,IAAIG,oBAAMH,OAApC,EAA6CE,MAAM,CAACG,SAApD,CAHb;IAIE,OAAO,EAAEL;EAJX,IAMGJ,QANH,eAOE,6BAAC,wBAAD,QACGC,OAAO,CAACS,GAAR,CAAY;IAAA,IAACC,MAAD,uEAAU,EAAV;IAAA,IAAcC,KAAd;IAAA,oBACX,6BAAC,QAAD,eACMD,MADN;MAEE,eAAaL,MAAM,CAAC,aAAD,CAAN,aAA2BA,MAAM,CAAC,aAAD,CAAjC,cAAoDM,KAApD,IAA8DC,SAF7E;MAGE,GAAG,EAAED,KAHP;MAIE,OAAO,EAAE,iBAACE,KAAD;QAAA,OAAWT,QAAO,CAACM,MAAM,CAACI,KAAR,EAAeD,KAAf,CAAlB;MAAA;IAJX,GADW;EAAA,CAAZ,CADH,CAPF,CADF;AAoBD,CArBD;;;AAuBAf,IAAI,CAACiB,WAAL,GAAmB,gBAAnB;AAEAjB,IAAI,CAACkB,SAAL,GAAiB;EACfjB,QAAQ,EAAEkB,mBAAUC,IADL;EAEflB,OAAO,EAAEiB,mBAAUE,OAAV,CACPF,mBAAUG,KAAV,CAAgB;IACdrB,QAAQ,EAAEkB,mBAAUC,IADN;IAEdG,QAAQ,EAAEJ,mBAAUK,IAFN;IAGdC,OAAO,EAAEN,mBAAUK,IAHL;IAIdE,IAAI,EAAEP,mBAAUQ,MAJF;IAKdC,KAAK,EAAET,mBAAUQ,MALH;IAMdX,KAAK,EAAEG,mBAAUU,SAAV,CAAoB,CAACV,mBAAUQ,MAAX,EAAmBR,mBAAUW,MAA7B,CAApB,EAA0DC;EANnD,CAAhB,CADO,CAFM;EAYf5B,QAAQ,EAAEgB,mBAAUC,IAZL;EAaff,OAAO,EAAEc,mBAAUK,IAbJ;EAcflB,OAAO,EAAEa,mBAAUa;AAdJ,CAAjB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--mirai-ui-menu-base: var(--mirai-ui-base);
|
|
3
3
|
--mirai-ui-menu-border-radius: var(--mirai-ui-border-radius);
|
|
4
|
-
--mirai-ui-menu-min-width:
|
|
4
|
+
--mirai-ui-menu-min-width: 192px;
|
|
5
5
|
--mirai-ui-menu-shadow: var(--mirai-ui-shadow);
|
|
6
|
-
--mirai-ui-menu-option-padding: var(--mirai-ui-space-M);
|
|
7
6
|
--mirai-ui-menu-option-disabled: var(--mirai-ui-content-border);
|
|
8
|
-
--mirai-ui-menu-option-hover: var(--mirai-ui-accent
|
|
7
|
+
--mirai-ui-menu-option-hover-background: var(--mirai-ui-accent);
|
|
8
|
+
--mirai-ui-menu-option-hover-color: var(--mirai-ui-base);
|
|
9
|
+
--mirai-ui-menu-option-padding: var(--mirai-ui-space-M);
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
.menu {
|
|
@@ -17,17 +18,28 @@
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
.menu .option {
|
|
21
|
+
align-items: center;
|
|
20
22
|
box-sizing: border-box;
|
|
21
23
|
display: flex;
|
|
24
|
+
cursor: default;
|
|
25
|
+
flex: 1;
|
|
22
26
|
flex-direction: row;
|
|
23
27
|
padding: var(--mirai-ui-menu-option-padding);
|
|
24
|
-
align-items: center;
|
|
25
|
-
flex: 1;
|
|
26
28
|
width: 100%;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
.menu .option:hover:not(.disabled) {
|
|
30
|
-
background-color: var(--mirai-ui-menu-option-hover);
|
|
31
|
+
.menu .option.value:hover:not(.disabled) {
|
|
32
|
+
background-color: var(--mirai-ui-menu-option-hover-background);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.menu .option.value:hover:not(.disabled) .icon,
|
|
36
|
+
.menu .option.value:hover:not(.disabled) .label {
|
|
37
|
+
color: var(--mirai-ui-menu-option-hover-color);
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.menu .divider {
|
|
42
|
+
box-shadow: inset 0 -1px var(--mirai-ui-menu-option-disabled);
|
|
31
43
|
}
|
|
32
44
|
|
|
33
45
|
.menu .icon {
|
|
@@ -38,13 +50,13 @@
|
|
|
38
50
|
flex: 1;
|
|
39
51
|
text-align: left;
|
|
40
52
|
padding-right: var(--mirai-ui-menu-option-padding);
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
text-overflow: ellipsis;
|
|
55
|
+
white-space: nowrap;
|
|
41
56
|
}
|
|
42
57
|
|
|
43
|
-
.menu .
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.menu .disabled {
|
|
58
|
+
.menu .option.disabled .icon,
|
|
59
|
+
.menu .option.disabled .label {
|
|
48
60
|
color: var(--mirai-ui-menu-option-disabled);
|
|
49
61
|
cursor: default;
|
|
50
62
|
}
|
|
@@ -58,8 +58,16 @@ exports[`component:<Menu> w/ options & visible 1`] = `
|
|
|
58
58
|
style="left: 0px; top: 0px;"
|
|
59
59
|
>
|
|
60
60
|
<div
|
|
61
|
-
class="pressable option"
|
|
62
|
-
|
|
61
|
+
class="pressable option divider"
|
|
62
|
+
>
|
|
63
|
+
<span
|
|
64
|
+
class="text paragraph label"
|
|
65
|
+
>
|
|
66
|
+
Lorem Ipsum...
|
|
67
|
+
</span>
|
|
68
|
+
</div>
|
|
69
|
+
<div
|
|
70
|
+
class="pressable option value"
|
|
63
71
|
>
|
|
64
72
|
<span
|
|
65
73
|
class="icon icon"
|
|
@@ -96,11 +104,10 @@ exports[`component:<Menu> w/ options & visible 1`] = `
|
|
|
96
104
|
</span>
|
|
97
105
|
</div>
|
|
98
106
|
<div
|
|
99
|
-
class="pressable option disabled"
|
|
100
|
-
value="two"
|
|
107
|
+
class="pressable option value disabled"
|
|
101
108
|
>
|
|
102
109
|
<span
|
|
103
|
-
class="icon icon
|
|
110
|
+
class="icon icon"
|
|
104
111
|
>
|
|
105
112
|
<svg
|
|
106
113
|
fill="none"
|
|
@@ -128,14 +135,13 @@ exports[`component:<Menu> w/ options & visible 1`] = `
|
|
|
128
135
|
</svg>
|
|
129
136
|
</span>
|
|
130
137
|
<span
|
|
131
|
-
class="text paragraph label
|
|
138
|
+
class="text paragraph label"
|
|
132
139
|
>
|
|
133
140
|
Item 2
|
|
134
141
|
</span>
|
|
135
142
|
</div>
|
|
136
143
|
<div
|
|
137
|
-
class="pressable option divider"
|
|
138
|
-
value="three"
|
|
144
|
+
class="pressable option value divider"
|
|
139
145
|
>
|
|
140
146
|
<span
|
|
141
147
|
class="icon icon"
|
|
@@ -147,8 +153,7 @@ exports[`component:<Menu> w/ options & visible 1`] = `
|
|
|
147
153
|
</span>
|
|
148
154
|
</div>
|
|
149
155
|
<div
|
|
150
|
-
class="pressable option"
|
|
151
|
-
value="four"
|
|
156
|
+
class="pressable option value"
|
|
152
157
|
>
|
|
153
158
|
<span
|
|
154
159
|
class="text paragraph label"
|
|
@@ -161,6 +166,15 @@ exports[`component:<Menu> w/ options & visible 1`] = `
|
|
|
161
166
|
Add
|
|
162
167
|
</button>
|
|
163
168
|
</div>
|
|
169
|
+
<div
|
|
170
|
+
class="pressable option"
|
|
171
|
+
>
|
|
172
|
+
<button
|
|
173
|
+
class="pressable button"
|
|
174
|
+
>
|
|
175
|
+
Add
|
|
176
|
+
</button>
|
|
177
|
+
</div>
|
|
164
178
|
</div>
|
|
165
179
|
</DocumentFragment>
|
|
166
180
|
`;
|