@cumulus-ui/components 0.1.2 → 0.1.3
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/checkbox/internal.d.ts +1 -0
- package/dist/checkbox/internal.d.ts.map +1 -1
- package/dist/index.js +172 -132
- package/dist/list/internal.d.ts +3 -3
- package/dist/list/internal.d.ts.map +1 -1
- package/dist/radio-group/internal.d.ts.map +1 -1
- package/dist/tiles/internal.d.ts.map +1 -1
- package/dist/tree-view/internal.d.ts +3 -3
- package/dist/tree-view/internal.d.ts.map +1 -1
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/checkbox/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAI1D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAQ5D,QAAA,MAAM,IAAI,qHAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/checkbox/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAI1D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAQ5D,QAAA,MAAM,IAAI,qHAAqC,CAAC;AAuChD,qBAAa,kBAAmB,SAAQ,IAAI;IAC1C,OAAgB,MAAM,4BAAqE;IAG3F,OAAO,UAAS;IAGhB,aAAa,UAAS;IAGtB,QAAQ,UAAS;IAGjB,WAAW,SAAM;IAGjB,SAAS,SAAM;IAGN,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE5C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsC;IAC/D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAqC;IAE3D,iBAAiB,IAAI,IAAI;IAQzB,oBAAoB,IAAI,IAAI;IAK5B,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAQlD,OAAO,CAAC,YAAY,CAElB;IAEF,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,OAAO;IAaN,MAAM;CAsEhB"}
|
package/dist/index.js
CHANGED
|
@@ -291,7 +291,6 @@ var abstractSwitchStyles = css3`
|
|
|
291
291
|
var Base = FormAssociatedMixin(CsBaseElement);
|
|
292
292
|
var hostStyles = css4`
|
|
293
293
|
:host { display: block; }
|
|
294
|
-
.label-wrapper { flex-direction: column; }
|
|
295
294
|
.checkbox-icon {
|
|
296
295
|
position: absolute;
|
|
297
296
|
inline-size: 100%;
|
|
@@ -334,6 +333,7 @@ var CsCheckboxInternal = class extends Base {
|
|
|
334
333
|
this.readOnly = false;
|
|
335
334
|
this.description = "";
|
|
336
335
|
this.ariaLabel = "";
|
|
336
|
+
this.ariaRequired = null;
|
|
337
337
|
this._labelId = generateUniqueId("checkbox-label");
|
|
338
338
|
this._descriptionId = generateUniqueId("checkbox-desc");
|
|
339
339
|
this._onHostClick = () => {
|
|
@@ -390,43 +390,46 @@ var CsCheckboxInternal = class extends Base {
|
|
|
390
390
|
const ariaDescribedBy = hasDescription ? this._descriptionId : void 0;
|
|
391
391
|
return html`
|
|
392
392
|
<label class="root wrapper" @click=${this._preventNativeToggle}>
|
|
393
|
-
<span class
|
|
393
|
+
<span class="label-wrapper">
|
|
394
|
+
<span class=${classMap({
|
|
394
395
|
"control": true,
|
|
395
396
|
"checkbox-control": true,
|
|
396
397
|
"checkbox-control--checked": this.checked && !this.indeterminate,
|
|
397
398
|
"checkbox-control--indeterminate": this.indeterminate
|
|
398
399
|
})}>
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
<span
|
|
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>
|
|
401
|
+
<input
|
|
402
|
+
type="checkbox"
|
|
403
|
+
class="native-input"
|
|
404
|
+
.checked=${this.checked}
|
|
405
|
+
.indeterminate=${this.indeterminate}
|
|
406
|
+
?disabled=${this.disabled}
|
|
407
|
+
?readonly=${this.readOnly}
|
|
408
|
+
aria-label=${ifDefined(this.ariaLabel || void 0)}
|
|
409
|
+
aria-required=${ifDefined(this.ariaRequired || void 0)}
|
|
410
|
+
aria-describedby=${ifDefined(ariaDescribedBy)}
|
|
411
|
+
aria-checked=${this.indeterminate ? "mixed" : this.checked}
|
|
412
|
+
@click=${this._preventNativeToggle}
|
|
413
|
+
/>
|
|
414
|
+
<span class="outline"></span>
|
|
415
|
+
</span>
|
|
416
|
+
<span class="content">
|
|
417
|
+
<span id=${this._labelId} class=${classMap({
|
|
416
418
|
"label": true,
|
|
417
419
|
"label-disabled": this.disabled
|
|
418
420
|
})}>
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
<slot></slot>
|
|
422
|
+
</span>
|
|
423
|
+
${hasDescription ? html`
|
|
424
|
+
<span id=${this._descriptionId} class=${classMap({
|
|
423
425
|
"description": true,
|
|
424
426
|
"description-bottom-padding": true,
|
|
425
427
|
"description-disabled": this.disabled
|
|
426
428
|
})}>
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
429
|
+
${this.description}
|
|
430
|
+
</span>
|
|
431
|
+
` : ""}
|
|
432
|
+
</span>
|
|
430
433
|
</span>
|
|
431
434
|
</label>
|
|
432
435
|
`;
|
|
@@ -447,6 +450,9 @@ __decorateClass([
|
|
|
447
450
|
__decorateClass([
|
|
448
451
|
property2({ type: String })
|
|
449
452
|
], CsCheckboxInternal.prototype, "ariaLabel", 2);
|
|
453
|
+
__decorateClass([
|
|
454
|
+
property2({ type: String })
|
|
455
|
+
], CsCheckboxInternal.prototype, "ariaRequired", 2);
|
|
450
456
|
|
|
451
457
|
// src/checkbox/index.ts
|
|
452
458
|
var CsCheckbox = class extends CsCheckboxInternal {
|
|
@@ -1256,7 +1262,7 @@ __decorateClass([
|
|
|
1256
1262
|
property7({ type: String })
|
|
1257
1263
|
], CsIconInternal.prototype, "alt", 2);
|
|
1258
1264
|
__decorateClass([
|
|
1259
|
-
property7({ type: String
|
|
1265
|
+
property7({ type: String })
|
|
1260
1266
|
], CsIconInternal.prototype, "ariaLabel", 2);
|
|
1261
1267
|
__decorateClass([
|
|
1262
1268
|
consume({ context: iconProviderContext, subscribe: true })
|
|
@@ -1524,16 +1530,13 @@ var CsRadioGroupInternal = class extends Base2 {
|
|
|
1524
1530
|
const descId = item.description ? `${itemId}-desc` : void 0;
|
|
1525
1531
|
const itemClasses = {
|
|
1526
1532
|
"radio": true,
|
|
1533
|
+
"wrapper": true,
|
|
1527
1534
|
"radio--has-description": !!item.description,
|
|
1528
|
-
"horizontal": this.direction === "horizontal"
|
|
1529
|
-
"radio--checked": isChecked,
|
|
1530
|
-
"radio--disabled": isDisabled,
|
|
1531
|
-
"radio--readonly": this.readOnly
|
|
1535
|
+
"horizontal": this.direction === "horizontal"
|
|
1532
1536
|
};
|
|
1533
1537
|
const controlClasses = {
|
|
1534
|
-
"
|
|
1535
|
-
"radio-control
|
|
1536
|
-
"radio-control--disabled": isDisabled
|
|
1538
|
+
"control": true,
|
|
1539
|
+
"radio-control": true
|
|
1537
1540
|
};
|
|
1538
1541
|
return html7`
|
|
1539
1542
|
<label
|
|
@@ -1543,40 +1546,55 @@ var CsRadioGroupInternal = class extends Base2 {
|
|
|
1543
1546
|
this._onItemClick(item);
|
|
1544
1547
|
}}
|
|
1545
1548
|
>
|
|
1546
|
-
<
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1549
|
+
<span class="label-wrapper">
|
|
1550
|
+
<span class=${classMap6(controlClasses)}>
|
|
1551
|
+
<svg viewBox="0 0 100 100" aria-hidden="true">
|
|
1552
|
+
<circle class=${classMap6({
|
|
1553
|
+
"styled-circle-border": true,
|
|
1554
|
+
"styled-circle-disabled": isDisabled,
|
|
1555
|
+
"styled-circle-readonly": this.readOnly
|
|
1556
|
+
})} stroke-width="6.25" cx="50" cy="50" r="46" />
|
|
1557
|
+
<circle class=${classMap6({
|
|
1558
|
+
"styled-circle-fill": true,
|
|
1559
|
+
"styled-circle-checked": isChecked,
|
|
1560
|
+
"styled-circle-disabled": isDisabled,
|
|
1561
|
+
"styled-circle-readonly": this.readOnly
|
|
1562
|
+
})} stroke-width="30" cx="50" cy="50" r="35" />
|
|
1563
|
+
</svg>
|
|
1564
|
+
<input
|
|
1565
|
+
type="radio"
|
|
1566
|
+
class="native-input"
|
|
1567
|
+
name=${groupName}
|
|
1568
|
+
.value=${item.value}
|
|
1569
|
+
.checked=${isChecked}
|
|
1570
|
+
?disabled=${isDisabled}
|
|
1571
|
+
?readonly=${this.readOnly}
|
|
1572
|
+
tabindex=${this._getTabIndex(index)}
|
|
1573
|
+
aria-describedby=${ifDefined3(descId)}
|
|
1574
|
+
@click=${(e) => e.preventDefault()}
|
|
1575
|
+
@focus=${() => this._onFocus(index)}
|
|
1576
|
+
/>
|
|
1577
|
+
<span class="outline"></span>
|
|
1568
1578
|
</span>
|
|
1569
|
-
|
|
1570
|
-
<span
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
})}
|
|
1576
|
-
>
|
|
1577
|
-
${item.description}
|
|
1579
|
+
<span class="content">
|
|
1580
|
+
<span class=${classMap6({
|
|
1581
|
+
"label": true,
|
|
1582
|
+
"label-disabled": isDisabled
|
|
1583
|
+
})}>
|
|
1584
|
+
${item.label}
|
|
1578
1585
|
</span>
|
|
1579
|
-
|
|
1586
|
+
${item.description ? html7`
|
|
1587
|
+
<span
|
|
1588
|
+
id=${descId}
|
|
1589
|
+
class=${classMap6({
|
|
1590
|
+
"description": true,
|
|
1591
|
+
"description-disabled": isDisabled
|
|
1592
|
+
})}
|
|
1593
|
+
>
|
|
1594
|
+
${item.description}
|
|
1595
|
+
</span>
|
|
1596
|
+
` : ""}
|
|
1597
|
+
</span>
|
|
1580
1598
|
</span>
|
|
1581
1599
|
</label>
|
|
1582
1600
|
`;
|
|
@@ -1589,13 +1607,13 @@ __decorateClass([
|
|
|
1589
1607
|
property8({ type: Array })
|
|
1590
1608
|
], CsRadioGroupInternal.prototype, "items", 2);
|
|
1591
1609
|
__decorateClass([
|
|
1592
|
-
property8({ type: String, attribute: "
|
|
1610
|
+
property8({ type: String, attribute: "aria-label" })
|
|
1593
1611
|
], CsRadioGroupInternal.prototype, "controlAriaLabel", 2);
|
|
1594
1612
|
__decorateClass([
|
|
1595
|
-
property8({ type: Boolean, attribute: "
|
|
1613
|
+
property8({ type: Boolean, attribute: "aria-required" })
|
|
1596
1614
|
], CsRadioGroupInternal.prototype, "controlAriaRequired", 2);
|
|
1597
1615
|
__decorateClass([
|
|
1598
|
-
property8({ type: String, attribute: "
|
|
1616
|
+
property8({ type: String, attribute: "aria-controls" })
|
|
1599
1617
|
], CsRadioGroupInternal.prototype, "controlAriaControls", 2);
|
|
1600
1618
|
__decorateClass([
|
|
1601
1619
|
property8({ type: Boolean, reflect: true })
|
|
@@ -2056,10 +2074,11 @@ var CsTilesInternal = class extends Base3 {
|
|
|
2056
2074
|
const tileClasses = {
|
|
2057
2075
|
"tile-container": true,
|
|
2058
2076
|
"refresh": true,
|
|
2077
|
+
"breakpoint-xxs": true,
|
|
2059
2078
|
"selected": isSelected,
|
|
2060
2079
|
"disabled": isDisabled,
|
|
2061
2080
|
"readonly": this.readOnly,
|
|
2062
|
-
"has-metadata": !!item.image
|
|
2081
|
+
"has-metadata": !!item.description || !!item.image
|
|
2063
2082
|
};
|
|
2064
2083
|
const controlClasses = {
|
|
2065
2084
|
"control": true,
|
|
@@ -2074,40 +2093,61 @@ var CsTilesInternal = class extends Base3 {
|
|
|
2074
2093
|
}}
|
|
2075
2094
|
>
|
|
2076
2095
|
<div class=${classMap7(controlClasses)}>
|
|
2077
|
-
<
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2096
|
+
<span class="wrapper">
|
|
2097
|
+
<span class="label-wrapper">
|
|
2098
|
+
<span class="control radio-control">
|
|
2099
|
+
<svg viewBox="0 0 100 100" aria-hidden="true">
|
|
2100
|
+
<circle class=${classMap7({
|
|
2101
|
+
"styled-circle-border": true,
|
|
2102
|
+
"styled-circle-disabled": isDisabled,
|
|
2103
|
+
"styled-circle-readonly": this.readOnly
|
|
2104
|
+
})} stroke-width="6.25" cx="50" cy="50" r="46" />
|
|
2105
|
+
<circle class=${classMap7({
|
|
2106
|
+
"styled-circle-fill": true,
|
|
2107
|
+
"styled-circle-checked": isSelected,
|
|
2108
|
+
"styled-circle-disabled": isDisabled,
|
|
2109
|
+
"styled-circle-readonly": this.readOnly
|
|
2110
|
+
})} stroke-width="30" cx="50" cy="50" r="35" />
|
|
2111
|
+
</svg>
|
|
2112
|
+
<input
|
|
2113
|
+
type="radio"
|
|
2114
|
+
class="native-input"
|
|
2115
|
+
name=${groupName}
|
|
2116
|
+
.value=${item.value}
|
|
2117
|
+
.checked=${isSelected}
|
|
2118
|
+
?disabled=${isDisabled}
|
|
2119
|
+
?readonly=${this.readOnly}
|
|
2120
|
+
tabindex=${this._getTabIndex(index)}
|
|
2121
|
+
aria-labelledby=${labelId}
|
|
2122
|
+
aria-describedby=${ifDefined4(descId)}
|
|
2123
|
+
@click=${(e) => e.preventDefault()}
|
|
2124
|
+
@focus=${() => this._onFocus(index)}
|
|
2125
|
+
/>
|
|
2126
|
+
<span class="outline"></span>
|
|
2127
|
+
</span>
|
|
2128
|
+
<span class="content">
|
|
2129
|
+
<span
|
|
2130
|
+
id=${labelId}
|
|
2131
|
+
class=${classMap7({
|
|
2132
|
+
"label": true,
|
|
2133
|
+
"label-disabled": isDisabled
|
|
2106
2134
|
})}
|
|
2107
|
-
|
|
2108
|
-
|
|
2135
|
+
>
|
|
2136
|
+
${item.label}
|
|
2137
|
+
</span>
|
|
2138
|
+
${item.description ? html8`
|
|
2139
|
+
<span
|
|
2140
|
+
id=${descId}
|
|
2141
|
+
class=${classMap7({
|
|
2142
|
+
"description": true,
|
|
2143
|
+
"description-disabled": isDisabled
|
|
2144
|
+
})}
|
|
2145
|
+
>
|
|
2146
|
+
${item.description}
|
|
2147
|
+
</span>
|
|
2148
|
+
` : ""}
|
|
2109
2149
|
</span>
|
|
2110
|
-
|
|
2150
|
+
</span>
|
|
2111
2151
|
</span>
|
|
2112
2152
|
</div>
|
|
2113
2153
|
${item.image ? html8`
|
|
@@ -2129,13 +2169,13 @@ __decorateClass([
|
|
|
2129
2169
|
property9({ type: Array })
|
|
2130
2170
|
], CsTilesInternal.prototype, "items", 2);
|
|
2131
2171
|
__decorateClass([
|
|
2132
|
-
property9({ type: String, attribute: "
|
|
2172
|
+
property9({ type: String, attribute: "aria-label" })
|
|
2133
2173
|
], CsTilesInternal.prototype, "controlAriaLabel", 2);
|
|
2134
2174
|
__decorateClass([
|
|
2135
|
-
property9({ type: Boolean, attribute: "
|
|
2175
|
+
property9({ type: Boolean, attribute: "aria-required" })
|
|
2136
2176
|
], CsTilesInternal.prototype, "controlAriaRequired", 2);
|
|
2137
2177
|
__decorateClass([
|
|
2138
|
-
property9({ type: String, attribute: "
|
|
2178
|
+
property9({ type: String, attribute: "aria-controls" })
|
|
2139
2179
|
], CsTilesInternal.prototype, "controlAriaControls", 2);
|
|
2140
2180
|
__decorateClass([
|
|
2141
2181
|
property9({ type: Number })
|
|
@@ -2258,9 +2298,9 @@ var CsListInternal = class extends CsBaseElement {
|
|
|
2258
2298
|
constructor() {
|
|
2259
2299
|
super(...arguments);
|
|
2260
2300
|
this.items = [];
|
|
2261
|
-
this.
|
|
2262
|
-
this.
|
|
2263
|
-
this.
|
|
2301
|
+
this.controlAriaLabel = "";
|
|
2302
|
+
this.controlAriaLabelledby = "";
|
|
2303
|
+
this.controlAriaDescribedby = "";
|
|
2264
2304
|
this.sortable = false;
|
|
2265
2305
|
this.sortDisabled = false;
|
|
2266
2306
|
this.disableItemPaddings = false;
|
|
@@ -2304,9 +2344,9 @@ var CsListInternal = class extends CsBaseElement {
|
|
|
2304
2344
|
<ol
|
|
2305
2345
|
class=${classMap8(listClasses)}
|
|
2306
2346
|
role="list"
|
|
2307
|
-
aria-label=${ifDefined5(this.
|
|
2308
|
-
aria-labelledby=${ifDefined5(this.
|
|
2309
|
-
aria-describedby=${ifDefined5(this.
|
|
2347
|
+
aria-label=${ifDefined5(this.controlAriaLabel || void 0)}
|
|
2348
|
+
aria-labelledby=${ifDefined5(this.controlAriaLabelledby || void 0)}
|
|
2349
|
+
aria-describedby=${ifDefined5(this.controlAriaDescribedby || void 0)}
|
|
2310
2350
|
>${content}</ol>
|
|
2311
2351
|
`;
|
|
2312
2352
|
}
|
|
@@ -2314,9 +2354,9 @@ var CsListInternal = class extends CsBaseElement {
|
|
|
2314
2354
|
<ul
|
|
2315
2355
|
class=${classMap8(listClasses)}
|
|
2316
2356
|
role="list"
|
|
2317
|
-
aria-label=${ifDefined5(this.
|
|
2318
|
-
aria-labelledby=${ifDefined5(this.
|
|
2319
|
-
aria-describedby=${ifDefined5(this.
|
|
2357
|
+
aria-label=${ifDefined5(this.controlAriaLabel || void 0)}
|
|
2358
|
+
aria-labelledby=${ifDefined5(this.controlAriaLabelledby || void 0)}
|
|
2359
|
+
aria-describedby=${ifDefined5(this.controlAriaDescribedby || void 0)}
|
|
2320
2360
|
>${content}</ul>
|
|
2321
2361
|
`;
|
|
2322
2362
|
}
|
|
@@ -2331,14 +2371,14 @@ __decorateClass([
|
|
|
2331
2371
|
property10({ type: String })
|
|
2332
2372
|
], CsListInternal.prototype, "tagOverride", 2);
|
|
2333
2373
|
__decorateClass([
|
|
2334
|
-
property10({ type: String, attribute: "label" })
|
|
2335
|
-
], CsListInternal.prototype, "
|
|
2374
|
+
property10({ type: String, attribute: "aria-label" })
|
|
2375
|
+
], CsListInternal.prototype, "controlAriaLabel", 2);
|
|
2336
2376
|
__decorateClass([
|
|
2337
|
-
property10({ type: String, attribute: "labelledby" })
|
|
2338
|
-
], CsListInternal.prototype, "
|
|
2377
|
+
property10({ type: String, attribute: "aria-labelledby" })
|
|
2378
|
+
], CsListInternal.prototype, "controlAriaLabelledby", 2);
|
|
2339
2379
|
__decorateClass([
|
|
2340
|
-
property10({ type: String, attribute: "describedby" })
|
|
2341
|
-
], CsListInternal.prototype, "
|
|
2380
|
+
property10({ type: String, attribute: "aria-describedby" })
|
|
2381
|
+
], CsListInternal.prototype, "controlAriaDescribedby", 2);
|
|
2342
2382
|
__decorateClass([
|
|
2343
2383
|
property10({ type: Boolean })
|
|
2344
2384
|
], CsListInternal.prototype, "sortable", 2);
|
|
@@ -2399,9 +2439,9 @@ var CsTreeViewInternal = class extends CsBaseElement {
|
|
|
2399
2439
|
constructor() {
|
|
2400
2440
|
super(...arguments);
|
|
2401
2441
|
this.items = [];
|
|
2402
|
-
this.
|
|
2403
|
-
this.
|
|
2404
|
-
this.
|
|
2442
|
+
this.controlAriaLabel = "";
|
|
2443
|
+
this.controlAriaLabelledby = "";
|
|
2444
|
+
this.controlAriaDescribedby = "";
|
|
2405
2445
|
this._expandedSet = /* @__PURE__ */ new Set();
|
|
2406
2446
|
}
|
|
2407
2447
|
static {
|
|
@@ -2488,9 +2528,9 @@ var CsTreeViewInternal = class extends CsBaseElement {
|
|
|
2488
2528
|
<ul
|
|
2489
2529
|
class=${classMap9(rootClasses)}
|
|
2490
2530
|
role="tree"
|
|
2491
|
-
aria-label=${ifDefined6(this.
|
|
2492
|
-
aria-labelledby=${ifDefined6(this.
|
|
2493
|
-
aria-describedby=${ifDefined6(this.
|
|
2531
|
+
aria-label=${ifDefined6(this.controlAriaLabel || void 0)}
|
|
2532
|
+
aria-labelledby=${ifDefined6(this.controlAriaLabelledby || void 0)}
|
|
2533
|
+
aria-describedby=${ifDefined6(this.controlAriaDescribedby || void 0)}
|
|
2494
2534
|
>
|
|
2495
2535
|
${this.items.map((item, i) => this._renderNode(item, i, 0))}
|
|
2496
2536
|
</ul>
|
|
@@ -2513,14 +2553,14 @@ __decorateClass([
|
|
|
2513
2553
|
property11({ attribute: false })
|
|
2514
2554
|
], CsTreeViewInternal.prototype, "expandedItems", 2);
|
|
2515
2555
|
__decorateClass([
|
|
2516
|
-
property11({ type: String, attribute: "label" })
|
|
2517
|
-
], CsTreeViewInternal.prototype, "
|
|
2556
|
+
property11({ type: String, attribute: "aria-label" })
|
|
2557
|
+
], CsTreeViewInternal.prototype, "controlAriaLabel", 2);
|
|
2518
2558
|
__decorateClass([
|
|
2519
|
-
property11({ type: String, attribute: "labelledby" })
|
|
2520
|
-
], CsTreeViewInternal.prototype, "
|
|
2559
|
+
property11({ type: String, attribute: "aria-labelledby" })
|
|
2560
|
+
], CsTreeViewInternal.prototype, "controlAriaLabelledby", 2);
|
|
2521
2561
|
__decorateClass([
|
|
2522
|
-
property11({ type: String, attribute: "describedby" })
|
|
2523
|
-
], CsTreeViewInternal.prototype, "
|
|
2562
|
+
property11({ type: String, attribute: "aria-describedby" })
|
|
2563
|
+
], CsTreeViewInternal.prototype, "controlAriaDescribedby", 2);
|
|
2524
2564
|
__decorateClass([
|
|
2525
2565
|
property11({ type: String })
|
|
2526
2566
|
], CsTreeViewInternal.prototype, "connectorLines", 2);
|
package/dist/list/internal.d.ts
CHANGED
|
@@ -14,9 +14,9 @@ export declare class CsListInternal<T = any> extends CsBaseElement {
|
|
|
14
14
|
items: ReadonlyArray<T>;
|
|
15
15
|
renderItem: ((item: T) => RenderedItem) | undefined;
|
|
16
16
|
tagOverride?: 'ol' | 'ul';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
controlAriaLabel: string;
|
|
18
|
+
controlAriaLabelledby: string;
|
|
19
|
+
controlAriaDescribedby: string;
|
|
20
20
|
sortable: boolean;
|
|
21
21
|
sortDisabled: boolean;
|
|
22
22
|
disableItemPaddings: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/list/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAO5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,C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CAAC,WAAW,CAAC;IAEpC,OAAO,CAAC,eAAe;IAqBd,MAAM;CAuChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/radio-group/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAI1E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAO5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,QAAA,MAAM,IAAI,qHAAqC,CAAC;AAIhD,qBAAa,oBAAqB,SAAQ,IAAI;IAC5C,OAAgB,MAAM,4BAAwF;IAGrG,KAAK,SAAM;IAGpB,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAM;IAGjE,gBAAgB,SAAM;IAGtB,mBAAmB,UAAS;IAG5B,mBAAmB,SAAM;IAGzB,QAAQ,UAAS;IAGjB,SAAS,EAAE,YAAY,GAAG,UAAU,CAAc;IAElD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA6B;IACxD,OAAO,CAAC,aAAa,CAAM;IAElB,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;IAK5B,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAQlD,KAAK,IAAI,IAAI;IAWb,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,UAAU,CAuChB;IAEF,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,YAAY;IAUX,MAAM,IAAI,cAAc;IAuBjC,OAAO,CAAC,WAAW;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/radio-group/internal.ts"],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vC,OAAgB,MAAM,4BAAwF;IAGrG,KAAK,SAAM;IAGpB,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,eAAe,CAAC,CAAM;IAGtD,gBAAgB,SAAM;IAGtB,mBAAmB,UAAS;IAG5B,mBAAmB,SAAM;IAGzB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,QAAQ,UAAS;IAEjB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA6B;IACxD,OAAO,CAAC,aAAa,CAAM;IAElB,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;IAK5B,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAQlD,KAAK,IAAI,IAAI;IAWb,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,UAAU,CAiChB;IAEF,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,YAAY;IASX,MAAM,IAAI,cAAc;IAwBjC,OAAO,CAAC,WAAW;CAuGpB"}
|
|
@@ -8,9 +8,9 @@ export declare class CsTreeViewInternal<T = any> extends CsBaseElement {
|
|
|
8
8
|
getItemId: ((item: T, index: number) => string) | undefined;
|
|
9
9
|
getItemChildren: ((item: T, index: number) => ReadonlyArray<T> | undefined) | undefined;
|
|
10
10
|
expandedItems?: ReadonlyArray<string>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
controlAriaLabel: string;
|
|
12
|
+
controlAriaLabelledby: string;
|
|
13
|
+
controlAriaDescribedby: string;
|
|
14
14
|
connectorLines?: TreeViewProps.ConnectorLinesVariant;
|
|
15
15
|
i18nStrings?: TreeViewProps.I18nStrings<T>;
|
|
16
16
|
renderItemToggleIcon?: (data: TreeViewProps.ItemToggleRenderIconData) => unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/tree-view/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAM5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIrD,qBAAa,kBAAkB,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,aAAa;IAC5D,OAAgB,MAAM,4BAA+C;IAGrE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAM;IAG7B,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,aAAa,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IAG7E,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAC;IAG5D,eAAe,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;IAGxF,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAGtC,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/tree-view/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAM5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIrD,qBAAa,kBAAkB,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,aAAa;IAC5D,OAAgB,MAAM,4BAA+C;IAGrE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAM;IAG7B,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,aAAa,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IAG7E,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAC;IAG5D,eAAe,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;IAGxF,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAGtC,gBAAgB,SAAM;IAGtB,qBAAqB,SAAM;IAG3B,sBAAsB,SAAM;IAG5B,cAAc,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC;IAGrD,WAAW,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAG3C,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,wBAAwB,KAAK,OAAO,CAAC;IAEjF,OAAO,CAAC,YAAY,CAAqB;IAEhC,UAAU,CAAC,OAAO,EAAE,OAAO,KAAK,EAAE,cAAc,GAAG,IAAI;IAMhE,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,WAAW;IAqDV,MAAM;CAqBhB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cumulus-ui/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Web components inspired by Cloudscape Design System",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"build:demo": "node scripts/build-demo.mjs",
|
|
24
24
|
"dev": "npx vite --port 3000",
|
|
25
25
|
"test": "npm run build:cdn && npx playwright test",
|
|
26
|
-
"typecheck": "tsc --noEmit
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
27
|
"clean": "rm -rf dist",
|
|
28
28
|
"generate:interfaces": "tsx scripts/generate-interfaces.ts",
|
|
29
29
|
"generate:styles": "tsx scripts/generate-styles.ts",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@axe-core/playwright": "^4.11.1",
|
|
52
|
+
"@cloudscape-design/components": "^3.0.1267",
|
|
52
53
|
"@playwright/test": "^1.59.1",
|
|
53
54
|
"@types/node": "^25.5.2",
|
|
54
55
|
"@types/pngjs": "^6.0.5",
|
|
@@ -57,6 +58,6 @@
|
|
|
57
58
|
"pngjs": "^7.0.0",
|
|
58
59
|
"tsx": "^4.21.0",
|
|
59
60
|
"typescript": "~5.9.3",
|
|
60
|
-
"vite": "^8.0.
|
|
61
|
+
"vite": "^8.0.7"
|
|
61
62
|
}
|
|
62
63
|
}
|