@nova-design-system/nova-vue 3.28.0 → 3.30.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:
@@ -336,6 +336,11 @@ export interface NvDatatableSortingConfig {
336
336
  maxMultiSortColCount?: number;
337
337
  /** Start with descending sort as first toggle state */
338
338
  sortDescFirst?: boolean;
339
+ /**
340
+ * Initial sort state (uncontrolled). Applied on first render only; the user can then
341
+ * freely change sorting via header clicks. Ignored when `sortState` is also provided.
342
+ */
343
+ initialSortState?: SortingState;
339
344
  /** Controlled sort state (for server-side sorting) */
340
345
  sortState?: SortingState;
341
346
  /** Callback when sorting changes (for server-side sorting) */
@@ -63,8 +63,9 @@ export function createNvDatatable() {
63
63
  pageIndex: 0,
64
64
  pageSize: props.pagination?.initialPageSize || 10,
65
65
  });
66
- // Sorting state (controlled or uncontrolled)
67
- const sortingState = ref(props.sorting?.sortState || []);
66
+ // Sorting state (controlled or uncontrolled). When sortState is provided the
67
+ // component is controlled; initialSortState only seeds the uncontrolled state.
68
+ const sortingState = ref(props.sorting?.sortState ?? props.sorting?.initialSortState ?? []);
68
69
  // Ref for observing last row (infinite scroll)
69
70
  const lastRowRef = ref(null);
70
71
  const tableColumns = computed(() => props.columns
@@ -59,8 +59,10 @@ export declare const NvSidebarnavitem: StencilVueComponent<JSX.NvSidebarnavitem>
59
59
  export declare const NvSidebarnavsubitem: StencilVueComponent<JSX.NvSidebarnavsubitem>;
60
60
  export declare const NvSplit: StencilVueComponent<JSX.NvSplit, JSX.NvSplit["sizes"]>;
61
61
  export declare const NvStack: StencilVueComponent<JSX.NvStack>;
62
+ export declare const NvStatusindicator: StencilVueComponent<JSX.NvStatusindicator>;
62
63
  export declare const NvTable: StencilVueComponent<JSX.NvTable>;
63
64
  export declare const NvTableheader: StencilVueComponent<JSX.NvTableheader>;
65
+ export declare const NvTag: StencilVueComponent<JSX.NvTag>;
64
66
  export declare const NvTimetest: StencilVueComponent<JSX.NvTimetest, JSX.NvTimetest["value"]>;
65
67
  export declare const NvToggle: StencilVueComponent<JSX.NvToggle, JSX.NvToggle["checked"]>;
66
68
  export declare const NvTogglebutton: StencilVueComponent<JSX.NvTogglebutton>;
@@ -769,9 +769,15 @@ export const NvSidebar = /*@__PURE__*/ defineContainer('nv-sidebar', undefined,
769
769
  'activePath',
770
770
  'notificationIntention',
771
771
  'notificationEmphasis',
772
- 'openChanged'
772
+ 'resizable',
773
+ 'minWidth',
774
+ 'maxWidth',
775
+ 'width',
776
+ 'openChanged',
777
+ 'widthChanged'
773
778
  ], [
774
- 'openChanged'
779
+ 'openChanged',
780
+ 'widthChanged'
775
781
  ], 'open', 'openChanged', undefined);
776
782
  export const NvSidebarcontent = /*@__PURE__*/ defineContainer('nv-sidebarcontent', undefined);
777
783
  export const NvSidebardivider = /*@__PURE__*/ defineContainer('nv-sidebardivider', undefined);
@@ -811,6 +817,11 @@ export const NvStack = /*@__PURE__*/ defineContainer('nv-stack', undefined, [
811
817
  'full',
812
818
  'vertical'
813
819
  ]);
820
+ export const NvStatusindicator = /*@__PURE__*/ defineContainer('nv-statusindicator', undefined, [
821
+ 'status',
822
+ 'emphasis',
823
+ 'label'
824
+ ]);
814
825
  export const NvTable = /*@__PURE__*/ defineContainer('nv-table', undefined);
815
826
  export const NvTableheader = /*@__PURE__*/ defineContainer('nv-tableheader', undefined, [
816
827
  'sortable',
@@ -819,6 +830,18 @@ export const NvTableheader = /*@__PURE__*/ defineContainer('nv-tableheader', und
819
830
  ], [
820
831
  'sortDirectionChanged'
821
832
  ]);
833
+ export const NvTag = /*@__PURE__*/ defineContainer('nv-tag', undefined, [
834
+ 'color',
835
+ 'label',
836
+ 'dismissible',
837
+ 'href',
838
+ 'target',
839
+ 'rel',
840
+ 'disabled',
841
+ 'dismissed'
842
+ ], [
843
+ 'dismissed'
844
+ ]);
822
845
  export const NvTimetest = /*@__PURE__*/ defineContainer('nv-timetest', undefined, [
823
846
  'value',
824
847
  'history',
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.30.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",