@a4ui/core 0.35.0 → 0.35.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.
@@ -7,6 +7,8 @@ export interface RingProgressProps {
7
7
  thickness?: number;
8
8
  /** Content centered over the ring. Defaults to the rounded percent. */
9
9
  label?: JSX.Element;
10
+ /** Accessible name for the `role="progressbar"` element. */
11
+ 'aria-label'?: string;
10
12
  class?: string;
11
13
  }
12
14
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a4ui/core",
3
- "version": "0.35.0",
3
+ "version": "0.35.1",
4
4
  "description": "A4ui — Spatial Glass design system & component library for SolidJS (Kobalte behavior + Tailwind glass tokens + motion).",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  // import '@a4ui/core/styles.css'
9
9
  // import { Button, Card, Modal } from '@a4ui/core'
10
10
 
11
- export const A4UI_VERSION = '0.35.0'
11
+ export const A4UI_VERSION = '0.35.1'
12
12
 
13
13
  // Helpers (src/lib) — generic, framework-level utilities.
14
14
  export { cn } from './lib/cn'
@@ -167,10 +167,8 @@ export function AudioWaveform(props: AudioWaveformProps): JSX.Element {
167
167
  {(peak, index) => {
168
168
  const played = createMemo(() => index() / bars().length <= progress())
169
169
  return (
170
- <button
171
- type="button"
170
+ <div
172
171
  aria-hidden="true"
173
- tabIndex={-1}
174
172
  onClick={(event) => {
175
173
  event.stopPropagation()
176
174
  handleBarClick(index())
@@ -203,7 +203,13 @@ export function EventScheduler(props: EventSchedulerProps): JSX.Element {
203
203
  </div>
204
204
 
205
205
  {/* Body: scrolls vertically; gutter of hour labels + day columns */}
206
- <div class="flex overflow-y-auto" style={{ 'max-height': '32rem' }}>
206
+ <div
207
+ role="group"
208
+ aria-label="Schedule grid"
209
+ tabIndex={0}
210
+ class="flex overflow-y-auto outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"
211
+ style={{ 'max-height': '32rem' }}
212
+ >
207
213
  <div class="w-14 shrink-0" style={{ height: `${gridHeight()}px` }}>
208
214
  <For each={hours()}>
209
215
  {(h) => (
@@ -155,7 +155,15 @@ export function GanttChart(props: GanttChartProps): JSX.Element {
155
155
  })
156
156
 
157
157
  return (
158
- <div class={cn('overflow-x-auto rounded-lg border border-border bg-card', props.class)}>
158
+ <div
159
+ role="group"
160
+ aria-label="Gantt chart"
161
+ tabIndex={0}
162
+ class={cn(
163
+ 'overflow-x-auto rounded-lg border border-border bg-card outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary',
164
+ props.class,
165
+ )}
166
+ >
159
167
  <Show
160
168
  when={props.tasks.length > 0}
161
169
  fallback={<p class="p-4 text-sm text-muted-foreground">No tasks to display.</p>}
@@ -79,6 +79,7 @@ export function OnboardingChecklist(props: OnboardingChecklistProps): JSX.Elemen
79
79
  value={percent()}
80
80
  size={56}
81
81
  thickness={6}
82
+ aria-label={`${done()} of ${total()} steps complete`}
82
83
  label={
83
84
  <span class="text-xs">
84
85
  {done()}/{total()}
Binary file
@@ -243,10 +243,10 @@ function RuleRow(props: RuleRowProps): JSX.Element {
243
243
 
244
244
  return (
245
245
  <div class="flex flex-wrap items-center gap-2">
246
- <Select class="w-40" value={props.rule.field} onChange={setField}>
246
+ <Select class="w-40" value={props.rule.field} onChange={setField} aria-label="Field">
247
247
  <For each={props.fields}>{(f) => <option value={f.name}>{f.label}</option>}</For>
248
248
  </Select>
249
- <Select class="w-32" value={props.rule.operator} onChange={setOperator}>
249
+ <Select class="w-32" value={props.rule.operator} onChange={setOperator} aria-label="Operator">
250
250
  <For each={props.operatorsFor(props.rule.field)}>{(op) => <option value={op}>{op}</option>}</For>
251
251
  </Select>
252
252
  <Show
@@ -257,10 +257,11 @@ function RuleRow(props: RuleRowProps): JSX.Element {
257
257
  type={field()?.type === 'number' ? 'number' : 'text'}
258
258
  value={props.rule.value}
259
259
  onInput={setValue}
260
+ aria-label="Value"
260
261
  />
261
262
  }
262
263
  >
263
- <Select class="w-40" value={props.rule.value} onChange={setValue}>
264
+ <Select class="w-40" value={props.rule.value} onChange={setValue} aria-label="Value">
264
265
  <option value="" disabled>
265
266
  Select…
266
267
  </option>
@@ -12,6 +12,8 @@ export interface RingProgressProps {
12
12
  thickness?: number
13
13
  /** Content centered over the ring. Defaults to the rounded percent. */
14
14
  label?: JSX.Element
15
+ /** Accessible name for the `role="progressbar"` element. */
16
+ 'aria-label'?: string
15
17
  class?: string
16
18
  }
17
19
 
@@ -37,6 +39,7 @@ export function RingProgress(props: RingProgressProps): JSX.Element {
37
39
  return (
38
40
  <div
39
41
  role="progressbar"
42
+ aria-label={props['aria-label']}
40
43
  aria-valuenow={clamped()}
41
44
  aria-valuemin={0}
42
45
  aria-valuemax={100}
@@ -235,6 +235,7 @@ export function SpreadsheetGrid(props: SpreadsheetGridProps): JSX.Element {
235
235
  ref={containerRef}
236
236
  tabIndex={0}
237
237
  role="grid"
238
+ aria-label="Spreadsheet"
238
239
  aria-rowcount={props.rows}
239
240
  aria-colcount={props.cols}
240
241
  class={cn(
@@ -244,20 +245,22 @@ export function SpreadsheetGrid(props: SpreadsheetGridProps): JSX.Element {
244
245
  onKeyDown={handleKeyDown}
245
246
  >
246
247
  <div class="grid" style={{ 'grid-template-columns': `48px repeat(${props.cols}, minmax(80px, 1fr))` }}>
247
- <div class="border-b border-r border-border bg-muted" />
248
- <For each={headers()}>
249
- {(h) => (
250
- <div
251
- role="columnheader"
252
- class="border-b border-r border-border bg-muted px-2 py-1 text-center text-xs font-semibold text-muted-foreground"
253
- >
254
- {h}
255
- </div>
256
- )}
257
- </For>
248
+ <div role="row" class="contents">
249
+ <div aria-hidden="true" class="border-b border-r border-border bg-muted" />
250
+ <For each={headers()}>
251
+ {(h) => (
252
+ <div
253
+ role="columnheader"
254
+ class="border-b border-r border-border bg-muted px-2 py-1 text-center text-xs font-semibold text-muted-foreground"
255
+ >
256
+ {h}
257
+ </div>
258
+ )}
259
+ </For>
260
+ </div>
258
261
  <For each={rowIndices()}>
259
262
  {(r) => (
260
- <>
263
+ <div role="row" class="contents">
261
264
  <div
262
265
  role="rowheader"
263
266
  class="border-b border-r border-border bg-muted px-2 py-1 text-center text-xs text-muted-foreground"
@@ -295,7 +298,7 @@ export function SpreadsheetGrid(props: SpreadsheetGridProps): JSX.Element {
295
298
  </div>
296
299
  )}
297
300
  </For>
298
- </>
301
+ </div>
299
302
  )}
300
303
  </For>
301
304
  </div>