@cupra/ui-react 2.0.0-canary.20 → 2.0.0-canary.22
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/cjs/components/ListItem/ListItem.cjs +1 -1
- package/dist/esm/components/ListItem/ListItem.js +9 -4
- package/dist/types/components/Button/stories/CupraDiagonal.stories.d.ts +3 -3
- package/dist/types/components/IconButton/stories/CupraDiagonal.stories.d.ts +1 -1
- package/dist/types/components/List/stories/CupraDiagonal.stories.d.ts +14 -7
- package/dist/types/components/ListItem/ListItem.d.ts +3 -1
- package/dist/types/components/ListItem/stories/CupraDiagonal.stories.d.ts +2 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-list-item");const c=require("../Divider/Divider.cjs");function o({className:r,children:s,selected:n,disabled:d,variant:t,...u}){const e={...u};return t&&(e.variant=t),n&&(e.selected=!0),d&&(e.disabled=!0),i.jsxs("div",{style:{width:"fit-content"},children:[i.jsx("ds-list-item-react",{className:r,...e,children:s}),t!=="info"&&i.jsx(c.Divider,{})]})}exports.ListItem=o;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "@cupra/ui-kit/react/ds-list-item";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { Divider as n } from "../Divider/Divider.js";
|
|
4
|
+
function u({ className: r, children: s, selected: o, disabled: d, variant: i, ...f }) {
|
|
5
|
+
const t = { ...f };
|
|
6
|
+
return i && (t.variant = i), o && (t.selected = !0), d && (t.disabled = !0), /* @__PURE__ */ m("div", { style: { width: "fit-content" }, children: [
|
|
7
|
+
/* @__PURE__ */ e("ds-list-item-react", { className: r, ...t, children: s }),
|
|
8
|
+
i !== "info" && /* @__PURE__ */ e(n, {})
|
|
9
|
+
] });
|
|
5
10
|
}
|
|
6
11
|
export {
|
|
7
|
-
|
|
12
|
+
u as ListItem
|
|
8
13
|
};
|
|
@@ -5,14 +5,14 @@ type Story = StoryObj;
|
|
|
5
5
|
export declare const Primary: Story;
|
|
6
6
|
export declare const Secondary: Story;
|
|
7
7
|
export declare const Tertiary: Story;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const Naked: Story;
|
|
9
9
|
export declare const PrimaryDestructive: Story;
|
|
10
10
|
export declare const SecondaryDestructive: Story;
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const NakedDestructive: Story;
|
|
12
12
|
export declare const PrimaryDisabled: Story;
|
|
13
13
|
export declare const SecondaryDisabled: Story;
|
|
14
14
|
export declare const TertiaryDisabled: Story;
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const NakedDisabled: Story;
|
|
16
16
|
export declare const Medium: Story;
|
|
17
17
|
export declare const Small: Story;
|
|
18
18
|
export declare const CustomWithAnchorChildren: Story;
|
|
@@ -6,7 +6,7 @@ export declare const Primary: Story;
|
|
|
6
6
|
export declare const Secondary: Story;
|
|
7
7
|
export declare const Tertiary: Story;
|
|
8
8
|
export declare const Quaternary: Story;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const Naked: Story;
|
|
10
10
|
export declare const Rounded: Story;
|
|
11
11
|
export declare const Disabled: Story;
|
|
12
12
|
export declare const Medium: Story;
|
|
@@ -5,10 +5,17 @@ type ListArgs = {
|
|
|
5
5
|
declare const meta: Meta<ListArgs>;
|
|
6
6
|
export default meta;
|
|
7
7
|
type Story = StoryObj<ListArgs>;
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
8
|
+
export declare const SelectionListCheckboxMedium: Story;
|
|
9
|
+
export declare const SelectionListCheckboxSmall: Story;
|
|
10
|
+
export declare const SelectionListRadioButtonMedium: Story;
|
|
11
|
+
export declare const SelectionListRadioButtonSmall: Story;
|
|
12
|
+
export declare const SelectionListSwitchMedium: Story;
|
|
13
|
+
export declare const SelectionListSwitchSmall: Story;
|
|
14
|
+
export declare const ActionListIconMedium: Story;
|
|
15
|
+
export declare const ActionListIconSmall: Story;
|
|
16
|
+
export declare const ActionListImageSquareMedium: Story;
|
|
17
|
+
export declare const ActionListImageSquareSmall: Story;
|
|
18
|
+
export declare const ActionListImageWideMedium: Story;
|
|
19
|
+
export declare const ActionListImageWideSmall: Story;
|
|
20
|
+
export declare const InfoListMedium: Story;
|
|
21
|
+
export declare const InfoListSmall: Story;
|
|
@@ -4,5 +4,7 @@ import '@cupra/ui-kit/react/ds-list-item';
|
|
|
4
4
|
export interface ListItemProps extends DsListItemAttrs {
|
|
5
5
|
className?: string;
|
|
6
6
|
children?: ReactNode;
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
7
9
|
}
|
|
8
|
-
export declare function ListItem({ className, children, ...rest }: ListItemProps): ReactElement;
|
|
10
|
+
export declare function ListItem({ className, children, selected, disabled, variant, ...rest }: ListItemProps): ReactElement;
|
|
@@ -15,6 +15,8 @@ export declare const SelectionSwitchListItemMedium: Story;
|
|
|
15
15
|
export declare const SelectionSwitchListItemSmall: Story;
|
|
16
16
|
export declare const ActionIconListItemMedium: Story;
|
|
17
17
|
export declare const ActionIconListItemSmall: Story;
|
|
18
|
+
export declare const ActionImageSquareListItemMedium: Story;
|
|
19
|
+
export declare const ActionImageSquareListItemSmall: Story;
|
|
18
20
|
export declare const ActionImageWideListItemMedium: Story;
|
|
19
21
|
export declare const ActionImageWideListItemSmall: Story;
|
|
20
22
|
export declare const InfoListItemMedium: Story;
|
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.22",
|
|
4
4
|
"description": "React components library",
|
|
5
5
|
"author": "SEAT S.A.",
|
|
6
6
|
"license": "SEAT S.A. Library EULA 1.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": ">= 18.3.1 < 20",
|
|
53
53
|
"react-dom": ">= 18.3.1 < 20",
|
|
54
|
-
"@cupra/ui-kit": "2.0.0-canary.
|
|
54
|
+
"@cupra/ui-kit": "2.0.0-canary.17",
|
|
55
55
|
"typescript": ">=5.0.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"storybook": "^8.6.15",
|
|
75
75
|
"typescript": "^5.8.2",
|
|
76
76
|
"vite": "^6.4.1",
|
|
77
|
-
"@cupra/ui-kit": "2.0.0-canary.
|
|
77
|
+
"@cupra/ui-kit": "2.0.0-canary.17"
|
|
78
78
|
},
|
|
79
79
|
"scripts": {
|
|
80
80
|
"build": "rm -rf dist && pnpm --filter @cupra/ui-kit build:react && tsc --declaration --emitDeclarationOnly && BUILD_FORMAT=esm vite build --emptyOutDir false && BUILD_FORMAT=cjs vite build --emptyOutDir false",
|