@ultraviolet/ui 1.28.0 → 1.29.1

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 (112) hide show
  1. package/README.md +14 -7
  2. package/dist/index.d.ts +61 -12
  3. package/dist/react-datepicker/dist/react-datepicker.min.css.js +1 -1
  4. package/dist/src/components/ActionBar/index.js +22 -37
  5. package/dist/src/components/Alert/index.js +27 -41
  6. package/dist/src/components/Avatar/index.js +48 -69
  7. package/dist/src/components/Badge/index.js +29 -49
  8. package/dist/src/components/Banner/index.js +42 -62
  9. package/dist/src/components/BarChart/Tooltip.js +35 -50
  10. package/dist/src/components/BarChart/index.js +13 -14
  11. package/dist/src/components/BarStack/index.js +100 -191
  12. package/dist/src/components/Breadcrumbs/index.js +29 -39
  13. package/dist/src/components/Bullet/index.js +42 -55
  14. package/dist/src/components/Button/index.js +73 -99
  15. package/dist/src/components/Card/index.js +39 -57
  16. package/dist/src/components/Carousel/index.js +32 -60
  17. package/dist/src/components/Checkbox/index.js +153 -341
  18. package/dist/src/components/CheckboxGroup/index.js +25 -27
  19. package/dist/src/components/CopyButton/index.js +11 -12
  20. package/dist/src/components/DateInput/index.js +141 -268
  21. package/dist/src/components/EmptyState/index.js +68 -83
  22. package/dist/src/components/Expandable/index.js +13 -20
  23. package/dist/src/components/GlobalAlert/GlobalAlertLink.js +12 -13
  24. package/dist/src/components/GlobalAlert/index.js +19 -32
  25. package/dist/src/components/LineChart/CustomLegend.js +80 -89
  26. package/dist/src/components/LineChart/Tooltip.js +32 -47
  27. package/dist/src/components/LineChart/helpers.js +15 -50
  28. package/dist/src/components/LineChart/index.js +23 -33
  29. package/dist/src/components/Link/index.js +46 -65
  30. package/dist/src/components/List/Body.js +9 -15
  31. package/dist/src/components/List/Cell.js +6 -7
  32. package/dist/src/components/List/HeaderCell.js +28 -56
  33. package/dist/src/components/List/HeaderRow.js +9 -16
  34. package/dist/src/components/List/ListContext.js +5 -6
  35. package/dist/src/components/List/Row.js +44 -90
  36. package/dist/src/components/List/SelectBar.js +9 -13
  37. package/dist/src/components/List/SkeletonRows.js +5 -6
  38. package/dist/src/components/List/index.js +15 -25
  39. package/dist/src/components/Loader/index.js +18 -25
  40. package/dist/src/components/Menu/Item.js +39 -49
  41. package/dist/src/components/Menu/index.js +31 -56
  42. package/dist/src/components/MenuV2/Item.js +39 -49
  43. package/dist/src/components/MenuV2/index.js +28 -47
  44. package/dist/src/components/Meter/index.js +25 -47
  45. package/dist/src/components/Modal/Dialog.js +33 -58
  46. package/dist/src/components/Modal/Disclosure.js +8 -9
  47. package/dist/src/components/Modal/index.js +26 -33
  48. package/dist/src/components/Notice/index.js +21 -27
  49. package/dist/src/components/NumberInput/index.js +73 -137
  50. package/dist/src/components/Pagination/getPageNumbers.js +1 -4
  51. package/dist/src/components/Pagination/index.js +17 -27
  52. package/dist/src/components/PasswordCheck/index.js +26 -32
  53. package/dist/src/components/PasswordStrengthMeter/index.js +25 -44
  54. package/dist/src/components/PieChart/Legends.js +71 -107
  55. package/dist/src/components/PieChart/Tooltip.js +33 -36
  56. package/dist/src/components/PieChart/index.js +13 -17
  57. package/dist/src/components/Popover/index.js +58 -75
  58. package/dist/src/components/Popup/helpers.js +13 -15
  59. package/dist/src/components/Popup/index.js +55 -98
  60. package/dist/src/components/ProgressBar/index.js +31 -49
  61. package/dist/src/components/Radio/index.js +58 -113
  62. package/dist/src/components/RadioGroup/index.js +26 -28
  63. package/dist/src/components/Row/index.js +25 -31
  64. package/dist/src/components/SelectInput/index.js +357 -410
  65. package/dist/src/components/SelectableCard/index.js +60 -111
  66. package/dist/src/components/Separator/index.js +52 -73
  67. package/dist/src/components/Skeleton/Block.js +23 -41
  68. package/dist/src/components/Skeleton/Blocks.js +23 -41
  69. package/dist/src/components/Skeleton/BoxWithIcon.js +21 -36
  70. package/dist/src/components/Skeleton/Donut.js +3 -6
  71. package/dist/src/components/Skeleton/IconSkeleton.js +13 -31
  72. package/dist/src/components/Skeleton/Line.js +5 -11
  73. package/dist/src/components/Skeleton/List.js +22 -31
  74. package/dist/src/components/Skeleton/Slider.js +25 -46
  75. package/dist/src/components/Skeleton/Square.js +3 -6
  76. package/dist/src/components/Skeleton/index.js +17 -33
  77. package/dist/src/components/Snippet/index.js +82 -137
  78. package/dist/src/components/Stack/index.js +11 -14
  79. package/dist/src/components/Status/index.js +48 -78
  80. package/dist/src/components/StepList/index.js +45 -63
  81. package/dist/src/components/Stepper/index.js +74 -129
  82. package/dist/src/components/SwitchButton/FocusOverlay.js +13 -23
  83. package/dist/src/components/SwitchButton/index.js +36 -62
  84. package/dist/src/components/Table/Body.js +5 -8
  85. package/dist/src/components/Table/Cell.js +14 -20
  86. package/dist/src/components/Table/Header.js +8 -14
  87. package/dist/src/components/Table/HeaderCell.js +40 -56
  88. package/dist/src/components/Table/HeaderRow.js +4 -5
  89. package/dist/src/components/Table/Row.js +10 -14
  90. package/dist/src/components/Table/SelectBar.js +9 -13
  91. package/dist/src/components/Table/SkeletonRows.js +5 -6
  92. package/dist/src/components/Table/TableContext.js +6 -7
  93. package/dist/src/components/Table/index.js +44 -50
  94. package/dist/src/components/Tabs/Tab.js +57 -118
  95. package/dist/src/components/Tabs/TabMenu.js +32 -38
  96. package/dist/src/components/Tabs/TabMenuItem.js +9 -13
  97. package/dist/src/components/Tabs/index.js +24 -43
  98. package/dist/src/components/Tag/index.js +57 -74
  99. package/dist/src/components/TagInput/index.js +63 -94
  100. package/dist/src/components/TagList/index.js +22 -35
  101. package/dist/src/components/Text/index.js +29 -31
  102. package/dist/src/components/TextArea/index.js +240 -0
  103. package/dist/src/components/TextInput/index.js +166 -260
  104. package/dist/src/components/TimeInput/index.js +10 -13
  105. package/dist/src/components/Toaster/index.js +51 -67
  106. package/dist/src/components/Toggle/index.js +62 -129
  107. package/dist/src/components/ToggleGroup/index.js +21 -23
  108. package/dist/src/components/Tooltip/index.js +28 -31
  109. package/dist/src/components/VerificationCode/index.js +55 -90
  110. package/dist/src/index.js +1 -0
  111. package/dist/src/utils/ids.js +1 -6
  112. package/package.json +6 -6
@@ -4,79 +4,61 @@ import { jsx, jsxs } from '@emotion/react/jsx-runtime';
4
4
 
5
5
  const Steps = /*#__PURE__*/_styled("ul", {
6
6
  target: "ewuati22"
7
- })("list-style:none;padding-left:0;text-align:left;display:flex;flex-direction:column;gap:", _ref => {
8
- let {
9
- theme
10
- } = _ref;
11
- return theme.space['3'];
12
- }, ";font-size:16px;");
7
+ })("list-style:none;padding-left:0;text-align:left;display:flex;flex-direction:column;gap:", ({
8
+ theme
9
+ }) => theme.space['3'], ";font-size:16px;");
13
10
  const Step = /*#__PURE__*/_styled('li', {
14
11
  shouldForwardProp: prop => !['disabled'].includes(prop),
15
12
  target: "ewuati21"
16
- })("display:flex;align-items:flex-start;gap:1rem;justify-content:center;color:", _ref2 => {
17
- let {
18
- theme,
19
- disabled
20
- } = _ref2;
21
- return disabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.textStrong;
22
- }, ";");
13
+ })("display:flex;align-items:flex-start;gap:1rem;justify-content:center;color:", ({
14
+ theme,
15
+ disabled
16
+ }) => disabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.textStrong, ";");
23
17
  const StyledDiv = /*#__PURE__*/_styled('div', {
24
18
  shouldForwardProp: prop => !['size'].includes(prop),
25
19
  target: "ewuati20"
26
- })("flex:1;margin:auto;line-height:", _ref3 => {
27
- let {
28
- size
29
- } = _ref3;
30
- return size === 'medium' ? '32px' : '24px';
31
- }, ";font-size:", _ref4 => {
32
- let {
33
- size
34
- } = _ref4;
35
- return size === 'medium' ? '24px' : '16px';
36
- }, ";");
37
- const Item = _ref5 => {
38
- let {
39
- bulletText,
40
- bulletIcon,
41
- sentiment,
42
- children,
43
- size = 'medium',
44
- disabled = false,
45
- className
46
- } = _ref5;
47
- return jsxs(Step, {
48
- disabled: disabled,
49
- className: className,
50
- children: [bulletIcon ? jsx(Bullet, {
51
- icon: bulletIcon,
52
- size: size,
53
- sentiment: disabled ? 'disabled' : sentiment
54
- }) : null, bulletText ? jsx(Bullet, {
55
- text: bulletText,
56
- size: size,
57
- sentiment: disabled ? 'disabled' : sentiment
58
- }) : null, jsx(StyledDiv, {
59
- size: size,
60
- children: children
61
- })]
62
- });
63
- };
20
+ })("flex:1;margin:auto;line-height:", ({
21
+ size
22
+ }) => size === 'medium' ? '32px' : '24px', ";font-size:", ({
23
+ size
24
+ }) => size === 'medium' ? '24px' : '16px', ";");
25
+ const Item = ({
26
+ bulletText,
27
+ bulletIcon,
28
+ sentiment,
29
+ children,
30
+ size = 'medium',
31
+ disabled = false,
32
+ className
33
+ }) => jsxs(Step, {
34
+ disabled: disabled,
35
+ className: className,
36
+ children: [bulletIcon ? jsx(Bullet, {
37
+ icon: bulletIcon,
38
+ size: size,
39
+ sentiment: disabled ? 'disabled' : sentiment
40
+ }) : null, bulletText ? jsx(Bullet, {
41
+ text: bulletText,
42
+ size: size,
43
+ sentiment: disabled ? 'disabled' : sentiment
44
+ }) : null, jsx(StyledDiv, {
45
+ size: size,
46
+ children: children
47
+ })]
48
+ });
64
49
  /**
65
50
  * StepList component is used to display a list of steps.
66
51
  * @experimental This component is experimental and may be subject to breaking changes in the future.
67
52
  */
68
- const StepList = _ref6 => {
69
- let {
70
- children,
71
- className,
72
- 'data-testid': dataTestId
73
- } = _ref6;
74
- return jsx(Steps, {
75
- className: className,
76
- "data-testid": dataTestId,
77
- children: children
78
- });
79
- };
53
+ const StepList = ({
54
+ children,
55
+ className,
56
+ 'data-testid': dataTestId
57
+ }) => jsx(Steps, {
58
+ className: className,
59
+ "data-testid": dataTestId,
60
+ children: children
61
+ });
80
62
  StepList.Item = Item;
81
63
 
82
64
  export { StepList };
@@ -31,145 +31,90 @@ const StyledStepContainer = /*#__PURE__*/_styled("div", {
31
31
  });
32
32
  const StyledText = /*#__PURE__*/_styled(Text, {
33
33
  target: "e19ft7rb3"
34
- })("margin-top:", _ref => {
35
- let {
36
- theme
37
- } = _ref;
38
- return theme.space['1'];
39
- }, ";");
34
+ })("margin-top:", ({
35
+ theme
36
+ }) => theme.space['1'], ";");
40
37
  const StyledBullet = /*#__PURE__*/_styled(Bullet, {
41
38
  target: "e19ft7rb2"
42
- })("margin-top:", _ref2 => {
43
- let {
44
- theme,
45
- size
46
- } = _ref2;
47
- return size === 'small' ? theme.space['0.5'] : 0;
48
- }, ";");
39
+ })("margin-top:", ({
40
+ theme,
41
+ size
42
+ }) => size === 'small' ? theme.space['0.5'] : 0, ";");
49
43
  const loadingStyle = /*#__PURE__*/css("animation:", loadingAnimation, " 1s linear infinite;");
50
44
  const StyledLine = /*#__PURE__*/_styled("div", {
51
45
  target: "e19ft7rb1"
52
- })("border-radius:", _ref3 => {
53
- let {
54
- theme
55
- } = _ref3;
56
- return theme.radii.default;
57
- }, ";flex-grow:1;border-radius:", _ref4 => {
58
- let {
59
- theme
60
- } = _ref4;
61
- return theme.radii.default;
62
- }, ";background-color:", _ref5 => {
63
- let {
64
- theme
65
- } = _ref5;
66
- return theme.colors.neutral.backgroundStrong;
67
- }, ";position:relative;::after{content:'';position:absolute;left:0;top:0;height:100%;border-radius:", _ref6 => {
68
- let {
69
- theme
70
- } = _ref6;
71
- return theme.radii.default;
72
- }, ";background-color:", _ref7 => {
73
- let {
74
- theme
75
- } = _ref7;
76
- return theme.colors.primary.backgroundStrong;
77
- }, ";", _ref8 => {
78
- let {
79
- temporal
80
- } = _ref8;
81
- return temporal === 'previous' && `width: 100%;`;
82
- }, " ", _ref9 => {
83
- let {
84
- temporal,
85
- animated
86
- } = _ref9;
87
- return temporal === 'current' && animated && loadingStyle;
88
- }, ";}");
46
+ })("border-radius:", ({
47
+ theme
48
+ }) => theme.radii.default, ";flex-grow:1;border-radius:", ({
49
+ theme
50
+ }) => theme.radii.default, ";background-color:", ({
51
+ theme
52
+ }) => theme.colors.neutral.backgroundStrong, ";position:relative;::after{content:'';position:absolute;left:0;top:0;height:100%;border-radius:", ({
53
+ theme
54
+ }) => theme.radii.default, ";background-color:", ({
55
+ theme
56
+ }) => theme.colors.primary.backgroundStrong, ";", ({
57
+ temporal
58
+ }) => temporal === 'previous' && `width: 100%;`, " ", ({
59
+ temporal,
60
+ animated
61
+ }) => temporal === 'current' && animated && loadingStyle, ";}");
89
62
  const StyledContainer = /*#__PURE__*/_styled("div", {
90
63
  target: "e19ft7rb0"
91
- })("display:flex;flex-direction:row;justify-content:center;align-items:flex-start;gap:0 ", _ref10 => {
92
- let {
93
- theme
94
- } = _ref10;
95
- return theme.space['1'];
96
- }, ";gap:", _ref11 => {
97
- let {
98
- theme,
99
- labelPosition,
100
- size
101
- } = _ref11;
102
- return size === 'medium' && labelPosition === 'bottom' ? theme.space['0'] : theme.space['1'];
103
- }, ";", StyledStepContainer, "{display:flex;flex-direction:", _ref12 => {
104
- let {
105
- labelPosition
106
- } = _ref12;
107
- return labelPosition === 'bottom' ? 'column' : 'row';
108
- }, ";align-items:", _ref13 => {
109
- let {
110
- labelPosition
111
- } = _ref13;
112
- return labelPosition === 'bottom' ? 'center' : 'baseline';
113
- }, ";gap:", _ref14 => {
114
- let {
115
- theme,
116
- labelPosition
117
- } = _ref14;
118
- return labelPosition === 'bottom' ? theme.space['0.5'] : theme.space['1'];
119
- }, ";white-space:nowrap;}", StyledLine, "{height:", _ref15 => {
120
- let {
121
- size
122
- } = _ref15;
123
- return LINE_HEIGHT_SIZES[size];
124
- }, "px;margin-top:", _ref16 => {
125
- let {
126
- theme
127
- } = _ref16;
128
- return theme.space['2'];
129
- }, ";margin-bottom:", _ref17 => {
130
- let {
131
- theme
132
- } = _ref17;
133
- return theme.space['2'];
134
- }, ";}");
135
- const StepperNumbers = _ref18 => {
136
- let {
137
- temporal,
138
- children,
139
- CurrentStep,
140
- size = 'medium'
141
- } = _ref18;
142
- return jsxs(StyledStepContainer, {
143
- children: [jsx(StyledBullet, {
144
- sentiment: temporal === 'next' ? 'neutral' : 'primary',
145
- ...(temporal === 'previous' ? {
146
- icon: 'check'
147
- } : {
148
- text: CurrentStep.toString()
149
- }),
150
- prominence: temporal !== 'current' ? 'default' : 'strong',
151
- size: size
152
- }), jsx(StyledText, {
153
- as: "span",
154
- variant: size === 'medium' ? 'body' : 'bodySmall',
155
- prominence: temporal === 'next' ? 'weak' : 'default',
156
- children: children
157
- })]
158
- });
159
- };
64
+ })("display:flex;flex-direction:row;justify-content:center;align-items:flex-start;gap:0 ", ({
65
+ theme
66
+ }) => theme.space['1'], ";gap:", ({
67
+ theme,
68
+ labelPosition,
69
+ size
70
+ }) => size === 'medium' && labelPosition === 'bottom' ? theme.space['0'] : theme.space['1'], ";", StyledStepContainer, "{display:flex;flex-direction:", ({
71
+ labelPosition
72
+ }) => labelPosition === 'bottom' ? 'column' : 'row', ";align-items:", ({
73
+ labelPosition
74
+ }) => labelPosition === 'bottom' ? 'center' : 'baseline', ";gap:", ({
75
+ theme,
76
+ labelPosition
77
+ }) => labelPosition === 'bottom' ? theme.space['0.5'] : theme.space['1'], ";white-space:nowrap;}", StyledLine, "{height:", ({
78
+ size
79
+ }) => LINE_HEIGHT_SIZES[size], "px;margin-top:", ({
80
+ theme
81
+ }) => theme.space['2'], ";margin-bottom:", ({
82
+ theme
83
+ }) => theme.space['2'], ";}");
84
+ const StepperNumbers = ({
85
+ temporal,
86
+ children,
87
+ CurrentStep,
88
+ size = 'medium'
89
+ }) => jsxs(StyledStepContainer, {
90
+ children: [jsx(StyledBullet, {
91
+ sentiment: temporal === 'next' ? 'neutral' : 'primary',
92
+ ...(temporal === 'previous' ? {
93
+ icon: 'check'
94
+ } : {
95
+ text: CurrentStep.toString()
96
+ }),
97
+ prominence: temporal !== 'current' ? 'default' : 'strong',
98
+ size: size
99
+ }), jsx(StyledText, {
100
+ as: "span",
101
+ variant: size === 'medium' ? 'body' : 'bodySmall',
102
+ prominence: temporal === 'next' ? 'weak' : 'default',
103
+ children: children
104
+ })]
105
+ });
160
106
  /**
161
107
  * Stepper component to show the progress of a process in a linear way.
162
108
  */
163
- const Stepper = _ref19 => {
164
- let {
165
- children,
166
- selected = 0,
167
- animated = false,
168
- className,
169
- labelPosition = 'bottom',
170
- size = 'medium',
171
- 'data-testid': dataTestId
172
- } = _ref19;
109
+ const Stepper = ({
110
+ children,
111
+ selected = 0,
112
+ animated = false,
113
+ className,
114
+ labelPosition = 'bottom',
115
+ size = 'medium',
116
+ 'data-testid': dataTestId
117
+ }) => {
173
118
  const lastStep = Children.count(children) - 1;
174
119
  return jsx(StyledContainer, {
175
120
  className: className,
@@ -6,29 +6,19 @@ const FOCUS_OVERLAY_SCALE_RATIO = 6;
6
6
  const FOCUS_OVERLAY_PIXEL_RIGHT_OFFSET = 8;
7
7
  const StyledDiv = /*#__PURE__*/_styled("div", {
8
8
  target: "etutiin0"
9
- })("position:absolute;height:calc(100% - ", _ref => {
10
- let {
11
- theme
12
- } = _ref;
13
- return theme.space['1'];
14
- }, ");border-radius:", _ref2 => {
15
- let {
16
- theme
17
- } = _ref2;
18
- return theme.radii.default;
19
- }, ";background:", _ref3 => {
20
- let {
21
- theme
22
- } = _ref3;
23
- return theme.colors.primary.backgroundStrong;
24
- }, ";transform-origin:left center;transition:all 200ms ease-in-out;&[data-focusposition='right']{transform-origin:right center;}");
25
- const FocusOverlay = _ref4 => {
26
- let {
27
- focusPosition,
28
- rightCardWidth,
29
- leftCardWidth,
30
- hasMouseDown
31
- } = _ref4;
9
+ })("position:absolute;height:calc(100% - ", ({
10
+ theme
11
+ }) => theme.space['1'], ");border-radius:", ({
12
+ theme
13
+ }) => theme.radii.default, ";background:", ({
14
+ theme
15
+ }) => theme.colors.primary.backgroundStrong, ";transform-origin:left center;transition:all 200ms ease-in-out;&[data-focusposition='right']{transform-origin:right center;}");
16
+ const FocusOverlay = ({
17
+ focusPosition,
18
+ rightCardWidth,
19
+ leftCardWidth,
20
+ hasMouseDown
21
+ }) => {
32
22
  const translateXValue = useMemo(() => focusPosition === 'left' ? 0 : leftCardWidth + FOCUS_OVERLAY_PIXEL_RIGHT_OFFSET, [focusPosition, leftCardWidth]);
33
23
  const getScaleXValue = () => {
34
24
  if (!hasMouseDown || !leftCardWidth || !rightCardWidth) return 1;
@@ -7,71 +7,43 @@ import { jsx, jsxs } from '@emotion/react/jsx-runtime';
7
7
 
8
8
  const StyledBorderedBox = /*#__PURE__*/_styled("div", {
9
9
  target: "e4ryteh1"
10
- })("border:1px solid ", _ref => {
11
- let {
12
- theme
13
- } = _ref;
14
- return theme.colors.neutral.border;
15
- }, ";border-radius:", _ref2 => {
16
- let {
17
- theme
18
- } = _ref2;
19
- return theme.radii.default;
20
- }, ";padding:", _ref3 => {
21
- let {
22
- theme
23
- } = _ref3;
24
- return theme.space['0.5'];
25
- }, ";display:flex;gap:", _ref4 => {
26
- let {
27
- theme
28
- } = _ref4;
29
- return theme.space['1'];
30
- }, ";position:relative;");
10
+ })("border:1px solid ", ({
11
+ theme
12
+ }) => theme.colors.neutral.border, ";border-radius:", ({
13
+ theme
14
+ }) => theme.radii.default, ";padding:", ({
15
+ theme
16
+ }) => theme.space['0.5'], ";display:flex;gap:", ({
17
+ theme
18
+ }) => theme.space['1'], ";position:relative;");
31
19
  const StyledSelectableCard = /*#__PURE__*/_styled(SelectableCard, {
32
20
  target: "e4ryteh0"
33
- })("border:none;height:40px;padding:", _ref5 => {
34
- let {
35
- theme
36
- } = _ref5;
37
- return theme.space['1'];
38
- }, " ", _ref6 => {
39
- let {
40
- theme
41
- } = _ref6;
42
- return theme.space['2'];
43
- }, ";font-weight:", _ref7 => {
44
- let {
45
- theme
46
- } = _ref7;
47
- return theme.typography.bodyStrong.weight;
48
- }, ";justify-content:center;align-items:center;transition:all 200ms ease-in-out;&:hover,&:focus-within,&:active{box-shadow:none;border:none;&:not([data-error='true'][data-disabled='true']){border:none;}}&[data-checked='true']{border:none;}&[data-checked='true'] label{color:", _ref8 => {
49
- let {
50
- theme
51
- } = _ref8;
52
- return theme.colors.primary.textStrong;
53
- }, ";}&:not([data-checked='true']) label{&:hover{color:", _ref9 => {
54
- let {
55
- theme
56
- } = _ref9;
57
- return theme.colors.primary.text;
58
- }, ";}}");
21
+ })("border:none;height:40px;padding:", ({
22
+ theme
23
+ }) => theme.space['1'], " ", ({
24
+ theme
25
+ }) => theme.space['2'], ";font-weight:", ({
26
+ theme
27
+ }) => theme.typography.bodyStrong.weight, ";justify-content:center;align-items:center;transition:all 200ms ease-in-out;&:hover,&:focus-within,&:active{box-shadow:none;border:none;&:not([data-error='true'][data-disabled='true']){border:none;}}&[data-checked='true']{border:none;}&[data-checked='true'] label{color:", ({
28
+ theme
29
+ }) => theme.colors.primary.textStrong, ";}&:not([data-checked='true']) label{&:hover{color:", ({
30
+ theme
31
+ }) => theme.colors.primary.text, ";}}");
59
32
  /**
60
33
  * SwitchButton is a component that allows the user to select between two options.
61
34
  */
62
- const SwitchButton = _ref10 => {
63
- let {
64
- value,
65
- onChange,
66
- onFocus,
67
- onBlur,
68
- name,
69
- leftButton,
70
- rightButton,
71
- tooltip,
72
- className,
73
- 'data-testid': dataTestId
74
- } = _ref10;
35
+ const SwitchButton = ({
36
+ value,
37
+ onChange,
38
+ onFocus,
39
+ onBlur,
40
+ name,
41
+ leftButton,
42
+ rightButton,
43
+ tooltip,
44
+ className,
45
+ 'data-testid': dataTestId
46
+ }) => {
75
47
  const leftButtonRef = useRef(null);
76
48
  const rightButtonRef = useRef(null);
77
49
  const [leftCardWidth, setLeftCardWidth] = useState();
@@ -114,7 +86,8 @@ const SwitchButton = _ref10 => {
114
86
  onBlur: onBlur,
115
87
  onFocus: onFocus,
116
88
  "data-checked": localValue === leftButton.value,
117
- label: leftButton.label
89
+ label: leftButton.label,
90
+ "data-testid": dataTestId ? `${dataTestId}-left` : undefined
118
91
  }), jsx(StyledSelectableCard, {
119
92
  ref: rightButtonRef,
120
93
  name: name,
@@ -124,7 +97,8 @@ const SwitchButton = _ref10 => {
124
97
  onBlur: onBlur,
125
98
  onFocus: onFocus,
126
99
  "data-checked": localValue === rightButton.value,
127
- label: rightButton.label
100
+ label: rightButton.label,
101
+ "data-testid": dataTestId ? `${dataTestId}-right` : undefined
128
102
  })]
129
103
  })
130
104
  })
@@ -1,12 +1,9 @@
1
1
  import { jsx } from '@emotion/react/jsx-runtime';
2
2
 
3
- const Body = _ref => {
4
- let {
5
- children
6
- } = _ref;
7
- return jsx("tbody", {
8
- children: children
9
- });
10
- };
3
+ const Body = ({
4
+ children
5
+ }) => jsx("tbody", {
6
+ children: children
7
+ });
11
8
 
12
9
  export { Body };
@@ -3,25 +3,19 @@ import { jsx } from '@emotion/react/jsx-runtime';
3
3
 
4
4
  const StyledCell = /*#__PURE__*/_styled('td', {
5
5
  target: "e78o8ww0"
6
- })("padding:", _ref => {
7
- let {
8
- theme
9
- } = _ref;
10
- return theme.space['1'];
11
- }, ";font-size:14px;");
12
- const Cell = _ref2 => {
13
- let {
14
- children,
15
- className,
16
- colSpan,
17
- rowSpan
18
- } = _ref2;
19
- return jsx(StyledCell, {
20
- className: className,
21
- colSpan: colSpan,
22
- rowSpan: rowSpan,
23
- children: children
24
- });
25
- };
6
+ })("padding:", ({
7
+ theme
8
+ }) => theme.space['1'], ";font-size:14px;");
9
+ const Cell = ({
10
+ children,
11
+ className,
12
+ colSpan,
13
+ rowSpan
14
+ }) => jsx(StyledCell, {
15
+ className: className,
16
+ colSpan: colSpan,
17
+ rowSpan: rowSpan,
18
+ children: children
19
+ });
26
20
 
27
21
  export { Cell };
@@ -3,19 +3,13 @@ import { jsx } from '@emotion/react/jsx-runtime';
3
3
 
4
4
  const StyledHeader = /*#__PURE__*/_styled('thead', {
5
5
  target: "ekxedod0"
6
- })("border-bottom:1px solid ", _ref => {
7
- let {
8
- theme
9
- } = _ref;
10
- return theme.colors.neutral.border;
11
- }, ";");
12
- const Header = _ref2 => {
13
- let {
14
- children
15
- } = _ref2;
16
- return jsx(StyledHeader, {
17
- children: children
18
- });
19
- };
6
+ })("border-bottom:1px solid ", ({
7
+ theme
8
+ }) => theme.colors.neutral.border, ";");
9
+ const Header = ({
10
+ children
11
+ }) => jsx(StyledHeader, {
12
+ children: children
13
+ });
20
14
 
21
15
  export { Header };