@cupra/ui-react 1.0.0-canary.24 → 1.0.0-canary.25
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/dist/components/IconButton/IconButton.d.ts +1 -2
- package/dist/components/SecondaryNavigation/SecondaryNavigation.d.ts +5 -4
- package/dist/components/SecondaryNavigation/SecondaryNavigation.js +9 -9
- package/dist/components/Tooltip/Tooltip.d.ts +16 -8
- package/dist/components/Tooltip/Tooltip.js +23 -18
- package/dist/components/Tooltip/stories/CupraDiagonal.stories.d.ts +5 -0
- package/package.json +3 -3
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
2
|
import '@cupra/ui-kit/react/ds-icon-button';
|
|
3
3
|
import { type DsIconButtonAttrs } from '@cupra/ui-kit/react/types/ds-icon-button';
|
|
4
|
-
type IconButtonProps = DsIconButtonAttrs & {
|
|
4
|
+
export type IconButtonProps = DsIconButtonAttrs & {
|
|
5
5
|
className?: string;
|
|
6
6
|
onClick?: (event: CustomEvent) => void;
|
|
7
7
|
};
|
|
8
8
|
export declare function IconButton(props: IconButtonProps): ReactElement;
|
|
9
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsSecondaryNavigationAttrs } from '@cupra/ui-kit/react/types/ds-secondary-navigation';
|
|
2
|
-
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
import { type AnchorHTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
3
3
|
import '@cupra/ui-kit/react/ds-secondary-navigation';
|
|
4
4
|
type SecondaryNavigationProps = DsSecondaryNavigationAttrs & {
|
|
5
5
|
className?: string;
|
|
@@ -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,17 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import "@cupra/ui-kit/react/ds-secondary-navigation";
|
|
3
3
|
import "@cupra/ui-kit/react/utils/breakpoints";
|
|
4
4
|
import "react";
|
|
5
5
|
import { useHandleEvent as a } from "../../hooks/useHandleEvent.js";
|
|
6
|
-
function
|
|
7
|
-
const { className:
|
|
8
|
-
"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
|
|
9
9
|
});
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ n("ds-secondary-navigation-react", { ref: c, class: o, ...i, children: r });
|
|
11
11
|
}
|
|
12
|
-
const m = ({ children: t }) => /* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
|
|
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;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
e as SecondaryNavigation
|
|
17
17
|
};
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { type ReactElement } from 'react';
|
|
1
|
+
import { type HTMLAttributes, type ImgHTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
2
2
|
import '@cupra/ui-kit/react/ds-tooltip';
|
|
3
3
|
import { DsTooltipAttrs } from '@cupra/ui-kit/react/types/ds-tooltip';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
children:
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { type IconButtonProps } from '../IconButton/IconButton';
|
|
5
|
+
export type TooltipProps = DsTooltipAttrs & {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type CloseButtonProps = Omit<IconButtonProps, 'icon-name'>;
|
|
9
|
+
export declare function Tooltip({ children, ...restProps }: TooltipProps): ReactElement;
|
|
10
|
+
export declare namespace Tooltip {
|
|
11
|
+
var Header: ({ children, ...props }: {
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
} & HTMLAttributes<HTMLDivElement>) => JSX.Element;
|
|
14
|
+
var CloseButton: (props: CloseButtonProps) => ReactElement;
|
|
15
|
+
var Content: ({ children, ...props }: {
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
} & HTMLAttributes<HTMLDivElement>) => JSX.Element;
|
|
18
|
+
var Img: (props: ImgHTMLAttributes<HTMLImageElement>) => ReactElement;
|
|
9
19
|
}
|
|
10
|
-
export declare function Tooltip({ children, onClickCancelButton, onClickConfirmButton, ...restProps }: TooltipProps): ReactElement;
|
|
11
|
-
export {};
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import "@
|
|
3
|
-
import "react";
|
|
4
|
-
import { useHandleEvent as c } from "../../hooks/useHandleEvent.js";
|
|
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";
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import e 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";
|
|
6
3
|
import "@cupra/ui-kit/react/ds-tooltip";
|
|
7
|
-
|
|
4
|
+
import { IconButton as i } from "../IconButton/IconButton.js";
|
|
5
|
+
const c = e.div`
|
|
8
6
|
display: flex;
|
|
9
7
|
align-items: center;
|
|
10
8
|
`;
|
|
11
|
-
function
|
|
12
|
-
children: o,
|
|
13
|
-
onClickCancelButton: r,
|
|
14
|
-
onClickConfirmButton: i,
|
|
15
|
-
...e
|
|
16
|
-
}) {
|
|
17
|
-
const { ref: n } = c({
|
|
18
|
-
"click-cancel-button": r,
|
|
19
|
-
"click-confirm-button": i
|
|
20
|
-
});
|
|
21
|
-
return /* @__PURE__ */ t("ds-tooltip-react", { ref: n, ...e, children: /* @__PURE__ */ t(m, { children: o }) });
|
|
9
|
+
function r({ children: t, ...n }) {
|
|
10
|
+
return /* @__PURE__ */ o("ds-tooltip-react", { ...n, children: /* @__PURE__ */ o(c, { children: t }) });
|
|
22
11
|
}
|
|
12
|
+
function m({ children: t, ...n }) {
|
|
13
|
+
return /* @__PURE__ */ o("div", { slot: "header", ...n, children: t });
|
|
14
|
+
}
|
|
15
|
+
function u(t) {
|
|
16
|
+
return /* @__PURE__ */ o(i, { "icon-name": "cross", ...t });
|
|
17
|
+
}
|
|
18
|
+
function s({ children: t, ...n }) {
|
|
19
|
+
return /* @__PURE__ */ o("div", { slot: "content", ...n, children: t });
|
|
20
|
+
}
|
|
21
|
+
function l(t) {
|
|
22
|
+
return /* @__PURE__ */ o("img", { slot: "image", ...t });
|
|
23
|
+
}
|
|
24
|
+
r.Header = m;
|
|
25
|
+
r.CloseButton = u;
|
|
26
|
+
r.Content = s;
|
|
27
|
+
r.Img = l;
|
|
23
28
|
export {
|
|
24
|
-
|
|
29
|
+
r as Tooltip
|
|
25
30
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cupra/ui-react",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
3
|
+
"version": "1.0.0-canary.25",
|
|
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.0-canary.
|
|
47
|
+
"@cupra/ui-kit": "1.0.0-canary.15"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"styled-components": "^6.1.16"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"storybook": "^8.6.14",
|
|
67
67
|
"typescript": "^5.8.2",
|
|
68
68
|
"vite": "^6.4.1",
|
|
69
|
-
"@cupra/ui-kit": "1.0.0-canary.
|
|
69
|
+
"@cupra/ui-kit": "1.0.0-canary.15"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"build": "rm -rf dist && tsc --declaration --emitDeclarationOnly && vite build --emptyOutDir false",
|