@aiaiai-pt/design-system 0.57.0 → 0.58.0

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.
@@ -203,6 +203,10 @@
203
203
  dropLabel?: string;
204
204
  /** Default section heading when no section label is declared. */
205
205
  defaultSectionLabel?: string;
206
+ /** A11y hint shown when the submit button is disabled because required
207
+ * fields are empty. Rendered as a polite `role="status"` so screen
208
+ * readers announce why the form cannot be submitted. */
209
+ requiredFieldsMessage?: string;
206
210
  }
207
211
 
208
212
  let {
@@ -239,6 +243,7 @@
239
243
  searchingLabel = "Searching…",
240
244
  dropLabel = "Drop files here or click to browse",
241
245
  defaultSectionLabel = "Details",
246
+ requiredFieldsMessage = "Fill in all required fields to submit.",
242
247
  }: Props = $props();
243
248
 
244
249
  let values = $state<Record<string, unknown>>({});
@@ -1179,7 +1184,7 @@
1179
1184
  `aria-required` that marks which fields are needed. -->
1180
1185
  {#if !canSubmit && !submitting}
1181
1186
  <p class="submit-hint" role="status">
1182
- Fill in all required fields to submit.
1187
+ {requiredFieldsMessage}
1183
1188
  </p>
1184
1189
  {/if}
1185
1190
  <Button
@@ -142,6 +142,10 @@ interface Props {
142
142
  dropLabel?: string;
143
143
  /** Default section heading when no section label is declared. */
144
144
  defaultSectionLabel?: string;
145
+ /** A11y hint shown when the submit button is disabled because required
146
+ * fields are empty. Rendered as a polite `role="status"` so screen
147
+ * readers announce why the form cannot be submitted. */
148
+ requiredFieldsMessage?: string;
145
149
  }
146
150
  declare const ActionFormRenderer: import("svelte").Component<Props, {}, "">;
147
151
  type ActionFormRenderer = ReturnType<typeof ActionFormRenderer>;
@@ -68,6 +68,10 @@
68
68
  weekLabel = 'Week',
69
69
  /** @type {string} — "Day" view toggle label */
70
70
  dayLabel = 'Day',
71
+ /** @type {string} — aria-label on the "previous" nav button */
72
+ prevAriaLabel = 'Previous',
73
+ /** @type {string} — aria-label on the "next" nav button */
74
+ nextAriaLabel = 'Next',
71
75
  /** @type {string} */
72
76
  class: className = '',
73
77
  ...rest
@@ -276,12 +280,12 @@
276
280
  <!-- Toolbar buttons blur() on click to prevent stale focus rings when user presses keys afterward -->
277
281
  <div class="calendar-toolbar">
278
282
  <div class="calendar-toolbar-left">
279
- <button type="button" class="calendar-nav-btn" onclick={(e) => { prev(); /** @type {HTMLElement} */ (e.currentTarget).blur(); }} aria-label="Previous">
283
+ <button type="button" class="calendar-nav-btn" onclick={(e) => { prev(); /** @type {HTMLElement} */ (e.currentTarget).blur(); }} aria-label={prevAriaLabel}>
280
284
  <svg viewBox="0 0 256 256" aria-hidden="true">
281
285
  <polyline points="160,208 80,128 160,48" fill="none" stroke="currentColor" stroke-width="16" stroke-linecap="round" stroke-linejoin="round" />
282
286
  </svg>
283
287
  </button>
284
- <button type="button" class="calendar-nav-btn" onclick={(e) => { next(); /** @type {HTMLElement} */ (e.currentTarget).blur(); }} aria-label="Next">
288
+ <button type="button" class="calendar-nav-btn" onclick={(e) => { next(); /** @type {HTMLElement} */ (e.currentTarget).blur(); }} aria-label={nextAriaLabel}>
285
289
  <svg viewBox="0 0 256 256" aria-hidden="true">
286
290
  <polyline points="96,48 176,128 96,208" fill="none" stroke="currentColor" stroke-width="16" stroke-linecap="round" stroke-linejoin="round" />
287
291
  </svg>
@@ -38,6 +38,8 @@ declare const Calendar: import("svelte").Component<{
38
38
  monthLabel?: string;
39
39
  weekLabel?: string;
40
40
  dayLabel?: string;
41
+ prevAriaLabel?: string;
42
+ nextAriaLabel?: string;
41
43
  class?: string;
42
44
  } & Record<string, any>, {}, "view" | "date">;
43
45
  type $$ComponentProps = {
@@ -53,6 +55,8 @@ type $$ComponentProps = {
53
55
  monthLabel?: string;
54
56
  weekLabel?: string;
55
57
  dayLabel?: string;
58
+ prevAriaLabel?: string;
59
+ nextAriaLabel?: string;
56
60
  class?: string;
57
61
  } & Record<string, any>;
58
62
  import { enUS } from 'date-fns/locale';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiaiai-pt/design-system",
3
- "version": "0.57.0",
3
+ "version": "0.58.0",
4
4
  "description": "Design system tokens and Svelte components for aiaiai products",
5
5
  "license": "MIT",
6
6
  "type": "module",