@nova-design-system/nova-vue 3.28.0 → 3.29.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.
package/README.md CHANGED
@@ -11,6 +11,10 @@
11
11
 
12
12
  ---
13
13
 
14
+ ## Requirements
15
+
16
+ - **ES2022+ build target** — The Nova Vue plugin uses top-level `await` to ensure Stencil custom elements are registered before Vue renders. Your bundler must target `es2022` or higher. For Vite, set `build.target: 'es2022'` in your `vite.config.ts`.
17
+
14
18
  ## Installation
15
19
 
16
20
  To begin, install the necessary Nova packages using your package manager:
package/dist/index.d.ts CHANGED
@@ -2,4 +2,5 @@ export * from './generated/components';
2
2
  export * from './plugin';
3
3
  export * from './providers';
4
4
  export * from '@nova-design-system/nova-webcomponents/constants';
5
+ export type { IconName } from '@nova-design-system/nova-webcomponents';
5
6
  export * from './components/NvDatatable';
package/dist/plugin.js CHANGED
@@ -7,14 +7,20 @@
7
7
  import { defineCustomElements } from '@nova-design-system/nova-webcomponents/loader';
8
8
  import { NvNotificationService, } from './providers/NotificationService';
9
9
  import * as components from './generated/components';
10
+ /**
11
+ * Register all Stencil custom elements before the plugin is imported.
12
+ * Top-level await ensures customElements.define() completes before Vue renders,
13
+ * preventing a race condition where camelCase props (e.g. errorDescription) are
14
+ * set as lowercased HTML attributes (errordescription) instead of kebab-case
15
+ * (error-description) that Stencil observes.
16
+ */
17
+ await defineCustomElements();
10
18
  /**
11
19
  * This is the Vue plugin that is used to define the custom elements, event
12
20
  * handlers, and includes the notification service.
13
21
  */
14
22
  export const NovaComponents = {
15
23
  async install(app, options = {}) {
16
- // Define custom elements with event handling
17
- defineCustomElements();
18
24
  // Register all Vue component wrappers globally so that
19
25
  // props are passed as JS properties (not HTML attributes)
20
26
  Object.entries(components).forEach(([name, component]) => {
@@ -1,5 +1,5 @@
1
1
  import { App, type Ref, type Component } from 'vue';
2
- import { NotificationEmphasis, FeedbackColors, NotificationPosition } from '../index';
2
+ import { NotificationEmphasis, FeedbackColors, NotificationPosition, type IconName } from '../index';
3
3
  /**
4
4
  * Action callbacks for notifications. Will render buttons automatically.
5
5
  */
@@ -28,7 +28,7 @@ export interface NotificationOptions {
28
28
  /** Type of the notification, used to determine the color and default icon. */
29
29
  feedback?: `${FeedbackColors}`;
30
30
  /** Custom icon name to override the default icon. */
31
- icon?: string;
31
+ icon?: `${IconName}`;
32
32
  /** Notification actions */
33
33
  actions?: NotificationAction[];
34
34
  /** Custom components for the notification actions. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nova-design-system/nova-vue",
3
- "version": "3.28.0",
3
+ "version": "3.29.0",
4
4
  "description": "Nova is a design system created by Elia Group to empower creators to efficiently build solutions that people love to use.",
5
5
  "author": "Elia Group",
6
6
  "homepage": "https://nova.eliagroup.io",