@cupra/ui-react 1.0.1-canary.0 → 2.0.0-canary.2

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.
@@ -0,0 +1,30 @@
1
+ import { DsDrawerAttrs } from '@cupra/ui-kit/react/types/ds-drawer';
2
+ import { HTMLAttributes, type ReactElement, ReactNode } from 'react';
3
+ import '@cupra/ui-kit/react/ds-drawer';
4
+ type DrawerProps = DsDrawerAttrs & {
5
+ className?: string;
6
+ children: JSX.Element | JSX.Element[] | string;
7
+ onClose?: (event: CustomEvent) => void;
8
+ };
9
+ export declare function Drawer(props: DrawerProps): ReactElement;
10
+ export declare namespace Drawer {
11
+ var Header: {
12
+ ({ children, ...props }: {
13
+ children?: ReactNode;
14
+ } & HTMLAttributes<HTMLDivElement>): JSX.Element;
15
+ displayName: string;
16
+ };
17
+ var Content: {
18
+ ({ children, ...props }: {
19
+ children?: ReactNode;
20
+ } & HTMLAttributes<HTMLDivElement>): JSX.Element;
21
+ displayName: string;
22
+ };
23
+ var Footer: {
24
+ ({ children, ...props }: {
25
+ children?: ReactNode;
26
+ } & HTMLAttributes<HTMLDivElement>): JSX.Element;
27
+ displayName: string;
28
+ };
29
+ }
30
+ export {};
@@ -0,0 +1,19 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import "@cupra/ui-kit/react/ds-drawer";
3
+ import { useHandleEvent as m } from "../../hooks/useHandleEvent.js";
4
+ function t(e) {
5
+ const { className: r, children: d, onClose: c, ...l } = e, { ref: i } = m({
6
+ "ds-drawer:close": c
7
+ });
8
+ return /* @__PURE__ */ o("ds-drawer-react", { class: r, ref: i, ...l, children: d });
9
+ }
10
+ const n = ({ children: e, ...r }) => /* @__PURE__ */ o("div", { slot: "header", ...r, children: e }), s = ({ children: e, ...r }) => /* @__PURE__ */ o("div", { slot: "content", ...r, children: e }), a = ({ children: e, ...r }) => /* @__PURE__ */ o("div", { slot: "footer", ...r, children: e });
11
+ t.Header = n;
12
+ t.Content = s;
13
+ t.Footer = a;
14
+ n.displayName = "Drawer.Header";
15
+ s.displayName = "Drawer.Content";
16
+ a.displayName = "Drawer.Footer";
17
+ export {
18
+ t as Drawer
19
+ };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const Primary: Story;
6
+ export declare const DefaultOpen: Story;
@@ -12,6 +12,7 @@ export * from './DialogBody/DialogBody';
12
12
  export * from './DialogFooter/DialogFooter';
13
13
  export * from './DialogHeader/DialogHeader';
14
14
  export * from './Divider/Divider';
15
+ export * from './Drawer/Drawer';
15
16
  export * from './Hyperlink/Hyperlink';
16
17
  export * from './Icon/Icon';
17
18
  export * from './IconButton/IconButton';
package/dist/index.js CHANGED
@@ -9,56 +9,57 @@ import { Chips as T } from "./components/Chips/Chips.js";
9
9
  import { Currency as S } from "./components/Currency/Currency.js";
10
10
  import { Dialog as I } from "./components/Dialog/Dialog.js";
11
11
  import { DialogBody as C } from "./components/DialogBody/DialogBody.js";
12
- import { DialogFooter as k } from "./components/DialogFooter/DialogFooter.js";
12
+ import { DialogFooter as L } from "./components/DialogFooter/DialogFooter.js";
13
13
  import { DialogHeader as R } from "./components/DialogHeader/DialogHeader.js";
14
14
  import { Divider as y } from "./components/Divider/Divider.js";
15
- import { Hyperlink as P } from "./components/Hyperlink/Hyperlink.js";
16
- import { Icon as w } from "./components/Icon/Icon.js";
17
- import { IconButton as E } from "./components/IconButton/IconButton.js";
18
- import { Input as z } from "./components/Input/Input.js";
19
- import { LinkButton as G } from "./components/LinkButton/LinkButton.js";
20
- import { Loader as j, LoaderLogo as q } from "./components/Loader/Loader.js";
21
- import { Logo as K } from "./components/Logo/Logo.js";
22
- import { MainTitle as U } from "./components/MainTitle/MainTitle.js";
23
- import { MapPin as W } from "./components/MapPin/MapPin.js";
24
- import { Modal as Y } from "./components/Modal/Modal.js";
25
- import { PasswordInput as _ } from "./components/PasswordInput/PasswordInput.js";
26
- import { PickerItem as oo } from "./components/PickerItem/PickerItem.js";
27
- import { Radio as eo } from "./components/Radio/Radio.js";
28
- import { RadioButton as po } from "./components/RadioButton/RadioButton.js";
29
- import { RadioButtonGroup as mo } from "./components/RadioButtonGroup/RadioButtonGroup.js";
30
- import { Rating as ao } from "./components/Rating/Rating.js";
31
- import { Search as no } from "./components/Search/Search.js";
32
- import { SearchInput as so } from "./components/SearchInput/SearchInput.js";
33
- import { SecondaryNavigation as go } from "./components/SecondaryNavigation/SecondaryNavigation.js";
34
- import { SegmentedControl as To } from "./components/SegmentedControl/SegmentedControl.js";
35
- import { Select as So } from "./components/Select/Select.js";
36
- import { Selection as Io } from "./components/Selection/Selection.js";
37
- import { Slider as Co } from "./components/Slider/Slider.js";
38
- import { Tabs as ko } from "./components/Tabs/Tabs.js";
39
- import { Tag as Ro } from "./components/Tag/Tag.js";
40
- import { Text as yo } from "./components/Text/Text.js";
41
- import { TextInput as Po } from "./components/TextInput/TextInput.js";
42
- import { Textarea as wo } from "./components/Textarea/Textarea.js";
43
- import { ThemeProvider as Eo } from "./components/ThemeProvider/ThemeProvider.js";
44
- import { ToggleButton as zo } from "./components/ToggleButton/ToggleButton.js";
45
- import { ToggleSwitch as Go } from "./components/ToggleSwitch/ToggleSwitch.js";
46
- import { Tooltip as jo } from "./components/Tooltip/Tooltip.js";
47
- import { Toast as Jo } from "./components/Toast/Toast.js";
48
- import { ToastMessage as Qo } from "./components/ToastMessage/ToastMessage.js";
49
- import { Avatar as Vo } from "./components/Avatar/Avatar.js";
50
- import { StaticBox as Xo } from "./components/StaticBox/StaticBox.js";
51
- import { Stepper as Zo } from "./components/Stepper/Stepper.js";
52
- import { InteractiveCard as $o } from "./components/InteractiveCard/InteractiveCard.js";
53
- import { SidebarNavigation as rr } from "./components/SidebarNavigation/SidebarNavigation.js";
54
- import { useBreakpoint as tr } from "./hooks/useBreakpoint.js";
55
- import { useEventListeners as xr } from "./hooks/useEventListeners.js";
56
- import { useHandleEvent as fr } from "./hooks/useHandleEvent.js";
15
+ import { Drawer as P } from "./components/Drawer/Drawer.js";
16
+ import { Hyperlink as H } from "./components/Hyperlink/Hyperlink.js";
17
+ import { Icon as E } from "./components/Icon/Icon.js";
18
+ import { IconButton as z } from "./components/IconButton/IconButton.js";
19
+ import { Input as G } from "./components/Input/Input.js";
20
+ import { LinkButton as j } from "./components/LinkButton/LinkButton.js";
21
+ import { Loader as J, LoaderLogo as K } from "./components/Loader/Loader.js";
22
+ import { Logo as U } from "./components/Logo/Logo.js";
23
+ import { MainTitle as W } from "./components/MainTitle/MainTitle.js";
24
+ import { MapPin as Y } from "./components/MapPin/MapPin.js";
25
+ import { Modal as _ } from "./components/Modal/Modal.js";
26
+ import { PasswordInput as oo } from "./components/PasswordInput/PasswordInput.js";
27
+ import { PickerItem as eo } from "./components/PickerItem/PickerItem.js";
28
+ import { Radio as po } from "./components/Radio/Radio.js";
29
+ import { RadioButton as mo } from "./components/RadioButton/RadioButton.js";
30
+ import { RadioButtonGroup as ao } from "./components/RadioButtonGroup/RadioButtonGroup.js";
31
+ import { Rating as no } from "./components/Rating/Rating.js";
32
+ import { Search as so } from "./components/Search/Search.js";
33
+ import { SearchInput as go } from "./components/SearchInput/SearchInput.js";
34
+ import { SecondaryNavigation as To } from "./components/SecondaryNavigation/SecondaryNavigation.js";
35
+ import { SegmentedControl as So } from "./components/SegmentedControl/SegmentedControl.js";
36
+ import { Select as Io } from "./components/Select/Select.js";
37
+ import { Selection as Co } from "./components/Selection/Selection.js";
38
+ import { Slider as Lo } from "./components/Slider/Slider.js";
39
+ import { Tabs as Ro } from "./components/Tabs/Tabs.js";
40
+ import { Tag as yo } from "./components/Tag/Tag.js";
41
+ import { Text as Po } from "./components/Text/Text.js";
42
+ import { TextInput as Ho } from "./components/TextInput/TextInput.js";
43
+ import { Textarea as Eo } from "./components/Textarea/Textarea.js";
44
+ import { ThemeProvider as zo } from "./components/ThemeProvider/ThemeProvider.js";
45
+ import { ToggleButton as Go } from "./components/ToggleButton/ToggleButton.js";
46
+ import { ToggleSwitch as jo } from "./components/ToggleSwitch/ToggleSwitch.js";
47
+ import { Tooltip as Jo } from "./components/Tooltip/Tooltip.js";
48
+ import { Toast as Qo } from "./components/Toast/Toast.js";
49
+ import { ToastMessage as Vo } from "./components/ToastMessage/ToastMessage.js";
50
+ import { Avatar as Xo } from "./components/Avatar/Avatar.js";
51
+ import { StaticBox as Zo } from "./components/StaticBox/StaticBox.js";
52
+ import { Stepper as $o } from "./components/Stepper/Stepper.js";
53
+ import { InteractiveCard as rr } from "./components/InteractiveCard/InteractiveCard.js";
54
+ import { SidebarNavigation as tr } from "./components/SidebarNavigation/SidebarNavigation.js";
55
+ import { useBreakpoint as xr } from "./hooks/useBreakpoint.js";
56
+ import { useEventListeners as fr } from "./hooks/useEventListeners.js";
57
+ import { useHandleEvent as ir } from "./hooks/useHandleEvent.js";
57
58
  import "react";
58
- import { useResizeObserver as ir } from "./hooks/useResizeObserver/useResizeObserver.js";
59
+ import { useResizeObserver as dr } from "./hooks/useResizeObserver/useResizeObserver.js";
59
60
  export {
60
61
  t as Accordion,
61
- Vo as Avatar,
62
+ Xo as Avatar,
62
63
  x as Badge,
63
64
  f as Bullets,
64
65
  i as Button,
@@ -69,50 +70,51 @@ export {
69
70
  S as Currency,
70
71
  I as Dialog,
71
72
  C as DialogBody,
72
- k as DialogFooter,
73
+ L as DialogFooter,
73
74
  R as DialogHeader,
74
75
  y as Divider,
75
- P as Hyperlink,
76
- w as Icon,
77
- E as IconButton,
78
- z as Input,
79
- $o as InteractiveCard,
80
- G as LinkButton,
81
- j as Loader,
82
- q as LoaderLogo,
83
- K as Logo,
84
- U as MainTitle,
85
- W as MapPin,
86
- Y as Modal,
87
- _ as PasswordInput,
88
- oo as PickerItem,
89
- eo as Radio,
90
- po as RadioButton,
91
- mo as RadioButtonGroup,
92
- ao as Rating,
93
- no as Search,
94
- so as SearchInput,
95
- go as SecondaryNavigation,
96
- To as SegmentedControl,
97
- So as Select,
98
- Io as Selection,
99
- rr as SidebarNavigation,
100
- Co as Slider,
101
- Xo as StaticBox,
102
- Zo as Stepper,
103
- ko as Tabs,
104
- Ro as Tag,
105
- yo as Text,
106
- Po as TextInput,
107
- wo as Textarea,
108
- Eo as ThemeProvider,
109
- Jo as Toast,
110
- Qo as ToastMessage,
111
- zo as ToggleButton,
112
- Go as ToggleSwitch,
113
- jo as Tooltip,
114
- tr as useBreakpoint,
115
- xr as useEventListeners,
116
- fr as useHandleEvent,
117
- ir as useResizeObserver
76
+ P as Drawer,
77
+ H as Hyperlink,
78
+ E as Icon,
79
+ z as IconButton,
80
+ G as Input,
81
+ rr as InteractiveCard,
82
+ j as LinkButton,
83
+ J as Loader,
84
+ K as LoaderLogo,
85
+ U as Logo,
86
+ W as MainTitle,
87
+ Y as MapPin,
88
+ _ as Modal,
89
+ oo as PasswordInput,
90
+ eo as PickerItem,
91
+ po as Radio,
92
+ mo as RadioButton,
93
+ ao as RadioButtonGroup,
94
+ no as Rating,
95
+ so as Search,
96
+ go as SearchInput,
97
+ To as SecondaryNavigation,
98
+ So as SegmentedControl,
99
+ Io as Select,
100
+ Co as Selection,
101
+ tr as SidebarNavigation,
102
+ Lo as Slider,
103
+ Zo as StaticBox,
104
+ $o as Stepper,
105
+ Ro as Tabs,
106
+ yo as Tag,
107
+ Po as Text,
108
+ Ho as TextInput,
109
+ Eo as Textarea,
110
+ zo as ThemeProvider,
111
+ Qo as Toast,
112
+ Vo as ToastMessage,
113
+ Go as ToggleButton,
114
+ jo as ToggleSwitch,
115
+ Jo as Tooltip,
116
+ xr as useBreakpoint,
117
+ fr as useEventListeners,
118
+ ir as useHandleEvent,
119
+ dr as useResizeObserver
118
120
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cupra/ui-react",
3
- "version": "1.0.1-canary.0",
3
+ "version": "2.0.0-canary.2",
4
4
  "description": "React components library",
5
5
  "author": "SEAT S.A.",
6
6
  "license": "SEAT S.A. Library EULA 1.0",
@@ -44,7 +44,7 @@
44
44
  "peerDependencies": {
45
45
  "react": ">= 18.3.1 < 20",
46
46
  "react-dom": ">= 18.3.1 < 20",
47
- "@cupra/ui-kit": "1.0.1-canary.0"
47
+ "@cupra/ui-kit": "1.1.0-canary.2"
48
48
  },
49
49
  "dependencies": {
50
50
  "styled-components": "^6.1.16"
@@ -66,7 +66,7 @@
66
66
  "storybook": "^8.6.15",
67
67
  "typescript": "^5.8.2",
68
68
  "vite": "^6.4.1",
69
- "@cupra/ui-kit": "1.0.1-canary.0"
69
+ "@cupra/ui-kit": "1.1.0-canary.2"
70
70
  },
71
71
  "scripts": {
72
72
  "build": "rm -rf dist && tsc --declaration --emitDeclarationOnly && vite build --emptyOutDir false",