@cupra/ui-react 1.0.0-canary.16 → 1.0.0-canary.17
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 +9 -3
- 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/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 +4 -3
- 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 +1 -1
- 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/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 +2 -1
- 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/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 +1 -1
- package/dist/components/SecondaryNavigation/SecondaryNavigation.js +2 -1
- 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 +1 -1
- package/dist/components/Tooltip/Tooltip.js +6 -5
- package/dist/hooks/useBreakpoint.js +13 -13
- package/package.json +17 -5
- 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,13 +1,14 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import "@cupra/ui-kit/react/ds-toast-message";
|
|
3
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
3
4
|
import "react";
|
|
4
5
|
import { useHandleEvent as n } from "../../hooks/useHandleEvent.js";
|
|
5
|
-
function
|
|
6
|
-
const { className: s, children:
|
|
7
|
-
"toast:remove":
|
|
6
|
+
function d(o) {
|
|
7
|
+
const { className: s, children: t, onClose: e, ...r } = o, { ref: a } = n({
|
|
8
|
+
"toast:remove": e
|
|
8
9
|
});
|
|
9
|
-
return /* @__PURE__ */ m("ds-toast-message-react", { ref: a, class: s, ...r, children:
|
|
10
|
+
return /* @__PURE__ */ m("ds-toast-message-react", { ref: a, class: s, ...r, children: t });
|
|
10
11
|
}
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
d as ToastMessage
|
|
13
14
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
|
-
import '@cupra/ui-kit/react';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-toggle-button';
|
|
3
3
|
import { type DsToggleButtonAttrs } from '@cupra/ui-kit/react/types/ds-toggle-button';
|
|
4
4
|
type ToggleButtonProps = DsToggleButtonAttrs & {
|
|
5
5
|
onChange?: (event: CustomEvent) => void;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
2
3
|
import "react";
|
|
3
4
|
import { useHandleEvent as n } from "../../hooks/useHandleEvent.js";
|
|
4
|
-
import "
|
|
5
|
-
function
|
|
5
|
+
import "@cupra/ui-kit/react/ds-toggle-button";
|
|
6
|
+
function c({ onChange: t, ...o }) {
|
|
6
7
|
const { ref: r } = n({ change: t });
|
|
7
8
|
return /* @__PURE__ */ e("ds-toggle-button-react", { ref: r, ...o });
|
|
8
9
|
}
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
c as ToggleButton
|
|
11
12
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ChangeEvent, type ReactElement } from 'react';
|
|
2
|
-
import '@cupra/ui-kit/react';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-toggle-switch';
|
|
3
3
|
import { DsToggleSwitchAttrs } from '@cupra/ui-kit/react/types/ds-toggle-switch';
|
|
4
4
|
type Children = JSX.Element | JSX.Element[] | string;
|
|
5
5
|
interface ToggleSwitchProps extends DsToggleSwitchAttrs {
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { jsxs as f, jsx as
|
|
1
|
+
import { jsxs as f, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
2
3
|
import "react";
|
|
3
4
|
import { useHandleEvent as c } from "../../hooks/useHandleEvent.js";
|
|
4
|
-
import "
|
|
5
|
-
function r({ label:
|
|
5
|
+
import "@cupra/ui-kit/react/ds-toggle-switch";
|
|
6
|
+
function r({ label: t, onChange: i, ...o }) {
|
|
6
7
|
const { ref: e } = c({ change: i });
|
|
7
8
|
return /* @__PURE__ */ f("ds-toggle-switch-react", { ref: e, ...o, children: [
|
|
8
|
-
|
|
9
|
+
t && /* @__PURE__ */ n("div", { slot: "label", children: t }),
|
|
9
10
|
o.children
|
|
10
11
|
] });
|
|
11
12
|
}
|
|
12
|
-
function l({ children:
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
function l({ children: t }) {
|
|
14
|
+
return /* @__PURE__ */ n("div", { slot: "off", children: t });
|
|
14
15
|
}
|
|
15
|
-
function s({ children:
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
function s({ children: t }) {
|
|
17
|
+
return /* @__PURE__ */ n("div", { slot: "on", children: t });
|
|
17
18
|
}
|
|
18
19
|
r.Off = l;
|
|
19
20
|
r.On = s;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
|
-
import '@cupra/ui-kit/react';
|
|
2
|
+
import '@cupra/ui-kit/react/ds-tooltip';
|
|
3
3
|
import { DsTooltipAttrs } from '@cupra/ui-kit/react/types/ds-tooltip';
|
|
4
4
|
type Children = JSX.Element | JSX.Element[] | string;
|
|
5
5
|
interface TooltipProps extends DsTooltipAttrs {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
2
3
|
import "react";
|
|
3
4
|
import { useHandleEvent as c } 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
|
-
const
|
|
6
|
+
import "@cupra/ui-kit/react/ds-tooltip";
|
|
7
|
+
const m = p.div`
|
|
7
8
|
display: flex;
|
|
8
9
|
align-items: center;
|
|
9
10
|
`;
|
|
10
|
-
function
|
|
11
|
+
function x({
|
|
11
12
|
children: o,
|
|
12
13
|
onClickCancelButton: r,
|
|
13
14
|
onClickConfirmButton: i,
|
|
@@ -17,8 +18,8 @@ function u({
|
|
|
17
18
|
"click-cancel-button": r,
|
|
18
19
|
"click-confirm-button": i
|
|
19
20
|
});
|
|
20
|
-
return /* @__PURE__ */ t("ds-tooltip-react", { ref: n, ...e, children: /* @__PURE__ */ t(
|
|
21
|
+
return /* @__PURE__ */ t("ds-tooltip-react", { ref: n, ...e, children: /* @__PURE__ */ t(m, { children: o }) });
|
|
21
22
|
}
|
|
22
23
|
export {
|
|
23
|
-
|
|
24
|
+
x as Tooltip
|
|
24
25
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { breakpoints as
|
|
1
|
+
import { breakpoints as a } from "@cupra/ui-kit/react/utils/breakpoints";
|
|
2
2
|
import { useState as m, useLayoutEffect as d } from "react";
|
|
3
|
-
const
|
|
3
|
+
const o = ["xs", "s", "m", "l", "xl", "xxl"];
|
|
4
4
|
function c() {
|
|
5
|
-
const
|
|
6
|
-
return
|
|
7
|
-
const r = `(min-width: ${
|
|
5
|
+
const n = {};
|
|
6
|
+
return o.forEach((s, t) => {
|
|
7
|
+
const r = `(min-width: ${a[s]}px)`;
|
|
8
8
|
let e = "";
|
|
9
|
-
if (t <
|
|
10
|
-
const i =
|
|
11
|
-
e = ` and (max-width: ${
|
|
9
|
+
if (t < o.length - 1) {
|
|
10
|
+
const i = o[t + 1];
|
|
11
|
+
e = ` and (max-width: ${a[i] - 1}px)`;
|
|
12
12
|
}
|
|
13
|
-
s
|
|
14
|
-
}),
|
|
13
|
+
n[s] = window.matchMedia(r + e);
|
|
14
|
+
}), n;
|
|
15
15
|
}
|
|
16
16
|
const p = () => {
|
|
17
|
-
const [
|
|
17
|
+
const [n, s] = m(() => {
|
|
18
18
|
const t = c();
|
|
19
19
|
let r = "";
|
|
20
20
|
return Object.keys(t).forEach((e) => {
|
|
@@ -24,7 +24,7 @@ const p = () => {
|
|
|
24
24
|
return d(() => {
|
|
25
25
|
const t = c(), r = Object.keys(t).map((e) => {
|
|
26
26
|
const i = (u) => {
|
|
27
|
-
u.matches &&
|
|
27
|
+
u.matches && s(e);
|
|
28
28
|
};
|
|
29
29
|
return t[e].addListener(i), () => {
|
|
30
30
|
t[e].removeListener(i);
|
|
@@ -35,7 +35,7 @@ const p = () => {
|
|
|
35
35
|
e();
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
-
}, []),
|
|
38
|
+
}, []), n;
|
|
39
39
|
};
|
|
40
40
|
export {
|
|
41
41
|
p as useBreakpoint
|
package/package.json
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cupra/ui-react",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
3
|
+
"version": "1.0.0-canary.17",
|
|
4
4
|
"description": "React components library",
|
|
5
5
|
"author": "SEAT S.A.",
|
|
6
6
|
"license": "SEAT S.A. Library EULA 1.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./*": {
|
|
16
|
+
"import": "./dist/components/*/*.js",
|
|
17
|
+
"types": "./dist/components/*/*.d.ts"
|
|
18
|
+
},
|
|
19
|
+
"./hooks/*": "./dist/hooks/*.js"
|
|
20
|
+
},
|
|
10
21
|
"files": [
|
|
11
22
|
"LICENSE",
|
|
12
23
|
"THIRD_PARTY_LICENSES.MD",
|
|
@@ -32,11 +43,11 @@
|
|
|
32
43
|
],
|
|
33
44
|
"peerDependencies": {
|
|
34
45
|
"react": ">= 18.3.1 < 20",
|
|
35
|
-
"react-dom": ">= 18.3.1 < 20"
|
|
46
|
+
"react-dom": ">= 18.3.1 < 20",
|
|
47
|
+
"@cupra/ui-kit": "1.0.0-canary.10"
|
|
36
48
|
},
|
|
37
49
|
"dependencies": {
|
|
38
|
-
"styled-components": "^6.1.16"
|
|
39
|
-
"@cupra/ui-kit": "1.0.0-canary.9"
|
|
50
|
+
"styled-components": "^6.1.16"
|
|
40
51
|
},
|
|
41
52
|
"devDependencies": {
|
|
42
53
|
"@storybook/addon-docs": "^8.6.14",
|
|
@@ -54,7 +65,8 @@
|
|
|
54
65
|
"shadow-dom-testing-library": "^1.0.0",
|
|
55
66
|
"storybook": "^8.6.14",
|
|
56
67
|
"typescript": "^5.8.2",
|
|
57
|
-
"vite": "^6.4.1"
|
|
68
|
+
"vite": "^6.4.1",
|
|
69
|
+
"@cupra/ui-kit": "1.0.0-canary.10"
|
|
58
70
|
},
|
|
59
71
|
"scripts": {
|
|
60
72
|
"build": "rm -rf dist && tsc --declaration --emitDeclarationOnly && vite build --emptyOutDir false",
|