@deskpro/deskpro-ui 0.1.15 → 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.
Files changed (202) hide show
  1. package/README.md +11 -8
  2. package/dist/cjs/components/AttachmentTag/AttachmentTag.d.ts +0 -1
  3. package/dist/cjs/components/AttachmentTag/AttachmentTag.d.ts.map +1 -1
  4. package/dist/cjs/components/AttachmentTag/AttachmentTag.js +1 -3
  5. package/dist/cjs/components/AttachmentTag/LoadingAttachment.d.ts +0 -1
  6. package/dist/cjs/components/AttachmentTag/LoadingAttachment.d.ts.map +1 -1
  7. package/dist/cjs/components/Avatar/Avatar.d.ts.map +1 -1
  8. package/dist/cjs/components/Avatar/Avatar.js +5 -11
  9. package/dist/cjs/components/Avatar/AvatarGroup.d.ts +1 -2
  10. package/dist/cjs/components/Avatar/AvatarGroup.d.ts.map +1 -1
  11. package/dist/cjs/components/Button/Button.d.ts +18 -11
  12. package/dist/cjs/components/Button/Button.d.ts.map +1 -1
  13. package/dist/cjs/components/Button/Button.js +88 -27
  14. package/dist/cjs/components/Button/styles.d.ts +7 -5
  15. package/dist/cjs/components/Button/styles.d.ts.map +1 -1
  16. package/dist/cjs/components/Button/styles.js +60 -37
  17. package/dist/cjs/components/Button/types.d.ts +19 -10
  18. package/dist/cjs/components/Button/types.d.ts.map +1 -1
  19. package/dist/cjs/components/CCUserTag/CCUserTag.d.ts +0 -1
  20. package/dist/cjs/components/CCUserTag/CCUserTag.d.ts.map +1 -1
  21. package/dist/cjs/components/CCUserTag/CCUserTag.js +9 -11
  22. package/dist/cjs/components/Card/AppCard.d.ts +0 -1
  23. package/dist/cjs/components/Card/AppCard.d.ts.map +1 -1
  24. package/dist/cjs/components/Card/AppCard.js +1 -1
  25. package/dist/cjs/components/Card/CardKanban.d.ts +0 -1
  26. package/dist/cjs/components/Card/CardKanban.d.ts.map +1 -1
  27. package/dist/cjs/components/Card/CardList.d.ts +0 -1
  28. package/dist/cjs/components/Card/CardList.d.ts.map +1 -1
  29. package/dist/cjs/components/Card/RowCard.d.ts +0 -1
  30. package/dist/cjs/components/Card/RowCard.d.ts.map +1 -1
  31. package/dist/cjs/components/Checkbox/Checkbox.d.ts +0 -1
  32. package/dist/cjs/components/Checkbox/Checkbox.d.ts.map +1 -1
  33. package/dist/cjs/components/Checkbox/Checkbox.js +1 -3
  34. package/dist/cjs/components/ColorInput/ColorInput.d.ts +0 -1
  35. package/dist/cjs/components/ColorInput/ColorInput.d.ts.map +1 -1
  36. package/dist/cjs/components/ColorInput/ColorInput.js +4 -8
  37. package/dist/cjs/components/DatePicker/DatePicker.d.ts +0 -1
  38. package/dist/cjs/components/DatePicker/DatePicker.d.ts.map +1 -1
  39. package/dist/cjs/components/DatePicker/index.d.ts +1 -1
  40. package/dist/cjs/components/DatePicker/index.d.ts.map +1 -1
  41. package/dist/cjs/components/DatePicker/styles.d.ts +0 -1
  42. package/dist/cjs/components/DatePicker/styles.d.ts.map +1 -1
  43. package/dist/cjs/components/Dialog/Dialog.d.ts +1 -1
  44. package/dist/cjs/components/Dialog/Dialog.d.ts.map +1 -1
  45. package/dist/cjs/components/Dialog/Dialog.js +1 -0
  46. package/dist/cjs/components/Dropdown/Dropdown.d.ts +1 -2
  47. package/dist/cjs/components/Dropdown/Dropdown.d.ts.map +1 -1
  48. package/dist/cjs/components/Dropdown/Dropdown.js +8 -14
  49. package/dist/cjs/components/Dropdown/DropdownResetButton.d.ts +0 -2
  50. package/dist/cjs/components/Dropdown/DropdownResetButton.d.ts.map +1 -1
  51. package/dist/cjs/components/Dropdown/styles.d.ts +1 -2
  52. package/dist/cjs/components/Dropdown/styles.d.ts.map +1 -1
  53. package/dist/cjs/components/Dropdown/styles.js +4 -1
  54. package/dist/cjs/components/Dropdown/types.d.ts +3 -2
  55. package/dist/cjs/components/Dropdown/types.d.ts.map +1 -1
  56. package/dist/cjs/components/FlagImg/FlagImg.d.ts +0 -1
  57. package/dist/cjs/components/FlagImg/FlagImg.d.ts.map +1 -1
  58. package/dist/cjs/components/Formik/FormikFastField.d.ts +0 -1
  59. package/dist/cjs/components/Formik/FormikFastField.d.ts.map +1 -1
  60. package/dist/cjs/components/Icon/DeskproCustomIcon.d.ts +4 -4
  61. package/dist/cjs/components/Icon/DeskproCustomIcon.d.ts.map +1 -1
  62. package/dist/cjs/components/Icon/DeskproCustomIcon.js +2 -2
  63. package/dist/cjs/components/Icon/HeroIcon.d.ts +2 -3
  64. package/dist/cjs/components/Icon/HeroIcon.d.ts.map +1 -1
  65. package/dist/cjs/components/Icon/Icon.d.ts +0 -2
  66. package/dist/cjs/components/Icon/Icon.d.ts.map +1 -1
  67. package/dist/cjs/components/Icon/Icon.js +8 -16
  68. package/dist/cjs/components/Icon/customIconsCodegen.d.ts +1 -1
  69. package/dist/cjs/components/Icon/customIconsCodegen.d.ts.map +1 -1
  70. package/dist/cjs/components/Icon/customIconsCodegen.js +24 -23
  71. package/dist/cjs/components/Infinite/Infinite.d.ts.map +1 -1
  72. package/dist/cjs/components/Infinite/Infinite.js +5 -10
  73. package/dist/cjs/components/Infinite/InfiniteTopBottom.d.ts.map +1 -1
  74. package/dist/cjs/components/Infinite/InfiniteTopBottom.js +4 -8
  75. package/dist/cjs/components/Infinite/ObservedDiv.d.ts +0 -1
  76. package/dist/cjs/components/Infinite/ObservedDiv.d.ts.map +1 -1
  77. package/dist/cjs/components/Input/Input.d.ts +0 -1
  78. package/dist/cjs/components/Input/Input.d.ts.map +1 -1
  79. package/dist/cjs/components/IntlPhoneInput/IntlPhoneInput.d.ts +1 -1
  80. package/dist/cjs/components/IntlPhoneInput/IntlPhoneInput.d.ts.map +1 -1
  81. package/dist/cjs/components/IntlPhoneInput/IntlPhoneInput.js +2 -6
  82. package/dist/cjs/components/Label/Label.d.ts +0 -1
  83. package/dist/cjs/components/Label/Label.d.ts.map +1 -1
  84. package/dist/cjs/components/LabelTag/Tag.d.ts +1 -2
  85. package/dist/cjs/components/LabelTag/Tag.d.ts.map +1 -1
  86. package/dist/cjs/components/LabelTag/Tag.js +7 -6
  87. package/dist/cjs/components/LabelTag/TagCircle.d.ts +0 -1
  88. package/dist/cjs/components/LabelTag/TagCircle.d.ts.map +1 -1
  89. package/dist/cjs/components/Menu/Menu.d.ts +8 -17
  90. package/dist/cjs/components/Menu/Menu.d.ts.map +1 -1
  91. package/dist/cjs/components/Menu/Menu.js +2 -2
  92. package/dist/cjs/components/Modal/Modal.d.ts +1 -1
  93. package/dist/cjs/components/Modal/Modal.d.ts.map +1 -1
  94. package/dist/cjs/components/Modal/Modal.js +3 -9
  95. package/dist/cjs/components/NonIdealState/styles.d.ts +0 -1
  96. package/dist/cjs/components/NonIdealState/styles.d.ts.map +1 -1
  97. package/dist/cjs/components/OptionTag/OptionTag.d.ts +0 -1
  98. package/dist/cjs/components/OptionTag/OptionTag.d.ts.map +1 -1
  99. package/dist/cjs/components/OptionTag/OptionTag.js +1 -1
  100. package/dist/cjs/components/Pagination/Pagination.d.ts +0 -2
  101. package/dist/cjs/components/Pagination/Pagination.d.ts.map +1 -1
  102. package/dist/cjs/components/Pagination/Pagination.js +3 -4
  103. package/dist/cjs/components/Pill/UrgencyCircle.d.ts +0 -1
  104. package/dist/cjs/components/Pill/UrgencyCircle.d.ts.map +1 -1
  105. package/dist/cjs/components/Radio/Radio.d.ts +0 -1
  106. package/dist/cjs/components/Radio/Radio.d.ts.map +1 -1
  107. package/dist/cjs/components/SandboxHtml/SandboxHtml.d.ts +0 -1
  108. package/dist/cjs/components/SandboxHtml/SandboxHtml.d.ts.map +1 -1
  109. package/dist/cjs/components/Scrollbar/Scrollbar.d.ts +2 -0
  110. package/dist/cjs/components/Scrollbar/Scrollbar.d.ts.map +1 -1
  111. package/dist/cjs/components/Select/Select.d.ts +0 -1
  112. package/dist/cjs/components/Select/Select.d.ts.map +1 -1
  113. package/dist/cjs/components/Select/Select.js +5 -11
  114. package/dist/cjs/components/Spinner/Spinner.d.ts +0 -1
  115. package/dist/cjs/components/Spinner/Spinner.d.ts.map +1 -1
  116. package/dist/cjs/components/TabBar/TabBar.d.ts +0 -1
  117. package/dist/cjs/components/TabBar/TabBar.d.ts.map +1 -1
  118. package/dist/cjs/components/TabbedSection/Tabs.d.ts +0 -1
  119. package/dist/cjs/components/TabbedSection/Tabs.d.ts.map +1 -1
  120. package/dist/cjs/components/TabbedSection/Tabs.js +2 -2
  121. package/dist/cjs/components/Tabs/Tabs.d.ts +0 -1
  122. package/dist/cjs/components/Tabs/Tabs.d.ts.map +1 -1
  123. package/dist/cjs/components/TextArea/TextArea.d.ts +0 -1
  124. package/dist/cjs/components/TextArea/TextArea.d.ts.map +1 -1
  125. package/dist/cjs/components/Toggle/Toggle.d.ts +0 -1
  126. package/dist/cjs/components/Toggle/Toggle.d.ts.map +1 -1
  127. package/dist/cjs/components/Toggle/Toggle.js +4 -16
  128. package/dist/cjs/components/Tooltip/Tooltip.d.ts +4 -2
  129. package/dist/cjs/components/Tooltip/Tooltip.d.ts.map +1 -1
  130. package/dist/cjs/components/Tooltip/Tooltip.js +34 -5
  131. package/dist/cjs/layout/Stack/Spacer.d.ts +0 -1
  132. package/dist/cjs/layout/Stack/Spacer.d.ts.map +1 -1
  133. package/dist/cjs/layout/Stack/ToolbarStack.d.ts +11 -1054
  134. package/dist/cjs/layout/Stack/ToolbarStack.d.ts.map +1 -1
  135. package/dist/cjs/lib.d.ts +0 -1
  136. package/dist/cjs/lib.d.ts.map +1 -1
  137. package/dist/cjs/lib.js +0 -1
  138. package/dist/cjs/structure/AppSidebar/AppSidebar.d.ts +0 -1
  139. package/dist/cjs/structure/AppSidebar/AppSidebar.d.ts.map +1 -1
  140. package/dist/cjs/structure/AppSidebar/index.d.ts +0 -1
  141. package/dist/cjs/structure/AppSidebar/index.d.ts.map +1 -1
  142. package/dist/cjs/style/index.d.ts +1 -0
  143. package/dist/cjs/style/index.d.ts.map +1 -1
  144. package/dist/cjs/style/index.js +4 -1
  145. package/dist/cjs/style/theme/ThemeProvider.d.ts +10 -0
  146. package/dist/cjs/style/theme/ThemeProvider.d.ts.map +1 -0
  147. package/dist/cjs/style/theme/ThemeProvider.js +11 -0
  148. package/dist/cjs/testing/providers.d.ts.map +1 -1
  149. package/dist/cjs/testing/providers.js +2 -3
  150. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  151. package/dist/cjs/utils/events/isRightClick.d.ts +0 -1
  152. package/dist/cjs/utils/events/isRightClick.d.ts.map +1 -1
  153. package/dist/deskpro-custom-icons.css +29 -26
  154. package/dist/esm/components/AttachmentTag/AttachmentTag.js +1 -3
  155. package/dist/esm/components/Avatar/Avatar.js +5 -11
  156. package/dist/esm/components/Button/Button.js +87 -27
  157. package/dist/esm/components/Button/styles.js +59 -36
  158. package/dist/esm/components/CCUserTag/CCUserTag.js +10 -12
  159. package/dist/esm/components/Card/AppCard.js +1 -1
  160. package/dist/esm/components/Checkbox/Checkbox.js +1 -3
  161. package/dist/esm/components/ColorInput/ColorInput.js +4 -8
  162. package/dist/esm/components/DatePicker/index.js +1 -1
  163. package/dist/esm/components/Dialog/Dialog.js +1 -0
  164. package/dist/esm/components/Dropdown/Dropdown.js +9 -15
  165. package/dist/esm/components/Dropdown/styles.js +4 -1
  166. package/dist/esm/components/Icon/DeskproCustomIcon.js +3 -3
  167. package/dist/esm/components/Icon/Icon.js +8 -16
  168. package/dist/esm/components/Icon/customIconsCodegen.js +24 -23
  169. package/dist/esm/components/Infinite/Infinite.js +6 -11
  170. package/dist/esm/components/Infinite/InfiniteTopBottom.js +5 -9
  171. package/dist/esm/components/IntlPhoneInput/IntlPhoneInput.js +3 -7
  172. package/dist/esm/components/LabelTag/Tag.js +7 -6
  173. package/dist/esm/components/Menu/Menu.js +3 -3
  174. package/dist/esm/components/Modal/Modal.js +3 -9
  175. package/dist/esm/components/OptionTag/OptionTag.js +1 -1
  176. package/dist/esm/components/Pagination/Pagination.js +4 -5
  177. package/dist/esm/components/Select/Select.js +5 -11
  178. package/dist/esm/components/TabbedSection/Tabs.js +2 -2
  179. package/dist/esm/components/Toggle/Toggle.js +4 -16
  180. package/dist/esm/components/Tooltip/Tooltip.js +36 -7
  181. package/dist/esm/lib.js +0 -1
  182. package/dist/esm/style/index.js +1 -0
  183. package/dist/esm/style/theme/ThemeProvider.js +5 -0
  184. package/dist/esm/testing/providers.js +1 -2
  185. package/dist/fonts/DpCustomIcons/DpCustomIcons.eot +0 -0
  186. package/dist/fonts/DpCustomIcons/DpCustomIcons.woff +0 -0
  187. package/dist/fonts/DpCustomIcons/DpCustomIcons.woff2 +0 -0
  188. package/package.json +78 -58
  189. package/.idea/.gitignore +0 -8
  190. package/.idea/deskpro-ui.iml +0 -8
  191. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  192. package/.idea/modules.xml +0 -8
  193. package/.idea/prettier.xml +0 -6
  194. package/.idea/vcs.xml +0 -6
  195. package/dist/cjs/nav/NavSidebar/NavSidebar.d.ts +0 -28
  196. package/dist/cjs/nav/NavSidebar/NavSidebar.d.ts.map +0 -1
  197. package/dist/cjs/nav/NavSidebar/NavSidebar.js +0 -55
  198. package/dist/cjs/nav/NavSidebar/index.d.ts +0 -3
  199. package/dist/cjs/nav/NavSidebar/index.d.ts.map +0 -1
  200. package/dist/cjs/nav/NavSidebar/index.js +0 -6
  201. package/dist/esm/nav/NavSidebar/NavSidebar.js +0 -49
  202. package/dist/esm/nav/NavSidebar/index.js +0 -2
@@ -1,4 +1,3 @@
1
- /// <reference types="@typescript/lib-dom" />
2
1
  import * as React from "react";
3
2
  export declare const isRightClick: (e: React.MouseEvent<Element, MouseEvent>) => boolean;
4
3
  //# sourceMappingURL=isRightClick.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isRightClick.d.ts","sourceRoot":"","sources":["../../../../src/utils/events/isRightClick.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,YAAY,MAAO,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,YASpE,CAAC"}
1
+ {"version":3,"file":"isRightClick.d.ts","sourceRoot":"","sources":["../../../../src/utils/events/isRightClick.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,YAAY,MAAO,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,YASpE,CAAC"}
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: "DpCustomIcons";
3
- src: url("./fonts/DpCustomIcons/DpCustomIcons.eot?e0234406ba682cede64cde06c7a4439c#iefix") format("embedded-opentype"),
4
- url("./fonts/DpCustomIcons/DpCustomIcons.woff2?e0234406ba682cede64cde06c7a4439c") format("woff2"),
5
- url("./fonts/DpCustomIcons/DpCustomIcons.woff?e0234406ba682cede64cde06c7a4439c") format("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-send:before {
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-inbound-call:before {
94
+ .dp-custom-icon-im:before {
95
95
  content: "\f11a";
96
96
  }
97
- .dp-custom-icon-kanban-view:before {
97
+ .dp-custom-icon-inbound-call:before {
98
98
  content: "\f11b";
99
99
  }
100
- .dp-custom-icon-level-down:before {
100
+ .dp-custom-icon-kanban-view:before {
101
101
  content: "\f11c";
102
102
  }
103
- .dp-custom-icon-linked-ticket:before {
103
+ .dp-custom-icon-level-down:before {
104
104
  content: "\f11d";
105
105
  }
106
- .dp-custom-icon-location-arrow:before {
106
+ .dp-custom-icon-linked-ticket:before {
107
107
  content: "\f11e";
108
108
  }
109
- .dp-custom-icon-merge:before {
109
+ .dp-custom-icon-location-arrow:before {
110
110
  content: "\f11f";
111
111
  }
112
- .dp-custom-icon-merge2:before {
112
+ .dp-custom-icon-merge:before {
113
113
  content: "\f120";
114
114
  }
115
- .dp-custom-icon-missed-call:before {
115
+ .dp-custom-icon-merge2:before {
116
116
  content: "\f121";
117
117
  }
118
- .dp-custom-icon-mobile-rotate:before {
118
+ .dp-custom-icon-missed-call:before {
119
119
  content: "\f122";
120
120
  }
121
- .dp-custom-icon-organization-circle:before {
121
+ .dp-custom-icon-mobile-rotate:before {
122
122
  content: "\f123";
123
123
  }
124
- .dp-custom-icon-outbound-call:before {
124
+ .dp-custom-icon-organization-circle:before {
125
125
  content: "\f124";
126
126
  }
127
- .dp-custom-icon-read:before {
127
+ .dp-custom-icon-outbound-call:before {
128
128
  content: "\f125";
129
129
  }
130
- .dp-custom-icon-record:before {
130
+ .dp-custom-icon-read:before {
131
131
  content: "\f126";
132
132
  }
133
- .dp-custom-icon-sent:before {
133
+ .dp-custom-icon-record:before {
134
134
  content: "\f127";
135
135
  }
136
- .dp-custom-icon-sip-address:before {
136
+ .dp-custom-icon-sent:before {
137
137
  content: "\f128";
138
138
  }
139
- .dp-custom-icon-sort:before {
139
+ .dp-custom-icon-sip-address:before {
140
140
  content: "\f129";
141
141
  }
142
- .dp-custom-icon-transfer-queue:before {
142
+ .dp-custom-icon-sort:before {
143
143
  content: "\f12a";
144
144
  }
145
- .dp-custom-icon-triangle:before {
145
+ .dp-custom-icon-transfer-queue:before {
146
146
  content: "\f12b";
147
147
  }
148
- .dp-custom-icon-warm-add:before {
148
+ .dp-custom-icon-triangle:before {
149
149
  content: "\f12c";
150
150
  }
151
- .dp-custom-icon-warm-transfer:before {
151
+ .dp-custom-icon-warm-add:before {
152
152
  content: "\f12d";
153
153
  }
154
- .dp-custom-icon-webhook:before {
154
+ .dp-custom-icon-warm-transfer:before {
155
155
  content: "\f12e";
156
156
  }
157
+ .dp-custom-icon-webhook:before {
158
+ content: "\f12f";
159
+ }
@@ -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",
@@ -1,10 +1,10 @@
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
- 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
  /**
@@ -18,41 +18,71 @@ export var Button = styled(forwardRef(function Button(_a, ref) {
18
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 && getActiveIntent({ intent: calculatedIntent, danger: props.danger });
30
+ }, function (props) { return props.loading && buttonLoading; }, function (props) { return props.fill && buttonFill; });
22
31
  /**
23
32
  * Icon Button
24
33
  */
25
34
  export var IconButton = styled(forwardRef(function IconButton(_a, ref) {
26
35
  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; });
36
+ return (React.createElement("button", __assign({}, dpNameProp("IconButton"), { ref: ref, type: type }, rest, { disabled: disabled || loading }), loading ? (React.createElement(ButtonLoaderContainer, null,
37
+ React.createElement(Spinner, { size: "small" }))) : isAnyIcon(icon) ? (React.createElement(Icon, { themeColor: themeColor, icon: icon })) : isIconProps(icon) ? (React.createElement(Icon, __assign({ themeColor: themeColor }, icon))) : (icon)));
38
+ }))(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) {
39
+ var calculatedIntent = calculateIntent(props);
40
+ return getIntentBase({
41
+ intent: calculatedIntent === "minimalUnderline" ? "minimal" : calculatedIntent,
42
+ });
43
+ }, function (props) {
44
+ var calculatedIntent = calculateIntent(props);
45
+ return props.danger && getDangerIntent({ intent: calculatedIntent });
46
+ }, function (props) {
47
+ var calculatedIntent = calculateIntent(props);
48
+ return props.active && getActiveIntent({ intent: calculatedIntent });
49
+ }, function (props) { return props.loading && buttonLoading; }, function (props) { return props.iconSubsection && buttonIconSubsection; });
35
50
  export var AvatarButton = styled(forwardRef(function AvatarButton(_a, ref) {
36
51
  var avatarSize = _a.avatarSize, _b = _a.type, type = _b === void 0 ? "button" : _b, rest = __rest(_a, ["avatarSize", "type"]);
37
52
  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) {
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) {
39
54
  var avatarSize = _a.avatarSize;
40
- return avatarSize;
55
+ return avatarSize + 4;
41
56
  }, function (_a) {
42
57
  var avatarSize = _a.avatarSize;
43
- return avatarSize;
58
+ return avatarSize + 4;
44
59
  }, function (_a) {
45
60
  var avatarSize = _a.avatarSize;
46
- return avatarSize;
61
+ return avatarSize + 4;
47
62
  }, function (_a) {
48
63
  var avatarSize = _a.avatarSize;
49
- return avatarSize;
64
+ return avatarSize + 4;
50
65
  }, function (_a) {
51
66
  var avatarSize = _a.avatarSize;
52
- return avatarSize;
67
+ return avatarSize + 4;
53
68
  }, function (_a) {
54
69
  var avatarSize = _a.avatarSize;
55
- return avatarSize;
70
+ return avatarSize + 4;
71
+ }, function (_a) {
72
+ var theme = _a.theme;
73
+ return theme.colors.white;
74
+ }, function (_a) {
75
+ var theme = _a.theme;
76
+ return theme.colors.brandShade60;
77
+ }, function (_a) {
78
+ var active = _a.active, theme = _a.theme;
79
+ return active && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border: 2px solid ", ";\n "], ["\n border: 2px solid ", ";\n "])), theme.colors.cyan100);
80
+ }, function (_a) {
81
+ var theme = _a.theme;
82
+ return theme.colors.cyan100;
83
+ }, function (_a) {
84
+ var disabled = _a.disabled;
85
+ return (disabled ? "cursor: not-allowed;" : "");
56
86
  }, function (_a) {
57
87
  var avatarSize = _a.avatarSize;
58
88
  return avatarSize;
@@ -66,7 +96,7 @@ export var AvatarButton = styled(forwardRef(function AvatarButton(_a, ref) {
66
96
  var avatarSize = _a.avatarSize;
67
97
  return avatarSize;
68
98
  });
69
- export var AvatarGroupButton = styled(IconButton)(templateObject_4 || (templateObject_4 = __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"])));
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"])));
70
100
  /**
71
101
  * Anchor component styled like a button
72
102
  */
@@ -80,7 +110,16 @@ export var AnchorButton = styled(forwardRef(function AnchorButton(_a, ref) {
80
110
  isAnyIcon(icon) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : icon,
81
111
  text && React.createElement(ButtonText, null, text),
82
112
  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; });
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) {
114
+ var calculatedIntent = calculateIntent(props);
115
+ return getIntentBase({ intent: calculatedIntent });
116
+ }, function (props) {
117
+ var calculatedIntent = calculateIntent(props);
118
+ return props.danger && getDangerIntent({ intent: calculatedIntent });
119
+ }, function (props) {
120
+ var calculatedIntent = calculateIntent(props);
121
+ return props.active && getActiveIntent({ intent: calculatedIntent });
122
+ }, 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
123
  /**
85
124
  * Label component styled like a button - useful for wrapping around file input for example
86
125
  */
@@ -95,10 +134,20 @@ export var LabelButton = styled(forwardRef(function LabelButton(_a, ref) {
95
134
  isAnyIcon(icon) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : icon,
96
135
  text && React.createElement(ButtonText, null, text),
97
136
  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; });
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) {
138
+ var calculatedIntent = calculateIntent(props);
139
+ return getIntentBase({ intent: calculatedIntent });
140
+ }, function (props) {
141
+ var calculatedIntent = calculateIntent(props);
142
+ return props.danger && getDangerIntent({ intent: calculatedIntent });
143
+ }, function (props) {
144
+ var calculatedIntent = calculateIntent(props);
145
+ return props.active && getActiveIntent({ intent: calculatedIntent });
146
+ }, 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; });
147
+ // ${(props) => props.noMinimalUnderline && buttonNoMinimalUnderline} ^^^^
99
148
  export var LabelButtonFileInput = styled.input.attrs({
100
149
  type: "file",
101
- })(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"])));
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"])));
102
151
  export var NavButton = styled(forwardRef(function NavButton(_a, ref) {
103
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"]);
104
153
  return (React.createElement("button", __assign({ type: type, ref: ref }, dpNameProp("NavButton"), rest),
@@ -108,19 +157,25 @@ export var NavButton = styled(forwardRef(function NavButton(_a, ref) {
108
157
  !reverse && (React.createElement(React.Fragment, null,
109
158
  isAnyIcon(icon) ? React.createElement(Icon, { icon: icon }) : isIconProps(icon) ? React.createElement(Icon, __assign({}, icon)) : icon,
110
159
  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); });
160
+ }))(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n"])), navButtonBase, function (props) {
161
+ var calculatedIntent = calculateIntent(props);
162
+ return getIntentBase({ intent: calculatedIntent });
163
+ }, function (props) { return props.size === "small" && navButtonSmall; }, function (props) {
164
+ var calculatedIntent = calculateIntent(props);
165
+ return props.active && getActiveIntent({ intent: calculatedIntent });
166
+ });
112
167
  /**
113
168
  * OverlayButton requires `position: relative` wrapper to overlay unless position set to relative
114
169
  */
115
170
  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"]);
171
+ 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
172
  return (React.createElement("button", __assign({ type: type }, dpNameProp("OverlayButton"), { ref: ref }, rest),
118
173
  loading && (React.createElement(ButtonLoaderContainer, null,
119
- React.createElement(Spinner, null))),
174
+ React.createElement(Spinner, { size: "small" }))),
120
175
  isAnyIcon(icon) ? (React.createElement(Icon, { icon: icon, size: 10 })) : isIconProps(icon) ? (React.createElement(Icon, __assign({ size: 10 }, icon))) : (icon),
121
176
  text && React.createElement(ButtonText, null, text),
122
177
  isAnyIcon(rightIcon) ? (React.createElement(Icon, { icon: rightIcon, size: 10 })) : isIconProps(rightIcon) ? (React.createElement(Icon, __assign({ size: 10 }, rightIcon))) : (rightIcon)));
123
- }))(templateObject_9 || (templateObject_9 = __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) {
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) {
124
179
  var _a;
125
180
  return match((_a = props.placement) !== null && _a !== void 0 ? _a : "right-top")
126
181
  .with("right-top", function () { return overlayButtonRightTop; })
@@ -134,4 +189,9 @@ export var OverlayButton = styled(forwardRef(function OverlayButton(_a, ref) {
134
189
  var position = _a.position;
135
190
  return (position ? position : "absolute");
136
191
  });
137
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
192
+ export var calculateIntent = function (_a) {
193
+ var minimal = _a.minimal, noMinimalUnderline = _a.noMinimalUnderline, intent = _a.intent;
194
+ var newIntent = minimal ? (noMinimalUnderline ? "minimal" : "minimalUnderline") : intent;
195
+ return newIntent !== null && newIntent !== void 0 ? newIntent : "primary";
196
+ };
197
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10;