@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.
- package/.eslintrc.js +10 -0
- package/dist/AnimatedPresence/index.js +12 -0
- package/dist/AnimatedPresence-20a02aaa.js +104 -0
- package/dist/AnimatedSwitcher/index.js +13 -0
- package/dist/AnimatedSwitcher-3d45ec5d.js +96 -0
- package/dist/Autocomplete/index.js +209 -0
- package/dist/Avatar/index.js +15 -0
- package/dist/Avatar-76a799fa.js +78 -0
- package/dist/Banner/index.js +110 -0
- package/dist/Button/index.js +16 -0
- package/dist/Button-b73a5e01.js +57 -0
- package/dist/ButtonDismiss/index.js +17 -0
- package/dist/ButtonDismiss-350af163.js +14 -0
- package/dist/Card/colors.css.d.ts +89 -0
- package/dist/Card/index.js +24 -0
- package/dist/Card-e3144022.js +93 -0
- package/dist/Checkbox/index.js +18 -0
- package/dist/Checkbox-787e2e47.js +63 -0
- package/dist/Chip/index.js +41 -0
- package/dist/Chip-3d1bfddc.js +89 -0
- package/dist/Chips/index.js +524 -0
- package/dist/Combobox/index.js +40 -0
- package/dist/Combobox-a24c8241.js +479 -0
- package/dist/ConfirmationModal/index.js +31 -0
- package/dist/ConfirmationModal-52e16873.js +100 -0
- package/dist/Content/Spacing.css.d.ts +13 -0
- package/dist/Content/index.js +12 -0
- package/dist/Content-e3f7b6fc.js +24 -0
- package/dist/Countdown/index.js +72 -0
- package/dist/DataDump/index.js +37 -0
- package/dist/DataList/index.js +1335 -0
- package/dist/DataTable/index.js +301 -0
- package/dist/DatePicker/index.js +20 -0
- package/dist/DatePicker-64c5ab1a.js +134 -0
- package/dist/DescriptionList/index.js +24 -0
- package/dist/Disclosure/index.js +46 -0
- package/dist/Divider/index.js +29 -0
- package/dist/Drawer/index.js +49 -0
- package/dist/Emphasis/index.js +13 -0
- package/dist/Emphasis-bda56d3b.js +19 -0
- package/dist/FeatureSwitch/index.js +70 -0
- package/dist/Flex/index.js +12 -0
- package/dist/Flex-d490c4db.js +38 -0
- package/dist/Form/index.js +56 -0
- package/dist/FormField/index.js +24 -0
- package/dist/FormField-6ff183f8.js +253 -0
- package/dist/FormatDate/index.js +11 -0
- package/dist/FormatDate-70ea5b43.js +34 -0
- package/dist/FormatEmail/index.js +23 -0
- package/dist/FormatFile/index.js +36 -0
- package/dist/FormatFile-f036902d.js +162 -0
- package/dist/FormatRelativeDateTime/index.js +72 -0
- package/dist/FormatTime/index.js +36 -0
- package/dist/Gallery/Gallery.css.d.ts +9 -0
- package/dist/Gallery/index.js +99 -0
- package/dist/Glimmer/index.js +15 -0
- package/dist/Glimmer/style/Shape.css.d.ts +9 -0
- package/dist/Glimmer/style/Sizes.css.d.ts +10 -0
- package/dist/Glimmer/style/Timing.css.d.ts +6 -0
- package/dist/Glimmer-84dee1ed.js +77 -0
- package/dist/Grid/GridAlign.css.d.ts +8 -0
- package/dist/Grid/index.js +76 -0
- package/dist/Heading/index.js +14 -0
- package/dist/Heading-1e8e4bd3.js +55 -0
- package/dist/Icon/index.js +11 -0
- package/dist/Icon-405a216c.js +40 -0
- package/dist/InlineLabel/index.js +13 -0
- package/dist/InlineLabel-a6557829.js +28 -0
- package/dist/InputAvatar/index.js +70 -0
- package/dist/InputDate/index.js +57 -0
- package/dist/InputEmail/index.js +43 -0
- package/dist/InputFile/index.js +25 -0
- package/dist/InputFile-bb945071.js +190 -0
- package/dist/InputGroup/index.js +12 -0
- package/dist/InputGroup-8d4fd4eb.js +33 -0
- package/dist/InputNumber/index.js +25 -0
- package/dist/InputNumber-d451b52e.js +62 -0
- package/dist/InputPassword/index.js +41 -0
- package/dist/InputPhoneNumber/index.js +116 -0
- package/dist/InputText/index.js +26 -0
- package/dist/InputText-55b6cb65.js +102 -0
- package/dist/InputTime/index.js +209 -0
- package/dist/InputValidation/index.js +17 -0
- package/dist/InputValidation-05e839fa.js +29 -0
- package/dist/LightBox/index.js +24 -0
- package/dist/LightBox-a89d8863.js +117 -0
- package/dist/Link/index.js +15 -0
- package/dist/List/index.js +93 -0
- package/dist/Markdown/index.js +19 -0
- package/dist/Markdown-f7c55304.js +62 -0
- package/dist/Menu/index.js +21 -0
- package/dist/Menu-083fc4c4.js +139 -0
- package/dist/Modal/Sizes.css.d.ts +6 -0
- package/dist/Modal/index.js +25 -0
- package/dist/Modal-c336cac6.js +71 -0
- package/dist/MultiSelect/index.js +182 -0
- package/dist/Option-3c4d377e.js +19 -0
- package/dist/Page/index.js +78 -0
- package/dist/Popover/index.js +61 -0
- package/dist/ProgressBar/Sizes.css.d.ts +7 -0
- package/dist/ProgressBar/index.js +12 -0
- package/dist/ProgressBar-b68edc8f.js +43 -0
- package/dist/RadioGroup/index.js +15 -0
- package/dist/RadioGroup-17b67ade.js +46 -0
- package/dist/RecurringSelect/index.js +227 -0
- package/dist/Select/index.js +26 -0
- package/dist/Spinner/index.js +12 -0
- package/dist/Spinner-9d8fc7ff.js +24 -0
- package/dist/StatusIndicator/index.js +11 -0
- package/dist/StatusIndicator-b179d06e.js +18 -0
- package/dist/StatusLabel/index.js +29 -0
- package/dist/Switch/index.js +13 -0
- package/dist/Switch-7d4aa7c3.js +56 -0
- package/dist/Table/index.js +66 -0
- package/dist/Tabs/index.js +80 -0
- package/dist/Text/index.js +13 -0
- package/dist/Text-259af966.js +31 -0
- package/dist/Toast/index.js +111 -0
- package/dist/Tooltip/index.js +16 -0
- package/dist/Tooltip-ef3d6ef4.js +112 -0
- package/dist/Typography/css/Emphasis.css.d.ts +6 -0
- package/dist/Typography/css/FontFamilies.css.d.ts +6 -0
- package/dist/Typography/css/FontSizes.css.d.ts +12 -0
- package/dist/Typography/css/FontWeights.css.d.ts +10 -0
- package/dist/Typography/css/TextAlignment.css.d.ts +7 -0
- package/dist/Typography/css/TextCases.css.d.ts +7 -0
- package/dist/Typography/css/TextColors.css.d.ts +22 -0
- package/dist/Typography/css/Truncate.css.d.ts +5 -0
- package/dist/Typography/css/Typography.css.d.ts +5 -0
- package/dist/Typography/index.js +12 -0
- package/dist/Typography-c45bf216.js +62 -0
- package/dist/getAtlantisConfig-0f3e8af2.js +13 -0
- package/dist/style-inject.es-9d2f5f4e.js +30 -0
- package/dist/tslib.es6-754e2961.js +46 -0
- package/package.json +4 -371
- package/rollup.config.js +77 -21
- package/dist/index.cjs +0 -6721
- package/dist/index.d.ts +0 -73
- package/dist/index.esm.js +0 -6603
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "minuscule": string;
|
|
3
|
+
readonly "smallest": string;
|
|
4
|
+
readonly "smaller": string;
|
|
5
|
+
readonly "small": string;
|
|
6
|
+
readonly "base": string;
|
|
7
|
+
readonly "large": string;
|
|
8
|
+
readonly "larger": string;
|
|
9
|
+
readonly "largest": string;
|
|
10
|
+
readonly "extravagant": string;
|
|
11
|
+
};
|
|
12
|
+
export = styles;
|
|
13
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var Content = require('../Content-e3f7b6fc.js');
|
|
6
|
+
require('react');
|
|
7
|
+
require('classnames');
|
|
8
|
+
require('../style-inject.es-9d2f5f4e.js');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.Content = Content.Content;
|
|
@@ -0,0 +1,24 @@
|
|
|
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 classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
10
|
+
|
|
11
|
+
var css_248z$1 = "._340SlNuzSDQ- > :not(:last-child) {\n margin-bottom: calc(16px / 16);\n margin-bottom: var(--space-minuscule);\n}\n\n.H1BK-YSBQBQ- > :not(:last-child) {\n margin-bottom: calc(16px / 8);\n margin-bottom: var(--space-smallest);\n}\n\n.xUe31mY0kro- > :not(:last-child) {\n margin-bottom: calc(16px / 4);\n margin-bottom: var(--space-smaller);\n}\n\n.rDJFaGPzCbE- > :not(:last-child) {\n margin-bottom: calc(16px / 2);\n margin-bottom: var(--space-small);\n}\n\n.SRYe3DkjH1c- > :not(:last-child) {\n margin-bottom: calc(16px * 1);\n margin-bottom: var(--space-base);\n}\n\n._7TZ4MI3kr4Y- > :not(:last-child) {\n margin-bottom: calc(16px * 1.5);\n margin-bottom: var(--space-large);\n}\n\n.jvPl3aAN9PA- > :not(:last-child) {\n margin-bottom: calc(16px * 2);\n margin-bottom: var(--space-larger);\n}\n\n.fFTgb4ra1X0- > :not(:last-child) {\n margin-bottom: calc(16px * 3);\n margin-bottom: var(--space-largest);\n}\n\n.kKnfL37LO6A- > :not(:last-child) {\n margin-bottom: calc(16px * 4);\n margin-bottom: var(--space-extravagant);\n}\n";
|
|
12
|
+
var spacings = {"minuscule":"_340SlNuzSDQ-","smallest":"H1BK-YSBQBQ-","smaller":"xUe31mY0kro-","small":"rDJFaGPzCbE-","base":"SRYe3DkjH1c-","large":"_7TZ4MI3kr4Y-","larger":"jvPl3aAN9PA-","largest":"fFTgb4ra1X0-","extravagant":"kKnfL37LO6A-"};
|
|
13
|
+
styleInject_es.styleInject(css_248z$1);
|
|
14
|
+
|
|
15
|
+
var css_248z = "._4On2F-4nWuY- {\n padding: 0;\n padding: var(--public-content--padding, 0);\n}\n";
|
|
16
|
+
var styles = {"padded":"_4On2F-4nWuY-"};
|
|
17
|
+
styleInject_es.styleInject(css_248z);
|
|
18
|
+
|
|
19
|
+
function Content({ children, spacing = "base", type = "div", }) {
|
|
20
|
+
const className = classnames__default["default"](styles.padded, spacings[spacing]);
|
|
21
|
+
return React.createElement(type, { className }, children);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports.Content = Content;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var temporal = require('@std-proposal/temporal');
|
|
7
|
+
var ReactCountdown = require('react-countdown');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
|
+
var ReactCountdown__default = /*#__PURE__*/_interopDefaultLegacy(ReactCountdown);
|
|
13
|
+
|
|
14
|
+
function computeTimeUnit(remainder, unit) {
|
|
15
|
+
return parseInt(remainder, 10) !== 1 ? `${unit}s` : unit;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function Countdown({ date: inputDate, onComplete, showUnits, granularity = "dhms", }) {
|
|
19
|
+
const date = React.useMemo(() => {
|
|
20
|
+
let initDate;
|
|
21
|
+
if (inputDate instanceof temporal.CivilDate) {
|
|
22
|
+
initDate = new Date(inputDate.year, inputDate.month - 1, inputDate.day);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
initDate = new Date(inputDate);
|
|
26
|
+
}
|
|
27
|
+
return initDate;
|
|
28
|
+
}, [inputDate]);
|
|
29
|
+
return (React__default["default"].createElement(ReactCountdown__default["default"], { date: date, zeroPadTime: 2, renderer: (props) => (React__default["default"].createElement(RenderedCountdown, Object.assign({}, props, { granularity: granularity, showUnits: showUnits }))), onComplete: onComplete }));
|
|
30
|
+
}
|
|
31
|
+
function RenderedCountdown({ formatted, granularity = "dhms", showUnits, }) {
|
|
32
|
+
const { days, hours, minutes, seconds } = formatted;
|
|
33
|
+
return React__default["default"].createElement(React__default["default"].Fragment, null, buildTime());
|
|
34
|
+
function buildTime() {
|
|
35
|
+
const totalHours = 24 * Number(days) + Number(hours);
|
|
36
|
+
const totalMinutes = 60 * totalHours + Number(minutes);
|
|
37
|
+
const totalSeconds = 60 * totalMinutes + Number(seconds);
|
|
38
|
+
const times = {
|
|
39
|
+
d: { total: days, remainder: days, unit: computeTimeUnit(days, "day") },
|
|
40
|
+
h: {
|
|
41
|
+
total: totalHours,
|
|
42
|
+
remainder: hours,
|
|
43
|
+
unit: computeTimeUnit(hours, "hour"),
|
|
44
|
+
},
|
|
45
|
+
m: {
|
|
46
|
+
total: totalMinutes,
|
|
47
|
+
remainder: minutes,
|
|
48
|
+
unit: computeTimeUnit(minutes, "minute"),
|
|
49
|
+
},
|
|
50
|
+
s: {
|
|
51
|
+
total: totalSeconds,
|
|
52
|
+
remainder: seconds,
|
|
53
|
+
unit: computeTimeUnit(seconds, "second"),
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
return timeFormatter(times, granularity, showUnits);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function timeFormatter(times, granularity, showUnits) {
|
|
60
|
+
let substr = "";
|
|
61
|
+
granularity.split("").forEach((unit, i) => {
|
|
62
|
+
if (i == 0) {
|
|
63
|
+
substr += `${times[unit].total}${showUnits ? ` ${times[unit].unit}` : ""}`;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
substr += ` : ${times[unit].remainder}${showUnits ? ` ${times[unit].unit}` : ""}`;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return substr;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
exports.Countdown = Countdown;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var Card = require('../Card-e3144022.js');
|
|
7
|
+
var Content = require('../Content-e3f7b6fc.js');
|
|
8
|
+
var Emphasis = require('../Emphasis-bda56d3b.js');
|
|
9
|
+
require('classnames');
|
|
10
|
+
require('../style-inject.es-9d2f5f4e.js');
|
|
11
|
+
require('../Heading-1e8e4bd3.js');
|
|
12
|
+
require('../Typography-c45bf216.js');
|
|
13
|
+
require('../getAtlantisConfig-0f3e8af2.js');
|
|
14
|
+
require('../Button-b73a5e01.js');
|
|
15
|
+
require('react-router-dom');
|
|
16
|
+
require('../Icon-405a216c.js');
|
|
17
|
+
require('@jobber/design');
|
|
18
|
+
require('../Menu-083fc4c4.js');
|
|
19
|
+
require('framer-motion');
|
|
20
|
+
require('@jobber/hooks/useOnKeyDown');
|
|
21
|
+
require('@jobber/hooks/useRefocusOnActivator');
|
|
22
|
+
require('@jobber/hooks/useSafeLayoutEffect');
|
|
23
|
+
|
|
24
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
|
+
|
|
26
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
27
|
+
|
|
28
|
+
function DataDump({ label = "Raw Data", defaultOpen = false, data, }) {
|
|
29
|
+
return (React__default["default"].createElement(Card.Card, { accent: "yellow" },
|
|
30
|
+
React__default["default"].createElement(Content.Content, null,
|
|
31
|
+
React__default["default"].createElement("details", { open: defaultOpen },
|
|
32
|
+
React__default["default"].createElement("summary", null,
|
|
33
|
+
React__default["default"].createElement(Emphasis.Emphasis, { variation: "bold" }, label)),
|
|
34
|
+
React__default["default"].createElement("pre", null, JSON.stringify(data, undefined, 2))))));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
exports.DataDump = DataDump;
|