@carbon/charts 1.13.2 → 1.13.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.
@@ -0,0 +1,323 @@
1
+ @use '../../globals';
2
+
3
+ .#{globals.$prefix}--chart-holder {
4
+ --#{globals.$prefix}-layout-size-height-min: 0px;
5
+ --#{globals.$prefix}-layout-size-height-lg: 3rem;
6
+ --#{globals.$prefix}-layout-size-height-max: 999999999px;
7
+ --#{globals.$prefix}-layout-density-padding-inline-min: 0px;
8
+ --#{globals.$prefix}-layout-density-padding-inline-max: 999999999px;
9
+ --#{globals.$prefix}-layout-size-height-lg: 3rem;
10
+
11
+ .#{globals.$prefix}--modal {
12
+ position: fixed;
13
+ z-index: 9000;
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ background-color: var(--#{globals.$prefix}-overlay, rgba(22, 22, 22, .5));
18
+ block-size: 100vh;
19
+ content: "";
20
+ inline-size: 100vw;
21
+ inset-block-start: 0;
22
+ inset-inline-start: 0;
23
+ opacity: 0;
24
+ transition: opacity .24s cubic-bezier(.4, .14, 1, 1), visibility 0ms linear .24s;
25
+ visibility: hidden;
26
+
27
+ &.is-visible {
28
+ z-index: 99999;
29
+
30
+ opacity: 1;
31
+ transition: opacity .24s cubic-bezier(0, 0, .3, 1),
32
+ visibility 0ms linear;
33
+ visibility: inherit;
34
+
35
+ .#{globals.$prefix}--modal-container {
36
+ transform: translateZ(0);
37
+ transition: transform .24s cubic-bezier(0, 0, .3, 1);
38
+ }
39
+ }
40
+
41
+ .#{globals.$prefix}--modal-container {
42
+
43
+ @media (min-width: 42rem) {
44
+ position: static;
45
+ width: 84%;
46
+ height: auto;
47
+ max-height: 90%;
48
+ }
49
+
50
+ @media (min-width: 66rem) {
51
+ width: 60%;
52
+ max-height: 84%;
53
+ }
54
+
55
+ @media (min-width: 82rem) {
56
+ width: 48%;
57
+ }
58
+
59
+ position: fixed;
60
+ top: 0;
61
+ display: grid;
62
+ overflow: hidden;
63
+ width: 100%;
64
+ height: 100%;
65
+ max-height: 100%;
66
+ background-color: var(--#{globals.$prefix}-layer);
67
+ grid-template-columns: 100%;
68
+ grid-template-rows: auto 1fr auto;
69
+ outline: 3px solid transparent;
70
+ outline-offset: -3px;
71
+ transform: translate3d(0, -24px, 0);
72
+ transform-origin: top center;
73
+ transition: transform .24s cubic-bezier(.4, .14, 1, 1);
74
+
75
+ .#{globals.$prefix}--modal-header {
76
+ padding-top: 1rem;
77
+ padding-right: 3rem;
78
+ padding-left: 1rem;
79
+ margin-bottom: 0.5rem;
80
+ grid-column: 1/-1;
81
+ grid-row: 1/1;
82
+
83
+ &__label {
84
+ margin-top: 0;
85
+ margin-bottom: 0;
86
+
87
+ box-sizing: border-box;
88
+ padding: 0;
89
+ border: 0;
90
+ margin: 0;
91
+ font-family: inherit;
92
+ vertical-align: baseline;
93
+ font-size: var(--#{globals.$prefix}-label-01-font-size, .75rem);
94
+ font-weight: var(--#{globals.$prefix}-label-01-font-weight, 400);
95
+ line-height: var(--#{globals.$prefix}-label-01-line-height, 1.33333);
96
+ letter-spacing: var(--#{globals.$prefix}-label-01-letter-spacing, .32px);
97
+ color: var(--#{globals.$prefix}-text-secondary, #525252);
98
+
99
+ // On paragraph with this class
100
+ --docs-content-width: 75%;
101
+ width: var(--docs-content-width);
102
+ }
103
+
104
+ &__heading {
105
+ margin-top: 0.5rem !important;
106
+ margin-bottom: 1rem !important;
107
+
108
+ box-sizing: border-box;
109
+ padding: 0;
110
+ border: 0;
111
+ margin: 0;
112
+ font-family: inherit;
113
+ vertical-align: baseline;
114
+ font-size: var(--#{globals.$prefix}-heading-03-font-size, 1.25rem);
115
+ font-weight: var(--#{globals.$prefix}-heading-03-font-weight, 400);
116
+ line-height: var(--#{globals.$prefix}-heading-03-line-height, 1.4);
117
+ letter-spacing: var(--#{globals.$prefix}-heading-03-letter-spacing, 0);
118
+ padding-right: calc(20% - 3rem);
119
+ color: var(--#{globals.$prefix}-text-primary, #161616);
120
+
121
+ // On paragraph with this class
122
+ --docs-content-width: 75%;
123
+ width: var(--docs-content-width);
124
+ }
125
+
126
+ .#{globals.$prefix}--modal-close {
127
+ &:hover {
128
+ background-color: var(--#{globals.$prefix}-layer-hover);
129
+ }
130
+
131
+ &:focus {
132
+ border-color: var(--cds-focus,#0f62fe);
133
+ outline: none;
134
+ }
135
+
136
+ position: absolute;
137
+ z-index: 2;
138
+ top: 0;
139
+ right: 0;
140
+ overflow: hidden;
141
+ width: 3rem;
142
+ height: 3rem;
143
+ padding: .75rem;
144
+ border: 2px solid transparent;
145
+ background-color: transparent;
146
+ cursor: pointer;
147
+ transition: background-color .11s cubic-bezier(.2, 0, .38, .9);
148
+
149
+ // button
150
+ margin: 0;
151
+ border-radius: 0;
152
+ font-family: inherit;
153
+
154
+ &__icon {
155
+ width: 1.25rem;
156
+ height: 1.25rem;
157
+ fill: var(--#{globals.$prefix}-icon-primary, #161616);
158
+ }
159
+ }
160
+ }
161
+
162
+ .#{globals.$prefix}--modal-content {
163
+ padding: 0 !important;
164
+ margin-bottom: 0;
165
+ color-scheme: var(--#{globals.$prefix}-color-scheme, light);
166
+ font-size: var(--#{globals.$prefix}-body-01-font-size, .875rem);
167
+ line-height: var(--#{globals.$prefix}-body-01-line-height, 1.42857);
168
+ letter-spacing: var(--#{globals.$prefix}-body-01-letter-spacing, .16px);
169
+ position: relative;
170
+ color: var(--#{globals.$prefix}-text-primary, #161616);
171
+ font-weight: 400;
172
+ grid-column: 1/-1;
173
+ grid-row: 2/-2;
174
+ overflow-y: auto;
175
+
176
+ .#{globals.$prefix}--data-table {
177
+ position: relative;
178
+ border-collapse: collapse;
179
+ width: 100%;
180
+ border-spacing: 0;
181
+
182
+ thead {
183
+ font-size: var(--#{globals.$prefix}-heading-compact-01-font-size, .875rem);
184
+ font-weight: var(--#{globals.$prefix}-heading-compact-01-font-weight, 600);
185
+ line-height: var(--#{globals.$prefix}-heading-compact-01-line-height, 1.28572);
186
+ letter-spacing: var(--#{globals.$prefix}-heading-compact-01-letter-spacing, .16px);
187
+ background-color: var(--#{globals.$prefix}-layer-accent);
188
+
189
+ tr {
190
+ width: 100%;
191
+ height: 3rem;
192
+ border: none;
193
+
194
+ th {
195
+ position: sticky;
196
+ top: 0;
197
+ padding-right: 1rem;
198
+ padding-left: 1rem;
199
+ background-color: var(--#{globals.$prefix}-layer-accent);
200
+ color: var(--#{globals.$prefix}-text-primary, #161616);
201
+
202
+ text-align: start;
203
+ vertical-align: middle;
204
+
205
+ .#{globals.$prefix}--table-header-label {
206
+ text-align: left;
207
+ }
208
+ }
209
+ }
210
+ }
211
+
212
+ tbody {
213
+ font-size: var(--#{globals.$prefix}-body-compact-01-font-size, .875rem);
214
+ font-weight: var(--#{globals.$prefix}-body-compact-01-font-weight, 400);
215
+ line-height: var(--#{globals.$prefix}-body-compact-01-line-height, 1.28572);
216
+ letter-spacing: var(--#{globals.$prefix}-body-compact-01-letter-spacing, .16px);
217
+ background-color: var(--#{globals.$prefix}-layer);
218
+ width: 100%;
219
+
220
+ tr {
221
+ &:hover {
222
+ background: var(--#{globals.$prefix}-layer-hover) !important;
223
+ }
224
+
225
+ transition: background-color 70ms cubic-bezier(0, 0, .38, .9);
226
+ width: 100;
227
+ height: 3rem;
228
+ border: none;
229
+
230
+ td {
231
+ transition: background-color 70ms cubic-bezier(0,0,.38,.9);
232
+ padding-right: 1rem;
233
+ padding-left: 1rem;
234
+ border-top: 1px solid var(--#{globals.$prefix}-layer);
235
+ border-bottom: 1px solid var(--#{globals.$prefix}-border-subtle);
236
+ color: var(--#{globals.$prefix}-text-secondary, #525252);
237
+ text-align: left;
238
+ vertical-align: middle;
239
+ }
240
+ }
241
+ }
242
+ }
243
+ }
244
+
245
+ .#{globals.$prefix}--modal-footer {
246
+ background-color: transparent;
247
+ display: flex;
248
+ height: 4rem;
249
+ justify-content: flex-end;
250
+ margin-top: auto;
251
+ grid-column: 1/-1;
252
+ grid-row: -1/-1;
253
+
254
+ .#{globals.$prefix}--#{globals.$charts-prefix}-modal-footer-spacer {
255
+ width: 50%;
256
+ }
257
+
258
+ .#{globals.$prefix}--btn {
259
+ max-width: none;
260
+ height: 4rem;
261
+ flex: 0 1 50%;
262
+ align-items: baseline;
263
+ padding-top: 0.875rem;
264
+ padding-bottom: 2rem;
265
+ margin: 0;
266
+ --#{globals.$prefix}-layout-size-height-local: clamp(var(--#{globals.$prefix}-layout-size-height-min), var(--#{globals.$prefix}-layout-size-height, var(--#{globals.$prefix}-layout-size-height-lg)), var(--#{globals.$prefix}-layout-size-height-max));
267
+ --#{globals.$prefix}-layout-density-padding-inline-local: clamp(var(--#{globals.$prefix}-layout-density-padding-inline-min), var(--#{globals.$prefix}-layout-density-padding-inline, var(--#{globals.$prefix}-layout-density-padding-inline-normal)), var(--#{globals.$prefix}-layout-density-padding-inline-max));
268
+ --temp-1lh: ( var(--#{globals.$prefix}-body-compact-01-line-height, 1.28572) * 1em );
269
+ --temp-expressive-1lh: ( var(--#{globals.$prefix}-body-compact-02-line-height, 1.375) * 1em );
270
+ --temp-padding-block-max: calc( (var(--#{globals.$prefix}-layout-size-height-lg) - var(--temp-1lh)) / 2 - .0625rem );
271
+ box-sizing: border-box;
272
+ padding: 0;
273
+ border: 0;
274
+ font-family: inherit;
275
+ font-size: var(--#{globals.$prefix}-body-compact-01-font-size, .875rem);
276
+ font-weight: var(--#{globals.$prefix}-body-compact-01-font-weight, 400);
277
+ line-height: var(--#{globals.$prefix}-body-compact-01-line-height, 1.28572);
278
+ letter-spacing: var(--#{globals.$prefix}-body-compact-01-letter-spacing, .16px);
279
+ position: relative;
280
+ display: inline-flex;
281
+ width: max-content;
282
+ max-width: 20rem;
283
+ min-height: var(--#{globals.$prefix}-layout-size-height-local);
284
+ justify-content: space-between;
285
+ border-radius: 0;
286
+ cursor: pointer;
287
+ outline: none;
288
+ padding-block: min((var(--#{globals.$prefix}-layout-size-height-local) - var(--temp-1lh)) / 2 - 0.0625rem,var(--temp-padding-block-max));
289
+ padding-inline-end: calc(var(--#{globals.$prefix}-layout-density-padding-inline-local) * 3 + 1rem - 0.0625rem);
290
+ padding-inline-start: calc(var(--#{globals.$prefix}-layout-density-padding-inline-local) - 0.0625rem);
291
+ text-align: left;
292
+ text-decoration: none;
293
+ transition: background 70ms cubic-bezier(0,0,.38,.9),box-shadow 70ms cubic-bezier(0,0,.38,.9),border-color 70ms cubic-bezier(0,0,.38,.9),outline 70ms cubic-bezier(0,0,.38,.9);
294
+ vertical-align: top;
295
+ }
296
+
297
+ .#{globals.$prefix}--btn-primary {
298
+ &:hover {
299
+ color: var(--#{globals.$prefix}-text-on-color, #ffffff);
300
+ background-color: var(--#{globals.$prefix}-button-primary-hover, #0050e6);
301
+ }
302
+
303
+ &:focus {
304
+ border-color: var(--cds-button-focus-color,var(--cds-focus,#0f62fe));
305
+ box-shadow: inset 0 0 0 1px var(--cds-button-focus-color,var(--cds-focus,#0f62fe)),inset 0 0 0 2px var(--cds-background,#ffffff);
306
+ }
307
+
308
+ border-width: 1px;
309
+ border-style: solid;
310
+ border-color: transparent;
311
+ background-color: var(--#{globals.$prefix}-button-primary, #0f62fe);
312
+ color: var(--#{globals.$prefix}-text-on-color, #ffffff);
313
+ }
314
+ }
315
+ }
316
+ }
317
+ }
318
+
319
+ @supports (-moz-appearance:none) {
320
+ .#{globals.$prefix}--data-table td {
321
+ background-clip: padding-box;
322
+ }
323
+ }
@@ -0,0 +1,2 @@
1
+ @use 'buttons';
2
+ @use 'modal';
package/scss/index.scss CHANGED
@@ -1,10 +1,6 @@
1
1
  @use 'colors';
2
- @use 'tokens';
3
2
  @use 'components';
4
3
  @use 'graphs';
5
4
  @use 'type';
6
5
  @use 'chart-holder';
7
6
  @use 'chart-wrapper';
8
-
9
- @use '@carbon/styles/scss/theme';
10
- @include theme.add-component-tokens(tokens.$custom-charting-tokens);