@cupra/ui-react 2.0.0-canary.5 → 2.0.0-canary.6
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 +55 -0
- package/dist/components/index.d.ts +56 -56
- package/package.json +3 -19
- package/dist/components/Accordion/index.d.ts +0 -1
- package/dist/components/Avatar/index.d.ts +0 -1
- package/dist/components/Badge/index.d.ts +0 -1
- package/dist/components/BasicCard/index.d.ts +0 -1
- package/dist/components/BasicCardHeader/index.d.ts +0 -1
- package/dist/components/BasicCardImage/index.d.ts +0 -1
- package/dist/components/BasicCardSection/index.d.ts +0 -1
- package/dist/components/Bullets/index.d.ts +0 -1
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/CarouselIndicator/index.d.ts +0 -1
- package/dist/components/Checkbox/index.d.ts +0 -1
- package/dist/components/Chip/index.d.ts +0 -1
- package/dist/components/Chips/index.d.ts +0 -1
- package/dist/components/Currency/index.d.ts +0 -1
- package/dist/components/Dialog/index.d.ts +0 -1
- package/dist/components/DialogBody/index.d.ts +0 -1
- package/dist/components/DialogFooter/index.d.ts +0 -1
- package/dist/components/DialogFullscreen/index.d.ts +0 -1
- package/dist/components/DialogHeader/index.d.ts +0 -1
- package/dist/components/Divider/index.d.ts +0 -1
- package/dist/components/Drawer/index.d.ts +0 -1
- package/dist/components/Hyperlink/index.d.ts +0 -1
- package/dist/components/Icon/index.d.ts +0 -1
- package/dist/components/IconButton/index.d.ts +0 -1
- package/dist/components/Input/index.d.ts +0 -1
- package/dist/components/InteractiveCard/index.d.ts +0 -1
- package/dist/components/LinkButton/index.d.ts +0 -1
- package/dist/components/Loader/index.d.ts +0 -1
- package/dist/components/Logo/index.d.ts +0 -1
- package/dist/components/MainTitle/index.d.ts +0 -1
- package/dist/components/MapPin/index.d.ts +0 -1
- package/dist/components/Modal/index.d.ts +0 -1
- package/dist/components/PasswordInput/index.d.ts +0 -1
- package/dist/components/PickerItem/index.d.ts +0 -1
- package/dist/components/Radio/index.d.ts +0 -1
- package/dist/components/RadioButton/index.d.ts +0 -1
- package/dist/components/RadioButtonGroup/index.d.ts +0 -1
- package/dist/components/Rating/index.d.ts +0 -1
- package/dist/components/Search/index.d.ts +0 -1
- package/dist/components/SearchInput/index.d.ts +0 -1
- package/dist/components/SecondaryNavigation/index.d.ts +0 -1
- package/dist/components/SegmentedControl/index.d.ts +0 -1
- package/dist/components/Select/index.d.ts +0 -1
- package/dist/components/Selection/index.d.ts +0 -1
- package/dist/components/SidebarNavigation/index.d.ts +0 -1
- package/dist/components/Slider/index.d.ts +0 -1
- package/dist/components/StaticBox/index.d.ts +0 -1
- package/dist/components/Stepper/index.d.ts +0 -1
- package/dist/components/Tabs/index.d.ts +0 -1
- package/dist/components/Tag/index.d.ts +0 -1
- package/dist/components/Text/index.d.ts +0 -1
- package/dist/components/TextInput/index.d.ts +0 -1
- package/dist/components/Textarea/index.d.ts +0 -1
- package/dist/components/ThemeProvider/index.d.ts +0 -1
- package/dist/components/Toast/index.d.ts +0 -1
- package/dist/components/ToastMessage/index.d.ts +0 -1
- package/dist/components/ToggleButton/index.d.ts +0 -1
- package/dist/components/ToggleSwitch/index.d.ts +0 -1
- package/dist/components/Tooltip/index.d.ts +0 -1
package/README.md
CHANGED
|
@@ -22,6 +22,59 @@ This library currently provides **official support for React 18**.
|
|
|
22
22
|
|
|
23
23
|
Projects using other React versions may still install and use the library, but behaviour is not guaranteed until official support is released.
|
|
24
24
|
|
|
25
|
+
### TypeScript and module resolution
|
|
26
|
+
|
|
27
|
+
This library is **bundler-first**.
|
|
28
|
+
|
|
29
|
+
#### Subpath imports (recommended)
|
|
30
|
+
|
|
31
|
+
Importing components via subpaths (for example `@cupra/ui-react/Accordion`) requires
|
|
32
|
+
TypeScript to use **bundler-based module resolution**:
|
|
33
|
+
|
|
34
|
+
- **TypeScript ≥ 5**
|
|
35
|
+
- `"moduleResolution": "bundler"`
|
|
36
|
+
|
|
37
|
+
This matches how modern bundlers resolve modules and enables the best DX,
|
|
38
|
+
including proper tree-shaking and code-splitting.
|
|
39
|
+
|
|
40
|
+
Minimal required `tsconfig.json` setting:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
{
|
|
44
|
+
"compilerOptions": {
|
|
45
|
+
"moduleResolution": "bundler"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
#### Root imports (compatibility mode)
|
|
53
|
+
|
|
54
|
+
If your project cannot use `moduleResolution: "bundler"`, you can still consume
|
|
55
|
+
the library using **root imports**:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
import { Accordion, IconButton } from "@cupra/ui-react";
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
This mode works with legacy or constrained TypeScript setups, but has the
|
|
62
|
+
following trade-offs:
|
|
63
|
+
|
|
64
|
+
- Subpath imports are not available
|
|
65
|
+
- Reduced tree-shaking and chunking opportunities
|
|
66
|
+
- All components are imported from the package entry point
|
|
67
|
+
|
|
68
|
+
Root imports are supported as a fallback, but **subpath imports are recommended
|
|
69
|
+
whenever possible**.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
#### Notes
|
|
74
|
+
|
|
75
|
+
- Subpath imports are intentionally designed for bundler-based environments.
|
|
76
|
+
- The library does not attempt to enforce Node-style module resolution.
|
|
77
|
+
- No additional runtime configuration is required when using a modern bundler.
|
|
25
78
|
## Installation
|
|
26
79
|
|
|
27
80
|
### Install the package
|
|
@@ -119,6 +172,8 @@ npm install @cupra/ui-react@0.1.4-canary.2
|
|
|
119
172
|
Import components via subpaths. Do not import from the package index:
|
|
120
173
|
- @cupra/ui-react → React wrappers built on top of the Web Components (e.g. `import { Button } from '@cupra/ui-react/Button'`)
|
|
121
174
|
|
|
175
|
+
If you see TypeScript errors like `TS2307: Cannot find module '@cupra/ui-react/Accordion'`, check your `tsconfig` and apply one of the configurations from the section above. With TS 4.9 + `node`, the library publishes `typesVersions` to resolve subpath typings, but the recommendation is to use `bundler` (TS ≥ 5) or `node16`/`nodenext`.
|
|
176
|
+
|
|
122
177
|
Wrap your React app with `ThemeProvider`.
|
|
123
178
|
The provider requires **three props**:
|
|
124
179
|
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
export * from './Accordion/
|
|
2
|
-
export * from './Badge/
|
|
3
|
-
export * from './BasicCard/
|
|
4
|
-
export * from './BasicCardSection/
|
|
5
|
-
export * from './Bullets/
|
|
6
|
-
export * from './Button/
|
|
7
|
-
export * from './CarouselIndicator/
|
|
8
|
-
export * from './Checkbox/
|
|
9
|
-
export * from './Chip/
|
|
10
|
-
export * from './Chips/
|
|
11
|
-
export * from './Currency/
|
|
12
|
-
export * from './Dialog/
|
|
13
|
-
export * from './DialogBody/
|
|
14
|
-
export * from './DialogFooter/
|
|
15
|
-
export * from './DialogHeader/
|
|
16
|
-
export * from './Divider/
|
|
17
|
-
export * from './Drawer/
|
|
18
|
-
export * from './Hyperlink/
|
|
19
|
-
export * from './Icon/
|
|
20
|
-
export * from './IconButton/
|
|
21
|
-
export * from './Input/
|
|
22
|
-
export * from './LinkButton/
|
|
23
|
-
export * from './Loader/
|
|
24
|
-
export * from './Logo/
|
|
25
|
-
export * from './MainTitle/
|
|
26
|
-
export * from './MapPin/
|
|
27
|
-
export * from './Modal/
|
|
28
|
-
export * from './PasswordInput/
|
|
29
|
-
export * from './PickerItem/
|
|
30
|
-
export * from './Radio/
|
|
31
|
-
export * from './RadioButton/
|
|
32
|
-
export * from './RadioButtonGroup/
|
|
33
|
-
export * from './Rating/
|
|
34
|
-
export * from './Search/
|
|
35
|
-
export * from './SearchInput/
|
|
36
|
-
export * from './SecondaryNavigation/
|
|
37
|
-
export * from './SegmentedControl/
|
|
38
|
-
export * from './Select/
|
|
39
|
-
export * from './Selection/
|
|
40
|
-
export * from './Slider/
|
|
41
|
-
export * from './Tabs/
|
|
42
|
-
export * from './Tag/
|
|
43
|
-
export * from './Text/
|
|
44
|
-
export * from './TextInput/
|
|
45
|
-
export * from './Textarea/
|
|
46
|
-
export * from './ThemeProvider/
|
|
47
|
-
export * from './ToggleButton/
|
|
48
|
-
export * from './ToggleSwitch/
|
|
49
|
-
export * from './Tooltip/
|
|
50
|
-
export * from './Toast/
|
|
51
|
-
export * from './ToastMessage/
|
|
52
|
-
export * from './Avatar/
|
|
53
|
-
export * from './StaticBox/
|
|
54
|
-
export * from './Stepper/
|
|
55
|
-
export * from './InteractiveCard/
|
|
56
|
-
export * from './SidebarNavigation/
|
|
1
|
+
export * from './Accordion/Accordion';
|
|
2
|
+
export * from './Badge/Badge';
|
|
3
|
+
export * from './BasicCard/BasicCard';
|
|
4
|
+
export * from './BasicCardSection/BasicCardSection';
|
|
5
|
+
export * from './Bullets/Bullets';
|
|
6
|
+
export * from './Button/Button';
|
|
7
|
+
export * from './CarouselIndicator/CarouselIndicator';
|
|
8
|
+
export * from './Checkbox/Checkbox';
|
|
9
|
+
export * from './Chip/Chip';
|
|
10
|
+
export * from './Chips/Chips';
|
|
11
|
+
export * from './Currency/Currency';
|
|
12
|
+
export * from './Dialog/Dialog';
|
|
13
|
+
export * from './DialogBody/DialogBody';
|
|
14
|
+
export * from './DialogFooter/DialogFooter';
|
|
15
|
+
export * from './DialogHeader/DialogHeader';
|
|
16
|
+
export * from './Divider/Divider';
|
|
17
|
+
export * from './Drawer/Drawer';
|
|
18
|
+
export * from './Hyperlink/Hyperlink';
|
|
19
|
+
export * from './Icon/Icon';
|
|
20
|
+
export * from './IconButton/IconButton';
|
|
21
|
+
export * from './Input/Input';
|
|
22
|
+
export * from './LinkButton/LinkButton';
|
|
23
|
+
export * from './Loader/Loader';
|
|
24
|
+
export * from './Logo/Logo';
|
|
25
|
+
export * from './MainTitle/MainTitle';
|
|
26
|
+
export * from './MapPin/MapPin';
|
|
27
|
+
export * from './Modal/Modal';
|
|
28
|
+
export * from './PasswordInput/PasswordInput';
|
|
29
|
+
export * from './PickerItem/PickerItem';
|
|
30
|
+
export * from './Radio/Radio';
|
|
31
|
+
export * from './RadioButton/RadioButton';
|
|
32
|
+
export * from './RadioButtonGroup/RadioButtonGroup';
|
|
33
|
+
export * from './Rating/Rating';
|
|
34
|
+
export * from './Search/Search';
|
|
35
|
+
export * from './SearchInput/SearchInput';
|
|
36
|
+
export * from './SecondaryNavigation/SecondaryNavigation';
|
|
37
|
+
export * from './SegmentedControl/SegmentedControl';
|
|
38
|
+
export * from './Select/Select';
|
|
39
|
+
export * from './Selection/Selection';
|
|
40
|
+
export * from './Slider/Slider';
|
|
41
|
+
export * from './Tabs/Tabs';
|
|
42
|
+
export * from './Tag/Tag';
|
|
43
|
+
export * from './Text/Text';
|
|
44
|
+
export * from './TextInput/TextInput';
|
|
45
|
+
export * from './Textarea/Textarea';
|
|
46
|
+
export * from './ThemeProvider/ThemeProvider';
|
|
47
|
+
export * from './ToggleButton/ToggleButton';
|
|
48
|
+
export * from './ToggleSwitch/ToggleSwitch';
|
|
49
|
+
export * from './Tooltip/Tooltip';
|
|
50
|
+
export * from './Toast/Toast';
|
|
51
|
+
export * from './ToastMessage/ToastMessage';
|
|
52
|
+
export * from './Avatar/Avatar';
|
|
53
|
+
export * from './StaticBox/StaticBox';
|
|
54
|
+
export * from './Stepper/Stepper';
|
|
55
|
+
export * from './InteractiveCard/InteractiveCard';
|
|
56
|
+
export * from './SidebarNavigation/SidebarNavigation';
|
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.6",
|
|
4
4
|
"description": "React components library",
|
|
5
5
|
"author": "SEAT S.A.",
|
|
6
6
|
"license": "SEAT S.A. Library EULA 1.0",
|
|
@@ -13,30 +13,14 @@
|
|
|
13
13
|
"types": "./dist/index.d.ts"
|
|
14
14
|
},
|
|
15
15
|
"./*": {
|
|
16
|
-
"import": "./dist/components
|
|
17
|
-
"types": "./dist/components
|
|
16
|
+
"import": "./dist/components/*/*.js",
|
|
17
|
+
"types": "./dist/components/*/*.d.ts"
|
|
18
18
|
},
|
|
19
19
|
"./hooks/*": {
|
|
20
20
|
"import": "./dist/hooks/*.js",
|
|
21
21
|
"types": "./dist/hooks/*.d.ts"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
"typesVersions": {
|
|
25
|
-
"*": {
|
|
26
|
-
"": [
|
|
27
|
-
"dist/index.d.ts"
|
|
28
|
-
],
|
|
29
|
-
"index": [
|
|
30
|
-
"dist/index.d.ts"
|
|
31
|
-
],
|
|
32
|
-
"*": [
|
|
33
|
-
"dist/components/*/index.d.ts"
|
|
34
|
-
],
|
|
35
|
-
"hooks/*": [
|
|
36
|
-
"dist/hooks/*.d.ts"
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
24
|
"files": [
|
|
41
25
|
"LICENSE",
|
|
42
26
|
"THIRD_PARTY_LICENSES.MD",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Accordion';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Avatar';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Badge';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './BasicCard';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './BasicCardHeader';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './BasicCardImage';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './BasicCardSection';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Bullets';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Button';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './CarouselIndicator';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Checkbox';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Chip';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Chips';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Currency';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Dialog';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DialogBody';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DialogFooter';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DialogFullscreen';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DialogHeader';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Divider';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Drawer';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Hyperlink';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Icon';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './IconButton';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Input';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './InteractiveCard';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './LinkButton';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Loader';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Logo';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './MainTitle';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './MapPin';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Modal';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './PasswordInput';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './PickerItem';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Radio';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './RadioButton';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './RadioButtonGroup';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Rating';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Search';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './SearchInput';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './SecondaryNavigation';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './SegmentedControl';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Select';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Selection';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './SidebarNavigation';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Slider';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './StaticBox';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Stepper';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Tabs';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Tag';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Text';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TextInput';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Textarea';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ThemeProvider';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Toast';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ToastMessage';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ToggleButton';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ToggleSwitch';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Tooltip';
|