@domphy/ui 0.21.0 → 0.21.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.
package/dist/index.d.cts CHANGED
@@ -359,14 +359,23 @@ declare function details(props?: {
359
359
  * dialog, restores focus to the previously focused element on close, sets
360
360
  * `aria-modal`, and closes on outside (backdrop) click. Apply to a `<dialog>`.
361
361
  *
362
+ * Accessible name/description: pass `labelledBy`/`describedBy` the `id` of a
363
+ * heading/paragraph inside the dialog (Radix Title/Description parity). The
364
+ * native `ariaLabelledby`/`ariaDescribedby` attributes on the host element
365
+ * remain an equivalent escape hatch (the native element always wins).
366
+ *
362
367
  * @hostTag dialog
363
368
  * @param props.color - Theme color tone for the dialog surface. Defaults to "neutral".
364
369
  * @param props.open - Open state (`ValueOrState<boolean>`); set it to true/false to show/hide. Defaults to false.
365
- * @example { dialog: [...], $: [dialog({ open })] }
370
+ * @param props.labelledBy - `id` of the element labeling the dialog (wired to `aria-labelledby`). Optional.
371
+ * @param props.describedBy - `id` of the element describing the dialog (wired to `aria-describedby`). Optional.
372
+ * @example { dialog: [{ h2: "Confirm", id: "dlg-title" }], $: [dialog({ open, labelledBy: "dlg-title" })] }
366
373
  */
367
374
  declare function dialog(props?: {
368
375
  color?: ThemeColor;
369
376
  open?: ValueOrState<boolean>;
377
+ labelledBy?: string;
378
+ describedBy?: string;
370
379
  }): PartialElement;
371
380
 
372
381
  /**
@@ -1212,6 +1221,9 @@ declare function select(props?: {
1212
1221
  * A clickable select trigger box that renders the currently selected option(s) as removable
1213
1222
  * tags and toggles a floating popover (the dropdown content) anchored to itself. Selected
1214
1223
  * labels are derived from `options` matching the bound `value`; removing a tag updates the value.
1224
+ * Keyboard: Enter/Space toggle, ArrowDown opens, Escape closes, and printable characters
1225
+ * typeahead-search options (closed: selects the match; open: focuses the matching
1226
+ * `[role=option]` in the panel; a repeated character cycles matches).
1215
1227
  *
1216
1228
  * @hostTag div
1217
1229
  * @param props.multiple - Whether multiple selection is allowed (renders removable tags and
package/dist/index.d.ts CHANGED
@@ -359,14 +359,23 @@ declare function details(props?: {
359
359
  * dialog, restores focus to the previously focused element on close, sets
360
360
  * `aria-modal`, and closes on outside (backdrop) click. Apply to a `<dialog>`.
361
361
  *
362
+ * Accessible name/description: pass `labelledBy`/`describedBy` the `id` of a
363
+ * heading/paragraph inside the dialog (Radix Title/Description parity). The
364
+ * native `ariaLabelledby`/`ariaDescribedby` attributes on the host element
365
+ * remain an equivalent escape hatch (the native element always wins).
366
+ *
362
367
  * @hostTag dialog
363
368
  * @param props.color - Theme color tone for the dialog surface. Defaults to "neutral".
364
369
  * @param props.open - Open state (`ValueOrState<boolean>`); set it to true/false to show/hide. Defaults to false.
365
- * @example { dialog: [...], $: [dialog({ open })] }
370
+ * @param props.labelledBy - `id` of the element labeling the dialog (wired to `aria-labelledby`). Optional.
371
+ * @param props.describedBy - `id` of the element describing the dialog (wired to `aria-describedby`). Optional.
372
+ * @example { dialog: [{ h2: "Confirm", id: "dlg-title" }], $: [dialog({ open, labelledBy: "dlg-title" })] }
366
373
  */
367
374
  declare function dialog(props?: {
368
375
  color?: ThemeColor;
369
376
  open?: ValueOrState<boolean>;
377
+ labelledBy?: string;
378
+ describedBy?: string;
370
379
  }): PartialElement;
371
380
 
372
381
  /**
@@ -1212,6 +1221,9 @@ declare function select(props?: {
1212
1221
  * A clickable select trigger box that renders the currently selected option(s) as removable
1213
1222
  * tags and toggles a floating popover (the dropdown content) anchored to itself. Selected
1214
1223
  * labels are derived from `options` matching the bound `value`; removing a tag updates the value.
1224
+ * Keyboard: Enter/Space toggle, ArrowDown opens, Escape closes, and printable characters
1225
+ * typeahead-search options (closed: selects the match; open: focuses the matching
1226
+ * `[role=option]` in the panel; a repeated character cycles matches).
1215
1227
  *
1216
1228
  * @hostTag div
1217
1229
  * @param props.multiple - Whether multiple selection is allowed (renders removable tags and