@activecollab/components 2.0.166 → 2.0.167
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/dist/cjs/components/ButtonGroup/ButtonGroup.js +4 -2
- package/dist/cjs/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/cjs/components/ButtonGroup/Styles.js +10 -3
- package/dist/cjs/components/ButtonGroup/Styles.js.map +1 -1
- package/dist/esm/components/ButtonGroup/ButtonGroup.d.ts +3 -1
- package/dist/esm/components/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/esm/components/ButtonGroup/ButtonGroup.js +3 -1
- package/dist/esm/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/esm/components/ButtonGroup/Styles.d.ts +3 -1
- package/dist/esm/components/ButtonGroup/Styles.d.ts.map +1 -1
- package/dist/esm/components/ButtonGroup/Styles.js +5 -5
- package/dist/esm/components/ButtonGroup/Styles.js.map +1 -1
- package/dist/esm/components/Steppers/DateStepper/Styles.d.ts +3 -1
- package/dist/esm/components/Steppers/DateStepper/Styles.d.ts.map +1 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ exports.ButtonGroup = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
9
|
var _Styles = require("./Styles");
|
|
10
|
-
var _excluded = ["children", "className"];
|
|
10
|
+
var _excluded = ["children", "className", "invalid"];
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -17,10 +17,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
17
17
|
var ButtonGroup = exports.ButtonGroup = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
18
18
|
var children = _ref.children,
|
|
19
19
|
className = _ref.className,
|
|
20
|
+
invalid = _ref.invalid,
|
|
20
21
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
22
|
return /*#__PURE__*/_react.default.createElement(_Styles.StyledButtonGroup, _extends({
|
|
22
23
|
ref: ref,
|
|
23
|
-
className: (0, _classnames.default)("c-btn-group", className)
|
|
24
|
+
className: (0, _classnames.default)("c-btn-group", className),
|
|
25
|
+
$invalid: invalid
|
|
24
26
|
}, rest), children);
|
|
25
27
|
});
|
|
26
28
|
ButtonGroup.displayName = "ButtonGroup";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_Styles","_excluded","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","ButtonGroup","exports","forwardRef","_ref","ref","children","className","rest","createElement","StyledButtonGroup","classNames","displayName"],"sources":["../../../../src/components/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport classNames from \"classnames\";\n\nimport { StyledButtonGroup } from \"./Styles\";\n\nexport const ButtonGroup = forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\"
|
|
1
|
+
{"version":3,"file":"ButtonGroup.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_Styles","_excluded","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","ButtonGroup","exports","forwardRef","_ref","ref","children","className","invalid","rest","createElement","StyledButtonGroup","classNames","$invalid","displayName"],"sources":["../../../../src/components/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport classNames from \"classnames\";\n\nimport { StyledButtonGroup } from \"./Styles\";\n\nexport const ButtonGroup = forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\"> & { invalid?: boolean }\n>(({ children, className, invalid, ...rest }, ref) => (\n <StyledButtonGroup\n ref={ref}\n className={classNames(\"c-btn-group\", className)}\n $invalid={invalid}\n {...rest}\n >\n {children}\n </StyledButtonGroup>\n));\n\nButtonGroup.displayName = \"ButtonGroup\";\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AAA6C,IAAAI,SAAA;AAAA,SAAAF,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,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AAAD,WAAA,gBAAG,IAAAE,iBAAU,EAGnC,UAAAC,IAAA,EAA4CC,GAAG;EAAA,IAA5CC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAEC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;IAAKC,IAAI,GAAAjB,wBAAA,CAAAY,IAAA,EAAA5C,SAAA;EAAA,oBACxCN,MAAA,CAAAS,OAAA,CAAA+C,aAAA,CAACnD,OAAA,CAAAoD,iBAAiB,EAAA5B,QAAA;IAChBsB,GAAG,EAAEA,GAAI;IACTE,SAAS,EAAE,IAAAK,mBAAU,EAAC,aAAa,EAAEL,SAAS,CAAE;IAChDM,QAAQ,EAAEL;EAAQ,GACdC,IAAI,GAEPH,QACgB,CAAC;AAAA,CACrB,CAAC;AAEFL,WAAW,CAACa,WAAW,GAAG,aAAa"}
|
|
@@ -4,26 +4,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.StyledButtonGroup = void 0;
|
|
7
|
-
var _styledComponents =
|
|
7
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
8
|
var _BoxSizingStyle = require("../BoxSizingStyle");
|
|
9
9
|
var _FontStyle = require("../FontStyle");
|
|
10
|
-
function
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
12
|
var StyledButtonGroup = exports.StyledButtonGroup = _styledComponents.default.div.withConfig({
|
|
12
13
|
displayName: "Styles__StyledButtonGroup",
|
|
13
14
|
componentId: "sc-1vw4iq2-0"
|
|
14
|
-
})(["", " ", " ", " button{&:first-child:not(:last-child){svg{margin-right:-4px;}", "}&:last-child:not(:first-child){svg{margin-left:-4px;}", "}&:not(:first-child):not(:last-child){", "}}svg{", "}"], {
|
|
15
|
+
})(["", " ", " ", " button{&:disabled{opacity:1;color:var(--color-theme-500);pointer-events:none;}&:first-child:not(:last-child){svg{margin-right:-4px;}", " ", "}&:last-child:not(:first-child){svg{margin-left:-4px;}", " ", "}&:not(:first-child):not(:last-child){", " ", "}}svg{", "}"], {
|
|
15
16
|
"display": "flex",
|
|
16
17
|
"flexDirection": "row"
|
|
17
18
|
}, _FontStyle.FontStyle, _BoxSizingStyle.BoxSizingStyle, {
|
|
18
19
|
"marginRight": "-1px",
|
|
19
20
|
"borderTopRightRadius": "0px",
|
|
20
21
|
"borderBottomRightRadius": "0px"
|
|
22
|
+
}, function (props) {
|
|
23
|
+
return props.$invalid && (0, _styledComponents.css)(["border-top-color:var(--red-alert) !important;border-bottom-color:var(--red-alert) !important;border-left-color:var(--red-alert) !important;"]);
|
|
21
24
|
}, {
|
|
22
25
|
"borderTopLeftRadius": "0px",
|
|
23
26
|
"borderBottomLeftRadius": "0px"
|
|
27
|
+
}, function (props) {
|
|
28
|
+
return props.$invalid && (0, _styledComponents.css)(["border-top-color:var(--red-alert) !important;border-bottom-color:var(--red-alert) !important;border-right-color:var(--red-alert) !important;"]);
|
|
24
29
|
}, {
|
|
25
30
|
"marginRight": "-1px",
|
|
26
31
|
"borderRadius": "0px"
|
|
32
|
+
}, function (props) {
|
|
33
|
+
return props.$invalid && (0, _styledComponents.css)(["border-top-color:var(--red-alert) !important;border-bottom-color:var(--red-alert) !important;"]);
|
|
27
34
|
}, {
|
|
28
35
|
"fill": "currentColor",
|
|
29
36
|
"color": "var(--color-theme-900)"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["_styledComponents","
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["_styledComponents","_interopRequireWildcard","require","_BoxSizingStyle","_FontStyle","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","StyledButtonGroup","exports","styled","div","withConfig","displayName","componentId","FontStyle","BoxSizingStyle","props","$invalid","css"],"sources":["../../../../src/components/ButtonGroup/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport tw from \"twin.macro\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const StyledButtonGroup = styled.div<{ $invalid?: boolean }>`\n ${tw`tw-flex tw-flex-row`}\n ${FontStyle}\n ${BoxSizingStyle}\n\n button {\n &:disabled {\n opacity: 1;\n color: var(--color-theme-500);\n pointer-events: none;\n }\n\n &:first-child:not(:last-child) {\n svg {\n margin-right: -4px;\n }\n ${tw`tw--mr-px tw-rounded-r-none`}\n ${(props) =>\n props.$invalid &&\n css`\n border-top-color: var(--red-alert) !important;\n border-bottom-color: var(--red-alert) !important;\n border-left-color: var(--red-alert) !important;\n `}\n }\n\n &:last-child:not(:first-child) {\n svg {\n margin-left: -4px;\n }\n ${tw`tw-rounded-l-none`}\n ${(props) =>\n props.$invalid &&\n css`\n border-top-color: var(--red-alert) !important;\n border-bottom-color: var(--red-alert) !important;\n border-right-color: var(--red-alert) !important;\n `}\n }\n\n &:not(:first-child):not(:last-child) {\n ${tw`tw--mr-px tw-rounded-none`}\n ${(props) =>\n props.$invalid &&\n css`\n border-top-color: var(--red-alert) !important;\n border-bottom-color: var(--red-alert) !important;\n `}\n }\n }\n\n svg {\n ${tw`tw-text-theme-900 tw-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AAAgB,GAAA,CAAAnB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAElC,IAAMY,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAGE,yBAAM,CAACC,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8RACrC;EAAA;EAAA;AAAoB,CAAC,EACvBC,oBAAS,EACTC,8BAAc,EAaR;EAAA;EAAA;EAAA;AAA4B,CAAC,EAC/B,UAACC,KAAK;EAAA,OACNA,KAAK,CAACC,QAAQ,QACdC,qBAAG,kJAIF;AAAA,GAOC;EAAA;EAAA;AAAkB,CAAC,EACrB,UAACF,KAAK;EAAA,OACNA,KAAK,CAACC,QAAQ,QACdC,qBAAG,mJAIF;AAAA,GAIC;EAAA;EAAA;AAA0B,CAAC,EAC7B,UAACF,KAAK;EAAA,OACNA,KAAK,CAACC,QAAQ,QACdC,qBAAG,oGAGF;AAAA,GAKD;EAAA;EAAA;AAAkC,CAAC,CAE1C;AAEDX,iBAAiB,CAACK,WAAW,GAAG,mBAAmB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const ButtonGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> &
|
|
2
|
+
export declare const ButtonGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
invalid?: boolean | undefined;
|
|
4
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
3
5
|
//# sourceMappingURL=ButtonGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/ButtonGroup/ButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/ButtonGroup/ButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,eAAO,MAAM,WAAW;;wCAYtB,CAAC"}
|
|
@@ -6,11 +6,13 @@ export const ButtonGroup = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
6
6
|
let {
|
|
7
7
|
children,
|
|
8
8
|
className,
|
|
9
|
+
invalid,
|
|
9
10
|
...rest
|
|
10
11
|
} = _ref;
|
|
11
12
|
return /*#__PURE__*/React.createElement(StyledButtonGroup, _extends({
|
|
12
13
|
ref: ref,
|
|
13
|
-
className: classNames("c-btn-group", className)
|
|
14
|
+
className: classNames("c-btn-group", className),
|
|
15
|
+
$invalid: invalid
|
|
14
16
|
}, rest), children);
|
|
15
17
|
});
|
|
16
18
|
ButtonGroup.displayName = "ButtonGroup";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.js","names":["React","forwardRef","classNames","StyledButtonGroup","ButtonGroup","_ref","ref","children","className","rest","createElement","_extends","displayName"],"sources":["../../../../src/components/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport classNames from \"classnames\";\n\nimport { StyledButtonGroup } from \"./Styles\";\n\nexport const ButtonGroup = forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\"
|
|
1
|
+
{"version":3,"file":"ButtonGroup.js","names":["React","forwardRef","classNames","StyledButtonGroup","ButtonGroup","_ref","ref","children","className","invalid","rest","createElement","_extends","$invalid","displayName"],"sources":["../../../../src/components/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport classNames from \"classnames\";\n\nimport { StyledButtonGroup } from \"./Styles\";\n\nexport const ButtonGroup = forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\"> & { invalid?: boolean }\n>(({ children, className, invalid, ...rest }, ref) => (\n <StyledButtonGroup\n ref={ref}\n className={classNames(\"c-btn-group\", className)}\n $invalid={invalid}\n {...rest}\n >\n {children}\n </StyledButtonGroup>\n));\n\nButtonGroup.displayName = \"ButtonGroup\";\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AAEzC,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,iBAAiB,QAAQ,UAAU;AAE5C,OAAO,MAAMC,WAAW,gBAAGH,UAAU,CAGnC,CAAAI,IAAA,EAA4CC,GAAG;EAAA,IAA9C;IAAEC,QAAQ;IAAEC,SAAS;IAAEC,OAAO;IAAE,GAAGC;EAAK,CAAC,GAAAL,IAAA;EAAA,oBAC1CL,KAAA,CAAAW,aAAA,CAACR,iBAAiB,EAAAS,QAAA;IAChBN,GAAG,EAAEA,GAAI;IACTE,SAAS,EAAEN,UAAU,CAAC,aAAa,EAAEM,SAAS,CAAE;IAChDK,QAAQ,EAAEJ;EAAQ,GACdC,IAAI,GAEPH,QACgB,CAAC;AAAA,CACrB,CAAC;AAEFH,WAAW,CAACU,WAAW,GAAG,aAAa"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export declare const StyledButtonGroup: import("styled-components").StyledComponent<"div", any, {
|
|
1
|
+
export declare const StyledButtonGroup: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
$invalid?: boolean | undefined;
|
|
3
|
+
}, never>;
|
|
2
4
|
//# sourceMappingURL=Styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ButtonGroup/Styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ButtonGroup/Styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB;;SAsD7B,CAAC"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
2
|
import { BoxSizingStyle } from "../BoxSizingStyle";
|
|
3
3
|
import { FontStyle } from "../FontStyle";
|
|
4
4
|
export const StyledButtonGroup = styled.div.withConfig({
|
|
5
5
|
displayName: "Styles__StyledButtonGroup",
|
|
6
6
|
componentId: "sc-1vw4iq2-0"
|
|
7
|
-
})(["", " ", " ", " button{&:first-child:not(:last-child){svg{margin-right:-4px;}", "}&:last-child:not(:first-child){svg{margin-left:-4px;}", "}&:not(:first-child):not(:last-child){", "}}svg{", "}"], {
|
|
7
|
+
})(["", " ", " ", " button{&:disabled{opacity:1;color:var(--color-theme-500);pointer-events:none;}&:first-child:not(:last-child){svg{margin-right:-4px;}", " ", "}&:last-child:not(:first-child){svg{margin-left:-4px;}", " ", "}&:not(:first-child):not(:last-child){", " ", "}}svg{", "}"], {
|
|
8
8
|
"display": "flex",
|
|
9
9
|
"flexDirection": "row"
|
|
10
10
|
}, FontStyle, BoxSizingStyle, {
|
|
11
11
|
"marginRight": "-1px",
|
|
12
12
|
"borderTopRightRadius": "0px",
|
|
13
13
|
"borderBottomRightRadius": "0px"
|
|
14
|
-
}, {
|
|
14
|
+
}, props => props.$invalid && css(["border-top-color:var(--red-alert) !important;border-bottom-color:var(--red-alert) !important;border-left-color:var(--red-alert) !important;"]), {
|
|
15
15
|
"borderTopLeftRadius": "0px",
|
|
16
16
|
"borderBottomLeftRadius": "0px"
|
|
17
|
-
}, {
|
|
17
|
+
}, props => props.$invalid && css(["border-top-color:var(--red-alert) !important;border-bottom-color:var(--red-alert) !important;border-right-color:var(--red-alert) !important;"]), {
|
|
18
18
|
"marginRight": "-1px",
|
|
19
19
|
"borderRadius": "0px"
|
|
20
|
-
}, {
|
|
20
|
+
}, props => props.$invalid && css(["border-top-color:var(--red-alert) !important;border-bottom-color:var(--red-alert) !important;"]), {
|
|
21
21
|
"fill": "currentColor",
|
|
22
22
|
"color": "var(--color-theme-900)"
|
|
23
23
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["styled","BoxSizingStyle","FontStyle","StyledButtonGroup","div","withConfig","displayName","componentId"],"sources":["../../../../src/components/ButtonGroup/Styles.ts"],"sourcesContent":["import styled from \"styled-components\";\nimport tw from \"twin.macro\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const StyledButtonGroup = styled.div
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["styled","css","BoxSizingStyle","FontStyle","StyledButtonGroup","div","withConfig","displayName","componentId","props","$invalid"],"sources":["../../../../src/components/ButtonGroup/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport tw from \"twin.macro\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const StyledButtonGroup = styled.div<{ $invalid?: boolean }>`\n ${tw`tw-flex tw-flex-row`}\n ${FontStyle}\n ${BoxSizingStyle}\n\n button {\n &:disabled {\n opacity: 1;\n color: var(--color-theme-500);\n pointer-events: none;\n }\n\n &:first-child:not(:last-child) {\n svg {\n margin-right: -4px;\n }\n ${tw`tw--mr-px tw-rounded-r-none`}\n ${(props) =>\n props.$invalid &&\n css`\n border-top-color: var(--red-alert) !important;\n border-bottom-color: var(--red-alert) !important;\n border-left-color: var(--red-alert) !important;\n `}\n }\n\n &:last-child:not(:first-child) {\n svg {\n margin-left: -4px;\n }\n ${tw`tw-rounded-l-none`}\n ${(props) =>\n props.$invalid &&\n css`\n border-top-color: var(--red-alert) !important;\n border-bottom-color: var(--red-alert) !important;\n border-right-color: var(--red-alert) !important;\n `}\n }\n\n &:not(:first-child):not(:last-child) {\n ${tw`tw--mr-px tw-rounded-none`}\n ${(props) =>\n props.$invalid &&\n css`\n border-top-color: var(--red-alert) !important;\n border-bottom-color: var(--red-alert) !important;\n `}\n }\n }\n\n svg {\n ${tw`tw-text-theme-900 tw-fill-current`}\n }\n`;\n\nStyledButtonGroup.displayName = \"StyledButtonGroup\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAG/C,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,SAAS,QAAQ,cAAc;AAExC,OAAO,MAAMC,iBAAiB,GAAGJ,MAAM,CAACK,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8RACrC;EAAA;EAAA;AAAoB,CAAC,EACvBL,SAAS,EACTD,cAAc,EAaR;EAAA;EAAA;EAAA;AAA4B,CAAC,EAC9BO,KAAK,IACNA,KAAK,CAACC,QAAQ,IACdT,GAAG,iJAIF,EAOC;EAAA;EAAA;AAAkB,CAAC,EACpBQ,KAAK,IACNA,KAAK,CAACC,QAAQ,IACdT,GAAG,kJAIF,EAIC;EAAA;EAAA;AAA0B,CAAC,EAC5BQ,KAAK,IACNA,KAAK,CAACC,QAAQ,IACdT,GAAG,mGAGF,EAKD;EAAA;EAAA;AAAkC,CAAC,CAE1C;AAEDG,iBAAiB,CAACG,WAAW,GAAG,mBAAmB"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const StyledButton: import("styled-components").StyledComponent<"button", any, {}, never>;
|
|
3
3
|
export declare const StyledMenu: import("styled-components").StyledComponent<import("react").FC<import("../../Menu").IMenu>, any, {}, never>;
|
|
4
|
-
export declare const StyledButtonGroup: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> &
|
|
4
|
+
export declare const StyledButtonGroup: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
+
invalid?: boolean | undefined;
|
|
6
|
+
} & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
5
7
|
export declare const StyledSpan: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
6
8
|
interface StyledDiv {
|
|
7
9
|
$isTargetable: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Steppers/DateStepper/Styles.ts"],"names":[],"mappings":";AASA,eAAO,MAAM,YAAY,uEAmDxB,CAAC;AAEF,eAAO,MAAM,UAAU,6GAOtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Steppers/DateStepper/Styles.ts"],"names":[],"mappings":";AASA,eAAO,MAAM,YAAY,uEAmDxB,CAAC;AAEF,eAAO,MAAM,UAAU,6GAOtB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;mEAQ7B,CAAC;AAEF,eAAO,MAAM,UAAU,qEAGtB,CAAC;AAEF,UAAU,SAAS;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,2EAwErB,CAAC;AAEF,eAAO,MAAM,aAAa;;sEAEzB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -322,33 +322,41 @@
|
|
|
322
322
|
var StyledButtonGroup$1 = styled__default["default"].div.withConfig({
|
|
323
323
|
displayName: "Styles__StyledButtonGroup",
|
|
324
324
|
componentId: "sc-1vw4iq2-0"
|
|
325
|
-
})(["", " ", " ", " button{&:first-child:not(:last-child){svg{margin-right:-4px;}", "}&:last-child:not(:first-child){svg{margin-left:-4px;}", "}&:not(:first-child):not(:last-child){", "}}svg{", "}"], {
|
|
325
|
+
})(["", " ", " ", " button{&:disabled{opacity:1;color:var(--color-theme-500);pointer-events:none;}&:first-child:not(:last-child){svg{margin-right:-4px;}", " ", "}&:last-child:not(:first-child){svg{margin-left:-4px;}", " ", "}&:not(:first-child):not(:last-child){", " ", "}}svg{", "}"], {
|
|
326
326
|
"display": "flex",
|
|
327
327
|
"flexDirection": "row"
|
|
328
328
|
}, FontStyle, BoxSizingStyle, {
|
|
329
329
|
"marginRight": "-1px",
|
|
330
330
|
"borderTopRightRadius": "0px",
|
|
331
331
|
"borderBottomRightRadius": "0px"
|
|
332
|
+
}, function (props) {
|
|
333
|
+
return props.$invalid && styled.css(["border-top-color:var(--red-alert) !important;border-bottom-color:var(--red-alert) !important;border-left-color:var(--red-alert) !important;"]);
|
|
332
334
|
}, {
|
|
333
335
|
"borderTopLeftRadius": "0px",
|
|
334
336
|
"borderBottomLeftRadius": "0px"
|
|
337
|
+
}, function (props) {
|
|
338
|
+
return props.$invalid && styled.css(["border-top-color:var(--red-alert) !important;border-bottom-color:var(--red-alert) !important;border-right-color:var(--red-alert) !important;"]);
|
|
335
339
|
}, {
|
|
336
340
|
"marginRight": "-1px",
|
|
337
341
|
"borderRadius": "0px"
|
|
342
|
+
}, function (props) {
|
|
343
|
+
return props.$invalid && styled.css(["border-top-color:var(--red-alert) !important;border-bottom-color:var(--red-alert) !important;"]);
|
|
338
344
|
}, {
|
|
339
345
|
"fill": "currentColor",
|
|
340
346
|
"color": "var(--color-theme-900)"
|
|
341
347
|
});
|
|
342
348
|
StyledButtonGroup$1.displayName = "StyledButtonGroup";
|
|
343
349
|
|
|
344
|
-
var _excluded$1v = ["children", "className"];
|
|
350
|
+
var _excluded$1v = ["children", "className", "invalid"];
|
|
345
351
|
var ButtonGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
346
352
|
var children = _ref.children,
|
|
347
353
|
className = _ref.className,
|
|
354
|
+
invalid = _ref.invalid,
|
|
348
355
|
rest = _objectWithoutProperties(_ref, _excluded$1v);
|
|
349
356
|
return /*#__PURE__*/React__default["default"].createElement(StyledButtonGroup$1, _extends({
|
|
350
357
|
ref: ref,
|
|
351
|
-
className: classNames__default["default"]("c-btn-group", className)
|
|
358
|
+
className: classNames__default["default"]("c-btn-group", className),
|
|
359
|
+
$invalid: invalid
|
|
352
360
|
}, rest), children);
|
|
353
361
|
});
|
|
354
362
|
ButtonGroup.displayName = "ButtonGroup";
|