@conveyorhq/arrow-ds 1.92.0 → 1.93.0
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/package.json +1 -1
- package/public/components/Button/ButtonGroup.js +30 -3
- package/public/css/styles.css +17 -17
- package/public/css/styles.min.css +1 -1
- package/public/css/styles.min.css.map +1 -1
- package/src/components/Button/ButtonGroup.story.mdx +42 -0
- package/src/components/Button/ButtonGroup.tsx +16 -3
- package/src/components/Button/index.css +9 -9
package/package.json
CHANGED
|
@@ -1,18 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
23
|
};
|
|
5
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
25
|
exports.ButtonGroup = void 0;
|
|
7
|
-
const react_1 =
|
|
26
|
+
const react_1 = __importStar(require("react"));
|
|
8
27
|
const classnames_1 = __importDefault(require("classnames"));
|
|
28
|
+
const Box_1 = require("../Box");
|
|
9
29
|
const Flex_1 = require("../Flex");
|
|
10
30
|
const bem_1 = require("../../utilities/bem");
|
|
11
31
|
const types_1 = require("../../types");
|
|
12
32
|
const cn = "ButtonGroup";
|
|
13
33
|
const ButtonGroup = (props) => {
|
|
14
|
-
const { className, isSegmented = false, isFullWidth = false, justify = types_1.JUSTIFY.START, ...rest } = props;
|
|
34
|
+
const { children, className, isSegmented = false, isFullWidth = false, justify = types_1.JUSTIFY.START, ...rest } = props;
|
|
15
35
|
const buttonGroupClassName = classnames_1.default(bem_1.bem(cn), isSegmented && bem_1.bem(cn, { m: "isSegmented" }), isFullWidth && bem_1.bem(cn, { m: "isFullWidth" }), `justify-${justify}`, className);
|
|
16
|
-
return react_1.default.createElement(Flex_1.Flex, Object.assign({ className: buttonGroupClassName }, rest)
|
|
36
|
+
return (react_1.default.createElement(Flex_1.Flex, Object.assign({ className: buttonGroupClassName }, rest), isSegmented
|
|
37
|
+
? react_1.Children.map(children, (child) => {
|
|
38
|
+
if (react_1.isValidElement(child)) {
|
|
39
|
+
return react_1.default.createElement(Box_1.Box, { className: bem_1.bem(cn, { e: "button" }) }, child);
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
})
|
|
43
|
+
: children));
|
|
17
44
|
};
|
|
18
45
|
exports.ButtonGroup = ButtonGroup;
|
package/public/css/styles.css
CHANGED
|
@@ -2006,29 +2006,29 @@ override built-in Image component classes */
|
|
|
2006
2006
|
|
|
2007
2007
|
.ads-ButtonGroup:not(.ads-ButtonGroup--isSegmented) {
|
|
2008
2008
|
flex-wrap: wrap;
|
|
2009
|
+
gap: 8px;
|
|
2009
2010
|
}
|
|
2010
2011
|
|
|
2011
2012
|
.ads-ButtonGroup--isSegmented {
|
|
2012
2013
|
flex-wrap: nowrap;
|
|
2013
2014
|
}
|
|
2014
2015
|
|
|
2015
|
-
.ads-ButtonGroup--isSegmented
|
|
2016
|
+
.ads-ButtonGroup--isSegmented
|
|
2017
|
+
> .ads-ButtonGroup-button:not(:first-of-type)
|
|
2018
|
+
.ads-Button {
|
|
2016
2019
|
border-top-left-radius: 0;
|
|
2017
2020
|
border-bottom-left-radius: 0;
|
|
2018
2021
|
}
|
|
2019
2022
|
|
|
2020
|
-
.ads-ButtonGroup--isSegmented
|
|
2023
|
+
.ads-ButtonGroup--isSegmented
|
|
2024
|
+
> .ads-ButtonGroup-button:not(:last-of-type)
|
|
2025
|
+
.ads-Button {
|
|
2021
2026
|
border-top-right-radius: 0;
|
|
2022
2027
|
border-bottom-right-radius: 0;
|
|
2023
2028
|
border-right-width: 0;
|
|
2024
2029
|
}
|
|
2025
2030
|
|
|
2026
|
-
.ads-ButtonGroup
|
|
2027
|
-
> .ads-Button:not(:last-of-type) {
|
|
2028
|
-
margin-right: 8px;
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
|
-
.ads-ButtonGroup--isFullWidth > .ads-Button {
|
|
2031
|
+
.ads-ButtonGroup--isFullWidth .ads-Button {
|
|
2032
2032
|
flex: 1 1 auto;
|
|
2033
2033
|
}
|
|
2034
2034
|
|
|
@@ -8291,6 +8291,10 @@ override built-in Image component classes */
|
|
|
8291
8291
|
width: 100%;
|
|
8292
8292
|
}
|
|
8293
8293
|
|
|
8294
|
+
.w-56 {
|
|
8295
|
+
width: 224px;
|
|
8296
|
+
}
|
|
8297
|
+
|
|
8294
8298
|
.w-4 {
|
|
8295
8299
|
width: 16px;
|
|
8296
8300
|
}
|
|
@@ -8303,10 +8307,6 @@ override built-in Image component classes */
|
|
|
8303
8307
|
width: 60px;
|
|
8304
8308
|
}
|
|
8305
8309
|
|
|
8306
|
-
.w-56 {
|
|
8307
|
-
width: 224px;
|
|
8308
|
-
}
|
|
8309
|
-
|
|
8310
8310
|
.w-1\/2 {
|
|
8311
8311
|
width: 50%;
|
|
8312
8312
|
}
|
|
@@ -8735,6 +8735,11 @@ override built-in Image component classes */
|
|
|
8735
8735
|
padding-right: 16px;
|
|
8736
8736
|
}
|
|
8737
8737
|
|
|
8738
|
+
.py-3 {
|
|
8739
|
+
padding-top: 12px;
|
|
8740
|
+
padding-bottom: 12px;
|
|
8741
|
+
}
|
|
8742
|
+
|
|
8738
8743
|
.px-3 {
|
|
8739
8744
|
padding-left: 12px;
|
|
8740
8745
|
padding-right: 12px;
|
|
@@ -8750,11 +8755,6 @@ override built-in Image component classes */
|
|
|
8750
8755
|
padding-right: 32px;
|
|
8751
8756
|
}
|
|
8752
8757
|
|
|
8753
|
-
.py-3 {
|
|
8754
|
-
padding-top: 12px;
|
|
8755
|
-
padding-bottom: 12px;
|
|
8756
|
-
}
|
|
8757
|
-
|
|
8758
8758
|
.px-1 {
|
|
8759
8759
|
padding-left: 4px;
|
|
8760
8760
|
padding-right: 4px;
|