@cupra/ui-react 2.0.0-canary.21 → 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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime");require("@cupra/ui-kit/react/ds-list-item");function s({className:e,children:t,...i}){return r.jsx("ds-list-item-react",{className:e,...i,children:t})}exports.ListItem=s;
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
- function s({ className: t, children: r, ...i }) {
4
- return /* @__PURE__ */ e("ds-list-item-react", { className: t, ...i, children: r });
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
- s as ListItem
12
+ u as ListItem
8
13
  };
@@ -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 SelectionListCheckbox: Story;
9
- export declare const SelectionListRadioButton: Story;
10
- export declare const SelectionListToogleSwitch: Story;
11
- export declare const ActionListImageSquare: Story;
12
- export declare const ActionListImageWide: Story;
13
- export declare const ActionListIcon: Story;
14
- export declare const InfoList: Story;
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.21",
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",