@shortfuse/materialdesignweb 0.7.0 → 0.7.1-1

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 (141) hide show
  1. package/bin/generate-css.js +1 -2
  2. package/components/Badge.js +40 -3
  3. package/components/Body.js +16 -2
  4. package/components/BottomAppBar.js +25 -2
  5. package/components/Box.js +33 -3
  6. package/components/Button.js +146 -9
  7. package/components/Card.js +111 -3
  8. package/components/Checkbox.js +91 -3
  9. package/components/CheckboxIcon.js +92 -4
  10. package/components/Chip.js +38 -2
  11. package/components/Dialog.js +237 -3
  12. package/components/DialogActions.js +3 -2
  13. package/components/Divider.js +44 -3
  14. package/components/ExtendedFab.js +27 -2
  15. package/components/Fab.js +26 -2
  16. package/components/FilterChip.js +83 -2
  17. package/components/Headline.js +16 -2
  18. package/components/Icon.js +80 -4
  19. package/components/IconButton.js +153 -2
  20. package/components/Label.js +16 -2
  21. package/components/Layout.js +21 -3
  22. package/components/List.js +15 -2
  23. package/components/ListItem.js +229 -3
  24. package/components/ListOption.js +37 -3
  25. package/components/ListSelect.js +12 -2
  26. package/components/Menu.js +173 -3
  27. package/components/MenuItem.js +55 -2
  28. package/components/Nav.js +19 -2
  29. package/components/NavBar.js +37 -2
  30. package/components/NavBarItem.js +44 -2
  31. package/components/NavDrawer.js +34 -2
  32. package/components/NavDrawerItem.js +44 -2
  33. package/components/NavItem.js +183 -3
  34. package/components/NavRail.js +50 -2
  35. package/components/NavRailItem.js +25 -2
  36. package/components/Pane.js +263 -3
  37. package/components/Progress.js +469 -10
  38. package/components/Radio.js +97 -3
  39. package/components/RadioIcon.js +77 -5
  40. package/components/Ripple.js +76 -3
  41. package/components/SegmentedButton.js +97 -2
  42. package/components/SegmentedButtonGroup.js +15 -2
  43. package/components/Select.js +54 -2
  44. package/components/Shape.js +55 -18
  45. package/components/Slider.js +309 -3
  46. package/components/Snackbar.js +82 -2
  47. package/components/Surface.js +13 -4
  48. package/components/Switch.js +67 -4
  49. package/components/SwitchIcon.js +272 -5
  50. package/components/Tab.js +87 -3
  51. package/components/TabContent.js +21 -21
  52. package/components/TabList.js +131 -2
  53. package/components/TextArea.js +97 -3
  54. package/components/Title.js +16 -2
  55. package/components/Tooltip.js +42 -2
  56. package/components/TopAppBar.js +212 -3
  57. package/core/template.js +36 -9
  58. package/index.js +77 -0
  59. package/mixins/ControlMixin.js +65 -2
  60. package/mixins/DensityMixin.js +17 -3
  61. package/mixins/FlexableMixin.js +81 -3
  62. package/mixins/RippleMixin.js +15 -4
  63. package/mixins/ShapeMixin.js +279 -8
  64. package/mixins/StateMixin.js +87 -5
  65. package/mixins/SurfaceMixin.js +152 -3
  66. package/mixins/TextFieldMixin.js +661 -2
  67. package/mixins/ThemableMixin.js +206 -3
  68. package/mixins/TooltipTriggerMixin.js +30 -4
  69. package/mixins/TouchTargetMixin.js +29 -4
  70. package/package.json +3 -1
  71. package/theming/index.js +0 -121
  72. package/theming/loader.js +0 -2
  73. package/utils/svg.js +0 -117
  74. package/components/Badge.css +0 -30
  75. package/components/Body.css +0 -14
  76. package/components/BottomAppBar.css +0 -23
  77. package/components/Box.css +0 -31
  78. package/components/Button.css +0 -146
  79. package/components/Card.css +0 -109
  80. package/components/Checkbox.css +0 -77
  81. package/components/CheckboxIcon.css +0 -89
  82. package/components/Chip.css +0 -35
  83. package/components/Dialog.css +0 -235
  84. package/components/Divider.css +0 -41
  85. package/components/ExtendedFab.css +0 -24
  86. package/components/Fab.css +0 -23
  87. package/components/FilterChip.css +0 -80
  88. package/components/Headline.css +0 -14
  89. package/components/Icon.css +0 -76
  90. package/components/IconButton.css +0 -151
  91. package/components/Label.css +0 -14
  92. package/components/Layout.css +0 -19
  93. package/components/List.css +0 -12
  94. package/components/ListItem.css +0 -224
  95. package/components/ListOption.css +0 -34
  96. package/components/ListSelect.css +0 -9
  97. package/components/Menu.css +0 -171
  98. package/components/MenuItem.css +0 -53
  99. package/components/Nav.css +0 -17
  100. package/components/NavBar.css +0 -34
  101. package/components/NavBarItem.css +0 -41
  102. package/components/NavDrawer.css +0 -31
  103. package/components/NavDrawerItem.css +0 -42
  104. package/components/NavItem.css +0 -181
  105. package/components/NavRail.css +0 -47
  106. package/components/NavRailItem.css +0 -25
  107. package/components/Outline.css +0 -138
  108. package/components/Pane.css +0 -261
  109. package/components/Progress.css +0 -74
  110. package/components/ProgressCircle.css +0 -226
  111. package/components/ProgressLine.css +0 -155
  112. package/components/Radio.css +0 -83
  113. package/components/RadioIcon.css +0 -73
  114. package/components/Ripple.css +0 -74
  115. package/components/SegmentedButton.css +0 -94
  116. package/components/SegmentedButtonGroup.css +0 -12
  117. package/components/Select.css +0 -52
  118. package/components/Shape.css +0 -132
  119. package/components/Slider.css +0 -306
  120. package/components/Snackbar.css +0 -80
  121. package/components/Surface.css +0 -10
  122. package/components/Switch.css +0 -63
  123. package/components/SwitchIcon.css +0 -177
  124. package/components/SwitchIconAnimations.css +0 -89
  125. package/components/Tab.css +0 -85
  126. package/components/TabList.css +0 -129
  127. package/components/TextArea.css +0 -93
  128. package/components/Title.css +0 -14
  129. package/components/Tooltip.css +0 -40
  130. package/components/TopAppBar.css +0 -209
  131. package/mixins/ControlMixin.css +0 -57
  132. package/mixins/DensityMixin.css +0 -40
  133. package/mixins/FlexableMixin.css +0 -79
  134. package/mixins/RippleMixin.css +0 -12
  135. package/mixins/ShapeMixin.css +0 -135
  136. package/mixins/StateMixin.css +0 -82
  137. package/mixins/SurfaceMixin.css +0 -150
  138. package/mixins/TextFieldMixin.css +0 -657
  139. package/mixins/ThemableMixin.css +0 -204
  140. package/mixins/TooltipTriggerMixin.css +0 -27
  141. package/mixins/TouchTargetMixin.css +0 -26
@@ -1,138 +0,0 @@
1
- .outline {
2
- position: absolute;
3
- inset: 0;
4
-
5
- pointer-events: none;
6
-
7
- border-color: currentColor;
8
- border-radius: inherit;
9
- color: rgb(var(--mdw-color__outline));
10
- }
11
-
12
- .outline:is([pressed],[focused]) {
13
- color: rgb(var(--mdw-ink));
14
-
15
- transition-delay: 0;
16
- transition-duration: 0;
17
- }
18
-
19
- .outline[disabled] {
20
- color: rgba(var(--mdw-color__on-surface), 0.12);
21
- }
22
-
23
- .outline::before {
24
- content: '';
25
-
26
- position: absolute;
27
- inset: 0;
28
-
29
- border-style: solid;
30
- border-width: 1px;
31
-
32
- border-radius: inherit;
33
- }
34
-
35
- @supports(-webkit-mask-box-image: none) {
36
- .outline::before {
37
- content: none;
38
- }
39
-
40
- .outline::after {
41
- content: '';
42
-
43
- position: absolute;
44
- inset: 0;
45
-
46
- -webkit-mask-box-image: var(--mdw-shape__mask-image__edges)
47
- 8 fill /
48
- auto
49
- stretch;
50
-
51
- background-color: currentColor;
52
- }
53
-
54
- .outline-section {
55
- position: absolute;
56
- inset: 0;
57
- }
58
-
59
- .outline-section::before,
60
- .outline-section::after {
61
- content: "";
62
-
63
- position: absolute;
64
-
65
- max-block-size: 50%;
66
- max-inline-size: 50%;
67
-
68
- -webkit-mask-repeat: no-repeat;
69
- -webkit-mask-size: contain;
70
-
71
- background-color: currentColor;
72
-
73
- transition-duration: 200ms;
74
- /* stylelint-disable-next-line liberty/use-logical-spec */
75
- transition-property: width, height;
76
- }
77
-
78
- .outline-left::before {
79
- /* stylelint-disable-next-line liberty/use-logical-spec */
80
- left: calc(-1px * var(--mdw-shape__convex));
81
- inset-block-start: calc(-1px * var(--mdw-shape__convex));
82
-
83
- block-size: calc(var(--mdw-shape__size__top-left-size));
84
- inline-size: calc(var(--mdw-shape__size__top-left-size));
85
- /* stylelint-disable-next-line liberty/use-logical-spec */
86
- padding-right: calc(2px * var(--mdw-shape__convex));
87
- padding-block-end: calc(2px * var(--mdw-shape__convex));
88
-
89
- -webkit-mask-image: var(--mdw-shape__mask-image__top-left);
90
- }
91
-
92
- .outline-left::after {
93
- /* stylelint-disable-next-line liberty/use-logical-spec */
94
- left: calc(-1px * var(--mdw-shape__convex));
95
- inset-block-end: calc(-1px * var(--mdw-shape__convex));
96
-
97
- block-size: var(--mdw-shape__size__bottom-left-size);
98
- inline-size: var(--mdw-shape__size__bottom-left-size);
99
- /* stylelint-disable-next-line liberty/use-logical-spec */
100
- padding-right: calc(2px * var(--mdw-shape__convex));
101
- padding-block-start: calc(2px * var(--mdw-shape__convex));
102
-
103
- -webkit-mask-image: var(--mdw-shape__mask-image__bottom-left);
104
- -webkit-mask-position-y: 100%;
105
- }
106
-
107
- .outline-right::before {
108
- /* stylelint-disable-next-line liberty/use-logical-spec */
109
- right: calc(-1px * var(--mdw-shape__convex));
110
- inset-block-start: calc(-1px * var(--mdw-shape__convex));
111
-
112
- block-size: var(--mdw-shape__size__top-right-size);
113
- inline-size: var(--mdw-shape__size__top-right-size);
114
- /* stylelint-disable-next-line liberty/use-logical-spec */
115
- padding-left: calc(2px * var(--mdw-shape__convex));
116
- padding-block-end: calc(2px * var(--mdw-shape__convex));
117
-
118
- -webkit-mask-image: var(--mdw-shape__mask-image__top-right);
119
- -webkit-mask-position-x: 100%;
120
- }
121
-
122
- .outline-right::after {
123
- /* stylelint-disable-next-line liberty/use-logical-spec */
124
- right: calc(-1px * var(--mdw-shape__convex));
125
- inset-block-end: calc(-1px * var(--mdw-shape__convex));
126
-
127
- block-size: var(--mdw-shape__size__bottom-right-size);
128
- inline-size: var(--mdw-shape__size__bottom-right-size);
129
- /* stylelint-disable-next-line liberty/use-logical-spec */
130
- padding-left: calc(2px * var(--mdw-shape__convex));
131
- padding-block-start: calc(2px * var(--mdw-shape__convex));
132
-
133
- -webkit-mask-image: var(--mdw-shape__mask-image__bottom-right);
134
- -webkit-mask-position-x: 100%;
135
- -webkit-mask-position-y: 100%;
136
- }
137
-
138
- }
@@ -1,261 +0,0 @@
1
- /* https://m2.material.io/design/layout/responsive-layout-grid.html#columns-gutters-and-margins */
2
-
3
- /*
4
- * Window breakpoints
5
- * Compact (0 <= width < 600px):
6
- * * Single: 100vw - padding
7
- * * Padding: 16px
8
- * * Spacer: 0 (none)
9
- * Medium (600px <= width < 840px)
10
- * * Single: 100vw - padding - (?navrail)
11
- * * [Fixed]: 360px
12
- * * [Flexable]: 100vw - 360px - spacer - padding
13
- * * [Split] 50vw - ((padding + spacer) / 2)
14
- * * Padding: 24px
15
- * * Spacer: 24px
16
- * Expanded (840px <= width)
17
- * * Single: 100vw - padding - (?navrail | ?navdrawer)
18
- * * [Fixed] 360px
19
- * * [Flexable] 100vw - 360px - spacer - padding - (?navrail | ?navdrawer)
20
- * * [Split] 50vw - ((padding + spacer + (?navrail | ?navdrawer)) / 2)
21
- * * Padding: 24px
22
- * * Spacer: 24px
23
- *
24
- * | Screen size | Margin | Body | Layout columns |
25
- * |---------------------|---------|---------|----------------|
26
- * | Extra-small (phone) | | | |
27
- * | 0-631dp | 16dp | Scaling | 4 |
28
- * | 632 - 647 | Scaling | 600dp | 8 |
29
- * | Small (tablet) | | | |
30
- * | 648-887 | 24dp | Scaling | 8 |
31
- * | 888-1239 | Scaling | 840dp | 12 |
32
- * | Medium (laptop) | | | |
33
- * | 1240-1439 | 200dp | Scaling | 12 |
34
- * | Large (desktop) | | | |
35
- * | 1440+ | Scaling | 1040 | 12 |
36
- *
37
- *
38
- * Column count is pane-based, not window based requiring newly computed values.
39
- * Gutters are irrelevant to pane sizing.
40
- * Nav Rail is ~80px.
41
- * Nav Drawer is ~360px.
42
- * Padding and spacers are set by pane's parent.
43
- * Avoid using CSS Variables because panes are at top of document tree. https://bugs.chromium.org/p/chromium/issues/detail?id=1056209
44
- * Container queries would reduce code considerably.
45
- */
46
-
47
- /* Compact */
48
- :host {
49
- display: grid;
50
- align-content: flex-start;
51
- gap: 16px;
52
- grid-auto-flow: row;
53
- grid-template-columns: repeat(4, 1fr);
54
-
55
- max-inline-size: 600px;
56
-
57
- flex: 1;
58
-
59
- transition-duration: 200ms;
60
- /* stylelint-disable-next-line liberty/use-logical-spec */
61
- transition-property: visibility, width, max-inline-size;
62
- }
63
-
64
- /* Will set 8col when window is 600px + padding (2x16) */
65
- /* Will set 12col when window is 840px + padding (2x24) */
66
- @media screen and (min-width: 632px) { :host { grid-template-columns: repeat(8, 1fr); } }
67
- @media screen and (min-width: 888px) { :host { grid-template-columns: repeat(12, 1fr); } }
68
-
69
- /* Will cap to 840px when window is 600px + padding (2x24px) */
70
- /* Will cap to 1040px when window is 840px + padding (2x200px) */
71
- @media screen and (min-width: 648px) { :host { max-inline-size: 840px } }
72
- @media screen and (min-width: 1240px) { :host { max-inline-size: 1040px; } }
73
-
74
- /* NAVRAIL */
75
-
76
- :host([nav-rail]) {
77
- grid-template-columns: repeat(4, 1fr);
78
-
79
- max-inline-size: 600px;
80
- }
81
-
82
- /* Will set 8col when window is 600px + padding (2x24) + navrail (80) */
83
- /* Will set 12col when window is 840px + padding (2x24) + navrail (80) */
84
- @media screen and (min-width: 728px) { :host([nav-rail]) { grid-template-columns: repeat(8, 1fr); } }
85
- @media screen and (min-width: 968px) { :host([nav-rail]) { grid-template-columns: repeat(12, 1fr); } }
86
-
87
- /* Will cap to 840px when window is 600px + padding (2x24px) + navrail (80) */
88
- /* Will cap to 1040px when window is 840px + padding (2x200px) + navrail (80) */
89
- @media screen and (min-width: 728px) { :host([nav-rail]) { max-inline-size: 840px } }
90
- @media screen and (min-width: 1320px) { :host([nav-rail]) { max-inline-size: 1040px; } }
91
-
92
- /* NAVDRAWER */
93
-
94
- :host([nav-drawer]) {
95
- grid-template-columns: repeat(4, 1fr);
96
-
97
- max-inline-size: 600px;
98
- }
99
-
100
- /* Will set 8col when window is 600px + padding (2x24) + navdrawer (360) */
101
- /* Will set 12col when window is 840px + padding (2x24) + navdrawer (360) */
102
- @media screen and (min-width: 1008px) { :host([nav-rail]) { grid-template-columns: repeat(8, 1fr); } }
103
- @media screen and (min-width: 1248px) { :host([nav-rail]) { grid-template-columns: repeat(12, 1fr); } }
104
-
105
- /* Will cap to 840px when window is 600px + padding (2x24px) + navrail (360) */
106
- /* Will cap to 1040px when window is 840px + padding (2x200px) + navrail (360) */
107
- @media screen and (min-width: 1008px) { :host([nav-rail]) { max-inline-size: 840px } }
108
- @media screen and (min-width: 1600px) { :host([nav-rail]) { max-inline-size: 1040px; } }
109
-
110
- /* FLEXIBLE */
111
-
112
- :host([flexible]) {
113
- grid-template-columns: repeat(4, 1fr);
114
-
115
- max-inline-size: 600px;
116
- }
117
-
118
- /* Will set 8col when window is 600px + padding (2x24) + spacer (24) + fixed (360) */
119
- /* Will set 12col when window is 840px + padding (2x24) + spacer (24) + fixed (360) */
120
- @media screen and (min-width: 1032px) { :host([flexible]) { grid-template-columns: repeat(8, 1fr); } }
121
- @media screen and (min-width: 1272px) { :host([flexible]) { grid-template-columns: repeat(12, 1fr); } }
122
-
123
- /* Will cap to 840px when window is 600px + padding (2x24px) + spacer (24) + fixed (360) */
124
- /* Will cap to 1040px when window is 840px + padding (2x200px) + spacer (24) + fixed (360) */
125
- @media screen and (min-width: 1032px) { :host([flexible]) { max-inline-size: 840px } }
126
- @media screen and (min-width: 1624px) { :host([flexible]) { max-inline-size: 1040px; } }
127
-
128
- /* FLEXIBLE + NAV RAIL */
129
-
130
- :host([flexible]:where([nav-rail])) {
131
- grid-template-columns: repeat(4, 1fr);
132
-
133
- max-inline-size: 600px;
134
- }
135
-
136
- /* Will set 8col when window is 600px + padding (2x24) + spacer (24) + fixed (360) + navrail (80) */
137
- /* Will set 12col when window is 840px + padding (2x24) + spacer (24) + fixed (360) + navrail (80) */
138
- @media screen and (min-width: 1112px) { :host([flexible]:where([nav-rail])) { grid-template-columns: repeat(8, 1fr); } }
139
- @media screen and (min-width: 1352px) { :host([flexible]:where([nav-rail])) { grid-template-columns: repeat(12, 1fr); } }
140
-
141
- /* Will cap to 840px when window is 600px + padding (2x24px) + spacer (24) + fixed (360) + navrail (80) */
142
- /* Will cap to 1040px when window is 840px + padding (2x200px) + spacer (24) + fixed (360) + navrail (80) */
143
- @media screen and (min-width: 1112px) { :host([flexible]:where([nav-rail])) { max-inline-size: 840px } }
144
- @media screen and (min-width: 1704px) { :host([flexible]:where([nav-rail])) { max-inline-size: 1040px; } }
145
-
146
- /* FLEXIBLE + NAV DRAWER */
147
-
148
- :host([flexible]:where([nav-drawer])) {
149
- grid-template-columns: repeat(4, 1fr);
150
-
151
- max-inline-size: 600px;
152
- }
153
-
154
- /* Will set 8col when window is 600px + padding (2x24) + spacer (24) + fixed (360) + navdrawer (360) */
155
- /* Will set 12col when window is 840px + padding (2x24) + spacer (24) + fixed (360) + navdrawer (360) */
156
- @media screen and (min-width: 1392px) { :host([flexible]:where([nav-drawer])) { grid-template-columns: repeat(8, 1fr); } }
157
- @media screen and (min-width: 1632px) { :host([flexible]:where([nav-drawer])) { grid-template-columns: repeat(12, 1fr); } }
158
-
159
- /* Will cap to 840px when window is 600px + padding (2x24px) + spacer (24) + fixed (360) + navdrawer (360) */
160
- /* Will cap to 1040px when window is 840px + padding (2x200px) + spacer (24) + fixed (360) + navdrawer (360) */
161
- @media screen and (min-width: 1392px) { :host([flexible]:where([nav-drawer])) { max-inline-size: 840px } }
162
- @media screen and (min-width: 1984px) { :host([flexible]:where([nav-drawer])) { max-inline-size: 1040px; } }
163
-
164
- /* SPLIT */
165
-
166
- :host([split]) {
167
- grid-template-columns: repeat(4, 1fr);
168
-
169
- max-inline-size: 600px;
170
- }
171
-
172
- /* Will set 8col when window is 600px + padding (2x24) + spacer (24) + split (600) */
173
- /* Will set 12col when window is 840px + padding (2x24) + spacer (24) + split (840) */
174
- @media screen and (min-width: 1272px) { :host([split]) { grid-template-columns: repeat(8, 1fr); } }
175
- @media screen and (min-width: 1752px) { :host([split]) { grid-template-columns: repeat(12, 1fr); } }
176
-
177
- /* Will cap to 840px when window is 600px + padding (2x24px) + spacer (24) + split (600) */
178
- /* Will cap to 1040px when window is 840px + padding (2x200px) + spacer (24) + split (840) */
179
- @media screen and (min-width: 1272px) { :host([split]) { max-inline-size: 840px } }
180
- @media screen and (min-width: 2104px) { :host([split]) { max-inline-size: 1040px; } }
181
-
182
- /* SPLIT + NAVRAIL */
183
-
184
- :host([split]:where([nav-rail])) {
185
- grid-template-columns: repeat(4, 1fr);
186
-
187
- max-inline-size: 600px;
188
- }
189
-
190
- /* Will set 8col when window is 600px + padding (2x24) + spacer (24) + split (600) + navrail (80) */
191
- /* Will set 12col when window is 840px + padding (2x24) + spacer (24) + split (840) + navrail (80) */
192
- @media screen and (min-width: 1352px) { :host([split]:where([nav-rail])) { grid-template-columns: repeat(8, 1fr); } }
193
- @media screen and (min-width: 1832px) { :host([split]:where([nav-rail])) { grid-template-columns: repeat(12, 1fr); } }
194
-
195
- /* Will cap to 840px when window is 600px + padding (2x24px) + spacer (24) + split (600) + navrail (80) */
196
- /* Will cap to 1040px when window is 840px + padding (2x200px) + spacer (24) + split (840) + navrail (80) */
197
- @media screen and (min-width: 1352px) { :host([split]:where([nav-rail])) { max-inline-size: 840px } }
198
- @media screen and (min-width: 2184px) { :host([split]:where([nav-rail])) { max-inline-size: 1040px; } }
199
-
200
- /* SPLIT + NAVDRAWER */
201
-
202
- :host([split]:where([nav-drawer])) {
203
- grid-template-columns: repeat(4, 1fr);
204
-
205
- max-inline-size: 600px;
206
- }
207
-
208
- /* Will set 8col when window is 600px + padding (2x24) + spacer (24) + split (600) + navdrawer (360) */
209
- /* Will set 12col when window is 840px + padding (2x24) + spacer (24) + split (840) + navdrawer (360) */
210
- @media screen and (min-width: 1632px) { :host([split]:where([nav-drawer])) { grid-template-columns: repeat(8, 1fr); } }
211
- @media screen and (min-width: 2112px) { :host([split]:where([nav-drawer])) { grid-template-columns: repeat(12, 1fr); } }
212
-
213
- /* Will cap to 840px when window is 600px + padding (2x24px) + spacer (24) + split (600) + navdrawer (360) */
214
- /* Will cap to 1040px when window is 840px + padding (2x200px) + spacer (24) + split (840) + navdrawer (360) */
215
- @media screen and (min-width: 1632px) { :host([split]:where([nav-drawer])) { max-inline-size: 840px } }
216
- @media screen and (min-width: 2464px) { :host([split]:where([nav-drawer])) { max-inline-size: 1040px; } }
217
-
218
- :host([full-width]) {
219
- max-inline-size: none;
220
- }
221
-
222
- /** FIXED **/
223
-
224
- :host([fixed]) {
225
- grid-template-columns: repeat(4, 1fr);
226
-
227
- inline-size:360px;
228
- }
229
-
230
- @media screen and (max-width: 600px) {
231
- :host(:nth-of-type(2)) {
232
- display: none;
233
- }
234
- }
235
- /* Will cap to 360px when window is 360px + padding (2x24px) + spacer (24) + 360px */
236
- @media screen and (min-width: 792px) {
237
- :host([fixed]) {
238
- max-inline-size: 360px
239
- }
240
- }
241
-
242
- #scrim {
243
- position: absolute;
244
- inset: 0;
245
-
246
- grid-area: auto;
247
- }
248
-
249
- #slot::slotted(*) { grid-column: 1 / none }
250
- #slot::slotted([colspan="1"]) { grid-column-end: span 1; }
251
- #slot::slotted([colspan="2"]) { grid-column-end: span 2; }
252
- #slot::slotted([colspan="3"]) { grid-column-end: span 3; }
253
- #slot::slotted([colspan="4"]) { grid-column-end: span 4; }
254
- #slot::slotted([colspan="5"]) { grid-column-end: span 5; }
255
- #slot::slotted([colspan="6"]) { grid-column-end: span 6; }
256
- #slot::slotted([colspan="7"]) { grid-column-end: span 7; }
257
- #slot::slotted([colspan="8"]) { grid-column-end: span 8; }
258
- #slot::slotted([colspan="9"]) { grid-column-end: span 9; }
259
- #slot::slotted([colspan="10"]) { grid-column-end: span 10; }
260
- #slot::slotted([colspan="11"]) { grid-column-end: span 11; }
261
- #slot::slotted([colspan="12"]) { grid-column-end: span 12; }
@@ -1,74 +0,0 @@
1
- /* https://m3.material.io/components/progress-indicators/specs */
2
-
3
- :host {
4
- --mdw-bg: var(--mdw-color__surface-variant);
5
- --mdw-ink: var(--mdw-color__primary);
6
- --mdw-progress__opacity__duration: 500ms;
7
- position: relative;
8
-
9
- display: inline-block;
10
- overflow: hidden;
11
-
12
- min-block-size: 4px;
13
- inline-size: 100%;
14
-
15
- opacity: 1;
16
-
17
- background-color: rgb(var(--mdw-bg));
18
- color: rgb(var(--mdw-ink));
19
-
20
- transition: opacity 500ms 275ms;
21
- }
22
-
23
- :host([auto-hide]) {
24
- will-change: opacity;
25
- }
26
-
27
- :host([auto-hide][value="100"]) {
28
- opacity:0;
29
-
30
- transition: opacity 1s 1s;
31
- }
32
-
33
- #determinate {
34
- --previous: 0;
35
- --value: 0;
36
- }
37
-
38
- #progress {
39
- position: absolute;
40
- inset: 0;
41
-
42
- box-sizing: border-box;
43
- block-size: 100%;
44
- inline-size: 100%;
45
- border: none; /* FireFox */
46
-
47
- -moz-appearance: none;
48
- appearance: none;
49
-
50
- opacity:0;
51
- transform: scaleX(var(--value, 0));
52
- transform-origin: 0 0;
53
-
54
- background-color: currentColor;
55
- color: inherit;
56
-
57
- transition: transform 275ms, opacity var(--mdw-progress__opacity__duration);
58
- will-change: transform, opacity;
59
- }
60
-
61
- #progress::-webkit-progress-bar {
62
- display: none;
63
- }
64
-
65
- #progress::-moz-progress-bar {
66
- display: none; /* Doesn't always work */
67
-
68
- block-size: 0;
69
- }
70
-
71
- #progress[value] {
72
- opacity:1;
73
- transform: scaleX(var(--value, 0));
74
- }
@@ -1,226 +0,0 @@
1
- /** https://github.com/material-components/material-components-android/blob/ed77ab36ccac98df24e55060d58406c5981a9062/lib/java/com/google/android/material/progressindicator/CircularIndeterminateAnimatorDelegate.java */
2
-
3
- :host {
4
- --mdw-progress__circle__timing: cubic-bezier(0.4, 0.0, 0.2, 1);
5
- --mdw-progress__circle__margin: 4px;
6
- --mdw-progress__circle__duration: 5400ms;
7
- --mdw-progress__circle__duration__expand: 667ms;
8
- --mdw-progress__circle__duration__collapse: 667ms;
9
- --mdw-progress__circle__duration__fade-in: 333ms;
10
- --mdw-progress__circle__duration__complete-end: 333ms;
11
- }
12
-
13
- @media (prefers-reduced-motion) {
14
- :host {
15
- --mdw-progress__circle__duration: 54000ms;
16
- }
17
- }
18
-
19
- #circle {
20
- --startA: min(0.5, var(--previous));
21
- --endA: min(0.5, var(--value));
22
- --travelA: max(
23
- calc(var(--startA) - var(--endA)),
24
- calc(var(--endA) - var(--startA))
25
- );
26
- --delayA: max(0, calc(var(--previous) - 0.5));
27
- --startB: max(0, calc(var(--previous) - 0.5));
28
- --endB: max(0, calc(var(--value) - 0.5));
29
- --travelB: max(
30
- calc(var(--startB) - var(--endB)),
31
- calc(var(--endB) - var(--startB))
32
- );
33
- --delayB: max(0, 0.5 - calc(var(--previous)));
34
-
35
- position: absolute;
36
- inset: 0;
37
- }
38
-
39
- :host([circle]) {
40
- block-size: 48px;
41
- inline-size: 48px;
42
- }
43
-
44
- :host([circle]:not([color])) {
45
- background-color: transparent;
46
- }
47
-
48
- #progress[circle] {
49
- visibility: hidden;
50
- }
51
-
52
- .semi {
53
- position: absolute;
54
- inset: var(--mdw-progress__circle__margin);
55
-
56
- overflow: hidden;
57
-
58
- box-sizing: border-box;
59
- }
60
-
61
- #semi1 {
62
- inset-inline-start: 50%;
63
- }
64
-
65
- #semi2 {
66
- inset-inline-end: 50%;
67
- }
68
-
69
- .semi::after {
70
- content: "";
71
-
72
- position: absolute;
73
- inset: 0;
74
-
75
- box-sizing: border-box;
76
- border: solid currentcolor 4px;
77
-
78
- transform: rotate(var(--rotation));
79
-
80
- background-color: transparent;
81
- border-radius: 50%;
82
-
83
- transition: transform 400ms;
84
- transition-timing-function: linear;
85
- }
86
-
87
- #semi1::after {
88
- --rotation: min(180deg, calc(var(--value) * 360deg));
89
- inset-inline-start: -100%;
90
-
91
- clip-path: inset(0 50% 0 0);
92
-
93
- transition-delay: calc(var(--delayA) * var(--mdw-progress__circle__duration__expand));
94
- transition-duration: calc(var(--travelA) * var(--mdw-progress__circle__duration__expand));
95
- }
96
-
97
- #semi2::after {
98
- --rotation: max(0deg, calc(var(--value) * 360deg - 180deg));
99
- inset-inline-end: -100%;
100
-
101
- clip-path: inset(0 0 0 50%);
102
-
103
- transition-delay: calc(var(--delayB) * var(--mdw-progress__circle__duration__expand));
104
- transition-duration: calc(var(--travelB) * var(--mdw-progress__circle__duration__expand));
105
- }
106
-
107
- #indeterminate-circle {
108
- position: absolute;
109
- inset: 0;
110
-
111
- display: block;
112
-
113
- animation: rotate-cw calc(var(--mdw-progress__circle__duration) / 4) linear infinite;
114
- }
115
-
116
- .arc {
117
- position: absolute;
118
- inset: var(--mdw-progress__circle__margin);
119
-
120
- overflow: hidden;
121
-
122
- box-sizing: border-box;
123
-
124
- animation: rotate-jump var(--mdw-progress__circle__duration) steps(1,end) infinite;
125
- }
126
-
127
- .arc::after {
128
- content: "";
129
-
130
- position: absolute;
131
- inset: 0;
132
-
133
- box-sizing: border-box;
134
- border: solid currentcolor 4px;
135
-
136
- background-color: transparent;
137
- border-radius: 50%;
138
-
139
- animation: grow-shrink calc(var(--mdw-progress__circle__duration) / 4) var(--mdw-progress__circle__timing) infinite;
140
- }
141
-
142
- #arc2 {
143
- inset-block-end: 50%;
144
- inset-inline-start: 50%;
145
-
146
- transform-origin: 0 100%;
147
- }
148
-
149
- #arc3 {
150
- inset-block-start: 50%;
151
- inset-inline-end: 50%;
152
-
153
- transform-origin: 100% 0;
154
- }
155
-
156
- #arc4 {
157
- inset-block-start: 50%;
158
- inset-inline-start: 50%;
159
-
160
- transform-origin: 0 0;
161
- }
162
-
163
- #arc2:after {
164
- inset-block-end: -100%;
165
- inset-inline-start: -100%;
166
-
167
- clip-path: polygon(0% 0%, 50% 0%, 50% 50%, 100% 50%, 100% 100%, 0% 100%);
168
- }
169
-
170
- #arc3:after {
171
- inset-block-start: -100%;
172
- inset-inline-end: -100%;
173
-
174
- clip-path: inset(0 50% 50% 0);
175
- }
176
-
177
- #arc4:after {
178
- inset-block-start: -100%;
179
- inset-inline-start: -100%;
180
-
181
- clip-path: inset(0 50% 0 0);
182
- }
183
-
184
- @keyframes rotate-cw {
185
- from {
186
- transform: rotate(0deg);
187
- }
188
-
189
- to {
190
- transform: rotate(360deg);
191
- }
192
- }
193
-
194
- @keyframes rotate-jump {
195
- 0% { transform: scaleX(1) rotate(0deg); }
196
-
197
- 12.5% { transform: scaleX(-1) rotate(-270deg); }
198
-
199
- 25% { transform: scaleX(1) rotate(270deg); }
200
-
201
- 37.5% {transform: scaleX(-1) rotate(-180deg);}
202
-
203
- 50% { transform: scaleX(1) rotate(180deg); }
204
-
205
- 62.5% { transform: scaleX(-1) rotate(-90deg); }
206
-
207
- 75% { transform: scaleX(1) rotate(90deg); }
208
-
209
- 87.5% { transform: scaleX(-1) rotate(0deg); }
210
-
211
- to { transform: scaleX(1) rotate(0deg); }
212
- }
213
-
214
- @keyframes grow-shrink {
215
- from {
216
- transform: rotate(calc(0.01 * 360deg));
217
- }
218
-
219
- 50% {
220
- transform: rotate(calc(0.73 * 360deg));
221
- }
222
-
223
- to {
224
- transform: rotate(calc(0.01 * 360deg));
225
- }
226
- }