hisd3-ui-kit 4.2.1 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -130,6 +130,11 @@ Theme utilities: `createHisd3Theme`, `hisd3AntdTheme` (red default),
130
130
  Modal, …) inherit the same tokens automatically, so use them freely alongside
131
131
  the kit.
132
132
 
133
+ Navigation chrome — the sidebar, the page top bar, the header controls, the tab
134
+ strip and the pagination bar — is not text-selectable, so dragging across a menu
135
+ never leaves a blue highlight. Table cells and page content stay selectable so
136
+ data remains copyable.
137
+
133
138
  ### Scrolling
134
139
 
135
140
  The shell fills exactly one viewport and the content column scrolls inside it,
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("antd"),r=require("react"),o=require("styled-components"),n=require("@ant-design/icons");function i(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===r&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}i('body,html{height:100%;width:100%}input::-ms-clear,input::-ms-reveal{display:none}*,:after,:before{box-sizing:border-box}html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:sans-serif;line-height:1.15}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{font-weight:500;margin-bottom:.5em;margin-top:0}p{margin-bottom:1em;margin-top:0}abbr[data-original-title],abbr[title]{border-bottom:0;cursor:help;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}address{font-style:normal;line-height:inherit;margin-bottom:1em}input[type=number],input[type=password],input[type=text],textarea{-webkit-appearance:none}dl,ol,ul{margin-bottom:1em;margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}pre{margin-bottom:1em;margin-top:0;overflow:auto}figure{margin:0 0 1em}img{border-style:none;vertical-align:middle}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{caption-side:bottom;padding-bottom:.3em;padding-top:.75em;text-align:left}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{border:0;margin:0;min-width:0;padding:0}legend{color:inherit;display:block;font-size:1.5em;line-height:inherit;margin-bottom:.5em;max-width:100%;padding:0;white-space:normal;width:100%}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:none;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}');i('@import url("https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap");:root{--hisd3-rule-width:1px;--hisd3-control-bg:#e6e4e1;--hisd3-control-bg-hover:#dbd8d4;--hisd3-popup-radius:10px;--font-body:"Archivo",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--font-heading:var(--font-body);--font-weight-heading:800}body{-webkit-font-smoothing:antialiased;font-family:var(--font-body)}body,html{overscroll-behavior:none}.ant-typography h1,.ant-typography h2,.ant-typography h3,.ant-typography h4,.ant-typography h5,h1,h2,h3,h4,h5,h6{font-family:var(--font-heading);font-weight:var(--font-weight-heading);letter-spacing:-.01em}');const a={siderWidth:260,siderCollapsedWidth:64,topBarHeight:60,pageGutter:28},l={red:"#E5401C",orange:"#F26B1D",teal:"#00796B",blue:"#1D5FD1",green:"#2E7D32",purple:"#6A3FD6"},s={bgLayout:"#F3F2F0",bgContainer:"#F3F2F0",bgElevated:"#FFFFFF",bgFilled:"#E6E4E1",bgFilledHover:"#DBD8D4",text:"#171717",textSecondary:"#4A4A4A",textTertiary:"#6E6E6E",border:"#D9D5CE",borderSecondary:"#E7E4DE",borderStrong:"#1F1F1F",white:"#FFFFFF"},d={hairline:{width:1,border:"#D9D5CE",borderSecondary:"#E7E4DE"},bold:{width:2,border:"#1F1F1F",borderSecondary:"#CFCDC9"}},p="'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",c=(e="red")=>l[e]??e,h=(e,t)=>{const r=e.replace("#",""),o=3===r.length?r.split("").map((e=>e+e)).join(""):r,n=parseInt(o,16),i=n>>8&255,a=255&n,l=e=>Math.round(e+(255-e)*t);return`#${[l(n>>16&255),l(i),l(a)].map((e=>e.toString(16).padStart(2,"0"))).join("")}`},x=({primary:e,radius:t=0,borders:r="hairline",lineWidth:o,overrides:n}={})=>{const i=c(e),l=d[r]??d.hairline,x=o??l.width,g={...s,border:l.border,borderSecondary:l.borderSecondary},u={cssVar:{key:"hisd3"},token:{colorPrimary:i,colorInfo:i,colorLink:i,colorPrimaryBg:h(i,.92),colorPrimaryBgHover:h(i,.86),colorPrimaryBorder:h(i,.6),fontFamily:p,fontSize:14,fontWeightStrong:700,borderRadius:t,borderRadiusLG:t,borderRadiusSM:t,borderRadiusXS:t,lineWidth:x,colorBgLayout:g.bgLayout,colorBgContainer:g.bgContainer,colorBgElevated:g.bgElevated,colorText:g.text,colorTextSecondary:g.textSecondary,colorTextTertiary:g.textTertiary,colorTextHeading:g.text,colorBorder:g.border,colorBorderSecondary:g.borderSecondary,colorSplit:g.borderSecondary,controlHeight:40,controlHeightLG:52,controlHeightSM:32,boxShadow:"none",boxShadowSecondary:"0 2px 6px rgba(16,15,14,0.06), 0 12px 32px rgba(16,15,14,0.14)"},components:{Layout:{siderBg:g.bgLayout,headerBg:g.bgLayout,bodyBg:g.bgLayout,headerPadding:`0 ${a.pageGutter}px`},Menu:{itemBg:"transparent",subMenuItemBg:"transparent",itemColor:g.text,itemHoverColor:g.text,itemHoverBg:"rgba(0,0,0,0.04)",itemSelectedBg:h(i,.9),itemSelectedColor:i,itemActiveBg:h(i,.86),subMenuItemSelectedColor:i,groupTitleColor:g.textTertiary,groupTitleFontSize:12,itemBorderRadius:0,itemMarginInline:0,itemMarginBlock:0,itemHeight:40,itemPaddingInline:a.pageGutter,iconSize:16,collapsedIconSize:18,activeBarBorderWidth:0,activeBarWidth:0},Button:{fontWeight:600,primaryShadow:"none",defaultShadow:"none",dangerShadow:"none",defaultBorderColor:g.border,defaultColor:g.text,defaultBg:g.bgLayout,defaultHoverBg:g.white,defaultHoverBorderColor:g.borderStrong,defaultHoverColor:g.text,defaultActiveBorderColor:g.borderStrong,paddingInline:16,contentFontSize:14,contentFontSizeLG:16,contentFontSizeSM:13},Input:{activeShadow:"none",colorBorder:g.border,hoverBorderColor:g.borderStrong,activeBorderColor:g.borderStrong,paddingInline:16},Select:{optionSelectedBg:h(i,.9),colorBorder:g.border},Table:{headerBg:"transparent",headerColor:g.textTertiary,headerSplitColor:"transparent",headerBorderRadius:0,borderColor:g.borderSecondary,rowHoverBg:"rgba(0,0,0,0.03)",cellPaddingBlock:20,cellPaddingInline:16,cellFontSize:16,footerBg:"transparent"},Tabs:{inkBarColor:i,itemColor:g.text,itemSelectedColor:i,itemHoverColor:i,titleFontSize:18,horizontalItemGutter:48,horizontalMargin:"0",lineWidthBold:4},Tag:{borderRadiusSM:0,defaultBg:"transparent"},Pagination:{itemBg:g.bgLayout,itemActiveBg:i,itemSize:48,itemInputBg:g.bgLayout},Dropdown:{paddingBlock:10},Breadcrumb:{itemColor:g.textTertiary,lastItemColor:g.text,linkColor:g.textTertiary,linkHoverColor:i,separatorColor:g.textTertiary},Card:{headerFontSize:20}}};return n?{...u,...n,token:{...u.token,...n.token},components:{...u.components,...n.components}}:u},g=(e="hairline",t)=>`:root{--hisd3-rule-width:${t??(d[e]??d.hairline).width}px;--hisd3-control-bg:${s.bgFilled};--hisd3-control-bg-hover:${s.bgFilledHover};}`,u=x(),b={primary:l.red,primaryLight:h(l.red,.9),headerSelectedBg:"rgba(0,0,0,0.04)"},m=r.createContext(!1),f=()=>r.useContext(m),{Header:y,Content:v}=t.Layout,w=a.siderWidth,S=a.siderCollapsedWidth,k=a.topBarHeight,j=o(t.Layout)`
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("antd"),r=require("react"),o=require("styled-components"),n=require("@ant-design/icons");function i(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===r&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}i('body,html{height:100%;width:100%}input::-ms-clear,input::-ms-reveal{display:none}*,:after,:before{box-sizing:border-box}html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:sans-serif;line-height:1.15}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{font-weight:500;margin-bottom:.5em;margin-top:0}p{margin-bottom:1em;margin-top:0}abbr[data-original-title],abbr[title]{border-bottom:0;cursor:help;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}address{font-style:normal;line-height:inherit;margin-bottom:1em}input[type=number],input[type=password],input[type=text],textarea{-webkit-appearance:none}dl,ol,ul{margin-bottom:1em;margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}pre{margin-bottom:1em;margin-top:0;overflow:auto}figure{margin:0 0 1em}img{border-style:none;vertical-align:middle}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{caption-side:bottom;padding-bottom:.3em;padding-top:.75em;text-align:left}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{border:0;margin:0;min-width:0;padding:0}legend{color:inherit;display:block;font-size:1.5em;line-height:inherit;margin-bottom:.5em;max-width:100%;padding:0;white-space:normal;width:100%}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:none;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}');i('@import url("https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap");:root{--hisd3-rule-width:1px;--hisd3-control-bg:#e6e4e1;--hisd3-control-bg-hover:#dbd8d4;--hisd3-popup-radius:10px;--font-body:"Archivo",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--font-heading:var(--font-body);--font-weight-heading:800}body{-webkit-font-smoothing:antialiased;font-family:var(--font-body)}body,html{overscroll-behavior:none}.ant-typography h1,.ant-typography h2,.ant-typography h3,.ant-typography h4,.ant-typography h5,h1,h2,h3,h4,h5,h6{font-family:var(--font-heading);font-weight:var(--font-weight-heading);letter-spacing:-.01em}');const a={siderWidth:260,siderCollapsedWidth:64,topBarHeight:60,pageGutter:28},l={red:"#E5401C",orange:"#F26B1D",teal:"#00796B",blue:"#1D5FD1",green:"#2E7D32",purple:"#6A3FD6"},s={bgLayout:"#F3F2F0",bgContainer:"#F3F2F0",bgElevated:"#FFFFFF",bgFilled:"#E6E4E1",bgFilledHover:"#DBD8D4",text:"#171717",textSecondary:"#4A4A4A",textTertiary:"#6E6E6E",border:"#D9D5CE",borderSecondary:"#E7E4DE",borderStrong:"#1F1F1F",white:"#FFFFFF"},d={hairline:{width:1,border:"#D9D5CE",borderSecondary:"#E7E4DE"},bold:{width:2,border:"#1F1F1F",borderSecondary:"#CFCDC9"}},p="'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",c=(e="red")=>l[e]??e,h=(e,t)=>{const r=e.replace("#",""),o=3===r.length?r.split("").map((e=>e+e)).join(""):r,n=parseInt(o,16),i=n>>8&255,a=255&n,l=e=>Math.round(e+(255-e)*t);return`#${[l(n>>16&255),l(i),l(a)].map((e=>e.toString(16).padStart(2,"0"))).join("")}`},u=({primary:e,radius:t=0,borders:r="hairline",lineWidth:o,overrides:n}={})=>{const i=c(e),l=d[r]??d.hairline,u=o??l.width,x={...s,border:l.border,borderSecondary:l.borderSecondary},g={cssVar:{key:"hisd3"},token:{colorPrimary:i,colorInfo:i,colorLink:i,colorPrimaryBg:h(i,.92),colorPrimaryBgHover:h(i,.86),colorPrimaryBorder:h(i,.6),fontFamily:p,fontSize:14,fontWeightStrong:700,borderRadius:t,borderRadiusLG:t,borderRadiusSM:t,borderRadiusXS:t,lineWidth:u,colorBgLayout:x.bgLayout,colorBgContainer:x.bgContainer,colorBgElevated:x.bgElevated,colorText:x.text,colorTextSecondary:x.textSecondary,colorTextTertiary:x.textTertiary,colorTextHeading:x.text,colorBorder:x.border,colorBorderSecondary:x.borderSecondary,colorSplit:x.borderSecondary,controlHeight:40,controlHeightLG:52,controlHeightSM:32,boxShadow:"none",boxShadowSecondary:"0 2px 6px rgba(16,15,14,0.06), 0 12px 32px rgba(16,15,14,0.14)"},components:{Layout:{siderBg:x.bgLayout,headerBg:x.bgLayout,bodyBg:x.bgLayout,headerPadding:`0 ${a.pageGutter}px`},Menu:{itemBg:"transparent",subMenuItemBg:"transparent",itemColor:x.text,itemHoverColor:x.text,itemHoverBg:"rgba(0,0,0,0.04)",itemSelectedBg:h(i,.9),itemSelectedColor:i,itemActiveBg:h(i,.86),subMenuItemSelectedColor:i,groupTitleColor:x.textTertiary,groupTitleFontSize:12,itemBorderRadius:0,itemMarginInline:0,itemMarginBlock:0,itemHeight:40,itemPaddingInline:a.pageGutter,iconSize:16,collapsedIconSize:18,activeBarBorderWidth:0,activeBarWidth:0},Button:{fontWeight:600,primaryShadow:"none",defaultShadow:"none",dangerShadow:"none",defaultBorderColor:x.border,defaultColor:x.text,defaultBg:x.bgLayout,defaultHoverBg:x.white,defaultHoverBorderColor:x.borderStrong,defaultHoverColor:x.text,defaultActiveBorderColor:x.borderStrong,paddingInline:16,contentFontSize:14,contentFontSizeLG:16,contentFontSizeSM:13},Input:{activeShadow:"none",colorBorder:x.border,hoverBorderColor:x.borderStrong,activeBorderColor:x.borderStrong,paddingInline:16},Select:{optionSelectedBg:h(i,.9),colorBorder:x.border},Table:{headerBg:"transparent",headerColor:x.textTertiary,headerSplitColor:"transparent",headerBorderRadius:0,borderColor:x.borderSecondary,rowHoverBg:"rgba(0,0,0,0.03)",cellPaddingBlock:20,cellPaddingInline:16,cellFontSize:16,footerBg:"transparent"},Tabs:{inkBarColor:i,itemColor:x.text,itemSelectedColor:i,itemHoverColor:i,titleFontSize:18,horizontalItemGutter:48,horizontalMargin:"0",lineWidthBold:4},Tag:{borderRadiusSM:0,defaultBg:"transparent"},Pagination:{itemBg:x.bgLayout,itemActiveBg:i,itemSize:48,itemInputBg:x.bgLayout},Dropdown:{paddingBlock:10},Breadcrumb:{itemColor:x.textTertiary,lastItemColor:x.text,linkColor:x.textTertiary,linkHoverColor:i,separatorColor:x.textTertiary},Card:{headerFontSize:20}}};return n?{...g,...n,token:{...g.token,...n.token},components:{...g.components,...n.components}}:g},x=(e="hairline",t)=>`:root{--hisd3-rule-width:${t??(d[e]??d.hairline).width}px;--hisd3-control-bg:${s.bgFilled};--hisd3-control-bg-hover:${s.bgFilledHover};}`,g=u(),b={primary:l.red,primaryLight:h(l.red,.9),headerSelectedBg:"rgba(0,0,0,0.04)"},m=r.createContext(!1),f=()=>r.useContext(m),{Header:y,Content:v}=t.Layout,w=a.siderWidth,S=a.siderCollapsedWidth,k=a.topBarHeight,j=o(t.Layout)`
2
2
  position: relative; /* anchor for the edge collapse trigger */
3
3
  background: var(--ant-color-bg-layout);
4
4
 
@@ -13,7 +13,10 @@
13
13
  * The Sider is rendered as a plain antd <Sider> (not styled(Sider)) because
14
14
  * styled-components would swallow its \`theme\` prop; style it from here.
15
15
  */
16
+ /* the whole sidebar is chrome: never select its text on drag */
16
17
  > .ant-layout-sider.hisd3-sider {
18
+ user-select: none;
19
+ -webkit-user-select: none;
17
20
  position: sticky;
18
21
  top: 0;
19
22
  height: ${({$appShell:e})=>e?"100%":"100vh"};
@@ -203,6 +206,8 @@
203
206
  background: rgba(0, 0, 0, 0.05);
204
207
  }
205
208
  `,z=o.button`
209
+ user-select: none;
210
+ -webkit-user-select: none;
206
211
  position: absolute;
207
212
  top: ${({$top:e})=>e}px;
208
213
  left: ${({$left:e})=>e}px;
@@ -321,6 +326,8 @@
321
326
  `,U=(e,t)=>e.key??e.path??`menu-${t}`,_=(e,t)=>(e??[]).filter((e=>e&&!e.hideInMenu)).map(((e,r)=>{const o=U(e,r);return Array.isArray(e.children)&&e.children.length>0?{key:o,icon:e.icon,label:e.name,disabled:e.disabled,type:e.group?"group":void 0,children:_(e.children,t)}:{key:o,icon:e.icon,disabled:e.disabled,label:t(e,e.name)}})),P=(e,t)=>r.createElement("a",{href:e.path||"/"},t),G=({account:r,avatarSrc:o,settingsUrl:i,onLogout:a,collapsed:l=!1,placement:s="topRight",extraItems:d=[]})=>{const{modal:p}=t.App.useApp(),c=[...d??[],{key:"settings",icon:e.jsx(n.SettingOutlined,{}),label:"Settings",onClick:()=>{window.location.href=i??"/settings"}},{key:"logout",icon:e.jsx(n.LogoutOutlined,{}),label:"Logout",onClick:()=>{p.confirm({title:"Are you sure you want to logout?",content:"Please click OK to continue",icon:e.jsx(n.ExclamationCircleOutlined,{}),onOk:a})}}],h=(r.fullName||"").replace(/\(.*?\)/g," ").split(/[\s,]+/).map((e=>e.replace(/[^\p{L}\p{N}]/gu,""))).filter(Boolean).slice(0,2).map((e=>e[0].toUpperCase())).join("")||"?";return e.jsx(A,{className:"cr-user-info-light",$collapsed:l,$inHeader:"bottomRight"===s,children:e.jsx(t.Dropdown,{trigger:["click"],placement:s,menu:{items:c},children:e.jsxs(N,{className:"ant-dropdown-link",onClick:e=>e.preventDefault(),children:[e.jsx(O,{$src:o,"aria-hidden":!0,children:!o&&h}),!l&&e.jsxs(R,{children:[e.jsxs(F,{children:[e.jsx(H,{title:r.fullName,children:r.fullName}),e.jsx(B,{children:e.jsx(n.DownOutlined,{})})]}),r.positionType&&e.jsx(M,{title:r.positionType,children:r.positionType})]})]})})})},{Sider:W}=t.Layout,K=a.pageGutter,X=o.header`
322
327
  display: contents;
323
328
  `,q=o.div`
329
+ user-select: none;
330
+ -webkit-user-select: none;
324
331
  display: flex;
325
332
  align-items: center;
326
333
  gap: 16px;
@@ -376,6 +383,8 @@
376
383
  flex: 1 0 auto;
377
384
  padding: 24px ${K}px 40px;
378
385
  `,Q=o.button`
386
+ user-select: none;
387
+ -webkit-user-select: none;
379
388
  position: relative;
380
389
  width: ${({$size:e=40})=>e}px;
381
390
  height: ${({$size:e=40})=>e}px;
@@ -546,6 +555,8 @@
546
555
  `,se=o.div`
547
556
  padding: 28px 16px;
548
557
  `,de=o.button`
558
+ user-select: none;
559
+ -webkit-user-select: none;
549
560
  position: relative;
550
561
  width: ${({$size:e})=>e}px;
551
562
  height: ${({$size:e})=>e}px;
@@ -646,7 +657,7 @@
646
657
  font-weight: 700;
647
658
  border-radius: 50%;
648
659
  background: ${({$src:e})=>e?`center / cover no-repeat url("${e}")`:"rgba(0,0,0,0.08)"};
649
- `,xe=o.div`
660
+ `,ue=o.div`
650
661
  overflow: hidden;
651
662
  background: var(--ant-color-bg-elevated);
652
663
  border: 1px solid var(--ant-color-border-secondary);
@@ -669,7 +680,7 @@
669
680
  border-radius: 8px;
670
681
  font-size: 14px;
671
682
  }
672
- `,ge=e=>(e||"").replace(/\(.*?\)/g," ").split(/[\s,]+/).map((e=>e.replace(/[^\p{L}\p{N}]/gu,""))).filter(Boolean).slice(0,2).map((e=>e[0].toUpperCase())).join("")||"?",ue=o.div`
683
+ `,xe=e=>(e||"").replace(/\(.*?\)/g," ").split(/[\s,]+/).map((e=>e.replace(/[^\p{L}\p{N}]/gu,""))).filter(Boolean).slice(0,2).map((e=>e[0].toUpperCase())).join("")||"?",ge=o.div`
673
684
  display: flex;
674
685
  align-items: center;
675
686
  gap: 8px;
@@ -737,6 +748,8 @@
737
748
  text-transform: uppercase;
738
749
  color: var(--ant-color-text-tertiary);
739
750
  `,ye=o.div`
751
+ user-select: none;
752
+ -webkit-user-select: none;
740
753
  display: flex;
741
754
  align-items: center;
742
755
  gap: 24px;
@@ -822,6 +835,8 @@
822
835
  }
823
836
  `,we=e=>`Total ${e.toLocaleString()} items`;const Se=o(t.Tabs)`
824
837
  &.ant-tabs .ant-tabs-nav {
838
+ user-select: none;
839
+ -webkit-user-select: none;
825
840
  margin: 0;
826
841
 
827
842
  &::before {
@@ -947,5 +962,5 @@
947
962
  font-size: 18px;
948
963
  }
949
964
  }
950
- `;var Ce,ze,Le,Ae,Ne,Oe,Re,Fe,He,Be,Me,Ue,_e;exports.ThemeStyle=void 0,(Ce=exports.ThemeStyle||(exports.ThemeStyle={})).MODERN="modern",Ce.STANDARD="standard",exports.ThemeStyleRadius=void 0,(ze=exports.ThemeStyleRadius||(exports.ThemeStyleRadius={})).MODERN="30px",ze.STANDARD="16px",exports.ThemeMode=void 0,(Le=exports.ThemeMode||(exports.ThemeMode={})).LIGHT="light",Le.SEMI_DARK="semi-dark",Le.DARK="dark",exports.LayoutType=void 0,(Ae=exports.LayoutType||(exports.LayoutType={})).FULL_WIDTH="full-width",Ae.BOXED="boxed",Ae.FRAMED="framed",exports.MenuStyle=void 0,(Ne=exports.MenuStyle||(exports.MenuStyle={})).DEFAULT="default",Ne.STANDARD="standard",Ne.ROUNDED="rounded",Ne.ROUNDED_REVERSE="rounded-reverse",Ne.CURVED_MENU="curved-menu",exports.NavStyle=void 0,(Oe=exports.NavStyle||(exports.NavStyle={})).DEFAULT="default",Oe.MINI="mini",Oe.MINI_SIDEBAR_TOGGLE="mini-sidebar-toggle",Oe.STANDARD="standard",Oe.HEADER_USER="user-header",Oe.HEADER_USER_MINI="user-mini-header",Oe.DRAWER="drawer",Oe.BIT_BUCKET="bit-bucket",Oe.H_DEFAULT="h-default",Oe.HOR_HEADER_FIXED="hor-header-fixed",Oe.HOR_DARK_LAYOUT="hor-dark-layout",exports.FooterType=void 0,(Re=exports.FooterType||(exports.FooterType={})).FIXED="fixed",Re.FLUID="fluid",exports.LayoutDirection=void 0,(Fe=exports.LayoutDirection||(exports.LayoutDirection={})).RTL="rtl",Fe.LTR="ltr",exports.HeaderType=void 0,(He=exports.HeaderType||(exports.HeaderType={})).DARK="dark",He.LIGHT="light",exports.RouteTransition=void 0,(Be=exports.RouteTransition||(exports.RouteTransition={})).NONE="none",Be.FADE="fade",Be.SLIDE_LEFT="slideLeft",Be.SLIDE_RIGHT="slideRight",Be.SLIDE_UP="slideUp",Be.SLIDE_DOWN="slideDown",exports.Fonts=void 0,(Me=exports.Fonts||(exports.Fonts={})).LIGHT="300",Me.REGULAR="400",Me.MEDIUM="500",Me.BOLD="600",exports.AuthType=void 0,(Ue=exports.AuthType||(exports.AuthType={})).FIREBASE="firebase",Ue.AWS_COGNITO="aws_cognito",Ue.AUTH0="auth0",Ue.JWT_AUTH="jwt_auth",exports.AppAnimates=void 0,(_e=exports.AppAnimates||(exports.AppAnimates={})).SLIDEUPIN="transition.slideUpIn",_e.SLIDEUPOUT="transition.slideUpOut",_e.SLIDEDOWNIN="transition.slideDownIn",_e.SLIDEDOWNOUT="transition.slideDownOut",_e.SLIDELEFTIN="transition.slideLeftIn",_e.SLIDELEFTOUT="transition.slideLeftOut",_e.SLIDERIGHTIN="transition.slideRightIn",_e.SLIDERIGHTOUT="transition.slideRightOut",_e.FADEIN="transition.fadeIn",_e.FADEOUT="transition.fadeOut";var Pe,Ge;exports.MessageType=void 0,(Pe=exports.MessageType||(exports.MessageType={}))[Pe.MEDIA=1]="MEDIA",Pe[Pe.TEXT=2]="TEXT",exports.RoutePermittedRole=void 0,(Ge=exports.RoutePermittedRole||(exports.RoutePermittedRole={})).Admin="admin",Ge.User="user",exports.AppAnimateGroups={SLIDEUPIN:{hidden:{y:0},visible:{opacity:1,y:0,transition:{ease:"easeIn",delay:0,when:"beforeChildren",duration:.2,staggerChildren:.05}}},SLIDEUPOUT:{hidden:{y:0},visible:{opacity:0,y:"100vh",transition:{ease:"easeOut",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},SLIDEDOWNIN:{hidden:{opacity:0,y:"-100vh"},visible:{opacity:1,y:0,transition:{ease:"easeIn",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},SLIDEDOWNOUT:{hidden:{y:0},visible:{opacity:0,y:"-100vh",transition:{ease:"easeOut",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},SLIDELEFTIN:{hidden:{x:"100vw"},visible:{opacity:1,x:0,transition:{ease:"easeIn",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},SLIDELEFTOUT:{hidden:{x:0},visible:{opacity:0,x:"100vw",transition:{ease:"easeOut",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},SLIDERIGHTIN:{hidden:{x:"-100vw"},visible:{opacity:1,x:0,transition:{ease:"easeIn",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},SLIDERIGHTOUT:{hidden:{x:0},visible:{opacity:0,x:"-100vw",transition:{ease:"easeOut",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},FADEIN:{hidden:{opacity:0,scale:1},visible:{opacity:1,scale:1,transition:{ease:"easeIn",when:"beforeChildren",staggerChildren:.15}}},FADEOUT:{hidden:{opacity:1,scale:1},visible:{opacity:0,scale:1,transition:{ease:"easeOut",when:"beforeChildren",staggerChildren:.15}}},NOANIMATION:{hidden:{opacity:1},visible:{opacity:1}}},exports.AppMotionAnimate={SLIDEUPIN:{variants:{hidden:{y:100,opacity:0},visible:{opacity:1,y:0}},transition:{ease:"easeIn",when:"beforeChildren"}},SLIDEUPOUT:{variants:{hidden:{y:0,opacity:1},visible:{opacity:0,y:"-100vh"}},transition:{ease:"easeOut",when:"beforeChildren"}},SLIDEDOWNIN:{variants:{hidden:{y:-100,opacity:0},visible:{opacity:1,y:0}},transition:{ease:"easeIn",when:"beforeChildren"}},SLIDEDOWNOUT:{variants:{hidden:{y:0,opacity:1},visible:{opacity:0,y:"100vh"}},transition:{ease:"easeOut",when:"beforeChildren"}},SLIDELEFTIN:{variants:{hidden:{x:100,opacity:0},visible:{opacity:1,x:0}},transition:{ease:"easeIn",when:"beforeChildren"}},SLIDELEFTOUT:{variants:{hidden:{x:0,opacity:1},visible:{opacity:0,x:"-100vw"}},transition:{ease:"easeOut",when:"beforeChildren"}},SLIDERIGHTIN:{variants:{hidden:{x:-100,opacity:0},visible:{opacity:1,x:0}},transition:{ease:"easeIn",when:"beforeChildren"}},SLIDERIGHTOUT:{variants:{hidden:{x:0,opacity:1},visible:{opacity:0,x:"-100vw"}},transition:{ease:"easeOut",when:"beforeChildren"}},FADEIN:{variants:{hidden:{opacity:0},visible:{opacity:1}},transition:{duration:.1,ease:"easeIn",when:"beforeChildren"}},FADEOUT:{variants:{hidden:{opacity:1},visible:{opacity:0}},transition:{duration:.1,ease:"easeOut",when:"beforeChildren"}}},exports.HISD3AvatarMenu=({account:o,avatarSrc:i,settingsUrl:a="/settings",onSettings:l,onLogout:s,confirmLogout:d=!0,extraItems:p,shape:c="circle",size:h=40,hideChevron:x=!1,className:g})=>{const{modal:u}=t.App.useApp(),[b,m]=r.useState(!1),f=[...p??[],...null!==a||l?[{key:"settings",icon:e.jsx(n.SettingOutlined,{}),label:"Settings",onClick:()=>{l?l():a&&(window.location.href=a)}}]:[],{key:"logout",icon:e.jsx(n.LogoutOutlined,{}),label:"Logout",onClick:()=>{d?u.confirm({title:"Are you sure you want to logout?",content:"Please click OK to continue",icon:e.jsx(n.ExclamationCircleOutlined,{}),okText:"Logout",onOk:s}):s()}}];return e.jsx(t.Dropdown,{open:b,onOpenChange:m,trigger:["click"],placement:"bottomRight",menu:{items:f,onClick:()=>m(!1)},popupRender:t=>e.jsxs(xe,{children:[e.jsxs(ce,{children:[e.jsx(he,{$src:i,children:!i&&ge(o.fullName)}),e.jsxs("span",{className:"hisd3-identity-text",children:[e.jsx("span",{className:"hisd3-identity-name",children:o.fullName}),o.positionType&&e.jsx("span",{className:"hisd3-identity-role",children:o.positionType})]})]}),t]}),children:e.jsxs(de,{type:"button",className:g,$shape:c,$size:h,$open:b,"aria-label":`Account menu for ${o.fullName}`,children:[i?e.jsx("img",{src:i,alt:""}):ge(o.fullName),!x&&e.jsx(pe,{$size:h,$open:b,"aria-hidden":!0,children:e.jsx(n.DownOutlined,{})})]})})},exports.HISD3Button=({variant:t="secondary",...r})=>e.jsx(Te,{...De[t],...r}),exports.HISD3HeaderActions=({children:t,divided:o=!1,className:n})=>{const i=r.Children.toArray(t).filter(Boolean);return e.jsx(ue,{className:n,children:i.map(((t,n)=>e.jsxs(r.Fragment,{children:[o&&n===i.length-1&&n>0&&e.jsx(be,{}),t]},n)))})},exports.HISD3Input=t=>e.jsx(Ee,{...t}),exports.HISD3NotificationButton=({items:o=[],count:i,loading:a=!1,title:l="Notifications",onMarkAllRead:s,onSeeAll:d,seeAllLabel:p="See all notifications",emptyText:c="You're all caught up",onOpenChange:h,size:x=40,icon:g,className:u})=>{const[b,m]=r.useState(!1),f=i??o.filter((e=>e.unread)).length,y=e.jsxs(ee,{children:[e.jsxs(te,{children:[e.jsx("h4",{children:l}),s&&f>0&&e.jsx("button",{type:"button",onClick:s,children:"Mark all as read"})]}),a?e.jsx(se,{style:{textAlign:"center"},children:e.jsx(t.Spin,{})}):0===o.length?e.jsx(se,{children:e.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:c})}):e.jsx(re,{children:o.map((t=>e.jsxs(oe,{type:"button",$unread:t.unread,onClick:()=>{t.onClick?.(t),m(!1),h?.(!1)},children:[e.jsx(ne,{$src:t.avatarSrc,children:!t.avatarSrc&&(t.icon??e.jsx(n.BellFilled,{}))}),e.jsxs(ie,{children:[e.jsx("strong",{children:t.title}),t.description&&e.jsx("span",{children:t.description}),t.time&&e.jsx("time",{children:t.time})]}),t.unread&&e.jsx(ae,{})]},t.id)))}),d&&e.jsx(le,{type:"button",onClick:()=>{d(),m(!1),h?.(!1)},children:p})]});return e.jsx(t.Dropdown,{open:b,onOpenChange:e=>{m(e),h?.(e)},trigger:["click"],placement:"bottomRight",popupRender:()=>y,children:e.jsxs(Q,{type:"button",$size:x,$open:b,className:u,"aria-label":`${l}${f?` (${f} unread)`:""}`,children:[g??e.jsx(n.BellFilled,{}),f>0&&e.jsx(Z,{$size:x,children:f>99?"99+":f})]})})},exports.HISD3PageBody=J,exports.HISD3PageHeader=({title:r,subtitle:o,breadcrumb:n,extra:i,leading:a,hideTopBar:l=!1,className:s})=>e.jsxs(X,{className:s,children:[!l&&e.jsxs(q,{children:[a,n&&n.length>0&&e.jsx(t.Breadcrumb,{items:n.map((t=>({title:t.href?e.jsx("a",{href:t.href,children:t.title}):t.title,onClick:t.onClick})))}),!n?.length&&e.jsx("span",{style:{flex:1}}),i&&e.jsx(V,{children:i})]}),e.jsxs(Y,{children:[e.jsx("h1",{children:r}),o&&e.jsx("p",{children:o})]})]}),exports.HISD3Provider=({primary:n,radius:i,borders:a="hairline",lineWidth:l,overrides:s,theme:d,styledTheme:p={},children:c})=>{const h=r.useMemo((()=>d??x({primary:n,radius:i,borders:a,lineWidth:l,overrides:s})),[d,n,i,a,l,s]),u=r.useMemo((()=>g(a,l)),[a,l]);return e.jsxs(m.Provider,{value:!0,children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),e.jsx(t.ConfigProvider,{theme:h,children:e.jsx(o.ThemeProvider,{theme:p,children:e.jsx(t.App,{component:!1,children:c})})})]})},exports.HISD3SearchInput=({compact:t=!1,className:r,...o})=>e.jsx($e,{allowClear:!0,prefix:e.jsx(n.SearchOutlined,{}),className:[t?"hisd3-search-compact":"",r??""].join(" ").trim(),...o}),exports.HISD3Sidebar=({children:i,account:a,logoUrl:l,appName:s,menuItems:d,onLogout:p,pathname:c,avatarSrc:h,styledTheme:x,settingsUrl:g,antdTheme:b,renderMenuLink:m=P,headerExtra:y,userMenuItems:v,onCollapse:A,collapsed:N=!1,loading:O=!1,hideSidebar:R=!1,layoutTop:F=!1,hideCollapseTrigger:H=!1,collapseTrigger:B="edge",collapseTriggerOffset:M=Math.round(k/2),siderWidth:K=w,bareContent:X=!1,hideHeaderBar:q=!1,brandHref:V="/",hideAccountCard:Y=!1,scrollContent:J=!0})=>{const Q=f(),Z=void 0===b?Q?null:u:b,[ee,te]=r.useState(N);r.useEffect((()=>{te(N)}),[N]);const re=r.useMemo((()=>_(d,m)),[d,m]),oe=r.useMemo((()=>((e,t)=>{let r;const o=(e,n)=>{(e??[]).forEach(((e,i)=>{const a=U(e,i);if(e.path&&t.startsWith(e.path)){const o=t===e.path,i=e.path.length+(o?1:0);(!r||i>r.length)&&(r={key:a,parents:n,length:i})}e.children?.length&&o(e.children,[...n,a])}))};return o(e,[]),{selectedKey:r?.key,openKeys:r?.parents??[]}})(d,c)),[d,c]),[ne,ie]=r.useState((()=>oe.openKeys));r.useEffect((()=>{ie((e=>Array.from(new Set([...e,...oe.openKeys]))))}),[oe.openKeys.join("|")]);const ae=e=>{te(e),A?.(e)},le=oe.selectedKey?[oe.selectedKey]:[],se=H?"none":B,de=ee?"Expand menu":"Collapse menu",pe=e.jsxs(D,{href:V,$collapsed:!F&&ee,children:[l?e.jsx("img",{src:l,alt:s}):e.jsx("span",{className:"hisd3-brand-mark","aria-hidden":!0}),(F||!ee)&&e.jsx("h1",{children:s})]}),ce=X?i:e.jsx(L,{children:i});if("undefined"==typeof document)return null;const he=e.jsx(t.App,{component:!1,children:e.jsx(t.Spin,{spinning:O,size:"large",children:R?e.jsx(e.Fragment,{children:i}):F?e.jsxs(j,{$appShell:J,children:[e.jsxs(E,{children:[pe,e.jsx(t.Menu,{mode:"horizontal",items:re,selectedKeys:le}),y,!Y&&e.jsx(G,{account:a,avatarSrc:h,settingsUrl:g,onLogout:p,placement:"bottomRight",extraItems:v})]}),e.jsx(I,{$scroll:J,children:ce})]}):e.jsxs(j,{hasSider:!0,$appShell:J,children:[e.jsxs(W,{className:"hisd3-sider",width:K,collapsedWidth:S,collapsible:!0,collapsed:ee,trigger:null,theme:"light",breakpoint:"lg",onBreakpoint:e=>{e&&ae(!0)},children:[pe,e.jsx(T,{className:ee?"hisd3-collapsed":void 0,children:e.jsx(t.Menu,{mode:"inline",theme:"light",inlineCollapsed:ee,items:re,selectedKeys:le,openKeys:ee?void 0:ne,onOpenChange:e=>ie(e)})}),!Y&&e.jsx(G,{account:a,avatarSrc:h,settingsUrl:g,onLogout:p,collapsed:ee,placement:"topRight",extraItems:v})]}),e.jsxs(I,{$scroll:J,children:[!q&&e.jsxs($,{children:["header"===se&&e.jsx(C,{type:"button","aria-label":de,onClick:()=>ae(!ee),children:ee?e.jsx(n.MenuUnfoldOutlined,{}):e.jsx(n.MenuFoldOutlined,{})}),e.jsx("span",{style:{flex:1}}),y]}),ce]}),"edge"===se&&e.jsx(z,{type:"button","aria-label":de,title:de,$left:ee?S:K,$top:M,onClick:()=>ae(!ee),children:ee?e.jsx(n.RightOutlined,{}):e.jsx(n.LeftOutlined,{})})]})})});return Q&&!x?Z?e.jsx(t.ConfigProvider,{theme:Z,children:he}):he:e.jsx(o.ThemeProvider,{theme:x??{},children:Z?e.jsx(t.ConfigProvider,{theme:Z,children:he}):he})},exports.HISD3Table=function({pagination:r,footer:o,...i}){const a=r||void 0,l=a?.pageSizeOptions??[10,20,50];return e.jsxs(me,{children:[e.jsx(t.Table,{...i,pagination:!1}),o&&e.jsx(fe,{children:o}),a&&e.jsxs(ye,{children:[e.jsx("span",{className:"hisd3-total",children:(a.renderTotal??we)(a.total,[(a.current-1)*a.pageSize+1,Math.min(a.current*a.pageSize,a.total)])}),e.jsx(t.Pagination,{current:a.current,pageSize:a.pageSize,total:a.total,showSizeChanger:!1,onChange:(e,t)=>a.onChange(e,t),itemRender:(t,r,o)=>"prev"===r?e.jsx("span",{className:"ant-pagination-item-link",children:e.jsx(n.LeftOutlined,{})}):"next"===r?e.jsx("span",{className:"ant-pagination-item-link",children:e.jsx(n.RightOutlined,{})}):o}),!a.hidePageSize&&e.jsx(ve,{role:"group","aria-label":"Rows per page",children:l.map((t=>e.jsxs("button",{type:"button","aria-pressed":t===a.pageSize,onClick:()=>a.onChange(1,t),children:[t," / page"]},t)))})]})]})},exports.HISD3Tabs=({items:t,...r})=>e.jsx(Se,{...r,items:t.map((({count:t,label:r,...o})=>({...o,label:e.jsxs(e.Fragment,{children:[r,void 0!==t&&e.jsx("span",{className:"hisd3-tab-count",children:t})]})})))}),exports.HISD3Tag=({variant:t="neutral",tone:r=("neutral"===t?"default":"primary"),children:o,...n})=>e.jsx(Ie,{$variant:t,$tone:r,...n,children:o}),exports.HISD3_BORDER_PRESETS=d,exports.HISD3_COLORS=b,exports.HISD3_FONT_FAMILY=p,exports.HISD3_FONT_WEIGHT_BODY=400,exports.HISD3_FONT_WEIGHT_HEADING=800,exports.HISD3_LAYOUT=a,exports.HISD3_NEUTRALS=s,exports.HISD3_PRESETS=l,exports.HeaderIconButton=Q,exports.UserMenu=G,exports.borderVarsCss=g,exports.createHisd3Theme=x,exports.getInitials=ge,exports.hisd3AntdTheme=u,exports.resolvePrimary=c,exports.tint=h,exports.useInsideHISD3Provider=f;
965
+ `;var Ce,ze,Le,Ae,Ne,Oe,Re,Fe,He,Be,Me,Ue,_e;exports.ThemeStyle=void 0,(Ce=exports.ThemeStyle||(exports.ThemeStyle={})).MODERN="modern",Ce.STANDARD="standard",exports.ThemeStyleRadius=void 0,(ze=exports.ThemeStyleRadius||(exports.ThemeStyleRadius={})).MODERN="30px",ze.STANDARD="16px",exports.ThemeMode=void 0,(Le=exports.ThemeMode||(exports.ThemeMode={})).LIGHT="light",Le.SEMI_DARK="semi-dark",Le.DARK="dark",exports.LayoutType=void 0,(Ae=exports.LayoutType||(exports.LayoutType={})).FULL_WIDTH="full-width",Ae.BOXED="boxed",Ae.FRAMED="framed",exports.MenuStyle=void 0,(Ne=exports.MenuStyle||(exports.MenuStyle={})).DEFAULT="default",Ne.STANDARD="standard",Ne.ROUNDED="rounded",Ne.ROUNDED_REVERSE="rounded-reverse",Ne.CURVED_MENU="curved-menu",exports.NavStyle=void 0,(Oe=exports.NavStyle||(exports.NavStyle={})).DEFAULT="default",Oe.MINI="mini",Oe.MINI_SIDEBAR_TOGGLE="mini-sidebar-toggle",Oe.STANDARD="standard",Oe.HEADER_USER="user-header",Oe.HEADER_USER_MINI="user-mini-header",Oe.DRAWER="drawer",Oe.BIT_BUCKET="bit-bucket",Oe.H_DEFAULT="h-default",Oe.HOR_HEADER_FIXED="hor-header-fixed",Oe.HOR_DARK_LAYOUT="hor-dark-layout",exports.FooterType=void 0,(Re=exports.FooterType||(exports.FooterType={})).FIXED="fixed",Re.FLUID="fluid",exports.LayoutDirection=void 0,(Fe=exports.LayoutDirection||(exports.LayoutDirection={})).RTL="rtl",Fe.LTR="ltr",exports.HeaderType=void 0,(He=exports.HeaderType||(exports.HeaderType={})).DARK="dark",He.LIGHT="light",exports.RouteTransition=void 0,(Be=exports.RouteTransition||(exports.RouteTransition={})).NONE="none",Be.FADE="fade",Be.SLIDE_LEFT="slideLeft",Be.SLIDE_RIGHT="slideRight",Be.SLIDE_UP="slideUp",Be.SLIDE_DOWN="slideDown",exports.Fonts=void 0,(Me=exports.Fonts||(exports.Fonts={})).LIGHT="300",Me.REGULAR="400",Me.MEDIUM="500",Me.BOLD="600",exports.AuthType=void 0,(Ue=exports.AuthType||(exports.AuthType={})).FIREBASE="firebase",Ue.AWS_COGNITO="aws_cognito",Ue.AUTH0="auth0",Ue.JWT_AUTH="jwt_auth",exports.AppAnimates=void 0,(_e=exports.AppAnimates||(exports.AppAnimates={})).SLIDEUPIN="transition.slideUpIn",_e.SLIDEUPOUT="transition.slideUpOut",_e.SLIDEDOWNIN="transition.slideDownIn",_e.SLIDEDOWNOUT="transition.slideDownOut",_e.SLIDELEFTIN="transition.slideLeftIn",_e.SLIDELEFTOUT="transition.slideLeftOut",_e.SLIDERIGHTIN="transition.slideRightIn",_e.SLIDERIGHTOUT="transition.slideRightOut",_e.FADEIN="transition.fadeIn",_e.FADEOUT="transition.fadeOut";var Pe,Ge;exports.MessageType=void 0,(Pe=exports.MessageType||(exports.MessageType={}))[Pe.MEDIA=1]="MEDIA",Pe[Pe.TEXT=2]="TEXT",exports.RoutePermittedRole=void 0,(Ge=exports.RoutePermittedRole||(exports.RoutePermittedRole={})).Admin="admin",Ge.User="user",exports.AppAnimateGroups={SLIDEUPIN:{hidden:{y:0},visible:{opacity:1,y:0,transition:{ease:"easeIn",delay:0,when:"beforeChildren",duration:.2,staggerChildren:.05}}},SLIDEUPOUT:{hidden:{y:0},visible:{opacity:0,y:"100vh",transition:{ease:"easeOut",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},SLIDEDOWNIN:{hidden:{opacity:0,y:"-100vh"},visible:{opacity:1,y:0,transition:{ease:"easeIn",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},SLIDEDOWNOUT:{hidden:{y:0},visible:{opacity:0,y:"-100vh",transition:{ease:"easeOut",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},SLIDELEFTIN:{hidden:{x:"100vw"},visible:{opacity:1,x:0,transition:{ease:"easeIn",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},SLIDELEFTOUT:{hidden:{x:0},visible:{opacity:0,x:"100vw",transition:{ease:"easeOut",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},SLIDERIGHTIN:{hidden:{x:"-100vw"},visible:{opacity:1,x:0,transition:{ease:"easeIn",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},SLIDERIGHTOUT:{hidden:{x:0},visible:{opacity:0,x:"-100vw",transition:{ease:"easeOut",delay:0,when:"beforeChildren",duration:.4,staggerChildren:.15}}},FADEIN:{hidden:{opacity:0,scale:1},visible:{opacity:1,scale:1,transition:{ease:"easeIn",when:"beforeChildren",staggerChildren:.15}}},FADEOUT:{hidden:{opacity:1,scale:1},visible:{opacity:0,scale:1,transition:{ease:"easeOut",when:"beforeChildren",staggerChildren:.15}}},NOANIMATION:{hidden:{opacity:1},visible:{opacity:1}}},exports.AppMotionAnimate={SLIDEUPIN:{variants:{hidden:{y:100,opacity:0},visible:{opacity:1,y:0}},transition:{ease:"easeIn",when:"beforeChildren"}},SLIDEUPOUT:{variants:{hidden:{y:0,opacity:1},visible:{opacity:0,y:"-100vh"}},transition:{ease:"easeOut",when:"beforeChildren"}},SLIDEDOWNIN:{variants:{hidden:{y:-100,opacity:0},visible:{opacity:1,y:0}},transition:{ease:"easeIn",when:"beforeChildren"}},SLIDEDOWNOUT:{variants:{hidden:{y:0,opacity:1},visible:{opacity:0,y:"100vh"}},transition:{ease:"easeOut",when:"beforeChildren"}},SLIDELEFTIN:{variants:{hidden:{x:100,opacity:0},visible:{opacity:1,x:0}},transition:{ease:"easeIn",when:"beforeChildren"}},SLIDELEFTOUT:{variants:{hidden:{x:0,opacity:1},visible:{opacity:0,x:"-100vw"}},transition:{ease:"easeOut",when:"beforeChildren"}},SLIDERIGHTIN:{variants:{hidden:{x:-100,opacity:0},visible:{opacity:1,x:0}},transition:{ease:"easeIn",when:"beforeChildren"}},SLIDERIGHTOUT:{variants:{hidden:{x:0,opacity:1},visible:{opacity:0,x:"-100vw"}},transition:{ease:"easeOut",when:"beforeChildren"}},FADEIN:{variants:{hidden:{opacity:0},visible:{opacity:1}},transition:{duration:.1,ease:"easeIn",when:"beforeChildren"}},FADEOUT:{variants:{hidden:{opacity:1},visible:{opacity:0}},transition:{duration:.1,ease:"easeOut",when:"beforeChildren"}}},exports.HISD3AvatarMenu=({account:o,avatarSrc:i,settingsUrl:a="/settings",onSettings:l,onLogout:s,confirmLogout:d=!0,extraItems:p,shape:c="circle",size:h=40,hideChevron:u=!1,className:x})=>{const{modal:g}=t.App.useApp(),[b,m]=r.useState(!1),f=[...p??[],...null!==a||l?[{key:"settings",icon:e.jsx(n.SettingOutlined,{}),label:"Settings",onClick:()=>{l?l():a&&(window.location.href=a)}}]:[],{key:"logout",icon:e.jsx(n.LogoutOutlined,{}),label:"Logout",onClick:()=>{d?g.confirm({title:"Are you sure you want to logout?",content:"Please click OK to continue",icon:e.jsx(n.ExclamationCircleOutlined,{}),okText:"Logout",onOk:s}):s()}}];return e.jsx(t.Dropdown,{open:b,onOpenChange:m,trigger:["click"],placement:"bottomRight",menu:{items:f,onClick:()=>m(!1)},popupRender:t=>e.jsxs(ue,{children:[e.jsxs(ce,{children:[e.jsx(he,{$src:i,children:!i&&xe(o.fullName)}),e.jsxs("span",{className:"hisd3-identity-text",children:[e.jsx("span",{className:"hisd3-identity-name",children:o.fullName}),o.positionType&&e.jsx("span",{className:"hisd3-identity-role",children:o.positionType})]})]}),t]}),children:e.jsxs(de,{type:"button",className:x,$shape:c,$size:h,$open:b,"aria-label":`Account menu for ${o.fullName}`,children:[i?e.jsx("img",{src:i,alt:""}):xe(o.fullName),!u&&e.jsx(pe,{$size:h,$open:b,"aria-hidden":!0,children:e.jsx(n.DownOutlined,{})})]})})},exports.HISD3Button=({variant:t="secondary",...r})=>e.jsx(Te,{...De[t],...r}),exports.HISD3HeaderActions=({children:t,divided:o=!1,className:n})=>{const i=r.Children.toArray(t).filter(Boolean);return e.jsx(ge,{className:n,children:i.map(((t,n)=>e.jsxs(r.Fragment,{children:[o&&n===i.length-1&&n>0&&e.jsx(be,{}),t]},n)))})},exports.HISD3Input=t=>e.jsx(Ee,{...t}),exports.HISD3NotificationButton=({items:o=[],count:i,loading:a=!1,title:l="Notifications",onMarkAllRead:s,onSeeAll:d,seeAllLabel:p="See all notifications",emptyText:c="You're all caught up",onOpenChange:h,size:u=40,icon:x,className:g})=>{const[b,m]=r.useState(!1),f=i??o.filter((e=>e.unread)).length,y=e.jsxs(ee,{children:[e.jsxs(te,{children:[e.jsx("h4",{children:l}),s&&f>0&&e.jsx("button",{type:"button",onClick:s,children:"Mark all as read"})]}),a?e.jsx(se,{style:{textAlign:"center"},children:e.jsx(t.Spin,{})}):0===o.length?e.jsx(se,{children:e.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:c})}):e.jsx(re,{children:o.map((t=>e.jsxs(oe,{type:"button",$unread:t.unread,onClick:()=>{t.onClick?.(t),m(!1),h?.(!1)},children:[e.jsx(ne,{$src:t.avatarSrc,children:!t.avatarSrc&&(t.icon??e.jsx(n.BellFilled,{}))}),e.jsxs(ie,{children:[e.jsx("strong",{children:t.title}),t.description&&e.jsx("span",{children:t.description}),t.time&&e.jsx("time",{children:t.time})]}),t.unread&&e.jsx(ae,{})]},t.id)))}),d&&e.jsx(le,{type:"button",onClick:()=>{d(),m(!1),h?.(!1)},children:p})]});return e.jsx(t.Dropdown,{open:b,onOpenChange:e=>{m(e),h?.(e)},trigger:["click"],placement:"bottomRight",popupRender:()=>y,children:e.jsxs(Q,{type:"button",$size:u,$open:b,className:g,"aria-label":`${l}${f?` (${f} unread)`:""}`,children:[x??e.jsx(n.BellFilled,{}),f>0&&e.jsx(Z,{$size:u,children:f>99?"99+":f})]})})},exports.HISD3PageBody=J,exports.HISD3PageHeader=({title:r,subtitle:o,breadcrumb:n,extra:i,leading:a,hideTopBar:l=!1,className:s})=>e.jsxs(X,{className:s,children:[!l&&e.jsxs(q,{children:[a,n&&n.length>0&&e.jsx(t.Breadcrumb,{items:n.map((t=>({title:t.href?e.jsx("a",{href:t.href,children:t.title}):t.title,onClick:t.onClick})))}),!n?.length&&e.jsx("span",{style:{flex:1}}),i&&e.jsx(V,{children:i})]}),e.jsxs(Y,{children:[e.jsx("h1",{children:r}),o&&e.jsx("p",{children:o})]})]}),exports.HISD3Provider=({primary:n,radius:i,borders:a="hairline",lineWidth:l,overrides:s,theme:d,styledTheme:p={},children:c})=>{const h=r.useMemo((()=>d??u({primary:n,radius:i,borders:a,lineWidth:l,overrides:s})),[d,n,i,a,l,s]),g=r.useMemo((()=>x(a,l)),[a,l]);return e.jsxs(m.Provider,{value:!0,children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:g}}),e.jsx(t.ConfigProvider,{theme:h,children:e.jsx(o.ThemeProvider,{theme:p,children:e.jsx(t.App,{component:!1,children:c})})})]})},exports.HISD3SearchInput=({compact:t=!1,className:r,...o})=>e.jsx($e,{allowClear:!0,prefix:e.jsx(n.SearchOutlined,{}),className:[t?"hisd3-search-compact":"",r??""].join(" ").trim(),...o}),exports.HISD3Sidebar=({children:i,account:a,logoUrl:l,appName:s,menuItems:d,onLogout:p,pathname:c,avatarSrc:h,styledTheme:u,settingsUrl:x,antdTheme:b,renderMenuLink:m=P,headerExtra:y,userMenuItems:v,onCollapse:A,collapsed:N=!1,loading:O=!1,hideSidebar:R=!1,layoutTop:F=!1,hideCollapseTrigger:H=!1,collapseTrigger:B="edge",collapseTriggerOffset:M=Math.round(k/2),siderWidth:K=w,bareContent:X=!1,hideHeaderBar:q=!1,brandHref:V="/",hideAccountCard:Y=!1,scrollContent:J=!0})=>{const Q=f(),Z=void 0===b?Q?null:g:b,[ee,te]=r.useState(N);r.useEffect((()=>{te(N)}),[N]);const re=r.useMemo((()=>_(d,m)),[d,m]),oe=r.useMemo((()=>((e,t)=>{let r;const o=(e,n)=>{(e??[]).forEach(((e,i)=>{const a=U(e,i);if(e.path&&t.startsWith(e.path)){const o=t===e.path,i=e.path.length+(o?1:0);(!r||i>r.length)&&(r={key:a,parents:n,length:i})}e.children?.length&&o(e.children,[...n,a])}))};return o(e,[]),{selectedKey:r?.key,openKeys:r?.parents??[]}})(d,c)),[d,c]),[ne,ie]=r.useState((()=>oe.openKeys));r.useEffect((()=>{ie((e=>Array.from(new Set([...e,...oe.openKeys]))))}),[oe.openKeys.join("|")]);const ae=e=>{te(e),A?.(e)},le=oe.selectedKey?[oe.selectedKey]:[],se=H?"none":B,de=ee?"Expand menu":"Collapse menu",pe=e.jsxs(D,{href:V,$collapsed:!F&&ee,children:[l?e.jsx("img",{src:l,alt:s}):e.jsx("span",{className:"hisd3-brand-mark","aria-hidden":!0}),(F||!ee)&&e.jsx("h1",{children:s})]}),ce=X?i:e.jsx(L,{children:i});if("undefined"==typeof document)return null;const he=e.jsx(t.App,{component:!1,children:e.jsx(t.Spin,{spinning:O,size:"large",children:R?e.jsx(e.Fragment,{children:i}):F?e.jsxs(j,{$appShell:J,children:[e.jsxs(E,{children:[pe,e.jsx(t.Menu,{mode:"horizontal",items:re,selectedKeys:le}),y,!Y&&e.jsx(G,{account:a,avatarSrc:h,settingsUrl:x,onLogout:p,placement:"bottomRight",extraItems:v})]}),e.jsx(I,{$scroll:J,children:ce})]}):e.jsxs(j,{hasSider:!0,$appShell:J,children:[e.jsxs(W,{className:"hisd3-sider",width:K,collapsedWidth:S,collapsible:!0,collapsed:ee,trigger:null,theme:"light",breakpoint:"lg",onBreakpoint:e=>{e&&ae(!0)},children:[pe,e.jsx(T,{className:ee?"hisd3-collapsed":void 0,children:e.jsx(t.Menu,{mode:"inline",theme:"light",inlineCollapsed:ee,items:re,selectedKeys:le,openKeys:ee?void 0:ne,onOpenChange:e=>ie(e)})}),!Y&&e.jsx(G,{account:a,avatarSrc:h,settingsUrl:x,onLogout:p,collapsed:ee,placement:"topRight",extraItems:v})]}),e.jsxs(I,{$scroll:J,children:[!q&&e.jsxs($,{children:["header"===se&&e.jsx(C,{type:"button","aria-label":de,onClick:()=>ae(!ee),children:ee?e.jsx(n.MenuUnfoldOutlined,{}):e.jsx(n.MenuFoldOutlined,{})}),e.jsx("span",{style:{flex:1}}),y]}),ce]}),"edge"===se&&e.jsx(z,{type:"button","aria-label":de,title:de,$left:ee?S:K,$top:M,onClick:()=>ae(!ee),children:ee?e.jsx(n.RightOutlined,{}):e.jsx(n.LeftOutlined,{})})]})})});return Q&&!u?Z?e.jsx(t.ConfigProvider,{theme:Z,children:he}):he:e.jsx(o.ThemeProvider,{theme:u??{},children:Z?e.jsx(t.ConfigProvider,{theme:Z,children:he}):he})},exports.HISD3Table=function({pagination:r,footer:o,...i}){const a=r||void 0,l=a?.pageSizeOptions??[10,20,50];return e.jsxs(me,{children:[e.jsx(t.Table,{...i,pagination:!1}),o&&e.jsx(fe,{children:o}),a&&e.jsxs(ye,{children:[e.jsx("span",{className:"hisd3-total",children:(a.renderTotal??we)(a.total,[(a.current-1)*a.pageSize+1,Math.min(a.current*a.pageSize,a.total)])}),e.jsx(t.Pagination,{current:a.current,pageSize:a.pageSize,total:a.total,showSizeChanger:!1,onChange:(e,t)=>a.onChange(e,t),itemRender:(t,r,o)=>"prev"===r?e.jsx("span",{className:"ant-pagination-item-link",children:e.jsx(n.LeftOutlined,{})}):"next"===r?e.jsx("span",{className:"ant-pagination-item-link",children:e.jsx(n.RightOutlined,{})}):o}),!a.hidePageSize&&e.jsx(ve,{role:"group","aria-label":"Rows per page",children:l.map((t=>e.jsxs("button",{type:"button","aria-pressed":t===a.pageSize,onClick:()=>a.onChange(1,t),children:[t," / page"]},t)))})]})]})},exports.HISD3Tabs=({items:t,...r})=>e.jsx(Se,{...r,items:t.map((({count:t,label:r,...o})=>({...o,label:e.jsxs(e.Fragment,{children:[r,void 0!==t&&e.jsx("span",{className:"hisd3-tab-count",children:t})]})})))}),exports.HISD3Tag=({variant:t="neutral",tone:r=("neutral"===t?"default":"primary"),children:o,...n})=>e.jsx(Ie,{$variant:t,$tone:r,...n,children:o}),exports.HISD3_BORDER_PRESETS=d,exports.HISD3_COLORS=b,exports.HISD3_FONT_FAMILY=p,exports.HISD3_FONT_WEIGHT_BODY=400,exports.HISD3_FONT_WEIGHT_HEADING=800,exports.HISD3_LAYOUT=a,exports.HISD3_NEUTRALS=s,exports.HISD3_PRESETS=l,exports.HeaderIconButton=Q,exports.UserMenu=G,exports.borderVarsCss=x,exports.createHisd3Theme=u,exports.getInitials=xe,exports.hisd3AntdTheme=g,exports.resolvePrimary=c,exports.tint=h,exports.useInsideHISD3Provider=f;
951
966
  //# sourceMappingURL=index.cjs.js.map