@alixpartners/ui-components 1.21.0 → 1.21.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/CHANGELOG.md +6 -1
- package/dist/esm/components/ApButtons/ApButtons.js +1 -1
- package/dist/esm/components/ApButtons/ApButtons.js.map +1 -1
- package/dist/esm/components/ApButtons/styles.js +34 -24
- package/dist/esm/components/ApButtons/styles.js.map +1 -1
- package/dist/esm/components/ApCheckbox/ApCheckbox.js +8 -4
- package/dist/esm/components/ApCheckbox/ApCheckbox.js.map +1 -1
- package/dist/esm/components/ApCheckbox/styles.js +57 -41
- package/dist/esm/components/ApCheckbox/styles.js.map +1 -1
- package/dist/esm/components/ApIcon/paths.js +15 -0
- package/dist/esm/components/ApIcon/paths.js.map +1 -1
- package/dist/esm/components/ApRadio/ApRadio.js +5 -4
- package/dist/esm/components/ApRadio/ApRadio.js.map +1 -1
- package/dist/esm/components/ApRadio/styles.js +14 -4
- package/dist/esm/components/ApRadio/styles.js.map +1 -1
- package/dist/esm/components/ApToggleSwitch/ApToggleSwitch.js +5 -4
- package/dist/esm/components/ApToggleSwitch/ApToggleSwitch.js.map +1 -1
- package/dist/esm/components/ApToggleSwitch/styles.js +26 -14
- package/dist/esm/components/ApToggleSwitch/styles.js.map +1 -1
- package/dist/esm/internal/ApCheckLabel.js +2 -7
- package/dist/esm/internal/ApCheckLabel.js.map +1 -1
- package/dist/types/components/ApButtons/ApButtons.d.ts +1 -0
- package/dist/types/components/ApButtons/styles.d.ts +4 -4
- package/dist/types/components/ApCheckbox/ApCheckbox.d.ts +1 -0
- package/dist/types/components/ApCheckbox/styles.d.ts +4 -0
- package/dist/types/components/ApIcon/paths.d.ts +9 -0
- package/dist/types/components/ApRadio/styles.d.ts +3 -0
- package/dist/types/components/ApToggleSwitch/styles.d.ts +3 -0
- package/dist/umd/index.js +7 -7
- package/package.json +1 -1
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
2
6
|
var _a;
|
|
3
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.StyledToggleInput = exports.StyledToggleSwitch = void 0;
|
|
8
|
+
exports.StyledToggleInput = exports.StyledToggleSwitch = exports.StyledToggleWrapper = void 0;
|
|
5
9
|
var styled_components_1 = require("styled-components");
|
|
6
10
|
var theme_1 = require("../../utils/theme");
|
|
11
|
+
exports.StyledToggleWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n width: 44px;\n height: 32px;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n border-radius: 16px;\n ", "\n"], ["\n display: flex;\n width: 44px;\n height: 32px;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n border-radius: 16px;\n ",
|
|
12
|
+
"\n"])), function (_a) {
|
|
13
|
+
var disabled = _a.disabled;
|
|
14
|
+
return !disabled && styled_components_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &:hover {\n background-color: ", ";\n }\n &:focus {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n "], ["\n &:hover {\n background-color: ", ";\n }\n &:focus {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n "])), theme_1.colors.green50, theme_1.colors.green50, theme_1.colors.green100);
|
|
15
|
+
});
|
|
7
16
|
exports.StyledToggleSwitch = styled_components_1.default.span({
|
|
8
17
|
':after': {
|
|
9
18
|
borderColor: "" + theme_1.colors.transparent,
|
|
@@ -19,52 +28,55 @@ exports.StyledToggleSwitch = styled_components_1.default.span({
|
|
|
19
28
|
width: "calc(100% + 6px)",
|
|
20
29
|
},
|
|
21
30
|
':before': {
|
|
22
|
-
backgroundColor: theme_1.colors.
|
|
31
|
+
backgroundColor: theme_1.colors.grey400,
|
|
23
32
|
borderRadius: '50%',
|
|
24
33
|
bottom: '2px',
|
|
25
34
|
content: "''",
|
|
26
|
-
height: '
|
|
27
|
-
left: '
|
|
35
|
+
height: '12px',
|
|
36
|
+
left: '2px',
|
|
28
37
|
position: 'absolute',
|
|
29
38
|
transition: 'transform .1s linear, background-color .2s linear',
|
|
30
|
-
width: '
|
|
39
|
+
width: '12px',
|
|
31
40
|
},
|
|
32
41
|
backgroundColor: theme_1.colors.transparent,
|
|
33
|
-
borderColor: theme_1.colors.
|
|
42
|
+
borderColor: theme_1.colors.grey500,
|
|
34
43
|
borderRadius: '32px',
|
|
35
44
|
borderStyle: 'solid',
|
|
36
45
|
borderWidth: '2px',
|
|
37
46
|
boxSizing: 'border-box',
|
|
38
47
|
display: 'inline-block',
|
|
39
|
-
height: '
|
|
48
|
+
height: '20px',
|
|
40
49
|
outline: 'none',
|
|
41
50
|
position: 'relative',
|
|
42
|
-
right: '0px',
|
|
43
51
|
transition: 'all .1s linear',
|
|
44
52
|
width: '32px',
|
|
45
53
|
});
|
|
46
54
|
exports.StyledToggleInput = styled_components_1.default.input((_a = {},
|
|
47
55
|
_a[":checked + " + exports.StyledToggleSwitch] = {
|
|
48
56
|
':before': {
|
|
49
|
-
backgroundColor: theme_1.colors.
|
|
57
|
+
backgroundColor: theme_1.colors.grey700,
|
|
50
58
|
transform: 'translateX(12px)',
|
|
51
59
|
},
|
|
52
|
-
borderColor: theme_1.colors.
|
|
60
|
+
borderColor: theme_1.colors.grey700,
|
|
53
61
|
},
|
|
54
62
|
_a[":hover:enabled + " + exports.StyledToggleSwitch] = {
|
|
55
|
-
':before': { backgroundColor: theme_1.colors.
|
|
63
|
+
':before': { backgroundColor: theme_1.colors.grey700 },
|
|
56
64
|
},
|
|
57
65
|
_a[":disabled + " + exports.StyledToggleSwitch] = {
|
|
58
|
-
borderColor: theme_1.colors.
|
|
66
|
+
borderColor: theme_1.colors.grey300,
|
|
59
67
|
cursor: 'not-allowed',
|
|
68
|
+
':before': {
|
|
69
|
+
backgroundColor: theme_1.colors.grey300,
|
|
70
|
+
},
|
|
60
71
|
},
|
|
61
72
|
_a[":checked:disabled + " + exports.StyledToggleSwitch] = {
|
|
62
|
-
borderColor: theme_1.colors.
|
|
73
|
+
borderColor: theme_1.colors.grey400,
|
|
63
74
|
cursor: 'not-allowed',
|
|
64
75
|
':before': {
|
|
65
|
-
backgroundColor: theme_1.colors.
|
|
76
|
+
backgroundColor: theme_1.colors.grey400,
|
|
66
77
|
},
|
|
67
78
|
},
|
|
68
79
|
_a.display = 'none',
|
|
69
80
|
_a));
|
|
81
|
+
var templateObject_1, templateObject_2;
|
|
70
82
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/ApToggleSwitch/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/ApToggleSwitch/styles.ts"],"names":[],"mappings":";;;;;;;;AAAA,uDAA+C;AAE/C,2CAA0C;AAE7B,QAAA,mBAAmB,GAAG,2BAAM,CAAC,GAAG,gPAAwB,uKAQjE;IAaF,IACD,KAdG,UAAC,EAAY;QAAV,QAAQ,cAAA;IACX,OAAA,CAAC,QAAQ,IACT,uBAAG,iRAAA,mDAEuB,EAAc,+DAGd,EAAc,gEAGd,EAAe,sBAEtC,KARuB,cAAM,CAAC,OAAO,EAGd,cAAM,CAAC,OAAO,EAGd,cAAM,CAAC,QAAQ,CAEtC;AAXH,CAWG,EAEL;AAEW,QAAA,kBAAkB,GAAG,2BAAM,CAAC,IAAI,CAAC;IAC5C,QAAQ,EAAE;QACR,WAAW,EAAE,KAAG,cAAM,CAAC,WAAa;QACpC,YAAY,EAAE,MAAM;QACpB,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,KAAK;QAClB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,kBAAkB;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W,EAAE,cAAM,CAAC,OAAO;QAC3B,MAAM,EAAE,aAAa;QACrB,SAAS,EAAE;YACT,eAAe,EAAE,cAAM,CAAC,OAAO;SAChC;KACF;IAED,UAAO,GAAE,MAAM;QACf,CAAA"}
|
|
@@ -13,10 +13,9 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.StyledCheckLabel = exports.StyledCheckChild = void 0;
|
|
15
15
|
var styled_components_1 = require("styled-components");
|
|
16
|
-
var common_1 = require("../common/common");
|
|
17
16
|
var theme_1 = require("../utils/theme");
|
|
18
17
|
exports.StyledCheckChild = styled_components_1.default.span({
|
|
19
|
-
color: theme_1.colors.
|
|
18
|
+
color: theme_1.colors.grey700,
|
|
20
19
|
transition: 'all .1s linear',
|
|
21
20
|
userSelect: 'none'
|
|
22
21
|
});
|
|
@@ -42,10 +41,6 @@ var getStyles = function (flexDirection) {
|
|
|
42
41
|
};
|
|
43
42
|
exports.StyledCheckLabel = styled_components_1.default.label(__assign({ WebkitTapHighlightColor: theme_1.colors.transparent, alignItems: 'center', cursor: 'pointer', display: 'flex', outline: 'none', position: 'relative' }, theme_1.font), function (_a) {
|
|
44
43
|
var flexDirection = _a.flexDirection, justifyContent = _a.justifyContent, theme = _a.theme;
|
|
45
|
-
return (__assign(__assign({
|
|
46
|
-
'.ap-checkbox': __assign({}, common_1.getFocusCss(theme)),
|
|
47
|
-
'.ap-radio': __assign({}, common_1.getFocusCss(theme)),
|
|
48
|
-
'.ap-toggle-switch': __assign({}, common_1.getFocusCss(theme)),
|
|
49
|
-
} }, getStyles(flexDirection)), { justifyContent: justifyContent }));
|
|
44
|
+
return (__assign(__assign({}, getStyles(flexDirection)), { justifyContent: justifyContent }));
|
|
50
45
|
});
|
|
51
46
|
//# sourceMappingURL=ApCheckLabel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApCheckLabel.js","sourceRoot":"","sources":["../../../src/internal/ApCheckLabel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uDAAsC;AAEtC,
|
|
1
|
+
{"version":3,"file":"ApCheckLabel.js","sourceRoot":"","sources":["../../../src/internal/ApCheckLabel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uDAAsC;AAEtC,wCAA0D;AAe7C,QAAA,gBAAgB,GAAG,2BAAM,CAAC,IAAI,CAAC;IAC1C,KAAK,EAAE,cAAM,CAAC,OAAO;IACrB,UAAU,EAAE,gBAAgB;IAC5B,UAAU,EAAE,MAAM;CACnB,CAAC,CAAA;AAEF,IAAM,SAAS,GAAG,UAAC,aAAkB;;IACnC,IAAM,MAAM;QACV,GAAC,aAAa;gBACZ,aAAa,eAAA;;YACb,GAAC,KAAG,wBAAkB,IAAG;gBACvB,YAAY,EAAE,mBAAW,CAAC,EAAE;aAC7B;eACF;QACD,GAAC,SAAS;gBACR,aAAa,eAAA;;YACb,GAAC,KAAG,wBAAkB,IAAG;gBACvB,WAAW,EAAE,mBAAW,CAAC,EAAE;aAC5B;eACF;WACF,CAAA;IAED,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAA;AACvE,CAAC,CAAA;AAEY,QAAA,gBAAgB,GAAG,2BAAM,CAAC,KAAK,YAExC,uBAAuB,EAAE,cAAM,CAAC,WAAW,EAC3C,UAAU,EAAE,QAAQ,EACpB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,UAAU,IAChB,YAAY,GAElB,UAAC,EAAwC;QAAtC,aAAa,mBAAA,EAAE,cAAc,oBAAA,EAAE,KAAK,WAAA;IAAO,OAAA,uBACzC,SAAS,CAAC,aAAa,CAAC,KAC3B,cAAc,gBAAA,IACd;AAH4C,CAG5C,CACH,CAAA"}
|
|
@@ -29,6 +29,7 @@ export interface IButtonIconProps extends IButtonProps {
|
|
|
29
29
|
hoverColor?: string;
|
|
30
30
|
/** props to modify icon */
|
|
31
31
|
iconProps?: IIconProps;
|
|
32
|
+
small?: boolean;
|
|
32
33
|
}
|
|
33
34
|
export interface IButtonTabProps extends IButtonProps {
|
|
34
35
|
/** Sets styles for when Tab is selected */
|
|
@@ -12,11 +12,11 @@ export declare const getButtonDangerStyles: (disabled: boolean, theme: IThemePro
|
|
|
12
12
|
export declare const StyledButtonLink: import("styled-components").StyledComponent<"a", any, IButtonProps, never>;
|
|
13
13
|
export declare const StyledButtonText: import("styled-components").StyledComponent<"a", any, IButtonProps, never>;
|
|
14
14
|
export declare const ButtonIconStyles: import("styled-components").StyledComponent<"button", any, {
|
|
15
|
-
|
|
15
|
+
small?: boolean | undefined;
|
|
16
16
|
theme?: string | undefined;
|
|
17
17
|
}, never>;
|
|
18
18
|
export declare const StyledButtonIcon: import("styled-components").StyledComponent<"button", any, {
|
|
19
|
-
|
|
19
|
+
small?: boolean | undefined;
|
|
20
20
|
theme?: string | undefined;
|
|
21
21
|
} & IButtonIconProps, never>;
|
|
22
22
|
export declare const getButtonTabStyles: (disabled: boolean, theme: IThemeProps, isSelected: boolean) => any;
|
|
@@ -25,17 +25,17 @@ export declare const StyledButtonFilter: import("styled-components").StyledCompo
|
|
|
25
25
|
export declare const getSmallDimension: (small?: boolean | undefined, iconName?: string | undefined) => {
|
|
26
26
|
height: string;
|
|
27
27
|
padding: string;
|
|
28
|
-
paddingLeft: string;
|
|
29
28
|
lineHeight: string;
|
|
30
29
|
fontSize: string;
|
|
30
|
+
paddingLeft: string;
|
|
31
31
|
'.ap-icon': {
|
|
32
32
|
marginRight: string;
|
|
33
33
|
width: string;
|
|
34
34
|
};
|
|
35
35
|
} | {
|
|
36
|
+
paddingLeft: string;
|
|
36
37
|
height?: undefined;
|
|
37
38
|
padding?: undefined;
|
|
38
|
-
paddingLeft?: undefined;
|
|
39
39
|
lineHeight?: undefined;
|
|
40
40
|
fontSize?: undefined;
|
|
41
41
|
'.ap-icon'?: undefined;
|
|
@@ -8,6 +8,7 @@ interface ICheckboxProps extends IDefaultProps, IThemeProps, React.HTMLProps<HTM
|
|
|
8
8
|
id: string;
|
|
9
9
|
/** Function that takes an event and returns nothing */
|
|
10
10
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
+
indeterminate?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export declare const ApCheckbox: React.SFC<ICheckboxProps>;
|
|
13
14
|
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
export declare const StyledCheckWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
disabled?: boolean | undefined;
|
|
3
|
+
}, never>;
|
|
1
4
|
export declare const StyledCheckIcon: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
5
|
+
export declare const StyledIndeterminateIcon: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
2
6
|
export declare const StyledCheckInput: import("styled-components").StyledComponent<"input", any, {}, never>;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
export declare const StyledRadioWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
disabled?: boolean | undefined;
|
|
3
|
+
}, never>;
|
|
1
4
|
export declare const StyledRadioIconWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
2
5
|
export declare const StyledRadioInput: import("styled-components").StyledComponent<"input", any, {}, never>;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
export declare const StyledToggleWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
disabled?: boolean | undefined;
|
|
3
|
+
}, never>;
|
|
1
4
|
export declare const StyledToggleSwitch: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
2
5
|
export declare const StyledToggleInput: import("styled-components").StyledComponent<"input", any, {}, never>;
|