hisd3-ui-kit 4.0.0 → 4.0.1
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/dist/index.cjs.js +67 -66
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +45 -44
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("antd"),
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("antd"),n=require("react"),o=require("styled-components"),r=require("@ant-design/icons");function i(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.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{--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)}.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={red:"#E5401C",orange:"#F26B1D",teal:"#00796B",blue:"#1D5FD1",green:"#2E7D32",purple:"#6A3FD6"},l={bgLayout:"#F3F2F0",bgContainer:"#F3F2F0",bgElevated:"#FFFFFF",bgFilled:"#E6E4E1",text:"#171717",textSecondary:"#4A4A4A",textTertiary:"#6E6E6E",border:"#1F1F1F",borderSecondary:"#CFCDC9",white:"#FFFFFF"},s="'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",d=(e="red")=>a[e]??e,p=(e,t)=>{const n=e.replace("#",""),o=3===n.length?n.split("").map((e=>e+e)).join(""):n,r=parseInt(o,16),i=r>>8&255,a=255&r,l=e=>Math.round(e+(255-e)*t);return`#${[l(r>>16&255),l(i),l(a)].map((e=>e.toString(16).padStart(2,"0"))).join("")}`},c=({primary:e,radius:t=0,lineWidth:n=2,overrides:o}={})=>{const r=d(e),i=l,a={cssVar:{key:"hisd3"},token:{colorPrimary:r,colorInfo:r,colorLink:r,colorPrimaryBg:p(r,.92),colorPrimaryBgHover:p(r,.86),colorPrimaryBorder:p(r,.6),fontFamily:s,fontSize:14,fontWeightStrong:700,borderRadius:t,borderRadiusLG:t,borderRadiusSM:t,borderRadiusXS:t,lineWidth:n,colorBgLayout:i.bgLayout,colorBgContainer:i.bgContainer,colorBgElevated:i.bgElevated,colorText:i.text,colorTextSecondary:i.textSecondary,colorTextTertiary:i.textTertiary,colorTextHeading:i.text,colorBorder:i.border,colorBorderSecondary:i.borderSecondary,colorSplit:i.borderSecondary,controlHeight:40,controlHeightLG:52,controlHeightSM:32,boxShadow:"none",boxShadowSecondary:"0 8px 24px rgba(0,0,0,0.12)"},components:{Layout:{siderBg:i.bgLayout,headerBg:i.bgLayout,bodyBg:i.bgLayout,headerPadding:"0 48px"},Menu:{itemBg:"transparent",subMenuItemBg:"transparent",itemColor:i.text,itemHoverColor:i.text,itemHoverBg:"rgba(0,0,0,0.04)",itemSelectedBg:p(r,.9),itemSelectedColor:r,itemActiveBg:p(r,.86),subMenuItemSelectedColor:r,groupTitleColor:i.textTertiary,groupTitleFontSize:12,itemBorderRadius:0,itemMarginInline:0,itemMarginBlock:0,itemHeight:40,itemPaddingInline:24,iconSize:16,collapsedIconSize:18,activeBarBorderWidth:0,activeBarWidth:0},Button:{fontWeight:600,primaryShadow:"none",defaultShadow:"none",dangerShadow:"none",defaultBorderColor:i.border,defaultColor:i.text,defaultBg:i.bgLayout,defaultHoverBg:i.white,defaultHoverBorderColor:i.border,defaultHoverColor:i.text,defaultActiveBorderColor:i.border,paddingInline:16,contentFontSize:14,contentFontSizeLG:16,contentFontSizeSM:13},Input:{activeShadow:"none",colorBorder:i.borderSecondary,hoverBorderColor:i.border,activeBorderColor:i.border,paddingInline:16},Select:{optionSelectedBg:p(r,.9),colorBorder:i.borderSecondary},Table:{headerBg:"transparent",headerColor:i.textTertiary,headerSplitColor:"transparent",headerBorderRadius:0,borderColor:i.borderSecondary,rowHoverBg:"rgba(0,0,0,0.03)",cellPaddingBlock:20,cellPaddingInline:16,cellFontSize:16,footerBg:"transparent"},Tabs:{inkBarColor:r,itemColor:i.text,itemSelectedColor:r,itemHoverColor:r,titleFontSize:18,horizontalItemGutter:48,horizontalMargin:"0",lineWidthBold:4},Tag:{borderRadiusSM:0,defaultBg:"transparent"},Pagination:{itemBg:i.bgLayout,itemActiveBg:r,itemSize:48,itemInputBg:i.bgLayout},Dropdown:{paddingBlock:10},Breadcrumb:{itemColor:i.textTertiary,lastItemColor:i.text,linkColor:i.textTertiary,linkHoverColor:r,separatorColor:i.textTertiary},Card:{headerFontSize:20}}};return o?{...a,...o,token:{...a.token,...o.token},components:{...a.components,...o.components}}:a},h=c(),g={primary:a.red,primaryLight:p(a.red,.9),headerSelectedBg:"rgba(0,0,0,0.04)"},u=n.createContext(!1),x=()=>n.useContext(u),m={siderWidth:280,siderCollapsedWidth:72,topBarHeight:88,pageGutter:40},{Header:b,Content:y}=t.Layout,f=m.siderWidth,v=m.siderCollapsedWidth,w=m.topBarHeight,S=o(t.Layout)`
|
|
2
2
|
min-height: 100vh;
|
|
3
3
|
background: var(--ant-color-bg-layout);
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
height: 100%;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
`,I=
|
|
23
|
+
`,I=o.div`
|
|
24
24
|
flex: 1 1 auto;
|
|
25
25
|
overflow-y: auto;
|
|
26
26
|
overflow-x: hidden;
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
|
|
35
35
|
/* Section titles: "RECEIVABLES AND COLLECTIONS" */
|
|
36
36
|
.ant-menu-item-group-title {
|
|
37
|
-
padding:
|
|
38
|
-
font-size:
|
|
37
|
+
padding: 18px 24px 6px;
|
|
38
|
+
font-size: 11px;
|
|
39
39
|
font-weight: 600;
|
|
40
40
|
letter-spacing: 0.14em;
|
|
41
41
|
text-transform: uppercase;
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
.ant-menu-item-group + .ant-menu-item-group > .ant-menu-item-group-title,
|
|
46
46
|
.ant-menu-item-group + .ant-menu-item-group::before {
|
|
47
47
|
border-top: 2px solid var(--ant-color-border-secondary);
|
|
48
|
-
margin-top:
|
|
49
|
-
padding-top:
|
|
48
|
+
margin-top: 10px;
|
|
49
|
+
padding-top: 20px;
|
|
50
50
|
}
|
|
51
51
|
.ant-menu-item-group + .ant-menu-item-group::before {
|
|
52
52
|
content: none;
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
.ant-menu-item,
|
|
56
56
|
.ant-menu-submenu-title {
|
|
57
|
-
font-size:
|
|
57
|
+
font-size: 14px;
|
|
58
58
|
font-weight: 500;
|
|
59
59
|
position: relative;
|
|
60
60
|
width: 100%;
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
.ant-menu-item .ant-menu-item-icon,
|
|
64
64
|
.ant-menu-submenu-title .ant-menu-item-icon {
|
|
65
|
-
font-size:
|
|
65
|
+
font-size: 16px;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/* open parent ("Billing") in primary */
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
|
|
75
75
|
/* child items are indented by antd; keep them slightly smaller */
|
|
76
76
|
.ant-menu-sub.ant-menu-inline > .ant-menu-item {
|
|
77
|
-
font-size:
|
|
77
|
+
font-size: 13.5px;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
/* active item: tint + 4px accent bar */
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
left: 0;
|
|
88
88
|
top: 0;
|
|
89
89
|
bottom: 0;
|
|
90
|
-
width:
|
|
90
|
+
width: 4px;
|
|
91
91
|
background: var(--ant-color-primary);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -95,10 +95,10 @@
|
|
|
95
95
|
&.hisd3-collapsed .ant-menu-item-group-title {
|
|
96
96
|
display: none;
|
|
97
97
|
}
|
|
98
|
-
`,T=
|
|
98
|
+
`,T=o.a`
|
|
99
99
|
display: flex;
|
|
100
100
|
align-items: center;
|
|
101
|
-
gap:
|
|
101
|
+
gap: 12px;
|
|
102
102
|
height: ${w}px;
|
|
103
103
|
padding: 0 ${({$collapsed:e})=>e?14:24}px;
|
|
104
104
|
justify-content: ${({$collapsed:e})=>e?"center":"flex-start"};
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
border-bottom: 2px solid var(--ant-color-border);
|
|
111
111
|
|
|
112
112
|
.hisd3-brand-mark {
|
|
113
|
-
width:
|
|
114
|
-
height:
|
|
113
|
+
width: 36px;
|
|
114
|
+
height: 36px;
|
|
115
115
|
flex: 0 0 auto;
|
|
116
116
|
background: var(--ant-color-primary);
|
|
117
117
|
display: flex;
|
|
@@ -120,8 +120,8 @@
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
img {
|
|
123
|
-
height:
|
|
124
|
-
width:
|
|
123
|
+
height: 36px;
|
|
124
|
+
width: 36px;
|
|
125
125
|
object-fit: contain;
|
|
126
126
|
flex: 0 0 auto;
|
|
127
127
|
}
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
h1 {
|
|
130
130
|
margin: 0;
|
|
131
131
|
font-family: var(--font-heading);
|
|
132
|
-
font-size:
|
|
132
|
+
font-size: 18px;
|
|
133
133
|
font-weight: var(--font-weight-heading, 800);
|
|
134
134
|
letter-spacing: 0.04em;
|
|
135
135
|
text-transform: uppercase;
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
overflow: hidden;
|
|
138
138
|
text-overflow: ellipsis;
|
|
139
139
|
}
|
|
140
|
-
`,D=
|
|
140
|
+
`,D=o(b)`
|
|
141
141
|
display: flex;
|
|
142
142
|
align-items: center;
|
|
143
143
|
gap: 24px;
|
|
@@ -156,10 +156,10 @@
|
|
|
156
156
|
border-bottom: none;
|
|
157
157
|
background: transparent;
|
|
158
158
|
line-height: ${w-2}px;
|
|
159
|
-
font-size:
|
|
159
|
+
font-size: 14px;
|
|
160
160
|
font-weight: 500;
|
|
161
161
|
}
|
|
162
|
-
`,E=
|
|
162
|
+
`,E=o(b)`
|
|
163
163
|
display: flex;
|
|
164
164
|
align-items: center;
|
|
165
165
|
gap: 16px;
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
z-index: 99;
|
|
172
172
|
background: var(--ant-color-bg-layout);
|
|
173
173
|
border-bottom: 2px solid var(--ant-color-border);
|
|
174
|
-
`,k=
|
|
174
|
+
`,k=o.button`
|
|
175
175
|
border: 2px solid var(--ant-color-border);
|
|
176
176
|
background: transparent;
|
|
177
177
|
cursor: pointer;
|
|
@@ -187,53 +187,53 @@
|
|
|
187
187
|
&:hover {
|
|
188
188
|
background: rgba(0, 0, 0, 0.05);
|
|
189
189
|
}
|
|
190
|
-
`,C=
|
|
190
|
+
`,C=o(y)`
|
|
191
191
|
padding: 32px ${m.pageGutter}px 48px;
|
|
192
192
|
min-height: calc(100vh - ${w}px);
|
|
193
|
-
`,L=
|
|
193
|
+
`,L=o.div`
|
|
194
194
|
flex: 0 0 auto;
|
|
195
195
|
display: flex;
|
|
196
196
|
flex-direction: column;
|
|
197
197
|
justify-content: center;
|
|
198
198
|
line-height: 1.25;
|
|
199
199
|
transition: all 0.2s ease;
|
|
200
|
-
padding: ${({$inHeader:e,$collapsed:t})=>e?"0 4px":t?"
|
|
200
|
+
padding: ${({$inHeader:e,$collapsed:t})=>e?"0 4px":t?"14px 0":"16px 24px"};
|
|
201
201
|
min-width: ${({$inHeader:e})=>e?"220px":"0"};
|
|
202
202
|
border-top: ${({$inHeader:e})=>e?"none":"2px solid var(--ant-color-border)"};
|
|
203
203
|
|
|
204
204
|
& .ant-dropdown-link {
|
|
205
205
|
color: inherit;
|
|
206
206
|
}
|
|
207
|
-
`,j=
|
|
207
|
+
`,j=o.a`
|
|
208
208
|
display: flex;
|
|
209
209
|
align-items: center;
|
|
210
210
|
justify-content: center;
|
|
211
211
|
cursor: pointer;
|
|
212
212
|
color: inherit;
|
|
213
|
-
gap:
|
|
214
|
-
`,A=
|
|
215
|
-
width:
|
|
216
|
-
height:
|
|
213
|
+
gap: 12px;
|
|
214
|
+
`,A=o.span`
|
|
215
|
+
width: 40px;
|
|
216
|
+
height: 40px;
|
|
217
217
|
flex: 0 0 auto;
|
|
218
218
|
display: flex;
|
|
219
219
|
align-items: center;
|
|
220
220
|
justify-content: center;
|
|
221
|
-
font-size:
|
|
221
|
+
font-size: 14px;
|
|
222
222
|
font-weight: 700;
|
|
223
223
|
color: var(--ant-color-text);
|
|
224
224
|
background: ${({$src:e})=>e?`center / cover no-repeat url("${e}")`:"#D9D6D2"};
|
|
225
|
-
`,
|
|
225
|
+
`,z=o.span`
|
|
226
226
|
flex: 1 1 auto;
|
|
227
227
|
min-width: 0;
|
|
228
|
-
`,
|
|
228
|
+
`,O=o.span`
|
|
229
229
|
display: flex;
|
|
230
230
|
align-items: flex-start;
|
|
231
231
|
justify-content: space-between;
|
|
232
232
|
gap: 8px;
|
|
233
|
-
`,
|
|
233
|
+
`,R=o.h3`
|
|
234
234
|
margin: 0;
|
|
235
235
|
font-family: var(--font-body);
|
|
236
|
-
font-size:
|
|
236
|
+
font-size: 14px;
|
|
237
237
|
font-weight: 700;
|
|
238
238
|
letter-spacing: 0;
|
|
239
239
|
color: var(--ant-color-text);
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
display: -webkit-box;
|
|
243
243
|
-webkit-line-clamp: 2;
|
|
244
244
|
-webkit-box-orient: vertical;
|
|
245
|
-
`,
|
|
245
|
+
`,F=o.span`
|
|
246
246
|
width: 20px;
|
|
247
247
|
height: 22px;
|
|
248
248
|
display: flex;
|
|
@@ -254,10 +254,10 @@
|
|
|
254
254
|
& svg {
|
|
255
255
|
display: block;
|
|
256
256
|
}
|
|
257
|
-
`,
|
|
257
|
+
`,B=o.span`
|
|
258
258
|
display: block;
|
|
259
|
-
margin-top:
|
|
260
|
-
font-size:
|
|
259
|
+
margin-top: 3px;
|
|
260
|
+
font-size: 11px;
|
|
261
261
|
font-weight: 500;
|
|
262
262
|
letter-spacing: 0.12em;
|
|
263
263
|
text-transform: uppercase;
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
overflow: hidden;
|
|
266
266
|
text-overflow: ellipsis;
|
|
267
267
|
white-space: nowrap;
|
|
268
|
-
`,
|
|
268
|
+
`,H=(e,t)=>e.key??e.path??`menu-${t}`,N=(e,t)=>(e??[]).filter((e=>e&&!e.hideInMenu)).map(((e,n)=>{const o=H(e,n);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:N(e.children,t)}:{key:o,icon:e.icon,disabled:e.disabled,label:t(e,e.name)}})),U=(e,t)=>n.createElement("a",{href:e.path||"/"},t),M=({account:n,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(r.SettingOutlined,{}),label:"Settings",onClick:()=>{window.location.href=i??"/settings"}},{key:"logout",icon:e.jsx(r.LogoutOutlined,{}),label:"Logout",onClick:()=>{p.confirm({title:"Are you sure you want to logout?",content:"Please click OK to continue",icon:e.jsx(r.ExclamationCircleOutlined,{}),onOk:a})}}],h=(n.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(L,{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(j,{className:"ant-dropdown-link",onClick:e=>e.preventDefault(),children:[e.jsx(A,{$src:o,"aria-hidden":!0,children:!o&&h}),!l&&e.jsxs(z,{children:[e.jsxs(O,{children:[e.jsx(R,{title:n.fullName,children:n.fullName}),e.jsx(F,{children:e.jsx(r.DownOutlined,{})})]}),n.positionType&&e.jsx(B,{title:n.positionType,children:n.positionType})]})]})})})},{Sider:$}=t.Layout,_=m.pageGutter,P=o.div`
|
|
269
269
|
display: flex;
|
|
270
270
|
align-items: center;
|
|
271
271
|
gap: 24px;
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
z-index: 20;
|
|
279
279
|
|
|
280
280
|
.ant-breadcrumb {
|
|
281
|
-
font-size:
|
|
281
|
+
font-size: 14px;
|
|
282
282
|
flex: 1 1 auto;
|
|
283
283
|
min-width: 0;
|
|
284
284
|
}
|
|
@@ -286,23 +286,23 @@
|
|
|
286
286
|
.ant-breadcrumb ol {
|
|
287
287
|
flex-wrap: nowrap;
|
|
288
288
|
}
|
|
289
|
-
`,W=
|
|
289
|
+
`,W=o.div`
|
|
290
290
|
display: flex;
|
|
291
291
|
align-items: center;
|
|
292
292
|
gap: 16px;
|
|
293
293
|
flex: 0 0 auto;
|
|
294
|
-
`,G=
|
|
294
|
+
`,G=o.div`
|
|
295
295
|
display: flex;
|
|
296
296
|
align-items: baseline;
|
|
297
297
|
gap: 24px;
|
|
298
298
|
flex-wrap: wrap;
|
|
299
|
-
padding:
|
|
299
|
+
padding: 28px ${_}px 24px;
|
|
300
300
|
border-bottom: 2px solid var(--ant-color-border-secondary);
|
|
301
301
|
|
|
302
302
|
h1 {
|
|
303
303
|
margin: 0;
|
|
304
304
|
font-family: var(--font-heading);
|
|
305
|
-
font-size:
|
|
305
|
+
font-size: 44px;
|
|
306
306
|
line-height: 1.05;
|
|
307
307
|
font-weight: var(--font-weight-heading, 800);
|
|
308
308
|
letter-spacing: -0.02em;
|
|
@@ -311,12 +311,12 @@
|
|
|
311
311
|
|
|
312
312
|
p {
|
|
313
313
|
margin: 0;
|
|
314
|
-
font-size:
|
|
314
|
+
font-size: 17px;
|
|
315
315
|
color: var(--ant-color-text-secondary);
|
|
316
316
|
}
|
|
317
|
-
`,K=
|
|
317
|
+
`,K=o.div`
|
|
318
318
|
padding: 32px ${_}px 48px;
|
|
319
|
-
`,q=
|
|
319
|
+
`,q=o.div`
|
|
320
320
|
.ant-table-wrapper .ant-table {
|
|
321
321
|
background: transparent;
|
|
322
322
|
}
|
|
@@ -366,14 +366,14 @@
|
|
|
366
366
|
.hisd3-cell-muted {
|
|
367
367
|
color: var(--ant-color-text-tertiary);
|
|
368
368
|
}
|
|
369
|
-
`,X=
|
|
369
|
+
`,X=o.div`
|
|
370
370
|
padding: 22px 0 14px;
|
|
371
371
|
font-size: 13px;
|
|
372
372
|
font-weight: 600;
|
|
373
373
|
letter-spacing: 0.1em;
|
|
374
374
|
text-transform: uppercase;
|
|
375
375
|
color: var(--ant-color-text-tertiary);
|
|
376
|
-
`,V=
|
|
376
|
+
`,V=o.div`
|
|
377
377
|
display: flex;
|
|
378
378
|
align-items: center;
|
|
379
379
|
gap: 24px;
|
|
@@ -433,7 +433,7 @@
|
|
|
433
433
|
font-weight: 700;
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
`,Y=
|
|
436
|
+
`,Y=o.div`
|
|
437
437
|
display: inline-flex;
|
|
438
438
|
border: 2px solid var(--ant-color-border);
|
|
439
439
|
|
|
@@ -457,7 +457,7 @@
|
|
|
457
457
|
color: #fff;
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
`,J=e=>`Total ${e.toLocaleString()} items`;const Q=
|
|
460
|
+
`,J=e=>`Total ${e.toLocaleString()} items`;const Q=o(t.Tabs)`
|
|
461
461
|
&.ant-tabs .ant-tabs-nav {
|
|
462
462
|
margin: 0;
|
|
463
463
|
|
|
@@ -490,7 +490,7 @@
|
|
|
490
490
|
.ant-tabs-tab-active .hisd3-tab-count {
|
|
491
491
|
color: var(--ant-color-primary);
|
|
492
492
|
}
|
|
493
|
-
`,Z={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)"},ee={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)"},te=
|
|
493
|
+
`,Z={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)"},ee={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)"},te=o.span`
|
|
494
494
|
display: inline-flex;
|
|
495
495
|
align-items: center;
|
|
496
496
|
gap: 6px;
|
|
@@ -505,29 +505,30 @@
|
|
|
505
505
|
border: 2px solid transparent;
|
|
506
506
|
border-radius: 0;
|
|
507
507
|
|
|
508
|
-
${({$variant:e,$tone:t})=>{const
|
|
509
|
-
`,
|
|
508
|
+
${({$variant:e,$tone:t})=>{const n=Z[t],o=ee[t];switch(e){case"soft":return`color: ${n}; background: ${o};`;case"outline":return`color: ${n}; border-color: ${n}; background: transparent;`;case"solid":return`color: #fff; background: ${"default"===t?"var(--ant-color-text)":n};`;default:return"color: var(--ant-color-text); background: rgba(0,0,0,0.05);"}}}
|
|
509
|
+
`,ne=o(t.Button)`
|
|
510
510
|
&.ant-btn {
|
|
511
|
-
text-transform: none;
|
|
512
|
-
letter-spacing: 0;
|
|
513
511
|
display: inline-flex;
|
|
514
512
|
align-items: center;
|
|
515
513
|
gap: 8px;
|
|
516
|
-
height:
|
|
517
|
-
padding-inline:
|
|
518
|
-
font-size:
|
|
514
|
+
height: 40px;
|
|
515
|
+
padding-inline: 16px;
|
|
516
|
+
font-size: 14px;
|
|
519
517
|
font-weight: 600;
|
|
520
518
|
box-shadow: none;
|
|
521
519
|
}
|
|
522
520
|
|
|
523
521
|
&.ant-btn-sm {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
522
|
+
height: 32px;
|
|
523
|
+
padding-inline: 12px;
|
|
524
|
+
font-size: 13px;
|
|
525
|
+
gap: 6px;
|
|
527
526
|
}
|
|
528
527
|
|
|
529
528
|
&.ant-btn-lg {
|
|
530
|
-
|
|
529
|
+
height: 52px;
|
|
530
|
+
padding-inline: 20px;
|
|
531
|
+
font-size: 16px;
|
|
531
532
|
}
|
|
532
533
|
|
|
533
534
|
&.ant-btn-default {
|
|
@@ -537,7 +538,7 @@
|
|
|
537
538
|
.anticon {
|
|
538
539
|
font-size: 1.05em;
|
|
539
540
|
}
|
|
540
|
-
`,
|
|
541
|
+
`,oe={primary:{type:"primary"},secondary:{type:"default"},ghost:{type:"text"},danger:{type:"primary",danger:!0}},re=o(t.Input)`
|
|
541
542
|
&.ant-input,
|
|
542
543
|
&.ant-input-affix-wrapper {
|
|
543
544
|
border-width: 2px;
|
|
@@ -549,7 +550,7 @@
|
|
|
549
550
|
color: var(--ant-color-text-tertiary);
|
|
550
551
|
font-size: 18px;
|
|
551
552
|
}
|
|
552
|
-
`,ie=
|
|
553
|
+
`,ie=o(re)`
|
|
553
554
|
&.ant-input-affix-wrapper {
|
|
554
555
|
background: var(--hisd3-bg-filled, #e6e4e1);
|
|
555
556
|
border-color: var(--ant-color-border-secondary);
|
|
@@ -583,5 +584,5 @@
|
|
|
583
584
|
font-size: 18px;
|
|
584
585
|
}
|
|
585
586
|
}
|
|
586
|
-
`;var ae,le,se,de,pe,ce,he,ge,ue,xe,me,be,ye;exports.ThemeStyle=void 0,(ae=exports.ThemeStyle||(exports.ThemeStyle={})).MODERN="modern",ae.STANDARD="standard",exports.ThemeStyleRadius=void 0,(le=exports.ThemeStyleRadius||(exports.ThemeStyleRadius={})).MODERN="30px",le.STANDARD="16px",exports.ThemeMode=void 0,(se=exports.ThemeMode||(exports.ThemeMode={})).LIGHT="light",se.SEMI_DARK="semi-dark",se.DARK="dark",exports.LayoutType=void 0,(de=exports.LayoutType||(exports.LayoutType={})).FULL_WIDTH="full-width",de.BOXED="boxed",de.FRAMED="framed",exports.MenuStyle=void 0,(pe=exports.MenuStyle||(exports.MenuStyle={})).DEFAULT="default",pe.STANDARD="standard",pe.ROUNDED="rounded",pe.ROUNDED_REVERSE="rounded-reverse",pe.CURVED_MENU="curved-menu",exports.NavStyle=void 0,(ce=exports.NavStyle||(exports.NavStyle={})).DEFAULT="default",ce.MINI="mini",ce.MINI_SIDEBAR_TOGGLE="mini-sidebar-toggle",ce.STANDARD="standard",ce.HEADER_USER="user-header",ce.HEADER_USER_MINI="user-mini-header",ce.DRAWER="drawer",ce.BIT_BUCKET="bit-bucket",ce.H_DEFAULT="h-default",ce.HOR_HEADER_FIXED="hor-header-fixed",ce.HOR_DARK_LAYOUT="hor-dark-layout",exports.FooterType=void 0,(he=exports.FooterType||(exports.FooterType={})).FIXED="fixed",he.FLUID="fluid",exports.LayoutDirection=void 0,(ge=exports.LayoutDirection||(exports.LayoutDirection={})).RTL="rtl",ge.LTR="ltr",exports.HeaderType=void 0,(ue=exports.HeaderType||(exports.HeaderType={})).DARK="dark",ue.LIGHT="light",exports.RouteTransition=void 0,(xe=exports.RouteTransition||(exports.RouteTransition={})).NONE="none",xe.FADE="fade",xe.SLIDE_LEFT="slideLeft",xe.SLIDE_RIGHT="slideRight",xe.SLIDE_UP="slideUp",xe.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,(be=exports.AuthType||(exports.AuthType={})).FIREBASE="firebase",be.AWS_COGNITO="aws_cognito",be.AUTH0="auth0",be.JWT_AUTH="jwt_auth",exports.AppAnimates=void 0,(ye=exports.AppAnimates||(exports.AppAnimates={})).SLIDEUPIN="transition.slideUpIn",ye.SLIDEUPOUT="transition.slideUpOut",ye.SLIDEDOWNIN="transition.slideDownIn",ye.SLIDEDOWNOUT="transition.slideDownOut",ye.SLIDELEFTIN="transition.slideLeftIn",ye.SLIDELEFTOUT="transition.slideLeftOut",ye.SLIDERIGHTIN="transition.slideRightIn",ye.SLIDERIGHTOUT="transition.slideRightOut",ye.FADEIN="transition.fadeIn",ye.FADEOUT="transition.fadeOut";var fe,ve;exports.MessageType=void 0,(fe=exports.MessageType||(exports.MessageType={}))[fe.MEDIA=1]="MEDIA",fe[fe.TEXT=2]="TEXT",exports.RoutePermittedRole=void 0,(ve=exports.RoutePermittedRole||(exports.RoutePermittedRole={})).Admin="admin",ve.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.HISD3Button=({variant:t="secondary",...r})=>e.jsx(re,{...ne[t],...r}),exports.HISD3Input=t=>e.jsx(oe,{...t}),exports.HISD3PageBody=K,exports.HISD3PageHeader=({title:r,subtitle:n,breadcrumb:o,extra:i,leading:a,hideTopBar:l=!1,className:s})=>e.jsxs("header",{className:s,children:[!l&&e.jsxs(P,{children:[a,o&&o.length>0&&e.jsx(t.Breadcrumb,{items:o.map((t=>({title:t.href?e.jsx("a",{href:t.href,children:t.title}):t.title,onClick:t.onClick})))}),!o?.length&&e.jsx("span",{style:{flex:1}}),i&&e.jsx(W,{children:i})]}),e.jsxs(G,{children:[e.jsx("h1",{children:r}),n&&e.jsx("p",{children:n})]})]}),exports.HISD3Provider=({primary:o,radius:i,lineWidth:a,overrides:l,theme:s,styledTheme:d={},children:p})=>{const h=r.useMemo((()=>s??c({primary:o,radius:i,lineWidth:a,overrides:l})),[s,o,i,a,l]);return e.jsx(u.Provider,{value:!0,children:e.jsx(t.ConfigProvider,{theme:h,children:e.jsx(n.ThemeProvider,{theme:d,children:e.jsx(t.App,{component:!1,children:p})})})})},exports.HISD3SearchInput=({compact:t=!1,className:r,...n})=>e.jsx(ie,{allowClear:!0,prefix:e.jsx(o.SearchOutlined,{}),className:[t?"hisd3-search-compact":"",r??""].join(" ").trim(),...n}),exports.HISD3Sidebar=({children:i,account:a,logoUrl:l,appName:s,menuItems:d,onLogout:p,pathname:c,avatarSrc:g,styledTheme:u,settingsUrl:m,antdTheme:b,renderMenuLink:y=U,headerExtra:w,userMenuItems:L,onCollapse:j,collapsed:A=!1,loading:O=!1,hideSidebar:R=!1,layoutTop:z=!1,hideCollapseTrigger:B=!1,siderWidth:H=f,bareContent:_=!1,hideHeaderBar:P=!1,brandHref:W="/"})=>{const G=x(),K=void 0===b?G?null:h:b,[q,X]=r.useState(A);r.useEffect((()=>{X(A)}),[A]);const V=r.useMemo((()=>F(d,y)),[d,y]),Y=r.useMemo((()=>((e,t)=>{let r;const n=(e,o)=>{(e??[]).forEach(((e,i)=>{const a=N(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??[]}})(d,c)),[d,c]),[J,Q]=r.useState((()=>Y.openKeys));r.useEffect((()=>{Q((e=>Array.from(new Set([...e,...Y.openKeys]))))}),[Y.openKeys.join("|")]);const Z=e=>{X(e),j?.(e)},ee=Y.selectedKey?[Y.selectedKey]:[],te=e.jsxs(T,{href:W,$collapsed:!z&&q,children:[l?e.jsx("img",{src:l,alt:s}):e.jsx("span",{className:"hisd3-brand-mark","aria-hidden":!0}),(z||!q)&&e.jsx("h1",{children:s})]}),re=_?i:e.jsx(C,{children:i});if("undefined"==typeof document)return null;const ne=e.jsx(t.App,{component:!1,children:e.jsx(t.Spin,{spinning:O,size:"large",children:R?e.jsx(e.Fragment,{children:i}):z?e.jsxs(S,{children:[e.jsxs(D,{children:[te,e.jsx(t.Menu,{mode:"horizontal",items:V,selectedKeys:ee}),w,e.jsx(M,{account:a,avatarSrc:g,settingsUrl:m,onLogout:p,placement:"bottomRight",extraItems:L})]}),re]}):e.jsxs(S,{hasSider:!0,children:[e.jsxs($,{className:"hisd3-sider",width:H,collapsedWidth:v,collapsible:!0,collapsed:q,trigger:null,theme:"light",breakpoint:"lg",onBreakpoint:e=>{e&&Z(!0)},children:[te,e.jsx(I,{className:q?"hisd3-collapsed":void 0,children:e.jsx(t.Menu,{mode:"inline",theme:"light",inlineCollapsed:q,items:V,selectedKeys:ee,openKeys:q?void 0:J,onOpenChange:e=>Q(e)})}),e.jsx(M,{account:a,avatarSrc:g,settingsUrl:m,onLogout:p,collapsed:q,placement:"topRight",extraItems:L})]}),e.jsxs(t.Layout,{style:{background:"transparent"},children:[!P&&e.jsxs(E,{children:[!B&&e.jsx(k,{type:"button","aria-label":q?"Expand menu":"Collapse menu",onClick:()=>Z(!q),children:q?e.jsx(o.MenuUnfoldOutlined,{}):e.jsx(o.MenuFoldOutlined,{})}),e.jsx("span",{style:{flex:1}}),w]}),re]})]})})});return G&&!u?K?e.jsx(t.ConfigProvider,{theme:K,children:ne}):ne:e.jsx(n.ThemeProvider,{theme:u??{},children:K?e.jsx(t.ConfigProvider,{theme:K,children:ne}):ne})},exports.HISD3Table=function({pagination:r,footer:n,...i}){const a=r||void 0,l=a?.pageSizeOptions??[10,20,50];return e.jsxs(q,{children:[e.jsx(t.Table,{...i,pagination:!1}),n&&e.jsx(X,{children:n}),a&&e.jsxs(V,{children:[e.jsx("span",{className:"hisd3-total",children:(a.renderTotal??J)(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,n)=>"prev"===r?e.jsx("span",{className:"ant-pagination-item-link",children:e.jsx(o.LeftOutlined,{})}):"next"===r?e.jsx("span",{className:"ant-pagination-item-link",children:e.jsx(o.RightOutlined,{})}):n}),!a.hidePageSize&&e.jsx(Y,{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(Q,{...r,items:t.map((({count:t,label:r,...n})=>({...n,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:n,...o})=>e.jsx(te,{$variant:t,$tone:r,...o,children:n}),exports.HISD3_COLORS=g,exports.HISD3_FONT_FAMILY=s,exports.HISD3_FONT_WEIGHT_BODY=400,exports.HISD3_FONT_WEIGHT_HEADING=800,exports.HISD3_LAYOUT=m,exports.HISD3_NEUTRALS=l,exports.HISD3_PRESETS=a,exports.UserMenu=M,exports.createHisd3Theme=c,exports.hisd3AntdTheme=h,exports.resolvePrimary=d,exports.tint=p,exports.useInsideHISD3Provider=x;
|
|
587
|
+
`;var ae,le,se,de,pe,ce,he,ge,ue,xe,me,be,ye;exports.ThemeStyle=void 0,(ae=exports.ThemeStyle||(exports.ThemeStyle={})).MODERN="modern",ae.STANDARD="standard",exports.ThemeStyleRadius=void 0,(le=exports.ThemeStyleRadius||(exports.ThemeStyleRadius={})).MODERN="30px",le.STANDARD="16px",exports.ThemeMode=void 0,(se=exports.ThemeMode||(exports.ThemeMode={})).LIGHT="light",se.SEMI_DARK="semi-dark",se.DARK="dark",exports.LayoutType=void 0,(de=exports.LayoutType||(exports.LayoutType={})).FULL_WIDTH="full-width",de.BOXED="boxed",de.FRAMED="framed",exports.MenuStyle=void 0,(pe=exports.MenuStyle||(exports.MenuStyle={})).DEFAULT="default",pe.STANDARD="standard",pe.ROUNDED="rounded",pe.ROUNDED_REVERSE="rounded-reverse",pe.CURVED_MENU="curved-menu",exports.NavStyle=void 0,(ce=exports.NavStyle||(exports.NavStyle={})).DEFAULT="default",ce.MINI="mini",ce.MINI_SIDEBAR_TOGGLE="mini-sidebar-toggle",ce.STANDARD="standard",ce.HEADER_USER="user-header",ce.HEADER_USER_MINI="user-mini-header",ce.DRAWER="drawer",ce.BIT_BUCKET="bit-bucket",ce.H_DEFAULT="h-default",ce.HOR_HEADER_FIXED="hor-header-fixed",ce.HOR_DARK_LAYOUT="hor-dark-layout",exports.FooterType=void 0,(he=exports.FooterType||(exports.FooterType={})).FIXED="fixed",he.FLUID="fluid",exports.LayoutDirection=void 0,(ge=exports.LayoutDirection||(exports.LayoutDirection={})).RTL="rtl",ge.LTR="ltr",exports.HeaderType=void 0,(ue=exports.HeaderType||(exports.HeaderType={})).DARK="dark",ue.LIGHT="light",exports.RouteTransition=void 0,(xe=exports.RouteTransition||(exports.RouteTransition={})).NONE="none",xe.FADE="fade",xe.SLIDE_LEFT="slideLeft",xe.SLIDE_RIGHT="slideRight",xe.SLIDE_UP="slideUp",xe.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,(be=exports.AuthType||(exports.AuthType={})).FIREBASE="firebase",be.AWS_COGNITO="aws_cognito",be.AUTH0="auth0",be.JWT_AUTH="jwt_auth",exports.AppAnimates=void 0,(ye=exports.AppAnimates||(exports.AppAnimates={})).SLIDEUPIN="transition.slideUpIn",ye.SLIDEUPOUT="transition.slideUpOut",ye.SLIDEDOWNIN="transition.slideDownIn",ye.SLIDEDOWNOUT="transition.slideDownOut",ye.SLIDELEFTIN="transition.slideLeftIn",ye.SLIDELEFTOUT="transition.slideLeftOut",ye.SLIDERIGHTIN="transition.slideRightIn",ye.SLIDERIGHTOUT="transition.slideRightOut",ye.FADEIN="transition.fadeIn",ye.FADEOUT="transition.fadeOut";var fe,ve;exports.MessageType=void 0,(fe=exports.MessageType||(exports.MessageType={}))[fe.MEDIA=1]="MEDIA",fe[fe.TEXT=2]="TEXT",exports.RoutePermittedRole=void 0,(ve=exports.RoutePermittedRole||(exports.RoutePermittedRole={})).Admin="admin",ve.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.HISD3Button=({variant:t="secondary",...n})=>e.jsx(ne,{...oe[t],...n}),exports.HISD3Input=t=>e.jsx(re,{...t}),exports.HISD3PageBody=K,exports.HISD3PageHeader=({title:n,subtitle:o,breadcrumb:r,extra:i,leading:a,hideTopBar:l=!1,className:s})=>e.jsxs("header",{className:s,children:[!l&&e.jsxs(P,{children:[a,r&&r.length>0&&e.jsx(t.Breadcrumb,{items:r.map((t=>({title:t.href?e.jsx("a",{href:t.href,children:t.title}):t.title,onClick:t.onClick})))}),!r?.length&&e.jsx("span",{style:{flex:1}}),i&&e.jsx(W,{children:i})]}),e.jsxs(G,{children:[e.jsx("h1",{children:n}),o&&e.jsx("p",{children:o})]})]}),exports.HISD3Provider=({primary:r,radius:i,lineWidth:a,overrides:l,theme:s,styledTheme:d={},children:p})=>{const h=n.useMemo((()=>s??c({primary:r,radius:i,lineWidth:a,overrides:l})),[s,r,i,a,l]);return e.jsx(u.Provider,{value:!0,children:e.jsx(t.ConfigProvider,{theme:h,children:e.jsx(o.ThemeProvider,{theme:d,children:e.jsx(t.App,{component:!1,children:p})})})})},exports.HISD3SearchInput=({compact:t=!1,className:n,...o})=>e.jsx(ie,{allowClear:!0,prefix:e.jsx(r.SearchOutlined,{}),className:[t?"hisd3-search-compact":"",n??""].join(" ").trim(),...o}),exports.HISD3Sidebar=({children:i,account:a,logoUrl:l,appName:s,menuItems:d,onLogout:p,pathname:c,avatarSrc:g,styledTheme:u,settingsUrl:m,antdTheme:b,renderMenuLink:y=U,headerExtra:w,userMenuItems:L,onCollapse:j,collapsed:A=!1,loading:z=!1,hideSidebar:O=!1,layoutTop:R=!1,hideCollapseTrigger:F=!1,siderWidth:B=f,bareContent:_=!1,hideHeaderBar:P=!1,brandHref:W="/"})=>{const G=x(),K=void 0===b?G?null:h:b,[q,X]=n.useState(A);n.useEffect((()=>{X(A)}),[A]);const V=n.useMemo((()=>N(d,y)),[d,y]),Y=n.useMemo((()=>((e,t)=>{let n;const o=(e,r)=>{(e??[]).forEach(((e,i)=>{const a=H(e,i);if(e.path&&t.startsWith(e.path)){const o=t===e.path,i=e.path.length+(o?1:0);(!n||i>n.length)&&(n={key:a,parents:r,length:i})}e.children?.length&&o(e.children,[...r,a])}))};return o(e,[]),{selectedKey:n?.key,openKeys:n?.parents??[]}})(d,c)),[d,c]),[J,Q]=n.useState((()=>Y.openKeys));n.useEffect((()=>{Q((e=>Array.from(new Set([...e,...Y.openKeys]))))}),[Y.openKeys.join("|")]);const Z=e=>{X(e),j?.(e)},ee=Y.selectedKey?[Y.selectedKey]:[],te=e.jsxs(T,{href:W,$collapsed:!R&&q,children:[l?e.jsx("img",{src:l,alt:s}):e.jsx("span",{className:"hisd3-brand-mark","aria-hidden":!0}),(R||!q)&&e.jsx("h1",{children:s})]}),ne=_?i:e.jsx(C,{children:i});if("undefined"==typeof document)return null;const oe=e.jsx(t.App,{component:!1,children:e.jsx(t.Spin,{spinning:z,size:"large",children:O?e.jsx(e.Fragment,{children:i}):R?e.jsxs(S,{children:[e.jsxs(D,{children:[te,e.jsx(t.Menu,{mode:"horizontal",items:V,selectedKeys:ee}),w,e.jsx(M,{account:a,avatarSrc:g,settingsUrl:m,onLogout:p,placement:"bottomRight",extraItems:L})]}),ne]}):e.jsxs(S,{hasSider:!0,children:[e.jsxs($,{className:"hisd3-sider",width:B,collapsedWidth:v,collapsible:!0,collapsed:q,trigger:null,theme:"light",breakpoint:"lg",onBreakpoint:e=>{e&&Z(!0)},children:[te,e.jsx(I,{className:q?"hisd3-collapsed":void 0,children:e.jsx(t.Menu,{mode:"inline",theme:"light",inlineCollapsed:q,items:V,selectedKeys:ee,openKeys:q?void 0:J,onOpenChange:e=>Q(e)})}),e.jsx(M,{account:a,avatarSrc:g,settingsUrl:m,onLogout:p,collapsed:q,placement:"topRight",extraItems:L})]}),e.jsxs(t.Layout,{style:{background:"transparent"},children:[!P&&e.jsxs(E,{children:[!F&&e.jsx(k,{type:"button","aria-label":q?"Expand menu":"Collapse menu",onClick:()=>Z(!q),children:q?e.jsx(r.MenuUnfoldOutlined,{}):e.jsx(r.MenuFoldOutlined,{})}),e.jsx("span",{style:{flex:1}}),w]}),ne]})]})})});return G&&!u?K?e.jsx(t.ConfigProvider,{theme:K,children:oe}):oe:e.jsx(o.ThemeProvider,{theme:u??{},children:K?e.jsx(t.ConfigProvider,{theme:K,children:oe}):oe})},exports.HISD3Table=function({pagination:n,footer:o,...i}){const a=n||void 0,l=a?.pageSizeOptions??[10,20,50];return e.jsxs(q,{children:[e.jsx(t.Table,{...i,pagination:!1}),o&&e.jsx(X,{children:o}),a&&e.jsxs(V,{children:[e.jsx("span",{className:"hisd3-total",children:(a.renderTotal??J)(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,n,o)=>"prev"===n?e.jsx("span",{className:"ant-pagination-item-link",children:e.jsx(r.LeftOutlined,{})}):"next"===n?e.jsx("span",{className:"ant-pagination-item-link",children:e.jsx(r.RightOutlined,{})}):o}),!a.hidePageSize&&e.jsx(Y,{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,...n})=>e.jsx(Q,{...n,items:t.map((({count:t,label:n,...o})=>({...o,label:e.jsxs(e.Fragment,{children:[n,void 0!==t&&e.jsx("span",{className:"hisd3-tab-count",children:t})]})})))}),exports.HISD3Tag=({variant:t="neutral",tone:n=("neutral"===t?"default":"primary"),children:o,...r})=>e.jsx(te,{$variant:t,$tone:n,...r,children:o}),exports.HISD3_COLORS=g,exports.HISD3_FONT_FAMILY=s,exports.HISD3_FONT_WEIGHT_BODY=400,exports.HISD3_FONT_WEIGHT_HEADING=800,exports.HISD3_LAYOUT=m,exports.HISD3_NEUTRALS=l,exports.HISD3_PRESETS=a,exports.UserMenu=M,exports.createHisd3Theme=c,exports.hisd3AntdTheme=h,exports.resolvePrimary=d,exports.tint=p,exports.useInsideHISD3Provider=x;
|
|
587
588
|
//# sourceMappingURL=index.cjs.js.map
|