@cupra/ui-react 1.0.0-canary.9 → 1.0.1-canary.0
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 +11 -5
- package/THIRD_PARTY_LICENSES.MD +0 -46
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +8 -7
- package/dist/components/Badge/Badge.d.ts +7 -0
- package/dist/components/Badge/Badge.js +8 -0
- package/dist/components/Badge/stories/CupraDiagonal.stories.d.ts +8 -0
- package/dist/components/Bullets/Bullets.d.ts +1 -1
- package/dist/components/Bullets/Bullets.js +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +7 -6
- package/dist/components/CarouselIndicator/CarouselIndicator.d.ts +1 -1
- package/dist/components/CarouselIndicator/CarouselIndicator.js +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +7 -6
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Chips/Chips.d.ts +1 -1
- package/dist/components/Chips/Chips.js +7 -6
- package/dist/components/Currency/Currency.d.ts +1 -1
- package/dist/components/Currency/Currency.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +10 -10
- package/dist/components/DialogBody/DialogBody.d.ts +1 -1
- package/dist/components/DialogBody/DialogBody.js +1 -1
- package/dist/components/DialogFooter/DialogFooter.d.ts +1 -1
- package/dist/components/DialogFooter/DialogFooter.js +1 -1
- package/dist/components/DialogHeader/DialogHeader.d.ts +1 -1
- package/dist/components/DialogHeader/DialogHeader.js +1 -1
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Hyperlink/Hyperlink.d.ts +1 -1
- package/dist/components/Hyperlink/Hyperlink.js +6 -5
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/IconButton/IconButton.d.ts +2 -3
- package/dist/components/IconButton/IconButton.js +7 -6
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/InteractiveCard/InteractiveCard.d.ts +1 -1
- package/dist/components/InteractiveCard/InteractiveCard.js +5 -4
- package/dist/components/LinkButton/LinkButton.d.ts +1 -1
- package/dist/components/LinkButton/LinkButton.js +4 -3
- package/dist/components/Loader/Loader.d.ts +4 -1
- package/dist/components/Loader/Loader.js +16 -13
- package/dist/components/Logo/Logo.d.ts +1 -1
- package/dist/components/Logo/Logo.js +1 -1
- package/dist/components/MainTitle/MainTitle.d.ts +17 -0
- package/dist/components/MainTitle/MainTitle.js +19 -0
- package/dist/components/MainTitle/stories/CupraDiagonal.stories.d.ts +9 -0
- package/dist/components/MapPin/MapPin.d.ts +1 -1
- package/dist/components/MapPin/MapPin.js +8 -7
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.js +15 -13
- package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +18 -17
- package/dist/components/PickerItem/PickerItem.d.ts +1 -1
- package/dist/components/PickerItem/PickerItem.js +1 -1
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/Radio/Radio.js +7 -6
- package/dist/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.js +1 -1
- package/dist/components/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
- package/dist/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/dist/components/Rating/Rating.d.ts +8 -0
- package/dist/components/Rating/Rating.js +9 -0
- package/dist/components/Rating/stories/CupraDiagonal.stories.d.ts +10 -0
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Search/Search.js +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/SearchInput/SearchInput.js +8 -7
- package/dist/components/SecondaryNavigation/SecondaryNavigation.d.ts +6 -5
- package/dist/components/SecondaryNavigation/SecondaryNavigation.js +11 -10
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +8 -7
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Selection/Selection.d.ts +1 -1
- package/dist/components/Selection/Selection.js +1 -1
- package/dist/components/SidebarNavigation/SidebarNavigation.d.ts +1 -1
- package/dist/components/SidebarNavigation/SidebarNavigation.js +1 -1
- package/dist/components/Slider/Slider.d.ts +2 -2
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/StaticBox/StaticBox.d.ts +1 -1
- package/dist/components/StaticBox/StaticBox.js +7 -6
- package/dist/components/Stepper/Stepper.d.ts +1 -1
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.js +11 -10
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.js +8 -7
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/TextInput/TextInput.d.ts +1 -1
- package/dist/components/TextInput/TextInput.js +15 -14
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/components/Textarea/Textarea.js +4 -3
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/dist/components/ThemeProvider/ThemeProvider.js +1 -1
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/ToastMessage/ToastMessage.d.ts +1 -1
- package/dist/components/ToastMessage/ToastMessage.js +7 -6
- package/dist/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/dist/components/ToggleButton/ToggleButton.js +4 -3
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.js +9 -8
- package/dist/components/Tooltip/Tooltip.d.ts +30 -10
- package/dist/components/Tooltip/Tooltip.js +13 -22
- package/dist/components/Tooltip/stories/CupraDiagonal.stories.d.ts +5 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/hooks/useBreakpoint.js +13 -13
- package/dist/hooks/useHandleEvent.js +16 -16
- package/dist/index.js +109 -103
- package/package.json +18 -6
- package/dist/packages/ui-kit/dist-react/index.js +0 -9226
- package/dist/packages/ui-kit/dist-react/utils/breakpoints.js +0 -11
- package/dist/packages/ui-kit/dist-react/utils/debounce.js +0 -11
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/ds-loader-bar";
|
|
3
|
+
import "@cupra/ui-kit/react/ds-loader-dots";
|
|
4
|
+
import "@cupra/ui-kit/react/ds-loader-logo";
|
|
5
|
+
import "@cupra/ui-kit/react/ds-loader-spinner";
|
|
6
6
|
function t(r) {
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ o("ds-loader-logo-react", { ...r });
|
|
8
|
+
}
|
|
9
|
+
function e(r) {
|
|
10
|
+
return /* @__PURE__ */ o("ds-loader-bar-react", { ...r });
|
|
8
11
|
}
|
|
9
12
|
function n(r) {
|
|
10
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ o("ds-loader-dots-react", { ...r });
|
|
11
14
|
}
|
|
12
15
|
function d(r) {
|
|
13
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ o("ds-loader-spinner-react", { ...r, children: r.text && /* @__PURE__ */ o("div", { slot: "text", children: r.text }) });
|
|
14
17
|
}
|
|
15
|
-
const
|
|
16
|
-
Logo:
|
|
17
|
-
Bar:
|
|
18
|
+
const u = {
|
|
19
|
+
Logo: t,
|
|
20
|
+
Bar: e,
|
|
18
21
|
Dots: n,
|
|
19
22
|
Spinner: d
|
|
20
23
|
};
|
|
21
24
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
u as Loader,
|
|
26
|
+
t as LoaderLogo
|
|
24
27
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import "@cupra/ui-kit/react/ds-logo";
|
|
3
3
|
function a(o) {
|
|
4
4
|
const { className: r, children: c, ...s } = o;
|
|
5
5
|
return /* @__PURE__ */ t("ds-logo-react", { class: r, ...s });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DsMainTitleAttrs } from '@cupra/ui-kit/react/types/ds-main-title';
|
|
2
|
+
import { type ElementType, type HTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
3
|
+
import '@cupra/ui-kit/react/ds-main-title';
|
|
4
|
+
type MainTitleSubProps = HTMLAttributes<HTMLElement> & {
|
|
5
|
+
as: ElementType;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
type MainTitleProps = DsMainTitleAttrs & {
|
|
9
|
+
className?: string;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export declare function MainTitle(props: MainTitleProps): ReactElement;
|
|
13
|
+
export declare namespace MainTitle {
|
|
14
|
+
var Title: (props: MainTitleSubProps) => ReactElement;
|
|
15
|
+
var Description: (props: MainTitleSubProps) => ReactElement;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/ds-main-title";
|
|
3
|
+
function n(t) {
|
|
4
|
+
const { className: r, children: i, ...o } = t;
|
|
5
|
+
return /* @__PURE__ */ e("ds-main-title-react", { class: r, ...o, children: i });
|
|
6
|
+
}
|
|
7
|
+
function s(t) {
|
|
8
|
+
const { as: r, children: i, ...o } = t;
|
|
9
|
+
return /* @__PURE__ */ e(r, { slot: "title", ...o, children: i });
|
|
10
|
+
}
|
|
11
|
+
function c(t) {
|
|
12
|
+
const { as: r, children: i, ...o } = t;
|
|
13
|
+
return /* @__PURE__ */ e(r, { slot: "description", ...o, children: i });
|
|
14
|
+
}
|
|
15
|
+
n.Title = s;
|
|
16
|
+
n.Description = c;
|
|
17
|
+
export {
|
|
18
|
+
n as MainTitle
|
|
19
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MainTitle } from '../MainTitle';
|
|
3
|
+
declare const meta: Meta<typeof MainTitle>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof MainTitle>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const SemanticH1: Story;
|
|
8
|
+
export declare const CustomTags: Story;
|
|
9
|
+
export declare const TitleOnly: Story;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
|
-
import '@cupra/ui-kit/react';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-map-pin';
|
|
3
3
|
import { type DsMapPinAttrs } from '@cupra/ui-kit/react/types/ds-map-pin';
|
|
4
4
|
type MapPinProps = DsMapPinAttrs & {
|
|
5
5
|
onChange?: (event: CustomEvent) => void;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
2
3
|
import "react";
|
|
3
|
-
import { useHandleEvent as
|
|
4
|
-
import "
|
|
5
|
-
function
|
|
6
|
-
const { ref:
|
|
7
|
-
return /* @__PURE__ */
|
|
4
|
+
import { useHandleEvent as p } from "../../hooks/useHandleEvent.js";
|
|
5
|
+
import "@cupra/ui-kit/react/ds-map-pin";
|
|
6
|
+
function f({ onChange: r, ...t }) {
|
|
7
|
+
const { ref: o } = p({ change: r });
|
|
8
|
+
return /* @__PURE__ */ n("ds-map-pin-react", { ref: o, ...t });
|
|
8
9
|
}
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
f as MapPin
|
|
11
12
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
|
-
import '@cupra/ui-kit/react';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-modal';
|
|
3
3
|
import { DsModalAttrs } from '@cupra/ui-kit/react/types/ds-modal';
|
|
4
4
|
type Children = JSX.Element | JSX.Element[] | string;
|
|
5
5
|
interface ModalProps extends DsModalAttrs {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
2
3
|
import "react";
|
|
3
4
|
import { useHandleEvent as f } from "../../hooks/useHandleEvent.js";
|
|
4
5
|
import p from "../../node_modules/.pnpm/styled-components@6.1.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/styled-components/dist/styled-components.browser.esm.js";
|
|
5
|
-
import "
|
|
6
|
+
import "@cupra/ui-kit/react/ds-modal";
|
|
7
|
+
import { createPortal as C } from "react-dom";
|
|
6
8
|
function e() {
|
|
7
9
|
}
|
|
8
|
-
const
|
|
10
|
+
const k = p.div`
|
|
9
11
|
margin: 0;
|
|
10
12
|
width: 100%;
|
|
11
13
|
height: 100%;
|
|
@@ -20,8 +22,8 @@ function l(t) {
|
|
|
20
22
|
onClickCloseButton: i = e,
|
|
21
23
|
onClickConfirmButton: s = e,
|
|
22
24
|
onClickCancelButton: u = e,
|
|
23
|
-
className:
|
|
24
|
-
withPortal:
|
|
25
|
+
className: m,
|
|
26
|
+
withPortal: a,
|
|
25
27
|
...r
|
|
26
28
|
} = t, { ref: d } = f({
|
|
27
29
|
"click-close-button": i,
|
|
@@ -29,21 +31,21 @@ function l(t) {
|
|
|
29
31
|
"click-cancel-button": u
|
|
30
32
|
});
|
|
31
33
|
if (!r.open) return null;
|
|
32
|
-
const c = /* @__PURE__ */ n("ds-modal-react", { ref: d, class:
|
|
33
|
-
return
|
|
34
|
+
const c = /* @__PURE__ */ n("ds-modal-react", { ref: d, class: m, ...r, children: o });
|
|
35
|
+
return a ? C(c, document.body) : c;
|
|
34
36
|
}
|
|
35
|
-
function
|
|
37
|
+
function b({ children: t }) {
|
|
36
38
|
return /* @__PURE__ */ n("div", { slot: "title", children: t });
|
|
37
39
|
}
|
|
38
|
-
function
|
|
40
|
+
function h({ className: t = "", children: o }) {
|
|
39
41
|
return /* @__PURE__ */ n("div", { slot: "content", className: `ds-scroll ${t}`.trim(), children: o });
|
|
40
42
|
}
|
|
41
|
-
function
|
|
42
|
-
return /* @__PURE__ */ n(
|
|
43
|
+
function v({ children: t }) {
|
|
44
|
+
return /* @__PURE__ */ n(k, { slot: "content", children: t });
|
|
43
45
|
}
|
|
44
|
-
l.Title =
|
|
45
|
-
l.Content =
|
|
46
|
-
l.FullScreenContent =
|
|
46
|
+
l.Title = b;
|
|
47
|
+
l.Content = h;
|
|
48
|
+
l.FullScreenContent = v;
|
|
47
49
|
export {
|
|
48
50
|
l as Modal
|
|
49
51
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DsPasswordInputAttrs } from '@cupra/ui-kit/react/types/ds-password-input';
|
|
2
2
|
import { type ReactElement } from 'react';
|
|
3
|
-
import '@cupra/ui-kit/react';
|
|
3
|
+
import '@cupra/ui-kit/react/ds-password-input';
|
|
4
4
|
type PasswordInputProps = DsPasswordInputAttrs & {
|
|
5
5
|
className?: string;
|
|
6
6
|
onChange?: (event: typeof InputEvent) => void;
|
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
import { jsxs as x, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import "@cupra/ui-kit/react/ds-password-input";
|
|
3
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
3
4
|
import "react";
|
|
4
5
|
import { useHandleEvent as b } from "../../hooks/useHandleEvent.js";
|
|
5
|
-
function
|
|
6
|
+
function L(l) {
|
|
6
7
|
const {
|
|
7
8
|
className: d,
|
|
8
9
|
children: w,
|
|
9
10
|
onChange: c,
|
|
10
11
|
onInput: u,
|
|
11
12
|
inputId: e,
|
|
12
|
-
placeHolder:
|
|
13
|
-
value:
|
|
14
|
-
label:
|
|
15
|
-
required:
|
|
13
|
+
placeHolder: r,
|
|
14
|
+
value: t,
|
|
15
|
+
label: m,
|
|
16
|
+
required: n,
|
|
16
17
|
disabled: o,
|
|
17
|
-
pattern:
|
|
18
|
-
maxLength:
|
|
18
|
+
pattern: p,
|
|
19
|
+
maxLength: s,
|
|
19
20
|
minLength: a,
|
|
20
|
-
...
|
|
21
|
+
...h
|
|
21
22
|
} = l, { ref: f } = b({ change: c, input: u }), g = {
|
|
22
23
|
type: "password",
|
|
23
24
|
...!!e && { id: e },
|
|
24
|
-
...!!
|
|
25
|
-
...!!
|
|
26
|
-
...!!
|
|
25
|
+
...!!r && { placeholder: r },
|
|
26
|
+
...!!t && { value: t },
|
|
27
|
+
...!!n && { required: n },
|
|
27
28
|
...!!o && { disabled: o },
|
|
28
29
|
...!!a && { minLength: a },
|
|
29
|
-
...!!
|
|
30
|
-
...!!
|
|
30
|
+
...!!s && { maxLength: s },
|
|
31
|
+
...!!p && { pattern: p }
|
|
31
32
|
};
|
|
32
|
-
return /* @__PURE__ */ x("ds-password-input-react", { ref: f, class: d, ...
|
|
33
|
-
/* @__PURE__ */ i("label", { htmlFor: e, children:
|
|
33
|
+
return /* @__PURE__ */ x("ds-password-input-react", { ref: f, class: d, ...h, children: [
|
|
34
|
+
/* @__PURE__ */ i("label", { htmlFor: e, children: m }),
|
|
34
35
|
/* @__PURE__ */ i("input", { ...g })
|
|
35
36
|
] });
|
|
36
37
|
}
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
+
L as PasswordInput
|
|
39
40
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import '@cupra/ui-kit/react';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-picker-item';
|
|
3
3
|
import type { DsPickerItemAttrs } from '@cupra/ui-kit/react/types/ds-picker-item';
|
|
4
4
|
type PickerItemProps = DsPickerItemAttrs & {
|
|
5
5
|
className?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import "@cupra/ui-kit/react/ds-picker-item";
|
|
3
3
|
import { useHandleEvent as m } from "../../hooks/useHandleEvent.js";
|
|
4
4
|
function a(r) {
|
|
5
5
|
const { className: i, children: t, onClick: s, size: e, ...c } = r, { ref: o } = m({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
|
-
import '@cupra/ui-kit/react';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-radio';
|
|
3
3
|
import { DsRadioAttrs } from '@cupra/ui-kit/react/types/ds-radio';
|
|
4
4
|
import { DsRadioGroupAttrs } from '@cupra/ui-kit/react/types/ds-radio-group';
|
|
5
5
|
type Children = JSX.Element | JSX.Element[] | string;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
2
3
|
import "react";
|
|
3
4
|
import { useHandleEvent as e } from "../../hooks/useHandleEvent.js";
|
|
4
|
-
import "
|
|
5
|
-
const
|
|
5
|
+
import "@cupra/ui-kit/react/ds-radio";
|
|
6
|
+
const i = ({ children: o, onChange: r, className: t, ...a }) => {
|
|
6
7
|
const { ref: n } = e({ change: r });
|
|
7
8
|
return /* @__PURE__ */ s("ds-radio-group-react", { ref: n, class: t, ...a, children: o });
|
|
8
|
-
},
|
|
9
|
-
Group:
|
|
10
|
-
Button:
|
|
9
|
+
}, c = ({ children: o, className: r, ...t }) => /* @__PURE__ */ s("ds-radio-react", { class: r, ...t, children: o }), l = {
|
|
10
|
+
Group: i,
|
|
11
|
+
Button: c
|
|
11
12
|
};
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
l as Radio
|
|
14
15
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DsRadioButtonAttrs } from '@cupra/ui-kit/react/types/ds-radio-button';
|
|
2
2
|
import { type ReactElement } from 'react';
|
|
3
|
-
import '@cupra/ui-kit/react';
|
|
3
|
+
import '@cupra/ui-kit/react/ds-radio-button';
|
|
4
4
|
type RadioButtonProps = DsRadioButtonAttrs & {
|
|
5
5
|
onChange?: (event: CustomEvent) => void;
|
|
6
6
|
className?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import "@cupra/ui-kit/react/ds-radio-button";
|
|
3
3
|
import { useHandleEvent as c } from "../../hooks/useHandleEvent.js";
|
|
4
4
|
function p(o) {
|
|
5
5
|
const { className: t, children: r, onChange: n, ...e } = o, { ref: s } = c({ change: n });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DsRadioButtonGroupAttrs } from '@cupra/ui-kit/react/types/ds-radio-button-group';
|
|
2
2
|
import { type ReactElement, type ReactNode } from 'react';
|
|
3
|
-
import '@cupra/ui-kit/react';
|
|
3
|
+
import '@cupra/ui-kit/react/ds-radio-button-group';
|
|
4
4
|
export type RadioButtonGroupProps = DsRadioButtonGroupAttrs & {
|
|
5
5
|
onChange?: (event: CustomEvent) => void;
|
|
6
6
|
className?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import "@cupra/ui-kit/react/ds-radio-button-group";
|
|
3
3
|
import { useHandleEvent as c } from "../../hooks/useHandleEvent.js";
|
|
4
4
|
function m(o) {
|
|
5
5
|
const { className: r, children: t, onChange: n, ...e } = o, { ref: s } = c({ change: n });
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-rating';
|
|
3
|
+
import type { DsRatingAttrs } from '@cupra/ui-kit/react/types/ds-rating';
|
|
4
|
+
type RatingProps = DsRatingAttrs & {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function Rating(props: RatingProps): ReactElement;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
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 Default: Story;
|
|
6
|
+
export declare const FullFive: Story;
|
|
7
|
+
export declare const RoundDownExample: Story;
|
|
8
|
+
export declare const HalfStarExample: Story;
|
|
9
|
+
export declare const NoRatingText: Story;
|
|
10
|
+
export declare const Disabled: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DsSearchAttrs } from '@cupra/ui-kit/react/types/ds-search';
|
|
2
2
|
import { type ChangeEvent } from 'react';
|
|
3
|
-
import '@cupra/ui-kit/react';
|
|
3
|
+
import '@cupra/ui-kit/react/ds-search';
|
|
4
4
|
type SearchProps = DsSearchAttrs & {
|
|
5
5
|
className?: string;
|
|
6
6
|
onInput?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as t } from "react";
|
|
3
|
-
import "
|
|
3
|
+
import "@cupra/ui-kit/react/ds-search";
|
|
4
4
|
const c = t(({ onInput: r, className: a, ...e }, o) => /* @__PURE__ */ s("ds-search-react", { ref: o, class: a, onInput: r, ...e }));
|
|
5
5
|
c.displayName = "Search";
|
|
6
6
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DsSearchInputAttrs } from '@cupra/ui-kit/react/types/ds-search-input';
|
|
2
2
|
import { type ReactElement } from 'react';
|
|
3
|
-
import '@cupra/ui-kit/react';
|
|
3
|
+
import '@cupra/ui-kit/react/ds-search-input';
|
|
4
4
|
type SearchInputProps = DsSearchInputAttrs & {
|
|
5
5
|
className?: string;
|
|
6
6
|
onChange?: (event: typeof InputEvent) => void;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import "@cupra/ui-kit/react/ds-search-input";
|
|
3
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
3
4
|
import "react";
|
|
4
5
|
import { useHandleEvent as g } from "../../hooks/useHandleEvent.js";
|
|
5
|
-
function
|
|
6
|
+
function I(e) {
|
|
6
7
|
const {
|
|
7
8
|
className: n,
|
|
8
9
|
children: x,
|
|
9
10
|
onChange: r,
|
|
10
11
|
onInput: o,
|
|
11
12
|
onClickPositionButton: i,
|
|
12
|
-
placeHolder:
|
|
13
|
+
placeHolder: p,
|
|
13
14
|
type: P,
|
|
14
|
-
value:
|
|
15
|
+
value: a,
|
|
15
16
|
label: c,
|
|
16
17
|
required: l,
|
|
17
18
|
disabled: s,
|
|
@@ -30,8 +31,8 @@ function H(e) {
|
|
|
30
31
|
{
|
|
31
32
|
type: "text",
|
|
32
33
|
"aria-label": c,
|
|
33
|
-
placeholder:
|
|
34
|
-
value:
|
|
34
|
+
placeholder: p,
|
|
35
|
+
value: a,
|
|
35
36
|
required: l,
|
|
36
37
|
disabled: s,
|
|
37
38
|
minLength: d,
|
|
@@ -42,5 +43,5 @@ function H(e) {
|
|
|
42
43
|
) });
|
|
43
44
|
}
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
I as SearchInput
|
|
46
47
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DsSecondaryNavigationAttrs } from '@cupra/ui-kit/react/types/ds-secondary-navigation';
|
|
2
|
-
import { type ReactElement, type ReactNode } from 'react';
|
|
3
|
-
import '@cupra/ui-kit/react';
|
|
2
|
+
import { type AnchorHTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
3
|
+
import '@cupra/ui-kit/react/ds-secondary-navigation';
|
|
4
4
|
type SecondaryNavigationProps = DsSecondaryNavigationAttrs & {
|
|
5
5
|
className?: string;
|
|
6
6
|
children?: ReactNode;
|
|
@@ -8,11 +8,12 @@ type SecondaryNavigationProps = DsSecondaryNavigationAttrs & {
|
|
|
8
8
|
};
|
|
9
9
|
export declare function SecondaryNavigation(props: SecondaryNavigationProps): ReactElement;
|
|
10
10
|
export declare namespace SecondaryNavigation {
|
|
11
|
-
var
|
|
12
|
-
children: ReactNode;
|
|
13
|
-
}) => ReactElement;
|
|
11
|
+
var Item: ({ children, ...rest }: ItemProps) => ReactElement;
|
|
14
12
|
var Actions: ({ children }: {
|
|
15
13
|
children: ReactNode;
|
|
16
14
|
}) => ReactElement;
|
|
17
15
|
}
|
|
16
|
+
type ItemProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
};
|
|
18
19
|
export {};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/ds-secondary-navigation";
|
|
3
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
3
4
|
import "react";
|
|
4
5
|
import { useHandleEvent as a } from "../../hooks/useHandleEvent.js";
|
|
5
|
-
function
|
|
6
|
-
const { className:
|
|
7
|
-
"ds-secondary-navigation:select":
|
|
6
|
+
function e(t) {
|
|
7
|
+
const { className: o, children: r, onSelect: s, ...i } = t, { ref: c } = a({
|
|
8
|
+
"ds-secondary-navigation:select": s
|
|
8
9
|
});
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ n("ds-secondary-navigation-react", { ref: c, class: o, ...i, children: r });
|
|
10
11
|
}
|
|
11
|
-
const m = ({ children: t }) => /* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const m = ({ children: t, ...o }) => /* @__PURE__ */ n("a", { slot: "items", ...o, children: t }), d = ({ children: t }) => /* @__PURE__ */ n("div", { slot: "actions", children: t });
|
|
13
|
+
e.Item = m;
|
|
14
|
+
e.Actions = d;
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
e as SecondaryNavigation
|
|
16
17
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DsSegmentedControlAttrs } from '@cupra/ui-kit/react/types/ds-segmented-control';
|
|
2
2
|
import { type ReactElement } from 'react';
|
|
3
|
-
import '@cupra/ui-kit/react';
|
|
3
|
+
import '@cupra/ui-kit/react/ds-segmented-control';
|
|
4
4
|
type SegmentedControlProps = DsSegmentedControlAttrs & {
|
|
5
5
|
onChange?: (event: CustomEvent) => void;
|
|
6
6
|
className?: string;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/ds-segmented-control";
|
|
3
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
3
4
|
import "react";
|
|
4
|
-
import { useHandleEvent as
|
|
5
|
-
function
|
|
6
|
-
const { onChange: o, className: r, children: t, ...n } = e, { ref: s } =
|
|
7
|
-
return /* @__PURE__ */
|
|
5
|
+
import { useHandleEvent as c } from "../../hooks/useHandleEvent.js";
|
|
6
|
+
function f(e) {
|
|
7
|
+
const { onChange: o, className: r, children: t, ...n } = e, { ref: s } = c({ change: o });
|
|
8
|
+
return /* @__PURE__ */ m("ds-segmented-control-react", { ref: s, class: r, ...n, children: t });
|
|
8
9
|
}
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
f as SegmentedControl
|
|
11
12
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
|
-
import '@cupra/ui-kit/react';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-select';
|
|
3
3
|
import { DsSelectAttrs } from '@cupra/ui-kit/react/types/ds-select';
|
|
4
4
|
type Children = JSX.Element | JSX.Element[] | string;
|
|
5
5
|
interface SelectProps extends DsSelectAttrs {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DsSelectionAttrs } from '@cupra/ui-kit/react/types/ds-selection';
|
|
2
2
|
import { type ReactElement } from 'react';
|
|
3
|
-
import '@cupra/ui-kit/react';
|
|
3
|
+
import '@cupra/ui-kit/react/ds-selection';
|
|
4
4
|
type SelectionProps = DsSelectionAttrs & {
|
|
5
5
|
className?: string;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import "@cupra/ui-kit/react/ds-selection";
|
|
3
3
|
function i(e) {
|
|
4
4
|
const { className: o, children: s, ...r } = e;
|
|
5
5
|
return /* @__PURE__ */ t("ds-selection-react", { class: o, ...r });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsSidebarNavigationAttrs } from '@cupra/ui-kit/react/types/ds-sidebar-navigation';
|
|
2
|
-
import '@cupra/ui-kit/react';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-sidebar-navigation';
|
|
3
3
|
import { type ReactElement, type ReactNode } from 'react';
|
|
4
4
|
export type SidebarNavigationProps = DsSidebarNavigationAttrs & {
|
|
5
5
|
className?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import "@cupra/ui-kit/react/ds-sidebar-navigation";
|
|
3
3
|
function s(t) {
|
|
4
4
|
const { className: i, children: r, ...n } = t;
|
|
5
5
|
return /* @__PURE__ */ e("ds-sidebar-navigation-react", { class: i, ...n, children: r });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
|
-
import '@cupra/ui-kit/react';
|
|
3
|
-
import { DsSliderAttrs } from '@cupra/ui-kit/
|
|
2
|
+
import '@cupra/ui-kit/react/ds-slider';
|
|
3
|
+
import { DsSliderAttrs } from '@cupra/ui-kit/react/types/ds-slider';
|
|
4
4
|
type SliderProps = DsSliderAttrs & {
|
|
5
5
|
className?: string;
|
|
6
6
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import '@cupra/ui-kit/react';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-static-box';
|
|
3
3
|
import type { DsStaticBoxAttrs } from '@cupra/ui-kit/react/types/ds-static-box';
|
|
4
4
|
type StaticBoxProps = DsStaticBoxAttrs & {
|
|
5
5
|
className?: string;
|