@wallarm-org/claude-design 4.14.0 → 4.15.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 (41) hide show
  1. package/dist/SETUP.md +7 -7
  2. package/dist/UPDATE.md +9 -9
  3. package/dist/project/components/AppShell/stories.js +1 -1
  4. package/dist/project/components/AppShell/stories.md +2 -2
  5. package/dist/project/components/ApprovalCard/README.md +30 -1
  6. package/dist/project/components/ApprovalCard/stories.js +2 -2
  7. package/dist/project/components/Attribute/README.md +48 -0
  8. package/dist/project/components/Attribute/stories.js +2 -2
  9. package/dist/project/components/Avatar/README.md +46 -1
  10. package/dist/project/components/Avatar/stories.js +1 -1
  11. package/dist/project/components/ChainOfThought/README.md +38 -0
  12. package/dist/project/components/ChainOfThought/stories.js +1 -1
  13. package/dist/project/components/Chat/README.md +2 -2
  14. package/dist/project/components/Drawer/README.md +73 -0
  15. package/dist/project/components/Drawer/stories.js +1 -1
  16. package/dist/project/components/DropdownMenu/README.md +64 -1
  17. package/dist/project/components/DropdownMenu/stories.js +1 -1
  18. package/dist/project/components/FilterDropdown/README.md +1014 -0
  19. package/dist/project/components/FilterDropdown/stories.js +1 -1
  20. package/dist/project/components/FilterInput/README.md +6 -0
  21. package/dist/project/components/FilterInput/stories.js +1 -1
  22. package/dist/project/components/FilterInput/stories.md +25 -0
  23. package/dist/project/components/NotificationCenter/stories.md +2 -2
  24. package/dist/project/components/RemoteShell/README.md +2 -2
  25. package/dist/project/components/SearchModal/README.md +4 -4
  26. package/dist/project/components/SearchModal/stories.js +1 -1
  27. package/dist/project/components/Select/README.md +47 -0
  28. package/dist/project/components/Select/stories.js +1 -1
  29. package/dist/project/components/Table/README.md +8 -0
  30. package/dist/project/components/Table/stories.js +2 -2
  31. package/dist/project/components/Table/stories.md +117 -0
  32. package/dist/project/components/Tag/README.md +45 -0
  33. package/dist/project/components/Tag/stories.js +1 -1
  34. package/dist/project/components/Timeline/README.md +75 -0
  35. package/dist/project/components/Timeline/stories.js +1 -1
  36. package/dist/project/components/bundle.css +16 -0
  37. package/dist/project/components/bundle.js +11 -11
  38. package/dist/project/components/index.d.ts +73 -5
  39. package/dist/project/design-system.json +4 -4
  40. package/dist/project/tokens.json +2 -2
  41. package/package.json +2 -2
@@ -9,4 +9,4 @@ var e={vD(e,t,r){let l,i;/**
9
9
  * @nolint
10
10
  * @preventMunge
11
11
  * @preserve-invariant-messages
12
- */var n,a,o=Object.create,c=Object.defineProperty,s=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,d=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,u=(e,t,r,l)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of h(t))m.call(e,i)||i===r||c(e,i,{get:()=>t[i],enumerable:!(l=s(t,i))||l.enumerable});return e},f={},p={$dispatcherGuard:()=>N,$makeReadOnly:()=>I,$reset:()=>W,$structuralCheck:()=>$,c:()=>D,clearRenderCounterRegistry:()=>z,renderCounterRegistry:()=>E,useRenderCounter:()=>M};for(var y in p)c(f,y,{get:p[y],enumerable:!0});e.exports=u(c({},"__esModule",{value:!0}),f);var w=(i=null!=(l=r("C"))?o(d(l)):{},u(l&&l.__esModule?i:c(i,"default",{value:l,enumerable:!0}),l)),{useRef:g,useEffect:_,isValidElement:b}=w,S=null!=(n=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?n:w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for("react.memo_cache_sentinel"),D="function"==typeof(null==(a=w.__COMPILER_RUNTIME)?void 0:a.c)?w.__COMPILER_RUNTIME.c:function(e){return w.useMemo(()=>{let t=Array(e);for(let r=0;r<e;r++)t[r]=v;return t[v]=!0,t},[])},C={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{C[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var O=null;function x(e){return S.ReactCurrentDispatcher.current=e,S.ReactCurrentDispatcher.current}C.useMemoCache=e=>{if(null!=O)return O.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var R=[];function N(e){let t=S.ReactCurrentDispatcher.current;if(0===e){if(R.push(t),1===R.length&&(O=t),t===C)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");x(C)}else if(1===e){let e=R.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===R.length&&(O=null),x(e)}else if(2===e)R.push(t),x(O);else if(3===e){let e=R.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");x(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function W(e){for(let t=0;t<e.length;t++)e[t]=v}function I(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var E=new Map;function z(){for(let e of E.values())e.forEach(e=>{e.count=0})}function M(e){let t=g(null);null!=t.current&&(t.current.count+=1),_(()=>{if(null==t.current){let r,l={count:0};null==(r=E.get(e))&&(r=new Set,E.set(e,r)),r.add(l),t.current=l}return()=>{var r;let l;null!==t.current&&(r=t.current,null!=(l=E.get(e))&&l.delete(r))}})}var T=new Set;function $(e,t,r,l,i,n){function a(e,t,a,o){let c=`${l}:${n} [${i}] ${r}${a} changed from ${e} to ${t} at depth ${o}`;T.has(c)||(T.add(c),console.error(c))}!function e(t,r,l,i){if(!(i>2)){if(t!==r)if(typeof t!=typeof r)a(`type ${typeof t}`,`type ${typeof r}`,l,i);else if("object"==typeof t){let n=Array.isArray(t),o=Array.isArray(r);if(null===t&&null!==r)a("null",`type ${typeof r}`,l,i);else if(null===r)a(`type ${typeof t}`,"null",l,i);else if(t instanceof Map)if(r instanceof Map)if(t.size!==r.size)a(`Map instance with size ${t.size}`,`Map instance with size ${r.size}`,l,i);else for(let[n,o]of t)r.has(n)?e(o,r.get(n),`${l}.get(${n})`,i+1):a(`Map instance with key ${n}`,`Map instance without key ${n}`,l,i);else a("Map instance","other value",l,i);else if(r instanceof Map)a("other value","Map instance",l,i);else if(t instanceof Set)if(r instanceof Set)if(t.size!==r.size)a(`Set instance with size ${t.size}`,`Set instance with size ${r.size}`,l,i);else for(let e of r)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,l,i);else a("Set instance","other value",l,i);else if(r instanceof Set)a("other value","Set instance",l,i);else if(n||o)if(n!==o)a(`type ${n?"array":"object"}`,`type ${o?"array":"object"}`,l,i);else if(t.length!==r.length)a(`array with length ${t.length}`,`array with length ${r.length}`,l,i);else for(let n=0;n<t.length;n++)e(t[n],r[n],`${l}[${n}]`,i+1);else if(b(t)||b(r))b(t)!==b(r)?a(`type ${b(t)?"React element":"object"}`,`type ${b(r)?"React element":"object"}`,l,i):t.type!==r.type?a(`React element of type ${t.type}`,`React element of type ${r.type}`,l,i):e(t.props,r.props,`[props of ${l}]`,i+1);else{for(let e in r)e in t||a(`object without key ${e}`,`object with key ${e}`,l,i);for(let n in t)n in r?e(t[n],r[n],`${l}.${n}`,i+1):a(`object with key ${n}`,`object without key ${n}`,l,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(r)?isNaN(t)!==isNaN(r)&&a(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(r)?"NaN":"non-NaN value"}`,l,i):t!==r&&a(t,r,l,i)}}}(e,t,"",0)}},p(e,t,r){let l=new WeakMap,i=new WeakMap;function n(e,t,r){let n=t,a=r;if("object"==typeof n&&null!==n&&"$$typeof"in n&&n.$$typeof===Symbol.for("react.context")&&"Provider"in n&&(n=n.Provider),"function"==typeof n&&null!=a.ref&&!n.prototype?.isReactComponent){let t=n,r=l.get(e);r||(r=new WeakMap,l.set(e,r));let i=r.get(t);i||((i=e.forwardRef((e,r)=>t({...e,ref:r}))).displayName=t.displayName??t.name,r.set(t,i)),n=i}if("string"==typeof n&&"boolean"==typeof a.inert&&((a={...a}).inert?a.inert="":delete a.inert),"string"==typeof n)for(let[e,t]of[["fill-rule","fillRule"],["clip-rule","clipRule"]])e in a&&(a={...a,[t]:a[e]},delete a[e]);return"string"==typeof n&&null!=a.ref&&(n=function(e,t){let r=i.get(e);r||(r=new Map,i.set(e,r));let l=r.get(t);if(l)return l;let n=e.forwardRef((r,l)=>{let i=e.useRef(null);if(!i.current||i.current.original!==l){let e;i.current={original:l,callback:t=>{if(null==t&&e){let t=e;e=void 0,t();return}if("function"==typeof l){let r=l(t);e="function"==typeof r?r:void 0}else l&&(l.current=t)}}}return e.createElement(t,{...r,ref:i.current.callback})});return n.displayName=`CanvasHost(${t})`,r.set(t,n),n}(e,n)),{type:n,props:a}}function a(e){let t=(t,r,l)=>{let i=n(e,t,r??{});return e.createElement(i.type,void 0===l?i.props:{...i.props,key:l})};return{jsx:t,jsxs:(t,r,l)=>{let i=n(e,t,r??{}),{children:a,...o}=i.props;return e.createElement(i.type,void 0===l?o:{...o,key:l},...Array.isArray(a)?a:[a])},jsxDEV:t,Fragment:e.Fragment}}function o(e){return{...e,createElement:(t,r,...l)=>{let i=n(e,t,r??{});return e.createElement(i.type,i.props,...l)},cloneElement:(t,r,...l)=>{let i=e.cloneElement(t,r??void 0,...l),a=i.ref,o=n(e,i.type,{...i.props,ref:a});return o.type===i.type&&"string"!=typeof i.type?i:e.createElement(o.type,{...o.props,key:i.key})}}}r.d(t,{MA:()=>a,YJ:()=>o})},C(e,t,r){r.r(t);let l=(0,r("p").YJ)(window.React),{Children:i,Component:n,Fragment:a,Profiler:o,PureComponent:c,StrictMode:s,Suspense:h,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:d,act:m,cloneElement:u,createContext:f,createElement:p,createFactory:y,createRef:w,forwardRef:g,isValidElement:_,lazy:b,memo:S,startTransition:v,unstable_act:D,useCallback:C,useContext:O,useDebugValue:x,useDeferredValue:R,useEffect:N,useId:W,useImperativeHandle:I,useInsertionEffect:E,useLayoutEffect:z,useMemo:M,useReducer:T,useRef:$,useState:V,useSyncExternalStore:k,useTransition:A,version:j,use:L}=l;r.d(t,{},{Children:i,Component:n,Fragment:a,Profiler:o,PureComponent:c,StrictMode:s,Suspense:h,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:d,act:m,cloneElement:u,createContext:f,createElement:p,createFactory:y,createRef:w,default:l,forwardRef:g,isValidElement:_,lazy:b,memo:S,startTransition:v,unstable_act:D,use:L,useCallback:C,useContext:O,useDebugValue:x,useDeferredValue:R,useEffect:N,useId:W,useImperativeHandle:I,useInsertionEffect:E,useLayoutEffect:z,useMemo:M,useReducer:T,useRef:$,useState:V,useSyncExternalStore:k,useTransition:A,version:j})}},t={};function r(l){var i=t[l];if(void 0!==i)return i.exports;var n=t[l]={exports:{}};return e[l](n,n.exports,r),n.exports}r.d=(e,t,l)=>{var i=(t,l)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[l]:t[i]})};i(t,"get"),i(l,"value")},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let{jsx:e,jsxs:t,jsxDEV:l,Fragment:i}=(0,r("p").MA)(window.React);var n=r("vD"),a=r("C"),o=Object.defineProperty,c=(e,t,r)=>{let l;return(l="symbol"!=typeof t?t+"":t)in e?o(e,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[l]=r},s=e=>null!=e&&"object"==typeof e&&!Array.isArray(e),h=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);Function.prototype.toString.call(Object);var d=e=>e?.constructor.name==="Array",m=(e,t)=>{if(Object.is(e,t))return!0;if(null==e&&null!=t||null!=e&&null==t)return!1;if("function"==typeof e?.isEqual&&"function"==typeof t?.isEqual)return e.isEqual(t);if("function"==typeof e&&"function"==typeof t)return e.toString()===t.toString();if(d(e)&&d(t))return((e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!m(e[r],t[r]))return!1;return!0})(Array.from(e),Array.from(t));if("object"!=typeof e||"object"!=typeof t)return!1;let r=Object.keys(t??Object.create(null)),l=r.length;for(let t=0;t<l;t++)if(!Reflect.has(e,r[t]))return!1;for(let i=0;i<l;i++){let l=r[i];if(!m(e[l],t[l]))return!1}return!0},u={itemToValue:e=>"string"==typeof e?e:s(e)&&h(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:s(e)&&h(e,"label")?e.label:u.itemToValue(e),isItemDisabled:e=>!!(s(e)&&h(e,"disabled"))&&!!e.disabled},f=class e{constructor(t){c(this,"options",t),c(this,"items"),c(this,"indexMap",null),c(this,"copy",t=>new e({...this.options,items:t??[...this.items]})),c(this,"isEqual",e=>m(this.items,e.items)),c(this,"setItems",e=>this.copy(e)),c(this,"getValues",(e=this.items)=>{let t=[];for(let r of e){let e=this.getItemValue(r);null!=e&&t.push(e)}return t}),c(this,"find",e=>{if(null==e)return null;let t=this.indexOf(e);return -1!==t?this.at(t):null}),c(this,"findMany",e=>{let t=[];for(let r of e){let e=this.find(r);null!=e&&t.push(e)}return t}),c(this,"at",e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0;for(let[,r]of this.group())for(let l of r){if(t===e)return l;t++}return null}),c(this,"sortFn",(e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0)),c(this,"sort",e=>[...e].sort(this.sortFn.bind(this))),c(this,"getItemValue",e=>null==e?null:this.options.itemToValue?.(e)??u.itemToValue(e)),c(this,"getItemDisabled",e=>null!=e&&(this.options.isItemDisabled?.(e)??u.isItemDisabled(e))),c(this,"stringifyItem",e=>null==e?null:this.options.itemToString?.(e)??u.itemToString(e)),c(this,"stringify",e=>null==e?null:this.stringifyItem(this.find(e))),c(this,"stringifyItems",(e,t=", ")=>{let r=[];for(let t of e){let e=this.stringifyItem(t);null!=e&&r.push(e)}return r.join(t)}),c(this,"stringifyMany",(e,t)=>this.stringifyItems(this.findMany(e),t)),c(this,"has",e=>-1!==this.indexOf(e)),c(this,"hasItem",e=>null!=e&&this.has(this.getItemValue(e))),c(this,"group",()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[["",[...this.items]]];let r=new Map;this.items.forEach((t,l)=>{let i=e(t,l);r.has(i)||r.set(i,[]),r.get(i).push(t)});let l=Array.from(r.entries());return t&&l.sort(([e],[r])=>{if("function"==typeof t)return t(e,r);if(Array.isArray(t)){let l=t.indexOf(e),i=t.indexOf(r);return -1===l?1:-1===i?-1:l-i}return"asc"===t?e.localeCompare(r):"desc"===t?r.localeCompare(e):0}),l}),c(this,"getNextValue",(e,t=1,r=!1)=>{let l=this.indexOf(e);if(-1===l)return null;for(l=r?Math.min(l+t,this.size-1):l+t;l<=this.size&&this.getItemDisabled(this.at(l));)l++;return this.getItemValue(this.at(l))}),c(this,"getPreviousValue",(e,t=1,r=!1)=>{let l=this.indexOf(e);if(-1===l)return null;for(l=r?Math.max(l-t,0):l-t;l>=0&&this.getItemDisabled(this.at(l));)l--;return this.getItemValue(this.at(l))}),c(this,"indexOf",e=>{if(null==e)return -1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(t=>this.getItemValue(t)===e);if(!this.indexMap){this.indexMap=new Map;let e=0;for(let[,t]of this.group())for(let r of t){let t=this.getItemValue(r);null!=t&&this.indexMap.set(t,e),e++}}return this.indexMap.get(e)??-1}),c(this,"getByText",(e,t)=>{let r=null!=t?this.indexOf(t):-1,l=1===e.length;for(let i=0;i<this.items.length;i++){let n=this.items[(r+i+1)%this.items.length];if((!l||this.getItemValue(n)!==t)&&!this.getItemDisabled(n)&&p(this.stringifyItem(n),e))return n}}),c(this,"search",(e,t)=>{let{state:r,currentValue:l,timeout:i=350}=t,n=r.keysSoFar+e,a=n.length>1&&Array.from(n).every(e=>e===n[0])?n[0]:n,o=this.getByText(a,l),c=this.getItemValue(o);function s(){clearTimeout(r.timer),r.timer=-1}return!function e(t){r.keysSoFar=t,s(),""!==t&&(r.timer=+setTimeout(()=>{e(""),s()},i))}(n),c}),c(this,"update",(e,t)=>{let r=this.indexOf(e);return -1===r?this:this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])}),c(this,"upsert",(e,t,r="append")=>{let l=this.indexOf(e);return -1===l?("append"===r?this.append:this.prepend)(t):this.copy([...this.items.slice(0,l),t,...this.items.slice(l+1)])}),c(this,"insert",(e,...t)=>this.copy(y(this.items,e,...t))),c(this,"insertBefore",(e,...t)=>{let r=this.indexOf(e);if(-1===r)if(0!==this.items.length)return this;else r=0;return this.copy(y(this.items,r,...t))}),c(this,"insertAfter",(e,...t)=>{let r=this.indexOf(e);if(-1===r)if(0!==this.items.length)return this;else r=0;return this.copy(y(this.items,r+1,...t))}),c(this,"prepend",(...e)=>this.copy(y(this.items,0,...e))),c(this,"append",(...e)=>this.copy(y(this.items,this.items.length,...e))),c(this,"filter",e=>{let t=this.items.filter((t,r)=>e(this.stringifyItem(t),r,t));return this.copy(t)}),c(this,"remove",(...e)=>{let t=e.map(e=>"string"==typeof e?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let r=this.getItemValue(e);return null!=r&&!t.includes(r)}))}),c(this,"move",(e,t)=>{let r=this.indexOf(e);return -1===r?this:this.copy(w(this.items,[r],t))}),c(this,"moveBefore",(e,...t)=>{let r=this.items.findIndex(t=>this.getItemValue(t)===e);if(-1===r)return this;let l=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(w(this.items,l,r))}),c(this,"moveAfter",(e,...t)=>{let r=this.items.findIndex(t=>this.getItemValue(t)===e);if(-1===r)return this;let l=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(w(this.items,l,r+1))}),c(this,"reorder",(e,t)=>this.copy(w(this.items,[e],t))),c(this,"compareValue",(e,t)=>{let r=this.indexOf(e),l=this.indexOf(t);return r<l?-1:+(r>l)}),c(this,"range",(e,t)=>{let r=[],l=e;for(;null!=l;){if(this.find(l)&&r.push(l),l===t)return r;l=this.getNextValue(l)}return[]}),c(this,"getValueRange",(e,t)=>e&&t?0>=this.compareValue(e,t)?this.range(e,t):this.range(t,e):[]),c(this,"toString",()=>{let e="";for(let t of this.items)e+=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(":")+",";return e}),c(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},p=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function y(e,t,...r){return[...e.slice(0,t),...r,...e.slice(t)]}function w(e,t,r){let l=(t=[...t].sort((e,t)=>e-t)).map(t=>e[t]);for(let r=t.length-1;r>=0;r--)e=[...e.slice(0,t[r]),...e.slice(t[r]+1)];return r=Math.max(0,r-t.filter(e=>e<r).length),[...e.slice(0,r),...l,...e.slice(r)]}let g=window.WallarmDS.Icons.PanelRight,_=window.WallarmDS.Attribute,b=window.WallarmDS.AttributeLabel,S=window.WallarmDS.AttributeValue,v=window.WallarmDS.Button,D=window.WallarmDS.Dialog,C=window.WallarmDS.DialogBody,O=window.WallarmDS.DialogContent,x=window.WallarmDS.DialogHeader,R=window.WallarmDS.DialogTitle,N=window.WallarmDS.DialogTrigger,W=window.WallarmDS.DropdownMenu,I=window.WallarmDS.DropdownMenuContent,E=window.WallarmDS.DropdownMenuItem,z=window.WallarmDS.DropdownMenuTrigger,M=window.WallarmDS.Input,T=window.WallarmDS.OverflowList,$=window.WallarmDS.Select,V=window.WallarmDS.SelectButton,k=window.WallarmDS.SelectContent,A=window.WallarmDS.SelectOption,j=window.WallarmDS.SelectOptionIndicator,L=window.WallarmDS.SelectOptionText,P=window.WallarmDS.SelectPositioner,B=window.WallarmDS.HStack,F=window.WallarmDS.VStack,H=window.WallarmDS.Switch,U=window.WallarmDS.SwitchControl,Y=window.WallarmDS.SwitchLabel,q=window.WallarmDS.Tabs,G=window.WallarmDS.TabsContent,J=window.WallarmDS.TabsList,X=window.WallarmDS.TabsTrigger,Z=window.WallarmDS.Tag,Q=window.WallarmDS.Text,K=window.WallarmDS.Drawer,ee=window.WallarmDS.DrawerBody,et=window.WallarmDS.DrawerClose,er=window.WallarmDS.DrawerContent,el=window.WallarmDS.DrawerDescription,ei=window.WallarmDS.DrawerFooter,en=window.WallarmDS.DrawerFooterControls,ea=window.WallarmDS.DrawerHeader,eo=window.WallarmDS.DrawerResizeHandle,ec=window.WallarmDS.DrawerTitle,es=window.WallarmDS.DrawerTrigger,eh={title:"Overlay/Drawer",component:K,subcomponents:{DrawerTrigger:es,DrawerContent:er,DrawerHeader:ea,DrawerDescription:el,DrawerBody:ee,DrawerFooter:ei,DrawerClose:et,DrawerResizeHandle:eo},parameters:{layout:"centered",docs:{description:{component:"A side panel for work the reader does alongside the page — its differentiator is that it can run non-modal, so with `modal={false}` they can keep using what is behind it. Reach for `Dialog` when the panel is a decision to resolve now, since that is the same panel with the exit closed off."}}},argTypes:{open:{control:{type:"boolean"},description:"Whether the drawer is open"},width:{control:{type:"number"},description:"Initial width of the drawer. Presets: small=640, medium=960, large=1130",defaultValue:640},minWidth:{control:{type:"number"},description:"Minimum width when resizing",defaultValue:400},maxWidth:{control:{type:"number"},description:"Maximum width when resizing",defaultValue:1130}},decorators:[]},ed=t=>{let r,l,i=(0,n.c)(6),{fillHeight:a,height:o}=t,c=void 0!==a&&a,s=`w-full rounded-12 bg-bg-surface-5 ${c?"flex-1 min-h-0":""}`;return i[0]!==c||i[1]!==o?(r=o?{height:`${o}px`}:c?void 0:{height:"200px"},i[0]=c,i[1]=o,i[2]=r):r=i[2],i[3]!==s||i[4]!==r?(l=e("div",{className:s,style:r}),i[3]=s,i[4]=r,i[5]=l):l=i[5],l},em=["api-abuse","account-takeover","credential-stuffing","XSS","SQL Injection","CSRF","scanner","brute-force","data-exfiltration"];function eu(t){return e(Z,{"data-testid":"tag",children:t},t)}function ef(t,r){return e(ed,{height:100},r)}function ep(r){return t(A,{item:r,children:[e(L,{children:r.label}),e(j,{})]},r.value)}let ey=[{name:"Basic",story:()=>{let r,l,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open Drawer"})}),a[0]=r):r=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ea,{children:e(ec,{children:"Drawer Title"})}),a[1]=l):l=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(K,{"data-testid":"drawer",children:[r,t(er,{children:[l,e(ee,{children:e(ed,{fillHeight:!0})})]})]}),a[2]=i):i=a[2],i},meta:eh},{name:"WithFooter",story:()=>{let r,l,i,a,o=(0,n.c)(4);return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open Drawer"})}),o[0]=r):r=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ea,{children:e(ec,{children:"Drawer's title"})}),o[1]=l):l=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(ee,{children:e(ed,{fillHeight:!0})}),o[2]=i):i=o[2],o[3]===Symbol.for("react.memo_cache_sentinel")?(a=t(K,{children:[r,t(er,{children:[l,i,e(ei,{children:t(en,{children:[e(v,{variant:"ghost",color:"neutral",size:"large",children:"Button"}),e(v,{variant:"primary",color:"brand",size:"large",children:"Button"})]})})]})]}),o[3]=a):a=o[3],a},meta:eh},{name:"WithDescription",story:()=>{let r,l,i,a,o=(0,n.c)(4);return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open Drawer"})}),o[0]=r):r=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(l=t(ea,{children:[e(ec,{children:"Drawer's title"}),e(el,{children:"Description TBD"})]}),o[1]=l):l=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(ee,{children:e(ed,{fillHeight:!0})}),o[2]=i):i=o[2],o[3]===Symbol.for("react.memo_cache_sentinel")?(a=t(K,{children:[r,t(er,{children:[l,i,e(ei,{children:t(en,{children:[e(v,{variant:"ghost",color:"neutral",size:"large",children:"Button"}),e(v,{variant:"primary",color:"brand",size:"large",children:"Button"})]})})]})]}),o[3]=a):a=o[3],a},meta:eh},{name:"WithFooterLeftActions",story:()=>{let r,l,i,a,o,c=(0,n.c)(5);return c[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open with Footer Actions"})}),c[0]=r):r=c[0],c[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ea,{children:e(ec,{children:"Footer with Left Actions"})}),c[1]=l):l=c[1],c[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(ee,{children:e(ed,{fillHeight:!0})}),c[2]=i):i=c[2],c[3]===Symbol.for("react.memo_cache_sentinel")?(a=e(en,{placement:"left",children:t(H,{children:[e(U,{}),e(Y,{children:"Remember choice"})]})}),c[3]=a):a=c[3],c[4]===Symbol.for("react.memo_cache_sentinel")?(o=t(K,{children:[r,t(er,{children:[l,i,t(ei,{children:[a,e(et,{asChild:!0,children:e(v,{variant:"ghost",color:"neutral",size:"large",children:"Cancel"})}),e(v,{variant:"primary",color:"brand",size:"large",children:"Apply"})]})]})]}),c[4]=o):o=c[4],o},meta:eh},{name:"Sizes",story:()=>{let r,l,i,a,o,c,s,h,d,m=(0,n.c)(9);return m[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:t(v,{variant:"outline",color:"neutral",children:["Open Small (",640,"px)"]})}),m[0]=r):r=m[0],m[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ea,{children:t(ec,{children:["Small Drawer (",640,"px)"]})}),m[1]=l):l=m[1],m[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(K,{width:640,children:[r,t(er,{children:[l,e(ee,{children:e(ed,{fillHeight:!0})})]})]}),m[2]=i):i=m[2],m[3]===Symbol.for("react.memo_cache_sentinel")?(a=e(es,{asChild:!0,children:t(v,{variant:"outline",color:"neutral",children:["Open Medium (",960,"px)"]})}),m[3]=a):a=m[3],m[4]===Symbol.for("react.memo_cache_sentinel")?(o=e(ea,{children:t(ec,{children:["Medium Drawer (",960,"px)"]})}),m[4]=o):o=m[4],m[5]===Symbol.for("react.memo_cache_sentinel")?(c=t(K,{width:960,children:[a,t(er,{children:[o,e(ee,{children:e(ed,{fillHeight:!0})})]})]}),m[5]=c):c=m[5],m[6]===Symbol.for("react.memo_cache_sentinel")?(s=e(es,{asChild:!0,children:t(v,{variant:"outline",color:"neutral",children:["Open Large (",1130,"px)"]})}),m[6]=s):s=m[6],m[7]===Symbol.for("react.memo_cache_sentinel")?(h=e(ea,{children:t(ec,{children:["Large Drawer (",1130,"px)"]})}),m[7]=h):h=m[7],m[8]===Symbol.for("react.memo_cache_sentinel")?(d=t(B,{gap:8,justify:"center",children:[i,c,t(K,{width:1130,children:[s,t(er,{children:[h,e(ee,{children:e(ed,{fillHeight:!0})})]})]})]}),m[8]=d):d=m[8],d},meta:eh},{name:"CustomSizes",story:()=>{let r,l,i,a,o,c,s=(0,n.c)(6);return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"50% Width"})}),s[0]=r):r=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ea,{children:e(ec,{children:"50% Width Drawer"})}),s[1]=l):l=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(K,{width:"50%",children:[r,t(er,{children:[l,e(ee,{children:e("div",{className:"py-12",children:e("p",{children:"This drawer takes 50% of the viewport width."})})})]})]}),s[2]=i):i=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(a=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"1000px Width"})}),s[3]=a):a=s[3],s[4]===Symbol.for("react.memo_cache_sentinel")?(o=e(ea,{children:e(ec,{children:"1000px Width Drawer"})}),s[4]=o):o=s[4],s[5]===Symbol.for("react.memo_cache_sentinel")?(c=t(B,{gap:8,justify:"center",children:[i,t(K,{width:1e3,children:[a,t(er,{children:[o,e(ee,{children:e("div",{className:"py-12",children:e("p",{children:"This drawer has a fixed width of 1000px."})})})]})]})]}),s[5]=c):c=s[5],c},meta:eh},{name:"Resizable",story:()=>{let r,l,i,a,o,c,s,h,d,m,u,f,p=(0,n.c)(12);return p[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open Resizable Drawer (as number)"})}),p[0]=r):r=p[0],p[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eo,{}),p[1]=l):l=p[1],p[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(ea,{children:e(ec,{children:"Resizable Drawer"})}),p[2]=i):i=p[2],p[3]===Symbol.for("react.memo_cache_sentinel")?(a=t(K,{width:800,children:[r,t(er,{children:[l,i,e(ee,{children:t("div",{className:"py-12",children:[e("p",{className:"mb-16",children:"Drag the left edge to resize this drawer."}),e(ed,{height:300})]})})]})]}),p[3]=a):a=p[3],p[4]===Symbol.for("react.memo_cache_sentinel")?(o=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open Resizable Drawer (900px)"})}),p[4]=o):o=p[4],p[5]===Symbol.for("react.memo_cache_sentinel")?(c=e(eo,{}),p[5]=c):c=p[5],p[6]===Symbol.for("react.memo_cache_sentinel")?(s=e(ea,{children:e(ec,{children:'Resizable Drawer with "900px" width'})}),p[6]=s):s=p[6],p[7]===Symbol.for("react.memo_cache_sentinel")?(h=t(K,{width:"900px",children:[o,t(er,{children:[c,s,e(ee,{children:t("div",{className:"py-12",children:[e("p",{className:"mb-16",children:'Width is set as "900px" string. Drag the left edge to resize.'}),e(ed,{height:300})]})})]})]}),p[7]=h):h=p[7],p[8]===Symbol.for("react.memo_cache_sentinel")?(d=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open Resizable Drawer (50%)"})}),p[8]=d):d=p[8],p[9]===Symbol.for("react.memo_cache_sentinel")?(m=e(eo,{}),p[9]=m):m=p[9],p[10]===Symbol.for("react.memo_cache_sentinel")?(u=e(ea,{children:e(ec,{children:"Resizable Drawer with 50% width"})}),p[10]=u):u=p[10],p[11]===Symbol.for("react.memo_cache_sentinel")?(f=t(F,{gap:12,children:[a,h,t(K,{width:"50%",children:[d,t(er,{children:[m,u,e(ee,{children:t("div",{className:"py-12",children:[e("p",{className:"mb-16",children:'Width is set as "50%". Drag the left edge to resize - it will convert to pixels.'}),e(ed,{height:300})]})})]})]})]}),p[11]=f):f=p[11],f},meta:eh},{name:"ResizableWithOverflowList",story:()=>{let r,l,i,o,c,s,h,d=(0,n.c)(8),[m,u]=(0,a.useState)(!1);return d[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open Resizable Drawer with OverflowList"})}),d[0]=r):r=d[0],d[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eo,{}),d[1]=l):l=d[1],d[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(ea,{children:e(ec,{children:"Resizable Drawer with OverflowList"})}),d[2]=i):i=d[2],d[3]===Symbol.for("react.memo_cache_sentinel")?(o=e("p",{className:"mb-16",children:"Drag the left edge — the tag list reflows live."}),d[3]=o):o=d[3],d[4]===Symbol.for("react.memo_cache_sentinel")?(c=e(b,{children:"Attack types"}),d[4]=c):c=d[4],d[5]===Symbol.for("react.memo_cache_sentinel")?(s=t(er,{children:[l,i,t(ee,{children:[o,t(_,{children:[c,e(S,{children:e(T,{"data-testid":"tags-overflow-list",className:"gap-4",items:em,itemRenderer:eu})})]})]})]}),d[5]=s):s=d[5],d[6]!==m?(h=t(K,{"data-testid":"drawer",width:480,open:m,onOpenChange:u,children:[r,s]}),d[6]=m,d[7]=h):h=d[7],h},meta:eh},{name:"LongValues",story:()=>{let r,l,i,a,o=(0,n.c)(4);return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open Drawer with Long Values"})}),o[0]=r):r=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ea,{children:e(ec,{children:"Long values"})}),o[1]=l):l=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(b,{width:120,children:"URL"}),o[2]=i):i=o[2],o[3]===Symbol.for("react.memo_cache_sentinel")?(a=t(K,{"data-testid":"drawer",children:[r,t(er,{children:[l,e(ee,{children:t(F,{gap:16,children:[t(_,{"data-testid":"url-attribute",orientation:"horizontal",children:[i,e(S,{children:e(Q,{"data-testid":"url-text",size:"sm",truncate:!0,children:"https://cdn.example.com/microfrontends/a-very-long-application-name/0.1.0-build.2469/mf-manifest.json"})})]}),e(M,{"data-testid":"notes-input",placeholder:"Notes"})]})})]})]}),o[3]=a):a=o[3],a},meta:eh},{name:"Scrollable",story:()=>{let r,l,i,a,o=(0,n.c)(4);return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open Drawer with Scroll"})}),o[0]=r):r=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ea,{children:e(ec,{children:"Scrollable Content"})}),o[1]=l):l=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(ee,{children:e("div",{className:"flex flex-col gap-16 py-12",children:Array.from({length:20}).map(ef)})}),o[2]=i):i=o[2],o[3]===Symbol.for("react.memo_cache_sentinel")?(a=t(K,{children:[r,t(er,{children:[l,i,t(ei,{children:[e(et,{asChild:!0,children:e(v,{variant:"ghost",color:"neutral",size:"large",children:"Close"})}),e(v,{variant:"primary",color:"brand",size:"large",children:"Confirm"})]})]})]}),o[3]=a):a=o[3],a},meta:eh},{name:"Controlled",story:()=>{let r,l,o,c,s,h=(0,n.c)(6),[d,m]=(0,a.useState)(!1);return h[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(v,{variant:"outline",color:"neutral",onClick:()=>m(!0),children:"Open Controlled Drawer"}),h[0]=r):r=h[0],h[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ea,{children:e(ec,{children:"Controlled Drawer"})}),h[1]=l):l=h[1],h[2]===Symbol.for("react.memo_cache_sentinel")?(o=e(ee,{children:t("div",{className:"py-12",children:[e("p",{className:"mb-16",children:"This drawer is controlled externally."}),e(ed,{})]})}),h[2]=o):o=h[2],h[3]===Symbol.for("react.memo_cache_sentinel")?(c=t(er,{children:[l,o,t(ei,{children:[e(et,{asChild:!0,children:e(v,{variant:"ghost",color:"neutral",size:"large",children:"Cancel"})}),e(v,{variant:"primary",color:"brand",size:"large",children:"Save Changes"})]})]}),h[3]=c):c=h[3],h[4]!==d?(s=t(i,{children:[r,e(K,{open:d,onOpenChange:m,children:c})]}),h[4]=d,h[5]=s):s=h[5],s},meta:eh},{name:"NoClosableOnEsc",story:()=>{let r,l,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open Drawer"})}),a[0]=r):r=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ea,{children:e(ec,{children:"Drawer Title"})}),a[1]=l):l=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(K,{closeOnEscape:!1,children:[r,t(er,{children:[l,e(ee,{children:e(ed,{fillHeight:!0})})]})]}),a[2]=i):i=a[2],i},meta:eh},{name:"NoOverlay",story:()=>{let r,l,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open without Overlay"})}),a[0]=r):r=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ea,{children:e(ec,{children:"No Overlay"})}),a[1]=l):l=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(K,{overlay:!1,children:[r,t(er,{children:[l,e(ee,{children:e("div",{className:"py-12",children:e("p",{children:"This drawer has no overlay backdrop."})})})]})]}),a[2]=i):i=a[2],i},meta:eh},{name:"NonModal",story:()=>{let r,l,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open Non-Modal Drawer"})}),a[0]=r):r=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(l=t(ea,{children:[e(ec,{children:"Non-modal drawer"}),e(et,{})]}),a[1]=l):l=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(F,{gap:16,align:"start",children:[t(K,{"data-testid":"drawer",modal:!1,overlay:!1,children:[r,t(er,{children:[l,e(ee,{children:e("div",{className:"py-12",children:e("p",{children:"The page behind stays usable while this drawer is open."})})})]})]}),e(ed,{height:1600})]}),a[2]=i):i=a[2],i},meta:eh},{name:"WithNested",story:()=>{let r,l,i,a,o,c,s,h,d,m,u,f,p=(0,n.c)(12);return p[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"1st level drawer"})}),p[0]=r):r=p[0],p[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ec,{children:"[Level 1] Main Drawer"}),p[1]=l):l=p[1],p[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(es,{asChild:!0,children:t(v,{variant:"ghost",color:"neutral",size:"small",children:[e(g,{}),"2nd level drawer"]})}),p[2]=i):i=p[2],p[3]===Symbol.for("react.memo_cache_sentinel")?(a=e(ec,{children:"[Level 2] Detail View"}),p[3]=a):a=p[3],p[4]===Symbol.for("react.memo_cache_sentinel")?(o=e(es,{asChild:!0,children:t(v,{variant:"ghost",color:"neutral",size:"small",children:[e(g,{}),"3nd level drawer"]})}),p[4]=o):o=p[4],p[5]===Symbol.for("react.memo_cache_sentinel")?(c=e(ea,{children:e(ec,{children:"[Level 3] Deep Nested"})}),p[5]=c):c=p[5],p[6]===Symbol.for("react.memo_cache_sentinel")?(s=e(ee,{children:t(F,{gap:12,align:"start",children:[e(Q,{children:"Level 3! Unlimited nesting works."}),e(ed,{height:150})]})}),p[6]=s):s=p[6],p[7]===Symbol.for("react.memo_cache_sentinel")?(h=t(ea,{children:[a,t(K,{children:[o,t(er,{children:[c,s,e(ei,{children:e(et,{asChild:!0,children:e(v,{size:"large",variant:"ghost",color:"neutral",children:"Back"})})})]})]})]}),p[7]=h):h=p[7],p[8]===Symbol.for("react.memo_cache_sentinel")?(d=e(ee,{children:t(F,{gap:12,align:"start",children:[e(Q,{children:"This is Level 2 drawer. Main drawer is pushed back. You can go deeper:"}),e(ed,{height:150})]})}),p[8]=d):d=p[8],p[9]===Symbol.for("react.memo_cache_sentinel")?(m=t(ea,{children:[l,t(K,{children:[i,t(er,{children:[h,d,t(ei,{children:[e(et,{asChild:!0,children:e(v,{variant:"ghost",color:"neutral",size:"large",children:"Back"})}),e(v,{variant:"primary",color:"brand",size:"large",children:"Apply"})]})]})]})]}),p[9]=m):m=p[9],p[10]===Symbol.for("react.memo_cache_sentinel")?(u=e(ee,{children:t(F,{gap:12,align:"start",children:[e(Q,{children:"This is Level 1 drawer. Click below to open nested drawers:"}),e(ed,{height:300})]})}),p[10]=u):u=p[10],p[11]===Symbol.for("react.memo_cache_sentinel")?(f=t(K,{children:[r,t(er,{children:[m,u,t(ei,{children:[e(et,{asChild:!0,children:e(v,{variant:"ghost",color:"neutral",size:"large",children:"Cancel"})}),e(v,{variant:"primary",color:"brand",size:"large",children:"Save"})]})]})]}),p[11]=f):f=p[11],f},meta:eh},{name:"WithNestedDialog",story:()=>{let r,l,i,a,o,c,s=(0,n.c)(6);return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open drawer with dialog inside"})}),s[0]=r):r=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ea,{children:e(ec,{children:"Drawer stays in place"})}),s[1]=l):l=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(Q,{children:"Opening the dialog below must not scale or shift this drawer."}),s[2]=i):i=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(a=e(N,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open dialog"})}),s[3]=a):a=s[3],s[4]===Symbol.for("react.memo_cache_sentinel")?(o=e(x,{children:e(R,{children:"Dialog over a drawer"})}),s[4]=o):o=s[4],s[5]===Symbol.for("react.memo_cache_sentinel")?(c=t(K,{children:[r,t(er,{children:[l,e(ee,{children:t(F,{gap:12,align:"start",children:[i,t(D,{children:[a,t(O,{children:[o,e(C,{children:e(ed,{height:150})})]})]})]})})]})]}),s[5]=c):c=s[5],c},meta:eh},{name:"WithNestedSelect",story:()=>{let r,l,i,a,o,c,s,h,d,m,u,p,y,w,_,b,S,D=(0,n.c)(17);if(D[0]===Symbol.for("react.memo_cache_sentinel")){let n=new f({items:[{label:"React",value:"react"},{label:"Vue",value:"vue"},{label:"Angular",value:"angular"}]});s=K,y=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open drawer with nested select"})}),c=er,o=ea,p=e(ec,{children:"[Level 1] Main Drawer"}),a=K,u=e(es,{asChild:!0,children:t(v,{variant:"ghost",color:"neutral",size:"small",children:[e(g,{}),"Open nested drawer"]})}),i=er,m=e(ea,{children:e(ec,{children:"[Level 2] With Select"})}),l=ee,r=F,h=12,d="start",w=t($,{collection:n,"data-testid":"nested-select",children:[e(V,{}),e(P,{children:e(k,{children:n.items.map(ep)})})]}),D[0]=r,D[1]=l,D[2]=i,D[3]=a,D[4]=o,D[5]=c,D[6]=s,D[7]=h,D[8]=d,D[9]=m,D[10]=u,D[11]=p,D[12]=y,D[13]=w}else r=D[0],l=D[1],i=D[2],a=D[3],o=D[4],c=D[5],s=D[6],h=D[7],d=D[8],m=D[9],u=D[10],p=D[11],y=D[12],w=D[13];return D[14]===Symbol.for("react.memo_cache_sentinel")?(_=e(z,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open menu"})}),D[14]=_):_=D[14],D[15]===Symbol.for("react.memo_cache_sentinel")?(b=t(o,{children:[p,t(a,{children:[u,t(i,{children:[m,e(l,{children:t(r,{gap:h,align:d,children:[w,t(W,{"data-testid":"nested-dropdown",children:[_,t(I,{children:[e(E,{children:"First action"}),e(E,{children:"Second action"})]})]})]})})]})]})]}),D[15]=b):b=D[15],D[16]===Symbol.for("react.memo_cache_sentinel")?(S=t(s,{children:[y,t(c,{children:[b,e(ee,{children:e(ed,{height:200})})]})]}),D[16]=S):S=D[16],S},meta:eh},{name:"WithTabs",story:()=>{let r,l,i,o,c,s,h,d,m=(0,n.c)(9),[u,f]=(0,a.useState)("tab1");return m[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(es,{asChild:!0,children:e(v,{variant:"outline",color:"neutral",children:"Open Drawer with Tabs"})}),m[0]=r):r=m[0],m[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ea,{children:e(ec,{children:"Tabbed Content"})}),m[1]=l):l=m[1],m[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(J,{children:[e(X,{value:"tab1",children:"General"}),e(X,{value:"tab2",children:"Settings"}),e(X,{value:"tab3",children:"Advanced"})]}),m[2]=i):i=m[2],m[3]===Symbol.for("react.memo_cache_sentinel")?(o=t(G,{value:"tab1",children:[e("h3",{className:"text-lg font-medium mb-8",children:"General Settings"}),e(ed,{height:300})]}),m[3]=o):o=m[3],m[4]===Symbol.for("react.memo_cache_sentinel")?(c=t(G,{value:"tab2",children:[e("h3",{className:"text-lg font-medium mb-8",children:"Configuration"}),e(ed,{height:300})]}),m[4]=c):c=m[4],m[5]===Symbol.for("react.memo_cache_sentinel")?(s=e(ee,{children:t("div",{className:"pt-12",children:[o,c,t(G,{value:"tab3",children:[e("h3",{className:"text-lg font-medium mb-8",children:"Advanced Options"}),e(ed,{height:300})]})]})}),m[5]=s):s=m[5],m[6]===Symbol.for("react.memo_cache_sentinel")?(h=t(ei,{children:[e(et,{asChild:!0,children:e(v,{variant:"ghost",color:"neutral",size:"large",children:"Cancel"})}),e(v,{variant:"primary",color:"brand",size:"large",children:"Apply Settings"})]}),m[6]=h):h=m[6],m[7]!==u?(d=t(K,{width:960,children:[r,e(er,{children:t(q,{value:u,onChange:f,asChild:!0,children:[l,i,s,h]})})]}),m[7]=u,m[8]=d):d=m[8],d},meta:eh}];function ew({entry:e}){let{story:t,meta:r}=e,l={...r.args,...t.args},i="function"==typeof t||t.$$typeof?t:t.render||r.render||r.component,n=()=>a.default.createElement(i,l),o={args:l,globals:{theme:"light"},parameters:{...r.parameters,...t.parameters},viewMode:"story"};for(let e of[...r.decorators||[],...t.decorators||[]].reverse()){let t=n;n=()=>e(t,o)}return a.default.createElement("section",{"data-preview-story":e.name,className:"p-16"},a.default.createElement("h2",{className:"text-sm mb-12"},e.name),a.default.createElement(n))}window.WallarmPreview={mount(e){let t=window.ReactDOM.createRoot(e);return t.render(a.default.createElement(window.WallarmDS.Root,null,ey.map((e,t)=>a.default.createElement(ew,{key:t,entry:e})))),t}}})();
12
+ */var n,a,o=Object.create,c=Object.defineProperty,s=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,d=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,u=(e,t,r,l)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of h(t))m.call(e,i)||i===r||c(e,i,{get:()=>t[i],enumerable:!(l=s(t,i))||l.enumerable});return e},f={},p={$dispatcherGuard:()=>R,$makeReadOnly:()=>I,$reset:()=>W,$structuralCheck:()=>$,c:()=>D,clearRenderCounterRegistry:()=>z,renderCounterRegistry:()=>E,useRenderCounter:()=>M};for(var y in p)c(f,y,{get:p[y],enumerable:!0});e.exports=u(c({},"__esModule",{value:!0}),f);var w=(i=null!=(l=r("C"))?o(d(l)):{},u(l&&l.__esModule?i:c(i,"default",{value:l,enumerable:!0}),l)),{useRef:g,useEffect:_,isValidElement:b}=w,S=null!=(n=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?n:w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for("react.memo_cache_sentinel"),D="function"==typeof(null==(a=w.__COMPILER_RUNTIME)?void 0:a.c)?w.__COMPILER_RUNTIME.c:function(e){return w.useMemo(()=>{let t=Array(e);for(let r=0;r<e;r++)t[r]=v;return t[v]=!0,t},[])},C={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{C[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var O=null;function x(e){return S.ReactCurrentDispatcher.current=e,S.ReactCurrentDispatcher.current}C.useMemoCache=e=>{if(null!=O)return O.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var N=[];function R(e){let t=S.ReactCurrentDispatcher.current;if(0===e){if(N.push(t),1===N.length&&(O=t),t===C)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");x(C)}else if(1===e){let e=N.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===N.length&&(O=null),x(e)}else if(2===e)N.push(t),x(O);else if(3===e){let e=N.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");x(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function W(e){for(let t=0;t<e.length;t++)e[t]=v}function I(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var E=new Map;function z(){for(let e of E.values())e.forEach(e=>{e.count=0})}function M(e){let t=g(null);null!=t.current&&(t.current.count+=1),_(()=>{if(null==t.current){let r,l={count:0};null==(r=E.get(e))&&(r=new Set,E.set(e,r)),r.add(l),t.current=l}return()=>{var r;let l;null!==t.current&&(r=t.current,null!=(l=E.get(e))&&l.delete(r))}})}var T=new Set;function $(e,t,r,l,i,n){function a(e,t,a,o){let c=`${l}:${n} [${i}] ${r}${a} changed from ${e} to ${t} at depth ${o}`;T.has(c)||(T.add(c),console.error(c))}!function e(t,r,l,i){if(!(i>2)){if(t!==r)if(typeof t!=typeof r)a(`type ${typeof t}`,`type ${typeof r}`,l,i);else if("object"==typeof t){let n=Array.isArray(t),o=Array.isArray(r);if(null===t&&null!==r)a("null",`type ${typeof r}`,l,i);else if(null===r)a(`type ${typeof t}`,"null",l,i);else if(t instanceof Map)if(r instanceof Map)if(t.size!==r.size)a(`Map instance with size ${t.size}`,`Map instance with size ${r.size}`,l,i);else for(let[n,o]of t)r.has(n)?e(o,r.get(n),`${l}.get(${n})`,i+1):a(`Map instance with key ${n}`,`Map instance without key ${n}`,l,i);else a("Map instance","other value",l,i);else if(r instanceof Map)a("other value","Map instance",l,i);else if(t instanceof Set)if(r instanceof Set)if(t.size!==r.size)a(`Set instance with size ${t.size}`,`Set instance with size ${r.size}`,l,i);else for(let e of r)t.has(e)||a(`Set instance without element ${e}`,`Set instance with element ${e}`,l,i);else a("Set instance","other value",l,i);else if(r instanceof Set)a("other value","Set instance",l,i);else if(n||o)if(n!==o)a(`type ${n?"array":"object"}`,`type ${o?"array":"object"}`,l,i);else if(t.length!==r.length)a(`array with length ${t.length}`,`array with length ${r.length}`,l,i);else for(let n=0;n<t.length;n++)e(t[n],r[n],`${l}[${n}]`,i+1);else if(b(t)||b(r))b(t)!==b(r)?a(`type ${b(t)?"React element":"object"}`,`type ${b(r)?"React element":"object"}`,l,i):t.type!==r.type?a(`React element of type ${t.type}`,`React element of type ${r.type}`,l,i):e(t.props,r.props,`[props of ${l}]`,i+1);else{for(let e in r)e in t||a(`object without key ${e}`,`object with key ${e}`,l,i);for(let n in t)n in r?e(t[n],r[n],`${l}.${n}`,i+1):a(`object with key ${n}`,`object without key ${n}`,l,i)}}else{if("function"==typeof t)return;isNaN(t)||isNaN(r)?isNaN(t)!==isNaN(r)&&a(`${isNaN(t)?"NaN":"non-NaN value"}`,`${isNaN(r)?"NaN":"non-NaN value"}`,l,i):t!==r&&a(t,r,l,i)}}}(e,t,"",0)}},p(e,t,r){let l=new WeakMap,i=new WeakMap;function n(e,t,r){let n=t,a=r;if("object"==typeof n&&null!==n&&"$$typeof"in n&&n.$$typeof===Symbol.for("react.context")&&"Provider"in n&&(n=n.Provider),"function"==typeof n&&null!=a.ref&&!n.prototype?.isReactComponent){let t=n,r=l.get(e);r||(r=new WeakMap,l.set(e,r));let i=r.get(t);i||((i=e.forwardRef((e,r)=>t({...e,ref:r}))).displayName=t.displayName??t.name,r.set(t,i)),n=i}if("string"==typeof n&&"boolean"==typeof a.inert&&((a={...a}).inert?a.inert="":delete a.inert),"string"==typeof n)for(let[e,t]of[["fill-rule","fillRule"],["clip-rule","clipRule"]])e in a&&(a={...a,[t]:a[e]},delete a[e]);return"string"==typeof n&&null!=a.ref&&(n=function(e,t){let r=i.get(e);r||(r=new Map,i.set(e,r));let l=r.get(t);if(l)return l;let n=e.forwardRef((r,l)=>{let i=e.useRef(null);if(!i.current||i.current.original!==l){let e;i.current={original:l,callback:t=>{if(null==t&&e){let t=e;e=void 0,t();return}if("function"==typeof l){let r=l(t);e="function"==typeof r?r:void 0}else l&&(l.current=t)}}}return e.createElement(t,{...r,ref:i.current.callback})});return n.displayName=`CanvasHost(${t})`,r.set(t,n),n}(e,n)),{type:n,props:a}}function a(e){let t=(t,r,l)=>{let i=n(e,t,r??{});return e.createElement(i.type,void 0===l?i.props:{...i.props,key:l})};return{jsx:t,jsxs:(t,r,l)=>{let i=n(e,t,r??{}),{children:a,...o}=i.props;return e.createElement(i.type,void 0===l?o:{...o,key:l},...Array.isArray(a)?a:[a])},jsxDEV:t,Fragment:e.Fragment}}function o(e){return{...e,createElement:(t,r,...l)=>{let i=n(e,t,r??{});return e.createElement(i.type,i.props,...l)},cloneElement:(t,r,...l)=>{let i=e.cloneElement(t,r??void 0,...l),a=i.ref,o=n(e,i.type,{...i.props,ref:a});return o.type===i.type&&"string"!=typeof i.type?i:e.createElement(o.type,{...o.props,key:i.key})}}}r.d(t,{MA:()=>a,YJ:()=>o})},C(e,t,r){r.r(t);let l=(0,r("p").YJ)(window.React),{Children:i,Component:n,Fragment:a,Profiler:o,PureComponent:c,StrictMode:s,Suspense:h,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:d,act:m,cloneElement:u,createContext:f,createElement:p,createFactory:y,createRef:w,forwardRef:g,isValidElement:_,lazy:b,memo:S,startTransition:v,unstable_act:D,useCallback:C,useContext:O,useDebugValue:x,useDeferredValue:N,useEffect:R,useId:W,useImperativeHandle:I,useInsertionEffect:E,useLayoutEffect:z,useMemo:M,useReducer:T,useRef:$,useState:A,useSyncExternalStore:k,useTransition:V,version:j,use:L}=l;r.d(t,{},{Children:i,Component:n,Fragment:a,Profiler:o,PureComponent:c,StrictMode:s,Suspense:h,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:d,act:m,cloneElement:u,createContext:f,createElement:p,createFactory:y,createRef:w,default:l,forwardRef:g,isValidElement:_,lazy:b,memo:S,startTransition:v,unstable_act:D,use:L,useCallback:C,useContext:O,useDebugValue:x,useDeferredValue:N,useEffect:R,useId:W,useImperativeHandle:I,useInsertionEffect:E,useLayoutEffect:z,useMemo:M,useReducer:T,useRef:$,useState:A,useSyncExternalStore:k,useTransition:V,version:j})}},t={};function r(l){var i=t[l];if(void 0!==i)return i.exports;var n=t[l]={exports:{}};return e[l](n,n.exports,r),n.exports}r.d=(e,t,l)=>{var i=(t,l)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[l]:t[i]})};i(t,"get"),i(l,"value")},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let{jsx:e,jsxs:t,jsxDEV:l,Fragment:i}=(0,r("p").MA)(window.React);var n=r("vD"),a=r("C"),o=Object.defineProperty,c=(e,t,r)=>{let l;return(l="symbol"!=typeof t?t+"":t)in e?o(e,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[l]=r},s=e=>null!=e&&"object"==typeof e&&!Array.isArray(e),h=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);Function.prototype.toString.call(Object);var d=e=>e?.constructor.name==="Array",m=(e,t)=>{if(Object.is(e,t))return!0;if(null==e&&null!=t||null!=e&&null==t)return!1;if("function"==typeof e?.isEqual&&"function"==typeof t?.isEqual)return e.isEqual(t);if("function"==typeof e&&"function"==typeof t)return e.toString()===t.toString();if(d(e)&&d(t))return((e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!m(e[r],t[r]))return!1;return!0})(Array.from(e),Array.from(t));if("object"!=typeof e||"object"!=typeof t)return!1;let r=Object.keys(t??Object.create(null)),l=r.length;for(let t=0;t<l;t++)if(!Reflect.has(e,r[t]))return!1;for(let i=0;i<l;i++){let l=r[i];if(!m(e[l],t[l]))return!1}return!0},u={itemToValue:e=>"string"==typeof e?e:s(e)&&h(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:s(e)&&h(e,"label")?e.label:u.itemToValue(e),isItemDisabled:e=>!!(s(e)&&h(e,"disabled"))&&!!e.disabled},f=class e{constructor(t){c(this,"options",t),c(this,"items"),c(this,"indexMap",null),c(this,"copy",t=>new e({...this.options,items:t??[...this.items]})),c(this,"isEqual",e=>m(this.items,e.items)),c(this,"setItems",e=>this.copy(e)),c(this,"getValues",(e=this.items)=>{let t=[];for(let r of e){let e=this.getItemValue(r);null!=e&&t.push(e)}return t}),c(this,"find",e=>{if(null==e)return null;let t=this.indexOf(e);return -1!==t?this.at(t):null}),c(this,"findMany",e=>{let t=[];for(let r of e){let e=this.find(r);null!=e&&t.push(e)}return t}),c(this,"at",e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0;for(let[,r]of this.group())for(let l of r){if(t===e)return l;t++}return null}),c(this,"sortFn",(e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0)),c(this,"sort",e=>[...e].sort(this.sortFn.bind(this))),c(this,"getItemValue",e=>null==e?null:this.options.itemToValue?.(e)??u.itemToValue(e)),c(this,"getItemDisabled",e=>null!=e&&(this.options.isItemDisabled?.(e)??u.isItemDisabled(e))),c(this,"stringifyItem",e=>null==e?null:this.options.itemToString?.(e)??u.itemToString(e)),c(this,"stringify",e=>null==e?null:this.stringifyItem(this.find(e))),c(this,"stringifyItems",(e,t=", ")=>{let r=[];for(let t of e){let e=this.stringifyItem(t);null!=e&&r.push(e)}return r.join(t)}),c(this,"stringifyMany",(e,t)=>this.stringifyItems(this.findMany(e),t)),c(this,"has",e=>-1!==this.indexOf(e)),c(this,"hasItem",e=>null!=e&&this.has(this.getItemValue(e))),c(this,"group",()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[["",[...this.items]]];let r=new Map;this.items.forEach((t,l)=>{let i=e(t,l);r.has(i)||r.set(i,[]),r.get(i).push(t)});let l=Array.from(r.entries());return t&&l.sort(([e],[r])=>{if("function"==typeof t)return t(e,r);if(Array.isArray(t)){let l=t.indexOf(e),i=t.indexOf(r);return -1===l?1:-1===i?-1:l-i}return"asc"===t?e.localeCompare(r):"desc"===t?r.localeCompare(e):0}),l}),c(this,"getNextValue",(e,t=1,r=!1)=>{let l=this.indexOf(e);if(-1===l)return null;for(l=r?Math.min(l+t,this.size-1):l+t;l<=this.size&&this.getItemDisabled(this.at(l));)l++;return this.getItemValue(this.at(l))}),c(this,"getPreviousValue",(e,t=1,r=!1)=>{let l=this.indexOf(e);if(-1===l)return null;for(l=r?Math.max(l-t,0):l-t;l>=0&&this.getItemDisabled(this.at(l));)l--;return this.getItemValue(this.at(l))}),c(this,"indexOf",e=>{if(null==e)return -1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(t=>this.getItemValue(t)===e);if(!this.indexMap){this.indexMap=new Map;let e=0;for(let[,t]of this.group())for(let r of t){let t=this.getItemValue(r);null!=t&&this.indexMap.set(t,e),e++}}return this.indexMap.get(e)??-1}),c(this,"getByText",(e,t)=>{let r=null!=t?this.indexOf(t):-1,l=1===e.length;for(let i=0;i<this.items.length;i++){let n=this.items[(r+i+1)%this.items.length];if((!l||this.getItemValue(n)!==t)&&!this.getItemDisabled(n)&&p(this.stringifyItem(n),e))return n}}),c(this,"search",(e,t)=>{let{state:r,currentValue:l,timeout:i=350}=t,n=r.keysSoFar+e,a=n.length>1&&Array.from(n).every(e=>e===n[0])?n[0]:n,o=this.getByText(a,l),c=this.getItemValue(o);function s(){clearTimeout(r.timer),r.timer=-1}return!function e(t){r.keysSoFar=t,s(),""!==t&&(r.timer=+setTimeout(()=>{e(""),s()},i))}(n),c}),c(this,"update",(e,t)=>{let r=this.indexOf(e);return -1===r?this:this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])}),c(this,"upsert",(e,t,r="append")=>{let l=this.indexOf(e);return -1===l?("append"===r?this.append:this.prepend)(t):this.copy([...this.items.slice(0,l),t,...this.items.slice(l+1)])}),c(this,"insert",(e,...t)=>this.copy(y(this.items,e,...t))),c(this,"insertBefore",(e,...t)=>{let r=this.indexOf(e);if(-1===r)if(0!==this.items.length)return this;else r=0;return this.copy(y(this.items,r,...t))}),c(this,"insertAfter",(e,...t)=>{let r=this.indexOf(e);if(-1===r)if(0!==this.items.length)return this;else r=0;return this.copy(y(this.items,r+1,...t))}),c(this,"prepend",(...e)=>this.copy(y(this.items,0,...e))),c(this,"append",(...e)=>this.copy(y(this.items,this.items.length,...e))),c(this,"filter",e=>{let t=this.items.filter((t,r)=>e(this.stringifyItem(t),r,t));return this.copy(t)}),c(this,"remove",(...e)=>{let t=e.map(e=>"string"==typeof e?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let r=this.getItemValue(e);return null!=r&&!t.includes(r)}))}),c(this,"move",(e,t)=>{let r=this.indexOf(e);return -1===r?this:this.copy(w(this.items,[r],t))}),c(this,"moveBefore",(e,...t)=>{let r=this.items.findIndex(t=>this.getItemValue(t)===e);if(-1===r)return this;let l=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(w(this.items,l,r))}),c(this,"moveAfter",(e,...t)=>{let r=this.items.findIndex(t=>this.getItemValue(t)===e);if(-1===r)return this;let l=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(w(this.items,l,r+1))}),c(this,"reorder",(e,t)=>this.copy(w(this.items,[e],t))),c(this,"compareValue",(e,t)=>{let r=this.indexOf(e),l=this.indexOf(t);return r<l?-1:+(r>l)}),c(this,"range",(e,t)=>{let r=[],l=e;for(;null!=l;){if(this.find(l)&&r.push(l),l===t)return r;l=this.getNextValue(l)}return[]}),c(this,"getValueRange",(e,t)=>e&&t?0>=this.compareValue(e,t)?this.range(e,t):this.range(t,e):[]),c(this,"toString",()=>{let e="";for(let t of this.items)e+=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(":")+",";return e}),c(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},p=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function y(e,t,...r){return[...e.slice(0,t),...r,...e.slice(t)]}function w(e,t,r){let l=(t=[...t].sort((e,t)=>e-t)).map(t=>e[t]);for(let r=t.length-1;r>=0;r--)e=[...e.slice(0,t[r]),...e.slice(t[r]+1)];return r=Math.max(0,r-t.filter(e=>e<r).length),[...e.slice(0,r),...l,...e.slice(r)]}let g=window.WallarmDS.Icons.PanelRight,_=window.WallarmDS.Attribute,b=window.WallarmDS.AttributeLabel,S=window.WallarmDS.AttributeValue,v=window.WallarmDS.AgentItem,D=window.WallarmDS.AvatarContent,C=window.WallarmDS.AvatarName,O=window.WallarmDS.Badge,x=window.WallarmDS.Button,N=window.WallarmDS.Dialog,R=window.WallarmDS.DialogBody,W=window.WallarmDS.DialogContent,I=window.WallarmDS.DialogHeader,E=window.WallarmDS.DialogTitle,z=window.WallarmDS.DialogTrigger,M=window.WallarmDS.DropdownMenu,T=window.WallarmDS.DropdownMenuContent,$=window.WallarmDS.DropdownMenuItem,A=window.WallarmDS.DropdownMenuTrigger,k=window.WallarmDS.Input,V=window.WallarmDS.OverflowList,j=window.WallarmDS.Select,L=window.WallarmDS.SelectButton,P=window.WallarmDS.SelectContent,B=window.WallarmDS.SelectOption,F=window.WallarmDS.SelectOptionIndicator,H=window.WallarmDS.SelectOptionText,U=window.WallarmDS.SelectPositioner,Y=window.WallarmDS.HStack,G=window.WallarmDS.VStack,q=window.WallarmDS.Switch,J=window.WallarmDS.SwitchControl,X=window.WallarmDS.SwitchLabel,Z=window.WallarmDS.Tabs,Q=window.WallarmDS.TabsContent,K=window.WallarmDS.TabsList,ee=window.WallarmDS.TabsTrigger,et=window.WallarmDS.Tag,er=window.WallarmDS.Text,el=window.WallarmDS.Drawer,ei=window.WallarmDS.DrawerBody,en=window.WallarmDS.DrawerClose,ea=window.WallarmDS.DrawerContent,eo=window.WallarmDS.DrawerDescription,ec=window.WallarmDS.DrawerFooter,es=window.WallarmDS.DrawerFooterControls,eh=window.WallarmDS.DrawerHeader,ed=window.WallarmDS.DrawerResizeHandle,em=window.WallarmDS.DrawerTitle,eu=window.WallarmDS.DrawerTrigger,ef={title:"Overlay/Drawer",component:el,subcomponents:{DrawerTrigger:eu,DrawerContent:ea,DrawerHeader:eh,DrawerDescription:eo,DrawerBody:ei,DrawerFooter:ec,DrawerClose:en,DrawerResizeHandle:ed},parameters:{layout:"centered",docs:{description:{component:"A side panel for work the reader does alongside the page — its differentiator is that it can run non-modal, so with `modal={false}` they can keep using what is behind it. Reach for `Dialog` when the panel is a decision to resolve now, since that is the same panel with the exit closed off."}}},argTypes:{open:{control:{type:"boolean"},description:"Whether the drawer is open"},width:{control:{type:"number"},description:"Initial width of the drawer. Presets: small=640, medium=960, large=1130",defaultValue:640},minWidth:{control:{type:"number"},description:"Minimum width when resizing",defaultValue:400},maxWidth:{control:{type:"number"},description:"Maximum width when resizing",defaultValue:1130}},decorators:[]},ep=t=>{let r,l,i=(0,n.c)(6),{fillHeight:a,height:o}=t,c=void 0!==a&&a,s=`w-full rounded-12 bg-bg-surface-5 ${c?"flex-1 min-h-0":""}`;return i[0]!==c||i[1]!==o?(r=o?{height:`${o}px`}:c?void 0:{height:"200px"},i[0]=c,i[1]=o,i[2]=r):r=i[2],i[3]!==s||i[4]!==r?(l=e("div",{className:s,style:r}),i[3]=s,i[4]=r,i[5]=l):l=i[5],l},ey=["api-abuse","account-takeover","credential-stuffing","XSS","SQL Injection","CSRF","scanner","brute-force","data-exfiltration"];function ew(t){return e(et,{"data-testid":"tag",children:t},t)}function eg(t,r){return e(ep,{height:100},r)}function e_(r){return t(B,{item:r,children:[e(H,{children:r.label}),e(F,{})]},r.value)}let eb=[{name:"Basic",story:()=>{let r,l,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Drawer"})}),a[0]=r):r=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eh,{children:e(em,{children:"Drawer Title"})}),a[1]=l):l=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(el,{"data-testid":"drawer",children:[r,t(ea,{children:[l,e(ei,{children:e(ep,{fillHeight:!0})})]})]}),a[2]=i):i=a[2],i},meta:ef},{name:"WithFooter",story:()=>{let r,l,i,a,o=(0,n.c)(4);return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Drawer"})}),o[0]=r):r=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eh,{children:e(em,{children:"Drawer's title"})}),o[1]=l):l=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(ei,{children:e(ep,{fillHeight:!0})}),o[2]=i):i=o[2],o[3]===Symbol.for("react.memo_cache_sentinel")?(a=t(el,{children:[r,t(ea,{children:[l,i,e(ec,{children:t(es,{children:[e(x,{variant:"ghost",color:"neutral",size:"large",children:"Button"}),e(x,{variant:"primary",color:"brand",size:"large",children:"Button"})]})})]})]}),o[3]=a):a=o[3],a},meta:ef},{name:"WithDescription",story:()=>{let r,l,i,a,o=(0,n.c)(4);return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Drawer"})}),o[0]=r):r=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(l=t(eh,{children:[e(em,{children:"Drawer's title"}),e(eo,{children:"Description TBD"})]}),o[1]=l):l=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(ei,{children:e(ep,{fillHeight:!0})}),o[2]=i):i=o[2],o[3]===Symbol.for("react.memo_cache_sentinel")?(a=t(el,{children:[r,t(ea,{children:[l,i,e(ec,{children:t(es,{children:[e(x,{variant:"ghost",color:"neutral",size:"large",children:"Button"}),e(x,{variant:"primary",color:"brand",size:"large",children:"Button"})]})})]})]}),o[3]=a):a=o[3],a},meta:ef},{name:"WithAgent",story:()=>{let r,l,i,a,o,c,s,h,d,m,u=(0,n.c)(10);return u[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Agent Drawer"})}),u[0]=r):r=u[0],u[1]===Symbol.for("react.memo_cache_sentinel")?(l=t(em,{children:["Attack spike"," ",e("span",{className:"font-mono font-normal text-text-secondary",children:"GET shop.acme.internal/search"})]}),u[1]=l):l=u[1],u[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(O,{color:"amber",type:"outline",children:"Needs approval"}),a=e("span",{"aria-hidden":"true",children:"·"}),o=e(er,{size:"sm",weight:"medium",color:"primary",children:"Malicious anomaly"}),c=e("span",{"aria-hidden":"true",children:"·"}),u[2]=i,u[3]=a,u[4]=o,u[5]=c):(i=u[2],a=u[3],o=u[4],c=u[5]),u[6]===Symbol.for("react.memo_cache_sentinel")?(s=e(v,{agent:"radar","data-testid":"agent-drawer-found-by",children:e(D,{children:e(C,{className:"font-medium",children:"Radar"})})}),u[6]=s):s=u[6],u[7]===Symbol.for("react.memo_cache_sentinel")?(h=e(v,{agent:"sift","data-testid":"agent-drawer-updated-by",children:e(D,{children:e(C,{className:"font-medium",children:"Sift"})})}),u[7]=h):h=u[7],u[8]===Symbol.for("react.memo_cache_sentinel")?(d=t(eh,{children:[l,e(eo,{children:t(Y,{gap:8,align:"center",wrap:"wrap",className:"mt-4","data-testid":"agent-drawer-meta",children:[i,a,o,c,t(er,{size:"sm",color:"secondary",children:["Found by"," ",s,", updated by"," ",h," ",e(er,{asChild:!0,size:"sm",decoration:"dashed",children:e("span",{children:"5 min ago"})})]})]})})]}),u[8]=d):d=u[8],u[9]===Symbol.for("react.memo_cache_sentinel")?(m=t(el,{width:960,"data-testid":"agent-drawer",children:[r,t(ea,{children:[d,e(ei,{children:e(ep,{fillHeight:!0})})]})]}),u[9]=m):m=u[9],m},meta:ef},{name:"WithFooterLeftActions",story:()=>{let r,l,i,a,o,c=(0,n.c)(5);return c[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open with Footer Actions"})}),c[0]=r):r=c[0],c[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eh,{children:e(em,{children:"Footer with Left Actions"})}),c[1]=l):l=c[1],c[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(ei,{children:e(ep,{fillHeight:!0})}),c[2]=i):i=c[2],c[3]===Symbol.for("react.memo_cache_sentinel")?(a=e(es,{placement:"left",children:t(q,{children:[e(J,{}),e(X,{children:"Remember choice"})]})}),c[3]=a):a=c[3],c[4]===Symbol.for("react.memo_cache_sentinel")?(o=t(el,{children:[r,t(ea,{children:[l,i,t(ec,{children:[a,e(en,{asChild:!0,children:e(x,{variant:"ghost",color:"neutral",size:"large",children:"Cancel"})}),e(x,{variant:"primary",color:"brand",size:"large",children:"Apply"})]})]})]}),c[4]=o):o=c[4],o},meta:ef},{name:"Sizes",story:()=>{let r,l,i,a,o,c,s,h,d,m=(0,n.c)(9);return m[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:t(x,{variant:"outline",color:"neutral",children:["Open Small (",640,"px)"]})}),m[0]=r):r=m[0],m[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eh,{children:t(em,{children:["Small Drawer (",640,"px)"]})}),m[1]=l):l=m[1],m[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(el,{width:640,children:[r,t(ea,{children:[l,e(ei,{children:e(ep,{fillHeight:!0})})]})]}),m[2]=i):i=m[2],m[3]===Symbol.for("react.memo_cache_sentinel")?(a=e(eu,{asChild:!0,children:t(x,{variant:"outline",color:"neutral",children:["Open Medium (",960,"px)"]})}),m[3]=a):a=m[3],m[4]===Symbol.for("react.memo_cache_sentinel")?(o=e(eh,{children:t(em,{children:["Medium Drawer (",960,"px)"]})}),m[4]=o):o=m[4],m[5]===Symbol.for("react.memo_cache_sentinel")?(c=t(el,{width:960,children:[a,t(ea,{children:[o,e(ei,{children:e(ep,{fillHeight:!0})})]})]}),m[5]=c):c=m[5],m[6]===Symbol.for("react.memo_cache_sentinel")?(s=e(eu,{asChild:!0,children:t(x,{variant:"outline",color:"neutral",children:["Open Large (",1130,"px)"]})}),m[6]=s):s=m[6],m[7]===Symbol.for("react.memo_cache_sentinel")?(h=e(eh,{children:t(em,{children:["Large Drawer (",1130,"px)"]})}),m[7]=h):h=m[7],m[8]===Symbol.for("react.memo_cache_sentinel")?(d=t(Y,{gap:8,justify:"center",children:[i,c,t(el,{width:1130,children:[s,t(ea,{children:[h,e(ei,{children:e(ep,{fillHeight:!0})})]})]})]}),m[8]=d):d=m[8],d},meta:ef},{name:"CustomSizes",story:()=>{let r,l,i,a,o,c,s=(0,n.c)(6);return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"50% Width"})}),s[0]=r):r=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eh,{children:e(em,{children:"50% Width Drawer"})}),s[1]=l):l=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(el,{width:"50%",children:[r,t(ea,{children:[l,e(ei,{children:e("div",{className:"py-12",children:e("p",{children:"This drawer takes 50% of the viewport width."})})})]})]}),s[2]=i):i=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(a=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"1000px Width"})}),s[3]=a):a=s[3],s[4]===Symbol.for("react.memo_cache_sentinel")?(o=e(eh,{children:e(em,{children:"1000px Width Drawer"})}),s[4]=o):o=s[4],s[5]===Symbol.for("react.memo_cache_sentinel")?(c=t(Y,{gap:8,justify:"center",children:[i,t(el,{width:1e3,children:[a,t(ea,{children:[o,e(ei,{children:e("div",{className:"py-12",children:e("p",{children:"This drawer has a fixed width of 1000px."})})})]})]})]}),s[5]=c):c=s[5],c},meta:ef},{name:"Resizable",story:()=>{let r,l,i,a,o,c,s,h,d,m,u,f,p=(0,n.c)(12);return p[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Resizable Drawer (as number)"})}),p[0]=r):r=p[0],p[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ed,{}),p[1]=l):l=p[1],p[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(eh,{children:e(em,{children:"Resizable Drawer"})}),p[2]=i):i=p[2],p[3]===Symbol.for("react.memo_cache_sentinel")?(a=t(el,{width:800,children:[r,t(ea,{children:[l,i,e(ei,{children:t("div",{className:"py-12",children:[e("p",{className:"mb-16",children:"Drag the left edge to resize this drawer."}),e(ep,{height:300})]})})]})]}),p[3]=a):a=p[3],p[4]===Symbol.for("react.memo_cache_sentinel")?(o=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Resizable Drawer (900px)"})}),p[4]=o):o=p[4],p[5]===Symbol.for("react.memo_cache_sentinel")?(c=e(ed,{}),p[5]=c):c=p[5],p[6]===Symbol.for("react.memo_cache_sentinel")?(s=e(eh,{children:e(em,{children:'Resizable Drawer with "900px" width'})}),p[6]=s):s=p[6],p[7]===Symbol.for("react.memo_cache_sentinel")?(h=t(el,{width:"900px",children:[o,t(ea,{children:[c,s,e(ei,{children:t("div",{className:"py-12",children:[e("p",{className:"mb-16",children:'Width is set as "900px" string. Drag the left edge to resize.'}),e(ep,{height:300})]})})]})]}),p[7]=h):h=p[7],p[8]===Symbol.for("react.memo_cache_sentinel")?(d=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Resizable Drawer (50%)"})}),p[8]=d):d=p[8],p[9]===Symbol.for("react.memo_cache_sentinel")?(m=e(ed,{}),p[9]=m):m=p[9],p[10]===Symbol.for("react.memo_cache_sentinel")?(u=e(eh,{children:e(em,{children:"Resizable Drawer with 50% width"})}),p[10]=u):u=p[10],p[11]===Symbol.for("react.memo_cache_sentinel")?(f=t(G,{gap:12,children:[a,h,t(el,{width:"50%",children:[d,t(ea,{children:[m,u,e(ei,{children:t("div",{className:"py-12",children:[e("p",{className:"mb-16",children:'Width is set as "50%". Drag the left edge to resize - it will convert to pixels.'}),e(ep,{height:300})]})})]})]})]}),p[11]=f):f=p[11],f},meta:ef},{name:"ResizableWithOverflowList",story:()=>{let r,l,i,o,c,s,h,d=(0,n.c)(8),[m,u]=(0,a.useState)(!1);return d[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Resizable Drawer with OverflowList"})}),d[0]=r):r=d[0],d[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(ed,{}),d[1]=l):l=d[1],d[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(eh,{children:e(em,{children:"Resizable Drawer with OverflowList"})}),d[2]=i):i=d[2],d[3]===Symbol.for("react.memo_cache_sentinel")?(o=e("p",{className:"mb-16",children:"Drag the left edge — the tag list reflows live."}),d[3]=o):o=d[3],d[4]===Symbol.for("react.memo_cache_sentinel")?(c=e(b,{children:"Attack types"}),d[4]=c):c=d[4],d[5]===Symbol.for("react.memo_cache_sentinel")?(s=t(ea,{children:[l,i,t(ei,{children:[o,t(_,{children:[c,e(S,{children:e(V,{"data-testid":"tags-overflow-list",className:"gap-4",items:ey,itemRenderer:ew})})]})]})]}),d[5]=s):s=d[5],d[6]!==m?(h=t(el,{"data-testid":"drawer",width:480,open:m,onOpenChange:u,children:[r,s]}),d[6]=m,d[7]=h):h=d[7],h},meta:ef},{name:"LongValues",story:()=>{let r,l,i,a,o=(0,n.c)(4);return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Drawer with Long Values"})}),o[0]=r):r=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eh,{children:e(em,{children:"Long values"})}),o[1]=l):l=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(b,{width:120,children:"URL"}),o[2]=i):i=o[2],o[3]===Symbol.for("react.memo_cache_sentinel")?(a=t(el,{"data-testid":"drawer",children:[r,t(ea,{children:[l,e(ei,{children:t(G,{gap:16,children:[t(_,{"data-testid":"url-attribute",orientation:"horizontal",children:[i,e(S,{children:e(er,{"data-testid":"url-text",size:"sm",truncate:!0,children:"https://cdn.example.com/microfrontends/a-very-long-application-name/0.1.0-build.2469/mf-manifest.json"})})]}),e(k,{"data-testid":"notes-input",placeholder:"Notes"})]})})]})]}),o[3]=a):a=o[3],a},meta:ef},{name:"Scrollable",story:()=>{let r,l,i,a,o=(0,n.c)(4);return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Drawer with Scroll"})}),o[0]=r):r=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eh,{children:e(em,{children:"Scrollable Content"})}),o[1]=l):l=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(ei,{children:e("div",{className:"flex flex-col gap-16 py-12",children:Array.from({length:20}).map(eg)})}),o[2]=i):i=o[2],o[3]===Symbol.for("react.memo_cache_sentinel")?(a=t(el,{children:[r,t(ea,{children:[l,i,t(ec,{children:[e(en,{asChild:!0,children:e(x,{variant:"ghost",color:"neutral",size:"large",children:"Close"})}),e(x,{variant:"primary",color:"brand",size:"large",children:"Confirm"})]})]})]}),o[3]=a):a=o[3],a},meta:ef},{name:"Controlled",story:()=>{let r,l,o,c,s,h=(0,n.c)(6),[d,m]=(0,a.useState)(!1);return h[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(x,{variant:"outline",color:"neutral",onClick:()=>m(!0),children:"Open Controlled Drawer"}),h[0]=r):r=h[0],h[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eh,{children:e(em,{children:"Controlled Drawer"})}),h[1]=l):l=h[1],h[2]===Symbol.for("react.memo_cache_sentinel")?(o=e(ei,{children:t("div",{className:"py-12",children:[e("p",{className:"mb-16",children:"This drawer is controlled externally."}),e(ep,{})]})}),h[2]=o):o=h[2],h[3]===Symbol.for("react.memo_cache_sentinel")?(c=t(ea,{children:[l,o,t(ec,{children:[e(en,{asChild:!0,children:e(x,{variant:"ghost",color:"neutral",size:"large",children:"Cancel"})}),e(x,{variant:"primary",color:"brand",size:"large",children:"Save Changes"})]})]}),h[3]=c):c=h[3],h[4]!==d?(s=t(i,{children:[r,e(el,{open:d,onOpenChange:m,children:c})]}),h[4]=d,h[5]=s):s=h[5],s},meta:ef},{name:"NoClosableOnEsc",story:()=>{let r,l,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Drawer"})}),a[0]=r):r=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eh,{children:e(em,{children:"Drawer Title"})}),a[1]=l):l=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(el,{closeOnEscape:!1,children:[r,t(ea,{children:[l,e(ei,{children:e(ep,{fillHeight:!0})})]})]}),a[2]=i):i=a[2],i},meta:ef},{name:"NoOverlay",story:()=>{let r,l,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open without Overlay"})}),a[0]=r):r=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eh,{children:e(em,{children:"No Overlay"})}),a[1]=l):l=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(el,{overlay:!1,children:[r,t(ea,{children:[l,e(ei,{children:e("div",{className:"py-12",children:e("p",{children:"This drawer has no overlay backdrop."})})})]})]}),a[2]=i):i=a[2],i},meta:ef},{name:"NonModal",story:()=>{let r,l,i,a=(0,n.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Non-Modal Drawer"})}),a[0]=r):r=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(l=t(eh,{children:[e(em,{children:"Non-modal drawer"}),e(en,{})]}),a[1]=l):l=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(G,{gap:16,align:"start",children:[t(el,{"data-testid":"drawer",modal:!1,overlay:!1,children:[r,t(ea,{children:[l,e(ei,{children:e("div",{className:"py-12",children:e("p",{children:"The page behind stays usable while this drawer is open."})})})]})]}),e(ep,{height:1600})]}),a[2]=i):i=a[2],i},meta:ef},{name:"WithNested",story:()=>{let r,l,i,a,o,c,s,h,d,m,u,f,p=(0,n.c)(12);return p[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"1st level drawer"})}),p[0]=r):r=p[0],p[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(em,{children:"[Level 1] Main Drawer"}),p[1]=l):l=p[1],p[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(eu,{asChild:!0,children:t(x,{variant:"ghost",color:"neutral",size:"small",children:[e(g,{}),"2nd level drawer"]})}),p[2]=i):i=p[2],p[3]===Symbol.for("react.memo_cache_sentinel")?(a=e(em,{children:"[Level 2] Detail View"}),p[3]=a):a=p[3],p[4]===Symbol.for("react.memo_cache_sentinel")?(o=e(eu,{asChild:!0,children:t(x,{variant:"ghost",color:"neutral",size:"small",children:[e(g,{}),"3nd level drawer"]})}),p[4]=o):o=p[4],p[5]===Symbol.for("react.memo_cache_sentinel")?(c=e(eh,{children:e(em,{children:"[Level 3] Deep Nested"})}),p[5]=c):c=p[5],p[6]===Symbol.for("react.memo_cache_sentinel")?(s=e(ei,{children:t(G,{gap:12,align:"start",children:[e(er,{children:"Level 3! Unlimited nesting works."}),e(ep,{height:150})]})}),p[6]=s):s=p[6],p[7]===Symbol.for("react.memo_cache_sentinel")?(h=t(eh,{children:[a,t(el,{children:[o,t(ea,{children:[c,s,e(ec,{children:e(en,{asChild:!0,children:e(x,{size:"large",variant:"ghost",color:"neutral",children:"Back"})})})]})]})]}),p[7]=h):h=p[7],p[8]===Symbol.for("react.memo_cache_sentinel")?(d=e(ei,{children:t(G,{gap:12,align:"start",children:[e(er,{children:"This is Level 2 drawer. Main drawer is pushed back. You can go deeper:"}),e(ep,{height:150})]})}),p[8]=d):d=p[8],p[9]===Symbol.for("react.memo_cache_sentinel")?(m=t(eh,{children:[l,t(el,{children:[i,t(ea,{children:[h,d,t(ec,{children:[e(en,{asChild:!0,children:e(x,{variant:"ghost",color:"neutral",size:"large",children:"Back"})}),e(x,{variant:"primary",color:"brand",size:"large",children:"Apply"})]})]})]})]}),p[9]=m):m=p[9],p[10]===Symbol.for("react.memo_cache_sentinel")?(u=e(ei,{children:t(G,{gap:12,align:"start",children:[e(er,{children:"This is Level 1 drawer. Click below to open nested drawers:"}),e(ep,{height:300})]})}),p[10]=u):u=p[10],p[11]===Symbol.for("react.memo_cache_sentinel")?(f=t(el,{children:[r,t(ea,{children:[m,u,t(ec,{children:[e(en,{asChild:!0,children:e(x,{variant:"ghost",color:"neutral",size:"large",children:"Cancel"})}),e(x,{variant:"primary",color:"brand",size:"large",children:"Save"})]})]})]}),p[11]=f):f=p[11],f},meta:ef},{name:"WithNestedDialog",story:()=>{let r,l,i,a,o,c,s=(0,n.c)(6);return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open drawer with dialog inside"})}),s[0]=r):r=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eh,{children:e(em,{children:"Drawer stays in place"})}),s[1]=l):l=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(i=e(er,{children:"Opening the dialog below must not scale or shift this drawer."}),s[2]=i):i=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(a=e(z,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open dialog"})}),s[3]=a):a=s[3],s[4]===Symbol.for("react.memo_cache_sentinel")?(o=e(I,{children:e(E,{children:"Dialog over a drawer"})}),s[4]=o):o=s[4],s[5]===Symbol.for("react.memo_cache_sentinel")?(c=t(el,{children:[r,t(ea,{children:[l,e(ei,{children:t(G,{gap:12,align:"start",children:[i,t(N,{children:[a,t(W,{children:[o,e(R,{children:e(ep,{height:150})})]})]})]})})]})]}),s[5]=c):c=s[5],c},meta:ef},{name:"WithNestedSelect",story:()=>{let r,l,i,a,o,c,s,h,d,m,u,p,y,w,_,b,S,v=(0,n.c)(17);if(v[0]===Symbol.for("react.memo_cache_sentinel")){let n=new f({items:[{label:"React",value:"react"},{label:"Vue",value:"vue"},{label:"Angular",value:"angular"}]});s=el,y=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open drawer with nested select"})}),c=ea,o=eh,p=e(em,{children:"[Level 1] Main Drawer"}),a=el,u=e(eu,{asChild:!0,children:t(x,{variant:"ghost",color:"neutral",size:"small",children:[e(g,{}),"Open nested drawer"]})}),i=ea,m=e(eh,{children:e(em,{children:"[Level 2] With Select"})}),l=ei,r=G,h=12,d="start",w=t(j,{collection:n,"data-testid":"nested-select",children:[e(L,{}),e(U,{children:e(P,{children:n.items.map(e_)})})]}),v[0]=r,v[1]=l,v[2]=i,v[3]=a,v[4]=o,v[5]=c,v[6]=s,v[7]=h,v[8]=d,v[9]=m,v[10]=u,v[11]=p,v[12]=y,v[13]=w}else r=v[0],l=v[1],i=v[2],a=v[3],o=v[4],c=v[5],s=v[6],h=v[7],d=v[8],m=v[9],u=v[10],p=v[11],y=v[12],w=v[13];return v[14]===Symbol.for("react.memo_cache_sentinel")?(_=e(A,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open menu"})}),v[14]=_):_=v[14],v[15]===Symbol.for("react.memo_cache_sentinel")?(b=t(o,{children:[p,t(a,{children:[u,t(i,{children:[m,e(l,{children:t(r,{gap:h,align:d,children:[w,t(M,{"data-testid":"nested-dropdown",children:[_,t(T,{children:[e($,{children:"First action"}),e($,{children:"Second action"})]})]})]})})]})]})]}),v[15]=b):b=v[15],v[16]===Symbol.for("react.memo_cache_sentinel")?(S=t(s,{children:[y,t(c,{children:[b,e(ei,{children:e(ep,{height:200})})]})]}),v[16]=S):S=v[16],S},meta:ef},{name:"WithTabs",story:()=>{let r,l,i,o,c,s,h,d,m=(0,n.c)(9),[u,f]=(0,a.useState)("tab1");return m[0]===Symbol.for("react.memo_cache_sentinel")?(r=e(eu,{asChild:!0,children:e(x,{variant:"outline",color:"neutral",children:"Open Drawer with Tabs"})}),m[0]=r):r=m[0],m[1]===Symbol.for("react.memo_cache_sentinel")?(l=e(eh,{children:e(em,{children:"Tabbed Content"})}),m[1]=l):l=m[1],m[2]===Symbol.for("react.memo_cache_sentinel")?(i=t(K,{children:[e(ee,{value:"tab1",children:"General"}),e(ee,{value:"tab2",children:"Settings"}),e(ee,{value:"tab3",children:"Advanced"})]}),m[2]=i):i=m[2],m[3]===Symbol.for("react.memo_cache_sentinel")?(o=t(Q,{value:"tab1",children:[e("h3",{className:"text-lg font-medium mb-8",children:"General Settings"}),e(ep,{height:300})]}),m[3]=o):o=m[3],m[4]===Symbol.for("react.memo_cache_sentinel")?(c=t(Q,{value:"tab2",children:[e("h3",{className:"text-lg font-medium mb-8",children:"Configuration"}),e(ep,{height:300})]}),m[4]=c):c=m[4],m[5]===Symbol.for("react.memo_cache_sentinel")?(s=e(ei,{children:t("div",{className:"pt-12",children:[o,c,t(Q,{value:"tab3",children:[e("h3",{className:"text-lg font-medium mb-8",children:"Advanced Options"}),e(ep,{height:300})]})]})}),m[5]=s):s=m[5],m[6]===Symbol.for("react.memo_cache_sentinel")?(h=t(ec,{children:[e(en,{asChild:!0,children:e(x,{variant:"ghost",color:"neutral",size:"large",children:"Cancel"})}),e(x,{variant:"primary",color:"brand",size:"large",children:"Apply Settings"})]}),m[6]=h):h=m[6],m[7]!==u?(d=t(el,{width:960,children:[r,e(ea,{children:t(Z,{value:u,onChange:f,asChild:!0,children:[l,i,s,h]})})]}),m[7]=u,m[8]=d):d=m[8],d},meta:ef}];function eS({entry:e}){let{story:t,meta:r}=e,l={...r.args,...t.args},i="function"==typeof t||t.$$typeof?t:t.render||r.render||r.component,n=()=>a.default.createElement(i,l),o={args:l,globals:{theme:"light"},parameters:{...r.parameters,...t.parameters},viewMode:"story"};for(let e of[...r.decorators||[],...t.decorators||[]].reverse()){let t=n;n=()=>e(t,o)}return a.default.createElement("section",{"data-preview-story":e.name,className:"p-16"},a.default.createElement("h2",{className:"text-sm mb-12"},e.name),a.default.createElement(n))}window.WallarmPreview={mount(e){let t=window.ReactDOM.createRoot(e);return t.render(a.default.createElement(window.WallarmDS.Root,null,eb.map((e,t)=>a.default.createElement(eS,{key:t,entry:e})))),t}}})();
@@ -73,6 +73,14 @@ them — a half-iconned list reads as though some items are missing theirs.
73
73
 
74
74
  Source: DropdownMenu/DropdownMenu.stories.tsx#WithIcons
75
75
 
76
+ ### WithAgents
77
+
78
+ An agent takes the icon's place: a 16 px `AgentGlyph` in `DropdownMenuItemIcon`, beside the agent's
79
+ visible name — the glyph is decorative and never announced. A custom agent passes its stored look
80
+ (`defaultLook(uid)` until it has one).
81
+
82
+ Source: DropdownMenu/DropdownMenu.stories.tsx#WithAgents
83
+
76
84
  ### WithFooter
77
85
 
78
86
  `DropdownMenuFooter` bleeds to the panel edge under a divider and renders at secondary
@@ -115,7 +123,8 @@ Source: DropdownMenu/DropdownMenu.stories.tsx#WithMixedSelectionItems
115
123
  ```tsx
116
124
  import { useState } from 'react';
117
125
  import type { Meta, StoryFn } from 'storybook-react-rsbuild';
118
- import { CirclePlus, Earth, LayoutTemplate, Maximize, Plus } from '../../icons';
126
+ import { CirclePlus, Earth, LayoutTemplate, Maximize, Plus, UserPlus } from '../../icons';
127
+ import { AgentGlyph, defaultLook } from '../AgentGlyph';
119
128
  import { Button } from '../Button';
120
129
  import { Kbd, KbdGroup } from '../Kbd';
121
130
  import { DropdownMenu } from './DropdownMenu';
@@ -466,6 +475,60 @@ export const WithIcons: StoryFn<typeof meta> = () => (
466
475
  </DropdownMenu>
467
476
  );
468
477
 
478
+ /**
479
+ * An agent takes the icon's place: a 16 px `AgentGlyph` in `DropdownMenuItemIcon`, beside the agent's
480
+ * visible name — the glyph is decorative and never announced. A custom agent passes its stored look
481
+ * (`defaultLook(uid)` until it has one).
482
+ */
483
+ export const WithAgents: StoryFn<typeof meta> = () => (
484
+ <DropdownMenu data-testid='dropdown-menu'>
485
+ <DropdownMenuTrigger asChild>
486
+ <Button variant='outline' color='neutral'>
487
+ <UserPlus />
488
+ Assign to
489
+ </Button>
490
+ </DropdownMenuTrigger>
491
+ <DropdownMenuContent>
492
+ <DropdownMenuItem>
493
+ <DropdownMenuItemIcon>
494
+ <AgentGlyph agent='radar' size={16} />
495
+ </DropdownMenuItemIcon>
496
+ <DropdownMenuItemContent>
497
+ <DropdownMenuItemText>Radar</DropdownMenuItemText>
498
+ <DropdownMenuItemDescription>Attack Anomaly Investigator</DropdownMenuItemDescription>
499
+ </DropdownMenuItemContent>
500
+ </DropdownMenuItem>
501
+ <DropdownMenuItem>
502
+ <DropdownMenuItemIcon>
503
+ <AgentGlyph agent='sift' size={16} />
504
+ </DropdownMenuItemIcon>
505
+ <DropdownMenuItemContent>
506
+ <DropdownMenuItemText>Sift</DropdownMenuItemText>
507
+ <DropdownMenuItemDescription>False Positives Analyzer</DropdownMenuItemDescription>
508
+ </DropdownMenuItemContent>
509
+ </DropdownMenuItem>
510
+ <DropdownMenuItem>
511
+ <DropdownMenuItemIcon>
512
+ <AgentGlyph agent='lens' size={16} />
513
+ </DropdownMenuItemIcon>
514
+ <DropdownMenuItemText>Lens</DropdownMenuItemText>
515
+ </DropdownMenuItem>
516
+ <DropdownMenuItem>
517
+ <DropdownMenuItemIcon>
518
+ <AgentGlyph agent='bard' size={16} />
519
+ </DropdownMenuItemIcon>
520
+ <DropdownMenuItemText>Bard</DropdownMenuItemText>
521
+ </DropdownMenuItem>
522
+ <DropdownMenuItem>
523
+ <DropdownMenuItemIcon>
524
+ <AgentGlyph look={defaultLook('agent-7f3a')} size={16} />
525
+ </DropdownMenuItemIcon>
526
+ <DropdownMenuItemText>Night watch</DropdownMenuItemText>
527
+ </DropdownMenuItem>
528
+ </DropdownMenuContent>
529
+ </DropdownMenu>
530
+ );
531
+
469
532
  /**
470
533
  * `DropdownMenuFooter` bleeds to the panel edge under a divider and renders at secondary
471
534
  * emphasis, so it suits a persistent link or count rather than an action competing with the items.
@@ -9,4 +9,4 @@ var e={vD(e,r,n){let t,l;/**
9
9
  * @nolint
10
10
  * @preventMunge
11
11
  * @preserve-invariant-messages
12
- */var c,o,i=Object.create,a=Object.defineProperty,d=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,s=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,u=(e,r,n,t)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let l of h(r))m.call(e,l)||l===n||a(e,l,{get:()=>r[l],enumerable:!(t=d(r,l))||t.enumerable});return e},f={},p={$dispatcherGuard:()=>$,$makeReadOnly:()=>N,$reset:()=>k,$structuralCheck:()=>x,c:()=>D,clearRenderCounterRegistry:()=>I,renderCounterRegistry:()=>W,useRenderCounter:()=>O};for(var y in p)a(f,y,{get:p[y],enumerable:!0});e.exports=u(a({},"__esModule",{value:!0}),f);var _=(l=null!=(t=n("C"))?i(s(t)):{},u(t&&t.__esModule?l:a(l,"default",{value:t,enumerable:!0}),t)),{useRef:S,useEffect:w,isValidElement:b}=_,g=null!=(c=_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?c:_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for("react.memo_cache_sentinel"),D="function"==typeof(null==(o=_.__COMPILER_RUNTIME)?void 0:o.c)?_.__COMPILER_RUNTIME.c:function(e){return _.useMemo(()=>{let r=Array(e);for(let n=0;n<e;n++)r[n]=v;return r[v]=!0,r},[])},C={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{C[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var R=null;function E(e){return g.ReactCurrentDispatcher.current=e,g.ReactCurrentDispatcher.current}C.useMemoCache=e=>{if(null!=R)return R.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var M=[];function $(e){let r=g.ReactCurrentDispatcher.current;if(0===e){if(M.push(r),1===M.length&&(R=r),r===C)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");E(C)}else if(1===e){let e=M.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===M.length&&(R=null),E(e)}else if(2===e)M.push(r),E(R);else if(3===e){let e=M.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");E(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function k(e){for(let r=0;r<e.length;r++)e[r]=v}function N(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var W=new Map;function I(){for(let e of W.values())e.forEach(e=>{e.count=0})}function O(e){let r=S(null);null!=r.current&&(r.current.count+=1),w(()=>{if(null==r.current){let n,t={count:0};null==(n=W.get(e))&&(n=new Set,W.set(e,n)),n.add(t),r.current=t}return()=>{var n;let t;null!==r.current&&(n=r.current,null!=(t=W.get(e))&&t.delete(n))}})}var T=new Set;function x(e,r,n,t,l,c){function o(e,r,o,i){let a=`${t}:${c} [${l}] ${n}${o} changed from ${e} to ${r} at depth ${i}`;T.has(a)||(T.add(a),console.error(a))}!function e(r,n,t,l){if(!(l>2)){if(r!==n)if(typeof r!=typeof n)o(`type ${typeof r}`,`type ${typeof n}`,t,l);else if("object"==typeof r){let c=Array.isArray(r),i=Array.isArray(n);if(null===r&&null!==n)o("null",`type ${typeof n}`,t,l);else if(null===n)o(`type ${typeof r}`,"null",t,l);else if(r instanceof Map)if(n instanceof Map)if(r.size!==n.size)o(`Map instance with size ${r.size}`,`Map instance with size ${n.size}`,t,l);else for(let[c,i]of r)n.has(c)?e(i,n.get(c),`${t}.get(${c})`,l+1):o(`Map instance with key ${c}`,`Map instance without key ${c}`,t,l);else o("Map instance","other value",t,l);else if(n instanceof Map)o("other value","Map instance",t,l);else if(r instanceof Set)if(n instanceof Set)if(r.size!==n.size)o(`Set instance with size ${r.size}`,`Set instance with size ${n.size}`,t,l);else for(let e of n)r.has(e)||o(`Set instance without element ${e}`,`Set instance with element ${e}`,t,l);else o("Set instance","other value",t,l);else if(n instanceof Set)o("other value","Set instance",t,l);else if(c||i)if(c!==i)o(`type ${c?"array":"object"}`,`type ${i?"array":"object"}`,t,l);else if(r.length!==n.length)o(`array with length ${r.length}`,`array with length ${n.length}`,t,l);else for(let c=0;c<r.length;c++)e(r[c],n[c],`${t}[${c}]`,l+1);else if(b(r)||b(n))b(r)!==b(n)?o(`type ${b(r)?"React element":"object"}`,`type ${b(n)?"React element":"object"}`,t,l):r.type!==n.type?o(`React element of type ${r.type}`,`React element of type ${n.type}`,t,l):e(r.props,n.props,`[props of ${t}]`,l+1);else{for(let e in n)e in r||o(`object without key ${e}`,`object with key ${e}`,t,l);for(let c in r)c in n?e(r[c],n[c],`${t}.${c}`,l+1):o(`object with key ${c}`,`object without key ${c}`,t,l)}}else{if("function"==typeof r)return;isNaN(r)||isNaN(n)?isNaN(r)!==isNaN(n)&&o(`${isNaN(r)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,t,l):r!==n&&o(r,n,t,l)}}}(e,r,"",0)}},p(e,r,n){let t=new WeakMap,l=new WeakMap;function c(e,r,n){let c=r,o=n;if("object"==typeof c&&null!==c&&"$$typeof"in c&&c.$$typeof===Symbol.for("react.context")&&"Provider"in c&&(c=c.Provider),"function"==typeof c&&null!=o.ref&&!c.prototype?.isReactComponent){let r=c,n=t.get(e);n||(n=new WeakMap,t.set(e,n));let l=n.get(r);l||((l=e.forwardRef((e,n)=>r({...e,ref:n}))).displayName=r.displayName??r.name,n.set(r,l)),c=l}if("string"==typeof c&&"boolean"==typeof o.inert&&((o={...o}).inert?o.inert="":delete o.inert),"string"==typeof c)for(let[e,r]of[["fill-rule","fillRule"],["clip-rule","clipRule"]])e in o&&(o={...o,[r]:o[e]},delete o[e]);return"string"==typeof c&&null!=o.ref&&(c=function(e,r){let n=l.get(e);n||(n=new Map,l.set(e,n));let t=n.get(r);if(t)return t;let c=e.forwardRef((n,t)=>{let l=e.useRef(null);if(!l.current||l.current.original!==t){let e;l.current={original:t,callback:r=>{if(null==r&&e){let r=e;e=void 0,r();return}if("function"==typeof t){let n=t(r);e="function"==typeof n?n:void 0}else t&&(t.current=r)}}}return e.createElement(r,{...n,ref:l.current.callback})});return c.displayName=`CanvasHost(${r})`,n.set(r,c),c}(e,c)),{type:c,props:o}}function o(e){let r=(r,n,t)=>{let l=c(e,r,n??{});return e.createElement(l.type,void 0===t?l.props:{...l.props,key:t})};return{jsx:r,jsxs:(r,n,t)=>{let l=c(e,r,n??{}),{children:o,...i}=l.props;return e.createElement(l.type,void 0===t?i:{...i,key:t},...Array.isArray(o)?o:[o])},jsxDEV:r,Fragment:e.Fragment}}function i(e){return{...e,createElement:(r,n,...t)=>{let l=c(e,r,n??{});return e.createElement(l.type,l.props,...t)},cloneElement:(r,n,...t)=>{let l=e.cloneElement(r,n??void 0,...t),o=l.ref,i=c(e,l.type,{...l.props,ref:o});return i.type===l.type&&"string"!=typeof l.type?l:e.createElement(i.type,{...i.props,key:l.key})}}}n.d(r,{MA:()=>o,YJ:()=>i})},C(e,r,n){n.r(r);let t=(0,n("p").YJ)(window.React),{Children:l,Component:c,Fragment:o,Profiler:i,PureComponent:a,StrictMode:d,Suspense:h,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:s,act:m,cloneElement:u,createContext:f,createElement:p,createFactory:y,createRef:_,forwardRef:S,isValidElement:w,lazy:b,memo:g,startTransition:v,unstable_act:D,useCallback:C,useContext:R,useDebugValue:E,useDeferredValue:M,useEffect:$,useId:k,useImperativeHandle:N,useInsertionEffect:W,useLayoutEffect:I,useMemo:O,useReducer:T,useRef:x,useState:A,useSyncExternalStore:P,useTransition:j,version:L,use:B}=t;n.d(r,{},{Children:l,Component:c,Fragment:o,Profiler:i,PureComponent:a,StrictMode:d,Suspense:h,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:s,act:m,cloneElement:u,createContext:f,createElement:p,createFactory:y,createRef:_,default:t,forwardRef:S,isValidElement:w,lazy:b,memo:g,startTransition:v,unstable_act:D,use:B,useCallback:C,useContext:R,useDebugValue:E,useDeferredValue:M,useEffect:$,useId:k,useImperativeHandle:N,useInsertionEffect:W,useLayoutEffect:I,useMemo:O,useReducer:T,useRef:x,useState:A,useSyncExternalStore:P,useTransition:j,version:L})}},r={};function n(t){var l=r[t];if(void 0!==l)return l.exports;var c=r[t]={exports:{}};return e[t](c,c.exports,n),c.exports}n.d=(e,r,t)=>{var l=(r,t)=>{for(var l in r)n.o(r,l)&&!n.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,[t]:r[l]})};l(r,"get"),l(t,"value")},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let{jsx:e,jsxs:r,jsxDEV:t,Fragment:l}=(0,n("p").MA)(window.React);var c=n("vD"),o=n("C");let i=window.WallarmDS.Icons.CirclePlus,a=window.WallarmDS.Icons.Earth,d=window.WallarmDS.Icons.LayoutTemplate,h=window.WallarmDS.Icons.Maximize,s=window.WallarmDS.Icons.Plus,m=window.WallarmDS.Button,u=window.WallarmDS.Kbd,f=window.WallarmDS.KbdGroup,p=window.WallarmDS.DropdownMenu,y=window.WallarmDS.DropdownMenuCheckboxItem,_=window.WallarmDS.DropdownMenuContent,S=window.WallarmDS.DropdownMenuContextTrigger,w=window.WallarmDS.DropdownMenuFooter,b=window.WallarmDS.DropdownMenuGroup,g=window.WallarmDS.DropdownMenuItem,v=window.WallarmDS.DropdownMenuItemContent,D=window.WallarmDS.DropdownMenuItemDescription,C=window.WallarmDS.DropdownMenuItemIcon,R=window.WallarmDS.DropdownMenuItemText,E=window.WallarmDS.DropdownMenuLabel,M=window.WallarmDS.DropdownMenuRadioGroup,$=window.WallarmDS.DropdownMenuRadioItem,k=window.WallarmDS.DropdownMenuSeparator,N=window.WallarmDS.DropdownMenuShortcut,W=window.WallarmDS.DropdownMenuTrigger,I=window.WallarmDS.DropdownMenuTriggerItem,O={title:"Actions/DropdownMenu",component:p,subcomponents:{DropdownMenuContent:_,DropdownMenuGroup:b,DropdownMenuItem:g,DropdownMenuItemContent:v,DropdownMenuItemDescription:D,DropdownMenuItemIcon:C,DropdownMenuItemText:R,DropdownMenuLabel:E,DropdownMenuSeparator:k,DropdownMenuShortcut:N,DropdownMenuTrigger:W,DropdownMenuTriggerItem:I,DropdownMenuContextTrigger:S,DropdownMenuFooter:w,DropdownMenuCheckboxItem:y,DropdownMenuRadioGroup:M,DropdownMenuRadioItem:$},parameters:{layout:"centered",docs:{description:{component:"A menu of actions hanging off a trigger — reach for `Select` when the reader is choosing a value for a form, since a menu runs commands rather than holding an answer. Leave the primary action visible as a `Button` and put only the secondary ones in here; past roughly ten items, group them or move them somewhere with room."}}}},T=[{name:"Basic",story:()=>{let n,t,l,o,i,a,d,h,s,y,S,w,v,D,C,R,M,$=(0,c.c)(17);return $[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(W,{asChild:!0,children:e(m,{variant:"outline",color:"neutral",children:"Open"})}),$[0]=n):n=$[0],$[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(E,{children:"My Account"}),$[1]=t):t=$[1],$[2]===Symbol.for("react.memo_cache_sentinel")?(l=r(g,{children:["Profile",e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"P"})]})})]}),$[2]=l):l=$[2],$[3]===Symbol.for("react.memo_cache_sentinel")?(o=r(g,{children:["Billing",e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"B"})]})})]}),$[3]=o):o=$[3],$[4]===Symbol.for("react.memo_cache_sentinel")?(i=r(g,{children:["Settings",e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"S"})]})})]}),$[4]=i):i=$[4],$[5]===Symbol.for("react.memo_cache_sentinel")?(a=r(b,{children:[l,o,i,r(g,{children:["Keyboard shortcuts super",e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"K"})]})})]})]}),d=e(k,{}),$[5]=a,$[6]=d):(a=$[5],d=$[6]),$[7]===Symbol.for("react.memo_cache_sentinel")?(h=e(g,{children:"Team"}),$[7]=h):h=$[7],$[8]===Symbol.for("react.memo_cache_sentinel")?(s=e(I,{children:"Invite users"}),$[8]=s):s=$[8],$[9]===Symbol.for("react.memo_cache_sentinel")?(y=r(p,{children:[s,r(_,{children:[e(g,{children:"Email"}),e(g,{children:"Message"}),e(k,{}),e(g,{children:"More..."})]})]}),$[9]=y):y=$[9],$[10]===Symbol.for("react.memo_cache_sentinel")?(S=r(b,{children:[h,y,r(g,{children:["New Team",e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"T"})]})})]})]}),w=e(k,{}),v=e(g,{children:"GitHub"}),D=e(g,{children:"Support"}),C=e(g,{disabled:!0,children:"API"}),R=e(k,{}),$[10]=S,$[11]=w,$[12]=v,$[13]=D,$[14]=C,$[15]=R):(S=$[10],w=$[11],v=$[12],D=$[13],C=$[14],R=$[15]),$[16]===Symbol.for("react.memo_cache_sentinel")?(M=r(p,{"data-testid":"dropdown-menu",children:[n,r(_,{children:[t,a,d,S,w,v,D,C,R,r(g,{variant:"destructive",children:["Log out",e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"Q"})]})})]})]})]}),$[16]=M):M=$[16],M},meta:O},{name:"Context",story:()=>{let n,t,l,o,i,a,d,h,s,m,y,w,v,D,C,R,M,$=(0,c.c)(17);return $[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(S,{asChild:!0,children:e("div",{className:"flex items-center justify-center w-300 h-192 border border-border-primary border-dashed rounded-8",children:"Right click here"})}),$[0]=n):n=$[0],$[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(E,{children:"My Account"}),$[1]=t):t=$[1],$[2]===Symbol.for("react.memo_cache_sentinel")?(l=r(g,{children:["Profile",e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"P"})]})})]}),$[2]=l):l=$[2],$[3]===Symbol.for("react.memo_cache_sentinel")?(o=r(g,{children:["Billing",e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"B"})]})})]}),$[3]=o):o=$[3],$[4]===Symbol.for("react.memo_cache_sentinel")?(i=r(g,{children:["Settings",e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"S"})]})})]}),$[4]=i):i=$[4],$[5]===Symbol.for("react.memo_cache_sentinel")?(a=r(b,{children:[l,o,i,r(g,{children:["Keyboard shortcuts super",e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"K"})]})})]})]}),d=e(k,{}),$[5]=a,$[6]=d):(a=$[5],d=$[6]),$[7]===Symbol.for("react.memo_cache_sentinel")?(h=e(g,{children:"Team"}),$[7]=h):h=$[7],$[8]===Symbol.for("react.memo_cache_sentinel")?(s=e(I,{children:"Invite users"}),$[8]=s):s=$[8],$[9]===Symbol.for("react.memo_cache_sentinel")?(m=r(p,{children:[s,r(_,{children:[e(g,{children:"Email"}),e(g,{children:"Message"}),e(k,{}),e(g,{children:"More..."})]})]}),$[9]=m):m=$[9],$[10]===Symbol.for("react.memo_cache_sentinel")?(y=r(b,{children:[h,m,r(g,{children:["New Team",e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"T"})]})})]})]}),w=e(k,{}),v=e(g,{children:"GitHub"}),D=e(g,{children:"Support"}),C=e(g,{disabled:!0,children:"API"}),R=e(k,{}),$[10]=y,$[11]=w,$[12]=v,$[13]=D,$[14]=C,$[15]=R):(y=$[10],w=$[11],v=$[12],D=$[13],C=$[14],R=$[15]),$[16]===Symbol.for("react.memo_cache_sentinel")?(M=r(p,{children:[n,r(_,{children:[t,a,d,y,w,v,D,C,R,r(g,{variant:"destructive",children:["Log out",e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"Q"})]})})]})]})]}),$[16]=M):M=$[16],M},meta:O},{name:"WithDescriptions",story:()=>{let n,t,l,o,a,d,h,y=(0,c.c)(7);return y[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(W,{asChild:!0,children:r(m,{variant:"outline",color:"neutral",children:[e(s,{}),"Add Widget"]})}),y[0]=n):n=y[0],y[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(g,{children:r(v,{children:[e(R,{children:"Bar-volume chart"}),e(D,{children:"Description"})]})}),y[1]=t):t=y[1],y[2]===Symbol.for("react.memo_cache_sentinel")?(l=e(g,{children:r(v,{children:[e(R,{children:"Canvas"}),e(D,{children:"Description"})]})}),y[2]=l):l=y[2],y[3]===Symbol.for("react.memo_cache_sentinel")?(o=r(v,{children:[e(R,{children:"Attacks heat-map"}),e(D,{children:"Description"})]}),y[3]=o):o=y[3],y[4]===Symbol.for("react.memo_cache_sentinel")?(a=r(g,{children:[o,e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"Q"})]})})]}),d=e(k,{}),y[4]=a,y[5]=d):(a=y[4],d=y[5]),y[6]===Symbol.for("react.memo_cache_sentinel")?(h=r(p,{children:[n,r(_,{children:[t,l,a,d,r(g,{variant:"brand",children:[e(i,{}),e(R,{children:"Request custom widget"})]})]})]}),y[6]=h):h=y[6],h},meta:O},{name:"WithIcons",story:()=>{let n,t,l,o,y,S,w,b,D,E,M=(0,c.c)(10);return M[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(W,{asChild:!0,children:r(m,{variant:"outline",color:"neutral",children:[e(s,{}),"Add Widget"]})}),M[0]=n):n=M[0],M[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(C,{children:e(d,{})}),M[1]=t):t=M[1],M[2]===Symbol.for("react.memo_cache_sentinel")?(l=r(g,{children:[t,e(v,{children:e(R,{children:"Bar-volume chart"})})]}),M[2]=l):l=M[2],M[3]===Symbol.for("react.memo_cache_sentinel")?(o=e(C,{children:e(h,{})}),M[3]=o):o=M[3],M[4]===Symbol.for("react.memo_cache_sentinel")?(y=r(g,{children:[o,e(v,{children:e(R,{children:"Canvas"})})]}),M[4]=y):y=M[4],M[5]===Symbol.for("react.memo_cache_sentinel")?(S=e(C,{children:e(a,{})}),w=e(R,{children:"Attacks heat-map"}),M[5]=S,M[6]=w):(S=M[5],w=M[6]),M[7]===Symbol.for("react.memo_cache_sentinel")?(b=r(g,{children:[S,w,e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"Q"})]})})]}),D=e(k,{}),M[7]=b,M[8]=D):(b=M[7],D=M[8]),M[9]===Symbol.for("react.memo_cache_sentinel")?(E=r(p,{children:[n,r(_,{children:[l,y,b,D,r(g,{variant:"brand",children:[e(i,{}),e(R,{children:"Request custom widget"})]})]})]}),M[9]=E):E=M[9],E},meta:O},{name:"WithFooter",story:()=>{let n,t,l,o,i,a,d,h,s,y,S,b,v,D,C,R=(0,c.c)(15);return R[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(W,{asChild:!0,children:e(m,{variant:"outline",color:"neutral",children:"Open"})}),R[0]=n):n=R[0],R[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(g,{children:"Profile"}),a=e(g,{children:"Billing"}),d=e(g,{children:"Settings"}),h=e(g,{children:"Notifications"}),s=e(g,{children:"Integrations"}),y=e(g,{children:"Security"}),S=e(g,{children:"API Keys"}),b=e(g,{children:"Webhooks"}),v=e(g,{children:"Audit Log"}),l=e(g,{children:"Team Members"}),o=e(g,{children:"Permissions"}),i=e(g,{children:"Usage"}),R[1]=t,R[2]=l,R[3]=o,R[4]=i,R[5]=a,R[6]=d,R[7]=h,R[8]=s,R[9]=y,R[10]=S,R[11]=b,R[12]=v):(t=R[1],l=R[2],o=R[3],i=R[4],a=R[5],d=R[6],h=R[7],s=R[8],y=R[9],S=R[10],b=R[11],v=R[12]),R[13]===Symbol.for("react.memo_cache_sentinel")?(D=r("span",{className:"flex items-center gap-4",children:[r(f,{children:[e(u,{children:"↑"}),e(u,{children:"↓"})]}),"to navigate"]}),R[13]=D):D=R[13],R[14]===Symbol.for("react.memo_cache_sentinel")?(C=r(p,{children:[n,r(_,{children:[t,a,d,h,s,y,S,b,v,l,o,i,r(w,{children:[D,r("span",{className:"flex items-center gap-4",children:[e(f,{children:e(u,{children:"↵"})}),"to select"]})]})]})]}),R[14]=C):C=R[14],C},meta:O},{name:"WithDescriptionAndIcons",story:()=>{let n,t,l,o,y,S,w,b,E,M,$=(0,c.c)(10);return $[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(W,{asChild:!0,children:r(m,{variant:"outline",color:"neutral",children:[e(s,{}),"Add Widget"]})}),$[0]=n):n=$[0],$[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(C,{children:e(d,{})}),$[1]=t):t=$[1],$[2]===Symbol.for("react.memo_cache_sentinel")?(l=r(g,{children:[t,r(v,{children:[e(R,{children:"Bar-volume chart"}),e(D,{children:"Description"})]})]}),$[2]=l):l=$[2],$[3]===Symbol.for("react.memo_cache_sentinel")?(o=e(C,{children:e(h,{})}),$[3]=o):o=$[3],$[4]===Symbol.for("react.memo_cache_sentinel")?(y=r(g,{children:[o,r(v,{children:[e(R,{children:"Canvas"}),e(D,{children:"Description"})]})]}),$[4]=y):y=$[4],$[5]===Symbol.for("react.memo_cache_sentinel")?(S=e(C,{children:e(a,{})}),$[5]=S):S=$[5],$[6]===Symbol.for("react.memo_cache_sentinel")?(w=r(v,{children:[e(R,{children:"Attacks heat-map"}),e(D,{children:"Description"})]}),$[6]=w):w=$[6],$[7]===Symbol.for("react.memo_cache_sentinel")?(b=r(g,{children:[S,w,e(N,{children:r(f,{children:[e(u,{children:"⌘"}),e(u,{children:"Q"})]})})]}),E=e(k,{}),$[7]=b,$[8]=E):(b=$[7],E=$[8]),$[9]===Symbol.for("react.memo_cache_sentinel")?(M=r(p,{children:[n,r(_,{children:[l,y,b,E,r(g,{variant:"brand",children:[e(i,{}),e(R,{children:"Request custom widget"})]})]})]}),$[9]=M):M=$[9],M},meta:O},{name:"WithCheckboxItems",story:()=>{let n,t,l,i,a,d,h,s=(0,c.c)(13),[u,f]=(0,o.useState)(!0),[S,w]=(0,o.useState)(!1),[b,g]=(0,o.useState)(!0);return s[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(W,{asChild:!0,children:e(m,{variant:"outline",color:"neutral",children:"Text style"})}),s[0]=n):n=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(E,{children:"Text style"}),s[1]=t):t=s[1],s[2]!==u?(l=e(y,{checked:u,onCheckedChange:f,children:"Bold"}),s[2]=u,s[3]=l):l=s[3],s[4]!==S?(i=e(y,{checked:S,onCheckedChange:w,children:"Italic"}),s[4]=S,s[5]=i):i=s[5],s[6]!==b?(a=e(y,{checked:b,onCheckedChange:g,children:"Underline"}),s[6]=b,s[7]=a):a=s[7],s[8]===Symbol.for("react.memo_cache_sentinel")?(d=e(y,{checked:!1,disabled:!0,children:"Strikethrough"}),s[8]=d):d=s[8],s[9]!==l||s[10]!==i||s[11]!==a?(h=r(p,{"data-testid":"dropdown-menu",children:[n,r(_,{children:[t,l,i,a,d]})]}),s[9]=l,s[10]=i,s[11]=a,s[12]=h):h=s[12],h},meta:O},{name:"WithRadioGroup",story:()=>{let n,t,l,i,a,d,h,s=(0,c.c)(8),[u,f]=(0,o.useState)("list");s[0]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{f(e.value)},s[0]=n):n=s[0];let y=n;return s[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(W,{asChild:!0,children:e(m,{variant:"outline",color:"neutral",children:"View mode"})}),s[1]=t):t=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(l=e(E,{children:"View mode"}),s[2]=l):l=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(i=e($,{value:"list",children:"List"}),a=e($,{value:"grid",children:"Grid"}),d=e($,{value:"compact",disabled:!0,children:"Compact"}),s[3]=i,s[4]=a,s[5]=d):(i=s[3],a=s[4],d=s[5]),s[6]!==u?(h=r(p,{"data-testid":"dropdown-menu",children:[t,r(_,{children:[l,r(M,{value:u,onValueChange:y,children:[i,a,d]})]})]}),s[6]=u,s[7]=h):h=s[7],h},meta:O},{name:"WithMixedSelectionItems",story:()=>{let n,t,l,i,a,d,h,s,u,f,S,w,b,v=(0,c.c)(19),[D,C]=(0,o.useState)(!0),[R,N]=(0,o.useState)(!1),[I,O]=(0,o.useState)("list");v[0]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{O(e.value)},v[0]=n):n=v[0];let T=n;return v[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(W,{asChild:!0,children:e(m,{variant:"outline",color:"neutral",children:"Editor settings"})}),v[1]=t):t=v[1],v[2]===Symbol.for("react.memo_cache_sentinel")?(l=e(E,{children:"Text style"}),v[2]=l):l=v[2],v[3]!==D?(i=e(y,{checked:D,onCheckedChange:C,children:"Bold"}),v[3]=D,v[4]=i):i=v[4],v[5]!==R?(a=e(y,{checked:R,onCheckedChange:N,children:"Italic"}),v[5]=R,v[6]=a):a=v[6],v[7]===Symbol.for("react.memo_cache_sentinel")?(d=e(k,{}),h=e(E,{children:"View mode"}),v[7]=d,v[8]=h):(d=v[7],h=v[8]),v[9]===Symbol.for("react.memo_cache_sentinel")?(s=e($,{value:"list",children:"List"}),u=e($,{value:"grid",children:"Grid"}),v[9]=s,v[10]=u):(s=v[9],u=v[10]),v[11]!==I?(f=r(M,{value:I,onValueChange:T,children:[s,u]}),v[11]=I,v[12]=f):f=v[12],v[13]===Symbol.for("react.memo_cache_sentinel")?(S=e(k,{}),w=e(g,{variant:"destructive",children:"Reset to defaults"}),v[13]=S,v[14]=w):(S=v[13],w=v[14]),v[15]!==i||v[16]!==a||v[17]!==f?(b=r(p,{"data-testid":"dropdown-menu",children:[t,r(_,{children:[l,i,a,d,h,f,S,w]})]}),v[15]=i,v[16]=a,v[17]=f,v[18]=b):b=v[18],b},meta:O}];function x({entry:e}){let{story:r,meta:n}=e,t={...n.args,...r.args},l="function"==typeof r||r.$$typeof?r:r.render||n.render||n.component,c=()=>o.default.createElement(l,t),i={args:t,globals:{theme:"light"},parameters:{...n.parameters,...r.parameters},viewMode:"story"};for(let e of[...n.decorators||[],...r.decorators||[]].reverse()){let r=c;c=()=>e(r,i)}return o.default.createElement("section",{"data-preview-story":e.name,className:"p-16"},o.default.createElement("h2",{className:"text-sm mb-12"},e.name),o.default.createElement(c))}window.WallarmPreview={mount(e){let r=window.ReactDOM.createRoot(e);return r.render(o.default.createElement(window.WallarmDS.Root,null,T.map((e,r)=>o.default.createElement(x,{key:r,entry:e})))),r}}})();
12
+ */var c,o,i=Object.create,a=Object.defineProperty,d=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,s=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,u=(e,r,n,t)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let l of h(r))m.call(e,l)||l===n||a(e,l,{get:()=>r[l],enumerable:!(t=d(r,l))||t.enumerable});return e},f={},p={$dispatcherGuard:()=>$,$makeReadOnly:()=>N,$reset:()=>k,$structuralCheck:()=>T,c:()=>D,clearRenderCounterRegistry:()=>I,renderCounterRegistry:()=>W,useRenderCounter:()=>A};for(var y in p)a(f,y,{get:p[y],enumerable:!0});e.exports=u(a({},"__esModule",{value:!0}),f);var _=(l=null!=(t=n("C"))?i(s(t)):{},u(t&&t.__esModule?l:a(l,"default",{value:t,enumerable:!0}),t)),{useRef:S,useEffect:w,isValidElement:b}=_,g=null!=(c=_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)?c:_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for("react.memo_cache_sentinel"),D="function"==typeof(null==(o=_.__COMPILER_RUNTIME)?void 0:o.c)?_.__COMPILER_RUNTIME.c:function(e){return _.useMemo(()=>{let r=Array(e);for(let n=0;n<e;n++)r[n]=v;return r[v]=!0,r},[])},C={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(e=>{C[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var R=null;function E(e){return g.ReactCurrentDispatcher.current=e,g.ReactCurrentDispatcher.current}C.useMemoCache=e=>{if(null!=R)return R.useMemoCache(e);throw Error("React Compiler internal invariant violation: unexpected null dispatcher")};var M=[];function $(e){let r=g.ReactCurrentDispatcher.current;if(0===e){if(M.push(r),1===M.length&&(R=r),r===C)throw Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");E(C)}else if(1===e){let e=M.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");0===M.length&&(R=null),E(e)}else if(2===e)M.push(r),E(R);else if(3===e){let e=M.pop();if(null==e)throw Error("React Compiler internal error: unexpected null in guard stack");E(e)}else throw Error("React Compiler internal error: unreachable block"+e)}function k(e){for(let r=0;r<e.length;r++)e[r]=v}function N(){throw Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var W=new Map;function I(){for(let e of W.values())e.forEach(e=>{e.count=0})}function A(e){let r=S(null);null!=r.current&&(r.current.count+=1),w(()=>{if(null==r.current){let n,t={count:0};null==(n=W.get(e))&&(n=new Set,W.set(e,n)),n.add(t),r.current=t}return()=>{var n;let t;null!==r.current&&(n=r.current,null!=(t=W.get(e))&&t.delete(n))}})}var O=new Set;function T(e,r,n,t,l,c){function o(e,r,o,i){let a=`${t}:${c} [${l}] ${n}${o} changed from ${e} to ${r} at depth ${i}`;O.has(a)||(O.add(a),console.error(a))}!function e(r,n,t,l){if(!(l>2)){if(r!==n)if(typeof r!=typeof n)o(`type ${typeof r}`,`type ${typeof n}`,t,l);else if("object"==typeof r){let c=Array.isArray(r),i=Array.isArray(n);if(null===r&&null!==n)o("null",`type ${typeof n}`,t,l);else if(null===n)o(`type ${typeof r}`,"null",t,l);else if(r instanceof Map)if(n instanceof Map)if(r.size!==n.size)o(`Map instance with size ${r.size}`,`Map instance with size ${n.size}`,t,l);else for(let[c,i]of r)n.has(c)?e(i,n.get(c),`${t}.get(${c})`,l+1):o(`Map instance with key ${c}`,`Map instance without key ${c}`,t,l);else o("Map instance","other value",t,l);else if(n instanceof Map)o("other value","Map instance",t,l);else if(r instanceof Set)if(n instanceof Set)if(r.size!==n.size)o(`Set instance with size ${r.size}`,`Set instance with size ${n.size}`,t,l);else for(let e of n)r.has(e)||o(`Set instance without element ${e}`,`Set instance with element ${e}`,t,l);else o("Set instance","other value",t,l);else if(n instanceof Set)o("other value","Set instance",t,l);else if(c||i)if(c!==i)o(`type ${c?"array":"object"}`,`type ${i?"array":"object"}`,t,l);else if(r.length!==n.length)o(`array with length ${r.length}`,`array with length ${n.length}`,t,l);else for(let c=0;c<r.length;c++)e(r[c],n[c],`${t}[${c}]`,l+1);else if(b(r)||b(n))b(r)!==b(n)?o(`type ${b(r)?"React element":"object"}`,`type ${b(n)?"React element":"object"}`,t,l):r.type!==n.type?o(`React element of type ${r.type}`,`React element of type ${n.type}`,t,l):e(r.props,n.props,`[props of ${t}]`,l+1);else{for(let e in n)e in r||o(`object without key ${e}`,`object with key ${e}`,t,l);for(let c in r)c in n?e(r[c],n[c],`${t}.${c}`,l+1):o(`object with key ${c}`,`object without key ${c}`,t,l)}}else{if("function"==typeof r)return;isNaN(r)||isNaN(n)?isNaN(r)!==isNaN(n)&&o(`${isNaN(r)?"NaN":"non-NaN value"}`,`${isNaN(n)?"NaN":"non-NaN value"}`,t,l):r!==n&&o(r,n,t,l)}}}(e,r,"",0)}},p(e,r,n){let t=new WeakMap,l=new WeakMap;function c(e,r,n){let c=r,o=n;if("object"==typeof c&&null!==c&&"$$typeof"in c&&c.$$typeof===Symbol.for("react.context")&&"Provider"in c&&(c=c.Provider),"function"==typeof c&&null!=o.ref&&!c.prototype?.isReactComponent){let r=c,n=t.get(e);n||(n=new WeakMap,t.set(e,n));let l=n.get(r);l||((l=e.forwardRef((e,n)=>r({...e,ref:n}))).displayName=r.displayName??r.name,n.set(r,l)),c=l}if("string"==typeof c&&"boolean"==typeof o.inert&&((o={...o}).inert?o.inert="":delete o.inert),"string"==typeof c)for(let[e,r]of[["fill-rule","fillRule"],["clip-rule","clipRule"]])e in o&&(o={...o,[r]:o[e]},delete o[e]);return"string"==typeof c&&null!=o.ref&&(c=function(e,r){let n=l.get(e);n||(n=new Map,l.set(e,n));let t=n.get(r);if(t)return t;let c=e.forwardRef((n,t)=>{let l=e.useRef(null);if(!l.current||l.current.original!==t){let e;l.current={original:t,callback:r=>{if(null==r&&e){let r=e;e=void 0,r();return}if("function"==typeof t){let n=t(r);e="function"==typeof n?n:void 0}else t&&(t.current=r)}}}return e.createElement(r,{...n,ref:l.current.callback})});return c.displayName=`CanvasHost(${r})`,n.set(r,c),c}(e,c)),{type:c,props:o}}function o(e){let r=(r,n,t)=>{let l=c(e,r,n??{});return e.createElement(l.type,void 0===t?l.props:{...l.props,key:t})};return{jsx:r,jsxs:(r,n,t)=>{let l=c(e,r,n??{}),{children:o,...i}=l.props;return e.createElement(l.type,void 0===t?i:{...i,key:t},...Array.isArray(o)?o:[o])},jsxDEV:r,Fragment:e.Fragment}}function i(e){return{...e,createElement:(r,n,...t)=>{let l=c(e,r,n??{});return e.createElement(l.type,l.props,...t)},cloneElement:(r,n,...t)=>{let l=e.cloneElement(r,n??void 0,...t),o=l.ref,i=c(e,l.type,{...l.props,ref:o});return i.type===l.type&&"string"!=typeof l.type?l:e.createElement(i.type,{...i.props,key:l.key})}}}n.d(r,{MA:()=>o,YJ:()=>i})},C(e,r,n){n.r(r);let t=(0,n("p").YJ)(window.React),{Children:l,Component:c,Fragment:o,Profiler:i,PureComponent:a,StrictMode:d,Suspense:h,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:s,act:m,cloneElement:u,createContext:f,createElement:p,createFactory:y,createRef:_,forwardRef:S,isValidElement:w,lazy:b,memo:g,startTransition:v,unstable_act:D,useCallback:C,useContext:R,useDebugValue:E,useDeferredValue:M,useEffect:$,useId:k,useImperativeHandle:N,useInsertionEffect:W,useLayoutEffect:I,useMemo:A,useReducer:O,useRef:T,useState:x,useSyncExternalStore:P,useTransition:j,version:L,use:z}=t;n.d(r,{},{Children:l,Component:c,Fragment:o,Profiler:i,PureComponent:a,StrictMode:d,Suspense:h,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:s,act:m,cloneElement:u,createContext:f,createElement:p,createFactory:y,createRef:_,default:t,forwardRef:S,isValidElement:w,lazy:b,memo:g,startTransition:v,unstable_act:D,use:z,useCallback:C,useContext:R,useDebugValue:E,useDeferredValue:M,useEffect:$,useId:k,useImperativeHandle:N,useInsertionEffect:W,useLayoutEffect:I,useMemo:A,useReducer:O,useRef:T,useState:x,useSyncExternalStore:P,useTransition:j,version:L})}},r={};function n(t){var l=r[t];if(void 0!==l)return l.exports;var c=r[t]={exports:{}};return e[t](c,c.exports,n),c.exports}n.d=(e,r,t)=>{var l=(r,t)=>{for(var l in r)n.o(r,l)&&!n.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,[t]:r[l]})};l(r,"get"),l(t,"value")},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),n.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let{jsx:e,jsxs:r,jsxDEV:t,Fragment:l}=(0,n("p").MA)(window.React);var c=n("vD"),o=n("C");let i=window.WallarmDS.Icons.CirclePlus,a=window.WallarmDS.Icons.Earth,d=window.WallarmDS.Icons.LayoutTemplate,h=window.WallarmDS.Icons.Maximize,s=window.WallarmDS.Icons.Plus,m=window.WallarmDS.Icons.UserPlus,u=window.WallarmDS.AgentGlyph,f=window.WallarmDS.defaultLook,p=window.WallarmDS.Button,y=window.WallarmDS.Kbd,_=window.WallarmDS.KbdGroup,S=window.WallarmDS.DropdownMenu,w=window.WallarmDS.DropdownMenuCheckboxItem,b=window.WallarmDS.DropdownMenuContent,g=window.WallarmDS.DropdownMenuContextTrigger,v=window.WallarmDS.DropdownMenuFooter,D=window.WallarmDS.DropdownMenuGroup,C=window.WallarmDS.DropdownMenuItem,R=window.WallarmDS.DropdownMenuItemContent,E=window.WallarmDS.DropdownMenuItemDescription,M=window.WallarmDS.DropdownMenuItemIcon,$=window.WallarmDS.DropdownMenuItemText,k=window.WallarmDS.DropdownMenuLabel,N=window.WallarmDS.DropdownMenuRadioGroup,W=window.WallarmDS.DropdownMenuRadioItem,I=window.WallarmDS.DropdownMenuSeparator,A=window.WallarmDS.DropdownMenuShortcut,O=window.WallarmDS.DropdownMenuTrigger,T=window.WallarmDS.DropdownMenuTriggerItem,x={title:"Actions/DropdownMenu",component:S,subcomponents:{DropdownMenuContent:b,DropdownMenuGroup:D,DropdownMenuItem:C,DropdownMenuItemContent:R,DropdownMenuItemDescription:E,DropdownMenuItemIcon:M,DropdownMenuItemText:$,DropdownMenuLabel:k,DropdownMenuSeparator:I,DropdownMenuShortcut:A,DropdownMenuTrigger:O,DropdownMenuTriggerItem:T,DropdownMenuContextTrigger:g,DropdownMenuFooter:v,DropdownMenuCheckboxItem:w,DropdownMenuRadioGroup:N,DropdownMenuRadioItem:W},parameters:{layout:"centered",docs:{description:{component:"A menu of actions hanging off a trigger — reach for `Select` when the reader is choosing a value for a form, since a menu runs commands rather than holding an answer. Leave the primary action visible as a `Button` and put only the secondary ones in here; past roughly ten items, group them or move them somewhere with room."}}}},P=[{name:"Basic",story:()=>{let n,t,l,o,i,a,d,h,s,m,u,f,w,g,v,R,E,M=(0,c.c)(17);return M[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(O,{asChild:!0,children:e(p,{variant:"outline",color:"neutral",children:"Open"})}),M[0]=n):n=M[0],M[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(k,{children:"My Account"}),M[1]=t):t=M[1],M[2]===Symbol.for("react.memo_cache_sentinel")?(l=r(C,{children:["Profile",e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"P"})]})})]}),M[2]=l):l=M[2],M[3]===Symbol.for("react.memo_cache_sentinel")?(o=r(C,{children:["Billing",e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"B"})]})})]}),M[3]=o):o=M[3],M[4]===Symbol.for("react.memo_cache_sentinel")?(i=r(C,{children:["Settings",e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"S"})]})})]}),M[4]=i):i=M[4],M[5]===Symbol.for("react.memo_cache_sentinel")?(a=r(D,{children:[l,o,i,r(C,{children:["Keyboard shortcuts super",e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"K"})]})})]})]}),d=e(I,{}),M[5]=a,M[6]=d):(a=M[5],d=M[6]),M[7]===Symbol.for("react.memo_cache_sentinel")?(h=e(C,{children:"Team"}),M[7]=h):h=M[7],M[8]===Symbol.for("react.memo_cache_sentinel")?(s=e(T,{children:"Invite users"}),M[8]=s):s=M[8],M[9]===Symbol.for("react.memo_cache_sentinel")?(m=r(S,{children:[s,r(b,{children:[e(C,{children:"Email"}),e(C,{children:"Message"}),e(I,{}),e(C,{children:"More..."})]})]}),M[9]=m):m=M[9],M[10]===Symbol.for("react.memo_cache_sentinel")?(u=r(D,{children:[h,m,r(C,{children:["New Team",e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"T"})]})})]})]}),f=e(I,{}),w=e(C,{children:"GitHub"}),g=e(C,{children:"Support"}),v=e(C,{disabled:!0,children:"API"}),R=e(I,{}),M[10]=u,M[11]=f,M[12]=w,M[13]=g,M[14]=v,M[15]=R):(u=M[10],f=M[11],w=M[12],g=M[13],v=M[14],R=M[15]),M[16]===Symbol.for("react.memo_cache_sentinel")?(E=r(S,{"data-testid":"dropdown-menu",children:[n,r(b,{children:[t,a,d,u,f,w,g,v,R,r(C,{variant:"destructive",children:["Log out",e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"Q"})]})})]})]})]}),M[16]=E):E=M[16],E},meta:x},{name:"Context",story:()=>{let n,t,l,o,i,a,d,h,s,m,u,f,p,w,v,R,E,M=(0,c.c)(17);return M[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(g,{asChild:!0,children:e("div",{className:"flex items-center justify-center w-300 h-192 border border-border-primary border-dashed rounded-8",children:"Right click here"})}),M[0]=n):n=M[0],M[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(k,{children:"My Account"}),M[1]=t):t=M[1],M[2]===Symbol.for("react.memo_cache_sentinel")?(l=r(C,{children:["Profile",e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"P"})]})})]}),M[2]=l):l=M[2],M[3]===Symbol.for("react.memo_cache_sentinel")?(o=r(C,{children:["Billing",e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"B"})]})})]}),M[3]=o):o=M[3],M[4]===Symbol.for("react.memo_cache_sentinel")?(i=r(C,{children:["Settings",e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"S"})]})})]}),M[4]=i):i=M[4],M[5]===Symbol.for("react.memo_cache_sentinel")?(a=r(D,{children:[l,o,i,r(C,{children:["Keyboard shortcuts super",e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"K"})]})})]})]}),d=e(I,{}),M[5]=a,M[6]=d):(a=M[5],d=M[6]),M[7]===Symbol.for("react.memo_cache_sentinel")?(h=e(C,{children:"Team"}),M[7]=h):h=M[7],M[8]===Symbol.for("react.memo_cache_sentinel")?(s=e(T,{children:"Invite users"}),M[8]=s):s=M[8],M[9]===Symbol.for("react.memo_cache_sentinel")?(m=r(S,{children:[s,r(b,{children:[e(C,{children:"Email"}),e(C,{children:"Message"}),e(I,{}),e(C,{children:"More..."})]})]}),M[9]=m):m=M[9],M[10]===Symbol.for("react.memo_cache_sentinel")?(u=r(D,{children:[h,m,r(C,{children:["New Team",e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"T"})]})})]})]}),f=e(I,{}),p=e(C,{children:"GitHub"}),w=e(C,{children:"Support"}),v=e(C,{disabled:!0,children:"API"}),R=e(I,{}),M[10]=u,M[11]=f,M[12]=p,M[13]=w,M[14]=v,M[15]=R):(u=M[10],f=M[11],p=M[12],w=M[13],v=M[14],R=M[15]),M[16]===Symbol.for("react.memo_cache_sentinel")?(E=r(S,{children:[n,r(b,{children:[t,a,d,u,f,p,w,v,R,r(C,{variant:"destructive",children:["Log out",e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"Q"})]})})]})]})]}),M[16]=E):E=M[16],E},meta:x},{name:"WithDescriptions",story:()=>{let n,t,l,o,a,d,h,m=(0,c.c)(7);return m[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(O,{asChild:!0,children:r(p,{variant:"outline",color:"neutral",children:[e(s,{}),"Add Widget"]})}),m[0]=n):n=m[0],m[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(C,{children:r(R,{children:[e($,{children:"Bar-volume chart"}),e(E,{children:"Description"})]})}),m[1]=t):t=m[1],m[2]===Symbol.for("react.memo_cache_sentinel")?(l=e(C,{children:r(R,{children:[e($,{children:"Canvas"}),e(E,{children:"Description"})]})}),m[2]=l):l=m[2],m[3]===Symbol.for("react.memo_cache_sentinel")?(o=r(R,{children:[e($,{children:"Attacks heat-map"}),e(E,{children:"Description"})]}),m[3]=o):o=m[3],m[4]===Symbol.for("react.memo_cache_sentinel")?(a=r(C,{children:[o,e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"Q"})]})})]}),d=e(I,{}),m[4]=a,m[5]=d):(a=m[4],d=m[5]),m[6]===Symbol.for("react.memo_cache_sentinel")?(h=r(S,{children:[n,r(b,{children:[t,l,a,d,r(C,{variant:"brand",children:[e(i,{}),e($,{children:"Request custom widget"})]})]})]}),m[6]=h):h=m[6],h},meta:x},{name:"WithIcons",story:()=>{let n,t,l,o,m,u,f,w,g,v,D=(0,c.c)(10);return D[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(O,{asChild:!0,children:r(p,{variant:"outline",color:"neutral",children:[e(s,{}),"Add Widget"]})}),D[0]=n):n=D[0],D[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(M,{children:e(d,{})}),D[1]=t):t=D[1],D[2]===Symbol.for("react.memo_cache_sentinel")?(l=r(C,{children:[t,e(R,{children:e($,{children:"Bar-volume chart"})})]}),D[2]=l):l=D[2],D[3]===Symbol.for("react.memo_cache_sentinel")?(o=e(M,{children:e(h,{})}),D[3]=o):o=D[3],D[4]===Symbol.for("react.memo_cache_sentinel")?(m=r(C,{children:[o,e(R,{children:e($,{children:"Canvas"})})]}),D[4]=m):m=D[4],D[5]===Symbol.for("react.memo_cache_sentinel")?(u=e(M,{children:e(a,{})}),f=e($,{children:"Attacks heat-map"}),D[5]=u,D[6]=f):(u=D[5],f=D[6]),D[7]===Symbol.for("react.memo_cache_sentinel")?(w=r(C,{children:[u,f,e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"Q"})]})})]}),g=e(I,{}),D[7]=w,D[8]=g):(w=D[7],g=D[8]),D[9]===Symbol.for("react.memo_cache_sentinel")?(v=r(S,{children:[n,r(b,{children:[l,m,w,g,r(C,{variant:"brand",children:[e(i,{}),e($,{children:"Request custom widget"})]})]})]}),D[9]=v):v=D[9],v},meta:x},{name:"WithAgents",story:()=>{let n,t,l,o,i,a,d,h,s=(0,c.c)(8);return s[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(O,{asChild:!0,children:r(p,{variant:"outline",color:"neutral",children:[e(m,{}),"Assign to"]})}),s[0]=n):n=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(M,{children:e(u,{agent:"radar",size:16})}),s[1]=t):t=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(l=r(C,{children:[t,r(R,{children:[e($,{children:"Radar"}),e(E,{children:"Attack Anomaly Investigator"})]})]}),s[2]=l):l=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(o=e(M,{children:e(u,{agent:"sift",size:16})}),s[3]=o):o=s[3],s[4]===Symbol.for("react.memo_cache_sentinel")?(i=r(C,{children:[o,r(R,{children:[e($,{children:"Sift"}),e(E,{children:"False Positives Analyzer"})]})]}),s[4]=i):i=s[4],s[5]===Symbol.for("react.memo_cache_sentinel")?(a=r(C,{children:[e(M,{children:e(u,{agent:"lens",size:16})}),e($,{children:"Lens"})]}),s[5]=a):a=s[5],s[6]===Symbol.for("react.memo_cache_sentinel")?(d=r(C,{children:[e(M,{children:e(u,{agent:"bard",size:16})}),e($,{children:"Bard"})]}),s[6]=d):d=s[6],s[7]===Symbol.for("react.memo_cache_sentinel")?(h=r(S,{"data-testid":"dropdown-menu",children:[n,r(b,{children:[l,i,a,d,r(C,{children:[e(M,{children:e(u,{look:f("agent-7f3a"),size:16})}),e($,{children:"Night watch"})]})]})]}),s[7]=h):h=s[7],h},meta:x},{name:"WithFooter",story:()=>{let n,t,l,o,i,a,d,h,s,m,u,f,w,g,D,R=(0,c.c)(15);return R[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(O,{asChild:!0,children:e(p,{variant:"outline",color:"neutral",children:"Open"})}),R[0]=n):n=R[0],R[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(C,{children:"Profile"}),a=e(C,{children:"Billing"}),d=e(C,{children:"Settings"}),h=e(C,{children:"Notifications"}),s=e(C,{children:"Integrations"}),m=e(C,{children:"Security"}),u=e(C,{children:"API Keys"}),f=e(C,{children:"Webhooks"}),w=e(C,{children:"Audit Log"}),l=e(C,{children:"Team Members"}),o=e(C,{children:"Permissions"}),i=e(C,{children:"Usage"}),R[1]=t,R[2]=l,R[3]=o,R[4]=i,R[5]=a,R[6]=d,R[7]=h,R[8]=s,R[9]=m,R[10]=u,R[11]=f,R[12]=w):(t=R[1],l=R[2],o=R[3],i=R[4],a=R[5],d=R[6],h=R[7],s=R[8],m=R[9],u=R[10],f=R[11],w=R[12]),R[13]===Symbol.for("react.memo_cache_sentinel")?(g=r("span",{className:"flex items-center gap-4",children:[r(_,{children:[e(y,{children:"↑"}),e(y,{children:"↓"})]}),"to navigate"]}),R[13]=g):g=R[13],R[14]===Symbol.for("react.memo_cache_sentinel")?(D=r(S,{children:[n,r(b,{children:[t,a,d,h,s,m,u,f,w,l,o,i,r(v,{children:[g,r("span",{className:"flex items-center gap-4",children:[e(_,{children:e(y,{children:"↵"})}),"to select"]})]})]})]}),R[14]=D):D=R[14],D},meta:x},{name:"WithDescriptionAndIcons",story:()=>{let n,t,l,o,m,u,f,w,g,v,D=(0,c.c)(10);return D[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(O,{asChild:!0,children:r(p,{variant:"outline",color:"neutral",children:[e(s,{}),"Add Widget"]})}),D[0]=n):n=D[0],D[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(M,{children:e(d,{})}),D[1]=t):t=D[1],D[2]===Symbol.for("react.memo_cache_sentinel")?(l=r(C,{children:[t,r(R,{children:[e($,{children:"Bar-volume chart"}),e(E,{children:"Description"})]})]}),D[2]=l):l=D[2],D[3]===Symbol.for("react.memo_cache_sentinel")?(o=e(M,{children:e(h,{})}),D[3]=o):o=D[3],D[4]===Symbol.for("react.memo_cache_sentinel")?(m=r(C,{children:[o,r(R,{children:[e($,{children:"Canvas"}),e(E,{children:"Description"})]})]}),D[4]=m):m=D[4],D[5]===Symbol.for("react.memo_cache_sentinel")?(u=e(M,{children:e(a,{})}),D[5]=u):u=D[5],D[6]===Symbol.for("react.memo_cache_sentinel")?(f=r(R,{children:[e($,{children:"Attacks heat-map"}),e(E,{children:"Description"})]}),D[6]=f):f=D[6],D[7]===Symbol.for("react.memo_cache_sentinel")?(w=r(C,{children:[u,f,e(A,{children:r(_,{children:[e(y,{children:"⌘"}),e(y,{children:"Q"})]})})]}),g=e(I,{}),D[7]=w,D[8]=g):(w=D[7],g=D[8]),D[9]===Symbol.for("react.memo_cache_sentinel")?(v=r(S,{children:[n,r(b,{children:[l,m,w,g,r(C,{variant:"brand",children:[e(i,{}),e($,{children:"Request custom widget"})]})]})]}),D[9]=v):v=D[9],v},meta:x},{name:"WithCheckboxItems",story:()=>{let n,t,l,i,a,d,h,s=(0,c.c)(13),[m,u]=(0,o.useState)(!0),[f,y]=(0,o.useState)(!1),[_,g]=(0,o.useState)(!0);return s[0]===Symbol.for("react.memo_cache_sentinel")?(n=e(O,{asChild:!0,children:e(p,{variant:"outline",color:"neutral",children:"Text style"})}),s[0]=n):n=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(k,{children:"Text style"}),s[1]=t):t=s[1],s[2]!==m?(l=e(w,{checked:m,onCheckedChange:u,children:"Bold"}),s[2]=m,s[3]=l):l=s[3],s[4]!==f?(i=e(w,{checked:f,onCheckedChange:y,children:"Italic"}),s[4]=f,s[5]=i):i=s[5],s[6]!==_?(a=e(w,{checked:_,onCheckedChange:g,children:"Underline"}),s[6]=_,s[7]=a):a=s[7],s[8]===Symbol.for("react.memo_cache_sentinel")?(d=e(w,{checked:!1,disabled:!0,children:"Strikethrough"}),s[8]=d):d=s[8],s[9]!==l||s[10]!==i||s[11]!==a?(h=r(S,{"data-testid":"dropdown-menu",children:[n,r(b,{children:[t,l,i,a,d]})]}),s[9]=l,s[10]=i,s[11]=a,s[12]=h):h=s[12],h},meta:x},{name:"WithRadioGroup",story:()=>{let n,t,l,i,a,d,h,s=(0,c.c)(8),[m,u]=(0,o.useState)("list");s[0]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{u(e.value)},s[0]=n):n=s[0];let f=n;return s[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(O,{asChild:!0,children:e(p,{variant:"outline",color:"neutral",children:"View mode"})}),s[1]=t):t=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(l=e(k,{children:"View mode"}),s[2]=l):l=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(i=e(W,{value:"list",children:"List"}),a=e(W,{value:"grid",children:"Grid"}),d=e(W,{value:"compact",disabled:!0,children:"Compact"}),s[3]=i,s[4]=a,s[5]=d):(i=s[3],a=s[4],d=s[5]),s[6]!==m?(h=r(S,{"data-testid":"dropdown-menu",children:[t,r(b,{children:[l,r(N,{value:m,onValueChange:f,children:[i,a,d]})]})]}),s[6]=m,s[7]=h):h=s[7],h},meta:x},{name:"WithMixedSelectionItems",story:()=>{let n,t,l,i,a,d,h,s,m,u,f,y,_,g=(0,c.c)(19),[v,D]=(0,o.useState)(!0),[R,E]=(0,o.useState)(!1),[M,$]=(0,o.useState)("list");g[0]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{$(e.value)},g[0]=n):n=g[0];let A=n;return g[1]===Symbol.for("react.memo_cache_sentinel")?(t=e(O,{asChild:!0,children:e(p,{variant:"outline",color:"neutral",children:"Editor settings"})}),g[1]=t):t=g[1],g[2]===Symbol.for("react.memo_cache_sentinel")?(l=e(k,{children:"Text style"}),g[2]=l):l=g[2],g[3]!==v?(i=e(w,{checked:v,onCheckedChange:D,children:"Bold"}),g[3]=v,g[4]=i):i=g[4],g[5]!==R?(a=e(w,{checked:R,onCheckedChange:E,children:"Italic"}),g[5]=R,g[6]=a):a=g[6],g[7]===Symbol.for("react.memo_cache_sentinel")?(d=e(I,{}),h=e(k,{children:"View mode"}),g[7]=d,g[8]=h):(d=g[7],h=g[8]),g[9]===Symbol.for("react.memo_cache_sentinel")?(s=e(W,{value:"list",children:"List"}),m=e(W,{value:"grid",children:"Grid"}),g[9]=s,g[10]=m):(s=g[9],m=g[10]),g[11]!==M?(u=r(N,{value:M,onValueChange:A,children:[s,m]}),g[11]=M,g[12]=u):u=g[12],g[13]===Symbol.for("react.memo_cache_sentinel")?(f=e(I,{}),y=e(C,{variant:"destructive",children:"Reset to defaults"}),g[13]=f,g[14]=y):(f=g[13],y=g[14]),g[15]!==i||g[16]!==a||g[17]!==u?(_=r(S,{"data-testid":"dropdown-menu",children:[t,r(b,{children:[l,i,a,d,h,u,f,y]})]}),g[15]=i,g[16]=a,g[17]=u,g[18]=_):_=g[18],_},meta:x}];function j({entry:e}){let{story:r,meta:n}=e,t={...n.args,...r.args},l="function"==typeof r||r.$$typeof?r:r.render||n.render||n.component,c=()=>o.default.createElement(l,t),i={args:t,globals:{theme:"light"},parameters:{...n.parameters,...r.parameters},viewMode:"story"};for(let e of[...n.decorators||[],...r.decorators||[]].reverse()){let r=c;c=()=>e(r,i)}return o.default.createElement("section",{"data-preview-story":e.name,className:"p-16"},o.default.createElement("h2",{className:"text-sm mb-12"},e.name),o.default.createElement(c))}window.WallarmPreview={mount(e){let r=window.ReactDOM.createRoot(e);return r.render(o.default.createElement(window.WallarmDS.Root,null,P.map((e,r)=>o.default.createElement(j,{key:r,entry:e})))),r}}})();