@pingux/astro 2.36.0-alpha.0 → 2.36.0-alpha.2
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/lib/cjs/components/Button/Button.stories.d.ts +51 -5
- package/lib/cjs/components/Button/Button.stories.js +89 -40
- package/lib/cjs/components/Button/Buttons.styles.d.ts +72 -1
- package/lib/cjs/components/Button/Buttons.styles.js +18 -1
- package/lib/cjs/utils/designUtils/figmaLinks.js +7 -1
- package/lib/components/Button/Button.stories.js +83 -34
- package/lib/components/Button/Buttons.styles.js +18 -1
- package/lib/utils/designUtils/figmaLinks.js +7 -1
- package/package.json +1 -1
@@ -28,9 +28,51 @@ export declare const Default: {
|
|
28
28
|
};
|
29
29
|
};
|
30
30
|
};
|
31
|
-
export declare const
|
32
|
-
|
33
|
-
|
31
|
+
export declare const Primary: {
|
32
|
+
(): React.JSX.Element;
|
33
|
+
parameters: {
|
34
|
+
design: {
|
35
|
+
type: string;
|
36
|
+
url: string;
|
37
|
+
};
|
38
|
+
};
|
39
|
+
};
|
40
|
+
export declare const Critical: {
|
41
|
+
(): React.JSX.Element;
|
42
|
+
parameters: {
|
43
|
+
design: {
|
44
|
+
type: string;
|
45
|
+
url: string;
|
46
|
+
};
|
47
|
+
};
|
48
|
+
};
|
49
|
+
export declare const InlineButton: {
|
50
|
+
(): React.JSX.Element;
|
51
|
+
parameters: {
|
52
|
+
design: {
|
53
|
+
type: string;
|
54
|
+
url: string;
|
55
|
+
};
|
56
|
+
};
|
57
|
+
};
|
58
|
+
export declare const TextIconButton: {
|
59
|
+
(): React.JSX.Element;
|
60
|
+
parameters: {
|
61
|
+
design: {
|
62
|
+
type: string;
|
63
|
+
url: string;
|
64
|
+
};
|
65
|
+
};
|
66
|
+
};
|
67
|
+
export declare const Disabled: {
|
68
|
+
(): React.JSX.Element;
|
69
|
+
parameters: {
|
70
|
+
design: {
|
71
|
+
type: string;
|
72
|
+
url: string;
|
73
|
+
};
|
74
|
+
};
|
75
|
+
};
|
34
76
|
export declare const ColorBlockButton: {
|
35
77
|
(args: any): React.JSX.Element;
|
36
78
|
argTypes: {
|
@@ -41,6 +83,10 @@ export declare const ColorBlockButton: {
|
|
41
83
|
defaultValue: boolean;
|
42
84
|
};
|
43
85
|
};
|
86
|
+
parameters: {
|
87
|
+
design: {
|
88
|
+
type: string;
|
89
|
+
url: string;
|
90
|
+
};
|
91
|
+
};
|
44
92
|
};
|
45
|
-
export declare const Critical: () => React.JSX.Element;
|
46
|
-
export declare const Primary: () => React.JSX.Element;
|
@@ -60,71 +60,114 @@ Default.parameters = {
|
|
60
60
|
url: _figmaLinks.FIGMA_LINKS.button["default"]
|
61
61
|
}
|
62
62
|
};
|
63
|
-
var
|
63
|
+
var Primary = function Primary() {
|
64
64
|
return (0, _react2.jsx)(_index.Button, {
|
65
|
-
|
65
|
+
variant: "primary"
|
66
66
|
}, "Button Text");
|
67
67
|
};
|
68
|
-
exports.
|
69
|
-
|
68
|
+
exports.Primary = Primary;
|
69
|
+
Primary.parameters = {
|
70
|
+
design: {
|
71
|
+
type: 'figma',
|
72
|
+
url: _figmaLinks.FIGMA_LINKS.button.primary
|
73
|
+
}
|
74
|
+
};
|
75
|
+
var Critical = function Critical() {
|
70
76
|
return (0, _react2.jsx)(_index.Button, {
|
77
|
+
variant: "critical"
|
78
|
+
}, "Button Text");
|
79
|
+
};
|
80
|
+
exports.Critical = Critical;
|
81
|
+
Critical.parameters = {
|
82
|
+
design: {
|
83
|
+
type: 'figma',
|
84
|
+
url: _figmaLinks.FIGMA_LINKS.button.critical
|
85
|
+
}
|
86
|
+
};
|
87
|
+
var InlineButton = function InlineButton() {
|
88
|
+
return (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Button, {
|
89
|
+
mb: "sm",
|
90
|
+
mr: "auto",
|
91
|
+
variant: "inline"
|
92
|
+
}, "Button Text"), (0, _react2.jsx)(_index.Button, {
|
93
|
+
mb: "sm",
|
94
|
+
mr: "auto",
|
95
|
+
variant: "inlinePrimary"
|
96
|
+
}, "Button Text"));
|
97
|
+
};
|
98
|
+
exports.InlineButton = InlineButton;
|
99
|
+
InlineButton.parameters = {
|
100
|
+
design: {
|
101
|
+
type: 'figma',
|
102
|
+
url: _figmaLinks.FIGMA_LINKS.button.inlineButton
|
103
|
+
}
|
104
|
+
};
|
105
|
+
var TextIconButton = function TextIconButton() {
|
106
|
+
return (0, _react2.jsx)(_index.Box, {
|
107
|
+
width: 20
|
108
|
+
}, (0, _react2.jsx)(_index.Button, {
|
71
109
|
mb: "sm",
|
72
110
|
variant: "withIcon"
|
73
|
-
}, (0, _react2.jsx)(_index.Box, {
|
74
|
-
isRow: true,
|
75
|
-
alignItems: "center"
|
76
111
|
}, (0, _react2.jsx)(_index.Icon, {
|
77
112
|
icon: _PlusIcon["default"],
|
78
113
|
mr: "xs",
|
79
|
-
color: "
|
114
|
+
color: "accent.30",
|
80
115
|
size: 20,
|
81
116
|
title: {
|
82
117
|
name: 'Add Circle Icon'
|
83
118
|
}
|
84
|
-
}), "
|
85
|
-
};
|
86
|
-
exports.TextIconButton = TextIconButton;
|
87
|
-
var InlineButton = function InlineButton() {
|
88
|
-
return (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Button, {
|
89
|
-
mb: "sm",
|
90
|
-
mr: "auto",
|
91
|
-
variant: "inline"
|
92
|
-
}, "Inline"), (0, _react2.jsx)(_index.Button, {
|
119
|
+
}), "Button Text"), (0, _react2.jsx)(_index.Button, {
|
93
120
|
mb: "sm",
|
94
121
|
mr: "auto",
|
95
122
|
variant: "inlineWithIcon"
|
96
123
|
}, (0, _react2.jsx)(_index.Icon, {
|
97
124
|
icon: _PlusIcon["default"],
|
98
125
|
mr: "xs",
|
99
|
-
color: "
|
126
|
+
color: "accent.30",
|
100
127
|
size: 15,
|
101
128
|
title: {
|
102
129
|
name: 'Add Circle Icon'
|
103
130
|
}
|
104
|
-
}), "
|
105
|
-
mb: "sm",
|
106
|
-
mr: "auto",
|
107
|
-
variant: "inlinePrimary"
|
108
|
-
}, "Inline primary"), (0, _react2.jsx)(_index.Button, {
|
131
|
+
}), "Button Text"), (0, _react2.jsx)(_index.Button, {
|
109
132
|
mb: "sm",
|
110
133
|
mr: "auto",
|
111
134
|
variant: "inlinePrimaryWithIcon"
|
112
135
|
}, (0, _react2.jsx)(_index.Icon, {
|
113
136
|
icon: _PlusIcon["default"],
|
114
137
|
mr: "xs",
|
115
|
-
color: "
|
138
|
+
color: "accent.30",
|
116
139
|
size: 15,
|
117
140
|
title: {
|
118
141
|
name: 'Add Circle Icon'
|
119
142
|
}
|
120
|
-
}), "
|
143
|
+
}), "Button Text"));
|
144
|
+
};
|
145
|
+
exports.TextIconButton = TextIconButton;
|
146
|
+
TextIconButton.parameters = {
|
147
|
+
design: {
|
148
|
+
type: 'figma',
|
149
|
+
url: _figmaLinks.FIGMA_LINKS.button.textIconButton
|
150
|
+
}
|
151
|
+
};
|
152
|
+
var Disabled = function Disabled() {
|
153
|
+
return (0, _react2.jsx)(_index.Button, {
|
154
|
+
isDisabled: true
|
155
|
+
}, "Button Text");
|
156
|
+
};
|
157
|
+
exports.Disabled = Disabled;
|
158
|
+
Disabled.parameters = {
|
159
|
+
design: {
|
160
|
+
type: 'figma',
|
161
|
+
url: _figmaLinks.FIGMA_LINKS.button.disabled
|
162
|
+
}
|
121
163
|
};
|
122
|
-
exports.InlineButton = InlineButton;
|
123
164
|
var ColorBlockButton = function ColorBlockButton(args) {
|
124
165
|
// Change `isConfigured` property in storybook controls
|
125
166
|
var isConfigured = args.isConfigured,
|
126
167
|
props = (0, _objectWithoutProperties2["default"])(args, _excluded);
|
127
|
-
return (0, _react2.jsx)(_index.Button, (0, _extends2["default"])({
|
168
|
+
return (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Button, (0, _extends2["default"])({
|
169
|
+
mb: "sm"
|
170
|
+
}, props, {
|
128
171
|
variant: "colorBlock",
|
129
172
|
className: isConfigured ? 'is-configured' : ''
|
130
173
|
}), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Text, {
|
@@ -136,7 +179,19 @@ var ColorBlockButton = function ColorBlockButton(args) {
|
|
136
179
|
title: {
|
137
180
|
name: 'Create Icon'
|
138
181
|
}
|
139
|
-
}))
|
182
|
+
})), (0, _react2.jsx)(_index.Button, (0, _extends2["default"])({}, props, {
|
183
|
+
variant: "colorBlockPrimary",
|
184
|
+
className: isConfigured ? 'is-configured' : ''
|
185
|
+
}), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Text, {
|
186
|
+
variant: "buttonTitle"
|
187
|
+
}, "Title"), (0, _react2.jsx)(_index.Text, {
|
188
|
+
variant: "buttonSubtitle"
|
189
|
+
}, "Info")), (0, _react2.jsx)(_index.Icon, {
|
190
|
+
icon: _CreateIcon["default"],
|
191
|
+
title: {
|
192
|
+
name: 'Create Icon'
|
193
|
+
}
|
194
|
+
})));
|
140
195
|
};
|
141
196
|
exports.ColorBlockButton = ColorBlockButton;
|
142
197
|
ColorBlockButton.argTypes = {
|
@@ -147,15 +202,9 @@ ColorBlockButton.argTypes = {
|
|
147
202
|
defaultValue: false
|
148
203
|
}
|
149
204
|
};
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
}
|
155
|
-
|
156
|
-
var Primary = function Primary() {
|
157
|
-
return (0, _react2.jsx)(_index.Button, {
|
158
|
-
variant: "primary"
|
159
|
-
}, "Button Text");
|
160
|
-
};
|
161
|
-
exports.Primary = Primary;
|
205
|
+
ColorBlockButton.parameters = {
|
206
|
+
design: {
|
207
|
+
type: 'figma',
|
208
|
+
url: _figmaLinks.FIGMA_LINKS.button.colorBlockButton
|
209
|
+
}
|
210
|
+
};
|
@@ -564,6 +564,77 @@ declare const _default: {
|
|
564
564
|
borderColor: string;
|
565
565
|
};
|
566
566
|
};
|
567
|
+
colorBlockPrimary: {
|
568
|
+
'& span': {
|
569
|
+
color: string;
|
570
|
+
textAlign: string;
|
571
|
+
};
|
572
|
+
'&.is-hovered': {
|
573
|
+
backgroundColor: string;
|
574
|
+
color: string;
|
575
|
+
bg: string;
|
576
|
+
border: string;
|
577
|
+
borderColor: string;
|
578
|
+
boxShadow: string;
|
579
|
+
};
|
580
|
+
'&.is-pressed': {
|
581
|
+
backgroundColor: string;
|
582
|
+
border: string;
|
583
|
+
borderColor: string;
|
584
|
+
bg: string;
|
585
|
+
color: string;
|
586
|
+
path: {
|
587
|
+
fill: string;
|
588
|
+
};
|
589
|
+
};
|
590
|
+
bg: string;
|
591
|
+
border: string;
|
592
|
+
borderColor: string;
|
593
|
+
color: string;
|
594
|
+
path: {
|
595
|
+
fill: string;
|
596
|
+
};
|
597
|
+
borderRadius: number;
|
598
|
+
outline: string;
|
599
|
+
cursor: string;
|
600
|
+
width: number;
|
601
|
+
height: string;
|
602
|
+
p: string;
|
603
|
+
display: string;
|
604
|
+
justifyContent: string;
|
605
|
+
alignItems: string;
|
606
|
+
'&.is-focused': {
|
607
|
+
outline: string;
|
608
|
+
outlineColor: string;
|
609
|
+
outlineOffset: string;
|
610
|
+
};
|
611
|
+
'&>div': {
|
612
|
+
alignItems: string;
|
613
|
+
};
|
614
|
+
'&>svg': {
|
615
|
+
color: string;
|
616
|
+
fill: string;
|
617
|
+
};
|
618
|
+
'&.is-configured': {
|
619
|
+
bg: string;
|
620
|
+
borderColor: string;
|
621
|
+
'& span': {
|
622
|
+
color: string;
|
623
|
+
};
|
624
|
+
'&>svg': {
|
625
|
+
color: string;
|
626
|
+
fill: string;
|
627
|
+
};
|
628
|
+
};
|
629
|
+
'&.is-configured.is-hovered': {
|
630
|
+
bg: string;
|
631
|
+
borderColor: string;
|
632
|
+
};
|
633
|
+
'&.is-configured.is-pressed': {
|
634
|
+
bg: string;
|
635
|
+
borderColor: string;
|
636
|
+
};
|
637
|
+
};
|
567
638
|
exampleText: {
|
568
639
|
'&.is-hovered': {
|
569
640
|
textDecoration: string;
|
@@ -600,6 +671,7 @@ declare const _default: {
|
|
600
671
|
bg: string;
|
601
672
|
border: string;
|
602
673
|
borderColor: string;
|
674
|
+
display: string;
|
603
675
|
'&.is-hovered': {
|
604
676
|
bg: string;
|
605
677
|
border: string;
|
@@ -625,7 +697,6 @@ declare const _default: {
|
|
625
697
|
fontWeight: number;
|
626
698
|
color: string;
|
627
699
|
fontFamily: string;
|
628
|
-
display: string;
|
629
700
|
overflowWrap: string;
|
630
701
|
maxWidth: string;
|
631
702
|
wordWrap: string;
|
@@ -82,10 +82,11 @@ var primary = _objectSpread(_objectSpread({}, base), {}, {
|
|
82
82
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
83
83
|
});
|
84
84
|
var withIcon = _objectSpread(_objectSpread({}, base), {}, {
|
85
|
-
padding: '
|
85
|
+
padding: '10px 15px 10px 10px',
|
86
86
|
bg: 'white',
|
87
87
|
border: '1px solid',
|
88
88
|
borderColor: 'active',
|
89
|
+
display: 'inline-flex',
|
89
90
|
'&.is-hovered': _objectSpread({}, defaultHover),
|
90
91
|
'&.is-pressed': _objectSpread({}, defaultActive),
|
91
92
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
@@ -247,6 +248,21 @@ var colorBlock = {
|
|
247
248
|
borderColor: 'accent.20'
|
248
249
|
}
|
249
250
|
};
|
251
|
+
var colorBlockPrimary = _objectSpread(_objectSpread(_objectSpread({}, colorBlock), defaultActive), {}, {
|
252
|
+
'& span': {
|
253
|
+
color: 'white',
|
254
|
+
textAlign: 'left'
|
255
|
+
},
|
256
|
+
'&.is-hovered': _objectSpread(_objectSpread({}, defaultHover), {}, {
|
257
|
+
backgroundColor: 'accent.40',
|
258
|
+
color: 'white'
|
259
|
+
}),
|
260
|
+
'&.is-pressed': _objectSpread(_objectSpread({}, defaultActive), {}, {
|
261
|
+
backgroundColor: 'accent.20',
|
262
|
+
border: '1px solid',
|
263
|
+
borderColor: 'accent.20'
|
264
|
+
})
|
265
|
+
});
|
250
266
|
var headerBar = _objectSpread(_objectSpread({}, base), {}, {
|
251
267
|
backgroundColor: 'white',
|
252
268
|
'&.is-hovered': _objectSpread(_objectSpread({}, defaultHover), {}, {
|
@@ -286,6 +302,7 @@ var _default = {
|
|
286
302
|
quiet: quiet,
|
287
303
|
success: success,
|
288
304
|
colorBlock: colorBlock,
|
305
|
+
colorBlockPrimary: colorBlockPrimary,
|
289
306
|
exampleText: exampleText,
|
290
307
|
withIcon: withIcon,
|
291
308
|
inlineWithIcon: inlineWithIcon,
|
@@ -34,7 +34,13 @@ var FIGMA_LINKS = {
|
|
34
34
|
overflowing: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=45064-7148&mode=design&t=0RGDgLyKBzT6bOXO-0'
|
35
35
|
},
|
36
36
|
button: {
|
37
|
-
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=
|
37
|
+
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44916%3A47047&mode=dev',
|
38
|
+
disabled: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=45003%3A54887&mode=dev',
|
39
|
+
textIconButton: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=45003%3A54941&mode=dev',
|
40
|
+
inlineButton: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44916%3A47247&mode=dev',
|
41
|
+
colorBlockButton: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44916%3A47405&mode=dev',
|
42
|
+
critical: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44916%3A47237&mode=dev',
|
43
|
+
primary: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44916%3A47151&mode=dev'
|
38
44
|
},
|
39
45
|
buttonBar: {
|
40
46
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=46080%3A753&mode=dev',
|
@@ -51,68 +51,109 @@ Default.parameters = {
|
|
51
51
|
url: FIGMA_LINKS.button["default"]
|
52
52
|
}
|
53
53
|
};
|
54
|
-
export var
|
54
|
+
export var Primary = function Primary() {
|
55
55
|
return ___EmotionJSX(Button, {
|
56
|
-
|
56
|
+
variant: "primary"
|
57
57
|
}, "Button Text");
|
58
58
|
};
|
59
|
-
|
59
|
+
Primary.parameters = {
|
60
|
+
design: {
|
61
|
+
type: 'figma',
|
62
|
+
url: FIGMA_LINKS.button.primary
|
63
|
+
}
|
64
|
+
};
|
65
|
+
export var Critical = function Critical() {
|
60
66
|
return ___EmotionJSX(Button, {
|
67
|
+
variant: "critical"
|
68
|
+
}, "Button Text");
|
69
|
+
};
|
70
|
+
Critical.parameters = {
|
71
|
+
design: {
|
72
|
+
type: 'figma',
|
73
|
+
url: FIGMA_LINKS.button.critical
|
74
|
+
}
|
75
|
+
};
|
76
|
+
export var InlineButton = function InlineButton() {
|
77
|
+
return ___EmotionJSX(Box, null, ___EmotionJSX(Button, {
|
78
|
+
mb: "sm",
|
79
|
+
mr: "auto",
|
80
|
+
variant: "inline"
|
81
|
+
}, "Button Text"), ___EmotionJSX(Button, {
|
82
|
+
mb: "sm",
|
83
|
+
mr: "auto",
|
84
|
+
variant: "inlinePrimary"
|
85
|
+
}, "Button Text"));
|
86
|
+
};
|
87
|
+
InlineButton.parameters = {
|
88
|
+
design: {
|
89
|
+
type: 'figma',
|
90
|
+
url: FIGMA_LINKS.button.inlineButton
|
91
|
+
}
|
92
|
+
};
|
93
|
+
export var TextIconButton = function TextIconButton() {
|
94
|
+
return ___EmotionJSX(Box, {
|
95
|
+
width: 20
|
96
|
+
}, ___EmotionJSX(Button, {
|
61
97
|
mb: "sm",
|
62
98
|
variant: "withIcon"
|
63
|
-
}, ___EmotionJSX(Box, {
|
64
|
-
isRow: true,
|
65
|
-
alignItems: "center"
|
66
99
|
}, ___EmotionJSX(Icon, {
|
67
100
|
icon: PlusIcon,
|
68
101
|
mr: "xs",
|
69
|
-
color: "
|
102
|
+
color: "accent.30",
|
70
103
|
size: 20,
|
71
104
|
title: {
|
72
105
|
name: 'Add Circle Icon'
|
73
106
|
}
|
74
|
-
}), "
|
75
|
-
};
|
76
|
-
export var InlineButton = function InlineButton() {
|
77
|
-
return ___EmotionJSX(Box, null, ___EmotionJSX(Button, {
|
78
|
-
mb: "sm",
|
79
|
-
mr: "auto",
|
80
|
-
variant: "inline"
|
81
|
-
}, "Inline"), ___EmotionJSX(Button, {
|
107
|
+
}), "Button Text"), ___EmotionJSX(Button, {
|
82
108
|
mb: "sm",
|
83
109
|
mr: "auto",
|
84
110
|
variant: "inlineWithIcon"
|
85
111
|
}, ___EmotionJSX(Icon, {
|
86
112
|
icon: PlusIcon,
|
87
113
|
mr: "xs",
|
88
|
-
color: "
|
114
|
+
color: "accent.30",
|
89
115
|
size: 15,
|
90
116
|
title: {
|
91
117
|
name: 'Add Circle Icon'
|
92
118
|
}
|
93
|
-
}), "
|
94
|
-
mb: "sm",
|
95
|
-
mr: "auto",
|
96
|
-
variant: "inlinePrimary"
|
97
|
-
}, "Inline primary"), ___EmotionJSX(Button, {
|
119
|
+
}), "Button Text"), ___EmotionJSX(Button, {
|
98
120
|
mb: "sm",
|
99
121
|
mr: "auto",
|
100
122
|
variant: "inlinePrimaryWithIcon"
|
101
123
|
}, ___EmotionJSX(Icon, {
|
102
124
|
icon: PlusIcon,
|
103
125
|
mr: "xs",
|
104
|
-
color: "
|
126
|
+
color: "accent.30",
|
105
127
|
size: 15,
|
106
128
|
title: {
|
107
129
|
name: 'Add Circle Icon'
|
108
130
|
}
|
109
|
-
}), "
|
131
|
+
}), "Button Text"));
|
132
|
+
};
|
133
|
+
TextIconButton.parameters = {
|
134
|
+
design: {
|
135
|
+
type: 'figma',
|
136
|
+
url: FIGMA_LINKS.button.textIconButton
|
137
|
+
}
|
138
|
+
};
|
139
|
+
export var Disabled = function Disabled() {
|
140
|
+
return ___EmotionJSX(Button, {
|
141
|
+
isDisabled: true
|
142
|
+
}, "Button Text");
|
143
|
+
};
|
144
|
+
Disabled.parameters = {
|
145
|
+
design: {
|
146
|
+
type: 'figma',
|
147
|
+
url: FIGMA_LINKS.button.disabled
|
148
|
+
}
|
110
149
|
};
|
111
150
|
export var ColorBlockButton = function ColorBlockButton(args) {
|
112
151
|
// Change `isConfigured` property in storybook controls
|
113
152
|
var isConfigured = args.isConfigured,
|
114
153
|
props = _objectWithoutProperties(args, _excluded);
|
115
|
-
return ___EmotionJSX(
|
154
|
+
return ___EmotionJSX(Box, null, ___EmotionJSX(Button, _extends({
|
155
|
+
mb: "sm"
|
156
|
+
}, props, {
|
116
157
|
variant: "colorBlock",
|
117
158
|
className: isConfigured ? 'is-configured' : ''
|
118
159
|
}), ___EmotionJSX(Box, null, ___EmotionJSX(Text, {
|
@@ -124,7 +165,19 @@ export var ColorBlockButton = function ColorBlockButton(args) {
|
|
124
165
|
title: {
|
125
166
|
name: 'Create Icon'
|
126
167
|
}
|
127
|
-
}))
|
168
|
+
})), ___EmotionJSX(Button, _extends({}, props, {
|
169
|
+
variant: "colorBlockPrimary",
|
170
|
+
className: isConfigured ? 'is-configured' : ''
|
171
|
+
}), ___EmotionJSX(Box, null, ___EmotionJSX(Text, {
|
172
|
+
variant: "buttonTitle"
|
173
|
+
}, "Title"), ___EmotionJSX(Text, {
|
174
|
+
variant: "buttonSubtitle"
|
175
|
+
}, "Info")), ___EmotionJSX(Icon, {
|
176
|
+
icon: CreateIcon,
|
177
|
+
title: {
|
178
|
+
name: 'Create Icon'
|
179
|
+
}
|
180
|
+
})));
|
128
181
|
};
|
129
182
|
ColorBlockButton.argTypes = {
|
130
183
|
isConfigured: {
|
@@ -134,13 +187,9 @@ ColorBlockButton.argTypes = {
|
|
134
187
|
defaultValue: false
|
135
188
|
}
|
136
189
|
};
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
}
|
142
|
-
export var Primary = function Primary() {
|
143
|
-
return ___EmotionJSX(Button, {
|
144
|
-
variant: "primary"
|
145
|
-
}, "Button Text");
|
190
|
+
ColorBlockButton.parameters = {
|
191
|
+
design: {
|
192
|
+
type: 'figma',
|
193
|
+
url: FIGMA_LINKS.button.colorBlockButton
|
194
|
+
}
|
146
195
|
};
|
@@ -72,10 +72,11 @@ var primary = _objectSpread(_objectSpread({}, base), {}, {
|
|
72
72
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
73
73
|
});
|
74
74
|
var withIcon = _objectSpread(_objectSpread({}, base), {}, {
|
75
|
-
padding: '
|
75
|
+
padding: '10px 15px 10px 10px',
|
76
76
|
bg: 'white',
|
77
77
|
border: '1px solid',
|
78
78
|
borderColor: 'active',
|
79
|
+
display: 'inline-flex',
|
79
80
|
'&.is-hovered': _objectSpread({}, defaultHover),
|
80
81
|
'&.is-pressed': _objectSpread({}, defaultActive),
|
81
82
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
@@ -234,6 +235,21 @@ var colorBlock = {
|
|
234
235
|
borderColor: 'accent.20'
|
235
236
|
}
|
236
237
|
};
|
238
|
+
var colorBlockPrimary = _objectSpread(_objectSpread(_objectSpread({}, colorBlock), defaultActive), {}, {
|
239
|
+
'& span': {
|
240
|
+
color: 'white',
|
241
|
+
textAlign: 'left'
|
242
|
+
},
|
243
|
+
'&.is-hovered': _objectSpread(_objectSpread({}, defaultHover), {}, {
|
244
|
+
backgroundColor: 'accent.40',
|
245
|
+
color: 'white'
|
246
|
+
}),
|
247
|
+
'&.is-pressed': _objectSpread(_objectSpread({}, defaultActive), {}, {
|
248
|
+
backgroundColor: 'accent.20',
|
249
|
+
border: '1px solid',
|
250
|
+
borderColor: 'accent.20'
|
251
|
+
})
|
252
|
+
});
|
237
253
|
var headerBar = _objectSpread(_objectSpread({}, base), {}, {
|
238
254
|
backgroundColor: 'white',
|
239
255
|
'&.is-hovered': _objectSpread(_objectSpread({}, defaultHover), {}, {
|
@@ -273,6 +289,7 @@ export default {
|
|
273
289
|
quiet: quiet,
|
274
290
|
success: success,
|
275
291
|
colorBlock: colorBlock,
|
292
|
+
colorBlockPrimary: colorBlockPrimary,
|
276
293
|
exampleText: exampleText,
|
277
294
|
withIcon: withIcon,
|
278
295
|
inlineWithIcon: inlineWithIcon,
|
@@ -27,7 +27,13 @@ export var FIGMA_LINKS = {
|
|
27
27
|
overflowing: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=45064-7148&mode=design&t=0RGDgLyKBzT6bOXO-0'
|
28
28
|
},
|
29
29
|
button: {
|
30
|
-
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=
|
30
|
+
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44916%3A47047&mode=dev',
|
31
|
+
disabled: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=45003%3A54887&mode=dev',
|
32
|
+
textIconButton: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=45003%3A54941&mode=dev',
|
33
|
+
inlineButton: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44916%3A47247&mode=dev',
|
34
|
+
colorBlockButton: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44916%3A47405&mode=dev',
|
35
|
+
critical: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44916%3A47237&mode=dev',
|
36
|
+
primary: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=44916%3A47151&mode=dev'
|
31
37
|
},
|
32
38
|
buttonBar: {
|
33
39
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=46080%3A753&mode=dev',
|