@odx/websites-react 1.2.5 → 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/layout/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/layout/drawer/Drawer.js +2 -1
- package/dist/components/layout/drawer/Drawer.js.map +1 -1
- package/dist/web/product/productStage/ProductCtaDrawer.d.ts +3 -7
- package/dist/web/product/productStage/ProductCtaDrawer.d.ts.map +1 -1
- package/dist/web/product/productStage/ProductCtaDrawer.js +4 -11
- package/dist/web/product/productStage/ProductCtaDrawer.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +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;
|
|
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"}
|
|
@@ -6,6 +6,7 @@ import { IconCoreClose } from '../../icon';
|
|
|
6
6
|
import { Headline } from '../../typography/headline';
|
|
7
7
|
import { cn } from '../../../utils';
|
|
8
8
|
import { Divider } from '../../structures/divider';
|
|
9
|
+
import { VisuallyHidden } from '@radix-ui/react-visually-hidden';
|
|
9
10
|
const DrawerTriggerButton = ({ children, ...props }) => {
|
|
10
11
|
return (_jsx(VaulDrawer.Trigger, { asChild: true, children: _jsx(Button, { ...props, children: children }) }));
|
|
11
12
|
};
|
|
@@ -20,7 +21,7 @@ const Drawer = ({ children, triggerButton, headerContent, actionsContent, title,
|
|
|
20
21
|
left: 'md:rounded-r-md',
|
|
21
22
|
right: 'md:rounded-l-md',
|
|
22
23
|
}[direction]);
|
|
23
|
-
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(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 }), _jsx(Divider, { direction: "horizontal" }),
|
|
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 })] }))] }) })] })] }));
|
|
24
25
|
};
|
|
25
26
|
export { Drawer, DrawerTriggerButton };
|
|
26
27
|
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"Drawer.js","sourceRo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MAAC,UAAU,CAAC,IAAI,IAAC,SAAS,EAAE,SAAS,aAClC,aAAa,EACd,MAAC,UAAU,CAAC,MAAM,eAChB,KAAC,UAAU,CAAC,OAAO,IAAC,SAAS,EAAC,qDAAqD,GAAG,EACtF,KAAC,UAAU,CAAC,OAAO,IAAC,SAAS,EAAE,cAAc,YAC3C,eAAK,SAAS,EAAE,qBAAqB,aACnC,eAAK,SAAS,EAAC,6CAA6C,aAC1D,KAAC,cAAc,cACb,KAAC,UAAU,CAAC,KAAK,cAAE,KAAK,GAAoB,GAC7B,EACjB,KAAC,QAAQ,IAAC,YAAY,EAAC,IAAI,EAAC,aAAa,EAAE,KAAK,YAC7C,KAAK,GACG,EACX,KAAC,UAAU,CAAC,KAAK,IAAC,OAAO,kBACvB,KAAC,MAAM,IACL,OAAO,EAAE,OAAO,EAChB,QAAQ,EACN,KAAC,aAAa,IAAC,SAAS,EAAC,yBAAyB,GAAG,EAEvD,IAAI,EAAC,IAAI,GACT,GACe,IACf,EACL,aAAa,IAAI,cAAK,SAAS,EAAC,WAAW,YAAE,aAAa,GAAO,EACjE,QAAQ,IAAI,CACX,8BACE,KAAC,OAAO,IAAC,SAAS,EAAC,YAAY,GAAG,EAClC,cAAK,SAAS,EAAC,qCAAqC,YACjD,QAAQ,GACL,IACL,CACJ,EACA,cAAc,IAAI,CACjB,8BACE,KAAC,OAAO,IAAC,SAAS,EAAC,YAAY,GAAG,EAClC,cAAK,SAAS,EAAC,iCAAiC,YAC7C,cAAc,GACX,IACL,CACJ,IACG,GACa,IACH,IACJ,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAC,MAAM,EAAE,mBAAmB,EAAC,CAAC"}
|
|
@@ -1,17 +1,13 @@
|
|
|
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
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
13
|
triggerButton?: React.ReactNode;
|
|
@@ -19,5 +15,5 @@ export interface ProductCtaDrawerProps {
|
|
|
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,22 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Drawer, DrawerTriggerButton } from '../../../components/layout/drawer';
|
|
4
|
-
import { Button } from '../../../components/actions/button';
|
|
5
4
|
import { IconCoreMore } from '../../../components/icon';
|
|
6
|
-
const ProductCtaDrawerButtonsContainer = ({
|
|
7
|
-
return (_jsx("div", { className: "sticky bottom-0 flex px-6 pt-24 pb-2 xl:hidden", ...props, children:
|
|
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] }) }));
|
|
8
7
|
};
|
|
9
8
|
const ProductCtaDrawerTriggerButton = ({ ...props }) => {
|
|
10
9
|
return (_jsx(DrawerTriggerButton, { iconLeft: _jsx(IconCoreMore, {}), size: "md", variant: "primary", "aria-label": "Show more actions", ...props }));
|
|
11
10
|
};
|
|
12
|
-
const ProductCtaDrawerMainButton = ({ iconLeft, iconRight, ...props }) => {
|
|
13
|
-
return (_jsx(Button, { size: "md", variant: "primary", className: "grow md:grow-0 md:min-w-52", iconLeft: iconLeft, iconRight: iconRight, ...props }));
|
|
14
|
-
};
|
|
15
|
-
const ProductCtaDrawerActionButton = ({ iconLeft, iconRight, ...props }) => {
|
|
16
|
-
return (_jsx("div", { className: "flex flex-col", children: _jsx(Button, { size: "md", variant: "primary", ...props, iconLeft: iconLeft, iconRight: iconRight }) }));
|
|
17
|
-
};
|
|
18
11
|
const ProductCtaDrawer = ({ children, triggerButton, actionsContent, title, }) => {
|
|
19
12
|
return (_jsx(Drawer, { title: title, triggerButton: triggerButton, actionsContent: actionsContent, direction: "bottom", roundedCorners: true, children: children }));
|
|
20
13
|
};
|
|
21
|
-
export { ProductCtaDrawer, ProductCtaDrawerButtonsContainer,
|
|
14
|
+
export { ProductCtaDrawer, ProductCtaDrawerButtonsContainer, ProductCtaDrawerTriggerButton, };
|
|
22
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,EAAE,mBAAmB,EAAC,MAAM,mCAAmC,CAAC;
|
|
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",
|
|
@@ -543,9 +543,9 @@
|
|
|
543
543
|
"ts-node": "^10.9.2",
|
|
544
544
|
"typescript": "^5.4.5",
|
|
545
545
|
"vitest": "^3.1.0-beta.1",
|
|
546
|
-
"@odx/eslint-config-websites": "0.0.1",
|
|
547
546
|
"@odx/websites-tsconfig": "0.0.0",
|
|
548
|
-
"@odx/websites-ui": "0.2.40"
|
|
547
|
+
"@odx/websites-ui": "0.2.40",
|
|
548
|
+
"@odx/eslint-config-websites": "0.0.1"
|
|
549
549
|
},
|
|
550
550
|
"peerDependencies": {
|
|
551
551
|
"@odx/websites-ui": ">=0.2.1",
|