@nimbus-ds/patterns 1.35.0-rc.1 → 1.35.0-rc.2

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/CHANGELOG.md CHANGED
@@ -6,7 +6,7 @@ Nimbus is an open-source Design System created by Tiendanube / Nuvesmhop's team
6
6
 
7
7
  #### 🎉 New features
8
8
 
9
- - Added `collapsedWidth` prop and exported the `APPSHELL_CHAT_DEFAULT_WIDTH` constant on `AppShell.Chat`, allowing consumer-controlled panel sizing. ([#PR](https://github.com/TiendaNube/nimbus-patterns/pull/PR) by [@jffs](https://github.com/jffs))
9
+ - Added a `chat` prop to `AppShell.Body` that auto-hides the body content while the chat is expanded, plus a `collapsedWidth` prop and the exported `APPSHELL_CHAT_DEFAULT_WIDTH` constant on `AppShell.Chat` for consumer-controlled panel sizing. ([#PR](https://github.com/TiendaNube/nimbus-patterns/pull/PR) by [@jffs](https://github.com/jffs))
10
10
 
11
11
  #### 🐛 Bug fixes
12
12
 
@@ -18,7 +18,15 @@ export interface AppShellHeaderProperties {
18
18
  }
19
19
  export type AppShellHeaderProps = AppShellHeaderProperties & Omit<HTMLAttributes<HTMLElement>, "color"> & Omit<BoxProperties, "display" | "justifyContent" | "position" | "top">;
20
20
  export declare const AppShellHeader: React.FC<AppShellHeaderProps>;
21
- export type AppShellBodyProps = Omit<BoxProps, "display" | "flex">;
21
+ export interface AppShellBodyProperties {
22
+ /**
23
+ * Chat region rendered alongside the body content (e.g. `AppShell.Chat`).
24
+ * It is rendered outside the content wrapper, so it stays visible while the
25
+ * body content is automatically hidden when the chat is expanded.
26
+ */
27
+ chat?: ReactNode;
28
+ }
29
+ export type AppShellBodyProps = AppShellBodyProperties & Omit<BoxProps, "display" | "flex">;
22
30
  export declare const AppShellBody: React.FC<AppShellBodyProps>;
23
31
  /**
24
32
  * Properties specific to the AppShellChat component.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/components"),require("@floating-ui/react")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/components","@floating-ui/react"],t):"object"==typeof exports?exports["@nimbus-ds/patterns"]=t(require("react"),require("@nimbus-ds/components"),require("@floating-ui/react")):e["@nimbus-ds/patterns"]=t(e.react,e["@nimbus-ds/components"],e["@floating-ui/react"])}(global,((e,t,n)=>(()=>{"use strict";var r={8713:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppShell=void 0;const r=n(5163).__importStar(n(8156)),o=n(5280),l=n(6156),a=n(6338),i=n(5128),u=({style:e,children:t,contentProperties:n,menu:a,menuProperties:u={display:{xs:"none",md:"block"}},menuExpanded:p=!0,menuExpandedWidth:c="240px",menuCollapsedWidth:s="48px",menuBehavior:f="inline",menuFlyout:d={trigger:"manual"},...h})=>{const y="popover"===f,{trigger:b="hover",open:v,defaultOpen:_=!1,onOpenChange:m,hoverOpenDelayMs:S=100,hoverCloseDelayMs:g=150,...x}=d??{},[w,A]=(0,r.useState)(_),P=v??w,O=(0,r.useCallback)((e=>{void 0===v&&A(e),m?.(e)}),[v,m]),{refs:C,context:j}=(0,l.useFloating)({open:!!y&&P,onOpenChange:O}),E=(0,l.useHover)(j,{delay:{open:S,close:g},handleClose:(0,l.safePolygon)(),enabled:"hover"===b}),M=(0,l.useFocus)(j,{enabled:"hover"===b}),T=(0,l.useDismiss)(j,{outsidePress:!0,escapeKey:!0}),H=(0,l.useRole)(j,{role:"dialog"}),{getReferenceProps:D,getFloatingProps:L}=(0,l.useInteractions)([E,M,T,H]),F=(0,r.useMemo)((()=>({isMenuPopover:!1})),[]),I=(0,r.useMemo)((()=>({isMenuPopover:!0})),[]);return r.default.createElement(o.Box,{...h,display:"flex"},a&&r.default.createElement(o.Box,{...u,width:p?c:s,height:"100vh",position:"sticky",top:"0",left:"0",borderStyle:"solid",borderWidth:"none",borderRightWidth:"1",borderColor:"neutral-surfaceDisabled",transitionProperty:"width",transitionDuration:"fast",transitionTimingFunction:"ease-out",flexShrink:p?"0":"1",ref:C.setReference,...D()},r.default.createElement(i.AppShellMenuContext.Provider,{value:F},a)),r.default.createElement(o.Box,{display:"grid",gridTemplateRows:"auto 1fr",flex:"1 1 auto",height:"100vh",width:"100%",backgroundColor:"neutral-surface",...n},t),y&&P&&r.default.createElement(i.AppShellMenuContext.Provider,{value:I},r.default.createElement(l.FloatingPortal,{id:"nimbus-popover-floating"},r.default.createElement(o.Box,{backgroundColor:"neutral-background",boxShadow:"2",borderStyle:"solid",borderWidth:"none",borderRightWidth:"1",borderColor:"neutral-surfaceDisabled",width:c,...x,position:"fixed",top:"0",left:"0",zIndex:"900",height:"100vh",ref:C.setFloating,...L()},a))))};t.AppShell=u,u.Header=a.AppShellHeader,u.Body=a.AppShellBody,u.Chat=a.AppShellChat,u.displayName="AppShell",u.Header.displayName="AppShell.Header",u.Body.displayName="AppShell.Body",u.Chat.displayName="AppShell.Chat"},3718:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(5163);r.__exportStar(n(8462),t),r.__exportStar(n(6338),t)},2545:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppShellBody=void 0;const r=n(5163).__importDefault(n(8156)),o=n(5280);t.AppShellBody=({children:e,...t})=>r.default.createElement(o.Box,{backgroundColor:"neutral-surface",width:"100%",overflow:"auto",height:"100%",...t,flex:"1 1 auto",display:"flex"},e)},1617:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppShellBody=void 0;var r=n(2545);Object.defineProperty(t,"AppShellBody",{enumerable:!0,get:function(){return r.AppShellBody}})},6572:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppShellChat=t.APPSHELL_CHAT_DEFAULT_WIDTH=void 0;const r=n(5163).__importStar(n(8156)),o=n(5280);t.APPSHELL_CHAT_DEFAULT_WIDTH="300px";const l=t.APPSHELL_CHAT_DEFAULT_WIDTH,a=({children:e,expanded:t,defaultExpanded:n=!1,collapsedWidth:a=l,...i})=>{const[u]=(0,r.useState)(n),p=t??u,c=(0,r.useRef)(null),[s,f]=(0,r.useState)(!1),[d,h]=(0,r.useState)(!1),[y,b]=(0,r.useState)({parentLeft:0,parentTop:0,collapsedWidth:a}),v=()=>{if(c.current?.parentElement){const e=c.current.getBoundingClientRect(),t=c.current.parentElement.getBoundingClientRect();b({collapsedWidth:`${e.width}px`,parentLeft:t.left,parentTop:t.top})}};(0,r.useEffect)((()=>{if(!p)return;v();const e=c.current?.parentElement,t=e&&"undefined"!=typeof ResizeObserver?new ResizeObserver(v):null;return t&&e&&t.observe(e),window.addEventListener("resize",v),()=>{t?.disconnect(),window.removeEventListener("resize",v)}}),[p]),(0,r.useEffect)((()=>{p?(v(),f(!0),requestAnimationFrame((()=>{requestAnimationFrame((()=>{h(!0)}))}))):(h(!1),f(!1))}),[p]),(0,r.useEffect)((()=>{if(!p||"undefined"==typeof document)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}),[p]);const _=Math.max(y.parentLeft,0),m=Math.max(y.parentTop,0),S=`calc(100vh - ${m}px)`,g={position:"sticky",height:"100%",maxWidth:a,minWidth:a,top:"0",flex:"1",py:"2",mx:"2"},x={position:"fixed",top:`${m}px`,right:"0",width:d?`calc(100% - ${_}px)`:y.collapsedWidth,height:S,zIndex:"500",transitionProperty:"width",transitionDuration:"fast",transitionTimingFunction:"ease-out",p:"2"};return r.default.createElement(r.default.Fragment,null,s&&r.default.createElement(o.Box,{height:"100%",maxWidth:a,minWidth:a,flex:"1",py:"2",mx:"2",pointerEvents:"none","aria-hidden":"true"}),r.default.createElement(o.Box,{...s?x:g,...i,ref:c},e))};t.AppShellChat=a,a.displayName="AppShellChat"},8444:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.APPSHELL_CHAT_DEFAULT_WIDTH=t.AppShellChat=void 0;var r=n(6572);Object.defineProperty(t,"AppShellChat",{enumerable:!0,get:function(){return r.AppShellChat}}),Object.defineProperty(t,"APPSHELL_CHAT_DEFAULT_WIDTH",{enumerable:!0,get:function(){return r.APPSHELL_CHAT_DEFAULT_WIDTH}})},3485:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppShellHeader=void 0;const r=n(5163).__importDefault(n(8156)),o=n(5280);t.AppShellHeader=({style:e,leftSlot:t,rightSlot:n,...l})=>r.default.createElement(o.Box,{padding:"2",backgroundColor:"neutral-surface",gap:"2",...l,display:"flex",justifyContent:t?"space-between":"flex-end",position:"sticky",top:"0"},t,n&&r.default.createElement(o.Box,{display:"flex",gap:{xs:"1",md:"2"}},n))},1450:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppShellHeader=void 0;const r=n(3485);var o=n(3485);Object.defineProperty(t,"AppShellHeader",{enumerable:!0,get:function(){return o.AppShellHeader}}),t.default=r.AppShellHeader},6338:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(5163);r.__exportStar(n(1450),t),r.__exportStar(n(1617),t),r.__exportStar(n(8444),t)},41:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initialAppShellMenuContextValue=void 0,t.initialAppShellMenuContextValue={isMenuPopover:!1}},8626:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useAppShellMenuContext=t.AppShellMenuContext=void 0;const r=n(8156),o=n(41);t.AppShellMenuContext=(0,r.createContext)(void 0);t.useAppShellMenuContext=(e=!0)=>{const n=(0,r.useContext)(t.AppShellMenuContext);if(void 0===n){if(!e)return o.initialAppShellMenuContextValue;throw new Error("useAppShellMenuContext must be used within an AppShell Menu")}return n}},5128:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useAppShellMenuContext=t.AppShellMenuContext=void 0;var r=n(8626);Object.defineProperty(t,"AppShellMenuContext",{enumerable:!0,get:function(){return r.AppShellMenuContext}}),Object.defineProperty(t,"useAppShellMenuContext",{enumerable:!0,get:function(){return r.useAppShellMenuContext}})},8377:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useAppShellMenuContext=t.AppShellMenuContext=void 0;var r=n(5128);Object.defineProperty(t,"AppShellMenuContext",{enumerable:!0,get:function(){return r.AppShellMenuContext}}),Object.defineProperty(t,"useAppShellMenuContext",{enumerable:!0,get:function(){return r.useAppShellMenuContext}})},8462:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.APPSHELL_CHAT_DEFAULT_WIDTH=t.useAppShellMenuContext=t.AppShell=void 0;const r=n(8713);var o=n(8713);Object.defineProperty(t,"AppShell",{enumerable:!0,get:function(){return o.AppShell}});var l=n(8377);Object.defineProperty(t,"useAppShellMenuContext",{enumerable:!0,get:function(){return l.useAppShellMenuContext}});var a=n(8444);Object.defineProperty(t,"APPSHELL_CHAT_DEFAULT_WIDTH",{enumerable:!0,get:function(){return a.APPSHELL_CHAT_DEFAULT_WIDTH}}),t.default=r.AppShell},5163:(e,t,n)=>{n.r(t),n.d(t,{__assign:()=>l,__asyncDelegator:()=>P,__asyncGenerator:()=>A,__asyncValues:()=>O,__await:()=>w,__awaiter:()=>h,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>D,__classPrivateFieldSet:()=>H,__createBinding:()=>b,__decorate:()=>i,__esDecorate:()=>p,__exportStar:()=>v,__extends:()=>o,__generator:()=>y,__importDefault:()=>M,__importStar:()=>E,__makeTemplateObject:()=>C,__metadata:()=>d,__param:()=>u,__propKey:()=>s,__read:()=>m,__rest:()=>a,__runInitializers:()=>c,__setFunctionName:()=>f,__spread:()=>S,__spreadArray:()=>x,__spreadArrays:()=>g,__values:()=>_});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function i(e,t,n,r){var o,l=arguments.length,a=l<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(a=(l<3?o(a):l>3?o(t,n,a):o(t,n))||a);return l>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function p(e,t,n,r,o,l){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,u=r.kind,p="getter"===u?"get":"setter"===u?"set":"value",c=!t&&e?r.static?e:e.prototype:null,s=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,d=n.length-1;d>=0;d--){var h={};for(var y in r)h[y]="access"===y?{}:r[y];for(var y in r.access)h.access[y]=r.access[y];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");l.push(a(e||null))};var b=(0,n[d])("accessor"===u?{get:s.get,set:s.set}:s[p],h);if("accessor"===u){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(i=a(b.get))&&(s.get=i),(i=a(b.set))&&(s.set=i),(i=a(b.init))&&o.push(i)}else(i=a(b))&&("field"===u?o.push(i):s[p]=i)}c&&Object.defineProperty(c,r.name,s),f=!0}function c(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function s(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(o,l){function a(e){try{u(r.next(e))}catch(e){l(e)}}function i(e){try{u(r.throw(e))}catch(e){l(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,i)}u((r=r.apply(e,t||[])).next())}))}function y(e,t){var n,r,o,l,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return l={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var b=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function v(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||b(t,e,n)}function _(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,l=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=l.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=l.return)&&n.call(l)}finally{if(o)throw o.error}}return a}function S(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var l=arguments[t],a=0,i=l.length;a<i;a++,o++)r[o]=l[a];return r}function x(e,t,n){if(n||2===arguments.length)for(var r,o=0,l=t.length;o<l;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function w(e){return this instanceof w?(this.v=e,this):new w(e)}function A(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),l=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){l.push([e,t,n,r])>1||i(e,t)}))})}function i(e,t){try{(n=o[e](t)).value instanceof w?Promise.resolve(n.value.v).then(u,p):c(l[0][2],n)}catch(e){c(l[0][3],e)}var n}function u(e){i("next",e)}function p(e){i("throw",e)}function c(e,t){e(t),l.shift(),l.length&&i(l[0][0],l[0][1])}}function P(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:w(e[r](t)),done:!1}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=_(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var j=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&b(t,e,n);return j(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function H(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function D(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},6156:e=>{e.exports=n},5280:e=>{e.exports=t},8156:t=>{t.exports=e}},o={};function l(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,l),n.exports}return l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l(3718)})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/components"),require("@floating-ui/react")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/components","@floating-ui/react"],t):"object"==typeof exports?exports["@nimbus-ds/patterns"]=t(require("react"),require("@nimbus-ds/components"),require("@floating-ui/react")):e["@nimbus-ds/patterns"]=t(e.react,e["@nimbus-ds/components"],e["@floating-ui/react"])}(global,((e,t,n)=>(()=>{"use strict";var r={8713:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppShell=void 0;const r=n(5163).__importStar(n(8156)),o=n(5280),l=n(6156),a=n(6338),i=n(5128),u=n(6405),p=({style:e,children:t,contentProperties:n,menu:a,menuProperties:p={display:{xs:"none",md:"block"}},menuExpanded:c=!0,menuExpandedWidth:s="240px",menuCollapsedWidth:f="48px",menuBehavior:d="inline",menuFlyout:h={trigger:"manual"},...y})=>{const b="popover"===d,{trigger:v="hover",open:_,defaultOpen:m=!1,onOpenChange:x,hoverOpenDelayMs:S=100,hoverCloseDelayMs:C=150,...A}=h??{},[g,P]=(0,r.useState)(m),w=_??g,O=(0,r.useCallback)((e=>{void 0===_&&P(e),x?.(e)}),[_,x]),{refs:j,context:E}=(0,l.useFloating)({open:!!b&&w,onOpenChange:O}),M=(0,l.useHover)(E,{delay:{open:S,close:C},handleClose:(0,l.safePolygon)(),enabled:"hover"===v}),T=(0,l.useFocus)(E,{enabled:"hover"===v}),H=(0,l.useDismiss)(E,{outsidePress:!0,escapeKey:!0}),D=(0,l.useRole)(E,{role:"dialog"}),{getReferenceProps:L,getFloatingProps:F}=(0,l.useInteractions)([M,T,H,D]),I=(0,r.useMemo)((()=>({isMenuPopover:!1})),[]),W=(0,r.useMemo)((()=>({isMenuPopover:!0})),[]),[B,R]=(0,r.useState)(!1),k=(0,r.useMemo)((()=>({chatExpanded:B,setChatExpanded:R})),[B]);return r.default.createElement(o.Box,{...y,display:"flex"},a&&r.default.createElement(o.Box,{...p,width:c?s:f,height:"100vh",position:"sticky",top:"0",left:"0",borderStyle:"solid",borderWidth:"none",borderRightWidth:"1",borderColor:"neutral-surfaceDisabled",transitionProperty:"width",transitionDuration:"fast",transitionTimingFunction:"ease-out",flexShrink:c?"0":"1",ref:j.setReference,...L()},r.default.createElement(i.AppShellMenuContext.Provider,{value:I},a)),r.default.createElement(u.AppShellChatContext.Provider,{value:k},r.default.createElement(o.Box,{display:"grid",gridTemplateRows:"auto 1fr",flex:"1 1 auto",height:"100vh",width:"100%",backgroundColor:"neutral-surface",...n},t)),b&&w&&r.default.createElement(i.AppShellMenuContext.Provider,{value:W},r.default.createElement(l.FloatingPortal,{id:"nimbus-popover-floating"},r.default.createElement(o.Box,{backgroundColor:"neutral-background",boxShadow:"2",borderStyle:"solid",borderWidth:"none",borderRightWidth:"1",borderColor:"neutral-surfaceDisabled",width:s,...A,position:"fixed",top:"0",left:"0",zIndex:"900",height:"100vh",ref:j.setFloating,...F()},a))))};t.AppShell=p,p.Header=a.AppShellHeader,p.Body=a.AppShellBody,p.Chat=a.AppShellChat,p.displayName="AppShell",p.Header.displayName="AppShell.Header",p.Body.displayName="AppShell.Body",p.Chat.displayName="AppShell.Chat"},3718:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(5163);r.__exportStar(n(8462),t),r.__exportStar(n(6338),t)},2545:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppShellBody=void 0;const r=n(5163).__importStar(n(8156)),o=n(5280),l=n(6405);t.AppShellBody=({children:e,chat:t,...n})=>{const{chatExpanded:a}=(0,l.useAppShellChatContext)(!1),i=(0,r.useRef)(null);return(0,r.useEffect)((()=>{i.current&&(a?i.current.setAttribute("inert",""):i.current.removeAttribute("inert"))}),[a]),r.default.createElement(o.Box,{backgroundColor:"neutral-surface",width:"100%",overflow:"auto",height:"100%",...n,flex:"1 1 auto",display:"flex"},r.default.createElement("div",{ref:i,style:{display:t&&a?"none":"contents"}},e),t)}},1617:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppShellBody=void 0;var r=n(2545);Object.defineProperty(t,"AppShellBody",{enumerable:!0,get:function(){return r.AppShellBody}})},6572:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppShellChat=t.APPSHELL_CHAT_DEFAULT_WIDTH=void 0;const r=n(5163).__importStar(n(8156)),o=n(5280),l=n(6405);t.APPSHELL_CHAT_DEFAULT_WIDTH="300px";const a=t.APPSHELL_CHAT_DEFAULT_WIDTH,i=({children:e,expanded:t,defaultExpanded:n=!1,collapsedWidth:i=a,...u})=>{const[p]=(0,r.useState)(n),c=t??p,{setChatExpanded:s}=(0,l.useAppShellChatContext)(!1);(0,r.useEffect)((()=>{s(c)}),[c]);const f=(0,r.useRef)(null),[d,h]=(0,r.useState)(!1),[y,b]=(0,r.useState)(!1),[v,_]=(0,r.useState)({parentLeft:0,parentTop:0,collapsedWidth:i}),m=()=>{if(f.current?.parentElement){const e=f.current.getBoundingClientRect(),t=f.current.parentElement.getBoundingClientRect();_({collapsedWidth:`${e.width}px`,parentLeft:t.left,parentTop:t.top})}};(0,r.useEffect)((()=>{if(!c)return;m();const e=f.current?.parentElement,t=e&&"undefined"!=typeof ResizeObserver?new ResizeObserver(m):null;return t&&e&&t.observe(e),window.addEventListener("resize",m),()=>{t?.disconnect(),window.removeEventListener("resize",m)}}),[c]),(0,r.useEffect)((()=>{c?(m(),h(!0),requestAnimationFrame((()=>{requestAnimationFrame((()=>{b(!0)}))}))):(b(!1),h(!1))}),[c]),(0,r.useEffect)((()=>{if(!c||"undefined"==typeof document)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}),[c]);const x=Math.max(v.parentLeft,0),S=Math.max(v.parentTop,0),C=`calc(100vh - ${S}px)`,A={position:"sticky",height:"100%",maxWidth:i,minWidth:i,top:"0",flex:"1",py:"2",mx:"2"},g={position:"fixed",top:`${S}px`,right:"0",width:y?`calc(100% - ${x}px)`:v.collapsedWidth,height:C,zIndex:"500",transitionProperty:"width",transitionDuration:"fast",transitionTimingFunction:"ease-out",p:"2"};return r.default.createElement(r.default.Fragment,null,d&&r.default.createElement(o.Box,{height:"100%",maxWidth:i,minWidth:i,flex:"1",py:"2",mx:"2",pointerEvents:"none","aria-hidden":"true"}),r.default.createElement(o.Box,{...d?g:A,...u,ref:f},e))};t.AppShellChat=i,i.displayName="AppShellChat"},8444:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.APPSHELL_CHAT_DEFAULT_WIDTH=t.AppShellChat=void 0;var r=n(6572);Object.defineProperty(t,"AppShellChat",{enumerable:!0,get:function(){return r.AppShellChat}}),Object.defineProperty(t,"APPSHELL_CHAT_DEFAULT_WIDTH",{enumerable:!0,get:function(){return r.APPSHELL_CHAT_DEFAULT_WIDTH}})},3485:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppShellHeader=void 0;const r=n(5163).__importDefault(n(8156)),o=n(5280);t.AppShellHeader=({style:e,leftSlot:t,rightSlot:n,...l})=>r.default.createElement(o.Box,{padding:"2",backgroundColor:"neutral-surface",gap:"2",...l,display:"flex",justifyContent:t?"space-between":"flex-end",position:"sticky",top:"0"},t,n&&r.default.createElement(o.Box,{display:"flex",gap:{xs:"1",md:"2"}},n))},1450:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppShellHeader=void 0;const r=n(3485);var o=n(3485);Object.defineProperty(t,"AppShellHeader",{enumerable:!0,get:function(){return o.AppShellHeader}}),t.default=r.AppShellHeader},6338:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(5163);r.__exportStar(n(1450),t),r.__exportStar(n(1617),t),r.__exportStar(n(8444),t)},1180:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initialAppShellChatContextValue=void 0,t.initialAppShellChatContextValue={chatExpanded:!1,setChatExpanded:()=>{}}},3191:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useAppShellChatContext=t.AppShellChatContext=void 0;const r=n(8156),o=n(1180);t.AppShellChatContext=(0,r.createContext)(void 0);t.useAppShellChatContext=(e=!0)=>{const n=(0,r.useContext)(t.AppShellChatContext);if(void 0===n){if(!e)return o.initialAppShellChatContextValue;throw new Error("useAppShellChatContext must be used within an AppShell")}return n}},6405:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useAppShellChatContext=t.AppShellChatContext=void 0;var r=n(3191);Object.defineProperty(t,"AppShellChatContext",{enumerable:!0,get:function(){return r.AppShellChatContext}}),Object.defineProperty(t,"useAppShellChatContext",{enumerable:!0,get:function(){return r.useAppShellChatContext}})},41:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initialAppShellMenuContextValue=void 0,t.initialAppShellMenuContextValue={isMenuPopover:!1}},8626:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useAppShellMenuContext=t.AppShellMenuContext=void 0;const r=n(8156),o=n(41);t.AppShellMenuContext=(0,r.createContext)(void 0);t.useAppShellMenuContext=(e=!0)=>{const n=(0,r.useContext)(t.AppShellMenuContext);if(void 0===n){if(!e)return o.initialAppShellMenuContextValue;throw new Error("useAppShellMenuContext must be used within an AppShell Menu")}return n}},5128:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useAppShellMenuContext=t.AppShellMenuContext=void 0;var r=n(8626);Object.defineProperty(t,"AppShellMenuContext",{enumerable:!0,get:function(){return r.AppShellMenuContext}}),Object.defineProperty(t,"useAppShellMenuContext",{enumerable:!0,get:function(){return r.useAppShellMenuContext}})},8377:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useAppShellChatContext=t.AppShellChatContext=t.useAppShellMenuContext=t.AppShellMenuContext=void 0;var r=n(5128);Object.defineProperty(t,"AppShellMenuContext",{enumerable:!0,get:function(){return r.AppShellMenuContext}}),Object.defineProperty(t,"useAppShellMenuContext",{enumerable:!0,get:function(){return r.useAppShellMenuContext}});var o=n(6405);Object.defineProperty(t,"AppShellChatContext",{enumerable:!0,get:function(){return o.AppShellChatContext}}),Object.defineProperty(t,"useAppShellChatContext",{enumerable:!0,get:function(){return o.useAppShellChatContext}})},8462:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.APPSHELL_CHAT_DEFAULT_WIDTH=t.useAppShellMenuContext=t.AppShell=void 0;const r=n(8713);var o=n(8713);Object.defineProperty(t,"AppShell",{enumerable:!0,get:function(){return o.AppShell}});var l=n(8377);Object.defineProperty(t,"useAppShellMenuContext",{enumerable:!0,get:function(){return l.useAppShellMenuContext}});var a=n(8444);Object.defineProperty(t,"APPSHELL_CHAT_DEFAULT_WIDTH",{enumerable:!0,get:function(){return a.APPSHELL_CHAT_DEFAULT_WIDTH}}),t.default=r.AppShell},5163:(e,t,n)=>{n.r(t),n.d(t,{__assign:()=>l,__asyncDelegator:()=>P,__asyncGenerator:()=>g,__asyncValues:()=>w,__await:()=>A,__awaiter:()=>h,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>D,__classPrivateFieldSet:()=>H,__createBinding:()=>b,__decorate:()=>i,__esDecorate:()=>p,__exportStar:()=>v,__extends:()=>o,__generator:()=>y,__importDefault:()=>M,__importStar:()=>E,__makeTemplateObject:()=>O,__metadata:()=>d,__param:()=>u,__propKey:()=>s,__read:()=>m,__rest:()=>a,__runInitializers:()=>c,__setFunctionName:()=>f,__spread:()=>x,__spreadArray:()=>C,__spreadArrays:()=>S,__values:()=>_});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function i(e,t,n,r){var o,l=arguments.length,a=l<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(a=(l<3?o(a):l>3?o(t,n,a):o(t,n))||a);return l>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function p(e,t,n,r,o,l){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,u=r.kind,p="getter"===u?"get":"setter"===u?"set":"value",c=!t&&e?r.static?e:e.prototype:null,s=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,d=n.length-1;d>=0;d--){var h={};for(var y in r)h[y]="access"===y?{}:r[y];for(var y in r.access)h.access[y]=r.access[y];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");l.push(a(e||null))};var b=(0,n[d])("accessor"===u?{get:s.get,set:s.set}:s[p],h);if("accessor"===u){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(i=a(b.get))&&(s.get=i),(i=a(b.set))&&(s.set=i),(i=a(b.init))&&o.push(i)}else(i=a(b))&&("field"===u?o.push(i):s[p]=i)}c&&Object.defineProperty(c,r.name,s),f=!0}function c(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function s(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(o,l){function a(e){try{u(r.next(e))}catch(e){l(e)}}function i(e){try{u(r.throw(e))}catch(e){l(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,i)}u((r=r.apply(e,t||[])).next())}))}function y(e,t){var n,r,o,l,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return l={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var b=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function v(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||b(t,e,n)}function _(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,l=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=l.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=l.return)&&n.call(l)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function S(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var l=arguments[t],a=0,i=l.length;a<i;a++,o++)r[o]=l[a];return r}function C(e,t,n){if(n||2===arguments.length)for(var r,o=0,l=t.length;o<l;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function A(e){return this instanceof A?(this.v=e,this):new A(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),l=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){l.push([e,t,n,r])>1||i(e,t)}))})}function i(e,t){try{(n=o[e](t)).value instanceof A?Promise.resolve(n.value.v).then(u,p):c(l[0][2],n)}catch(e){c(l[0][3],e)}var n}function u(e){i("next",e)}function p(e){i("throw",e)}function c(e,t){e(t),l.shift(),l.length&&i(l[0][0],l[0][1])}}function P(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:A(e[r](t)),done:!1}:o?o(t):t}:o}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=_(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var j=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&b(t,e,n);return j(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function T(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function H(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function D(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},6156:e=>{e.exports=n},5280:e=>{e.exports=t},8156:t=>{t.exports=e}},o={};function l(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,l),n.exports}return l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l(3718)})()));
package/dist/CHANGELOG.md CHANGED
@@ -6,7 +6,7 @@ Nimbus is an open-source Design System created by Tiendanube / Nuvesmhop's team
6
6
 
7
7
  #### 🎉 New features
8
8
 
9
- - Added `collapsedWidth` prop and exported the `APPSHELL_CHAT_DEFAULT_WIDTH` constant on `AppShell.Chat`, allowing consumer-controlled panel sizing. ([#PR](https://github.com/TiendaNube/nimbus-patterns/pull/PR) by [@jffs](https://github.com/jffs))
9
+ - Added a `chat` prop to `AppShell.Body` that auto-hides the body content while the chat is expanded, plus a `collapsedWidth` prop and the exported `APPSHELL_CHAT_DEFAULT_WIDTH` constant on `AppShell.Chat` for consumer-controlled panel sizing. ([#PR](https://github.com/TiendaNube/nimbus-patterns/pull/PR) by [@jffs](https://github.com/jffs))
10
10
 
11
11
  #### 🐛 Bug fixes
12
12
 
package/dist/index.d.ts CHANGED
@@ -23,7 +23,15 @@ export interface AppShellHeaderProperties {
23
23
  }
24
24
  export type AppShellHeaderProps = AppShellHeaderProperties & Omit<HTMLAttributes<HTMLElement>, "color"> & Omit<BoxProperties, "display" | "justifyContent" | "position" | "top">;
25
25
  declare const AppShellHeader: React.FC<AppShellHeaderProps>;
26
- export type AppShellBodyProps = Omit<BoxProps, "display" | "flex">;
26
+ export interface AppShellBodyProperties {
27
+ /**
28
+ * Chat region rendered alongside the body content (e.g. `AppShell.Chat`).
29
+ * It is rendered outside the content wrapper, so it stays visible while the
30
+ * body content is automatically hidden when the chat is expanded.
31
+ */
32
+ chat?: ReactNode;
33
+ }
34
+ export type AppShellBodyProps = AppShellBodyProperties & Omit<BoxProps, "display" | "flex">;
27
35
  declare const AppShellBody: React.FC<AppShellBodyProps>;
28
36
  /**
29
37
  * Properties specific to the AppShellChat component.