@lumx/vue 4.20.0-next.4 → 4.20.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.
Files changed (36) hide show
  1. package/components/combobox/ComboboxList.d.ts +1 -1
  2. package/components/combobox/context/useComboboxEvent.d.ts +10 -0
  3. package/components/combobox/index.d.ts +1 -1
  4. package/components/dialog/Dialog.d.ts +1 -1
  5. package/components/dialog/Dialog.stories.d.ts +1 -1
  6. package/components/dialog/Dialog.test.d.ts +1 -0
  7. package/components/dialog/DialogContent.d.ts +7 -0
  8. package/components/dialog/DialogHeading.d.ts +28 -0
  9. package/components/dialog/DialogHeading.test.d.ts +1 -0
  10. package/components/dialog/index.d.ts +1 -0
  11. package/components/expansion-panel/ExpansionPanel.d.ts +1 -1
  12. package/components/heading/Heading.d.ts +3 -3
  13. package/components/heading/index.d.ts +1 -2
  14. package/components/lightbox/Lightbox.d.ts +5 -17
  15. package/components/lightbox/Lightbox.test.d.ts +1 -0
  16. package/components/lightbox/LightboxContent.d.ts +20 -0
  17. package/components/lightbox/constants.d.ts +8 -0
  18. package/components/lightbox/types.d.ts +14 -0
  19. package/components/list/ListSection.d.ts +1 -1
  20. package/components/menu-button/MenuList.d.ts +1 -1
  21. package/components/popover/Popover.d.ts +1 -1
  22. package/components/popover-dialog/PopoverDialog.d.ts +7 -13
  23. package/components/popover-dialog/PopoverDialog.test.d.ts +1 -0
  24. package/components/popover-dialog/PopoverDialog.test.stories.d.ts +1 -1
  25. package/components/popover-dialog/PopoverDialogContent.d.ts +23 -0
  26. package/components/popover-dialog/constants.d.ts +8 -0
  27. package/components/popover-dialog/types.d.ts +10 -0
  28. package/index.js +3601 -3397
  29. package/index.js.map +1 -1
  30. package/package.json +5 -6
  31. package/utils/IdsRegistryContext/IdsRegistryContext.d.ts +14 -0
  32. package/utils/IdsRegistryContext/IdsRegistryContext.test.d.ts +1 -0
  33. package/utils/IdsRegistryContext/IdsRegistryProvider.d.ts +8 -0
  34. package/utils/IdsRegistryContext/index.d.ts +3 -0
  35. package/utils/IdsRegistryContext/useRegisterId.d.ts +11 -0
  36. package/utils/IdsRegistryContext/useRegisteredId.d.ts +11 -0
package/package.json CHANGED
@@ -30,11 +30,11 @@
30
30
  }
31
31
  },
32
32
  "sideEffects": false,
33
- "version": "4.20.0-next.4",
33
+ "version": "4.20.0",
34
34
  "dependencies": {
35
35
  "@floating-ui/vue": "^1.1.10",
36
- "@lumx/core": "^4.20.0-next.4",
37
- "@lumx/icons": "^4.20.0-next.4",
36
+ "@lumx/core": "^4.20.0",
37
+ "@lumx/icons": "^4.20.0",
38
38
  "@vueuse/core": "^14.1.0"
39
39
  },
40
40
  "peerDependencies": {
@@ -63,9 +63,8 @@
63
63
  "vite-plugin-dts": "^4.5.4",
64
64
  "vite-plugin-static-copy": "^3.1.4",
65
65
  "vite-tsconfig-paths": "^5.1.4",
66
- "vitest": "^4.0.18",
66
+ "vitest": "^4.1.10",
67
67
  "vue": "^3.5.27",
68
68
  "vue-tsc": "^3.2.4"
69
- },
70
- "stableVersion": "4.19.0"
69
+ }
71
70
  }
@@ -0,0 +1,14 @@
1
+ import { InjectionKey } from 'vue';
2
+ import { IdsRegistry } from '@lumx/core/js/utils/idsRegistry/createIdsRegistry';
3
+ /**
4
+ * Internal "ids registry" injection key.
5
+ *
6
+ * Not exported from the package barrel - lets a container expose ids registered by its descendants
7
+ * under well-known names, without either side knowing about the other upfront (e.g. to wire up
8
+ * `aria-labelledby`/`aria-describedby` between components that don't know about each other).
9
+ *
10
+ * `undefined` outside of any provider - `useRegisterId`/`useRegisteredId` are no-ops in that case.
11
+ *
12
+ * See `IdsRegistry` in `@lumx/core` for the shared contract.
13
+ */
14
+ export declare const IDS_REGISTRY_KEY: InjectionKey<IdsRegistry>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Provides a fresh ids registry to its subtree (via the default slot). The registry instance lives
3
+ * for the lifetime of the provider, so registering/reading an id never re-renders the whole subtree
4
+ * - only the components subscribed (via `useRegisteredId`) to the name that changed.
5
+ */
6
+ export declare const IdsRegistryProvider: import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
7
+ [key: string]: any;
8
+ }>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,3 @@
1
+ export { IdsRegistryProvider } from './IdsRegistryProvider';
2
+ export { useRegisterId } from './useRegisterId';
3
+ export { useRegisteredId } from './useRegisteredId';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Register the id returned by `getId` under `key` in the enclosing ids registry, keeping it up to
3
+ * date reactively, and clear it on unmount. Last registered wins; if another registrant is still
4
+ * mounted under the same key, clearing this one falls back to it instead of leaving the key empty.
5
+ *
6
+ * Call from a descendant's `setup`.
7
+ *
8
+ * @param key Registry key to store the id under.
9
+ * @param getId Getter returning the id of the element to register.
10
+ */
11
+ export declare function useRegisterId(key: string, getId: () => string | undefined): void;
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * Subscribe to the id currently registered under `key` in the enclosing ids registry. The returned
4
+ * ref updates (and only re-renders the reading component) when that key's id changes.
5
+ *
6
+ * Call from a descendant's `setup`.
7
+ *
8
+ * @param key Registry key to read.
9
+ * @return A ref holding the registered id (`undefined` when none / outside any provider).
10
+ */
11
+ export declare function useRegisteredId(key: string): Ref<string | undefined>;