@vkontakte/vkui 6.2.0 → 6.2.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/cjs/components/Avatar/Avatar.d.ts +1 -4
- package/dist/cjs/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.js +10 -8
- package/dist/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/cjs/components/ChipsInputBase/ChipsInputBase.d.ts.map +1 -1
- package/dist/cjs/components/ChipsInputBase/ChipsInputBase.js +3 -5
- package/dist/cjs/components/ChipsInputBase/ChipsInputBase.js.map +1 -1
- package/dist/cjs/components/ChipsInputBase/constants.js +2 -3
- package/dist/cjs/components/ChipsInputBase/constants.js.map +1 -1
- package/dist/cjs/components/CustomSelect/CustomSelect.js +4 -5
- package/dist/cjs/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/cjs/components/FocusTrap/FocusTrap.d.ts.map +1 -1
- package/dist/cjs/components/FocusTrap/FocusTrap.js +10 -1
- package/dist/cjs/components/FocusTrap/FocusTrap.js.map +1 -1
- package/dist/cjs/components/GridAvatar/GridAvatar.js +1 -1
- package/dist/cjs/components/GridAvatar/GridAvatar.js.map +1 -1
- package/dist/cjs/components/Image/Image.d.ts +2 -4
- package/dist/cjs/components/Image/Image.d.ts.map +1 -1
- package/dist/cjs/components/ImageBase/ImageBase.d.ts +1 -4
- package/dist/cjs/components/ImageBase/ImageBase.d.ts.map +1 -1
- package/dist/cjs/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.d.ts +4 -38
- package/dist/cjs/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.d.ts.map +1 -1
- package/dist/cjs/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.js +60 -19
- package/dist/cjs/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.js.map +1 -1
- package/dist/cjs/components/ImageBase/ImageBaseOverlay/hooks.d.ts +6 -0
- package/dist/cjs/components/ImageBase/ImageBaseOverlay/hooks.d.ts.map +1 -0
- package/dist/cjs/components/ImageBase/ImageBaseOverlay/hooks.js +37 -0
- package/dist/cjs/components/ImageBase/ImageBaseOverlay/hooks.js.map +1 -0
- package/dist/cjs/components/ImageBase/ImageBaseOverlay/types.d.ts +54 -0
- package/dist/cjs/components/ImageBase/ImageBaseOverlay/types.d.ts.map +1 -0
- package/dist/cjs/components/ImageBase/ImageBaseOverlay/types.js +8 -0
- package/dist/cjs/components/ImageBase/ImageBaseOverlay/types.js.map +1 -0
- package/dist/cjs/components/PanelHeaderContext/PanelHeaderContext.d.ts.map +1 -1
- package/dist/cjs/components/PanelHeaderContext/PanelHeaderContext.js +1 -1
- package/dist/cjs/components/PanelHeaderContext/PanelHeaderContext.js.map +1 -1
- package/dist/cjs/components/Popover/Popover.d.ts +2 -2
- package/dist/cjs/components/Popover/Popover.d.ts.map +1 -1
- package/dist/cjs/components/Popover/Popover.js +4 -2
- package/dist/cjs/components/Popover/Popover.js.map +1 -1
- package/dist/cjs/components/Snackbar/Snackbar.d.ts +6 -0
- package/dist/cjs/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/dist/cjs/components/Snackbar/Snackbar.js +3 -1
- package/dist/cjs/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/cjs/components/Snackbar/types.d.ts +1 -0
- package/dist/cjs/components/Snackbar/types.d.ts.map +1 -1
- package/dist/cjs/components/Snackbar/utils.d.ts +4 -8
- package/dist/cjs/components/Snackbar/utils.d.ts.map +1 -1
- package/dist/cjs/components/Snackbar/utils.js +31 -41
- package/dist/cjs/components/Snackbar/utils.js.map +1 -1
- package/dist/cjs/helpers/array.d.ts +5 -0
- package/dist/cjs/helpers/array.d.ts.map +1 -0
- package/dist/cjs/helpers/array.js +20 -0
- package/dist/cjs/helpers/array.js.map +1 -0
- package/dist/cjs/hooks/useEnsuredControl.js +1 -1
- package/dist/cjs/hooks/useEnsuredControl.js.map +1 -1
- package/dist/cjs/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.d.ts.map +1 -1
- package/dist/cjs/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.js +9 -5
- package/dist/cjs/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.js.map +1 -1
- package/dist/cjs/lib/tokens/TokensClassProvider.d.ts.map +1 -1
- package/dist/cjs/lib/tokens/TokensClassProvider.js +1 -1
- package/dist/cjs/lib/tokens/TokensClassProvider.js.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -4
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +10 -8
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/ChipsInputBase/ChipsInputBase.d.ts.map +1 -1
- package/dist/components/ChipsInputBase/ChipsInputBase.js +3 -5
- package/dist/components/ChipsInputBase/ChipsInputBase.js.map +1 -1
- package/dist/components/ChipsInputBase/constants.js +2 -3
- package/dist/components/ChipsInputBase/constants.js.map +1 -1
- package/dist/components/CustomSelect/CustomSelect.js +4 -5
- package/dist/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/components/FocusTrap/FocusTrap.d.ts.map +1 -1
- package/dist/components/FocusTrap/FocusTrap.js +10 -1
- package/dist/components/FocusTrap/FocusTrap.js.map +1 -1
- package/dist/components/GridAvatar/GridAvatar.js +1 -1
- package/dist/components/GridAvatar/GridAvatar.js.map +1 -1
- package/dist/components/Image/Image.d.ts +2 -4
- package/dist/components/Image/Image.d.ts.map +1 -1
- package/dist/components/ImageBase/ImageBase.d.ts +1 -4
- package/dist/components/ImageBase/ImageBase.d.ts.map +1 -1
- package/dist/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.d.ts +4 -38
- package/dist/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.d.ts.map +1 -1
- package/dist/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.js +64 -23
- package/dist/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.js.map +1 -1
- package/dist/components/ImageBase/ImageBaseOverlay/hooks.d.ts +6 -0
- package/dist/components/ImageBase/ImageBaseOverlay/hooks.d.ts.map +1 -0
- package/dist/components/ImageBase/ImageBaseOverlay/hooks.js +26 -0
- package/dist/components/ImageBase/ImageBaseOverlay/hooks.js.map +1 -0
- package/dist/components/ImageBase/ImageBaseOverlay/types.d.ts +54 -0
- package/dist/components/ImageBase/ImageBaseOverlay/types.d.ts.map +1 -0
- package/dist/components/ImageBase/ImageBaseOverlay/types.js +3 -0
- package/dist/components/ImageBase/ImageBaseOverlay/types.js.map +1 -0
- package/dist/components/PanelHeaderContext/PanelHeaderContext.d.ts.map +1 -1
- package/dist/components/PanelHeaderContext/PanelHeaderContext.js +1 -1
- package/dist/components/PanelHeaderContext/PanelHeaderContext.js.map +1 -1
- package/dist/components/Popover/Popover.d.ts +2 -2
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/Popover.js +4 -2
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Snackbar/Snackbar.d.ts +6 -0
- package/dist/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/dist/components/Snackbar/Snackbar.js +3 -1
- package/dist/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/Snackbar/types.d.ts +1 -0
- package/dist/components/Snackbar/types.d.ts.map +1 -1
- package/dist/components/Snackbar/types.js.map +1 -1
- package/dist/components/Snackbar/utils.d.ts +4 -8
- package/dist/components/Snackbar/utils.d.ts.map +1 -1
- package/dist/components/Snackbar/utils.js +30 -41
- package/dist/components/Snackbar/utils.js.map +1 -1
- package/dist/components.css +3 -3
- package/dist/components.css.map +1 -1
- package/dist/components.js.tmp +336 -192
- package/dist/cssm/components/Avatar/Avatar.d.ts +1 -4
- package/dist/cssm/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/cssm/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/cssm/components/Checkbox/Checkbox.js +10 -8
- package/dist/cssm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/cssm/components/ChipsInputBase/ChipsInputBase.d.ts.map +1 -1
- package/dist/cssm/components/ChipsInputBase/ChipsInputBase.js +3 -5
- package/dist/cssm/components/ChipsInputBase/ChipsInputBase.js.map +1 -1
- package/dist/cssm/components/ChipsInputBase/constants.js +2 -2
- package/dist/cssm/components/ChipsInputBase/constants.js.map +1 -1
- package/dist/cssm/components/CustomScrollView/CustomScrollView.module.css +2 -0
- package/dist/cssm/components/CustomSelect/CustomSelect.js +4 -4
- package/dist/cssm/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/cssm/components/CustomSelectOption/CustomSelectOption.module.css +1 -0
- package/dist/cssm/components/FocusTrap/FocusTrap.d.ts.map +1 -1
- package/dist/cssm/components/FocusTrap/FocusTrap.js +10 -1
- package/dist/cssm/components/FocusTrap/FocusTrap.js.map +1 -1
- package/dist/cssm/components/GridAvatar/GridAvatar.js +1 -1
- package/dist/cssm/components/GridAvatar/GridAvatar.js.map +1 -1
- package/dist/cssm/components/Image/Image.d.ts +2 -4
- package/dist/cssm/components/Image/Image.d.ts.map +1 -1
- package/dist/cssm/components/ImageBase/ImageBase.d.ts +1 -4
- package/dist/cssm/components/ImageBase/ImageBase.d.ts.map +1 -1
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.d.ts +4 -38
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.d.ts.map +1 -1
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.js +54 -18
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.js.map +1 -1
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.module.css +10 -0
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/hooks.d.ts +6 -0
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/hooks.d.ts.map +1 -0
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/hooks.js +26 -0
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/hooks.js.map +1 -0
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/types.d.ts +54 -0
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/types.d.ts.map +1 -0
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/types.js +3 -0
- package/dist/cssm/components/ImageBase/ImageBaseOverlay/types.js.map +1 -0
- package/dist/cssm/components/ModalDismissButton/ModalDismissButton.module.css +5 -6
- package/dist/cssm/components/PanelHeaderContext/PanelHeaderContext.d.ts.map +1 -1
- package/dist/cssm/components/PanelHeaderContext/PanelHeaderContext.js +1 -1
- package/dist/cssm/components/PanelHeaderContext/PanelHeaderContext.js.map +1 -1
- package/dist/cssm/components/Popover/Popover.d.ts +2 -2
- package/dist/cssm/components/Popover/Popover.d.ts.map +1 -1
- package/dist/cssm/components/Popover/Popover.js +3 -2
- package/dist/cssm/components/Popover/Popover.js.map +1 -1
- package/dist/cssm/components/Search/Search.module.css +4 -5
- package/dist/cssm/components/Snackbar/Snackbar.d.ts +6 -0
- package/dist/cssm/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/dist/cssm/components/Snackbar/Snackbar.js +3 -1
- package/dist/cssm/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/cssm/components/Snackbar/Snackbar.module.css +47 -33
- package/dist/cssm/components/Snackbar/types.d.ts +1 -0
- package/dist/cssm/components/Snackbar/types.d.ts.map +1 -1
- package/dist/cssm/components/Snackbar/types.js.map +1 -1
- package/dist/cssm/components/Snackbar/utils.d.ts +4 -8
- package/dist/cssm/components/Snackbar/utils.d.ts.map +1 -1
- package/dist/cssm/components/Snackbar/utils.js +30 -41
- package/dist/cssm/components/Snackbar/utils.js.map +1 -1
- package/dist/cssm/helpers/array.d.ts +5 -0
- package/dist/cssm/helpers/array.d.ts.map +1 -0
- package/dist/cssm/helpers/array.js +10 -0
- package/dist/cssm/helpers/array.js.map +1 -0
- package/dist/cssm/hooks/useEnsuredControl.js +1 -1
- package/dist/cssm/hooks/useEnsuredControl.js.map +1 -1
- package/dist/cssm/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.d.ts.map +1 -1
- package/dist/cssm/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.js +9 -5
- package/dist/cssm/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.js.map +1 -1
- package/dist/cssm/lib/tokens/TokensClassProvider.d.ts.map +1 -1
- package/dist/cssm/lib/tokens/TokensClassProvider.js +2 -1
- package/dist/cssm/lib/tokens/TokensClassProvider.js.map +1 -1
- package/dist/cssm/lib/tokens/TokensClassProvider.module.css +4 -0
- package/dist/helpers/array.d.ts +5 -0
- package/dist/helpers/array.d.ts.map +1 -0
- package/dist/helpers/array.js +10 -0
- package/dist/helpers/array.js.map +1 -0
- package/dist/hooks/useEnsuredControl.js +1 -1
- package/dist/hooks/useEnsuredControl.js.map +1 -1
- package/dist/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.d.ts.map +1 -1
- package/dist/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.js +9 -5
- package/dist/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.js.map +1 -1
- package/dist/lib/tokens/TokensClassProvider.d.ts.map +1 -1
- package/dist/lib/tokens/TokensClassProvider.js +1 -1
- package/dist/lib/tokens/TokensClassProvider.js.map +1 -1
- package/dist/vkui.css +3 -3
- package/dist/vkui.css.map +1 -1
- package/dist/vkui.js.tmp +336 -192
- package/package.json +1 -1
- package/src/components/Checkbox/Checkbox.tsx +11 -8
- package/src/components/ChipsInputBase/ChipsInputBase.tsx +3 -5
- package/src/components/ChipsInputBase/constants.tsx +2 -2
- package/src/components/CustomScrollView/CustomScrollView.module.css +2 -0
- package/src/components/CustomSelect/CustomSelect.tsx +7 -7
- package/src/components/CustomSelectOption/CustomSelectOption.module.css +1 -0
- package/src/components/FocusTrap/FocusTrap.tsx +10 -1
- package/src/components/GridAvatar/GridAvatar.tsx +1 -1
- package/src/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.module.css +10 -0
- package/src/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.tsx +89 -65
- package/src/components/ImageBase/ImageBaseOverlay/hooks.ts +26 -0
- package/src/components/ImageBase/ImageBaseOverlay/types.ts +58 -0
- package/src/components/ModalDismissButton/ModalDismissButton.module.css +5 -6
- package/src/components/PanelHeaderContext/PanelHeaderContext.tsx +2 -0
- package/src/components/Popover/Popover.tsx +3 -0
- package/src/components/Search/Search.module.css +4 -5
- package/src/components/Snackbar/Snackbar.module.css +47 -33
- package/src/components/Snackbar/Snackbar.tsx +9 -0
- package/src/components/Snackbar/types.ts +8 -1
- package/src/components/Snackbar/utils.ts +46 -42
- package/src/helpers/array.ts +9 -0
- package/src/hooks/useEnsuredControl.ts +1 -1
- package/src/lib/floating/useFloatingWithInteractions/useFloatingWithInteractions.ts +18 -10
- package/src/lib/tokens/TokensClassProvider.module.css +4 -0
- package/src/lib/tokens/TokensClassProvider.tsx +6 -1
package/dist/vkui.js.tmp
CHANGED
|
@@ -4912,15 +4912,15 @@ function browser_computeBrowserInfo() {
|
|
|
4912
4912
|
* Эмуляция функции `window.matchMedia` для SSR.
|
|
4913
4913
|
*
|
|
4914
4914
|
* ⚠️ Желательно избегать использование этой эмуляции в SSR.
|
|
4915
|
-
*/ function
|
|
4915
|
+
*/ function mediaQueryNull(query) {
|
|
4916
4916
|
return {
|
|
4917
4917
|
matches: false,
|
|
4918
4918
|
media: query,
|
|
4919
|
-
onchange:
|
|
4920
|
-
addListener:
|
|
4921
|
-
removeListener:
|
|
4922
|
-
addEventListener:
|
|
4923
|
-
removeEventListener:
|
|
4919
|
+
onchange: functions_noop,
|
|
4920
|
+
addListener: functions_noop,
|
|
4921
|
+
removeListener: functions_noop,
|
|
4922
|
+
addEventListener: functions_noop,
|
|
4923
|
+
removeEventListener: functions_noop,
|
|
4924
4924
|
dispatchEvent: function dispatchEvent() {
|
|
4925
4925
|
return false;
|
|
4926
4926
|
}
|
|
@@ -4990,15 +4990,19 @@ var getAppearanceTokenClassNameByPlatform = function(platform, tokensClassNames)
|
|
|
4990
4990
|
return tokensClassName ? tokensClassName : DEFAULT_TOKENS_CLASS_NAMES[platform][appearance];
|
|
4991
4991
|
};
|
|
4992
4992
|
|
|
4993
|
+
;// CONCATENATED MODULE: ./src/lib/tokens/TokensClassProvider.module.css
|
|
4994
|
+
// extracted by mini-css-extract-plugin
|
|
4995
|
+
|
|
4993
4996
|
;// CONCATENATED MODULE: ./src/lib/tokens/TokensClassProvider.tsx
|
|
4994
4997
|
|
|
4995
4998
|
|
|
4996
4999
|
|
|
5000
|
+
|
|
4997
5001
|
var InjectTokenClassNameToChild = function(param) {
|
|
4998
5002
|
var children = param.children;
|
|
4999
5003
|
var tokensClassName = useTokensClassName();
|
|
5000
5004
|
return /*#__PURE__*/ React.cloneElement(children, {
|
|
5001
|
-
className: classNames(tokensClassName, children.props.className)
|
|
5005
|
+
className: classNames(tokensClassName, "vkuiTokensClassProvider--default-color", children.props.className)
|
|
5002
5006
|
});
|
|
5003
5007
|
};
|
|
5004
5008
|
var TokensClassProvider_TokensClassProvider = function(param) {
|
|
@@ -9254,6 +9258,165 @@ function useAppearance_useAppearance() {
|
|
|
9254
9258
|
return appearance !== null && appearance !== void 0 ? appearance : appearance_DEFAULT_APPEARANCE;
|
|
9255
9259
|
}
|
|
9256
9260
|
|
|
9261
|
+
;// CONCATENATED MODULE: ./src/hooks/useFocusWithin.ts
|
|
9262
|
+
function useFocusWithin_array_like_to_array(arr, len) {
|
|
9263
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
9264
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
9265
|
+
return arr2;
|
|
9266
|
+
}
|
|
9267
|
+
function useFocusWithin_array_with_holes(arr) {
|
|
9268
|
+
if (Array.isArray(arr)) return arr;
|
|
9269
|
+
}
|
|
9270
|
+
function useFocusWithin_iterable_to_array_limit(arr, i) {
|
|
9271
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
9272
|
+
if (_i == null) return;
|
|
9273
|
+
var _arr = [];
|
|
9274
|
+
var _n = true;
|
|
9275
|
+
var _d = false;
|
|
9276
|
+
var _s, _e;
|
|
9277
|
+
try {
|
|
9278
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
9279
|
+
_arr.push(_s.value);
|
|
9280
|
+
if (i && _arr.length === i) break;
|
|
9281
|
+
}
|
|
9282
|
+
} catch (err) {
|
|
9283
|
+
_d = true;
|
|
9284
|
+
_e = err;
|
|
9285
|
+
} finally{
|
|
9286
|
+
try {
|
|
9287
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
9288
|
+
} finally{
|
|
9289
|
+
if (_d) throw _e;
|
|
9290
|
+
}
|
|
9291
|
+
}
|
|
9292
|
+
return _arr;
|
|
9293
|
+
}
|
|
9294
|
+
function useFocusWithin_non_iterable_rest() {
|
|
9295
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
9296
|
+
}
|
|
9297
|
+
function useFocusWithin_sliced_to_array(arr, i) {
|
|
9298
|
+
return useFocusWithin_array_with_holes(arr) || useFocusWithin_iterable_to_array_limit(arr, i) || useFocusWithin_unsupported_iterable_to_array(arr, i) || useFocusWithin_non_iterable_rest();
|
|
9299
|
+
}
|
|
9300
|
+
function useFocusWithin_unsupported_iterable_to_array(o, minLen) {
|
|
9301
|
+
if (!o) return;
|
|
9302
|
+
if (typeof o === "string") return useFocusWithin_array_like_to_array(o, minLen);
|
|
9303
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9304
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9305
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9306
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return useFocusWithin_array_like_to_array(o, minLen);
|
|
9307
|
+
}
|
|
9308
|
+
|
|
9309
|
+
|
|
9310
|
+
|
|
9311
|
+
var isFocusWithin = function(ref, document) {
|
|
9312
|
+
return ref.contains(document.activeElement);
|
|
9313
|
+
};
|
|
9314
|
+
function useFocusWithin_useFocusWithin(ref) {
|
|
9315
|
+
var document = dom_useDOM().document;
|
|
9316
|
+
var _React_useState = useFocusWithin_sliced_to_array(react.useState(function() {
|
|
9317
|
+
return ref.current && document ? isFocusWithin(ref.current, document) : false;
|
|
9318
|
+
}), 2), focusWithin = _React_useState[0], setFocusWithin = _React_useState[1];
|
|
9319
|
+
useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(function handleAutoFocus() {
|
|
9320
|
+
/* istanbul ignore if: невозможный кейс, т.к. в SSR эффекты не вызываются. Проверка на будущее, если вдруг эффект будет вызываться. */ if (!document) {
|
|
9321
|
+
return;
|
|
9322
|
+
}
|
|
9323
|
+
var handleFocusOrBlurEvents = function() {
|
|
9324
|
+
if (ref.current) {
|
|
9325
|
+
setFocusWithin(isFocusWithin(ref.current, document));
|
|
9326
|
+
}
|
|
9327
|
+
};
|
|
9328
|
+
// Вызываем в начале, чтобы проверить autoFocus
|
|
9329
|
+
void handleFocusOrBlurEvents();
|
|
9330
|
+
document.addEventListener('focus', handleFocusOrBlurEvents, {
|
|
9331
|
+
capture: true
|
|
9332
|
+
});
|
|
9333
|
+
document.addEventListener('blur', handleFocusOrBlurEvents, {
|
|
9334
|
+
capture: true
|
|
9335
|
+
});
|
|
9336
|
+
return function() {
|
|
9337
|
+
document.removeEventListener('focus', handleFocusOrBlurEvents, {
|
|
9338
|
+
capture: true
|
|
9339
|
+
});
|
|
9340
|
+
document.removeEventListener('blur', handleFocusOrBlurEvents, {
|
|
9341
|
+
capture: true
|
|
9342
|
+
});
|
|
9343
|
+
};
|
|
9344
|
+
}, []);
|
|
9345
|
+
return focusWithin;
|
|
9346
|
+
}
|
|
9347
|
+
|
|
9348
|
+
;// CONCATENATED MODULE: ./src/components/ImageBase/ImageBaseOverlay/hooks.ts
|
|
9349
|
+
function hooks_array_like_to_array(arr, len) {
|
|
9350
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
9351
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
9352
|
+
return arr2;
|
|
9353
|
+
}
|
|
9354
|
+
function hooks_array_with_holes(arr) {
|
|
9355
|
+
if (Array.isArray(arr)) return arr;
|
|
9356
|
+
}
|
|
9357
|
+
function hooks_iterable_to_array_limit(arr, i) {
|
|
9358
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
9359
|
+
if (_i == null) return;
|
|
9360
|
+
var _arr = [];
|
|
9361
|
+
var _n = true;
|
|
9362
|
+
var _d = false;
|
|
9363
|
+
var _s, _e;
|
|
9364
|
+
try {
|
|
9365
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
9366
|
+
_arr.push(_s.value);
|
|
9367
|
+
if (i && _arr.length === i) break;
|
|
9368
|
+
}
|
|
9369
|
+
} catch (err) {
|
|
9370
|
+
_d = true;
|
|
9371
|
+
_e = err;
|
|
9372
|
+
} finally{
|
|
9373
|
+
try {
|
|
9374
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
9375
|
+
} finally{
|
|
9376
|
+
if (_d) throw _e;
|
|
9377
|
+
}
|
|
9378
|
+
}
|
|
9379
|
+
return _arr;
|
|
9380
|
+
}
|
|
9381
|
+
function hooks_non_iterable_rest() {
|
|
9382
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
9383
|
+
}
|
|
9384
|
+
function hooks_sliced_to_array(arr, i) {
|
|
9385
|
+
return hooks_array_with_holes(arr) || hooks_iterable_to_array_limit(arr, i) || hooks_unsupported_iterable_to_array(arr, i) || hooks_non_iterable_rest();
|
|
9386
|
+
}
|
|
9387
|
+
function hooks_unsupported_iterable_to_array(o, minLen) {
|
|
9388
|
+
if (!o) return;
|
|
9389
|
+
if (typeof o === "string") return hooks_array_like_to_array(o, minLen);
|
|
9390
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9391
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9392
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9393
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return hooks_array_like_to_array(o, minLen);
|
|
9394
|
+
}
|
|
9395
|
+
|
|
9396
|
+
|
|
9397
|
+
|
|
9398
|
+
function useNonInteractiveOverlayProps(rootRef) {
|
|
9399
|
+
var focusWithin = useFocusWithin_useFocusWithin(rootRef);
|
|
9400
|
+
var _React_useState = hooks_sliced_to_array(react.useState(false), 2), nonInteractiveFocusShown = _React_useState[0], setNonInteractiveFocusShown = _React_useState[1];
|
|
9401
|
+
function onClick(event) {
|
|
9402
|
+
if (event.detail > 0) {
|
|
9403
|
+
// Если мы попали на вложенный в оверлей элемент через focus,
|
|
9404
|
+
// то при клике мышкой мы должны начать реагировать на hover-состояние,
|
|
9405
|
+
// даже если фокус всё ещё остался на вложенном элементе (был по нему клик)
|
|
9406
|
+
setNonInteractiveFocusShown(false);
|
|
9407
|
+
}
|
|
9408
|
+
}
|
|
9409
|
+
useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(function() {
|
|
9410
|
+
setNonInteractiveFocusShown(focusWithin);
|
|
9411
|
+
}, [
|
|
9412
|
+
focusWithin
|
|
9413
|
+
]);
|
|
9414
|
+
return {
|
|
9415
|
+
shown: nonInteractiveFocusShown && focusWithin,
|
|
9416
|
+
onClick: onClick
|
|
9417
|
+
};
|
|
9418
|
+
}
|
|
9419
|
+
|
|
9257
9420
|
;// CONCATENATED MODULE: ./src/components/ImageBase/ImageBaseOverlay/ImageBaseOverlay.module.css
|
|
9258
9421
|
// extracted by mini-css-extract-plugin
|
|
9259
9422
|
|
|
@@ -9346,30 +9509,70 @@ function ImageBaseOverlay_object_without_properties_loose(source, excluded) {
|
|
|
9346
9509
|
|
|
9347
9510
|
|
|
9348
9511
|
|
|
9512
|
+
|
|
9513
|
+
|
|
9514
|
+
|
|
9515
|
+
var ImageBaseOverlayInteractive = function(_param) {
|
|
9516
|
+
var children = _param.children, className = _param.className, getRootRef = _param.getRootRef, disableInteractive = _param.disableInteractive, overlayShown = _param.overlayShown, restProps = ImageBaseOverlay_object_without_properties(_param, [
|
|
9517
|
+
"children",
|
|
9518
|
+
"className",
|
|
9519
|
+
"getRootRef",
|
|
9520
|
+
"disableInteractive",
|
|
9521
|
+
"overlayShown"
|
|
9522
|
+
]);
|
|
9523
|
+
var _useFocusVisible = useFocusVisible_useFocusVisible(), focusVisible = _useFocusVisible.focusVisible, focusEvents = ImageBaseOverlay_object_without_properties(_useFocusVisible, [
|
|
9524
|
+
"focusVisible"
|
|
9525
|
+
]);
|
|
9526
|
+
var focusVisibleClassNames = useFocusVisibleClassName_useFocusVisibleClassName({
|
|
9527
|
+
focusVisible: focusVisible,
|
|
9528
|
+
mode: 'inside'
|
|
9529
|
+
});
|
|
9530
|
+
var keyboardHandlers = useKeyboard_useKeyboard();
|
|
9531
|
+
if (false) { var size; }
|
|
9532
|
+
return /*#__PURE__*/ react.createElement("div", ImageBaseOverlay_object_spread(ImageBaseOverlay_object_spread_props(ImageBaseOverlay_object_spread({}, restProps), {
|
|
9533
|
+
tabIndex: 0,
|
|
9534
|
+
role: "button",
|
|
9535
|
+
className: classNames_classNames("vkuiImageBaseOverlay--clickable", (focusVisible || overlayShown) && "vkuiImageBaseOverlay--visible", focusVisibleClassNames, className),
|
|
9536
|
+
ref: getRootRef
|
|
9537
|
+
}), focusEvents, keyboardHandlers), children);
|
|
9538
|
+
};
|
|
9539
|
+
var ImageBaseOverlayNonInteractive = function(_param) {
|
|
9540
|
+
var className = _param.className, getRootRef = _param.getRootRef, disableInteractive = _param.disableInteractive, overlayShownProps = _param.overlayShown, restProps = ImageBaseOverlay_object_without_properties(_param, [
|
|
9541
|
+
"className",
|
|
9542
|
+
"getRootRef",
|
|
9543
|
+
"disableInteractive",
|
|
9544
|
+
"overlayShown"
|
|
9545
|
+
]);
|
|
9546
|
+
var rootRef = useExternRef_useExternRef(getRootRef);
|
|
9547
|
+
var _useNonInteractiveOverlayProps = useNonInteractiveOverlayProps(rootRef), overlayShown = _useNonInteractiveOverlayProps.shown, onOverlayClick = _useNonInteractiveOverlayProps.onClick;
|
|
9548
|
+
return /*#__PURE__*/ react.createElement("div", ImageBaseOverlay_object_spread_props(ImageBaseOverlay_object_spread({}, restProps), {
|
|
9549
|
+
ref: rootRef,
|
|
9550
|
+
className: classNames_classNames((overlayShown || overlayShownProps) && "vkuiImageBaseOverlay--visible", className),
|
|
9551
|
+
onClick: onOverlayClick
|
|
9552
|
+
}));
|
|
9553
|
+
};
|
|
9349
9554
|
/**
|
|
9350
|
-
*
|
|
9555
|
+
* Оверлей над картинкой.
|
|
9351
9556
|
*/ var ImageBaseOverlay = function(_param) {
|
|
9352
|
-
var className = _param.className, themeProp = _param.theme, visibilityProp = _param.visibility,
|
|
9557
|
+
var className = _param.className, themeProp = _param.theme, visibilityProp = _param.visibility, restProps = ImageBaseOverlay_object_without_properties(_param, [
|
|
9353
9558
|
"className",
|
|
9354
9559
|
"theme",
|
|
9355
|
-
"visibility"
|
|
9356
|
-
"children",
|
|
9357
|
-
"onClick"
|
|
9560
|
+
"visibility"
|
|
9358
9561
|
]);
|
|
9359
9562
|
var appearance = useAppearance_useAppearance();
|
|
9360
9563
|
var hasPointer = useAdaptivityHasPointer_useAdaptivityHasPointer();
|
|
9361
9564
|
var theme = themeProp !== null && themeProp !== void 0 ? themeProp : appearance;
|
|
9362
9565
|
var visibility = visibilityProp !== null && visibilityProp !== void 0 ? visibilityProp : hasPointer ? 'on-hover' : 'always';
|
|
9363
|
-
|
|
9364
|
-
var
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
}
|
|
9566
|
+
var commonClassNames = classNames_classNames("vkuiImageBaseOverlay", theme === 'light' && "vkuiImageBaseOverlay--theme-light", theme === 'dark' && "vkuiImageBaseOverlay--theme-dark", className);
|
|
9567
|
+
var commonProps = {
|
|
9568
|
+
className: commonClassNames,
|
|
9569
|
+
overlayShown: visibility === 'always'
|
|
9570
|
+
};
|
|
9571
|
+
// Не делаем деструктуризацию пропа, потому что Typescript не вывозит
|
|
9572
|
+
if (restProps.disableInteractive) {
|
|
9573
|
+
return /*#__PURE__*/ react.createElement(ImageBaseOverlayNonInteractive, ImageBaseOverlay_object_spread({}, restProps, commonProps));
|
|
9574
|
+
}
|
|
9575
|
+
return /*#__PURE__*/ react.createElement(ImageBaseOverlayInteractive, ImageBaseOverlay_object_spread({}, restProps, commonProps));
|
|
9373
9576
|
};
|
|
9374
9577
|
ImageBaseOverlay.displayName = 'ImageBaseOverlay';
|
|
9375
9578
|
|
|
@@ -12582,7 +12785,7 @@ function useEnsuredControl_useCustomEnsuredControl(param) {
|
|
|
12582
12785
|
var value = param.value, defaultValue = param.defaultValue, disabled = param.disabled, onChangeProp = param.onChange;
|
|
12583
12786
|
var isControlled = value !== undefined;
|
|
12584
12787
|
var _React_useState = useEnsuredControl_sliced_to_array(react.useState(defaultValue), 2), localValue = _React_useState[0], setLocalValue = _React_useState[1];
|
|
12585
|
-
var preservedControlledValueRef = react.useRef();
|
|
12788
|
+
var preservedControlledValueRef = react.useRef(value);
|
|
12586
12789
|
useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(function() {
|
|
12587
12790
|
preservedControlledValueRef.current = value;
|
|
12588
12791
|
});
|
|
@@ -12924,22 +13127,26 @@ var whileElementsMounted = function() {
|
|
|
12924
13127
|
blockMouseEnterRef.current = true;
|
|
12925
13128
|
commitShownLocalState(false, 'click');
|
|
12926
13129
|
});
|
|
12927
|
-
var handleMouseEnterOnBoth = useStableCallback(function() {
|
|
13130
|
+
var handleMouseEnterOnBoth = useStableCallback(function(event) {
|
|
13131
|
+
if (willBeHide && event.currentTarget === refs.floating.current) {
|
|
13132
|
+
return;
|
|
13133
|
+
}
|
|
12928
13134
|
showWithDelay.cancel();
|
|
12929
13135
|
hideWithDelay.cancel();
|
|
12930
13136
|
if (!blockMouseEnterRef.current && !shownLocalState.shown) {
|
|
12931
13137
|
showWithDelay();
|
|
12932
13138
|
}
|
|
12933
13139
|
});
|
|
12934
|
-
var handleMouseLeaveOnBothForHoverAndFocusStates = useStableCallback(function() {
|
|
13140
|
+
var handleMouseLeaveOnBothForHoverAndFocusStates = useStableCallback(function(event) {
|
|
13141
|
+
if (willBeHide && event.currentTarget === refs.floating.current) {
|
|
13142
|
+
return;
|
|
13143
|
+
}
|
|
12935
13144
|
blockFocusRef.current = false;
|
|
12936
13145
|
blockMouseEnterRef.current = false;
|
|
12937
13146
|
if (triggerOnHover) {
|
|
12938
13147
|
showWithDelay.cancel();
|
|
12939
13148
|
hideWithDelay.cancel();
|
|
12940
|
-
|
|
12941
|
-
hideWithDelay();
|
|
12942
|
-
}
|
|
13149
|
+
hideWithDelay();
|
|
12943
13150
|
}
|
|
12944
13151
|
});
|
|
12945
13152
|
var handleFloatingAnimationStart = function() {
|
|
@@ -14818,7 +15025,7 @@ var PanelHeaderContext_sizeXClassNames = {
|
|
|
14818
15025
|
var platform = usePlatform();
|
|
14819
15026
|
var _useAdaptivity = useAdaptivity(), _useAdaptivity_sizeX = _useAdaptivity.sizeX, sizeX = _useAdaptivity_sizeX === void 0 ? 'none' : _useAdaptivity_sizeX;
|
|
14820
15027
|
var elementRef = React.useRef(null);
|
|
14821
|
-
var _useCSSKeyframesAnimationController = PanelHeaderContext_sliced_to_array(useCSSKeyframesAnimationController(opened ? 'enter' : 'exit'), 2), animationState = _useCSSKeyframesAnimationController[0], animationHandlers = _useCSSKeyframesAnimationController[1];
|
|
15028
|
+
var _useCSSKeyframesAnimationController = PanelHeaderContext_sliced_to_array(useCSSKeyframesAnimationController(opened ? 'enter' : 'exit', undefined, true), 2), animationState = _useCSSKeyframesAnimationController[0], animationHandlers = _useCSSKeyframesAnimationController[1];
|
|
14822
15029
|
var visible = animationState !== 'exited';
|
|
14823
15030
|
useScrollLock(platform !== 'vkcom' && visible);
|
|
14824
15031
|
var handleGlobalOnClickOutside = React.useCallback(function(event) {
|
|
@@ -15233,20 +15440,20 @@ function SplitLayout_object_without_properties_loose(source, excluded) {
|
|
|
15233
15440
|
var mediaQueriesCache = new WeakMap();
|
|
15234
15441
|
function getMediaQueries(matchMedia) {
|
|
15235
15442
|
return {
|
|
15236
|
-
desktopPlus: matchMedia(MEDIA_QUERIES.DESKTOP_PLUS),
|
|
15237
|
-
smallTabletPlus: matchMedia(MEDIA_QUERIES.SMALL_TABLET_PLUS),
|
|
15238
|
-
tablet: matchMedia(MEDIA_QUERIES.TABLET),
|
|
15239
|
-
smallTablet: matchMedia(MEDIA_QUERIES.SMALL_TABLET),
|
|
15240
|
-
mobile: matchMedia(MEDIA_QUERIES.MOBILE),
|
|
15241
|
-
mediumHeight: matchMedia(MEDIA_QUERIES.MEDIUM_HEIGHT),
|
|
15242
|
-
mobileLandscapeHeight: matchMedia(MEDIA_QUERIES.MOBILE_LANDSCAPE_HEIGHT)
|
|
15443
|
+
desktopPlus: matchMedia(breakpoints.MEDIA_QUERIES.DESKTOP_PLUS),
|
|
15444
|
+
smallTabletPlus: matchMedia(breakpoints.MEDIA_QUERIES.SMALL_TABLET_PLUS),
|
|
15445
|
+
tablet: matchMedia(breakpoints.MEDIA_QUERIES.TABLET),
|
|
15446
|
+
smallTablet: matchMedia(breakpoints.MEDIA_QUERIES.SMALL_TABLET),
|
|
15447
|
+
mobile: matchMedia(breakpoints.MEDIA_QUERIES.MOBILE),
|
|
15448
|
+
mediumHeight: matchMedia(breakpoints.MEDIA_QUERIES.MEDIUM_HEIGHT),
|
|
15449
|
+
mobileLandscapeHeight: matchMedia(breakpoints.MEDIA_QUERIES.MOBILE_LANDSCAPE_HEIGHT)
|
|
15243
15450
|
};
|
|
15244
15451
|
}
|
|
15245
15452
|
/**
|
|
15246
15453
|
* Возвращает медиа выражения определенные дизайн-системой.
|
|
15247
15454
|
*/ var useMediaQueries_useMediaQueries = function() {
|
|
15248
|
-
var window =
|
|
15249
|
-
return
|
|
15455
|
+
var window = dom_useDOM().window;
|
|
15456
|
+
return react.useMemo(function initializeStoreOrUpdateStoreIfWindowChanges() {
|
|
15250
15457
|
if (!window) {
|
|
15251
15458
|
return getMediaQueries(mediaQueryNull);
|
|
15252
15459
|
}
|
|
@@ -17140,6 +17347,18 @@ function useAdaptivityWithJSMediaQueries_unsupported_iterable_to_array(o, minLen
|
|
|
17140
17347
|
return adaptivityProps;
|
|
17141
17348
|
};
|
|
17142
17349
|
|
|
17350
|
+
;// CONCATENATED MODULE: ./src/helpers/array.ts
|
|
17351
|
+
/**
|
|
17352
|
+
* Сравнивает два массива
|
|
17353
|
+
*/ function arraysEquals(arrA, arrB) {
|
|
17354
|
+
if (arrA.length !== arrB.length) {
|
|
17355
|
+
return false;
|
|
17356
|
+
}
|
|
17357
|
+
return arrA.every(function(item, index) {
|
|
17358
|
+
return item === arrB[index];
|
|
17359
|
+
});
|
|
17360
|
+
}
|
|
17361
|
+
|
|
17143
17362
|
;// CONCATENATED MODULE: ./src/components/FocusTrap/FocusTrap.tsx
|
|
17144
17363
|
function FocusTrap_array_like_to_array(arr, len) {
|
|
17145
17364
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -17149,6 +17368,9 @@ function FocusTrap_array_like_to_array(arr, len) {
|
|
|
17149
17368
|
function FocusTrap_array_with_holes(arr) {
|
|
17150
17369
|
if (Array.isArray(arr)) return arr;
|
|
17151
17370
|
}
|
|
17371
|
+
function FocusTrap_array_without_holes(arr) {
|
|
17372
|
+
if (Array.isArray(arr)) return FocusTrap_array_like_to_array(arr);
|
|
17373
|
+
}
|
|
17152
17374
|
function FocusTrap_define_property(obj, key, value) {
|
|
17153
17375
|
if (key in obj) {
|
|
17154
17376
|
Object.defineProperty(obj, key, {
|
|
@@ -17162,6 +17384,9 @@ function FocusTrap_define_property(obj, key, value) {
|
|
|
17162
17384
|
}
|
|
17163
17385
|
return obj;
|
|
17164
17386
|
}
|
|
17387
|
+
function FocusTrap_iterable_to_array(iter) {
|
|
17388
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
17389
|
+
}
|
|
17165
17390
|
function FocusTrap_iterable_to_array_limit(arr, i) {
|
|
17166
17391
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
17167
17392
|
if (_i == null) return;
|
|
@@ -17189,6 +17414,9 @@ function FocusTrap_iterable_to_array_limit(arr, i) {
|
|
|
17189
17414
|
function FocusTrap_non_iterable_rest() {
|
|
17190
17415
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
17191
17416
|
}
|
|
17417
|
+
function FocusTrap_non_iterable_spread() {
|
|
17418
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
17419
|
+
}
|
|
17192
17420
|
function FocusTrap_object_spread(target) {
|
|
17193
17421
|
for(var i = 1; i < arguments.length; i++){
|
|
17194
17422
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -17234,6 +17462,9 @@ function FocusTrap_object_without_properties_loose(source, excluded) {
|
|
|
17234
17462
|
function FocusTrap_sliced_to_array(arr, i) {
|
|
17235
17463
|
return FocusTrap_array_with_holes(arr) || FocusTrap_iterable_to_array_limit(arr, i) || FocusTrap_unsupported_iterable_to_array(arr, i) || FocusTrap_non_iterable_rest();
|
|
17236
17464
|
}
|
|
17465
|
+
function FocusTrap_to_consumable_array(arr) {
|
|
17466
|
+
return FocusTrap_array_without_holes(arr) || FocusTrap_iterable_to_array(arr) || FocusTrap_unsupported_iterable_to_array(arr) || FocusTrap_non_iterable_spread();
|
|
17467
|
+
}
|
|
17237
17468
|
function FocusTrap_unsupported_iterable_to_array(o, minLen) {
|
|
17238
17469
|
if (!o) return;
|
|
17239
17470
|
if (typeof o === "string") return FocusTrap_array_like_to_array(o, minLen);
|
|
@@ -17247,6 +17478,7 @@ function FocusTrap_unsupported_iterable_to_array(o, minLen) {
|
|
|
17247
17478
|
|
|
17248
17479
|
|
|
17249
17480
|
|
|
17481
|
+
|
|
17250
17482
|
var FOCUSABLE_ELEMENTS = FOCUSABLE_ELEMENTS_LIST.join();
|
|
17251
17483
|
/**
|
|
17252
17484
|
* @see https://vkcom.github.io/VKUI/#/FocusTrap
|
|
@@ -17269,7 +17501,9 @@ var FOCUSABLE_ELEMENTS = FOCUSABLE_ELEMENTS_LIST.join();
|
|
|
17269
17501
|
var focusNodeByIndex = function(nodeIndex) {
|
|
17270
17502
|
var element = focusableNodesRef.current[nodeIndex];
|
|
17271
17503
|
if (element) {
|
|
17272
|
-
element.focus(
|
|
17504
|
+
element.focus({
|
|
17505
|
+
preventScroll: true
|
|
17506
|
+
});
|
|
17273
17507
|
}
|
|
17274
17508
|
};
|
|
17275
17509
|
var recalculateFocusableNodesRef = function(parentNode) {
|
|
@@ -17289,7 +17523,11 @@ var FOCUSABLE_ELEMENTS = FOCUSABLE_ELEMENTS_LIST.join();
|
|
|
17289
17523
|
focusableNodesRef.current = nodes;
|
|
17290
17524
|
};
|
|
17291
17525
|
var onMutateParentHandler = function(parentNode) {
|
|
17526
|
+
var oldFocusableNodes = FocusTrap_to_consumable_array(focusableNodesRef.current);
|
|
17292
17527
|
recalculateFocusableNodesRef(parentNode);
|
|
17528
|
+
if (arraysEquals(oldFocusableNodes, focusableNodesRef.current)) {
|
|
17529
|
+
return;
|
|
17530
|
+
}
|
|
17293
17531
|
if (document) {
|
|
17294
17532
|
var activeElement = document.activeElement;
|
|
17295
17533
|
var currentElementIndex = Math.max(document.activeElement ? focusableNodesRef.current.indexOf(activeElement) : -1, 0);
|
|
@@ -19542,93 +19780,6 @@ function ScreenSpinner_object_without_properties_loose(source, excluded) {
|
|
|
19542
19780
|
}, /*#__PURE__*/ React.createElement(Icon, null))));
|
|
19543
19781
|
};
|
|
19544
19782
|
|
|
19545
|
-
;// CONCATENATED MODULE: ./src/hooks/useFocusWithin.ts
|
|
19546
|
-
function useFocusWithin_array_like_to_array(arr, len) {
|
|
19547
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
19548
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
19549
|
-
return arr2;
|
|
19550
|
-
}
|
|
19551
|
-
function useFocusWithin_array_with_holes(arr) {
|
|
19552
|
-
if (Array.isArray(arr)) return arr;
|
|
19553
|
-
}
|
|
19554
|
-
function useFocusWithin_iterable_to_array_limit(arr, i) {
|
|
19555
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
19556
|
-
if (_i == null) return;
|
|
19557
|
-
var _arr = [];
|
|
19558
|
-
var _n = true;
|
|
19559
|
-
var _d = false;
|
|
19560
|
-
var _s, _e;
|
|
19561
|
-
try {
|
|
19562
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
19563
|
-
_arr.push(_s.value);
|
|
19564
|
-
if (i && _arr.length === i) break;
|
|
19565
|
-
}
|
|
19566
|
-
} catch (err) {
|
|
19567
|
-
_d = true;
|
|
19568
|
-
_e = err;
|
|
19569
|
-
} finally{
|
|
19570
|
-
try {
|
|
19571
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
19572
|
-
} finally{
|
|
19573
|
-
if (_d) throw _e;
|
|
19574
|
-
}
|
|
19575
|
-
}
|
|
19576
|
-
return _arr;
|
|
19577
|
-
}
|
|
19578
|
-
function useFocusWithin_non_iterable_rest() {
|
|
19579
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
19580
|
-
}
|
|
19581
|
-
function useFocusWithin_sliced_to_array(arr, i) {
|
|
19582
|
-
return useFocusWithin_array_with_holes(arr) || useFocusWithin_iterable_to_array_limit(arr, i) || useFocusWithin_unsupported_iterable_to_array(arr, i) || useFocusWithin_non_iterable_rest();
|
|
19583
|
-
}
|
|
19584
|
-
function useFocusWithin_unsupported_iterable_to_array(o, minLen) {
|
|
19585
|
-
if (!o) return;
|
|
19586
|
-
if (typeof o === "string") return useFocusWithin_array_like_to_array(o, minLen);
|
|
19587
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
19588
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
19589
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
19590
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return useFocusWithin_array_like_to_array(o, minLen);
|
|
19591
|
-
}
|
|
19592
|
-
|
|
19593
|
-
|
|
19594
|
-
|
|
19595
|
-
var isFocusWithin = function(ref, document) {
|
|
19596
|
-
return ref.contains(document.activeElement);
|
|
19597
|
-
};
|
|
19598
|
-
function useFocusWithin_useFocusWithin(ref) {
|
|
19599
|
-
var document = dom_useDOM().document;
|
|
19600
|
-
var _React_useState = useFocusWithin_sliced_to_array(react.useState(function() {
|
|
19601
|
-
return ref.current && document ? isFocusWithin(ref.current, document) : false;
|
|
19602
|
-
}), 2), focusWithin = _React_useState[0], setFocusWithin = _React_useState[1];
|
|
19603
|
-
useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(function handleAutoFocus() {
|
|
19604
|
-
/* istanbul ignore if: невозможный кейс, т.к. в SSR эффекты не вызываются. Проверка на будущее, если вдруг эффект будет вызываться. */ if (!document) {
|
|
19605
|
-
return;
|
|
19606
|
-
}
|
|
19607
|
-
var handleFocusOrBlurEvents = function() {
|
|
19608
|
-
if (ref.current) {
|
|
19609
|
-
setFocusWithin(isFocusWithin(ref.current, document));
|
|
19610
|
-
}
|
|
19611
|
-
};
|
|
19612
|
-
// Вызываем в начале, чтобы проверить autoFocus
|
|
19613
|
-
void handleFocusOrBlurEvents();
|
|
19614
|
-
document.addEventListener('focus', handleFocusOrBlurEvents, {
|
|
19615
|
-
capture: true
|
|
19616
|
-
});
|
|
19617
|
-
document.addEventListener('blur', handleFocusOrBlurEvents, {
|
|
19618
|
-
capture: true
|
|
19619
|
-
});
|
|
19620
|
-
return function() {
|
|
19621
|
-
document.removeEventListener('focus', handleFocusOrBlurEvents, {
|
|
19622
|
-
capture: true
|
|
19623
|
-
});
|
|
19624
|
-
document.removeEventListener('blur', handleFocusOrBlurEvents, {
|
|
19625
|
-
capture: true
|
|
19626
|
-
});
|
|
19627
|
-
};
|
|
19628
|
-
}, []);
|
|
19629
|
-
return focusWithin;
|
|
19630
|
-
}
|
|
19631
|
-
|
|
19632
19783
|
;// CONCATENATED MODULE: ./src/hooks/useGlobalEscKeyDown.ts
|
|
19633
19784
|
|
|
19634
19785
|
|
|
@@ -19845,6 +19996,7 @@ function utils_object_spread_props(target, source) {
|
|
|
19845
19996
|
return target;
|
|
19846
19997
|
}
|
|
19847
19998
|
|
|
19999
|
+
|
|
19848
20000
|
function resolveOffsetYCssStyle(placement, style, offsetY) {
|
|
19849
20001
|
if (offsetY === undefined) {
|
|
19850
20002
|
return style;
|
|
@@ -19864,9 +20016,10 @@ function resolveOffsetYCssStyle(placement, style, offsetY) {
|
|
|
19864
20016
|
});
|
|
19865
20017
|
}
|
|
19866
20018
|
}
|
|
19867
|
-
function getInitialShiftData(width, height) {
|
|
20019
|
+
function getInitialShiftData(width, height, mediaQueries) {
|
|
19868
20020
|
return {
|
|
19869
20021
|
shifted: false,
|
|
20022
|
+
isDesktop: mediaQueries.smallTabletPlus.matches,
|
|
19870
20023
|
x: 0,
|
|
19871
20024
|
y: 0,
|
|
19872
20025
|
width: width,
|
|
@@ -19874,27 +20027,20 @@ function getInitialShiftData(width, height) {
|
|
|
19874
20027
|
};
|
|
19875
20028
|
}
|
|
19876
20029
|
function getMovedShiftData(placement, shiftData, nextShift) {
|
|
19877
|
-
|
|
19878
|
-
|
|
19879
|
-
case 'bottom-start':
|
|
20030
|
+
/* istanbul ignore else: TODO чтобы протестировать кейс в блоке else, нужно мокать useMediaQueries(), чтобы перебивать mediaQueries.smallTabletPlus.matches */ if (shiftData.isDesktop) {
|
|
20031
|
+
if (placement.endsWith('start')) {
|
|
19880
20032
|
shiftData.x = rubberbandIfOutOfBounds(nextShift.x, -shiftData.width, 0);
|
|
19881
|
-
|
|
19882
|
-
case 'top-end':
|
|
19883
|
-
case 'bottom-end':
|
|
20033
|
+
} else if (placement.endsWith('end')) {
|
|
19884
20034
|
shiftData.x = rubberbandIfOutOfBounds(nextShift.x, 0, shiftData.width);
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
switch(placement){
|
|
19888
|
-
case 'top-start':
|
|
19889
|
-
case 'top':
|
|
19890
|
-
case 'top-end':
|
|
19891
|
-
shiftData.y = rubberbandIfOutOfBounds(nextShift.y, -shiftData.height, 0);
|
|
19892
|
-
break;
|
|
19893
|
-
case 'bottom-start':
|
|
19894
|
-
case 'bottom':
|
|
19895
|
-
case 'bottom-end':
|
|
20035
|
+
}
|
|
20036
|
+
if (placement.startsWith('bottom')) {
|
|
19896
20037
|
shiftData.y = rubberbandIfOutOfBounds(nextShift.y, 0, shiftData.height);
|
|
19897
|
-
|
|
20038
|
+
}
|
|
20039
|
+
} else if (placement.startsWith('bottom')) {
|
|
20040
|
+
shiftData.x = rubberbandIfOutOfBounds(nextShift.x, -shiftData.width, 0);
|
|
20041
|
+
}
|
|
20042
|
+
if (placement.startsWith('top')) {
|
|
20043
|
+
shiftData.y = rubberbandIfOutOfBounds(nextShift.y, -shiftData.height, 0);
|
|
19898
20044
|
}
|
|
19899
20045
|
shiftData.shifted = true;
|
|
19900
20046
|
return shiftData;
|
|
@@ -19912,31 +20058,25 @@ function shouldBeClosedByShiftData(placement, shiftData, relativeClientRect, vel
|
|
|
19912
20058
|
x: false,
|
|
19913
20059
|
y: false
|
|
19914
20060
|
};
|
|
19915
|
-
|
|
19916
|
-
|
|
19917
|
-
case 'bottom-start':
|
|
20061
|
+
/* istanbul ignore else: TODO чтобы протестировать кейс в блоке else, нужно мокать useMediaQueries(), чтобы перебивать mediaQueries.smallTabletPlus.matches */ if (shiftData.isDesktop) {
|
|
20062
|
+
if (placement.endsWith('start')) {
|
|
19918
20063
|
shouldBeClosedThreshold.x = relativeClientRect.x < -relativeClientRect.width / 2;
|
|
19919
|
-
shouldBeClosedByVelocity.x = velocity.x < -MINIMUM_PAN_GESTURE_FOR_TRIGGER_CLOSE;
|
|
19920
|
-
|
|
19921
|
-
case 'top-end':
|
|
19922
|
-
case 'bottom-end':
|
|
20064
|
+
shouldBeClosedByVelocity.x = relativeClientRect.x < 0 ? velocity.x < -MINIMUM_PAN_GESTURE_FOR_TRIGGER_CLOSE : false;
|
|
20065
|
+
} else if (placement.endsWith('end')) {
|
|
19923
20066
|
shouldBeClosedThreshold.x = relativeClientRect.x > relativeClientRect.width / 2;
|
|
19924
|
-
shouldBeClosedByVelocity.x = velocity.x > MINIMUM_PAN_GESTURE_FOR_TRIGGER_CLOSE;
|
|
19925
|
-
|
|
19926
|
-
|
|
19927
|
-
switch(placement){
|
|
19928
|
-
case 'top-start':
|
|
19929
|
-
case 'top':
|
|
19930
|
-
case 'top-end':
|
|
19931
|
-
shouldBeClosedThreshold.y = relativeClientRect.y < -relativeClientRect.height / 2;
|
|
19932
|
-
shouldBeClosedByVelocity.y = velocity.y < -MINIMUM_PAN_GESTURE_FOR_TRIGGER_CLOSE;
|
|
19933
|
-
break;
|
|
19934
|
-
case 'bottom-start':
|
|
19935
|
-
case 'bottom':
|
|
19936
|
-
case 'bottom-end':
|
|
20067
|
+
shouldBeClosedByVelocity.x = relativeClientRect.x > 0 ? velocity.x > MINIMUM_PAN_GESTURE_FOR_TRIGGER_CLOSE : false;
|
|
20068
|
+
}
|
|
20069
|
+
if (placement.startsWith('bottom')) {
|
|
19937
20070
|
shouldBeClosedThreshold.y = relativeClientRect.y > relativeClientRect.height / 2;
|
|
19938
|
-
shouldBeClosedByVelocity.y = velocity.y > MINIMUM_PAN_GESTURE_FOR_TRIGGER_CLOSE;
|
|
19939
|
-
|
|
20071
|
+
shouldBeClosedByVelocity.y = relativeClientRect.y > 0 ? velocity.y > MINIMUM_PAN_GESTURE_FOR_TRIGGER_CLOSE : false;
|
|
20072
|
+
}
|
|
20073
|
+
} else if (placement.startsWith('bottom')) {
|
|
20074
|
+
shouldBeClosedThreshold.x = relativeClientRect.x < -relativeClientRect.width / 2;
|
|
20075
|
+
shouldBeClosedByVelocity.x = relativeClientRect.x < 0 ? velocity.x < -MINIMUM_PAN_GESTURE_FOR_TRIGGER_CLOSE : false;
|
|
20076
|
+
}
|
|
20077
|
+
if (placement.startsWith('top')) {
|
|
20078
|
+
shouldBeClosedThreshold.y = relativeClientRect.y < -relativeClientRect.height / 2;
|
|
20079
|
+
shouldBeClosedByVelocity.y = relativeClientRect.y < 0 ? velocity.y < -MINIMUM_PAN_GESTURE_FOR_TRIGGER_CLOSE : false;
|
|
19940
20080
|
}
|
|
19941
20081
|
return shouldBeClosedThreshold.x || shouldBeClosedByVelocity.x || shouldBeClosedThreshold.y || /* istanbul ignore next: подсвечивает жёлтым и пишет "branch not covered" */ shouldBeClosedByVelocity.y;
|
|
19942
20082
|
}
|
|
@@ -20085,6 +20225,7 @@ function Snackbar_unsupported_iterable_to_array(o, minLen) {
|
|
|
20085
20225
|
|
|
20086
20226
|
|
|
20087
20227
|
|
|
20228
|
+
|
|
20088
20229
|
var Snackbar_placementClassNames = {
|
|
20089
20230
|
'top-start': "vkuiSnackbar--placement-top-start",
|
|
20090
20231
|
'top': "vkuiSnackbar--placement-top",
|
|
@@ -20130,6 +20271,7 @@ var animationStateClassNames = {
|
|
|
20130
20271
|
var shiftDataRef = react.useRef(null);
|
|
20131
20272
|
var rafRef = react.useRef(null);
|
|
20132
20273
|
var closeTimeoutIdRef = react.useRef();
|
|
20274
|
+
var mediaQueries = useMediaQueries_useMediaQueries();
|
|
20133
20275
|
var _useCSSKeyframesAnimationController = Snackbar_sliced_to_array(useCSSKeyframesAnimationController_useCSSKeyframesAnimationController(open ? 'enter' : 'exit', {
|
|
20134
20276
|
onExited: onClose
|
|
20135
20277
|
}), 2), animationState = _useCSSKeyframesAnimationController[0], animationHandlers = _useCSSKeyframesAnimationController[1];
|
|
@@ -20161,7 +20303,7 @@ var animationStateClassNames = {
|
|
|
20161
20303
|
var handleTouchStart = function(event) {
|
|
20162
20304
|
panGestureRecognizer.current = new UIPanGestureRecognizer();
|
|
20163
20305
|
panGestureRecognizer.current.setStartCoords(event.nativeEvent);
|
|
20164
|
-
shiftDataRef.current = getInitialShiftData(rootRef.current.offsetWidth, rootRef.current.offsetHeight);
|
|
20306
|
+
shiftDataRef.current = getInitialShiftData(rootRef.current.offsetWidth, rootRef.current.offsetHeight, mediaQueries);
|
|
20165
20307
|
setTouched(true);
|
|
20166
20308
|
};
|
|
20167
20309
|
var handleTouchMove = function(event) {
|
|
@@ -29070,7 +29212,7 @@ var GridAvatar_warn = warnOnce('GridAvatar');
|
|
|
29070
29212
|
"aria-hidden": true
|
|
29071
29213
|
}, src.map(function(url, index) {
|
|
29072
29214
|
return index < MAX_GRID_LENGTH ? /*#__PURE__*/ React.createElement("div", {
|
|
29073
|
-
key:
|
|
29215
|
+
key: index,
|
|
29074
29216
|
className: "vkuiGridAvatar__item",
|
|
29075
29217
|
style: {
|
|
29076
29218
|
backgroundImage: "url(".concat(url, ")")
|
|
@@ -35206,12 +35348,11 @@ function constants_getNewOptionDataDefault(value, label) {
|
|
|
35206
35348
|
};
|
|
35207
35349
|
}
|
|
35208
35350
|
function constants_renderChipDefault(props) {
|
|
35209
|
-
var
|
|
35210
|
-
"disabled",
|
|
35351
|
+
var label = props.label, rest = constants_object_without_properties(props, [
|
|
35211
35352
|
"label"
|
|
35212
35353
|
]);
|
|
35213
35354
|
return /*#__PURE__*/ React.createElement(Chip, constants_object_spread({
|
|
35214
|
-
removable: !disabled
|
|
35355
|
+
removable: !props.disabled
|
|
35215
35356
|
}, rest), label);
|
|
35216
35357
|
}
|
|
35217
35358
|
|
|
@@ -35540,9 +35681,7 @@ var ChipsInputBase_ChipsInputBase = function(_param) {
|
|
|
35540
35681
|
if (contains(event.currentTarget, getActiveElementByAnotherElement(event.currentTarget))) {
|
|
35541
35682
|
return;
|
|
35542
35683
|
}
|
|
35543
|
-
if (
|
|
35544
|
-
moveFocusToChipOption(0, 'first', listboxRef.current);
|
|
35545
|
-
} else if (inputRef.current) {
|
|
35684
|
+
if (inputRef.current) {
|
|
35546
35685
|
inputRef.current.focus();
|
|
35547
35686
|
}
|
|
35548
35687
|
};
|
|
@@ -35573,8 +35712,8 @@ var ChipsInputBase_ChipsInputBase = function(_param) {
|
|
|
35573
35712
|
'Component': 'div',
|
|
35574
35713
|
'value': option.value,
|
|
35575
35714
|
'label': option.label,
|
|
35576
|
-
'disabled': disabled,
|
|
35577
|
-
'readOnly': readOnly,
|
|
35715
|
+
'disabled': option.disabled || disabled,
|
|
35716
|
+
'readOnly': option.readOnly || readOnly,
|
|
35578
35717
|
'className': "vkuiChipsInputBase__chip",
|
|
35579
35718
|
'onRemove': handleChipRemove,
|
|
35580
35719
|
// чтобы можно было легче найти этот чип в DOM
|
|
@@ -38877,6 +39016,9 @@ function Checkbox_object_without_properties_loose(source, excluded) {
|
|
|
38877
39016
|
|
|
38878
39017
|
|
|
38879
39018
|
|
|
39019
|
+
function setIndeterminate(el, indeterminate) {
|
|
39020
|
+
el.indeterminate = indeterminate;
|
|
39021
|
+
}
|
|
38880
39022
|
var Checkbox_sizeYClassNames = Checkbox_define_property({
|
|
38881
39023
|
none: "vkuiCheckbox--sizeY-none"
|
|
38882
39024
|
}, 'compact', "vkuiCheckbox--sizeY-compact");
|
|
@@ -38906,9 +39048,9 @@ var Checkbox_warn = warnOnce('Checkbox');
|
|
|
38906
39048
|
var _useAdaptivity = useAdaptivity(), _useAdaptivity_sizeY = _useAdaptivity.sizeY, sizeY = _useAdaptivity_sizeY === void 0 ? 'none' : _useAdaptivity_sizeY;
|
|
38907
39049
|
var _useAdaptivityConditionalRender = useAdaptivityConditionalRender(), adaptiveSizeY = _useAdaptivityConditionalRender.sizeY;
|
|
38908
39050
|
React.useEffect(function() {
|
|
38909
|
-
var indeterminateValue = indeterminate
|
|
39051
|
+
var indeterminateValue = indeterminate !== null && indeterminate !== void 0 ? indeterminate : Boolean(defaultIndeterminate);
|
|
38910
39052
|
if (inputRef.current) {
|
|
38911
|
-
inputRef.current
|
|
39053
|
+
setIndeterminate(inputRef.current, indeterminateValue);
|
|
38912
39054
|
}
|
|
38913
39055
|
}, [
|
|
38914
39056
|
defaultIndeterminate,
|
|
@@ -38916,19 +39058,18 @@ var Checkbox_warn = warnOnce('Checkbox');
|
|
|
38916
39058
|
inputRef
|
|
38917
39059
|
]);
|
|
38918
39060
|
var handleChange = React.useCallback(function(event) {
|
|
38919
|
-
if (defaultIndeterminate !== undefined && indeterminate === undefined && restProps.checked === undefined
|
|
38920
|
-
|
|
39061
|
+
if (defaultIndeterminate !== undefined && indeterminate === undefined && restProps.checked === undefined) {
|
|
39062
|
+
event.currentTarget.indeterminate = false;
|
|
38921
39063
|
}
|
|
38922
|
-
if (indeterminate !== undefined
|
|
38923
|
-
|
|
39064
|
+
if (indeterminate !== undefined) {
|
|
39065
|
+
event.currentTarget.indeterminate = indeterminate;
|
|
38924
39066
|
}
|
|
38925
39067
|
onChange && onChange(event);
|
|
38926
39068
|
}, [
|
|
38927
39069
|
defaultIndeterminate,
|
|
38928
39070
|
indeterminate,
|
|
38929
39071
|
restProps.checked,
|
|
38930
|
-
onChange
|
|
38931
|
-
inputRef
|
|
39072
|
+
onChange
|
|
38932
39073
|
]);
|
|
38933
39074
|
if (false) {}
|
|
38934
39075
|
return /*#__PURE__*/ React.createElement(Tappable, {
|
|
@@ -39632,7 +39773,7 @@ var CustomSelect_defaultOptions = (/* unused pure expression or super */ null &&
|
|
|
39632
39773
|
var scrollToElement = React.useCallback(function(index) {
|
|
39633
39774
|
var center = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
39634
39775
|
var dropdown = scrollBoxRef.current;
|
|
39635
|
-
var item = dropdown ? dropdown.children[index] : null;
|
|
39776
|
+
var item = dropdown && dropdown.firstElementChild ? dropdown.firstElementChild.children[index] : null;
|
|
39636
39777
|
if (!item || !dropdown) {
|
|
39637
39778
|
return;
|
|
39638
39779
|
}
|
|
@@ -39925,11 +40066,10 @@ var CustomSelect_defaultOptions = (/* unused pure expression or super */ null &&
|
|
|
39925
40066
|
x: 0,
|
|
39926
40067
|
y: 0
|
|
39927
40068
|
});
|
|
39928
|
-
var focusOptionOnMouseMove = React.useCallback(function(e) {
|
|
40069
|
+
var focusOptionOnMouseMove = React.useCallback(function(e, index) {
|
|
39929
40070
|
var isMouseChangedPosition = Math.abs(prevMousePositionRef.current.x - e.clientX) >= 1 || Math.abs(prevMousePositionRef.current.y - e.clientY) >= 1;
|
|
39930
40071
|
if (isMouseChangedPosition) {
|
|
39931
|
-
|
|
39932
|
-
focusOptionByIndex(Array.prototype.indexOf.call((_e_currentTarget_parentNode = e.currentTarget.parentNode) === null || _e_currentTarget_parentNode === void 0 ? void 0 : _e_currentTarget_parentNode.children, e.currentTarget), false);
|
|
40072
|
+
focusOptionByIndex(index, false);
|
|
39933
40073
|
}
|
|
39934
40074
|
prevMousePositionRef.current = {
|
|
39935
40075
|
x: e.clientX,
|
|
@@ -39959,7 +40099,9 @@ var CustomSelect_defaultOptions = (/* unused pure expression or super */ null &&
|
|
|
39959
40099
|
// Причём координаты события меняются на пару пикселей по сравнению с прошлым вызовом,
|
|
39960
40100
|
// а значит нельзя на них опираться, чтобы запретить обработку такого события.
|
|
39961
40101
|
// C mousemove такой проблемы нет, что позволяет реализовать поведение при наведении с клавиатуры и при наведении мышью идентично `<select>`.
|
|
39962
|
-
onMouseMove:
|
|
40102
|
+
onMouseMove: function(e) {
|
|
40103
|
+
return focusOptionOnMouseMove(e, index);
|
|
40104
|
+
},
|
|
39963
40105
|
id: "".concat(popupAriaId, "-").concat(option.value)
|
|
39964
40106
|
}));
|
|
39965
40107
|
}, [
|
|
@@ -45233,7 +45375,7 @@ function Popover_unsupported_iterable_to_array(o, minLen) {
|
|
|
45233
45375
|
* @see https://vkcom.github.io/VKUI/#/Popover
|
|
45234
45376
|
*/ var Popover = function(_param) {
|
|
45235
45377
|
var // UsePopoverProps
|
|
45236
|
-
withArrow = _param.arrow, _param_arrowHeight = _param.arrowHeight, arrowHeight = _param_arrowHeight === void 0 ? DEFAULT_ARROW_HEIGHT : _param_arrowHeight, _param_arrowPadding = _param.arrowPadding, arrowPadding = _param_arrowPadding === void 0 ? DEFAULT_ARROW_PADDING : _param_arrowPadding, tmp = _param.placement, expectedPlacement = tmp === void 0 ? 'bottom-start' : tmp, onPlacementChange = _param.onPlacementChange, _param_disableFlipMiddleware = _param.disableFlipMiddleware, disableFlipMiddleware = _param_disableFlipMiddleware === void 0 ? false : _param_disableFlipMiddleware, _param_trigger = _param.trigger, trigger = _param_trigger === void 0 ? 'click' : _param_trigger, content = _param.content, _param_hoverDelay = _param.hoverDelay, hoverDelay = _param_hoverDelay === void 0 ? 150 : _param_hoverDelay, closeAfterClick = _param.closeAfterClick, _param_offsetByMainAxis = _param.offsetByMainAxis, offsetByMainAxis = _param_offsetByMainAxis === void 0 ? 8 : _param_offsetByMainAxis, _param_offsetByCrossAxis = _param.offsetByCrossAxis, offsetByCrossAxis = _param_offsetByCrossAxis === void 0 ? 0 : _param_offsetByCrossAxis, sameWidth = _param.sameWidth, hideWhenReferenceHidden = _param.hideWhenReferenceHidden, disabled = _param.disabled, disableInteractive = _param.disableInteractive, disableCloseOnClickOutside = _param.disableCloseOnClickOutside, disableCloseOnEscKey = _param.disableCloseOnEscKey, _param_keepMounted = _param.keepMounted, keepMounted = _param_keepMounted === void 0 ? false : _param_keepMounted, _param_defaultShown = _param.// uncontrolled
|
|
45378
|
+
withArrow = _param.arrow, _param_arrowHeight = _param.arrowHeight, arrowHeight = _param_arrowHeight === void 0 ? DEFAULT_ARROW_HEIGHT : _param_arrowHeight, _param_arrowPadding = _param.arrowPadding, arrowPadding = _param_arrowPadding === void 0 ? DEFAULT_ARROW_PADDING : _param_arrowPadding, tmp = _param.placement, expectedPlacement = tmp === void 0 ? 'bottom-start' : tmp, onPlacementChange = _param.onPlacementChange, _param_disableFlipMiddleware = _param.disableFlipMiddleware, disableFlipMiddleware = _param_disableFlipMiddleware === void 0 ? false : _param_disableFlipMiddleware, _param_trigger = _param.trigger, trigger = _param_trigger === void 0 ? 'click' : _param_trigger, content = _param.content, _param_hoverDelay = _param.hoverDelay, hoverDelay = _param_hoverDelay === void 0 ? 150 : _param_hoverDelay, closeAfterClick = _param.closeAfterClick, _param_offsetByMainAxis = _param.offsetByMainAxis, offsetByMainAxis = _param_offsetByMainAxis === void 0 ? 8 : _param_offsetByMainAxis, _param_offsetByCrossAxis = _param.offsetByCrossAxis, offsetByCrossAxis = _param_offsetByCrossAxis === void 0 ? 0 : _param_offsetByCrossAxis, sameWidth = _param.sameWidth, hideWhenReferenceHidden = _param.hideWhenReferenceHidden, disabled = _param.disabled, disableInteractive = _param.disableInteractive, disableCloseOnClickOutside = _param.disableCloseOnClickOutside, disableCloseOnEscKey = _param.disableCloseOnEscKey, _param_keepMounted = _param.keepMounted, keepMounted = _param_keepMounted === void 0 ? false : _param_keepMounted, customMiddlewares = _param.customMiddlewares, _param_defaultShown = _param.// uncontrolled
|
|
45237
45379
|
defaultShown, defaultShown = _param_defaultShown === void 0 ? false : _param_defaultShown, // controlled
|
|
45238
45380
|
shownProp = _param.shown, onShownChange = _param.onShownChange, _param_usePortal = _param.// Для AppRootPortal
|
|
45239
45381
|
usePortal, usePortal = _param_usePortal === void 0 ? true : _param_usePortal, // Для FloatingArrow
|
|
@@ -45259,6 +45401,7 @@ function Popover_unsupported_iterable_to_array(o, minLen) {
|
|
|
45259
45401
|
"disableCloseOnClickOutside",
|
|
45260
45402
|
"disableCloseOnEscKey",
|
|
45261
45403
|
"keepMounted",
|
|
45404
|
+
"customMiddlewares",
|
|
45262
45405
|
"defaultShown",
|
|
45263
45406
|
"shown",
|
|
45264
45407
|
"onShownChange",
|
|
@@ -45284,7 +45427,8 @@ function Popover_unsupported_iterable_to_array(o, minLen) {
|
|
|
45284
45427
|
offsetByCrossAxis: offsetByCrossAxis,
|
|
45285
45428
|
sameWidth: sameWidth,
|
|
45286
45429
|
hideWhenReferenceHidden: hideWhenReferenceHidden,
|
|
45287
|
-
disableFlipMiddleware: disableFlipMiddleware
|
|
45430
|
+
disableFlipMiddleware: disableFlipMiddleware,
|
|
45431
|
+
customMiddlewares: customMiddlewares
|
|
45288
45432
|
}), middlewares = _useFloatingMiddlewaresBootstrap.middlewares, strictPlacement = _useFloatingMiddlewaresBootstrap.strictPlacement;
|
|
45289
45433
|
var _useFloatingWithInteractions = useFloatingWithInteractions({
|
|
45290
45434
|
middlewares: middlewares,
|