@apia/theme 0.0.7 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cleanDist.json +3 -0
- package/dist/index.d.ts +283 -43
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3275 -1
- package/dist/index.js.map +1 -1
- package/package.json +22 -15
- package/dist/index.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1 +1,3275 @@
|
|
|
1
|
-
"use strict";var Ge=Object.create;var _=Object.defineProperty,$e=Object.defineProperties,He=Object.getOwnPropertyDescriptor,Le=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertyNames,Y=Object.getOwnPropertySymbols,qe=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable;var Z=(e,t,r)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o=(e,t)=>{for(var r in t||(t={}))ee.call(t,r)&&Z(e,r,t[r]);if(Y)for(var r of Y(t))Je.call(t,r)&&Z(e,r,t[r]);return e},m=(e,t)=>$e(e,Le(t));var Ke=(e,t)=>{for(var r in t)_(e,r,{get:t[r],enumerable:!0})},te=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ve(t))!ee.call(e,i)&&i!==r&&_(e,i,{get:()=>t[i],enumerable:!(c=He(t,i))||c.enumerable});return e};var W=(e,t,r)=>(r=e!=null?Ge(qe(e)):{},te(t||!e||!e.__esModule?_(r,"default",{value:e,enumerable:!0}):r,e)),Qe=e=>te(_({},"__esModule",{value:!0}),e);var Ot={};Ke(Ot,{ThemeProvider:()=>wt,focusOutline:()=>w,getVariant:()=>$,injectStyles:()=>vt,makeStyledComponent:()=>kt,responsive:()=>u,smallButton:()=>y,spacing:()=>l,useMainTheme:()=>G});module.exports=Qe(Ot);var Be=require("lodash-es"),R=require("@apia/util"),_e=require("react");var Ue=require("lodash-es"),K=require("@apia/util");var E=require("lodash-es"),S=W(require("tinycolor2"));function u(e){var c;let t=[];for(let i=0;i<=6;i++)t[i+1]=(c=e[i])!=null?c:null;if(e.print)t[0]=e.print;else for(let i=5;i>=0;i--)e[i]!==void 0&&(t[0]=e[i]);return t}function l(e){var t;return(t=z.spacing(e))!=null?t:e}var y={py:2,px:4,fontSize:"0.9em"},w={outlineColor:"outlineColor",outlineWidth:"3px",outlineStyle:"solid",outlineOffset:"-3px"};function $(e){return{variant:e,"data-variant":e}}var F={light:"#009",dark:"#fff"},oe="#ccc",Xe=Array(50).fill(1).map((e,t)=>u({0:Math.ceil(t/2.5),1:Math.ceil(t/2.1),2:Math.ceil(t/1.7),3:Math.ceil(t/1.3),4:t})),Ye={action:{disabled:oe,disabledOpacity:.6,active:F,activeOpacity:.4,focus:F,focusOpacity:.2,hover:F,hoverOpacity:.3,readonly:oe,readonlyOpacity:.4,selected:F.light,selectedOpacity:.6},background:{default:"#f4f4f4",overlay:"rgba(0, 0, 0, 0.2)",paper:"white"},border:{article:"#cacaca",field:"#444",section:"#aaa"},common:{black:"black",white:"white"},info:{main:"#fff"},primary:{main:"#00496c"},secondary:{main:"#6c757d"},spacing:e=>Xe[e],text:{accent:"#609",disabled:"#555",icon:"white",link:"#00496c",primary:"#4a4a4a",secondary:"white",title:"#00496c"},error:{main:"#db7678",light:"#fff2f4"},success:{main:"#8bde8b",light:"#e7ffd9"},warning:{main:"#f8f588",light:"#fffdd9"},darkenRatio:15,lightenRatio:35,responsive:u,queryColumnsMultiplier:2},z=Ye;var ne=require("lodash-es");var re=require("lodash-es");var k=W(require("tinycolor2"));function Ze(e){return o(o({},e),e.borderColor?{borderLeftColor:e.borderColor,borderRightColor:e.borderColor,borderBottomColor:e.borderColor,borderTopColor:e.borderColor}:void 0)}var A=Ze;var et=(e,t)=>{var C,x,v,T;if(t==="default")return A(e);let r=O(),c=r.action[`${t}Opacity`],i=t==="checked"?"selected":t,a=k.default.mix((C=e.backgroundColor)!=null?C:"",(0,k.default)((x=e.backgroundColor)!=null?x:"").isLight()?r.action[i].light:r.action[i].dark,100*c).toRgbString();return A(o(o({},e.backgroundColor?{backgroundColor:t==="checked"?(v=e.backgroundColor)!=null?v:"":a,color:t==="checked"?k.default.mix((0,k.default)((T=e.color)!=null?T:"black"),(0,k.default)(r.action.selected.dark),100*r.action.selectedOpacity).toRgbString():window.currentPalette.getContrastText(a)}:null),e.borderColor?{borderColor:k.default.mix(e.borderColor,(0,k.default)(e.borderColor).isLight()?r.action[i].light:r.action[i].dark,100*c).toRgbString()}:null))},f=et;var tt=(e,t)=>{let r=(t==null?void 0:t.default)!==!1?(0,re.cloneDeep)(e):{};return(t==null?void 0:t.active)!==!1&&(r.active=f(e,"active")),(t==null?void 0:t.disabled)!==!1&&(r.disabled=f(e,"disabled")),(t==null?void 0:t.focus)!==!1&&(r.focus=f(e,"focus")),(t==null?void 0:t.hover)!==!1&&(r.hover=f(e,"hover")),(t==null?void 0:t.readonly)!==!1&&(r.readonly=f(e,"readonly")),(t==null?void 0:t.selected)!==!1&&(r.selected=f(e,"selected")),(t==null?void 0:t.checked)!==!1&&(r.checked=f(e,"checked")),r},P=tt;function H(e,t){e.forEach(r=>{Object.entries(r).forEach(([c,i])=>{if(typeof i=="string")return;let a=i;a.active||(a.active={}),a.checked||(a.checked={}),a.focus||(a.focus={}),a.disabled||(a.disabled={}),a.hover||(a.hover={}),a.selected||(a.selected={});let C=P(a,t);r[c]=(0,ne.merge)(C,a)})})}var be=require("lodash-es");function ie(e){return!!e&&typeof e=="object"&&"main"in e}var I=W(require("tinycolor2"));function ae(e,t){return(0,I.default)(e).lighten(t!=null?t:20).toRgbString()}function le(e,t){return(0,I.default)(e).darken(t!=null?t:20).toRgbString()}function ce(e){let t=(0,I.default)(e);return I.default.readability("white",t)<I.default.readability("black",t)?"black":"white"}var de=require("lodash-es");var ot=(e,t)=>{switch(t){case"active":return{"&:active":e,"input[role]:active ~ &":e,"input[role]:active ~ & path":e};case"checked":return{"&:checked":e,"input[role]:checked ~ &":e,"input[role]:checked ~ & path":e};case"disabled":return{"&:disabled":e,"input[role]:disabled ~ &":e,"input[role]:disabled ~ & path":e};case"focus":{let r=(0,de.merge)({},w,e);return{"&:focus":r,"input[role]:focus ~ &":r}}case"hover":return{'&:hover:not([readonly], :disabled,[aria-selected="true"],:active)':e,'input[role]:hover:not([readonly], :active, :disabled) ~ &:not(:disabled,[aria-selected="true"])':e,'input[role]:hover:not([readonly], :active, :disabled) ~ &:not(:disabled,[aria-selected="true"]) path':e};case"readonly":return{"&[readonly]":e,"input[role][readonly] ~ &":e,"input[role][readonly] ~ & path":e,"&.readonly input ~ &, &.readOnly input ~ &":e,"&.readonly input ~ & path, &.readOnly input ~ & path":e,"&.readonly, &.readOnly":e};case"selected":return{"&:selected":e,"input[role]:selected ~ &":e,"input[role]:selected ~ & path":e,'&[aria-selected="true"]':e};default:return e}},b=ot;var ue=require("lodash-es");var se=require("lodash-es");function p(e,t){return(0,se.merge)(A({color:`${e}.color`,backgroundColor:`${e}.backgroundColor`,borderColor:`${e}.borderColor`}),t==null?void 0:t.mergeObject)}function n(e,t){var T,j,d,s,g,D,U,B;let r=p(`${e}.active`,t),c=p(`${e}.checked`,t),i=o({cursor:"not-allowed"},p(`${e}.disabled`,t)),a=p(`${e}.hover`,t),C=((T=t==null?void 0:t.states)==null?void 0:T.focus)!==!1?p(`${e}.focus`,t):{},x=o({cursor:"notAllowed"},p(`${e}.readonly`,t)),v=p(`${e}.selected`,t);return(0,ue.merge)(o(o(o(o(o(o(o(o({},((j=t==null?void 0:t.states)==null?void 0:j.default)!==!1?p(e,t):null),((d=t==null?void 0:t.states)==null?void 0:d.checked)!==!1?b(c,"checked"):null),b(C,"focus")),((s=t==null?void 0:t.states)==null?void 0:s.hover)!==!1?b(a,"hover"):null),((g=t==null?void 0:t.states)==null?void 0:g.selected)!==!1?b(v,"selected"):null),((D=t==null?void 0:t.states)==null?void 0:D.active)!==!1?b(r,"active"):null),((U=t==null?void 0:t.states)==null?void 0:U.disabled)!==!1?b(i,"disabled"):null),((B=t==null?void 0:t.states)==null?void 0:B.readonly)!==!1?b(x,"readonly"):null),t==null?void 0:t.mergeObject)}var rt=(e,t)=>o(o(o(o(o(o(o(o({},(t==null?void 0:t.default)!==!1?e:null),(t==null?void 0:t.checked)!==!1?b(f(e,"checked"),"checked"):null),b(f(e,"focus"),"focus")),(t==null?void 0:t.selected)!==!1?b(f(e,"selected"),"selected"):null),(t==null?void 0:t.hover)!==!1?b(f(e,"hover"),"hover"):null),(t==null?void 0:t.active)!==!1?b(f(e,"active"),"active"):null),(t==null?void 0:t.disabled)!==!1?b(f(e,"disabled"),"disabled"):null),(t==null?void 0:t.readonly)!==!1?b(f(e,"readonly"),"readonly"):null),me=rt;var L=W(require("tinycolor2"));var nt=(e,t)=>{if(t==="default")return e;let r=t==="checked"?"selected":t,c=O(),i=c.action[`${t}Opacity`];return L.default.mix(e,(0,L.default)(e).isLight()?c.action[r].light:c.action[r].dark,100*i).toRgbString()},fe=nt;function V(e){var c,i,a,C,x,v,T,j;let t=(0,be.cloneDeep)(e);t.lightenColor=(c=e.lightenColor)!=null?c:(d,s)=>ae(d,s!=null?s:e.lightenRatio),t.darkenColor=(i=e.darkenColor)!=null?i:(d,s)=>le(d,s!=null?s:e.darkenRatio),t.getContrastText=(a=e.getContrastText)!=null?a:ce,Object.entries(e).forEach(([d,s])=>{var D,U,B;let g=s;ie(g)?t[d]={main:g.main,light:(D=g.light)!=null?D:t.lightenColor(g.main),dark:(U=g.dark)!=null?U:t.darkenColor(g.main),contrastText:(B=g.contrastText)!=null?B:t.getContrastText(g.main)}:t[d]=s}),t.border.article=(C=t.border.article)!=null?C:t.secondary.main,t.border.field=(x=t.border.field)!=null?x:t.text.primary,t.border.section=(v=t.border.section)!=null?v:t.primary.main;function r(d){var s,g;return typeof d=="string"?{dark:d,light:d}:{dark:(s=d.dark)!=null?s:d.light,light:(g=d.light)!=null?g:d.dark}}t.action.active=r(t.action.active),t.action.disabled=r(t.action.disabled),t.action.focus=r(t.action.focus),t.action.hover=r(t.action.hover),t.action.readonly=r(t.action.readonly),t.action.selected=r(t.action.selected),t.buildStateObject=b,t.getColor=fe,t.getStatesForColors=P,t.getOneState=f,t.getStatesFromDefinition=me,t.getStatesFromPath=n,t.gray=(T=t.gray)!=null?T:{};for(let d=1;d<=18;d++){let s=Math.round(13.37962962962963*d);t.gray[d*50]=(j=t.gray[d*50])!=null?j:`rgb(${s},${s},${s})`}return t}var pe="#004085",it="#cce5ff",q="white";function ge(){let e=O();return e.getStatesFromDefinition({backgroundColor:e.background.paper,color:e.text.primary},{active:!1,checked:!1,default:!1,disabled:!1,hover:!1,focus:!1,readonly:!1})}function O(e){let t=e===!0,r=typeof e!="boolean"?e:void 0;return window.currentPalette&&!t||(window.currentPalette=V((0,E.merge)(z,window.defaultPalette,r!=null?r:window.customPalette))),window.currentPalette}function J(){var r;let e=(0,E.cloneDeep)((r=window.currentPalette)!=null?r:O()),t={palette:m(o({},e),{lightenColor:void 0,darkenColor:void 0,getContrastText:void 0,buildStateObject:void 0,getColor:void 0,getOneState:void 0,getStatesForColors:void 0,getStatesFromDefinition:void 0,getStatesFromPath:void 0}),accordion:{borderColor:e.border.section},buttons:{accordion:{backgroundColor:e.primary.main,borderColor:e.border.section,color:e.primary.contrastText},accordionPrimary:{backgroundColor:e.primary.main,borderColor:e.border.section,color:e.primary.contrastText},close:m(o({},P({color:e.text.primary,backgroundColor:e.background.paper})),{backgroundColor:"transparent"}),collapsibleAsidePanelTitle:{color:e.text.primary},deletableInputButton:{backgroundColor:"transparent",color:e.secondary.main,active:{color:e.darkenColor(e.secondary.main,40)},disabled:{color:e.secondary.main},focus:{color:e.darkenColor(e.secondary.main,20)},hover:{color:e.darkenColor(e.secondary.main,20)}},icon:{backgroundColor:e.secondary.main,color:e.secondary.contrastText,hover:{color:e.secondary.contrastText},focus:{color:e.secondary.contrastText}},iconAlert:{backgroundColor:"transparent",color:"#e5c200",active:{backgroundColor:"transparent",color:(0,S.default)("#e5c200").darken(10).toRgbString()},focus:{backgroundColor:"transparent",color:(0,S.default)("#e5c200").darken(5).toRgbString()},hover:{backgroundColor:"transparent",color:(0,S.default)("#e5c200").darken(5).toRgbString()}},iconPrimary:{backgroundColor:e.primary.main,color:e.primary.contrastText,active:{color:e.primary.contrastText},focus:{color:e.primary.contrastText},hover:{color:e.primary.contrastText}},iconToggled:{backgroundColor:e.primary.main,color:e.primary.contrastText,active:{color:e.primary.contrastText},focus:{color:e.common.white},hover:{color:e.common.white}},iconOutline:{backgroundColor:e.background.paper,color:e.primary.main,borderColor:e.border.article},link:{backgroundColor:"transparent",color:e.text.primary,borderColor:"transparent",active:{color:e.text.primary},focus:{color:e.text.primary},hover:{color:e.text.primary}},openTab:{backgroundColor:e.primary.main,color:e.primary.contrastText,borderColor:e.primary.dark},outline:{backgroundColor:e.background.paper,color:e.getContrastText(e.background.paper),borderColor:e.primary.main},outlineDanger:{backgroundColor:e.background.paper,color:e.primary.main,borderColor:e.primary.main,active:{borderColor:e.darkenColor(e.error.dark,e.action.activeOpacity*80),backgroundColor:e.darkenColor(e.error.dark,e.action.activeOpacity*80),color:e.getContrastText(e.darkenColor(e.error.dark,e.action.activeOpacity*80))},focus:{borderColor:e.darkenColor(e.error.dark,e.action.activeOpacity*60),backgroundColor:e.darkenColor(e.error.dark,e.action.activeOpacity*60),color:e.getContrastText(e.darkenColor(e.error.dark,e.action.activeOpacity*60))},hover:{borderColor:e.darkenColor(e.error.dark,e.action.activeOpacity*70),backgroundColor:e.darkenColor(e.error.dark,e.action.activeOpacity*70),color:e.getContrastText(e.darkenColor(e.error.dark,e.action.activeOpacity*70))}},outlineWarning:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.primary.main,active:{borderColor:e.warning.main,backgroundColor:e.warning.main,color:e.warning.contrastText},focus:{borderColor:e.warning.main,backgroundColor:e.warning.main,color:e.warning.contrastText},hover:{borderColor:e.warning.main,backgroundColor:e.warning.main,color:e.warning.contrastText}},primary:{backgroundColor:e.primary.main,color:e.primary.contrastText,borderColor:e.primary.main},secondary:{backgroundColor:e.secondary.main,color:e.secondary.contrastText,borderColor:e.secondary.main},tab:{backgroundColor:e.background.paper,color:e.getContrastText(e.background.paper),borderColor:e.border.article},toggleIcon:{color:e.secondary.contrastText,backgroundColor:e.secondary.main,borderColor:e.border.field,danger:{backgroundColor:e.error.main,borderColor:e.border.field,color:e.error.contrastText},toggled:{backgroundColor:e.primary.main,borderColor:e.border.field,color:e.primary.contrastText}},transparentIcon:{backgroundColor:"transparent",color:e.text.primary,hover:{color:e.primary.main},focus:{color:e.primary.main}}},dropzone:{backgroundColor:e.background.paper,borderColor:e.border.section,color:e.background.default},form:{backgroundColor:e.background.paper,fields:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.border.field},radio:{backgroundColor:"transparent",color:(0,S.default)(window.currentPalette.text.primary).lighten(15).toRgbString(),borderColor:e.text.primary,active:{backgroundColor:"transparent",color:(0,S.default)(window.currentPalette.text.primary).lighten(0).toRgbString()},checked:{backgroundColor:"red",color:(0,S.default)(window.currentPalette.text.primary).lighten(15).toRgbString()},disabled:{backgroundColor:"transparent",color:(0,S.default)(window.currentPalette.text.primary).lighten(55).toRgbString()},hover:{backgroundColor:"transparent",color:(0,S.default)(window.currentPalette.text.primary).lighten(7).toRgbString()},readonly:{color:(0,S.default)(window.currentPalette.text.primary).lighten(38).toRgbString(),backgroundColor:"transparent"}}},modal:{borderColor:e.border.section,backgroundColor:e.background.paper},notifications:{error:{backgroundColor:e.error.light,color:e.getContrastText(e.error.light),borderColor:e.error.main},success:{backgroundColor:e.success.light,color:e.getContrastText(e.success.light),borderColor:e.success.main},warning:{backgroundColor:e.warning.light,color:e.getContrastText(e.warning.light),borderColor:e.warning.main}},pagination:{color:e.primary.contrastText,backgroundColor:e.primary.main},printView:{main:{backgroundColor:e.background.default,page:{backgroundColor:e.background.paper,borderColor:e.border.article}},list:{table:{borderColor:e.border.section},th:{backgroundColor:"#eee"},cell:{borderColor:e.border.article}}},scrollbars:{bar:{color:e.secondary.main,backgroundColor:e.background.default,hover:{backgroundColor:e.lightenColor(e.background.default,10),color:e.lightenColor(e.secondary.main,10)},active:{backgroundColor:e.lightenColor(e.background.default,10),color:e.lightenColor(e.secondary.main,20)}}},tab:{backgroundColor:e.background.paper,borderColor:e.border.section},topBar:{backgroundColor:e.primary.main},accent:e.text.accent,background:e.background.default,iconWarning:"rgb(246 222 87)",muted:e.text.disabled,primary:e.primary.main,secondary:e.secondary.main,text:e.text.primary,warning:e.warning.main,danger:e.error.main,link:e.text.accent,success:e.success.main,title:e.text.title,lightBorder:"hsl(0, 12%, 85%)",outlineColor:e.lightenColor(e.getColor(e.primary.main,"selected"),30),baseGrey:"#dfdfdf",darkBorder:"hsl(247, 98%, 10%)",darkBlue:pe,disabled:"#efefef",favorite:"#e5c200",filtersRowBackground:q,formBackground:q,grey:"#777",gridRowHighlight:"#e1f3ff",highlightButton:"hsl(61, 100%, 91%)",lightBlue:it,oddRow:"#f0f5ff",paginationBackground:"hsl(229deg, 75%, 90%)",readOnlyText:"#737373",required:"darkred",scrollbarBack:"rgb(206, 206, 206)",scrollbarFront:"rgb(156, 156, 156)",sysExceptionNotificationBg:"#f8d7da",sysMessageNotificationBg:"#fff3cd",tabBackground:"white",treeRuler:"#ccc",white:q,priorityNone:"gray",priorityLow:e.success.main,priorityNormal:"rgb(255 211 34)",priorityHigh:"rgb(255 150 0)",priorityUrgent:"red",charts:{front:pe}};return H([t==null?void 0:t.buttons,t==null?void 0:t.form]),t}var at={primary:{border:"1px solid",borderLeft:"12px solid",borderRadius:"alerts",display:"flex",flexDirection:"column",fontWeight:"normal",maxHeight:"60vh",overflow:"auto",p:0,"&:focus":{outline:"none"},".notification__header":{display:"flex",alignItems:"center",justifyContent:"space-between",position:"sticky",top:0,width:"100%",p:l(5)},".notification__title":{fontSize:18,fontWeight:"bold",color:"palette.text.primary",display:"flex",gap:l(5),alignItems:"center"},".notification__closeButton":{flexShrink:0},".notification__body":{alignItems:"center",display:"flex",flexDirection:"row",gap:l(5),width:"100%",p:l(5)},".notification__header ~ .notification__body":{pt:0},".notification__content":{display:"flex",alignItems:"stretch",flexDirection:"column",gap:l(5),width:"100%"},".notification__icon":{flexShrink:0,height:"iconMd",svg:{height:"iconMd",width:"iconMd"}},".notification__message":{display:"flex",flexDirection:"column",fontWeight:"normal",gap:l(3),width:"100%",wordBreak:"break-word"},".notification__trace":{maxWidth:"100%",overflow:"hidden",maxHeight:"30vh",flexShrink:0,backgroundColor:"rgba(10,10,10,0.02)",pt:l(5),".notification__traceLabel":{pl:l(5)},".notification__traceText":{fontWeight:"normal",p:l(5),maxHeight:"30vh",overflow:"auto",maxWidth:"100%",position:"relative"}},"&:focus .notification__closeButton":w},warning:{variant:"alerts.primary","&, & .notification__header":o({},p("notifications.warning"))},danger:{variant:"alerts.primary","&, & .notification__header":o({},p("notifications.error"))},success:{variant:"alerts.primary","&, & .notification__header":o({},p("notifications.success"))}},he=at;var lt={inherit:{color:"inherit",background:"inherit",border:"none",borderRadius:0,font:"inherit",cursor:"pointer",padding:0,margin:0},collapsibleAsidePanelTitle:o({variant:"buttons.inherit",display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},n("buttons.collapsibleAsidePanelTitle")),primary:m(o({borderWidth:"2px",borderStyle:"solid",variant:"text.default",py:u({0:3,4:4}),px:u({0:5,4:6}),display:"inline-block",width:u({0:"100%",1:"auto"}),cursor:"pointer",borderRadius:"buttons",fontWeight:"normal",userSelect:"none",transition:"background-color 300ms ease-out, color 300ms ease-out",wordBreak:"keep-all"},n("buttons.primary")),{"&:focus, &:focus-visible":{outlineColor:"#00daff"}}),"primary-sm":o({variant:"buttons.primary","&:focus, &:focus-visible":{}},y),secondary:o({variant:"buttons.primary","&:focus, &:focus-visible":{},borderWidth:"0px",borderStyle:"solid"},n("buttons.secondary")),"secondary-sm":o({variant:"buttons.secondary"},y),"light-secondary":o({variant:"buttons.secondary"},n("buttons.lightSecondary")),danger:o({variant:"buttons.primary","&:focus, &:focus-visible":{}},n("buttons.danger")),"danger-sm":o({variant:"buttons.danger"},y),warning:o({variant:"buttons.primary","&:focus, &:focus-visible":{}},n("buttons.warning")),"warning-sm":o({variant:"buttons.warning"},y),close:o({cursor:"pointer",ml:"auto",mr:"2",borderRadius:"buttons"},n("buttons.close")),accordion:{variant:"buttons.primary","&:focus, &:focus-visible":{},cursor:"pointer",m:l(0),py:u({0:3,4:4}),px:u({0:5,4:6}),width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:"buttons",textAlign:"left",fontFamily:"heading",fontSize:"text.default",textDecoration:"none",textTransform:"none",fontWeight:"bold",border:"none",transition:"background-color 300ms ease-out, color 300ms ease-out",userSelect:"text","&, *":n("buttons.accordion")},"accordion-primary":o({variant:"buttons.accordion",border:"none"},n("buttons.accordionPrimary")),icon:m(o({display:"flex",justifyContent:"center",alignItems:"center",p:l(0),m:l(0),bg:"secondary",cursor:"pointer",transition:"background-color 300ms ease-out, color 300ms ease-out",borderRadius:"buttons",border:"none"},n("buttons.icon")),{svg:{width:"auto",height:"20px",display:"block"},"&.isToggled":o({},n("buttons.iconToggled"))}),"icon-primary":o({variant:"buttons.icon"},n("buttons.iconPrimary")),"icon-outline":o({variant:"buttons.icon",bg:"white",border:"1px solid"},n("buttons.iconOutline")),"icon-outline-danger":o({variant:"buttons.icon",bg:"white",border:"1px solid"},n("buttons.outlineDanger")),"icon-only":o({variant:"buttons.icon"},n("buttons.iconOnly")),link:o({variant:"inherit",width:"auto",border:"none",textDecoration:"underline",px:2,py:1,borderRadius:"buttons",cursor:"pointer",textTransform:"none",transition:"background-color 300ms ease-out, color 300ms ease-out"},n("buttons.link")),"link-sm":o({variant:"buttons.link"},y),outline:o({variant:"buttons.primary",borderWidth:"2px",borderStyle:"solid",borderRadius:"buttons","&:focus, &:focus-visible":{}},n("buttons.outline")),"outline-sm":o({variant:"buttons.outline"},y),"transparent-sm":o({variant:"buttons.outline","&:focus, &:focus-visible":{},bg:"transparent",color:"inherit",border:"none",font:"inherit",textTransform:"inherit"},y),"outline-danger":o({variant:"buttons.outline","&:focus, &:focus-visible":{}},n("buttons.outlineDanger")),"outline-danger-sm":o({variant:"buttons.outline-danger"},y),"outline-warning":o({variant:"buttons.outline","&:focus, &:focus-visible":{}},n("buttons.outlineWarning")),"outline-warning-sm":o({variant:"buttons.outline-warning"},y),"outline-extended":{variant:"buttons.outline",gridColumnStart:1,gridColumnEnd:3,width:"100%"},"outline-danger-extended":{variant:"buttons.outline-danger",gridColumnStart:1,gridColumnEnd:3,width:"100%"},"primary-extended":{variant:"buttons.primary","&:focus, &:focus-visible":{},gridColumnStart:1,gridColumnEnd:3,width:"100%"},query:{extended:{variant:"buttons.outline","&:focus, &:focus-visible":{},gridColumnStart:1,gridColumnEnd:3}},tableAccordion:o({variant:"buttons.accordion",fontSize:"text.default",p:l(3),wordBreak:"keep-all",a:{color:"background"}},n("buttons.tableAccordion")),tableHeader:o({variant:"buttons.tableAccordion",alignItems:"center",justifyContent:"center",height:"100%",border:"none",svg:{ml:l(2)}},n("buttons.tableHeader"))},Ce=lt;var ct=o({display:"inline-flex",borderRadius:"default",flexBasis:"32px",flexShrink:0,width:"32px",height:"32px",alignItems:"center",justifyContent:"center",p:"3px",border:"1px solid",svg:{width:"20px"}},n("form.fields",{states:{active:!1,hover:!1,focus:!1}})),ye=ct;var dt=m(o({borderRadius:"default"},n("form.fields",{states:{active:!1,focus:!1,hover:!1}})),{backgroundColor:"unset",alignItems:"center","&.nativeCheckbox":{appearance:"none",width:"25px",height:"25px",border:"solid 1px #cccccc",marginRight:"8px",position:"relative",cursor:"pointer","&:checked::before":{content:'"\u2713"',color:"palette.text.primary",position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",top:0,left:0,right:0,bottom:0,fontSize:"larger",fontWeight:"bolder",borderRadius:"5px",cursor:"pointer"},"&:indeterminate::before":{content:'"-"',color:"palette.text.primary",position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",top:"-1px",left:0,right:0,bottom:0,fontSize:"xx-large",fontWeight:"600",borderRadius:"5px",cursor:"pointer"}}}),xe=dt;var st=m(o({display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:"stretch",gap:l(2),width:"100%","&.readOnly":{input:{color:"Text.fields",bg:"Background.fields"}},".iconInput":{width:"100%",position:"relative"},'input:hover~.delete_date_button:not(:disabled,[aria-selected="true"]), input:hover~.delete_date_button:not(:disabled,[aria-selected="true"]) path, .delete_date_button':o({position:"absolute",right:"59px",padding:0,top:"calc(50% - 10px)",margin:0,marginRight:0,borderRadius:"100%",width:"20px",height:"20px"},n("buttons.icon-outline")),input:{flexShrink:1},"& > div":{display:"flex",gap:l(2),flexShrink:0,width:"auto",maxWidth:"100%",minWidth:0,button:{width:"45px",flexShrink:0}}},n("form.fields",{states:{hover:!1,active:!1,focus:!1}})),{backgroundColor:void 0}),Se=st;var ut={display:"flex",gap:l(1),justifyContent:"stretch",alignItems:"center","&.readOnly":{input:o({},p("form.fields"))},input:{height:"50px",width:"100%"},button:{display:"flex",width:"45px",flexShrink:0,height:"50px"}},Te=ut;var mt=m(o({variant:"text.default",border:"1px solid",borderRadius:"default",padding:u({0:3,3:4}),"::placeholder":{color:"#b0b0b0"}},n("form.fields",{states:{active:!1,hover:!1,focus:!1}})),{material:{input:{borderLeft:"none",borderRight:"none",borderTop:"none",borderBottomColor:"palette.border.section","& + .input__underline":{transform:"scale(1)"},"&:focus":{outline:"none","~::after":{animationName:"growHorizontal",animationDuration:"150ms",animationTimingFunction:"ease-out",content:'""',display:"block",height:"0",outlineColor:"palette.primary.main",outlineStyle:"solid",outlineWidth:"1.5px",outlineOffset:0,position:"fixed",transformOrigin:"center center",width:"100%"}}}}}),ke=mt;var ft={variant:"text.default",alignItems:"center",width:"auto",textTransform:"none",cursor:"pointer","&:not(.radio-label)":{fontWeight:"bold"},"&.required":{position:"relative","&::before":{color:"danger",position:"absolute",content:'"*"',top:0,left:"-10px"}},"&:last-of-type":{"input, textarea, select":{mb:l(0)}}},ve=ft;var bt=o({width:"32px",height:"32px",input:{height:"32px !important"}},n("form.radio")),we=bt;var pt=o({variant:"text.default",display:"inline-block",fontFamily:"body",p:l(4),pr:7,borderRadius:"default",width:"100%",maxWidth:"100%"},n("form.fields",{states:{active:!1,hover:!1,focus:!1}})),Oe=pt;var gt=o({variant:"text.default",height:"100%",padding:"4px",borderRadius:"default",border:"1px solid",width:"100%",transition:"background-color 100ms ease-out, color 100ms ease-out",overflow:"auto",option:m(o({padding:2},ge()),{"&:checked":{backgroundColor:window.currentPalette.getColor(window.currentPalette.background.paper,"selected"),color:window.currentPalette.getContrastText(window.currentPalette.getColor(window.currentPalette.background.paper,"selected"))}}),"+ svg":{display:"none"}},n("form.fields",{states:{active:!1,hover:!1,focus:!1}})),Pe=gt;var ht={"+ span":{fontSize:14,fontWeight:"normal",wordBreak:"break-all"},backgroundColor:"form.fields.checked.borderColor"},Ie=ht;var Ct={"&, & textarea":{height:"100%",minHeight:"130px",resize:"vertical"},textarea:{variant:"forms.input"}},Re=Ct;var yt={border:"1px solid",borderColor:"palette.border.field",display:"inline-block",position:"relative",pr:"45px",".deletableInput__input":{border:"none"},".deletableInput__deleteButton":o({height:"100%",outlineOffset:"-2px",position:"absolute",right:0,top:0,width:"45px"},n("buttons.deletableInputButton")),"&:focus-within:not(.asMaterial)":m(o({},w),{".deletableInput__input:focus":{outline:"none"},".deletableInput__deleteButton:focus":{outline:"none"}}),"&.asMaterial":{borderLeft:"none",borderRight:"none",borderTop:"none",borderBottomColor:"palette.border.section","& + .input__underline":{transform:"scale(1)"},".deletableInput__input:focus":{outline:"none","~.input__underline::after":{animationName:"growHorizontal",animationDuration:"150ms",animationTimingFunction:"ease-out",content:'""',display:"block",height:"0",outlineColor:"palette.primary.main",outlineStyle:"solid",outlineWidth:"1.5px",outlineOffset:0,position:"absolute",transformOrigin:"center center",left:0,right:0}}}},je=yt;var xt=()=>({checkbox:xe,customCheckbox:ye,dateInput:Se,deletableInput:je,iconInput:Te,input:ke,label:ve,radio:we,select:Oe,selectMultiple:Pe,switch:Ie,textarea:Re,'input[type="date"]':{variant:"forms.input"}}),De=xt;var St=e=>e,Tt={},Br=new class extends K.EventEmitter{};function N(e){return St((0,Ue.merge)({alerts:he,breakpoints:["0px","250px","500px","700px","1000px","1260px","1580px"],buttons:Ce,colors:J(),fonts:{body:"Arial",heading:"inherit",monospace:"Menlo, monospace"},fontSizes:Array(60).fill(1).map((t,r)=>r),forms:De(),layout:Tt,lineHeights:{body:1.5,heading:1.125},letterSpacings:{body:"0.01em",heading:"-0.015em"},radii:{alerts:0,buttons:0,default:0},shadows:{modals:"",tabs:""},space:[0,2,4,8,12,16,24,32,40,48,64,80,96,112,128],sizes:{applicationMenu:"350px",floatingNotifications:"min(550px, calc(100vw - 30px))",root:"992px",mainImage:"64px",twoColumns:"calc(992px + 350px)",twoColumnsCentered:"calc(992px + 350px + 16px)",iconxs:"12px",iconsm:"16px",iconmd:"22px",iconlg:"32px",iconxl:"48px"},styles:{root:{"*":{fontFamily:"body",fontWeight:"body",fontSize:"100%",height:"100%",code:{fontFamily:"monospace"}},h1:{fontSize:u({0:26,3:32})},h2:{fontSize:u({0:22,3:28})},h3:{fontSize:u({0:19,3:25})},h4:{fontSize:u({0:18,3:22})},h5:{fontSize:u({0:18,3:22})},h6:{fontSize:u({0:17,3:17})},"h1,h2,h3,h4,h5,h6":{letterSpacing:"heading",lineHeight:"heading",variant:"text.title"},"*:not(h1, h2, h3, h4, h5, h6, code)":{fontFamily:"body",fontSize:16,fontWeight:"body",letterSpacing:"body",lineHeight:"body"}}},zIndices:{stickyElements:600,menu:1e3,maximizedTables:1100,modal:1200,tooltip:1400,notifications:1600,contextMenu:1800},useRootStyles:!0},e!=null?e:{}))}var Q=new class extends R.EventEmitter{};function G(e){let[t,r]=(0,_e.useState)(N(e));return(0,R.useMount)(()=>Q.on("newStyles",c=>{let i=(0,R.setValueByPath)({},c.path,c.styles);r(a=>(0,Be.merge)(o({},a),i))})),t}var ze=require("@apia/util"),M=require("react"),Fe=require("theme-ui");var Ae=require("theme-ui");var Me=require("theme-ui/jsx-runtime"),X=({children:e,customTheme:t})=>{let r=N(t);return(0,Me.jsx)(Ae.ThemeProvider,{theme:r,children:e})};var h=require("theme-ui/jsx-runtime");function kt(e,t,r,c,i=!1){let a=(0,ze.setValueByPath)({},t,r);return Object.assign(C=>{let x=(0,M.useRef)(0);return i?(0,h.jsx)(X,{customTheme:a,children:(0,h.jsx)(M.Suspense,{children:(0,h.jsx)(We,{avoidFirstRender:x,children:(0,h.jsx)(c,o({},C))})})}):(0,h.jsx)(X,{customTheme:a,children:(0,h.jsx)(M.Suspense,{children:(0,h.jsx)(We,{avoidFirstRender:x,children:(0,h.jsx)(Fe.Box,m(o({className:"variant__holder"},$(t)),{children:(0,h.jsx)(c,o({},C))}))})})})},{displayName:e})}var We=({avoidFirstRender:e,children:t})=>(e.current++,e.current<=1?null:(0,h.jsx)(h.Fragment,{children:t}));function vt(e,t){Q.emit("newStyles",{path:e,styles:t})}var Ee=require("theme-ui");var Ne=require("theme-ui/jsx-runtime"),wt=({children:e,customTheme:t})=>{let r=G(t);return console.log({theme:r}),(0,Ne.jsx)(Ee.ThemeProvider,{theme:r,children:e})};0&&(module.exports={ThemeProvider,focusOutline,getVariant,injectStyles,makeStyledComponent,responsive,smallButton,spacing,useMainTheme});
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { ThemeProvider as ThemeProvider$1, Box } from 'theme-ui';
|
|
3
|
+
import { useState, createContext, useRef, Suspense } from 'react';
|
|
4
|
+
import { cloneDeep, merge } from 'lodash';
|
|
5
|
+
import { getValueByPath, EventEmitter, useMount, setValueByPath } from '@apia/util';
|
|
6
|
+
import tinycolor from 'tinycolor2';
|
|
7
|
+
import { focusOutline as focusOutline$1 } from '@apia/theme';
|
|
8
|
+
|
|
9
|
+
function responsive$1(values) {
|
|
10
|
+
var _a;
|
|
11
|
+
const returnArray = [];
|
|
12
|
+
const max = 6;
|
|
13
|
+
for (let i = 0; i <= max; i++)
|
|
14
|
+
returnArray[i + 1] = (_a = values[i]) != null ? _a : null;
|
|
15
|
+
if (values.print)
|
|
16
|
+
returnArray[0] = values.print;
|
|
17
|
+
else {
|
|
18
|
+
for (let i = 5; i >= 0; i--) {
|
|
19
|
+
if (values[i] !== void 0)
|
|
20
|
+
returnArray[0] = values[i];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return returnArray;
|
|
24
|
+
}
|
|
25
|
+
function spacing(index) {
|
|
26
|
+
var _a;
|
|
27
|
+
return (_a = defaultPalette.spacing(index)) != null ? _a : index;
|
|
28
|
+
}
|
|
29
|
+
const smallButton = {
|
|
30
|
+
py: 2,
|
|
31
|
+
px: 4,
|
|
32
|
+
fontSize: "0.9em"
|
|
33
|
+
};
|
|
34
|
+
const focusOutline = {
|
|
35
|
+
outlineColor: "outlineColor",
|
|
36
|
+
outlineWidth: "3px",
|
|
37
|
+
outlineStyle: "solid",
|
|
38
|
+
outlineOffset: "-3px"
|
|
39
|
+
};
|
|
40
|
+
function getVariant(variant) {
|
|
41
|
+
return { variant, "data-variant": variant };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const opacity = {
|
|
45
|
+
light: "#009",
|
|
46
|
+
dark: "#fff"
|
|
47
|
+
};
|
|
48
|
+
const disabled = "#ccc";
|
|
49
|
+
const spacingArray = Array(50).fill(1).map((_, i) => {
|
|
50
|
+
return responsive$1({
|
|
51
|
+
0: Math.ceil(i / 2.5),
|
|
52
|
+
1: Math.ceil(i / 2.1),
|
|
53
|
+
2: Math.ceil(i / 1.7),
|
|
54
|
+
3: Math.ceil(i / 1.3),
|
|
55
|
+
4: i
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
const defaultPalette = {
|
|
59
|
+
action: {
|
|
60
|
+
disabled,
|
|
61
|
+
disabledOpacity: 0.6,
|
|
62
|
+
active: opacity,
|
|
63
|
+
activeOpacity: 0.4,
|
|
64
|
+
focus: opacity,
|
|
65
|
+
focusOpacity: 0.2,
|
|
66
|
+
hover: opacity,
|
|
67
|
+
hoverOpacity: 0.3,
|
|
68
|
+
readonly: disabled,
|
|
69
|
+
readonlyOpacity: 0.4,
|
|
70
|
+
selected: opacity.light,
|
|
71
|
+
selectedOpacity: 0.6
|
|
72
|
+
},
|
|
73
|
+
background: {
|
|
74
|
+
default: "#f4f4f4",
|
|
75
|
+
overlay: "rgba(0, 0, 0, 0.2)",
|
|
76
|
+
paper: "white"
|
|
77
|
+
},
|
|
78
|
+
border: {
|
|
79
|
+
article: "#cacaca",
|
|
80
|
+
field: "#444",
|
|
81
|
+
section: "#aaa"
|
|
82
|
+
},
|
|
83
|
+
common: {
|
|
84
|
+
black: "black",
|
|
85
|
+
white: "white"
|
|
86
|
+
},
|
|
87
|
+
info: {
|
|
88
|
+
main: "#fff"
|
|
89
|
+
},
|
|
90
|
+
primary: {
|
|
91
|
+
main: "#00496c"
|
|
92
|
+
},
|
|
93
|
+
secondary: {
|
|
94
|
+
main: "#6c757d"
|
|
95
|
+
},
|
|
96
|
+
spacing: (index) => {
|
|
97
|
+
return spacingArray[index];
|
|
98
|
+
},
|
|
99
|
+
text: {
|
|
100
|
+
accent: "#609",
|
|
101
|
+
disabled: "#555",
|
|
102
|
+
icon: "white",
|
|
103
|
+
link: "#00496c",
|
|
104
|
+
primary: "#4a4a4a",
|
|
105
|
+
secondary: "white",
|
|
106
|
+
title: "#00496c"
|
|
107
|
+
},
|
|
108
|
+
error: {
|
|
109
|
+
main: "#db7678",
|
|
110
|
+
light: "#fff2f4"
|
|
111
|
+
},
|
|
112
|
+
success: {
|
|
113
|
+
main: "#8bde8b",
|
|
114
|
+
light: "#e7ffd9"
|
|
115
|
+
},
|
|
116
|
+
warning: {
|
|
117
|
+
main: "#f8f588",
|
|
118
|
+
light: "#fffdd9"
|
|
119
|
+
},
|
|
120
|
+
darkenRatio: 15,
|
|
121
|
+
lightenRatio: 35,
|
|
122
|
+
responsive: responsive$1,
|
|
123
|
+
queryColumnsMultiplier: 2
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
var __defProp$n = Object.defineProperty;
|
|
127
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
128
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
129
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
130
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
131
|
+
var __spreadValues$n = (a, b) => {
|
|
132
|
+
for (var prop in b || (b = {}))
|
|
133
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
134
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
135
|
+
if (__getOwnPropSymbols$n)
|
|
136
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
137
|
+
if (__propIsEnum$n.call(b, prop))
|
|
138
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
139
|
+
}
|
|
140
|
+
return a;
|
|
141
|
+
};
|
|
142
|
+
function buildColorsObject(definition) {
|
|
143
|
+
return __spreadValues$n(__spreadValues$n({}, definition), definition.borderColor ? {
|
|
144
|
+
borderLeftColor: definition.borderColor,
|
|
145
|
+
borderRightColor: definition.borderColor,
|
|
146
|
+
borderBottomColor: definition.borderColor,
|
|
147
|
+
borderTopColor: definition.borderColor
|
|
148
|
+
} : void 0);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
var __defProp$m = Object.defineProperty;
|
|
152
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
153
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
154
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
155
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
156
|
+
var __spreadValues$m = (a, b) => {
|
|
157
|
+
for (var prop in b || (b = {}))
|
|
158
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
159
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
160
|
+
if (__getOwnPropSymbols$m)
|
|
161
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
162
|
+
if (__propIsEnum$m.call(b, prop))
|
|
163
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
164
|
+
}
|
|
165
|
+
return a;
|
|
166
|
+
};
|
|
167
|
+
const getColorState = (definition, state) => {
|
|
168
|
+
var _a, _b, _c, _d;
|
|
169
|
+
if (state === "default")
|
|
170
|
+
return buildColorsObject(definition);
|
|
171
|
+
const palette = getPalette();
|
|
172
|
+
const opacity = palette.action[`${state}Opacity`];
|
|
173
|
+
const actualState = state === "checked" ? "selected" : state;
|
|
174
|
+
definition = Object.fromEntries(
|
|
175
|
+
Object.entries(definition).map(([name, value]) => {
|
|
176
|
+
if ([
|
|
177
|
+
"backgroundColor",
|
|
178
|
+
"borderColor",
|
|
179
|
+
"borderLeftColor",
|
|
180
|
+
"borderRightColor",
|
|
181
|
+
"borderBottomColor",
|
|
182
|
+
"borderTopColor",
|
|
183
|
+
"color"
|
|
184
|
+
].includes(name) && (value != null ? value : "").startsWith("palette"))
|
|
185
|
+
value = getValueByPath(
|
|
186
|
+
palette,
|
|
187
|
+
value.slice("palette.".length)
|
|
188
|
+
);
|
|
189
|
+
return [name, value];
|
|
190
|
+
})
|
|
191
|
+
);
|
|
192
|
+
const calculatedBackgroundColor = tinycolor.mix(
|
|
193
|
+
(_a = definition.backgroundColor) != null ? _a : "",
|
|
194
|
+
tinycolor((_b = definition.backgroundColor) != null ? _b : "").isLight() ? palette.action[actualState].light : palette.action[actualState].dark,
|
|
195
|
+
100 * opacity
|
|
196
|
+
).toRgbString();
|
|
197
|
+
return buildColorsObject(__spreadValues$m(__spreadValues$m({}, definition.backgroundColor ? {
|
|
198
|
+
backgroundColor: state === "checked" ? (_c = definition.backgroundColor) != null ? _c : "" : calculatedBackgroundColor,
|
|
199
|
+
color: state === "checked" ? tinycolor.mix(
|
|
200
|
+
tinycolor((_d = definition.color) != null ? _d : "black"),
|
|
201
|
+
tinycolor(palette.action.selected.dark),
|
|
202
|
+
100 * palette.action.selectedOpacity
|
|
203
|
+
).toRgbString() : window.currentPalette.getContrastText(
|
|
204
|
+
calculatedBackgroundColor
|
|
205
|
+
)
|
|
206
|
+
} : null), definition.borderColor ? {
|
|
207
|
+
borderColor: tinycolor.mix(
|
|
208
|
+
definition.borderColor,
|
|
209
|
+
tinycolor(definition.borderColor).isLight() ? palette.action[actualState].light : palette.action[actualState].dark,
|
|
210
|
+
100 * opacity
|
|
211
|
+
).toRgbString()
|
|
212
|
+
} : null));
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
const applyStatesGetColor = (definition, states) => {
|
|
216
|
+
const newStates = (states == null ? void 0 : states.default) !== false ? cloneDeep(definition) : {};
|
|
217
|
+
if ((states == null ? void 0 : states.active) !== false) {
|
|
218
|
+
newStates.active = getColorState(definition, "active");
|
|
219
|
+
}
|
|
220
|
+
if ((states == null ? void 0 : states.disabled) !== false) {
|
|
221
|
+
newStates.disabled = getColorState(definition, "disabled");
|
|
222
|
+
}
|
|
223
|
+
if ((states == null ? void 0 : states.focus) !== false) {
|
|
224
|
+
newStates.focus = getColorState(definition, "focus");
|
|
225
|
+
}
|
|
226
|
+
if ((states == null ? void 0 : states.hover) !== false) {
|
|
227
|
+
newStates.hover = getColorState(definition, "hover");
|
|
228
|
+
}
|
|
229
|
+
if ((states == null ? void 0 : states.readonly) !== false) {
|
|
230
|
+
newStates.readonly = getColorState(definition, "readonly");
|
|
231
|
+
}
|
|
232
|
+
if ((states == null ? void 0 : states.selected) !== false) {
|
|
233
|
+
newStates.selected = getColorState(definition, "selected");
|
|
234
|
+
}
|
|
235
|
+
if ((states == null ? void 0 : states.checked) !== false) {
|
|
236
|
+
newStates.checked = getColorState(definition, "checked");
|
|
237
|
+
}
|
|
238
|
+
return newStates;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
function applyStates(properties, states) {
|
|
242
|
+
properties.forEach((def) => {
|
|
243
|
+
Object.entries(def).forEach(([key, value]) => {
|
|
244
|
+
if (typeof value === "string")
|
|
245
|
+
return;
|
|
246
|
+
const definition = value;
|
|
247
|
+
if (!definition.active)
|
|
248
|
+
definition.active = {};
|
|
249
|
+
if (!definition.checked)
|
|
250
|
+
definition.checked = {};
|
|
251
|
+
if (!definition.focus)
|
|
252
|
+
definition.focus = {};
|
|
253
|
+
if (!definition.disabled)
|
|
254
|
+
definition.disabled = {};
|
|
255
|
+
if (!definition.hover)
|
|
256
|
+
definition.hover = {};
|
|
257
|
+
if (!definition.selected)
|
|
258
|
+
definition.selected = {};
|
|
259
|
+
const newDefinition = applyStatesGetColor(definition, states);
|
|
260
|
+
def[key] = merge(newDefinition, definition);
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function isColorDefinition(value) {
|
|
266
|
+
return !!value && typeof value === "object" && "main" in value;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
function defaultLighten(color, ratio) {
|
|
270
|
+
return tinycolor(color).lighten(ratio != null ? ratio : 20).toRgbString();
|
|
271
|
+
}
|
|
272
|
+
function defaultDarken(color, ratio) {
|
|
273
|
+
return tinycolor(color).darken(ratio != null ? ratio : 20).toRgbString();
|
|
274
|
+
}
|
|
275
|
+
function defaultGetContrastText(color) {
|
|
276
|
+
const current = tinycolor(color);
|
|
277
|
+
return tinycolor.readability("white", current) < tinycolor.readability("black", current) ? "black" : "white";
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const buildStateObject = (props, state) => {
|
|
281
|
+
switch (state) {
|
|
282
|
+
case "active":
|
|
283
|
+
return {
|
|
284
|
+
"&:active": props,
|
|
285
|
+
"input[role]:active ~ &": props,
|
|
286
|
+
"input[role]:active ~ & path": props
|
|
287
|
+
};
|
|
288
|
+
case "checked":
|
|
289
|
+
return {
|
|
290
|
+
"&:checked": props,
|
|
291
|
+
"input[role]:checked ~ &": props,
|
|
292
|
+
"input[role]:checked ~ & path": props
|
|
293
|
+
};
|
|
294
|
+
case "disabled":
|
|
295
|
+
return {
|
|
296
|
+
"&:disabled": props,
|
|
297
|
+
"input[role]:disabled ~ &": props,
|
|
298
|
+
"input[role]:disabled ~ & path": props
|
|
299
|
+
};
|
|
300
|
+
case "focus": {
|
|
301
|
+
const focusObject = merge({}, focusOutline, props);
|
|
302
|
+
return {
|
|
303
|
+
"&:focus": focusObject,
|
|
304
|
+
"input[role]:focus ~ &": focusObject
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
case "hover": {
|
|
308
|
+
return {
|
|
309
|
+
'&:hover:not([readonly], :disabled,[aria-selected="true"],:active)': props,
|
|
310
|
+
'input[role]:hover:not([readonly], :active, :disabled) ~ &:not(:disabled,[aria-selected="true"])': props,
|
|
311
|
+
'input[role]:hover:not([readonly], :active, :disabled) ~ &:not(:disabled,[aria-selected="true"]) path': props
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
case "readonly":
|
|
315
|
+
return {
|
|
316
|
+
"&[readonly]": props,
|
|
317
|
+
"input[role][readonly] ~ &": props,
|
|
318
|
+
"input[role][readonly] ~ & path": props,
|
|
319
|
+
"&.readonly input ~ &, &.readOnly input ~ &": props,
|
|
320
|
+
"&.readonly input ~ & path, &.readOnly input ~ & path": props,
|
|
321
|
+
"&.readonly, &.readOnly": props
|
|
322
|
+
};
|
|
323
|
+
case "selected":
|
|
324
|
+
return {
|
|
325
|
+
"&:selected": props,
|
|
326
|
+
"input[role]:selected ~ &": props,
|
|
327
|
+
"input[role]:selected ~ & path": props,
|
|
328
|
+
'&[aria-selected="true"]': props
|
|
329
|
+
};
|
|
330
|
+
default:
|
|
331
|
+
return props;
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
function getColorsByPath(path, options) {
|
|
336
|
+
return merge(
|
|
337
|
+
buildColorsObject({
|
|
338
|
+
color: `${path}.color`,
|
|
339
|
+
backgroundColor: `${path}.backgroundColor`,
|
|
340
|
+
borderColor: `${path}.borderColor`
|
|
341
|
+
}),
|
|
342
|
+
options == null ? void 0 : options.mergeObject
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
var __defProp$l = Object.defineProperty;
|
|
347
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
348
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
349
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
350
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
351
|
+
var __spreadValues$l = (a, b) => {
|
|
352
|
+
for (var prop in b || (b = {}))
|
|
353
|
+
if (__hasOwnProp$l.call(b, prop))
|
|
354
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
355
|
+
if (__getOwnPropSymbols$l)
|
|
356
|
+
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
357
|
+
if (__propIsEnum$l.call(b, prop))
|
|
358
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
359
|
+
}
|
|
360
|
+
return a;
|
|
361
|
+
};
|
|
362
|
+
function getColorsAndStatesByPath(path, options) {
|
|
363
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
364
|
+
const active = getColorsByPath(`${path}.active`, options);
|
|
365
|
+
const checked = getColorsByPath(`${path}.checked`, options);
|
|
366
|
+
const disabled = __spreadValues$l({
|
|
367
|
+
cursor: "not-allowed"
|
|
368
|
+
}, getColorsByPath(`${path}.disabled`, options));
|
|
369
|
+
const hover = getColorsByPath(`${path}.hover`, options);
|
|
370
|
+
const focus = ((_a = options == null ? void 0 : options.states) == null ? void 0 : _a.focus) !== false ? getColorsByPath(`${path}.focus`, options) : {};
|
|
371
|
+
const readonly = __spreadValues$l({
|
|
372
|
+
cursor: "notAllowed"
|
|
373
|
+
}, getColorsByPath(`${path}.readonly`, options));
|
|
374
|
+
const selected = getColorsByPath(`${path}.selected`, options);
|
|
375
|
+
return merge(
|
|
376
|
+
__spreadValues$l(__spreadValues$l(__spreadValues$l(__spreadValues$l(__spreadValues$l(__spreadValues$l(__spreadValues$l(__spreadValues$l({}, ((_b = options == null ? void 0 : options.states) == null ? void 0 : _b.default) !== false ? getColorsByPath(path, options) : null), ((_c = options == null ? void 0 : options.states) == null ? void 0 : _c.checked) !== false ? buildStateObject(checked, "checked") : null), buildStateObject(focus, "focus")), ((_d = options == null ? void 0 : options.states) == null ? void 0 : _d.hover) !== false ? buildStateObject(hover, "hover") : null), ((_e = options == null ? void 0 : options.states) == null ? void 0 : _e.selected) !== false ? buildStateObject(selected, "selected") : null), ((_f = options == null ? void 0 : options.states) == null ? void 0 : _f.active) !== false ? buildStateObject(active, "active") : null), ((_g = options == null ? void 0 : options.states) == null ? void 0 : _g.disabled) !== false ? buildStateObject(disabled, "disabled") : null), ((_h = options == null ? void 0 : options.states) == null ? void 0 : _h.readonly) !== false ? buildStateObject(readonly, "readonly") : null),
|
|
377
|
+
options == null ? void 0 : options.mergeObject
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
var __defProp$k = Object.defineProperty;
|
|
382
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
383
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
384
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
385
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
386
|
+
var __spreadValues$k = (a, b) => {
|
|
387
|
+
for (var prop in b || (b = {}))
|
|
388
|
+
if (__hasOwnProp$k.call(b, prop))
|
|
389
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
390
|
+
if (__getOwnPropSymbols$k)
|
|
391
|
+
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
392
|
+
if (__propIsEnum$k.call(b, prop))
|
|
393
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
394
|
+
}
|
|
395
|
+
return a;
|
|
396
|
+
};
|
|
397
|
+
const getColorStates = (definition, states) => {
|
|
398
|
+
return __spreadValues$k(__spreadValues$k(__spreadValues$k(__spreadValues$k(__spreadValues$k(__spreadValues$k(__spreadValues$k(__spreadValues$k({}, (states == null ? void 0 : states.default) !== false ? definition : null), (states == null ? void 0 : states.checked) !== false ? buildStateObject(getColorState(definition, "checked"), "checked") : null), buildStateObject(getColorState(definition, "focus"), "focus")), (states == null ? void 0 : states.selected) !== false ? buildStateObject(getColorState(definition, "selected"), "selected") : null), (states == null ? void 0 : states.hover) !== false ? buildStateObject(getColorState(definition, "hover"), "hover") : null), (states == null ? void 0 : states.active) !== false ? buildStateObject(getColorState(definition, "active"), "active") : null), (states == null ? void 0 : states.disabled) !== false ? buildStateObject(getColorState(definition, "disabled"), "disabled") : null), (states == null ? void 0 : states.readonly) !== false ? buildStateObject(getColorState(definition, "readonly"), "readonly") : null);
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
const getOneColorState = (color, state) => {
|
|
402
|
+
if (state === "default")
|
|
403
|
+
return color;
|
|
404
|
+
const actualState = state === "checked" ? "selected" : state;
|
|
405
|
+
const palette = getPalette();
|
|
406
|
+
const opacity = palette.action[`${state}Opacity`];
|
|
407
|
+
return tinycolor.mix(
|
|
408
|
+
color,
|
|
409
|
+
tinycolor(color).isLight() ? palette.action[actualState].light : palette.action[actualState].dark,
|
|
410
|
+
100 * opacity
|
|
411
|
+
).toRgbString();
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
function parsePalette(palette) {
|
|
415
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
416
|
+
const newPalette = cloneDeep(palette);
|
|
417
|
+
newPalette.lightenColor = (_a = palette.lightenColor) != null ? _a : (color, ratio) => {
|
|
418
|
+
return defaultLighten(color, ratio != null ? ratio : palette.lightenRatio);
|
|
419
|
+
};
|
|
420
|
+
newPalette.darkenColor = (_b = palette.darkenColor) != null ? _b : (color, ratio) => {
|
|
421
|
+
return defaultDarken(color, ratio != null ? ratio : palette.darkenRatio);
|
|
422
|
+
};
|
|
423
|
+
newPalette.getContrastText = (_c = palette.getContrastText) != null ? _c : defaultGetContrastText;
|
|
424
|
+
Object.entries(palette).forEach(([key, value]) => {
|
|
425
|
+
var _a2, _b2, _c2;
|
|
426
|
+
const castedValue = value;
|
|
427
|
+
if (isColorDefinition(castedValue)) {
|
|
428
|
+
newPalette[key] = {
|
|
429
|
+
main: castedValue.main,
|
|
430
|
+
light: (_a2 = castedValue.light) != null ? _a2 : newPalette.lightenColor(castedValue.main),
|
|
431
|
+
dark: (_b2 = castedValue.dark) != null ? _b2 : newPalette.darkenColor(castedValue.main),
|
|
432
|
+
contrastText: (_c2 = castedValue.contrastText) != null ? _c2 : newPalette.getContrastText(castedValue.main)
|
|
433
|
+
};
|
|
434
|
+
} else {
|
|
435
|
+
newPalette[key] = value;
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
newPalette.border.article = (_d = newPalette.border.article) != null ? _d : newPalette.secondary.main;
|
|
439
|
+
newPalette.border.field = (_e = newPalette.border.field) != null ? _e : newPalette.text.primary;
|
|
440
|
+
newPalette.border.section = (_f = newPalette.border.section) != null ? _f : newPalette.primary.main;
|
|
441
|
+
function parseAction(action) {
|
|
442
|
+
var _a2, _b2;
|
|
443
|
+
if (typeof action === "string")
|
|
444
|
+
return {
|
|
445
|
+
dark: action,
|
|
446
|
+
light: action
|
|
447
|
+
};
|
|
448
|
+
return {
|
|
449
|
+
dark: (_a2 = action.dark) != null ? _a2 : action.light,
|
|
450
|
+
light: (_b2 = action.light) != null ? _b2 : action.dark
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
newPalette.action.active = parseAction(newPalette.action.active);
|
|
454
|
+
newPalette.action.disabled = parseAction(newPalette.action.disabled);
|
|
455
|
+
newPalette.action.focus = parseAction(newPalette.action.focus);
|
|
456
|
+
newPalette.action.hover = parseAction(newPalette.action.hover);
|
|
457
|
+
newPalette.action.readonly = parseAction(newPalette.action.readonly);
|
|
458
|
+
newPalette.action.selected = parseAction(newPalette.action.selected);
|
|
459
|
+
newPalette.buildStateObject = buildStateObject;
|
|
460
|
+
newPalette.getColor = getOneColorState;
|
|
461
|
+
newPalette.getStatesForColors = applyStatesGetColor;
|
|
462
|
+
newPalette.getOneState = getColorState;
|
|
463
|
+
newPalette.getStatesFromDefinition = getColorStates;
|
|
464
|
+
newPalette.getStatesFromPath = getColorsAndStatesByPath;
|
|
465
|
+
newPalette.gray = (_g = newPalette.gray) != null ? _g : {};
|
|
466
|
+
for (let i = 1; i <= 18; i++) {
|
|
467
|
+
const index = Math.round((255 - 255 / 18) / 18 * i);
|
|
468
|
+
newPalette.gray[i * 50] = (_h = newPalette.gray[i * 50]) != null ? _h : `rgb(${index},${index},${index})`;
|
|
469
|
+
}
|
|
470
|
+
return newPalette;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
const schemas = {
|
|
474
|
+
ocean: ["#008E1B", "#009155", "#009187", "#008EB1", "#006872", "#2F4858"],
|
|
475
|
+
sunset: ["#ae76de", "#D65DB1", "#FF6F91", "#FF9671", "#FFC75F", "#F9F871"],
|
|
476
|
+
red: ["#dc143c", "#ff2400", "#800020", "#b22222", "#e52b50", "#ff7f50"],
|
|
477
|
+
orange: ["#F76E11", "#FF9F45", "#FFBC80", "#FC4F4F", "#eb9605", "#964000"],
|
|
478
|
+
green: ["#a4de02", "#76ba1b", "#4c9a2a", "#acdf87", "#68bb59", "#1e5631"],
|
|
479
|
+
blue: ["#7ad6f4", "#45bdee", "#28a7ea", "#006cbb", "#034698", "#032f64"],
|
|
480
|
+
violet: ["#80007e", "#a02d9c", "#c37ecd", "#9e5fb8", "#7f3e98", "#4c197f"],
|
|
481
|
+
turquoise: ["#0ddbcc", "#43ebff", "#19ceeb", "#28acea", "#388ee9", "#3d76e0"],
|
|
482
|
+
yellow: ["#fff700", "#ffff9f", "#fef54f", "#f9e231", "#f6c616", "#eab200"],
|
|
483
|
+
grey: ["#b1b5ba", "#d2d5d6", "#dee0e0", "#bdbdbb", "#9fa19c", "#686e67"]
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
var __defProp$j = Object.defineProperty;
|
|
487
|
+
var __defProps$a = Object.defineProperties;
|
|
488
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
489
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
490
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
491
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
492
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
493
|
+
var __spreadValues$j = (a, b) => {
|
|
494
|
+
for (var prop in b || (b = {}))
|
|
495
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
496
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
497
|
+
if (__getOwnPropSymbols$j)
|
|
498
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
499
|
+
if (__propIsEnum$j.call(b, prop))
|
|
500
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
501
|
+
}
|
|
502
|
+
return a;
|
|
503
|
+
};
|
|
504
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
505
|
+
const darkBlue = "#004085";
|
|
506
|
+
const lightBlue = "#cce5ff";
|
|
507
|
+
const white = "white";
|
|
508
|
+
function getSelectedColors() {
|
|
509
|
+
const palette = getPalette();
|
|
510
|
+
return palette.getStatesFromDefinition(
|
|
511
|
+
{
|
|
512
|
+
backgroundColor: palette.background.paper,
|
|
513
|
+
color: palette.text.primary
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
active: false,
|
|
517
|
+
checked: false,
|
|
518
|
+
default: false,
|
|
519
|
+
disabled: false,
|
|
520
|
+
focus: false,
|
|
521
|
+
readonly: false
|
|
522
|
+
}
|
|
523
|
+
);
|
|
524
|
+
}
|
|
525
|
+
function getPalette(arg) {
|
|
526
|
+
const shouldReparsePalette = arg === true;
|
|
527
|
+
const customPalette = typeof arg !== "boolean" ? arg : void 0;
|
|
528
|
+
if (window.currentPalette && !shouldReparsePalette)
|
|
529
|
+
return window.currentPalette;
|
|
530
|
+
window.currentPalette = parsePalette(
|
|
531
|
+
merge(
|
|
532
|
+
defaultPalette,
|
|
533
|
+
window.defaultPalette,
|
|
534
|
+
customPalette != null ? customPalette : window.customPalette
|
|
535
|
+
)
|
|
536
|
+
);
|
|
537
|
+
return window.currentPalette;
|
|
538
|
+
}
|
|
539
|
+
function getThemeColorsObject() {
|
|
540
|
+
var _a;
|
|
541
|
+
const palette = cloneDeep((_a = window.currentPalette) != null ? _a : getPalette());
|
|
542
|
+
const colors = {
|
|
543
|
+
palette: __spreadProps$a(__spreadValues$j({}, palette), {
|
|
544
|
+
lightenColor: void 0,
|
|
545
|
+
darkenColor: void 0,
|
|
546
|
+
getContrastText: void 0,
|
|
547
|
+
buildStateObject: void 0,
|
|
548
|
+
getColor: void 0,
|
|
549
|
+
getOneState: void 0,
|
|
550
|
+
getStatesForColors: void 0,
|
|
551
|
+
getStatesFromDefinition: void 0,
|
|
552
|
+
getStatesFromPath: void 0
|
|
553
|
+
}),
|
|
554
|
+
accordion: {
|
|
555
|
+
borderColor: palette.border.section
|
|
556
|
+
},
|
|
557
|
+
buttons: {
|
|
558
|
+
accordion: {
|
|
559
|
+
backgroundColor: palette.primary.main,
|
|
560
|
+
borderColor: palette.border.section,
|
|
561
|
+
color: palette.primary.contrastText
|
|
562
|
+
},
|
|
563
|
+
accordionPrimary: {
|
|
564
|
+
backgroundColor: palette.primary.main,
|
|
565
|
+
borderColor: palette.border.section,
|
|
566
|
+
color: palette.primary.contrastText
|
|
567
|
+
},
|
|
568
|
+
close: __spreadProps$a(__spreadValues$j({}, applyStatesGetColor({
|
|
569
|
+
color: palette.text.primary,
|
|
570
|
+
backgroundColor: palette.background.paper
|
|
571
|
+
})), {
|
|
572
|
+
backgroundColor: "transparent"
|
|
573
|
+
}),
|
|
574
|
+
collapsibleAsidePanelTitle: {
|
|
575
|
+
color: palette.text.primary
|
|
576
|
+
},
|
|
577
|
+
deletableInputButton: {
|
|
578
|
+
backgroundColor: "transparent",
|
|
579
|
+
color: palette.secondary.main,
|
|
580
|
+
active: {
|
|
581
|
+
color: palette.darkenColor(palette.secondary.main, 40)
|
|
582
|
+
},
|
|
583
|
+
disabled: {
|
|
584
|
+
color: palette.secondary.main
|
|
585
|
+
},
|
|
586
|
+
focus: {
|
|
587
|
+
color: palette.darkenColor(palette.secondary.main, 20)
|
|
588
|
+
},
|
|
589
|
+
hover: {
|
|
590
|
+
color: palette.darkenColor(palette.secondary.main, 20)
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
icon: {
|
|
594
|
+
backgroundColor: palette.secondary.main,
|
|
595
|
+
color: palette.secondary.contrastText,
|
|
596
|
+
hover: {
|
|
597
|
+
color: palette.secondary.contrastText
|
|
598
|
+
},
|
|
599
|
+
focus: {
|
|
600
|
+
color: palette.secondary.contrastText
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
iconAlert: {
|
|
604
|
+
backgroundColor: "transparent",
|
|
605
|
+
color: "#e5c200",
|
|
606
|
+
active: {
|
|
607
|
+
backgroundColor: "transparent",
|
|
608
|
+
color: tinycolor("#e5c200").darken(10).toRgbString()
|
|
609
|
+
},
|
|
610
|
+
focus: {
|
|
611
|
+
backgroundColor: "transparent",
|
|
612
|
+
color: tinycolor("#e5c200").darken(5).toRgbString()
|
|
613
|
+
},
|
|
614
|
+
hover: {
|
|
615
|
+
backgroundColor: "transparent",
|
|
616
|
+
color: tinycolor("#e5c200").darken(5).toRgbString()
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
iconPrimary: {
|
|
620
|
+
backgroundColor: palette.primary.main,
|
|
621
|
+
color: palette.primary.contrastText,
|
|
622
|
+
active: {
|
|
623
|
+
color: palette.primary.contrastText
|
|
624
|
+
},
|
|
625
|
+
focus: {
|
|
626
|
+
color: palette.primary.contrastText
|
|
627
|
+
},
|
|
628
|
+
hover: {
|
|
629
|
+
color: palette.primary.contrastText
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
iconToggled: {
|
|
633
|
+
backgroundColor: palette.primary.main,
|
|
634
|
+
color: palette.primary.contrastText,
|
|
635
|
+
active: {
|
|
636
|
+
color: palette.primary.contrastText
|
|
637
|
+
},
|
|
638
|
+
focus: {
|
|
639
|
+
color: palette.common.white
|
|
640
|
+
},
|
|
641
|
+
hover: {
|
|
642
|
+
color: palette.common.white
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
iconOutline: {
|
|
646
|
+
backgroundColor: palette.background.paper,
|
|
647
|
+
color: palette.primary.main,
|
|
648
|
+
borderColor: palette.border.article
|
|
649
|
+
},
|
|
650
|
+
link: {
|
|
651
|
+
backgroundColor: "transparent",
|
|
652
|
+
color: palette.text.primary,
|
|
653
|
+
borderColor: "transparent",
|
|
654
|
+
active: {
|
|
655
|
+
color: palette.text.primary
|
|
656
|
+
},
|
|
657
|
+
focus: {
|
|
658
|
+
color: palette.text.primary
|
|
659
|
+
},
|
|
660
|
+
hover: {
|
|
661
|
+
color: palette.text.primary
|
|
662
|
+
}
|
|
663
|
+
},
|
|
664
|
+
openTab: {
|
|
665
|
+
backgroundColor: palette.primary.main,
|
|
666
|
+
color: palette.primary.contrastText,
|
|
667
|
+
borderColor: palette.primary.dark
|
|
668
|
+
},
|
|
669
|
+
outline: {
|
|
670
|
+
backgroundColor: palette.background.paper,
|
|
671
|
+
color: palette.getContrastText(palette.background.paper),
|
|
672
|
+
borderColor: palette.primary.main
|
|
673
|
+
},
|
|
674
|
+
outlineDanger: {
|
|
675
|
+
backgroundColor: palette.background.paper,
|
|
676
|
+
color: palette.primary.main,
|
|
677
|
+
borderColor: palette.primary.main,
|
|
678
|
+
active: {
|
|
679
|
+
borderColor: palette.darkenColor(
|
|
680
|
+
palette.error.dark,
|
|
681
|
+
palette.action.activeOpacity * 80
|
|
682
|
+
),
|
|
683
|
+
backgroundColor: palette.darkenColor(
|
|
684
|
+
palette.error.dark,
|
|
685
|
+
palette.action.activeOpacity * 80
|
|
686
|
+
),
|
|
687
|
+
color: palette.getContrastText(
|
|
688
|
+
palette.darkenColor(
|
|
689
|
+
palette.error.dark,
|
|
690
|
+
palette.action.activeOpacity * 80
|
|
691
|
+
)
|
|
692
|
+
)
|
|
693
|
+
},
|
|
694
|
+
focus: {
|
|
695
|
+
borderColor: palette.darkenColor(
|
|
696
|
+
palette.error.dark,
|
|
697
|
+
palette.action.activeOpacity * 60
|
|
698
|
+
),
|
|
699
|
+
backgroundColor: palette.darkenColor(
|
|
700
|
+
palette.error.dark,
|
|
701
|
+
palette.action.activeOpacity * 60
|
|
702
|
+
),
|
|
703
|
+
color: palette.getContrastText(
|
|
704
|
+
palette.darkenColor(
|
|
705
|
+
palette.error.dark,
|
|
706
|
+
palette.action.activeOpacity * 60
|
|
707
|
+
)
|
|
708
|
+
)
|
|
709
|
+
},
|
|
710
|
+
hover: {
|
|
711
|
+
borderColor: palette.darkenColor(
|
|
712
|
+
palette.error.dark,
|
|
713
|
+
palette.action.activeOpacity * 70
|
|
714
|
+
),
|
|
715
|
+
backgroundColor: palette.darkenColor(
|
|
716
|
+
palette.error.dark,
|
|
717
|
+
palette.action.activeOpacity * 70
|
|
718
|
+
),
|
|
719
|
+
color: palette.getContrastText(
|
|
720
|
+
palette.darkenColor(
|
|
721
|
+
palette.error.dark,
|
|
722
|
+
palette.action.activeOpacity * 70
|
|
723
|
+
)
|
|
724
|
+
)
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
outlineWarning: {
|
|
728
|
+
backgroundColor: palette.background.paper,
|
|
729
|
+
color: palette.text.primary,
|
|
730
|
+
borderColor: palette.primary.main,
|
|
731
|
+
active: {
|
|
732
|
+
borderColor: palette.warning.main,
|
|
733
|
+
backgroundColor: palette.warning.main,
|
|
734
|
+
color: palette.warning.contrastText
|
|
735
|
+
},
|
|
736
|
+
focus: {
|
|
737
|
+
borderColor: palette.warning.main,
|
|
738
|
+
backgroundColor: palette.warning.main,
|
|
739
|
+
color: palette.warning.contrastText
|
|
740
|
+
},
|
|
741
|
+
hover: {
|
|
742
|
+
borderColor: palette.warning.main,
|
|
743
|
+
backgroundColor: palette.warning.main,
|
|
744
|
+
color: palette.warning.contrastText
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
primary: {
|
|
748
|
+
backgroundColor: palette.primary.main,
|
|
749
|
+
color: palette.primary.contrastText,
|
|
750
|
+
borderColor: palette.primary.main
|
|
751
|
+
},
|
|
752
|
+
secondary: {
|
|
753
|
+
backgroundColor: palette.secondary.main,
|
|
754
|
+
color: palette.secondary.contrastText,
|
|
755
|
+
borderColor: palette.secondary.main
|
|
756
|
+
},
|
|
757
|
+
tab: {
|
|
758
|
+
backgroundColor: palette.background.paper,
|
|
759
|
+
color: palette.getContrastText(palette.background.paper),
|
|
760
|
+
borderColor: palette.border.article
|
|
761
|
+
},
|
|
762
|
+
toggleIcon: {
|
|
763
|
+
color: palette.secondary.contrastText,
|
|
764
|
+
backgroundColor: palette.secondary.main,
|
|
765
|
+
borderColor: palette.border.field,
|
|
766
|
+
danger: {
|
|
767
|
+
backgroundColor: palette.error.main,
|
|
768
|
+
borderColor: palette.border.field,
|
|
769
|
+
color: palette.error.contrastText
|
|
770
|
+
},
|
|
771
|
+
toggled: {
|
|
772
|
+
backgroundColor: palette.primary.main,
|
|
773
|
+
borderColor: palette.border.field,
|
|
774
|
+
color: palette.primary.contrastText
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
transparentIcon: {
|
|
778
|
+
backgroundColor: "transparent",
|
|
779
|
+
color: palette.text.primary,
|
|
780
|
+
hover: {
|
|
781
|
+
color: palette.primary.main
|
|
782
|
+
},
|
|
783
|
+
focus: {
|
|
784
|
+
color: palette.primary.main
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
dropzone: {
|
|
789
|
+
backgroundColor: palette.background.paper,
|
|
790
|
+
borderColor: palette.border.section,
|
|
791
|
+
color: palette.background.default
|
|
792
|
+
},
|
|
793
|
+
form: {
|
|
794
|
+
backgroundColor: palette.background.paper,
|
|
795
|
+
fields: {
|
|
796
|
+
backgroundColor: palette.background.paper,
|
|
797
|
+
color: palette.text.primary,
|
|
798
|
+
borderColor: palette.border.field
|
|
799
|
+
},
|
|
800
|
+
radio: {
|
|
801
|
+
backgroundColor: "transparent",
|
|
802
|
+
color: tinycolor(window.currentPalette.text.primary).lighten(15).toRgbString(),
|
|
803
|
+
borderColor: palette.text.primary,
|
|
804
|
+
active: {
|
|
805
|
+
backgroundColor: "transparent",
|
|
806
|
+
color: tinycolor(window.currentPalette.text.primary).lighten(0).toRgbString()
|
|
807
|
+
},
|
|
808
|
+
checked: {
|
|
809
|
+
backgroundColor: "red",
|
|
810
|
+
color: tinycolor(window.currentPalette.text.primary).lighten(15).toRgbString()
|
|
811
|
+
},
|
|
812
|
+
disabled: {
|
|
813
|
+
backgroundColor: "transparent",
|
|
814
|
+
color: tinycolor(window.currentPalette.text.primary).lighten(55).toRgbString()
|
|
815
|
+
},
|
|
816
|
+
hover: {
|
|
817
|
+
backgroundColor: "transparent",
|
|
818
|
+
color: tinycolor(window.currentPalette.text.primary).lighten(7).toRgbString()
|
|
819
|
+
},
|
|
820
|
+
readonly: {
|
|
821
|
+
color: tinycolor(window.currentPalette.text.primary).lighten(38).toRgbString(),
|
|
822
|
+
backgroundColor: "transparent"
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
modal: {
|
|
827
|
+
borderColor: palette.border.section,
|
|
828
|
+
backgroundColor: palette.background.paper
|
|
829
|
+
},
|
|
830
|
+
notifications: {
|
|
831
|
+
error: {
|
|
832
|
+
backgroundColor: palette.error.light,
|
|
833
|
+
color: palette.getContrastText(palette.error.light),
|
|
834
|
+
borderColor: palette.error.main
|
|
835
|
+
},
|
|
836
|
+
success: {
|
|
837
|
+
backgroundColor: palette.success.light,
|
|
838
|
+
color: palette.getContrastText(palette.success.light),
|
|
839
|
+
borderColor: palette.success.main
|
|
840
|
+
},
|
|
841
|
+
warning: {
|
|
842
|
+
backgroundColor: palette.warning.light,
|
|
843
|
+
color: palette.getContrastText(palette.warning.light),
|
|
844
|
+
borderColor: palette.warning.main
|
|
845
|
+
}
|
|
846
|
+
},
|
|
847
|
+
pagination: {
|
|
848
|
+
color: palette.primary.contrastText,
|
|
849
|
+
backgroundColor: palette.primary.main
|
|
850
|
+
},
|
|
851
|
+
printView: {
|
|
852
|
+
main: {
|
|
853
|
+
backgroundColor: palette.background.default,
|
|
854
|
+
page: {
|
|
855
|
+
backgroundColor: palette.background.paper,
|
|
856
|
+
borderColor: palette.border.article
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
list: {
|
|
860
|
+
table: {
|
|
861
|
+
borderColor: palette.border.section
|
|
862
|
+
},
|
|
863
|
+
th: { backgroundColor: "#eee" },
|
|
864
|
+
cell: {
|
|
865
|
+
borderColor: palette.border.article
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
schemas,
|
|
870
|
+
scrollbars: {
|
|
871
|
+
bar: {
|
|
872
|
+
color: palette.secondary.main,
|
|
873
|
+
backgroundColor: palette.background.default,
|
|
874
|
+
hover: {
|
|
875
|
+
backgroundColor: palette.lightenColor(palette.background.default, 10),
|
|
876
|
+
color: palette.lightenColor(palette.secondary.main, 10)
|
|
877
|
+
},
|
|
878
|
+
active: {
|
|
879
|
+
backgroundColor: palette.lightenColor(palette.background.default, 10),
|
|
880
|
+
color: palette.lightenColor(palette.secondary.main, 20)
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
tab: {
|
|
885
|
+
backgroundColor: palette.background.paper,
|
|
886
|
+
borderColor: palette.border.section
|
|
887
|
+
},
|
|
888
|
+
topBar: {
|
|
889
|
+
backgroundColor: palette.primary.main
|
|
890
|
+
},
|
|
891
|
+
// Default ThemeUI colors
|
|
892
|
+
accent: palette.text.accent,
|
|
893
|
+
background: palette.background.default,
|
|
894
|
+
iconWarning: "rgb(246 222 87)",
|
|
895
|
+
muted: palette.text.disabled,
|
|
896
|
+
primary: palette.primary.main,
|
|
897
|
+
secondary: palette.secondary.main,
|
|
898
|
+
text: palette.text.primary,
|
|
899
|
+
warning: palette.warning.main,
|
|
900
|
+
danger: palette.error.main,
|
|
901
|
+
link: palette.text.accent,
|
|
902
|
+
success: palette.success.main,
|
|
903
|
+
title: palette.text.title,
|
|
904
|
+
// Meaningful colors
|
|
905
|
+
lightBorder: "hsl(0, 12%, 85%)",
|
|
906
|
+
outlineColor: palette.lightenColor(palette.primary.main, 20),
|
|
907
|
+
// Custom Apia colors
|
|
908
|
+
baseGrey: "#dfdfdf",
|
|
909
|
+
darkBorder: "hsl(247, 98%, 10%)",
|
|
910
|
+
darkBlue,
|
|
911
|
+
disabled: "#efefef",
|
|
912
|
+
favorite: "#e5c200",
|
|
913
|
+
filtersRowBackground: white,
|
|
914
|
+
formBackground: white,
|
|
915
|
+
grey: "#777",
|
|
916
|
+
gridRowHighlight: "#e1f3ff",
|
|
917
|
+
highlightButton: "hsl(61, 100%, 91%)",
|
|
918
|
+
lightBlue,
|
|
919
|
+
oddRow: "#f0f5ff",
|
|
920
|
+
paginationBackground: "hsl(229deg, 75%, 90%)",
|
|
921
|
+
readOnlyText: "#737373",
|
|
922
|
+
required: "darkred",
|
|
923
|
+
scrollbarBack: "rgb(206, 206, 206)",
|
|
924
|
+
scrollbarFront: "rgb(156, 156, 156)",
|
|
925
|
+
sysExceptionNotificationBg: "#f8d7da",
|
|
926
|
+
sysMessageNotificationBg: "#fff3cd",
|
|
927
|
+
tabBackground: "white",
|
|
928
|
+
treeRuler: "#ccc",
|
|
929
|
+
white,
|
|
930
|
+
priorityNone: "gray",
|
|
931
|
+
priorityLow: palette.success.main,
|
|
932
|
+
priorityNormal: "rgb(255 211 34)",
|
|
933
|
+
priorityHigh: "rgb(255 150 0)",
|
|
934
|
+
priorityUrgent: "red",
|
|
935
|
+
// modes: {
|
|
936
|
+
// dark: {
|
|
937
|
+
// // TODO: dark-mode uhhhhhhh!!!
|
|
938
|
+
// //text: '#fff',
|
|
939
|
+
// },
|
|
940
|
+
// },
|
|
941
|
+
charts: {
|
|
942
|
+
front: darkBlue
|
|
943
|
+
}
|
|
944
|
+
};
|
|
945
|
+
applyStates([
|
|
946
|
+
colors == null ? void 0 : colors.buttons,
|
|
947
|
+
colors == null ? void 0 : colors.form
|
|
948
|
+
]);
|
|
949
|
+
return colors;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
var __defProp$i = Object.defineProperty;
|
|
953
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
954
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
955
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
956
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
957
|
+
var __spreadValues$i = (a, b) => {
|
|
958
|
+
for (var prop in b || (b = {}))
|
|
959
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
960
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
961
|
+
if (__getOwnPropSymbols$i)
|
|
962
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
963
|
+
if (__propIsEnum$i.call(b, prop))
|
|
964
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
965
|
+
}
|
|
966
|
+
return a;
|
|
967
|
+
};
|
|
968
|
+
const alerts = {
|
|
969
|
+
primary: {
|
|
970
|
+
border: "1px solid",
|
|
971
|
+
borderLeft: "12px solid",
|
|
972
|
+
borderRadius: "alerts",
|
|
973
|
+
display: "flex",
|
|
974
|
+
flexDirection: "column",
|
|
975
|
+
fontWeight: "normal",
|
|
976
|
+
maxHeight: "60vh",
|
|
977
|
+
overflow: "auto",
|
|
978
|
+
p: 0,
|
|
979
|
+
"&:focus": {
|
|
980
|
+
outline: "none"
|
|
981
|
+
},
|
|
982
|
+
".notification__header": {
|
|
983
|
+
display: "flex",
|
|
984
|
+
alignItems: "center",
|
|
985
|
+
justifyContent: "space-between",
|
|
986
|
+
position: "sticky",
|
|
987
|
+
top: 0,
|
|
988
|
+
width: "100%",
|
|
989
|
+
p: spacing(5)
|
|
990
|
+
},
|
|
991
|
+
".notification__title": {
|
|
992
|
+
fontSize: 18,
|
|
993
|
+
fontWeight: "bold",
|
|
994
|
+
color: "palette.text.primary",
|
|
995
|
+
display: "flex",
|
|
996
|
+
gap: spacing(5),
|
|
997
|
+
alignItems: "center"
|
|
998
|
+
},
|
|
999
|
+
".notification__closeButton": {
|
|
1000
|
+
flexShrink: 0
|
|
1001
|
+
},
|
|
1002
|
+
".notification__body": {
|
|
1003
|
+
alignItems: "center",
|
|
1004
|
+
display: "flex",
|
|
1005
|
+
flexDirection: "row",
|
|
1006
|
+
gap: spacing(5),
|
|
1007
|
+
width: "100%",
|
|
1008
|
+
p: spacing(5)
|
|
1009
|
+
},
|
|
1010
|
+
".notification__header ~ .notification__body": {
|
|
1011
|
+
pt: 0
|
|
1012
|
+
},
|
|
1013
|
+
".notification__content": {
|
|
1014
|
+
display: "flex",
|
|
1015
|
+
alignItems: "stretch",
|
|
1016
|
+
flexDirection: "column",
|
|
1017
|
+
gap: spacing(5),
|
|
1018
|
+
width: "100%"
|
|
1019
|
+
},
|
|
1020
|
+
".notification__icon": {
|
|
1021
|
+
flexShrink: 0,
|
|
1022
|
+
height: "iconMd",
|
|
1023
|
+
svg: {
|
|
1024
|
+
height: "iconMd",
|
|
1025
|
+
width: "iconMd"
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
".notification__message": {
|
|
1029
|
+
display: "flex",
|
|
1030
|
+
flexDirection: "column",
|
|
1031
|
+
fontWeight: "normal",
|
|
1032
|
+
gap: spacing(3),
|
|
1033
|
+
width: "100%",
|
|
1034
|
+
wordBreak: "break-word"
|
|
1035
|
+
},
|
|
1036
|
+
".notification__trace": {
|
|
1037
|
+
maxWidth: "100%",
|
|
1038
|
+
overflow: "hidden",
|
|
1039
|
+
maxHeight: "30vh",
|
|
1040
|
+
flexShrink: 0,
|
|
1041
|
+
backgroundColor: "rgba(10,10,10,0.02)",
|
|
1042
|
+
pt: spacing(5),
|
|
1043
|
+
".notification__traceLabel": {
|
|
1044
|
+
pl: spacing(5)
|
|
1045
|
+
},
|
|
1046
|
+
".notification__traceText": {
|
|
1047
|
+
fontWeight: "normal",
|
|
1048
|
+
p: spacing(5),
|
|
1049
|
+
maxHeight: "30vh",
|
|
1050
|
+
overflow: "auto",
|
|
1051
|
+
maxWidth: "100%",
|
|
1052
|
+
position: "relative"
|
|
1053
|
+
}
|
|
1054
|
+
},
|
|
1055
|
+
"&:focus .notification__closeButton": focusOutline
|
|
1056
|
+
},
|
|
1057
|
+
warning: {
|
|
1058
|
+
variant: "alerts.primary",
|
|
1059
|
+
"&, & .notification__header": __spreadValues$i({}, getColorsByPath("notifications.warning"))
|
|
1060
|
+
},
|
|
1061
|
+
danger: {
|
|
1062
|
+
variant: "alerts.primary",
|
|
1063
|
+
"&, & .notification__header": __spreadValues$i({}, getColorsByPath("notifications.error"))
|
|
1064
|
+
},
|
|
1065
|
+
success: {
|
|
1066
|
+
variant: "alerts.primary",
|
|
1067
|
+
"&, & .notification__header": __spreadValues$i({}, getColorsByPath("notifications.success"))
|
|
1068
|
+
}
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
var __defProp$h = Object.defineProperty;
|
|
1072
|
+
var __defProps$9 = Object.defineProperties;
|
|
1073
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
1074
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
1075
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
1076
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
1077
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1078
|
+
var __spreadValues$h = (a, b) => {
|
|
1079
|
+
for (var prop in b || (b = {}))
|
|
1080
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
1081
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
1082
|
+
if (__getOwnPropSymbols$h)
|
|
1083
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
1084
|
+
if (__propIsEnum$h.call(b, prop))
|
|
1085
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
1086
|
+
}
|
|
1087
|
+
return a;
|
|
1088
|
+
};
|
|
1089
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
1090
|
+
const buttons = {
|
|
1091
|
+
inherit: {
|
|
1092
|
+
color: "inherit",
|
|
1093
|
+
background: "inherit",
|
|
1094
|
+
border: "none",
|
|
1095
|
+
borderRadius: 0,
|
|
1096
|
+
font: "inherit",
|
|
1097
|
+
cursor: "pointer",
|
|
1098
|
+
padding: 0,
|
|
1099
|
+
margin: 0
|
|
1100
|
+
},
|
|
1101
|
+
collapsibleAsidePanelTitle: __spreadValues$h({
|
|
1102
|
+
variant: "buttons.inherit",
|
|
1103
|
+
display: "flex",
|
|
1104
|
+
justifyContent: "space-between",
|
|
1105
|
+
alignItems: "center",
|
|
1106
|
+
width: "100%"
|
|
1107
|
+
}, getColorsAndStatesByPath("buttons.collapsibleAsidePanelTitle")),
|
|
1108
|
+
primary: __spreadProps$9(__spreadValues$h({
|
|
1109
|
+
borderWidth: "2px",
|
|
1110
|
+
borderStyle: "solid",
|
|
1111
|
+
variant: "text.default",
|
|
1112
|
+
py: responsive$1({ 0: 3, 4: 4 }),
|
|
1113
|
+
px: responsive$1({ 0: 5, 4: 6 }),
|
|
1114
|
+
display: "inline-block",
|
|
1115
|
+
width: responsive$1({ 0: "100%", 1: "auto" }),
|
|
1116
|
+
cursor: "pointer",
|
|
1117
|
+
borderRadius: "buttons",
|
|
1118
|
+
fontWeight: "normal",
|
|
1119
|
+
userSelect: "none",
|
|
1120
|
+
transition: "background-color 300ms ease-out, color 300ms ease-out",
|
|
1121
|
+
wordBreak: "keep-all"
|
|
1122
|
+
}, getColorsAndStatesByPath("buttons.primary")), {
|
|
1123
|
+
"&:focus, &:focus-visible": {
|
|
1124
|
+
outlineColor: "#00daff"
|
|
1125
|
+
}
|
|
1126
|
+
}),
|
|
1127
|
+
"primary-sm": __spreadValues$h({
|
|
1128
|
+
variant: "buttons.primary",
|
|
1129
|
+
"&:focus, &:focus-visible": {}
|
|
1130
|
+
}, smallButton),
|
|
1131
|
+
secondary: __spreadValues$h({
|
|
1132
|
+
variant: "buttons.primary",
|
|
1133
|
+
"&:focus, &:focus-visible": {},
|
|
1134
|
+
borderWidth: "0px",
|
|
1135
|
+
borderStyle: "solid"
|
|
1136
|
+
}, getColorsAndStatesByPath("buttons.secondary")),
|
|
1137
|
+
"secondary-sm": __spreadValues$h({
|
|
1138
|
+
variant: "buttons.secondary"
|
|
1139
|
+
}, smallButton),
|
|
1140
|
+
"light-secondary": __spreadValues$h({
|
|
1141
|
+
variant: "buttons.secondary"
|
|
1142
|
+
}, getColorsAndStatesByPath("buttons.lightSecondary")),
|
|
1143
|
+
danger: __spreadValues$h({
|
|
1144
|
+
variant: "buttons.primary",
|
|
1145
|
+
"&:focus, &:focus-visible": {}
|
|
1146
|
+
}, getColorsAndStatesByPath("buttons.danger")),
|
|
1147
|
+
"danger-sm": __spreadValues$h({
|
|
1148
|
+
variant: "buttons.danger"
|
|
1149
|
+
}, smallButton),
|
|
1150
|
+
warning: __spreadValues$h({
|
|
1151
|
+
variant: "buttons.primary",
|
|
1152
|
+
"&:focus, &:focus-visible": {}
|
|
1153
|
+
}, getColorsAndStatesByPath("buttons.warning")),
|
|
1154
|
+
"warning-sm": __spreadValues$h({
|
|
1155
|
+
variant: "buttons.warning"
|
|
1156
|
+
}, smallButton),
|
|
1157
|
+
close: __spreadValues$h({
|
|
1158
|
+
cursor: "pointer",
|
|
1159
|
+
ml: "auto",
|
|
1160
|
+
mr: "2",
|
|
1161
|
+
borderRadius: "buttons"
|
|
1162
|
+
}, getColorsAndStatesByPath("buttons.close")),
|
|
1163
|
+
accordion: {
|
|
1164
|
+
variant: "buttons.primary",
|
|
1165
|
+
"&:focus, &:focus-visible": {},
|
|
1166
|
+
cursor: "pointer",
|
|
1167
|
+
m: spacing(0),
|
|
1168
|
+
py: responsive$1({ 0: 3, 4: 4 }),
|
|
1169
|
+
px: responsive$1({ 0: 5, 4: 6 }),
|
|
1170
|
+
width: "100%",
|
|
1171
|
+
display: "flex",
|
|
1172
|
+
alignItems: "center",
|
|
1173
|
+
justifyContent: "space-between",
|
|
1174
|
+
borderRadius: "buttons",
|
|
1175
|
+
textAlign: "left",
|
|
1176
|
+
fontFamily: "heading",
|
|
1177
|
+
fontSize: "text.default",
|
|
1178
|
+
textDecoration: "none",
|
|
1179
|
+
textTransform: "none",
|
|
1180
|
+
fontWeight: "bold",
|
|
1181
|
+
border: "none",
|
|
1182
|
+
transition: "background-color 300ms ease-out, color 300ms ease-out",
|
|
1183
|
+
userSelect: "text",
|
|
1184
|
+
"&, *": getColorsAndStatesByPath("buttons.accordion")
|
|
1185
|
+
},
|
|
1186
|
+
"accordion-primary": __spreadValues$h({
|
|
1187
|
+
variant: "buttons.accordion",
|
|
1188
|
+
border: "none"
|
|
1189
|
+
}, getColorsAndStatesByPath("buttons.accordionPrimary")),
|
|
1190
|
+
icon: __spreadProps$9(__spreadValues$h({
|
|
1191
|
+
display: "flex",
|
|
1192
|
+
justifyContent: "center",
|
|
1193
|
+
alignItems: "center",
|
|
1194
|
+
p: spacing(0),
|
|
1195
|
+
m: spacing(0),
|
|
1196
|
+
bg: "secondary",
|
|
1197
|
+
cursor: "pointer",
|
|
1198
|
+
transition: "background-color 300ms ease-out, color 300ms ease-out",
|
|
1199
|
+
borderRadius: "buttons",
|
|
1200
|
+
border: "none"
|
|
1201
|
+
}, getColorsAndStatesByPath("buttons.icon")), {
|
|
1202
|
+
svg: {
|
|
1203
|
+
width: "auto",
|
|
1204
|
+
height: "20px",
|
|
1205
|
+
display: "block"
|
|
1206
|
+
},
|
|
1207
|
+
"&.isToggled": __spreadValues$h({}, getColorsAndStatesByPath("buttons.iconToggled"))
|
|
1208
|
+
}),
|
|
1209
|
+
"icon-primary": __spreadValues$h({
|
|
1210
|
+
variant: "buttons.icon"
|
|
1211
|
+
}, getColorsAndStatesByPath("buttons.iconPrimary")),
|
|
1212
|
+
"icon-outline": __spreadValues$h({
|
|
1213
|
+
variant: "buttons.icon",
|
|
1214
|
+
bg: "white",
|
|
1215
|
+
border: "1px solid"
|
|
1216
|
+
}, getColorsAndStatesByPath("buttons.iconOutline")),
|
|
1217
|
+
"icon-outline-danger": __spreadValues$h({
|
|
1218
|
+
variant: "buttons.icon",
|
|
1219
|
+
bg: "white",
|
|
1220
|
+
border: "1px solid"
|
|
1221
|
+
}, getColorsAndStatesByPath("buttons.outlineDanger")),
|
|
1222
|
+
"icon-only": __spreadValues$h({
|
|
1223
|
+
variant: "buttons.icon"
|
|
1224
|
+
}, getColorsAndStatesByPath("buttons.iconOnly")),
|
|
1225
|
+
link: __spreadValues$h({
|
|
1226
|
+
variant: "inherit",
|
|
1227
|
+
width: "auto",
|
|
1228
|
+
border: "none",
|
|
1229
|
+
textDecoration: "underline",
|
|
1230
|
+
px: 2,
|
|
1231
|
+
py: 1,
|
|
1232
|
+
borderRadius: "buttons",
|
|
1233
|
+
cursor: "pointer",
|
|
1234
|
+
textTransform: "none",
|
|
1235
|
+
transition: "background-color 300ms ease-out, color 300ms ease-out"
|
|
1236
|
+
}, getColorsAndStatesByPath("buttons.link")),
|
|
1237
|
+
"link-sm": __spreadValues$h({
|
|
1238
|
+
variant: "buttons.link"
|
|
1239
|
+
}, smallButton),
|
|
1240
|
+
outline: __spreadValues$h({
|
|
1241
|
+
variant: "buttons.primary",
|
|
1242
|
+
borderWidth: "2px",
|
|
1243
|
+
borderStyle: "solid",
|
|
1244
|
+
borderRadius: "buttons",
|
|
1245
|
+
"&:focus, &:focus-visible": {}
|
|
1246
|
+
}, getColorsAndStatesByPath("buttons.outline")),
|
|
1247
|
+
"outline-sm": __spreadValues$h({
|
|
1248
|
+
variant: "buttons.outline"
|
|
1249
|
+
}, smallButton),
|
|
1250
|
+
"transparent-sm": __spreadValues$h({
|
|
1251
|
+
variant: "buttons.outline",
|
|
1252
|
+
"&:focus, &:focus-visible": {},
|
|
1253
|
+
bg: "transparent",
|
|
1254
|
+
color: "inherit",
|
|
1255
|
+
border: "none",
|
|
1256
|
+
font: "inherit",
|
|
1257
|
+
textTransform: "inherit"
|
|
1258
|
+
}, smallButton),
|
|
1259
|
+
"outline-danger": __spreadValues$h({
|
|
1260
|
+
variant: "buttons.outline",
|
|
1261
|
+
"&:focus, &:focus-visible": {}
|
|
1262
|
+
}, getColorsAndStatesByPath("buttons.outlineDanger")),
|
|
1263
|
+
"outline-danger-sm": __spreadValues$h({
|
|
1264
|
+
variant: "buttons.outline-danger"
|
|
1265
|
+
}, smallButton),
|
|
1266
|
+
"outline-warning": __spreadValues$h({
|
|
1267
|
+
variant: "buttons.outline",
|
|
1268
|
+
"&:focus, &:focus-visible": {}
|
|
1269
|
+
}, getColorsAndStatesByPath("buttons.outlineWarning")),
|
|
1270
|
+
"outline-warning-sm": __spreadValues$h({
|
|
1271
|
+
variant: "buttons.outline-warning"
|
|
1272
|
+
}, smallButton),
|
|
1273
|
+
"outline-extended": {
|
|
1274
|
+
variant: "buttons.outline",
|
|
1275
|
+
gridColumnStart: 1,
|
|
1276
|
+
gridColumnEnd: 3,
|
|
1277
|
+
width: "100%"
|
|
1278
|
+
},
|
|
1279
|
+
"outline-danger-extended": {
|
|
1280
|
+
variant: "buttons.outline-danger",
|
|
1281
|
+
gridColumnStart: 1,
|
|
1282
|
+
gridColumnEnd: 3,
|
|
1283
|
+
width: "100%"
|
|
1284
|
+
},
|
|
1285
|
+
"primary-extended": {
|
|
1286
|
+
variant: "buttons.primary",
|
|
1287
|
+
"&:focus, &:focus-visible": {},
|
|
1288
|
+
gridColumnStart: 1,
|
|
1289
|
+
gridColumnEnd: 3,
|
|
1290
|
+
width: "100%"
|
|
1291
|
+
},
|
|
1292
|
+
query: {
|
|
1293
|
+
extended: {
|
|
1294
|
+
variant: "buttons.outline",
|
|
1295
|
+
"&:focus, &:focus-visible": {},
|
|
1296
|
+
gridColumnStart: 1,
|
|
1297
|
+
gridColumnEnd: 3
|
|
1298
|
+
}
|
|
1299
|
+
},
|
|
1300
|
+
tableAccordion: __spreadValues$h({
|
|
1301
|
+
variant: "buttons.accordion",
|
|
1302
|
+
fontSize: "text.default",
|
|
1303
|
+
p: spacing(3),
|
|
1304
|
+
wordBreak: "keep-all",
|
|
1305
|
+
a: {
|
|
1306
|
+
color: "background"
|
|
1307
|
+
}
|
|
1308
|
+
}, getColorsAndStatesByPath("buttons.tableAccordion")),
|
|
1309
|
+
tableHeader: __spreadValues$h({
|
|
1310
|
+
variant: "buttons.tableAccordion",
|
|
1311
|
+
alignItems: "center",
|
|
1312
|
+
justifyContent: "center",
|
|
1313
|
+
height: "100%",
|
|
1314
|
+
border: "none",
|
|
1315
|
+
svg: {
|
|
1316
|
+
ml: spacing(2)
|
|
1317
|
+
}
|
|
1318
|
+
}, getColorsAndStatesByPath("buttons.tableHeader"))
|
|
1319
|
+
};
|
|
1320
|
+
|
|
1321
|
+
var __defProp$g = Object.defineProperty;
|
|
1322
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
1323
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
1324
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
1325
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1326
|
+
var __spreadValues$g = (a, b) => {
|
|
1327
|
+
for (var prop in b || (b = {}))
|
|
1328
|
+
if (__hasOwnProp$g.call(b, prop))
|
|
1329
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
1330
|
+
if (__getOwnPropSymbols$g)
|
|
1331
|
+
for (var prop of __getOwnPropSymbols$g(b)) {
|
|
1332
|
+
if (__propIsEnum$g.call(b, prop))
|
|
1333
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
1334
|
+
}
|
|
1335
|
+
return a;
|
|
1336
|
+
};
|
|
1337
|
+
const customCheckbox = __spreadValues$g({
|
|
1338
|
+
display: "inline-flex",
|
|
1339
|
+
borderRadius: "default",
|
|
1340
|
+
flexBasis: "32px",
|
|
1341
|
+
flexShrink: 0,
|
|
1342
|
+
width: "32px",
|
|
1343
|
+
height: "32px",
|
|
1344
|
+
alignItems: "center",
|
|
1345
|
+
justifyContent: "center",
|
|
1346
|
+
p: "3px",
|
|
1347
|
+
border: "1px solid",
|
|
1348
|
+
svg: {
|
|
1349
|
+
width: "20px"
|
|
1350
|
+
}
|
|
1351
|
+
}, getColorsAndStatesByPath("form.fields", {
|
|
1352
|
+
states: {
|
|
1353
|
+
active: false,
|
|
1354
|
+
hover: false,
|
|
1355
|
+
focus: false
|
|
1356
|
+
}
|
|
1357
|
+
}));
|
|
1358
|
+
|
|
1359
|
+
var __defProp$f = Object.defineProperty;
|
|
1360
|
+
var __defProps$8 = Object.defineProperties;
|
|
1361
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
1362
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
1363
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
1364
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
1365
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1366
|
+
var __spreadValues$f = (a, b) => {
|
|
1367
|
+
for (var prop in b || (b = {}))
|
|
1368
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
1369
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
1370
|
+
if (__getOwnPropSymbols$f)
|
|
1371
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
1372
|
+
if (__propIsEnum$f.call(b, prop))
|
|
1373
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
1374
|
+
}
|
|
1375
|
+
return a;
|
|
1376
|
+
};
|
|
1377
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
1378
|
+
const checkbox = __spreadProps$8(__spreadValues$f({
|
|
1379
|
+
borderRadius: "default"
|
|
1380
|
+
}, getColorsAndStatesByPath("form.fields", {
|
|
1381
|
+
states: {
|
|
1382
|
+
active: false,
|
|
1383
|
+
focus: false,
|
|
1384
|
+
hover: false
|
|
1385
|
+
}
|
|
1386
|
+
})), {
|
|
1387
|
+
backgroundColor: "unset",
|
|
1388
|
+
alignItems: "center",
|
|
1389
|
+
"&.nativeCheckbox": {
|
|
1390
|
+
appearance: "none",
|
|
1391
|
+
width: "25px",
|
|
1392
|
+
height: "25px",
|
|
1393
|
+
border: "solid 1px #cccccc",
|
|
1394
|
+
marginRight: "8px",
|
|
1395
|
+
position: "relative",
|
|
1396
|
+
cursor: "pointer",
|
|
1397
|
+
"&:checked::before": {
|
|
1398
|
+
content: '"\u2713"',
|
|
1399
|
+
color: "palette.text.primary",
|
|
1400
|
+
position: "absolute",
|
|
1401
|
+
display: "flex",
|
|
1402
|
+
alignItems: "center",
|
|
1403
|
+
justifyContent: "center",
|
|
1404
|
+
top: 0,
|
|
1405
|
+
left: 0,
|
|
1406
|
+
right: 0,
|
|
1407
|
+
bottom: 0,
|
|
1408
|
+
fontSize: "larger",
|
|
1409
|
+
fontWeight: "bolder",
|
|
1410
|
+
borderRadius: "5px",
|
|
1411
|
+
cursor: "pointer"
|
|
1412
|
+
},
|
|
1413
|
+
"&:indeterminate::before": {
|
|
1414
|
+
content: '"-"',
|
|
1415
|
+
color: "palette.text.primary",
|
|
1416
|
+
position: "absolute",
|
|
1417
|
+
display: "flex",
|
|
1418
|
+
alignItems: "center",
|
|
1419
|
+
justifyContent: "center",
|
|
1420
|
+
top: "-1px",
|
|
1421
|
+
left: 0,
|
|
1422
|
+
right: 0,
|
|
1423
|
+
bottom: 0,
|
|
1424
|
+
fontSize: "xx-large",
|
|
1425
|
+
fontWeight: "600",
|
|
1426
|
+
borderRadius: "5px",
|
|
1427
|
+
cursor: "pointer"
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
});
|
|
1431
|
+
|
|
1432
|
+
var __defProp$e = Object.defineProperty;
|
|
1433
|
+
var __defProps$7 = Object.defineProperties;
|
|
1434
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
1435
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
1436
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
1437
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
1438
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1439
|
+
var __spreadValues$e = (a, b) => {
|
|
1440
|
+
for (var prop in b || (b = {}))
|
|
1441
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
1442
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
1443
|
+
if (__getOwnPropSymbols$e)
|
|
1444
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
1445
|
+
if (__propIsEnum$e.call(b, prop))
|
|
1446
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
1447
|
+
}
|
|
1448
|
+
return a;
|
|
1449
|
+
};
|
|
1450
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
1451
|
+
const dateInput = __spreadProps$7(__spreadValues$e({
|
|
1452
|
+
display: "flex",
|
|
1453
|
+
flexDirection: "column",
|
|
1454
|
+
alignItems: "stretch",
|
|
1455
|
+
justifyContent: "stretch",
|
|
1456
|
+
gap: spacing(2),
|
|
1457
|
+
width: "100%",
|
|
1458
|
+
"&.readOnly": {
|
|
1459
|
+
input: {
|
|
1460
|
+
color: "Text.fields",
|
|
1461
|
+
bg: "Background.fields"
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
".iconInput": {
|
|
1465
|
+
width: "100%",
|
|
1466
|
+
position: "relative"
|
|
1467
|
+
},
|
|
1468
|
+
'input:hover~.delete_date_button:not(:disabled,[aria-selected="true"]), input:hover~.delete_date_button:not(:disabled,[aria-selected="true"]) path, .delete_date_button': __spreadValues$e({
|
|
1469
|
+
position: "absolute",
|
|
1470
|
+
right: "59px",
|
|
1471
|
+
padding: 0,
|
|
1472
|
+
top: "calc(50% - 10px)",
|
|
1473
|
+
margin: 0,
|
|
1474
|
+
marginRight: 0,
|
|
1475
|
+
borderRadius: "100%",
|
|
1476
|
+
width: "20px",
|
|
1477
|
+
height: "20px"
|
|
1478
|
+
}, getColorsAndStatesByPath("buttons.icon-outline")),
|
|
1479
|
+
input: {
|
|
1480
|
+
flexShrink: 1
|
|
1481
|
+
},
|
|
1482
|
+
"& > div": {
|
|
1483
|
+
display: "flex",
|
|
1484
|
+
gap: spacing(2),
|
|
1485
|
+
flexShrink: 0,
|
|
1486
|
+
width: "auto",
|
|
1487
|
+
maxWidth: "100%",
|
|
1488
|
+
minWidth: 0,
|
|
1489
|
+
button: {
|
|
1490
|
+
width: "45px",
|
|
1491
|
+
flexShrink: 0
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
}, getColorsAndStatesByPath("form.fields", {
|
|
1495
|
+
states: {
|
|
1496
|
+
hover: false,
|
|
1497
|
+
active: false,
|
|
1498
|
+
focus: false
|
|
1499
|
+
}
|
|
1500
|
+
})), {
|
|
1501
|
+
backgroundColor: void 0
|
|
1502
|
+
});
|
|
1503
|
+
|
|
1504
|
+
var __defProp$d = Object.defineProperty;
|
|
1505
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
1506
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
1507
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
1508
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1509
|
+
var __spreadValues$d = (a, b) => {
|
|
1510
|
+
for (var prop in b || (b = {}))
|
|
1511
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
1512
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
1513
|
+
if (__getOwnPropSymbols$d)
|
|
1514
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
1515
|
+
if (__propIsEnum$d.call(b, prop))
|
|
1516
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
1517
|
+
}
|
|
1518
|
+
return a;
|
|
1519
|
+
};
|
|
1520
|
+
const iconInput = {
|
|
1521
|
+
display: "flex",
|
|
1522
|
+
gap: spacing(1),
|
|
1523
|
+
justifyContent: "stretch",
|
|
1524
|
+
alignItems: "center",
|
|
1525
|
+
"&.readOnly": {
|
|
1526
|
+
input: __spreadValues$d({}, getColorsByPath("form.fields"))
|
|
1527
|
+
},
|
|
1528
|
+
input: {
|
|
1529
|
+
height: "50px",
|
|
1530
|
+
width: "100%"
|
|
1531
|
+
},
|
|
1532
|
+
button: {
|
|
1533
|
+
display: "flex",
|
|
1534
|
+
width: "45px",
|
|
1535
|
+
flexShrink: 0,
|
|
1536
|
+
height: "50px"
|
|
1537
|
+
}
|
|
1538
|
+
};
|
|
1539
|
+
|
|
1540
|
+
var __defProp$c = Object.defineProperty;
|
|
1541
|
+
var __defProps$6 = Object.defineProperties;
|
|
1542
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
1543
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
1544
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
1545
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
1546
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1547
|
+
var __spreadValues$c = (a, b) => {
|
|
1548
|
+
for (var prop in b || (b = {}))
|
|
1549
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
1550
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
1551
|
+
if (__getOwnPropSymbols$c)
|
|
1552
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
1553
|
+
if (__propIsEnum$c.call(b, prop))
|
|
1554
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
1555
|
+
}
|
|
1556
|
+
return a;
|
|
1557
|
+
};
|
|
1558
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
1559
|
+
const input = __spreadProps$6(__spreadValues$c({
|
|
1560
|
+
variant: "text.default",
|
|
1561
|
+
border: "1px solid",
|
|
1562
|
+
borderRadius: "default",
|
|
1563
|
+
padding: responsive$1({ 0: 3, 3: 4 }),
|
|
1564
|
+
"::placeholder": {
|
|
1565
|
+
color: "#b0b0b0"
|
|
1566
|
+
}
|
|
1567
|
+
}, getColorsAndStatesByPath("form.fields", {
|
|
1568
|
+
states: {
|
|
1569
|
+
active: false,
|
|
1570
|
+
hover: false,
|
|
1571
|
+
focus: false
|
|
1572
|
+
}
|
|
1573
|
+
})), {
|
|
1574
|
+
material: {
|
|
1575
|
+
input: {
|
|
1576
|
+
borderLeft: "none",
|
|
1577
|
+
borderRight: "none",
|
|
1578
|
+
borderTop: "none",
|
|
1579
|
+
borderBottomColor: "palette.border.section",
|
|
1580
|
+
"& + .input__underline": {
|
|
1581
|
+
transform: "scale(1)"
|
|
1582
|
+
},
|
|
1583
|
+
"&:focus": {
|
|
1584
|
+
outline: "none",
|
|
1585
|
+
"~::after": {
|
|
1586
|
+
animationName: "growHorizontal",
|
|
1587
|
+
animationDuration: "150ms",
|
|
1588
|
+
animationTimingFunction: "ease-out",
|
|
1589
|
+
content: '""',
|
|
1590
|
+
display: "block",
|
|
1591
|
+
height: "0",
|
|
1592
|
+
outlineColor: "palette.primary.main",
|
|
1593
|
+
outlineStyle: "solid",
|
|
1594
|
+
outlineWidth: "1.5px",
|
|
1595
|
+
outlineOffset: 0,
|
|
1596
|
+
position: "fixed",
|
|
1597
|
+
transformOrigin: "center center",
|
|
1598
|
+
width: "100%"
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
});
|
|
1604
|
+
|
|
1605
|
+
const label = {
|
|
1606
|
+
variant: "text.default",
|
|
1607
|
+
alignItems: "center",
|
|
1608
|
+
width: "auto",
|
|
1609
|
+
textTransform: "none",
|
|
1610
|
+
cursor: "pointer",
|
|
1611
|
+
"&:not(.radio-label)": {
|
|
1612
|
+
fontWeight: "bold"
|
|
1613
|
+
},
|
|
1614
|
+
"&.required": {
|
|
1615
|
+
position: "relative",
|
|
1616
|
+
"&::before": {
|
|
1617
|
+
color: "danger",
|
|
1618
|
+
position: "absolute",
|
|
1619
|
+
content: '"*"',
|
|
1620
|
+
top: 0,
|
|
1621
|
+
left: "-10px"
|
|
1622
|
+
}
|
|
1623
|
+
},
|
|
1624
|
+
"&:last-of-type": {
|
|
1625
|
+
"input, textarea, select": {
|
|
1626
|
+
mb: spacing(0)
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
};
|
|
1630
|
+
|
|
1631
|
+
var __defProp$b = Object.defineProperty;
|
|
1632
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
1633
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
1634
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
1635
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1636
|
+
var __spreadValues$b = (a, b) => {
|
|
1637
|
+
for (var prop in b || (b = {}))
|
|
1638
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
1639
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
1640
|
+
if (__getOwnPropSymbols$b)
|
|
1641
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
1642
|
+
if (__propIsEnum$b.call(b, prop))
|
|
1643
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
1644
|
+
}
|
|
1645
|
+
return a;
|
|
1646
|
+
};
|
|
1647
|
+
const radio = __spreadValues$b({
|
|
1648
|
+
width: "32px",
|
|
1649
|
+
height: "32px",
|
|
1650
|
+
input: {
|
|
1651
|
+
height: "32px !important"
|
|
1652
|
+
}
|
|
1653
|
+
}, getColorsAndStatesByPath("form.radio"));
|
|
1654
|
+
|
|
1655
|
+
var __defProp$a = Object.defineProperty;
|
|
1656
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
1657
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
1658
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
1659
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1660
|
+
var __spreadValues$a = (a, b) => {
|
|
1661
|
+
for (var prop in b || (b = {}))
|
|
1662
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
1663
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
1664
|
+
if (__getOwnPropSymbols$a)
|
|
1665
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
1666
|
+
if (__propIsEnum$a.call(b, prop))
|
|
1667
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
1668
|
+
}
|
|
1669
|
+
return a;
|
|
1670
|
+
};
|
|
1671
|
+
const select = __spreadValues$a({
|
|
1672
|
+
variant: "text.default",
|
|
1673
|
+
display: "inline-block",
|
|
1674
|
+
fontFamily: "body",
|
|
1675
|
+
p: spacing(4),
|
|
1676
|
+
pr: 7,
|
|
1677
|
+
borderRadius: "default",
|
|
1678
|
+
width: "100%",
|
|
1679
|
+
maxWidth: "100%"
|
|
1680
|
+
}, getColorsAndStatesByPath("form.fields", {
|
|
1681
|
+
states: {
|
|
1682
|
+
active: false,
|
|
1683
|
+
hover: false,
|
|
1684
|
+
focus: false
|
|
1685
|
+
}
|
|
1686
|
+
}));
|
|
1687
|
+
|
|
1688
|
+
var __defProp$9 = Object.defineProperty;
|
|
1689
|
+
var __defProps$5 = Object.defineProperties;
|
|
1690
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
1691
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
1692
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
1693
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
1694
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1695
|
+
var __spreadValues$9 = (a, b) => {
|
|
1696
|
+
for (var prop in b || (b = {}))
|
|
1697
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
1698
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
1699
|
+
if (__getOwnPropSymbols$9)
|
|
1700
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
1701
|
+
if (__propIsEnum$9.call(b, prop))
|
|
1702
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
1703
|
+
}
|
|
1704
|
+
return a;
|
|
1705
|
+
};
|
|
1706
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
1707
|
+
const selectMultiple = __spreadValues$9({
|
|
1708
|
+
variant: "text.default",
|
|
1709
|
+
height: "100%",
|
|
1710
|
+
padding: "4px",
|
|
1711
|
+
borderRadius: "default",
|
|
1712
|
+
border: "1px solid",
|
|
1713
|
+
width: "100%",
|
|
1714
|
+
transition: "background-color 100ms ease-out, color 100ms ease-out",
|
|
1715
|
+
overflow: "auto",
|
|
1716
|
+
option: __spreadProps$5(__spreadValues$9({
|
|
1717
|
+
padding: 2
|
|
1718
|
+
}, getSelectedColors()), {
|
|
1719
|
+
"&:checked": {
|
|
1720
|
+
backgroundColor: window.currentPalette.getColor(
|
|
1721
|
+
window.currentPalette.background.paper,
|
|
1722
|
+
"selected"
|
|
1723
|
+
),
|
|
1724
|
+
color: window.currentPalette.getContrastText(
|
|
1725
|
+
window.currentPalette.getColor(
|
|
1726
|
+
window.currentPalette.background.paper,
|
|
1727
|
+
"selected"
|
|
1728
|
+
)
|
|
1729
|
+
)
|
|
1730
|
+
}
|
|
1731
|
+
}),
|
|
1732
|
+
"+ svg": {
|
|
1733
|
+
display: "none"
|
|
1734
|
+
}
|
|
1735
|
+
}, getColorsAndStatesByPath("form.fields", {
|
|
1736
|
+
states: {
|
|
1737
|
+
active: false,
|
|
1738
|
+
hover: false,
|
|
1739
|
+
focus: false
|
|
1740
|
+
}
|
|
1741
|
+
}));
|
|
1742
|
+
|
|
1743
|
+
const Switch = {
|
|
1744
|
+
"+ span": {
|
|
1745
|
+
fontSize: 14,
|
|
1746
|
+
fontWeight: "normal",
|
|
1747
|
+
wordBreak: "break-all"
|
|
1748
|
+
},
|
|
1749
|
+
backgroundColor: "form.fields.checked.borderColor"
|
|
1750
|
+
};
|
|
1751
|
+
|
|
1752
|
+
const textarea = {
|
|
1753
|
+
"&, & textarea": {
|
|
1754
|
+
height: "100%",
|
|
1755
|
+
minHeight: "130px",
|
|
1756
|
+
resize: "vertical"
|
|
1757
|
+
},
|
|
1758
|
+
textarea: {
|
|
1759
|
+
variant: "forms.input"
|
|
1760
|
+
}
|
|
1761
|
+
};
|
|
1762
|
+
|
|
1763
|
+
var __defProp$8 = Object.defineProperty;
|
|
1764
|
+
var __defProps$4 = Object.defineProperties;
|
|
1765
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
1766
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
1767
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
1768
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
1769
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1770
|
+
var __spreadValues$8 = (a, b) => {
|
|
1771
|
+
for (var prop in b || (b = {}))
|
|
1772
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
1773
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
1774
|
+
if (__getOwnPropSymbols$8)
|
|
1775
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
1776
|
+
if (__propIsEnum$8.call(b, prop))
|
|
1777
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
1778
|
+
}
|
|
1779
|
+
return a;
|
|
1780
|
+
};
|
|
1781
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
1782
|
+
const deletableInput = {
|
|
1783
|
+
border: "1px solid",
|
|
1784
|
+
borderColor: "palette.border.field",
|
|
1785
|
+
display: "inline-block",
|
|
1786
|
+
position: "relative",
|
|
1787
|
+
pr: "45px",
|
|
1788
|
+
".deletableInput__input": {
|
|
1789
|
+
border: "none"
|
|
1790
|
+
},
|
|
1791
|
+
".deletableInput__deleteButton": __spreadValues$8({
|
|
1792
|
+
height: "100%",
|
|
1793
|
+
outlineOffset: "-2px",
|
|
1794
|
+
position: "absolute",
|
|
1795
|
+
right: 0,
|
|
1796
|
+
top: 0,
|
|
1797
|
+
width: "45px"
|
|
1798
|
+
}, getColorsAndStatesByPath("buttons.deletableInputButton")),
|
|
1799
|
+
"&:focus-within:not(.asMaterial)": __spreadProps$4(__spreadValues$8({}, focusOutline), {
|
|
1800
|
+
".deletableInput__input:focus": {
|
|
1801
|
+
outline: "none"
|
|
1802
|
+
},
|
|
1803
|
+
".deletableInput__deleteButton:focus": {
|
|
1804
|
+
outline: "none"
|
|
1805
|
+
}
|
|
1806
|
+
}),
|
|
1807
|
+
"&.asMaterial": {
|
|
1808
|
+
borderLeft: "none",
|
|
1809
|
+
borderRight: "none",
|
|
1810
|
+
borderTop: "none",
|
|
1811
|
+
borderBottomColor: "palette.border.section",
|
|
1812
|
+
"& + .input__underline": {
|
|
1813
|
+
transform: "scale(1)"
|
|
1814
|
+
},
|
|
1815
|
+
".deletableInput__input:focus": {
|
|
1816
|
+
outline: "none",
|
|
1817
|
+
"~.input__underline::after": {
|
|
1818
|
+
animationName: "growHorizontal",
|
|
1819
|
+
animationDuration: "150ms",
|
|
1820
|
+
animationTimingFunction: "ease-out",
|
|
1821
|
+
content: '""',
|
|
1822
|
+
display: "block",
|
|
1823
|
+
height: "0",
|
|
1824
|
+
outlineColor: "palette.primary.main",
|
|
1825
|
+
outlineStyle: "solid",
|
|
1826
|
+
outlineWidth: "1.5px",
|
|
1827
|
+
outlineOffset: 0,
|
|
1828
|
+
position: "absolute",
|
|
1829
|
+
transformOrigin: "center center",
|
|
1830
|
+
left: 0,
|
|
1831
|
+
right: 0
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
};
|
|
1836
|
+
|
|
1837
|
+
const forms$1 = () => {
|
|
1838
|
+
return {
|
|
1839
|
+
checkbox,
|
|
1840
|
+
customCheckbox,
|
|
1841
|
+
dateInput,
|
|
1842
|
+
deletableInput,
|
|
1843
|
+
iconInput,
|
|
1844
|
+
input,
|
|
1845
|
+
label,
|
|
1846
|
+
radio,
|
|
1847
|
+
select,
|
|
1848
|
+
selectMultiple,
|
|
1849
|
+
switch: Switch,
|
|
1850
|
+
textarea,
|
|
1851
|
+
/* PREPEND HERE */
|
|
1852
|
+
'input[type="date"]': {
|
|
1853
|
+
variant: "forms.input"
|
|
1854
|
+
}
|
|
1855
|
+
};
|
|
1856
|
+
};
|
|
1857
|
+
|
|
1858
|
+
const overlay = {
|
|
1859
|
+
overlay: {
|
|
1860
|
+
position: "fixed",
|
|
1861
|
+
overflow: "hidden",
|
|
1862
|
+
top: "0",
|
|
1863
|
+
right: "0",
|
|
1864
|
+
bottom: "0",
|
|
1865
|
+
left: "0",
|
|
1866
|
+
width: "100vw",
|
|
1867
|
+
height: "100vh",
|
|
1868
|
+
display: "flex",
|
|
1869
|
+
justifyContent: "center",
|
|
1870
|
+
padding: "1.5em 1.5em",
|
|
1871
|
+
alignItems: "center",
|
|
1872
|
+
backgroundColor: `palette.background.overlay`,
|
|
1873
|
+
zIndex: "modal",
|
|
1874
|
+
"&:not(.screenLock) .modal-enter-done": {
|
|
1875
|
+
boxShadow: "modals"
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
};
|
|
1879
|
+
|
|
1880
|
+
const apiaApi = {
|
|
1881
|
+
margin: "auto",
|
|
1882
|
+
display: "flex",
|
|
1883
|
+
flexDirection: "column",
|
|
1884
|
+
wordBreak: "break-word",
|
|
1885
|
+
overflow: "hidden",
|
|
1886
|
+
width: "100%",
|
|
1887
|
+
".handler__form": {
|
|
1888
|
+
display: "flex",
|
|
1889
|
+
flexDirection: "column",
|
|
1890
|
+
overflow: "hidden",
|
|
1891
|
+
gap: spacing(6),
|
|
1892
|
+
".toggleAccordionElement": {
|
|
1893
|
+
position: "sticky",
|
|
1894
|
+
top: 0
|
|
1895
|
+
},
|
|
1896
|
+
".handler__form__elements": {
|
|
1897
|
+
display: "flex",
|
|
1898
|
+
flexDirection: "column",
|
|
1899
|
+
alignItems: "stretch",
|
|
1900
|
+
overflowY: "auto",
|
|
1901
|
+
maxHeight: "60vh",
|
|
1902
|
+
gap: spacing(3),
|
|
1903
|
+
pr: spacing(3)
|
|
1904
|
+
},
|
|
1905
|
+
".handler__form__elements__section__content": {
|
|
1906
|
+
display: "flex",
|
|
1907
|
+
flexDirection: "column",
|
|
1908
|
+
wordBreak: "break-word",
|
|
1909
|
+
background: "palette.background.paper",
|
|
1910
|
+
p: 0,
|
|
1911
|
+
gap: spacing(3)
|
|
1912
|
+
},
|
|
1913
|
+
".content .handler__form__elements__section__content": {
|
|
1914
|
+
border: "1px solid",
|
|
1915
|
+
borderColor: "palette.border.section",
|
|
1916
|
+
borderTop: "none",
|
|
1917
|
+
p: spacing(6)
|
|
1918
|
+
},
|
|
1919
|
+
".handler__form__buttons": {
|
|
1920
|
+
display: "flex",
|
|
1921
|
+
flexDirection: "row",
|
|
1922
|
+
justifyContent: "center",
|
|
1923
|
+
p: 0,
|
|
1924
|
+
gap: "0px",
|
|
1925
|
+
textAlign: "center"
|
|
1926
|
+
},
|
|
1927
|
+
".radio": {
|
|
1928
|
+
display: "flex",
|
|
1929
|
+
flexDirection: "column",
|
|
1930
|
+
flexWrap: "wrap",
|
|
1931
|
+
listStyle: "none",
|
|
1932
|
+
variant: "layout.execution.form.fields.radio"
|
|
1933
|
+
},
|
|
1934
|
+
".handler__checkbox, .handler__radio": {
|
|
1935
|
+
"label span": {
|
|
1936
|
+
fontWeight: "normal"
|
|
1937
|
+
}
|
|
1938
|
+
},
|
|
1939
|
+
".checkbox": {
|
|
1940
|
+
flexDirection: "row-reverse",
|
|
1941
|
+
alignItems: "center",
|
|
1942
|
+
justifyContent: "start",
|
|
1943
|
+
gap: spacing(4),
|
|
1944
|
+
".semicolon": {
|
|
1945
|
+
display: "none"
|
|
1946
|
+
},
|
|
1947
|
+
input: {
|
|
1948
|
+
width: "100%"
|
|
1949
|
+
}
|
|
1950
|
+
},
|
|
1951
|
+
".handler__hidden": {
|
|
1952
|
+
display: "none"
|
|
1953
|
+
},
|
|
1954
|
+
"label.select > div": {
|
|
1955
|
+
width: "100%"
|
|
1956
|
+
},
|
|
1957
|
+
".spacer": {
|
|
1958
|
+
height: spacing(7)
|
|
1959
|
+
}
|
|
1960
|
+
},
|
|
1961
|
+
".progressBox": {
|
|
1962
|
+
p: spacing(5),
|
|
1963
|
+
pt: spacing(0)
|
|
1964
|
+
}
|
|
1965
|
+
/* PREPEND HERE */
|
|
1966
|
+
};
|
|
1967
|
+
|
|
1968
|
+
var __defProp$7 = Object.defineProperty;
|
|
1969
|
+
var __defProps$3 = Object.defineProperties;
|
|
1970
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
1971
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
1972
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
1973
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
1974
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1975
|
+
var __spreadValues$7 = (a, b) => {
|
|
1976
|
+
for (var prop in b || (b = {}))
|
|
1977
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
1978
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
1979
|
+
if (__getOwnPropSymbols$7)
|
|
1980
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
1981
|
+
if (__propIsEnum$7.call(b, prop))
|
|
1982
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
1983
|
+
}
|
|
1984
|
+
return a;
|
|
1985
|
+
};
|
|
1986
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
1987
|
+
const modals = __spreadProps$3(__spreadValues$7({
|
|
1988
|
+
apiaApi
|
|
1989
|
+
}, overlay), {
|
|
1990
|
+
main: __spreadValues$7({
|
|
1991
|
+
zIndex: "modal",
|
|
1992
|
+
display: "flex",
|
|
1993
|
+
flexDirection: "column",
|
|
1994
|
+
p: spacing(6),
|
|
1995
|
+
alignItems: "center",
|
|
1996
|
+
justifyItems: "center",
|
|
1997
|
+
maxHeight: "100vh",
|
|
1998
|
+
maxWidth: "calc(100vw - 10px)",
|
|
1999
|
+
resize: "both",
|
|
2000
|
+
overflow: "auto",
|
|
2001
|
+
border: "1px solid",
|
|
2002
|
+
gap: spacing(5),
|
|
2003
|
+
"&>div": {
|
|
2004
|
+
overflow: "hidden",
|
|
2005
|
+
flexGrow: 0,
|
|
2006
|
+
flexShrink: 0,
|
|
2007
|
+
p: "3px",
|
|
2008
|
+
width: "100%"
|
|
2009
|
+
},
|
|
2010
|
+
"&>div.modal__header": {
|
|
2011
|
+
alignItems: responsive$1({ 0: "end", 4: "center" }),
|
|
2012
|
+
flexShrink: 0,
|
|
2013
|
+
overflow: "visible",
|
|
2014
|
+
".modal__headerBar": {
|
|
2015
|
+
display: "flex",
|
|
2016
|
+
flexDirection: "row",
|
|
2017
|
+
gap: spacing(3)
|
|
2018
|
+
}
|
|
2019
|
+
},
|
|
2020
|
+
"&>div.modal__content, &>div.modal__content>form": {
|
|
2021
|
+
overflow: "auto",
|
|
2022
|
+
width: "100%",
|
|
2023
|
+
flexBasis: "100%",
|
|
2024
|
+
flexShrink: 1,
|
|
2025
|
+
display: "flex",
|
|
2026
|
+
justifyContent: "stretch",
|
|
2027
|
+
alignItems: "stretch"
|
|
2028
|
+
}
|
|
2029
|
+
}, getColorsByPath("modal")),
|
|
2030
|
+
finder: {
|
|
2031
|
+
variant: "layout.common.modals.main",
|
|
2032
|
+
height: responsive$1({ 0: "100vh", 3: "80vh" }),
|
|
2033
|
+
width: responsive$1({ 0: "95vw", 3: "80vw", 4: "70vw" }),
|
|
2034
|
+
".modal__content": {
|
|
2035
|
+
p: spacing(2),
|
|
2036
|
+
overflow: "hidden",
|
|
2037
|
+
".confirm__content": {
|
|
2038
|
+
overflow: "hidden",
|
|
2039
|
+
".finder__content": {
|
|
2040
|
+
display: "flex",
|
|
2041
|
+
alignItems: "stretch"
|
|
2042
|
+
},
|
|
2043
|
+
".selection__keyHandler": {
|
|
2044
|
+
overflow: "hidden",
|
|
2045
|
+
height: "100%",
|
|
2046
|
+
".responsiveTable__wrapper": {
|
|
2047
|
+
height: "100%",
|
|
2048
|
+
border: "1px solid",
|
|
2049
|
+
borderColor: "palette.border.article",
|
|
2050
|
+
backgroundColor: "palette.gray.900"
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
},
|
|
2056
|
+
sm: {
|
|
2057
|
+
variant: "layout.common.modals.main",
|
|
2058
|
+
maxWidth: "min(350px, calc(100vw - 10px))"
|
|
2059
|
+
},
|
|
2060
|
+
md: {
|
|
2061
|
+
variant: "layout.common.modals.main",
|
|
2062
|
+
maxWidth: "min(500px, calc(100vw - 10px))"
|
|
2063
|
+
},
|
|
2064
|
+
"md-fixed": {
|
|
2065
|
+
variant: "layout.common.modals.main",
|
|
2066
|
+
width: "min(500px, calc(100vw - 10px))"
|
|
2067
|
+
},
|
|
2068
|
+
lg: {
|
|
2069
|
+
variant: "layout.common.modals.main",
|
|
2070
|
+
maxWidth: "min(640px, calc(100vw - 10px))"
|
|
2071
|
+
},
|
|
2072
|
+
"lg-fixed": {
|
|
2073
|
+
variant: "layout.common.modals.main",
|
|
2074
|
+
maxWidth: "640px",
|
|
2075
|
+
height: "60vh"
|
|
2076
|
+
},
|
|
2077
|
+
xl: {
|
|
2078
|
+
variant: "layout.common.modals.main",
|
|
2079
|
+
maxWidth: "min(730px, calc(100vw - 10px))"
|
|
2080
|
+
},
|
|
2081
|
+
"xl-fixed": {
|
|
2082
|
+
variant: "layout.common.modals.main",
|
|
2083
|
+
width: responsive$1({ 0: "95vw", 2: "60vw" }),
|
|
2084
|
+
height: responsive$1({ 0: "95vh", 2: "80vh" })
|
|
2085
|
+
},
|
|
2086
|
+
xxl: {
|
|
2087
|
+
variant: "layout.common.modals.main",
|
|
2088
|
+
width: responsive$1({ 0: "95vw", 2: "80vw" }),
|
|
2089
|
+
maxHeight: responsive$1({ 0: "95vh", 2: "80vh" })
|
|
2090
|
+
},
|
|
2091
|
+
xxxl: {
|
|
2092
|
+
variant: "layout.common.modals.main",
|
|
2093
|
+
width: responsive$1({ 0: "95vw", 2: "95vw" }),
|
|
2094
|
+
maxHeight: responsive$1({ 0: "95vh", 2: "95vh" })
|
|
2095
|
+
},
|
|
2096
|
+
"xxxl-fixed": {
|
|
2097
|
+
variant: "layout.common.modals.main",
|
|
2098
|
+
width: responsive$1({ 0: "95vw", 2: "95vw" }),
|
|
2099
|
+
height: responsive$1({ 0: "95vh", 2: "95vh" })
|
|
2100
|
+
},
|
|
2101
|
+
flex: {
|
|
2102
|
+
variant: "layout.common.modals.main",
|
|
2103
|
+
maxWidth: "95vw",
|
|
2104
|
+
maxHeight: "95vh",
|
|
2105
|
+
".modal__content": {
|
|
2106
|
+
p: spacing(2),
|
|
2107
|
+
overflow: "auto"
|
|
2108
|
+
}
|
|
2109
|
+
},
|
|
2110
|
+
cal: {
|
|
2111
|
+
variant: "layout.common.modals.sm",
|
|
2112
|
+
width: "350px",
|
|
2113
|
+
".react-calendar": {
|
|
2114
|
+
backgroundColor: "palette.background.paper",
|
|
2115
|
+
button: __spreadProps$3(__spreadValues$7({}, getColorsAndStatesByPath("form.fields")), {
|
|
2116
|
+
"&.react-calendar__tile--active": __spreadValues$7({}, getColorsAndStatesByPath("buttons.primary"))
|
|
2117
|
+
})
|
|
2118
|
+
}
|
|
2119
|
+
},
|
|
2120
|
+
editGrid: {
|
|
2121
|
+
variant: "layout.common.modals.main",
|
|
2122
|
+
width: "root",
|
|
2123
|
+
maxHeight: "90vh"
|
|
2124
|
+
}
|
|
2125
|
+
/* PREPEND HERE */
|
|
2126
|
+
});
|
|
2127
|
+
|
|
2128
|
+
var __defProp$6 = Object.defineProperty;
|
|
2129
|
+
var __defProps$2 = Object.defineProperties;
|
|
2130
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
2131
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
2132
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
2133
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
2134
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2135
|
+
var __spreadValues$6 = (a, b) => {
|
|
2136
|
+
for (var prop in b || (b = {}))
|
|
2137
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
2138
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
2139
|
+
if (__getOwnPropSymbols$6)
|
|
2140
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
2141
|
+
if (__propIsEnum$6.call(b, prop))
|
|
2142
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
2143
|
+
}
|
|
2144
|
+
return a;
|
|
2145
|
+
};
|
|
2146
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
2147
|
+
function getSelectionStyles() {
|
|
2148
|
+
return {
|
|
2149
|
+
'td[data-focused="false"], th[data-focused="false"]': {
|
|
2150
|
+
"*:focus-visible, &:focus, &:focus-visible": {
|
|
2151
|
+
outline: "none"
|
|
2152
|
+
},
|
|
2153
|
+
"*:focus": __spreadValues$6({}, focusOutline$1)
|
|
2154
|
+
},
|
|
2155
|
+
'[data-focused="true"]:not(.row__separator__cell)': {
|
|
2156
|
+
'&:not([data-editionmode="true"])': {
|
|
2157
|
+
"&:focus, & > *:focus, *:focus-visible": __spreadProps$2(__spreadValues$6({}, focusOutline$1), {
|
|
2158
|
+
"&.cell__download__document": {
|
|
2159
|
+
outlineOffset: 0
|
|
2160
|
+
}
|
|
2161
|
+
})
|
|
2162
|
+
},
|
|
2163
|
+
'&[data-editionmode="true"]': {
|
|
2164
|
+
"&:focus, *:focus, *:focus-visible": __spreadProps$2(__spreadValues$6({}, focusOutline$1), {
|
|
2165
|
+
outlineStyle: "dotted",
|
|
2166
|
+
outlineWidth: "6px",
|
|
2167
|
+
outlineOffset: "-4px"
|
|
2168
|
+
})
|
|
2169
|
+
}
|
|
2170
|
+
},
|
|
2171
|
+
'[data-focused="true"].row__separator__cell': {
|
|
2172
|
+
backgroundColor: "palette.secondary.main",
|
|
2173
|
+
outline: "none"
|
|
2174
|
+
}
|
|
2175
|
+
};
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
var __defProp$5 = Object.defineProperty;
|
|
2179
|
+
var __defProps$1 = Object.defineProperties;
|
|
2180
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
2181
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
2182
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
2183
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
2184
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2185
|
+
var __spreadValues$5 = (a, b) => {
|
|
2186
|
+
for (var prop in b || (b = {}))
|
|
2187
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
2188
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
2189
|
+
if (__getOwnPropSymbols$5)
|
|
2190
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
2191
|
+
if (__propIsEnum$5.call(b, prop))
|
|
2192
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
2193
|
+
}
|
|
2194
|
+
return a;
|
|
2195
|
+
};
|
|
2196
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2197
|
+
const primary$1 = __spreadProps$1(__spreadValues$5({
|
|
2198
|
+
variant: "colors.tables.primary",
|
|
2199
|
+
backgroundColor: "palette.background.paper",
|
|
2200
|
+
borderCollapse: "separate",
|
|
2201
|
+
borderSpacing: 0,
|
|
2202
|
+
tableLayout: "fixed",
|
|
2203
|
+
thead: __spreadProps$1(__spreadValues$5({}, getColorsByPath("tables.primary.thead")), {
|
|
2204
|
+
zIndex: 1,
|
|
2205
|
+
position: "sticky",
|
|
2206
|
+
insetBlockStart: 0,
|
|
2207
|
+
backgroundColor: "palette.background.paper",
|
|
2208
|
+
"tr:not(.filtersRow):not(.responsiveTable__filters__row)": {
|
|
2209
|
+
"th, td": {
|
|
2210
|
+
variant: "buttons.primary",
|
|
2211
|
+
py: responsive$1({ 0: 3, 4: 4 }),
|
|
2212
|
+
px: responsive$1({ 0: 3, 4: 4 }),
|
|
2213
|
+
width: "breakWidth",
|
|
2214
|
+
backgroundColor: "palette.primary.main",
|
|
2215
|
+
borderColor: "palette.primary.dark",
|
|
2216
|
+
borderRadius: 0,
|
|
2217
|
+
borderStyle: "solid",
|
|
2218
|
+
borderWidth: "1px",
|
|
2219
|
+
display: "table-cell",
|
|
2220
|
+
verticalAlign: "center",
|
|
2221
|
+
wordBreak: "break-word",
|
|
2222
|
+
"&:last-of-type:not(td)": {
|
|
2223
|
+
maxWidth: "100%",
|
|
2224
|
+
width: "100%"
|
|
2225
|
+
},
|
|
2226
|
+
".headButton__label": {
|
|
2227
|
+
textAlign: "left"
|
|
2228
|
+
},
|
|
2229
|
+
".headButton__resizer": {
|
|
2230
|
+
width: "20px",
|
|
2231
|
+
cursor: "ew-resize",
|
|
2232
|
+
zIndex: 1e3,
|
|
2233
|
+
position: "absolute",
|
|
2234
|
+
right: "-10px",
|
|
2235
|
+
height: "100%"
|
|
2236
|
+
},
|
|
2237
|
+
"&:last-of-type .headButton__resizer": {
|
|
2238
|
+
right: "0px"
|
|
2239
|
+
},
|
|
2240
|
+
"&.additionalColumn": {
|
|
2241
|
+
minWidth: "50px",
|
|
2242
|
+
maxWidth: "50px",
|
|
2243
|
+
width: "50px",
|
|
2244
|
+
p: 0,
|
|
2245
|
+
textAlign: "center",
|
|
2246
|
+
verticalAlign: "center"
|
|
2247
|
+
},
|
|
2248
|
+
".headButton__container": {
|
|
2249
|
+
width: "100%",
|
|
2250
|
+
display: "flex",
|
|
2251
|
+
alignItems: "center",
|
|
2252
|
+
justifyContent: "space-between",
|
|
2253
|
+
gap: 3,
|
|
2254
|
+
svg: {
|
|
2255
|
+
flexShrink: 0
|
|
2256
|
+
}
|
|
2257
|
+
},
|
|
2258
|
+
"&>div": {
|
|
2259
|
+
color: "palette.primary.contrastText",
|
|
2260
|
+
svg: {
|
|
2261
|
+
color: "palette.text.primary"
|
|
2262
|
+
}
|
|
2263
|
+
},
|
|
2264
|
+
"&:not(:last-of-type)": {
|
|
2265
|
+
"&>div": {
|
|
2266
|
+
borderRightWidth: "1px"
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
},
|
|
2270
|
+
"th.requiredFilterColumn": {
|
|
2271
|
+
borderLeft: "4px solid !important",
|
|
2272
|
+
borderLeftColor: "#dc3545 !important"
|
|
2273
|
+
// TODO USAR PALETTE
|
|
2274
|
+
}
|
|
2275
|
+
},
|
|
2276
|
+
"tr.filtersRow, tr.responsiveTable__filters__row": {
|
|
2277
|
+
backgroundColor: "palette.background.paper",
|
|
2278
|
+
borderBottomWidth: "1px",
|
|
2279
|
+
borderBottomStyle: "solid",
|
|
2280
|
+
borderBottomColor: "palette.border.row",
|
|
2281
|
+
"th.noFilter": {
|
|
2282
|
+
background: "transparent"
|
|
2283
|
+
},
|
|
2284
|
+
td: {
|
|
2285
|
+
"input:not([disabled]), select:not([disabled])": {
|
|
2286
|
+
border: "1px solid white"
|
|
2287
|
+
},
|
|
2288
|
+
background: "transparent",
|
|
2289
|
+
border: "1px solid",
|
|
2290
|
+
borderColor: "palette.gray.800",
|
|
2291
|
+
p: 0
|
|
2292
|
+
},
|
|
2293
|
+
transition: "height 0.3s",
|
|
2294
|
+
"&.hidden": {
|
|
2295
|
+
height: "0",
|
|
2296
|
+
overflow: "hidden",
|
|
2297
|
+
p: spacing(0),
|
|
2298
|
+
border: "none",
|
|
2299
|
+
"& *": {
|
|
2300
|
+
height: "0",
|
|
2301
|
+
overflow: "hidden",
|
|
2302
|
+
fontSize: 0,
|
|
2303
|
+
lineHeight: 0,
|
|
2304
|
+
p: spacing(0),
|
|
2305
|
+
border: "none"
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2309
|
+
}),
|
|
2310
|
+
tbody: {
|
|
2311
|
+
tr: __spreadProps$1(__spreadValues$5({
|
|
2312
|
+
borderBottomWidth: "1px",
|
|
2313
|
+
borderBottomStyle: "solid",
|
|
2314
|
+
"&.non-selectable": {
|
|
2315
|
+
cursor: "not-allowed"
|
|
2316
|
+
},
|
|
2317
|
+
"&.hidden": {
|
|
2318
|
+
display: "none"
|
|
2319
|
+
},
|
|
2320
|
+
"&.locked": {
|
|
2321
|
+
background: "palette.gray.900"
|
|
2322
|
+
}
|
|
2323
|
+
}, getSelectedColors()), {
|
|
2324
|
+
"&.draggingRow": {
|
|
2325
|
+
outline: "3px dotted",
|
|
2326
|
+
outlineColor: "palette.primary.main",
|
|
2327
|
+
outlineOffset: "-3px",
|
|
2328
|
+
"*": {
|
|
2329
|
+
outline: "none !important"
|
|
2330
|
+
}
|
|
2331
|
+
},
|
|
2332
|
+
borderColor: "palette.gray.800",
|
|
2333
|
+
".rowStatesList": {
|
|
2334
|
+
display: "flex",
|
|
2335
|
+
gap: spacing(3),
|
|
2336
|
+
alignItems: "center",
|
|
2337
|
+
svg: {
|
|
2338
|
+
width: "smallIcon",
|
|
2339
|
+
height: "smallIcon",
|
|
2340
|
+
cursor: "pointer"
|
|
2341
|
+
}
|
|
2342
|
+
},
|
|
2343
|
+
td: {
|
|
2344
|
+
verticalAlign: "top",
|
|
2345
|
+
wordBreak: "break-word",
|
|
2346
|
+
border: "1px solid",
|
|
2347
|
+
borderColor: "palette.gray.900",
|
|
2348
|
+
"&.stickyColumn": {
|
|
2349
|
+
position: "sticky",
|
|
2350
|
+
left: 0,
|
|
2351
|
+
backgroundColor: "palette.background.paper"
|
|
2352
|
+
},
|
|
2353
|
+
".moreInformationButton": {
|
|
2354
|
+
width: "30px",
|
|
2355
|
+
height: "30px",
|
|
2356
|
+
padding: "3px",
|
|
2357
|
+
border: "none",
|
|
2358
|
+
background: "transparent"
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
}),
|
|
2362
|
+
td: {
|
|
2363
|
+
p: spacing(3)
|
|
2364
|
+
},
|
|
2365
|
+
".responsiveTable__additionalInfoContainer": {
|
|
2366
|
+
display: "grid",
|
|
2367
|
+
gridTemplateColumns: responsive$1({
|
|
2368
|
+
0: "repeat(2, 1fr)",
|
|
2369
|
+
5: "repeat(4, 1fr)"
|
|
2370
|
+
}),
|
|
2371
|
+
columnGap: 3,
|
|
2372
|
+
rowGap: 2
|
|
2373
|
+
},
|
|
2374
|
+
".responsiveTable__additionalInfoContainer .responsiveTable__additionalInfoItem.separator": {
|
|
2375
|
+
gridColumnStart: "1",
|
|
2376
|
+
gridColumnEnd: "5",
|
|
2377
|
+
borderBottom: "1px solid",
|
|
2378
|
+
borderBottomColor: "palette.gray.700",
|
|
2379
|
+
height: "auto"
|
|
2380
|
+
}
|
|
2381
|
+
},
|
|
2382
|
+
".row__separator__cell": {
|
|
2383
|
+
backgroundColor: "palette.secondary.light"
|
|
2384
|
+
},
|
|
2385
|
+
".pro_inst_warn_date": {
|
|
2386
|
+
backgroundColor: "palette.warning.light"
|
|
2387
|
+
},
|
|
2388
|
+
".pro_inst_overdue_date": {
|
|
2389
|
+
backgroundColor: "palette.error.light"
|
|
2390
|
+
},
|
|
2391
|
+
".pro_ele_inst_warn_date": {
|
|
2392
|
+
backgroundColor: "palette.warning.light"
|
|
2393
|
+
},
|
|
2394
|
+
".pro_ele_inst_overdue_date": {
|
|
2395
|
+
backgroundColor: "palette.error.light"
|
|
2396
|
+
},
|
|
2397
|
+
".pro_inst_warn_date__row": {},
|
|
2398
|
+
".pro_inst_overdue_date__row": {},
|
|
2399
|
+
".pro_ele_inst_warn_date__row": {},
|
|
2400
|
+
".pro_ele_inst_overdue_date__row": {},
|
|
2401
|
+
".priority": {
|
|
2402
|
+
textAlign: "center"
|
|
2403
|
+
},
|
|
2404
|
+
".editionMode": {
|
|
2405
|
+
border: "3px solid",
|
|
2406
|
+
borderColor: "palette.primary.main",
|
|
2407
|
+
borderWidth: "1.5px",
|
|
2408
|
+
borderStyle: "dotted"
|
|
2409
|
+
},
|
|
2410
|
+
".stateCell": {
|
|
2411
|
+
width: "50px",
|
|
2412
|
+
maxWidth: "50px",
|
|
2413
|
+
minWidth: "50px",
|
|
2414
|
+
textAlign: "center",
|
|
2415
|
+
verticalAlign: "middle"
|
|
2416
|
+
}
|
|
2417
|
+
}, getSelectionStyles()), {
|
|
2418
|
+
".no__registers": {
|
|
2419
|
+
py: 6
|
|
2420
|
+
},
|
|
2421
|
+
".requiredFilter__Marker": {
|
|
2422
|
+
color: "red",
|
|
2423
|
+
paddingX: "5px"
|
|
2424
|
+
},
|
|
2425
|
+
".requiredFilter__Column": {
|
|
2426
|
+
fontWeight: "bold"
|
|
2427
|
+
},
|
|
2428
|
+
"&.dataGrid__printTable": {
|
|
2429
|
+
m: 2,
|
|
2430
|
+
border: "1px solid",
|
|
2431
|
+
borderColor: "palette.border.article"
|
|
2432
|
+
},
|
|
2433
|
+
".bold": {
|
|
2434
|
+
fontWeight: "bold"
|
|
2435
|
+
},
|
|
2436
|
+
".light": {
|
|
2437
|
+
color: "#6a6a6a"
|
|
2438
|
+
},
|
|
2439
|
+
".additionalInfo__cell, .stateCell": {
|
|
2440
|
+
verticalAlign: "middle"
|
|
2441
|
+
}
|
|
2442
|
+
});
|
|
2443
|
+
|
|
2444
|
+
const information = {
|
|
2445
|
+
width: "100%",
|
|
2446
|
+
border: "1px solid",
|
|
2447
|
+
borderColor: "primary",
|
|
2448
|
+
borderCollapse: "collapse",
|
|
2449
|
+
thead: {
|
|
2450
|
+
tr: {
|
|
2451
|
+
th: {
|
|
2452
|
+
bg: "primary",
|
|
2453
|
+
color: "white",
|
|
2454
|
+
textAlign: "center",
|
|
2455
|
+
fontWeight: "bold",
|
|
2456
|
+
p: spacing(4)
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
},
|
|
2460
|
+
tbody: {
|
|
2461
|
+
tr: {
|
|
2462
|
+
"td,th": {
|
|
2463
|
+
borderColor: "muted",
|
|
2464
|
+
p: spacing(4)
|
|
2465
|
+
},
|
|
2466
|
+
"&:not(tr:last-of-type)": {
|
|
2467
|
+
"td,th": {
|
|
2468
|
+
borderBottom: "1px solid"
|
|
2469
|
+
}
|
|
2470
|
+
},
|
|
2471
|
+
"td:not(td:last-child),th:not(th:last-child)": {
|
|
2472
|
+
borderRight: "1px solid"
|
|
2473
|
+
},
|
|
2474
|
+
th: {
|
|
2475
|
+
textAlign: "left",
|
|
2476
|
+
whiteSpace: "nowrap",
|
|
2477
|
+
minWidth: "min-content",
|
|
2478
|
+
width: 0
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
};
|
|
2483
|
+
|
|
2484
|
+
const accordion = {
|
|
2485
|
+
display: "flex",
|
|
2486
|
+
flexDirection: "column",
|
|
2487
|
+
gap: spacing(2),
|
|
2488
|
+
".responsiveTable__accordionElement__toggler": {
|
|
2489
|
+
variant: "buttons.outline",
|
|
2490
|
+
borderWidth: "1px",
|
|
2491
|
+
display: "flex",
|
|
2492
|
+
gap: spacing(3),
|
|
2493
|
+
alignItems: "stretch",
|
|
2494
|
+
width: "100%",
|
|
2495
|
+
px: 4,
|
|
2496
|
+
py: 3,
|
|
2497
|
+
"&:hover h3": {
|
|
2498
|
+
color: "palette.primary.contrastText"
|
|
2499
|
+
},
|
|
2500
|
+
".accordionElement__toggler__checkbox": {
|
|
2501
|
+
flexShrink: 0,
|
|
2502
|
+
m: spacing(2)
|
|
2503
|
+
},
|
|
2504
|
+
".accordionElement__toggler__button": {
|
|
2505
|
+
flexGrow: 100,
|
|
2506
|
+
display: "flex",
|
|
2507
|
+
justifyContent: "space-between",
|
|
2508
|
+
py: 2,
|
|
2509
|
+
pr: spacing(2),
|
|
2510
|
+
alignItems: "center",
|
|
2511
|
+
".accordionElement__toggler__label": {
|
|
2512
|
+
flexGrow: 100,
|
|
2513
|
+
m: spacing(0),
|
|
2514
|
+
textAlign: "left",
|
|
2515
|
+
fontSize: 16
|
|
2516
|
+
},
|
|
2517
|
+
".accordionElement__toggler__expandIcon": {
|
|
2518
|
+
flexShrink: 0,
|
|
2519
|
+
svg: {
|
|
2520
|
+
width: "32px"
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
},
|
|
2525
|
+
".responsiveTable__accordionElement__content": {
|
|
2526
|
+
"& > div": {
|
|
2527
|
+
backgroundColor: "palette.background.paper",
|
|
2528
|
+
transition: "padding-bottom 300ms, padding-top 300ms",
|
|
2529
|
+
px: 5
|
|
2530
|
+
},
|
|
2531
|
+
"&.rah-static--height-zero": {
|
|
2532
|
+
"& > div": { py: 0 }
|
|
2533
|
+
},
|
|
2534
|
+
"&.rah-static--height-auto, &.rah-animating--down": {
|
|
2535
|
+
"& > div": { py: 5 }
|
|
2536
|
+
},
|
|
2537
|
+
".pro_inst_warn_date": {
|
|
2538
|
+
color: "priorityNormal"
|
|
2539
|
+
// backgroundColor: 'priorityNormal',
|
|
2540
|
+
},
|
|
2541
|
+
".pro_inst_overdue_date": {
|
|
2542
|
+
color: "priorityUrgent"
|
|
2543
|
+
// backgroundColor: 'priorityUrgent',
|
|
2544
|
+
},
|
|
2545
|
+
".pro_ele_inst_warn_date": {
|
|
2546
|
+
color: "priorityNormal"
|
|
2547
|
+
// backgroundColor: 'priorityNormal',
|
|
2548
|
+
},
|
|
2549
|
+
".pro_ele_inst_overdue_date": {
|
|
2550
|
+
color: "priorityUrgent"
|
|
2551
|
+
// backgroundColor: 'priorityUrgent',
|
|
2552
|
+
},
|
|
2553
|
+
".pro_inst_warn_date__row": {
|
|
2554
|
+
// color: 'priorityNormal',
|
|
2555
|
+
// backgroundColor: 'priorityNormal',
|
|
2556
|
+
},
|
|
2557
|
+
".pro_inst_overdue_date__row": {
|
|
2558
|
+
// color: 'priorityUrgent',
|
|
2559
|
+
backgroundColor: "priorityUrgent"
|
|
2560
|
+
},
|
|
2561
|
+
".pro_ele_inst_warn_date__row": {
|
|
2562
|
+
// color: 'priorityNormal',
|
|
2563
|
+
// backgroundColor: 'priorityNormal',
|
|
2564
|
+
},
|
|
2565
|
+
".pro_ele_inst_overdue_date__row": {
|
|
2566
|
+
// color: 'priorityUrgent',
|
|
2567
|
+
// backgroundColor: 'priorityUrgent',
|
|
2568
|
+
},
|
|
2569
|
+
".priority_container": { display: "flex", alignItems: "center" },
|
|
2570
|
+
".priority": { display: "flex" }
|
|
2571
|
+
}
|
|
2572
|
+
};
|
|
2573
|
+
|
|
2574
|
+
const print = {
|
|
2575
|
+
border: "2px solid",
|
|
2576
|
+
borderColor: "printView.list.table.borderColor",
|
|
2577
|
+
"td, th": {
|
|
2578
|
+
p: 3,
|
|
2579
|
+
textAlign: "left"
|
|
2580
|
+
}
|
|
2581
|
+
};
|
|
2582
|
+
|
|
2583
|
+
const responsive = {
|
|
2584
|
+
maxHeight: "100%",
|
|
2585
|
+
overflow: "auto",
|
|
2586
|
+
position: "relative",
|
|
2587
|
+
table: {
|
|
2588
|
+
width: "100%"
|
|
2589
|
+
},
|
|
2590
|
+
"&.isLoading": {
|
|
2591
|
+
overflow: "hidden"
|
|
2592
|
+
},
|
|
2593
|
+
".responsiveTable__isLoading": {
|
|
2594
|
+
position: "absolute",
|
|
2595
|
+
top: 0,
|
|
2596
|
+
left: 0,
|
|
2597
|
+
right: 0,
|
|
2598
|
+
bottom: 0,
|
|
2599
|
+
background: tinycolor(window.currentPalette.background.paper).setAlpha(0.7).toRgbString(),
|
|
2600
|
+
zIndex: 1,
|
|
2601
|
+
display: "flex",
|
|
2602
|
+
alignItems: "center",
|
|
2603
|
+
justifyContent: "center"
|
|
2604
|
+
},
|
|
2605
|
+
".cell__download__document": {
|
|
2606
|
+
display: "flex",
|
|
2607
|
+
gap: 3,
|
|
2608
|
+
alignItems: "center",
|
|
2609
|
+
justifyContent: "start",
|
|
2610
|
+
"&, *": {
|
|
2611
|
+
color: "palette.primary.main"
|
|
2612
|
+
},
|
|
2613
|
+
svg: {
|
|
2614
|
+
flexShrink: 0
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
/* PREPEND HERE */
|
|
2618
|
+
};
|
|
2619
|
+
|
|
2620
|
+
const tables = {
|
|
2621
|
+
accordion,
|
|
2622
|
+
information,
|
|
2623
|
+
primary: primary$1,
|
|
2624
|
+
print,
|
|
2625
|
+
responsive
|
|
2626
|
+
/* PREPEND HERE */
|
|
2627
|
+
};
|
|
2628
|
+
|
|
2629
|
+
const captcha = {
|
|
2630
|
+
display: "flex",
|
|
2631
|
+
flexDirection: "column",
|
|
2632
|
+
gap: spacing(2),
|
|
2633
|
+
".captcha__imageContainer": {
|
|
2634
|
+
border: "1px solid",
|
|
2635
|
+
borderColor: "palette.border.field",
|
|
2636
|
+
p: spacing(4)
|
|
2637
|
+
},
|
|
2638
|
+
".captcha__inputContainer": {
|
|
2639
|
+
display: "flex",
|
|
2640
|
+
gap: spacing(2),
|
|
2641
|
+
justifyContent: "stretch",
|
|
2642
|
+
input: {
|
|
2643
|
+
flexGrow: 1,
|
|
2644
|
+
width: "100%"
|
|
2645
|
+
},
|
|
2646
|
+
".captcha__buttons": {
|
|
2647
|
+
width: "24px",
|
|
2648
|
+
flexDirection: "column",
|
|
2649
|
+
display: "flex",
|
|
2650
|
+
gap: spacing(2),
|
|
2651
|
+
flexShrink: 0,
|
|
2652
|
+
button: {
|
|
2653
|
+
width: "24px",
|
|
2654
|
+
height: "24px",
|
|
2655
|
+
p: "5px",
|
|
2656
|
+
variant: "buttons.icon-outline",
|
|
2657
|
+
svg: {
|
|
2658
|
+
color: "palette.text.primary",
|
|
2659
|
+
height: "16px",
|
|
2660
|
+
width: "16px"
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
};
|
|
2666
|
+
|
|
2667
|
+
const forms = {
|
|
2668
|
+
captcha
|
|
2669
|
+
/* PREPEND HERE */
|
|
2670
|
+
};
|
|
2671
|
+
|
|
2672
|
+
var __defProp$4 = Object.defineProperty;
|
|
2673
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
2674
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
2675
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
2676
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2677
|
+
var __spreadValues$4 = (a, b) => {
|
|
2678
|
+
for (var prop in b || (b = {}))
|
|
2679
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
2680
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
2681
|
+
if (__getOwnPropSymbols$4)
|
|
2682
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
2683
|
+
if (__propIsEnum$4.call(b, prop))
|
|
2684
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
2685
|
+
}
|
|
2686
|
+
return a;
|
|
2687
|
+
};
|
|
2688
|
+
const primary = {
|
|
2689
|
+
/* PREPEND HERE */
|
|
2690
|
+
position: "relative",
|
|
2691
|
+
'[role="tree"]:focus': {
|
|
2692
|
+
outline: "none",
|
|
2693
|
+
".focus": focusOutline
|
|
2694
|
+
},
|
|
2695
|
+
ul: {
|
|
2696
|
+
listStyle: "none",
|
|
2697
|
+
p: 0
|
|
2698
|
+
},
|
|
2699
|
+
".tree__searchLabelBox": {
|
|
2700
|
+
alignItems: "center",
|
|
2701
|
+
borderRadius: "2px",
|
|
2702
|
+
display: "flex",
|
|
2703
|
+
float: "right",
|
|
2704
|
+
gap: spacing(3),
|
|
2705
|
+
justifyContent: "center",
|
|
2706
|
+
position: "sticky",
|
|
2707
|
+
right: "4px",
|
|
2708
|
+
top: "4px",
|
|
2709
|
+
transform: "translateX(0)",
|
|
2710
|
+
width: "100%",
|
|
2711
|
+
zIndex: "stickyElements",
|
|
2712
|
+
".tree__loading": {
|
|
2713
|
+
position: "fixed",
|
|
2714
|
+
top: 0,
|
|
2715
|
+
right: "4px",
|
|
2716
|
+
height: "iconmd",
|
|
2717
|
+
width: "iconmd",
|
|
2718
|
+
background: "palette.background.paper"
|
|
2719
|
+
},
|
|
2720
|
+
button: {
|
|
2721
|
+
cursor: "pointer"
|
|
2722
|
+
}
|
|
2723
|
+
},
|
|
2724
|
+
".tree__searchLabel": __spreadValues$4({
|
|
2725
|
+
alignItems: "center",
|
|
2726
|
+
display: "flex",
|
|
2727
|
+
gap: spacing(3),
|
|
2728
|
+
justifyContent: "center",
|
|
2729
|
+
position: "fixed",
|
|
2730
|
+
p: "2px 5px",
|
|
2731
|
+
right: 0,
|
|
2732
|
+
top: 0
|
|
2733
|
+
}, getColorState(
|
|
2734
|
+
{ backgroundColor: "palette.background.paper" },
|
|
2735
|
+
"selected"
|
|
2736
|
+
)),
|
|
2737
|
+
'[role="treeitem"]': {
|
|
2738
|
+
'&[aria-expanded="false"] ul': {
|
|
2739
|
+
display: "none"
|
|
2740
|
+
},
|
|
2741
|
+
'&[aria-selected="true"] > .tree__nodeItemLabel': getColorState(
|
|
2742
|
+
{ backgroundColor: "palette.background.paper" },
|
|
2743
|
+
"selected"
|
|
2744
|
+
),
|
|
2745
|
+
background: "transparent"
|
|
2746
|
+
},
|
|
2747
|
+
".tree__nodeItemLabel": {
|
|
2748
|
+
display: "flex",
|
|
2749
|
+
flexWrap: "nowrap",
|
|
2750
|
+
gap: 3,
|
|
2751
|
+
alignItems: "center",
|
|
2752
|
+
"& > *:not(.tree__nodeItemLabelRenderer)": {
|
|
2753
|
+
flexShrink: 0,
|
|
2754
|
+
textAlign: "left"
|
|
2755
|
+
},
|
|
2756
|
+
"&:hover": getColorState(
|
|
2757
|
+
{ backgroundColor: "palette.background.paper" },
|
|
2758
|
+
"hover"
|
|
2759
|
+
)
|
|
2760
|
+
},
|
|
2761
|
+
".spacer": {
|
|
2762
|
+
borderLeft: "1px solid",
|
|
2763
|
+
borderLeftColor: "palette.border.section",
|
|
2764
|
+
width: "20px",
|
|
2765
|
+
alignSelf: "stretch"
|
|
2766
|
+
}
|
|
2767
|
+
};
|
|
2768
|
+
|
|
2769
|
+
const trees = {
|
|
2770
|
+
primary
|
|
2771
|
+
};
|
|
2772
|
+
|
|
2773
|
+
const common = {
|
|
2774
|
+
forms,
|
|
2775
|
+
modals,
|
|
2776
|
+
tables,
|
|
2777
|
+
trees
|
|
2778
|
+
/* PREPEND HERE */
|
|
2779
|
+
};
|
|
2780
|
+
|
|
2781
|
+
const layout = {
|
|
2782
|
+
common
|
|
2783
|
+
/* PREPEND HERE */
|
|
2784
|
+
};
|
|
2785
|
+
|
|
2786
|
+
const transitions = {
|
|
2787
|
+
"@keyframes growHorizontal": {
|
|
2788
|
+
from: { transform: "scaleX(0)" },
|
|
2789
|
+
to: { transform: "scaleY(100%)" }
|
|
2790
|
+
},
|
|
2791
|
+
".mainMenu__animate": {
|
|
2792
|
+
transition: "transform 150ms, opacity 150ms",
|
|
2793
|
+
transform: "translateX(-1000px)",
|
|
2794
|
+
opacity: 0
|
|
2795
|
+
},
|
|
2796
|
+
".mainMenu-enter,\n.mainMenu-appear": {
|
|
2797
|
+
transform: "translateX(-1000px)",
|
|
2798
|
+
opacity: 0
|
|
2799
|
+
},
|
|
2800
|
+
".mainMenu-enter-active,\n.mainMenu-appear-active": {
|
|
2801
|
+
transform: "translateX(0)",
|
|
2802
|
+
opacity: 1
|
|
2803
|
+
},
|
|
2804
|
+
".mainMenu-enter-done,\n.mainMenu-appear-done": {
|
|
2805
|
+
transform: "translateX(0)",
|
|
2806
|
+
opacity: 1
|
|
2807
|
+
},
|
|
2808
|
+
".mainMenu-exit": { opacity: 0 },
|
|
2809
|
+
".mainMenu-exit-done": { transform: "translateX(-1000px)", opacity: 0 },
|
|
2810
|
+
".mainMenu-exit-active": { transform: "translateX(-1000px)", opacity: 1 },
|
|
2811
|
+
".hamburguerMenu": { display: "none" },
|
|
2812
|
+
".hamburguerMenu-enter,\n.hamburguerMenu-appear": {
|
|
2813
|
+
display: "block",
|
|
2814
|
+
transform: "scale(0.7)",
|
|
2815
|
+
opacity: 0
|
|
2816
|
+
},
|
|
2817
|
+
".hamburguerMenu-enter-active,\n.hamburguerMenu-appear-active": {
|
|
2818
|
+
transform: "translateX(0)",
|
|
2819
|
+
transition: "opacity 150ms, transform 150ms",
|
|
2820
|
+
transformOrigin: "right top",
|
|
2821
|
+
opacity: 1
|
|
2822
|
+
},
|
|
2823
|
+
".hamburguerMenu-enter-done,\n.hamburguerMenu-appear-done": {
|
|
2824
|
+
display: "block"
|
|
2825
|
+
},
|
|
2826
|
+
".hamburguerMenu-exit": {
|
|
2827
|
+
display: "block",
|
|
2828
|
+
transform: "scale(1)",
|
|
2829
|
+
opacity: 1
|
|
2830
|
+
},
|
|
2831
|
+
".hamburguerMenu-exit-active": {
|
|
2832
|
+
transform: "scale(0.7) translateX(0)",
|
|
2833
|
+
transition: "opacity 150ms, transform 150ms",
|
|
2834
|
+
display: "block",
|
|
2835
|
+
opacity: 0,
|
|
2836
|
+
transformOrigin: "right top"
|
|
2837
|
+
},
|
|
2838
|
+
".hamburguerMenu-exit-done": { display: "none" },
|
|
2839
|
+
".modal-enter,\n.modal-appear": { opacity: 0, transform: "scale(0.8)" },
|
|
2840
|
+
".modal-enter-active,\n.modal-appear-active": {
|
|
2841
|
+
opacity: 1,
|
|
2842
|
+
transform: "translateX(0)",
|
|
2843
|
+
transition: "opacity 150ms, transform 150ms",
|
|
2844
|
+
transitionDelay: "0"
|
|
2845
|
+
},
|
|
2846
|
+
".modal-exit": { opacity: 0 },
|
|
2847
|
+
".modal-exit-done": { opacity: 0, display: "none" },
|
|
2848
|
+
".modal-exit-active": {
|
|
2849
|
+
opacity: 0,
|
|
2850
|
+
transform: "scale(100)",
|
|
2851
|
+
transition: "opacity 150ms, transform 150ms",
|
|
2852
|
+
transitionDelay: "0"
|
|
2853
|
+
},
|
|
2854
|
+
".overlayAnimation-enter .overlayAnimation:not(.not-released),\n.overlayAnimation-appear .overlayAnimation:not(.not-released)": {
|
|
2855
|
+
opacity: 0
|
|
2856
|
+
},
|
|
2857
|
+
".overlayAnimation-enter-active .overlayAnimation:not(.not-released),\n.overlayAnimation-appear-active .overlayAnimation:not(.not-released)": {
|
|
2858
|
+
opacity: 1,
|
|
2859
|
+
transition: "opacity 150ms"
|
|
2860
|
+
},
|
|
2861
|
+
".overlayAnimation-exit": { opacity: 1 },
|
|
2862
|
+
".overlayAnimation-exit-active": { opacity: 0, transition: "opacity 150ms" },
|
|
2863
|
+
".fromRight-enter,\n.fromRight-appear": { transform: "translateX(550px)" },
|
|
2864
|
+
".fromRight-enter-active,\n.fromRight-appear-active": {
|
|
2865
|
+
transition: "transform 150ms",
|
|
2866
|
+
transform: "translateX(0)"
|
|
2867
|
+
},
|
|
2868
|
+
".fromRight-exit": { transform: "translateX(0)" },
|
|
2869
|
+
".fromRight-exit-active": {
|
|
2870
|
+
transition: "transform 150ms",
|
|
2871
|
+
transform: "translateX(550px)"
|
|
2872
|
+
},
|
|
2873
|
+
".notification-enter,\n.notification-appear": {
|
|
2874
|
+
opacity: 0,
|
|
2875
|
+
transform: "scale(0.8)"
|
|
2876
|
+
},
|
|
2877
|
+
".notification-enter-active,\n.notification-appear-active": {
|
|
2878
|
+
opacity: 1,
|
|
2879
|
+
transform: "translateX(0)",
|
|
2880
|
+
transition: "opacity 150ms, transform 150ms",
|
|
2881
|
+
transitionDelay: "0"
|
|
2882
|
+
},
|
|
2883
|
+
".notification-exit": { opacity: 1 },
|
|
2884
|
+
".notification-exit-active": {
|
|
2885
|
+
opacity: 0,
|
|
2886
|
+
transform: "scale(0.8)",
|
|
2887
|
+
transition: "opacity 150ms, transform 150ms",
|
|
2888
|
+
transitionDelay: "0"
|
|
2889
|
+
},
|
|
2890
|
+
".schedulerStage-enter,\n.schedulerStage-appear": {
|
|
2891
|
+
opacity: 0,
|
|
2892
|
+
transform: "scale(0.8)"
|
|
2893
|
+
},
|
|
2894
|
+
".schedulerStage-enter-active,\n.schedulerStage-appear-active": {
|
|
2895
|
+
opacity: 1,
|
|
2896
|
+
transform: "translateX(0)",
|
|
2897
|
+
transition: "opacity 150ms, transform 150ms",
|
|
2898
|
+
transitionDelay: "0"
|
|
2899
|
+
},
|
|
2900
|
+
".schedulerStage-exit": { opacity: 1 },
|
|
2901
|
+
".schedulerStage-exit-active": {
|
|
2902
|
+
opacity: 0,
|
|
2903
|
+
transform: "scale(0.8)",
|
|
2904
|
+
transition: "opacity 150ms, transform 150ms",
|
|
2905
|
+
transitionDelay: "0"
|
|
2906
|
+
}
|
|
2907
|
+
};
|
|
2908
|
+
|
|
2909
|
+
var __defProp$3 = Object.defineProperty;
|
|
2910
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
2911
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
2912
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
2913
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2914
|
+
var __spreadValues$3 = (a, b) => {
|
|
2915
|
+
for (var prop in b || (b = {}))
|
|
2916
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
2917
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
2918
|
+
if (__getOwnPropSymbols$3)
|
|
2919
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
2920
|
+
if (__propIsEnum$3.call(b, prop))
|
|
2921
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
2922
|
+
}
|
|
2923
|
+
return a;
|
|
2924
|
+
};
|
|
2925
|
+
const root = __spreadValues$3({
|
|
2926
|
+
"*": {
|
|
2927
|
+
fontFamily: "body",
|
|
2928
|
+
fontWeight: "body",
|
|
2929
|
+
fontSize: "100%",
|
|
2930
|
+
code: {
|
|
2931
|
+
fontFamily: "monospace"
|
|
2932
|
+
},
|
|
2933
|
+
"&:focus": focusOutline
|
|
2934
|
+
},
|
|
2935
|
+
body: {
|
|
2936
|
+
minHeight: "100vh"
|
|
2937
|
+
},
|
|
2938
|
+
h1: {
|
|
2939
|
+
fontSize: responsive$1({ 0: 26, 3: 32 })
|
|
2940
|
+
},
|
|
2941
|
+
h2: {
|
|
2942
|
+
fontSize: responsive$1({ 0: 22, 3: 28 })
|
|
2943
|
+
},
|
|
2944
|
+
h3: {
|
|
2945
|
+
fontSize: responsive$1({ 0: 19, 3: 25 })
|
|
2946
|
+
},
|
|
2947
|
+
h4: {
|
|
2948
|
+
fontSize: responsive$1({ 0: 18, 3: 22 })
|
|
2949
|
+
},
|
|
2950
|
+
h5: {
|
|
2951
|
+
fontSize: responsive$1({ 0: 18, 3: 22 })
|
|
2952
|
+
},
|
|
2953
|
+
h6: {
|
|
2954
|
+
fontSize: responsive$1({ 0: 17, 3: 17 })
|
|
2955
|
+
},
|
|
2956
|
+
"h1,h2,h3,h4,h5,h6": {
|
|
2957
|
+
letterSpacing: "heading",
|
|
2958
|
+
lineHeight: "heading",
|
|
2959
|
+
variant: "text.title"
|
|
2960
|
+
},
|
|
2961
|
+
"*:not(h1, h2, h3, h4, h5, h6, code)": {
|
|
2962
|
+
fontFamily: "body",
|
|
2963
|
+
fontSize: 16,
|
|
2964
|
+
fontWeight: "body",
|
|
2965
|
+
letterSpacing: "body",
|
|
2966
|
+
lineHeight: "body"
|
|
2967
|
+
},
|
|
2968
|
+
".section": {
|
|
2969
|
+
border: "2px solid green",
|
|
2970
|
+
"&.apia_section_row": {
|
|
2971
|
+
display: "flex",
|
|
2972
|
+
flexDirection: "row"
|
|
2973
|
+
},
|
|
2974
|
+
".panel": {
|
|
2975
|
+
width: "fit-content",
|
|
2976
|
+
height: "100%"
|
|
2977
|
+
}
|
|
2978
|
+
},
|
|
2979
|
+
".top": {
|
|
2980
|
+
display: "flex"
|
|
2981
|
+
},
|
|
2982
|
+
".bottom": {
|
|
2983
|
+
display: "block",
|
|
2984
|
+
width: "100%"
|
|
2985
|
+
},
|
|
2986
|
+
".planelContainer": {
|
|
2987
|
+
overflowAnchor: "none"
|
|
2988
|
+
},
|
|
2989
|
+
".minimap": {
|
|
2990
|
+
background: "#00000015",
|
|
2991
|
+
border: "1px solid #00000025",
|
|
2992
|
+
position: "fixed",
|
|
2993
|
+
bottom: "10px",
|
|
2994
|
+
right: "10px",
|
|
2995
|
+
"& > *": {
|
|
2996
|
+
background: "#00000015",
|
|
2997
|
+
position: "absolute"
|
|
2998
|
+
},
|
|
2999
|
+
".dragging": {
|
|
3000
|
+
background: "#55000015"
|
|
3001
|
+
},
|
|
3002
|
+
".windowFrame": {
|
|
3003
|
+
background: "#00005515",
|
|
3004
|
+
border: "1px solid #00005525",
|
|
3005
|
+
position: "absolute",
|
|
3006
|
+
zIndex: 1
|
|
3007
|
+
}
|
|
3008
|
+
},
|
|
3009
|
+
"abbr.required": {
|
|
3010
|
+
color: "danger",
|
|
3011
|
+
textDecoration: "none"
|
|
3012
|
+
},
|
|
3013
|
+
'[aria-selected="true"], .selected': __spreadValues$3({}, getPalette().getOneState(
|
|
3014
|
+
{ backgroundColor: getPalette().primary.main },
|
|
3015
|
+
"selected"
|
|
3016
|
+
))
|
|
3017
|
+
}, transitions);
|
|
3018
|
+
|
|
3019
|
+
const text = {
|
|
3020
|
+
default: {
|
|
3021
|
+
color: "palette.text.primary",
|
|
3022
|
+
fontFamily: "body",
|
|
3023
|
+
fontWeight: "body",
|
|
3024
|
+
fontSize: 16,
|
|
3025
|
+
m: spacing(0),
|
|
3026
|
+
width: "100%"
|
|
3027
|
+
},
|
|
3028
|
+
title: {
|
|
3029
|
+
letterSpacing: "heading",
|
|
3030
|
+
wordBreak: "normal",
|
|
3031
|
+
color: "title",
|
|
3032
|
+
fontFamily: "heading",
|
|
3033
|
+
lineHeight: "heading",
|
|
3034
|
+
fontWeight: "heading"
|
|
3035
|
+
}
|
|
3036
|
+
};
|
|
3037
|
+
|
|
3038
|
+
const baseTheme = {
|
|
3039
|
+
alerts,
|
|
3040
|
+
breakpoints: ["0px", "250px", "500px", "700px", "1000px", "1260px", "1580px"],
|
|
3041
|
+
buttons,
|
|
3042
|
+
colors: getThemeColorsObject(),
|
|
3043
|
+
fonts: {
|
|
3044
|
+
body: "Arial",
|
|
3045
|
+
heading: "inherit",
|
|
3046
|
+
monospace: "Menlo, monospace"
|
|
3047
|
+
},
|
|
3048
|
+
fontSizes: Array(60).fill(1).map((_, i) => {
|
|
3049
|
+
return i;
|
|
3050
|
+
}),
|
|
3051
|
+
forms: forms$1(),
|
|
3052
|
+
layout,
|
|
3053
|
+
lineHeights: {
|
|
3054
|
+
body: 1.5,
|
|
3055
|
+
heading: 1.125
|
|
3056
|
+
},
|
|
3057
|
+
letterSpacings: {
|
|
3058
|
+
body: "0.01em",
|
|
3059
|
+
heading: "-0.015em"
|
|
3060
|
+
},
|
|
3061
|
+
radii: {
|
|
3062
|
+
alerts: 0,
|
|
3063
|
+
buttons: 0,
|
|
3064
|
+
default: 0
|
|
3065
|
+
},
|
|
3066
|
+
shadows: {
|
|
3067
|
+
modals: "",
|
|
3068
|
+
tabs: ""
|
|
3069
|
+
},
|
|
3070
|
+
space: [0, 2, 4, 8, 12, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128],
|
|
3071
|
+
sizes: {
|
|
3072
|
+
// Layout
|
|
3073
|
+
applicationMenu: "350px",
|
|
3074
|
+
floatingNotifications: "min(550px, calc(100vw - 30px))",
|
|
3075
|
+
root: "992px",
|
|
3076
|
+
mainImage: "64px",
|
|
3077
|
+
twoColumns: "calc(992px + 350px)",
|
|
3078
|
+
twoColumnsCentered: "calc(992px + 350px + 16px)",
|
|
3079
|
+
// Icons
|
|
3080
|
+
iconxs: "12px",
|
|
3081
|
+
iconsm: "16px",
|
|
3082
|
+
iconmd: "22px",
|
|
3083
|
+
iconlg: "32px",
|
|
3084
|
+
iconxl: "48px"
|
|
3085
|
+
},
|
|
3086
|
+
styles: {
|
|
3087
|
+
root
|
|
3088
|
+
},
|
|
3089
|
+
text,
|
|
3090
|
+
zIndices: {
|
|
3091
|
+
stickyElements: 600,
|
|
3092
|
+
menu: 1e3,
|
|
3093
|
+
maximizedTables: 1100,
|
|
3094
|
+
modal: 1200,
|
|
3095
|
+
tooltip: 1400,
|
|
3096
|
+
notifications: 1600,
|
|
3097
|
+
contextMenu: 1800
|
|
3098
|
+
},
|
|
3099
|
+
useRootStyles: true
|
|
3100
|
+
};
|
|
3101
|
+
|
|
3102
|
+
const makeTheme = (t) => {
|
|
3103
|
+
return t;
|
|
3104
|
+
};
|
|
3105
|
+
let declaredStyles = {};
|
|
3106
|
+
new class MainThemeEmitter extends EventEmitter {
|
|
3107
|
+
}();
|
|
3108
|
+
function getMainTheme(customTheme) {
|
|
3109
|
+
return makeTheme(
|
|
3110
|
+
merge(baseTheme, { layout: declaredStyles }, customTheme != null ? customTheme : {})
|
|
3111
|
+
);
|
|
3112
|
+
}
|
|
3113
|
+
|
|
3114
|
+
var __defProp$2 = Object.defineProperty;
|
|
3115
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
3116
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
3117
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
3118
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3119
|
+
var __spreadValues$2 = (a, b) => {
|
|
3120
|
+
for (var prop in b || (b = {}))
|
|
3121
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
3122
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
3123
|
+
if (__getOwnPropSymbols$2)
|
|
3124
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
3125
|
+
if (__propIsEnum$2.call(b, prop))
|
|
3126
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
3127
|
+
}
|
|
3128
|
+
return a;
|
|
3129
|
+
};
|
|
3130
|
+
const injectedStyles = {};
|
|
3131
|
+
const mainThemeEmitter = new class MainThemeEmitter extends EventEmitter {
|
|
3132
|
+
}();
|
|
3133
|
+
function handleNewStyles(ev) {
|
|
3134
|
+
injectedStyles[ev.path] = ev.styles;
|
|
3135
|
+
}
|
|
3136
|
+
mainThemeEmitter.on("newStyles", handleNewStyles);
|
|
3137
|
+
function useMainTheme(customTheme) {
|
|
3138
|
+
const [theme, setTheme] = useState(getMainTheme(customTheme));
|
|
3139
|
+
useMount(() => {
|
|
3140
|
+
setTheme((current) => {
|
|
3141
|
+
mainThemeEmitter.off("newStyles", handleNewStyles);
|
|
3142
|
+
let initialTheme = __spreadValues$2({}, current);
|
|
3143
|
+
Object.entries(injectedStyles).forEach(([path, styles]) => {
|
|
3144
|
+
const newStyles = setValueByPath({}, path, styles);
|
|
3145
|
+
initialTheme = merge(initialTheme, newStyles);
|
|
3146
|
+
});
|
|
3147
|
+
return initialTheme;
|
|
3148
|
+
});
|
|
3149
|
+
return mainThemeEmitter.on("newStyles", (ev) => {
|
|
3150
|
+
const newStyles = setValueByPath({}, ev.path, ev.styles);
|
|
3151
|
+
setTheme((current) => merge(__spreadValues$2({}, current), newStyles));
|
|
3152
|
+
});
|
|
3153
|
+
});
|
|
3154
|
+
return theme;
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
let timeout = -1;
|
|
3158
|
+
function logTheme(theme) {
|
|
3159
|
+
clearTimeout(timeout);
|
|
3160
|
+
timeout = setTimeout(() => {
|
|
3161
|
+
console.info({ theme });
|
|
3162
|
+
}, 100);
|
|
3163
|
+
}
|
|
3164
|
+
const ThemeProviderContext = createContext({});
|
|
3165
|
+
const ThemeProvider = ({ children, customTheme }) => {
|
|
3166
|
+
const theme = useMainTheme(customTheme);
|
|
3167
|
+
logTheme(theme);
|
|
3168
|
+
return /* @__PURE__ */ jsx(ThemeProviderContext.Provider, { value: theme, children: /* @__PURE__ */ jsx(ThemeProvider$1, { theme, children }) });
|
|
3169
|
+
};
|
|
3170
|
+
|
|
3171
|
+
var __defProp$1 = Object.defineProperty;
|
|
3172
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
3173
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
3174
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
3175
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3176
|
+
var __spreadValues$1 = (a, b) => {
|
|
3177
|
+
for (var prop in b || (b = {}))
|
|
3178
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
3179
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
3180
|
+
if (__getOwnPropSymbols$1)
|
|
3181
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
3182
|
+
if (__propIsEnum$1.call(b, prop))
|
|
3183
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
3184
|
+
}
|
|
3185
|
+
return a;
|
|
3186
|
+
};
|
|
3187
|
+
function getColorsByDefinition(definition, options) {
|
|
3188
|
+
return merge(
|
|
3189
|
+
buildColorsObject(__spreadValues$1(__spreadValues$1(__spreadValues$1({}, definition.color ? { color: definition.color } : null), definition.backgroundColor ? { backgroundColor: definition.backgroundColor } : null), definition.borderColor ? {
|
|
3190
|
+
borderColor: definition.borderColor
|
|
3191
|
+
} : null)),
|
|
3192
|
+
options == null ? void 0 : options.mergeObject
|
|
3193
|
+
);
|
|
3194
|
+
}
|
|
3195
|
+
|
|
3196
|
+
function getColorsAndStatesByDefinition(definition, options) {
|
|
3197
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
3198
|
+
const active = getColorState(definition, "active");
|
|
3199
|
+
const checked = getColorState(definition, "checked");
|
|
3200
|
+
const disabled = getColorState(definition, "disabled");
|
|
3201
|
+
const focus = ((_a = options == null ? void 0 : options.states) == null ? void 0 : _a.focus) ? getColorState(definition, "focus") : {};
|
|
3202
|
+
const hover = getColorState(definition, "hover");
|
|
3203
|
+
const readonly = getColorState(definition, "readonly");
|
|
3204
|
+
const selected = getColorState(definition, "selected");
|
|
3205
|
+
return merge(
|
|
3206
|
+
((_b = options == null ? void 0 : options.states) == null ? void 0 : _b.default) !== false ? getColorsByDefinition(definition) : null,
|
|
3207
|
+
((_c = options == null ? void 0 : options.states) == null ? void 0 : _c.checked) !== false ? buildStateObject(checked, "checked") : {},
|
|
3208
|
+
((_d = options == null ? void 0 : options.states) == null ? void 0 : _d.focus) !== false ? buildStateObject(focus, "focus") : {},
|
|
3209
|
+
((_e = options == null ? void 0 : options.states) == null ? void 0 : _e.hover) !== false ? buildStateObject(hover, "hover") : {},
|
|
3210
|
+
((_f = options == null ? void 0 : options.states) == null ? void 0 : _f.active) !== false ? buildStateObject(active, "active") : {},
|
|
3211
|
+
((_g = options == null ? void 0 : options.states) == null ? void 0 : _g.selected) !== false ? buildStateObject(selected, "selected") : {},
|
|
3212
|
+
((_h = options == null ? void 0 : options.states) == null ? void 0 : _h.disabled) !== false ? buildStateObject(disabled, "disabled") : {},
|
|
3213
|
+
((_i = options == null ? void 0 : options.states) == null ? void 0 : _i.readonly) !== false ? buildStateObject(readonly, "readonly") : {},
|
|
3214
|
+
options == null ? void 0 : options.mergeObject
|
|
3215
|
+
);
|
|
3216
|
+
}
|
|
3217
|
+
|
|
3218
|
+
const CustomThemeProvider = ({
|
|
3219
|
+
children,
|
|
3220
|
+
customTheme
|
|
3221
|
+
}) => {
|
|
3222
|
+
const theme = getMainTheme(customTheme);
|
|
3223
|
+
return /* @__PURE__ */ jsx(ThemeProvider$1, { theme, children });
|
|
3224
|
+
};
|
|
3225
|
+
|
|
3226
|
+
var __defProp = Object.defineProperty;
|
|
3227
|
+
var __defProps = Object.defineProperties;
|
|
3228
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
3229
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3230
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3231
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
3232
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3233
|
+
var __spreadValues = (a, b) => {
|
|
3234
|
+
for (var prop in b || (b = {}))
|
|
3235
|
+
if (__hasOwnProp.call(b, prop))
|
|
3236
|
+
__defNormalProp(a, prop, b[prop]);
|
|
3237
|
+
if (__getOwnPropSymbols)
|
|
3238
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
3239
|
+
if (__propIsEnum.call(b, prop))
|
|
3240
|
+
__defNormalProp(a, prop, b[prop]);
|
|
3241
|
+
}
|
|
3242
|
+
return a;
|
|
3243
|
+
};
|
|
3244
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
3245
|
+
function makeStyledComponent(displayName, stylesPath, styles, Component, unwraped = false) {
|
|
3246
|
+
const theme = setValueByPath({}, stylesPath, styles);
|
|
3247
|
+
return Object.assign(
|
|
3248
|
+
(props) => {
|
|
3249
|
+
const avoidFirstRender = useRef(0);
|
|
3250
|
+
if (unwraped) {
|
|
3251
|
+
return /* @__PURE__ */ jsx(CustomThemeProvider, { customTheme: theme, children: /* @__PURE__ */ jsx(NoThemePrevent, { avoidFirstRender, children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(Component, __spreadValues({}, props)) }) }) });
|
|
3252
|
+
}
|
|
3253
|
+
return /* @__PURE__ */ jsx(CustomThemeProvider, { customTheme: theme, children: /* @__PURE__ */ jsx(NoThemePrevent, { avoidFirstRender, children: /* @__PURE__ */ jsx(Box, __spreadProps(__spreadValues({ className: "variant__holder" }, getVariant(stylesPath)), { children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(Component, __spreadValues({}, props)) }) })) }) });
|
|
3254
|
+
},
|
|
3255
|
+
{ displayName }
|
|
3256
|
+
);
|
|
3257
|
+
}
|
|
3258
|
+
const NoThemePrevent = ({
|
|
3259
|
+
avoidFirstRender,
|
|
3260
|
+
children
|
|
3261
|
+
}) => {
|
|
3262
|
+
avoidFirstRender.current++;
|
|
3263
|
+
if (avoidFirstRender.current <= 1)
|
|
3264
|
+
return null;
|
|
3265
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
3266
|
+
};
|
|
3267
|
+
|
|
3268
|
+
function injectStyles(par1, par2) {
|
|
3269
|
+
const path = typeof par1 === "string" ? par1 : "";
|
|
3270
|
+
const styles = typeof par1 === "string" ? par2 : par1;
|
|
3271
|
+
mainThemeEmitter.emit("newStyles", { path, styles });
|
|
3272
|
+
}
|
|
3273
|
+
|
|
3274
|
+
export { ThemeProvider, ThemeProviderContext, applyStatesGetColor, focusOutline, getColorState, getColorStates, getColorsAndStatesByDefinition, getColorsAndStatesByPath, getColorsByDefinition, getColorsByPath, getOneColorState, getPalette, getVariant, injectStyles, makeStyledComponent, responsive$1 as responsive, smallButton, spacing, useMainTheme };
|
|
3275
|
+
//# sourceMappingURL=index.js.map
|