@pingux/astro 2.125.0-alpha.2 → 2.125.0-alpha.4
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/RockerButtonGroup/RockerButtonGroup.stories.js +22 -22
- package/lib/cjs/components/RockerButtonGroup/stories/NextGenDarkRockerButtonGroup.chromatic.stories.d.ts +6 -0
- package/lib/cjs/components/RockerButtonGroup/stories/NextGenDarkRockerButtonGroup.chromatic.stories.js +22 -0
- package/lib/cjs/components/RockerButtonGroup/stories/NextGenRockerButtonGroup.chromatic.stories.d.ts +6 -0
- package/lib/cjs/components/RockerButtonGroup/stories/NextGenRockerButtonGroup.chromatic.stories.js +22 -0
- package/lib/cjs/{styles/themeOverrides → components/RockerButtonGroup}/stories/RockerButtonGroup.chromatic.stories.js +1 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +20 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +21 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +49 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +49 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +50 -0
- package/lib/components/RockerButtonGroup/RockerButtonGroup.stories.js +4 -4
- package/lib/components/RockerButtonGroup/stories/NextGenDarkRockerButtonGroup.chromatic.stories.js +12 -0
- package/lib/components/RockerButtonGroup/stories/NextGenRockerButtonGroup.chromatic.stories.js +12 -0
- package/lib/{styles/themeOverrides → components/RockerButtonGroup}/stories/RockerButtonGroup.chromatic.stories.js +1 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +21 -0
- package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/styles/themes/next-gen/variants/variants.js +50 -0
- package/package.json +1 -1
@@ -14,14 +14,14 @@ var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime-
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
16
16
|
var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
|
17
|
-
var
|
17
|
+
var _ = require("../..");
|
18
18
|
var _RockerButtonGroup = _interopRequireDefault(require("./RockerButtonGroup.mdx"));
|
19
19
|
var _react2 = require("@emotion/react");
|
20
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
21
21
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
22
22
|
var _default = {
|
23
23
|
title: 'Components/RockerButtonGroup',
|
24
|
-
component:
|
24
|
+
component: _.RockerButtonGroup,
|
25
25
|
parameters: {
|
26
26
|
docs: {
|
27
27
|
page: function page() {
|
@@ -48,26 +48,26 @@ var _default = {
|
|
48
48
|
exports["default"] = _default;
|
49
49
|
var Default = function Default(_ref) {
|
50
50
|
var args = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref), _ref));
|
51
|
-
return (0, _react2.jsx)(
|
51
|
+
return (0, _react2.jsx)(_.RockerButtonGroup, args, (0, _react2.jsx)(_.RockerButton, {
|
52
52
|
name: "and",
|
53
53
|
key: "and"
|
54
|
-
}, "And"), (0, _react2.jsx)(
|
54
|
+
}, "And"), (0, _react2.jsx)(_.RockerButton, {
|
55
55
|
name: "or",
|
56
56
|
key: "or"
|
57
|
-
}, "Or"), (0, _react2.jsx)(
|
57
|
+
}, "Or"), (0, _react2.jsx)(_.RockerButton, {
|
58
58
|
name: "maybe",
|
59
59
|
key: "maybe"
|
60
60
|
}, "Maybe"));
|
61
61
|
};
|
62
62
|
exports.Default = Default;
|
63
63
|
var Uncontrolled = function Uncontrolled() {
|
64
|
-
return (0, _react2.jsx)(
|
64
|
+
return (0, _react2.jsx)(_.RockerButtonGroup, null, (0, _react2.jsx)(_.RockerButton, {
|
65
65
|
name: "and",
|
66
66
|
key: "and"
|
67
|
-
}, "And"), (0, _react2.jsx)(
|
67
|
+
}, "And"), (0, _react2.jsx)(_.RockerButton, {
|
68
68
|
name: "or",
|
69
69
|
key: "or"
|
70
|
-
}, "Or"), (0, _react2.jsx)(
|
70
|
+
}, "Or"), (0, _react2.jsx)(_.RockerButton, {
|
71
71
|
name: "maybe",
|
72
72
|
key: "maybe"
|
73
73
|
}, "Maybe"));
|
@@ -78,55 +78,55 @@ var Controlled = function Controlled() {
|
|
78
78
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
79
79
|
currentTab = _useState2[0],
|
80
80
|
setCurrentTab = _useState2[1];
|
81
|
-
return (0, _react2.jsx)(
|
81
|
+
return (0, _react2.jsx)(_.RockerButtonGroup, {
|
82
82
|
selectedKey: currentTab,
|
83
83
|
onSelectionChange: setCurrentTab
|
84
|
-
}, (0, _react2.jsx)(
|
84
|
+
}, (0, _react2.jsx)(_.RockerButton, {
|
85
85
|
name: "and",
|
86
86
|
key: "and"
|
87
|
-
}, "And"), (0, _react2.jsx)(
|
87
|
+
}, "And"), (0, _react2.jsx)(_.RockerButton, {
|
88
88
|
name: "or",
|
89
89
|
key: "or"
|
90
|
-
}, "Or"), (0, _react2.jsx)(
|
90
|
+
}, "Or"), (0, _react2.jsx)(_.RockerButton, {
|
91
91
|
name: "maybe",
|
92
92
|
key: "maybe"
|
93
93
|
}, "Maybe"));
|
94
94
|
};
|
95
95
|
exports.Controlled = Controlled;
|
96
96
|
var DisabledSingleButton = function DisabledSingleButton() {
|
97
|
-
return (0, _react2.jsx)(
|
97
|
+
return (0, _react2.jsx)(_.RockerButtonGroup, {
|
98
98
|
defaultSelectedKey: "or",
|
99
99
|
disabledKeys: ['and']
|
100
|
-
}, (0, _react2.jsx)(
|
100
|
+
}, (0, _react2.jsx)(_.RockerButton, {
|
101
101
|
name: "and",
|
102
102
|
key: "and"
|
103
|
-
}, "And"), (0, _react2.jsx)(
|
103
|
+
}, "And"), (0, _react2.jsx)(_.RockerButton, {
|
104
104
|
name: "or",
|
105
105
|
key: "or"
|
106
|
-
}, "Or"), (0, _react2.jsx)(
|
106
|
+
}, "Or"), (0, _react2.jsx)(_.RockerButton, {
|
107
107
|
name: "maybe",
|
108
108
|
key: "maybe"
|
109
109
|
}, "Maybe"));
|
110
110
|
};
|
111
111
|
exports.DisabledSingleButton = DisabledSingleButton;
|
112
112
|
var customColors = function customColors() {
|
113
|
-
return (0, _react2.jsx)(
|
113
|
+
return (0, _react2.jsx)(_.RockerButtonGroup, null, (0, _react2.jsx)(_.RockerButton, {
|
114
114
|
name: "and",
|
115
115
|
key: "and",
|
116
116
|
selectedStyles: {
|
117
|
-
bg: '#640099'
|
117
|
+
bg: '#640099 !important'
|
118
118
|
}
|
119
|
-
}, "And"), (0, _react2.jsx)(
|
119
|
+
}, "And"), (0, _react2.jsx)(_.RockerButton, {
|
120
120
|
name: "or",
|
121
121
|
key: "or",
|
122
122
|
selectedStyles: {
|
123
|
-
bg: '#4660A2'
|
123
|
+
bg: '#4660A2 !important'
|
124
124
|
}
|
125
|
-
}, "Or"), (0, _react2.jsx)(
|
125
|
+
}, "Or"), (0, _react2.jsx)(_.RockerButton, {
|
126
126
|
name: "maybe",
|
127
127
|
key: "maybe",
|
128
128
|
selectedStyles: {
|
129
|
-
bg: '
|
129
|
+
bg: '#e30080 !important'
|
130
130
|
}
|
131
131
|
}, "Maybe"));
|
132
132
|
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports["default"] = exports.Default = void 0;
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
10
|
+
var _ = require("../../..");
|
11
|
+
var _RockerButtonGroupChromatic = require("./RockerButtonGroup.chromatic.stories");
|
12
|
+
var _react2 = require("@emotion/react");
|
13
|
+
var _default = {
|
14
|
+
title: 'Chromatic Only Onyx Dark RockerButtonGroup'
|
15
|
+
};
|
16
|
+
exports["default"] = _default;
|
17
|
+
var Default = function Default() {
|
18
|
+
return (0, _react2.jsx)(_.AstroProvider, {
|
19
|
+
themeOverrides: [_.NextGenDarkTheme]
|
20
|
+
}, (0, _react2.jsx)(_RockerButtonGroupChromatic.Default, null));
|
21
|
+
};
|
22
|
+
exports.Default = Default;
|
package/lib/cjs/components/RockerButtonGroup/stories/NextGenRockerButtonGroup.chromatic.stories.js
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports["default"] = exports.Default = void 0;
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
10
|
+
var _ = require("../../..");
|
11
|
+
var _RockerButtonGroupChromatic = require("./RockerButtonGroup.chromatic.stories");
|
12
|
+
var _react2 = require("@emotion/react");
|
13
|
+
var _default = {
|
14
|
+
title: 'Chromatic Only Onyx RockerButtonGroup'
|
15
|
+
};
|
16
|
+
exports["default"] = _default;
|
17
|
+
var Default = function Default() {
|
18
|
+
return (0, _react2.jsx)(_.AstroProvider, {
|
19
|
+
theme: _.NextGenTheme
|
20
|
+
}, (0, _react2.jsx)(_RockerButtonGroupChromatic.Default, null));
|
21
|
+
};
|
22
|
+
exports.Default = Default;
|
@@ -8,7 +8,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
8
8
|
exports["default"] = exports.Default = void 0;
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
10
10
|
var _index = require("../../../index");
|
11
|
-
var _withUiLibraryCss = _interopRequireDefault(require("
|
11
|
+
var _withUiLibraryCss = _interopRequireDefault(require("../../../styles/themeOverrides/withUiLibraryCss"));
|
12
12
|
var _react2 = require("@emotion/react");
|
13
13
|
var _default = {
|
14
14
|
title: 'Chromatic Only RockerButtonGroup',
|
@@ -1,4 +1,24 @@
|
|
1
1
|
declare const _default: {
|
2
|
+
rockerButton: {
|
3
|
+
innerContainer: {
|
4
|
+
border: number;
|
5
|
+
boxShadow: string;
|
6
|
+
backgroundColor: string;
|
7
|
+
button: {
|
8
|
+
backgroundColor: string;
|
9
|
+
color: string;
|
10
|
+
'&.is-selected': {
|
11
|
+
color: string;
|
12
|
+
};
|
13
|
+
'&.is-hovered': {
|
14
|
+
color: string;
|
15
|
+
};
|
16
|
+
'&.is-pressed': {
|
17
|
+
color: string;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
};
|
21
|
+
};
|
2
22
|
attachment: {
|
3
23
|
container: {
|
4
24
|
backgroundColor: string;
|
@@ -63,6 +63,26 @@ var modal = {
|
|
63
63
|
bg: 'background.base'
|
64
64
|
}
|
65
65
|
};
|
66
|
+
var rockerButton = {
|
67
|
+
innerContainer: {
|
68
|
+
border: 0,
|
69
|
+
boxShadow: 'none',
|
70
|
+
backgroundColor: 'gray-900',
|
71
|
+
'button': {
|
72
|
+
backgroundColor: 'gray-900',
|
73
|
+
color: 'blue-400',
|
74
|
+
'&.is-selected': {
|
75
|
+
color: 'gray-900'
|
76
|
+
},
|
77
|
+
'&.is-hovered': {
|
78
|
+
color: 'gray-900'
|
79
|
+
},
|
80
|
+
'&.is-pressed': {
|
81
|
+
color: 'gray-900'
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
};
|
66
86
|
var attachment = {
|
67
87
|
container: {
|
68
88
|
backgroundColor: 'background.secondary',
|
@@ -75,6 +95,7 @@ var tooltip = {
|
|
75
95
|
}
|
76
96
|
};
|
77
97
|
var _default = {
|
98
|
+
rockerButton: rockerButton,
|
78
99
|
attachment: attachment,
|
79
100
|
avatar: _avatar.avatar,
|
80
101
|
message: _message.message,
|
@@ -5,7 +5,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
6
6
|
});
|
7
7
|
exports.nextGenOnlyComponents = exports["default"] = exports.componentSpecificNextGenBlacklist = exports.astroBlacklistStory = void 0;
|
8
|
-
var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'NavigationHeader', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card', 'IconWrapper', 'ComboBoxField', 'CodeView', 'Sticker Sheet', 'NextGen ListViewItem', 'Skeleton', 'TooltipTrigger', 'ListViewItem', 'Pagination'];
|
8
|
+
var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'RockerButtonGroup', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'NavigationHeader', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card', 'IconWrapper', 'ComboBoxField', 'CodeView', 'Sticker Sheet', 'NextGen ListViewItem', 'Skeleton', 'TooltipTrigger', 'ListViewItem', 'Pagination'];
|
9
9
|
var componentSpecificNextGenBlacklist = {
|
10
10
|
AstroProvider: ['Default', 'With Custom Theme Override'],
|
11
11
|
Badge: ['Status Badge Variants', 'Badge With Left Slot And Icon', 'Callout Badges', 'Removable'],
|
@@ -3568,6 +3568,55 @@ declare const _default: {
|
|
3568
3568
|
};
|
3569
3569
|
};
|
3570
3570
|
};
|
3571
|
+
rockerButton: {
|
3572
|
+
innerContainer: {
|
3573
|
+
height: number;
|
3574
|
+
boxShadow: string;
|
3575
|
+
backgroundColor: string;
|
3576
|
+
borderRadius: string;
|
3577
|
+
padding: number;
|
3578
|
+
button: {
|
3579
|
+
backgroundColor: string;
|
3580
|
+
padding: string;
|
3581
|
+
height: string;
|
3582
|
+
color: string;
|
3583
|
+
border: string;
|
3584
|
+
borderColor: string;
|
3585
|
+
borderRadius: number;
|
3586
|
+
'&.is-selected': {
|
3587
|
+
color: string;
|
3588
|
+
backgroundColor: string;
|
3589
|
+
};
|
3590
|
+
'&.is-hovered': {
|
3591
|
+
backgroundColor: string;
|
3592
|
+
color: string;
|
3593
|
+
};
|
3594
|
+
'&.is-pressed': {
|
3595
|
+
backgroundColor: string;
|
3596
|
+
color: string;
|
3597
|
+
};
|
3598
|
+
'&.is-focused': {
|
3599
|
+
outline: string;
|
3600
|
+
outlineColor: string;
|
3601
|
+
outlineOffset: string;
|
3602
|
+
};
|
3603
|
+
};
|
3604
|
+
'button:not(:first-child)': {
|
3605
|
+
borderLeft: number;
|
3606
|
+
};
|
3607
|
+
'button:first-child': {
|
3608
|
+
borderTopLeftRadius: string;
|
3609
|
+
borderBottomLeftRadius: string;
|
3610
|
+
};
|
3611
|
+
'button:last-child': {
|
3612
|
+
borderTopRightRadius: string;
|
3613
|
+
borderBottomRightRadius: string;
|
3614
|
+
};
|
3615
|
+
};
|
3616
|
+
thumbSwitch: {
|
3617
|
+
textTransform: string;
|
3618
|
+
};
|
3619
|
+
};
|
3571
3620
|
tooltip: {
|
3572
3621
|
container: {
|
3573
3622
|
backgroundColor: string;
|
@@ -1233,6 +1233,55 @@ declare const _default: {
|
|
1233
1233
|
};
|
1234
1234
|
};
|
1235
1235
|
};
|
1236
|
+
rockerButton: {
|
1237
|
+
innerContainer: {
|
1238
|
+
height: number;
|
1239
|
+
boxShadow: string;
|
1240
|
+
backgroundColor: string;
|
1241
|
+
borderRadius: string;
|
1242
|
+
padding: number;
|
1243
|
+
button: {
|
1244
|
+
backgroundColor: string;
|
1245
|
+
padding: string;
|
1246
|
+
height: string;
|
1247
|
+
color: string;
|
1248
|
+
border: string;
|
1249
|
+
borderColor: string;
|
1250
|
+
borderRadius: number;
|
1251
|
+
'&.is-selected': {
|
1252
|
+
color: string;
|
1253
|
+
backgroundColor: string;
|
1254
|
+
};
|
1255
|
+
'&.is-hovered': {
|
1256
|
+
backgroundColor: string;
|
1257
|
+
color: string;
|
1258
|
+
};
|
1259
|
+
'&.is-pressed': {
|
1260
|
+
backgroundColor: string;
|
1261
|
+
color: string;
|
1262
|
+
};
|
1263
|
+
'&.is-focused': {
|
1264
|
+
outline: string;
|
1265
|
+
outlineColor: string;
|
1266
|
+
outlineOffset: string;
|
1267
|
+
};
|
1268
|
+
};
|
1269
|
+
'button:not(:first-child)': {
|
1270
|
+
borderLeft: number;
|
1271
|
+
};
|
1272
|
+
'button:first-child': {
|
1273
|
+
borderTopLeftRadius: string;
|
1274
|
+
borderBottomLeftRadius: string;
|
1275
|
+
};
|
1276
|
+
'button:last-child': {
|
1277
|
+
borderTopRightRadius: string;
|
1278
|
+
borderBottomRightRadius: string;
|
1279
|
+
};
|
1280
|
+
};
|
1281
|
+
thumbSwitch: {
|
1282
|
+
textTransform: string;
|
1283
|
+
};
|
1284
|
+
};
|
1236
1285
|
tooltip: {
|
1237
1286
|
container: {
|
1238
1287
|
backgroundColor: string;
|
@@ -304,6 +304,55 @@ var overlayPanel = {
|
|
304
304
|
backgroundColor: 'background.base'
|
305
305
|
}
|
306
306
|
};
|
307
|
+
var rockerButton = {
|
308
|
+
innerContainer: {
|
309
|
+
height: 50,
|
310
|
+
boxShadow: 'none',
|
311
|
+
backgroundColor: 'white',
|
312
|
+
borderRadius: '50px',
|
313
|
+
padding: 0,
|
314
|
+
'button': {
|
315
|
+
backgroundColor: 'white',
|
316
|
+
padding: '0px 15px',
|
317
|
+
height: '100%',
|
318
|
+
color: 'active',
|
319
|
+
border: '1px solid',
|
320
|
+
borderColor: 'active',
|
321
|
+
borderRadius: 0,
|
322
|
+
'&.is-selected': {
|
323
|
+
color: 'white',
|
324
|
+
backgroundColor: 'active'
|
325
|
+
},
|
326
|
+
'&.is-hovered': {
|
327
|
+
backgroundColor: '#1462C8 !important',
|
328
|
+
color: 'white'
|
329
|
+
},
|
330
|
+
'&.is-pressed': {
|
331
|
+
backgroundColor: '#135CBC !important',
|
332
|
+
color: 'white'
|
333
|
+
},
|
334
|
+
'&.is-focused': {
|
335
|
+
outline: '2px solid',
|
336
|
+
outlineColor: 'focus',
|
337
|
+
outlineOffset: '2px'
|
338
|
+
}
|
339
|
+
},
|
340
|
+
'button:not(:first-child)': {
|
341
|
+
borderLeft: 0
|
342
|
+
},
|
343
|
+
'button:first-child': {
|
344
|
+
borderTopLeftRadius: '50px',
|
345
|
+
borderBottomLeftRadius: '50px'
|
346
|
+
},
|
347
|
+
'button:last-child': {
|
348
|
+
borderTopRightRadius: '50px',
|
349
|
+
borderBottomRightRadius: '50px'
|
350
|
+
}
|
351
|
+
},
|
352
|
+
thumbSwitch: {
|
353
|
+
textTransform: 'none'
|
354
|
+
}
|
355
|
+
};
|
307
356
|
var loader = {
|
308
357
|
withinListView: {
|
309
358
|
color: 'active'
|
@@ -337,6 +386,7 @@ var _default = {
|
|
337
386
|
suggestion: _suggestion["default"],
|
338
387
|
response: _response["default"],
|
339
388
|
skeleton: _Skeleton["default"],
|
389
|
+
rockerButton: rockerButton,
|
340
390
|
tooltip: _tooltip["default"],
|
341
391
|
footer: _footer.footer,
|
342
392
|
loader: loader
|
@@ -3,7 +3,7 @@ import _objectDestructuringEmpty from "@babel/runtime-corejs3/helpers/esm/object
|
|
3
3
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
4
4
|
import React, { useState } from 'react';
|
5
5
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
6
|
-
import { RockerButton, RockerButtonGroup } from '
|
6
|
+
import { RockerButton, RockerButtonGroup } from '../..';
|
7
7
|
import RockerButtonGroupReadme from './RockerButtonGroup.mdx';
|
8
8
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
9
9
|
export default {
|
@@ -96,19 +96,19 @@ export var customColors = function customColors() {
|
|
96
96
|
name: "and",
|
97
97
|
key: "and",
|
98
98
|
selectedStyles: {
|
99
|
-
bg: '#640099'
|
99
|
+
bg: '#640099 !important'
|
100
100
|
}
|
101
101
|
}, "And"), ___EmotionJSX(RockerButton, {
|
102
102
|
name: "or",
|
103
103
|
key: "or",
|
104
104
|
selectedStyles: {
|
105
|
-
bg: '#4660A2'
|
105
|
+
bg: '#4660A2 !important'
|
106
106
|
}
|
107
107
|
}, "Or"), ___EmotionJSX(RockerButton, {
|
108
108
|
name: "maybe",
|
109
109
|
key: "maybe",
|
110
110
|
selectedStyles: {
|
111
|
-
bg: '
|
111
|
+
bg: '#e30080 !important'
|
112
112
|
}
|
113
113
|
}, "Maybe"));
|
114
114
|
};
|
package/lib/components/RockerButtonGroup/stories/NextGenDarkRockerButtonGroup.chromatic.stories.js
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { AstroProvider, NextGenDarkTheme } from '../../..';
|
3
|
+
import { Default as RockerButtonGroupNextGen } from './RockerButtonGroup.chromatic.stories';
|
4
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
+
export default {
|
6
|
+
title: 'Chromatic Only Onyx Dark RockerButtonGroup'
|
7
|
+
};
|
8
|
+
export var Default = function Default() {
|
9
|
+
return ___EmotionJSX(AstroProvider, {
|
10
|
+
themeOverrides: [NextGenDarkTheme]
|
11
|
+
}, ___EmotionJSX(RockerButtonGroupNextGen, null));
|
12
|
+
};
|
package/lib/components/RockerButtonGroup/stories/NextGenRockerButtonGroup.chromatic.stories.js
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { AstroProvider, NextGenTheme } from '../../..';
|
3
|
+
import { Default as RockerButtonGroupNextGen } from './RockerButtonGroup.chromatic.stories';
|
4
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
+
export default {
|
6
|
+
title: 'Chromatic Only Onyx RockerButtonGroup'
|
7
|
+
};
|
8
|
+
export var Default = function Default() {
|
9
|
+
return ___EmotionJSX(AstroProvider, {
|
10
|
+
theme: NextGenTheme
|
11
|
+
}, ___EmotionJSX(RockerButtonGroupNextGen, null));
|
12
|
+
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { RockerButton, RockerButtonGroup } from '../../../index';
|
3
|
-
import WithUiLibraryCss from '
|
3
|
+
import WithUiLibraryCss from '../../../styles/themeOverrides/withUiLibraryCss';
|
4
4
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
5
|
export default {
|
6
6
|
title: 'Chromatic Only RockerButtonGroup',
|
@@ -55,6 +55,26 @@ var modal = {
|
|
55
55
|
bg: 'background.base'
|
56
56
|
}
|
57
57
|
};
|
58
|
+
var rockerButton = {
|
59
|
+
innerContainer: {
|
60
|
+
border: 0,
|
61
|
+
boxShadow: 'none',
|
62
|
+
backgroundColor: 'gray-900',
|
63
|
+
'button': {
|
64
|
+
backgroundColor: 'gray-900',
|
65
|
+
color: 'blue-400',
|
66
|
+
'&.is-selected': {
|
67
|
+
color: 'gray-900'
|
68
|
+
},
|
69
|
+
'&.is-hovered': {
|
70
|
+
color: 'gray-900'
|
71
|
+
},
|
72
|
+
'&.is-pressed': {
|
73
|
+
color: 'gray-900'
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
};
|
58
78
|
var attachment = {
|
59
79
|
container: {
|
60
80
|
backgroundColor: 'background.secondary',
|
@@ -67,6 +87,7 @@ var tooltip = {
|
|
67
87
|
}
|
68
88
|
};
|
69
89
|
export default {
|
90
|
+
rockerButton: rockerButton,
|
70
91
|
attachment: attachment,
|
71
92
|
avatar: avatar,
|
72
93
|
message: message,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'NavigationHeader', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card', 'IconWrapper', 'ComboBoxField', 'CodeView', 'Sticker Sheet', 'NextGen ListViewItem', 'Skeleton', 'TooltipTrigger', 'ListViewItem', 'Pagination'];
|
1
|
+
var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'RockerButtonGroup', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'NavigationHeader', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card', 'IconWrapper', 'ComboBoxField', 'CodeView', 'Sticker Sheet', 'NextGen ListViewItem', 'Skeleton', 'TooltipTrigger', 'ListViewItem', 'Pagination'];
|
2
2
|
export var componentSpecificNextGenBlacklist = {
|
3
3
|
AstroProvider: ['Default', 'With Custom Theme Override'],
|
4
4
|
Badge: ['Status Badge Variants', 'Badge With Left Slot And Icon', 'Callout Badges', 'Removable'],
|
@@ -295,6 +295,55 @@ var overlayPanel = {
|
|
295
295
|
backgroundColor: 'background.base'
|
296
296
|
}
|
297
297
|
};
|
298
|
+
var rockerButton = {
|
299
|
+
innerContainer: {
|
300
|
+
height: 50,
|
301
|
+
boxShadow: 'none',
|
302
|
+
backgroundColor: 'white',
|
303
|
+
borderRadius: '50px',
|
304
|
+
padding: 0,
|
305
|
+
'button': {
|
306
|
+
backgroundColor: 'white',
|
307
|
+
padding: '0px 15px',
|
308
|
+
height: '100%',
|
309
|
+
color: 'active',
|
310
|
+
border: '1px solid',
|
311
|
+
borderColor: 'active',
|
312
|
+
borderRadius: 0,
|
313
|
+
'&.is-selected': {
|
314
|
+
color: 'white',
|
315
|
+
backgroundColor: 'active'
|
316
|
+
},
|
317
|
+
'&.is-hovered': {
|
318
|
+
backgroundColor: '#1462C8 !important',
|
319
|
+
color: 'white'
|
320
|
+
},
|
321
|
+
'&.is-pressed': {
|
322
|
+
backgroundColor: '#135CBC !important',
|
323
|
+
color: 'white'
|
324
|
+
},
|
325
|
+
'&.is-focused': {
|
326
|
+
outline: '2px solid',
|
327
|
+
outlineColor: 'focus',
|
328
|
+
outlineOffset: '2px'
|
329
|
+
}
|
330
|
+
},
|
331
|
+
'button:not(:first-child)': {
|
332
|
+
borderLeft: 0
|
333
|
+
},
|
334
|
+
'button:first-child': {
|
335
|
+
borderTopLeftRadius: '50px',
|
336
|
+
borderBottomLeftRadius: '50px'
|
337
|
+
},
|
338
|
+
'button:last-child': {
|
339
|
+
borderTopRightRadius: '50px',
|
340
|
+
borderBottomRightRadius: '50px'
|
341
|
+
}
|
342
|
+
},
|
343
|
+
thumbSwitch: {
|
344
|
+
textTransform: 'none'
|
345
|
+
}
|
346
|
+
};
|
298
347
|
var loader = {
|
299
348
|
withinListView: {
|
300
349
|
color: 'active'
|
@@ -328,6 +377,7 @@ export default {
|
|
328
377
|
suggestion: suggestion,
|
329
378
|
response: response,
|
330
379
|
skeleton: skeleton,
|
380
|
+
rockerButton: rockerButton,
|
331
381
|
tooltip: tooltip,
|
332
382
|
footer: footer,
|
333
383
|
loader: loader
|