@cdc/core 1.1.4 → 9.22.9

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 (115) hide show
  1. package/LICENSE +201 -0
  2. package/assets/filtered-text.svg +1 -0
  3. package/assets/icon-caret-down.svg +3 -0
  4. package/assets/icon-caret-filled-down.svg +3 -0
  5. package/assets/icon-caret-filled-up.svg +3 -0
  6. package/assets/icon-caret-up.svg +3 -0
  7. package/assets/icon-chart-bar-paired.svg +15 -0
  8. package/assets/icon-chart-bar-stacked.svg +10 -0
  9. package/assets/icon-chart-bar.svg +3 -0
  10. package/assets/icon-chart-line.svg +3 -0
  11. package/assets/icon-chart-pie.svg +3 -0
  12. package/assets/icon-check.svg +3 -0
  13. package/assets/icon-close.svg +3 -1
  14. package/assets/icon-code.svg +2 -2
  15. package/assets/icon-dashboard.svg +34 -0
  16. package/assets/icon-databite.svg +3 -0
  17. package/assets/icon-edit.svg +3 -0
  18. package/assets/icon-file-upload.svg +3 -0
  19. package/assets/icon-filter-bars.svg +5 -0
  20. package/assets/icon-gear.svg +6 -0
  21. package/assets/icon-grid.svg +2 -3
  22. package/assets/icon-info.svg +1 -1
  23. package/assets/icon-link.svg +3 -0
  24. package/assets/{alabama-graphic.svg → icon-map-alabama.svg} +2 -2
  25. package/assets/icon-map-usa.svg +3 -0
  26. package/assets/icon-map-world.svg +3 -0
  27. package/assets/icon-minus.svg +3 -0
  28. package/assets/icon-move.svg +8 -0
  29. package/assets/icon-plus.svg +3 -0
  30. package/assets/icon-question-circle.svg +3 -0
  31. package/assets/icon-tools.svg +8 -0
  32. package/assets/icon-upload.svg +3 -0
  33. package/assets/icon-warning-circle.svg +3 -0
  34. package/assets/{icon-warning.svg → icon-warning-triangle.svg} +1 -1
  35. package/components/AdvancedEditor.js +1 -1
  36. package/components/{ErrorBoundary.js → ErrorBoundary.jsx} +0 -0
  37. package/components/{LegendCircle.js → LegendCircle.jsx} +0 -0
  38. package/components/{Loading.js → Loading.jsx} +0 -0
  39. package/components/{Waiting.js → Waiting.jsx} +0 -0
  40. package/components/elements/Button.jsx +122 -3
  41. package/components/elements/Card.jsx +13 -0
  42. package/components/inputs/InputCheckbox.jsx +11 -3
  43. package/components/inputs/InputGroup.jsx +50 -0
  44. package/components/inputs/InputSelect.jsx +2 -2
  45. package/components/inputs/InputText.jsx +17 -18
  46. package/components/inputs/InputToggle.jsx +18 -18
  47. package/components/managers/DataDesigner.jsx +171 -0
  48. package/components/ui/Icon.jsx +50 -12
  49. package/components/ui/LoadSpin.jsx +24 -0
  50. package/components/ui/Modal.jsx +7 -2
  51. package/components/ui/Overlay.jsx +3 -1
  52. package/components/ui/Tooltip.jsx +18 -9
  53. package/data/colorPalettes.js +170 -124
  54. package/data/dataDesignerTables.js +148 -0
  55. package/{components → helpers}/DataTransform.js +3 -3
  56. package/helpers/fetchRemoteData.js +43 -0
  57. package/package.json +3 -2
  58. package/styles/_data-table.scss +13 -13
  59. package/styles/_global.scss +14 -0
  60. package/styles/_reset.scss +11 -1
  61. package/styles/base.scss +17 -1
  62. package/styles/v2/base/_file-selector.scss +20 -0
  63. package/styles/v2/base/_general.scss +9 -22
  64. package/styles/v2/base/_heading.scss +20 -0
  65. package/styles/v2/base/_reset.scss +2 -1
  66. package/styles/v2/base/index.scss +5 -1
  67. package/styles/v2/components/button.scss +27 -66
  68. package/styles/v2/components/card.scss +7 -0
  69. package/styles/v2/components/data-designer.scss +100 -0
  70. package/styles/v2/components/editor.scss +2 -1
  71. package/styles/v2/components/guidance-block.scss +74 -0
  72. package/styles/v2/components/icon.scss +0 -4
  73. package/styles/v2/components/input/_input-check-radio.scss +97 -0
  74. package/styles/v2/components/input/_input-group.scss +74 -0
  75. package/styles/v2/components/input/_input-slider.scss +184 -0
  76. package/styles/v2/components/input/_input.scss +66 -0
  77. package/styles/v2/components/input/index.scss +7 -0
  78. package/styles/v2/components/loadspin.scss +100 -0
  79. package/styles/v2/components/modal.scss +13 -6
  80. package/styles/v2/components/overlay.scss +2 -0
  81. package/styles/v2/layout/_alert.scss +11 -10
  82. package/styles/v2/layout/_component.scss +8 -1
  83. package/styles/v2/layout/_data-table.scss +71 -150
  84. package/styles/v2/layout/_progression.scss +4 -2
  85. package/styles/v2/layout/index.scss +0 -2
  86. package/styles/v2/main.scss +52 -2
  87. package/styles/v2/themes/_color-definitions.scss +31 -1
  88. package/styles/v2/utils/_align.scss +17 -0
  89. package/styles/v2/utils/_breakpoints.scss +18 -0
  90. package/styles/v2/utils/_grid.scss +47 -0
  91. package/styles/v2/utils/_mixins.scss +0 -16
  92. package/styles/v2/utils/_spacers.scss +31 -0
  93. package/styles/v2/utils/_variables.scss +7 -0
  94. package/styles/v2/utils/index.scss +7 -2
  95. package/assets/asc.svg +0 -1
  96. package/assets/chart-bar-solid.svg +0 -1
  97. package/assets/chart-line-solid.svg +0 -1
  98. package/assets/chart-pie-solid.svg +0 -1
  99. package/assets/check.svg +0 -3
  100. package/assets/dashboard.svg +0 -11
  101. package/assets/data-bite-graphic.svg +0 -3
  102. package/assets/desc.svg +0 -1
  103. package/assets/file-upload-solid.svg +0 -1
  104. package/assets/horizontal-stacked-bar.svg +0 -1
  105. package/assets/link.svg +0 -1
  106. package/assets/minus.svg +0 -1
  107. package/assets/paired-bar.svg +0 -11
  108. package/assets/plus.svg +0 -1
  109. package/assets/question-circle.svg +0 -1
  110. package/assets/upload-solid.svg +0 -1
  111. package/assets/usa-graphic.svg +0 -3
  112. package/assets/world-graphic.svg +0 -3
  113. package/styles/v2/components/input.scss +0 -372
  114. package/styles/v2/layout/_header.scss +0 -13
  115. package/styles/v2/layout/_link.scss +0 -46
@@ -12,7 +12,7 @@ div.data-table-heading {
12
12
  border: $lightGray 1px solid;
13
13
  border-bottom: 0;
14
14
  cursor: pointer;
15
- background-image: url(~@cdc/core/assets/minus.svg);
15
+ background-image: url(~@cdc/core/assets/icon-minus.svg);
16
16
  background-size: 15px 15px; // Need to define both for IE11
17
17
  background-position: right .7em center;
18
18
  background-repeat: no-repeat;
@@ -21,7 +21,7 @@ div.data-table-heading {
21
21
  position: relative;
22
22
  }
23
23
  &.collapsed {
24
- background-image: url(~@cdc/core/assets/plus.svg);
24
+ background-image: url(~@cdc/core/assets/icon-plus.svg);
25
25
  background-size: 15px 15px; // Need to define both for IE11
26
26
  background-position: right .7em center;
27
27
  background-repeat: no-repeat;
@@ -84,7 +84,7 @@ table.data-table {
84
84
  margin-left: 1rem;
85
85
  }
86
86
  }
87
-
87
+
88
88
  th.sort {
89
89
  background-color: darken($mediumGray, 10%);
90
90
  background-repeat: no-repeat;
@@ -94,20 +94,20 @@ table.data-table {
94
94
 
95
95
  th.sort-asc,
96
96
  td.sort-asc {
97
- background-image: url(~@cdc/core/assets/asc.svg);
97
+ background-image: url(~@cdc/core/assets/icon-caret-filled-up.svg);
98
98
  }
99
-
99
+
100
100
  th.sort-desc,
101
101
  td.sort-desc {
102
- background-image: url(~@cdc/core/assets/desc.svg);
102
+ background-image: url(~@cdc/core/assets/icon-caret-filled-down.svg);
103
103
  }
104
-
104
+
105
105
  th:last-child,
106
106
  td:last-child {
107
107
  border-right: 0
108
108
  }
109
109
  }
110
-
110
+
111
111
  tbody {
112
112
  tr {
113
113
  width: 100%;
@@ -124,12 +124,12 @@ table.data-table {
124
124
  border-bottom: 0
125
125
  }
126
126
  }
127
-
127
+
128
128
  td {
129
129
  padding: .3em .7em;
130
130
  border-right: 1px solid rgba(0, 0, 0, 0.1);
131
131
  }
132
-
132
+
133
133
  th,
134
134
  td {
135
135
  white-space: nowrap;
@@ -158,7 +158,7 @@ table.data-table {
158
158
  color: inherit;
159
159
  text-decoration: none;
160
160
  }
161
-
161
+
162
162
  td span.table-link {
163
163
  text-decoration: underline;
164
164
  cursor: pointer;
@@ -213,7 +213,7 @@ table.data-table {
213
213
  button.btn-next {
214
214
  &::before {
215
215
  content: " ";
216
- background-image: url(~@cdc/core/assets/asc.svg);
216
+ background-image: url(~@cdc/core/assets/icon-caret-filled-up.svg);
217
217
  background-size: 10px 5px;
218
218
  width: 10px;
219
219
  height: 5px;
@@ -224,7 +224,7 @@ table.data-table {
224
224
  button.btn-prev {
225
225
  &::before {
226
226
  content: " ";
227
- background-image: url(~@cdc/core/assets/asc.svg);
227
+ background-image: url(~@cdc/core/assets/icon-caret-filled-up.svg);
228
228
  background-size: 10px 5px;
229
229
  width: 10px;
230
230
  height: 5px;
@@ -167,3 +167,17 @@ select {
167
167
  font-size: 1.2rem;
168
168
  }
169
169
  }
170
+
171
+ section.introText {
172
+ padding: 15px;
173
+ }
174
+
175
+ section.footnotes {
176
+ border-top: 1px solid #DDD;
177
+ margin-top: 20px;
178
+ padding: 15px;
179
+ }
180
+
181
+ .cdc-chart-inner-container .subtext {
182
+ padding: 15px;
183
+ }
@@ -6,6 +6,16 @@
6
6
  text-rendering: optimizeLegibility;
7
7
  -webkit-font-smoothing: antialiased;
8
8
  color: #111;
9
+
10
+ // match cdc site outline
11
+ :focus,
12
+ [tabindex]:focus-visible {
13
+ outline: 2px solid rgba(255,102,1,.9) !important;
14
+ }
15
+
16
+ .outline-none {
17
+ outline: none !important;
18
+ }
9
19
  }
10
20
  .cdc-open-viz-module {
11
21
  div, span, applet, object, iframe,
@@ -67,4 +77,4 @@
67
77
  half as far down as the superscript moved up */
68
78
  bottom: -0.25em;
69
79
  }
70
- }
80
+ }
package/styles/base.scss CHANGED
@@ -1,3 +1,5 @@
1
+ @use "sass:string";
2
+
1
3
  @mixin breakpoint($class) {
2
4
  @if $class == xs {
3
5
  @media (max-width: 767px) { @content; }
@@ -65,4 +67,18 @@
65
67
  }
66
68
  @import "data-table";
67
69
  @import "global";
68
- }
70
+ }
71
+
72
+ $theme: (
73
+ 'amber': ('#fbab18', '#ffd54f', '#ffecb3', '#fff7e1'),
74
+ 'blue': ('#005eaa', '#88c3ea', '#c0e9ff', '#edf9ff'),
75
+ 'brown': ('#705043', '#ad907b', '#d7ccc8', '#f2ebe8'),
76
+ 'cyan': ('#006778', '#65b0bd', '#cce5e9', '#ebf5f6'),
77
+ 'green': ('#4b830d', '#84bc49', '#dcedc8', '#f1f8e9'),
78
+ 'indigo': ('#26418f', '#92a6dd', '#dee8ff', '#f2f6ff'),
79
+ 'orange': ('#bb4d00', '#ffad42', '#ffe97d', '#fff4cf'),
80
+ 'pink': ('#af4448', '#e57373', '#ffc2c2', '#ffe7e7'),
81
+ 'purple': ('#712177', '#b890bb', '#e3d3e4', '#f7f2f7'),
82
+ 'slate': ('#29434e', '#7e9ba5', '#b6c6d2', '#e2e8ed'),
83
+ 'teal': ('#00695c', '#4ebaaa', '#ceece7', '#ebf7f5' )
84
+ );
@@ -0,0 +1,20 @@
1
+ .cove-file-selector {
2
+ padding: 1rem 3rem;
3
+ text-align: center;
4
+ font-size: 0.875rem;
5
+ color: $mediumGray;
6
+ border: $lightGray 2px dashed;
7
+ border-radius: .2rem;
8
+ cursor: pointer;
9
+ transition: .1s all;
10
+
11
+ &.drag-active {
12
+ background-color: $lightestGray;
13
+ }
14
+
15
+ span {
16
+ white-space: pre;
17
+ color: $blue;
18
+ text-decoration: underline;
19
+ }
20
+ }
@@ -1,33 +1,20 @@
1
+ @import '../themes/color-definitions';
2
+
1
3
  .cove {
2
4
  margin: 0;
3
5
  font: 1em/1.6 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Fira Sans, sans-serif;
4
6
  font-weight: 400;
5
7
  font-style: normal;
8
+ line-height: 1.4;
9
+ color: $baseColor;
6
10
  text-rendering: optimizeLegibility;
7
11
  -webkit-font-smoothing: antialiased;
8
- color: #111;
9
-
10
- strong {
11
- font-weight: 600;
12
- }
13
-
14
- .subtext {
15
- margin-top: 1em;
16
- }
17
-
18
- .warning {
19
- padding: .75em 1em;
20
- margin: 1em 0;
21
- background-color: #FFD2D2;
22
- color: #D8000C;
23
- font-size: .8em;
24
- border: #D8000C 1px solid;
25
- border-radius: .4em;
26
12
 
27
- strong {
28
- font-weight: 600;
29
- display: block;
30
- }
13
+ small {
14
+ display: block;
15
+ font-size: .8rem;
16
+ font-style: italic;
17
+ color: $mediumGray;
31
18
  }
32
19
 
33
20
  .sr-only,
@@ -0,0 +1,20 @@
1
+ *[class^='cove-heading'] {
2
+ font-weight: 700;
3
+ margin-bottom: 1.5rem;
4
+ }
5
+
6
+ .cove-heading--1 {
7
+ font-size: 1.5rem;
8
+ }
9
+
10
+ .cove-heading--2 {
11
+ font-size: 1.25rem;
12
+ }
13
+
14
+ .cove-heading--3 {
15
+ font-size: 1rem;
16
+ }
17
+
18
+ .cove-heading--4 {
19
+ font-size: 0.75rem;
20
+ }
@@ -27,7 +27,8 @@ html:focus-within {
27
27
  }
28
28
 
29
29
  body {
30
- min-height: 100vh;
30
+ // TODO: Uncomment after cove refactor - conflicts with flex display on current <body>. Why the $#@&%! 'that' was done in the first place, I have no clue.
31
+ //min-height: 100vh;
31
32
  text-rendering: optimizeSpeed;
32
33
  line-height: 1.5;
33
34
  }
@@ -1,3 +1,7 @@
1
- @import "reset";
1
+ //@import "reset"; TODO: Enable after cove refactor
2
2
  @import "typography";
3
+
3
4
  @import "general";
5
+ @import "heading";
6
+
7
+ @import "file-selector";
@@ -1,6 +1,16 @@
1
1
  @import "../utils/variables";
2
2
  @import "../themes/index";
3
3
 
4
+ .sbdocs .cove-button {
5
+ margin-right: 1rem;
6
+ margin-bottom: 1rem;
7
+
8
+ &.fluid {
9
+ width: 100%;
10
+ margin-right: 0;
11
+ }
12
+ }
13
+
4
14
  .cove-button {
5
15
  display: inline-block;
6
16
  position: relative;
@@ -24,7 +34,7 @@
24
34
 
25
35
  &:disabled {
26
36
  background-color: #adadad !important;
27
- cursor: not-allowed !important;
37
+ cursor: not-allowed;
28
38
  }
29
39
 
30
40
  &:not(:disabled) {
@@ -38,19 +48,25 @@
38
48
  background-color: lighten($primary, 5%);
39
49
  }
40
50
 
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
+ &:not(.loading) {
52
+ &:focus,
53
+ &:active {
54
+ &::after {
55
+ content: '';
56
+ position: absolute;
57
+ inset: 0;
58
+ outline: 2px solid rgba(161, 161, 161, 0.6);
59
+ border-radius: .3125em;
60
+ margin: -2px;
61
+ pointer-events: none;
62
+ }
51
63
  }
52
64
  }
53
65
 
66
+ &.loading:disabled {
67
+ cursor: default;
68
+ }
69
+
54
70
  &.fluid {
55
71
  width: 100%;
56
72
  }
@@ -121,58 +137,3 @@
121
137
  transition: all 500ms $transition-expo-out;
122
138
  opacity: 0;
123
139
  }
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
- }*/
@@ -0,0 +1,7 @@
1
+ .cove-card {
2
+ border: 1px solid #c7c7c7;
3
+ border-radius: 0.25rem;
4
+ background-color: #f2f2f2;
5
+ padding: .75rem;
6
+ height: 100%;
7
+ }
@@ -0,0 +1,100 @@
1
+ @import "../utils/variables";
2
+ @import "../themes/color-definitions";
3
+
4
+ .cove-modal__content {
5
+ .dataset-selector-container {
6
+ padding: 1em;
7
+
8
+ .dataset-selector {
9
+ margin: 0 0.5em;
10
+ padding: 0.5em;
11
+ max-width: 10em;
12
+ }
13
+ }
14
+
15
+ .cove-data-designer__container {
16
+ padding: 1em;
17
+ }
18
+ }
19
+
20
+ .cove-data-designer__container {
21
+ .fw-bold {
22
+ font-weight: bold;
23
+ }
24
+
25
+ .fw-normal {
26
+ font-weight: normal;
27
+ }
28
+
29
+ .column {
30
+ grid-column-end: span 6;
31
+ }
32
+ }
33
+
34
+ .cove-data-designer__button {
35
+ width: 100%;
36
+ height: 100%;
37
+ padding: 0;
38
+ background-color: transparent;
39
+ border: 0;
40
+ overflow: hidden;
41
+ cursor: pointer;
42
+
43
+ strong {
44
+ font-weight: bold;
45
+ }
46
+
47
+ .cove-card {
48
+ position: relative;
49
+ text-align: left;
50
+ box-sizing: border-box;
51
+ border: 0;
52
+ padding: 1em;
53
+
54
+ &::after {
55
+ content: '';
56
+ display: block;
57
+ position: absolute;
58
+ top: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ left: 0;
62
+ border: 1px solid $lightGray;
63
+ border-radius: 0.25rem;
64
+ }
65
+ }
66
+
67
+ &.active {
68
+ .cove-card::after {
69
+ border: 2px solid #005eaa;
70
+ }
71
+ }
72
+
73
+ p {
74
+ font-size: .8rem;
75
+ margin-bottom: 1rem;
76
+ }
77
+
78
+ table + table {
79
+ margin-top: 1em;
80
+ }
81
+
82
+ table {
83
+ font-size: .8rem;
84
+ background-color: #fff;
85
+ border: 1px solid $lightGray;
86
+ border-collapse: collapse;
87
+
88
+ th {
89
+ color: white;
90
+ text-align: left;
91
+ background-color: $primary;
92
+ }
93
+
94
+ th, td {
95
+ padding: 0 5px;
96
+ border-top: 1px solid $lightGray;
97
+ border-bottom: 1px solid $lightGray;
98
+ }
99
+ }
100
+ }
@@ -2,6 +2,8 @@
2
2
  @import "../themes/index";
3
3
 
4
4
  .cove-editor {
5
+
6
+ @import "./../base/reset";
5
7
  display: grid;
6
8
  grid-template-columns: auto 1fr;
7
9
  grid-template-areas: "panel content";
@@ -414,7 +416,6 @@
414
416
  display: block;
415
417
  text-align: left;
416
418
  cursor: pointer;
417
- color: rgba(0, 0, 0, .5);
418
419
  text-decoration: underline;
419
420
 
420
421
  span {
@@ -0,0 +1,74 @@
1
+ @import "../utils/variables";
2
+ @import "../themes/color-definitions";
3
+
4
+ .cove-guidance-block {
5
+ display: block;
6
+ position: relative;
7
+ padding: .75rem 1rem;
8
+ margin-left: 5px;
9
+ color: #444;
10
+ text-decoration: none;
11
+ border: $lightGray 1px solid;
12
+ border-left: none;
13
+ border-radius: 0 0.1875rem 0.1875rem 0;
14
+ transition: all 200ms $transition-expo-out;
15
+
16
+ &:before {
17
+ content: "";
18
+ position: absolute;
19
+ top: -1px;
20
+ left: -5px;
21
+ bottom: -1px;
22
+ width: 5px;
23
+ background: $blue;
24
+ border-radius: 0.1875rem 0 0 0.1875rem;
25
+ }
26
+
27
+ &:hover,
28
+ &:focus,
29
+ &:active {
30
+ background: $lightestGray;
31
+ color: #444;
32
+ transition: .2s all;
33
+ }
34
+
35
+ &:after {
36
+ content: '';
37
+ position: absolute;
38
+ inset: 0;
39
+ left: -4px;
40
+ margin: -4px;
41
+ border-radius: 0.1875rem;
42
+ outline: 2px solid transparent;
43
+ transition: outline 200ms $transition-expo-out;
44
+ pointer-events: none;
45
+ }
46
+
47
+ &:focus,
48
+ &:active {
49
+ outline: none;
50
+
51
+ &:after {
52
+ outline: 2px solid rgba(161, 161, 161, 0.6);
53
+ }
54
+ }
55
+
56
+ svg {
57
+ width: 60px;
58
+ color: $blue;
59
+ margin-right: 1rem;
60
+
61
+ path {
62
+ fill: currentColor;
63
+ }
64
+ }
65
+ }
66
+
67
+ .cove-guidance-block__header {
68
+ font-weight: bold;
69
+ font-size: 1.125rem;
70
+ }
71
+
72
+ .cove-guidance-block__content {
73
+ font-size: .875rem;
74
+ }
@@ -15,9 +15,5 @@
15
15
  max-width: 100%;
16
16
  max-height: 100%;
17
17
  pointer-events: none;
18
-
19
- path {
20
- fill: currentColor;
21
- }
22
18
  }
23
19
  }
@@ -0,0 +1,97 @@
1
+ .cove-input-group--checkbox {
2
+ margin-bottom: 1rem;
3
+ }
4
+
5
+ .cove-input-group--checkbox,
6
+ .cove-input-group--radio {
7
+ display: flex;
8
+ align-items: center;
9
+
10
+ label,
11
+ input[type="checkbox"],
12
+ input[type="radio"] {
13
+ cursor: pointer;
14
+ user-select: none;
15
+ }
16
+
17
+ label {
18
+ padding-right: 6px;
19
+
20
+ + input[type="checkbox"],
21
+ + input[type="radio"] {
22
+ margin-left: 0;
23
+ }
24
+ }
25
+
26
+ input[type="checkbox"],
27
+ input[type="radio"] {
28
+ display: inline-block;
29
+ margin-right: 0;
30
+ margin-left: 0;
31
+
32
+ + label {
33
+ padding-right: 0;
34
+ padding-left: 6px;
35
+ }
36
+ }
37
+
38
+ input[type="radio"] {
39
+ margin-bottom: 5px;
40
+ }
41
+ }
42
+
43
+ .cove-input__checkbox {
44
+ display: inline-block;
45
+ width: 1.75rem;
46
+ aspect-ratio: 1/1;
47
+ cursor: pointer;
48
+
49
+ &--small {
50
+ @extend .cove-input__checkbox;
51
+ width: 1.25rem;
52
+ }
53
+
54
+ &--large {
55
+ @extend .cove-input__checkbox;
56
+ width: 2.25rem;
57
+ }
58
+
59
+ &.active {
60
+ .cove-input__checkbox-box {
61
+ background-color: #fff;
62
+
63
+ &.custom-color {
64
+ box-shadow: none;
65
+ }
66
+ }
67
+
68
+ .cove-input__checkbox-check {
69
+ opacity: 1;
70
+ transform: translateY(-1px);
71
+ }
72
+ }
73
+ }
74
+
75
+ .cove-input__checkbox-box {
76
+ position: relative;
77
+ width: 100%;
78
+ height: 100%;
79
+ background-color: #f4f4f4;
80
+ border-radius: 3px;
81
+ box-shadow: inset 0 0 0 1px #c4c4c4;
82
+ transition: all 150ms $transition-expo-out;
83
+ }
84
+
85
+ .cove-input__checkbox-check {
86
+ position: absolute;
87
+ top: 0;
88
+ right: 0;
89
+ bottom: 0;
90
+ left: 0;
91
+ margin: 3px;
92
+ fill: #fff;
93
+ pointer-events: none;
94
+ transform: translateY(-1px);
95
+ transition: all 250ms $transition-expo-out;
96
+ opacity: 0;
97
+ }