@jobber/components 4.65.0 → 4.66.1-add-item-t.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/dist/DataList/DataList.types.d.ts +1 -1
- package/dist/DataList/index.js +10 -6
- package/dist/FormatFile/index.js +2 -2
- package/dist/{FormatFile-484dac89.js → FormatFile-3b650d02.js} +1 -1
- package/dist/Gallery/index.js +2 -2
- package/dist/InputAvatar/index.js +1 -1
- package/dist/ProgressBar/ProgressBar.d.ts +6 -1
- package/dist/ProgressBar/ProgressBarStepped.d.ts +10 -0
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-250e7b24.js → ProgressBar-b68edc8f.js} +20 -5
- package/package.json +3 -3
package/dist/DataList/index.js
CHANGED
|
@@ -477,8 +477,11 @@ function DataListActions({ children, itemsToExpose = 2, }) {
|
|
|
477
477
|
return null;
|
|
478
478
|
if (!props.icon)
|
|
479
479
|
return null;
|
|
480
|
-
|
|
481
|
-
|
|
480
|
+
const actionLabel = typeof props.label === "function"
|
|
481
|
+
? props.label(activeItem)
|
|
482
|
+
: props.label;
|
|
483
|
+
return (React__default["default"].createElement(Tooltip.Tooltip, { key: actionLabel, message: actionLabel },
|
|
484
|
+
React__default["default"].createElement(Button.Button, { icon: props.icon, ariaLabel: actionLabel, onClick: () => {
|
|
482
485
|
var _a, _b;
|
|
483
486
|
if (activeItem) {
|
|
484
487
|
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, activeItem);
|
|
@@ -1036,7 +1039,7 @@ function DataListLoadMore({ onBackToTop }) {
|
|
|
1036
1039
|
React__default["default"].createElement(Button.Button, { label: "Back to top", onClick: onBackToTop, size: "small", variation: "subtle" })))));
|
|
1037
1040
|
}
|
|
1038
1041
|
|
|
1039
|
-
var css_248z$1 = ".iyg43v-S9yU- {\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n min-height: 44px;\n padding: calc(16px / 2);\n padding: var(--space-small);\n border: none;\n border-radius: 0;\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 text-align: left;\n background: none;\n cursor: pointer;\n transition: background 200ms ease;\n transition: background var(--timing-base) ease;\n -webkit-appearance: none;\n appearance: none;\n -ms-flex-align: center;\n align-items: center;\n gap: calc(16px / 2);\n gap: var(--space-small);\n}\n\n.iyg43v-S9yU-:hover,\n.iyg43v-S9yU-:focus {\n background-color: rgb(244, 246, 250);\n background-color: var(--color-surface--hover);\n}\n\n.iyg43v-S9yU-:focus,\n.iyg43v-S9yU-:focus-visible {\n outline: none;\n}\n\n.iyg43v-S9yU-:focus-visible {\n box-shadow: 0px 0px 0px calc(16px / 8) rgba(255, 255, 255, 1),\n 0px 0px 0px calc(16px / 4) rgb(147, 161, 169);\n box-shadow: var(--shadow-focus);\n}\n\n.AUJNqz93ZDA- {\n font-weight: 500;\n}\n";
|
|
1042
|
+
var css_248z$1 = ".iyg43v-S9yU- {\n display: -ms-flexbox;\n display: flex;\n width: 100%;\n min-height: 44px;\n padding: calc(16px / 2);\n padding: var(--space-small);\n border: none;\n border-radius: 0;\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 text-align: left;\n background: none;\n cursor: pointer;\n transition: background 200ms ease;\n transition: background var(--timing-base) ease;\n -webkit-appearance: none;\n appearance: none;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: justify;\n justify-content: space-between;\n gap: calc(16px / 2);\n gap: var(--space-small);\n}\n\n.iyg43v-S9yU-:hover,\n.iyg43v-S9yU-:focus {\n background-color: rgb(244, 246, 250);\n background-color: var(--color-surface--hover);\n}\n\n.iyg43v-S9yU-:focus,\n.iyg43v-S9yU-:focus-visible {\n outline: none;\n}\n\n.iyg43v-S9yU-:focus-visible {\n box-shadow: 0px 0px 0px calc(16px / 8) rgba(255, 255, 255, 1),\n 0px 0px 0px calc(16px / 4) rgb(147, 161, 169);\n box-shadow: var(--shadow-focus);\n}\n\n.AUJNqz93ZDA- {\n font-weight: 500;\n}\n";
|
|
1040
1043
|
var styles$1 = {"action":"iyg43v-S9yU-","label":"AUJNqz93ZDA-"};
|
|
1041
1044
|
styleInject_es.styleInject(css_248z$1);
|
|
1042
1045
|
|
|
@@ -1046,11 +1049,12 @@ function DataListAction({ label, icon, destructive, visible = () => true, onClic
|
|
|
1046
1049
|
if (activeItem && !visible(activeItem)) {
|
|
1047
1050
|
return null;
|
|
1048
1051
|
}
|
|
1049
|
-
const color = destructive ? "critical" : "
|
|
1052
|
+
const color = destructive ? "critical" : "heading";
|
|
1053
|
+
const actionLabel = typeof label === "function" && activeItem ? label(activeItem) : label;
|
|
1050
1054
|
return (React__default["default"].createElement("button", { type: "button", className: styles$1.action, onClick: handleClick },
|
|
1051
|
-
icon && React__default["default"].createElement(Icon.Icon, { name: icon, color: color }),
|
|
1052
1055
|
React__default["default"].createElement(Typography.Typography, { textColor: color },
|
|
1053
|
-
React__default["default"].createElement("span", { className: styles$1.label },
|
|
1056
|
+
React__default["default"].createElement("span", { className: styles$1.label }, actionLabel)),
|
|
1057
|
+
icon && React__default["default"].createElement(Icon.Icon, { name: icon, color: color })));
|
|
1054
1058
|
function handleClick() {
|
|
1055
1059
|
if (activeItem) {
|
|
1056
1060
|
onClick === null || onClick === void 0 ? void 0 : onClick(activeItem);
|
package/dist/FormatFile/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var FormatFile = require('../FormatFile-
|
|
5
|
+
var FormatFile = require('../FormatFile-3b650d02.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('filesize');
|
|
@@ -28,7 +28,7 @@ require('../Text-4a2bc89f.js');
|
|
|
28
28
|
require('../Emphasis-b2d1b3aa.js');
|
|
29
29
|
require('../Glimmer-cfa92a88.js');
|
|
30
30
|
require('../tslib.es6-5b8768b7.js');
|
|
31
|
-
require('../ProgressBar-
|
|
31
|
+
require('../ProgressBar-b68edc8f.js');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
@@ -10,7 +10,7 @@ var Glimmer = require('./Glimmer-cfa92a88.js');
|
|
|
10
10
|
var Icon = require('./Icon-405a216c.js');
|
|
11
11
|
var Typography = require('./Typography-973b122e.js');
|
|
12
12
|
var Text = require('./Text-4a2bc89f.js');
|
|
13
|
-
var ProgressBar = require('./ProgressBar-
|
|
13
|
+
var ProgressBar = require('./ProgressBar-b68edc8f.js');
|
|
14
14
|
|
|
15
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
16
|
|
package/dist/Gallery/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var classnames = require('classnames');
|
|
7
7
|
var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
8
8
|
var LightBox = require('../LightBox-3f4dbc33.js');
|
|
9
|
-
var FormatFile = require('../FormatFile-
|
|
9
|
+
var FormatFile = require('../FormatFile-3b650d02.js');
|
|
10
10
|
var Button = require('../Button-163a0641.js');
|
|
11
11
|
require('framer-motion');
|
|
12
12
|
require('react-dom');
|
|
@@ -29,7 +29,7 @@ require('../Glimmer-cfa92a88.js');
|
|
|
29
29
|
require('../tslib.es6-5b8768b7.js');
|
|
30
30
|
require('../Icon-405a216c.js');
|
|
31
31
|
require('@jobber/design');
|
|
32
|
-
require('../ProgressBar-
|
|
32
|
+
require('../ProgressBar-b68edc8f.js');
|
|
33
33
|
require('react-router-dom');
|
|
34
34
|
|
|
35
35
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -7,7 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
|
|
8
8
|
var Avatar = require('../Avatar-76a799fa.js');
|
|
9
9
|
var InputFile = require('../InputFile-540c1657.js');
|
|
10
|
-
var ProgressBar = require('../ProgressBar-
|
|
10
|
+
var ProgressBar = require('../ProgressBar-b68edc8f.js');
|
|
11
11
|
var Button = require('../Button-163a0641.js');
|
|
12
12
|
require('classnames');
|
|
13
13
|
require('color');
|
|
@@ -14,6 +14,11 @@ interface ProgressBarProps {
|
|
|
14
14
|
* @default base
|
|
15
15
|
*/
|
|
16
16
|
readonly size?: keyof typeof sizes;
|
|
17
|
+
/**
|
|
18
|
+
* Set the variation of the progress bar
|
|
19
|
+
* @default progress
|
|
20
|
+
*/
|
|
21
|
+
readonly variation?: "progress" | "stepped";
|
|
17
22
|
}
|
|
18
|
-
export declare function ProgressBar({ currentStep, totalSteps, size, }: ProgressBarProps): JSX.Element;
|
|
23
|
+
export declare function ProgressBar({ currentStep, totalSteps, size, variation, }: ProgressBarProps): JSX.Element;
|
|
19
24
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import sizes from "./Sizes.css";
|
|
3
|
+
interface ProgressBarSteppedProps {
|
|
4
|
+
readonly currentStep: number;
|
|
5
|
+
readonly totalSteps: number;
|
|
6
|
+
readonly percentage: number;
|
|
7
|
+
readonly size?: keyof typeof sizes;
|
|
8
|
+
}
|
|
9
|
+
export declare function ProgressBarStepped({ currentStep, totalSteps, percentage, size, }: ProgressBarSteppedProps): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ProgressBar = require('../ProgressBar-
|
|
5
|
+
var ProgressBar = require('../ProgressBar-b68edc8f.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('../style-inject.es-9d2f5f4e.js');
|
|
@@ -9,17 +9,32 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
10
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
11
11
|
|
|
12
|
-
var css_248z$1 = ":root {\n --progress-bar--height: var(--space-base);\n}\n\nprogress.S1cioqW7loo-[value] {\n width: 100%;\n height: calc(16px * 1);\n height: var(--progress-bar--height);\n border: none;\n vertical-align: baseline;\n -webkit-appearance: none;\n appearance: none;\n}\n\nprogress.S1cioqW7loo-[value],\nprogress.S1cioqW7loo-[value]::-webkit-progress-bar {\n box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.05);\n border-radius: calc((16px * 1) / 2);\n border-radius: calc(calc(16px * 1) / 2);\n border-radius: calc(var(--progress-bar--height) / 2);\n}\n\nprogress.S1cioqW7loo-[value]::-webkit-progress-bar {\n background-color: rgb(238, 240, 242);\n background-color: var(--color-surface--background);\n}\n\nprogress.S1cioqW7loo-[value]::-webkit-progress-value {\n border-radius: calc((16px * 1) / 2);\n border-radius: calc(calc(16px * 1) / 2);\n border-radius: calc(var(--progress-bar--height) / 2);\n background-color: rgb(125, 176, 14);\n background-color: var(--color-interactive);\n -webkit-transition: all 300ms ease-out;\n transition: all 300ms ease-out;\n -webkit-transition: all var(--timing-slow) ease-out;\n transition: all var(--timing-slow) ease-out;\n}\n\nprogress.S1cioqW7loo-[value]::-moz-progress-bar {\n border-radius: calc((16px * 1) / 2);\n border-radius: calc(calc(16px * 1) / 2);\n border-radius: calc(var(--progress-bar--height) / 2);\n background-color: rgb(125, 176, 14);\n background-color: var(--color-interactive);\n -moz-transition: all 300ms ease-out;\n transition: all 300ms ease-out;\n -moz-transition: all var(--timing-slow) ease-out;\n transition: all var(--timing-slow) ease-out;\n}\n";
|
|
13
|
-
var styles = {"ProgressBar":"S1cioqW7loo-"};
|
|
12
|
+
var css_248z$1 = ":root {\n --progress-bar--height: var(--space-base);\n}\n\nprogress.S1cioqW7loo-[value] {\n width: 100%;\n height: calc(16px * 1);\n height: var(--progress-bar--height);\n border: none;\n vertical-align: baseline;\n -webkit-appearance: none;\n appearance: none;\n}\n\nprogress.S1cioqW7loo-[value],\nprogress.S1cioqW7loo-[value]::-webkit-progress-bar {\n box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.05);\n border-radius: calc((16px * 1) / 2);\n border-radius: calc(calc(16px * 1) / 2);\n border-radius: calc(var(--progress-bar--height) / 2);\n}\n\nprogress.S1cioqW7loo-[value]::-webkit-progress-bar {\n background-color: rgb(238, 240, 242);\n background-color: var(--color-surface--background);\n}\n\nprogress.S1cioqW7loo-[value]::-webkit-progress-value {\n border-radius: calc((16px * 1) / 2);\n border-radius: calc(calc(16px * 1) / 2);\n border-radius: calc(var(--progress-bar--height) / 2);\n background-color: rgb(125, 176, 14);\n background-color: var(--color-interactive);\n -webkit-transition: all 300ms ease-out;\n transition: all 300ms ease-out;\n -webkit-transition: all var(--timing-slow) ease-out;\n transition: all var(--timing-slow) ease-out;\n}\n\nprogress.S1cioqW7loo-[value]::-moz-progress-bar {\n border-radius: calc((16px * 1) / 2);\n border-radius: calc(calc(16px * 1) / 2);\n border-radius: calc(var(--progress-bar--height) / 2);\n background-color: rgb(125, 176, 14);\n background-color: var(--color-interactive);\n -moz-transition: all 300ms ease-out;\n transition: all 300ms ease-out;\n -moz-transition: all var(--timing-slow) ease-out;\n transition: all var(--timing-slow) ease-out;\n}\n\nprogress.nv5fejwjHzo-[value]::-webkit-progress-value {\n -webkit-transition: all 100ms ease-out;\n transition: all 100ms ease-out;\n -webkit-transition: all var(--timing-quick) ease-out;\n transition: all var(--timing-quick) ease-out;\n}\n\n.dyBDsjWCui4- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n width: 100%;\n gap: calc(16px / 2);\n gap: var(--space-small);\n}\n";
|
|
13
|
+
var styles = {"ProgressBar":"S1cioqW7loo-","SteppedProgressBar":"nv5fejwjHzo-","wrapper":"dyBDsjWCui4-"};
|
|
14
14
|
styleInject_es.styleInject(css_248z$1);
|
|
15
15
|
|
|
16
|
-
var css_248z = ".
|
|
17
|
-
var sizes = {"small":"JNSDqHqKVlE-","base":"nzFMJ2k4zJ0-"};
|
|
16
|
+
var css_248z = ".CzIxUWYkrdo- {\n --progress-bar--height: var(--space-smaller);\n}\n\n.JNSDqHqKVlE- {\n --progress-bar--height: var(--space-small);\n}\n\n.nzFMJ2k4zJ0- {\n --progress-bar--height: var(--space-base);\n}\n";
|
|
17
|
+
var sizes = {"smaller":"CzIxUWYkrdo-","small":"JNSDqHqKVlE-","base":"nzFMJ2k4zJ0-"};
|
|
18
18
|
styleInject_es.styleInject(css_248z);
|
|
19
19
|
|
|
20
|
-
function
|
|
20
|
+
function ProgressBarStepped({ currentStep, totalSteps, percentage, size = "base", }) {
|
|
21
|
+
const steppedProgressBarClassName = classnames__default["default"](styles.ProgressBar, styles.SteppedProgressBar, sizes[size]);
|
|
22
|
+
const ariaLabel = `progress, ${currentStep} out of ${totalSteps}`;
|
|
23
|
+
return (React__default["default"].createElement("div", { role: "progressbar", className: styles.wrapper, "aria-valuenow": percentage, "aria-valuetext": ariaLabel }, Array.from({ length: totalSteps }).map((_, index) => {
|
|
24
|
+
const step = index + 1;
|
|
25
|
+
const value = step <= currentStep ? 100 : 0;
|
|
26
|
+
return (React__default["default"].createElement("progress", { key: step, className: steppedProgressBarClassName, value: value, "data-testid": "progress-step" },
|
|
27
|
+
value,
|
|
28
|
+
"%"));
|
|
29
|
+
})));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function ProgressBar({ currentStep, totalSteps, size = "base", variation = "progress", }) {
|
|
21
33
|
const percentage = (currentStep / totalSteps) * 100;
|
|
22
34
|
const progressBarClassName = classnames__default["default"](styles.ProgressBar, sizes[size]);
|
|
35
|
+
if (variation === "stepped") {
|
|
36
|
+
return (React__default["default"].createElement(ProgressBarStepped, { currentStep: currentStep, totalSteps: totalSteps, percentage: percentage, size: size }));
|
|
37
|
+
}
|
|
23
38
|
return (React__default["default"].createElement("progress", { className: progressBarClassName, max: totalSteps, value: currentStep },
|
|
24
39
|
percentage,
|
|
25
40
|
"%"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.66.1-add-item-t.2+9a264976",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@jobber/design": "^0.50.0",
|
|
23
|
-
"@jobber/formatters": "
|
|
23
|
+
"@jobber/formatters": "^0.2.2",
|
|
24
24
|
"@jobber/hooks": "^2.7.2",
|
|
25
25
|
"@popperjs/core": "^2.0.6",
|
|
26
26
|
"@std-proposal/temporal": "0.0.1",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"> 1%",
|
|
84
84
|
"IE 10"
|
|
85
85
|
],
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "9a264976ee097184a5026a92d995a55bed60cc3b"
|
|
87
87
|
}
|