@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
@@ -22,97 +22,43 @@ const SIZES = {
22
22
  };
23
23
  const StyledToggle = /*#__PURE__*/_styled("div", {
24
24
  target: "e1wstm612"
25
- })("box-sizing:content-box;outline:none;overflow:hidden;display:flex;align-items:center;border:none;border-radius:", _ref => {
26
- let {
27
- theme
28
- } = _ref;
29
- return theme.radii.xlarge;
30
- }, ";position:relative;transition:all 300ms;background-color:", _ref2 => {
31
- let {
32
- theme
33
- } = _ref2;
34
- return theme.colors.neutral.backgroundStrong;
35
- }, ";width:", _ref3 => {
36
- let {
37
- size
38
- } = _ref3;
39
- return SIZES[size].width;
40
- }, "px;height:", _ref4 => {
41
- let {
42
- size
43
- } = _ref4;
44
- return SIZES[size].height;
45
- }, "px;&:hover{background-color:", _ref5 => {
46
- let {
47
- theme
48
- } = _ref5;
49
- return theme.colors.neutral.backgroundStrongHover;
50
- }, ";}&:after{content:'';position:absolute;top:", _ref6 => {
51
- let {
52
- size
53
- } = _ref6;
54
- return SIZES[size].height / 2 - SIZES[size].ball / 2;
55
- }, "px;left:5px;width:", _ref7 => {
56
- let {
57
- size
58
- } = _ref7;
59
- return SIZES[size].ball;
60
- }, "px;height:", _ref8 => {
61
- let {
62
- size
63
- } = _ref8;
64
- return SIZES[size].ball;
65
- }, "px;border-radius:", _ref9 => {
66
- let {
67
- theme
68
- } = _ref9;
69
- return theme.radii.circle;
70
- }, ";background-color:", _ref10 => {
71
- let {
72
- theme
73
- } = _ref10;
74
- return theme.colors.neutral.background;
75
- }, ";transition:all 300ms;}&:focus-within,&:focus{box-shadow:", _ref11 => {
76
- let {
77
- theme
78
- } = _ref11;
79
- return theme.shadows.focusNeutral;
80
- }, ";}&[data-disabled='false']:active:after{width:", _ref12 => {
81
- let {
82
- size
83
- } = _ref12;
84
- return SIZES[size].ball * 1.3775;
85
- }, "px;}&[data-checked='true']{color:", _ref13 => {
86
- let {
87
- theme
88
- } = _ref13;
89
- return theme.colors.neutral.textStrong;
90
- }, ";background-color:", _ref14 => {
91
- let {
92
- theme
93
- } = _ref14;
94
- return theme.colors.primary.backgroundStrong;
95
- }, ";&:hover{background-color:", _ref15 => {
96
- let {
97
- theme
98
- } = _ref15;
99
- return theme.colors.primary.backgroundStrongHover;
100
- }, ";}&:after{left:calc(100% - 5px);transform:translateX(-100%);}&:focus-within,&:focus{box-shadow:", _ref16 => {
101
- let {
102
- theme
103
- } = _ref16;
104
- return theme.shadows.focusPrimary;
105
- }, ";}}&[data-disabled='true']{background:", _ref17 => {
106
- let {
107
- theme
108
- } = _ref17;
109
- return theme.colors.neutral.backgroundStrongDisabled;
110
- }, ";&[data-checked='true']{background:", _ref18 => {
111
- let {
112
- theme
113
- } = _ref18;
114
- return theme.colors.primary.backgroundStrongDisabled;
115
- }, ";}}");
25
+ })("box-sizing:content-box;outline:none;overflow:hidden;display:flex;align-items:center;border:none;border-radius:", ({
26
+ theme
27
+ }) => theme.radii.xlarge, ";position:relative;transition:all 300ms;background-color:", ({
28
+ theme
29
+ }) => theme.colors.neutral.backgroundStrong, ";width:", ({
30
+ size
31
+ }) => SIZES[size].width, "px;height:", ({
32
+ size
33
+ }) => SIZES[size].height, "px;&:hover{background-color:", ({
34
+ theme
35
+ }) => theme.colors.neutral.backgroundStrongHover, ";}&:after{content:'';position:absolute;top:", ({
36
+ size
37
+ }) => SIZES[size].height / 2 - SIZES[size].ball / 2, "px;left:5px;width:", ({
38
+ size
39
+ }) => SIZES[size].ball, "px;height:", ({
40
+ size
41
+ }) => SIZES[size].ball, "px;border-radius:", ({
42
+ theme
43
+ }) => theme.radii.circle, ";background-color:", ({
44
+ theme
45
+ }) => theme.colors.neutral.background, ";transition:all 300ms;}&:focus-within,&:focus{box-shadow:", ({
46
+ theme
47
+ }) => theme.shadows.focusNeutral, ";}&[data-disabled='false']:active:after{width:", ({
48
+ size
49
+ }) => SIZES[size].ball * 1.3775, "px;}&[data-checked='true']{color:", ({
50
+ theme
51
+ }) => theme.colors.neutral.textStrong, ";background-color:", ({
52
+ theme
53
+ }) => theme.colors.primary.backgroundStrong, ";&:hover{background-color:", ({
54
+ theme
55
+ }) => theme.colors.primary.backgroundStrongHover, ";}&:after{left:calc(100% - 5px);transform:translateX(-100%);}&:focus-within,&:focus{box-shadow:", ({
56
+ theme
57
+ }) => theme.shadows.focusPrimary, ";}}&[data-disabled='true']{background:", ({
58
+ theme
59
+ }) => theme.colors.neutral.backgroundStrongDisabled, ";&[data-checked='true']{background:", ({
60
+ theme
61
+ }) => theme.colors.primary.backgroundStrongDisabled, ";}}");
116
62
  const StyledCheckbox = /*#__PURE__*/_styled("input", {
117
63
  target: "e1wstm611"
118
64
  })(process.env.NODE_ENV === "production" ? {
@@ -125,27 +71,15 @@ const StyledCheckbox = /*#__PURE__*/_styled("input", {
125
71
  });
126
72
  const StyledLabel = /*#__PURE__*/_styled("label", {
127
73
  target: "e1wstm610"
128
- })("display:flex;gap:", _ref19 => {
129
- let {
130
- theme
131
- } = _ref19;
132
- return theme.space['1'];
133
- }, ";align-items:start;width:fit-content;cursor:pointer;flex-direction:", _ref20 => {
134
- let {
135
- labelPosition
136
- } = _ref20;
137
- return labelPosition === 'left' ? 'row' : 'row-reverse';
138
- }, ";&:active ", StyledToggle, "[data-disabled='false']:after{width:", _ref21 => {
139
- let {
140
- size
141
- } = _ref21;
142
- return SIZES[size].ball * 1.3775;
143
- }, "px;}&[aria-disabled='true']{cursor:not-allowed;color:", _ref22 => {
144
- let {
145
- theme
146
- } = _ref22;
147
- return theme.colors.neutral.textDisabled;
148
- }, ";}");
74
+ })("display:flex;gap:", ({
75
+ theme
76
+ }) => theme.space['1'], ";align-items:start;width:fit-content;cursor:pointer;flex-direction:", ({
77
+ labelPosition
78
+ }) => labelPosition === 'left' ? 'row' : 'row-reverse', ";&:active ", StyledToggle, "[data-disabled='false']:after{width:", ({
79
+ size
80
+ }) => SIZES[size].ball * 1.3775, "px;}&[aria-disabled='true']{cursor:not-allowed;color:", ({
81
+ theme
82
+ }) => theme.colors.neutral.textDisabled, ";}");
149
83
  const RequiredIcon = () => jsx("sup", {
150
84
  children: jsx(Icon, {
151
85
  name: "asterisk",
@@ -156,23 +90,22 @@ const RequiredIcon = () => jsx("sup", {
156
90
  /**
157
91
  * Toggle component is used to toggle between two states (on/off, true/false, etc.).
158
92
  */
159
- const Toggle = /*#__PURE__*/forwardRef((_ref23, ref) => {
160
- let {
161
- checked = false,
162
- disabled = false,
163
- id,
164
- name,
165
- onChange,
166
- size = 'large',
167
- tooltip,
168
- labelPosition = 'right',
169
- label,
170
- helper,
171
- required,
172
- className,
173
- 'data-testid': dataTestId,
174
- value
175
- } = _ref23;
93
+ const Toggle = /*#__PURE__*/forwardRef(({
94
+ checked = false,
95
+ disabled = false,
96
+ id,
97
+ name,
98
+ onChange,
99
+ size = 'large',
100
+ tooltip,
101
+ labelPosition = 'right',
102
+ label,
103
+ helper,
104
+ required,
105
+ className,
106
+ 'data-testid': dataTestId,
107
+ value
108
+ }, ref) => {
176
109
  const [state, setState] = useState(checked);
177
110
  const uniqueId = useId();
178
111
  const onLocalChange = useCallback(event => {
@@ -11,16 +11,15 @@ const ToggleGroupContext = /*#__PURE__*/createContext(undefined);
11
11
  /**
12
12
  * ToggleGroup is a component that allows you to group a set of Toggle components together under the same legend.
13
13
  */
14
- const ToggleGroupToggle = _ref => {
15
- let {
16
- disabled,
17
- name,
18
- value,
19
- label,
20
- helper,
21
- className,
22
- 'data-testid': dataTestId
23
- } = _ref;
14
+ const ToggleGroupToggle = ({
15
+ disabled,
16
+ name,
17
+ value,
18
+ label,
19
+ helper,
20
+ className,
21
+ 'data-testid': dataTestId
22
+ }) => {
24
23
  const context = useContext(ToggleGroupContext);
25
24
  if (!context) {
26
25
  throw new Error('ToggleGroup.Toggle can only be used inside a ToggleGroup');
@@ -64,19 +63,18 @@ const StyledRequiredIcon = /*#__PURE__*/_styled(Icon, {
64
63
  styles: "vertical-align:super",
65
64
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
66
65
  });
67
- const ToggleGroup = _ref2 => {
68
- let {
69
- legend,
70
- value,
71
- className,
72
- helper,
73
- error,
74
- direction = 'column',
75
- children,
76
- onChange,
77
- name,
78
- required = false
79
- } = _ref2;
66
+ const ToggleGroup = ({
67
+ legend,
68
+ value,
69
+ className,
70
+ helper,
71
+ error,
72
+ direction = 'column',
73
+ children,
74
+ onChange,
75
+ name,
76
+ required = false
77
+ }) => {
80
78
  const contextValue = useMemo(() => ({
81
79
  groupName: name,
82
80
  groupValues: value ?? [],
@@ -19,36 +19,33 @@ const StyledPopup = /*#__PURE__*/_styled(Popup, {
19
19
  * Tooltip component is used to display additional information on hover or focus.
20
20
  * It is used to explain the purpose of the element it is attached to.
21
21
  */
22
- const Tooltip = /*#__PURE__*/forwardRef((_ref, tooltipRef) => {
23
- let {
24
- children,
25
- text = '',
26
- placement = 'auto',
27
- id,
28
- className,
29
- containerFullWidth,
30
- maxWidth = 232,
31
- visible,
32
- innerRef,
33
- role = 'tooltip',
34
- 'data-testid': dataTestId,
35
- portalTarget
36
- } = _ref;
37
- return jsx(StyledPopup, {
38
- id: id,
39
- ref: tooltipRef,
40
- role: role,
41
- "data-testid": dataTestId,
42
- className: className,
43
- containerFullWidth: containerFullWidth,
44
- maxWidth: maxWidth,
45
- visible: visible,
46
- placement: placement,
47
- text: text,
48
- innerRef: innerRef,
49
- portalTarget: portalTarget,
50
- children: children
51
- });
52
- });
22
+ const Tooltip = /*#__PURE__*/forwardRef(({
23
+ children,
24
+ text = '',
25
+ placement = 'auto',
26
+ id,
27
+ className,
28
+ containerFullWidth,
29
+ maxWidth = 232,
30
+ visible,
31
+ innerRef,
32
+ role = 'tooltip',
33
+ 'data-testid': dataTestId,
34
+ portalTarget
35
+ }, tooltipRef) => jsx(StyledPopup, {
36
+ id: id,
37
+ ref: tooltipRef,
38
+ role: role,
39
+ "data-testid": dataTestId,
40
+ className: className,
41
+ containerFullWidth: containerFullWidth,
42
+ maxWidth: maxWidth,
43
+ visible: visible,
44
+ placement: placement,
45
+ text: text,
46
+ innerRef: innerRef,
47
+ portalTarget: portalTarget,
48
+ children: children
49
+ }));
53
50
 
54
51
  export { Tooltip };
@@ -17,28 +17,18 @@ const SIZE_WIDTH = {
17
17
  const StyledInput = /*#__PURE__*/_styled('input', {
18
18
  shouldForwardProp: prop => !['inputSize'].includes(prop),
19
19
  target: "e1a2bx9q0"
20
- })("background:", _ref => {
21
- let {
22
- theme
23
- } = _ref;
24
- return theme.colors.neutral.background;
25
- }, ";border:solid 1px ", _ref2 => {
26
- let {
27
- 'aria-invalid': error,
28
- theme
29
- } = _ref2;
30
- return error ? theme.colors.danger.border : theme.colors.neutral.border;
31
- }, ";color:", _ref3 => {
32
- let {
33
- 'aria-invalid': error,
34
- theme
35
- } = _ref3;
36
- return error ? theme.colors.danger.text : theme.colors.neutral.text;
37
- }, ";", _ref4 => {
38
- let {
39
- inputSize,
40
- theme
41
- } = _ref4;
20
+ })("background:", ({
21
+ theme
22
+ }) => theme.colors.neutral.background, ";border:solid 1px ", ({
23
+ 'aria-invalid': error,
24
+ theme
25
+ }) => error ? theme.colors.danger.border : theme.colors.neutral.border, ";color:", ({
26
+ 'aria-invalid': error,
27
+ theme
28
+ }) => error ? theme.colors.danger.text : theme.colors.neutral.text, ";", ({
29
+ inputSize,
30
+ theme
31
+ }) => {
42
32
  if (inputSize === 'small') {
43
33
  return `
44
34
  font-size: ${theme.typography.caption.fontSize};
@@ -49,54 +39,31 @@ const StyledInput = /*#__PURE__*/_styled('input', {
49
39
  font-size: ${theme.typography.body.fontSize};
50
40
  font-weight: ${theme.typography.body.weight};
51
41
  `;
52
- }, " text-align:center;border-radius:", _ref5 => {
53
- let {
54
- theme
55
- } = _ref5;
56
- return theme.radii.default;
57
- }, ";margin-right:", _ref6 => {
58
- let {
59
- theme
60
- } = _ref6;
61
- return theme.space['1'];
62
- }, ";width:", _ref7 => {
63
- let {
64
- inputSize
65
- } = _ref7;
66
- return SIZE_WIDTH[inputSize];
67
- }, "px;height:", _ref8 => {
68
- let {
69
- inputSize
70
- } = _ref8;
71
- return SIZE_HEIGHT[inputSize];
72
- }, "px;outline-style:none;transition:border-color 0.2s ease,box-shadow 0.2s ease;&:hover,&:focus{border-color:", _ref9 => {
73
- let {
74
- 'aria-invalid': error,
75
- theme
76
- } = _ref9;
77
- return error ? theme.colors.danger.borderHover : theme.colors.primary.borderHover;
78
- }, ";}&:focus{box-shadow:", _ref10 => {
79
- let {
80
- 'aria-invalid': error,
81
- theme: {
82
- shadows
83
- }
84
- } = _ref10;
85
- return error ? shadows.focusDanger : shadows.focusPrimary;
86
- }, ";}&:last-child{margin-right:0;}&::placeholder{color:", _ref11 => {
87
- let {
88
- disabled,
89
- theme
90
- } = _ref11;
91
- return disabled ? theme.colors.neutral.textWeakDisabled : theme.colors.neutral.textWeak;
92
- }, ";}", _ref12 => {
93
- let {
94
- disabled,
95
- theme: {
96
- colors
97
- }
98
- } = _ref12;
99
- return disabled && `cursor: default;
42
+ }, " text-align:center;border-radius:", ({
43
+ theme
44
+ }) => theme.radii.default, ";margin-right:", ({
45
+ theme
46
+ }) => theme.space['1'], ";width:", ({
47
+ inputSize
48
+ }) => SIZE_WIDTH[inputSize], "px;height:", ({
49
+ inputSize
50
+ }) => SIZE_HEIGHT[inputSize], "px;outline-style:none;transition:border-color 0.2s ease,box-shadow 0.2s ease;&:hover,&:focus{border-color:", ({
51
+ 'aria-invalid': error,
52
+ theme
53
+ }) => error ? theme.colors.danger.borderHover : theme.colors.primary.borderHover, ";}&:focus{box-shadow:", ({
54
+ 'aria-invalid': error,
55
+ theme: {
56
+ shadows
57
+ }
58
+ }) => error ? shadows.focusDanger : shadows.focusPrimary, ";}&:last-child{margin-right:0;}&::placeholder{color:", ({
59
+ disabled,
60
+ theme
61
+ }) => disabled ? theme.colors.neutral.textWeakDisabled : theme.colors.neutral.textWeak, ";}", ({
62
+ disabled,
63
+ theme: {
64
+ colors
65
+ }
66
+ }) => disabled && `cursor: default;
100
67
  background-color: ${colors.neutral.backgroundDisabled};
101
68
  border-color: ${colors.neutral.borderDisabled};
102
69
  color: ${colors.neutral.textDisabled};
@@ -104,31 +71,29 @@ const StyledInput = /*#__PURE__*/_styled('input', {
104
71
  &:hover {
105
72
  border: ${colors.neutral.borderDisabled}
106
73
  }
107
- `;
108
- }, ";");
74
+ `, ";");
109
75
  const DEFAULT_ON_FUNCTION = () => {};
110
76
 
111
77
  /**
112
78
  * Verification code allows you to enter a code in multiple fields (4 by default).
113
79
  */
114
- const VerificationCode = _ref13 => {
115
- let {
116
- disabled = false,
117
- className,
118
- error = false,
119
- fields = 4,
120
- initialValue = '',
121
- inputId,
122
- inputStyle = '',
123
- size = 'large',
124
- onChange = DEFAULT_ON_FUNCTION,
125
- onComplete = DEFAULT_ON_FUNCTION,
126
- placeholder = '',
127
- required = false,
128
- type = 'number',
129
- 'data-testid': dataTestId,
130
- 'aria-label': ariaLabel = 'Verification code'
131
- } = _ref13;
80
+ const VerificationCode = ({
81
+ disabled = false,
82
+ className,
83
+ error = false,
84
+ fields = 4,
85
+ initialValue = '',
86
+ inputId,
87
+ inputStyle = '',
88
+ size = 'large',
89
+ onChange = DEFAULT_ON_FUNCTION,
90
+ onComplete = DEFAULT_ON_FUNCTION,
91
+ placeholder = '',
92
+ required = false,
93
+ type = 'number',
94
+ 'data-testid': dataTestId,
95
+ 'aria-label': ariaLabel = 'Verification code'
96
+ }) => {
132
97
  const uniqueId = useId();
133
98
  const valuesArray = Object.assign(new Array(fields).fill(''), initialValue.substring(0, fields).split(''));
134
99
  const [values, setValues] = useState(valuesArray);
package/dist/src/index.js CHANGED
@@ -57,6 +57,7 @@ export { Tag } from './components/Tag/index.js';
57
57
  export { TagInput } from './components/TagInput/index.js';
58
58
  export { TagList } from './components/TagList/index.js';
59
59
  export { Text } from './components/Text/index.js';
60
+ export { TextArea } from './components/TextArea/index.js';
60
61
  export { TextInput } from './components/TextInput/index.js';
61
62
  export { TimeInput } from './components/TimeInput/index.js';
62
63
  export { ToastContainer, toast } from './components/Toaster/index.js';
@@ -2,11 +2,6 @@ const chr4 = () => Math.random().toString(16).slice(-4);
2
2
  const uuid = () => Array.from({
3
3
  length: 8
4
4
  }, chr4).join('');
5
- const getUUID = function (prefix) {
6
- if (prefix === void 0) {
7
- prefix = '';
8
- }
9
- return `${prefix ? `${prefix}-` : ''}${uuid()}`;
10
- };
5
+ const getUUID = (prefix = '') => `${prefix ? `${prefix}-` : ''}${uuid()}`;
11
6
 
12
7
  export { getUUID };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/ui",
3
- "version": "1.28.0",
3
+ "version": "1.29.0",
4
4
  "description": "Ultraviolet UI",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -39,7 +39,7 @@
39
39
  "react-dom": "18.2.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@babel/core": "7.23.5",
42
+ "@babel/core": "7.23.6",
43
43
  "@emotion/babel-plugin": "11.11.0",
44
44
  "@emotion/react": "11.11.1",
45
45
  "@emotion/styled": "11.11.0",
@@ -67,7 +67,7 @@
67
67
  "react-use-clipboard": "1.0.9",
68
68
  "reakit": "1.3.11",
69
69
  "@ultraviolet/themes": "1.5.0",
70
- "@ultraviolet/icons": "2.7.0"
70
+ "@ultraviolet/icons": "2.7.1"
71
71
  },
72
72
  "scripts": {
73
73
  "build": "rollup -c ../../rollup.config.mjs"