hisd3-ui-kit 4.1.0 → 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 +17 -2
- package/dist/index.cjs.js +71 -51
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +71 -51
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,8 +110,8 @@ const menuItems = [
|
|
|
110
110
|
| Component | What it is |
|
|
111
111
|
| --- | --- |
|
|
112
112
|
| `HISD3Provider` | Root theme provider (see above). |
|
|
113
|
-
| `HISD3Sidebar` | App shell: brand block, grouped menu with accent bar on the active route, account dropdown (Settings / Logout with confirm), collapsible, optional top-nav mode (`layoutTop`). `menuItems` accept `{ key, path, name, icon, children, group, hideInMenu, disabled }`. `renderMenuLink` lets you plug in react-router's `<Link>`. Props `bareContent` + `hideHeaderBar` hand the header over to `HISD3PageHeader`. |
|
|
114
|
-
| `HISD3PageHeader` / `HISD3PageBody` |
|
|
113
|
+
| `HISD3Sidebar` | App shell (see *Scrolling* below): brand block, grouped menu with accent bar on the active route, account dropdown (Settings / Logout with confirm), collapsible, optional top-nav mode (`layoutTop`). `menuItems` accept `{ key, path, name, icon, children, group, hideInMenu, disabled }`. `renderMenuLink` lets you plug in react-router's `<Link>`. Props `bareContent` + `hideHeaderBar` hand the header over to `HISD3PageHeader`. |
|
|
114
|
+
| `HISD3PageHeader` / `HISD3PageBody` | Top bar (breadcrumb left, actions right) that stays pinned while the page scrolls, plus a large title + subtitle that scrolls away; `HISD3PageBody` is the matching padded content area. |
|
|
115
115
|
| `HISD3Table<T>` | antd `Table` restyled (uppercase muted headers, 2px row rules) with the HISD3 pagination bar: "Total N items", square page buttons, page-size toggle. Pass `pagination={{ current, pageSize, total, onChange, pageSizeOptions?, hidePageSize? }}` or `false`. Optional `footer` strip. Cell helper classes: `hisd3-cell-primary`, `hisd3-cell-link`, `hisd3-cell-muted`. |
|
|
116
116
|
| `HISD3Tabs` | Underlined filter tabs; each item may carry a `count`. |
|
|
117
117
|
| `HISD3Tag` | Uppercase status pill. `variant`: `neutral` (grey, e.g. ACTIVE / IN PATIENT), `soft` (primary tint, e.g. ER PATIENT), `outline` (2px primary border, e.g. OUT PATIENT), `solid`. `tone`: `primary` \| `success` \| `warning` \| `danger` \| `default`. |
|
|
@@ -130,6 +130,20 @@ Theme utilities: `createHisd3Theme`, `hisd3AntdTheme` (red default),
|
|
|
130
130
|
Modal, …) inherit the same tokens automatically, so use them freely alongside
|
|
131
131
|
the kit.
|
|
132
132
|
|
|
133
|
+
### Scrolling
|
|
134
|
+
|
|
135
|
+
The shell fills exactly one viewport and the content column scrolls inside it,
|
|
136
|
+
so the page header stays pinned and the document never rubber-bands ("bounces")
|
|
137
|
+
past the top or bottom — the behaviour you expect from a desktop app. Nothing to
|
|
138
|
+
configure; pass `scrollContent={false}` to `HISD3Sidebar` if you need the window
|
|
139
|
+
to be the scroller instead (infinite scroll bound to `window`, browser scroll
|
|
140
|
+
restoration, and similar).
|
|
141
|
+
|
|
142
|
+
Because the scroller is the content column rather than the window, code that
|
|
143
|
+
listens for `window` scroll events or calls `window.scrollTo` inside a page
|
|
144
|
+
needs to target that element instead — for example
|
|
145
|
+
`document.querySelector(".ant-layout-has-sider > .ant-layout")`.
|
|
146
|
+
|
|
133
147
|
Typography: Archivo throughout, loaded from Google Fonts by the kit — body 400,
|
|
134
148
|
headings 800. The kit defines `--font-body`, `--font-heading` and
|
|
135
149
|
`--font-weight-heading` on `:root`, so your own CSS can use them, and native
|
|
@@ -150,6 +164,7 @@ components.
|
|
|
150
164
|
|
|
151
165
|
- Wrap the app in `HISD3Provider` (the sidebar still works standalone with the red default, but the provider is what lets you pick a primary).
|
|
152
166
|
- The default look changed from teal/rounded to the red/square Backoffice style. To keep teal: `<HISD3Provider primary="teal">`.
|
|
167
|
+
- The shell now scrolls its content column instead of the window (pinned header, no rubber-banding). Pass `scrollContent={false}` to `HISD3Sidebar` to restore window scrolling.
|
|
153
168
|
- Borders are now hairline by default; pass `borders="bold"` to `HISD3Provider` to keep the 2px near-black look.
|
|
154
169
|
- New `hideAccountCard` prop on `HISD3Sidebar` for apps that put the account in the header via `HISD3AvatarMenu`.
|
|
155
170
|
- `HISD3Sidebar`: `logoUrl` and `styledTheme` are now optional; a primary-colored square is shown when there is no logo. `HISD3_COLORS` is deprecated in favour of `HISD3_PRESETS`.
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("antd"),r=require("react"),o=require("styled-components"),
|
|
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,7 +15,7 @@
|
|
|
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
21
|
border-right: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
@@ -20,10 +26,16 @@
|
|
|
20
26
|
height: 100%;
|
|
21
27
|
}
|
|
22
28
|
}
|
|
23
|
-
`,j=o.
|
|
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;
|
|
38
|
+
overscroll-behavior: contain;
|
|
27
39
|
padding-top: 4px;
|
|
28
40
|
|
|
29
41
|
.ant-menu-inline,
|
|
@@ -95,7 +107,7 @@
|
|
|
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
113
|
gap: 10px;
|
|
@@ -137,10 +149,11 @@
|
|
|
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;
|
|
156
|
+
flex: 0 0 ${k}px;
|
|
144
157
|
height: ${k}px;
|
|
145
158
|
line-height: ${k}px;
|
|
146
159
|
padding: 0 ${a.pageGutter}px;
|
|
@@ -159,10 +172,11 @@
|
|
|
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
178
|
gap: 12px;
|
|
179
|
+
flex: 0 0 ${k}px;
|
|
166
180
|
height: ${k}px;
|
|
167
181
|
line-height: ${k}px;
|
|
168
182
|
padding: 0 ${a.pageGutter}px;
|
|
@@ -171,7 +185,7 @@
|
|
|
171
185
|
z-index: 99;
|
|
172
186
|
background: var(--ant-color-bg-layout);
|
|
173
187
|
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
174
|
-
|
|
188
|
+
`,$=o.button`
|
|
175
189
|
border: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
176
190
|
background: transparent;
|
|
177
191
|
cursor: pointer;
|
|
@@ -188,8 +202,8 @@
|
|
|
188
202
|
background: rgba(0, 0, 0, 0.05);
|
|
189
203
|
}
|
|
190
204
|
`,z=o(v)`
|
|
205
|
+
flex: 1 0 auto;
|
|
191
206
|
padding: 24px ${a.pageGutter}px 40px;
|
|
192
|
-
min-height: calc(100vh - ${k}px);
|
|
193
207
|
`,L=o.div`
|
|
194
208
|
flex: 0 0 auto;
|
|
195
209
|
display: flex;
|
|
@@ -204,14 +218,14 @@
|
|
|
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
227
|
gap: 10px;
|
|
214
|
-
`,
|
|
228
|
+
`,N=o.span`
|
|
215
229
|
width: 34px;
|
|
216
230
|
height: 34px;
|
|
217
231
|
flex: 0 0 auto;
|
|
@@ -222,15 +236,15 @@
|
|
|
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;
|
|
@@ -265,12 +279,16 @@
|
|
|
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
287
|
gap: 16px;
|
|
272
288
|
height: ${a.topBarHeight}px; /* same as the sidebar brand block */
|
|
273
|
-
|
|
289
|
+
/* never shrink: these are flex items of the scrolling column */
|
|
290
|
+
flex: 0 0 ${a.topBarHeight}px;
|
|
291
|
+
padding: 0 ${W}px;
|
|
274
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;
|
|
@@ -286,17 +304,18 @@
|
|
|
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
310
|
gap: 10px;
|
|
293
311
|
flex: 0 0 auto;
|
|
294
|
-
`,
|
|
312
|
+
`,V=o.div`
|
|
295
313
|
display: flex;
|
|
296
314
|
align-items: baseline;
|
|
297
315
|
gap: 16px;
|
|
298
316
|
flex-wrap: wrap;
|
|
299
|
-
|
|
317
|
+
flex: 0 0 auto;
|
|
318
|
+
padding: 20px ${W}px 18px;
|
|
300
319
|
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border-secondary);
|
|
301
320
|
|
|
302
321
|
h1 {
|
|
@@ -314,9 +333,10 @@
|
|
|
314
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`
|
|
320
340
|
position: relative;
|
|
321
341
|
width: ${({$size:e=40})=>e}px;
|
|
322
342
|
height: ${({$size:e=40})=>e}px;
|
|
@@ -353,7 +373,7 @@
|
|
|
353
373
|
color: inherit;
|
|
354
374
|
line-height: 0;
|
|
355
375
|
}
|
|
356
|
-
`,
|
|
376
|
+
`,Q=o.div`
|
|
357
377
|
width: 360px;
|
|
358
378
|
max-width: calc(100vw - 32px);
|
|
359
379
|
overflow: hidden;
|
|
@@ -362,7 +382,7 @@
|
|
|
362
382
|
border-radius: var(--hisd3-popup-radius, 10px);
|
|
363
383
|
box-shadow: 0 2px 6px rgba(16, 15, 14, 0.06),
|
|
364
384
|
0 12px 32px rgba(16, 15, 14, 0.14);
|
|
365
|
-
`,
|
|
385
|
+
`,Z=o.div`
|
|
366
386
|
display: flex;
|
|
367
387
|
align-items: center;
|
|
368
388
|
justify-content: space-between;
|
|
@@ -390,10 +410,10 @@
|
|
|
390
410
|
text-decoration: underline;
|
|
391
411
|
}
|
|
392
412
|
}
|
|
393
|
-
`,
|
|
413
|
+
`,ee=o.div`
|
|
394
414
|
max-height: 380px;
|
|
395
415
|
overflow-y: auto;
|
|
396
|
-
`,
|
|
416
|
+
`,te=o.button`
|
|
397
417
|
display: flex;
|
|
398
418
|
align-items: flex-start;
|
|
399
419
|
gap: 12px;
|
|
@@ -408,7 +428,7 @@
|
|
|
408
428
|
&:hover {
|
|
409
429
|
background: ${({$unread:e})=>e?"var(--ant-color-primary-bg-hover)":"rgba(0,0,0,0.04)"};
|
|
410
430
|
}
|
|
411
|
-
`,
|
|
431
|
+
`,re=o.span`
|
|
412
432
|
width: 36px;
|
|
413
433
|
height: 36px;
|
|
414
434
|
flex: 0 0 auto;
|
|
@@ -419,7 +439,7 @@
|
|
|
419
439
|
color: var(--ant-color-text);
|
|
420
440
|
border-radius: 50%;
|
|
421
441
|
background: ${({$src:e})=>e?`center / cover no-repeat url("${e}")`:"rgba(0,0,0,0.06)"};
|
|
422
|
-
`,
|
|
442
|
+
`,oe=o.span`
|
|
423
443
|
flex: 1 1 auto;
|
|
424
444
|
min-width: 0;
|
|
425
445
|
|
|
@@ -444,14 +464,14 @@
|
|
|
444
464
|
font-size: 12px;
|
|
445
465
|
color: var(--ant-color-text-tertiary);
|
|
446
466
|
}
|
|
447
|
-
`,
|
|
467
|
+
`,ne=o.span`
|
|
448
468
|
width: 8px;
|
|
449
469
|
height: 8px;
|
|
450
470
|
margin-top: 6px;
|
|
451
471
|
flex: 0 0 auto;
|
|
452
472
|
border-radius: 50%;
|
|
453
473
|
background: var(--ant-color-primary);
|
|
454
|
-
`,
|
|
474
|
+
`,ie=o.button`
|
|
455
475
|
display: block;
|
|
456
476
|
width: 100%;
|
|
457
477
|
padding: 12px 16px;
|
|
@@ -468,9 +488,9 @@
|
|
|
468
488
|
&:hover {
|
|
469
489
|
background: rgba(0, 0, 0, 0.04);
|
|
470
490
|
}
|
|
471
|
-
`,
|
|
491
|
+
`,ae=o.div`
|
|
472
492
|
padding: 28px 16px;
|
|
473
|
-
`,
|
|
493
|
+
`,le=o.button`
|
|
474
494
|
position: relative;
|
|
475
495
|
width: ${({$size:e})=>e}px;
|
|
476
496
|
height: ${({$size:e})=>e}px;
|
|
@@ -504,7 +524,7 @@
|
|
|
504
524
|
display: block;
|
|
505
525
|
border-radius: inherit;
|
|
506
526
|
}
|
|
507
|
-
`,
|
|
527
|
+
`,se=o.span`
|
|
508
528
|
position: absolute;
|
|
509
529
|
right: ${({$size:e})=>-Math.round(.05*e)}px;
|
|
510
530
|
bottom: ${({$size:e})=>-Math.round(.05*e)}px;
|
|
@@ -520,7 +540,7 @@
|
|
|
520
540
|
border-radius: 50%;
|
|
521
541
|
pointer-events: none;
|
|
522
542
|
|
|
523
|
-
${
|
|
543
|
+
${le}[aria-expanded="true"] & {
|
|
524
544
|
background: var(--ant-color-primary);
|
|
525
545
|
color: #fff;
|
|
526
546
|
}
|
|
@@ -528,7 +548,7 @@
|
|
|
528
548
|
& svg {
|
|
529
549
|
display: block;
|
|
530
550
|
}
|
|
531
|
-
`,
|
|
551
|
+
`,de=o.div`
|
|
532
552
|
display: flex;
|
|
533
553
|
align-items: center;
|
|
534
554
|
gap: 12px;
|
|
@@ -563,7 +583,7 @@
|
|
|
563
583
|
overflow: hidden;
|
|
564
584
|
text-overflow: ellipsis;
|
|
565
585
|
}
|
|
566
|
-
`,
|
|
586
|
+
`,pe=o.span`
|
|
567
587
|
width: 40px;
|
|
568
588
|
height: 40px;
|
|
569
589
|
flex: 0 0 auto;
|
|
@@ -574,7 +594,7 @@
|
|
|
574
594
|
font-weight: 700;
|
|
575
595
|
border-radius: 50%;
|
|
576
596
|
background: ${({$src:e})=>e?`center / cover no-repeat url("${e}")`:"rgba(0,0,0,0.08)"};
|
|
577
|
-
`,
|
|
597
|
+
`,ce=o.div`
|
|
578
598
|
overflow: hidden;
|
|
579
599
|
background: var(--ant-color-bg-elevated);
|
|
580
600
|
border: 1px solid var(--ant-color-border-secondary);
|
|
@@ -597,17 +617,17 @@
|
|
|
597
617
|
border-radius: 8px;
|
|
598
618
|
font-size: 14px;
|
|
599
619
|
}
|
|
600
|
-
`,
|
|
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`
|
|
601
621
|
display: flex;
|
|
602
622
|
align-items: center;
|
|
603
623
|
gap: 8px;
|
|
604
624
|
flex: 0 0 auto;
|
|
605
|
-
`,
|
|
625
|
+
`,xe=o.span`
|
|
606
626
|
width: 2px;
|
|
607
627
|
height: 24px;
|
|
608
628
|
background: var(--ant-color-border-secondary);
|
|
609
629
|
flex: 0 0 auto;
|
|
610
|
-
`,
|
|
630
|
+
`,ge=o.div`
|
|
611
631
|
.ant-table-wrapper .ant-table {
|
|
612
632
|
background: transparent;
|
|
613
633
|
}
|
|
@@ -657,14 +677,14 @@
|
|
|
657
677
|
.hisd3-cell-muted {
|
|
658
678
|
color: var(--ant-color-text-tertiary);
|
|
659
679
|
}
|
|
660
|
-
`,
|
|
680
|
+
`,be=o.div`
|
|
661
681
|
padding: 22px 0 14px;
|
|
662
682
|
font-size: 13px;
|
|
663
683
|
font-weight: 600;
|
|
664
684
|
letter-spacing: 0.1em;
|
|
665
685
|
text-transform: uppercase;
|
|
666
686
|
color: var(--ant-color-text-tertiary);
|
|
667
|
-
`,
|
|
687
|
+
`,me=o.div`
|
|
668
688
|
display: flex;
|
|
669
689
|
align-items: center;
|
|
670
690
|
gap: 24px;
|
|
@@ -724,7 +744,7 @@
|
|
|
724
744
|
font-weight: 700;
|
|
725
745
|
}
|
|
726
746
|
}
|
|
727
|
-
`,
|
|
747
|
+
`,fe=o.div`
|
|
728
748
|
display: inline-flex;
|
|
729
749
|
border: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
730
750
|
|
|
@@ -748,7 +768,7 @@
|
|
|
748
768
|
color: #fff;
|
|
749
769
|
}
|
|
750
770
|
}
|
|
751
|
-
`,
|
|
771
|
+
`,ye=e=>`Total ${e.toLocaleString()} items`;const ve=o(t.Tabs)`
|
|
752
772
|
&.ant-tabs .ant-tabs-nav {
|
|
753
773
|
margin: 0;
|
|
754
774
|
|
|
@@ -781,7 +801,7 @@
|
|
|
781
801
|
.ant-tabs-tab-active .hisd3-tab-count {
|
|
782
802
|
color: var(--ant-color-primary);
|
|
783
803
|
}
|
|
784
|
-
`,
|
|
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`
|
|
785
805
|
display: inline-flex;
|
|
786
806
|
align-items: center;
|
|
787
807
|
gap: 6px;
|
|
@@ -796,8 +816,8 @@
|
|
|
796
816
|
border: var(--hisd3-rule-width, 1px) solid transparent;
|
|
797
817
|
border-radius: 0;
|
|
798
818
|
|
|
799
|
-
${({$variant:e,$tone:t})=>{const r=
|
|
800
|
-
`,
|
|
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)`
|
|
801
821
|
&.ant-btn {
|
|
802
822
|
display: inline-flex;
|
|
803
823
|
align-items: center;
|
|
@@ -829,7 +849,7 @@
|
|
|
829
849
|
.anticon {
|
|
830
850
|
font-size: 1.05em;
|
|
831
851
|
}
|
|
832
|
-
`,
|
|
852
|
+
`,je={primary:{type:"primary"},secondary:{type:"default"},ghost:{type:"text"},danger:{type:"primary",danger:!0}},Te=o(t.Input)`
|
|
833
853
|
&.ant-input,
|
|
834
854
|
&.ant-input-affix-wrapper {
|
|
835
855
|
border-width: var(--hisd3-rule-width, 1px);
|
|
@@ -841,7 +861,7 @@
|
|
|
841
861
|
color: var(--ant-color-text-tertiary);
|
|
842
862
|
font-size: 18px;
|
|
843
863
|
}
|
|
844
|
-
`,
|
|
864
|
+
`,De=o(Te)`
|
|
845
865
|
&.ant-input-affix-wrapper {
|
|
846
866
|
background: var(--hisd3-bg-filled, #e6e4e1);
|
|
847
867
|
border-color: var(--ant-color-border-secondary);
|
|
@@ -875,5 +895,5 @@
|
|
|
875
895
|
font-size: 18px;
|
|
876
896
|
}
|
|
877
897
|
}
|
|
878
|
-
`;var Te,De,Ee,Ce,ze,Le,$e,Ae,Ne,Oe,Re,Be,Fe;exports.ThemeStyle=void 0,(Te=exports.ThemeStyle||(exports.ThemeStyle={})).MODERN="modern",Te.STANDARD="standard",exports.ThemeStyleRadius=void 0,(De=exports.ThemeStyleRadius||(exports.ThemeStyleRadius={})).MODERN="30px",De.STANDARD="16px",exports.ThemeMode=void 0,(Ee=exports.ThemeMode||(exports.ThemeMode={})).LIGHT="light",Ee.SEMI_DARK="semi-dark",Ee.DARK="dark",exports.LayoutType=void 0,(Ce=exports.LayoutType||(exports.LayoutType={})).FULL_WIDTH="full-width",Ce.BOXED="boxed",Ce.FRAMED="framed",exports.MenuStyle=void 0,(ze=exports.MenuStyle||(exports.MenuStyle={})).DEFAULT="default",ze.STANDARD="standard",ze.ROUNDED="rounded",ze.ROUNDED_REVERSE="rounded-reverse",ze.CURVED_MENU="curved-menu",exports.NavStyle=void 0,(Le=exports.NavStyle||(exports.NavStyle={})).DEFAULT="default",Le.MINI="mini",Le.MINI_SIDEBAR_TOGGLE="mini-sidebar-toggle",Le.STANDARD="standard",Le.HEADER_USER="user-header",Le.HEADER_USER_MINI="user-mini-header",Le.DRAWER="drawer",Le.BIT_BUCKET="bit-bucket",Le.H_DEFAULT="h-default",Le.HOR_HEADER_FIXED="hor-header-fixed",Le.HOR_DARK_LAYOUT="hor-dark-layout",exports.FooterType=void 0,($e=exports.FooterType||(exports.FooterType={})).FIXED="fixed",$e.FLUID="fluid",exports.LayoutDirection=void 0,(Ae=exports.LayoutDirection||(exports.LayoutDirection={})).RTL="rtl",Ae.LTR="ltr",exports.HeaderType=void 0,(Ne=exports.HeaderType||(exports.HeaderType={})).DARK="dark",Ne.LIGHT="light",exports.RouteTransition=void 0,(Oe=exports.RouteTransition||(exports.RouteTransition={})).NONE="none",Oe.FADE="fade",Oe.SLIDE_LEFT="slideLeft",Oe.SLIDE_RIGHT="slideRight",Oe.SLIDE_UP="slideUp",Oe.SLIDE_DOWN="slideDown",exports.Fonts=void 0,(Re=exports.Fonts||(exports.Fonts={})).LIGHT="300",Re.REGULAR="400",Re.MEDIUM="500",Re.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,(Fe=exports.AppAnimates||(exports.AppAnimates={})).SLIDEUPIN="transition.slideUpIn",Fe.SLIDEUPOUT="transition.slideUpOut",Fe.SLIDEDOWNIN="transition.slideDownIn",Fe.SLIDEDOWNOUT="transition.slideDownOut",Fe.SLIDELEFTIN="transition.slideLeftIn",Fe.SLIDELEFTOUT="transition.slideLeftOut",Fe.SLIDERIGHTIN="transition.slideRightIn",Fe.SLIDERIGHTOUT="transition.slideRightOut",Fe.FADEIN="transition.fadeIn",Fe.FADEOUT="transition.fadeOut";var He,Me;exports.MessageType=void 0,(He=exports.MessageType||(exports.MessageType={}))[He.MEDIA=1]="MEDIA",He[He.TEXT=2]="TEXT",exports.RoutePermittedRole=void 0,(Me=exports.RoutePermittedRole||(exports.RoutePermittedRole={})).Admin="admin",Me.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:n,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),y=[...p??[],...null!==a||l?[{key:"settings",icon:e.jsx(i.SettingOutlined,{}),label:"Settings",onClick:()=>{l?l():a&&(window.location.href=a)}}]:[],{key:"logout",icon:e.jsx(i.LogoutOutlined,{}),label:"Logout",onClick:()=>{d?g.confirm({title:"Are you sure you want to logout?",content:"Please click OK to continue",icon:e.jsx(i.ExclamationCircleOutlined,{}),okText:"Logout",onOk:s}):s()}}];return e.jsx(t.Dropdown,{open:b,onOpenChange:m,trigger:["click"],placement:"bottomRight",menu:{items:y,onClick:()=>m(!1)},popupRender:t=>e.jsxs(de,{children:[e.jsxs(le,{children:[e.jsx(se,{$src:n,children:!n&&pe(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(ne,{type:"button",className:x,$shape:c,$size:h,"aria-label":`Account menu for ${o.fullName}`,children:[n?e.jsx("img",{src:n,alt:""}):pe(o.fullName),!u&&e.jsx(ae,{$size:h,"aria-hidden":!0,children:e.jsx(i.DownOutlined,{})})]})})},exports.HISD3Button=({variant:t="secondary",...r})=>e.jsx(Se,{...ke[t],...r}),exports.HISD3HeaderActions=({children:t,divided:o=!1,className:i})=>{const n=r.Children.toArray(t).filter(Boolean);return e.jsx(ce,{className:i,children:n.map(((t,i)=>e.jsxs(r.Fragment,{children:[o&&i===n.length-1&&i>0&&e.jsx(he,{}),t]},i)))})},exports.HISD3Input=t=>e.jsx(Ie,{...t}),exports.HISD3NotificationButton=({items:o=[],count:n,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=n??o.filter((e=>e.unread)).length,y=e.jsxs(Y,{children:[e.jsxs(J,{children:[e.jsx("h4",{children:l}),s&&m>0&&e.jsx("button",{type:"button",onClick:s,children:"Mark all as read"})]}),a?e.jsx(ie,{style:{textAlign:"center"},children:e.jsx(t.Spin,{})}):0===o.length?e.jsx(ie,{children:e.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:c})}):e.jsx(Q,{children:o.map((t=>e.jsxs(Z,{type:"button",$unread:t.unread,onClick:()=>{t.onClick?.(t),b(!1),h?.(!1)},children:[e.jsx(ee,{$src:t.avatarSrc,children:!t.avatarSrc&&(t.icon??e.jsx(i.BellOutlined,{}))}),e.jsxs(te,{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(re,{})]},t.id)))}),d&&e.jsx(oe,{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:()=>y,children:e.jsx(V,{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(i.BellOutlined,{})})})})},exports.HISD3PageBody=X,exports.HISD3PageHeader=({title:r,subtitle:o,breadcrumb:i,extra:n,leading:a,hideTopBar:l=!1,className:s})=>e.jsxs("header",{className:s,children:[!l&&e.jsxs(W,{children:[a,i&&i.length>0&&e.jsx(t.Breadcrumb,{items:i.map((t=>({title:t.href?e.jsx("a",{href:t.href,children:t.title}):t.title,onClick:t.onClick})))}),!i?.length&&e.jsx("span",{style:{flex:1}}),n&&e.jsx(K,{children:n})]}),e.jsxs(q,{children:[e.jsx("h1",{children:r}),o&&e.jsx("p",{children:o})]})]}),exports.HISD3Provider=({primary:i,radius:n,borders:a="hairline",lineWidth:l,overrides:s,theme:d,styledTheme:p={},children:c})=>{const h=r.useMemo((()=>d??u({primary:i,radius:n,borders:a,lineWidth:l,overrides:s})),[d,i,n,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(je,{allowClear:!0,prefix:e.jsx(i.SearchOutlined,{}),className:[t?"hisd3-search-compact":"",r??""].join(" ").trim(),...o}),exports.HISD3Sidebar=({children:n,account:a,logoUrl:l,appName:s,menuItems:d,onLogout:p,pathname:c,avatarSrc:h,styledTheme:u,settingsUrl:x,antdTheme:b,renderMenuLink:m=U,headerExtra:f,userMenuItems:v,onCollapse:k,collapsed:L=!1,loading:$=!1,hideSidebar:A=!1,layoutTop:N=!1,hideCollapseTrigger:O=!1,siderWidth:R=w,bareContent:B=!1,hideHeaderBar:F=!1,brandHref:G="/",hideAccountCard:W=!1})=>{const K=y(),q=void 0===b?K?null:g:b,[X,V]=r.useState(L);r.useEffect((()=>{V(L)}),[L]);const Y=r.useMemo((()=>M(d,m)),[d,m]),J=r.useMemo((()=>((e,t)=>{let r;const o=(e,i)=>{(e??[]).forEach(((e,n)=>{const a=H(e,n);if(e.path&&t.startsWith(e.path)){const o=t===e.path,n=e.path.length+(o?1:0);(!r||n>r.length)&&(r={key:a,parents:i,length:n})}e.children?.length&&o(e.children,[...i,a])}))};return o(e,[]),{selectedKey:r?.key,openKeys:r?.parents??[]}})(d,c)),[d,c]),[Q,Z]=r.useState((()=>J.openKeys));r.useEffect((()=>{Z((e=>Array.from(new Set([...e,...J.openKeys]))))}),[J.openKeys.join("|")]);const ee=e=>{V(e),k?.(e)},te=J.selectedKey?[J.selectedKey]:[],re=e.jsxs(T,{href:G,$collapsed:!N&&X,children:[l?e.jsx("img",{src:l,alt:s}):e.jsx("span",{className:"hisd3-brand-mark","aria-hidden":!0}),(N||!X)&&e.jsx("h1",{children:s})]}),oe=B?n:e.jsx(z,{children:n});if("undefined"==typeof document)return null;const ie=e.jsx(t.App,{component:!1,children:e.jsx(t.Spin,{spinning:$,size:"large",children:A?e.jsx(e.Fragment,{children:n}):N?e.jsxs(I,{children:[e.jsxs(D,{children:[re,e.jsx(t.Menu,{mode:"horizontal",items:Y,selectedKeys:te}),f,!W&&e.jsx(_,{account:a,avatarSrc:h,settingsUrl:x,onLogout:p,placement:"bottomRight",extraItems:v})]}),oe]}):e.jsxs(I,{hasSider:!0,children:[e.jsxs(P,{className:"hisd3-sider",width:R,collapsedWidth:S,collapsible:!0,collapsed:X,trigger:null,theme:"light",breakpoint:"lg",onBreakpoint:e=>{e&&ee(!0)},children:[re,e.jsx(j,{className:X?"hisd3-collapsed":void 0,children:e.jsx(t.Menu,{mode:"inline",theme:"light",inlineCollapsed:X,items:Y,selectedKeys:te,openKeys:X?void 0:Q,onOpenChange:e=>Z(e)})}),!W&&e.jsx(_,{account:a,avatarSrc:h,settingsUrl:x,onLogout:p,collapsed:X,placement:"topRight",extraItems:v})]}),e.jsxs(t.Layout,{style:{background:"transparent"},children:[!F&&e.jsxs(E,{children:[!O&&e.jsx(C,{type:"button","aria-label":X?"Expand menu":"Collapse menu",onClick:()=>ee(!X),children:X?e.jsx(i.MenuUnfoldOutlined,{}):e.jsx(i.MenuFoldOutlined,{})}),e.jsx("span",{style:{flex:1}}),f]}),oe]})]})})});return K&&!u?q?e.jsx(t.ConfigProvider,{theme:q,children:ie}):ie:e.jsx(o.ThemeProvider,{theme:u??{},children:q?e.jsx(t.ConfigProvider,{theme:q,children:ie}):ie})},exports.HISD3Table=function({pagination:r,footer:o,...n}){const a=r||void 0,l=a?.pageSizeOptions??[10,20,50];return e.jsxs(ue,{children:[e.jsx(t.Table,{...n,pagination:!1}),o&&e.jsx(xe,{children:o}),a&&e.jsxs(ge,{children:[e.jsx("span",{className:"hisd3-total",children:(a.renderTotal??me)(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(i.LeftOutlined,{})}):"next"===r?e.jsx("span",{className:"ant-pagination-item-link",children:e.jsx(i.RightOutlined,{})}):o}),!a.hidePageSize&&e.jsx(be,{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(ye,{...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,...i})=>e.jsx(we,{$variant:t,$tone:r,...i,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=V,exports.UserMenu=_,exports.borderVarsCss=x,exports.createHisd3Theme=u,exports.getInitials=pe,exports.hisd3AntdTheme=g,exports.resolvePrimary=c,exports.tint=h,exports.useInsideHISD3Provider=y;
|
|
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;
|
|
879
899
|
//# sourceMappingURL=index.cjs.js.map
|