@helixui/library 3.4.0 → 3.4.1-next.125
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/components/hx-button-group/hx-button-group.d.ts +9 -0
- package/dist/components/hx-button-group/hx-button-group.d.ts.map +1 -1
- package/dist/components/hx-button-group/index.js +1 -1
- package/dist/components/hx-card/hx-card.d.ts +68 -0
- package/dist/components/hx-card/hx-card.d.ts.map +1 -1
- package/dist/components/hx-card/hx-card.styles.d.ts.map +1 -1
- package/dist/components/hx-card/index.js +1 -1
- package/dist/components/hx-checkbox/index.js +1 -1
- package/dist/components/hx-checkbox-group/index.js +1 -1
- package/dist/components/hx-color-picker/index.js +1 -1
- package/dist/components/hx-combobox/index.js +1 -1
- package/dist/components/hx-date-picker/index.js +1 -1
- package/dist/components/hx-dialog/index.js +1 -1
- package/dist/components/hx-drawer/index.js +1 -1
- package/dist/components/hx-dropdown/index.js +1 -1
- package/dist/components/hx-list/index.js +1 -1
- package/dist/components/hx-menu/index.js +1 -1
- package/dist/components/hx-meter/hx-meter.d.ts.map +1 -1
- package/dist/components/hx-meter/index.js +1 -1
- package/dist/components/hx-overflow-menu/index.js +1 -1
- package/dist/components/hx-popover/index.js +1 -1
- package/dist/components/hx-progress-bar/index.js +1 -1
- package/dist/components/hx-radio-group/index.js +1 -1
- package/dist/components/hx-select/index.js +1 -1
- package/dist/components/hx-spinner/hx-spinner.d.ts.map +1 -1
- package/dist/components/hx-spinner/index.js +1 -1
- package/dist/components/hx-split-button/index.js +1 -1
- package/dist/components/hx-stat/index.js +1 -1
- package/dist/components/hx-switch/index.js +1 -1
- package/dist/components/hx-table/hx-td.d.ts.map +1 -1
- package/dist/components/hx-table/hx-th.d.ts +9 -0
- package/dist/components/hx-table/hx-th.d.ts.map +1 -1
- package/dist/components/hx-table/index.js +1 -1
- package/dist/components/hx-tabs/index.js +1 -1
- package/dist/components/hx-time-picker/index.js +1 -1
- package/dist/components/hx-toggle-button/index.js +1 -1
- package/dist/components/hx-tree-view/index.js +1 -1
- package/dist/css/helix-all.css +14 -1
- package/dist/css/helix-core.css +14 -1
- package/dist/css/hx-card.css +14 -1
- package/dist/css/index.css +1 -1
- package/dist/css/manifest.json +1 -1
- package/dist/index.js +27 -27
- package/dist/shared/aria-idref-DCuEaknC.js +131 -0
- package/dist/shared/{aria-idref-CxvyzfQS.js.map → aria-idref-DCuEaknC.js.map} +1 -1
- package/dist/shared/{hx-button-group-DcHP5MBv.js → hx-button-group-4NUBpkyC.js} +22 -22
- package/dist/shared/{hx-button-group-DcHP5MBv.js.map → hx-button-group-4NUBpkyC.js.map} +1 -1
- package/dist/shared/{hx-card-qNAM2QNV.js → hx-card-CswtnYvj.js} +142 -85
- package/dist/shared/hx-card-CswtnYvj.js.map +1 -0
- package/dist/shared/{hx-checkbox-C48KYKFq.js → hx-checkbox-CYd0YV_u.js} +2 -2
- package/dist/shared/{hx-checkbox-C48KYKFq.js.map → hx-checkbox-CYd0YV_u.js.map} +1 -1
- package/dist/shared/{hx-checkbox-group-BJIAX3zU.js → hx-checkbox-group-D5piJLY8.js} +2 -2
- package/dist/shared/{hx-checkbox-group-BJIAX3zU.js.map → hx-checkbox-group-D5piJLY8.js.map} +1 -1
- package/dist/shared/{hx-color-picker-Dk4cBwYQ.js → hx-color-picker-DBwJzT5f.js} +2 -2
- package/dist/shared/{hx-color-picker-Dk4cBwYQ.js.map → hx-color-picker-DBwJzT5f.js.map} +1 -1
- package/dist/shared/{hx-combobox-BTLO9qiK.js → hx-combobox-NgJaLbs2.js} +2 -2
- package/dist/shared/{hx-combobox-BTLO9qiK.js.map → hx-combobox-NgJaLbs2.js.map} +1 -1
- package/dist/shared/{hx-date-picker-CiR7FVnR.js → hx-date-picker-B49yo4Vm.js} +2 -2
- package/dist/shared/{hx-date-picker-CiR7FVnR.js.map → hx-date-picker-B49yo4Vm.js.map} +1 -1
- package/dist/shared/{hx-dialog-AOZpHSuF.js → hx-dialog-B4weoj_1.js} +2 -2
- package/dist/shared/{hx-dialog-AOZpHSuF.js.map → hx-dialog-B4weoj_1.js.map} +1 -1
- package/dist/shared/{hx-drawer-DH6CdAN1.js → hx-drawer-D81tb4BD.js} +2 -2
- package/dist/shared/{hx-drawer-DH6CdAN1.js.map → hx-drawer-D81tb4BD.js.map} +1 -1
- package/dist/shared/{hx-dropdown-DiLd40Lm.js → hx-dropdown-D626S2ZG.js} +2 -2
- package/dist/shared/{hx-dropdown-DiLd40Lm.js.map → hx-dropdown-D626S2ZG.js.map} +1 -1
- package/dist/shared/{hx-list-De66EtAP.js → hx-list-Bp8HeLHh.js} +2 -2
- package/dist/shared/{hx-list-De66EtAP.js.map → hx-list-Bp8HeLHh.js.map} +1 -1
- package/dist/shared/{hx-menu-divider-BjiRIWKq.js → hx-menu-divider-A6Guuzi_.js} +2 -2
- package/dist/shared/{hx-menu-divider-BjiRIWKq.js.map → hx-menu-divider-A6Guuzi_.js.map} +1 -1
- package/dist/shared/{hx-meter-BJdh6nrF.js → hx-meter-BnpmF3Vx.js} +57 -36
- package/dist/shared/{hx-meter-BJdh6nrF.js.map → hx-meter-BnpmF3Vx.js.map} +1 -1
- package/dist/shared/{hx-overflow-menu-BQ4fiMYu.js → hx-overflow-menu-DFjJAziP.js} +2 -2
- package/dist/shared/{hx-overflow-menu-BQ4fiMYu.js.map → hx-overflow-menu-DFjJAziP.js.map} +1 -1
- package/dist/shared/{hx-popover-B9W8-tC0.js → hx-popover-BAlAFOH9.js} +2 -2
- package/dist/shared/{hx-popover-B9W8-tC0.js.map → hx-popover-BAlAFOH9.js.map} +1 -1
- package/dist/shared/{hx-progress-bar-C8nDMdYa.js → hx-progress-bar-CYz9U721.js} +2 -2
- package/dist/shared/{hx-progress-bar-C8nDMdYa.js.map → hx-progress-bar-CYz9U721.js.map} +1 -1
- package/dist/shared/{hx-radio-Z1lV1zTO.js → hx-radio-C7eTj5YI.js} +2 -2
- package/dist/shared/{hx-radio-Z1lV1zTO.js.map → hx-radio-C7eTj5YI.js.map} +1 -1
- package/dist/shared/{hx-select-D18CnJ0e.js → hx-select-DahFehiZ.js} +2 -2
- package/dist/shared/{hx-select-D18CnJ0e.js.map → hx-select-DahFehiZ.js.map} +1 -1
- package/dist/shared/{hx-spinner-BB0h2hKZ.js → hx-spinner-3qBp4jeN.js} +11 -11
- package/dist/shared/{hx-spinner-BB0h2hKZ.js.map → hx-spinner-3qBp4jeN.js.map} +1 -1
- package/dist/shared/{hx-split-button-BoABoEm5.js → hx-split-button-Ddle8iVx.js} +2 -2
- package/dist/shared/{hx-split-button-BoABoEm5.js.map → hx-split-button-Ddle8iVx.js.map} +1 -1
- package/dist/shared/{hx-stat-Dtf9lz-O.js → hx-stat-Gtw_SpK8.js} +2 -2
- package/dist/shared/{hx-stat-Dtf9lz-O.js.map → hx-stat-Gtw_SpK8.js.map} +1 -1
- package/dist/shared/{hx-switch-B6kr-EwE.js → hx-switch-TvKGvZJz.js} +2 -2
- package/dist/shared/{hx-switch-B6kr-EwE.js.map → hx-switch-TvKGvZJz.js.map} +1 -1
- package/dist/shared/{hx-tab-panel-BQtBXKLD.js → hx-tab-panel-Cu--8psg.js} +2 -2
- package/dist/shared/{hx-tab-panel-BQtBXKLD.js.map → hx-tab-panel-Cu--8psg.js.map} +1 -1
- package/dist/shared/{hx-td-BGkFOJEK.js → hx-td-BPsb6OaG.js} +141 -138
- package/dist/shared/hx-td-BPsb6OaG.js.map +1 -0
- package/dist/shared/{hx-time-picker-iwCD7rzW.js → hx-time-picker-Bo7FWzmf.js} +2 -2
- package/dist/shared/{hx-time-picker-iwCD7rzW.js.map → hx-time-picker-Bo7FWzmf.js.map} +1 -1
- package/dist/shared/{hx-toggle-button-BQ81EDkl.js → hx-toggle-button-DwBers3A.js} +2 -2
- package/dist/shared/{hx-toggle-button-BQ81EDkl.js.map → hx-toggle-button-DwBers3A.js.map} +1 -1
- package/dist/shared/{hx-tree-item-CHrUhuZL.js → hx-tree-item-CXyspGxI.js} +2 -2
- package/dist/shared/{hx-tree-item-CHrUhuZL.js.map → hx-tree-item-CXyspGxI.js.map} +1 -1
- package/dist/utils/aria-idref.d.ts.map +1 -1
- package/figma-inventory.json +2 -2
- package/package.json +2 -2
- package/dist/shared/aria-idref-CxvyzfQS.js +0 -126
- package/dist/shared/hx-card-qNAM2QNV.js.map +0 -1
- package/dist/shared/hx-td-BGkFOJEK.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { css as
|
|
1
|
+
import { css as f, nothing as y, html as n } from "lit";
|
|
2
2
|
import { property as l, state as D, customElement as b } from "lit/decorators.js";
|
|
3
|
-
import { a as
|
|
3
|
+
import { a as N } from "./forced-colors-CTEDFRGa.js";
|
|
4
4
|
import { H as u } from "./helix-element-BNEYeiys.js";
|
|
5
|
-
import { s as $, i as O, r as
|
|
6
|
-
import { f as
|
|
7
|
-
import { ifDefined as
|
|
8
|
-
const
|
|
5
|
+
import { s as $, i as O, r as H } from "./aria-idref-DCuEaknC.js";
|
|
6
|
+
import { f as S } from "./aria-flatten-DY6v2vah.js";
|
|
7
|
+
import { ifDefined as m } from "lit/directives/if-defined.js";
|
|
8
|
+
const B = f`
|
|
9
9
|
:host {
|
|
10
10
|
display: block;
|
|
11
11
|
overflow-x: auto;
|
|
@@ -119,25 +119,25 @@ const M = p`
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
`;
|
|
122
|
-
|
|
122
|
+
f`
|
|
123
123
|
:host {
|
|
124
124
|
display: contents;
|
|
125
125
|
}
|
|
126
126
|
`;
|
|
127
|
-
|
|
127
|
+
f`
|
|
128
128
|
:host {
|
|
129
129
|
display: contents;
|
|
130
130
|
}
|
|
131
131
|
`;
|
|
132
|
-
const L =
|
|
132
|
+
const L = f`
|
|
133
133
|
:host {
|
|
134
134
|
display: contents;
|
|
135
135
|
}
|
|
136
136
|
`;
|
|
137
|
-
var
|
|
138
|
-
for (var
|
|
139
|
-
(a =
|
|
140
|
-
return o &&
|
|
137
|
+
var M = Object.defineProperty, P = Object.getOwnPropertyDescriptor, v = (e, r, i, o) => {
|
|
138
|
+
for (var t = o > 1 ? void 0 : o ? P(r, i) : r, s = e.length - 1, a; s >= 0; s--)
|
|
139
|
+
(a = e[s]) && (t = (o ? a(r, i, t) : a(t)) || t);
|
|
140
|
+
return o && t && M(r, i, t), t;
|
|
141
141
|
};
|
|
142
142
|
let h = class extends u {
|
|
143
143
|
constructor() {
|
|
@@ -147,34 +147,34 @@ let h = class extends u {
|
|
|
147
147
|
connectedCallback() {
|
|
148
148
|
super.connectedCallback(), this._hasCaptionSlot = this.querySelector('[slot="caption"]') !== null;
|
|
149
149
|
}
|
|
150
|
-
firstUpdated(
|
|
151
|
-
super.firstUpdated(
|
|
150
|
+
firstUpdated(e) {
|
|
151
|
+
super.firstUpdated(e), !this.label && !this.caption && this._hasCaptionSlot;
|
|
152
152
|
}
|
|
153
|
-
willUpdate(
|
|
154
|
-
|
|
153
|
+
willUpdate(e) {
|
|
154
|
+
e.has("label") && !this.label && e.get("label");
|
|
155
155
|
}
|
|
156
156
|
/** @internal */
|
|
157
|
-
_onCaptionSlotChange(
|
|
158
|
-
const r =
|
|
157
|
+
_onCaptionSlotChange(e) {
|
|
158
|
+
const r = e.target;
|
|
159
159
|
this._hasCaptionSlot = r.assignedNodes({ flatten: !0 }).length > 0;
|
|
160
160
|
}
|
|
161
161
|
// ─── Render ───
|
|
162
162
|
render() {
|
|
163
|
-
const
|
|
163
|
+
const e = this.caption || this._hasCaptionSlot;
|
|
164
164
|
return n`
|
|
165
165
|
<div class="table-wrapper">
|
|
166
166
|
<!-- role="table" is required: sub-components use display:contents which can confuse assistive technology in Shadow DOM -->
|
|
167
|
-
<table part="table" role="table" aria-label=${this.label ||
|
|
168
|
-
${
|
|
167
|
+
<table part="table" role="table" aria-label=${this.label || y}>
|
|
168
|
+
${e ? n`<caption part="caption">
|
|
169
169
|
<slot name="caption" @slotchange=${this._onCaptionSlotChange}>${this.caption}</slot>
|
|
170
|
-
</caption>` :
|
|
170
|
+
</caption>` : y}
|
|
171
171
|
<slot></slot>
|
|
172
172
|
</table>
|
|
173
173
|
</div>
|
|
174
174
|
`;
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
|
-
h.styles = [
|
|
177
|
+
h.styles = [B, N];
|
|
178
178
|
v([
|
|
179
179
|
l({ type: String })
|
|
180
180
|
], h.prototype, "label", 2);
|
|
@@ -196,36 +196,36 @@ v([
|
|
|
196
196
|
h = v([
|
|
197
197
|
b("hx-table")
|
|
198
198
|
], h);
|
|
199
|
-
var E = Object.getOwnPropertyDescriptor,
|
|
200
|
-
for (var
|
|
201
|
-
(a =
|
|
202
|
-
return
|
|
199
|
+
var E = Object.getOwnPropertyDescriptor, j = (e, r, i, o) => {
|
|
200
|
+
for (var t = o > 1 ? void 0 : o ? E(r, i) : r, s = e.length - 1, a; s >= 0; s--)
|
|
201
|
+
(a = e[s]) && (t = a(t) || t);
|
|
202
|
+
return t;
|
|
203
203
|
};
|
|
204
|
-
let
|
|
204
|
+
let C = class extends u {
|
|
205
205
|
render() {
|
|
206
206
|
return n`<thead part="thead" role="rowgroup">
|
|
207
207
|
<slot></slot>
|
|
208
208
|
</thead>`;
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
C.styles = [L];
|
|
212
|
+
C = j([
|
|
213
213
|
b("hx-thead")
|
|
214
|
-
],
|
|
215
|
-
var
|
|
216
|
-
for (var
|
|
217
|
-
(a =
|
|
218
|
-
return
|
|
214
|
+
], C);
|
|
215
|
+
var k = Object.getOwnPropertyDescriptor, z = (e, r, i, o) => {
|
|
216
|
+
for (var t = o > 1 ? void 0 : o ? k(r, i) : r, s = e.length - 1, a; s >= 0; s--)
|
|
217
|
+
(a = e[s]) && (t = a(t) || t);
|
|
218
|
+
return t;
|
|
219
219
|
};
|
|
220
|
-
let
|
|
220
|
+
let A = class extends u {
|
|
221
221
|
render() {
|
|
222
222
|
return n`<tbody part="tbody" role="rowgroup">
|
|
223
223
|
<slot></slot>
|
|
224
224
|
</tbody>`;
|
|
225
225
|
}
|
|
226
226
|
};
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
A.styles = [
|
|
228
|
+
f`
|
|
229
229
|
:host {
|
|
230
230
|
display: contents;
|
|
231
231
|
}
|
|
@@ -240,13 +240,13 @@ C.styles = [
|
|
|
240
240
|
}
|
|
241
241
|
`
|
|
242
242
|
];
|
|
243
|
-
|
|
243
|
+
A = z([
|
|
244
244
|
b("hx-tbody")
|
|
245
|
-
],
|
|
246
|
-
var
|
|
247
|
-
for (var
|
|
248
|
-
(a =
|
|
249
|
-
return
|
|
245
|
+
], A);
|
|
246
|
+
var U = Object.getOwnPropertyDescriptor, W = (e, r, i, o) => {
|
|
247
|
+
for (var t = o > 1 ? void 0 : o ? U(r, i) : r, s = e.length - 1, a; s >= 0; s--)
|
|
248
|
+
(a = e[s]) && (t = a(t) || t);
|
|
249
|
+
return t;
|
|
250
250
|
};
|
|
251
251
|
let I = class extends u {
|
|
252
252
|
render() {
|
|
@@ -259,10 +259,10 @@ I.styles = [L];
|
|
|
259
259
|
I = W([
|
|
260
260
|
b("hx-tfoot")
|
|
261
261
|
], I);
|
|
262
|
-
var F = Object.defineProperty,
|
|
263
|
-
for (var
|
|
264
|
-
(a =
|
|
265
|
-
return o &&
|
|
262
|
+
var F = Object.defineProperty, q = Object.getOwnPropertyDescriptor, R = (e, r, i, o) => {
|
|
263
|
+
for (var t = o > 1 ? void 0 : o ? q(r, i) : r, s = e.length - 1, a; s >= 0; s--)
|
|
264
|
+
(a = e[s]) && (t = (o ? a(r, i, t) : a(t)) || t);
|
|
265
|
+
return o && t && F(r, i, t), t;
|
|
266
266
|
};
|
|
267
267
|
let g = class extends u {
|
|
268
268
|
constructor() {
|
|
@@ -270,38 +270,38 @@ let g = class extends u {
|
|
|
270
270
|
}
|
|
271
271
|
connectedCallback() {
|
|
272
272
|
super.connectedCallback();
|
|
273
|
-
const
|
|
274
|
-
this._supportsIdrefRefs =
|
|
273
|
+
const e = this.constructor;
|
|
274
|
+
this._supportsIdrefRefs = e.__testSupportsIdrefRefsOverride !== null ? e.__testSupportsIdrefRefsOverride : $(this._internals), this._syncHostAriaSemantics(), this._ariaMirror = O(this, () => {
|
|
275
275
|
this._syncHostAriaSemantics();
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
278
|
disconnectedCallback() {
|
|
279
|
-
var
|
|
280
|
-
super.disconnectedCallback(), (
|
|
279
|
+
var e;
|
|
280
|
+
super.disconnectedCallback(), (e = this._ariaMirror) == null || e.disconnect(), this._ariaMirror = null;
|
|
281
281
|
}
|
|
282
|
-
updated(
|
|
283
|
-
super.updated(
|
|
282
|
+
updated(e) {
|
|
283
|
+
super.updated(e), (e.has("selected") || e.has("disabled")) && this._syncHostAriaSemantics();
|
|
284
284
|
}
|
|
285
285
|
/** @internal */
|
|
286
286
|
_syncHostAriaSemantics() {
|
|
287
287
|
var a;
|
|
288
|
-
const
|
|
289
|
-
this._supportsIdrefRefs ? (
|
|
290
|
-
const r = ((a = this.getAttribute("aria-label")) == null ? void 0 : a.trim()) || "", i = this.getAttribute("aria-labelledby"), o =
|
|
288
|
+
const e = this._internals;
|
|
289
|
+
this._supportsIdrefRefs ? (e.role = "row", e.ariaSelected = this.selected ? "true" : null, e.ariaDisabled = this.disabled ? "true" : null) : (e.role = null, e.ariaLabel = null, e.ariaSelected = null, e.ariaDisabled = null);
|
|
290
|
+
const r = ((a = this.getAttribute("aria-label")) == null ? void 0 : a.trim()) || "", i = this.getAttribute("aria-labelledby"), o = H(this, i), t = o.length > 0;
|
|
291
291
|
if (this._supportsIdrefRefs) {
|
|
292
|
-
const
|
|
293
|
-
|
|
292
|
+
const d = e;
|
|
293
|
+
d.ariaLabelledByElements = t ? o : null;
|
|
294
294
|
}
|
|
295
295
|
let s = "";
|
|
296
|
-
|
|
296
|
+
t ? (s = o.map((_) => S(_)).filter(Boolean).join(" ") || r || "", this._supportsIdrefRefs && (e.ariaLabel = null)) : r ? (s = r, this._supportsIdrefRefs && (e.ariaLabel = r)) : (s = "", this._supportsIdrefRefs && (e.ariaLabel = null)), this._resolvedAccessibleName !== s && (this._resolvedAccessibleName = s, this._supportsIdrefRefs || this.requestUpdate());
|
|
297
297
|
}
|
|
298
298
|
render() {
|
|
299
299
|
return n`
|
|
300
300
|
<tr
|
|
301
301
|
part="row"
|
|
302
302
|
role="row"
|
|
303
|
-
aria-selected=${this.selected ? "true" :
|
|
304
|
-
aria-disabled=${this.disabled ? "true" :
|
|
303
|
+
aria-selected=${this.selected ? "true" : y}
|
|
304
|
+
aria-disabled=${this.disabled ? "true" : y}
|
|
305
305
|
>
|
|
306
306
|
<slot></slot>
|
|
307
307
|
</tr>
|
|
@@ -309,7 +309,7 @@ let g = class extends u {
|
|
|
309
309
|
}
|
|
310
310
|
};
|
|
311
311
|
g.styles = [
|
|
312
|
-
|
|
312
|
+
f`
|
|
313
313
|
:host {
|
|
314
314
|
display: contents;
|
|
315
315
|
}
|
|
@@ -340,68 +340,70 @@ g.styles = [
|
|
|
340
340
|
`
|
|
341
341
|
];
|
|
342
342
|
g.__testSupportsIdrefRefsOverride = null;
|
|
343
|
-
|
|
343
|
+
R([
|
|
344
344
|
l({ type: Boolean, reflect: !0 })
|
|
345
345
|
], g.prototype, "selected", 2);
|
|
346
|
-
|
|
346
|
+
R([
|
|
347
347
|
l({ type: Boolean, reflect: !0 })
|
|
348
348
|
], g.prototype, "disabled", 2);
|
|
349
|
-
g =
|
|
349
|
+
g = R([
|
|
350
350
|
b("hx-tr")
|
|
351
351
|
], g);
|
|
352
|
-
var
|
|
353
|
-
for (var
|
|
354
|
-
(a =
|
|
355
|
-
return o &&
|
|
352
|
+
var V = Object.defineProperty, G = Object.getOwnPropertyDescriptor, x = (e, r, i, o) => {
|
|
353
|
+
for (var t = o > 1 ? void 0 : o ? G(r, i) : r, s = e.length - 1, a; s >= 0; s--)
|
|
354
|
+
(a = e[s]) && (t = (o ? a(r, i, t) : a(t)) || t);
|
|
355
|
+
return o && t && V(r, i, t), t;
|
|
356
356
|
};
|
|
357
357
|
let c = class extends u {
|
|
358
358
|
constructor() {
|
|
359
|
-
super(...arguments), this.sortable = !1, this.sortDirection = "none", this.scope = "col", this.colspan = 0, this.rowspan = 0, this._slotText = "", this._supportsIdrefRefs = !0, this._ariaMirror = null;
|
|
359
|
+
super(...arguments), this.sortable = !1, this.sortDirection = "none", this.scope = "col", this.colspan = 0, this.rowspan = 0, this._slotText = "", this._supportsIdrefRefs = !0, this._ariaMirror = null, this._resolvedAccessibleName = "";
|
|
360
360
|
}
|
|
361
361
|
// ─── Lifecycle ───
|
|
362
362
|
connectedCallback() {
|
|
363
363
|
super.connectedCallback();
|
|
364
|
-
const
|
|
365
|
-
this._supportsIdrefRefs =
|
|
364
|
+
const e = this.constructor;
|
|
365
|
+
this._supportsIdrefRefs = e.__testSupportsIdrefRefsOverride !== null ? e.__testSupportsIdrefRefsOverride : $(this._internals), this._syncHostAriaSemantics(), this._ariaMirror = O(this, () => {
|
|
366
366
|
this._syncHostAriaSemantics();
|
|
367
367
|
});
|
|
368
368
|
}
|
|
369
369
|
disconnectedCallback() {
|
|
370
|
-
var
|
|
371
|
-
super.disconnectedCallback(), (
|
|
370
|
+
var e;
|
|
371
|
+
super.disconnectedCallback(), (e = this._ariaMirror) == null || e.disconnect(), this._ariaMirror = null;
|
|
372
372
|
}
|
|
373
|
-
updated(
|
|
374
|
-
super.updated(
|
|
373
|
+
updated(e) {
|
|
374
|
+
super.updated(e), (e.has("sortable") || e.has("sortDirection")) && this._syncHostAriaSemantics();
|
|
375
375
|
}
|
|
376
376
|
/** @internal */
|
|
377
|
-
_onSlotChange(
|
|
378
|
-
const i =
|
|
377
|
+
_onSlotChange(e) {
|
|
378
|
+
const i = e.target.assignedNodes({ flatten: !0 });
|
|
379
379
|
let o = "";
|
|
380
|
-
for (const
|
|
381
|
-
|
|
382
|
-
|
|
380
|
+
for (const s of i)
|
|
381
|
+
s.nodeType === Node.TEXT_NODE ? o += s.textContent ?? "" : s.nodeType === Node.ELEMENT_NODE && (o += S(s));
|
|
382
|
+
const t = o.replace(/\s+/g, " ").trim();
|
|
383
|
+
t !== this._slotText && (this._slotText = t, this._syncHostAriaSemantics());
|
|
383
384
|
}
|
|
384
385
|
/** @internal */
|
|
385
386
|
_syncHostAriaSemantics() {
|
|
386
|
-
var
|
|
387
|
-
const
|
|
388
|
-
this._supportsIdrefRefs ? (
|
|
389
|
-
const i = ((
|
|
387
|
+
var d;
|
|
388
|
+
const e = this._internals, r = this._ariaSortValue();
|
|
389
|
+
this._supportsIdrefRefs ? (e.role = "columnheader", e.ariaSort = r) : (e.role = null, e.ariaSort = null, e.ariaLabel = null);
|
|
390
|
+
const i = ((d = this.getAttribute("aria-label")) == null ? void 0 : d.trim()) || "", o = this.getAttribute("aria-labelledby"), t = H(this, o), s = t.length > 0;
|
|
390
391
|
if (this._supportsIdrefRefs) {
|
|
391
|
-
const
|
|
392
|
-
|
|
392
|
+
const _ = e;
|
|
393
|
+
_.ariaLabelledByElements = s ? t : null;
|
|
393
394
|
}
|
|
394
|
-
|
|
395
|
+
let a = "";
|
|
396
|
+
s ? (a = t.map((T) => S(T)).filter(Boolean).join(" ") || i || this._slotText, this._supportsIdrefRefs && (e.ariaLabel = null)) : i ? (a = i, this._supportsIdrefRefs && (e.ariaLabel = i)) : (a = this._slotText, this._supportsIdrefRefs && (e.ariaLabel = null)), this._resolvedAccessibleName !== a && (this._resolvedAccessibleName = a, this.requestUpdate());
|
|
395
397
|
}
|
|
396
398
|
// ─── Event Handlers ───
|
|
397
399
|
/** @internal */
|
|
398
400
|
_handleSort() {
|
|
399
|
-
const
|
|
400
|
-
this.sortDirection =
|
|
401
|
+
const e = this.sortDirection === "asc" ? "desc" : "asc";
|
|
402
|
+
this.sortDirection = e, this.dispatchEvent(
|
|
401
403
|
new CustomEvent("hx-sort", {
|
|
402
404
|
bubbles: !0,
|
|
403
405
|
composed: !0,
|
|
404
|
-
detail: { direction:
|
|
406
|
+
detail: { direction: e }
|
|
405
407
|
})
|
|
406
408
|
);
|
|
407
409
|
}
|
|
@@ -433,8 +435,8 @@ let c = class extends u {
|
|
|
433
435
|
}
|
|
434
436
|
/** @internal */
|
|
435
437
|
_ariaSortAttr() {
|
|
436
|
-
const
|
|
437
|
-
return
|
|
438
|
+
const e = this._ariaSortValue();
|
|
439
|
+
return e === null ? y : e;
|
|
438
440
|
}
|
|
439
441
|
/**
|
|
440
442
|
* Build the sort button's aria-label. Includes the slotted column text
|
|
@@ -446,9 +448,9 @@ let c = class extends u {
|
|
|
446
448
|
* @internal
|
|
447
449
|
*/
|
|
448
450
|
_sortLabel() {
|
|
449
|
-
const
|
|
451
|
+
const e = this._resolvedAccessibleName || this._slotText;
|
|
450
452
|
let r;
|
|
451
|
-
return this.sortDirection === "asc" ? r = "Sort descending" : this.sortDirection === "desc" ? r = "Sort ascending" : r = "Sort",
|
|
453
|
+
return this.sortDirection === "asc" ? r = "Sort descending" : this.sortDirection === "desc" ? r = "Sort ascending" : r = "Sort", e ? this.sortDirection === "asc" ? `Sort ${e} descending` : this.sortDirection === "desc" ? `Sort ${e} ascending` : `Sort by ${e}` : r;
|
|
452
454
|
}
|
|
453
455
|
render() {
|
|
454
456
|
return n`
|
|
@@ -456,8 +458,8 @@ let c = class extends u {
|
|
|
456
458
|
part="header"
|
|
457
459
|
role="columnheader"
|
|
458
460
|
scope=${this.scope}
|
|
459
|
-
colspan=${
|
|
460
|
-
rowspan=${
|
|
461
|
+
colspan=${m(this.colspan > 0 ? this.colspan : void 0)}
|
|
462
|
+
rowspan=${m(this.rowspan > 0 ? this.rowspan : void 0)}
|
|
461
463
|
aria-sort=${this._ariaSortAttr()}
|
|
462
464
|
>
|
|
463
465
|
${this.sortable ? n`
|
|
@@ -471,7 +473,7 @@ let c = class extends u {
|
|
|
471
473
|
}
|
|
472
474
|
};
|
|
473
475
|
c.styles = [
|
|
474
|
-
|
|
476
|
+
f`
|
|
475
477
|
:host {
|
|
476
478
|
display: contents;
|
|
477
479
|
}
|
|
@@ -615,59 +617,60 @@ x([
|
|
|
615
617
|
c = x([
|
|
616
618
|
b("hx-th")
|
|
617
619
|
], c);
|
|
618
|
-
var
|
|
619
|
-
for (var
|
|
620
|
-
(a =
|
|
621
|
-
return o &&
|
|
620
|
+
var X = Object.defineProperty, J = Object.getOwnPropertyDescriptor, w = (e, r, i, o) => {
|
|
621
|
+
for (var t = o > 1 ? void 0 : o ? J(r, i) : r, s = e.length - 1, a; s >= 0; s--)
|
|
622
|
+
(a = e[s]) && (t = (o ? a(r, i, t) : a(t)) || t);
|
|
623
|
+
return o && t && X(r, i, t), t;
|
|
622
624
|
};
|
|
623
|
-
let
|
|
625
|
+
let p = class extends u {
|
|
624
626
|
constructor() {
|
|
625
627
|
super(...arguments), this.align = "left", this.colspan = 0, this.rowspan = 0, this.label = "", this._supportsIdrefRefs = !0, this._ariaMirror = null, this._resolvedAccessibleName = "";
|
|
626
628
|
}
|
|
627
629
|
connectedCallback() {
|
|
628
630
|
super.connectedCallback();
|
|
629
|
-
const
|
|
630
|
-
this._supportsIdrefRefs =
|
|
631
|
+
const e = this.constructor;
|
|
632
|
+
this._supportsIdrefRefs = e.__testSupportsIdrefRefsOverride !== null ? e.__testSupportsIdrefRefsOverride : $(this._internals), this._syncHostAriaSemantics(), this._ariaMirror = O(this, () => {
|
|
631
633
|
this._syncHostAriaSemantics();
|
|
632
634
|
});
|
|
633
635
|
}
|
|
634
636
|
disconnectedCallback() {
|
|
635
|
-
var
|
|
636
|
-
super.disconnectedCallback(), (
|
|
637
|
+
var e;
|
|
638
|
+
super.disconnectedCallback(), (e = this._ariaMirror) == null || e.disconnect(), this._ariaMirror = null;
|
|
637
639
|
}
|
|
638
|
-
updated(
|
|
639
|
-
super.updated(
|
|
640
|
+
updated(e) {
|
|
641
|
+
super.updated(e), e.has("label") && this._syncHostAriaSemantics();
|
|
640
642
|
}
|
|
641
643
|
/** @internal */
|
|
642
644
|
_syncHostAriaSemantics() {
|
|
643
645
|
var a;
|
|
644
|
-
const
|
|
645
|
-
this._supportsIdrefRefs ?
|
|
646
|
-
const r = ((a = this.getAttribute("aria-label")) == null ? void 0 : a.trim()) || "", i = this.getAttribute("aria-labelledby"), o =
|
|
646
|
+
const e = this._internals;
|
|
647
|
+
this._supportsIdrefRefs ? e.role = "cell" : (e.role = null, e.ariaLabel = null);
|
|
648
|
+
const r = ((a = this.getAttribute("aria-label")) == null ? void 0 : a.trim()) || "", i = this.getAttribute("aria-labelledby"), o = H(this, i), t = o.length > 0;
|
|
647
649
|
if (this._supportsIdrefRefs) {
|
|
648
|
-
const
|
|
649
|
-
|
|
650
|
+
const d = e;
|
|
651
|
+
d.ariaLabelledByElements = t ? o : null;
|
|
650
652
|
}
|
|
651
653
|
let s = "";
|
|
652
|
-
|
|
654
|
+
t ? (s = o.map((_) => S(_)).filter(Boolean).join(" ") || r || this.label || "", this._supportsIdrefRefs && (e.ariaLabel = null)) : r ? (s = r, this._supportsIdrefRefs && (e.ariaLabel = r)) : this.label ? (s = this.label, this._supportsIdrefRefs && (e.ariaLabel = this.label)) : (s = "", this._supportsIdrefRefs && (e.ariaLabel = null)), this._resolvedAccessibleName !== s && (this._resolvedAccessibleName = s, this.requestUpdate());
|
|
653
655
|
}
|
|
654
656
|
render() {
|
|
657
|
+
const e = this._resolvedAccessibleName || this.label || void 0;
|
|
655
658
|
return n`
|
|
656
659
|
<td
|
|
657
660
|
part="cell"
|
|
658
661
|
role="cell"
|
|
659
|
-
aria-label=${
|
|
660
|
-
data-label=${
|
|
661
|
-
colspan=${
|
|
662
|
-
rowspan=${
|
|
662
|
+
aria-label=${m(e)}
|
|
663
|
+
data-label=${m(this.label || void 0)}
|
|
664
|
+
colspan=${m(this.colspan > 0 ? this.colspan : void 0)}
|
|
665
|
+
rowspan=${m(this.rowspan > 0 ? this.rowspan : void 0)}
|
|
663
666
|
>
|
|
664
667
|
<slot></slot>
|
|
665
668
|
</td>
|
|
666
669
|
`;
|
|
667
670
|
}
|
|
668
671
|
};
|
|
669
|
-
|
|
670
|
-
|
|
672
|
+
p.styles = [
|
|
673
|
+
f`
|
|
671
674
|
:host {
|
|
672
675
|
display: contents;
|
|
673
676
|
}
|
|
@@ -733,29 +736,29 @@ d.styles = [
|
|
|
733
736
|
}
|
|
734
737
|
`
|
|
735
738
|
];
|
|
736
|
-
|
|
737
|
-
|
|
739
|
+
p.__testSupportsIdrefRefsOverride = null;
|
|
740
|
+
w([
|
|
738
741
|
l({ type: String, reflect: !0 })
|
|
739
|
-
],
|
|
740
|
-
|
|
742
|
+
], p.prototype, "align", 2);
|
|
743
|
+
w([
|
|
741
744
|
l({ type: Number })
|
|
742
|
-
],
|
|
743
|
-
|
|
745
|
+
], p.prototype, "colspan", 2);
|
|
746
|
+
w([
|
|
744
747
|
l({ type: Number })
|
|
745
|
-
],
|
|
746
|
-
|
|
748
|
+
], p.prototype, "rowspan", 2);
|
|
749
|
+
w([
|
|
747
750
|
l({ type: String, attribute: "label" })
|
|
748
|
-
],
|
|
749
|
-
|
|
751
|
+
], p.prototype, "label", 2);
|
|
752
|
+
p = w([
|
|
750
753
|
b("hx-td")
|
|
751
|
-
],
|
|
754
|
+
], p);
|
|
752
755
|
export {
|
|
753
756
|
h as H,
|
|
754
|
-
|
|
755
|
-
|
|
757
|
+
A as a,
|
|
758
|
+
p as b,
|
|
756
759
|
I as c,
|
|
757
|
-
|
|
760
|
+
C as d,
|
|
758
761
|
c as e,
|
|
759
762
|
g as f
|
|
760
763
|
};
|
|
761
|
-
//# sourceMappingURL=hx-td-
|
|
764
|
+
//# sourceMappingURL=hx-td-BPsb6OaG.js.map
|