@jobber/components 4.85.4-CJS-to-ESM.1 → 4.85.4

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 (139) hide show
  1. package/.eslintrc.js +10 -0
  2. package/dist/AnimatedPresence/index.js +12 -0
  3. package/dist/AnimatedPresence-20a02aaa.js +104 -0
  4. package/dist/AnimatedSwitcher/index.js +13 -0
  5. package/dist/AnimatedSwitcher-3d45ec5d.js +96 -0
  6. package/dist/Autocomplete/index.js +209 -0
  7. package/dist/Avatar/index.js +15 -0
  8. package/dist/Avatar-76a799fa.js +78 -0
  9. package/dist/Banner/index.js +110 -0
  10. package/dist/Button/index.js +16 -0
  11. package/dist/Button-b73a5e01.js +57 -0
  12. package/dist/ButtonDismiss/index.js +17 -0
  13. package/dist/ButtonDismiss-350af163.js +14 -0
  14. package/dist/Card/colors.css.d.ts +89 -0
  15. package/dist/Card/index.js +24 -0
  16. package/dist/Card-e3144022.js +93 -0
  17. package/dist/Checkbox/index.js +18 -0
  18. package/dist/Checkbox-787e2e47.js +63 -0
  19. package/dist/Chip/index.js +41 -0
  20. package/dist/Chip-3d1bfddc.js +89 -0
  21. package/dist/Chips/index.js +524 -0
  22. package/dist/Combobox/index.js +40 -0
  23. package/dist/Combobox-a24c8241.js +479 -0
  24. package/dist/ConfirmationModal/index.js +31 -0
  25. package/dist/ConfirmationModal-52e16873.js +100 -0
  26. package/dist/Content/Spacing.css.d.ts +13 -0
  27. package/dist/Content/index.js +12 -0
  28. package/dist/Content-e3f7b6fc.js +24 -0
  29. package/dist/Countdown/index.js +72 -0
  30. package/dist/DataDump/index.js +37 -0
  31. package/dist/DataList/index.js +1335 -0
  32. package/dist/DataTable/index.js +301 -0
  33. package/dist/DatePicker/index.js +20 -0
  34. package/dist/DatePicker-64c5ab1a.js +134 -0
  35. package/dist/DescriptionList/index.js +24 -0
  36. package/dist/Disclosure/index.js +46 -0
  37. package/dist/Divider/index.js +29 -0
  38. package/dist/Drawer/index.js +49 -0
  39. package/dist/Emphasis/index.js +13 -0
  40. package/dist/Emphasis-bda56d3b.js +19 -0
  41. package/dist/FeatureSwitch/index.js +70 -0
  42. package/dist/Flex/index.js +12 -0
  43. package/dist/Flex-d490c4db.js +38 -0
  44. package/dist/Form/index.js +56 -0
  45. package/dist/FormField/index.js +24 -0
  46. package/dist/FormField-6ff183f8.js +253 -0
  47. package/dist/FormatDate/index.js +11 -0
  48. package/dist/FormatDate-70ea5b43.js +34 -0
  49. package/dist/FormatEmail/index.js +23 -0
  50. package/dist/FormatFile/index.js +36 -0
  51. package/dist/FormatFile-f036902d.js +162 -0
  52. package/dist/FormatRelativeDateTime/index.js +72 -0
  53. package/dist/FormatTime/index.js +36 -0
  54. package/dist/Gallery/Gallery.css.d.ts +9 -0
  55. package/dist/Gallery/index.js +99 -0
  56. package/dist/Glimmer/index.js +15 -0
  57. package/dist/Glimmer/style/Shape.css.d.ts +9 -0
  58. package/dist/Glimmer/style/Sizes.css.d.ts +10 -0
  59. package/dist/Glimmer/style/Timing.css.d.ts +6 -0
  60. package/dist/Glimmer-84dee1ed.js +77 -0
  61. package/dist/Grid/GridAlign.css.d.ts +8 -0
  62. package/dist/Grid/index.js +76 -0
  63. package/dist/Heading/index.js +14 -0
  64. package/dist/Heading-1e8e4bd3.js +55 -0
  65. package/dist/Icon/index.js +11 -0
  66. package/dist/Icon-405a216c.js +40 -0
  67. package/dist/InlineLabel/index.js +13 -0
  68. package/dist/InlineLabel-a6557829.js +28 -0
  69. package/dist/InputAvatar/index.js +70 -0
  70. package/dist/InputDate/index.js +57 -0
  71. package/dist/InputEmail/index.js +43 -0
  72. package/dist/InputFile/index.js +25 -0
  73. package/dist/InputFile-bb945071.js +190 -0
  74. package/dist/InputGroup/index.js +12 -0
  75. package/dist/InputGroup-8d4fd4eb.js +33 -0
  76. package/dist/InputNumber/index.js +25 -0
  77. package/dist/InputNumber-d451b52e.js +62 -0
  78. package/dist/InputPassword/index.js +41 -0
  79. package/dist/InputPhoneNumber/index.js +116 -0
  80. package/dist/InputText/index.js +26 -0
  81. package/dist/InputText-55b6cb65.js +102 -0
  82. package/dist/InputTime/index.js +209 -0
  83. package/dist/InputValidation/index.js +17 -0
  84. package/dist/InputValidation-05e839fa.js +29 -0
  85. package/dist/LightBox/index.js +24 -0
  86. package/dist/LightBox-a89d8863.js +117 -0
  87. package/dist/Link/index.js +15 -0
  88. package/dist/List/index.js +93 -0
  89. package/dist/Markdown/index.js +19 -0
  90. package/dist/Markdown-f7c55304.js +62 -0
  91. package/dist/Menu/index.js +21 -0
  92. package/dist/Menu-083fc4c4.js +139 -0
  93. package/dist/Modal/Sizes.css.d.ts +6 -0
  94. package/dist/Modal/index.js +25 -0
  95. package/dist/Modal-c336cac6.js +71 -0
  96. package/dist/MultiSelect/index.js +182 -0
  97. package/dist/Option-3c4d377e.js +19 -0
  98. package/dist/Page/index.js +78 -0
  99. package/dist/Popover/index.js +61 -0
  100. package/dist/ProgressBar/Sizes.css.d.ts +7 -0
  101. package/dist/ProgressBar/index.js +12 -0
  102. package/dist/ProgressBar-b68edc8f.js +43 -0
  103. package/dist/RadioGroup/index.js +15 -0
  104. package/dist/RadioGroup-17b67ade.js +46 -0
  105. package/dist/RecurringSelect/index.js +227 -0
  106. package/dist/Select/index.js +26 -0
  107. package/dist/Spinner/index.js +12 -0
  108. package/dist/Spinner-9d8fc7ff.js +24 -0
  109. package/dist/StatusIndicator/index.js +11 -0
  110. package/dist/StatusIndicator-b179d06e.js +18 -0
  111. package/dist/StatusLabel/index.js +29 -0
  112. package/dist/Switch/index.js +13 -0
  113. package/dist/Switch-7d4aa7c3.js +56 -0
  114. package/dist/Table/index.js +66 -0
  115. package/dist/Tabs/index.js +80 -0
  116. package/dist/Text/index.js +13 -0
  117. package/dist/Text-259af966.js +31 -0
  118. package/dist/Toast/index.js +111 -0
  119. package/dist/Tooltip/index.js +16 -0
  120. package/dist/Tooltip-ef3d6ef4.js +112 -0
  121. package/dist/Typography/css/Emphasis.css.d.ts +6 -0
  122. package/dist/Typography/css/FontFamilies.css.d.ts +6 -0
  123. package/dist/Typography/css/FontSizes.css.d.ts +12 -0
  124. package/dist/Typography/css/FontWeights.css.d.ts +10 -0
  125. package/dist/Typography/css/TextAlignment.css.d.ts +7 -0
  126. package/dist/Typography/css/TextCases.css.d.ts +7 -0
  127. package/dist/Typography/css/TextColors.css.d.ts +22 -0
  128. package/dist/Typography/css/Truncate.css.d.ts +5 -0
  129. package/dist/Typography/css/Typography.css.d.ts +5 -0
  130. package/dist/Typography/index.js +12 -0
  131. package/dist/Typography-c45bf216.js +62 -0
  132. package/dist/getAtlantisConfig-0f3e8af2.js +13 -0
  133. package/dist/style-inject.es-9d2f5f4e.js +30 -0
  134. package/dist/tslib.es6-754e2961.js +46 -0
  135. package/package.json +4 -371
  136. package/rollup.config.js +77 -21
  137. package/dist/index.cjs +0 -6721
  138. package/dist/index.d.ts +0 -73
  139. package/dist/index.esm.js +0 -6603
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var Typography = require('./Typography-c45bf216.js');
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 Text({ variation = "default", size = "base", align = "start", children, maxLines = "unlimited", }) {
11
+ const textColors = {
12
+ default: "text",
13
+ subdued: "textSecondary",
14
+ success: "success",
15
+ error: "critical",
16
+ warn: "warning",
17
+ info: "informative",
18
+ disabled: "disabled",
19
+ };
20
+ const maxLineToNumber = {
21
+ single: 1,
22
+ small: 2,
23
+ base: 4,
24
+ large: 8,
25
+ larger: 16,
26
+ unlimited: undefined,
27
+ };
28
+ return (React__default["default"].createElement(Typography.Typography, { textColor: textColors[variation], size: size, numberOfLines: maxLineToNumber[maxLines], align: align }, children));
29
+ }
30
+
31
+ exports.Text = Text;
@@ -0,0 +1,111 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var client = require('react-dom/client');
7
+ var framerMotion = require('framer-motion');
8
+ var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
9
+ var Icon = require('../Icon-405a216c.js');
10
+ var Button = require('../Button-b73a5e01.js');
11
+ var Typography = require('../Typography-c45bf216.js');
12
+ require('@jobber/design');
13
+ require('classnames');
14
+ require('react-router-dom');
15
+
16
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
+
18
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
19
+
20
+ var css_248z = ".FVK4VwhLaVQ- {\n position: relative;\n z-index: 1003;\n z-index: var(--elevation-toast);\n}\n\n.MUXYGaC7Msg- {\n display: -ms-flexbox;\n display: flex;\n position: fixed;\n right: 0;\n bottom: calc(16px * 1.5);\n bottom: var(--space-large);\n left: 0;\n z-index: 1003;\n z-index: var(--elevation-toast);\n width: 100%;\n box-sizing: border-box;\n -ms-flex-direction: column;\n flex-direction: column;\n -ms-flex-align: center;\n align-items: center;\n padding: 0 calc(16px * 1.5);\n padding: 0 var(--space-large);\n color: rgba(255, 255, 255, 1);\n color: var(--color-text--reverse);\n font-size: calc(16px * 1);\n font-size: var(--typography--fontSize-large);\n pointer-events: none;\n}\n\n.yCRa7jHH33M- {\n box-shadow: 0px calc(16px * 1) calc(16px * 1) 0px\n rgba(0, 0, 0, 0.075),\n 0px 0px calc(16px / 2) 0px rgba(0, 0, 0, 0.05);\n box-shadow: var(--shadow-high);\n overflow: hidden;\n pointer-events: all;\n}\n\n.yCRa7jHH33M- + .yCRa7jHH33M- {\n margin-top: calc(16px * 1);\n margin-top: var(--space-base);\n}\n\n.KiJL-VNZ3Sg- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n padding: calc((16px / 2) / 1.25) calc(16px * 1);\n padding: calc(calc(16px / 2) / 1.25) calc(16px * 1);\n padding: calc(var(--space-small) / 1.25) var(--space-base);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n background: rgb(1, 41, 57);\n background: var(--color-surface--reverse);\n}\n\n.xtRB59TMHcU- {\n margin-right: calc(16px * 1);\n margin-right: var(--space-base);\n}\n\n.cExoS0APILs- {\n margin-left: calc(16px * 1);\n margin-left: var(--space-base);\n}\n\n.jobber-retheme .cExoS0APILs- svg path {\n fill: rgb(147, 161, 169);\n fill: var(--color-greyBlue--light);\n}\n\n.jobber-retheme .cExoS0APILs-:hover svg path {\n fill: rgba(101, 120, 132, 1);\n fill: var(--color-greyBlue);\n}\n\n.-T38wWbQUNs- {\n margin-left: calc(16px / 2);\n margin-left: var(--space-small);\n}\n";
21
+ var styles = {"wrapper":"FVK4VwhLaVQ-","container":"MUXYGaC7Msg-","toast":"yCRa7jHH33M-","slice":"KiJL-VNZ3Sg-","icon":"xtRB59TMHcU-","button":"cExoS0APILs-","action":"-T38wWbQUNs-"};
22
+ styleInject_es.styleInject(css_248z);
23
+
24
+ function Toast({ message, variation = "success", action, actionLabel, }) {
25
+ const [visible, setVisible] = React.useState(true);
26
+ const icon = getIcon();
27
+ let timer;
28
+ React.useEffect(() => startTimer(), []);
29
+ return (React__default["default"].createElement(framerMotion.AnimatePresence, null, visible && (React__default["default"].createElement(framerMotion.motion.div, { className: styles.toast, initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, onMouseEnter: () => stopTimer(), onMouseLeave: () => startTimer(), exit: {
30
+ opacity: 0,
31
+ scale: 0.8,
32
+ height: 0,
33
+ transition: { duration: 0.4 },
34
+ } },
35
+ React__default["default"].createElement("div", { className: styles.slice },
36
+ React__default["default"].createElement("div", { className: styles.icon },
37
+ React__default["default"].createElement(Icon.Icon, { color: icon.color, name: icon.name })),
38
+ React__default["default"].createElement(Typography.Typography, { element: "span", size: "large" }, message),
39
+ action && (React__default["default"].createElement(Button.Button, { label: `${actionLabel}`, onClick: action, type: "tertiary" })),
40
+ React__default["default"].createElement("div", { className: styles.button },
41
+ React__default["default"].createElement(Button.Button, { icon: "remove", ariaLabel: "Hide Notification", onClick: handleToastClose, type: "tertiary", variation: "subtle" })))))));
42
+ function startTimer() {
43
+ timer = setTimeout(() => handleToastClose(), getTimeout());
44
+ }
45
+ function stopTimer() {
46
+ clearTimeout(timer);
47
+ }
48
+ function handleToastClose() {
49
+ setVisible(false);
50
+ }
51
+ function getTimeout() {
52
+ const min = 5000;
53
+ const max = 10000;
54
+ const time = message.length * 200;
55
+ if (time < min)
56
+ return min;
57
+ if (time > max)
58
+ return max;
59
+ return time;
60
+ }
61
+ function getIcon() {
62
+ switch (variation) {
63
+ case "info":
64
+ return { name: "knot", color: "lightBlue" };
65
+ case "error":
66
+ return { name: "alert", color: "red" };
67
+ default:
68
+ return { name: "checkmark", color: "green" };
69
+ }
70
+ }
71
+ }
72
+
73
+ const targetId = "atlantis-toast-element";
74
+ let target = document.querySelector(`#${targetId}`);
75
+ if (!target) {
76
+ target = document.createElement("div");
77
+ target.id = targetId;
78
+ target.classList.add(styles.wrapper);
79
+ document.body.appendChild(target);
80
+ }
81
+ const root = client.createRoot(target);
82
+ function showToast(props) {
83
+ // Ensure target and body is still there when rendering the toast. This is due
84
+ // to an issue with ReactDOM createRoot assuming document is always there and
85
+ // Jest taking the document down.
86
+ if (document.body.contains(target)) {
87
+ root.render(React__default["default"].createElement(ToasterOven, Object.assign({}, props)));
88
+ }
89
+ }
90
+ const ToastContainer = React.forwardRef(ToastInternal);
91
+ function ToasterOven(props) {
92
+ const toastRef = React.useRef();
93
+ React.useEffect(() => toastRef.current.add(props));
94
+ return React__default["default"].createElement(ToastContainer, { ref: toastRef });
95
+ }
96
+ function ToastInternal(_, ref) {
97
+ const [toastKey, setToastKey] = React.useState(0);
98
+ const [toasts, setToasts] = React.useState([]);
99
+ React.useImperativeHandle(ref, () => ({
100
+ add: props => {
101
+ setToastKey(toastKey + 1);
102
+ setToasts([
103
+ Object.assign(Object.assign({}, props), { id: toastKey }),
104
+ ...toasts,
105
+ ]);
106
+ },
107
+ }));
108
+ return (React__default["default"].createElement("div", { className: styles.container }, toasts.map(toast => (React__default["default"].createElement(Toast, Object.assign({}, toast, { key: toast.id }))))));
109
+ }
110
+
111
+ exports.showToast = showToast;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Tooltip = require('../Tooltip-ef3d6ef4.js');
6
+ require('react');
7
+ require('classnames');
8
+ require('react-dom');
9
+ require('framer-motion');
10
+ require('@jobber/hooks/useSafeLayoutEffect');
11
+ require('../style-inject.es-9d2f5f4e.js');
12
+ require('react-popper');
13
+
14
+
15
+
16
+ exports.Tooltip = Tooltip.Tooltip;
@@ -0,0 +1,112 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var classnames = require('classnames');
5
+ var ReactDOM = require('react-dom');
6
+ var framerMotion = require('framer-motion');
7
+ var useSafeLayoutEffect = require('@jobber/hooks/useSafeLayoutEffect');
8
+ var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
9
+ var reactPopper = require('react-popper');
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);
15
+ var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
16
+
17
+ var css_248z = ":root {\n --tooltip--arrow-size: var(--space-small);\n --tooltip--offset: calc(-1 * var(--space-smaller));\n --tooltip--surface: var(--color-surface--reverse);\n}\n\n.q07bkGoq714- {\n display: none;\n}\n\n.dkCTRfc3vYk- {\n display: inline-block;\n position: absolute;\n z-index: 1002;\n z-index: var(--elevation-tooltip);\n pointer-events: none;\n}\n\n.yAFP4gRKlTM- {\n display: inline-block;\n position: relative;\n max-width: calc(16px * 15);\n max-width: calc(var(--base-unit) * 15);\n padding: calc((16px * 1) - (16px / 8)) calc(16px * 1);\n padding: calc(calc(16px * 1) - calc(16px / 8)) calc(16px * 1);\n padding: calc(var(--space-base) - var(--space-smallest)) var(--space-base);\n border-radius: calc(16px / 2);\n border-radius: var(--radius-larger);\n background-color: rgb(1, 41, 57);\n background-color: var(--tooltip--surface);\n}\n\n.jobber-retheme .yAFP4gRKlTM- {\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n}\n\n.yAFP4gRKlTM- .j9KgRON7iTU-,\n.yAFP4gRKlTM- .j9KgRON7iTU-::after {\n width: calc(16px / 2);\n width: var(--tooltip--arrow-size);\n height: calc(16px / 2);\n height: var(--tooltip--arrow-size);\n background-color: transparent;\n}\n\n.yAFP4gRKlTM- .j9KgRON7iTU-::after {\n content: \"\";\n display: block;\n position: absolute;\n background-color: rgb(1, 41, 57);\n background-color: var(--tooltip--surface);\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.B6uh34-qEuA- {\n padding-bottom: calc(16px / 2);\n padding-bottom: var(--space-small);\n}\n\n.B6uh34-qEuA- .yAFP4gRKlTM- {\n -webkit-transform-origin: bottom center;\n transform-origin: bottom center;\n}\n\n.B6uh34-qEuA- .yAFP4gRKlTM- .j9KgRON7iTU- {\n bottom: calc(-1 * (16px / 4));\n bottom: calc(-1 * calc(16px / 4));\n bottom: var(--tooltip--offset);\n}\n\n.B6uh34-qEuA- .yAFP4gRKlTM- .j9KgRON7iTU-::after {\n border-top-width: 0;\n border-left-width: 0;\n}\n\n.Wft7Ug-lXEc- {\n padding-top: calc(16px / 2);\n padding-top: var(--space-small);\n}\n\n.Wft7Ug-lXEc- .yAFP4gRKlTM- {\n -webkit-transform-origin: top center;\n transform-origin: top center;\n}\n\n.Wft7Ug-lXEc- .yAFP4gRKlTM- .j9KgRON7iTU- {\n top: calc(-1 * (16px / 4));\n top: calc(-1 * calc(16px / 4));\n top: var(--tooltip--offset);\n}\n\n.Wft7Ug-lXEc- .yAFP4gRKlTM- .j9KgRON7iTU-::after {\n border-bottom-width: 0;\n border-right-width: 0;\n}\n\n.TpdeLUuiQMg- {\n margin: 0;\n color: rgba(255, 255, 255, 1);\n color: var(--color-text--reverse);\n font-size: calc((16px * 1) * 0.875);\n font-size: calc(calc(16px * 1) * 0.875);\n font-size: var(--typography--fontSize-base);\n font-weight: 600;\n line-height: 1.25;\n line-height: var(--typography--lineHeight-base);\n}\n";
18
+ var styles = {"shadowActivator":"q07bkGoq714-","tooltipWrapper":"dkCTRfc3vYk-","tooltip":"yAFP4gRKlTM-","arrow":"j9KgRON7iTU-","above":"B6uh34-qEuA-","below":"Wft7Ug-lXEc-","tooltipMessage":"TpdeLUuiQMg-"};
19
+ styleInject_es.styleInject(css_248z);
20
+
21
+ function useTooltipPositioning() {
22
+ var _a, _b;
23
+ const shadowRef = React.useRef(null);
24
+ const [positionElement, setTooltipRef] = React.useState();
25
+ const [arrowElement, setArrowRef] = React.useState();
26
+ const popper = reactPopper.usePopper((_a = shadowRef.current) === null || _a === void 0 ? void 0 : _a.nextElementSibling, positionElement, {
27
+ placement: "top",
28
+ modifiers: [
29
+ { name: "flip", options: { fallbackPlacements: ["bottom"] } },
30
+ {
31
+ name: "arrow",
32
+ options: { element: arrowElement },
33
+ },
34
+ ],
35
+ });
36
+ return Object.assign(Object.assign({}, popper), { placement: (_b = popper.state) === null || _b === void 0 ? void 0 : _b.placement, shadowRef,
37
+ setArrowRef,
38
+ setTooltipRef });
39
+ }
40
+
41
+ const variation = {
42
+ startOrStop: { scale: 0.6, opacity: 0 },
43
+ done: { scale: 1, opacity: 1 },
44
+ };
45
+ function Tooltip({ message, children }) {
46
+ const [show, setShow] = React.useState(false);
47
+ const { attributes, placement, shadowRef, styles: popperStyles, setArrowRef, setTooltipRef, } = useTooltipPositioning();
48
+ initializeListeners();
49
+ const toolTipClassNames = classnames__default["default"](styles.tooltipWrapper, placement === "bottom" && styles.below, placement === "top" && styles.above);
50
+ return (React__default["default"].createElement(React__default["default"].Fragment, null,
51
+ React__default["default"].createElement("span", { className: styles.shadowActivator, ref: shadowRef }),
52
+ children,
53
+ React__default["default"].createElement(TooltipPortal, null, show && Boolean(message) && (React__default["default"].createElement("div", Object.assign({ className: toolTipClassNames, style: popperStyles.popper, ref: setTooltipRef, role: "tooltip" }, attributes.popper),
54
+ React__default["default"].createElement(framerMotion.motion.div, { className: styles.tooltip, variants: variation, initial: "startOrStop", animate: "done", exit: "startOrStop", transition: {
55
+ damping: 50,
56
+ stiffness: 500,
57
+ } },
58
+ React__default["default"].createElement("p", { className: styles.tooltipMessage }, message),
59
+ React__default["default"].createElement("div", { ref: setArrowRef, style: popperStyles.arrow, className: styles.arrow })))))));
60
+ function initializeListeners() {
61
+ const showTooltip = () => {
62
+ setShow(true);
63
+ };
64
+ const hideTooltip = () => {
65
+ setShow(false);
66
+ };
67
+ const injectAttributes = () => {
68
+ var _a;
69
+ if ((_a = shadowRef === null || shadowRef === void 0 ? void 0 : shadowRef.current) === null || _a === void 0 ? void 0 : _a.nextElementSibling) {
70
+ const activator = shadowRef.current.nextElementSibling;
71
+ // Manually inject "aria-description" and "tabindex" to let the screen
72
+ // readers read the tooltip message.
73
+ // This is to avoid having to add those attribute as a prop on every
74
+ // component we have.
75
+ activator.setAttribute("aria-description", message);
76
+ activator.setAttribute("tabindex", "0"); // enable focus
77
+ }
78
+ };
79
+ const addListeners = () => {
80
+ var _a;
81
+ if ((_a = shadowRef === null || shadowRef === void 0 ? void 0 : shadowRef.current) === null || _a === void 0 ? void 0 : _a.nextElementSibling) {
82
+ const activator = shadowRef.current.nextElementSibling;
83
+ activator.addEventListener("mouseenter", showTooltip);
84
+ activator.addEventListener("mouseleave", hideTooltip);
85
+ activator.addEventListener("focus", showTooltip);
86
+ activator.addEventListener("blur", hideTooltip);
87
+ }
88
+ };
89
+ const removeListeners = () => {
90
+ var _a;
91
+ if ((_a = shadowRef === null || shadowRef === void 0 ? void 0 : shadowRef.current) === null || _a === void 0 ? void 0 : _a.nextElementSibling) {
92
+ const activator = shadowRef.current.nextElementSibling;
93
+ activator.removeEventListener("mouseenter", showTooltip);
94
+ activator.removeEventListener("mouseleave", hideTooltip);
95
+ activator.removeEventListener("focus", showTooltip);
96
+ activator.removeEventListener("blur", hideTooltip);
97
+ }
98
+ };
99
+ useSafeLayoutEffect.useSafeLayoutEffect(() => {
100
+ injectAttributes();
101
+ addListeners();
102
+ return () => {
103
+ removeListeners();
104
+ };
105
+ }, []);
106
+ }
107
+ }
108
+ function TooltipPortal({ children }) {
109
+ return ReactDOM__default["default"].createPortal(children, document.body);
110
+ }
111
+
112
+ exports.Tooltip = Tooltip;
@@ -0,0 +1,6 @@
1
+ declare const styles: {
2
+ readonly "italic": string;
3
+ readonly "highlight": string;
4
+ };
5
+ export = styles;
6
+
@@ -0,0 +1,6 @@
1
+ declare const styles: {
2
+ readonly "base": string;
3
+ readonly "display": string;
4
+ };
5
+ export = styles;
6
+
@@ -0,0 +1,12 @@
1
+ declare const styles: {
2
+ readonly "extravagant": string;
3
+ readonly "jumbo": string;
4
+ readonly "largest": string;
5
+ readonly "larger": string;
6
+ readonly "large": string;
7
+ readonly "base": string;
8
+ readonly "small": string;
9
+ readonly "smaller": string;
10
+ };
11
+ export = styles;
12
+
@@ -0,0 +1,10 @@
1
+ declare const styles: {
2
+ readonly "regular": string;
3
+ readonly "medium": string;
4
+ readonly "semiBold": string;
5
+ readonly "bold": string;
6
+ readonly "extraBold": string;
7
+ readonly "black": string;
8
+ };
9
+ export = styles;
10
+
@@ -0,0 +1,7 @@
1
+ declare const styles: {
2
+ readonly "start": string;
3
+ readonly "center": string;
4
+ readonly "end": string;
5
+ };
6
+ export = styles;
7
+
@@ -0,0 +1,7 @@
1
+ declare const styles: {
2
+ readonly "uppercase": string;
3
+ readonly "lowercase": string;
4
+ readonly "capitalize": string;
5
+ };
6
+ export = styles;
7
+
@@ -0,0 +1,22 @@
1
+ declare const styles: {
2
+ readonly "blue": string;
3
+ readonly "grey": string;
4
+ readonly "greyBlueDark": string;
5
+ readonly "greyBlue": string;
6
+ readonly "green": string;
7
+ readonly "red": string;
8
+ readonly "yellow": string;
9
+ readonly "yellowDark": string;
10
+ readonly "lightBlue": string;
11
+ readonly "white": string;
12
+ readonly "heading": string;
13
+ readonly "text": string;
14
+ readonly "textSecondary": string;
15
+ readonly "critical": string;
16
+ readonly "warning": string;
17
+ readonly "informative": string;
18
+ readonly "success": string;
19
+ readonly "disabled": string;
20
+ };
21
+ export = styles;
22
+
@@ -0,0 +1,5 @@
1
+ declare const styles: {
2
+ readonly "textTruncate": string;
3
+ };
4
+ export = styles;
5
+
@@ -0,0 +1,5 @@
1
+ declare const styles: {
2
+ readonly "base": string;
3
+ };
4
+ export = styles;
5
+
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Typography = require('../Typography-c45bf216.js');
6
+ require('react');
7
+ require('classnames');
8
+ require('../style-inject.es-9d2f5f4e.js');
9
+
10
+
11
+
12
+ exports.Typography = Typography.Typography;
@@ -0,0 +1,62 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var classnames = require('classnames');
5
+ var styleInject_es = require('./style-inject.es-9d2f5f4e.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
+ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
11
+
12
+ var css_248z$8 = ".asDB9Ra2UpA- {\n margin: 0;\n padding: 0;\n font-family: \"Inter\", Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-normal);\n /* Wrap really long words or URL's */\n word-wrap: break-word;\n overflow-wrap: break-word;\n word-wrap: break-word;\n}\n";
13
+ var styles = {"base":"asDB9Ra2UpA-"};
14
+ styleInject_es.styleInject(css_248z$8);
15
+
16
+ var css_248z$7 = "._7C4Ck1izBPs- {\n font-size: calc(\n (16px * 1) * 3\n );\n font-size: calc(\n calc(16px * 1) * 3\n );\n font-size: var(--typography--fontSize-extravagant);\n line-height: 1.08;\n line-height: var(--typography--lineHeight-miniscule);\n}\n\n._8X-fSrUTxV8- {\n font-size: calc((16px * 1) * 2.25);\n font-size: calc(calc(16px * 1) * 2.25);\n font-size: var(--typography--fontSize-jumbo);\n line-height: 1.08;\n line-height: var(--typography--lineHeight-miniscule);\n}\n\n.n-SPJXPXLSA- {\n font-size: calc((16px * 1) * 1.5);\n font-size: calc(calc(16px * 1) * 1.5);\n font-size: var(--typography--fontSize-largest);\n line-height: 1.12;\n line-height: var(--typography--lineHeight-tightest);\n}\n\n.vCrvF55YQ9o- {\n font-size: calc((16px * 1) * 1.25);\n font-size: calc(calc(16px * 1) * 1.25);\n font-size: var(--typography--fontSize-larger);\n line-height: 1.2;\n line-height: var(--typography--lineHeight-tight);\n}\n\n.FBoaHWotSik- {\n font-size: calc(16px * 1);\n font-size: var(--typography--fontSize-large);\n line-height: 1.34;\n line-height: var(--typography--lineHeight-large);\n}\n\n.V6yPPLHLeuY- {\n font-size: calc((16px * 1) * 0.875);\n font-size: calc(calc(16px * 1) * 0.875);\n font-size: var(--typography--fontSize-base);\n line-height: 1.25;\n line-height: var(--typography--lineHeight-base);\n}\n\n.T5XC4DgJlxk- {\n font-size: calc((16px * 1) * 0.75);\n font-size: calc(calc(16px * 1) * 0.75);\n font-size: var(--typography--fontSize-small);\n line-height: 1.143;\n line-height: var(--typography--lineHeight-tighter);\n}\n\n.sycqXMMO-wc- {\n font-size: calc(\n (16px * 1) * 0.625\n );\n font-size: calc(\n calc(16px * 1) * 0.625\n );\n font-size: var(--typography--fontSize-smaller);\n line-height: 1.2;\n line-height: var(--typography--lineHeight-tight);\n}\n";
17
+ var fontSizes = {"extravagant":"_7C4Ck1izBPs-","jumbo":"_8X-fSrUTxV8-","largest":"n-SPJXPXLSA-","larger":"vCrvF55YQ9o-","large":"FBoaHWotSik-","base":"V6yPPLHLeuY-","small":"T5XC4DgJlxk-","smaller":"sycqXMMO-wc-"};
18
+ styleInject_es.styleInject(css_248z$7);
19
+
20
+ var css_248z$6 = ".lziyWzzvuno- {\n font-family: \"Inter\", Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-normal);\n font-weight: 400;\n}\n\n.PVKSijyipP8- {\n font-family: \"Inter\", Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-normal);\n font-weight: 500;\n}\n\n.-ch9Z4gIGDg- {\n font-family: \"Inter\", Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-normal);\n font-weight: 600;\n}\n\n.EEwS0f07RqQ- {\n font-family: \"Inter\", Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-normal);\n font-weight: 700;\n}\n\n.kA3NtPPWbP0- {\n font-family: \"Jobber Pro\", \"Poppins\", Helvetica, Arial,\n sans-serif;\n font-family: var(--typography--fontFamily-display);\n font-weight: 800;\n}\n\n.jobber-retheme .kA3NtPPWbP0- {\n font-family: \"Inter\", Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-normal);\n}\n\n._3M58OLqp0JM- {\n font-family: \"Jobber Pro\", \"Poppins\", Helvetica, Arial,\n sans-serif;\n font-family: var(--typography--fontFamily-display);\n font-weight: 900;\n}\n";
21
+ var fontWeights = {"regular":"lziyWzzvuno-","medium":"PVKSijyipP8-","semiBold":"-ch9Z4gIGDg-","bold":"EEwS0f07RqQ-","extraBold":"kA3NtPPWbP0-","black":"_3M58OLqp0JM-"};
22
+ styleInject_es.styleInject(css_248z$6);
23
+
24
+ var css_248z$5 = ".xE6cC62h5G0- {\n text-transform: uppercase;\n}\n\n.HlqJJ3Cl7dE- {\n text-transform: lowercase;\n}\n\n.Loe26JnDfco- {\n text-transform: capitalize;\n}\n";
25
+ var textCases = {"uppercase":"xE6cC62h5G0-","lowercase":"HlqJJ3Cl7dE-","capitalize":"Loe26JnDfco-"};
26
+ styleInject_es.styleInject(css_248z$5);
27
+
28
+ var css_248z$4 = ".pkqoq2KXY9w- {\n color: rgb(1, 41, 57);\n color: var(--color-blue);\n}\n\n.ftVHRSii3ro- {\n color: rgb(181, 181, 181);\n color: var(--color-grey);\n}\n\n.FQbGABZWVzA- {\n color: rgb(66, 78, 86);\n color: var(--color-greyBlue--dark);\n}\n\n.zQaB9J0-vrs- {\n color: rgba(101, 120, 132, 1);\n color: var(--color-greyBlue);\n}\n\n._4-xdzcqT-Us- {\n color: rgb(125, 176, 14);\n color: var(--color-green);\n}\n\n.Zp9E7ELPjPA- {\n color: rgb(201, 66, 33);\n color: var(--color-red);\n}\n\n.v-Fo4PwPxDI- {\n color: rgb(221, 195, 15);\n color: var(--color-yellow);\n}\n\n.YrGUIChAZC0- {\n color: rgb(144, 127, 10);\n color: var(--color-yellow--dark);\n}\n\n.r7JcIVoDcTY- {\n color: rgb(60, 162, 224);\n color: var(--color-lightBlue);\n}\n\n._6RXTyd198iM- {\n color: rgba(255, 255, 255, 1);\n color: var(--color-white);\n}\n\n.fLix4jA-RkU- {\n color: rgb(1, 41, 57);\n color: var(--color-heading);\n}\n\n._1g0uMAwFAsk- {\n color: rgb(66, 78, 86);\n color: var(--color-text);\n}\n\n.oXqFAHwT6y4- {\n color: rgb(77, 105, 116);\n color: var(--color-text--secondary);\n}\n\n.rWkzi9HFNDU- {\n color: rgb(201, 66, 33);\n color: var(--color-critical);\n}\n\n.PQLYQKGCmPI- {\n color: rgb(144, 127, 10);\n color: var(--color-warning--onSurface);\n}\n\n.L6bBDJrx-m0- {\n color: rgb(39, 105, 146);\n color: var(--color-informative--onSurface);\n}\n\n.bJDJJKvmT90- {\n color: rgb(81, 114, 9);\n color: var(--color-success--onSurface);\n}\n\n._3g4iYm8XwkM- {\n color: rgb(181, 181, 181);\n color: var(--color-disabled);\n}\n";
29
+ var textColors = {"blue":"pkqoq2KXY9w-","grey":"ftVHRSii3ro-","greyBlueDark":"FQbGABZWVzA-","greyBlue":"zQaB9J0-vrs-","green":"_4-xdzcqT-Us-","red":"Zp9E7ELPjPA-","yellow":"v-Fo4PwPxDI-","yellowDark":"YrGUIChAZC0-","lightBlue":"r7JcIVoDcTY-","white":"_6RXTyd198iM-","heading":"fLix4jA-RkU-","text":"_1g0uMAwFAsk-","textSecondary":"oXqFAHwT6y4-","critical":"rWkzi9HFNDU-","warning":"PQLYQKGCmPI-","informative":"L6bBDJrx-m0-","success":"bJDJJKvmT90-","disabled":"_3g4iYm8XwkM-"};
30
+ styleInject_es.styleInject(css_248z$4);
31
+
32
+ var css_248z$3 = ".Jys1uy2pQXw- {\n font-style: italic;\n}\n\n.kd2u0dL-if0- {\n display: inline;\n font-family: inherit;\n font-style: normal;\n font-weight: inherit;\n background-image: url(\"data:image/svg+xml,%3Csvg viewBox='0 0 84 8' fill='none' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 6.50004C14.6667 4.50004 49.3 0.900038 82.5 2.50004' stroke='%2384EA00' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E\");\n background-position: center bottom;\n background-repeat: no-repeat;\n background-size: 100% 20%;\n}\n";
33
+ var emphasis = {"italic":"Jys1uy2pQXw-","highlight":"kd2u0dL-if0-"};
34
+ styleInject_es.styleInject(css_248z$3);
35
+
36
+ var css_248z$2 = ".LUJEfdi3pws- {\n display: -webkit-box !important;\n}\n.LUJEfdi3pws- {\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n";
37
+ var truncate = {"textTruncate":"LUJEfdi3pws-"};
38
+ styleInject_es.styleInject(css_248z$2);
39
+
40
+ var css_248z$1 = ".eDMsbRCP0kg- {\n text-align: left;\n}\n\n.j34R9yIG--c- {\n text-align: center;\n}\n\n.CeI75T5sHwM- {\n text-align: right;\n}\n";
41
+ var alignment = {"start":"eDMsbRCP0kg-","center":"j34R9yIG--c-","end":"CeI75T5sHwM-"};
42
+ styleInject_es.styleInject(css_248z$1);
43
+
44
+ var css_248z = ".mRpfVoMiIMM- {\n font-family: \"Inter\", Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-normal);\n}\n\n.TPtuWMdOsfw- {\n font-family: \"Jobber Pro\", \"Poppins\", Helvetica, Arial,\n sans-serif;\n font-family: var(--typography--fontFamily-display);\n}\n";
45
+ var fontFamilies = {"base":"mRpfVoMiIMM-","display":"TPtuWMdOsfw-"};
46
+ styleInject_es.styleInject(css_248z);
47
+
48
+ /* eslint-disable import/no-internal-modules */
49
+ function Typography({ id, children, element: Tag = "p", size, align, fontWeight = "regular", textCase, textColor, emphasisType, numberOfLines, fontFamily, }) {
50
+ const shouldTruncateText = numberOfLines && numberOfLines > 0;
51
+ const className = classnames__default["default"](styles.base, fontWeights[fontWeight], size && fontSizes[size], textCase && textCases[textCase], textColor && textColors[textColor], emphasisType && emphasis[emphasisType], fontFamily && fontFamilies[fontFamily], shouldTruncateText && truncate.textTruncate, Object.assign({}, (align && { [alignment[align]]: align !== `start` })));
52
+ let truncateLines;
53
+ if (shouldTruncateText) {
54
+ truncateLines = {
55
+ WebkitLineClamp: numberOfLines,
56
+ WebkitBoxOrient: "vertical",
57
+ };
58
+ }
59
+ return (React__default["default"].createElement(Tag, { id: id, className: className, style: truncateLines }, children));
60
+ }
61
+
62
+ exports.Typography = Typography;
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ // For retheme purposes only.
4
+ // This will be removed once the retheme is out of the experiment.
5
+ function getAtlantisConfig() {
6
+ let JOBBER_RETHEME = false;
7
+ if (typeof window !== "undefined") {
8
+ JOBBER_RETHEME = document.body.classList.contains("jobber-retheme");
9
+ }
10
+ return { JOBBER_RETHEME };
11
+ }
12
+
13
+ exports.getAtlantisConfig = getAtlantisConfig;
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ function styleInject(css, ref) {
4
+ if ( ref === void 0 ) ref = {};
5
+ var insertAt = ref.insertAt;
6
+
7
+ if (!css || typeof document === 'undefined') { return; }
8
+
9
+ var head = document.head || document.getElementsByTagName('head')[0];
10
+ var style = document.createElement('style');
11
+ style.type = 'text/css';
12
+
13
+ if (insertAt === 'top') {
14
+ if (head.firstChild) {
15
+ head.insertBefore(style, head.firstChild);
16
+ } else {
17
+ head.appendChild(style);
18
+ }
19
+ } else {
20
+ head.appendChild(style);
21
+ }
22
+
23
+ if (style.styleSheet) {
24
+ style.styleSheet.cssText = css;
25
+ } else {
26
+ style.appendChild(document.createTextNode(css));
27
+ }
28
+ }
29
+
30
+ exports.styleInject = styleInject;
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+
3
+ /******************************************************************************
4
+ Copyright (c) Microsoft Corporation.
5
+
6
+ Permission to use, copy, modify, and/or distribute this software for any
7
+ purpose with or without fee is hereby granted.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
+ PERFORMANCE OF THIS SOFTWARE.
16
+ ***************************************************************************** */
17
+
18
+ function __rest(s, e) {
19
+ var t = {};
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
21
+ t[p] = s[p];
22
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
23
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
24
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
25
+ t[p[i]] = s[p[i]];
26
+ }
27
+ return t;
28
+ }
29
+
30
+ function __awaiter(thisArg, _arguments, P, generator) {
31
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
+ return new (P || (P = Promise))(function (resolve, reject) {
33
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
34
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
35
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
36
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
37
+ });
38
+ }
39
+
40
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
41
+ var e = new Error(message);
42
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
43
+ };
44
+
45
+ exports.__awaiter = __awaiter;
46
+ exports.__rest = __rest;