@sveltia/ui 0.92.0 → 0.92.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.
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Version of this package, used to resolve the prebuilt Shiki engine chunk from a CDN.
3
3
  */
4
- export const UI_VERSION: "0.92.0";
4
+ export const UI_VERSION: "0.92.1";
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Version of this package, used to resolve the prebuilt Shiki engine chunk from a CDN.
5
5
  */
6
- export const UI_VERSION = '0.92.0';
6
+ export const UI_VERSION = '0.92.1';
@@ -36,7 +36,7 @@
36
36
  let {
37
37
  /* eslint-disable prefer-const */
38
38
  open = $bindable(false),
39
- dialog = $bindable(),
39
+ dialog: boundDialog = $bindable(),
40
40
  class: className,
41
41
  role = 'dialog',
42
42
  modal = true,
@@ -57,6 +57,15 @@
57
57
  /* eslint-enable prefer-const */
58
58
  } = $props();
59
59
 
60
+ /**
61
+ * A reference to the `<dialog>` element. This is kept apart from the bindable `dialog` prop: when
62
+ * the consumer doesn’t bind that prop, Svelte discards the value assigned to it locally as soon
63
+ * as any of the props spread onto this component changes, such as the labelling attributes of a
64
+ * `<Dialog>` whose title has been updated, which would leave the modal unable to open or close.
65
+ * @type {HTMLDialogElement | undefined}
66
+ */
67
+ let dialog = $state.raw();
68
+
60
69
  /**
61
70
  * Focus the `<dialog>` element. It has `tabindex="-1"`, so it can receive focus programmatically,
62
71
  * allowing assistive technology to announce the modal’s label and description.
@@ -417,7 +426,13 @@
417
426
  {#snippet dialogSnippet()}
418
427
  {#if mounted}
419
428
  <dialog
420
- bind:this={dialog}
429
+ bind:this={
430
+ () => dialog,
431
+ (element) => {
432
+ dialog = element;
433
+ boundDialog = element;
434
+ }
435
+ }
421
436
  tabindex="-1"
422
437
  {...restProps}
423
438
  inert={!setOpenClass}
@@ -56,7 +56,7 @@ calendar:
56
56
  # Split button component
57
57
  split_button:
58
58
  # Wrapper aria-label, e.g. “Save Options” when primary button is “Save”
59
- x_options: '{$name} – beállítások'
59
+ x_options: 'Beállítások: {$name}'
60
60
  # Dropdown toggle aria-label
61
61
  more_options: További lehetőségek
62
62
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltia/ui",
3
- "version": "0.92.0",
3
+ "version": "0.92.1",
4
4
  "description": "A collection of Svelte components and utilities for building user interfaces.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -81,7 +81,7 @@
81
81
  "eslint-config-airbnb-extended": "^3.3.0",
82
82
  "eslint-config-prettier": "^10.1.8",
83
83
  "eslint-plugin-import": "^2.32.0",
84
- "eslint-plugin-jsdoc": "^65.4.7",
84
+ "eslint-plugin-jsdoc": "^65.4.8",
85
85
  "eslint-plugin-package-json": "^1.14.0",
86
86
  "eslint-plugin-svelte": "^3.24.1",
87
87
  "globals": "^17.14.0",