@dogsbay/ui 0.2.0-beta.118 → 0.2.0-beta.119

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dogsbay/ui",
3
- "version": "0.2.0-beta.118",
3
+ "version": "0.2.0-beta.119",
4
4
  "description": "Accessible UI components for Astro, inspired by Base UI and shadcn",
5
5
  "type": "module",
6
6
  "exports": {
@@ -22,9 +22,9 @@
22
22
  "katex": "^0.16.47",
23
23
  "maplibre-gl": "^5.24.0",
24
24
  "shiki": "^4.3.1",
25
- "@dogsbay/elements": "0.2.0-beta.118",
26
- "@dogsbay/icons": "0.2.0-beta.118",
27
- "@dogsbay/primitives": "0.2.0-beta.118"
25
+ "@dogsbay/elements": "0.2.0-beta.119",
26
+ "@dogsbay/icons": "0.2.0-beta.119",
27
+ "@dogsbay/primitives": "0.2.0-beta.119"
28
28
  },
29
29
  "files": [
30
30
  "src",
@@ -55,9 +55,10 @@ const content = code || (json !== undefined && json !== null ? JSON.stringify(js
55
55
 
56
56
  {content && (
57
57
  <div class={className}>
58
- <h3 class="mb-3 text-xs font-semibold uppercase tracking-wider text-white/60">
58
+ {/* A label, not a heading: on an operation page it followed the h1 (axe heading-order). */}
59
+ <p class="mb-3 text-xs font-semibold uppercase tracking-wider text-white/60">
59
60
  {title}
60
- </h3>
61
+ </p>
61
62
  <CodeBlock code={content} lang={resolvedLang} copy={true} />
62
63
  </div>
63
64
  )}
@@ -1,4 +1,7 @@
1
- /* API Symbol badges — colored by kind */
1
+ /* API Symbol badges, coloured by kind. Text on its own 20% tint must reach
2
+ WCAG AA (4.5:1) on the page background: the light colours were L 0.5–0.6
3
+ (3.2–4.0:1) and are L 0.44 (5.0:1 or more); render-html's
4
+ tests/contrast.test.ts measures every kind in both modes. */
2
5
  .api-badge {
3
6
  display: inline-flex;
4
7
  align-items: center;
@@ -13,8 +16,8 @@
13
16
  }
14
17
 
15
18
  .api-badge-class {
16
- background-color: oklch(0.55 0.18 265 / 0.2);
17
- color: oklch(0.55 0.18 265);
19
+ background-color: oklch(0.44 0.18 265 / 0.2);
20
+ color: oklch(0.44 0.18 265);
18
21
  }
19
22
  .dark .api-badge-class {
20
23
  background-color: oklch(0.7 0.15 265 / 0.2);
@@ -22,8 +25,8 @@
22
25
  }
23
26
 
24
27
  .api-badge-meth {
25
- background-color: oklch(0.55 0.15 155 / 0.2);
26
- color: oklch(0.55 0.15 155);
28
+ background-color: oklch(0.44 0.15 155 / 0.2);
29
+ color: oklch(0.44 0.15 155);
27
30
  }
28
31
  .dark .api-badge-meth {
29
32
  background-color: oklch(0.7 0.15 155 / 0.2);
@@ -31,8 +34,8 @@
31
34
  }
32
35
 
33
36
  .api-badge-attr {
34
- background-color: oklch(0.6 0.15 55 / 0.2);
35
- color: oklch(0.6 0.15 55);
37
+ background-color: oklch(0.44 0.15 55 / 0.2);
38
+ color: oklch(0.44 0.15 55);
36
39
  }
37
40
  .dark .api-badge-attr {
38
41
  background-color: oklch(0.75 0.15 55 / 0.2);
@@ -40,8 +43,8 @@
40
43
  }
41
44
 
42
45
  .api-badge-func {
43
- background-color: oklch(0.55 0.18 330 / 0.2);
44
- color: oklch(0.55 0.18 330);
46
+ background-color: oklch(0.44 0.18 330 / 0.2);
47
+ color: oklch(0.44 0.18 330);
45
48
  }
46
49
  .dark .api-badge-func {
47
50
  background-color: oklch(0.7 0.15 330 / 0.2);
@@ -49,8 +52,8 @@
49
52
  }
50
53
 
51
54
  .api-badge-module {
52
- background-color: oklch(0.5 0.12 200 / 0.2);
53
- color: oklch(0.5 0.12 200);
55
+ background-color: oklch(0.44 0.12 200 / 0.2);
56
+ color: oklch(0.44 0.12 200);
54
57
  }
55
58
  .dark .api-badge-module {
56
59
  background-color: oklch(0.65 0.12 200 / 0.2);
@@ -47,9 +47,10 @@ const groups = locationOrder
47
47
  <div class={className}>
48
48
  {groups.map((group) => (
49
49
  <div class="mb-4 last:mb-0">
50
- <h4 class="mb-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
50
+ {/* A label, not a heading: under an embed's tag h2 an h4 skipped a level (axe heading-order). */}
51
+ <p class="mb-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
51
52
  {group.label}
52
- </h4>
53
+ </p>
53
54
  <div class="rounded-lg border bg-card">
54
55
  {group.params.map((param) => (
55
56
  <PropertyItem
@@ -99,40 +99,40 @@ const filtered = headings.filter(
99
99
  line-height: 1.4;
100
100
  }
101
101
  .toc-kind-class {
102
- background-color: oklch(0.55 0.18 265 / 0.15);
103
- color: oklch(0.55 0.18 265);
102
+ background-color: oklch(0.44 0.18 265 / 0.15);
103
+ color: oklch(0.44 0.18 265);
104
104
  }
105
105
  :global(.dark) .toc-kind-class {
106
106
  background-color: oklch(0.7 0.15 265 / 0.2);
107
107
  color: oklch(0.7 0.15 265);
108
108
  }
109
109
  .toc-kind-meth {
110
- background-color: oklch(0.55 0.15 155 / 0.15);
111
- color: oklch(0.55 0.15 155);
110
+ background-color: oklch(0.44 0.15 155 / 0.15);
111
+ color: oklch(0.44 0.15 155);
112
112
  }
113
113
  :global(.dark) .toc-kind-meth {
114
114
  background-color: oklch(0.7 0.15 155 / 0.2);
115
115
  color: oklch(0.7 0.15 155);
116
116
  }
117
117
  .toc-kind-attr {
118
- background-color: oklch(0.6 0.15 55 / 0.15);
119
- color: oklch(0.6 0.15 55);
118
+ background-color: oklch(0.44 0.15 55 / 0.15);
119
+ color: oklch(0.44 0.15 55);
120
120
  }
121
121
  :global(.dark) .toc-kind-attr {
122
122
  background-color: oklch(0.75 0.15 55 / 0.2);
123
123
  color: oklch(0.75 0.15 55);
124
124
  }
125
125
  .toc-kind-func {
126
- background-color: oklch(0.55 0.18 330 / 0.15);
127
- color: oklch(0.55 0.18 330);
126
+ background-color: oklch(0.44 0.18 330 / 0.15);
127
+ color: oklch(0.44 0.18 330);
128
128
  }
129
129
  :global(.dark) .toc-kind-func {
130
130
  background-color: oklch(0.7 0.15 330 / 0.2);
131
131
  color: oklch(0.7 0.15 330);
132
132
  }
133
133
  .toc-kind-module {
134
- background-color: oklch(0.5 0.12 200 / 0.15);
135
- color: oklch(0.5 0.12 200);
134
+ background-color: oklch(0.44 0.12 200 / 0.15);
135
+ color: oklch(0.44 0.12 200);
136
136
  }
137
137
  :global(.dark) .toc-kind-module {
138
138
  background-color: oklch(0.65 0.12 200 / 0.2);