@ds-autonomie/web-components 1.9.0 → 1.10.0
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/CHANGELOG.md +18 -0
- package/dist/chunks/chunk.2B2NWNWC.js +96 -0
- package/dist/chunks/chunk.2O7XBCK3.js +152 -0
- package/dist/chunks/chunk.4BPTV7TY.js +53 -0
- package/dist/chunks/{chunk.B3VBH7AS.js → chunk.6LX2WW5F.js} +44 -38
- package/dist/chunks/{chunk.YA5XTUZW.js → chunk.6M3PE7F4.js} +2 -2
- package/dist/chunks/{chunk.RB5YRDTE.js → chunk.7H7XQTS6.js} +1 -1
- package/dist/chunks/{chunk.UENLYHK4.js → chunk.7NKBEOVM.js} +1 -1
- package/dist/chunks/{chunk.2CCVOCSE.js → chunk.7QLN4D3Q.js} +3 -5
- package/dist/chunks/chunk.AHXS6ATM.js +11 -0
- package/dist/chunks/{chunk.CHKVYEHB.js → chunk.AYEDSLZF.js} +1 -1
- package/dist/chunks/chunk.BUJFK2VN.js +47 -0
- package/dist/chunks/{chunk.DXQY7NLW.js → chunk.DB67KVAS.js} +371 -24
- package/dist/chunks/chunk.DDTC2S6X.js +71 -0
- package/dist/chunks/{chunk.NNL36YA6.js → chunk.DEGFNZBX.js} +7 -14
- package/dist/chunks/chunk.DFG6FESK.js +34 -0
- package/dist/chunks/{chunk.A5II52AY.js → chunk.IJSV5T5Z.js} +5 -6
- package/dist/chunks/{chunk.6HEEXQ6Q.js → chunk.MLSOHPGG.js} +1 -1
- package/dist/chunks/{chunk.74YBAWFQ.js → chunk.N27XTH35.js} +70 -40
- package/dist/chunks/{chunk.DJDCH3MP.js → chunk.OEDNEIBK.js} +1 -1
- package/dist/chunks/{chunk.BMSQX3ZA.js → chunk.PZWK6P5R.js} +4 -4
- package/dist/chunks/{chunk.LG4WLLQM.js → chunk.RCI25EBE.js} +3 -2
- package/dist/chunks/chunk.RO44FY3M.js +29 -0
- package/dist/chunks/{chunk.SN4AILXB.js → chunk.SMUQF6W4.js} +11 -11
- package/dist/chunks/{chunk.BWQBVIRR.js → chunk.TPFNNLIZ.js} +19 -7
- package/dist/chunks/chunk.TTAJYLMN.js +75 -0
- package/dist/chunks/chunk.UGLLQNQE.js +54 -0
- package/dist/chunks/{chunk.D2VOYAK5.js → chunk.UPDUFREI.js} +1 -11
- package/dist/chunks/{chunk.S4ATPBQN.js → chunk.XSXVVUKP.js} +14 -0
- package/dist/chunks/{chunk.EETYUDWR.js → chunk.XT7C6ZDU.js} +24 -7
- package/dist/components/accordion/accordion.js +3 -3
- package/dist/components/alert/alert.js +4 -4
- package/dist/components/anchor-tag/anchor-tag.js +2 -2
- package/dist/components/animation/animation.js +2 -2
- package/dist/components/avatar/avatar.js +3 -3
- package/dist/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/button/button.d.ts +3 -0
- package/dist/components/button/button.js +6 -6
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/checkbox/checkbox.d.ts +1 -0
- package/dist/components/checkbox/checkbox.js +3 -3
- package/dist/components/checkbox-button/checkbox-button.d.ts +0 -1
- package/dist/components/checkbox-button/checkbox-button.js +4 -4
- package/dist/components/checkbox-button/checkbox-button.styles.js +2 -2
- package/dist/components/checkbox-group/checkbox-group.d.ts +1 -0
- package/dist/components/checkbox-group/checkbox-group.js +2 -1
- package/dist/components/combobox/combobox.d.ts +4 -1
- package/dist/components/combobox/combobox.js +8 -7
- package/dist/components/combobox/combobox.styles.js +1 -1
- package/dist/components/dialog/dialog.js +3 -3
- package/dist/components/download-card/download-card.js +1 -1
- package/dist/components/download-link/download-link.js +1 -1
- package/dist/components/drawer/drawer.js +3 -3
- package/dist/components/file-upload/file-upload.js +2 -2
- package/dist/components/filter/filter-button/filter-button.d.ts +34 -0
- package/dist/components/filter/filter-button/filter-button.js +22 -0
- package/dist/components/filter/filter-button/filter-button.styles.d.ts +2 -0
- package/dist/components/filter/filter-button/filter-button.styles.js +8 -0
- package/dist/components/icon/icon.js +1 -1
- package/dist/components/icon-button/icon-button.js +2 -2
- package/dist/components/input/input.js +3 -3
- package/dist/components/input-mask/input-mask.js +2 -2
- package/dist/components/input-phone/input-phone.js +9 -9
- package/dist/components/menu-item/menu-item.js +1 -1
- package/dist/components/option/option.js +1 -1
- package/dist/components/pagination/pagination.js +7 -7
- package/dist/components/pagination-button/pagination-button.js +3 -3
- package/dist/components/pagination-button/pagination-button.styles.js +2 -2
- package/dist/components/progress-bar/progress-bar.js +2 -2
- package/dist/components/radio/radio.d.ts +0 -1
- package/dist/components/radio/radio.js +2 -2
- package/dist/components/radio-button/radio-button.d.ts +0 -1
- package/dist/components/radio-button/radio-button.js +3 -3
- package/dist/components/radio-button/radio-button.styles.js +2 -2
- package/dist/components/radio-group/radio-group.d.ts +3 -0
- package/dist/components/radio-group/radio-group.js +1 -1
- package/dist/components/select/select.js +4 -4
- package/dist/components/spinner/spinner.d.ts +1 -1
- package/dist/components/spinner/spinner.js +2 -2
- package/dist/components/spinner/spinner.styles.js +1 -1
- package/dist/components/step/step.js +1 -1
- package/dist/components/table/table-action/table-action.d.ts +32 -0
- package/dist/components/table/table-action/table-action.js +15 -0
- package/dist/components/table/table-action/table-action.styles.d.ts +2 -0
- package/dist/components/table/table-action/table-action.styles.js +8 -0
- package/dist/components/table/table-caption/table-caption.js +2 -2
- package/dist/components/table/table-caption/table-caption.styles.js +1 -1
- package/dist/components/table/table-expanded-row/table-expanded-row.js +5 -42
- package/dist/components/table/table-header-cell/table-header-cell.js +2 -2
- package/dist/components/table/table-header-row/table-header-row.js +2 -2
- package/dist/components/table/table-toolbar/table-toolbar.d.ts +17 -0
- package/dist/components/table/table-toolbar/table-toolbar.js +10 -0
- package/dist/components/table/table-toolbar/table-toolbar.styles.d.ts +2 -0
- package/dist/components/table/table-toolbar/table-toolbar.styles.js +8 -0
- package/dist/components/table-container/table-container.d.ts +15 -2
- package/dist/components/table-container/table-container.js +3 -2
- package/dist/components/table-container/table-container.styles.js +1 -1
- package/dist/components/tag/tag.js +3 -3
- package/dist/components/textarea/textarea.js +2 -2
- package/dist/components/tree/tree.js +5 -5
- package/dist/components/tree-item/tree-item.js +5 -5
- package/dist/custom-elements.json +456 -22
- package/dist/design-system.d.ts +4 -0
- package/dist/design-system.js +83 -62
- package/dist/events/dsa-table-actions-close.d.ts +7 -0
- package/dist/events/dsa-table-actions-close.js +1 -0
- package/dist/events/events.d.ts +1 -0
- package/dist/themes/dsa-wc-theme.css +222 -0
- package/dist/themes/dsa-wc-theme.min.css +1 -1
- package/dist/themes/dsa-wc-theme.styles.js +222 -0
- package/dist/utilities/helpers.d.ts +1 -0
- package/dist/utilities/helpers.js +7 -0
- package/dist/vscode.html-custom-data.json +64 -3
- package/dist/web-types.json +238 -19
- package/package.json +2 -2
- package/dist/chunks/chunk.BFG2T6XK.js +0 -76
- package/dist/chunks/chunk.FWOMF5BY.js +0 -23
- package/dist/chunks/{chunk.PEAFJZ6C.js → chunk.2R6P5TGQ.js} +3 -3
- package/dist/chunks/{chunk.LJ7Y3MBX.js → chunk.2RNPEMKK.js} +3 -3
- package/dist/chunks/{chunk.G2S6QEJM.js → chunk.7XGLQBTT.js} +3 -3
- package/dist/chunks/{chunk.H7OOLAC7.js → chunk.CS2X5IKX.js} +3 -3
- package/dist/chunks/{chunk.KAXMDDPV.js → chunk.DEOM4Y53.js} +3 -3
- package/dist/chunks/{chunk.NZK7MHS3.js → chunk.EKECBGKK.js} +3 -3
- package/dist/chunks/{chunk.EFCI6CBB.js → chunk.FQXQIC6N.js} +3 -3
- package/dist/chunks/{chunk.RCSAV4XJ.js → chunk.GTNLFUMY.js} +3 -3
- package/dist/chunks/{chunk.5X3ZLYWR.js → chunk.IFRX2VEM.js} +3 -3
- package/dist/chunks/{chunk.CPEI3G7E.js → chunk.IVY7MTJ5.js} +3 -3
- package/dist/chunks/{chunk.OXPE4AH7.js → chunk.JLGAZ7Q6.js} +3 -3
- package/dist/chunks/{chunk.5QYMKLPJ.js → chunk.MU4OZP4G.js} +3 -3
- package/dist/chunks/{chunk.CW4YJC4U.js → chunk.N6P5LTWQ.js} +3 -3
- package/dist/chunks/{chunk.P6TKBTE3.js → chunk.R63T3XPH.js} +3 -3
- package/dist/chunks/{chunk.MMHCJ5DA.js → chunk.S625WSQN.js} +3 -3
- package/dist/chunks/{chunk.CFTA3QKA.js → chunk.UKEZHGD5.js} +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @ds-autonomie/web-components
|
|
2
2
|
|
|
3
|
+
## 1.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 81e058b: `table-container`, `table-action`: implémentation du composant `table-action`
|
|
8
|
+
- db19f1d: `button`, `spinner`, `icon-button`: ajout des nouveaux styles pour la surface de fond contrastée
|
|
9
|
+
- fbfd9d3: `table-toolbar`: implémentation du composant table-toolbar
|
|
10
|
+
- 44de0a2: `filter-button` : ajout du bouton de filtre
|
|
11
|
+
- 9bd1a84: `table-caption`: ajout d'un slot d'action sur le composant table-caption
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 27b8b53: `radio`, `radio-button`, `radio-group`, `checkbox`, `checkbox-button`, `checkbox-group`: les radio/checkbox à l'état `readonly` ne sont plus `disabled` mais `aria-disabled`; résolution bug de focus des radios
|
|
16
|
+
- e6379c6: `combobox`: résolution de non conformités sur le composant combobox
|
|
17
|
+
- 335662f: `combobox`: résolution des retours d'erreur sur la combobox
|
|
18
|
+
- Updated dependencies [db19f1d]
|
|
19
|
+
- @ds-autonomie/assets@1.3.0
|
|
20
|
+
|
|
3
21
|
## 1.9.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
filter_button_styles_default
|
|
3
|
+
} from "./chunk.TTAJYLMN.js";
|
|
4
|
+
import {
|
|
5
|
+
watch
|
|
6
|
+
} from "./chunk.6IH66JBY.js";
|
|
7
|
+
import {
|
|
8
|
+
ShoelaceElement
|
|
9
|
+
} from "./chunk.YCXTCVAZ.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk.6M63UXML.js";
|
|
13
|
+
|
|
14
|
+
// src/components/filter/filter-button/filter-button.ts
|
|
15
|
+
import { html } from "lit";
|
|
16
|
+
import { customElement, property, query } from "lit/decorators.js";
|
|
17
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
18
|
+
var DSAFilterButton = class extends ShoelaceElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.label = "";
|
|
22
|
+
this.selectedOption = "";
|
|
23
|
+
this.selectionCount = 0;
|
|
24
|
+
this.ariaExpanded = "false";
|
|
25
|
+
this.tabindex = 0;
|
|
26
|
+
}
|
|
27
|
+
handleLabelChange() {
|
|
28
|
+
this.setAttribute("title", this.label);
|
|
29
|
+
}
|
|
30
|
+
handleActiveFilter() {
|
|
31
|
+
if (this.selectionCount > 1) {
|
|
32
|
+
this.filterButton.classList.add("filter--active");
|
|
33
|
+
} else {
|
|
34
|
+
this.filterButton.classList.remove("filter--active");
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
handleOpenChange() {
|
|
38
|
+
if (this.ariaExpanded === "true") {
|
|
39
|
+
this.filterButton.classList.add("filter--open");
|
|
40
|
+
} else {
|
|
41
|
+
this.filterButton.classList.remove("filter--open");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
render() {
|
|
45
|
+
return html`
|
|
46
|
+
<button
|
|
47
|
+
class=${classMap({
|
|
48
|
+
"filter-button": true,
|
|
49
|
+
"filter--active": this.selectionCount > 0,
|
|
50
|
+
"filter--open": this.ariaExpanded === "true"
|
|
51
|
+
})}
|
|
52
|
+
>
|
|
53
|
+
<span class="label">${`${this.label} : `}</span>
|
|
54
|
+
|
|
55
|
+
${this.selectionCount > 1 ? html` <dsa-badge size="small"> ${this.selectionCount} </dsa-badge> ` : html` <span class="value"> ${this.selectedOption} </span> `}
|
|
56
|
+
|
|
57
|
+
<dsa-icon class="expand-icon" name="arrow_drop_down"></dsa-icon>
|
|
58
|
+
</button>
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
DSAFilterButton.styles = filter_button_styles_default;
|
|
63
|
+
__decorateClass([
|
|
64
|
+
query(".filter-button")
|
|
65
|
+
], DSAFilterButton.prototype, "filterButton", 2);
|
|
66
|
+
__decorateClass([
|
|
67
|
+
property()
|
|
68
|
+
], DSAFilterButton.prototype, "label", 2);
|
|
69
|
+
__decorateClass([
|
|
70
|
+
property({ attribute: "selected-option", reflect: true })
|
|
71
|
+
], DSAFilterButton.prototype, "selectedOption", 2);
|
|
72
|
+
__decorateClass([
|
|
73
|
+
property({ attribute: "selection-count", reflect: true })
|
|
74
|
+
], DSAFilterButton.prototype, "selectionCount", 2);
|
|
75
|
+
__decorateClass([
|
|
76
|
+
property({ attribute: "aria-expanded" })
|
|
77
|
+
], DSAFilterButton.prototype, "ariaExpanded", 2);
|
|
78
|
+
__decorateClass([
|
|
79
|
+
property({ reflect: true })
|
|
80
|
+
], DSAFilterButton.prototype, "tabindex", 2);
|
|
81
|
+
__decorateClass([
|
|
82
|
+
watch("label")
|
|
83
|
+
], DSAFilterButton.prototype, "handleLabelChange", 1);
|
|
84
|
+
__decorateClass([
|
|
85
|
+
watch("selection-count", { waitUntilFirstUpdate: true })
|
|
86
|
+
], DSAFilterButton.prototype, "handleActiveFilter", 1);
|
|
87
|
+
__decorateClass([
|
|
88
|
+
watch("aria-expanded", { waitUntilFirstUpdate: true })
|
|
89
|
+
], DSAFilterButton.prototype, "handleOpenChange", 1);
|
|
90
|
+
DSAFilterButton = __decorateClass([
|
|
91
|
+
customElement("dsa-filter-button")
|
|
92
|
+
], DSAFilterButton);
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
DSAFilterButton
|
|
96
|
+
};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import {
|
|
2
|
+
table_container_styles_default
|
|
3
|
+
} from "./chunk.4BPTV7TY.js";
|
|
4
|
+
import {
|
|
5
|
+
LoadingStateElement
|
|
6
|
+
} from "./chunk.PFGVYROJ.js";
|
|
7
|
+
import {
|
|
8
|
+
HasSlotController
|
|
9
|
+
} from "./chunk.YIY5RM53.js";
|
|
10
|
+
import {
|
|
11
|
+
watch
|
|
12
|
+
} from "./chunk.6IH66JBY.js";
|
|
13
|
+
import {
|
|
14
|
+
__decorateClass
|
|
15
|
+
} from "./chunk.6M63UXML.js";
|
|
16
|
+
|
|
17
|
+
// src/components/table-container/table-container.ts
|
|
18
|
+
import { html } from "lit";
|
|
19
|
+
import { customElement, property } from "lit/decorators.js";
|
|
20
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
21
|
+
var DSATableContainer = class extends LoadingStateElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.hasSlotController = new HasSlotController(this, "toolbar");
|
|
25
|
+
this.showTableActions = false;
|
|
26
|
+
}
|
|
27
|
+
connectedCallback() {
|
|
28
|
+
super.connectedCallback();
|
|
29
|
+
this.handleTableSelection = this.handleTableSelection.bind(this);
|
|
30
|
+
this.handleTableActionsClose = this.handleTableActionsClose.bind(this);
|
|
31
|
+
this.addEventListener(
|
|
32
|
+
"dsa-table-row-all-selected",
|
|
33
|
+
this.handleTableSelection
|
|
34
|
+
);
|
|
35
|
+
this.addEventListener("dsa-table-row-selected", this.handleTableSelection);
|
|
36
|
+
this.addEventListener(
|
|
37
|
+
"dsa-table-actions-close",
|
|
38
|
+
this.handleTableActionsClose
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
super.disconnectedCallback();
|
|
43
|
+
this.removeEventListener(
|
|
44
|
+
"dsa-table-row-all-selected",
|
|
45
|
+
this.handleTableSelection
|
|
46
|
+
);
|
|
47
|
+
this.removeEventListener(
|
|
48
|
+
"dsa-table-row-selected",
|
|
49
|
+
this.handleTableSelection
|
|
50
|
+
);
|
|
51
|
+
this.removeEventListener(
|
|
52
|
+
"dsa-table-actions-close",
|
|
53
|
+
this.handleTableActionsClose
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
handleTableActionsClose() {
|
|
57
|
+
this.showTableActions = false;
|
|
58
|
+
}
|
|
59
|
+
handleTableSelection(event) {
|
|
60
|
+
if (event.detail.selectedRows.length > 0) {
|
|
61
|
+
this.showTableActions = true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
handleShowTableActions() {
|
|
65
|
+
const actionBar = this.querySelector("dsa-table-action");
|
|
66
|
+
const toolbar = this.querySelector("dsa-table-toolbar");
|
|
67
|
+
if (actionBar !== null) {
|
|
68
|
+
actionBar.show = this.showTableActions;
|
|
69
|
+
}
|
|
70
|
+
if (toolbar !== null) {
|
|
71
|
+
if (this.showTableActions) {
|
|
72
|
+
toolbar.setAttribute("tabindex", "-1");
|
|
73
|
+
} else {
|
|
74
|
+
toolbar.removeAttribute("tabindex");
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
handleLoading() {
|
|
79
|
+
const caption = this.querySelector("dsa-table-caption");
|
|
80
|
+
if (caption) {
|
|
81
|
+
caption.loading = this.loading;
|
|
82
|
+
}
|
|
83
|
+
const head = this.querySelector("dsa-table-head");
|
|
84
|
+
if (head) {
|
|
85
|
+
head.loading = this.loading;
|
|
86
|
+
}
|
|
87
|
+
const body = this.querySelector("dsa-table-body");
|
|
88
|
+
if (body) {
|
|
89
|
+
body.loading = this.loading;
|
|
90
|
+
}
|
|
91
|
+
const pagination = this.querySelector("dsa-pagination");
|
|
92
|
+
if (pagination) {
|
|
93
|
+
pagination.loading = this.loading;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
handleSkeletonEffectChange() {
|
|
97
|
+
const caption = this.querySelector("dsa-table-caption");
|
|
98
|
+
if (caption) {
|
|
99
|
+
caption.skeletonEffect = this.skeletonEffect;
|
|
100
|
+
}
|
|
101
|
+
const head = this.querySelector("dsa-table-head");
|
|
102
|
+
if (head) {
|
|
103
|
+
head.skeletonEffect = this.skeletonEffect;
|
|
104
|
+
}
|
|
105
|
+
const body = this.querySelector("dsa-table-body");
|
|
106
|
+
if (body) {
|
|
107
|
+
body.skeletonEffect = this.skeletonEffect;
|
|
108
|
+
}
|
|
109
|
+
const pagination = this.querySelector("dsa-pagination");
|
|
110
|
+
if (pagination) {
|
|
111
|
+
pagination.skeletonEffect = this.skeletonEffect;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
render() {
|
|
115
|
+
const hasToolbar = this.hasSlotController.test("toolbar");
|
|
116
|
+
return html`
|
|
117
|
+
<slot part="caption" name="caption"></slot>
|
|
118
|
+
<slot part="export" name="export"></slot>
|
|
119
|
+
<div
|
|
120
|
+
part="bar-container"
|
|
121
|
+
class=${classMap({
|
|
122
|
+
"bar-container--has-toolbar": hasToolbar
|
|
123
|
+
})}
|
|
124
|
+
>
|
|
125
|
+
<slot part="toolbar" name="toolbar"></slot>
|
|
126
|
+
<slot part="action" name="action"></slot>
|
|
127
|
+
</div>
|
|
128
|
+
<slot part="table" name="table"></slot>
|
|
129
|
+
<slot part="pagination" name="pagination"></slot>
|
|
130
|
+
`;
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
DSATableContainer.styles = table_container_styles_default;
|
|
134
|
+
__decorateClass([
|
|
135
|
+
property({ attribute: "show-table-actions", reflect: true, type: Boolean })
|
|
136
|
+
], DSATableContainer.prototype, "showTableActions", 2);
|
|
137
|
+
__decorateClass([
|
|
138
|
+
watch("showTableActions")
|
|
139
|
+
], DSATableContainer.prototype, "handleShowTableActions", 1);
|
|
140
|
+
__decorateClass([
|
|
141
|
+
watch("loading")
|
|
142
|
+
], DSATableContainer.prototype, "handleLoading", 1);
|
|
143
|
+
__decorateClass([
|
|
144
|
+
watch("skeletonEffect")
|
|
145
|
+
], DSATableContainer.prototype, "handleSkeletonEffectChange", 1);
|
|
146
|
+
DSATableContainer = __decorateClass([
|
|
147
|
+
customElement("dsa-table-container")
|
|
148
|
+
], DSATableContainer);
|
|
149
|
+
|
|
150
|
+
export {
|
|
151
|
+
DSATableContainer
|
|
152
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
component_styles_default
|
|
3
|
+
} from "./chunk.TUVJKY7S.js";
|
|
4
|
+
|
|
5
|
+
// src/components/table-container/table-container.styles.ts
|
|
6
|
+
import { css } from "lit";
|
|
7
|
+
var table_container_styles_default = css`
|
|
8
|
+
${component_styles_default}
|
|
9
|
+
|
|
10
|
+
:host {
|
|
11
|
+
display: grid;
|
|
12
|
+
grid-template-areas:
|
|
13
|
+
'caption export'
|
|
14
|
+
'bar bar'
|
|
15
|
+
'table table'
|
|
16
|
+
'pagination pagination';
|
|
17
|
+
grid-gap: var(--dsa-spacing-12);
|
|
18
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[part~='caption']::slotted(*) {
|
|
22
|
+
grid-area: caption;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[part~='export']::slotted(*) {
|
|
26
|
+
grid-area: export;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[part~='table']::slotted(*) {
|
|
30
|
+
grid-area: table;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[part~='bar-container'] {
|
|
34
|
+
grid-area: bar;
|
|
35
|
+
position: relative;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.bar-container--has-toolbar [part~='action']::slotted(*) {
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 0px;
|
|
41
|
+
left: 0px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[part~='pagination']::slotted(*) {
|
|
45
|
+
grid-area: pagination;
|
|
46
|
+
display: block;
|
|
47
|
+
padding: var(--dsa-spacing-12) var(--dsa-spacing-8);
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
table_container_styles_default
|
|
53
|
+
};
|
|
@@ -160,15 +160,17 @@ var DSARadioGroup = class extends ShoelaceElement {
|
|
|
160
160
|
event.preventDefault();
|
|
161
161
|
}
|
|
162
162
|
handleLabelClick() {
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
const availableRadios = this.getAllRadios().filter(
|
|
164
|
+
(radio) => !radio.disabled && !radio.readonly
|
|
165
|
+
);
|
|
166
|
+
const checked = availableRadios.find((radio) => radio.checked);
|
|
167
|
+
const radioToFocus = checked || availableRadios[0];
|
|
166
168
|
if (radioToFocus) {
|
|
167
169
|
radioToFocus.focus();
|
|
168
170
|
}
|
|
169
171
|
}
|
|
170
172
|
handleSlotChange() {
|
|
171
|
-
var _a
|
|
173
|
+
var _a;
|
|
172
174
|
if (customElements.get("dsa-radio") || customElements.get("dsa-radio-button")) {
|
|
173
175
|
const radios = this.getAllRadios();
|
|
174
176
|
let hasAtLeastOneCheckedRadio = false;
|
|
@@ -186,29 +188,9 @@ var DSARadioGroup = class extends ShoelaceElement {
|
|
|
186
188
|
hasAtLeastOneCheckedRadio = radio.checked || hasAtLeastOneCheckedRadio;
|
|
187
189
|
});
|
|
188
190
|
this.updateCheckedRadio();
|
|
189
|
-
|
|
190
|
-
if (this.hasRadioButtons) {
|
|
191
|
-
const buttonRadio = (_b = (_a = radios.find((radio) => {
|
|
192
|
-
if (radio.tagName.toLowerCase() === "dsa-radio-button" && radio.readonly) {
|
|
193
|
-
return false;
|
|
194
|
-
} else {
|
|
195
|
-
return !radio.disabled;
|
|
196
|
-
}
|
|
197
|
-
})) == null ? void 0 : _a.shadowRoot) == null ? void 0 : _b.querySelector("button");
|
|
198
|
-
if (buttonRadio) {
|
|
199
|
-
buttonRadio.tabIndex = 0;
|
|
200
|
-
}
|
|
201
|
-
} else {
|
|
202
|
-
const firstNonDisabledRadio = radios.find(
|
|
203
|
-
(radio) => !radio.disabled && !radio.readonly
|
|
204
|
-
);
|
|
205
|
-
if (firstNonDisabledRadio) {
|
|
206
|
-
firstNonDisabledRadio.tabIndex = 0;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
191
|
+
this.updateTabIndexes();
|
|
210
192
|
if (this.hasRadioButtons) {
|
|
211
|
-
const buttonGroup = (
|
|
193
|
+
const buttonGroup = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(
|
|
212
194
|
"dsa-internal-button-group"
|
|
213
195
|
);
|
|
214
196
|
if (buttonGroup) {
|
|
@@ -226,26 +208,32 @@ var DSARadioGroup = class extends ShoelaceElement {
|
|
|
226
208
|
}
|
|
227
209
|
updateCheckedRadio() {
|
|
228
210
|
const radios = this.getAllRadios();
|
|
229
|
-
radios.forEach((radio
|
|
211
|
+
radios.forEach((radio) => {
|
|
230
212
|
var _a;
|
|
231
213
|
radio.checked = radio.value === this.value;
|
|
232
|
-
const shouldFocus = this.value === "" && index === 0;
|
|
233
214
|
if (this.hasRadioButtons) {
|
|
234
215
|
const radioButton = radio;
|
|
235
|
-
radioButton.
|
|
236
|
-
radioButton.disabled = (_a = this.readonlyRadioButtonValue.get(this.value)) != null ? _a : radioButton.disabled;
|
|
237
|
-
if (shouldFocus) {
|
|
238
|
-
radioButton.button.focus();
|
|
239
|
-
}
|
|
240
|
-
} else {
|
|
241
|
-
radio.tabIndex = shouldFocus || radio.checked && !radio.readonly ? 0 : -1;
|
|
242
|
-
if (shouldFocus) {
|
|
243
|
-
radio.focus();
|
|
244
|
-
}
|
|
216
|
+
radioButton.readonly = (_a = this.readonlyRadioButtonValue.get(this.value)) != null ? _a : radioButton.readonly;
|
|
245
217
|
}
|
|
246
218
|
});
|
|
219
|
+
this.updateTabIndexes();
|
|
247
220
|
this.formControlController.setValidity(this.validity.valid);
|
|
248
221
|
}
|
|
222
|
+
updateTabIndexes() {
|
|
223
|
+
const radios = this.getAllRadios();
|
|
224
|
+
const firstAvailableRadioIndex = radios.findIndex(
|
|
225
|
+
(radio) => !radio.disabled && !radio.readonly
|
|
226
|
+
);
|
|
227
|
+
radios.forEach((radio, index) => {
|
|
228
|
+
const shouldFocus = radio.checked && !radio.readonly || this.value === "" && index === firstAvailableRadioIndex;
|
|
229
|
+
if (this.hasRadioButtons) {
|
|
230
|
+
const radioButton = radio;
|
|
231
|
+
radioButton.button.tabIndex = shouldFocus ? 0 : -1;
|
|
232
|
+
} else {
|
|
233
|
+
radio.tabIndex = shouldFocus ? 0 : -1;
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
}
|
|
249
237
|
handleValueChange() {
|
|
250
238
|
if (this.hasUpdated) {
|
|
251
239
|
this.updateCheckedRadio();
|
|
@@ -258,6 +246,16 @@ var DSARadioGroup = class extends ShoelaceElement {
|
|
|
258
246
|
this.removeAttribute("aria-invalid");
|
|
259
247
|
}
|
|
260
248
|
}
|
|
249
|
+
handleDisabledChange() {
|
|
250
|
+
if (this.disabled) {
|
|
251
|
+
this.getAllRadios().forEach((radio) => radio.disabled = this.disabled);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
handleReadonlyChange() {
|
|
255
|
+
if (this.readonly) {
|
|
256
|
+
this.getAllRadios().forEach((radio) => radio.readonly = this.readonly);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
261
259
|
/** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
|
|
262
260
|
checkValidity() {
|
|
263
261
|
const isRequiredAndEmpty = this.required && !this.value;
|
|
@@ -318,6 +316,7 @@ var DSARadioGroup = class extends ShoelaceElement {
|
|
|
318
316
|
role="radiogroup"
|
|
319
317
|
aria-labelledby="label"
|
|
320
318
|
aria-describedby=${this.error ? "error-text help-text" : "help-text"}
|
|
319
|
+
aria-invalid=${this.error}
|
|
321
320
|
>
|
|
322
321
|
<label
|
|
323
322
|
part="form-control-label"
|
|
@@ -383,6 +382,7 @@ var DSARadioGroup = class extends ShoelaceElement {
|
|
|
383
382
|
${this.error ? html`<dsa-error-text
|
|
384
383
|
id="error-text"
|
|
385
384
|
class="form-control__error-text"
|
|
385
|
+
aria-live="assertive"
|
|
386
386
|
>${this.customValidityError !== "" ? this.customValidityError : this.errorMessage}</dsa-error-text
|
|
387
387
|
>` : ""}
|
|
388
388
|
</fieldset>
|
|
@@ -447,6 +447,12 @@ __decorateClass([
|
|
|
447
447
|
__decorateClass([
|
|
448
448
|
watch("error")
|
|
449
449
|
], DSARadioGroup.prototype, "handleErrorChange", 1);
|
|
450
|
+
__decorateClass([
|
|
451
|
+
watch("disabled")
|
|
452
|
+
], DSARadioGroup.prototype, "handleDisabledChange", 1);
|
|
453
|
+
__decorateClass([
|
|
454
|
+
watch("readonly")
|
|
455
|
+
], DSARadioGroup.prototype, "handleReadonlyChange", 1);
|
|
450
456
|
DSARadioGroup = __decorateClass([
|
|
451
457
|
customElement("dsa-radio-group")
|
|
452
458
|
], DSARadioGroup);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
table_caption_styles_default
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.7QLN4D3Q.js";
|
|
4
4
|
import {
|
|
5
5
|
LoadingStateElement
|
|
6
6
|
} from "./chunk.PFGVYROJ.js";
|
|
@@ -42,7 +42,7 @@ var DSATableCaption = class extends LoadingStateElement {
|
|
|
42
42
|
${this.loading && hasSubtitle ? html`<dsa-skeleton
|
|
43
43
|
class="subtitle-skeleton"
|
|
44
44
|
effect=${this.skeletonEffect}
|
|
45
|
-
></dsa-skeleton>` : html
|
|
45
|
+
></dsa-skeleton>` : html`<slot part="subtitle" name="subtitle"></slot> `}
|
|
46
46
|
${this.loading && hasTotalItems ? html`<dsa-skeleton
|
|
47
47
|
class="total-items-skeleton"
|
|
48
48
|
effect=${this.skeletonEffect}
|
|
@@ -17,10 +17,6 @@ var table_caption_styles_default = css`
|
|
|
17
17
|
margin: 0;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
:host ::slotted(*:not(:first-child)) {
|
|
21
|
-
margin-top: var(--dsa-spacing-8);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
20
|
[part~='title']::slotted(*) {
|
|
25
21
|
font: var(--dsa-font-large-bold);
|
|
26
22
|
color: var(--dsa-color-text-on-base-primary);
|
|
@@ -29,11 +25,13 @@ var table_caption_styles_default = css`
|
|
|
29
25
|
[part~='subtitle']::slotted(*) {
|
|
30
26
|
font: var(--dsa-font-small-normal);
|
|
31
27
|
color: var(--dsa-color-text-on-base-primary);
|
|
28
|
+
margin-top: var(--dsa-spacing-8);
|
|
32
29
|
}
|
|
33
30
|
|
|
34
31
|
[part~='total-items'] {
|
|
35
32
|
display: none;
|
|
36
|
-
margin:
|
|
33
|
+
margin: 0;
|
|
34
|
+
margin-top: var(--dsa-spacing-8);
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
.has-total-items {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/utilities/helpers.ts
|
|
2
|
+
function normalizeStr(str) {
|
|
3
|
+
const withoutAccents = str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
4
|
+
const lowerCaseString = withoutAccents.toLowerCase();
|
|
5
|
+
const trimmedString = lowerCaseString.replace(/\s+/g, " ").trim();
|
|
6
|
+
return trimmedString;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
normalizeStr
|
|
11
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
table_expanded_row_styles_default
|
|
3
|
+
} from "./chunk.47IWI2IO.js";
|
|
4
|
+
import {
|
|
5
|
+
ShoelaceElement
|
|
6
|
+
} from "./chunk.YCXTCVAZ.js";
|
|
7
|
+
import {
|
|
8
|
+
__decorateClass
|
|
9
|
+
} from "./chunk.6M63UXML.js";
|
|
10
|
+
|
|
11
|
+
// src/components/table/table-expanded-row/table-expanded-row.ts
|
|
12
|
+
import { html } from "lit";
|
|
13
|
+
import { customElement, property } from "lit/decorators.js";
|
|
14
|
+
var DSATableExpandedRow = class extends ShoelaceElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.role = "row";
|
|
18
|
+
this.colSpan = 1;
|
|
19
|
+
this.expanded = false;
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return html`
|
|
23
|
+
<td class="expanded-row" colspan=${this.colSpan}>
|
|
24
|
+
<div>
|
|
25
|
+
<slot></slot>
|
|
26
|
+
</div>
|
|
27
|
+
</td>
|
|
28
|
+
`;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
DSATableExpandedRow.styles = table_expanded_row_styles_default;
|
|
32
|
+
__decorateClass([
|
|
33
|
+
property({ reflect: true })
|
|
34
|
+
], DSATableExpandedRow.prototype, "role", 2);
|
|
35
|
+
__decorateClass([
|
|
36
|
+
property({ type: Number, attribute: "colspan" })
|
|
37
|
+
], DSATableExpandedRow.prototype, "colSpan", 2);
|
|
38
|
+
__decorateClass([
|
|
39
|
+
property({ type: Boolean, reflect: true })
|
|
40
|
+
], DSATableExpandedRow.prototype, "expanded", 2);
|
|
41
|
+
DSATableExpandedRow = __decorateClass([
|
|
42
|
+
customElement("dsa-table-expanded-row")
|
|
43
|
+
], DSATableExpandedRow);
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
DSATableExpandedRow
|
|
47
|
+
};
|