@jobber/components 4.78.4 → 4.78.5-JOB-84042.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/dist/AnimatedPresence/index.js +5 -99
- package/dist/AnimatedPresence-20a02aaa.js +104 -0
- package/dist/Autocomplete/index.js +4 -4
- package/dist/Card/index.js +3 -3
- package/dist/{Card-426a68a8.js → Card-e3144022.js} +2 -2
- package/dist/Checkbox/index.js +1 -2
- package/dist/{Checkbox-99f6297f.js → Checkbox-787e2e47.js} +1 -2
- package/dist/Chip/index.js +3 -2
- package/dist/{Chip-c91fd6c8.js → Chip-3d1bfddc.js} +1 -1
- package/dist/Chips/index.js +5 -5
- package/dist/Combobox/Combobox.types.d.ts +12 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/ComboboxLoadMore.d.ts +6 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/index.d.ts +1 -0
- package/dist/Combobox/hooks/useMakeComboboxHandlers.d.ts +1 -1
- package/dist/Combobox/index.js +9 -6
- package/dist/{Combobox-1c91da1f.js → Combobox-df332d89.js} +57 -40
- package/dist/DataDump/index.js +3 -3
- package/dist/DataList/DataList.const.d.ts +1 -0
- package/dist/DataList/DataList.types.d.ts +0 -1
- package/dist/DataList/hooks/useMediaQuery.d.ts +7 -1
- package/dist/DataList/index.js +39 -39
- package/dist/DataTable/index.js +3 -4
- package/dist/FormField/index.js +1 -2
- package/dist/{FormField-b4e6c549.js → FormField-6ff183f8.js} +2 -3
- package/dist/FormatFile/index.js +2 -2
- package/dist/{FormatFile-652edda8.js → FormatFile-f10799f5.js} +1 -1
- package/dist/Gallery/index.js +2 -2
- package/dist/Glimmer/index.js +1 -1
- package/dist/{Glimmer-7c317864.js → Glimmer-84dee1ed.js} +1 -1
- package/dist/InputAvatar/index.js +1 -2
- package/dist/InputDate/index.js +1 -2
- package/dist/InputEmail/index.js +1 -2
- package/dist/InputFile/InputFile.d.ts +1 -1
- package/dist/InputFile/index.js +1 -2
- package/dist/{InputFile-c9eeb04b.js → InputFile-bb945071.js} +4 -2
- package/dist/InputNumber/index.js +2 -3
- package/dist/{InputNumber-ceae3872.js → InputNumber-d451b52e.js} +1 -1
- package/dist/InputPassword/index.js +1 -2
- package/dist/InputPhoneNumber/index.js +1 -2
- package/dist/InputText/index.js +3 -3
- package/dist/{InputText-6e356985.js → InputText-55b6cb65.js} +3 -2
- package/dist/InputTime/index.js +1 -2
- package/dist/Menu/Menu.d.ts +4 -4
- package/dist/Menu/index.js +2 -2
- package/dist/{Menu-81b12936.js → Menu-083fc4c4.js} +4 -4
- package/dist/MultiSelect/index.js +1 -2
- package/dist/{Option-8565da71.js → Option-3c4d377e.js} +1 -1
- package/dist/Page/index.js +2 -2
- package/dist/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/RadioGroup/index.js +1 -2
- package/dist/{RadioGroup-ca7a5978.js → RadioGroup-17b67ade.js} +2 -3
- package/dist/RecurringSelect/components/DayOfMonthSelect.d.ts +2 -2
- package/dist/RecurringSelect/components/WeeklySelect.d.ts +2 -2
- package/dist/RecurringSelect/index.js +6 -7
- package/dist/Select/index.js +2 -3
- package/dist/Tooltip/index.js +2 -1
- package/dist/{Tooltip-27771182.js → Tooltip-ef3d6ef4.js} +2 -1
- package/package.json +8 -12
- package/rollup.config.js +0 -1
|
@@ -2,105 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
var AnimatedPresence = require('../AnimatedPresence-20a02aaa.js');
|
|
6
|
+
require('react');
|
|
7
|
+
require('framer-motion');
|
|
8
|
+
require('@jobber/design');
|
|
8
9
|
|
|
9
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
10
|
|
|
11
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
const TIMING_BASE = toSeconds(design.tokens["timing-base"]);
|
|
15
|
-
const baseTransition = {
|
|
16
|
-
visible: { opacity: 1 },
|
|
17
|
-
hidden: { opacity: 0 },
|
|
18
|
-
};
|
|
19
|
-
const fade = {
|
|
20
|
-
visible: { opacity: 1 },
|
|
21
|
-
hidden: { opacity: 0 },
|
|
22
|
-
};
|
|
23
|
-
const popIn = {
|
|
24
|
-
visible: Object.assign({ scale: 1 }, baseTransition.visible),
|
|
25
|
-
hidden: Object.assign({ scale: 0.95 }, baseTransition.hidden),
|
|
26
|
-
};
|
|
27
|
-
const fromTop = {
|
|
28
|
-
visible: Object.assign({ y: 0 }, baseTransition.visible),
|
|
29
|
-
hidden: Object.assign({ y: -design.tokens["space-base"] }, baseTransition.hidden),
|
|
30
|
-
};
|
|
31
|
-
const fromBottom = {
|
|
32
|
-
visible: Object.assign({ y: 0 }, baseTransition.visible),
|
|
33
|
-
hidden: Object.assign({ y: design.tokens["space-base"] }, baseTransition.hidden),
|
|
34
|
-
};
|
|
35
|
-
const fromLeft = {
|
|
36
|
-
visible: Object.assign({ x: 0 }, baseTransition.visible),
|
|
37
|
-
hidden: Object.assign({ x: -design.tokens["space-base"] }, baseTransition.hidden),
|
|
38
|
-
};
|
|
39
|
-
const fromRight = {
|
|
40
|
-
visible: Object.assign({ x: 0 }, baseTransition.visible),
|
|
41
|
-
hidden: Object.assign({ x: design.tokens["space-base"] }, baseTransition.hidden),
|
|
42
|
-
};
|
|
43
|
-
const fromLeftToRight = {
|
|
44
|
-
initial: Object.assign({ x: -design.tokens["space-base"] }, baseTransition.hidden),
|
|
45
|
-
visible: Object.assign({ x: 0 }, baseTransition.visible),
|
|
46
|
-
hidden: Object.assign({ x: design.tokens["space-base"] }, baseTransition.hidden),
|
|
47
|
-
};
|
|
48
|
-
const fromRightToLeft = {
|
|
49
|
-
initial: Object.assign({ x: design.tokens["space-base"] }, baseTransition.hidden),
|
|
50
|
-
visible: Object.assign({ x: 0 }, baseTransition.visible),
|
|
51
|
-
hidden: Object.assign({ x: -design.tokens["space-base"] }, baseTransition.hidden),
|
|
52
|
-
};
|
|
53
|
-
function toSeconds(ms) {
|
|
54
|
-
return ms / 1000;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function usePreviousValue(value) {
|
|
58
|
-
const [previousValue, setPreviousValue] = React.useState(value);
|
|
59
|
-
React.useEffect(() => {
|
|
60
|
-
setPreviousValue(value);
|
|
61
|
-
}, [value]);
|
|
62
|
-
return [previousValue, setPreviousValue];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const transitions = {
|
|
66
|
-
fromBottom,
|
|
67
|
-
fromTop,
|
|
68
|
-
fromLeft,
|
|
69
|
-
fromRight,
|
|
70
|
-
popIn,
|
|
71
|
-
fromLeftToRight,
|
|
72
|
-
fromRightToLeft,
|
|
73
|
-
fade,
|
|
74
|
-
};
|
|
75
|
-
function AnimatedPresence(props) {
|
|
76
|
-
const shouldReduceMotion = framerMotion.useReducedMotion();
|
|
77
|
-
if (shouldReduceMotion) {
|
|
78
|
-
return React__default["default"].createElement(React__default["default"].Fragment, null, props.children);
|
|
79
|
-
}
|
|
80
|
-
return React__default["default"].createElement(InternalAnimatedPresence, Object.assign({}, props));
|
|
81
|
-
}
|
|
82
|
-
function InternalAnimatedPresence({ transition = "fromTop", initial = false, children, }) {
|
|
83
|
-
const transitionVariation = transitions[transition];
|
|
84
|
-
const hasInitialTransition = "initial" in transitionVariation;
|
|
85
|
-
const childCount = React.Children.count(children);
|
|
86
|
-
// Set the initial value to 0 so it staggers the animation on mount when
|
|
87
|
-
// initial is true.
|
|
88
|
-
const [lastChildIndex, setLastChildIndex] = usePreviousValue(0);
|
|
89
|
-
// Whenever the children count changes, update the last index.
|
|
90
|
-
React.useEffect(() => {
|
|
91
|
-
setLastChildIndex(childCount - 1);
|
|
92
|
-
}, [childCount]);
|
|
93
|
-
return (React__default["default"].createElement(framerMotion.AnimatePresence, { initial: initial, mode: "popLayout" }, React.Children.map(children, (child, i) => child && (React__default["default"].createElement(framerMotion.motion.div, { layout: true, variants: transitionVariation, initial: hasInitialTransition ? "initial" : "hidden", animate: "visible", exit: "hidden", transition: {
|
|
94
|
-
duration: TIMING_BASE,
|
|
95
|
-
delay: generateDelayTime(i),
|
|
96
|
-
} }, child)))));
|
|
97
|
-
function generateDelayTime(index) {
|
|
98
|
-
// Don't add a delay if it's already rendered.
|
|
99
|
-
if (lastChildIndex > index)
|
|
100
|
-
return 0;
|
|
101
|
-
// Stagger the animation starting after the previous last child index.
|
|
102
|
-
return (index - lastChildIndex) * TIMING_QUICK;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
exports.AnimatedPresence = AnimatedPresence;
|
|
12
|
+
exports.AnimatedPresence = AnimatedPresence.AnimatedPresence;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var framerMotion = require('framer-motion');
|
|
5
|
+
var design = require('@jobber/design');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
|
+
|
|
11
|
+
const TIMING_QUICK = toSeconds(design.tokens["timing-quick"]);
|
|
12
|
+
const TIMING_BASE = toSeconds(design.tokens["timing-base"]);
|
|
13
|
+
const baseTransition = {
|
|
14
|
+
visible: { opacity: 1 },
|
|
15
|
+
hidden: { opacity: 0 },
|
|
16
|
+
};
|
|
17
|
+
const fade = {
|
|
18
|
+
visible: { opacity: 1 },
|
|
19
|
+
hidden: { opacity: 0 },
|
|
20
|
+
};
|
|
21
|
+
const popIn = {
|
|
22
|
+
visible: Object.assign({ scale: 1 }, baseTransition.visible),
|
|
23
|
+
hidden: Object.assign({ scale: 0.95 }, baseTransition.hidden),
|
|
24
|
+
};
|
|
25
|
+
const fromTop = {
|
|
26
|
+
visible: Object.assign({ y: 0 }, baseTransition.visible),
|
|
27
|
+
hidden: Object.assign({ y: -design.tokens["space-base"] }, baseTransition.hidden),
|
|
28
|
+
};
|
|
29
|
+
const fromBottom = {
|
|
30
|
+
visible: Object.assign({ y: 0 }, baseTransition.visible),
|
|
31
|
+
hidden: Object.assign({ y: design.tokens["space-base"] }, baseTransition.hidden),
|
|
32
|
+
};
|
|
33
|
+
const fromLeft = {
|
|
34
|
+
visible: Object.assign({ x: 0 }, baseTransition.visible),
|
|
35
|
+
hidden: Object.assign({ x: -design.tokens["space-base"] }, baseTransition.hidden),
|
|
36
|
+
};
|
|
37
|
+
const fromRight = {
|
|
38
|
+
visible: Object.assign({ x: 0 }, baseTransition.visible),
|
|
39
|
+
hidden: Object.assign({ x: design.tokens["space-base"] }, baseTransition.hidden),
|
|
40
|
+
};
|
|
41
|
+
const fromLeftToRight = {
|
|
42
|
+
initial: Object.assign({ x: -design.tokens["space-base"] }, baseTransition.hidden),
|
|
43
|
+
visible: Object.assign({ x: 0 }, baseTransition.visible),
|
|
44
|
+
hidden: Object.assign({ x: design.tokens["space-base"] }, baseTransition.hidden),
|
|
45
|
+
};
|
|
46
|
+
const fromRightToLeft = {
|
|
47
|
+
initial: Object.assign({ x: design.tokens["space-base"] }, baseTransition.hidden),
|
|
48
|
+
visible: Object.assign({ x: 0 }, baseTransition.visible),
|
|
49
|
+
hidden: Object.assign({ x: -design.tokens["space-base"] }, baseTransition.hidden),
|
|
50
|
+
};
|
|
51
|
+
function toSeconds(ms) {
|
|
52
|
+
return ms / 1000;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function usePreviousValue(value) {
|
|
56
|
+
const [previousValue, setPreviousValue] = React.useState(value);
|
|
57
|
+
React.useEffect(() => {
|
|
58
|
+
setPreviousValue(value);
|
|
59
|
+
}, [value]);
|
|
60
|
+
return [previousValue, setPreviousValue];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const transitions = {
|
|
64
|
+
fromBottom,
|
|
65
|
+
fromTop,
|
|
66
|
+
fromLeft,
|
|
67
|
+
fromRight,
|
|
68
|
+
popIn,
|
|
69
|
+
fromLeftToRight,
|
|
70
|
+
fromRightToLeft,
|
|
71
|
+
fade,
|
|
72
|
+
};
|
|
73
|
+
function AnimatedPresence(props) {
|
|
74
|
+
const shouldReduceMotion = framerMotion.useReducedMotion();
|
|
75
|
+
if (shouldReduceMotion) {
|
|
76
|
+
return React__default["default"].createElement(React__default["default"].Fragment, null, props.children);
|
|
77
|
+
}
|
|
78
|
+
return React__default["default"].createElement(InternalAnimatedPresence, Object.assign({}, props));
|
|
79
|
+
}
|
|
80
|
+
function InternalAnimatedPresence({ transition = "fromTop", initial = false, children, }) {
|
|
81
|
+
const transitionVariation = transitions[transition];
|
|
82
|
+
const hasInitialTransition = "initial" in transitionVariation;
|
|
83
|
+
const childCount = React.Children.count(children);
|
|
84
|
+
// Set the initial value to 0 so it staggers the animation on mount when
|
|
85
|
+
// initial is true.
|
|
86
|
+
const [lastChildIndex, setLastChildIndex] = usePreviousValue(0);
|
|
87
|
+
// Whenever the children count changes, update the last index.
|
|
88
|
+
React.useEffect(() => {
|
|
89
|
+
setLastChildIndex(childCount - 1);
|
|
90
|
+
}, [childCount]);
|
|
91
|
+
return (React__default["default"].createElement(framerMotion.AnimatePresence, { initial: initial, mode: "popLayout" }, React.Children.map(children, (child, i) => child && (React__default["default"].createElement(framerMotion.motion.div, { layout: true, variants: transitionVariation, initial: hasInitialTransition ? "initial" : "hidden", animate: "visible", exit: "hidden", transition: {
|
|
92
|
+
duration: TIMING_BASE,
|
|
93
|
+
delay: generateDelayTime(i),
|
|
94
|
+
} }, child)))));
|
|
95
|
+
function generateDelayTime(index) {
|
|
96
|
+
// Don't add a delay if it's already rendered.
|
|
97
|
+
if (lastChildIndex > index)
|
|
98
|
+
return 0;
|
|
99
|
+
// Stagger the animation starting after the previous last child index.
|
|
100
|
+
return (index - lastChildIndex) * TIMING_QUICK;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
exports.AnimatedPresence = AnimatedPresence;
|
|
@@ -10,15 +10,15 @@ var classnames = require('classnames');
|
|
|
10
10
|
var ReactDOM = require('react-dom');
|
|
11
11
|
var reactPopper = require('react-popper');
|
|
12
12
|
var useOnKeyDown = require('@jobber/hooks/useOnKeyDown');
|
|
13
|
+
var useSafeLayoutEffect = require('@jobber/hooks/useSafeLayoutEffect');
|
|
13
14
|
var Text = require('../Text-259af966.js');
|
|
14
15
|
var Icon = require('../Icon-405a216c.js');
|
|
15
16
|
var Heading = require('../Heading-1e8e4bd3.js');
|
|
16
|
-
var InputText = require('../InputText-
|
|
17
|
+
var InputText = require('../InputText-55b6cb65.js');
|
|
17
18
|
require('../Typography-c45bf216.js');
|
|
18
19
|
require('@jobber/design');
|
|
19
20
|
require('../getAtlantisConfig-0f3e8af2.js');
|
|
20
|
-
require('../FormField-
|
|
21
|
-
require('uuid');
|
|
21
|
+
require('../FormField-6ff183f8.js');
|
|
22
22
|
require('react-hook-form');
|
|
23
23
|
require('@jobber/hooks/useShowClear');
|
|
24
24
|
require('../Button-b73a5e01.js');
|
|
@@ -127,7 +127,7 @@ function useRepositionMenu(attachTo, visible = false) {
|
|
|
127
127
|
{ name: "flip", options: { fallbackPlacements: ["top"] } },
|
|
128
128
|
],
|
|
129
129
|
});
|
|
130
|
-
|
|
130
|
+
useSafeLayoutEffect.useSafeLayoutEffect(() => {
|
|
131
131
|
var _a;
|
|
132
132
|
(_a = popper === null || popper === void 0 ? void 0 : popper.update) === null || _a === void 0 ? void 0 : _a.call(popper);
|
|
133
133
|
}, [visible]);
|
package/dist/Card/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Card = require('../Card-
|
|
5
|
+
var Card = require('../Card-e3144022.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('../style-inject.es-9d2f5f4e.js');
|
|
@@ -13,11 +13,11 @@ require('../Button-b73a5e01.js');
|
|
|
13
13
|
require('react-router-dom');
|
|
14
14
|
require('../Icon-405a216c.js');
|
|
15
15
|
require('@jobber/design');
|
|
16
|
-
require('../Menu-
|
|
17
|
-
require('uuid');
|
|
16
|
+
require('../Menu-083fc4c4.js');
|
|
18
17
|
require('framer-motion');
|
|
19
18
|
require('@jobber/hooks/useOnKeyDown');
|
|
20
19
|
require('@jobber/hooks/useRefocusOnActivator');
|
|
20
|
+
require('@jobber/hooks/useSafeLayoutEffect');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -5,14 +5,14 @@ var classnames = require('classnames');
|
|
|
5
5
|
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
6
6
|
var Heading = require('./Heading-1e8e4bd3.js');
|
|
7
7
|
var Button = require('./Button-b73a5e01.js');
|
|
8
|
-
var Menu = require('./Menu-
|
|
8
|
+
var Menu = require('./Menu-083fc4c4.js');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
13
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
14
14
|
|
|
15
|
-
var css_248z$1 = ":root {\n --card--accent-color: var(--color-grey);\n --card--base-padding: var(--space-base);\n --card--border: var(--border-base) solid var(--color-border);\n --card--header-background: var(--color-surface--background);\n}\n\n._2wxPdv7kELk- {\n display: block;\n width: 100%;\n border: calc(16px / 16) solid rgb(217, 223, 225);\n border: var(--card--border);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n outline-color: rgb(147, 161, 169);\n outline-color: var(--color-focus);\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n}\n\n._2wxPdv7kELk-:active {\n outline: 0;\n}\n\n:root .jobber-retheme ._2wxPdv7kELk-:not(.tRfpysqqk8s-) {\n --card--header-background: transparent;\n}\n\n/* Adjust `Content` components public padding to match the cards */\n\n._2wxPdv7kELk- > * {\n --public-content--padding: var(--card--base-padding);\n}\n\n/* Remove the nested `Content` components public padding */\n\n._2wxPdv7kELk- > * > * {\n --public-content--padding: 0;\n}\n\n._5LfUFF9DYsk- {\n border-top-width: 0;\n}\n\n.
|
|
15
|
+
var css_248z$1 = ":root {\n --card--accent-color: var(--color-grey);\n --card--base-padding: var(--space-base);\n --card--border: var(--border-base) solid var(--color-border);\n --card--header-background: var(--color-surface--background);\n}\n\n._2wxPdv7kELk- {\n display: block;\n width: 100%;\n border: calc(16px / 16) solid rgb(217, 223, 225);\n border: var(--card--border);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n outline-color: rgb(147, 161, 169);\n outline-color: var(--color-focus);\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n}\n\n._2wxPdv7kELk-:active {\n outline: 0;\n}\n\n:root .jobber-retheme ._2wxPdv7kELk-:not(.tRfpysqqk8s-) {\n --card--header-background: transparent;\n}\n\n/* Adjust `Content` components public padding to match the cards */\n\n._2wxPdv7kELk- > * {\n --public-content--padding: var(--card--base-padding);\n}\n\n/* Remove the nested `Content` components public padding */\n\n._2wxPdv7kELk- > * > * {\n --public-content--padding: 0;\n}\n\n._5LfUFF9DYsk- {\n border-top-width: 0;\n}\n\n._5LfUFF9DYsk-::before {\n content: \" \";\n display: block;\n margin: 0 calc(-1 * (16px / 16));\n margin: 0 calc(-1 * calc(16px / 16));\n margin: 0 calc(-1 * var(--border-base));\n border-top: 0.375rem solid rgb(181, 181, 181);\n border-top: 0.375rem solid var(--card--accent-color);\n border-radius: calc(16px / 8) calc(16px / 8) 0 0;\n border-radius: var(--radius-base) var(--radius-base) 0 0;\n}\n\n.tRfpysqqk8s- {\n --card--border: none;\n\n box-shadow: 0px calc(16px / 16) calc(16px / 4) 0px\n rgba(0, 0, 0, 0.1),\n 0px calc(16px / 4) 12px 0px rgba(0, 0, 0, 0.05);\n\n box-shadow: var(--shadow-base);\n color: inherit;\n text-decoration: inherit;\n cursor: pointer;\n transition: all 100ms linear;\n transition: all var(--timing-quick) linear;\n}\n\n.tRfpysqqk8s-:hover,\n.tRfpysqqk8s-:focus {\n background-color: rgb(244, 246, 250);\n background-color: var(--color-surface--hover);\n}\n\n.fAPeD1InvAI- {\n display: -ms-flexbox;\n display: flex;\n padding: calc(16px * 1);\n padding: var(--card--base-padding);\n background-color: rgb(238, 240, 242);\n background-color: var(--card--header-background);\n -ms-flex-pack: justify;\n justify-content: space-between;\n -ms-flex-align: start;\n align-items: flex-start;\n gap: calc(16px / 2);\n gap: var(--space-small);\n}\n\n.jobber-retheme .fAPeD1InvAI- {\n padding-bottom: 0;\n}\n\n.jobber-retheme .fAPeD1InvAI- h3 {\n font-family: \"Inter\", Helvetica, Arial, sans-serif;\n font-family: var(--typography--fontFamily-normal);\n font-size: calc((16px * 1) * 1.5);\n font-size: calc(calc(16px * 1) * 1.5);\n font-size: var(--typography--fontSize-largest);\n}\n";
|
|
16
16
|
var styles = {"card":"_2wxPdv7kELk-","clickable":"tRfpysqqk8s-","accent":"_5LfUFF9DYsk-","header":"fAPeD1InvAI-"};
|
|
17
17
|
styleInject_es.styleInject(css_248z$1);
|
|
18
18
|
|
package/dist/Checkbox/index.js
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Checkbox = require('../Checkbox-
|
|
5
|
+
var Checkbox = require('../Checkbox-787e2e47.js');
|
|
6
6
|
require('../tslib.es6-754e2961.js');
|
|
7
7
|
require('react');
|
|
8
|
-
require('uuid');
|
|
9
8
|
require('classnames');
|
|
10
9
|
require('react-hook-form');
|
|
11
10
|
require('../style-inject.es-9d2f5f4e.js');
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var tslib_es6 = require('./tslib.es6-754e2961.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var uuid = require('uuid');
|
|
6
5
|
var classnames = require('classnames');
|
|
7
6
|
var reactHookForm = require('react-hook-form');
|
|
8
7
|
var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
@@ -23,7 +22,7 @@ function Checkbox({ checked, defaultChecked, disabled, label, name, value, indet
|
|
|
23
22
|
? reactHookForm.useFormContext()
|
|
24
23
|
: // If there isn't a Form Context being provided, get a form for this field.
|
|
25
24
|
reactHookForm.useForm({ mode: "onTouched" });
|
|
26
|
-
const [identifier] = React.useState(
|
|
25
|
+
const [identifier] = React.useState(React.useId());
|
|
27
26
|
/**
|
|
28
27
|
* Generate a name if one is not supplied, this is the name
|
|
29
28
|
* that will be used for react-hook-form and not neccessarily
|
package/dist/Chip/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Chip = require('../Chip-
|
|
5
|
+
var Chip = require('../Chip-3d1bfddc.js');
|
|
6
6
|
var tslib_es6 = require('../tslib.es6-754e2961.js');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var Icon = require('../Icon-405a216c.js');
|
|
@@ -12,9 +12,10 @@ require('../style-inject.es-9d2f5f4e.js');
|
|
|
12
12
|
require('../Avatar-76a799fa.js');
|
|
13
13
|
require('color');
|
|
14
14
|
require('../Typography-c45bf216.js');
|
|
15
|
-
require('../Tooltip-
|
|
15
|
+
require('../Tooltip-ef3d6ef4.js');
|
|
16
16
|
require('react-dom');
|
|
17
17
|
require('framer-motion');
|
|
18
|
+
require('@jobber/hooks/useSafeLayoutEffect');
|
|
18
19
|
require('react-popper');
|
|
19
20
|
require('@jobber/design');
|
|
20
21
|
|
|
@@ -7,7 +7,7 @@ var styleInject_es = require('./style-inject.es-9d2f5f4e.js');
|
|
|
7
7
|
var Avatar = require('./Avatar-76a799fa.js');
|
|
8
8
|
var Icon = require('./Icon-405a216c.js');
|
|
9
9
|
var Typography = require('./Typography-c45bf216.js');
|
|
10
|
-
var Tooltip = require('./Tooltip-
|
|
10
|
+
var Tooltip = require('./Tooltip-ef3d6ef4.js');
|
|
11
11
|
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
13
|
|
package/dist/Chips/index.js
CHANGED
|
@@ -9,19 +9,19 @@ var useAssert = require('@jobber/hooks/useAssert');
|
|
|
9
9
|
var Icon = require('../Icon-405a216c.js');
|
|
10
10
|
var Avatar = require('../Avatar-76a799fa.js');
|
|
11
11
|
var Typography = require('../Typography-c45bf216.js');
|
|
12
|
-
var Tooltip = require('../Tooltip-
|
|
13
|
-
var uuid = require('uuid');
|
|
12
|
+
var Tooltip = require('../Tooltip-ef3d6ef4.js');
|
|
14
13
|
var sortBy = require('lodash/sortBy');
|
|
15
14
|
var useLiveAnnounce = require('@jobber/hooks/useLiveAnnounce');
|
|
16
15
|
var debounce = require('lodash/debounce');
|
|
16
|
+
require('@jobber/design');
|
|
17
17
|
var reactPopper = require('react-popper');
|
|
18
18
|
var Text = require('../Text-259af966.js');
|
|
19
19
|
var Button = require('../Button-b73a5e01.js');
|
|
20
20
|
var Spinner = require('../Spinner-9d8fc7ff.js');
|
|
21
|
-
require('@jobber/design');
|
|
22
21
|
require('color');
|
|
23
22
|
require('react-dom');
|
|
24
23
|
require('framer-motion');
|
|
24
|
+
require('@jobber/hooks/useSafeLayoutEffect');
|
|
25
25
|
require('react-router-dom');
|
|
26
26
|
|
|
27
27
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -129,7 +129,7 @@ function ChipDismissible({ label, disabled, invalid, prefix, onClick, onRequestR
|
|
|
129
129
|
return (React__default["default"].createElement(InternalChip, { label: label, disabled: disabled, invalid: invalid, prefix: prefix, onClick: onClick, suffix: React__default["default"].createElement(InternalChipButton, { icon: "remove", label: label, invalid: invalid, disabled: disabled, onClick: onRequestRemove }) }));
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
function InternalChipSingleSelect({ children, selected, name =
|
|
132
|
+
function InternalChipSingleSelect({ children, selected, name = React.useId(), onChange, onClick, }) {
|
|
133
133
|
return (React__default["default"].createElement("div", { className: styles$1.wrapper, "data-testid": "singleselect-chips" }, React__default["default"].Children.map(children, child => {
|
|
134
134
|
const isSelected = child.props.value === selected;
|
|
135
135
|
return (React__default["default"].createElement("label", null,
|
|
@@ -269,9 +269,9 @@ function useInternalChipDismissible({ children, selected, onChange, onClick, onC
|
|
|
269
269
|
availableChipOptions });
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
const menuId = uuid.v1();
|
|
273
272
|
// eslint-disable-next-line max-statements
|
|
274
273
|
function useInternalChipDismissibleInput({ options, isLoadingMore = false, onCustomOptionSelect, onOptionSelect, onSearch, }) {
|
|
274
|
+
const menuId = React.useId();
|
|
275
275
|
const [allOptions, setAllOptions] = React.useState([]);
|
|
276
276
|
const [searchValue, setSearchValue] = React.useState("");
|
|
277
277
|
const [menuOpen, setMenuOpen] = React.useState(false);
|
|
@@ -34,6 +34,10 @@ export interface ComboboxProps {
|
|
|
34
34
|
* The amount of time in ms to debounce the onSearch callback. Defaults to 300ms.
|
|
35
35
|
*/
|
|
36
36
|
readonly onSearchDebounce?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Callback to load more options, this is called when the user scrolls to the bottom of the list.
|
|
39
|
+
*/
|
|
40
|
+
readonly onLoadMore?: () => void;
|
|
37
41
|
/**
|
|
38
42
|
* The Chip heading for the trigger
|
|
39
43
|
*/
|
|
@@ -97,6 +101,10 @@ export interface ComboboxContentProps {
|
|
|
97
101
|
* Function called when search input changes.
|
|
98
102
|
*/
|
|
99
103
|
readonly handleSearchChange: (value: string) => void;
|
|
104
|
+
/**
|
|
105
|
+
* Callback to load more options, this is called when the user scrolls to the bottom of the list.
|
|
106
|
+
*/
|
|
107
|
+
readonly onLoadMore?: () => void;
|
|
100
108
|
/**
|
|
101
109
|
* Reference to the wrapping div element of all the Combobox pieces
|
|
102
110
|
*/
|
|
@@ -191,6 +199,10 @@ export interface ComboboxListProps {
|
|
|
191
199
|
* Should loading state be shown.
|
|
192
200
|
*/
|
|
193
201
|
readonly loading?: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Callback to load more options, this is called when the user scrolls to the bottom of the list.
|
|
204
|
+
*/
|
|
205
|
+
readonly onLoadMore?: () => void;
|
|
194
206
|
}
|
|
195
207
|
export interface ComboboxActionProps {
|
|
196
208
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComboboxLoadMore } from "./ComboboxLoadMore";
|
|
@@ -4,4 +4,4 @@ export interface UseMakeComboboxHandlersReturn {
|
|
|
4
4
|
handleClose: () => void;
|
|
5
5
|
handleSelection: (selection: ComboboxOption) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare function useMakeComboboxHandlers(setOpen: (open: boolean) => void, setSearchValue: (searchValue: string) => void, selectedOptions: ComboboxOption[], shouldScroll: React.MutableRefObject<boolean>, selectedStateSetter: (selected: ComboboxOption[]) => void, multiSelect?: boolean, onClose?: () => void): UseMakeComboboxHandlersReturn;
|
|
7
|
+
export declare function useMakeComboboxHandlers(setOpen: (open: boolean) => void, setSearchValue: (searchValue: string) => void, selectedOptions: ComboboxOption[], shouldScroll: React.MutableRefObject<boolean>, selectedStateSetter: (selected: ComboboxOption[]) => void, multiSelect?: boolean, onClose?: () => void, onSearch?: (searchValue: string) => void): UseMakeComboboxHandlersReturn;
|
package/dist/Combobox/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Combobox = require('../Combobox-
|
|
5
|
+
var Combobox = require('../Combobox-df332d89.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('react-dom');
|
|
@@ -11,21 +11,24 @@ require('../Icon-405a216c.js');
|
|
|
11
11
|
require('@jobber/design');
|
|
12
12
|
require('../Text-259af966.js');
|
|
13
13
|
require('../Typography-c45bf216.js');
|
|
14
|
-
require('../Glimmer-
|
|
14
|
+
require('../Glimmer-84dee1ed.js');
|
|
15
15
|
require('../tslib.es6-754e2961.js');
|
|
16
16
|
require('../Content-e3f7b6fc.js');
|
|
17
|
+
require('../Spinner-9d8fc7ff.js');
|
|
18
|
+
require('../AnimatedPresence-20a02aaa.js');
|
|
19
|
+
require('framer-motion');
|
|
20
|
+
require('@jobber/hooks/useInView');
|
|
17
21
|
require('../Button-b73a5e01.js');
|
|
18
22
|
require('react-router-dom');
|
|
19
23
|
require('@jobber/hooks/useRefocusOnActivator');
|
|
20
24
|
require('@jobber/hooks/useFocusTrap');
|
|
21
25
|
require('react-popper');
|
|
22
26
|
require('@jobber/hooks/useOnKeyDown');
|
|
23
|
-
require('../Chip-
|
|
24
|
-
require('@jobber/hooks/useInView');
|
|
27
|
+
require('../Chip-3d1bfddc.js');
|
|
25
28
|
require('../Avatar-76a799fa.js');
|
|
26
29
|
require('color');
|
|
27
|
-
require('../Tooltip-
|
|
28
|
-
require('
|
|
30
|
+
require('../Tooltip-ef3d6ef4.js');
|
|
31
|
+
require('@jobber/hooks/useSafeLayoutEffect');
|
|
29
32
|
require('lodash/debounce');
|
|
30
33
|
require('lodash/noop');
|
|
31
34
|
require('@jobber/hooks/useAssert');
|