@ultraviolet/ui 1.28.0 → 1.29.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/README.md +14 -7
- package/dist/index.d.ts +51 -2
- package/dist/src/components/ActionBar/index.js +22 -37
- package/dist/src/components/Alert/index.js +27 -41
- package/dist/src/components/Avatar/index.js +48 -69
- package/dist/src/components/Badge/index.js +29 -49
- package/dist/src/components/Banner/index.js +42 -62
- package/dist/src/components/BarChart/Tooltip.js +35 -50
- package/dist/src/components/BarChart/index.js +13 -14
- package/dist/src/components/BarStack/index.js +100 -191
- package/dist/src/components/Breadcrumbs/index.js +29 -39
- package/dist/src/components/Bullet/index.js +42 -55
- package/dist/src/components/Button/index.js +73 -99
- package/dist/src/components/Card/index.js +39 -57
- package/dist/src/components/Carousel/index.js +32 -60
- package/dist/src/components/Checkbox/index.js +153 -341
- package/dist/src/components/CheckboxGroup/index.js +25 -27
- package/dist/src/components/CopyButton/index.js +11 -12
- package/dist/src/components/DateInput/index.js +141 -268
- package/dist/src/components/EmptyState/index.js +68 -83
- package/dist/src/components/Expandable/index.js +13 -20
- package/dist/src/components/GlobalAlert/GlobalAlertLink.js +12 -13
- package/dist/src/components/GlobalAlert/index.js +19 -32
- package/dist/src/components/LineChart/CustomLegend.js +80 -89
- package/dist/src/components/LineChart/Tooltip.js +32 -47
- package/dist/src/components/LineChart/helpers.js +15 -50
- package/dist/src/components/LineChart/index.js +23 -33
- package/dist/src/components/Link/index.js +46 -65
- package/dist/src/components/List/Body.js +9 -15
- package/dist/src/components/List/Cell.js +6 -7
- package/dist/src/components/List/HeaderCell.js +28 -56
- package/dist/src/components/List/HeaderRow.js +9 -16
- package/dist/src/components/List/ListContext.js +5 -6
- package/dist/src/components/List/Row.js +44 -90
- package/dist/src/components/List/SelectBar.js +9 -13
- package/dist/src/components/List/SkeletonRows.js +5 -6
- package/dist/src/components/List/index.js +15 -25
- package/dist/src/components/Loader/index.js +18 -25
- package/dist/src/components/Menu/Item.js +39 -49
- package/dist/src/components/Menu/index.js +31 -56
- package/dist/src/components/MenuV2/Item.js +39 -49
- package/dist/src/components/MenuV2/index.js +28 -47
- package/dist/src/components/Meter/index.js +25 -47
- package/dist/src/components/Modal/Dialog.js +33 -58
- package/dist/src/components/Modal/Disclosure.js +8 -9
- package/dist/src/components/Modal/index.js +26 -33
- package/dist/src/components/Notice/index.js +21 -27
- package/dist/src/components/NumberInput/index.js +73 -137
- package/dist/src/components/Pagination/getPageNumbers.js +1 -4
- package/dist/src/components/Pagination/index.js +17 -27
- package/dist/src/components/PasswordCheck/index.js +26 -32
- package/dist/src/components/PasswordStrengthMeter/index.js +25 -44
- package/dist/src/components/PieChart/Legends.js +71 -107
- package/dist/src/components/PieChart/Tooltip.js +33 -36
- package/dist/src/components/PieChart/index.js +13 -17
- package/dist/src/components/Popover/index.js +58 -75
- package/dist/src/components/Popup/helpers.js +13 -15
- package/dist/src/components/Popup/index.js +55 -98
- package/dist/src/components/ProgressBar/index.js +31 -49
- package/dist/src/components/Radio/index.js +58 -113
- package/dist/src/components/RadioGroup/index.js +26 -28
- package/dist/src/components/Row/index.js +25 -31
- package/dist/src/components/SelectInput/index.js +357 -410
- package/dist/src/components/SelectableCard/index.js +73 -115
- package/dist/src/components/Separator/index.js +52 -73
- package/dist/src/components/Skeleton/Block.js +23 -41
- package/dist/src/components/Skeleton/Blocks.js +23 -41
- package/dist/src/components/Skeleton/BoxWithIcon.js +21 -36
- package/dist/src/components/Skeleton/Donut.js +3 -6
- package/dist/src/components/Skeleton/IconSkeleton.js +13 -31
- package/dist/src/components/Skeleton/Line.js +5 -11
- package/dist/src/components/Skeleton/List.js +22 -31
- package/dist/src/components/Skeleton/Slider.js +25 -46
- package/dist/src/components/Skeleton/Square.js +3 -6
- package/dist/src/components/Skeleton/index.js +17 -33
- package/dist/src/components/Snippet/index.js +82 -137
- package/dist/src/components/Stack/index.js +11 -14
- package/dist/src/components/Status/index.js +48 -78
- package/dist/src/components/StepList/index.js +45 -63
- package/dist/src/components/Stepper/index.js +74 -129
- package/dist/src/components/SwitchButton/FocusOverlay.js +13 -23
- package/dist/src/components/SwitchButton/index.js +36 -62
- package/dist/src/components/Table/Body.js +5 -8
- package/dist/src/components/Table/Cell.js +14 -20
- package/dist/src/components/Table/Header.js +8 -14
- package/dist/src/components/Table/HeaderCell.js +40 -56
- package/dist/src/components/Table/HeaderRow.js +4 -5
- package/dist/src/components/Table/Row.js +10 -14
- package/dist/src/components/Table/SelectBar.js +9 -13
- package/dist/src/components/Table/SkeletonRows.js +5 -6
- package/dist/src/components/Table/TableContext.js +6 -7
- package/dist/src/components/Table/index.js +44 -50
- package/dist/src/components/Tabs/Tab.js +57 -118
- package/dist/src/components/Tabs/TabMenu.js +32 -38
- package/dist/src/components/Tabs/TabMenuItem.js +9 -13
- package/dist/src/components/Tabs/index.js +24 -43
- package/dist/src/components/Tag/index.js +57 -74
- package/dist/src/components/TagInput/index.js +63 -94
- package/dist/src/components/TagList/index.js +22 -35
- package/dist/src/components/Text/index.js +29 -31
- package/dist/src/components/TextArea/index.js +240 -0
- package/dist/src/components/TextInput/index.js +166 -260
- package/dist/src/components/TimeInput/index.js +10 -13
- package/dist/src/components/Toaster/index.js +51 -67
- package/dist/src/components/Toggle/index.js +62 -129
- package/dist/src/components/ToggleGroup/index.js +21 -23
- package/dist/src/components/Tooltip/index.js +28 -31
- package/dist/src/components/VerificationCode/index.js +55 -90
- package/dist/src/index.js +1 -0
- package/dist/src/utils/ids.js +1 -6
- package/package.json +3 -3
|
@@ -9,27 +9,15 @@ import { jsxs, Fragment, jsx } from '@emotion/react/jsx-runtime';
|
|
|
9
9
|
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)."; }
|
|
10
10
|
const StyledPopover = /*#__PURE__*/_styled(Popover, {
|
|
11
11
|
target: "e1hqs9p51"
|
|
12
|
-
})("border-radius:",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return theme.colors.neutral.background;
|
|
22
|
-
}, ";color:", _ref3 => {
|
|
23
|
-
let {
|
|
24
|
-
theme
|
|
25
|
-
} = _ref3;
|
|
26
|
-
return theme.colors.neutral.text;
|
|
27
|
-
}, ";box-shadow:", _ref4 => {
|
|
28
|
-
let {
|
|
29
|
-
theme
|
|
30
|
-
} = _ref4;
|
|
31
|
-
return theme.shadows.dropdown;
|
|
32
|
-
}, ";");
|
|
12
|
+
})("border-radius:", ({
|
|
13
|
+
theme
|
|
14
|
+
}) => theme.radii.default, ";background-color:", ({
|
|
15
|
+
theme
|
|
16
|
+
}) => theme.colors.neutral.background, ";color:", ({
|
|
17
|
+
theme
|
|
18
|
+
}) => theme.colors.neutral.text, ";box-shadow:", ({
|
|
19
|
+
theme
|
|
20
|
+
}) => theme.shadows.dropdown, ";");
|
|
33
21
|
const bottomStyles = theme => /*#__PURE__*/css("box-shadow:", theme.shadows.menu, ";&:after,&:before{bottom:100%;}&:after{border-bottom-color:", theme.colors.neutral.background, ";}&:before{border-bottom-color:transparent;}");
|
|
34
22
|
const topStyles = theme => /*#__PURE__*/css("box-shadow:", theme.shadows.menu, ";&:after,&:before{top:100%;}&:after{border-top-color:", theme.colors.neutral.background, ";}&:before{border-top-color:rgba(165, 165, 205, 0.4);}");
|
|
35
23
|
const endStyles = process.env.NODE_ENV === "production" ? {
|
|
@@ -66,41 +54,28 @@ const arrowPlacementStyles = {
|
|
|
66
54
|
};
|
|
67
55
|
const MenuList = /*#__PURE__*/_styled("div", {
|
|
68
56
|
target: "e1hqs9p50"
|
|
69
|
-
})("&:after,&:before{border:solid transparent;border-width:9px;content:' ';height:0;width:0;position:absolute;pointer-events:none;}&:after{border-color:transparent;}&:before{border-color:transparent;}background-color:",
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}, ";
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}, ";");
|
|
92
|
-
const FwdMenu = /*#__PURE__*/forwardRef((_ref9, ref) => {
|
|
93
|
-
let {
|
|
94
|
-
ariaLabel = 'Menu',
|
|
95
|
-
id,
|
|
96
|
-
children,
|
|
97
|
-
disclosure,
|
|
98
|
-
hasArrow = true,
|
|
99
|
-
placement = 'bottom',
|
|
100
|
-
visible = false,
|
|
101
|
-
className,
|
|
102
|
-
'data-testid': dataTestId
|
|
103
|
-
} = _ref9;
|
|
57
|
+
})("&:after,&:before{border:solid transparent;border-width:9px;content:' ';height:0;width:0;position:absolute;pointer-events:none;}&:after{border-color:transparent;}&:before{border-color:transparent;}background-color:", ({
|
|
58
|
+
theme
|
|
59
|
+
}) => theme.colors.neutral.backgroundWeakElevated, ";display:flex;flex-direction:column;text-align:center;justify-content:center;color:", ({
|
|
60
|
+
theme
|
|
61
|
+
}) => theme.colors.neutral.text, ";border-radius:", ({
|
|
62
|
+
theme
|
|
63
|
+
}) => theme.radii.default, ";position:relative;", ({
|
|
64
|
+
placement,
|
|
65
|
+
theme,
|
|
66
|
+
hasArrow
|
|
67
|
+
}) => hasArrow && arrowPlacementStyles[placement]?.(theme), ";");
|
|
68
|
+
const FwdMenu = /*#__PURE__*/forwardRef(({
|
|
69
|
+
ariaLabel = 'Menu',
|
|
70
|
+
id,
|
|
71
|
+
children,
|
|
72
|
+
disclosure,
|
|
73
|
+
hasArrow = true,
|
|
74
|
+
placement = 'bottom',
|
|
75
|
+
visible = false,
|
|
76
|
+
className,
|
|
77
|
+
'data-testid': dataTestId
|
|
78
|
+
}, ref) => {
|
|
104
79
|
const popover = usePopoverState({
|
|
105
80
|
baseId: id,
|
|
106
81
|
placement,
|
|
@@ -3,14 +3,12 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import { Tooltip } from '../Tooltip/index.js';
|
|
4
4
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
const itemCoreStyle =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} = _ref;
|
|
13
|
-
return `
|
|
6
|
+
const itemCoreStyle = ({
|
|
7
|
+
theme,
|
|
8
|
+
borderless,
|
|
9
|
+
sentiment,
|
|
10
|
+
disabled
|
|
11
|
+
}) => `
|
|
14
12
|
display: inline-block;
|
|
15
13
|
font-size: ${theme.typography.bodySmall.fontSize};
|
|
16
14
|
line-height: ${theme.typography.bodySmall.lineHeight};
|
|
@@ -37,53 +35,45 @@ const itemCoreStyle = _ref => {
|
|
|
37
35
|
}
|
|
38
36
|
}`}
|
|
39
37
|
`;
|
|
40
|
-
};
|
|
41
38
|
const StyledItem = /*#__PURE__*/_styled('button', {
|
|
42
39
|
shouldForwardProp: prop => !['borderless', 'sentiment'].includes(prop),
|
|
43
40
|
target: "ei26g5y1"
|
|
44
|
-
})(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
disabled
|
|
56
|
-
});
|
|
57
|
-
}, " background:none;");
|
|
41
|
+
})(({
|
|
42
|
+
theme,
|
|
43
|
+
borderless,
|
|
44
|
+
sentiment,
|
|
45
|
+
disabled
|
|
46
|
+
}) => itemCoreStyle({
|
|
47
|
+
theme,
|
|
48
|
+
borderless,
|
|
49
|
+
sentiment,
|
|
50
|
+
disabled
|
|
51
|
+
}), " background:none;");
|
|
58
52
|
const StyledLinkItem = /*#__PURE__*/_styled('a', {
|
|
59
53
|
shouldForwardProp: prop => !['borderless', 'sentiment'].includes(prop),
|
|
60
54
|
target: "ei26g5y0"
|
|
61
|
-
})(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
tooltip,
|
|
84
|
-
className,
|
|
85
|
-
'data-testid': dataTestId
|
|
86
|
-
} = _ref4;
|
|
55
|
+
})(({
|
|
56
|
+
theme,
|
|
57
|
+
borderless,
|
|
58
|
+
sentiment,
|
|
59
|
+
disabled
|
|
60
|
+
}) => itemCoreStyle({
|
|
61
|
+
theme,
|
|
62
|
+
borderless,
|
|
63
|
+
sentiment,
|
|
64
|
+
disabled
|
|
65
|
+
}), " text-decoration:none;&:focus{text-decoration:none;}");
|
|
66
|
+
const Item = /*#__PURE__*/forwardRef(({
|
|
67
|
+
borderless = false,
|
|
68
|
+
disabled = false,
|
|
69
|
+
onClick,
|
|
70
|
+
sentiment = 'neutral',
|
|
71
|
+
href,
|
|
72
|
+
children,
|
|
73
|
+
tooltip,
|
|
74
|
+
className,
|
|
75
|
+
'data-testid': dataTestId
|
|
76
|
+
}, ref) => {
|
|
87
77
|
if (href && !disabled) {
|
|
88
78
|
return jsx(Tooltip, {
|
|
89
79
|
text: tooltip,
|
|
@@ -7,55 +7,36 @@ import { jsx } from '@emotion/react/jsx-runtime';
|
|
|
7
7
|
|
|
8
8
|
const StyledPopup = /*#__PURE__*/_styled(Popup, {
|
|
9
9
|
target: "e1jn11gg1"
|
|
10
|
-
})("background-color:",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
theme
|
|
18
|
-
} = _ref2;
|
|
19
|
-
return theme.shadows.menu;
|
|
20
|
-
}, ";padding:0;&[data-has-arrow='true']{&::after{border-color:", _ref3 => {
|
|
21
|
-
let {
|
|
22
|
-
theme
|
|
23
|
-
} = _ref3;
|
|
24
|
-
return theme.colors.neutral.background;
|
|
25
|
-
}, " transparent transparent transparent;}}");
|
|
10
|
+
})("background-color:", ({
|
|
11
|
+
theme
|
|
12
|
+
}) => theme.colors.neutral.background, ";box-shadow:", ({
|
|
13
|
+
theme
|
|
14
|
+
}) => theme.shadows.menu, ";padding:0;&[data-has-arrow='true']{&::after{border-color:", ({
|
|
15
|
+
theme
|
|
16
|
+
}) => theme.colors.neutral.background, " transparent transparent transparent;}}");
|
|
26
17
|
const MenuList = /*#__PURE__*/_styled(Stack, {
|
|
27
18
|
target: "e1jn11gg0"
|
|
28
|
-
})("&:after,&:before{border:solid transparent;border-width:9px;content:' ';height:0;width:0;position:absolute;pointer-events:none;}&:after{border-color:transparent;}&:before{border-color:transparent;}background-color:",
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
disclosure,
|
|
50
|
-
hasArrow = true,
|
|
51
|
-
placement = 'bottom',
|
|
52
|
-
visible = false,
|
|
53
|
-
className,
|
|
54
|
-
'data-testid': dataTestId,
|
|
55
|
-
maxHeight,
|
|
56
|
-
maxWidth,
|
|
57
|
-
portalTarget
|
|
58
|
-
} = _ref7;
|
|
19
|
+
})("&:after,&:before{border:solid transparent;border-width:9px;content:' ';height:0;width:0;position:absolute;pointer-events:none;}&:after{border-color:transparent;}&:before{border-color:transparent;}background-color:", ({
|
|
20
|
+
theme
|
|
21
|
+
}) => theme.colors.neutral.backgroundWeakElevated, ";color:", ({
|
|
22
|
+
theme
|
|
23
|
+
}) => theme.colors.neutral.text, ";border-radius:", ({
|
|
24
|
+
theme
|
|
25
|
+
}) => theme.radii.default, ";position:relative;");
|
|
26
|
+
const FwdMenu = /*#__PURE__*/forwardRef(({
|
|
27
|
+
id,
|
|
28
|
+
ariaLabel = 'Menu',
|
|
29
|
+
children,
|
|
30
|
+
disclosure,
|
|
31
|
+
hasArrow = true,
|
|
32
|
+
placement = 'bottom',
|
|
33
|
+
visible = false,
|
|
34
|
+
className,
|
|
35
|
+
'data-testid': dataTestId,
|
|
36
|
+
maxHeight,
|
|
37
|
+
maxWidth,
|
|
38
|
+
portalTarget
|
|
39
|
+
}, ref) => {
|
|
59
40
|
const [isVisible, setIsVisible] = useState(visible);
|
|
60
41
|
const popupRef = useRef(null);
|
|
61
42
|
const disclosureRef = useRef(null);
|
|
@@ -5,60 +5,38 @@ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
|
5
5
|
const StyledStrength = /*#__PURE__*/_styled(Text, {
|
|
6
6
|
shouldForwardProp: prop => !['color'].includes(prop),
|
|
7
7
|
target: "e157fc5l2"
|
|
8
|
-
})("float:right;vertical-align:top;color:",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} = _ref;
|
|
12
|
-
return strength.color;
|
|
13
|
-
}, ";");
|
|
8
|
+
})("float:right;vertical-align:top;color:", ({
|
|
9
|
+
strength
|
|
10
|
+
}) => strength.color, ";");
|
|
14
11
|
const StyledWrapper = /*#__PURE__*/_styled("div", {
|
|
15
12
|
target: "e157fc5l1"
|
|
16
|
-
})("background-color:",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, ";
|
|
27
|
-
let {
|
|
28
|
-
theme
|
|
29
|
-
} = _ref4;
|
|
30
|
-
return theme.space['1'];
|
|
31
|
-
}, ";margin-top:", _ref5 => {
|
|
32
|
-
let {
|
|
33
|
-
theme
|
|
34
|
-
} = _ref5;
|
|
35
|
-
return theme.space['1'];
|
|
36
|
-
}, ";margin-bottom:", _ref6 => {
|
|
37
|
-
let {
|
|
38
|
-
theme
|
|
39
|
-
} = _ref6;
|
|
40
|
-
return theme.space['2'];
|
|
41
|
-
}, ";");
|
|
13
|
+
})("background-color:", ({
|
|
14
|
+
theme
|
|
15
|
+
}) => theme.colors.neutral.backgroundDisabled, ";border-radius:", ({
|
|
16
|
+
theme
|
|
17
|
+
}) => theme.radii.default, ";height:", ({
|
|
18
|
+
theme
|
|
19
|
+
}) => theme.space['1'], ";margin-top:", ({
|
|
20
|
+
theme
|
|
21
|
+
}) => theme.space['1'], ";margin-bottom:", ({
|
|
22
|
+
theme
|
|
23
|
+
}) => theme.space['2'], ";");
|
|
42
24
|
const StyledMeter = /*#__PURE__*/_styled("div", {
|
|
43
25
|
target: "e157fc5l0"
|
|
44
|
-
})("border-radius:",
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} = _ref7;
|
|
48
|
-
return theme.radii.default;
|
|
49
|
-
}, ";height:100%;transition:all 0.5s;");
|
|
26
|
+
})("border-radius:", ({
|
|
27
|
+
theme
|
|
28
|
+
}) => theme.radii.default, ";height:100%;transition:all 0.5s;");
|
|
50
29
|
/**
|
|
51
30
|
* Show strength of a password based on different criteria.
|
|
52
31
|
*/
|
|
53
|
-
const Meter =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} = _ref8;
|
|
32
|
+
const Meter = ({
|
|
33
|
+
strength,
|
|
34
|
+
title,
|
|
35
|
+
value,
|
|
36
|
+
className,
|
|
37
|
+
'data-testid': dataTestId,
|
|
38
|
+
id
|
|
39
|
+
}) => {
|
|
62
40
|
const toValue = (value + 1) / strength.length * 100;
|
|
63
41
|
const width = `${toValue}%`;
|
|
64
42
|
const backgroundColor = strength[value]?.color ?? strength[0].color;
|
|
@@ -6,72 +6,47 @@ import { jsx } from '@emotion/react/jsx-runtime';
|
|
|
6
6
|
|
|
7
7
|
const StyledBackdrop = /*#__PURE__*/_styled("div", {
|
|
8
8
|
target: "e1cqen9h1"
|
|
9
|
-
})("position:fixed;top:0;right:0;height:0;width:0;overflow:hidden;background-color:",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, ";z-index:1;&[data-open='true']{padding:", _ref2 => {
|
|
15
|
-
let {
|
|
16
|
-
theme
|
|
17
|
-
} = _ref2;
|
|
18
|
-
return theme.space['2'];
|
|
19
|
-
}, ";overflow:auto;display:flex;bottom:0;left:0;height:100%;width:100%;}");
|
|
9
|
+
})("position:fixed;top:0;right:0;height:0;width:0;overflow:hidden;background-color:", ({
|
|
10
|
+
theme
|
|
11
|
+
}) => theme.colors.overlay, ";z-index:1;&[data-open='true']{padding:", ({
|
|
12
|
+
theme
|
|
13
|
+
}) => theme.space['2'], ";overflow:auto;display:flex;bottom:0;left:0;height:100%;width:100%;}");
|
|
20
14
|
const StyledDialog = /*#__PURE__*/_styled("dialog", {
|
|
21
15
|
target: "e1cqen9h0"
|
|
22
|
-
})("background-color:",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return theme.radii.default;
|
|
32
|
-
}, ";border:0;padding:", _ref5 => {
|
|
33
|
-
let {
|
|
34
|
-
theme
|
|
35
|
-
} = _ref5;
|
|
36
|
-
return theme.space['3'];
|
|
37
|
-
}, ";width:", MODAL_WIDTH.medium, "px;box-shadow:", _ref6 => {
|
|
38
|
-
let {
|
|
39
|
-
theme
|
|
40
|
-
} = _ref6;
|
|
41
|
-
return theme.shadows.modal;
|
|
42
|
-
}, ";", /*#__PURE__*/Object.entries(MODAL_WIDTH).map(_ref7 => {
|
|
43
|
-
let [size, value] = _ref7;
|
|
44
|
-
return `
|
|
16
|
+
})("background-color:", ({
|
|
17
|
+
theme
|
|
18
|
+
}) => theme.colors.neutral.backgroundWeakElevated, ";position:relative;border-radius:", ({
|
|
19
|
+
theme
|
|
20
|
+
}) => theme.radii.default, ";border:0;padding:", ({
|
|
21
|
+
theme
|
|
22
|
+
}) => theme.space['3'], ";width:", MODAL_WIDTH.medium, "px;box-shadow:", ({
|
|
23
|
+
theme
|
|
24
|
+
}) => theme.shadows.modal, ";", /*#__PURE__*/Object.entries(MODAL_WIDTH).map(([size, value]) => `
|
|
45
25
|
&[data-size="${size}"] {
|
|
46
26
|
width: ${value}px;
|
|
47
27
|
}
|
|
48
|
-
|
|
49
|
-
}), " ", /*#__PURE__*/Object.entries(MODAL_PLACEMENT).map(_ref8 => {
|
|
50
|
-
let [placement, value] = _ref8;
|
|
51
|
-
return `
|
|
28
|
+
`), " ", /*#__PURE__*/Object.entries(MODAL_PLACEMENT).map(([placement, value]) => `
|
|
52
29
|
&[data-placement="${placement}"] {
|
|
53
30
|
${value}
|
|
54
31
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
backdropCss
|
|
74
|
-
} = _ref9;
|
|
32
|
+
`), ";");
|
|
33
|
+
const Dialog = ({
|
|
34
|
+
children,
|
|
35
|
+
open,
|
|
36
|
+
placement,
|
|
37
|
+
onClose,
|
|
38
|
+
hideOnClickOutside,
|
|
39
|
+
size,
|
|
40
|
+
id,
|
|
41
|
+
ariaLabel,
|
|
42
|
+
className,
|
|
43
|
+
'data-testid': dataTestId,
|
|
44
|
+
preventBodyScroll,
|
|
45
|
+
hideOnEsc,
|
|
46
|
+
backdropClassName,
|
|
47
|
+
dialogCss,
|
|
48
|
+
backdropCss
|
|
49
|
+
}) => {
|
|
75
50
|
const containerRef = useRef(document.createElement('div'));
|
|
76
51
|
const dialogRef = useRef(null);
|
|
77
52
|
const onCloseRef = useRef(onClose);
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { useEffect, useMemo, isValidElement, cloneElement, createRef } from 'react';
|
|
2
2
|
|
|
3
|
-
const Disclosure =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} = _ref;
|
|
3
|
+
const Disclosure = ({
|
|
4
|
+
disclosure,
|
|
5
|
+
handleOpen,
|
|
6
|
+
visible,
|
|
7
|
+
handleClose,
|
|
8
|
+
toggle,
|
|
9
|
+
id
|
|
10
|
+
}) => {
|
|
12
11
|
const disclosureRef = /*#__PURE__*/createRef();
|
|
13
12
|
useEffect(() => {
|
|
14
13
|
const element = disclosureRef.current;
|
|
@@ -7,44 +7,37 @@ import { jsxs, Fragment, jsx } from '@emotion/react/jsx-runtime';
|
|
|
7
7
|
|
|
8
8
|
const StyledContainer = /*#__PURE__*/_styled("div", {
|
|
9
9
|
target: "ebywm9u0"
|
|
10
|
-
})("position:absolute;top:",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, ";right:", _ref2 => {
|
|
16
|
-
let {
|
|
17
|
-
theme
|
|
18
|
-
} = _ref2;
|
|
19
|
-
return theme.space['2'];
|
|
20
|
-
}, ";");
|
|
10
|
+
})("position:absolute;top:", ({
|
|
11
|
+
theme
|
|
12
|
+
}) => theme.space['2'], ";right:", ({
|
|
13
|
+
theme
|
|
14
|
+
}) => theme.space['2'], ";");
|
|
21
15
|
|
|
22
16
|
/**
|
|
23
17
|
* Modal is a component that allows you to display content on top of other content.
|
|
24
18
|
* It is often used to display a dialog with additional information or to ask for a confirmation.
|
|
25
19
|
*/
|
|
26
|
-
const Modal =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} = _ref3;
|
|
20
|
+
const Modal = ({
|
|
21
|
+
ariaLabel = 'modal',
|
|
22
|
+
id,
|
|
23
|
+
children,
|
|
24
|
+
disclosure,
|
|
25
|
+
hideOnClickOutside = true,
|
|
26
|
+
hideOnEsc = true,
|
|
27
|
+
isClosable = true,
|
|
28
|
+
onClose,
|
|
29
|
+
onBeforeClose,
|
|
30
|
+
opened = false,
|
|
31
|
+
placement = 'center',
|
|
32
|
+
preventBodyScroll = true,
|
|
33
|
+
size,
|
|
34
|
+
className,
|
|
35
|
+
'data-testid': dataTestId,
|
|
36
|
+
backdropClassName,
|
|
37
|
+
width = 'small',
|
|
38
|
+
customDialogStyles,
|
|
39
|
+
customDialogBackdropStyles
|
|
40
|
+
}) => {
|
|
48
41
|
const [visible, setVisible] = useState(opened);
|
|
49
42
|
const controlId = useId();
|
|
50
43
|
const handleOpen = useCallback(() => {
|
|
@@ -5,36 +5,30 @@ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
|
5
5
|
|
|
6
6
|
const StyledSpan = /*#__PURE__*/_styled(Text, {
|
|
7
7
|
target: "e19pqvs30"
|
|
8
|
-
})("display:flex;align-items:center;gap:",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} = _ref;
|
|
12
|
-
return theme.space['1'];
|
|
13
|
-
}, ";");
|
|
8
|
+
})("display:flex;align-items:center;gap:", ({
|
|
9
|
+
theme
|
|
10
|
+
}) => theme.space['1'], ";");
|
|
14
11
|
|
|
15
12
|
/**
|
|
16
13
|
* A Notice is used to display a short message to the user.
|
|
17
14
|
*/
|
|
18
|
-
const Notice =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}), children]
|
|
37
|
-
});
|
|
38
|
-
};
|
|
15
|
+
const Notice = ({
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
'data-testid': dataTestId
|
|
19
|
+
}) => jsxs(StyledSpan, {
|
|
20
|
+
as: "span",
|
|
21
|
+
variant: "caption",
|
|
22
|
+
sentiment: "neutral",
|
|
23
|
+
prominence: "weak",
|
|
24
|
+
"data-testid": dataTestId,
|
|
25
|
+
className: className,
|
|
26
|
+
children: [jsx(Icon, {
|
|
27
|
+
name: "information-outline",
|
|
28
|
+
size: 16,
|
|
29
|
+
color: "neutral",
|
|
30
|
+
prominence: "weak"
|
|
31
|
+
}), children]
|
|
32
|
+
});
|
|
39
33
|
|
|
40
34
|
export { Notice };
|