@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.
- package/CHANGELOG.md +16 -0
- package/dist/Autocomplete/Autocomplete.d.ts +47 -47
- package/dist/Autocomplete/Menu.d.ts +9 -9
- package/dist/Autocomplete/Option.d.ts +15 -15
- package/dist/Autocomplete/index.d.ts +2 -2
- package/dist/Autocomplete/index.js +215 -211
- package/dist/Avatar/Avatar.d.ts +37 -37
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Avatar/index.js +7 -74
- package/dist/Avatar/utilities.d.ts +1 -1
- package/dist/Avatar-cfd04e86.js +82 -0
- package/dist/Banner/Banner.d.ts +19 -19
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +67 -65
- package/dist/Button/Button.d.ts +64 -64
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +9 -53
- package/dist/Button-5b2f1636.js +60 -0
- package/dist/ButtonDismiss/ButtonDismiss.d.ts +7 -7
- package/dist/ButtonDismiss/index.d.ts +1 -1
- package/dist/ButtonDismiss/index.js +10 -15
- package/dist/ButtonDismiss-4cde8f7c.js +15 -0
- package/dist/Card/Card.d.ts +31 -31
- package/dist/Card/CardClickable.d.ts +12 -12
- package/dist/Card/index.d.ts +1 -1
- package/dist/Card/index.js +7 -61
- package/dist/Card-368e01a3.js +68 -0
- package/dist/Checkbox/Checkbox.d.ts +52 -52
- package/dist/Checkbox/index.d.ts +1 -1
- package/dist/Checkbox/index.js +34 -32
- package/dist/Chips/Chip.d.ts +8 -8
- package/dist/Chips/ChipDismissible.d.ts +7 -7
- package/dist/Chips/ChipTypes.d.ts +59 -59
- package/dist/Chips/Chips.d.ts +2 -2
- package/dist/Chips/ChipsTypes.d.ts +82 -82
- package/dist/Chips/InternalChip.d.ts +2 -2
- package/dist/Chips/InternalChipAffix.d.ts +10 -10
- package/dist/Chips/InternalChipButton.d.ts +10 -10
- package/dist/Chips/InternalChipDismissible/InternalChipDismissible.d.ts +2 -2
- package/dist/Chips/InternalChipDismissible/InternalChipDismissibleInput.d.ts +2 -2
- package/dist/Chips/InternalChipDismissible/InternalChipDismissibleTypes.d.ts +13 -13
- package/dist/Chips/InternalChipDismissible/hooks/index.d.ts +5 -5
- package/dist/Chips/InternalChipDismissible/hooks/useInView.d.ts +5 -5
- package/dist/Chips/InternalChipDismissible/hooks/useInternalChipDismissible.d.ts +15 -15
- package/dist/Chips/InternalChipDismissible/hooks/useInternalChipDismissibleInput.d.ts +28 -28
- package/dist/Chips/InternalChipDismissible/hooks/useRepositionMenu.d.ts +16 -16
- package/dist/Chips/InternalChipDismissible/hooks/useScrollToActive.d.ts +2 -2
- package/dist/Chips/InternalChipDismissible/index.d.ts +1 -1
- package/dist/Chips/InternalChipMultiSelect.d.ts +4 -4
- package/dist/Chips/InternalChipSingleSelect.d.ts +4 -4
- package/dist/Chips/index.d.ts +3 -3
- package/dist/Chips/index.js +493 -491
- package/dist/Chips/utils/mdxUtils.d.ts +9 -9
- package/dist/ConfirmationModal/ConfirmationModal.d.ts +62 -62
- package/dist/ConfirmationModal/index.d.ts +1 -1
- package/dist/ConfirmationModal/index.js +20 -109
- package/dist/ConfirmationModal-b7ef110f.js +103 -0
- package/dist/Content/Content.d.ts +13 -13
- package/dist/Content/index.d.ts +1 -1
- package/dist/Content/index.js +5 -19
- package/dist/Content-18de5fbb.js +26 -0
- package/dist/Countdown/Countdown.d.ts +31 -31
- package/dist/Countdown/computeTimeUnit.d.ts +3 -3
- package/dist/Countdown/index.d.ts +1 -1
- package/dist/Countdown/index.js +63 -61
- package/dist/DataDump/DataDump.d.ts +20 -20
- package/dist/DataDump/index.d.ts +1 -1
- package/dist/DataDump/index.js +18 -17
- package/dist/DatePicker/DatePicker.d.ts +50 -50
- package/dist/DatePicker/DatePickerActivator.d.ts +12 -12
- package/dist/DatePicker/DatePickerCustomHeader.d.ts +2 -2
- package/dist/DatePicker/index.d.ts +1 -1
- package/dist/DatePicker/index.js +13 -97
- package/dist/DatePicker/useFocusOnSelectedDate.d.ts +5 -5
- package/dist/DatePicker-ad6f8630.js +103 -0
- package/dist/DescriptionList/DescriptionList.d.ts +10 -10
- package/dist/DescriptionList/index.d.ts +1 -1
- package/dist/DescriptionList/index.js +16 -15
- package/dist/Disclosure/Disclosure.d.ts +20 -20
- package/dist/Disclosure/index.d.ts +1 -1
- package/dist/Disclosure/index.js +32 -31
- package/dist/Divider/Divider.d.ts +16 -16
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Divider/index.js +19 -17
- package/dist/Drawer/Drawer.d.ts +13 -13
- package/dist/Drawer/DrawerGrid.d.ts +6 -6
- package/dist/Drawer/index.d.ts +2 -2
- package/dist/Drawer/index.js +39 -37
- package/dist/Emphasis/Emphasis.d.ts +11 -11
- package/dist/Emphasis/index.d.ts +1 -1
- package/dist/Emphasis/index.js +7 -17
- package/dist/Emphasis-fd845639.js +21 -0
- package/dist/FeatureSwitch/FeatureSwitch.d.ts +51 -51
- package/dist/FeatureSwitch/index.d.ts +1 -1
- package/dist/FeatureSwitch/index.js +57 -55
- package/dist/Form/Form.d.ts +18 -18
- package/dist/Form/index.d.ts +1 -1
- package/dist/Form/index.js +58 -57
- package/dist/FormField/FormField.d.ts +2 -2
- package/dist/FormField/FormFieldAffix.d.ts +13 -13
- package/dist/FormField/FormFieldDescription.d.ts +6 -6
- package/dist/FormField/FormFieldPostFix.d.ts +5 -5
- package/dist/FormField/FormFieldTypes.d.ts +160 -160
- package/dist/FormField/FormFieldWrapper.d.ts +9 -9
- package/dist/FormField/index.d.ts +2 -2
- package/dist/FormField/index.js +15 -208
- package/dist/FormField-a92c7bac.js +213 -0
- package/dist/FormatDate/FormatDate.d.ts +12 -12
- package/dist/FormatDate/index.d.ts +1 -1
- package/dist/FormatDate/index.js +24 -23
- package/dist/FormatEmail/FormatEmail.d.ts +8 -8
- package/dist/FormatEmail/index.d.ts +1 -1
- package/dist/FormatEmail/index.js +12 -10
- package/dist/FormatFile/FormatFile.d.ts +30 -30
- package/dist/FormatFile/FormatFileDeleteButton.d.ts +6 -6
- package/dist/FormatFile/InternalThumbnail.d.ts +9 -9
- package/dist/FormatFile/index.d.ts +1 -1
- package/dist/FormatFile/index.js +21 -112
- package/dist/FormatFile-5391d4cf.js +112 -0
- package/dist/FormatRelativeDateTime/FormatRelativeDateTime.d.ts +11 -11
- package/dist/FormatRelativeDateTime/index.d.ts +1 -1
- package/dist/FormatRelativeDateTime/index.js +64 -63
- package/dist/FormatTime/FormatTime.d.ts +15 -15
- package/dist/FormatTime/index.d.ts +1 -1
- package/dist/FormatTime/index.js +28 -27
- package/dist/Gallery/Gallery.d.ts +2 -2
- package/dist/Gallery/GalleryTypes.d.ts +31 -31
- package/dist/Gallery/index.d.ts +1 -1
- package/dist/Gallery/index.js +82 -80
- package/dist/Heading/Heading.d.ts +14 -14
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +7 -53
- package/dist/Heading-56750113.js +57 -0
- package/dist/Icon/Icon.d.ts +22 -22
- package/dist/Icon/index.d.ts +1 -1
- package/dist/Icon/index.js +4 -35
- package/dist/Icon-d5ad1a6d.js +41 -0
- package/dist/InlineLabel/InlineLabel.d.ts +17 -17
- package/dist/InlineLabel/index.d.ts +1 -1
- package/dist/InlineLabel/index.js +20 -18
- package/dist/InputAvatar/InputAvatar.d.ts +22 -22
- package/dist/InputAvatar/index.d.ts +1 -1
- package/dist/InputAvatar/index.js +57 -56
- package/dist/InputDate/InputDate.d.ts +19 -19
- package/dist/InputDate/index.d.ts +1 -1
- package/dist/InputDate/index.js +34 -33
- package/dist/InputEmail/InputEmail.d.ts +5 -5
- package/dist/InputEmail/index.d.ts +1 -1
- package/dist/InputEmail/index.js +29 -28
- package/dist/InputFile/InputFile.d.ts +121 -121
- package/dist/InputFile/index.d.ts +1 -1
- package/dist/InputFile/index.js +15 -168
- package/dist/InputFile-b5cf90c3.js +174 -0
- package/dist/InputGroup/InputGroup.d.ts +11 -11
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +24 -22
- package/dist/InputNumber/InputNumber.d.ts +11 -11
- package/dist/InputNumber/index.d.ts +1 -1
- package/dist/InputNumber/index.js +52 -51
- package/dist/InputPassword/InputPassword.d.ts +12 -12
- package/dist/InputPassword/index.d.ts +1 -1
- package/dist/InputPassword/index.js +28 -27
- package/dist/InputText/InputText.d.ts +29 -29
- package/dist/InputText/index.d.ts +1 -1
- package/dist/InputText/index.js +15 -95
- package/dist/InputText-cb3be15c.js +91 -0
- package/dist/InputTime/InputTime.d.ts +2 -2
- package/dist/InputTime/InputTimeProps.d.ts +18 -18
- package/dist/InputTime/InputTimeSafari.d.ts +2 -2
- package/dist/InputTime/civilTimeConversions.d.ts +3 -3
- package/dist/InputTime/index.d.ts +1 -1
- package/dist/InputTime/index.js +402 -257
- package/dist/InputValidation/InputValidation.d.ts +8 -8
- package/dist/InputValidation/index.d.ts +1 -1
- package/dist/InputValidation/index.js +8 -24
- package/dist/InputValidation-24d3621a.js +28 -0
- package/dist/LightBox/LightBox.d.ts +37 -37
- package/dist/LightBox/index.d.ts +1 -1
- package/dist/LightBox/index.js +6 -34
- package/dist/LightBox-b893b656.js +42 -0
- package/dist/List/List.d.ts +11 -11
- package/dist/List/ListItem.d.ts +54 -54
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +76 -74
- package/dist/Markdown/Markdown.d.ts +17 -17
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.js +12 -64
- package/dist/Markdown-69986c49.js +68 -0
- package/dist/Menu/Menu.d.ts +46 -46
- package/dist/Menu/index.d.ts +1 -1
- package/dist/Menu/index.js +13 -128
- package/dist/Menu-6a392af6.js +134 -0
- package/dist/Modal/Modal.d.ts +22 -22
- package/dist/Modal/index.d.ts +1 -1
- package/dist/Modal/index.js +14 -127
- package/dist/Modal/useFocusTrap.d.ts +10 -10
- package/dist/Modal-aaaaf2df.js +132 -0
- package/dist/Page/Page.d.ts +59 -59
- package/dist/Page/index.d.ts +1 -1
- package/dist/Page/index.js +63 -61
- package/dist/Popover/Popover.d.ts +26 -26
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +49 -48
- package/dist/ProgressBar/ProgressBar.d.ts +18 -18
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +5 -22
- package/dist/ProgressBar-e9a49129.js +29 -0
- package/dist/RadioGroup/RadioGroup.d.ts +27 -27
- package/dist/RadioGroup/RadioOption.d.ts +34 -34
- package/dist/RadioGroup/index.d.ts +2 -2
- package/dist/RadioGroup/index.js +38 -37
- package/dist/RecurringSelect/CurrentRecurrenceComponent.d.ts +8 -8
- package/dist/RecurringSelect/RecurringSelect.d.ts +8 -8
- package/dist/RecurringSelect/components/DayOfMonthSelect.d.ts +8 -8
- package/dist/RecurringSelect/components/MonthlyDayOfWeekSelect.d.ts +8 -8
- package/dist/RecurringSelect/components/MonthlySelect.d.ts +8 -8
- package/dist/RecurringSelect/components/WeeklySelect.d.ts +8 -8
- package/dist/RecurringSelect/components/index.d.ts +4 -4
- package/dist/RecurringSelect/index.d.ts +2 -2
- package/dist/RecurringSelect/types.d.ts +65 -65
- package/dist/Select/Option.d.ts +17 -17
- package/dist/Select/Select.d.ts +10 -10
- package/dist/Select/index.d.ts +2 -2
- package/dist/Select/index.js +20 -19
- package/dist/Spinner/Spinner.d.ts +15 -15
- package/dist/Spinner/index.d.ts +1 -1
- package/dist/Spinner/index.js +5 -19
- package/dist/Spinner-18d3dee6.js +26 -0
- package/dist/StatusLabel/StatusLabel.d.ts +25 -25
- package/dist/StatusLabel/index.d.ts +1 -1
- package/dist/StatusLabel/index.js +21 -19
- package/dist/Switch/Switch.d.ts +14 -14
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +7 -53
- package/dist/Switch-d2bec677.js +60 -0
- package/dist/Table/Body.d.ts +6 -6
- package/dist/Table/Cells/Cell.d.ts +7 -7
- package/dist/Table/Cells/CellCurrency.d.ts +8 -8
- package/dist/Table/Cells/CellNumeric.d.ts +4 -4
- package/dist/Table/Footer.d.ts +6 -6
- package/dist/Table/Header.d.ts +6 -6
- package/dist/Table/Row.d.ts +6 -6
- package/dist/Table/Table.d.ts +6 -6
- package/dist/Table/index.d.ts +8 -8
- package/dist/Table/index.js +41 -39
- package/dist/Tabs/Tabs.d.ts +19 -19
- package/dist/Tabs/index.d.ts +1 -1
- package/dist/Tabs/index.js +69 -67
- package/dist/Text/Text.d.ts +9 -9
- package/dist/Text/index.d.ts +1 -1
- package/dist/Text/index.js +7 -29
- package/dist/Text-9bc093e9.js +32 -0
- package/dist/Toast/Toast.d.ts +17 -17
- package/dist/Toast/index.d.ts +1 -1
- package/dist/Toast/index.js +93 -93
- package/dist/Toast/showToast.d.ts +2 -2
- package/dist/Tooltip/Tooltip.d.ts +10 -10
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +11 -110
- package/dist/Tooltip/useTooltipPositioning.d.ts +18 -18
- package/dist/Tooltip-4396164d.js +116 -0
- package/dist/Typography/Typography.d.ts +38 -38
- package/dist/Typography/index.d.ts +1 -1
- package/dist/Typography/index.js +6 -57
- package/dist/Typography-7e542a72.js +64 -0
- package/dist/{chunk-17e02351.js → style-inject.es-dcee06b6.js} +0 -0
- package/dist/{chunk-b67af3cb.js → tslib.es6-5b50eb8e.js} +0 -0
- package/package.json +6 -8
- package/rollup.config.js +28 -3
|
@@ -2,71 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
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
|
|
10
|
-
var
|
|
7
|
+
var styleInject_es = require('../style-inject.es-dcee06b6.js');
|
|
8
|
+
var Avatar = require('../Avatar-cfd04e86.js');
|
|
9
|
+
var InputFile = require('../InputFile-b5cf90c3.js');
|
|
10
|
+
var ProgressBar = require('../ProgressBar-e9a49129.js');
|
|
11
|
+
var Button = require('../Button-5b2f1636.js');
|
|
11
12
|
require('classnames');
|
|
12
|
-
require('../Typography/index.js');
|
|
13
|
-
require('@jobber/design');
|
|
14
|
-
require('../Icon/index.js');
|
|
15
|
-
require('uuid');
|
|
16
|
-
require('react-router-dom');
|
|
17
|
-
var index$5 = require('../Button/index.js');
|
|
18
|
-
var index$3 = require('../Avatar/index.js');
|
|
19
13
|
require('color');
|
|
20
|
-
require('../
|
|
21
|
-
|
|
14
|
+
require('../Icon-d5ad1a6d.js');
|
|
15
|
+
require('@jobber/design');
|
|
22
16
|
require('react-dropzone');
|
|
23
17
|
require('axios');
|
|
24
|
-
|
|
18
|
+
require('uuid');
|
|
19
|
+
require('../Content-18de5fbb.js');
|
|
20
|
+
require('../Typography-7e542a72.js');
|
|
21
|
+
require('react-router-dom');
|
|
22
|
+
|
|
23
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
|
+
|
|
25
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
26
|
|
|
26
27
|
var css = "._1e1D2becaB2vzZJ8QkTQFY {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n}\n\n._1e1D2becaB2vzZJ8QkTQFY > *:not(:last-child) {\n margin-right: var(--space-small);\n}\n\n.TQgDlkCH4_o4LkH2hOqde {\n position: relative;\n}\n\n.zq7uZTFFJ0aS_hIEAvVPX {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n height: 100%;\n margin: 0 var(--space-small);\n -ms-flex-align: center;\n align-items: center;\n}\n\n._3wSTh_yNalSZ5i5bnf_clw {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n._3wSTh_yNalSZ5i5bnf_clw::before {\n content: \"\";\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n border-radius: var(--radius-circle);\n background-color: var(--color-blue--dark);\n opacity: 0.3;\n mix-blend-mode: multiply;\n}\n";
|
|
27
28
|
var styles = {"inputAvatar":"_1e1D2becaB2vzZJ8QkTQFY","preview":"TQgDlkCH4_o4LkH2hOqde","centered":"zq7uZTFFJ0aS_hIEAvVPX","overlay":"_3wSTh_yNalSZ5i5bnf_clw"};
|
|
28
|
-
|
|
29
|
+
styleInject_es.styleInject(css);
|
|
29
30
|
|
|
30
|
-
function InputAvatar(_a) {
|
|
31
|
-
var getUploadParams = _a.getUploadParams, onUploadComplete = _a.onUploadComplete, onChange = _a.onChange, avatarProps =
|
|
32
|
-
var _b =
|
|
33
|
-
return (React__default.createElement("div", { className: styles.inputAvatar },
|
|
34
|
-
React__default.createElement("div", { className: styles.preview },
|
|
35
|
-
React__default.createElement(
|
|
36
|
-
progress < 1 && (React__default.createElement(Overlay, null,
|
|
37
|
-
React__default.createElement(Centered, null,
|
|
38
|
-
React__default.createElement(
|
|
39
|
-
React__default.createElement(
|
|
40
|
-
avatarProps.imageUrl != undefined && progress === 1 && (React__default.createElement(
|
|
41
|
-
function handleChange(newFile) {
|
|
42
|
-
onChange && onChange(newFile);
|
|
43
|
-
handleUpload(newFile);
|
|
44
|
-
}
|
|
45
|
-
function handleUploadComplete(newFile) {
|
|
46
|
-
onUploadComplete && onUploadComplete(newFile);
|
|
47
|
-
handleUpload(newFile);
|
|
48
|
-
}
|
|
49
|
-
function handleUpload(newFile) {
|
|
50
|
-
return
|
|
51
|
-
return
|
|
52
|
-
setProgress(newFile.progress);
|
|
53
|
-
return [2 /*return*/];
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
function clearAvatar() {
|
|
58
|
-
onChange && onChange(undefined);
|
|
59
|
-
setProgress(1);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function Overlay(_a) {
|
|
63
|
-
var children = _a.children;
|
|
64
|
-
return React__default.createElement("div", { className: styles.overlay }, children);
|
|
65
|
-
}
|
|
66
|
-
function Centered(_a) {
|
|
67
|
-
var children = _a.children;
|
|
68
|
-
// Note: this HIGHLY experimental Centered component is applying margin.
|
|
69
|
-
return React__default.createElement("div", { className: styles.centered }, children);
|
|
31
|
+
function InputAvatar(_a) {
|
|
32
|
+
var getUploadParams = _a.getUploadParams, onUploadComplete = _a.onUploadComplete, onChange = _a.onChange, avatarProps = tslib_es6.__rest(_a, ["getUploadParams", "onUploadComplete", "onChange"]);
|
|
33
|
+
var _b = tslib_es6.__read(React.useState(1), 2), progress = _b[0], setProgress = _b[1];
|
|
34
|
+
return (React__default["default"].createElement("div", { className: styles.inputAvatar },
|
|
35
|
+
React__default["default"].createElement("div", { className: styles.preview },
|
|
36
|
+
React__default["default"].createElement(Avatar.Avatar, tslib_es6.__assign({ size: "large" }, avatarProps)),
|
|
37
|
+
progress < 1 && (React__default["default"].createElement(Overlay, null,
|
|
38
|
+
React__default["default"].createElement(Centered, null,
|
|
39
|
+
React__default["default"].createElement(ProgressBar.ProgressBar, { size: "small", currentStep: progress * 100, totalSteps: 100 }))))),
|
|
40
|
+
React__default["default"].createElement(InputFile.InputFile, { variation: "button", buttonLabel: avatarProps.imageUrl ? "Change Image" : undefined, size: "small", allowedTypes: "images", getUploadParams: getUploadParams, onUploadStart: handleChange, onUploadProgress: handleUpload, onUploadComplete: handleUploadComplete }),
|
|
41
|
+
avatarProps.imageUrl != undefined && progress === 1 && (React__default["default"].createElement(Button.Button, { label: "Remove", size: "small", type: "secondary", variation: "destructive", onClick: clearAvatar }))));
|
|
42
|
+
function handleChange(newFile) {
|
|
43
|
+
onChange && onChange(newFile);
|
|
44
|
+
handleUpload(newFile);
|
|
45
|
+
}
|
|
46
|
+
function handleUploadComplete(newFile) {
|
|
47
|
+
onUploadComplete && onUploadComplete(newFile);
|
|
48
|
+
handleUpload(newFile);
|
|
49
|
+
}
|
|
50
|
+
function handleUpload(newFile) {
|
|
51
|
+
return tslib_es6.__awaiter(this, void 0, void 0, function () {
|
|
52
|
+
return tslib_es6.__generator(this, function (_a) {
|
|
53
|
+
setProgress(newFile.progress);
|
|
54
|
+
return [2 /*return*/];
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function clearAvatar() {
|
|
59
|
+
onChange && onChange(undefined);
|
|
60
|
+
setProgress(1);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function Overlay(_a) {
|
|
64
|
+
var children = _a.children;
|
|
65
|
+
return React__default["default"].createElement("div", { className: styles.overlay }, children);
|
|
66
|
+
}
|
|
67
|
+
function Centered(_a) {
|
|
68
|
+
var children = _a.children;
|
|
69
|
+
// Note: this HIGHLY experimental Centered component is applying margin.
|
|
70
|
+
return React__default["default"].createElement("div", { className: styles.centered }, children);
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
exports.InputAvatar = InputAvatar;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { CommonFormFieldProps, FormFieldProps } from "../FormField";
|
|
2
|
-
interface InputDateProps extends CommonFormFieldProps, Pick<FormFieldProps, "readonly" | "disabled" | "onEnter" | "onFocus" | "inputRef" | "validations" | "placeholder" | "onChange" | "onBlur"> {
|
|
3
|
-
/**
|
|
4
|
-
* A Date object value
|
|
5
|
-
* (e.g., `new Date("11/11/2011")`)
|
|
6
|
-
* */
|
|
7
|
-
readonly value?: Date;
|
|
8
|
-
onChange(newValue: Date): void;
|
|
9
|
-
/**
|
|
10
|
-
* The maximum selectable date.
|
|
11
|
-
*/
|
|
12
|
-
readonly maxDate?: Date;
|
|
13
|
-
/**
|
|
14
|
-
* The minimum selectable date.
|
|
15
|
-
*/
|
|
16
|
-
readonly minDate?: Date;
|
|
17
|
-
}
|
|
18
|
-
export declare function InputDate(inputProps: InputDateProps): JSX.Element;
|
|
19
|
-
export {};
|
|
1
|
+
import { CommonFormFieldProps, FormFieldProps } from "../FormField";
|
|
2
|
+
interface InputDateProps extends CommonFormFieldProps, Pick<FormFieldProps, "readonly" | "disabled" | "onEnter" | "onFocus" | "inputRef" | "validations" | "placeholder" | "onChange" | "onBlur"> {
|
|
3
|
+
/**
|
|
4
|
+
* A Date object value
|
|
5
|
+
* (e.g., `new Date("11/11/2011")`)
|
|
6
|
+
* */
|
|
7
|
+
readonly value?: Date;
|
|
8
|
+
onChange(newValue: Date): void;
|
|
9
|
+
/**
|
|
10
|
+
* The maximum selectable date.
|
|
11
|
+
*/
|
|
12
|
+
readonly maxDate?: Date;
|
|
13
|
+
/**
|
|
14
|
+
* The minimum selectable date.
|
|
15
|
+
*/
|
|
16
|
+
readonly minDate?: Date;
|
|
17
|
+
}
|
|
18
|
+
export declare function InputDate(inputProps: InputDateProps): JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { InputDate } from "./InputDate";
|
|
1
|
+
export { InputDate } from "./InputDate";
|
package/dist/InputDate/index.js
CHANGED
|
@@ -2,46 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var __chunk_1 = require('../chunk-b67af3cb.js');
|
|
5
|
+
var tslib_es6 = require('../tslib.es6-5b50eb8e.js');
|
|
6
|
+
var lodash = require('lodash');
|
|
8
7
|
var React = require('react');
|
|
9
|
-
var
|
|
10
|
-
require('../
|
|
11
|
-
require('classnames');
|
|
12
|
-
require('../Typography/index.js');
|
|
13
|
-
require('../Text/index.js');
|
|
14
|
-
require('@jobber/design');
|
|
15
|
-
require('../Icon/index.js');
|
|
8
|
+
var FormField = require('../FormField-a92c7bac.js');
|
|
9
|
+
var DatePicker = require('../DatePicker-ad6f8630.js');
|
|
16
10
|
require('uuid');
|
|
17
11
|
require('react-hook-form');
|
|
18
|
-
|
|
12
|
+
require('../style-inject.es-dcee06b6.js');
|
|
13
|
+
require('classnames');
|
|
14
|
+
require('../Button-5b2f1636.js');
|
|
19
15
|
require('react-router-dom');
|
|
20
|
-
require('../
|
|
16
|
+
require('../Icon-d5ad1a6d.js');
|
|
17
|
+
require('@jobber/design');
|
|
18
|
+
require('../Typography-7e542a72.js');
|
|
19
|
+
require('../Text-9bc093e9.js');
|
|
20
|
+
require('../InputValidation-24d3621a.js');
|
|
21
21
|
require('framer-motion');
|
|
22
|
-
require('../
|
|
23
|
-
require('../Spinner/index.js');
|
|
24
|
-
require('@jobber/hooks');
|
|
25
|
-
var lodash = require('lodash');
|
|
22
|
+
require('../Spinner-18d3dee6.js');
|
|
26
23
|
require('react-datepicker');
|
|
27
|
-
|
|
24
|
+
require('@jobber/hooks');
|
|
25
|
+
|
|
26
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
27
|
+
|
|
28
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
28
29
|
|
|
29
|
-
function InputDate(inputProps) {
|
|
30
|
-
return (React__default.createElement(
|
|
31
|
-
var onChange = activatorProps.onChange, onClick = activatorProps.onClick, value = activatorProps.value;
|
|
32
|
-
var newActivatorProps = lodash.omit(activatorProps, ["activator"]);
|
|
33
|
-
var suffix =
|
|
34
|
-
onClick: onClick,
|
|
35
|
-
ariaLabel: "Show calendar",
|
|
36
|
-
}));
|
|
37
|
-
return (React__default.createElement(
|
|
38
|
-
inputProps.onBlur && inputProps.onBlur();
|
|
39
|
-
activatorProps.onBlur && activatorProps.onBlur();
|
|
40
|
-
}, onFocus: function () {
|
|
41
|
-
inputProps.onFocus && inputProps.onFocus();
|
|
42
|
-
activatorProps.onFocus && activatorProps.onFocus();
|
|
43
|
-
}, suffix: suffix })));
|
|
44
|
-
} }));
|
|
30
|
+
function InputDate(inputProps) {
|
|
31
|
+
return (React__default["default"].createElement(DatePicker.DatePicker, { selected: inputProps.value, onChange: inputProps.onChange, disabled: inputProps.disabled, readonly: inputProps.readonly, fullWidth: !inputProps.inline, minDate: inputProps.minDate, maxDate: inputProps.maxDate, smartAutofocus: false, activator: function (activatorProps) {
|
|
32
|
+
var onChange = activatorProps.onChange, onClick = activatorProps.onClick, value = activatorProps.value;
|
|
33
|
+
var newActivatorProps = lodash.omit(activatorProps, ["activator"]);
|
|
34
|
+
var suffix = tslib_es6.__assign({ icon: "calendar" }, (onClick && {
|
|
35
|
+
onClick: onClick,
|
|
36
|
+
ariaLabel: "Show calendar",
|
|
37
|
+
}));
|
|
38
|
+
return (React__default["default"].createElement(FormField.FormField, tslib_es6.__assign({}, newActivatorProps, inputProps, { value: value, onChange: function (_, event) { return onChange && onChange(event); }, onBlur: function () {
|
|
39
|
+
inputProps.onBlur && inputProps.onBlur();
|
|
40
|
+
activatorProps.onBlur && activatorProps.onBlur();
|
|
41
|
+
}, onFocus: function () {
|
|
42
|
+
inputProps.onFocus && inputProps.onFocus();
|
|
43
|
+
activatorProps.onFocus && activatorProps.onFocus();
|
|
44
|
+
}, suffix: suffix })));
|
|
45
|
+
} }));
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
exports.InputDate = InputDate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CommonFormFieldProps, FormFieldProps } from "../FormField";
|
|
2
|
-
declare type InputEmailProps = CommonFormFieldProps & Pick<FormFieldProps, "maxLength" | "readonly" | "validations" | "defaultValue">;
|
|
3
|
-
export declare const validationMessage = "Please enter a valid email";
|
|
4
|
-
export declare function InputEmail(props: InputEmailProps): JSX.Element;
|
|
5
|
-
export {};
|
|
1
|
+
import { CommonFormFieldProps, FormFieldProps } from "../FormField";
|
|
2
|
+
declare type InputEmailProps = CommonFormFieldProps & Pick<FormFieldProps, "maxLength" | "readonly" | "validations" | "defaultValue">;
|
|
3
|
+
export declare const validationMessage = "Please enter a valid email";
|
|
4
|
+
export declare function InputEmail(props: InputEmailProps): JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { InputEmail, validationMessage } from "./InputEmail";
|
|
1
|
+
export { InputEmail, validationMessage } from "./InputEmail";
|
package/dist/InputEmail/index.js
CHANGED
|
@@ -2,40 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
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
|
|
10
|
-
require('../chunk-17e02351.js');
|
|
11
|
-
require('classnames');
|
|
12
|
-
require('../Typography/index.js');
|
|
13
|
-
require('../Text/index.js');
|
|
14
|
-
require('@jobber/design');
|
|
15
|
-
require('../Icon/index.js');
|
|
7
|
+
var FormField = require('../FormField-a92c7bac.js');
|
|
16
8
|
require('uuid');
|
|
17
9
|
require('react-hook-form');
|
|
18
|
-
|
|
10
|
+
require('../style-inject.es-dcee06b6.js');
|
|
11
|
+
require('classnames');
|
|
12
|
+
require('../Button-5b2f1636.js');
|
|
19
13
|
require('react-router-dom');
|
|
20
|
-
require('../
|
|
14
|
+
require('../Icon-d5ad1a6d.js');
|
|
15
|
+
require('@jobber/design');
|
|
16
|
+
require('../Typography-7e542a72.js');
|
|
17
|
+
require('../Text-9bc093e9.js');
|
|
18
|
+
require('../InputValidation-24d3621a.js');
|
|
21
19
|
require('framer-motion');
|
|
22
|
-
require('../
|
|
23
|
-
|
|
20
|
+
require('../Spinner-18d3dee6.js');
|
|
21
|
+
|
|
22
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
|
+
|
|
24
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
25
|
|
|
25
|
-
var validationMessage = "Please enter a valid email";
|
|
26
|
-
function InputEmail(props) {
|
|
27
|
-
var validations = props.validations;
|
|
28
|
-
return (React__default.createElement(
|
|
29
|
-
function checkForValidEmail(value) {
|
|
30
|
-
var emailRegex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
31
|
-
if (!value) {
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
if (!value.match(emailRegex)) {
|
|
35
|
-
return validationMessage;
|
|
36
|
-
}
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
26
|
+
var validationMessage = "Please enter a valid email";
|
|
27
|
+
function InputEmail(props) {
|
|
28
|
+
var validations = props.validations;
|
|
29
|
+
return (React__default["default"].createElement(FormField.FormField, tslib_es6.__assign({}, props, { type: "email", validations: tslib_es6.__assign(tslib_es6.__assign({}, validations), { validate: checkForValidEmail }) })));
|
|
30
|
+
function checkForValidEmail(value) {
|
|
31
|
+
var emailRegex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
32
|
+
if (!value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
if (!value.match(emailRegex)) {
|
|
36
|
+
return validationMessage;
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
exports.InputEmail = InputEmail;
|
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
export interface FileUpload {
|
|
2
|
-
/**
|
|
3
|
-
* File Identifier
|
|
4
|
-
*/
|
|
5
|
-
readonly key: string;
|
|
6
|
-
/**
|
|
7
|
-
* The name of the file.
|
|
8
|
-
*/
|
|
9
|
-
readonly name: string;
|
|
10
|
-
/**
|
|
11
|
-
* The [MIME](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) type of the file
|
|
12
|
-
*/
|
|
13
|
-
readonly type: string;
|
|
14
|
-
/**
|
|
15
|
-
* The size of the file in bytes.
|
|
16
|
-
*/
|
|
17
|
-
readonly size: number;
|
|
18
|
-
/**
|
|
19
|
-
* The progress of a file upload between 0 and 1.
|
|
20
|
-
* - `0` represents Upload just started.
|
|
21
|
-
* - `1` represents a complete upload.
|
|
22
|
-
*/
|
|
23
|
-
readonly progress: number;
|
|
24
|
-
/**
|
|
25
|
-
* The data url of the file.
|
|
26
|
-
*/
|
|
27
|
-
src(): Promise<string>;
|
|
28
|
-
}
|
|
29
|
-
export interface UploadParams {
|
|
30
|
-
/**
|
|
31
|
-
* Url to POST file to.
|
|
32
|
-
*/
|
|
33
|
-
readonly url: string;
|
|
34
|
-
/**
|
|
35
|
-
* Key to identify file.
|
|
36
|
-
* If unspecified a `uuid` will be used.
|
|
37
|
-
*/
|
|
38
|
-
readonly key?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Any extra fields or headers to send with the upload.
|
|
41
|
-
* If unspecified only the file will be included.
|
|
42
|
-
*/
|
|
43
|
-
readonly fields?: {
|
|
44
|
-
[field: string]: string;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* The HTTP method which we wish to use for the upload
|
|
48
|
-
*
|
|
49
|
-
* When the HTTP method is `"PUT"`, the `fields` will
|
|
50
|
-
* be used as headers for the request
|
|
51
|
-
*
|
|
52
|
-
* When the HTTP method is `"POST"` the `fields` are
|
|
53
|
-
* form fields
|
|
54
|
-
*
|
|
55
|
-
* @default "POST"
|
|
56
|
-
*/
|
|
57
|
-
readonly httpMethod?: "POST" | "PUT";
|
|
58
|
-
}
|
|
59
|
-
interface InputFileProps {
|
|
60
|
-
/**
|
|
61
|
-
* Display variation.
|
|
62
|
-
* @default "dropzone"
|
|
63
|
-
*/
|
|
64
|
-
readonly variation?: "dropzone" | "button";
|
|
65
|
-
/**
|
|
66
|
-
* Size of the InputFile
|
|
67
|
-
* @default "base"
|
|
68
|
-
*/
|
|
69
|
-
readonly size?: "small" | "base";
|
|
70
|
-
/**
|
|
71
|
-
* Label for the InputFile's button.
|
|
72
|
-
* @default Automatic
|
|
73
|
-
*/
|
|
74
|
-
readonly buttonLabel?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Allowed File types.
|
|
77
|
-
*
|
|
78
|
-
* @param "images" - only accepts all types of image
|
|
79
|
-
* @param "basicImages" - only accepts png, jpg and jpeg
|
|
80
|
-
*
|
|
81
|
-
* @default "all"
|
|
82
|
-
*/
|
|
83
|
-
readonly allowedTypes?: "all" | "images" | "basicImages";
|
|
84
|
-
/**
|
|
85
|
-
* Allow for multiple files to be selected for upload.
|
|
86
|
-
*
|
|
87
|
-
* @default false
|
|
88
|
-
*/
|
|
89
|
-
readonly allowMultiple?: boolean;
|
|
90
|
-
/**
|
|
91
|
-
* A callback that receives a file object and returns a `UploadParams` needed
|
|
92
|
-
* to upload the file.
|
|
93
|
-
*
|
|
94
|
-
* More info is available at:
|
|
95
|
-
* https://atlantis.getjobber.com/components/input-file#getuploadparams
|
|
96
|
-
*/
|
|
97
|
-
getUploadParams(file: File): UploadParams | Promise<UploadParams>;
|
|
98
|
-
/**
|
|
99
|
-
* Upload event handler. Triggered on upload start.
|
|
100
|
-
*/
|
|
101
|
-
onUploadStart?(file: FileUpload): void;
|
|
102
|
-
/**
|
|
103
|
-
* Upload event handler. Triggered as upload progresses.
|
|
104
|
-
*/
|
|
105
|
-
onUploadProgress?(file: FileUpload): void;
|
|
106
|
-
/**
|
|
107
|
-
* Upload event handler. Triggered on upload completion.
|
|
108
|
-
*/
|
|
109
|
-
onUploadComplete?(file: FileUpload): void;
|
|
110
|
-
}
|
|
111
|
-
export declare function InputFile({ variation, size, buttonLabel: providedButtonLabel, allowMultiple, allowedTypes, getUploadParams, onUploadStart, onUploadProgress, onUploadComplete, }: InputFileProps): JSX.Element;
|
|
112
|
-
/**
|
|
113
|
-
* Upsert a given `FileUpload` into an array of `FileUpload`s.
|
|
114
|
-
* `key` is used to uniquely identify files.
|
|
115
|
-
*
|
|
116
|
-
* @param updatedFile FileUpload File that was updated.
|
|
117
|
-
* @param files Existing array of FileUploads.
|
|
118
|
-
* @returns FileUpload[] updated set of files.
|
|
119
|
-
*/
|
|
120
|
-
export declare function updateFiles(updatedFile: FileUpload, files: FileUpload[]): FileUpload[];
|
|
121
|
-
export {};
|
|
1
|
+
export interface FileUpload {
|
|
2
|
+
/**
|
|
3
|
+
* File Identifier
|
|
4
|
+
*/
|
|
5
|
+
readonly key: string;
|
|
6
|
+
/**
|
|
7
|
+
* The name of the file.
|
|
8
|
+
*/
|
|
9
|
+
readonly name: string;
|
|
10
|
+
/**
|
|
11
|
+
* The [MIME](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) type of the file
|
|
12
|
+
*/
|
|
13
|
+
readonly type: string;
|
|
14
|
+
/**
|
|
15
|
+
* The size of the file in bytes.
|
|
16
|
+
*/
|
|
17
|
+
readonly size: number;
|
|
18
|
+
/**
|
|
19
|
+
* The progress of a file upload between 0 and 1.
|
|
20
|
+
* - `0` represents Upload just started.
|
|
21
|
+
* - `1` represents a complete upload.
|
|
22
|
+
*/
|
|
23
|
+
readonly progress: number;
|
|
24
|
+
/**
|
|
25
|
+
* The data url of the file.
|
|
26
|
+
*/
|
|
27
|
+
src(): Promise<string>;
|
|
28
|
+
}
|
|
29
|
+
export interface UploadParams {
|
|
30
|
+
/**
|
|
31
|
+
* Url to POST file to.
|
|
32
|
+
*/
|
|
33
|
+
readonly url: string;
|
|
34
|
+
/**
|
|
35
|
+
* Key to identify file.
|
|
36
|
+
* If unspecified a `uuid` will be used.
|
|
37
|
+
*/
|
|
38
|
+
readonly key?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Any extra fields or headers to send with the upload.
|
|
41
|
+
* If unspecified only the file will be included.
|
|
42
|
+
*/
|
|
43
|
+
readonly fields?: {
|
|
44
|
+
[field: string]: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* The HTTP method which we wish to use for the upload
|
|
48
|
+
*
|
|
49
|
+
* When the HTTP method is `"PUT"`, the `fields` will
|
|
50
|
+
* be used as headers for the request
|
|
51
|
+
*
|
|
52
|
+
* When the HTTP method is `"POST"` the `fields` are
|
|
53
|
+
* form fields
|
|
54
|
+
*
|
|
55
|
+
* @default "POST"
|
|
56
|
+
*/
|
|
57
|
+
readonly httpMethod?: "POST" | "PUT";
|
|
58
|
+
}
|
|
59
|
+
interface InputFileProps {
|
|
60
|
+
/**
|
|
61
|
+
* Display variation.
|
|
62
|
+
* @default "dropzone"
|
|
63
|
+
*/
|
|
64
|
+
readonly variation?: "dropzone" | "button";
|
|
65
|
+
/**
|
|
66
|
+
* Size of the InputFile
|
|
67
|
+
* @default "base"
|
|
68
|
+
*/
|
|
69
|
+
readonly size?: "small" | "base";
|
|
70
|
+
/**
|
|
71
|
+
* Label for the InputFile's button.
|
|
72
|
+
* @default Automatic
|
|
73
|
+
*/
|
|
74
|
+
readonly buttonLabel?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Allowed File types.
|
|
77
|
+
*
|
|
78
|
+
* @param "images" - only accepts all types of image
|
|
79
|
+
* @param "basicImages" - only accepts png, jpg and jpeg
|
|
80
|
+
*
|
|
81
|
+
* @default "all"
|
|
82
|
+
*/
|
|
83
|
+
readonly allowedTypes?: "all" | "images" | "basicImages";
|
|
84
|
+
/**
|
|
85
|
+
* Allow for multiple files to be selected for upload.
|
|
86
|
+
*
|
|
87
|
+
* @default false
|
|
88
|
+
*/
|
|
89
|
+
readonly allowMultiple?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* A callback that receives a file object and returns a `UploadParams` needed
|
|
92
|
+
* to upload the file.
|
|
93
|
+
*
|
|
94
|
+
* More info is available at:
|
|
95
|
+
* https://atlantis.getjobber.com/components/input-file#getuploadparams
|
|
96
|
+
*/
|
|
97
|
+
getUploadParams(file: File): UploadParams | Promise<UploadParams>;
|
|
98
|
+
/**
|
|
99
|
+
* Upload event handler. Triggered on upload start.
|
|
100
|
+
*/
|
|
101
|
+
onUploadStart?(file: FileUpload): void;
|
|
102
|
+
/**
|
|
103
|
+
* Upload event handler. Triggered as upload progresses.
|
|
104
|
+
*/
|
|
105
|
+
onUploadProgress?(file: FileUpload): void;
|
|
106
|
+
/**
|
|
107
|
+
* Upload event handler. Triggered on upload completion.
|
|
108
|
+
*/
|
|
109
|
+
onUploadComplete?(file: FileUpload): void;
|
|
110
|
+
}
|
|
111
|
+
export declare function InputFile({ variation, size, buttonLabel: providedButtonLabel, allowMultiple, allowedTypes, getUploadParams, onUploadStart, onUploadProgress, onUploadComplete, }: InputFileProps): JSX.Element;
|
|
112
|
+
/**
|
|
113
|
+
* Upsert a given `FileUpload` into an array of `FileUpload`s.
|
|
114
|
+
* `key` is used to uniquely identify files.
|
|
115
|
+
*
|
|
116
|
+
* @param updatedFile FileUpload File that was updated.
|
|
117
|
+
* @param files Existing array of FileUploads.
|
|
118
|
+
* @returns FileUpload[] updated set of files.
|
|
119
|
+
*/
|
|
120
|
+
export declare function updateFiles(updatedFile: FileUpload, files: FileUpload[]): FileUpload[];
|
|
121
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { InputFile, updateFiles, FileUpload, UploadParams } from "./InputFile";
|
|
1
|
+
export { InputFile, updateFiles, FileUpload, UploadParams } from "./InputFile";
|