@deskpro/deskpro-ui 0.1.15 → 0.1.16

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.
Files changed (99) hide show
  1. package/README.md +11 -8
  2. package/dist/cjs/components/AttachmentTag/AttachmentTag.d.ts.map +1 -1
  3. package/dist/cjs/components/AttachmentTag/AttachmentTag.js +1 -3
  4. package/dist/cjs/components/Avatar/Avatar.d.ts.map +1 -1
  5. package/dist/cjs/components/Avatar/Avatar.js +5 -11
  6. package/dist/cjs/components/Avatar/AvatarGroup.d.ts +1 -1
  7. package/dist/cjs/components/Avatar/AvatarGroup.d.ts.map +1 -1
  8. package/dist/cjs/components/Button/Button.d.ts +17 -9
  9. package/dist/cjs/components/Button/Button.d.ts.map +1 -1
  10. package/dist/cjs/components/Button/Button.js +93 -27
  11. package/dist/cjs/components/Button/styles.d.ts +6 -5
  12. package/dist/cjs/components/Button/styles.d.ts.map +1 -1
  13. package/dist/cjs/components/Button/styles.js +57 -37
  14. package/dist/cjs/components/Button/types.d.ts +19 -9
  15. package/dist/cjs/components/Button/types.d.ts.map +1 -1
  16. package/dist/cjs/components/Checkbox/Checkbox.d.ts.map +1 -1
  17. package/dist/cjs/components/Checkbox/Checkbox.js +1 -3
  18. package/dist/cjs/components/ColorInput/ColorInput.d.ts.map +1 -1
  19. package/dist/cjs/components/ColorInput/ColorInput.js +4 -8
  20. package/dist/cjs/components/DatePicker/index.d.ts +1 -1
  21. package/dist/cjs/components/DatePicker/index.d.ts.map +1 -1
  22. package/dist/cjs/components/Dialog/Dialog.d.ts +1 -1
  23. package/dist/cjs/components/Dialog/Dialog.d.ts.map +1 -1
  24. package/dist/cjs/components/Dialog/Dialog.js +1 -0
  25. package/dist/cjs/components/Dropdown/Dropdown.d.ts.map +1 -1
  26. package/dist/cjs/components/Dropdown/Dropdown.js +5 -11
  27. package/dist/cjs/components/Dropdown/types.d.ts.map +1 -1
  28. package/dist/cjs/components/Icon/DeskproCustomIcon.d.ts +5 -4
  29. package/dist/cjs/components/Icon/DeskproCustomIcon.d.ts.map +1 -1
  30. package/dist/cjs/components/Icon/DeskproCustomIcon.js +2 -2
  31. package/dist/cjs/components/Icon/HeroIcon.d.ts +2 -2
  32. package/dist/cjs/components/Icon/HeroIcon.d.ts.map +1 -1
  33. package/dist/cjs/components/Icon/Icon.d.ts.map +1 -1
  34. package/dist/cjs/components/Icon/Icon.js +8 -16
  35. package/dist/cjs/components/Infinite/Infinite.d.ts.map +1 -1
  36. package/dist/cjs/components/Infinite/Infinite.js +5 -10
  37. package/dist/cjs/components/Infinite/InfiniteTopBottom.d.ts.map +1 -1
  38. package/dist/cjs/components/Infinite/InfiniteTopBottom.js +4 -8
  39. package/dist/cjs/components/IntlPhoneInput/IntlPhoneInput.d.ts +1 -1
  40. package/dist/cjs/components/IntlPhoneInput/IntlPhoneInput.d.ts.map +1 -1
  41. package/dist/cjs/components/IntlPhoneInput/IntlPhoneInput.js +2 -6
  42. package/dist/cjs/components/LabelTag/Tag.d.ts +1 -1
  43. package/dist/cjs/components/LabelTag/Tag.d.ts.map +1 -1
  44. package/dist/cjs/components/LabelTag/Tag.js +7 -6
  45. package/dist/cjs/components/Menu/Menu.d.ts +8 -16
  46. package/dist/cjs/components/Menu/Menu.d.ts.map +1 -1
  47. package/dist/cjs/components/Menu/Menu.js +2 -2
  48. package/dist/cjs/components/Modal/Modal.d.ts +1 -1
  49. package/dist/cjs/components/Modal/Modal.d.ts.map +1 -1
  50. package/dist/cjs/components/Modal/Modal.js +3 -9
  51. package/dist/cjs/components/OptionTag/OptionTag.d.ts.map +1 -1
  52. package/dist/cjs/components/OptionTag/OptionTag.js +1 -1
  53. package/dist/cjs/components/Pagination/Pagination.d.ts.map +1 -1
  54. package/dist/cjs/components/Pagination/Pagination.js +3 -4
  55. package/dist/cjs/components/Select/Select.d.ts.map +1 -1
  56. package/dist/cjs/components/Select/Select.js +5 -11
  57. package/dist/cjs/components/TabbedSection/Tabs.d.ts.map +1 -1
  58. package/dist/cjs/components/TabbedSection/Tabs.js +2 -2
  59. package/dist/cjs/components/TextArea/TextArea.d.ts.map +1 -1
  60. package/dist/cjs/components/Toggle/Toggle.d.ts.map +1 -1
  61. package/dist/cjs/components/Toggle/Toggle.js +4 -16
  62. package/dist/cjs/components/Tooltip/Tooltip.d.ts +3 -1
  63. package/dist/cjs/components/Tooltip/Tooltip.d.ts.map +1 -1
  64. package/dist/cjs/components/Tooltip/Tooltip.js +21 -2
  65. package/dist/cjs/nav/NavSidebar/NavSidebar.d.ts +1 -1
  66. package/dist/cjs/nav/NavSidebar/NavSidebar.d.ts.map +1 -1
  67. package/dist/cjs/nav/NavSidebar/NavSidebar.js +2 -6
  68. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  69. package/dist/esm/components/AttachmentTag/AttachmentTag.js +1 -3
  70. package/dist/esm/components/Avatar/Avatar.js +5 -11
  71. package/dist/esm/components/Button/Button.js +92 -27
  72. package/dist/esm/components/Button/styles.js +56 -36
  73. package/dist/esm/components/Checkbox/Checkbox.js +1 -3
  74. package/dist/esm/components/ColorInput/ColorInput.js +4 -8
  75. package/dist/esm/components/DatePicker/index.js +1 -1
  76. package/dist/esm/components/Dialog/Dialog.js +1 -0
  77. package/dist/esm/components/Dropdown/Dropdown.js +6 -12
  78. package/dist/esm/components/Icon/DeskproCustomIcon.js +3 -3
  79. package/dist/esm/components/Icon/Icon.js +8 -16
  80. package/dist/esm/components/Infinite/Infinite.js +6 -11
  81. package/dist/esm/components/Infinite/InfiniteTopBottom.js +5 -9
  82. package/dist/esm/components/IntlPhoneInput/IntlPhoneInput.js +3 -7
  83. package/dist/esm/components/LabelTag/Tag.js +7 -6
  84. package/dist/esm/components/Menu/Menu.js +3 -3
  85. package/dist/esm/components/Modal/Modal.js +3 -9
  86. package/dist/esm/components/OptionTag/OptionTag.js +1 -1
  87. package/dist/esm/components/Pagination/Pagination.js +4 -5
  88. package/dist/esm/components/Select/Select.js +5 -11
  89. package/dist/esm/components/TabbedSection/Tabs.js +2 -2
  90. package/dist/esm/components/Toggle/Toggle.js +4 -16
  91. package/dist/esm/components/Tooltip/Tooltip.js +23 -4
  92. package/dist/esm/nav/NavSidebar/NavSidebar.js +2 -6
  93. package/package.json +19 -11
  94. package/.idea/.gitignore +0 -8
  95. package/.idea/deskpro-ui.iml +0 -8
  96. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  97. package/.idea/modules.xml +0 -8
  98. package/.idea/prettier.xml +0 -6
  99. package/.idea/vcs.xml +0 -6
@@ -26,9 +26,7 @@ export var Name = styled(P6)(templateObject_3 || (templateObject_3 = __makeTempl
26
26
  var Size = styled(P8)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n white-space: nowrap;\n"], ["\n white-space: nowrap;\n"])));
27
27
  export var AttachmentTag = forwardRef(function AttachmentTag(_a, ref) {
28
28
  var filename = _a.filename, fileSize = _a.fileSize, icon = _a.icon, onClose = _a.onClose, withClose = _a.withClose, _b = _a.variant, variant = _b === void 0 ? "default" : _b, maxWidth = _a.maxWidth, isLoading = _a.isLoading, rest = __rest(_a, ["filename", "fileSize", "icon", "onClose", "withClose", "variant", "maxWidth", "isLoading"]);
29
- var displayFileSize = fileSize
30
- ? prettyBytes(fileSize, { locale: true })
31
- : undefined;
29
+ var displayFileSize = fileSize ? prettyBytes(fileSize, { locale: true }) : undefined;
32
30
  return (React.createElement(StyledContainer, __assign({}, dpNameProp("AttachmentTag"), { gap: 6, variant: variant, style: { maxWidth: maxWidth } }),
33
31
  React.createElement(AttachmentLink, __assign({ ref: ref }, rest, { title: filename, target: "_blank", rel: "noopener nofollow noreferrer" }),
34
32
  React.createElement(Icon, { icon: icon }),
@@ -107,7 +107,7 @@ export var Avatar = React.memo(function (_a) {
107
107
  }, [imageStyles, props, randomColors.backgroundColor]);
108
108
  var AvatarComponent = useMemo(function () {
109
109
  if (isEmojiAvatarProps(props)) {
110
- return (React.createElement(Emoji, { title: name, size: size, style: props.emojiStyles, rounded: rounded }));
110
+ return React.createElement(Emoji, { title: name, size: size, style: props.emojiStyles, rounded: rounded });
111
111
  }
112
112
  if (isFaIconAvatarProps(props)) {
113
113
  var Component = (React.createElement(FaIcon, { title: name, size: size, className: props.faIconClassName, style: props.iconStyles, rounded: rounded }));
@@ -127,7 +127,7 @@ export var Avatar = React.memo(function (_a) {
127
127
  if (name && initials) {
128
128
  return React.createElement(TagCircleLetter, { name: name, size: size });
129
129
  }
130
- return (React.createElement(TagCircleIcon, { icon: backupIcon, color: themeColor !== null && themeColor !== void 0 ? themeColor : "brandShade", size: size }));
130
+ return React.createElement(TagCircleIcon, { icon: backupIcon, color: themeColor !== null && themeColor !== void 0 ? themeColor : "brandShade", size: size });
131
131
  }
132
132
  else {
133
133
  return React.createElement(Icon, { icon: backupIcon, size: size });
@@ -148,15 +148,9 @@ export var Avatar = React.memo(function (_a) {
148
148
  AvatarComponent,
149
149
  statusColor && showOnlineBadge && (React.createElement(StatusCircle, { themeColor: statusColor, rounded: rounded })))));
150
150
  });
151
- var isEmojiAvatarProps = function (avatarProps) {
152
- return "emojiStyles" in avatarProps;
153
- };
154
- export var isFaIconAvatarProps = function (avatarProps) {
155
- return "faIconClassName" in avatarProps;
156
- };
157
- export var isImageAvatarProps = function (avatarProps) {
158
- return "imageUrl" in avatarProps;
159
- };
151
+ var isEmojiAvatarProps = function (avatarProps) { return "emojiStyles" in avatarProps; };
152
+ export var isFaIconAvatarProps = function (avatarProps) { return "faIconClassName" in avatarProps; };
153
+ export var isImageAvatarProps = function (avatarProps) { return "imageUrl" in avatarProps; };
160
154
  export var AvatarContainer = styled(Stack).attrs({
161
155
  inline: true,
162
156
  align: "center",
@@ -4,7 +4,7 @@ import { forwardRef } from "react";
4
4
  import styled from "styled-components";
5
5
  import { match } from "ts-pattern";
6
6
  import { Icon, isAnyIcon, isIconProps } from "../Icon";
7
- import { buttonBaseCss, buttonFill, buttonLarge, buttonLoading, buttonMinimal, buttonSmall, ButtonText, buttonTiny, getActiveIntent, getDangerIntent, getDisabledIntent, getIntentBase, iconButtonBase, iconButtonMinimal, iconButtonSmall, iconMinimalActive, navButtonBase, navButtonSmall, overlayButtonStyle, overlayButtonRightTop, overlayButtonRightBottom, overlayButtonLeftBottom, overlayButtonLeftTop, overlayButtonMiddleBottom, overlayButtonMiddleTop, buttonNoMinimalUnderline, buttonIconSubsection, ButtonLoaderContainer, } from "./styles";
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";
8
8
  import { dpNameProp } from "../../utils";
9
9
  import { Spinner } from "../Spinner";
10
10
  /**
@@ -15,44 +15,75 @@ 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) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : 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
- }))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n text-align: ", ";\n ", "\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 ", "\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) { return getIntentBase(props); }, function (props) { return props.danger && getDangerIntent(props); }, function (props) { return props.active && getActiveIntent(props); }, function (props) { return props.loading && buttonLoading; }, function (props) { return props.minimal && buttonMinimal; }, function (props) { return props.fill && buttonFill; }, function (props) { return props.noMinimalUnderline && buttonNoMinimalUnderline; });
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) {
22
+ var calculatedIntent = calculateIntent(props);
23
+ return getIntentBase({ intent: calculatedIntent });
24
+ }, function (props) {
25
+ var calculatedIntent = calculateIntent(props);
26
+ return props.danger && getDangerIntent({ intent: calculatedIntent });
27
+ }, function (props) {
28
+ var calculatedIntent = calculateIntent(props);
29
+ return (props.active &&
30
+ getActiveIntent({ intent: calculatedIntent, danger: props.danger }));
31
+ }, function (props) { return props.loading && buttonLoading; }, function (props) { return props.fill && buttonFill; });
22
32
  /**
23
33
  * Icon Button
24
34
  */
25
35
  export var IconButton = styled(forwardRef(function IconButton(_a, ref) {
26
36
  var icon = _a.icon, rightIcon = _a.rightIcon, minimal = _a.minimal, active = _a.active, danger = _a.danger, loading = _a.loading, themeColor = _a.themeColor, noMinimalUnderline = _a.noMinimalUnderline, iconSubsection = _a.iconSubsection, _b = _a.type, type = _b === void 0 ? "button" : _b, disabled = _a.disabled, rest = __rest(_a, ["icon", "rightIcon", "minimal", "active", "danger", "loading", "themeColor", "noMinimalUnderline", "iconSubsection", "type", "disabled"]);
27
- return (React.createElement("button", __assign({}, dpNameProp("IconButton"), { ref: ref, type: type }, rest, { disabled: disabled || loading }),
28
- loading && (React.createElement(ButtonLoaderContainer, null,
29
- React.createElement(Spinner, { size: "small" }))),
30
- isAnyIcon(icon) ? (React.createElement(Icon, { themeColor: themeColor, icon: icon })) : isIconProps(icon) ? (React.createElement(Icon, __assign({ themeColor: themeColor }, icon))) : (icon),
31
- isAnyIcon(rightIcon) ? (React.createElement(Icon, { themeColor: themeColor, icon: rightIcon })) : isIconProps(rightIcon) ? (React.createElement(Icon, __assign({ themeColor: themeColor }, rightIcon))) : (rightIcon)));
32
- }))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 28px;\n max-height: 28px;\n width: 28px;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n ", ";\n ", ";\n"], ["\n height: 28px;\n max-height: 28px;\n width: 28px;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n ", ";\n ", ";\n"])), buttonBaseCss, iconButtonBase, function (props) { return props.size === "small" && iconButtonSmall; }, function (props) { return props.size === "tiny" && buttonTiny; }, function (props) { return props.size === "large" && buttonLarge; }, function (props) { return getIntentBase(props); }, function (props) { return props.minimal && iconButtonMinimal; }, function (props) {
33
- return props.active && props.minimal ? iconMinimalActive : props.active ? getActiveIntent(props) : "";
34
- }, function (props) { return props.danger && getDangerIntent(props); }, function (props) { return props.loading && buttonLoading; }, function (props) { return props.iconSubsection && buttonIconSubsection; });
37
+ return (React.createElement("button", __assign({}, dpNameProp("IconButton"), { ref: ref, type: type }, rest, { disabled: disabled || loading }), loading ? (React.createElement(ButtonLoaderContainer, null,
38
+ React.createElement(Spinner, { size: "small" }))) : isAnyIcon(icon) ? (React.createElement(Icon, { themeColor: themeColor, icon: icon })) : isIconProps(icon) ? (React.createElement(Icon, __assign({ themeColor: themeColor }, icon))) : (icon)));
39
+ }))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 28px;\n max-height: 28px;\n width: 28px;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", ";\n"], ["\n height: 28px;\n max-height: 28px;\n width: 28px;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", ";\n"])), buttonBaseCss, iconButtonBase, function (props) { return props.size === "small" && iconButtonSmall; }, function (props) { return props.size === "tiny" && buttonTiny; }, function (props) { return props.size === "large" && buttonLarge; }, function (props) {
40
+ var calculatedIntent = calculateIntent(props);
41
+ return getIntentBase({
42
+ intent: calculatedIntent === "minimalUnderline" ? "minimal" : calculatedIntent,
43
+ });
44
+ }, function (props) {
45
+ var calculatedIntent = calculateIntent(props);
46
+ return props.danger && getDangerIntent({ intent: calculatedIntent });
47
+ }, function (props) {
48
+ var calculatedIntent = calculateIntent(props);
49
+ return props.active && getActiveIntent({ intent: calculatedIntent });
50
+ }, function (props) { return props.loading && buttonLoading; }, function (props) { return props.iconSubsection && buttonIconSubsection; });
35
51
  export var AvatarButton = styled(forwardRef(function AvatarButton(_a, ref) {
36
52
  var avatarSize = _a.avatarSize, _b = _a.type, type = _b === void 0 ? "button" : _b, rest = __rest(_a, ["avatarSize", "type"]);
37
53
  return React.createElement(IconButton, __assign({ ref: ref, type: type }, rest));
38
- }))(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: ", "px;\n height: ", "px;\n max-height: ", "px;\n min-height: ", "px;\n max-width: ", "px;\n min-width: ", "px;\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 > 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) {
54
+ }))(templateObject_3 || (templateObject_3 = __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 :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 :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) {
39
55
  var avatarSize = _a.avatarSize;
40
- return avatarSize;
56
+ return avatarSize + 4;
41
57
  }, function (_a) {
42
58
  var avatarSize = _a.avatarSize;
43
- return avatarSize;
59
+ return avatarSize + 4;
44
60
  }, function (_a) {
45
61
  var avatarSize = _a.avatarSize;
46
- return avatarSize;
62
+ return avatarSize + 4;
47
63
  }, function (_a) {
48
64
  var avatarSize = _a.avatarSize;
49
- return avatarSize;
65
+ return avatarSize + 4;
50
66
  }, function (_a) {
51
67
  var avatarSize = _a.avatarSize;
52
- return avatarSize;
68
+ return avatarSize + 4;
53
69
  }, function (_a) {
54
70
  var avatarSize = _a.avatarSize;
55
- return avatarSize;
71
+ return avatarSize + 4;
72
+ }, function (_a) {
73
+ var theme = _a.theme;
74
+ return theme.colors.white;
75
+ }, function (_a) {
76
+ var theme = _a.theme;
77
+ return theme.colors.brandShade60;
78
+ }, function (_a) {
79
+ var active = _a.active, theme = _a.theme;
80
+ return active ? "border: 2px solid ".concat(theme.colors.cyan100, ";") : "";
81
+ }, function (_a) {
82
+ var theme = _a.theme;
83
+ return theme.colors.cyan100;
84
+ }, function (_a) {
85
+ var disabled = _a.disabled;
86
+ return (disabled ? "cursor: not-allowed;" : "");
56
87
  }, function (_a) {
57
88
  var avatarSize = _a.avatarSize;
58
89
  return avatarSize;
@@ -77,10 +108,19 @@ export var AnchorButton = styled(forwardRef(function AnchorButton(_a, ref) {
77
108
  } }, rest),
78
109
  loading && (React.createElement(ButtonLoaderContainer, null,
79
110
  React.createElement(Spinner, { size: "small" }))),
80
- isAnyIcon(icon) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : icon,
111
+ isAnyIcon(icon) ? (React.createElement(Icon, { icon: icon })) : isIconProps(icon) ? (React.createElement(Icon, __assign({}, icon))) : (icon),
81
112
  text && React.createElement(ButtonText, null, text),
82
113
  isAnyIcon(rightIcon) ? (React.createElement(Icon, { icon: rightIcon })) : isIconProps(rightIcon) ? (React.createElement(Icon, __assign({}, rightIcon))) : (rightIcon)));
83
- }))(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n text-align: ", ";\n text-decoration: none;\n ", "\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 ", ";\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) { return getIntentBase(props); }, function (props) { return props.danger && getDangerIntent(props); }, function (props) { return props.active && getActiveIntent(props); }, function (props) { return props.minimal && buttonMinimal; }, function (props) { return props.disabled && getDisabledIntent(props); }, function (props) { return props.disabled && getDisabledIntent(props); }, function (props) { return props.fill && buttonFill; }, function (props) { return props.loading && buttonLoading; });
114
+ }))(templateObject_5 || (templateObject_5 = __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
+ var calculatedIntent = calculateIntent(props);
116
+ return getIntentBase({ intent: calculatedIntent });
117
+ }, function (props) {
118
+ var calculatedIntent = calculateIntent(props);
119
+ return props.danger && getDangerIntent({ intent: calculatedIntent });
120
+ }, function (props) {
121
+ var calculatedIntent = calculateIntent(props);
122
+ return props.active && getActiveIntent({ intent: calculatedIntent });
123
+ }, function (props) { return props.disabled && getDisabledIntent(props); }, function (props) { return props.disabled && getDisabledIntent(props); }, function (props) { return props.fill && buttonFill; }, function (props) { return props.loading && buttonLoading; });
84
124
  /**
85
125
  * Label component styled like a button - useful for wrapping around file input for example
86
126
  */
@@ -92,10 +132,20 @@ export var LabelButton = styled(forwardRef(function LabelButton(_a, ref) {
92
132
  loading && (React.createElement(ButtonLoaderContainer, null,
93
133
  React.createElement(Spinner, { size: "small" }))),
94
134
  children,
95
- isAnyIcon(icon) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : icon,
135
+ isAnyIcon(icon) ? (React.createElement(Icon, { icon: icon })) : isIconProps(icon) ? (React.createElement(Icon, __assign({}, icon))) : (icon),
96
136
  text && React.createElement(ButtonText, null, text),
97
137
  isAnyIcon(rightIcon) ? (React.createElement(Icon, { icon: rightIcon })) : isIconProps(rightIcon) ? (React.createElement(Icon, __assign({}, rightIcon))) : (rightIcon)));
98
- }))(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n text-align: ", ";\n ", "\n ", "\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 ", "\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) { return getIntentBase(props); }, function (props) { return props.danger && getDangerIntent(props); }, function (props) { return props.active && getActiveIntent(props); }, function (props) { return props.minimal && buttonMinimal; }, function (props) { return props.noMinimalUnderline && buttonNoMinimalUnderline; }, function (props) { return props.disabled && getDisabledIntent(props); }, function (props) { return props.disabled && getDisabledIntent(props); }, function (props) { return props.fill && buttonFill; }, function (props) { return props.loading && buttonLoading; });
138
+ }))(templateObject_6 || (templateObject_6 = __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
+ var calculatedIntent = calculateIntent(props);
140
+ return getIntentBase({ intent: calculatedIntent });
141
+ }, function (props) {
142
+ var calculatedIntent = calculateIntent(props);
143
+ return props.danger && getDangerIntent({ intent: calculatedIntent });
144
+ }, function (props) {
145
+ var calculatedIntent = calculateIntent(props);
146
+ return props.active && getActiveIntent({ intent: calculatedIntent });
147
+ }, function (props) { return props.disabled && getDisabledIntent(props); }, function (props) { return props.disabled && getDisabledIntent(props); }, function (props) { return props.fill && buttonFill; }, function (props) { return props.loading && buttonLoading; });
148
+ // ${(props) => props.noMinimalUnderline && buttonNoMinimalUnderline} ^^^^
99
149
  export var LabelButtonFileInput = styled.input.attrs({
100
150
  type: "file",
101
151
  })(templateObject_7 || (templateObject_7 = __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"])));
@@ -104,19 +154,25 @@ export var NavButton = styled(forwardRef(function NavButton(_a, ref) {
104
154
  return (React.createElement("button", __assign({ type: type, ref: ref }, dpNameProp("NavButton"), rest),
105
155
  reverse && (React.createElement(React.Fragment, null,
106
156
  text && React.createElement(ButtonText, { overflow: "ellipsis" }, text),
107
- isAnyIcon(icon) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : icon)),
157
+ isAnyIcon(icon) ? (React.createElement(Icon, { icon: icon })) : isIconProps(icon) ? (React.createElement(Icon, __assign({}, icon))) : (icon))),
108
158
  !reverse && (React.createElement(React.Fragment, null,
109
- isAnyIcon(icon) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : icon,
159
+ isAnyIcon(icon) ? (React.createElement(Icon, { icon: icon })) : isIconProps(icon) ? (React.createElement(Icon, __assign({}, icon))) : (icon),
110
160
  text && React.createElement(ButtonText, { overflow: "ellipsis" }, text)))));
111
- }))(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n"])), navButtonBase, function (props) { return getIntentBase(props); }, function (props) { return props.size === "small" && navButtonSmall; }, function (props) { return props.active && getActiveIntent(props); });
161
+ }))(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n"])), navButtonBase, function (props) {
162
+ var calculatedIntent = calculateIntent(props);
163
+ return getIntentBase({ intent: calculatedIntent });
164
+ }, function (props) { return props.size === "small" && navButtonSmall; }, function (props) {
165
+ var calculatedIntent = calculateIntent(props);
166
+ return props.active && getActiveIntent({ intent: calculatedIntent });
167
+ });
112
168
  /**
113
169
  * OverlayButton requires `position: relative` wrapper to overlay unless position set to relative
114
170
  */
115
171
  export var OverlayButton = styled(forwardRef(function OverlayButton(_a, ref) {
116
- var icon = _a.icon, minimal = _a.minimal, active = _a.active, danger = _a.danger, loading = _a.loading, text = _a.text, _b = _a.type, type = _b === void 0 ? "button" : _b, alignText = _a.alignText, placement = _a.placement, rightIcon = _a.rightIcon, rest = __rest(_a, ["icon", "minimal", "active", "danger", "loading", "text", "type", "alignText", "placement", "rightIcon"]);
172
+ var icon = _a.icon, active = _a.active, danger = _a.danger, loading = _a.loading, text = _a.text, _b = _a.type, type = _b === void 0 ? "button" : _b, alignText = _a.alignText, placement = _a.placement, rightIcon = _a.rightIcon, rest = __rest(_a, ["icon", "active", "danger", "loading", "text", "type", "alignText", "placement", "rightIcon"]);
117
173
  return (React.createElement("button", __assign({ type: type }, dpNameProp("OverlayButton"), { ref: ref }, rest),
118
174
  loading && (React.createElement(ButtonLoaderContainer, null,
119
- React.createElement(Spinner, null))),
175
+ React.createElement(Spinner, { size: "small" }))),
120
176
  isAnyIcon(icon) ? (React.createElement(Icon, { icon: icon, size: 10 })) : isIconProps(icon) ? (React.createElement(Icon, __assign({ size: 10 }, icon))) : (icon),
121
177
  text && React.createElement(ButtonText, null, text),
122
178
  isAnyIcon(rightIcon) ? (React.createElement(Icon, { icon: rightIcon, size: 10 })) : isIconProps(rightIcon) ? (React.createElement(Icon, __assign({ size: 10 }, rightIcon))) : (rightIcon)));
@@ -134,4 +190,13 @@ export var OverlayButton = styled(forwardRef(function OverlayButton(_a, ref) {
134
190
  var position = _a.position;
135
191
  return (position ? position : "absolute");
136
192
  });
193
+ export var calculateIntent = function (_a) {
194
+ var minimal = _a.minimal, noMinimalUnderline = _a.noMinimalUnderline, intent = _a.intent;
195
+ var newIntent = minimal
196
+ ? noMinimalUnderline
197
+ ? "minimal"
198
+ : "minimalUnderline"
199
+ : intent;
200
+ return newIntent !== null && newIntent !== void 0 ? newIntent : "primary";
201
+ };
137
202
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
@@ -7,7 +7,10 @@ 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 > * {\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 > * {\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"])), Icon, paragraphStyled.p6, ButtonText);
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) {
11
+ var theme = _a.theme;
12
+ return theme.colors.cyan80;
13
+ }, Icon, paragraphStyled.p6, ButtonText);
11
14
  export var buttonLarge = css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n min-height: 28px;\n min-width: 28px;\n padding: 6px 10px;\n ", " {\n ", ";\n }\n\n ", " {\n ", "\n }\n"], ["\n min-height: 28px;\n min-width: 28px;\n padding: 6px 10px;\n ", " {\n ", ";\n }\n\n ", " {\n ", "\n }\n"])), ButtonText, paragraphStyled.p2, Icon, paragraphStyled.p2);
12
15
  export var buttonSmall = css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n height: 18px;\n min-height: 18px;\n min-width: 18px;\n padding: 3px 8px;\n ", " {\n ", ";\n }\n\n ", " {\n ", "\n }\n"], ["\n height: 18px;\n min-height: 18px;\n min-width: 18px;\n padding: 3px 8px;\n ", " {\n ", ";\n }\n\n ", " {\n ", "\n }\n"])), ButtonText, paragraphStyled.p11, Icon, paragraphStyled.p11);
13
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);
@@ -15,47 +18,53 @@ export var iconButtonBase = css(templateObject_7 || (templateObject_7 = __makeTe
15
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);
16
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"], ["\n color: ", ";\n box-shadow: none;\n background-color: transparent;\n border-color: transparent;\n"])), function (props) { return props.theme.colors.brandShade100; });
17
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
+ // ------- BASEs ---------
22
+ // Primary ---------
18
23
  export var primaryActive = css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n"])), function (props) { return props.theme.colors.cyan100; }, function (props) { return props.theme.colors.cyan100; }, function (props) { return props.theme.colors.brandShade40; });
19
24
  export var buttonPrimaryBase = css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n background-color: ", ";\n box-shadow: 0px 2px 2px ", ";\n color: ", ";\n border: 1px solid ", ";\n\n :hover {\n background-color: ", ";\n border: 1px solid ", ";\n }\n\n :focus,\n :active {\n ", "\n }\n\n :disabled {\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n background-color: ", ";\n }\n"], ["\n background-color: ", ";\n box-shadow: 0px 2px 2px ", ";\n color: ", ";\n border: 1px solid ", ";\n\n :hover {\n background-color: ", ";\n border: 1px solid ", ";\n }\n\n :focus,\n :active {\n ", "\n }\n\n :disabled {\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n background-color: ", ";\n }\n"])), function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.white; }, function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.cyan100; }, function (props) { return props.theme.colors.cyan100; }, primaryActive, function (props) { return props.theme.colors.grey20; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.grey20; });
25
+ // Secondary ---------
20
26
  export var secondaryActive = css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n border-color: ", ";\n background-color: ", ";\n box-shadow: 0px 0px 0px ", ";\n"], ["\n border-color: ", ";\n background-color: ", ";\n box-shadow: 0px 0px 0px ", ";\n"])), function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.brandShade40; });
21
27
  export var buttonSecondaryBase = css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 2px 2px ", ";\n color: ", ";\n\n :hover {\n background-color: ", ";\n border-color: ", ";\n }\n\n :focus,\n :active {\n ", "\n }\n\n :disabled {\n color: ", ";\n box-shadow: 0px 0px 0px ", ";\n border-color: ", ";\n background-color: ", ";\n }\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 2px 2px ", ";\n color: ", ";\n\n :hover {\n background-color: ", ";\n border-color: ", ";\n }\n\n :focus,\n :active {\n ", "\n }\n\n :disabled {\n color: ", ";\n box-shadow: 0px 0px 0px ", ";\n border-color: ", ";\n background-color: ", ";\n }\n"])), function (props) { return props.theme.colors.white; }, function (props) { return props.theme.colors.grey20; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.brandShade20; }, function (props) { return props.theme.colors.brandShade100; }, secondaryActive, function (props) { return props.theme.colors.grey40; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.grey20; }, function (props) { return props.theme.colors.grey5; });
28
+ // Tertiary ---------
22
29
  export var tertiaryActive = css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n border-color: ", ";\n background-color: ", ";\n color: ", ";\n"], ["\n border-color: ", ";\n background-color: ", ";\n color: ", ";\n"])), function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.systemShade30; }, function (props) { return props.theme.colors.brandShade100; });
23
30
  export var buttonTertiaryBase = css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n color: ", ";\n\n :hover {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n }\n\n :focus,\n :active {\n ", "\n }\n\n :disabled {\n color: ", ";\n border-color: ", ";\n background-color: ", ";\n }\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n color: ", ";\n\n :hover {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n }\n\n :focus,\n :active {\n ", "\n }\n\n :disabled {\n color: ", ";\n border-color: ", ";\n background-color: ", ";\n }\n"])), function (props) { return props.theme.colors.systemShade10; }, function (props) { return props.theme.colors.systemShade40; }, function (props) { return props.theme.colors.systemShade80; }, function (props) { return props.theme.colors.brandShade20; }, function (props) { return props.theme.colors.brandShade80; }, function (props) { return props.theme.colors.systemShade80; }, tertiaryActive, function (props) { return props.theme.colors.systemShade40; }, function (props) { return props.theme.colors.systemShade30; }, function (props) { return props.theme.colors.systemShade10; });
24
- export var dangerPrimaryActive = css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n"], ["\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; });
25
- export var dangerPrimary = css(templateObject_18 || (templateObject_18 = __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);
26
- export var dangerSecondaryTeritaryActive = css(templateObject_19 || (templateObject_19 = __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; });
27
- export var dangerSecondaryTertiary = css(templateObject_20 || (templateObject_20 = __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; });
28
- var primaryDisabled = css(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n background-color: ", ";\n cursor: not-allowed;\n"], ["\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n background-color: ", ";\n cursor: not-allowed;\n"])), function (props) { return props.theme.colors.grey20; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.grey20; });
29
- var secondaryDisabled = css(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n color: ", ";\n box-shadow: 0px 0px 0px ", ";\n border-color: ", ";\n background-color: ", ";\n cursor: not-allowed;\n"], ["\n color: ", ";\n box-shadow: 0px 0px 0px ", ";\n border-color: ", ";\n background-color: ", ";\n cursor: not-allowed;\n"])), function (props) { return props.theme.colors.grey40; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.grey20; }, function (props) { return props.theme.colors.grey5; });
30
- var tertiaryDisabled = css(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n color: ", ";\n box-shadow: 0px 0px 0px ", ";\n border-color: ", ";\n background-color: ", ";\n cursor: not-allowed;\n"], ["\n color: ", ";\n box-shadow: 0px 0px 0px ", ";\n border-color: ", ";\n background-color: ", ";\n cursor: not-allowed;\n"])), function (props) { return props.theme.colors.grey40; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.grey20; }, function (props) { return props.theme.colors.grey5; });
31
- var buttonMinimalDisabled = css(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n background: none;\n color: ", ";\n border: none;\n border-bottom: 1px solid ", ";\n :active,\n :hover,\n :focus {\n background: none;\n color: ", ";\n border: none;\n border-bottom: 1px solid ", ";\n cursor: not-allowed;\n }\n"], ["\n background: none;\n color: ", ";\n border: none;\n border-bottom: 1px solid ", ";\n :active,\n :hover,\n :focus {\n background: none;\n color: ", ";\n border: none;\n border-bottom: 1px solid ", ";\n cursor: not-allowed;\n }\n"])), function (_a) {
32
- var theme = _a.theme;
33
- return theme.colors.grey20;
34
- }, function (_a) {
35
- var theme = _a.theme;
36
- return theme.colors.grey20;
37
- }, function (_a) {
31
+ // Minimal ---------
32
+ var buttonMinimalDisabled = css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n background: none;\n color: ", ";\n border: none;\n :active,\n :hover,\n :focus {\n background: none;\n color: ", ";\n border: none;\n cursor: not-allowed;\n }\n"], ["\n background: none;\n color: ", ";\n border: none;\n :active,\n :hover,\n :focus {\n background: none;\n color: ", ";\n border: none;\n cursor: not-allowed;\n }\n"])), function (_a) {
38
33
  var theme = _a.theme;
39
34
  return theme.colors.grey20;
40
35
  }, function (_a) {
41
36
  var theme = _a.theme;
42
37
  return theme.colors.grey20;
43
38
  });
44
- export var buttonMinimal = css(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n background: none;\n border: none;\n box-shadow: none;\n border-radius: 0;\n border-bottom: 1px solid ", ";\n color: ", ";\n padding-left: 2px;\n padding-right: 2px;\n ", "\n\n :active, :hover, :focus {\n background: none;\n color: ", ";\n border: none;\n border-bottom: 1px solid ", ";\n }\n\n :disabled {\n ", "\n }\n"], ["\n background: none;\n border: none;\n box-shadow: none;\n border-radius: 0;\n border-bottom: 1px solid ", ";\n color: ", ";\n padding-left: 2px;\n padding-right: 2px;\n ", "\n\n :active, :hover, :focus {\n background: none;\n color: ", ";\n border: none;\n border-bottom: 1px solid ", ";\n }\n\n :disabled {\n ", "\n }\n"])), function (_a) {
45
- var theme = _a.theme;
46
- return theme.colors.grey40;
47
- }, function (_a) {
39
+ export var buttonMinimal = css(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n background: none;\n border: none;\n box-shadow: none;\n border-radius: 0;\n color: ", ";\n padding-left: 2px;\n padding-right: 2px;\n ", "\n\n :active, :hover, :focus {\n background: none;\n color: ", ";\n border: none;\n }\n\n :disabled {\n ", "\n }\n"], ["\n background: none;\n border: none;\n box-shadow: none;\n border-radius: 0;\n color: ", ";\n padding-left: 2px;\n padding-right: 2px;\n ", "\n\n :active, :hover, :focus {\n background: none;\n color: ", ";\n border: none;\n }\n\n :disabled {\n ", "\n }\n"])), function (_a) {
48
40
  var theme = _a.theme;
49
41
  return theme.colors.grey40;
50
42
  }, headingStyles.h5, function (_a) {
51
43
  var theme = _a.theme;
52
44
  return theme.colors.brandPrimary;
45
+ }, buttonMinimalDisabled);
46
+ // MinimalUnderline
47
+ export var buttonMinimalUnderline = css(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n ", "\n\n border-bottom: 1px solid ", ";\n\n :disabled {\n border-bottom: 1px solid ", ";\n }\n\n :hover,\n :active,\n :focus {\n border-bottom: 1px solid ", ";\n }\n"], ["\n ", "\n\n border-bottom: 1px solid ", ";\n\n :disabled {\n border-bottom: 1px solid ", ";\n }\n\n :hover,\n :active,\n :focus {\n border-bottom: 1px solid ", ";\n }\n"])), buttonMinimal, function (_a) {
48
+ var theme = _a.theme;
49
+ return theme.colors.grey40;
50
+ }, function (_a) {
51
+ var theme = _a.theme;
52
+ return theme.colors.grey20;
53
53
  }, function (_a) {
54
54
  var theme = _a.theme;
55
55
  return theme.colors.brandPrimary;
56
- }, buttonMinimalDisabled);
57
- export var buttonNoMinimalUnderline = css(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n border-bottom: none;\n :hover,\n :active,\n :disabled,\n :focus {\n border-bottom: none !important;\n }\n"], ["\n border-bottom: none;\n :hover,\n :active,\n :disabled,\n :focus {\n border-bottom: none !important;\n }\n"])));
58
- export var buttonFill = css(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n width: 100%;\n & > * {\n flex: 1;\n }\n\n ", " {\n width: 100%;\n }\n"], ["\n width: 100%;\n & > * {\n flex: 1;\n }\n\n ", " {\n width: 100%;\n }\n"])), ButtonText);
56
+ });
57
+ // minimalBLock
58
+ var minimalBlockActive = css(templateObject_20 || (templateObject_20 = __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; });
59
+ export var minimalBLock = css(templateObject_21 || (templateObject_21 = __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);
60
+ export var dangerPrimaryActive = css(templateObject_22 || (templateObject_22 = __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 dangerPrimary = css(templateObject_23 || (templateObject_23 = __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);
62
+ export var dangerSecondaryTeritaryActive = css(templateObject_24 || (templateObject_24 = __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; });
63
+ export var dangerSecondaryTertiary = css(templateObject_25 || (templateObject_25 = __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; });
64
+ var primaryDisabled = css(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n background-color: ", ";\n cursor: not-allowed;\n"], ["\n border: 1px solid ", ";\n box-shadow: 0px 0px 0px ", ";\n background-color: ", ";\n cursor: not-allowed;\n"])), function (props) { return props.theme.colors.grey20; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.grey20; });
65
+ var secondaryDisabled = css(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n color: ", ";\n box-shadow: 0px 0px 0px ", ";\n border-color: ", ";\n background-color: ", ";\n cursor: not-allowed;\n"], ["\n color: ", ";\n box-shadow: 0px 0px 0px ", ";\n border-color: ", ";\n background-color: ", ";\n cursor: not-allowed;\n"])), function (props) { return props.theme.colors.grey40; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.grey20; }, function (props) { return props.theme.colors.grey5; });
66
+ var tertiaryDisabled = css(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n color: ", ";\n box-shadow: 0px 0px 0px ", ";\n border-color: ", ";\n background-color: ", ";\n cursor: not-allowed;\n"], ["\n color: ", ";\n box-shadow: 0px 0px 0px ", ";\n border-color: ", ";\n background-color: ", ";\n cursor: not-allowed;\n"])), function (props) { return props.theme.colors.grey40; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.grey20; }, function (props) { return props.theme.colors.grey5; });
67
+ export var buttonFill = css(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n width: 100%;\n & > * {\n flex: 1;\n }\n\n ", " {\n width: 100%;\n }\n"], ["\n width: 100%;\n & > * {\n flex: 1;\n }\n\n ", " {\n width: 100%;\n }\n"])), ButtonText);
59
68
  export function getIntentBase(props) {
60
69
  switch (props.intent) {
61
70
  case undefined:
@@ -65,6 +74,12 @@ export function getIntentBase(props) {
65
74
  return buttonSecondaryBase;
66
75
  case "tertiary":
67
76
  return buttonTertiaryBase;
77
+ case "minimal":
78
+ return buttonMinimal;
79
+ case "minimalUnderline":
80
+ return buttonMinimalUnderline;
81
+ case "minimalBlock":
82
+ return minimalBLock;
68
83
  }
69
84
  }
70
85
  export function getDangerIntent(props) {
@@ -96,6 +111,8 @@ export function getActiveIntent(props) {
96
111
  return secondaryActive;
97
112
  case "tertiary":
98
113
  return tertiaryActive;
114
+ case "minimalBlock":
115
+ return minimalBlockActive;
99
116
  }
100
117
  }
101
118
  export var getDisabledIntent = function (props) {
@@ -110,22 +127,25 @@ export var getDisabledIntent = function (props) {
110
127
  return secondaryDisabled;
111
128
  case "tertiary":
112
129
  return tertiaryDisabled;
130
+ case "minimal":
131
+ case "minimalUnderline":
132
+ return buttonMinimalDisabled;
113
133
  }
114
134
  };
115
- export var ButtonLoaderContainer = styled.div.attrs(dpNameProp("ButtonLoader"))(templateObject_28 || (templateObject_28 = __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; });
116
- export var buttonLoading = css(templateObject_29 || (templateObject_29 = __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; });
117
- export var navButtonBase = css(templateObject_30 || (templateObject_30 = __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: center;\n\n & > :not(:last-child) {\n margin-bottom: 4px;\n }\n\n :disabled {\n cursor: not-allowed;\n }\n\n > * {\n flex: 0;\n }\n\n ", " {\n font-size: 20px;\n flex: 0 0 auto;\n }\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 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: center;\n\n & > :not(:last-child) {\n margin-bottom: 4px;\n }\n\n :disabled {\n cursor: not-allowed;\n }\n\n > * {\n flex: 0;\n }\n\n ", " {\n font-size: 20px;\n flex: 0 0 auto;\n }\n\n ", " {\n ", "\n flex: 0 1 auto;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"])), Icon, ButtonText, paragraphStyled.p8);
118
- export var navButtonSmall = css(templateObject_31 || (templateObject_31 = __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"])));
119
- export var TestOverlayButtonWrapper = styled.div(templateObject_32 || (templateObject_32 = __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) {
135
+ export var ButtonLoaderContainer = styled.div.attrs(dpNameProp("ButtonLoader"))(templateObject_30 || (templateObject_30 = __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; });
136
+ export var buttonLoading = css(templateObject_31 || (templateObject_31 = __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; });
137
+ export var navButtonBase = css(templateObject_32 || (templateObject_32 = __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: center;\n\n & > :not(:last-child) {\n margin-bottom: 4px;\n }\n\n :disabled {\n cursor: not-allowed;\n }\n\n > * {\n flex: 0;\n }\n\n ", " {\n font-size: 20px;\n flex: 0 0 auto;\n }\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 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: center;\n\n & > :not(:last-child) {\n margin-bottom: 4px;\n }\n\n :disabled {\n cursor: not-allowed;\n }\n\n > * {\n flex: 0;\n }\n\n ", " {\n font-size: 20px;\n flex: 0 0 auto;\n }\n\n ", " {\n ", "\n flex: 0 1 auto;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n"])), Icon, ButtonText, paragraphStyled.p8);
138
+ export var navButtonSmall = css(templateObject_33 || (templateObject_33 = __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"])));
139
+ export var TestOverlayButtonWrapper = styled.div(templateObject_34 || (templateObject_34 = __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) {
120
140
  var position = _a.position;
121
141
  return (position ? position : "unset");
122
142
  });
123
- export var overlayButtonStyle = css(templateObject_33 || (templateObject_33 = __makeTemplateObject(["\n transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out,\n background-color 0.2s ease-in-out, fill 0.2s ease-in-out;\n align-items: center;\n background-color: ", ";\n\n cursor: pointer;\n display: flex;\n justify-content: center;\n min-width: 25px;\n height: 22px;\n border-color: ", ";\n border-style: solid;\n color: ", ";\n\n &:hover {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n\n ", " {\n color: ", ";\n }\n }\n\n &:active {\n color: ", ";\n border-color: ", ";\n background-color: ", ";\n box-shadow: 0px 0px 0px ", ";\n\n ", " {\n color: ", ";\n }\n }\n\n & > :not(:last-child) {\n margin-right: 7px;\n }\n"], ["\n transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out,\n background-color 0.2s ease-in-out, fill 0.2s ease-in-out;\n align-items: center;\n background-color: ", ";\n\n cursor: pointer;\n display: flex;\n justify-content: center;\n min-width: 25px;\n height: 22px;\n border-color: ", ";\n border-style: solid;\n color: ", ";\n\n &:hover {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n\n ", " {\n color: ", ";\n }\n }\n\n &:active {\n color: ", ";\n border-color: ", ";\n background-color: ", ";\n box-shadow: 0px 0px 0px ", ";\n\n ", " {\n color: ", ";\n }\n }\n\n & > :not(:last-child) {\n margin-right: 7px;\n }\n"])), function (props) { return props.theme.colors.white; }, function (props) { return props.theme.colors.grey40; }, function (props) { return props.theme.colors.grey80; }, function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.brandShade10; }, function (props) { return props.theme.colors.brandShade100; }, Icon, function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.brandShade40; }, Icon, function (props) { return props.theme.colors.brandShade100; });
124
- export var overlayButtonRightTop = css(templateObject_34 || (templateObject_34 = __makeTemplateObject(["\n border-bottom-left-radius: 5px;\n border-bottom-width: 1px;\n border-left-width: 1px;\n\n border-top: 0;\n border-right: 0;\n top: 0;\n right: 0;\n"], ["\n border-bottom-left-radius: 5px;\n border-bottom-width: 1px;\n border-left-width: 1px;\n\n border-top: 0;\n border-right: 0;\n top: 0;\n right: 0;\n"])));
125
- export var overlayButtonRightBottom = css(templateObject_35 || (templateObject_35 = __makeTemplateObject(["\n border-top-left-radius: 5px;\n border-top-width: 1px;\n border-left-width: 1px;\n border-bottom: 0;\n border-right: 0;\n bottom: 0;\n right: 0;\n"], ["\n border-top-left-radius: 5px;\n border-top-width: 1px;\n border-left-width: 1px;\n border-bottom: 0;\n border-right: 0;\n bottom: 0;\n right: 0;\n"])));
126
- export var overlayButtonLeftTop = css(templateObject_36 || (templateObject_36 = __makeTemplateObject(["\n border-bottom-right-radius: 5px;\n border-bottom-width: 1px;\n border-right-width: 1px;\n border-left: 0;\n border-top: 0;\n top: 0;\n left: 0;\n"], ["\n border-bottom-right-radius: 5px;\n border-bottom-width: 1px;\n border-right-width: 1px;\n border-left: 0;\n border-top: 0;\n top: 0;\n left: 0;\n"])));
127
- export var overlayButtonLeftBottom = css(templateObject_37 || (templateObject_37 = __makeTemplateObject(["\n border-top-right-radius: 5px;\n border-top-width: 1px;\n border-right-width: 1px;\n border-left: 0;\n border-bottom: 0;\n top: 0;\n left: 0;\n"], ["\n border-top-right-radius: 5px;\n border-top-width: 1px;\n border-right-width: 1px;\n border-left: 0;\n border-bottom: 0;\n top: 0;\n left: 0;\n"])));
128
- export var overlayButtonMiddleBottom = css(templateObject_38 || (templateObject_38 = __makeTemplateObject(["\n border-radius: 5px;\n border-width: 1px;\n bottom: 10px;\n left: 50%;\n transform: translateX(-50%);\n white-space: nowrap;\n"], ["\n border-radius: 5px;\n border-width: 1px;\n bottom: 10px;\n left: 50%;\n transform: translateX(-50%);\n white-space: nowrap;\n"])));
129
- export var overlayButtonMiddleTop = css(templateObject_39 || (templateObject_39 = __makeTemplateObject(["\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n border-bottom-width: 1px;\n border-right-width: 1px;\n border-left-width: 1px;\n border-top: 0;\n top: 0;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n"], ["\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n border-bottom-width: 1px;\n border-right-width: 1px;\n border-left-width: 1px;\n border-top: 0;\n top: 0;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n"])));
130
- export var buttonIconSubsection = css(templateObject_40 || (templateObject_40 = __makeTemplateObject(["\n min-width: 18px;\n width: 18px;\n ", " {\n width: 12px;\n height: 12px;\n }\n"], ["\n min-width: 18px;\n width: 18px;\n ", " {\n width: 12px;\n height: 12px;\n }\n"])), Icon);
131
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35, templateObject_36, templateObject_37, templateObject_38, templateObject_39, templateObject_40;
143
+ export var overlayButtonStyle = css(templateObject_35 || (templateObject_35 = __makeTemplateObject(["\n transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out,\n background-color 0.2s ease-in-out, fill 0.2s ease-in-out;\n align-items: center;\n background-color: ", ";\n\n cursor: pointer;\n display: flex;\n justify-content: center;\n min-width: 25px;\n height: 22px;\n border-color: ", ";\n border-style: solid;\n color: ", ";\n\n &:hover {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n\n ", " {\n color: ", ";\n }\n }\n\n &:active {\n color: ", ";\n border-color: ", ";\n background-color: ", ";\n box-shadow: 0px 0px 0px ", ";\n\n ", " {\n color: ", ";\n }\n }\n\n & > :not(:last-child) {\n margin-right: 7px;\n }\n"], ["\n transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out,\n background-color 0.2s ease-in-out, fill 0.2s ease-in-out;\n align-items: center;\n background-color: ", ";\n\n cursor: pointer;\n display: flex;\n justify-content: center;\n min-width: 25px;\n height: 22px;\n border-color: ", ";\n border-style: solid;\n color: ", ";\n\n &:hover {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n\n ", " {\n color: ", ";\n }\n }\n\n &:active {\n color: ", ";\n border-color: ", ";\n background-color: ", ";\n box-shadow: 0px 0px 0px ", ";\n\n ", " {\n color: ", ";\n }\n }\n\n & > :not(:last-child) {\n margin-right: 7px;\n }\n"])), function (props) { return props.theme.colors.white; }, function (props) { return props.theme.colors.grey40; }, function (props) { return props.theme.colors.grey80; }, function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.brandShade10; }, function (props) { return props.theme.colors.brandShade100; }, Icon, function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.brandShade100; }, function (props) { return props.theme.colors.brandShade40; }, function (props) { return props.theme.colors.brandShade40; }, Icon, function (props) { return props.theme.colors.brandShade100; });
144
+ export var overlayButtonRightTop = css(templateObject_36 || (templateObject_36 = __makeTemplateObject(["\n border-bottom-left-radius: 5px;\n border-bottom-width: 1px;\n border-left-width: 1px;\n\n border-top: 0;\n border-right: 0;\n top: 0;\n right: 0;\n"], ["\n border-bottom-left-radius: 5px;\n border-bottom-width: 1px;\n border-left-width: 1px;\n\n border-top: 0;\n border-right: 0;\n top: 0;\n right: 0;\n"])));
145
+ export var overlayButtonRightBottom = css(templateObject_37 || (templateObject_37 = __makeTemplateObject(["\n border-top-left-radius: 5px;\n border-top-width: 1px;\n border-left-width: 1px;\n border-bottom: 0;\n border-right: 0;\n bottom: 0;\n right: 0;\n"], ["\n border-top-left-radius: 5px;\n border-top-width: 1px;\n border-left-width: 1px;\n border-bottom: 0;\n border-right: 0;\n bottom: 0;\n right: 0;\n"])));
146
+ export var overlayButtonLeftTop = css(templateObject_38 || (templateObject_38 = __makeTemplateObject(["\n border-bottom-right-radius: 5px;\n border-bottom-width: 1px;\n border-right-width: 1px;\n border-left: 0;\n border-top: 0;\n top: 0;\n left: 0;\n"], ["\n border-bottom-right-radius: 5px;\n border-bottom-width: 1px;\n border-right-width: 1px;\n border-left: 0;\n border-top: 0;\n top: 0;\n left: 0;\n"])));
147
+ export var overlayButtonLeftBottom = css(templateObject_39 || (templateObject_39 = __makeTemplateObject(["\n border-top-right-radius: 5px;\n border-top-width: 1px;\n border-right-width: 1px;\n border-left: 0;\n border-bottom: 0;\n top: 0;\n left: 0;\n"], ["\n border-top-right-radius: 5px;\n border-top-width: 1px;\n border-right-width: 1px;\n border-left: 0;\n border-bottom: 0;\n top: 0;\n left: 0;\n"])));
148
+ export var overlayButtonMiddleBottom = css(templateObject_40 || (templateObject_40 = __makeTemplateObject(["\n border-radius: 5px;\n border-width: 1px;\n bottom: 10px;\n left: 50%;\n transform: translateX(-50%);\n white-space: nowrap;\n"], ["\n border-radius: 5px;\n border-width: 1px;\n bottom: 10px;\n left: 50%;\n transform: translateX(-50%);\n white-space: nowrap;\n"])));
149
+ export var overlayButtonMiddleTop = css(templateObject_41 || (templateObject_41 = __makeTemplateObject(["\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n border-bottom-width: 1px;\n border-right-width: 1px;\n border-left-width: 1px;\n border-top: 0;\n top: 0;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n"], ["\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n border-bottom-width: 1px;\n border-right-width: 1px;\n border-left-width: 1px;\n border-top: 0;\n top: 0;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n"])));
150
+ export var buttonIconSubsection = css(templateObject_42 || (templateObject_42 = __makeTemplateObject(["\n min-width: 18px;\n width: 18px;\n ", " {\n width: 12px;\n height: 12px;\n }\n"], ["\n min-width: 18px;\n width: 18px;\n ", " {\n width: 12px;\n height: 12px;\n }\n"])), Icon);
151
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35, templateObject_36, templateObject_37, templateObject_38, templateObject_39, templateObject_40, templateObject_41, templateObject_42;
@@ -14,9 +14,7 @@ var StyledCheckbox = styled.span(templateObject_2 || (templateObject_2 = __makeT
14
14
  : props.checked
15
15
  ? props.theme.colors.brandPrimary
16
16
  : props.theme.colors.white;
17
- }, function (props) { return (props.disabled ? "not-allowed" : "pointer"); }, function (props) {
18
- return !props.checked && "solid 1px ".concat(props.theme.colors.grey20);
19
- }, function (props) { return props.size - 3; }, function (props) { return props.size - 3; }, function (_a) {
17
+ }, function (props) { return (props.disabled ? "not-allowed" : "pointer"); }, function (props) { return !props.checked && "solid 1px ".concat(props.theme.colors.grey20); }, function (props) { return props.size - 3; }, function (props) { return props.size - 3; }, function (_a) {
20
18
  var theme = _a.theme;
21
19
  return theme.colors.white;
22
20
  }, function (props) { return (props.checked ? "visible" : "hidden"); }, function (_a) {
@@ -30,8 +30,7 @@ export var ColorInput = styled(forwardRef(function Label(_a, ref) {
30
30
  useLayoutEffect(function () {
31
31
  if (leftElementRef.current) {
32
32
  var clientWidth = leftElementRef.current.clientWidth;
33
- if (leftPadding === undefined ||
34
- Math.abs(clientWidth - leftPadding) > 2) {
33
+ if (leftPadding === undefined || Math.abs(clientWidth - leftPadding) > 2) {
35
34
  setLeftPadding(clientWidth);
36
35
  }
37
36
  }
@@ -40,8 +39,7 @@ export var ColorInput = styled(forwardRef(function Label(_a, ref) {
40
39
  }
41
40
  if (rightElementRef.current) {
42
41
  var clientWidth = rightElementRef.current.clientWidth;
43
- if (rightPadding === undefined ||
44
- Math.abs(clientWidth - rightPadding) > 2) {
42
+ if (rightPadding === undefined || Math.abs(clientWidth - rightPadding) > 2) {
45
43
  setRightPadding(clientWidth);
46
44
  }
47
45
  }
@@ -96,8 +94,7 @@ export var ColorInputWithDisplay = styled(forwardRef(function Label(_a, ref) {
96
94
  useLayoutEffect(function () {
97
95
  if (leftElementRef.current) {
98
96
  var clientWidth = leftElementRef.current.clientWidth;
99
- if (leftPadding === undefined ||
100
- Math.abs(clientWidth - leftPadding) > 2) {
97
+ if (leftPadding === undefined || Math.abs(clientWidth - leftPadding) > 2) {
101
98
  setLeftPadding(clientWidth);
102
99
  }
103
100
  }
@@ -106,8 +103,7 @@ export var ColorInputWithDisplay = styled(forwardRef(function Label(_a, ref) {
106
103
  }
107
104
  if (rightElementRef.current) {
108
105
  var clientWidth = rightElementRef.current.clientWidth;
109
- if (rightPadding === undefined ||
110
- Math.abs(clientWidth - rightPadding) > 2) {
106
+ if (rightPadding === undefined || Math.abs(clientWidth - rightPadding) > 2) {
111
107
  setRightPadding(clientWidth);
112
108
  }
113
109
  }
@@ -1,2 +1,2 @@
1
1
  export * from "./DatePicker";
2
- export { DatePickerInput, LabelAction as DatePickerLabelAction, } from "./styles";
2
+ export { DatePickerInput, LabelAction as DatePickerLabelAction } from "./styles";
@@ -11,6 +11,7 @@ import { dpNameProp } from "../../utils";
11
11
  var DialogOverlayContainer = styled(motion.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 100%;\n width: 100%;\n pointer-events: none;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 100%;\n width: 100%;\n pointer-events: none;\n"])));
12
12
  var DialogContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n padding-bottom: 20px;\n pointer-events: all;\n width: ", ";\n max-height: 80vh;\n box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.15);\n z-index: 20;\n"], ["\n background-color: ", ";\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n padding-bottom: 20px;\n pointer-events: all;\n width: ", ";\n max-height: 80vh;\n box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.15);\n z-index: 20;\n"])), function (props) { return props.theme.colors.white; }, function (props) {
13
13
  return match(props.size)
14
+ .with("small", function () { return "350px"; })
14
15
  .with("medium", function () { return "500px"; })
15
16
  .with("large", function () { return "700px"; })
16
17
  .with("xLarge", function () { return "840px"; })