smoothly 0.3.17 → 0.3.19
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/cjs/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-accordion_53.cjs.entry.js +81 -19
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/components/table/cell/index.js +1 -1
- package/dist/collection/components/table/cell/style.css +18 -0
- package/dist/collection/components/table/demo/index.js +1 -0
- package/dist/collection/components/table/demo/style.css +7 -0
- package/dist/collection/components/table/expandable/cell/index.js +66 -5
- package/dist/collection/components/table/expandable/cell/style.css +36 -8
- package/dist/collection/components/table/expandable/row/index.js +69 -6
- package/dist/collection/components/table/expandable/row/style.css +45 -19
- package/dist/collection/components/table/header/style.css +1 -1
- package/dist/collection/components/table/index.js +115 -4
- package/dist/collection/components/table/style.css +10 -3
- package/dist/custom-elements/index.js +84 -22
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_53.entry.js +81 -19
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/{p-0c774f8d.entry.js → p-8dd649c3.entry.js} +1 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/table/expandable/cell/index.d.ts +16 -8
- package/dist/types/components/table/expandable/row/index.d.ts +15 -6
- package/dist/types/components/table/index.d.ts +22 -3
- package/dist/types/components.d.ts +9 -1
- package/package.json +1 -1
|
@@ -1,23 +1,38 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
2
|
export class TableExpandableRow {
|
|
3
3
|
constructor() {
|
|
4
|
+
this.allowSpotlight = true;
|
|
5
|
+
this.spotlight = true;
|
|
4
6
|
this.align = "left";
|
|
5
7
|
}
|
|
6
|
-
openChanged(
|
|
8
|
+
openChanged() {
|
|
7
9
|
if (this.expansionElement)
|
|
8
10
|
this.element.after(this.expansionElement);
|
|
11
|
+
this.expandableChange.emit(this.open);
|
|
9
12
|
}
|
|
10
|
-
|
|
11
|
-
this.
|
|
12
|
-
|
|
13
|
+
handleSpotlight() {
|
|
14
|
+
this.spotlight = this.open && this.allowSpotlight;
|
|
15
|
+
}
|
|
16
|
+
componentWillLoad() {
|
|
17
|
+
this.expandableLoad.emit({
|
|
18
|
+
allowSpotlight: (allowed) => (this.allowSpotlight = allowed),
|
|
19
|
+
});
|
|
13
20
|
}
|
|
14
21
|
componentDidRender() {
|
|
15
22
|
this.expansionOpen.emit(this.expansionElement);
|
|
16
23
|
if (this.expansionElement && this.open)
|
|
17
24
|
this.element.after(this.expansionElement);
|
|
18
25
|
}
|
|
26
|
+
onClick(event) {
|
|
27
|
+
event.stopPropagation();
|
|
28
|
+
this.open = !this.open;
|
|
29
|
+
}
|
|
30
|
+
handleTableLoaded(event) {
|
|
31
|
+
event.stopPropagation();
|
|
32
|
+
event.detail(this.element);
|
|
33
|
+
}
|
|
19
34
|
render() {
|
|
20
|
-
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("
|
|
35
|
+
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("tr", { class: this.spotlight ? "spotlight" : "", ref: e => (this.expansionElement = e) }, h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, h("slot", { name: "detail" })))));
|
|
21
36
|
}
|
|
22
37
|
static get is() { return "smoothly-table-expandable-row"; }
|
|
23
38
|
static get encapsulation() { return "scoped"; }
|
|
@@ -70,6 +85,12 @@ export class TableExpandableRow {
|
|
|
70
85
|
}
|
|
71
86
|
};
|
|
72
87
|
}
|
|
88
|
+
static get states() {
|
|
89
|
+
return {
|
|
90
|
+
"allowSpotlight": {},
|
|
91
|
+
"spotlight": {}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
73
94
|
static get events() {
|
|
74
95
|
return [{
|
|
75
96
|
"method": "expansionOpen",
|
|
@@ -90,6 +111,36 @@ export class TableExpandableRow {
|
|
|
90
111
|
}
|
|
91
112
|
}
|
|
92
113
|
}
|
|
114
|
+
}, {
|
|
115
|
+
"method": "expandableChange",
|
|
116
|
+
"name": "expandableChange",
|
|
117
|
+
"bubbles": true,
|
|
118
|
+
"cancelable": true,
|
|
119
|
+
"composed": true,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": ""
|
|
123
|
+
},
|
|
124
|
+
"complexType": {
|
|
125
|
+
"original": "boolean",
|
|
126
|
+
"resolved": "boolean",
|
|
127
|
+
"references": {}
|
|
128
|
+
}
|
|
129
|
+
}, {
|
|
130
|
+
"method": "expandableLoad",
|
|
131
|
+
"name": "expandableLoad",
|
|
132
|
+
"bubbles": true,
|
|
133
|
+
"cancelable": true,
|
|
134
|
+
"composed": true,
|
|
135
|
+
"docs": {
|
|
136
|
+
"tags": [],
|
|
137
|
+
"text": ""
|
|
138
|
+
},
|
|
139
|
+
"complexType": {
|
|
140
|
+
"original": "{ allowSpotlight: (allowed: boolean) => void }",
|
|
141
|
+
"resolved": "{ allowSpotlight: (allowed: boolean) => void; }",
|
|
142
|
+
"references": {}
|
|
143
|
+
}
|
|
93
144
|
}];
|
|
94
145
|
}
|
|
95
146
|
static get elementRef() { return "element"; }
|
|
@@ -97,6 +148,12 @@ export class TableExpandableRow {
|
|
|
97
148
|
return [{
|
|
98
149
|
"propName": "open",
|
|
99
150
|
"methodName": "openChanged"
|
|
151
|
+
}, {
|
|
152
|
+
"propName": "open",
|
|
153
|
+
"methodName": "handleSpotlight"
|
|
154
|
+
}, {
|
|
155
|
+
"propName": "allowSpotlight",
|
|
156
|
+
"methodName": "handleSpotlight"
|
|
100
157
|
}];
|
|
101
158
|
}
|
|
102
159
|
static get listeners() {
|
|
@@ -106,6 +163,12 @@ export class TableExpandableRow {
|
|
|
106
163
|
"target": undefined,
|
|
107
164
|
"capture": false,
|
|
108
165
|
"passive": false
|
|
166
|
+
}, {
|
|
167
|
+
"name": "tableLoad",
|
|
168
|
+
"method": "handleTableLoaded",
|
|
169
|
+
"target": undefined,
|
|
170
|
+
"capture": false,
|
|
171
|
+
"passive": false
|
|
109
172
|
}];
|
|
110
173
|
}
|
|
111
174
|
}
|
|
@@ -7,33 +7,59 @@
|
|
|
7
7
|
position: relative;
|
|
8
8
|
z-index: 3;
|
|
9
9
|
background-color: rgb(var(--smoothly-default-color));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
:host smoothly-icon {
|
|
14
|
-
width: 0.6rem;
|
|
15
|
-
height: 1rem;
|
|
16
|
-
margin-top: -1rem;
|
|
17
|
-
margin-left: -1rem;
|
|
18
|
-
transition: transform 0.2s;
|
|
19
|
-
display: flex;
|
|
20
|
-
height: 100%;
|
|
10
|
+
box-shadow: -1px 0 0 0 rgb(var(--smoothly-dark-color)) inset,
|
|
11
|
+
1px 0 0 0 rgb(var(--smoothly-dark-color)) inset;
|
|
21
12
|
}
|
|
22
|
-
:host[open]
|
|
23
|
-
|
|
13
|
+
:host[open]::slotted(smoothly-table-cell) {
|
|
14
|
+
border-bottom: none;
|
|
24
15
|
}
|
|
25
16
|
|
|
26
17
|
.hide {
|
|
27
18
|
display: none;
|
|
28
19
|
}
|
|
29
|
-
|
|
20
|
+
:host > tr > td {
|
|
21
|
+
position: relative;
|
|
22
|
+
}
|
|
23
|
+
td::slotted(*) {
|
|
24
|
+
--expansion-width: 1.5rem;
|
|
25
|
+
--expansion-border-width: 3px;
|
|
30
26
|
position: relative;
|
|
31
27
|
background-color: rgb(var(--smoothly-default-color));
|
|
32
|
-
width:
|
|
33
|
-
left: -
|
|
34
|
-
border-left
|
|
35
|
-
border-left-color: rgb(var(--smoothly-tertiary-color));
|
|
28
|
+
width: calc(100% + 3rem - var(--expansion-border-width));
|
|
29
|
+
left: calc(-1 * var(--expansion-width));
|
|
30
|
+
border-left: var(--expansion-border-width) solid rgb(0, 0, 0, 0);
|
|
36
31
|
box-shadow: 0px 0px 4px 2px rgb(var(--smoothly-dark-color));
|
|
37
32
|
box-sizing: border-box;
|
|
38
|
-
padding: 0.5rem
|
|
33
|
+
padding: 0.5rem calc(var(--expansion-width) - var(--expansion-border-width));
|
|
34
|
+
border-bottom: 1px solid rgb(var(--smoothly-dark-color));
|
|
35
|
+
border-left-width: 3px;
|
|
36
|
+
}
|
|
37
|
+
tr.spotlight > td::slotted(*) {
|
|
38
|
+
border-left-color: rgb(var(--smoothly-tertiary-color));
|
|
39
|
+
}
|
|
40
|
+
td::slotted(*)::before {
|
|
41
|
+
content: "";
|
|
42
|
+
position: absolute;
|
|
43
|
+
display: flex;
|
|
44
|
+
top: 0;
|
|
45
|
+
bottom: 0;
|
|
46
|
+
left: -3px;
|
|
47
|
+
width: calc(var(--expansion-width) + 1px);
|
|
48
|
+
border-top: 1px solid rgb(var(--smoothly-dark-color));
|
|
49
|
+
}
|
|
50
|
+
td::slotted(*)::after {
|
|
51
|
+
content: "";
|
|
52
|
+
position: absolute;
|
|
53
|
+
display: flex;
|
|
54
|
+
top: 0;
|
|
55
|
+
bottom: 0;
|
|
56
|
+
right: 0;
|
|
57
|
+
width: calc(var(--expansion-width) -1px);
|
|
58
|
+
border-top: 1px solid rgb(var(--smoothly-dark-color));
|
|
59
|
+
}
|
|
60
|
+
:host::slotted(smoothly-table-cell:last-of-type) smoothly-icon {
|
|
61
|
+
display: flex;
|
|
62
|
+
}
|
|
63
|
+
:host[open]::slotted(smoothly-table-cell:last-of-type) smoothly-icon {
|
|
64
|
+
transform: rotate(90deg);
|
|
39
65
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: table-cell;
|
|
3
3
|
line-height: 2.5rem;
|
|
4
|
-
background-color: rgb(var(--smoothly-color-shade));
|
|
5
4
|
border-bottom: 1px solid rgb(var(--smoothly-dark-color));
|
|
5
|
+
border-top: 1px solid rgb(var(--smoothly-dark-color));
|
|
6
6
|
padding-left: 1rem;
|
|
7
7
|
font-weight: bold;
|
|
8
8
|
}
|
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class Table {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.expandable = new Map();
|
|
5
|
+
this.expanded = new Set();
|
|
6
|
+
this.root = true;
|
|
7
|
+
}
|
|
8
|
+
componentWillLoad() {
|
|
9
|
+
this.smoothlyNestedTable.emit(() => (this.root = false));
|
|
10
|
+
this.tableLoad.emit((owner) => (this.owner = owner));
|
|
11
|
+
}
|
|
12
|
+
handleExpandableLoaded(event) {
|
|
13
|
+
event.stopPropagation();
|
|
14
|
+
event.target && this.expandable.set(event.target, event.detail);
|
|
15
|
+
}
|
|
16
|
+
handleExpandableState(event) {
|
|
17
|
+
event.stopPropagation();
|
|
18
|
+
event.target && (event.detail ? this.expanded.add(event.target) : this.expanded.delete(event.target));
|
|
19
|
+
this.spotlightChange.emit({ allowSpotlight: !this.expanded.size, owner: this.owner });
|
|
20
|
+
}
|
|
21
|
+
handleSpotlightState(event) {
|
|
22
|
+
var _a;
|
|
23
|
+
event.target != this.element &&
|
|
24
|
+
(event.stopPropagation(),
|
|
25
|
+
event.detail.owner && ((_a = this.expandable.get(event.detail.owner)) === null || _a === void 0 ? void 0 : _a.allowSpotlight(event.detail.allowSpotlight)));
|
|
26
|
+
}
|
|
27
|
+
handleNestedTable(event) {
|
|
28
|
+
event.target != this.element && (event.stopPropagation(), event.detail());
|
|
29
|
+
}
|
|
3
30
|
handleEvents(event) {
|
|
4
31
|
event.stopPropagation();
|
|
5
32
|
}
|
|
@@ -18,10 +45,32 @@ export class Table {
|
|
|
18
45
|
"$": ["style.css"]
|
|
19
46
|
};
|
|
20
47
|
}
|
|
48
|
+
static get properties() {
|
|
49
|
+
return {
|
|
50
|
+
"root": {
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"mutable": true,
|
|
53
|
+
"complexType": {
|
|
54
|
+
"original": "boolean",
|
|
55
|
+
"resolved": "boolean",
|
|
56
|
+
"references": {}
|
|
57
|
+
},
|
|
58
|
+
"required": false,
|
|
59
|
+
"optional": false,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": ""
|
|
63
|
+
},
|
|
64
|
+
"attribute": "root",
|
|
65
|
+
"reflect": true,
|
|
66
|
+
"defaultValue": "true"
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
21
70
|
static get events() {
|
|
22
71
|
return [{
|
|
23
|
-
"method": "
|
|
24
|
-
"name": "
|
|
72
|
+
"method": "smoothlyNestedTable",
|
|
73
|
+
"name": "smoothlyNestedTable",
|
|
25
74
|
"bubbles": true,
|
|
26
75
|
"cancelable": true,
|
|
27
76
|
"composed": true,
|
|
@@ -30,15 +79,77 @@ export class Table {
|
|
|
30
79
|
"text": ""
|
|
31
80
|
},
|
|
32
81
|
"complexType": {
|
|
33
|
-
"original": "void",
|
|
34
|
-
"resolved": "void",
|
|
82
|
+
"original": "() => void",
|
|
83
|
+
"resolved": "() => void",
|
|
35
84
|
"references": {}
|
|
36
85
|
}
|
|
86
|
+
}, {
|
|
87
|
+
"method": "spotlightChange",
|
|
88
|
+
"name": "spotlightChange",
|
|
89
|
+
"bubbles": true,
|
|
90
|
+
"cancelable": true,
|
|
91
|
+
"composed": true,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": ""
|
|
95
|
+
},
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "{ allowSpotlight: boolean; owner?: EventTarget }",
|
|
98
|
+
"resolved": "{ allowSpotlight: boolean; owner?: EventTarget | undefined; }",
|
|
99
|
+
"references": {
|
|
100
|
+
"EventTarget": {
|
|
101
|
+
"location": "global"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}, {
|
|
106
|
+
"method": "tableLoad",
|
|
107
|
+
"name": "tableLoad",
|
|
108
|
+
"bubbles": true,
|
|
109
|
+
"cancelable": true,
|
|
110
|
+
"composed": true,
|
|
111
|
+
"docs": {
|
|
112
|
+
"tags": [],
|
|
113
|
+
"text": ""
|
|
114
|
+
},
|
|
115
|
+
"complexType": {
|
|
116
|
+
"original": "(owner: EventTarget) => void",
|
|
117
|
+
"resolved": "(owner: EventTarget) => void",
|
|
118
|
+
"references": {
|
|
119
|
+
"EventTarget": {
|
|
120
|
+
"location": "global"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
37
124
|
}];
|
|
38
125
|
}
|
|
39
126
|
static get elementRef() { return "element"; }
|
|
40
127
|
static get listeners() {
|
|
41
128
|
return [{
|
|
129
|
+
"name": "expandableLoad",
|
|
130
|
+
"method": "handleExpandableLoaded",
|
|
131
|
+
"target": undefined,
|
|
132
|
+
"capture": false,
|
|
133
|
+
"passive": false
|
|
134
|
+
}, {
|
|
135
|
+
"name": "expandableChange",
|
|
136
|
+
"method": "handleExpandableState",
|
|
137
|
+
"target": undefined,
|
|
138
|
+
"capture": false,
|
|
139
|
+
"passive": false
|
|
140
|
+
}, {
|
|
141
|
+
"name": "spotlightChange",
|
|
142
|
+
"method": "handleSpotlightState",
|
|
143
|
+
"target": undefined,
|
|
144
|
+
"capture": false,
|
|
145
|
+
"passive": false
|
|
146
|
+
}, {
|
|
147
|
+
"name": "smoothlyNestedTable",
|
|
148
|
+
"method": "handleNestedTable",
|
|
149
|
+
"target": undefined,
|
|
150
|
+
"capture": false,
|
|
151
|
+
"passive": false
|
|
152
|
+
}, {
|
|
42
153
|
"name": "expansionLoad",
|
|
43
154
|
"method": "handleEvents",
|
|
44
155
|
"target": undefined,
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: table;
|
|
3
|
-
border-collapse: collapse;
|
|
4
|
-
border: 1px solid rgb(var(--smoothly-dark-color));
|
|
5
3
|
width: var(--table-width, 80%);
|
|
6
4
|
box-sizing: border-box;
|
|
7
5
|
background-color: rgb(var(--smoothly-default-color));
|
|
8
|
-
|
|
6
|
+
}
|
|
7
|
+
:host[root] {
|
|
8
|
+
margin-left: auto;
|
|
9
|
+
margin-right: auto;
|
|
10
|
+
margin-left: 1.5rem;
|
|
11
|
+
margin-right: 1.5rem;
|
|
12
|
+
}
|
|
13
|
+
:host:not([root]) {
|
|
14
|
+
margin: 0;
|
|
15
|
+
width: 100%;
|
|
9
16
|
}
|
|
@@ -48354,13 +48354,40 @@ const SmoothlyTabSwitch$1 = class extends HTMLElement {
|
|
|
48354
48354
|
static get style() { return styleCss$a; }
|
|
48355
48355
|
};
|
|
48356
48356
|
|
|
48357
|
-
const styleCss$9 = ".sc-smoothly-table-h{display:table;
|
|
48357
|
+
const styleCss$9 = ".sc-smoothly-table-h{display:table;width:var(--table-width, 80%);box-sizing:border-box;background-color:rgb(var(--smoothly-default-color))}[root].sc-smoothly-table-h{margin-left:auto;margin-right:auto;margin-left:1.5rem;margin-right:1.5rem}.sc-smoothly-table-h:not([root]){margin:0;width:100%}";
|
|
48358
48358
|
|
|
48359
48359
|
const Table = class extends HTMLElement {
|
|
48360
48360
|
constructor() {
|
|
48361
48361
|
super();
|
|
48362
48362
|
this.__registerHost();
|
|
48363
|
-
this.
|
|
48363
|
+
this.smoothlyNestedTable = createEvent(this, "smoothlyNestedTable", 7);
|
|
48364
|
+
this.spotlightChange = createEvent(this, "spotlightChange", 7);
|
|
48365
|
+
this.tableLoad = createEvent(this, "tableLoad", 7);
|
|
48366
|
+
this.expandable = new Map();
|
|
48367
|
+
this.expanded = new Set();
|
|
48368
|
+
this.root = true;
|
|
48369
|
+
}
|
|
48370
|
+
componentWillLoad() {
|
|
48371
|
+
this.smoothlyNestedTable.emit(() => (this.root = false));
|
|
48372
|
+
this.tableLoad.emit((owner) => (this.owner = owner));
|
|
48373
|
+
}
|
|
48374
|
+
handleExpandableLoaded(event) {
|
|
48375
|
+
event.stopPropagation();
|
|
48376
|
+
event.target && this.expandable.set(event.target, event.detail);
|
|
48377
|
+
}
|
|
48378
|
+
handleExpandableState(event) {
|
|
48379
|
+
event.stopPropagation();
|
|
48380
|
+
event.target && (event.detail ? this.expanded.add(event.target) : this.expanded.delete(event.target));
|
|
48381
|
+
this.spotlightChange.emit({ allowSpotlight: !this.expanded.size, owner: this.owner });
|
|
48382
|
+
}
|
|
48383
|
+
handleSpotlightState(event) {
|
|
48384
|
+
var _a;
|
|
48385
|
+
event.target != this.element &&
|
|
48386
|
+
(event.stopPropagation(),
|
|
48387
|
+
event.detail.owner && ((_a = this.expandable.get(event.detail.owner)) === null || _a === void 0 ? void 0 : _a.allowSpotlight(event.detail.allowSpotlight)));
|
|
48388
|
+
}
|
|
48389
|
+
handleNestedTable(event) {
|
|
48390
|
+
event.target != this.element && (event.stopPropagation(), event.detail());
|
|
48364
48391
|
}
|
|
48365
48392
|
handleEvents(event) {
|
|
48366
48393
|
event.stopPropagation();
|
|
@@ -48372,7 +48399,7 @@ const Table = class extends HTMLElement {
|
|
|
48372
48399
|
static get style() { return styleCss$9; }
|
|
48373
48400
|
};
|
|
48374
48401
|
|
|
48375
|
-
const styleCss$8 = ".sc-smoothly-table-cell-h{display:table-cell;line-height:1.5rem;white-space:nowrap;padding:0.3rem 0 0.3rem 1rem}";
|
|
48402
|
+
const styleCss$8 = ".sc-smoothly-table-cell-h{display:table-cell;line-height:1.5rem;white-space:nowrap;padding:0.3rem 0 0.3rem 1rem;border-bottom:1px solid rgb(var(--smoothly-dark-color))}.sc-smoothly-table-cell-h smoothly-icon.sc-smoothly-table-cell{display:none}.sc-smoothly-table-cell-h>div.sc-smoothly-table-cell{display:flex;align-items:center;justify-content:space-between}.sc-smoothly-table-cell-h smoothly-icon.sc-smoothly-table-cell{width:0.6rem;height:0.6rem;margin:0 0.3rem;transition:transform 0.2s}";
|
|
48376
48403
|
|
|
48377
48404
|
const TableCell = class extends HTMLElement {
|
|
48378
48405
|
constructor() {
|
|
@@ -48380,12 +48407,12 @@ const TableCell = class extends HTMLElement {
|
|
|
48380
48407
|
this.__registerHost();
|
|
48381
48408
|
}
|
|
48382
48409
|
render() {
|
|
48383
|
-
return (h(Host, null, h("slot", null)));
|
|
48410
|
+
return (h(Host, null, h("div", null, h("slot", null), h("smoothly-icon", { name: "chevron-forward", size: "tiny" }))));
|
|
48384
48411
|
}
|
|
48385
48412
|
static get style() { return styleCss$8; }
|
|
48386
48413
|
};
|
|
48387
48414
|
|
|
48388
|
-
const styleCss$7 = "";
|
|
48415
|
+
const styleCss$7 = ".sc-smoothly-table-demo-h{display:flex;flex-direction:column;align-items:center;gap:3rem;padding-bottom:10rem}";
|
|
48389
48416
|
|
|
48390
48417
|
const TableDemo = class extends HTMLElement {
|
|
48391
48418
|
constructor() {
|
|
@@ -48396,12 +48423,13 @@ const TableDemo = class extends HTMLElement {
|
|
|
48396
48423
|
return [
|
|
48397
48424
|
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header A"), h("smoothly-table-header", null, "Header B"), h("smoothly-table-header", null, "Header C"), h("smoothly-table-header", null, "Header D")), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "normal row (exp.cell)", h("div", { slot: "detail" }, "expandable cell 1 content")), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell 2 content")), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell 3 content")), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell 4 content"))), h("smoothly-table-row", null, h("smoothly-table-cell", null, "normal row (nor.cell)\""), h("smoothly-table-cell", null, "normal cell"), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell details.")), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell details."))), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "expandable row (nor.cell)"), h("smoothly-table-cell", null, "Normal cell"), h("smoothly-table-cell", null, "normal cell"), h("smoothly-table-cell", null, "Normal cell"), h("div", { slot: "detail" }, "expandable row content"))),
|
|
48398
48425
|
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header A")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "A Content"), h("div", { slot: "detail" }, h("smoothly-tab-switch", null, h("smoothly-tab", { label: "innertable 1", open: true }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header B")), h("smoothly-table-expandable-row", null, "B Content"))), h("smoothly-tab", { label: "innertable 2" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header C")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "C Content")))))))),
|
|
48426
|
+
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "A"), h("smoothly-table-header", null, "B")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "a row"), h("smoothly-table-cell", null, "b row"), h("div", { slot: "detail" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "C"), h("smoothly-table-header", null, "D")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "c"), h("smoothly-table-cell", null, "d"), h("div", { slot: "detail" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "E"), h("smoothly-table-header", null, "F")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "e row"), h("smoothly-table-cell", null, "f row"), h("div", { slot: "detail" }, "nested expandable row expansion e f")))))))), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "a cell", h("div", { slot: "detail" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "E"), h("smoothly-table-header", null, "F")), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "e cell", h("div", { slot: "detail" }, "nested expandable cell expansion e")), h("smoothly-table-expandable-cell", null, "f cell", h("div", { slot: "detail" }, "nested expandable cell expansion f")))))), h("smoothly-table-expandable-cell", null, "b cell", h("div", { slot: "detail" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "C"), h("smoothly-table-header", null, "D")), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "c cell", h("div", { slot: "detail" }, "nested expandable cell expansion c")), h("smoothly-table-expandable-cell", null, "d cell", h("div", { slot: "detail" }, "nested expandable cell expansion d")))))))),
|
|
48399
48427
|
];
|
|
48400
48428
|
}
|
|
48401
48429
|
static get style() { return styleCss$7; }
|
|
48402
48430
|
};
|
|
48403
48431
|
|
|
48404
|
-
const styleCss$6 = ".sc-smoothly-table-expandable-cell-h{display:table-cell;padding:0.3rem 0 0.3rem 0;cursor:pointer;line-height:1.5rem}[open].sc-smoothly-table-expandable-cell-h{position:relative;z-index:3;background-color:rgb(var(--smoothly-default-color));
|
|
48432
|
+
const styleCss$6 = ".sc-smoothly-table-expandable-cell-h{display:table-cell;padding:0.3rem 0 0.3rem 0;cursor:pointer;line-height:1.5rem;border-bottom:1px solid rgb(var(--smoothly-dark-color))}[open].sc-smoothly-table-expandable-cell-h{position:relative;z-index:3;background-color:rgb(var(--smoothly-default-color));box-shadow:-1px 0 0 rgb(var(--smoothly-dark-color)) inset, \n\t\t1px 0 0 rgb(var(--smoothly-dark-color)) inset;border-bottom:none}.sc-smoothly-table-expandable-cell-h smoothly-icon.sc-smoothly-table-expandable-cell{width:0.6rem;float:left;padding:0 0.3rem;transition:transform 0.2s;display:flex;height:100%;align-self:center}[open].sc-smoothly-table-expandable-cell-h smoothly-icon.sc-smoothly-table-expandable-cell{transform:rotate(90deg)}aside.sc-smoothly-table-expandable-cell{display:flex}.hide.sc-smoothly-table-expandable-cell{display:none}td.sc-smoothly-table-expandable-cell-s>*{--expansion-width:1.5rem;--expansion-border-width:3px;position:relative;background-color:rgb(var(--smoothly-default-color));width:calc(100% + 3rem - var(--expansion-border-width));left:calc(-1 * var(--expansion-width));border-left:var(--expansion-border-width) solid rgb(0, 0, 0, 0);box-shadow:0px 0px 4px 2px rgb(var(--smoothly-dark-color));box-sizing:border-box;padding:0.5rem calc(var(--expansion-width) - var(--expansion-border-width));border-bottom:1px solid rgb(var(--smoothly-dark-color));border-left-width:3px}tr.spotlight>td.sc-smoothly-table-expandable-cell-s>*{border-left-color:rgb(var(--smoothly-tertiary-color))}td.sc-smoothly-table-expandable-cell-s>*::before{content:\"\";position:absolute;display:flex;top:-1px;bottom:0;left:-3px;width:calc(var(--expansion-width) + 1px);border-top:1px solid rgb(var(--smoothly-dark-color))}td.sc-smoothly-table-expandable-cell-s>*::after{content:\"\";position:absolute;display:flex;top:-1px;bottom:0;right:0;width:calc(var(--expansion-width) -1px);border-top:1px solid rgb(var(--smoothly-dark-color))}";
|
|
48405
48433
|
|
|
48406
48434
|
const TableExpandableCell = class extends HTMLElement {
|
|
48407
48435
|
constructor() {
|
|
@@ -48409,6 +48437,10 @@ const TableExpandableCell = class extends HTMLElement {
|
|
|
48409
48437
|
this.__registerHost();
|
|
48410
48438
|
this.expansionOpen = createEvent(this, "expansionOpen", 7);
|
|
48411
48439
|
this.expansionLoad = createEvent(this, "expansionLoad", 7);
|
|
48440
|
+
this.expandableChange = createEvent(this, "expandableChange", 7);
|
|
48441
|
+
this.expandableLoad = createEvent(this, "expandableLoad", 7);
|
|
48442
|
+
this.allowSpotlight = true;
|
|
48443
|
+
this.spotlight = true;
|
|
48412
48444
|
this.align = "left";
|
|
48413
48445
|
}
|
|
48414
48446
|
openChanged(value) {
|
|
@@ -48417,12 +48449,16 @@ const TableExpandableCell = class extends HTMLElement {
|
|
|
48417
48449
|
this.beginOpen = true;
|
|
48418
48450
|
else
|
|
48419
48451
|
this.element.append(this.expansionElement);
|
|
48452
|
+
this.expandableChange.emit(this.open);
|
|
48420
48453
|
}
|
|
48421
|
-
|
|
48422
|
-
this.
|
|
48454
|
+
handleSpotlight() {
|
|
48455
|
+
this.spotlight = this.open && this.allowSpotlight;
|
|
48423
48456
|
}
|
|
48424
|
-
|
|
48457
|
+
componentWillLoad() {
|
|
48425
48458
|
this.expansionLoad.emit();
|
|
48459
|
+
this.expandableLoad.emit({
|
|
48460
|
+
allowSpotlight: (allowed) => (this.allowSpotlight = allowed),
|
|
48461
|
+
});
|
|
48426
48462
|
}
|
|
48427
48463
|
componentDidRender() {
|
|
48428
48464
|
if (this.beginOpen) {
|
|
@@ -48430,49 +48466,75 @@ const TableExpandableCell = class extends HTMLElement {
|
|
|
48430
48466
|
this.expansionOpen.emit(this.expansionElement);
|
|
48431
48467
|
}
|
|
48432
48468
|
}
|
|
48469
|
+
onClick() {
|
|
48470
|
+
this.open = !this.open;
|
|
48471
|
+
}
|
|
48472
|
+
handleTableLoaded(event) {
|
|
48473
|
+
event.stopPropagation();
|
|
48474
|
+
event.detail(this.element);
|
|
48475
|
+
}
|
|
48433
48476
|
render() {
|
|
48434
|
-
return (h(Host, { style: { textAlign: this.align } }, h("aside", null, h("smoothly-icon", { name: "chevron-forward", size: "tiny" }), h("slot", null)), h("tr", { ref: e => (this.expansionElement = e) }, h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, h("
|
|
48477
|
+
return (h(Host, { style: { textAlign: this.align } }, h("aside", null, h("smoothly-icon", { name: "chevron-forward", size: "tiny" }), h("slot", null)), h("tr", { class: this.spotlight ? "spotlight" : "", ref: e => (this.expansionElement = e) }, h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, h("slot", { name: "detail" })))));
|
|
48435
48478
|
}
|
|
48436
48479
|
get element() { return this; }
|
|
48437
48480
|
static get watchers() { return {
|
|
48438
|
-
"open": ["openChanged"]
|
|
48481
|
+
"open": ["openChanged", "handleSpotlight"],
|
|
48482
|
+
"allowSpotlight": ["handleSpotlight"]
|
|
48439
48483
|
}; }
|
|
48440
48484
|
static get style() { return styleCss$6; }
|
|
48441
48485
|
};
|
|
48442
48486
|
|
|
48443
|
-
const styleCss$5 = ".sc-smoothly-table-expandable-row-h{display:table-row;cursor:pointer;line-height:1.5rem}[open].sc-smoothly-table-expandable-row-h{position:relative;z-index:3;background-color:rgb(var(--smoothly-default-color));
|
|
48487
|
+
const styleCss$5 = ".sc-smoothly-table-expandable-row-h{display:table-row;cursor:pointer;line-height:1.5rem}[open].sc-smoothly-table-expandable-row-h{position:relative;z-index:3;background-color:rgb(var(--smoothly-default-color));box-shadow:-1px 0 0 0 rgb(var(--smoothly-dark-color)) inset, \n\t\t1px 0 0 0 rgb(var(--smoothly-dark-color)) inset}.sc-smoothly-table-expandable-row-h[open].sc-smoothly-table-expandable-row-s>smoothly-table-cell{border-bottom:none}.hide.sc-smoothly-table-expandable-row{display:none}.sc-smoothly-table-expandable-row-h>tr.sc-smoothly-table-expandable-row>td.sc-smoothly-table-expandable-row{position:relative}td.sc-smoothly-table-expandable-row-s>*{--expansion-width:1.5rem;--expansion-border-width:3px;position:relative;background-color:rgb(var(--smoothly-default-color));width:calc(100% + 3rem - var(--expansion-border-width));left:calc(-1 * var(--expansion-width));border-left:var(--expansion-border-width) solid rgb(0, 0, 0, 0);box-shadow:0px 0px 4px 2px rgb(var(--smoothly-dark-color));box-sizing:border-box;padding:0.5rem calc(var(--expansion-width) - var(--expansion-border-width));border-bottom:1px solid rgb(var(--smoothly-dark-color));border-left-width:3px}tr.spotlight>td.sc-smoothly-table-expandable-row-s>*{border-left-color:rgb(var(--smoothly-tertiary-color))}td.sc-smoothly-table-expandable-row-s>*::before{content:\"\";position:absolute;display:flex;top:0;bottom:0;left:-3px;width:calc(var(--expansion-width) + 1px);border-top:1px solid rgb(var(--smoothly-dark-color))}td.sc-smoothly-table-expandable-row-s>*::after{content:\"\";position:absolute;display:flex;top:0;bottom:0;right:0;width:calc(var(--expansion-width) -1px);border-top:1px solid rgb(var(--smoothly-dark-color))}.sc-smoothly-table-expandable-row-h.sc-smoothly-table-expandable-row-s>smoothly-table-cell:last-of-type smoothly-icon{display:flex}.sc-smoothly-table-expandable-row-h[open].sc-smoothly-table-expandable-row-s>smoothly-table-cell:last-of-type smoothly-icon{transform:rotate(90deg)}";
|
|
48444
48488
|
|
|
48445
48489
|
const TableExpandableRow = class extends HTMLElement {
|
|
48446
48490
|
constructor() {
|
|
48447
48491
|
super();
|
|
48448
48492
|
this.__registerHost();
|
|
48449
48493
|
this.expansionOpen = createEvent(this, "expansionOpen", 7);
|
|
48494
|
+
this.expandableChange = createEvent(this, "expandableChange", 7);
|
|
48495
|
+
this.expandableLoad = createEvent(this, "expandableLoad", 7);
|
|
48496
|
+
this.allowSpotlight = true;
|
|
48497
|
+
this.spotlight = true;
|
|
48450
48498
|
this.align = "left";
|
|
48451
48499
|
}
|
|
48452
|
-
openChanged(
|
|
48500
|
+
openChanged() {
|
|
48453
48501
|
if (this.expansionElement)
|
|
48454
48502
|
this.element.after(this.expansionElement);
|
|
48503
|
+
this.expandableChange.emit(this.open);
|
|
48455
48504
|
}
|
|
48456
|
-
|
|
48457
|
-
this.
|
|
48458
|
-
|
|
48505
|
+
handleSpotlight() {
|
|
48506
|
+
this.spotlight = this.open && this.allowSpotlight;
|
|
48507
|
+
}
|
|
48508
|
+
componentWillLoad() {
|
|
48509
|
+
this.expandableLoad.emit({
|
|
48510
|
+
allowSpotlight: (allowed) => (this.allowSpotlight = allowed),
|
|
48511
|
+
});
|
|
48459
48512
|
}
|
|
48460
48513
|
componentDidRender() {
|
|
48461
48514
|
this.expansionOpen.emit(this.expansionElement);
|
|
48462
48515
|
if (this.expansionElement && this.open)
|
|
48463
48516
|
this.element.after(this.expansionElement);
|
|
48464
48517
|
}
|
|
48518
|
+
onClick(event) {
|
|
48519
|
+
event.stopPropagation();
|
|
48520
|
+
this.open = !this.open;
|
|
48521
|
+
}
|
|
48522
|
+
handleTableLoaded(event) {
|
|
48523
|
+
event.stopPropagation();
|
|
48524
|
+
event.detail(this.element);
|
|
48525
|
+
}
|
|
48465
48526
|
render() {
|
|
48466
|
-
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("
|
|
48527
|
+
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("tr", { class: this.spotlight ? "spotlight" : "", ref: e => (this.expansionElement = e) }, h("td", { colSpan: 999, class: !this.open ? "hide" : "" }, h("slot", { name: "detail" })))));
|
|
48467
48528
|
}
|
|
48468
48529
|
get element() { return this; }
|
|
48469
48530
|
static get watchers() { return {
|
|
48470
|
-
"open": ["openChanged"]
|
|
48531
|
+
"open": ["openChanged", "handleSpotlight"],
|
|
48532
|
+
"allowSpotlight": ["handleSpotlight"]
|
|
48471
48533
|
}; }
|
|
48472
48534
|
static get style() { return styleCss$5; }
|
|
48473
48535
|
};
|
|
48474
48536
|
|
|
48475
|
-
const styleCss$4 = ".sc-smoothly-table-header-h{display:table-cell;line-height:2.5rem;
|
|
48537
|
+
const styleCss$4 = ".sc-smoothly-table-header-h{display:table-cell;line-height:2.5rem;border-bottom:1px solid rgb(var(--smoothly-dark-color));border-top:1px solid rgb(var(--smoothly-dark-color));padding-left:1rem;font-weight:bold}";
|
|
48476
48538
|
|
|
48477
48539
|
const TableHeader = class extends HTMLElement {
|
|
48478
48540
|
constructor() {
|
|
@@ -48660,11 +48722,11 @@ const SmoothlySubmit = /*@__PURE__*/proxyCustomElement(SmoothlySubmit$1, [6,"smo
|
|
|
48660
48722
|
const SmoothlySvg = /*@__PURE__*/proxyCustomElement(SmoothlySvg$1, [2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}]);
|
|
48661
48723
|
const SmoothlyTab = /*@__PURE__*/proxyCustomElement(SmoothlyTab$1, [6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]]);
|
|
48662
48724
|
const SmoothlyTabSwitch = /*@__PURE__*/proxyCustomElement(SmoothlyTabSwitch$1, [6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]]);
|
|
48663
|
-
const SmoothlyTable = /*@__PURE__*/proxyCustomElement(Table, [6,"smoothly-table",
|
|
48725
|
+
const SmoothlyTable = /*@__PURE__*/proxyCustomElement(Table, [6,"smoothly-table",{"root":[1540]},[[0,"expandableLoad","handleExpandableLoaded"],[0,"expandableChange","handleExpandableState"],[0,"spotlightChange","handleSpotlightState"],[0,"smoothlyNestedTable","handleNestedTable"],[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]]);
|
|
48664
48726
|
const SmoothlyTableCell = /*@__PURE__*/proxyCustomElement(TableCell, [6,"smoothly-table-cell"]);
|
|
48665
48727
|
const SmoothlyTableDemo = /*@__PURE__*/proxyCustomElement(TableDemo, [2,"smoothly-table-demo"]);
|
|
48666
|
-
const SmoothlyTableExpandableCell = /*@__PURE__*/proxyCustomElement(TableExpandableCell, [6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540]},[[0,"click","onClick"]]]);
|
|
48667
|
-
const SmoothlyTableExpandableRow = /*@__PURE__*/proxyCustomElement(TableExpandableRow, [6,"smoothly-table-expandable-row",{"align":[1],"open":[1540]},[[0,"click","onClick"]]]);
|
|
48728
|
+
const SmoothlyTableExpandableCell = /*@__PURE__*/proxyCustomElement(TableExpandableCell, [6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"tableLoad","handleTableLoaded"]]]);
|
|
48729
|
+
const SmoothlyTableExpandableRow = /*@__PURE__*/proxyCustomElement(TableExpandableRow, [6,"smoothly-table-expandable-row",{"align":[1],"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"tableLoad","handleTableLoaded"]]]);
|
|
48668
48730
|
const SmoothlyTableHeader = /*@__PURE__*/proxyCustomElement(TableHeader, [6,"smoothly-table-header",{"name":[1]}]);
|
|
48669
48731
|
const SmoothlyTableRow = /*@__PURE__*/proxyCustomElement(TableRow, [6,"smoothly-table-row",null,[[0,"expansionLoad","onExpansionLoad"],[0,"expansionOpen","onExpansionOpen"]]]);
|
|
48670
48732
|
const SmoothlyTrigger = /*@__PURE__*/proxyCustomElement(SmoothlyTrigger$1, [6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]]);
|