mdui 2.0.5 → 2.1.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.
Files changed (249) hide show
  1. package/components/avatar/index.js +2 -7
  2. package/components/avatar/style.js +1 -31
  3. package/components/badge/style.js +1 -25
  4. package/components/bottom-app-bar/style.js +1 -92
  5. package/components/button/button-base-style.js +1 -28
  6. package/components/button/button-base.js +1 -8
  7. package/components/button/index.js +8 -18
  8. package/components/button/style.js +2 -111
  9. package/components/button-icon/index.js +5 -22
  10. package/components/button-icon/style.js +2 -103
  11. package/components/card/index.js +1 -5
  12. package/components/card/style.js +1 -72
  13. package/components/checkbox/index.js +7 -50
  14. package/components/checkbox/style.js +1 -131
  15. package/components/chip/index.js +9 -33
  16. package/components/chip/style.js +2 -205
  17. package/components/circular-progress/index.js +5 -39
  18. package/components/circular-progress/style.js +1 -136
  19. package/components/collapse/collapse-item-style.js +1 -21
  20. package/components/collapse/collapse-item.js +2 -10
  21. package/components/collapse/collapse-style.js +1 -5
  22. package/components/collapse/collapse.js +1 -4
  23. package/components/dialog/index.js +10 -35
  24. package/components/dialog/style.js +1 -116
  25. package/components/divider/style.js +1 -18
  26. package/components/dropdown/index.js +1 -8
  27. package/components/dropdown/style.js +1 -11
  28. package/components/fab/index.js +5 -13
  29. package/components/fab/style.js +4 -153
  30. package/components/icon/index.js +1 -5
  31. package/components/icon/style.js +1 -29
  32. package/components/layout/layout-item-style.js +1 -6
  33. package/components/layout/layout-main-style.js +1 -7
  34. package/components/layout/layout-style.js +1 -11
  35. package/components/linear-progress/index.js +2 -6
  36. package/components/linear-progress/style.js +1 -73
  37. package/components/list/list-item-style.js +2 -153
  38. package/components/list/list-item.js +8 -27
  39. package/components/list/list-style.js +1 -10
  40. package/components/list/list-subheader-style.js +1 -19
  41. package/components/menu/menu-item-style.js +1 -125
  42. package/components/menu/menu-item.js +13 -55
  43. package/components/menu/menu-style.js +1 -19
  44. package/components/menu/menu.js +1 -5
  45. package/components/navigation-bar/navigation-bar-item-style.js +1 -132
  46. package/components/navigation-bar/navigation-bar-item.js +7 -23
  47. package/components/navigation-bar/navigation-bar-style.js +1 -28
  48. package/components/navigation-bar/navigation-bar.js +1 -4
  49. package/components/navigation-drawer/index.js +1 -12
  50. package/components/navigation-drawer/style.js +1 -66
  51. package/components/navigation-rail/navigation-rail-item-style.js +1 -122
  52. package/components/navigation-rail/navigation-rail-item.js +7 -26
  53. package/components/navigation-rail/navigation-rail-style.js +1 -79
  54. package/components/navigation-rail/navigation-rail.js +1 -10
  55. package/components/radio/radio-group-style.js +1 -20
  56. package/components/radio/radio-group.js +1 -19
  57. package/components/radio/radio-style.js +1 -107
  58. package/components/radio/radio.js +5 -23
  59. package/components/range-slider/index.d.ts +1 -1
  60. package/components/range-slider/index.js +5 -53
  61. package/components/ripple/index.js +2 -5
  62. package/components/ripple/style.js +1 -96
  63. package/components/segmented-button/segmented-button-group-style.js +1 -28
  64. package/components/segmented-button/segmented-button-group.js +1 -21
  65. package/components/segmented-button/segmented-button-style.js +2 -81
  66. package/components/segmented-button/segmented-button.js +11 -27
  67. package/components/select/index.d.ts +18 -0
  68. package/components/select/index.js +42 -87
  69. package/components/select/style.js +1 -27
  70. package/components/slider/index.js +2 -33
  71. package/components/slider/slider-base-style.js +1 -173
  72. package/components/slider/slider-base.js +1 -6
  73. package/components/slider/style.js +1 -7
  74. package/components/snackbar/index.js +5 -32
  75. package/components/snackbar/style.js +1 -100
  76. package/components/switch/index.js +6 -40
  77. package/components/switch/style.js +1 -202
  78. package/components/tabs/tab-panel-style.js +1 -10
  79. package/components/tabs/tab-style.js +1 -85
  80. package/components/tabs/tab.js +4 -24
  81. package/components/tabs/tabs-style.js +1 -138
  82. package/components/tabs/tabs.js +1 -9
  83. package/components/text-field/index.d.ts +2 -0
  84. package/components/text-field/index.js +58 -163
  85. package/components/text-field/style.js +1 -362
  86. package/components/tooltip/index.js +1 -10
  87. package/components/tooltip/style.js +1 -57
  88. package/components/top-app-bar/top-app-bar-style.js +1 -78
  89. package/components/top-app-bar/top-app-bar-title-style.js +1 -81
  90. package/components/top-app-bar/top-app-bar-title.js +3 -17
  91. package/custom-elements.json +1194 -1099
  92. package/functions/alert.d.ts +2 -0
  93. package/functions/alert.js +19 -4
  94. package/functions/confirm.d.ts +4 -0
  95. package/functions/confirm.js +33 -6
  96. package/functions/getLocale.d.ts +6 -0
  97. package/functions/getLocale.js +11 -0
  98. package/functions/getTheme.d.ts +1 -1
  99. package/functions/loadLocale.d.ts +6 -0
  100. package/functions/loadLocale.js +8 -0
  101. package/functions/prompt.d.ts +4 -0
  102. package/functions/prompt.js +35 -8
  103. package/functions/removeColorScheme.js +1 -1
  104. package/functions/setColorScheme.d.ts +1 -1
  105. package/functions/setColorScheme.js +1 -1
  106. package/functions/setLocale.d.ts +6 -0
  107. package/functions/setLocale.js +11 -0
  108. package/functions/setTheme.d.ts +1 -1
  109. package/internal/localeCodes.d.ts +13 -0
  110. package/internal/localeCodes.js +144 -0
  111. package/internal/localize.d.ts +32 -0
  112. package/internal/localize.js +55 -0
  113. package/locales/ar-eg.d.ts +8 -0
  114. package/locales/ar-eg.js +12 -0
  115. package/locales/az-az.d.ts +8 -0
  116. package/locales/az-az.js +12 -0
  117. package/locales/be-by.d.ts +8 -0
  118. package/locales/be-by.js +12 -0
  119. package/locales/bg-bg.d.ts +8 -0
  120. package/locales/bg-bg.js +12 -0
  121. package/locales/bn-bd.d.ts +8 -0
  122. package/locales/bn-bd.js +12 -0
  123. package/locales/ca-es.d.ts +8 -0
  124. package/locales/ca-es.js +12 -0
  125. package/locales/cs-cz.d.ts +8 -0
  126. package/locales/cs-cz.js +12 -0
  127. package/locales/da-dk.d.ts +8 -0
  128. package/locales/da-dk.js +12 -0
  129. package/locales/de-de.d.ts +8 -0
  130. package/locales/de-de.js +12 -0
  131. package/locales/el-gr.d.ts +8 -0
  132. package/locales/el-gr.js +12 -0
  133. package/locales/en-gb.d.ts +8 -0
  134. package/locales/en-gb.js +12 -0
  135. package/locales/es-es.d.ts +8 -0
  136. package/locales/es-es.js +12 -0
  137. package/locales/et-ee.d.ts +8 -0
  138. package/locales/et-ee.js +12 -0
  139. package/locales/fa-ir.d.ts +8 -0
  140. package/locales/fa-ir.js +12 -0
  141. package/locales/fi-fi.d.ts +8 -0
  142. package/locales/fi-fi.js +12 -0
  143. package/locales/fr-be.d.ts +8 -0
  144. package/locales/fr-be.js +12 -0
  145. package/locales/fr-ca.d.ts +8 -0
  146. package/locales/fr-ca.js +12 -0
  147. package/locales/fr-fr.d.ts +8 -0
  148. package/locales/fr-fr.js +12 -0
  149. package/locales/ga-ie.d.ts +8 -0
  150. package/locales/ga-ie.js +12 -0
  151. package/locales/gl-es.d.ts +8 -0
  152. package/locales/gl-es.js +12 -0
  153. package/locales/he-il.d.ts +8 -0
  154. package/locales/he-il.js +12 -0
  155. package/locales/hi-in.d.ts +8 -0
  156. package/locales/hi-in.js +12 -0
  157. package/locales/hr-hr.d.ts +8 -0
  158. package/locales/hr-hr.js +12 -0
  159. package/locales/hu-hu.d.ts +8 -0
  160. package/locales/hu-hu.js +12 -0
  161. package/locales/hy-am.d.ts +8 -0
  162. package/locales/hy-am.js +12 -0
  163. package/locales/id-id.d.ts +8 -0
  164. package/locales/id-id.js +12 -0
  165. package/locales/is-is.d.ts +8 -0
  166. package/locales/is-is.js +12 -0
  167. package/locales/it-it.d.ts +8 -0
  168. package/locales/it-it.js +12 -0
  169. package/locales/ja-jp.d.ts +8 -0
  170. package/locales/ja-jp.js +12 -0
  171. package/locales/ka-ge.d.ts +8 -0
  172. package/locales/ka-ge.js +12 -0
  173. package/locales/kk-kz.d.ts +8 -0
  174. package/locales/kk-kz.js +12 -0
  175. package/locales/km-kh.d.ts +8 -0
  176. package/locales/km-kh.js +12 -0
  177. package/locales/kmr-iq.d.ts +8 -0
  178. package/locales/kmr-iq.js +12 -0
  179. package/locales/kn-in.d.ts +8 -0
  180. package/locales/kn-in.js +12 -0
  181. package/locales/ko-kr.d.ts +8 -0
  182. package/locales/ko-kr.js +12 -0
  183. package/locales/lt-lt.d.ts +8 -0
  184. package/locales/lt-lt.js +12 -0
  185. package/locales/lv-lv.d.ts +8 -0
  186. package/locales/lv-lv.js +12 -0
  187. package/locales/mk-mk.d.ts +8 -0
  188. package/locales/mk-mk.js +12 -0
  189. package/locales/ml-in.d.ts +8 -0
  190. package/locales/ml-in.js +12 -0
  191. package/locales/mn-mn.d.ts +8 -0
  192. package/locales/mn-mn.js +12 -0
  193. package/locales/ms-my.d.ts +8 -0
  194. package/locales/ms-my.js +12 -0
  195. package/locales/nb-no.d.ts +8 -0
  196. package/locales/nb-no.js +12 -0
  197. package/locales/ne-np.d.ts +8 -0
  198. package/locales/ne-np.js +12 -0
  199. package/locales/nl-be.d.ts +8 -0
  200. package/locales/nl-be.js +12 -0
  201. package/locales/nl-nl.d.ts +8 -0
  202. package/locales/nl-nl.js +12 -0
  203. package/locales/pl-pl.d.ts +8 -0
  204. package/locales/pl-pl.js +12 -0
  205. package/locales/pt-br.d.ts +8 -0
  206. package/locales/pt-br.js +12 -0
  207. package/locales/pt-pt.d.ts +8 -0
  208. package/locales/pt-pt.js +12 -0
  209. package/locales/ro-ro.d.ts +8 -0
  210. package/locales/ro-ro.js +12 -0
  211. package/locales/ru-ru.d.ts +8 -0
  212. package/locales/ru-ru.js +12 -0
  213. package/locales/sk-sk.d.ts +8 -0
  214. package/locales/sk-sk.js +12 -0
  215. package/locales/sl-si.d.ts +8 -0
  216. package/locales/sl-si.js +12 -0
  217. package/locales/sr-rs.d.ts +8 -0
  218. package/locales/sr-rs.js +12 -0
  219. package/locales/sv-se.d.ts +8 -0
  220. package/locales/sv-se.js +12 -0
  221. package/locales/ta-in.d.ts +8 -0
  222. package/locales/ta-in.js +12 -0
  223. package/locales/th-th.d.ts +8 -0
  224. package/locales/th-th.js +12 -0
  225. package/locales/tr-tr.d.ts +8 -0
  226. package/locales/tr-tr.js +12 -0
  227. package/locales/uk-ua.d.ts +8 -0
  228. package/locales/uk-ua.js +12 -0
  229. package/locales/ur-pk.d.ts +8 -0
  230. package/locales/ur-pk.js +12 -0
  231. package/locales/vi-vn.d.ts +8 -0
  232. package/locales/vi-vn.js +12 -0
  233. package/locales/zh-cn.d.ts +8 -0
  234. package/locales/zh-cn.js +12 -0
  235. package/locales/zh-hk.d.ts +8 -0
  236. package/locales/zh-hk.js +12 -0
  237. package/locales/zh-tw.d.ts +8 -0
  238. package/locales/zh-tw.js +12 -0
  239. package/mdui.d.ts +5 -0
  240. package/mdui.esm.js +22 -0
  241. package/mdui.global.js +22 -0
  242. package/mdui.js +3 -0
  243. package/package.json +9 -6
  244. package/web-types.en.json +91 -1
  245. package/web-types.zh-cn.json +91 -1
  246. /package/{functions/utils → internal}/colorScheme.d.ts +0 -0
  247. /package/{functions/utils → internal}/colorScheme.js +0 -0
  248. /package/{functions/utils → internal}/theme.d.ts +0 -0
  249. /package/{functions/utils → internal}/theme.js +0 -0
@@ -1,363 +1,2 @@
1
1
  import { css } from 'lit';
2
- export const style = css `
3
- :host {
4
- display: inline-block;
5
- width: 100%;
6
- }
7
- :host([disabled]) {
8
- pointer-events: none;
9
- }
10
- :host([type='hidden']) {
11
- display: none;
12
- }
13
- .container {
14
- position: relative;
15
- display: flex;
16
- align-items: center;
17
- transition: box-shadow var(--mdui-motion-duration-short4)
18
- var(--mdui-motion-easing-standard);
19
- padding: 0rem 1rem;
20
- }
21
- .container.has-icon {
22
- padding-left: 0.75rem;
23
- }
24
- .container.has-end-icon,
25
- .container.has-error-icon {
26
- padding-right: 0.75rem;
27
- }
28
- :host([variant='filled']) .container {
29
- box-shadow: inset 0 -0.0625rem 0 0 rgb(var(--mdui-color-on-surface-variant));
30
- background-color: rgb(var(--mdui-color-surface-container-highest));
31
- border-radius: var(--mdui-shape-corner-extra-small)
32
- var(--mdui-shape-corner-extra-small) 0 0;
33
- }
34
- :host([variant='filled']) .container.invalid,
35
- :host([variant='filled']) .container.invalid-style {
36
- box-shadow: inset 0 -0.0625rem 0 0 rgb(var(--mdui-color-error));
37
- }
38
- :host([variant='filled']:hover) .container {
39
- box-shadow: inset 0 -0.0625rem 0 0 rgb(var(--mdui-color-on-surface));
40
- }
41
- :host([variant='filled']:hover) .container.invalid,
42
- :host([variant='filled']:hover) .container.invalid-style {
43
- box-shadow: inset 0 -0.0625rem 0 0 rgb(var(--mdui-color-on-error-container));
44
- }
45
- :host([variant='filled'][focused]) .container,
46
- :host([variant='filled'][focused-style]) .container {
47
- box-shadow: inset 0 -0.125rem 0 0 rgb(var(--mdui-color-primary));
48
- }
49
- :host([variant='filled'][focused]) .container.invalid,
50
- :host([variant='filled'][focused-style]) .container.invalid,
51
- :host([variant='filled'][focused]) .container.invalid-style,
52
- :host([variant='filled'][focused-style]) .container.invalid-style {
53
- box-shadow: inset 0 -0.125rem 0 0 rgb(var(--mdui-color-error));
54
- }
55
- :host([variant='filled'][disabled]) .container {
56
- box-shadow: inset 0 -0.0625rem 0 0 rgba(var(--mdui-color-on-surface), 38%);
57
- background-color: rgba(var(--mdui-color-on-surface), 4%);
58
- }
59
- :host([variant='outlined']) .container {
60
- box-shadow: inset 0 0 0 0.0625rem rgb(var(--mdui-color-outline));
61
- border-radius: var(--mdui-shape-corner-extra-small);
62
- }
63
- :host([variant='outlined']) .container.invalid,
64
- :host([variant='outlined']) .container.invalid-style {
65
- box-shadow: inset 0 0 0 0.0625rem rgb(var(--mdui-color-error));
66
- }
67
- :host([variant='outlined']:hover) .container {
68
- box-shadow: inset 0 0 0 0.0625rem rgb(var(--mdui-color-on-surface));
69
- }
70
- :host([variant='outlined']:hover) .container.invalid,
71
- :host([variant='outlined']:hover) .container.invalid-style {
72
- box-shadow: inset 0 0 0 0.0625rem rgb(var(--mdui-color-on-error-container));
73
- }
74
- :host([variant='outlined'][focused]) .container,
75
- :host([variant='outlined'][focused-style]) .container {
76
- box-shadow: inset 0 0 0 0.125rem rgb(var(--mdui-color-primary));
77
- }
78
- :host([variant='outlined'][focused]) .container.invalid,
79
- :host([variant='outlined'][focused-style]) .container.invalid,
80
- :host([variant='outlined'][focused]) .container.invalid-style,
81
- :host([variant='outlined'][focused-style]) .container.invalid-style {
82
- box-shadow: inset 0 0 0 0.125rem rgb(var(--mdui-color-error));
83
- }
84
- :host([variant='outlined'][disabled]) .container {
85
- box-shadow: inset 0 0 0 0.125rem rgba(var(--mdui-color-on-surface), 12%);
86
- }
87
- .icon,
88
- .right-icon,
89
- .prefix,
90
- .suffix {
91
- display: flex;
92
- -webkit-user-select: none;
93
- user-select: none;
94
- color: rgb(var(--mdui-color-on-surface-variant));
95
- }
96
- :host([disabled]) .icon,
97
- :host([disabled]) .right-icon,
98
- :host([disabled]) .prefix,
99
- :host([disabled]) .suffix {
100
- color: rgba(var(--mdui-color-on-surface), 38%);
101
- }
102
- .invalid .right-icon,
103
- .invalid .suffix,
104
- .invalid-style .right-icon,
105
- .invalid-style .suffix {
106
- color: rgb(var(--mdui-color-error));
107
- }
108
- :host(:hover) .invalid .right-icon,
109
- :host(:hover) .invalid .suffix,
110
- :host(:hover) .invalid-style .right-icon,
111
- :host(:hover) .invalid-style .suffix {
112
- color: rgb(var(--mdui-color-on-error-container));
113
- }
114
- :host([focused]) .invalid .right-icon,
115
- :host([focused]) .invalid .suffix,
116
- :host([focused-style]) .invalid .right-icon,
117
- :host([focused-style]) .invalid .suffix,
118
- :host([focused]) .invalid-style .right-icon,
119
- :host([focused]) .invalid-style .suffix,
120
- :host([focused-style]) .invalid-style .right-icon,
121
- :host([focused-style]) .invalid-style .suffix {
122
- color: rgb(var(--mdui-color-error));
123
- }
124
- .icon,
125
- .right-icon {
126
- font-size: 1.5rem;
127
- }
128
- .icon mdui-button-icon,
129
- .right-icon mdui-button-icon,
130
- ::slotted(mdui-button-icon[slot]) {
131
- margin-left: -0.5rem;
132
- margin-right: -0.5rem;
133
- }
134
- .icon .i,
135
- .right-icon .i,
136
- ::slotted([slot$='icon']) {
137
- font-size: inherit;
138
- }
139
- .has-icon .icon {
140
- margin-right: 1rem;
141
- }
142
- .right-icon:not(.end-icon),
143
- .has-end-icon .end-icon {
144
- margin-left: 1rem;
145
- }
146
- .prefix,
147
- .suffix {
148
- display: none;
149
- font-size: var(--mdui-typescale-body-large-size);
150
- font-weight: var(--mdui-typescale-body-large-weight);
151
- letter-spacing: var(--mdui-typescale-body-large-tracking);
152
- line-height: var(--mdui-typescale-body-large-line-height);
153
- }
154
- :host([variant='filled'][label]) .prefix,
155
- :host([variant='filled'][label]) .suffix {
156
- padding-top: 1rem;
157
- }
158
- :host([focused]) .prefix,
159
- :host([focused]) .suffix,
160
- :host([focused-style]) .prefix,
161
- :host([focused-style]) .suffix,
162
- .has-value .prefix,
163
- .has-value .suffix {
164
- display: flex;
165
- }
166
- .prefix {
167
- padding-right: 0.125rem;
168
- }
169
- .suffix {
170
- padding-left: 0.125rem;
171
- }
172
- .input-container {
173
- width: 100%;
174
- }
175
- .label {
176
- position: absolute;
177
- pointer-events: none;
178
- max-width: calc(100% - 1rem);
179
- display: -webkit-box;
180
- overflow: hidden;
181
- -webkit-box-orient: vertical;
182
- -webkit-line-clamp: 1;
183
- top: 1rem;
184
- color: rgb(var(--mdui-color-on-surface-variant));
185
- font-size: var(--mdui-typescale-body-large-size);
186
- font-weight: var(--mdui-typescale-body-large-weight);
187
- letter-spacing: var(--mdui-typescale-body-large-tracking);
188
- line-height: var(--mdui-typescale-body-large-line-height);
189
- }
190
- .invalid .label,
191
- .invalid-style .label {
192
- color: rgb(var(--mdui-color-error));
193
- }
194
- :host([variant='outlined']) .label {
195
- padding: 0rem 0.25rem;
196
- margin: 0rem -0.25rem;
197
- }
198
- :host([variant='outlined']:hover) .label {
199
- color: rgb(var(--mdui-color-on-surface));
200
- }
201
- :host([variant='filled']:hover) .invalid .label,
202
- :host([variant='outlined']:hover) .invalid .label,
203
- :host([variant='filled']:hover) .invalid-style .label,
204
- :host([variant='outlined']:hover) .invalid-style .label {
205
- color: rgb(var(--mdui-color-on-error-container));
206
- }
207
- :host([variant='filled'][focused]) .label,
208
- :host([variant='filled'][focused-style]) .label,
209
- :host([variant='outlined'][focused]) .label,
210
- :host([variant='outlined'][focused-style]) .label {
211
- color: rgb(var(--mdui-color-primary));
212
- }
213
- :host([variant='filled'][focused]) .label,
214
- :host([variant='filled'][focused-style]) .label,
215
- :host([variant='filled']) .has-value .label,
216
- :host([variant='filled'][type='date']) .label,
217
- :host([variant='filled'][type='datetime-local']) .label,
218
- :host([variant='filled'][type='month']) .label,
219
- :host([variant='filled'][type='time']) .label,
220
- :host([variant='filled'][type='week']) .label {
221
- font-size: var(--mdui-typescale-body-small-size);
222
- font-weight: var(--mdui-typescale-body-small-weight);
223
- letter-spacing: var(--mdui-typescale-body-small-tracking);
224
- line-height: var(--mdui-typescale-body-small-line-height);
225
- top: 0.25rem;
226
- }
227
- :host([variant='outlined'][focused]) .label,
228
- :host([variant='outlined'][focused-style]) .label,
229
- :host([variant='outlined']) .has-value .label,
230
- :host([variant='outlined'][type='date']) .label,
231
- :host([variant='outlined'][type='datetime-local']) .label,
232
- :host([variant='outlined'][type='month']) .label,
233
- :host([variant='outlined'][type='time']) .label,
234
- :host([variant='outlined'][type='week']) .label {
235
- font-size: var(--mdui-typescale-body-small-size);
236
- font-weight: var(--mdui-typescale-body-small-weight);
237
- letter-spacing: var(--mdui-typescale-body-small-tracking);
238
- line-height: var(--mdui-typescale-body-small-line-height);
239
- top: -0.5rem;
240
- left: 0.75rem;
241
- background-color: rgb(var(--mdui-color-background));
242
- }
243
- :host([variant='filled'][focused]) .invalid .label,
244
- :host([variant='filled'][focused-style]) .invalid .label,
245
- :host([variant='outlined'][focused]) .invalid .label,
246
- :host([variant='outlined'][focused-style]) .invalid .label,
247
- :host([variant='filled'][focused]) .invalid-style .label,
248
- :host([variant='filled'][focused-style]) .invalid-style .label,
249
- :host([variant='outlined'][focused]) .invalid-style .label,
250
- :host([variant='outlined'][focused-style]) .invalid-style .label {
251
- color: rgb(var(--mdui-color-error));
252
- }
253
- :host([variant='filled'][disabled]) .label,
254
- :host([variant='outlined'][disabled]) .label {
255
- color: rgba(var(--mdui-color-on-surface), 38%);
256
- }
257
- .input {
258
- display: flex;
259
- flex-wrap: wrap;
260
- width: 100%;
261
- border: none;
262
- outline: none;
263
- background: none;
264
- -webkit-appearance: none;
265
- appearance: none;
266
- resize: none;
267
- cursor: inherit;
268
- font-family: inherit;
269
- padding: 1rem 0rem;
270
- font-size: var(--mdui-typescale-body-large-size);
271
- font-weight: var(--mdui-typescale-body-large-weight);
272
- letter-spacing: var(--mdui-typescale-body-large-tracking);
273
- line-height: var(--mdui-typescale-body-large-line-height);
274
- color: rgb(var(--mdui-color-on-surface));
275
- caret-color: rgb(var(--mdui-color-primary));
276
- }
277
- .input.hide-input {
278
- opacity: 0;
279
- height: 0;
280
- padding: 0 !important;
281
- overflow: hidden;
282
- }
283
- .input::placeholder {
284
- color: rgb(var(--mdui-color-on-surface-variant));
285
- }
286
- .invalid .input,
287
- .invalid-style .input {
288
- caret-color: rgb(var(--mdui-color-error));
289
- }
290
- :host([disabled]) .input {
291
- color: rgba(var(--mdui-color-on-surface), 38%);
292
- }
293
- :host([end-aligned]) .input {
294
- text-align: right;
295
- }
296
- :host([variant='filled']) .label + .input {
297
- padding: 1.5rem 0rem 0.5rem 0rem;
298
- }
299
- .supporting {
300
- display: flex;
301
- justify-content: space-between;
302
- padding: 0.25rem 1rem;
303
- color: rgb(var(--mdui-color-on-surface-variant));
304
- }
305
- .supporting.invalid,
306
- .supporting.invalid-style {
307
- color: rgb(var(--mdui-color-error));
308
- }
309
- .helper {
310
- display: block;
311
- opacity: 1;
312
- transition: opacity var(--mdui-motion-duration-short4)
313
- var(--mdui-motion-easing-linear);
314
- font-size: var(--mdui-typescale-body-small-size);
315
- font-weight: var(--mdui-typescale-body-small-weight);
316
- letter-spacing: var(--mdui-typescale-body-small-tracking);
317
- line-height: var(--mdui-typescale-body-small-line-height);
318
- }
319
- :host([disabled]) .helper {
320
- color: rgba(var(--mdui-color-on-surface), 38%);
321
- }
322
- :host([helper-on-focus]) .helper {
323
- opacity: 0;
324
- }
325
- :host([helper-on-focus][focused]) .helper,
326
- :host([helper-on-focus][focused-style]) .helper {
327
- opacity: 1;
328
- }
329
- .error {
330
- font-size: var(--mdui-typescale-body-small-size);
331
- font-weight: var(--mdui-typescale-body-small-weight);
332
- letter-spacing: var(--mdui-typescale-body-small-tracking);
333
- line-height: var(--mdui-typescale-body-small-line-height);
334
- }
335
- .counter {
336
- flex-wrap: nowrap;
337
- padding-left: 1rem;
338
- font-size: var(--mdui-typescale-body-small-size);
339
- font-weight: var(--mdui-typescale-body-small-weight);
340
- letter-spacing: var(--mdui-typescale-body-small-tracking);
341
- line-height: var(--mdui-typescale-body-small-line-height);
342
- }
343
- ::-ms-reveal {
344
- display: none;
345
- }
346
- .is-firefox .input[type='date'],
347
- .is-firefox .input[type='datetime-local'],
348
- .is-firefox .input[type='time'] {
349
- -webkit-clip-path: inset(0 2em 0 0);
350
- clip-path: inset(0 2em 0 0);
351
- }
352
- .input[type='number']::-webkit-outer-spin-button,
353
- .input[type='number']::-webkit-inner-spin-button {
354
- -webkit-appearance: none;
355
- display: none;
356
- }
357
- .input[type='number'] {
358
- -moz-appearance: textfield;
359
- }
360
- .input[type='search']::-webkit-search-cancel-button {
361
- -webkit-appearance: none;
362
- }
363
- `;
2
+ export const style = css `:host{display:inline-block;width:100%}:host([disabled]){pointer-events:none}:host([type=hidden]){display:none}.container{position:relative;display:flex;align-items:center;transition:box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-standard);padding:0 1rem}.container.has-icon{padding-left:.75rem}.container.has-end-icon,.container.has-error-icon{padding-right:.75rem}:host([variant=filled]) .container{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-surface-variant));background-color:rgb(var(--mdui-color-surface-container-highest));border-radius:var(--mdui-shape-corner-extra-small) var(--mdui-shape-corner-extra-small) 0 0}:host([variant=filled]) .container.invalid,:host([variant=filled]) .container.invalid-style{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-error))}:host([variant=filled]:hover) .container{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-surface))}:host([variant=filled]:hover) .container.invalid,:host([variant=filled]:hover) .container.invalid-style{box-shadow:inset 0 -.0625rem 0 0 rgb(var(--mdui-color-on-error-container))}:host([variant=filled][focused-style]) .container,:host([variant=filled][focused]) .container{box-shadow:inset 0 -.125rem 0 0 rgb(var(--mdui-color-primary))}:host([variant=filled][focused-style]) .container.invalid,:host([variant=filled][focused-style]) .container.invalid-style,:host([variant=filled][focused]) .container.invalid,:host([variant=filled][focused]) .container.invalid-style{box-shadow:inset 0 -.125rem 0 0 rgb(var(--mdui-color-error))}:host([variant=filled][disabled]) .container{box-shadow:inset 0 -.0625rem 0 0 rgba(var(--mdui-color-on-surface),38%);background-color:rgba(var(--mdui-color-on-surface),4%)}:host([variant=outlined]) .container{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-outline));border-radius:var(--mdui-shape-corner-extra-small)}:host([variant=outlined]) .container.invalid,:host([variant=outlined]) .container.invalid-style{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-error))}:host([variant=outlined]:hover) .container{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-on-surface))}:host([variant=outlined]:hover) .container.invalid,:host([variant=outlined]:hover) .container.invalid-style{box-shadow:inset 0 0 0 .0625rem rgb(var(--mdui-color-on-error-container))}:host([variant=outlined][focused-style]) .container,:host([variant=outlined][focused]) .container{box-shadow:inset 0 0 0 .125rem rgb(var(--mdui-color-primary))}:host([variant=outlined][focused-style]) .container.invalid,:host([variant=outlined][focused-style]) .container.invalid-style,:host([variant=outlined][focused]) .container.invalid,:host([variant=outlined][focused]) .container.invalid-style{box-shadow:inset 0 0 0 .125rem rgb(var(--mdui-color-error))}:host([variant=outlined][disabled]) .container{box-shadow:inset 0 0 0 .125rem rgba(var(--mdui-color-on-surface),12%)}.icon,.prefix,.right-icon,.suffix{display:flex;-webkit-user-select:none;user-select:none;color:rgb(var(--mdui-color-on-surface-variant))}:host([disabled]) .icon,:host([disabled]) .prefix,:host([disabled]) .right-icon,:host([disabled]) .suffix{color:rgba(var(--mdui-color-on-surface),38%)}.invalid .right-icon,.invalid .suffix,.invalid-style .right-icon,.invalid-style .suffix{color:rgb(var(--mdui-color-error))}:host(:hover) .invalid .right-icon,:host(:hover) .invalid .suffix,:host(:hover) .invalid-style .right-icon,:host(:hover) .invalid-style .suffix{color:rgb(var(--mdui-color-on-error-container))}:host([focused-style]) .invalid .right-icon,:host([focused-style]) .invalid .suffix,:host([focused-style]) .invalid-style .right-icon,:host([focused-style]) .invalid-style .suffix,:host([focused]) .invalid .right-icon,:host([focused]) .invalid .suffix,:host([focused]) .invalid-style .right-icon,:host([focused]) .invalid-style .suffix{color:rgb(var(--mdui-color-error))}.icon,.right-icon{font-size:1.5rem}.icon mdui-button-icon,.right-icon mdui-button-icon,::slotted(mdui-button-icon[slot]){margin-left:-.5rem;margin-right:-.5rem}.icon .i,.right-icon .i,::slotted([slot$=icon]){font-size:inherit}.has-icon .icon{margin-right:1rem}.has-end-icon .end-icon,.right-icon:not(.end-icon){margin-left:1rem}.prefix,.suffix{display:none;font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}:host([variant=filled][label]) .prefix,:host([variant=filled][label]) .suffix{padding-top:1rem}.has-value .prefix,.has-value .suffix,:host([focused-style]) .prefix,:host([focused-style]) .suffix,:host([focused]) .prefix,:host([focused]) .suffix{display:flex}.prefix{padding-right:.125rem}.suffix{padding-left:.125rem}.input-container{width:100%}.label{position:absolute;pointer-events:none;max-width:calc(100% - 1rem);display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1;top:1rem;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height)}.invalid .label,.invalid-style .label{color:rgb(var(--mdui-color-error))}:host([variant=outlined]) .label{padding:0 .25rem;margin:0 -.25rem}:host([variant=outlined]:hover) .label{color:rgb(var(--mdui-color-on-surface))}:host([variant=filled]:hover) .invalid .label,:host([variant=filled]:hover) .invalid-style .label,:host([variant=outlined]:hover) .invalid .label,:host([variant=outlined]:hover) .invalid-style .label{color:rgb(var(--mdui-color-on-error-container))}:host([variant=filled][focused-style]) .label,:host([variant=filled][focused]) .label,:host([variant=outlined][focused-style]) .label,:host([variant=outlined][focused]) .label{color:rgb(var(--mdui-color-primary))}:host([variant=filled]) .has-value .label,:host([variant=filled][focused-style]) .label,:host([variant=filled][focused]) .label,:host([variant=filled][type=date]) .label,:host([variant=filled][type=datetime-local]) .label,:host([variant=filled][type=month]) .label,:host([variant=filled][type=time]) .label,:host([variant=filled][type=week]) .label{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height);top:.25rem}:host([variant=outlined]) .has-value .label,:host([variant=outlined][focused-style]) .label,:host([variant=outlined][focused]) .label,:host([variant=outlined][type=date]) .label,:host([variant=outlined][type=datetime-local]) .label,:host([variant=outlined][type=month]) .label,:host([variant=outlined][type=time]) .label,:host([variant=outlined][type=week]) .label{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height);top:-.5rem;left:.75rem;background-color:rgb(var(--mdui-color-background))}:host([variant=filled][focused-style]) .invalid .label,:host([variant=filled][focused-style]) .invalid-style .label,:host([variant=filled][focused]) .invalid .label,:host([variant=filled][focused]) .invalid-style .label,:host([variant=outlined][focused-style]) .invalid .label,:host([variant=outlined][focused-style]) .invalid-style .label,:host([variant=outlined][focused]) .invalid .label,:host([variant=outlined][focused]) .invalid-style .label{color:rgb(var(--mdui-color-error))}:host([variant=filled][disabled]) .label,:host([variant=outlined][disabled]) .label{color:rgba(var(--mdui-color-on-surface),38%)}.input{display:flex;flex-wrap:wrap;width:100%;border:none;outline:0;background:0 0;-webkit-appearance:none;appearance:none;resize:none;cursor:inherit;font-family:inherit;padding:1rem 0;font-size:var(--mdui-typescale-body-large-size);font-weight:var(--mdui-typescale-body-large-weight);letter-spacing:var(--mdui-typescale-body-large-tracking);line-height:var(--mdui-typescale-body-large-line-height);color:rgb(var(--mdui-color-on-surface));caret-color:rgb(var(--mdui-color-primary))}.input.hide-input{opacity:0;height:0;padding:0!important;overflow:hidden}.input::placeholder{color:rgb(var(--mdui-color-on-surface-variant))}.invalid .input,.invalid-style .input{caret-color:rgb(var(--mdui-color-error))}:host([disabled]) .input{color:rgba(var(--mdui-color-on-surface),38%)}:host([end-aligned]) .input{text-align:right}:host([variant=filled]) .label+.input{padding:1.5rem 0 .5rem 0}.supporting{display:flex;justify-content:space-between;padding:.25rem 1rem;color:rgb(var(--mdui-color-on-surface-variant))}.supporting.invalid,.supporting.invalid-style{color:rgb(var(--mdui-color-error))}.helper{display:block;opacity:1;transition:opacity var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}:host([disabled]) .helper{color:rgba(var(--mdui-color-on-surface),38%)}:host([helper-on-focus]) .helper{opacity:0}:host([helper-on-focus][focused-style]) .helper,:host([helper-on-focus][focused]) .helper{opacity:1}.error{font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}.counter{flex-wrap:nowrap;padding-left:1rem;font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}::-ms-reveal{display:none}.is-firefox .input[type=date],.is-firefox .input[type=datetime-local],.is-firefox .input[type=time]{-webkit-clip-path:inset(0 2em 0 0);clip-path:inset(0 2em 0 0)}.input[type=number]::-webkit-inner-spin-button,.input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;display:none}.input[type=number]{-moz-appearance:textfield}.input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}`;
@@ -215,16 +215,7 @@ let Tooltip = class Tooltip extends MduiElement {
215
215
  const hasHeadline = this.isRich() &&
216
216
  (this.headline || this.hasSlotController.test('headline'));
217
217
  const hasAction = this.isRich() && this.hasSlotController.test('action');
218
- return html `<slot></slot>
219
- <div ${ref(this.popupRef)} part="popup" class="popup" hidden>
220
- ${when(hasHeadline, () => html `<slot name="headline" part="headline" class="headline">
221
- ${this.headline}
222
- </slot>`)}
223
- <slot name="content" part="content" class="content">
224
- ${this.content}
225
- </slot>
226
- ${when(hasAction, () => html `<slot name="action" part="action" class="action"></slot>`)}
227
- </div>`;
218
+ return html `<slot></slot><div ${ref(this.popupRef)} part="popup" class="popup" hidden>${when(hasHeadline, () => html `<slot name="headline" part="headline" class="headline">${this.headline}</slot>`)}<slot name="content" part="content" class="content">${this.content}</slot>${when(hasAction, () => html `<slot name="action" part="action" class="action"></slot>`)}</div>`;
228
219
  }
229
220
  isRich() {
230
221
  return this.variant === 'rich';
@@ -1,58 +1,2 @@
1
1
  import { css } from 'lit';
2
- export const style = css `
3
- :host {
4
- --shape-corner-plain: var(--mdui-shape-corner-extra-small);
5
- --shape-corner-rich: var(--mdui-shape-corner-medium);
6
- --z-index: 2500;
7
- display: contents;
8
- }
9
- .popup {
10
- position: fixed;
11
- display: flex;
12
- flex-direction: column;
13
- z-index: var(--z-index);
14
- border-radius: var(--shape-corner-plain);
15
- background-color: rgb(var(--mdui-color-inverse-surface));
16
- padding: 0rem 0.5rem;
17
- min-width: 1.75rem;
18
- max-width: 20rem;
19
- }
20
- :host([variant='rich']) .popup {
21
- border-radius: var(--shape-corner-rich);
22
- background-color: rgb(var(--mdui-color-surface-container));
23
- box-shadow: var(--mdui-elevation-level2);
24
- padding: 0.75rem 1rem 0.5rem 1rem;
25
- }
26
- .headline {
27
- display: flex;
28
- color: rgb(var(--mdui-color-on-surface-variant));
29
- font-size: var(--mdui-typescale-title-small-size);
30
- font-weight: var(--mdui-typescale-title-small-weight);
31
- letter-spacing: var(--mdui-typescale-title-small-tracking);
32
- line-height: var(--mdui-typescale-title-small-line-height);
33
- }
34
- .content {
35
- display: flex;
36
- padding: 0.25rem 0rem;
37
- color: rgb(var(--mdui-color-inverse-on-surface));
38
- font-size: var(--mdui-typescale-body-small-size);
39
- font-weight: var(--mdui-typescale-body-small-weight);
40
- letter-spacing: var(--mdui-typescale-body-small-tracking);
41
- line-height: var(--mdui-typescale-body-small-line-height);
42
- }
43
- :host([variant='rich']) .content {
44
- color: rgb(var(--mdui-color-on-surface-variant));
45
- font-size: var(--mdui-typescale-body-medium-size);
46
- font-weight: var(--mdui-typescale-body-medium-weight);
47
- letter-spacing: var(--mdui-typescale-body-medium-tracking);
48
- line-height: var(--mdui-typescale-body-medium-line-height);
49
- }
50
- .action {
51
- display: flex;
52
- justify-content: flex-start;
53
- padding-top: 0.5rem;
54
- }
55
- .action ::slotted(:not(:last-child)) {
56
- margin-right: 0.5rem;
57
- }
58
- `;
2
+ export const style = css `:host{--shape-corner-plain:var(--mdui-shape-corner-extra-small);--shape-corner-rich:var(--mdui-shape-corner-medium);--z-index:2500;display:contents}.popup{position:fixed;display:flex;flex-direction:column;z-index:var(--z-index);border-radius:var(--shape-corner-plain);background-color:rgb(var(--mdui-color-inverse-surface));padding:0 .5rem;min-width:1.75rem;max-width:20rem}:host([variant=rich]) .popup{border-radius:var(--shape-corner-rich);background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2);padding:.75rem 1rem .5rem 1rem}.headline{display:flex;color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-title-small-size);font-weight:var(--mdui-typescale-title-small-weight);letter-spacing:var(--mdui-typescale-title-small-tracking);line-height:var(--mdui-typescale-title-small-line-height)}.content{display:flex;padding:.25rem 0;color:rgb(var(--mdui-color-inverse-on-surface));font-size:var(--mdui-typescale-body-small-size);font-weight:var(--mdui-typescale-body-small-weight);letter-spacing:var(--mdui-typescale-body-small-tracking);line-height:var(--mdui-typescale-body-small-line-height)}:host([variant=rich]) .content{color:rgb(var(--mdui-color-on-surface-variant));font-size:var(--mdui-typescale-body-medium-size);font-weight:var(--mdui-typescale-body-medium-weight);letter-spacing:var(--mdui-typescale-body-medium-tracking);line-height:var(--mdui-typescale-body-medium-line-height)}.action{display:flex;justify-content:flex-start;padding-top:.5rem}.action ::slotted(:not(:last-child)){margin-right:.5rem}`;
@@ -1,79 +1,2 @@
1
1
  import { css } from 'lit';
2
- export const topAppBarStyle = css `
3
- :host {
4
- --shape-corner: var(--mdui-shape-corner-none);
5
- --z-index: 2000;
6
- position: fixed;
7
- top: 0;
8
- right: 0;
9
- left: 0;
10
- display: flex;
11
- flex: 0 0 auto;
12
- align-items: flex-start;
13
- justify-content: flex-start;
14
- border-bottom-left-radius: var(--shape-corner);
15
- border-bottom-right-radius: var(--shape-corner);
16
- z-index: var(--z-index);
17
- transition:
18
- top var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),
19
- height var(--mdui-motion-duration-long2)
20
- var(--mdui-motion-easing-standard),
21
- box-shadow var(--mdui-motion-duration-short4)
22
- var(--mdui-motion-easing-linear),
23
- background-color var(--mdui-motion-duration-short4)
24
- var(--mdui-motion-easing-linear);
25
- padding: 0.75rem 0.5rem;
26
- height: 4rem;
27
- background-color: rgb(var(--mdui-color-surface));
28
- }
29
- :host([scroll-target]:not([scroll-target=''])) {
30
- position: absolute;
31
- }
32
- :host([scroll-behavior~='shrink']) {
33
- transition-duration: var(--mdui-motion-duration-short4);
34
- }
35
- :host([scrolling]) {
36
- background-color: rgb(var(--mdui-color-surface-container));
37
- box-shadow: var(--mdui-elevation-level2);
38
- }
39
- ::slotted(mdui-button-icon) {
40
- color: rgb(var(--mdui-color-on-surface-variant));
41
- font-size: 1.5rem;
42
- }
43
- ::slotted(mdui-button-icon:first-child) {
44
- color: rgb(var(--mdui-color-on-surface));
45
- }
46
- ::slotted(mdui-avatar) {
47
- width: 1.875rem;
48
- height: 1.875rem;
49
- margin-top: 0.3125rem;
50
- margin-bottom: 0.3125rem;
51
- }
52
- ::slotted(*) {
53
- flex-shrink: 0;
54
- }
55
- ::slotted(:not(:last-child)) {
56
- margin-right: 0.5rem;
57
- }
58
- :host([variant='medium']) {
59
- height: 7rem;
60
- }
61
- :host([variant='large']) {
62
- height: 9.5rem;
63
- }
64
- :host([hide]) {
65
- transition-duration: var(--mdui-motion-duration-short4);
66
- top: -4.625rem;
67
- }
68
- :host([hide][variant='medium']) {
69
- top: -7.625rem;
70
- }
71
- :host([hide][variant='large']) {
72
- top: -10.125rem;
73
- }
74
- :host([shrink][variant='medium']),
75
- :host([shrink][variant='large']) {
76
- transition-duration: var(--mdui-motion-duration-short4);
77
- height: 4rem;
78
- }
79
- `;
2
+ export const topAppBarStyle = css `:host{--shape-corner:var(--mdui-shape-corner-none);--z-index:2000;position:fixed;top:0;right:0;left:0;display:flex;flex:0 0 auto;align-items:flex-start;justify-content:flex-start;border-bottom-left-radius:var(--shape-corner);border-bottom-right-radius:var(--shape-corner);z-index:var(--z-index);transition:top var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),height var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard),box-shadow var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear),background-color var(--mdui-motion-duration-short4) var(--mdui-motion-easing-linear);padding:.75rem .5rem;height:4rem;background-color:rgb(var(--mdui-color-surface))}:host([scroll-target]:not([scroll-target=''])){position:absolute}:host([scroll-behavior~=shrink]){transition-duration:var(--mdui-motion-duration-short4)}:host([scrolling]){background-color:rgb(var(--mdui-color-surface-container));box-shadow:var(--mdui-elevation-level2)}::slotted(mdui-button-icon){color:rgb(var(--mdui-color-on-surface-variant));font-size:1.5rem}::slotted(mdui-button-icon:first-child){color:rgb(var(--mdui-color-on-surface))}::slotted(mdui-avatar){width:1.875rem;height:1.875rem;margin-top:.3125rem;margin-bottom:.3125rem}::slotted(*){flex-shrink:0}::slotted(:not(:last-child)){margin-right:.5rem}:host([variant=medium]){height:7rem}:host([variant=large]){height:9.5rem}:host([hide]){transition-duration:var(--mdui-motion-duration-short4);top:-4.625rem}:host([hide][variant=medium]){top:-7.625rem}:host([hide][variant=large]){top:-10.125rem}:host([shrink][variant=large]),:host([shrink][variant=medium]){transition-duration:var(--mdui-motion-duration-short4);height:4rem}`;
@@ -1,82 +1,2 @@
1
1
  import { css } from 'lit';
2
- export const topAppBarTitleStyle = css `
3
- :host {
4
- display: block;
5
- width: 100%;
6
- flex-shrink: initial !important;
7
- overflow: hidden;
8
- color: rgb(var(--mdui-color-on-surface));
9
- font-size: var(--mdui-typescale-title-large-size);
10
- font-weight: var(--mdui-typescale-title-large-weight);
11
- letter-spacing: var(--mdui-typescale-title-large-tracking);
12
- line-height: var(--mdui-typescale-title-large-line-height);
13
- line-height: 2.5rem;
14
- }
15
- .label {
16
- display: block;
17
- overflow: hidden;
18
- text-overflow: ellipsis;
19
- white-space: nowrap;
20
- opacity: 1;
21
- transition: opacity var(--mdui-motion-duration-short2)
22
- var(--mdui-motion-easing-linear);
23
- }
24
- .label.variant-center-aligned {
25
- text-align: center;
26
- }
27
- .label.variant-medium:not(.shrink),
28
- .label.variant-large:not(.shrink) {
29
- opacity: 0;
30
- }
31
- .label.variant-medium.shrink,
32
- .label.variant-large.shrink {
33
- transition-delay: var(--mdui-motion-duration-short2);
34
- }
35
- .label-large {
36
- display: none;
37
- position: absolute;
38
- width: 100%;
39
- left: 0;
40
- margin-right: 0;
41
- padding: 0rem 1rem;
42
- transition: opacity var(--mdui-motion-duration-short2)
43
- var(--mdui-motion-easing-linear);
44
- }
45
- .label-large.variant-medium,
46
- .label-large.variant-large {
47
- display: block;
48
- }
49
- .label-large.variant-medium {
50
- overflow: hidden;
51
- text-overflow: ellipsis;
52
- white-space: nowrap;
53
- bottom: 0.75rem;
54
- font-size: var(--mdui-typescale-headline-small-size);
55
- font-weight: var(--mdui-typescale-headline-small-weight);
56
- letter-spacing: var(--mdui-typescale-headline-small-tracking);
57
- line-height: var(--mdui-typescale-headline-small-line-height);
58
- }
59
- .label-large.variant-large {
60
- display: -webkit-box;
61
- /* stylelint-disable-line value-no-vendor-prefix */
62
- overflow: hidden;
63
- white-space: normal;
64
- -webkit-box-orient: vertical;
65
- -webkit-line-clamp: 2;
66
- bottom: 1.25rem;
67
- font-size: var(--mdui-typescale-headline-medium-size);
68
- font-weight: var(--mdui-typescale-headline-medium-weight);
69
- letter-spacing: var(--mdui-typescale-headline-medium-tracking);
70
- line-height: var(--mdui-typescale-headline-medium-line-height);
71
- }
72
- .label-large.variant-medium:not(.shrink),
73
- .label-large.variant-large:not(.shrink) {
74
- opacity: 1;
75
- transition-delay: var(--mdui-motion-duration-short2);
76
- }
77
- .label-large.variant-medium.shrink,
78
- .label-large.variant-large.shrink {
79
- opacity: 0;
80
- z-index: -1;
81
- }
82
- `;
2
+ export const topAppBarTitleStyle = css `:host{display:block;width:100%;flex-shrink:initial!important;overflow:hidden;color:rgb(var(--mdui-color-on-surface));font-size:var(--mdui-typescale-title-large-size);font-weight:var(--mdui-typescale-title-large-weight);letter-spacing:var(--mdui-typescale-title-large-tracking);line-height:var(--mdui-typescale-title-large-line-height);line-height:2.5rem}.label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:1;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label.variant-center-aligned{text-align:center}.label.variant-large:not(.shrink),.label.variant-medium:not(.shrink){opacity:0}.label.variant-large.shrink,.label.variant-medium.shrink{transition-delay:var(--mdui-motion-duration-short2)}.label-large{display:none;position:absolute;width:100%;left:0;margin-right:0;padding:0 1rem;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear)}.label-large.variant-large,.label-large.variant-medium{display:block}.label-large.variant-medium{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;bottom:.75rem;font-size:var(--mdui-typescale-headline-small-size);font-weight:var(--mdui-typescale-headline-small-weight);letter-spacing:var(--mdui-typescale-headline-small-tracking);line-height:var(--mdui-typescale-headline-small-line-height)}.label-large.variant-large{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;bottom:1.25rem;font-size:var(--mdui-typescale-headline-medium-size);font-weight:var(--mdui-typescale-headline-medium-weight);letter-spacing:var(--mdui-typescale-headline-medium-tracking);line-height:var(--mdui-typescale-headline-medium-line-height)}.label-large.variant-large:not(.shrink),.label-large.variant-medium:not(.shrink){opacity:1;transition-delay:var(--mdui-motion-duration-short2)}.label-large.variant-large.shrink,.label-large.variant-medium.shrink{opacity:0;z-index:-1}`;
@@ -50,23 +50,9 @@ let TopAppBarTitle = class TopAppBarTitle extends MduiElement {
50
50
  'variant-medium': this.variant === 'medium',
51
51
  'variant-large': this.variant === 'large',
52
52
  });
53
- return html `<slot
54
- part="label"
55
- class="label ${className}"
56
- ${ref(this.defaultSlotRef)}
57
- @slotchange="${() => this.onSlotChange(hasLabelLargeSlot)}"
58
- ></slot>
59
- ${hasLabelLargeSlot
60
- ? html `<slot
61
- name="label-large"
62
- part="label-large"
63
- class="label-large ${className}"
64
- ></slot>`
65
- : html `<div
66
- ${ref(this.labelLargeRef)}
67
- part="label-large"
68
- class="label-large ${className}"
69
- ></div>`}`;
53
+ return html `<slot part="label" class="label ${className}" ${ref(this.defaultSlotRef)} @slotchange="${() => this.onSlotChange(hasLabelLargeSlot)}"></slot>${hasLabelLargeSlot
54
+ ? html `<slot name="label-large" part="label-large" class="label-large ${className}"></slot>`
55
+ : html `<div ${ref(this.labelLargeRef)} part="label-large" class="label-large ${className}"></div>`}`;
70
56
  }
71
57
  /**
72
58
  * default slot 变化时,同步到 label-large 中