@ultraviolet/ui 1.18.0 → 1.19.0
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 +15 -3
- package/dist/src/components/Carousel/index.js +18 -35
- package/dist/src/components/MenuV2/index.js +1 -1
- package/dist/src/components/Modal/Disclosure.js +3 -1
- package/dist/src/components/Modal/index.js +3 -1
- package/dist/src/components/Popover/index.js +1 -1
- package/dist/src/{internalComponents → components}/Popup/index.js +5 -2
- package/dist/src/components/Tooltip/index.js +1 -1
- package/dist/src/index.js +1 -0
- package/package.json +2 -2
- /package/dist/src/{internalComponents → components}/Popup/helpers.js +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1117,6 +1117,7 @@ declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttribu
|
|
|
1117
1117
|
|
|
1118
1118
|
type CarouselItemProps = {
|
|
1119
1119
|
children: ReactNode;
|
|
1120
|
+
width?: string;
|
|
1120
1121
|
};
|
|
1121
1122
|
type CarouselProps = {
|
|
1122
1123
|
className?: string;
|
|
@@ -1128,7 +1129,7 @@ type CarouselProps = {
|
|
|
1128
1129
|
*/
|
|
1129
1130
|
declare const Carousel: {
|
|
1130
1131
|
({ children, className, "data-testid": dataTestId, }: CarouselProps): JSX.Element;
|
|
1131
|
-
Item: ({ children }: CarouselItemProps) => JSX.Element;
|
|
1132
|
+
Item: ({ children, width, }: CarouselItemProps) => JSX.Element;
|
|
1132
1133
|
};
|
|
1133
1134
|
|
|
1134
1135
|
type CheckboxProps = {
|
|
@@ -1494,15 +1495,23 @@ declare const Meter: ({ strength, title, value, className, "data-testid": dataTe
|
|
|
1494
1495
|
type ModalSize = 'large' | 'medium' | 'small' | 'xsmall' | 'xxsmall';
|
|
1495
1496
|
type ModalPlacement = 'bottom' | 'bottom-left' | 'bottom-right' | 'center' | 'top' | 'top-left' | 'top-right' | 'right' | 'left';
|
|
1496
1497
|
type ModalState = {
|
|
1498
|
+
/**
|
|
1499
|
+
* @deprecated use show
|
|
1500
|
+
*/
|
|
1497
1501
|
onOpen: () => void;
|
|
1502
|
+
/**
|
|
1503
|
+
* @deprecated use close
|
|
1504
|
+
*/
|
|
1498
1505
|
onClose: () => void;
|
|
1499
1506
|
toggle: () => void;
|
|
1500
1507
|
visible: boolean;
|
|
1501
1508
|
modalId: string;
|
|
1502
1509
|
/**
|
|
1503
|
-
* @deprecated use
|
|
1510
|
+
* @deprecated use close
|
|
1504
1511
|
*/
|
|
1505
1512
|
hide: () => void;
|
|
1513
|
+
close: () => void;
|
|
1514
|
+
show: () => void;
|
|
1506
1515
|
};
|
|
1507
1516
|
|
|
1508
1517
|
type ModalProps = {
|
|
@@ -1772,6 +1781,9 @@ type PopupProps = {
|
|
|
1772
1781
|
hideOnClickOutside?: boolean;
|
|
1773
1782
|
needDebounce?: boolean;
|
|
1774
1783
|
};
|
|
1784
|
+
/**
|
|
1785
|
+
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
1786
|
+
*/
|
|
1775
1787
|
declare const Popup: react.ForwardRefExoticComponent<PopupProps & react.RefAttributes<HTMLDivElement>>;
|
|
1776
1788
|
|
|
1777
1789
|
type SentimentType = 'neutral' | 'primary';
|
|
@@ -2687,4 +2699,4 @@ declare const down: (size: ScreenSize, rules: string) => string;
|
|
|
2687
2699
|
|
|
2688
2700
|
declare const normalize: () => string;
|
|
2689
2701
|
|
|
2690
|
-
export { ActionBar, Alert, Avatar, Badge, Banner, BarChart, BarStack, Breadcrumbs, Breakpoint, Bullet, Button, Card, Carousel, Checkbox, CheckboxGroup, CheckboxGroupCheckbox, CopyButton, DateInput, EmptyState, Expandable, LineChart, Link, List, Loader, Menu, MenuV2, Meter, Modal, Notice, NumberInput, Pagination, PasswordCheck, PasswordStrengthMeter, PieChart, Popover, ProgressBar, Radio, RadioGroup, Row, type SCWUITheme, SelectInput, SelectableCard, Separator, Skeleton, Snippet, Stack, Status, StepList, Stepper, SwitchButton, Table, Tabs, Tag, TagInput, TagList, Text, TextInput, TimeInput, ToastContainer, Toggle, ToggleGroup, Tooltip, type UltravioletUITheme, VerificationCode, bounce, down, extendTheme, fadeIn, fadeOut, flash, getUUID, normalize, ping, pulse, quickScaleDown, scaleBack, scaleDown, scaleForward, scaleUp, sketchIn, sketchOut, slideDownLarge, slideFromBottom, slideFromLeft, slideFromRight, slideFromTop, slideToBottom, slideToLeft, slideToRight, slideToTop, slideUpLarge, toast, unfoldIn, unfoldOut, up, zoomIn, zoomOut };
|
|
2702
|
+
export { ActionBar, Alert, Avatar, Badge, Banner, BarChart, BarStack, Breadcrumbs, Breakpoint, Bullet, Button, Card, Carousel, Checkbox, CheckboxGroup, CheckboxGroupCheckbox, CopyButton, DateInput, EmptyState, Expandable, LineChart, Link, List, Loader, Menu, MenuV2, Meter, Modal, Notice, NumberInput, Pagination, PasswordCheck, PasswordStrengthMeter, PieChart, Popover, Popup, ProgressBar, Radio, RadioGroup, Row, type SCWUITheme, SelectInput, SelectableCard, Separator, Skeleton, Snippet, Stack, Status, StepList, Stepper, SwitchButton, Table, Tabs, Tag, TagInput, TagList, Text, TextInput, TimeInput, ToastContainer, Toggle, ToggleGroup, Tooltip, type UltravioletUITheme, VerificationCode, bounce, down, extendTheme, fadeIn, fadeOut, flash, getUUID, normalize, ping, pulse, quickScaleDown, scaleBack, scaleDown, scaleForward, scaleUp, sketchIn, sketchOut, slideDownLarge, slideFromBottom, slideFromLeft, slideFromRight, slideFromTop, slideToBottom, slideToLeft, slideToRight, slideToTop, slideUpLarge, toast, unfoldIn, unfoldOut, up, zoomIn, zoomOut };
|
|
@@ -28,17 +28,17 @@ 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;padding:", _ref3 => {
|
|
31
|
+
})("overflow-x:scroll;overflow-y:hidden;white-space:nowrap;display:flex;padding:", _ref3 => {
|
|
32
32
|
let {
|
|
33
33
|
theme
|
|
34
34
|
} = _ref3;
|
|
35
35
|
return theme.space['2'];
|
|
36
|
-
}, " 100px
|
|
36
|
+
}, " 100px;gap:", _ref4 => {
|
|
37
37
|
let {
|
|
38
38
|
theme
|
|
39
39
|
} = _ref4;
|
|
40
40
|
return theme.space['2'];
|
|
41
|
-
}, ";
|
|
41
|
+
}, ";");
|
|
42
42
|
const StyledAfterScroll = /*#__PURE__*/_styled("span", {
|
|
43
43
|
target: "e1id70w01"
|
|
44
44
|
})("position:absolute;bottom:0;right:0;width:100px;height:100%;content:'';cursor:e-resize;z-index:auto;background:linear-gradient(\n -90deg,\n ", _ref5 => {
|
|
@@ -52,44 +52,27 @@ const StyledAfterScroll = /*#__PURE__*/_styled("span", {
|
|
|
52
52
|
} = _ref6;
|
|
53
53
|
return theme.colors.neutral.background;
|
|
54
54
|
}, "ff\n );");
|
|
55
|
-
const StyledBorderWrapper = /*#__PURE__*/_styled(
|
|
55
|
+
const StyledBorderWrapper = /*#__PURE__*/_styled('div', {
|
|
56
|
+
shouldForwardProp: prop => !['width'].includes(prop),
|
|
56
57
|
target: "e1id70w00"
|
|
57
|
-
})("display:
|
|
58
|
+
})("display:flex;align-items:stretch;width:", _ref7 => {
|
|
58
59
|
let {
|
|
59
|
-
|
|
60
|
+
width
|
|
60
61
|
} = _ref7;
|
|
61
|
-
return
|
|
62
|
-
}, ";
|
|
62
|
+
return width;
|
|
63
|
+
}, ";max-width:", _ref8 => {
|
|
63
64
|
let {
|
|
64
|
-
|
|
65
|
+
width
|
|
65
66
|
} = _ref8;
|
|
66
|
-
return
|
|
67
|
-
}, ";
|
|
67
|
+
return width;
|
|
68
|
+
}, ";overflow-wrap:break-word;white-space:normal;height:auto;cursor:grab;flex-shrink:0;");
|
|
69
|
+
const CarouselItem = _ref9 => {
|
|
68
70
|
let {
|
|
69
|
-
|
|
71
|
+
children,
|
|
72
|
+
width = '240px'
|
|
70
73
|
} = _ref9;
|
|
71
|
-
return theme.colors.primary.border;
|
|
72
|
-
}, ";transition:box-shadow 0.2s ease;box-shadow:", _ref10 => {
|
|
73
|
-
let {
|
|
74
|
-
theme
|
|
75
|
-
} = _ref10;
|
|
76
|
-
return theme.shadows.focusPrimary;
|
|
77
|
-
}, ";}img{border-radius:", _ref11 => {
|
|
78
|
-
let {
|
|
79
|
-
theme
|
|
80
|
-
} = _ref11;
|
|
81
|
-
return theme.radii.default;
|
|
82
|
-
}, " ", _ref12 => {
|
|
83
|
-
let {
|
|
84
|
-
theme
|
|
85
|
-
} = _ref12;
|
|
86
|
-
return theme.radii.default;
|
|
87
|
-
}, " 0 0;}");
|
|
88
|
-
const CarouselItem = _ref13 => {
|
|
89
|
-
let {
|
|
90
|
-
children
|
|
91
|
-
} = _ref13;
|
|
92
74
|
return jsx(StyledBorderWrapper, {
|
|
75
|
+
width: width,
|
|
93
76
|
draggable: "true",
|
|
94
77
|
children: children
|
|
95
78
|
});
|
|
@@ -97,12 +80,12 @@ const CarouselItem = _ref13 => {
|
|
|
97
80
|
/**
|
|
98
81
|
* Carousel component allows you to scroll horizontally through a list of items.
|
|
99
82
|
*/
|
|
100
|
-
const Carousel =
|
|
83
|
+
const Carousel = _ref10 => {
|
|
101
84
|
let {
|
|
102
85
|
children,
|
|
103
86
|
className,
|
|
104
87
|
'data-testid': dataTestId = 'scrollbar'
|
|
105
|
-
} =
|
|
88
|
+
} = _ref10;
|
|
106
89
|
const scrollRef = useRef(null);
|
|
107
90
|
let intervalLeft;
|
|
108
91
|
let intervalRight;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import { forwardRef, useState, useRef, useId, isValidElement, useImperativeHandle, cloneElement } from 'react';
|
|
3
|
+
import { Popup } from '../Popup/index.js';
|
|
3
4
|
import { Stack } from '../Stack/index.js';
|
|
4
5
|
import Item from './Item.js';
|
|
5
6
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
6
|
-
import { Popup } from '../../internalComponents/Popup/index.js';
|
|
7
7
|
|
|
8
8
|
const StyledPopup = /*#__PURE__*/_styled(Popup, {
|
|
9
9
|
target: "e1jn11gg1"
|
|
@@ -99,7 +99,9 @@ const Modal = _ref3 => {
|
|
|
99
99
|
onOpen: handleOpen,
|
|
100
100
|
toggle: handleToggle,
|
|
101
101
|
modalId: finalId,
|
|
102
|
-
hide: handleClose
|
|
102
|
+
hide: handleClose,
|
|
103
|
+
close: handleClose,
|
|
104
|
+
show: handleOpen
|
|
103
105
|
}) : children, jsx(StyledContainer, {
|
|
104
106
|
children: isClosable ? jsx(Button, {
|
|
105
107
|
"data-testid": dataTestId ? `${dataTestId}-close-button` : undefined,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import { useRef, useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { Button } from '../Button/index.js';
|
|
4
|
+
import { Popup } from '../Popup/index.js';
|
|
4
5
|
import { Stack } from '../Stack/index.js';
|
|
5
6
|
import { Text } from '../Text/index.js';
|
|
6
7
|
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
7
|
-
import { Popup } from '../../internalComponents/Popup/index.js';
|
|
8
8
|
|
|
9
9
|
const SIZES_WIDTH = {
|
|
10
10
|
small: 320,
|
|
@@ -31,7 +31,7 @@ const exitAnimation = positions => keyframes`
|
|
|
31
31
|
`;
|
|
32
32
|
const StyledTooltip = /*#__PURE__*/_styled('div', {
|
|
33
33
|
shouldForwardProp: prop => !['maxWidth', 'positions', 'reverseAnimation'].includes(prop),
|
|
34
|
-
target: "
|
|
34
|
+
target: "e4h1g861"
|
|
35
35
|
})("background:", _ref => {
|
|
36
36
|
let {
|
|
37
37
|
theme
|
|
@@ -95,7 +95,7 @@ const StyledTooltip = /*#__PURE__*/_styled('div', {
|
|
|
95
95
|
return theme.colors.neutral.backgroundStronger;
|
|
96
96
|
}, " transparent transparent transparent;pointer-events:none;}}");
|
|
97
97
|
const StyledChildrenContainer = /*#__PURE__*/_styled("div", {
|
|
98
|
-
target: "
|
|
98
|
+
target: "e4h1g860"
|
|
99
99
|
})(process.env.NODE_ENV === "production" ? {
|
|
100
100
|
name: "jhu4ja",
|
|
101
101
|
styles: "display:inherit;&[data-container-full-width='true']{width:100%;}"
|
|
@@ -104,6 +104,9 @@ const StyledChildrenContainer = /*#__PURE__*/_styled("div", {
|
|
|
104
104
|
styles: "display:inherit;&[data-container-full-width='true']{width:100%;}",
|
|
105
105
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
106
106
|
});
|
|
107
|
+
/**
|
|
108
|
+
* @experimental This component is experimental and may be subject to breaking changes in the future.
|
|
109
|
+
*/
|
|
107
110
|
const Popup = /*#__PURE__*/forwardRef((_ref13, tooltipRef) => {
|
|
108
111
|
let {
|
|
109
112
|
children,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
+
import { Popup } from '../Popup/index.js';
|
|
3
4
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
4
|
-
import { Popup } from '../../internalComponents/Popup/index.js';
|
|
5
5
|
|
|
6
6
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
7
7
|
const StyledPopup = /*#__PURE__*/_styled(Popup, {
|
package/dist/src/index.js
CHANGED
|
@@ -37,6 +37,7 @@ export { PasswordCheck } from './components/PasswordCheck/index.js';
|
|
|
37
37
|
export { PasswordStrengthMeter } from './components/PasswordStrengthMeter/index.js';
|
|
38
38
|
export { PieChart } from './components/PieChart/index.js';
|
|
39
39
|
export { Popover } from './components/Popover/index.js';
|
|
40
|
+
export { Popup } from './components/Popup/index.js';
|
|
40
41
|
export { ProgressBar } from './components/ProgressBar/index.js';
|
|
41
42
|
export { Radio } from './components/Radio/index.js';
|
|
42
43
|
export { Row } from './components/Row/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultraviolet/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "Ultraviolet UI",
|
|
5
5
|
"homepage": "https://github.com/scaleway/ultraviolet#readme",
|
|
6
6
|
"repository": {
|
|
@@ -67,6 +67,6 @@
|
|
|
67
67
|
"react-use-clipboard": "1.0.9",
|
|
68
68
|
"reakit": "1.3.11",
|
|
69
69
|
"@ultraviolet/themes": "1.2.1",
|
|
70
|
-
"@ultraviolet/icons": "2.
|
|
70
|
+
"@ultraviolet/icons": "2.4.0"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
File without changes
|