hisd3-ui-kit 4.2.2 → 4.3.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/README.md +1 -1
- package/dist/index.cjs.js +38 -38
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +40 -40
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigProvider as n,App as o,Layout as i,Dropdown as a,Spin as l,Menu as d,Breadcrumb as s,Empty as p,Table as c,Pagination as h,Tabs as g,Button as u,Input as b}from"antd";import m,{createContext as x,useContext as f,useMemo as y,createElement as v,useState as w,useEffect as k}from"react";import S,{ThemeProvider as $}from"styled-components";import{SettingOutlined as I,LogoutOutlined as
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigProvider as n,App as o,Layout as i,Dropdown as a,Spin as l,Menu as d,Breadcrumb as s,Empty as p,Table as c,Pagination as h,Tabs as g,Button as u,Input as b}from"antd";import m,{createContext as x,useContext as f,useMemo as y,createElement as v,useState as w,useEffect as k}from"react";import S,{ThemeProvider as $}from"styled-components";import{SettingOutlined as I,LogoutOutlined as z,DownOutlined as C,ExclamationCircleOutlined as E,MenuUnfoldOutlined as D,MenuFoldOutlined as T,RightOutlined as L,LeftOutlined as N,BellFilled as B,SearchOutlined as A}from"@ant-design/icons";function F(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}F('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}');F('@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 O={siderWidth:260,siderCollapsedWidth:64,topBarHeight:60,pageGutter:28},R={red:"#E5401C",orange:"#F26B1D",teal:"#00796B",blue:"#1D5FD1",green:"#2E7D32",purple:"#6A3FD6"},M={bgLayout:"#F3F2F0",bgContainer:"#F3F2F0",bgElevated:"#FFFFFF",bgFilled:"#E6E4E1",bgFilledHover:"#DBD8D4",text:"#171717",textSecondary:"#4A4A4A",textTertiary:"#6E6E6E",border:"#D9D5CE",borderSecondary:"#E7E4DE",borderStrong:"#1F1F1F",white:"#FFFFFF"},U={hairline:{width:1,border:"#D9D5CE",borderSecondary:"#E7E4DE"},bold:{width:2,border:"#1F1F1F",borderSecondary:"#CFCDC9"}},H="'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",j=800,G=400,W=(e="red")=>R[e]??e,_=(e,t)=>{const r=e.replace("#",""),n=3===r.length?r.split("").map((e=>e+e)).join(""):r,o=parseInt(n,16),i=o>>8&255,a=255&o,l=e=>Math.round(e+(255-e)*t);return`#${[l(o>>16&255),l(i),l(a)].map((e=>e.toString(16).padStart(2,"0"))).join("")}`},P=({primary:e,radius:t=0,borders:r="hairline",lineWidth:n,overrides:o}={})=>{const i=W(e),a=U[r]??U.hairline,l=n??a.width,d={...M,border:a.border,borderSecondary:a.borderSecondary},s={cssVar:{key:"hisd3"},token:{colorPrimary:i,colorInfo:i,colorLink:i,colorPrimaryBg:_(i,.92),colorPrimaryBgHover:_(i,.86),colorPrimaryBorder:_(i,.6),fontFamily:H,fontSize:14,fontWeightStrong:700,borderRadius:t,borderRadiusLG:t,borderRadiusSM:t,borderRadiusXS:t,lineWidth:l,colorBgLayout:d.bgLayout,colorBgContainer:d.bgContainer,colorBgElevated:d.bgElevated,colorText:d.text,colorTextSecondary:d.textSecondary,colorTextTertiary:d.textTertiary,colorTextHeading:d.text,colorBorder:d.border,colorBorderSecondary:d.borderSecondary,colorSplit:d.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:d.bgLayout,headerBg:d.bgLayout,bodyBg:d.bgLayout,headerPadding:`0 ${O.pageGutter}px`},Menu:{itemBg:"transparent",subMenuItemBg:"transparent",itemColor:d.text,itemHoverColor:d.text,itemHoverBg:"rgba(0,0,0,0.04)",itemSelectedBg:_(i,.9),itemSelectedColor:i,itemActiveBg:_(i,.86),subMenuItemSelectedColor:i,groupTitleColor:d.textTertiary,groupTitleFontSize:12,itemBorderRadius:0,itemMarginInline:0,itemMarginBlock:0,itemHeight:40,itemPaddingInline:O.pageGutter,iconSize:16,collapsedIconSize:18,activeBarBorderWidth:0,activeBarWidth:0},Button:{fontWeight:600,primaryShadow:"none",defaultShadow:"none",dangerShadow:"none",defaultBorderColor:d.border,defaultColor:d.text,defaultBg:d.bgLayout,defaultHoverBg:d.white,defaultHoverBorderColor:d.borderStrong,defaultHoverColor:d.text,defaultActiveBorderColor:d.borderStrong,paddingInline:16,contentFontSize:14,contentFontSizeLG:16,contentFontSizeSM:13},Input:{activeShadow:"none",colorBorder:d.border,hoverBorderColor:d.borderStrong,activeBorderColor:d.borderStrong,paddingInline:16},Select:{optionSelectedBg:_(i,.9),colorBorder:d.border},Table:{headerBg:"transparent",headerColor:d.textTertiary,headerSplitColor:"transparent",headerBorderRadius:0,borderColor:d.borderSecondary,rowHoverBg:"rgba(0,0,0,0.03)",cellPaddingBlock:10,cellPaddingInline:12,cellFontSize:14,cellPaddingBlockMD:8,cellPaddingInlineMD:10,cellPaddingBlockSM:6,cellPaddingInlineSM:8,cellFontSizeMD:14,cellFontSizeSM:13,footerBg:"transparent"},Tabs:{inkBarColor:i,itemColor:d.text,itemSelectedColor:i,itemHoverColor:i,titleFontSize:15,horizontalItemGutter:32,horizontalMargin:"0",lineWidthBold:4},Tag:{borderRadiusSM:0,defaultBg:"transparent"},Pagination:{itemBg:d.bgLayout,itemActiveBg:i,itemSize:32,itemSizeSM:26,itemInputBg:d.bgLayout},Dropdown:{paddingBlock:10},Breadcrumb:{itemColor:d.textTertiary,lastItemColor:d.text,linkColor:d.textTertiary,linkHoverColor:i,separatorColor:d.textTertiary},Card:{headerFontSize:20}}};return o?{...s,...o,token:{...s.token,...o.token},components:{...s.components,...o.components}}:s},K=(e="hairline",t)=>`:root{--hisd3-rule-width:${t??(U[e]??U.hairline).width}px;--hisd3-control-bg:${M.bgFilled};--hisd3-control-bg-hover:${M.bgFilledHover};}`,X=P(),V={primary:R.red,primaryLight:_(R.red,.9),headerSelectedBg:"rgba(0,0,0,0.04)"},Y=x(!1),q=()=>f(Y),J=({primary:r,radius:i,borders:a="hairline",lineWidth:l,overrides:d,theme:s,styledTheme:p={},children:c})=>{const h=y((()=>s??P({primary:r,radius:i,borders:a,lineWidth:l,overrides:d})),[s,r,i,a,l,d]),g=y((()=>K(a,l)),[a,l]);return e(Y.Provider,{value:!0,children:[t("style",{dangerouslySetInnerHTML:{__html:g}}),t(n,{theme:h,children:t($,{theme:p,children:t(o,{component:!1,children:c})})})]})},{Header:Q,Content:Z}=i,ee=O.siderWidth,te=O.siderCollapsedWidth,re=O.topBarHeight,ne=S(i)`
|
|
2
2
|
position: relative; /* anchor for the edge collapse trigger */
|
|
3
3
|
background: var(--ant-color-bg-layout);
|
|
4
4
|
|
|
@@ -323,9 +323,9 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
323
323
|
overflow: hidden;
|
|
324
324
|
text-overflow: ellipsis;
|
|
325
325
|
white-space: nowrap;
|
|
326
|
-
`,ve=(e,t)=>e.key??e.path??`menu-${t}`,we=(e,t)=>(e??[]).filter((e=>e&&!e.hideInMenu)).map(((e,r)=>{const n=ve(e,r);return Array.isArray(e.children)&&e.children.length>0?{key:n,icon:e.icon,label:e.name,disabled:e.disabled,type:e.group?"group":void 0,children:we(e.children,t)}:{key:n,icon:e.icon,disabled:e.disabled,label:t(e,e.name)}})),ke=(e,t)=>v("a",{href:e.path||"/"},t),Se=({account:r,avatarSrc:n,settingsUrl:i,onLogout:l,collapsed:d=!1,placement:s="topRight",extraItems:p=[]})=>{const{modal:c}=o.useApp(),h=[...p??[],{key:"settings",icon:t(I,{}),label:"Settings",onClick:()=>{window.location.href=i??"/settings"}},{key:"logout",icon:t(
|
|
326
|
+
`,ve=(e,t)=>e.key??e.path??`menu-${t}`,we=(e,t)=>(e??[]).filter((e=>e&&!e.hideInMenu)).map(((e,r)=>{const n=ve(e,r);return Array.isArray(e.children)&&e.children.length>0?{key:n,icon:e.icon,label:e.name,disabled:e.disabled,type:e.group?"group":void 0,children:we(e.children,t)}:{key:n,icon:e.icon,disabled:e.disabled,label:t(e,e.name)}})),ke=(e,t)=>v("a",{href:e.path||"/"},t),Se=({account:r,avatarSrc:n,settingsUrl:i,onLogout:l,collapsed:d=!1,placement:s="topRight",extraItems:p=[]})=>{const{modal:c}=o.useApp(),h=[...p??[],{key:"settings",icon:t(I,{}),label:"Settings",onClick:()=>{window.location.href=i??"/settings"}},{key:"logout",icon:t(z,{}),label:"Logout",onClick:()=>{c.confirm({title:"Are you sure you want to logout?",content:"Please click OK to continue",icon:t(E,{}),onOk:l})}}],g=(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 t(he,{className:"cr-user-info-light",$collapsed:d,$inHeader:"bottomRight"===s,children:t(a,{trigger:["click"],placement:s,menu:{items:h},children:e(ge,{className:"ant-dropdown-link",onClick:e=>e.preventDefault(),children:[t(ue,{$src:n,"aria-hidden":!0,children:!n&&g}),!d&&e(be,{children:[e(me,{children:[t(xe,{title:r.fullName,children:r.fullName}),t(fe,{children:t(C,{})})]}),r.positionType&&t(ye,{title:r.positionType,children:r.positionType})]})]})})})},{Sider:$e}=i,Ie=({children:i,account:a,logoUrl:s,appName:p,menuItems:c,onLogout:h,pathname:g,avatarSrc:u,styledTheme:b,settingsUrl:m,antdTheme:x,renderMenuLink:f=ke,headerExtra:v,userMenuItems:S,onCollapse:I,collapsed:z=!1,loading:C=!1,hideSidebar:E=!1,layoutTop:B=!1,hideCollapseTrigger:A=!1,collapseTrigger:F="edge",collapseTriggerOffset:O=Math.round(re/2),siderWidth:R=ee,bareContent:M=!1,hideHeaderBar:U=!1,brandHref:H="/",hideAccountCard:j=!1,scrollContent:G=!0})=>{const W=q(),_=void 0===x?W?null:X:x,[P,K]=w(z);k((()=>{K(z)}),[z]);const V=y((()=>we(c,f)),[c,f]),Y=y((()=>((e,t)=>{let r;const n=(e,o)=>{(e??[]).forEach(((e,i)=>{const a=ve(e,i);if(e.path&&t.startsWith(e.path)){const n=t===e.path,i=e.path.length+(n?1:0);(!r||i>r.length)&&(r={key:a,parents:o,length:i})}e.children?.length&&n(e.children,[...o,a])}))};return n(e,[]),{selectedKey:r?.key,openKeys:r?.parents??[]}})(c,g)),[c,g]),[J,Q]=w((()=>Y.openKeys));k((()=>{Q((e=>Array.from(new Set([...e,...Y.openKeys]))))}),[Y.openKeys.join("|")]);const Z=e=>{K(e),I?.(e)},he=Y.selectedKey?[Y.selectedKey]:[],ge=A?"none":F,ue=P?"Expand menu":"Collapse menu",be=e(ae,{href:H,$collapsed:!B&&P,children:[s?t("img",{src:s,alt:p}):t("span",{className:"hisd3-brand-mark","aria-hidden":!0}),(B||!P)&&t("h1",{children:p})]}),me=M?i:t(ce,{children:i});if("undefined"==typeof document)return null;const xe=t(o,{component:!1,children:t(l,{spinning:C,size:"large",children:E?t(r,{children:i}):e(ne,B?{$appShell:G,children:[e(le,{children:[be,t(d,{mode:"horizontal",items:V,selectedKeys:he}),v,!j&&t(Se,{account:a,avatarSrc:u,settingsUrl:m,onLogout:h,placement:"bottomRight",extraItems:S})]}),t(oe,{$scroll:G,children:me})]}:{hasSider:!0,$appShell:G,children:[e($e,{className:"hisd3-sider",width:R,collapsedWidth:te,collapsible:!0,collapsed:P,trigger:null,theme:"light",breakpoint:"lg",onBreakpoint:e=>{e&&Z(!0)},children:[be,t(ie,{className:P?"hisd3-collapsed":void 0,children:t(d,{mode:"inline",theme:"light",inlineCollapsed:P,items:V,selectedKeys:he,openKeys:P?void 0:J,onOpenChange:e=>Q(e)})}),!j&&t(Se,{account:a,avatarSrc:u,settingsUrl:m,onLogout:h,collapsed:P,placement:"topRight",extraItems:S})]}),e(oe,{$scroll:G,children:[!U&&e(de,{children:["header"===ge&&t(se,{type:"button","aria-label":ue,onClick:()=>Z(!P),children:t(P?D:T,{})}),t("span",{style:{flex:1}}),v]}),me]}),"edge"===ge&&t(pe,{type:"button","aria-label":ue,title:ue,$left:P?te:R,$top:O,onClick:()=>Z(!P),children:t(P?L:N,{})})]})})});return W&&!b?_?t(n,{theme:_,children:xe}):xe:t($,{theme:b??{},children:_?t(n,{theme:_,children:xe}):xe})},ze=O.pageGutter,Ce=S.header`
|
|
327
327
|
display: contents;
|
|
328
|
-
`,
|
|
328
|
+
`,Ee=S.div`
|
|
329
329
|
user-select: none;
|
|
330
330
|
-webkit-user-select: none;
|
|
331
331
|
display: flex;
|
|
@@ -334,7 +334,7 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
334
334
|
height: ${O.topBarHeight}px; /* same as the sidebar brand block */
|
|
335
335
|
/* never shrink: these are flex items of the scrolling column */
|
|
336
336
|
flex: 0 0 ${O.topBarHeight}px;
|
|
337
|
-
padding: 0 ${
|
|
337
|
+
padding: 0 ${ze}px;
|
|
338
338
|
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
339
339
|
background: var(--ant-color-bg-layout);
|
|
340
340
|
position: sticky;
|
|
@@ -361,7 +361,7 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
361
361
|
gap: 16px;
|
|
362
362
|
flex-wrap: wrap;
|
|
363
363
|
flex: 0 0 auto;
|
|
364
|
-
padding: 20px ${
|
|
364
|
+
padding: 20px ${ze}px 18px;
|
|
365
365
|
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border-secondary);
|
|
366
366
|
|
|
367
367
|
h1 {
|
|
@@ -381,8 +381,8 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
381
381
|
}
|
|
382
382
|
`,Le=S.div`
|
|
383
383
|
flex: 1 0 auto;
|
|
384
|
-
padding: 24px ${
|
|
385
|
-
`,Ne=({title:r,subtitle:n,breadcrumb:o,extra:i,leading:a,hideTopBar:l=!1,className:d})=>e(
|
|
384
|
+
padding: 24px ${ze}px 40px;
|
|
385
|
+
`,Ne=({title:r,subtitle:n,breadcrumb:o,extra:i,leading:a,hideTopBar:l=!1,className:d})=>e(Ce,{className:d,children:[!l&&e(Ee,{children:[a,o&&o.length>0&&t(s,{items:o.map((e=>({title:e.href?t("a",{href:e.href,children:e.title}):e.title,onClick:e.onClick})))}),!o?.length&&t("span",{style:{flex:1}}),i&&t(De,{children:i})]}),e(Te,{children:[t("h1",{children:r}),n&&t("p",{children:n})]})]}),Be=S.button`
|
|
386
386
|
user-select: none;
|
|
387
387
|
-webkit-user-select: none;
|
|
388
388
|
position: relative;
|
|
@@ -477,7 +477,7 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
477
477
|
`,Re=S.div`
|
|
478
478
|
max-height: 380px;
|
|
479
479
|
overflow-y: auto;
|
|
480
|
-
`,
|
|
480
|
+
`,Me=S.button`
|
|
481
481
|
display: flex;
|
|
482
482
|
align-items: flex-start;
|
|
483
483
|
gap: 12px;
|
|
@@ -492,7 +492,7 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
492
492
|
&:hover {
|
|
493
493
|
background: ${({$unread:e})=>e?"var(--ant-color-primary-bg-hover)":"rgba(0,0,0,0.04)"};
|
|
494
494
|
}
|
|
495
|
-
`,
|
|
495
|
+
`,Ue=S.span`
|
|
496
496
|
width: 36px;
|
|
497
497
|
height: 36px;
|
|
498
498
|
flex: 0 0 auto;
|
|
@@ -503,7 +503,7 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
503
503
|
color: var(--ant-color-text);
|
|
504
504
|
border-radius: 50%;
|
|
505
505
|
background: ${({$src:e})=>e?`center / cover no-repeat url("${e}")`:"rgba(0,0,0,0.06)"};
|
|
506
|
-
`,
|
|
506
|
+
`,He=S.span`
|
|
507
507
|
flex: 1 1 auto;
|
|
508
508
|
min-width: 0;
|
|
509
509
|
|
|
@@ -554,7 +554,7 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
554
554
|
}
|
|
555
555
|
`,We=S.div`
|
|
556
556
|
padding: 28px 16px;
|
|
557
|
-
`,_e=({items:r=[],count:n,loading:o=!1,title:i="Notifications",onMarkAllRead:d,onSeeAll:s,seeAllLabel:c="See all notifications",emptyText:h="You're all caught up",onOpenChange:g,size:u=40,icon:b,className:m})=>{const[x,f]=w(!1),y=n??r.filter((e=>e.unread)).length,v=e(Fe,{children:[e(Oe,{children:[t("h4",{children:i}),d&&y>0&&t("button",{type:"button",onClick:d,children:"Mark all as read"})]}),o?t(We,{style:{textAlign:"center"},children:t(l,{})}):0===r.length?t(We,{children:t(p,{image:p.PRESENTED_IMAGE_SIMPLE,description:h})}):t(Re,{children:r.map((r=>e(
|
|
557
|
+
`,_e=({items:r=[],count:n,loading:o=!1,title:i="Notifications",onMarkAllRead:d,onSeeAll:s,seeAllLabel:c="See all notifications",emptyText:h="You're all caught up",onOpenChange:g,size:u=40,icon:b,className:m})=>{const[x,f]=w(!1),y=n??r.filter((e=>e.unread)).length,v=e(Fe,{children:[e(Oe,{children:[t("h4",{children:i}),d&&y>0&&t("button",{type:"button",onClick:d,children:"Mark all as read"})]}),o?t(We,{style:{textAlign:"center"},children:t(l,{})}):0===r.length?t(We,{children:t(p,{image:p.PRESENTED_IMAGE_SIMPLE,description:h})}):t(Re,{children:r.map((r=>e(Me,{type:"button",$unread:r.unread,onClick:()=>{r.onClick?.(r),f(!1),g?.(!1)},children:[t(Ue,{$src:r.avatarSrc,children:!r.avatarSrc&&(r.icon??t(B,{}))}),e(He,{children:[t("strong",{children:r.title}),r.description&&t("span",{children:r.description}),r.time&&t("time",{children:r.time})]}),r.unread&&t(je,{})]},r.id)))}),s&&t(Ge,{type:"button",onClick:()=>{s(),f(!1),g?.(!1)},children:c})]});return t(a,{open:x,onOpenChange:e=>{f(e),g?.(e)},trigger:["click"],placement:"bottomRight",popupRender:()=>v,children:e(Be,{type:"button",$size:u,$open:x,className:m,"aria-label":`${i}${y?` (${y} unread)`:""}`,children:[b??t(B,{}),y>0&&t(Ae,{$size:u,children:y>99?"99+":y})]})})},Pe=S.button`
|
|
558
558
|
user-select: none;
|
|
559
559
|
-webkit-user-select: none;
|
|
560
560
|
position: relative;
|
|
@@ -680,7 +680,7 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
680
680
|
border-radius: 8px;
|
|
681
681
|
font-size: 14px;
|
|
682
682
|
}
|
|
683
|
-
`,qe=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("")||"?",Je=({account:r,avatarSrc:n,settingsUrl:i="/settings",onSettings:l,onLogout:d,confirmLogout:s=!0,extraItems:p,shape:c="circle",size:h=40,hideChevron:g=!1,className:u})=>{const{modal:b}=o.useApp(),[m,x]=w(!1),f=[...p??[],...null!==i||l?[{key:"settings",icon:t(I,{}),label:"Settings",onClick:()=>{l?l():i&&(window.location.href=i)}}]:[],{key:"logout",icon:t(
|
|
683
|
+
`,qe=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("")||"?",Je=({account:r,avatarSrc:n,settingsUrl:i="/settings",onSettings:l,onLogout:d,confirmLogout:s=!0,extraItems:p,shape:c="circle",size:h=40,hideChevron:g=!1,className:u})=>{const{modal:b}=o.useApp(),[m,x]=w(!1),f=[...p??[],...null!==i||l?[{key:"settings",icon:t(I,{}),label:"Settings",onClick:()=>{l?l():i&&(window.location.href=i)}}]:[],{key:"logout",icon:t(z,{}),label:"Logout",onClick:()=>{s?b.confirm({title:"Are you sure you want to logout?",content:"Please click OK to continue",icon:t(E,{}),okText:"Logout",onOk:d}):d()}}];return t(a,{open:m,onOpenChange:x,trigger:["click"],placement:"bottomRight",menu:{items:f,onClick:()=>x(!1)},popupRender:o=>e(Ye,{children:[e(Xe,{children:[t(Ve,{$src:n,children:!n&&qe(r.fullName)}),e("span",{className:"hisd3-identity-text",children:[t("span",{className:"hisd3-identity-name",children:r.fullName}),r.positionType&&t("span",{className:"hisd3-identity-role",children:r.positionType})]})]}),o]}),children:e(Pe,{type:"button",className:u,$shape:c,$size:h,$open:m,"aria-label":`Account menu for ${r.fullName}`,children:[n?t("img",{src:n,alt:""}):qe(r.fullName),!g&&t(Ke,{$size:h,$open:m,"aria-hidden":!0,children:t(C,{})})]})})},Qe=S.div`
|
|
684
684
|
display: flex;
|
|
685
685
|
align-items: center;
|
|
686
686
|
gap: 8px;
|
|
@@ -696,19 +696,19 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
696
696
|
}
|
|
697
697
|
|
|
698
698
|
.ant-table-wrapper .ant-table-thead > tr > th {
|
|
699
|
-
font-size:
|
|
699
|
+
font-size: 11px;
|
|
700
700
|
font-weight: 700;
|
|
701
|
-
letter-spacing: 0.
|
|
701
|
+
letter-spacing: 0.08em;
|
|
702
702
|
text-transform: uppercase;
|
|
703
703
|
color: var(--ant-color-text-tertiary);
|
|
704
|
-
padding-block:
|
|
704
|
+
padding-block: 9px;
|
|
705
705
|
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
706
706
|
background: transparent;
|
|
707
707
|
}
|
|
708
708
|
|
|
709
709
|
.ant-table-wrapper .ant-table-tbody > tr > td {
|
|
710
710
|
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border-secondary);
|
|
711
|
-
font-size:
|
|
711
|
+
font-size: 14px;
|
|
712
712
|
}
|
|
713
713
|
|
|
714
714
|
.ant-table-wrapper .ant-table-tbody > tr:last-child > td {
|
|
@@ -741,8 +741,8 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
741
741
|
color: var(--ant-color-text-tertiary);
|
|
742
742
|
}
|
|
743
743
|
`,rt=S.div`
|
|
744
|
-
padding:
|
|
745
|
-
font-size:
|
|
744
|
+
padding: 14px 0 8px;
|
|
745
|
+
font-size: 11px;
|
|
746
746
|
font-weight: 600;
|
|
747
747
|
letter-spacing: 0.1em;
|
|
748
748
|
text-transform: uppercase;
|
|
@@ -752,12 +752,12 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
752
752
|
-webkit-user-select: none;
|
|
753
753
|
display: flex;
|
|
754
754
|
align-items: center;
|
|
755
|
-
gap:
|
|
756
|
-
padding:
|
|
755
|
+
gap: 16px;
|
|
756
|
+
padding: 14px 0 4px;
|
|
757
757
|
|
|
758
758
|
.hisd3-total {
|
|
759
759
|
flex: 1 1 auto;
|
|
760
|
-
font-size:
|
|
760
|
+
font-size: 13px;
|
|
761
761
|
color: var(--ant-color-text-secondary);
|
|
762
762
|
}
|
|
763
763
|
|
|
@@ -771,14 +771,14 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
771
771
|
.ant-pagination-jump-prev,
|
|
772
772
|
.ant-pagination-jump-next {
|
|
773
773
|
margin: 0;
|
|
774
|
-
min-width:
|
|
775
|
-
height:
|
|
776
|
-
line-height:
|
|
774
|
+
min-width: 34px;
|
|
775
|
+
height: 34px;
|
|
776
|
+
line-height: 34px;
|
|
777
777
|
border: 0;
|
|
778
778
|
border-right: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
779
779
|
border-radius: 0;
|
|
780
780
|
font-weight: 700;
|
|
781
|
-
font-size:
|
|
781
|
+
font-size: 13px;
|
|
782
782
|
background: transparent;
|
|
783
783
|
|
|
784
784
|
&:last-child {
|
|
@@ -800,7 +800,7 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
800
800
|
.ant-pagination-prev .ant-pagination-item-link,
|
|
801
801
|
.ant-pagination-next .ant-pagination-item-link {
|
|
802
802
|
color: var(--ant-color-text);
|
|
803
|
-
font-size:
|
|
803
|
+
font-size: 11px;
|
|
804
804
|
}
|
|
805
805
|
|
|
806
806
|
.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-ellipsis,
|
|
@@ -814,13 +814,13 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
814
814
|
border: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
815
815
|
|
|
816
816
|
button {
|
|
817
|
-
height:
|
|
818
|
-
padding: 0
|
|
817
|
+
height: 34px;
|
|
818
|
+
padding: 0 14px;
|
|
819
819
|
border: 0;
|
|
820
820
|
border-right: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
821
821
|
background: transparent;
|
|
822
822
|
font: inherit;
|
|
823
|
-
font-size:
|
|
823
|
+
font-size: 13px;
|
|
824
824
|
color: var(--ant-color-text);
|
|
825
825
|
cursor: pointer;
|
|
826
826
|
|
|
@@ -845,22 +845,22 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
845
845
|
}
|
|
846
846
|
|
|
847
847
|
&.ant-tabs .ant-tabs-tab {
|
|
848
|
-
padding:
|
|
848
|
+
padding: 10px 0 12px;
|
|
849
849
|
font-weight: 600;
|
|
850
|
-
font-size:
|
|
850
|
+
font-size: 15px;
|
|
851
851
|
|
|
852
852
|
+ .ant-tabs-tab {
|
|
853
|
-
margin-left:
|
|
853
|
+
margin-left: 32px;
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
856
|
|
|
857
857
|
&.ant-tabs .ant-tabs-ink-bar {
|
|
858
|
-
height:
|
|
858
|
+
height: 3px;
|
|
859
859
|
}
|
|
860
860
|
|
|
861
861
|
.hisd3-tab-count {
|
|
862
|
-
margin-left:
|
|
863
|
-
font-size:
|
|
862
|
+
margin-left: 8px;
|
|
863
|
+
font-size: 13px;
|
|
864
864
|
font-weight: 500;
|
|
865
865
|
color: var(--ant-color-text-tertiary);
|
|
866
866
|
}
|
|
@@ -871,10 +871,10 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
871
871
|
`,dt=({items:n,...o})=>t(lt,{...o,items:n.map((({count:n,label:o,...i})=>({...i,label:e(r,{children:[o,void 0!==n&&t("span",{className:"hisd3-tab-count",children:n})]})})))}),st={default:"var(--ant-color-text)",primary:"var(--ant-color-primary)",success:"var(--ant-color-success)",warning:"var(--ant-color-warning)",danger:"var(--ant-color-error)"},pt={default:"rgba(0,0,0,0.05)",primary:"var(--ant-color-primary-bg)",success:"var(--ant-color-success-bg)",warning:"var(--ant-color-warning-bg)",danger:"var(--ant-color-error-bg)"},ct=S.span`
|
|
872
872
|
display: inline-flex;
|
|
873
873
|
align-items: center;
|
|
874
|
-
gap:
|
|
875
|
-
height:
|
|
876
|
-
padding: 0
|
|
877
|
-
font-size:
|
|
874
|
+
gap: 5px;
|
|
875
|
+
height: 22px;
|
|
876
|
+
padding: 0 9px;
|
|
877
|
+
font-size: 11px;
|
|
878
878
|
font-weight: 500;
|
|
879
879
|
letter-spacing: 0.06em;
|
|
880
880
|
text-transform: uppercase;
|
|
@@ -962,5 +962,5 @@ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{ConfigPro
|
|
|
962
962
|
font-size: 18px;
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
|
-
`,yt=({compact:e=!1,className:r,...n})=>t(ft,{allowClear:!0,prefix:t(A,{}),className:[e?"hisd3-search-compact":"",r??""].join(" ").trim(),...n});var vt,wt,kt,St,$t,It,Ct,Et,
|
|
965
|
+
`,yt=({compact:e=!1,className:r,...n})=>t(ft,{allowClear:!0,prefix:t(A,{}),className:[e?"hisd3-search-compact":"",r??""].join(" ").trim(),...n});var vt,wt,kt,St,$t,It,zt,Ct,Et,Dt,Tt,Lt,Nt;!function(e){e.MODERN="modern",e.STANDARD="standard"}(vt||(vt={})),function(e){e.MODERN="30px",e.STANDARD="16px"}(wt||(wt={})),function(e){e.LIGHT="light",e.SEMI_DARK="semi-dark",e.DARK="dark"}(kt||(kt={})),function(e){e.FULL_WIDTH="full-width",e.BOXED="boxed",e.FRAMED="framed"}(St||(St={})),function(e){e.DEFAULT="default",e.STANDARD="standard",e.ROUNDED="rounded",e.ROUNDED_REVERSE="rounded-reverse",e.CURVED_MENU="curved-menu"}($t||($t={})),function(e){e.DEFAULT="default",e.MINI="mini",e.MINI_SIDEBAR_TOGGLE="mini-sidebar-toggle",e.STANDARD="standard",e.HEADER_USER="user-header",e.HEADER_USER_MINI="user-mini-header",e.DRAWER="drawer",e.BIT_BUCKET="bit-bucket",e.H_DEFAULT="h-default",e.HOR_HEADER_FIXED="hor-header-fixed",e.HOR_DARK_LAYOUT="hor-dark-layout"}(It||(It={})),function(e){e.FIXED="fixed",e.FLUID="fluid"}(zt||(zt={})),function(e){e.RTL="rtl",e.LTR="ltr"}(Ct||(Ct={})),function(e){e.DARK="dark",e.LIGHT="light"}(Et||(Et={})),function(e){e.NONE="none",e.FADE="fade",e.SLIDE_LEFT="slideLeft",e.SLIDE_RIGHT="slideRight",e.SLIDE_UP="slideUp",e.SLIDE_DOWN="slideDown"}(Dt||(Dt={})),function(e){e.LIGHT="300",e.REGULAR="400",e.MEDIUM="500",e.BOLD="600"}(Tt||(Tt={})),function(e){e.FIREBASE="firebase",e.AWS_COGNITO="aws_cognito",e.AUTH0="auth0",e.JWT_AUTH="jwt_auth"}(Lt||(Lt={})),function(e){e.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"}(Nt||(Nt={}));const Bt={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}}},At={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"}}};var Ft,Ot;!function(e){e[e.MEDIA=1]="MEDIA",e[e.TEXT=2]="TEXT"}(Ft||(Ft={})),function(e){e.Admin="admin",e.User="user"}(Ot||(Ot={}));export{Bt as AppAnimateGroups,Nt as AppAnimates,At as AppMotionAnimate,Lt as AuthType,Tt as Fonts,zt as FooterType,Je as HISD3AvatarMenu,bt as HISD3Button,et as HISD3HeaderActions,xt as HISD3Input,_e as HISD3NotificationButton,Le as HISD3PageBody,Ne as HISD3PageHeader,J as HISD3Provider,yt as HISD3SearchInput,Ie as HISD3Sidebar,at as HISD3Table,dt as HISD3Tabs,ht as HISD3Tag,U as HISD3_BORDER_PRESETS,V as HISD3_COLORS,H as HISD3_FONT_FAMILY,G as HISD3_FONT_WEIGHT_BODY,j as HISD3_FONT_WEIGHT_HEADING,O as HISD3_LAYOUT,M as HISD3_NEUTRALS,R as HISD3_PRESETS,Be as HeaderIconButton,Et as HeaderType,Ct as LayoutDirection,St as LayoutType,$t as MenuStyle,Ft as MessageType,It as NavStyle,Ot as RoutePermittedRole,Dt as RouteTransition,kt as ThemeMode,vt as ThemeStyle,wt as ThemeStyleRadius,Se as UserMenu,K as borderVarsCss,P as createHisd3Theme,qe as getInitials,X as hisd3AntdTheme,W as resolvePrimary,_ as tint,q as useInsideHISD3Provider};
|
|
966
966
|
//# sourceMappingURL=index.js.map
|