@nova-design-system/nova-react 3.0.0-beta.36 → 3.0.0-beta.37
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 +223 -42
- package/dist/generated/components.js +41 -6
- package/dist/types/generated/components.d.ts +23 -4
- package/package.json +1 -3
package/README.md
CHANGED
|
@@ -1,42 +1,247 @@
|
|
|
1
1
|
# Nova Components React
|
|
2
2
|
|
|
3
|
-
**Nova Components React**
|
|
3
|
+
**Nova Components React** provides an easy way to use [Nova’s native Web Components](https://www.npmjs.com/package/@nova-design-system/nova-webcomponents) within your React applications.
|
|
4
|
+
|
|
5
|
+
- [Nova Components React](#nova-components-react)
|
|
6
|
+
- [Key Features](#key-features)
|
|
7
|
+
- [Installation](#installation)
|
|
8
|
+
- [Setup Using Tailwind (Recommended)](#setup-using-tailwind-recommended)
|
|
9
|
+
- [1. Install Tailwind CSS and the Vite Plugin](#1-install-tailwind-css-and-the-vite-plugin)
|
|
10
|
+
- [2. Configure the Vite Plugin](#2-configure-the-vite-plugin)
|
|
11
|
+
- [3. Create `tailwind.config.ts`](#3-create-tailwindconfigts)
|
|
12
|
+
- [4. Configure Tailwind and Nova Plugin in `index.css`](#4-configure-tailwind-and-nova-plugin-in-indexcss)
|
|
13
|
+
- [5. Include the Nova Tokens (Spark or Ocean)](#5-include-the-nova-tokens-spark-or-ocean)
|
|
14
|
+
- [6. Use Nova Components with Tailwind Utilities](#6-use-nova-components-with-tailwind-utilities)
|
|
15
|
+
- [7. Setup the Nova Font](#7-setup-the-nova-font)
|
|
16
|
+
- [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. Include Nova Tokens and Nova Utilities](#1-include-nova-tokens-and-nova-utilities)
|
|
19
|
+
- [2. Use Nova Components](#2-use-nova-components)
|
|
20
|
+
- [Nova Font Pro Integration](#nova-font-pro-integration)
|
|
21
|
+
- [Option 1: Import in Global CSS (Recommended)](#option-1-import-in-global-css-recommended)
|
|
22
|
+
- [Option 2: HTML Integration](#option-2-html-integration)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Key Features
|
|
28
|
+
|
|
29
|
+
- **Lightweight Integration**: Leverage Nova Web Components with minimal configuration in React.
|
|
30
|
+
- **Customizable Styling**: Use Tailwind (recommended) or Nova’s utility classes to quickly style components.
|
|
31
|
+
- **Dark Mode Ready**: Toggle dark mode by adding the `dark` class to your `body` element.
|
|
32
|
+
- **Nova Font Pro Support**: Easily integrate Nova’s custom font for a consistent design experience.
|
|
33
|
+
|
|
34
|
+
---
|
|
4
35
|
|
|
5
36
|
## Installation
|
|
6
37
|
|
|
7
|
-
|
|
38
|
+
Install the necessary packages using the package manager of your choice:
|
|
8
39
|
|
|
9
40
|
```bash
|
|
10
41
|
npm install @nova-design-system/nova-webcomponents @nova-design-system/nova-base @nova-design-system/nova-react
|
|
11
42
|
```
|
|
12
|
-
|
|
13
|
-
or
|
|
14
|
-
|
|
43
|
+
**or**
|
|
15
44
|
```bash
|
|
16
45
|
yarn add @nova-design-system/nova-webcomponents @nova-design-system/nova-base @nova-design-system/nova-react
|
|
17
46
|
```
|
|
18
47
|
|
|
19
|
-
**Yarn
|
|
48
|
+
> **Note for Yarn Users**
|
|
49
|
+
> Yarn **does not automatically** install peer dependencies. You must install the following peer dependency manually:
|
|
50
|
+
> ```bash
|
|
51
|
+
> yarn add @stencil/react-output-target
|
|
52
|
+
> ```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Setup Using Tailwind (Recommended)
|
|
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.
|
|
20
59
|
|
|
21
|
-
|
|
60
|
+
> **Tailwind Version**
|
|
61
|
+
> This guide is written for Tailwind v4. While compatible with v3, some features may not work as expected.
|
|
62
|
+
|
|
63
|
+
Below is an example setup using Vite + React. If you’re using another framework or bundler, please refer to the [Tailwind Installation Guide](https://tailwindcss.com/docs/installation).
|
|
64
|
+
|
|
65
|
+
### 1. Install Tailwind CSS and the Vite Plugin
|
|
22
66
|
|
|
23
67
|
```bash
|
|
24
|
-
|
|
68
|
+
npm install tailwindcss @tailwindcss/vite
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
> Use the **[Tailwind CSS IntelliSense Extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)** to get full autocomplete support for Tailwind and Nova tokens.
|
|
72
|
+
|
|
73
|
+
### 2. Configure the Vite Plugin
|
|
74
|
+
|
|
75
|
+
Add the tailwindcss plugin to your `vite.config.ts`:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
import { defineConfig } from 'vite'
|
|
79
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
80
|
+
|
|
81
|
+
export default defineConfig({
|
|
82
|
+
plugins: [
|
|
83
|
+
tailwindcss(),
|
|
84
|
+
],
|
|
85
|
+
})
|
|
25
86
|
```
|
|
26
87
|
|
|
27
|
-
|
|
88
|
+
### 3. Create `tailwind.config.ts`
|
|
28
89
|
|
|
29
|
-
|
|
90
|
+
In the root of your project, create a `tailwind.config.ts` (or `.js`) file and include the Nova theme:
|
|
30
91
|
|
|
31
|
-
```
|
|
32
|
-
import '
|
|
33
|
-
import
|
|
34
|
-
import { defineCustomElements } from '@nova-design-system/nova-webcomponents/loader';
|
|
92
|
+
```ts
|
|
93
|
+
import type { Config } from 'tailwindcss'
|
|
94
|
+
import { novaTailwindTheme } from "@nova-design-system/nova-base/theme"
|
|
35
95
|
|
|
36
|
-
|
|
96
|
+
export default {
|
|
97
|
+
theme: novaTailwindTheme,
|
|
98
|
+
} satisfies Config
|
|
37
99
|
```
|
|
38
100
|
|
|
39
|
-
|
|
101
|
+
### 4. Configure Tailwind and Nova Plugin in `index.css`
|
|
102
|
+
|
|
103
|
+
```css
|
|
104
|
+
@import 'tailwindcss';
|
|
105
|
+
|
|
106
|
+
@config "../tailwind.config.ts";
|
|
107
|
+
@plugin "@nova-design-system/nova-base/theme/plugin";
|
|
108
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
> **Dark Mode**
|
|
112
|
+
> To enable dark mode, add the `dark` class to the `<body>` element.
|
|
113
|
+
|
|
114
|
+
### 5. Include the Nova Tokens (Spark or Ocean)
|
|
115
|
+
|
|
116
|
+
In your main entry point (`main.tsx` or `index.tsx`), import one of the Nova tokens CSS files:
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import { StrictMode } from 'react'
|
|
120
|
+
import { createRoot } from 'react-dom/client'
|
|
121
|
+
|
|
122
|
+
import "@nova-design-system/nova-base/dist/css/spark.css"; // or ocean.css
|
|
123
|
+
import './index.css'
|
|
124
|
+
|
|
125
|
+
import App from './App.tsx'
|
|
126
|
+
|
|
127
|
+
createRoot(document.getElementById('root')!).render(
|
|
128
|
+
<StrictMode>
|
|
129
|
+
<App />
|
|
130
|
+
</StrictMode>
|
|
131
|
+
)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 6. Use Nova Components with Tailwind Utilities
|
|
135
|
+
|
|
136
|
+
```tsx
|
|
137
|
+
import { useState } from 'react'
|
|
138
|
+
import { NvButton } from "@nova-design-system/nova-react"
|
|
139
|
+
|
|
140
|
+
const MyComponent: React.FC = () => {
|
|
141
|
+
const [count, setCount] = useState(0)
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<div className="flex items-center justify-center">
|
|
145
|
+
<NvButton danger onClick={() => setCount(count + 1)}>
|
|
146
|
+
Count is {count}
|
|
147
|
+
</NvButton>
|
|
148
|
+
</div>
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export default MyComponent
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### 7. Setup the Nova Font
|
|
156
|
+
|
|
157
|
+
Follow the steps in the [Nova Font Pro Integration](#nova-font-pro-integration) section below.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### Creating Your Own Style Components with Tailwind
|
|
162
|
+
|
|
163
|
+
If you find you’re repeating the same set of utility classes for certain UI elements (e.g., a card component), you can group them using Tailwind’s `@apply` keyword:
|
|
164
|
+
|
|
165
|
+
```css
|
|
166
|
+
/* any css file */
|
|
167
|
+
.card {
|
|
168
|
+
@apply bg-gray-50 dark:bg-gray-500 p-4 rounded-md shadow-sm;
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Then in your markup, instead of:
|
|
173
|
+
|
|
174
|
+
```jsx
|
|
175
|
+
<div className="bg-gray-50 dark:bg-gray-500 p-4 rounded-md shadow-sm">
|
|
176
|
+
{/* Content */}
|
|
177
|
+
</div>
|
|
178
|
+
<div className="bg-gray-50 dark:bg-gray-500 p-4 rounded-md shadow-sm">
|
|
179
|
+
{/* Content */}
|
|
180
|
+
</div>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
You can use your new `card` class:
|
|
184
|
+
|
|
185
|
+
```jsx
|
|
186
|
+
<div className="card">
|
|
187
|
+
{/* Content */}
|
|
188
|
+
</div>
|
|
189
|
+
<div className="card">
|
|
190
|
+
{/* Content */}
|
|
191
|
+
</div>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
This ensures consistent styling and keeps your markup clean. Any colors or spacing used will reference the correct Nova Tokens.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Setup Without Tailwind (Not Recommended)
|
|
199
|
+
|
|
200
|
+
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.
|
|
201
|
+
|
|
202
|
+
### 1. Include Nova Tokens and Nova Utilities
|
|
203
|
+
|
|
204
|
+
In your entry point (`main.tsx`):
|
|
205
|
+
|
|
206
|
+
```ts
|
|
207
|
+
import { StrictMode } from 'react'
|
|
208
|
+
import { createRoot } from 'react-dom/client'
|
|
209
|
+
|
|
210
|
+
import '@nova-design-system/nova-base/dist/css/spark.css' // or ocean.css
|
|
211
|
+
import '@nova-design-system/nova-base/dist/css/nova-utils.css'
|
|
212
|
+
import './index.css'
|
|
213
|
+
|
|
214
|
+
import App from './App.tsx'
|
|
215
|
+
|
|
216
|
+
createRoot(document.getElementById('root')!).render(
|
|
217
|
+
<StrictMode>
|
|
218
|
+
<App />
|
|
219
|
+
</StrictMode>
|
|
220
|
+
)
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### 2. Use Nova Components
|
|
224
|
+
|
|
225
|
+
```tsx
|
|
226
|
+
import { useState } from 'react'
|
|
227
|
+
import { NvButton } from "@nova-design-system/nova-react"
|
|
228
|
+
|
|
229
|
+
const MyComponent: React.FC = () => {
|
|
230
|
+
const [count, setCount] = useState(0)
|
|
231
|
+
|
|
232
|
+
return (
|
|
233
|
+
<div className="flex items-center justify-center">
|
|
234
|
+
<NvButton danger onClick={() => setCount(count + 1)}>
|
|
235
|
+
Count is {count}
|
|
236
|
+
</NvButton>
|
|
237
|
+
</div>
|
|
238
|
+
)
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export default MyComponent
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
40
245
|
|
|
41
246
|
## Nova Font Pro Integration
|
|
42
247
|
|
|
@@ -47,14 +252,14 @@ This setup ensures that all the necessary Nova web-components are available in y
|
|
|
47
252
|
Once you have the URL, you can integrate it using any of these methods:
|
|
48
253
|
|
|
49
254
|
### Option 1: Import in Global CSS (Recommended)
|
|
50
|
-
In your main CSS file (e.g., `src/index.css`
|
|
255
|
+
In your main CSS file (e.g., `src/index.css`):
|
|
51
256
|
|
|
52
257
|
```css
|
|
53
258
|
@import url('https://novaassets.azureedge.net/fonts/nova-fonts-pro.css');
|
|
54
259
|
```
|
|
55
260
|
|
|
56
261
|
### Option 2: HTML Integration
|
|
57
|
-
In your `
|
|
262
|
+
In your `index.html`:
|
|
58
263
|
|
|
59
264
|
```html
|
|
60
265
|
<!DOCTYPE html>
|
|
@@ -69,27 +274,3 @@ In your `public/index.html`:
|
|
|
69
274
|
```
|
|
70
275
|
|
|
71
276
|
The `nova-fonts-pro.css` file includes both font definitions and the `font-family` rule for the `body`, automatically applying the fonts across your React application.
|
|
72
|
-
|
|
73
|
-
## Usage
|
|
74
|
-
|
|
75
|
-
With everything set up, you can start using Nova components in your React application. Here's a quick example:
|
|
76
|
-
|
|
77
|
-
```typescript
|
|
78
|
-
import { NvButton } from '@nova-design-system/nova-react';
|
|
79
|
-
|
|
80
|
-
const MyComponent = () => {
|
|
81
|
-
const [count, setCount] = useState(0);
|
|
82
|
-
|
|
83
|
-
return (
|
|
84
|
-
<NvButton danger onClick={() => setCount(count + 1)}>
|
|
85
|
-
count is {count}
|
|
86
|
-
</NvButton>
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
In this example, the `NvButton` component is imported and used just like any other React component. The `danger` prop and `onClick` handler are passed to customize its behavior.
|
|
92
|
-
|
|
93
|
-
## Conclusion
|
|
94
|
-
|
|
95
|
-
Nova Components React provides an easy way to integrate Nova's native web components into your React projects, enabling you to leverage the power of Nova UI with the flexibility of React. For more detailed documentation and examples, refer to the official Nova documentation.
|
|
@@ -13,6 +13,9 @@ import { NvDatagridcolumn as NvDatagridcolumnElement, defineCustomElement as def
|
|
|
13
13
|
import { NvDatagriddatacell as NvDatagriddatacellElement, defineCustomElement as defineNvDatagriddatacell } from "@nova-design-system/nova-webcomponents/dist/components/nv-datagriddatacell.js";
|
|
14
14
|
import { NvDatagridhead as NvDatagridheadElement, defineCustomElement as defineNvDatagridhead } from "@nova-design-system/nova-webcomponents/dist/components/nv-datagridhead.js";
|
|
15
15
|
import { NvDatagridrow as NvDatagridrowElement, defineCustomElement as defineNvDatagridrow } from "@nova-design-system/nova-webcomponents/dist/components/nv-datagridrow.js";
|
|
16
|
+
import { NvDialog as NvDialogElement, defineCustomElement as defineNvDialog } from "@nova-design-system/nova-webcomponents/dist/components/nv-dialog.js";
|
|
17
|
+
import { NvDialogfooter as NvDialogfooterElement, defineCustomElement as defineNvDialogfooter } from "@nova-design-system/nova-webcomponents/dist/components/nv-dialogfooter.js";
|
|
18
|
+
import { NvDialogheader as NvDialogheaderElement, defineCustomElement as defineNvDialogheader } from "@nova-design-system/nova-webcomponents/dist/components/nv-dialogheader.js";
|
|
16
19
|
import { NvFieldcheckbox as NvFieldcheckboxElement, defineCustomElement as defineNvFieldcheckbox } from "@nova-design-system/nova-webcomponents/dist/components/nv-fieldcheckbox.js";
|
|
17
20
|
import { NvFielddropdown as NvFielddropdownElement, defineCustomElement as defineNvFielddropdown } from "@nova-design-system/nova-webcomponents/dist/components/nv-fielddropdown.js";
|
|
18
21
|
import { NvFielddropdownitem as NvFielddropdownitemElement, defineCustomElement as defineNvFielddropdownitem } from "@nova-design-system/nova-webcomponents/dist/components/nv-fielddropdownitem.js";
|
|
@@ -24,7 +27,7 @@ import { NvFieldradio as NvFieldradioElement, defineCustomElement as defineNvFie
|
|
|
24
27
|
import { NvFieldselect as NvFieldselectElement, defineCustomElement as defineNvFieldselect } from "@nova-design-system/nova-webcomponents/dist/components/nv-fieldselect.js";
|
|
25
28
|
import { NvFieldtext as NvFieldtextElement, defineCustomElement as defineNvFieldtext } from "@nova-design-system/nova-webcomponents/dist/components/nv-fieldtext.js";
|
|
26
29
|
import { NvFieldtextarea as NvFieldtextareaElement, defineCustomElement as defineNvFieldtextarea } from "@nova-design-system/nova-webcomponents/dist/components/nv-fieldtextarea.js";
|
|
27
|
-
import {
|
|
30
|
+
import { NvFieldtime as NvFieldtimeElement, defineCustomElement as defineNvFieldtime } from "@nova-design-system/nova-webcomponents/dist/components/nv-fieldtime.js";
|
|
28
31
|
import { NvIcon as NvIconElement, defineCustomElement as defineNvIcon } from "@nova-design-system/nova-webcomponents/dist/components/nv-icon.js";
|
|
29
32
|
import { NvIconbutton as NvIconbuttonElement, defineCustomElement as defineNvIconbutton } from "@nova-design-system/nova-webcomponents/dist/components/nv-iconbutton.js";
|
|
30
33
|
import { NvLoader as NvLoaderElement, defineCustomElement as defineNvLoader } from "@nova-design-system/nova-webcomponents/dist/components/nv-loader.js";
|
|
@@ -39,6 +42,7 @@ import { NvTablecolumn as NvTablecolumnElement, defineCustomElement as defineNvT
|
|
|
39
42
|
import { NvTabledatacell as NvTabledatacellElement, defineCustomElement as defineNvTabledatacell } from "@nova-design-system/nova-webcomponents/dist/components/nv-tabledatacell.js";
|
|
40
43
|
import { NvTablehead as NvTableheadElement, defineCustomElement as defineNvTablehead } from "@nova-design-system/nova-webcomponents/dist/components/nv-tablehead.js";
|
|
41
44
|
import { NvTablerow as NvTablerowElement, defineCustomElement as defineNvTablerow } from "@nova-design-system/nova-webcomponents/dist/components/nv-tablerow.js";
|
|
45
|
+
import { NvToggle as NvToggleElement, defineCustomElement as defineNvToggle } from "@nova-design-system/nova-webcomponents/dist/components/nv-toggle.js";
|
|
42
46
|
import { NvTooltip as NvTooltipElement, defineCustomElement as defineNvTooltip } from "@nova-design-system/nova-webcomponents/dist/components/nv-tooltip.js";
|
|
43
47
|
import { createComponent } from '@stencil/react-output-target/runtime';
|
|
44
48
|
import React from 'react';
|
|
@@ -148,6 +152,30 @@ export const NvDatagridrow = createComponent({
|
|
|
148
152
|
events: {},
|
|
149
153
|
defineCustomElement: defineNvDatagridrow
|
|
150
154
|
});
|
|
155
|
+
export const NvDialog = createComponent({
|
|
156
|
+
tagName: 'nv-dialog',
|
|
157
|
+
elementClass: NvDialogElement,
|
|
158
|
+
react: React,
|
|
159
|
+
events: { onClose: 'close' },
|
|
160
|
+
defineCustomElement: defineNvDialog
|
|
161
|
+
});
|
|
162
|
+
export const NvDialogfooter = createComponent({
|
|
163
|
+
tagName: 'nv-dialogfooter',
|
|
164
|
+
elementClass: NvDialogfooterElement,
|
|
165
|
+
react: React,
|
|
166
|
+
events: {
|
|
167
|
+
onNvDialogCanceled: 'nvDialogCanceled',
|
|
168
|
+
onNvDialogConfirmed: 'nvDialogConfirmed'
|
|
169
|
+
},
|
|
170
|
+
defineCustomElement: defineNvDialogfooter
|
|
171
|
+
});
|
|
172
|
+
export const NvDialogheader = createComponent({
|
|
173
|
+
tagName: 'nv-dialogheader',
|
|
174
|
+
elementClass: NvDialogheaderElement,
|
|
175
|
+
react: React,
|
|
176
|
+
events: {},
|
|
177
|
+
defineCustomElement: defineNvDialogheader
|
|
178
|
+
});
|
|
151
179
|
export const NvFieldcheckbox = createComponent({
|
|
152
180
|
tagName: 'nv-fieldcheckbox',
|
|
153
181
|
elementClass: NvFieldcheckboxElement,
|
|
@@ -232,12 +260,12 @@ export const NvFieldtextarea = createComponent({
|
|
|
232
260
|
events: { onValueChanged: 'valueChanged' },
|
|
233
261
|
defineCustomElement: defineNvFieldtextarea
|
|
234
262
|
});
|
|
235
|
-
export const
|
|
236
|
-
tagName: 'nv-
|
|
237
|
-
elementClass:
|
|
263
|
+
export const NvFieldtime = createComponent({
|
|
264
|
+
tagName: 'nv-fieldtime',
|
|
265
|
+
elementClass: NvFieldtimeElement,
|
|
238
266
|
react: React,
|
|
239
|
-
events: {
|
|
240
|
-
defineCustomElement:
|
|
267
|
+
events: { onValueChanged: 'valueChanged' },
|
|
268
|
+
defineCustomElement: defineNvFieldtime
|
|
241
269
|
});
|
|
242
270
|
export const NvIcon = createComponent({
|
|
243
271
|
tagName: 'nv-icon',
|
|
@@ -337,6 +365,13 @@ export const NvTablerow = createComponent({
|
|
|
337
365
|
events: {},
|
|
338
366
|
defineCustomElement: defineNvTablerow
|
|
339
367
|
});
|
|
368
|
+
export const NvToggle = createComponent({
|
|
369
|
+
tagName: 'nv-toggle',
|
|
370
|
+
elementClass: NvToggleElement,
|
|
371
|
+
react: React,
|
|
372
|
+
events: { onCheckedChanged: 'checkedChanged' },
|
|
373
|
+
defineCustomElement: defineNvToggle
|
|
374
|
+
});
|
|
340
375
|
export const NvTooltip = createComponent({
|
|
341
376
|
tagName: 'nv-tooltip',
|
|
342
377
|
elementClass: NvTooltipElement,
|
|
@@ -13,6 +13,9 @@ import { NvDatagridcolumn as NvDatagridcolumnElement } from "@nova-design-system
|
|
|
13
13
|
import { NvDatagriddatacell as NvDatagriddatacellElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-datagriddatacell.js";
|
|
14
14
|
import { NvDatagridhead as NvDatagridheadElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-datagridhead.js";
|
|
15
15
|
import { NvDatagridrow as NvDatagridrowElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-datagridrow.js";
|
|
16
|
+
import { NvDialog as NvDialogElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-dialog.js";
|
|
17
|
+
import { NvDialogfooter as NvDialogfooterElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-dialogfooter.js";
|
|
18
|
+
import { NvDialogheader as NvDialogheaderElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-dialogheader.js";
|
|
16
19
|
import { NvFieldcheckbox as NvFieldcheckboxElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-fieldcheckbox.js";
|
|
17
20
|
import { NvFielddropdown as NvFielddropdownElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-fielddropdown.js";
|
|
18
21
|
import { NvFielddropdownitem as NvFielddropdownitemElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-fielddropdownitem.js";
|
|
@@ -24,7 +27,7 @@ import { NvFieldradio as NvFieldradioElement } from "@nova-design-system/nova-we
|
|
|
24
27
|
import { NvFieldselect as NvFieldselectElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-fieldselect.js";
|
|
25
28
|
import { NvFieldtext as NvFieldtextElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-fieldtext.js";
|
|
26
29
|
import { NvFieldtextarea as NvFieldtextareaElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-fieldtextarea.js";
|
|
27
|
-
import {
|
|
30
|
+
import { NvFieldtime as NvFieldtimeElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-fieldtime.js";
|
|
28
31
|
import { NvIcon as NvIconElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-icon.js";
|
|
29
32
|
import { NvIconbutton as NvIconbuttonElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-iconbutton.js";
|
|
30
33
|
import { NvLoader as NvLoaderElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-loader.js";
|
|
@@ -39,6 +42,7 @@ import { NvTablecolumn as NvTablecolumnElement } from "@nova-design-system/nova-
|
|
|
39
42
|
import { NvTabledatacell as NvTabledatacellElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-tabledatacell.js";
|
|
40
43
|
import { NvTablehead as NvTableheadElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-tablehead.js";
|
|
41
44
|
import { NvTablerow as NvTablerowElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-tablerow.js";
|
|
45
|
+
import { NvToggle as NvToggleElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-toggle.js";
|
|
42
46
|
import { NvTooltip as NvTooltipElement } from "@nova-design-system/nova-webcomponents/dist/components/nv-tooltip.js";
|
|
43
47
|
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
44
48
|
type NvAlertEvents = {
|
|
@@ -77,6 +81,17 @@ type NvDatagridheadEvents = NonNullable<unknown>;
|
|
|
77
81
|
export declare const NvDatagridhead: StencilReactComponent<NvDatagridheadElement, NvDatagridheadEvents>;
|
|
78
82
|
type NvDatagridrowEvents = NonNullable<unknown>;
|
|
79
83
|
export declare const NvDatagridrow: StencilReactComponent<NvDatagridrowElement, NvDatagridrowEvents>;
|
|
84
|
+
type NvDialogEvents = {
|
|
85
|
+
onClose: EventName<CustomEvent<void>>;
|
|
86
|
+
};
|
|
87
|
+
export declare const NvDialog: StencilReactComponent<NvDialogElement, NvDialogEvents>;
|
|
88
|
+
type NvDialogfooterEvents = {
|
|
89
|
+
onNvDialogCanceled: EventName<CustomEvent<void>>;
|
|
90
|
+
onNvDialogConfirmed: EventName<CustomEvent<void>>;
|
|
91
|
+
};
|
|
92
|
+
export declare const NvDialogfooter: StencilReactComponent<NvDialogfooterElement, NvDialogfooterEvents>;
|
|
93
|
+
type NvDialogheaderEvents = NonNullable<unknown>;
|
|
94
|
+
export declare const NvDialogheader: StencilReactComponent<NvDialogheaderElement, NvDialogheaderEvents>;
|
|
80
95
|
type NvFieldcheckboxEvents = {
|
|
81
96
|
onCheckedChanged: EventName<CustomEvent<boolean>>;
|
|
82
97
|
};
|
|
@@ -128,10 +143,10 @@ type NvFieldtextareaEvents = {
|
|
|
128
143
|
onValueChanged: EventName<CustomEvent<string>>;
|
|
129
144
|
};
|
|
130
145
|
export declare const NvFieldtextarea: StencilReactComponent<NvFieldtextareaElement, NvFieldtextareaEvents>;
|
|
131
|
-
type
|
|
132
|
-
|
|
146
|
+
type NvFieldtimeEvents = {
|
|
147
|
+
onValueChanged: EventName<CustomEvent<string>>;
|
|
133
148
|
};
|
|
134
|
-
export declare const
|
|
149
|
+
export declare const NvFieldtime: StencilReactComponent<NvFieldtimeElement, NvFieldtimeEvents>;
|
|
135
150
|
type NvIconEvents = NonNullable<unknown>;
|
|
136
151
|
export declare const NvIcon: StencilReactComponent<NvIconElement, NvIconEvents>;
|
|
137
152
|
type NvIconbuttonEvents = NonNullable<unknown>;
|
|
@@ -166,6 +181,10 @@ type NvTableheadEvents = NonNullable<unknown>;
|
|
|
166
181
|
export declare const NvTablehead: StencilReactComponent<NvTableheadElement, NvTableheadEvents>;
|
|
167
182
|
type NvTablerowEvents = NonNullable<unknown>;
|
|
168
183
|
export declare const NvTablerow: StencilReactComponent<NvTablerowElement, NvTablerowEvents>;
|
|
184
|
+
type NvToggleEvents = {
|
|
185
|
+
onCheckedChanged: EventName<CustomEvent<boolean>>;
|
|
186
|
+
};
|
|
187
|
+
export declare const NvToggle: StencilReactComponent<NvToggleElement, NvToggleEvents>;
|
|
169
188
|
type NvTooltipEvents = NonNullable<unknown>;
|
|
170
189
|
export declare const NvTooltip: StencilReactComponent<NvTooltipElement, NvTooltipEvents>;
|
|
171
190
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nova-design-system/nova-react",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.37",
|
|
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",
|
|
@@ -30,8 +30,6 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"react": "^18.3.1",
|
|
32
32
|
"react-dom": "^18.3.1",
|
|
33
|
-
"@storybook/react": "8.4.7",
|
|
34
|
-
"@storybook/react-vite": "8.4.7",
|
|
35
33
|
"nova-utils": "*",
|
|
36
34
|
"nova-storybook-utils": "*",
|
|
37
35
|
"@nova-design-system/nova-webcomponents": "*"
|