@activecollab/components 2.0.454 → 2.0.456
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/cjs/components/Button/Styles.js +32 -7
- package/dist/cjs/components/Button/Styles.js.map +1 -1
- package/dist/cjs/components/CounterButton/Styles.js +3 -3
- package/dist/cjs/components/CounterButton/Styles.js.map +1 -1
- package/dist/cjs/components/Filter/Filter.js +0 -1
- package/dist/cjs/components/Filter/Filter.js.map +1 -1
- package/dist/cjs/components/Menu/Menu.js +127 -29
- package/dist/cjs/components/Menu/Menu.js.map +1 -1
- package/dist/cjs/components/Menu/Styles.js +0 -2
- package/dist/cjs/components/Menu/Styles.js.map +1 -1
- package/dist/esm/components/Button/Styles.d.ts.map +1 -1
- package/dist/esm/components/Button/Styles.js +24 -1
- package/dist/esm/components/Button/Styles.js.map +1 -1
- package/dist/esm/components/CounterButton/Styles.d.ts.map +1 -1
- package/dist/esm/components/CounterButton/Styles.js +3 -3
- package/dist/esm/components/CounterButton/Styles.js.map +1 -1
- package/dist/esm/components/Filter/Filter.d.ts.map +1 -1
- package/dist/esm/components/Filter/Filter.js +0 -1
- package/dist/esm/components/Filter/Filter.js.map +1 -1
- package/dist/esm/components/Menu/Menu.d.ts.map +1 -1
- package/dist/esm/components/Menu/Menu.js +111 -30
- package/dist/esm/components/Menu/Menu.js.map +1 -1
- package/dist/esm/components/Menu/Styles.js +0 -2
- package/dist/esm/components/Menu/Styles.js.map +1 -1
- package/dist/index.js +162 -42
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -168,25 +168,48 @@
|
|
|
168
168
|
|
|
169
169
|
var FontStyle = styled.css(["font-family:-apple-system,BlinkMacSystemFont,\"Inter\",\"Roboto\",\"Helvetica Neue\",Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;"]);
|
|
170
170
|
|
|
171
|
+
// The hover look of each variant. A trigger keeps it while the menu it opened is open.
|
|
172
|
+
var hoverStyle$1 = function hoverStyle(variant) {
|
|
173
|
+
switch (variant) {
|
|
174
|
+
case "primary":
|
|
175
|
+
case "contained":
|
|
176
|
+
return styled.css(["box-shadow:0 3px 6px -2px var(--color-primary-500);background-color:var(--color-primary-800);"]);
|
|
177
|
+
case "secondary":
|
|
178
|
+
case "outlined":
|
|
179
|
+
return styled.css(["border-color:var(--color-primary);color:var(--color-primary);"]);
|
|
180
|
+
case "dark transparent":
|
|
181
|
+
return styled.css(["background-color:rgba(0,0,0,0.85);"]);
|
|
182
|
+
case "tertiary":
|
|
183
|
+
case "text colored":
|
|
184
|
+
return styled.css(["background-color:var(--color-primary-200);"]);
|
|
185
|
+
case "option":
|
|
186
|
+
case "text gray":
|
|
187
|
+
return styled.css(["background-color:var(--color-theme-300);color:var(--color-theme-900);"]);
|
|
188
|
+
case "circle raised":
|
|
189
|
+
return styled.css(["background-color:var(--page-paper-main);box-shadow:var(--shadow-tertiary);"]);
|
|
190
|
+
default:
|
|
191
|
+
return undefined;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
171
194
|
var StyledButton$2 = styled__default["default"].button.withConfig({
|
|
172
195
|
displayName: "Styles__StyledButton",
|
|
173
196
|
componentId: "sc-vi1kcr-0"
|
|
174
|
-
})(["", " ", " -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:middle;font-weight:500;display:inline-block;line-height:1;margin:0;text-decoration:none;font-size:0.875rem;user-select:none;cursor:pointer;text-align:center;flex-shrink:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:288px;--c-btn-text-inset:8px;--c-btn-icon-inset:8px;--c-btn-icon-tight-inset:6px;--c-btn-inset:0px;border:none;height:32px;transition:background-color 0.3s ease,box-shadow 0.3s ease,color 0.3s ease,border-color 0.3s ease;svg{fill:currentColor;}&:focus{outline:none;}&:hover{text-decoration:none;}&:disabled{cursor:default;opacity:50%;pointer-events:none;}", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", ""], FontStyle, BoxSizingStyle, function (props) {
|
|
197
|
+
})(["", " ", " -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:middle;font-weight:500;display:inline-block;line-height:1;margin:0;text-decoration:none;font-size:0.875rem;user-select:none;cursor:pointer;text-align:center;flex-shrink:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:288px;--c-btn-text-inset:8px;--c-btn-icon-inset:8px;--c-btn-icon-tight-inset:6px;--c-btn-inset:0px;border:none;height:32px;transition:background-color 0.3s ease,box-shadow 0.3s ease,color 0.3s ease,border-color 0.3s ease;svg{fill:currentColor;}&:focus{outline:none;}&:hover{text-decoration:none;}&:disabled{cursor:default;opacity:50%;pointer-events:none;}", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " &[aria-haspopup][aria-expanded=\"true\"]{", "}"], FontStyle, BoxSizingStyle, function (props) {
|
|
175
198
|
return props.size === "small" && styled.css(["height:24px;"]);
|
|
176
199
|
}, function (props) {
|
|
177
200
|
return props.size === "big" && styled.css(["height:40px;"]);
|
|
178
201
|
}, function (props) {
|
|
179
|
-
return (props.variant === "primary" || props.variant === "contained") && styled.css(["padding:0 16px;background-color:var(--color-primary);border-radius:var(--ac-br-rounded);color:var(--page-paper-main);&:hover,&:focus-visible{
|
|
202
|
+
return (props.variant === "primary" || props.variant === "contained") && styled.css(["padding:0 16px;background-color:var(--color-primary);border-radius:var(--ac-br-rounded);color:var(--page-paper-main);&:hover,&:focus-visible{", "}&:active{box-shadow:0 4px 10px -2px var(--color-primary-600);background-color:var(--color-primary-800);}"], hoverStyle$1(props.variant));
|
|
180
203
|
}, function (props) {
|
|
181
|
-
return (props.variant === "secondary" || props.variant === "outlined") && styled.css(["padding:0 16px;background-color:transparent;border-radius:var(--ac-br-rounded);border:solid 1px var(--color-theme-700);color:var(--color-theme-700);&:hover,&:focus-visible{
|
|
204
|
+
return (props.variant === "secondary" || props.variant === "outlined") && styled.css(["padding:0 16px;background-color:transparent;border-radius:var(--ac-br-rounded);border:solid 1px var(--color-theme-700);color:var(--color-theme-700);&:hover,&:focus-visible{", "}&:active{border-color:var(--color-primary);color:var(--color-primary);background-color:var(--color-primary-200);}"], hoverStyle$1(props.variant));
|
|
182
205
|
}, function (props) {
|
|
183
|
-
return props.variant === "dark transparent" && styled.css(["padding:0 8px;background-color:rgba(0,0,0,0.5);border-radius:var(--ac-br-6);color:var(--only-white);&:hover,&:focus-visible{
|
|
206
|
+
return props.variant === "dark transparent" && styled.css(["padding:0 8px;background-color:rgba(0,0,0,0.5);border-radius:var(--ac-br-6);color:var(--only-white);&:hover,&:focus-visible{", "}&:active{background-color:var(--only-black);}"], hoverStyle$1(props.variant));
|
|
184
207
|
}, function (props) {
|
|
185
|
-
return (props.variant === "tertiary" || props.variant === "text colored") && styled.css(["padding:0 var(--c-btn-text-inset);--c-btn-inset:var(--c-btn-text-inset);background-color:transparent;border-radius:var(--ac-br-6);color:var(--color-primary);&:hover,&:focus-visible{
|
|
208
|
+
return (props.variant === "tertiary" || props.variant === "text colored") && styled.css(["padding:0 var(--c-btn-text-inset);--c-btn-inset:var(--c-btn-text-inset);background-color:transparent;border-radius:var(--ac-br-6);color:var(--color-primary);&:hover,&:focus-visible{", "}&:active{background-color:var(--color-primary-300);}"], hoverStyle$1(props.variant));
|
|
186
209
|
}, function (props) {
|
|
187
|
-
return (props.variant === "option" || props.variant === "text gray") && styled.css(["padding:0 var(--c-btn-text-inset);--c-btn-inset:var(--c-btn-text-inset);background-color:transparent;border-radius:var(--ac-br-6);color:var(--color-theme-700);&:hover,&:focus-visible{
|
|
210
|
+
return (props.variant === "option" || props.variant === "text gray") && styled.css(["padding:0 var(--c-btn-text-inset);--c-btn-inset:var(--c-btn-text-inset);background-color:transparent;border-radius:var(--ac-br-6);color:var(--color-theme-700);&:hover,&:focus-visible{", "}&:active{background-color:var(--color-theme-400);color:var(--color-theme-900);}"], hoverStyle$1(props.variant));
|
|
188
211
|
}, function (props) {
|
|
189
|
-
return props.variant === "circle raised" && styled.css(["padding:0 6px;background-color:transparent;border-radius:var(--ac-br-rounded);color:var(--color-theme-700);&:hover,&:focus-visible{
|
|
212
|
+
return props.variant === "circle raised" && styled.css(["padding:0 6px;background-color:transparent;border-radius:var(--ac-br-rounded);color:var(--color-theme-700);&:hover,&:focus-visible{", "}&:active{background-color:var(--page-paper-main);box-shadow:var(--shadow-tertiary-hover);}"], hoverStyle$1(props.variant));
|
|
190
213
|
}, function (props) {
|
|
191
214
|
return props.iconOnly && styled.css(["display:inline-flex;justify-content:center;align-items:center;padding:0;width:32px;--c-btn-inset:0px;", " ", ";", " ", ""], (props.variant === "tertiary" || props.variant === "text colored" || props.variant === "option" || props.variant === "text gray") && props.size !== "small" && props.size !== "big" && styled.css(["--c-btn-inset:", ";"], props.$inset === "tight" ? "var(--c-btn-icon-tight-inset)" : "var(--c-btn-icon-inset)"), (props.size === "small" || props.size === "big") && styled.css(["border-radius:var(--ac-br-rounded);"]), props.size === "small" && styled.css(["width:24px;"]), props.size === "big" && styled.css(["width:40px;"]));
|
|
192
215
|
}, function (props) {
|
|
@@ -195,6 +218,8 @@
|
|
|
195
218
|
return (props.variant === "tertiary" || props.variant === "text colored" || props.variant === "option" || props.variant === "text gray" || props.variant === "dark transparent") && styled.css([".c-btn__elements__element:first-child svg{margin-left:-4px;}.c-btn__elements__element:last-child svg{margin-right:-4px;}", " ", ""], props.size === "small" && styled.css(["border-radius:var(--ac-br-4);"]), props.size === "big" && styled.css(["border-radius:var(--ac-br-8);"]));
|
|
196
219
|
}, function (props) {
|
|
197
220
|
return props.active && styled.css(["", " ", " ", " ", " ", " ", ""], (props.variant === "primary" || props.variant === "contained") && styled.css(["background-color:var(--color-primary-800);"]), (props.variant === "secondary" || props.variant === "outlined") && styled.css(["border-color:var(--color-primary);color:var(--color-primary);"]), props.variant === "dark transparent" && styled.css(["background-color:var(--only-black);"]), props.variant === "circle raised" && styled.css(["background-color:var(--page-paper-main);box-shadow:var(--shadow-tertiary-hover);"]), (props.variant === "tertiary" || props.variant === "text colored") && styled.css(["background-color:var(--color-primary-200);"]), (props.variant === "option" || props.variant === "text gray") && styled.css(["color:var(--color-primary);&:hover,&:focus-visible{color:var(--color-primary);}", ""], props.children instanceof Array && styled.css(["background-color:var(--color-theme-300);"])));
|
|
221
|
+
}, function (props) {
|
|
222
|
+
return hoverStyle$1(props.variant);
|
|
198
223
|
});
|
|
199
224
|
StyledButton$2.displayName = "StyledButton";
|
|
200
225
|
var StyledButtonElements = styled__default["default"].span.withConfig({
|
|
@@ -14822,8 +14847,6 @@
|
|
|
14822
14847
|
displayName: "Styles__StyledMenu",
|
|
14823
14848
|
componentId: "sc-8fhkp-0"
|
|
14824
14849
|
})(["", " ", " ", " color:var(--color-theme-700);a:focus,a:active{outline:none;}", " ", " ", " ", ""], {
|
|
14825
|
-
"marginTop": "0.25rem",
|
|
14826
|
-
"marginBottom": "0.25rem",
|
|
14827
14850
|
"overflow": "auto",
|
|
14828
14851
|
"borderColor": "var(--border-primary)",
|
|
14829
14852
|
"backgroundColor": "var(--page-paper-main)"
|
|
@@ -15647,30 +15670,102 @@
|
|
|
15647
15670
|
// source: https://twitter.com/mattpocockuk/status/1671908303918473217/photo/1
|
|
15648
15671
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
15649
15672
|
|
|
15650
|
-
var
|
|
15651
|
-
|
|
15652
|
-
|
|
15653
|
-
|
|
15654
|
-
|
|
15655
|
-
|
|
15656
|
-
|
|
15657
|
-
|
|
15658
|
-
|
|
15659
|
-
|
|
15660
|
-
|
|
15661
|
-
|
|
15662
|
-
|
|
15663
|
-
|
|
15664
|
-
|
|
15665
|
-
|
|
15666
|
-
|
|
15667
|
-
|
|
15668
|
-
|
|
15669
|
-
|
|
15670
|
-
|
|
15671
|
-
|
|
15672
|
-
|
|
15673
|
-
|
|
15673
|
+
var isFocusVisible = function isFocusVisible(element) {
|
|
15674
|
+
try {
|
|
15675
|
+
return Boolean(element === null || element === void 0 ? void 0 : element.matches(":focus-visible"));
|
|
15676
|
+
} catch (_unused) {
|
|
15677
|
+
return false;
|
|
15678
|
+
}
|
|
15679
|
+
};
|
|
15680
|
+
var TRIGGER = 'button, [role="button"], a[href]';
|
|
15681
|
+
|
|
15682
|
+
// A target can wrap its button, as a div around a Tooltip or a CounterButton does.
|
|
15683
|
+
var triggerOf = function triggerOf(node) {
|
|
15684
|
+
var _node$querySelector;
|
|
15685
|
+
return node.matches(TRIGGER) ? node : (_node$querySelector = node.querySelector(TRIGGER)) !== null && _node$querySelector !== void 0 ? _node$querySelector : node;
|
|
15686
|
+
};
|
|
15687
|
+
var visibleBoxOf = function visibleBoxOf(node) {
|
|
15688
|
+
var rects = [node, ...Array.from(node.children)].map(function (element) {
|
|
15689
|
+
return element.getBoundingClientRect();
|
|
15690
|
+
});
|
|
15691
|
+
return {
|
|
15692
|
+
left: Math.min(...rects.map(function (rect) {
|
|
15693
|
+
return rect.left;
|
|
15694
|
+
})),
|
|
15695
|
+
right: Math.max(...rects.map(function (rect) {
|
|
15696
|
+
return rect.right;
|
|
15697
|
+
})),
|
|
15698
|
+
top: Math.min(...rects.map(function (rect) {
|
|
15699
|
+
return rect.top;
|
|
15700
|
+
})),
|
|
15701
|
+
bottom: Math.max(...rects.map(function (rect) {
|
|
15702
|
+
return rect.bottom;
|
|
15703
|
+
}))
|
|
15704
|
+
};
|
|
15705
|
+
};
|
|
15706
|
+
|
|
15707
|
+
// A control group pulls a wrapped button out of its wrapper by negative margins, so the menu lines up with the button.
|
|
15708
|
+
var offsetToVisibleBox = function offsetToVisibleBox(node) {
|
|
15709
|
+
return {
|
|
15710
|
+
name: "offset",
|
|
15711
|
+
options: {
|
|
15712
|
+
offset: function offset(_ref) {
|
|
15713
|
+
var placement = _ref.placement;
|
|
15714
|
+
if (triggerOf(node) === node) {
|
|
15715
|
+
return [0, 0];
|
|
15716
|
+
}
|
|
15717
|
+
var wrapper = node.getBoundingClientRect();
|
|
15718
|
+
var box = visibleBoxOf(node);
|
|
15719
|
+
var _placement$split = placement.split("-"),
|
|
15720
|
+
_placement$split2 = _slicedToArray(_placement$split, 2),
|
|
15721
|
+
side = _placement$split2[0],
|
|
15722
|
+
align = _placement$split2[1];
|
|
15723
|
+
var vertical = side === "top" || side === "bottom";
|
|
15724
|
+
var start = vertical ? "left" : "top";
|
|
15725
|
+
var end = vertical ? "right" : "bottom";
|
|
15726
|
+
var skidding = align === "start" ? box[start] - wrapper[start] : align === "end" ? box[end] - wrapper[end] : (box[start] + box[end] - wrapper[start] - wrapper[end]) / 2;
|
|
15727
|
+
var distance = {
|
|
15728
|
+
bottom: box.bottom - wrapper.bottom,
|
|
15729
|
+
top: wrapper.top - box.top,
|
|
15730
|
+
right: box.right - wrapper.right,
|
|
15731
|
+
left: wrapper.left - box.left
|
|
15732
|
+
}[side];
|
|
15733
|
+
return [skidding, distance !== null && distance !== void 0 ? distance : 0];
|
|
15734
|
+
}
|
|
15735
|
+
}
|
|
15736
|
+
};
|
|
15737
|
+
};
|
|
15738
|
+
|
|
15739
|
+
// A menu opened with the pointer hands the focus back without a focus ring, so its trigger does not stay lit.
|
|
15740
|
+
var returnFocusOptions = function returnFocusOptions(visible) {
|
|
15741
|
+
return {
|
|
15742
|
+
focusVisible: visible
|
|
15743
|
+
};
|
|
15744
|
+
};
|
|
15745
|
+
var Menu = function Menu(_ref2) {
|
|
15746
|
+
var children = _ref2.children,
|
|
15747
|
+
_ref2$disableFocusLoc = _ref2.disableFocusLock,
|
|
15748
|
+
disableFocusLock = _ref2$disableFocusLoc === void 0 ? false : _ref2$disableFocusLoc,
|
|
15749
|
+
onMenuClick = _ref2.onMenuClick,
|
|
15750
|
+
_ref2$handleScroll = _ref2.handleScroll,
|
|
15751
|
+
handleScroll = _ref2$handleScroll === void 0 ? true : _ref2$handleScroll,
|
|
15752
|
+
_ref2$mode = _ref2.mode,
|
|
15753
|
+
mode = _ref2$mode === void 0 ? "normal" : _ref2$mode,
|
|
15754
|
+
_ref2$open = _ref2.open,
|
|
15755
|
+
defaultOpen = _ref2$open === void 0 ? false : _ref2$open,
|
|
15756
|
+
onOpen = _ref2.onOpen,
|
|
15757
|
+
onClose = _ref2.onClose,
|
|
15758
|
+
onBeforeClose = _ref2.onBeforeClose,
|
|
15759
|
+
_ref2$position = _ref2.position,
|
|
15760
|
+
position = _ref2$position === void 0 ? "bottom-start" : _ref2$position,
|
|
15761
|
+
target = _ref2.target,
|
|
15762
|
+
className = _ref2.className,
|
|
15763
|
+
menuClassName = _ref2.menuClassName,
|
|
15764
|
+
popperClassName = _ref2.popperClassName,
|
|
15765
|
+
backgroundElementClass = _ref2.backgroundElementClass,
|
|
15766
|
+
_ref2$windowAbsolutel = _ref2.windowAbsolutelyPositioned,
|
|
15767
|
+
windowAbsolutelyPositioned = _ref2$windowAbsolutel === void 0 ? false : _ref2$windowAbsolutel,
|
|
15768
|
+
onPopperOpen = _ref2.onPopperOpen;
|
|
15674
15769
|
var _useState = React.useState(defaultOpen),
|
|
15675
15770
|
_useState2 = _slicedToArray(_useState, 2),
|
|
15676
15771
|
open = _useState2[0],
|
|
@@ -15687,12 +15782,14 @@
|
|
|
15687
15782
|
var isOpenAtLeastOnce = React.useRef(false);
|
|
15688
15783
|
var wasOpen = React.useRef(open);
|
|
15689
15784
|
var focusBeforeOpen = React.useRef(null);
|
|
15785
|
+
var focusWasVisible = React.useRef(false);
|
|
15690
15786
|
var returnFocusTo = React.useRef(null);
|
|
15691
15787
|
var popperRef = React.useRef(null);
|
|
15692
15788
|
|
|
15693
15789
|
// Read on the render that opens the menu, before the focus lock moves the focus inside it.
|
|
15694
15790
|
if (open && !wasOpen.current && typeof document !== "undefined") {
|
|
15695
15791
|
focusBeforeOpen.current = document.activeElement;
|
|
15792
|
+
focusWasVisible.current = isFocusVisible(document.activeElement);
|
|
15696
15793
|
}
|
|
15697
15794
|
wasOpen.current = open;
|
|
15698
15795
|
React.useEffect(function () {
|
|
@@ -15703,8 +15800,31 @@
|
|
|
15703
15800
|
setExited(false);
|
|
15704
15801
|
}
|
|
15705
15802
|
}, [open]);
|
|
15803
|
+
|
|
15804
|
+
// Set on the node itself, so the trigger gets it also through a wrapper such as Tooltip.
|
|
15805
|
+
var expandedTrigger = React.useRef(null);
|
|
15806
|
+
React.useEffect(function () {
|
|
15807
|
+
var node = elementRef.current;
|
|
15808
|
+
if (!node) {
|
|
15809
|
+
return;
|
|
15810
|
+
}
|
|
15811
|
+
var trigger = triggerOf(node);
|
|
15812
|
+
if (!trigger.hasAttribute("aria-haspopup")) {
|
|
15813
|
+
trigger.setAttribute("aria-haspopup", "true");
|
|
15814
|
+
}
|
|
15815
|
+
if (open) {
|
|
15816
|
+
trigger.setAttribute("aria-expanded", "true");
|
|
15817
|
+
expandedTrigger.current = trigger;
|
|
15818
|
+
} else if (expandedTrigger.current) {
|
|
15819
|
+
expandedTrigger.current.removeAttribute("aria-expanded");
|
|
15820
|
+
expandedTrigger.current = null;
|
|
15821
|
+
}
|
|
15822
|
+
}, [open, childNode]);
|
|
15706
15823
|
var handleRefRef = useForkRef(target ? target.ref : undefined, setChildNode);
|
|
15707
15824
|
var handleRef = useForkRef(handleRefRef, elementRef);
|
|
15825
|
+
var popperModifiers = React.useMemo(function () {
|
|
15826
|
+
return childNode instanceof HTMLElement ? [offsetToVisibleBox(childNode)] : undefined;
|
|
15827
|
+
}, [childNode]);
|
|
15708
15828
|
var handleOpen = React.useCallback(function (event) {
|
|
15709
15829
|
var _target$props;
|
|
15710
15830
|
event === null || event === void 0 || event.preventDefault();
|
|
@@ -15735,7 +15855,7 @@
|
|
|
15735
15855
|
var previous = focusBeforeOpen.current;
|
|
15736
15856
|
var returnTo = previous instanceof HTMLElement && previous.isConnected ? previous : elementRef.current;
|
|
15737
15857
|
returnFocusTo.current = returnTo;
|
|
15738
|
-
returnTo === null || returnTo === void 0 || returnTo.focus();
|
|
15858
|
+
returnTo === null || returnTo === void 0 || returnTo.focus(returnFocusOptions(focusWasVisible.current));
|
|
15739
15859
|
isOpenAtLeastOnce.current = false;
|
|
15740
15860
|
}
|
|
15741
15861
|
}, [open]);
|
|
@@ -15750,7 +15870,7 @@
|
|
|
15750
15870
|
var _popperRef$current;
|
|
15751
15871
|
if ((_popperRef$current = popperRef.current) !== null && _popperRef$current !== void 0 && _popperRef$current.contains(event.target)) {
|
|
15752
15872
|
var _returnFocusTo$curren;
|
|
15753
|
-
(_returnFocusTo$curren = returnFocusTo.current) === null || _returnFocusTo$curren === void 0 || _returnFocusTo$curren.focus();
|
|
15873
|
+
(_returnFocusTo$curren = returnFocusTo.current) === null || _returnFocusTo$curren === void 0 || _returnFocusTo$curren.focus(returnFocusOptions(focusWasVisible.current));
|
|
15754
15874
|
}
|
|
15755
15875
|
};
|
|
15756
15876
|
document.addEventListener("focusin", keepFocusOut, true);
|
|
@@ -15783,10 +15903,11 @@
|
|
|
15783
15903
|
className: popperClassName,
|
|
15784
15904
|
tabIndex: -1,
|
|
15785
15905
|
afterWrite: onPopperOpen,
|
|
15906
|
+
modifiers: popperModifiers,
|
|
15786
15907
|
transition: true
|
|
15787
|
-
}, function (
|
|
15788
|
-
var placement =
|
|
15789
|
-
transitionProps =
|
|
15908
|
+
}, function (_ref3) {
|
|
15909
|
+
var placement = _ref3.placement,
|
|
15910
|
+
transitionProps = _ref3.transitionProps;
|
|
15790
15911
|
return /*#__PURE__*/React__default["default"].createElement(Grow, {
|
|
15791
15912
|
placement: placement,
|
|
15792
15913
|
in: transitionProps === null || transitionProps === void 0 ? void 0 : transitionProps.in,
|
|
@@ -16335,7 +16456,7 @@
|
|
|
16335
16456
|
displayName: "Styles__StyledCounterButton",
|
|
16336
16457
|
componentId: "sc-1ecrcba-1"
|
|
16337
16458
|
})(["", " ", " ", " ", ""], function (props) {
|
|
16338
|
-
return props.$active && !props.disabled && styled.css(["padding:0 8px;svg{fill:var(--color-primary);}&:hover{background:var(--color-primary-300);}"]);
|
|
16459
|
+
return props.$active && !props.disabled && styled.css(["padding:0 8px;svg{fill:var(--color-primary);}&:hover,&[aria-haspopup][aria-expanded=\"true\"]{background:var(--color-primary-300);}"]);
|
|
16339
16460
|
}, function (props) {
|
|
16340
16461
|
return props.$selected && styled.css(["border-top-right-radius:0;border-bottom-right-radius:0;background-color:var(--color-primary-200);"]);
|
|
16341
16462
|
}, function (props) {
|
|
@@ -16352,9 +16473,9 @@
|
|
|
16352
16473
|
var StyledCounterButtonLabel = styled__default["default"](Body2).withConfig({
|
|
16353
16474
|
displayName: "Styles__StyledCounterButtonLabel",
|
|
16354
16475
|
componentId: "sc-1ecrcba-3"
|
|
16355
|
-
})(["", " @media (max-width:768px){display:none;}", ":hover &&{", "}", ""], {
|
|
16476
|
+
})(["", " @media (max-width:768px){display:none;}", ":hover &&,", "[aria-haspopup][aria-expanded=\"true\"] &&{", "}", ""], {
|
|
16356
16477
|
"pointerEvents": "none"
|
|
16357
|
-
}, StyledCounterButton, function (props) {
|
|
16478
|
+
}, StyledCounterButton, StyledCounterButton, function (props) {
|
|
16358
16479
|
return !props.$active && styled.css(["color:var(--color-theme-900);"]);
|
|
16359
16480
|
}, function (props) {
|
|
16360
16481
|
return props.$active && styled.css(["color:var(--color-primary);"]);
|
|
@@ -29014,7 +29135,6 @@
|
|
|
29014
29135
|
onClose: handleClose,
|
|
29015
29136
|
position: position,
|
|
29016
29137
|
target: /*#__PURE__*/React__default["default"].createElement(CounterButton, {
|
|
29017
|
-
active: open,
|
|
29018
29138
|
label: label,
|
|
29019
29139
|
icon: icon,
|
|
29020
29140
|
counter: count,
|