@leavittsoftware/web 1.0.0 → 1.2.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/leavitt/api-service/api-service.js +5 -5
- package/leavitt/api-service/api-service.js.map +1 -1
- package/leavitt/api-service/odata-response.js +2 -2
- package/leavitt/api-service/odata-response.js.map +1 -1
- package/leavitt/company-select/company-select.js +10 -10
- package/leavitt/person-company-select/person-company-select.js +14 -14
- package/leavitt/person-group-select/person-group-select.js +18 -18
- package/leavitt/person-select/person-select.js +4 -4
- package/leavitt/profile-picture/profile-picture-menu.js +96 -96
- package/leavitt/profile-picture/profile-picture.js +64 -64
- package/leavitt/user-feedback/user-feedback.js +79 -79
- package/package.json +37 -36
- package/titanium/access-denied-page/access-denied-page.js +330 -330
- package/titanium/address-input/address-input.js +17 -17
- package/titanium/address-input/address-input.js.map +1 -1
- package/titanium/address-input/google-address-input.js +4 -4
- package/titanium/address-input/manual-address-dialog.js +127 -127
- package/titanium/card/card.js +117 -117
- package/titanium/chip-multi-select/chip-multi-select.js +38 -38
- package/titanium/data-table/data-table-header.js +95 -95
- package/titanium/data-table/data-table-item.js +163 -163
- package/titanium/data-table/data-table.js +313 -313
- package/titanium/data-table/data-table.js.map +1 -1
- package/titanium/data-table/filter-controller.js +5 -5
- package/titanium/data-table/filter-controller.js.map +1 -1
- package/titanium/data-table/page-control.js +75 -75
- package/titanium/data-table/page-control.js.map +1 -1
- package/titanium/date-range-selector/date-range-change-event.js.map +1 -1
- package/titanium/date-range-selector/date-range-selector.js +51 -51
- package/titanium/drawer/drawer.js +125 -125
- package/titanium/drawer/drawer.js.map +1 -1
- package/titanium/duration-input/human-interval.js +6 -6
- package/titanium/duration-input/human-interval.js.map +1 -1
- package/titanium/error-page/error-page.js +66 -66
- package/titanium/event-bus/event-bus.js +7 -7
- package/titanium/event-bus/event-bus.js.map +1 -1
- package/titanium/extendable-outlined-text-field/extendable-outlined-text-field.js +28 -28
- package/titanium/full-page-loading-indicator/full-page-loading-indicator.js +48 -48
- package/titanium/header/header.js +83 -83
- package/titanium/helpers/debouncer.js.map +1 -1
- package/titanium/helpers/dev-detection.js +1 -1
- package/titanium/helpers/dev-detection.js.map +1 -1
- package/titanium/helpers/media-query.js +1 -1
- package/titanium/helpers/media-query.js.map +1 -1
- package/titanium/helpers/search-token.js +2 -2
- package/titanium/helpers/search-token.js.map +1 -1
- package/titanium/icon-picker/icon-picker.js +4 -4
- package/titanium/search-input/search-input.js +117 -117
- package/titanium/show-hide/show-hide.js +54 -54
- package/titanium/show-hide/show-hide.js.map +1 -1
- package/titanium/single-select-base/single-select-base.js +93 -92
- package/titanium/single-select-base/single-select-base.js.map +1 -1
- package/titanium/smart-attachment-input/crop-and-save-image-dialog.js +115 -115
- package/titanium/smart-attachment-input/cropper-styles.js +307 -307
- package/titanium/smart-attachment-input/image-preview-dialog.js +29 -29
- package/titanium/smart-attachment-input/smart-attachment-input.js +81 -81
- package/titanium/snackbar/snackbar.js +133 -133
- package/titanium/styles/a.js +15 -15
- package/titanium/styles/data-row.js +43 -43
- package/titanium/styles/ellipsis.js +6 -6
- package/titanium/styles/h1.js +14 -14
- package/titanium/styles/h2.js +14 -14
- package/titanium/styles/h3.js +14 -14
- package/titanium/styles/h4.js +14 -14
- package/titanium/styles/h5.js +16 -16
- package/titanium/styles/p.js +14 -14
- package/titanium/toolbar/toolbar.js +45 -45
- package/titanium/types/pending-state-event.js.map +1 -1
- package/titanium/youtube-input/youtube-input.js +9 -9
- package/titanium/address-input/Address.js.map +0 -1
- package/titanium/address-input/types/address.js.map +0 -1
- package/titanium/address-input/types/autocomplete-prediction-suggestion.js.map +0 -1
- package/titanium/extendable-outlined-text-field/extensible-outlined-text-field.d.ts +0 -45
- package/titanium/extendable-outlined-text-field/extensible-outlined-text-field.js.map +0 -1
|
@@ -47,47 +47,47 @@ let TitaniumChipMultiSelect = class TitaniumChipMultiSelect extends LitElement {
|
|
|
47
47
|
this.validator.reset();
|
|
48
48
|
}
|
|
49
49
|
static { this.styles = [
|
|
50
|
-
css `
|
|
51
|
-
:host {
|
|
52
|
-
display: block;
|
|
53
|
-
width: 100%;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
titanium-input-validator {
|
|
57
|
-
display: block;
|
|
58
|
-
width: 100%;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
slot-container {
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-wrap: wrap;
|
|
64
|
-
grid-gap: 12px;
|
|
65
|
-
align-items: center;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
::slotted(md-outlined-button) {
|
|
69
|
-
line-height: 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
span {
|
|
73
|
-
font-size: 13px;
|
|
74
|
-
}
|
|
50
|
+
css `
|
|
51
|
+
:host {
|
|
52
|
+
display: block;
|
|
53
|
+
width: 100%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
titanium-input-validator {
|
|
57
|
+
display: block;
|
|
58
|
+
width: 100%;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
slot-container {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-wrap: wrap;
|
|
64
|
+
grid-gap: 12px;
|
|
65
|
+
align-items: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
::slotted(md-outlined-button) {
|
|
69
|
+
line-height: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
span {
|
|
73
|
+
font-size: 13px;
|
|
74
|
+
}
|
|
75
75
|
`,
|
|
76
76
|
]; }
|
|
77
77
|
render() {
|
|
78
|
-
return html `
|
|
79
|
-
<titanium-input-validator
|
|
80
|
-
?disabled=${this.disabled}
|
|
81
|
-
.evaluator=${() => !this.required || !!this.hasItems}
|
|
82
|
-
?required=${this.required}
|
|
83
|
-
.label=${this.label}
|
|
84
|
-
.supportingText=${this.supportingText}
|
|
85
|
-
>
|
|
86
|
-
<slot-container>
|
|
87
|
-
<slot></slot>
|
|
88
|
-
${!this.hasItems ? html ` <span>${this.noItemsText}</span>` : ''}
|
|
89
|
-
</slot-container>
|
|
90
|
-
</titanium-input-validator>
|
|
78
|
+
return html `
|
|
79
|
+
<titanium-input-validator
|
|
80
|
+
?disabled=${this.disabled}
|
|
81
|
+
.evaluator=${() => !this.required || !!this.hasItems}
|
|
82
|
+
?required=${this.required}
|
|
83
|
+
.label=${this.label}
|
|
84
|
+
.supportingText=${this.supportingText}
|
|
85
|
+
>
|
|
86
|
+
<slot-container>
|
|
87
|
+
<slot></slot>
|
|
88
|
+
${!this.hasItems ? html ` <span>${this.noItemsText}</span>` : ''}
|
|
89
|
+
</slot-container>
|
|
90
|
+
</titanium-input-validator>
|
|
91
91
|
`;
|
|
92
92
|
}
|
|
93
93
|
};
|
|
@@ -64,103 +64,103 @@ let TitaniumDataTableHeader = class TitaniumDataTableHeader extends LitElement {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
static { this.styles = css `
|
|
68
|
-
:host {
|
|
69
|
-
display: inline-flex;
|
|
70
|
-
flex-direction: row;
|
|
71
|
-
align-items: center;
|
|
72
|
-
|
|
73
|
-
-webkit-touch-callout: none;
|
|
74
|
-
-webkit-user-select: none;
|
|
75
|
-
-khtml-user-select: none;
|
|
76
|
-
-moz-user-select: none;
|
|
77
|
-
-ms-user-select: none;
|
|
78
|
-
user-select: none;
|
|
79
|
-
|
|
80
|
-
cursor: pointer;
|
|
81
|
-
|
|
82
|
-
font-family: var(--titanium-data-table-font-family, Roboto, Noto, sans-serif);
|
|
83
|
-
-webkit-font-smoothing: antialiased;
|
|
84
|
-
font-size: 14px;
|
|
85
|
-
padding: 8px;
|
|
86
|
-
line-height: 28px;
|
|
87
|
-
font-weight: 500;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
:host(:not([width])) {
|
|
91
|
-
-ms-flex: 3;
|
|
92
|
-
-webkit-flex: 3;
|
|
93
|
-
flex: 3;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
:host(:not([width])[large]) {
|
|
97
|
-
-ms-flex: 5;
|
|
98
|
-
-webkit-flex: 5;
|
|
99
|
-
flex: 5;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
:host([hidden]) {
|
|
103
|
-
display: none;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
:host([no-sort]) {
|
|
107
|
-
cursor: inherit;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
:host([center]) {
|
|
111
|
-
justify-content: center;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
:host([center])::before {
|
|
115
|
-
width: 18px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
:host([right]) {
|
|
119
|
-
flex-direction: row-reverse;
|
|
120
|
-
text-align: right;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
md-icon {
|
|
124
|
-
display: block;
|
|
125
|
-
height: 18px;
|
|
126
|
-
width: 18px;
|
|
127
|
-
font-size: 18px;
|
|
128
|
-
margin-left: 4px;
|
|
129
|
-
flex-shrink: 0;
|
|
130
|
-
transform-origin: center;
|
|
131
|
-
transition: transform 150ms ease;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
:host([no-sort]) md-icon {
|
|
135
|
-
display: none;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
:host([right]) md-icon {
|
|
139
|
-
margin-right: 4px;
|
|
140
|
-
margin-left: 0;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
md-icon {
|
|
144
|
-
visibility: hidden;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
:host([active][sort-direction='asc']) md-icon {
|
|
148
|
-
transform: rotate(-180deg);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
:host([active][sort-direction='asc']) md-icon,
|
|
152
|
-
:host([active][sort-direction='desc']) md-icon {
|
|
153
|
-
visibility: visible;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
:host([narrow][desktop]) {
|
|
157
|
-
display: none;
|
|
158
|
-
}
|
|
67
|
+
static { this.styles = css `
|
|
68
|
+
:host {
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
flex-direction: row;
|
|
71
|
+
align-items: center;
|
|
72
|
+
|
|
73
|
+
-webkit-touch-callout: none;
|
|
74
|
+
-webkit-user-select: none;
|
|
75
|
+
-khtml-user-select: none;
|
|
76
|
+
-moz-user-select: none;
|
|
77
|
+
-ms-user-select: none;
|
|
78
|
+
user-select: none;
|
|
79
|
+
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
|
|
82
|
+
font-family: var(--titanium-data-table-font-family, Roboto, Noto, sans-serif);
|
|
83
|
+
-webkit-font-smoothing: antialiased;
|
|
84
|
+
font-size: 14px;
|
|
85
|
+
padding: 8px;
|
|
86
|
+
line-height: 28px;
|
|
87
|
+
font-weight: 500;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host(:not([width])) {
|
|
91
|
+
-ms-flex: 3;
|
|
92
|
+
-webkit-flex: 3;
|
|
93
|
+
flex: 3;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host(:not([width])[large]) {
|
|
97
|
+
-ms-flex: 5;
|
|
98
|
+
-webkit-flex: 5;
|
|
99
|
+
flex: 5;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:host([hidden]) {
|
|
103
|
+
display: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host([no-sort]) {
|
|
107
|
+
cursor: inherit;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:host([center]) {
|
|
111
|
+
justify-content: center;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:host([center])::before {
|
|
115
|
+
width: 18px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:host([right]) {
|
|
119
|
+
flex-direction: row-reverse;
|
|
120
|
+
text-align: right;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
md-icon {
|
|
124
|
+
display: block;
|
|
125
|
+
height: 18px;
|
|
126
|
+
width: 18px;
|
|
127
|
+
font-size: 18px;
|
|
128
|
+
margin-left: 4px;
|
|
129
|
+
flex-shrink: 0;
|
|
130
|
+
transform-origin: center;
|
|
131
|
+
transition: transform 150ms ease;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:host([no-sort]) md-icon {
|
|
135
|
+
display: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:host([right]) md-icon {
|
|
139
|
+
margin-right: 4px;
|
|
140
|
+
margin-left: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
md-icon {
|
|
144
|
+
visibility: hidden;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
:host([active][sort-direction='asc']) md-icon {
|
|
148
|
+
transform: rotate(-180deg);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:host([active][sort-direction='asc']) md-icon,
|
|
152
|
+
:host([active][sort-direction='desc']) md-icon {
|
|
153
|
+
visibility: visible;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:host([narrow][desktop]) {
|
|
157
|
+
display: none;
|
|
158
|
+
}
|
|
159
159
|
`; }
|
|
160
160
|
render() {
|
|
161
|
-
return html `
|
|
162
|
-
${this.title}
|
|
163
|
-
<md-icon>arrow_downward</md-icon>
|
|
161
|
+
return html `
|
|
162
|
+
${this.title}
|
|
163
|
+
<md-icon>arrow_downward</md-icon>
|
|
164
164
|
`;
|
|
165
165
|
}
|
|
166
166
|
};
|
|
@@ -283,173 +283,173 @@ let TitaniumDataTableItem = class TitaniumDataTableItem extends LitElement {
|
|
|
283
283
|
document.addEventListener(moveEvent, moveItemHandler);
|
|
284
284
|
moveItemHandler(event);
|
|
285
285
|
}
|
|
286
|
-
static { this.styles = css `
|
|
287
|
-
:host {
|
|
288
|
-
display: block;
|
|
289
|
-
|
|
290
|
-
-webkit-touch-callout: none;
|
|
291
|
-
user-select: none;
|
|
292
|
-
text-decoration: none;
|
|
293
|
-
|
|
294
|
-
font-family: var(--titanium-data-table-font-family, Roboto, Noto, sans-serif);
|
|
295
|
-
-webkit-font-smoothing: antialiased;
|
|
296
|
-
|
|
297
|
-
transition: none;
|
|
298
|
-
margin-top: -1px;
|
|
299
|
-
box-sizing: border-box;
|
|
300
|
-
border-bottom: 1px var(--md-sys-color-outline-variant) solid;
|
|
301
|
-
border-top: 1px var(--md-sys-color-outline-variant) solid;
|
|
302
|
-
position: relative;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
:host(:not([disable-select])[selected]) {
|
|
306
|
-
background-color: var(--md-sys-color-secondary-container);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
:host(:not([disable-select]):not([selected]):hover) {
|
|
310
|
-
background-color: rgb(from var(--md-sys-color-on-surface, #1d1b20) r g b / 0.08);
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
:host([enable-dragging]) {
|
|
314
|
-
cursor: grab;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
md-icon[drag] {
|
|
318
|
-
display: none;
|
|
319
|
-
color: var(--md-sys-color-outline, #dadce0);
|
|
320
|
-
margin-right: -24px;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
:host([enable-dragging]:hover) md-icon[drag] {
|
|
324
|
-
display: block;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
:host([dragged]) {
|
|
328
|
-
box-shadow:
|
|
329
|
-
0 3px 6px rgba(0, 0, 0, 0.16),
|
|
330
|
-
0 3px 6px rgba(0, 0, 0, 0.23);
|
|
331
|
-
transition: none;
|
|
332
|
-
overflow: hidden;
|
|
333
|
-
z-index: 1 !important;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
/* Only have transition under dragging, because we don't want nudged
|
|
337
|
-
* items to transition into place once dragging is complete */
|
|
338
|
-
:host([dragging]:not([dragged])) {
|
|
339
|
-
transition: transform 0.2s ease-out;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/* :host {
|
|
343
|
-
transition: transform 0.2s ease-out;
|
|
344
|
-
} */
|
|
345
|
-
|
|
346
|
-
:host main {
|
|
347
|
-
display: flex;
|
|
348
|
-
flex-direction: row;
|
|
349
|
-
align-items: center;
|
|
350
|
-
min-height: 48px;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/* Do not apply :hover style on touch devices */
|
|
354
|
-
@media (hover: hover) and (pointer: fine) {
|
|
355
|
-
:host([enable-dragging]) div[item-footer] ::slotted(*) {
|
|
356
|
-
pointer-events: none;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
::slotted(row-item) {
|
|
361
|
-
display: block;
|
|
362
|
-
font-size: 14px;
|
|
363
|
-
line-height: 18px;
|
|
364
|
-
font-weight: 400;
|
|
365
|
-
padding: 4px 8px;
|
|
366
|
-
margin: 0;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
::slotted(row-item:last-of-type) {
|
|
370
|
-
padding-right: 24px;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
::slotted(row-item:not([width])) {
|
|
374
|
-
-ms-flex: 3;
|
|
375
|
-
-webkit-flex: 3;
|
|
376
|
-
flex: 3;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
::slotted(row-item:not([width])[large]) {
|
|
380
|
-
-ms-flex: 5;
|
|
381
|
-
-webkit-flex: 5;
|
|
382
|
-
flex: 5;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
::slotted(row-item[center]) {
|
|
386
|
-
text-align: center;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
::slotted(row-item[image]) {
|
|
390
|
-
display: inline-flex;
|
|
391
|
-
align-items: center;
|
|
392
|
-
gap: 12px;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
::slotted(row-item[right]) {
|
|
396
|
-
text-align: right;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
md-checkbox {
|
|
400
|
-
flex-shrink: 0;
|
|
401
|
-
align-self: center;
|
|
402
|
-
margin: 0 14px 0 20px;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
:host([disable-select]) ::slotted(row-item:first-of-type) {
|
|
406
|
-
padding-left: 24px;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
:host([narrow]) ::slotted(row-item[desktop]) {
|
|
410
|
-
display: none;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
@media (max-width: 768px) {
|
|
414
|
-
:host([enable-dragging]) md-icon[drag] {
|
|
415
|
-
display: block;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
[hidden] {
|
|
420
|
-
display: none;
|
|
421
|
-
}
|
|
286
|
+
static { this.styles = css `
|
|
287
|
+
:host {
|
|
288
|
+
display: block;
|
|
289
|
+
|
|
290
|
+
-webkit-touch-callout: none;
|
|
291
|
+
user-select: none;
|
|
292
|
+
text-decoration: none;
|
|
293
|
+
|
|
294
|
+
font-family: var(--titanium-data-table-font-family, Roboto, Noto, sans-serif);
|
|
295
|
+
-webkit-font-smoothing: antialiased;
|
|
296
|
+
|
|
297
|
+
transition: none;
|
|
298
|
+
margin-top: -1px;
|
|
299
|
+
box-sizing: border-box;
|
|
300
|
+
border-bottom: 1px var(--md-sys-color-outline-variant) solid;
|
|
301
|
+
border-top: 1px var(--md-sys-color-outline-variant) solid;
|
|
302
|
+
position: relative;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
:host(:not([disable-select])[selected]) {
|
|
306
|
+
background-color: var(--md-sys-color-secondary-container);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
:host(:not([disable-select]):not([selected]):hover) {
|
|
310
|
+
background-color: rgb(from var(--md-sys-color-on-surface, #1d1b20) r g b / 0.08);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
:host([enable-dragging]) {
|
|
314
|
+
cursor: grab;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
md-icon[drag] {
|
|
318
|
+
display: none;
|
|
319
|
+
color: var(--md-sys-color-outline, #dadce0);
|
|
320
|
+
margin-right: -24px;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
:host([enable-dragging]:hover) md-icon[drag] {
|
|
324
|
+
display: block;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
:host([dragged]) {
|
|
328
|
+
box-shadow:
|
|
329
|
+
0 3px 6px rgba(0, 0, 0, 0.16),
|
|
330
|
+
0 3px 6px rgba(0, 0, 0, 0.23);
|
|
331
|
+
transition: none;
|
|
332
|
+
overflow: hidden;
|
|
333
|
+
z-index: 1 !important;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/* Only have transition under dragging, because we don't want nudged
|
|
337
|
+
* items to transition into place once dragging is complete */
|
|
338
|
+
:host([dragging]:not([dragged])) {
|
|
339
|
+
transition: transform 0.2s ease-out;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/* :host {
|
|
343
|
+
transition: transform 0.2s ease-out;
|
|
344
|
+
} */
|
|
345
|
+
|
|
346
|
+
:host main {
|
|
347
|
+
display: flex;
|
|
348
|
+
flex-direction: row;
|
|
349
|
+
align-items: center;
|
|
350
|
+
min-height: 48px;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/* Do not apply :hover style on touch devices */
|
|
354
|
+
@media (hover: hover) and (pointer: fine) {
|
|
355
|
+
:host([enable-dragging]) div[item-footer] ::slotted(*) {
|
|
356
|
+
pointer-events: none;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
::slotted(row-item) {
|
|
361
|
+
display: block;
|
|
362
|
+
font-size: 14px;
|
|
363
|
+
line-height: 18px;
|
|
364
|
+
font-weight: 400;
|
|
365
|
+
padding: 4px 8px;
|
|
366
|
+
margin: 0;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
::slotted(row-item:last-of-type) {
|
|
370
|
+
padding-right: 24px;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
::slotted(row-item:not([width])) {
|
|
374
|
+
-ms-flex: 3;
|
|
375
|
+
-webkit-flex: 3;
|
|
376
|
+
flex: 3;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
::slotted(row-item:not([width])[large]) {
|
|
380
|
+
-ms-flex: 5;
|
|
381
|
+
-webkit-flex: 5;
|
|
382
|
+
flex: 5;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
::slotted(row-item[center]) {
|
|
386
|
+
text-align: center;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
::slotted(row-item[image]) {
|
|
390
|
+
display: inline-flex;
|
|
391
|
+
align-items: center;
|
|
392
|
+
gap: 12px;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
::slotted(row-item[right]) {
|
|
396
|
+
text-align: right;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
md-checkbox {
|
|
400
|
+
flex-shrink: 0;
|
|
401
|
+
align-self: center;
|
|
402
|
+
margin: 0 14px 0 20px;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
:host([disable-select]) ::slotted(row-item:first-of-type) {
|
|
406
|
+
padding-left: 24px;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
:host([narrow]) ::slotted(row-item[desktop]) {
|
|
410
|
+
display: none;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
@media (max-width: 768px) {
|
|
414
|
+
:host([enable-dragging]) md-icon[drag] {
|
|
415
|
+
display: block;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
[hidden] {
|
|
420
|
+
display: none;
|
|
421
|
+
}
|
|
422
422
|
`; }
|
|
423
423
|
render() {
|
|
424
|
-
return html `
|
|
425
|
-
<style>
|
|
426
|
-
:host([nudge-down]:not([dragged])) {
|
|
427
|
-
transform: translate3d(0, ${this.nudgeHeight}px, 0);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
:host([nudge-up]:not([dragged])) {
|
|
431
|
-
transform: translate3d(0, -${this.nudgeHeight}px, 0);
|
|
432
|
-
}
|
|
433
|
-
</style>
|
|
434
|
-
<main part="main">
|
|
424
|
+
return html `
|
|
425
|
+
<style>
|
|
426
|
+
:host([nudge-down]:not([dragged])) {
|
|
427
|
+
transform: translate3d(0, ${this.nudgeHeight}px, 0);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
:host([nudge-up]:not([dragged])) {
|
|
431
|
+
transform: translate3d(0, -${this.nudgeHeight}px, 0);
|
|
432
|
+
}
|
|
433
|
+
</style>
|
|
434
|
+
<main part="main">
|
|
435
435
|
${this.disableSelect
|
|
436
436
|
? ''
|
|
437
|
-
: html `
|
|
438
|
-
<md-icon drag>drag_indicator</md-icon>
|
|
439
|
-
<md-checkbox
|
|
440
|
-
.checked=${this.selected}
|
|
441
|
-
@mousedown=${(e) => e.stopPropagation()}
|
|
442
|
-
@touchstart=${(e) => e.stopPropagation()}
|
|
443
|
-
@dblclick=${(e) => e.stopPropagation()}
|
|
444
|
-
@change=${(e) => this.#setSelected(e.target.checked)}
|
|
445
|
-
></md-checkbox>
|
|
446
|
-
`}
|
|
447
|
-
|
|
448
|
-
<slot></slot>
|
|
449
|
-
</main>
|
|
450
|
-
<div item-footer part="item-footer-container">
|
|
451
|
-
<slot name="item-footer"></slot>
|
|
452
|
-
</div>
|
|
437
|
+
: html `
|
|
438
|
+
<md-icon drag>drag_indicator</md-icon>
|
|
439
|
+
<md-checkbox
|
|
440
|
+
.checked=${this.selected}
|
|
441
|
+
@mousedown=${(e) => e.stopPropagation()}
|
|
442
|
+
@touchstart=${(e) => e.stopPropagation()}
|
|
443
|
+
@dblclick=${(e) => e.stopPropagation()}
|
|
444
|
+
@change=${(e) => this.#setSelected(e.target.checked)}
|
|
445
|
+
></md-checkbox>
|
|
446
|
+
`}
|
|
447
|
+
|
|
448
|
+
<slot></slot>
|
|
449
|
+
</main>
|
|
450
|
+
<div item-footer part="item-footer-container">
|
|
451
|
+
<slot name="item-footer"></slot>
|
|
452
|
+
</div>
|
|
453
453
|
`;
|
|
454
454
|
}
|
|
455
455
|
};
|