@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
@@ -14,80 +14,38 @@ function noop() {}
14
14
  const StyledPopup = /*#__PURE__*/_styled('div', {
15
15
  shouldForwardProp: prop => !['maxWidth', 'positions', 'reverseAnimation', 'maxHeight', 'animationDuration', 'isDialog'].includes(prop),
16
16
  target: "e4h1g861"
17
- })("background:", _ref => {
18
- let {
19
- theme
20
- } = _ref;
21
- return theme.colors.neutral.backgroundStronger;
22
- }, ";color:", _ref2 => {
23
- let {
24
- theme
25
- } = _ref2;
26
- return theme.colors.neutral.textStronger;
27
- }, ";border-radius:", _ref3 => {
28
- let {
29
- theme
30
- } = _ref3;
31
- return theme.radii.default;
32
- }, ";padding:", _ref4 => {
33
- let {
34
- theme
35
- } = _ref4;
36
- return `${theme.space['0.5']} ${theme.space['1']}`;
37
- }, ";text-align:center;position:absolute;max-width:", _ref5 => {
38
- let {
39
- maxWidth
40
- } = _ref5;
41
- return typeof maxWidth === 'number' ? `${maxWidth}px` : maxWidth;
42
- }, ";max-height:", _ref6 => {
43
- let {
44
- maxHeight
45
- } = _ref6;
46
- return typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight;
47
- }, ";overflow:", _ref7 => {
48
- let {
49
- maxHeight
50
- } = _ref7;
51
- return maxHeight ? 'auto' : undefined;
52
- }, ";overflow-wrap:break-word;font-size:0.8rem;inset:0 auto auto 0;top:0;left:0;z-index:1;transform:", _ref8 => {
53
- let {
54
- positions
55
- } = _ref8;
56
- return positions.popupPosition;
57
- }, ";animation:", _ref9 => {
58
- let {
59
- positions,
60
- reverseAnimation,
61
- maxHeight,
62
- animationDuration
63
- } = _ref9;
64
- return maxHeight || animationDuration === 0 || animationDuration === undefined ? undefined : /*#__PURE__*/css(animationDuration, "ms ", !reverseAnimation ? animation(positions) : exitAnimation(positions), " forwards;");
65
- }, ";&[data-has-arrow='true']{&::after{content:' ';position:absolute;top:", _ref10 => {
66
- let {
67
- positions
68
- } = _ref10;
69
- return positions.arrowTop;
70
- }, "px;left:", _ref11 => {
71
- let {
72
- positions
73
- } = _ref11;
74
- return positions.arrowLeft;
75
- }, "px;transform:", _ref12 => {
76
- let {
77
- positions
78
- } = _ref12;
79
- return positions.arrowTransform;
80
- }, " rotate(", _ref13 => {
81
- let {
82
- positions
83
- } = _ref13;
84
- return positions.rotate;
85
- }, "deg);margin-left:-", ARROW_WIDTH, "px;border-width:", ARROW_WIDTH, "px;border-style:solid;border-color:", _ref14 => {
86
- let {
87
- theme
88
- } = _ref14;
89
- return theme.colors.neutral.backgroundStronger;
90
- }, " transparent transparent transparent;pointer-events:none;}}");
17
+ })("background:", ({
18
+ theme
19
+ }) => theme.colors.neutral.backgroundStronger, ";color:", ({
20
+ theme
21
+ }) => theme.colors.neutral.textStronger, ";border-radius:", ({
22
+ theme
23
+ }) => theme.radii.default, ";padding:", ({
24
+ theme
25
+ }) => `${theme.space['0.5']} ${theme.space['1']}`, ";text-align:center;position:absolute;max-width:", ({
26
+ maxWidth
27
+ }) => typeof maxWidth === 'number' ? `${maxWidth}px` : maxWidth, ";max-height:", ({
28
+ maxHeight
29
+ }) => typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight, ";overflow:", ({
30
+ maxHeight
31
+ }) => maxHeight ? 'auto' : undefined, ";overflow-wrap:break-word;font-size:0.8rem;inset:0 auto auto 0;top:0;left:0;z-index:1;transform:", ({
32
+ positions
33
+ }) => positions.popupPosition, ";animation:", ({
34
+ positions,
35
+ reverseAnimation,
36
+ maxHeight,
37
+ animationDuration
38
+ }) => maxHeight || animationDuration === 0 || animationDuration === undefined ? undefined : /*#__PURE__*/css(animationDuration, "ms ", !reverseAnimation ? animation(positions) : exitAnimation(positions), " forwards;"), ";&[data-has-arrow='true']{&::after{content:' ';position:absolute;top:", ({
39
+ positions
40
+ }) => positions.arrowTop, "px;left:", ({
41
+ positions
42
+ }) => positions.arrowLeft, "px;transform:", ({
43
+ positions
44
+ }) => positions.arrowTransform, " rotate(", ({
45
+ positions
46
+ }) => positions.rotate, "deg);margin-left:-", ARROW_WIDTH, "px;border-width:", ARROW_WIDTH, "px;border-style:solid;border-color:", ({
47
+ theme
48
+ }) => theme.colors.neutral.backgroundStronger, " transparent transparent transparent;pointer-events:none;}}");
91
49
  const StyledChildrenContainer = /*#__PURE__*/_styled("div", {
92
50
  target: "e4h1g860"
93
51
  })(process.env.NODE_ENV === "production" ? {
@@ -101,30 +59,29 @@ const StyledChildrenContainer = /*#__PURE__*/_styled("div", {
101
59
  /**
102
60
  * @experimental This component is experimental and may be subject to breaking changes in the future.
103
61
  */
104
- const Popup = /*#__PURE__*/forwardRef((_ref15, ref) => {
105
- let {
106
- children,
107
- text = '',
108
- placement = 'auto',
109
- id,
110
- className,
111
- containerFullWidth,
112
- maxWidth = 232,
113
- maxHeight,
114
- visible,
115
- innerRef,
116
- role = 'popup',
117
- 'data-testid': dataTestId,
118
- hasArrow = true,
119
- onClose,
120
- tabIndex = 0,
121
- onKeyDown,
122
- 'aria-haspopup': ariaHasPopup,
123
- hideOnClickOutside = false,
124
- needDebounce = true,
125
- disableAnimation = false,
126
- portalTarget
127
- } = _ref15;
62
+ const Popup = /*#__PURE__*/forwardRef(({
63
+ children,
64
+ text = '',
65
+ placement = 'auto',
66
+ id,
67
+ className,
68
+ containerFullWidth,
69
+ maxWidth = 232,
70
+ maxHeight,
71
+ visible,
72
+ innerRef,
73
+ role = 'popup',
74
+ 'data-testid': dataTestId,
75
+ hasArrow = true,
76
+ onClose,
77
+ tabIndex = 0,
78
+ onKeyDown,
79
+ 'aria-haspopup': ariaHasPopup,
80
+ hideOnClickOutside = false,
81
+ needDebounce = true,
82
+ disableAnimation = false,
83
+ portalTarget
84
+ }, ref) => {
128
85
  const childrenRef = useRef(null);
129
86
  useImperativeHandle(innerRef, () => childrenRef.current);
130
87
  const innerPopupRef = useRef(null);
@@ -13,63 +13,45 @@ const shineAnimation = keyframes`
13
13
  `;
14
14
  const StyledProgressContainer = /*#__PURE__*/_styled("div", {
15
15
  target: "e1b95x8r2"
16
- })("overflow:hidden;position:relative;height:4px;margin-left:0;margin-right:0;border-radius:", _ref => {
17
- let {
18
- theme
19
- } = _ref;
20
- return theme.radii.default;
21
- }, ";background-color:", _ref2 => {
22
- let {
23
- theme
24
- } = _ref2;
25
- return theme.colors.neutral.backgroundStrong;
26
- }, ";");
16
+ })("overflow:hidden;position:relative;height:4px;margin-left:0;margin-right:0;border-radius:", ({
17
+ theme
18
+ }) => theme.radii.default, ";background-color:", ({
19
+ theme
20
+ }) => theme.colors.neutral.backgroundStrong, ";");
27
21
  const StyledProgress = /*#__PURE__*/_styled("div", {
28
22
  target: "e1b95x8r1"
29
23
  })("position:absolute;top:0;left:0;bottom:0;width:25%;opacity:0.8;background:linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.3),\n rgba(255, 255, 255, 0.4),\n rgba(255, 255, 255, 0.3),\n rgba(255, 255, 255, 0)\n );animation:", shineAnimation, " 1s linear infinite;");
30
24
  const StyledFilled = /*#__PURE__*/_styled('div', {
31
25
  shouldForwardProp: prop => !['sentiment', 'value'].includes(prop),
32
26
  target: "e1b95x8r0"
33
- })("border-radius:", _ref3 => {
34
- let {
35
- theme
36
- } = _ref3;
37
- return theme.radii.default;
38
- }, ";position:absolute;top:0;left:0;bottom:0;background-color:", _ref4 => {
39
- let {
40
- theme,
41
- sentiment
42
- } = _ref4;
43
- return theme.colors[sentiment].backgroundStrong ?? 'inherit';
44
- }, ";transition:0.3s width;width:", _ref5 => {
45
- let {
46
- value
47
- } = _ref5;
48
- return Math.max(0, Math.min(100, value));
49
- }, "%;");
27
+ })("border-radius:", ({
28
+ theme
29
+ }) => theme.radii.default, ";position:absolute;top:0;left:0;bottom:0;background-color:", ({
30
+ theme,
31
+ sentiment
32
+ }) => theme.colors[sentiment].backgroundStrong ?? 'inherit', ";transition:0.3s width;width:", ({
33
+ value
34
+ }) => Math.max(0, Math.min(100, value)), "%;");
50
35
  /**
51
36
  * Progress bar component to display progress of a task. Can be used to display progress of a form or a loading state.
52
37
  */
53
- const ProgressBar = _ref6 => {
54
- let {
55
- progress = false,
56
- value = 0,
57
- sentiment = 'primary',
58
- className,
59
- 'data-testid': dataTestId
60
- } = _ref6;
61
- return jsx(StyledProgressContainer, {
62
- role: "progressbar",
63
- "aria-valuenow": value,
64
- "aria-valuemin": 0,
65
- "aria-valuemax": 100,
66
- className: className,
67
- "data-testid": dataTestId,
68
- children: progress ? jsx(StyledProgress, {}) : jsx(StyledFilled, {
69
- sentiment: sentiment,
70
- value: value
71
- })
72
- });
73
- };
38
+ const ProgressBar = ({
39
+ progress = false,
40
+ value = 0,
41
+ sentiment = 'primary',
42
+ className,
43
+ 'data-testid': dataTestId
44
+ }) => jsx(StyledProgressContainer, {
45
+ role: "progressbar",
46
+ "aria-valuenow": value,
47
+ "aria-valuemin": 0,
48
+ "aria-valuemax": 100,
49
+ className: className,
50
+ "data-testid": dataTestId,
51
+ children: progress ? jsx(StyledProgress, {}) : jsx(StyledFilled, {
52
+ sentiment: sentiment,
53
+ value: value
54
+ })
55
+ });
74
56
 
75
57
  export { ProgressBar };
@@ -31,98 +31,47 @@ const RadioMarkedIcon = () => jsxs("g", {
31
31
  });
32
32
  const Ring = /*#__PURE__*/_styled("svg", {
33
33
  target: "ehkrmld4"
34
- })("height:", SIZE, "px;width:", SIZE, "px;min-width:", SIZE, "px;min-height:", SIZE, "px;border-radius:", _ref => {
35
- let {
36
- theme
37
- } = _ref;
38
- return theme.radii.circle;
39
- }, ";fill:", _ref2 => {
40
- let {
41
- theme
42
- } = _ref2;
43
- return theme.colors.neutral.border;
44
- }, ";", InnerCircleRing, "{fill:", _ref3 => {
45
- let {
46
- theme
47
- } = _ref3;
48
- return theme.colors.neutral.background;
49
- }, ";}");
34
+ })("height:", SIZE, "px;width:", SIZE, "px;min-width:", SIZE, "px;min-height:", SIZE, "px;border-radius:", ({
35
+ theme
36
+ }) => theme.radii.circle, ";fill:", ({
37
+ theme
38
+ }) => theme.colors.neutral.border, ";", InnerCircleRing, "{fill:", ({
39
+ theme
40
+ }) => theme.colors.neutral.background, ";}");
50
41
  const RadioInput = /*#__PURE__*/_styled("input", {
51
42
  target: "ehkrmld3"
52
- })("cursor:pointer;position:absolute;height:", SIZE, "px;width:", SIZE, "px;opacity:0;white-space:nowrap;border-width:0;&+", Ring, "{", RadioMark, "{transform-origin:center;transition:200ms transform ease-in-out;transform:scale(0);}}&:checked+svg{", RadioMark, "{transform:scale(1);}}&:checked[aria-disabled='false'][aria-invalid='false']+", Ring, "{fill:", _ref4 => {
53
- let {
54
- theme
55
- } = _ref4;
56
- return theme.colors.primary.backgroundStrong;
57
- }, ";}&[aria-invalid='true']:not([aria-disabled='true'])+", Ring, "{fill:", _ref5 => {
58
- let {
59
- theme
60
- } = _ref5;
61
- return theme.colors.danger.backgroundStrong;
62
- }, ";}&[aria-disabled='false']:active+", Ring, "{background-color:#5e127e40;fill:", _ref6 => {
63
- let {
64
- theme
65
- } = _ref6;
66
- return theme.colors.primary.backgroundStrong;
67
- }, ";", InnerCircleRing, "{fill:", _ref7 => {
68
- let {
69
- theme
70
- } = _ref7;
71
- return theme.colors.primary.background;
72
- }, ";}}&[aria-disabled='false']:focus-visible+", Ring, "{outline:-webkit-focus-ring-color auto 1px;}&[aria-invalid='true']:focus+", Ring, "{background-color:#f91b6c40;fill:", _ref8 => {
73
- let {
74
- theme
75
- } = _ref8;
76
- return theme.colors.danger.backgroundStrong;
77
- }, ";", InnerCircleRing, "{fill:", _ref9 => {
78
- let {
79
- theme
80
- } = _ref9;
81
- return theme.colors.danger.background;
82
- }, ";}}");
43
+ })("cursor:pointer;position:absolute;height:", SIZE, "px;width:", SIZE, "px;opacity:0;white-space:nowrap;border-width:0;&+", Ring, "{", RadioMark, "{transform-origin:center;transition:200ms transform ease-in-out;transform:scale(0);}}&:checked+svg{", RadioMark, "{transform:scale(1);}}&:checked[aria-disabled='false'][aria-invalid='false']+", Ring, "{fill:", ({
44
+ theme
45
+ }) => theme.colors.primary.backgroundStrong, ";}&[aria-invalid='true']:not([aria-disabled='true'])+", Ring, "{fill:", ({
46
+ theme
47
+ }) => theme.colors.danger.backgroundStrong, ";}&[aria-disabled='false']:active+", Ring, "{background-color:#5e127e40;fill:", ({
48
+ theme
49
+ }) => theme.colors.primary.backgroundStrong, ";", InnerCircleRing, "{fill:", ({
50
+ theme
51
+ }) => theme.colors.primary.background, ";}}&[aria-disabled='false']:focus-visible+", Ring, "{outline:-webkit-focus-ring-color auto 1px;}&[aria-invalid='true']:focus+", Ring, "{background-color:#f91b6c40;fill:", ({
52
+ theme
53
+ }) => theme.colors.danger.backgroundStrong, ";", InnerCircleRing, "{fill:", ({
54
+ theme
55
+ }) => theme.colors.danger.background, ";}}");
83
56
  const RadioContainer = /*#__PURE__*/_styled("div", {
84
57
  target: "ehkrmld2"
85
- })("position:relative;display:flex;flex:1;align-items:flex-start;gap:", _ref10 => {
86
- let {
87
- theme
88
- } = _ref10;
89
- return theme.space['1'];
90
- }, ";&[aria-disabled='false'],&[aria-disabled='false']>label{cursor:pointer;}&[aria-disabled='true'][data-checked='false']{color:", _ref11 => {
91
- let {
92
- theme
93
- } = _ref11;
94
- return theme.colors.neutral.textDisabled;
95
- }, ";}:hover[aria-disabled='false']{", RadioInput, "+", Ring, "{fill:", _ref12 => {
96
- let {
97
- theme
98
- } = _ref12;
99
- return theme.colors.primary.border;
100
- }, ";", InnerCircleRing, "{fill:", _ref13 => {
101
- let {
102
- theme
103
- } = _ref13;
104
- return theme.colors.primary.backgroundHover;
105
- }, ";}}", RadioInput, "[aria-invalid='true']+", Ring, "{fill:", _ref14 => {
106
- let {
107
- theme
108
- } = _ref14;
109
- return theme.colors.danger.border;
110
- }, ";", InnerCircleRing, "{fill:", _ref15 => {
111
- let {
112
- theme
113
- } = _ref15;
114
- return theme.colors.danger.backgroundHover;
115
- }, ";}}}&[aria-disabled='true']{cursor:not-allowed;&>label,", RadioInput, "{cursor:not-allowed;}", Ring, "{fill:", _ref16 => {
116
- let {
117
- theme
118
- } = _ref16;
119
- return theme.colors.neutral.borderDisabled;
120
- }, ";cursor:not-allowed;", InnerCircleRing, "{fill:", _ref17 => {
121
- let {
122
- theme
123
- } = _ref17;
124
- return theme.colors.neutral.backgroundDisabled;
125
- }, ";}}}");
58
+ })("position:relative;display:flex;flex:1;align-items:flex-start;gap:", ({
59
+ theme
60
+ }) => theme.space['1'], ";&[aria-disabled='false'],&[aria-disabled='false']>label{cursor:pointer;}&[aria-disabled='true'][data-checked='false']{color:", ({
61
+ theme
62
+ }) => theme.colors.neutral.textDisabled, ";}:hover[aria-disabled='false']{", RadioInput, "+", Ring, "{fill:", ({
63
+ theme
64
+ }) => theme.colors.primary.border, ";", InnerCircleRing, "{fill:", ({
65
+ theme
66
+ }) => theme.colors.primary.backgroundHover, ";}}", RadioInput, "[aria-invalid='true']+", Ring, "{fill:", ({
67
+ theme
68
+ }) => theme.colors.danger.border, ";", InnerCircleRing, "{fill:", ({
69
+ theme
70
+ }) => theme.colors.danger.backgroundHover, ";}}}&[aria-disabled='true']{cursor:not-allowed;&>label,", RadioInput, "{cursor:not-allowed;}", Ring, "{fill:", ({
71
+ theme
72
+ }) => theme.colors.neutral.borderDisabled, ";cursor:not-allowed;", InnerCircleRing, "{fill:", ({
73
+ theme
74
+ }) => theme.colors.neutral.backgroundDisabled, ";}}}");
126
75
  const StyledLabel = /*#__PURE__*/_styled("label", {
127
76
  target: "ehkrmld1"
128
77
  })(process.env.NODE_ENV === "production" ? {
@@ -135,34 +84,30 @@ const StyledLabel = /*#__PURE__*/_styled("label", {
135
84
  });
136
85
  const MargedText = /*#__PURE__*/_styled(Text, {
137
86
  target: "ehkrmld0"
138
- })("margin-left:", _ref18 => {
139
- let {
140
- theme
141
- } = _ref18;
142
- return theme.space['4'];
143
- }, ";");
87
+ })("margin-left:", ({
88
+ theme
89
+ }) => theme.space['4'], ";");
144
90
  /**
145
91
  * Radio component is used to select a single option from a list of options. It is a type of input component.
146
92
  */
147
- const Radio = /*#__PURE__*/forwardRef((_ref19, ref) => {
148
- let {
149
- checked = false,
150
- onChange,
151
- onFocus,
152
- onBlur,
153
- disabled = false,
154
- error,
155
- name,
156
- value,
157
- label,
158
- helper,
159
- className,
160
- autoFocus,
161
- onKeyDown,
162
- tooltip,
163
- 'aria-label': ariaLabel,
164
- 'data-testid': dataTestId
165
- } = _ref19;
93
+ const Radio = /*#__PURE__*/forwardRef(({
94
+ checked = false,
95
+ onChange,
96
+ onFocus,
97
+ onBlur,
98
+ disabled = false,
99
+ error,
100
+ name,
101
+ value,
102
+ label,
103
+ helper,
104
+ className,
105
+ autoFocus,
106
+ onKeyDown,
107
+ tooltip,
108
+ 'aria-label': ariaLabel,
109
+ 'data-testid': dataTestId
110
+ }, ref) => {
166
111
  const id = useId();
167
112
  const computedName = name ?? id;
168
113
  return jsx(Tooltip, {
@@ -8,21 +8,20 @@ import { jsx, jsxs } from '@emotion/react/jsx-runtime';
8
8
 
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 RadioGroupContext = /*#__PURE__*/createContext(undefined);
11
- const RadioGroupRadio = _ref => {
12
- let {
13
- onFocus,
14
- onBlur,
15
- disabled,
16
- error,
17
- name,
18
- value,
19
- label,
20
- helper,
21
- className,
22
- autoFocus,
23
- onKeyDown,
24
- 'data-testid': dataTestId
25
- } = _ref;
11
+ const RadioGroupRadio = ({
12
+ onFocus,
13
+ onBlur,
14
+ disabled,
15
+ error,
16
+ name,
17
+ value,
18
+ label,
19
+ helper,
20
+ className,
21
+ autoFocus,
22
+ onKeyDown,
23
+ 'data-testid': dataTestId
24
+ }) => {
26
25
  const context = useContext(RadioGroupContext);
27
26
  if (!context) {
28
27
  throw new Error('RadioGroup.Radio can only be used inside a RadioGroup');
@@ -73,19 +72,18 @@ const StyledRequiredIcon = /*#__PURE__*/_styled(Icon, {
73
72
  /**
74
73
  * RadioGroup is a component that allows users to select one option from a list of options using radio.
75
74
  */
76
- const RadioGroup = _ref2 => {
77
- let {
78
- legend,
79
- value,
80
- className,
81
- helper,
82
- error,
83
- direction = 'column',
84
- children,
85
- onChange,
86
- name,
87
- required = false
88
- } = _ref2;
75
+ const RadioGroup = ({
76
+ legend,
77
+ value,
78
+ className,
79
+ helper,
80
+ error,
81
+ direction = 'column',
82
+ children,
83
+ onChange,
84
+ name,
85
+ required = false
86
+ }) => {
89
87
  const contextValue = useMemo(() => ({
90
88
  groupName: name,
91
89
  groupValue: value,
@@ -4,44 +4,38 @@ import { jsx } from '@emotion/react/jsx-runtime';
4
4
  const StyledRow = /*#__PURE__*/_styled('div', {
5
5
  shouldForwardProp: prop => !['templateColumns', 'gap', 'alignItems', 'justifyContent'].includes(prop),
6
6
  target: "e3f5lzv0"
7
- })("display:grid;", _ref => {
8
- let {
9
- theme,
10
- gap,
11
- alignItems = 'normal',
12
- templateColumns,
13
- justifyContent = 'normal'
14
- } = _ref;
15
- return `
7
+ })("display:grid;", ({
8
+ theme,
9
+ gap,
10
+ alignItems = 'normal',
11
+ templateColumns,
12
+ justifyContent = 'normal'
13
+ }) => `
16
14
  grid-template-columns: ${templateColumns};
17
15
  ${gap ? `gap: ${theme.space[gap]};` : ''}
18
16
  align-items: ${alignItems};
19
17
  justify-content: ${justifyContent};
20
- `;
21
- }, ";");
18
+ `, ";");
22
19
  /**
23
20
  * Row component is a wrapper for grid layout.
24
21
  * @experimental This component is experimental and may be subject to breaking changes in the future.
25
22
  */
26
- const Row = _ref2 => {
27
- let {
28
- className,
29
- 'data-testid': dataTestId,
30
- children,
31
- templateColumns,
32
- alignItems,
33
- justifyContent,
34
- gap
35
- } = _ref2;
36
- return jsx(StyledRow, {
37
- className: className,
38
- "data-testid": dataTestId,
39
- gap: gap,
40
- templateColumns: templateColumns,
41
- alignItems: alignItems,
42
- justifyContent: justifyContent,
43
- children: children
44
- });
45
- };
23
+ const Row = ({
24
+ className,
25
+ 'data-testid': dataTestId,
26
+ children,
27
+ templateColumns,
28
+ alignItems,
29
+ justifyContent,
30
+ gap
31
+ }) => jsx(StyledRow, {
32
+ className: className,
33
+ "data-testid": dataTestId,
34
+ gap: gap,
35
+ templateColumns: templateColumns,
36
+ alignItems: alignItems,
37
+ justifyContent: justifyContent,
38
+ children: children
39
+ });
46
40
 
47
41
  export { Row, StyledRow };