@deephaven/code-studio 0.69.2-beta.2 → 0.70.1-alpha-picker-table.34
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/build/assets/AppRoot-8fbba59a.js +5 -0
- package/build/assets/AppRoot-8fbba59a.js.map +1 -0
- package/build/assets/{Chart-761dfbb8.js → Chart-49593479.js} +2 -2
- package/build/assets/{Chart-761dfbb8.js.map → Chart-49593479.js.map} +1 -1
- package/build/assets/ControlType-43d413ba.js +22 -0
- package/build/assets/ControlType-43d413ba.js.map +1 -0
- package/build/assets/FontBootstrap-2f91f6bb.js +4 -0
- package/build/assets/FontBootstrap-2f91f6bb.js.map +1 -0
- package/build/assets/{FormatterUtils-4ef4fbd4.js → FormatterUtils-dbab8b84.js} +2 -2
- package/build/assets/{FormatterUtils-4ef4fbd4.js.map → FormatterUtils-dbab8b84.js.map} +1 -1
- package/build/assets/{Grid-dfcc32e1.js → Grid-cb3653e5.js} +2 -2
- package/build/assets/{Grid-dfcc32e1.js.map → Grid-cb3653e5.js.map} +1 -1
- package/build/assets/GridRenderer-7b447c86.js +2 -0
- package/build/assets/GridRenderer-7b447c86.js.map +1 -0
- package/build/assets/IrisGrid-7c65a74c.js +3 -0
- package/build/assets/IrisGrid-7c65a74c.js.map +1 -0
- package/build/assets/{IrisGridModel-4ba68181.js → IrisGridModel-3cc97aec.js} +2 -2
- package/build/assets/{IrisGridModel-4ba68181.js.map → IrisGridModel-3cc97aec.js.map} +1 -1
- package/build/assets/IrisGridShortcuts-929f2007.js +2 -0
- package/build/assets/IrisGridShortcuts-929f2007.js.map +1 -0
- package/build/assets/IrisGridThemeProvider-bc978029.js +11 -0
- package/build/assets/IrisGridThemeProvider-bc978029.js.map +1 -0
- package/build/assets/{MarkdownEditor-5b56d54d.js → MarkdownEditor-7db3103d.js} +2 -2
- package/build/assets/{MarkdownEditor-5b56d54d.js.map → MarkdownEditor-7db3103d.js.map} +1 -1
- package/build/assets/{MarkdownNotebook-8dc3fdd3.js → MarkdownNotebook-e640b4b8.js} +2 -2
- package/build/assets/{MarkdownNotebook-8dc3fdd3.js.map → MarkdownNotebook-e640b4b8.js.map} +1 -1
- package/build/assets/{MissingPartitionError-2ea36982.js → MissingPartitionError-b63f09c6.js} +2 -2
- package/build/assets/{MissingPartitionError-2ea36982.js.map → MissingPartitionError-b63f09c6.js.map} +1 -1
- package/build/assets/{StyleGuideRoot-4e3a2f49.js → StyleGuideRoot-3dcdb14f.js} +6 -6
- package/build/assets/{StyleGuideRoot-4e3a2f49.js.map → StyleGuideRoot-3dcdb14f.js.map} +1 -1
- package/build/assets/{index-fa466d89.js → index-04bee0e3.js} +2 -2
- package/build/assets/{index-fa466d89.js.map → index-04bee0e3.js.map} +1 -1
- package/build/assets/index-6cba7ffb.js +2 -0
- package/build/assets/index-6cba7ffb.js.map +1 -0
- package/build/assets/index-de8060f3.js +9 -0
- package/build/assets/index-de8060f3.js.map +1 -0
- package/build/assets/{useUser-55b88f4f.js → useUser-46c889c3.js} +2 -2
- package/build/assets/{useUser-55b88f4f.js.map → useUser-46c889c3.js.map} +1 -1
- package/build/index.html +2 -2
- package/package.json +30 -30
- package/build/assets/AppRoot-0eb3068f.js +0 -5
- package/build/assets/AppRoot-0eb3068f.js.map +0 -1
- package/build/assets/ControlType-ac4243a8.js +0 -22
- package/build/assets/ControlType-ac4243a8.js.map +0 -1
- package/build/assets/FontBootstrap-fa16b0fe.js +0 -4
- package/build/assets/FontBootstrap-fa16b0fe.js.map +0 -1
- package/build/assets/GridRenderer-5a8d299d.js +0 -2
- package/build/assets/GridRenderer-5a8d299d.js.map +0 -1
- package/build/assets/IrisGrid-a320c953.js +0 -3
- package/build/assets/IrisGrid-a320c953.js.map +0 -1
- package/build/assets/IrisGridShortcuts-24232880.js +0 -2
- package/build/assets/IrisGridShortcuts-24232880.js.map +0 -1
- package/build/assets/IrisGridThemeProvider-d0c4ceb3.js +0 -11
- package/build/assets/IrisGridThemeProvider-d0c4ceb3.js.map +0 -1
- package/build/assets/index-d21a95e0.js +0 -9
- package/build/assets/index-d21a95e0.js.map +0 -1
- package/build/assets/index-d3742b80.js +0 -2
- package/build/assets/index-d3742b80.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,K as z,I as e,ay as w,M as he,_ as jr,V as ve,L as S,a7 as W,U as Ye,bb as Mr,aA as P,bw as yr,a$ as N,a5 as Pr,a6 as M,a9 as Lr,aa as Ue,bx as _r,ab as Br,ac as Ge,a8 as E,ae as Fr,af as j,b0 as Or,by as Me,a_ as K,at as Vr,ad as Ur,aY as Pe,aj as wr,ai as f,bz as Le,aQ as Gr,aS as Hr,ak as zr,aG as Wr,bA as qr,bB as Kr,bC as Y,bD as Yr,bE as be,bF as I,aI as Zr,bG as Xr,aP as _e,bd as Qr,bH as Jr,bI as je,Q as eo,a4 as ro}from"./vendor-323142a4.js";import{aW as Ze,aX as H,aN as de,a3 as oo,aY as He,aZ as ze,a_ as Cr,aF as to,a$ as Z,b0 as Xe,G as Qe,b1 as Je,I as Be,b2 as ao,b3 as lo,N as so,b4 as no,b5 as io,aJ as er,b6 as co}from"./index-fa466d89.js";import{W as ho}from"./monaco-b5248072.js";import{f as pe,d as Sr,m as X,B as uo,S as le,L as go,c as ye,I as mo,R as Tr,a as F}from"./IrisGridModel-4ba68181.js";import{B as x,u as kr,s as re,q as oe,aW as $,K as A,am as me,ak as vo,H as rr,cs as or,N as xo,C as L,aZ as ge,S as Fe,aR as po,an as fo,d as tr,a$ as Nr,z as ar,bv as Q,aq as bo,aC as jo,aa as yo,aI as wo,w as Co}from"./ControlType-ac4243a8.js";import{M as lr,H as So,A as To,T as ko,D as No,C as Do,a as Io,c as Eo,b as $o,P as we,j as Ao}from"./FontBootstrap-fa16b0fe.js";import{G as te,T as Ro}from"./Grid-dfcc32e1.js";import{G as Dr,O as _,C as Oe,a as Mo,S as Po,b as ie,P as sr,e as Lo,c as _o}from"./GridRenderer-5a8d299d.js";import{a as nr,D as Bo}from"./IrisGridShortcuts-24232880.js";import{N as Fo,T as Oo}from"./useUser-55b88f4f.js";import{L as Vo}from"./AppRoot-0eb3068f.js";import"./helpers-de833af9.js";function ir(a,r,o,t,l,s,n){try{var i=a[s](n),d=i.value}catch(h){o(h);return}i.done?r(d):Promise.resolve(d).then(t,l)}function Ce(a){return function(){var r=this,o=arguments;return new Promise(function(t,l){var s=a.apply(r,o);function n(d){ir(s,t,l,n,i,"next",d)}function i(d){ir(s,t,l,n,i,"throw",d)}n(void 0)})}}function B(a,r,o){return r=Uo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function Uo(a){var r=Go(a,"string");return typeof r=="symbol"?r:String(r)}function Go(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class Ho extends pe{constructor(){var{rowCount:r=1e9,columnCount:o=100,floatingTopRowCount:t=0,floatingBottomRowCount:l=0,floatingLeftColumnCount:s=0,floatingRightColumnCount:n=0,isEditable:i=!1,editedData:d=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),B(this,"numRows",void 0),B(this,"numColumns",void 0),B(this,"floatingTop",void 0),B(this,"floatingBottom",void 0),B(this,"floatingLeft",void 0),B(this,"floatingRight",void 0),B(this,"editable",void 0),B(this,"editedData",void 0),this.numRows=r,this.numColumns=o,this.floatingTop=t,this.floatingBottom=l,this.floatingLeft=s,this.floatingRight=n,this.editable=i,this.editedData=d}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(r,o){var t,l;return(t=(l=this.editedData[r])===null||l===void 0?void 0:l[o])!==null&&t!==void 0?t:"".concat(r,",").concat(o)}colorForCell(r,o,t){return t.textColor}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}textForRowFooter(r){return"".concat(r)}setValueForCell(r,o,t){var l=this;return Ce(function*(){l.editedData[r]==null&&(l.editedData[r]=[]),l.editedData[r][o]="".concat(t)})()}setValueForRanges(r,o){var t=this;return Ce(function*(){Sr.forEachCell(r,(l,s)=>{t.setValueForCell(l,s,o)})})()}setValues(r){var o=this;return Ce(function*(){for(var t=0;t<r.length;t+=1){var l,s,n=r[t];o.setValueForCell((l=n.column)!==null&&l!==void 0?l:n.x,(s=n.row)!==null&&s!==void 0?s:n.y,n.text)}})()}editValueForCell(r,o){return this.textForCell(r,o)}isValidForCell(r,o,t){return!0}isEditableRange(r){return this.isEditable}delete(r){throw new Error("Method not implemented.")}}const We=Ho;function C(a,r,o){return r=zo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function zo(a){var r=Wo(a,"string");return typeof r=="symbol"?r:String(r)}function Wo(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class D extends We{constructor(){var{rowCount:r=D.DEFAULT_ROW_COUNT,columnCount:o=D.DEFAULT_COLUMN_COUNT,children:t=new Map,childRowCount:l=Math.ceil(Math.max(D.MIN_CHILD_ROW_COUNT,r*D.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:s=D.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:r,columnCount:o}),C(this,"children",void 0),C(this,"childRowCount",void 0),C(this,"maxDepth",void 0),C(this,"getCachedModelRowOffset",X((n,i)=>{for(var d=null,h=i,c=[...n].sort((y,O)=>y[0]-O[0]),g=0;g<c.length;g+=1){var[m,v]=c[g];if(h<=m)break;var b=v.rowCount;if(h<=m+b){d=m,h=h-m-1;break}h-=b}return{key:d,offsetRow:h}})),C(this,"getCachedTextForRowHeader",X((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return"".concat(d,".").concat(c.textForRowHeader(h))}return"".concat(h)})),C(this,"getCachedTextForCell",X((n,i,d)=>{var{key:h,offsetRow:c}=this.getCachedModelRowOffset(n,d);if(h!=null){var g=n.get(h);if(g!==void 0)return"".concat(h,".").concat(g.textForCell(i,c))}return"".concat(i,",").concat(c)})),C(this,"getCachedIsRowExpandable",X((n,i,d)=>{var h=this.getCachedDepthForRow(n,i);return h<d})),C(this,"getCachedIsRowExpanded",X((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.isRowExpanded(h)}return n.has(h)})),C(this,"getCachedDepthForRow",X((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.depthForRow(h)+1}return 0})),this.children=t,this.childRowCount=l,this.maxDepth=s}textForCell(r,o){return this.getCachedTextForCell(this.children,r,o)}textForRowHeader(r){return this.getCachedTextForRowHeader(this.children,r)}isRowMovable(r){return!1}get hasExpandableRows(){return!0}get isExpandAllAvailable(){return!1}get floatingBottomRowCount(){return 0}isRowExpandable(r){return this.getCachedIsRowExpandable(this.children,r,this.maxDepth)}isRowExpanded(r){return this.getCachedIsRowExpanded(this.children,r)}setRowExpanded(r,o){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:l,offsetRow:s}=this.getCachedModelRowOffset(this.children,r),n=new Map(this.children);if(l!=null){var i=this.children.get(l);if(i!==void 0){var{rowCount:d}=i;i.setRowExpanded(s,o,t),this.numRows+=i.rowCount-d}}else if(o){var c=new D({rowCount:this.childRowCount,columnCount:this.numColumns});n.set(s,c),this.numRows+=c.rowCount}else{var h=n.get(s);h!==void 0&&(this.numRows-=h.rowCount,n.delete(s))}this.children=n}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(r){return this.getCachedDepthForRow(this.children,r)}}C(D,"DEFAULT_ROW_COUNT",1e9);C(D,"DEFAULT_COLUMN_COUNT",100);C(D,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);C(D,"MIN_CHILD_ROW_COUNT",10);C(D,"MAX_DEPTH",10);const qe=D;function Se(a,r,o){return r=qo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function qo(a){var r=Ko(a,"string");return typeof r=="symbol"?r:String(r)}function Ko(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class Yo extends pe{constructor(r,o){var t;super(),Se(this,"data",void 0),Se(this,"columnHeaders",void 0),Se(this,"numberOfColumns",void 0),this.data=r,this.numberOfColumns=Math.max(...r.map(l=>l.length),(t=o?.length)!==null&&t!==void 0?t:0),this.columnHeaders=o}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(r,o){var t;return"".concat((t=this.data[o])===null||t===void 0?void 0:t[r])}textForColumnHeader(r){var o,t;return(o=(t=this.columnHeaders)===null||t===void 0?void 0:t[r])!==null&&o!==void 0?o:""}}const Zo=Yo;function Te(a,r,o){return r=Xo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function Xo(a){var r=Qo(a,"string");return typeof r=="symbol"?r:String(r)}function Qo(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class Jo extends pe{constructor(r,o){super(),Te(this,"numberOfColumns",void 0),Te(this,"numberOfRows",void 0),Te(this,"viewportData",void 0),this.numberOfColumns=r,this.numberOfRows=o}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(r,o){var t,l,s,n,i,d,h,c=o-((t=(l=this.viewportData)===null||l===void 0?void 0:l.rowOffset)!==null&&t!==void 0?t:0),g=r-((s=(n=this.viewportData)===null||n===void 0?void 0:n.columnOffset)!==null&&s!==void 0?s:0);return"".concat((i=(d=this.viewportData)===null||d===void 0||(h=d.data[c])===null||h===void 0?void 0:h[g])!==null&&i!==void 0?i:"")}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}}const et=Jo;function T(a,r,o){return r=rt(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function rt(a){var r=ot(a,"string");return typeof r=="symbol"?r:String(r)}function ot(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}var tt="proportional",at=Dr.positiveBarColor,lt=Dr.negativeBarColor,st="beside",nt="LTR",it="right";function ct(a){return Array.isArray(a)&&a.every(r=>typeof r=="number")}class dt extends pe{constructor(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),T(this,"numberOfColumns",void 0),T(this,"numberOfRows",void 0),T(this,"data",void 0),T(this,"columnMins",void 0),T(this,"columnMaxs",void 0),T(this,"columnAxes",void 0),T(this,"valuePlacements",void 0),T(this,"directions",void 0),T(this,"positiveColors",void 0),T(this,"negativeColors",void 0),T(this,"opacities",void 0),T(this,"textAlignments",void 0),T(this,"markers",void 0),this.positiveColors=t,this.negativeColors=l,this.data=r,this.columnAxes=o,this.valuePlacements=s,this.opacities=n,this.directions=i,this.textAlignments=d,this.markers=h,this.numberOfRows=Math.max(...r.map(m=>m.length)),this.numberOfColumns=r.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var c=0;c<r.length;c+=1){var g=r[c];ct(g)&&(this.columnMins.set(c,Math.min(...g)),this.columnMaxs.set(c,Math.max(...g)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(r,o){var t;return"".concat((t=this.data[r])===null||t===void 0?void 0:t[o])}textForColumnHeader(r){return"".concat(r)}textAlignForCell(r,o){var t;return(t=this.textAlignments.get(r))!==null&&t!==void 0?t:it}renderTypeForCell(r,o){return r<20||r%2===o%2?"dataBar":"text"}dataBarOptionsForCell(r,o){var t,l,s,n,i,d,h,c=Ze(this.columnMins,r),g=Ze(this.columnMaxs,r),m=(t=this.columnAxes.get(r))!==null&&t!==void 0?t:tt,v=(l=this.valuePlacements.get(r))!==null&&l!==void 0?l:st,b=this.opacities.get(r);b==null||b>1?b=1:b<0&&(b=0);var y=(s=this.directions.get(r))!==null&&s!==void 0?s:nt,O=(n=this.positiveColors.get(r))!==null&&n!==void 0?n:at,ae=(i=this.negativeColors.get(r))!==null&&i!==void 0?i:lt,V=Number((d=this.data[r])===null||d===void 0?void 0:d[o]),q=V>=0?O:ae,fe=(h=this.markers.get(r))!==null&&h!==void 0?h:[];return{columnMin:c,columnMax:g,axis:m,color:q,valuePlacement:v,opacity:b,markers:fe,direction:y,value:V}}}const ht=dt,ke="hide-from-e2e-tests",cr="sample-section";function*Ir(a=1){for(;;)a=a*16807%2147483647,yield a/2147483647}function ut(a=1){const[r]=u.useState(()=>Ir(a));return u.useCallback(()=>{const o=r.next();if(o.done===!0)throw new Error("Random number generator unexpectedly finished");return o.value},[r])}function p(a,r=[]){const o=`${cr}-${a.toLocaleLowerCase().replaceAll(" ","-")}`,t=z(cr,...r);return{id:o,className:t}}function k(a,r=[]){const{id:o,className:t}=p(a,r);return{id:o,UNSAFE_className:t}}function R(){}class ee extends u.Component{static renderButtonBrand(r,o){const t=r.length?`btn-${r}-${o}`:`btn-${o}`;return e.jsx(uo,{className:t,style:{marginBottom:"1rem",marginRight:"1rem"},children:o},o)}static renderButtons(r){const o=["primary","secondary","success","warning","danger","info"].map(t=>ee.renderButtonBrand(r,t));return e.jsxs("div",{...p(`buttons-${r.length?"outline":"regular"}`),children:[e.jsx("h5",{children:r.length?"Outline":"Regular"}),o]},r)}static renderLinks(){const r={primary:"accent",secondary:"neutral",success:"positive",info:"info",warning:"notice",danger:"negative"};return e.jsxs("div",{...p("links"),style:{paddingTop:"1rem"},children:[e.jsx("h5",{children:"Links"}),e.jsx(w,{gap:"1rem",children:Object.entries(r).map(([o,t])=>e.jsxs("a",{className:`text-${o}`,children:[o," (",t,")"]},o))})]})}static renderSocketedButtons(){return e.jsxs("div",{...p("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},onClick:R,children:"Unlinked"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,onClick:R,children:"Linked"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,onClick:R,children:"Linked Source"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,onClick:R,children:"Error"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,onClick:R,children:"Disabled"})]})}constructor(r){super(r),this.state={toggle:!0}}renderInlineButtons(){const{toggle:r}=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(x,{className:"mx-2",kind:"inline",icon:H,tooltip:"test",onClick:R}),"Toggle button (class active):",e.jsx(x,{className:"mx-2",onClick:()=>{this.setState({toggle:!r})},active:r,kind:"inline",icon:H,tooltip:"test"}),"Disabled:",e.jsx(x,{className:"mx-2",kind:"inline",disabled:!0,onClick:R,children:"Disabled"}),"With Text:",e.jsx(x,{className:"mx-2",kind:"inline",icon:H,onClick:R,children:e.jsx("span",{children:"Text Button"})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{children:"btn-link-icon (no text):"}),e.jsx(x,{kind:"ghost",icon:H,tooltip:"test",onClick:R}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(x,{kind:"ghost",onClick:R,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(x,{kind:"ghost",icon:H,onClick:R,children:"Text Button"})]})}render(){const r=["","outline"].map(s=>ee.renderButtons(s)),o=this.renderInlineButtons(),t=ee.renderSocketedButtons(),l=ee.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[r,o,t,l]})]})}}function gt(){const a=kr();lr.random=ut();const[r]=u.useState(()=>new lr(a));return e.jsxs("div",{...p("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(go,{model:r})})]})}const Ve="2px solid var(--dh-color-notice-bg)",mt={"--dh-color-black":"gray","--dh-color-white":"gray","--dh-color-border":"General","--dh-color-bg":"General","--dh-color-surface-bg":"General","--dh-color-fg":"General","--dh-color-content-bg":"General","--dh-color-subdued-content-bg":"General","--dh-color-dropshadow":"General","--dh-color-keyboard-selected-bg":"Misc","--dh-color-hover-border":"Misc","--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-gray-bg":"Default Background","--dh-color-red-bg":"Default Background","--dh-color-orange-bg":"Default Background","--dh-color-yellow-bg":"Default Background","--dh-color-chartreuse-bg":"Default Background","--dh-color-celery-bg":"Default Background","--dh-color-green-bg":"Default Background","--dh-color-seafoam-bg":"Default Background","--dh-color-cyan-bg":"Default Background","--dh-color-blue-bg":"Default Background","--dh-color-indigo-bg":"Default Background","--dh-color-purple-bg":"Default Background","--dh-color-fuchsia-bg":"Default Background","--dh-color-magenta-bg":"Default Background","--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"},dr={"--dh-color-black":"","--dh-color-action-active-bg":"Action.active","--dh-color-action-down-bg":"Action:active","--dh-color-action-hover-bg":"Action:hover","--dh-color-action-active-hover-bg":"Action.active:hover","--dh-color-action-disabled-bg":"Action:disabled"},vt={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:{},component:{}};function ce(a){const r=de.parseRgba(de.asRgbOrRgbaString(a)??"");if(r==null||r.a<.5)return"white";const{r:o,g:t,b:l}=r;return de.getBrightness([o,t,l])>=128?"black":"white"}function xt(a){const r=getComputedStyle(document.documentElement);return a.split(/[\n;]/g).map(t=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(t)?.[1]).filter(t=>!!t).map(t=>{const l=r.getPropertyValue(t);return t==="--dh-color-chart-colorway"?oo(l??"").map(([n,i])=>l.substring(n,i+1)).map((n,i)=>({name:`${t}-${i}`,value:n})):{name:t,value:l}}).flat()}function J(a,r,o,t=mt){const l=vt[a];return xt(r).reduce((i,{name:d,value:h})=>{if(/^--dh-color-true-(.*?)$/.test(d)||/^--dh-color-gray-(light|mid|dark)$/.test(d))return i;const c=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(d);let g=t[d]??c?.[o]??c?.[1]??"???";return g=l[g]??g,i[g]==null&&(i[g]=[]),d in dr&&i[g].push({isLabel:!0,name:dr[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||i[g].push({name:d,value:h}),i},{})}function pt(){const a=u.useRef(null);return u.useLayoutEffect(()=>{if(a.current==null)return;const r=getComputedStyle(a.current),{backgroundColor:o}=r;a.current.style.color=ce(o)},[]),a}function ft(a,r){const[o,t]=u.useState();return u.useEffect(()=>{if(a.current==null)return;const l=getComputedStyle(a.current,r).getPropertyValue("content"),s=/"(--dh-color-.*?)[,"]/.exec(l)?.[1];if(s==null)return;const n=getComputedStyle(a.current).getPropertyValue(s);t(n)},[a,r]),o}function Ne({className:a,children:r}){const o=pt(),t=ft(o,":after"),l=u.useMemo(()=>t!=null?{value:t}:null,[t]),s=l!=null&&l.value!=="";return e.jsxs("div",{ref:o,className:a,style:{border:s?void 0:Ve},children:[s&&e.jsx(re,{interactive:!0,children:e.jsx("div",{children:l.value})}),r]})}function bt(){const a=["100","200","300","400","500","600","700","800","850","8XX","900"].map(t=>e.jsx(Ne,{className:z("swatch","gray-swatch",`gray-swatch-${t}`),children:t==="8XX"?"N/A":`Gray-${t}`},t)),r=["red","orange","yellow","green","blue","purple","white","black"].map(t=>e.jsx(Ne,{className:z("swatch",`swatch-${t}`),children:t},t)),o=["content-bg","background","foreground","primary","primary-dark","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(t=>e.jsx(Ne,{className:z("swatch",`swatch-${t}`),children:t},t));return e.jsxs("div",{...p("colors"),children:[e.jsx("h2",{className:"ui-title",children:"Colors"}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[a,r]}),e.jsx("div",{className:"col",children:o}),e.jsx("div",{className:"col",children:e.jsx("p",{children:"This section is for legacy reference only. Use the css variable based semantic colors in the following sections. You should not be using colors defined in the theme color palette directly."})})]})]})}class jt extends u.Component{constructor(r){super(r),this.makeContextMenuItems=this.makeContextMenuItems.bind(this)}makeContextMenuItems(r){const o=r!==void 0?` ${r}`:"";return[{title:`Show Alert${o}`,icon:He,action:()=>{alert(`Alert${o}!`)},shortcut:new oe({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,A.A],macShortcut:[$.CMD,A.A]})},{title:`Log Message${o}`,icon:ze,action:()=>{console.log(`Logging a message${o}!`)},shortcut:new oe({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,A.L],macShortcut:[$.CMD,A.L]})},{title:"Sub-menu",actions:()=>this.makeContextMenuItems((r??0)+1),order:3}].concat(new Array(10).fill({title:`Disabled Option${o}`,disabled:!0,order:2}))}render(){const r=this.makeContextMenuItems(),t=[{title:"Show Shortcuts",icon:Cr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new oe({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,A.SLASH],macShortcut:[$.CMD,A.SLASH]}),group:me.groups.global}].concat(r),l=()=>new Promise(s=>{setTimeout(()=>{s(r)},3e3)});return e.jsxs("div",{...p("context-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Context Menu"}),e.jsxs(x,{kind:"primary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(me,{actions:t})]}),e.jsxs(x,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(me,{actions:l})]})]})}}class yt extends u.Component{constructor(r){super(r),this.sampleInput=he.createRef(),this.handleUpdateCheckboxMap=this.handleUpdateCheckboxMap.bind(this);const o=["Parent A",new Map([["Child 1",!0],["Child 2",!1]])],t=["Parent B",new Map([["Child 3",!0],["Child 4",!1],["Child 5",!0],["Child 6",!1]])],l=["Leaf Parent",!0];this.state={isShown:!1,checkBoxMap:new Map([o,t,l])}}handleUpdateCheckboxMap(r){this.setState({checkBoxMap:r})}renderChild(){return e.jsxs("div",{className:"p-3",children:[e.jsx("h4",{children:"Sample Child"}),e.jsxs("div",{className:"form-group",children:[e.jsxs("label",{htmlFor:"exampleInput1",children:["Input Label",e.jsx("input",{ref:this.sampleInput,type:"text",className:"form-control",id:"exampleInput1","aria-describedby":"emailHelp",placeholder:"Input Placeholder"})]}),e.jsx("small",{className:"form-text text-muted",children:"Help text for a form input"})]})]})}render(){const{isShown:r,checkBoxMap:o}=this.state;return e.jsxs("div",{...p("dialog"),children:[e.jsx("h2",{className:"ui-title",children:"Popover Dialog"}),e.jsx("p",{children:"Popover dialog that can contain interactive elements, can be set to self close on blur."}),e.jsxs(x,{kind:"primary",style:{marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{r?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(vo,{options:{placement:"bottom"},isShown:r,onEntered:()=>{this.sampleInput.current&&this.sampleInput.current.focus()},onExited:()=>{this.setState({isShown:!1})},closeOnBlur:!0,interactive:!0,children:this.renderChild()})]}),e.jsx("p",{children:"The Hierarchical Checkbox Menu uses a popover dialog to display hierarchical groups of checkboxes."}),e.jsx(So,{menuText:"Checkbox Menu",valueMap:o,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class wt extends u.Component{constructor(r){super(r),this.state={isShown:!1}}render(){const r=[{title:"Show Alert",icon:He,action:()=>{alert("Alert!")},shortcut:new oe({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,A.A],macShortcut:[$.CMD,A.A]})},{title:"Log Message",icon:ze,action:()=>{console.log("Logging a message!")},shortcut:new oe({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,A.L],macShortcut:[$.CMD,A.L]})}],t=[{title:"Show Shortcuts",icon:Cr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new oe({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,A.SLASH],macShortcut:[$.CMD,A.SLASH]}),group:me.groups.global}].concat(r),{isShown:l}=this.state;return e.jsxs("div",{...p("dropdown-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Dropdown Menu"}),e.jsx("p",{children:"A simple dropdown menu of actions, can open on click of parent container, or controlled by prop."}),e.jsx(x,{kind:"inline",className:"mx-2",icon:to,onClick:()=>{},children:e.jsx(rr,{actions:t})}),e.jsxs(x,{kind:"primary",style:{marginRight:"1rem",minWidth:"165px"},onClick:()=>{l?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Menu Shown: ",l.toString()]}),e.jsxs("div",{ref:this.button,className:"btn btn-secondary disabled",style:{marginRight:"1rem"},children:["Shown using isShown",e.jsx(rr,{isShown:l,onMenuClosed:()=>{this.setState({isShown:!1})},actions:t})]})]})}}const Ct=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
|
|
1
|
+
import{r as u,K as z,I as e,ay as w,M as he,_ as jr,V as xe,L as S,a7 as W,U as Ye,bb as Rr,aA as P,bw as yr,a$ as N,a5 as Pr,a6 as R,a9 as Lr,aa as Ue,bx as _r,ab as Br,ac as Ge,a8 as I,ae as Fr,af as j,b0 as Or,by as Re,a_ as K,at as Vr,ad as Ur,aY as Pe,aj as wr,ai as f,bz as Le,aQ as Gr,aS as Hr,ak as zr,aG as Wr,bA as qr,bB as Kr,bC as Y,bD as Yr,bE as je,bF as E,aI as Zr,bG as Xr,aP as _e,bd as Qr,bH as Jr,bI as ye,Q as eo,a4 as ro}from"./vendor-323142a4.js";import{aW as Ze,aX as H,aN as de,a3 as oo,aY as He,aZ as ze,a_ as Cr,aF as to,a$ as Z,b0 as Xe,G as Qe,b1 as Je,I as Be,b2 as ao,b3 as lo,N as so,b4 as no,b5 as io,aJ as er,b6 as co}from"./index-04bee0e3.js";import{W as ho}from"./monaco-b5248072.js";import{f as fe,d as Sr,m as X,B as uo,S as le,L as go,c as we,I as mo,R as Tr,a as F}from"./IrisGridModel-3cc97aec.js";import{B as x,u as kr,s as re,q as oe,aZ as $,K as A,an as ve,al as vo,J as rr,cE as or,Q as xo,C as L,b0 as ge,S as Fe,aU as po,ao as fo,d as tr,b2 as Nr,A as ar,bz as Q,ar as bo,aD as jo,ab as yo,aJ as wo,w as Co}from"./ControlType-43d413ba.js";import{M as lr,H as So,A as To,T as ko,D as No,C as Do,j as Eo,l as Io,k as $o,P as me,w as Ao}from"./FontBootstrap-2f91f6bb.js";import{G as te,T as Mo}from"./Grid-cb3653e5.js";import{G as Dr,O as _,C as Oe,a as Ro,S as Po,b as ie,P as sr,e as Lo,c as _o}from"./GridRenderer-7b447c86.js";import{a as nr,D as Bo}from"./IrisGridShortcuts-929f2007.js";import{N as Fo,T as Oo}from"./useUser-46c889c3.js";import{L as Vo}from"./AppRoot-8fbba59a.js";import"./helpers-de833af9.js";function ir(a,r,o,t,l,s,n){try{var i=a[s](n),d=i.value}catch(h){o(h);return}i.done?r(d):Promise.resolve(d).then(t,l)}function Ce(a){return function(){var r=this,o=arguments;return new Promise(function(t,l){var s=a.apply(r,o);function n(d){ir(s,t,l,n,i,"next",d)}function i(d){ir(s,t,l,n,i,"throw",d)}n(void 0)})}}function B(a,r,o){return r=Uo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function Uo(a){var r=Go(a,"string");return typeof r=="symbol"?r:String(r)}function Go(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class Ho extends fe{constructor(){var{rowCount:r=1e9,columnCount:o=100,floatingTopRowCount:t=0,floatingBottomRowCount:l=0,floatingLeftColumnCount:s=0,floatingRightColumnCount:n=0,isEditable:i=!1,editedData:d=[]}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),B(this,"numRows",void 0),B(this,"numColumns",void 0),B(this,"floatingTop",void 0),B(this,"floatingBottom",void 0),B(this,"floatingLeft",void 0),B(this,"floatingRight",void 0),B(this,"editable",void 0),B(this,"editedData",void 0),this.numRows=r,this.numColumns=o,this.floatingTop=t,this.floatingBottom=l,this.floatingLeft=s,this.floatingRight=n,this.editable=i,this.editedData=d}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(r,o){var t,l;return(t=(l=this.editedData[r])===null||l===void 0?void 0:l[o])!==null&&t!==void 0?t:"".concat(r,",").concat(o)}colorForCell(r,o,t){return t.textColor}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}textForRowFooter(r){return"".concat(r)}setValueForCell(r,o,t){var l=this;return Ce(function*(){l.editedData[r]==null&&(l.editedData[r]=[]),l.editedData[r][o]="".concat(t)})()}setValueForRanges(r,o){var t=this;return Ce(function*(){Sr.forEachCell(r,(l,s)=>{t.setValueForCell(l,s,o)})})()}setValues(r){var o=this;return Ce(function*(){for(var t=0;t<r.length;t+=1){var l,s,n=r[t];o.setValueForCell((l=n.column)!==null&&l!==void 0?l:n.x,(s=n.row)!==null&&s!==void 0?s:n.y,n.text)}})()}editValueForCell(r,o){return this.textForCell(r,o)}isValidForCell(r,o,t){return!0}isEditableRange(r){return this.isEditable}delete(r){throw new Error("Method not implemented.")}}const We=Ho;function C(a,r,o){return r=zo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function zo(a){var r=Wo(a,"string");return typeof r=="symbol"?r:String(r)}function Wo(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class D extends We{constructor(){var{rowCount:r=D.DEFAULT_ROW_COUNT,columnCount:o=D.DEFAULT_COLUMN_COUNT,children:t=new Map,childRowCount:l=Math.ceil(Math.max(D.MIN_CHILD_ROW_COUNT,r*D.DEFAULT_CHILD_ROW_COUNT_FACTOR)),maxDepth:s=D.MAX_DEPTH}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super({rowCount:r,columnCount:o}),C(this,"children",void 0),C(this,"childRowCount",void 0),C(this,"maxDepth",void 0),C(this,"getCachedModelRowOffset",X((n,i)=>{for(var d=null,h=i,c=[...n].sort((y,O)=>y[0]-O[0]),g=0;g<c.length;g+=1){var[m,v]=c[g];if(h<=m)break;var b=v.rowCount;if(h<=m+b){d=m,h=h-m-1;break}h-=b}return{key:d,offsetRow:h}})),C(this,"getCachedTextForRowHeader",X((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return"".concat(d,".").concat(c.textForRowHeader(h))}return"".concat(h)})),C(this,"getCachedTextForCell",X((n,i,d)=>{var{key:h,offsetRow:c}=this.getCachedModelRowOffset(n,d);if(h!=null){var g=n.get(h);if(g!==void 0)return"".concat(h,".").concat(g.textForCell(i,c))}return"".concat(i,",").concat(c)})),C(this,"getCachedIsRowExpandable",X((n,i,d)=>{var h=this.getCachedDepthForRow(n,i);return h<d})),C(this,"getCachedIsRowExpanded",X((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.isRowExpanded(h)}return n.has(h)})),C(this,"getCachedDepthForRow",X((n,i)=>{var{key:d,offsetRow:h}=this.getCachedModelRowOffset(n,i);if(d!=null){var c=n.get(d);if(c!==void 0)return c.depthForRow(h)+1}return 0})),this.children=t,this.childRowCount=l,this.maxDepth=s}textForCell(r,o){return this.getCachedTextForCell(this.children,r,o)}textForRowHeader(r){return this.getCachedTextForRowHeader(this.children,r)}isRowMovable(r){return!1}get hasExpandableRows(){return!0}get isExpandAllAvailable(){return!1}get floatingBottomRowCount(){return 0}isRowExpandable(r){return this.getCachedIsRowExpandable(this.children,r,this.maxDepth)}isRowExpanded(r){return this.getCachedIsRowExpanded(this.children,r)}setRowExpanded(r,o){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{key:l,offsetRow:s}=this.getCachedModelRowOffset(this.children,r),n=new Map(this.children);if(l!=null){var i=this.children.get(l);if(i!==void 0){var{rowCount:d}=i;i.setRowExpanded(s,o,t),this.numRows+=i.rowCount-d}}else if(o){var c=new D({rowCount:this.childRowCount,columnCount:this.numColumns});n.set(s,c),this.numRows+=c.rowCount}else{var h=n.get(s);h!==void 0&&(this.numRows-=h.rowCount,n.delete(s))}this.children=n}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(r){return this.getCachedDepthForRow(this.children,r)}}C(D,"DEFAULT_ROW_COUNT",1e9);C(D,"DEFAULT_COLUMN_COUNT",100);C(D,"DEFAULT_CHILD_ROW_COUNT_FACTOR",.01);C(D,"MIN_CHILD_ROW_COUNT",10);C(D,"MAX_DEPTH",10);const qe=D;function Se(a,r,o){return r=qo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function qo(a){var r=Ko(a,"string");return typeof r=="symbol"?r:String(r)}function Ko(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class Yo extends fe{constructor(r,o){var t;super(),Se(this,"data",void 0),Se(this,"columnHeaders",void 0),Se(this,"numberOfColumns",void 0),this.data=r,this.numberOfColumns=Math.max(...r.map(l=>l.length),(t=o?.length)!==null&&t!==void 0?t:0),this.columnHeaders=o}get rowCount(){return this.data.length}get columnCount(){return this.numberOfColumns}textForCell(r,o){var t;return"".concat((t=this.data[o])===null||t===void 0?void 0:t[r])}textForColumnHeader(r){var o,t;return(o=(t=this.columnHeaders)===null||t===void 0?void 0:t[r])!==null&&o!==void 0?o:""}}const Zo=Yo;function Te(a,r,o){return r=Xo(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function Xo(a){var r=Qo(a,"string");return typeof r=="symbol"?r:String(r)}function Qo(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}class Jo extends fe{constructor(r,o){super(),Te(this,"numberOfColumns",void 0),Te(this,"numberOfRows",void 0),Te(this,"viewportData",void 0),this.numberOfColumns=r,this.numberOfRows=o}get columnCount(){return this.numberOfColumns}get rowCount(){return this.numberOfRows}textForCell(r,o){var t,l,s,n,i,d,h,c=o-((t=(l=this.viewportData)===null||l===void 0?void 0:l.rowOffset)!==null&&t!==void 0?t:0),g=r-((s=(n=this.viewportData)===null||n===void 0?void 0:n.columnOffset)!==null&&s!==void 0?s:0);return"".concat((i=(d=this.viewportData)===null||d===void 0||(h=d.data[c])===null||h===void 0?void 0:h[g])!==null&&i!==void 0?i:"")}textForColumnHeader(r){return"".concat(r)}textForRowHeader(r){return"".concat(r)}}const et=Jo;function T(a,r,o){return r=rt(r),r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}function rt(a){var r=ot(a,"string");return typeof r=="symbol"?r:String(r)}function ot(a,r){if(typeof a!="object"||a===null)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var t=o.call(a,r||"default");if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}var tt="proportional",at=Dr.positiveBarColor,lt=Dr.negativeBarColor,st="beside",nt="LTR",it="right";function ct(a){return Array.isArray(a)&&a.every(r=>typeof r=="number")}class dt extends fe{constructor(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:new Map,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:new Map,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:new Map,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:new Map,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:new Map;super(),T(this,"numberOfColumns",void 0),T(this,"numberOfRows",void 0),T(this,"data",void 0),T(this,"columnMins",void 0),T(this,"columnMaxs",void 0),T(this,"columnAxes",void 0),T(this,"valuePlacements",void 0),T(this,"directions",void 0),T(this,"positiveColors",void 0),T(this,"negativeColors",void 0),T(this,"opacities",void 0),T(this,"textAlignments",void 0),T(this,"markers",void 0),this.positiveColors=t,this.negativeColors=l,this.data=r,this.columnAxes=o,this.valuePlacements=s,this.opacities=n,this.directions=i,this.textAlignments=d,this.markers=h,this.numberOfRows=Math.max(...r.map(m=>m.length)),this.numberOfColumns=r.length,this.columnMins=new Map,this.columnMaxs=new Map;for(var c=0;c<r.length;c+=1){var g=r[c];ct(g)&&(this.columnMins.set(c,Math.min(...g)),this.columnMaxs.set(c,Math.max(...g)))}}get rowCount(){return this.numberOfRows}get columnCount(){return this.numberOfColumns}textForCell(r,o){var t;return"".concat((t=this.data[r])===null||t===void 0?void 0:t[o])}textForColumnHeader(r){return"".concat(r)}textAlignForCell(r,o){var t;return(t=this.textAlignments.get(r))!==null&&t!==void 0?t:it}renderTypeForCell(r,o){return r<20||r%2===o%2?"dataBar":"text"}dataBarOptionsForCell(r,o){var t,l,s,n,i,d,h,c=Ze(this.columnMins,r),g=Ze(this.columnMaxs,r),m=(t=this.columnAxes.get(r))!==null&&t!==void 0?t:tt,v=(l=this.valuePlacements.get(r))!==null&&l!==void 0?l:st,b=this.opacities.get(r);b==null||b>1?b=1:b<0&&(b=0);var y=(s=this.directions.get(r))!==null&&s!==void 0?s:nt,O=(n=this.positiveColors.get(r))!==null&&n!==void 0?n:at,ae=(i=this.negativeColors.get(r))!==null&&i!==void 0?i:lt,V=Number((d=this.data[r])===null||d===void 0?void 0:d[o]),q=V>=0?O:ae,be=(h=this.markers.get(r))!==null&&h!==void 0?h:[];return{columnMin:c,columnMax:g,axis:m,color:q,valuePlacement:v,opacity:b,markers:be,direction:y,value:V}}}const ht=dt,ke="hide-from-e2e-tests",cr="sample-section";function*Er(a=1){for(;;)a=a*16807%2147483647,yield a/2147483647}function ut(a=1){const[r]=u.useState(()=>Er(a));return u.useCallback(()=>{const o=r.next();if(o.done===!0)throw new Error("Random number generator unexpectedly finished");return o.value},[r])}function p(a,r=[]){const o=`${cr}-${a.toLocaleLowerCase().replaceAll(" ","-")}`,t=z(cr,...r);return{id:o,className:t}}function k(a,r=[]){const{id:o,className:t}=p(a,r);return{id:o,UNSAFE_className:t}}function M(){}class ee extends u.Component{static renderButtonBrand(r,o){const t=r.length?`btn-${r}-${o}`:`btn-${o}`;return e.jsx(uo,{className:t,style:{marginBottom:"1rem",marginRight:"1rem"},children:o},o)}static renderButtons(r){const o=["primary","secondary","success","warning","danger","info"].map(t=>ee.renderButtonBrand(r,t));return e.jsxs("div",{...p(`buttons-${r.length?"outline":"regular"}`),children:[e.jsx("h5",{children:r.length?"Outline":"Regular"}),o]},r)}static renderLinks(){const r={primary:"accent",secondary:"neutral",success:"positive",info:"info",warning:"notice",danger:"negative"};return e.jsxs("div",{...p("links"),style:{paddingTop:"1rem"},children:[e.jsx("h5",{children:"Links"}),e.jsx(w,{gap:"1rem",children:Object.entries(r).map(([o,t])=>e.jsxs("a",{className:`text-${o}`,children:[o," (",t,")"]},o))})]})}static renderSocketedButtons(){return e.jsxs("div",{...p("buttons-socketed"),children:[e.jsx("h5",{children:"Socketed Buttons (for linker)"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},onClick:M,children:"Unlinked"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,onClick:M,children:"Linked"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinkedSource:!0,onClick:M,children:"Linked Source"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},isLinked:!0,isInvalid:!0,onClick:M,children:"Error"}),e.jsx(le,{style:{marginBottom:"1rem",marginRight:"1rem"},disabled:!0,onClick:M,children:"Disabled"})]})}constructor(r){super(r),this.state={toggle:!0}}renderInlineButtons(){const{toggle:r}=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(x,{className:"mx-2",kind:"inline",icon:H,tooltip:"test",onClick:M}),"Toggle button (class active):",e.jsx(x,{className:"mx-2",onClick:()=>{this.setState({toggle:!r})},active:r,kind:"inline",icon:H,tooltip:"test"}),"Disabled:",e.jsx(x,{className:"mx-2",kind:"inline",disabled:!0,onClick:M,children:"Disabled"}),"With Text:",e.jsx(x,{className:"mx-2",kind:"inline",icon:H,onClick:M,children:e.jsx("span",{children:"Text Button"})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{children:"btn-link-icon (no text):"}),e.jsx(x,{kind:"ghost",icon:H,tooltip:"test",onClick:M}),e.jsx("span",{className:"mx-2",children:"btn-link:"}),e.jsx(x,{kind:"ghost",onClick:M,children:"Text Button"}),e.jsx("span",{className:"mx-2",children:"btn-link (text w/ optional with icon):"}),e.jsx(x,{kind:"ghost",icon:H,onClick:M,children:"Text Button"})]})}render(){const r=["","outline"].map(s=>ee.renderButtons(s)),o=this.renderInlineButtons(),t=ee.renderSocketedButtons(),l=ee.renderLinks();return e.jsxs("div",{children:[e.jsx("h2",{className:"ui-title",children:"Buttons"}),e.jsxs("div",{style:{padding:"1rem 0"},children:[r,o,t,l]})]})}}function gt(){const a=kr();lr.random=ut();const[r]=u.useState(()=>new lr(a));return e.jsxs("div",{...p("charts"),children:[e.jsx("h2",{className:"ui-title",children:"Chart"}),e.jsx("div",{style:{height:500},children:e.jsx(go,{model:r})})]})}const Ve="2px solid var(--dh-color-notice-bg)",mt={"--dh-color-black":"gray","--dh-color-white":"gray","--dh-color-border":"General","--dh-color-bg":"General","--dh-color-surface-bg":"General","--dh-color-fg":"General","--dh-color-content-bg":"General","--dh-color-subdued-content-bg":"General","--dh-color-dropshadow":"General","--dh-color-keyboard-selected-bg":"Misc","--dh-color-hover-border":"Misc","--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-gray-bg":"Default Background","--dh-color-red-bg":"Default Background","--dh-color-orange-bg":"Default Background","--dh-color-yellow-bg":"Default Background","--dh-color-chartreuse-bg":"Default Background","--dh-color-celery-bg":"Default Background","--dh-color-green-bg":"Default Background","--dh-color-seafoam-bg":"Default Background","--dh-color-cyan-bg":"Default Background","--dh-color-blue-bg":"Default Background","--dh-color-indigo-bg":"Default Background","--dh-color-purple-bg":"Default Background","--dh-color-fuchsia-bg":"Default Background","--dh-color-magenta-bg":"Default Background","--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"},dr={"--dh-color-black":"","--dh-color-action-active-bg":"Action.active","--dh-color-action-down-bg":"Action:active","--dh-color-action-hover-bg":"Action:hover","--dh-color-action-active-hover-bg":"Action.active:hover","--dh-color-action-disabled-bg":"Action:disabled"},vt={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:{},component:{}};function ce(a){const r=de.parseRgba(de.asRgbOrRgbaString(a)??"");if(r==null||r.a<.5)return"white";const{r:o,g:t,b:l}=r;return de.getBrightness([o,t,l])>=128?"black":"white"}function xt(a){const r=getComputedStyle(document.documentElement);return a.split(/[\n;]/g).map(t=>/^(?:\s{2}|:root\{)?(--dh-color-(?:[^:]+))/.exec(t)?.[1]).filter(t=>!!t).map(t=>{const l=r.getPropertyValue(t);return t==="--dh-color-chart-colorway"?oo(l??"").map(([n,i])=>l.substring(n,i+1)).map((n,i)=>({name:`${t}-${i}`,value:n})):{name:t,value:l}}).flat()}function J(a,r,o,t=mt){const l=vt[a];return xt(r).reduce((i,{name:d,value:h})=>{if(/^--dh-color-true-(.*?)$/.test(d)||/^--dh-color-gray-(light|mid|dark)$/.test(d))return i;const c=/^--dh-color-([^-]+)(?:-([^-]+))?/.exec(d);let g=t[d]??c?.[o]??c?.[1]??"???";return g=l[g]??g,i[g]==null&&(i[g]=[]),d in dr&&i[g].push({isLabel:!0,name:dr[d],value:""}),/^--dh-color-gray-(light|mid|dark)$/.test(d)||i[g].push({name:d,value:h}),i},{})}function pt(){const a=u.useRef(null);return u.useLayoutEffect(()=>{if(a.current==null)return;const r=getComputedStyle(a.current),{backgroundColor:o}=r;a.current.style.color=ce(o)},[]),a}function ft(a,r){const[o,t]=u.useState();return u.useEffect(()=>{if(a.current==null)return;const l=getComputedStyle(a.current,r).getPropertyValue("content"),s=/"(--dh-color-.*?)[,"]/.exec(l)?.[1];if(s==null)return;const n=getComputedStyle(a.current).getPropertyValue(s);t(n)},[a,r]),o}function Ne({className:a,children:r}){const o=pt(),t=ft(o,":after"),l=u.useMemo(()=>t!=null?{value:t}:null,[t]),s=l!=null&&l.value!=="";return e.jsxs("div",{ref:o,className:a,style:{border:s?void 0:Ve},children:[s&&e.jsx(re,{interactive:!0,children:e.jsx("div",{children:l.value})}),r]})}function bt(){const a=["100","200","300","400","500","600","700","800","850","8XX","900"].map(t=>e.jsx(Ne,{className:z("swatch","gray-swatch",`gray-swatch-${t}`),children:t==="8XX"?"N/A":`Gray-${t}`},t)),r=["red","orange","yellow","green","blue","purple","white","black"].map(t=>e.jsx(Ne,{className:z("swatch",`swatch-${t}`),children:t},t)),o=["content-bg","background","foreground","primary","primary-dark","secondary","secondary-hover","success","info","warning","danger","danger-hover"].map(t=>e.jsx(Ne,{className:z("swatch",`swatch-${t}`),children:t},t));return e.jsxs("div",{...p("colors"),children:[e.jsx("h2",{className:"ui-title",children:"Colors"}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[a,r]}),e.jsx("div",{className:"col",children:o}),e.jsx("div",{className:"col",children:e.jsx("p",{children:"This section is for legacy reference only. Use the css variable based semantic colors in the following sections. You should not be using colors defined in the theme color palette directly."})})]})]})}class jt extends u.Component{constructor(r){super(r),this.makeContextMenuItems=this.makeContextMenuItems.bind(this)}makeContextMenuItems(r){const o=r!==void 0?` ${r}`:"";return[{title:`Show Alert${o}`,icon:He,action:()=>{alert(`Alert${o}!`)},shortcut:new oe({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,A.A],macShortcut:[$.CMD,A.A]})},{title:`Log Message${o}`,icon:ze,action:()=>{console.log(`Logging a message${o}!`)},shortcut:new oe({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,A.L],macShortcut:[$.CMD,A.L]})},{title:"Sub-menu",actions:()=>this.makeContextMenuItems((r??0)+1),order:3}].concat(new Array(10).fill({title:`Disabled Option${o}`,disabled:!0,order:2}))}render(){const r=this.makeContextMenuItems(),t=[{title:"Show Shortcuts",icon:Cr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new oe({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,A.SLASH],macShortcut:[$.CMD,A.SLASH]}),group:ve.groups.global}].concat(r),l=()=>new Promise(s=>{setTimeout(()=>{s(r)},3e3)});return e.jsxs("div",{...p("context-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Context Menu"}),e.jsxs(x,{kind:"primary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ve,{actions:t})]}),e.jsxs(x,{kind:"tertiary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{},children:["Right Click Me",e.jsx(ve,{actions:l})]})]})}}class yt extends u.Component{constructor(r){super(r),this.sampleInput=he.createRef(),this.handleUpdateCheckboxMap=this.handleUpdateCheckboxMap.bind(this);const o=["Parent A",new Map([["Child 1",!0],["Child 2",!1]])],t=["Parent B",new Map([["Child 3",!0],["Child 4",!1],["Child 5",!0],["Child 6",!1]])],l=["Leaf Parent",!0];this.state={isShown:!1,checkBoxMap:new Map([o,t,l])}}handleUpdateCheckboxMap(r){this.setState({checkBoxMap:r})}renderChild(){return e.jsxs("div",{className:"p-3",children:[e.jsx("h4",{children:"Sample Child"}),e.jsxs("div",{className:"form-group",children:[e.jsxs("label",{htmlFor:"exampleInput1",children:["Input Label",e.jsx("input",{ref:this.sampleInput,type:"text",className:"form-control",id:"exampleInput1","aria-describedby":"emailHelp",placeholder:"Input Placeholder"})]}),e.jsx("small",{className:"form-text text-muted",children:"Help text for a form input"})]})]})}render(){const{isShown:r,checkBoxMap:o}=this.state;return e.jsxs("div",{...p("dialog"),children:[e.jsx("h2",{className:"ui-title",children:"Popover Dialog"}),e.jsx("p",{children:"Popover dialog that can contain interactive elements, can be set to self close on blur."}),e.jsxs(x,{kind:"primary",style:{marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{r?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Open Dialog",e.jsx(vo,{options:{placement:"bottom"},isShown:r,onEntered:()=>{this.sampleInput.current&&this.sampleInput.current.focus()},onExited:()=>{this.setState({isShown:!1})},closeOnBlur:!0,interactive:!0,children:this.renderChild()})]}),e.jsx("p",{children:"The Hierarchical Checkbox Menu uses a popover dialog to display hierarchical groups of checkboxes."}),e.jsx(So,{menuText:"Checkbox Menu",valueMap:o,onUpdateValueMap:this.handleUpdateCheckboxMap})]})}}class wt extends u.Component{constructor(r){super(r),this.state={isShown:!1}}render(){const r=[{title:"Show Alert",icon:He,action:()=>{alert("Alert!")},shortcut:new oe({id:"STYLEGUIDE.SHOW_ALERT",name:"Show Alert",shortcut:[$.CTRL,A.A],macShortcut:[$.CMD,A.A]})},{title:"Log Message",icon:ze,action:()=>{console.log("Logging a message!")},shortcut:new oe({id:"STYLEGUIDE.LOG_MESSAGE",name:"Log Message",shortcut:[$.CTRL,A.L],macShortcut:[$.CMD,A.L]})}],t=[{title:"Show Shortcuts",icon:Cr,action:()=>{alert("Show keyboard shortcuts!")},shortcut:new oe({id:"STYLEGUIDE.SHOW_SHORTCUTS",name:"Show Shortcuts",shortcut:[$.CTRL,A.SLASH],macShortcut:[$.CMD,A.SLASH]}),group:ve.groups.global}].concat(r),{isShown:l}=this.state;return e.jsxs("div",{...p("dropdown-menus"),children:[e.jsx("h2",{className:"ui-title",children:"Dropdown Menu"}),e.jsx("p",{children:"A simple dropdown menu of actions, can open on click of parent container, or controlled by prop."}),e.jsx(x,{kind:"inline",className:"mx-2",icon:to,onClick:()=>{},children:e.jsx(rr,{actions:t})}),e.jsxs(x,{kind:"primary",style:{marginRight:"1rem",minWidth:"165px"},onClick:()=>{l?this.setState({isShown:!1}):this.setState({isShown:!0})},children:["Menu Shown: ",l.toString()]}),e.jsxs("div",{ref:this.button,className:"btn btn-secondary disabled",style:{marginRight:"1rem"},children:["Shown using isShown",e.jsx(rr,{isShown:l,onMenuClosed:()=>{this.setState({isShown:!1})},actions:t})]})]})}}const Ct=`trades = db.t("LearnDeephaven", "StockTrades").where("Date=\`2017-08-25\`")\\
|
|
2
2
|
.headBy(3, "Sym")\\
|
|
3
3
|
.view("Sym", "Last")
|
|
4
4
|
|
|
@@ -194,7 +194,7 @@ ss = new SimulatorState()
|
|
|
194
194
|
simulation = shares30min.update("Values=(double[])ss.update(Sym, TargetPosition, SharesTraded30Min)", "PositionChange=Values[0]", "Position=Values[1]")
|
|
195
195
|
.dropColumns("Values")
|
|
196
196
|
|
|
197
|
-
`,hr={testPython:Ct,testGroovy:St};function Tt(){return e.jsxs("div",{...p("editors"),children:[e.jsx("h2",{className:"ui-title",children:"Editor"}),e.jsx("h5",{className:"sub-title",children:"Python"}),e.jsx("div",{style:{height:400,position:"relative"},children:e.jsx(or,{settings:{language:"python",value:hr.testPython}})}),e.jsx("h5",{className:"sub-title",children:"Groovy"}),e.jsx("div",{style:{height:400,position:"relative"},children:e.jsx(or,{settings:{language:"groovy",value:hr.testGroovy}})})]})}const kt=[];class Nt extends
|
|
197
|
+
`,hr={testPython:Ct,testGroovy:St};function Tt(){return e.jsxs("div",{...p("editors"),children:[e.jsx("h2",{className:"ui-title",children:"Editor"}),e.jsx("h5",{className:"sub-title",children:"Python"}),e.jsx("div",{style:{height:400,position:"relative"},children:e.jsx(or,{settings:{language:"python",value:hr.testPython}})}),e.jsx("h5",{className:"sub-title",children:"Groovy"}),e.jsx("div",{style:{height:400,position:"relative"},children:e.jsx(or,{settings:{language:"groovy",value:hr.testGroovy}})})]})}const kt=[];class Nt extends we{model;editedData;constructor(r,o=new qe){super(r),this.model=o,this.editedData=[]}get rowCount(){return this.model.rowCount}get columnCount(){return this.model.columnCount}get floatingTopRowCount(){return 3}get floatingBottomRowCount(){return 3}get isEditable(){return!0}isEditableRange(r){return this.isEditable}setValues(r){throw new Error("Method not implemented.")}delete(r){throw new Error("Method not implemented.")}get pendingRowCount(){return 0}set pendingRowCount(r){}get pendingDataMap(){return new Map}set pendingDataMap(r){}updateFrozenColumns(r){}getColumnIndexByName(r){return Number(r)}textForCell(r,o){return this.editedData[r]?.[o]??this.model.textForCell(r,o)}textForRowHeader(r){return this.model.textForRowHeader(r)}textForRowFooter(r){return this.model.textForRowHeader(r)}textForColumnHeader(r,o){return this.model.textForColumnHeader(r,o)}get hasExpandableRows(){return this.model.hasExpandableRows}get isExpandAllAvailable(){return!1}isRowExpandable(r){return this.model.isRowExpandable(r)}isRowExpanded(r){return this.model.isRowExpanded(r)}setRowExpanded(r,o,t=!1){this.model.setRowExpanded(r,o,t)}expandAll(){throw new Error("Expand all not implemented.")}collapseAll(){throw new Error("Collapse all not implemented.")}depthForRow(r){return this.model.depthForRow(r)}get columns(){return this.getCachedColumns(this.columnCount)}get groupedColumns(){return kt}getCachedColumns=jr(r=>{const o=[];for(let t=0;t<r;t+=1)o.push({name:this.model.textForColumnHeader(t,0),type:"java.lang.String",description:`Mock column ${t}`});return o});get description(){return"A mock used for testing."}get customColumns(){return[]}set customColumns(r){}get formatColumns(){return[]}set formatColumns(r){}get sort(){return[]}set sort(r){}get filter(){return[]}set filter(r){}get partition(){return[]}set partition(r){}get partitionColumns(){return[]}set partitionColumns(r){}set formatter(r){}displayString(r){return`${r}`}valueForCell(r,o){return this.textForCell(r,o)}formatForCell(r,o){}setViewport(){this.dispatchEvent(new CustomEvent(we.EVENT.UPDATED))}async setValueForCell(r,o,t){this.editedData[r]==null&&(this.editedData[r]=[]),this.editedData[r][o]=`${t}`,this.dispatchEvent(new CustomEvent(we.EVENT.UPDATED))}async setValueForRanges(r,o){Sr.forEachCell(r,(t,l)=>{this.setValueForCell(t,l,o)})}editValueForCell(r,o){return this.textForCell(r,o)}isValidForCell(r,o,t){return!0}async columnStatistics(r){throw new Error("Not defined in mock")}async commitPending(){throw new Error("Not defined in mock")}async export(){throw new Error("Not defined in mock")}get pendingDataErrors(){throw new Error("Not defined in mock")}get rollupConfig(){throw new Error("Not defined in mock")}set rollupConfig(r){throw new Error("Not defined in mock")}get selectDistinctColumns(){throw new Error("Not defined in mock")}set selectDistinctColumns(r){throw new Error("Not defined in mock")}async snapshot(r){throw new Error("Not defined in mock")}async textSnapshot(){throw new Error("Not defined in mock")}get totalsConfig(){throw new Error("Not defined in mock")}set totalsConfig(r){throw new Error("Not defined in mock")}valuesTable(r){throw new Error("Not defined in mock")}seekRow(r,o,t,l,s,n,i){throw new Error("Method not implemented.")}get columnHeaderGroups(){return[]}set columnHeaderGroups(r){}get columnHeaderGroupMap(){return new Map}getColumnHeaderParentGroup(){}get initialMovedColumns(){return[]}get initialMovedRows(){return[]}get initialColumnHeaderGroups(){return[]}}function Dt(){const[a]=u.useState(()=>new Zo([["Matthew Austins","Toronto",35,22],["Doug Millgore","Toronto",14,33],["Bart Marchant","Boston",20,14],["Luigi Dabest","Pittsburgh",66,33]],["Name","Team","Goals","Assists"]));return e.jsx(te,{model:a})}function Et(){const[a]=u.useState(()=>new We({isEditable:!0,rowCount:Number.MAX_SAFE_INTEGER,columnCount:Number.MAX_SAFE_INTEGER}));return e.jsx(te,{model:a})}function It(){const[a]=u.useState(()=>new qe);return e.jsx(te,{model:a})}function $t(){const[a]=u.useState(()=>new et(1e9,1e6)),r=u.useRef(null),[o,t]=u.useState({top:0,bottom:0,left:0,right:0}),l=u.useCallback(h=>{const{top:c,bottom:g,left:m,right:v}=h;t({top:c,bottom:g,left:m,right:v})},[]),{top:s,bottom:n,left:i,right:d}=o;return u.useEffect(function(){let c=!1;return setTimeout(()=>{if(c)return;const g=[];for(let m=s;m<=n;m+=1){const v=[];for(let b=i;b<=d;b+=1)v.push(`${m},${b}`);g.push(v)}a.viewportData={rowOffset:s,columnOffset:i,data:g},r.current?.forceUpdate()},250),()=>{c=!0}},[s,n,i,d,a]),e.jsx(te,{model:a,onViewChanged:l,ref:r})}function At(){const a=[100,50,20,10,-10,-20,-50,-30,100,0,1],r=[],o=new Map([[0,"proportional"],[1,"middle"],[2,"directional"],[6,"directional"],[7,"directional"],[8,"directional"],[9,"directional"],[10,"directional"]]),t=new Map([[3,"#72d7df"],[4,"#ac9cf4"]]);t.set(5,["#f3cd5b","#9edc6f"]),t.set(19,["#42f54b","#42b9f5","#352aa8"]);const l=new Map([[3,"#f3cd5b"],[4,"#ac9cf4"]]);l.set(5,["#f95d84","#f3cd5b"]),l.set(19,["#e05536","#e607de","#e6e207"]);const s=new Map([[6,"hide"],[7,"overlap"],[8,"overlap"],[9,"overlap"]]),n=new Map([[7,.5],[8,.5],[9,.5]]),i=new Map([[8,"RTL"],[10,"RTL"],[16,"RTL"],[19,"RTL"]]),d=new Map([[9,"left"],[11,"left"]]),h=new Map([[12,[{value:13,color:"white"},{value:14,color:"gray"}]]]);for(let g=0;g<13;g+=1)r.push(a.slice());r.push([70,60,30,20,-10,-30,-20,-50,80,50,10]),r.push([50,20,10,0,0,-10,-30,10,90,20,40]),r.push([-100,-90,-80,-70,-60,-50,-40,-30,-20,-10,0]),r.push(a.slice()),r.push([100,10.5,11.234,-20.5,-50,-2.5,-15.1234,94.254,25,44.4444,-50.5]),r.push([1e6,10,200,-2e4,-2e6,-25,-9e5,8e5,1e5,45e4,1]),r.push(a.slice()),r.push(a.slice()),r.push(a.slice());const[c]=u.useState(()=>new ht(r,o,t,l,s,n,i,d,h));return e.jsx(te,{model:c})}function Mt(){const a=kr(),[r]=u.useState(new Nt(a,new qe)),[o]=u.useState(new We),[t]=u.useState({autoSelectRow:!0}),[l]=u.useState({font:'12px Arial, "DejaVu Sans", sans-serif',rowHeight:40});return e.jsx("div",{children:e.jsxs(Mo.Provider,{value:l,children:[e.jsx("h2",{className:"ui-title",children:"Grid"}),e.jsx(w,{...k("grids-grid"),children:e.jsx(te,{model:o,theme:t})}),e.jsx("h2",{className:"ui-title",children:"Static Data"}),e.jsx(w,{...k("grids-static"),height:200,children:e.jsx(Dt,{})}),e.jsx("h2",{className:"ui-title",children:"Data Bar"}),e.jsx(w,{...k("grids-data-bar"),height:500,children:e.jsx(At,{})}),e.jsx("h2",{className:"ui-title",children:"Quadrillion rows and columns"}),e.jsx(w,{...k("grids-quadrillion"),position:"relative",height:500,children:e.jsx(Et,{})}),e.jsx("h2",{className:"ui-title",children:"Async example"}),e.jsx(w,{...k("grids-async"),position:"relative",height:500,children:e.jsx($t,{})}),e.jsx("h2",{className:"ui-title",children:"Tree Grid"}),e.jsx(w,{...k("grids-tree"),height:500,children:e.jsx(It,{})}),e.jsx("h2",{className:"ui-title",children:"Iris Grid"}),e.jsx(w,{...k("grids-iris"),height:500,children:e.jsx(mo,{model:r})})]})})}async function ur(a){try{return await navigator.clipboard.writeText(a)}catch(r){throw new Error(`Unable to copy: ${r}`)}}const Rt="dh",Pt="vs",gr=(a,r)=>r.toLowerCase()+a.split("-").map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join("");function Ir({message:a,message:{text:r}}){const[o,t]=u.useState(!1);return u.useEffect(function(){if(r==null||r==="")return;t(!0);const s=setTimeout(()=>{t(!1)},2e3);return()=>{clearTimeout(s)}},[a,r]),e.jsx("p",{className:o?"flash in":"flash out",children:r})}Ir.propTypes={message:xe.shape({text:xe.node}).isRequired};function Lt(){const[a,r]=u.useState(!0),[o,t]=u.useState(!0),[l,s]=u.useState(""),[n,i]=u.useState({text:""}),d=Object.values(Z).filter(c=>{const g=gr(c.iconName,c.prefix).toLowerCase().indexOf(l.replace(/\s/g,"").replace(/-/g,"").toLowerCase())!==-1,m=a&&c.prefix===Rt,v=o&&c.prefix===Pt;return g&&(m||v)}).map(c=>{const g=gr(c.iconName,c.prefix);return e.jsxs(x,{kind:"inline",className:"card",onClick:()=>{ur(g).then(()=>{i({text:e.jsxs("span",{children:[e.jsx(S,{icon:Z.vsOutput})," Copied text:"," ",e.jsx("strong",{children:g})]})})}).catch(m=>{i({text:e.jsx("span",{className:"text-danger",children:m.message})})})},children:[e.jsx(W,{size:"L",children:e.jsx(S,{icon:c})}),e.jsx("label",{title:g,children:g})]},g)}),h=`
|
|
198
198
|
<div className="fa-md fa-layers">
|
|
199
199
|
<FontAwesomeIcon
|
|
200
200
|
mask={vsOrganization}
|
|
@@ -202,13 +202,13 @@ simulation = shares30min.update("Values=(double[])ss.update(Sym, TargetPosition,
|
|
|
202
202
|
transform="down-7 right-7"
|
|
203
203
|
/>
|
|
204
204
|
<FontAwesomeIcon icon={dhAddSmall} />
|
|
205
|
-
</div>`;return e.jsxs("div",{...p("icons"),children:[e.jsx("h2",{className:"ui-title",children:"Icons"}),e.jsx("div",{className:"row",children:e.jsxs("div",{className:"col",children:[e.jsx("h4",{children:"Icon Composition"}),e.jsx("p",{children:"Icons can be used indivudally or composed together using font-awesome composition:"}),e.jsxs("div",{className:"icons",children:[e.jsx("div",{className:"icon card",children:e.jsx(S,{icon:Xe})}),e.jsx("div",{className:"icon card",children:e.jsx(S,{icon:Qe})}),e.jsx("div",{className:"icon card",children:e.jsx(S,{icon:Je})}),e.jsx("div",{className:"icon card",children:"="}),e.jsxs(x,{kind:"inline",className:"card",onClick:()=>{ur(h).then(()=>{i({text:e.jsx("span",{children:"Copied composition example"})})}).catch(c=>{i({text:e.jsx("span",{className:"text-danger",children:c.message})})})},children:[e.jsx("div",{className:"icon",children:e.jsxs("div",{className:"fa-md fa-layers",children:[e.jsx(S,{mask:Xe,icon:Qe,transform:"down-7 right-7"}),e.jsx(S,{icon:Je})]})}),e.jsx("label",{children:"Custom"})]})]})]})}),e.jsx("hr",{}),e.jsx("div",{className:"row",children:e.jsxs("div",{className:"col",children:[e.jsx("h4",{children:"All available icons"}),e.jsx("p",{children:"If you cannot find or compose a relevant icon for your use case, please request a new one to be created from design."}),e.jsxs("div",{className:"form-inline mb-3",children:[e.jsx("input",{type:"search",placeholder:"Basic icon search...",value:l,className:"form-control",onChange:c=>{s(c.target.value)}}),e.jsx("span",{className:"mx-2",children:"Show: "}),e.jsx(x,{kind:"inline",active:o,className:"mr-2",onClick:()=>t(!o),icon:o?Z.vsCheck:Z.vsClose,children:"VS ICONS"}),e.jsx(x,{kind:"inline",active:a,className:"mr-2",onClick:()=>r(!a),icon:a?Z.vsCheck:Z.vsClose,children:"DH ICONS"}),e.jsxs("small",{children:["(",d.length," icon",d.length===1?"":"s",")"]})]}),e.jsxs("div",{className:"icons",children:[d,d.length===0&&e.jsx("p",{className:"no-result",children:"No icons found."}),e.jsx(Er,{message:n})]})]})})]})}const De=[{title:"Title 1",value:"Value 1"},{title:"Title 2",value:"Value 2"},{title:"Title 3",value:"Value 3"},{title:"Title 4",value:"Value 4"},{title:"Title 5",value:"Value 5"},{title:"Title 6",value:"Value 6"},{title:"Title 7",value:"Value 7"},{title:"Title 8",value:"Value 8"},{title:"Title 9",value:"Value 9"},{title:"Title 9",value:"Value 9"},{title:"Title 10",value:"Value 10"},{title:"Title 11",value:"Value 11"},{title:"Title 12",value:"Value 12"}],_t=[{title:"1 minute",value:1*60*1e3},{title:"5 minutes",value:5*60*1e3},{title:"20 minutes",value:20*60*1e3},{title:"45 minutes",value:45*60*1e3},{title:"1 hour",value:1*60*60*1e3},{title:"4 hours",value:4*60*60*1e3}];function Bt(){const[a,r]=u.useState(!1),[o,t]=u.useState(""),[l,s]=u.useState(!0),[n,i]=u.useState(!1),[d,h]=u.useState(!1),[c,g]=u.useState(!1),[m,v]=u.useState(null),[b,y]=u.useState("1"),[O,ae]=u.useState(),[V,q]=u.useState("-DLiveTableMonitor.updateThreads=8 -DLiveTableMonitor.printDependencyInformation=false -Dassertion.heapDump=true -Drequire.heapDump=true -Dassertion.heapDump=true -Drequire.heapDump=true"),fe=u.useCallback(U=>{y(U.target.value)},[]),ue=u.useCallback(()=>{r(!a)},[a]),Rr=u.useCallback(U=>{t(U.target.value)},[]);return e.jsxs("div",{...p("inputs",["style-guide-inputs"]),children:[e.jsx("h2",{className:"ui-title",children:"Inputs"}),e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col",children:e.jsxs("form",{children:[e.jsxs("div",{className:"form-group",children:[e.jsxs("label",{htmlFor:"exampleInput1",children:["Input Label",e.jsx("input",{type:"text",className:"form-control",id:"exampleInput1","aria-describedby":"emailHelp",placeholder:"Input Placeholder"})]}),e.jsx("small",{className:"form-text text-muted",children:"Help text for a form imput"})]}),e.jsxs("div",{className:"form-group",children:[e.jsxs("label",{htmlFor:"exampleInput2",children:["Input Label",e.jsx("input",{type:"text",className:"form-control",id:"exampleInput2","aria-describedby":"emailHelp",placeholder:"Input Disabled",disabled:!0})]}),e.jsx("small",{className:"form-text text-muted",children:"Disabled input"})]}),e.jsx("div",{className:"form-group",children:e.jsxs("label",{htmlFor:"exampleInputPassword1",children:["Password",e.jsx("input",{type:"password",className:"form-control",id:"exampleInputPassword1",placeholder:"Password",defaultValue:"123456789"})]})}),e.jsx("div",{className:"form-group",children:e.jsx(xo,{value:o,placeholder:"Search Input",onChange:Rr})})]})}),e.jsx("div",{className:"col",children:e.jsxs("form",{children:[e.jsx("h5",{children:" Checkboxes "}),e.jsx(L,{className:"form-group",checked:l,onChange:()=>s(!l),children:"Checked checkbox"}),e.jsx(L,{className:"form-group",checked:n,onChange:()=>i(!n),children:"Unchecked checkbox"}),e.jsx(L,{className:"form-group",disabled:!0,checked:null,children:"Disabled checkbox"}),e.jsx(L,{className:"form-group",isInvalid:!0,checked:d,onChange:()=>h(!d),children:"Invalid checkbox"}),e.jsx(L,{className:"form-group",checked:c,onChange:()=>g(!c),children:"Add radio button"}),e.jsx(L,{className:"form-group",checked:m,onChange:()=>{m==null?v(!0):v(m?!1:null)},children:"Indeterminate Cycle"})]})}),e.jsxs("div",{className:"col",children:[e.jsxs("form",{children:[e.jsx("h5",{children:" Radios "}),e.jsxs(Tr,{onChange:fe,value:b,children:[e.jsx(F,{value:"1",children:"Toggle this custom radio"}),e.jsx(F,{value:"2",children:"Or toggle this other custom radio"}),e.jsx(F,{value:"3",disabled:!0,children:"Disabled radio"}),e.jsx(F,{value:"4",isInvalid:!0,children:"Invalid radio"}),e.jsx(e.Fragment,{children:c&&e.jsx(F,{value:"5",children:"Extra radio item"})})]})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Toggle Buttons"}),e.jsxs("div",{className:"form-inline justify-content-between",children:[e.jsx("label",{children:String(a)}),e.jsx(ge,{on:a,onClick:ue})]}),e.jsxs("div",{className:"form-inline justify-content-between",children:[e.jsx("label",{children:String(!a)}),e.jsx(ge,{on:!a,onClick:ue})]}),e.jsxs("div",{className:"form-inline justify-content-between",children:[e.jsx("label",{className:"isInvalid",children:"isInvalid"}),e.jsx(ge,{on:!a,isInvalid:!0,onClick:ue})]}),e.jsxs("div",{className:"form-inline justify-content-between",children:[e.jsx("label",{className:"disabled",children:"disabled"}),e.jsx(ge,{on:!a,disabled:!0,onClick:ue})]})]})]}),e.jsxs("div",{className:"col",children:[e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Selection Menu"}),e.jsxs(Fe,{onChange:U=>{},defaultValue:"0",className:"custom-select",children:[e.jsx(_,{disabled:!0,value:"0",children:"Custom Selection"}),e.jsx(_,{value:"1",children:"One"}),e.jsx(_,{value:"2",children:"Two"}),e.jsx(_,{value:"3",children:"Three"})]})]}),e.jsx("div",{className:"form-group",children:e.jsxs(Fe,{onChange:U=>{},defaultValue:"0",className:"custom-select",disabled:!0,children:[e.jsx(_,{disabled:!0,value:"0",children:"Custom Selection"}),e.jsx(_,{value:"1",children:"One"}),e.jsx(_,{value:"2",children:"Two"}),e.jsx(_,{value:"3",children:"Three"})]})}),e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Input with Select"}),e.jsx("div",{className:"input-group",children:e.jsx(Oe,{options:De,inputPlaceholder:"10.128.0.8",searchPlaceholder:"Search actions here"})}),e.jsx("br",{}),e.jsx("div",{className:"input-group",children:e.jsx(Oe,{options:De,inputPlaceholder:"10.128.0.8",searchPlaceholder:"Search actions here",disabled:!0})})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"AutoCompleteInput"}),e.jsx(To,{options:De,noMatchText:"No Matches."})]})]}),e.jsx("div",{className:"col",children:e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Time Input"}),e.jsx(ko,{}),e.jsx("br",{}),e.jsx("h5",{children:"Date Input"}),e.jsx(No,{}),e.jsx("br",{}),e.jsx("h5",{children:"DateTime Input"}),e.jsx(Mo,{}),e.jsx("br",{}),e.jsx("h5",{children:"Custom Timeselect"}),e.jsx(Do,{options:_t,value:O??null,onChange:ae,customText:"Custom Timeout",placeholder:"Select a timeout",timeToValue:U=>U*1e3})]})})]}),e.jsx("div",{className:"row",children:e.jsx("div",{className:"col",children:e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Auto Resize Textarea"}),e.jsx(Io,{value:V,delimiter:" -",onChange:q})]})})})]})}class Ft extends u.PureComponent{constructor(r){super(r),this.handleSelect=this.handleSelect.bind(this),this.handleViewportChange=this.handleViewportChange.bind(this),this.selectedItems=[],this.state={items:[],offset:0,itemCount:5e5}}handleSelect(r){const o=this.selectedItems.indexOf(r);o>=0?this.selectedItems.splice(o,1):this.selectedItems.push(r);const t=o<0,{offset:l}=this.state;let{items:s}=this.state;s=[].concat(s);const n=r-l;n>=0&&n<s.length&&(s[n].isSelected=t),this.setState({items:s})}handleViewportChange(r,o){const{itemCount:t}=this.state,l=o-r+1,s=Math.max(0,r-l),n=Math.min(o+l,t),i=[];for(let h=s;h<=n&&h<=t;h+=1){const c=`Item ${h}`,g=this.selectedItems.indexOf(h)>=0;i.push({value:c,isSelected:g})}const d=s;this.setState({offset:d,items:i})}render(){const{offset:r,items:o,itemCount:t}=this.state;return e.jsx(Po,{itemCount:t,items:o,offset:r,onSelect:this.handleSelect,onViewportChange:this.handleViewportChange})}}class mr extends u.PureComponent{static defaultProps;static propTypes;constructor(r){super(r),this.handleSelect=this.handleSelect.bind(this),this.handleViewportChange=this.handleViewportChange.bind(this),this.selectedItems=[],this.state={items:[],offset:0,itemCount:5e5}}handleSelect(r){const{itemCount:o}=this.state;console.log("Item selected at index",r,"/",o)}handleViewportChange(r,o){const{itemCount:t}=this.state,l=o-r+1,s=Math.max(0,r-l),n=Math.min(o+l,t),i=[];for(let h=s;h<=n;h+=1){const c=`Item ${h}`,g=this.selectedItems.indexOf(h)>=0;i.push({value:c,isSelected:g})}const d=s;this.setState({offset:d,items:i})}render(){const{isMultiSelect:r}=this.props,{offset:o,items:t,itemCount:l}=this.state;return e.jsx(po,{isMultiSelect:r,itemCount:l,items:t,offset:o,onSelect:this.handleSelect,onViewportChange:this.handleViewportChange})}}function Ot(){return e.jsxs("div",{...p("item-list-inputs",["style-guide-inputs"]),children:[e.jsx("h2",{className:"ui-title",children:"Item Lists"}),e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col",children:e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Select List"}),e.jsx("div",{style:{height:"300px"},children:e.jsx(Ft,{})})]})}),e.jsx("div",{className:"col",children:e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Item List"}),e.jsx("div",{style:{height:"300px"},children:e.jsx(mr,{})})]})}),e.jsx("div",{className:"col",children:e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Multi Select Item List"}),e.jsx("div",{style:{height:"300px"},children:e.jsx(mr,{isMultiSelect:!0})})]})})]})]})}function Vt(){const[a,r]=u.useState(0),[o,t]=u.useState(!0),l=()=>{r(0)};function s(n){return e.jsxs(he.Fragment,{children:[e.jsxs(x,{kind:"primary",style:{marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{r(n)},children:[n," ",n>1?"Actions":"Action"]}),e.jsx(fo,{isOpen:a===n,headerText:"Header Text",bodyText:"This is where the body text goes",onConfirm:l,onCancel:n>=2?l:void 0,onDiscard:n>=3?l:void 0})]},n)}return e.jsxs("div",{...p("modals"),children:[e.jsx("h2",{className:"ui-title",children:"Basic Modals"}),e.jsx("div",{style:{padding:"1rem"},children:[1,2,3].map(n=>s(n))}),e.jsx("h2",{className:"ui-title",children:"Custom Modal"}),e.jsx("div",{style:{padding:"1rem"},children:e.jsx("div",{className:"modal-dialog",role:"dialog",children:e.jsxs("div",{className:"modal-content",children:[e.jsxs("div",{className:"modal-header",children:[e.jsx("h5",{className:"modal-title",children:"Modal title"}),e.jsx("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close",children:e.jsx("span",{"aria-hidden":"true",children:"×"})})]}),e.jsxs("div",{className:"modal-body",children:[e.jsx("p",{children:"Modal body text goes here."}),e.jsx(L,{checked:o,onChange:()=>t(!o),children:"Checked checkbox"})]}),e.jsxs("div",{className:"modal-footer",children:[e.jsx(x,{kind:"secondary","data-dismiss":"modal",onClick:()=>{},children:"Close"}),e.jsx(x,{kind:"primary",onClick:()=>{},children:"Save changes"})]})]})})})]})}function Ut(){return e.jsxs("div",{...p("progress"),children:[e.jsx("h2",{className:"ui-title",children:"Progress"}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[e.jsx("h5",{children:"Determinate Progress Loader"}),e.jsx("br",{}),e.jsx("div",{className:"progress",style:{marginBottom:"1rem"},children:e.jsx("div",{className:"progress-bar bg-primary",style:{width:"25%"},"aria-valuenow":25,"aria-valuemin":0,"aria-valuemax":100})})]}),e.jsxs("div",{className:"col",children:[e.jsx("h5",{children:"Indeterminate Progress Spinner"}),e.jsx(Be,{className:"loading-spinner-large"})]}),e.jsxs("div",{className:"col",children:[e.jsx("h5",{children:"Button Progress Spinner"}),e.jsx(x,{kind:"primary",className:"btn-spinner btn-cancelable",style:{minWidth:"10rem"},onClick:()=>{},children:e.jsxs("span",{children:[e.jsx(Be,{className:"mr-2 loading-spinner-vertical-align"}),e.jsx("span",{className:"btn-normal-content",children:"Connecting"}),e.jsx("span",{className:"btn-hover-content",children:"Cancel"})]})})]})]})]})}class Gt extends u.PureComponent{constructor(r){super(r),this.handleSliderChange=this.handleSliderChange.bind(this),this.state={initialStartTime:24*60*60*.25,initialEndTime:24*60*60*.75,startTime:24*60*60*.25,endTime:24*60*60*.75}}handleSliderChange(r){const{startTime:o,endTime:t}=r;this.setState({startTime:o}),this.setState({endTime:t})}render(){const{startTime:r,endTime:o,initialStartTime:t,initialEndTime:l}=this.state,s=r!==t,n=o!==l;return e.jsxs("div",{...p("time-slider-inputs",["style-guide-inputs"]),children:[e.jsx("h2",{className:"ui-title",children:"Time Slider"}),e.jsx(Eo,{startTime:r,endTime:o,isStartModified:s,isEndModified:n,onChange:this.handleSliderChange}),e.jsxs("p",{style:s?{color:"var(--dh-color-modified)"}:{},children:["StartTime: ",tr.formatTime(r)]}),e.jsxs("p",{style:n?{color:"var(--dh-color-modified)"}:{},children:["EndTime: ",tr.formatTime(o)]})]})}}function Ht(){const r=[ze,He].map(o=>e.jsx(S,{icon:o},`${o.prefix}-${o.iconName}`));return e.jsxs("div",{...p("tooltips"),children:[e.jsx("h2",{className:"ui-title",title:"Make better looking tooltips than this one!",children:"Tooltips"}),e.jsxs("div",{className:"btn btn-primary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},children:["Simple Tooltip",e.jsx(re,{children:"Text only content"})]}),e.jsxs("div",{className:"btn btn-secondary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},children:["Complex Tooltip",e.jsxs(re,{children:[e.jsxs("div",{children:["Here is some ",e.jsx("i",{children:"cool"})," ",e.jsx("b",{children:"text"})]}),e.jsx("hr",{}),e.jsx("div",{children:"And some icons down here"}),e.jsxs("div",{children:[e.jsx(Be,{className:"loading-spinner-vertical-align"}),r]})]})]}),e.jsxs("div",{className:"btn btn-success",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},children:["Interactive Tooltip",e.jsxs(re,{interactive:!0,children:[e.jsx("div",{children:"This tooltip is interactive."}),e.jsx("hr",{}),e.jsx(x,{kind:"primary",onClick:()=>{alert("Button clicked!")},children:"Show Alert"})]})]})]})}function zt(){return e.jsxs("div",{...p("typography"),children:[e.jsx("h2",{className:"ui-title",children:"Typography"}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[e.jsx("h1",{className:"text-muted","data-no-menu":!0,children:"h1. Unused"}),e.jsx("h2",{className:"text-muted","data-no-menu":!0,children:"h2. Unused"}),e.jsx("h3",{className:"text-muted","data-no-menu":!0,children:"h3. Unused"}),e.jsx("h4",{"data-no-menu":!0,children:"h4. Standard Heading"}),e.jsx("h5",{"data-no-menu":!0,children:"h5. Small Heading"}),e.jsx("h6",{className:"text-muted","data-no-menu":!0,children:"h6. Unused"})]}),e.jsxs("div",{className:"col",children:[e.jsx("h4",{children:"Fonts"}),e.jsx("p",{children:"UI: Fira Sans;"}),e.jsx("p",{className:"text-monospace",children:"Code: Fira Mono;"}),e.jsx("p",{children:'Tables: Fira Sans; font-feature-settings: "tnum";'}),e.jsx("p",{children:"Default font-size: 14px = 1rem"})]})]})]})}class Wt extends u.PureComponent{static propTypes;static defaultProps;constructor(r){super(r),this.handleSelectionChange=this.handleSelectionChange.bind(this),this.handleViewportChange=this.handleViewportChange.bind(this),this.itemList=he.createRef(),this.selectedItems=[],this.state={topRow:null,bottomRow:null}}focusItem(r){this.itemList.current&&this.itemList.current.focusItem(r)}handleSelectionChange(r){console.log("Selection changed",r);const{onSelectionChange:o}=this.props;o(r)}handleViewportChange(r,o){const{items:t}=this.props,l=o-r+1,s=Math.max(0,r-l),n=Math.min(o+l,t.length);this.setState({topRow:s,bottomRow:n})}getViewportItems=jr((r,o,t)=>r==null||o==null?[]:t.slice(r,o));render(){const{draggablePrefix:r,droppableId:o,isDragDisabled:t,isDropDisabled:l,isMultiSelect:s,items:n,selectedRanges:i}=this.props,{topRow:d,bottomRow:h}=this.state;return e.jsx(ie,{draggablePrefix:r,droppableId:o,isDragDisabled:t,isDropDisabled:l,isMultiSelect:s,itemCount:n.length,items:this.getViewportItems(d,h,n),offset:d??0,onSelectionChange:this.handleSelectionChange,onViewportChange:this.handleViewportChange,ref:this.itemList,selectedRanges:i})}}const Ie=["Draggable Only","Drag and Drop","Droppable Only"],qt=[{isDropDisabled:!0},{},{isDragDisabled:!0}],Kt=(a="Item",r=1e3)=>{const o=[];for(let t=0;t<r;t+=1)o.push(`${a}-${t}`);return o};class xe extends u.Component{static handleDragStart(r){console.log("handleDragStart",r)}static handleDragUpdate(r){console.log("handleDragUpdate",r)}constructor(r){super(r),this.handleDragEnd=this.handleDragEnd.bind(this),this.animationFrame=null;const o=[],t=[],l=[];for(let s=0;s<Ie.length;s+=1)o[s]=Kt(Ie[s]),t[s]=[],l[s]=he.createRef();this.state={items:o,lists:l,selectedRanges:t}}componentWillUnmount(){this.animationFrame!=null&&cancelAnimationFrame(this.animationFrame)}handleDragEnd(r){console.log("handleDragEnd",r);const{source:o,destination:t}=r;if(o==null||t==null)return;const l=ie.getDraggableIndex(o.droppableId),s=ie.getDraggableIndex(t.droppableId),n=l===s;let i=t.index;n&&o.index<t.index&&(i+=1);let d=i;this.setState(({items:h,selectedRanges:c})=>{const g=[...h[l]],m=n?g:[...h[s]],v=nr.reorder(g,c[l],m,i),b=[...h];b[l]=g,b[s]=m,d=n?nr.adjustDestinationIndex(i,c[s]):i;const y=[...c];return y[l]=[],y[s]=[[d,d+v.length-1]],{items:b,selectedRanges:y}},()=>{this.animationFrame!=null&&cancelAnimationFrame(this.animationFrame),this.animationFrame=requestAnimationFrame(()=>{this.animationFrame=null;const{lists:h}=this.state;h[s]?.current?.focusItem(d)})})}handleSelectionChange(r,o){this.setState(({selectedRanges:t})=>{const l=[...t];return l[r]=[...o],{selectedRanges:l}})}getSelectionChangeHandler=Ye(r=>this.handleSelectionChange.bind(this,r));getDraggableList=Ye((r,o,t,l)=>e.jsx(Wt,{items:r,droppableId:ie.getDraggableId("drop-list",l),draggablePrefix:ie.getDraggableId("draggable-item",l),onSelectionChange:this.getSelectionChangeHandler(l),isMultiSelect:!0,ref:t,selectedRanges:o,...qt[l]}));render(){const{items:r,lists:o,selectedRanges:t}=this.state;return e.jsxs("div",{...p("draggable-lists",["style-guide-inputs"]),children:[e.jsx("h2",{className:"ui-title",children:"Drag and Drop Lists"}),e.jsx("div",{className:"row",children:e.jsx(Mr,{onDragStart:xe.handleDragStart,onDragUpdate:xe.handleDragUpdate,onDragEnd:this.handleDragEnd,children:Ie.map((l,s)=>e.jsx("div",{className:"col",children:e.jsxs("div",{className:"form-group",children:[e.jsxs("h5",{children:[l," List"]}),e.jsx("div",{style:{height:"300px"},children:this.getDraggableList(r[s],t[s],o[s],s)})]})},l))})})]})}}function vr({count:a=5,activeKey:r=""}){const[o,t]=u.useState(r),[l,s]=u.useState(()=>{const c=[];for(let g=0;g<a;g+=1)c.push({key:`${g}`,title:`Tab ${g}`,isClosable:g>0});return c}),n=u.useCallback((c,g)=>{s(m=>{const v=[...m],[b]=v.splice(c,1);return v.splice(g,0,b),v})},[]),i=u.useCallback(c=>{t(c)},[]),d=u.useCallback(c=>{s(g=>g.filter(m=>m.key!==c))},[]),h=u.useCallback(c=>[{title:"Select Tab to the Left",group:10,order:10,disabled:l[0].key===c.key,action:()=>{const g=l.findIndex(m=>m.key===c.key);g>0&&t(l[g-1].key)}},{title:"Select Tab to the Right",group:30,order:10,disabled:l[l.length-1].key===c.key,action:()=>{const g=l.findIndex(m=>m.key===c.key);g<l.length-1&&t(l[g+1].key)}}],[l]);return e.jsx(Fo,{tabs:l,activeKey:o,onSelect:i,onReorder:n,onClose:d,makeContextActions:h})}let xr=0;function Yt(){const a=xr;return xr+=1,a}const Zt=Ir(25);function Ee(a=1,r=5){const o=Number(Zt.next().value);return Math.floor(o*r)+a}function $e(a,r=Yt()){return{id:r,type:a}}function pr(a=Ee(),r=Ee(),o=Ee()){const t=[];for(let l=0;l<a;l+=1)t.push($e("SUBMENU"));for(let l=0;l<r;l+=1)t.push($e("PAGE"));for(let l=0;l<o;l+=1)t.push($e("SWITCH"));return t}function Ae({type:a,id:r}){switch(a){case"SUBMENU":return`Submenu ${r}`;case"PAGE":return`Page ${r}`;case"SWITCH":return`Switch ${r}`}}function Xt({type:a}){switch(a){case"SUBMENU":return lo;case"PAGE":return ao;case"SWITCH":return H}}function Qt(){const[a,r]=u.useState([]),[o,t]=u.useState(new Map),l=u.useCallback(c=>{r([...a,c])},[a,r]),s=u.useCallback(()=>{const c=[...a];c.pop(),r(c)},[a,r]),n=u.useCallback(()=>{const c=[a[0]];r(c)},[a,r]),i=u.useCallback(c=>{const g=o.get(c)??!1,m=new Map(o);m.set(c,!g),t(m)},[o,t]),d=u.useCallback(c=>{const g=a[a.length-1],{items:m}=g;if(!m)throw new Error("Navigation handleSelect triggered without items to select");const v=m[c];switch(v.type){case"PAGE":l({title:Ae(v)});break;case"SUBMENU":l({title:Ae(v),items:pr()});break;case"SWITCH":i(v.id);break}},[a,i,l]);u.useEffect(function(){r([{title:"Navigation Menu",items:pr()}])},[]);const h=u.useMemo(()=>a.map(({items:c,title:g},m)=>{if(!c)return e.jsx(sr,{onBack:s,onClose:n,title:g,children:e.jsx("div",{children:"Page content!"})},g);let v=null;if(c!=null){const b=c.map(y=>{const O=Ae(y),ae=Xt(y);let V,q;return y.type==="SWITCH"&&(V=o.get(y.id)??!1,q=()=>{d(y.id)}),{title:O,icon:ae,isOn:V,onChange:q}});v=e.jsx(_o,{onSelect:d,items:b})}else v=e.jsx("div",{children:"Page content"});return e.jsx(sr,{onBack:m>0?s:void 0,onClose:m>0?n:void 0,title:g,children:v},g)}),[a,o,d,s,n]);return e.jsxs("div",{...p("navigations"),children:[e.jsx("h2",{className:"ui-title",children:"Navigations"}),e.jsx("div",{style:{marginBottom:"1rem"},children:e.jsx(vr,{count:100,activeKey:"15"})}),e.jsx("div",{style:{marginBottom:"1rem"},children:e.jsx(vr,{})}),e.jsx("div",{className:"navigations",children:e.jsx(Lo,{children:h})})]})}const Jt=`:root{--dh-color-gray-50: #1a171a;--dh-color-gray-75: #211f22;--dh-color-gray-100: #2d2a2e;--dh-color-gray-200: #322f33;--dh-color-gray-300: #373438;--dh-color-gray-400: #403e41;--dh-color-gray-500: #5b5a5c;--dh-color-gray-600: #929192;--dh-color-gray-700: #c0bfbf;--dh-color-gray-800: #f0f0ee;--dh-color-gray-900: #fcfcfa;--dh-color-gray-light: var(--dh-color-gray-900);--dh-color-gray-mid: var(--dh-color-gray-600);--dh-color-gray-dark: var(--dh-color-gray-300);--dh-color-black: var(--dh-color-gray-50);--dh-color-white: var(--dh-color-gray-800);--dh-color-true-black: #000000;--dh-color-true-white: #ffffff;--dh-color-red-100: #471521;--dh-color-red-200: #5d1b2b;--dh-color-red-300: #762336;--dh-color-red-400: #912b45;--dh-color-red-500: #ab3452;--dh-color-red-600: #c73f61;--dh-color-red-700: #e14c71;--dh-color-red-800: #f85e85;--dh-color-red-900: #ff7b9e;--dh-color-red-1000: #ff99b6;--dh-color-red-1100: #ffb4c9;--dh-color-red-1200: #ffcbd9;--dh-color-red-1300: #ffdee7;--dh-color-red-1400: #ffecf1;--dh-color-orange-100: #471800;--dh-color-orange-200: #5a2202;--dh-color-orange-300: #702f06;--dh-color-orange-400: #87390c;--dh-color-orange-500: #9f4612;--dh-color-orange-600: #b7541b;--dh-color-orange-700: #d06425;--dh-color-orange-800: #e67533;--dh-color-orange-900: #fa8648;--dh-color-orange-1000: #ffa069;--dh-color-orange-1100: #ffb98d;--dh-color-orange-1200: #ffcfaf;--dh-color-orange-1300: #ffe0cb;--dh-color-orange-1400: #ffeee2;--dh-color-yellow-100: #2e2700;--dh-color-yellow-200: #3d3300;--dh-color-yellow-300: #4d4100;--dh-color-yellow-400: #5f5005;--dh-color-yellow-500: #725f0b;--dh-color-yellow-600: #856e13;--dh-color-yellow-700: #9a811b;--dh-color-yellow-800: #ae9024;--dh-color-yellow-900: #c3a32f;--dh-color-yellow-1000: #d7b53a;--dh-color-yellow-1100: #eac448;--dh-color-yellow-1200: #fad459;--dh-color-yellow-1300: #ffe77a;--dh-color-yellow-1400: #fff3ac;--dh-color-chartreuse-100: #1f2b00;--dh-color-chartreuse-200: #2b3805;--dh-color-chartreuse-300: #39470b;--dh-color-chartreuse-400: #495611;--dh-color-chartreuse-500: #596718;--dh-color-chartreuse-600: #69781f;--dh-color-chartreuse-700: #7a8927;--dh-color-chartreuse-800: #8e9c30;--dh-color-chartreuse-900: #a1ae3a;--dh-color-chartreuse-1000: #b2c046;--dh-color-chartreuse-1100: #c2d153;--dh-color-chartreuse-1200: #d5e166;--dh-color-chartreuse-1300: #e3ee84;--dh-color-chartreuse-1400: #f0f7ae;--dh-color-celery-100: #122d15;--dh-color-celery-200: #173a1a;--dh-color-celery-300: #1e4b22;--dh-color-celery-400: #255c2a;--dh-color-celery-500: #2d6d32;--dh-color-celery-600: #36803d;--dh-color-celery-700: #409347;--dh-color-celery-800: #4da654;--dh-color-celery-900: #5fb967;--dh-color-celery-1000: #77ca7e;--dh-color-celery-1100: #93d999;--dh-color-celery-1200: #b2e5b7;--dh-color-celery-1300: #ceeed1;--dh-color-celery-1400: #e4f6e6;--dh-color-green-100: #22291d;--dh-color-green-200: #2d3625;--dh-color-green-300: #38462d;--dh-color-green-400: #445636;--dh-color-green-500: #50673d;--dh-color-green-600: #5b7a45;--dh-color-green-700: #678c4c;--dh-color-green-800: #74a053;--dh-color-green-900: #81b45a;--dh-color-green-1000: #8ec762;--dh-color-green-1100: #9bd96c;--dh-color-green-1200: #ace97e;--dh-color-green-1300: #c3f59d;--dh-color-green-1400: #dcfbc2;--dh-color-seafoam-100: #1f2925;--dh-color-seafoam-200: #263630;--dh-color-seafoam-300: #2f463e;--dh-color-seafoam-400: #37574b;--dh-color-seafoam-500: #3e6959;--dh-color-seafoam-600: #447b68;--dh-color-seafoam-700: #488f79;--dh-color-seafoam-800: #4ca388;--dh-color-seafoam-900: #4fb798;--dh-color-seafoam-1000: #54cba5;--dh-color-seafoam-1100: #5edeb8;--dh-color-seafoam-1200: #78edc8;--dh-color-seafoam-1300: #9ef8d7;--dh-color-seafoam-1400: #cbfce8;--dh-color-cyan-100: #142b2d;--dh-color-cyan-200: #1a373a;--dh-color-cyan-300: #21474b;--dh-color-cyan-400: #29585c;--dh-color-cyan-500: #31696e;--dh-color-cyan-600: #3a7a81;--dh-color-cyan-700: #438d94;--dh-color-cyan-800: #4da0a8;--dh-color-cyan-900: #59b4bc;--dh-color-cyan-1000: #65c6cf;--dh-color-cyan-1100: #74d6e1;--dh-color-cyan-1200: #88e6f1;--dh-color-cyan-1300: #a4f2fb;--dh-color-cyan-1400: #cafaff;--dh-color-blue-100: #112451;--dh-color-blue-200: #16306c;--dh-color-blue-300: #1d3d88;--dh-color-blue-400: #254ba4;--dh-color-blue-500: #2f5bc0;--dh-color-blue-600: #3b6bda;--dh-color-blue-700: #4c7dee;--dh-color-blue-800: #6390fa;--dh-color-blue-900: #7ca3ff;--dh-color-blue-1000: #97b6ff;--dh-color-blue-1100: #afc8ff;--dh-color-blue-1200: #c7d9ff;--dh-color-blue-1300: #dbe6ff;--dh-color-blue-1400: #ecf1ff;--dh-color-indigo-100: #1a1e62;--dh-color-indigo-200: #252a75;--dh-color-indigo-300: #32388a;--dh-color-indigo-400: #40489f;--dh-color-indigo-500: #4f58b4;--dh-color-indigo-600: #5f68c8;--dh-color-indigo-700: #707bdb;--dh-color-indigo-800: #828ded;--dh-color-indigo-900: #959ffa;--dh-color-indigo-1000: #aab2ff;--dh-color-indigo-1100: #bec5ff;--dh-color-indigo-1200: #d2d6ff;--dh-color-indigo-1300: #e1e5ff;--dh-color-indigo-1400: #eff0ff;--dh-color-purple-100: #311067;--dh-color-purple-200: #3d1f79;--dh-color-purple-300: #4b2f8c;--dh-color-purple-400: #5a3f9f;--dh-color-purple-500: #6850b1;--dh-color-purple-600: #7861c3;--dh-color-purple-700: #8873d5;--dh-color-purple-800: #9887e5;--dh-color-purple-900: #a99af3;--dh-color-purple-1000: #b9aefb;--dh-color-purple-1100: #cac1fe;--dh-color-purple-1200: #dad3ff;--dh-color-purple-1300: #e8e3ff;--dh-color-purple-1400: #f4effe;--dh-color-fuchsia-100: #450f44;--dh-color-fuchsia-200: #551a55;--dh-color-fuchsia-300: #662969;--dh-color-fuchsia-400: #77377e;--dh-color-fuchsia-500: #884794;--dh-color-fuchsia-600: #9858aa;--dh-color-fuchsia-700: #a76bbf;--dh-color-fuchsia-800: #b67ed4;--dh-color-fuchsia-900: #c592e5;--dh-color-fuchsia-1000: #d2a7f0;--dh-color-fuchsia-1100: #debcf6;--dh-color-fuchsia-1200: #e9cff9;--dh-color-fuchsia-1300: #f2e0fb;--dh-color-fuchsia-1400: #f9edfc;--dh-color-magenta-100: #520427;--dh-color-magenta-200: #641034;--dh-color-magenta-300: #791e45;--dh-color-magenta-400: #8d2d57;--dh-color-magenta-500: #a13c69;--dh-color-magenta-600: #b54c7d;--dh-color-magenta-700: #ca5d93;--dh-color-magenta-800: #dc70a8;--dh-color-magenta-900: #ee83ba;--dh-color-magenta-1000: #fb99cd;--dh-color-magenta-1100: #ffb1dc;--dh-color-magenta-1200: #ffc9e7;--dh-color-magenta-1300: #ffddf0;--dh-color-magenta-1400: #ffecf6}
|
|
205
|
+
</div>`;return e.jsxs("div",{...p("icons"),children:[e.jsx("h2",{className:"ui-title",children:"Icons"}),e.jsx("div",{className:"row",children:e.jsxs("div",{className:"col",children:[e.jsx("h4",{children:"Icon Composition"}),e.jsx("p",{children:"Icons can be used indivudally or composed together using font-awesome composition:"}),e.jsxs("div",{className:"icons",children:[e.jsx("div",{className:"icon card",children:e.jsx(S,{icon:Xe})}),e.jsx("div",{className:"icon card",children:e.jsx(S,{icon:Qe})}),e.jsx("div",{className:"icon card",children:e.jsx(S,{icon:Je})}),e.jsx("div",{className:"icon card",children:"="}),e.jsxs(x,{kind:"inline",className:"card",onClick:()=>{ur(h).then(()=>{i({text:e.jsx("span",{children:"Copied composition example"})})}).catch(c=>{i({text:e.jsx("span",{className:"text-danger",children:c.message})})})},children:[e.jsx("div",{className:"icon",children:e.jsxs("div",{className:"fa-md fa-layers",children:[e.jsx(S,{mask:Xe,icon:Qe,transform:"down-7 right-7"}),e.jsx(S,{icon:Je})]})}),e.jsx("label",{children:"Custom"})]})]})]})}),e.jsx("hr",{}),e.jsx("div",{className:"row",children:e.jsxs("div",{className:"col",children:[e.jsx("h4",{children:"All available icons"}),e.jsx("p",{children:"If you cannot find or compose a relevant icon for your use case, please request a new one to be created from design."}),e.jsxs("div",{className:"form-inline mb-3",children:[e.jsx("input",{type:"search",placeholder:"Basic icon search...",value:l,className:"form-control",onChange:c=>{s(c.target.value)}}),e.jsx("span",{className:"mx-2",children:"Show: "}),e.jsx(x,{kind:"inline",active:o,className:"mr-2",onClick:()=>t(!o),icon:o?Z.vsCheck:Z.vsClose,children:"VS ICONS"}),e.jsx(x,{kind:"inline",active:a,className:"mr-2",onClick:()=>r(!a),icon:a?Z.vsCheck:Z.vsClose,children:"DH ICONS"}),e.jsxs("small",{children:["(",d.length," icon",d.length===1?"":"s",")"]})]}),e.jsxs("div",{className:"icons",children:[d,d.length===0&&e.jsx("p",{className:"no-result",children:"No icons found."}),e.jsx(Ir,{message:n})]})]})})]})}const De=[{title:"Title 1",value:"Value 1"},{title:"Title 2",value:"Value 2"},{title:"Title 3",value:"Value 3"},{title:"Title 4",value:"Value 4"},{title:"Title 5",value:"Value 5"},{title:"Title 6",value:"Value 6"},{title:"Title 7",value:"Value 7"},{title:"Title 8",value:"Value 8"},{title:"Title 9",value:"Value 9"},{title:"Title 9",value:"Value 9"},{title:"Title 10",value:"Value 10"},{title:"Title 11",value:"Value 11"},{title:"Title 12",value:"Value 12"}],_t=[{title:"1 minute",value:1*60*1e3},{title:"5 minutes",value:5*60*1e3},{title:"20 minutes",value:20*60*1e3},{title:"45 minutes",value:45*60*1e3},{title:"1 hour",value:1*60*60*1e3},{title:"4 hours",value:4*60*60*1e3}];function Bt(){const[a,r]=u.useState(!1),[o,t]=u.useState(""),[l,s]=u.useState(!0),[n,i]=u.useState(!1),[d,h]=u.useState(!1),[c,g]=u.useState(!1),[m,v]=u.useState(null),[b,y]=u.useState("1"),[O,ae]=u.useState(),[V,q]=u.useState("-DLiveTableMonitor.updateThreads=8 -DLiveTableMonitor.printDependencyInformation=false -Dassertion.heapDump=true -Drequire.heapDump=true -Dassertion.heapDump=true -Drequire.heapDump=true"),be=u.useCallback(U=>{y(U.target.value)},[]),ue=u.useCallback(()=>{r(!a)},[a]),Mr=u.useCallback(U=>{t(U.target.value)},[]);return e.jsxs("div",{...p("inputs",["style-guide-inputs"]),children:[e.jsx("h2",{className:"ui-title",children:"Inputs"}),e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col",children:e.jsxs("form",{children:[e.jsxs("div",{className:"form-group",children:[e.jsxs("label",{htmlFor:"exampleInput1",children:["Input Label",e.jsx("input",{type:"text",className:"form-control",id:"exampleInput1","aria-describedby":"emailHelp",placeholder:"Input Placeholder"})]}),e.jsx("small",{className:"form-text text-muted",children:"Help text for a form imput"})]}),e.jsxs("div",{className:"form-group",children:[e.jsxs("label",{htmlFor:"exampleInput2",children:["Input Label",e.jsx("input",{type:"text",className:"form-control",id:"exampleInput2","aria-describedby":"emailHelp",placeholder:"Input Disabled",disabled:!0})]}),e.jsx("small",{className:"form-text text-muted",children:"Disabled input"})]}),e.jsx("div",{className:"form-group",children:e.jsxs("label",{htmlFor:"exampleInputPassword1",children:["Password",e.jsx("input",{type:"password",className:"form-control",id:"exampleInputPassword1",placeholder:"Password",defaultValue:"123456789"})]})}),e.jsx("div",{className:"form-group",children:e.jsx(xo,{value:o,placeholder:"Search Input",onChange:Mr})})]})}),e.jsx("div",{className:"col",children:e.jsxs("form",{children:[e.jsx("h5",{children:" Checkboxes "}),e.jsx(L,{className:"form-group",checked:l,onChange:()=>s(!l),children:"Checked checkbox"}),e.jsx(L,{className:"form-group",checked:n,onChange:()=>i(!n),children:"Unchecked checkbox"}),e.jsx(L,{className:"form-group",disabled:!0,checked:null,children:"Disabled checkbox"}),e.jsx(L,{className:"form-group",isInvalid:!0,checked:d,onChange:()=>h(!d),children:"Invalid checkbox"}),e.jsx(L,{className:"form-group",checked:c,onChange:()=>g(!c),children:"Add radio button"}),e.jsx(L,{className:"form-group",checked:m,onChange:()=>{m==null?v(!0):v(m?!1:null)},children:"Indeterminate Cycle"})]})}),e.jsxs("div",{className:"col",children:[e.jsxs("form",{children:[e.jsx("h5",{children:" Radios "}),e.jsxs(Tr,{onChange:be,value:b,children:[e.jsx(F,{value:"1",children:"Toggle this custom radio"}),e.jsx(F,{value:"2",children:"Or toggle this other custom radio"}),e.jsx(F,{value:"3",disabled:!0,children:"Disabled radio"}),e.jsx(F,{value:"4",isInvalid:!0,children:"Invalid radio"}),e.jsx(e.Fragment,{children:c&&e.jsx(F,{value:"5",children:"Extra radio item"})})]})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Toggle Buttons"}),e.jsxs("div",{className:"form-inline justify-content-between",children:[e.jsx("label",{children:String(a)}),e.jsx(ge,{on:a,onClick:ue})]}),e.jsxs("div",{className:"form-inline justify-content-between",children:[e.jsx("label",{children:String(!a)}),e.jsx(ge,{on:!a,onClick:ue})]}),e.jsxs("div",{className:"form-inline justify-content-between",children:[e.jsx("label",{className:"isInvalid",children:"isInvalid"}),e.jsx(ge,{on:!a,isInvalid:!0,onClick:ue})]}),e.jsxs("div",{className:"form-inline justify-content-between",children:[e.jsx("label",{className:"disabled",children:"disabled"}),e.jsx(ge,{on:!a,disabled:!0,onClick:ue})]})]})]}),e.jsxs("div",{className:"col",children:[e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Selection Menu"}),e.jsxs(Fe,{onChange:U=>{},defaultValue:"0",className:"custom-select",children:[e.jsx(_,{disabled:!0,value:"0",children:"Custom Selection"}),e.jsx(_,{value:"1",children:"One"}),e.jsx(_,{value:"2",children:"Two"}),e.jsx(_,{value:"3",children:"Three"})]})]}),e.jsx("div",{className:"form-group",children:e.jsxs(Fe,{onChange:U=>{},defaultValue:"0",className:"custom-select",disabled:!0,children:[e.jsx(_,{disabled:!0,value:"0",children:"Custom Selection"}),e.jsx(_,{value:"1",children:"One"}),e.jsx(_,{value:"2",children:"Two"}),e.jsx(_,{value:"3",children:"Three"})]})}),e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Input with Select"}),e.jsx("div",{className:"input-group",children:e.jsx(Oe,{options:De,inputPlaceholder:"10.128.0.8",searchPlaceholder:"Search actions here"})}),e.jsx("br",{}),e.jsx("div",{className:"input-group",children:e.jsx(Oe,{options:De,inputPlaceholder:"10.128.0.8",searchPlaceholder:"Search actions here",disabled:!0})})]}),e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"AutoCompleteInput"}),e.jsx(To,{options:De,noMatchText:"No Matches."})]})]}),e.jsx("div",{className:"col",children:e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Time Input"}),e.jsx(ko,{}),e.jsx("br",{}),e.jsx("h5",{children:"Date Input"}),e.jsx(No,{}),e.jsx("br",{}),e.jsx("h5",{children:"DateTime Input"}),e.jsx(Ro,{}),e.jsx("br",{}),e.jsx("h5",{children:"Custom Timeselect"}),e.jsx(Do,{options:_t,value:O??null,onChange:ae,customText:"Custom Timeout",placeholder:"Select a timeout",timeToValue:U=>U*1e3})]})})]}),e.jsx("div",{className:"row",children:e.jsx("div",{className:"col",children:e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Auto Resize Textarea"}),e.jsx(Eo,{value:V,delimiter:" -",onChange:q})]})})})]})}class Ft extends u.PureComponent{constructor(r){super(r),this.handleSelect=this.handleSelect.bind(this),this.handleViewportChange=this.handleViewportChange.bind(this),this.selectedItems=[],this.state={items:[],offset:0,itemCount:5e5}}handleSelect(r){const o=this.selectedItems.indexOf(r);o>=0?this.selectedItems.splice(o,1):this.selectedItems.push(r);const t=o<0,{offset:l}=this.state;let{items:s}=this.state;s=[].concat(s);const n=r-l;n>=0&&n<s.length&&(s[n].isSelected=t),this.setState({items:s})}handleViewportChange(r,o){const{itemCount:t}=this.state,l=o-r+1,s=Math.max(0,r-l),n=Math.min(o+l,t),i=[];for(let h=s;h<=n&&h<=t;h+=1){const c=`Item ${h}`,g=this.selectedItems.indexOf(h)>=0;i.push({value:c,isSelected:g})}const d=s;this.setState({offset:d,items:i})}render(){const{offset:r,items:o,itemCount:t}=this.state;return e.jsx(Po,{itemCount:t,items:o,offset:r,onSelect:this.handleSelect,onViewportChange:this.handleViewportChange})}}class mr extends u.PureComponent{static defaultProps;static propTypes;constructor(r){super(r),this.handleSelect=this.handleSelect.bind(this),this.handleViewportChange=this.handleViewportChange.bind(this),this.selectedItems=[],this.state={items:[],offset:0,itemCount:5e5}}handleSelect(r){const{itemCount:o}=this.state;console.log("Item selected at index",r,"/",o)}handleViewportChange(r,o){const{itemCount:t}=this.state,l=o-r+1,s=Math.max(0,r-l),n=Math.min(o+l,t),i=[];for(let h=s;h<=n;h+=1){const c=`Item ${h}`,g=this.selectedItems.indexOf(h)>=0;i.push({value:c,isSelected:g})}const d=s;this.setState({offset:d,items:i})}render(){const{isMultiSelect:r}=this.props,{offset:o,items:t,itemCount:l}=this.state;return e.jsx(po,{isMultiSelect:r,itemCount:l,items:t,offset:o,onSelect:this.handleSelect,onViewportChange:this.handleViewportChange})}}function Ot(){return e.jsxs("div",{...p("item-list-inputs",["style-guide-inputs"]),children:[e.jsx("h2",{className:"ui-title",children:"Item Lists"}),e.jsxs("div",{className:"row",children:[e.jsx("div",{className:"col",children:e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Select List"}),e.jsx("div",{style:{height:"300px"},children:e.jsx(Ft,{})})]})}),e.jsx("div",{className:"col",children:e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Item List"}),e.jsx("div",{style:{height:"300px"},children:e.jsx(mr,{})})]})}),e.jsx("div",{className:"col",children:e.jsxs("div",{className:"form-group",children:[e.jsx("h5",{children:"Multi Select Item List"}),e.jsx("div",{style:{height:"300px"},children:e.jsx(mr,{isMultiSelect:!0})})]})})]})]})}function Vt(){const[a,r]=u.useState(0),[o,t]=u.useState(!0),l=()=>{r(0)};function s(n){return e.jsxs(he.Fragment,{children:[e.jsxs(x,{kind:"primary",style:{marginBottom:"1rem",marginRight:"1rem"},onClick:()=>{r(n)},children:[n," ",n>1?"Actions":"Action"]}),e.jsx(fo,{isOpen:a===n,headerText:"Header Text",bodyText:"This is where the body text goes",onConfirm:l,onCancel:n>=2?l:void 0,onDiscard:n>=3?l:void 0})]},n)}return e.jsxs("div",{...p("modals"),children:[e.jsx("h2",{className:"ui-title",children:"Basic Modals"}),e.jsx("div",{style:{padding:"1rem"},children:[1,2,3].map(n=>s(n))}),e.jsx("h2",{className:"ui-title",children:"Custom Modal"}),e.jsx("div",{style:{padding:"1rem"},children:e.jsx("div",{className:"modal-dialog",role:"dialog",children:e.jsxs("div",{className:"modal-content",children:[e.jsxs("div",{className:"modal-header",children:[e.jsx("h5",{className:"modal-title",children:"Modal title"}),e.jsx("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close",children:e.jsx("span",{"aria-hidden":"true",children:"×"})})]}),e.jsxs("div",{className:"modal-body",children:[e.jsx("p",{children:"Modal body text goes here."}),e.jsx(L,{checked:o,onChange:()=>t(!o),children:"Checked checkbox"})]}),e.jsxs("div",{className:"modal-footer",children:[e.jsx(x,{kind:"secondary","data-dismiss":"modal",onClick:()=>{},children:"Close"}),e.jsx(x,{kind:"primary",onClick:()=>{},children:"Save changes"})]})]})})})]})}function Ut(){return e.jsxs("div",{...p("progress"),children:[e.jsx("h2",{className:"ui-title",children:"Progress"}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[e.jsx("h5",{children:"Determinate Progress Loader"}),e.jsx("br",{}),e.jsx("div",{className:"progress",style:{marginBottom:"1rem"},children:e.jsx("div",{className:"progress-bar bg-primary",style:{width:"25%"},"aria-valuenow":25,"aria-valuemin":0,"aria-valuemax":100})})]}),e.jsxs("div",{className:"col",children:[e.jsx("h5",{children:"Indeterminate Progress Spinner"}),e.jsx(Be,{className:"loading-spinner-large"})]}),e.jsxs("div",{className:"col",children:[e.jsx("h5",{children:"Button Progress Spinner"}),e.jsx(x,{kind:"primary",className:"btn-spinner btn-cancelable",style:{minWidth:"10rem"},onClick:()=>{},children:e.jsxs("span",{children:[e.jsx(Be,{className:"mr-2 loading-spinner-vertical-align"}),e.jsx("span",{className:"btn-normal-content",children:"Connecting"}),e.jsx("span",{className:"btn-hover-content",children:"Cancel"})]})})]})]})]})}class Gt extends u.PureComponent{constructor(r){super(r),this.handleSliderChange=this.handleSliderChange.bind(this),this.state={initialStartTime:24*60*60*.25,initialEndTime:24*60*60*.75,startTime:24*60*60*.25,endTime:24*60*60*.75}}handleSliderChange(r){const{startTime:o,endTime:t}=r;this.setState({startTime:o}),this.setState({endTime:t})}render(){const{startTime:r,endTime:o,initialStartTime:t,initialEndTime:l}=this.state,s=r!==t,n=o!==l;return e.jsxs("div",{...p("time-slider-inputs",["style-guide-inputs"]),children:[e.jsx("h2",{className:"ui-title",children:"Time Slider"}),e.jsx(Io,{startTime:r,endTime:o,isStartModified:s,isEndModified:n,onChange:this.handleSliderChange}),e.jsxs("p",{style:s?{color:"var(--dh-color-modified)"}:{},children:["StartTime: ",tr.formatTime(r)]}),e.jsxs("p",{style:n?{color:"var(--dh-color-modified)"}:{},children:["EndTime: ",tr.formatTime(o)]})]})}}function Ht(){const r=[ze,He].map(o=>e.jsx(S,{icon:o},`${o.prefix}-${o.iconName}`));return e.jsxs("div",{...p("tooltips"),children:[e.jsx("h2",{className:"ui-title",title:"Make better looking tooltips than this one!",children:"Tooltips"}),e.jsxs("div",{className:"btn btn-primary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},children:["Simple Tooltip",e.jsx(re,{children:"Text only content"})]}),e.jsxs("div",{className:"btn btn-secondary",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},children:["Complex Tooltip",e.jsxs(re,{children:[e.jsxs("div",{children:["Here is some ",e.jsx("i",{children:"cool"})," ",e.jsx("b",{children:"text"})]}),e.jsx("hr",{}),e.jsx("div",{children:"And some icons down here"}),e.jsxs("div",{children:[e.jsx(Be,{className:"loading-spinner-vertical-align"}),r]})]})]}),e.jsxs("div",{className:"btn btn-success",style:{cursor:"default",marginBottom:"1rem",marginRight:"1rem"},children:["Interactive Tooltip",e.jsxs(re,{interactive:!0,children:[e.jsx("div",{children:"This tooltip is interactive."}),e.jsx("hr",{}),e.jsx(x,{kind:"primary",onClick:()=>{alert("Button clicked!")},children:"Show Alert"})]})]})]})}function zt(){return e.jsxs("div",{...p("typography"),children:[e.jsx("h2",{className:"ui-title",children:"Typography"}),e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col",children:[e.jsx("h1",{className:"text-muted","data-no-menu":!0,children:"h1. Unused"}),e.jsx("h2",{className:"text-muted","data-no-menu":!0,children:"h2. Unused"}),e.jsx("h3",{className:"text-muted","data-no-menu":!0,children:"h3. Unused"}),e.jsx("h4",{"data-no-menu":!0,children:"h4. Standard Heading"}),e.jsx("h5",{"data-no-menu":!0,children:"h5. Small Heading"}),e.jsx("h6",{className:"text-muted","data-no-menu":!0,children:"h6. Unused"})]}),e.jsxs("div",{className:"col",children:[e.jsx("h4",{children:"Fonts"}),e.jsx("p",{children:"UI: Fira Sans;"}),e.jsx("p",{className:"text-monospace",children:"Code: Fira Mono;"}),e.jsx("p",{children:'Tables: Fira Sans; font-feature-settings: "tnum";'}),e.jsx("p",{children:"Default font-size: 14px = 1rem"})]})]})]})}class Wt extends u.PureComponent{static propTypes;static defaultProps;constructor(r){super(r),this.handleSelectionChange=this.handleSelectionChange.bind(this),this.handleViewportChange=this.handleViewportChange.bind(this),this.itemList=he.createRef(),this.selectedItems=[],this.state={topRow:null,bottomRow:null}}focusItem(r){this.itemList.current&&this.itemList.current.focusItem(r)}handleSelectionChange(r){console.log("Selection changed",r);const{onSelectionChange:o}=this.props;o(r)}handleViewportChange(r,o){const{items:t}=this.props,l=o-r+1,s=Math.max(0,r-l),n=Math.min(o+l,t.length);this.setState({topRow:s,bottomRow:n})}getViewportItems=jr((r,o,t)=>r==null||o==null?[]:t.slice(r,o));render(){const{draggablePrefix:r,droppableId:o,isDragDisabled:t,isDropDisabled:l,isMultiSelect:s,items:n,selectedRanges:i}=this.props,{topRow:d,bottomRow:h}=this.state;return e.jsx(ie,{draggablePrefix:r,droppableId:o,isDragDisabled:t,isDropDisabled:l,isMultiSelect:s,itemCount:n.length,items:this.getViewportItems(d,h,n),offset:d??0,onSelectionChange:this.handleSelectionChange,onViewportChange:this.handleViewportChange,ref:this.itemList,selectedRanges:i})}}const Ee=["Draggable Only","Drag and Drop","Droppable Only"],qt=[{isDropDisabled:!0},{},{isDragDisabled:!0}],Kt=(a="Item",r=1e3)=>{const o=[];for(let t=0;t<r;t+=1)o.push(`${a}-${t}`);return o};class pe extends u.Component{static handleDragStart(r){console.log("handleDragStart",r)}static handleDragUpdate(r){console.log("handleDragUpdate",r)}constructor(r){super(r),this.handleDragEnd=this.handleDragEnd.bind(this),this.animationFrame=null;const o=[],t=[],l=[];for(let s=0;s<Ee.length;s+=1)o[s]=Kt(Ee[s]),t[s]=[],l[s]=he.createRef();this.state={items:o,lists:l,selectedRanges:t}}componentWillUnmount(){this.animationFrame!=null&&cancelAnimationFrame(this.animationFrame)}handleDragEnd(r){console.log("handleDragEnd",r);const{source:o,destination:t}=r;if(o==null||t==null)return;const l=ie.getDraggableIndex(o.droppableId),s=ie.getDraggableIndex(t.droppableId),n=l===s;let i=t.index;n&&o.index<t.index&&(i+=1);let d=i;this.setState(({items:h,selectedRanges:c})=>{const g=[...h[l]],m=n?g:[...h[s]],v=nr.reorder(g,c[l],m,i),b=[...h];b[l]=g,b[s]=m,d=n?nr.adjustDestinationIndex(i,c[s]):i;const y=[...c];return y[l]=[],y[s]=[[d,d+v.length-1]],{items:b,selectedRanges:y}},()=>{this.animationFrame!=null&&cancelAnimationFrame(this.animationFrame),this.animationFrame=requestAnimationFrame(()=>{this.animationFrame=null;const{lists:h}=this.state;h[s]?.current?.focusItem(d)})})}handleSelectionChange(r,o){this.setState(({selectedRanges:t})=>{const l=[...t];return l[r]=[...o],{selectedRanges:l}})}getSelectionChangeHandler=Ye(r=>this.handleSelectionChange.bind(this,r));getDraggableList=Ye((r,o,t,l)=>e.jsx(Wt,{items:r,droppableId:ie.getDraggableId("drop-list",l),draggablePrefix:ie.getDraggableId("draggable-item",l),onSelectionChange:this.getSelectionChangeHandler(l),isMultiSelect:!0,ref:t,selectedRanges:o,...qt[l]}));render(){const{items:r,lists:o,selectedRanges:t}=this.state;return e.jsxs("div",{...p("draggable-lists",["style-guide-inputs"]),children:[e.jsx("h2",{className:"ui-title",children:"Drag and Drop Lists"}),e.jsx("div",{className:"row",children:e.jsx(Rr,{onDragStart:pe.handleDragStart,onDragUpdate:pe.handleDragUpdate,onDragEnd:this.handleDragEnd,children:Ee.map((l,s)=>e.jsx("div",{className:"col",children:e.jsxs("div",{className:"form-group",children:[e.jsxs("h5",{children:[l," List"]}),e.jsx("div",{style:{height:"300px"},children:this.getDraggableList(r[s],t[s],o[s],s)})]})},l))})})]})}}function vr({count:a=5,activeKey:r=""}){const[o,t]=u.useState(r),[l,s]=u.useState(()=>{const c=[];for(let g=0;g<a;g+=1)c.push({key:`${g}`,title:`Tab ${g}`,isClosable:g>0});return c}),n=u.useCallback((c,g)=>{s(m=>{const v=[...m],[b]=v.splice(c,1);return v.splice(g,0,b),v})},[]),i=u.useCallback(c=>{t(c)},[]),d=u.useCallback(c=>{s(g=>g.filter(m=>m.key!==c))},[]),h=u.useCallback(c=>[{title:"Select Tab to the Left",group:10,order:10,disabled:l[0].key===c.key,action:()=>{const g=l.findIndex(m=>m.key===c.key);g>0&&t(l[g-1].key)}},{title:"Select Tab to the Right",group:30,order:10,disabled:l[l.length-1].key===c.key,action:()=>{const g=l.findIndex(m=>m.key===c.key);g<l.length-1&&t(l[g+1].key)}}],[l]);return e.jsx(Fo,{tabs:l,activeKey:o,onSelect:i,onReorder:n,onClose:d,makeContextActions:h})}let xr=0;function Yt(){const a=xr;return xr+=1,a}const Zt=Er(25);function Ie(a=1,r=5){const o=Number(Zt.next().value);return Math.floor(o*r)+a}function $e(a,r=Yt()){return{id:r,type:a}}function pr(a=Ie(),r=Ie(),o=Ie()){const t=[];for(let l=0;l<a;l+=1)t.push($e("SUBMENU"));for(let l=0;l<r;l+=1)t.push($e("PAGE"));for(let l=0;l<o;l+=1)t.push($e("SWITCH"));return t}function Ae({type:a,id:r}){switch(a){case"SUBMENU":return`Submenu ${r}`;case"PAGE":return`Page ${r}`;case"SWITCH":return`Switch ${r}`}}function Xt({type:a}){switch(a){case"SUBMENU":return lo;case"PAGE":return ao;case"SWITCH":return H}}function Qt(){const[a,r]=u.useState([]),[o,t]=u.useState(new Map),l=u.useCallback(c=>{r([...a,c])},[a,r]),s=u.useCallback(()=>{const c=[...a];c.pop(),r(c)},[a,r]),n=u.useCallback(()=>{const c=[a[0]];r(c)},[a,r]),i=u.useCallback(c=>{const g=o.get(c)??!1,m=new Map(o);m.set(c,!g),t(m)},[o,t]),d=u.useCallback(c=>{const g=a[a.length-1],{items:m}=g;if(!m)throw new Error("Navigation handleSelect triggered without items to select");const v=m[c];switch(v.type){case"PAGE":l({title:Ae(v)});break;case"SUBMENU":l({title:Ae(v),items:pr()});break;case"SWITCH":i(v.id);break}},[a,i,l]);u.useEffect(function(){r([{title:"Navigation Menu",items:pr()}])},[]);const h=u.useMemo(()=>a.map(({items:c,title:g},m)=>{if(!c)return e.jsx(sr,{onBack:s,onClose:n,title:g,children:e.jsx("div",{children:"Page content!"})},g);let v=null;if(c!=null){const b=c.map(y=>{const O=Ae(y),ae=Xt(y);let V,q;return y.type==="SWITCH"&&(V=o.get(y.id)??!1,q=()=>{d(y.id)}),{title:O,icon:ae,isOn:V,onChange:q}});v=e.jsx(_o,{onSelect:d,items:b})}else v=e.jsx("div",{children:"Page content"});return e.jsx(sr,{onBack:m>0?s:void 0,onClose:m>0?n:void 0,title:g,children:v},g)}),[a,o,d,s,n]);return e.jsxs("div",{...p("navigations"),children:[e.jsx("h2",{className:"ui-title",children:"Navigations"}),e.jsx("div",{style:{marginBottom:"1rem"},children:e.jsx(vr,{count:100,activeKey:"15"})}),e.jsx("div",{style:{marginBottom:"1rem"},children:e.jsx(vr,{})}),e.jsx("div",{className:"navigations",children:e.jsx(Lo,{children:h})})]})}const Jt=`:root{--dh-color-gray-50: #1a171a;--dh-color-gray-75: #211f22;--dh-color-gray-100: #2d2a2e;--dh-color-gray-200: #322f33;--dh-color-gray-300: #373438;--dh-color-gray-400: #403e41;--dh-color-gray-500: #5b5a5c;--dh-color-gray-600: #929192;--dh-color-gray-700: #c0bfbf;--dh-color-gray-800: #f0f0ee;--dh-color-gray-900: #fcfcfa;--dh-color-gray-light: var(--dh-color-gray-900);--dh-color-gray-mid: var(--dh-color-gray-600);--dh-color-gray-dark: var(--dh-color-gray-300);--dh-color-black: var(--dh-color-gray-50);--dh-color-white: var(--dh-color-gray-800);--dh-color-true-black: #000000;--dh-color-true-white: #ffffff;--dh-color-red-100: #471521;--dh-color-red-200: #5d1b2b;--dh-color-red-300: #762336;--dh-color-red-400: #912b45;--dh-color-red-500: #ab3452;--dh-color-red-600: #c73f61;--dh-color-red-700: #e14c71;--dh-color-red-800: #f85e85;--dh-color-red-900: #ff7b9e;--dh-color-red-1000: #ff99b6;--dh-color-red-1100: #ffb4c9;--dh-color-red-1200: #ffcbd9;--dh-color-red-1300: #ffdee7;--dh-color-red-1400: #ffecf1;--dh-color-orange-100: #471800;--dh-color-orange-200: #5a2202;--dh-color-orange-300: #702f06;--dh-color-orange-400: #87390c;--dh-color-orange-500: #9f4612;--dh-color-orange-600: #b7541b;--dh-color-orange-700: #d06425;--dh-color-orange-800: #e67533;--dh-color-orange-900: #fa8648;--dh-color-orange-1000: #ffa069;--dh-color-orange-1100: #ffb98d;--dh-color-orange-1200: #ffcfaf;--dh-color-orange-1300: #ffe0cb;--dh-color-orange-1400: #ffeee2;--dh-color-yellow-100: #2e2700;--dh-color-yellow-200: #3d3300;--dh-color-yellow-300: #4d4100;--dh-color-yellow-400: #5f5005;--dh-color-yellow-500: #725f0b;--dh-color-yellow-600: #856e13;--dh-color-yellow-700: #9a811b;--dh-color-yellow-800: #ae9024;--dh-color-yellow-900: #c3a32f;--dh-color-yellow-1000: #d7b53a;--dh-color-yellow-1100: #eac448;--dh-color-yellow-1200: #fad459;--dh-color-yellow-1300: #ffe77a;--dh-color-yellow-1400: #fff3ac;--dh-color-chartreuse-100: #1f2b00;--dh-color-chartreuse-200: #2b3805;--dh-color-chartreuse-300: #39470b;--dh-color-chartreuse-400: #495611;--dh-color-chartreuse-500: #596718;--dh-color-chartreuse-600: #69781f;--dh-color-chartreuse-700: #7a8927;--dh-color-chartreuse-800: #8e9c30;--dh-color-chartreuse-900: #a1ae3a;--dh-color-chartreuse-1000: #b2c046;--dh-color-chartreuse-1100: #c2d153;--dh-color-chartreuse-1200: #d5e166;--dh-color-chartreuse-1300: #e3ee84;--dh-color-chartreuse-1400: #f0f7ae;--dh-color-celery-100: #122d15;--dh-color-celery-200: #173a1a;--dh-color-celery-300: #1e4b22;--dh-color-celery-400: #255c2a;--dh-color-celery-500: #2d6d32;--dh-color-celery-600: #36803d;--dh-color-celery-700: #409347;--dh-color-celery-800: #4da654;--dh-color-celery-900: #5fb967;--dh-color-celery-1000: #77ca7e;--dh-color-celery-1100: #93d999;--dh-color-celery-1200: #b2e5b7;--dh-color-celery-1300: #ceeed1;--dh-color-celery-1400: #e4f6e6;--dh-color-green-100: #22291d;--dh-color-green-200: #2d3625;--dh-color-green-300: #38462d;--dh-color-green-400: #445636;--dh-color-green-500: #50673d;--dh-color-green-600: #5b7a45;--dh-color-green-700: #678c4c;--dh-color-green-800: #74a053;--dh-color-green-900: #81b45a;--dh-color-green-1000: #8ec762;--dh-color-green-1100: #9bd96c;--dh-color-green-1200: #ace97e;--dh-color-green-1300: #c3f59d;--dh-color-green-1400: #dcfbc2;--dh-color-seafoam-100: #1f2925;--dh-color-seafoam-200: #263630;--dh-color-seafoam-300: #2f463e;--dh-color-seafoam-400: #37574b;--dh-color-seafoam-500: #3e6959;--dh-color-seafoam-600: #447b68;--dh-color-seafoam-700: #488f79;--dh-color-seafoam-800: #4ca388;--dh-color-seafoam-900: #4fb798;--dh-color-seafoam-1000: #54cba5;--dh-color-seafoam-1100: #5edeb8;--dh-color-seafoam-1200: #78edc8;--dh-color-seafoam-1300: #9ef8d7;--dh-color-seafoam-1400: #cbfce8;--dh-color-cyan-100: #142b2d;--dh-color-cyan-200: #1a373a;--dh-color-cyan-300: #21474b;--dh-color-cyan-400: #29585c;--dh-color-cyan-500: #31696e;--dh-color-cyan-600: #3a7a81;--dh-color-cyan-700: #438d94;--dh-color-cyan-800: #4da0a8;--dh-color-cyan-900: #59b4bc;--dh-color-cyan-1000: #65c6cf;--dh-color-cyan-1100: #74d6e1;--dh-color-cyan-1200: #88e6f1;--dh-color-cyan-1300: #a4f2fb;--dh-color-cyan-1400: #cafaff;--dh-color-blue-100: #112451;--dh-color-blue-200: #16306c;--dh-color-blue-300: #1d3d88;--dh-color-blue-400: #254ba4;--dh-color-blue-500: #2f5bc0;--dh-color-blue-600: #3b6bda;--dh-color-blue-700: #4c7dee;--dh-color-blue-800: #6390fa;--dh-color-blue-900: #7ca3ff;--dh-color-blue-1000: #97b6ff;--dh-color-blue-1100: #afc8ff;--dh-color-blue-1200: #c7d9ff;--dh-color-blue-1300: #dbe6ff;--dh-color-blue-1400: #ecf1ff;--dh-color-indigo-100: #1a1e62;--dh-color-indigo-200: #252a75;--dh-color-indigo-300: #32388a;--dh-color-indigo-400: #40489f;--dh-color-indigo-500: #4f58b4;--dh-color-indigo-600: #5f68c8;--dh-color-indigo-700: #707bdb;--dh-color-indigo-800: #828ded;--dh-color-indigo-900: #959ffa;--dh-color-indigo-1000: #aab2ff;--dh-color-indigo-1100: #bec5ff;--dh-color-indigo-1200: #d2d6ff;--dh-color-indigo-1300: #e1e5ff;--dh-color-indigo-1400: #eff0ff;--dh-color-purple-100: #311067;--dh-color-purple-200: #3d1f79;--dh-color-purple-300: #4b2f8c;--dh-color-purple-400: #5a3f9f;--dh-color-purple-500: #6850b1;--dh-color-purple-600: #7861c3;--dh-color-purple-700: #8873d5;--dh-color-purple-800: #9887e5;--dh-color-purple-900: #a99af3;--dh-color-purple-1000: #b9aefb;--dh-color-purple-1100: #cac1fe;--dh-color-purple-1200: #dad3ff;--dh-color-purple-1300: #e8e3ff;--dh-color-purple-1400: #f4effe;--dh-color-fuchsia-100: #450f44;--dh-color-fuchsia-200: #551a55;--dh-color-fuchsia-300: #662969;--dh-color-fuchsia-400: #77377e;--dh-color-fuchsia-500: #884794;--dh-color-fuchsia-600: #9858aa;--dh-color-fuchsia-700: #a76bbf;--dh-color-fuchsia-800: #b67ed4;--dh-color-fuchsia-900: #c592e5;--dh-color-fuchsia-1000: #d2a7f0;--dh-color-fuchsia-1100: #debcf6;--dh-color-fuchsia-1200: #e9cff9;--dh-color-fuchsia-1300: #f2e0fb;--dh-color-fuchsia-1400: #f9edfc;--dh-color-magenta-100: #520427;--dh-color-magenta-200: #641034;--dh-color-magenta-300: #791e45;--dh-color-magenta-400: #8d2d57;--dh-color-magenta-500: #a13c69;--dh-color-magenta-600: #b54c7d;--dh-color-magenta-700: #ca5d93;--dh-color-magenta-800: #dc70a8;--dh-color-magenta-900: #ee83ba;--dh-color-magenta-1000: #fb99cd;--dh-color-magenta-1100: #ffb1dc;--dh-color-magenta-1200: #ffc9e7;--dh-color-magenta-1300: #ffddf0;--dh-color-magenta-1400: #ffecf6}
|
|
206
206
|
`,ea=`:root{--dh-color-bg: var(--dh-color-black);--dh-color-content-bg: var(--dh-color-gray-100);--dh-color-subdued-content-bg: var(--dh-color-gray-75);--dh-color-surface-bg: var(--dh-color-gray-200);--dh-color-fg: var(--dh-color-white);--dh-color-border: var(--dh-color-gray-500);--dh-color-hover-border: var(--dh-color-gray-600);--dh-color-border-focus: var(--dh-color-accent-800);--dh-color-disabled-bg: var(--dh-color-gray-300);--dh-color-scrollbar: var(--dh-color-fg);--dh-color-heading-text: var(--dh-color-gray-900);--dh-color-text: var(--dh-color-gray-800);--dh-color-text-disabled: var(--dh-color-gray-600);--dh-color-text-highlight: color-mix( in srgb, var(--dh-color-blue-700) 30%, transparent );--dh-color-text-hover: var(--dh-color-gray-900);--dh-color-contrast-dark: var(--dh-color-gray-50);--dh-color-contrast-light: var(--dh-color-gray-900);--dh-color-accent-100: var(--dh-color-blue-100);--dh-color-accent-200: var(--dh-color-blue-200);--dh-color-accent-300: var(--dh-color-blue-300);--dh-color-accent-400: var(--dh-color-blue-400);--dh-color-accent-500: var(--dh-color-blue-500);--dh-color-accent-600: var(--dh-color-blue-600);--dh-color-accent-700: var(--dh-color-blue-700);--dh-color-accent-800: var(--dh-color-blue-800);--dh-color-accent-900: var(--dh-color-blue-900);--dh-color-accent-1000: var(--dh-color-blue-1000);--dh-color-accent-1100: var(--dh-color-blue-1100);--dh-color-accent-1200: var(--dh-color-blue-1200);--dh-color-accent-1300: var(--dh-color-blue-1300);--dh-color-accent-1400: var(--dh-color-blue-1400);--dh-color-accent: var(--dh-color-accent-600);--dh-color-accent-bg: var(--dh-color-accent);--dh-color-accent-hover-bg: var(--dh-color-accent-500);--dh-color-accent-down-bg: var(--dh-color-accent-400);--dh-color-accent-key-focus-bg: var(--dh-color-accent-500);--dh-color-accent-contrast: var(--dh-color-contrast-light);--dh-color-gray-bg: var(--dh-color-gray-700);--dh-color-red-bg: var(--dh-color-red-700);--dh-color-orange-bg: var(--dh-color-orange-800);--dh-color-yellow-bg: var(--dh-color-yellow-1000);--dh-color-chartreuse-bg: var(--dh-color-chartreuse-900);--dh-color-celery-bg: var(--dh-color-celery-800);--dh-color-green-bg: var(--dh-color-green-700);--dh-color-seafoam-bg: var(--dh-color-seafoam-700);--dh-color-cyan-bg: var(--dh-color-cyan-700);--dh-color-blue-bg: var(--dh-color-blue-700);--dh-color-indigo-bg: var(--dh-color-indigo-700);--dh-color-purple-bg: var(--dh-color-purple-700);--dh-color-fuchsia-bg: var(--dh-color-fuchsia-700);--dh-color-magenta-bg: var(--dh-color-magenta-700);--dh-color-visual-gray: var(--dh-color-gray-600);--dh-color-visual-red: var(--dh-color-red-800);--dh-color-visual-orange: var(--dh-color-orange-900);--dh-color-visual-yellow: var(--dh-color-yellow-1200);--dh-color-visual-chartreuse: var(--dh-color-chartreuse-1100);--dh-color-visual-celery: var(--dh-color-celery-1000);--dh-color-visual-green: var(--dh-color-green-1100);--dh-color-visual-seafoam: var(--dh-color-seafoam-1100);--dh-color-visual-cyan: var(--dh-color-cyan-1100);--dh-color-visual-blue: var(--dh-color-blue-600);--dh-color-visual-indigo: var(--dh-color-indigo-900);--dh-color-visual-purple: var(--dh-color-purple-1100);--dh-color-visual-fuchsia: var(--dh-color-fuchsia-900);--dh-color-visual-magenta: var(--dh-color-magenta-900);--dh-color-visual-positive: var(--dh-color-green-1200);--dh-color-visual-negative: var(--dh-color-red-800);--dh-color-visual-notice: var(--dh-color-yellow-1200);--dh-color-visual-info: var(--dh-color-cyan-1100);--dh-color-focus: var(--dh-color-blue-800);--dh-color-focus-border: var(--dh-color-blue-800);--dh-color-focus-ring: var(--dh-color-focus);--dh-color-highlight-active: color-mix( in srgb, var(--dh-color-visual-gray) 20%, transparent );--dh-color-highlight-hover: color-mix( in srgb, var(--dh-color-visual-gray) 18%, transparent );--dh-color-highlight-invalid: color-mix( in srgb, var(--dh-color-visual-red) 15%, transparent );--dh-color-highlight-selected: color-mix( in srgb, var(--dh-color-accent) 9%, transparent );--dh-color-highlight-selected-hover: color-mix( in srgb, var(--dh-color-accent) 15%, transparent );--dh-color-keyboard-selected-bg: color-mix( in srgb, var(--dh-color-accent) 50%, transparent );--dh-color-dropshadow: color-mix( in srgb, var(--dh-color-true-black) 80%, transparent );--dh-color-overlay-modal-bg: color-mix( in srgb, var(--dh-color-visual-gray) 60%, transparent );--dh-color-overlay-hover-bg: color-mix( in srgb, var(--dh-color-visual-gray) 8%, transparent );--dh-color-negative: var(--dh-color-red-600);--dh-color-negative-bg: var(--dh-color-negative);--dh-color-negative-hover-bg: var(--dh-color-red-500);--dh-color-negative-down-bg: var(--dh-color-red-400);--dh-color-negative-key-focus-bg: var(--dh-color-red-500);--dh-color-negative-contrast: var(--dh-color-contrast-light);--dh-color-neutral: var(--dh-color-gray-500);--dh-color-neutral-bg: var(--dh-color-neutral);--dh-color-neutral-hover-bg: var(--dh-color-gray-300);--dh-color-neutral-down-bg: var(--dh-color-gray-200);--dh-color-neutral-key-focus-bg: var(--dh-color-gray-300);--dh-color-neutral-contrast: var(--dh-color-contrast-light);--dh-color-neutral-subdued-bg: var(--dh-color-gray-400);--dh-color-neutral-subdued-hover-bg: var(--dh-color-gray-300);--dh-color-neutral-subdued-down-bg: var(--dh-color-gray-200);--dh-color-neutral-subdued-key-focus-bg: var(--dh-color-gray-300);--dh-color-positive: var(--dh-color-green-900);--dh-color-positive-bg: var(--dh-color-positive);--dh-color-positive-hover-bg: var(--dh-color-green-800);--dh-color-positive-down-bg: var(--dh-color-green-700);--dh-color-positive-key-focus-bg: var(--dh-color-green-800);--dh-color-positive-contrast: var(--dh-color-contrast-dark);--dh-color-info: var(--dh-color-indigo-900);--dh-color-info-bg: var(--dh-color-info);--dh-color-info-hover-bg: var(--dh-color-indigo-800);--dh-color-info-down-bg: var(--dh-color-indigo-700);--dh-color-info-key-focus-bg: var(--dh-color-indigo-800);--dh-color-info-contrast: var(--dh-color-contrast-dark);--dh-color-notice: var(--dh-color-yellow-1000);--dh-color-notice-bg: var(--dh-color-notice);--dh-color-notice-hover-bg: var(--dh-color-yellow-900);--dh-color-notice-down-bg: var(--dh-color-yellow-800);--dh-color-notice-key-focus-bg: var(--dh-color-yellow-1000);--dh-color-notice-contrast: var(--dh-color-contrast-dark);--dh-color-modified: var(--dh-color-yellow-1300)}
|
|
207
207
|
`,ra=`:root{--dh-color-chart-bg: var(--dh-color-content-bg);--dh-color-chart-plot-bg: var(--dh-color-gray-200);--dh-color-chart-title: var(--dh-color-text);--dh-color-chart-legend-fg: var(--dh-color-text);--dh-color-chart-colorway: var(--dh-color-visual-cyan) var(--dh-color-visual-green) var(--dh-color-visual-yellow) var(--dh-color-visual-purple) var(--dh-color-visual-orange) var(--dh-color-visual-red) var(--dh-color-visual-chartreuse) var(--dh-color-visual-fuchsia) var(--dh-color-visual-seafoam) var(--dh-color-visual-magenta) var(--dh-color-white);--dh-color-chart-grid: var(--dh-color-gray-400);--dh-color-chart-axis-line: var(--dh-color-gray-500);--dh-color-chart-axis-line-zero: var(--dh-color-gray-700);--dh-color-chart-error-band-line: var(--dh-color-green-1400);--dh-color-chart-ohlc-increase: var(--dh-color-visual-green);--dh-color-chart-ohlc-decrease: var(--dh-color-visual-red);--dh-color-plotly-axis-text: var(--dh-color-gray-500);--dh-color-plotly-zoombox: color-mix( in srgb, var(--dh-color-true-black) 50%, transparent );--dh-color-plotly-zoombox-corners-fill: var(--dh-color-white);--dh-color-plotly-zoombox-corners-stroke: var(--dh-color-gray-75);--dh-color-plotly-modebar-btn-active: color-mix( in srgb, var(--dh-color-true-white) 30%, transparent );--dh-color-plotly-modebar-btn-warning: var(--dh-color-visual-orange);--dh-color-plotly-notifier-note-bg: var(--dh-color-gray-500);--dh-color-chart-geo-coastline: var(--dh-color-gray-200);--dh-color-chart-geo-land: var(--dh-color-gray-700);--dh-color-chart-geo-ocean: var(--dh-color-gray-300);--dh-color-chart-geo-lake: var(--dh-color-blue-200);--dh-color-chart-geo-river: var(--dh-color-blue-200)}
|
|
208
208
|
`,oa=`:root{--dh-color-editor-bg: var(--dh-color-content-bg);--dh-color-editor-fg: var(--dh-color-gray-900);--dh-color-editor-error-fg: var(--dh-color-visual-red);--dh-color-editor-line-number-fg: var(--dh-color-gray-600);--dh-color-editor-line-number-active-fg: var(--dh-color-gray-800);--dh-color-editor-line-highlight-bg: var(--dh-color-gray-200);--dh-color-editor-selection-bg: var(--dh-color-text-highlight);--dh-color-editor-inactive-selection-bg: var(--dh-color-gray-300);--dh-color-editor-selection-highlight-bg: var(--dh-color-gray-500);--dh-color-editor-word-highlight-bg: var(--dh-color-gray-500);--dh-color-editor-comment: var(--dh-color-gray-700);--dh-color-editor-delimiter: var(--dh-color-gray-700);--dh-color-editor-identifier-js: var(--dh-color-visual-yellow);--dh-color-editor-identifier-namespace: var(--dh-color-visual-red);--dh-color-editor-identifier: var(--dh-color-gray-900);--dh-color-editor-keyword: var(--dh-color-visual-cyan);--dh-color-editor-number: var(--dh-color-visual-purple);--dh-color-editor-operator: var(--dh-color-visual-red);--dh-color-editor-predefined: var(--dh-color-visual-green);--dh-color-editor-storage: var(--dh-color-visual-red);--dh-color-editor-string-delim: var(--dh-color-gray-700);--dh-color-editor-string: var(--dh-color-visual-yellow);--dh-color-editor-bracket-fg1: var(--dh-color-visual-yellow);--dh-color-editor-bracket-fg2: var(--dh-color-visual-purple);--dh-color-editor-bracket-fg3: var(--dh-color-visual-blue);--dh-color-editor-bracket-fg4: var(--dh-color-visual-yellow);--dh-color-editor-bracket-fg5: var(--dh-color-visual-purple);--dh-color-editor-bracket-fg6: var(--dh-color-visual-blue);--dh-color-editor-unexpected-bracket-fg: var(--dh-color-visual-negative);--dh-color-editor-focus-border: var(--dh-color-focus-border);--dh-color-editor-input-option-active-border: var(--dh-color-focus-ring);--dh-color-editor-input-bg: var(--dh-color-bg);--dh-color-editor-input-fg: var(--dh-color-text);--dh-color-editor-input-border: var(--dh-color-border);--dh-color-editor-context-menu-bg: var(--dh-color-gray-300);--dh-color-editor-context-menu-fg: var(--dh-color-text);--dh-color-editor-menu-selection-bg: var(--dh-color-highlight-hover);--dh-color-editor-menu-selection-fg: var(--dh-color-text);--dh-color-editor-log-date: var(--dh-color-gray-700);--dh-color-editor-log-error: var(--dh-color-visual-red);--dh-color-editor-log-info: var(--dh-color-visual-cyan);--dh-color-editor-log-stdout: var(--dh-color-gray-900);--dh-color-editor-log-warn: var(--dh-color-visual-yellow);--dh-color-editor-log-debug: var(--dh-color-visual-purple);--dh-color-editor-log-trace: var(--dh-color-visual-green);--dh-color-editor-find-bg: var(--dh-color-gray-200);--dh-color-editor-find-match-bg: var(--dh-color-highlight-selected);--dh-color-editor-find-match-highlight-bg: var( --dh-color-highlight-selected-hover );--dh-color-editor-find-option-active-bg: var(--dh-color-accent-700);--dh-color-editor-find-option-active-fg: var(--dh-color-gray-900);--dh-color-editor-suggest-bg: var(--dh-color-gray-200);--dh-color-editor-suggest-border: var(--dh-color-gray-400);--dh-color-editor-suggest-fg: var(--dh-color-text);--dh-color-editor-suggest-selected-bg: var(--dh-color-highlight-selected);--dh-color-editor-suggest-selected-fg: var(--dh-color-text);--dh-color-editor-suggest-highlight-fg: var(--dh-color-accent-700);--dh-color-editor-suggest-focus-highlight-fg: var(--dh-color-accent-700);--dh-color-editor-suggest-hover-bg: var(--dh-color-highlight-hover);--dh-color-editor-link-foreground: var(--dh-color-accent-1000);--dh-color-editor-link-active-fg: var(--dh-color-accent-1100)}
|
|
209
209
|
`,ta=`:root{--dh-color-grid-bg: var(--dh-color-gray-75);--dh-color-grid-header-bg: var(--dh-color-gray-100);--dh-color-grid-header-text: var(--dh-color-heading-text);--dh-color-grid-header-separator: var(--dh-color-gray-50);--dh-color-grid-header-separator-hover: var(--dh-color-gray-600);--dh-color-grid-header-separator-hidden-hover: var(--dh-color-accent-700);--dh-color-grid-header-sort-bar: var(--dh-color-visual-purple);--dh-color-grid-header-reverse-bar: var(--dh-color-visual-green);--dh-color-grid-header-bar-casing: var(--dh-color-gray-50);--dh-color-grid-row-0-bg: var(--dh-color-gray-300);--dh-color-grid-row-1-bg: var(--dh-color-gray-100);--dh-color-grid-row-hover-bg: var(--dh-color-highlight-hover);--dh-color-grid-row-hover-bg-selected: var( --dh-color-highlight-selected-hover );--dh-color-grid-row-shadow-alpha: .15;--dh-color-grid-selection: var(--dh-color-highlight-selected);--dh-color-grid-selection-outline: var(--dh-color-accent-900);--dh-color-grid-selection-outline-casing: var(--dh-color-gray-50);--dh-color-grid-scroll-bar-active-selection-tick: var(--dh-color-accent-400);--dh-color-grid-scroll-bar-bg: var(--dh-color-gray-100);--dh-color-grid-scroll-bar-hover-bg: var(--dh-color-gray-200);--dh-color-grid-scroll-bar-casing: var(--dh-color-gray-400);--dh-color-grid-scroll-bar-corner: var(--dh-color-gray-100);--dh-color-grid-scroll-bar: var(--dh-color-gray-500);--dh-color-grid-scroll-bar-hover: var(--dh-color-gray-600);--dh-color-grid-scroll-bar-active: var(--dh-color-gray-700);--dh-color-grid-text: var(--dh-color-text);--dh-color-grid-text-hyperlink: var(--dh-color-accent-1000);--dh-color-grid-text-pending: var(--dh-color-yellow-1300);--dh-color-grid-text-error: var(--dh-color-visual-negative);--dh-color-grid-date: var(--dh-color-visual-notice);--dh-color-grid-number-positive: var(--dh-color-visual-positive);--dh-color-grid-number-negative: var(--dh-color-visual-negative);--dh-color-grid-number-zero: var(--dh-color-visual-notice);--dh-color-grid-string-null: var(--dh-color-gray-600);--dh-color-grid-filter-bar-active-bg: color-mix( in srgb, var(--dh-color-accent-700) 50%, transparent );--dh-color-grid-filter-bar-active: var(--dh-color-accent-600);--dh-color-grid-filter-bar-expanded-bg: var(--dh-color-gray-200);--dh-color-grid-filter-bar-expanded-active-bg: color-mix( in srgb, var(--dh-color-accent-1000) 19%, transparent );--dh-color-grid-filter-bar-expanded-active-cell-bg: color-mix( in srgb, var(--dh-color-accent-700) 32%, transparent );--dh-color-grid-filter-bar-separator: var(--dh-color-gray-600);--dh-color-grid-filter-bar-error: var(--dh-color-visual-negative);--dh-color-grid-filter-icon: var(--dh-color-accent-600);--dh-color-grid-context-menu-sort-icon: var(--dh-color-visual-purple);--dh-color-grid-context-menu-reverse-icon: var(--dh-color-visual-green);--dh-color-grid-column-linker-hover-bg: var( --dh-color-highlight-selected-hover );--dh-color-grid-column-grouped-divider: var(--dh-color-gray-50);--dh-color-grid-tree-line: var(--dh-color-gray-500);--dh-color-grid-tree-marker: var(--dh-color-gray-700);--dh-color-grid-tree-marker-hover: var(--dh-color-gray-900);--dh-color-grid-floating-row: var(--dh-color-gray-300);--dh-color-grid-floating-row-bg: var(--dh-color-gray-200);--dh-color-grid-floating-divider-inner: var(--dh-color-gray-200);--dh-color-grid-floating-divider-outer: var(--dh-color-gray-50);--dh-color-grid-overflow-button: var(--dh-color-gray-700);--dh-color-grid-overflow-button-hover: var(--dh-color-gray-900);--dh-color-grid-data-bar-positive: var(--dh-color-visual-positive);--dh-color-grid-data-bar-negative: var(--dh-color-visual-negative);--dh-color-grid-data-bar-marker: var(--dh-color-white);--dh-color-grid-data-bar-zero-line: var(--dh-color-gray-300);--dh-color-grid-scrim: var(--dh-color-gray-50)}
|
|
210
210
|
`,aa=`:root{--dh-color-loading-spinner-primary: var(--dh-color-accent-bg);--dh-color-loading-spinner-secondary: color-mix( in srgb, var(--dh-color-gray-800) 50%, transparent );--dh-color-quickactions-bg: color-mix( in srgb, var(--dh-color-visual-gray) 90%, transparent );--dh-color-radial-reaction: color-mix( in srgb, var(--dh-color-visual-gray) 60%, transparent );--dh-color-colorpicker-border: color-mix( in srgb, var(--dh-color-visual-gray) 10%, transparent );--dh-logo-img: var(--dh-logo-dark-img);--dh-color-login-form-bg: var(--dh-color-gray-400);--dh-color-login-status-message: var(--dh-color-gray-600);--dh-color-login-logo-bg: var(--dh-color-gray-900);--dh-color-login-footer-fg: var(--dh-color-gray-700);--dh-color-random-area-plot-animation-fg-fill: color-mix( in srgb, var(--dh-color-accent) 8%, transparent );--dh-color-random-area-plot-animation-fg-stroke: color-mix( in srgb, var(--dh-color-accent) 20%, transparent );--dh-color-random-area-plot-animation-bg: var(--dh-color-gray-75);--dh-color-random-area-plot-animation-grid: var(--dh-color-gray-300);--dh-color-action-bg: var(--dh-color-gray-75);--dh-color-action-fg: var(--dh-color-text);--dh-color-action-border: var(--dh-color-border);--dh-color-action-down-bg: var(--dh-color-gray-300);--dh-color-action-hover-bg: var(--dh-color-gray-50);--dh-color-action-hover-fg: var(--dh-color-text-hover);--dh-color-action-hover-border: var(--dh-color-hover-border);--dh-color-action-active-bg: var(--dh-color-gray-800);--dh-color-action-active-fg: var(--dh-color-gray-50);--dh-color-action-active-border: var(--dh-color-gray-800);--dh-color-action-active-hover-bg: var(--dh-color-gray-900);--dh-color-action-active-hover-fg: var(--dh-color-gray-50);--dh-color-action-active-hover-border: var(--dh-color-gray-900);--dh-color-action-disabled-bg: transparent;--dh-color-action-disabled-fg: var(--dh-color-text-disabled);--dh-color-action-disabled-border: var(--dh-color-gray-300);--dh-color-icon-fg: var(--dh-color-gray-700);--dh-color-icon-disabled-fg: var(--dh-color-gray-400);--dh-color-input-bg: var(--dh-color-gray-75);--dh-color-input-fg: var(--dh-color-text);--dh-color-input-border: var(--dh-color-border);--dh-color-input-placeholder: var(--dh-color-gray-600);--dh-color-input-active-bg: var(--dh-color-input-bg);--dh-color-input-disabled-bg: var(--dh-color-disabled-bg);--dh-color-input-disabled-border: transparent;--dh-color-input-disabled-fg: var(--dh-color-text-disabled);--dh-color-input-hover-border: var(--dh-color-hover-border);--dh-color-input-focus-border: var(--dh-color-border-focus);--dh-color-search-icon: var(--dh-color-fg);--dh-color-form-control-error: var(--dh-color-visual-negative);--dh-color-form-control-error-shadow: color-mix( in srgb, var(--dh-color-visual-negative) 25%, transparent );--dh-color-label-text: var(--dh-color-gray-700);--dh-color-selector-fg: var(--dh-color-icon-fg);--dh-color-selector-bg: var(--dh-color-gray-75);--dh-color-selector-hover-bg: var(--dh-color-gray-50);--dh-color-selector-hover-fg: var(--dh-color-gray-900);--dh-color-selector-disabled-fg: var(--dh-color-icon-disabled-fg);--dh-color-item-list-bg: transparent;--dh-color-item-list-active-bg: var(--dh-color-highlight-active);--dh-color-item-list-hover-bg: var(--dh-color-highlight-hover);--dh-color-item-list-selected-fg: var(--dh-color-text);--dh-color-item-list-selected-bg: var(--dh-color-highlight-selected);--dh-color-item-list-selected-hover-bg: var( --dh-color-highlight-selected-hover );--dh-color-item-list-selected-inactive-bg: var(--dh-color-gray-200);--dh-color-item-list-selected-border: var(--dh-color-accent-900);--dh-color-item-list-drop-target-fg: var(--dh-color-white);--dh-color-item-list-keyboard-selected-bg: color-mix( in srgb, var(--dh-color-accent) 50%, transparent );--dh-color-golden-layout-tab-header-bg: var(--dh-color-gray-75);--dh-color-golden-layout-tab-bg: var(--dh-color-gray-75);--dh-color-golden-layout-tab-selected-bg: var(--dh-color-content-bg);--dh-color-menu-item-fg: var(--dh-color-gray-700);--dh-color-hr: var(--dh-color-gray-300);--dh-color-dialog-title-fg: var(--dh-color-heading-text);--dh-color-dialog-fg: var(--dh-color-text);--dh-color-popover-bg: var(--dh-color-bg);--dh-color-tooltip-bg: var(--dh-color-gray-400);--dh-color-tooltip-fg: var(--dh-color-fg);--dh-color-tooltip-box-shadow: var(--dh-color-dropshadow);--dh-color-well-bg: color-mix( in srgb, var(--dh-color-visual-gray) 2%, transparent );--dh-color-well-border: color-mix( in srgb, var(--dh-color-visual-gray) 5%, transparent )}
|
|
211
|
-
`,la="_themeColorsPalette_1mdfo_1",sa="_swatch_1mdfo_7",na="_themeColors_1mdfo_1",ia="_label_1mdfo_21",ca="_capitalize_1mdfo_29",G={themeColorsPalette:la,swatch:sa,themeColors:na,label:ia,capitalize:ca};function da(){return{"Theme Color Palette":J("palette",Jt,1),"Semantic Colors":J("semantic",ea,1),"Chart Colors":J("chart",ra,2),"Editor Colors":J("editor",oa,2),"Grid Colors":J("grid",ta,2),"Component Colors":J("component",aa,1)}}function ha(){const{selectedThemeKey:a}=Nr(),r=u.useMemo(da,[a]);return e.jsx(e.Fragment,{children:Object.entries(r).map(([o,t],l)=>o==="Theme Color Palette"?e.jsxs("div",{...p(o),children:[e.jsx("h2",{className:"ui-title",children:o}),e.jsx("div",{className:G.themeColorsPalette,children:Object.entries(t).map(([s,n],i)=>e.jsxs(u.Fragment,{children:[(i===0||i===1)&&n.map(({name:d},h)=>e.jsx("div",{style:{gridColumnStart:h+2,textAlign:"center"},className:"mt-3",children:d.split("-").pop()},d)),e.jsx("div",{className:"text-right pr-2",children:s}),n.map(({name:d,value:h})=>e.jsxs("div",{style:{backgroundColor:h,border:h===""&&d.length>0?Ve:void 0,color:`var(--dh-color-${ce(h)})`},className:z(G.swatch,"px-0"),children:[e.jsxs(re,{interactive:!0,children:[e.jsx("div",{children:d}),e.jsx("div",{children:h}),e.jsx("div",{children:de.normalizeCssColor(h,!0)})]}),e.jsx(ar,{copy:d,style:{color:`var(--dh-color-${ce(h)})`}})]},d))]},s))})]},o):e.jsxs("div",{...p(o),children:[e.jsx("h2",{className:"ui-title",children:o}),e.jsx("div",{className:G.themeColors,children:Object.entries(t).map(([s,n])=>e.jsxs("div",{style:{gridRow:`span ${n.length+1}`},children:[e.jsx("span",{className:z(G.label,G.capitalize),children:s}),n.map(({isLabel:i,name:d,value:h,note:c})=>i===!0?e.jsx("span",{className:G.label,children:d},d):e.jsxs("div",{className:G.swatch,style:{backgroundColor:h,border:h===""&&d.length>0?Ve:void 0,color:`var(--dh-color-${ce(h)})`},children:[e.jsxs(re,{interactive:!0,children:[e.jsx("div",{children:d}),e.jsx("div",{children:h}),e.jsx("div",{children:de.normalizeCssColor(h,!0)})]}),e.jsx("span",{children:d.replace("--dh-color-","")}),d.endsWith("-hue")||c!=null?e.jsx("span",{children:c??h}):null,e.jsx(ar,{copy:d,style:{color:`var(--dh-color-${ce(h)})`}})]},d))]},s))})]},o))})}const Re="data-menu-category",ua="data-no-menu",ga="sample-section-e2e-ignore",$r="spectrum-component-samples",Ar="spectrum-comparison-samples";function ma(){return e.jsxs("div",{id:$r,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(P,{gap:20,columns:yr("0px","1fr"),children:[e.jsxs(N,{...k("spectrum-buttons"),children:[e.jsx("h3",{children:"Buttons"}),e.jsx(va,{})]}),e.jsxs(N,{...k("spectrum-collections"),children:[e.jsx("h3",{children:"Collections"}),e.jsx(ba,{})]}),e.jsxs(N,{...k("spectrum-content"),children:[e.jsx("h3",{children:"Content"}),e.jsx(fa,{})]}),e.jsxs(N,{...k("spectrum-forms"),children:[e.jsx("h3",{children:"Forms"}),e.jsx(pa,{})]}),e.jsxs(N,{...k("spectrum-overlays"),children:[e.jsx("h3",{children:"Overlays"}),e.jsxs(w,{gap:"size-160",children:[e.jsx(xa,{}),e.jsxs(Pr,{children:[e.jsx(M,{children:"Dialog Trigger"}),a=>e.jsxs(Lr,{children:[e.jsx(Ue,{children:"Some Heading"}),e.jsx(_r,{children:"Some Header"}),e.jsx(Br,{}),e.jsx(Ge,{children:e.jsx(E,{children:"Are you sure?"})}),e.jsxs(Fr,{children:[e.jsx(j,{variant:"secondary",onPress:a,children:"Cancel"}),e.jsx(j,{variant:"accent",onPress:a,children:"Confirm"})]})]})]})]})]}),e.jsxs(N,{...k("spectrum-well"),children:[e.jsx("h3",{children:"Wells"}),e.jsx(Or,{children:"This is a well."})]})]})]})}function va(){return e.jsxs(e.Fragment,{children:[e.jsxs(M,{marginBottom:"size-200",children:[e.jsx(W,{children:e.jsx(S,{icon:H})}),e.jsx(E,{children:"Icon Button"})]}),e.jsxs(P,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:Me(4,yr(0,"size-2000")),rows:Me(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(M,{children:"Normal"}),e.jsx(M,{gridRow:"span 3",isQuiet:!0,children:"Quiet"}),e.jsx(M,{staticColor:"black",children:"Static Black"}),e.jsx(M,{staticColor:"white",children:"Static White"}),e.jsx(M,{isDisabled:!0,children:"Disabled"}),e.jsx("label",{children:"Toggle Button"}),e.jsx(K,{children:"Normal"}),e.jsx(K,{isQuiet:!0,children:"Quiet"}),e.jsx(K,{gridRow:"span 2",isEmphasized:!0,children:"Emphasized"}),e.jsx(K,{staticColor:"black",children:"Static Black"}),e.jsx(K,{staticColor:"white",children:"Static White"}),e.jsx(K,{isDisabled:!0,children:"Disabled"})]})]})}function xa(){return e.jsxs(e.Fragment,{children:[e.jsx(E,{children:"Contextual Help"}),e.jsxs(Vr,{variant:"info",children:[e.jsx(Ue,{children:"Need help?"}),e.jsx(Ge,{children:e.jsx(E,{children:"This is a helpful description of the thing you need help with."})})]})]})}function pa(){return e.jsx(Ur,{children:e.jsxs(P,{gap:20,columns:Me("auto-fit","210px"),alignItems:"end",children:[e.jsx(Pe,{label:"Text Field"}),e.jsxs(wr,{label:"Combobox",menuTrigger:"focus",defaultSelectedKey:"two",children:[e.jsx(f,{children:"One"},"one"),e.jsx(f,{children:"Two"},"two"),e.jsx(f,{children:"Three"},"three")]}),e.jsx(Le,{children:"Checkbox"}),e.jsx(Gr,{label:"Slider",defaultValue:24}),e.jsx(Hr,{children:"Switch"})]})})}function fa(){return e.jsxs(zr,{children:[e.jsx(W,{size:"XL",children:e.jsx(S,{icon:so})}),e.jsx(Ue,{children:"Illustrated Message"}),e.jsx(Ge,{children:"This is the content of the message."})]})}function ba(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"List View"}),e.jsxs(Wr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",maxWidth:"size-6000",marginBottom:"size-200",children:[e.jsx(f,{children:"One"}),e.jsx(f,{children:"Two"}),e.jsx(f,{children:"Three"}),e.jsx(f,{children:"Four"})]}),e.jsx("label",{id:"table-view-sample",children:"Table View"}),e.jsxs(qr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(Kr,{children:[e.jsxs(Y,{title:"Person",children:[e.jsx(Y,{allowsResizing:!0,children:"Name"}),e.jsx(Y,{children:"Age"})]}),e.jsxs(Y,{title:"Address",children:[e.jsx(Y,{allowsResizing:!0,children:"City"}),e.jsx(Y,{children:"State"})]})]}),e.jsxs(Yr,{children:[e.jsxs(be,{children:[e.jsx(I,{children:"John"}),e.jsx(I,{children:"42"}),e.jsx(I,{children:"San Francisco"}),e.jsx(I,{children:"CA"})]}),e.jsxs(be,{children:[e.jsx(I,{children:"Jane"}),e.jsx(I,{children:"38"}),e.jsx(I,{children:"San Francisco"}),e.jsx(I,{children:"CA"})]}),e.jsxs(be,{children:[e.jsx(I,{children:"Becky"}),e.jsx(I,{children:"12"}),e.jsx(I,{children:"San Francisco"}),e.jsx(I,{children:"CA"})]})]})]})]})}function se(a){return e.jsx("div",{...a})}function ja(){const[a,r]=u.useState([]);u.useEffect(()=>{let t={category:"",items:[]};const l=[t],s=document.querySelector(`#${$r}`),n=document.querySelector(`#sample-section-${Ar}`);document.querySelectorAll(`h2,h3,[${Re}]`).forEach(i=>{if(i.textContent==null||i.hasAttribute(ua))return;if(i.hasAttribute(Re)){t={category:i.getAttribute(Re)??"",items:[]},l.push(t);return}const h=`${s?.contains(i)===!0?"spectrum-":n?.contains(i)===!0?"spectrum-compare-":""}${i.textContent}`.toLowerCase().replace(/\s/g,"-");i.id=h,t.items.push({id:h,label:i.textContent})}),r(l)},[]),u.useEffect(()=>{const t=window.location.hash===""?null:document.querySelector(window.location.hash);setTimeout(()=>{t?t.scrollIntoView():window.scrollTo({top:0,behavior:"auto"})},0)},[]);const o=u.useCallback(t=>{const l=String(t);document.getElementById(l)?.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=l},1e3)},[]);return e.jsxs(Zr,{children:[e.jsx(M,{children:e.jsx(W,{children:e.jsx(S,{icon:no})})}),e.jsx(Xr,{items:a,onAction:o,children:({category:t,items:l})=>e.jsx(_e,{items:l,title:t,children:({id:s,label:n})=>e.jsx(f,{children:n},s)},t)})]})}function ya(){const a=u.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{window.location.hash=""},500)},[]);return u.useEffect(()=>{const r=document.querySelector("h2")?.offsetTop??0;function o(){document.documentElement.dataset.scroll=String(window.scrollY>=r)}return document.addEventListener("scroll",o,{passive:!0}),()=>{document.removeEventListener("scroll",o)}},[]),e.jsx(j,{UNSAFE_className:"goto-top-button",variant:"accent",onPress:a,children:e.jsx(W,{children:e.jsx(S,{icon:io})})})}const wa=["Tab 1","Tab 2","Tab 3"];function Ca({isActive:a,title:r}){return e.jsxs("li",{className:z("lm_tab",a&&"lm_active"),children:[e.jsx("span",{className:"lm_title_before"}),e.jsx("span",{className:"lm_title",children:r}),e.jsx("span",{className:"lm_close_tab"})]})}function Sa(){return e.jsxs("div",{...p("golden-layout"),children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(a=>e.jsxs(he.Fragment,{children:[e.jsx("h5",{children:a?"Minimized":"Maximised"}),e.jsx("div",{style:{position:"relative",border:"none"},className:a?"lm_maximised":void 0,children:e.jsxs("div",{className:"lm_header",children:[e.jsx("ul",{className:"lm_tabs",children:wa.map((r,o)=>e.jsx(Ca,{isActive:o===0,title:r},r))}),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(a)))]})}function Ta(){return e.jsxs("div",{...p("animations",["sample-section-e2e-ignore"]),children:[e.jsx("h2",{className:"ui-title",children:"Animations"}),e.jsx(N,{position:"relative",height:400,children:e.jsx($o,{})})]})}const fr=[["primary","accent"],["secondary","primary"],["danger","negative"]],ka=[{title:"One",value:"1"},{title:"Two",value:"2"},{title:"Three",value:"3"}];function Na(){const[a,r]=u.useState(!1),[o,t]=u.useState("1"),l=u.useCallback(s=>{t(s.target.value)},[]);return e.jsxs("div",{...p(Ar,[ga]),children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Bootstrap / Spectrum Comparison"}),e.jsxs(w,{gap:20,wrap:!0,children:[e.jsxs(N,{children:[e.jsx("h3",{children:"Buttons - Filled"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",autoRows:"40x",justifyItems:"start",alignItems:"start",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),fr.map(([s,n])=>e.jsxs(u.Fragment,{children:[e.jsx(x,{onClick:Q,kind:s,icon:er,children:"Button"}),e.jsxs(j,{variant:n,style:"fill",children:[e.jsx(W,{children:e.jsx(S,{icon:er})}),e.jsx(E,{children:"Button"})]})]},s)),e.jsx(x,{onClick:Q,kind:"primary",disabled:!0,children:"Disabled"}),e.jsx(j,{variant:"accent",style:"fill",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Buttons - Outline"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),fr.map(([s,n])=>e.jsxs(u.Fragment,{children:[e.jsx(x,{onClick:Q,kind:s,children:s}),e.jsx(j,{variant:n,style:"outline",children:n})]},s)),e.jsx(x,{onClick:Q,kind:"secondary",disabled:!0,children:"Disabled"}),e.jsx(j,{variant:"primary",style:"outline",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Action Buttons"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(x,{onClick:Q,kind:"inline",children:"Inline"}),e.jsx(M,{children:"Action"}),e.jsx(x,{onClick:Q,kind:"inline",disabled:!0,children:"Disabled"}),e.jsx(M,{isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Pickers"}),e.jsxs(P,{gap:20,columns:"repeat(2, 192px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),[!1,!0].map(s=>e.jsxs(u.Fragment,{children:[e.jsxs("div",{children:[e.jsxs("label",{className:"input-label",children:[s?"Disabled ":"","Combobox"]}),e.jsx(Oe,{disabled:s,options:ka,defaultValue:"One"})]}),e.jsxs(wr,{isDisabled:s,label:s?"Disabled Combobox":"Combobox",inputValue:"One",children:[e.jsx(f,{children:"One"},"1"),e.jsx(f,{children:"Two"},"2"),e.jsx(f,{children:"Three"},"3")]})]},String(s))),[!1,!0].map(s=>e.jsxs(u.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"Select"}),e.jsxs(Fe,{disabled:s,placeholder:"Select",onChange:n=>{},className:"custom-select",children:[e.jsxs("option",{disabled:!0,value:"0",children:[s?"":"Disabled ","Select"]}),e.jsx("option",{value:"1",children:"One"}),e.jsx("option",{value:"2",children:"Two"}),e.jsx("option",{value:"3",children:"Three"})]})]}),e.jsxs(Qr,{isDisabled:s,label:s?"Disabled Picker":"Picker",placeholder:"Picker",children:[e.jsx(f,{children:"One"},"1"),e.jsx(f,{children:"Two"},"2"),e.jsx(f,{children:"Three"},"3")]})]},String(s)))]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Text Field"}),e.jsxs(P,{gap:20,columns:"repeat(2, 192px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"type=text"}),e.jsx("input",{type:"text",className:"form-control",placeholder:"Text Input"})]}),e.jsx(Pe,{type:"text",label:"TextField"}),e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"Disabled"}),e.jsx("input",{type:"text",className:"form-control",disabled:!0,value:"Disabled"})]}),e.jsx(Pe,{type:"text",label:"Disabled",isDisabled:!0,value:"Disabled"})]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Checkbox"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(L,{className:"form-group",checked:a,onChange:()=>r(s=>!s),children:"Checkbox"}),e.jsx(Le,{children:"Checkbox"}),e.jsx(L,{className:"form-group",disabled:!0,checked:a,onChange:()=>r(s=>!s),children:"Disabled"}),e.jsx(Le,{isDisabled:!0,children:"Disabled"}),e.jsx(w,{direction:"column",children:e.jsxs("label",{children:["Radio Group",e.jsxs(Tr,{onChange:l,value:o,children:[e.jsx(F,{value:"1",children:"One"}),e.jsx(F,{value:"2",children:"Two"}),e.jsx(F,{value:"3",children:"Three"})]})]})}),e.jsxs(Jr,{label:"Radio Group",value:o,onChange:t,children:[e.jsx(je,{value:"1",children:"One"}),e.jsx(je,{value:"2",children:"Two"}),e.jsx(je,{value:"3",children:"Three"})]})]})]})]})]})}function ne(){return e.jsx(W,{children:e.jsx(S,{icon:co})})}function Da(){return e.jsxs("div",{...p("pickers"),children:[e.jsx("h2",{className:"ui-title",children:"Pickers"}),e.jsxs(w,{gap:14,children:[e.jsx(we,{label:"Single Child",tooltip:{placement:"bottom-end"},children:e.jsx(f,{children:"Aaa"})}),e.jsxs(we,{label:"Mixed Children Types",tooltip:!0,children:["String 1","String 2","String 3","","Some really long text that should get truncated",444,999,!0,!1,e.jsx(f,{children:"Item Aaa"}),e.jsx(f,{children:"Item Bbb"}),e.jsxs(f,{textValue:"Complex Ccc",children:[e.jsx(ne,{}),e.jsx(E,{children:"Complex Ccc with text that should be truncated"})]})]}),e.jsxs(we,{label:"Sections",tooltip:!0,children:["String 1","String 2","String 3",e.jsxs(_e,{title:"Section A",children:[e.jsx(f,{children:"Item Aaa"}),e.jsx(f,{children:"Item Bbb"}),e.jsxs(f,{textValue:"Complex Ccc",children:[e.jsx(ne,{}),e.jsx(E,{children:"Complex Ccc"})]})]}),e.jsxs(_e,{children:[e.jsx(f,{children:"Item Ddd"}),e.jsx(f,{children:"Item Eee"}),e.jsxs(f,{textValue:"Complex Fff",children:[e.jsx(ne,{}),e.jsx(E,{children:"Complex Fff"})]}),e.jsxs(f,{children:[e.jsx(ne,{}),e.jsx(E,{children:"Label"}),e.jsx(E,{slot:"description",children:"Description"})]},"Ggg"),e.jsxs(f,{children:[e.jsx(ne,{}),e.jsx(E,{children:"Label that causes overflow"}),e.jsx(E,{slot:"description",children:"Description that causes overflow"})]},"Hhh")]},"Key B")]})]})]})}const br={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function Ia(){const a=window.location.search.includes("isolateSection=true"),{themes:r}=Nr(),o=r.length>1;return e.jsx("div",{tabIndex:-1,role:"main",children:e.jsxs("div",{className:"container style-guide-container",children:[a&&e.jsx("style",{children:`.${ke}, .sample-section:not(${window.location.hash}), :not(.sample-section) > h2 {
|
|
211
|
+
`,la="_themeColorsPalette_1mdfo_1",sa="_swatch_1mdfo_7",na="_themeColors_1mdfo_1",ia="_label_1mdfo_21",ca="_capitalize_1mdfo_29",G={themeColorsPalette:la,swatch:sa,themeColors:na,label:ia,capitalize:ca};function da(){return{"Theme Color Palette":J("palette",Jt,1),"Semantic Colors":J("semantic",ea,1),"Chart Colors":J("chart",ra,2),"Editor Colors":J("editor",oa,2),"Grid Colors":J("grid",ta,2),"Component Colors":J("component",aa,1)}}function ha(){const{selectedThemeKey:a}=Nr(),r=u.useMemo(da,[a]);return e.jsx(e.Fragment,{children:Object.entries(r).map(([o,t],l)=>o==="Theme Color Palette"?e.jsxs("div",{...p(o),children:[e.jsx("h2",{className:"ui-title",children:o}),e.jsx("div",{className:G.themeColorsPalette,children:Object.entries(t).map(([s,n],i)=>e.jsxs(u.Fragment,{children:[(i===0||i===1)&&n.map(({name:d},h)=>e.jsx("div",{style:{gridColumnStart:h+2,textAlign:"center"},className:"mt-3",children:d.split("-").pop()},d)),e.jsx("div",{className:"text-right pr-2",children:s}),n.map(({name:d,value:h})=>e.jsxs("div",{style:{backgroundColor:h,border:h===""&&d.length>0?Ve:void 0,color:`var(--dh-color-${ce(h)})`},className:z(G.swatch,"px-0"),children:[e.jsxs(re,{interactive:!0,children:[e.jsx("div",{children:d}),e.jsx("div",{children:h}),e.jsx("div",{children:de.normalizeCssColor(h,!0)})]}),e.jsx(ar,{copy:d,style:{color:`var(--dh-color-${ce(h)})`}})]},d))]},s))})]},o):e.jsxs("div",{...p(o),children:[e.jsx("h2",{className:"ui-title",children:o}),e.jsx("div",{className:G.themeColors,children:Object.entries(t).map(([s,n])=>e.jsxs("div",{style:{gridRow:`span ${n.length+1}`},children:[e.jsx("span",{className:z(G.label,G.capitalize),children:s}),n.map(({isLabel:i,name:d,value:h,note:c})=>i===!0?e.jsx("span",{className:G.label,children:d},d):e.jsxs("div",{className:G.swatch,style:{backgroundColor:h,border:h===""&&d.length>0?Ve:void 0,color:`var(--dh-color-${ce(h)})`},children:[e.jsxs(re,{interactive:!0,children:[e.jsx("div",{children:d}),e.jsx("div",{children:h}),e.jsx("div",{children:de.normalizeCssColor(h,!0)})]}),e.jsx("span",{children:d.replace("--dh-color-","")}),d.endsWith("-hue")||c!=null?e.jsx("span",{children:c??h}):null,e.jsx(ar,{copy:d,style:{color:`var(--dh-color-${ce(h)})`}})]},d))]},s))})]},o))})}const Me="data-menu-category",ua="data-no-menu",ga="sample-section-e2e-ignore",$r="spectrum-component-samples",Ar="spectrum-comparison-samples";function ma(){return e.jsxs("div",{id:$r,children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Spectrum Components"}),e.jsxs(P,{gap:20,columns:yr("0px","1fr"),children:[e.jsxs(N,{...k("spectrum-buttons"),children:[e.jsx("h3",{children:"Buttons"}),e.jsx(va,{})]}),e.jsxs(N,{...k("spectrum-collections"),children:[e.jsx("h3",{children:"Collections"}),e.jsx(ba,{})]}),e.jsxs(N,{...k("spectrum-content"),children:[e.jsx("h3",{children:"Content"}),e.jsx(fa,{})]}),e.jsxs(N,{...k("spectrum-forms"),children:[e.jsx("h3",{children:"Forms"}),e.jsx(pa,{})]}),e.jsxs(N,{...k("spectrum-overlays"),children:[e.jsx("h3",{children:"Overlays"}),e.jsxs(w,{gap:"size-160",children:[e.jsx(xa,{}),e.jsxs(Pr,{children:[e.jsx(R,{children:"Dialog Trigger"}),a=>e.jsxs(Lr,{children:[e.jsx(Ue,{children:"Some Heading"}),e.jsx(_r,{children:"Some Header"}),e.jsx(Br,{}),e.jsx(Ge,{children:e.jsx(I,{children:"Are you sure?"})}),e.jsxs(Fr,{children:[e.jsx(j,{variant:"secondary",onPress:a,children:"Cancel"}),e.jsx(j,{variant:"accent",onPress:a,children:"Confirm"})]})]})]})]})]}),e.jsxs(N,{...k("spectrum-well"),children:[e.jsx("h3",{children:"Wells"}),e.jsx(Or,{children:"This is a well."})]})]})]})}function va(){return e.jsxs(e.Fragment,{children:[e.jsxs(R,{marginBottom:"size-200",children:[e.jsx(W,{children:e.jsx(S,{icon:H})}),e.jsx(I,{children:"Icon Button"})]}),e.jsxs(P,{autoFlow:"column",columnGap:"size-250",rowGap:"size-150",columns:Re(4,yr(0,"size-2000")),rows:Re(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(K,{children:"Normal"}),e.jsx(K,{isQuiet:!0,children:"Quiet"}),e.jsx(K,{gridRow:"span 2",isEmphasized:!0,children:"Emphasized"}),e.jsx(K,{staticColor:"black",children:"Static Black"}),e.jsx(K,{staticColor:"white",children:"Static White"}),e.jsx(K,{isDisabled:!0,children:"Disabled"})]})]})}function xa(){return e.jsxs(e.Fragment,{children:[e.jsx(I,{children:"Contextual Help"}),e.jsxs(Vr,{variant:"info",children:[e.jsx(Ue,{children:"Need help?"}),e.jsx(Ge,{children:e.jsx(I,{children:"This is a helpful description of the thing you need help with."})})]})]})}function pa(){return e.jsx(Ur,{children:e.jsxs(P,{gap:20,columns:Re("auto-fit","210px"),alignItems:"end",children:[e.jsx(Pe,{label:"Text Field"}),e.jsxs(wr,{label:"Combobox",menuTrigger:"focus",defaultSelectedKey:"two",children:[e.jsx(f,{children:"One"},"one"),e.jsx(f,{children:"Two"},"two"),e.jsx(f,{children:"Three"},"three")]}),e.jsx(Le,{children:"Checkbox"}),e.jsx(Gr,{label:"Slider",defaultValue:24}),e.jsx(Hr,{children:"Switch"})]})})}function fa(){return e.jsxs(zr,{children:[e.jsx(W,{size:"XL",children:e.jsx(S,{icon:so})}),e.jsx(Ue,{children:"Illustrated Message"}),e.jsx(Ge,{children:"This is the content of the message."})]})}function ba(){return e.jsxs(e.Fragment,{children:[e.jsx("label",{id:"table-view-sample",children:"List View"}),e.jsxs(Wr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",maxWidth:"size-6000",marginBottom:"size-200",children:[e.jsx(f,{children:"One"}),e.jsx(f,{children:"Two"}),e.jsx(f,{children:"Three"}),e.jsx(f,{children:"Four"})]}),e.jsx("label",{id:"table-view-sample",children:"Table View"}),e.jsxs(qr,{"aria-labelledby":"table-view-sample",selectionMode:"multiple",children:[e.jsxs(Kr,{children:[e.jsxs(Y,{title:"Person",children:[e.jsx(Y,{allowsResizing:!0,children:"Name"}),e.jsx(Y,{children:"Age"})]}),e.jsxs(Y,{title:"Address",children:[e.jsx(Y,{allowsResizing:!0,children:"City"}),e.jsx(Y,{children:"State"})]})]}),e.jsxs(Yr,{children:[e.jsxs(je,{children:[e.jsx(E,{children:"John"}),e.jsx(E,{children:"42"}),e.jsx(E,{children:"San Francisco"}),e.jsx(E,{children:"CA"})]}),e.jsxs(je,{children:[e.jsx(E,{children:"Jane"}),e.jsx(E,{children:"38"}),e.jsx(E,{children:"San Francisco"}),e.jsx(E,{children:"CA"})]}),e.jsxs(je,{children:[e.jsx(E,{children:"Becky"}),e.jsx(E,{children:"12"}),e.jsx(E,{children:"San Francisco"}),e.jsx(E,{children:"CA"})]})]})]})]})}function se(a){return e.jsx("div",{...a})}function ja(){const[a,r]=u.useState([]);u.useEffect(()=>{let t={category:"",items:[]};const l=[t],s=document.querySelector(`#${$r}`),n=document.querySelector(`#sample-section-${Ar}`);document.querySelectorAll(`h2,h3,[${Me}]`).forEach(i=>{if(i.textContent==null||i.hasAttribute(ua))return;if(i.hasAttribute(Me)){t={category:i.getAttribute(Me)??"",items:[]},l.push(t);return}const h=`${s?.contains(i)===!0?"spectrum-":n?.contains(i)===!0?"spectrum-compare-":""}${i.textContent}`.toLowerCase().replace(/\s/g,"-");i.id=h,t.items.push({id:h,label:i.textContent})}),r(l)},[]),u.useEffect(()=>{const t=window.location.hash===""?null:document.querySelector(window.location.hash);setTimeout(()=>{t?t.scrollIntoView():window.scrollTo({top:0,behavior:"auto"})},0)},[]);const o=u.useCallback(t=>{const l=String(t);document.getElementById(l)?.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{window.location.hash=l},1e3)},[]);return e.jsxs(Zr,{children:[e.jsx(R,{children:e.jsx(W,{children:e.jsx(S,{icon:no})})}),e.jsx(Xr,{items:a,onAction:o,children:({category:t,items:l})=>e.jsx(_e,{items:l,title:t,children:({id:s,label:n})=>e.jsx(f,{children:n},s)},t)})]})}function ya(){const a=u.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{window.location.hash=""},500)},[]);return u.useEffect(()=>{const r=document.querySelector("h2")?.offsetTop??0;function o(){document.documentElement.dataset.scroll=String(window.scrollY>=r)}return document.addEventListener("scroll",o,{passive:!0}),()=>{document.removeEventListener("scroll",o)}},[]),e.jsx(j,{UNSAFE_className:"goto-top-button",variant:"accent",onPress:a,children:e.jsx(W,{children:e.jsx(S,{icon:io})})})}const wa=["Tab 1","Tab 2","Tab 3"];function Ca({isActive:a,title:r}){return e.jsxs("li",{className:z("lm_tab",a&&"lm_active"),children:[e.jsx("span",{className:"lm_title_before"}),e.jsx("span",{className:"lm_title",children:r}),e.jsx("span",{className:"lm_close_tab"})]})}function Sa(){return e.jsxs("div",{...p("golden-layout"),children:[e.jsx("h2",{className:"ui-title",children:"Golden Layout"}),[!1,!0].map(a=>e.jsxs(he.Fragment,{children:[e.jsx("h5",{children:a?"Minimized":"Maximised"}),e.jsx("div",{style:{position:"relative",border:"none"},className:a?"lm_maximised":void 0,children:e.jsxs("div",{className:"lm_header",children:[e.jsx("ul",{className:"lm_tabs",children:wa.map((r,o)=>e.jsx(Ca,{isActive:o===0,title:r},r))}),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(a)))]})}function Ta(){return e.jsxs("div",{...p("animations",["sample-section-e2e-ignore"]),children:[e.jsx("h2",{className:"ui-title",children:"Animations"}),e.jsx(N,{position:"relative",height:400,children:e.jsx($o,{})})]})}const fr=[["primary","accent"],["secondary","primary"],["danger","negative"]],ka=[{title:"One",value:"1"},{title:"Two",value:"2"},{title:"Three",value:"3"}];function Na(){const[a,r]=u.useState(!1),[o,t]=u.useState("1"),l=u.useCallback(s=>{t(s.target.value)},[]);return e.jsxs("div",{...p(Ar,[ga]),children:[e.jsx("h2",{className:"ui-title","data-no-menu":!0,children:"Bootstrap / Spectrum Comparison"}),e.jsxs(w,{gap:20,wrap:!0,children:[e.jsxs(N,{children:[e.jsx("h3",{children:"Buttons - Filled"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",autoRows:"40x",justifyItems:"start",alignItems:"start",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),fr.map(([s,n])=>e.jsxs(u.Fragment,{children:[e.jsx(x,{onClick:Q,kind:s,icon:er,children:"Button"}),e.jsxs(j,{variant:n,style:"fill",children:[e.jsx(W,{children:e.jsx(S,{icon:er})}),e.jsx(I,{children:"Button"})]})]},s)),e.jsx(x,{onClick:Q,kind:"primary",disabled:!0,children:"Disabled"}),e.jsx(j,{variant:"accent",style:"fill",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Buttons - Outline"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),fr.map(([s,n])=>e.jsxs(u.Fragment,{children:[e.jsx(x,{onClick:Q,kind:s,children:s}),e.jsx(j,{variant:n,style:"outline",children:n})]},s)),e.jsx(x,{onClick:Q,kind:"secondary",disabled:!0,children:"Disabled"}),e.jsx(j,{variant:"primary",style:"outline",isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Action Buttons"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(x,{onClick:Q,kind:"inline",children:"Inline"}),e.jsx(R,{children:"Action"}),e.jsx(x,{onClick:Q,kind:"inline",disabled:!0,children:"Disabled"}),e.jsx(R,{isDisabled:!0,children:"Disabled"})]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Pickers"}),e.jsxs(P,{gap:20,columns:"repeat(2, 192px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),[!1,!0].map(s=>e.jsxs(u.Fragment,{children:[e.jsxs("div",{children:[e.jsxs("label",{className:"input-label",children:[s?"Disabled ":"","Combobox"]}),e.jsx(Oe,{disabled:s,options:ka,defaultValue:"One"})]}),e.jsxs(wr,{isDisabled:s,label:s?"Disabled Combobox":"Combobox",inputValue:"One",children:[e.jsx(f,{children:"One"},"1"),e.jsx(f,{children:"Two"},"2"),e.jsx(f,{children:"Three"},"3")]})]},String(s))),[!1,!0].map(s=>e.jsxs(u.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"Select"}),e.jsxs(Fe,{disabled:s,placeholder:"Select",onChange:n=>{},className:"custom-select",children:[e.jsxs("option",{disabled:!0,value:"0",children:[s?"":"Disabled ","Select"]}),e.jsx("option",{value:"1",children:"One"}),e.jsx("option",{value:"2",children:"Two"}),e.jsx("option",{value:"3",children:"Three"})]})]}),e.jsxs(Qr,{isDisabled:s,label:s?"Disabled Picker":"Picker",placeholder:"Picker",children:[e.jsx(f,{children:"One"},"1"),e.jsx(f,{children:"Two"},"2"),e.jsx(f,{children:"Three"},"3")]})]},String(s)))]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Text Field"}),e.jsxs(P,{gap:20,columns:"repeat(2, 192px)",autoRows:"40x",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"type=text"}),e.jsx("input",{type:"text",className:"form-control",placeholder:"Text Input"})]}),e.jsx(Pe,{type:"text",label:"TextField"}),e.jsxs("div",{children:[e.jsx("label",{className:"input-label",children:"Disabled"}),e.jsx("input",{type:"text",className:"form-control",disabled:!0,value:"Disabled"})]}),e.jsx(Pe,{type:"text",label:"Disabled",isDisabled:!0,value:"Disabled"})]})]}),e.jsxs(N,{children:[e.jsx("h3",{children:"Checkbox"}),e.jsxs(P,{gap:20,columns:"repeat(2, 120px)",children:[e.jsx("label",{children:"Bootstrap"}),e.jsx("label",{children:"Spectrum"}),e.jsx(L,{className:"form-group",checked:a,onChange:()=>r(s=>!s),children:"Checkbox"}),e.jsx(Le,{children:"Checkbox"}),e.jsx(L,{className:"form-group",disabled:!0,checked:a,onChange:()=>r(s=>!s),children:"Disabled"}),e.jsx(Le,{isDisabled:!0,children:"Disabled"}),e.jsx(w,{direction:"column",children:e.jsxs("label",{children:["Radio Group",e.jsxs(Tr,{onChange:l,value:o,children:[e.jsx(F,{value:"1",children:"One"}),e.jsx(F,{value:"2",children:"Two"}),e.jsx(F,{value:"3",children:"Three"})]})]})}),e.jsxs(Jr,{label:"Radio Group",value:o,onChange:t,children:[e.jsx(ye,{value:"1",children:"One"}),e.jsx(ye,{value:"2",children:"Two"}),e.jsx(ye,{value:"3",children:"Three"})]})]})]})]})]})}const Da="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("").map((a,r)=>({key:a,item:{key:(r+1)*100,content:`${a}${a}${a}`}}));function ne(){return e.jsx(W,{children:e.jsx(S,{icon:co})})}function Ea(){const[a,r]=u.useState(),o=u.useCallback(t=>{r(t)},[]);return e.jsxs("div",{...p("pickers"),children:[e.jsx("h2",{className:"ui-title",children:"Pickers"}),e.jsxs(w,{gap:14,children:[e.jsx(me,{label:"Single Child",tooltip:{placement:"bottom-end"},children:e.jsx(f,{children:"Aaa"})}),e.jsxs(me,{label:"Mixed Children Types",defaultSelectedKey:999,tooltip:!0,children:["String 1","String 2","String 3","","Some really long text that should get truncated",444,999,!0,!1,e.jsx(f,{children:"Item Aaa"}),e.jsx(f,{children:"Item Bbb"}),e.jsxs(f,{textValue:"Complex Ccc",children:[e.jsx(ne,{}),e.jsx(I,{children:"Complex Ccc with text that should be truncated"})]})]}),e.jsxs(me,{label:"Sections",tooltip:!0,children:["String 1","String 2","String 3",e.jsxs(_e,{title:"Section A",children:[e.jsx(f,{children:"Item Aaa"}),e.jsx(f,{children:"Item Bbb"}),e.jsxs(f,{textValue:"Complex Ccc",children:[e.jsx(ne,{}),e.jsx(I,{children:"Complex Ccc"})]})]}),e.jsxs(_e,{children:[e.jsx(f,{children:"Item Ddd"}),e.jsx(f,{children:"Item Eee"}),e.jsxs(f,{textValue:"Complex Fff",children:[e.jsx(ne,{}),e.jsx(I,{children:"Complex Fff"})]}),e.jsxs(f,{children:[e.jsx(ne,{}),e.jsx(I,{children:"Label"}),e.jsx(I,{slot:"description",children:"Description"})]},"Ggg"),e.jsxs(f,{children:[e.jsx(ne,{}),e.jsx(I,{children:"Label that causes overflow"}),e.jsx(I,{slot:"description",children:"Description that causes overflow"})]},"Hhh")]},"Key B")]}),e.jsx(me,{label:"Controlled",selectedKey:a,onChange:o,children:Da})]})]})}const br={position:"sticky",justifyContent:"end",zIndex:1,UNSAFE_style:{float:"right"}};function Ia(){const a=window.location.search.includes("isolateSection=true"),{themes:r}=Nr(),o=r.length>1;return e.jsx("div",{tabIndex:-1,role:"main",children:e.jsxs("div",{className:"container style-guide-container",children:[a&&e.jsx("style",{children:`.${ke}, .sample-section:not(${window.location.hash}), :not(.sample-section) > h2 {
|
|
212
212
|
display: none;
|
|
213
|
-
}`}),e.jsx(w,{justifyContent:"space-between",alignItems:"center",marginTop:"2rem",marginBottom:"1rem",children:e.jsx("h1",{style:{paddingTop:"2rem"},children:"Deephaven UI Components"})}),e.jsxs(w,{...br,UNSAFE_className:ke,marginTop:-56,top:20,gap:10,alignItems:"end",children:[o?e.jsx(Oo,{}):null,e.jsx(ja,{})]}),e.jsx(w,{...br,UNSAFE_className:ke,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:o?-234:0,children:e.jsx(ya,{})}),e.jsx(zt,{}),e.jsx(se,{"data-menu-category":"Colors"}),e.jsx(bt,{}),e.jsx(ha,{}),e.jsx(se,{"data-menu-category":"Layout"}),e.jsx(Sa,{}),e.jsx(se,{"data-menu-category":"Components"}),e.jsx(ee,{}),e.jsx(Ut,{}),e.jsx(Bt,{}),e.jsx(
|
|
214
|
-
//# sourceMappingURL=StyleGuideRoot-
|
|
213
|
+
}`}),e.jsx(w,{justifyContent:"space-between",alignItems:"center",marginTop:"2rem",marginBottom:"1rem",children:e.jsx("h1",{style:{paddingTop:"2rem"},children:"Deephaven UI Components"})}),e.jsxs(w,{...br,UNSAFE_className:ke,marginTop:-56,top:20,gap:10,alignItems:"end",children:[o?e.jsx(Oo,{}):null,e.jsx(ja,{})]}),e.jsx(w,{...br,UNSAFE_className:ke,top:"calc(100vh - 40px)",marginTop:-32,marginEnd:o?-234:0,children:e.jsx(ya,{})}),e.jsx(zt,{}),e.jsx(se,{"data-menu-category":"Colors"}),e.jsx(bt,{}),e.jsx(ha,{}),e.jsx(se,{"data-menu-category":"Layout"}),e.jsx(Sa,{}),e.jsx(se,{"data-menu-category":"Components"}),e.jsx(ee,{}),e.jsx(Ut,{}),e.jsx(Bt,{}),e.jsx(Ea,{}),e.jsx(Ot,{}),e.jsx(pe,{}),e.jsx(Gt,{}),e.jsx(yt,{}),e.jsx(Vt,{}),e.jsx(jt,{}),e.jsx(wt,{}),e.jsx(Qt,{}),e.jsx(Ht,{}),e.jsx(Lt,{}),e.jsx(Tt,{}),e.jsx(Mt,{}),e.jsx(gt,{}),e.jsx(bo,{}),e.jsx(Ta,{}),e.jsx(se,{"data-menu-category":"Spectrum Components"}),e.jsx(ma,{}),e.jsx(se,{"data-menu-category":"Spectrum Comparison"}),e.jsx(Na,{})]})})}function Ke(a){const{workspace:r,setWorkspace:o}=a;return u.useEffect(()=>{Vo.makeDefaultWorkspace({getLayouts:async()=>[],getLayout:async()=>({})}).then(o)},[o]),r!=null?e.jsx(Ia,{}):null}Ke.propTypes={workspace:xe.shape({}),setWorkspace:xe.func.isRequired};Ke.defaultProps={workspace:null};const $a=a=>({workspace:yo(a)}),Aa=eo($a,{setWorkspace:jo})(Ke);function za(){return Bo.register(new URL("./download/serviceWorker.js",window.location.href)),wo.init({getWorker:()=>new ho}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,e.jsx(Ao,{children:e.jsx(ro,{store:Co,children:e.jsx(Aa,{})})})}export{za as StyleGuideRoot,za as default};
|
|
214
|
+
//# sourceMappingURL=StyleGuideRoot-3dcdb14f.js.map
|