@odx/websites-react 1.2.6 → 1.2.7
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.
|
@@ -10,7 +10,7 @@ import { useBreakpoint } from '../../../hooks/useBreakpoint/useBreakpoint';
|
|
|
10
10
|
import { cn } from '../../../utils';
|
|
11
11
|
const RaqListItem = ({ headline, partNumber, additionalInfo, onUpdateQuantity, initialQuantity, link, minQuantity = 1, maxQuantity = 999, onDelete, image, LinkComponent = 'a', readonly, }) => {
|
|
12
12
|
const isBelowLg = useBreakpoint('lg');
|
|
13
|
-
return (_jsxs("div", { className: cn('flex flex-wrap gap-y-4 gap-x-4', readonly ? 'flex-nowrap' : 'lg:flex-nowrap'), children: [_jsxs("div", { className: "flex gap-x-4 flex-grow", children: [_jsx("div", { className: "w-32", children: link ? (_jsx(Link, { target: "_self", href: link, children: _jsx(Image, { ...image, ratio: "4/3" }) })) : (_jsx(Image, { ...image, ratio: "4/3" })) }), _jsxs("div", { className: "flex-1", children: [link ? (_jsx(Link, { variant: "secondary", href: link, LinkComponent: LinkComponent, children: _jsx(BodyText, { variant: "medium", weight: "bold", children: headline }) })) : (_jsx(BodyText, { variant: "medium", weight: "bold", children: headline })), additionalInfo && additionalInfo.length > 0 && (_jsx(BodyText, { className: "mb-4", variant: "small", children: additionalInfo.join(', ') })), partNumber && (_jsx(BodyText, { className: "px-2 py-1 rounded-controls inline-block bg-surface-secondary", weight: "bold", variant: "extraSmall", children: partNumber }))] })] }), readonly ? (_jsxs("div", { className: "flex whitespace-nowrap justify-end", children: ["x ", initialQuantity] })) : (_jsxs("div", { className: "flex gap-x-2 items-start justify-end", children: [_jsx(QuantitySelector, { onUpdate: onUpdateQuantity, initialValue: initialQuantity, variant: isBelowLg ? 'lg' : 'sm', minValue: minQuantity, maxValue: maxQuantity }), _jsx(Button, { onClick: onDelete, variant: "ghost", size: isBelowLg ? 'md' : 'sm', iconLeft: _jsx(IconCoreDelete, {}) })] }))] }));
|
|
13
|
+
return (_jsxs("div", { className: cn('flex flex-wrap gap-y-4 gap-x-4', readonly ? 'flex-nowrap' : 'lg:flex-nowrap'), children: [_jsxs("div", { className: "flex gap-x-4 flex-grow min-w-0", children: [_jsx("div", { className: "w-32", children: link ? (_jsx(Link, { target: "_self", href: link, children: _jsx(Image, { ...image, ratio: "4/3" }) })) : (_jsx(Image, { ...image, ratio: "4/3" })) }), _jsxs("div", { className: "flex-1 overflow-hidden", children: [link ? (_jsx(Link, { variant: "secondary", href: link, LinkComponent: LinkComponent, children: _jsx(BodyText, { variant: "medium", weight: "bold", children: headline }) })) : (_jsx(BodyText, { variant: "medium", weight: "bold", children: headline })), additionalInfo && additionalInfo.length > 0 && (_jsx(BodyText, { className: "mb-4", variant: "small", children: additionalInfo.join(', ') })), partNumber && (_jsx(BodyText, { className: "px-2 py-1 rounded-controls inline-block bg-surface-secondary", weight: "bold", variant: "extraSmall", children: partNumber }))] })] }), readonly ? (_jsxs("div", { className: "flex whitespace-nowrap justify-end", children: ["x ", initialQuantity] })) : (_jsxs("div", { className: "flex gap-x-2 items-start justify-end", children: [_jsx(QuantitySelector, { onUpdate: onUpdateQuantity, initialValue: initialQuantity, variant: isBelowLg ? 'lg' : 'sm', minValue: minQuantity, maxValue: maxQuantity }), _jsx(Button, { onClick: onDelete, variant: "ghost", size: isBelowLg ? 'md' : 'sm', iconLeft: _jsx(IconCoreDelete, {}) })] }))] }));
|
|
14
14
|
};
|
|
15
15
|
export { RaqListItem };
|
|
16
16
|
//# sourceMappingURL=RaqListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RaqListItem.js","sourceRoot":"","sources":["../../../../src/components/layout/raqListItem/RaqListItem.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC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AAI,CAAC,IAAI,CAAC,GACjB,CACZ,EACA,UAAU,IAAI,CACb,KAAC,QAAQ,IACP,SAAS,EAAC,8DAA8D,EACxE,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,YAAY,YAEnB,UAAU,GACF,CACZ,IACG,IACF,EACL,QAAQ,CAAC,CAAC,CAAC,CACV,eAAK,SAAS,EAAC,oCAAoC,mBAC9C,eAAe,IACd,CACP,CAAC,CAAC,CAAC,CACF,eAAK,SAAS,EAAC,sCAAsC,aACnD,KAAC,gBAAgB,IACf,QAAQ,EAAE,gBAAgB,EAC1B,YAAY,EAAE,eAAe,EAC7B,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAChC,QAAQ,EAAE,WAAW,EACrB,QAAQ,EAAE,WAAW,GACrB,EACF,KAAC,MAAM,IACL,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAC,OAAO,EACf,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAC7B,QAAQ,EAAE,KAAC,cAAc,KAAG,GAC5B,IACE,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAC,WAAW,EAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odx/websites-react",
|
|
3
3
|
"author": "Drägerwerk AG & Co. KGaA",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.7",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"description": "ODX React component library for websites",
|
|
7
7
|
"type": "module",
|
|
@@ -544,8 +544,8 @@
|
|
|
544
544
|
"typescript": "^5.4.5",
|
|
545
545
|
"vitest": "^3.1.0-beta.1",
|
|
546
546
|
"@odx/websites-tsconfig": "0.0.0",
|
|
547
|
-
"@odx/websites
|
|
548
|
-
"@odx/
|
|
547
|
+
"@odx/eslint-config-websites": "0.0.1",
|
|
548
|
+
"@odx/websites-ui": "0.2.40"
|
|
549
549
|
},
|
|
550
550
|
"peerDependencies": {
|
|
551
551
|
"@odx/websites-ui": ">=0.2.1",
|