@cumulus-ui/components 0.1.4 → 0.1.5
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/anchor-navigation/internal.d.ts +4 -2
- package/dist/anchor-navigation/internal.d.ts.map +1 -1
- package/dist/anchor-navigation/styles.d.ts.map +1 -1
- package/dist/badge/styles.d.ts.map +1 -1
- package/dist/box/internal.d.ts.map +1 -1
- package/dist/box/styles.d.ts.map +1 -1
- package/dist/checkbox/internal.d.ts.map +1 -1
- package/dist/checkbox/styles.d.ts.map +1 -1
- package/dist/file-dropzone/internal.d.ts.map +1 -1
- package/dist/file-dropzone/styles.d.ts.map +1 -1
- package/dist/grid/styles.d.ts.map +1 -1
- package/dist/icon/styles.d.ts.map +1 -1
- package/dist/index.js +549 -270
- package/dist/internal/styles/abstract-switch.d.ts.map +1 -1
- package/dist/internal/styles/autosuggest-input.d.ts.map +1 -1
- package/dist/internal/styles/button-trigger.d.ts.map +1 -1
- package/dist/internal/styles/cartesian-chart.d.ts.map +1 -1
- package/dist/internal/styles/chart-filter.d.ts.map +1 -1
- package/dist/internal/styles/chart-legend.d.ts.map +1 -1
- package/dist/internal/styles/chart-plot.d.ts.map +1 -1
- package/dist/internal/styles/chart-popover.d.ts.map +1 -1
- package/dist/internal/styles/chart-series-details.d.ts.map +1 -1
- package/dist/internal/styles/chart-series-marker.d.ts.map +1 -1
- package/dist/internal/styles/chart-status-container.d.ts.map +1 -1
- package/dist/internal/styles/chart-wrapper.d.ts.map +1 -1
- package/dist/internal/styles/checkbox-icon.d.ts.map +1 -1
- package/dist/internal/styles/drag-handle-wrapper.d.ts.map +1 -1
- package/dist/internal/styles/drag-handle.d.ts.map +1 -1
- package/dist/internal/styles/dropdown-footer.d.ts.map +1 -1
- package/dist/internal/styles/dropdown-status.d.ts.map +1 -1
- package/dist/internal/styles/dropdown.d.ts.map +1 -1
- package/dist/internal/styles/expand-toggle-button.d.ts.map +1 -1
- package/dist/internal/styles/menu-dropdown.d.ts.map +1 -1
- package/dist/internal/styles/option.d.ts.map +1 -1
- package/dist/internal/styles/options-list.d.ts.map +1 -1
- package/dist/internal/styles/panel-resize-handle.d.ts.map +1 -1
- package/dist/internal/styles/radio-button.d.ts.map +1 -1
- package/dist/internal/styles/screenreader-only.d.ts.map +1 -1
- package/dist/internal/styles/selectable-item.d.ts.map +1 -1
- package/dist/internal/styles/sortable-area.d.ts.map +1 -1
- package/dist/internal/styles/structured-item.d.ts.map +1 -1
- package/dist/internal/styles/tab-trap.d.ts.map +1 -1
- package/dist/internal/styles/token-list.d.ts.map +1 -1
- package/dist/internal/styles/tooltip.d.ts.map +1 -1
- package/dist/internal/styles/tree-view-tree-item.d.ts +2 -0
- package/dist/internal/styles/tree-view-tree-item.d.ts.map +1 -0
- package/dist/internal/styles/tree-view-vertical-connector.d.ts +2 -0
- package/dist/internal/styles/tree-view-vertical-connector.d.ts.map +1 -0
- package/dist/list/internal.d.ts.map +1 -1
- package/dist/list/styles.d.ts.map +1 -1
- package/dist/live-region/styles.d.ts.map +1 -1
- package/dist/radio-group/internal.d.ts.map +1 -1
- package/dist/radio-group/styles.d.ts.map +1 -1
- package/dist/space-between/internal.d.ts.map +1 -1
- package/dist/space-between/styles.d.ts.map +1 -1
- package/dist/spinner/styles.d.ts.map +1 -1
- package/dist/text-content/styles.d.ts.map +1 -1
- package/dist/tiles/internal.d.ts.map +1 -1
- package/dist/tiles/styles.d.ts.map +1 -1
- package/dist/tree-view/internal.d.ts.map +1 -1
- package/dist/tree-view/styles.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
// src/checkbox/internal.ts
|
|
13
|
-
import { css as
|
|
13
|
+
import { css as css5, html, svg } from "lit";
|
|
14
14
|
import { property as property2 } from "lit/decorators.js";
|
|
15
15
|
import { classMap } from "lit/directives/class-map.js";
|
|
16
16
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
@@ -203,80 +203,80 @@ var componentStyles = css2`
|
|
|
203
203
|
// src/internal/styles/abstract-switch.ts
|
|
204
204
|
import { css as css3 } from "lit";
|
|
205
205
|
var abstractSwitchStyles = css3`
|
|
206
|
-
.content,
|
|
207
|
-
.description,
|
|
208
|
-
.label {
|
|
206
|
+
.abstract-switch--content,
|
|
207
|
+
.abstract-switch--description,
|
|
208
|
+
.abstract-switch--label {
|
|
209
209
|
display: block;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
.label {
|
|
212
|
+
.abstract-switch--label {
|
|
213
213
|
color: var(--color-text-form-default-47mtz6, #0f141a);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
.outline {
|
|
216
|
+
.abstract-switch--outline {
|
|
217
217
|
display: none;
|
|
218
218
|
}
|
|
219
|
-
.outline.show-outline {
|
|
219
|
+
.abstract-switch--outline.abstract-switch--show-outline {
|
|
220
220
|
display: block;
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
:host-context([data-awsui-focus-visible=true]) .native-input:focus + .outline {
|
|
223
|
+
:host-context([data-awsui-focus-visible=true]) .abstract-switch--native-input:focus + .abstract-switch--outline {
|
|
224
224
|
display: block;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
.wrapper {
|
|
227
|
+
.abstract-switch--wrapper {
|
|
228
228
|
min-inline-size: 0;
|
|
229
229
|
word-break: break-word;
|
|
230
230
|
display: flex;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
.label-wrapper {
|
|
233
|
+
.abstract-switch--label-wrapper {
|
|
234
234
|
position: relative;
|
|
235
235
|
display: flex;
|
|
236
236
|
cursor: default;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
.content {
|
|
239
|
+
.abstract-switch--content {
|
|
240
240
|
min-inline-size: 0;
|
|
241
241
|
word-break: break-word;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
.empty-content {
|
|
244
|
+
.abstract-switch--empty-content {
|
|
245
245
|
inline-size: 0px;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
.description {
|
|
248
|
+
.abstract-switch--description {
|
|
249
249
|
color: var(--color-text-form-secondary-1nm780, #656871);
|
|
250
250
|
font-size: var(--font-size-body-s-smc8cv, 12px);
|
|
251
251
|
line-height: var(--line-height-body-s-nu5hx1, 16px);
|
|
252
252
|
letter-spacing: var(--letter-spacing-body-s-gq78ok, 0.005em);
|
|
253
253
|
}
|
|
254
|
-
.description-bottom-padding {
|
|
254
|
+
.abstract-switch--description-bottom-padding {
|
|
255
255
|
padding-block-end: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
.label,
|
|
259
|
-
.description {
|
|
258
|
+
.abstract-switch--label,
|
|
259
|
+
.abstract-switch--description {
|
|
260
260
|
padding-inline-start: var(--space-xs-ymlm0b, 8px);
|
|
261
261
|
}
|
|
262
|
-
.label-disabled,
|
|
263
|
-
.description-disabled {
|
|
262
|
+
.abstract-switch--label-disabled,
|
|
263
|
+
.abstract-switch--description-disabled {
|
|
264
264
|
color: var(--color-text-control-disabled-upk9lz, #b4b4bb);
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
.control {
|
|
267
|
+
.abstract-switch--control {
|
|
268
268
|
position: relative;
|
|
269
269
|
|
|
270
270
|
|
|
271
271
|
}
|
|
272
|
-
.control > input, .control > svg, .control > .outline {
|
|
272
|
+
.abstract-switch--control > input, .abstract-switch--control > svg, .abstract-switch--control > .abstract-switch--outline {
|
|
273
273
|
position: absolute;
|
|
274
274
|
inline-size: 100%;
|
|
275
275
|
block-size: 100%;
|
|
276
276
|
inset-block-start: 0;
|
|
277
277
|
inset-inline-start: 0;
|
|
278
278
|
}
|
|
279
|
-
.control > input {
|
|
279
|
+
.abstract-switch--control > input {
|
|
280
280
|
opacity: 0;
|
|
281
281
|
z-index: 1;
|
|
282
282
|
-webkit-user-select: none;
|
|
@@ -287,44 +287,56 @@ var abstractSwitchStyles = css3`
|
|
|
287
287
|
}
|
|
288
288
|
`;
|
|
289
289
|
|
|
290
|
-
// src/checkbox
|
|
291
|
-
|
|
292
|
-
var
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
.checkbox-icon > .styled-box
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}
|
|
311
|
-
.checkbox-icon > .styled-box-disabled,
|
|
312
|
-
.checkbox-icon > .styled-box-readonly {
|
|
313
|
-
fill: var(--color-background-control-disabled-1f3718, #dedee3);
|
|
314
|
-
stroke: var(--color-border-control-disabled-uj7t08, #dedee3);
|
|
315
|
-
}
|
|
316
|
-
.checkbox-icon > .styled-line {
|
|
317
|
-
stroke: var(--color-foreground-control-default-eto4wy, #ffffff);
|
|
318
|
-
stroke-width: 2;
|
|
319
|
-
fill: none;
|
|
320
|
-
}
|
|
321
|
-
.checkbox-icon > .styled-line-disabled {
|
|
322
|
-
stroke: var(--color-foreground-control-disabled-txi6cf, #ffffff);
|
|
323
|
-
}
|
|
324
|
-
.checkbox-icon > .styled-line-readonly {
|
|
325
|
-
stroke: var(--color-foreground-control-read-only-7ydvuj, #656871);
|
|
290
|
+
// src/internal/styles/checkbox-icon.ts
|
|
291
|
+
import { css as css4 } from "lit";
|
|
292
|
+
var checkboxIconStyles = css4`
|
|
293
|
+
.checkbox-icon--root {
|
|
294
|
+
position: absolute;
|
|
295
|
+
inline-size: 100%;
|
|
296
|
+
block-size: 100%;
|
|
297
|
+
inset-block-start: 0;
|
|
298
|
+
inset-inline-start: 0;
|
|
299
|
+
}
|
|
300
|
+
.checkbox-icon--root > .checkbox-icon--styled-box {
|
|
301
|
+
fill: var(--color-background-control-default-4jb21l, #ffffff);
|
|
302
|
+
stroke: var(--color-border-control-default-sh3548, #8c8c94);
|
|
303
|
+
stroke-width: var(--border-width-field-2xc78x, 1px);
|
|
304
|
+
transition: fill var(--motion-duration-transition-quick-mcm2y0, 90ms) var(--motion-easing-transition-quick-qxak3i, linear), stroke var(--motion-duration-transition-quick-mcm2y0, 90ms) var(--motion-easing-transition-quick-qxak3i, linear);
|
|
305
|
+
}
|
|
306
|
+
@media (prefers-reduced-motion: reduce) {
|
|
307
|
+
.checkbox-icon--root > .checkbox-icon--styled-box {
|
|
308
|
+
animation: none;
|
|
309
|
+
transition: none;
|
|
326
310
|
}
|
|
311
|
+
}
|
|
312
|
+
.awsui-motion-disabled .checkbox-icon--root > .checkbox-icon--styled-box, .awsui-mode-entering .checkbox-icon--root > .checkbox-icon--styled-box {
|
|
313
|
+
animation: none;
|
|
314
|
+
transition: none;
|
|
315
|
+
}
|
|
316
|
+
.checkbox-icon--root > .checkbox-icon--styled-box-checked, .checkbox-icon--root > .checkbox-icon--styled-box-indeterminate {
|
|
317
|
+
fill: var(--color-background-control-checked-ka7kc2, #006ce0);
|
|
318
|
+
stroke: var(--color-border-control-checked-bdv28l, #006ce0);
|
|
319
|
+
}
|
|
320
|
+
.checkbox-icon--root > .checkbox-icon--styled-box-disabled, .checkbox-icon--root > .checkbox-icon--styled-box-readonly {
|
|
321
|
+
fill: var(--color-background-control-disabled-1f3718, #dedee3);
|
|
322
|
+
stroke: var(--color-border-control-disabled-uj7t08, #dedee3);
|
|
323
|
+
}
|
|
324
|
+
.checkbox-icon--root > .checkbox-icon--styled-line {
|
|
325
|
+
stroke: var(--color-foreground-control-default-eto4wy, #ffffff);
|
|
326
|
+
stroke-width: 2;
|
|
327
|
+
fill: none;
|
|
328
|
+
}
|
|
329
|
+
.checkbox-icon--root > .checkbox-icon--styled-line-disabled {
|
|
330
|
+
stroke: var(--color-foreground-control-disabled-txi6cf, #ffffff);
|
|
331
|
+
}
|
|
332
|
+
.checkbox-icon--root > .checkbox-icon--styled-line-readonly {
|
|
333
|
+
stroke: var(--color-foreground-control-read-only-7ydvuj, #656871);
|
|
334
|
+
}
|
|
327
335
|
`;
|
|
336
|
+
|
|
337
|
+
// src/checkbox/internal.ts
|
|
338
|
+
var Base = FormAssociatedMixin(CsBaseElement);
|
|
339
|
+
var hostStyles = css5`:host { display: block; }`;
|
|
328
340
|
var CsCheckboxInternal = class extends Base {
|
|
329
341
|
constructor() {
|
|
330
342
|
super(...arguments);
|
|
@@ -342,7 +354,7 @@ var CsCheckboxInternal = class extends Base {
|
|
|
342
354
|
};
|
|
343
355
|
}
|
|
344
356
|
static {
|
|
345
|
-
this.styles = [sharedStyles, componentStyles, abstractSwitchStyles, hostStyles];
|
|
357
|
+
this.styles = [sharedStyles, componentStyles, abstractSwitchStyles, checkboxIconStyles, hostStyles];
|
|
346
358
|
}
|
|
347
359
|
connectedCallback() {
|
|
348
360
|
super.connectedCallback();
|
|
@@ -376,64 +388,60 @@ var CsCheckboxInternal = class extends Base {
|
|
|
376
388
|
}
|
|
377
389
|
render() {
|
|
378
390
|
const styledBoxClasses = {
|
|
379
|
-
"styled-box": true,
|
|
380
|
-
"styled-box-checked": this.checked && !this.indeterminate,
|
|
381
|
-
"styled-box-indeterminate": this.indeterminate,
|
|
382
|
-
"styled-box-disabled": this.disabled,
|
|
383
|
-
"styled-box-readonly": this.readOnly
|
|
391
|
+
"checkbox-icon--styled-box": true,
|
|
392
|
+
"checkbox-icon--styled-box-checked": this.checked && !this.indeterminate,
|
|
393
|
+
"checkbox-icon--styled-box-indeterminate": this.indeterminate,
|
|
394
|
+
"checkbox-icon--styled-box-disabled": this.disabled,
|
|
395
|
+
"checkbox-icon--styled-box-readonly": this.readOnly
|
|
384
396
|
};
|
|
385
397
|
const styledLineClasses = {
|
|
386
|
-
"styled-line": true,
|
|
387
|
-
"styled-line-disabled": this.disabled,
|
|
388
|
-
"styled-line-readonly": this.readOnly
|
|
398
|
+
"checkbox-icon--styled-line": true,
|
|
399
|
+
"checkbox-icon--styled-line-disabled": this.disabled,
|
|
400
|
+
"checkbox-icon--styled-line-readonly": this.readOnly
|
|
389
401
|
};
|
|
390
402
|
const hasDescription = this.description.length > 0;
|
|
391
403
|
const ariaDescribedBy = hasDescription ? this._descriptionId : void 0;
|
|
392
404
|
return html`
|
|
393
|
-
<
|
|
394
|
-
<span class="label-wrapper">
|
|
395
|
-
<span class
|
|
396
|
-
|
|
397
|
-
"checkbox-control": true,
|
|
398
|
-
"checkbox-control--checked": this.checked && !this.indeterminate,
|
|
399
|
-
"checkbox-control--indeterminate": this.indeterminate
|
|
400
|
-
})}>
|
|
401
|
-
<svg class="checkbox-icon" viewBox="0 0 16 16" aria-hidden="true"><rect class=${classMap(styledBoxClasses)} x="0.5" y="0.5" width="15" height="15" rx="3" ry="3" />${this.checked && !this.indeterminate ? svg`<polyline class=${classMap(styledLineClasses)} points="3.5,8 7,11 12,4" />` : this.indeterminate ? svg`<polyline class=${classMap(styledLineClasses)} points="3.5,8 12.5,8" />` : ""}</svg>
|
|
405
|
+
<span class="root abstract-switch--wrapper" @click=${this._preventNativeToggle}>
|
|
406
|
+
<span class="abstract-switch--label-wrapper">
|
|
407
|
+
<span class="abstract-switch--control checkbox-control">
|
|
408
|
+
<svg class="checkbox-icon--root" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><rect class=${classMap(styledBoxClasses)} x="0.5" y="0.5" width="15" height="15" rx="3" ry="3" />${this.checked && !this.indeterminate ? svg`<polyline class=${classMap(styledLineClasses)} points="3.5,8 7,11 12,4" />` : this.indeterminate ? svg`<polyline class=${classMap(styledLineClasses)} points="3.5,8 12.5,8" />` : ""}</svg>
|
|
402
409
|
<input
|
|
403
410
|
type="checkbox"
|
|
404
|
-
class="native-input"
|
|
411
|
+
class="abstract-switch--native-input"
|
|
405
412
|
.checked=${this.checked}
|
|
406
413
|
.indeterminate=${this.indeterminate}
|
|
407
414
|
?disabled=${this.disabled}
|
|
408
415
|
?readonly=${this.readOnly}
|
|
409
416
|
aria-label=${ifDefined(this.ariaLabel || void 0)}
|
|
417
|
+
aria-labelledby=${ifDefined(!this.ariaLabel ? this._labelId : void 0)}
|
|
410
418
|
aria-required=${ifDefined(this.ariaRequired || void 0)}
|
|
411
419
|
aria-controls=${ifDefined(this.ariaControls || void 0)}
|
|
412
420
|
aria-describedby=${ifDefined(ariaDescribedBy)}
|
|
413
421
|
aria-checked=${this.indeterminate ? "mixed" : this.checked}
|
|
414
422
|
@click=${this._preventNativeToggle}
|
|
415
423
|
/>
|
|
416
|
-
<span class="outline"></span>
|
|
424
|
+
<span class="abstract-switch--outline outline"></span>
|
|
417
425
|
</span>
|
|
418
|
-
<span class="content">
|
|
426
|
+
<span class="abstract-switch--content">
|
|
419
427
|
<span id=${this._labelId} class=${classMap({
|
|
420
|
-
"label": true,
|
|
421
|
-
"label-disabled": this.disabled
|
|
428
|
+
"abstract-switch--label": true,
|
|
429
|
+
"abstract-switch--label-disabled": this.disabled
|
|
422
430
|
})}>
|
|
423
431
|
<slot></slot>
|
|
424
432
|
</span>
|
|
425
433
|
${hasDescription ? html`
|
|
426
434
|
<span id=${this._descriptionId} class=${classMap({
|
|
427
|
-
"description": true,
|
|
428
|
-
"description-bottom-padding": true,
|
|
429
|
-
"description-disabled": this.disabled
|
|
435
|
+
"abstract-switch--description": true,
|
|
436
|
+
"abstract-switch--description-bottom-padding": true,
|
|
437
|
+
"abstract-switch--description-disabled": this.disabled
|
|
430
438
|
})}>
|
|
431
439
|
${this.description}
|
|
432
440
|
</span>
|
|
433
441
|
` : ""}
|
|
434
442
|
</span>
|
|
435
443
|
</span>
|
|
436
|
-
</
|
|
444
|
+
</span>
|
|
437
445
|
`;
|
|
438
446
|
}
|
|
439
447
|
};
|
|
@@ -465,13 +473,13 @@ var CsCheckbox = class extends CsCheckboxInternal {
|
|
|
465
473
|
customElements.define("cs-checkbox", CsCheckbox);
|
|
466
474
|
|
|
467
475
|
// src/spinner/internal.ts
|
|
468
|
-
import { css as
|
|
476
|
+
import { css as css7, html as html2 } from "lit";
|
|
469
477
|
import { property as property3 } from "lit/decorators.js";
|
|
470
478
|
import { classMap as classMap2 } from "lit/directives/class-map.js";
|
|
471
479
|
|
|
472
480
|
// src/spinner/styles.ts
|
|
473
|
-
import { css as
|
|
474
|
-
var componentStyles2 =
|
|
481
|
+
import { css as css6 } from "lit";
|
|
482
|
+
var componentStyles2 = css6`
|
|
475
483
|
@keyframes awsui_spinner-rotator_1612d_1krck_1 {
|
|
476
484
|
0% {
|
|
477
485
|
transform: rotate(var(--awsui-spinner-rotator-from-6b9ypa));
|
|
@@ -600,7 +608,7 @@ var componentStyles2 = css5`
|
|
|
600
608
|
`;
|
|
601
609
|
|
|
602
610
|
// src/spinner/internal.ts
|
|
603
|
-
var hostStyles2 =
|
|
611
|
+
var hostStyles2 = css7`
|
|
604
612
|
:host {
|
|
605
613
|
display: inline-block;
|
|
606
614
|
vertical-align: top;
|
|
@@ -640,13 +648,13 @@ var CsSpinner = class extends CsSpinnerInternal {
|
|
|
640
648
|
customElements.define("cs-spinner", CsSpinner);
|
|
641
649
|
|
|
642
650
|
// src/badge/internal.ts
|
|
643
|
-
import { css as
|
|
651
|
+
import { css as css9, html as html3 } from "lit";
|
|
644
652
|
import { property as property4 } from "lit/decorators.js";
|
|
645
653
|
import { classMap as classMap3 } from "lit/directives/class-map.js";
|
|
646
654
|
|
|
647
655
|
// src/badge/styles.ts
|
|
648
|
-
import { css as
|
|
649
|
-
var componentStyles3 =
|
|
656
|
+
import { css as css8 } from "lit";
|
|
657
|
+
var componentStyles3 = css8`
|
|
650
658
|
.badge {
|
|
651
659
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
652
660
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -706,7 +714,7 @@ var componentStyles3 = css7`
|
|
|
706
714
|
`;
|
|
707
715
|
|
|
708
716
|
// src/badge/internal.ts
|
|
709
|
-
var hostStyles3 =
|
|
717
|
+
var hostStyles3 = css9`
|
|
710
718
|
:host {
|
|
711
719
|
display: inline-block;
|
|
712
720
|
line-height: 0;
|
|
@@ -742,13 +750,13 @@ var CsBadge = class extends CsBadgeInternal {
|
|
|
742
750
|
customElements.define("cs-badge", CsBadge);
|
|
743
751
|
|
|
744
752
|
// src/live-region/internal.ts
|
|
745
|
-
import { css as
|
|
753
|
+
import { css as css11, html as html4 } from "lit";
|
|
746
754
|
import { property as property5 } from "lit/decorators.js";
|
|
747
755
|
import { classMap as classMap4 } from "lit/directives/class-map.js";
|
|
748
756
|
|
|
749
757
|
// src/live-region/styles.ts
|
|
750
|
-
import { css as
|
|
751
|
-
var componentStyles4 =
|
|
758
|
+
import { css as css10 } from "lit";
|
|
759
|
+
var componentStyles4 = css10`
|
|
752
760
|
.root {
|
|
753
761
|
display: contents;
|
|
754
762
|
}
|
|
@@ -765,7 +773,7 @@ var componentStyles4 = css9`
|
|
|
765
773
|
`;
|
|
766
774
|
|
|
767
775
|
// src/live-region/internal.ts
|
|
768
|
-
var hostStyles4 =
|
|
776
|
+
var hostStyles4 = css11`:host { display: contents; }`;
|
|
769
777
|
var CsLiveRegionInternal = class extends CsBaseElement {
|
|
770
778
|
constructor() {
|
|
771
779
|
super(...arguments);
|
|
@@ -812,15 +820,15 @@ var CsLiveRegion = class extends CsLiveRegionInternal {
|
|
|
812
820
|
customElements.define("cs-live-region", CsLiveRegion);
|
|
813
821
|
|
|
814
822
|
// src/icon/internal.ts
|
|
815
|
-
import { css as
|
|
823
|
+
import { css as css13, html as html6, svg as svgTag } from "lit";
|
|
816
824
|
import { property as property7 } from "lit/decorators.js";
|
|
817
825
|
import { classMap as classMap5 } from "lit/directives/class-map.js";
|
|
818
826
|
import { ifDefined as ifDefined2 } from "lit/directives/if-defined.js";
|
|
819
827
|
import { consume } from "@lit/context";
|
|
820
828
|
|
|
821
829
|
// src/icon/styles.ts
|
|
822
|
-
import { css as
|
|
823
|
-
var componentStyles5 =
|
|
830
|
+
import { css as css12 } from "lit";
|
|
831
|
+
var componentStyles5 = css12`
|
|
824
832
|
.icon {
|
|
825
833
|
position: relative;
|
|
826
834
|
display: inline-block;
|
|
@@ -1193,7 +1201,7 @@ __decorateClass([
|
|
|
1193
1201
|
], CsIconProviderInternal.prototype, "_resolver", 2);
|
|
1194
1202
|
|
|
1195
1203
|
// src/icon/internal.ts
|
|
1196
|
-
var hostStyles5 =
|
|
1204
|
+
var hostStyles5 = css13`:host { display: inline-block; vertical-align: top; line-height: 0; }`;
|
|
1197
1205
|
var CsIconInternal = class extends CsBaseElement {
|
|
1198
1206
|
constructor() {
|
|
1199
1207
|
super(...arguments);
|
|
@@ -1284,14 +1292,14 @@ var CsIconProvider = class extends CsIconProviderInternal {
|
|
|
1284
1292
|
customElements.define("cs-icon-provider", CsIconProvider);
|
|
1285
1293
|
|
|
1286
1294
|
// src/radio-group/internal.ts
|
|
1287
|
-
import { css as
|
|
1295
|
+
import { css as css16, html as html7 } from "lit";
|
|
1288
1296
|
import { property as property8 } from "lit/decorators.js";
|
|
1289
1297
|
import { classMap as classMap6 } from "lit/directives/class-map.js";
|
|
1290
1298
|
import { ifDefined as ifDefined3 } from "lit/directives/if-defined.js";
|
|
1291
1299
|
|
|
1292
1300
|
// src/radio-group/styles.ts
|
|
1293
|
-
import { css as
|
|
1294
|
-
var componentStyles6 =
|
|
1301
|
+
import { css as css14 } from "lit";
|
|
1302
|
+
var componentStyles6 = css14`
|
|
1295
1303
|
.radio-group {
|
|
1296
1304
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
1297
1305
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -1325,9 +1333,9 @@ var componentStyles6 = css13`
|
|
|
1325
1333
|
`;
|
|
1326
1334
|
|
|
1327
1335
|
// src/internal/styles/radio-button.ts
|
|
1328
|
-
import { css as
|
|
1329
|
-
var radioButtonStyles =
|
|
1330
|
-
.radio-control {
|
|
1336
|
+
import { css as css15 } from "lit";
|
|
1337
|
+
var radioButtonStyles = css15`
|
|
1338
|
+
.radio-button--radio-control {
|
|
1331
1339
|
margin-block-start: calc((var(--line-height-body-m-2mh3ke, 20px) - var(--size-control-adm93y, 16px)) / 2);
|
|
1332
1340
|
min-block-size: var(--size-control-adm93y, 16px);
|
|
1333
1341
|
min-inline-size: var(--size-control-adm93y, 16px);
|
|
@@ -1335,15 +1343,15 @@ var radioButtonStyles = css14`
|
|
|
1335
1343
|
inline-size: var(--size-control-adm93y, 16px);
|
|
1336
1344
|
}
|
|
1337
1345
|
|
|
1338
|
-
.outline {
|
|
1346
|
+
.radio-button--outline {
|
|
1339
1347
|
--awsui-style-focus-ring-box-shadow-6b9ypa: 0 0 0 var(--awsui-style-focus-ring-border-width-6b9ypa, 2px) var(--awsui-style-focus-ring-border-color-6b9ypa, var(--color-border-item-focused-uk47pl, #006ce0));
|
|
1340
1348
|
position: relative;
|
|
1341
1349
|
}
|
|
1342
|
-
.outline {
|
|
1350
|
+
.radio-button--outline {
|
|
1343
1351
|
outline: 2px dotted transparent;
|
|
1344
1352
|
outline-offset: calc(2px - 1px);
|
|
1345
1353
|
}
|
|
1346
|
-
.outline::before {
|
|
1354
|
+
.radio-button--outline::before {
|
|
1347
1355
|
content: " ";
|
|
1348
1356
|
display: block;
|
|
1349
1357
|
position: absolute;
|
|
@@ -1358,39 +1366,39 @@ var radioButtonStyles = css14`
|
|
|
1358
1366
|
box-shadow: var(--awsui-style-focus-ring-box-shadow-6b9ypa);
|
|
1359
1367
|
}
|
|
1360
1368
|
|
|
1361
|
-
.styled-circle-border {
|
|
1369
|
+
.radio-button--styled-circle-border {
|
|
1362
1370
|
stroke: var(--color-border-control-default-sh3548, #8c8c94);
|
|
1363
1371
|
fill: var(--color-background-control-default-4jb21l, #ffffff);
|
|
1364
1372
|
}
|
|
1365
|
-
.styled-circle-border.styled-circle-disabled, .styled-circle-border.styled-circle-readonly {
|
|
1373
|
+
.radio-button--styled-circle-border.radio-button--styled-circle-disabled, .radio-button--styled-circle-border.radio-button--styled-circle-readonly {
|
|
1366
1374
|
fill: var(--color-background-control-disabled-1f3718, #dedee3);
|
|
1367
1375
|
stroke: var(--color-background-control-disabled-1f3718, #dedee3);
|
|
1368
1376
|
}
|
|
1369
1377
|
|
|
1370
|
-
.styled-circle-fill {
|
|
1378
|
+
.radio-button--styled-circle-fill {
|
|
1371
1379
|
stroke: var(--color-background-control-checked-ka7kc2, #006ce0);
|
|
1372
1380
|
fill: var(--color-foreground-control-default-eto4wy, #ffffff);
|
|
1373
1381
|
opacity: 0;
|
|
1374
1382
|
transition: opacity var(--motion-duration-transition-quick-mcm2y0, 90ms) var(--motion-easing-transition-quick-qxak3i, linear);
|
|
1375
1383
|
}
|
|
1376
1384
|
@media (prefers-reduced-motion: reduce) {
|
|
1377
|
-
.styled-circle-fill {
|
|
1385
|
+
.radio-button--styled-circle-fill {
|
|
1378
1386
|
animation: none;
|
|
1379
1387
|
transition: none;
|
|
1380
1388
|
}
|
|
1381
1389
|
}
|
|
1382
|
-
.awsui-motion-disabled .styled-circle-fill, .awsui-mode-entering .styled-circle-fill {
|
|
1390
|
+
.awsui-motion-disabled .radio-button--styled-circle-fill, .awsui-mode-entering .radio-button--styled-circle-fill {
|
|
1383
1391
|
animation: none;
|
|
1384
1392
|
transition: none;
|
|
1385
1393
|
}
|
|
1386
|
-
.styled-circle-fill.styled-circle-checked {
|
|
1394
|
+
.radio-button--styled-circle-fill.radio-button--styled-circle-checked {
|
|
1387
1395
|
opacity: 1;
|
|
1388
1396
|
}
|
|
1389
|
-
.styled-circle-fill.styled-circle-disabled {
|
|
1397
|
+
.radio-button--styled-circle-fill.radio-button--styled-circle-disabled {
|
|
1390
1398
|
fill: var(--color-foreground-control-disabled-txi6cf, #ffffff);
|
|
1391
1399
|
stroke: var(--color-background-control-disabled-1f3718, #dedee3);
|
|
1392
1400
|
}
|
|
1393
|
-
.styled-circle-fill.styled-circle-readonly {
|
|
1401
|
+
.radio-button--styled-circle-fill.radio-button--styled-circle-readonly {
|
|
1394
1402
|
fill: var(--color-foreground-control-read-only-7ydvuj, #656871);
|
|
1395
1403
|
stroke: var(--color-background-control-disabled-1f3718, #dedee3);
|
|
1396
1404
|
}
|
|
@@ -1398,7 +1406,7 @@ var radioButtonStyles = css14`
|
|
|
1398
1406
|
|
|
1399
1407
|
// src/radio-group/internal.ts
|
|
1400
1408
|
var Base2 = FormAssociatedMixin(CsBaseElement);
|
|
1401
|
-
var hostStyles6 =
|
|
1409
|
+
var hostStyles6 = css16`:host { display: block; }`;
|
|
1402
1410
|
var CsRadioGroupInternal = class extends Base2 {
|
|
1403
1411
|
constructor() {
|
|
1404
1412
|
super(...arguments);
|
|
@@ -1473,7 +1481,7 @@ var CsRadioGroupInternal = class extends Base2 {
|
|
|
1473
1481
|
_getRadioInputs() {
|
|
1474
1482
|
const root = this.shadowRoot;
|
|
1475
1483
|
if (!root) return [];
|
|
1476
|
-
return Array.from(root.querySelectorAll(".native-input"));
|
|
1484
|
+
return Array.from(root.querySelectorAll(".abstract-switch--native-input"));
|
|
1477
1485
|
}
|
|
1478
1486
|
_getSelectedIndex() {
|
|
1479
1487
|
return this.items.findIndex((item) => item.value === this.value);
|
|
@@ -1511,6 +1519,7 @@ var CsRadioGroupInternal = class extends Base2 {
|
|
|
1511
1519
|
render() {
|
|
1512
1520
|
const groupName = this.name || this._groupName;
|
|
1513
1521
|
const groupClasses = {
|
|
1522
|
+
"root": true,
|
|
1514
1523
|
"radio-group": true,
|
|
1515
1524
|
"horizontal-group": this.direction === "horizontal"
|
|
1516
1525
|
};
|
|
@@ -1532,59 +1541,63 @@ var CsRadioGroupInternal = class extends Base2 {
|
|
|
1532
1541
|
const isChecked = item.value === this.value;
|
|
1533
1542
|
const isDisabled = this.disabled || !!item.disabled;
|
|
1534
1543
|
const itemId = item.controlId || generateUniqueId("radio-item");
|
|
1544
|
+
const labelId = `${itemId}-label`;
|
|
1535
1545
|
const descId = item.description ? `${itemId}-desc` : void 0;
|
|
1536
1546
|
const itemClasses = {
|
|
1547
|
+
"root": true,
|
|
1537
1548
|
"radio": true,
|
|
1538
|
-
"wrapper": true,
|
|
1549
|
+
"abstract-switch--wrapper": true,
|
|
1550
|
+
"selected": isChecked,
|
|
1539
1551
|
"radio--has-description": !!item.description,
|
|
1540
1552
|
"horizontal": this.direction === "horizontal"
|
|
1541
1553
|
};
|
|
1542
1554
|
const controlClasses = {
|
|
1543
|
-
"control": true,
|
|
1544
|
-
"radio-control": true
|
|
1555
|
+
"abstract-switch--control": true,
|
|
1556
|
+
"radio-button--radio-control": true
|
|
1545
1557
|
};
|
|
1546
1558
|
return html7`
|
|
1547
|
-
<
|
|
1559
|
+
<span
|
|
1548
1560
|
class=${classMap6(itemClasses)}
|
|
1549
1561
|
@click=${(e) => {
|
|
1550
1562
|
e.preventDefault();
|
|
1551
1563
|
this._onItemClick(item);
|
|
1552
1564
|
}}
|
|
1553
1565
|
>
|
|
1554
|
-
<span class="label-wrapper">
|
|
1566
|
+
<span class="abstract-switch--label-wrapper">
|
|
1555
1567
|
<span class=${classMap6(controlClasses)}>
|
|
1556
1568
|
<svg viewBox="0 0 100 100" aria-hidden="true">
|
|
1557
1569
|
<circle class=${classMap6({
|
|
1558
|
-
"styled-circle-border": true,
|
|
1559
|
-
"styled-circle-disabled": isDisabled,
|
|
1560
|
-
"styled-circle-readonly": this.readOnly
|
|
1570
|
+
"radio-button--styled-circle-border": true,
|
|
1571
|
+
"radio-button--styled-circle-disabled": isDisabled,
|
|
1572
|
+
"radio-button--styled-circle-readonly": this.readOnly
|
|
1561
1573
|
})} stroke-width="6.25" cx="50" cy="50" r="46" />
|
|
1562
1574
|
<circle class=${classMap6({
|
|
1563
|
-
"styled-circle-fill": true,
|
|
1564
|
-
"styled-circle-checked": isChecked,
|
|
1565
|
-
"styled-circle-disabled": isDisabled,
|
|
1566
|
-
"styled-circle-readonly": this.readOnly
|
|
1575
|
+
"radio-button--styled-circle-fill": true,
|
|
1576
|
+
"radio-button--styled-circle-checked": isChecked,
|
|
1577
|
+
"radio-button--styled-circle-disabled": isDisabled,
|
|
1578
|
+
"radio-button--styled-circle-readonly": this.readOnly
|
|
1567
1579
|
})} stroke-width="30" cx="50" cy="50" r="35" />
|
|
1568
1580
|
</svg>
|
|
1569
1581
|
<input
|
|
1570
1582
|
type="radio"
|
|
1571
|
-
class="native-input"
|
|
1583
|
+
class="abstract-switch--native-input"
|
|
1572
1584
|
name=${groupName}
|
|
1573
1585
|
.value=${item.value}
|
|
1574
1586
|
.checked=${isChecked}
|
|
1575
1587
|
?disabled=${isDisabled}
|
|
1576
1588
|
?readonly=${this.readOnly}
|
|
1577
1589
|
tabindex=${this._getTabIndex(index)}
|
|
1590
|
+
aria-labelledby=${labelId}
|
|
1578
1591
|
aria-describedby=${ifDefined3(descId)}
|
|
1579
1592
|
@click=${(e) => e.preventDefault()}
|
|
1580
1593
|
@focus=${() => this._onFocus(index)}
|
|
1581
1594
|
/>
|
|
1582
|
-
<span class="outline"></span>
|
|
1595
|
+
<span class="abstract-switch--outline radio-button--outline"></span>
|
|
1583
1596
|
</span>
|
|
1584
|
-
<span class="content">
|
|
1585
|
-
<span class=${classMap6({
|
|
1586
|
-
"label": true,
|
|
1587
|
-
"label-disabled": isDisabled
|
|
1597
|
+
<span class="abstract-switch--content">
|
|
1598
|
+
<span id=${labelId} class=${classMap6({
|
|
1599
|
+
"abstract-switch--label": true,
|
|
1600
|
+
"abstract-switch--label-disabled": isDisabled
|
|
1588
1601
|
})}>
|
|
1589
1602
|
${item.label}
|
|
1590
1603
|
</span>
|
|
@@ -1592,8 +1605,8 @@ var CsRadioGroupInternal = class extends Base2 {
|
|
|
1592
1605
|
<span
|
|
1593
1606
|
id=${descId}
|
|
1594
1607
|
class=${classMap6({
|
|
1595
|
-
"description": true,
|
|
1596
|
-
"description-disabled": isDisabled
|
|
1608
|
+
"abstract-switch--description": true,
|
|
1609
|
+
"abstract-switch--description-disabled": isDisabled
|
|
1597
1610
|
})}
|
|
1598
1611
|
>
|
|
1599
1612
|
${item.description}
|
|
@@ -1601,7 +1614,7 @@ var CsRadioGroupInternal = class extends Base2 {
|
|
|
1601
1614
|
` : ""}
|
|
1602
1615
|
</span>
|
|
1603
1616
|
</span>
|
|
1604
|
-
</
|
|
1617
|
+
</span>
|
|
1605
1618
|
`;
|
|
1606
1619
|
}
|
|
1607
1620
|
};
|
|
@@ -1633,14 +1646,14 @@ var CsRadioGroup = class extends CsRadioGroupInternal {
|
|
|
1633
1646
|
customElements.define("cs-radio-group", CsRadioGroup);
|
|
1634
1647
|
|
|
1635
1648
|
// src/tiles/internal.ts
|
|
1636
|
-
import { css as
|
|
1649
|
+
import { css as css18, html as html8 } from "lit";
|
|
1637
1650
|
import { property as property9 } from "lit/decorators.js";
|
|
1638
1651
|
import { classMap as classMap7 } from "lit/directives/class-map.js";
|
|
1639
1652
|
import { ifDefined as ifDefined4 } from "lit/directives/if-defined.js";
|
|
1640
1653
|
|
|
1641
1654
|
// src/tiles/styles.ts
|
|
1642
|
-
import { css as
|
|
1643
|
-
var componentStyles7 =
|
|
1655
|
+
import { css as css17 } from "lit";
|
|
1656
|
+
var componentStyles7 = css17`
|
|
1644
1657
|
div.column-layout {
|
|
1645
1658
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
1646
1659
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -1938,7 +1951,7 @@ div.column-layout > .grid.grid-horizontal-borders.grid-columns-4.grid-breakpoint
|
|
|
1938
1951
|
|
|
1939
1952
|
// src/tiles/internal.ts
|
|
1940
1953
|
var Base3 = FormAssociatedMixin(CsBaseElement);
|
|
1941
|
-
var hostStyles7 =
|
|
1954
|
+
var hostStyles7 = css18`:host { display: block; }`;
|
|
1942
1955
|
var CsTilesInternal = class extends Base3 {
|
|
1943
1956
|
constructor() {
|
|
1944
1957
|
super(...arguments);
|
|
@@ -2013,7 +2026,7 @@ var CsTilesInternal = class extends Base3 {
|
|
|
2013
2026
|
_getRadioInputs() {
|
|
2014
2027
|
const root = this.shadowRoot;
|
|
2015
2028
|
if (!root) return [];
|
|
2016
|
-
return Array.from(root.querySelectorAll(".native-input"));
|
|
2029
|
+
return Array.from(root.querySelectorAll(".abstract-switch--native-input"));
|
|
2017
2030
|
}
|
|
2018
2031
|
_getSelectedIndex() {
|
|
2019
2032
|
return this.items.findIndex((item) => item.value === this.value);
|
|
@@ -2079,7 +2092,7 @@ var CsTilesInternal = class extends Base3 {
|
|
|
2079
2092
|
const tileClasses = {
|
|
2080
2093
|
"tile-container": true,
|
|
2081
2094
|
"refresh": true,
|
|
2082
|
-
"breakpoint-
|
|
2095
|
+
"breakpoint-xs": true,
|
|
2083
2096
|
"selected": isSelected,
|
|
2084
2097
|
"disabled": isDisabled,
|
|
2085
2098
|
"readonly": this.readOnly,
|
|
@@ -2098,25 +2111,30 @@ var CsTilesInternal = class extends Base3 {
|
|
|
2098
2111
|
}}
|
|
2099
2112
|
>
|
|
2100
2113
|
<div class=${classMap7(controlClasses)}>
|
|
2101
|
-
<span class
|
|
2102
|
-
|
|
2103
|
-
|
|
2114
|
+
<span class=${classMap7({
|
|
2115
|
+
"root": true,
|
|
2116
|
+
"radio-button": true,
|
|
2117
|
+
"abstract-switch--wrapper": true,
|
|
2118
|
+
"selected": isSelected
|
|
2119
|
+
})}>
|
|
2120
|
+
<span class="abstract-switch--label-wrapper">
|
|
2121
|
+
<span class="abstract-switch--control radio-button--radio-control">
|
|
2104
2122
|
<svg viewBox="0 0 100 100" aria-hidden="true">
|
|
2105
2123
|
<circle class=${classMap7({
|
|
2106
|
-
"styled-circle-border": true,
|
|
2107
|
-
"styled-circle-disabled": isDisabled,
|
|
2108
|
-
"styled-circle-readonly": this.readOnly
|
|
2124
|
+
"radio-button--styled-circle-border": true,
|
|
2125
|
+
"radio-button--styled-circle-disabled": isDisabled,
|
|
2126
|
+
"radio-button--styled-circle-readonly": this.readOnly
|
|
2109
2127
|
})} stroke-width="6.25" cx="50" cy="50" r="46" />
|
|
2110
2128
|
<circle class=${classMap7({
|
|
2111
|
-
"styled-circle-fill": true,
|
|
2112
|
-
"styled-circle-checked": isSelected,
|
|
2113
|
-
"styled-circle-disabled": isDisabled,
|
|
2114
|
-
"styled-circle-readonly": this.readOnly
|
|
2129
|
+
"radio-button--styled-circle-fill": true,
|
|
2130
|
+
"radio-button--styled-circle-checked": isSelected,
|
|
2131
|
+
"radio-button--styled-circle-disabled": isDisabled,
|
|
2132
|
+
"radio-button--styled-circle-readonly": this.readOnly
|
|
2115
2133
|
})} stroke-width="30" cx="50" cy="50" r="35" />
|
|
2116
2134
|
</svg>
|
|
2117
2135
|
<input
|
|
2118
2136
|
type="radio"
|
|
2119
|
-
class="native-input"
|
|
2137
|
+
class="abstract-switch--native-input"
|
|
2120
2138
|
name=${groupName}
|
|
2121
2139
|
.value=${item.value}
|
|
2122
2140
|
.checked=${isSelected}
|
|
@@ -2128,14 +2146,14 @@ var CsTilesInternal = class extends Base3 {
|
|
|
2128
2146
|
@click=${(e) => e.preventDefault()}
|
|
2129
2147
|
@focus=${() => this._onFocus(index)}
|
|
2130
2148
|
/>
|
|
2131
|
-
<span class="outline"></span>
|
|
2149
|
+
<span class="abstract-switch--outline radio-button--outline"></span>
|
|
2132
2150
|
</span>
|
|
2133
|
-
<span class="content">
|
|
2151
|
+
<span class="abstract-switch--content">
|
|
2134
2152
|
<span
|
|
2135
2153
|
id=${labelId}
|
|
2136
2154
|
class=${classMap7({
|
|
2137
|
-
"label": true,
|
|
2138
|
-
"label-disabled": isDisabled
|
|
2155
|
+
"abstract-switch--label": true,
|
|
2156
|
+
"abstract-switch--label-disabled": isDisabled
|
|
2139
2157
|
})}
|
|
2140
2158
|
>
|
|
2141
2159
|
${item.label}
|
|
@@ -2144,8 +2162,8 @@ var CsTilesInternal = class extends Base3 {
|
|
|
2144
2162
|
<span
|
|
2145
2163
|
id=${descId}
|
|
2146
2164
|
class=${classMap7({
|
|
2147
|
-
"description": true,
|
|
2148
|
-
"description-disabled": isDisabled
|
|
2165
|
+
"abstract-switch--description": true,
|
|
2166
|
+
"abstract-switch--description-disabled": isDisabled
|
|
2149
2167
|
})}
|
|
2150
2168
|
>
|
|
2151
2169
|
${item.description}
|
|
@@ -2195,15 +2213,15 @@ var CsTiles = class extends CsTilesInternal {
|
|
|
2195
2213
|
customElements.define("cs-tiles", CsTiles);
|
|
2196
2214
|
|
|
2197
2215
|
// src/list/internal.ts
|
|
2198
|
-
import { css as
|
|
2216
|
+
import { css as css21, html as html9, nothing } from "lit";
|
|
2199
2217
|
import { property as property10 } from "lit/decorators.js";
|
|
2200
2218
|
import { classMap as classMap8 } from "lit/directives/class-map.js";
|
|
2201
2219
|
import { ifDefined as ifDefined5 } from "lit/directives/if-defined.js";
|
|
2202
2220
|
import { repeat } from "lit/directives/repeat.js";
|
|
2203
2221
|
|
|
2204
2222
|
// src/list/styles.ts
|
|
2205
|
-
import { css as
|
|
2206
|
-
var componentStyles8 =
|
|
2223
|
+
import { css as css19 } from "lit";
|
|
2224
|
+
var componentStyles8 = css19`
|
|
2207
2225
|
.root {
|
|
2208
2226
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
2209
2227
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -2243,9 +2261,9 @@ var componentStyles8 = css18`
|
|
|
2243
2261
|
`;
|
|
2244
2262
|
|
|
2245
2263
|
// src/internal/styles/structured-item.ts
|
|
2246
|
-
import { css as
|
|
2247
|
-
var structuredItemStyles =
|
|
2248
|
-
.root {
|
|
2264
|
+
import { css as css20 } from "lit";
|
|
2265
|
+
var structuredItemStyles = css20`
|
|
2266
|
+
.structured-item--root {
|
|
2249
2267
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
2250
2268
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
2251
2269
|
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
@@ -2261,44 +2279,44 @@ var structuredItemStyles = css19`
|
|
|
2261
2279
|
align-items: baseline;
|
|
2262
2280
|
column-gap: var(--space-xs-ymlm0b, 8px);
|
|
2263
2281
|
}
|
|
2264
|
-
.root.disable-paddings {
|
|
2282
|
+
.structured-item--root.structured-item--disable-paddings {
|
|
2265
2283
|
column-gap: 0;
|
|
2266
2284
|
}
|
|
2267
2285
|
|
|
2268
|
-
.main {
|
|
2286
|
+
.structured-item--main {
|
|
2269
2287
|
flex-grow: 1;
|
|
2270
2288
|
display: flex;
|
|
2271
2289
|
flex-direction: column;
|
|
2272
2290
|
min-inline-size: 0;
|
|
2273
2291
|
}
|
|
2274
2292
|
|
|
2275
|
-
.content-wrap {
|
|
2293
|
+
.structured-item--content-wrap {
|
|
2276
2294
|
flex-grow: 1;
|
|
2277
2295
|
display: flex;
|
|
2278
2296
|
align-items: baseline;
|
|
2279
2297
|
flex-direction: row;
|
|
2280
2298
|
column-gap: var(--space-xs-ymlm0b, 8px);
|
|
2281
2299
|
}
|
|
2282
|
-
.disable-paddings > .main > .content-wrap {
|
|
2300
|
+
.structured-item--disable-paddings > .structured-item--main > .structured-item--content-wrap {
|
|
2283
2301
|
column-gap: 0;
|
|
2284
2302
|
}
|
|
2285
|
-
.content-wrap.wrap-actions {
|
|
2303
|
+
.structured-item--content-wrap.structured-item--wrap-actions {
|
|
2286
2304
|
flex-wrap: wrap;
|
|
2287
2305
|
}
|
|
2288
2306
|
|
|
2289
|
-
.content {
|
|
2307
|
+
.structured-item--content {
|
|
2290
2308
|
flex-grow: 1;
|
|
2291
2309
|
min-inline-size: 0;
|
|
2292
2310
|
}
|
|
2293
2311
|
|
|
2294
|
-
.actions {
|
|
2312
|
+
.structured-item--actions {
|
|
2295
2313
|
flex-shrink: 0;
|
|
2296
2314
|
margin-inline-start: auto;
|
|
2297
2315
|
}
|
|
2298
2316
|
`;
|
|
2299
2317
|
|
|
2300
2318
|
// src/list/internal.ts
|
|
2301
|
-
var hostStyles8 =
|
|
2319
|
+
var hostStyles8 = css21`:host { display: block; }`;
|
|
2302
2320
|
var CsListInternal = class extends CsBaseElement {
|
|
2303
2321
|
constructor() {
|
|
2304
2322
|
super(...arguments);
|
|
@@ -2320,14 +2338,25 @@ var CsListInternal = class extends CsBaseElement {
|
|
|
2320
2338
|
"disable-item-paddings": this.disableItemPaddings,
|
|
2321
2339
|
"disable-paddings": this.disablePaddings
|
|
2322
2340
|
};
|
|
2341
|
+
const structuredRootClasses = {
|
|
2342
|
+
"structured-item--root": true,
|
|
2343
|
+
"structured-item--disable-paddings": this.disableItemPaddings
|
|
2344
|
+
};
|
|
2345
|
+
const hasActions = !!rendered.actions;
|
|
2323
2346
|
return html9`
|
|
2324
2347
|
<li class=${classMap8(itemClasses)} data-item-id=${rendered.id}>
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
<
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2348
|
+
<div class=${classMap8(structuredRootClasses)}>
|
|
2349
|
+
${rendered.icon ? html9`<div class="structured-item--icon">${rendered.icon}</div>` : nothing}
|
|
2350
|
+
<div class="structured-item--main">
|
|
2351
|
+
<div class="structured-item--content-wrap structured-item--wrap-actions">
|
|
2352
|
+
<div class="structured-item--content">
|
|
2353
|
+
${rendered.content}
|
|
2354
|
+
</div>
|
|
2355
|
+
${hasActions ? html9`<div class="structured-item--actions">${rendered.actions}</div>` : nothing}
|
|
2356
|
+
</div>
|
|
2357
|
+
${rendered.secondaryContent ? html9`<div class="structured-item--secondary">${rendered.secondaryContent}</div>` : nothing}
|
|
2358
|
+
</div>
|
|
2359
|
+
</div>
|
|
2331
2360
|
</li>
|
|
2332
2361
|
`;
|
|
2333
2362
|
}
|
|
@@ -2406,14 +2435,14 @@ var CsList = class extends CsListInternal {
|
|
|
2406
2435
|
customElements.define("cs-list", CsList);
|
|
2407
2436
|
|
|
2408
2437
|
// src/tree-view/internal.ts
|
|
2409
|
-
import { css as
|
|
2438
|
+
import { css as css26, html as html10, nothing as nothing2 } from "lit";
|
|
2410
2439
|
import { property as property11 } from "lit/decorators.js";
|
|
2411
2440
|
import { classMap as classMap9 } from "lit/directives/class-map.js";
|
|
2412
2441
|
import { ifDefined as ifDefined6 } from "lit/directives/if-defined.js";
|
|
2413
2442
|
|
|
2414
2443
|
// src/tree-view/styles.ts
|
|
2415
|
-
import { css as
|
|
2416
|
-
var componentStyles9 =
|
|
2444
|
+
import { css as css22 } from "lit";
|
|
2445
|
+
var componentStyles9 = css22`
|
|
2417
2446
|
.root {
|
|
2418
2447
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
2419
2448
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -2438,8 +2467,188 @@ var componentStyles9 = css21`
|
|
|
2438
2467
|
}
|
|
2439
2468
|
`;
|
|
2440
2469
|
|
|
2470
|
+
// src/internal/styles/tree-view-tree-item.ts
|
|
2471
|
+
import { css as css23 } from "lit";
|
|
2472
|
+
var treeViewTreeItemStyles = css23`
|
|
2473
|
+
.tree-view-tree-item--treeitem-group {
|
|
2474
|
+
list-style: none;
|
|
2475
|
+
margin-block: 0;
|
|
2476
|
+
margin-inline: 0;
|
|
2477
|
+
padding-block: 0;
|
|
2478
|
+
padding-inline: 0;
|
|
2479
|
+
position: relative;
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
.tree-view-tree-item--treeitem {
|
|
2483
|
+
list-style: none;
|
|
2484
|
+
margin-block: 0;
|
|
2485
|
+
margin-inline: 0;
|
|
2486
|
+
padding-block: 0;
|
|
2487
|
+
padding-inline: 0;
|
|
2488
|
+
position: relative;
|
|
2489
|
+
}
|
|
2490
|
+
.tree-view-tree-item--treeitem.tree-view-tree-item--offset {
|
|
2491
|
+
margin-inline-start: var(--space-tree-view-indentation-xh9kis, 24px);
|
|
2492
|
+
}
|
|
2493
|
+
.tree-view-tree-item--treeitem > .tree-view-tree-item--treeitem-content-wrapper {
|
|
2494
|
+
display: grid;
|
|
2495
|
+
grid-template-columns: 28px 1fr;
|
|
2496
|
+
align-items: baseline;
|
|
2497
|
+
}
|
|
2498
|
+
:host-context([data-awsui-focus-visible=true]) .tree-view-tree-item--treeitem > .tree-view-tree-item--treeitem-content-wrapper:has(.tree-view-tree-item--tree-item-focus-target:focus) {
|
|
2499
|
+
position: relative;
|
|
2500
|
+
}
|
|
2501
|
+
:host-context([data-awsui-focus-visible=true]) .tree-view-tree-item--treeitem > .tree-view-tree-item--treeitem-content-wrapper:has(.tree-view-tree-item--tree-item-focus-target:focus) {
|
|
2502
|
+
outline: 2px dotted transparent;
|
|
2503
|
+
outline-offset: calc(0px - 1px);
|
|
2504
|
+
}
|
|
2505
|
+
:host-context([data-awsui-focus-visible=true]) .tree-view-tree-item--treeitem > .tree-view-tree-item--treeitem-content-wrapper:has(.tree-view-tree-item--tree-item-focus-target:focus)::before {
|
|
2506
|
+
content: " ";
|
|
2507
|
+
display: block;
|
|
2508
|
+
position: absolute;
|
|
2509
|
+
inset-inline-start: calc(-1 * 0px);
|
|
2510
|
+
inset-block-start: calc(-1 * 0px);
|
|
2511
|
+
inline-size: calc(100% + 0px + 0px);
|
|
2512
|
+
block-size: calc(100% + 0px + 0px);
|
|
2513
|
+
border-start-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
2514
|
+
border-start-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
2515
|
+
border-end-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
2516
|
+
border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
2517
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-uk47pl, #006ce0);
|
|
2518
|
+
}
|
|
2519
|
+
.tree-view-tree-item--treeitem > .tree-view-tree-item--treeitem-content-wrapper > .tree-view-tree-item--expand-toggle-wrapper {
|
|
2520
|
+
display: grid;
|
|
2521
|
+
grid-column: 1;
|
|
2522
|
+
grid-row: 1;
|
|
2523
|
+
}
|
|
2524
|
+
.tree-view-tree-item--treeitem > .tree-view-tree-item--treeitem-content-wrapper > .tree-view-tree-item--expand-toggle-wrapper > .tree-view-tree-item--toggle {
|
|
2525
|
+
justify-self: center;
|
|
2526
|
+
position: relative;
|
|
2527
|
+
inset-block-start: 2px;
|
|
2528
|
+
inset-inline-start: -2px;
|
|
2529
|
+
}
|
|
2530
|
+
.tree-view-tree-item--treeitem > .tree-view-tree-item--treeitem-content-wrapper > .tree-view-tree-item--structured-item-wrapper {
|
|
2531
|
+
grid-column: 2;
|
|
2532
|
+
grid-row: 1/span 2;
|
|
2533
|
+
padding-block: var(--space-scaled-xxxs-oo06c7, 2px);
|
|
2534
|
+
position: relative;
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
.tree-view-tree-item--tree-item-structured-item {
|
|
2538
|
+
/* used in keyboard navigation */
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2541
|
+
.tree-view-tree-item--tree-item-focus-target {
|
|
2542
|
+
outline: none;
|
|
2543
|
+
}
|
|
2544
|
+
`;
|
|
2545
|
+
|
|
2546
|
+
// src/internal/styles/expand-toggle-button.ts
|
|
2547
|
+
import { css as css24 } from "lit";
|
|
2548
|
+
var expandToggleButtonStyles = css24`
|
|
2549
|
+
.expand-toggle-button--expand-toggle-button--expand-toggle-icon {
|
|
2550
|
+
transition: transform var(--motion-duration-rotate-90-lyzb0k, 135ms) var(--motion-easing-rotate-90-jhbqg9, cubic-bezier(0.165, 0.84, 0.44, 1));
|
|
2551
|
+
}
|
|
2552
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2553
|
+
.expand-toggle-button--expand-toggle-button--expand-toggle-icon {
|
|
2554
|
+
animation: none;
|
|
2555
|
+
transition: none;
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
.awsui-motion-disabled .expand-toggle-button--expand-toggle-button--expand-toggle-icon, .awsui-mode-entering .expand-toggle-button--expand-toggle-button--expand-toggle-icon {
|
|
2559
|
+
animation: none;
|
|
2560
|
+
transition: none;
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
.expand-toggle-button--expand-toggle-button--expand-toggle-icon {
|
|
2564
|
+
transform: rotate(-90deg);
|
|
2565
|
+
|
|
2566
|
+
}
|
|
2567
|
+
.expand-toggle-button--expand-toggle-button--expand-toggle-icon:dir(rtl) {
|
|
2568
|
+
transform: rotate(90deg);
|
|
2569
|
+
}
|
|
2570
|
+
.expand-toggle-button--expand-toggle-button--expand-toggle-icon-expanded {
|
|
2571
|
+
transform: rotate(0deg);
|
|
2572
|
+
|
|
2573
|
+
}
|
|
2574
|
+
.expand-toggle-button--expand-toggle-button--expand-toggle-icon-expanded:dir(rtl) {
|
|
2575
|
+
transform: rotate(0deg);
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
.expand-toggle-button--expand-toggle {
|
|
2579
|
+
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
2580
|
+
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
2581
|
+
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
2582
|
+
font-weight: 400;
|
|
2583
|
+
font-family: var(--font-family-base-gmnpzl, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
2584
|
+
-webkit-font-smoothing: auto;
|
|
2585
|
+
-moz-osx-font-smoothing: auto;
|
|
2586
|
+
cursor: pointer;
|
|
2587
|
+
inline-size: var(--space-m-dsumyt, 16px);
|
|
2588
|
+
block-size: var(--space-m-dsumyt, 16px);
|
|
2589
|
+
border-block: 0;
|
|
2590
|
+
border-inline: 0;
|
|
2591
|
+
margin-block: 0;
|
|
2592
|
+
margin-inline: 0;
|
|
2593
|
+
padding-block: 0;
|
|
2594
|
+
padding-inline: 0;
|
|
2595
|
+
background: none;
|
|
2596
|
+
outline: 0;
|
|
2597
|
+
color: var(--color-text-interactive-default-ugh9wp, #424650);
|
|
2598
|
+
}
|
|
2599
|
+
:host-context([data-awsui-focus-visible=true]) .expand-toggle-button--expand-toggle:not(.expand-toggle-button--expand-toggle-button--disable-focus-highlight):focus {
|
|
2600
|
+
position: relative;
|
|
2601
|
+
}
|
|
2602
|
+
:host-context([data-awsui-focus-visible=true]) .expand-toggle-button--expand-toggle:not(.expand-toggle-button--expand-toggle-button--disable-focus-highlight):focus {
|
|
2603
|
+
outline: 2px dotted transparent;
|
|
2604
|
+
outline-offset: calc(var(--space-button-focus-outline-gutter-jj138g, 4px) - 1px);
|
|
2605
|
+
}
|
|
2606
|
+
:host-context([data-awsui-focus-visible=true]) .expand-toggle-button--expand-toggle:not(.expand-toggle-button--expand-toggle-button--disable-focus-highlight):focus::before {
|
|
2607
|
+
content: " ";
|
|
2608
|
+
display: block;
|
|
2609
|
+
position: absolute;
|
|
2610
|
+
inset-inline-start: calc(-1 * var(--space-button-focus-outline-gutter-jj138g, 4px));
|
|
2611
|
+
inset-block-start: calc(-1 * var(--space-button-focus-outline-gutter-jj138g, 4px));
|
|
2612
|
+
inline-size: calc(100% + var(--space-button-focus-outline-gutter-jj138g, 4px) + var(--space-button-focus-outline-gutter-jj138g, 4px));
|
|
2613
|
+
block-size: calc(100% + var(--space-button-focus-outline-gutter-jj138g, 4px) + var(--space-button-focus-outline-gutter-jj138g, 4px));
|
|
2614
|
+
border-start-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
2615
|
+
border-start-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
2616
|
+
border-end-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
2617
|
+
border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
2618
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-uk47pl, #006ce0);
|
|
2619
|
+
}
|
|
2620
|
+
.expand-toggle-button--expand-toggle:hover {
|
|
2621
|
+
color: var(--color-text-interactive-hover-6naf7i, #0f141a);
|
|
2622
|
+
}
|
|
2623
|
+
.expand-toggle-button--expand-toggle:active {
|
|
2624
|
+
color: var(--color-text-interactive-active-uoe6zi, #0f141a);
|
|
2625
|
+
}
|
|
2626
|
+
`;
|
|
2627
|
+
|
|
2628
|
+
// src/internal/styles/tree-view-vertical-connector.ts
|
|
2629
|
+
import { css as css25 } from "lit";
|
|
2630
|
+
var treeViewVerticalConnectorStyles = css25`
|
|
2631
|
+
.tree-view-vertical-connector--vertical-connector {
|
|
2632
|
+
background-color: var(--color-tree-view-connector-line-1usxvn, #8c8c94);
|
|
2633
|
+
inline-size: var(--border-divider-list-width-tdfx1x, 1px);
|
|
2634
|
+
}
|
|
2635
|
+
.tree-view-vertical-connector--vertical-connector.tree-view-vertical-connector--grid {
|
|
2636
|
+
grid-row: 2/span 3;
|
|
2637
|
+
grid-column: 1;
|
|
2638
|
+
block-size: 100%;
|
|
2639
|
+
position: relative;
|
|
2640
|
+
inset-inline-start: calc((28px - var(--border-divider-list-width-tdfx1x, 1px)) / 2 - 2px);
|
|
2641
|
+
}
|
|
2642
|
+
.tree-view-vertical-connector--vertical-connector.tree-view-vertical-connector--absolute {
|
|
2643
|
+
position: absolute;
|
|
2644
|
+
inset: 0;
|
|
2645
|
+
inset-block-end: var(--space-scaled-xs-xwoogq, 8px);
|
|
2646
|
+
inset-inline-start: calc((28px - var(--border-divider-list-width-tdfx1x, 1px)) / 2 - 2px);
|
|
2647
|
+
}
|
|
2648
|
+
`;
|
|
2649
|
+
|
|
2441
2650
|
// src/tree-view/internal.ts
|
|
2442
|
-
var hostStyles9 =
|
|
2651
|
+
var hostStyles9 = css26`:host { display: block; }`;
|
|
2443
2652
|
var CsTreeViewInternal = class extends CsBaseElement {
|
|
2444
2653
|
constructor() {
|
|
2445
2654
|
super(...arguments);
|
|
@@ -2450,7 +2659,7 @@ var CsTreeViewInternal = class extends CsBaseElement {
|
|
|
2450
2659
|
this._expandedSet = /* @__PURE__ */ new Set();
|
|
2451
2660
|
}
|
|
2452
2661
|
static {
|
|
2453
|
-
this.styles = [sharedStyles, componentStyles9, hostStyles9];
|
|
2662
|
+
this.styles = [sharedStyles, componentStyles9, treeViewTreeItemStyles, expandToggleButtonStyles, treeViewVerticalConnectorStyles, structuredItemStyles, hostStyles9];
|
|
2454
2663
|
}
|
|
2455
2664
|
willUpdate(changed) {
|
|
2456
2665
|
if (changed.has("expandedItems")) {
|
|
@@ -2468,55 +2677,77 @@ var CsTreeViewInternal = class extends CsBaseElement {
|
|
|
2468
2677
|
if (this.renderItemToggleIcon) {
|
|
2469
2678
|
return html10`${this.renderItemToggleIcon({ expanded })}`;
|
|
2470
2679
|
}
|
|
2471
|
-
const iconClasses = {
|
|
2472
|
-
"toggle-icon": true,
|
|
2473
|
-
"toggle-icon--expanded": expanded
|
|
2474
|
-
};
|
|
2475
2680
|
return html10`
|
|
2476
|
-
<
|
|
2477
|
-
|
|
2478
|
-
|
|
2681
|
+
<span class=${classMap9({
|
|
2682
|
+
"expand-toggle-icon": true,
|
|
2683
|
+
"expand-toggle-icon-expanded": expanded,
|
|
2684
|
+
"icon": true,
|
|
2685
|
+
"size-small": true,
|
|
2686
|
+
"size-small-mapped-height": true,
|
|
2687
|
+
"variant-normal": true
|
|
2688
|
+
})}>
|
|
2689
|
+
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true">
|
|
2690
|
+
<path class="filled stroke-linejoin-round" d="m8 11 4-6H4l4 6Z"></path>
|
|
2691
|
+
</svg>
|
|
2692
|
+
</span>
|
|
2479
2693
|
`;
|
|
2480
2694
|
}
|
|
2481
|
-
_renderNode(item, index, level) {
|
|
2695
|
+
_renderNode(item, index, level, globalIndex) {
|
|
2482
2696
|
if (!this.renderItem || !this.getItemId || !this.getItemChildren) return html10``;
|
|
2483
2697
|
const id = this.getItemId(item, index);
|
|
2484
2698
|
const rendered = this.renderItem(item, index);
|
|
2485
2699
|
const children = this.getItemChildren(item, index);
|
|
2486
2700
|
const hasChildren = children !== void 0 && children.length > 0;
|
|
2487
2701
|
const expanded = this._isExpanded(id);
|
|
2488
|
-
|
|
2489
|
-
const
|
|
2490
|
-
const childrenClasses = {
|
|
2491
|
-
"tree": true,
|
|
2492
|
-
"tree--hidden": !expanded
|
|
2493
|
-
};
|
|
2702
|
+
globalIndex.value++;
|
|
2703
|
+
const contentLabel = typeof rendered.content === "string" ? rendered.content : id;
|
|
2494
2704
|
return html10`
|
|
2495
2705
|
<li
|
|
2496
|
-
class
|
|
2706
|
+
class=${classMap9({ "treeitem": true, "offset": level > 0, "expandable": hasChildren, "expanded": hasChildren && expanded })}
|
|
2497
2707
|
role="treeitem"
|
|
2498
2708
|
aria-expanded=${hasChildren ? String(expanded) : nothing2}
|
|
2709
|
+
aria-level=${level + 1}
|
|
2499
2710
|
data-node-id=${id}
|
|
2500
2711
|
>
|
|
2501
|
-
<div class="
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2712
|
+
<div class="treeitem-content-wrapper">
|
|
2713
|
+
<div class="expand-toggle-wrapper">
|
|
2714
|
+
<div class="toggle">
|
|
2715
|
+
${hasChildren ? html10`
|
|
2716
|
+
<button
|
|
2717
|
+
class="expand-toggle disable-focus-highlight tree-item-focus-target"
|
|
2718
|
+
type="button"
|
|
2719
|
+
tabindex="-1"
|
|
2720
|
+
aria-label=${contentLabel}
|
|
2721
|
+
aria-expanded=${String(expanded)}
|
|
2722
|
+
@click=${() => this._handleToggle(item, id, expanded)}
|
|
2723
|
+
>
|
|
2724
|
+
${this._renderToggleIcon(expanded)}
|
|
2725
|
+
</button>` : html10`
|
|
2726
|
+
<div class="tree-item-focus-target"
|
|
2727
|
+
role="group"
|
|
2728
|
+
tabindex="-1"
|
|
2729
|
+
aria-label=${contentLabel}
|
|
2730
|
+
></div>`}
|
|
2731
|
+
</div>
|
|
2732
|
+
</div>
|
|
2733
|
+
<div class="structured-item-wrapper">
|
|
2734
|
+
<div class="structured-item--root tree-item-structured-item">
|
|
2735
|
+
${rendered.icon ? html10`<div class="structured-item--icon">${rendered.icon}</div>` : nothing2}
|
|
2736
|
+
<div class="structured-item--main">
|
|
2737
|
+
<div class="structured-item--content-wrap">
|
|
2738
|
+
<div class="structured-item--content">
|
|
2739
|
+
${rendered.content}
|
|
2740
|
+
</div>
|
|
2741
|
+
</div>
|
|
2742
|
+
${rendered.secondaryContent ? html10`<div>${rendered.secondaryContent}</div>` : nothing2}
|
|
2743
|
+
</div>
|
|
2744
|
+
${rendered.actions ? html10`<div class="structured-item--actions">${rendered.actions}</div>` : nothing2}
|
|
2745
|
+
</div>
|
|
2746
|
+
</div>
|
|
2516
2747
|
</div>
|
|
2517
|
-
${hasChildren ? html10`
|
|
2518
|
-
<ul class
|
|
2519
|
-
${children.map((child, i) => this._renderNode(child, i, level + 1))}
|
|
2748
|
+
${hasChildren && expanded ? html10`
|
|
2749
|
+
<ul class="treeitem-group" role="group">
|
|
2750
|
+
${children.map((child, i) => this._renderNode(child, i, level + 1, globalIndex))}
|
|
2520
2751
|
</ul>
|
|
2521
2752
|
` : nothing2}
|
|
2522
2753
|
</li>
|
|
@@ -2526,19 +2757,21 @@ var CsTreeViewInternal = class extends CsBaseElement {
|
|
|
2526
2757
|
if (!this.renderItem || !this.getItemId || !this.getItemChildren) return nothing2;
|
|
2527
2758
|
const rootClasses = {
|
|
2528
2759
|
"root": true,
|
|
2529
|
-
"tree": true,
|
|
2530
2760
|
"root--connector-lines": this.connectorLines === "vertical"
|
|
2531
2761
|
};
|
|
2762
|
+
const globalIndex = { value: 0 };
|
|
2532
2763
|
return html10`
|
|
2533
|
-
<
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2764
|
+
<div class=${classMap9(rootClasses)}>
|
|
2765
|
+
<ul
|
|
2766
|
+
class="tree"
|
|
2767
|
+
role="tree"
|
|
2768
|
+
aria-label=${ifDefined6(this.controlAriaLabel || void 0)}
|
|
2769
|
+
aria-labelledby=${ifDefined6(this.controlAriaLabelledby || void 0)}
|
|
2770
|
+
aria-describedby=${ifDefined6(this.controlAriaDescribedby || void 0)}
|
|
2771
|
+
>
|
|
2772
|
+
${this.items.map((item, i) => this._renderNode(item, i, 0, globalIndex))}
|
|
2773
|
+
</ul>
|
|
2774
|
+
</div>
|
|
2542
2775
|
`;
|
|
2543
2776
|
}
|
|
2544
2777
|
};
|
|
@@ -2582,13 +2815,13 @@ var CsTreeView = class extends CsTreeViewInternal {
|
|
|
2582
2815
|
customElements.define("cs-tree-view", CsTreeView);
|
|
2583
2816
|
|
|
2584
2817
|
// src/box/internal.ts
|
|
2585
|
-
import { css as
|
|
2818
|
+
import { css as css28, html as html11 } from "lit";
|
|
2586
2819
|
import { property as property12 } from "lit/decorators.js";
|
|
2587
2820
|
import { classMap as classMap10 } from "lit/directives/class-map.js";
|
|
2588
2821
|
|
|
2589
2822
|
// src/box/styles.ts
|
|
2590
|
-
import { css as
|
|
2591
|
-
var componentStyles10 =
|
|
2823
|
+
import { css as css27 } from "lit";
|
|
2824
|
+
var componentStyles10 = css27`
|
|
2592
2825
|
.box.p-variant.color-default, .box.b-variant.color-default, .box.strong-variant.color-default, .box.code-variant.color-default, .box.pre-variant.color-default, .box.samp-variant.color-default {
|
|
2593
2826
|
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
2594
2827
|
}
|
|
@@ -3396,7 +3629,7 @@ function spacingClasses(prefix, value) {
|
|
|
3396
3629
|
}
|
|
3397
3630
|
return {};
|
|
3398
3631
|
}
|
|
3399
|
-
var hostStyles10 =
|
|
3632
|
+
var hostStyles10 = css28`
|
|
3400
3633
|
:host { display: block; }
|
|
3401
3634
|
:host([display="inline"]) { display: inline; }
|
|
3402
3635
|
:host([display="inline-block"]) { display: inline-block; }
|
|
@@ -3413,14 +3646,15 @@ var CsBoxInternal = class extends CsBaseElement {
|
|
|
3413
3646
|
render() {
|
|
3414
3647
|
const tag = this.tagOverride || VARIANT_TAG_MAP[this.variant] || "div";
|
|
3415
3648
|
const classes = {
|
|
3649
|
+
"root": true,
|
|
3416
3650
|
"box": true,
|
|
3417
3651
|
[variantCssClass(this.variant)]: true,
|
|
3418
3652
|
...this.display ? { [`d-${this.display}`]: true } : {},
|
|
3419
3653
|
...this.textAlign ? { [`t-${this.textAlign}`]: true } : {},
|
|
3420
3654
|
...this.float ? { [`f-${this.float}`]: true } : {},
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3655
|
+
[`font-size-${this.fontSize || "default"}`]: true,
|
|
3656
|
+
[`font-weight-${this.fontWeight || "default"}`]: true,
|
|
3657
|
+
[`color-${this.color || "default"}`]: true,
|
|
3424
3658
|
...spacingClasses("m", this.margin),
|
|
3425
3659
|
...spacingClasses("p", this.padding)
|
|
3426
3660
|
};
|
|
@@ -3496,13 +3730,13 @@ var CsBox = class extends CsBoxInternal {
|
|
|
3496
3730
|
customElements.define("cs-box", CsBox);
|
|
3497
3731
|
|
|
3498
3732
|
// src/grid/internal.ts
|
|
3499
|
-
import { css as
|
|
3733
|
+
import { css as css30, html as html12 } from "lit";
|
|
3500
3734
|
import { property as property13, state } from "lit/decorators.js";
|
|
3501
3735
|
import { classMap as classMap11 } from "lit/directives/class-map.js";
|
|
3502
3736
|
|
|
3503
3737
|
// src/grid/styles.ts
|
|
3504
|
-
import { css as
|
|
3505
|
-
var componentStyles11 =
|
|
3738
|
+
import { css as css29 } from "lit";
|
|
3739
|
+
var componentStyles11 = css29`
|
|
3506
3740
|
.grid {
|
|
3507
3741
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
3508
3742
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -3705,7 +3939,7 @@ function resolveNumericValue(value, defaultValue) {
|
|
|
3705
3939
|
if (typeof value === "number") return value;
|
|
3706
3940
|
return value.default ?? defaultValue;
|
|
3707
3941
|
}
|
|
3708
|
-
var hostStyles11 =
|
|
3942
|
+
var hostStyles11 = css30`:host { display: block; }`;
|
|
3709
3943
|
var CsGridInternal = class extends CsBaseElement {
|
|
3710
3944
|
constructor() {
|
|
3711
3945
|
super(...arguments);
|
|
@@ -3788,13 +4022,13 @@ var CsGrid = class extends CsGridInternal {
|
|
|
3788
4022
|
customElements.define("cs-grid", CsGrid);
|
|
3789
4023
|
|
|
3790
4024
|
// src/space-between/internal.ts
|
|
3791
|
-
import { css as
|
|
4025
|
+
import { css as css32, html as html13 } from "lit";
|
|
3792
4026
|
import { property as property14 } from "lit/decorators.js";
|
|
3793
4027
|
import { classMap as classMap12 } from "lit/directives/class-map.js";
|
|
3794
4028
|
|
|
3795
4029
|
// src/space-between/styles.ts
|
|
3796
|
-
import { css as
|
|
3797
|
-
var componentStyles12 =
|
|
4030
|
+
import { css as css31 } from "lit";
|
|
4031
|
+
var componentStyles12 = css31`
|
|
3798
4032
|
.root {
|
|
3799
4033
|
display: flex;
|
|
3800
4034
|
}
|
|
@@ -3880,7 +4114,12 @@ var componentStyles12 = css27`
|
|
|
3880
4114
|
`;
|
|
3881
4115
|
|
|
3882
4116
|
// src/space-between/internal.ts
|
|
3883
|
-
var hostStyles12 =
|
|
4117
|
+
var hostStyles12 = css32`
|
|
4118
|
+
:host { display: block; }
|
|
4119
|
+
::slotted(*) {
|
|
4120
|
+
/* Mirrors .child styles from Cloudscape's space-between CSS */
|
|
4121
|
+
}
|
|
4122
|
+
`;
|
|
3884
4123
|
var CsSpaceBetweenInternal = class extends CsBaseElement {
|
|
3885
4124
|
constructor() {
|
|
3886
4125
|
super(...arguments);
|
|
@@ -3922,11 +4161,11 @@ var CsSpaceBetween = class extends CsSpaceBetweenInternal {
|
|
|
3922
4161
|
customElements.define("cs-space-between", CsSpaceBetween);
|
|
3923
4162
|
|
|
3924
4163
|
// src/text-content/internal.ts
|
|
3925
|
-
import { css as
|
|
4164
|
+
import { css as css34, html as html14 } from "lit";
|
|
3926
4165
|
|
|
3927
4166
|
// src/text-content/styles.ts
|
|
3928
|
-
import { css as
|
|
3929
|
-
var componentStyles13 =
|
|
4167
|
+
import { css as css33 } from "lit";
|
|
4168
|
+
var componentStyles13 = css33`
|
|
3930
4169
|
.text-content {
|
|
3931
4170
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
3932
4171
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -4150,7 +4389,7 @@ var componentStyles13 = css29`
|
|
|
4150
4389
|
`;
|
|
4151
4390
|
|
|
4152
4391
|
// src/text-content/internal.ts
|
|
4153
|
-
var hostStyles13 =
|
|
4392
|
+
var hostStyles13 = css34`:host { display: block; }`;
|
|
4154
4393
|
var CsTextContentInternal = class extends CsBaseElement {
|
|
4155
4394
|
static {
|
|
4156
4395
|
this.styles = [sharedStyles, componentStyles13, hostStyles13];
|
|
@@ -4170,13 +4409,13 @@ var CsTextContent = class extends CsTextContentInternal {
|
|
|
4170
4409
|
customElements.define("cs-text-content", CsTextContent);
|
|
4171
4410
|
|
|
4172
4411
|
// src/file-dropzone/internal.ts
|
|
4173
|
-
import { css as
|
|
4412
|
+
import { css as css36, html as html15 } from "lit";
|
|
4174
4413
|
import { state as state2 } from "lit/decorators.js";
|
|
4175
4414
|
import { classMap as classMap13 } from "lit/directives/class-map.js";
|
|
4176
4415
|
|
|
4177
4416
|
// src/file-dropzone/styles.ts
|
|
4178
|
-
import { css as
|
|
4179
|
-
var componentStyles14 =
|
|
4417
|
+
import { css as css35 } from "lit";
|
|
4418
|
+
var componentStyles14 = css35`
|
|
4180
4419
|
.root {
|
|
4181
4420
|
padding-block: var(--space-static-l-n53k41, 20px);
|
|
4182
4421
|
padding-inline: var(--space-static-l-n53k41, 20px);
|
|
@@ -4207,7 +4446,7 @@ var componentStyles14 = css31`
|
|
|
4207
4446
|
`;
|
|
4208
4447
|
|
|
4209
4448
|
// src/file-dropzone/internal.ts
|
|
4210
|
-
var hostStyles14 =
|
|
4449
|
+
var hostStyles14 = css36`:host { display: block; }`;
|
|
4211
4450
|
var CsFileDropzoneInternal = class extends CsBaseElement {
|
|
4212
4451
|
constructor() {
|
|
4213
4452
|
super(...arguments);
|
|
@@ -4272,7 +4511,9 @@ var CsFileDropzoneInternal = class extends CsBaseElement {
|
|
|
4272
4511
|
@dragleave=${this._onDragLeave}
|
|
4273
4512
|
@drop=${this._onDrop}
|
|
4274
4513
|
>
|
|
4275
|
-
<
|
|
4514
|
+
<div class="content">
|
|
4515
|
+
<slot></slot>
|
|
4516
|
+
</div>
|
|
4276
4517
|
</div>
|
|
4277
4518
|
`;
|
|
4278
4519
|
}
|
|
@@ -4287,14 +4528,14 @@ var CsFileDropzone = class extends CsFileDropzoneInternal {
|
|
|
4287
4528
|
customElements.define("cs-file-dropzone", CsFileDropzone);
|
|
4288
4529
|
|
|
4289
4530
|
// src/anchor-navigation/internal.ts
|
|
4290
|
-
import { css as
|
|
4531
|
+
import { css as css38, html as html16, nothing as nothing3 } from "lit";
|
|
4291
4532
|
import { property as property15, state as state3 } from "lit/decorators.js";
|
|
4292
4533
|
import { classMap as classMap14 } from "lit/directives/class-map.js";
|
|
4293
4534
|
import { ifDefined as ifDefined7 } from "lit/directives/if-defined.js";
|
|
4294
4535
|
|
|
4295
4536
|
// src/anchor-navigation/styles.ts
|
|
4296
|
-
import { css as
|
|
4297
|
-
var componentStyles15 =
|
|
4537
|
+
import { css as css37 } from "lit";
|
|
4538
|
+
var componentStyles15 = css37`
|
|
4298
4539
|
.root {
|
|
4299
4540
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
4300
4541
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -4432,7 +4673,7 @@ var componentStyles15 = css33`
|
|
|
4432
4673
|
`;
|
|
4433
4674
|
|
|
4434
4675
|
// src/anchor-navigation/internal.ts
|
|
4435
|
-
var hostStyles15 =
|
|
4676
|
+
var hostStyles15 = css38`:host { display: block; }`;
|
|
4436
4677
|
var CsAnchorNavigationInternal = class extends CsBaseElement {
|
|
4437
4678
|
constructor() {
|
|
4438
4679
|
super(...arguments);
|
|
@@ -4521,38 +4762,76 @@ var CsAnchorNavigationInternal = class extends CsBaseElement {
|
|
|
4521
4762
|
_onAnchorClick(_e, anchor) {
|
|
4522
4763
|
fireNonCancelableEvent(this, "follow", anchor);
|
|
4523
4764
|
}
|
|
4765
|
+
_buildTree(anchors) {
|
|
4766
|
+
const groups = [];
|
|
4767
|
+
for (const anchor of anchors) {
|
|
4768
|
+
if (anchor.level <= 1) {
|
|
4769
|
+
groups.push({ anchor, children: [] });
|
|
4770
|
+
} else if (groups.length > 0) {
|
|
4771
|
+
groups[groups.length - 1].children.push(anchor);
|
|
4772
|
+
}
|
|
4773
|
+
}
|
|
4774
|
+
return groups;
|
|
4775
|
+
}
|
|
4776
|
+
_renderAnchorLink(anchor) {
|
|
4777
|
+
const isActive = this._currentHref === anchor.href;
|
|
4778
|
+
return html16`
|
|
4779
|
+
<li class=${classMap14({
|
|
4780
|
+
"anchor-item": true,
|
|
4781
|
+
"anchor-item--active": isActive
|
|
4782
|
+
})}>
|
|
4783
|
+
<a
|
|
4784
|
+
class=${classMap14({
|
|
4785
|
+
"anchor-link": true,
|
|
4786
|
+
"anchor-link--active": isActive
|
|
4787
|
+
})}
|
|
4788
|
+
href=${anchor.href}
|
|
4789
|
+
aria-current=${ifDefined7(isActive ? "location" : void 0)}
|
|
4790
|
+
@click=${(e) => this._onAnchorClick(e, anchor)}
|
|
4791
|
+
>
|
|
4792
|
+
<span class="anchor-link-text">${anchor.text}</span>
|
|
4793
|
+
${anchor.info ? html16`<span class="anchor-link-info">${anchor.info}</span>` : nothing3}
|
|
4794
|
+
</a>
|
|
4795
|
+
</li>
|
|
4796
|
+
`;
|
|
4797
|
+
}
|
|
4524
4798
|
render() {
|
|
4799
|
+
const groups = this._buildTree(this.anchors);
|
|
4525
4800
|
return html16`
|
|
4526
4801
|
<nav
|
|
4527
4802
|
class="root"
|
|
4528
4803
|
aria-labelledby=${ifDefined7(this.ariaLabelledby)}
|
|
4529
4804
|
>
|
|
4530
|
-
<
|
|
4531
|
-
${
|
|
4805
|
+
<ol class="anchor-list" role="list">
|
|
4806
|
+
${groups.map(({ anchor, children }) => {
|
|
4532
4807
|
const isActive = this._currentHref === anchor.href;
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
"anchor-link--active": isActive
|
|
4537
|
-
};
|
|
4808
|
+
if (children.length === 0) {
|
|
4809
|
+
return this._renderAnchorLink(anchor);
|
|
4810
|
+
}
|
|
4538
4811
|
return html16`
|
|
4539
4812
|
<li class=${classMap14({
|
|
4540
4813
|
"anchor-item": true,
|
|
4541
4814
|
"anchor-item--active": isActive
|
|
4542
|
-
})}
|
|
4815
|
+
})}>
|
|
4543
4816
|
<a
|
|
4544
|
-
class=${classMap14(
|
|
4817
|
+
class=${classMap14({
|
|
4818
|
+
"anchor-link": true,
|
|
4819
|
+
"anchor-link--active": isActive
|
|
4820
|
+
})}
|
|
4545
4821
|
href=${anchor.href}
|
|
4546
4822
|
aria-current=${ifDefined7(isActive ? "location" : void 0)}
|
|
4547
4823
|
@click=${(e) => this._onAnchorClick(e, anchor)}
|
|
4548
4824
|
>
|
|
4549
4825
|
<span class="anchor-link-text">${anchor.text}</span>
|
|
4550
|
-
${anchor.info ? html16`<span class="anchor-link-info">${anchor.info}</span>` :
|
|
4826
|
+
${anchor.info ? html16`<span class="anchor-link-info">${anchor.info}</span>` : nothing3}
|
|
4551
4827
|
</a>
|
|
4828
|
+
<ol class="anchor-list">
|
|
4829
|
+
${children.map((child) => this._renderAnchorLink(child))}
|
|
4830
|
+
</ol>
|
|
4552
4831
|
</li>
|
|
4553
4832
|
`;
|
|
4554
4833
|
})}
|
|
4555
|
-
</
|
|
4834
|
+
</ol>
|
|
4556
4835
|
</nav>
|
|
4557
4836
|
`;
|
|
4558
4837
|
}
|