@francofantomius/material-components 0.1.0 → 1.0.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 +62 -0
- package/README.md +277 -83
- package/custom-elements.json +21010 -2354
- package/dist/chunks/badge-G4EjcMoy.js +89 -0
- package/dist/chunks/badge-G4EjcMoy.js.map +1 -0
- package/dist/chunks/button-B4TSZ7Sl.js +250 -0
- package/dist/chunks/button-B4TSZ7Sl.js.map +1 -0
- package/dist/chunks/card-DVffdPpv.js +163 -0
- package/dist/chunks/card-DVffdPpv.js.map +1 -0
- package/dist/chunks/checkbox-BqlboAHd.js +194 -0
- package/dist/chunks/checkbox-BqlboAHd.js.map +1 -0
- package/dist/chunks/chip-CI1ZINnr.js +169 -0
- package/dist/chunks/chip-CI1ZINnr.js.map +1 -0
- package/dist/chunks/code-C5UFBkCh.js +1830 -0
- package/dist/chunks/code-C5UFBkCh.js.map +1 -0
- package/dist/chunks/decorate-DXuynaiA.js +39 -0
- package/dist/chunks/decorate-DXuynaiA.js.map +1 -0
- package/dist/chunks/dialog-DGVEE5m_.js +158 -0
- package/dist/chunks/dialog-DGVEE5m_.js.map +1 -0
- package/dist/chunks/divider-DNepwoZv.js +82 -0
- package/dist/chunks/divider-DNepwoZv.js.map +1 -0
- package/dist/chunks/fab-C9j3WBHE.js +150 -0
- package/dist/chunks/fab-C9j3WBHE.js.map +1 -0
- package/dist/chunks/focus-ring-CuiJuM-y.js +71 -0
- package/dist/chunks/focus-ring-CuiJuM-y.js.map +1 -0
- package/dist/chunks/{form-associated-fKbeX_2P.js → form-associated-Cty_ZaS9.js} +26 -27
- package/dist/chunks/form-associated-Cty_ZaS9.js.map +1 -0
- package/dist/chunks/icon-DrNqcNEL.js +62 -0
- package/dist/chunks/icon-DrNqcNEL.js.map +1 -0
- package/dist/chunks/icon-button-BdSc7eot.js +188 -0
- package/dist/chunks/icon-button-BdSc7eot.js.map +1 -0
- package/dist/chunks/list-D8olR7oZ.js +204 -0
- package/dist/chunks/list-D8olR7oZ.js.map +1 -0
- package/dist/chunks/navigation-drawer-CKl44Ef5.js +531 -0
- package/dist/chunks/navigation-drawer-CKl44Ef5.js.map +1 -0
- package/dist/chunks/player-C4ydiIpr.js +1582 -0
- package/dist/chunks/player-C4ydiIpr.js.map +1 -0
- package/dist/chunks/progress-LQmLMDjX.js +266 -0
- package/dist/chunks/progress-LQmLMDjX.js.map +1 -0
- package/dist/chunks/radio-Bily78NT.js +205 -0
- package/dist/chunks/radio-Bily78NT.js.map +1 -0
- package/dist/chunks/ripple-squbKHhj.js +135 -0
- package/dist/chunks/ripple-squbKHhj.js.map +1 -0
- package/dist/chunks/search-bar-TXnqJ-gd.js +698 -0
- package/dist/chunks/search-bar-TXnqJ-gd.js.map +1 -0
- package/dist/chunks/snackbar-Wsz3BzEY.js +161 -0
- package/dist/chunks/snackbar-Wsz3BzEY.js.map +1 -0
- package/dist/chunks/switch-DdukrvXb.js +190 -0
- package/dist/chunks/switch-DdukrvXb.js.map +1 -0
- package/dist/chunks/table-aRTYzDyE.js +773 -0
- package/dist/chunks/table-aRTYzDyE.js.map +1 -0
- package/dist/chunks/tabs-BfOtoeir.js +191 -0
- package/dist/chunks/tabs-BfOtoeir.js.map +1 -0
- package/dist/chunks/text-field-hN6-2HQy.js +338 -0
- package/dist/chunks/text-field-hN6-2HQy.js.map +1 -0
- package/dist/chunks/top-app-bar-Dgbp6CFv.js +228 -0
- package/dist/chunks/top-app-bar-Dgbp6CFv.js.map +1 -0
- package/dist/components/account-menu/account-menu.css.d.ts +3 -0
- package/dist/components/account-menu/account-menu.css.d.ts.map +1 -0
- package/dist/components/account-menu/account-menu.d.ts +111 -0
- package/dist/components/account-menu/account-menu.d.ts.map +1 -0
- package/dist/components/app-drawer/app-drawer.css.d.ts +3 -0
- package/dist/components/app-drawer/app-drawer.css.d.ts.map +1 -0
- package/dist/components/app-drawer/app-drawer.d.ts +173 -0
- package/dist/components/app-drawer/app-drawer.d.ts.map +1 -0
- package/dist/components/badge/badge.js +2 -91
- package/dist/components/button/button.js +2 -261
- package/dist/components/card/card.js +2 -167
- package/dist/components/checkbox/checkbox.css.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.js +2 -186
- package/dist/components/chip/chip.js +3 -172
- package/dist/components/code/code.css.d.ts +2 -0
- package/dist/components/code/code.css.d.ts.map +1 -0
- package/dist/components/code/code.d.ts +106 -0
- package/dist/components/code/code.d.ts.map +1 -0
- package/dist/components/code/code.js +5 -0
- package/dist/components/code/highlighter.d.ts +8 -0
- package/dist/components/code/highlighter.d.ts.map +1 -0
- package/dist/components/code/linter.d.ts +44 -0
- package/dist/components/code/linter.d.ts.map +1 -0
- package/dist/components/dialog/dialog.js +2 -165
- package/dist/components/divider/divider.js +2 -79
- package/dist/components/fab/fab.js +2 -153
- package/dist/components/icon/icon.js +2 -68
- package/dist/components/icon-button/icon-button.css.d.ts.map +1 -1
- package/dist/components/icon-button/icon-button.js +1 -189
- package/dist/components/list/list.css.d.ts.map +1 -1
- package/dist/components/list/list.d.ts.map +1 -1
- package/dist/components/list/list.js +3 -188
- package/dist/components/navigation-drawer/navigation-drawer.css.d.ts +3 -0
- package/dist/components/navigation-drawer/navigation-drawer.css.d.ts.map +1 -0
- package/dist/components/navigation-drawer/navigation-drawer.d.ts +76 -0
- package/dist/components/navigation-drawer/navigation-drawer.d.ts.map +1 -0
- package/dist/components/navigation-drawer/navigation-drawer.js +8 -0
- package/dist/components/player/player.css.d.ts +2 -0
- package/dist/components/player/player.css.d.ts.map +1 -0
- package/dist/components/player/player.d.ts +99 -0
- package/dist/components/player/player.d.ts.map +1 -0
- package/dist/components/player/player.js +7 -0
- package/dist/components/progress/progress.css.d.ts.map +1 -1
- package/dist/components/progress/progress.d.ts +2 -0
- package/dist/components/progress/progress.d.ts.map +1 -1
- package/dist/components/progress/progress.js +3 -181
- package/dist/components/radio/radio.css.d.ts.map +1 -1
- package/dist/components/radio/radio.js +3 -203
- package/dist/components/search-bar/search-bar.css.d.ts +2 -0
- package/dist/components/search-bar/search-bar.css.d.ts.map +1 -0
- package/dist/components/search-bar/search-bar.d.ts +81 -0
- package/dist/components/search-bar/search-bar.d.ts.map +1 -0
- package/dist/components/search-bar/search-bar.js +5 -0
- package/dist/components/snackbar/snackbar.js +2 -162
- package/dist/components/switch/switch.css.d.ts.map +1 -1
- package/dist/components/switch/switch.js +2 -169
- package/dist/components/table/table.css.d.ts +8 -0
- package/dist/components/table/table.css.d.ts.map +1 -0
- package/dist/components/table/table.d.ts +158 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/table/table.js +13 -0
- package/dist/components/tabs/tabs.js +3 -198
- package/dist/components/text-field/text-field.css.d.ts.map +1 -1
- package/dist/components/text-field/text-field.d.ts +1 -1
- package/dist/components/text-field/text-field.d.ts.map +1 -1
- package/dist/components/text-field/text-field.js +2 -325
- package/dist/components/top-app-bar/top-app-bar.css.d.ts +2 -0
- package/dist/components/top-app-bar/top-app-bar.css.d.ts.map +1 -0
- package/dist/components/top-app-bar/top-app-bar.d.ts +29 -0
- package/dist/components/top-app-bar/top-app-bar.d.ts.map +1 -0
- package/dist/components/top-app-bar/top-app-bar.js +5 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2264 -58
- package/dist/index.js.map +1 -1
- package/dist/internal/focus-ring/focus-ring.d.ts.map +1 -1
- package/dist/internal/focus-ring/focus-ring.js +4 -0
- package/dist/internal/ripple/ripple.css.d.ts.map +1 -1
- package/dist/internal/ripple/ripple.d.ts +0 -3
- package/dist/internal/ripple/ripple.d.ts.map +1 -1
- package/dist/internal/ripple/ripple.js +2 -142
- package/dist/tokens/index.js +336 -11
- package/dist/tokens/index.js.map +1 -1
- package/package.json +118 -12
- package/dist/chunks/base-component-DQTjlEVL.js +0 -34
- package/dist/chunks/base-component-DQTjlEVL.js.map +0 -1
- package/dist/chunks/focus-ring-Dl-XoEKK.js +0 -71
- package/dist/chunks/focus-ring-Dl-XoEKK.js.map +0 -1
- package/dist/chunks/form-associated-fKbeX_2P.js.map +0 -1
- package/dist/chunks/theme.css-DV3DRha-.js +0 -263
- package/dist/chunks/theme.css-DV3DRha-.js.map +0 -1
- package/dist/components/badge/badge.js.map +0 -1
- package/dist/components/button/button.js.map +0 -1
- package/dist/components/card/card.js.map +0 -1
- package/dist/components/checkbox/checkbox.js.map +0 -1
- package/dist/components/chip/chip.js.map +0 -1
- package/dist/components/dialog/dialog.js.map +0 -1
- package/dist/components/divider/divider.js.map +0 -1
- package/dist/components/fab/fab.js.map +0 -1
- package/dist/components/icon/icon.js.map +0 -1
- package/dist/components/icon-button/icon-button.js.map +0 -1
- package/dist/components/list/list.js.map +0 -1
- package/dist/components/progress/progress.js.map +0 -1
- package/dist/components/radio/radio.js.map +0 -1
- package/dist/components/snackbar/snackbar.js.map +0 -1
- package/dist/components/switch/switch.js.map +0 -1
- package/dist/components/tabs/tabs.js.map +0 -1
- package/dist/components/text-field/text-field.js.map +0 -1
- package/dist/internal/ripple/ripple.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,59 +1,2265 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
1
|
+
import { applyTheme as F, colorSchemeToCssVariables as B, darkColorScheme as O, elevationTokens as L, lightColorScheme as P, motionTokens as R, shapeTokens as j, themeStyles as K, typographyTokens as U } from "./tokens/index.js";
|
|
2
|
+
import { n as f, t as a } from "./chunks/decorate-DXuynaiA.js";
|
|
3
|
+
import { t as H } from "./chunks/form-associated-Cty_ZaS9.js";
|
|
4
|
+
import { t as N } from "./chunks/ripple-squbKHhj.js";
|
|
5
|
+
import { t as V } from "./chunks/focus-ring-CuiJuM-y.js";
|
|
6
|
+
import { t as J } from "./chunks/icon-DrNqcNEL.js";
|
|
7
|
+
import { t as X } from "./chunks/button-B4TSZ7Sl.js";
|
|
8
|
+
import { t as ee } from "./chunks/icon-button-BdSc7eot.js";
|
|
9
|
+
import { t as ie } from "./chunks/fab-C9j3WBHE.js";
|
|
10
|
+
import { t as re } from "./chunks/text-field-hN6-2HQy.js";
|
|
11
|
+
import { t as se } from "./chunks/checkbox-BqlboAHd.js";
|
|
12
|
+
import { t as de } from "./chunks/switch-DdukrvXb.js";
|
|
13
|
+
import { n as ce, t as pe } from "./chunks/radio-Bily78NT.js";
|
|
14
|
+
import { t as ge } from "./chunks/card-DVffdPpv.js";
|
|
15
|
+
import { t as ve } from "./chunks/dialog-DGVEE5m_.js";
|
|
16
|
+
import { t as fe } from "./chunks/divider-DNepwoZv.js";
|
|
17
|
+
import { n as ye, t as xe } from "./chunks/progress-LQmLMDjX.js";
|
|
18
|
+
import { t as ke } from "./chunks/badge-G4EjcMoy.js";
|
|
19
|
+
import { n as Ae, t as De } from "./chunks/chip-CI1ZINnr.js";
|
|
20
|
+
import { n as Ce, t as Ie } from "./chunks/tabs-BfOtoeir.js";
|
|
21
|
+
import { n as Ee, t as Me } from "./chunks/list-D8olR7oZ.js";
|
|
22
|
+
import { t as Fe } from "./chunks/snackbar-Wsz3BzEY.js";
|
|
23
|
+
import { n as Oe, t as Le } from "./chunks/top-app-bar-Dgbp6CFv.js";
|
|
24
|
+
import { a as Re, i as je, n as Ke, r as Ue, t as _e } from "./chunks/navigation-drawer-CKl44Ef5.js";
|
|
25
|
+
import { a as He, c as Ge, i as Ne, l as qe, n as Ve, o as We, r as Je, s as Qe, t as Xe, u as Ze } from "./chunks/table-aRTYzDyE.js";
|
|
26
|
+
import { n as tt, t as it } from "./chunks/search-bar-TXnqJ-gd.js";
|
|
27
|
+
import { n as rt, t as ot } from "./chunks/code-C5UFBkCh.js";
|
|
28
|
+
import { i as nt, n as dt, r as lt, t as ct } from "./chunks/player-C4ydiIpr.js";
|
|
29
|
+
import { css as y, html as o, nothing as h } from "lit";
|
|
30
|
+
import { customElement as v, property as r, state as C } from "lit/decorators.js";
|
|
31
|
+
var I = y`
|
|
32
|
+
:host {
|
|
33
|
+
display: inline-block;
|
|
34
|
+
position: relative;
|
|
35
|
+
font-family: var(--md-sys-typescale-font-family, inherit);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host([hidden]) {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.trigger-container {
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.backdrop {
|
|
47
|
+
display: none;
|
|
48
|
+
position: fixed;
|
|
49
|
+
inset: 0;
|
|
50
|
+
z-index: 990;
|
|
51
|
+
background-color: transparent;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([modal]) .backdrop {
|
|
55
|
+
background-color: rgba(0, 0, 0, 0.32);
|
|
56
|
+
backdrop-filter: blur(1px);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([open][modal]) .backdrop {
|
|
60
|
+
display: block;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.popover {
|
|
64
|
+
display: none;
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: calc(100% + 8px);
|
|
67
|
+
right: 0;
|
|
68
|
+
z-index: 1000;
|
|
69
|
+
width: var(--md-app-drawer-width, 328px);
|
|
70
|
+
max-width: calc(100vw - 24px);
|
|
71
|
+
max-height: var(--md-app-drawer-max-height, 460px);
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
padding: 16px;
|
|
74
|
+
border-radius: var(--md-sys-shape-corner-extra-large, 24px);
|
|
75
|
+
background-color: var(--md-sys-color-surface-container-high, #ECE6F0);
|
|
76
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
77
|
+
box-shadow: var(--md-sys-elevation-level3, 0px 4px 8px 3px rgba(0, 0, 0, 0.15), 0px 1px 3px rgba(0, 0, 0, 0.3));
|
|
78
|
+
overflow-y: auto;
|
|
79
|
+
overflow-x: hidden;
|
|
80
|
+
overscroll-behavior: contain;
|
|
81
|
+
scrollbar-width: thin;
|
|
82
|
+
scrollbar-color: var(--md-sys-color-outline-variant, #CAC4D0) transparent;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host([alignment='start']) .popover,
|
|
86
|
+
:host([pivot='left']) .popover {
|
|
87
|
+
right: auto;
|
|
88
|
+
left: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host([open]) .popover {
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
gap: 12px;
|
|
95
|
+
animation: md-app-drawer-in 150ms cubic-bezier(0.2, 0, 0, 1) forwards;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@keyframes md-app-drawer-in {
|
|
99
|
+
from {
|
|
100
|
+
opacity: 0;
|
|
101
|
+
transform: scale(0.92) translateY(-8px);
|
|
102
|
+
}
|
|
103
|
+
to {
|
|
104
|
+
opacity: 1;
|
|
105
|
+
transform: scale(1) translateY(0);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.header {
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
justify-content: space-between;
|
|
113
|
+
padding: 0 4px;
|
|
114
|
+
min-height: 40px;
|
|
115
|
+
box-sizing: border-box;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.header-leading {
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
gap: 4px;
|
|
122
|
+
min-width: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.back-btn,
|
|
126
|
+
slot[name="back-button"] {
|
|
127
|
+
display: none;
|
|
128
|
+
--md-icon-size: 24px;
|
|
129
|
+
font-size: 24px;
|
|
130
|
+
flex-shrink: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.header-actions {
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
gap: 4px;
|
|
137
|
+
margin-left: auto;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.edit-btn,
|
|
141
|
+
.reset-btn {
|
|
142
|
+
--md-icon-size: 20px;
|
|
143
|
+
font-size: 20px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:host([editing]) .grid ::slotted(md-app-drawer-item),
|
|
147
|
+
:host([editing]) .grid ::slotted(md-app-item),
|
|
148
|
+
:host([editing]) .grid ::slotted(md-app-launcher-item) {
|
|
149
|
+
cursor: grab;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.headline {
|
|
153
|
+
margin: 0;
|
|
154
|
+
font-size: var(--md-sys-typescale-title-medium-size, 16px);
|
|
155
|
+
font-weight: 500;
|
|
156
|
+
line-height: 24px;
|
|
157
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
158
|
+
white-space: nowrap;
|
|
159
|
+
overflow: hidden;
|
|
160
|
+
text-overflow: ellipsis;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.grid {
|
|
164
|
+
display: grid;
|
|
165
|
+
grid-template-columns: repeat(var(--md-app-drawer-columns, 3), 1fr);
|
|
166
|
+
gap: 8px;
|
|
167
|
+
width: 100%;
|
|
168
|
+
box-sizing: border-box;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
::slotted([draggable='true']) {
|
|
172
|
+
cursor: grab;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
::slotted([dragging]),
|
|
176
|
+
::slotted(.is-dragging) {
|
|
177
|
+
opacity: 0.4;
|
|
178
|
+
transform: scale(0.95);
|
|
179
|
+
cursor: grabbing !important;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
::slotted([drag-over]),
|
|
183
|
+
::slotted(.drag-over) {
|
|
184
|
+
outline: 2px dashed var(--md-sys-color-primary, #6750A4);
|
|
185
|
+
outline-offset: -2px;
|
|
186
|
+
border-radius: var(--md-sys-shape-corner-medium, 12px);
|
|
187
|
+
background-color: var(--md-sys-color-surface-container-highest, rgba(103, 80, 164, 0.08));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.footer {
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
justify-content: center;
|
|
194
|
+
text-align: center;
|
|
195
|
+
width: 100%;
|
|
196
|
+
padding-top: 12px;
|
|
197
|
+
margin-top: 4px;
|
|
198
|
+
border-top: 1px solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.1));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.footer ::slotted(*) {
|
|
202
|
+
margin-left: auto;
|
|
203
|
+
margin-right: auto;
|
|
204
|
+
text-align: center;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.footer:empty {
|
|
208
|
+
display: none;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* Responsive Fullscreen / Mobile Mode */
|
|
212
|
+
@media (max-width: 768px) {
|
|
213
|
+
.back-btn,
|
|
214
|
+
slot[name="back-button"] {
|
|
215
|
+
display: inline-flex;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
:host([open]) .popover {
|
|
219
|
+
position: fixed;
|
|
220
|
+
top: 0;
|
|
221
|
+
left: 0;
|
|
222
|
+
right: 0;
|
|
223
|
+
bottom: 0;
|
|
224
|
+
width: 100vw;
|
|
225
|
+
max-width: 100vw;
|
|
226
|
+
height: 100vh;
|
|
227
|
+
height: 100dvh;
|
|
228
|
+
max-height: 100vh;
|
|
229
|
+
max-height: 100dvh;
|
|
230
|
+
border-radius: 0;
|
|
231
|
+
box-shadow: none;
|
|
232
|
+
z-index: 10000;
|
|
233
|
+
padding: 12px 16px env(safe-area-inset-bottom, 16px) 16px;
|
|
234
|
+
margin: 0;
|
|
235
|
+
gap: 16px;
|
|
236
|
+
animation: md-app-drawer-mobile-in 200ms cubic-bezier(0.2, 0, 0, 1) forwards;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.header {
|
|
240
|
+
min-height: 48px;
|
|
241
|
+
padding: 0;
|
|
242
|
+
gap: 8px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.header-leading {
|
|
246
|
+
gap: 8px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.headline {
|
|
250
|
+
font-size: var(--md-sys-typescale-title-large-size, 20px);
|
|
251
|
+
font-weight: 500;
|
|
252
|
+
line-height: 28px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.grid {
|
|
256
|
+
grid-template-columns: repeat(var(--md-app-drawer-columns, 3), 1fr);
|
|
257
|
+
gap: 12px 8px;
|
|
258
|
+
flex: 1;
|
|
259
|
+
align-content: start;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.footer {
|
|
263
|
+
padding-top: 16px;
|
|
264
|
+
padding-bottom: 8px;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
@keyframes md-app-drawer-mobile-in {
|
|
269
|
+
from {
|
|
270
|
+
opacity: 0;
|
|
271
|
+
transform: translateY(12px);
|
|
272
|
+
}
|
|
273
|
+
to {
|
|
274
|
+
opacity: 1;
|
|
275
|
+
transform: translateY(0);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* Explicit Fullscreen Mode */
|
|
280
|
+
:host([fullscreen]) .back-btn,
|
|
281
|
+
:host([fullscreen]) slot[name="back-button"] {
|
|
282
|
+
display: inline-flex;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
:host([fullscreen][open]) .popover {
|
|
286
|
+
position: fixed;
|
|
287
|
+
top: 0;
|
|
288
|
+
left: 0;
|
|
289
|
+
right: 0;
|
|
290
|
+
bottom: 0;
|
|
291
|
+
width: 100vw;
|
|
292
|
+
max-width: 100vw;
|
|
293
|
+
height: 100vh;
|
|
294
|
+
height: 100dvh;
|
|
295
|
+
max-height: 100vh;
|
|
296
|
+
max-height: 100dvh;
|
|
297
|
+
border-radius: 0;
|
|
298
|
+
box-shadow: none;
|
|
299
|
+
z-index: 10000;
|
|
300
|
+
padding: 12px 16px env(safe-area-inset-bottom, 16px) 16px;
|
|
301
|
+
margin: 0;
|
|
302
|
+
gap: 16px;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
:host([fullscreen]) .header {
|
|
306
|
+
min-height: 48px;
|
|
307
|
+
padding: 0;
|
|
308
|
+
gap: 8px;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
:host([fullscreen]) .header-leading {
|
|
312
|
+
gap: 8px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
:host([fullscreen]) .headline {
|
|
316
|
+
font-size: var(--md-sys-typescale-title-large-size, 20px);
|
|
317
|
+
font-weight: 500;
|
|
318
|
+
line-height: 28px;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
:host([fullscreen]) .grid {
|
|
322
|
+
grid-template-columns: repeat(var(--md-app-drawer-columns, 3), 1fr);
|
|
323
|
+
gap: 12px 8px;
|
|
324
|
+
flex: 1;
|
|
325
|
+
align-content: start;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
:host([fullscreen]) .footer {
|
|
329
|
+
padding-top: 16px;
|
|
330
|
+
padding-bottom: 8px;
|
|
331
|
+
}
|
|
332
|
+
`, S = y`
|
|
333
|
+
:host {
|
|
334
|
+
display: block;
|
|
335
|
+
box-sizing: border-box;
|
|
336
|
+
font-family: var(--md-sys-typescale-font-family, inherit);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
:host([hidden]) {
|
|
340
|
+
display: none;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.item {
|
|
344
|
+
position: relative;
|
|
345
|
+
display: flex;
|
|
346
|
+
flex-direction: column;
|
|
347
|
+
align-items: center;
|
|
348
|
+
justify-content: center;
|
|
349
|
+
text-align: center;
|
|
350
|
+
width: 100%;
|
|
351
|
+
min-height: 84px;
|
|
352
|
+
padding: 8px 4px;
|
|
353
|
+
box-sizing: border-box;
|
|
354
|
+
border-radius: var(--md-sys-shape-corner-medium, 12px);
|
|
355
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
356
|
+
text-decoration: none;
|
|
357
|
+
cursor: pointer;
|
|
358
|
+
user-select: none;
|
|
359
|
+
transition: background-color 150ms ease;
|
|
360
|
+
background: transparent;
|
|
361
|
+
border: none;
|
|
362
|
+
outline: none;
|
|
363
|
+
-webkit-tap-highlight-color: transparent;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.item:hover {
|
|
367
|
+
background-color: var(--md-sys-color-surface-container-highest, rgba(0, 0, 0, 0.06));
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
:host([active]) .item,
|
|
371
|
+
:host([selected]) .item {
|
|
372
|
+
background-color: var(--md-sys-color-secondary-container, #E8DEF8);
|
|
373
|
+
color: var(--md-sys-color-on-secondary-container, #1D192B);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
:host([disabled]) .item {
|
|
377
|
+
opacity: 0.38;
|
|
378
|
+
cursor: not-allowed;
|
|
379
|
+
pointer-events: none;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
:host([draggable='true']) .item {
|
|
383
|
+
cursor: grab;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
:host([dragging]) {
|
|
387
|
+
opacity: 0.4;
|
|
388
|
+
transform: scale(0.95);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
:host([dragging]) .item {
|
|
392
|
+
cursor: grabbing;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
:host([drag-over]) .item {
|
|
396
|
+
outline: 2px dashed var(--md-sys-color-primary, #6750A4);
|
|
397
|
+
outline-offset: -2px;
|
|
398
|
+
background-color: var(--md-sys-color-surface-container-highest, rgba(103, 80, 164, 0.08));
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.icon-wrapper {
|
|
402
|
+
position: relative;
|
|
403
|
+
display: flex;
|
|
404
|
+
align-items: center;
|
|
405
|
+
justify-content: center;
|
|
406
|
+
width: 44px;
|
|
407
|
+
height: 44px;
|
|
408
|
+
margin-bottom: 4px;
|
|
409
|
+
border-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
410
|
+
color: var(--md-sys-color-primary, #6750A4);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.icon-wrapper md-icon {
|
|
414
|
+
--md-icon-size: 28px;
|
|
415
|
+
font-size: 28px;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.icon-image {
|
|
419
|
+
width: 32px;
|
|
420
|
+
height: 32px;
|
|
421
|
+
object-fit: contain;
|
|
422
|
+
border-radius: 4px;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.label {
|
|
426
|
+
display: -webkit-box;
|
|
427
|
+
-webkit-line-clamp: 2;
|
|
428
|
+
-webkit-box-orient: vertical;
|
|
429
|
+
overflow: hidden;
|
|
430
|
+
text-overflow: ellipsis;
|
|
431
|
+
font-size: 12px;
|
|
432
|
+
line-height: 16px;
|
|
433
|
+
font-weight: 500;
|
|
434
|
+
max-width: 100%;
|
|
435
|
+
word-break: break-word;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.badge-container {
|
|
439
|
+
position: absolute;
|
|
440
|
+
top: 2px;
|
|
441
|
+
right: 2px;
|
|
442
|
+
}
|
|
443
|
+
`, g = class extends f {
|
|
444
|
+
constructor(...t) {
|
|
445
|
+
super(...t), this.icon = "", this.src = "", this.label = "", this.headline = "", this.badge = "", this.href = "", this.target = "", this.disabled = !1, this.active = !1, this.selected = !1, this.dragging = !1, this.dragOver = !1, this.wasDragging = !1, this.handleClick = (e) => {
|
|
446
|
+
if (this.disabled || this.wasDragging || this.dragging) {
|
|
447
|
+
e.preventDefault(), e.stopImmediatePropagation();
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
const i = this.label || this.headline;
|
|
451
|
+
this.emitEvent("item-click", {
|
|
452
|
+
label: i,
|
|
453
|
+
icon: this.icon,
|
|
454
|
+
src: this.src,
|
|
455
|
+
href: this.href,
|
|
456
|
+
active: this.active
|
|
457
|
+
});
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
static {
|
|
461
|
+
this.styles = [f.styles, S];
|
|
462
|
+
}
|
|
463
|
+
willUpdate(t) {
|
|
464
|
+
super.willUpdate(t), t.has("selected") && !t.has("active") ? this.active = this.selected : t.has("active") && !t.has("selected") && (this.selected = this.active);
|
|
465
|
+
}
|
|
466
|
+
internalSetDragging(t) {
|
|
467
|
+
this.dragging = t, t ? this.wasDragging = !0 : setTimeout(() => {
|
|
468
|
+
this.wasDragging = !1;
|
|
469
|
+
}, 100);
|
|
470
|
+
}
|
|
471
|
+
render() {
|
|
472
|
+
const t = this.label || this.headline, e = this.src ? o`<img class="icon-image" src=${this.src} alt=${t || "App icon"} draggable="false" />` : this.icon ? o`<md-icon name=${this.icon}></md-icon>` : h, i = o`
|
|
473
|
+
<md-ripple ?disabled=${this.disabled}></md-ripple>
|
|
474
|
+
<md-focus-ring></md-focus-ring>
|
|
475
|
+
|
|
476
|
+
<div class="icon-wrapper">
|
|
477
|
+
<slot name="icon">${e}</slot>
|
|
478
|
+
${this.badge ? o`<div class="badge-container"><slot name="badge"><span class="badge">${this.badge}</span></slot></div>` : o`<div class="badge-container"><slot name="badge"></slot></div>`}
|
|
479
|
+
</div>
|
|
480
|
+
|
|
481
|
+
<span class="label">
|
|
482
|
+
<slot>${t}</slot>
|
|
483
|
+
</span>
|
|
484
|
+
`;
|
|
485
|
+
return this.href ? o`
|
|
486
|
+
<a
|
|
487
|
+
class="item"
|
|
488
|
+
href=${this.disabled ? h : this.href}
|
|
489
|
+
target=${this.target || h}
|
|
490
|
+
aria-disabled=${this.disabled ? "true" : h}
|
|
491
|
+
tabindex=${this.disabled ? "-1" : "0"}
|
|
492
|
+
draggable="false"
|
|
493
|
+
@click=${this.handleClick}
|
|
494
|
+
>
|
|
495
|
+
${i}
|
|
496
|
+
</a>
|
|
497
|
+
` : o`
|
|
498
|
+
<button
|
|
499
|
+
class="item"
|
|
500
|
+
type="button"
|
|
501
|
+
tabindex=${this.disabled ? "-1" : "0"}
|
|
502
|
+
aria-disabled=${this.disabled ? "true" : h}
|
|
503
|
+
?disabled=${this.disabled}
|
|
504
|
+
draggable="false"
|
|
505
|
+
@click=${this.handleClick}
|
|
506
|
+
>
|
|
507
|
+
${i}
|
|
508
|
+
</button>
|
|
509
|
+
`;
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
a([r({ type: String })], g.prototype, "icon", void 0);
|
|
513
|
+
a([r({ type: String })], g.prototype, "src", void 0);
|
|
514
|
+
a([r({ type: String })], g.prototype, "label", void 0);
|
|
515
|
+
a([r({ type: String })], g.prototype, "headline", void 0);
|
|
516
|
+
a([r({ type: String })], g.prototype, "badge", void 0);
|
|
517
|
+
a([r({ type: String })], g.prototype, "href", void 0);
|
|
518
|
+
a([r({ type: String })], g.prototype, "target", void 0);
|
|
519
|
+
a([r({
|
|
520
|
+
type: Boolean,
|
|
521
|
+
reflect: !0
|
|
522
|
+
})], g.prototype, "disabled", void 0);
|
|
523
|
+
a([r({
|
|
524
|
+
type: Boolean,
|
|
525
|
+
reflect: !0
|
|
526
|
+
})], g.prototype, "active", void 0);
|
|
527
|
+
a([r({
|
|
528
|
+
type: Boolean,
|
|
529
|
+
reflect: !0
|
|
530
|
+
})], g.prototype, "selected", void 0);
|
|
531
|
+
a([r({
|
|
532
|
+
type: Boolean,
|
|
533
|
+
reflect: !0
|
|
534
|
+
})], g.prototype, "dragging", void 0);
|
|
535
|
+
a([r({
|
|
536
|
+
type: Boolean,
|
|
537
|
+
reflect: !0,
|
|
538
|
+
attribute: "drag-over"
|
|
539
|
+
})], g.prototype, "dragOver", void 0);
|
|
540
|
+
g = a([v("md-app-drawer-item")], g);
|
|
541
|
+
var l = class extends f {
|
|
542
|
+
constructor(...t) {
|
|
543
|
+
super(...t), this.open = !1, this.headline = "", this.icon = "apps", this.ariaLabelText = "App launcher", this.noTrigger = !1, this.alignment = "end", this.pivot = "right", this.modal = !1, this.fullscreen = !1, this.columns = 3, this.reorderable = !0, this.editable = !0, this.editing = !1, this.storageKey = "", this.disableStorage = !1, this.isReordering = !1, this.initialOrder = [], this.draggedItem = null, this.dropTargetItem = null, this.handleKeyDown = (e) => {
|
|
544
|
+
e.key === "Escape" && this.open && this.close();
|
|
545
|
+
}, this.handleDocumentClick = (e) => {
|
|
546
|
+
this.open && (e.composedPath().includes(this) || this.close());
|
|
547
|
+
}, this.handleBackdropClick = () => {
|
|
548
|
+
this.close();
|
|
549
|
+
}, this.handleBackClick = (e) => {
|
|
550
|
+
e.stopPropagation(), this.close();
|
|
551
|
+
}, this.handleTriggerClick = (e) => {
|
|
552
|
+
e.stopPropagation(), this.toggle();
|
|
553
|
+
}, this.handleEditToggle = (e) => {
|
|
554
|
+
e.stopPropagation(), this.toggleEdit();
|
|
555
|
+
}, this.handleResetClick = (e) => {
|
|
556
|
+
e.stopPropagation(), this.resetOrder();
|
|
557
|
+
}, this.handleSlotChange = () => {
|
|
558
|
+
this.isReordering || (this.initialOrder.length === 0 && (this.initialOrder = this.getOrder()), this.applySavedOrder(), this.updateDraggableItems());
|
|
559
|
+
}, this.handleDragStart = (e) => {
|
|
560
|
+
if (!this.isReorderActive()) return;
|
|
561
|
+
const i = this.findDrawerItem(e);
|
|
562
|
+
i && (i.disabled || i.hasAttribute("disabled") || (this.draggedItem = i, i.classList.add("is-dragging"), i.setAttribute("dragging", ""), typeof i.internalSetDragging == "function" && i.internalSetDragging(!0), e.dataTransfer && (e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", this.getItemKey(i)))));
|
|
563
|
+
}, this.handleDragOver = (e) => {
|
|
564
|
+
if (!this.isReorderActive() || !this.draggedItem) return;
|
|
565
|
+
const i = this.findDrawerItem(e);
|
|
566
|
+
if (!i || i === this.draggedItem) {
|
|
567
|
+
this.dropTargetItem && this.dropTargetItem !== this.draggedItem && (this.dropTargetItem.classList.remove("drag-over", "drop-target"), this.dropTargetItem.removeAttribute("drag-over"), "dragOver" in this.dropTargetItem && (this.dropTargetItem.dragOver = !1), this.dropTargetItem = null);
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"), this.dropTargetItem !== i && (this.dropTargetItem && (this.dropTargetItem.classList.remove("drag-over", "drop-target"), this.dropTargetItem.removeAttribute("drag-over"), "dragOver" in this.dropTargetItem && (this.dropTargetItem.dragOver = !1)), this.dropTargetItem = i, i.classList.add("drag-over", "drop-target"), i.setAttribute("drag-over", ""), "dragOver" in i && (i.dragOver = !0));
|
|
571
|
+
}, this.handleDragLeave = (e) => {
|
|
572
|
+
const i = e.relatedTarget;
|
|
573
|
+
this.dropTargetItem && (!i || !this.dropTargetItem.contains(i)) && (this.dropTargetItem.classList.remove("drag-over", "drop-target"), this.dropTargetItem.removeAttribute("drag-over"), "dragOver" in this.dropTargetItem && (this.dropTargetItem.dragOver = !1), this.dropTargetItem = null);
|
|
574
|
+
}, this.handleDrop = (e) => {
|
|
575
|
+
if (!this.isReorderActive() || !this.draggedItem) return;
|
|
576
|
+
e.preventDefault();
|
|
577
|
+
const i = this.findDrawerItem(e);
|
|
578
|
+
if (i && i !== this.draggedItem) {
|
|
579
|
+
const n = this.getItems(), d = n.indexOf(this.draggedItem), p = n.indexOf(i);
|
|
580
|
+
d !== -1 && p !== -1 && this.reorderItem(d, p);
|
|
581
|
+
}
|
|
582
|
+
this.cleanupDrag();
|
|
583
|
+
}, this.handleDragEnd = () => {
|
|
584
|
+
this.cleanupDrag();
|
|
585
|
+
}, this.handleItemKeyDown = (e) => {
|
|
586
|
+
if (!(!this.isReorderActive() || !e.altKey) && [
|
|
587
|
+
"ArrowLeft",
|
|
588
|
+
"ArrowRight",
|
|
589
|
+
"ArrowUp",
|
|
590
|
+
"ArrowDown"
|
|
591
|
+
].includes(e.key)) {
|
|
592
|
+
const i = this.findDrawerItem(e);
|
|
593
|
+
if (!i) return;
|
|
594
|
+
const n = this.getItems(), d = n.indexOf(i);
|
|
595
|
+
if (d === -1) return;
|
|
596
|
+
let p = d;
|
|
597
|
+
const c = this.columns || 3;
|
|
598
|
+
e.key === "ArrowLeft" ? p = d - 1 : e.key === "ArrowRight" ? p = d + 1 : e.key === "ArrowUp" ? p = d - c : e.key === "ArrowDown" && (p = d + c), p >= 0 && p < n.length && p !== d && (e.preventDefault(), e.stopPropagation(), this.reorderItem(d, p), i.focus?.());
|
|
599
|
+
}
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
static {
|
|
603
|
+
this.styles = [f.styles, I];
|
|
604
|
+
}
|
|
605
|
+
get trigger() {
|
|
606
|
+
return !this.noTrigger;
|
|
607
|
+
}
|
|
608
|
+
set trigger(t) {
|
|
609
|
+
this.noTrigger = !t, this.requestUpdate("noTrigger");
|
|
610
|
+
}
|
|
611
|
+
connectedCallback() {
|
|
612
|
+
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown), document.addEventListener("pointerdown", this.handleDocumentClick), this.addEventListener("dragstart", this.handleDragStart), this.addEventListener("dragover", this.handleDragOver), this.addEventListener("dragleave", this.handleDragLeave), this.addEventListener("drop", this.handleDrop), this.addEventListener("dragend", this.handleDragEnd), this.addEventListener("keydown", this.handleItemKeyDown), requestAnimationFrame(() => {
|
|
613
|
+
this.initialOrder.length === 0 && (this.initialOrder = this.getOrder()), this.applySavedOrder(), this.updateDraggableItems();
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
disconnectedCallback() {
|
|
617
|
+
super.disconnectedCallback(), window.removeEventListener("keydown", this.handleKeyDown), document.removeEventListener("pointerdown", this.handleDocumentClick), this.removeEventListener("dragstart", this.handleDragStart), this.removeEventListener("dragover", this.handleDragOver), this.removeEventListener("dragleave", this.handleDragLeave), this.removeEventListener("drop", this.handleDrop), this.removeEventListener("dragend", this.handleDragEnd), this.removeEventListener("keydown", this.handleItemKeyDown);
|
|
618
|
+
}
|
|
619
|
+
updated(t) {
|
|
620
|
+
super.updated(t), t.has("open") && (this.open ? this.emitEvent("open") : this.emitEvent("close")), t.has("columns") && (this.columns && this.columns !== 3 ? this.style.setProperty("--md-app-drawer-columns", String(this.columns)) : this.style.removeProperty("--md-app-drawer-columns")), (t.has("reorderable") || t.has("editable")) && this.updateDraggableItems(), t.has("editing") && (this.updateDraggableItems(), this.emitEvent("edit-toggle", { editing: this.editing })), (t.has("storageKey") || t.has("disableStorage")) && this.applySavedOrder();
|
|
621
|
+
}
|
|
622
|
+
getItemKey(t) {
|
|
623
|
+
const e = t.getAttribute("key") || t.getAttribute("app-id") || t.getAttribute("data-id");
|
|
624
|
+
if (e) return e;
|
|
625
|
+
if (t.id) return t.id;
|
|
626
|
+
const i = t.label || t.getAttribute("label") || t.headline || t.getAttribute("headline");
|
|
627
|
+
if (i) return i;
|
|
628
|
+
const n = t.href || t.getAttribute("href");
|
|
629
|
+
if (n) return n;
|
|
630
|
+
const d = t.icon || t.getAttribute("icon");
|
|
631
|
+
return d || t.textContent?.trim() || "";
|
|
632
|
+
}
|
|
633
|
+
getEffectiveStorageKey() {
|
|
634
|
+
return this.storageKey ? this.storageKey : this.id ? `md-app-drawer-order-${this.id}` : "md-app-drawer-order";
|
|
635
|
+
}
|
|
636
|
+
getItems() {
|
|
637
|
+
const t = this.shadowRoot?.querySelector(".grid slot:not([name])");
|
|
638
|
+
if (t) {
|
|
639
|
+
const e = t.assignedElements().filter((i) => i instanceof HTMLElement && (!i.hasAttribute("slot") || i.getAttribute("slot") === ""));
|
|
640
|
+
if (e.length > 0) return e;
|
|
641
|
+
}
|
|
642
|
+
return Array.from(this.children).filter((e) => e instanceof HTMLElement && (!e.hasAttribute("slot") || e.getAttribute("slot") === ""));
|
|
643
|
+
}
|
|
644
|
+
loadOrder() {
|
|
645
|
+
if (this.disableStorage) return null;
|
|
646
|
+
try {
|
|
647
|
+
const t = this.getEffectiveStorageKey(), e = localStorage.getItem(t);
|
|
648
|
+
if (!e) return null;
|
|
649
|
+
const i = JSON.parse(e);
|
|
650
|
+
return Array.isArray(i) ? i : null;
|
|
651
|
+
} catch {
|
|
652
|
+
return null;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
saveOrder(t) {
|
|
656
|
+
const e = t || this.getOrder();
|
|
657
|
+
if (!this.disableStorage) try {
|
|
658
|
+
const i = this.getEffectiveStorageKey();
|
|
659
|
+
localStorage.setItem(i, JSON.stringify(e));
|
|
660
|
+
} catch {
|
|
661
|
+
}
|
|
662
|
+
return e;
|
|
663
|
+
}
|
|
664
|
+
getOrder() {
|
|
665
|
+
return this.getItems().map((t) => this.getItemKey(t));
|
|
666
|
+
}
|
|
667
|
+
firstUpdated(t) {
|
|
668
|
+
super.firstUpdated(t), this.initialOrder.length === 0 && (this.initialOrder = this.getOrder()), this.applySavedOrder(), this.updateDraggableItems();
|
|
669
|
+
}
|
|
670
|
+
setOrder(t) {
|
|
671
|
+
if (!t || !t.length) return;
|
|
672
|
+
this.initialOrder.length === 0 && (this.initialOrder = this.getOrder());
|
|
673
|
+
const e = this.getItems();
|
|
674
|
+
if (e.length <= 1) return;
|
|
675
|
+
const i = /* @__PURE__ */ new Map(), n = [];
|
|
676
|
+
for (const c of e) {
|
|
677
|
+
const b = this.getItemKey(c);
|
|
678
|
+
b && !i.has(b) ? i.set(b, c) : n.push(c);
|
|
679
|
+
}
|
|
680
|
+
const d = [];
|
|
681
|
+
for (const c of t) {
|
|
682
|
+
const b = i.get(c);
|
|
683
|
+
b && (d.push(b), i.delete(c));
|
|
684
|
+
}
|
|
685
|
+
i.forEach((c) => d.push(c)), d.push(...n);
|
|
686
|
+
let p = !1;
|
|
687
|
+
for (let c = 0; c < e.length; c++) if (e[c] !== d[c]) {
|
|
688
|
+
p = !0;
|
|
689
|
+
break;
|
|
690
|
+
}
|
|
691
|
+
if (p) {
|
|
692
|
+
this.isReordering = !0;
|
|
693
|
+
for (const c of d) this.appendChild(c);
|
|
694
|
+
this.isReordering = !1;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
applySavedOrder() {
|
|
698
|
+
const t = this.loadOrder();
|
|
699
|
+
t && t.length > 0 && this.setOrder(t);
|
|
700
|
+
}
|
|
701
|
+
resetOrder() {
|
|
702
|
+
if (!this.disableStorage) try {
|
|
703
|
+
localStorage.removeItem(this.getEffectiveStorageKey());
|
|
704
|
+
} catch {
|
|
705
|
+
}
|
|
706
|
+
this.initialOrder.length > 0 && this.setOrder(this.initialOrder);
|
|
707
|
+
const t = this.getOrder();
|
|
708
|
+
this.emitEvent("reorder", {
|
|
709
|
+
order: t,
|
|
710
|
+
item: null,
|
|
711
|
+
oldIndex: -1,
|
|
712
|
+
newIndex: -1
|
|
713
|
+
}), this.emitEvent("reset", { order: t });
|
|
714
|
+
}
|
|
715
|
+
reorderItem(t, e) {
|
|
716
|
+
this.initialOrder.length === 0 && (this.initialOrder = this.getOrder());
|
|
717
|
+
const i = this.getItems();
|
|
718
|
+
if (t < 0 || t >= i.length || e < 0 || e >= i.length || t === e) return;
|
|
719
|
+
const n = i[t], d = i[e];
|
|
720
|
+
if (!n || !d) return;
|
|
721
|
+
this.isReordering = !0, t < e ? d.after(n) : d.before(n), this.isReordering = !1;
|
|
722
|
+
const p = this.getOrder();
|
|
723
|
+
this.saveOrder(p), this.emitEvent("reorder", {
|
|
724
|
+
order: p,
|
|
725
|
+
item: n,
|
|
726
|
+
oldIndex: t,
|
|
727
|
+
newIndex: e
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
isReorderActive() {
|
|
731
|
+
return this.reorderable && (!this.editable || this.editing);
|
|
732
|
+
}
|
|
733
|
+
toggleEdit() {
|
|
734
|
+
this.editing = !this.editing;
|
|
735
|
+
}
|
|
736
|
+
startEditing() {
|
|
737
|
+
this.editing = !0;
|
|
738
|
+
}
|
|
739
|
+
stopEditing() {
|
|
740
|
+
this.editing = !1;
|
|
741
|
+
}
|
|
742
|
+
updateDraggableItems() {
|
|
743
|
+
const t = this.isReorderActive(), e = this.getItems();
|
|
744
|
+
for (const i of e) {
|
|
745
|
+
const n = i.disabled || i.hasAttribute("disabled");
|
|
746
|
+
t && !n ? i.setAttribute("draggable", "true") : i.removeAttribute("draggable");
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
findDrawerItem(t) {
|
|
750
|
+
const e = t.composedPath(), i = this.getItems();
|
|
751
|
+
for (const n of e) if (n instanceof HTMLElement && i.includes(n)) return n;
|
|
752
|
+
return null;
|
|
753
|
+
}
|
|
754
|
+
cleanupDrag() {
|
|
755
|
+
this.draggedItem && (this.draggedItem.classList.remove("is-dragging"), this.draggedItem.removeAttribute("dragging"), typeof this.draggedItem.internalSetDragging == "function" && this.draggedItem.internalSetDragging(!1), this.draggedItem = null), this.dropTargetItem && (this.dropTargetItem.classList.remove("drag-over", "drop-target"), this.dropTargetItem.removeAttribute("drag-over"), "dragOver" in this.dropTargetItem && (this.dropTargetItem.dragOver = !1), this.dropTargetItem = null);
|
|
756
|
+
const t = this.getItems();
|
|
757
|
+
for (const e of t)
|
|
758
|
+
e.classList.remove("is-dragging", "drag-over", "drop-target"), e.removeAttribute("dragging"), e.removeAttribute("drag-over"), typeof e.internalSetDragging == "function" && e.internalSetDragging(!1), "dragOver" in e && (e.dragOver = !1);
|
|
759
|
+
}
|
|
760
|
+
show() {
|
|
761
|
+
this.open || (this.open = !0);
|
|
762
|
+
}
|
|
763
|
+
close() {
|
|
764
|
+
this.open && (this.open = !1, this.editing && (this.editing = !1));
|
|
765
|
+
}
|
|
766
|
+
toggle() {
|
|
767
|
+
this.open = !this.open;
|
|
768
|
+
}
|
|
769
|
+
render() {
|
|
770
|
+
const t = this.headline ? o`<span class="headline">${this.headline}</span>` : h, e = o`
|
|
771
|
+
<slot name="back-button">
|
|
772
|
+
<md-icon-button
|
|
773
|
+
class="back-btn"
|
|
774
|
+
variant="standard"
|
|
775
|
+
icon="arrow_back"
|
|
776
|
+
aria-label="Close"
|
|
777
|
+
title="Close"
|
|
778
|
+
@click=${this.handleBackClick}
|
|
779
|
+
></md-icon-button>
|
|
780
|
+
</slot>
|
|
781
|
+
`, i = this.reorderable && this.editable ? o`
|
|
782
|
+
<div class="header-actions">
|
|
783
|
+
${this.editing ? o`
|
|
784
|
+
<slot name="reset-button">
|
|
785
|
+
<md-icon-button
|
|
786
|
+
class="reset-btn"
|
|
787
|
+
variant="standard"
|
|
788
|
+
icon="arrow_back"
|
|
789
|
+
aria-label="Reset to default order"
|
|
790
|
+
title="Reset to default order"
|
|
791
|
+
@click=${this.handleResetClick}
|
|
792
|
+
></md-icon-button>
|
|
793
|
+
</slot>
|
|
794
|
+
` : h}
|
|
795
|
+
<slot name="edit-button">
|
|
796
|
+
<md-icon-button
|
|
797
|
+
class="edit-btn"
|
|
798
|
+
variant=${this.editing ? "filled" : "standard"}
|
|
799
|
+
icon=${this.editing ? "check" : "edit"}
|
|
800
|
+
aria-label=${this.editing ? "Done editing" : "Edit apps order"}
|
|
801
|
+
title=${this.editing ? "Done editing" : "Edit apps order"}
|
|
802
|
+
@click=${this.handleEditToggle}
|
|
803
|
+
></md-icon-button>
|
|
804
|
+
</slot>
|
|
805
|
+
</div>
|
|
806
|
+
` : h, n = this.noTrigger ? o`<slot name="trigger" @click=${this.handleTriggerClick}></slot>` : o`
|
|
807
|
+
<div class="trigger-container" @click=${this.handleTriggerClick}>
|
|
808
|
+
<slot name="trigger">
|
|
809
|
+
<md-icon-button
|
|
810
|
+
icon=${this.icon}
|
|
811
|
+
aria-label=${this.ariaLabelText}
|
|
812
|
+
aria-expanded=${this.open ? "true" : "false"}
|
|
813
|
+
aria-haspopup="dialog"
|
|
814
|
+
></md-icon-button>
|
|
815
|
+
</slot>
|
|
816
|
+
</div>
|
|
817
|
+
`;
|
|
818
|
+
return o`
|
|
819
|
+
<div class="backdrop" @click=${this.handleBackdropClick}></div>
|
|
820
|
+
|
|
821
|
+
<div class="trigger-wrapper">
|
|
822
|
+
${n}
|
|
823
|
+
</div>
|
|
824
|
+
|
|
825
|
+
<div
|
|
826
|
+
class="popover"
|
|
827
|
+
role="dialog"
|
|
828
|
+
aria-modal=${this.modal ? "true" : "false"}
|
|
829
|
+
aria-label=${this.headline || this.ariaLabelText}
|
|
830
|
+
aria-hidden=${this.open ? "false" : "true"}
|
|
831
|
+
>
|
|
832
|
+
<div class="header">
|
|
833
|
+
<div class="header-leading">
|
|
834
|
+
${e}
|
|
835
|
+
<slot name="header">
|
|
836
|
+
${t}
|
|
837
|
+
</slot>
|
|
838
|
+
</div>
|
|
839
|
+
${i}
|
|
840
|
+
</div>
|
|
841
|
+
|
|
842
|
+
<div class="grid" role="group" aria-label="Apps">
|
|
843
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
844
|
+
</div>
|
|
845
|
+
|
|
846
|
+
<div class="footer">
|
|
847
|
+
<slot name="footer"></slot>
|
|
848
|
+
</div>
|
|
849
|
+
</div>
|
|
850
|
+
`;
|
|
851
|
+
}
|
|
852
|
+
};
|
|
853
|
+
a([r({
|
|
854
|
+
type: Boolean,
|
|
855
|
+
reflect: !0
|
|
856
|
+
})], l.prototype, "open", void 0);
|
|
857
|
+
a([r({ type: String })], l.prototype, "headline", void 0);
|
|
858
|
+
a([r({ type: String })], l.prototype, "icon", void 0);
|
|
859
|
+
a([r({
|
|
860
|
+
type: String,
|
|
861
|
+
attribute: "aria-label"
|
|
862
|
+
})], l.prototype, "ariaLabelText", void 0);
|
|
863
|
+
a([r({
|
|
864
|
+
type: Boolean,
|
|
865
|
+
attribute: "no-trigger"
|
|
866
|
+
})], l.prototype, "noTrigger", void 0);
|
|
867
|
+
a([r({
|
|
868
|
+
type: String,
|
|
869
|
+
reflect: !0
|
|
870
|
+
})], l.prototype, "alignment", void 0);
|
|
871
|
+
a([r({
|
|
872
|
+
type: String,
|
|
873
|
+
reflect: !0
|
|
874
|
+
})], l.prototype, "pivot", void 0);
|
|
875
|
+
a([r({
|
|
876
|
+
type: Boolean,
|
|
877
|
+
reflect: !0
|
|
878
|
+
})], l.prototype, "modal", void 0);
|
|
879
|
+
a([r({
|
|
880
|
+
type: Boolean,
|
|
881
|
+
reflect: !0
|
|
882
|
+
})], l.prototype, "fullscreen", void 0);
|
|
883
|
+
a([r({ type: Number })], l.prototype, "columns", void 0);
|
|
884
|
+
a([r({
|
|
885
|
+
type: Boolean,
|
|
886
|
+
reflect: !0
|
|
887
|
+
})], l.prototype, "reorderable", void 0);
|
|
888
|
+
a([r({
|
|
889
|
+
type: Boolean,
|
|
890
|
+
reflect: !0
|
|
891
|
+
})], l.prototype, "editable", void 0);
|
|
892
|
+
a([r({
|
|
893
|
+
type: Boolean,
|
|
894
|
+
reflect: !0
|
|
895
|
+
})], l.prototype, "editing", void 0);
|
|
896
|
+
a([r({
|
|
897
|
+
type: String,
|
|
898
|
+
attribute: "storage-key"
|
|
899
|
+
})], l.prototype, "storageKey", void 0);
|
|
900
|
+
a([r({
|
|
901
|
+
type: Boolean,
|
|
902
|
+
attribute: "disable-storage"
|
|
903
|
+
})], l.prototype, "disableStorage", void 0);
|
|
904
|
+
l = a([v("md-app-drawer")], l);
|
|
905
|
+
var x = class extends l {
|
|
906
|
+
};
|
|
907
|
+
x = a([v("md-app-launcher")], x);
|
|
908
|
+
var w = class extends l {
|
|
909
|
+
};
|
|
910
|
+
w = a([v("md-apps-menu")], w);
|
|
911
|
+
var k = class extends g {
|
|
912
|
+
};
|
|
913
|
+
k = a([v("md-app-item")], k);
|
|
914
|
+
var T = class extends g {
|
|
915
|
+
};
|
|
916
|
+
T = a([v("md-app-launcher-item")], T);
|
|
917
|
+
var E = y`
|
|
918
|
+
:host {
|
|
919
|
+
display: inline-block;
|
|
920
|
+
position: relative;
|
|
921
|
+
font-family: var(--md-sys-typescale-font-family, inherit);
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
:host([hidden]) {
|
|
925
|
+
display: none;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
.trigger-container {
|
|
929
|
+
display: inline-flex;
|
|
930
|
+
align-items: center;
|
|
931
|
+
justify-content: center;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
.avatar-btn {
|
|
935
|
+
position: relative;
|
|
936
|
+
display: inline-flex;
|
|
937
|
+
align-items: center;
|
|
938
|
+
justify-content: center;
|
|
939
|
+
width: var(--md-account-trigger-size, 40px);
|
|
940
|
+
height: var(--md-account-trigger-size, 40px);
|
|
941
|
+
border-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
942
|
+
background-color: var(--md-sys-color-primary-container, #EADDFF);
|
|
943
|
+
color: var(--md-sys-color-on-primary-container, #21005D);
|
|
944
|
+
border: 2px solid transparent;
|
|
945
|
+
padding: 0;
|
|
946
|
+
cursor: pointer;
|
|
947
|
+
outline: none;
|
|
948
|
+
font-family: inherit;
|
|
949
|
+
font-size: 16px;
|
|
950
|
+
font-weight: 600;
|
|
951
|
+
user-select: none;
|
|
952
|
+
transition: box-shadow 150ms ease, transform 150ms ease, border-color 150ms ease;
|
|
953
|
+
-webkit-tap-highlight-color: transparent;
|
|
954
|
+
overflow: visible;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
.avatar-btn:hover {
|
|
958
|
+
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
959
|
+
border-color: var(--md-sys-color-outline-variant, #CAC4D0);
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.avatar-btn:focus-visible {
|
|
963
|
+
border-color: var(--md-sys-color-primary, #6750A4);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
.avatar-img {
|
|
967
|
+
width: 100%;
|
|
968
|
+
height: 100%;
|
|
969
|
+
border-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
970
|
+
object-fit: cover;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
.avatar-initials {
|
|
974
|
+
display: flex;
|
|
975
|
+
align-items: center;
|
|
976
|
+
justify-content: center;
|
|
977
|
+
width: 100%;
|
|
978
|
+
height: 100%;
|
|
979
|
+
text-transform: uppercase;
|
|
980
|
+
letter-spacing: 0.5px;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
.backdrop {
|
|
984
|
+
display: none;
|
|
985
|
+
position: fixed;
|
|
986
|
+
inset: 0;
|
|
987
|
+
z-index: 990;
|
|
988
|
+
background-color: transparent;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
:host([modal]) .backdrop {
|
|
992
|
+
background-color: rgba(0, 0, 0, 0.32);
|
|
993
|
+
backdrop-filter: blur(1px);
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
:host([open][modal]) .backdrop {
|
|
997
|
+
display: block;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
.popover {
|
|
1001
|
+
display: none;
|
|
1002
|
+
position: absolute;
|
|
1003
|
+
top: calc(100% + 8px);
|
|
1004
|
+
right: 0;
|
|
1005
|
+
z-index: 1000;
|
|
1006
|
+
width: var(--md-account-menu-width, 380px);
|
|
1007
|
+
max-width: calc(100vw - 24px);
|
|
1008
|
+
height: fit-content;
|
|
1009
|
+
max-height: var(--md-account-menu-max-height, none);
|
|
1010
|
+
box-sizing: border-box;
|
|
1011
|
+
padding: 0;
|
|
1012
|
+
border-radius: var(--md-sys-shape-corner-extra-large, 28px);
|
|
1013
|
+
background-color: var(--md-sys-color-surface-container-high, #ECE6F0);
|
|
1014
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
1015
|
+
box-shadow: var(--md-sys-elevation-level3, 0px 4px 8px 3px rgba(0, 0, 0, 0.15), 0px 1px 3px rgba(0, 0, 0, 0.3));
|
|
1016
|
+
overflow-y: auto;
|
|
1017
|
+
overflow-x: hidden;
|
|
1018
|
+
overscroll-behavior: contain;
|
|
1019
|
+
scrollbar-width: thin;
|
|
1020
|
+
scrollbar-color: var(--md-sys-color-outline-variant, #CAC4D0) transparent;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
:host([alignment='start']) .popover,
|
|
1024
|
+
:host([pivot='left']) .popover {
|
|
1025
|
+
right: auto;
|
|
1026
|
+
left: 0;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
:host([open]) .popover {
|
|
1030
|
+
display: flex;
|
|
1031
|
+
flex-direction: column;
|
|
1032
|
+
animation: md-account-menu-in 150ms cubic-bezier(0.2, 0, 0, 1) forwards;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
@keyframes md-account-menu-in {
|
|
1036
|
+
from {
|
|
1037
|
+
opacity: 0;
|
|
1038
|
+
transform: scale(0.92) translateY(-8px);
|
|
1039
|
+
}
|
|
1040
|
+
to {
|
|
1041
|
+
opacity: 1;
|
|
1042
|
+
transform: scale(1) translateY(0);
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
/* Header Section */
|
|
1047
|
+
.popover-header {
|
|
1048
|
+
display: flex;
|
|
1049
|
+
align-items: center;
|
|
1050
|
+
justify-content: flex-end;
|
|
1051
|
+
padding: 12px 16px 4px;
|
|
1052
|
+
box-sizing: border-box;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
.header-leading {
|
|
1056
|
+
display: flex;
|
|
1057
|
+
align-items: center;
|
|
1058
|
+
gap: 8px;
|
|
1059
|
+
min-width: 0;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
.back-btn,
|
|
1063
|
+
slot[name="back-button"] {
|
|
1064
|
+
display: none;
|
|
1065
|
+
--md-icon-size: 24px;
|
|
1066
|
+
font-size: 24px;
|
|
1067
|
+
flex-shrink: 0;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
.popover-header .headline {
|
|
1071
|
+
display: none;
|
|
1072
|
+
margin: 0;
|
|
1073
|
+
font-size: var(--md-sys-typescale-title-large-size, 20px);
|
|
1074
|
+
font-weight: 500;
|
|
1075
|
+
line-height: 28px;
|
|
1076
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
1077
|
+
white-space: nowrap;
|
|
1078
|
+
overflow: hidden;
|
|
1079
|
+
text-overflow: ellipsis;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
.close-btn {
|
|
1083
|
+
display: inline-flex;
|
|
1084
|
+
align-items: center;
|
|
1085
|
+
justify-content: center;
|
|
1086
|
+
width: 32px;
|
|
1087
|
+
height: 32px;
|
|
1088
|
+
border-radius: 50%;
|
|
1089
|
+
background: transparent;
|
|
1090
|
+
border: none;
|
|
1091
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
1092
|
+
cursor: pointer;
|
|
1093
|
+
padding: 0;
|
|
1094
|
+
transition: background-color 150ms ease;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
.close-btn:hover {
|
|
1098
|
+
background-color: var(--md-sys-color-surface-container-highest, rgba(0, 0, 0, 0.08));
|
|
1099
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
/* Profile Card (Account Centerpiece) */
|
|
1103
|
+
.profile-card {
|
|
1104
|
+
display: flex;
|
|
1105
|
+
flex-direction: column;
|
|
1106
|
+
align-items: center;
|
|
1107
|
+
text-align: center;
|
|
1108
|
+
padding: 8px 24px 20px;
|
|
1109
|
+
background-color: var(--md-sys-color-surface-container-lowest, #FFFFFF);
|
|
1110
|
+
margin: 8px 16px 12px;
|
|
1111
|
+
border-radius: var(--md-sys-shape-corner-large, 24px);
|
|
1112
|
+
border: 1px solid var(--md-sys-color-outline-variant, #CAC4D0);
|
|
1113
|
+
box-sizing: border-box;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.profile-avatar-wrapper {
|
|
1117
|
+
position: relative;
|
|
1118
|
+
margin: 12px 0 14px;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
.profile-avatar {
|
|
1122
|
+
width: 76px;
|
|
1123
|
+
height: 76px;
|
|
1124
|
+
border-radius: 50%;
|
|
1125
|
+
background-color: var(--md-sys-color-primary, #6750A4);
|
|
1126
|
+
color: var(--md-sys-color-on-primary, #FFFFFF);
|
|
1127
|
+
display: flex;
|
|
1128
|
+
align-items: center;
|
|
1129
|
+
justify-content: center;
|
|
1130
|
+
font-size: 30px;
|
|
1131
|
+
font-weight: 600;
|
|
1132
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
|
|
1133
|
+
overflow: hidden;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
.profile-avatar img {
|
|
1137
|
+
width: 100%;
|
|
1138
|
+
height: 100%;
|
|
1139
|
+
object-fit: cover;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
.avatar-edit-badge {
|
|
1143
|
+
position: absolute;
|
|
1144
|
+
bottom: -2px;
|
|
1145
|
+
right: -2px;
|
|
1146
|
+
width: 26px;
|
|
1147
|
+
height: 26px;
|
|
1148
|
+
border-radius: 50%;
|
|
1149
|
+
background-color: var(--md-sys-color-surface-container-highest, #E6E0E9);
|
|
1150
|
+
border: 2px solid var(--md-sys-color-surface-container-lowest, #FFFFFF);
|
|
1151
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
1152
|
+
display: flex;
|
|
1153
|
+
align-items: center;
|
|
1154
|
+
justify-content: center;
|
|
1155
|
+
cursor: pointer;
|
|
1156
|
+
padding: 0;
|
|
1157
|
+
transition: background-color 150ms ease;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
.avatar-edit-badge:hover {
|
|
1161
|
+
background-color: var(--md-sys-color-primary-container, #EADDFF);
|
|
1162
|
+
color: var(--md-sys-color-on-primary-container, #21005D);
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
.avatar-edit-badge md-icon {
|
|
1166
|
+
--md-icon-size: 16px;
|
|
1167
|
+
font-size: 16px;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
.profile-name {
|
|
1171
|
+
font-size: 18px;
|
|
1172
|
+
font-weight: 600;
|
|
1173
|
+
line-height: 24px;
|
|
1174
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
1175
|
+
margin: 0 0 4px;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
.profile-email {
|
|
1179
|
+
font-size: 13px;
|
|
1180
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
1181
|
+
margin: 0 0 16px;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
.manage-btn {
|
|
1185
|
+
position: relative;
|
|
1186
|
+
display: inline-flex;
|
|
1187
|
+
align-items: center;
|
|
1188
|
+
justify-content: center;
|
|
1189
|
+
gap: 8px;
|
|
1190
|
+
padding: 8px 18px;
|
|
1191
|
+
border-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
1192
|
+
border: 1px solid var(--md-sys-color-outline, #79747E);
|
|
1193
|
+
background: transparent;
|
|
1194
|
+
color: var(--md-sys-color-primary, #6750A4);
|
|
1195
|
+
font-family: inherit;
|
|
1196
|
+
font-size: 13px;
|
|
1197
|
+
font-weight: 500;
|
|
1198
|
+
cursor: pointer;
|
|
1199
|
+
text-decoration: none;
|
|
1200
|
+
transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
|
|
1201
|
+
overflow: hidden;
|
|
1202
|
+
-webkit-tap-highlight-color: transparent;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
.manage-btn:hover {
|
|
1206
|
+
background-color: var(--md-sys-color-primary-container, rgba(103, 80, 164, 0.08));
|
|
1207
|
+
border-color: var(--md-sys-color-primary, #6750A4);
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
/* Internal Tabs for Account Info */
|
|
1211
|
+
.account-tabs {
|
|
1212
|
+
display: flex;
|
|
1213
|
+
border-bottom: 1px solid var(--md-sys-color-outline-variant, #CAC4D0);
|
|
1214
|
+
padding: 0 16px;
|
|
1215
|
+
margin-bottom: 8px;
|
|
1216
|
+
gap: 4px;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
.tab-btn {
|
|
1220
|
+
flex: 1;
|
|
1221
|
+
display: flex;
|
|
1222
|
+
align-items: center;
|
|
1223
|
+
justify-content: center;
|
|
1224
|
+
gap: 6px;
|
|
1225
|
+
padding: 10px 8px;
|
|
1226
|
+
background: transparent;
|
|
1227
|
+
border: none;
|
|
1228
|
+
border-bottom: 2px solid transparent;
|
|
1229
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
1230
|
+
font-family: inherit;
|
|
1231
|
+
font-size: 12px;
|
|
1232
|
+
font-weight: 500;
|
|
1233
|
+
cursor: pointer;
|
|
1234
|
+
transition: color 150ms ease, border-color 150ms ease;
|
|
1235
|
+
outline: none;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
.tab-btn:hover {
|
|
1239
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
.tab-btn.active {
|
|
1243
|
+
color: var(--md-sys-color-primary, #6750A4);
|
|
1244
|
+
border-bottom-color: var(--md-sys-color-primary, #6750A4);
|
|
1245
|
+
font-weight: 600;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
.tab-btn md-icon {
|
|
1249
|
+
--md-icon-size: 16px;
|
|
1250
|
+
font-size: 16px;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
.tab-panel {
|
|
1254
|
+
display: none;
|
|
1255
|
+
padding: 8px 16px 14px;
|
|
1256
|
+
box-sizing: border-box;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
.tab-panel.active {
|
|
1260
|
+
display: block;
|
|
1261
|
+
animation: tabFadeIn 150ms ease forwards;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
@keyframes tabFadeIn {
|
|
1265
|
+
from { opacity: 0; transform: translateY(4px); }
|
|
1266
|
+
to { opacity: 1; transform: translateY(0); }
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
/* Info & Detail Rows */
|
|
1270
|
+
.info-card {
|
|
1271
|
+
background-color: var(--md-sys-color-surface-container-lowest, #FFFFFF);
|
|
1272
|
+
border: 1px solid var(--md-sys-color-outline-variant, #CAC4D0);
|
|
1273
|
+
border-radius: var(--md-sys-shape-corner-medium, 16px);
|
|
1274
|
+
padding: 12px 16px;
|
|
1275
|
+
margin-bottom: 8px;
|
|
1276
|
+
box-sizing: border-box;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
.info-row {
|
|
1280
|
+
display: flex;
|
|
1281
|
+
align-items: center;
|
|
1282
|
+
justify-content: space-between;
|
|
1283
|
+
padding: 8px 0;
|
|
1284
|
+
border-bottom: 1px solid var(--md-sys-color-surface-container-high, #ECE6F0);
|
|
1285
|
+
font-size: 13px;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
.info-row:last-child {
|
|
1289
|
+
border-bottom: none;
|
|
1290
|
+
padding-bottom: 0;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
.info-row:first-child {
|
|
1294
|
+
padding-top: 0;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
.info-label {
|
|
1298
|
+
display: flex;
|
|
1299
|
+
align-items: center;
|
|
1300
|
+
gap: 8px;
|
|
1301
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
.info-label md-icon {
|
|
1305
|
+
--md-icon-size: 18px;
|
|
1306
|
+
font-size: 18px;
|
|
1307
|
+
color: var(--md-sys-color-primary, #6750A4);
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
.info-value {
|
|
1311
|
+
font-weight: 500;
|
|
1312
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
1313
|
+
text-align: right;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
.badge-chip {
|
|
1317
|
+
display: inline-flex;
|
|
1318
|
+
align-items: center;
|
|
1319
|
+
gap: 4px;
|
|
1320
|
+
padding: 2px 8px;
|
|
1321
|
+
border-radius: 100px;
|
|
1322
|
+
font-size: 11px;
|
|
1323
|
+
font-weight: 600;
|
|
1324
|
+
background-color: var(--md-sys-color-secondary-container, #E8DEF8);
|
|
1325
|
+
color: var(--md-sys-color-on-secondary-container, #1D192B);
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
.badge-chip.success {
|
|
1329
|
+
background-color: #E8F5E9;
|
|
1330
|
+
color: #2E7D32;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
/* Storage Section */
|
|
1334
|
+
.storage-box {
|
|
1335
|
+
background-color: var(--md-sys-color-surface-container-lowest, #FFFFFF);
|
|
1336
|
+
border: 1px solid var(--md-sys-color-outline-variant, #CAC4D0);
|
|
1337
|
+
border-radius: var(--md-sys-shape-corner-medium, 16px);
|
|
1338
|
+
padding: 16px;
|
|
1339
|
+
box-sizing: border-box;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
.storage-header {
|
|
1343
|
+
display: flex;
|
|
1344
|
+
align-items: center;
|
|
1345
|
+
justify-content: space-between;
|
|
1346
|
+
margin-bottom: 10px;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
.storage-title {
|
|
1350
|
+
font-size: 14px;
|
|
1351
|
+
font-weight: 600;
|
|
1352
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
1353
|
+
display: flex;
|
|
1354
|
+
align-items: center;
|
|
1355
|
+
gap: 8px;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
.storage-title md-icon {
|
|
1359
|
+
--md-icon-size: 20px;
|
|
1360
|
+
font-size: 20px;
|
|
1361
|
+
color: var(--md-sys-color-primary, #6750A4);
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
.storage-meta {
|
|
1365
|
+
font-size: 13px;
|
|
1366
|
+
font-weight: 500;
|
|
1367
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
.storage-bar-track {
|
|
1371
|
+
width: 100%;
|
|
1372
|
+
height: 8px;
|
|
1373
|
+
border-radius: 4px;
|
|
1374
|
+
background-color: var(--md-sys-color-surface-container-highest, #E6E0E9);
|
|
1375
|
+
overflow: hidden;
|
|
1376
|
+
margin-bottom: 12px;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
.storage-bar-fill {
|
|
1380
|
+
height: 100%;
|
|
1381
|
+
border-radius: 4px;
|
|
1382
|
+
background: linear-gradient(90deg, var(--md-sys-color-primary, #6750A4), var(--md-sys-color-tertiary, #7D5260));
|
|
1383
|
+
transition: width 300ms ease;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
.storage-breakdown {
|
|
1387
|
+
display: grid;
|
|
1388
|
+
grid-template-columns: repeat(2, 1fr);
|
|
1389
|
+
gap: 8px;
|
|
1390
|
+
font-size: 12px;
|
|
1391
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
.storage-item {
|
|
1395
|
+
display: flex;
|
|
1396
|
+
align-items: center;
|
|
1397
|
+
gap: 6px;
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
.storage-dot {
|
|
1401
|
+
width: 8px;
|
|
1402
|
+
height: 8px;
|
|
1403
|
+
border-radius: 50%;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
/* Multi-account switcher list */
|
|
1407
|
+
.accounts-list {
|
|
1408
|
+
display: flex;
|
|
1409
|
+
flex-direction: column;
|
|
1410
|
+
gap: 4px;
|
|
1411
|
+
box-sizing: border-box;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
/* Footer */
|
|
1415
|
+
.popover-footer {
|
|
1416
|
+
display: flex;
|
|
1417
|
+
flex-direction: column;
|
|
1418
|
+
align-items: center;
|
|
1419
|
+
gap: 12px;
|
|
1420
|
+
padding: 12px 16px 16px;
|
|
1421
|
+
border-top: 1px solid var(--md-sys-color-outline-variant, #CAC4D0);
|
|
1422
|
+
box-sizing: border-box;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
.signout-btn {
|
|
1426
|
+
position: relative;
|
|
1427
|
+
display: inline-flex;
|
|
1428
|
+
align-items: center;
|
|
1429
|
+
justify-content: center;
|
|
1430
|
+
gap: 8px;
|
|
1431
|
+
width: 100%;
|
|
1432
|
+
padding: 10px 16px;
|
|
1433
|
+
border-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
1434
|
+
background-color: var(--md-sys-color-surface-container-highest, #E6E0E9);
|
|
1435
|
+
border: 1px solid var(--md-sys-color-outline-variant, #CAC4D0);
|
|
1436
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
1437
|
+
font-family: inherit;
|
|
1438
|
+
font-size: 13px;
|
|
1439
|
+
font-weight: 500;
|
|
1440
|
+
cursor: pointer;
|
|
1441
|
+
transition: background-color 150ms ease, color 150ms ease;
|
|
1442
|
+
overflow: hidden;
|
|
1443
|
+
-webkit-tap-highlight-color: transparent;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
.signout-btn:hover {
|
|
1447
|
+
background-color: var(--md-sys-color-error-container, #F9DEDC);
|
|
1448
|
+
color: var(--md-sys-color-on-error-container, #410E0B);
|
|
1449
|
+
border-color: var(--md-sys-color-error, #B3261E);
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
.signout-btn md-icon {
|
|
1453
|
+
--md-icon-size: 18px;
|
|
1454
|
+
font-size: 18px;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
.footer-links {
|
|
1458
|
+
display: flex;
|
|
1459
|
+
align-items: center;
|
|
1460
|
+
justify-content: center;
|
|
1461
|
+
gap: 12px;
|
|
1462
|
+
font-size: 11px;
|
|
1463
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
.footer-links a {
|
|
1467
|
+
color: inherit;
|
|
1468
|
+
text-decoration: none;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
.footer-links a:hover {
|
|
1472
|
+
text-decoration: underline;
|
|
1473
|
+
color: var(--md-sys-color-primary, #6750A4);
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
.footer-dot {
|
|
1477
|
+
opacity: 0.5;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
/* Responsive Fullscreen / Mobile Mode */
|
|
1481
|
+
@media (max-width: 768px) {
|
|
1482
|
+
.back-btn,
|
|
1483
|
+
slot[name="back-button"] {
|
|
1484
|
+
display: inline-flex;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
.popover-header .headline {
|
|
1488
|
+
display: block;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
.popover-header {
|
|
1492
|
+
justify-content: space-between;
|
|
1493
|
+
min-height: 48px;
|
|
1494
|
+
padding: 12px 16px 8px;
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
:host([open]) .popover {
|
|
1498
|
+
position: fixed;
|
|
1499
|
+
top: 0;
|
|
1500
|
+
left: 0;
|
|
1501
|
+
right: 0;
|
|
1502
|
+
bottom: 0;
|
|
1503
|
+
width: 100vw;
|
|
1504
|
+
max-width: 100vw;
|
|
1505
|
+
height: 100vh;
|
|
1506
|
+
height: 100dvh;
|
|
1507
|
+
max-height: 100vh;
|
|
1508
|
+
max-height: 100dvh;
|
|
1509
|
+
border-radius: 0;
|
|
1510
|
+
box-shadow: none;
|
|
1511
|
+
z-index: 10000;
|
|
1512
|
+
padding: 0 0 env(safe-area-inset-bottom, 16px) 0;
|
|
1513
|
+
margin: 0;
|
|
1514
|
+
animation: md-account-menu-mobile-in 200ms cubic-bezier(0.2, 0, 0, 1) forwards;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
.profile-card {
|
|
1518
|
+
margin: 4px 16px 12px;
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
@keyframes md-account-menu-mobile-in {
|
|
1523
|
+
from {
|
|
1524
|
+
opacity: 0;
|
|
1525
|
+
transform: translateY(12px);
|
|
1526
|
+
}
|
|
1527
|
+
to {
|
|
1528
|
+
opacity: 1;
|
|
1529
|
+
transform: translateY(0);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
/* Explicit Fullscreen Mode */
|
|
1534
|
+
:host([fullscreen]) .back-btn,
|
|
1535
|
+
:host([fullscreen]) slot[name="back-button"] {
|
|
1536
|
+
display: inline-flex;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
:host([fullscreen]) .popover-header .headline {
|
|
1540
|
+
display: block;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
:host([fullscreen]) .popover-header {
|
|
1544
|
+
justify-content: space-between;
|
|
1545
|
+
min-height: 48px;
|
|
1546
|
+
padding: 12px 16px 8px;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
:host([fullscreen][open]) .popover {
|
|
1550
|
+
position: fixed;
|
|
1551
|
+
top: 0;
|
|
1552
|
+
left: 0;
|
|
1553
|
+
right: 0;
|
|
1554
|
+
bottom: 0;
|
|
1555
|
+
width: 100vw;
|
|
1556
|
+
max-width: 100vw;
|
|
1557
|
+
height: 100vh;
|
|
1558
|
+
height: 100dvh;
|
|
1559
|
+
max-height: 100vh;
|
|
1560
|
+
max-height: 100dvh;
|
|
1561
|
+
border-radius: 0;
|
|
1562
|
+
box-shadow: none;
|
|
1563
|
+
z-index: 10000;
|
|
1564
|
+
padding: 0 0 env(safe-area-inset-bottom, 16px) 0;
|
|
1565
|
+
margin: 0;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
:host([fullscreen]) .profile-card {
|
|
1569
|
+
margin: 4px 16px 12px;
|
|
1570
|
+
}
|
|
1571
|
+
`, M = y`
|
|
1572
|
+
:host {
|
|
1573
|
+
display: block;
|
|
1574
|
+
box-sizing: border-box;
|
|
1575
|
+
font-family: var(--md-sys-typescale-font-family, inherit);
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
:host([hidden]) {
|
|
1579
|
+
display: none;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
.item {
|
|
1583
|
+
position: relative;
|
|
1584
|
+
display: flex;
|
|
1585
|
+
align-items: center;
|
|
1586
|
+
gap: 12px;
|
|
1587
|
+
width: 100%;
|
|
1588
|
+
padding: 10px 12px;
|
|
1589
|
+
border-radius: var(--md-sys-shape-corner-medium, 14px);
|
|
1590
|
+
background: transparent;
|
|
1591
|
+
border: none;
|
|
1592
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
1593
|
+
text-align: left;
|
|
1594
|
+
cursor: pointer;
|
|
1595
|
+
font-family: inherit;
|
|
1596
|
+
text-decoration: none;
|
|
1597
|
+
transition: background-color 150ms ease;
|
|
1598
|
+
box-sizing: border-box;
|
|
1599
|
+
outline: none;
|
|
1600
|
+
-webkit-tap-highlight-color: transparent;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
.item:hover {
|
|
1604
|
+
background-color: var(--md-sys-color-surface-container-highest, rgba(0, 0, 0, 0.06));
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
:host([active]) .item {
|
|
1608
|
+
background-color: var(--md-sys-color-secondary-container, #E8DEF8);
|
|
1609
|
+
color: var(--md-sys-color-on-secondary-container, #1D192B);
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
:host([disabled]) .item {
|
|
1613
|
+
opacity: 0.38;
|
|
1614
|
+
cursor: not-allowed;
|
|
1615
|
+
pointer-events: none;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
.item-avatar {
|
|
1619
|
+
width: 36px;
|
|
1620
|
+
height: 36px;
|
|
1621
|
+
border-radius: 50%;
|
|
1622
|
+
background-color: var(--md-sys-color-primary-container, #EADDFF);
|
|
1623
|
+
color: var(--md-sys-color-on-primary-container, #21005D);
|
|
1624
|
+
display: flex;
|
|
1625
|
+
align-items: center;
|
|
1626
|
+
justify-content: center;
|
|
1627
|
+
font-size: 14px;
|
|
1628
|
+
font-weight: 600;
|
|
1629
|
+
flex-shrink: 0;
|
|
1630
|
+
overflow: hidden;
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
.item-avatar img {
|
|
1634
|
+
width: 100%;
|
|
1635
|
+
height: 100%;
|
|
1636
|
+
object-fit: cover;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
.item-content {
|
|
1640
|
+
flex: 1;
|
|
1641
|
+
min-width: 0;
|
|
1642
|
+
display: flex;
|
|
1643
|
+
flex-direction: column;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
.item-name {
|
|
1647
|
+
font-size: 13.5px;
|
|
1648
|
+
font-weight: 500;
|
|
1649
|
+
color: var(--md-sys-color-on-surface, #1D1B20);
|
|
1650
|
+
white-space: nowrap;
|
|
1651
|
+
overflow: hidden;
|
|
1652
|
+
text-overflow: ellipsis;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
.item-email {
|
|
1656
|
+
font-size: 12px;
|
|
1657
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
1658
|
+
white-space: nowrap;
|
|
1659
|
+
overflow: hidden;
|
|
1660
|
+
text-overflow: ellipsis;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
.item-trailing {
|
|
1664
|
+
display: flex;
|
|
1665
|
+
align-items: center;
|
|
1666
|
+
gap: 6px;
|
|
1667
|
+
flex-shrink: 0;
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
.check-icon {
|
|
1671
|
+
color: var(--md-sys-color-primary, #6750A4);
|
|
1672
|
+
font-size: 20px;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
.action-icon {
|
|
1676
|
+
color: var(--md-sys-color-on-surface-variant, #49454F);
|
|
1677
|
+
font-size: 20px;
|
|
1678
|
+
}
|
|
1679
|
+
`, m = class extends f {
|
|
1680
|
+
constructor(...t) {
|
|
1681
|
+
super(...t), this.name = "", this.email = "", this.avatar = "", this.initials = "", this.icon = "", this.badge = "", this.href = "", this.target = "", this.active = !1, this.disabled = !1, this.action = !1, this.handleClick = (e) => {
|
|
1682
|
+
if (this.disabled) {
|
|
1683
|
+
e.preventDefault(), e.stopImmediatePropagation();
|
|
1684
|
+
return;
|
|
1685
|
+
}
|
|
1686
|
+
this.emitEvent("account-click", {
|
|
1687
|
+
name: this.name,
|
|
1688
|
+
email: this.email,
|
|
1689
|
+
avatar: this.avatar,
|
|
1690
|
+
initials: this.initials,
|
|
1691
|
+
active: this.active,
|
|
1692
|
+
action: this.action
|
|
1693
|
+
});
|
|
1694
|
+
};
|
|
1695
|
+
}
|
|
1696
|
+
static {
|
|
1697
|
+
this.styles = [f.styles, M];
|
|
1698
|
+
}
|
|
1699
|
+
render() {
|
|
1700
|
+
const t = this.initials || (this.name ? this.name.charAt(0).toUpperCase() : ""), e = this.avatar ? o`<img class="item-avatar-img" src=${this.avatar} alt=${this.name || "Account avatar"} />` : this.icon ? o`<md-icon name=${this.icon}></md-icon>` : t ? o`<span>${t}</span>` : o`<md-icon name="person"></md-icon>`, i = this.active ? o`<md-icon name="check" class="check-icon"></md-icon>` : this.action ? o`<md-icon name="chevron_right" class="action-icon"></md-icon>` : h, n = o`
|
|
1701
|
+
<md-ripple ?disabled=${this.disabled}></md-ripple>
|
|
1702
|
+
<md-focus-ring></md-focus-ring>
|
|
1703
|
+
|
|
1704
|
+
<div class="item-avatar">
|
|
1705
|
+
<slot name="icon">${e}</slot>
|
|
1706
|
+
</div>
|
|
1707
|
+
|
|
1708
|
+
<div class="item-content">
|
|
1709
|
+
<span class="item-name"><slot name="name">${this.name || "Account"}</slot></span>
|
|
1710
|
+
${this.email ? o`<span class="item-email"><slot name="email">${this.email}</slot></span>` : h}
|
|
1711
|
+
</div>
|
|
1712
|
+
|
|
1713
|
+
<div class="item-trailing">
|
|
1714
|
+
<slot name="trailing">${i}</slot>
|
|
1715
|
+
</div>
|
|
1716
|
+
`;
|
|
1717
|
+
return this.href ? o`
|
|
1718
|
+
<a
|
|
1719
|
+
class="item"
|
|
1720
|
+
href=${this.disabled ? h : this.href}
|
|
1721
|
+
target=${this.target || h}
|
|
1722
|
+
aria-disabled=${this.disabled ? "true" : h}
|
|
1723
|
+
tabindex=${this.disabled ? "-1" : "0"}
|
|
1724
|
+
@click=${this.handleClick}
|
|
1725
|
+
>
|
|
1726
|
+
${n}
|
|
1727
|
+
</a>
|
|
1728
|
+
` : o`
|
|
1729
|
+
<button
|
|
1730
|
+
class="item"
|
|
1731
|
+
type="button"
|
|
1732
|
+
tabindex=${this.disabled ? "-1" : "0"}
|
|
1733
|
+
aria-disabled=${this.disabled ? "true" : h}
|
|
1734
|
+
?disabled=${this.disabled}
|
|
1735
|
+
@click=${this.handleClick}
|
|
1736
|
+
>
|
|
1737
|
+
${n}
|
|
1738
|
+
</button>
|
|
1739
|
+
`;
|
|
1740
|
+
}
|
|
1741
|
+
};
|
|
1742
|
+
a([r({ type: String })], m.prototype, "name", void 0);
|
|
1743
|
+
a([r({ type: String })], m.prototype, "email", void 0);
|
|
1744
|
+
a([r({ type: String })], m.prototype, "avatar", void 0);
|
|
1745
|
+
a([r({ type: String })], m.prototype, "initials", void 0);
|
|
1746
|
+
a([r({ type: String })], m.prototype, "icon", void 0);
|
|
1747
|
+
a([r({ type: String })], m.prototype, "badge", void 0);
|
|
1748
|
+
a([r({ type: String })], m.prototype, "href", void 0);
|
|
1749
|
+
a([r({ type: String })], m.prototype, "target", void 0);
|
|
1750
|
+
a([r({
|
|
1751
|
+
type: Boolean,
|
|
1752
|
+
reflect: !0
|
|
1753
|
+
})], m.prototype, "active", void 0);
|
|
1754
|
+
a([r({
|
|
1755
|
+
type: Boolean,
|
|
1756
|
+
reflect: !0
|
|
1757
|
+
})], m.prototype, "disabled", void 0);
|
|
1758
|
+
a([r({ type: Boolean })], m.prototype, "action", void 0);
|
|
1759
|
+
m = a([v("md-account-item")], m);
|
|
1760
|
+
var s = class extends f {
|
|
1761
|
+
constructor(...t) {
|
|
1762
|
+
super(...t), this.open = !1, this.name = "Franco Fantomius", this.email = "franco.fantomius@example.com", this.avatar = "", this.initials = "", this.icon = "account_circle", this.headline = "Account", this.manageText = "Manage your Account", this.manageUrl = "", this.organization = "Material Components", this.roleTitle = "Lead Architect", this.status = "Active", this.storageUsed = "10.4 GB", this.storageTotal = "15 GB", this.storageProgress = 0.69, this.securityStatus = "Protected", this.ariaLabelText = "Account info", this.noTrigger = !1, this.alignment = "end", this.pivot = "right", this.modal = !1, this.fullscreen = !1, this.showTabs = !0, this.activeTab = "overview", this.handleKeyDown = (e) => {
|
|
1763
|
+
e.key === "Escape" && this.open && this.close();
|
|
1764
|
+
}, this.handleDocumentClick = (e) => {
|
|
1765
|
+
this.open && (e.composedPath().includes(this) || this.close());
|
|
1766
|
+
}, this.handleBackdropClick = () => {
|
|
1767
|
+
this.close();
|
|
1768
|
+
}, this.handleBackClick = (e) => {
|
|
1769
|
+
e.stopPropagation(), this.close();
|
|
1770
|
+
}, this.handleTriggerClick = (e) => {
|
|
1771
|
+
e.stopPropagation(), this.toggle();
|
|
1772
|
+
}, this.handleTabClick = (e) => {
|
|
1773
|
+
this.activeTab = e, this.emitEvent("tab-change", { tab: e });
|
|
1774
|
+
}, this.handleManageClick = (e) => {
|
|
1775
|
+
this.emitEvent("manage-click", {
|
|
1776
|
+
name: this.name,
|
|
1777
|
+
email: this.email,
|
|
1778
|
+
manageUrl: this.manageUrl
|
|
1779
|
+
});
|
|
1780
|
+
}, this.handleSignOutClick = () => {
|
|
1781
|
+
this.emitEvent("sign-out", { email: this.email }), this.close();
|
|
1782
|
+
}, this.handleEditAvatarClick = (e) => {
|
|
1783
|
+
e.stopPropagation(), this.emitEvent("edit-avatar", { email: this.email });
|
|
1784
|
+
}, this.handleAccountItemClick = (e) => {
|
|
1785
|
+
const i = e.detail;
|
|
1786
|
+
!i.action && i.email && (this.name = i.name || this.name, this.email = i.email, i.avatar && (this.avatar = i.avatar), i.initials && (this.initials = i.initials)), this.emitEvent("account-select", i);
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1789
|
+
static {
|
|
1790
|
+
this.styles = [f.styles, E];
|
|
1791
|
+
}
|
|
1792
|
+
get trigger() {
|
|
1793
|
+
return !this.noTrigger;
|
|
1794
|
+
}
|
|
1795
|
+
set trigger(t) {
|
|
1796
|
+
this.noTrigger = !t, this.requestUpdate("noTrigger");
|
|
1797
|
+
}
|
|
1798
|
+
connectedCallback() {
|
|
1799
|
+
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown), document.addEventListener("pointerdown", this.handleDocumentClick), this.addEventListener("account-click", this.handleAccountItemClick);
|
|
1800
|
+
}
|
|
1801
|
+
disconnectedCallback() {
|
|
1802
|
+
super.disconnectedCallback(), window.removeEventListener("keydown", this.handleKeyDown), document.removeEventListener("pointerdown", this.handleDocumentClick), this.removeEventListener("account-click", this.handleAccountItemClick);
|
|
1803
|
+
}
|
|
1804
|
+
updated(t) {
|
|
1805
|
+
super.updated(t), t.has("open") && (this.open ? this.emitEvent("open") : this.emitEvent("close"));
|
|
1806
|
+
}
|
|
1807
|
+
show() {
|
|
1808
|
+
this.open || (this.open = !0);
|
|
1809
|
+
}
|
|
1810
|
+
close() {
|
|
1811
|
+
this.open && (this.open = !1);
|
|
1812
|
+
}
|
|
1813
|
+
toggle() {
|
|
1814
|
+
this.open = !this.open;
|
|
1815
|
+
}
|
|
1816
|
+
render() {
|
|
1817
|
+
const t = this.initials || (this.name ? this.name.charAt(0).toUpperCase() : "G"), e = this.avatar ? o`<img class="avatar-img" src=${this.avatar} alt=${this.name || "User Profile"} />` : t ? o`<span class="avatar-initials">${t}</span>` : o`<md-icon name=${this.icon}></md-icon>`, i = this.noTrigger ? o`<slot name="trigger" @click=${this.handleTriggerClick}></slot>` : o`
|
|
1818
|
+
<div class="trigger-container" @click=${this.handleTriggerClick}>
|
|
1819
|
+
<slot name="trigger">
|
|
1820
|
+
<button
|
|
1821
|
+
type="button"
|
|
1822
|
+
class="avatar-btn"
|
|
1823
|
+
aria-label=${this.ariaLabelText}
|
|
1824
|
+
aria-expanded=${this.open ? "true" : "false"}
|
|
1825
|
+
aria-haspopup="dialog"
|
|
1826
|
+
title="${this.name} (${this.email})"
|
|
1827
|
+
>
|
|
1828
|
+
<md-ripple></md-ripple>
|
|
1829
|
+
<md-focus-ring></md-focus-ring>
|
|
1830
|
+
${e}
|
|
1831
|
+
</button>
|
|
1832
|
+
</slot>
|
|
1833
|
+
</div>
|
|
1834
|
+
`;
|
|
1835
|
+
return o`
|
|
1836
|
+
<div class="backdrop" @click=${this.handleBackdropClick}></div>
|
|
1837
|
+
|
|
1838
|
+
<div class="trigger-wrapper">
|
|
1839
|
+
${i}
|
|
1840
|
+
</div>
|
|
1841
|
+
|
|
1842
|
+
<div
|
|
1843
|
+
class="popover"
|
|
1844
|
+
role="dialog"
|
|
1845
|
+
aria-modal=${this.modal ? "true" : "false"}
|
|
1846
|
+
aria-label=${this.headline || this.ariaLabelText}
|
|
1847
|
+
aria-hidden=${this.open ? "false" : "true"}
|
|
1848
|
+
>
|
|
1849
|
+
<!-- Popover Header -->
|
|
1850
|
+
<div class="popover-header">
|
|
1851
|
+
<div class="header-leading">
|
|
1852
|
+
<slot name="back-button">
|
|
1853
|
+
<md-icon-button
|
|
1854
|
+
class="back-btn"
|
|
1855
|
+
variant="standard"
|
|
1856
|
+
icon="arrow_back"
|
|
1857
|
+
aria-label="Back"
|
|
1858
|
+
title="Back"
|
|
1859
|
+
@click=${this.handleBackClick}
|
|
1860
|
+
></md-icon-button>
|
|
1861
|
+
</slot>
|
|
1862
|
+
${this.headline ? o`<span class="headline">${this.headline}</span>` : h}
|
|
1863
|
+
</div>
|
|
1864
|
+
<slot name="header">
|
|
1865
|
+
<button
|
|
1866
|
+
type="button"
|
|
1867
|
+
class="close-btn"
|
|
1868
|
+
aria-label="Close account menu"
|
|
1869
|
+
@click=${this.close}
|
|
1870
|
+
>
|
|
1871
|
+
<md-icon name="close"></md-icon>
|
|
1872
|
+
</button>
|
|
1873
|
+
</slot>
|
|
1874
|
+
</div>
|
|
1875
|
+
|
|
1876
|
+
<!-- Central Profile Card -->
|
|
1877
|
+
<div class="profile-card">
|
|
1878
|
+
<div class="profile-avatar-wrapper">
|
|
1879
|
+
<div class="profile-avatar">
|
|
1880
|
+
${this.avatar ? o`<img src=${this.avatar} alt=${this.name} />` : o`<span>${t}</span>`}
|
|
1881
|
+
</div>
|
|
1882
|
+
<button
|
|
1883
|
+
type="button"
|
|
1884
|
+
class="avatar-edit-badge"
|
|
1885
|
+
aria-label="Change profile picture"
|
|
1886
|
+
title="Change profile picture"
|
|
1887
|
+
@click=${this.handleEditAvatarClick}
|
|
1888
|
+
>
|
|
1889
|
+
<md-icon name="photo_camera"></md-icon>
|
|
1890
|
+
</button>
|
|
1891
|
+
</div>
|
|
1892
|
+
|
|
1893
|
+
<h2 class="profile-name">${this.name}</h2>
|
|
1894
|
+
<span class="profile-email">${this.email}</span>
|
|
1895
|
+
|
|
1896
|
+
<a
|
|
1897
|
+
class="manage-btn"
|
|
1898
|
+
href=${this.manageUrl || "javascript:void(0)"}
|
|
1899
|
+
@click=${this.handleManageClick}
|
|
1900
|
+
>
|
|
1901
|
+
<md-ripple></md-ripple>
|
|
1902
|
+
<md-focus-ring></md-focus-ring>
|
|
1903
|
+
<md-icon name="manage_accounts"></md-icon>
|
|
1904
|
+
<span>${this.manageText}</span>
|
|
1905
|
+
</a>
|
|
1906
|
+
</div>
|
|
1907
|
+
|
|
1908
|
+
<!-- Account Info Tabs -->
|
|
1909
|
+
${this.showTabs ? o`
|
|
1910
|
+
<nav class="account-tabs" role="tablist" aria-label="Account information tabs">
|
|
1911
|
+
<button
|
|
1912
|
+
type="button"
|
|
1913
|
+
class="tab-btn ${this.activeTab === "overview" ? "active" : ""}"
|
|
1914
|
+
role="tab"
|
|
1915
|
+
aria-selected=${this.activeTab === "overview" ? "true" : "false"}
|
|
1916
|
+
@click=${() => this.handleTabClick("overview")}
|
|
1917
|
+
>
|
|
1918
|
+
<md-icon name="badge"></md-icon>
|
|
1919
|
+
<span>Overview</span>
|
|
1920
|
+
</button>
|
|
1921
|
+
<button
|
|
1922
|
+
type="button"
|
|
1923
|
+
class="tab-btn ${this.activeTab === "security" ? "active" : ""}"
|
|
1924
|
+
role="tab"
|
|
1925
|
+
aria-selected=${this.activeTab === "security" ? "true" : "false"}
|
|
1926
|
+
@click=${() => this.handleTabClick("security")}
|
|
1927
|
+
>
|
|
1928
|
+
<md-icon name="shield"></md-icon>
|
|
1929
|
+
<span>Security</span>
|
|
1930
|
+
</button>
|
|
1931
|
+
<button
|
|
1932
|
+
type="button"
|
|
1933
|
+
class="tab-btn ${this.activeTab === "storage" ? "active" : ""}"
|
|
1934
|
+
role="tab"
|
|
1935
|
+
aria-selected=${this.activeTab === "storage" ? "true" : "false"}
|
|
1936
|
+
@click=${() => this.handleTabClick("storage")}
|
|
1937
|
+
>
|
|
1938
|
+
<md-icon name="cloud"></md-icon>
|
|
1939
|
+
<span>Storage</span>
|
|
1940
|
+
</button>
|
|
1941
|
+
<button
|
|
1942
|
+
type="button"
|
|
1943
|
+
class="tab-btn ${this.activeTab === "accounts" ? "active" : ""}"
|
|
1944
|
+
role="tab"
|
|
1945
|
+
aria-selected=${this.activeTab === "accounts" ? "true" : "false"}
|
|
1946
|
+
@click=${() => this.handleTabClick("accounts")}
|
|
1947
|
+
>
|
|
1948
|
+
<md-icon name="people"></md-icon>
|
|
1949
|
+
<span>Accounts</span>
|
|
1950
|
+
</button>
|
|
1951
|
+
</nav>
|
|
1952
|
+
` : h}
|
|
1953
|
+
|
|
1954
|
+
<!-- Tab Panels -->
|
|
1955
|
+
<!-- 1. Overview Tab Panel -->
|
|
1956
|
+
<div class="tab-panel ${this.activeTab === "overview" ? "active" : ""}" role="tabpanel">
|
|
1957
|
+
<slot name="overview">
|
|
1958
|
+
<div class="info-card">
|
|
1959
|
+
<div class="info-row">
|
|
1960
|
+
<div class="info-label">
|
|
1961
|
+
<md-icon name="apartment"></md-icon>
|
|
1962
|
+
<span>Organization</span>
|
|
1963
|
+
</div>
|
|
1964
|
+
<span class="info-value">${this.organization}</span>
|
|
1965
|
+
</div>
|
|
1966
|
+
<div class="info-row">
|
|
1967
|
+
<div class="info-label">
|
|
1968
|
+
<md-icon name="engineering"></md-icon>
|
|
1969
|
+
<span>Role</span>
|
|
1970
|
+
</div>
|
|
1971
|
+
<span class="info-value">${this.roleTitle}</span>
|
|
1972
|
+
</div>
|
|
1973
|
+
<div class="info-row">
|
|
1974
|
+
<div class="info-label">
|
|
1975
|
+
<md-icon name="verified_user"></md-icon>
|
|
1976
|
+
<span>Status</span>
|
|
1977
|
+
</div>
|
|
1978
|
+
<span class="info-value">
|
|
1979
|
+
<span class="badge-chip success">
|
|
1980
|
+
<md-icon name="check_circle" style="font-size: 13px;"></md-icon>
|
|
1981
|
+
${this.status}
|
|
1982
|
+
</span>
|
|
1983
|
+
</span>
|
|
1984
|
+
</div>
|
|
1985
|
+
</div>
|
|
1986
|
+
</slot>
|
|
1987
|
+
</div>
|
|
1988
|
+
|
|
1989
|
+
<!-- 2. Security Tab Panel -->
|
|
1990
|
+
<div class="tab-panel ${this.activeTab === "security" ? "active" : ""}" role="tabpanel">
|
|
1991
|
+
<slot name="security">
|
|
1992
|
+
<div class="info-card">
|
|
1993
|
+
<div class="info-row">
|
|
1994
|
+
<div class="info-label">
|
|
1995
|
+
<md-icon name="security"></md-icon>
|
|
1996
|
+
<span>2-Step Verification</span>
|
|
1997
|
+
</div>
|
|
1998
|
+
<span class="info-value">
|
|
1999
|
+
<span class="badge-chip success">Enabled</span>
|
|
2000
|
+
</span>
|
|
2001
|
+
</div>
|
|
2002
|
+
<div class="info-row">
|
|
2003
|
+
<div class="info-label">
|
|
2004
|
+
<md-icon name="devices"></md-icon>
|
|
2005
|
+
<span>Active Sessions</span>
|
|
2006
|
+
</div>
|
|
2007
|
+
<span class="info-value">2 devices (PC, Mobile)</span>
|
|
2008
|
+
</div>
|
|
2009
|
+
<div class="info-row">
|
|
2010
|
+
<div class="info-label">
|
|
2011
|
+
<md-icon name="lock_reset"></md-icon>
|
|
2012
|
+
<span>Password Changed</span>
|
|
2013
|
+
</div>
|
|
2014
|
+
<span class="info-value">3 months ago</span>
|
|
2015
|
+
</div>
|
|
2016
|
+
</div>
|
|
2017
|
+
</slot>
|
|
2018
|
+
</div>
|
|
2019
|
+
|
|
2020
|
+
<!-- 3. Storage Tab Panel -->
|
|
2021
|
+
<div class="tab-panel ${this.activeTab === "storage" ? "active" : ""}" role="tabpanel">
|
|
2022
|
+
<slot name="storage">
|
|
2023
|
+
<div class="storage-box">
|
|
2024
|
+
<div class="storage-header">
|
|
2025
|
+
<div class="storage-title">
|
|
2026
|
+
<md-icon name="cloud"></md-icon>
|
|
2027
|
+
<span>Account Storage</span>
|
|
2028
|
+
</div>
|
|
2029
|
+
<span class="storage-meta">${this.storageUsed} of ${this.storageTotal} used</span>
|
|
2030
|
+
</div>
|
|
2031
|
+
<div class="storage-bar-track">
|
|
2032
|
+
<div
|
|
2033
|
+
class="storage-bar-fill"
|
|
2034
|
+
style="width: ${Math.min(100, Math.max(0, this.storageProgress * 100))}%;"
|
|
2035
|
+
></div>
|
|
2036
|
+
</div>
|
|
2037
|
+
<div class="storage-breakdown">
|
|
2038
|
+
<div class="storage-item">
|
|
2039
|
+
<span class="storage-dot" style="background-color: var(--md-sys-color-primary, #6750A4);"></span>
|
|
2040
|
+
<span>Files: 6.2 GB</span>
|
|
2041
|
+
<div class="storage-item">
|
|
2042
|
+
<span class="storage-dot" style="background-color: var(--md-sys-color-tertiary, #7D5260);"></span>
|
|
2043
|
+
<span>Mail: 3.1 GB</span>
|
|
2044
|
+
</div>
|
|
2045
|
+
<span class="storage-dot" style="background-color: var(--md-sys-color-secondary, #625B71);"></span>
|
|
2046
|
+
<span>Media: 1.1 GB</span>
|
|
2047
|
+
</div>
|
|
2048
|
+
<div class="storage-item">
|
|
2049
|
+
<span>Free: 4.6 GB</span>
|
|
2050
|
+
</div>
|
|
2051
|
+
</div>
|
|
2052
|
+
</div>
|
|
2053
|
+
</slot>
|
|
2054
|
+
</div>
|
|
2055
|
+
|
|
2056
|
+
<!-- 4. Accounts Multi-switcher Tab Panel -->
|
|
2057
|
+
<div class="tab-panel ${this.activeTab === "accounts" ? "active" : ""}" role="tabpanel">
|
|
2058
|
+
<div class="accounts-list">
|
|
2059
|
+
<slot name="accounts">
|
|
2060
|
+
<md-account-item
|
|
2061
|
+
name=${this.name}
|
|
2062
|
+
email=${this.email}
|
|
2063
|
+
initials=${t}
|
|
2064
|
+
active
|
|
2065
|
+
></md-account-item>
|
|
2066
|
+
<md-account-item
|
|
2067
|
+
name="Work Workspace"
|
|
2068
|
+
email="franco.dev@work.corp"
|
|
2069
|
+
initials="W"
|
|
2070
|
+
></md-account-item>
|
|
2071
|
+
<md-account-item
|
|
2072
|
+
name="Add another account"
|
|
2073
|
+
icon="person_add"
|
|
2074
|
+
action
|
|
2075
|
+
></md-account-item>
|
|
2076
|
+
</slot>
|
|
2077
|
+
</div>
|
|
2078
|
+
</div>
|
|
2079
|
+
|
|
2080
|
+
<!-- Default Slot for Custom Extensions -->
|
|
2081
|
+
<slot></slot>
|
|
2082
|
+
|
|
2083
|
+
<!-- Popover Footer -->
|
|
2084
|
+
<div class="popover-footer">
|
|
2085
|
+
<slot name="footer">
|
|
2086
|
+
<button type="button" class="signout-btn" @click=${this.handleSignOutClick}>
|
|
2087
|
+
<md-ripple></md-ripple>
|
|
2088
|
+
<md-focus-ring></md-focus-ring>
|
|
2089
|
+
<md-icon name="logout"></md-icon>
|
|
2090
|
+
<span>Sign out of all accounts</span>
|
|
2091
|
+
</button>
|
|
2092
|
+
<div class="footer-links">
|
|
2093
|
+
<a href="#/privacy">Privacy Policy</a>
|
|
2094
|
+
<span class="footer-dot">•</span>
|
|
2095
|
+
<a href="#/terms">Terms of Service</a>
|
|
2096
|
+
</div>
|
|
2097
|
+
</slot>
|
|
2098
|
+
</div>
|
|
2099
|
+
</div>
|
|
2100
|
+
`;
|
|
2101
|
+
}
|
|
2102
|
+
};
|
|
2103
|
+
a([r({
|
|
2104
|
+
type: Boolean,
|
|
2105
|
+
reflect: !0
|
|
2106
|
+
})], s.prototype, "open", void 0);
|
|
2107
|
+
a([r({ type: String })], s.prototype, "name", void 0);
|
|
2108
|
+
a([r({ type: String })], s.prototype, "email", void 0);
|
|
2109
|
+
a([r({ type: String })], s.prototype, "avatar", void 0);
|
|
2110
|
+
a([r({ type: String })], s.prototype, "initials", void 0);
|
|
2111
|
+
a([r({ type: String })], s.prototype, "icon", void 0);
|
|
2112
|
+
a([r({
|
|
2113
|
+
type: String,
|
|
2114
|
+
attribute: "headline"
|
|
2115
|
+
})], s.prototype, "headline", void 0);
|
|
2116
|
+
a([r({
|
|
2117
|
+
type: String,
|
|
2118
|
+
attribute: "manage-text"
|
|
2119
|
+
})], s.prototype, "manageText", void 0);
|
|
2120
|
+
a([r({
|
|
2121
|
+
type: String,
|
|
2122
|
+
attribute: "manage-url"
|
|
2123
|
+
})], s.prototype, "manageUrl", void 0);
|
|
2124
|
+
a([r({
|
|
2125
|
+
type: String,
|
|
2126
|
+
attribute: "organization"
|
|
2127
|
+
})], s.prototype, "organization", void 0);
|
|
2128
|
+
a([r({
|
|
2129
|
+
type: String,
|
|
2130
|
+
attribute: "role-title"
|
|
2131
|
+
})], s.prototype, "roleTitle", void 0);
|
|
2132
|
+
a([r({
|
|
2133
|
+
type: String,
|
|
2134
|
+
attribute: "status"
|
|
2135
|
+
})], s.prototype, "status", void 0);
|
|
2136
|
+
a([r({
|
|
2137
|
+
type: String,
|
|
2138
|
+
attribute: "storage-used"
|
|
2139
|
+
})], s.prototype, "storageUsed", void 0);
|
|
2140
|
+
a([r({
|
|
2141
|
+
type: String,
|
|
2142
|
+
attribute: "storage-total"
|
|
2143
|
+
})], s.prototype, "storageTotal", void 0);
|
|
2144
|
+
a([r({
|
|
2145
|
+
type: Number,
|
|
2146
|
+
attribute: "storage-progress"
|
|
2147
|
+
})], s.prototype, "storageProgress", void 0);
|
|
2148
|
+
a([r({
|
|
2149
|
+
type: String,
|
|
2150
|
+
attribute: "security-status"
|
|
2151
|
+
})], s.prototype, "securityStatus", void 0);
|
|
2152
|
+
a([r({
|
|
2153
|
+
type: String,
|
|
2154
|
+
attribute: "aria-label"
|
|
2155
|
+
})], s.prototype, "ariaLabelText", void 0);
|
|
2156
|
+
a([r({
|
|
2157
|
+
type: Boolean,
|
|
2158
|
+
attribute: "no-trigger"
|
|
2159
|
+
})], s.prototype, "noTrigger", void 0);
|
|
2160
|
+
a([r({
|
|
2161
|
+
type: String,
|
|
2162
|
+
reflect: !0
|
|
2163
|
+
})], s.prototype, "alignment", void 0);
|
|
2164
|
+
a([r({
|
|
2165
|
+
type: String,
|
|
2166
|
+
reflect: !0
|
|
2167
|
+
})], s.prototype, "pivot", void 0);
|
|
2168
|
+
a([r({
|
|
2169
|
+
type: Boolean,
|
|
2170
|
+
reflect: !0
|
|
2171
|
+
})], s.prototype, "modal", void 0);
|
|
2172
|
+
a([r({
|
|
2173
|
+
type: Boolean,
|
|
2174
|
+
reflect: !0
|
|
2175
|
+
})], s.prototype, "fullscreen", void 0);
|
|
2176
|
+
a([r({
|
|
2177
|
+
type: Boolean,
|
|
2178
|
+
attribute: "show-tabs"
|
|
2179
|
+
})], s.prototype, "showTabs", void 0);
|
|
2180
|
+
a([C()], s.prototype, "activeTab", void 0);
|
|
2181
|
+
s = a([v("md-account-menu")], s);
|
|
2182
|
+
var A = class extends s {
|
|
2183
|
+
};
|
|
2184
|
+
A = a([v("md-account-drawer")], A);
|
|
2185
|
+
var D = class extends s {
|
|
2186
|
+
};
|
|
2187
|
+
D = a([v("md-account-profile")], D);
|
|
2188
|
+
var $ = class extends m {
|
|
2189
|
+
};
|
|
2190
|
+
$ = a([v("md-account-profile-item")], $);
|
|
23
2191
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
2192
|
+
A as MdAccountDrawer,
|
|
2193
|
+
m as MdAccountItem,
|
|
2194
|
+
s as MdAccountMenu,
|
|
2195
|
+
D as MdAccountProfile,
|
|
2196
|
+
$ as MdAccountProfileItem,
|
|
2197
|
+
l as MdAppDrawer,
|
|
2198
|
+
g as MdAppDrawerItem,
|
|
2199
|
+
k as MdAppItem,
|
|
2200
|
+
x as MdAppLauncher,
|
|
2201
|
+
T as MdAppLauncherItem,
|
|
2202
|
+
w as MdAppsMenu,
|
|
2203
|
+
ct as MdAudioPlayer,
|
|
2204
|
+
ke as MdBadge,
|
|
2205
|
+
f as MdBaseElement,
|
|
2206
|
+
X as MdButton,
|
|
2207
|
+
ge as MdCard,
|
|
2208
|
+
se as MdCheckbox,
|
|
2209
|
+
De as MdChip,
|
|
2210
|
+
Ae as MdChipSet,
|
|
2211
|
+
ot as MdCode,
|
|
2212
|
+
rt as MdCodeBlock,
|
|
2213
|
+
Xe as MdDataTable,
|
|
2214
|
+
ve as MdDialog,
|
|
2215
|
+
fe as MdDivider,
|
|
2216
|
+
_e as MdDrawer,
|
|
2217
|
+
Ke as MdDrawerItem,
|
|
2218
|
+
ie as MdFab,
|
|
2219
|
+
V as MdFocusRing,
|
|
2220
|
+
H as MdFormAssociatedElement,
|
|
2221
|
+
J as MdIcon,
|
|
2222
|
+
ee as MdIconButton,
|
|
2223
|
+
Me as MdList,
|
|
2224
|
+
Ee as MdListItem,
|
|
2225
|
+
dt as MdMediaPlayer,
|
|
2226
|
+
Ue as MdMenuBar,
|
|
2227
|
+
je as MdNavigationDrawer,
|
|
2228
|
+
Re as MdNavigationDrawerItem,
|
|
2229
|
+
lt as MdPlayer,
|
|
2230
|
+
xe as MdProgress,
|
|
2231
|
+
pe as MdRadio,
|
|
2232
|
+
ce as MdRadioGroup,
|
|
2233
|
+
N as MdRipple,
|
|
2234
|
+
it as MdSearch,
|
|
2235
|
+
tt as MdSearchBar,
|
|
2236
|
+
Fe as MdSnackbar,
|
|
2237
|
+
de as MdSwitch,
|
|
2238
|
+
Ie as MdTab,
|
|
2239
|
+
Ve as MdTable,
|
|
2240
|
+
Je as MdTableBody,
|
|
2241
|
+
Ne as MdTableCell,
|
|
2242
|
+
He as MdTableHead,
|
|
2243
|
+
We as MdTableHeadCell,
|
|
2244
|
+
Qe as MdTableHeader,
|
|
2245
|
+
Ge as MdTableHeaderCell,
|
|
2246
|
+
qe as MdTablePagination,
|
|
2247
|
+
Ze as MdTableRow,
|
|
2248
|
+
Ce as MdTabs,
|
|
2249
|
+
re as MdTextField,
|
|
2250
|
+
Le as MdTopAppBar,
|
|
2251
|
+
Oe as MdTopBar,
|
|
2252
|
+
nt as MdVideoPlayer,
|
|
2253
|
+
ye as WAVY_CIRCLE_PATH,
|
|
2254
|
+
F as applyTheme,
|
|
2255
|
+
B as colorSchemeToCssVariables,
|
|
2256
|
+
O as darkColorScheme,
|
|
2257
|
+
L as elevationTokens,
|
|
2258
|
+
P as lightColorScheme,
|
|
2259
|
+
R as motionTokens,
|
|
2260
|
+
j as shapeTokens,
|
|
2261
|
+
K as themeStyles,
|
|
2262
|
+
U as typographyTokens
|
|
2263
|
+
};
|
|
2264
|
+
|
|
2265
|
+
//# sourceMappingURL=index.js.map
|