@flipdish/ui-library 0.46.1 → 0.47.0

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.
Files changed (24) hide show
  1. package/dist/components/organisms/SidePanel/components/SidePanelContent.cjs +2 -2
  2. package/dist/components/organisms/SidePanel/components/SidePanelContent.cjs.map +1 -1
  3. package/dist/components/organisms/SidePanel/components/SidePanelContent.d.ts +7 -1
  4. package/dist/components/organisms/SidePanel/components/SidePanelContent.d.ts.map +1 -1
  5. package/dist/components/organisms/SidePanel/components/SidePanelContent.js +2 -2
  6. package/dist/components/organisms/SidePanel/components/SidePanelContent.js.map +1 -1
  7. package/dist/components/organisms/SidePanel/components/SidePanelHeader.cjs +26 -4
  8. package/dist/components/organisms/SidePanel/components/SidePanelHeader.cjs.map +1 -1
  9. package/dist/components/organisms/SidePanel/components/SidePanelHeader.d.ts +23 -4
  10. package/dist/components/organisms/SidePanel/components/SidePanelHeader.d.ts.map +1 -1
  11. package/dist/components/organisms/SidePanel/components/SidePanelHeader.js +27 -5
  12. package/dist/components/organisms/SidePanel/components/SidePanelHeader.js.map +1 -1
  13. package/dist/components/organisms/SidePanel/components/SidePanelRegion.cjs +9 -2
  14. package/dist/components/organisms/SidePanel/components/SidePanelRegion.cjs.map +1 -1
  15. package/dist/components/organisms/SidePanel/components/SidePanelRegion.d.ts +6 -0
  16. package/dist/components/organisms/SidePanel/components/SidePanelRegion.d.ts.map +1 -1
  17. package/dist/components/organisms/SidePanel/components/SidePanelRegion.js +9 -3
  18. package/dist/components/organisms/SidePanel/components/SidePanelRegion.js.map +1 -1
  19. package/dist/components/organisms/SidePanel/index.cjs +1 -0
  20. package/dist/components/organisms/SidePanel/index.cjs.map +1 -1
  21. package/dist/components/organisms/SidePanel/index.d.ts +1 -1
  22. package/dist/components/organisms/SidePanel/index.d.ts.map +1 -1
  23. package/dist/components/organisms/SidePanel/index.js +1 -1
  24. package/package.json +1 -1
@@ -5,11 +5,11 @@ var cx = require('@flipdish/ui-library/utilities/cx');
5
5
  var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
6
6
 
7
7
  /** The scrolling body. It takes the height the header and footer leave. */
8
- const SidePanelContent = ({ className, 'data-testid': dataTestId, ...props }) => {
8
+ const SidePanelContent = ({ className, padding = 'default', 'data-testid': dataTestId, ...props }) => {
9
9
  const prefix = testIdUtils.useTestIdPrefix();
10
10
  return (jsxRuntime.jsx("div", { ...props, "data-testid": dataTestId ?? (prefix ? testIdUtils.joinTestId(prefix, 'content') : undefined),
11
11
  // The header carries the space above; this carries the space below, so the last item never sits on the footer.
12
- className: cx.cx('flex min-h-0 w-full flex-1 flex-col gap-6 overflow-y-auto px-4 pb-6 lg:px-6', className) }));
12
+ className: cx.cx('flex min-h-0 w-full flex-1 flex-col overflow-y-auto', padding === 'default' && 'gap-6 px-4 pb-6 lg:px-6', className) }));
13
13
  };
14
14
  SidePanelContent.displayName = 'SidePanelContent';
15
15
 
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanelContent.cjs","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelContent.tsx"],"sourcesContent":[null],"names":["useTestIdPrefix","_jsx","joinTestId","cx"],"mappings":";;;;;;AAWA;AACO,MAAM,gBAAgB,GAAG,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAyB,KAAI;AAC5G,IAAA,MAAM,MAAM,GAAGA,2BAAe,EAAE;IAEhC,QACEC,2BACM,KAAK,EAAA,aAAA,EACI,UAAU,KAAK,MAAM,GAAGC,sBAAU,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,SAAS,CAAC;;QAE/E,SAAS,EAAEC,KAAE,CAAC,6EAA6E,EAAE,SAAS,CAAC,EAAA,CACvG;AAEN;AACA,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;"}
1
+ {"version":3,"file":"SidePanelContent.cjs","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelContent.tsx"],"sourcesContent":[null],"names":["useTestIdPrefix","_jsx","joinTestId","cx"],"mappings":";;;;;;AAiBA;MACa,gBAAgB,GAAG,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAyB,KAAI;AACjI,IAAA,MAAM,MAAM,GAAGA,2BAAe,EAAE;IAEhC,QACEC,2BACM,KAAK,EAAA,aAAA,EACI,UAAU,KAAK,MAAM,GAAGC,sBAAU,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,SAAS,CAAC;;AAE/E,QAAA,SAAS,EAAEC,KAAE,CAAC,qDAAqD,EAAE,OAAO,KAAK,SAAS,IAAI,yBAAyB,EAAE,SAAS,CAAC,EAAA,CACnI;AAEN;AACA,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;"}
@@ -1,11 +1,17 @@
1
1
  import type { ComponentPropsWithRef } from 'react';
2
2
  export type SidePanelContentProps = ComponentPropsWithRef<'div'> & {
3
+ /**
4
+ * `default` pads the sides and the end and spaces the children, for content composed of the library's
5
+ * own parts. `none` gives the children the whole box, edge to edge, for content that lays itself out,
6
+ * such as an embedded micro-frontend under a `floating` header.
7
+ */
8
+ padding?: 'default' | 'none';
3
9
  /** Overrides the content's `data-testid` (defaults to `<root>--content`). */
4
10
  'data-testid'?: string;
5
11
  };
6
12
  /** The scrolling body. It takes the height the header and footer leave. */
7
13
  export declare const SidePanelContent: {
8
- ({ className, "data-testid": dataTestId, ...props }: SidePanelContentProps): import("react").JSX.Element;
14
+ ({ className, padding, "data-testid": dataTestId, ...props }: SidePanelContentProps): import("react").JSX.Element;
9
15
  displayName: string;
10
16
  };
11
17
  //# sourceMappingURL=SidePanelContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanelContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,KAAK,CAAC,GAAG;IACjE,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB;yDAAwD,qBAAqB;;CAWzG,CAAC"}
1
+ {"version":3,"file":"SidePanelContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,KAAK,CAAC,GAAG;IACjE;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC7B,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB;kEAA6E,qBAAqB;;CAW9H,CAAC"}
@@ -3,11 +3,11 @@ import { cx } from '@flipdish/ui-library/utilities/cx';
3
3
  import { useTestIdPrefix, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
4
4
 
5
5
  /** The scrolling body. It takes the height the header and footer leave. */
6
- const SidePanelContent = ({ className, 'data-testid': dataTestId, ...props }) => {
6
+ const SidePanelContent = ({ className, padding = 'default', 'data-testid': dataTestId, ...props }) => {
7
7
  const prefix = useTestIdPrefix();
8
8
  return (jsx("div", { ...props, "data-testid": dataTestId ?? (prefix ? joinTestId(prefix, 'content') : undefined),
9
9
  // The header carries the space above; this carries the space below, so the last item never sits on the footer.
10
- className: cx('flex min-h-0 w-full flex-1 flex-col gap-6 overflow-y-auto px-4 pb-6 lg:px-6', className) }));
10
+ className: cx('flex min-h-0 w-full flex-1 flex-col overflow-y-auto', padding === 'default' && 'gap-6 px-4 pb-6 lg:px-6', className) }));
11
11
  };
12
12
  SidePanelContent.displayName = 'SidePanelContent';
13
13
 
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanelContent.js","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelContent.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;AAWA;AACO,MAAM,gBAAgB,GAAG,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAyB,KAAI;AAC5G,IAAA,MAAM,MAAM,GAAG,eAAe,EAAE;IAEhC,QACEA,gBACM,KAAK,EAAA,aAAA,EACI,UAAU,KAAK,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,SAAS,CAAC;;QAE/E,SAAS,EAAE,EAAE,CAAC,6EAA6E,EAAE,SAAS,CAAC,EAAA,CACvG;AAEN;AACA,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;"}
1
+ {"version":3,"file":"SidePanelContent.js","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelContent.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;AAiBA;MACa,gBAAgB,GAAG,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAyB,KAAI;AACjI,IAAA,MAAM,MAAM,GAAG,eAAe,EAAE;IAEhC,QACEA,gBACM,KAAK,EAAA,aAAA,EACI,UAAU,KAAK,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,SAAS,CAAC;;AAE/E,QAAA,SAAS,EAAE,EAAE,CAAC,qDAAqD,EAAE,OAAO,KAAK,SAAS,IAAI,yBAAyB,EAAE,SAAS,CAAC,EAAA,CACnI;AAEN;AACA,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;"}
@@ -9,13 +9,35 @@ var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
9
9
  var React = require('react');
10
10
  var SidePanel_context = require('../providers/SidePanel.context.cjs');
11
11
 
12
- /** Title area with a close button, which closes the panel unless `onClose` is passed, and an optional back button. */
13
- const SidePanelHeader = ({ className, children, onClose, closeLabel, onBack, backLabel = 'Back', 'data-testid': dataTestId, ...props }) => {
12
+ /** The close button's action, name and test ids, shared by both variants. */
13
+ const useCloseButton = ({ onClose, closeLabel, 'data-testid': dataTestId }) => {
14
14
  const panel = React.useContext(SidePanel_context.SidePanelContext);
15
15
  const prefix = testIdUtils.useTestIdPrefix();
16
- return (jsxRuntime.jsxs("header", { ...props, "data-testid": dataTestId ?? (prefix ? testIdUtils.joinTestId(prefix, 'header') : undefined), className: cx.cx('relative w-full px-4 pt-6 pb-8 lg:px-6', onBack && 'flex items-center gap-3', className), children: [onBack && (jsxRuntime.jsx(UtilityButton.ButtonUtility, { icon: uiIcons.ArrowLeft, tooltip: backLabel, color: "tertiary", size: "sm",
16
+ return {
17
+ headerTestId: dataTestId ?? (prefix ? testIdUtils.joinTestId(prefix, 'header') : undefined),
18
+ closeTestId: prefix ? testIdUtils.joinTestId(prefix, 'close') : undefined,
19
+ backTestId: prefix ? testIdUtils.joinTestId(prefix, 'back') : undefined,
20
+ label: closeLabel ?? (panel ? `Close ${panel.label}` : undefined),
21
+ close: onClose ?? panel?.close,
22
+ };
23
+ };
24
+ const SidePanelTitleHeader = ({ className, children, variant: _variant, onClose, closeLabel, onBack, backLabel = 'Back', 'data-testid': dataTestId, ...props }) => {
25
+ const { headerTestId, closeTestId, backTestId, label, close } = useCloseButton({ onClose, closeLabel, 'data-testid': dataTestId });
26
+ return (jsxRuntime.jsxs("header", { ...props, "data-testid": headerTestId, className: cx.cx('relative w-full px-4 pt-6 pb-8 lg:px-6', onBack && 'flex items-center gap-3', className), children: [onBack && (jsxRuntime.jsx(UtilityButton.ButtonUtility, { icon: uiIcons.ArrowLeft, tooltip: backLabel, color: "tertiary", size: "sm",
17
27
  // 32px tall in a 28px title line: pulled in so the header is as tall as one without a back button.
18
- className: "-my-0.5", onClick: onBack, "data-testid": prefix ? testIdUtils.joinTestId(prefix, 'back') : undefined })), onBack ? jsxRuntime.jsx("div", { className: "min-w-0 flex-1 pr-12", children: children }) : children, jsxRuntime.jsx(CloseButton.CloseButton, { size: "md", label: closeLabel ?? (panel ? `Close ${panel.label}` : undefined), className: "absolute top-3 right-3 shrink-0", onClick: onClose ?? panel?.close, "data-testid": prefix ? testIdUtils.joinTestId(prefix, 'close') : undefined })] }));
28
+ className: "-my-0.5", onClick: onBack, "data-testid": backTestId })), onBack ? jsxRuntime.jsx("div", { className: "min-w-0 flex-1 pr-12", children: children }) : children, jsxRuntime.jsx(CloseButton.CloseButton, { size: "md", label: label, className: "absolute top-3 right-3 shrink-0", onClick: close, "data-testid": closeTestId })] }));
29
+ };
30
+ const SidePanelFloatingHeader = ({ className, children: _children, variant: _variant, onClose, closeLabel, onBack: _onBack, backLabel: _backLabel, 'data-testid': dataTestId, ...props }) => {
31
+ const { headerTestId, closeTestId, label, close } = useCloseButton({ onClose, closeLabel, 'data-testid': dataTestId });
32
+ return (
33
+ // A div, not header: it holds one button and no introductory content, which the embedded content's own header carries.
34
+ jsxRuntime.jsx("div", { ...props, "data-testid": headerTestId, className: cx.cx('absolute top-3 right-3 z-10', className), children: jsxRuntime.jsx(CloseButton.CloseButton, { size: "md", label: label, onClick: close, "data-testid": closeTestId }) }));
35
+ };
36
+ /** Title area with a close button, which closes the panel unless `onClose` is passed, and an optional back button. */
37
+ const SidePanelHeader = (props) => {
38
+ if (props.variant === 'floating')
39
+ return jsxRuntime.jsx(SidePanelFloatingHeader, { ...props });
40
+ return jsxRuntime.jsx(SidePanelTitleHeader, { ...props });
19
41
  };
20
42
  SidePanelHeader.displayName = 'SidePanelHeader';
21
43
 
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanelHeader.cjs","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelHeader.tsx"],"sourcesContent":[null],"names":["useContext","SidePanelContext","useTestIdPrefix","_jsxs","joinTestId","cx","_jsx","ButtonUtility","ArrowLeft","CloseButton"],"mappings":";;;;;;;;;;;AAwBA;AACO,M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A,CAC7D,CAAA,EAAA,CACK;AAEb;AACA,eAAe,CAAC,WAAW,GAAG,iBAAiB;;"}
1
+ {"version":3,"file":"SidePanelHeader.cjs","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelHeader.tsx"],"sourcesContent":[null],"names":["useContext","SidePanelContext","useTestIdPrefix","joinTestId","_jsxs","cx","_jsx","ButtonUtility","ArrowLeft","CloseButton"],"mappings":";;;;;;;;;;;AA6CA;AACA,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAA4B,KAAI;AACtG,IAAA,MAAM,KAAK,GAAGA,gBAAU,CAACC,kCAAgB,CAAC;AAC1C,IAAA,MAAM,MAAM,GAAGC,2BAAe,EAAE;IAEhC,OAAO;AACL,QAAA,YAAY,EAAE,UAAU,KAAK,MAAM,GAAGC,sBAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC;AAC/E,QAAA,WAAW,EAAE,MAAM,GAAGA,sBAAU,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;AAC7D,QAAA,UAAU,EAAE,MAAM,GAAGA,sBAAU,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;AAC3D,QAAA,KAAK,EAAE,UAAU,KAAK,KAAK,GAAG,CAAA,MAAA,EAAS,KAAK,CAAC,KAAK,CAAA,CAAE,GAAG,SAAS,CAAC;AACjE,QAAA,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,KAAK;KAC/B;AACH,CAAC;AAED,MAAM,oBAAoB,GAAG,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,OAAO,EAAE,QAAQ,EACjB,OAAO,EACP,UAAU,EACV,MAAM,EACN,SAAS,GAAG,MAAM,EAClB,aAAa,EAAE,UAAU,EACzB,GAAG,KAAK,EACoB,KAAI;IAChC,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,cAA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,EAAE,SAAS,EAAED,KAAE,CAAC,6BAA6B,EAAE,SAAS,CAAC,EAAA,QAAA,EAChGC,eAACG,uBAAW,EAAA,EAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAA,aAAA,EAAe,WAAW,EAAA,CAAI,EAAA,CAC7E;AAEV,CAAC;AAED;AACO,MAAM,eAAe,GAAG,CAAC,KAA2B,KAAI;AAC7D,IAAA,IAAI,KAAK,CAAC,OAAO,KAAK,UAAU;AAAE,QAAA,OAAOH,cAAA,CAAC,uBAAuB,EAAA,EAAA,GAAK,KAAK,GAAI;AAC/E,IAAA,OAAOA,cAAA,CAAC,oBAAoB,EAAA,EAAA,GAAK,KAAK,GAAI;AAC5C;AACA,eAAe,CAAC,WAAW,GAAG,iBAAiB;;"}
@@ -1,19 +1,38 @@
1
1
  import type { ComponentPropsWithRef } from 'react';
2
- export interface SidePanelHeaderProps extends ComponentPropsWithRef<'header'> {
2
+ interface SidePanelHeaderBaseProps {
3
3
  /** Runs instead of closing the panel when the close button is pressed. */
4
4
  onClose?: () => void;
5
5
  /** Accessible name of the close button. Defaults to "Close" followed by the panel's `aria-label`. */
6
6
  closeLabel?: string;
7
+ /** Overrides the header's `data-testid` (defaults to `<root>--header`). */
8
+ 'data-testid'?: string;
9
+ }
10
+ interface SidePanelHeaderDefaultProps extends SidePanelHeaderBaseProps, ComponentPropsWithRef<'header'> {
11
+ /** `default` is the title band above the content. */
12
+ variant?: 'default';
7
13
  /** Shows a back button before the title, for a panel that is the second step of a flow; called when it is pressed. */
8
14
  onBack?: () => void;
9
15
  /** Accessible name of the back button. Defaults to "Back". */
10
16
  backLabel?: string;
11
- /** Overrides the header's `data-testid` (defaults to `<root>--header`). */
12
- 'data-testid'?: string;
13
17
  }
18
+ interface SidePanelHeaderFloatingProps extends SidePanelHeaderBaseProps, ComponentPropsWithRef<'div'> {
19
+ /**
20
+ * `floating` takes no height: only the close button renders, over the top-right corner of the content, so
21
+ * content such as an embedded micro-frontend gets the panel's full height. The content must keep that corner,
22
+ * `--fd-side-panel-close-reserve` square, free of its own controls.
23
+ */
24
+ variant: 'floating';
25
+ /** A floating header has no title: the panel is named by `aria-label`, and the content carries its own heading. */
26
+ children?: never;
27
+ /** A floating header has no back button; it is for a single full-height view. A footer still composes below the content. */
28
+ onBack?: never;
29
+ backLabel?: never;
30
+ }
31
+ export type SidePanelHeaderProps = SidePanelHeaderDefaultProps | SidePanelHeaderFloatingProps;
14
32
  /** Title area with a close button, which closes the panel unless `onClose` is passed, and an optional back button. */
15
33
  export declare const SidePanelHeader: {
16
- ({ className, children, onClose, closeLabel, onBack, backLabel, "data-testid": dataTestId, ...props }: SidePanelHeaderProps): import("react").JSX.Element;
34
+ (props: SidePanelHeaderProps): import("react").JSX.Element;
17
35
  displayName: string;
18
36
  };
37
+ export {};
19
38
  //# sourceMappingURL=SidePanelHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanelHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelHeader.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAInD,MAAM,WAAW,oBAAqB,SAAQ,qBAAqB,CAAC,QAAQ,CAAC;IAC3E,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qGAAqG;IACrG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sHAAsH;IACtH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,sHAAsH;AACtH,eAAO,MAAM,eAAe;2GASzB,oBAAoB;;CAgCtB,CAAC"}
1
+ {"version":3,"file":"SidePanelHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelHeader.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAInD,UAAU,wBAAwB;IAChC,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qGAAqG;IACrG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,2BAA4B,SAAQ,wBAAwB,EAAE,qBAAqB,CAAC,QAAQ,CAAC;IACrG,qDAAqD;IACrD,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,sHAAsH;IACtH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,4BAA6B,SAAQ,wBAAwB,EAAE,qBAAqB,CAAC,KAAK,CAAC;IACnG;;;;OAIG;IACH,OAAO,EAAE,UAAU,CAAC;IACpB,mHAAmH;IACnH,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,4HAA4H;IAC5H,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB;AAED,MAAM,MAAM,oBAAoB,GAAG,2BAA2B,GAAG,4BAA4B,CAAC;AA0E9F,sHAAsH;AACtH,eAAO,MAAM,eAAe;YAAW,oBAAoB;;CAG1D,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { ArrowLeft } from '@flipdish/ui-icons';
3
3
  import { CloseButton } from '@flipdish/ui-library/components/atoms/CloseButton';
4
4
  import { ButtonUtility } from '@flipdish/ui-library/components/atoms/UtilityButton';
@@ -7,13 +7,35 @@ import { useTestIdPrefix, joinTestId } from '@flipdish/ui-library/utilities/test
7
7
  import { useContext } from 'react';
8
8
  import { SidePanelContext } from '../providers/SidePanel.context.js';
9
9
 
10
- /** Title area with a close button, which closes the panel unless `onClose` is passed, and an optional back button. */
11
- const SidePanelHeader = ({ className, children, onClose, closeLabel, onBack, backLabel = 'Back', 'data-testid': dataTestId, ...props }) => {
10
+ /** The close button's action, name and test ids, shared by both variants. */
11
+ const useCloseButton = ({ onClose, closeLabel, 'data-testid': dataTestId }) => {
12
12
  const panel = useContext(SidePanelContext);
13
13
  const prefix = useTestIdPrefix();
14
- return (jsxs("header", { ...props, "data-testid": dataTestId ?? (prefix ? joinTestId(prefix, 'header') : undefined), className: cx('relative w-full px-4 pt-6 pb-8 lg:px-6', onBack && 'flex items-center gap-3', className), children: [onBack && (jsx(ButtonUtility, { icon: ArrowLeft, tooltip: backLabel, color: "tertiary", size: "sm",
14
+ return {
15
+ headerTestId: dataTestId ?? (prefix ? joinTestId(prefix, 'header') : undefined),
16
+ closeTestId: prefix ? joinTestId(prefix, 'close') : undefined,
17
+ backTestId: prefix ? joinTestId(prefix, 'back') : undefined,
18
+ label: closeLabel ?? (panel ? `Close ${panel.label}` : undefined),
19
+ close: onClose ?? panel?.close,
20
+ };
21
+ };
22
+ const SidePanelTitleHeader = ({ className, children, variant: _variant, onClose, closeLabel, onBack, backLabel = 'Back', 'data-testid': dataTestId, ...props }) => {
23
+ const { headerTestId, closeTestId, backTestId, label, close } = useCloseButton({ onClose, closeLabel, 'data-testid': dataTestId });
24
+ return (jsxs("header", { ...props, "data-testid": headerTestId, className: cx('relative w-full px-4 pt-6 pb-8 lg:px-6', onBack && 'flex items-center gap-3', className), children: [onBack && (jsx(ButtonUtility, { icon: ArrowLeft, tooltip: backLabel, color: "tertiary", size: "sm",
15
25
  // 32px tall in a 28px title line: pulled in so the header is as tall as one without a back button.
16
- className: "-my-0.5", onClick: onBack, "data-testid": prefix ? joinTestId(prefix, 'back') : undefined })), onBack ? jsx("div", { className: "min-w-0 flex-1 pr-12", children: children }) : children, jsx(CloseButton, { size: "md", label: closeLabel ?? (panel ? `Close ${panel.label}` : undefined), className: "absolute top-3 right-3 shrink-0", onClick: onClose ?? panel?.close, "data-testid": prefix ? joinTestId(prefix, 'close') : undefined })] }));
26
+ className: "-my-0.5", onClick: onBack, "data-testid": backTestId })), onBack ? jsx("div", { className: "min-w-0 flex-1 pr-12", children: children }) : children, jsx(CloseButton, { size: "md", label: label, className: "absolute top-3 right-3 shrink-0", onClick: close, "data-testid": closeTestId })] }));
27
+ };
28
+ const SidePanelFloatingHeader = ({ className, children: _children, variant: _variant, onClose, closeLabel, onBack: _onBack, backLabel: _backLabel, 'data-testid': dataTestId, ...props }) => {
29
+ const { headerTestId, closeTestId, label, close } = useCloseButton({ onClose, closeLabel, 'data-testid': dataTestId });
30
+ return (
31
+ // A div, not header: it holds one button and no introductory content, which the embedded content's own header carries.
32
+ jsx("div", { ...props, "data-testid": headerTestId, className: cx('absolute top-3 right-3 z-10', className), children: jsx(CloseButton, { size: "md", label: label, onClick: close, "data-testid": closeTestId }) }));
33
+ };
34
+ /** Title area with a close button, which closes the panel unless `onClose` is passed, and an optional back button. */
35
+ const SidePanelHeader = (props) => {
36
+ if (props.variant === 'floating')
37
+ return jsx(SidePanelFloatingHeader, { ...props });
38
+ return jsx(SidePanelTitleHeader, { ...props });
17
39
  };
18
40
  SidePanelHeader.displayName = 'SidePanelHeader';
19
41
 
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanelHeader.js","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelHeader.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;AAwBA;AACO,MAAM,eAAe,GAAG,CAAC,EAC9B,SAAS,EACT,QAAQ,EACR,OAAO,EACP,UAAU,EACV,MAAM,EACN,SAAS,GAAG,MAAM,EAClB,aAAa,EAAE,UAAU,EACzB,GAAG,KAAK,EACa,KAAI;AACzB,IAAA,MAAM,KAAK,GAAG,UAAU,CAAC,gBAAgB,CAAC;AAC1C,IAAA,MAAM,MAAM,GAAG,eAAe,EAAE;IAEhC,QACEA,IAAA,CAAA,QAAA,EAAA,EAAA,GACM,KAAK,EAAA,aAAA,EACI,UAAU,KAAK,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC,EAC9E,SAAS,EAAE,EAAE,CAAC,wCAAwC,EAAE,MAAM,IAAI,yBAAyB,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,CAEtG,MAAM,KACLC,GAAA,CAAC,aAAa,EAAA,EACZ,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,SAAS,EAClB,KAAK,EAAC,UAAU,EAChB,IAAI,EAAC,IAAI;;gBAET,SAAS,EAAC,SAAS,EACnB,OAAO,EAAE,MAAM,EAAA,aAAA,EACF,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAAA,CAC5D,CACH,EACA,MAAM,GAAGA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,sBAAsB,YAAE,QAAQ,EAAA,CAAO,GAAG,QAAQ,EAC3EA,GAAA,CAAC,WAAW,EAAA,EACV,IAAI,EAAC,IAAI,EACT,KAAK,EAAE,UAAU,KAAK,KAAK,GAAG,CAAA,MAAA,EAAS,KAAK,CAAC,KAAK,EAAE,GAAG,SAAS,CAAC,EACjE,SAAS,EAAC,iCAAiC,EAC3C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,KAAK,EAAA,aAAA,EACnB,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAAA,CAC7D,CAAA,EAAA,CACK;AAEb;AACA,eAAe,CAAC,WAAW,GAAG,iBAAiB;;"}
1
+ {"version":3,"file":"SidePanelHeader.js","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelHeader.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;AA6CA;AACA,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAA4B,K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K,KAAK,GAAI;AAC/E,IAAA,OAAOA,GAAA,CAAC,oBAAoB,EAAA,EAAA,GAAK,KAAK,GAAI;AAC5C;AACA,eAAe,CAAC,WAAW,GAAG,iBAAiB;;"}
@@ -9,6 +9,12 @@ var pageCover_utils = require('../../../../utilities/__internal__/pageCoverUtils
9
9
 
10
10
  /** Width of the panel from `lg` in pixels. Matches `w-100`. Below `lg` the panel is as wide as the page. */
11
11
  const SIDE_PANEL_WIDTH = 400;
12
+ /**
13
+ * Side of the square, in pixels, that a `floating` header's close button occupies in the panel's top-right corner: the 40px
14
+ * button, its 12px inset and a 4px margin. Exposed to the content as `--fd-side-panel-close-reserve`, so a micro-frontend in
15
+ * another React root can read it from CSS.
16
+ */
17
+ const SIDE_PANEL_CLOSE_RESERVE = 56;
12
18
  // Critically damped (damping = 2 * sqrt(stiffness)): a lower damping overshoots the width by a pixel and settles back, which reads as a wobble.
13
19
  const SPRING = { type: 'spring', damping: 30, stiffness: 220 };
14
20
  const DOCKED = {
@@ -46,12 +52,13 @@ const SidePanelRegion = ({ 'aria-label': ariaLabel, children, className, content
46
52
  const motionStates = isDesktop ? DOCKED : FULL_PAGE;
47
53
  return (jsxRuntime.jsx(react.motion.aside, { ref: panelRef, "aria-label": ariaLabel, "data-testid": testId,
48
54
  // Focusable by script only, so opening can land on the region without adding a tab stop.
49
- tabIndex: -1, onFocusCapture: onFocusCapture, initial: motionStates.closed, animate: motionStates.open, exit: motionStates.closed, transition: shouldReduceMotion || hasCrossedBreakpoint ? { duration: 0 } : SPRING,
55
+ tabIndex: -1, onFocusCapture: onFocusCapture, style: { '--fd-side-panel-close-reserve': `${SIDE_PANEL_CLOSE_RESERVE}px` }, initial: motionStates.closed, animate: motionStates.open, exit: motionStates.closed, transition: shouldReduceMotion || hasCrossedBreakpoint ? { duration: 0 } : SPRING,
50
56
  // overflow-hidden clips the fixed-width content while the panel's own width animates. justify-end pins the content to the
51
57
  // right edge, which stays put, so it never sits on the animated fractional left edge where images snap to pixels and shake.
52
- className: cx.cx('flex h-full min-h-0 shrink-0 justify-end overflow-hidden bg-secondary outline-focus-ring focus-visible:outline-2 focus-visible:-outline-offset-2', !isDesktop && 'absolute inset-y-0 right-0 z-10', className), children: jsxRuntime.jsx("div", { className: cx.cx('flex h-full shrink-0 flex-col', isDesktop ? 'w-100 border-l border-secondary' : 'w-full'), children: jsxRuntime.jsx("div", { className: cx.cx('flex min-h-0 flex-1 flex-col', hasSwappedContent.current && 'animate-in fade-in duration-200 motion-reduce:animate-none'), children: children }, contentKey) }) }));
58
+ className: cx.cx('flex h-full min-h-0 shrink-0 justify-end overflow-hidden bg-secondary outline-focus-ring focus-visible:outline-2 focus-visible:-outline-offset-2', !isDesktop && 'absolute inset-y-0 right-0 z-10', className), children: jsxRuntime.jsx("div", { className: cx.cx('relative flex h-full shrink-0 flex-col', isDesktop ? 'w-100 border-l border-secondary' : 'w-full'), children: jsxRuntime.jsx("div", { className: cx.cx('flex min-h-0 flex-1 flex-col', hasSwappedContent.current && 'animate-in fade-in duration-200 motion-reduce:animate-none'), children: children }, contentKey) }) }));
53
59
  };
54
60
 
61
+ exports.SIDE_PANEL_CLOSE_RESERVE = SIDE_PANEL_CLOSE_RESERVE;
55
62
  exports.SIDE_PANEL_WIDTH = SIDE_PANEL_WIDTH;
56
63
  exports.SidePanelRegion = SidePanelRegion;
57
64
  //# sourceMappingURL=SidePanelRegion.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanelRegion.cjs","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelRegion.tsx"],"sourcesContent":[null],"names":["useRef","useIsPresent","useReducedMotion","useEffect","dispatchPageCover","usePanelFocus","_jsx","motion","cx"],"mappings":";;;;;;;;;AASA;AACO,MAAM,gBAAgB,GAAG;AAEhC;AACA,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,EAAW;AAEvE,MAAM,MAAM,GAAG;IACb,M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SAAS,CAAC;AAC3C,IAAA,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,OAAO,KAAK,SAAS;IACpEG,eAAS,CAAC,MAAK;AACb,QAAA,iBAAiB,CAAC,OAAO,GAAG,SAAS;AACvC,IAAA,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;IAEf,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS;AAEnD,IAAA,QACEG,cAAA,CAACC,YAAM,CAAC,KAAK,EAAA,EACX,GAAG,EAAE,QAAQ,EAAA,YAAA,EACD,SAAS,EAAA,aAAA,EACR,MAAM;;AAEnB,QAAA,QAAQ,EAAE,EAAE,EACZ,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,YAAY,CAAC,MAAM,EAC5B,OAAO,EAAE,YAAY,CAAC,IAAI,EAC1B,IAAI,EAAE,YAAY,CAAC,MAAM,EACzB,UAAU,EAAE,kBAAkB,IAAI,oBAAoB,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,MAAM;;;QAGjF,SAAS,EAAEC,KAAE,CACX,kJAAkJ,EAClJ,CAAC,SAAS,IAAI,iCAAiC,EAC/C,SAAS,CACV,YAGDF,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEE,KAAE,CAAC,+BAA+B,EAAE,SAAS,GAAG,iCAAiC,GAAG,QAAQ,CAAC,EAAA,QAAA,EAE3GF,cAAA,CAAA,KAAA,EAAA,EAEE,SAAS,EAAEE,KAAE,CAAC,8BAA8B,EAAE,iBAAiB,CAAC,OAAO,IAAI,4DAA4D,CAAC,EAAA,QAAA,EAEvI,QAAQ,EAAA,EAHJ,UAAU,CAIX,EAAA,CACF,EAAA,CACO;AAEnB;;;"}
1
+ {"version":3,"file":"SidePanelRegion.cjs","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelRegion.tsx"],"sourcesContent":[null],"names":["useRef","useIsPresent","useReducedMotion","useEffect","dispatchPageCover","usePanelFocus","_jsx","motion","cx"],"mappings":";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AAE,iBAAiB,CAAC,OAAO,IAAI,4DAA4D,CAAC,EAAA,QAAA,EAEvI,QAAQ,EAAA,EAHJ,UAAU,CAIX,EAAA,CACF,EAAA,CACO;AAEnB;;;;"}
@@ -1,6 +1,12 @@
1
1
  import type { ReactNode } from 'react';
2
2
  /** Width of the panel from `lg` in pixels. Matches `w-100`. Below `lg` the panel is as wide as the page. */
3
3
  export declare const SIDE_PANEL_WIDTH = 400;
4
+ /**
5
+ * Side of the square, in pixels, that a `floating` header's close button occupies in the panel's top-right corner: the 40px
6
+ * button, its 12px inset and a 4px margin. Exposed to the content as `--fd-side-panel-close-reserve`, so a micro-frontend in
7
+ * another React root can read it from CSS.
8
+ */
9
+ export declare const SIDE_PANEL_CLOSE_RESERVE = 56;
4
10
  interface SidePanelRegionProps {
5
11
  'aria-label': string;
6
12
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanelRegion.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelRegion.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,4GAA4G;AAC5G,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAepC,UAAU,oBAAoB;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,2GAA2G;AAC3G,eAAO,MAAM,eAAe,GAAI,sGAQ7B,oBAAoB,gCA4DtB,CAAC"}
1
+ {"version":3,"file":"SidePanelRegion.d.ts","sourceRoot":"","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelRegion.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtD,4GAA4G;AAC5G,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAe3C,UAAU,oBAAoB;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,2GAA2G;AAC3G,eAAO,MAAM,eAAe,GAAI,sGAQ7B,oBAAoB,gCA6DtB,CAAC"}
@@ -7,6 +7,12 @@ import { dispatchPageCover } from '../../../../utilities/__internal__/pageCoverU
7
7
 
8
8
  /** Width of the panel from `lg` in pixels. Matches `w-100`. Below `lg` the panel is as wide as the page. */
9
9
  const SIDE_PANEL_WIDTH = 400;
10
+ /**
11
+ * Side of the square, in pixels, that a `floating` header's close button occupies in the panel's top-right corner: the 40px
12
+ * button, its 12px inset and a 4px margin. Exposed to the content as `--fd-side-panel-close-reserve`, so a micro-frontend in
13
+ * another React root can read it from CSS.
14
+ */
15
+ const SIDE_PANEL_CLOSE_RESERVE = 56;
10
16
  // Critically damped (damping = 2 * sqrt(stiffness)): a lower damping overshoots the width by a pixel and settles back, which reads as a wobble.
11
17
  const SPRING = { type: 'spring', damping: 30, stiffness: 220 };
12
18
  const DOCKED = {
@@ -44,11 +50,11 @@ const SidePanelRegion = ({ 'aria-label': ariaLabel, children, className, content
44
50
  const motionStates = isDesktop ? DOCKED : FULL_PAGE;
45
51
  return (jsx(motion.aside, { ref: panelRef, "aria-label": ariaLabel, "data-testid": testId,
46
52
  // Focusable by script only, so opening can land on the region without adding a tab stop.
47
- tabIndex: -1, onFocusCapture: onFocusCapture, initial: motionStates.closed, animate: motionStates.open, exit: motionStates.closed, transition: shouldReduceMotion || hasCrossedBreakpoint ? { duration: 0 } : SPRING,
53
+ tabIndex: -1, onFocusCapture: onFocusCapture, style: { '--fd-side-panel-close-reserve': `${SIDE_PANEL_CLOSE_RESERVE}px` }, initial: motionStates.closed, animate: motionStates.open, exit: motionStates.closed, transition: shouldReduceMotion || hasCrossedBreakpoint ? { duration: 0 } : SPRING,
48
54
  // overflow-hidden clips the fixed-width content while the panel's own width animates. justify-end pins the content to the
49
55
  // right edge, which stays put, so it never sits on the animated fractional left edge where images snap to pixels and shake.
50
- className: cx('flex h-full min-h-0 shrink-0 justify-end overflow-hidden bg-secondary outline-focus-ring focus-visible:outline-2 focus-visible:-outline-offset-2', !isDesktop && 'absolute inset-y-0 right-0 z-10', className), children: jsx("div", { className: cx('flex h-full shrink-0 flex-col', isDesktop ? 'w-100 border-l border-secondary' : 'w-full'), children: jsx("div", { className: cx('flex min-h-0 flex-1 flex-col', hasSwappedContent.current && 'animate-in fade-in duration-200 motion-reduce:animate-none'), children: children }, contentKey) }) }));
56
+ className: cx('flex h-full min-h-0 shrink-0 justify-end overflow-hidden bg-secondary outline-focus-ring focus-visible:outline-2 focus-visible:-outline-offset-2', !isDesktop && 'absolute inset-y-0 right-0 z-10', className), children: jsx("div", { className: cx('relative flex h-full shrink-0 flex-col', isDesktop ? 'w-100 border-l border-secondary' : 'w-full'), children: jsx("div", { className: cx('flex min-h-0 flex-1 flex-col', hasSwappedContent.current && 'animate-in fade-in duration-200 motion-reduce:animate-none'), children: children }, contentKey) }) }));
51
57
  };
52
58
 
53
- export { SIDE_PANEL_WIDTH, SidePanelRegion };
59
+ export { SIDE_PANEL_CLOSE_RESERVE, SIDE_PANEL_WIDTH, SidePanelRegion };
54
60
  //# sourceMappingURL=SidePanelRegion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanelRegion.js","sources":["../../../../../src/components/organisms/SidePanel/components/SidePanelRegion.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;AASA;AACO,MAAM,gBAA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KAAA,EAAA,EAEE,SAAS,EAAE,EAAE,CAAC,8BAA8B,EAAE,iBAAiB,CAAC,OAAO,IAAI,4DAA4D,CAAC,EAAA,QAAA,EAEvI,QAAQ,EAAA,EAHJ,UAAU,CAIX,EAAA,CACF,EAAA,CACO;AAEnB;;"}
@@ -44,6 +44,7 @@ SidePanel.Header = SidePanelHeader.SidePanelHeader;
44
44
  SidePanel.Content = SidePanelContent.SidePanelContent;
45
45
  SidePanel.Footer = SidePanelFooter.SidePanelFooter;
46
46
 
47
+ exports.SIDE_PANEL_CLOSE_RESERVE = SidePanelRegion.SIDE_PANEL_CLOSE_RESERVE;
47
48
  exports.SIDE_PANEL_WIDTH = SidePanelRegion.SIDE_PANEL_WIDTH;
48
49
  exports.SidePanel = SidePanel;
49
50
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../src/components/organisms/SidePanel/index.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useBreakpoints","useContext","PageCoverContext","useOpenOnMount","useEffect","_jsx","SidePanelContext","TestIdProvider","AnimatePresence","SidePanelRegion","SidePanelHeader","SidePanelContent","SidePanelFooter"],"mappings":";;;;;;;;;;;;;;;AA0CA,MAAM,aAAa,GAAG,CAAC,EACrB,MAAM,EACN,YAAY,EACZ,YAAY,EAAE,SAAS,EACvB,QAAQ,EACR,UAAU,EACV,SAAS,EACT,aAAa,EAAE,UAAU,GACV,KAAe;AAC9B,IAAA,MAAM,UAAU,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;AAC3G,IAAA,MAAM,SAAS,GAAGC,6BAAc,CAAC,IAAI,CAAC;AACtC,IAAA,MAAM,cAAc,GAAGC,gBAAU,CAACC,kCAAgB,CAAC;;IAEnD,MAAM,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,GAAGC,6BAAc,CAAC,MAAM,CAAC;IAEzE,MAAM,UAAU,GAAG,kBAAkB,IAAI,MAAM,IAAI,CAAC,SAAS;IAC7DC,eAAS,CAAC,MAAK;AACb,QAAA,IAAI,CAAC,cAAc,IAAI,CAAC,UAAU;YAAE;QACpC,cAAc,CAAC,IAAI,CAAC;AACpB,QAAA,OAAO,MAAM,cAAc,CAAC,KAAK,CAAC;AACpC,IAAA,CAAC,EAAE,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AAEhC,IAAA,IAAI,CAAC,kBAAkB;AAAE,QAAA,OAAO,IAAI;AAEpC,IAAA,QACEC,cAAA,CAACC,kCAAgB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAA,QAAA,EACtFD,eAACE,0BAAc,EAAA,EAAC,KAAK,EAAE,UAAU,EAAA,QAAA,EAC/BF,cAAA,CAACG,qBAAe,EAAA,EAAC,OAAO,EAAE,KAAK,EAAA,QAAA,EAC5B,MAAM,KACLH,cAAA,CAACI,+BAAe,EAAA,EAAA,YAAA,EAEF,SAAS,EACrB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EAAA,QAAA,EAErC,QAAQ,EAAA,EARL,YAAY,CASA,CACnB,EAAA,CACe,EAAA,CACH,EAAA,CACS;AAEhC,CAAC;AACD,aAAa,CAAC,WAAW,GAAG,WAAW;AAEvC;;;;;;;AAOG;AACH,MAAM,SAAS,GAAG;AAMlB,SAAS,CAAC,MAAM,GAAGC,+BAAe;AAClC,SAAS,CAAC,OAAO,GAAGC,iCAAgB;AACpC,SAAS,CAAC,MAAM,GAAGC,+BAAe;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../src/components/organisms/SidePanel/index.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useBreakpoints","useContext","PageCoverContext","useOpenOnMount","useEffect","_jsx","SidePanelContext","TestIdProvider","AnimatePresence","SidePanelRegion","SidePanelHeader","SidePanelContent","SidePanelFooter"],"mappings":";;;;;;;;;;;;;;;AA0CA,MAAM,aAAa,GAAG,CAAC,EACrB,MAAM,EACN,YAAY,EACZ,YAAY,EAAE,SAAS,EACvB,QAAQ,EACR,UAAU,EACV,SAAS,EACT,aAAa,EAAE,UAAU,GACV,KAAe;AAC9B,IAAA,MAAM,UAAU,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;AAC3G,IAAA,MAAM,SAAS,GAAGC,6BAAc,CAAC,IAAI,CAAC;AACtC,IAAA,MAAM,cAAc,GAAGC,gBAAU,CAACC,kCAAgB,CAAC;;IAEnD,MAAM,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,GAAGC,6BAAc,CAAC,MAAM,CAAC;IAEzE,MAAM,UAAU,GAAG,kBAAkB,IAAI,MAAM,IAAI,CAAC,SAAS;IAC7DC,eAAS,CAAC,MAAK;AACb,QAAA,IAAI,CAAC,cAAc,IAAI,CAAC,UAAU;YAAE;QACpC,cAAc,CAAC,IAAI,CAAC;AACpB,QAAA,OAAO,MAAM,cAAc,CAAC,KAAK,CAAC;AACpC,IAAA,CAAC,EAAE,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AAEhC,IAAA,IAAI,CAAC,kBAAkB;AAAE,QAAA,OAAO,IAAI;AAEpC,IAAA,QACEC,cAAA,CAACC,kCAAgB,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAA,QAAA,EACtFD,eAACE,0BAAc,EAAA,EAAC,KAAK,EAAE,UAAU,EAAA,QAAA,EAC/BF,cAAA,CAACG,qBAAe,EAAA,EAAC,OAAO,EAAE,KAAK,EAAA,QAAA,EAC5B,MAAM,KACLH,cAAA,CAACI,+BAAe,EAAA,EAAA,YAAA,EAEF,SAAS,EACrB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EAAA,QAAA,EAErC,QAAQ,EAAA,EARL,YAAY,CASA,CACnB,EAAA,CACe,EAAA,CACH,EAAA,CACS;AAEhC,CAAC;AACD,aAAa,CAAC,WAAW,GAAG,WAAW;AAEvC;;;;;;;AAOG;AACH,MAAM,SAAS,GAAG;AAMlB,SAAS,CAAC,MAAM,GAAGC,+BAAe;AAClC,SAAS,CAAC,OAAO,GAAGC,iCAAgB;AACpC,SAAS,CAAC,MAAM,GAAGC,+BAAe;;;;"}
@@ -5,7 +5,7 @@ import { SidePanelHeader } from './components/SidePanelHeader';
5
5
  export type { SidePanelContentProps } from './components/SidePanelContent';
6
6
  export type { SidePanelFooterProps } from './components/SidePanelFooter';
7
7
  export type { SidePanelHeaderProps } from './components/SidePanelHeader';
8
- export { SIDE_PANEL_WIDTH } from './components/SidePanelRegion';
8
+ export { SIDE_PANEL_CLOSE_RESERVE, SIDE_PANEL_WIDTH } from './components/SidePanelRegion';
9
9
  export interface SidePanelProps {
10
10
  /**
11
11
  * Whether the panel is open. Share it with the control that opens the panel, e.g. `assistant.isOpen`
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/SidePanel/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAM/D,YAAY,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAA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AAE,MAAM,8BAA8B,CAAC;AACzE,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAE1F,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB,oEAAoE;IACpE,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,QAAQ,EAAE,SAAS,CAAC;IACpB,qIAAqI;IACrI,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qHAAqH;IACrH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,aAAa;qHAQhB,cAAc,GAAG,SAAS;;CAqC5B,CAAC;AAGF;;;;;;;GAOG;AACH,QAAA,MAAM,SAAS,EAAoB,OAAO,aAAa,GAAG;IACxD,MAAM,EAAE,OAAO,eAAe,CAAC;IAC/B,OAAO,EAAE,OAAO,gBAAgB,CAAC;IACjC,MAAM,EAAE,OAAO,eAAe,CAAC;CAChC,CAAC;AAMF,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -7,7 +7,7 @@ import { SidePanelContent } from './components/SidePanelContent.js';
7
7
  import { SidePanelFooter } from './components/SidePanelFooter.js';
8
8
  import { SidePanelHeader } from './components/SidePanelHeader.js';
9
9
  import { SidePanelRegion } from './components/SidePanelRegion.js';
10
- export { SIDE_PANEL_WIDTH } from './components/SidePanelRegion.js';
10
+ export { SIDE_PANEL_CLOSE_RESERVE, SIDE_PANEL_WIDTH } from './components/SidePanelRegion.js';
11
11
  import { useOpenOnMount } from './hooks/useOpenOnMount.js';
12
12
  import { PageCoverContext } from './providers/PageCover.context.js';
13
13
  import { SidePanelContext } from './providers/SidePanel.context.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/ui-library",
3
- "version": "0.46.1",
3
+ "version": "0.47.0",
4
4
  "description": "Flipdish Design System — atomic-design component library (Tailwind v4 + UntitledUI + React Aria).",
5
5
  "type": "module",
6
6
  "imports": {