@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.
Files changed (111) hide show
  1. package/README.md +14 -7
  2. package/dist/index.d.ts +51 -2
  3. package/dist/src/components/ActionBar/index.js +22 -37
  4. package/dist/src/components/Alert/index.js +27 -41
  5. package/dist/src/components/Avatar/index.js +48 -69
  6. package/dist/src/components/Badge/index.js +29 -49
  7. package/dist/src/components/Banner/index.js +42 -62
  8. package/dist/src/components/BarChart/Tooltip.js +35 -50
  9. package/dist/src/components/BarChart/index.js +13 -14
  10. package/dist/src/components/BarStack/index.js +100 -191
  11. package/dist/src/components/Breadcrumbs/index.js +29 -39
  12. package/dist/src/components/Bullet/index.js +42 -55
  13. package/dist/src/components/Button/index.js +73 -99
  14. package/dist/src/components/Card/index.js +39 -57
  15. package/dist/src/components/Carousel/index.js +32 -60
  16. package/dist/src/components/Checkbox/index.js +153 -341
  17. package/dist/src/components/CheckboxGroup/index.js +25 -27
  18. package/dist/src/components/CopyButton/index.js +11 -12
  19. package/dist/src/components/DateInput/index.js +141 -268
  20. package/dist/src/components/EmptyState/index.js +68 -83
  21. package/dist/src/components/Expandable/index.js +13 -20
  22. package/dist/src/components/GlobalAlert/GlobalAlertLink.js +12 -13
  23. package/dist/src/components/GlobalAlert/index.js +19 -32
  24. package/dist/src/components/LineChart/CustomLegend.js +80 -89
  25. package/dist/src/components/LineChart/Tooltip.js +32 -47
  26. package/dist/src/components/LineChart/helpers.js +15 -50
  27. package/dist/src/components/LineChart/index.js +23 -33
  28. package/dist/src/components/Link/index.js +46 -65
  29. package/dist/src/components/List/Body.js +9 -15
  30. package/dist/src/components/List/Cell.js +6 -7
  31. package/dist/src/components/List/HeaderCell.js +28 -56
  32. package/dist/src/components/List/HeaderRow.js +9 -16
  33. package/dist/src/components/List/ListContext.js +5 -6
  34. package/dist/src/components/List/Row.js +44 -90
  35. package/dist/src/components/List/SelectBar.js +9 -13
  36. package/dist/src/components/List/SkeletonRows.js +5 -6
  37. package/dist/src/components/List/index.js +15 -25
  38. package/dist/src/components/Loader/index.js +18 -25
  39. package/dist/src/components/Menu/Item.js +39 -49
  40. package/dist/src/components/Menu/index.js +31 -56
  41. package/dist/src/components/MenuV2/Item.js +39 -49
  42. package/dist/src/components/MenuV2/index.js +28 -47
  43. package/dist/src/components/Meter/index.js +25 -47
  44. package/dist/src/components/Modal/Dialog.js +33 -58
  45. package/dist/src/components/Modal/Disclosure.js +8 -9
  46. package/dist/src/components/Modal/index.js +26 -33
  47. package/dist/src/components/Notice/index.js +21 -27
  48. package/dist/src/components/NumberInput/index.js +73 -137
  49. package/dist/src/components/Pagination/getPageNumbers.js +1 -4
  50. package/dist/src/components/Pagination/index.js +17 -27
  51. package/dist/src/components/PasswordCheck/index.js +26 -32
  52. package/dist/src/components/PasswordStrengthMeter/index.js +25 -44
  53. package/dist/src/components/PieChart/Legends.js +71 -107
  54. package/dist/src/components/PieChart/Tooltip.js +33 -36
  55. package/dist/src/components/PieChart/index.js +13 -17
  56. package/dist/src/components/Popover/index.js +58 -75
  57. package/dist/src/components/Popup/helpers.js +13 -15
  58. package/dist/src/components/Popup/index.js +55 -98
  59. package/dist/src/components/ProgressBar/index.js +31 -49
  60. package/dist/src/components/Radio/index.js +58 -113
  61. package/dist/src/components/RadioGroup/index.js +26 -28
  62. package/dist/src/components/Row/index.js +25 -31
  63. package/dist/src/components/SelectInput/index.js +357 -410
  64. package/dist/src/components/SelectableCard/index.js +73 -115
  65. package/dist/src/components/Separator/index.js +52 -73
  66. package/dist/src/components/Skeleton/Block.js +23 -41
  67. package/dist/src/components/Skeleton/Blocks.js +23 -41
  68. package/dist/src/components/Skeleton/BoxWithIcon.js +21 -36
  69. package/dist/src/components/Skeleton/Donut.js +3 -6
  70. package/dist/src/components/Skeleton/IconSkeleton.js +13 -31
  71. package/dist/src/components/Skeleton/Line.js +5 -11
  72. package/dist/src/components/Skeleton/List.js +22 -31
  73. package/dist/src/components/Skeleton/Slider.js +25 -46
  74. package/dist/src/components/Skeleton/Square.js +3 -6
  75. package/dist/src/components/Skeleton/index.js +17 -33
  76. package/dist/src/components/Snippet/index.js +82 -137
  77. package/dist/src/components/Stack/index.js +11 -14
  78. package/dist/src/components/Status/index.js +48 -78
  79. package/dist/src/components/StepList/index.js +45 -63
  80. package/dist/src/components/Stepper/index.js +74 -129
  81. package/dist/src/components/SwitchButton/FocusOverlay.js +13 -23
  82. package/dist/src/components/SwitchButton/index.js +36 -62
  83. package/dist/src/components/Table/Body.js +5 -8
  84. package/dist/src/components/Table/Cell.js +14 -20
  85. package/dist/src/components/Table/Header.js +8 -14
  86. package/dist/src/components/Table/HeaderCell.js +40 -56
  87. package/dist/src/components/Table/HeaderRow.js +4 -5
  88. package/dist/src/components/Table/Row.js +10 -14
  89. package/dist/src/components/Table/SelectBar.js +9 -13
  90. package/dist/src/components/Table/SkeletonRows.js +5 -6
  91. package/dist/src/components/Table/TableContext.js +6 -7
  92. package/dist/src/components/Table/index.js +44 -50
  93. package/dist/src/components/Tabs/Tab.js +57 -118
  94. package/dist/src/components/Tabs/TabMenu.js +32 -38
  95. package/dist/src/components/Tabs/TabMenuItem.js +9 -13
  96. package/dist/src/components/Tabs/index.js +24 -43
  97. package/dist/src/components/Tag/index.js +57 -74
  98. package/dist/src/components/TagInput/index.js +63 -94
  99. package/dist/src/components/TagList/index.js +22 -35
  100. package/dist/src/components/Text/index.js +29 -31
  101. package/dist/src/components/TextArea/index.js +240 -0
  102. package/dist/src/components/TextInput/index.js +166 -260
  103. package/dist/src/components/TimeInput/index.js +10 -13
  104. package/dist/src/components/Toaster/index.js +51 -67
  105. package/dist/src/components/Toggle/index.js +62 -129
  106. package/dist/src/components/ToggleGroup/index.js +21 -23
  107. package/dist/src/components/Tooltip/index.js +28 -31
  108. package/dist/src/components/VerificationCode/index.js +55 -90
  109. package/dist/src/index.js +1 -0
  110. package/dist/src/utils/ids.js +1 -6
  111. 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:", _ref => {
13
- let {
14
- theme
15
- } = _ref;
16
- return theme.radii.default;
17
- }, ";background-color:", _ref2 => {
18
- let {
19
- theme
20
- } = _ref2;
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:", _ref5 => {
70
- let {
71
- theme
72
- } = _ref5;
73
- return theme.colors.neutral.backgroundWeakElevated;
74
- }, ";display:flex;flex-direction:column;text-align:center;justify-content:center;color:", _ref6 => {
75
- let {
76
- theme
77
- } = _ref6;
78
- return theme.colors.neutral.text;
79
- }, ";border-radius:", _ref7 => {
80
- let {
81
- theme
82
- } = _ref7;
83
- return theme.radii.default;
84
- }, ";position:relative;", _ref8 => {
85
- let {
86
- placement,
87
- theme,
88
- hasArrow
89
- } = _ref8;
90
- return hasArrow && arrowPlacementStyles[placement]?.(theme);
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 = _ref => {
7
- let {
8
- theme,
9
- borderless,
10
- sentiment,
11
- disabled
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
- })(_ref2 => {
45
- let {
46
- theme,
47
- borderless,
48
- sentiment,
49
- disabled
50
- } = _ref2;
51
- return itemCoreStyle({
52
- theme,
53
- borderless,
54
- sentiment,
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
- })(_ref3 => {
62
- let {
63
- theme,
64
- borderless,
65
- sentiment,
66
- disabled
67
- } = _ref3;
68
- return itemCoreStyle({
69
- theme,
70
- borderless,
71
- sentiment,
72
- disabled
73
- });
74
- }, " text-decoration:none;&:focus{text-decoration:none;}");
75
- const Item = /*#__PURE__*/forwardRef((_ref4, ref) => {
76
- let {
77
- borderless = false,
78
- disabled = false,
79
- onClick,
80
- sentiment = 'neutral',
81
- href,
82
- children,
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:", _ref => {
11
- let {
12
- theme
13
- } = _ref;
14
- return theme.colors.neutral.background;
15
- }, ";box-shadow:", _ref2 => {
16
- let {
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:", _ref4 => {
29
- let {
30
- theme
31
- } = _ref4;
32
- return theme.colors.neutral.backgroundWeakElevated;
33
- }, ";color:", _ref5 => {
34
- let {
35
- theme
36
- } = _ref5;
37
- return theme.colors.neutral.text;
38
- }, ";border-radius:", _ref6 => {
39
- let {
40
- theme
41
- } = _ref6;
42
- return theme.radii.default;
43
- }, ";position:relative;");
44
- const FwdMenu = /*#__PURE__*/forwardRef((_ref7, ref) => {
45
- let {
46
- id,
47
- ariaLabel = 'Menu',
48
- children,
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:", _ref => {
9
- let {
10
- strength
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:", _ref2 => {
17
- let {
18
- theme
19
- } = _ref2;
20
- return theme.colors.neutral.backgroundDisabled;
21
- }, ";border-radius:", _ref3 => {
22
- let {
23
- theme
24
- } = _ref3;
25
- return theme.radii.default;
26
- }, ";height:", _ref4 => {
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:", _ref7 => {
45
- let {
46
- theme
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 = _ref8 => {
54
- let {
55
- strength,
56
- title,
57
- value,
58
- className,
59
- 'data-testid': dataTestId,
60
- id
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:", _ref => {
10
- let {
11
- theme
12
- } = _ref;
13
- return theme.colors.overlay;
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:", _ref3 => {
23
- let {
24
- theme
25
- } = _ref3;
26
- return theme.colors.neutral.backgroundWeakElevated;
27
- }, ";position:relative;border-radius:", _ref4 => {
28
- let {
29
- theme
30
- } = _ref4;
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
- const Dialog = _ref9 => {
58
- let {
59
- children,
60
- open,
61
- placement,
62
- onClose,
63
- hideOnClickOutside,
64
- size,
65
- id,
66
- ariaLabel,
67
- className,
68
- 'data-testid': dataTestId,
69
- preventBodyScroll,
70
- hideOnEsc,
71
- backdropClassName,
72
- dialogCss,
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 = _ref => {
4
- let {
5
- disclosure,
6
- handleOpen,
7
- visible,
8
- handleClose,
9
- toggle,
10
- id
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:", _ref => {
11
- let {
12
- theme
13
- } = _ref;
14
- return theme.space['2'];
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 = _ref3 => {
27
- let {
28
- ariaLabel = 'modal',
29
- id,
30
- children,
31
- disclosure,
32
- hideOnClickOutside = true,
33
- hideOnEsc = true,
34
- isClosable = true,
35
- onClose,
36
- onBeforeClose,
37
- opened = false,
38
- placement = 'center',
39
- preventBodyScroll = true,
40
- size,
41
- className,
42
- 'data-testid': dataTestId,
43
- backdropClassName,
44
- width = 'small',
45
- customDialogStyles,
46
- customDialogBackdropStyles
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:", _ref => {
9
- let {
10
- theme
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 = _ref2 => {
19
- let {
20
- children,
21
- className,
22
- 'data-testid': dataTestId
23
- } = _ref2;
24
- return jsxs(StyledSpan, {
25
- as: "span",
26
- variant: "caption",
27
- sentiment: "neutral",
28
- prominence: "weak",
29
- "data-testid": dataTestId,
30
- className: className,
31
- children: [jsx(Icon, {
32
- name: "information-outline",
33
- size: 16,
34
- color: "neutral",
35
- prominence: "weak"
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 };