@universal-material/web 3.6.21 → 3.6.23

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 (37) hide show
  1. package/dist/css/universal-material.css +4109 -0
  2. package/dist/css/universal-material.min.css +4109 -0
  3. package/dist/custom-elements.json +25060 -0
  4. package/dist/package.json +17 -5
  5. package/dist/scss/_api.scss +2 -0
  6. package/dist/scss/_colors.scss +2 -0
  7. package/dist/scss/_css-vars.scss +53 -0
  8. package/dist/scss/_functions.scss +29 -0
  9. package/dist/scss/_global.scss +27 -0
  10. package/dist/scss/_layout.scss +5 -0
  11. package/dist/scss/_mixins.scss +3 -0
  12. package/dist/scss/_reboot.scss +498 -0
  13. package/dist/scss/_utilities.scss +4 -0
  14. package/dist/scss/_variables.scss +139 -0
  15. package/dist/scss/colors/_text-bg.scss +38 -0
  16. package/dist/scss/colors/_text.scss +52 -0
  17. package/dist/scss/functions/_font.scss +29 -0
  18. package/dist/scss/layout/_container.scss +14 -0
  19. package/dist/scss/layout/_grid.scss +12 -0
  20. package/dist/scss/layout/_margin-and-gutters.scss +37 -0
  21. package/dist/scss/mixins/_breakpoints.scss +71 -0
  22. package/dist/scss/mixins/_colors.scss +5 -0
  23. package/dist/scss/mixins/_text-bg.scss +34 -0
  24. package/dist/scss/mixins/_typo.scss +43 -0
  25. package/dist/scss/table/_table.scss +48 -0
  26. package/dist/scss/typo/_font.scss +5 -0
  27. package/dist/scss/typo/_typo.scss +19 -0
  28. package/dist/scss/typo/_variables.scss +19 -0
  29. package/dist/scss/universal-material.scss +16 -0
  30. package/dist/scss/utilities/_divider.scss +13 -0
  31. package/dist/scss/utilities/_scheme.scss +9 -0
  32. package/dist/scss/utilities/_spacing.scss +23 -0
  33. package/dist/scss/utilities/_text.scss +54 -0
  34. package/dist/vscode.html-custom-data.json +281 -281
  35. package/package.json +3 -3
  36. package/dist/config.js.map +0 -1
  37. package/dist/index.js.map +0 -1
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universal-material/web",
3
- "version": "3.6.20",
3
+ "version": "3.6.23",
4
4
  "description": "Material web components",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -13,11 +13,21 @@
13
13
  "typescript",
14
14
  "lit"
15
15
  ],
16
- "module": "./index.js",
17
- "typings": "./index.d.ts",
16
+ "main": "dist/index.js",
17
+ "module": "dist/esm/index.js",
18
+ "types": "dist/esm/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "import": "dist/esm/index.js",
22
+ "default": "dist/index.js"
23
+ }
24
+ },
25
+ "files": ["dist"],
18
26
  "scripts": {
19
- "build": "run-s clean script:sass-to-ts script:build sass analyze copy && node remove-scripts-from-package.js",
27
+ "build": "run-s clean script:sass-to-ts build:esm build:bundle sass analyze copy",
20
28
  "build:watch": "gulp -f gulpfile.js scripts:watch",
29
+ "build:esm": "esbuild src/index.ts --bundle --format=esm --minify --outfile=dist/index.js",
30
+ "build:bundle": "tsc",
21
31
  "script:build": "tsc",
22
32
  "script:sass-to-ts": "gulp -f gulpfile.js scripts:sass-to-ts",
23
33
  "script:sass-to-ts:watch": "gulp -f gulpfile.js scripts:sass-to-ts:watch",
@@ -40,7 +50,9 @@
40
50
  "analyze": "cem analyze --litelement --globs \"src/**/*.ts\" && node fix-html-custom-data-union-types.js",
41
51
  "analyze:watch": "cem analyze --litelement --globs \"src/**/*.ts\" --watch",
42
52
  "checksize": "rollup -c ; cat my-element.bundled.js | gzip -9 | wc -c ; rm my-element.bundled.js",
43
- "prettier": "prettier . --write"
53
+ "prettier": "prettier . --write",
54
+ "publish": "npm run lint:eslint && npm publish",
55
+ "postinstall": "node -e \"const fs=require('fs');fs.existsSync('./change-compiler-to-add-custom-elements.js')&&require('./change-compiler-to-add-custom-elements.js')\""
44
56
  },
45
57
  "author": "https://github.com/universal-material/universal-material/graphs/contributors",
46
58
  "repository": {
@@ -0,0 +1,2 @@
1
+ @forward "mixins";
2
+ @forward "functions";
@@ -0,0 +1,2 @@
1
+ @use "colors/text-bg";
2
+ @use "colors/text";
@@ -0,0 +1,53 @@
1
+ @use "sass:map";
2
+
3
+ @use "variables";
4
+ @use "functions";
5
+ @use "mixins";
6
+
7
+ :root {
8
+ --u-state-layer-color: currentColor;
9
+ --u-state-layer-hover-opacity: 8%;
10
+ --u-state-layer-focus-opacity: 12%;
11
+ --u-state-layer-pressed-opacity: 12%;
12
+ --u-state-layer-dragged-opacity: 16%;
13
+
14
+ --u-high-emphasis-opacity: 100%;
15
+ --u-low-emphasis-opacity: 75%;
16
+ --u-lower-emphasis-opacity: 50%;
17
+
18
+ --u-color-body: #{functions.get-color-var(surface)};
19
+ --u-color-on-body: #{functions.get-color-var(on-surface)};
20
+
21
+ --u-font-family: #{variables.$font-family};
22
+ --u-font-monospace: #{variables.$font-mono};
23
+ --u-text-opacity: var(--u-high-emphasis-opacity);
24
+ --u-layout-margin: var(--u-layout-margin-default);
25
+ --u-layout-gutter: var(--u-layout-gutter-default);
26
+ --u-layout-margin-default: var(--u-spacing-medium);
27
+ --u-layout-gutter-default: var(--u-spacing-medium);
28
+
29
+
30
+ --u-color-high-emphasis: #{functions.get-color-transparency-mix(currentColor, var(--u-high-emphasis-opacity))} !important;
31
+ --u-color-low-emphasis: #{functions.get-color-transparency-mix(currentColor, var(--u-low-emphasis-opacity))} !important;
32
+ --u-color-lower-emphasis: #{functions.get-color-transparency-mix(currentColor, var(--u-lower-emphasis-opacity))} !important;
33
+
34
+ @each $name, $value in variables.$font-weights {
35
+ --u-font-weight-#{$name}: #{$value};
36
+ }
37
+
38
+ @each $name, $value in variables.$spacings {
39
+ --u-spacing-#{$name}: #{$value};
40
+ }
41
+
42
+ @each $name, $value in variables.$shape-corner {
43
+ --u-shape-corner-#{$name}: #{$value};
44
+ }
45
+ }
46
+
47
+ @include mixins.media-breakpoint-up(sm) {
48
+
49
+ :root {
50
+ --u-layout-margin-default: var(--u-spacing-large);
51
+ --u-layout-gutter-default: var(--u-spacing-large);
52
+ }
53
+ }
@@ -0,0 +1,29 @@
1
+ @use "sass:map";
2
+
3
+ @use "variables";
4
+
5
+ @forward "functions/font";
6
+
7
+ @function get-color-var($name) {
8
+ @return var(--u-color-#{$name}, map.get(variables.$colors, $name));
9
+ }
10
+
11
+ @function get-color-transparency-mix($color, $opacity) {
12
+ @return color-mix(in srgb, $color $opacity, transparent)
13
+ }
14
+
15
+ @function get-shape-corner-var($name) {
16
+ @return var(--u-shape-corner-#{$name}, map.get(variables.$shape-corner, $name));
17
+ }
18
+
19
+ @function get-spacing-var($name) {
20
+ @return var(--u-spacing-#{$name}, map.get(variables.$spacings, $name));
21
+ }
22
+
23
+ @function get-state-layer-opacity-var($name) {
24
+ @return var(--u-state-#{$name}-opacity, map.get(variables.$state-layer-opacity, $name));
25
+ }
26
+
27
+ @function hexToRgbString($hexColor) {
28
+ @return "#{red($hexColor)},#{green($hexColor)},#{blue($hexColor)}";
29
+ }
@@ -0,0 +1,27 @@
1
+ @use "functions";
2
+ @use "mixins/text-bg";
3
+
4
+ @mixin global-styles() {
5
+ :root {
6
+ color-scheme: light dark;
7
+ }
8
+
9
+ body {
10
+ @include text-bg.current-color-vars(--u-color-on-body);
11
+
12
+ background-color: var(--u-color-body);
13
+ color: var(--u-color-on-body);
14
+ }
15
+
16
+ a {
17
+ color: #{functions.get-color-transparency-mix(var(--u-color-primary), var(--u-high-emphasis-opacity))};
18
+ border-radius: #{functions.get-spacing-var(extra-small)};
19
+ text-decoration: none;
20
+
21
+ @media (hover: hover) {
22
+ &:hover {
23
+ text-decoration: underline;
24
+ }
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,5 @@
1
+ @use "api";
2
+
3
+ @use "layout/container";
4
+ @use "layout/grid";
5
+ @use "layout/margin-and-gutters";
@@ -0,0 +1,3 @@
1
+ @forward "mixins/breakpoints";
2
+ @forward "mixins/colors";
3
+ @forward "mixins/typo";
@@ -0,0 +1,498 @@
1
+ @use "variables";
2
+
3
+ @use "functions";
4
+ @use "mixins";
5
+
6
+ @mixin reboot() {
7
+ // stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
8
+
9
+
10
+ // Reboot
11
+ //
12
+ // Normalization of HTML elements, manually forked from Normalize.css to remove
13
+ // styles targeting irrelevant browsers while applying new styles.
14
+ //
15
+ // Normalize is licensed MIT. https://github.com/necolas/normalize.css
16
+
17
+
18
+ // Document
19
+ //
20
+ // Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
21
+
22
+ *,
23
+ *::before,
24
+ *::after {
25
+ box-sizing: border-box;
26
+ }
27
+
28
+
29
+ // Root
30
+ //
31
+ // Ability to the value of the root font sizes, affecting the value of `rem`.
32
+ // null by default, thus nothing is generated.
33
+
34
+ :root {
35
+ @if variables.$enable-smooth-scroll {
36
+ @media (prefers-reduced-motion: no-preference) {
37
+ scroll-behavior: smooth;
38
+ }
39
+ }
40
+ }
41
+
42
+
43
+ // Body
44
+ //
45
+ // 1. Remove the margin in all browsers.
46
+ // 2. As a best practice, apply a default `background-color`.
47
+ // 3. Prevent adjustments of font size after orientation changes in iOS.
48
+ // 4. Change the default tap highlight to be completely transparent in iOS.
49
+
50
+ // scss-docs-start reboot-body-rules
51
+ body {
52
+ --u-current-bg-color: var(--u-color-body);
53
+ background-color: var(--u-current-bg-color);
54
+ margin: 0; // 1
55
+ @include mixins.typo-prop(body-l, font-size);
56
+ @include mixins.typo-prop(body-l, font-weight);
57
+ line-height: 1.5;
58
+ text-align: start;
59
+ -webkit-text-size-adjust: 100%; // 3
60
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0); // 4
61
+ }
62
+ // scss-docs-end reboot-body-rules
63
+
64
+
65
+ // Content grouping
66
+ //
67
+ // 1. Reset Firefox's gray color
68
+
69
+ hr {
70
+ margin: 1rem 0;
71
+ color: inherit;
72
+ border: 0;
73
+ border-top: 1px solid;
74
+ opacity: 0.25;
75
+ }
76
+
77
+
78
+ // Typography
79
+ //
80
+ // 1. Remove top margins from headings
81
+ // By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
82
+ // margin for easier control within type scales as it avoids margin collapsing.
83
+
84
+ h6, h5, h4, h3, h2, h1 {
85
+ margin-top: 0;
86
+ margin-bottom: 0.5rem;
87
+ font-weight: 500;
88
+ line-height: 1.2;
89
+ }
90
+
91
+ h1 {
92
+ font-size: calc(1.375rem + 1.5vw);
93
+ }
94
+ @media (min-width: 1200px) {
95
+ h1 {
96
+ font-size: 2.5rem;
97
+ }
98
+ }
99
+
100
+ h2 {
101
+ font-size: calc(1.325rem + 0.9vw);
102
+ }
103
+ @media (min-width: 1200px) {
104
+ h2 {
105
+ font-size: 2rem;
106
+ }
107
+ }
108
+
109
+ h3 {
110
+ font-size: calc(1.3rem + 0.6vw);
111
+ }
112
+ @media (min-width: 1200px) {
113
+ h3 {
114
+ font-size: 1.75rem;
115
+ }
116
+ }
117
+
118
+ h4 {
119
+ font-size: calc(1.275rem + 0.3vw);
120
+ }
121
+ @media (min-width: 1200px) {
122
+ h4 {
123
+ font-size: 1.5rem;
124
+ }
125
+ }
126
+
127
+ h5 {
128
+ font-size: 1.25rem;
129
+ }
130
+
131
+ h6 {
132
+ font-size: 1rem;
133
+ }
134
+
135
+ p {
136
+ margin-top: 0;
137
+ margin-bottom: 1rem;
138
+ }
139
+
140
+ abbr[title] {
141
+ -webkit-text-decoration: underline dotted;
142
+ text-decoration: underline dotted;
143
+ cursor: help;
144
+ -webkit-text-decoration-skip-ink: none;
145
+ text-decoration-skip-ink: none;
146
+ }
147
+
148
+ address {
149
+ margin-bottom: 1rem;
150
+ font-style: normal;
151
+ line-height: inherit;
152
+ }
153
+
154
+ ol,
155
+ ul {
156
+ padding-left: 2rem;
157
+ }
158
+
159
+ ol,
160
+ ul,
161
+ dl {
162
+ margin-top: 0;
163
+ margin-bottom: 1rem;
164
+ }
165
+
166
+ ol ol,
167
+ ul ul,
168
+ ol ul,
169
+ ul ol {
170
+ margin-bottom: 0;
171
+ }
172
+
173
+ dt {
174
+ font-weight: 700;
175
+ }
176
+
177
+ dd {
178
+ margin-bottom: 0.5rem;
179
+ margin-left: 0;
180
+ }
181
+
182
+ blockquote {
183
+ margin: 0 0 1rem;
184
+ }
185
+
186
+ b,
187
+ strong {
188
+ font-weight: bolder;
189
+ }
190
+
191
+ small {
192
+ font-size: 0.875em;
193
+ }
194
+
195
+
196
+ // Mark
197
+
198
+ mark {
199
+ padding: 0.1875em;
200
+ color: var(--u-color-on-warning);
201
+ background-color: var(--u-color-warning);
202
+ }
203
+
204
+
205
+ sub,
206
+ sup {
207
+ position: relative;
208
+ font-size: 0.75em;
209
+ line-height: 0;
210
+ vertical-align: baseline;
211
+ }
212
+
213
+ sub {
214
+ bottom: -0.25em;
215
+ }
216
+
217
+ sup {
218
+ top: -0.5em;
219
+ }
220
+
221
+ a {
222
+ color: #{functions.get-color-transparency-mix(var(--u-link-color, --u-color-primary), var(--u-text-opacity))};
223
+ text-decoration: none;
224
+
225
+ @media (hover: hover) {
226
+ &:hover {
227
+ text-decoration: underline;
228
+ }
229
+ }
230
+ }
231
+
232
+ a:not([href]):not([class]), a:not([href]):not([class]):hover {
233
+ color: inherit;
234
+ text-decoration: none;
235
+ }
236
+
237
+ pre,
238
+ code,
239
+ kbd,
240
+ samp {
241
+ font-family: var(--u-font-monospace);
242
+ font-size: 1em;
243
+ }
244
+
245
+ pre {
246
+ display: block;
247
+ margin-top: 0;
248
+ margin-bottom: 1rem;
249
+ overflow: auto;
250
+ font-size: 0.875em;
251
+ }
252
+ pre code {
253
+ font-size: inherit;
254
+ color: inherit;
255
+ word-break: normal;
256
+ }
257
+
258
+ code {
259
+ font-size: 0.875em;
260
+ word-wrap: break-word;
261
+ }
262
+ a > code {
263
+ color: inherit;
264
+ }
265
+
266
+ kbd {
267
+ padding: 0.1875rem 0.375rem;
268
+ font-size: 0.875em;
269
+ color: var(--u-color-on-light);
270
+ background-color: var(--u-color-light);
271
+ font-weight: var(--u-font-weight-regular);
272
+ border-radius: 0.25rem;
273
+ }
274
+ kbd kbd {
275
+ padding: 0;
276
+ font-size: 1em;
277
+ }
278
+
279
+ figure {
280
+ margin: 0 0 1rem;
281
+ }
282
+
283
+ img,
284
+ svg {
285
+ vertical-align: middle;
286
+ }
287
+
288
+ table {
289
+ caption-side: bottom;
290
+ border-collapse: collapse;
291
+ }
292
+
293
+ caption {
294
+ padding-top: 0.5rem;
295
+ padding-bottom: 0.5rem;
296
+ color: #{functions.get-color-transparency-mix(currentColor, var(--u-low-emphasis-opacity))};
297
+ text-align: left;
298
+ }
299
+
300
+ th {
301
+ text-align: inherit;
302
+ text-align: -webkit-match-parent;
303
+ }
304
+
305
+ thead,
306
+ tbody,
307
+ tfoot,
308
+ tr,
309
+ td,
310
+ th {
311
+ border-color: inherit;
312
+ border-style: solid;
313
+ border-width: 0;
314
+ }
315
+
316
+ label {
317
+ display: inline-block;
318
+ }
319
+
320
+ button {
321
+ border-radius: 0;
322
+ }
323
+
324
+ button:focus:not(:focus-visible) {
325
+ outline: 0;
326
+ }
327
+
328
+ input,
329
+ button,
330
+ select,
331
+ optgroup,
332
+ textarea {
333
+ margin: 0;
334
+ font-family: inherit;
335
+ font-size: inherit;
336
+ line-height: inherit;
337
+ }
338
+
339
+ button,
340
+ select {
341
+ text-transform: none;
342
+ }
343
+
344
+ [role=button] {
345
+ cursor: pointer;
346
+ }
347
+
348
+ select {
349
+ word-wrap: normal;
350
+ }
351
+ select:disabled {
352
+ opacity: 1;
353
+ }
354
+
355
+ [list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
356
+ display: none !important;
357
+ }
358
+
359
+ button,
360
+ [type=button],
361
+ [type=reset],
362
+ [type=submit] {
363
+ -webkit-appearance: button;
364
+ }
365
+ button:not(:disabled),
366
+ [type=button]:not(:disabled),
367
+ [type=reset]:not(:disabled),
368
+ [type=submit]:not(:disabled) {
369
+ cursor: pointer;
370
+ }
371
+
372
+ ::-moz-focus-inner {
373
+ padding: 0;
374
+ border-style: none;
375
+ }
376
+
377
+ textarea {
378
+ resize: vertical;
379
+ }
380
+
381
+ fieldset {
382
+ min-width: 0;
383
+ padding: 0;
384
+ margin: 0;
385
+ border: 0;
386
+ }
387
+
388
+ legend {
389
+ float: left;
390
+ width: 100%;
391
+ padding: 0;
392
+ margin-bottom: 0.5rem;
393
+ font-size: calc(1.275rem + 0.3vw);
394
+ line-height: inherit;
395
+ }
396
+
397
+ // Fix height of inputs with a type of datetime-local, date, month, week, or time
398
+ // See https://github.com/twbs/bootstrap/issues/18842
399
+
400
+ ::-webkit-datetime-edit-fields-wrapper,
401
+ ::-webkit-datetime-edit-text,
402
+ ::-webkit-datetime-edit-minute,
403
+ ::-webkit-datetime-edit-hour-field,
404
+ ::-webkit-datetime-edit-day-field,
405
+ ::-webkit-datetime-edit-month-field,
406
+ ::-webkit-datetime-edit-year-field {
407
+ padding: 0;
408
+ }
409
+
410
+ ::-webkit-inner-spin-button {
411
+ height: auto;
412
+ }
413
+
414
+ // 1. This overrides the extra rounded corners on search inputs in iOS so that our
415
+ // `.form-control` class can properly style them. Note that this cannot simply
416
+ // be added to `.form-control` as it's not specific enough. For details, see
417
+ // https://github.com/twbs/bootstrap/issues/11586.
418
+ // 2. Correct the outline style in Safari.
419
+
420
+ [type="search"] {
421
+ -webkit-appearance: textfield; // 1
422
+ outline-offset: -2px; // 2
423
+ }
424
+
425
+ // 1. A few input types should stay LTR
426
+ // See https://rtlstyling.com/posts/rtl-styling#form-inputs
427
+ // 2. RTL only output
428
+ // See https://rtlcss.com/learn/usage-guide/control-directives/#raw
429
+
430
+ /* rtl:raw:
431
+ [type="tel"],
432
+ [type="url"],
433
+ [type="email"],
434
+ [type="number"] {
435
+ direction: ltr;
436
+ }
437
+ */
438
+
439
+ // Remove the inner padding in Chrome and Safari on macOS.
440
+
441
+ ::-webkit-search-decoration {
442
+ -webkit-appearance: none;
443
+ }
444
+
445
+ // Remove padding around color pickers in webkit browsers
446
+
447
+ ::-webkit-color-swatch-wrapper {
448
+ padding: 0;
449
+ }
450
+
451
+
452
+ // 1. Inherit font family and line height for file input buttons
453
+ // 2. Correct the inability to style clickable types in iOS and Safari.
454
+
455
+ ::file-selector-button {
456
+ font: inherit; // 1
457
+ -webkit-appearance: button; // 2
458
+ }
459
+
460
+ // Correct element displays
461
+
462
+ output {
463
+ display: inline-block;
464
+ }
465
+
466
+ // Remove border from iframe
467
+
468
+ iframe {
469
+ border: 0;
470
+ }
471
+
472
+ // Summary
473
+ //
474
+ // 1. Add the correct display in all browsers
475
+
476
+ summary {
477
+ display: list-item; // 1
478
+ cursor: pointer;
479
+ }
480
+
481
+
482
+ // Progress
483
+ //
484
+ // Add the correct vertical alignment in Chrome, Firefox, and Opera.
485
+
486
+ progress {
487
+ vertical-align: baseline;
488
+ }
489
+
490
+
491
+ // Hidden attribute
492
+ //
493
+ // Always hide an element with the `hidden` HTML attribute.
494
+
495
+ [hidden] {
496
+ display: none !important;
497
+ }
498
+ }
@@ -0,0 +1,4 @@
1
+ @use "utilities/divider";
2
+ @use "utilities/scheme";
3
+ @use "utilities/spacing";
4
+ @use "utilities/text";