@cupra/ui-react 2.0.0-canary.263 → 2.0.0-canary.264
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 +0 -428
- package/dist/cjs/components/Avatar/Avatar.cjs +1 -1
- package/dist/cjs/components/Banner/Banner.cjs +1 -1
- package/dist/cjs/components/BasicCard/BasicCard.cjs +1 -1
- package/dist/cjs/components/Button/Button.cjs +1 -1
- package/dist/cjs/components/Calendar/Calendar.cjs +1 -1
- package/dist/cjs/components/Chips/Chips.cjs +1 -1
- package/dist/cjs/components/Dialog/Dialog.cjs +1 -1
- package/dist/cjs/components/DialogFullscreen/DialogFullscreen.cjs +1 -1
- package/dist/cjs/components/Drawer/Drawer.cjs +1 -1
- package/dist/cjs/components/FavouriteAction/FavouriteAction.cjs +1 -1
- package/dist/cjs/components/IconButton/IconButton.cjs +1 -1
- package/dist/cjs/components/InlineAlert/InlineAlert.cjs +1 -1
- package/dist/cjs/components/InteractiveCard/InteractiveCard.cjs +1 -1
- package/dist/cjs/components/MediaControl/MediaControl.cjs +1 -1
- package/dist/cjs/components/Modal/Modal.cjs +1 -1
- package/dist/cjs/components/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/cjs/components/PickerItem/PickerItem.cjs +1 -1
- package/dist/cjs/components/Radio/Radio.cjs +1 -1
- package/dist/cjs/components/RadioButtonGroup/RadioButtonGroup.cjs +1 -1
- package/dist/cjs/components/SearchInput/SearchInput.cjs +1 -1
- package/dist/cjs/components/SecondaryNavigation/SecondaryNavigation.cjs +1 -1
- package/dist/cjs/components/SegmentedControl/SegmentedControl.cjs +1 -1
- package/dist/cjs/components/Slider/Slider.cjs +1 -1
- package/dist/cjs/components/StaticBox/StaticBox.cjs +1 -1
- package/dist/cjs/components/Tabs/Tabs.cjs +1 -1
- package/dist/cjs/components/Tag/Tag.cjs +1 -1
- package/dist/cjs/components/TextInput/TextInput.cjs +1 -1
- package/dist/cjs/components/Textarea/Textarea.cjs +1 -1
- package/dist/cjs/components/ToggleSwitch/ToggleSwitch.cjs +1 -1
- package/dist/esm/components/Avatar/Avatar.js +1 -1
- package/dist/esm/components/Banner/Banner.js +1 -1
- package/dist/esm/components/BasicCard/BasicCard.js +1 -1
- package/dist/esm/components/Button/Button.js +1 -1
- package/dist/esm/components/Calendar/Calendar.js +2 -2
- package/dist/esm/components/Chips/Chips.js +1 -1
- package/dist/esm/components/Dialog/Dialog.js +1 -1
- package/dist/esm/components/DialogFullscreen/DialogFullscreen.js +1 -1
- package/dist/esm/components/Drawer/Drawer.js +1 -1
- package/dist/esm/components/FavouriteAction/FavouriteAction.js +2 -2
- package/dist/esm/components/IconButton/IconButton.js +2 -2
- package/dist/esm/components/InlineAlert/InlineAlert.js +1 -1
- package/dist/esm/components/InteractiveCard/InteractiveCard.js +1 -1
- package/dist/esm/components/MediaControl/MediaControl.js +2 -2
- package/dist/esm/components/Modal/Modal.js +1 -1
- package/dist/esm/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/esm/components/PickerItem/PickerItem.js +1 -1
- package/dist/esm/components/Radio/Radio.js +1 -1
- package/dist/esm/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/dist/esm/components/SearchInput/SearchInput.js +1 -1
- package/dist/esm/components/SecondaryNavigation/SecondaryNavigation.js +1 -1
- package/dist/esm/components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/esm/components/Slider/Slider.js +2 -2
- package/dist/esm/components/StaticBox/StaticBox.js +1 -1
- package/dist/esm/components/Tabs/Tabs.js +1 -1
- package/dist/esm/components/Tag/Tag.js +1 -1
- package/dist/esm/components/TextInput/TextInput.js +1 -1
- package/dist/esm/components/Textarea/Textarea.js +1 -1
- package/dist/esm/components/ToggleSwitch/ToggleSwitch.js +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -1,428 +0,0 @@
|
|
|
1
|
-
# UI React (React Components)
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
React components and wrappers built on top of the DS-UI Web Components, providing a seamless and idiomatic developer experience for React.
|
|
6
|
-
This package exposes React-friendly APIs (props, JSX, typed events) while preserving the DS-UI theming, styling, and asset resolution model.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Audience
|
|
11
|
-
|
|
12
|
-
Use `@cupra/ui-react` if your application is built with **React** and you want:
|
|
13
|
-
|
|
14
|
-
- First-class React ergonomics with DS-UI components
|
|
15
|
-
- Automatic integration with the underlying Web Components
|
|
16
|
-
- Full theming support with minimal configuration
|
|
17
|
-
- A smooth adoption path inside existing React codebases
|
|
18
|
-
|
|
19
|
-
If you need a **framework-agnostic** solution, consider `@cupra/ui-kit` (Web Components).
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Requirements & Compatibility
|
|
24
|
-
|
|
25
|
-
This library currently provides **official support for React 18**.
|
|
26
|
-
|
|
27
|
-
- **Supported React versions:** `>=18.3.1 <20`
|
|
28
|
-
|
|
29
|
-
Projects using other React versions may still install and use the library, but behaviour is not guaranteed until official support is released.
|
|
30
|
-
|
|
31
|
-
### Browser Support
|
|
32
|
-
|
|
33
|
-
This package wraps `@cupra/ui-kit` Web Components, so the same browser/OS support matrix applies:
|
|
34
|
-
|
|
35
|
-
| Platform | Minimum supported version |
|
|
36
|
-
| --- | --- |
|
|
37
|
-
| iOS / iPadOS | 17+ |
|
|
38
|
-
| Android | 13+ |
|
|
39
|
-
| Chrome (desktop) | Current stable version − 1 |
|
|
40
|
-
| Edge (desktop) | Current stable version − 1 |
|
|
41
|
-
| Firefox (desktop) | Current stable version − 1 |
|
|
42
|
-
| Safari (desktop) | Latest version available on supported macOS releases |
|
|
43
|
-
|
|
44
|
-
Any browser/OS version representing more than 1% of total website traffic remains supported even
|
|
45
|
-
if it falls below these versions, until its traffic share drops back under that threshold.
|
|
46
|
-
|
|
47
|
-
The published JavaScript is transpiled to a conservative ES2020 target, but no polyfills are
|
|
48
|
-
shipped for runtime APIs below the versions above, and native support for Custom Elements,
|
|
49
|
-
Shadow DOM and `<slot>` is required.
|
|
50
|
-
|
|
51
|
-
Full rationale, transpilation details and maintenance guide:
|
|
52
|
-
[BROWSER_SUPPORT.md](../../BROWSER_SUPPORT.md) (repository only — not included in the npm package).
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## TypeScript and module resolution
|
|
57
|
-
|
|
58
|
-
This library is **bundler-first**.
|
|
59
|
-
|
|
60
|
-
### Subpath imports (recommended)
|
|
61
|
-
|
|
62
|
-
Importing components via subpaths (for example `@cupra/ui-react/Accordion`) requires
|
|
63
|
-
TypeScript to use **bundler-based module resolution**:
|
|
64
|
-
|
|
65
|
-
- **TypeScript ≥ 5**
|
|
66
|
-
- `"moduleResolution": "bundler"`
|
|
67
|
-
|
|
68
|
-
This matches how modern bundlers resolve modules and enables the best developer experience,
|
|
69
|
-
including proper tree-shaking and code-splitting.
|
|
70
|
-
|
|
71
|
-
Minimal required `tsconfig.json` setting:
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
{
|
|
75
|
-
"compilerOptions": {
|
|
76
|
-
"moduleResolution": "bundler"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Other compiler options (`target`, `module`, `lib`, etc.) are project-specific and can be configured as needed.
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
### Root imports (compatibility mode)
|
|
86
|
-
|
|
87
|
-
If your project cannot use `moduleResolution: "bundler"`, you can still consume the library using **root imports**:
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
import { Accordion, IconButton } from "@cupra/ui-react";
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
This mode works with legacy or constrained TypeScript setups, but has the following trade-offs:
|
|
94
|
-
|
|
95
|
-
- Subpath imports are not available
|
|
96
|
-
- Reduced tree-shaking and chunking opportunities
|
|
97
|
-
- All components are imported from the package entry point
|
|
98
|
-
|
|
99
|
-
Root imports are supported as a fallback, but **subpath imports are recommended whenever possible**.
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
### Notes
|
|
104
|
-
|
|
105
|
-
- Subpath imports are intentionally designed for bundler-based environments.
|
|
106
|
-
- The library does not attempt to enforce Node-style module resolution.
|
|
107
|
-
- No additional runtime configuration is required when using a modern bundler.
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## Getting started
|
|
112
|
-
|
|
113
|
-
### Installation
|
|
114
|
-
|
|
115
|
-
`@cupra/ui-react` is a React wrapper around the Web Components provided by
|
|
116
|
-
`@cupra/ui-kit`.
|
|
117
|
-
|
|
118
|
-
For this reason, **both packages must be installed** in your project.
|
|
119
|
-
|
|
120
|
-
Using npm:
|
|
121
|
-
|
|
122
|
-
```
|
|
123
|
-
npm install @cupra/ui-react @cupra/ui-kit
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Using pnpm:
|
|
127
|
-
|
|
128
|
-
```
|
|
129
|
-
pnpm add @cupra/ui-react @cupra/ui-kit
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Using yarn:
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
yarn add @cupra/ui-react @cupra/ui-kit
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
### About peer dependencies
|
|
141
|
-
|
|
142
|
-
`@cupra/ui-kit` is declared as a **peer dependency** of `@cupra/ui-react`.
|
|
143
|
-
|
|
144
|
-
This means:
|
|
145
|
-
|
|
146
|
-
- `@cupra/ui-react` does not bundle or ship the Web Components itself
|
|
147
|
-
- the consuming project must provide a compatible version of `@cupra/ui-kit`
|
|
148
|
-
- only a single instance of the design system is expected at runtime
|
|
149
|
-
|
|
150
|
-
Some package managers (such as npm ≥ 7 or pnpm with compatible settings) may install
|
|
151
|
-
peer dependencies automatically. Others (such as Yarn) require installing them explicitly.
|
|
152
|
-
|
|
153
|
-
If you encounter missing-module or runtime errors after installing `@cupra/ui-react`,
|
|
154
|
-
make sure that `@cupra/ui-kit` is also installed in your project.
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
## Documentation & Live Playground
|
|
159
|
-
|
|
160
|
-
You can explore all `ui-react` components, their APIs, theming options and live examples
|
|
161
|
-
in the online documentation and playground:
|
|
162
|
-
|
|
163
|
-
https://diagonal.cupra.com/ui-react/index.html
|
|
164
|
-
|
|
165
|
-
## Breaking Changes & Deprecations
|
|
166
|
-
|
|
167
|
-
Track every breaking change and deprecation, and use the migration helper to safely upgrade between versions:
|
|
168
|
-
|
|
169
|
-
- Breaking changes (merged + upcoming): [https://seatcode.github.io/ds-ui/](https://seatcode.github.io/ds-ui/)
|
|
170
|
-
- Deprecations (forward-looking advisories): [https://seatcode.github.io/ds-ui/deprecations.html](https://seatcode.github.io/ds-ui/deprecations.html)
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
## Versioning and Release Channels
|
|
175
|
-
|
|
176
|
-
This package is distributed through npm using **two release channels**.
|
|
177
|
-
|
|
178
|
-
### Stable releases (`latest`)
|
|
179
|
-
|
|
180
|
-
Production-ready versions:
|
|
181
|
-
|
|
182
|
-
- Follow Semantic Versioning
|
|
183
|
-
- Include only validated changes
|
|
184
|
-
- Recommended for all production apps
|
|
185
|
-
|
|
186
|
-
Install:
|
|
187
|
-
|
|
188
|
-
```
|
|
189
|
-
npm install @cupra/ui-react
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
Specific version:
|
|
193
|
-
|
|
194
|
-
```
|
|
195
|
-
npm install @cupra/ui-react@0.1.3
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
|
|
200
|
-
### Canary releases (`canary`)
|
|
201
|
-
|
|
202
|
-
Early-access versions published after each merge into `main`.
|
|
203
|
-
|
|
204
|
-
Use canary releases if you:
|
|
205
|
-
|
|
206
|
-
- Want to preview upcoming changes
|
|
207
|
-
- Are validating new features
|
|
208
|
-
- Accept small instability or rapid iteration
|
|
209
|
-
|
|
210
|
-
Latest canary:
|
|
211
|
-
|
|
212
|
-
```
|
|
213
|
-
npm install @cupra/ui-react@canary
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
Specific canary version:
|
|
217
|
-
|
|
218
|
-
```
|
|
219
|
-
npm install @cupra/ui-react@0.1.4-canary.2
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
## Recommended usage
|
|
225
|
-
|
|
226
|
-
- **Production:** use **stable versions** (for example `@cupra/ui-react@1.1.3`)
|
|
227
|
-
- **Internal testing / preview:** use **canary** versions
|
|
228
|
-
|
|
229
|
-
---
|
|
230
|
-
|
|
231
|
-
## Usage
|
|
232
|
-
|
|
233
|
-
When possible, import components via subpaths:
|
|
234
|
-
|
|
235
|
-
```
|
|
236
|
-
import { Button } from "@cupra/ui-react/Button";
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
If your TypeScript setup does not support bundler-based module resolution, use root imports instead:
|
|
240
|
-
|
|
241
|
-
```
|
|
242
|
-
import { Button } from "@cupra/ui-react";
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
Wrap your React application with `ThemeProvider`.
|
|
246
|
-
|
|
247
|
-
The provider requires **three required props plus one optional**:
|
|
248
|
-
|
|
249
|
-
| Prop | Type | Required | Description |
|
|
250
|
-
|----------------------|---------|----------|-------------------------------------------------------------------------------------------------------------------|
|
|
251
|
-
| `theme` | string | Yes | Visual theme identifier (e.g. `cupra-diagonal`) |
|
|
252
|
-
| `load-fonts` | boolean | Yes | Auto-load `fonts.css`, the stylesheet that declares the theme's `@font-face` rules |
|
|
253
|
-
| `load-styles` | boolean | Yes | Auto-load `theme.css`, the stylesheet the `ui-kit` components require |
|
|
254
|
-
| `load-unused-styles` | boolean | No, defaults to `true` | Auto-load `unused-styles.css`, the theme's `--ds-` tokens that `ui-kit` doesn't consume internally, only needed if your own CSS reads raw tokens |
|
|
255
|
-
|
|
256
|
-
`ThemeProvider` forwards its props directly to the underlying `<ds-theme-provider>` Web Component, so
|
|
257
|
-
prop names match its HTML attributes (kebab-case), not idiomatic React camelCase.
|
|
258
|
-
|
|
259
|
-
If `load-fonts`, `load-styles` or `load-unused-styles` are `false`, you must manually include the corresponding `<link>` tags.
|
|
260
|
-
|
|
261
|
-
**Performance note:** For optimal behaviour, disable `load-styles` and `load-unused-styles` and load both
|
|
262
|
-
stylesheets manually, controlling their priority: `theme.css` as a normal, high-priority stylesheet link
|
|
263
|
-
(always required), and `unused-styles.css` added with lower priority — for example with `rel="preload"`
|
|
264
|
-
and `as="style"`, turned into a stylesheet once loaded via `onLoad` — or omitted entirely if you don't
|
|
265
|
-
read raw tokens. If your own CSS does read raw tokens, load `unused-styles.css` with the same priority as
|
|
266
|
-
`theme.css`.
|
|
267
|
-
|
|
268
|
-
### Option A — Manual CSS and font links
|
|
269
|
-
|
|
270
|
-
```
|
|
271
|
-
import { ThemeProvider } from "@cupra/ui-react/ThemeProvider";
|
|
272
|
-
import { Button } from "@cupra/ui-react/Button";
|
|
273
|
-
import { Icon } from "@cupra/ui-react/Icon";
|
|
274
|
-
|
|
275
|
-
export function App() {
|
|
276
|
-
return (
|
|
277
|
-
<>
|
|
278
|
-
{/* One preload per critical font weight, see Fonts below */}
|
|
279
|
-
<link rel="preload" as="font" type="font/woff2" href="https://ds-assets.cupra.com/fonts/[theme]/[font-file].woff2" crossOrigin="anonymous" />
|
|
280
|
-
<link rel="stylesheet" href="https://ds-assets.cupra.com/[version]/styles/[theme]/fonts.css" />
|
|
281
|
-
<link rel="stylesheet" href="https://ds-assets.cupra.com/[version]/styles/[theme]/theme.css" />
|
|
282
|
-
{/* Lower priority; only needed if your own CSS reads raw --ds- tokens directly */}
|
|
283
|
-
<link
|
|
284
|
-
rel="preload"
|
|
285
|
-
as="style"
|
|
286
|
-
href="https://ds-assets.cupra.com/[version]/styles/[theme]/unused-styles.css"
|
|
287
|
-
onLoad={(e) => { e.currentTarget.rel = "stylesheet"; }}
|
|
288
|
-
/>
|
|
289
|
-
<ThemeProvider theme="[theme]" load-fonts={false} load-styles={false} load-unused-styles={false}>
|
|
290
|
-
<Button variant="destructive" icon-name="filters-background">
|
|
291
|
-
Click me
|
|
292
|
-
</Button>
|
|
293
|
-
<Icon icon-name="filters-background" />
|
|
294
|
-
</ThemeProvider>
|
|
295
|
-
</>
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
### Option B — Provider loads assets automatically
|
|
301
|
-
|
|
302
|
-
```
|
|
303
|
-
import { ThemeProvider } from "@cupra/ui-react/ThemeProvider";
|
|
304
|
-
import { Button } from "@cupra/ui-react/Button";
|
|
305
|
-
|
|
306
|
-
export function App() {
|
|
307
|
-
return (
|
|
308
|
-
<ThemeProvider theme="cupra-diagonal" load-fonts={true} load-styles={true} load-unused-styles={true}>
|
|
309
|
-
<Button variant="primary">Button</Button>
|
|
310
|
-
</ThemeProvider>
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
---
|
|
316
|
-
|
|
317
|
-
## Fonts
|
|
318
|
-
|
|
319
|
-
Each theme publishes `fonts.css` next to `theme.css`. It only declares the theme's `@font-face` rules
|
|
320
|
-
(woff2, `font-display: fallback`), so the browser downloads just the weights a page renders and only
|
|
321
|
-
swaps the typeface within the first ~3 seconds: later, text doesn't shift. `ThemeProvider` adds it while `load-fonts`
|
|
322
|
-
is `true`; with `load-fonts={false}` link it yourself, as in Option A. That is also the setup for
|
|
323
|
-
server-side rendering, since no JavaScript is needed to load the fonts.
|
|
324
|
-
|
|
325
|
-
**Preload the critical weights.** With `fallback` the browser waits about 100 ms for a font, then shows the
|
|
326
|
-
fallback typeface and swaps to the real one if it arrives within ~3 seconds. After that it keeps the
|
|
327
|
-
fallback for that page view and uses the real one on the next, cached, navigation. While `load-fonts` is `true`, `ThemeProvider` preloads the Regular and Medium weights of the
|
|
328
|
-
theme next to `fonts.css`, while its content waits for `theme.css`. With `load-fonts={false}` or
|
|
329
|
-
server-side rendering, add the preloads to your `<head>` yourself. Adding them there also helps with
|
|
330
|
-
`ThemeProvider`: the download starts before the JavaScript loads, and the provider skips any preload
|
|
331
|
-
already present. In Next.js, render the `<link>` in the root layout; React 19 hoists it to the `<head>`.
|
|
332
|
-
|
|
333
|
-
```tsx
|
|
334
|
-
<link
|
|
335
|
-
rel="preload"
|
|
336
|
-
as="font"
|
|
337
|
-
type="font/woff2"
|
|
338
|
-
href="https://ds-assets.cupra.com/fonts/[theme]/[font-file].woff2"
|
|
339
|
-
crossOrigin="anonymous"
|
|
340
|
-
/>
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
- Preload only the weights rendered above the fold, usually Regular and Medium. Every preload competes
|
|
344
|
-
with other critical requests.
|
|
345
|
-
- Keep `crossOrigin`, even on the same origin. Fonts are fetched in CORS mode, and a preload without it
|
|
346
|
-
is not reused: the font downloads twice.
|
|
347
|
-
- The `href` must match the URL in `fonts.css` exactly.
|
|
348
|
-
|
|
349
|
-
| Theme | `font-family` | Font files (`[font-file]`) |
|
|
350
|
-
|---------|--------|-----------------------------------------------|
|
|
351
|
-
| `seat` | `seat` | `SeatBcn-Book` (350), `SeatBcn-Regular` (400), `SeatBcn-Medium` (500), `SeatBcn-Bold` (700), `SeatBcn-Black` (900) |
|
|
352
|
-
| `cupra-diagonal` | `cupra-screen` | `CupraScreen-Light` (300), `CupraScreen-Book` (350), `CupraScreen-Regular` (400), `CupraScreen-Medium` (500) |
|
|
353
|
-
|
|
354
|
-
## Icons
|
|
355
|
-
|
|
356
|
-
Icons must always be consumed through the `<Icon>` React component — never by loading SVG files directly from the CDN.
|
|
357
|
-
|
|
358
|
-
SVG icon files are stored per-theme under the CDN and are optimised to work with the `Icon` component (they rely on CSS custom properties injected by the component to resolve color and size). Loading them directly as `<img>` tags or via `fetch` bypasses this mechanism and will produce unstyled, incorrectly-colored, or incorrectly-sized output.
|
|
359
|
-
|
|
360
|
-
```tsx
|
|
361
|
-
// Correct: use Icon
|
|
362
|
-
import { Icon } from '@cupra/ui-react/Icon';
|
|
363
|
-
|
|
364
|
-
<Icon icon-name="arrow-right" />
|
|
365
|
-
|
|
366
|
-
// Wrong: do not load icon SVGs from the CDN directly
|
|
367
|
-
<img src="https://ds-assets.cupra.com/[version]/assets/icons/[theme]/arrow-right.svg" />
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
---
|
|
371
|
-
|
|
372
|
-
## RTL and internationalization
|
|
373
|
-
|
|
374
|
-
Set `dir` and `lang` on `<html>`; the components follow them. The `cupra` and `seat-legacy` themes have no RTL support. See the `@cupra/ui-kit` README for the full list of what is automatic and what you configure.
|
|
375
|
-
|
|
376
|
-
A form with an email field that stays left to right inside an RTL page:
|
|
377
|
-
|
|
378
|
-
```tsx
|
|
379
|
-
import { SearchInput } from "@cupra/ui-react/SearchInput";
|
|
380
|
-
import { TextInput } from "@cupra/ui-react/TextInput";
|
|
381
|
-
|
|
382
|
-
export function ContactForm() {
|
|
383
|
-
return (
|
|
384
|
-
<form dir="rtl" lang="ar">
|
|
385
|
-
<TextInput>
|
|
386
|
-
<input dir="auto" name="name" placeholder="الاسم" />
|
|
387
|
-
</TextInput>
|
|
388
|
-
|
|
389
|
-
<TextInput>
|
|
390
|
-
<input dir="ltr" type="email" name="email" placeholder="name@example.com" />
|
|
391
|
-
</TextInput>
|
|
392
|
-
|
|
393
|
-
<SearchInput>
|
|
394
|
-
<input dir="auto" type="text" name="search" placeholder="بحث" />
|
|
395
|
-
</SearchInput>
|
|
396
|
-
</form>
|
|
397
|
-
);
|
|
398
|
-
}
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
### Translating the accessibility texts
|
|
402
|
-
|
|
403
|
-
The built-in `aria-label` texts have optional `data-aria-label` props. They are plain strings, so they work in React 18 as they are:
|
|
404
|
-
|
|
405
|
-
```tsx
|
|
406
|
-
import { Calendar } from "@cupra/ui-react/Calendar";
|
|
407
|
-
|
|
408
|
-
<Calendar
|
|
409
|
-
locale="ar"
|
|
410
|
-
data-aria-label="التقويم"
|
|
411
|
-
data-aria-label-previous-month="الشهر السابق"
|
|
412
|
-
data-aria-label-next-month="الشهر التالي"
|
|
413
|
-
/>
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
---
|
|
417
|
-
|
|
418
|
-
## License
|
|
419
|
-
|
|
420
|
-
SEAT S.A. Library EULA 1.0
|
|
421
|
-
See `LICENSE.md` in this package for the full text.
|
|
422
|
-
Third-party attributions may appear in `THIRD_PARTY_LICENSES.md`.
|
|
423
|
-
|
|
424
|
-
---
|
|
425
|
-
|
|
426
|
-
## Support
|
|
427
|
-
|
|
428
|
-
For help and support, contact: **ds.support@seat.es**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-avatar");var a=`ds-avatar${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:r,onClick:o,image:s,...c}=e,{ref:l}=t.useHandleEvent({click:o}),u=s&&(0,n.isValidElement)(s)?(0,n.cloneElement)(s,{slot:`media`,...s.props}):null;return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-avatar");var a=`ds-avatar${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:r,onClick:o,image:s,...c}=e,{ref:l}=t.useHandleEvent({click:o}),u=s&&(0,n.isValidElement)(s)?(0,n.cloneElement)(s,{slot:`media`,...s.props}):null;return(0,i.jsx)(a,{class:r,...c,ref:l,children:u})}exports.Avatar=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-banner");var a=`ds-banner${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClose:o,...s}=e,{ref:c}=t.useHandleEvent({"banner:close":o});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-banner");var a=`ds-banner${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClose:o,...s}=e,{ref:c}=t.useHandleEvent({"banner:close":o});return(0,i.jsx)(a,{class:n,...s,ref:c,children:r})}exports.Banner=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-basic-card");var a=`ds-basic-card${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClick:o,...s}=e,{ref:c}=t.useHandleEvent({"ds-basic-card:click":o});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-basic-card");var a=`ds-basic-card${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClick:o,...s}=e,{ref:c}=t.useHandleEvent({"ds-basic-card:click":o});return(0,i.jsx)(a,{class:n,...s,ref:c,children:r})}var s=({children:e})=>(0,i.jsx)(`div`,{slot:`featured-text`,children:e});o.FeaturedText=s,s.displayName=`BasicCard.FeaturedText`,exports.BasicCard=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-button");var a=`ds-button${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClick:o,size:s,...c}=e,{ref:l}=t.useHandleEvent({click:o});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-button");var a=`ds-button${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClick:o,size:s,...c}=e,{ref:l}=t.useHandleEvent({click:o});return(0,i.jsx)(a,{size:typeof s==`string`?s:JSON.stringify(s),class:n,...c,ref:l,children:r})}exports.Button=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-calendar");var a=`ds-calendar${r.VERSION_TAG_SUFFIX}`;function o({className:e,onChange:n,...r}){let{ref:o}=t.useHandleEvent({"ds-calendar-change":n});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-calendar");var a=`ds-calendar${r.VERSION_TAG_SUFFIX}`;function o({className:e,onChange:n,...r}){let{ref:o}=t.useHandleEvent({"ds-calendar-change":n});return(0,i.jsx)(a,{class:e,...r,ref:o})}exports.Calendar=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-chips");var a=`ds-chips${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,...s}=e,{ref:c}=t.useHandleEvent({"ds-chips:change":o});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-chips");var a=`ds-chips${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,...s}=e,{ref:c}=t.useHandleEvent({"ds-chips:change":o});return(0,i.jsx)(a,{class:n,...s,ref:c,children:r})}exports.Chips=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-dialog");let a=require("react-dom");var o=`ds-dialog${r.VERSION_TAG_SUFFIX}`;function s(e){let{className:n,children:r,onClose:s,withPortal:c,...l}=e,{ref:u}=t.useHandleEvent({"ds-dialog:close":s}),d=(0,i.jsx)(o,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-dialog");let a=require("react-dom");var o=`ds-dialog${r.VERSION_TAG_SUFFIX}`;function s(e){let{className:n,children:r,onClose:s,withPortal:c,...l}=e,{ref:u}=t.useHandleEvent({"ds-dialog:close":s}),d=(0,i.jsx)(o,{class:n,...l,ref:u,children:r});return c?(0,a.createPortal)(d,document.body):d}exports.Dialog=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime"),a=require("react-dom");require("@cupra/ui-kit/react/ds-dialog-fullscreen");var o=`ds-dialog-fullscreen${r.VERSION_TAG_SUFFIX}`;function s(e){let{className:n,children:r,onClose:s,withPortal:c,...l}=e,{ref:u}=t.useHandleEvent({"ds-dialog-fullscreen:close":s}),d=(0,i.jsx)(o,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime"),a=require("react-dom");require("@cupra/ui-kit/react/ds-dialog-fullscreen");var o=`ds-dialog-fullscreen${r.VERSION_TAG_SUFFIX}`;function s(e){let{className:n,children:r,onClose:s,withPortal:c,...l}=e,{ref:u}=t.useHandleEvent({"ds-dialog-fullscreen:close":s}),d=(0,i.jsx)(o,{class:n,...l,ref:u,children:r});return c?(0,a.createPortal)(d,document.body):d}exports.DialogFullscreen=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-drawer");var a=`ds-drawer${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClose:o,...s}=e,{ref:c}=t.useHandleEvent({"ds-drawer:close":o});return(0,i.jsx)(a,{class:n,ref:c
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-drawer");var a=`ds-drawer${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClose:o,...s}=e,{ref:c}=t.useHandleEvent({"ds-drawer:close":o});return(0,i.jsx)(a,{class:n,...s,ref:c,children:r})}var s=({children:e,...t})=>(0,i.jsx)(`div`,{slot:`header`,...t,children:e}),c=({children:e,...t})=>(0,i.jsx)(`div`,{slot:`content`,...t,children:e}),l=({children:e,...t})=>(0,i.jsx)(`div`,{slot:`footer`,...t,children:e});o.Header=s,o.Content=c,o.Footer=l,s.displayName=`Drawer.Header`,c.displayName=`Drawer.Content`,l.displayName=`Drawer.Footer`,exports.Drawer=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-favourite-action");var a=`ds-favourite-action${r.VERSION_TAG_SUFFIX}`;function o({className:e,initialSelected:n,onChange:r,onClick:o,...s}){let{ref:c}=t.useHandleEvent({"ds-favourite-action:change":e=>{r?.(e.detail.selected)},click:o});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-favourite-action");var a=`ds-favourite-action${r.VERSION_TAG_SUFFIX}`;function o({className:e,initialSelected:n,onChange:r,onClick:o,...s}){let{ref:c}=t.useHandleEvent({"ds-favourite-action:change":e=>{r?.(e.detail.selected)},click:o});return(0,i.jsx)(a,{class:e,"initial-selected":n||void 0,...s,ref:c})}exports.FavouriteAction=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-icon-button");var a=`ds-icon-button${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,onClick:r,size:o,...s}=e,{ref:c}=t.useHandleEvent({click:r});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-icon-button");var a=`ds-icon-button${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,onClick:r,size:o,...s}=e,{ref:c}=t.useHandleEvent({click:r});return(0,i.jsx)(a,{size:typeof o==`string`?o:JSON.stringify(o),class:n,...s,ref:c})}exports.IconButton=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-inline-alert");var a=`ds-inline-alert${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClose:o,...s}=e,{ref:c}=t.useHandleEvent({"inline-alert:close":o});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-inline-alert");var a=`ds-inline-alert${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClose:o,...s}=e,{ref:c}=t.useHandleEvent({"inline-alert:close":o});return(0,i.jsx)(a,{class:n,...s,ref:c,children:r})}exports.InlineAlert=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-interactive-card");var a=`ds-interactive-card${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClick:o,...s}=e,{ref:c}=t.useHandleEvent({click:o});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-interactive-card");var a=`ds-interactive-card${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClick:o,...s}=e,{ref:c}=t.useHandleEvent({click:o});return(0,i.jsx)(a,{class:n,...s,ref:c,children:r})}var s=({children:e})=>(0,i.jsx)(`div`,{slot:`title`,children:e}),c=({children:e})=>(0,i.jsx)(`div`,{slot:`subtitle`,children:e}),l=({children:e})=>(0,i.jsx)(`div`,{slot:`meta`,children:e}),u=({children:e})=>(0,i.jsx)(`div`,{slot:`content`,children:e}),d=({children:e})=>(0,i.jsx)(`div`,{slot:`cta`,children:e}),f=({children:e})=>(0,i.jsx)(`div`,{slot:`error-title`,children:e}),p=({children:e})=>(0,i.jsx)(`div`,{slot:`error-text`,children:e});o.Title=s,o.Subtitle=c,o.Meta=l,o.Content=u,o.Cta=d,o.ErrorTitle=f,o.ErrorText=p,s.displayName=`InteractiveCard.Title`,c.displayName=`InteractiveCard.Subtitle`,l.displayName=`InteractiveCard.Meta`,u.displayName=`InteractiveCard.Content`,d.displayName=`InteractiveCard.Cta`,f.displayName=`InteractiveCard.ErrorTitle`,p.displayName=`InteractiveCard.ErrorText`,exports.InteractiveCard=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-media-control");var a=`ds-media-control${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,onPlay:r,onPause:o,...s}=e,{ref:c}=t.useHandleEvent({"ds-media-control:play":r,"ds-media-control:pause":o});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-media-control");var a=`ds-media-control${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,onPlay:r,onPause:o,...s}=e,{ref:c}=t.useHandleEvent({"ds-media-control:play":r,"ds-media-control:pause":o});return(0,i.jsx)(a,{class:n,...s,ref:c})}exports.MediaControl=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");;/* empty css */let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime"),a=require("react-dom");require("@cupra/ui-kit/react/ds-modal");var o=`ds-modal${r.VERSION_TAG_SUFFIX}`;function s(){}function c(e){let{children:n,onClickCloseButton:r=s,onClickConfirmButton:c=s,onClickCancelButton:l=s,className:u,withPortal:d,...f}=e,{ref:p}=t.useHandleEvent({"click-close-button":r,"click-confirm-button":c,"click-cancel-button":l});if(!f.open)return null;let m=(0,i.jsx)(o,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");;/* empty css */let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime"),a=require("react-dom");require("@cupra/ui-kit/react/ds-modal");var o=`ds-modal${r.VERSION_TAG_SUFFIX}`;function s(){}function c(e){let{children:n,onClickCloseButton:r=s,onClickConfirmButton:c=s,onClickCancelButton:l=s,className:u,withPortal:d,...f}=e,{ref:p}=t.useHandleEvent({"click-close-button":r,"click-confirm-button":c,"click-cancel-button":l});if(!f.open)return null;let m=(0,i.jsx)(o,{class:u,...f,ref:p,children:n});return d?(0,a.createPortal)(m,document.body):m}function l({children:e}){return(0,i.jsx)(`div`,{slot:`title`,children:e})}function u({className:e=``,children:t}){return(0,i.jsx)(`div`,{slot:`content`,className:`ds-scroll ${e}`.trim(),children:t})}function d({children:e}){return(0,i.jsx)(`div`,{slot:`content`,className:`ds-modal-full-screen-content`,children:e})}c.Title=l,c.Content=u,c.FullScreenContent=d,exports.Modal=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-password-input");var a=`ds-password-input${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,onInput:s,inputId:c,placeHolder:l,value:u,label:d,required:f,disabled:p,pattern:m,maxLength:h,minLength:g,..._}=e,{ref:v}=t.useHandleEvent({change:o,input:s}),y={type:`password`,...!!c&&{id:c},...!!l&&{placeholder:l},...!!u&&{value:u},...!!f&&{required:f},...!!p&&{disabled:p},...!!g&&{minLength:g},...!!h&&{maxLength:h},...!!m&&{pattern:m}};return(0,i.jsxs)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-password-input");var a=`ds-password-input${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,onInput:s,inputId:c,placeHolder:l,value:u,label:d,required:f,disabled:p,pattern:m,maxLength:h,minLength:g,..._}=e,{ref:v}=t.useHandleEvent({change:o,input:s}),y={type:`password`,...!!c&&{id:c},...!!l&&{placeholder:l},...!!u&&{value:u},...!!f&&{required:f},...!!p&&{disabled:p},...!!g&&{minLength:g},...!!h&&{maxLength:h},...!!m&&{pattern:m}};return(0,i.jsxs)(a,{class:n,..._,ref:v,children:[(0,i.jsx)(`label`,{htmlFor:c,children:d}),(0,i.jsx)(`input`,{...y})]})}exports.PasswordInput=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-picker-item");var a=`ds-picker-item${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClick:o,size:s,...c}=e,{ref:l}=t.useHandleEvent({"ds-picker-item:click":o});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-picker-item");var a=`ds-picker-item${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onClick:o,size:s,...c}=e,{ref:l}=t.useHandleEvent({"ds-picker-item:click":o});return(0,i.jsx)(a,{size:typeof s==`string`?s:JSON.stringify(s),class:n,...c,ref:l,children:r})}exports.PickerItem=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-radio");var a=`ds-radio-group${r.VERSION_TAG_SUFFIX}`,o=`ds-radio${r.VERSION_TAG_SUFFIX}`,s={Group:({children:e,onChange:n,className:r,...o})=>{let{ref:s}=t.useHandleEvent({change:n});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-radio");var a=`ds-radio-group${r.VERSION_TAG_SUFFIX}`,o=`ds-radio${r.VERSION_TAG_SUFFIX}`,s={Group:({children:e,onChange:n,className:r,...o})=>{let{ref:s}=t.useHandleEvent({change:n});return(0,i.jsx)(a,{class:r,...o,ref:s,children:e})},Button:({children:e,className:t,...n})=>(0,i.jsx)(o,{class:t,...n,children:e})};exports.Radio=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-radio-button-group");var a=`ds-radio-button-group${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,...s}=e,{ref:c}=t.useHandleEvent({change:o});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-radio-button-group");var a=`ds-radio-button-group${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,...s}=e,{ref:c}=t.useHandleEvent({change:o});return(0,i.jsx)(a,{class:n,...s,ref:c,children:r})}exports.RadioButtonGroup=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-search-input");var a=`ds-search-input${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,onInput:s,onClickPositionButton:c,placeHolder:l,type:u,value:d,label:f,required:p,disabled:m,pattern:h,maxLength:g,minLength:_,inputProps:v,...y}=e,{ref:b}=t.useHandleEvent({change:o,input:s,"ds-search-input:click-position-button":c});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-search-input");var a=`ds-search-input${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,onInput:s,onClickPositionButton:c,placeHolder:l,type:u,value:d,label:f,required:p,disabled:m,pattern:h,maxLength:g,minLength:_,inputProps:v,...y}=e,{ref:b}=t.useHandleEvent({change:o,input:s,"ds-search-input:click-position-button":c});return(0,i.jsx)(a,{class:n,...y,ref:b,children:(0,i.jsx)(`input`,{type:`text`,"aria-label":f,placeholder:l,value:d,required:p,disabled:m,minLength:_,maxLength:g,pattern:h,...v})})}exports.SearchInput=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-secondary-navigation");var a=`ds-secondary-navigation${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onSelect:o,...s}=e,{ref:c}=t.useHandleEvent({"ds-secondary-navigation:select":o});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-secondary-navigation");var a=`ds-secondary-navigation${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onSelect:o,...s}=e,{ref:c}=t.useHandleEvent({"ds-secondary-navigation:select":o});return(0,i.jsx)(a,{class:n,...s,ref:c,children:r})}o.Item=({children:e,...t})=>(0,i.jsx)(`a`,{slot:`items`,...t,children:e}),o.Actions=({children:e})=>(0,i.jsx)(i.Fragment,{children:n.Children.map(e,(e,t)=>(0,i.jsx)(`div`,{slot:`actions`,children:e},t))}),exports.SecondaryNavigation=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-segmented-control");var a=`ds-segmented-control${r.VERSION_TAG_SUFFIX}`;function o(e){let{onChange:n,className:r,children:o,...s}=e,{ref:c}=t.useHandleEvent({change:n});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-segmented-control");var a=`ds-segmented-control${r.VERSION_TAG_SUFFIX}`;function o(e){let{onChange:n,className:r,children:o,...s}=e,{ref:c}=t.useHandleEvent({change:n});return(0,i.jsx)(a,{class:r,...s,ref:c,children:o})}exports.SegmentedControl=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-slider");var a=`ds-slider${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,size:o,onChange:s,...c}=e,{ref:l}=t.useHandleEvent({change:s});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-slider");var a=`ds-slider${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,size:o,onChange:s,...c}=e,{ref:l}=t.useHandleEvent({change:s});return(0,i.jsx)(a,{size:typeof o==`string`?o:JSON.stringify(o),class:n,...c,ref:l})}exports.Slider=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-static-box");var a=`ds-static-box${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,size:o,...s}=e,{ref:c}=t.useHandleEvent({});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-static-box");var a=`ds-static-box${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,size:o,...s}=e,{ref:c}=t.useHandleEvent({});return(0,i.jsx)(a,{size:typeof o==`string`?o:JSON.stringify(o),class:n,...s,ref:c,children:r})}exports.StaticBox=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-tabs");var a=`ds-tabs${r.VERSION_TAG_SUFFIX}`;function o({children:e,onChange:n,...r}){let{ref:o}=t.useHandleEvent({change:n});return(0,i.jsx)(a,{ref:o
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-tabs");var a=`ds-tabs${r.VERSION_TAG_SUFFIX}`;function o({children:e,onChange:n,...r}){let{ref:o}=t.useHandleEvent({change:n});return(0,i.jsx)(a,{...r,ref:o,children:e})}function s({children:e}){return(0,i.jsx)(`div`,{role:`tab`,slot:`tab`,children:e})}function c({children:e}){return(0,i.jsx)(`div`,{role:`tabpanel`,slot:`panel`,children:e})}o.Tab=s,o.Panel=c,exports.Tabs=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-tag");var a=`ds-tag${r.VERSION_TAG_SUFFIX}`;function o(e){let{children:n,onClickIcon:r,className:o,...s}=e,{ref:c}=t.useHandleEvent({clickicon:r});return(0,i.jsx)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-tag");var a=`ds-tag${r.VERSION_TAG_SUFFIX}`;function o(e){let{children:n,onClickIcon:r,className:o,...s}=e,{ref:c}=t.useHandleEvent({clickicon:r});return(0,i.jsx)(a,{class:o,...s,ref:c,children:n})}exports.Tag=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-text-input");var a=`ds-text-input${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,onInput:s,onKeyDown:c,inputId:l,placeHolder:u,type:d,value:f,label:p,required:m,disabled:h,readOnly:g,pattern:_,maxLength:v,minLength:y,...b}=e,{ref:x}=t.useHandleEvent({change:o,input:s,keydown:c});return(0,i.jsxs)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-text-input");var a=`ds-text-input${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,onInput:s,onKeyDown:c,inputId:l,placeHolder:u,type:d,value:f,label:p,required:m,disabled:h,readOnly:g,pattern:_,maxLength:v,minLength:y,...b}=e,{ref:x}=t.useHandleEvent({change:o,input:s,keydown:c});return(0,i.jsxs)(a,{class:n,...b,ref:x,children:[(0,i.jsx)(`label`,{htmlFor:l,children:p}),(0,i.jsx)(`input`,{id:l,type:d||`text`,placeholder:u,value:f,required:m,disabled:h,readOnly:g,minLength:y,maxLength:v,pattern:_})]})}exports.TextInput=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-textarea");var a=`ds-textarea${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,onInput:s,textareaId:c,placeholder:l,value:u,label:d,required:f,disabled:p,readOnly:m,minLength:h,maxLength:g,rows:_,cols:v,forcedError:y,helperText:b,invalidError:x,...S}=e,{ref:C}=t.useHandleEvent({change:o,input:s});return(0,i.jsxs)(a,{
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-textarea");var a=`ds-textarea${r.VERSION_TAG_SUFFIX}`;function o(e){let{className:n,children:r,onChange:o,onInput:s,textareaId:c,placeholder:l,value:u,label:d,required:f,disabled:p,readOnly:m,minLength:h,maxLength:g,rows:_,cols:v,forcedError:y,helperText:b,invalidError:x,...S}=e,{ref:C}=t.useHandleEvent({change:o,input:s});return(0,i.jsxs)(a,{class:n,"forced-error":y,"helper-text":b,"invalid-error":x,...S,ref:C,children:[(0,i.jsx)(`label`,{htmlFor:c,children:d}),(0,i.jsx)(`textarea`,{id:c,placeholder:l,value:u,required:f,disabled:p,readOnly:m,minLength:h,maxLength:g,rows:_,cols:v})]})}exports.Textarea=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-toggle-switch");var a=`ds-toggle-switch${r.VERSION_TAG_SUFFIX}`;function o({label:e,onChange:n,...r}){let{ref:o}=t.useHandleEvent({change:n});return(0,i.jsxs)(a,{ref:o
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../hooks/useHandleEvent.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("@cupra/ui-kit/react/utils/version"),i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-toggle-switch");var a=`ds-toggle-switch${r.VERSION_TAG_SUFFIX}`;function o({label:e,onChange:n,...r}){let{ref:o}=t.useHandleEvent({change:n});return(0,i.jsxs)(a,{...r,ref:o,children:[e&&(0,i.jsx)(`div`,{slot:`label`,children:e}),r.children]})}function s({children:e}){return(0,i.jsx)(`div`,{slot:`off`,children:e})}function c({children:e}){return(0,i.jsx)(`div`,{slot:`on`,children:e})}o.Off=s,o.On=c,exports.ToggleSwitch=o;
|
|
@@ -8,10 +8,10 @@ var r = `ds-button${t}`;
|
|
|
8
8
|
function i(t) {
|
|
9
9
|
let { className: i, children: a, onClick: o, size: s, ...c } = t, { ref: l } = e({ click: o });
|
|
10
10
|
return /* @__PURE__ */ n(r, {
|
|
11
|
-
ref: l,
|
|
12
11
|
size: typeof s == "string" ? s : JSON.stringify(s),
|
|
13
12
|
class: i,
|
|
14
13
|
...c,
|
|
14
|
+
ref: l,
|
|
15
15
|
children: a
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -8,9 +8,9 @@ import { createPortal as r } from "react-dom";
|
|
|
8
8
|
var i = `ds-dialog${t}`;
|
|
9
9
|
function a(t) {
|
|
10
10
|
let { className: a, children: o, onClose: s, withPortal: c, ...l } = t, { ref: u } = e({ "ds-dialog:close": s }), d = /* @__PURE__ */ n(i, {
|
|
11
|
-
ref: u,
|
|
12
11
|
class: a,
|
|
13
12
|
...l,
|
|
13
|
+
ref: u,
|
|
14
14
|
children: o
|
|
15
15
|
});
|
|
16
16
|
return c ? r(d, document.body) : d;
|
|
@@ -8,9 +8,9 @@ import "@cupra/ui-kit/react/ds-dialog-fullscreen";
|
|
|
8
8
|
var i = `ds-dialog-fullscreen${t}`;
|
|
9
9
|
function a(t) {
|
|
10
10
|
let { className: a, children: o, onClose: s, withPortal: c, ...l } = t, { ref: u } = e({ "ds-dialog-fullscreen:close": s }), d = /* @__PURE__ */ n(i, {
|
|
11
|
-
ref: u,
|
|
12
11
|
class: a,
|
|
13
12
|
...l,
|
|
13
|
+
ref: u,
|
|
14
14
|
children: o
|
|
15
15
|
});
|
|
16
16
|
return c ? r(d, document.body) : d;
|
|
@@ -8,10 +8,10 @@ var r = `ds-icon-button${t}`;
|
|
|
8
8
|
function i(t) {
|
|
9
9
|
let { className: i, onClick: a, size: o, ...s } = t, { ref: c } = e({ click: a });
|
|
10
10
|
return /* @__PURE__ */ n(r, {
|
|
11
|
-
ref: c,
|
|
12
11
|
size: typeof o == "string" ? o : JSON.stringify(o),
|
|
13
12
|
class: i,
|
|
14
|
-
...s
|
|
13
|
+
...s,
|
|
14
|
+
ref: c
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
@@ -8,10 +8,10 @@ var r = `ds-picker-item${t}`;
|
|
|
8
8
|
function i(t) {
|
|
9
9
|
let { className: i, children: a, onClick: o, size: s, ...c } = t, { ref: l } = e({ "ds-picker-item:click": o });
|
|
10
10
|
return /* @__PURE__ */ n(r, {
|
|
11
|
-
ref: l,
|
|
12
11
|
size: typeof s == "string" ? s : JSON.stringify(s),
|
|
13
12
|
class: i,
|
|
14
13
|
...c,
|
|
14
|
+
ref: l,
|
|
15
15
|
children: a
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -8,9 +8,9 @@ var r = `ds-radio-group${t}`, i = `ds-radio${t}`, a = {
|
|
|
8
8
|
Group: ({ children: t, onChange: i, className: a, ...o }) => {
|
|
9
9
|
let { ref: s } = e({ change: i });
|
|
10
10
|
return /* @__PURE__ */ n(r, {
|
|
11
|
-
ref: s,
|
|
12
11
|
class: a,
|
|
13
12
|
...o,
|
|
13
|
+
ref: s,
|
|
14
14
|
children: t
|
|
15
15
|
});
|
|
16
16
|
},
|
|
@@ -8,9 +8,9 @@ var a = `ds-secondary-navigation${n}`;
|
|
|
8
8
|
function o(t) {
|
|
9
9
|
let { className: n, children: r, onSelect: o, ...s } = t, { ref: c } = e({ "ds-secondary-navigation:select": o });
|
|
10
10
|
return /* @__PURE__ */ i(a, {
|
|
11
|
-
ref: c,
|
|
12
11
|
class: n,
|
|
13
12
|
...s,
|
|
13
|
+
ref: c,
|
|
14
14
|
children: r
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -8,10 +8,10 @@ var r = `ds-slider${t}`;
|
|
|
8
8
|
function i(t) {
|
|
9
9
|
let { className: i, children: a, size: o, onChange: s, ...c } = t, { ref: l } = e({ change: s });
|
|
10
10
|
return /* @__PURE__ */ n(r, {
|
|
11
|
-
ref: l,
|
|
12
11
|
size: typeof o == "string" ? o : JSON.stringify(o),
|
|
13
12
|
class: i,
|
|
14
|
-
...c
|
|
13
|
+
...c,
|
|
14
|
+
ref: l
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
@@ -8,10 +8,10 @@ var r = `ds-static-box${t}`;
|
|
|
8
8
|
function i(t) {
|
|
9
9
|
let { className: i, children: a, size: o, ...s } = t, { ref: c } = e({});
|
|
10
10
|
return /* @__PURE__ */ n(r, {
|
|
11
|
-
ref: c,
|
|
12
11
|
size: typeof o == "string" ? o : JSON.stringify(o),
|
|
13
12
|
class: i,
|
|
14
13
|
...s,
|
|
14
|
+
ref: c,
|
|
15
15
|
children: a
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -11,12 +11,12 @@ function a(t) {
|
|
|
11
11
|
input: c
|
|
12
12
|
});
|
|
13
13
|
return /* @__PURE__ */ r(i, {
|
|
14
|
-
ref: w,
|
|
15
14
|
class: a,
|
|
16
15
|
"forced-error": b,
|
|
17
16
|
"helper-text": x,
|
|
18
17
|
"invalid-error": S,
|
|
19
18
|
...C,
|
|
19
|
+
ref: w,
|
|
20
20
|
children: [/* @__PURE__ */ n("label", {
|
|
21
21
|
htmlFor: l,
|
|
22
22
|
children: f
|
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.264",
|
|
4
4
|
"description": "React components library",
|
|
5
5
|
"author": "SEAT S.A.",
|
|
6
6
|
"license": "SEAT S.A. Library EULA 1.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
],
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@cupra/ui-kit": "2.0.0-canary.
|
|
53
|
+
"@cupra/ui-kit": "2.0.0-canary.248",
|
|
54
54
|
"react": ">= 18.3.1 < 20",
|
|
55
55
|
"react-dom": ">= 18.3.1 < 20",
|
|
56
56
|
"typescript": ">=5.0.0"
|
|
@@ -60,7 +60,8 @@
|
|
|
60
60
|
"@storybook/addon-vitest": "^10.6.2",
|
|
61
61
|
"@storybook/react": "^10.6.2",
|
|
62
62
|
"@storybook/react-vite": "^10.6.2",
|
|
63
|
-
"@testing-library/
|
|
63
|
+
"@testing-library/dom": "^10.4.2",
|
|
64
|
+
"@testing-library/react": "^16.3.3",
|
|
64
65
|
"@testing-library/user-event": "^14.6.7",
|
|
65
66
|
"@types/react": "^18.3.31",
|
|
66
67
|
"@types/react-dom": "^18.3.7",
|
|
@@ -74,11 +75,12 @@
|
|
|
74
75
|
"storybook": "^10.6.2",
|
|
75
76
|
"typescript": "^5.9.3",
|
|
76
77
|
"vite": "^8.3.3",
|
|
77
|
-
"@cupra/ui-kit": "2.0.0-canary.
|
|
78
|
+
"@cupra/ui-kit": "2.0.0-canary.248"
|
|
78
79
|
},
|
|
79
80
|
"scripts": {
|
|
80
81
|
"build": "rm -rf dist && pnpm --filter @cupra/ui-kit build:react && tsc --declaration --emitDeclarationOnly && BUILD_FORMAT=esm vite build --emptyOutDir false && BUILD_FORMAT=cjs vite build --emptyOutDir false",
|
|
81
82
|
"test": "vitest run --project unit",
|
|
83
|
+
"type-check": "tsc --noEmit -p tsconfig.json",
|
|
82
84
|
"test:storybook": "vitest run --project storybook-cupra-diagonal --project storybook-seat",
|
|
83
85
|
"generate-licenses": "generate-license-file --input package.json --output THIRD_PARTY_LICENSES.MD --overwrite --ci",
|
|
84
86
|
"storybook:cupra-diagonal": "pnpm --filter ui-kit build:react:dev && storybook dev --config-dir .storybook/themes/cupra-diagonal -p 6008",
|