@jobber/components 4.59.0 → 4.59.1-st-spike-w.1
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/dist/AnimatedSwitcher/index.js +5 -13
- package/dist/{AnimatedSwitcher-d1e1ddcf.js → AnimatedSwitcher-6ffd5003.js} +9 -15
- package/dist/Autocomplete/index.js +57 -68
- package/dist/Avatar/index.js +7 -15
- package/dist/{Avatar-1aa30ee1.js → Avatar-b2e862de.js} +13 -21
- package/dist/Banner/index.js +29 -38
- package/dist/Button/index.js +8 -16
- package/dist/{Button-db6114a6.js → Button-319d8fa0.js} +15 -22
- package/dist/ButtonDismiss/index.js +9 -17
- package/dist/ButtonDismiss-85986110.js +8 -0
- package/dist/Card/index.js +15 -23
- package/dist/{Card-116af709.js → Card-c1970a7c.js} +27 -34
- package/dist/Checkbox/index.js +11 -19
- package/dist/{Checkbox-bc4bc968.js → Checkbox-e4733fb4.js} +30 -37
- package/dist/Chip/index.js +24 -33
- package/dist/{Chip-4f12eec8.js → Chip-12a64c38.js} +94 -106
- package/dist/{Chip-f8b8fd89.js → Chip-40f5214c.js} +29 -37
- package/dist/Chips/index.js +25 -34
- package/dist/Combobox/index.js +94 -105
- package/dist/ConfirmationModal/index.js +22 -30
- package/dist/{ConfirmationModal-285c3cbe.js → ConfirmationModal-86b42ca0.js} +14 -20
- package/dist/Content/index.js +4 -12
- package/dist/{Content-2ca1ffe1.js → Content-3354c281.js} +8 -14
- package/dist/Countdown/index.js +8 -17
- package/dist/DataDump/index.js +24 -32
- package/dist/DataList/index.js +256 -268
- package/dist/DataTable/index.js +92 -123
- package/dist/DatePicker/index.js +12 -20
- package/dist/{DatePicker-49213434.js → DatePicker-9f1e19a5.js} +30 -39
- package/dist/DescriptionList/index.js +9 -17
- package/dist/Disclosure/index.js +21 -29
- package/dist/Divider/index.js +7 -16
- package/dist/Drawer/index.js +24 -34
- package/dist/Emphasis/index.js +5 -13
- package/dist/Emphasis-edd2af9b.js +13 -0
- package/dist/FeatureSwitch/index.js +39 -48
- package/dist/Flex/index.js +6 -15
- package/dist/Form/index.js +11 -19
- package/dist/FormField/index.js +16 -24
- package/dist/{FormField-fa9254dc.js → FormField-99918ed4.js} +58 -65
- package/dist/FormatDate/index.js +2 -11
- package/dist/{FormatDate-70ea5b43.js → FormatDate-720b39cf.js} +3 -10
- package/dist/FormatEmail/index.js +7 -16
- package/dist/FormatFile/index.js +27 -35
- package/dist/{FormatFile-6423c3b5.js → FormatFile-e1498cb9.js} +44 -52
- package/dist/FormatRelativeDateTime/index.js +7 -15
- package/dist/FormatTime/index.js +3 -11
- package/dist/Gallery/index.js +40 -49
- package/dist/Glimmer/index.js +6 -15
- package/dist/{Glimmer-cfa92a88.js → Glimmer-d3be9219.js} +25 -33
- package/dist/Grid/index.js +14 -24
- package/dist/Heading/index.js +5 -13
- package/dist/{Heading-4cde9989.js → Heading-04994667.js} +4 -10
- package/dist/Icon/index.js +3 -11
- package/dist/Icon-22723fe6.js +34 -0
- package/dist/InlineLabel/index.js +5 -13
- package/dist/{InlineLabel-a24706c4.js → InlineLabel-4df86867.js} +9 -16
- package/dist/InputAvatar/index.js +32 -40
- package/dist/InputDate/index.js +26 -35
- package/dist/InputEmail/index.js +18 -27
- package/dist/InputFile/index.js +14 -23
- package/dist/{InputFile-25c3369b.js → InputFile-3bbaa09e.js} +24 -33
- package/dist/InputGroup/index.js +4 -12
- package/dist/{InputGroup-3fdde16b.js → InputGroup-1b4abd36.js} +9 -16
- package/dist/InputNumber/index.js +17 -25
- package/dist/{InputNumber-ea9fcee1.js → InputNumber-fa8132f3.js} +7 -13
- package/dist/InputPassword/index.js +19 -27
- package/dist/InputPhoneNumber/index.js +28 -36
- package/dist/InputText/index.js +17 -25
- package/dist/{InputText-ab237501.js → InputText-6d262128.js} +9 -15
- package/dist/InputTime/index.js +22 -780
- package/dist/InputValidation/index.js +9 -17
- package/dist/InputValidation-b6adff05.js +23 -0
- package/dist/LightBox/index.js +16 -24
- package/dist/LightBox-8c8f30b1.js +109 -0
- package/dist/Link/index.js +3 -11
- package/dist/List/index.js +47 -59
- package/dist/Markdown/index.js +10 -18
- package/dist/Markdown-2ec28e51.js +55 -0
- package/dist/Menu/index.js +13 -21
- package/dist/{Menu-2e64307a.js → Menu-10681184.js} +40 -47
- package/dist/Modal/index.js +16 -24
- package/dist/{Modal-c17cc105.js → Modal-06dc9551.js} +33 -41
- package/dist/MultiSelect/index.js +38 -47
- package/dist/Option-7967170c.js +12 -0
- package/dist/Page/index.js +48 -57
- package/dist/Popover/index.js +12 -20
- package/dist/{Popover-7c966790.js → Popover-a93db92d.js} +15 -21
- package/dist/ProgressBar/index.js +4 -12
- package/dist/{ProgressBar-5dfc1885.js → ProgressBar-04ee007d.js} +8 -15
- package/dist/RadioGroup/index.js +7 -16
- package/dist/{RadioGroup-9bdd8a59.js → RadioGroup-2ccd0678.js} +16 -23
- package/dist/RecurringSelect/index.js +90 -98
- package/dist/Select/index.js +17 -26
- package/dist/Spinner/index.js +4 -12
- package/dist/{Spinner-9d8fc7ff.js → Spinner-5d8359b8.js} +7 -14
- package/dist/StatusLabel/index.js +12 -21
- package/dist/Switch/index.js +5 -13
- package/dist/{Switch-cc9b645c.js → Switch-8bee06df.js} +17 -24
- package/dist/Table/index.js +19 -35
- package/dist/Tabs/index.js +23 -33
- package/dist/Text/index.js +5 -13
- package/dist/{Text-54334431.js → Text-703e2c21.js} +4 -10
- package/dist/Toast/index.js +32 -40
- package/dist/Tooltip/index.js +7 -15
- package/dist/{Tooltip-6b12f1c2.js → Tooltip-c80b9fb7.js} +22 -30
- package/dist/Typography/index.js +4 -12
- package/dist/{Typography-83915c54.js → Typography-09952a2f.js} +15 -22
- package/dist/{style-inject.es-9d2f5f4e.js → style-inject.es-a0e1a0ba.js} +1 -3
- package/dist/{tslib.es6-5b8768b7.js → tslib.es6-5849cd88.js} +1 -4
- package/package.json +3 -3
- package/rollup.config.js +1 -5
- package/dist/ButtonDismiss-1ccb84ec.js +0 -14
- package/dist/Emphasis-e10dde65.js +0 -19
- package/dist/Icon-405a216c.js +0 -40
- package/dist/InputValidation-377d6c62.js +0 -29
- package/dist/LightBox-93ef99b9.js +0 -117
- package/dist/Markdown-d53b01bf.js +0 -62
- package/dist/Option-07a24acd.js +0 -19
package/dist/Countdown/index.js
CHANGED
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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);
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { CivilDate } from '@std-proposal/temporal';
|
|
3
|
+
import ReactCountdown from 'react-countdown';
|
|
13
4
|
|
|
14
5
|
function computeTimeUnit(remainder, unit) {
|
|
15
6
|
return parseInt(remainder, 10) !== 1 ? `${unit}s` : unit;
|
|
16
7
|
}
|
|
17
8
|
|
|
18
9
|
function Countdown({ date: inputDate, onComplete, showUnits, granularity = "dhms", }) {
|
|
19
|
-
const date =
|
|
10
|
+
const date = useMemo(() => {
|
|
20
11
|
let initDate;
|
|
21
|
-
if (inputDate instanceof
|
|
12
|
+
if (inputDate instanceof CivilDate) {
|
|
22
13
|
initDate = new Date(inputDate.year, inputDate.month - 1, inputDate.day);
|
|
23
14
|
}
|
|
24
15
|
else {
|
|
@@ -26,11 +17,11 @@ function Countdown({ date: inputDate, onComplete, showUnits, granularity = "dhms
|
|
|
26
17
|
}
|
|
27
18
|
return initDate;
|
|
28
19
|
}, [inputDate]);
|
|
29
|
-
return (
|
|
20
|
+
return (React.createElement(ReactCountdown, { date: date, zeroPadTime: 2, renderer: (props) => (React.createElement(RenderedCountdown, Object.assign({}, props, { granularity: granularity, showUnits: showUnits }))), onComplete: onComplete }));
|
|
30
21
|
}
|
|
31
22
|
function RenderedCountdown({ formatted, granularity = "dhms", showUnits, }) {
|
|
32
23
|
const { days, hours, minutes, seconds } = formatted;
|
|
33
|
-
return
|
|
24
|
+
return React.createElement(React.Fragment, null, buildTime());
|
|
34
25
|
function buildTime() {
|
|
35
26
|
const totalHours = 24 * Number(days) + Number(hours);
|
|
36
27
|
const totalMinutes = 60 * totalHours + Number(minutes);
|
|
@@ -69,4 +60,4 @@ function timeFormatter(times, granularity, showUnits) {
|
|
|
69
60
|
return substr;
|
|
70
61
|
}
|
|
71
62
|
|
|
72
|
-
|
|
63
|
+
export { Countdown };
|
package/dist/DataDump/index.js
CHANGED
|
@@ -1,36 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
require('uuid');
|
|
19
|
-
require('framer-motion');
|
|
20
|
-
require('@jobber/hooks/useOnKeyDown');
|
|
21
|
-
require('@jobber/hooks/useRefocusOnActivator');
|
|
22
|
-
|
|
23
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
|
-
|
|
25
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { C as Card } from '../Card-c1970a7c.js';
|
|
3
|
+
import { C as Content } from '../Content-3354c281.js';
|
|
4
|
+
import { E as Emphasis } from '../Emphasis-edd2af9b.js';
|
|
5
|
+
import 'classnames';
|
|
6
|
+
import '../style-inject.es-a0e1a0ba.js';
|
|
7
|
+
import '../Heading-04994667.js';
|
|
8
|
+
import '../Typography-09952a2f.js';
|
|
9
|
+
import '../Button-319d8fa0.js';
|
|
10
|
+
import 'react-router-dom';
|
|
11
|
+
import '../Icon-22723fe6.js';
|
|
12
|
+
import '@jobber/design';
|
|
13
|
+
import '../Menu-10681184.js';
|
|
14
|
+
import 'uuid';
|
|
15
|
+
import 'framer-motion';
|
|
16
|
+
import '@jobber/hooks/useOnKeyDown';
|
|
17
|
+
import '@jobber/hooks/useRefocusOnActivator';
|
|
26
18
|
|
|
27
19
|
function DataDump({ label = "Raw Data", defaultOpen = false, data, }) {
|
|
28
|
-
return (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
return (React.createElement(Card, { accent: "yellow" },
|
|
21
|
+
React.createElement(Content, null,
|
|
22
|
+
React.createElement("details", { open: defaultOpen },
|
|
23
|
+
React.createElement("summary", null,
|
|
24
|
+
React.createElement(Emphasis, { variation: "bold" }, label)),
|
|
25
|
+
React.createElement("pre", null, JSON.stringify(data, undefined, 2))))));
|
|
34
26
|
}
|
|
35
27
|
|
|
36
|
-
|
|
28
|
+
export { DataDump };
|