@nova-design-system/nova-vue 3.12.0 → 3.13.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
@@ -5,20 +5,18 @@
5
5
  - [Nova Components Vue](#nova-components-vue)
6
6
  - [Key Features](#key-features)
7
7
  - [Installation](#installation)
8
- - [Setup Using Tailwind (Recommended)](#setup-using-tailwind-recommended)
8
+ - [Setting up Tailwind](#setting-up-tailwind)
9
+ - [About Tailwind and the Nova Plugin](#about-tailwind-and-the-nova-plugin)
9
10
  - [1. Install Tailwind CSS and the Vite Plugin](#1-install-tailwind-css-and-the-vite-plugin)
10
11
  - [2. Configure the Vite Plugin](#2-configure-the-vite-plugin)
11
12
  - [3. Create `tailwind.config.ts`](#3-create-tailwindconfigts)
12
13
  - [4. Configure Tailwind and Nova Plugin in `main.css`](#4-configure-tailwind-and-nova-plugin-in-maincss)
13
14
  - [5. Register NovaComponents and include the Nova Tokens](#5-register-novacomponents-and-include-the-nova-tokens)
14
- - [6. Use Nova Components and Tailwind Utilities](#6-use-nova-components-and-tailwind-utilities)
15
+ - [6. Use Nova Components with Tailwind Utilities](#6-use-nova-components-with-tailwind-utilities)
15
16
  - [7. Setup the Nova Font](#7-setup-the-nova-font)
16
17
  - [Creating Your Own Style Components with Tailwind](#creating-your-own-style-components-with-tailwind)
17
- - [Setup Without Tailwind (Not Recommended)](#setup-without-tailwind-not-recommended)
18
- - [1. Register NovaComponents and include the Nova CSS.](#1-register-novacomponents-and-include-the-nova-css)
19
- - [2. Use Nova Components](#2-use-nova-components)
20
18
  - [Nova Font Pro Integration](#nova-font-pro-integration)
21
- - [Option 1: Import in Main Entry (Recommended)](#option-1-import-in-main-entry-recommended)
19
+ - [Option 1: Import in Global CSS (Recommended)](#option-1-import-in-global-css-recommended)
22
20
  - [Option 2: HTML Integration](#option-2-html-integration)
23
21
 
24
22
 
@@ -27,7 +25,7 @@
27
25
  ## Key Features
28
26
 
29
27
  - **Lightweight Integration**: Leverage Nova Web Components with minimal configuration in Vue.
30
- - **Customizable Styling**: Use Tailwind (recommended) or Nova’s utility classes to quickly style components.
28
+ - **Customizable Styling**: Use Tailwind’s utility classes with the Nova Tailwind theme and plugin for token-driven styling and layouts.
31
29
  - **Dark Mode Ready**: Toggle dark mode by adding the `dark` class to your `body` element.
32
30
  - **Nova Font Pro Support**: Easily integrate Nova’s custom font for a consistent design experience.
33
31
 
@@ -48,19 +46,31 @@ yarn add @nova-design-system/nova-webcomponents @nova-design-system/nova-base @n
48
46
  ```
49
47
 
50
48
  > In some case, you might experience SSL certificate issues when working on Developers' VM. As documented in the [Developers' setup guide](https://wiki.eliagroup.eu/spaces/EAing/pages/89296007/2.3.3.10+Developer+Setup#id-2.3.3.10DeveloperSetup-NPMconfig), you need to turn off the SSL certificate verification:
49
+ >
50
+ > ```bash
51
+ > npm config set strict-ssl false
52
+ > ```
51
53
 
52
- ```bash
53
- npm config set strict-ssl false
54
- ```
54
+ ---
55
55
 
56
- ## Setup Using Tailwind (Recommended)
56
+ ## Setting up Tailwind
57
57
 
58
- We highly recommend using Tailwind CSS for styling, as it ensures an optimized bundle size and a powerful utility-first workflow. Nova offers a dedicated Tailwind plugin and theme, allowing you to seamlessly integrate Nova’s design tokens with Tailwind’s utility classes for a consistent and efficient styling workflow.
58
+ Nova Vue requires Tailwind CSS for styling. Tailwind provides a powerful utility-first workflow and an optimized bundle size. Nova includes a dedicated Tailwind theme and plugin that map Nova’s design tokens to Tailwind’s theme and utilities, enabling consistent, token-driven styling across your app.
59
59
 
60
60
  > **Tailwind Version**
61
61
  > This guide is written for Tailwind v4. While compatible with v3, some features may not work as expected.
62
62
 
63
- Below is an example setup using the **vue cli with vite**. If you're using another framework, such as nuxt, please refer to the [Tailwind Installation Guide](https://tailwindcss.com/docs/installation).
63
+ ### About Tailwind and the Nova Plugin
64
+
65
+ - **What is Tailwind?** A utility-first CSS framework with low-level, composable classes (flex, grid, spacing, color, typography) to rapidly build UIs.
66
+ - **Nova Tokens**: Nova ships design tokens as CSS variables (via the Spark and Ocean themes) covering colors, spacing, typography, radii, shadows, and more.
67
+ - **Integration**:
68
+ - `novaTailwindTheme` wires Nova tokens into Tailwind’s theme scales.
69
+ - The Nova Tailwind plugin exposes utilities and variants that reference those tokens, so your Tailwind classes resolve to Nova’s token values at runtime.
70
+ - **Why import tokens CSS?** Import one token CSS file (`spark.css` or `ocean.css`) so the underlying CSS variables exist at runtime. The Tailwind utilities generated by the plugin read from these variables.
71
+ - **Do not mix with legacy utilities**: When using Tailwind, do not import `@nova-design-system/nova-base/dist/css/nova-utils.css` to avoid redundant CSS and larger bundles.
72
+
73
+ Below is an example setup using the **Vue CLI with Vite**. If you're using another framework, such as Nuxt, please refer to the [Tailwind Installation Guide](https://tailwindcss.com/docs/installation).
64
74
 
65
75
  ### 1. Install Tailwind CSS and the Vite Plugin
66
76
 
@@ -92,7 +102,6 @@ export default defineConfig({
92
102
  },
93
103
  },
94
104
  })
95
-
96
105
  ```
97
106
 
98
107
  ### 3. Create `tailwind.config.ts`
@@ -110,7 +119,7 @@ export default {
110
119
 
111
120
  ### 4. Configure Tailwind and Nova Plugin in `main.css`
112
121
 
113
- in `src/assets/main.css`:
122
+ In `src/assets/main.css`:
114
123
 
115
124
  ```css
116
125
  @import 'tailwindcss';
@@ -125,18 +134,18 @@ in `src/assets/main.css`:
125
134
  > **Dark Mode**
126
135
  > To enable dark mode, add the `dark` class to the `<body>` element.
127
136
 
128
-
129
137
  ### 5. Register NovaComponents and include the Nova Tokens
130
- Register the Nova Components Vue plugin in your `main.ts` file, and include the nova tokens (Spark or Ocean theme) css file:
131
138
 
132
- ```typescript
139
+ Register the Nova Components Vue plugin in your `main.ts` file, and include exactly one of the Nova tokens (Spark or Ocean) CSS files:
140
+
141
+ ```ts
133
142
  import './assets/main.css'
134
- import '@nova-design-system/nova-base/dist/css/spark.css'; // or ocean.css
143
+ import '@nova-design-system/nova-base/dist/css/spark.css' // or ocean.css
135
144
 
136
145
  import { createApp } from 'vue'
137
146
  import App from './App.vue'
138
147
  import router from './router'
139
- import { NovaComponents } from '@nova-design-system/nova-vue/plugin';
148
+ import { NovaComponents } from '@nova-design-system/nova-vue/plugin'
140
149
 
141
150
  const app = createApp(App)
142
151
 
@@ -146,14 +155,16 @@ app.use(NovaComponents)
146
155
  app.mount('#app')
147
156
  ```
148
157
 
149
- ### 6. Use Nova Components and Tailwind Utilities
158
+ > When using Tailwind, do not import `@nova-design-system/nova-base/dist/css/nova-utils.css`.
150
159
 
151
- ```html
160
+ ### 6. Use Nova Components with Tailwind Utilities
161
+
162
+ ```vue
152
163
  <script setup lang="ts">
153
- import { ref } from 'vue';
164
+ import { ref } from 'vue'
154
165
  import { NvButton } from '@nova-design-system/nova-vue'
155
166
 
156
- const count = ref(0);
167
+ const count = ref(0)
157
168
  </script>
158
169
 
159
170
  <template>
@@ -165,7 +176,7 @@ const count = ref(0);
165
176
  </template>
166
177
  ```
167
178
 
168
- > Note: **We have full typescript and intellisense support for Nova components.** If you do not see the autocomplete options, make sure you uninstall Volar or Vetur, and use the [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) Extension only.
179
+ > Note: **We have full TypeScript and IntelliSense support for Nova components.** If you do not see autocomplete options, uninstall Volar/Vetur and use the [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) extension only.
169
180
 
170
181
  ### 7. Setup the Nova Font
171
182
 
@@ -186,23 +197,23 @@ If you find you’re repeating the same set of utility classes for certain UI el
186
197
 
187
198
  Then in your markup, instead of:
188
199
 
189
- ```jsx
200
+ ```html
190
201
  <div class="bg-gray-50 dark:bg-gray-500 p-4 rounded-md shadow-sm">
191
- {/* Content */}
202
+ <!-- Content -->
192
203
  </div>
193
204
  <div class="bg-gray-50 dark:bg-gray-500 p-4 rounded-md shadow-sm">
194
- {/* Content */}
205
+ <!-- Content -->
195
206
  </div>
196
207
  ```
197
208
 
198
209
  You can use your new `card` class:
199
210
 
200
- ```jsx
211
+ ```html
201
212
  <div class="card">
202
- {/* Content */}
213
+ <!-- Content -->
203
214
  </div>
204
215
  <div class="card">
205
- {/* Content */}
216
+ <!-- Content -->
206
217
  </div>
207
218
  ```
208
219
 
@@ -210,82 +221,19 @@ This ensures consistent styling and keeps your markup clean. Any colors or spaci
210
221
 
211
222
  ---
212
223
 
213
- ## Setup Without Tailwind (Not Recommended)
214
-
215
- If you don’t plan to use Tailwind, Nova provides a large utility CSS file for quick prototyping. Be aware that this approach will increase your CSS bundle size, offer less options, and lacks the flexibility and optimizations of Tailwind.
216
-
217
- ### 1. Register NovaComponents and include the Nova CSS.
218
-
219
- After installing the nova packages, you'll need to include the CSS for the theme and the utils. Then you register the Nova Components Vue plugin.
220
-
221
- In your `main.ts` file:
222
-
223
- ```typescript
224
- import './assets/main.css'
225
- import '@nova-design-system/nova-base/dist/css/nova-utils.css';
226
- import '@nova-design-system/nova-base/dist/css/spark.css'; // or ocean.css
227
-
228
- import { createApp } from 'vue'
229
- import App from './App.vue'
230
- import router from './router'
231
- import { NovaComponents } from '@nova-design-system/nova-vue/plugin';
232
-
233
- const app = createApp(App)
234
-
235
- app.use(router)
236
- app.use(NovaComponents)
237
-
238
- app.mount('#app')
239
- ```
240
-
241
- ### 2. Use Nova Components
242
-
243
- ```html
244
- <script setup lang="ts">
245
- import { ref } from 'vue';
246
- import { NvButton } from '@nova-design-system/nova-vue'
247
-
248
- const count = ref(0);
249
- </script>
250
-
251
- <template>
252
- <div class="flex items-center justify-center">
253
- <NvButton danger @click="count++">
254
- Count is {{ count }}
255
- </NvButton>
256
- </div>
257
- </template>
258
- ```
259
-
260
- ---
261
-
262
224
  ## Nova Font Pro Integration
263
225
 
264
226
  > [!WARNING]
265
227
  > Nova Fonts is a protected asset and is not included in the Nova Base package. You need to include the Nova Fonts CSS file in your project.
266
- > To get the Nova Fonts URL, please contact us via Teams or get the URL in the Nova Design System [internal wiki](https://dev.azure.com/elia-digitization/Nova/_wiki/wikis/Nova.wiki/30245/Nova-Font-Pro).
267
-
268
- Once you have the URL, you can integrate it using any of these methods:
269
-
270
- ### Option 1: Import in Main Entry (Recommended)
271
- In your `main.ts`:
228
+ > To get the Nova Fonts URL, **please contact us via Teams** or get the URL in the Nova Design System [internal wiki](https://dev.azure.com/elia-digitization/Nova/_wiki/wikis/Nova.wiki/30245/Nova-Font-Pro).
272
229
 
273
- ```typescript
274
- import './assets/main.css'
275
- import '@nova-design-system/nova-base/dist/css/spark.css'; // or ocean.css
276
- import 'https://novaassets.azureedge.net/fonts/nova-fonts-pro.css';
230
+ Once you have the URL, you can integrate it using any of these methods:
277
231
 
278
- import { createApp } from 'vue'
279
- import App from './App.vue'
280
- import router from './router'
281
- import { NovaComponents } from '@nova-design-system/nova-vue/plugin';
232
+ ### Option 1: Import in Global CSS (Recommended)
233
+ In your `src/assets/main.css`:
282
234
 
283
- const app = createApp(App)
284
-
285
- app.use(router)
286
- app.use(NovaComponents)
287
-
288
- app.mount('#app')
235
+ ```css
236
+ @import url('contact-us-for-URL/nova-fonts-pro.css');
289
237
  ```
290
238
 
291
239
  ### Option 2: HTML Integration
@@ -295,7 +243,7 @@ In your `index.html`:
295
243
  <!DOCTYPE html>
296
244
  <html>
297
245
  <head>
298
- <link rel="stylesheet" href="https://novaassets.azureedge.net/fonts/nova-fonts-pro.css">
246
+ <link rel="stylesheet" href="contact-us-for-URL/nova-fonts-pro.css">
299
247
  </head>
300
248
  <body>
301
249
  <div id="app"></div>
@@ -55,6 +55,7 @@ export declare const NvIconbutton: import("vue").DefineSetupFnComponent<JSX.NvIc
55
55
  export declare const NvLoader: import("vue").DefineSetupFnComponent<JSX.NvLoader & import("./vue-component-lib/utils").InputProps<string | number | boolean>, {}, {}, JSX.NvLoader & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}, import("vue").PublicProps>;
56
56
  export declare const NvMenu: import("vue").DefineSetupFnComponent<JSX.NvMenu & import("./vue-component-lib/utils").InputProps<string | number | boolean>, {}, {}, JSX.NvMenu & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}, import("vue").PublicProps>;
57
57
  export declare const NvMenuitem: import("vue").DefineSetupFnComponent<JSX.NvMenuitem & import("./vue-component-lib/utils").InputProps<string | number | boolean>, {}, {}, JSX.NvMenuitem & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}, import("vue").PublicProps>;
58
+ export declare const NvNotification: import("vue").DefineSetupFnComponent<JSX.NvNotification & import("./vue-component-lib/utils").InputProps<boolean>, {}, {}, JSX.NvNotification & import("./vue-component-lib/utils").InputProps<boolean> & {}, import("vue").PublicProps>;
58
59
  export declare const NvPopover: import("vue").DefineSetupFnComponent<JSX.NvPopover & import("./vue-component-lib/utils").InputProps<boolean>, {}, {}, JSX.NvPopover & import("./vue-component-lib/utils").InputProps<boolean> & {}, import("vue").PublicProps>;
59
60
  export declare const NvRow: import("vue").DefineSetupFnComponent<JSX.NvRow & import("./vue-component-lib/utils").InputProps<string | number | boolean>, {}, {}, JSX.NvRow & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}, import("vue").PublicProps>;
60
61
  export declare const NvStack: import("vue").DefineSetupFnComponent<JSX.NvStack & import("./vue-component-lib/utils").InputProps<string | number | boolean>, {}, {}, JSX.NvStack & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}, import("vue").PublicProps>;
@@ -99,6 +99,8 @@ export const NvCalendar = /*@__PURE__*/ defineContainer('nv-calendar', undefined
99
99
  'showActions',
100
100
  'shortcuts',
101
101
  'showWeekNumbers',
102
+ 'cancelLabel',
103
+ 'primaryLabel',
102
104
  'singleDateChange',
103
105
  'rangeDateChange',
104
106
  'valueChanged'
@@ -532,6 +534,17 @@ export const NvMenuitem = /*@__PURE__*/ defineContainer('nv-menuitem', undefined
532
534
  'name',
533
535
  'menuitemSelected'
534
536
  ]);
537
+ export const NvNotification = /*@__PURE__*/ defineContainer('nv-notification', undefined, [
538
+ 'uid',
539
+ 'feedback',
540
+ 'emphasis',
541
+ 'heading',
542
+ 'message',
543
+ 'icon',
544
+ 'dismissible',
545
+ 'hidden',
546
+ 'hiddenChanged'
547
+ ], 'hidden', 'hidden-changed');
535
548
  export const NvPopover = /*@__PURE__*/ defineContainer('nv-popover', undefined, [
536
549
  'triggerElement',
537
550
  'open',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nova-design-system/nova-vue",
3
- "version": "3.12.0",
3
+ "version": "3.13.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",