@jobber/components 3.4.5 → 3.4.6-pre.6
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/Autocomplete/Autocomplete.d.ts +1 -0
- package/dist/Autocomplete/Menu.d.ts +1 -0
- package/dist/Avatar/Avatar.d.ts +1 -0
- package/dist/Banner/index.js +15 -18
- package/dist/Card/CardHeader.d.ts +1 -0
- package/dist/Chips/Chip.d.ts +1 -0
- package/dist/Chips/Chips.d.ts +1 -0
- package/dist/Chips/InternalChip.d.ts +1 -0
- package/dist/Chips/InternalChipDismissible/InternalChipDismissible.d.ts +1 -0
- package/dist/Chips/InternalChipDismissible/InternalChipDismissibleInput.d.ts +1 -0
- package/dist/Chips/InternalChipMultiSelect.d.ts +1 -0
- package/dist/Chips/InternalChipSingleSelect.d.ts +1 -0
- package/dist/ConfirmationModal/ConfirmationModal.d.ts +1 -1
- package/dist/Countdown/Countdown.d.ts +1 -0
- package/dist/DataDump/DataDump.d.ts +1 -0
- package/dist/DataTable/Footer.d.ts +1 -0
- package/dist/DataTable/Header.d.ts +1 -0
- package/dist/DataTable/Pagination.d.ts +1 -0
- package/dist/DataTable/SortIcon.d.ts +1 -0
- package/dist/DatePicker/DatePickerCustomHeader.d.ts +1 -0
- package/dist/Divider/Divider.d.ts +1 -0
- package/dist/FormField/FormField.d.ts +1 -0
- package/dist/FormField/FormFieldDescription.d.ts +1 -0
- package/dist/FormField/FormFieldPostFix.d.ts +1 -0
- package/dist/FormatDate/FormatDate.d.ts +1 -0
- package/dist/FormatEmail/FormatEmail.d.ts +1 -0
- package/dist/FormatFile/FormatFileDeleteButton.d.ts +1 -0
- package/dist/FormatFile/InternalThumbnail.d.ts +1 -0
- package/dist/FormatRelativeDateTime/FormatRelativeDateTime.d.ts +1 -0
- package/dist/FormatTime/FormatTime.d.ts +1 -0
- package/dist/Gallery/Gallery.d.ts +1 -0
- package/dist/Icon/Icon.d.ts +1 -0
- package/dist/InputAvatar/InputAvatar.d.ts +1 -0
- package/dist/InputDate/InputDate.d.ts +1 -0
- package/dist/InputEmail/InputEmail.d.ts +1 -0
- package/dist/InputFile/InputFile.d.ts +1 -0
- package/dist/InputPassword/InputPassword.d.ts +1 -0
- package/dist/InputTime/InputTime.d.ts +1 -0
- package/dist/InputTime/InputTimeSafari.d.ts +1 -0
- package/dist/InputValidation/InputValidation.d.ts +1 -0
- package/dist/List/List.d.ts +1 -0
- package/dist/List/List.stories.d.ts +1 -0
- package/dist/Markdown/Markdown.d.ts +1 -0
- package/dist/Menu/Menu.stories.d.ts +1 -0
- package/dist/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/RecurringSelect/CurrentRecurrenceComponent.d.ts +1 -0
- package/dist/RecurringSelect/RecurringSelect.d.ts +1 -0
- package/dist/RecurringSelect/components/DayOfMonthSelect.d.ts +1 -0
- package/dist/RecurringSelect/components/MonthlyDayOfWeekSelect.d.ts +1 -0
- package/dist/RecurringSelect/components/MonthlySelect.d.ts +1 -0
- package/dist/RecurringSelect/components/WeeklySelect.d.ts +1 -0
- package/dist/Select/Select.d.ts +1 -0
- package/dist/Spinner/Spinner.d.ts +1 -0
- package/dist/StatusLabel/StatusLabel.d.ts +1 -0
- package/dist/Switch/Switch.d.ts +1 -0
- package/dist/Table/Cells/CellCurrency.d.ts +1 -0
- package/dist/Table/Cells/CellNumeric.d.ts +1 -0
- package/dist/Toast/Toast.d.ts +1 -0
- package/package.json +10 -10
package/dist/Avatar/Avatar.d.ts
CHANGED
package/dist/Banner/index.js
CHANGED
|
@@ -19,8 +19,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
19
19
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
20
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
21
21
|
|
|
22
|
-
var css$1 = "
|
|
23
|
-
var styles = {"
|
|
22
|
+
var css$1 = ".XnQ3RJFzByInxjZ8LTsv8 {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n box-shadow: var(--shadow-base);\n padding: var(--space-base);\n color: var(--color-text);\n background-color: var(--color-surface--background);\n grid-gap: var(--space-small);\n grid-gap: var(--space-small);\n gap: var(--space-small);\n -ms-flex-align: center;\n align-items: center;\n}\n\n._3vGMT9on-QbjXBlSaiNcgm {\n display: -ms-flexbox;\n display: flex;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n grid-gap: var(--space-small);\n grid-gap: var(--space-small);\n gap: var(--space-small);\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n._2iRHpLiGUYBO-8xY0h00rp {\n -ms-flex-item-align: center;\n align-self: center;\n}\n\n._3vGMT9on-QbjXBlSaiNcgm > *:last-child {\n margin-bottom: 0;\n}\n\n._1S5EoHZng2ePaBlNMXhUYb ._3vGMT9on-QbjXBlSaiNcgm {\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n}\n\n._12QzEnq3z7-XCpLmgYARp {\n display: -ms-flexbox;\n display: flex;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n\n._2MtsHfzp46XdG3BZQtOLm- {\n margin: calc(var(--space-smallest) * -1) 0;\n padding: var(--space-smallest);\n border: none;\n background-color: transparent;\n cursor: pointer;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n -ms-flex: 0;\n flex: 0;\n -ms-flex-item-align: start;\n align-self: flex-start;\n}\n\n._2MtsHfzp46XdG3BZQtOLm-:hover {\n background: rgba(0, 0, 0, 0.025);\n}\n\n._2MtsHfzp46XdG3BZQtOLm-:focus {\n box-shadow: var(--shadow-focus);\n outline: none;\n background: rgba(0, 0, 0, 0.05);\n}\n";
|
|
23
|
+
var styles = {"banner":"XnQ3RJFzByInxjZ8LTsv8","bannerContent":"_3vGMT9on-QbjXBlSaiNcgm","bannerChildren":"_2iRHpLiGUYBO-8xY0h00rp","medium":"_1S5EoHZng2ePaBlNMXhUYb","bannerAction":"_12QzEnq3z7-XCpLmgYARp","closeButton":"_2MtsHfzp46XdG3BZQtOLm-"};
|
|
24
24
|
styleInject_es.styleInject(css$1);
|
|
25
25
|
|
|
26
26
|
var css = ".nw7Tf4jicBNmfENtxh7tG {\n background-color: var(--color-informative--surface);\n}\n\n/* Our Banner \"surface\" colors should be lighter than they are so we're leaving the following alone for now */\n\n.myY4eq0vr_r4Twz0QcBwu {\n background-color: var(--color-green--lighter);\n}\n\n.eExwEf69eCfam2C6Ekk5D {\n background-color: var(--color-yellow--lighter);\n}\n\n._1U_-uPZepxvaZPO5hh8G4O {\n background-color: var(--color-red--lighter);\n}\n";
|
|
@@ -28,21 +28,21 @@ var types = {"notice":"nw7Tf4jicBNmfENtxh7tG","success":"myY4eq0vr_r4Twz0QcBwu",
|
|
|
28
28
|
styleInject_es.styleInject(css);
|
|
29
29
|
|
|
30
30
|
function Banner(_a) {
|
|
31
|
-
var _b
|
|
32
|
-
var children = _a.children, type = _a.type, primaryAction = _a.primaryAction,
|
|
33
|
-
var
|
|
31
|
+
var _b;
|
|
32
|
+
var children = _a.children, type = _a.type, primaryAction = _a.primaryAction, _c = _a.dismissible, dismissible = _c === void 0 ? true : _c, onDismiss = _a.onDismiss;
|
|
33
|
+
var _d = tslib_es6.__read(React.useState(true), 2), showBanner = _d[0], setShowBanner = _d[1];
|
|
34
34
|
var bannerWidths = {
|
|
35
35
|
small: 320,
|
|
36
36
|
medium: 480,
|
|
37
37
|
};
|
|
38
|
-
var
|
|
38
|
+
var _e = tslib_es6.__read(jobberHooks.useResizeObserver({
|
|
39
39
|
widths: bannerWidths,
|
|
40
|
-
}), 2), bannerRef =
|
|
40
|
+
}), 2), bannerRef = _e[0], _f = _e[1].width, bannerWidth = _f === void 0 ? bannerWidths.small : _f;
|
|
41
41
|
var iconColors = {
|
|
42
|
-
notice: "
|
|
43
|
-
success: "
|
|
44
|
-
warning: "
|
|
45
|
-
error: "
|
|
42
|
+
notice: "informative",
|
|
43
|
+
success: "success",
|
|
44
|
+
warning: "warning",
|
|
45
|
+
error: "critical",
|
|
46
46
|
};
|
|
47
47
|
if (primaryAction != undefined) {
|
|
48
48
|
primaryAction = Object.assign({
|
|
@@ -51,14 +51,11 @@ function Banner(_a) {
|
|
|
51
51
|
variation: type === "notice" ? "learning" : "work",
|
|
52
52
|
}, primaryAction);
|
|
53
53
|
}
|
|
54
|
-
var
|
|
54
|
+
var bannerClassNames = classnames__default["default"](styles.banner, types[type], (_b = {},
|
|
55
55
|
_b[styles.medium] = bannerWidth >= bannerWidths.medium,
|
|
56
56
|
_b));
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
_c));
|
|
60
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null, showFlash && (React__default["default"].createElement("div", { className: flashClassNames, ref: bannerRef, role: type === "error" ? "alert" : "status" },
|
|
61
|
-
React__default["default"].createElement("div", { className: contentClassNames },
|
|
57
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null, showBanner && (React__default["default"].createElement("div", { className: bannerClassNames, ref: bannerRef, role: type === "error" ? "alert" : "status" },
|
|
58
|
+
React__default["default"].createElement("div", { className: styles.bannerContent },
|
|
62
59
|
React__default["default"].createElement("div", { className: styles.bannerChildren },
|
|
63
60
|
React__default["default"].createElement(BannerChildren, null, children)),
|
|
64
61
|
primaryAction && (React__default["default"].createElement("div", { className: styles.bannerAction },
|
|
@@ -66,7 +63,7 @@ function Banner(_a) {
|
|
|
66
63
|
dismissible && (React__default["default"].createElement("button", { className: styles.closeButton, onClick: handleClose, "aria-label": "Close this notification" },
|
|
67
64
|
React__default["default"].createElement(Icon.Icon, { name: "cross", color: iconColors[type] })))))));
|
|
68
65
|
function handleClose() {
|
|
69
|
-
|
|
66
|
+
setShowBanner(!showBanner);
|
|
70
67
|
onDismiss && onDismiss();
|
|
71
68
|
}
|
|
72
69
|
}
|
package/dist/Chips/Chip.d.ts
CHANGED
package/dist/Chips/Chips.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ChipMultiSelectProps } from "./ChipsTypes";
|
|
2
3
|
declare type InternalChipChoiceMultipleProps = Pick<ChipMultiSelectProps, "selected" | "onChange" | "children" | "onClick">;
|
|
3
4
|
export declare function InternalChipMultiSelect({ children, selected, onChange, onClick, }: InternalChipChoiceMultipleProps): JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ChipSingleSelectProps } from "./ChipsTypes";
|
|
2
3
|
declare type InternalChipChoiceProps = Pick<ChipSingleSelectProps, "selected" | "onChange" | "children" | "onClick" | "name">;
|
|
3
4
|
export declare function InternalChipSingleSelect({ children, selected, name, onChange, onClick, }: InternalChipChoiceProps): JSX.Element;
|
|
@@ -74,5 +74,5 @@ interface StringMessage extends BaseConfirmationModalProps {
|
|
|
74
74
|
message: string;
|
|
75
75
|
children?: never;
|
|
76
76
|
}
|
|
77
|
-
export declare const ConfirmationModal: React.ForwardRefExoticComponent<(SimpleConfirmationModalProps & ChildrenMessage & React.RefAttributes<ConfirmationModalRef>) | (SimpleConfirmationModalProps & StringMessage & React.RefAttributes<ConfirmationModalRef>) | (ComplexConfirmationModalProps & ChildrenMessage & React.RefAttributes<ConfirmationModalRef>) | (ComplexConfirmationModalProps & StringMessage & React.RefAttributes<ConfirmationModalRef>)>;
|
|
77
|
+
export declare const ConfirmationModal: React.ForwardRefExoticComponent<(SimpleConfirmationModalProps & ChildrenMessage & React.RefAttributes<ConfirmationModalRef>) | (SimpleConfirmationModalProps & StringMessage & React.RefAttributes<ConfirmationModalRef>) | (Pick<ComplexConfirmationModalProps & ChildrenMessage, "children" | "size" | "title" | "variation" | "message" | "open" | "onRequestClose" | "onCancel" | "confirmLabel" | "cancelLabel" | "onConfirm"> & React.RefAttributes<ConfirmationModalRef>) | (Pick<ComplexConfirmationModalProps & StringMessage, "children" | "size" | "title" | "variation" | "message" | "open" | "onRequestClose" | "onCancel" | "confirmLabel" | "cancelLabel" | "onConfirm"> & React.RefAttributes<ConfirmationModalRef>)>;
|
|
78
78
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ReactDatePickerCustomHeaderProps } from "react-datepicker";
|
|
2
3
|
export declare function DatePickerCustomHeader({ monthDate, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, }: ReactDatePickerCustomHeaderProps): JSX.Element;
|
package/dist/Icon/Icon.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CommonFormFieldProps, FormFieldProps } from "../FormField";
|
|
2
3
|
interface InputDateProps extends CommonFormFieldProps, Pick<FormFieldProps, "readonly" | "disabled" | "onEnter" | "onFocus" | "inputRef" | "validations" | "placeholder" | "onChange" | "onBlur"> {
|
|
3
4
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CommonFormFieldProps, FormFieldProps } from "../FormField";
|
|
2
3
|
declare type InputEmailProps = CommonFormFieldProps & Pick<FormFieldProps, "maxLength" | "readonly" | "validations" | "defaultValue">;
|
|
3
4
|
export declare const validationMessage = "Please enter a valid email";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CommonFormFieldProps, FormFieldProps } from "../FormField";
|
|
2
3
|
interface InputPasswordProps extends CommonFormFieldProps, Pick<FormFieldProps, "autocomplete" | "onEnter" | "onFocus" | "onBlur" | "inputRef" | "validations" | "defaultValue"> {
|
|
3
4
|
value?: string;
|
package/dist/List/List.d.ts
CHANGED
package/dist/Select/Select.d.ts
CHANGED
package/dist/Switch/Switch.d.ts
CHANGED
package/dist/Toast/Toast.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.6-pre.6+932bbb8b",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"dist/*"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@jobber/design": "^0.29.
|
|
22
|
-
"@jobber/formatters": "^0.2.
|
|
23
|
-
"@jobber/hooks": "^1.13.
|
|
21
|
+
"@jobber/design": "^0.29.4-pre.34+932bbb8b",
|
|
22
|
+
"@jobber/formatters": "^0.2.2-pre.34+932bbb8b",
|
|
23
|
+
"@jobber/hooks": "^1.13.1-pre.19+932bbb8b",
|
|
24
24
|
"@popperjs/core": "^2.0.6",
|
|
25
25
|
"@std-proposal/temporal": "0.0.1",
|
|
26
26
|
"@tanstack/react-table": "8.5.13",
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"@rollup/plugin-commonjs": "^23.0.0",
|
|
53
53
|
"@rollup/plugin-typescript": "^9.0.1",
|
|
54
54
|
"@testing-library/jest-dom": "^5.10.1",
|
|
55
|
-
"@testing-library/react": "^
|
|
55
|
+
"@testing-library/react": "^14.0.0",
|
|
56
56
|
"@testing-library/react-hooks": "^7.0.2",
|
|
57
57
|
"@testing-library/user-event": "^12.0.2",
|
|
58
58
|
"@types/classnames": "^2.2.7",
|
|
59
59
|
"@types/glob": "^7.1.1",
|
|
60
|
-
"@types/react": "^
|
|
61
|
-
"@types/react-dom": "^
|
|
60
|
+
"@types/react": "^18.0.28",
|
|
61
|
+
"@types/react-dom": "^18.0.11",
|
|
62
62
|
"@types/uuid": "^8.3.3",
|
|
63
63
|
"autoprefixer": "^9.5.1",
|
|
64
64
|
"copyfiles": "^2.4.1",
|
|
@@ -76,13 +76,13 @@
|
|
|
76
76
|
"uuid": "^8.3.2"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"react": "
|
|
80
|
-
"react-dom": "
|
|
79
|
+
"react": ">=16.8",
|
|
80
|
+
"react-dom": ">=16.8"
|
|
81
81
|
},
|
|
82
82
|
"browserslist": [
|
|
83
83
|
"last 1 version",
|
|
84
84
|
"> 1%",
|
|
85
85
|
"IE 10"
|
|
86
86
|
],
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "932bbb8b9dd1cdacc858efb1f7feed546a710d11"
|
|
88
88
|
}
|