@cfpb/cfpb-design-system 3.10.0 → 3.12.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.
- package/CHANGELOG.md +94 -51
- package/dist/base/index.css +1 -1
- package/dist/base/index.css.map +2 -2
- package/dist/base/index.js +1 -1
- package/dist/base/index.js.map +1 -1
- package/dist/components/cfpb-buttons/index.css +1 -1
- package/dist/components/cfpb-buttons/index.css.map +2 -2
- package/dist/components/cfpb-buttons/index.js +1 -1
- package/dist/components/cfpb-buttons/index.js.map +1 -1
- package/dist/components/cfpb-expandables/index.css +1 -1
- package/dist/components/cfpb-expandables/index.css.map +2 -2
- package/dist/components/cfpb-expandables/index.js +1 -1
- package/dist/components/cfpb-expandables/index.js.map +1 -1
- package/dist/components/cfpb-forms/index.css +1 -1
- package/dist/components/cfpb-forms/index.css.map +2 -2
- package/dist/components/cfpb-forms/index.js +1 -1
- package/dist/components/cfpb-forms/index.js.map +1 -1
- package/dist/components/cfpb-icons/index.css +1 -1
- package/dist/components/cfpb-icons/index.css.map +2 -2
- package/dist/components/cfpb-icons/index.js +1 -1
- package/dist/components/cfpb-icons/index.js.map +1 -1
- package/dist/components/cfpb-layout/index.css +1 -1
- package/dist/components/cfpb-layout/index.css.map +2 -2
- package/dist/components/cfpb-layout/index.js +1 -1
- package/dist/components/cfpb-layout/index.js.map +1 -1
- package/dist/components/cfpb-notifications/index.css +1 -1
- package/dist/components/cfpb-notifications/index.css.map +2 -2
- package/dist/components/cfpb-notifications/index.js +1 -1
- package/dist/components/cfpb-notifications/index.js.map +1 -1
- package/dist/components/cfpb-pagination/index.css +1 -1
- package/dist/components/cfpb-pagination/index.css.map +2 -2
- package/dist/components/cfpb-pagination/index.js +1 -1
- package/dist/components/cfpb-pagination/index.js.map +1 -1
- package/dist/components/cfpb-tables/index.css +1 -1
- package/dist/components/cfpb-tables/index.css.map +2 -2
- package/dist/components/cfpb-tables/index.js +1 -1
- package/dist/components/cfpb-tables/index.js.map +1 -1
- package/dist/components/cfpb-tooltips/index.css +1 -1
- package/dist/components/cfpb-tooltips/index.css.map +2 -2
- package/dist/components/cfpb-tooltips/index.js +1 -1
- package/dist/components/cfpb-tooltips/index.js.map +1 -1
- package/dist/components/cfpb-typography/index.css +1 -1
- package/dist/components/cfpb-typography/index.css.map +2 -2
- package/dist/components/cfpb-typography/index.js +1 -1
- package/dist/components/cfpb-typography/index.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/utilities/index.css +1 -1
- package/dist/utilities/index.css.map +2 -2
- package/dist/utilities/index.js +1 -1
- package/dist/utilities/index.js.map +1 -1
- package/package.json +1 -1
- package/src/abstracts/vars.scss +51 -40
- package/src/components/cfpb-forms/form-alert.scss +8 -6
- package/src/components/cfpb-forms/form-field.scss +76 -156
- package/src/components/cfpb-forms/multiselect.scss +4 -5
- package/src/components/cfpb-forms/select.scss +25 -11
- package/src/components/cfpb-forms/text-input.scss +34 -98
- package/src/utilities/utilities.scss +18 -5
|
@@ -1,138 +1,74 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
2
|
@use '@cfpb/cfpb-design-system/src/abstracts' as *;
|
|
3
3
|
|
|
4
|
-
// Border and Outline Status styling.
|
|
5
|
-
@mixin u-border-outline-error {
|
|
6
|
-
border-color: $input-border-error;
|
|
7
|
-
outline: 1px solid $input-border-error;
|
|
8
|
-
&:hover,
|
|
9
|
-
&.hover {
|
|
10
|
-
border-color: $input-border-error-hover;
|
|
11
|
-
outline: 1px solid $input-border-error-hover;
|
|
12
|
-
outline-offset: 0;
|
|
13
|
-
}
|
|
14
|
-
&:focus,
|
|
15
|
-
&.focus {
|
|
16
|
-
border-color: $input-border-error;
|
|
17
|
-
box-shadow: 0 0 0 1px $input-border-error;
|
|
18
|
-
outline: 1px dotted $input-border-error;
|
|
19
|
-
|
|
20
|
-
// Both hover and focus simultaenously
|
|
21
|
-
&:hover,
|
|
22
|
-
&.hover {
|
|
23
|
-
border-color: $input-border-error;
|
|
24
|
-
box-shadow: 0 0 0 1px $input-border-error;
|
|
25
|
-
outline: 1px dotted $input-border-error;
|
|
26
|
-
outline-offset: 2px;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@mixin u-border-outline-warning {
|
|
32
|
-
border-color: $input-border-warning;
|
|
33
|
-
outline: 1px solid $input-border-warning;
|
|
34
|
-
&:hover,
|
|
35
|
-
&.hover {
|
|
36
|
-
border-color: $input-border-warning-hover;
|
|
37
|
-
outline: 1px solid $input-border-warning-hover;
|
|
38
|
-
outline-offset: 0;
|
|
39
|
-
}
|
|
40
|
-
&:focus,
|
|
41
|
-
&.focus {
|
|
42
|
-
border-color: $input-border-warning;
|
|
43
|
-
box-shadow: 0 0 0 1px $input-border-warning;
|
|
44
|
-
outline: 1px dotted $input-border-warning;
|
|
45
|
-
|
|
46
|
-
// Both hover and focus simultaenously
|
|
47
|
-
&:hover,
|
|
48
|
-
&.hover {
|
|
49
|
-
border-color: $input-border-warning;
|
|
50
|
-
box-shadow: 0 0 0 1px $input-border-warning;
|
|
51
|
-
outline: 1px dotted $input-border-warning;
|
|
52
|
-
outline-offset: 2px;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@mixin u-border-outline-success {
|
|
58
|
-
border-color: $input-border-success;
|
|
59
|
-
outline: 1px solid $input-border-success;
|
|
60
|
-
&:hover,
|
|
61
|
-
&.hover {
|
|
62
|
-
border-color: $input-border-success-hover;
|
|
63
|
-
outline: 1px solid $input-border-success-hover;
|
|
64
|
-
outline-offset: 0;
|
|
65
|
-
}
|
|
66
|
-
&:focus,
|
|
67
|
-
&.focus {
|
|
68
|
-
border-color: $input-border-success;
|
|
69
|
-
box-shadow: 0 0 0 1px $input-border-success;
|
|
70
|
-
outline: 1px dotted $input-border-success;
|
|
71
|
-
|
|
72
|
-
// Both hover and focus simultaenously
|
|
73
|
-
&:hover,
|
|
74
|
-
&.hover {
|
|
75
|
-
border-color: $input-border-success;
|
|
76
|
-
box-shadow: 0 0 0 1px $input-border-success;
|
|
77
|
-
outline: 1px dotted $input-border-success;
|
|
78
|
-
outline-offset: 2px;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
4
|
.a-text-input {
|
|
5
|
+
// Theme variables.
|
|
6
|
+
--input-text: var(--input-text-default);
|
|
7
|
+
--input-text-disabled: var(--input-text-disabled-default);
|
|
8
|
+
--input-text-placeholder: var(--input-text-placeholder-default);
|
|
9
|
+
--input-border: var(--input-border-default);
|
|
10
|
+
--input-border-hover: var(--input-border-hover-default);
|
|
11
|
+
--input-border-focus: var(--input-border-focus-default);
|
|
12
|
+
--input-bg: var(--input-bg-default);
|
|
13
|
+
--input-bg-disabled: var(--input-bg-disabled-default);
|
|
14
|
+
|
|
84
15
|
// Reset the browser's default styling.
|
|
85
16
|
appearance: none;
|
|
86
17
|
display: inline-block;
|
|
87
18
|
padding: math.div(7px, $base-font-size-px) + em;
|
|
88
|
-
border: 1px solid
|
|
89
|
-
|
|
90
|
-
|
|
19
|
+
border: 1px solid var(--input-border);
|
|
20
|
+
outline: 0 solid var(--input-border);
|
|
21
|
+
background: var(--input-bg);
|
|
22
|
+
color: var(--input-text);
|
|
91
23
|
box-sizing: border-box;
|
|
92
24
|
|
|
93
25
|
&:hover,
|
|
94
26
|
&.hover {
|
|
95
|
-
border-color:
|
|
96
|
-
outline: 1px solid
|
|
27
|
+
border-color: var(--input-border-hover);
|
|
28
|
+
outline: 1px solid var(--input-border-hover);
|
|
97
29
|
}
|
|
98
30
|
|
|
99
31
|
&:focus,
|
|
100
32
|
&.focus {
|
|
101
|
-
border-color:
|
|
102
|
-
box-shadow: 0 0 0 1px
|
|
103
|
-
outline: 1px dotted
|
|
104
|
-
|
|
105
|
-
// The outline-offset property is not supported everywhere (e.g. IE)
|
|
106
|
-
// but it adds a nice touch in browsers where it is.
|
|
33
|
+
border-color: var(--input-border-focus);
|
|
34
|
+
box-shadow: 0 0 0 1px var(--input-border-focus);
|
|
35
|
+
outline: 1px dotted var(--input-border-focus);
|
|
107
36
|
outline-offset: 2px;
|
|
108
37
|
}
|
|
109
38
|
|
|
110
39
|
&:disabled {
|
|
40
|
+
--input-border: var(--input-border-disabled);
|
|
111
41
|
&,
|
|
112
42
|
&:hover,
|
|
113
43
|
&.hover,
|
|
114
44
|
&:focus,
|
|
115
45
|
&.focus {
|
|
116
|
-
color:
|
|
117
|
-
background-color:
|
|
46
|
+
color: var(--input-text-disabled);
|
|
47
|
+
background-color: var(--input-bg-disabled);
|
|
118
48
|
cursor: not-allowed;
|
|
119
49
|
|
|
120
50
|
// Cancel the hover and focus states.
|
|
121
|
-
border-color:
|
|
51
|
+
border-color: var(--input-border);
|
|
122
52
|
outline: none;
|
|
123
53
|
}
|
|
124
54
|
}
|
|
125
55
|
|
|
56
|
+
&--error,
|
|
57
|
+
&--warning,
|
|
58
|
+
&--success {
|
|
59
|
+
outline-width: 1px;
|
|
60
|
+
}
|
|
61
|
+
|
|
126
62
|
&--error {
|
|
127
|
-
|
|
63
|
+
--input-border: var(--input-border-error);
|
|
128
64
|
}
|
|
129
65
|
|
|
130
66
|
&--warning {
|
|
131
|
-
|
|
67
|
+
--input-border: var(--input-border-warning);
|
|
132
68
|
}
|
|
133
69
|
|
|
134
70
|
&--success {
|
|
135
|
-
|
|
71
|
+
--input-border: var(--input-border-success);
|
|
136
72
|
}
|
|
137
73
|
}
|
|
138
74
|
|
|
@@ -144,10 +80,10 @@
|
|
|
144
80
|
|
|
145
81
|
// Change place holder text to dark gray (#43484e).
|
|
146
82
|
::placeholder {
|
|
147
|
-
color:
|
|
83
|
+
color: var(--input-text-placeholder);
|
|
148
84
|
}
|
|
149
85
|
|
|
150
86
|
// Force placeholder text color change for "date" field type.
|
|
151
87
|
input[type='date']::-webkit-datetime-edit {
|
|
152
|
-
color:
|
|
88
|
+
color: var(--input-text-placeholder);
|
|
153
89
|
}
|
|
@@ -29,6 +29,21 @@
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
//
|
|
33
|
+
// Media type utilities.
|
|
34
|
+
//
|
|
35
|
+
.u-print-only {
|
|
36
|
+
@media screen {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.u-screen-only {
|
|
42
|
+
@media print {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
32
47
|
//
|
|
33
48
|
// Clearfix
|
|
34
49
|
//
|
|
@@ -80,11 +95,9 @@
|
|
|
80
95
|
}
|
|
81
96
|
|
|
82
97
|
.u-show-on-mobile {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
@include respond-to-max($bp-xs-max) {
|
|
87
|
-
display: block;
|
|
98
|
+
// Tablet and above.
|
|
99
|
+
@include respond-to-min($bp-sm-min) {
|
|
100
|
+
display: none;
|
|
88
101
|
}
|
|
89
102
|
}
|
|
90
103
|
|