@odx/websites-react 1.2.4 → 1.2.6
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/actions/inlineMessage/InlineMessage.d.ts +11 -0
- package/dist/components/actions/inlineMessage/InlineMessage.d.ts.map +1 -0
- package/dist/components/actions/inlineMessage/InlineMessage.js +26 -0
- package/dist/components/actions/inlineMessage/InlineMessage.js.map +1 -0
- package/dist/components/actions/inlineMessage/index.d.ts +2 -0
- package/dist/components/actions/inlineMessage/index.d.ts.map +1 -0
- package/dist/components/actions/inlineMessage/index.js +2 -0
- package/dist/components/actions/inlineMessage/index.js.map +1 -0
- package/dist/components/layout/drawer/Drawer.d.ts +19 -0
- package/dist/components/layout/drawer/Drawer.d.ts.map +1 -0
- package/dist/components/layout/drawer/Drawer.js +27 -0
- package/dist/components/layout/drawer/Drawer.js.map +1 -0
- package/dist/components/layout/drawer/index.d.ts +2 -0
- package/dist/components/layout/drawer/index.d.ts.map +1 -0
- package/dist/components/layout/drawer/index.js +2 -0
- package/dist/components/layout/drawer/index.js.map +1 -0
- package/dist/components/layout/raqListItem/RaqListItem.d.ts +11 -4
- package/dist/components/layout/raqListItem/RaqListItem.d.ts.map +1 -1
- package/dist/components/layout/raqListItem/RaqListItem.js +3 -2
- package/dist/components/layout/raqListItem/RaqListItem.js.map +1 -1
- package/dist/web/product/productStage/ProductCtaDrawer.d.ts +6 -10
- package/dist/web/product/productStage/ProductCtaDrawer.d.ts.map +1 -1
- package/dist/web/product/productStage/ProductCtaDrawer.js +8 -16
- package/dist/web/product/productStage/ProductCtaDrawer.js.map +1 -1
- package/package.json +10 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export interface InlineMessageProps extends VariantProps<typeof messageVariants> {
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
declare const messageVariants: (props?: ({
|
|
7
|
+
variant?: "error" | "warning" | "success" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
declare const InlineMessage: React.FC<InlineMessageProps>;
|
|
10
|
+
export { InlineMessage };
|
|
11
|
+
//# sourceMappingURL=InlineMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/inlineMessage/InlineMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAGhE,MAAM,WAAW,kBACf,SAAQ,YAAY,CAAC,OAAO,eAAe,CAAC;IAC5C,OAAO,EAAE,MAAM,CAAC;CACjB;AAQD,QAAA,MAAM,eAAe;;8EAWnB,CAAC;AAEH,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAe/C,CAAC;AAEF,OAAO,EAAC,aAAa,EAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconCoreCheck, IconCoreError, IconCoreWarning } from '../../icon';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { BodyText } from '../../typography/bodyText';
|
|
5
|
+
const iconMap = {
|
|
6
|
+
success: _jsx(IconCoreCheck, {}),
|
|
7
|
+
warning: _jsx(IconCoreWarning, {}),
|
|
8
|
+
error: _jsx(IconCoreError, { color: "draeger-error" }),
|
|
9
|
+
};
|
|
10
|
+
const messageVariants = cva('flex items-center gap-2.5 p-2.5', {
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
success: 'bg-success-message-success',
|
|
14
|
+
warning: 'bg-warning-message-warning',
|
|
15
|
+
error: 'bg-error-message-error',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
variant: 'success',
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
const InlineMessage = ({ message, variant = 'success', }) => {
|
|
23
|
+
return (_jsxs("div", { className: messageVariants({ variant }), children: [variant && iconMap[variant], _jsx(BodyText, { className: variant === 'error' ? 'text-text-error' : '', variant: "extraSmall", children: message })] }));
|
|
24
|
+
};
|
|
25
|
+
export { InlineMessage };
|
|
26
|
+
//# sourceMappingURL=InlineMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineMessage.js","sourceRoot":"","sources":["../../../../src/components/actions/inlineMessage/InlineMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,aAAa,EAAE,aAAa,EAAE,eAAe,EAAC,MAAM,YAAY,CAAC;AACzE,OAAO,EAAC,GAAG,EAAoB,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AAOnD,MAAM,OAAO,GAA6D;IACxE,OAAO,EAAE,KAAC,aAAa,KAAG;IAC1B,OAAO,EAAE,KAAC,eAAe,KAAG;IAC5B,KAAK,EAAE,KAAC,aAAa,IAAC,KAAK,EAAC,eAAe,GAAG;CAC/C,CAAC;AAEF,MAAM,eAAe,GAAG,GAAG,CAAC,iCAAiC,EAAE;IAC7D,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,4BAA4B;YACrC,OAAO,EAAE,4BAA4B;YACrC,KAAK,EAAE,wBAAwB;SAChC;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CAAC,CAAC;AAEH,MAAM,aAAa,GAAiC,CAAC,EACnD,OAAO,EACP,OAAO,GAAG,SAAS,GACpB,EAAE,EAAE;IACH,OAAO,CACL,eAAK,SAAS,EAAE,eAAe,CAAC,EAAC,OAAO,EAAC,CAAC,aACvC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAC5B,KAAC,QAAQ,IACP,SAAS,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,EACvD,OAAO,EAAC,YAAY,YAEnB,OAAO,GACC,IACP,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAC,aAAa,EAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/inlineMessage/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/actions/inlineMessage/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ButtonProps } from '../../actions/button';
|
|
3
|
+
export type DrawerTriggerButtonProps = ButtonProps & {
|
|
4
|
+
label?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const DrawerTriggerButton: React.FC<DrawerTriggerButtonProps>;
|
|
8
|
+
export interface DrawerProps {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
triggerButton: React.ReactNode;
|
|
11
|
+
headerContent?: React.ReactNode;
|
|
12
|
+
actionsContent?: React.ReactNode;
|
|
13
|
+
title?: string;
|
|
14
|
+
direction?: 'bottom' | 'top' | 'left' | 'right';
|
|
15
|
+
roundedCorners?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const Drawer: React.FC<DrawerProps>;
|
|
18
|
+
export { Drawer, DrawerTriggerButton };
|
|
19
|
+
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/drawer/Drawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAS,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAOzD,MAAM,MAAM,wBAAwB,GAAG,WAAW,GAAG;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAS3D,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IAChD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA4EjC,CAAC;AAEF,OAAO,EAAC,MAAM,EAAE,mBAAmB,EAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Drawer as VaulDrawer } from 'vaul';
|
|
4
|
+
import { Button } from '../../actions/button';
|
|
5
|
+
import { IconCoreClose } from '../../icon';
|
|
6
|
+
import { Headline } from '../../typography/headline';
|
|
7
|
+
import { cn } from '../../../utils';
|
|
8
|
+
import { Divider } from '../../structures/divider';
|
|
9
|
+
import { VisuallyHidden } from '@radix-ui/react-visually-hidden';
|
|
10
|
+
const DrawerTriggerButton = ({ children, ...props }) => {
|
|
11
|
+
return (_jsx(VaulDrawer.Trigger, { asChild: true, children: _jsx(Button, { ...props, children: children }) }));
|
|
12
|
+
};
|
|
13
|
+
const Drawer = ({ children, triggerButton, headerContent, actionsContent, title, direction = 'bottom', roundedCorners, }) => {
|
|
14
|
+
const contentClasses = cn('fixed bg-gray-100 outline-none h-fit z-overlay', direction === 'bottom' && 'bottom-0 left-0 right-0', direction === 'top' && 'top-0 right-0 left-0', direction === 'left' &&
|
|
15
|
+
'left-0 top-0 bottom-0 h-screen w-full md:w-[480px]', direction === 'right' &&
|
|
16
|
+
'right-0 top-0 bottom-0 h-screen w-full md:w-[480px]');
|
|
17
|
+
const roundedCornersClasses = cn('bg-draeger-white h-full w-full flex flex-col shadow-draeger-drop-shadow-level-2', roundedCorners &&
|
|
18
|
+
{
|
|
19
|
+
bottom: 'md:rounded-t-md',
|
|
20
|
+
top: 'md:rounded-b-md',
|
|
21
|
+
left: 'md:rounded-r-md',
|
|
22
|
+
right: 'md:rounded-l-md',
|
|
23
|
+
}[direction]);
|
|
24
|
+
return (_jsxs(VaulDrawer.Root, { direction: direction, children: [triggerButton, _jsxs(VaulDrawer.Portal, { children: [_jsx(VaulDrawer.Overlay, { className: "fixed inset-0 bg-draeger-dark-blue-900/40 z-overlay" }), _jsx(VaulDrawer.Content, { className: contentClasses, children: _jsxs("div", { className: roundedCornersClasses, children: [_jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [_jsx(VisuallyHidden, { children: _jsx(VaulDrawer.Title, { children: title }) }), _jsx(Headline, { headingLevel: "h5", spacingBottom: false, children: title }), _jsx(VaulDrawer.Close, { asChild: true, children: _jsx(Button, { variant: 'ghost', iconLeft: _jsx(IconCoreClose, { className: "text-interactions-brand" }), size: "md" }) })] }), headerContent && _jsx("div", { className: "px-6 my-6", children: headerContent }), children && (_jsxs(_Fragment, { children: [_jsx(Divider, { direction: "horizontal" }), _jsx("div", { className: "px-6 py-6 flex-grow overflow-y-auto", children: children })] })), actionsContent && (_jsxs(_Fragment, { children: [_jsx(Divider, { direction: "horizontal" }), _jsx("div", { className: "px-6 py-3 flex flex-col gap-y-3", children: actionsContent })] }))] }) })] })] }));
|
|
25
|
+
};
|
|
26
|
+
export { Drawer, DrawerTriggerButton };
|
|
27
|
+
//# sourceMappingURL=Drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../../src/components/layout/drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAC,MAAM,IAAI,UAAU,EAAC,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAC,MAAM,EAAc,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAC;AAO/D,MAAM,mBAAmB,GAAuC,CAAC,EAC/D,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,KAAC,UAAU,CAAC,OAAO,IAAC,OAAO,kBACzB,KAAC,MAAM,OAAK,KAAK,YAAG,QAAQ,GAAU,GACnB,CACtB,CAAC;AACJ,CAAC,CAAC;AAYF,MAAM,MAAM,GAA0B,CAAC,EACrC,QAAQ,EACR,aAAa,EACb,aAAa,EACb,cAAc,EACd,KAAK,EACL,SAAS,GAAG,QAAQ,EACpB,cAAc,GACf,EAAE,EAAE;IACH,MAAM,cAAc,GAAG,EAAE,CACvB,gDAAgD,EAChD,SAAS,KAAK,QAAQ,IAAI,yBAAyB,EACnD,SAAS,KAAK,KAAK,IAAI,sBAAsB,EAC7C,SAAS,KAAK,MAAM;QAClB,oDAAoD,EACtD,SAAS,KAAK,OAAO;QACnB,qDAAqD,CACxD,CAAC;IAEF,MAAM,q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mBAAmB,EAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/drawer/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/layout/drawer/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ImageProps } from '../../images-icons/image';
|
|
3
3
|
import { LinkComponent } from '../../../utils';
|
|
4
|
-
interface
|
|
4
|
+
interface BaseRaqListItemProps extends LinkComponent {
|
|
5
5
|
headline: string;
|
|
6
6
|
partNumber?: string;
|
|
7
|
-
|
|
7
|
+
additionalInfo?: string[];
|
|
8
8
|
link?: string;
|
|
9
|
-
onUpdateQuantity: (value: number) => void;
|
|
10
9
|
initialQuantity: number;
|
|
11
10
|
minQuantity?: number;
|
|
12
11
|
maxQuantity?: number;
|
|
13
|
-
onDelete: () => void;
|
|
14
12
|
image: ImageProps;
|
|
15
13
|
}
|
|
14
|
+
type RaqListItemProps = (BaseRaqListItemProps & {
|
|
15
|
+
readonly: true;
|
|
16
|
+
onUpdateQuantity?: (value: number) => void;
|
|
17
|
+
onDelete?: () => void;
|
|
18
|
+
}) | (BaseRaqListItemProps & {
|
|
19
|
+
readonly?: false;
|
|
20
|
+
onUpdateQuantity: (value: number) => void;
|
|
21
|
+
onDelete: () => void;
|
|
22
|
+
});
|
|
16
23
|
declare const RaqListItem: React.FC<RaqListItemProps>;
|
|
17
24
|
export { RaqListItem };
|
|
18
25
|
export type { RaqListItemProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RaqListItem.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/raqListItem/RaqListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAQ,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAE3D,OAAO,
|
|
1
|
+
{"version":3,"file":"RaqListItem.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/raqListItem/RaqListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAQ,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAK,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAEjD,UAAU,oBAAqB,SAAQ,aAAa;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,KAAK,gBAAgB,GACjB,CAAC,oBAAoB,GAAG;IACtB,QAAQ,EAAE,IAAI,CAAC;IACf,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC,GACF,CAAC,oBAAoB,GAAG;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC,CAAC;AAEP,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAoF3C,CAAC;AAEF,OAAO,EAAC,WAAW,EAAC,CAAC;AACrB,YAAY,EAAC,gBAAgB,EAAC,CAAC"}
|
|
@@ -7,9 +7,10 @@ import { QuantitySelector } from '../../actions/quantitySelector';
|
|
|
7
7
|
import { Button } from '../../actions/button';
|
|
8
8
|
import { Image } from '../../images-icons/image';
|
|
9
9
|
import { useBreakpoint } from '../../../hooks/useBreakpoint/useBreakpoint';
|
|
10
|
-
|
|
10
|
+
import { cn } from '../../../utils';
|
|
11
|
+
const RaqListItem = ({ headline, partNumber, additionalInfo, onUpdateQuantity, initialQuantity, link, minQuantity = 1, maxQuantity = 999, onDelete, image, LinkComponent = 'a', readonly, }) => {
|
|
11
12
|
const isBelowLg = useBreakpoint('lg');
|
|
12
|
-
return (_jsxs("div", { className:
|
|
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
14
|
};
|
|
14
15
|
export { RaqListItem };
|
|
15
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,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAC,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,KAAK,EAAa,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAC,aAAa,EAAC,MAAM,4CAA4C,CAAC;
|
|
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,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAC,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAC,KAAK,EAAa,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAC,aAAa,EAAC,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAC,EAAE,EAAgB,MAAM,gBAAgB,CAAC;AAyBjD,MAAM,WAAW,GAA+B,CAAC,EAC/C,QAAQ,EACR,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,IAAI,EACJ,WAAW,GAAG,CAAC,EACf,WAAW,GA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,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"}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type ButtonProps } from '../../../components/actions/button';
|
|
3
3
|
export interface ProductCtaDrawerButtonsContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
mainButton: React.ReactNode;
|
|
5
|
+
drawerButton: React.ReactNode;
|
|
4
6
|
}
|
|
5
7
|
declare const ProductCtaDrawerButtonsContainer: React.FC<ProductCtaDrawerButtonsContainerProps>;
|
|
6
|
-
export interface ProductCtaDrawerTriggerButtonProps extends Omit<ButtonProps, 'size' | 'variant' | 'children' | 'iconRight' | 'iconLeft'> {
|
|
8
|
+
export interface ProductCtaDrawerTriggerButtonProps extends Omit<ButtonProps, 'size' | 'variant' | 'children' | 'iconRight' | 'iconLeft' | 'aria-label'> {
|
|
7
9
|
}
|
|
8
10
|
declare const ProductCtaDrawerTriggerButton: React.FC<ProductCtaDrawerTriggerButtonProps>;
|
|
9
|
-
export interface ProductCtaDrawerMainButtonProps extends Omit<ButtonProps, 'size' | 'variant' | 'className'> {
|
|
10
|
-
}
|
|
11
|
-
declare const ProductCtaDrawerMainButton: React.FC<ProductCtaDrawerActionButtonProps>;
|
|
12
|
-
export interface ProductCtaDrawerActionButtonProps extends Omit<ButtonProps, 'size' | 'variant' | 'className'> {
|
|
13
|
-
}
|
|
14
|
-
declare const ProductCtaDrawerActionButton: React.FC<ProductCtaDrawerActionButtonProps>;
|
|
15
11
|
export interface ProductCtaDrawerProps {
|
|
16
12
|
children?: React.ReactNode;
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
triggerButton?: React.ReactNode;
|
|
14
|
+
actionsContent?: React.ReactNode;
|
|
19
15
|
title?: string;
|
|
20
16
|
}
|
|
21
17
|
declare const ProductCtaDrawer: React.FC<ProductCtaDrawerProps>;
|
|
22
|
-
export { ProductCtaDrawer, ProductCtaDrawerButtonsContainer,
|
|
18
|
+
export { ProductCtaDrawer, ProductCtaDrawerButtonsContainer, ProductCtaDrawerTriggerButton, };
|
|
23
19
|
//# sourceMappingURL=ProductCtaDrawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCtaDrawer.d.ts","sourceRoot":"","sources":["../../../../src/web/product/productStage/ProductCtaDrawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,
|
|
1
|
+
{"version":3,"file":"ProductCtaDrawer.d.ts","sourceRoot":"","sources":["../../../../src/web/product/productStage/ProductCtaDrawer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,oCAAoC,CAAC;AAGpE,MAAM,WAAW,qCACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,QAAA,MAAM,gCAAgC,EAAE,KAAK,CAAC,EAAE,CAC9C,qCAAqC,CAYtC,CAAC;AAEF,MAAM,WAAW,kCACf,SAAQ,IAAI,CACV,WAAW,EACX,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,YAAY,CAC1E;CAAG;AAEN,QAAA,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAC3C,kCAAkC,CAWnC,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAiBrD,CAAC;AAEF,OAAO,EACL,gBAAgB,EAChB,gCAAgC,EAChC,6BAA6B,GAC9B,CAAC"}
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Drawer } from '
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const ProductCtaDrawerButtonsContainer = ({ children, ...props }) => {
|
|
8
|
-
return (_jsx("div", { className: "sticky bottom-0 flex px-6 pt-24 pb-2 xl:hidden", ...props, children: _jsx("div", { className: "flex justify-center w-full gap-2", children: children }) }));
|
|
3
|
+
import { Drawer, DrawerTriggerButton } from '../../../components/layout/drawer';
|
|
4
|
+
import { IconCoreMore } from '../../../components/icon';
|
|
5
|
+
const ProductCtaDrawerButtonsContainer = ({ mainButton, drawerButton, ...props }) => {
|
|
6
|
+
return (_jsx("div", { className: "sticky bottom-0 flex px-6 pt-24 pb-2 xl:hidden", ...props, children: _jsxs("div", { className: "flex justify-center gap-2 w-full", children: [_jsx("div", { className: "grow md:grow-0 md:min-w-52 [&>*]:w-full", children: mainButton }), drawerButton] }) }));
|
|
9
7
|
};
|
|
10
8
|
const ProductCtaDrawerTriggerButton = ({ ...props }) => {
|
|
11
|
-
return (_jsx(
|
|
9
|
+
return (_jsx(DrawerTriggerButton, { iconLeft: _jsx(IconCoreMore, {}), size: "md", variant: "primary", "aria-label": "Show more actions", ...props }));
|
|
12
10
|
};
|
|
13
|
-
const
|
|
14
|
-
return (_jsx(
|
|
11
|
+
const ProductCtaDrawer = ({ children, triggerButton, actionsContent, title, }) => {
|
|
12
|
+
return (_jsx(Drawer, { title: title, triggerButton: triggerButton, actionsContent: actionsContent, direction: "bottom", roundedCorners: true, children: children }));
|
|
15
13
|
};
|
|
16
|
-
|
|
17
|
-
return (_jsx("div", { className: "flex flex-col px-4 py-2 border-t border-t-border-separator", children: _jsx(Button, { size: "md", variant: "primary", ...props, iconLeft: iconLeft, iconRight: iconRight }) }));
|
|
18
|
-
};
|
|
19
|
-
const ProductCtaDrawer = ({ children, buttonsContainer, actionButton, title, }) => {
|
|
20
|
-
return (_jsxs(Drawer.Root, { children: [buttonsContainer, _jsxs(Drawer.Portal, { children: [_jsx(Drawer.Overlay, { className: "fixed inset-0 bg-draeger-dark-blue-900/40 z-overlay" }), _jsx(Drawer.Content, { className: "fixed bottom-0 left-0 right-0 bg-gray-100 outline-none h-fit z-overlay", children: _jsxs("div", { className: "bg-draeger-white rounded-t-md", children: [_jsxs("div", { className: "flex items-center justify-between px-4 py-2 border-b min-h-16 border-border-separator", children: [_jsx(Headline, { headingLevel: "h5", spacingBottom: false, children: title }), _jsx(Drawer.Close, { asChild: true, children: _jsx(Button, { variant: 'ghost', iconLeft: _jsx(IconCoreClose, { className: "text-interactions-brand" }), size: "md" }) })] }), _jsx("div", { className: "px-4 py-6", children: children }), actionButton] }) })] })] }));
|
|
21
|
-
};
|
|
22
|
-
export { ProductCtaDrawer, ProductCtaDrawerButtonsContainer, ProductCtaDrawerMainButton, ProductCtaDrawerTriggerButton, ProductCtaDrawerActionButton, };
|
|
14
|
+
export { ProductCtaDrawer, ProductCtaDrawerButtonsContainer, ProductCtaDrawerTriggerButton, };
|
|
23
15
|
//# sourceMappingURL=ProductCtaDrawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCtaDrawer.js","sourceRoot":"","sources":["../../../../src/web/product/productStage/ProductCtaDrawer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ProductCtaDrawer.js","sourceRoot":"","sources":["../../../../src/web/product/productStage/ProductCtaDrawer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAC,MAAM,EAAE,mBAAmB,EAAC,MAAM,mCAAmC,CAAC;AAE9E,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAQtD,MAAM,gCAAgC,GAElC,CAAC,EAAC,UAAU,EAAE,YAAY,EAAE,GAAG,KAAK,EAAC,EAAE,EAAE;IAC3C,OAAO,CACL,cAAK,SAAS,EAAC,gDAAgD,KAAK,KAAK,YACvE,eAAK,SAAS,EAAC,kCAAkC,aAC/C,cAAK,SAAS,EAAC,yCAAyC,YACrD,UAAU,GACP,EACL,YAAY,IACT,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAQF,MAAM,6BAA6B,GAE/B,CAAC,EAAC,GAAG,KAAK,EAAC,EAAE,EAAE;IACjB,OAAO,CACL,KAAC,mBAAmB,IAClB,QAAQ,EAAE,KAAC,YAAY,KAAG,EAC1B,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,SAAS,gBACN,mBAAmB,KAC1B,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC;AASF,MAAM,gBAAgB,GAAoC,CAAC,EACzD,QAAQ,EACR,aAAa,EACb,cAAc,EACd,KAAK,GACN,EAAE,EAAE;IACH,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAC,QAAQ,EAClB,cAAc,EAAE,IAAI,YAEnB,QAAQ,GACF,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EACL,gBAAgB,EAChB,gCAAgC,EAChC,6BAA6B,GAC9B,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.6",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"description": "ODX React component library for websites",
|
|
7
7
|
"type": "module",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"./components/actions/floatingButton": "./dist/components/actions/floatingButton/index.js",
|
|
22
22
|
"./components/actions/form": "./dist/components/actions/form/index.js",
|
|
23
23
|
"./components/actions/formField": "./dist/components/actions/formField/index.js",
|
|
24
|
+
"./components/actions/inlineMessage": "./dist/components/actions/inlineMessage/index.js",
|
|
24
25
|
"./components/actions/link": "./dist/components/actions/link/index.js",
|
|
25
26
|
"./components/actions/link/linkList": "./dist/components/actions/link/linkList/index.js",
|
|
26
27
|
"./components/actions/multiselect": "./dist/components/actions/multiselect/index.js",
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
"./components/layout/container": "./dist/components/layout/container/index.js",
|
|
51
52
|
"./components/layout/contentItem": "./dist/components/layout/contentItem/index.js",
|
|
52
53
|
"./components/layout/contentSlider": "./dist/components/layout/contentSlider/index.js",
|
|
54
|
+
"./components/layout/drawer": "./dist/components/layout/drawer/index.js",
|
|
53
55
|
"./components/layout/documentList": "./dist/components/layout/documentList/index.js",
|
|
54
56
|
"./components/layout/downloadItem": "./dist/components/layout/downloadItem/index.js",
|
|
55
57
|
"./components/layout/flexBox": "./dist/components/layout/flexBox/index.js",
|
|
@@ -168,6 +170,9 @@
|
|
|
168
170
|
"components/actions/formField": [
|
|
169
171
|
"./dist/components/actions/formField/index.d.ts"
|
|
170
172
|
],
|
|
173
|
+
"components/actions/inlineMessage": [
|
|
174
|
+
"./dist/components/actions/inlineMessage/index.d.ts"
|
|
175
|
+
],
|
|
171
176
|
"components/actions/link": [
|
|
172
177
|
"./dist/components/actions/link/index.d.ts"
|
|
173
178
|
],
|
|
@@ -255,6 +260,9 @@
|
|
|
255
260
|
"components/layout/contentSlider": [
|
|
256
261
|
"./dist/components/layout/contentSlider/index.d.ts"
|
|
257
262
|
],
|
|
263
|
+
"components/layout/drawer": [
|
|
264
|
+
"./dist/components/layout/drawer/index.d.ts"
|
|
265
|
+
],
|
|
258
266
|
"components/layout/downloadItem": [
|
|
259
267
|
"./dist/components/layout/downloadItem/index.d.ts"
|
|
260
268
|
],
|
|
@@ -536,7 +544,7 @@
|
|
|
536
544
|
"typescript": "^5.4.5",
|
|
537
545
|
"vitest": "^3.1.0-beta.1",
|
|
538
546
|
"@odx/websites-tsconfig": "0.0.0",
|
|
539
|
-
"@odx/websites-ui": "0.2.
|
|
547
|
+
"@odx/websites-ui": "0.2.40",
|
|
540
548
|
"@odx/eslint-config-websites": "0.0.1"
|
|
541
549
|
},
|
|
542
550
|
"peerDependencies": {
|