@jobber/components 2.86.0 → 2.86.2

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 (269) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/Autocomplete/Autocomplete.d.ts +47 -47
  3. package/dist/Autocomplete/Menu.d.ts +9 -9
  4. package/dist/Autocomplete/Option.d.ts +15 -15
  5. package/dist/Autocomplete/index.d.ts +2 -2
  6. package/dist/Autocomplete/index.js +215 -211
  7. package/dist/Avatar/Avatar.d.ts +37 -37
  8. package/dist/Avatar/index.d.ts +1 -1
  9. package/dist/Avatar/index.js +7 -74
  10. package/dist/Avatar/utilities.d.ts +1 -1
  11. package/dist/Avatar-cfd04e86.js +82 -0
  12. package/dist/Banner/Banner.d.ts +19 -19
  13. package/dist/Banner/index.d.ts +1 -1
  14. package/dist/Banner/index.js +67 -65
  15. package/dist/Button/Button.d.ts +64 -64
  16. package/dist/Button/index.d.ts +1 -1
  17. package/dist/Button/index.js +9 -53
  18. package/dist/Button-5b2f1636.js +60 -0
  19. package/dist/ButtonDismiss/ButtonDismiss.d.ts +7 -7
  20. package/dist/ButtonDismiss/index.d.ts +1 -1
  21. package/dist/ButtonDismiss/index.js +10 -15
  22. package/dist/ButtonDismiss-4cde8f7c.js +15 -0
  23. package/dist/Card/Card.d.ts +31 -31
  24. package/dist/Card/CardClickable.d.ts +12 -12
  25. package/dist/Card/index.d.ts +1 -1
  26. package/dist/Card/index.js +7 -61
  27. package/dist/Card-368e01a3.js +68 -0
  28. package/dist/Checkbox/Checkbox.d.ts +52 -52
  29. package/dist/Checkbox/index.d.ts +1 -1
  30. package/dist/Checkbox/index.js +34 -32
  31. package/dist/Chips/Chip.d.ts +8 -8
  32. package/dist/Chips/ChipDismissible.d.ts +7 -7
  33. package/dist/Chips/ChipTypes.d.ts +59 -59
  34. package/dist/Chips/Chips.d.ts +2 -2
  35. package/dist/Chips/ChipsTypes.d.ts +82 -82
  36. package/dist/Chips/InternalChip.d.ts +2 -2
  37. package/dist/Chips/InternalChipAffix.d.ts +10 -10
  38. package/dist/Chips/InternalChipButton.d.ts +10 -10
  39. package/dist/Chips/InternalChipDismissible/InternalChipDismissible.d.ts +2 -2
  40. package/dist/Chips/InternalChipDismissible/InternalChipDismissibleInput.d.ts +2 -2
  41. package/dist/Chips/InternalChipDismissible/InternalChipDismissibleTypes.d.ts +13 -13
  42. package/dist/Chips/InternalChipDismissible/hooks/index.d.ts +5 -5
  43. package/dist/Chips/InternalChipDismissible/hooks/useInView.d.ts +5 -5
  44. package/dist/Chips/InternalChipDismissible/hooks/useInternalChipDismissible.d.ts +15 -15
  45. package/dist/Chips/InternalChipDismissible/hooks/useInternalChipDismissibleInput.d.ts +28 -28
  46. package/dist/Chips/InternalChipDismissible/hooks/useRepositionMenu.d.ts +16 -16
  47. package/dist/Chips/InternalChipDismissible/hooks/useScrollToActive.d.ts +2 -2
  48. package/dist/Chips/InternalChipDismissible/index.d.ts +1 -1
  49. package/dist/Chips/InternalChipMultiSelect.d.ts +4 -4
  50. package/dist/Chips/InternalChipSingleSelect.d.ts +4 -4
  51. package/dist/Chips/index.d.ts +3 -3
  52. package/dist/Chips/index.js +493 -491
  53. package/dist/Chips/utils/mdxUtils.d.ts +9 -9
  54. package/dist/ConfirmationModal/ConfirmationModal.d.ts +62 -62
  55. package/dist/ConfirmationModal/index.d.ts +1 -1
  56. package/dist/ConfirmationModal/index.js +20 -109
  57. package/dist/ConfirmationModal-b7ef110f.js +103 -0
  58. package/dist/Content/Content.d.ts +13 -13
  59. package/dist/Content/index.d.ts +1 -1
  60. package/dist/Content/index.js +5 -19
  61. package/dist/Content-18de5fbb.js +26 -0
  62. package/dist/Countdown/Countdown.d.ts +31 -31
  63. package/dist/Countdown/computeTimeUnit.d.ts +3 -3
  64. package/dist/Countdown/index.d.ts +1 -1
  65. package/dist/Countdown/index.js +63 -61
  66. package/dist/DataDump/DataDump.d.ts +20 -20
  67. package/dist/DataDump/index.d.ts +1 -1
  68. package/dist/DataDump/index.js +18 -17
  69. package/dist/DatePicker/DatePicker.d.ts +50 -50
  70. package/dist/DatePicker/DatePickerActivator.d.ts +12 -12
  71. package/dist/DatePicker/DatePickerCustomHeader.d.ts +2 -2
  72. package/dist/DatePicker/index.d.ts +1 -1
  73. package/dist/DatePicker/index.js +13 -97
  74. package/dist/DatePicker/useFocusOnSelectedDate.d.ts +5 -5
  75. package/dist/DatePicker-ad6f8630.js +103 -0
  76. package/dist/DescriptionList/DescriptionList.d.ts +10 -10
  77. package/dist/DescriptionList/index.d.ts +1 -1
  78. package/dist/DescriptionList/index.js +16 -15
  79. package/dist/Disclosure/Disclosure.d.ts +20 -20
  80. package/dist/Disclosure/index.d.ts +1 -1
  81. package/dist/Disclosure/index.js +32 -31
  82. package/dist/Divider/Divider.d.ts +16 -16
  83. package/dist/Divider/index.d.ts +1 -1
  84. package/dist/Divider/index.js +19 -17
  85. package/dist/Drawer/Drawer.d.ts +13 -13
  86. package/dist/Drawer/DrawerGrid.d.ts +6 -6
  87. package/dist/Drawer/index.d.ts +2 -2
  88. package/dist/Drawer/index.js +39 -37
  89. package/dist/Emphasis/Emphasis.d.ts +11 -11
  90. package/dist/Emphasis/index.d.ts +1 -1
  91. package/dist/Emphasis/index.js +7 -17
  92. package/dist/Emphasis-fd845639.js +21 -0
  93. package/dist/FeatureSwitch/FeatureSwitch.d.ts +51 -51
  94. package/dist/FeatureSwitch/index.d.ts +1 -1
  95. package/dist/FeatureSwitch/index.js +57 -55
  96. package/dist/Form/Form.d.ts +18 -18
  97. package/dist/Form/index.d.ts +1 -1
  98. package/dist/Form/index.js +58 -57
  99. package/dist/FormField/FormField.d.ts +2 -2
  100. package/dist/FormField/FormFieldAffix.d.ts +13 -13
  101. package/dist/FormField/FormFieldDescription.d.ts +6 -6
  102. package/dist/FormField/FormFieldPostFix.d.ts +5 -5
  103. package/dist/FormField/FormFieldTypes.d.ts +160 -160
  104. package/dist/FormField/FormFieldWrapper.d.ts +9 -9
  105. package/dist/FormField/index.d.ts +2 -2
  106. package/dist/FormField/index.js +15 -208
  107. package/dist/FormField-a92c7bac.js +213 -0
  108. package/dist/FormatDate/FormatDate.d.ts +12 -12
  109. package/dist/FormatDate/index.d.ts +1 -1
  110. package/dist/FormatDate/index.js +24 -23
  111. package/dist/FormatEmail/FormatEmail.d.ts +8 -8
  112. package/dist/FormatEmail/index.d.ts +1 -1
  113. package/dist/FormatEmail/index.js +12 -10
  114. package/dist/FormatFile/FormatFile.d.ts +30 -30
  115. package/dist/FormatFile/FormatFileDeleteButton.d.ts +6 -6
  116. package/dist/FormatFile/InternalThumbnail.d.ts +9 -9
  117. package/dist/FormatFile/index.d.ts +1 -1
  118. package/dist/FormatFile/index.js +21 -112
  119. package/dist/FormatFile-5391d4cf.js +112 -0
  120. package/dist/FormatRelativeDateTime/FormatRelativeDateTime.d.ts +11 -11
  121. package/dist/FormatRelativeDateTime/index.d.ts +1 -1
  122. package/dist/FormatRelativeDateTime/index.js +64 -63
  123. package/dist/FormatTime/FormatTime.d.ts +15 -15
  124. package/dist/FormatTime/index.d.ts +1 -1
  125. package/dist/FormatTime/index.js +28 -27
  126. package/dist/Gallery/Gallery.d.ts +2 -2
  127. package/dist/Gallery/GalleryTypes.d.ts +31 -31
  128. package/dist/Gallery/index.d.ts +1 -1
  129. package/dist/Gallery/index.js +82 -80
  130. package/dist/Heading/Heading.d.ts +14 -14
  131. package/dist/Heading/index.d.ts +1 -1
  132. package/dist/Heading/index.js +7 -53
  133. package/dist/Heading-56750113.js +57 -0
  134. package/dist/Icon/Icon.d.ts +22 -22
  135. package/dist/Icon/index.d.ts +1 -1
  136. package/dist/Icon/index.js +4 -35
  137. package/dist/Icon-d5ad1a6d.js +41 -0
  138. package/dist/InlineLabel/InlineLabel.d.ts +17 -17
  139. package/dist/InlineLabel/index.d.ts +1 -1
  140. package/dist/InlineLabel/index.js +20 -18
  141. package/dist/InputAvatar/InputAvatar.d.ts +22 -22
  142. package/dist/InputAvatar/index.d.ts +1 -1
  143. package/dist/InputAvatar/index.js +57 -56
  144. package/dist/InputDate/InputDate.d.ts +19 -19
  145. package/dist/InputDate/index.d.ts +1 -1
  146. package/dist/InputDate/index.js +34 -33
  147. package/dist/InputEmail/InputEmail.d.ts +5 -5
  148. package/dist/InputEmail/index.d.ts +1 -1
  149. package/dist/InputEmail/index.js +29 -28
  150. package/dist/InputFile/InputFile.d.ts +121 -121
  151. package/dist/InputFile/index.d.ts +1 -1
  152. package/dist/InputFile/index.js +15 -168
  153. package/dist/InputFile-b5cf90c3.js +174 -0
  154. package/dist/InputGroup/InputGroup.d.ts +11 -11
  155. package/dist/InputGroup/index.d.ts +1 -1
  156. package/dist/InputGroup/index.js +24 -22
  157. package/dist/InputNumber/InputNumber.d.ts +11 -11
  158. package/dist/InputNumber/index.d.ts +1 -1
  159. package/dist/InputNumber/index.js +52 -51
  160. package/dist/InputPassword/InputPassword.d.ts +12 -12
  161. package/dist/InputPassword/index.d.ts +1 -1
  162. package/dist/InputPassword/index.js +28 -27
  163. package/dist/InputText/InputText.d.ts +29 -29
  164. package/dist/InputText/index.d.ts +1 -1
  165. package/dist/InputText/index.js +15 -95
  166. package/dist/InputText-cb3be15c.js +91 -0
  167. package/dist/InputTime/InputTime.d.ts +2 -2
  168. package/dist/InputTime/InputTimeProps.d.ts +18 -18
  169. package/dist/InputTime/InputTimeSafari.d.ts +2 -2
  170. package/dist/InputTime/civilTimeConversions.d.ts +3 -3
  171. package/dist/InputTime/index.d.ts +1 -1
  172. package/dist/InputTime/index.js +402 -257
  173. package/dist/InputValidation/InputValidation.d.ts +8 -8
  174. package/dist/InputValidation/index.d.ts +1 -1
  175. package/dist/InputValidation/index.js +8 -24
  176. package/dist/InputValidation-24d3621a.js +28 -0
  177. package/dist/LightBox/LightBox.d.ts +37 -37
  178. package/dist/LightBox/index.d.ts +1 -1
  179. package/dist/LightBox/index.js +6 -34
  180. package/dist/LightBox-b893b656.js +42 -0
  181. package/dist/List/List.d.ts +11 -11
  182. package/dist/List/ListItem.d.ts +54 -54
  183. package/dist/List/index.d.ts +1 -1
  184. package/dist/List/index.js +76 -74
  185. package/dist/Markdown/Markdown.d.ts +17 -17
  186. package/dist/Markdown/index.d.ts +1 -1
  187. package/dist/Markdown/index.js +12 -64
  188. package/dist/Markdown-69986c49.js +68 -0
  189. package/dist/Menu/Menu.d.ts +46 -46
  190. package/dist/Menu/index.d.ts +1 -1
  191. package/dist/Menu/index.js +13 -128
  192. package/dist/Menu-6a392af6.js +134 -0
  193. package/dist/Modal/Modal.d.ts +22 -22
  194. package/dist/Modal/index.d.ts +1 -1
  195. package/dist/Modal/index.js +14 -127
  196. package/dist/Modal/useFocusTrap.d.ts +10 -10
  197. package/dist/Modal-aaaaf2df.js +132 -0
  198. package/dist/Page/Page.d.ts +59 -59
  199. package/dist/Page/index.d.ts +1 -1
  200. package/dist/Page/index.js +63 -61
  201. package/dist/Popover/Popover.d.ts +26 -26
  202. package/dist/Popover/index.d.ts +1 -1
  203. package/dist/Popover/index.js +49 -48
  204. package/dist/ProgressBar/ProgressBar.d.ts +18 -18
  205. package/dist/ProgressBar/index.d.ts +1 -1
  206. package/dist/ProgressBar/index.js +5 -22
  207. package/dist/ProgressBar-e9a49129.js +29 -0
  208. package/dist/RadioGroup/RadioGroup.d.ts +27 -27
  209. package/dist/RadioGroup/RadioOption.d.ts +34 -34
  210. package/dist/RadioGroup/index.d.ts +2 -2
  211. package/dist/RadioGroup/index.js +38 -37
  212. package/dist/RecurringSelect/CurrentRecurrenceComponent.d.ts +8 -8
  213. package/dist/RecurringSelect/RecurringSelect.d.ts +8 -8
  214. package/dist/RecurringSelect/components/DayOfMonthSelect.d.ts +8 -8
  215. package/dist/RecurringSelect/components/MonthlyDayOfWeekSelect.d.ts +8 -8
  216. package/dist/RecurringSelect/components/MonthlySelect.d.ts +8 -8
  217. package/dist/RecurringSelect/components/WeeklySelect.d.ts +8 -8
  218. package/dist/RecurringSelect/components/index.d.ts +4 -4
  219. package/dist/RecurringSelect/index.d.ts +2 -2
  220. package/dist/RecurringSelect/types.d.ts +65 -65
  221. package/dist/Select/Option.d.ts +17 -17
  222. package/dist/Select/Select.d.ts +10 -10
  223. package/dist/Select/index.d.ts +2 -2
  224. package/dist/Select/index.js +20 -19
  225. package/dist/Spinner/Spinner.d.ts +15 -15
  226. package/dist/Spinner/index.d.ts +1 -1
  227. package/dist/Spinner/index.js +5 -19
  228. package/dist/Spinner-18d3dee6.js +26 -0
  229. package/dist/StatusLabel/StatusLabel.d.ts +25 -25
  230. package/dist/StatusLabel/index.d.ts +1 -1
  231. package/dist/StatusLabel/index.js +21 -19
  232. package/dist/Switch/Switch.d.ts +14 -14
  233. package/dist/Switch/index.d.ts +1 -1
  234. package/dist/Switch/index.js +7 -53
  235. package/dist/Switch-d2bec677.js +60 -0
  236. package/dist/Table/Body.d.ts +6 -6
  237. package/dist/Table/Cells/Cell.d.ts +7 -7
  238. package/dist/Table/Cells/CellCurrency.d.ts +8 -8
  239. package/dist/Table/Cells/CellNumeric.d.ts +4 -4
  240. package/dist/Table/Footer.d.ts +6 -6
  241. package/dist/Table/Header.d.ts +6 -6
  242. package/dist/Table/Row.d.ts +6 -6
  243. package/dist/Table/Table.d.ts +6 -6
  244. package/dist/Table/index.d.ts +8 -8
  245. package/dist/Table/index.js +41 -39
  246. package/dist/Tabs/Tabs.d.ts +19 -19
  247. package/dist/Tabs/index.d.ts +1 -1
  248. package/dist/Tabs/index.js +69 -67
  249. package/dist/Text/Text.d.ts +9 -9
  250. package/dist/Text/index.d.ts +1 -1
  251. package/dist/Text/index.js +7 -29
  252. package/dist/Text-9bc093e9.js +32 -0
  253. package/dist/Toast/Toast.d.ts +17 -17
  254. package/dist/Toast/index.d.ts +1 -1
  255. package/dist/Toast/index.js +93 -93
  256. package/dist/Toast/showToast.d.ts +2 -2
  257. package/dist/Tooltip/Tooltip.d.ts +10 -10
  258. package/dist/Tooltip/index.d.ts +1 -1
  259. package/dist/Tooltip/index.js +11 -110
  260. package/dist/Tooltip/useTooltipPositioning.d.ts +18 -18
  261. package/dist/Tooltip-4396164d.js +116 -0
  262. package/dist/Typography/Typography.d.ts +38 -38
  263. package/dist/Typography/index.d.ts +1 -1
  264. package/dist/Typography/index.js +6 -57
  265. package/dist/Typography-7e542a72.js +64 -0
  266. package/dist/{chunk-17e02351.js → style-inject.es-dcee06b6.js} +0 -0
  267. package/dist/{chunk-b67af3cb.js → tslib.es6-5b50eb8e.js} +0 -0
  268. package/package.json +6 -8
  269. package/rollup.config.js +28 -3
@@ -2,94 +2,96 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
-
7
- var __chunk_1 = require('../chunk-b67af3cb.js');
5
+ var tslib_es6 = require('../tslib.es6-5b50eb8e.js');
8
6
  var React = require('react');
9
- var React__default = _interopDefault(React);
10
- var __chunk_2 = require('../chunk-17e02351.js');
11
- var classnames = _interopDefault(require('classnames'));
12
- require('../Typography/index.js');
13
- require('../Text/index.js');
14
- require('@jobber/design');
15
- require('../Icon/index.js');
16
- require('../Heading/index.js');
17
- require('react-router-dom');
18
- var index$5 = require('../Button/index.js');
19
- require('framer-motion');
7
+ var classnames = require('classnames');
8
+ var styleInject_es = require('../style-inject.es-dcee06b6.js');
9
+ var LightBox = require('../LightBox-b893b656.js');
10
+ var FormatFile = require('../FormatFile-5391d4cf.js');
11
+ var Button = require('../Button-5b2f1636.js');
12
+ require('react-image-lightbox');
13
+ require('react-image-lightbox/style.css');
14
+ require('filesize');
15
+ require('../ConfirmationModal-b7ef110f.js');
20
16
  require('@jobber/hooks');
21
- require('../ButtonDismiss/index.js');
17
+ require('../Modal-aaaaf2df.js');
22
18
  require('react-dom');
23
- require('../Modal/index.js');
24
- require('../Content/index.js');
19
+ require('framer-motion');
20
+ require('../Typography-7e542a72.js');
21
+ require('../ButtonDismiss-4cde8f7c.js');
22
+ require('../Content-18de5fbb.js');
23
+ require('../Markdown-69986c49.js');
25
24
  require('react-markdown');
26
- require('../Emphasis/index.js');
27
- require('../Markdown/index.js');
28
- require('../ConfirmationModal/index.js');
29
- require('filesize');
30
- var index$8 = require('../FormatFile/index.js');
31
- require('../ProgressBar/index.js');
32
- require('react-image-lightbox');
33
- var index$9 = require('../LightBox/index.js');
34
- require('react-image-lightbox/style.css');
25
+ require('../Text-9bc093e9.js');
26
+ require('../Emphasis-fd845639.js');
27
+ require('../Heading-56750113.js');
28
+ require('../Icon-d5ad1a6d.js');
29
+ require('@jobber/design');
30
+ require('../ProgressBar-e9a49129.js');
31
+ require('react-router-dom');
32
+
33
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
34
+
35
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
36
+ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
35
37
 
36
38
  var css = ".oLHYkzv718LqMvtqFZFcZ,\n._2JSG0uYj1HSXFads63nptQ {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n grid-gap: var(--space-small);\n grid-gap: var(--space-small);\n gap: var(--space-small);\n}\n\n._2JSG0uYj1HSXFads63nptQ {\n grid-gap: var(--space-base);\n grid-gap: var(--space-base);\n gap: var(--space-base);\n}\n\n._3LkQj1p9wvHbrfXfz2nUYp {\n display: -ms-flexbox;\n display: flex;\n}\n\n.FG8mZ6UcMPRsMC9HQinY2 {\n width: 56px;\n height: 56px;\n}\n\n._1cTzKosWc22qxWZSiI0CzZ {\n width: 168px;\n height: 168px;\n box-shadow: var(--shadow-base);\n}\n";
37
39
  var styles = {"gallery":"oLHYkzv718LqMvtqFZFcZ","galleryLarge":"_2JSG0uYj1HSXFads63nptQ","showMoreButton":"_3LkQj1p9wvHbrfXfz2nUYp","baseShowMoreButton":"FG8mZ6UcMPRsMC9HQinY2","largeShowMoreButton":"_1cTzKosWc22qxWZSiI0CzZ"};
38
- __chunk_2.styleInject(css);
40
+ styleInject_es.styleInject(css);
39
41
 
40
- function Gallery(_a) {
41
- var files = _a.files, _b = _a.size, size = _b === void 0 ? "base" : _b, max = _a.max, onDelete = _a.onDelete;
42
- var _c = generateImagesArray(files), images = _c.images, filesToImageIndex = _c.filesToImageIndex;
43
- var _d = __chunk_1.__read(React.useState(false), 2), lightboxOpen = _d[0], setLightboxOpen = _d[1];
44
- var _e = __chunk_1.__read(React.useState(0), 2), lightboxIndex = _e[0], setLightboxIndex = _e[1];
45
- var _f = __chunk_1.__read(React.useState(max ? false : true), 2), displayPastMax = _f[0], setDisplayPastMax = _f[1];
46
- var visibleFiles = displayPastMax ? files : files.slice(0, max);
47
- return (React__default.createElement(React__default.Fragment, null,
48
- React__default.createElement("div", { className: size === "large" ? styles.galleryLarge : styles.gallery },
49
- visibleFiles.map(function (file, index) {
50
- return (React__default.createElement(index$8.FormatFile, { key: file.key, file: __chunk_1.__assign(__chunk_1.__assign({}, file), { src: function () { return Promise.resolve(file.src); } }), display: "compact", displaySize: size, onClick: function () {
51
- handleThumbnailClicked(index);
52
- }, onDelete: onDelete ? function () { return onDelete === null || onDelete === void 0 ? void 0 : onDelete(file); } : undefined }));
53
- }),
54
- max && files.length > max && !displayPastMax && (React__default.createElement("div", { className: classnames(styles.showMoreButton, styles[size + "ShowMoreButton"]) },
55
- React__default.createElement(index$5.Button, { type: "tertiary", size: size, label: "+ " + (files.length - max), fullWidth: true, onClick: function () {
56
- setDisplayPastMax(true);
57
- } })))),
58
- React__default.createElement(index$9.LightBox, { open: lightboxOpen, images: images, imageIndex: lightboxIndex, onRequestClose: handleLightboxClose })));
59
- function handleThumbnailClicked(index) {
60
- if (files[index].type.startsWith("image/")) {
61
- handleLightboxOpen(index);
62
- }
63
- else {
64
- window.open(files[index].src, "_blank");
65
- }
66
- }
67
- function handleLightboxOpen(index) {
68
- var fileToImageIndex = filesToImageIndex[index];
69
- if (fileToImageIndex !== undefined) {
70
- setLightboxIndex(fileToImageIndex);
71
- setLightboxOpen(true);
72
- }
73
- }
74
- function handleLightboxClose() {
75
- setLightboxOpen(false);
76
- }
77
- }
78
- function generateImagesArray(files) {
79
- var images = [];
80
- var filesToImageIndex = [];
81
- var imageIndex = 0;
82
- for (var i = 0; i < files.length; i++) {
83
- if (files[i].type.startsWith("image/")) {
84
- images.push({ title: files[i].name, url: files[i].src });
85
- filesToImageIndex.push(imageIndex);
86
- imageIndex++;
87
- }
88
- else {
89
- filesToImageIndex.push(undefined);
90
- }
91
- }
92
- return { images: images, filesToImageIndex: filesToImageIndex };
42
+ function Gallery(_a) {
43
+ var files = _a.files, _b = _a.size, size = _b === void 0 ? "base" : _b, max = _a.max, onDelete = _a.onDelete;
44
+ var _c = generateImagesArray(files), images = _c.images, filesToImageIndex = _c.filesToImageIndex;
45
+ var _d = tslib_es6.__read(React.useState(false), 2), lightboxOpen = _d[0], setLightboxOpen = _d[1];
46
+ var _e = tslib_es6.__read(React.useState(0), 2), lightboxIndex = _e[0], setLightboxIndex = _e[1];
47
+ var _f = tslib_es6.__read(React.useState(max ? false : true), 2), displayPastMax = _f[0], setDisplayPastMax = _f[1];
48
+ var visibleFiles = displayPastMax ? files : files.slice(0, max);
49
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
50
+ React__default["default"].createElement("div", { className: size === "large" ? styles.galleryLarge : styles.gallery },
51
+ visibleFiles.map(function (file, index) {
52
+ return (React__default["default"].createElement(FormatFile.FormatFile, { key: file.key, file: tslib_es6.__assign(tslib_es6.__assign({}, file), { src: function () { return Promise.resolve(file.src); } }), display: "compact", displaySize: size, onClick: function () {
53
+ handleThumbnailClicked(index);
54
+ }, onDelete: onDelete ? function () { return onDelete === null || onDelete === void 0 ? void 0 : onDelete(file); } : undefined }));
55
+ }),
56
+ max && files.length > max && !displayPastMax && (React__default["default"].createElement("div", { className: classnames__default["default"](styles.showMoreButton, styles[size + "ShowMoreButton"]) },
57
+ React__default["default"].createElement(Button.Button, { type: "tertiary", size: size, label: "+ " + (files.length - max), fullWidth: true, onClick: function () {
58
+ setDisplayPastMax(true);
59
+ } })))),
60
+ React__default["default"].createElement(LightBox.LightBox, { open: lightboxOpen, images: images, imageIndex: lightboxIndex, onRequestClose: handleLightboxClose })));
61
+ function handleThumbnailClicked(index) {
62
+ if (files[index].type.startsWith("image/")) {
63
+ handleLightboxOpen(index);
64
+ }
65
+ else {
66
+ window.open(files[index].src, "_blank");
67
+ }
68
+ }
69
+ function handleLightboxOpen(index) {
70
+ var fileToImageIndex = filesToImageIndex[index];
71
+ if (fileToImageIndex !== undefined) {
72
+ setLightboxIndex(fileToImageIndex);
73
+ setLightboxOpen(true);
74
+ }
75
+ }
76
+ function handleLightboxClose() {
77
+ setLightboxOpen(false);
78
+ }
79
+ }
80
+ function generateImagesArray(files) {
81
+ var images = [];
82
+ var filesToImageIndex = [];
83
+ var imageIndex = 0;
84
+ for (var i = 0; i < files.length; i++) {
85
+ if (files[i].type.startsWith("image/")) {
86
+ images.push({ title: files[i].name, url: files[i].src });
87
+ filesToImageIndex.push(imageIndex);
88
+ imageIndex++;
89
+ }
90
+ else {
91
+ filesToImageIndex.push(undefined);
92
+ }
93
+ }
94
+ return { images: images, filesToImageIndex: filesToImageIndex };
93
95
  }
94
96
 
95
97
  exports.Gallery = Gallery;
@@ -1,14 +1,14 @@
1
- import { ReactNode } from "react";
2
- import { TypographyOptions } from "../Typography";
3
- interface HeadingProps {
4
- /**
5
- * @default 5
6
- */
7
- readonly level: 1 | 2 | 3 | 4 | 5 | 6;
8
- readonly children: ReactNode;
9
- }
10
- export interface LevelMap {
11
- [level: string]: TypographyOptions;
12
- }
13
- export declare function Heading({ level, children }: HeadingProps): JSX.Element;
14
- export {};
1
+ import { ReactNode } from "react";
2
+ import { TypographyOptions } from "../Typography";
3
+ interface HeadingProps {
4
+ /**
5
+ * @default 5
6
+ */
7
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
8
+ readonly children: ReactNode;
9
+ }
10
+ export interface LevelMap {
11
+ [level: string]: TypographyOptions;
12
+ }
13
+ export declare function Heading({ level, children }: HeadingProps): JSX.Element;
14
+ export {};
@@ -1 +1 @@
1
- export { Heading } from "./Heading";
1
+ export { Heading } from "./Heading";
@@ -2,59 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
-
7
- var __chunk_1 = require('../chunk-b67af3cb.js');
8
- var React = require('react');
9
- var React__default = _interopDefault(React);
10
- require('../chunk-17e02351.js');
5
+ var Heading = require('../Heading-56750113.js');
6
+ require('../tslib.es6-5b50eb8e.js');
7
+ require('react');
8
+ require('../Typography-7e542a72.js');
11
9
  require('classnames');
12
- var index = require('../Typography/index.js');
10
+ require('../style-inject.es-dcee06b6.js');
11
+
13
12
 
14
- function Heading(_a) {
15
- var _b = _a.level, level = _b === void 0 ? 5 : _b, children = _a.children;
16
- var levelMap = {
17
- 1: {
18
- element: "h1",
19
- size: "jumbo",
20
- textCase: "uppercase",
21
- fontWeight: "black",
22
- textColor: "heading",
23
- },
24
- 2: {
25
- element: "h2",
26
- size: "largest",
27
- textCase: "uppercase",
28
- fontWeight: "black",
29
- textColor: "heading",
30
- },
31
- 3: {
32
- element: "h3",
33
- size: "larger",
34
- fontWeight: "bold",
35
- textColor: "heading",
36
- },
37
- 4: {
38
- element: "h4",
39
- size: "large",
40
- fontWeight: "bold",
41
- textColor: "heading",
42
- },
43
- 5: {
44
- element: "h5",
45
- size: "base",
46
- fontWeight: "bold",
47
- textColor: "heading",
48
- },
49
- 6: {
50
- element: "h6",
51
- size: "small",
52
- textCase: "uppercase",
53
- fontWeight: "bold",
54
- textColor: "heading",
55
- },
56
- };
57
- return React__default.createElement(index.Typography, __chunk_1.__assign({}, levelMap[level]), children);
58
- }
59
13
 
60
- exports.Heading = Heading;
14
+ exports.Heading = Heading.Heading;
@@ -0,0 +1,57 @@
1
+ 'use strict';
2
+
3
+ var tslib_es6 = require('./tslib.es6-5b50eb8e.js');
4
+ var React = require('react');
5
+ var Typography = require('./Typography-7e542a72.js');
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
+
11
+ function Heading(_a) {
12
+ var _b = _a.level, level = _b === void 0 ? 5 : _b, children = _a.children;
13
+ var levelMap = {
14
+ 1: {
15
+ element: "h1",
16
+ size: "jumbo",
17
+ textCase: "uppercase",
18
+ fontWeight: "black",
19
+ textColor: "heading",
20
+ },
21
+ 2: {
22
+ element: "h2",
23
+ size: "largest",
24
+ textCase: "uppercase",
25
+ fontWeight: "black",
26
+ textColor: "heading",
27
+ },
28
+ 3: {
29
+ element: "h3",
30
+ size: "larger",
31
+ fontWeight: "bold",
32
+ textColor: "heading",
33
+ },
34
+ 4: {
35
+ element: "h4",
36
+ size: "large",
37
+ fontWeight: "bold",
38
+ textColor: "heading",
39
+ },
40
+ 5: {
41
+ element: "h5",
42
+ size: "base",
43
+ fontWeight: "bold",
44
+ textColor: "heading",
45
+ },
46
+ 6: {
47
+ element: "h6",
48
+ size: "small",
49
+ textCase: "uppercase",
50
+ fontWeight: "bold",
51
+ textColor: "heading",
52
+ },
53
+ };
54
+ return React__default["default"].createElement(Typography.Typography, tslib_es6.__assign({}, levelMap[level]), children);
55
+ }
56
+
57
+ exports.Heading = Heading;
@@ -1,22 +1,22 @@
1
- import { IconColorNames, IconNames, IconSizes } from "@jobber/design";
2
- export { IconColorNames, IconNames } from "@jobber/design";
3
- export interface IconProps {
4
- /** The icon to show. */
5
- readonly name: IconNames;
6
- /**
7
- * Changes the size to small or large.
8
- * @default base
9
- */
10
- readonly size?: IconSizes;
11
- /**
12
- * Determines the color of the icon. Some icons have a default system colour
13
- * like quotes, jobs, and invoices. Others that doesn't have a system colour
14
- * falls back to greyBlueDark.
15
- */
16
- readonly color?: IconColorNames;
17
- /**
18
- * Sets a custom color for the icon. Can be a rgb() or hex value.
19
- */
20
- readonly customColor?: string;
21
- }
22
- export declare function Icon({ name, color, customColor, size }: IconProps): JSX.Element;
1
+ import { IconColorNames, IconNames, IconSizes } from "@jobber/design";
2
+ export { IconColorNames, IconNames } from "@jobber/design";
3
+ export interface IconProps {
4
+ /** The icon to show. */
5
+ readonly name: IconNames;
6
+ /**
7
+ * Changes the size to small or large.
8
+ * @default base
9
+ */
10
+ readonly size?: IconSizes;
11
+ /**
12
+ * Determines the color of the icon. Some icons have a default system colour
13
+ * like quotes, jobs, and invoices. Others that doesn't have a system colour
14
+ * falls back to greyBlueDark.
15
+ */
16
+ readonly color?: IconColorNames;
17
+ /**
18
+ * Sets a custom color for the icon. Can be a rgb() or hex value.
19
+ */
20
+ readonly customColor?: string;
21
+ }
22
+ export declare function Icon({ name, color, customColor, size }: IconProps): JSX.Element;
@@ -1 +1 @@
1
- export * from "./Icon";
1
+ export * from "./Icon";
@@ -2,41 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
5
+ var Icon = require('../Icon-d5ad1a6d.js');
6
+ require('react');
7
+ require('@jobber/design');
6
8
 
7
- var React = require('react');
8
- var React__default = _interopDefault(React);
9
- var design = require('@jobber/design');
10
9
 
11
- function Icon(_a) {
12
- var name = _a.name, color = _a.color, customColor = _a.customColor, _b = _a.size, size = _b === void 0 ? "base" : _b;
13
- var icon;
14
- var _c = design.getIcon({
15
- name: name,
16
- color: getIconColor(name, color),
17
- size: size,
18
- }), svgClassNames = _c.svgClassNames, pathClassNames = _c.pathClassNames, paths = _c.paths, viewBox = _c.viewBox;
19
- if (name === "truck") {
20
- icon = getTruck(pathClassNames, customColor);
21
- }
22
- else {
23
- icon = paths.map(function (path) { return (React__default.createElement("path", { key: path, className: pathClassNames, d: path, fill: customColor })); });
24
- }
25
- return (React__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: viewBox, className: svgClassNames, "data-testid": name }, icon));
26
- }
27
- function getIconColor(name, color) {
28
- if (name === "truck") {
29
- return color || "green";
30
- }
31
- return color;
32
- }
33
- function getTruck(pathClassNames, customColor) {
34
- return (React__default.createElement("g", { transform: "translate(233.000000, 0.000000)", className: pathClassNames },
35
- React__default.createElement("path", { d: "M31.030303,124.121212 C31.030303,106.983796 44.9231903,93.0909091 62.0606061,93.0909091 L93.0909091,93.0909091 L93.0909091,279.272727 L62.0606061,279.272727 C44.9231903,279.272727 31.030303,265.37984 31.030303,248.242424 L31.030303,124.121212 Z M31.030303,744.727273 C31.030303,727.589236 44.9231903,713.69697 62.0606061,713.69697 L93.0909091,713.69697 L93.0909091,899.878788 L62.0606061,899.878788 C44.9231903,899.878788 31.030303,885.986521 31.030303,868.848485 L31.030303,744.727273 Z M62.0606061,961.939394 L496.484848,961.939394 L496.484848,992.969697 C496.484848,1010.10773 482.592582,1024 465.454545,1024 L93.0909091,1024 C75.9534933,1024 62.0606061,1010.10773 62.0606061,992.969697 L62.0606061,961.939394 Z M494.858861,713.715588 L463.834764,714.258618 L467.083636,900.412509 L498.107733,899.869479 C515.242667,899.571588 528.889794,885.437285 528.591903,868.302352 L526.425988,744.199758 C526.128097,727.064824 511.993794,713.417697 494.858861,713.715588 Z M496.484848,93.0909091 L465.454545,93.0909091 L465.454545,279.272727 L496.484848,279.272727 C513.622885,279.272727 527.515152,265.37984 527.515152,248.242424 L527.515152,124.121212 C527.515152,106.983796 513.622885,93.0909091 496.484848,93.0909091 Z", id: "Shape", fill: "#2B2B2B" }),
36
- React__default.createElement("path", { d: "M124.121212,0 C89.8460703,0 62.0606061,27.7854642 62.0606061,62.0606061 L62.0606061,310.30303 L31.030303,310.30303 C13.8927321,310.30303 0,324.195297 0,341.333333 L62.0606061,341.333333 L62.0606061,992.969697 L496.484848,992.969697 L496.484848,341.333333 L558.545455,341.333333 C558.545455,324.195297 544.653188,310.30303 527.515152,310.30303 L496.484848,310.30303 L496.484848,62.0606061 C496.484848,27.7854642 468.700315,0 434.424242,0 L124.121212,0 Z", id: "Path", fill: customColor }),
37
- React__default.createElement("path", { d: "M465.454545,589.575758 L93.0909091,589.575758 L93.0909091,713.69697 L124.121212,713.69697 C141.258628,713.69697 155.151515,727.589236 155.151515,744.727273 L155.151515,868.848485 C155.151515,885.986521 141.258628,899.878788 124.121212,899.878788 L93.0909091,899.878788 L93.0909091,961.939394 L465.454545,961.939394 L465.454545,899.878788 L434.424242,899.878788 C417.286206,899.878788 403.393939,885.986521 403.393939,868.848485 L403.393939,744.727273 C403.393939,727.589236 417.286206,713.69697 434.424242,713.69697 L465.454545,713.69697 L465.454545,589.575758 Z", id: "Path", fillOpacity: "0.35", fill: "#000000" }),
38
- React__default.createElement("path", { d: "M93.0909091,62.0606061 C93.0909091,44.9231903 106.983796,31.030303 124.121212,31.030303 L434.424242,31.030303 C451.562279,31.030303 465.454545,44.9231903 465.454545,62.0606061 L465.454545,589.575758 L93.0909091,589.575758 L93.0909091,62.0606061 Z M93.0909091,713.69697 L124.121212,713.69697 C141.258628,713.69697 155.151515,727.589236 155.151515,744.727273 L155.151515,868.848485 C155.151515,885.986521 141.258628,899.878788 124.121212,899.878788 L93.0909091,899.878788 L93.0909091,713.69697 Z M434.424242,713.69697 C417.286206,713.69697 403.393939,727.589236 403.393939,744.727273 L403.393939,868.848485 C403.393939,885.986521 417.286206,899.878788 434.424242,899.878788 L465.454545,899.878788 L465.454545,713.69697 L434.424242,713.69697 Z", id: "Shape", fill: "#FFFFFF", opacity: "0.5" }),
39
- React__default.createElement("path", { d: "M93.0909091,279.272727 C113.777881,268.929396 192.387879,248.242424 279.272727,248.242424 C366.157576,248.242424 444.766642,268.929396 465.454545,279.272727 L403.393939,372.363636 C393.051539,362.021236 341.333333,341.333333 279.272727,341.333333 C217.212121,341.333333 165.494846,362.021236 155.151515,372.363636 L93.0909091,279.272727 Z M155.151515,512 L155.151515,403.393939 L93.0909091,310.30303 L93.0909091,512 L155.151515,512 Z M403.393939,512 L403.393939,403.393939 L465.454545,310.30303 L465.454545,512 L403.393939,512 Z", id: "Shape", fill: "#2A2A2A" })));
40
- }
41
10
 
42
- exports.Icon = Icon;
11
+ exports.Icon = Icon.Icon;
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var design = require('@jobber/design');
5
+
6
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
7
+
8
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
9
+
10
+ function Icon(_a) {
11
+ var name = _a.name, color = _a.color, customColor = _a.customColor, _b = _a.size, size = _b === void 0 ? "base" : _b;
12
+ var icon;
13
+ var _c = design.getIcon({
14
+ name: name,
15
+ color: getIconColor(name, color),
16
+ size: size,
17
+ }), svgClassNames = _c.svgClassNames, pathClassNames = _c.pathClassNames, paths = _c.paths, viewBox = _c.viewBox;
18
+ if (name === "truck") {
19
+ icon = getTruck(pathClassNames, customColor);
20
+ }
21
+ else {
22
+ icon = paths.map(function (path) { return (React__default["default"].createElement("path", { key: path, className: pathClassNames, d: path, fill: customColor })); });
23
+ }
24
+ return (React__default["default"].createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: viewBox, className: svgClassNames, "data-testid": name }, icon));
25
+ }
26
+ function getIconColor(name, color) {
27
+ if (name === "truck") {
28
+ return color || "green";
29
+ }
30
+ return color;
31
+ }
32
+ function getTruck(pathClassNames, customColor) {
33
+ return (React__default["default"].createElement("g", { transform: "translate(233.000000, 0.000000)", className: pathClassNames },
34
+ React__default["default"].createElement("path", { d: "M31.030303,124.121212 C31.030303,106.983796 44.9231903,93.0909091 62.0606061,93.0909091 L93.0909091,93.0909091 L93.0909091,279.272727 L62.0606061,279.272727 C44.9231903,279.272727 31.030303,265.37984 31.030303,248.242424 L31.030303,124.121212 Z M31.030303,744.727273 C31.030303,727.589236 44.9231903,713.69697 62.0606061,713.69697 L93.0909091,713.69697 L93.0909091,899.878788 L62.0606061,899.878788 C44.9231903,899.878788 31.030303,885.986521 31.030303,868.848485 L31.030303,744.727273 Z M62.0606061,961.939394 L496.484848,961.939394 L496.484848,992.969697 C496.484848,1010.10773 482.592582,1024 465.454545,1024 L93.0909091,1024 C75.9534933,1024 62.0606061,1010.10773 62.0606061,992.969697 L62.0606061,961.939394 Z M494.858861,713.715588 L463.834764,714.258618 L467.083636,900.412509 L498.107733,899.869479 C515.242667,899.571588 528.889794,885.437285 528.591903,868.302352 L526.425988,744.199758 C526.128097,727.064824 511.993794,713.417697 494.858861,713.715588 Z M496.484848,93.0909091 L465.454545,93.0909091 L465.454545,279.272727 L496.484848,279.272727 C513.622885,279.272727 527.515152,265.37984 527.515152,248.242424 L527.515152,124.121212 C527.515152,106.983796 513.622885,93.0909091 496.484848,93.0909091 Z", id: "Shape", fill: "#2B2B2B" }),
35
+ React__default["default"].createElement("path", { d: "M124.121212,0 C89.8460703,0 62.0606061,27.7854642 62.0606061,62.0606061 L62.0606061,310.30303 L31.030303,310.30303 C13.8927321,310.30303 0,324.195297 0,341.333333 L62.0606061,341.333333 L62.0606061,992.969697 L496.484848,992.969697 L496.484848,341.333333 L558.545455,341.333333 C558.545455,324.195297 544.653188,310.30303 527.515152,310.30303 L496.484848,310.30303 L496.484848,62.0606061 C496.484848,27.7854642 468.700315,0 434.424242,0 L124.121212,0 Z", id: "Path", fill: customColor }),
36
+ React__default["default"].createElement("path", { d: "M465.454545,589.575758 L93.0909091,589.575758 L93.0909091,713.69697 L124.121212,713.69697 C141.258628,713.69697 155.151515,727.589236 155.151515,744.727273 L155.151515,868.848485 C155.151515,885.986521 141.258628,899.878788 124.121212,899.878788 L93.0909091,899.878788 L93.0909091,961.939394 L465.454545,961.939394 L465.454545,899.878788 L434.424242,899.878788 C417.286206,899.878788 403.393939,885.986521 403.393939,868.848485 L403.393939,744.727273 C403.393939,727.589236 417.286206,713.69697 434.424242,713.69697 L465.454545,713.69697 L465.454545,589.575758 Z", id: "Path", fillOpacity: "0.35", fill: "#000000" }),
37
+ React__default["default"].createElement("path", { d: "M93.0909091,62.0606061 C93.0909091,44.9231903 106.983796,31.030303 124.121212,31.030303 L434.424242,31.030303 C451.562279,31.030303 465.454545,44.9231903 465.454545,62.0606061 L465.454545,589.575758 L93.0909091,589.575758 L93.0909091,62.0606061 Z M93.0909091,713.69697 L124.121212,713.69697 C141.258628,713.69697 155.151515,727.589236 155.151515,744.727273 L155.151515,868.848485 C155.151515,885.986521 141.258628,899.878788 124.121212,899.878788 L93.0909091,899.878788 L93.0909091,713.69697 Z M434.424242,713.69697 C417.286206,713.69697 403.393939,727.589236 403.393939,744.727273 L403.393939,868.848485 C403.393939,885.986521 417.286206,899.878788 434.424242,899.878788 L465.454545,899.878788 L465.454545,713.69697 L434.424242,713.69697 Z", id: "Shape", fill: "#FFFFFF", opacity: "0.5" }),
38
+ React__default["default"].createElement("path", { d: "M93.0909091,279.272727 C113.777881,268.929396 192.387879,248.242424 279.272727,248.242424 C366.157576,248.242424 444.766642,268.929396 465.454545,279.272727 L403.393939,372.363636 C393.051539,362.021236 341.333333,341.333333 279.272727,341.333333 C217.212121,341.333333 165.494846,362.021236 155.151515,372.363636 L93.0909091,279.272727 Z M155.151515,512 L155.151515,403.393939 L93.0909091,310.30303 L93.0909091,512 L155.151515,512 Z M403.393939,512 L403.393939,403.393939 L465.454545,310.30303 L465.454545,512 L403.393939,512 Z", id: "Shape", fill: "#2A2A2A" })));
39
+ }
40
+
41
+ exports.Icon = Icon;
@@ -1,17 +1,17 @@
1
- import { ReactNode } from "react";
2
- export declare type InlineLabelColors = "greyBlue" | "red" | "orange" | "green" | "blue" | "yellow" | "lime" | "purple" | "pink" | "teal" | "yellowGreen" | "blueDark" | "lightBlue" | "indigo";
3
- interface InlineLabelProps {
4
- /**
5
- * The size of the label
6
- * @default base
7
- */
8
- size?: "base" | "large" | "larger";
9
- /**
10
- * The color of the label
11
- * @default "greyBlue"
12
- */
13
- color?: InlineLabelColors;
14
- children: ReactNode;
15
- }
16
- export declare function InlineLabel({ size, color, children, }: InlineLabelProps): JSX.Element;
17
- export {};
1
+ import { ReactNode } from "react";
2
+ export declare type InlineLabelColors = "greyBlue" | "red" | "orange" | "green" | "blue" | "yellow" | "lime" | "purple" | "pink" | "teal" | "yellowGreen" | "blueDark" | "lightBlue" | "indigo";
3
+ interface InlineLabelProps {
4
+ /**
5
+ * The size of the label
6
+ * @default base
7
+ */
8
+ size?: "base" | "large" | "larger";
9
+ /**
10
+ * The color of the label
11
+ * @default "greyBlue"
12
+ */
13
+ color?: InlineLabelColors;
14
+ children: ReactNode;
15
+ }
16
+ export declare function InlineLabel({ size, color, children, }: InlineLabelProps): JSX.Element;
17
+ export {};
@@ -1 +1 @@
1
- export { InlineLabel, InlineLabelColors } from "./InlineLabel";
1
+ export { InlineLabel, InlineLabelColors } from "./InlineLabel";
@@ -2,29 +2,31 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
-
7
- require('../chunk-b67af3cb.js');
8
5
  var React = require('react');
9
- var React__default = _interopDefault(React);
10
- var __chunk_2 = require('../chunk-17e02351.js');
11
- var classnames = _interopDefault(require('classnames'));
12
- var index = require('../Typography/index.js');
6
+ var classnames = require('classnames');
7
+ var styleInject_es = require('../style-inject.es-dcee06b6.js');
8
+ var Typography = require('../Typography-7e542a72.js');
9
+ require('../tslib.es6-5b50eb8e.js');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
+ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
13
15
 
14
16
  var css = "._2CX7X_wH5lb0fioNTuYTB3 {\n display: -ms-inline-flexbox;\n display: inline-flex;\n border-radius: var(--radius-large);\n}\n\n.hIEzl9j3x8azFGCx53-RF {\n padding: var(--space-smaller) var(--space-small);\n}\n\n._2FEAdHSbQ1julTQlXKcU9G {\n padding: var(--space-smaller) calc(var(--space-base) - var(--space-smallest));\n}\n\n.y2IZqgoDbEVd68JUw74_V {\n padding: var(--space-small) var(--space-base);\n}\n\n._3ayhjHoV55pJnCyceIIodY {\n color: var(--color-greyBlue--dark);\n background-color: var(--color-greyBlue--lightest);\n}\n\n._1NRX5K08cyefHFTjmEY7JC {\n color: var(--color-red--dark);\n background-color: var(--color-red--lightest);\n}\n\n._2WqpAFlUhWh2Wycr-r2uMn {\n color: var(--color-orange--dark);\n background-color: var(--color-orange--lightest);\n}\n\n.EM3QGMlc1v7pjfVBR2j82 {\n color: var(--color-green--dark);\n background-color: var(--color-green--lightest);\n}\n\n.LuBWHY5BJNh4RnEPozKgA {\n color: var(--color-blue--dark);\n background-color: var(--color-blue--lightest);\n}\n\n._36P3W4wMGeF6ObMYI87q2b {\n color: var(--color-navy--dark);\n background-color: var(--color-navy--lightest);\n}\n\n.z7yJ1rNuOTksBtZ0cr3ys {\n color: var(--color-yellow--dark);\n background-color: var(--color-yellow--lightest);\n}\n\n._2jRJWXkl2av1GzSTdc4GS {\n color: var(--color-lime--dark);\n background-color: var(--color-lime--lightest);\n}\n\n._2DSYzUVBgtIaB1xsMr7rVj {\n color: var(--color-purple--dark);\n background-color: var(--color-purple--lightest);\n}\n\n._27cvq6AfdeOP6SUuX5Ex_T {\n color: var(--color-pink--dark);\n background-color: var(--color-pink--lightest);\n}\n\n.eImPpTsVAb13A3dFkEkBc {\n color: var(--color-teal--dark);\n background-color: var(--color-teal--lightest);\n}\n\n._1AcWxzfWcjE71_gRrEo-J_ {\n color: var(--color-yellowGreen--dark);\n background-color: var(--color-yellowGreen--lightest);\n}\n\n.J21zEr7ZIvGwt6R5-MZQ7 {\n color: var(--color-white);\n background-color: var(--color-blue--light);\n}\n\n._27HNFihCeydE5HUcbCskQ4 {\n color: var(--color-lightBlue--dark);\n background-color: var(--color-lightBlue--lightest);\n}\n\n._3_dDXhHTqG9pa_au-60pWR {\n color: var(--color-indigo--dark);\n background-color: var(--color-indigo--lightest);\n}\n";
15
17
  var styles = {"inlineLabel":"_2CX7X_wH5lb0fioNTuYTB3","base":"hIEzl9j3x8azFGCx53-RF","large":"_2FEAdHSbQ1julTQlXKcU9G","larger":"y2IZqgoDbEVd68JUw74_V","greyBlue":"_3ayhjHoV55pJnCyceIIodY","red":"_1NRX5K08cyefHFTjmEY7JC","orange":"_2WqpAFlUhWh2Wycr-r2uMn","green":"EM3QGMlc1v7pjfVBR2j82","blue":"LuBWHY5BJNh4RnEPozKgA","navy":"_36P3W4wMGeF6ObMYI87q2b","yellow":"z7yJ1rNuOTksBtZ0cr3ys","lime":"_2jRJWXkl2av1GzSTdc4GS","purple":"_2DSYzUVBgtIaB1xsMr7rVj","pink":"_27cvq6AfdeOP6SUuX5Ex_T","teal":"eImPpTsVAb13A3dFkEkBc","yellowGreen":"_1AcWxzfWcjE71_gRrEo-J_","blueDark":"J21zEr7ZIvGwt6R5-MZQ7","lightBlue":"_27HNFihCeydE5HUcbCskQ4","indigo":"_3_dDXhHTqG9pa_au-60pWR"};
16
- __chunk_2.styleInject(css);
18
+ styleInject_es.styleInject(css);
17
19
 
18
- function InlineLabel(_a) {
19
- var _b = _a.size, size = _b === void 0 ? "base" : _b, _c = _a.color, color = _c === void 0 ? "greyBlue" : _c, children = _a.children;
20
- var className = classnames(styles.inlineLabel, styles[size], styles[color]);
21
- var sizeMapper = {
22
- base: "small",
23
- large: "base",
24
- larger: "large",
25
- };
26
- return (React__default.createElement("span", { className: className },
27
- React__default.createElement(index.Typography, { element: "span", size: sizeMapper[size], textCase: "uppercase" }, children)));
20
+ function InlineLabel(_a) {
21
+ var _b = _a.size, size = _b === void 0 ? "base" : _b, _c = _a.color, color = _c === void 0 ? "greyBlue" : _c, children = _a.children;
22
+ var className = classnames__default["default"](styles.inlineLabel, styles[size], styles[color]);
23
+ var sizeMapper = {
24
+ base: "small",
25
+ large: "base",
26
+ larger: "large",
27
+ };
28
+ return (React__default["default"].createElement("span", { className: className },
29
+ React__default["default"].createElement(Typography.Typography, { element: "span", size: sizeMapper[size], textCase: "uppercase" }, children)));
28
30
  }
29
31
 
30
32
  exports.InlineLabel = InlineLabel;
@@ -1,22 +1,22 @@
1
- import { AvatarProps } from "../Avatar";
2
- import { FileUpload, UploadParams } from "../InputFile";
3
- interface InputAvatarProps extends Omit<AvatarProps, "size"> {
4
- /**
5
- * A callback that receives a file object and returns a `UploadParams` needed
6
- * to upload the file.
7
- *
8
- * More info is available at:
9
- * https://atlantis.getjobber.com/components/input-file#getuploadparams
10
- */
11
- getUploadParams(file: File): UploadParams | Promise<UploadParams>;
12
- /**
13
- * Triggered when an image is changed.
14
- */
15
- onChange?(file?: FileUpload): void;
16
- /**
17
- * Triggered when an image upload has completed.
18
- */
19
- onUploadComplete?(file?: FileUpload): void;
20
- }
21
- export declare function InputAvatar({ getUploadParams, onUploadComplete, onChange, ...avatarProps }: InputAvatarProps): JSX.Element;
22
- export {};
1
+ import { AvatarProps } from "../Avatar";
2
+ import { FileUpload, UploadParams } from "../InputFile";
3
+ interface InputAvatarProps extends Omit<AvatarProps, "size"> {
4
+ /**
5
+ * A callback that receives a file object and returns a `UploadParams` needed
6
+ * to upload the file.
7
+ *
8
+ * More info is available at:
9
+ * https://atlantis.getjobber.com/components/input-file#getuploadparams
10
+ */
11
+ getUploadParams(file: File): UploadParams | Promise<UploadParams>;
12
+ /**
13
+ * Triggered when an image is changed.
14
+ */
15
+ onChange?(file?: FileUpload): void;
16
+ /**
17
+ * Triggered when an image upload has completed.
18
+ */
19
+ onUploadComplete?(file?: FileUpload): void;
20
+ }
21
+ export declare function InputAvatar({ getUploadParams, onUploadComplete, onChange, ...avatarProps }: InputAvatarProps): JSX.Element;
22
+ export {};
@@ -1 +1 @@
1
- export { InputAvatar } from "./InputAvatar";
1
+ export { InputAvatar } from "./InputAvatar";