@deskpro/deskpro-ui 1.0.0 → 1.1.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/dist/cjs/components/Button/Button.d.ts +1 -1
- package/dist/cjs/components/Button/Button.d.ts.map +1 -1
- package/dist/cjs/components/Button/Button.js +17 -22
- package/dist/cjs/components/Button/styles.d.ts.map +1 -1
- package/dist/cjs/components/Button/styles.js +5 -5
- package/dist/cjs/components/Card/AppCard.d.ts.map +1 -1
- package/dist/cjs/components/Card/AppCard.js +1 -1
- package/dist/cjs/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/cjs/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/cjs/components/Dropdown/Dropdown.js +3 -3
- package/dist/cjs/components/Dropdown/styles.d.ts +1 -0
- package/dist/cjs/components/Dropdown/styles.d.ts.map +1 -1
- package/dist/cjs/components/Dropdown/styles.js +4 -1
- package/dist/cjs/components/Dropdown/types.d.ts +3 -1
- package/dist/cjs/components/Dropdown/types.d.ts.map +1 -1
- package/dist/cjs/components/Icon/customIconsCodegen.d.ts +1 -1
- package/dist/cjs/components/Icon/customIconsCodegen.d.ts.map +1 -1
- package/dist/cjs/components/Icon/customIconsCodegen.js +24 -23
- package/dist/cjs/components/Tooltip/Tooltip.d.ts +1 -0
- package/dist/cjs/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.js +13 -3
- package/dist/cjs/lib.d.ts +0 -1
- package/dist/cjs/lib.d.ts.map +1 -1
- package/dist/cjs/lib.js +0 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/deskpro-custom-icons.css +29 -26
- package/dist/esm/components/Button/Button.js +17 -22
- package/dist/esm/components/Button/styles.js +5 -5
- package/dist/esm/components/Card/AppCard.js +1 -1
- package/dist/esm/components/Dropdown/Dropdown.js +3 -3
- package/dist/esm/components/Dropdown/styles.js +4 -1
- package/dist/esm/components/Icon/customIconsCodegen.js +24 -23
- package/dist/esm/components/Tooltip/Tooltip.js +13 -3
- package/dist/esm/lib.js +0 -1
- package/dist/fonts/DpCustomIcons/DpCustomIcons.eot +0 -0
- package/dist/fonts/DpCustomIcons/DpCustomIcons.woff +0 -0
- package/dist/fonts/DpCustomIcons/DpCustomIcons.woff2 +0 -0
- package/package.json +2 -1
- package/dist/cjs/nav/NavSidebar/NavSidebar.d.ts +0 -28
- package/dist/cjs/nav/NavSidebar/NavSidebar.d.ts.map +0 -1
- package/dist/cjs/nav/NavSidebar/NavSidebar.js +0 -51
- package/dist/cjs/nav/NavSidebar/index.d.ts +0 -3
- package/dist/cjs/nav/NavSidebar/index.d.ts.map +0 -1
- package/dist/cjs/nav/NavSidebar/index.js +0 -6
- package/dist/esm/nav/NavSidebar/NavSidebar.js +0 -45
- package/dist/esm/nav/NavSidebar/index.js +0 -2
|
@@ -330,5 +330,5 @@ export declare type IntentApi = {
|
|
|
330
330
|
noMinimalUnderline?: boolean;
|
|
331
331
|
intent?: AllButtonIntents;
|
|
332
332
|
};
|
|
333
|
-
export declare const calculateIntent: ({ minimal, noMinimalUnderline, intent
|
|
333
|
+
export declare const calculateIntent: ({ minimal, noMinimalUnderline, intent }: IntentApi) => AllButtonIntents;
|
|
334
334
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AA4BvC,OAAO,EACL,gBAAgB,EAOjB,MAAM,SAAS,CAAC;AAIjB;;GAEG;AACH,eAAO,MAAM,MAAM;;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AA4BvC,OAAO,EACL,gBAAgB,EAOjB,MAAM,SAAS,CAAC;AAIjB;;GAEG;AACH,eAAO,MAAM,MAAM;;iGAmElB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;iGAiEtB,CAAC;AAIF,eAAO,MAAM,YAAY;;;;;;gBAFgC,UAAU;iGAiDlE,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;iGAO7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iGA0ExB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;;gGA4EvB,CAAC;AAIF,eAAO,MAAM,oBAAoB;;UAShC,CAAC;AAEF,eAAO,MAAM,SAAS;;;;iGAmCrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;SAyDzB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,eAAe,4CAA6C,SAAS,qBAIjF,CAAC"}
|
|
@@ -4,7 +4,7 @@ exports.calculateIntent = exports.OverlayButton = exports.NavButton = exports.La
|
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var React = (0, tslib_1.__importStar)(require("react"));
|
|
6
6
|
var react_1 = require("react");
|
|
7
|
-
var styled_components_1 = (0, tslib_1.
|
|
7
|
+
var styled_components_1 = (0, tslib_1.__importStar)(require("styled-components"));
|
|
8
8
|
var ts_pattern_1 = require("ts-pattern");
|
|
9
9
|
var Icon_1 = require("../Icon");
|
|
10
10
|
var styles_1 = require("./styles");
|
|
@@ -18,7 +18,7 @@ exports.Button = (0, styled_components_1.default)((0, react_1.forwardRef)(functi
|
|
|
18
18
|
return (React.createElement("button", (0, tslib_1.__assign)({ type: type }, (0, utils_1.dpNameProp)("Button"), { ref: ref, disabled: disabled || loading }, rest),
|
|
19
19
|
loading && (React.createElement(styles_1.ButtonLoaderContainer, null,
|
|
20
20
|
React.createElement(Spinner_1.Spinner, { size: "small" }))),
|
|
21
|
-
(0, Icon_1.isAnyIcon)(icon) ?
|
|
21
|
+
(0, Icon_1.isAnyIcon)(icon) ? React.createElement(Icon_1.Icon, { icon: icon }) : (0, Icon_1.isIconProps)(icon) ? React.createElement(Icon_1.Icon, (0, tslib_1.__assign)({}, icon)) : icon,
|
|
22
22
|
text && React.createElement(styles_1.ButtonText, null, text),
|
|
23
23
|
(0, Icon_1.isAnyIcon)(rightIcon) ? (React.createElement(Icon_1.Icon, { icon: rightIcon })) : (0, Icon_1.isIconProps)(rightIcon) ? (React.createElement(Icon_1.Icon, (0, tslib_1.__assign)({}, rightIcon))) : (rightIcon)));
|
|
24
24
|
}))(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n text-align: ", ";\n ", "\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", ";\n ", "\n"], ["\n text-align: ", ";\n ", "\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", ";\n ", "\n"])), function (props) { var _a; return (_a = props.alignText) !== null && _a !== void 0 ? _a : "left"; }, styles_1.buttonBaseCss, function (props) { return props.size === "large" && styles_1.buttonLarge; }, function (props) { return props.size === "small" && styles_1.buttonSmall; }, function (props) { return props.size === "tiny" && styles_1.buttonTiny; }, function (props) {
|
|
@@ -29,8 +29,7 @@ exports.Button = (0, styled_components_1.default)((0, react_1.forwardRef)(functi
|
|
|
29
29
|
return props.danger && (0, styles_1.getDangerIntent)({ intent: calculatedIntent });
|
|
30
30
|
}, function (props) {
|
|
31
31
|
var calculatedIntent = (0, exports.calculateIntent)(props);
|
|
32
|
-
return
|
|
33
|
-
(0, styles_1.getActiveIntent)({ intent: calculatedIntent, danger: props.danger }));
|
|
32
|
+
return props.active && (0, styles_1.getActiveIntent)({ intent: calculatedIntent, danger: props.danger });
|
|
34
33
|
}, function (props) { return props.loading && styles_1.buttonLoading; }, function (props) { return props.fill && styles_1.buttonFill; });
|
|
35
34
|
/**
|
|
36
35
|
* Icon Button
|
|
@@ -54,7 +53,7 @@ exports.IconButton = (0, styled_components_1.default)((0, react_1.forwardRef)(fu
|
|
|
54
53
|
exports.AvatarButton = (0, styled_components_1.default)((0, react_1.forwardRef)(function AvatarButton(_a, ref) {
|
|
55
54
|
var avatarSize = _a.avatarSize, _b = _a.type, type = _b === void 0 ? "button" : _b, rest = (0, tslib_1.__rest)(_a, ["avatarSize", "type"]);
|
|
56
55
|
return React.createElement(exports.IconButton, (0, tslib_1.__assign)({ ref: ref, type: type }, rest));
|
|
57
|
-
}))(
|
|
56
|
+
}))(templateObject_4 || (templateObject_4 = (0, tslib_1.__makeTemplateObject)(["\n width: ", "px;\n height: ", "px;\n max-height: ", "px;\n min-height: ", "px;\n max-width: ", "px;\n min-width: ", "px;\n border: 2px solid ", ";\n border-radius: 50%;\n position: relative;\n :hover {\n border: 2px solid ", ";\n }\n\n ", ";\n\n :active,\n :focus {\n border: 2px solid ", ";\n }\n\n ", "\n :disabled {\n cursor: not-allowed;\n }\n\n > div {\n flex: 1;\n max-height: ", "px;\n min-height: ", "px;\n max-width: ", "px;\n min-width: ", "px;\n }\n & > :not(:last-child) {\n margin-right: 0;\n }\n"], ["\n width: ", "px;\n height: ", "px;\n max-height: ", "px;\n min-height: ", "px;\n max-width: ", "px;\n min-width: ", "px;\n border: 2px solid ", ";\n border-radius: 50%;\n position: relative;\n :hover {\n border: 2px solid ", ";\n }\n\n ", ";\n\n :active,\n :focus {\n border: 2px solid ", ";\n }\n\n ", "\n :disabled {\n cursor: not-allowed;\n }\n\n > div {\n flex: 1;\n max-height: ", "px;\n min-height: ", "px;\n max-width: ", "px;\n min-width: ", "px;\n }\n & > :not(:last-child) {\n margin-right: 0;\n }\n"])), function (_a) {
|
|
58
57
|
var avatarSize = _a.avatarSize;
|
|
59
58
|
return avatarSize + 4;
|
|
60
59
|
}, function (_a) {
|
|
@@ -80,7 +79,7 @@ exports.AvatarButton = (0, styled_components_1.default)((0, react_1.forwardRef)(
|
|
|
80
79
|
return theme.colors.brandShade60;
|
|
81
80
|
}, function (_a) {
|
|
82
81
|
var active = _a.active, theme = _a.theme;
|
|
83
|
-
return active
|
|
82
|
+
return active && (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n border: 2px solid ", ";\n "], ["\n border: 2px solid ", ";\n "])), theme.colors.cyan100);
|
|
84
83
|
}, function (_a) {
|
|
85
84
|
var theme = _a.theme;
|
|
86
85
|
return theme.colors.cyan100;
|
|
@@ -100,7 +99,7 @@ exports.AvatarButton = (0, styled_components_1.default)((0, react_1.forwardRef)(
|
|
|
100
99
|
var avatarSize = _a.avatarSize;
|
|
101
100
|
return avatarSize;
|
|
102
101
|
});
|
|
103
|
-
exports.AvatarGroupButton = (0, styled_components_1.default)(exports.IconButton)(
|
|
102
|
+
exports.AvatarGroupButton = (0, styled_components_1.default)(exports.IconButton)(templateObject_5 || (templateObject_5 = (0, tslib_1.__makeTemplateObject)(["\n max-height: initial;\n min-height: initial;\n max-width: initial;\n min-width: initial;\n width: auto;\n height: auto;\n"], ["\n max-height: initial;\n min-height: initial;\n max-width: initial;\n min-width: initial;\n width: auto;\n height: auto;\n"])));
|
|
104
103
|
/**
|
|
105
104
|
* Anchor component styled like a button
|
|
106
105
|
*/
|
|
@@ -111,10 +110,10 @@ exports.AnchorButton = (0, styled_components_1.default)((0, react_1.forwardRef)(
|
|
|
111
110
|
} }, rest),
|
|
112
111
|
loading && (React.createElement(styles_1.ButtonLoaderContainer, null,
|
|
113
112
|
React.createElement(Spinner_1.Spinner, { size: "small" }))),
|
|
114
|
-
(0, Icon_1.isAnyIcon)(icon) ?
|
|
113
|
+
(0, Icon_1.isAnyIcon)(icon) ? React.createElement(Icon_1.Icon, { icon: icon }) : (0, Icon_1.isIconProps)(icon) ? React.createElement(Icon_1.Icon, (0, tslib_1.__assign)({}, icon)) : icon,
|
|
115
114
|
text && React.createElement(styles_1.ButtonText, null, text),
|
|
116
115
|
(0, Icon_1.isAnyIcon)(rightIcon) ? (React.createElement(Icon_1.Icon, { icon: rightIcon })) : (0, Icon_1.isIconProps)(rightIcon) ? (React.createElement(Icon_1.Icon, (0, tslib_1.__assign)({}, rightIcon))) : (rightIcon)));
|
|
117
|
-
}))(
|
|
116
|
+
}))(templateObject_6 || (templateObject_6 = (0, tslib_1.__makeTemplateObject)(["\n text-align: ", ";\n text-decoration: none;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n :active,\n :focus,\n :hover {\n ", ";\n }\n ", "\n ", ";\n"], ["\n text-align: ", ";\n text-decoration: none;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n :active,\n :focus,\n :hover {\n ", ";\n }\n ", "\n ", ";\n"])), function (props) { var _a; return (_a = props.alignText) !== null && _a !== void 0 ? _a : "left"; }, styles_1.buttonBaseCss, function (props) { return props.size === "large" && styles_1.buttonLarge; }, function (props) { return props.size === "small" && styles_1.buttonSmall; }, function (props) { return props.size === "tiny" && styles_1.buttonTiny; }, function (props) {
|
|
118
117
|
var calculatedIntent = (0, exports.calculateIntent)(props);
|
|
119
118
|
return (0, styles_1.getIntentBase)({ intent: calculatedIntent });
|
|
120
119
|
}, function (props) {
|
|
@@ -135,10 +134,10 @@ exports.LabelButton = (0, styled_components_1.default)((0, react_1.forwardRef)(f
|
|
|
135
134
|
loading && (React.createElement(styles_1.ButtonLoaderContainer, null,
|
|
136
135
|
React.createElement(Spinner_1.Spinner, { size: "small" }))),
|
|
137
136
|
children,
|
|
138
|
-
(0, Icon_1.isAnyIcon)(icon) ?
|
|
137
|
+
(0, Icon_1.isAnyIcon)(icon) ? React.createElement(Icon_1.Icon, { icon: icon }) : (0, Icon_1.isIconProps)(icon) ? React.createElement(Icon_1.Icon, (0, tslib_1.__assign)({}, icon)) : icon,
|
|
139
138
|
text && React.createElement(styles_1.ButtonText, null, text),
|
|
140
139
|
(0, Icon_1.isAnyIcon)(rightIcon) ? (React.createElement(Icon_1.Icon, { icon: rightIcon })) : (0, Icon_1.isIconProps)(rightIcon) ? (React.createElement(Icon_1.Icon, (0, tslib_1.__assign)({}, rightIcon))) : (rightIcon)));
|
|
141
|
-
}))(
|
|
140
|
+
}))(templateObject_7 || (templateObject_7 = (0, tslib_1.__makeTemplateObject)(["\n text-align: ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n :active,\n :focus,\n :hover {\n ", ";\n }\n ", "\n ", ";\n"], ["\n text-align: ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n :active,\n :focus,\n :hover {\n ", ";\n }\n ", "\n ", ";\n"])), function (props) { var _a; return (_a = props.alignText) !== null && _a !== void 0 ? _a : "left"; }, styles_1.buttonBaseCss, function (props) { return props.size === "large" && styles_1.buttonLarge; }, function (props) { return props.size === "small" && styles_1.buttonSmall; }, function (props) { return props.size === "tiny" && styles_1.buttonTiny; }, function (props) {
|
|
142
141
|
var calculatedIntent = (0, exports.calculateIntent)(props);
|
|
143
142
|
return (0, styles_1.getIntentBase)({ intent: calculatedIntent });
|
|
144
143
|
}, function (props) {
|
|
@@ -151,17 +150,17 @@ exports.LabelButton = (0, styled_components_1.default)((0, react_1.forwardRef)(f
|
|
|
151
150
|
// ${(props) => props.noMinimalUnderline && buttonNoMinimalUnderline} ^^^^
|
|
152
151
|
exports.LabelButtonFileInput = styled_components_1.default.input.attrs({
|
|
153
152
|
type: "file",
|
|
154
|
-
})(
|
|
153
|
+
})(templateObject_8 || (templateObject_8 = (0, tslib_1.__makeTemplateObject)(["\n width: 0;\n height: 0;\n opacity: 0;\n overflow: hidden;\n position: absolute;\n z-index: -1;\n"], ["\n width: 0;\n height: 0;\n opacity: 0;\n overflow: hidden;\n position: absolute;\n z-index: -1;\n"])));
|
|
155
154
|
exports.NavButton = (0, styled_components_1.default)((0, react_1.forwardRef)(function NavButton(_a, ref) {
|
|
156
155
|
var text = _a.text, _b = _a.type, type = _b === void 0 ? "button" : _b, icon = _a.icon, active = _a.active, alignText = _a.alignText, _c = _a.reverse, reverse = _c === void 0 ? false : _c, rest = (0, tslib_1.__rest)(_a, ["text", "type", "icon", "active", "alignText", "reverse"]);
|
|
157
156
|
return (React.createElement("button", (0, tslib_1.__assign)({ type: type, ref: ref }, (0, utils_1.dpNameProp)("NavButton"), rest),
|
|
158
157
|
reverse && (React.createElement(React.Fragment, null,
|
|
159
158
|
text && React.createElement(styles_1.ButtonText, { overflow: "ellipsis" }, text),
|
|
160
|
-
(0, Icon_1.isAnyIcon)(icon) ?
|
|
159
|
+
(0, Icon_1.isAnyIcon)(icon) ? React.createElement(Icon_1.Icon, { icon: icon }) : (0, Icon_1.isIconProps)(icon) ? React.createElement(Icon_1.Icon, (0, tslib_1.__assign)({}, icon)) : icon)),
|
|
161
160
|
!reverse && (React.createElement(React.Fragment, null,
|
|
162
|
-
(0, Icon_1.isAnyIcon)(icon) ?
|
|
161
|
+
(0, Icon_1.isAnyIcon)(icon) ? React.createElement(Icon_1.Icon, { icon: icon }) : (0, Icon_1.isIconProps)(icon) ? React.createElement(Icon_1.Icon, (0, tslib_1.__assign)({}, icon)) : icon,
|
|
163
162
|
text && React.createElement(styles_1.ButtonText, { overflow: "ellipsis" }, text)))));
|
|
164
|
-
}))(
|
|
163
|
+
}))(templateObject_9 || (templateObject_9 = (0, tslib_1.__makeTemplateObject)(["\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n"])), styles_1.navButtonBase, function (props) {
|
|
165
164
|
var calculatedIntent = (0, exports.calculateIntent)(props);
|
|
166
165
|
return (0, styles_1.getIntentBase)({ intent: calculatedIntent });
|
|
167
166
|
}, function (props) { return props.size === "small" && styles_1.navButtonSmall; }, function (props) {
|
|
@@ -179,7 +178,7 @@ exports.OverlayButton = (0, styled_components_1.default)((0, react_1.forwardRef)
|
|
|
179
178
|
(0, Icon_1.isAnyIcon)(icon) ? (React.createElement(Icon_1.Icon, { icon: icon, size: 10 })) : (0, Icon_1.isIconProps)(icon) ? (React.createElement(Icon_1.Icon, (0, tslib_1.__assign)({ size: 10 }, icon))) : (icon),
|
|
180
179
|
text && React.createElement(styles_1.ButtonText, null, text),
|
|
181
180
|
(0, Icon_1.isAnyIcon)(rightIcon) ? (React.createElement(Icon_1.Icon, { icon: rightIcon, size: 10 })) : (0, Icon_1.isIconProps)(rightIcon) ? (React.createElement(Icon_1.Icon, (0, tslib_1.__assign)({ size: 10 }, rightIcon))) : (rightIcon)));
|
|
182
|
-
}))(
|
|
181
|
+
}))(templateObject_10 || (templateObject_10 = (0, tslib_1.__makeTemplateObject)(["\n text-align: ", ";\n ", "\n ", "\n\n position: ", ";\n"], ["\n text-align: ", ";\n ", "\n ", "\n\n position: ", ";\n"])), function (props) { var _a; return (_a = props.alignText) !== null && _a !== void 0 ? _a : "left"; }, styles_1.overlayButtonStyle, function (props) {
|
|
183
182
|
var _a;
|
|
184
183
|
return (0, ts_pattern_1.match)((_a = props.placement) !== null && _a !== void 0 ? _a : "right-top")
|
|
185
184
|
.with("right-top", function () { return styles_1.overlayButtonRightTop; })
|
|
@@ -195,12 +194,8 @@ exports.OverlayButton = (0, styled_components_1.default)((0, react_1.forwardRef)
|
|
|
195
194
|
});
|
|
196
195
|
var calculateIntent = function (_a) {
|
|
197
196
|
var minimal = _a.minimal, noMinimalUnderline = _a.noMinimalUnderline, intent = _a.intent;
|
|
198
|
-
var newIntent = minimal
|
|
199
|
-
? noMinimalUnderline
|
|
200
|
-
? "minimal"
|
|
201
|
-
: "minimalUnderline"
|
|
202
|
-
: intent;
|
|
197
|
+
var newIntent = minimal ? (noMinimalUnderline ? "minimal" : "minimalUnderline") : intent;
|
|
203
198
|
return newIntent !== null && newIntent !== void 0 ? newIntent : "primary";
|
|
204
199
|
};
|
|
205
200
|
exports.calculateIntent = calculateIntent;
|
|
206
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
201
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,eAAO,MAAM,UAAU;;SAgBtB,CAAC;AAEF,eAAO,MAAM,aAAa,oIA2CzB,CAAC;AAEF,eAAO,MAAM,WAAW,oIAWvB,CAAC;AAEF,eAAO,MAAM,WAAW,oIAYvB,CAAC;AAEF,eAAO,MAAM,UAAU,oIActB,CAAC;AAEF,eAAO,MAAM,cAAc,oIAM1B,CAAC;AAEF,eAAO,MAAM,eAAe,oIAsB3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,oIAM7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,oIAiC7B,CAAC;AAKF,eAAO,MAAM,aAAa,oIAIzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,oIAqB7B,CAAC;AAIF,eAAO,MAAM,eAAe,oIAI3B,CAAC;AAEF,eAAO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,CAAC;AAEF,eAAO,MAAM,kBAAkB,oIAuC9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,wDASjC,CAAC;AACF,eAAO,MAAM,wBAAwB,wDAQpC,CAAC;AACF,eAAO,MAAM,oBAAoB,wDAQhC,CAAC;AACF,eAAO,MAAM,uBAAuB,wDAQnC,CAAC;AAEF,eAAO,MAAM,yBAAyB,wDAOrC,CAAC;AAEF,eAAO,MAAM,sBAAsB,wDAYlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,wDAOhC,CAAC"}
|
|
@@ -10,7 +10,7 @@ exports.ButtonText = styled_components_1.default.span(templateObject_2 || (templ
|
|
|
10
10
|
return props.overflow
|
|
11
11
|
? (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ", ";\n "], ["\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ", ";\n "])), props.overflow) : undefined;
|
|
12
12
|
});
|
|
13
|
-
exports.buttonBaseCss = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n position: relative;\n transition: all 0.1s ease-in-out;\n display: inline-flex;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n padding: 4px 8px;\n vertical-align: middle;\n height: 24px;\n max-height: 24px;\n min-height: 24px;\n min-width: 24px;\n align-items: center;\n\n & > :not(:last-child) {\n margin-right: 7px;\n }\n\n :disabled {\n cursor: not-allowed;\n }\n\n :focus {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n\n > * {\n flex: 0;\n }\n\n ", " {\n ", ";\n flex: 0 0 auto;\n }\n\n ", " {\n flex: 0 1 auto;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"], ["\n position: relative;\n transition: all 0.1s ease-in-out;\n display: inline-flex;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n padding: 4px 8px;\n vertical-align: middle;\n height: 24px;\n max-height: 24px;\n min-height: 24px;\n min-width: 24px;\n align-items: center;\n\n & > :not(:last-child) {\n margin-right: 7px;\n }\n\n :disabled {\n cursor: not-allowed;\n }\n\n :focus {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n\n > * {\n flex: 0;\n }\n\n ", " {\n ", ";\n flex: 0 0 auto;\n }\n\n ", " {\n flex: 0 1 auto;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"])), function (_a) {
|
|
13
|
+
exports.buttonBaseCss = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n position: relative;\n transition: all 0.1s ease-in-out;\n display: inline-flex;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n padding: 4px 8px;\n vertical-align: middle;\n height: 24px;\n max-height: 24px;\n min-height: 24px;\n min-width: 24px;\n align-items: center;\n\n & > :not(:last-child) {\n margin-right: 7px;\n }\n\n :disabled {\n cursor: not-allowed;\n }\n\n :focus {\n outline-visible: 2px solid ", ";\n outline-offset: 1px;\n }\n\n > * {\n flex: 0;\n }\n\n ", " {\n ", ";\n flex: 0 0 auto;\n }\n\n ", " {\n flex: 0 1 auto;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"], ["\n position: relative;\n transition: all 0.1s ease-in-out;\n display: inline-flex;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n padding: 4px 8px;\n vertical-align: middle;\n height: 24px;\n max-height: 24px;\n min-height: 24px;\n min-width: 24px;\n align-items: center;\n\n & > :not(:last-child) {\n margin-right: 7px;\n }\n\n :disabled {\n cursor: not-allowed;\n }\n\n :focus {\n outline-visible: 2px solid ", ";\n outline-offset: 1px;\n }\n\n > * {\n flex: 0;\n }\n\n ", " {\n ", ";\n flex: 0 0 auto;\n }\n\n ", " {\n flex: 0 1 auto;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"])), function (_a) {
|
|
14
14
|
var theme = _a.theme;
|
|
15
15
|
return theme.colors.cyan80;
|
|
16
16
|
}, Icon_1.Icon, Typography_1.paragraphStyled.p6, exports.ButtonText);
|
|
@@ -19,7 +19,7 @@ exports.buttonSmall = (0, styled_components_1.css)(templateObject_5 || (template
|
|
|
19
19
|
exports.buttonTiny = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = (0, tslib_1.__makeTemplateObject)(["\n height: 16px;\n min-height: 16px;\n max-height: 16px;\n min-width: 28px;\n justify-content: center;\n padding: 1px 2px;\n ", " {\n ", ";\n }\n\n ", " {\n ", ";\n }\n"], ["\n height: 16px;\n min-height: 16px;\n max-height: 16px;\n min-width: 28px;\n justify-content: center;\n padding: 1px 2px;\n ", " {\n ", ";\n }\n\n ", " {\n ", ";\n }\n"])), exports.ButtonText, Typography_1.paragraphStyled.p11, Icon_1.Icon, Typography_1.paragraphStyled.p11);
|
|
20
20
|
exports.iconButtonBase = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = (0, tslib_1.__makeTemplateObject)(["\n border-radius: 50%;\n justify-content: center;\n ", " {\n ", "\n }\n"], ["\n border-radius: 50%;\n justify-content: center;\n ", " {\n ", "\n }\n"])), Icon_1.Icon, Typography_1.paragraphStyled.p1);
|
|
21
21
|
exports.iconButtonSmall = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = (0, tslib_1.__makeTemplateObject)(["\n border-radius: 4px;\n padding: 3px;\n height: 20px;\n min-height: 20px;\n max-height: 20px;\n width: 20px;\n ", " {\n ", ";\n }\n\n ", " {\n ", "\n }\n\n &:hover,\n &:active,\n &:focus {\n ", " {\n color: inherit;\n }\n }\n"], ["\n border-radius: 4px;\n padding: 3px;\n height: 20px;\n min-height: 20px;\n max-height: 20px;\n width: 20px;\n ", " {\n ", ";\n }\n\n ", " {\n ", "\n }\n\n &:hover,\n &:active,\n &:focus {\n ", " {\n color: inherit;\n }\n }\n"])), exports.ButtonText, Typography_1.paragraphStyled.p11, Icon_1.Icon, Typography_1.paragraphStyled.p8, Icon_1.Icon);
|
|
22
|
-
exports.iconMinimalActive = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = (0, tslib_1.__makeTemplateObject)(["\n color: ", ";\n box-shadow: none;\n background-color: transparent;\n border-color: transparent;\n outline: none;\n"], ["\n color: ", ";\n box-shadow: none;\n background-color: transparent;\n border-color: transparent;\n outline: none;\n"])), function (props) { return props.theme.colors.brandShade100; });
|
|
22
|
+
exports.iconMinimalActive = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = (0, tslib_1.__makeTemplateObject)(["\n color: ", ";\n box-shadow: none;\n background-color: transparent;\n border-color: transparent;\n outline-visible: none;\n"], ["\n color: ", ";\n box-shadow: none;\n background-color: transparent;\n border-color: transparent;\n outline-visible: none;\n"])), function (props) { return props.theme.colors.brandShade100; });
|
|
23
23
|
exports.iconButtonMinimal = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = (0, tslib_1.__makeTemplateObject)(["\n padding: 0;\n height: 16px;\n min-height: 16px;\n max-height: 16px;\n width: 16px;\n color: ", ";\n background-color: transparent;\n border-color: transparent;\n box-shadow: none;\n\n :hover {\n color: ", ";\n box-shadow: none;\n background-color: transparent;\n border-color: transparent;\n }\n\n :active,\n :focus {\n ", ";\n }\n\n :disabled {\n box-shadow: none;\n background-color: transparent;\n border-color: transparent;\n color: ", ";\n }\n\n ", " {\n ", "\n }\n"], ["\n padding: 0;\n height: 16px;\n min-height: 16px;\n max-height: 16px;\n width: 16px;\n color: ", ";\n background-color: transparent;\n border-color: transparent;\n box-shadow: none;\n\n :hover {\n color: ", ";\n box-shadow: none;\n background-color: transparent;\n border-color: transparent;\n }\n\n :active,\n :focus {\n ", ";\n }\n\n :disabled {\n box-shadow: none;\n background-color: transparent;\n border-color: transparent;\n color: ", ";\n }\n\n ", " {\n ", "\n }\n"])), function (props) { return props.theme.colors.grey40; }, function (props) { return props.theme.colors.brandShade80; }, exports.iconMinimalActive, function (props) { return props.theme.colors.grey20; }, Icon_1.Icon, Typography_1.headingStyles.h0);
|
|
24
24
|
// ------- BASEs ---------
|
|
25
25
|
// Primary ---------
|
|
@@ -39,7 +39,7 @@ var buttonMinimalDisabled = (0, styled_components_1.css)(templateObject_17 || (t
|
|
|
39
39
|
var theme = _a.theme;
|
|
40
40
|
return theme.colors.grey20;
|
|
41
41
|
});
|
|
42
|
-
exports.buttonMinimalActive = (0, styled_components_1.css)(templateObject_18 || (templateObject_18 = (0, tslib_1.__makeTemplateObject)(["\n background: none;\n color: ", ";\n border: none;\n outline: none;\n"], ["\n background: none;\n color: ", ";\n border: none;\n outline: none;\n"])), function (_a) {
|
|
42
|
+
exports.buttonMinimalActive = (0, styled_components_1.css)(templateObject_18 || (templateObject_18 = (0, tslib_1.__makeTemplateObject)(["\n background: none;\n color: ", ";\n border: none;\n outline-visible: none;\n"], ["\n background: none;\n color: ", ";\n border: none;\n outline-visible: none;\n"])), function (_a) {
|
|
43
43
|
var theme = _a.theme;
|
|
44
44
|
return theme.colors.brandPrimary;
|
|
45
45
|
});
|
|
@@ -61,7 +61,7 @@ exports.buttonMinimalUnderline = (0, styled_components_1.css)(templateObject_20
|
|
|
61
61
|
// minimalBLock
|
|
62
62
|
var minimalBlockActive = (0, styled_components_1.css)(templateObject_21 || (templateObject_21 = (0, tslib_1.__makeTemplateObject)(["\n color: ", ";\n background-color: ", ";\n border: none;\n box-shadow: none;\n &:hover {\n color: ", ";\n background-color: ", ";\n border: none;\n box-shadow: none;\n }\n"], ["\n color: ", ";\n background-color: ", ";\n border: none;\n box-shadow: none;\n &:hover {\n color: ", ";\n background-color: ", ";\n border: none;\n box-shadow: none;\n }\n"])), function (props) { return props.theme.colors.white; }, function (props) { return props.theme.colors.cyan100; }, function (props) { return props.theme.colors.white; }, function (props) { return props.theme.colors.cyan80; });
|
|
63
63
|
exports.minimalBLock = (0, styled_components_1.css)(templateObject_22 || (templateObject_22 = (0, tslib_1.__makeTemplateObject)(["\n padding: 0;\n height: 22px;\n min-height: 22px;\n max-height: 22px;\n min-width: 22px;\n max-width: 22px;\n width: 22px;\n color: ", ";\n background-color: transparent;\n border: none;\n box-shadow: none;\n border-radius: 4px;\n :hover {\n color: ", ";\n background-color: ", ";\n border: none;\n box-shadow: none;\n }\n :active {\n &:hover {\n color: ", ";\n background-color: ", ";\n border: none;\n box-shadow: none;\n }\n }\n :active,\n :focus {\n ", "\n }\n :disabled {\n background-color: ", ";\n color: ", ";\n border: none;\n box-shadow: none;\n }\n ", " {\n ", "\n }\n"], ["\n padding: 0;\n height: 22px;\n min-height: 22px;\n max-height: 22px;\n min-width: 22px;\n max-width: 22px;\n width: 22px;\n color: ", ";\n background-color: transparent;\n border: none;\n box-shadow: none;\n border-radius: 4px;\n :hover {\n color: ", ";\n background-color: ", ";\n border: none;\n box-shadow: none;\n }\n :active {\n &:hover {\n color: ", ";\n background-color: ", ";\n border: none;\n box-shadow: none;\n }\n }\n :active,\n :focus {\n ", "\n }\n :disabled {\n background-color: ", ";\n color: ", ";\n border: none;\n box-shadow: none;\n }\n ", " {\n ", "\n }\n"])), function (props) { return props.theme.colors.grey80; }, function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.brandShade20; }, function (props) { return props.theme.colors.white; }, function (props) { return props.theme.colors.cyan80; }, minimalBlockActive, function (props) { return props.theme.colors.grey5; }, function (props) { return props.theme.colors.grey80; }, Icon_1.Icon, Typography_1.headingStyles.h0);
|
|
64
|
-
exports.dangerPrimaryActive = (0, styled_components_1.css)(templateObject_23 || (templateObject_23 = (0, tslib_1.__makeTemplateObject)(["\n outline: none;\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n"], ["\n outline: none;\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n"])), function (props) { return props.theme.colors.red100; }, function (props) { return props.theme.colors.red100; }, function (props) { return props.theme.colors.brandShade40; });
|
|
64
|
+
exports.dangerPrimaryActive = (0, styled_components_1.css)(templateObject_23 || (templateObject_23 = (0, tslib_1.__makeTemplateObject)(["\n outline-visible: none;\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n"], ["\n outline-visible: none;\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n"])), function (props) { return props.theme.colors.red100; }, function (props) { return props.theme.colors.red100; }, function (props) { return props.theme.colors.brandShade40; });
|
|
65
65
|
exports.dangerPrimary = (0, styled_components_1.css)(templateObject_24 || (templateObject_24 = (0, tslib_1.__makeTemplateObject)(["\n :hover {\n background-color: ", ";\n border: 1px solid ", ";\n }\n\n :focus,\n :active {\n ", "\n }\n"], ["\n :hover {\n background-color: ", ";\n border: 1px solid ", ";\n }\n\n :focus,\n :active {\n ", "\n }\n"])), function (props) { return props.theme.colors.red100; }, function (props) { return props.theme.colors.red100; }, exports.dangerPrimaryActive);
|
|
66
66
|
exports.dangerSecondaryTeritaryActive = (0, styled_components_1.css)(templateObject_25 || (templateObject_25 = (0, tslib_1.__makeTemplateObject)(["\n color: ", ";\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n"], ["\n color: ", ";\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n"])), function (props) { return props.theme.colors.red100; }, function (props) { return props.theme.colors.red40; }, function (props) { return props.theme.colors.red100; }, function (props) { return props.theme.colors.brandShade40; });
|
|
67
67
|
exports.dangerSecondaryTertiary = (0, styled_components_1.css)(templateObject_26 || (templateObject_26 = (0, tslib_1.__makeTemplateObject)(["\n :focus {\n outline: none;\n background-color: ", ";\n box-shadow: 0px 2px 2px ", ";\n border: 1px solid ", ";\n }\n\n :active {\n ", "\n }\n\n :hover {\n color: ", ";\n background-color: ", ";\n border: 1px solid ", ";\n }\n"], ["\n :focus {\n outline: none;\n background-color: ", ";\n box-shadow: 0px 2px 2px ", ";\n border: 1px solid ", ";\n }\n\n :active {\n ", "\n }\n\n :hover {\n color: ", ";\n background-color: ", ";\n border: 1px solid ", ";\n }\n"])), function (props) { return props.theme.colors.white; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.grey20; }, exports.dangerSecondaryTeritaryActive, function (props) { return props.theme.colors.red100; }, function (props) { return props.theme.colors.red20; }, function (props) { return props.theme.colors.red100; });
|
|
@@ -144,7 +144,7 @@ var getDisabledIntent = function (props) {
|
|
|
144
144
|
exports.getDisabledIntent = getDisabledIntent;
|
|
145
145
|
exports.ButtonLoaderContainer = styled_components_1.default.div.attrs((0, utils_1.dpNameProp)("ButtonLoader"))(templateObject_31 || (templateObject_31 = (0, tslib_1.__makeTemplateObject)(["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n color: ", ";\n margin: 0 !important;\n opacity: 0.8;\n"], ["\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n color: ", ";\n margin: 0 !important;\n opacity: 0.8;\n"])), function (props) { return props.theme.colors.brandPrimary; });
|
|
146
146
|
exports.buttonLoading = (0, styled_components_1.css)(templateObject_32 || (templateObject_32 = (0, tslib_1.__makeTemplateObject)(["\n &,\n :hover,\n :active,\n :focus {\n background-color: ", " !important;\n color: transparent !important;\n border-color: ", " !important;\n box-shadow: none !important;\n }\n"], ["\n &,\n :hover,\n :active,\n :focus {\n background-color: ", " !important;\n color: transparent !important;\n border-color: ", " !important;\n box-shadow: none !important;\n }\n"])), function (props) { return props.theme.colors.grey10; }, function (props) { return props.theme.colors.grey10; });
|
|
147
|
-
exports.navButtonBase = (0, styled_components_1.css)(templateObject_33 || (templateObject_33 = (0, tslib_1.__makeTemplateObject)(["\n position: relative;\n transition: all 0.1s ease-in-out;\n display: inline-flex;\n flex-direction: column;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n padding: 4px 8px;\n vertical-align: middle;\n height: 55px;\n width: 90px;\n overflow: hidden;\n align-items: center;\n justify-content:
|
|
147
|
+
exports.navButtonBase = (0, styled_components_1.css)(templateObject_33 || (templateObject_33 = (0, tslib_1.__makeTemplateObject)(["\n position: relative;\n transition: all 0.1s ease-in-out;\n display: inline-flex;\n flex-direction: column;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n padding: 4px 8px;\n vertical-align: middle;\n height: 55px;\n width: 90px;\n overflow: hidden;\n align-items: center;\n justify-content: space-between;\n\n :disabled {\n cursor: not-allowed;\n }\n\n ", " {\n font-size: 20px;\n flex: 1;\n }\n\n ", " {\n ", "\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"], ["\n position: relative;\n transition: all 0.1s ease-in-out;\n display: inline-flex;\n flex-direction: column;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n padding: 4px 8px;\n vertical-align: middle;\n height: 55px;\n width: 90px;\n overflow: hidden;\n align-items: center;\n justify-content: space-between;\n\n :disabled {\n cursor: not-allowed;\n }\n\n ", " {\n font-size: 20px;\n flex: 1;\n }\n\n ", " {\n ", "\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"])), Icon_1.Icon, exports.ButtonText, Typography_1.paragraphStyled.p8);
|
|
148
148
|
exports.navButtonSmall = (0, styled_components_1.css)(templateObject_34 || (templateObject_34 = (0, tslib_1.__makeTemplateObject)(["\n height: 50px;\n width: 60px;\n min-height: 50px;\n min-width: 60px;\n"], ["\n height: 50px;\n width: 60px;\n min-height: 50px;\n min-width: 60px;\n"])));
|
|
149
149
|
exports.TestOverlayButtonWrapper = styled_components_1.default.div(templateObject_35 || (templateObject_35 = (0, tslib_1.__makeTemplateObject)(["\n background-color: #eeeeee;\n height: 50px;\n position: ", ";\n width: 100px;\n"], ["\n background-color: #eeeeee;\n height: 50px;\n position: ", ";\n width: 100px;\n"])), function (_a) {
|
|
150
150
|
var position = _a.position;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppCard.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/AppCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA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,yFAOjB,YAAY,gBAoBd,CAAC;AAEF,eAAO,MAAM,aAAa,8CAA+C,kBAAkB,gBAQ1F,CAAC"}
|
|
@@ -63,7 +63,7 @@ exports.AppCardInfo = (0, styled_components_1.default)(Typography_1.TSpan).attrs
|
|
|
63
63
|
type: "p5",
|
|
64
64
|
overflow: "ellipsis",
|
|
65
65
|
})(templateObject_12 || (templateObject_12 = (0, tslib_1.__makeTemplateObject)(["\n color: ", ";\n margin-right: 4px;\n"], ["\n color: ", ";\n margin-right: 4px;\n"])), function (props) { return props.theme.colors.grey80; });
|
|
66
|
-
exports.IdTitle = styled_components_1.default.span(templateObject_13 || (templateObject_13 = (0, tslib_1.__makeTemplateObject)(["\n color: ", ";\n font-family: monospace;\n font-size: 9px;\n"], ["\n color: ", ";\n font-family: monospace;\n font-size: 9px;\n"])), function (_a) {
|
|
66
|
+
exports.IdTitle = styled_components_1.default.span(templateObject_13 || (templateObject_13 = (0, tslib_1.__makeTemplateObject)(["\n color: ", ";\n font-family: monospace;\n font-size: 9px;\n word-break: normal;\n"], ["\n color: ", ";\n font-family: monospace;\n font-size: 9px;\n word-break: normal;\n"])), function (_a) {
|
|
67
67
|
var theme = _a.theme;
|
|
68
68
|
return theme.colors.grey80;
|
|
69
69
|
});
|
|
@@ -28,7 +28,7 @@ export declare function dropdownRenderOptions<T = string>(handleSelectOption: (v
|
|
|
28
28
|
* }
|
|
29
29
|
* </Dropdown>
|
|
30
30
|
*/
|
|
31
|
-
export declare function Dropdown<T, TargetRef extends HTMLElement = any, TabId extends string = string>({ children, options, stickyHeaderOptions, stickyFooterOptions, inputValue, searchPlaceholder, placement, showInternalSearch, isLoading, usePortal, closeOnSelect, isOpen: isOpenProp, renderCreateNewOption, hideIcons, iconColumnWidth, containerWidth, onSelectOption, onInputChange, onFetchMore, onClear, onClose, onOpen, optionsRenderer, tabProps, disabled, fetchMoreText, autoscrollText, externalLinkIcon, selectedIcon, }: DropdownProps<T, TargetRef, TabId>): JSX.Element;
|
|
31
|
+
export declare function Dropdown<T, TargetRef extends HTMLElement = any, TabId extends string = string>({ children, options, stickyHeaderOptions, stickyFooterOptions, inputValue, searchPlaceholder, placement, showInternalSearch, isLoading, usePortal, closeOnSelect, isOpen: isOpenProp, renderCreateNewOption, hideIcons, iconColumnWidth, containerWidth, containerHeight, onSelectOption, onInputChange, onFetchMore, onClear, onClose, onOpen, optionsRenderer, tabProps, disabled, fetchMoreText, autoscrollText, externalLinkIcon, selectedIcon, }: DropdownProps<T, TargetRef, TabId>): JSX.Element;
|
|
32
32
|
interface DropdownItemProps<T = unknown> {
|
|
33
33
|
onSelect?: (value: DropdownValueType<T>) => void;
|
|
34
34
|
onSelectIcon?: (value: T) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEZ,SAAS,EAMV,MAAM,OAAO,CAAC;AAIf,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EAEb,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAWjB,OAAO,EAAE,OAAO,EAAgC,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,eAAO,MAAM,eAAe,yGAG3B,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,CAAC,GAAG,MAAM,EAC9C,kBAAkB,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,IAAI,EACzD,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,IAAI,EACvC,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,EAC/C,aAAa,EAAE,SAAS,EACxB,cAAc,EAAE,SAAS,EACzB,YAAY,EAAE,OAAO,EACrB,gBAAgB,EAAE,OAAO,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a.options, stickyHeaderOptions = _a.stickyHeaderOptions, stickyFooterOptions = _a.stickyFooterOptions, inputValue = _a.inputValue, searchPlaceholder = _a.searchPlaceholder, _b = _a.placement, placement = _b === void 0 ? "bottom-start" : _b, _c = _a.showInternalSearch, showInternalSearch = _c === void 0 ? false : _c, _d = _a.isLoading, isLoading = _d === void 0 ? false : _d, _e = _a.usePortal, usePortal = _e === void 0 ? true : _e, _f = _a.closeOnSelect, closeOnSelect = _f === void 0 ? true : _f, isOpenProp = _a.isOpen, renderCreateNewOption = _a.renderCreateNewOption, hideIcons = _a.hideIcons, iconColumnWidth = _a.iconColumnWidth, containerWidth = _a.containerWidth, onSelectOption = _a.onSelectOption, onInputChange = _a.onInputChange, onFetchMore = _a.onFetchMore, onClear = _a.onClear, onClose = _a.onClose, onOpen = _a.onOpen, optionsRenderer = _a.optionsRenderer, tabProps = _a.tabProps, disabled = _a.disabled, fetchMoreText = _a.fetchMoreText, autoscrollText = _a.autoscrollText, externalLinkIcon = _a.externalLinkIcon, selectedIcon = _a.selectedIcon;
|
|
93
|
+
var children = _a.children, options = _a.options, stickyHeaderOptions = _a.stickyHeaderOptions, stickyFooterOptions = _a.stickyFooterOptions, inputValue = _a.inputValue, searchPlaceholder = _a.searchPlaceholder, _b = _a.placement, placement = _b === void 0 ? "bottom-start" : _b, _c = _a.showInternalSearch, showInternalSearch = _c === void 0 ? false : _c, _d = _a.isLoading, isLoading = _d === void 0 ? false : _d, _e = _a.usePortal, usePortal = _e === void 0 ? true : _e, _f = _a.closeOnSelect, closeOnSelect = _f === void 0 ? true : _f, isOpenProp = _a.isOpen, renderCreateNewOption = _a.renderCreateNewOption, hideIcons = _a.hideIcons, iconColumnWidth = _a.iconColumnWidth, containerWidth = _a.containerWidth, containerHeight = _a.containerHeight, onSelectOption = _a.onSelectOption, onInputChange = _a.onInputChange, onFetchMore = _a.onFetchMore, onClear = _a.onClear, onClose = _a.onClose, onOpen = _a.onOpen, optionsRenderer = _a.optionsRenderer, tabProps = _a.tabProps, disabled = _a.disabled, fetchMoreText = _a.fetchMoreText, autoscrollText = _a.autoscrollText, externalLinkIcon = _a.externalLinkIcon, selectedIcon = _a.selectedIcon;
|
|
94
94
|
var _g = (0, tslib_1.__read)((0, react_1.useState)(false), 2), isOpenState = _g[0], setIsOpenState = _g[1];
|
|
95
95
|
var _h = (0, tslib_1.__read)((0, react_1.useState)(null), 2), activeItem = _h[0], setActiveItem = _h[1];
|
|
96
96
|
var _j = (0, tslib_1.__read)((0, react_1.useState)(null), 2), activeSubItem = _j[0], setActiveSubItem = _j[1];
|
|
@@ -237,9 +237,9 @@ function Dropdown(_a) {
|
|
|
237
237
|
var innerDropdownContent = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
238
238
|
optionsRenderer &&
|
|
239
239
|
optionsRenderer(options, handleSelectOption, activeItem, activeSubItem, setActiveSubItem, hideIcons),
|
|
240
|
-
!optionsRenderer && options.length > 0 && (react_1.default.createElement(Infinite_1.Infinite, { maxHeight: "40vh", onFetchMore: onFetchMore, anchor: false, scrollSideEffect: function () { return setActiveSubItem(null); }, fetchMoreText: fetchMoreText, autoscrollText: autoscrollText }, options.map(dropdownRenderOptions(handleSelectOption, activeItem, activeSubItem, setActiveSubItem, fetchMoreText, autoscrollText, selectedIcon, externalLinkIcon, hideIcons, iconColumnWidth)))),
|
|
240
|
+
!optionsRenderer && options.length > 0 && (react_1.default.createElement(Infinite_1.Infinite, { maxHeight: containerHeight ? undefined : "40vh", onFetchMore: onFetchMore, anchor: false, scrollSideEffect: function () { return setActiveSubItem(null); }, fetchMoreText: fetchMoreText, autoscrollText: autoscrollText }, options.map(dropdownRenderOptions(handleSelectOption, activeItem, activeSubItem, setActiveSubItem, fetchMoreText, autoscrollText, selectedIcon, externalLinkIcon, hideIcons, iconColumnWidth)))),
|
|
241
241
|
isLoading && react_1.default.createElement(Spinner_1.Spinner, null)));
|
|
242
|
-
var dropdown = (react_1.default.createElement(S.DropdownContainer, (0, tslib_1.__assign)({ initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { type: "spring", mass: 0.5 }, onKeyDownCapture: handleKeyDown, "data-testid": "dropdown-container", ref: (0, utility_1.mergeRefs)(setPopperElement, dropdownRef), style: styles.popper, containerWidth: containerWidth || refWidth }, attributes.popper),
|
|
242
|
+
var dropdown = (react_1.default.createElement(S.DropdownContainer, (0, tslib_1.__assign)({ initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { type: "spring", mass: 0.5 }, onKeyDownCapture: handleKeyDown, "data-testid": "dropdown-container", ref: (0, utility_1.mergeRefs)(setPopperElement, dropdownRef), style: styles.popper, containerWidth: containerWidth || refWidth, containerHeight: containerHeight }, attributes.popper),
|
|
243
243
|
stickyHeaderOptions && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
244
244
|
stickyHeaderOptions.map(dropdownRenderOptions(handleSelectOption, activeItem, activeSubItem, setActiveSubItem, fetchMoreText, autoscrollText, selectedIcon, externalLinkIcon)),
|
|
245
245
|
react_1.default.createElement(S.DropdownDividerItem, null))),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const DropdownContainer: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, import("styled-components").DefaultTheme, import("../../utils").DpNameProp & {
|
|
2
2
|
containerWidth?: number | undefined;
|
|
3
|
+
containerHeight?: number | undefined;
|
|
3
4
|
}, keyof import("../../utils").DpNameProp>;
|
|
4
5
|
export declare const DropdownDividerItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
6
|
export declare const DropdownHeaderItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;0CAiB7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,yGAK/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,yGAU9B,CAAC;AAEF,UAAU,uBAAuB;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,4HAyB9B,CAAC;AACF,eAAO,MAAM,mBAAmB,4HAI/B,CAAC;AAEF,eAAO,MAAM,YAAY,4GAcxB,CAAC;AAEF,eAAO,MAAM,aAAa;;;SAezB,CAAC;AAEF,eAAO,MAAM,YAAY;;SAOxB,CAAC;AAEF,eAAO,MAAM,oCAAoC,yGAIhD,CAAC"}
|
|
@@ -5,12 +5,15 @@ var tslib_1 = require("tslib");
|
|
|
5
5
|
var styled_components_1 = (0, tslib_1.__importDefault)(require("styled-components"));
|
|
6
6
|
var framer_motion_1 = require("framer-motion");
|
|
7
7
|
var utils_1 = require("../../utils");
|
|
8
|
-
exports.DropdownContainer = (0, styled_components_1.default)(framer_motion_1.motion.div).attrs((0, utils_1.dpNameProp)("Dropdown"))(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n overflow: hidden;\n background: ", ";\n box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n z-index: 9999999;\n outline: none;\n padding-top: 5px;\n padding-bottom: 5px;\n // TODO: allow menu contents to define width\n // TODO: set min width based on ref of input trigger\n width: ", "px;\n user-select: none;\n"], ["\n overflow: hidden;\n background: ", ";\n box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n z-index: 9999999;\n outline: none;\n padding-top: 5px;\n padding-bottom: 5px;\n // TODO: allow menu contents to define width\n // TODO: set min width based on ref of input trigger\n width: ", "px;\n user-select: none;\n"])), function (_a) {
|
|
8
|
+
exports.DropdownContainer = (0, styled_components_1.default)(framer_motion_1.motion.div).attrs((0, utils_1.dpNameProp)("Dropdown"))(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n overflow: hidden;\n background: ", ";\n box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n z-index: 9999999;\n outline: none;\n padding-top: 5px;\n padding-bottom: 5px;\n // TODO: allow menu contents to define width\n // TODO: set min width based on ref of input trigger\n width: ", "px;\n ", "\n user-select: none;\n"], ["\n overflow: hidden;\n background: ", ";\n box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n z-index: 9999999;\n outline: none;\n padding-top: 5px;\n padding-bottom: 5px;\n // TODO: allow menu contents to define width\n // TODO: set min width based on ref of input trigger\n width: ", "px;\n ", "\n user-select: none;\n"])), function (_a) {
|
|
9
9
|
var theme = _a.theme;
|
|
10
10
|
return theme.colors.white;
|
|
11
11
|
}, function (_a) {
|
|
12
12
|
var containerWidth = _a.containerWidth;
|
|
13
13
|
return containerWidth !== null && containerWidth !== void 0 ? containerWidth : 200;
|
|
14
|
+
}, function (_a) {
|
|
15
|
+
var containerHeight = _a.containerHeight;
|
|
16
|
+
return (containerHeight ? "height: ".concat(containerHeight, "px;") : "");
|
|
14
17
|
});
|
|
15
18
|
exports.DropdownDividerItem = styled_components_1.default.div(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n width: 100%;\n border-top: 1px solid ", ";\n margin-top: 5px;\n margin-bottom: 5px;\n"], ["\n width: 100%;\n border-top: 1px solid ", ";\n margin-top: 5px;\n margin-bottom: 5px;\n"])), function (_a) {
|
|
16
19
|
var theme = _a.theme;
|
|
@@ -102,8 +102,10 @@ export interface DropdownProps<T, TargetRef extends HTMLElement, TabId extends s
|
|
|
102
102
|
hideIcons?: boolean;
|
|
103
103
|
/** The width of the column in which icons are rendered */
|
|
104
104
|
iconColumnWidth?: number;
|
|
105
|
-
/** Add in custom
|
|
105
|
+
/** Add in custom width to the dropdown options container */
|
|
106
106
|
containerWidth?: number;
|
|
107
|
+
/** Add in custom height to the dropdown options container */
|
|
108
|
+
containerHeight?: number;
|
|
107
109
|
/** Event handler for when the "active" item changes via keyboard events */
|
|
108
110
|
onActiveOptionChange?: (item: DropdownValueType<T> | null) => void;
|
|
109
111
|
/** Event handler for when the "clear" event is triggered for the search input */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Dropdown/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,iBAAiB,CAAC,aAAa;IAC9C,uCAAuC;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,+BAA+B;IAC/B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB;IACrB,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAChD,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4BAA4B;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C,KAAK,IAAI,EACzD,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,IAAI,EACvC,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,EACrE,SAAS,EAAE,OAAO,GAAG,SAAS,KAC3B,SAAS,CAAC;IACf,mDAAmD;IACnD,QAAQ,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3B,iDAAiD;IACjD,aAAa,EAAE,SAAS,CAAC;IACzB,iDAAiD;IACjD,cAAc,EAAE,SAAS,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare type DpCustomIconsId = "active-call" | "admin" | "agent" | "api" | "apps-zapier" | "arrow" | "column-width" | "community" | "crown" | "deskpro" | "dot" | "drag" | "dual-view" | "email-primary" | "enter" | "export-alt" | "export" | "follow-up" | "glossary" | "google-analytics" | "grip" | "hang-up" | "helping-hand" | "im-send" | "im" | "inbound-call" | "kanban-view" | "level-down" | "linked-ticket" | "location-arrow" | "merge" | "merge2" | "missed-call" | "mobile-rotate" | "organization-circle" | "outbound-call" | "read" | "record" | "sent" | "sip-address" | "sort" | "transfer-queue" | "triangle" | "warm-add" | "warm-transfer" | "webhook";
|
|
1
|
+
export declare type DpCustomIconsId = "active-call" | "admin" | "agent" | "api" | "apps-zapier" | "arrow" | "column-width" | "community" | "crown" | "deskpro" | "dot" | "drag" | "dual-view" | "email-primary" | "enter" | "export-alt" | "export" | "follow-up" | "glossary" | "google-analytics" | "grip" | "hang-up" | "helping-hand" | "im-outline" | "im-send" | "im" | "inbound-call" | "kanban-view" | "level-down" | "linked-ticket" | "location-arrow" | "merge" | "merge2" | "missed-call" | "mobile-rotate" | "organization-circle" | "outbound-call" | "read" | "record" | "sent" | "sip-address" | "sort" | "transfer-queue" | "triangle" | "warm-add" | "warm-transfer" | "webhook";
|
|
2
2
|
export declare const DP_CUSTOM_ICONS_CODEPOINTS: {
|
|
3
3
|
[key in DpCustomIconsId]: string;
|
|
4
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customIconsCodegen.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon/customIconsCodegen.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GACvB,aAAa,GACb,OAAO,GACP,OAAO,GACP,KAAK,GACL,aAAa,GACb,OAAO,GACP,cAAc,GACd,WAAW,GACX,OAAO,GACP,SAAS,GACT,KAAK,GACL,MAAM,GACN,WAAW,GACX,eAAe,GACf,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,UAAU,GACV,kBAAkB,GAClB,MAAM,GACN,SAAS,GACT,cAAc,GACd,SAAS,GACT,IAAI,GACJ,cAAc,GACd,aAAa,GACb,YAAY,GACZ,eAAe,GACf,gBAAgB,GAChB,OAAO,GACP,QAAQ,GACR,aAAa,GACb,eAAe,GACf,qBAAqB,GACrB,eAAe,GACf,MAAM,GACN,QAAQ,GACR,MAAM,GACN,aAAa,GACb,MAAM,GACN,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,eAAe,GACf,SAAS,CAAC;AAEd,eAAO,MAAM,0BAA0B,EAAE;KAAG,GAAG,IAAI,eAAe,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"customIconsCodegen.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon/customIconsCodegen.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GACvB,aAAa,GACb,OAAO,GACP,OAAO,GACP,KAAK,GACL,aAAa,GACb,OAAO,GACP,cAAc,GACd,WAAW,GACX,OAAO,GACP,SAAS,GACT,KAAK,GACL,MAAM,GACN,WAAW,GACX,eAAe,GACf,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,UAAU,GACV,kBAAkB,GAClB,MAAM,GACN,SAAS,GACT,cAAc,GACd,YAAY,GACZ,SAAS,GACT,IAAI,GACJ,cAAc,GACd,aAAa,GACb,YAAY,GACZ,eAAe,GACf,gBAAgB,GAChB,OAAO,GACP,QAAQ,GACR,aAAa,GACb,eAAe,GACf,qBAAqB,GACrB,eAAe,GACf,MAAM,GACN,QAAQ,GACR,MAAM,GACN,aAAa,GACb,MAAM,GACN,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,eAAe,GACf,SAAS,CAAC;AAEd,eAAO,MAAM,0BAA0B,EAAE;KAAG,GAAG,IAAI,eAAe,GAAG,MAAM;CAgD1E,CAAC"}
|
|
@@ -25,27 +25,28 @@ exports.DP_CUSTOM_ICONS_CODEPOINTS = {
|
|
|
25
25
|
grip: "61717",
|
|
26
26
|
"hang-up": "61718",
|
|
27
27
|
"helping-hand": "61719",
|
|
28
|
-
"im-
|
|
29
|
-
im: "61721",
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"warm-
|
|
50
|
-
|
|
28
|
+
"im-outline": "61720",
|
|
29
|
+
"im-send": "61721",
|
|
30
|
+
im: "61722",
|
|
31
|
+
"inbound-call": "61723",
|
|
32
|
+
"kanban-view": "61724",
|
|
33
|
+
"level-down": "61725",
|
|
34
|
+
"linked-ticket": "61726",
|
|
35
|
+
"location-arrow": "61727",
|
|
36
|
+
merge: "61728",
|
|
37
|
+
merge2: "61729",
|
|
38
|
+
"missed-call": "61730",
|
|
39
|
+
"mobile-rotate": "61731",
|
|
40
|
+
"organization-circle": "61732",
|
|
41
|
+
"outbound-call": "61733",
|
|
42
|
+
read: "61734",
|
|
43
|
+
record: "61735",
|
|
44
|
+
sent: "61736",
|
|
45
|
+
"sip-address": "61737",
|
|
46
|
+
sort: "61738",
|
|
47
|
+
"transfer-queue": "61739",
|
|
48
|
+
triangle: "61740",
|
|
49
|
+
"warm-add": "61741",
|
|
50
|
+
"warm-transfer": "61742",
|
|
51
|
+
webhook: "61743",
|
|
51
52
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSProp, DefaultTheme, FlattenSimpleInterpolation } from "styled-components";
|
|
2
2
|
import { TippyProps } from "@tippyjs/react";
|
|
3
3
|
import { ThemeColorKey } from "../../style/theme/types/themeColors";
|
|
4
|
+
import "tippy.js/dist/border.css";
|
|
4
5
|
export declare type Placement = TippyProps["placement"];
|
|
5
6
|
export declare type Plugin = NonNullable<TippyProps["plugins"]>[number];
|
|
6
7
|
declare type modalStyleTypes = "extraDark" | "dark" | "light" | "lightBox" | "lightBoxModal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAe,EAAO,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAInD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAe,EAAO,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAInD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,0BAA0B,CAAC;AAElC,oBAAY,SAAS,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;AAChD,oBAAY,MAAM,GAAG,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,aAAK,eAAe,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,eAAe,CAAC;AAErF,oBAAY,KAAK,GAAG;IAClB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,0BAA0B,GAAG,OAAO,CAAC;IACjD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,GAAG,UAAU,CAAC;AA6Cf,eAAO,MAAM,OAAO,wMAcf,KAAK;;8BAqET,CAAC;AAEF,aAAK,sBAAsB,GAAG;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,iBAAiB,iDAK3B,sBAAsB,gBAcxB,CAAC"}
|
|
@@ -9,18 +9,21 @@ var layout_1 = require("../../layout");
|
|
|
9
9
|
var free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
|
|
10
10
|
var Icon_1 = require("../Icon");
|
|
11
11
|
var utils_1 = require("../../utils");
|
|
12
|
+
require("tippy.js/dist/border.css");
|
|
12
13
|
var getStyle = function (styleType, theme) {
|
|
13
14
|
var styles = {
|
|
14
15
|
light: {
|
|
15
16
|
backgroundColor: theme.colors.white,
|
|
16
17
|
color: theme.colors.grey100,
|
|
17
18
|
border: "none",
|
|
19
|
+
borderColor: "white",
|
|
18
20
|
boxShadow: "5px 5px 10px rgba(0, 0, 0, 0.1)",
|
|
19
21
|
},
|
|
20
22
|
lightBox: {
|
|
21
23
|
backgroundColor: theme.colors.white,
|
|
22
24
|
color: theme.colors.grey100,
|
|
23
25
|
border: "1px solid ".concat(theme.colors.grey20),
|
|
26
|
+
borderColor: theme.colors.grey20,
|
|
24
27
|
boxShadow: "5px 5px 10px rgba(0, 0, 0, 0.1);",
|
|
25
28
|
},
|
|
26
29
|
// this type is based of the same styling as the modal component
|
|
@@ -28,18 +31,21 @@ var getStyle = function (styleType, theme) {
|
|
|
28
31
|
backgroundColor: theme.colors.white,
|
|
29
32
|
color: theme.colors.grey100,
|
|
30
33
|
border: "1px solid ".concat(theme.colors.grey20),
|
|
34
|
+
borderColor: theme.colors.grey20,
|
|
31
35
|
boxShadow: "0px 4px 16px rgba(0, 0, 0, 0.3)",
|
|
32
36
|
},
|
|
33
37
|
dark: {
|
|
34
38
|
backgroundColor: theme.colors.grey40,
|
|
35
39
|
color: theme.colors.white,
|
|
36
40
|
border: "none",
|
|
41
|
+
borderColor: theme.colors.grey40,
|
|
37
42
|
boxShadow: "5px 5px 10px rgba(0, 0, 0, 0.1)",
|
|
38
43
|
},
|
|
39
44
|
extraDark: {
|
|
40
45
|
backgroundColor: theme.colors.grey100,
|
|
41
46
|
color: theme.colors.white,
|
|
42
47
|
border: "none",
|
|
48
|
+
borderColor: theme.colors.grey100,
|
|
43
49
|
boxShadow: "5px 5px 10px rgba(0, 0, 0, 0.1)",
|
|
44
50
|
},
|
|
45
51
|
};
|
|
@@ -70,7 +76,7 @@ exports.Tooltip = (0, styled_components_1.default)(function (_a) {
|
|
|
70
76
|
return React.createElement(react_1.default, (0, tslib_1.__assign)({ arrow: arrow }, props, { plugins: (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)((onPresEsc ? [escPlugIn] : [])), false) }));
|
|
71
77
|
}).attrs({
|
|
72
78
|
suppressClassNameWarning: true,
|
|
73
|
-
})(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n &.tippy-box {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n border: ", ";\n border-radius: ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: ", ";\n font-style: normal;\n font-weight: normal;\n font-size: 11px;\n line-height: 150%;\n max-width: ", " !important;\n word-break: break-word;\n width: ", ";\n ", ";\n ", ";\n }\n ", "\n ", "\n ", "\n"], ["\n &.tippy-box {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n border: ", ";\n border-radius: ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: ", ";\n font-style: normal;\n font-weight: normal;\n font-size: 11px;\n line-height: 150%;\n max-width: ", " !important;\n word-break: break-word;\n width: ", ";\n ", ";\n ", ";\n }\n ", "\n ", "\n ", "\n"])), function (_a) {
|
|
79
|
+
})(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n &.tippy-box {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n border: ", ";\n border-radius: ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: ", ";\n font-style: normal;\n font-weight: normal;\n font-size: 11px;\n line-height: 150%;\n max-width: ", "px !important;\n word-break: break-word;\n width: ", ";\n ", ";\n ", ";\n }\n ", "\n ", "\n ", "\n"], ["\n &.tippy-box {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n border: ", ";\n border-radius: ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: ", ";\n font-style: normal;\n font-weight: normal;\n font-size: 11px;\n line-height: 150%;\n max-width: ", "px !important;\n word-break: break-word;\n width: ", ";\n ", ";\n ", ";\n }\n ", "\n ", "\n ", "\n"])), function (_a) {
|
|
74
80
|
var theme = _a.theme, _b = _a.styleType, styleType = _b === void 0 ? "light" : _b;
|
|
75
81
|
return getStyle(styleType, theme).backgroundColor;
|
|
76
82
|
}, function (_a) {
|
|
@@ -104,8 +110,12 @@ exports.Tooltip = (0, styled_components_1.default)(function (_a) {
|
|
|
104
110
|
var customComponent = _a.customComponent;
|
|
105
111
|
return customComponent && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n .tippy-content {\n padding: 0;\n }\n "], ["\n .tippy-content {\n padding: 0;\n }\n "])));
|
|
106
112
|
}, function (_a) {
|
|
107
|
-
var arrowColor = _a.arrowColor, theme = _a.theme;
|
|
108
|
-
return
|
|
113
|
+
var arrowColor = _a.arrowColor, theme = _a.theme, _b = _a.styleType, styleType = _b === void 0 ? "light" : _b;
|
|
114
|
+
return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n .tippy-arrow {\n color: ", ";\n border-top-color: ", " !important;\n &::before {\n color: ", ";\n }\n }\n "], ["\n .tippy-arrow {\n color: ", ";\n border-top-color: ", " !important;\n &::before {\n color: ", ";\n }\n }\n "])), getStyle(styleType, theme).borderColor, arrowColor
|
|
115
|
+
? theme.colors[arrowColor]
|
|
116
|
+
: getStyle(styleType, theme).backgroundColor, arrowColor
|
|
117
|
+
? theme.colors[arrowColor]
|
|
118
|
+
: getStyle(styleType, theme).backgroundColor);
|
|
109
119
|
});
|
|
110
120
|
var TooltipCommonIcon = function (_a) {
|
|
111
121
|
var content = _a.content, _b = _a.styleType, styleType = _b === void 0 ? "light" : _b, _c = _a.placement, placement = _c === void 0 ? "top" : _c, _d = _a.iconSize, iconSize = _d === void 0 ? 10 : _d;
|
package/dist/cjs/lib.d.ts
CHANGED
package/dist/cjs/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
|