@hyphen/hyphen-components 2.9.4 → 2.9.6
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/dist/css/index.css +6 -6
- package/dist/css/utilities.css +7 -1
- package/dist/css/variables.css +5 -2
- package/dist/hyphen-components.cjs.development.js +1 -1
- package/dist/hyphen-components.cjs.development.js.map +1 -1
- package/dist/hyphen-components.cjs.production.min.js +1 -1
- package/dist/hyphen-components.cjs.production.min.js.map +1 -1
- package/dist/hyphen-components.esm.js +1 -1
- package/dist/hyphen-components.esm.js.map +1 -1
- package/dist/lib/tokens.d.ts +1 -1
- package/package.json +2 -2
- package/src/components/DateInput/DateInput.tsx +1 -1
- package/src/components/SelectInputInset/SelectInputInset.module.scss +21 -0
- package/src/components/SelectInputNative/SelectInputNative.module.scss +24 -5
- package/src/components/TextInput/TextInput.module.scss +11 -0
- package/src/components/TextInputInset/TextInputInset.module.scss +18 -0
- package/src/components/TextareaInput/TextareaInput.module.scss +10 -0
- package/src/components/TextareaInputInset/TextareaInputInset.module.scss +30 -0
- package/src/styles/variables/forms.scss +1 -0
package/dist/lib/tokens.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const BREAKPOINT_OPTIONS: BreakpointSizeWithBase[];
|
|
|
6
6
|
export declare const BREAKPOINTS: Breakpoint[];
|
|
7
7
|
export declare const BASE_COLOR_OPTIONS: ("black" | "white" | "magenta" | "primary-50" | "primary-100" | "primary-200" | "primary-300" | "primary-400" | "primary-500" | "primary-600" | "primary-700" | "primary-800" | "primary-900" | "green-50" | "green-100" | "green-200" | "green-300" | "green-400" | "green-500" | "green-600" | "green-700" | "green-800" | "green-900" | "blue-50" | "blue-100" | "blue-200" | "blue-300" | "blue-400" | "blue-500" | "blue-600" | "blue-700" | "blue-800" | "blue-900" | "purple-50" | "purple-100" | "purple-200" | "purple-300" | "purple-400" | "purple-500" | "purple-600" | "purple-700" | "purple-800" | "purple-900" | "yellow-50" | "yellow-100" | "yellow-200" | "yellow-300" | "yellow-400" | "yellow-500" | "yellow-600" | "yellow-700" | "yellow-800" | "yellow-900" | "red-50" | "red-100" | "red-200" | "red-300" | "red-400" | "red-500" | "red-600" | "red-700" | "red-800" | "red-900" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-400" | "grey-500" | "grey-600" | "grey-700" | "grey-800" | "grey-900")[];
|
|
8
8
|
export declare const BASE_COLOR_NAMES: ("black" | "white" | "magenta" | "primary" | "green" | "blue" | "purple" | "yellow" | "red" | "grey")[];
|
|
9
|
-
export declare const FONT_COLOR_OPTIONS: ("info" | "base" | "white" | "secondary" | "tertiary" | "inverse" | "disabled" | "success" | "success-disabled" | "warn" | "warn-disabled" | "danger" | "danger-disabled" | "button-primary" | "button-primary-hover" | "button-primary-active" | "button-secondary" | "button-secondary-hover" | "button-secondary-active" | "button-tertiary" | "button-tertiary-hover" | "button-tertiary-active" | "button-danger" | "button-danger-hover" | "button-danger-active" | "placeholder" | "brand-yellow" | "brand-orange" | "brand-magenta" | "brand-dark-grey" | "brand-cyan" | "brand-pink" | "brand-light-purple" | "brand-medium-purple" | "brand-dark-purple")[];
|
|
9
|
+
export declare const FONT_COLOR_OPTIONS: ("info" | "base" | "white" | "secondary" | "tertiary" | "inverse" | "disabled" | "success" | "success-disabled" | "warn" | "warn-disabled" | "danger" | "danger-input" | "danger-disabled" | "button-primary" | "button-primary-hover" | "button-primary-active" | "button-secondary" | "button-secondary-hover" | "button-secondary-active" | "button-tertiary" | "button-tertiary-hover" | "button-tertiary-active" | "button-danger" | "button-danger-hover" | "button-danger-active" | "placeholder" | "brand-yellow" | "brand-orange" | "brand-magenta" | "brand-dark-grey" | "brand-cyan" | "brand-pink" | "brand-light-purple" | "brand-medium-purple" | "brand-dark-purple")[];
|
|
10
10
|
export declare const BACKGROUND_COLOR_OPTIONS: ("info" | "primary" | "secondary" | "tertiary" | "inverse" | "success" | "danger" | "button-primary" | "button-primary-hover" | "button-primary-active" | "button-secondary" | "button-secondary-hover" | "button-secondary-active" | "button-tertiary" | "button-tertiary-hover" | "button-tertiary-active" | "button-danger" | "button-danger-hover" | "button-danger-active" | "brand-yellow" | "brand-orange" | "brand-magenta" | "brand-dark-grey" | "brand-cyan" | "brand-pink" | "brand-light-purple" | "brand-medium-purple" | "brand-dark-purple" | "error" | "warning" | "transparent" | "brand-gradient" | "brand-gradient-purple" | "brand-gradient-cyan")[];
|
|
11
11
|
export declare const BORDER_COLOR_OPTIONS: ("info" | "inverse" | "danger" | "button-secondary" | "button-secondary-hover" | "button-secondary-active" | "button-tertiary" | "button-tertiary-hover" | "button-tertiary-active" | "brand-yellow" | "brand-orange" | "brand-magenta" | "brand-dark-grey" | "brand-cyan" | "brand-pink" | "brand-light-purple" | "brand-medium-purple" | "brand-dark-purple" | "warning" | "default" | "subtle" | "hover" | "active")[];
|
|
12
12
|
export declare const FONT_SIZE_OPTIONS: ("xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "base" | "2xs" | "4xl" | "5xl" | "6xl" | "7xl")[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyphen/hyphen-components",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "@hyphen"
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"@rollup/rollup-linux-x64-gnu": "^4.9.6"
|
|
121
121
|
},
|
|
122
122
|
"dependencies": {
|
|
123
|
-
"@hyphen/hyphen-design-tokens": "^4.4.
|
|
123
|
+
"@hyphen/hyphen-design-tokens": "^4.4.3",
|
|
124
124
|
"@popperjs/core": "^2.11.8",
|
|
125
125
|
"@types/react-modal": "^3.16.3",
|
|
126
126
|
"classnames": "^2.5.1",
|
|
@@ -146,7 +146,7 @@ export const DateInput: FC<DateInputProps> = ({
|
|
|
146
146
|
const handleOnClickOutside = (event: MouseEvent | KeyboardEvent) => {
|
|
147
147
|
const target = event.target as Element;
|
|
148
148
|
|
|
149
|
-
if (target.
|
|
149
|
+
if (target.classList.contains('react-datepicker__navigation')) {
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -328,11 +328,32 @@
|
|
|
328
328
|
--form-control-background-color,
|
|
329
329
|
var(--INTERNAL_form-control-background-color)
|
|
330
330
|
);
|
|
331
|
+
color: var(
|
|
332
|
+
--form-control-font-color,
|
|
333
|
+
var(--INTERNAL_form-control-font-color)
|
|
334
|
+
);
|
|
331
335
|
}
|
|
332
336
|
|
|
337
|
+
select, label {
|
|
338
|
+
color: var(
|
|
339
|
+
--form-control-font-color,
|
|
340
|
+
var(--INTERNAL_form-control-input-color-error)
|
|
341
|
+
);
|
|
342
|
+
}
|
|
333
343
|
select:focus {
|
|
334
344
|
outline: none;
|
|
335
345
|
background-color: transparent;
|
|
346
|
+
color: var(
|
|
347
|
+
--form-control-font-color,
|
|
348
|
+
var(--INTERNAL_form-control-label-color)
|
|
349
|
+
);
|
|
350
|
+
+ label {
|
|
351
|
+
color: var(
|
|
352
|
+
--form-control-font-color,
|
|
353
|
+
var(--INTERNAL_form-control-label-color)
|
|
354
|
+
);
|
|
355
|
+
|
|
356
|
+
}
|
|
336
357
|
}
|
|
337
358
|
}
|
|
338
359
|
|
|
@@ -337,13 +337,32 @@
|
|
|
337
337
|
var(--INTERNAL_form-control-background-color-error)
|
|
338
338
|
);
|
|
339
339
|
|
|
340
|
-
|
|
340
|
+
&:focus-within {
|
|
341
341
|
outline: none;
|
|
342
|
-
border
|
|
343
|
-
|
|
344
|
-
|
|
342
|
+
border: 1px solid var(--color-border-active);
|
|
343
|
+
background-color: var(
|
|
344
|
+
--form-control-background-color,
|
|
345
|
+
var(--INTERNAL_form-control-background-color)
|
|
345
346
|
);
|
|
346
|
-
|
|
347
|
+
color: var(
|
|
348
|
+
--form-control-font-color,
|
|
349
|
+
var(--INTERNAL_form-control-font-color)
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
select {
|
|
354
|
+
color: var(
|
|
355
|
+
--form-control-font-color,
|
|
356
|
+
var(--INTERNAL_form-control-input-color-error)
|
|
357
|
+
);
|
|
358
|
+
&:focus {
|
|
359
|
+
outline: none;
|
|
360
|
+
background-color: transparent;
|
|
361
|
+
color: var(
|
|
362
|
+
--form-control-font-color,
|
|
363
|
+
var(--INTERNAL_form-control-label-color)
|
|
364
|
+
);
|
|
365
|
+
}
|
|
347
366
|
}
|
|
348
367
|
}
|
|
349
368
|
}
|
|
@@ -338,9 +338,20 @@
|
|
|
338
338
|
);
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
+
input {
|
|
342
|
+
color: var(
|
|
343
|
+
--form-control-font-color,
|
|
344
|
+
var(--INTERNAL_form-control-input-color-error)
|
|
345
|
+
);
|
|
346
|
+
}
|
|
347
|
+
|
|
341
348
|
input:focus {
|
|
342
349
|
outline: none;
|
|
343
350
|
background-color: transparent;
|
|
351
|
+
color: var(
|
|
352
|
+
--form-control-font-color,
|
|
353
|
+
var(--INTERNAL_form-control-font-color)
|
|
354
|
+
);
|
|
344
355
|
}
|
|
345
356
|
}
|
|
346
357
|
|
|
@@ -358,10 +358,28 @@
|
|
|
358
358
|
);
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
+
input, label {
|
|
362
|
+
color: var(
|
|
363
|
+
--form-control-font-color,
|
|
364
|
+
var(--INTERNAL_form-control-input-color-error)
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
|
|
361
368
|
input:focus {
|
|
362
369
|
outline: none;
|
|
363
370
|
background-color: transparent;
|
|
371
|
+
color: var(
|
|
372
|
+
--form-control-font-color,
|
|
373
|
+
var(--INTERNAL_form-control-font-color)
|
|
374
|
+
);
|
|
375
|
+
+ .text-input-label {
|
|
376
|
+
color: var(
|
|
377
|
+
--form-control-font-color,
|
|
378
|
+
var(--INTERNAL_form-control-label-color)
|
|
379
|
+
);
|
|
380
|
+
}
|
|
364
381
|
}
|
|
382
|
+
|
|
365
383
|
}
|
|
366
384
|
|
|
367
385
|
//Necessary so that inset shadow that we use for border does not get covered by child elements.
|
|
@@ -222,6 +222,10 @@
|
|
|
222
222
|
--form-control-border-color-focus,
|
|
223
223
|
var(--INTERNAL_form-control-background-color-error)
|
|
224
224
|
);
|
|
225
|
+
color: var(
|
|
226
|
+
--form-control-font-color,
|
|
227
|
+
var(--INTERNAL_form-control-input-color-error)
|
|
228
|
+
);
|
|
225
229
|
}
|
|
226
230
|
|
|
227
231
|
textarea:focus {
|
|
@@ -238,6 +242,12 @@
|
|
|
238
242
|
--form-control-border-color-focus,
|
|
239
243
|
var(--INTERNAL_form-control-border-color-focus)
|
|
240
244
|
);
|
|
245
|
+
> textarea {
|
|
246
|
+
color: var(
|
|
247
|
+
--form-control-font-color,
|
|
248
|
+
var(--INTERNAL_form-control-font-color)
|
|
249
|
+
);
|
|
250
|
+
}
|
|
241
251
|
}
|
|
242
252
|
}
|
|
243
253
|
|
|
@@ -288,6 +288,22 @@
|
|
|
288
288
|
--form-control-background-color-error,
|
|
289
289
|
var(--INTERNAL_form-control-background-color-error)
|
|
290
290
|
);
|
|
291
|
+
color: var(
|
|
292
|
+
--form-control-font-color,
|
|
293
|
+
var(--INTERNAL_form-control-input-color-error)
|
|
294
|
+
);
|
|
295
|
+
|
|
296
|
+
&:focus {
|
|
297
|
+
outline: none;
|
|
298
|
+
background-color: transparent;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
+ label {
|
|
302
|
+
color: var(
|
|
303
|
+
--form-control-font-color,
|
|
304
|
+
var(--INTERNAL_form-control-input-color-error)
|
|
305
|
+
);
|
|
306
|
+
}
|
|
291
307
|
|
|
292
308
|
&:focus-within {
|
|
293
309
|
outline: none;
|
|
@@ -296,6 +312,20 @@
|
|
|
296
312
|
--form-control-box-shadow-focus,
|
|
297
313
|
var(--INTERNAL_form-control-box-shadow-focus)
|
|
298
314
|
);
|
|
315
|
+
background-color: var(
|
|
316
|
+
--form-control-background-color,
|
|
317
|
+
var(--INTERNAL_form-control-background-color)
|
|
318
|
+
);
|
|
319
|
+
color: var(
|
|
320
|
+
--form-control-font-color,
|
|
321
|
+
var(--INTERNAL_form-control-font-color)
|
|
322
|
+
);
|
|
323
|
+
+ label {
|
|
324
|
+
color: var(
|
|
325
|
+
--form-control-font-color,
|
|
326
|
+
var(--INTERNAL_form-control-label-color)
|
|
327
|
+
);
|
|
328
|
+
}
|
|
299
329
|
}
|
|
300
330
|
}
|
|
301
331
|
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
--INTERNAL_form-control-font-color: var(--color-font-base);
|
|
45
45
|
--INTERNAL_form-control-font-color-disabled: var(--color-font-disabled);
|
|
46
46
|
--INTERNAL_form-control-font-color-error: var(--color-font-danger);
|
|
47
|
+
--INTERNAL_form-control-input-color-error: var(--color-font-danger-input);
|
|
47
48
|
--INTERNAL_form-control-font-color-error-disabled: var(
|
|
48
49
|
--color-font-danger-disabled
|
|
49
50
|
);
|