@universal-material/web 3.6.22 → 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 +139 -0
  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 +2 -2
  36. package/dist/config.js.map +0 -1
  37. package/dist/index.js.map +0 -1
@@ -0,0 +1,29 @@
1
+ @use "sass:map";
2
+ @use "sass:math";
3
+
4
+ @use "../variables";
5
+
6
+ @function get-rem-from-sp($sp-font-size) {
7
+ @return $sp-font-size * 0.0625rem;
8
+ }
9
+
10
+ @function get-letter-spacing($px-tracking, $sp-font-size) {
11
+ @return math.div($px-tracking, $sp-font-size) * 1rem;
12
+ }
13
+
14
+ @function get-font-family-var() {
15
+ @return var(--u-font-family, variables.$font-family);
16
+ }
17
+
18
+ @function get-font-weight-var($name) {
19
+ @return var(--u-font-weight-#{$name}, map.get(variables.$font-weights, $name));
20
+ }
21
+
22
+ @function get-typo-style($line-height, $font-size, $tracking, $font-weight) {
23
+ @return (
24
+ line-height: get-rem-from-sp($line-height),
25
+ font-size: get-rem-from-sp($font-size),
26
+ letter-spacing: get-letter-spacing($tracking, $font-size),
27
+ font-weight: $font-weight
28
+ );
29
+ }
@@ -0,0 +1,14 @@
1
+ @use "../api";
2
+ @use "../mixins";
3
+
4
+ .u-container-fluid,
5
+ .u-container {
6
+ padding-inline: var(--u-layout-margin-inline, var(--u-layout-margin));
7
+ padding-block: var(--u-layout-margin-block, var(--u-layout-margin));
8
+ width: 100%;
9
+ }
10
+
11
+ .u-container {
12
+ max-width: var(--u-container-width, 992px);
13
+ margin-inline: auto;
14
+ }
@@ -0,0 +1,12 @@
1
+ .u-grid {
2
+ display: grid;
3
+ grid-template-columns: repeat(var(--u-grid-columns, 2), minmax(0, 1fr));
4
+ column-gap: var(--u-layout-gutter-inline, var(--u-layout-gutter));
5
+ row-gap: var(--u-layout-gutter-block, var(--u-layout-gutter));
6
+ }
7
+
8
+ .u-column {
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: var(--u-layout-gutter-block, var(--u-layout-gutter));
12
+ }
@@ -0,0 +1,37 @@
1
+ @use "sass:list";
2
+ @use "sass:map";
3
+
4
+ @use "../variables";
5
+ @use "../api";
6
+
7
+ @each $breakpoint in map.keys(variables.$breakpoints) {
8
+ $infix: api.breakpoint-infix($breakpoint);
9
+
10
+ @each $direction in variables.$layout-directions {
11
+
12
+ @include api.media-breakpoint-up($breakpoint) {
13
+ .u-margin#{$direction}#{$infix}-default {
14
+ --u-layout-margin#{$direction}: var(--u-layout-margin-default);
15
+ }
16
+
17
+ .u-gutter#{$direction}#{$infix}-default {
18
+ --u-layout-gutter#{$direction}: var(--u-layout-gutter-default);
19
+ }
20
+ }
21
+ }
22
+
23
+ @each $spacing in map.keys(variables.$spacings) {
24
+ @each $direction in variables.$layout-directions {
25
+
26
+ @include api.media-breakpoint-up($breakpoint) {
27
+ .u-margin#{$direction}#{$infix}-#{$spacing} {
28
+ --u-layout-margin#{$direction}: var(--u-spacing-#{$spacing});
29
+ }
30
+
31
+ .u-gutter#{$direction}#{$infix}-#{$spacing} {
32
+ --u-layout-gutter#{$direction}: var(--u-spacing-#{$spacing});
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,71 @@
1
+ @use "sass:map";
2
+
3
+ @use "../variables";
4
+
5
+ @function breakpoint-next($name) {
6
+ $breakpoint-names: map.keys(variables.$breakpoints);
7
+
8
+ $n: index($breakpoint-names, $name);
9
+
10
+ @if not $n {
11
+ @return null;
12
+ }
13
+
14
+ @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
15
+ }
16
+
17
+ @function breakpoint-min($name) {
18
+ $min: map.get(variables.$breakpoints, $name);
19
+ @return if($min != 0, $min, null);
20
+ }
21
+
22
+ @function breakpoint-max($name) {
23
+ $next: breakpoint-next($name);
24
+ @return if($next, breakpoint-min($next) - .02px, null);
25
+ }
26
+
27
+ @function breakpoint-infix($name) {
28
+ @return if(breakpoint-min($name) == null, "", "-#{$name}");
29
+ }
30
+
31
+ @mixin media-breakpoint-up($name) {
32
+ $min: breakpoint-min($name);
33
+ @if $min {
34
+ @media (min-width: $min) {
35
+ @content;
36
+ }
37
+ } @else {
38
+ @content;
39
+ }
40
+ }
41
+
42
+ @mixin media-breakpoint-down($name) {
43
+ $max: breakpoint-max($name);
44
+ @if $max {
45
+ @media (max-width: $max) {
46
+ @content;
47
+ }
48
+ } @else {
49
+ @content;
50
+ }
51
+ }
52
+
53
+ @mixin media-breakpoint-only($name) {
54
+ $min: breakpoint-min($name);
55
+ $next: breakpoint-next($name);
56
+ $max: breakpoint-min($next);
57
+
58
+ @if $min != null and $max != null {
59
+ @media (min-width: $min) and (max-width: $max) {
60
+ @content;
61
+ }
62
+ } @else if $max == null {
63
+ @include media-breakpoint-up($name) {
64
+ @content;
65
+ }
66
+ } @else if $min == null {
67
+ @include media-breakpoint-down($name) {
68
+ @content;
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,5 @@
1
+ @use "sass:color";
2
+
3
+ @mixin _color-vars($color-name, $color-value) {
4
+ --u-color-#{$color-name}: #{$color-value};
5
+ }
@@ -0,0 +1,34 @@
1
+ @use "sass:string";
2
+
3
+ @use "../functions";
4
+
5
+ @mixin current-color-vars-important($current-color-var-name) {
6
+ color: var(#{$current-color-var-name}) !important;
7
+ }
8
+
9
+ @mixin current-color-vars($current-color-var-name) {
10
+ color: var(#{$current-color-var-name});
11
+ }
12
+
13
+ @mixin bg-variant-important($color-name) {
14
+ .u-bg-#{$color-name} {
15
+ background-color: var(--u-color-#{$color-name}) !important;
16
+ }
17
+ }
18
+
19
+ @mixin text-bg-variant-important($color-name, $on-color-name: null) {
20
+
21
+ @if $on-color-name == null {
22
+ $on-color-name: on-#{$color-name};
23
+ }
24
+
25
+ $container-index: string.index($on-color-name, "surface-container");
26
+ @if $container-index != null {
27
+ $on-color-name: #{string.slice($on-color-name, 1, $container-index - 1)}surface;
28
+ }
29
+
30
+ .u-text-bg-#{$color-name} {
31
+ @include current-color-vars-important(--u-color-#{$on-color-name});
32
+ background-color: var(--u-color-#{$color-name}) !important;
33
+ }
34
+ }
@@ -0,0 +1,43 @@
1
+ @use "sass:map";
2
+
3
+ @use "../typo/variables";
4
+ @use "../functions";
5
+
6
+ @mixin typo($style, $target-name: null) {
7
+ @if not map.has-key(variables.$typography-styles, $style) {
8
+ @error "Invalid style specified! #{$style} doesn't exist. Choose one of #{map.keys(variables.$typography-styles)}";
9
+ }
10
+
11
+ @if $target-name != null {
12
+ font-family: var(--u-font-family, #{functions.get-font-family-var()});
13
+ } @else {
14
+ font-family: var(--u-font-family);
15
+ }
16
+
17
+ $props: map.get(variables.$typography-styles, $style);
18
+
19
+ @each $key, $value in $props {
20
+ @if $target-name != null {
21
+ #{$key}: var(--u-#{$target-name}-#{$key}, var(--u-#{$style}-#{$key}, #{$value}));
22
+ } @else {
23
+ #{$key}: var(--u-#{$style}-#{$key});
24
+ }
25
+ }
26
+ }
27
+
28
+
29
+ @mixin typo-prop($style, $prop, $target-name: null) {
30
+ @if not map.has-key(variables.$typography-styles, $style) {
31
+ @error "Invalid style specified! #{$style} doesn't exist. Choose one of #{map.keys(variables.$typography-styles)}";
32
+ }
33
+
34
+ $props: map.get(variables.$typography-styles, $style);
35
+
36
+ $value: map.get($props, $prop);
37
+
38
+ @if $target-name != null {
39
+ #{$prop}: var(--u-#{$target-name}-#{$prop}, var(--u-#{$style}-#{$prop}, #{$value}));
40
+ } @else {
41
+ #{$prop}: var(--u-#{$style}-#{$prop});
42
+ }
43
+ }
@@ -0,0 +1,48 @@
1
+ @use "../functions";
2
+
3
+ :root {
4
+ --u-table-hover-opacity: var(--u-state-layer-hover-opacity);
5
+ --u-table-cell-padding: 13px 16px;
6
+ --u-table-cell-font-weight: #{functions.get-font-weight-var(medium)};
7
+ }
8
+
9
+ .u-table {
10
+ min-width: 100%;
11
+ border-collapse: collapse;
12
+ font-family: var(--u-font-family, #{functions.get-font-family-var()});
13
+
14
+ > tbody > tr,
15
+ > thead > tr,
16
+ > tfoot > tr,
17
+ > tr {
18
+ @at-root .u-table:has(> thead) > tbody > tr,
19
+ &:not(:first-child) {
20
+ border-top: 1px solid #{functions.get-color-transparency-mix(currentColor, var(--u-table-divider-opacity, 20%))};
21
+ }
22
+
23
+ > td {
24
+ padding: var(--u-td-padding, var(--u-table-cell-padding));
25
+ font-size: var(--u-td-font-size, .875rem);
26
+ font-weight: var(--u-td-font-weight, var(--u-table-cell-font-weight));
27
+ text-align: start;
28
+ }
29
+
30
+ > th {
31
+ --u-text-opacity: var(--u-low-emphasis-opacity);
32
+ padding: var(--u-th-padding, var(--u-table-cell-padding));
33
+ font-size: var(--u-th-font-size, .8125rem);
34
+ font-weight: var(--u-th-font-weight, var(--u-table-cell-font-weight));
35
+ color: #{functions.get-color-transparency-mix(currentColor, var(--u-text-opacity))};
36
+ text-align: start;
37
+ }
38
+ }
39
+ }
40
+
41
+ .u-table-hover {
42
+ > tbody > tr,
43
+ > tr {
44
+ &:hover {
45
+ background-color: #{functions.get-color-transparency-mix(currentColor, var(--u-table-hover-opacity))};
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,5 @@
1
+ @use "../variables";
2
+
3
+ :root {
4
+ --u-font-family: #{variables.$font-family};
5
+ }
@@ -0,0 +1,19 @@
1
+ @use "sass:map";
2
+
3
+ @use "variables";
4
+ @use "../functions";
5
+ @use "../mixins";
6
+
7
+ :root {
8
+ @each $style, $props in (variables.$typography-styles) {
9
+ @each $key, $value in $props {
10
+ --u-#{$style}-#{$key}: #{$value};
11
+ }
12
+ }
13
+ }
14
+
15
+ @each $style in map.keys(variables.$typography-styles) {
16
+ .u-#{$style} {
17
+ @include mixins.typo($style);
18
+ }
19
+ }
@@ -0,0 +1,19 @@
1
+ @use "../functions";
2
+
3
+ $typography-styles: (
4
+ display-l: functions.get-typo-style(64, 57, -.25, #{functions.get-font-weight-var(regular)}),
5
+ display-m: functions.get-typo-style(52, 45, 0, #{functions.get-font-weight-var(regular)}),
6
+ display-s: functions.get-typo-style(44, 36, 0, #{functions.get-font-weight-var(regular)}),
7
+ headline-l: functions.get-typo-style(40, 32, 0, #{functions.get-font-weight-var(regular)}),
8
+ headline-m: functions.get-typo-style(36, 28, 0, #{functions.get-font-weight-var(regular)}),
9
+ headline-s: functions.get-typo-style(32, 24, 0, #{functions.get-font-weight-var(regular)}),
10
+ title-l: functions.get-typo-style(28, 22, 0, #{functions.get-font-weight-var(regular)}),
11
+ title-m: functions.get-typo-style(24, 16, .15, #{functions.get-font-weight-var(medium)}),
12
+ title-s: functions.get-typo-style(20, 14, .1, #{functions.get-font-weight-var(medium)}),
13
+ body-l: functions.get-typo-style(24, 16, .5, #{functions.get-font-weight-var(regular)}),
14
+ body-m: functions.get-typo-style(20, 14, .25, #{functions.get-font-weight-var(regular)}),
15
+ body-s: functions.get-typo-style(16, 12, .4, #{functions.get-font-weight-var(regular)}),
16
+ label-l: functions.get-typo-style(20, 14, .1, #{functions.get-font-weight-var(medium)}),
17
+ label-m: functions.get-typo-style(16, 12, .5, #{functions.get-font-weight-var(medium)}),
18
+ label-s: functions.get-typo-style(16, 11, .5, #{functions.get-font-weight-var(medium)})
19
+ ) !default;
@@ -0,0 +1,16 @@
1
+ @use "variables";
2
+ @use "css-vars";
3
+ @use "colors";
4
+ @use "layout";
5
+ @use "utilities";
6
+ @use "table/table";
7
+ @use "typo/font";
8
+ @use "typo/typo";
9
+
10
+ @use "reboot";
11
+ @use "global";
12
+
13
+ @if variables.$include-reboot {
14
+ @include reboot.reboot;
15
+ @include global.global-styles;
16
+ }
@@ -0,0 +1,13 @@
1
+ @use "../api";
2
+
3
+ .u-divider,
4
+ .u-divider-no-margin {
5
+ display: block;
6
+ height: var(--u-divider-thickness, 1px);
7
+ background-color: var(--u-divider-color, currentColor);
8
+ opacity: var(--u-divider-opacity, .4);
9
+ }
10
+
11
+ .u-divider {
12
+ margin-block: 8px;
13
+ }
@@ -0,0 +1,9 @@
1
+ .u-dark {
2
+ color-scheme: dark !important;
3
+ color: var(--u-color-on-body);
4
+ }
5
+
6
+ .u-light {
7
+ color-scheme: light !important;
8
+ color: var(--u-color-on-body);
9
+ }
@@ -0,0 +1,23 @@
1
+ @use "sass:list";
2
+ @use "sass:map";
3
+
4
+ @use "../variables";
5
+ @use "../api";
6
+
7
+ @each $breakpoint in map.keys(variables.$breakpoints) {
8
+ $infix: api.breakpoint-infix($breakpoint);
9
+
10
+ @each $spacing in map.keys(variables.$spacings) {
11
+ @each $side, $value in variables.$spacing-sides {
12
+ @include api.media-breakpoint-up($breakpoint) {
13
+ .u-m#{$side}#{$infix}-#{$spacing} {
14
+ margin#{$value}: var(--u-spacing-#{$spacing});
15
+ }
16
+
17
+ .u-p#{$side}#{$infix}-#{$spacing} {
18
+ padding#{$value}: var(--u-spacing-#{$spacing});
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,54 @@
1
+ @use "sass:map";
2
+ @use "../variables";
3
+ @use "../mixins";
4
+
5
+ .u-text-monospace { font-family: var(--u-font-monospace); }
6
+
7
+ // Alignment
8
+
9
+ .u-text-justify { text-align: justify !important; }
10
+ .u-text-nowrap { white-space: nowrap !important; }
11
+ .u-text-truncate {
12
+ overflow: hidden;
13
+ text-overflow: ellipsis;
14
+ white-space: nowrap;
15
+ }
16
+
17
+ // Contextual
18
+ .u-text-high-emphasis {
19
+ color: var(--u-color-high-emphasis) !important;
20
+ }
21
+
22
+ .u-text-low-emphasis {
23
+ color: var(--u-color-low-emphasis) !important;
24
+ }
25
+
26
+ .u-text-lower-emphasis {
27
+ color: var(--u-color-lower-emphasis) !important;
28
+ }
29
+
30
+ // Responsive alignment
31
+
32
+ @each $breakpoint in map.keys(variables.$breakpoints) {
33
+ @include mixins.media-breakpoint-up($breakpoint) {
34
+ $infix: mixins.breakpoint-infix($breakpoint);
35
+
36
+ .u-text#{$infix}-left { text-align: left !important; }
37
+ .u-text#{$infix}-center { text-align: center !important; }
38
+ .u-text#{$infix}-right { text-align: right !important; }
39
+
40
+ .u-text#{$infix}-start {
41
+ text-align: start !important;
42
+ }
43
+
44
+ .u-text#{$infix}-end {
45
+ text-align: end !important;
46
+ }
47
+ }
48
+ }
49
+
50
+ @each $weight, $value in variables.$font-weights {
51
+ .u-font-weight-#{$weight} {
52
+ font-weight: var(--u-font-weight-#{$weight}) !important;
53
+ }
54
+ }