@timmo001/groundwork-ui 0.9.4 → 0.9.6

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.
@@ -1628,6 +1628,9 @@
1628
1628
  "kind": "field",
1629
1629
  "name": "#nav",
1630
1630
  "privacy": "private",
1631
+ "type": {
1632
+ "text": "HTMLDivElement"
1633
+ },
1631
1634
  "readonly": true
1632
1635
  },
1633
1636
  {
@@ -2228,6 +2231,9 @@
2228
2231
  "kind": "field",
2229
2232
  "name": "#value",
2230
2233
  "privacy": "private",
2234
+ "type": {
2235
+ "text": "HTMLSpanElement"
2236
+ },
2231
2237
  "readonly": true
2232
2238
  },
2233
2239
  {
@@ -2696,6 +2702,9 @@
2696
2702
  "kind": "field",
2697
2703
  "name": "#bar",
2698
2704
  "privacy": "private",
2705
+ "type": {
2706
+ "text": "HTMLDivElement"
2707
+ },
2699
2708
  "readonly": true
2700
2709
  },
2701
2710
  {
@@ -3816,6 +3825,9 @@
3816
3825
  "kind": "field",
3817
3826
  "name": "#header",
3818
3827
  "privacy": "private",
3828
+ "type": {
3829
+ "text": "HTMLElement"
3830
+ },
3819
3831
  "readonly": true
3820
3832
  },
3821
3833
  {
@@ -3828,6 +3840,9 @@
3828
3840
  "kind": "field",
3829
3841
  "name": "#body",
3830
3842
  "privacy": "private",
3843
+ "type": {
3844
+ "text": "HTMLDivElement"
3845
+ },
3831
3846
  "readonly": true
3832
3847
  },
3833
3848
  {
@@ -5461,6 +5476,9 @@
5461
5476
  "kind": "field",
5462
5477
  "name": "#content",
5463
5478
  "privacy": "private",
5479
+ "type": {
5480
+ "text": "HTMLSpanElement"
5481
+ },
5464
5482
  "readonly": true
5465
5483
  },
5466
5484
  {
@@ -5932,6 +5950,9 @@
5932
5950
  "kind": "field",
5933
5951
  "name": "#dialog",
5934
5952
  "privacy": "private",
5953
+ "type": {
5954
+ "text": "HTMLDialogElement"
5955
+ },
5935
5956
  "readonly": true
5936
5957
  },
5937
5958
  {
@@ -7809,6 +7830,9 @@
7809
7830
  "kind": "field",
7810
7831
  "name": "#details",
7811
7832
  "privacy": "private",
7833
+ "type": {
7834
+ "text": "HTMLDetailsElement"
7835
+ },
7812
7836
  "readonly": true
7813
7837
  },
7814
7838
  {
@@ -14325,6 +14349,9 @@
14325
14349
  "kind": "field",
14326
14350
  "name": "#heading",
14327
14351
  "privacy": "private",
14352
+ "type": {
14353
+ "text": "HTMLDivElement"
14354
+ },
14328
14355
  "readonly": true
14329
14356
  },
14330
14357
  {
@@ -16079,6 +16106,9 @@
16079
16106
  "kind": "field",
16080
16107
  "name": "#descriptionSkeleton",
16081
16108
  "privacy": "private",
16109
+ "type": {
16110
+ "text": "HTMLDivElement"
16111
+ },
16082
16112
  "readonly": true
16083
16113
  },
16084
16114
  {
@@ -22114,7 +22144,7 @@
22114
22144
  {
22115
22145
  "kind": "variable",
22116
22146
  "name": "base",
22117
- "default": "css` :host { font-family: var(--gw-font-sans); color: var(--gw-color-text-primary); } *, *::before, *::after { box-sizing: border-box; } :host([hidden]), [hidden] { display: none !important; } :focus-visible { outline: var(--gw-focus-width) solid var(--gw-color-focus); outline-offset: var(--gw-focus-offset); } .icon { flex: none; width: var(--gw-icon-size, 1.25rem); height: var(--gw-icon-size, 1.25rem); fill: currentColor; } :host([tone=\"accent\"]) { --gw-tone: var(--gw-color-accent); --gw-tone-fill: var(--gw-color-fill-accent-quiet); --gw-tone-border: var(--gw-color-border-accent); } :host([tone=\"info\"]) { --gw-tone: var(--gw-color-info); --gw-tone-fill: var(--gw-color-fill-info-quiet); --gw-tone-border: var(--gw-color-border-info); } :host([tone=\"success\"]) { --gw-tone: var(--gw-color-success); --gw-tone-fill: var(--gw-color-fill-success-quiet); --gw-tone-border: var(--gw-color-border-success); } :host([tone=\"warning\"]) { --gw-tone: var(--gw-color-warning); --gw-tone-fill: var(--gw-color-fill-warning-quiet); --gw-tone-border: var(--gw-color-border-warning); } :host([tone=\"danger\"]) { --gw-tone: var(--gw-color-danger); --gw-tone-fill: var(--gw-color-fill-danger-quiet); --gw-tone-border: var(--gw-color-border-danger); } :host([tone=\"important\"]) { --gw-tone: var(--gw-color-important); --gw-tone-fill: var(--gw-color-fill-important-quiet); --gw-tone-border: var(--gw-color-border-important); } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; } } `",
22147
+ "default": "css` :host { font-family: var(--gw-font-sans); color: var(--gw-color-text-primary); } *, *::before, *::after { box-sizing: border-box; } :host([hidden]), [hidden] { display: none !important; } :focus-visible { outline: var(--gw-focus-width) solid var(--gw-color-focus); outline-offset: var(--gw-focus-offset); } .icon { flex: none; width: var(--gw-icon-size, 1.25rem); height: var(--gw-icon-size, 1.25rem); fill: currentColor; } :host([tone=\"accent\"]) { --gw-tone: var(--gw-color-accent); --gw-tone-fill: var(--gw-color-fill-accent-quiet); --gw-tone-border: var(--gw-color-border-accent); } :host([tone=\"info\"]) { --gw-tone: var(--gw-color-info); --gw-tone-fill: var(--gw-color-fill-info-quiet); --gw-tone-border: var(--gw-color-border-info); } :host([tone=\"success\"]) { --gw-tone: var(--gw-color-success); --gw-tone-fill: var(--gw-color-fill-success-quiet); --gw-tone-border: var(--gw-color-border-success); } :host([tone=\"warning\"]) { --gw-tone: var(--gw-color-warning); --gw-tone-fill: var(--gw-color-fill-warning-quiet); --gw-tone-border: var(--gw-color-border-warning); } :host([tone=\"danger\"]) { --gw-tone: var(--gw-color-danger); --gw-tone-fill: var(--gw-color-fill-danger-quiet); --gw-tone-border: var(--gw-color-border-danger); } :host([tone=\"important\"]) { --gw-tone: var(--gw-color-important); --gw-tone-fill: var(--gw-color-fill-important-quiet); --gw-tone-border: var(--gw-color-border-important); } /* :host too, since * in a shadow root doesn't match it, and the skeletons pulse on their host */ @media (prefers-reduced-motion: reduce) { :host, *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; } } `",
22118
22148
  "description": "What every component shares: box sizing, the focus ring, icons and the\ntones that set `--gw-tone` from a `tone` attribute."
22119
22149
  },
22120
22150
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timmo001/groundwork-ui",
3
- "version": "0.9.4",
3
+ "version": "0.9.6",
4
4
  "description": "Groundwork's framework-free web components, styled by the --gw-* tokens",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -28,7 +28,7 @@
28
28
  "scripts": {
29
29
  "check": "bun run --parallel --no-exit-on-error lint typecheck format:check",
30
30
  "lint": "oxlint .",
31
- "typecheck": "tsc",
31
+ "typecheck": "tsc && bun run scripts/typecheck-alone.ts",
32
32
  "format": "prettier --write .",
33
33
  "format:check": "prettier --check .",
34
34
  "gen": "bun run scripts/manifest.ts",
package/src/gw-app-bar.ts CHANGED
@@ -237,7 +237,11 @@ export class GwAppBar extends GwElement {
237
237
  this.#menuIcon,
238
238
  );
239
239
 
240
- readonly #nav = h("div", { class: "nav", part: "nav" }, h("slot"));
240
+ readonly #nav: HTMLDivElement = h(
241
+ "div",
242
+ { class: "nav", part: "nav" },
243
+ h("slot"),
244
+ );
241
245
 
242
246
  #observer: IntersectionObserver | undefined;
243
247
 
package/src/gw-badge.ts CHANGED
@@ -134,7 +134,7 @@ export class GwBadge extends GwElement {
134
134
  style: "--gw-skeleton-width: 3rem",
135
135
  });
136
136
 
137
- readonly #value = h("span", { class: "value" }, h("slot"));
137
+ readonly #value: HTMLSpanElement = h("span", { class: "value" }, h("slot"));
138
138
 
139
139
  constructor() {
140
140
  super();
package/src/gw-banner.ts CHANGED
@@ -90,7 +90,7 @@ export class GwBanner extends GwElement {
90
90
  declare open: boolean;
91
91
  declare urgent: boolean;
92
92
 
93
- readonly #bar = h(
93
+ readonly #bar: HTMLDivElement = h(
94
94
  "div",
95
95
  { class: "bar", part: "bar" },
96
96
  h("slot", { name: "icon" }),
package/src/gw-card.ts CHANGED
@@ -139,7 +139,7 @@ export class GwCard extends GwElement {
139
139
 
140
140
  readonly #headingSlot = h("slot", { name: "heading" });
141
141
 
142
- readonly #header = h(
142
+ readonly #header: HTMLElement = h(
143
143
  "header",
144
144
  { part: "header" },
145
145
  h(
@@ -154,7 +154,11 @@ export class GwCard extends GwElement {
154
154
 
155
155
  readonly #skeleton = h("gw-skeleton-lines");
156
156
 
157
- readonly #body = h("div", { class: "body", part: "body" }, h("slot"));
157
+ readonly #body: HTMLDivElement = h(
158
+ "div",
159
+ { class: "body", part: "body" },
160
+ h("slot"),
161
+ );
158
162
 
159
163
  #card: HTMLElement = h("section", { class: "card", part: "card" });
160
164
 
package/src/gw-chip.ts CHANGED
@@ -115,7 +115,7 @@ export class GwChip extends GwElement {
115
115
  style: "--gw-skeleton-width: 3.5rem",
116
116
  });
117
117
 
118
- readonly #content = h(
118
+ readonly #content: HTMLSpanElement = h(
119
119
  "span",
120
120
  { class: "content" },
121
121
  h("slot", { name: "icon" }, this.#icon, this.#swatch),
@@ -156,7 +156,7 @@ export class GwCommandMenu extends GwElement {
156
156
 
157
157
  readonly #list = h("gw-option-list", { search: true, part: "list" });
158
158
 
159
- readonly #dialog = h(
159
+ readonly #dialog: HTMLDialogElement = h(
160
160
  "dialog",
161
161
  { part: "dialog" },
162
162
  this.#list,
@@ -178,7 +178,7 @@ export class GwExpansion extends GwElement {
178
178
  part: "description",
179
179
  });
180
180
 
181
- readonly #details = h(
181
+ readonly #details: HTMLDetailsElement = h(
182
182
  "details",
183
183
  { part: "details" },
184
184
  h(
@@ -48,7 +48,11 @@ export class GwSectionTitle extends GwElement {
48
48
 
49
49
  declare level: number;
50
50
 
51
- readonly #heading = h("div", { role: "heading", part: "heading" }, h("slot"));
51
+ readonly #heading: HTMLDivElement = h(
52
+ "div",
53
+ { role: "heading", part: "heading" },
54
+ h("slot"),
55
+ );
52
56
 
53
57
  constructor() {
54
58
  super();
@@ -115,7 +115,7 @@ export class GwSettingRow extends GwElement {
115
115
 
116
116
  readonly #description = h("div", { class: "description" });
117
117
 
118
- readonly #descriptionSkeleton = h(
118
+ readonly #descriptionSkeleton: HTMLDivElement = h(
119
119
  "div",
120
120
  { class: "description" },
121
121
  h("gw-skeleton-text", { style: "--gw-skeleton-width: 12rem" }),
package/src/styles.ts CHANGED
@@ -101,7 +101,10 @@ export const base = css`
101
101
  --gw-tone-border: var(--gw-color-border-important);
102
102
  }
103
103
 
104
+ /* :host too, since * in a shadow root doesn't match it, and the skeletons
105
+ pulse on their host */
104
106
  @media (prefers-reduced-motion: reduce) {
107
+ :host,
105
108
  *,
106
109
  *::before,
107
110
  *::after {