@jobber/components 6.20.0 → 6.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LightBox-cjs.js +1 -1
- package/dist/LightBox-es.js +1 -1
- package/dist/Menu-cjs.js +6 -7
- package/dist/Menu-es.js +6 -7
- package/dist/styles.css +0 -4
- package/package.json +2 -2
package/dist/LightBox-cjs.js
CHANGED
|
@@ -51,7 +51,7 @@ var useMediaQuery = {};
|
|
|
51
51
|
exports.BREAKPOINT_SIZES = { sm: 490, md: 768, lg: 1080, xl: 1440 };
|
|
52
52
|
/**
|
|
53
53
|
* Hook equivalent of CSS media queries with our
|
|
54
|
-
* [supported breakpoints](https://atlantis.getjobber.com
|
|
54
|
+
* [supported breakpoints](https://atlantis.getjobber.com/design/breakpoints).
|
|
55
55
|
*/
|
|
56
56
|
function useBreakpoints() {
|
|
57
57
|
const { sm, md, lg, xl } = exports.BREAKPOINT_SIZES;
|
package/dist/LightBox-es.js
CHANGED
|
@@ -49,7 +49,7 @@ var useMediaQuery = {};
|
|
|
49
49
|
exports.BREAKPOINT_SIZES = { sm: 490, md: 768, lg: 1080, xl: 1440 };
|
|
50
50
|
/**
|
|
51
51
|
* Hook equivalent of CSS media queries with our
|
|
52
|
-
* [supported breakpoints](https://atlantis.getjobber.com
|
|
52
|
+
* [supported breakpoints](https://atlantis.getjobber.com/design/breakpoints).
|
|
53
53
|
*/
|
|
54
54
|
function useBreakpoints() {
|
|
55
55
|
const { sm, md, lg, xl } = exports.BREAKPOINT_SIZES;
|
package/dist/Menu-cjs.js
CHANGED
|
@@ -44,7 +44,7 @@ function useWindowDimensions() {
|
|
|
44
44
|
return windowDimensions;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
var styles = {"wrapper":"fpi0W91w2ag-","popperContainer":"pyIy8jHif3g-","
|
|
47
|
+
var styles = {"wrapper":"fpi0W91w2ag-","popperContainer":"pyIy8jHif3g-","menu":"-DayvgvIcVo-","section":"X0W9r8kjA6Q-","sectionHeader":"Bq7pLWj3jm4-","action":"M1BgN-oCmKw-","destructive":"U9ihZZavz9w-","overlay":"_7we5hh6kYs8-","fullWidth":"_5OJ7B6mFcwk-","screenReaderOnly":"Bzvkz60bwWE-","spinning":"_0-VzuzHdi8o-"};
|
|
48
48
|
|
|
49
49
|
const SMALL_SCREEN_BREAKPOINT = 490;
|
|
50
50
|
const MENU_OFFSET = 6;
|
|
@@ -62,9 +62,9 @@ const variation = {
|
|
|
62
62
|
};
|
|
63
63
|
// eslint-disable-next-line max-statements
|
|
64
64
|
function Menu({ activator, items }) {
|
|
65
|
-
var _a
|
|
65
|
+
var _a;
|
|
66
66
|
const [visible, setVisible] = React.useState(false);
|
|
67
|
-
const
|
|
67
|
+
const popperRef = React.useRef(null);
|
|
68
68
|
const { width } = useWindowDimensions_2();
|
|
69
69
|
const buttonID = React.useId();
|
|
70
70
|
const menuID = React.useId();
|
|
@@ -77,7 +77,7 @@ function Menu({ activator, items }) {
|
|
|
77
77
|
useRefocusOnActivator.useRefocusOnActivator_2(visible);
|
|
78
78
|
const menuRef = useFocusTrap.useFocusTrap_2(visible);
|
|
79
79
|
const [popperElement, setPopperElement] = React.useState(null);
|
|
80
|
-
const { styles: popperStyles, attributes, state, } = reactPopper.usePopper(
|
|
80
|
+
const { styles: popperStyles, attributes, state, } = reactPopper.usePopper(popperRef.current, popperElement, {
|
|
81
81
|
placement: "bottom-start",
|
|
82
82
|
strategy: "fixed",
|
|
83
83
|
modifiers: [
|
|
@@ -101,14 +101,13 @@ function Menu({ activator, items }) {
|
|
|
101
101
|
activator = (React.createElement(Button.Button, { fullWidth: true, label: "More Actions", icon: "more", type: "secondary" }));
|
|
102
102
|
}
|
|
103
103
|
return (React.createElement("div", { className: wrapperClasses, onClick: handleParentClick },
|
|
104
|
-
React.createElement("
|
|
105
|
-
React.cloneElement(activator, {
|
|
104
|
+
React.createElement("div", { ref: popperRef }, React.cloneElement(activator, {
|
|
106
105
|
onClick: toggle(activator.props.onClick),
|
|
107
106
|
id: buttonID,
|
|
108
107
|
ariaControls: menuID,
|
|
109
108
|
ariaExpanded: visible,
|
|
110
109
|
ariaHaspopup: true,
|
|
111
|
-
}),
|
|
110
|
+
})),
|
|
112
111
|
React.createElement(MenuPortal, null,
|
|
113
112
|
React.createElement(framerMotion.AnimatePresence, null, visible && (React.createElement(React.Fragment, null,
|
|
114
113
|
React.createElement(framerMotion.motion.div, { className: styles.overlay, onClick: toggle(), variants: variation, initial: "overlayStartStop", animate: "done", exit: "overlayStartStop", transition: {
|
package/dist/Menu-es.js
CHANGED
|
@@ -42,7 +42,7 @@ function useWindowDimensions() {
|
|
|
42
42
|
return windowDimensions;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
var styles = {"wrapper":"fpi0W91w2ag-","popperContainer":"pyIy8jHif3g-","
|
|
45
|
+
var styles = {"wrapper":"fpi0W91w2ag-","popperContainer":"pyIy8jHif3g-","menu":"-DayvgvIcVo-","section":"X0W9r8kjA6Q-","sectionHeader":"Bq7pLWj3jm4-","action":"M1BgN-oCmKw-","destructive":"U9ihZZavz9w-","overlay":"_7we5hh6kYs8-","fullWidth":"_5OJ7B6mFcwk-","screenReaderOnly":"Bzvkz60bwWE-","spinning":"_0-VzuzHdi8o-"};
|
|
46
46
|
|
|
47
47
|
const SMALL_SCREEN_BREAKPOINT = 490;
|
|
48
48
|
const MENU_OFFSET = 6;
|
|
@@ -60,9 +60,9 @@ const variation = {
|
|
|
60
60
|
};
|
|
61
61
|
// eslint-disable-next-line max-statements
|
|
62
62
|
function Menu({ activator, items }) {
|
|
63
|
-
var _a
|
|
63
|
+
var _a;
|
|
64
64
|
const [visible, setVisible] = useState(false);
|
|
65
|
-
const
|
|
65
|
+
const popperRef = useRef(null);
|
|
66
66
|
const { width } = useWindowDimensions_2();
|
|
67
67
|
const buttonID = useId();
|
|
68
68
|
const menuID = useId();
|
|
@@ -75,7 +75,7 @@ function Menu({ activator, items }) {
|
|
|
75
75
|
useRefocusOnActivator_2(visible);
|
|
76
76
|
const menuRef = useFocusTrap_2(visible);
|
|
77
77
|
const [popperElement, setPopperElement] = useState(null);
|
|
78
|
-
const { styles: popperStyles, attributes, state, } = usePopper(
|
|
78
|
+
const { styles: popperStyles, attributes, state, } = usePopper(popperRef.current, popperElement, {
|
|
79
79
|
placement: "bottom-start",
|
|
80
80
|
strategy: "fixed",
|
|
81
81
|
modifiers: [
|
|
@@ -99,14 +99,13 @@ function Menu({ activator, items }) {
|
|
|
99
99
|
activator = (React.createElement(Button, { fullWidth: true, label: "More Actions", icon: "more", type: "secondary" }));
|
|
100
100
|
}
|
|
101
101
|
return (React.createElement("div", { className: wrapperClasses, onClick: handleParentClick },
|
|
102
|
-
React.createElement("
|
|
103
|
-
React.cloneElement(activator, {
|
|
102
|
+
React.createElement("div", { ref: popperRef }, React.cloneElement(activator, {
|
|
104
103
|
onClick: toggle(activator.props.onClick),
|
|
105
104
|
id: buttonID,
|
|
106
105
|
ariaControls: menuID,
|
|
107
106
|
ariaExpanded: visible,
|
|
108
107
|
ariaHaspopup: true,
|
|
109
|
-
}),
|
|
108
|
+
})),
|
|
110
109
|
React.createElement(MenuPortal, null,
|
|
111
110
|
React.createElement(AnimatePresence, null, visible && (React.createElement(React.Fragment, null,
|
|
112
111
|
React.createElement(motion.div, { className: styles.overlay, onClick: toggle(), variants: variation, initial: "overlayStartStop", animate: "done", exit: "overlayStartStop", transition: {
|
package/dist/styles.css
CHANGED
|
@@ -2488,10 +2488,6 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
|
|
|
2488
2488
|
z-index: var(--elevation-modal);
|
|
2489
2489
|
}
|
|
2490
2490
|
|
|
2491
|
-
._0KV3fxLr9xk- {
|
|
2492
|
-
display: none;
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
2491
|
.-DayvgvIcVo- {
|
|
2496
2492
|
--menu-space: var(--space-small);
|
|
2497
2493
|
--menu-offset: var(--space-smallest);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.20.
|
|
3
|
+
"version": "6.20.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -489,5 +489,5 @@
|
|
|
489
489
|
"> 1%",
|
|
490
490
|
"IE 10"
|
|
491
491
|
],
|
|
492
|
-
"gitHead": "
|
|
492
|
+
"gitHead": "14e879707da1d39e7cb4d7c8d60d73235529ea01"
|
|
493
493
|
}
|