@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
@@ -21,153 +21,92 @@ const iconSizes = {
21
21
  const BASE_INPUT_WIDTH = 34;
22
22
  const StyledSelectButton = /*#__PURE__*/_styled(Button, {
23
23
  target: "exvap484"
24
- })("margin:0 ", _ref => {
25
- let {
26
- theme
27
- } = _ref;
28
- return theme.space['1'];
29
- }, ";width:32px;height:32px;");
24
+ })("margin:0 ", ({
25
+ theme
26
+ }) => theme.space['1'], ";width:32px;height:32px;");
30
27
  const StyledCenterBox = /*#__PURE__*/_styled('div', {
31
28
  shouldForwardProp: prop => !['size'].includes(prop),
32
29
  target: "exvap483"
33
- })("display:flex;flex:1;flex-direction:row;height:", _ref2 => {
34
- let {
35
- size
36
- } = _ref2;
37
- return size === 'small' ? '24px' : '32px';
38
- }, ";align-items:center;outline:none;justify-content:center;border-radius:", _ref3 => {
39
- let {
40
- theme
41
- } = _ref3;
42
- return theme.radii.default;
43
- }, ";border:1px solid transparent;max-width:100%;");
30
+ })("display:flex;flex:1;flex-direction:row;height:", ({
31
+ size
32
+ }) => size === 'small' ? '24px' : '32px', ";align-items:center;outline:none;justify-content:center;border-radius:", ({
33
+ theme
34
+ }) => theme.radii.default, ";border:1px solid transparent;max-width:100%;");
44
35
  const StyledInput = /*#__PURE__*/_styled("input", {
45
36
  target: "exvap482"
46
- })("color:", _ref4 => {
47
- let {
48
- theme
49
- } = _ref4;
50
- return theme.colors.neutral.text;
51
- }, ";background-color:transparent;font-size:", _ref5 => {
52
- let {
53
- theme
54
- } = _ref5;
55
- return theme.typography.bodyStrong.fontSize;
56
- }, ";border:none;outline:none;position:relative;margin-right:", _ref6 => {
57
- let {
58
- theme
59
- } = _ref6;
60
- return theme.space['0.5'];
61
- }, ";max-width:100%;font-weight:", _ref7 => {
62
- let {
63
- theme
64
- } = _ref7;
65
- return theme.typography.bodyStrong.weight;
66
- }, ";text-align:center;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}::placeholder{color:", _ref8 => {
67
- let {
68
- theme
69
- } = _ref8;
70
- return theme.colors.neutral.textWeak;
71
- }, ";}-moz-appearance:textfield;&[disabled]{color:", _ref9 => {
72
- let {
73
- theme
74
- } = _ref9;
75
- return theme.colors.neutral.textDisabled;
76
- }, ";cursor:not-allowed;}");
37
+ })("color:", ({
38
+ theme
39
+ }) => theme.colors.neutral.text, ";background-color:transparent;font-size:", ({
40
+ theme
41
+ }) => theme.typography.bodyStrong.fontSize, ";border:none;outline:none;position:relative;margin-right:", ({
42
+ theme
43
+ }) => theme.space['0.5'], ";max-width:100%;font-weight:", ({
44
+ theme
45
+ }) => theme.typography.bodyStrong.weight, ";text-align:center;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}::placeholder{color:", ({
46
+ theme
47
+ }) => theme.colors.neutral.textWeak, ";}-moz-appearance:textfield;&[disabled]{color:", ({
48
+ theme
49
+ }) => theme.colors.neutral.textDisabled, ";cursor:not-allowed;}");
77
50
  const StyledText = /*#__PURE__*/_styled('span', {
78
51
  shouldForwardProp: prop => !['disabled'].includes(prop),
79
52
  target: "exvap481"
80
- })("color:", _ref10 => {
81
- let {
82
- theme,
83
- disabled
84
- } = _ref10;
85
- return disabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.text;
86
- }, ";user-select:none;margin-right:", _ref11 => {
87
- let {
88
- theme
89
- } = _ref11;
90
- return theme.space['1'];
91
- }, ";");
53
+ })("color:", ({
54
+ theme,
55
+ disabled
56
+ }) => disabled ? theme.colors.neutral.textDisabled : theme.colors.neutral.text, ";user-select:none;margin-right:", ({
57
+ theme
58
+ }) => theme.space['1'], ";");
92
59
  const StyledContainer = /*#__PURE__*/_styled('div', {
93
60
  shouldForwardProp: prop => !['size'].includes(prop),
94
61
  target: "exvap480"
95
- })("background-color:", _ref12 => {
96
- let {
97
- theme
98
- } = _ref12;
99
- return theme.colors.neutral.background;
100
- }, ";display:flex;flex-direction:row;align-items:center;align-self:stretch;font-weight:500;height:", _ref13 => {
101
- let {
102
- size
103
- } = _ref13;
104
- return containerSizes[size];
105
- }, "px;border:1px solid ", _ref14 => {
106
- let {
107
- theme
108
- } = _ref14;
109
- return theme.colors.neutral.border;
110
- }, ";border-radius:", _ref15 => {
111
- let {
112
- theme
113
- } = _ref15;
114
- return theme.radii.default;
115
- }, ";&[data-error='true']{border:1px solid ", _ref16 => {
116
- let {
117
- theme
118
- } = _ref16;
119
- return theme.colors.danger.border;
120
- }, ";}&[aria-disabled='true']{background:", _ref17 => {
121
- let {
122
- theme
123
- } = _ref17;
124
- return theme.colors.neutral.backgroundDisabled;
125
- }, ";cursor:not-allowed;}&:not([aria-disabled='true']){", StyledCenterBox, ":hover,", StyledCenterBox, ":focus{border:1px solid ", _ref18 => {
126
- let {
127
- theme
128
- } = _ref18;
129
- return theme.colors.primary.borderHover;
130
- }, ";}", StyledCenterBox, ":focus-within{box-shadow:", _ref19 => {
131
- let {
132
- theme
133
- } = _ref19;
134
- return theme.shadows.focusPrimary;
135
- }, ";border:1px solid ", _ref20 => {
136
- let {
137
- theme
138
- } = _ref20;
139
- return theme.colors.primary.borderHover;
140
- }, ";}}");
62
+ })("background-color:", ({
63
+ theme
64
+ }) => theme.colors.neutral.background, ";display:flex;flex-direction:row;align-items:center;align-self:stretch;font-weight:500;height:", ({
65
+ size
66
+ }) => containerSizes[size], "px;border:1px solid ", ({
67
+ theme
68
+ }) => theme.colors.neutral.border, ";border-radius:", ({
69
+ theme
70
+ }) => theme.radii.default, ";&[data-error='true']{border:1px solid ", ({
71
+ theme
72
+ }) => theme.colors.danger.border, ";}&[aria-disabled='true']{background:", ({
73
+ theme
74
+ }) => theme.colors.neutral.backgroundDisabled, ";cursor:not-allowed;}&:not([aria-disabled='true']){", StyledCenterBox, ":hover,", StyledCenterBox, ":focus{border:1px solid ", ({
75
+ theme
76
+ }) => theme.colors.primary.borderHover, ";}", StyledCenterBox, ":focus-within{box-shadow:", ({
77
+ theme
78
+ }) => theme.shadows.focusPrimary, ";border:1px solid ", ({
79
+ theme
80
+ }) => theme.colors.primary.borderHover, ";}}");
141
81
  /**
142
82
  * NumberInput component is used to increment / decrement a number value by clicking on + / - buttons or
143
83
  * by typing into input.
144
84
  */
145
- const NumberInput = _ref21 => {
146
- let {
147
- disabled = false,
148
- maxValue,
149
- minValue = 0,
150
- name = 'numberinput',
151
- onChange,
152
- onFocus,
153
- onBlur,
154
- onMaxCrossed,
155
- onMinCrossed,
156
- size = 'large',
157
- step = 1,
158
- text,
159
- defaultValue,
160
- value,
161
- disabledTooltip,
162
- className,
163
- label,
164
- id,
165
- placeholder,
166
- error,
167
- 'aria-label': ariaLabel,
168
- 'aria-describedby': ariaDescribedBy,
169
- 'data-testid': dataTestId
170
- } = _ref21;
85
+ const NumberInput = ({
86
+ disabled = false,
87
+ maxValue,
88
+ minValue = 0,
89
+ name = 'numberinput',
90
+ onChange,
91
+ onFocus,
92
+ onBlur,
93
+ onMaxCrossed,
94
+ onMinCrossed,
95
+ size = 'large',
96
+ step = 1,
97
+ text,
98
+ defaultValue,
99
+ value,
100
+ disabledTooltip,
101
+ className,
102
+ label,
103
+ id,
104
+ placeholder,
105
+ error,
106
+ 'aria-label': ariaLabel,
107
+ 'aria-describedby': ariaDescribedBy,
108
+ 'data-testid': dataTestId
109
+ }) => {
171
110
  const inputRef = useRef();
172
111
  const uniqueId = useId();
173
112
 
@@ -182,14 +121,11 @@ const NumberInput = _ref21 => {
182
121
  return defaultValue;
183
122
  });
184
123
  const currentValue = value !== undefined && value !== null ? value : inputValue;
185
- const setValue = function (newValue,
124
+ const setValue = (newValue,
186
125
  /**
187
126
  * If true, will check if newValue is between minValue and maxValue and set it to minValue or maxValue if it's not.
188
127
  */
189
- hasMinMaxVerification) {
190
- if (hasMinMaxVerification === void 0) {
191
- hasMinMaxVerification = true;
192
- }
128
+ hasMinMaxVerification = true) => {
193
129
  let nextValue = newValue;
194
130
  if (value === undefined && hasMinMaxVerification) {
195
131
  if (newValue !== undefined && newValue < minValue) {
@@ -5,10 +5,7 @@
5
5
  * @param range The number of pages wanted
6
6
  * @returns List of page numbers around currentPage
7
7
  */
8
- const getPageNumbers = function (currentPage, pageCount, range) {
9
- if (range === void 0) {
10
- range = 5;
11
- }
8
+ const getPageNumbers = (currentPage, pageCount, range = 5) => {
12
9
  const gap = Math.floor(range / 2);
13
10
  let end = currentPage + gap;
14
11
  let remaining = 0;
@@ -7,25 +7,16 @@ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
7
7
  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)."; }
8
8
  const PageNumbersContainer = /*#__PURE__*/_styled("div", {
9
9
  target: "e5s692s2"
10
- })("display:flex;gap:", _ref => {
11
- let {
12
- theme
13
- } = _ref;
14
- return theme.space['2'];
15
- }, ";margin:0 ", _ref2 => {
16
- let {
17
- theme
18
- } = _ref2;
19
- return theme.space['2'];
20
- }, ";");
10
+ })("display:flex;gap:", ({
11
+ theme
12
+ }) => theme.space['2'], ";margin:0 ", ({
13
+ theme
14
+ }) => theme.space['2'], ";");
21
15
  const PageSwitchContainer = /*#__PURE__*/_styled("div", {
22
16
  target: "e5s692s1"
23
- })("display:flex;gap:", _ref3 => {
24
- let {
25
- theme
26
- } = _ref3;
27
- return theme.space['1'];
28
- }, ";");
17
+ })("display:flex;gap:", ({
18
+ theme
19
+ }) => theme.space['1'], ";");
29
20
  const StyledContainer = /*#__PURE__*/_styled("div", {
30
21
  target: "e5s692s0"
31
22
  })(process.env.NODE_ENV === "production" ? {
@@ -40,16 +31,15 @@ const StyledContainer = /*#__PURE__*/_styled("div", {
40
31
  * Pagination is a component to navigate between pages, it is composed of 2 buttons to go to the previous and next page,
41
32
  * and a list of buttons to go to a specific page.
42
33
  */
43
- const Pagination = _ref4 => {
44
- let {
45
- disabled = false,
46
- page,
47
- pageCount,
48
- onChange,
49
- pageTabCount = 5,
50
- className,
51
- 'data-testid': dataTestId
52
- } = _ref4;
34
+ const Pagination = ({
35
+ disabled = false,
36
+ page,
37
+ pageCount,
38
+ onChange,
39
+ pageTabCount = 5,
40
+ className,
41
+ 'data-testid': dataTestId
42
+ }) => {
53
43
  const goToFirstPage = useCallback(() => {
54
44
  onChange(1);
55
45
  }, [onChange]);
@@ -6,42 +6,36 @@ import { jsx, jsxs } from '@emotion/react/jsx-runtime';
6
6
 
7
7
  const PasswordCheckContainer = /*#__PURE__*/_styled("div", {
8
8
  target: "eunxap90"
9
- })("display:grid;grid-template-columns:repeat(2, 1fr);gap:", _ref => {
10
- let {
11
- theme
12
- } = _ref;
13
- return theme.space['1'];
14
- }, ";");
9
+ })("display:grid;grid-template-columns:repeat(2, 1fr);gap:", ({
10
+ theme
11
+ }) => theme.space['1'], ";");
15
12
 
16
13
  /**
17
14
  * PasswordCheck is a component that display a list of password rules with a check or a cross depending on the validity
18
15
  * of the rule.
19
16
  */
20
- const PasswordCheck = _ref2 => {
21
- let {
22
- rules,
23
- className,
24
- 'data-testid': dataTestId
25
- } = _ref2;
26
- return jsx(PasswordCheckContainer, {
27
- className: className,
28
- "data-testid": dataTestId,
29
- children: rules.map(rule => jsxs(Stack, {
30
- direction: "row",
31
- gap: 1,
32
- alignItems: "center",
33
- children: [jsx(Icon, {
34
- name: rule.valid ? 'checkbox-circle-outline' : 'close-circle-outline',
35
- color: rule.valid ? 'success' : 'neutral',
36
- prominence: "weak",
37
- size: 20
38
- }), jsx(Text, {
39
- as: "p",
40
- variant: "bodySmall",
41
- children: rule.text
42
- })]
43
- }, rule.name))
44
- });
45
- };
17
+ const PasswordCheck = ({
18
+ rules,
19
+ className,
20
+ 'data-testid': dataTestId
21
+ }) => jsx(PasswordCheckContainer, {
22
+ className: className,
23
+ "data-testid": dataTestId,
24
+ children: rules.map(rule => jsxs(Stack, {
25
+ direction: "row",
26
+ gap: 1,
27
+ alignItems: "center",
28
+ children: [jsx(Icon, {
29
+ name: rule.valid ? 'checkbox-circle-outline' : 'close-circle-outline',
30
+ color: rule.valid ? 'success' : 'neutral',
31
+ prominence: "weak",
32
+ size: 20
33
+ }), jsx(Text, {
34
+ as: "p",
35
+ variant: "bodySmall",
36
+ children: rule.text
37
+ })]
38
+ }, rule.name))
39
+ });
46
40
 
47
41
  export { PasswordCheck };
@@ -17,43 +17,25 @@ const StyledTitle = /*#__PURE__*/_styled(Text, {
17
17
  });
18
18
  const StyledStrength = /*#__PURE__*/_styled(Text, {
19
19
  target: "e1uv9umu2"
20
- })("float:right;vertical-align:top;color:", _ref => {
21
- let {
22
- strength
23
- } = _ref;
24
- return strength.color;
25
- }, ";");
20
+ })("float:right;vertical-align:top;color:", ({
21
+ strength
22
+ }) => strength.color, ";");
26
23
  const StyledWrapper = /*#__PURE__*/_styled("div", {
27
24
  target: "e1uv9umu1"
28
- })("background-color:", _ref2 => {
29
- let {
30
- theme
31
- } = _ref2;
32
- return theme.colors.neutral.backgroundDisabled;
33
- }, ";border-radius:", _ref3 => {
34
- let {
35
- theme
36
- } = _ref3;
37
- return theme.radii.default;
38
- }, ";height:8px;margin-top:", _ref4 => {
39
- let {
40
- theme
41
- } = _ref4;
42
- return theme.space['1'];
43
- }, ";margin-bottom:", _ref5 => {
44
- let {
45
- theme
46
- } = _ref5;
47
- return theme.space['2'];
48
- }, ";");
25
+ })("background-color:", ({
26
+ theme
27
+ }) => theme.colors.neutral.backgroundDisabled, ";border-radius:", ({
28
+ theme
29
+ }) => theme.radii.default, ";height:8px;margin-top:", ({
30
+ theme
31
+ }) => theme.space['1'], ";margin-bottom:", ({
32
+ theme
33
+ }) => theme.space['2'], ";");
49
34
  const StyledMeter = /*#__PURE__*/_styled("div", {
50
35
  target: "e1uv9umu0"
51
- })("border-radius:", _ref6 => {
52
- let {
53
- theme
54
- } = _ref6;
55
- return theme.radii.default;
56
- }, ";height:100%;transition:all 0.5s;");
36
+ })("border-radius:", ({
37
+ theme
38
+ }) => theme.radii.default, ";height:100%;transition:all 0.5s;");
57
39
  const DEFAULT_ESTIMATE = () => ({
58
40
  score: 0
59
41
  });
@@ -63,17 +45,16 @@ const DEFAULT_FORBIDDEN_WORDS = [];
63
45
  * PasswordStrengthMeter is a component that displays a password strength meter.
64
46
  * @deprecated use Meter component instead
65
47
  */
66
- const PasswordStrengthMeter = _ref7 => {
67
- let {
68
- password = '',
69
- onChange,
70
- strength,
71
- title,
72
- estimate = DEFAULT_ESTIMATE,
73
- forbiddenInputs = DEFAULT_FORBIDDEN_WORDS,
74
- className,
75
- 'data-testid': dataTestId
76
- } = _ref7;
48
+ const PasswordStrengthMeter = ({
49
+ password = '',
50
+ onChange,
51
+ strength,
52
+ title,
53
+ estimate = DEFAULT_ESTIMATE,
54
+ forbiddenInputs = DEFAULT_FORBIDDEN_WORDS,
55
+ className,
56
+ 'data-testid': dataTestId
57
+ }) => {
77
58
  const [score, setScore] = useState(0);
78
59
  const theme = useTheme();
79
60
  const [backgroundColor, setBackgroundColor] = useState(strength[0]?.color || theme.colors.success.backgroundStrong);