@leavittsoftware/web 5.14.1 → 5.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leavittsoftware/web",
|
|
3
|
-
"version": "5.14.
|
|
3
|
+
"version": "5.14.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"files": [
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"url": "https://github.com/LeavittSoftware/titanium-elements/issues"
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://github.com/LeavittSoftware/titanium-elements/#readme",
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "f3968929de5ff713e13ef62c3246b9a6589d979b"
|
|
44
44
|
}
|
package/titanium/card/card.js
CHANGED
|
@@ -179,7 +179,7 @@ let TitaniumDrawer = class TitaniumDrawer extends LitElement {
|
|
|
179
179
|
color: var(--titanium-drawer-color, var(--md-sys-color-on-background));
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
:host([has-
|
|
182
|
+
:host([has-header]) header {
|
|
183
183
|
display: grid;
|
|
184
184
|
grid-area: header;
|
|
185
185
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from 'lit';
|
|
2
2
|
import '@material/web/button/outlined-button';
|
|
3
|
+
import '@material/web/button/filled-button';
|
|
3
4
|
/**
|
|
4
5
|
* Titanium Show Hide
|
|
5
6
|
*
|
|
@@ -26,11 +27,15 @@ export default class TitaniumShowHide extends LitElement {
|
|
|
26
27
|
accessor collapsed: boolean;
|
|
27
28
|
protected accessor hasHiddenItems: boolean;
|
|
28
29
|
accessor hiddenItemCount: number;
|
|
30
|
+
/**
|
|
31
|
+
* Swaps out outlined button for a filled button when true
|
|
32
|
+
*/
|
|
33
|
+
accessor filled: boolean;
|
|
29
34
|
protected accessor itemsContainer: HTMLElement;
|
|
30
35
|
protected accessor collapsedContainer: HTMLElement;
|
|
31
36
|
updated(changedProps: PropertyValues<this>): void;
|
|
32
37
|
firstUpdated(): void;
|
|
33
38
|
static styles: import("lit").CSSResult[];
|
|
34
|
-
render(): import("lit-html").TemplateResult
|
|
39
|
+
render(): import("lit-html").TemplateResult;
|
|
35
40
|
}
|
|
36
41
|
//# sourceMappingURL=show-hide.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { css,
|
|
2
|
+
import { css, LitElement } from 'lit';
|
|
3
|
+
import { literal, html } from 'lit/static-html.js';
|
|
3
4
|
import { customElement, property, query } from 'lit/decorators.js';
|
|
4
5
|
import '@material/web/button/outlined-button';
|
|
6
|
+
import '@material/web/button/filled-button';
|
|
5
7
|
/**
|
|
6
8
|
* Titanium Show Hide
|
|
7
9
|
*
|
|
@@ -37,6 +39,12 @@ let TitaniumShowHide = class TitaniumShowHide extends LitElement {
|
|
|
37
39
|
#hiddenItemCount_accessor_storage = 0;
|
|
38
40
|
get hiddenItemCount() { return this.#hiddenItemCount_accessor_storage; }
|
|
39
41
|
set hiddenItemCount(value) { this.#hiddenItemCount_accessor_storage = value; }
|
|
42
|
+
#filled_accessor_storage = false;
|
|
43
|
+
/**
|
|
44
|
+
* Swaps out outlined button for a filled button when true
|
|
45
|
+
*/
|
|
46
|
+
get filled() { return this.#filled_accessor_storage; }
|
|
47
|
+
set filled(value) { this.#filled_accessor_storage = value; }
|
|
40
48
|
#itemsContainer_accessor_storage;
|
|
41
49
|
get itemsContainer() { return this.#itemsContainer_accessor_storage; }
|
|
42
50
|
set itemsContainer(value) { this.#itemsContainer_accessor_storage = value; }
|
|
@@ -97,7 +105,8 @@ let TitaniumShowHide = class TitaniumShowHide extends LitElement {
|
|
|
97
105
|
gap: var(--titanium-show-hide-gap, 8px);
|
|
98
106
|
}
|
|
99
107
|
|
|
100
|
-
md-outlined-button
|
|
108
|
+
md-outlined-button,
|
|
109
|
+
md-filled-button {
|
|
101
110
|
max-width: 160px;
|
|
102
111
|
width: 100%;
|
|
103
112
|
margin-top: 12px;
|
|
@@ -110,6 +119,7 @@ let TitaniumShowHide = class TitaniumShowHide extends LitElement {
|
|
|
110
119
|
`,
|
|
111
120
|
]; }
|
|
112
121
|
render() {
|
|
122
|
+
/* eslint-disable lit/binding-positions, lit/no-invalid-html */
|
|
113
123
|
return html `
|
|
114
124
|
<style>
|
|
115
125
|
:host([collapsed]) collapsed-box {
|
|
@@ -122,9 +132,12 @@ let TitaniumShowHide = class TitaniumShowHide extends LitElement {
|
|
|
122
132
|
</items-container>
|
|
123
133
|
</collapsed-box>
|
|
124
134
|
<slot name="button" @click=${() => (this.collapsed = !this.collapsed)} ?hidden=${!this.hasHiddenItems}>
|
|
125
|
-
|
|
135
|
+
<${this.filled ? literal `md-filled-button` : literal `md-outlined-button`} part="button">
|
|
136
|
+
${this.collapsed ? `Show more (${this.hiddenItemCount})` : 'Show less'}
|
|
137
|
+
</${this.filled ? literal `md-filled-button` : literal `md-outlined-button`}>
|
|
126
138
|
</slot>
|
|
127
139
|
`;
|
|
140
|
+
/* eslint-enable lit/binding-positions, lit/no-invalid-html */
|
|
128
141
|
}
|
|
129
142
|
};
|
|
130
143
|
__decorate([
|
|
@@ -142,6 +155,9 @@ __decorate([
|
|
|
142
155
|
__decorate([
|
|
143
156
|
property({ type: Number })
|
|
144
157
|
], TitaniumShowHide.prototype, "hiddenItemCount", null);
|
|
158
|
+
__decorate([
|
|
159
|
+
property({ type: Boolean, attribute: 'filled' })
|
|
160
|
+
], TitaniumShowHide.prototype, "filled", null);
|
|
145
161
|
__decorate([
|
|
146
162
|
query('items-container')
|
|
147
163
|
], TitaniumShowHide.prototype, "itemsContainer", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"show-hide.js","sourceRoot":"","sources":["show-hide.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,
|
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