godown 3.0.0 → 3.0.2

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 (251) hide show
  1. package/build/godown+lit.iife.js +12 -12
  2. package/build/godown+lit.iife.js.map +1 -1
  3. package/build/godown+lit.js +12 -12
  4. package/build/godown+lit.js.map +1 -1
  5. package/build/godown+lit.umd.js +12 -12
  6. package/build/godown+lit.umd.js.map +1 -1
  7. package/build/godown.iife.js +11 -11
  8. package/build/godown.js +11 -11
  9. package/build/godown.js.map +1 -1
  10. package/build/godown.umd.js +11 -11
  11. package/build/godown.umd.js.map +1 -1
  12. package/components/alert.d.ts.map +1 -1
  13. package/components/alert.js +1 -1
  14. package/components/alert.js.map +1 -1
  15. package/components/avatar.d.ts.map +1 -1
  16. package/components/avatar.js +1 -1
  17. package/components/avatar.js.map +1 -1
  18. package/components/badge.d.ts.map +1 -1
  19. package/components/badge.js +1 -1
  20. package/components/badge.js.map +1 -1
  21. package/components/breath.d.ts.map +1 -1
  22. package/components/breath.js +1 -1
  23. package/components/breath.js.map +1 -1
  24. package/components/button.d.ts.map +1 -1
  25. package/components/button.js +1 -1
  26. package/components/button.js.map +1 -1
  27. package/components/card.d.ts.map +1 -1
  28. package/components/card.js +1 -1
  29. package/components/card.js.map +1 -1
  30. package/components/carousel.d.ts.map +1 -1
  31. package/components/carousel.js +1 -1
  32. package/components/carousel.js.map +1 -1
  33. package/components/details.d.ts.map +1 -1
  34. package/components/details.js +1 -1
  35. package/components/details.js.map +1 -1
  36. package/components/dialog.d.ts +3 -2
  37. package/components/dialog.d.ts.map +1 -1
  38. package/components/dialog.js +1 -1
  39. package/components/dialog.js.map +1 -1
  40. package/components/divider.d.ts.map +1 -1
  41. package/components/divider.js +1 -1
  42. package/components/divider.js.map +1 -1
  43. package/components/dragbox.d.ts.map +1 -1
  44. package/components/dragbox.js +1 -1
  45. package/components/dragbox.js.map +1 -1
  46. package/components/flex.d.ts.map +1 -1
  47. package/components/flex.js.map +1 -1
  48. package/components/form.d.ts.map +1 -1
  49. package/components/form.js.map +1 -1
  50. package/components/grid.d.ts.map +1 -1
  51. package/components/grid.js.map +1 -1
  52. package/components/heading.d.ts.map +1 -1
  53. package/components/heading.js +1 -1
  54. package/components/heading.js.map +1 -1
  55. package/components/input.d.ts.map +1 -1
  56. package/components/input.js +1 -1
  57. package/components/input.js.map +1 -1
  58. package/components/layout.d.ts.map +1 -1
  59. package/components/layout.js +1 -1
  60. package/components/layout.js.map +1 -1
  61. package/components/link.js.map +1 -1
  62. package/components/progress.d.ts.map +1 -1
  63. package/components/progress.js +1 -1
  64. package/components/progress.js.map +1 -1
  65. package/components/range.d.ts.map +1 -1
  66. package/components/range.js +1 -1
  67. package/components/range.js.map +1 -1
  68. package/components/rotate.d.ts.map +1 -1
  69. package/components/rotate.js +1 -1
  70. package/components/rotate.js.map +1 -1
  71. package/components/router.d.ts +21 -26
  72. package/components/router.d.ts.map +1 -1
  73. package/components/router.js +1 -1
  74. package/components/router.js.map +1 -1
  75. package/components/select.d.ts.map +1 -1
  76. package/components/select.js +1 -1
  77. package/components/select.js.map +1 -1
  78. package/components/skeleton.d.ts.map +1 -1
  79. package/components/skeleton.js +1 -1
  80. package/components/skeleton.js.map +1 -1
  81. package/components/split.d.ts.map +1 -1
  82. package/components/split.js +1 -1
  83. package/components/split.js.map +1 -1
  84. package/components/switch.d.ts.map +1 -1
  85. package/components/switch.js +1 -1
  86. package/components/switch.js.map +1 -1
  87. package/components/text.d.ts.map +1 -1
  88. package/components/text.js +1 -1
  89. package/components/text.js.map +1 -1
  90. package/components/time.d.ts.map +1 -1
  91. package/components/time.js.map +1 -1
  92. package/components/tooltip.d.ts.map +1 -1
  93. package/components/tooltip.js +1 -1
  94. package/components/tooltip.js.map +1 -1
  95. package/components/typewriter.d.ts.map +1 -1
  96. package/components/typewriter.js +1 -1
  97. package/components/typewriter.js.map +1 -1
  98. package/core/global-style.d.ts.map +1 -1
  99. package/core/global-style.js +1 -1
  100. package/core/global-style.js.map +1 -1
  101. package/core/super-anchor.d.ts.map +1 -1
  102. package/core/super-anchor.js +1 -1
  103. package/core/super-anchor.js.map +1 -1
  104. package/core/super-input.d.ts +1 -0
  105. package/core/super-input.d.ts.map +1 -1
  106. package/core/super-input.js +1 -1
  107. package/core/super-input.js.map +1 -1
  108. package/core/super-openable.d.ts.map +1 -1
  109. package/core/super-openable.js.map +1 -1
  110. package/custom-elements.json +1 -1
  111. package/dev/components/alert.d.ts.map +1 -1
  112. package/dev/components/alert.js +82 -69
  113. package/dev/components/alert.js.map +1 -1
  114. package/dev/components/avatar.d.ts.map +1 -1
  115. package/dev/components/avatar.js +52 -36
  116. package/dev/components/avatar.js.map +1 -1
  117. package/dev/components/badge.d.ts.map +1 -1
  118. package/dev/components/badge.js +57 -50
  119. package/dev/components/badge.js.map +1 -1
  120. package/dev/components/breath.d.ts.map +1 -1
  121. package/dev/components/breath.js +20 -14
  122. package/dev/components/breath.js.map +1 -1
  123. package/dev/components/button.d.ts.map +1 -1
  124. package/dev/components/button.js +13 -13
  125. package/dev/components/button.js.map +1 -1
  126. package/dev/components/card.d.ts.map +1 -1
  127. package/dev/components/card.js +40 -35
  128. package/dev/components/card.js.map +1 -1
  129. package/dev/components/carousel.d.ts.map +1 -1
  130. package/dev/components/carousel.js +63 -43
  131. package/dev/components/carousel.js.map +1 -1
  132. package/dev/components/details.d.ts.map +1 -1
  133. package/dev/components/details.js +72 -61
  134. package/dev/components/details.js.map +1 -1
  135. package/dev/components/dialog.d.ts +3 -2
  136. package/dev/components/dialog.d.ts.map +1 -1
  137. package/dev/components/dialog.js +63 -65
  138. package/dev/components/dialog.js.map +1 -1
  139. package/dev/components/divider.d.ts.map +1 -1
  140. package/dev/components/divider.js +28 -23
  141. package/dev/components/divider.js.map +1 -1
  142. package/dev/components/dragbox.d.ts.map +1 -1
  143. package/dev/components/dragbox.js +19 -17
  144. package/dev/components/dragbox.js.map +1 -1
  145. package/dev/components/flex.d.ts.map +1 -1
  146. package/dev/components/flex.js +16 -11
  147. package/dev/components/flex.js.map +1 -1
  148. package/dev/components/form.d.ts.map +1 -1
  149. package/dev/components/form.js +4 -4
  150. package/dev/components/form.js.map +1 -1
  151. package/dev/components/grid.d.ts.map +1 -1
  152. package/dev/components/grid.js +16 -11
  153. package/dev/components/grid.js.map +1 -1
  154. package/dev/components/heading.d.ts.map +1 -1
  155. package/dev/components/heading.js +62 -40
  156. package/dev/components/heading.js.map +1 -1
  157. package/dev/components/input.d.ts.map +1 -1
  158. package/dev/components/input.js +32 -24
  159. package/dev/components/input.js.map +1 -1
  160. package/dev/components/layout.d.ts.map +1 -1
  161. package/dev/components/layout.js +43 -30
  162. package/dev/components/layout.js.map +1 -1
  163. package/dev/components/link.js +1 -1
  164. package/dev/components/link.js.map +1 -1
  165. package/dev/components/progress.d.ts.map +1 -1
  166. package/dev/components/progress.js +51 -42
  167. package/dev/components/progress.js.map +1 -1
  168. package/dev/components/range.d.ts.map +1 -1
  169. package/dev/components/range.js +33 -30
  170. package/dev/components/range.js.map +1 -1
  171. package/dev/components/rotate.d.ts.map +1 -1
  172. package/dev/components/rotate.js +12 -5
  173. package/dev/components/rotate.js.map +1 -1
  174. package/dev/components/router.d.ts +21 -26
  175. package/dev/components/router.d.ts.map +1 -1
  176. package/dev/components/router.js +22 -18
  177. package/dev/components/router.js.map +1 -1
  178. package/dev/components/select.d.ts.map +1 -1
  179. package/dev/components/select.js +65 -57
  180. package/dev/components/select.js.map +1 -1
  181. package/dev/components/skeleton.d.ts.map +1 -1
  182. package/dev/components/skeleton.js +65 -61
  183. package/dev/components/skeleton.js.map +1 -1
  184. package/dev/components/split.d.ts.map +1 -1
  185. package/dev/components/split.js +66 -58
  186. package/dev/components/split.js.map +1 -1
  187. package/dev/components/switch.d.ts.map +1 -1
  188. package/dev/components/switch.js +88 -79
  189. package/dev/components/switch.js.map +1 -1
  190. package/dev/components/text.d.ts.map +1 -1
  191. package/dev/components/text.js +51 -45
  192. package/dev/components/text.js.map +1 -1
  193. package/dev/components/time.d.ts.map +1 -1
  194. package/dev/components/time.js +13 -2
  195. package/dev/components/time.js.map +1 -1
  196. package/dev/components/tooltip.d.ts.map +1 -1
  197. package/dev/components/tooltip.js +31 -23
  198. package/dev/components/tooltip.js.map +1 -1
  199. package/dev/components/typewriter.d.ts.map +1 -1
  200. package/dev/components/typewriter.js +35 -27
  201. package/dev/components/typewriter.js.map +1 -1
  202. package/dev/core/global-style.d.ts.map +1 -1
  203. package/dev/core/global-style.js +9 -9
  204. package/dev/core/global-style.js.map +1 -1
  205. package/dev/core/super-anchor.d.ts.map +1 -1
  206. package/dev/core/super-anchor.js +27 -26
  207. package/dev/core/super-anchor.js.map +1 -1
  208. package/dev/core/super-input.d.ts +1 -0
  209. package/dev/core/super-input.d.ts.map +1 -1
  210. package/dev/core/super-input.js +87 -69
  211. package/dev/core/super-input.js.map +1 -1
  212. package/dev/core/super-openable.d.ts.map +1 -1
  213. package/dev/core/super-openable.js +1 -2
  214. package/dev/core/super-openable.js.map +1 -1
  215. package/package.json +3 -3
  216. package/src/components/alert.ts +84 -75
  217. package/src/components/avatar.ts +54 -40
  218. package/src/components/badge.ts +68 -65
  219. package/src/components/breath.ts +23 -19
  220. package/src/components/button.ts +14 -14
  221. package/src/components/card.ts +42 -40
  222. package/src/components/carousel.ts +65 -47
  223. package/src/components/details.ts +74 -65
  224. package/src/components/dialog.ts +69 -66
  225. package/src/components/divider.ts +33 -30
  226. package/src/components/dragbox.ts +22 -22
  227. package/src/components/flex.ts +31 -28
  228. package/src/components/form.ts +7 -9
  229. package/src/components/grid.ts +31 -28
  230. package/src/components/heading.ts +67 -49
  231. package/src/components/input.ts +37 -31
  232. package/src/components/layout.ts +45 -34
  233. package/src/components/link.ts +1 -1
  234. package/src/components/progress.ts +53 -46
  235. package/src/components/range.ts +58 -52
  236. package/src/components/rotate.ts +15 -10
  237. package/src/components/router.ts +46 -46
  238. package/src/components/select.ts +74 -70
  239. package/src/components/skeleton.ts +67 -65
  240. package/src/components/split.ts +73 -69
  241. package/src/components/switch.ts +90 -83
  242. package/src/components/text.ts +53 -49
  243. package/src/components/time.ts +14 -3
  244. package/src/components/tooltip.ts +32 -24
  245. package/src/components/typewriter.ts +37 -31
  246. package/src/core/global-style.ts +11 -12
  247. package/src/core/super-anchor.ts +29 -30
  248. package/src/core/super-input.ts +91 -74
  249. package/src/core/super-openable.ts +2 -8
  250. package/vscode.html-custom-data.json +1 -1
  251. package/web-types.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { attr, godown, htmlSlot, htmlStyle, isNumerical, joinRules, styles } from "@godown/element";
2
- import { css, html, type TemplateResult } from "lit";
2
+ import { type TemplateResult, css, html } from "lit";
3
3
  import { property } from "lit/decorators.js";
4
4
 
5
5
  import { GlobalStyle } from "../core/global-style.js";
@@ -13,18 +13,16 @@ const protoName = "grid";
13
13
  * @category layout
14
14
  */
15
15
  @godown(protoName)
16
- @styles(
17
- css`
18
- :host,
19
- :host([contents]) [part=root] {
20
- display: grid;
21
- }
16
+ @styles(css`
17
+ :host,
18
+ :host([contents]) [part="root"] {
19
+ display: grid;
20
+ }
22
21
 
23
- [part=root] {
24
- display: contents;
25
- }
26
- `,
27
- )
22
+ [part="root"] {
23
+ display: contents;
24
+ }
25
+ `)
28
26
  class Grid extends GlobalStyle {
29
27
  /**
30
28
  * CSS property `gap`.
@@ -61,22 +59,27 @@ class Grid extends GlobalStyle {
61
59
  items: string;
62
60
 
63
61
  protected render(): TemplateResult<1> {
64
- return html`<div part="root" ${attr(this.observedRecord)}>
65
- ${[
66
- htmlSlot(),
67
- htmlStyle(
68
- joinRules({
69
- ":host": {
70
- gap: this.gap,
71
- "grid-template-columns": isNumerical(this.columns) ? `repeat(${this.columns},1fr)` : this.columns,
72
- "grid-template-rows": isNumerical(this.rows) ? `repeat(${this.rows},1fr)` : this.rows,
73
- "place-content": this.content,
74
- "place-items": this.items,
75
- },
76
- }),
77
- ),
78
- ]}
79
- </div>`;
62
+ return html`
63
+ <div
64
+ part="root"
65
+ ${attr(this.observedRecord)}
66
+ >
67
+ ${[
68
+ htmlSlot(),
69
+ htmlStyle(
70
+ joinRules({
71
+ ":host": {
72
+ gap: this.gap,
73
+ "grid-template-columns": isNumerical(this.columns) ? `repeat(${this.columns},1fr)` : this.columns,
74
+ "grid-template-rows": isNumerical(this.rows) ? `repeat(${this.rows},1fr)` : this.rows,
75
+ "place-content": this.content,
76
+ "place-items": this.items,
77
+ },
78
+ }),
79
+ ),
80
+ ]}
81
+ </div>
82
+ `;
80
83
  }
81
84
  }
82
85
 
@@ -1,5 +1,5 @@
1
1
  import { attr, godown, htmlSlot, styles } from "@godown/element";
2
- import { css, html, nothing, type TemplateResult } from "lit";
2
+ import { type TemplateResult, css, html, nothing } from "lit";
3
3
  import { property } from "lit/decorators.js";
4
4
 
5
5
  import { GlobalStyle } from "../core/global-style.js";
@@ -15,44 +15,42 @@ const protoName = "heading";
15
15
  * @category layout
16
16
  */
17
17
  @godown(protoName)
18
- @styles(
19
- css`
20
- :host {
21
- display: block;
22
- text-align: start;
23
- }
18
+ @styles(css`
19
+ :host {
20
+ display: block;
21
+ text-align: start;
22
+ }
24
23
 
25
- [part=anchor] {
26
- position: absolute;
27
- text-align: center;
28
- min-width: 1.25em;
29
- right: 100%;
30
- }
24
+ [part="anchor"] {
25
+ position: absolute;
26
+ text-align: center;
27
+ min-width: 1.25em;
28
+ right: 100%;
29
+ }
31
30
 
32
- [side=left] [part=anchor] {
33
- right: 100%;
34
- }
35
- [side=right] [part=anchor] {
36
- left: 100%;
37
- }
31
+ [side="left"] [part="anchor"] {
32
+ right: 100%;
33
+ }
34
+ [side="right"] [part="anchor"] {
35
+ left: 100%;
36
+ }
38
37
 
39
- a {
40
- color: inherit;
41
- }
38
+ a {
39
+ color: inherit;
40
+ }
42
41
 
43
- h1,
44
- h2,
45
- h3,
46
- h4,
47
- h5,
48
- h6 {
49
- direction: ltr;
50
- font-size: revert;
51
- position: relative;
52
- width: fit-content;
53
- }
54
- `,
55
- )
42
+ h1,
43
+ h2,
44
+ h3,
45
+ h4,
46
+ h5,
47
+ h6 {
48
+ direction: ltr;
49
+ font-size: revert;
50
+ position: relative;
51
+ width: fit-content;
52
+ }
53
+ `)
56
54
  class Heading extends GlobalStyle {
57
55
  /**
58
56
  * The heading level.
@@ -73,30 +71,50 @@ class Heading extends GlobalStyle {
73
71
  side: "left" | "right" = "left";
74
72
 
75
73
  protected render(): TemplateResult<1> {
76
- return html`<a part="root" href="${this.id ? "#" + this.id : nothing}" ${attr(this.observedRecord)}>
77
- ${
78
- this.wrapHeading(
79
- htmlSlot(),
80
- this.id ? html`<i part="anchor">${this.anchor}</i>` : "",
81
- )
82
- }
83
- </a> `;
74
+ return html`
75
+ <a
76
+ part="root"
77
+ href="${this.id ? "#" + this.id : nothing}"
78
+ ${attr(this.observedRecord)}
79
+ >
80
+ ${this.wrapHeading(
81
+ htmlSlot(),
82
+ this.id
83
+ ? html`
84
+ <i part="anchor">${this.anchor}</i>
85
+ `
86
+ : "",
87
+ )}
88
+ </a>
89
+ `;
84
90
  }
85
91
 
86
92
  protected wrapHeading(...children: any[]): TemplateResult<1> {
87
93
  switch (this.as) {
88
94
  case "h2":
89
- return html`<h2>${children}</h2>`;
95
+ return html`
96
+ <h2>${children}</h2>
97
+ `;
90
98
  case "h3":
91
- return html`<h3>${children}</h3>`;
99
+ return html`
100
+ <h3>${children}</h3>
101
+ `;
92
102
  case "h4":
93
- return html`<h4>${children}</h4>`;
103
+ return html`
104
+ <h4>${children}</h4>
105
+ `;
94
106
  case "h5":
95
- return html`<h5>${children}</h5>`;
107
+ return html`
108
+ <h5>${children}</h5>
109
+ `;
96
110
  case "h6":
97
- return html`<h6>${children}</h6>`;
111
+ return html`
112
+ <h6>${children}</h6>
113
+ `;
98
114
  default:
99
- return html`<h1>${children}</h1>`;
115
+ return html`
116
+ <h1>${children}</h1>
117
+ `;
100
118
  }
101
119
  }
102
120
  }
@@ -1,5 +1,5 @@
1
1
  import { attr, classList, godown, part, styles } from "@godown/element";
2
- import { css, html, nothing, type TemplateResult } from "lit";
2
+ import { type TemplateResult, css, html, nothing } from "lit";
3
3
  import { property } from "lit/decorators.js";
4
4
 
5
5
  import { cssGlobalVars } from "../core/global-style.js";
@@ -15,18 +15,16 @@ const protoName = "input";
15
15
  * @category input
16
16
  */
17
17
  @godown(protoName)
18
- @styles(
19
- css`
20
- :host {
21
- width: var(${cssGlobalVars.input}-width);
22
- height: var(${cssGlobalVars.input}-height);
23
- color: var(${cssGlobalVars.foreground});
24
- background: var(${cssGlobalVars.input}-background);
25
- border-radius: var(${cssGlobalVars.input}-radius);
26
- display: block;
27
- }
28
- `,
29
- )
18
+ @styles(css`
19
+ :host {
20
+ width: var(${cssGlobalVars.input}-width);
21
+ height: var(${cssGlobalVars.input}-height);
22
+ color: var(${cssGlobalVars.foreground});
23
+ background: var(${cssGlobalVars.input}-background);
24
+ border-radius: var(${cssGlobalVars.input}-radius);
25
+ display: block;
26
+ }
27
+ `)
30
28
  class Input extends SuperInput {
31
29
  type: "text" | "search" | "tel" | "url" | "email" | "password" = "text";
32
30
 
@@ -42,24 +40,32 @@ class Input extends SuperInput {
42
40
  protected _input: HTMLInputElement;
43
41
 
44
42
  protected render(): TemplateResult<1> {
45
- return html`<div part="root" ${attr(this.observedRecord)} class="${classList("input-field", this.variant)}">
46
- ${[
47
- this._renderPrefix(),
48
- html`<input
49
- part="input"
50
- type="${this.type}"
51
- id="${this.makeId}"
52
- .value="${this.value}"
53
- placeholder="${this.placeholder || nothing}"
54
- ?autofocus="${this.autofocus}"
55
- autocapitalize="${this.autocapitalize || nothing}"
56
- autocomplete="${this.autocomplete || nothing}"
57
- ?disabled="${this.disabled}"
58
- @input="${this._handleInput}"
59
- >`,
60
- this._renderSuffix(),
61
- ]}
62
- </div>`;
43
+ return html`
44
+ <div
45
+ part="root"
46
+ ${attr(this.observedRecord)}
47
+ class="${classList("input-field", this.variant)}"
48
+ >
49
+ ${[
50
+ this._renderPrefix(),
51
+ html`
52
+ <input
53
+ part="input"
54
+ type="${this.type}"
55
+ .value="${this.value}"
56
+ ?autofocus="${this.autofocus}"
57
+ ?disabled="${this.disabled}"
58
+ autocapitalize="${this.autocapitalize || nothing}"
59
+ autocomplete="${this.autocomplete || nothing}"
60
+ placeholder="${this.placeholder || nothing}"
61
+ id="${this.makeId}"
62
+ @input="${this._handleInput}"
63
+ />
64
+ `,
65
+ this._renderSuffix(),
66
+ ]}
67
+ </div>
68
+ `;
63
69
  }
64
70
 
65
71
  reset(): void {
@@ -1,5 +1,5 @@
1
1
  import { attr, godown, htmlSlot, styles } from "@godown/element";
2
- import { css, html, type TemplateResult } from "lit";
2
+ import { type TemplateResult, css, html } from "lit";
3
3
  import { property } from "lit/decorators.js";
4
4
 
5
5
  import { GlobalStyle } from "../core/global-style.js";
@@ -15,38 +15,36 @@ const protoName = "layout";
15
15
  * @category layout
16
16
  */
17
17
  @godown(protoName)
18
- @styles(
19
- css`
20
- :host,
21
- :host([contents]) [part=root] {
22
- min-height: 100%;
23
- display: flex;
24
- flex-direction: column;
25
- }
18
+ @styles(css`
19
+ :host,
20
+ :host([contents]) [part="root"] {
21
+ min-height: 100%;
22
+ display: flex;
23
+ flex-direction: column;
24
+ }
26
25
 
27
- [part=root] {
28
- display: contents;
29
- }
26
+ [part="root"] {
27
+ display: contents;
28
+ }
30
29
 
31
- [sticky] header {
32
- position: sticky;
33
- top: 0;
34
- z-index: 1;
35
- }
30
+ [sticky] header {
31
+ position: sticky;
32
+ top: 0;
33
+ z-index: 1;
34
+ }
36
35
 
37
- [part=main] {
38
- position: relative;
39
- flex: 1;
40
- width: 100%;
41
- }
36
+ [part="main"] {
37
+ position: relative;
38
+ flex: 1;
39
+ width: 100%;
40
+ }
42
41
 
43
- header,
44
- main,
45
- footer {
46
- width: 100%;
47
- }
48
- `,
49
- )
42
+ header,
43
+ main,
44
+ footer {
45
+ width: 100%;
46
+ }
47
+ `)
50
48
  class Layout extends GlobalStyle {
51
49
  /**
52
50
  * If true, remove the header slot.
@@ -67,11 +65,24 @@ class Layout extends GlobalStyle {
67
65
  sticky = false;
68
66
 
69
67
  protected render(): TemplateResult<1> {
70
- return html`<div part="root" ${attr(this.observedRecord)}>
71
- ${!this.noHeader ? html`<header part="header">${htmlSlot("header")}</header>` : ""}
72
- <main part="main">${htmlSlot()}</main>
73
- ${!this.noFooter ? html`<footer part="footer">${htmlSlot("footer")}</footer>` : ""}
74
- </div>`;
68
+ return html`
69
+ <div
70
+ part="root"
71
+ ${attr(this.observedRecord)}
72
+ >
73
+ ${!this.noHeader
74
+ ? html`
75
+ <header part="header">${htmlSlot("header")}</header>
76
+ `
77
+ : ""}
78
+ <main part="main">${htmlSlot()}</main>
79
+ ${!this.noFooter
80
+ ? html`
81
+ <footer part="footer">${htmlSlot("footer")}</footer>
82
+ `
83
+ : ""}
84
+ </div>
85
+ `;
75
86
  }
76
87
  }
77
88
 
@@ -35,7 +35,7 @@ class Link extends SuperAnchor {
35
35
  protected _handleClick(e: MouseEvent): void {
36
36
  if (this.type === "push" || this.type === "replace") {
37
37
  e.preventDefault();
38
- (history[`${this.type}State`])(null, "", this.href);
38
+ history[`${this.type}State`](null, "", this.href);
39
39
  if (!this.suppress) {
40
40
  Router.updateAll();
41
41
  }
@@ -1,8 +1,8 @@
1
1
  import { attr, godown, isNil, styles } from "@godown/element";
2
- import { css, html, type TemplateResult } from "lit";
2
+ import { type TemplateResult, css, html } from "lit";
3
3
  import { property } from "lit/decorators.js";
4
4
 
5
- import { cssGlobalVars, GlobalStyle } from "../core/global-style.js";
5
+ import { GlobalStyle, cssGlobalVars } from "../core/global-style.js";
6
6
 
7
7
  const protoName = "progress";
8
8
 
@@ -12,54 +12,52 @@ const protoName = "progress";
12
12
  * @category feedback
13
13
  */
14
14
  @godown(protoName)
15
- @styles(
16
- css`
17
- :host {
18
- width: 100%;
19
- height: 0.5em;
20
- border-radius: 0.25em;
21
- background: var(${cssGlobalVars.passive});
22
- color: var(${cssGlobalVars.active});
23
- }
15
+ @styles(css`
16
+ :host {
17
+ width: 100%;
18
+ height: 0.5em;
19
+ border-radius: 0.25em;
20
+ background: var(${cssGlobalVars.passive});
21
+ color: var(${cssGlobalVars.active});
22
+ }
24
23
 
25
- :host,
26
- [part=root] {
27
- display: block;
28
- }
24
+ :host,
25
+ [part="root"] {
26
+ display: block;
27
+ }
29
28
 
30
- [part=root] {
31
- height: inherit;
32
- z-index: 1;
33
- position: relative;
34
- border-radius: inherit;
35
- }
29
+ [part="root"] {
30
+ height: inherit;
31
+ z-index: 1;
32
+ position: relative;
33
+ border-radius: inherit;
34
+ }
36
35
 
37
- [part=value] {
38
- position: absolute;
39
- z-index: 2;
40
- top: 0;
36
+ [part="value"] {
37
+ position: absolute;
38
+ z-index: 2;
39
+ top: 0;
40
+ left: 0;
41
+ height: 100%;
42
+ border-radius: inherit;
43
+ transition: all 0.3s;
44
+ animation: progress 1.8s ease-in-out infinite alternate;
45
+ background: currentColor;
46
+ }
47
+
48
+ @keyframes progress {
49
+ from {
41
50
  left: 0;
42
- height: 100%;
43
- border-radius: inherit;
44
- transition: all 0.3s;
45
- animation: progress 1.8s ease-in-out infinite alternate;
46
- background: currentColor;
47
51
  }
48
-
49
- @keyframes progress {
50
- from {
51
- left: 0;
52
- }
53
- to {
54
- left: 80%;
55
- }
52
+ to {
53
+ left: 80%;
56
54
  }
55
+ }
57
56
 
58
- .static [part=value] {
59
- animation: none;
60
- }
61
- `,
62
- )
57
+ .static [part="value"] {
58
+ animation: none;
59
+ }
60
+ `)
63
61
  class Progress extends GlobalStyle {
64
62
  @property({ type: Number })
65
63
  max = 1;
@@ -77,9 +75,18 @@ class Progress extends GlobalStyle {
77
75
  width = this.parsePercent(this.value);
78
76
  className = "static";
79
77
  }
80
- return html`<div part="root" ${attr(this.observedRecord)} class="${className}">
81
- <i part="value" style="width:${width}%;"></i>
82
- </div>`;
78
+ return html`
79
+ <div
80
+ part="root"
81
+ ${attr(this.observedRecord)}
82
+ class="${className}"
83
+ >
84
+ <i
85
+ part="value"
86
+ style="width:${width}%;"
87
+ ></i>
88
+ </div>
89
+ `;
83
90
  }
84
91
 
85
92
  /**