@cupra/ui-react 2.0.0-canary.1 → 2.0.0-canary.10
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 +164 -64
- package/dist/components/BasicCard/BasicCard.d.ts +19 -0
- package/dist/components/BasicCard/BasicCard.js +15 -0
- package/dist/components/BasicCard/stories/CupraDiagonal.stories.d.ts +7 -0
- package/dist/components/BasicCardHeader/BasicCardHeader.d.ts +36 -0
- package/dist/components/BasicCardHeader/stories/CupraDiagonal.stories.d.ts +5 -0
- package/dist/components/BasicCardImage/BasicCardImage.d.ts +8 -0
- package/dist/components/BasicCardImage/stories/CupraDiagonal.stories.d.ts +5 -0
- package/dist/components/BasicCardSection/BasicCardSection.d.ts +8 -0
- package/dist/components/BasicCardSection/BasicCardSection.js +9 -0
- package/dist/components/BasicCardSection/stories/CupraDiagonal.stories.d.ts +5 -0
- package/dist/components/DialogFullscreen/DialogFullscreen.d.ts +11 -0
- package/dist/components/DialogFullscreen/stories/CupraDiagonal.stories.d.ts +5 -0
- package/dist/components/MediaControl/MediaControl.d.ts +10 -0
- package/dist/components/MediaControl/MediaControl.js +12 -0
- package/dist/components/MediaControl/stories/CupraDiagonal.stories.d.ts +6 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/index.js +119 -113
- package/package.json +9 -5
package/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
# UI React (React Components)
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
|
+
|
|
4
5
|
React components and wrappers built on top of the DS-UI Web Components, providing a seamless and idiomatic developer experience for React.
|
|
5
6
|
This package exposes React-friendly APIs (props, JSX, typed events) while preserving the DS-UI theming, styling, and asset resolution model.
|
|
6
7
|
|
|
8
|
+
---
|
|
9
|
+
|
|
7
10
|
## Audience
|
|
11
|
+
|
|
8
12
|
Use `@cupra/ui-react` if your application is built with **React** and you want:
|
|
9
13
|
|
|
10
14
|
- First-class React ergonomics with DS-UI components
|
|
@@ -14,6 +18,8 @@ Use `@cupra/ui-react` if your application is built with **React** and you want:
|
|
|
14
18
|
|
|
15
19
|
If you need a **framework-agnostic** solution, consider `@cupra/ui-kit` (Web Components).
|
|
16
20
|
|
|
21
|
+
---
|
|
22
|
+
|
|
17
23
|
## Requirements & Compatibility
|
|
18
24
|
|
|
19
25
|
This library currently provides **official support for React 18**.
|
|
@@ -22,36 +28,116 @@ This library currently provides **official support for React 18**.
|
|
|
22
28
|
|
|
23
29
|
Projects using other React versions may still install and use the library, but behaviour is not guaranteed until official support is released.
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## TypeScript and module resolution
|
|
34
|
+
|
|
35
|
+
This library is **bundler-first**.
|
|
36
|
+
|
|
37
|
+
### Subpath imports (recommended)
|
|
38
|
+
|
|
39
|
+
Importing components via subpaths (for example `@cupra/ui-react/Accordion`) requires
|
|
40
|
+
TypeScript to use **bundler-based module resolution**:
|
|
41
|
+
|
|
42
|
+
- **TypeScript ≥ 5**
|
|
43
|
+
- `"moduleResolution": "bundler"`
|
|
44
|
+
|
|
45
|
+
This matches how modern bundlers resolve modules and enables the best developer experience,
|
|
46
|
+
including proper tree-shaking and code-splitting.
|
|
47
|
+
|
|
48
|
+
Minimal required `tsconfig.json` setting:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
{
|
|
52
|
+
"compilerOptions": {
|
|
53
|
+
"moduleResolution": "bundler"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Other compiler options (`target`, `module`, `lib`, etc.) are project-specific and can be configured as needed.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### Root imports (compatibility mode)
|
|
63
|
+
|
|
64
|
+
If your project cannot use `moduleResolution: "bundler"`, you can still consume the library using **root imports**:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
import { Accordion, IconButton } from "@cupra/ui-react";
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
This mode works with legacy or constrained TypeScript setups, but has the following trade-offs:
|
|
71
|
+
|
|
72
|
+
- Subpath imports are not available
|
|
73
|
+
- Reduced tree-shaking and chunking opportunities
|
|
74
|
+
- All components are imported from the package entry point
|
|
75
|
+
|
|
76
|
+
Root imports are supported as a fallback, but **subpath imports are recommended whenever possible**.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
### Notes
|
|
81
|
+
|
|
82
|
+
- Subpath imports are intentionally designed for bundler-based environments.
|
|
83
|
+
- The library does not attempt to enforce Node-style module resolution.
|
|
84
|
+
- No additional runtime configuration is required when using a modern bundler.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Getting started
|
|
89
|
+
|
|
90
|
+
### Installation
|
|
26
91
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- pnpm: `pnpm add @cupra/ui-react`
|
|
30
|
-
- yarn: `yarn add @cupra/ui-react`
|
|
92
|
+
`@cupra/ui-react` is a React wrapper around the Web Components provided by
|
|
93
|
+
`@cupra/ui-kit`.
|
|
31
94
|
|
|
32
|
-
|
|
95
|
+
For this reason, **both packages must be installed** in your project.
|
|
33
96
|
|
|
34
|
-
|
|
97
|
+
Using npm:
|
|
35
98
|
|
|
36
|
-
```
|
|
37
|
-
@cupra
|
|
99
|
+
```
|
|
100
|
+
npm install @cupra/ui-react @cupra/ui-kit
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Using pnpm:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
pnpm add @cupra/ui-react @cupra/ui-kit
|
|
38
107
|
```
|
|
39
108
|
|
|
40
|
-
|
|
109
|
+
Using yarn:
|
|
41
110
|
|
|
42
|
-
```yaml
|
|
43
|
-
npmScopes:
|
|
44
|
-
cupra:
|
|
45
|
-
npmRegistryServer: "https://registry.npmjs.org"
|
|
46
111
|
```
|
|
112
|
+
yarn add @cupra/ui-react @cupra/ui-kit
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### About peer dependencies
|
|
118
|
+
|
|
119
|
+
`@cupra/ui-kit` is declared as a **peer dependency** of `@cupra/ui-react`.
|
|
120
|
+
|
|
121
|
+
This means:
|
|
122
|
+
|
|
123
|
+
- `@cupra/ui-react` does not bundle or ship the Web Components itself
|
|
124
|
+
- the consuming project must provide a compatible version of `@cupra/ui-kit`
|
|
125
|
+
- only a single instance of the design system is expected at runtime
|
|
126
|
+
|
|
127
|
+
Some package managers (such as npm ≥ 7 or pnpm with compatible settings) may install
|
|
128
|
+
peer dependencies automatically. Others (such as Yarn) require installing them explicitly.
|
|
129
|
+
|
|
130
|
+
If you encounter missing-module or runtime errors after installing `@cupra/ui-react`,
|
|
131
|
+
make sure that `@cupra/ui-kit` is also installed in your project.
|
|
47
132
|
|
|
48
133
|
---
|
|
49
134
|
|
|
50
135
|
## Documentation & Live Playground
|
|
51
136
|
|
|
52
|
-
You can explore all `ui-react`
|
|
137
|
+
You can explore all `ui-react` components, their APIs, theming options and live examples
|
|
138
|
+
in the online documentation and playground:
|
|
53
139
|
|
|
54
|
-
|
|
140
|
+
https://diagonal.cupra.com/ui-react/index.html
|
|
55
141
|
|
|
56
142
|
---
|
|
57
143
|
|
|
@@ -59,7 +145,8 @@ You can explore all `ui-react` Components, their APIs, theming options and live
|
|
|
59
145
|
|
|
60
146
|
This package is distributed through npm using **two release channels**.
|
|
61
147
|
|
|
62
|
-
### Stable
|
|
148
|
+
### Stable releases (`latest`)
|
|
149
|
+
|
|
63
150
|
Production-ready versions:
|
|
64
151
|
|
|
65
152
|
- Follow Semantic Versioning
|
|
@@ -68,19 +155,20 @@ Production-ready versions:
|
|
|
68
155
|
|
|
69
156
|
Install:
|
|
70
157
|
|
|
71
|
-
```
|
|
72
|
-
npm install @cupra/ui-react
|
|
158
|
+
```
|
|
159
|
+
npm install @cupra/ui-react
|
|
73
160
|
```
|
|
74
161
|
|
|
75
162
|
Specific version:
|
|
76
163
|
|
|
77
|
-
```
|
|
78
|
-
npm install @cupra/ui-react@0.1.3
|
|
164
|
+
```
|
|
165
|
+
npm install @cupra/ui-react@0.1.3
|
|
79
166
|
```
|
|
80
167
|
|
|
81
168
|
---
|
|
82
169
|
|
|
83
|
-
### Canary
|
|
170
|
+
### Canary releases (`canary`)
|
|
171
|
+
|
|
84
172
|
Early-access versions published after each merge into `main`.
|
|
85
173
|
|
|
86
174
|
Use canary releases if you:
|
|
@@ -91,87 +179,99 @@ Use canary releases if you:
|
|
|
91
179
|
|
|
92
180
|
Latest canary:
|
|
93
181
|
|
|
94
|
-
```
|
|
95
|
-
npm install @cupra/ui-react@canary
|
|
182
|
+
```
|
|
183
|
+
npm install @cupra/ui-react@canary
|
|
96
184
|
```
|
|
97
185
|
|
|
98
186
|
Specific canary version:
|
|
99
187
|
|
|
100
|
-
```
|
|
101
|
-
npm install @cupra/ui-react@0.1.4-canary.2
|
|
188
|
+
```
|
|
189
|
+
npm install @cupra/ui-react@0.1.4-canary.2
|
|
102
190
|
```
|
|
103
191
|
|
|
104
192
|
---
|
|
105
193
|
|
|
106
194
|
## Recommended usage
|
|
107
195
|
|
|
108
|
-
- **Production:** use **stable versions (
|
|
109
|
-
- **Internal testing / preview:** use
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
npm install @cupra/ui-react@0.1.4-canary.2
|
|
113
|
-
```
|
|
196
|
+
- **Production:** use **stable versions** (for example `@cupra/ui-react@1.1.3`)
|
|
197
|
+
- **Internal testing / preview:** use **canary** versions
|
|
114
198
|
|
|
115
199
|
---
|
|
116
200
|
|
|
117
201
|
## Usage
|
|
118
202
|
|
|
119
|
-
|
|
120
|
-
|
|
203
|
+
When possible, import components via subpaths:
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
import { Button } from "@cupra/ui-react/Button";
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
If your TypeScript setup does not support bundler-based module resolution, use root imports instead:
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
import { Button } from "@cupra/ui-react";
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Wrap your React application with `ThemeProvider`.
|
|
121
216
|
|
|
122
|
-
Wrap your React app with `ThemeProvider`.
|
|
123
217
|
The provider requires **three props**:
|
|
124
218
|
|
|
125
|
-
| Prop
|
|
126
|
-
|
|
127
|
-
| `theme`
|
|
128
|
-
| `loadFonts` | boolean | Yes
|
|
129
|
-
| `loadStyles
|
|
219
|
+
| Prop | Type | Required | Description |
|
|
220
|
+
|-------------|---------|----------|-----------------------------------------------|
|
|
221
|
+
| `theme` | string | Yes | Visual theme identifier (e.g. cupra-diagonal) |
|
|
222
|
+
| `loadFonts` | boolean | Yes | Auto-load DS-UI font files |
|
|
223
|
+
| `loadStyles`| boolean | Yes | Auto-load DS-UI CSS |
|
|
130
224
|
|
|
131
|
-
If `loadFonts` or `loadStyles` are `false`, you must manually include `<link>` tags
|
|
225
|
+
If `loadFonts` or `loadStyles` are `false`, you must manually include the corresponding `<link>` tags.
|
|
132
226
|
|
|
133
227
|
### Option A — Manual CSS and font links
|
|
134
228
|
|
|
135
|
-
```
|
|
136
|
-
import { ThemeProvider } from
|
|
137
|
-
import { Button } from
|
|
138
|
-
import { Icon } from
|
|
229
|
+
```
|
|
230
|
+
import { ThemeProvider } from "@cupra/ui-react/ThemeProvider";
|
|
231
|
+
import { Button } from "@cupra/ui-react/Button";
|
|
232
|
+
import { Icon } from "@cupra/ui-react/Icon";
|
|
139
233
|
|
|
140
|
-
export function App() {
|
|
141
|
-
|
|
234
|
+
export function App() {
|
|
235
|
+
return (
|
|
142
236
|
<>
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
</
|
|
237
|
+
<link rel="preload" as="style" href="https://ds-assets.cupra.com/[version]/styles/cupra/theme.css" />
|
|
238
|
+
<link rel="stylesheet" href="https://ds-assets.cupra.com/[version]/styles/cupra/theme.css" />
|
|
239
|
+
<ThemeProvider theme="cupra-diagonal" loadFonts={false} loadStyles={false}>
|
|
240
|
+
<Button variant="destructive" icon-name="filters-background">
|
|
241
|
+
Click me
|
|
242
|
+
</Button>
|
|
243
|
+
<Icon icon-name="filters-background" />
|
|
244
|
+
</ThemeProvider>
|
|
149
245
|
</>
|
|
150
|
-
|
|
151
|
-
}
|
|
246
|
+
);
|
|
247
|
+
}
|
|
152
248
|
```
|
|
153
249
|
|
|
154
250
|
### Option B — Provider loads assets automatically
|
|
155
251
|
|
|
156
|
-
```
|
|
157
|
-
import { ThemeProvider } from
|
|
158
|
-
import { Button } from
|
|
252
|
+
```
|
|
253
|
+
import { ThemeProvider } from "@cupra/ui-react/ThemeProvider";
|
|
254
|
+
import { Button } from "@cupra/ui-react/Button";
|
|
159
255
|
|
|
160
|
-
export function App() {
|
|
161
|
-
|
|
256
|
+
export function App() {
|
|
257
|
+
return (
|
|
162
258
|
<ThemeProvider theme="cupra-diagonal" loadFonts={true} loadStyles={true}>
|
|
163
|
-
|
|
259
|
+
<Button variant="primary">Button</Button>
|
|
164
260
|
</ThemeProvider>
|
|
165
|
-
|
|
166
|
-
}
|
|
261
|
+
);
|
|
262
|
+
}
|
|
167
263
|
```
|
|
168
264
|
|
|
169
265
|
---
|
|
170
266
|
|
|
171
267
|
## License
|
|
172
|
-
|
|
268
|
+
|
|
269
|
+
SEAT S.A. Library EULA 1.0
|
|
173
270
|
See `LICENSE.md` in this package for the full text.
|
|
174
271
|
Third-party attributions may appear in `THIRD_PARTY_LICENSES.md`.
|
|
175
272
|
|
|
273
|
+
---
|
|
274
|
+
|
|
176
275
|
## Support
|
|
276
|
+
|
|
177
277
|
For help and support, contact: **ds.support@seat.es**
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DsBasicCardAttrs } from '@cupra/ui-kit/react/types/ds-basic-card';
|
|
2
|
+
import { type ReactElement } from 'react';
|
|
3
|
+
import '@cupra/ui-kit/react/ds-basic-card';
|
|
4
|
+
type Children = JSX.Element | JSX.Element[] | string;
|
|
5
|
+
export interface BasicCardProps extends DsBasicCardAttrs {
|
|
6
|
+
className?: string;
|
|
7
|
+
children: Children;
|
|
8
|
+
onClick?: (event: CustomEvent) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function BasicCard(props: BasicCardProps): ReactElement;
|
|
11
|
+
export declare namespace BasicCard {
|
|
12
|
+
var FeaturedText: {
|
|
13
|
+
({ children }: {
|
|
14
|
+
children: Children;
|
|
15
|
+
}): ReactElement;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/ds-basic-card";
|
|
3
|
+
import { useHandleEvent as i } from "../../hooks/useHandleEvent.js";
|
|
4
|
+
function n(e) {
|
|
5
|
+
const { className: a, children: s, onClick: c, ...d } = e, { ref: o } = i({
|
|
6
|
+
"ds-basic-card:click": c
|
|
7
|
+
});
|
|
8
|
+
return /* @__PURE__ */ r("ds-basic-card-react", { ref: o, class: a, ...d, children: s });
|
|
9
|
+
}
|
|
10
|
+
const t = ({ children: e }) => /* @__PURE__ */ r("div", { slot: "featured-text", children: e });
|
|
11
|
+
n.FeaturedText = t;
|
|
12
|
+
t.displayName = "BasicCard.FeaturedText";
|
|
13
|
+
export {
|
|
14
|
+
n as BasicCard
|
|
15
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { DsBasicCardHeaderAttrs } from '@cupra/ui-kit/react/types/ds-basic-card-header';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-basic-card-header';
|
|
3
|
+
import { type ReactElement } from 'react';
|
|
4
|
+
type Children = JSX.Element | JSX.Element[] | string;
|
|
5
|
+
export interface BasicCardHeaderProps extends DsBasicCardHeaderAttrs {
|
|
6
|
+
className?: string;
|
|
7
|
+
children: JSX.Element | JSX.Element[] | string;
|
|
8
|
+
}
|
|
9
|
+
export declare function BasicCardHeader(props: BasicCardHeaderProps): ReactElement;
|
|
10
|
+
export declare namespace BasicCardHeader {
|
|
11
|
+
var Title: {
|
|
12
|
+
({ children }: {
|
|
13
|
+
children: Children;
|
|
14
|
+
}): ReactElement;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
var Description: {
|
|
18
|
+
({ children }: {
|
|
19
|
+
children: Children;
|
|
20
|
+
}): ReactElement;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
var Meta: {
|
|
24
|
+
({ children }: {
|
|
25
|
+
children: Children;
|
|
26
|
+
}): ReactElement;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
29
|
+
var SubHeader: {
|
|
30
|
+
({ children }: {
|
|
31
|
+
children: Children;
|
|
32
|
+
}): ReactElement;
|
|
33
|
+
displayName: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DsBasicCardImageAttrs } from '@cupra/ui-kit/react/types/ds-basic-card-image';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-basic-card-image';
|
|
3
|
+
import { type ReactElement } from 'react';
|
|
4
|
+
export interface BasicCardImageProps extends DsBasicCardImageAttrs {
|
|
5
|
+
className?: string;
|
|
6
|
+
children: JSX.Element | JSX.Element[] | string;
|
|
7
|
+
}
|
|
8
|
+
export declare function BasicCardImage(props: BasicCardImageProps): ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DsBasicCardSectionAttrs } from '@cupra/ui-kit/react/types/ds-basic-card-section';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-basic-card-section';
|
|
3
|
+
import { type ReactElement } from 'react';
|
|
4
|
+
export interface BasicCardSectionProps extends DsBasicCardSectionAttrs {
|
|
5
|
+
className?: string;
|
|
6
|
+
children: JSX.Element | JSX.Element[] | string;
|
|
7
|
+
}
|
|
8
|
+
export declare function BasicCardSection(props: BasicCardSectionProps): ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/ds-basic-card-section";
|
|
3
|
+
function i(r) {
|
|
4
|
+
const { className: c, children: s, ...o } = r;
|
|
5
|
+
return /* @__PURE__ */ t("ds-basic-card-section-react", { class: c, ...o, children: s });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
i as BasicCardSection
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DsDialogFullscreenAttrs } from '@cupra/ui-kit/types/ds-dialog-fullscreen';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import '@cupra/ui-kit/react/ds-dialog-fullscreen';
|
|
4
|
+
type DialogFullscreenProps = DsDialogFullscreenAttrs & {
|
|
5
|
+
className?: string;
|
|
6
|
+
withPortal?: boolean;
|
|
7
|
+
children: JSX.Element | JSX.Element[] | string;
|
|
8
|
+
onClose?: (event: CustomEvent) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function DialogFullscreen(props: DialogFullscreenProps): ReactNode;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-media-control';
|
|
3
|
+
import type { DsMediaControlAttrs } from '@cupra/ui-kit/react/types/ds-media-control';
|
|
4
|
+
type MediaControlProps = DsMediaControlAttrs & {
|
|
5
|
+
className?: string;
|
|
6
|
+
onPlay?: (event: CustomEvent) => void;
|
|
7
|
+
onPause?: (event: CustomEvent) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function MediaControl(props: MediaControlProps): ReactElement;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
3
|
+
import "react";
|
|
4
|
+
import { useHandleEvent as m } from "../../hooks/useHandleEvent.js";
|
|
5
|
+
import "@cupra/ui-kit/react/ds-media-control";
|
|
6
|
+
function u(o) {
|
|
7
|
+
const { className: r, onPlay: t, onPause: e, ...s } = o, { ref: a } = m({ "ds-media-control:play": t, "ds-media-control:pause": e });
|
|
8
|
+
return /* @__PURE__ */ n("ds-media-control-react", { ref: a, class: r, ...s });
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
u as MediaControl
|
|
12
|
+
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './Accordion/Accordion';
|
|
2
2
|
export * from './Badge/Badge';
|
|
3
|
+
export * from './BasicCard/BasicCard';
|
|
4
|
+
export * from './BasicCardSection/BasicCardSection';
|
|
3
5
|
export * from './Bullets/Bullets';
|
|
4
6
|
export * from './Button/Button';
|
|
5
7
|
export * from './CarouselIndicator/CarouselIndicator';
|
|
@@ -22,6 +24,7 @@ export * from './Loader/Loader';
|
|
|
22
24
|
export * from './Logo/Logo';
|
|
23
25
|
export * from './MainTitle/MainTitle';
|
|
24
26
|
export * from './MapPin/MapPin';
|
|
27
|
+
export * from './MediaControl/MediaControl';
|
|
25
28
|
export * from './Modal/Modal';
|
|
26
29
|
export * from './PasswordInput/PasswordInput';
|
|
27
30
|
export * from './PickerItem/PickerItem';
|
|
@@ -52,3 +55,4 @@ export * from './StaticBox/StaticBox';
|
|
|
52
55
|
export * from './Stepper/Stepper';
|
|
53
56
|
export * from './InteractiveCard/InteractiveCard';
|
|
54
57
|
export * from './SidebarNavigation/SidebarNavigation';
|
|
58
|
+
export * from './MediaControl/MediaControl';
|
package/dist/index.js
CHANGED
|
@@ -1,120 +1,126 @@
|
|
|
1
1
|
import { Accordion as t } from "./components/Accordion/Accordion.js";
|
|
2
2
|
import { Badge as x } from "./components/Badge/Badge.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
3
|
+
import { BasicCard as f } from "./components/BasicCard/BasicCard.js";
|
|
4
|
+
import { BasicCardSection as i } from "./components/BasicCardSection/BasicCardSection.js";
|
|
5
|
+
import { Bullets as d } from "./components/Bullets/Bullets.js";
|
|
6
|
+
import { Button as c } from "./components/Button/Button.js";
|
|
7
|
+
import { CarouselIndicator as u } from "./components/CarouselIndicator/CarouselIndicator.js";
|
|
8
|
+
import { Checkbox as B } from "./components/Checkbox/Checkbox.js";
|
|
9
|
+
import { Chip as T } from "./components/Chip/Chip.js";
|
|
10
|
+
import { Chips as v } from "./components/Chips/Chips.js";
|
|
11
|
+
import { Currency as h } from "./components/Currency/Currency.js";
|
|
12
|
+
import { Dialog as L } from "./components/Dialog/Dialog.js";
|
|
13
|
+
import { DialogBody as M } from "./components/DialogBody/DialogBody.js";
|
|
14
|
+
import { DialogFooter as b } from "./components/DialogFooter/DialogFooter.js";
|
|
15
|
+
import { DialogHeader as P } from "./components/DialogHeader/DialogHeader.js";
|
|
16
|
+
import { Divider as H } from "./components/Divider/Divider.js";
|
|
17
|
+
import { Drawer as E } from "./components/Drawer/Drawer.js";
|
|
18
|
+
import { Hyperlink as z } from "./components/Hyperlink/Hyperlink.js";
|
|
19
|
+
import { Icon as G } from "./components/Icon/Icon.js";
|
|
20
|
+
import { IconButton as j } from "./components/IconButton/IconButton.js";
|
|
21
|
+
import { Input as J } from "./components/Input/Input.js";
|
|
22
|
+
import { LinkButton as Q } from "./components/LinkButton/LinkButton.js";
|
|
23
|
+
import { Loader as V, LoaderLogo as W } from "./components/Loader/Loader.js";
|
|
24
|
+
import { Logo as Y } from "./components/Logo/Logo.js";
|
|
25
|
+
import { MainTitle as _ } from "./components/MainTitle/MainTitle.js";
|
|
26
|
+
import { MapPin as oo } from "./components/MapPin/MapPin.js";
|
|
27
|
+
import { MediaControl as eo } from "./components/MediaControl/MediaControl.js";
|
|
28
|
+
import { Modal as po } from "./components/Modal/Modal.js";
|
|
29
|
+
import { PasswordInput as mo } from "./components/PasswordInput/PasswordInput.js";
|
|
30
|
+
import { PickerItem as ao } from "./components/PickerItem/PickerItem.js";
|
|
31
|
+
import { Radio as no } from "./components/Radio/Radio.js";
|
|
32
|
+
import { RadioButton as co } from "./components/RadioButton/RadioButton.js";
|
|
33
|
+
import { RadioButtonGroup as uo } from "./components/RadioButtonGroup/RadioButtonGroup.js";
|
|
34
|
+
import { Rating as Bo } from "./components/Rating/Rating.js";
|
|
35
|
+
import { Search as To } from "./components/Search/Search.js";
|
|
36
|
+
import { SearchInput as vo } from "./components/SearchInput/SearchInput.js";
|
|
37
|
+
import { SecondaryNavigation as ho } from "./components/SecondaryNavigation/SecondaryNavigation.js";
|
|
38
|
+
import { SegmentedControl as Lo } from "./components/SegmentedControl/SegmentedControl.js";
|
|
39
|
+
import { Select as Mo } from "./components/Select/Select.js";
|
|
40
|
+
import { Selection as bo } from "./components/Selection/Selection.js";
|
|
41
|
+
import { Slider as Po } from "./components/Slider/Slider.js";
|
|
42
|
+
import { Tabs as Ho } from "./components/Tabs/Tabs.js";
|
|
43
|
+
import { Tag as Eo } from "./components/Tag/Tag.js";
|
|
44
|
+
import { Text as zo } from "./components/Text/Text.js";
|
|
45
|
+
import { TextInput as Go } from "./components/TextInput/TextInput.js";
|
|
46
|
+
import { Textarea as jo } from "./components/Textarea/Textarea.js";
|
|
47
|
+
import { ThemeProvider as Jo } from "./components/ThemeProvider/ThemeProvider.js";
|
|
48
|
+
import { ToggleButton as Qo } from "./components/ToggleButton/ToggleButton.js";
|
|
49
|
+
import { ToggleSwitch as Vo } from "./components/ToggleSwitch/ToggleSwitch.js";
|
|
50
|
+
import { Tooltip as Xo } from "./components/Tooltip/Tooltip.js";
|
|
51
|
+
import { Toast as Zo } from "./components/Toast/Toast.js";
|
|
52
|
+
import { ToastMessage as $o } from "./components/ToastMessage/ToastMessage.js";
|
|
53
|
+
import { Avatar as rr } from "./components/Avatar/Avatar.js";
|
|
54
|
+
import { StaticBox as tr } from "./components/StaticBox/StaticBox.js";
|
|
55
|
+
import { Stepper as xr } from "./components/Stepper/Stepper.js";
|
|
56
|
+
import { InteractiveCard as fr } from "./components/InteractiveCard/InteractiveCard.js";
|
|
57
|
+
import { SidebarNavigation as ir } from "./components/SidebarNavigation/SidebarNavigation.js";
|
|
58
|
+
import { useBreakpoint as dr } from "./hooks/useBreakpoint.js";
|
|
59
|
+
import { useEventListeners as cr } from "./hooks/useEventListeners.js";
|
|
60
|
+
import { useHandleEvent as ur } from "./hooks/useHandleEvent.js";
|
|
58
61
|
import "react";
|
|
59
|
-
import { useResizeObserver as
|
|
62
|
+
import { useResizeObserver as Br } from "./hooks/useResizeObserver/useResizeObserver.js";
|
|
60
63
|
export {
|
|
61
64
|
t as Accordion,
|
|
62
|
-
|
|
65
|
+
rr as Avatar,
|
|
63
66
|
x as Badge,
|
|
64
|
-
f as
|
|
65
|
-
i as
|
|
66
|
-
d as
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
L as
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
P as
|
|
77
|
-
H as
|
|
78
|
-
E as
|
|
79
|
-
z as
|
|
80
|
-
G as
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
W as
|
|
87
|
-
Y as
|
|
88
|
-
_ as
|
|
89
|
-
oo as
|
|
90
|
-
eo as
|
|
91
|
-
po as
|
|
92
|
-
mo as
|
|
93
|
-
ao as
|
|
94
|
-
no as
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
Ho as
|
|
109
|
-
Eo as
|
|
110
|
-
zo as
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
dr as
|
|
67
|
+
f as BasicCard,
|
|
68
|
+
i as BasicCardSection,
|
|
69
|
+
d as Bullets,
|
|
70
|
+
c as Button,
|
|
71
|
+
u as CarouselIndicator,
|
|
72
|
+
B as Checkbox,
|
|
73
|
+
T as Chip,
|
|
74
|
+
v as Chips,
|
|
75
|
+
h as Currency,
|
|
76
|
+
L as Dialog,
|
|
77
|
+
M as DialogBody,
|
|
78
|
+
b as DialogFooter,
|
|
79
|
+
P as DialogHeader,
|
|
80
|
+
H as Divider,
|
|
81
|
+
E as Drawer,
|
|
82
|
+
z as Hyperlink,
|
|
83
|
+
G as Icon,
|
|
84
|
+
j as IconButton,
|
|
85
|
+
J as Input,
|
|
86
|
+
fr as InteractiveCard,
|
|
87
|
+
Q as LinkButton,
|
|
88
|
+
V as Loader,
|
|
89
|
+
W as LoaderLogo,
|
|
90
|
+
Y as Logo,
|
|
91
|
+
_ as MainTitle,
|
|
92
|
+
oo as MapPin,
|
|
93
|
+
eo as MediaControl,
|
|
94
|
+
po as Modal,
|
|
95
|
+
mo as PasswordInput,
|
|
96
|
+
ao as PickerItem,
|
|
97
|
+
no as Radio,
|
|
98
|
+
co as RadioButton,
|
|
99
|
+
uo as RadioButtonGroup,
|
|
100
|
+
Bo as Rating,
|
|
101
|
+
To as Search,
|
|
102
|
+
vo as SearchInput,
|
|
103
|
+
ho as SecondaryNavigation,
|
|
104
|
+
Lo as SegmentedControl,
|
|
105
|
+
Mo as Select,
|
|
106
|
+
bo as Selection,
|
|
107
|
+
ir as SidebarNavigation,
|
|
108
|
+
Po as Slider,
|
|
109
|
+
tr as StaticBox,
|
|
110
|
+
xr as Stepper,
|
|
111
|
+
Ho as Tabs,
|
|
112
|
+
Eo as Tag,
|
|
113
|
+
zo as Text,
|
|
114
|
+
Go as TextInput,
|
|
115
|
+
jo as Textarea,
|
|
116
|
+
Jo as ThemeProvider,
|
|
117
|
+
Zo as Toast,
|
|
118
|
+
$o as ToastMessage,
|
|
119
|
+
Qo as ToggleButton,
|
|
120
|
+
Vo as ToggleSwitch,
|
|
121
|
+
Xo as Tooltip,
|
|
122
|
+
dr as useBreakpoint,
|
|
123
|
+
cr as useEventListeners,
|
|
124
|
+
ur as useHandleEvent,
|
|
125
|
+
Br as useResizeObserver
|
|
120
126
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cupra/ui-react",
|
|
3
|
-
"version": "2.0.0-canary.
|
|
3
|
+
"version": "2.0.0-canary.10",
|
|
4
4
|
"description": "React components library",
|
|
5
5
|
"author": "SEAT S.A.",
|
|
6
6
|
"license": "SEAT S.A. Library EULA 1.0",
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
"import": "./dist/components/*/*.js",
|
|
17
17
|
"types": "./dist/components/*/*.d.ts"
|
|
18
18
|
},
|
|
19
|
-
"./hooks/*":
|
|
19
|
+
"./hooks/*": {
|
|
20
|
+
"import": "./dist/hooks/*.js",
|
|
21
|
+
"types": "./dist/hooks/*.d.ts"
|
|
22
|
+
}
|
|
20
23
|
},
|
|
21
24
|
"files": [
|
|
22
25
|
"LICENSE",
|
|
@@ -44,7 +47,8 @@
|
|
|
44
47
|
"peerDependencies": {
|
|
45
48
|
"react": ">= 18.3.1 < 20",
|
|
46
49
|
"react-dom": ">= 18.3.1 < 20",
|
|
47
|
-
"@cupra/ui-kit": "1.1.0-canary.
|
|
50
|
+
"@cupra/ui-kit": "1.1.0-canary.7",
|
|
51
|
+
"typescript": ">=5.0.0"
|
|
48
52
|
},
|
|
49
53
|
"dependencies": {
|
|
50
54
|
"styled-components": "^6.1.16"
|
|
@@ -66,13 +70,13 @@
|
|
|
66
70
|
"storybook": "^8.6.15",
|
|
67
71
|
"typescript": "^5.8.2",
|
|
68
72
|
"vite": "^6.4.1",
|
|
69
|
-
"@cupra/ui-kit": "1.1.0-canary.
|
|
73
|
+
"@cupra/ui-kit": "1.1.0-canary.7"
|
|
70
74
|
},
|
|
71
75
|
"scripts": {
|
|
72
76
|
"build": "rm -rf dist && tsc --declaration --emitDeclarationOnly && vite build --emptyOutDir false",
|
|
73
77
|
"test": "npx vitest run",
|
|
74
78
|
"generate-licenses": "npx generate-license-file --input package.json --output THIRD_PARTY_LICENSES.MD --overwrite --ci",
|
|
75
|
-
"storybook": "storybook dev -p 6006",
|
|
79
|
+
"storybook": "pnpm --filter ui-kit build:react --mode development && storybook dev -p 6006",
|
|
76
80
|
"build-storybook:cupra-diagonal": "storybook build --output-dir dist-storybook/cupra-diagonal"
|
|
77
81
|
}
|
|
78
82
|
}
|