@cdc/core 1.1.2 → 1.1.4
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/assets/alabama-graphic.svg +23 -0
- package/assets/check.svg +3 -0
- package/assets/dashboard.svg +11 -0
- package/assets/file-upload-solid.svg +1 -0
- package/assets/horizontal-stacked-bar.svg +1 -0
- package/assets/icon-code.svg +3 -0
- package/assets/icon-grid.svg +4 -0
- package/assets/icon-info.svg +3 -0
- package/assets/icon-warning.svg +3 -0
- package/assets/link.svg +1 -0
- package/assets/map-folded.svg +1 -0
- package/assets/paired-bar.svg +11 -0
- package/assets/upload-solid.svg +1 -0
- package/assets/usa-region-graphic.svg +393 -0
- package/components/AdvancedEditor.js +74 -0
- package/components/GlobalContext.jsx +41 -0
- package/components/Loading.js +3 -2
- package/components/elements/Button.jsx +12 -0
- package/components/inputs/InputCheckbox.jsx +59 -0
- package/components/inputs/InputSelect.jsx +49 -0
- package/components/inputs/InputText.jsx +68 -0
- package/components/inputs/InputToggle.jsx +95 -0
- package/components/ui/Accordion.jsx +64 -0
- package/components/ui/Icon.jsx +63 -0
- package/components/ui/Modal.jsx +87 -0
- package/components/ui/Overlay.jsx +84 -0
- package/components/ui/OverlayFrame.jsx +16 -0
- package/components/ui/Tooltip.jsx +55 -0
- package/data/colorPalettes.js +240 -0
- package/helpers/events.js +15 -0
- package/helpers/numberFromString.js +4 -3
- package/helpers/updatePaletteNames.js +18 -0
- package/helpers/validateFipsCodeLength.js +67 -0
- package/package.json +16 -2
- package/styles/_data-table.scss +8 -2
- package/styles/_global.scss +5 -3
- package/styles/v2/base/_general.scss +46 -0
- package/styles/v2/base/_reset.scss +81 -0
- package/styles/v2/base/_typography.scss +0 -0
- package/styles/v2/base/index.scss +3 -0
- package/styles/v2/components/accordion.scss +156 -0
- package/styles/v2/components/button.scss +178 -0
- package/styles/v2/components/editor.scss +487 -0
- package/styles/v2/components/icon.scss +23 -0
- package/styles/v2/components/input.scss +372 -0
- package/styles/v2/components/modal.scss +64 -0
- package/styles/v2/components/overlay.scss +80 -0
- package/styles/v2/layout/_alert.scss +36 -0
- package/styles/v2/layout/_component.scss +31 -0
- package/styles/v2/layout/_data-table.scss +278 -0
- package/styles/v2/layout/_header.scss +13 -0
- package/styles/v2/layout/_link.scss +46 -0
- package/styles/v2/layout/_progression.scss +80 -0
- package/styles/v2/layout/_tooltip.scss +132 -0
- package/styles/v2/layout/index.scss +7 -0
- package/styles/v2/main.scss +15 -0
- package/styles/v2/themes/_color-definitions.scss +129 -0
- package/styles/v2/themes/index.scss +1 -0
- package/styles/v2/utils/_animations.scss +63 -0
- package/styles/v2/utils/_functions.scss +0 -0
- package/styles/v2/utils/_mixins.scss +29 -0
- package/styles/v2/utils/_variables.scss +2 -0
- package/styles/v2/utils/index.scss +4 -0
- package/LICENSE +0 -201
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
@import "../utils/variables";
|
|
2
|
+
@import "../themes/index";
|
|
3
|
+
|
|
4
|
+
.cove {
|
|
5
|
+
.cove-accordion__item {
|
|
6
|
+
select {
|
|
7
|
+
text-transform: capitalize;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.number-narrow {
|
|
11
|
+
min-width: auto;
|
|
12
|
+
width: 75px
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.cove-accordion__heading {
|
|
17
|
+
background: $lightestGray;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.cove-accordion__button {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
position: relative;
|
|
24
|
+
width: 100%;
|
|
25
|
+
padding: .3em 1em;
|
|
26
|
+
font-size: 1em;
|
|
27
|
+
text-align: left;
|
|
28
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
|
29
|
+
user-select: none;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
|
|
32
|
+
&::before {
|
|
33
|
+
display: inline-block;
|
|
34
|
+
content: '';
|
|
35
|
+
height: 7px;
|
|
36
|
+
width: 7px;
|
|
37
|
+
margin-right: 1em;
|
|
38
|
+
border-bottom: 2px solid currentColor;
|
|
39
|
+
border-right: 2px solid currentColor;
|
|
40
|
+
right: 0;
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 50%;
|
|
43
|
+
transform: rotate(-45deg) translateX(0) translateY(-50%);
|
|
44
|
+
transition: .1s all;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&[aria-expanded='true']::before,
|
|
48
|
+
&[aria-selected='true']::before {
|
|
49
|
+
transform: rotate(45deg) translateX(-2px) translateY(-70%);
|
|
50
|
+
margin-right: 1.3em;
|
|
51
|
+
transition: .1s all;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.cove-tooltip,
|
|
55
|
+
.cove-tooltip--target {
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.cove-tooltip {
|
|
60
|
+
right: 1.5rem;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.cove-accordion__panel {
|
|
65
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
|
66
|
+
padding: 1em 1.25em 2em;
|
|
67
|
+
animation: fadeIn 0.2s ease-in;
|
|
68
|
+
|
|
69
|
+
&:first-child {
|
|
70
|
+
margin-top: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
h5 {
|
|
74
|
+
font-size: .8em;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.cove-accordion__panel-section {
|
|
79
|
+
padding: 16px;
|
|
80
|
+
border: 1px solid #c4c4c4;
|
|
81
|
+
border-radius: 8px;
|
|
82
|
+
margin-top: 8px;
|
|
83
|
+
margin-bottom: 24px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cove-accordion__panel-row {
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: flex-start;
|
|
89
|
+
margin-left: -4px;
|
|
90
|
+
margin-right: -4px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.cove-accordion__panel-col {
|
|
94
|
+
flex: 1 1 0;
|
|
95
|
+
padding-left: 4px;
|
|
96
|
+
padding-right: 4px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.cove-accordion__divider {
|
|
100
|
+
border: 0;
|
|
101
|
+
border-top: 1px solid #e2e2e2;
|
|
102
|
+
margin-top: 1.5rem;
|
|
103
|
+
margin-bottom: 1.5rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// TODO: May not need these? Input styles should be pulling from global ----------
|
|
107
|
+
|
|
108
|
+
.cove-accordion__panel-label {
|
|
109
|
+
font-size: 14px;
|
|
110
|
+
text-transform: unset;
|
|
111
|
+
font-weight: normal;
|
|
112
|
+
line-height: 16px;
|
|
113
|
+
user-select: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.cove-accordion__small-inputs {
|
|
117
|
+
input[type="text"] {
|
|
118
|
+
display: block;
|
|
119
|
+
width: 100%;
|
|
120
|
+
height: 22px;
|
|
121
|
+
min-width: unset !important;
|
|
122
|
+
padding-top: 0;
|
|
123
|
+
padding-bottom: 0;
|
|
124
|
+
font-size: 1.1em;
|
|
125
|
+
line-height: 1em;
|
|
126
|
+
box-sizing: border-box;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.cove-accordion__panel-label--inline {
|
|
131
|
+
@extend .cove-accordion__panel-label;
|
|
132
|
+
text-align: right;
|
|
133
|
+
margin-right: 8px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.cove-accordion__panel-label--muted {
|
|
137
|
+
@extend .cove-accordion__panel-label;
|
|
138
|
+
color: #6f6f6f;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.cove-accordion__input-error {
|
|
142
|
+
color: #D8000C;
|
|
143
|
+
border: #D8000C 1px solid;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.cove-accordion__panel-error {
|
|
147
|
+
color: #D8000C;
|
|
148
|
+
background-color: #FFD2D2;
|
|
149
|
+
border: #D8000C 1px solid;
|
|
150
|
+
margin-top: 12px;
|
|
151
|
+
padding: 4px 8px;
|
|
152
|
+
line-height: 1.2em;
|
|
153
|
+
font-size: 14px;
|
|
154
|
+
border-radius: 4px;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
@import "../utils/variables";
|
|
2
|
+
@import "../themes/index";
|
|
3
|
+
|
|
4
|
+
.cove-button {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
position: relative;
|
|
7
|
+
min-height: 2.125rem;
|
|
8
|
+
padding: 0.375rem 0.75rem;
|
|
9
|
+
font-size: 1rem;
|
|
10
|
+
text-align: center;
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
vertical-align: middle;
|
|
13
|
+
color: #fff;
|
|
14
|
+
background-color: $primary;
|
|
15
|
+
border-radius: 0.1875rem;
|
|
16
|
+
border: 0;
|
|
17
|
+
outline: none;
|
|
18
|
+
transition: all 500ms $transition-expo-out;
|
|
19
|
+
|
|
20
|
+
* {
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
user-select: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:disabled {
|
|
26
|
+
background-color: #adadad !important;
|
|
27
|
+
cursor: not-allowed !important;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:not(:disabled) {
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:hover,
|
|
35
|
+
&:active,
|
|
36
|
+
&:focus,
|
|
37
|
+
&.active {
|
|
38
|
+
background-color: lighten($primary, 5%);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:active,
|
|
42
|
+
&:focus {
|
|
43
|
+
&::after {
|
|
44
|
+
content: '';
|
|
45
|
+
position: absolute;
|
|
46
|
+
inset: 0;
|
|
47
|
+
outline: 2px solid rgba(161, 161, 161, 0.6);
|
|
48
|
+
border-radius: .3125em;
|
|
49
|
+
margin: -2px;
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.fluid {
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&.success {
|
|
59
|
+
background-color: #44aa41;
|
|
60
|
+
|
|
61
|
+
&:hover {
|
|
62
|
+
background-color: lighten(#44aa41, 5%);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.warn {
|
|
67
|
+
background-color: #d73636;
|
|
68
|
+
|
|
69
|
+
&:hover {
|
|
70
|
+
background-color: darken(#d73636, 5%);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.muted {
|
|
75
|
+
background-color: #a0a0a0;
|
|
76
|
+
|
|
77
|
+
&:hover {
|
|
78
|
+
background-color: darken(#a0a0a0, 5%);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.cove-button--flex-center {
|
|
83
|
+
display: inline-flex;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
align-items: center;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.cove-button__text {
|
|
90
|
+
position: relative;
|
|
91
|
+
transition: width 500ms $transition-expo-out;
|
|
92
|
+
align-self: stretch;
|
|
93
|
+
|
|
94
|
+
.cove-button__text--loading {
|
|
95
|
+
opacity: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.cove-button__text--children {
|
|
99
|
+
opacity: 1;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.cove-button__text--loading,
|
|
103
|
+
.cove-button__text--children {
|
|
104
|
+
position: absolute;
|
|
105
|
+
top: 0;
|
|
106
|
+
left: 0;
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
transition: all 500ms $transition-expo-out;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.cove-button__load-spin {
|
|
113
|
+
display: flex;
|
|
114
|
+
width: 0;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.cove-button__text--loading,
|
|
119
|
+
.cove-button__load-spin {
|
|
120
|
+
white-space: nowrap;
|
|
121
|
+
transition: all 500ms $transition-expo-out;
|
|
122
|
+
opacity: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Old Styles ------------------------------------------
|
|
126
|
+
.btn {
|
|
127
|
+
display: block;
|
|
128
|
+
padding: .4em .8em;
|
|
129
|
+
font-size: 1em;
|
|
130
|
+
color: #fff;
|
|
131
|
+
background: #005eaa;
|
|
132
|
+
border: 0;
|
|
133
|
+
border-radius: .3em;
|
|
134
|
+
transition: .1s background-color;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
|
|
137
|
+
&.full-width {
|
|
138
|
+
width: 100%;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&:hover {
|
|
142
|
+
transition: .1s background-color;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&.secondary {
|
|
146
|
+
font-size: .8em;
|
|
147
|
+
padding: .3em 1em;
|
|
148
|
+
background: rgba(0, 0, 0, 0.3);
|
|
149
|
+
display: inline-block;
|
|
150
|
+
margin-bottom: 1em;
|
|
151
|
+
|
|
152
|
+
&:hover {
|
|
153
|
+
background: rgba(0, 0, 0, .5);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&.danger {
|
|
158
|
+
background-color: $red;
|
|
159
|
+
color: #fff;
|
|
160
|
+
|
|
161
|
+
&:hover {
|
|
162
|
+
background-color: darken($red, 5%);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&:hover {
|
|
167
|
+
transition: .1s all;
|
|
168
|
+
background: lighten(#005eaa, 5%);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
svg {
|
|
172
|
+
width: 16px;
|
|
173
|
+
height: 16px;
|
|
174
|
+
position: relative;
|
|
175
|
+
top: 2px;
|
|
176
|
+
margin-left: 5px;
|
|
177
|
+
}
|
|
178
|
+
}*/
|