@sats-group/ui-lib 75.9.0 → 75.10.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sats-group/ui-lib",
3
- "version": "75.9.0",
3
+ "version": "75.10.1",
4
4
  "description": "SATS web user interface library",
5
5
  "engines": {
6
6
  "node": "^18 || ^20",
@@ -162,13 +162,28 @@
162
162
  }
163
163
  }
164
164
 
165
- &__help {
165
+ &__help,
166
+ &__error {
167
+ display: flex;
168
+ gap: spacing.$xs;
166
169
  margin-top: spacing.$xxs;
167
- color: light.$on-background-primary-disabled;
170
+
171
+ > * {
172
+ align-self: flex-start;
173
+ }
174
+ }
175
+
176
+ &__help {
177
+ color: light.$on-surface-primary-disabled;
168
178
  }
169
179
 
170
180
  &__error {
171
- margin-top: spacing.$xxs;
181
+ color: light.$on-surface-error;
182
+ }
183
+
184
+ &__help-icon,
185
+ &__error-icon {
186
+ flex-shrink: 0;
172
187
  }
173
188
 
174
189
  &__asterisk {
@@ -6,6 +6,8 @@ import useInputValidation from '../use-input-validation';
6
6
 
7
7
  import { themes, variants, TextInput as Props } from './text-input.types';
8
8
  import { useEffect } from 'react';
9
+ import SvgError from '@sats-group/icons/16/error';
10
+ import SvgInfo from '@sats-group/icons/16/info';
9
11
 
10
12
  const RefTextInput = React.forwardRef<HTMLInputElement, Props>(
11
13
  (
@@ -97,12 +99,18 @@ const RefTextInput = React.forwardRef<HTMLInputElement, Props>(
97
99
 
98
100
  {helpText ? (
99
101
  <div className="text-input__help">
102
+ <div className="text-input__help-icon">
103
+ <SvgInfo />
104
+ </div>
100
105
  <Text size={Text.sizes.interface}>{helpText}</Text>
101
106
  </div>
102
107
  ) : null}
103
108
  {/* NOTE: This is aria-hidden because reporting of validation errors is handled by the browser */}
104
109
  {error ? (
105
110
  <div aria-hidden="true" className="text-input__error">
111
+ <div className="text-input__error-icon">
112
+ <SvgError />
113
+ </div>
106
114
  <Text size={Text.sizes.interface}>{error}</Text>
107
115
  </div>
108
116
  ) : null}