@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
@@ -25,36 +25,27 @@ const StyledLine = /*#__PURE__*/_styled("div", {
25
25
  });
26
26
  const StyledList = /*#__PURE__*/_styled("ul", {
27
27
  target: "e639qnr0"
28
- })("list-style:none;padding:0;margin:0;>", StyledItem, ":nth-of-type(even){background-color:", _ref => {
29
- let {
30
- theme
31
- } = _ref;
32
- return theme.colors.neutral.backgroundDisabled;
33
- }, ";}");
34
- const Item = _ref2 => {
35
- let {
36
- col = 3
37
- } = _ref2;
38
- return jsx(StyledItem, {
39
- children: Array.from({
40
- length: col
41
- }, (_, i) => jsx(StyledLine, {
42
- children: jsx(Line, {})
43
- }, `skeleton-list-col-${i}`))
44
- });
45
- };
46
- const List = _ref3 => {
47
- let {
48
- length = 3,
49
- col = 3
50
- } = _ref3;
51
- return jsx(StyledList, {
52
- children: Array.from({
53
- length
54
- }, (_, i) => jsx(Item, {
55
- col: col
56
- }, `skeleton-list-${i}`))
57
- });
58
- };
28
+ })("list-style:none;padding:0;margin:0;>", StyledItem, ":nth-of-type(even){background-color:", ({
29
+ theme
30
+ }) => theme.colors.neutral.backgroundDisabled, ";}");
31
+ const Item = ({
32
+ col = 3
33
+ }) => jsx(StyledItem, {
34
+ children: Array.from({
35
+ length: col
36
+ }, (_, i) => jsx(StyledLine, {
37
+ children: jsx(Line, {})
38
+ }, `skeleton-list-col-${i}`))
39
+ });
40
+ const List = ({
41
+ length = 3,
42
+ col = 3
43
+ }) => jsx(StyledList, {
44
+ children: Array.from({
45
+ length
46
+ }, (_, i) => jsx(Item, {
47
+ col: col
48
+ }, `skeleton-list-${i}`))
49
+ });
59
50
 
60
51
  export { List };
@@ -3,55 +3,34 @@ import { jsx } from '@emotion/react/jsx-runtime';
3
3
 
4
4
  const StyledContainer = /*#__PURE__*/_styled("div", {
5
5
  target: "e1yrvvrg2"
6
- })("height:277px;display:grid;grid-template-columns:repeat(", _ref => {
7
- let {
8
- length
9
- } = _ref;
10
- return length;
11
- }, ", 1fr);gap:", _ref2 => {
12
- let {
13
- theme
14
- } = _ref2;
15
- return theme.space['2'];
16
- }, ";overflow:auto;");
6
+ })("height:277px;display:grid;grid-template-columns:repeat(", ({
7
+ length
8
+ }) => length, ", 1fr);gap:", ({
9
+ theme
10
+ }) => theme.space['2'], ";overflow:auto;");
17
11
  const StyledCard = /*#__PURE__*/_styled("div", {
18
12
  target: "e1yrvvrg1"
19
- })("border:1px solid ", _ref3 => {
20
- let {
21
- theme
22
- } = _ref3;
23
- return theme.colors.neutral.borderWeak;
24
- }, ";border-radius:", _ref4 => {
25
- let {
26
- theme
27
- } = _ref4;
28
- return theme.radii.default;
29
- }, ";width:239px;height:261px;overflow:hidden;");
13
+ })("border:1px solid ", ({
14
+ theme
15
+ }) => theme.colors.neutral.borderWeak, ";border-radius:", ({
16
+ theme
17
+ }) => theme.radii.default, ";width:239px;height:261px;overflow:hidden;");
30
18
  const StyledBanner = /*#__PURE__*/_styled("div", {
31
19
  target: "e1yrvvrg0"
32
- })("border:1px solid ", _ref5 => {
33
- let {
34
- theme
35
- } = _ref5;
36
- return theme.colors.neutral.borderWeak;
37
- }, ";background-color:", _ref6 => {
38
- let {
39
- theme
40
- } = _ref6;
41
- return theme.colors.neutral.borderWeak;
42
- }, ";width:100%;height:33%;");
43
- const Slider = _ref7 => {
44
- let {
45
- length = 4
46
- } = _ref7;
47
- return jsx(StyledContainer, {
48
- length: length,
49
- children: Array.from({
50
- length
51
- }, (_, i) => jsx(StyledCard, {
52
- children: jsx(StyledBanner, {})
53
- }, `skeleton-slider-card-${i}`))
54
- });
55
- };
20
+ })("border:1px solid ", ({
21
+ theme
22
+ }) => theme.colors.neutral.borderWeak, ";background-color:", ({
23
+ theme
24
+ }) => theme.colors.neutral.borderWeak, ";width:100%;height:33%;");
25
+ const Slider = ({
26
+ length = 4
27
+ }) => jsx(StyledContainer, {
28
+ length: length,
29
+ children: Array.from({
30
+ length
31
+ }, (_, i) => jsx(StyledCard, {
32
+ children: jsx(StyledBanner, {})
33
+ }, `skeleton-slider-card-${i}`))
34
+ });
56
35
 
57
36
  export { Slider };
@@ -2,11 +2,8 @@ import _styled from '@emotion/styled/base';
2
2
 
3
3
  const Square = /*#__PURE__*/_styled("div", {
4
4
  target: "e1uz28830"
5
- })("height:100%;width:100%;max-width:100%;background-color:", _ref => {
6
- let {
7
- theme
8
- } = _ref;
9
- return theme.colors.neutral.borderWeak;
10
- }, ";");
5
+ })("height:100%;width:100%;max-width:100%;background-color:", ({
6
+ theme
7
+ }) => theme.colors.neutral.borderWeak, ";");
11
8
 
12
9
  export { Square };
@@ -31,32 +31,17 @@ const StyledContainer = /*#__PURE__*/_styled("div", {
31
31
  });
32
32
  const StyledDiv = /*#__PURE__*/_styled("div", {
33
33
  target: "e183x2r80"
34
- })("position:absolute;top:0;height:100%;width:25%;opacity:0.8;background:linear-gradient(\n 90deg,\n ", _ref => {
35
- let {
36
- theme
37
- } = _ref;
38
- return theme.colors.neutral.backgroundWeak;
39
- }, "00,\n ", _ref2 => {
40
- let {
41
- theme
42
- } = _ref2;
43
- return theme.colors.neutral.backgroundWeak;
44
- }, "4D,\n ", _ref3 => {
45
- let {
46
- theme
47
- } = _ref3;
48
- return theme.colors.neutral.backgroundWeak;
49
- }, "66,\n ", _ref4 => {
50
- let {
51
- theme
52
- } = _ref4;
53
- return theme.colors.neutral.backgroundWeak;
54
- }, "4D,\n ", _ref5 => {
55
- let {
56
- theme
57
- } = _ref5;
58
- return theme.colors.neutral.backgroundWeak;
59
- }, "00\n );animation:", shineAnimation, " 1s linear infinite;animation-direction:alternate;@media (prefers-reduced-motion: reduce){animation:unset;}");
34
+ })("position:absolute;top:0;height:100%;width:25%;opacity:0.8;background:linear-gradient(\n 90deg,\n ", ({
35
+ theme
36
+ }) => theme.colors.neutral.backgroundWeak, "00,\n ", ({
37
+ theme
38
+ }) => theme.colors.neutral.backgroundWeak, "4D,\n ", ({
39
+ theme
40
+ }) => theme.colors.neutral.backgroundWeak, "66,\n ", ({
41
+ theme
42
+ }) => theme.colors.neutral.backgroundWeak, "4D,\n ", ({
43
+ theme
44
+ }) => theme.colors.neutral.backgroundWeak, "00\n );animation:", shineAnimation, " 1s linear infinite;animation-direction:alternate;@media (prefers-reduced-motion: reduce){animation:unset;}");
60
45
  const variants = {
61
46
  block: Block,
62
47
  blocks: Blocks,
@@ -72,13 +57,12 @@ const variants = {
72
57
  * It is used to provide a better user experience by showing a temporary placeholder reflecting the dimensions of the
73
58
  * content that will eventually be loaded on the screen.
74
59
  */
75
- const Skeleton = _ref6 => {
76
- let {
77
- variant = 'blocks',
78
- length,
79
- col,
80
- className
81
- } = _ref6;
60
+ const Skeleton = ({
61
+ variant = 'blocks',
62
+ length,
63
+ col,
64
+ className
65
+ }) => {
82
66
  const Component = variants[variant];
83
67
  return jsxs(StyledContainer, {
84
68
  className: className,
@@ -12,43 +12,26 @@ const LINES_BREAK_REGEX = /\r\n|\r|\n/;
12
12
  const PreText = /*#__PURE__*/_styled(Text, {
13
13
  shouldForwardProp: prop => !['multiline', 'hasShowMoreButton', 'showMore'].includes(prop),
14
14
  target: "e1q0gj908"
15
- })("margin:0;padding:", _ref => {
16
- let {
17
- theme
18
- } = _ref;
19
- return theme.space['2'];
20
- }, ";padding-right:", _ref2 => {
21
- let {
22
- theme
23
- } = _ref2;
24
- return theme.space['9'];
25
- }, ";overflow-x:", _ref3 => {
26
- let {
27
- hasShowMoreButton,
28
- showMore
29
- } = _ref3;
30
- return hasShowMoreButton && !showMore ? 'hidden' : 'auto';
31
- }, ";overflow-y:hidden;", _ref4 => {
32
- let {
33
- multiline
34
- } = _ref4;
35
- return !multiline ? 'white-space: nowrap;' : '';
36
- }, " height:auto;counter-reset:section;");
15
+ })("margin:0;padding:", ({
16
+ theme
17
+ }) => theme.space['2'], ";padding-right:", ({
18
+ theme
19
+ }) => theme.space['9'], ";overflow-x:", ({
20
+ hasShowMoreButton,
21
+ showMore
22
+ }) => hasShowMoreButton && !showMore ? 'hidden' : 'auto', ";overflow-y:hidden;", ({
23
+ multiline
24
+ }) => !multiline ? 'white-space: nowrap;' : '', " height:auto;counter-reset:section;");
37
25
  const StyledSpan = /*#__PURE__*/_styled('span', {
38
26
  shouldForwardProp: prop => !['linePrefix', 'multiline', 'prefix'].includes(prop),
39
27
  target: "e1q0gj907"
40
- })("display:block;&:after{content:'';", _ref5 => {
41
- let {
42
- theme,
43
- multiline
44
- } = _ref5;
45
- return multiline ? `padding: ${theme.space['4']}` : `padding-right: ${theme.space['8']}`;
46
- }, ";}", _ref6 => {
47
- let {
48
- prefix,
49
- theme
50
- } = _ref6;
51
- return prefix ? `
28
+ })("display:block;&:after{content:'';", ({
29
+ theme,
30
+ multiline
31
+ }) => multiline ? `padding: ${theme.space['4']}` : `padding-right: ${theme.space['8']}`, ";}", ({
32
+ prefix,
33
+ theme
34
+ }) => prefix ? `
52
35
  &:before {
53
36
  color: ${theme.colors.neutral.textWeak};
54
37
  width: ${prefix === 'lines' ? '35px' : ''};
@@ -58,27 +41,17 @@ const StyledSpan = /*#__PURE__*/_styled('span', {
58
41
  content: ${prefix === 'lines' ? 'counter(section)' : "'$'"};
59
42
  padding-right: ${theme.space['1']};
60
43
  }
61
- ` : null;
62
- }, ";");
44
+ ` : null, ";");
63
45
  const Container = /*#__PURE__*/_styled('div', {
64
46
  shouldForwardProp: prop => !['multiline'].includes(prop),
65
47
  target: "e1q0gj906"
66
- })("position:relative;display:flex;justify-content:start;max-width:100%;", _ref7 => {
67
- let {
68
- multiline
69
- } = _ref7;
70
- return multiline ? 'width: 100%;' : '';
71
- }, " background:", _ref8 => {
72
- let {
73
- theme
74
- } = _ref8;
75
- return theme.colors.neutral.backgroundWeak;
76
- }, ";border-radius:", _ref9 => {
77
- let {
78
- theme
79
- } = _ref9;
80
- return theme.radii.default;
81
- }, ";");
48
+ })("position:relative;display:flex;justify-content:start;max-width:100%;", ({
49
+ multiline
50
+ }) => multiline ? 'width: 100%;' : '', " background:", ({
51
+ theme
52
+ }) => theme.colors.neutral.backgroundWeak, ";border-radius:", ({
53
+ theme
54
+ }) => theme.radii.default, ";");
82
55
  const StyledStack = /*#__PURE__*/_styled(Stack, {
83
56
  target: "e1q0gj905"
84
57
  })(process.env.NODE_ENV === "production" ? {
@@ -92,53 +65,32 @@ const StyledStack = /*#__PURE__*/_styled(Stack, {
92
65
  const ButtonContainer = /*#__PURE__*/_styled('div', {
93
66
  shouldForwardProp: prop => !['multiline'].includes(prop),
94
67
  target: "e1q0gj904"
95
- })("position:absolute;top:0;right:0;padding:", _ref10 => {
96
- let {
97
- theme,
98
- multiline
99
- } = _ref10;
100
- return `${theme.space[multiline ? '2' : '1']} ${theme.space['2']} 0 0`;
101
- }, ";background:", _ref11 => {
102
- let {
103
- theme
104
- } = _ref11;
105
- return theme.colors.neutral.backgroundWeak;
106
- }, ";border-radius:", _ref12 => {
107
- let {
108
- theme
109
- } = _ref12;
110
- return theme.radii.default;
111
- }, ";border:2px solid transparent;", _ref13 => {
112
- let {
113
- multiline,
114
- theme
115
- } = _ref13;
116
- return !multiline ? `box-shadow: -27px 0 19px -11px ${theme.colors.neutral.backgroundWeak}` : '';
117
- }, ";");
68
+ })("position:absolute;top:0;right:0;padding:", ({
69
+ theme,
70
+ multiline
71
+ }) => `${theme.space[multiline ? '2' : '1']} ${theme.space['2']} 0 0`, ";background:", ({
72
+ theme
73
+ }) => theme.colors.neutral.backgroundWeak, ";border-radius:", ({
74
+ theme
75
+ }) => theme.radii.default, ";border:2px solid transparent;", ({
76
+ multiline,
77
+ theme
78
+ }) => !multiline ? `box-shadow: -27px 0 19px -11px ${theme.colors.neutral.backgroundWeak}` : '', ";");
118
79
  const ShowMoreContainer = /*#__PURE__*/_styled('div', {
119
80
  shouldForwardProp: prop => !['showMore'].includes(prop),
120
81
  target: "e1q0gj903"
121
- })("width:100%;box-shadow:", _ref14 => {
122
- let {
123
- theme,
124
- showMore
125
- } = _ref14;
126
- return !showMore ? `0px -22px 19px -6px
127
- ${theme.colors.neutral.backgroundWeak}` : 'none';
128
- }, ";");
82
+ })("width:100%;box-shadow:", ({
83
+ theme,
84
+ showMore
85
+ }) => !showMore ? `0px -22px 19px -6px
86
+ ${theme.colors.neutral.backgroundWeak}` : 'none', ";");
129
87
  const StyledButton = /*#__PURE__*/_styled("button", {
130
88
  target: "e1q0gj902"
131
- })("width:100%;background:none;border:none;padding:", _ref15 => {
132
- let {
133
- theme
134
- } = _ref15;
135
- return theme.space['2'];
136
- }, ";padding-top:", _ref16 => {
137
- let {
138
- theme
139
- } = _ref16;
140
- return theme.space['1'];
141
- }, ";cursor:pointer;");
89
+ })("width:100%;background:none;border:none;padding:", ({
90
+ theme
91
+ }) => theme.space['2'], ";padding-top:", ({
92
+ theme
93
+ }) => theme.space['1'], ";cursor:pointer;");
142
94
  const AlignCenterText = /*#__PURE__*/_styled(Text, {
143
95
  target: "e1q0gj901"
144
96
  })(process.env.NODE_ENV === "production" ? {
@@ -152,53 +104,46 @@ const AlignCenterText = /*#__PURE__*/_styled(Text, {
152
104
  const AnimatedArrowIcon = /*#__PURE__*/_styled(Icon, {
153
105
  shouldForwardProp: prop => !['showMore'].includes(prop),
154
106
  target: "e1q0gj900"
155
- })("transform:", _ref17 => {
156
- let {
157
- showMore
158
- } = _ref17;
159
- return showMore ? 'rotate(180deg)' : 'rotate(0deg)';
160
- }, ";transform-origin:center;transition:transform 300ms ease-in-out;");
161
- const CodeContent = _ref18 => {
162
- let {
163
- children,
164
- prefix,
165
- multiline,
166
- showMore,
167
- hasShowMoreButton,
168
- lines
169
- } = _ref18;
170
- return jsx(PreText, {
171
- as: "pre",
172
- variant: "code",
173
- multiline: multiline,
174
- hasShowMoreButton: hasShowMoreButton,
175
- showMore: showMore,
176
- children: multiline ? Children.map(lines, child => jsx(StyledSpan, {
177
- multiline: true,
178
- prefix: prefix,
179
- children: child
180
- })) : jsx(StyledSpan, {
181
- prefix: prefix,
182
- children: children
183
- })
184
- });
185
- };
107
+ })("transform:", ({
108
+ showMore
109
+ }) => showMore ? 'rotate(180deg)' : 'rotate(0deg)', ";transform-origin:center;transition:transform 300ms ease-in-out;");
110
+ const CodeContent = ({
111
+ children,
112
+ prefix,
113
+ multiline,
114
+ showMore,
115
+ hasShowMoreButton,
116
+ lines
117
+ }) => jsx(PreText, {
118
+ as: "pre",
119
+ variant: "code",
120
+ multiline: multiline,
121
+ hasShowMoreButton: hasShowMoreButton,
122
+ showMore: showMore,
123
+ children: multiline ? Children.map(lines, child => jsx(StyledSpan, {
124
+ multiline: true,
125
+ prefix: prefix,
126
+ children: child
127
+ })) : jsx(StyledSpan, {
128
+ prefix: prefix,
129
+ children: children
130
+ })
131
+ });
186
132
  /**
187
133
  * Snippet component is used to display code snippets with the ability to copy the code.
188
134
  * It also has the ability to show/hide the code snippet if it has more than 4 lines.
189
135
  */
190
- const Snippet = _ref19 => {
191
- let {
192
- children,
193
- copyText,
194
- copiedText,
195
- showText = 'Show',
196
- hideText = 'Hide',
197
- prefix,
198
- className,
199
- 'data-testid': dataTestId,
200
- initiallyExpanded
201
- } = _ref19;
136
+ const Snippet = ({
137
+ children,
138
+ copyText,
139
+ copiedText,
140
+ showText = 'Show',
141
+ hideText = 'Hide',
142
+ prefix,
143
+ className,
144
+ 'data-testid': dataTestId,
145
+ initiallyExpanded
146
+ }) => {
202
147
  const [showMore, setShowMore] = useReducer(value => !value, initiallyExpanded ?? false);
203
148
  const lines = children.split(LINES_BREAK_REGEX).filter(Boolean);
204
149
  const numberOfLines = lines.length;
@@ -7,18 +7,16 @@ import _styled from '@emotion/styled/base';
7
7
  const Stack = /*#__PURE__*/_styled('div', {
8
8
  shouldForwardProp: prop => !['gap', 'direction', 'alignItems', 'justifyContent', 'wrap', 'width'].includes(prop),
9
9
  target: "ehpbis70"
10
- })("display:flex;", _ref => {
11
- let {
12
- theme,
13
- gap = 0,
14
- direction = 'column',
15
- alignItems = 'normal',
16
- justifyContent = 'normal',
17
- wrap = 'nowrap',
18
- width,
19
- flex
20
- } = _ref;
21
- return `
10
+ })("display:flex;", ({
11
+ theme,
12
+ gap = 0,
13
+ direction = 'column',
14
+ alignItems = 'normal',
15
+ justifyContent = 'normal',
16
+ wrap = 'nowrap',
17
+ width,
18
+ flex
19
+ }) => `
22
20
  gap: ${theme.space[gap]};
23
21
  flex-direction: ${direction};
24
22
  align-items: ${alignItems};
@@ -26,7 +24,6 @@ const Stack = /*#__PURE__*/_styled('div', {
26
24
  flex-wrap: ${typeof wrap === 'boolean' ? 'wrap' : wrap};
27
25
  ${flex ? `flex: ${flex};` : ''}
28
26
  ${width ? `width: ${width};` : ''}
29
- `;
30
- }, ";");
27
+ `, ";");
31
28
 
32
29
  export { Stack };
@@ -6,99 +6,69 @@ import { ping } from '../../utils/animations.js';
6
6
  const HEIGHT = '10px';
7
7
  const WIDTH = '10px';
8
8
  const sentiments = {
9
- danger: _ref => {
10
- let {
11
- theme
12
- } = _ref;
13
- return `
9
+ danger: ({
10
+ theme
11
+ }) => `
14
12
  background-color: ${theme.colors.danger.backgroundStrong};
15
- `;
16
- },
17
- info: _ref2 => {
18
- let {
19
- theme
20
- } = _ref2;
21
- return `
13
+ `,
14
+ info: ({
15
+ theme
16
+ }) => `
22
17
  background-color: ${theme.colors.info.backgroundStrong};
23
- `;
24
- },
25
- neutral: _ref3 => {
26
- let {
27
- theme
28
- } = _ref3;
29
- return `
18
+ `,
19
+ neutral: ({
20
+ theme
21
+ }) => `
30
22
  background-color: ${theme.colors.neutral.backgroundStronger};
31
- `;
32
- },
33
- success: _ref4 => {
34
- let {
35
- theme
36
- } = _ref4;
37
- return `
23
+ `,
24
+ success: ({
25
+ theme
26
+ }) => `
38
27
  background-color: ${theme.colors.success.backgroundStrong};
39
- `;
40
- },
41
- warning: _ref5 => {
42
- let {
43
- theme
44
- } = _ref5;
45
- return `
28
+ `,
29
+ warning: ({
30
+ theme
31
+ }) => `
46
32
  background-color: ${theme.colors.warning.backgroundStrong};
47
- `;
48
- }
33
+ `
49
34
  };
50
35
  const StyledCircle = /*#__PURE__*/_styled("span", {
51
36
  target: "eny0xmn2"
52
- })("display:inline-block;width:", WIDTH, ";height:", HEIGHT, ";border-radius:", _ref6 => {
53
- let {
54
- theme
55
- } = _ref6;
56
- return theme.radii.circle;
57
- }, ";", _ref7 => {
58
- let {
59
- sentiment
60
- } = _ref7;
61
- return sentiments[sentiment];
62
- }, ";");
37
+ })("display:inline-block;width:", WIDTH, ";height:", HEIGHT, ";border-radius:", ({
38
+ theme
39
+ }) => theme.radii.circle, ";", ({
40
+ sentiment
41
+ }) => sentiments[sentiment], ";");
63
42
  const StyledAnimatedCircle = /*#__PURE__*/_styled("span", {
64
43
  target: "eny0xmn1"
65
- })("position:absolute;width:", WIDTH, ";height:", HEIGHT, ";opacity:0.75;border-radius:", _ref8 => {
66
- let {
67
- theme
68
- } = _ref8;
69
- return theme.radii.circle;
70
- }, ";animation:", ping, " 1.1s cubic-bezier(0, 0, 0.2, 1) infinite;", _ref9 => {
71
- let {
72
- sentiment
73
- } = _ref9;
74
- return sentiments[sentiment];
75
- }, ";");
44
+ })("position:absolute;width:", WIDTH, ";height:", HEIGHT, ";opacity:0.75;border-radius:", ({
45
+ theme
46
+ }) => theme.radii.circle, ";animation:", ping, " 1.1s cubic-bezier(0, 0, 0.2, 1) infinite;", ({
47
+ sentiment
48
+ }) => sentiments[sentiment], ";");
76
49
  const Container = /*#__PURE__*/_styled("span", {
77
50
  target: "eny0xmn0"
78
51
  })("display:flex;width:", WIDTH, ";height:", HEIGHT, ";");
79
52
  /**
80
53
  * Status component used to display a colored circle with a tooltip for additional information.
81
54
  */
82
- const Status = _ref10 => {
83
- let {
84
- animated = false,
85
- className,
86
- tooltip,
87
- sentiment,
88
- 'data-testid': dataTestId
89
- } = _ref10;
90
- return jsx(Tooltip, {
91
- text: tooltip,
92
- children: jsxs(Container, {
93
- className: className,
94
- "data-testid": dataTestId,
95
- children: [animated ? jsx(StyledAnimatedCircle, {
96
- sentiment: sentiment
97
- }) : null, jsx(StyledCircle, {
98
- sentiment: sentiment
99
- })]
100
- })
101
- });
102
- };
55
+ const Status = ({
56
+ animated = false,
57
+ className,
58
+ tooltip,
59
+ sentiment,
60
+ 'data-testid': dataTestId
61
+ }) => jsx(Tooltip, {
62
+ text: tooltip,
63
+ children: jsxs(Container, {
64
+ className: className,
65
+ "data-testid": dataTestId,
66
+ children: [animated ? jsx(StyledAnimatedCircle, {
67
+ sentiment: sentiment
68
+ }) : null, jsx(StyledCircle, {
69
+ sentiment: sentiment
70
+ })]
71
+ })
72
+ });
103
73
 
104
74
  export { Status };