@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "DpCustomIcons";
|
|
3
|
-
src: url("./fonts/DpCustomIcons/DpCustomIcons.eot?
|
|
4
|
-
url("./fonts/DpCustomIcons/DpCustomIcons.woff2?
|
|
5
|
-
url("./fonts/DpCustomIcons/DpCustomIcons.woff?
|
|
3
|
+
src: url("./fonts/DpCustomIcons/DpCustomIcons.eot?90f42c3555fdeaefe1013f8c50600c5e#iefix") format("embedded-opentype"),
|
|
4
|
+
url("./fonts/DpCustomIcons/DpCustomIcons.woff2?90f42c3555fdeaefe1013f8c50600c5e") format("woff2"),
|
|
5
|
+
url("./fonts/DpCustomIcons/DpCustomIcons.woff?90f42c3555fdeaefe1013f8c50600c5e") format("woff");
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
i[class^="dp-custom-icon-"]:before, i[class*=" dp-custom-icon-"]:before {
|
|
@@ -85,72 +85,75 @@ i[class^="dp-custom-icon-"]:before, i[class*=" dp-custom-icon-"]:before {
|
|
|
85
85
|
.dp-custom-icon-helping-hand:before {
|
|
86
86
|
content: "\f117";
|
|
87
87
|
}
|
|
88
|
-
.dp-custom-icon-im-
|
|
88
|
+
.dp-custom-icon-im-outline:before {
|
|
89
89
|
content: "\f118";
|
|
90
90
|
}
|
|
91
|
-
.dp-custom-icon-im:before {
|
|
91
|
+
.dp-custom-icon-im-send:before {
|
|
92
92
|
content: "\f119";
|
|
93
93
|
}
|
|
94
|
-
.dp-custom-icon-
|
|
94
|
+
.dp-custom-icon-im:before {
|
|
95
95
|
content: "\f11a";
|
|
96
96
|
}
|
|
97
|
-
.dp-custom-icon-
|
|
97
|
+
.dp-custom-icon-inbound-call:before {
|
|
98
98
|
content: "\f11b";
|
|
99
99
|
}
|
|
100
|
-
.dp-custom-icon-
|
|
100
|
+
.dp-custom-icon-kanban-view:before {
|
|
101
101
|
content: "\f11c";
|
|
102
102
|
}
|
|
103
|
-
.dp-custom-icon-
|
|
103
|
+
.dp-custom-icon-level-down:before {
|
|
104
104
|
content: "\f11d";
|
|
105
105
|
}
|
|
106
|
-
.dp-custom-icon-
|
|
106
|
+
.dp-custom-icon-linked-ticket:before {
|
|
107
107
|
content: "\f11e";
|
|
108
108
|
}
|
|
109
|
-
.dp-custom-icon-
|
|
109
|
+
.dp-custom-icon-location-arrow:before {
|
|
110
110
|
content: "\f11f";
|
|
111
111
|
}
|
|
112
|
-
.dp-custom-icon-
|
|
112
|
+
.dp-custom-icon-merge:before {
|
|
113
113
|
content: "\f120";
|
|
114
114
|
}
|
|
115
|
-
.dp-custom-icon-
|
|
115
|
+
.dp-custom-icon-merge2:before {
|
|
116
116
|
content: "\f121";
|
|
117
117
|
}
|
|
118
|
-
.dp-custom-icon-
|
|
118
|
+
.dp-custom-icon-missed-call:before {
|
|
119
119
|
content: "\f122";
|
|
120
120
|
}
|
|
121
|
-
.dp-custom-icon-
|
|
121
|
+
.dp-custom-icon-mobile-rotate:before {
|
|
122
122
|
content: "\f123";
|
|
123
123
|
}
|
|
124
|
-
.dp-custom-icon-
|
|
124
|
+
.dp-custom-icon-organization-circle:before {
|
|
125
125
|
content: "\f124";
|
|
126
126
|
}
|
|
127
|
-
.dp-custom-icon-
|
|
127
|
+
.dp-custom-icon-outbound-call:before {
|
|
128
128
|
content: "\f125";
|
|
129
129
|
}
|
|
130
|
-
.dp-custom-icon-
|
|
130
|
+
.dp-custom-icon-read:before {
|
|
131
131
|
content: "\f126";
|
|
132
132
|
}
|
|
133
|
-
.dp-custom-icon-
|
|
133
|
+
.dp-custom-icon-record:before {
|
|
134
134
|
content: "\f127";
|
|
135
135
|
}
|
|
136
|
-
.dp-custom-icon-
|
|
136
|
+
.dp-custom-icon-sent:before {
|
|
137
137
|
content: "\f128";
|
|
138
138
|
}
|
|
139
|
-
.dp-custom-icon-
|
|
139
|
+
.dp-custom-icon-sip-address:before {
|
|
140
140
|
content: "\f129";
|
|
141
141
|
}
|
|
142
|
-
.dp-custom-icon-
|
|
142
|
+
.dp-custom-icon-sort:before {
|
|
143
143
|
content: "\f12a";
|
|
144
144
|
}
|
|
145
|
-
.dp-custom-icon-
|
|
145
|
+
.dp-custom-icon-transfer-queue:before {
|
|
146
146
|
content: "\f12b";
|
|
147
147
|
}
|
|
148
|
-
.dp-custom-icon-
|
|
148
|
+
.dp-custom-icon-triangle:before {
|
|
149
149
|
content: "\f12c";
|
|
150
150
|
}
|
|
151
|
-
.dp-custom-icon-warm-
|
|
151
|
+
.dp-custom-icon-warm-add:before {
|
|
152
152
|
content: "\f12d";
|
|
153
153
|
}
|
|
154
|
-
.dp-custom-icon-
|
|
154
|
+
.dp-custom-icon-warm-transfer:before {
|
|
155
155
|
content: "\f12e";
|
|
156
156
|
}
|
|
157
|
+
.dp-custom-icon-webhook:before {
|
|
158
|
+
content: "\f12f";
|
|
159
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __assign, __makeTemplateObject, __rest } from "tslib";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
|
-
import styled from "styled-components";
|
|
4
|
+
import styled, { css } from "styled-components";
|
|
5
5
|
import { match } from "ts-pattern";
|
|
6
6
|
import { Icon, isAnyIcon, isIconProps } from "../Icon";
|
|
7
7
|
import { buttonBaseCss, buttonFill, buttonLarge, buttonLoading, buttonSmall, ButtonText, buttonTiny, getActiveIntent, getDangerIntent, getDisabledIntent, getIntentBase, iconButtonBase, iconButtonSmall, navButtonBase, navButtonSmall, overlayButtonStyle, overlayButtonRightTop, overlayButtonRightBottom, overlayButtonLeftBottom, overlayButtonLeftTop, overlayButtonMiddleBottom, overlayButtonMiddleTop, buttonIconSubsection, ButtonLoaderContainer, } from "./styles";
|
|
@@ -15,7 +15,7 @@ export var Button = styled(forwardRef(function Button(_a, ref) {
|
|
|
15
15
|
return (React.createElement("button", __assign({ type: type }, dpNameProp("Button"), { ref: ref, disabled: disabled || loading }, rest),
|
|
16
16
|
loading && (React.createElement(ButtonLoaderContainer, null,
|
|
17
17
|
React.createElement(Spinner, { size: "small" }))),
|
|
18
|
-
isAnyIcon(icon) ?
|
|
18
|
+
isAnyIcon(icon) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : icon,
|
|
19
19
|
text && React.createElement(ButtonText, null, text),
|
|
20
20
|
isAnyIcon(rightIcon) ? (React.createElement(Icon, { icon: rightIcon })) : isIconProps(rightIcon) ? (React.createElement(Icon, __assign({}, rightIcon))) : (rightIcon)));
|
|
21
21
|
}))(templateObject_1 || (templateObject_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"; }, buttonBaseCss, function (props) { return props.size === "large" && buttonLarge; }, function (props) { return props.size === "small" && buttonSmall; }, function (props) { return props.size === "tiny" && buttonTiny; }, function (props) {
|
|
@@ -26,8 +26,7 @@ export var Button = styled(forwardRef(function Button(_a, ref) {
|
|
|
26
26
|
return props.danger && getDangerIntent({ intent: calculatedIntent });
|
|
27
27
|
}, function (props) {
|
|
28
28
|
var calculatedIntent = calculateIntent(props);
|
|
29
|
-
return
|
|
30
|
-
getActiveIntent({ intent: calculatedIntent, danger: props.danger }));
|
|
29
|
+
return props.active && getActiveIntent({ intent: calculatedIntent, danger: props.danger });
|
|
31
30
|
}, function (props) { return props.loading && buttonLoading; }, function (props) { return props.fill && buttonFill; });
|
|
32
31
|
/**
|
|
33
32
|
* Icon Button
|
|
@@ -51,7 +50,7 @@ export var IconButton = styled(forwardRef(function IconButton(_a, ref) {
|
|
|
51
50
|
export var AvatarButton = styled(forwardRef(function AvatarButton(_a, ref) {
|
|
52
51
|
var avatarSize = _a.avatarSize, _b = _a.type, type = _b === void 0 ? "button" : _b, rest = __rest(_a, ["avatarSize", "type"]);
|
|
53
52
|
return React.createElement(IconButton, __assign({ ref: ref, type: type }, rest));
|
|
54
|
-
}))(
|
|
53
|
+
}))(templateObject_4 || (templateObject_4 = __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) {
|
|
55
54
|
var avatarSize = _a.avatarSize;
|
|
56
55
|
return avatarSize + 4;
|
|
57
56
|
}, function (_a) {
|
|
@@ -77,7 +76,7 @@ export var AvatarButton = styled(forwardRef(function AvatarButton(_a, ref) {
|
|
|
77
76
|
return theme.colors.brandShade60;
|
|
78
77
|
}, function (_a) {
|
|
79
78
|
var active = _a.active, theme = _a.theme;
|
|
80
|
-
return active
|
|
79
|
+
return active && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border: 2px solid ", ";\n "], ["\n border: 2px solid ", ";\n "])), theme.colors.cyan100);
|
|
81
80
|
}, function (_a) {
|
|
82
81
|
var theme = _a.theme;
|
|
83
82
|
return theme.colors.cyan100;
|
|
@@ -97,7 +96,7 @@ export var AvatarButton = styled(forwardRef(function AvatarButton(_a, ref) {
|
|
|
97
96
|
var avatarSize = _a.avatarSize;
|
|
98
97
|
return avatarSize;
|
|
99
98
|
});
|
|
100
|
-
export var AvatarGroupButton = styled(IconButton)(
|
|
99
|
+
export var AvatarGroupButton = styled(IconButton)(templateObject_5 || (templateObject_5 = __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"])));
|
|
101
100
|
/**
|
|
102
101
|
* Anchor component styled like a button
|
|
103
102
|
*/
|
|
@@ -108,10 +107,10 @@ export var AnchorButton = styled(forwardRef(function AnchorButton(_a, ref) {
|
|
|
108
107
|
} }, rest),
|
|
109
108
|
loading && (React.createElement(ButtonLoaderContainer, null,
|
|
110
109
|
React.createElement(Spinner, { size: "small" }))),
|
|
111
|
-
isAnyIcon(icon) ?
|
|
110
|
+
isAnyIcon(icon) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : icon,
|
|
112
111
|
text && React.createElement(ButtonText, null, text),
|
|
113
112
|
isAnyIcon(rightIcon) ? (React.createElement(Icon, { icon: rightIcon })) : isIconProps(rightIcon) ? (React.createElement(Icon, __assign({}, rightIcon))) : (rightIcon)));
|
|
114
|
-
}))(
|
|
113
|
+
}))(templateObject_6 || (templateObject_6 = __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"; }, buttonBaseCss, function (props) { return props.size === "large" && buttonLarge; }, function (props) { return props.size === "small" && buttonSmall; }, function (props) { return props.size === "tiny" && buttonTiny; }, function (props) {
|
|
115
114
|
var calculatedIntent = calculateIntent(props);
|
|
116
115
|
return getIntentBase({ intent: calculatedIntent });
|
|
117
116
|
}, function (props) {
|
|
@@ -132,10 +131,10 @@ export var LabelButton = styled(forwardRef(function LabelButton(_a, ref) {
|
|
|
132
131
|
loading && (React.createElement(ButtonLoaderContainer, null,
|
|
133
132
|
React.createElement(Spinner, { size: "small" }))),
|
|
134
133
|
children,
|
|
135
|
-
isAnyIcon(icon) ?
|
|
134
|
+
isAnyIcon(icon) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : icon,
|
|
136
135
|
text && React.createElement(ButtonText, null, text),
|
|
137
136
|
isAnyIcon(rightIcon) ? (React.createElement(Icon, { icon: rightIcon })) : isIconProps(rightIcon) ? (React.createElement(Icon, __assign({}, rightIcon))) : (rightIcon)));
|
|
138
|
-
}))(
|
|
137
|
+
}))(templateObject_7 || (templateObject_7 = __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"; }, buttonBaseCss, function (props) { return props.size === "large" && buttonLarge; }, function (props) { return props.size === "small" && buttonSmall; }, function (props) { return props.size === "tiny" && buttonTiny; }, function (props) {
|
|
139
138
|
var calculatedIntent = calculateIntent(props);
|
|
140
139
|
return getIntentBase({ intent: calculatedIntent });
|
|
141
140
|
}, function (props) {
|
|
@@ -148,17 +147,17 @@ export var LabelButton = styled(forwardRef(function LabelButton(_a, ref) {
|
|
|
148
147
|
// ${(props) => props.noMinimalUnderline && buttonNoMinimalUnderline} ^^^^
|
|
149
148
|
export var LabelButtonFileInput = styled.input.attrs({
|
|
150
149
|
type: "file",
|
|
151
|
-
})(
|
|
150
|
+
})(templateObject_8 || (templateObject_8 = __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"])));
|
|
152
151
|
export var NavButton = styled(forwardRef(function NavButton(_a, ref) {
|
|
153
152
|
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 = __rest(_a, ["text", "type", "icon", "active", "alignText", "reverse"]);
|
|
154
153
|
return (React.createElement("button", __assign({ type: type, ref: ref }, dpNameProp("NavButton"), rest),
|
|
155
154
|
reverse && (React.createElement(React.Fragment, null,
|
|
156
155
|
text && React.createElement(ButtonText, { overflow: "ellipsis" }, text),
|
|
157
|
-
isAnyIcon(icon) ?
|
|
156
|
+
isAnyIcon(icon) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : icon)),
|
|
158
157
|
!reverse && (React.createElement(React.Fragment, null,
|
|
159
|
-
isAnyIcon(icon) ?
|
|
158
|
+
isAnyIcon(icon) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : icon,
|
|
160
159
|
text && React.createElement(ButtonText, { overflow: "ellipsis" }, text)))));
|
|
161
|
-
}))(
|
|
160
|
+
}))(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n"])), navButtonBase, function (props) {
|
|
162
161
|
var calculatedIntent = calculateIntent(props);
|
|
163
162
|
return getIntentBase({ intent: calculatedIntent });
|
|
164
163
|
}, function (props) { return props.size === "small" && navButtonSmall; }, function (props) {
|
|
@@ -176,7 +175,7 @@ export var OverlayButton = styled(forwardRef(function OverlayButton(_a, ref) {
|
|
|
176
175
|
isAnyIcon(icon) ? (React.createElement(Icon, { icon: icon, size: 10 })) : isIconProps(icon) ? (React.createElement(Icon, __assign({ size: 10 }, icon))) : (icon),
|
|
177
176
|
text && React.createElement(ButtonText, null, text),
|
|
178
177
|
isAnyIcon(rightIcon) ? (React.createElement(Icon, { icon: rightIcon, size: 10 })) : isIconProps(rightIcon) ? (React.createElement(Icon, __assign({ size: 10 }, rightIcon))) : (rightIcon)));
|
|
179
|
-
}))(
|
|
178
|
+
}))(templateObject_10 || (templateObject_10 = __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"; }, overlayButtonStyle, function (props) {
|
|
180
179
|
var _a;
|
|
181
180
|
return match((_a = props.placement) !== null && _a !== void 0 ? _a : "right-top")
|
|
182
181
|
.with("right-top", function () { return overlayButtonRightTop; })
|
|
@@ -192,11 +191,7 @@ export var OverlayButton = styled(forwardRef(function OverlayButton(_a, ref) {
|
|
|
192
191
|
});
|
|
193
192
|
export var calculateIntent = function (_a) {
|
|
194
193
|
var minimal = _a.minimal, noMinimalUnderline = _a.noMinimalUnderline, intent = _a.intent;
|
|
195
|
-
var newIntent = minimal
|
|
196
|
-
? noMinimalUnderline
|
|
197
|
-
? "minimal"
|
|
198
|
-
: "minimalUnderline"
|
|
199
|
-
: intent;
|
|
194
|
+
var newIntent = minimal ? (noMinimalUnderline ? "minimal" : "minimalUnderline") : intent;
|
|
200
195
|
return newIntent !== null && newIntent !== void 0 ? newIntent : "primary";
|
|
201
196
|
};
|
|
202
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
197
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10;
|
|
@@ -7,7 +7,7 @@ export var ButtonText = styled.span(templateObject_2 || (templateObject_2 = __ma
|
|
|
7
7
|
return props.overflow
|
|
8
8
|
? css(templateObject_1 || (templateObject_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;
|
|
9
9
|
});
|
|
10
|
-
export var buttonBaseCss = css(templateObject_3 || (templateObject_3 = __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) {
|
|
10
|
+
export var buttonBaseCss = css(templateObject_3 || (templateObject_3 = __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) {
|
|
11
11
|
var theme = _a.theme;
|
|
12
12
|
return theme.colors.cyan80;
|
|
13
13
|
}, Icon, paragraphStyled.p6, ButtonText);
|
|
@@ -16,7 +16,7 @@ export var buttonSmall = css(templateObject_5 || (templateObject_5 = __makeTempl
|
|
|
16
16
|
export var buttonTiny = css(templateObject_6 || (templateObject_6 = __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"])), ButtonText, paragraphStyled.p11, Icon, paragraphStyled.p11);
|
|
17
17
|
export var iconButtonBase = css(templateObject_7 || (templateObject_7 = __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, paragraphStyled.p1);
|
|
18
18
|
export var iconButtonSmall = css(templateObject_8 || (templateObject_8 = __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"])), ButtonText, paragraphStyled.p11, Icon, paragraphStyled.p8, Icon);
|
|
19
|
-
export var iconMinimalActive = css(templateObject_9 || (templateObject_9 = __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; });
|
|
19
|
+
export var iconMinimalActive = css(templateObject_9 || (templateObject_9 = __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; });
|
|
20
20
|
export var iconButtonMinimal = css(templateObject_10 || (templateObject_10 = __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; }, iconMinimalActive, function (props) { return props.theme.colors.grey20; }, Icon, headingStyles.h0);
|
|
21
21
|
// ------- BASEs ---------
|
|
22
22
|
// Primary ---------
|
|
@@ -36,7 +36,7 @@ var buttonMinimalDisabled = css(templateObject_17 || (templateObject_17 = __make
|
|
|
36
36
|
var theme = _a.theme;
|
|
37
37
|
return theme.colors.grey20;
|
|
38
38
|
});
|
|
39
|
-
export var buttonMinimalActive = css(templateObject_18 || (templateObject_18 = __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) {
|
|
39
|
+
export var buttonMinimalActive = css(templateObject_18 || (templateObject_18 = __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) {
|
|
40
40
|
var theme = _a.theme;
|
|
41
41
|
return theme.colors.brandPrimary;
|
|
42
42
|
});
|
|
@@ -58,7 +58,7 @@ export var buttonMinimalUnderline = css(templateObject_20 || (templateObject_20
|
|
|
58
58
|
// minimalBLock
|
|
59
59
|
var minimalBlockActive = css(templateObject_21 || (templateObject_21 = __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; });
|
|
60
60
|
export var minimalBLock = css(templateObject_22 || (templateObject_22 = __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, headingStyles.h0);
|
|
61
|
-
export var dangerPrimaryActive = css(templateObject_23 || (templateObject_23 = __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; });
|
|
61
|
+
export var dangerPrimaryActive = css(templateObject_23 || (templateObject_23 = __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; });
|
|
62
62
|
export var dangerPrimary = css(templateObject_24 || (templateObject_24 = __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; }, dangerPrimaryActive);
|
|
63
63
|
export var dangerSecondaryTeritaryActive = css(templateObject_25 || (templateObject_25 = __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; });
|
|
64
64
|
export var dangerSecondaryTertiary = css(templateObject_26 || (templateObject_26 = __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; }, dangerSecondaryTeritaryActive, function (props) { return props.theme.colors.red100; }, function (props) { return props.theme.colors.red20; }, function (props) { return props.theme.colors.red100; });
|
|
@@ -137,7 +137,7 @@ export var getDisabledIntent = function (props) {
|
|
|
137
137
|
};
|
|
138
138
|
export var ButtonLoaderContainer = styled.div.attrs(dpNameProp("ButtonLoader"))(templateObject_31 || (templateObject_31 = __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; });
|
|
139
139
|
export var buttonLoading = css(templateObject_32 || (templateObject_32 = __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; });
|
|
140
|
-
export var navButtonBase = css(templateObject_33 || (templateObject_33 = __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:
|
|
140
|
+
export var navButtonBase = css(templateObject_33 || (templateObject_33 = __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, ButtonText, paragraphStyled.p8);
|
|
141
141
|
export var navButtonSmall = css(templateObject_34 || (templateObject_34 = __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"])));
|
|
142
142
|
export var TestOverlayButtonWrapper = styled.div(templateObject_35 || (templateObject_35 = __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) {
|
|
143
143
|
var position = _a.position;
|
|
@@ -60,7 +60,7 @@ export var AppCardInfo = styled(TSpan).attrs({
|
|
|
60
60
|
type: "p5",
|
|
61
61
|
overflow: "ellipsis",
|
|
62
62
|
})(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n color: ", ";\n margin-right: 4px;\n"], ["\n color: ", ";\n margin-right: 4px;\n"])), function (props) { return props.theme.colors.grey80; });
|
|
63
|
-
export var IdTitle = styled.span(templateObject_13 || (templateObject_13 = __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) {
|
|
63
|
+
export var IdTitle = styled.span(templateObject_13 || (templateObject_13 = __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) {
|
|
64
64
|
var theme = _a.theme;
|
|
65
65
|
return theme.colors.grey80;
|
|
66
66
|
});
|
|
@@ -86,7 +86,7 @@ var minimumDropdownWidth = 236;
|
|
|
86
86
|
* </Dropdown>
|
|
87
87
|
*/
|
|
88
88
|
export function Dropdown(_a) {
|
|
89
|
-
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, 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;
|
|
89
|
+
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;
|
|
90
90
|
var _g = __read(useState(false), 2), isOpenState = _g[0], setIsOpenState = _g[1];
|
|
91
91
|
var _h = __read(useState(null), 2), activeItem = _h[0], setActiveItem = _h[1];
|
|
92
92
|
var _j = __read(useState(null), 2), activeSubItem = _j[0], setActiveSubItem = _j[1];
|
|
@@ -233,9 +233,9 @@ export function Dropdown(_a) {
|
|
|
233
233
|
var innerDropdownContent = (React.createElement(React.Fragment, null,
|
|
234
234
|
optionsRenderer &&
|
|
235
235
|
optionsRenderer(options, handleSelectOption, activeItem, activeSubItem, setActiveSubItem, hideIcons),
|
|
236
|
-
!optionsRenderer && options.length > 0 && (React.createElement(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)))),
|
|
236
|
+
!optionsRenderer && options.length > 0 && (React.createElement(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)))),
|
|
237
237
|
isLoading && React.createElement(Spinner, null)));
|
|
238
|
-
var dropdown = (React.createElement(S.DropdownContainer, __assign({ initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { type: "spring", mass: 0.5 }, onKeyDownCapture: handleKeyDown, "data-testid": "dropdown-container", ref: mergeRefs(setPopperElement, dropdownRef), style: styles.popper, containerWidth: containerWidth || refWidth }, attributes.popper),
|
|
238
|
+
var dropdown = (React.createElement(S.DropdownContainer, __assign({ initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { type: "spring", mass: 0.5 }, onKeyDownCapture: handleKeyDown, "data-testid": "dropdown-container", ref: mergeRefs(setPopperElement, dropdownRef), style: styles.popper, containerWidth: containerWidth || refWidth, containerHeight: containerHeight }, attributes.popper),
|
|
239
239
|
stickyHeaderOptions && (React.createElement(React.Fragment, null,
|
|
240
240
|
stickyHeaderOptions.map(dropdownRenderOptions(handleSelectOption, activeItem, activeSubItem, setActiveSubItem, fetchMoreText, autoscrollText, selectedIcon, externalLinkIcon)),
|
|
241
241
|
React.createElement(S.DropdownDividerItem, null))),
|
|
@@ -2,12 +2,15 @@ import { __makeTemplateObject } from "tslib";
|
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { motion } from "framer-motion";
|
|
4
4
|
import { dpNameProp } from "../../utils";
|
|
5
|
-
export var DropdownContainer = styled(motion.div).attrs(dpNameProp("Dropdown"))(templateObject_1 || (templateObject_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) {
|
|
5
|
+
export var DropdownContainer = styled(motion.div).attrs(dpNameProp("Dropdown"))(templateObject_1 || (templateObject_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) {
|
|
6
6
|
var theme = _a.theme;
|
|
7
7
|
return theme.colors.white;
|
|
8
8
|
}, function (_a) {
|
|
9
9
|
var containerWidth = _a.containerWidth;
|
|
10
10
|
return containerWidth !== null && containerWidth !== void 0 ? containerWidth : 200;
|
|
11
|
+
}, function (_a) {
|
|
12
|
+
var containerHeight = _a.containerHeight;
|
|
13
|
+
return (containerHeight ? "height: ".concat(containerHeight, "px;") : "");
|
|
11
14
|
});
|
|
12
15
|
export var DropdownDividerItem = styled.div(templateObject_2 || (templateObject_2 = __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) {
|
|
13
16
|
var theme = _a.theme;
|
|
@@ -22,27 +22,28 @@ export var DP_CUSTOM_ICONS_CODEPOINTS = {
|
|
|
22
22
|
grip: "61717",
|
|
23
23
|
"hang-up": "61718",
|
|
24
24
|
"helping-hand": "61719",
|
|
25
|
-
"im-
|
|
26
|
-
im: "61721",
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"warm-
|
|
47
|
-
|
|
25
|
+
"im-outline": "61720",
|
|
26
|
+
"im-send": "61721",
|
|
27
|
+
im: "61722",
|
|
28
|
+
"inbound-call": "61723",
|
|
29
|
+
"kanban-view": "61724",
|
|
30
|
+
"level-down": "61725",
|
|
31
|
+
"linked-ticket": "61726",
|
|
32
|
+
"location-arrow": "61727",
|
|
33
|
+
merge: "61728",
|
|
34
|
+
merge2: "61729",
|
|
35
|
+
"missed-call": "61730",
|
|
36
|
+
"mobile-rotate": "61731",
|
|
37
|
+
"organization-circle": "61732",
|
|
38
|
+
"outbound-call": "61733",
|
|
39
|
+
read: "61734",
|
|
40
|
+
record: "61735",
|
|
41
|
+
sent: "61736",
|
|
42
|
+
"sip-address": "61737",
|
|
43
|
+
sort: "61738",
|
|
44
|
+
"transfer-queue": "61739",
|
|
45
|
+
triangle: "61740",
|
|
46
|
+
"warm-add": "61741",
|
|
47
|
+
"warm-transfer": "61742",
|
|
48
|
+
webhook: "61743",
|
|
48
49
|
};
|
|
@@ -6,18 +6,21 @@ import { Stack } from "../../layout";
|
|
|
6
6
|
import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons";
|
|
7
7
|
import { Icon } from "../Icon";
|
|
8
8
|
import { dpNameProp } from "../../utils";
|
|
9
|
+
import "tippy.js/dist/border.css";
|
|
9
10
|
var getStyle = function (styleType, theme) {
|
|
10
11
|
var styles = {
|
|
11
12
|
light: {
|
|
12
13
|
backgroundColor: theme.colors.white,
|
|
13
14
|
color: theme.colors.grey100,
|
|
14
15
|
border: "none",
|
|
16
|
+
borderColor: "white",
|
|
15
17
|
boxShadow: "5px 5px 10px rgba(0, 0, 0, 0.1)",
|
|
16
18
|
},
|
|
17
19
|
lightBox: {
|
|
18
20
|
backgroundColor: theme.colors.white,
|
|
19
21
|
color: theme.colors.grey100,
|
|
20
22
|
border: "1px solid ".concat(theme.colors.grey20),
|
|
23
|
+
borderColor: theme.colors.grey20,
|
|
21
24
|
boxShadow: "5px 5px 10px rgba(0, 0, 0, 0.1);",
|
|
22
25
|
},
|
|
23
26
|
// this type is based of the same styling as the modal component
|
|
@@ -25,18 +28,21 @@ var getStyle = function (styleType, theme) {
|
|
|
25
28
|
backgroundColor: theme.colors.white,
|
|
26
29
|
color: theme.colors.grey100,
|
|
27
30
|
border: "1px solid ".concat(theme.colors.grey20),
|
|
31
|
+
borderColor: theme.colors.grey20,
|
|
28
32
|
boxShadow: "0px 4px 16px rgba(0, 0, 0, 0.3)",
|
|
29
33
|
},
|
|
30
34
|
dark: {
|
|
31
35
|
backgroundColor: theme.colors.grey40,
|
|
32
36
|
color: theme.colors.white,
|
|
33
37
|
border: "none",
|
|
38
|
+
borderColor: theme.colors.grey40,
|
|
34
39
|
boxShadow: "5px 5px 10px rgba(0, 0, 0, 0.1)",
|
|
35
40
|
},
|
|
36
41
|
extraDark: {
|
|
37
42
|
backgroundColor: theme.colors.grey100,
|
|
38
43
|
color: theme.colors.white,
|
|
39
44
|
border: "none",
|
|
45
|
+
borderColor: theme.colors.grey100,
|
|
40
46
|
boxShadow: "5px 5px 10px rgba(0, 0, 0, 0.1)",
|
|
41
47
|
},
|
|
42
48
|
};
|
|
@@ -67,7 +73,7 @@ export var Tooltip = styled(function (_a) {
|
|
|
67
73
|
return React.createElement(Tippy, __assign({ arrow: arrow }, props, { plugins: __spreadArray([], __read((onPresEsc ? [escPlugIn] : [])), false) }));
|
|
68
74
|
}).attrs({
|
|
69
75
|
suppressClassNameWarning: true,
|
|
70
|
-
})(templateObject_3 || (templateObject_3 = __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) {
|
|
76
|
+
})(templateObject_3 || (templateObject_3 = __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) {
|
|
71
77
|
var theme = _a.theme, _b = _a.styleType, styleType = _b === void 0 ? "light" : _b;
|
|
72
78
|
return getStyle(styleType, theme).backgroundColor;
|
|
73
79
|
}, function (_a) {
|
|
@@ -101,8 +107,12 @@ export var Tooltip = styled(function (_a) {
|
|
|
101
107
|
var customComponent = _a.customComponent;
|
|
102
108
|
return customComponent && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .tippy-content {\n padding: 0;\n }\n "], ["\n .tippy-content {\n padding: 0;\n }\n "])));
|
|
103
109
|
}, function (_a) {
|
|
104
|
-
var arrowColor = _a.arrowColor, theme = _a.theme;
|
|
105
|
-
return
|
|
110
|
+
var arrowColor = _a.arrowColor, theme = _a.theme, _b = _a.styleType, styleType = _b === void 0 ? "light" : _b;
|
|
111
|
+
return css(templateObject_2 || (templateObject_2 = __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
|
|
112
|
+
? theme.colors[arrowColor]
|
|
113
|
+
: getStyle(styleType, theme).backgroundColor, arrowColor
|
|
114
|
+
? theme.colors[arrowColor]
|
|
115
|
+
: getStyle(styleType, theme).backgroundColor);
|
|
106
116
|
});
|
|
107
117
|
export var TooltipCommonIcon = function (_a) {
|
|
108
118
|
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/esm/lib.js
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deskpro/deskpro-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Deskpro UI components",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/deskpro/deskpro-ui/issues"
|
|
@@ -135,6 +135,7 @@
|
|
|
135
135
|
"fantasticon": "1.2.3",
|
|
136
136
|
"fast-check": "2.21.0",
|
|
137
137
|
"husky": "^7.0.4",
|
|
138
|
+
"identity-obj-proxy": "^3.0.0",
|
|
138
139
|
"jest": "^27.5.1",
|
|
139
140
|
"lint-staged": "^12.3.3",
|
|
140
141
|
"prettier": "^2.5.1",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
declare const Section: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
-
declare type TitleProps = {
|
|
4
|
-
label: React.ReactNode;
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
};
|
|
7
|
-
declare const Title: (props: TitleProps) => JSX.Element;
|
|
8
|
-
declare type ItemProps = {
|
|
9
|
-
label: React.ReactNode | string;
|
|
10
|
-
icon?: React.ReactNode;
|
|
11
|
-
iconColor?: string;
|
|
12
|
-
href?: string;
|
|
13
|
-
onClick?: () => void;
|
|
14
|
-
isActive?: boolean;
|
|
15
|
-
isSelected?: boolean;
|
|
16
|
-
};
|
|
17
|
-
declare const Item: (props: ItemProps) => JSX.Element;
|
|
18
|
-
declare type ItemGroupProps = {
|
|
19
|
-
label: React.ReactNode | string;
|
|
20
|
-
icon?: React.ReactNode;
|
|
21
|
-
iconColor?: string;
|
|
22
|
-
isExpanded?: boolean;
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
onClick: () => void;
|
|
25
|
-
};
|
|
26
|
-
declare const ItemGroup: ({ label, isExpanded, onClick, children, icon, iconColor }: ItemGroupProps) => JSX.Element;
|
|
27
|
-
export { Section, Title, Item, ItemGroup };
|
|
28
|
-
//# sourceMappingURL=NavSidebar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NavSidebar.d.ts","sourceRoot":"","sources":["../../../../src/nav/NavSidebar/NavSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,QAAA,MAAM,OAAO,yGAQZ,CAAC;AAEF,aAAK,UAAU,GAAG;IAChB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,CAAC;AAgCF,QAAA,MAAM,KAAK,UAAW,UAAU,gBAO/B,CAAC;AAEF,aAAK,SAAS,GAAG;IACf,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IAChC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAsCF,QAAA,MAAM,IAAI,UAAW,SAAS,gBAgB7B,CAAC;AAEF,aAAK,cAAc,GAAG;IACpB,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IAChC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAuDF,QAAA,MAAM,SAAS,8DAA+D,cAAc,gBAc3F,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC"}
|