@vchasno/ui-kit 0.3.12 → 0.3.13
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/Datepicker/index.cjs.js +8707 -8616
- package/dist/Datepicker/index.cjs.js.map +1 -1
- package/dist/Datepicker/index.d.ts +6 -6
- package/dist/Datepicker/index.js +9135 -9044
- package/dist/Datepicker/index.js.map +1 -1
- package/dist/Datepicker/types/components/Datepicker/DatePicker.d.ts +3 -3
- package/dist/Menu/types/components/Datepicker/DatePicker.d.ts +3 -3
- package/dist/ProjectsPopover/types/components/Datepicker/DatePicker.d.ts +3 -3
- package/dist/Select/index.cjs.js +19 -6
- package/dist/Select/index.cjs.js.map +1 -1
- package/dist/Select/index.js +19 -6
- package/dist/Select/index.js.map +1 -1
- package/dist/Select/types/components/Datepicker/DatePicker.d.ts +3 -3
- package/dist/SelectCreatable/index.cjs.js +19 -6
- package/dist/SelectCreatable/index.cjs.js.map +1 -1
- package/dist/SelectCreatable/index.js +19 -6
- package/dist/SelectCreatable/index.js.map +1 -1
- package/dist/SelectCreatable/types/components/Datepicker/DatePicker.d.ts +3 -3
- package/dist/Snackbar/index.cjs.js +1 -1
- package/dist/Snackbar/index.js +1 -1
- package/dist/Snackbar/types/components/Datepicker/DatePicker.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/types/components/Datepicker/DatePicker.d.ts +3 -3
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ReactDatePickerProps } from 'react-datepicker';
|
|
3
3
|
import { MaskedInputProps } from 'react-text-mask';
|
|
4
4
|
import type { ErrorFeedback, LoadingFeedback, WithHint } from '../types';
|
|
5
5
|
import './DatePicker.global.css';
|
|
6
|
-
export
|
|
6
|
+
export interface DatePickerProps extends ReactDatePickerProps, Partial<LoadingFeedback & WithHint & ErrorFeedback> {
|
|
7
7
|
label?: string;
|
|
8
8
|
className?: string;
|
|
9
9
|
showMask?: boolean;
|
|
@@ -11,7 +11,7 @@ export type DatePickerProps = {
|
|
|
11
11
|
onChange: ReactDatePickerProps['onChange'];
|
|
12
12
|
isClearable: ReactDatePickerProps['isClearable'];
|
|
13
13
|
dateFormat?: ReactDatePickerProps['dateFormat'];
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
15
|
/**
|
|
16
16
|
* @see <https://reactdatepicker.com/>
|
|
17
17
|
*/
|
|
@@ -3163,12 +3163,21 @@ const createCoords = v => ({
|
|
|
3163
3163
|
y: v
|
|
3164
3164
|
});
|
|
3165
3165
|
function rectToClientRect(rect) {
|
|
3166
|
+
const {
|
|
3167
|
+
x,
|
|
3168
|
+
y,
|
|
3169
|
+
width,
|
|
3170
|
+
height
|
|
3171
|
+
} = rect;
|
|
3166
3172
|
return {
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3173
|
+
width,
|
|
3174
|
+
height,
|
|
3175
|
+
top: y,
|
|
3176
|
+
left: x,
|
|
3177
|
+
right: x + width,
|
|
3178
|
+
bottom: y + height,
|
|
3179
|
+
x,
|
|
3180
|
+
y
|
|
3172
3181
|
};
|
|
3173
3182
|
}
|
|
3174
3183
|
|
|
@@ -3261,10 +3270,14 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
3261
3270
|
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
3262
3271
|
const win = getWindow(scrollableAncestor);
|
|
3263
3272
|
if (isBody) {
|
|
3264
|
-
|
|
3273
|
+
const frameElement = getFrameElement(win);
|
|
3274
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
3265
3275
|
}
|
|
3266
3276
|
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
3267
3277
|
}
|
|
3278
|
+
function getFrameElement(win) {
|
|
3279
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
3280
|
+
}
|
|
3268
3281
|
|
|
3269
3282
|
function getCssDimensions(element) {
|
|
3270
3283
|
const css = getComputedStyle$1(element);
|