@universal-material/web 3.0.20 → 3.0.21

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 (202) hide show
  1. package/app-bar/top-app-bar.d.ts +42 -0
  2. package/app-bar/top-app-bar.d.ts.map +1 -0
  3. package/app-bar/top-app-bar.js +139 -0
  4. package/app-bar/top-app-bar.js.map +1 -0
  5. package/{button/button-base.styles.d.ts → app-bar/top-app-bar.styles.d.ts} +1 -1
  6. package/app-bar/top-app-bar.styles.d.ts.map +1 -0
  7. package/app-bar/top-app-bar.styles.js +87 -0
  8. package/app-bar/top-app-bar.styles.js.map +1 -0
  9. package/button/button-base.d.ts +2 -30
  10. package/button/button-base.d.ts.map +1 -1
  11. package/button/button-base.js +4 -94
  12. package/button/button-base.js.map +1 -1
  13. package/button/button.d.ts +1 -1
  14. package/button/button.d.ts.map +1 -1
  15. package/button/button.js +9 -7
  16. package/button/button.js.map +1 -1
  17. package/button/button.styles.d.ts.map +1 -1
  18. package/button/button.styles.js +14 -10
  19. package/button/button.styles.js.map +1 -1
  20. package/button/fab.d.ts.map +1 -1
  21. package/button/fab.js +2 -2
  22. package/button/fab.js.map +1 -1
  23. package/button/icon-button.d.ts +2 -2
  24. package/button/icon-button.d.ts.map +1 -1
  25. package/button/icon-button.js +5 -4
  26. package/button/icon-button.js.map +1 -1
  27. package/button/icon-button.styles.js +8 -8
  28. package/button/icon-button.styles.js.map +1 -1
  29. package/card/card.d.ts +3 -3
  30. package/card/card.d.ts.map +1 -1
  31. package/card/card.js +3 -3
  32. package/card/card.js.map +1 -1
  33. package/checkbox/checkbox.d.ts.map +1 -1
  34. package/checkbox/checkbox.js +0 -1
  35. package/checkbox/checkbox.js.map +1 -1
  36. package/config.d.ts +6 -0
  37. package/config.d.ts.map +1 -0
  38. package/config.js +7 -0
  39. package/config.js.map +1 -0
  40. package/container/container.d.ts +1 -1
  41. package/container/container.d.ts.map +1 -1
  42. package/container/container.js +4 -4
  43. package/container/container.js.map +1 -1
  44. package/container/grid-base.styles.js +4 -4
  45. package/container/grid-base.styles.js.map +1 -1
  46. package/container/grid.d.ts +2 -2
  47. package/container/grid.d.ts.map +1 -1
  48. package/container/grid.js +4 -4
  49. package/container/grid.js.map +1 -1
  50. package/css/universal-material.css +1333 -0
  51. package/css/universal-material.min.css +2 -0
  52. package/custom-elements.json +2873 -915
  53. package/elevation/elevation.d.ts +1 -1
  54. package/elevation/elevation.d.ts.map +1 -1
  55. package/elevation/elevation.js +2 -2
  56. package/elevation/elevation.js.map +1 -1
  57. package/index.d.ts +41 -29
  58. package/index.d.ts.map +1 -1
  59. package/index.js +41 -29
  60. package/index.js.map +1 -1
  61. package/menu/menu-item.d.ts +26 -0
  62. package/menu/menu-item.d.ts.map +1 -0
  63. package/menu/menu-item.js +62 -0
  64. package/menu/menu-item.js.map +1 -0
  65. package/{table/table-row.styles.d.ts → menu/menu-item.styles.d.ts} +1 -1
  66. package/menu/menu-item.styles.d.ts.map +1 -0
  67. package/menu/menu-item.styles.js +37 -0
  68. package/menu/menu-item.styles.js.map +1 -0
  69. package/menu/menu.d.ts +55 -0
  70. package/menu/menu.d.ts.map +1 -0
  71. package/menu/menu.js +215 -0
  72. package/menu/menu.js.map +1 -0
  73. package/{table/table.styles.d.ts → menu/menu.styles.d.ts} +1 -1
  74. package/menu/menu.styles.d.ts.map +1 -0
  75. package/menu/menu.styles.js +95 -0
  76. package/menu/menu.styles.js.map +1 -0
  77. package/navigation/drawer-item.d.ts +39 -0
  78. package/navigation/drawer-item.d.ts.map +1 -0
  79. package/navigation/drawer-item.js +98 -0
  80. package/navigation/drawer-item.js.map +1 -0
  81. package/{table/table-body.styles.d.ts → navigation/drawer-item.styles.d.ts} +1 -1
  82. package/navigation/drawer-item.styles.d.ts.map +1 -0
  83. package/navigation/drawer-item.styles.js +43 -0
  84. package/navigation/drawer-item.styles.js.map +1 -0
  85. package/{table/table-row.d.ts → navigation/drawer.d.ts} +3 -3
  86. package/navigation/drawer.d.ts.map +1 -0
  87. package/{table/table-row.js → navigation/drawer.js} +11 -8
  88. package/navigation/drawer.js.map +1 -0
  89. package/{table/table-cell.styles.d.ts → navigation/drawer.styles.d.ts} +1 -1
  90. package/navigation/drawer.styles.d.ts.map +1 -0
  91. package/navigation/drawer.styles.js +17 -0
  92. package/navigation/drawer.styles.js.map +1 -0
  93. package/navigation/side-navigation-swiper.styles.d.ts +2 -0
  94. package/navigation/side-navigation-swiper.styles.d.ts.map +1 -0
  95. package/navigation/side-navigation-swiper.styles.js +131 -0
  96. package/navigation/side-navigation-swiper.styles.js.map +1 -0
  97. package/navigation/side-navigation.d.ts +32 -0
  98. package/navigation/side-navigation.d.ts.map +1 -0
  99. package/navigation/side-navigation.js +154 -0
  100. package/navigation/side-navigation.js.map +1 -0
  101. package/navigation/side-navigation.styles.d.ts +2 -0
  102. package/navigation/side-navigation.styles.d.ts.map +1 -0
  103. package/navigation/side-navigation.styles.js +124 -0
  104. package/navigation/side-navigation.styles.js.map +1 -0
  105. package/package.json +47 -21
  106. package/scss/_api.scss +2 -0
  107. package/scss/_common.scss +38 -0
  108. package/scss/_css-vars.scss +30 -0
  109. package/scss/_functions.scss +25 -0
  110. package/scss/_mixins.scss +3 -0
  111. package/scss/_variables.scss +110 -0
  112. package/scss/data-table/_data-table.scss +33 -0
  113. package/scss/data-table/_variables.scss +24 -0
  114. package/scss/functions/_font.scss +29 -0
  115. package/scss/mixins/_breakpoints.scss +21 -0
  116. package/scss/mixins/_colors.scss +6 -0
  117. package/scss/mixins/_text-bg.scss +33 -0
  118. package/scss/mixins/_typo.scss +26 -0
  119. package/scss/text-bg/_text-bg.scss +38 -0
  120. package/scss/text-bg/_text.scss +73 -0
  121. package/scss/typo/_font.scss +5 -0
  122. package/scss/typo/_typo.scss +19 -0
  123. package/scss/typo/_variables.scss +19 -0
  124. package/scss/universal-material.scss +7 -0
  125. package/shared/base.styles.js +1 -1
  126. package/shared/base.styles.js.map +1 -1
  127. package/shared/button-wrapper.d.ts +35 -0
  128. package/shared/button-wrapper.d.ts.map +1 -0
  129. package/shared/button-wrapper.js +110 -0
  130. package/shared/button-wrapper.js.map +1 -0
  131. package/shared/button-wrapper.styles.d.ts +2 -0
  132. package/shared/button-wrapper.styles.d.ts.map +1 -0
  133. package/{button/button-base.styles.js → shared/button-wrapper.styles.js} +27 -9
  134. package/shared/button-wrapper.styles.js.map +1 -0
  135. package/snackbar/snackbar.d.ts +38 -0
  136. package/snackbar/snackbar.d.ts.map +1 -0
  137. package/snackbar/snackbar.js +122 -0
  138. package/snackbar/snackbar.js.map +1 -0
  139. package/{table/table-head.styles.d.ts → snackbar/snackbar.styles.d.ts} +1 -1
  140. package/snackbar/snackbar.styles.d.ts.map +1 -0
  141. package/snackbar/snackbar.styles.js +81 -0
  142. package/snackbar/snackbar.styles.js.map +1 -0
  143. package/theme/css-var-builder.js +1 -1
  144. package/theme/css-var-builder.js.map +1 -1
  145. package/theme/index.d.ts +1 -1
  146. package/theme/index.d.ts.map +1 -1
  147. package/theme/index.js +1 -1
  148. package/theme/index.js.map +1 -1
  149. package/theme/neutral-colors.d.ts +1 -1
  150. package/theme/neutral-colors.d.ts.map +1 -1
  151. package/theme/neutral-colors.js +5 -0
  152. package/theme/neutral-colors.js.map +1 -1
  153. package/theme/theme-builder.d.ts +2 -3
  154. package/theme/theme-builder.d.ts.map +1 -1
  155. package/theme/theme-builder.js +41 -15
  156. package/theme/theme-builder.js.map +1 -1
  157. package/theme/theme-color.d.ts +1 -1
  158. package/theme/theme-color.d.ts.map +1 -1
  159. package/theme/theme-color.js.map +1 -1
  160. package/button/button-base.styles.d.ts.map +0 -1
  161. package/button/button-base.styles.js.map +0 -1
  162. package/table/table-body.d.ts +0 -11
  163. package/table/table-body.d.ts.map +0 -1
  164. package/table/table-body.js +0 -21
  165. package/table/table-body.js.map +0 -1
  166. package/table/table-body.styles.d.ts.map +0 -1
  167. package/table/table-body.styles.js +0 -11
  168. package/table/table-body.styles.js.map +0 -1
  169. package/table/table-cell.d.ts +0 -11
  170. package/table/table-cell.d.ts.map +0 -1
  171. package/table/table-cell.js +0 -21
  172. package/table/table-cell.js.map +0 -1
  173. package/table/table-cell.styles.d.ts.map +0 -1
  174. package/table/table-cell.styles.js +0 -11
  175. package/table/table-cell.styles.js.map +0 -1
  176. package/table/table-head.d.ts +0 -11
  177. package/table/table-head.d.ts.map +0 -1
  178. package/table/table-head.js +0 -21
  179. package/table/table-head.js.map +0 -1
  180. package/table/table-head.styles.d.ts.map +0 -1
  181. package/table/table-head.styles.js +0 -11
  182. package/table/table-head.styles.js.map +0 -1
  183. package/table/table-header-cell.d.ts +0 -11
  184. package/table/table-header-cell.d.ts.map +0 -1
  185. package/table/table-header-cell.js +0 -21
  186. package/table/table-header-cell.js.map +0 -1
  187. package/table/table-header-cell.styles.d.ts +0 -2
  188. package/table/table-header-cell.styles.d.ts.map +0 -1
  189. package/table/table-header-cell.styles.js +0 -12
  190. package/table/table-header-cell.styles.js.map +0 -1
  191. package/table/table-row.d.ts.map +0 -1
  192. package/table/table-row.js.map +0 -1
  193. package/table/table-row.styles.d.ts.map +0 -1
  194. package/table/table-row.styles.js +0 -7
  195. package/table/table-row.styles.js.map +0 -1
  196. package/table/table.d.ts +0 -16
  197. package/table/table.d.ts.map +0 -1
  198. package/table/table.js +0 -19
  199. package/table/table.js.map +0 -1
  200. package/table/table.styles.d.ts.map +0 -1
  201. package/table/table.styles.js +0 -16
  202. package/table/table.styles.js.map +0 -1
@@ -0,0 +1,33 @@
1
+ @use "../functions";
2
+
3
+ .u-data-table table,
4
+ table.u-data-table {
5
+ min-width: 100%;
6
+ border-collapse: collapse;
7
+
8
+ }
9
+
10
+ .u-data-table {
11
+ font-family: var(--u-font-family, #{functions.get-font-family-var()});
12
+
13
+ tr:not(:first-child) {
14
+ border-top: 1px solid #{functions.get-color-var(outline-variant)};
15
+ }
16
+
17
+ td {
18
+ display: table-cell;
19
+ padding: var(--u-td-padding, 13px 16px);
20
+ font-size: var(--u-td-font-size, .875rem);
21
+ font-weight: var(--u-td-font-weight, #{functions.get-font-weight-var(medium)});
22
+ text-align: start;
23
+ }
24
+
25
+ th {
26
+ display: table-cell;
27
+ padding: var(--u-th-padding, 13px 16px);
28
+ font-size: var(--u-th-font-size, .8125rem);
29
+ font-weight: var(--u-th-font-weight, #{functions.get-font-weight-var(medium)});
30
+ text-align: start;
31
+ color: var(--u-low-emphasis-color, #{functions.get-color-var(on-surface-variant)});
32
+ }
33
+ }
@@ -0,0 +1,24 @@
1
+ @import "../../colors";
2
+ @import "../../font";
3
+ @import "../../mixins";
4
+
5
+ //Data table
6
+ $row-horizontal-padding: 1rem !default;
7
+
8
+ $u-data-table-divider-width: .0625rem !default;
9
+ $u-data-table-border: $u-data-table-divider-width solid var(--u-outline-variant-color) !default;
10
+
11
+ $u-data-table-horizontal-padding: $row-horizontal-padding !default;
12
+
13
+ $u-data-table-column-vertical-padding: .8125rem !default;
14
+ $u-data-table-column-header-vertical-padding: 1rem !default;
15
+ $u-data-table-column-header-font-size: .8125rem !default;
16
+ $u-data-table-column-header-font-weight: var(--u-font-weight-medium) !default;
17
+ $u-data-table-column-header-line-height: 1rem !default;
18
+
19
+ $u-data-table-card-footer-height: 4rem !default;
20
+ $u-data-table-card-footer-font-size: .75rem !default;
21
+ $u-data-table-card-footer-font-weight: var(--u-font-weight-regular) !default;
22
+
23
+ $u-data-table-content-font-size: .875rem !default;
24
+ $u-data-table-content-font-weight: var(--u-font-weight-medium) !default;
@@ -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,21 @@
1
+ @use "../variables";
2
+
3
+ @function breakpoint-min($name) {
4
+ $min: map-get(variables.$breakpoints, $name);
5
+ @return if($min != 0, $min, null);
6
+ }
7
+
8
+ @function breakpoint-infix($name) {
9
+ @return if(breakpoint-min($name) == null, "", "-#{$name}");
10
+ }
11
+
12
+ @mixin media-breakpoint-up($name) {
13
+ $min: breakpoint-min($name);
14
+ @if $min {
15
+ @media (min-width: $min) {
16
+ @content;
17
+ }
18
+ } @else {
19
+ @content;
20
+ }
21
+ }
@@ -0,0 +1,6 @@
1
+ @use "sass:color";
2
+
3
+ @mixin _color-vars($color-name, $color-value) {
4
+ --u-color-#{$color-name}: #{$color-value};
5
+ --u-color-#{$color-name}-rgb: #{color.red($color-value)},#{color.green($color-value)},#{color.blue($color-value)};
6
+ }
@@ -0,0 +1,33 @@
1
+ @use "sass:string";
2
+
3
+ @mixin _current-color-vars-important($current-color-rgb) {
4
+ --u-current-text-color-rgb: #{$current-color-rgb} !important;
5
+ --u-text-opacity: 1;
6
+ color: rgba(var(--u-current-text-color-rgb), var(--u-text-opacity)) !important;
7
+ }
8
+
9
+ @mixin _bg-variant-important($color-name) {
10
+ .u-bg-#{$color-name} {
11
+ background-color: var(--u-color-#{$color-name}) !important;
12
+ }
13
+ }
14
+
15
+ @mixin _text-bg-variant-important($color-name, $on-color-name: null) {
16
+
17
+ @if $on-color-name == null {
18
+ $on-color-name: on-#{$color-name};
19
+ }
20
+
21
+ $container-index: string.index($on-color-name, "surface-container");
22
+ @if $container-index != null {
23
+ $on-color-name: #{string.slice($on-color-name, 1, $container-index - 1)}surface;
24
+ }
25
+
26
+ .u-text-bg-#{$color-name} {
27
+ @include _current-color-vars-important(var(--u-color-#{$on-color-name}-rgb));
28
+ background-color: var(--u-color-#{$color-name}) !important;
29
+
30
+ --u-divider-color: rgb(var(--u-current-text-color-rgb)) !important;
31
+ --u-divider-opacity: .4 !important;
32
+ }
33
+ }
@@ -0,0 +1,26 @@
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
+ }
@@ -0,0 +1,38 @@
1
+ @use "sass:string";
2
+
3
+ @use "../variables";
4
+ @import "../mixins/text-bg";
5
+
6
+ @each $color in variables.$color-roles {
7
+
8
+ @include _text-bg-variant-important($color);
9
+ @include _text-bg-variant-important(inverse-#{$color});
10
+
11
+ @include _bg-variant-important($color);
12
+ @include _bg-variant-important(inverse-#{$color});
13
+ }
14
+
15
+ @each $color in variables.$fixed-colors {
16
+ @include _text-bg-variant-important($color);
17
+ @include _text-bg-variant-important(#{$color}-container);
18
+
19
+ @include _bg-variant-important($color);
20
+ @include _bg-variant-important(#{$color}-container);
21
+ }
22
+
23
+ @each $color in variables.$theme-colors {
24
+ @include _text-bg-variant-important(#{$color}-fixed);
25
+ @include _text-bg-variant-important(#{$color}-fixed-dim, on-#{$color}-fixed);
26
+ @include _bg-variant-important(#{$color}-fixed);
27
+ @include _bg-variant-important(#{$color}-fixed-dim);
28
+ }
29
+
30
+ @include _text-bg-variant-important(body);
31
+ @include _text-bg-variant-important(inverse-body);
32
+ @include _text-bg-variant-important(light);
33
+ @include _text-bg-variant-important(dark);
34
+
35
+ @include _bg-variant-important(body);
36
+ @include _bg-variant-important(inverse-body);
37
+ @include _bg-variant-important(light);
38
+ @include _bg-variant-important(dark);
@@ -0,0 +1,73 @@
1
+ @use "sass:list";
2
+ @use "sass:map";
3
+ @use "sass:string";
4
+
5
+ @use "../variables";
6
+ @import "../mixins/text-bg";
7
+
8
+ @mixin _text-variant-block($name, $color-name) {
9
+
10
+ @if string.index($name, "-container") == null and string.index($name, "-surface") == null {
11
+ @include _text-variant($name, $color-name);
12
+ @include _text-variant($name, $color-name, inverse-);
13
+ }
14
+
15
+ @include _text-variant($name, $color-name, on-);
16
+ @include _text-variant($name, $color-name, on-inverse-);
17
+ }
18
+
19
+ @mixin _text-variant($name, $color-name: null, $prefix: '') {
20
+
21
+ @if ($color-name == null) {
22
+ $color-name: $name;
23
+ }
24
+
25
+ .u-text-#{$prefix}#{$name} {
26
+ @include _current-color-vars-important(var(--u-color-#{$prefix}#{$color-name}-rgb));
27
+ }
28
+ }
29
+
30
+ @each $weight, $value in variables.$font-weights {
31
+ .u-font-weight-#{$weight} {
32
+ font-weight: var(--u-font-weight-#{$weight}) !important;
33
+ }
34
+ }
35
+
36
+
37
+ @each $color in variables.$color-roles {
38
+ @include _text-variant-block($color, $color);
39
+ }
40
+
41
+ @each $color in variables.$fixed-colors {
42
+ @include _text-variant($color);
43
+ @include _text-variant(on-#{$color});
44
+ @include _text-variant(#{$color}-container);
45
+ @include _text-variant(on-#{$color}-container);
46
+ }
47
+
48
+ @each $color in variables.$theme-colors {
49
+ @include _text-variant(#{$color}-fixed);
50
+ @include _text-variant(#{$color}-fixed-dim);
51
+ @include _text-variant(on-#{$color}-fixed);
52
+ @include _text-variant(on-#{$color}-fixed-variant);
53
+ }
54
+
55
+ @include _text-variant(on-body);
56
+ @include _text-variant(on-inverse-body);
57
+ @include _text-variant(on-light);
58
+ @include _text-variant(on-dark);
59
+
60
+ .u-text-high-emphasis {
61
+ --u-text-opacity: var(--u-high-emphasis-opacity);
62
+ color: rgba(var(--u-current-text-color-rgb), var(--u-text-opacity)) !important;
63
+ }
64
+ .u-text-low-emphasis {
65
+ --u-text-opacity: var(--u-low-emphasis-opacity);
66
+ color: rgba(var(--u-current-text-color-rgb), var(--u-text-opacity)) !important;
67
+ }
68
+
69
+ .u-text-lower-emphasis {
70
+ --u-text-opacity: var(--u-lower-emphasis-opacity);
71
+ color: rgba(var(--u-current-text-color-rgb), var(--u-text-opacity)) !important;
72
+ }
73
+
@@ -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,7 @@
1
+ @import "css-vars";
2
+ @import "common";
3
+ @import "data-table/data-table";
4
+ @import "text-bg/text-bg";
5
+ @import "text-bg/text";
6
+ @import "typo/font";
7
+ @import "typo/typo";
@@ -2,7 +2,7 @@ import { css } from 'lit';
2
2
  export const styles = css `
3
3
  :host,
4
4
  * {
5
- font-family: var(--u-font-family-base, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");
5
+ font-family: var(--u-font-family, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
6
6
  box-sizing: border-box;
7
7
  }
8
8
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"base.styles.js","sourceRoot":"","sources":["../../src/shared/base.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;CAMzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host,\n * {\n font-family: var(--u-font-family-base, system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\");\n box-sizing: border-box;\n }\n`;\n"]}
1
+ {"version":3,"file":"base.styles.js","sourceRoot":"","sources":["../../src/shared/base.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;CAMzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host,\n * {\n font-family: var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n box-sizing: border-box;\n }\n`;\n"]}
@@ -0,0 +1,35 @@
1
+ import { HTMLTemplateResult, LitElement, nothing } from 'lit';
2
+ import '../elevation/elevation';
3
+ import '../ripple/ripple';
4
+ export declare abstract class UmButtonWrapper extends LitElement {
5
+ /**
6
+ * Whether the button is disabled or not.
7
+ */
8
+ disabled: boolean;
9
+ /**
10
+ * The URL that the link button points to.
11
+ */
12
+ href: string | undefined;
13
+ /**
14
+ * Where to display the linked `href` URL for a link button. Common options
15
+ * include `_blank` to open in a new tab.
16
+ */
17
+ target: string | undefined;
18
+ name: string | undefined;
19
+ private readonly buttonElement;
20
+ private readonly ripple;
21
+ get pathname(): string;
22
+ protected render(): import("lit-html").TemplateResult<1>;
23
+ private renderButton;
24
+ private renderLink;
25
+ protected abstract renderContent(): HTMLTemplateResult;
26
+ connectedCallback(): void;
27
+ disconnectedCallback(): void;
28
+ focus(): void;
29
+ blur(): void;
30
+ protected getAriaLabel(): string | null | typeof nothing;
31
+ private innerFocusHandler;
32
+ private innerClickHandler;
33
+ protected handleClick(_: UIEvent): void;
34
+ }
35
+ //# sourceMappingURL=button-wrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-wrapper.d.ts","sourceRoot":"","sources":["../../src/shared/button-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,kBAAkB,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAGpE,OAAO,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAG1B,8BAAsB,eAAgB,SAAQ,UAAU;IAEtD;;OAEG;IACuC,QAAQ,UAAS;IAE3D;;OAEG;IACS,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACS,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAE3B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAEnB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAe;IAC5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IAEtD,IAAI,QAAQ,IAAI,MAAM,CAErB;cAEkB,MAAM;IAMzB,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,UAAU;IAclB,SAAS,CAAC,QAAQ,CAAC,aAAa,IAAI,kBAAkB;IAE7C,iBAAiB;IAOjB,oBAAoB;IAOpB,KAAK;IAIL,IAAI;IAKb,SAAS,CAAC,YAAY,IAAI,MAAM,GAAG,IAAI,GAAG,OAAO,OAAO;IAIxD,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,iBAAiB;IAazB,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;CAGxC"}
@@ -0,0 +1,110 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { html, LitElement, nothing } from 'lit';
8
+ import { property, query } from 'lit/decorators.js';
9
+ import '../elevation/elevation';
10
+ import '../ripple/ripple';
11
+ export class UmButtonWrapper extends LitElement {
12
+ constructor() {
13
+ super(...arguments);
14
+ /**
15
+ * Whether the button is disabled or not.
16
+ */
17
+ this.disabled = false;
18
+ }
19
+ get pathname() {
20
+ return this.buttonElement?.pathname;
21
+ }
22
+ render() {
23
+ return typeof this.href === 'string'
24
+ ? this.renderLink()
25
+ : this.renderButton();
26
+ }
27
+ renderButton() {
28
+ return html `
29
+ <button
30
+ id="button"
31
+ class="button"
32
+ ?disabled=${this.disabled}
33
+ aria-label="${this.getAriaLabel()}"
34
+ type="button">
35
+ <u-ripple ?disabled=${this.disabled}></u-ripple>
36
+ <u-elevation></u-elevation>
37
+ </button>
38
+ <div class="content">${this.renderContent()}</div>`;
39
+ }
40
+ renderLink() {
41
+ return html `<a
42
+ id="link"
43
+ class="button"
44
+ href=${this.disabled ? nothing : this.href}
45
+ aria-disabled=${this.disabled || nothing}
46
+ aria-label="${this.getAriaLabel()}"
47
+ target=${this.target || nothing}>
48
+ <u-elevation></u-elevation>
49
+ <u-ripple ?disabled=${this.disabled}></u-ripple>
50
+ </a>
51
+ <div class="content">${this.renderContent()}</div>`;
52
+ }
53
+ connectedCallback() {
54
+ super.connectedCallback();
55
+ this.addEventListener('click', this.innerClickHandler);
56
+ this.addEventListener('focus', this.innerFocusHandler);
57
+ }
58
+ disconnectedCallback() {
59
+ super.disconnectedCallback();
60
+ this.removeEventListener('click', this.innerClickHandler);
61
+ this.removeEventListener('focus', this.innerFocusHandler);
62
+ }
63
+ focus() {
64
+ this.buttonElement?.focus();
65
+ }
66
+ blur() {
67
+ this.buttonElement?.blur();
68
+ }
69
+ getAriaLabel() {
70
+ return this.ariaLabel || nothing;
71
+ }
72
+ innerFocusHandler() {
73
+ const tabIndexAttributeValue = this.getAttribute('tabindex');
74
+ if (tabIndexAttributeValue !== "0") {
75
+ return;
76
+ }
77
+ this.removeAttribute('tabindex');
78
+ setTimeout(() => this.buttonElement?.focus());
79
+ }
80
+ innerClickHandler(event) {
81
+ if (this.disabled) {
82
+ return;
83
+ }
84
+ if (!event.pointerType) {
85
+ this.ripple.createRipple();
86
+ }
87
+ this.handleClick(event);
88
+ }
89
+ handleClick(_) {
90
+ }
91
+ }
92
+ __decorate([
93
+ property({ type: Boolean, reflect: true })
94
+ ], UmButtonWrapper.prototype, "disabled", void 0);
95
+ __decorate([
96
+ property()
97
+ ], UmButtonWrapper.prototype, "href", void 0);
98
+ __decorate([
99
+ property()
100
+ ], UmButtonWrapper.prototype, "target", void 0);
101
+ __decorate([
102
+ property()
103
+ ], UmButtonWrapper.prototype, "name", void 0);
104
+ __decorate([
105
+ query('.button')
106
+ ], UmButtonWrapper.prototype, "buttonElement", void 0);
107
+ __decorate([
108
+ query('u-ripple')
109
+ ], UmButtonWrapper.prototype, "ripple", void 0);
110
+ //# sourceMappingURL=button-wrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-wrapper.js","sourceRoot":"","sources":["../../src/shared/button-wrapper.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAsB,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAG1B,MAAM,OAAgB,eAAgB,SAAQ,UAAU;IAAxD;;QAEE;;WAEG;QACuC,aAAQ,GAAG,KAAK,CAAC;IAiH7D,CAAC;IA/FC,IAAI,QAAQ;QACV,OAA2B,IAAI,CAAC,aAAc,EAAE,QAAQ,CAAA;IAC1D,CAAC;IAEkB,MAAM;QACvB,OAAO,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ;YAClC,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE;YACnB,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;IAC1B,CAAC;IAEO,YAAY;QAClB,OAAO,IAAI,CAAA;;;;oBAIK,IAAI,CAAC,QAAQ;sBACX,IAAI,CAAC,YAAY,EAAE;;8BAEX,IAAI,CAAC,QAAQ;;;6BAGd,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;IAExD,CAAC;IAEO,UAAU;QAChB,OAAO,IAAI,CAAA;;;aAGF,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI;sBAC1B,IAAI,CAAC,QAAQ,IAAI,OAAO;oBAC1B,IAAI,CAAC,YAAY,EAAE;eACxB,IAAI,CAAC,MAAM,IAAI,OAAO;;4BAET,IAAI,CAAC,QAAQ;;2BAEd,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;IACtD,CAAC;IAIQ,iBAAiB;QACxB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACvD,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAA;IACxD,CAAC;IAEQ,oBAAoB;QAC3B,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAE7B,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC1D,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC5D,CAAC;IAEQ,KAAK;QACZ,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;IAEQ,IAAI;QAEX,IAAI,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC;IAC7B,CAAC;IAES,YAAY;QACpB,OAAO,IAAI,CAAC,SAAS,IAAI,OAAO,CAAC;IACnC,CAAC;IAEO,iBAAiB;QACvB,MAAM,sBAAsB,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAE7D,IAAI,sBAAsB,KAAK,GAAG,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QACjC,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC;IAChD,CAAC;IAEO,iBAAiB,CAAC,KAAiB;QAEzC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO;QACT,CAAC;QAED,IAAI,CAAgB,KAAM,CAAC,WAAW,EAAE,CAAC;YACvC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAES,WAAW,CAAC,CAAU;IAEhC,CAAC;CACF;AAjH2C;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;iDAAkB;AAK/C;IAAX,QAAQ,EAAE;6CAA0B;AAMzB;IAAX,QAAQ,EAAE;+CAA4B;AAE3B;IAAX,QAAQ,EAAE;6CAA0B;AAEF;IAAlC,KAAK,CAAC,SAAS,CAAC;sDAA8C;AAC3B;IAAnC,KAAK,CAAC,UAAU,CAAC;+CAAoC","sourcesContent":["import { html, HTMLTemplateResult, LitElement, nothing } from 'lit';\nimport { property, query } from 'lit/decorators.js';\n\nimport '../elevation/elevation';\nimport '../ripple/ripple';\nimport { UmRipple } from '../ripple/ripple';\n\nexport abstract class UmButtonWrapper extends LitElement {\n\n /**\n * Whether the button is disabled or not.\n */\n @property({type: Boolean, reflect: true}) disabled = false;\n\n /**\n * The URL that the link button points to.\n */\n @property() href: string | undefined;\n\n /**\n * Where to display the linked `href` URL for a link button. Common options\n * include `_blank` to open in a new tab.\n */\n @property() target: string | undefined;\n\n @property() name: string | undefined;\n\n @query('.button') private readonly buttonElement!: HTMLElement;\n @query('u-ripple') private readonly ripple!: UmRipple;\n\n get pathname(): string {\n return (<HTMLAnchorElement>this.buttonElement)?.pathname\n }\n\n protected override render() {\n return typeof this.href === 'string'\n ? this.renderLink()\n : this.renderButton();\n }\n\n private renderButton() {\n return html`\n <button\n id=\"button\"\n class=\"button\"\n ?disabled=${this.disabled}\n aria-label=\"${this.getAriaLabel()}\"\n type=\"button\">\n <u-ripple ?disabled=${this.disabled}></u-ripple>\n <u-elevation></u-elevation>\n </button>\n <div class=\"content\">${this.renderContent()}</div>`;\n\n }\n\n private renderLink() {\n return html`<a\n id=\"link\"\n class=\"button\"\n href=${this.disabled ? nothing : this.href}\n aria-disabled=${this.disabled || nothing}\n aria-label=\"${this.getAriaLabel()}\"\n target=${this.target || nothing}>\n <u-elevation></u-elevation>\n <u-ripple ?disabled=${this.disabled}></u-ripple>\n </a>\n <div class=\"content\">${this.renderContent()}</div>`;\n }\n\n protected abstract renderContent(): HTMLTemplateResult;\n\n override connectedCallback() {\n super.connectedCallback();\n\n this.addEventListener('click', this.innerClickHandler);\n this.addEventListener('focus', this.innerFocusHandler)\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n\n this.removeEventListener('click', this.innerClickHandler);\n this.removeEventListener('focus', this.innerFocusHandler);\n }\n\n override focus() {\n this.buttonElement?.focus();\n }\n\n override blur() {\n\n this.buttonElement?.blur();\n }\n\n protected getAriaLabel(): string | null | typeof nothing {\n return this.ariaLabel || nothing;\n }\n\n private innerFocusHandler(): void {\n const tabIndexAttributeValue = this.getAttribute('tabindex');\n\n if (tabIndexAttributeValue !== \"0\") {\n return;\n }\n \n this.removeAttribute('tabindex');\n setTimeout(() => this.buttonElement?.focus());\n }\n\n private innerClickHandler(event: MouseEvent): void {\n\n if (this.disabled) {\n return;\n }\n\n if (!(<PointerEvent>event).pointerType) {\n this.ripple.createRipple();\n }\n\n this.handleClick(event);\n }\n\n protected handleClick(_: UIEvent): void {\n\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const styles: import("lit").CSSResult;
2
+ //# sourceMappingURL=button-wrapper.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-wrapper.styles.d.ts","sourceRoot":"","sources":["../../src/shared/button-wrapper.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBA0FlB,CAAC"}
@@ -3,14 +3,11 @@ export const styles = css `
3
3
  :host {
4
4
  --_color-primary: var(--u-color-primary, rgb(103, 80, 164));
5
5
  -webkit-tap-highlight-color: transparent;
6
- display: inline-flex;
7
- align-items: center;
8
- justify-content: center;
9
- vertical-align: baseline;
6
+ --u-elevation-level: 0;
10
7
  position: relative;
11
- white-space: nowrap;
12
- font-family: var(--u-font-family-base, system-ui);
13
- transition: color 150ms ease-in-out, background-color 150ms ease-in-out;
8
+ display: inline-block;
9
+ font-family: var(--u-font-family, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
10
+ appearance: none !important;
14
11
  }
15
12
 
16
13
  :host([disabled]) {
@@ -34,7 +31,10 @@ export const styles = css `
34
31
  .button {
35
32
  cursor: pointer;
36
33
  position: absolute;
37
- inset: 0;
34
+ inset-inline-start: 0;
35
+ inset-block-start: 0;
36
+ width: 100%;
37
+ height: 100%;
38
38
  font-family: inherit;
39
39
  border-radius: inherit;
40
40
  color: inherit;
@@ -50,12 +50,30 @@ export const styles = css `
50
50
  z-index: 0;
51
51
  }
52
52
 
53
+ .content {
54
+ display: inline-flex;
55
+ align-items: center;
56
+ justify-content: center;
57
+ white-space: nowrap;
58
+ width: 100%;
59
+ height: 100%;
60
+ }
61
+
53
62
  .button:focus-visible {
54
63
  animation: offset-pulse 400ms ease;
55
64
  animation-fill-mode: forwards;
56
65
  outline-offset: 2px;
57
66
  }
58
67
 
68
+ .icon {
69
+ display: flex;
70
+ justify-content: center;
71
+ align-items: center;
72
+ width: 1em;
73
+ height: 1em;
74
+ line-height: 1em;
75
+ }
76
+
59
77
  ::slotted([slot=icon]) {
60
78
  display: inline-block;
61
79
  }
@@ -72,4 +90,4 @@ export const styles = css `
72
90
  }
73
91
  }
74
92
  `;
75
- //# sourceMappingURL=button-base.styles.js.map
93
+ //# sourceMappingURL=button-wrapper.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-wrapper.styles.js","sourceRoot":"","sources":["../../src/shared/button-wrapper.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FzB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css `\n :host {\n --_color-primary: var(--u-color-primary, rgb(103, 80, 164));\n -webkit-tap-highlight-color: transparent;\n --u-elevation-level: 0;\n position: relative;\n display: inline-block;\n font-family: var(--u-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", \"Liberation Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n appearance: none !important;\n }\n\n :host([disabled]) {\n --u-elevation-level: 0 !important;\n background-color: var(--u-button-disabled-background-color, rgba(var(--u-color-on-surface-rgb, 29, 27, 32), 0.12)) !important;\n color: var(--u-button-disabled-text-color, rgba(var(--u-color-on-surface-rgb, 29, 27, 32), 0.38)) !important;\n }\n\n :host([disabled]) .button {\n cursor: default;\n }\n\n * {\n color: inherit;\n }\n\n u-elevation {\n z-index: -1;\n }\n\n .button {\n cursor: pointer;\n position: absolute;\n inset-inline-start: 0;\n inset-block-start: 0;\n width: 100%;\n height: 100%;\n font-family: inherit;\n border-radius: inherit;\n color: inherit;\n border: none;\n margin: 0;\n padding: 0;\n text-align: center;\n white-space: nowrap;\n background: transparent;\n user-select: none;\n text-decoration: none;\n outline: 0;\n z-index: 0;\n }\n\n .content {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n white-space: nowrap;\n width: 100%;\n height: 100%;\n }\n\n .button:focus-visible {\n animation: offset-pulse 400ms ease;\n animation-fill-mode: forwards;\n outline-offset: 2px;\n }\n\n .icon {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 1em;\n height: 1em;\n line-height: 1em;\n }\n\n ::slotted([slot=icon]) {\n display: inline-block;\n }\n\n @keyframes offset-pulse {\n 0% {\n outline: 4px solid var(--_color-primary);\n }\n 50% {\n outline: 8px solid var(--_color-primary);\n }\n 100% {\n outline: 4px solid var(--_color-primary);\n }\n }\n`;\n"]}
@@ -0,0 +1,38 @@
1
+ import { HTMLTemplateResult, LitElement } from 'lit';
2
+ export interface SnackbarConfig {
3
+ label: string;
4
+ duration?: SnackbarDuration;
5
+ buttonLabel?: string;
6
+ showClose?: boolean;
7
+ }
8
+ export declare enum SnackbarDuration {
9
+ short = 2500,
10
+ long = 5000,
11
+ infinite = -1
12
+ }
13
+ export declare class UmSnackbar extends LitElement {
14
+ static styles: import("lit").CSSResult[];
15
+ label: string;
16
+ buttonLabel: string;
17
+ showClose: boolean;
18
+ dismissed: boolean;
19
+ private duration;
20
+ private snackbar;
21
+ render(): HTMLTemplateResult;
22
+ private renderButton;
23
+ private renderCloseButton;
24
+ dismiss(): void;
25
+ private static _queue;
26
+ private static _consuming;
27
+ static show(label: string): UmSnackbar;
28
+ static show(config: SnackbarConfig): UmSnackbar;
29
+ private static consumeQueue;
30
+ private static showNext;
31
+ private static createSnackbar;
32
+ }
33
+ declare global {
34
+ interface HTMLElementTagNameMap {
35
+ 'u-snackbar': UmSnackbar;
36
+ }
37
+ }
38
+ //# sourceMappingURL=snackbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snackbar.d.ts","sourceRoot":"","sources":["../../src/snackbar/snackbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,kBAAkB,EAAE,UAAU,EAAW,MAAM,KAAK,CAAC;AAMpE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,oBAAY,gBAAgB;IAC1B,KAAK,OAAO;IACZ,IAAI,OAAO;IACX,QAAQ,KAAK;CACd;AAED,qBACa,UAAW,SAAQ,UAAU;IAExC,OAAgB,MAAM,4BAGpB;IAEyB,KAAK,EAAE,MAAM,CAAM;IACnB,WAAW,EAAE,MAAM,CAAM;IACe,SAAS,UAAS;IAC3C,SAAS,UAAS;IAE5D,OAAO,CAAC,QAAQ,CAAoB;IAChB,OAAO,CAAC,QAAQ,CAAe;IAE1C,MAAM,IAAI,kBAAkB;IASrC,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,IAAI,IAAI;IAiBf,OAAO,CAAC,MAAM,CAAC,MAAM,CAAoB;IACzC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAU;IAEnC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IACtC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU;IAqB/C,OAAO,CAAC,MAAM,CAAC,YAAY;IAQ3B,OAAO,CAAC,MAAM,CAAC,QAAQ;IAmBvB,OAAO,CAAC,MAAM,CAAC,cAAc;CAS9B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,UAAU,CAAC;KAC1B;CACF"}