hisd3-ui-kit 4.0.1 → 4.2.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 +49 -9
- package/dist/index.cjs.js +400 -89
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +123 -10
- package/dist/index.js +401 -90
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("antd"),
|
|
2
|
-
min-height: 100vh;
|
|
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,I=o(t.Layout)`
|
|
3
2
|
background: var(--ant-color-bg-layout);
|
|
4
3
|
|
|
4
|
+
/*
|
|
5
|
+
* App-shell mode: the shell is exactly one viewport tall and never scrolls,
|
|
6
|
+
* so the document has no scrollbar and cannot rubber-band. The content
|
|
7
|
+
* column (StyledMain) is the scroller instead.
|
|
8
|
+
*/
|
|
9
|
+
${({$appShell:e})=>e?"height: 100vh; max-height: 100vh; overflow: hidden;":"min-height: 100vh;"}
|
|
10
|
+
|
|
5
11
|
/*
|
|
6
12
|
* The Sider is rendered as a plain antd <Sider> (not styled(Sider)) because
|
|
7
13
|
* styled-components would swallow its \`theme\` prop; style it from here.
|
|
@@ -9,10 +15,10 @@
|
|
|
9
15
|
> .ant-layout-sider.hisd3-sider {
|
|
10
16
|
position: sticky;
|
|
11
17
|
top: 0;
|
|
12
|
-
height: 100vh;
|
|
18
|
+
height: ${({$appShell:e})=>e?"100%":"100vh"};
|
|
13
19
|
overflow: hidden;
|
|
14
20
|
background: var(--ant-color-bg-layout);
|
|
15
|
-
border-right:
|
|
21
|
+
border-right: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
16
22
|
|
|
17
23
|
.ant-layout-sider-children {
|
|
18
24
|
display: flex;
|
|
@@ -20,11 +26,17 @@
|
|
|
20
26
|
height: 100%;
|
|
21
27
|
}
|
|
22
28
|
}
|
|
23
|
-
`,
|
|
29
|
+
`,j=o(t.Layout)`
|
|
30
|
+
background: transparent;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
|
|
33
|
+
${({$scroll:e})=>e?"\n height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n /* keep scroll chaining (and its bounce) out of the document */\n overscroll-behavior: contain;\n ":""}
|
|
34
|
+
`,T=o.div`
|
|
24
35
|
flex: 1 1 auto;
|
|
25
36
|
overflow-y: auto;
|
|
26
37
|
overflow-x: hidden;
|
|
27
|
-
|
|
38
|
+
overscroll-behavior: contain;
|
|
39
|
+
padding-top: 4px;
|
|
28
40
|
|
|
29
41
|
.ant-menu-inline,
|
|
30
42
|
.ant-menu-vertical {
|
|
@@ -34,7 +46,7 @@
|
|
|
34
46
|
|
|
35
47
|
/* Section titles: "RECEIVABLES AND COLLECTIONS" */
|
|
36
48
|
.ant-menu-item-group-title {
|
|
37
|
-
padding:
|
|
49
|
+
padding: 16px ${a.pageGutter}px 4px;
|
|
38
50
|
font-size: 11px;
|
|
39
51
|
font-weight: 600;
|
|
40
52
|
letter-spacing: 0.14em;
|
|
@@ -44,7 +56,7 @@
|
|
|
44
56
|
|
|
45
57
|
.ant-menu-item-group + .ant-menu-item-group > .ant-menu-item-group-title,
|
|
46
58
|
.ant-menu-item-group + .ant-menu-item-group::before {
|
|
47
|
-
border-top:
|
|
59
|
+
border-top: var(--hisd3-rule-width, 1px) solid var(--ant-color-border-secondary);
|
|
48
60
|
margin-top: 10px;
|
|
49
61
|
padding-top: 20px;
|
|
50
62
|
}
|
|
@@ -95,23 +107,23 @@
|
|
|
95
107
|
&.hisd3-collapsed .ant-menu-item-group-title {
|
|
96
108
|
display: none;
|
|
97
109
|
}
|
|
98
|
-
`,
|
|
110
|
+
`,D=o.a`
|
|
99
111
|
display: flex;
|
|
100
112
|
align-items: center;
|
|
101
|
-
gap:
|
|
102
|
-
height: ${
|
|
103
|
-
padding: 0 ${({$collapsed:e})=>e?
|
|
113
|
+
gap: 10px;
|
|
114
|
+
height: ${k}px;
|
|
115
|
+
padding: 0 ${({$collapsed:e})=>e?12:a.pageGutter}px;
|
|
104
116
|
justify-content: ${({$collapsed:e})=>e?"center":"flex-start"};
|
|
105
117
|
color: inherit;
|
|
106
118
|
text-decoration: none;
|
|
107
119
|
overflow: hidden;
|
|
108
120
|
white-space: nowrap;
|
|
109
121
|
flex: 0 0 auto;
|
|
110
|
-
border-bottom:
|
|
122
|
+
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
111
123
|
|
|
112
124
|
.hisd3-brand-mark {
|
|
113
|
-
width:
|
|
114
|
-
height:
|
|
125
|
+
width: 28px;
|
|
126
|
+
height: 28px;
|
|
115
127
|
flex: 0 0 auto;
|
|
116
128
|
background: var(--ant-color-primary);
|
|
117
129
|
display: flex;
|
|
@@ -120,8 +132,8 @@
|
|
|
120
132
|
}
|
|
121
133
|
|
|
122
134
|
img {
|
|
123
|
-
height:
|
|
124
|
-
width:
|
|
135
|
+
height: 28px;
|
|
136
|
+
width: 28px;
|
|
125
137
|
object-fit: contain;
|
|
126
138
|
flex: 0 0 auto;
|
|
127
139
|
}
|
|
@@ -129,7 +141,7 @@
|
|
|
129
141
|
h1 {
|
|
130
142
|
margin: 0;
|
|
131
143
|
font-family: var(--font-heading);
|
|
132
|
-
font-size:
|
|
144
|
+
font-size: 16px;
|
|
133
145
|
font-weight: var(--font-weight-heading, 800);
|
|
134
146
|
letter-spacing: 0.04em;
|
|
135
147
|
text-transform: uppercase;
|
|
@@ -137,47 +149,49 @@
|
|
|
137
149
|
overflow: hidden;
|
|
138
150
|
text-overflow: ellipsis;
|
|
139
151
|
}
|
|
140
|
-
`,
|
|
152
|
+
`,E=o(y)`
|
|
141
153
|
display: flex;
|
|
142
154
|
align-items: center;
|
|
143
155
|
gap: 24px;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
156
|
+
flex: 0 0 ${k}px;
|
|
157
|
+
height: ${k}px;
|
|
158
|
+
line-height: ${k}px;
|
|
159
|
+
padding: 0 ${a.pageGutter}px;
|
|
147
160
|
position: sticky;
|
|
148
161
|
top: 0;
|
|
149
162
|
z-index: 100;
|
|
150
163
|
background: var(--ant-color-bg-layout);
|
|
151
|
-
border-bottom:
|
|
164
|
+
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
152
165
|
|
|
153
166
|
.ant-menu-horizontal {
|
|
154
167
|
flex: 1 1 auto;
|
|
155
168
|
min-width: 0;
|
|
156
169
|
border-bottom: none;
|
|
157
170
|
background: transparent;
|
|
158
|
-
line-height: ${
|
|
171
|
+
line-height: ${k-2}px;
|
|
159
172
|
font-size: 14px;
|
|
160
173
|
font-weight: 500;
|
|
161
174
|
}
|
|
162
|
-
`,
|
|
175
|
+
`,C=o(y)`
|
|
163
176
|
display: flex;
|
|
164
177
|
align-items: center;
|
|
165
|
-
gap:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
178
|
+
gap: 12px;
|
|
179
|
+
flex: 0 0 ${k}px;
|
|
180
|
+
height: ${k}px;
|
|
181
|
+
line-height: ${k}px;
|
|
182
|
+
padding: 0 ${a.pageGutter}px;
|
|
169
183
|
position: sticky;
|
|
170
184
|
top: 0;
|
|
171
185
|
z-index: 99;
|
|
172
186
|
background: var(--ant-color-bg-layout);
|
|
173
|
-
border-bottom:
|
|
174
|
-
|
|
175
|
-
border:
|
|
187
|
+
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
188
|
+
`,$=o.button`
|
|
189
|
+
border: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
176
190
|
background: transparent;
|
|
177
191
|
cursor: pointer;
|
|
178
|
-
font-size:
|
|
179
|
-
width:
|
|
180
|
-
height:
|
|
192
|
+
font-size: 14px;
|
|
193
|
+
width: 32px;
|
|
194
|
+
height: 32px;
|
|
181
195
|
color: inherit;
|
|
182
196
|
display: inline-flex;
|
|
183
197
|
align-items: center;
|
|
@@ -187,9 +201,9 @@
|
|
|
187
201
|
&:hover {
|
|
188
202
|
background: rgba(0, 0, 0, 0.05);
|
|
189
203
|
}
|
|
190
|
-
`,
|
|
191
|
-
|
|
192
|
-
|
|
204
|
+
`,z=o(v)`
|
|
205
|
+
flex: 1 0 auto;
|
|
206
|
+
padding: 24px ${a.pageGutter}px 40px;
|
|
193
207
|
`,L=o.div`
|
|
194
208
|
flex: 0 0 auto;
|
|
195
209
|
display: flex;
|
|
@@ -197,40 +211,40 @@
|
|
|
197
211
|
justify-content: center;
|
|
198
212
|
line-height: 1.25;
|
|
199
213
|
transition: all 0.2s ease;
|
|
200
|
-
padding: ${({$inHeader:e,$collapsed:t})=>e?"0 4px":t?"
|
|
214
|
+
padding: ${({$inHeader:e,$collapsed:t})=>e?"0 4px":t?"12px 0":`12px ${a.pageGutter}px`};
|
|
201
215
|
min-width: ${({$inHeader:e})=>e?"220px":"0"};
|
|
202
|
-
border-top: ${({$inHeader:e})=>e?"none":"
|
|
216
|
+
border-top: ${({$inHeader:e})=>e?"none":"var(--hisd3-rule-width, 1px) solid var(--ant-color-border)"};
|
|
203
217
|
|
|
204
218
|
& .ant-dropdown-link {
|
|
205
219
|
color: inherit;
|
|
206
220
|
}
|
|
207
|
-
`,
|
|
221
|
+
`,A=o.a`
|
|
208
222
|
display: flex;
|
|
209
223
|
align-items: center;
|
|
210
224
|
justify-content: center;
|
|
211
225
|
cursor: pointer;
|
|
212
226
|
color: inherit;
|
|
213
|
-
gap:
|
|
214
|
-
`,
|
|
215
|
-
width:
|
|
216
|
-
height:
|
|
227
|
+
gap: 10px;
|
|
228
|
+
`,N=o.span`
|
|
229
|
+
width: 34px;
|
|
230
|
+
height: 34px;
|
|
217
231
|
flex: 0 0 auto;
|
|
218
232
|
display: flex;
|
|
219
233
|
align-items: center;
|
|
220
234
|
justify-content: center;
|
|
221
|
-
font-size:
|
|
235
|
+
font-size: 13px;
|
|
222
236
|
font-weight: 700;
|
|
223
237
|
color: var(--ant-color-text);
|
|
224
238
|
background: ${({$src:e})=>e?`center / cover no-repeat url("${e}")`:"#D9D6D2"};
|
|
225
|
-
`,
|
|
239
|
+
`,O=o.span`
|
|
226
240
|
flex: 1 1 auto;
|
|
227
241
|
min-width: 0;
|
|
228
|
-
`,
|
|
242
|
+
`,R=o.span`
|
|
229
243
|
display: flex;
|
|
230
244
|
align-items: flex-start;
|
|
231
245
|
justify-content: space-between;
|
|
232
246
|
gap: 8px;
|
|
233
|
-
`,
|
|
247
|
+
`,B=o.h3`
|
|
234
248
|
margin: 0;
|
|
235
249
|
font-family: var(--font-body);
|
|
236
250
|
font-size: 14px;
|
|
@@ -242,7 +256,7 @@
|
|
|
242
256
|
display: -webkit-box;
|
|
243
257
|
-webkit-line-clamp: 2;
|
|
244
258
|
-webkit-box-orient: vertical;
|
|
245
|
-
`,
|
|
259
|
+
`,H=o.span`
|
|
246
260
|
width: 20px;
|
|
247
261
|
height: 22px;
|
|
248
262
|
display: flex;
|
|
@@ -254,7 +268,7 @@
|
|
|
254
268
|
& svg {
|
|
255
269
|
display: block;
|
|
256
270
|
}
|
|
257
|
-
`,
|
|
271
|
+
`,F=o.span`
|
|
258
272
|
display: block;
|
|
259
273
|
margin-top: 3px;
|
|
260
274
|
font-size: 11px;
|
|
@@ -265,13 +279,17 @@
|
|
|
265
279
|
overflow: hidden;
|
|
266
280
|
text-overflow: ellipsis;
|
|
267
281
|
white-space: nowrap;
|
|
268
|
-
`,
|
|
282
|
+
`,M=(e,t)=>e.key??e.path??`menu-${t}`,U=(e,t)=>(e??[]).filter((e=>e&&!e.hideInMenu)).map(((e,r)=>{const o=M(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:U(e.children,t)}:{key:o,icon:e.icon,disabled:e.disabled,label:t(e,e.name)}})),_=(e,t)=>r.createElement("a",{href:e.path||"/"},t),P=({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(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(A,{className:"ant-dropdown-link",onClick:e=>e.preventDefault(),children:[e.jsx(N,{$src:o,"aria-hidden":!0,children:!o&&h}),!l&&e.jsxs(O,{children:[e.jsxs(R,{children:[e.jsx(B,{title:r.fullName,children:r.fullName}),e.jsx(H,{children:e.jsx(n.DownOutlined,{})})]}),r.positionType&&e.jsx(F,{title:r.positionType,children:r.positionType})]})]})})})},{Sider:G}=t.Layout,W=a.pageGutter,K=o.header`
|
|
283
|
+
display: contents;
|
|
284
|
+
`,q=o.div`
|
|
269
285
|
display: flex;
|
|
270
286
|
align-items: center;
|
|
271
|
-
gap:
|
|
272
|
-
height: ${
|
|
273
|
-
|
|
274
|
-
|
|
287
|
+
gap: 16px;
|
|
288
|
+
height: ${a.topBarHeight}px; /* same as the sidebar brand block */
|
|
289
|
+
/* never shrink: these are flex items of the scrolling column */
|
|
290
|
+
flex: 0 0 ${a.topBarHeight}px;
|
|
291
|
+
padding: 0 ${W}px;
|
|
292
|
+
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
275
293
|
background: var(--ant-color-bg-layout);
|
|
276
294
|
position: sticky;
|
|
277
295
|
top: 0;
|
|
@@ -286,24 +304,25 @@
|
|
|
286
304
|
.ant-breadcrumb ol {
|
|
287
305
|
flex-wrap: nowrap;
|
|
288
306
|
}
|
|
289
|
-
`,
|
|
307
|
+
`,X=o.div`
|
|
290
308
|
display: flex;
|
|
291
309
|
align-items: center;
|
|
292
|
-
gap:
|
|
310
|
+
gap: 10px;
|
|
293
311
|
flex: 0 0 auto;
|
|
294
|
-
`,
|
|
312
|
+
`,V=o.div`
|
|
295
313
|
display: flex;
|
|
296
314
|
align-items: baseline;
|
|
297
|
-
gap:
|
|
315
|
+
gap: 16px;
|
|
298
316
|
flex-wrap: wrap;
|
|
299
|
-
|
|
300
|
-
|
|
317
|
+
flex: 0 0 auto;
|
|
318
|
+
padding: 20px ${W}px 18px;
|
|
319
|
+
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border-secondary);
|
|
301
320
|
|
|
302
321
|
h1 {
|
|
303
322
|
margin: 0;
|
|
304
323
|
font-family: var(--font-heading);
|
|
305
|
-
font-size:
|
|
306
|
-
line-height: 1.
|
|
324
|
+
font-size: 32px;
|
|
325
|
+
line-height: 1.1;
|
|
307
326
|
font-weight: var(--font-weight-heading, 800);
|
|
308
327
|
letter-spacing: -0.02em;
|
|
309
328
|
color: var(--ant-color-text);
|
|
@@ -311,12 +330,304 @@
|
|
|
311
330
|
|
|
312
331
|
p {
|
|
313
332
|
margin: 0;
|
|
314
|
-
font-size:
|
|
333
|
+
font-size: 15px;
|
|
315
334
|
color: var(--ant-color-text-secondary);
|
|
316
335
|
}
|
|
317
|
-
`,
|
|
318
|
-
|
|
319
|
-
|
|
336
|
+
`,Y=o.div`
|
|
337
|
+
flex: 1 0 auto;
|
|
338
|
+
padding: 24px ${W}px 40px;
|
|
339
|
+
`,J=o.button`
|
|
340
|
+
position: relative;
|
|
341
|
+
width: ${({$size:e=40})=>e}px;
|
|
342
|
+
height: ${({$size:e=40})=>e}px;
|
|
343
|
+
flex: 0 0 auto;
|
|
344
|
+
display: inline-flex;
|
|
345
|
+
align-items: center;
|
|
346
|
+
justify-content: center;
|
|
347
|
+
padding: 0;
|
|
348
|
+
font-size: ${({$size:e=40})=>Math.round(.45*e)}px;
|
|
349
|
+
line-height: 1;
|
|
350
|
+
color: var(--ant-color-text);
|
|
351
|
+
background: var(--hisd3-control-bg, #e6e4e1);
|
|
352
|
+
border: 0;
|
|
353
|
+
border-radius: 50%;
|
|
354
|
+
cursor: pointer;
|
|
355
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
356
|
+
|
|
357
|
+
&:hover {
|
|
358
|
+
background: var(--hisd3-control-bg-hover, #dbd8d4);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/* open state: tinted with the app's primary, like Facebook's blue */
|
|
362
|
+
&[aria-expanded="true"] {
|
|
363
|
+
background: var(--ant-color-primary-bg);
|
|
364
|
+
color: var(--ant-color-primary);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
&:focus-visible {
|
|
368
|
+
outline: 2px solid var(--ant-color-primary);
|
|
369
|
+
outline-offset: 2px;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.ant-badge {
|
|
373
|
+
color: inherit;
|
|
374
|
+
line-height: 0;
|
|
375
|
+
}
|
|
376
|
+
`,Q=o.div`
|
|
377
|
+
width: 360px;
|
|
378
|
+
max-width: calc(100vw - 32px);
|
|
379
|
+
overflow: hidden;
|
|
380
|
+
background: var(--ant-color-bg-elevated);
|
|
381
|
+
border: 1px solid var(--ant-color-border-secondary);
|
|
382
|
+
border-radius: var(--hisd3-popup-radius, 10px);
|
|
383
|
+
box-shadow: 0 2px 6px rgba(16, 15, 14, 0.06),
|
|
384
|
+
0 12px 32px rgba(16, 15, 14, 0.14);
|
|
385
|
+
`,Z=o.div`
|
|
386
|
+
display: flex;
|
|
387
|
+
align-items: center;
|
|
388
|
+
justify-content: space-between;
|
|
389
|
+
gap: 12px;
|
|
390
|
+
padding: 12px 16px;
|
|
391
|
+
border-bottom: 1px solid var(--ant-color-border-secondary);
|
|
392
|
+
|
|
393
|
+
h4 {
|
|
394
|
+
margin: 0;
|
|
395
|
+
font-size: 15px;
|
|
396
|
+
font-weight: 700;
|
|
397
|
+
letter-spacing: 0;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
button {
|
|
401
|
+
border: 0;
|
|
402
|
+
background: none;
|
|
403
|
+
padding: 0;
|
|
404
|
+
font: inherit;
|
|
405
|
+
font-size: 13px;
|
|
406
|
+
color: var(--ant-color-primary);
|
|
407
|
+
cursor: pointer;
|
|
408
|
+
|
|
409
|
+
&:hover {
|
|
410
|
+
text-decoration: underline;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
`,ee=o.div`
|
|
414
|
+
max-height: 380px;
|
|
415
|
+
overflow-y: auto;
|
|
416
|
+
`,te=o.button`
|
|
417
|
+
display: flex;
|
|
418
|
+
align-items: flex-start;
|
|
419
|
+
gap: 12px;
|
|
420
|
+
width: 100%;
|
|
421
|
+
padding: 12px 16px;
|
|
422
|
+
text-align: left;
|
|
423
|
+
font: inherit;
|
|
424
|
+
border: 0;
|
|
425
|
+
cursor: pointer;
|
|
426
|
+
background: ${({$unread:e})=>e?"var(--ant-color-primary-bg)":"transparent"};
|
|
427
|
+
|
|
428
|
+
&:hover {
|
|
429
|
+
background: ${({$unread:e})=>e?"var(--ant-color-primary-bg-hover)":"rgba(0,0,0,0.04)"};
|
|
430
|
+
}
|
|
431
|
+
`,re=o.span`
|
|
432
|
+
width: 36px;
|
|
433
|
+
height: 36px;
|
|
434
|
+
flex: 0 0 auto;
|
|
435
|
+
display: flex;
|
|
436
|
+
align-items: center;
|
|
437
|
+
justify-content: center;
|
|
438
|
+
font-size: 16px;
|
|
439
|
+
color: var(--ant-color-text);
|
|
440
|
+
border-radius: 50%;
|
|
441
|
+
background: ${({$src:e})=>e?`center / cover no-repeat url("${e}")`:"rgba(0,0,0,0.06)"};
|
|
442
|
+
`,oe=o.span`
|
|
443
|
+
flex: 1 1 auto;
|
|
444
|
+
min-width: 0;
|
|
445
|
+
|
|
446
|
+
strong {
|
|
447
|
+
display: block;
|
|
448
|
+
font-size: 14px;
|
|
449
|
+
font-weight: 600;
|
|
450
|
+
color: var(--ant-color-text);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
span {
|
|
454
|
+
display: block;
|
|
455
|
+
font-size: 13px;
|
|
456
|
+
color: var(--ant-color-text-secondary);
|
|
457
|
+
overflow: hidden;
|
|
458
|
+
text-overflow: ellipsis;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
time {
|
|
462
|
+
display: block;
|
|
463
|
+
margin-top: 2px;
|
|
464
|
+
font-size: 12px;
|
|
465
|
+
color: var(--ant-color-text-tertiary);
|
|
466
|
+
}
|
|
467
|
+
`,ne=o.span`
|
|
468
|
+
width: 8px;
|
|
469
|
+
height: 8px;
|
|
470
|
+
margin-top: 6px;
|
|
471
|
+
flex: 0 0 auto;
|
|
472
|
+
border-radius: 50%;
|
|
473
|
+
background: var(--ant-color-primary);
|
|
474
|
+
`,ie=o.button`
|
|
475
|
+
display: block;
|
|
476
|
+
width: 100%;
|
|
477
|
+
padding: 12px 16px;
|
|
478
|
+
font: inherit;
|
|
479
|
+
font-size: 13px;
|
|
480
|
+
font-weight: 600;
|
|
481
|
+
color: var(--ant-color-primary);
|
|
482
|
+
text-align: center;
|
|
483
|
+
background: transparent;
|
|
484
|
+
border: 0;
|
|
485
|
+
border-top: 1px solid var(--ant-color-border-secondary);
|
|
486
|
+
cursor: pointer;
|
|
487
|
+
|
|
488
|
+
&:hover {
|
|
489
|
+
background: rgba(0, 0, 0, 0.04);
|
|
490
|
+
}
|
|
491
|
+
`,ae=o.div`
|
|
492
|
+
padding: 28px 16px;
|
|
493
|
+
`,le=o.button`
|
|
494
|
+
position: relative;
|
|
495
|
+
width: ${({$size:e})=>e}px;
|
|
496
|
+
height: ${({$size:e})=>e}px;
|
|
497
|
+
flex: 0 0 auto;
|
|
498
|
+
padding: 0;
|
|
499
|
+
display: inline-flex;
|
|
500
|
+
align-items: center;
|
|
501
|
+
justify-content: center;
|
|
502
|
+
font-size: ${({$size:e})=>Math.round(.36*e)}px;
|
|
503
|
+
font-weight: 700;
|
|
504
|
+
color: var(--ant-color-text);
|
|
505
|
+
background: var(--hisd3-control-bg, #e6e4e1);
|
|
506
|
+
border: 0;
|
|
507
|
+
border-radius: ${({$shape:e})=>"circle"===e?"50%":"0"};
|
|
508
|
+
cursor: pointer;
|
|
509
|
+
transition: filter 0.15s ease;
|
|
510
|
+
|
|
511
|
+
&:hover {
|
|
512
|
+
filter: brightness(0.94);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
&:focus-visible {
|
|
516
|
+
outline: 2px solid var(--ant-color-primary);
|
|
517
|
+
outline-offset: 2px;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
img {
|
|
521
|
+
width: 100%;
|
|
522
|
+
height: 100%;
|
|
523
|
+
object-fit: cover;
|
|
524
|
+
display: block;
|
|
525
|
+
border-radius: inherit;
|
|
526
|
+
}
|
|
527
|
+
`,se=o.span`
|
|
528
|
+
position: absolute;
|
|
529
|
+
right: ${({$size:e})=>-Math.round(.05*e)}px;
|
|
530
|
+
bottom: ${({$size:e})=>-Math.round(.05*e)}px;
|
|
531
|
+
width: ${({$size:e})=>Math.round(.45*e)}px;
|
|
532
|
+
height: ${({$size:e})=>Math.round(.45*e)}px;
|
|
533
|
+
display: flex;
|
|
534
|
+
align-items: center;
|
|
535
|
+
justify-content: center;
|
|
536
|
+
font-size: ${({$size:e})=>Math.round(.2*e)}px;
|
|
537
|
+
color: var(--ant-color-text);
|
|
538
|
+
background: var(--hisd3-control-bg, #e6e4e1);
|
|
539
|
+
border: 2px solid var(--ant-color-bg-layout, #f3f2f0);
|
|
540
|
+
border-radius: 50%;
|
|
541
|
+
pointer-events: none;
|
|
542
|
+
|
|
543
|
+
${le}[aria-expanded="true"] & {
|
|
544
|
+
background: var(--ant-color-primary);
|
|
545
|
+
color: #fff;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
& svg {
|
|
549
|
+
display: block;
|
|
550
|
+
}
|
|
551
|
+
`,de=o.div`
|
|
552
|
+
display: flex;
|
|
553
|
+
align-items: center;
|
|
554
|
+
gap: 12px;
|
|
555
|
+
padding: 12px 16px;
|
|
556
|
+
min-width: 230px;
|
|
557
|
+
border-bottom: 1px solid var(--ant-color-border-secondary);
|
|
558
|
+
|
|
559
|
+
.hisd3-identity-text {
|
|
560
|
+
flex: 1 1 auto;
|
|
561
|
+
min-width: 0;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.hisd3-identity-name {
|
|
565
|
+
display: block;
|
|
566
|
+
font-size: 14px;
|
|
567
|
+
font-weight: 700;
|
|
568
|
+
color: var(--ant-color-text);
|
|
569
|
+
white-space: nowrap;
|
|
570
|
+
overflow: hidden;
|
|
571
|
+
text-overflow: ellipsis;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.hisd3-identity-role {
|
|
575
|
+
display: block;
|
|
576
|
+
margin-top: 2px;
|
|
577
|
+
font-size: 11px;
|
|
578
|
+
font-weight: 500;
|
|
579
|
+
letter-spacing: 0.1em;
|
|
580
|
+
text-transform: uppercase;
|
|
581
|
+
color: var(--ant-color-text-tertiary);
|
|
582
|
+
white-space: nowrap;
|
|
583
|
+
overflow: hidden;
|
|
584
|
+
text-overflow: ellipsis;
|
|
585
|
+
}
|
|
586
|
+
`,pe=o.span`
|
|
587
|
+
width: 40px;
|
|
588
|
+
height: 40px;
|
|
589
|
+
flex: 0 0 auto;
|
|
590
|
+
display: flex;
|
|
591
|
+
align-items: center;
|
|
592
|
+
justify-content: center;
|
|
593
|
+
font-size: 14px;
|
|
594
|
+
font-weight: 700;
|
|
595
|
+
border-radius: 50%;
|
|
596
|
+
background: ${({$src:e})=>e?`center / cover no-repeat url("${e}")`:"rgba(0,0,0,0.08)"};
|
|
597
|
+
`,ce=o.div`
|
|
598
|
+
overflow: hidden;
|
|
599
|
+
background: var(--ant-color-bg-elevated);
|
|
600
|
+
border: 1px solid var(--ant-color-border-secondary);
|
|
601
|
+
border-radius: var(--hisd3-popup-radius, 10px);
|
|
602
|
+
box-shadow: 0 2px 6px rgba(16, 15, 14, 0.06),
|
|
603
|
+
0 12px 32px rgba(16, 15, 14, 0.14);
|
|
604
|
+
|
|
605
|
+
.ant-menu {
|
|
606
|
+
border-inline-end: none !important;
|
|
607
|
+
background: transparent;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.ant-menu {
|
|
611
|
+
padding: 6px;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.ant-menu-item {
|
|
615
|
+
margin: 0;
|
|
616
|
+
width: 100%;
|
|
617
|
+
border-radius: 8px;
|
|
618
|
+
font-size: 14px;
|
|
619
|
+
}
|
|
620
|
+
`,he=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`
|
|
621
|
+
display: flex;
|
|
622
|
+
align-items: center;
|
|
623
|
+
gap: 8px;
|
|
624
|
+
flex: 0 0 auto;
|
|
625
|
+
`,xe=o.span`
|
|
626
|
+
width: 2px;
|
|
627
|
+
height: 24px;
|
|
628
|
+
background: var(--ant-color-border-secondary);
|
|
629
|
+
flex: 0 0 auto;
|
|
630
|
+
`,ge=o.div`
|
|
320
631
|
.ant-table-wrapper .ant-table {
|
|
321
632
|
background: transparent;
|
|
322
633
|
}
|
|
@@ -328,17 +639,17 @@
|
|
|
328
639
|
text-transform: uppercase;
|
|
329
640
|
color: var(--ant-color-text-tertiary);
|
|
330
641
|
padding-block: 14px;
|
|
331
|
-
border-bottom:
|
|
642
|
+
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
332
643
|
background: transparent;
|
|
333
644
|
}
|
|
334
645
|
|
|
335
646
|
.ant-table-wrapper .ant-table-tbody > tr > td {
|
|
336
|
-
border-bottom:
|
|
647
|
+
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border-secondary);
|
|
337
648
|
font-size: 16px;
|
|
338
649
|
}
|
|
339
650
|
|
|
340
651
|
.ant-table-wrapper .ant-table-tbody > tr:last-child > td {
|
|
341
|
-
border-bottom:
|
|
652
|
+
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
342
653
|
}
|
|
343
654
|
|
|
344
655
|
.ant-table-wrapper .ant-table-thead > tr > th:first-child,
|
|
@@ -366,14 +677,14 @@
|
|
|
366
677
|
.hisd3-cell-muted {
|
|
367
678
|
color: var(--ant-color-text-tertiary);
|
|
368
679
|
}
|
|
369
|
-
`,
|
|
680
|
+
`,be=o.div`
|
|
370
681
|
padding: 22px 0 14px;
|
|
371
682
|
font-size: 13px;
|
|
372
683
|
font-weight: 600;
|
|
373
684
|
letter-spacing: 0.1em;
|
|
374
685
|
text-transform: uppercase;
|
|
375
686
|
color: var(--ant-color-text-tertiary);
|
|
376
|
-
`,
|
|
687
|
+
`,me=o.div`
|
|
377
688
|
display: flex;
|
|
378
689
|
align-items: center;
|
|
379
690
|
gap: 24px;
|
|
@@ -387,7 +698,7 @@
|
|
|
387
698
|
|
|
388
699
|
.ant-pagination {
|
|
389
700
|
display: inline-flex;
|
|
390
|
-
border:
|
|
701
|
+
border: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
391
702
|
|
|
392
703
|
.ant-pagination-item,
|
|
393
704
|
.ant-pagination-prev,
|
|
@@ -399,7 +710,7 @@
|
|
|
399
710
|
height: 56px;
|
|
400
711
|
line-height: 56px;
|
|
401
712
|
border: 0;
|
|
402
|
-
border-right:
|
|
713
|
+
border-right: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
403
714
|
border-radius: 0;
|
|
404
715
|
font-weight: 700;
|
|
405
716
|
font-size: 16px;
|
|
@@ -433,15 +744,15 @@
|
|
|
433
744
|
font-weight: 700;
|
|
434
745
|
}
|
|
435
746
|
}
|
|
436
|
-
`,
|
|
747
|
+
`,fe=o.div`
|
|
437
748
|
display: inline-flex;
|
|
438
|
-
border:
|
|
749
|
+
border: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
439
750
|
|
|
440
751
|
button {
|
|
441
752
|
height: 56px;
|
|
442
753
|
padding: 0 22px;
|
|
443
754
|
border: 0;
|
|
444
|
-
border-right:
|
|
755
|
+
border-right: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
445
756
|
background: transparent;
|
|
446
757
|
font: inherit;
|
|
447
758
|
font-size: 16px;
|
|
@@ -457,12 +768,12 @@
|
|
|
457
768
|
color: #fff;
|
|
458
769
|
}
|
|
459
770
|
}
|
|
460
|
-
`,
|
|
771
|
+
`,ye=e=>`Total ${e.toLocaleString()} items`;const ve=o(t.Tabs)`
|
|
461
772
|
&.ant-tabs .ant-tabs-nav {
|
|
462
773
|
margin: 0;
|
|
463
774
|
|
|
464
775
|
&::before {
|
|
465
|
-
border-bottom:
|
|
776
|
+
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border-secondary);
|
|
466
777
|
}
|
|
467
778
|
}
|
|
468
779
|
|
|
@@ -490,7 +801,7 @@
|
|
|
490
801
|
.ant-tabs-tab-active .hisd3-tab-count {
|
|
491
802
|
color: var(--ant-color-primary);
|
|
492
803
|
}
|
|
493
|
-
`,
|
|
804
|
+
`,we={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)"},Se={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)"},ke=o.span`
|
|
494
805
|
display: inline-flex;
|
|
495
806
|
align-items: center;
|
|
496
807
|
gap: 6px;
|
|
@@ -502,11 +813,11 @@
|
|
|
502
813
|
text-transform: uppercase;
|
|
503
814
|
white-space: nowrap;
|
|
504
815
|
line-height: 1;
|
|
505
|
-
border:
|
|
816
|
+
border: var(--hisd3-rule-width, 1px) solid transparent;
|
|
506
817
|
border-radius: 0;
|
|
507
818
|
|
|
508
|
-
${({$variant:e,$tone:t})=>{const
|
|
509
|
-
`,
|
|
819
|
+
${({$variant:e,$tone:t})=>{const r=we[t],o=Se[t];switch(e){case"soft":return`color: ${r}; background: ${o};`;case"outline":return`color: ${r}; border-color: ${r}; background: transparent;`;case"solid":return`color: #fff; background: ${"default"===t?"var(--ant-color-text)":r};`;default:return"color: var(--ant-color-text); background: rgba(0,0,0,0.05);"}}}
|
|
820
|
+
`,Ie=o(t.Button)`
|
|
510
821
|
&.ant-btn {
|
|
511
822
|
display: inline-flex;
|
|
512
823
|
align-items: center;
|
|
@@ -532,16 +843,16 @@
|
|
|
532
843
|
}
|
|
533
844
|
|
|
534
845
|
&.ant-btn-default {
|
|
535
|
-
border-width:
|
|
846
|
+
border-width: var(--hisd3-rule-width, 1px);
|
|
536
847
|
}
|
|
537
848
|
|
|
538
849
|
.anticon {
|
|
539
850
|
font-size: 1.05em;
|
|
540
851
|
}
|
|
541
|
-
`,
|
|
852
|
+
`,je={primary:{type:"primary"},secondary:{type:"default"},ghost:{type:"text"},danger:{type:"primary",danger:!0}},Te=o(t.Input)`
|
|
542
853
|
&.ant-input,
|
|
543
854
|
&.ant-input-affix-wrapper {
|
|
544
|
-
border-width:
|
|
855
|
+
border-width: var(--hisd3-rule-width, 1px);
|
|
545
856
|
font-size: 16px;
|
|
546
857
|
}
|
|
547
858
|
|
|
@@ -550,7 +861,7 @@
|
|
|
550
861
|
color: var(--ant-color-text-tertiary);
|
|
551
862
|
font-size: 18px;
|
|
552
863
|
}
|
|
553
|
-
`,
|
|
864
|
+
`,De=o(Te)`
|
|
554
865
|
&.ant-input-affix-wrapper {
|
|
555
866
|
background: var(--hisd3-bg-filled, #e6e4e1);
|
|
556
867
|
border-color: var(--ant-color-border-secondary);
|
|
@@ -584,5 +895,5 @@
|
|
|
584
895
|
font-size: 18px;
|
|
585
896
|
}
|
|
586
897
|
}
|
|
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;
|
|
898
|
+
`;var Ee,Ce,$e,ze,Le,Ae,Ne,Oe,Re,Be,He,Fe,Me;exports.ThemeStyle=void 0,(Ee=exports.ThemeStyle||(exports.ThemeStyle={})).MODERN="modern",Ee.STANDARD="standard",exports.ThemeStyleRadius=void 0,(Ce=exports.ThemeStyleRadius||(exports.ThemeStyleRadius={})).MODERN="30px",Ce.STANDARD="16px",exports.ThemeMode=void 0,($e=exports.ThemeMode||(exports.ThemeMode={})).LIGHT="light",$e.SEMI_DARK="semi-dark",$e.DARK="dark",exports.LayoutType=void 0,(ze=exports.LayoutType||(exports.LayoutType={})).FULL_WIDTH="full-width",ze.BOXED="boxed",ze.FRAMED="framed",exports.MenuStyle=void 0,(Le=exports.MenuStyle||(exports.MenuStyle={})).DEFAULT="default",Le.STANDARD="standard",Le.ROUNDED="rounded",Le.ROUNDED_REVERSE="rounded-reverse",Le.CURVED_MENU="curved-menu",exports.NavStyle=void 0,(Ae=exports.NavStyle||(exports.NavStyle={})).DEFAULT="default",Ae.MINI="mini",Ae.MINI_SIDEBAR_TOGGLE="mini-sidebar-toggle",Ae.STANDARD="standard",Ae.HEADER_USER="user-header",Ae.HEADER_USER_MINI="user-mini-header",Ae.DRAWER="drawer",Ae.BIT_BUCKET="bit-bucket",Ae.H_DEFAULT="h-default",Ae.HOR_HEADER_FIXED="hor-header-fixed",Ae.HOR_DARK_LAYOUT="hor-dark-layout",exports.FooterType=void 0,(Ne=exports.FooterType||(exports.FooterType={})).FIXED="fixed",Ne.FLUID="fluid",exports.LayoutDirection=void 0,(Oe=exports.LayoutDirection||(exports.LayoutDirection={})).RTL="rtl",Oe.LTR="ltr",exports.HeaderType=void 0,(Re=exports.HeaderType||(exports.HeaderType={})).DARK="dark",Re.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,(He=exports.Fonts||(exports.Fonts={})).LIGHT="300",He.REGULAR="400",He.MEDIUM="500",He.BOLD="600",exports.AuthType=void 0,(Fe=exports.AuthType||(exports.AuthType={})).FIREBASE="firebase",Fe.AWS_COGNITO="aws_cognito",Fe.AUTH0="auth0",Fe.JWT_AUTH="jwt_auth",exports.AppAnimates=void 0,(Me=exports.AppAnimates||(exports.AppAnimates={})).SLIDEUPIN="transition.slideUpIn",Me.SLIDEUPOUT="transition.slideUpOut",Me.SLIDEDOWNIN="transition.slideDownIn",Me.SLIDEDOWNOUT="transition.slideDownOut",Me.SLIDELEFTIN="transition.slideLeftIn",Me.SLIDELEFTOUT="transition.slideLeftOut",Me.SLIDERIGHTIN="transition.slideRightIn",Me.SLIDERIGHTOUT="transition.slideRightOut",Me.FADEIN="transition.fadeIn",Me.FADEOUT="transition.fadeOut";var Ue,_e;exports.MessageType=void 0,(Ue=exports.MessageType||(exports.MessageType={}))[Ue.MEDIA=1]="MEDIA",Ue[Ue.TEXT=2]="TEXT",exports.RoutePermittedRole=void 0,(_e=exports.RoutePermittedRole||(exports.RoutePermittedRole={})).Admin="admin",_e.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(ce,{children:[e.jsxs(de,{children:[e.jsx(pe,{$src:i,children:!i&&he(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(le,{type:"button",className:x,$shape:c,$size:h,"aria-label":`Account menu for ${o.fullName}`,children:[i?e.jsx("img",{src:i,alt:""}):he(o.fullName),!u&&e.jsx(se,{$size:h,"aria-hidden":!0,children:e.jsx(n.DownOutlined,{})})]})})},exports.HISD3Button=({variant:t="secondary",...r})=>e.jsx(Ie,{...je[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(xe,{}),t]},n)))})},exports.HISD3Input=t=>e.jsx(Te,{...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,className:x})=>{const[g,b]=r.useState(!1),m=i??o.filter((e=>e.unread)).length,f=e.jsxs(Q,{children:[e.jsxs(Z,{children:[e.jsx("h4",{children:l}),s&&m>0&&e.jsx("button",{type:"button",onClick:s,children:"Mark all as read"})]}),a?e.jsx(ae,{style:{textAlign:"center"},children:e.jsx(t.Spin,{})}):0===o.length?e.jsx(ae,{children:e.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:c})}):e.jsx(ee,{children:o.map((t=>e.jsxs(te,{type:"button",$unread:t.unread,onClick:()=>{t.onClick?.(t),b(!1),h?.(!1)},children:[e.jsx(re,{$src:t.avatarSrc,children:!t.avatarSrc&&(t.icon??e.jsx(n.BellOutlined,{}))}),e.jsxs(oe,{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(ne,{})]},t.id)))}),d&&e.jsx(ie,{type:"button",onClick:()=>{d(),b(!1),h?.(!1)},children:p})]});return e.jsx(t.Dropdown,{open:g,onOpenChange:e=>{b(e),h?.(e)},trigger:["click"],placement:"bottomRight",popupRender:()=>f,children:e.jsx(J,{type:"button",$size:u,className:x,"aria-label":`${l}${m?` (${m} unread)`:""}`,children:e.jsx(t.Badge,{count:m,size:"small",offset:[2,-2],children:e.jsx(n.BellOutlined,{})})})})},exports.HISD3PageBody=Y,exports.HISD3PageHeader=({title:r,subtitle:o,breadcrumb:n,extra:i,leading:a,hideTopBar:l=!1,className:s})=>e.jsxs(K,{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(X,{children:i})]}),e.jsxs(V,{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(De,{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=_,headerExtra:y,userMenuItems:v,onCollapse:k,collapsed:L=!1,loading:A=!1,hideSidebar:N=!1,layoutTop:O=!1,hideCollapseTrigger:R=!1,siderWidth:B=w,bareContent:H=!1,hideHeaderBar:F=!1,brandHref:W="/",hideAccountCard:K=!1,scrollContent:q=!0})=>{const X=f(),V=void 0===b?X?null:g:b,[Y,J]=r.useState(L);r.useEffect((()=>{J(L)}),[L]);const Q=r.useMemo((()=>U(d,m)),[d,m]),Z=r.useMemo((()=>((e,t)=>{let r;const o=(e,n)=>{(e??[]).forEach(((e,i)=>{const a=M(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]),[ee,te]=r.useState((()=>Z.openKeys));r.useEffect((()=>{te((e=>Array.from(new Set([...e,...Z.openKeys]))))}),[Z.openKeys.join("|")]);const re=e=>{J(e),k?.(e)},oe=Z.selectedKey?[Z.selectedKey]:[],ne=e.jsxs(D,{href:W,$collapsed:!O&&Y,children:[l?e.jsx("img",{src:l,alt:s}):e.jsx("span",{className:"hisd3-brand-mark","aria-hidden":!0}),(O||!Y)&&e.jsx("h1",{children:s})]}),ie=H?i:e.jsx(z,{children:i});if("undefined"==typeof document)return null;const ae=e.jsx(t.App,{component:!1,children:e.jsx(t.Spin,{spinning:A,size:"large",children:N?e.jsx(e.Fragment,{children:i}):O?e.jsxs(I,{$appShell:q,children:[e.jsxs(E,{children:[ne,e.jsx(t.Menu,{mode:"horizontal",items:Q,selectedKeys:oe}),y,!K&&e.jsx(P,{account:a,avatarSrc:h,settingsUrl:x,onLogout:p,placement:"bottomRight",extraItems:v})]}),e.jsx(j,{$scroll:q,children:ie})]}):e.jsxs(I,{hasSider:!0,$appShell:q,children:[e.jsxs(G,{className:"hisd3-sider",width:B,collapsedWidth:S,collapsible:!0,collapsed:Y,trigger:null,theme:"light",breakpoint:"lg",onBreakpoint:e=>{e&&re(!0)},children:[ne,e.jsx(T,{className:Y?"hisd3-collapsed":void 0,children:e.jsx(t.Menu,{mode:"inline",theme:"light",inlineCollapsed:Y,items:Q,selectedKeys:oe,openKeys:Y?void 0:ee,onOpenChange:e=>te(e)})}),!K&&e.jsx(P,{account:a,avatarSrc:h,settingsUrl:x,onLogout:p,collapsed:Y,placement:"topRight",extraItems:v})]}),e.jsxs(j,{$scroll:q,children:[!F&&e.jsxs(C,{children:[!R&&e.jsx($,{type:"button","aria-label":Y?"Expand menu":"Collapse menu",onClick:()=>re(!Y),children:Y?e.jsx(n.MenuUnfoldOutlined,{}):e.jsx(n.MenuFoldOutlined,{})}),e.jsx("span",{style:{flex:1}}),y]}),ie]})]})})});return X&&!u?V?e.jsx(t.ConfigProvider,{theme:V,children:ae}):ae:e.jsx(o.ThemeProvider,{theme:u??{},children:V?e.jsx(t.ConfigProvider,{theme:V,children:ae}):ae})},exports.HISD3Table=function({pagination:r,footer:o,...i}){const a=r||void 0,l=a?.pageSizeOptions??[10,20,50];return e.jsxs(ge,{children:[e.jsx(t.Table,{...i,pagination:!1}),o&&e.jsx(be,{children:o}),a&&e.jsxs(me,{children:[e.jsx("span",{className:"hisd3-total",children:(a.renderTotal??ye)(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(fe,{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(ve,{...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(ke,{$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=J,exports.UserMenu=P,exports.borderVarsCss=x,exports.createHisd3Theme=u,exports.getInitials=he,exports.hisd3AntdTheme=g,exports.resolvePrimary=c,exports.tint=h,exports.useInsideHISD3Provider=f;
|
|
588
899
|
//# sourceMappingURL=index.cjs.js.map
|