@alixpartners/ui-components 1.21.8 → 1.21.9

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 CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.21.9 (November 29, 2022)
2
+
3
+ - Update `ApChip` to a new styleguide
4
+
1
5
  ## 1.21.8 (November 28, 2022)
2
6
 
3
7
  - fix font line-height
@@ -24,17 +24,17 @@ var __rest = (this && this.__rest) || function (s, e) {
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.ApChip = void 0;
26
26
  var React = require("react");
27
+ var types_1 = require("../../utils/types");
27
28
  var ApIcon_1 = require("../ApIcon");
28
29
  var styles_1 = require("./styles");
29
30
  exports.ApChip = function (_a) {
30
- var children = _a.children, className = _a.className, disabled = _a.disabled, iconName = _a.iconName, iconProps = _a.iconProps, small = _a.small, props = __rest(_a, ["children", "className", "disabled", "iconName", "iconProps", "small"]);
31
- return (React.createElement(styles_1.StyledChip, __assign({}, props, { disabled: disabled, className: "ap-chip " + (className ? className : ''), small: small }),
32
- React.createElement(styles_1.StyledChipLeftChild, null, children),
33
- iconName &&
34
- React.createElement(styles_1.StyledChipRightChild, null,
35
- React.createElement(ApIcon_1.ApIcon, __assign({ iconName: iconName, iconSize: 13 }, iconProps)))));
31
+ var children = _a.children, className = _a.className, disabled = _a.disabled, icon = _a.icon, iconProps = _a.iconProps, small = _a.small, selected = _a.selected, props = __rest(_a, ["children", "className", "disabled", "icon", "iconProps", "small", "selected"]);
32
+ return (React.createElement(styles_1.StyledChip, __assign({}, props, { disabled: disabled, className: "ap-chip " + (className ? className : ''), small: small, selected: selected }),
33
+ React.createElement(styles_1.StyledChipLeftChild, null, icon && (React.createElement(ApIcon_1.ApIcon, __assign({ iconName: icon, iconSize: small ? 16 : 20 }, iconProps)))),
34
+ React.createElement(styles_1.StyledChipRightChild, null, children)));
36
35
  };
37
36
  exports.ApChip.defaultProps = {
38
37
  disabled: false,
38
+ theme: types_1.LIGHT
39
39
  };
40
40
  //# sourceMappingURL=ApChip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApChip.js","sourceRoot":"","sources":["../../../../src/components/ApChip/ApChip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA8B;AAE9B,oCAA8C;AAC9C,mCAAgF;AAWnE,QAAA,MAAM,GAA0B,UAAC,EAQ7C;IAPC,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,KAAK,WAAA,EACF,KAAK,cAPoC,uEAQ7C,CADS;IAER,OAAO,CACL,oBAAC,mBAAU,eACL,KAAY,IAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,cAAW,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAE,EAClD,KAAK,EAAE,KAAK;QAEZ,oBAAC,4BAAmB,QAAE,QAAQ,CAAuB;QACpD,QAAQ;YACP,oBAAC,6BAAoB;gBACnB,oBAAC,eAAM,aACL,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,EAAE,IACR,SAAS,EACb,CACmB,CAEd,CACd,CAAA;AACH,CAAC,CAAA;AAED,cAAM,CAAC,YAAY,GAAG;IACpB,QAAQ,EAAE,KAAK;CAChB,CAAA"}
1
+ {"version":3,"file":"ApChip.js","sourceRoot":"","sources":["../../../../src/components/ApChip/ApChip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA8B;AAC9B,2CAAqE;AACrE,oCAA8C;AAC9C,mCAAgF;AAanE,QAAA,MAAM,GAA0B,UAAC,EAS7C;IARC,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,IAAI,UAAA,EACJ,SAAS,eAAA,EACT,KAAK,WAAA,EACL,QAAQ,cAAA,EACL,KAAK,cARoC,+EAS7C,CADS;IAER,OAAO,CACL,oBAAC,mBAAU,eACL,KAAY,IAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,cAAW,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAE,EAClD,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ;QAElB,oBAAC,4BAAmB,QACjB,IAAI,IAAI,CACL,oBAAC,eAAM,aACP,QAAQ,EAAE,IAAI,EACd,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IACrB,SAAS,EACb,CACH,CACmB;QACtB,oBAAC,6BAAoB,QAClB,QAAQ,CACY,CACZ,CACd,CAAA;AACH,CAAC,CAAA;AAED,cAAM,CAAC,YAAY,GAAG;IACpB,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,aAAK;CACb,CAAA"}
@@ -3,31 +3,195 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
4
  return cooked;
5
5
  };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
6
17
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.Title = exports.Column = exports.Container = exports.StyledChip = exports.StyledChipRightChild = exports.StyledChipLeftChild = exports.StyledChipChild = void 0;
18
+ exports.Title = exports.Column = exports.Container = exports.StyledChip = exports.getChipStyles = exports.StyledChipRightChild = exports.StyledChipLeftChild = exports.StyledChipChild = void 0;
8
19
  var styled_components_1 = require("styled-components");
9
20
  var theme_1 = require("../../utils/theme");
21
+ var types_1 = require("../../utils/types");
10
22
  exports.StyledChipChild = styled_components_1.default.span({
11
23
  display: 'inline-flex',
12
24
  whiteSpace: 'nowrap'
13
25
  });
14
26
  exports.StyledChipLeftChild = styled_components_1.default.span({
15
- display: 'inline-flex',
16
- marginRight: theme_1.scaffolding.xxs,
17
- whiteSpace: 'nowrap'
27
+ display: 'inline-flex'
18
28
  });
19
- exports.StyledChipRightChild = styled_components_1.default.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n margin-left: 5px;\n"], ["\n display: inline-flex;\n margin-left: 5px;\n"])));
20
- exports.StyledChip = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 5px 12px;\n align-items: center;\n border: none;\n display: inline-flex;\n height: 32px;\n justify-content: space-between;\n line-height: 13px;\n min-width: 32px;\n outline: none;\n position: relative;\n text-align: center;\n text-decoration: none;\n text-transform: uppercase;\n white-space: nowrap;\n border: 1px solid ", ";\n border-radius: 16px;\n box-sizing: border-box;\n font-size: 13px;\n cursor: pointer;\n margin-right: 8px;\n ", "\n ", "\n :hover, :focus {\n border-color: ", ";\n }\n :active {\n border-color: ", ";\n }\n :disabled {\n color: ", ";\n border-color: ", ";\n pointer-events: none;\n }\n"], ["\n padding: 5px 12px;\n align-items: center;\n border: none;\n display: inline-flex;\n height: 32px;\n justify-content: space-between;\n line-height: 13px;\n min-width: 32px;\n outline: none;\n position: relative;\n text-align: center;\n text-decoration: none;\n text-transform: uppercase;\n white-space: nowrap;\n border: 1px solid ", ";\n border-radius: 16px;\n box-sizing: border-box;\n font-size: 13px;\n cursor: pointer;\n margin-right: 8px;\n ",
21
- "\n ",
22
- "\n :hover, :focus {\n border-color: ", ";\n }\n :active {\n border-color: ", ";\n }\n :disabled {\n color: ", ";\n border-color: ", ";\n pointer-events: none;\n }\n"])), theme_1.colors.grey4, function (_a) {
29
+ exports.StyledChipRightChild = styled_components_1.default.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n margin-left: 4px;\n white-space: nowrap;\n"], ["\n display: inline-flex;\n margin-left: 4px;\n white-space: nowrap;\n"])));
30
+ exports.getChipStyles = function (disabled, theme, isSelected) {
31
+ var _a, _b;
32
+ var lightActionStyles = disabled ? {} : {
33
+ ':hover': {
34
+ color: theme_1.colors.grey700,
35
+ borderColor: theme_1.colors.grey700,
36
+ backgroundColor: theme_1.colors.grey50,
37
+ svg: {
38
+ fill: theme_1.colors.grey700
39
+ }
40
+ },
41
+ ':focus': {
42
+ color: theme_1.colors.grey700,
43
+ borderColor: theme_1.colors.grey700,
44
+ backgroundColor: theme_1.colors.grey50,
45
+ svg: {
46
+ fill: theme_1.colors.grey700
47
+ }
48
+ },
49
+ ':active': {
50
+ color: theme_1.colors.grey700,
51
+ borderColor: theme_1.colors.grey700,
52
+ backgroundColor: theme_1.colors.grey200,
53
+ svg: {
54
+ fill: theme_1.colors.grey700
55
+ }
56
+ },
57
+ };
58
+ var lightSelectedActionStyles = disabled ? {} : {
59
+ ':hover': {
60
+ color: theme_1.colors.green700,
61
+ borderColor: theme_1.colors.green700,
62
+ backgroundColor: theme_1.colors.green100,
63
+ svg: {
64
+ fill: theme_1.colors.grey700
65
+ }
66
+ },
67
+ ':focus': {
68
+ color: theme_1.colors.green700,
69
+ borderColor: theme_1.colors.green700,
70
+ backgroundColor: theme_1.colors.green100,
71
+ svg: {
72
+ fill: theme_1.colors.grey700
73
+ }
74
+ },
75
+ ':active': {
76
+ color: theme_1.colors.green700,
77
+ borderColor: theme_1.colors.green700,
78
+ backgroundColor: theme_1.colors.green200,
79
+ svg: {
80
+ fill: theme_1.colors.grey700
81
+ }
82
+ },
83
+ };
84
+ var darkActionStyles = disabled ? {} : {
85
+ ':hover': {
86
+ color: theme_1.colors.white,
87
+ borderColor: theme_1.colors.white,
88
+ backgroundColor: theme_1.colors.grey600,
89
+ svg: {
90
+ fill: theme_1.colors.white
91
+ }
92
+ },
93
+ ':focus': {
94
+ color: theme_1.colors.white,
95
+ borderColor: theme_1.colors.white,
96
+ backgroundColor: theme_1.colors.grey600,
97
+ svg: {
98
+ fill: theme_1.colors.white
99
+ }
100
+ },
101
+ ':active': {
102
+ color: theme_1.colors.white,
103
+ borderColor: theme_1.colors.white,
104
+ backgroundColor: theme_1.colors.grey500,
105
+ svg: {
106
+ fill: theme_1.colors.white
107
+ }
108
+ },
109
+ };
110
+ var darkSelectedActionStyles = disabled ? {} : {
111
+ ':hover': {
112
+ color: theme_1.colors.green200,
113
+ borderColor: theme_1.colors.green200,
114
+ backgroundColor: theme_1.colors.green800,
115
+ svg: {
116
+ fill: theme_1.colors.green200
117
+ }
118
+ },
119
+ ':focus': {
120
+ color: theme_1.colors.green200,
121
+ borderColor: theme_1.colors.green200,
122
+ backgroundColor: theme_1.colors.green800,
123
+ svg: {
124
+ fill: theme_1.colors.green200
125
+ }
126
+ },
127
+ ':active': {
128
+ color: theme_1.colors.green200,
129
+ borderColor: theme_1.colors.green200,
130
+ backgroundColor: theme_1.colors.green700,
131
+ svg: {
132
+ fill: theme_1.colors.green200
133
+ }
134
+ },
135
+ };
136
+ var chipSelectedStyles = (_a = {},
137
+ _a[types_1.LIGHT] = __assign({ color: disabled ? theme_1.colors.grey400 : theme_1.colors.green600, backgroundColor: theme_1.colors.green50, border: '2px solid', borderColor: disabled ? theme_1.colors.grey200 : theme_1.colors.green600, svg: {
138
+ fill: disabled ? theme_1.colors.grey400 : theme_1.colors.green600,
139
+ } }, lightSelectedActionStyles),
140
+ _a[types_1.DARK] = __assign({ color: disabled ? theme_1.colors.grey400 : theme_1.colors.green300, backgroundColor: theme_1.colors.transparent, border: '2px solid', borderColor: disabled ? theme_1.colors.grey200 : theme_1.colors.green300, svg: {
141
+ fill: disabled ? theme_1.colors.grey400 : theme_1.colors.green300,
142
+ } }, darkSelectedActionStyles),
143
+ _a);
144
+ var chipStyles = (_b = {},
145
+ _b[types_1.LIGHT] = __assign({ color: disabled ? theme_1.colors.grey400 : theme_1.colors.grey500, border: '1px solid', borderColor: disabled ? theme_1.colors.grey200 : theme_1.colors.grey300, svg: {
146
+ fill: disabled ? theme_1.colors.grey400 : theme_1.colors.grey500,
147
+ } }, lightActionStyles),
148
+ _b[types_1.DARK] = __assign({ color: disabled ? theme_1.colors.grey400 : theme_1.colors.grey300, border: '1px solid', background: disabled ? theme_1.colors.white : 'transparent', borderColor: disabled ? theme_1.colors.grey200 : theme_1.colors.grey500, svg: {
149
+ fill: disabled ? theme_1.colors.grey400 : theme_1.colors.grey300,
150
+ } }, darkActionStyles),
151
+ _b);
152
+ var selectedStyles = isSelected ? chipSelectedStyles[theme] : {};
153
+ return __assign(__assign({}, chipStyles[theme]), selectedStyles);
154
+ };
155
+ exports.StyledChip = styled_components_1.default.div({
156
+ padding: '0 16px',
157
+ alignItems: 'center',
158
+ border: 'none',
159
+ display: 'inline-flex',
160
+ height: '40px',
161
+ justifyContent: 'space-between',
162
+ lineHeight: '20px',
163
+ minWidth: '32px',
164
+ outline: 'none',
165
+ position: 'relative',
166
+ textAlign: 'center',
167
+ textDecoration: 'none',
168
+ whiteSpace: 'nowrap',
169
+ borderWidth: '1px',
170
+ borderStyle: 'solid',
171
+ borderRadius: '32px',
172
+ boxSizing: 'border-box',
173
+ fontSize: '16px',
174
+ cursor: 'pointer',
175
+ marginRight: '8px'
176
+ }, function (_a) {
177
+ var disabled = _a.disabled, theme = _a.theme, selected = _a.selected;
178
+ return (__assign({}, exports.getChipStyles(disabled, theme, selected)));
179
+ }, function (_a) {
23
180
  var small = _a.small;
24
- return small && styled_components_1.css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 24px;\n padding: 5px 8px;\n font-size: 11px;\n line-height: 11px;\n "], ["\n height: 24px;\n padding: 5px 8px;\n font-size: 11px;\n line-height: 11px;\n "])));
181
+ return (small ? {
182
+ height: '32px',
183
+ fontSize: '13px',
184
+ lineHeight: '16px',
185
+ padding: '0 12px'
186
+ } : {});
25
187
  }, function (_a) {
26
188
  var disabled = _a.disabled;
27
- return disabled && styled_components_1.css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n border-color: ", ";\n pointer-events: none;\n "], ["\n color: ", ";\n border-color: ", ";\n pointer-events: none;\n "])), theme_1.colors.grey5, theme_1.colors.grey2);
28
- }, theme_1.colors.green2, theme_1.colors.green1, theme_1.colors.grey5, theme_1.colors.grey2);
29
- exports.Container = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin: 16px 80px;\n display: flex;\n flexDirection: column;\n"], ["\n margin: 16px 80px;\n display: flex;\n flexDirection: column;\n"])));
30
- exports.Column = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin: 24px;\n"], ["\n display: flex;\n flex-direction: column;\n margin: 24px;\n"])));
31
- exports.Title = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin-bottom: 12px;\n padding-bottom: 12px;\n border-bottom: 1px solid ", ";\n white-space: nowrap;\n"], ["\n margin-bottom: 12px;\n padding-bottom: 12px;\n border-bottom: 1px solid ", ";\n white-space: nowrap;\n"])), theme_1.colors.grey4);
32
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
189
+ return (disabled ? {
190
+ cursor: 'not-allowed'
191
+ } : {});
192
+ });
193
+ exports.Container = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin: 16px 80px;\n display: flex;\n flexDirection: column;\n"], ["\n margin: 16px 80px;\n display: flex;\n flexDirection: column;\n"])));
194
+ exports.Column = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin: 24px;\n"], ["\n display: flex;\n flex-direction: column;\n margin: 24px;\n"])));
195
+ exports.Title = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-bottom: 12px;\n padding-bottom: 12px;\n border-bottom: 1px solid ", ";\n white-space: nowrap;\n"], ["\n margin-bottom: 12px;\n padding-bottom: 12px;\n border-bottom: 1px solid ", ";\n white-space: nowrap;\n"])), theme_1.colors.grey4);
196
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
33
197
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/ApChip/styles.ts"],"names":[],"mappings":";;;;;;;AAAA,uDAA+C;AAE/C,2CAAuD;AAI1C,QAAA,eAAe,GAAG,2BAAM,CAAC,IAAI,CAAC;IACzC,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,QAAQ;CACrB,CAAC,CAAA;AAEW,QAAA,mBAAmB,GAAG,2BAAM,CAAC,IAAI,CAAC;IAC7C,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,mBAAW,CAAC,GAAG;IAC5B,UAAU,EAAE,QAAQ;CACrB,CAAC,CAAA;AAEW,QAAA,oBAAoB,GAAG,2BAAM,CAAC,IAAI,qHAAA,kDAG9C,KAAA;AAEY,QAAA,UAAU,GAAG,2BAAM,CAAC,GAAG,guBAAY,8VAe1B,EAAY,wHAM9B;IAQF,MACE;IAOF,0CAEkB,EAAa,yCAGb,EAAa,oCAGpB,EAAY,uBACL,EAAY,qCAG/B,KAlCqB,cAAM,CAAC,KAAK,EAM9B,UAAC,EAAS;QAAP,KAAK,WAAA;IACR,OAAA,KAAK,IACH,uBAAG,qLAAA,kHAKF,IAAA;AANH,CAMG,EAEH,UAAC,EAAY;QAAV,QAAQ,cAAA;IACX,OAAA,QAAQ,IACN,uBAAG,uKAAA,qBACU,EAAY,6BACL,EAAY,8CAE7B,KAHU,cAAM,CAAC,KAAK,EACL,cAAM,CAAC,KAAK,CAE7B;AALL,CAKK,EAGW,cAAM,CAAC,MAAM,EAGb,cAAM,CAAC,MAAM,EAGpB,cAAM,CAAC,KAAK,EACL,cAAM,CAAC,KAAK,EAG/B;AAEY,QAAA,SAAS,GAAG,2BAAM,CAAC,GAAG,+IAAA,4EAIlC,KAAC;AAEW,QA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,EACP,UAAC,EAAiB;QAAf,QAAQ,cAAA;IAAY,OAAA,CAAC,QAAQ,CAAC,CAAC,CAAC;QACjC,MAAM,EAAE,aAAa;KACtB,CAAC,CAAC,CAAC,EAAE,CAAC;AAFgB,CAEhB,CACR,CAAA;AAEY,QAAA,SAAS,GAAG,2BAAM,CAAC,GAAG,+IAAA,4EAIlC,KAAC;AAEW,QAAA,MAAM,GAAG,2BAAM,CAAC,GAAG,2IAAA,wEAI/B,KAAC;AAEW,QAAA,KAAK,GAAG,2BAAM,CAAC,GAAG,0LAAA,sFAGA,EAAY,+BAE1C,KAF8B,cAAM,CAAC,KAAK,EAEzC"}
@@ -23,16 +23,20 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.ApMenuTrigger = void 0;
26
+ /* tslint:disable */
27
+ var React = require("react");
26
28
  var react_1 = require("react");
29
+ /* tslint:enable */
27
30
  var theme_1 = require("../../utils/theme");
28
31
  var styles_1 = require("./styles");
29
- exports.ApMenuTrigger = react_1.forwardRef(function (_a, ref) {
32
+ var ApMenuTriggerInternal = react_1.forwardRef(function (_a, ref) {
30
33
  var children = _a.children, icon = _a.icon, isOpen = _a.isOpen, props = __rest(_a, ["children", "icon", "isOpen"]);
31
- return (react_1.default.createElement(styles_1.TriggerWrapper, __assign({}, props, { ref: ref }),
32
- react_1.default.createElement(styles_1.BorderedTrigger, null,
33
- icon && react_1.default.createElement(styles_1.TriggerIcon, { iconName: icon }),
34
+ return (React.createElement(styles_1.TriggerWrapper, __assign({}, props, { ref: ref }),
35
+ React.createElement(styles_1.BorderedTrigger, null,
36
+ icon && React.createElement(styles_1.TriggerIcon, { iconName: icon }),
34
37
  " ",
35
38
  children),
36
- react_1.default.createElement(styles_1.BorderedCaret, { iconName: 'caret', iconColor: theme_1.colors.grey700, isOpen: isOpen })));
39
+ React.createElement(styles_1.BorderedCaret, { iconName: 'caret', iconColor: theme_1.colors.grey700, isOpen: isOpen })));
37
40
  });
41
+ exports.ApMenuTrigger = react_1.memo(ApMenuTriggerInternal);
38
42
  //# sourceMappingURL=ApMenuTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApMenuTrigger.js","sourceRoot":"","sources":["../../../../src/components/ApMenu/ApMenuTrigger.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA0C;AAC1C,2CAA0C;AAC1C,mCAKkB;AAEL,QAAA,aAAa,GAAG,kBAAU,CAAC,UAAC,EAAyC,EAAE,GAAQ;IAAjD,IAAA,QAAQ,cAAA,EAAE,IAAI,UAAA,EAAE,MAAM,YAAA,EAAK,KAAK,cAAlC,8BAAoC,CAAF;IACzE,OAAO,CACL,8BAAC,uBAAc,eAAK,KAAK,IAAE,GAAG,EAAE,GAAG;QACjC,8BAAC,wBAAe;YACb,IAAI,IAAI,8BAAC,oBAAW,IAAC,QAAQ,EAAE,IAAI,GAAI;;YAAI,QAAQ,CACpC;QAClB,8BAAC,sBAAa,IAAC,QAAQ,EAAC,OAAO,EAAC,SAAS,EAAE,cAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,GAAI,CAC9D,CAClB,CAAA;AACH,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"ApMenuTrigger.js","sourceRoot":"","sources":["../../../../src/components/ApMenu/ApMenuTrigger.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oBAAoB;AACpB,6BAA8B;AAC9B,+BAAwC;AACxC,mBAAmB;AACnB,2CAA0C;AAC1C,mCAKkB;AAElB,IAAM,qBAAqB,GAAG,kBAAU,CACtC,UAAC,EAAyC,EAAE,GAAQ;IAAjD,IAAA,QAAQ,cAAA,EAAE,IAAI,UAAA,EAAE,MAAM,YAAA,EAAK,KAAK,cAAlC,8BAAoC,CAAF;IACjC,OAAO,CACL,oBAAC,uBAAc,eAAK,KAAK,IAAE,GAAG,EAAE,GAAG;QACjC,oBAAC,wBAAe;YACb,IAAI,IAAI,oBAAC,oBAAW,IAAC,QAAQ,EAAE,IAAI,GAAI;;YAAI,QAAQ,CACpC;QAClB,oBAAC,sBAAa,IAAC,QAAQ,EAAC,OAAO,EAAC,SAAS,EAAE,cAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,GAAI,CAC9D,CAClB,CAAA;AACH,CAAC,CACF,CAAC;AAEW,QAAA,aAAa,GAAG,YAAI,CAAC,qBAAqB,CAAC,CAAC"}
@@ -22,17 +22,21 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  return t;
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.ApMenuTriggerBordered = void 0;
25
+ exports.ApMenuTriggerBordered = exports.ApMenuTriggerBorderedInternal = void 0;
26
+ /* tslint:disable */
27
+ var React = require("react");
26
28
  var react_1 = require("react");
29
+ /* tslint:enable */
27
30
  var theme_1 = require("../../utils/theme");
28
31
  var styles_1 = require("./styles");
29
- exports.ApMenuTriggerBordered = react_1.forwardRef(function (_a, ref) {
32
+ exports.ApMenuTriggerBorderedInternal = react_1.forwardRef(function (_a, ref) {
30
33
  var children = _a.children, icon = _a.icon, isOpen = _a.isOpen, props = __rest(_a, ["children", "icon", "isOpen"]);
31
- return (react_1.default.createElement(styles_1.BorderedTriggerWrapper, __assign({ icon: icon }, props, { ref: ref }),
32
- react_1.default.createElement(styles_1.BorderedTrigger, null,
33
- icon && react_1.default.createElement(styles_1.TriggerIcon, { iconName: icon }),
34
+ return (React.createElement(styles_1.BorderedTriggerWrapper, __assign({ icon: icon }, props, { ref: ref }),
35
+ React.createElement(styles_1.BorderedTrigger, null,
36
+ icon && React.createElement(styles_1.TriggerIcon, { iconName: icon }),
34
37
  " ",
35
38
  children),
36
- react_1.default.createElement(styles_1.BorderedCaret, { iconName: 'caret', iconColor: theme_1.colors.grey700, isOpen: isOpen })));
39
+ React.createElement(styles_1.BorderedCaret, { iconName: 'caret', iconColor: theme_1.colors.grey700, isOpen: isOpen })));
37
40
  });
41
+ exports.ApMenuTriggerBordered = react_1.memo(exports.ApMenuTriggerBorderedInternal);
38
42
  //# sourceMappingURL=ApMenuTriggerBordered.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApMenuTriggerBordered.js","sourceRoot":"","sources":["../../../../src/components/ApMenu/ApMenuTriggerBordered.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA0C;AAC1C,2CAA0C;AAC1C,mCAKkB;AAEL,QAAA,qBAAqB,GAAG,kBAAU,CAAC,UAAC,EAAyC,EAAE,GAAQ;IAAjD,IAAA,QAAQ,cAAA,EAAE,IAAI,UAAA,EAAE,MAAM,YAAA,EAAK,KAAK,cAAlC,8BAAoC,CAAF;IACjF,OAAO,CACL,8BAAC,+BAAsB,aAAC,IAAI,EAAE,IAAI,IAAM,KAAK,IAAE,GAAG,EAAE,GAAG;QACrD,8BAAC,wBAAe;YACb,IAAI,IAAI,8BAAC,oBAAW,IAAC,QAAQ,EAAE,IAAI,GAAI;;YAAI,QAAQ,CACpC;QAClB,8BAAC,sBAAa,IAAC,QAAQ,EAAC,OAAO,EAAC,SAAS,EAAE,cAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,GAAI,CACtD,CAC1B,CAAA;AACH,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"ApMenuTriggerBordered.js","sourceRoot":"","sources":["../../../../src/components/ApMenu/ApMenuTriggerBordered.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oBAAoB;AACpB,6BAA8B;AAC9B,+BAAwC;AACxC,mBAAmB;AACnB,2CAA0C;AAC1C,mCAKkB;AAEL,QAAA,6BAA6B,GAAG,kBAAU,CAAC,UAAC,EAAyC,EAAE,GAAQ;IAAjD,IAAA,QAAQ,cAAA,EAAE,IAAI,UAAA,EAAE,MAAM,YAAA,EAAK,KAAK,cAAlC,8BAAoC,CAAF;IACzF,OAAO,CACL,oBAAC,+BAAsB,aAAC,IAAI,EAAE,IAAI,IAAM,KAAK,IAAE,GAAG,EAAE,GAAG;QACrD,oBAAC,wBAAe;YACb,IAAI,IAAI,oBAAC,oBAAW,IAAC,QAAQ,EAAE,IAAI,GAAI;;YAAI,QAAQ,CACpC;QAClB,oBAAC,sBAAa,IAAC,QAAQ,EAAC,OAAO,EAAC,SAAS,EAAE,cAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,GAAI,CACtD,CAC1B,CAAA;AACH,CAAC,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAAG,YAAI,CAAC,qCAA6B,CAAC,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
- import { IDefaultProps } from '../../utils/types';
2
+ import { IThemeProps, IDefaultProps } from '../../utils/types';
3
3
  import { IIconProps } from '../ApIcon';
4
- export interface IChipProps extends React.HTMLProps<HTMLButtonElement>, IDefaultProps {
4
+ export interface IChipProps extends React.HTMLProps<HTMLButtonElement>, IDefaultProps, IThemeProps {
5
5
  /** The name of the icon to use */
6
- iconName?: string;
6
+ icon?: string;
7
7
  iconProps?: IIconProps;
8
8
  small?: boolean;
9
+ selected?: boolean;
9
10
  }
10
11
  export declare const ApChip: React.SFC<IChipProps>;
@@ -1,7 +1,9 @@
1
+ import { IThemeProps } from '../../utils/types';
1
2
  import { IChipProps } from './ApChip';
2
3
  export declare const StyledChipChild: import("styled-components").StyledComponent<"span", any, {}, never>;
3
4
  export declare const StyledChipLeftChild: import("styled-components").StyledComponent<"span", any, {}, never>;
4
5
  export declare const StyledChipRightChild: import("styled-components").StyledComponent<"span", any, {}, never>;
6
+ export declare const getChipStyles: (disabled: boolean, theme: IThemeProps, isSelected?: boolean | undefined) => any;
5
7
  export declare const StyledChip: import("styled-components").StyledComponent<"div", any, IChipProps, never>;
6
8
  export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
7
9
  export declare const Column: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,2 +1,2 @@
1
- import React from 'react';
2
- export declare const ApMenuTrigger: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>;
1
+ import * as React from 'react';
2
+ export declare const ApMenuTrigger: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>>;
@@ -1,2 +1,3 @@
1
- import React from 'react';
2
- export declare const ApMenuTriggerBordered: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>;
1
+ import * as React from 'react';
2
+ export declare const ApMenuTriggerBorderedInternal: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>;
3
+ export declare const ApMenuTriggerBordered: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>>;