@cumulus-ui/components 0.1.3 → 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 +2 -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 +555 -271
- 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);
|
|
@@ -332,8 +344,9 @@ var CsCheckboxInternal = class extends Base {
|
|
|
332
344
|
this.indeterminate = false;
|
|
333
345
|
this.readOnly = false;
|
|
334
346
|
this.description = "";
|
|
335
|
-
this.ariaLabel =
|
|
347
|
+
this.ariaLabel = null;
|
|
336
348
|
this.ariaRequired = null;
|
|
349
|
+
this.ariaControls = null;
|
|
337
350
|
this._labelId = generateUniqueId("checkbox-label");
|
|
338
351
|
this._descriptionId = generateUniqueId("checkbox-desc");
|
|
339
352
|
this._onHostClick = () => {
|
|
@@ -341,7 +354,7 @@ var CsCheckboxInternal = class extends Base {
|
|
|
341
354
|
};
|
|
342
355
|
}
|
|
343
356
|
static {
|
|
344
|
-
this.styles = [sharedStyles, componentStyles, abstractSwitchStyles, hostStyles];
|
|
357
|
+
this.styles = [sharedStyles, componentStyles, abstractSwitchStyles, checkboxIconStyles, hostStyles];
|
|
345
358
|
}
|
|
346
359
|
connectedCallback() {
|
|
347
360
|
super.connectedCallback();
|
|
@@ -375,63 +388,60 @@ var CsCheckboxInternal = class extends Base {
|
|
|
375
388
|
}
|
|
376
389
|
render() {
|
|
377
390
|
const styledBoxClasses = {
|
|
378
|
-
"styled-box": true,
|
|
379
|
-
"styled-box-checked": this.checked && !this.indeterminate,
|
|
380
|
-
"styled-box-indeterminate": this.indeterminate,
|
|
381
|
-
"styled-box-disabled": this.disabled,
|
|
382
|
-
"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
|
|
383
396
|
};
|
|
384
397
|
const styledLineClasses = {
|
|
385
|
-
"styled-line": true,
|
|
386
|
-
"styled-line-disabled": this.disabled,
|
|
387
|
-
"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
|
|
388
401
|
};
|
|
389
402
|
const hasDescription = this.description.length > 0;
|
|
390
403
|
const ariaDescribedBy = hasDescription ? this._descriptionId : void 0;
|
|
391
404
|
return html`
|
|
392
|
-
<
|
|
393
|
-
<span class="label-wrapper">
|
|
394
|
-
<span class
|
|
395
|
-
|
|
396
|
-
"checkbox-control": true,
|
|
397
|
-
"checkbox-control--checked": this.checked && !this.indeterminate,
|
|
398
|
-
"checkbox-control--indeterminate": this.indeterminate
|
|
399
|
-
})}>
|
|
400
|
-
<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>
|
|
401
409
|
<input
|
|
402
410
|
type="checkbox"
|
|
403
|
-
class="native-input"
|
|
411
|
+
class="abstract-switch--native-input"
|
|
404
412
|
.checked=${this.checked}
|
|
405
413
|
.indeterminate=${this.indeterminate}
|
|
406
414
|
?disabled=${this.disabled}
|
|
407
415
|
?readonly=${this.readOnly}
|
|
408
416
|
aria-label=${ifDefined(this.ariaLabel || void 0)}
|
|
417
|
+
aria-labelledby=${ifDefined(!this.ariaLabel ? this._labelId : void 0)}
|
|
409
418
|
aria-required=${ifDefined(this.ariaRequired || void 0)}
|
|
419
|
+
aria-controls=${ifDefined(this.ariaControls || void 0)}
|
|
410
420
|
aria-describedby=${ifDefined(ariaDescribedBy)}
|
|
411
421
|
aria-checked=${this.indeterminate ? "mixed" : this.checked}
|
|
412
422
|
@click=${this._preventNativeToggle}
|
|
413
423
|
/>
|
|
414
|
-
<span class="outline"></span>
|
|
424
|
+
<span class="abstract-switch--outline outline"></span>
|
|
415
425
|
</span>
|
|
416
|
-
<span class="content">
|
|
426
|
+
<span class="abstract-switch--content">
|
|
417
427
|
<span id=${this._labelId} class=${classMap({
|
|
418
|
-
"label": true,
|
|
419
|
-
"label-disabled": this.disabled
|
|
428
|
+
"abstract-switch--label": true,
|
|
429
|
+
"abstract-switch--label-disabled": this.disabled
|
|
420
430
|
})}>
|
|
421
431
|
<slot></slot>
|
|
422
432
|
</span>
|
|
423
433
|
${hasDescription ? html`
|
|
424
434
|
<span id=${this._descriptionId} class=${classMap({
|
|
425
|
-
"description": true,
|
|
426
|
-
"description-bottom-padding": true,
|
|
427
|
-
"description-disabled": this.disabled
|
|
435
|
+
"abstract-switch--description": true,
|
|
436
|
+
"abstract-switch--description-bottom-padding": true,
|
|
437
|
+
"abstract-switch--description-disabled": this.disabled
|
|
428
438
|
})}>
|
|
429
439
|
${this.description}
|
|
430
440
|
</span>
|
|
431
441
|
` : ""}
|
|
432
442
|
</span>
|
|
433
443
|
</span>
|
|
434
|
-
</
|
|
444
|
+
</span>
|
|
435
445
|
`;
|
|
436
446
|
}
|
|
437
447
|
};
|
|
@@ -453,6 +463,9 @@ __decorateClass([
|
|
|
453
463
|
__decorateClass([
|
|
454
464
|
property2({ type: String })
|
|
455
465
|
], CsCheckboxInternal.prototype, "ariaRequired", 2);
|
|
466
|
+
__decorateClass([
|
|
467
|
+
property2({ type: String })
|
|
468
|
+
], CsCheckboxInternal.prototype, "ariaControls", 2);
|
|
456
469
|
|
|
457
470
|
// src/checkbox/index.ts
|
|
458
471
|
var CsCheckbox = class extends CsCheckboxInternal {
|
|
@@ -460,13 +473,13 @@ var CsCheckbox = class extends CsCheckboxInternal {
|
|
|
460
473
|
customElements.define("cs-checkbox", CsCheckbox);
|
|
461
474
|
|
|
462
475
|
// src/spinner/internal.ts
|
|
463
|
-
import { css as
|
|
476
|
+
import { css as css7, html as html2 } from "lit";
|
|
464
477
|
import { property as property3 } from "lit/decorators.js";
|
|
465
478
|
import { classMap as classMap2 } from "lit/directives/class-map.js";
|
|
466
479
|
|
|
467
480
|
// src/spinner/styles.ts
|
|
468
|
-
import { css as
|
|
469
|
-
var componentStyles2 =
|
|
481
|
+
import { css as css6 } from "lit";
|
|
482
|
+
var componentStyles2 = css6`
|
|
470
483
|
@keyframes awsui_spinner-rotator_1612d_1krck_1 {
|
|
471
484
|
0% {
|
|
472
485
|
transform: rotate(var(--awsui-spinner-rotator-from-6b9ypa));
|
|
@@ -595,7 +608,7 @@ var componentStyles2 = css5`
|
|
|
595
608
|
`;
|
|
596
609
|
|
|
597
610
|
// src/spinner/internal.ts
|
|
598
|
-
var hostStyles2 =
|
|
611
|
+
var hostStyles2 = css7`
|
|
599
612
|
:host {
|
|
600
613
|
display: inline-block;
|
|
601
614
|
vertical-align: top;
|
|
@@ -635,13 +648,13 @@ var CsSpinner = class extends CsSpinnerInternal {
|
|
|
635
648
|
customElements.define("cs-spinner", CsSpinner);
|
|
636
649
|
|
|
637
650
|
// src/badge/internal.ts
|
|
638
|
-
import { css as
|
|
651
|
+
import { css as css9, html as html3 } from "lit";
|
|
639
652
|
import { property as property4 } from "lit/decorators.js";
|
|
640
653
|
import { classMap as classMap3 } from "lit/directives/class-map.js";
|
|
641
654
|
|
|
642
655
|
// src/badge/styles.ts
|
|
643
|
-
import { css as
|
|
644
|
-
var componentStyles3 =
|
|
656
|
+
import { css as css8 } from "lit";
|
|
657
|
+
var componentStyles3 = css8`
|
|
645
658
|
.badge {
|
|
646
659
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
647
660
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -701,7 +714,7 @@ var componentStyles3 = css7`
|
|
|
701
714
|
`;
|
|
702
715
|
|
|
703
716
|
// src/badge/internal.ts
|
|
704
|
-
var hostStyles3 =
|
|
717
|
+
var hostStyles3 = css9`
|
|
705
718
|
:host {
|
|
706
719
|
display: inline-block;
|
|
707
720
|
line-height: 0;
|
|
@@ -737,13 +750,13 @@ var CsBadge = class extends CsBadgeInternal {
|
|
|
737
750
|
customElements.define("cs-badge", CsBadge);
|
|
738
751
|
|
|
739
752
|
// src/live-region/internal.ts
|
|
740
|
-
import { css as
|
|
753
|
+
import { css as css11, html as html4 } from "lit";
|
|
741
754
|
import { property as property5 } from "lit/decorators.js";
|
|
742
755
|
import { classMap as classMap4 } from "lit/directives/class-map.js";
|
|
743
756
|
|
|
744
757
|
// src/live-region/styles.ts
|
|
745
|
-
import { css as
|
|
746
|
-
var componentStyles4 =
|
|
758
|
+
import { css as css10 } from "lit";
|
|
759
|
+
var componentStyles4 = css10`
|
|
747
760
|
.root {
|
|
748
761
|
display: contents;
|
|
749
762
|
}
|
|
@@ -760,7 +773,7 @@ var componentStyles4 = css9`
|
|
|
760
773
|
`;
|
|
761
774
|
|
|
762
775
|
// src/live-region/internal.ts
|
|
763
|
-
var hostStyles4 =
|
|
776
|
+
var hostStyles4 = css11`:host { display: contents; }`;
|
|
764
777
|
var CsLiveRegionInternal = class extends CsBaseElement {
|
|
765
778
|
constructor() {
|
|
766
779
|
super(...arguments);
|
|
@@ -807,15 +820,15 @@ var CsLiveRegion = class extends CsLiveRegionInternal {
|
|
|
807
820
|
customElements.define("cs-live-region", CsLiveRegion);
|
|
808
821
|
|
|
809
822
|
// src/icon/internal.ts
|
|
810
|
-
import { css as
|
|
823
|
+
import { css as css13, html as html6, svg as svgTag } from "lit";
|
|
811
824
|
import { property as property7 } from "lit/decorators.js";
|
|
812
825
|
import { classMap as classMap5 } from "lit/directives/class-map.js";
|
|
813
826
|
import { ifDefined as ifDefined2 } from "lit/directives/if-defined.js";
|
|
814
827
|
import { consume } from "@lit/context";
|
|
815
828
|
|
|
816
829
|
// src/icon/styles.ts
|
|
817
|
-
import { css as
|
|
818
|
-
var componentStyles5 =
|
|
830
|
+
import { css as css12 } from "lit";
|
|
831
|
+
var componentStyles5 = css12`
|
|
819
832
|
.icon {
|
|
820
833
|
position: relative;
|
|
821
834
|
display: inline-block;
|
|
@@ -1188,7 +1201,7 @@ __decorateClass([
|
|
|
1188
1201
|
], CsIconProviderInternal.prototype, "_resolver", 2);
|
|
1189
1202
|
|
|
1190
1203
|
// src/icon/internal.ts
|
|
1191
|
-
var hostStyles5 =
|
|
1204
|
+
var hostStyles5 = css13`:host { display: inline-block; vertical-align: top; line-height: 0; }`;
|
|
1192
1205
|
var CsIconInternal = class extends CsBaseElement {
|
|
1193
1206
|
constructor() {
|
|
1194
1207
|
super(...arguments);
|
|
@@ -1279,14 +1292,14 @@ var CsIconProvider = class extends CsIconProviderInternal {
|
|
|
1279
1292
|
customElements.define("cs-icon-provider", CsIconProvider);
|
|
1280
1293
|
|
|
1281
1294
|
// src/radio-group/internal.ts
|
|
1282
|
-
import { css as
|
|
1295
|
+
import { css as css16, html as html7 } from "lit";
|
|
1283
1296
|
import { property as property8 } from "lit/decorators.js";
|
|
1284
1297
|
import { classMap as classMap6 } from "lit/directives/class-map.js";
|
|
1285
1298
|
import { ifDefined as ifDefined3 } from "lit/directives/if-defined.js";
|
|
1286
1299
|
|
|
1287
1300
|
// src/radio-group/styles.ts
|
|
1288
|
-
import { css as
|
|
1289
|
-
var componentStyles6 =
|
|
1301
|
+
import { css as css14 } from "lit";
|
|
1302
|
+
var componentStyles6 = css14`
|
|
1290
1303
|
.radio-group {
|
|
1291
1304
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
1292
1305
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -1320,9 +1333,9 @@ var componentStyles6 = css13`
|
|
|
1320
1333
|
`;
|
|
1321
1334
|
|
|
1322
1335
|
// src/internal/styles/radio-button.ts
|
|
1323
|
-
import { css as
|
|
1324
|
-
var radioButtonStyles =
|
|
1325
|
-
.radio-control {
|
|
1336
|
+
import { css as css15 } from "lit";
|
|
1337
|
+
var radioButtonStyles = css15`
|
|
1338
|
+
.radio-button--radio-control {
|
|
1326
1339
|
margin-block-start: calc((var(--line-height-body-m-2mh3ke, 20px) - var(--size-control-adm93y, 16px)) / 2);
|
|
1327
1340
|
min-block-size: var(--size-control-adm93y, 16px);
|
|
1328
1341
|
min-inline-size: var(--size-control-adm93y, 16px);
|
|
@@ -1330,15 +1343,15 @@ var radioButtonStyles = css14`
|
|
|
1330
1343
|
inline-size: var(--size-control-adm93y, 16px);
|
|
1331
1344
|
}
|
|
1332
1345
|
|
|
1333
|
-
.outline {
|
|
1346
|
+
.radio-button--outline {
|
|
1334
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));
|
|
1335
1348
|
position: relative;
|
|
1336
1349
|
}
|
|
1337
|
-
.outline {
|
|
1350
|
+
.radio-button--outline {
|
|
1338
1351
|
outline: 2px dotted transparent;
|
|
1339
1352
|
outline-offset: calc(2px - 1px);
|
|
1340
1353
|
}
|
|
1341
|
-
.outline::before {
|
|
1354
|
+
.radio-button--outline::before {
|
|
1342
1355
|
content: " ";
|
|
1343
1356
|
display: block;
|
|
1344
1357
|
position: absolute;
|
|
@@ -1353,39 +1366,39 @@ var radioButtonStyles = css14`
|
|
|
1353
1366
|
box-shadow: var(--awsui-style-focus-ring-box-shadow-6b9ypa);
|
|
1354
1367
|
}
|
|
1355
1368
|
|
|
1356
|
-
.styled-circle-border {
|
|
1369
|
+
.radio-button--styled-circle-border {
|
|
1357
1370
|
stroke: var(--color-border-control-default-sh3548, #8c8c94);
|
|
1358
1371
|
fill: var(--color-background-control-default-4jb21l, #ffffff);
|
|
1359
1372
|
}
|
|
1360
|
-
.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 {
|
|
1361
1374
|
fill: var(--color-background-control-disabled-1f3718, #dedee3);
|
|
1362
1375
|
stroke: var(--color-background-control-disabled-1f3718, #dedee3);
|
|
1363
1376
|
}
|
|
1364
1377
|
|
|
1365
|
-
.styled-circle-fill {
|
|
1378
|
+
.radio-button--styled-circle-fill {
|
|
1366
1379
|
stroke: var(--color-background-control-checked-ka7kc2, #006ce0);
|
|
1367
1380
|
fill: var(--color-foreground-control-default-eto4wy, #ffffff);
|
|
1368
1381
|
opacity: 0;
|
|
1369
1382
|
transition: opacity var(--motion-duration-transition-quick-mcm2y0, 90ms) var(--motion-easing-transition-quick-qxak3i, linear);
|
|
1370
1383
|
}
|
|
1371
1384
|
@media (prefers-reduced-motion: reduce) {
|
|
1372
|
-
.styled-circle-fill {
|
|
1385
|
+
.radio-button--styled-circle-fill {
|
|
1373
1386
|
animation: none;
|
|
1374
1387
|
transition: none;
|
|
1375
1388
|
}
|
|
1376
1389
|
}
|
|
1377
|
-
.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 {
|
|
1378
1391
|
animation: none;
|
|
1379
1392
|
transition: none;
|
|
1380
1393
|
}
|
|
1381
|
-
.styled-circle-fill.styled-circle-checked {
|
|
1394
|
+
.radio-button--styled-circle-fill.radio-button--styled-circle-checked {
|
|
1382
1395
|
opacity: 1;
|
|
1383
1396
|
}
|
|
1384
|
-
.styled-circle-fill.styled-circle-disabled {
|
|
1397
|
+
.radio-button--styled-circle-fill.radio-button--styled-circle-disabled {
|
|
1385
1398
|
fill: var(--color-foreground-control-disabled-txi6cf, #ffffff);
|
|
1386
1399
|
stroke: var(--color-background-control-disabled-1f3718, #dedee3);
|
|
1387
1400
|
}
|
|
1388
|
-
.styled-circle-fill.styled-circle-readonly {
|
|
1401
|
+
.radio-button--styled-circle-fill.radio-button--styled-circle-readonly {
|
|
1389
1402
|
fill: var(--color-foreground-control-read-only-7ydvuj, #656871);
|
|
1390
1403
|
stroke: var(--color-background-control-disabled-1f3718, #dedee3);
|
|
1391
1404
|
}
|
|
@@ -1393,7 +1406,7 @@ var radioButtonStyles = css14`
|
|
|
1393
1406
|
|
|
1394
1407
|
// src/radio-group/internal.ts
|
|
1395
1408
|
var Base2 = FormAssociatedMixin(CsBaseElement);
|
|
1396
|
-
var hostStyles6 =
|
|
1409
|
+
var hostStyles6 = css16`:host { display: block; }`;
|
|
1397
1410
|
var CsRadioGroupInternal = class extends Base2 {
|
|
1398
1411
|
constructor() {
|
|
1399
1412
|
super(...arguments);
|
|
@@ -1468,7 +1481,7 @@ var CsRadioGroupInternal = class extends Base2 {
|
|
|
1468
1481
|
_getRadioInputs() {
|
|
1469
1482
|
const root = this.shadowRoot;
|
|
1470
1483
|
if (!root) return [];
|
|
1471
|
-
return Array.from(root.querySelectorAll(".native-input"));
|
|
1484
|
+
return Array.from(root.querySelectorAll(".abstract-switch--native-input"));
|
|
1472
1485
|
}
|
|
1473
1486
|
_getSelectedIndex() {
|
|
1474
1487
|
return this.items.findIndex((item) => item.value === this.value);
|
|
@@ -1506,6 +1519,7 @@ var CsRadioGroupInternal = class extends Base2 {
|
|
|
1506
1519
|
render() {
|
|
1507
1520
|
const groupName = this.name || this._groupName;
|
|
1508
1521
|
const groupClasses = {
|
|
1522
|
+
"root": true,
|
|
1509
1523
|
"radio-group": true,
|
|
1510
1524
|
"horizontal-group": this.direction === "horizontal"
|
|
1511
1525
|
};
|
|
@@ -1527,59 +1541,63 @@ var CsRadioGroupInternal = class extends Base2 {
|
|
|
1527
1541
|
const isChecked = item.value === this.value;
|
|
1528
1542
|
const isDisabled = this.disabled || !!item.disabled;
|
|
1529
1543
|
const itemId = item.controlId || generateUniqueId("radio-item");
|
|
1544
|
+
const labelId = `${itemId}-label`;
|
|
1530
1545
|
const descId = item.description ? `${itemId}-desc` : void 0;
|
|
1531
1546
|
const itemClasses = {
|
|
1547
|
+
"root": true,
|
|
1532
1548
|
"radio": true,
|
|
1533
|
-
"wrapper": true,
|
|
1549
|
+
"abstract-switch--wrapper": true,
|
|
1550
|
+
"selected": isChecked,
|
|
1534
1551
|
"radio--has-description": !!item.description,
|
|
1535
1552
|
"horizontal": this.direction === "horizontal"
|
|
1536
1553
|
};
|
|
1537
1554
|
const controlClasses = {
|
|
1538
|
-
"control": true,
|
|
1539
|
-
"radio-control": true
|
|
1555
|
+
"abstract-switch--control": true,
|
|
1556
|
+
"radio-button--radio-control": true
|
|
1540
1557
|
};
|
|
1541
1558
|
return html7`
|
|
1542
|
-
<
|
|
1559
|
+
<span
|
|
1543
1560
|
class=${classMap6(itemClasses)}
|
|
1544
1561
|
@click=${(e) => {
|
|
1545
1562
|
e.preventDefault();
|
|
1546
1563
|
this._onItemClick(item);
|
|
1547
1564
|
}}
|
|
1548
1565
|
>
|
|
1549
|
-
<span class="label-wrapper">
|
|
1566
|
+
<span class="abstract-switch--label-wrapper">
|
|
1550
1567
|
<span class=${classMap6(controlClasses)}>
|
|
1551
1568
|
<svg viewBox="0 0 100 100" aria-hidden="true">
|
|
1552
1569
|
<circle class=${classMap6({
|
|
1553
|
-
"styled-circle-border": true,
|
|
1554
|
-
"styled-circle-disabled": isDisabled,
|
|
1555
|
-
"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
|
|
1556
1573
|
})} stroke-width="6.25" cx="50" cy="50" r="46" />
|
|
1557
1574
|
<circle class=${classMap6({
|
|
1558
|
-
"styled-circle-fill": true,
|
|
1559
|
-
"styled-circle-checked": isChecked,
|
|
1560
|
-
"styled-circle-disabled": isDisabled,
|
|
1561
|
-
"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
|
|
1562
1579
|
})} stroke-width="30" cx="50" cy="50" r="35" />
|
|
1563
1580
|
</svg>
|
|
1564
1581
|
<input
|
|
1565
1582
|
type="radio"
|
|
1566
|
-
class="native-input"
|
|
1583
|
+
class="abstract-switch--native-input"
|
|
1567
1584
|
name=${groupName}
|
|
1568
1585
|
.value=${item.value}
|
|
1569
1586
|
.checked=${isChecked}
|
|
1570
1587
|
?disabled=${isDisabled}
|
|
1571
1588
|
?readonly=${this.readOnly}
|
|
1572
1589
|
tabindex=${this._getTabIndex(index)}
|
|
1590
|
+
aria-labelledby=${labelId}
|
|
1573
1591
|
aria-describedby=${ifDefined3(descId)}
|
|
1574
1592
|
@click=${(e) => e.preventDefault()}
|
|
1575
1593
|
@focus=${() => this._onFocus(index)}
|
|
1576
1594
|
/>
|
|
1577
|
-
<span class="outline"></span>
|
|
1595
|
+
<span class="abstract-switch--outline radio-button--outline"></span>
|
|
1578
1596
|
</span>
|
|
1579
|
-
<span class="content">
|
|
1580
|
-
<span class=${classMap6({
|
|
1581
|
-
"label": true,
|
|
1582
|
-
"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
|
|
1583
1601
|
})}>
|
|
1584
1602
|
${item.label}
|
|
1585
1603
|
</span>
|
|
@@ -1587,8 +1605,8 @@ var CsRadioGroupInternal = class extends Base2 {
|
|
|
1587
1605
|
<span
|
|
1588
1606
|
id=${descId}
|
|
1589
1607
|
class=${classMap6({
|
|
1590
|
-
"description": true,
|
|
1591
|
-
"description-disabled": isDisabled
|
|
1608
|
+
"abstract-switch--description": true,
|
|
1609
|
+
"abstract-switch--description-disabled": isDisabled
|
|
1592
1610
|
})}
|
|
1593
1611
|
>
|
|
1594
1612
|
${item.description}
|
|
@@ -1596,7 +1614,7 @@ var CsRadioGroupInternal = class extends Base2 {
|
|
|
1596
1614
|
` : ""}
|
|
1597
1615
|
</span>
|
|
1598
1616
|
</span>
|
|
1599
|
-
</
|
|
1617
|
+
</span>
|
|
1600
1618
|
`;
|
|
1601
1619
|
}
|
|
1602
1620
|
};
|
|
@@ -1628,14 +1646,14 @@ var CsRadioGroup = class extends CsRadioGroupInternal {
|
|
|
1628
1646
|
customElements.define("cs-radio-group", CsRadioGroup);
|
|
1629
1647
|
|
|
1630
1648
|
// src/tiles/internal.ts
|
|
1631
|
-
import { css as
|
|
1649
|
+
import { css as css18, html as html8 } from "lit";
|
|
1632
1650
|
import { property as property9 } from "lit/decorators.js";
|
|
1633
1651
|
import { classMap as classMap7 } from "lit/directives/class-map.js";
|
|
1634
1652
|
import { ifDefined as ifDefined4 } from "lit/directives/if-defined.js";
|
|
1635
1653
|
|
|
1636
1654
|
// src/tiles/styles.ts
|
|
1637
|
-
import { css as
|
|
1638
|
-
var componentStyles7 =
|
|
1655
|
+
import { css as css17 } from "lit";
|
|
1656
|
+
var componentStyles7 = css17`
|
|
1639
1657
|
div.column-layout {
|
|
1640
1658
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
1641
1659
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -1933,7 +1951,7 @@ div.column-layout > .grid.grid-horizontal-borders.grid-columns-4.grid-breakpoint
|
|
|
1933
1951
|
|
|
1934
1952
|
// src/tiles/internal.ts
|
|
1935
1953
|
var Base3 = FormAssociatedMixin(CsBaseElement);
|
|
1936
|
-
var hostStyles7 =
|
|
1954
|
+
var hostStyles7 = css18`:host { display: block; }`;
|
|
1937
1955
|
var CsTilesInternal = class extends Base3 {
|
|
1938
1956
|
constructor() {
|
|
1939
1957
|
super(...arguments);
|
|
@@ -2008,7 +2026,7 @@ var CsTilesInternal = class extends Base3 {
|
|
|
2008
2026
|
_getRadioInputs() {
|
|
2009
2027
|
const root = this.shadowRoot;
|
|
2010
2028
|
if (!root) return [];
|
|
2011
|
-
return Array.from(root.querySelectorAll(".native-input"));
|
|
2029
|
+
return Array.from(root.querySelectorAll(".abstract-switch--native-input"));
|
|
2012
2030
|
}
|
|
2013
2031
|
_getSelectedIndex() {
|
|
2014
2032
|
return this.items.findIndex((item) => item.value === this.value);
|
|
@@ -2074,7 +2092,7 @@ var CsTilesInternal = class extends Base3 {
|
|
|
2074
2092
|
const tileClasses = {
|
|
2075
2093
|
"tile-container": true,
|
|
2076
2094
|
"refresh": true,
|
|
2077
|
-
"breakpoint-
|
|
2095
|
+
"breakpoint-xs": true,
|
|
2078
2096
|
"selected": isSelected,
|
|
2079
2097
|
"disabled": isDisabled,
|
|
2080
2098
|
"readonly": this.readOnly,
|
|
@@ -2093,25 +2111,30 @@ var CsTilesInternal = class extends Base3 {
|
|
|
2093
2111
|
}}
|
|
2094
2112
|
>
|
|
2095
2113
|
<div class=${classMap7(controlClasses)}>
|
|
2096
|
-
<span class
|
|
2097
|
-
|
|
2098
|
-
|
|
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">
|
|
2099
2122
|
<svg viewBox="0 0 100 100" aria-hidden="true">
|
|
2100
2123
|
<circle class=${classMap7({
|
|
2101
|
-
"styled-circle-border": true,
|
|
2102
|
-
"styled-circle-disabled": isDisabled,
|
|
2103
|
-
"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
|
|
2104
2127
|
})} stroke-width="6.25" cx="50" cy="50" r="46" />
|
|
2105
2128
|
<circle class=${classMap7({
|
|
2106
|
-
"styled-circle-fill": true,
|
|
2107
|
-
"styled-circle-checked": isSelected,
|
|
2108
|
-
"styled-circle-disabled": isDisabled,
|
|
2109
|
-
"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
|
|
2110
2133
|
})} stroke-width="30" cx="50" cy="50" r="35" />
|
|
2111
2134
|
</svg>
|
|
2112
2135
|
<input
|
|
2113
2136
|
type="radio"
|
|
2114
|
-
class="native-input"
|
|
2137
|
+
class="abstract-switch--native-input"
|
|
2115
2138
|
name=${groupName}
|
|
2116
2139
|
.value=${item.value}
|
|
2117
2140
|
.checked=${isSelected}
|
|
@@ -2123,14 +2146,14 @@ var CsTilesInternal = class extends Base3 {
|
|
|
2123
2146
|
@click=${(e) => e.preventDefault()}
|
|
2124
2147
|
@focus=${() => this._onFocus(index)}
|
|
2125
2148
|
/>
|
|
2126
|
-
<span class="outline"></span>
|
|
2149
|
+
<span class="abstract-switch--outline radio-button--outline"></span>
|
|
2127
2150
|
</span>
|
|
2128
|
-
<span class="content">
|
|
2151
|
+
<span class="abstract-switch--content">
|
|
2129
2152
|
<span
|
|
2130
2153
|
id=${labelId}
|
|
2131
2154
|
class=${classMap7({
|
|
2132
|
-
"label": true,
|
|
2133
|
-
"label-disabled": isDisabled
|
|
2155
|
+
"abstract-switch--label": true,
|
|
2156
|
+
"abstract-switch--label-disabled": isDisabled
|
|
2134
2157
|
})}
|
|
2135
2158
|
>
|
|
2136
2159
|
${item.label}
|
|
@@ -2139,8 +2162,8 @@ var CsTilesInternal = class extends Base3 {
|
|
|
2139
2162
|
<span
|
|
2140
2163
|
id=${descId}
|
|
2141
2164
|
class=${classMap7({
|
|
2142
|
-
"description": true,
|
|
2143
|
-
"description-disabled": isDisabled
|
|
2165
|
+
"abstract-switch--description": true,
|
|
2166
|
+
"abstract-switch--description-disabled": isDisabled
|
|
2144
2167
|
})}
|
|
2145
2168
|
>
|
|
2146
2169
|
${item.description}
|
|
@@ -2190,15 +2213,15 @@ var CsTiles = class extends CsTilesInternal {
|
|
|
2190
2213
|
customElements.define("cs-tiles", CsTiles);
|
|
2191
2214
|
|
|
2192
2215
|
// src/list/internal.ts
|
|
2193
|
-
import { css as
|
|
2216
|
+
import { css as css21, html as html9, nothing } from "lit";
|
|
2194
2217
|
import { property as property10 } from "lit/decorators.js";
|
|
2195
2218
|
import { classMap as classMap8 } from "lit/directives/class-map.js";
|
|
2196
2219
|
import { ifDefined as ifDefined5 } from "lit/directives/if-defined.js";
|
|
2197
2220
|
import { repeat } from "lit/directives/repeat.js";
|
|
2198
2221
|
|
|
2199
2222
|
// src/list/styles.ts
|
|
2200
|
-
import { css as
|
|
2201
|
-
var componentStyles8 =
|
|
2223
|
+
import { css as css19 } from "lit";
|
|
2224
|
+
var componentStyles8 = css19`
|
|
2202
2225
|
.root {
|
|
2203
2226
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
2204
2227
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -2238,9 +2261,9 @@ var componentStyles8 = css18`
|
|
|
2238
2261
|
`;
|
|
2239
2262
|
|
|
2240
2263
|
// src/internal/styles/structured-item.ts
|
|
2241
|
-
import { css as
|
|
2242
|
-
var structuredItemStyles =
|
|
2243
|
-
.root {
|
|
2264
|
+
import { css as css20 } from "lit";
|
|
2265
|
+
var structuredItemStyles = css20`
|
|
2266
|
+
.structured-item--root {
|
|
2244
2267
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
2245
2268
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
2246
2269
|
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
@@ -2256,44 +2279,44 @@ var structuredItemStyles = css19`
|
|
|
2256
2279
|
align-items: baseline;
|
|
2257
2280
|
column-gap: var(--space-xs-ymlm0b, 8px);
|
|
2258
2281
|
}
|
|
2259
|
-
.root.disable-paddings {
|
|
2282
|
+
.structured-item--root.structured-item--disable-paddings {
|
|
2260
2283
|
column-gap: 0;
|
|
2261
2284
|
}
|
|
2262
2285
|
|
|
2263
|
-
.main {
|
|
2286
|
+
.structured-item--main {
|
|
2264
2287
|
flex-grow: 1;
|
|
2265
2288
|
display: flex;
|
|
2266
2289
|
flex-direction: column;
|
|
2267
2290
|
min-inline-size: 0;
|
|
2268
2291
|
}
|
|
2269
2292
|
|
|
2270
|
-
.content-wrap {
|
|
2293
|
+
.structured-item--content-wrap {
|
|
2271
2294
|
flex-grow: 1;
|
|
2272
2295
|
display: flex;
|
|
2273
2296
|
align-items: baseline;
|
|
2274
2297
|
flex-direction: row;
|
|
2275
2298
|
column-gap: var(--space-xs-ymlm0b, 8px);
|
|
2276
2299
|
}
|
|
2277
|
-
.disable-paddings > .main > .content-wrap {
|
|
2300
|
+
.structured-item--disable-paddings > .structured-item--main > .structured-item--content-wrap {
|
|
2278
2301
|
column-gap: 0;
|
|
2279
2302
|
}
|
|
2280
|
-
.content-wrap.wrap-actions {
|
|
2303
|
+
.structured-item--content-wrap.structured-item--wrap-actions {
|
|
2281
2304
|
flex-wrap: wrap;
|
|
2282
2305
|
}
|
|
2283
2306
|
|
|
2284
|
-
.content {
|
|
2307
|
+
.structured-item--content {
|
|
2285
2308
|
flex-grow: 1;
|
|
2286
2309
|
min-inline-size: 0;
|
|
2287
2310
|
}
|
|
2288
2311
|
|
|
2289
|
-
.actions {
|
|
2312
|
+
.structured-item--actions {
|
|
2290
2313
|
flex-shrink: 0;
|
|
2291
2314
|
margin-inline-start: auto;
|
|
2292
2315
|
}
|
|
2293
2316
|
`;
|
|
2294
2317
|
|
|
2295
2318
|
// src/list/internal.ts
|
|
2296
|
-
var hostStyles8 =
|
|
2319
|
+
var hostStyles8 = css21`:host { display: block; }`;
|
|
2297
2320
|
var CsListInternal = class extends CsBaseElement {
|
|
2298
2321
|
constructor() {
|
|
2299
2322
|
super(...arguments);
|
|
@@ -2315,14 +2338,25 @@ var CsListInternal = class extends CsBaseElement {
|
|
|
2315
2338
|
"disable-item-paddings": this.disableItemPaddings,
|
|
2316
2339
|
"disable-paddings": this.disablePaddings
|
|
2317
2340
|
};
|
|
2341
|
+
const structuredRootClasses = {
|
|
2342
|
+
"structured-item--root": true,
|
|
2343
|
+
"structured-item--disable-paddings": this.disableItemPaddings
|
|
2344
|
+
};
|
|
2345
|
+
const hasActions = !!rendered.actions;
|
|
2318
2346
|
return html9`
|
|
2319
2347
|
<li class=${classMap8(itemClasses)} data-item-id=${rendered.id}>
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
<
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
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>
|
|
2326
2360
|
</li>
|
|
2327
2361
|
`;
|
|
2328
2362
|
}
|
|
@@ -2401,14 +2435,14 @@ var CsList = class extends CsListInternal {
|
|
|
2401
2435
|
customElements.define("cs-list", CsList);
|
|
2402
2436
|
|
|
2403
2437
|
// src/tree-view/internal.ts
|
|
2404
|
-
import { css as
|
|
2438
|
+
import { css as css26, html as html10, nothing as nothing2 } from "lit";
|
|
2405
2439
|
import { property as property11 } from "lit/decorators.js";
|
|
2406
2440
|
import { classMap as classMap9 } from "lit/directives/class-map.js";
|
|
2407
2441
|
import { ifDefined as ifDefined6 } from "lit/directives/if-defined.js";
|
|
2408
2442
|
|
|
2409
2443
|
// src/tree-view/styles.ts
|
|
2410
|
-
import { css as
|
|
2411
|
-
var componentStyles9 =
|
|
2444
|
+
import { css as css22 } from "lit";
|
|
2445
|
+
var componentStyles9 = css22`
|
|
2412
2446
|
.root {
|
|
2413
2447
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
2414
2448
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -2433,8 +2467,188 @@ var componentStyles9 = css21`
|
|
|
2433
2467
|
}
|
|
2434
2468
|
`;
|
|
2435
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
|
+
|
|
2436
2650
|
// src/tree-view/internal.ts
|
|
2437
|
-
var hostStyles9 =
|
|
2651
|
+
var hostStyles9 = css26`:host { display: block; }`;
|
|
2438
2652
|
var CsTreeViewInternal = class extends CsBaseElement {
|
|
2439
2653
|
constructor() {
|
|
2440
2654
|
super(...arguments);
|
|
@@ -2445,7 +2659,7 @@ var CsTreeViewInternal = class extends CsBaseElement {
|
|
|
2445
2659
|
this._expandedSet = /* @__PURE__ */ new Set();
|
|
2446
2660
|
}
|
|
2447
2661
|
static {
|
|
2448
|
-
this.styles = [sharedStyles, componentStyles9, hostStyles9];
|
|
2662
|
+
this.styles = [sharedStyles, componentStyles9, treeViewTreeItemStyles, expandToggleButtonStyles, treeViewVerticalConnectorStyles, structuredItemStyles, hostStyles9];
|
|
2449
2663
|
}
|
|
2450
2664
|
willUpdate(changed) {
|
|
2451
2665
|
if (changed.has("expandedItems")) {
|
|
@@ -2463,55 +2677,77 @@ var CsTreeViewInternal = class extends CsBaseElement {
|
|
|
2463
2677
|
if (this.renderItemToggleIcon) {
|
|
2464
2678
|
return html10`${this.renderItemToggleIcon({ expanded })}`;
|
|
2465
2679
|
}
|
|
2466
|
-
const iconClasses = {
|
|
2467
|
-
"toggle-icon": true,
|
|
2468
|
-
"toggle-icon--expanded": expanded
|
|
2469
|
-
};
|
|
2470
2680
|
return html10`
|
|
2471
|
-
<
|
|
2472
|
-
|
|
2473
|
-
|
|
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>
|
|
2474
2693
|
`;
|
|
2475
2694
|
}
|
|
2476
|
-
_renderNode(item, index, level) {
|
|
2695
|
+
_renderNode(item, index, level, globalIndex) {
|
|
2477
2696
|
if (!this.renderItem || !this.getItemId || !this.getItemChildren) return html10``;
|
|
2478
2697
|
const id = this.getItemId(item, index);
|
|
2479
2698
|
const rendered = this.renderItem(item, index);
|
|
2480
2699
|
const children = this.getItemChildren(item, index);
|
|
2481
2700
|
const hasChildren = children !== void 0 && children.length > 0;
|
|
2482
2701
|
const expanded = this._isExpanded(id);
|
|
2483
|
-
|
|
2484
|
-
const
|
|
2485
|
-
const childrenClasses = {
|
|
2486
|
-
"tree": true,
|
|
2487
|
-
"tree--hidden": !expanded
|
|
2488
|
-
};
|
|
2702
|
+
globalIndex.value++;
|
|
2703
|
+
const contentLabel = typeof rendered.content === "string" ? rendered.content : id;
|
|
2489
2704
|
return html10`
|
|
2490
2705
|
<li
|
|
2491
|
-
class
|
|
2706
|
+
class=${classMap9({ "treeitem": true, "offset": level > 0, "expandable": hasChildren, "expanded": hasChildren && expanded })}
|
|
2492
2707
|
role="treeitem"
|
|
2493
2708
|
aria-expanded=${hasChildren ? String(expanded) : nothing2}
|
|
2709
|
+
aria-level=${level + 1}
|
|
2494
2710
|
data-node-id=${id}
|
|
2495
2711
|
>
|
|
2496
|
-
<div class="
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
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>
|
|
2511
2747
|
</div>
|
|
2512
|
-
${hasChildren ? html10`
|
|
2513
|
-
<ul class
|
|
2514
|
-
${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))}
|
|
2515
2751
|
</ul>
|
|
2516
2752
|
` : nothing2}
|
|
2517
2753
|
</li>
|
|
@@ -2521,19 +2757,21 @@ var CsTreeViewInternal = class extends CsBaseElement {
|
|
|
2521
2757
|
if (!this.renderItem || !this.getItemId || !this.getItemChildren) return nothing2;
|
|
2522
2758
|
const rootClasses = {
|
|
2523
2759
|
"root": true,
|
|
2524
|
-
"tree": true,
|
|
2525
2760
|
"root--connector-lines": this.connectorLines === "vertical"
|
|
2526
2761
|
};
|
|
2762
|
+
const globalIndex = { value: 0 };
|
|
2527
2763
|
return html10`
|
|
2528
|
-
<
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
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>
|
|
2537
2775
|
`;
|
|
2538
2776
|
}
|
|
2539
2777
|
};
|
|
@@ -2577,13 +2815,13 @@ var CsTreeView = class extends CsTreeViewInternal {
|
|
|
2577
2815
|
customElements.define("cs-tree-view", CsTreeView);
|
|
2578
2816
|
|
|
2579
2817
|
// src/box/internal.ts
|
|
2580
|
-
import { css as
|
|
2818
|
+
import { css as css28, html as html11 } from "lit";
|
|
2581
2819
|
import { property as property12 } from "lit/decorators.js";
|
|
2582
2820
|
import { classMap as classMap10 } from "lit/directives/class-map.js";
|
|
2583
2821
|
|
|
2584
2822
|
// src/box/styles.ts
|
|
2585
|
-
import { css as
|
|
2586
|
-
var componentStyles10 =
|
|
2823
|
+
import { css as css27 } from "lit";
|
|
2824
|
+
var componentStyles10 = css27`
|
|
2587
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 {
|
|
2588
2826
|
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
2589
2827
|
}
|
|
@@ -3391,7 +3629,7 @@ function spacingClasses(prefix, value) {
|
|
|
3391
3629
|
}
|
|
3392
3630
|
return {};
|
|
3393
3631
|
}
|
|
3394
|
-
var hostStyles10 =
|
|
3632
|
+
var hostStyles10 = css28`
|
|
3395
3633
|
:host { display: block; }
|
|
3396
3634
|
:host([display="inline"]) { display: inline; }
|
|
3397
3635
|
:host([display="inline-block"]) { display: inline-block; }
|
|
@@ -3408,14 +3646,15 @@ var CsBoxInternal = class extends CsBaseElement {
|
|
|
3408
3646
|
render() {
|
|
3409
3647
|
const tag = this.tagOverride || VARIANT_TAG_MAP[this.variant] || "div";
|
|
3410
3648
|
const classes = {
|
|
3649
|
+
"root": true,
|
|
3411
3650
|
"box": true,
|
|
3412
3651
|
[variantCssClass(this.variant)]: true,
|
|
3413
3652
|
...this.display ? { [`d-${this.display}`]: true } : {},
|
|
3414
3653
|
...this.textAlign ? { [`t-${this.textAlign}`]: true } : {},
|
|
3415
3654
|
...this.float ? { [`f-${this.float}`]: true } : {},
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3655
|
+
[`font-size-${this.fontSize || "default"}`]: true,
|
|
3656
|
+
[`font-weight-${this.fontWeight || "default"}`]: true,
|
|
3657
|
+
[`color-${this.color || "default"}`]: true,
|
|
3419
3658
|
...spacingClasses("m", this.margin),
|
|
3420
3659
|
...spacingClasses("p", this.padding)
|
|
3421
3660
|
};
|
|
@@ -3491,13 +3730,13 @@ var CsBox = class extends CsBoxInternal {
|
|
|
3491
3730
|
customElements.define("cs-box", CsBox);
|
|
3492
3731
|
|
|
3493
3732
|
// src/grid/internal.ts
|
|
3494
|
-
import { css as
|
|
3733
|
+
import { css as css30, html as html12 } from "lit";
|
|
3495
3734
|
import { property as property13, state } from "lit/decorators.js";
|
|
3496
3735
|
import { classMap as classMap11 } from "lit/directives/class-map.js";
|
|
3497
3736
|
|
|
3498
3737
|
// src/grid/styles.ts
|
|
3499
|
-
import { css as
|
|
3500
|
-
var componentStyles11 =
|
|
3738
|
+
import { css as css29 } from "lit";
|
|
3739
|
+
var componentStyles11 = css29`
|
|
3501
3740
|
.grid {
|
|
3502
3741
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
3503
3742
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -3700,7 +3939,7 @@ function resolveNumericValue(value, defaultValue) {
|
|
|
3700
3939
|
if (typeof value === "number") return value;
|
|
3701
3940
|
return value.default ?? defaultValue;
|
|
3702
3941
|
}
|
|
3703
|
-
var hostStyles11 =
|
|
3942
|
+
var hostStyles11 = css30`:host { display: block; }`;
|
|
3704
3943
|
var CsGridInternal = class extends CsBaseElement {
|
|
3705
3944
|
constructor() {
|
|
3706
3945
|
super(...arguments);
|
|
@@ -3783,13 +4022,13 @@ var CsGrid = class extends CsGridInternal {
|
|
|
3783
4022
|
customElements.define("cs-grid", CsGrid);
|
|
3784
4023
|
|
|
3785
4024
|
// src/space-between/internal.ts
|
|
3786
|
-
import { css as
|
|
4025
|
+
import { css as css32, html as html13 } from "lit";
|
|
3787
4026
|
import { property as property14 } from "lit/decorators.js";
|
|
3788
4027
|
import { classMap as classMap12 } from "lit/directives/class-map.js";
|
|
3789
4028
|
|
|
3790
4029
|
// src/space-between/styles.ts
|
|
3791
|
-
import { css as
|
|
3792
|
-
var componentStyles12 =
|
|
4030
|
+
import { css as css31 } from "lit";
|
|
4031
|
+
var componentStyles12 = css31`
|
|
3793
4032
|
.root {
|
|
3794
4033
|
display: flex;
|
|
3795
4034
|
}
|
|
@@ -3875,7 +4114,12 @@ var componentStyles12 = css27`
|
|
|
3875
4114
|
`;
|
|
3876
4115
|
|
|
3877
4116
|
// src/space-between/internal.ts
|
|
3878
|
-
var hostStyles12 =
|
|
4117
|
+
var hostStyles12 = css32`
|
|
4118
|
+
:host { display: block; }
|
|
4119
|
+
::slotted(*) {
|
|
4120
|
+
/* Mirrors .child styles from Cloudscape's space-between CSS */
|
|
4121
|
+
}
|
|
4122
|
+
`;
|
|
3879
4123
|
var CsSpaceBetweenInternal = class extends CsBaseElement {
|
|
3880
4124
|
constructor() {
|
|
3881
4125
|
super(...arguments);
|
|
@@ -3917,11 +4161,11 @@ var CsSpaceBetween = class extends CsSpaceBetweenInternal {
|
|
|
3917
4161
|
customElements.define("cs-space-between", CsSpaceBetween);
|
|
3918
4162
|
|
|
3919
4163
|
// src/text-content/internal.ts
|
|
3920
|
-
import { css as
|
|
4164
|
+
import { css as css34, html as html14 } from "lit";
|
|
3921
4165
|
|
|
3922
4166
|
// src/text-content/styles.ts
|
|
3923
|
-
import { css as
|
|
3924
|
-
var componentStyles13 =
|
|
4167
|
+
import { css as css33 } from "lit";
|
|
4168
|
+
var componentStyles13 = css33`
|
|
3925
4169
|
.text-content {
|
|
3926
4170
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
3927
4171
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -4145,7 +4389,7 @@ var componentStyles13 = css29`
|
|
|
4145
4389
|
`;
|
|
4146
4390
|
|
|
4147
4391
|
// src/text-content/internal.ts
|
|
4148
|
-
var hostStyles13 =
|
|
4392
|
+
var hostStyles13 = css34`:host { display: block; }`;
|
|
4149
4393
|
var CsTextContentInternal = class extends CsBaseElement {
|
|
4150
4394
|
static {
|
|
4151
4395
|
this.styles = [sharedStyles, componentStyles13, hostStyles13];
|
|
@@ -4165,13 +4409,13 @@ var CsTextContent = class extends CsTextContentInternal {
|
|
|
4165
4409
|
customElements.define("cs-text-content", CsTextContent);
|
|
4166
4410
|
|
|
4167
4411
|
// src/file-dropzone/internal.ts
|
|
4168
|
-
import { css as
|
|
4412
|
+
import { css as css36, html as html15 } from "lit";
|
|
4169
4413
|
import { state as state2 } from "lit/decorators.js";
|
|
4170
4414
|
import { classMap as classMap13 } from "lit/directives/class-map.js";
|
|
4171
4415
|
|
|
4172
4416
|
// src/file-dropzone/styles.ts
|
|
4173
|
-
import { css as
|
|
4174
|
-
var componentStyles14 =
|
|
4417
|
+
import { css as css35 } from "lit";
|
|
4418
|
+
var componentStyles14 = css35`
|
|
4175
4419
|
.root {
|
|
4176
4420
|
padding-block: var(--space-static-l-n53k41, 20px);
|
|
4177
4421
|
padding-inline: var(--space-static-l-n53k41, 20px);
|
|
@@ -4202,7 +4446,7 @@ var componentStyles14 = css31`
|
|
|
4202
4446
|
`;
|
|
4203
4447
|
|
|
4204
4448
|
// src/file-dropzone/internal.ts
|
|
4205
|
-
var hostStyles14 =
|
|
4449
|
+
var hostStyles14 = css36`:host { display: block; }`;
|
|
4206
4450
|
var CsFileDropzoneInternal = class extends CsBaseElement {
|
|
4207
4451
|
constructor() {
|
|
4208
4452
|
super(...arguments);
|
|
@@ -4267,7 +4511,9 @@ var CsFileDropzoneInternal = class extends CsBaseElement {
|
|
|
4267
4511
|
@dragleave=${this._onDragLeave}
|
|
4268
4512
|
@drop=${this._onDrop}
|
|
4269
4513
|
>
|
|
4270
|
-
<
|
|
4514
|
+
<div class="content">
|
|
4515
|
+
<slot></slot>
|
|
4516
|
+
</div>
|
|
4271
4517
|
</div>
|
|
4272
4518
|
`;
|
|
4273
4519
|
}
|
|
@@ -4282,14 +4528,14 @@ var CsFileDropzone = class extends CsFileDropzoneInternal {
|
|
|
4282
4528
|
customElements.define("cs-file-dropzone", CsFileDropzone);
|
|
4283
4529
|
|
|
4284
4530
|
// src/anchor-navigation/internal.ts
|
|
4285
|
-
import { css as
|
|
4531
|
+
import { css as css38, html as html16, nothing as nothing3 } from "lit";
|
|
4286
4532
|
import { property as property15, state as state3 } from "lit/decorators.js";
|
|
4287
4533
|
import { classMap as classMap14 } from "lit/directives/class-map.js";
|
|
4288
4534
|
import { ifDefined as ifDefined7 } from "lit/directives/if-defined.js";
|
|
4289
4535
|
|
|
4290
4536
|
// src/anchor-navigation/styles.ts
|
|
4291
|
-
import { css as
|
|
4292
|
-
var componentStyles15 =
|
|
4537
|
+
import { css as css37 } from "lit";
|
|
4538
|
+
var componentStyles15 = css37`
|
|
4293
4539
|
.root {
|
|
4294
4540
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
4295
4541
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
@@ -4427,7 +4673,7 @@ var componentStyles15 = css33`
|
|
|
4427
4673
|
`;
|
|
4428
4674
|
|
|
4429
4675
|
// src/anchor-navigation/internal.ts
|
|
4430
|
-
var hostStyles15 =
|
|
4676
|
+
var hostStyles15 = css38`:host { display: block; }`;
|
|
4431
4677
|
var CsAnchorNavigationInternal = class extends CsBaseElement {
|
|
4432
4678
|
constructor() {
|
|
4433
4679
|
super(...arguments);
|
|
@@ -4516,38 +4762,76 @@ var CsAnchorNavigationInternal = class extends CsBaseElement {
|
|
|
4516
4762
|
_onAnchorClick(_e, anchor) {
|
|
4517
4763
|
fireNonCancelableEvent(this, "follow", anchor);
|
|
4518
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
|
+
}
|
|
4519
4798
|
render() {
|
|
4799
|
+
const groups = this._buildTree(this.anchors);
|
|
4520
4800
|
return html16`
|
|
4521
4801
|
<nav
|
|
4522
4802
|
class="root"
|
|
4523
4803
|
aria-labelledby=${ifDefined7(this.ariaLabelledby)}
|
|
4524
4804
|
>
|
|
4525
|
-
<
|
|
4526
|
-
${
|
|
4805
|
+
<ol class="anchor-list" role="list">
|
|
4806
|
+
${groups.map(({ anchor, children }) => {
|
|
4527
4807
|
const isActive = this._currentHref === anchor.href;
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
"anchor-link--active": isActive
|
|
4532
|
-
};
|
|
4808
|
+
if (children.length === 0) {
|
|
4809
|
+
return this._renderAnchorLink(anchor);
|
|
4810
|
+
}
|
|
4533
4811
|
return html16`
|
|
4534
4812
|
<li class=${classMap14({
|
|
4535
4813
|
"anchor-item": true,
|
|
4536
4814
|
"anchor-item--active": isActive
|
|
4537
|
-
})}
|
|
4815
|
+
})}>
|
|
4538
4816
|
<a
|
|
4539
|
-
class=${classMap14(
|
|
4817
|
+
class=${classMap14({
|
|
4818
|
+
"anchor-link": true,
|
|
4819
|
+
"anchor-link--active": isActive
|
|
4820
|
+
})}
|
|
4540
4821
|
href=${anchor.href}
|
|
4541
4822
|
aria-current=${ifDefined7(isActive ? "location" : void 0)}
|
|
4542
4823
|
@click=${(e) => this._onAnchorClick(e, anchor)}
|
|
4543
4824
|
>
|
|
4544
4825
|
<span class="anchor-link-text">${anchor.text}</span>
|
|
4545
|
-
${anchor.info ? html16`<span class="anchor-link-info">${anchor.info}</span>` :
|
|
4826
|
+
${anchor.info ? html16`<span class="anchor-link-info">${anchor.info}</span>` : nothing3}
|
|
4546
4827
|
</a>
|
|
4828
|
+
<ol class="anchor-list">
|
|
4829
|
+
${children.map((child) => this._renderAnchorLink(child))}
|
|
4830
|
+
</ol>
|
|
4547
4831
|
</li>
|
|
4548
4832
|
`;
|
|
4549
4833
|
})}
|
|
4550
|
-
</
|
|
4834
|
+
</ol>
|
|
4551
4835
|
</nav>
|
|
4552
4836
|
`;
|
|
4553
4837
|
}
|