@ultraviolet/ui 1.26.1 → 1.26.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/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { ReactNode, ComponentProps, ButtonHTMLAttributes, AriaRole, MouseEventHandler, JSX, MouseEvent, InputHTMLAttributes, HTMLAttributeAnchorTarget, AnchorHTMLAttributes, ReactElement, Ref, RefObject, KeyboardEventHandler, HTMLAttributes, CSSProperties, ChangeEventHandler, FocusEventHandler, ForwardRefExoticComponent, ForwardedRef, ElementType, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
import react__default, { ReactNode, ComponentProps, ButtonHTMLAttributes, AriaRole, MouseEventHandler, JSX, MouseEvent, InputHTMLAttributes, FocusEvent, HTMLAttributeAnchorTarget, AnchorHTMLAttributes, ReactElement, Ref, RefObject, KeyboardEventHandler, HTMLAttributes, CSSProperties, ChangeEventHandler, FocusEventHandler, ForwardRefExoticComponent, ForwardedRef, ElementType, TextareaHTMLAttributes } from 'react';
|
|
3
3
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
4
4
|
import * as _emotion_styled from '@emotion/styled';
|
|
5
5
|
import * as _emotion_react from '@emotion/react';
|
|
@@ -1382,8 +1382,16 @@ type CopyButtonProps = {
|
|
|
1382
1382
|
*/
|
|
1383
1383
|
declare const CopyButton: ({ size, value, copyText, copiedText, sentiment, noBorder, className, "data-testid": dataTestId, }: CopyButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1384
1384
|
|
|
1385
|
-
type DateInputProps = Pick<ReactDatePickerProps<string, boolean>, '
|
|
1385
|
+
type DateInputProps = Pick<ReactDatePickerProps<string, boolean>, 'locale' | 'onChange'> & {
|
|
1386
|
+
autoFocus?: boolean;
|
|
1387
|
+
disabled?: boolean;
|
|
1388
|
+
maxDate?: Date | null;
|
|
1389
|
+
minDate?: Date | null;
|
|
1390
|
+
name?: string;
|
|
1391
|
+
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
1392
|
+
onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
1386
1393
|
error?: string;
|
|
1394
|
+
required?: boolean;
|
|
1387
1395
|
format?: (value?: Date | string) => string | undefined;
|
|
1388
1396
|
/**
|
|
1389
1397
|
* Label of the field
|
|
@@ -28,49 +28,44 @@ const StyledBeforeScroll = /*#__PURE__*/_styled("span", {
|
|
|
28
28
|
}, "\n );cursor:w-resize;z-index:auto;");
|
|
29
29
|
const StyledScrollableWrapper = /*#__PURE__*/_styled("div", {
|
|
30
30
|
target: "e1id70w02"
|
|
31
|
-
})("overflow-x:scroll;overflow-y:hidden;white-space:nowrap;display:flex;padding:", _ref3 => {
|
|
31
|
+
})("overflow-x:scroll;overflow-y:hidden;white-space:nowrap;display:flex;padding:0 100px;gap:", _ref3 => {
|
|
32
32
|
let {
|
|
33
33
|
theme
|
|
34
34
|
} = _ref3;
|
|
35
35
|
return theme.space['2'];
|
|
36
|
-
}, " 100px;gap:", _ref4 => {
|
|
37
|
-
let {
|
|
38
|
-
theme
|
|
39
|
-
} = _ref4;
|
|
40
|
-
return theme.space['2'];
|
|
41
36
|
}, ";");
|
|
42
37
|
const StyledAfterScroll = /*#__PURE__*/_styled("span", {
|
|
43
38
|
target: "e1id70w01"
|
|
44
|
-
})("position:absolute;bottom:0;right:0;width:100px;height:100%;content:'';cursor:e-resize;z-index:auto;background:linear-gradient(\n -90deg,\n ",
|
|
39
|
+
})("position:absolute;bottom:0;right:0;width:100px;height:100%;content:'';cursor:e-resize;z-index:auto;background:linear-gradient(\n -90deg,\n ", _ref4 => {
|
|
45
40
|
let {
|
|
46
41
|
theme
|
|
47
|
-
} =
|
|
42
|
+
} = _ref4;
|
|
48
43
|
return theme.colors.neutral.background;
|
|
49
|
-
}, ",\n ",
|
|
44
|
+
}, ",\n ", _ref5 => {
|
|
50
45
|
let {
|
|
51
46
|
theme
|
|
52
|
-
} =
|
|
47
|
+
} = _ref5;
|
|
53
48
|
return theme.colors.neutral.background;
|
|
54
49
|
}, "ff\n );");
|
|
55
50
|
const StyledBorderWrapper = /*#__PURE__*/_styled('div', {
|
|
56
51
|
shouldForwardProp: prop => !['width'].includes(prop),
|
|
57
52
|
target: "e1id70w00"
|
|
58
|
-
})("display:flex;align-items:stretch;width:",
|
|
53
|
+
})("display:flex;align-items:stretch;width:", _ref6 => {
|
|
59
54
|
let {
|
|
60
55
|
width
|
|
61
|
-
} =
|
|
56
|
+
} = _ref6;
|
|
62
57
|
return width;
|
|
63
|
-
}, ";max-width:",
|
|
58
|
+
}, ";max-width:", _ref7 => {
|
|
64
59
|
let {
|
|
65
60
|
width
|
|
66
|
-
} =
|
|
61
|
+
} = _ref7;
|
|
67
62
|
return width;
|
|
68
63
|
}, ";overflow-wrap:break-word;white-space:normal;height:auto;cursor:grab;flex-shrink:0;");
|
|
69
|
-
const CarouselItem =
|
|
64
|
+
const CarouselItem = _ref8 => {
|
|
70
65
|
let {
|
|
71
66
|
children,
|
|
72
67
|
width = '240px'
|
|
73
|
-
} =
|
|
68
|
+
} = _ref8;
|
|
74
69
|
return jsx(StyledBorderWrapper, {
|
|
75
70
|
width: width,
|
|
76
71
|
draggable: "true",
|
|
@@ -80,12 +75,12 @@ const CarouselItem = _ref9 => {
|
|
|
80
75
|
/**
|
|
81
76
|
* Carousel component allows you to scroll horizontally through a list of items.
|
|
82
77
|
*/
|
|
83
|
-
const Carousel =
|
|
78
|
+
const Carousel = _ref9 => {
|
|
84
79
|
let {
|
|
85
80
|
children,
|
|
86
81
|
className,
|
|
87
82
|
'data-testid': dataTestId = 'scrollbar'
|
|
88
|
-
} =
|
|
83
|
+
} = _ref9;
|
|
89
84
|
const scrollRef = useRef(null);
|
|
90
85
|
let intervalLeft;
|
|
91
86
|
let intervalRight;
|
|
@@ -18,6 +18,7 @@ const computePlacement = _ref => {
|
|
|
18
18
|
childrenStructuredRef,
|
|
19
19
|
popupStructuredRef,
|
|
20
20
|
offsetParentRect,
|
|
21
|
+
offsetParent,
|
|
21
22
|
popupPortalTarget
|
|
22
23
|
} = _ref;
|
|
23
24
|
const {
|
|
@@ -30,9 +31,10 @@ const computePlacement = _ref => {
|
|
|
30
31
|
left: parentLeft,
|
|
31
32
|
right: parentRight
|
|
32
33
|
} = offsetParentRect;
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
34
|
+
const isPopupPortalTargetBody = popupPortalTarget === document.body || offsetParent === document.body;
|
|
35
|
+
const overloadedChildrenLeft = isPopupPortalTargetBody ? childrenLeft : childrenLeft - parentLeft;
|
|
36
|
+
const overloadedChildrenTop = isPopupPortalTargetBody ? childrenTop : childrenTop - parentTop;
|
|
37
|
+
const overloadedChildrenRight = isPopupPortalTargetBody ? childrenRight : childrenRight - parentRight;
|
|
36
38
|
const {
|
|
37
39
|
width: popupWidth,
|
|
38
40
|
height: popupHeight
|
|
@@ -99,7 +101,8 @@ const computePositions = _ref2 => {
|
|
|
99
101
|
childrenStructuredRef: childrenRect,
|
|
100
102
|
popupStructuredRef,
|
|
101
103
|
offsetParentRect,
|
|
102
|
-
popupPortalTarget
|
|
104
|
+
popupPortalTarget,
|
|
105
|
+
offsetParent
|
|
103
106
|
}) : placement;
|
|
104
107
|
const {
|
|
105
108
|
top: childrenTop,
|
|
@@ -122,7 +125,7 @@ const computePositions = _ref2 => {
|
|
|
122
125
|
const isPopupPortalTargetBody = popupPortalTarget === document.body || offsetParent === document.body;
|
|
123
126
|
|
|
124
127
|
// It will get how much scroll is done on the page to compute the position of the popup
|
|
125
|
-
const scrollTopValue = isPopupPortalTargetBody ? document.documentElement.scrollTop :
|
|
128
|
+
const scrollTopValue = isPopupPortalTargetBody ? document.documentElement.scrollTop : offsetParent.scrollTop;
|
|
126
129
|
|
|
127
130
|
// We need to compute the position of the popup based on the parent element in the case the popup is not in the body
|
|
128
131
|
const overloadedChildrenLeft = isPopupPortalTargetBody ? childrenLeft : childrenLeft - parentLeft;
|