@deephaven/code-studio 0.55.1-beta.11 → 0.55.1-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -25
- package/build/assets/{AppRoot-0afa1fe7.js → AppRoot-249cf3ce.js} +3 -3
- package/build/assets/{AppRoot-0afa1fe7.js.map → AppRoot-249cf3ce.js.map} +1 -1
- package/build/assets/{ControlType-4e2be592.js → ControlType-142eb38f.js} +2 -2
- package/build/assets/{ControlType-4e2be592.js.map → ControlType-142eb38f.js.map} +1 -1
- package/build/assets/{FontBootstrap-8d7be759.js → FontBootstrap-5fe388c8.js} +2 -2
- package/build/assets/{FontBootstrap-8d7be759.js.map → FontBootstrap-5fe388c8.js.map} +1 -1
- package/build/assets/{IrisGrid-29740e88.js → IrisGrid-e9bc393c.js} +2 -2
- package/build/assets/{IrisGrid-29740e88.js.map → IrisGrid-e9bc393c.js.map} +1 -1
- package/build/assets/{IrisGridModelFactory-c5179496.js → IrisGridModelFactory-097e9eb6.js} +2 -2
- package/build/assets/{IrisGridModelFactory-c5179496.js.map → IrisGridModelFactory-097e9eb6.js.map} +1 -1
- package/build/assets/{StyleGuideRoot-63ae8d86.js → StyleGuideRoot-db757f61.js} +2 -2
- package/build/assets/{StyleGuideRoot-63ae8d86.js.map → StyleGuideRoot-db757f61.js.map} +1 -1
- package/build/assets/{index-dd02605f.js → index-30a1480c.js} +2 -2
- package/build/assets/{index-dd02605f.js.map → index-30a1480c.js.map} +1 -1
- package/build/assets/index-6f658227.js +3 -0
- package/build/assets/index-6f658227.js.map +1 -0
- package/build/assets/{index-4b952ff0.js → index-892437c6.js} +2 -2
- package/build/assets/{index-4b952ff0.js.map → index-892437c6.js.map} +1 -1
- package/build/assets/{usePlugins-568f5d4e.js → usePlugins-ba857f28.js} +3 -3
- package/build/assets/{usePlugins-568f5d4e.js.map → usePlugins-ba857f28.js.map} +1 -1
- package/build/assets/{useUser-5d3e9e0c.js → useUser-39b99212.js} +2 -2
- package/build/assets/{useUser-5d3e9e0c.js.map → useUser-39b99212.js.map} +1 -1
- package/build/index.html +2 -6
- package/package.json +31 -31
- package/build/assets/index-1841225d.js +0 -3
- package/build/assets/index-1841225d.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,F as J,C as e,H as ee,Q as to,aI as D,M as ce,G as k,_ as oe,L as _e,aJ as wo,aK as Ie,aL as Co,aM as F,aN as So,Z as R,a0 as Ne,aO as ke,a8 as j,aP as B,aQ as To,a3 as ao,a5 as no,a6 as No,aR as ko,ac as Eo,ab as se,aS as Io,aT as Do,aU as $o,ad as Mo,aV as Ao,aW as Ro,aX as V,aY as Lo,aZ as de,a_ as N,a$ as Po,b0 as _o,b1 as Fo,J as Bo,Y as Vo}from"./vendor-90228628.js";import{aS as Fe,aT as P,aU as De,aV as $e,aW as co,au as Oo,aX as O,aY as Be,E as Ve,aZ as Oe,G as Ee,a_ as Uo,a$ as Go,aR as te,K as Ho,b0 as Wo,b1 as zo}from"./index-4b952ff0.js";import{W as qo}from"./monaco-1410cbed.js";import{ad as ie,aa as ho,a7 as U,ae as io,B as Zo,g as Z,m as Yo,L as ue,af as W,ag as Xo,I as Ko,R as Qo,f as Y,C as Ue,O as Jo,a as er,S as or,c as K,b as Ge,P as He,h as rr,d as lr}from"./IrisGrid-29740e88.js";import{B as f,u as uo,e as H,a3 as E,K as I,w as ae,v as sr,l as We,ba as ze,m as tr,C as L,a6 as X,S as ge,_ as ar,x as nr,d as qe,g as ne,a8 as go,A as cr,M as hr,N as ir}from"./usePlugins-568f5d4e.js";import{M as Ze,H as dr,A as ur,V as me,T as gr,D as mr,C as vr,a as pr,b as xr,c as fr}from"./FontBootstrap-8d7be759.js";import{T as br}from"./useUser-5d3e9e0c.js";import{L as yr}from"./AppRoot-0afa1fe7.js";import{Q as jr,x as wr,s as Cr}from"./ControlType-4e2be592.js";import"./helpers-042e6b4d.js";import"./plotly-a2eb9a48.js";function Ye(l,o,r,s,t,n,a){try{var c=l[n](a),i=c.value}catch(d){r(d);return}c.done?o(i):Promise.resolve(i).then(s,t)}function ve(l){return function(){var o=this,r=arguments;return new Promise(function(s,t){var n=l.apply(o,r);function a(i){Ye(n,s,t,a,c,"next",i)}function c(i){Ye(n,s,t,a,c,"throw",i)}a(void 0)})}}function $(l,o,r){return o=Sr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Sr(l){var o=Tr(l,"string");return typeof o=="symbol"?o:String(o)}function Tr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class Nr extends ie{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:s=0,floatingBottomRowCount:t=0,floatingLeftColumnCount:n=0,floatingRightColumnCount:a=0,isEditable:c=!1,editedData:i=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),$(this,"numRows",void 0),$(this,"numColumns",void 0),$(this,"floatingTop",void 0),$(this,"floatingBottom",void 0),$(this,"floatingLeft",void 0),$(this,"floatingRight",void 0),$(this,"editable",void 0),$(this,"editedData",void 0),this.numRows=o,this.numColumns=r,this.floatingTop=s,this.floatingBottom=t,this.floatingLeft=n,this.floatingRight=a,this.editable=c,this.editedData=i}get rowCount(){return this.numRows}get columnCount(){return this.numColumns}get floatingTopRowCount(){return this.floatingTop}get floatingBottomRowCount(){return this.floatingBottom}get floatingLeftColumnCount(){return this.floatingLeft}get floatingRightColumnCount(){return this.floatingRight}get isEditable(){return this.editable}textForCell(o,r){var s,t;return(s=(t=this.editedData[o])===null||t===void 0?void 0:t[r])!==null&&s!==void 0?s:"".concat(o,",").concat(r)}colorForCell(o,r,s){return s.textColor}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}textForRowFooter(o){return"".concat(o)}setValueForCell(o,r,s){var t=this;return ve(function*(){t.editedData[o]==null&&(t.editedData[o]=[]),t.editedData[o][r]="".concat(s)})()}setValueForRanges(o,r){var s=this;return ve(function*(){ho.forEachCell(o,(t,n)=>{s.setValueForCell(t,n,r)})})()}setValues(o){var r=this;return ve(function*(){for(var s=0;s<o.length;s+=1){var t,n,a=o[s];r.setValueForCell((t=a.column)!==null&&t!==void 0?t:a.x,(n=a.row)!==null&&n!==void 0?n:a.y,a.text)}})()}editValueForCell(o,r){return this.textForCell(o,r)}isValidForCell(o,r,s){return!0}isEditableRange(o){return this.isEditable}delete(o){throw new Error("Method not implemented.")}}const Me=Nr;function w(l,o,r){return o=kr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function kr(l){var o=Er(l,"string");return typeof o=="symbol"?o:String(o)}function Er(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class T extends Me{constructor(){var{rowCount:o=T.DEFAULT_ROW_COUNT,columnCount:r=T.DEFAULT_COLUMN_COUNT,children:s=new Map,childRowCount:t=Math.ceil(Math.max(T.MIN_CHILD_ROW_COUNT,o*T.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:n=T.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:o,columnCount:r}),w(this,"children",void 0),w(this,"childRowCount",void 0),w(this,"maxDepth",void 0),w(this,"getCachedModelRowOffset",U((a,c)=>{for(var i=null,d=c,h=[...a].sort((b,M)=>b[0]-M[0]),g=0;g<h.length;g+=1){var[m,v]=h[g];if(d<=m)break;var x=v.rowCount;if(d<=m+x){i=m,d=d-m-1;break}d-=x}return{key:i,offsetRow:d}})),w(this,"getCachedTextForRowHeader",U((a,c)=>{var{key:i,offsetRow:d}=this.getCachedModelRowOffset(a,c);if(i!=null){var h=a.get(i);if(h!==void 0)return"".concat(i,".").concat(h.textForRowHeader(d))}return"".concat(d)})),w(this,"getCachedTextForCell",U((a,c,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(a,i);if(d!=null){var g=a.get(d);if(g!==void 0)return"".concat(d,".").concat(g.textForCell(c,h))}return"".concat(c,",").concat(h)})),w(this,"getCachedIsRowExpandable",U((a,c,i)=>{var d=this.getCachedDepthForRow(a,c);return d<i})),w(this,"getCachedIsRowExpanded",U((a,c)=>{var{key:i,offsetRow:d}=this.getCachedModelRowOffset(a,c);if(i!=null){var h=a.get(i);if(h!==void 0)return h.isRowExpanded(d)}return a.has(d)})),w(this,"getCachedDepthForRow",U((a,c)=>{var{key:i,offsetRow:d}=this.getCachedModelRowOffset(a,c);if(i!=null){var h=a.get(i);if(h!==void 0)return h.depthForRow(d)+1}return 0})),this.children=s,this.childRowCount=t,this.maxDepth=n}textForCell(o,r){return this.getCachedTextForCell(this.children,o,r)}textForRowHeader(o){return this.getCachedTextForRowHeader(this.children,o)}isRowMovable(o){return!1}get hasExpandableRows(){return!0}get isExpandAllAvailable(){return!1}get floatingBottomRowCount(){return 0}isRowExpandable(o){return this.getCachedIsRowExpandable(this.children,o,this.maxDepth)}isRowExpanded(o){return this.getCachedIsRowExpanded(this.children,o)}setRowExpanded(o,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:t,offsetRow:n}=this.getCachedModelRowOffset(this.children,o),a=new Map(this.children);if(t!=null){var c=this.children.get(t);if(c!==void 0){var{rowCount:i}=c;c.setRowExpanded(n,r,s),this.numRows+=c.rowCount-i}}else if(r){var h=new T({rowCount:this.childRowCount,columnCount:this.numColumns});a.set(n,h),this.numRows+=h.rowCount}else{var d=a.get(n);d!==void 0&&(this.numRows-=d.rowCount,a.delete(n))}this.children=a}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(o){return this.getCachedDepthForRow(this.children,o)}}w(T,"DEFAULT_ROW_COUNT",1e9);w(T,"DEFAULT_COLUMN_COUNT",100);w(T,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);w(T,"MIN_CHILD_ROW_COUNT",10);w(T,"MAX_DEPTH",10);const Ae=T;function pe(l,o,r){return o=Ir(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Ir(l){var o=Dr(l,"string");return typeof o=="symbol"?o:String(o)}function Dr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class $r extends ie{constructor(o,r){var s;super(),pe(this,"data",void 0),pe(this,"columnHeaders",void 0),pe(this,"numberOfColumns",void 0),this.data=o,this.numberOfColumns=Math.max(...o.map(t=>t.length),(s=r?.length)!==null&&s!==void 0?s:0),this.columnHeaders=r}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(o,r){var s;return"".concat((s=this.data[r])===null||s===void 0?void 0:s[o])}textForColumnHeader(o){var r,s;return(r=(s=this.columnHeaders)===null||s===void 0?void 0:s[o])!==null&&r!==void 0?r:""}}const Mr=$r;function xe(l,o,r){return o=Ar(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Ar(l){var o=Rr(l,"string");return typeof o=="symbol"?o:String(o)}function Rr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class Lr extends ie{constructor(o,r){super(),xe(this,"numberOfColumns",void 0),xe(this,"numberOfRows",void 0),xe(this,"viewportData",void 0),this.numberOfColumns=o,this.numberOfRows=r}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(o,r){var s,t,n,a,c,i,d,h=r-((s=(t=this.viewportData)===null||t===void 0?void 0:t.rowOffset)!==null&&s!==void 0?s:0),g=o-((n=(a=this.viewportData)===null||a===void 0?void 0:a.columnOffset)!==null&&n!==void 0?n:0);return"".concat((c=(i=this.viewportData)===null||i===void 0||(d=i.data[h])===null||d===void 0?void 0:d[g])!==null&&c!==void 0?c:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const Pr=Lr;function C(l,o,r){return o=_r(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function _r(l){var o=Fr(l,"string");return typeof o=="symbol"?o:String(o)}function Fr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}var Br="proportional",Vr=io.positiveBarColor,Or=io.negativeBarColor,Ur="beside",Gr="LTR",Hr="right";function Wr(l){return Array.isArray(l)&&l.every(o=>typeof o=="number")}class zr extends ie{constructor(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,i=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,d=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),C(this,"numberOfColumns",void 0),C(this,"numberOfRows",void 0),C(this,"data",void 0),C(this,"columnMins",void 0),C(this,"columnMaxs",void 0),C(this,"columnAxes",void 0),C(this,"valuePlacements",void 0),C(this,"directions",void 0),C(this,"positiveColors",void 0),C(this,"negativeColors",void 0),C(this,"opacities",void 0),C(this,"textAlignments",void 0),C(this,"markers",void 0),this.positiveColors=s,this.negativeColors=t,this.data=o,this.columnAxes=r,this.valuePlacements=n,this.opacities=a,this.directions=c,this.textAlignments=i,this.markers=d,this.numberOfRows=Math.max(...o.map(m=>m.length)),this.numberOfColumns=o.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var h=0;h<o.length;h+=1){var g=o[h];Wr(g)&&(this.columnMins.set(h,Math.min(...g)),this.columnMaxs.set(h,Math.max(...g)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(o,r){var s;return"".concat((s=this.data[o])===null||s===void 0?void 0:s[r])}textForColumnHeader(o){return"".concat(o)}textAlignForCell(o,r){var s;return(s=this.textAlignments.get(o))!==null&&s!==void 0?s:Hr}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var s,t,n,a,c,i,d,h=Fe(this.columnMins,o),g=Fe(this.columnMaxs,o),m=(s=this.columnAxes.get(o))!==null&&s!==void 0?s:Br,v=(t=this.valuePlacements.get(o))!==null&&t!==void 0?t:Ur,x=this.opacities.get(o);x==null||x>1?x=1:x<0&&(x=0);var b=(n=this.directions.get(o))!==null&&n!==void 0?n:Gr,M=(a=this.positiveColors.get(o))!==null&&a!==void 0?a:Vr,z=(c=this.negativeColors.get(o))!==null&&c!==void 0?c:Or,A=Number((i=this.data[o])===null||i===void 0?void 0:i[r]),_=A>=0?M:z,re=(d=this.markers.get(o))!==null&&d!==void 0?d:[];return{columnMin:h,columnMax:g,axis:m,color:_,valuePlacement:v,opacity:x,markers:re,direction:b,value:A}}}const qr=zr,fe="hide-from-e2e-tests",Xe="sample-section";function*mo(l=1){for(;;)l=l*16807%2147483647,yield l/2147483647}function Zr(l=1){const[o]=u.useState(()=>mo(l));return u.useCallback(()=>{const r=o.next();if(r.done===!0)throw new Error("Random number generator unexpectedly finished");return r.value},[o])}function p(l,o=[]){const r=`${Xe}-${l.toLocaleLowerCase().replaceAll(" ","-")}`,s=J(Xe,...o);return{id:r,className:s}}function S(l,o=[]){const{id:r,className:s}=p(l,o);return{id:r,UNSAFE_className:s}}class Re extends u.Component{static renderAlert(o){return e.jsxs("div",{className:J("alert",`alert-${o}`),children:[e.jsx("strong",{children:"Well done!"}),"You successfully read this ",o," alert message."]},o)}render(){const o=["success","info","warning","danger"].map(r=>Re.renderAlert(r));return e.jsxs("div",{...p("alerts"),children:[e.jsx("h2",{className:"ui-title",children:"Alerts"}),e.jsx("div",{style:{padding:"1rem 0"},children:o})]})}}class Q extends u.Component{static renderButtonBrand(o,r){const s=o.length?`btn-${o}-${r}`:`btn-${r}`;return e.jsx(Zo,{className:s,style:{marginBottom:"1rem",marginRight:"1rem"},children:r},r)}static renderButtons(o){const r=["primary","secondary","success","info","danger"].map(s=>Q.renderButtonBrand(o,s));return e.jsxs("div",{...p(`buttons-${o.length?"outline":"regular"}`),children:[e.jsx("h5",{children:o.length?"Outline":"Regular"}),r]},o)}static renderSocketedButtons(){return e.jsxs("div",{...p("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(Z,{style:{marginBottom:"1rem",marginRight:"1rem"},children:"Unlinked"}),e.jsx(Z,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,children:"Linked"}),e.jsx(Z,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,children:"Linked Source"}),e.jsx(Z,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,children:"Error"}),e.jsx(Z,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,children:"Disabled"})]})}constructor(o){super(o),this.state={toggle:!0}}renderInlineButtons(){const{toggle:o}=this.state;return e.jsxs("div",{...p("buttons-inline"),style:{padding:"1rem 0"},children:[e.jsx("h5",{children:"Inline Buttons"}),"Regular btn-inline:",e.jsx(f,{className:"mx-2",kind:"inline",icon:P,tooltip:"test"}),"Toggle button (class active):",e.jsx(f,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:P,tooltip:"test"}),"Disabled:",e.jsx(f,{className:"mx-2",kind:"inline",disabled:!0,children:"Disabled"}),"With Text:",e.jsx(f,{className:"mx-2",kind:"inline",icon:P,children:e.jsx("span",{children:"Text Button"})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{children:"btn-link-icon (no text):"}),e.jsx(f,{kind:"ghost",icon:P,tooltip:"test"}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(f,{kind:"ghost",children:"Text Button "}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(f,{kind:"ghost",icon:P,children:"Text Button"})]})}render(){const o=["","outline"].map(t=>Q.renderButtons(t)),r=this.renderInlineButtons(),s=Q.renderSocketedButtons();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[o,r,s]})]})}}function Yr(){const l=uo();Ze.random=Zr();const[o]=u.useState(()=>new Ze(l));return e.jsxs("div",{...p("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(Yo,{model:o})})]})}function Xr(){const l=[["100","900"],["200","800"],["300","700"],["400","600"],["500","500"],["600","500"],["700","400"],["800","300"],["850","200"],["8XX","100"],["900","75"]].map(([r,s])=>e.jsxs("div",{className:J("swatch","gray-swatch",`gray-swatch-${r}`),children:[e.jsxs("span",{children:["Gray-",r]}),e.jsxs("span",{style:{backgroundColor:`var(--dh-color-gray-${s})`},children:["--dh-gray-",s]})]},r)),o=["red","orange","yellow","green","blue","purple","white","black","content-bg","primary","primary-dark","background","foreground"].map(r=>e.jsx("div",{className:J("swatch",`swatch-${r}`),children:r},r));return e.jsxs("div",{...p("colors"),children:[e.jsx("h2",{className:"ui-title",children:"Colors"}),e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col",children:l}),e.jsx("div",{className:"col",children:o}),e.jsxs("div",{className:"col",children:[e.jsx("p",{children:"Gray Range is available for background/tab colors, and should cover the full range used in mockups. Always use the semantic color names in your .scss files when applicable for UI elements."}),e.jsx("p",{children:"For refrence key colors are $primary for interactable elements, content-bg as background. White is same as gray-200. Gray-100 is used when white needs an active color. content-bg is between 800 and 900."}),e.jsx("pre",{children:`
|
|
1
|
+
import{r as u,F as J,C as e,H as ee,Q as to,aI as D,M as ce,G as k,_ as oe,L as _e,aJ as wo,aK as Ie,aL as Co,aM as F,aN as So,Z as R,a0 as Ne,aO as ke,a8 as j,aP as B,aQ as To,a3 as ao,a5 as no,a6 as No,aR as ko,ac as Eo,ab as se,aS as Io,aT as Do,aU as $o,ad as Mo,aV as Ao,aW as Ro,aX as V,aY as Lo,aZ as de,a_ as N,a$ as Po,b0 as _o,b1 as Fo,J as Bo,Y as Vo}from"./vendor-90228628.js";import{aS as Fe,aT as P,aU as De,aV as $e,aW as co,au as Oo,aX as O,aY as Be,E as Ve,aZ as Oe,G as Ee,a_ as Uo,a$ as Go,aR as te,K as Ho,b0 as Wo,b1 as zo}from"./index-892437c6.js";import{W as qo}from"./monaco-1410cbed.js";import{ad as ie,aa as ho,a7 as U,ae as io,B as Zo,g as Z,m as Yo,L as ue,af as W,ag as Xo,I as Ko,R as Qo,f as Y,C as Ue,O as Jo,a as er,S as or,c as K,b as Ge,P as He,h as rr,d as lr}from"./IrisGrid-e9bc393c.js";import{B as f,u as uo,e as H,a3 as E,K as I,w as ae,v as sr,l as We,ba as ze,m as tr,C as L,a6 as X,S as ge,_ as ar,x as nr,d as qe,g as ne,a8 as go,A as cr,M as hr,N as ir}from"./usePlugins-ba857f28.js";import{M as Ze,H as dr,A as ur,V as me,T as gr,D as mr,C as vr,a as pr,b as xr,c as fr}from"./FontBootstrap-5fe388c8.js";import{T as br}from"./useUser-39b99212.js";import{L as yr}from"./AppRoot-249cf3ce.js";import{Q as jr,x as wr,s as Cr}from"./ControlType-142eb38f.js";import"./helpers-042e6b4d.js";import"./plotly-a2eb9a48.js";function Ye(l,o,r,s,t,n,a){try{var c=l[n](a),i=c.value}catch(d){r(d);return}c.done?o(i):Promise.resolve(i).then(s,t)}function ve(l){return function(){var o=this,r=arguments;return new Promise(function(s,t){var n=l.apply(o,r);function a(i){Ye(n,s,t,a,c,"next",i)}function c(i){Ye(n,s,t,a,c,"throw",i)}a(void 0)})}}function $(l,o,r){return o=Sr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Sr(l){var o=Tr(l,"string");return typeof o=="symbol"?o:String(o)}function Tr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class Nr extends ie{constructor(){var{rowCount:o=1e9,columnCount:r=100,floatingTopRowCount:s=0,floatingBottomRowCount:t=0,floatingLeftColumnCount:n=0,floatingRightColumnCount:a=0,isEditable:c=!1,editedData:i=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),$(this,"numRows",void 0),$(this,"numColumns",void 0),$(this,"floatingTop",void 0),$(this,"floatingBottom",void 0),$(this,"floatingLeft",void 0),$(this,"floatingRight",void 0),$(this,"editable",void 0),$(this,"editedData",void 0),this.numRows=o,this.numColumns=r,this.floatingTop=s,this.floatingBottom=t,this.floatingLeft=n,this.floatingRight=a,this.editable=c,this.editedData=i}get rowCount(){return this.numRows}get columnCount(){return this.numColumns}get floatingTopRowCount(){return this.floatingTop}get floatingBottomRowCount(){return this.floatingBottom}get floatingLeftColumnCount(){return this.floatingLeft}get floatingRightColumnCount(){return this.floatingRight}get isEditable(){return this.editable}textForCell(o,r){var s,t;return(s=(t=this.editedData[o])===null||t===void 0?void 0:t[r])!==null&&s!==void 0?s:"".concat(o,",").concat(r)}colorForCell(o,r,s){return s.textColor}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}textForRowFooter(o){return"".concat(o)}setValueForCell(o,r,s){var t=this;return ve(function*(){t.editedData[o]==null&&(t.editedData[o]=[]),t.editedData[o][r]="".concat(s)})()}setValueForRanges(o,r){var s=this;return ve(function*(){ho.forEachCell(o,(t,n)=>{s.setValueForCell(t,n,r)})})()}setValues(o){var r=this;return ve(function*(){for(var s=0;s<o.length;s+=1){var t,n,a=o[s];r.setValueForCell((t=a.column)!==null&&t!==void 0?t:a.x,(n=a.row)!==null&&n!==void 0?n:a.y,a.text)}})()}editValueForCell(o,r){return this.textForCell(o,r)}isValidForCell(o,r,s){return!0}isEditableRange(o){return this.isEditable}delete(o){throw new Error("Method not implemented.")}}const Me=Nr;function w(l,o,r){return o=kr(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function kr(l){var o=Er(l,"string");return typeof o=="symbol"?o:String(o)}function Er(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class T extends Me{constructor(){var{rowCount:o=T.DEFAULT_ROW_COUNT,columnCount:r=T.DEFAULT_COLUMN_COUNT,children:s=new Map,childRowCount:t=Math.ceil(Math.max(T.MIN_CHILD_ROW_COUNT,o*T.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:n=T.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:o,columnCount:r}),w(this,"children",void 0),w(this,"childRowCount",void 0),w(this,"maxDepth",void 0),w(this,"getCachedModelRowOffset",U((a,c)=>{for(var i=null,d=c,h=[...a].sort((b,M)=>b[0]-M[0]),g=0;g<h.length;g+=1){var[m,v]=h[g];if(d<=m)break;var x=v.rowCount;if(d<=m+x){i=m,d=d-m-1;break}d-=x}return{key:i,offsetRow:d}})),w(this,"getCachedTextForRowHeader",U((a,c)=>{var{key:i,offsetRow:d}=this.getCachedModelRowOffset(a,c);if(i!=null){var h=a.get(i);if(h!==void 0)return"".concat(i,".").concat(h.textForRowHeader(d))}return"".concat(d)})),w(this,"getCachedTextForCell",U((a,c,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(a,i);if(d!=null){var g=a.get(d);if(g!==void 0)return"".concat(d,".").concat(g.textForCell(c,h))}return"".concat(c,",").concat(h)})),w(this,"getCachedIsRowExpandable",U((a,c,i)=>{var d=this.getCachedDepthForRow(a,c);return d<i})),w(this,"getCachedIsRowExpanded",U((a,c)=>{var{key:i,offsetRow:d}=this.getCachedModelRowOffset(a,c);if(i!=null){var h=a.get(i);if(h!==void 0)return h.isRowExpanded(d)}return a.has(d)})),w(this,"getCachedDepthForRow",U((a,c)=>{var{key:i,offsetRow:d}=this.getCachedModelRowOffset(a,c);if(i!=null){var h=a.get(i);if(h!==void 0)return h.depthForRow(d)+1}return 0})),this.children=s,this.childRowCount=t,this.maxDepth=n}textForCell(o,r){return this.getCachedTextForCell(this.children,o,r)}textForRowHeader(o){return this.getCachedTextForRowHeader(this.children,o)}isRowMovable(o){return!1}get hasExpandableRows(){return!0}get isExpandAllAvailable(){return!1}get floatingBottomRowCount(){return 0}isRowExpandable(o){return this.getCachedIsRowExpandable(this.children,o,this.maxDepth)}isRowExpanded(o){return this.getCachedIsRowExpanded(this.children,o)}setRowExpanded(o,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:t,offsetRow:n}=this.getCachedModelRowOffset(this.children,o),a=new Map(this.children);if(t!=null){var c=this.children.get(t);if(c!==void 0){var{rowCount:i}=c;c.setRowExpanded(n,r,s),this.numRows+=c.rowCount-i}}else if(r){var h=new T({rowCount:this.childRowCount,columnCount:this.numColumns});a.set(n,h),this.numRows+=h.rowCount}else{var d=a.get(n);d!==void 0&&(this.numRows-=d.rowCount,a.delete(n))}this.children=a}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(o){return this.getCachedDepthForRow(this.children,o)}}w(T,"DEFAULT_ROW_COUNT",1e9);w(T,"DEFAULT_COLUMN_COUNT",100);w(T,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);w(T,"MIN_CHILD_ROW_COUNT",10);w(T,"MAX_DEPTH",10);const Ae=T;function pe(l,o,r){return o=Ir(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Ir(l){var o=Dr(l,"string");return typeof o=="symbol"?o:String(o)}function Dr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class $r extends ie{constructor(o,r){var s;super(),pe(this,"data",void 0),pe(this,"columnHeaders",void 0),pe(this,"numberOfColumns",void 0),this.data=o,this.numberOfColumns=Math.max(...o.map(t=>t.length),(s=r?.length)!==null&&s!==void 0?s:0),this.columnHeaders=r}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(o,r){var s;return"".concat((s=this.data[r])===null||s===void 0?void 0:s[o])}textForColumnHeader(o){var r,s;return(r=(s=this.columnHeaders)===null||s===void 0?void 0:s[o])!==null&&r!==void 0?r:""}}const Mr=$r;function xe(l,o,r){return o=Ar(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function Ar(l){var o=Rr(l,"string");return typeof o=="symbol"?o:String(o)}function Rr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}class Lr extends ie{constructor(o,r){super(),xe(this,"numberOfColumns",void 0),xe(this,"numberOfRows",void 0),xe(this,"viewportData",void 0),this.numberOfColumns=o,this.numberOfRows=r}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(o,r){var s,t,n,a,c,i,d,h=r-((s=(t=this.viewportData)===null||t===void 0?void 0:t.rowOffset)!==null&&s!==void 0?s:0),g=o-((n=(a=this.viewportData)===null||a===void 0?void 0:a.columnOffset)!==null&&n!==void 0?n:0);return"".concat((c=(i=this.viewportData)===null||i===void 0||(d=i.data[h])===null||d===void 0?void 0:d[g])!==null&&c!==void 0?c:"")}textForColumnHeader(o){return"".concat(o)}textForRowHeader(o){return"".concat(o)}}const Pr=Lr;function C(l,o,r){return o=_r(o),o in l?Object.defineProperty(l,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[o]=r,l}function _r(l){var o=Fr(l,"string");return typeof o=="symbol"?o:String(o)}function Fr(l,o){if(typeof l!="object"||l===null)return l;var r=l[Symbol.toPrimitive];if(r!==void 0){var s=r.call(l,o||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(l)}var Br="proportional",Vr=io.positiveBarColor,Or=io.negativeBarColor,Ur="beside",Gr="LTR",Hr="right";function Wr(l){return Array.isArray(l)&&l.every(o=>typeof o=="number")}class zr extends ie{constructor(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,i=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,d=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),C(this,"numberOfColumns",void 0),C(this,"numberOfRows",void 0),C(this,"data",void 0),C(this,"columnMins",void 0),C(this,"columnMaxs",void 0),C(this,"columnAxes",void 0),C(this,"valuePlacements",void 0),C(this,"directions",void 0),C(this,"positiveColors",void 0),C(this,"negativeColors",void 0),C(this,"opacities",void 0),C(this,"textAlignments",void 0),C(this,"markers",void 0),this.positiveColors=s,this.negativeColors=t,this.data=o,this.columnAxes=r,this.valuePlacements=n,this.opacities=a,this.directions=c,this.textAlignments=i,this.markers=d,this.numberOfRows=Math.max(...o.map(m=>m.length)),this.numberOfColumns=o.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var h=0;h<o.length;h+=1){var g=o[h];Wr(g)&&(this.columnMins.set(h,Math.min(...g)),this.columnMaxs.set(h,Math.max(...g)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(o,r){var s;return"".concat((s=this.data[o])===null||s===void 0?void 0:s[r])}textForColumnHeader(o){return"".concat(o)}textAlignForCell(o,r){var s;return(s=this.textAlignments.get(o))!==null&&s!==void 0?s:Hr}renderTypeForCell(o,r){return o<20||o%2===r%2?"dataBar":"text"}dataBarOptionsForCell(o,r){var s,t,n,a,c,i,d,h=Fe(this.columnMins,o),g=Fe(this.columnMaxs,o),m=(s=this.columnAxes.get(o))!==null&&s!==void 0?s:Br,v=(t=this.valuePlacements.get(o))!==null&&t!==void 0?t:Ur,x=this.opacities.get(o);x==null||x>1?x=1:x<0&&(x=0);var b=(n=this.directions.get(o))!==null&&n!==void 0?n:Gr,M=(a=this.positiveColors.get(o))!==null&&a!==void 0?a:Vr,z=(c=this.negativeColors.get(o))!==null&&c!==void 0?c:Or,A=Number((i=this.data[o])===null||i===void 0?void 0:i[r]),_=A>=0?M:z,re=(d=this.markers.get(o))!==null&&d!==void 0?d:[];return{columnMin:h,columnMax:g,axis:m,color:_,valuePlacement:v,opacity:x,markers:re,direction:b,value:A}}}const qr=zr,fe="hide-from-e2e-tests",Xe="sample-section";function*mo(l=1){for(;;)l=l*16807%2147483647,yield l/2147483647}function Zr(l=1){const[o]=u.useState(()=>mo(l));return u.useCallback(()=>{const r=o.next();if(r.done===!0)throw new Error("Random number generator unexpectedly finished");return r.value},[o])}function p(l,o=[]){const r=`${Xe}-${l.toLocaleLowerCase().replaceAll(" ","-")}`,s=J(Xe,...o);return{id:r,className:s}}function S(l,o=[]){const{id:r,className:s}=p(l,o);return{id:r,UNSAFE_className:s}}class Re extends u.Component{static renderAlert(o){return e.jsxs("div",{className:J("alert",`alert-${o}`),children:[e.jsx("strong",{children:"Well done!"}),"You successfully read this ",o," alert message."]},o)}render(){const o=["success","info","warning","danger"].map(r=>Re.renderAlert(r));return e.jsxs("div",{...p("alerts"),children:[e.jsx("h2",{className:"ui-title",children:"Alerts"}),e.jsx("div",{style:{padding:"1rem 0"},children:o})]})}}class Q extends u.Component{static renderButtonBrand(o,r){const s=o.length?`btn-${o}-${r}`:`btn-${r}`;return e.jsx(Zo,{className:s,style:{marginBottom:"1rem",marginRight:"1rem"},children:r},r)}static renderButtons(o){const r=["primary","secondary","success","info","danger"].map(s=>Q.renderButtonBrand(o,s));return e.jsxs("div",{...p(`buttons-${o.length?"outline":"regular"}`),children:[e.jsx("h5",{children:o.length?"Outline":"Regular"}),r]},o)}static renderSocketedButtons(){return e.jsxs("div",{...p("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(Z,{style:{marginBottom:"1rem",marginRight:"1rem"},children:"Unlinked"}),e.jsx(Z,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,children:"Linked"}),e.jsx(Z,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,children:"Linked Source"}),e.jsx(Z,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,children:"Error"}),e.jsx(Z,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,children:"Disabled"})]})}constructor(o){super(o),this.state={toggle:!0}}renderInlineButtons(){const{toggle:o}=this.state;return e.jsxs("div",{...p("buttons-inline"),style:{padding:"1rem 0"},children:[e.jsx("h5",{children:"Inline Buttons"}),"Regular btn-inline:",e.jsx(f,{className:"mx-2",kind:"inline",icon:P,tooltip:"test"}),"Toggle button (class active):",e.jsx(f,{className:"mx-2",onClick:()=>{this.setState({toggle:!o})},active:o,kind:"inline",icon:P,tooltip:"test"}),"Disabled:",e.jsx(f,{className:"mx-2",kind:"inline",disabled:!0,children:"Disabled"}),"With Text:",e.jsx(f,{className:"mx-2",kind:"inline",icon:P,children:e.jsx("span",{children:"Text Button"})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{children:"btn-link-icon (no text):"}),e.jsx(f,{kind:"ghost",icon:P,tooltip:"test"}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(f,{kind:"ghost",children:"Text Button "}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(f,{kind:"ghost",icon:P,children:"Text Button"})]})}render(){const o=["","outline"].map(t=>Q.renderButtons(t)),r=this.renderInlineButtons(),s=Q.renderSocketedButtons();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[o,r,s]})]})}}function Yr(){const l=uo();Ze.random=Zr();const[o]=u.useState(()=>new Ze(l));return e.jsxs("div",{...p("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(Yo,{model:o})})]})}function Xr(){const l=[["100","900"],["200","800"],["300","700"],["400","600"],["500","500"],["600","500"],["700","400"],["800","300"],["850","200"],["8XX","100"],["900","75"]].map(([r,s])=>e.jsxs("div",{className:J("swatch","gray-swatch",`gray-swatch-${r}`),children:[e.jsxs("span",{children:["Gray-",r]}),e.jsxs("span",{style:{backgroundColor:`var(--dh-color-gray-${s})`},children:["--dh-gray-",s]})]},r)),o=["red","orange","yellow","green","blue","purple","white","black","content-bg","primary","primary-dark","background","foreground"].map(r=>e.jsx("div",{className:J("swatch",`swatch-${r}`),children:r},r));return e.jsxs("div",{...p("colors"),children:[e.jsx("h2",{className:"ui-title",children:"Colors"}),e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col",children:l}),e.jsx("div",{className:"col",children:o}),e.jsxs("div",{className:"col",children:[e.jsx("p",{children:"Gray Range is available for background/tab colors, and should cover the full range used in mockups. Always use the semantic color names in your .scss files when applicable for UI elements."}),e.jsx("p",{children:"For refrence key colors are $primary for interactable elements, content-bg as background. White is same as gray-200. Gray-100 is used when white needs an active color. content-bg is between 800 and 900."}),e.jsx("pre",{children:`
|
|
2
2
|
// as semantic colours
|
|
3
3
|
$primary: $interfaceblue;
|
|
4
4
|
$secondary: $gray-600;
|
|
@@ -222,4 +222,4 @@ simulation = shares30min.update("Values=(double[])ss.update(Sym, TargetPosition,
|
|
|
222
222
|
`,Pl="_themeColors_1tw4b_1",_l="_label_1tw4b_8",Fl="_swatch_1tw4b_17",Se={themeColors:Pl,label:_l,swatch:Fl},Bl="2px solid var(--dh-color-notice-default-bg)",Vl={"--dh-color-black":"gray","--dh-color-white":"gray","--dh-color-visual-positive":"Visual Status","--dh-color-visual-negative":"Visual Status","--dh-color-visual-notice":"Visual Status","--dh-color-visual-info":"Visual Status","--dh-color-editor-bg":"editor","--dh-color-editor-fg":"editor","--dh-color-editor-context-menu-bg":"menus","--dh-color-editor-context-menu-fg":"menus","--dh-color-editor-menu-selection-bg":"menus","--dh-color-grid-bg":"grid","--dh-color-grid-number-positive":"Data Types","--dh-color-grid-number-negative":"Data Types","--dh-color-grid-number-zero":"Data Types","--dh-color-grid-date":"Data Types","--dh-color-grid-string-null":"Data Types"},Ol={palette:{black:"gray",white:"gray"},editor:{line:"editor",comment:"code",string:"code",number:"code",delimiter:"code",identifier:"code",keyword:"code",operator:"code",storage:"code",predefined:"code",selection:"state",focus:"state"},chart:{axis:"Chart",bg:"Chart",grid:"Chart",plot:"Chart",title:"Chart",active:"Data",trend:"Data",area:"Data",range:"Data",line:"Deprecated"},grid:{data:"Data Bars",context:"Context Menu"},semantic:{positive:"status",negative:"status",notice:"status",info:"status",well:"wells"},component:{}};function Ul(l){const o=te.parseRgba(te.asRgbOrRgbaString(l)??"");if(o==null||o.a<.5)return"white";const{r,g:s,b:t}=o;return te.getBrightness([r,s,t])>=128?"black":"white"}function Gl(l){const o=getComputedStyle(document.documentElement);return l.split(/[\n;]/g).map(s=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(s)?.[1]).filter(s=>!!s).map(s=>{const t=o.getPropertyValue(s);return s==="--dh-color-chart-colorway"?t.split("hsl").filter(Boolean).map(a=>`hsl${a.trim()}`).map((a,c)=>({name:`${s}-${c}`,value:a})):{name:s,value:t}}).flat()}function G(l,o,r,s=Vl){const t=Ol[l];return Gl(o).reduce((c,{name:i,value:d})=>{const h=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(i);let g=s[i]??h?.[r]??h?.[1]??"???";return g=t[g]??g,c[g]==null&&(c[g]=[]),/^--dh-color-(.*?)-hsl$/.test(i)||(i==="--dh-color-black"&&c[g].push({name:"",value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(i))||c[g].push({name:i,value:d}),c},{})}function Hl(){return{"Theme Color Palette":G("palette",Dl,1),"Semantic Colors":G("semantic",$l,1),"Chart Colors":G("chart",Ml,2),"Editor Colors":G("editor",Al,2),"Grid Colors":G("grid",Rl,2),"Component Colors":G("component",Ll,1)}}function Wl(){const{selectedThemeKey:l}=go(),o=u.useMemo(Hl,[l]);return e.jsx(e.Fragment,{children:Object.entries(o).map(([r,s])=>e.jsxs("div",{...p(r),children:[e.jsx("h2",{className:"ui-title",children:r}),e.jsx("div",{className:Se.themeColors,children:Object.entries(s).map(([t,n])=>e.jsxs("div",{style:{gridRow:`span ${n.length+1}`},children:[e.jsx("span",{className:Se.label,children:t}),n.map(({name:a,value:c})=>e.jsxs("div",{className:Se.swatch,style:{backgroundColor:c,border:c===""&&a.length>0?Bl:void 0,color:`var(--dh-color-${Ul(c)})`},children:[e.jsxs(ne,{children:[e.jsx("div",{children:a}),e.jsx("div",{children:c}),e.jsx("div",{children:te.normalizeCssColor(c).replace(/^(#[a-f0-9]{6})ff$/,"$1")})]}),e.jsx("span",{children:a.replace("--dh-color-","")}),a.endsWith("-hue")?e.jsx("span",{children:c}):null]},a))]},t))})]},r))})}const Te="data-menu-category",zl="data-no-menu",po="spectrum-component-samples";function ql(){return e.jsxs("div",{id:po,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(Ie,{gap:20,columns:Co("0px","1fr"),children:[e.jsxs(F,{...S("spectrum-buttons"),children:[e.jsx("h3",{children:"Buttons"}),e.jsx(Zl,{})]}),e.jsxs(F,{...S("spectrum-collections"),children:[e.jsx("h3",{children:"Collections"}),e.jsx(Ql,{})]}),e.jsxs(F,{...S("spectrum-content"),children:[e.jsx("h3",{children:"Content"}),e.jsx(Kl,{})]}),e.jsxs(F,{...S("spectrum-forms"),children:[e.jsx("h3",{children:"Forms"}),e.jsx(Xl,{})]}),e.jsxs(F,{...S("spectrum-overlays"),children:[e.jsx("h3",{children:"Overlays"}),e.jsx(Yl,{})]}),e.jsxs(F,{...S("spectrum-well"),children:[e.jsx("h3",{children:"Wells"}),e.jsx(So,{children:"This is a well."})]})]})]})}function Zl(){return e.jsxs(e.Fragment,{children:[e.jsxs(R,{marginBottom:"size-200",children:[e.jsx(oe,{children:e.jsx(k,{icon:P})}),e.jsx(Ne,{children:"Icon Button"})]}),e.jsxs(Ie,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:ke(4,"size-2000"),rows:ke(8,"size-400"),children:[e.jsx("label",{children:'Button style="outline"'}),e.jsx(j,{variant:"primary",style:"outline",children:"Primary"}),e.jsx(j,{variant:"secondary",style:"outline",children:"Secondary"}),e.jsx(j,{variant:"accent",style:"outline",children:"Accent"}),e.jsx(j,{variant:"negative",style:"outline",children:"Negative"}),e.jsx(j,{variant:"primary",staticColor:"black",style:"outline",children:"Static Black"}),e.jsx(j,{variant:"primary",staticColor:"white",style:"outline",children:"Static White"}),e.jsx(j,{variant:"primary",isDisabled:!0,style:"outline",children:"Disabled"}),e.jsx("label",{children:'Button style="fill"'}),e.jsx(j,{variant:"primary",style:"fill",children:"Primary"}),e.jsx(j,{variant:"secondary",style:"fill",children:"Secondary"}),e.jsx(j,{variant:"accent",style:"fill",children:"Accent"}),e.jsx(j,{variant:"negative",style:"fill",children:"Negative"}),e.jsx(j,{variant:"primary",staticColor:"black",style:"fill",children:"Static Black"}),e.jsx(j,{variant:"primary",staticColor:"white",style:"fill",children:"Static White"}),e.jsx(j,{variant:"primary",isDisabled:!0,style:"fill",children:"Disabled"}),e.jsx("label",{children:"Action Button"}),e.jsx(R,{children:"Normal"}),e.jsx(R,{gridRow:"span 3",isQuiet:!0,children:"Quiet"}),e.jsx(R,{staticColor:"black",children:"Static Black"}),e.jsx(R,{staticColor:"white",children:"Static White"}),e.jsx(R,{isDisabled:!0,children:"Disabled"}),e.jsx("label",{children:"Toggle Button"}),e.jsx(B,{children:"Normal"}),e.jsx(B,{isQuiet:!0,children:"Quiet"}),e.jsx(B,{gridRow:"span 2",isEmphasized:!0,children:"Emphasized"}),e.jsx(B,{staticColor:"black",children:"Static Black"}),e.jsx(B,{staticColor:"white",children:"Static White"}),e.jsx(B,{isDisabled:!0,children:"Disabled"})]})]})}function Yl(){return e.jsxs(e.Fragment,{children:[e.jsx(Ne,{children:"Contextual Help"}),e.jsxs(To,{variant:"info",children:[e.jsx(ao,{children:"Need help?"}),e.jsx(no,{children:e.jsx(Ne,{children:"This is a helpful description of the thing you need help with."})})]})]})}function Xl(){return e.jsx(No,{children:e.jsxs(Ie,{gap:20,columns:ke("auto-fit","210px"),children:[e.jsx(ko,{label:"Text Field"}),e.jsxs(Eo,{label:"Combobox",menuTrigger:"focus",defaultSelectedKey:"two",children:[e.jsx(se,{children:"One"},"one"),e.jsx(se,{children:"Two"},"two"),e.jsx(se,{children:"Three"},"three")]}),e.jsx(Io,{children:"Checkbox"}),e.jsx(Do,{label:"Slider",defaultValue:24}),e.jsx($o,{children:"Switch"})]})})}function Kl(){return e.jsxs(Mo,{children:[e.jsx(oe,{size:"XL",children:e.jsx(k,{icon:Ho})}),e.jsx(ao,{children:"Illustrated Message"}),e.jsx(no,{children:"This is the content of the message."})]})}function Ql(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"Table View"}),e.jsxs(Ao,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(Ro,{children:[e.jsxs(V,{title:"Person",children:[e.jsx(V,{allowsResizing:!0,children:"Name"}),e.jsx(V,{children:"Age"})]}),e.jsxs(V,{title:"Address",children:[e.jsx(V,{allowsResizing:!0,children:"City"}),e.jsx(V,{children:"State"})]})]}),e.jsxs(Lo,{children:[e.jsxs(de,{children:[e.jsx(N,{children:"John"}),e.jsx(N,{children:"42"}),e.jsx(N,{children:"San Francisco"}),e.jsx(N,{children:"CA"})]}),e.jsxs(de,{children:[e.jsx(N,{children:"Jane"}),e.jsx(N,{children:"38"}),e.jsx(N,{children:"San Francisco"}),e.jsx(N,{children:"CA"})]}),e.jsxs(de,{children:[e.jsx(N,{children:"Becky"}),e.jsx(N,{children:"12"}),e.jsx(N,{children:"San Francisco"}),e.jsx(N,{children:"CA"})]})]})]})]})}function le({"data-menu-category":l}){return e.jsx("div",{"data-menu-category":l})}function Jl(){const[l,o]=u.useState([]);u.useEffect(()=>{let s={category:"",items:[]};const t=[s],n=document.querySelector(`#${po}`);document.querySelectorAll(`h2,h3,[${Te}]`).forEach(a=>{if(a.textContent==null||a.hasAttribute(zl))return;if(a.hasAttribute(Te)){s={category:a.getAttribute(Te)??"",items:[]},t.push(s);return}const c=`${n?.contains(a)===!0?"spectrum-":""}${a.textContent}`.toLowerCase().replace(/\s/g,"-");a.id=c,s.items.push({id:c,label:a.textContent})}),o(t)},[]),u.useEffect(()=>{const s=window.location.hash===""?null:document.querySelector(window.location.hash);s&&setTimeout(()=>{s.scrollIntoView()},0)},[]);const r=u.useCallback(s=>{const t=String(s);document.getElementById(t)?.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=t},1e3)},[]);return e.jsxs(Po,{children:[e.jsx(R,{children:e.jsx(oe,{children:e.jsx(k,{icon:Wo})})}),e.jsx(_o,{items:l,onAction:r,children:({category:s,items:t})=>e.jsx(Fo,{items:t,title:s,children:({id:n,label:a})=>e.jsx(se,{children:a},n)},s)})]})}function es(){const l=u.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{window.location.hash=""},500)},[]);return u.useEffect(()=>{function o(){document.documentElement.dataset.scroll=String(window.scrollY>120)}return document.addEventListener("scroll",o,{passive:!0}),()=>{document.removeEventListener("scroll",o)}},[]),e.jsx(j,{UNSAFE_className:"goto-top-button",variant:"accent",onPress:l,children:e.jsx(oe,{children:e.jsx(k,{icon:zo})})})}const os=["Tab 1","Tab 2","Tab 3"];function rs({isActive:l,title:o}){return e.jsxs("li",{className:J("lm_tab",l&&"lm_active"),children:[e.jsx("span",{className:"lm_title_before"}),e.jsx("span",{className:"lm_title",children:o}),e.jsx("span",{className:"lm_close_tab"})]})}function ls(){return e.jsxs("div",{...p("golden-layout"),children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(l=>e.jsxs(ee.Fragment,{children:[e.jsx("h5",{children:l?"Minimized":"Maximised"}),e.jsx("div",{style:{position:"relative",border:"none"},className:l?"lm_maximised":void 0,children:e.jsxs("div",{className:"lm_header",children:[e.jsx("ul",{className:"lm_tabs",children:os.map((o,r)=>e.jsx(rs,{isActive:r===0,title:o},o))}),e.jsxs("ul",{className:"lm_controls",children:[e.jsx("li",{className:"lm_tabpreviousbutton"}),e.jsx("li",{className:"lm_tabnextbutton"}),e.jsx("li",{className:"lm_maximise"}),e.jsx("li",{className:"lm_popout"}),e.jsx("li",{className:"lm_tabdropdown"}),e.jsx("li",{className:"lm_close"})]})]})})]},String(l)))]})}const so={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function ss(){const l=window.location.search.includes("isolateSection=true"),{themes:o}=go(),r=o.length>1;return e.jsxs("div",{className:"container style-guide-container",children:[l&&e.jsx("style",{children:`.${fe}, .sample-section:not(${window.location.hash}), :not(.sample-section) > h2 {
|
|
223
223
|
display: none;
|
|
224
224
|
}`}),e.jsx(D,{justifyContent:"space-between",alignItems:"center",marginTop:"2rem",marginBottom:"1rem",children:e.jsx("h1",{style:{paddingTop:"2rem"},children:"Deephaven UI Components"})}),e.jsxs(D,{...so,UNSAFE_className:fe,marginTop:-56,top:20,gap:10,alignItems:"end",children:[r?e.jsx(br,{}):null,e.jsx(Jl,{})]}),e.jsx(D,{...so,UNSAFE_className:fe,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:r?-234:0,children:e.jsx(es,{})}),e.jsx(wl,{}),e.jsx(le,{"data-menu-category":"Colors"}),e.jsx(Xr,{}),e.jsx(Wl,{}),e.jsx(le,{"data-menu-category":"Layout"}),e.jsx(ls,{}),e.jsx(le,{"data-menu-category":"Components"}),e.jsx(Q,{}),e.jsx(bl,{}),e.jsx(Re,{}),e.jsx(vl,{}),e.jsx(xl,{}),e.jsx(he,{}),e.jsx(yl,{}),e.jsx(Qr,{}),e.jsx(fl,{}),e.jsx(Kr,{}),e.jsx(Jr,{}),e.jsx(Il,{}),e.jsx(jl,{}),e.jsx(gl,{}),e.jsx(rl,{}),e.jsx(il,{}),e.jsx(Yr,{}),e.jsx(cr,{}),e.jsx(le,{"data-menu-category":"Spectrum Components"}),e.jsx(ql,{})]})}function Le(l){const{workspace:o,setWorkspace:r}=l;return u.useEffect(()=>{yr.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(r)},[r]),o!=null?e.jsx(ss,{}):null}Le.propTypes={workspace:ce.shape({}),setWorkspace:ce.func.isRequired};Le.defaultProps={workspace:null};const ts=l=>({workspace:wr(l)}),as=Bo(ts,{setWorkspace:jr})(Le);function fs(){return hr.register(new URL("./download/serviceWorker.js",window.location.href)),ir.init({getWorker:()=>new qo}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx(fr,{children:e.jsx(Vo,{store:Cr,children:e.jsx(as,{})})})}export{fs as StyleGuideRoot,fs as default};
|
|
225
|
-
//# sourceMappingURL=StyleGuideRoot-
|
|
225
|
+
//# sourceMappingURL=StyleGuideRoot-db757f61.js.map
|