hisd3-ui-kit 5.0.0 → 5.1.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 CHANGED
@@ -116,7 +116,8 @@ const menuItems = [
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`. |
118
118
  | `HISD3Button` | `variant`: `primary` (filled), `secondary` (default, dark 2px outline), `ghost`, `danger`. Accepts all antd `Button` props (`icon`, `size`, `loading`, …). |
119
- | `HISD3Input` / `HISD3SearchInput` | 2px-bordered input; the search variant is the grey filled hero field with a leading icon (`compact` for a 48px version). |
119
+ | `HISD3Input` / `HISD3SearchInput` | 2px-bordered input; the search variant is a light field with a leading icon and a visible border, lighter than the page so it never reads as disabled. `size`: `"small"` 32px, `"middle"` 40px (default), `"large"` 56px. Colours: `--hisd3-input-bg`, `--hisd3-input-bg-hover`, `--hisd3-input-border-hover`. |
120
+ | `HISD3Select` | antd `Select` that wraps long text instead of cutting it with "…", and shows an option's `description` on a second line. See [Select](#select). |
120
121
  | `HISD3Form*` fields | Every antd data-entry control pre-wrapped in `Form.Item`, with `loading` skeletons. See *Form fields* below. |
121
122
  | `HISD3HeaderActions` | Spacing wrapper for the top-right controls; `divided` inserts a rule before the last child. |
122
123
  | `HISD3NotificationButton` | Soft-grey circular button with a solid bell glyph and a count pill on its top-right edge; tints to the primary color while its panel is open. Pass `icon` to swap the glyph. Props: `items` (`{ id, title, description, time, unread, avatarSrc, icon, onClick }`), `count` (defaults to the unread tally), `loading`, `size` (default 40), `icon`, `onMarkAllRead`, `onSeeAll`, `emptyText`. |
@@ -202,6 +203,42 @@ logo is used. `HISD3_LOGO_SRC` is exported if you need the mark elsewhere.
202
203
  `primary` accepts the brand presets `"brand"` (the logo's gear, `#E5533B`) and
203
204
  `"brandBlue"` (its cloud, `#1B6FE0`), any other preset, or a hex value.
204
205
 
206
+ ## Select
207
+
208
+ `HISD3Select` is antd's `Select` with two additions, and takes every `Select`
209
+ prop. `HISD3FormSelect` uses it, so both work the same way.
210
+
211
+ - **Long text wraps** — in the chosen value and in every option — instead of
212
+ being cut off with "…". On by default; `wrap={false}` turns it off.
213
+ - **`description` on an option** is shown under its label, smaller and muted,
214
+ in the dropdown and in the box. With `showSearch`, typing matches the label
215
+ and the description.
216
+
217
+ `monoLabel` puts the label line in a monospace font, for codes:
218
+
219
+ ```tsx
220
+ <HISD3Select
221
+ showSearch
222
+ monoLabel
223
+ placeholder="Search an account…"
224
+ options={accounts.map((a) => ({ value: a.code, label: a.code, description: a.title }))}
225
+ />
226
+
227
+ <HISD3FormSelect
228
+ name="accountCode"
229
+ label="Account"
230
+ fieldProps={{ showSearch: true, monoLabel: true, options: accountOptions }}
231
+ />
232
+ ```
233
+
234
+ Your own `optionRender`, `labelRender`, `filterOption` or `optionFilterProp`
235
+ replaces the default. `HISD3SelectLabel` renders the same two-line layout for a
236
+ custom `optionRender` / `labelRender`.
237
+
238
+ Wrapped rows are not all one height, so `virtual` is off while `wrap` is on.
239
+ For a list of thousands of options, pass `virtual` (or search on the server and
240
+ show a capped list). Tags in `mode="multiple"` stay on one line.
241
+
205
242
  ## Form fields
206
243
 
207
244
  Each `HISD3Form*` field is an antd control inside a `Form.Item`. It takes every
@@ -225,7 +262,7 @@ Each `HISD3Form*` field is an antd control inside a `Form.Item`. It takes every
225
262
  | `HISD3FormInputNumber` | `InputNumber` | number |
226
263
  | `HISD3FormAutoComplete` | `AutoComplete` | string |
227
264
  | `HISD3FormMentions` | `Mentions` | string |
228
- | `HISD3FormSelect` | `Select` | value / value[] |
265
+ | `HISD3FormSelect` | `HISD3Select` | value / value[] |
229
266
  | `HISD3FormTreeSelect` | `TreeSelect` | value / value[] |
230
267
  | `HISD3FormCascader` | `Cascader` | path array |
231
268
  | `HISD3FormRadioGroup` | `Radio.Group` | value |
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("antd"),r=require("react"),o=require("styled-components"),i=require("@ant-design/icons");function n(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===r&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}n('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}');n('@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},s={brand:"#E5533B",brandBlue:"#1B6FE0",red:"#E5401C",orange:"#F26B1D",teal:"#00796B",blue:"#1D5FD1",green:"#2E7D32",purple:"#6A3FD6"},l={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")=>s[e]??e,h=(e,t)=>{const r=e.replace("#",""),o=3===r.length?r.split("").map((e=>e+e)).join(""):r,i=parseInt(o,16);return`#${[i>>16&255,i>>8&255,255&i].map((e=>(e=>Math.round(e*(1-t)))(e).toString(16).padStart(2,"0"))).join("")}`},x=(e,t)=>{const r=e.replace("#",""),o=3===r.length?r.split("").map((e=>e+e)).join(""):r,i=parseInt(o,16),n=i>>8&255,a=255&i,s=e=>Math.round(e+(255-e)*t);return`#${[s(i>>16&255),s(n),s(a)].map((e=>e.toString(16).padStart(2,"0"))).join("")}`},g=({primary:e,radius:t=0,borders:r="hairline",lineWidth:o,overrides:i}={})=>{const n=c(e),s=d[r]??d.hairline,g=o??s.width,u={...l,border:s.border,borderSecondary:s.borderSecondary},m={cssVar:{key:"hisd3"},token:{colorPrimary:n,colorInfo:n,colorLink:n,colorPrimaryBg:x(n,.92),colorPrimaryBgHover:x(n,.86),colorPrimaryBorder:x(n,.6),fontFamily:p,fontSize:14,fontWeightStrong:700,borderRadius:t,borderRadiusLG:t,borderRadiusSM:t,borderRadiusXS:t,lineWidth:g,colorBgLayout:u.bgLayout,colorBgContainer:u.bgContainer,colorBgElevated:u.bgElevated,colorText:u.text,colorTextSecondary:u.textSecondary,colorTextTertiary:u.textTertiary,colorTextHeading:u.text,colorBorder:u.border,colorBorderSecondary:u.borderSecondary,colorSplit:u.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:u.bgLayout,headerBg:u.bgLayout,bodyBg:u.bgLayout,headerPadding:`0 ${a.pageGutter}px`},Menu:{itemBg:"transparent",subMenuItemBg:"transparent",itemColor:u.text,itemHoverColor:u.text,itemHoverBg:"rgba(0,0,0,0.04)",itemSelectedBg:x(n,.9),itemSelectedColor:n,itemActiveBg:x(n,.86),subMenuItemSelectedColor:n,groupTitleColor:u.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:u.border,defaultColor:u.text,defaultBg:u.bgLayout,defaultHoverBg:u.white,defaultHoverBorderColor:u.borderStrong,defaultHoverColor:u.text,defaultActiveBorderColor:u.borderStrong,paddingInline:16,contentFontSize:14,contentFontSizeLG:16,contentFontSizeSM:13},Input:{activeShadow:"none",colorBorder:u.border,hoverBorderColor:u.borderStrong,activeBorderColor:u.borderStrong,paddingInline:16},Select:{optionSelectedBg:x(n,.9),colorBorder:u.border},Table:{headerBg:u.bgContainer,headerColor:u.textTertiary,headerSplitColor:"transparent",headerBorderRadius:0,borderColor:u.borderSecondary,rowHoverBg:h(u.bgContainer,.03),cellPaddingBlock:10,cellPaddingInline:12,cellFontSize:14,cellPaddingBlockMD:8,cellPaddingInlineMD:10,cellPaddingBlockSM:6,cellPaddingInlineSM:8,cellFontSizeMD:14,cellFontSizeSM:13,footerBg:u.bgContainer},Tabs:{inkBarColor:n,itemColor:u.text,itemSelectedColor:n,itemHoverColor:n,titleFontSize:15,horizontalItemGutter:32,horizontalMargin:"0",lineWidthBold:4},Tag:{borderRadiusSM:0,defaultBg:"transparent"},Pagination:{itemBg:u.bgLayout,itemActiveBg:n,itemSize:32,itemSizeSM:26,itemInputBg:u.bgLayout},Dropdown:{paddingBlock:10},Breadcrumb:{itemColor:u.textTertiary,lastItemColor:u.text,linkColor:u.textTertiary,linkHoverColor:n,separatorColor:u.textTertiary},Card:{headerFontSize:20}}};return i?{...m,...i,token:{...m.token,...i.token},components:{...m.components,...i.components}}:m},u=({primary:e,borders:t="hairline",lineWidth:r,radius:o=0}={})=>{const i=c(e),n=d[t]??d.hairline,a=l;return[":root{",`--hisd3-rule-width:${r??n.width}px;`,`--hisd3-control-bg:${a.bgFilled};`,`--hisd3-control-bg-hover:${a.bgFilledHover};`,"--hisd3-popup-radius:10px;",`--hisd3-radius:${o}px;`,`--ant-color-primary:${i};`,`--ant-color-primary-bg:${x(i,.92)};`,`--ant-color-primary-bg-hover:${x(i,.86)};`,`--ant-color-primary-border:${x(i,.6)};`,`--ant-color-error:${i===s.red?i:"#E5401C"};`,`--ant-color-text:${a.text};`,`--ant-color-text-secondary:${a.textSecondary};`,`--ant-color-text-tertiary:${a.textTertiary};`,`--hisd3-table-bg:${a.bgContainer};`,`--hisd3-table-hover-bg:${h(a.bgContainer,.03)};`,`--hisd3-border:${n.border};`,`--hisd3-border-secondary:${n.borderSecondary};`,`--ant-color-border:${n.border};`,`--ant-color-border-secondary:${n.borderSecondary};`,`--ant-color-bg-layout:${a.bgLayout};`,`--ant-color-bg-elevated:${a.bgElevated};`,"}"].join("")},m=g(),b={primary:s.red,primaryLight:x(s.red,.9),headerSelectedBg:"rgba(0,0,0,0.04)"},f=r.createContext(!1),y=()=>r.useContext(f),{Header:v,Content:w}=t.Layout,S=a.siderWidth,D=a.siderCollapsedWidth,A=a.topBarHeight,k=o(t.Layout)`
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("antd"),r=require("react"),o=require("styled-components"),i=require("@ant-design/icons");function n(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===r&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}n('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}');n('@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-input-bg:#faf9f7;--hisd3-input-bg-hover:#fff;--hisd3-input-border-hover:#b9b4ac;--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}.hisd3-wrap-popup.ant-select-dropdown .ant-select-item,.hisd3-wrap-select.ant-select-dropdown .ant-select-item{height:auto;min-height:32px;padding-block:6px}.hisd3-wrap-popup.ant-select-dropdown .ant-select-item-option-content,.hisd3-wrap-select.ant-select .ant-select-selection-item,.hisd3-wrap-select.ant-select-dropdown .ant-select-item-option-content,.hisd3-wrap-select.ant-select-single .ant-select-content{line-height:1.35;overflow:visible;overflow-wrap:anywhere;text-overflow:clip;white-space:normal}.hisd3-select-label{line-height:1.35;min-width:0;overflow-wrap:anywhere;padding-block:2px;white-space:normal}.hisd3-select-label-description{color:var(--ant-color-text-secondary,rgba(0,0,0,.55));font-size:12px;font-weight:400}');const a={siderWidth:260,siderCollapsedWidth:64,topBarHeight:60,pageGutter:28},s={brand:"#E5533B",brandBlue:"#1B6FE0",red:"#E5401C",orange:"#F26B1D",teal:"#00796B",blue:"#1D5FD1",green:"#2E7D32",purple:"#6A3FD6"},l={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")=>s[e]??e,h=(e,t)=>{const r=e.replace("#",""),o=3===r.length?r.split("").map((e=>e+e)).join(""):r,i=parseInt(o,16);return`#${[i>>16&255,i>>8&255,255&i].map((e=>(e=>Math.round(e*(1-t)))(e).toString(16).padStart(2,"0"))).join("")}`},x=(e,t)=>{const r=e.replace("#",""),o=3===r.length?r.split("").map((e=>e+e)).join(""):r,i=parseInt(o,16),n=i>>8&255,a=255&i,s=e=>Math.round(e+(255-e)*t);return`#${[s(i>>16&255),s(n),s(a)].map((e=>e.toString(16).padStart(2,"0"))).join("")}`},g=({primary:e,radius:t=0,borders:r="hairline",lineWidth:o,overrides:i}={})=>{const n=c(e),s=d[r]??d.hairline,g=o??s.width,u={...l,border:s.border,borderSecondary:s.borderSecondary},m={cssVar:{key:"hisd3"},token:{colorPrimary:n,colorInfo:n,colorLink:n,colorPrimaryBg:x(n,.92),colorPrimaryBgHover:x(n,.86),colorPrimaryBorder:x(n,.6),fontFamily:p,fontSize:14,fontWeightStrong:700,borderRadius:t,borderRadiusLG:t,borderRadiusSM:t,borderRadiusXS:t,lineWidth:g,colorBgLayout:u.bgLayout,colorBgContainer:u.bgContainer,colorBgElevated:u.bgElevated,colorText:u.text,colorTextSecondary:u.textSecondary,colorTextTertiary:u.textTertiary,colorTextHeading:u.text,colorBorder:u.border,colorBorderSecondary:u.borderSecondary,colorSplit:u.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:u.bgLayout,headerBg:u.bgLayout,bodyBg:u.bgLayout,headerPadding:`0 ${a.pageGutter}px`},Menu:{itemBg:"transparent",subMenuItemBg:"transparent",itemColor:u.text,itemHoverColor:u.text,itemHoverBg:"rgba(0,0,0,0.04)",itemSelectedBg:x(n,.9),itemSelectedColor:n,itemActiveBg:x(n,.86),subMenuItemSelectedColor:n,groupTitleColor:u.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:u.border,defaultColor:u.text,defaultBg:u.bgLayout,defaultHoverBg:u.white,defaultHoverBorderColor:u.borderStrong,defaultHoverColor:u.text,defaultActiveBorderColor:u.borderStrong,paddingInline:16,contentFontSize:14,contentFontSizeLG:16,contentFontSizeSM:13},Input:{activeShadow:"none",colorBorder:u.border,hoverBorderColor:u.borderStrong,activeBorderColor:u.borderStrong,paddingInline:16},Select:{optionSelectedBg:x(n,.9),colorBorder:u.border},Table:{headerBg:u.bgContainer,headerColor:u.textTertiary,headerSplitColor:"transparent",headerBorderRadius:0,borderColor:u.borderSecondary,rowHoverBg:h(u.bgContainer,.03),cellPaddingBlock:10,cellPaddingInline:12,cellFontSize:14,cellPaddingBlockMD:8,cellPaddingInlineMD:10,cellPaddingBlockSM:6,cellPaddingInlineSM:8,cellFontSizeMD:14,cellFontSizeSM:13,footerBg:u.bgContainer},Tabs:{inkBarColor:n,itemColor:u.text,itemSelectedColor:n,itemHoverColor:n,titleFontSize:15,horizontalItemGutter:32,horizontalMargin:"0",lineWidthBold:4},Tag:{borderRadiusSM:0,defaultBg:"transparent"},Pagination:{itemBg:u.bgLayout,itemActiveBg:n,itemSize:32,itemSizeSM:26,itemInputBg:u.bgLayout},Dropdown:{paddingBlock:10},Breadcrumb:{itemColor:u.textTertiary,lastItemColor:u.text,linkColor:u.textTertiary,linkHoverColor:n,separatorColor:u.textTertiary},Card:{headerFontSize:20}}};return i?{...m,...i,token:{...m.token,...i.token},components:{...m.components,...i.components}}:m},u=({primary:e,borders:t="hairline",lineWidth:r,radius:o=0}={})=>{const i=c(e),n=d[t]??d.hairline,a=l;return[":root{",`--hisd3-rule-width:${r??n.width}px;`,`--hisd3-control-bg:${a.bgFilled};`,`--hisd3-control-bg-hover:${a.bgFilledHover};`,"--hisd3-popup-radius:10px;",`--hisd3-radius:${o}px;`,`--ant-color-primary:${i};`,`--ant-color-primary-bg:${x(i,.92)};`,`--ant-color-primary-bg-hover:${x(i,.86)};`,`--ant-color-primary-border:${x(i,.6)};`,`--ant-color-error:${i===s.red?i:"#E5401C"};`,`--ant-color-text:${a.text};`,`--ant-color-text-secondary:${a.textSecondary};`,`--ant-color-text-tertiary:${a.textTertiary};`,`--hisd3-table-bg:${a.bgContainer};`,`--hisd3-table-hover-bg:${h(a.bgContainer,.03)};`,`--hisd3-border:${n.border};`,`--hisd3-border-secondary:${n.borderSecondary};`,`--ant-color-border:${n.border};`,`--ant-color-border-secondary:${n.borderSecondary};`,`--ant-color-bg-layout:${a.bgLayout};`,`--ant-color-bg-elevated:${a.bgElevated};`,"}"].join("")},m=g(),b={primary:s.red,primaryLight:x(s.red,.9),headerSelectedBg:"rgba(0,0,0,0.04)"},f=r.createContext(!1),v=()=>r.useContext(f),{Header:y,Content:w}=t.Layout,S=a.siderWidth,D=a.siderCollapsedWidth,A=a.topBarHeight,k=o(t.Layout)`
2
2
  position: relative; /* anchor for the edge collapse trigger */
3
3
  background: var(--ant-color-bg-layout);
4
4
 
@@ -153,7 +153,7 @@
153
153
  overflow: hidden;
154
154
  text-overflow: ellipsis;
155
155
  }
156
- `,C=o(v)`
156
+ `,C=o(y)`
157
157
  display: flex;
158
158
  align-items: center;
159
159
  gap: 24px;
@@ -176,7 +176,7 @@
176
176
  font-size: 14px;
177
177
  font-weight: 500;
178
178
  }
179
- `,z=o(v)`
179
+ `,F=o(y)`
180
180
  display: flex;
181
181
  align-items: center;
182
182
  gap: 12px;
@@ -189,7 +189,7 @@
189
189
  z-index: 99;
190
190
  background: var(--ant-color-bg-layout);
191
191
  border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));
192
- `,F=o.button`
192
+ `,z=o.button`
193
193
  border: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));
194
194
  background: transparent;
195
195
  cursor: pointer;
@@ -245,10 +245,10 @@
245
245
  & svg {
246
246
  display: block;
247
247
  }
248
- `,B=o(w)`
248
+ `,R=o(w)`
249
249
  flex: 1 0 auto;
250
250
  padding: 24px ${a.pageGutter}px 40px;
251
- `,R=o.div`
251
+ `,N=o.div`
252
252
  flex: 0 0 auto;
253
253
  display: flex;
254
254
  flex-direction: column;
@@ -262,7 +262,7 @@
262
262
  & .ant-dropdown-link {
263
263
  color: inherit;
264
264
  }
265
- `,N=o.a`
265
+ `,B=o.a`
266
266
  display: flex;
267
267
  align-items: center;
268
268
  justify-content: center;
@@ -323,7 +323,7 @@
323
323
  overflow: hidden;
324
324
  text-overflow: ellipsis;
325
325
  white-space: nowrap;
326
- `,G=(e,t)=>e.key??e.path??`menu-${t}`,$=(e,t)=>(e??[]).filter((e=>e&&!e.hideInMenu)).map(((e,r)=>{const o=G(e,r);return Array.isArray(e.children)&&e.children.length>0?{key:o,icon:e.icon,label:e.name,disabled:e.disabled,type:e.group?"group":void 0,children:$(e.children,t)}:{key:o,icon:e.icon,disabled:e.disabled,label:t(e,e.name)}})),q=(e,t)=>r.createElement("a",{href:e.path||"/"},t),Q=({account:r,avatarSrc:o,settingsUrl:n,onLogout:a,collapsed:s=!1,placement:l="topRight",extraItems:d=[]})=>{const{modal:p}=t.App.useApp(),c=[...d??[],{key:"settings",icon:e.jsx(i.SettingOutlined,{}),label:"Settings",onClick:()=>{window.location.href=n??"/settings"}},{key:"logout",icon:e.jsx(i.LogoutOutlined,{}),label:"Logout",onClick:()=>{p.confirm({title:"Are you sure you want to logout?",content:"Please click OK to continue",icon:e.jsx(i.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(R,{className:"cr-user-info-light",$collapsed:s,$inHeader:"bottomRight"===l,children:e.jsx(t.Dropdown,{trigger:["click"],placement:l,menu:{items:c},children:e.jsxs(N,{className:"ant-dropdown-link",onClick:e=>e.preventDefault(),children:[e.jsx(H,{$src:o,"aria-hidden":!0,children:!o&&h}),!s&&e.jsxs(L,{children:[e.jsxs(P,{children:[e.jsx(M,{title:r.fullName,children:r.fullName}),e.jsx(U,{children:e.jsx(i.DownOutlined,{})})]}),r.positionType&&e.jsx(O,{title:r.positionType,children:r.positionType})]})]})})})},{Sider:K}=t.Layout,W=a.pageGutter,V=o.header`
326
+ `,G=(e,t)=>e.key??e.path??`menu-${t}`,$=(e,t)=>(e??[]).filter((e=>e&&!e.hideInMenu)).map(((e,r)=>{const o=G(e,r);return Array.isArray(e.children)&&e.children.length>0?{key:o,icon:e.icon,label:e.name,disabled:e.disabled,type:e.group?"group":void 0,children:$(e.children,t)}:{key:o,icon:e.icon,disabled:e.disabled,label:t(e,e.name)}})),q=(e,t)=>r.createElement("a",{href:e.path||"/"},t),Q=({account:r,avatarSrc:o,settingsUrl:n,onLogout:a,collapsed:s=!1,placement:l="topRight",extraItems:d=[]})=>{const{modal:p}=t.App.useApp(),c=[...d??[],{key:"settings",icon:e.jsx(i.SettingOutlined,{}),label:"Settings",onClick:()=>{window.location.href=n??"/settings"}},{key:"logout",icon:e.jsx(i.LogoutOutlined,{}),label:"Logout",onClick:()=>{p.confirm({title:"Are you sure you want to logout?",content:"Please click OK to continue",icon:e.jsx(i.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(N,{className:"cr-user-info-light",$collapsed:s,$inHeader:"bottomRight"===l,children:e.jsx(t.Dropdown,{trigger:["click"],placement:l,menu:{items:c},children:e.jsxs(B,{className:"ant-dropdown-link",onClick:e=>e.preventDefault(),children:[e.jsx(H,{$src:o,"aria-hidden":!0,children:!o&&h}),!s&&e.jsxs(L,{children:[e.jsxs(P,{children:[e.jsx(M,{title:r.fullName,children:r.fullName}),e.jsx(U,{children:e.jsx(i.DownOutlined,{})})]}),r.positionType&&e.jsx(O,{title:r.positionType,children:r.positionType})]})]})})})},{Sider:K}=t.Layout,W=a.pageGutter,V=o.header`
327
327
  display: contents;
328
328
  `,Y=o.div`
329
329
  user-select: none;
@@ -806,14 +806,14 @@
806
806
  text-decoration: underline;
807
807
  }
808
808
  }
809
- `,ye=o.div`
809
+ `,ve=o.div`
810
810
  margin-bottom: 16px;
811
811
  padding: 10px 14px;
812
812
  font-size: 13px;
813
813
  color: var(--ant-color-error, #e5401c);
814
814
  background: rgba(229, 64, 28, 0.08);
815
815
  border-left: 3px solid var(--ant-color-error, #e5401c);
816
- `,ve=o.p`
816
+ `,ye=o.p`
817
817
  margin: 20px 0 0;
818
818
  text-align: center;
819
819
  font-size: 14px;
@@ -971,7 +971,7 @@
971
971
  flex: 0 0 auto;
972
972
  border-radius: 50%;
973
973
  background: var(--ant-color-primary);
974
- `,ze=o.button`
974
+ `,Fe=o.button`
975
975
  display: block;
976
976
  width: 100%;
977
977
  padding: 12px 16px;
@@ -988,7 +988,7 @@
988
988
  &:hover {
989
989
  background: rgba(0, 0, 0, 0.04);
990
990
  }
991
- `,Fe=o.div`
991
+ `,ze=o.div`
992
992
  padding: 28px 16px;
993
993
  `,Te=o.button`
994
994
  user-select: none;
@@ -1026,7 +1026,7 @@
1026
1026
  display: block;
1027
1027
  border-radius: inherit;
1028
1028
  }
1029
- `,Be=o.span`
1029
+ `,Re=o.span`
1030
1030
  position: absolute;
1031
1031
  right: ${({$size:e})=>-Math.round(.05*e)}px;
1032
1032
  bottom: ${({$size:e})=>-Math.round(.05*e)}px;
@@ -1047,7 +1047,7 @@
1047
1047
  & svg {
1048
1048
  display: block;
1049
1049
  }
1050
- `,Re=o.div`
1050
+ `,Ne=o.div`
1051
1051
  display: flex;
1052
1052
  align-items: center;
1053
1053
  gap: 12px;
@@ -1082,7 +1082,7 @@
1082
1082
  overflow: hidden;
1083
1083
  text-overflow: ellipsis;
1084
1084
  }
1085
- `,Ne=o.span`
1085
+ `,Be=o.span`
1086
1086
  width: 40px;
1087
1087
  height: 40px;
1088
1088
  flex: 0 0 auto;
@@ -1339,17 +1339,26 @@
1339
1339
  font-size: 15px;
1340
1340
  }
1341
1341
  `,Ze=r.forwardRef(((t,r)=>e.jsx(Ye,{...t,ref:r})));Ze.displayName="HISD3Input";const Je=o(Ye)`
1342
- /* default: the same 40px control height as buttons and selects */
1342
+ /*
1343
+ * default: the same 40px control height as buttons and selects.
1344
+ * Lighter than the page with a visible border, so it reads as a field to
1345
+ * type in; a fill darker than the page reads as disabled.
1346
+ */
1343
1347
  &.ant-input-affix-wrapper {
1344
- background: var(--hisd3-bg-filled, #e6e4e1);
1345
- border-color: var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));
1348
+ background: var(--hisd3-input-bg, #FAF9F7);
1349
+ border-color: var(--hisd3-border, var(--ant-color-border, #D9D5CE));
1346
1350
  height: 40px;
1347
1351
  padding-inline: 14px;
1348
1352
 
1349
- &:hover,
1353
+ &:hover {
1354
+ border-color: var(--hisd3-input-border-hover, #B9B4AC);
1355
+ background: var(--hisd3-input-bg-hover, #FFFFFF);
1356
+ }
1357
+
1350
1358
  &:focus-within {
1351
- border-color: var(--hisd3-border, var(--ant-color-border, #D9D5CE));
1352
- background: var(--hisd3-bg-filled, #e6e4e1);
1359
+ border-color: var(--ant-color-primary);
1360
+ background: var(--hisd3-input-bg-hover, #FFFFFF);
1361
+ box-shadow: 0 0 0 3px var(--ant-color-primary-bg, rgba(0, 121, 107, 0.12));
1353
1362
  }
1354
1363
 
1355
1364
  .ant-input {
@@ -1360,6 +1369,7 @@
1360
1369
  .ant-input-prefix {
1361
1370
  margin-inline-end: 10px;
1362
1371
  font-size: 15px;
1372
+ color: var(--ant-color-text-secondary);
1363
1373
  }
1364
1374
  }
1365
1375
 
@@ -1390,7 +1400,7 @@
1390
1400
  font-size: 19px;
1391
1401
  }
1392
1402
  }
1393
- `,Xe={small:"hisd3-search-sm",middle:"",large:"hisd3-search-lg"},_e=r.forwardRef((({size:t,compact:r,className:o,...n},a)=>e.jsx(Je,{ref:a,allowClear:!0,prefix:e.jsx(i.SearchOutlined,{}),className:[Xe[t??(r?"small":"middle")],o??""].join(" ").trim(),...n})));_e.displayName="HISD3SearchInput";const et=o(t.Form.Item)`
1403
+ `,Xe={small:"hisd3-search-sm",middle:"",large:"hisd3-search-lg"},_e=r.forwardRef((({size:t,compact:r,className:o,...n},a)=>e.jsx(Je,{ref:a,allowClear:!0,prefix:e.jsx(i.SearchOutlined,{}),className:[Xe[t??(r?"small":"middle")],o??""].join(" ").trim(),...n})));_e.displayName="HISD3SearchInput";const et=({label:t,description:r,mono:o})=>e.jsxs("div",{className:"hisd3-select-label",children:[e.jsx("div",{className:"hisd3-select-label-primary",style:o?{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"}:void 0,children:t}),null!=r&&""!==r?e.jsx("div",{className:"hisd3-select-label-description",children:r}):null]}),tt=e=>"string"==typeof e||"number"==typeof e?String(e):"",rt=e=>(e??[]).flatMap((e=>Array.isArray(e.options)?rt(e.options):[e])),ot=(e,t)=>{if(!t)return!1;return`${tt(t.label??t.value)} ${tt(t.description)}`.toUpperCase().includes(e.toUpperCase())},it=(...e)=>e.filter(Boolean).join(" "),nt=r.forwardRef((({wrap:o=!0,monoLabel:i,options:n,mode:a,showSearch:s,filterOption:l,optionFilterProp:d,optionRender:p,labelRender:c,virtual:h,rootClassName:x,...g},u)=>{const m=r.useMemo((()=>new Map(rt(n).map((e=>[e.value,e])))),[n]),b=r.useMemo((()=>[...m.values()].some((e=>null!=e.description))),[m]),f=(t,r)=>null!=t?.description||i?e.jsx(et,{label:t?.label??r,description:t?.description,mono:i}):r,v="object"==typeof s?s:void 0,y=void 0!==l||void 0!==d||void 0!==v?.filterOption||void 0!==v?.optionFilterProp;return e.jsx(t.Select,{...g,ref:u,mode:a,options:n,showSearch:s,optionFilterProp:d,filterOption:l??(!y&&b?ot:void 0),optionRender:p??(e=>f(e.data,e.label??e.value)),labelRender:c??(a?void 0:({label:e,value:t})=>f(m.get(t),e??t)),virtual:h??(!o&&void 0),rootClassName:it(o&&"hisd3-wrap-select",x)})}));nt.displayName="HISD3Select";const at=o(t.Form.Item)`
1394
1404
  &.ant-form-item {
1395
1405
  margin-bottom: 6px;
1396
1406
  }
@@ -1410,5 +1420,5 @@
1410
1420
  .ant-input-number-group-wrapper {
1411
1421
  width: 100%;
1412
1422
  }
1413
- `,tt=({node:t})=>e.jsx(e.Fragment,{children:t}),rt=({loading:r,loadingProps:o,vertical:i,bolderLabel:n,controlSize:a,skeleton:s,layout:l,className:d,children:p,...c})=>e.jsx(et,{...c,layout:i?"vertical":l,className:["hisd3-form-field",n?"hisd3-form-field-bold":"",d??""].join(" ").trim(),children:r?e.jsx(tt,{node:s??e.jsx(t.Skeleton.Input,{active:!0,block:!0,size:a,...o})}):p}),ot=r=>e.jsx(t.Skeleton.Button,{active:!0,size:"small",style:{width:r,minWidth:r}}),it=r.forwardRef((({fieldProps:t,propsinput:r,...o},i)=>{const n={...r,...t};return e.jsx(rt,{...o,controlSize:n.size,children:e.jsx(Ze,{...n,ref:i})})}));it.displayName="HISD3FormInput";const nt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:r?.size,children:e.jsx(t.Input.Password,{...r,ref:i})})));nt.displayName="HISD3FormPassword";const at=r.forwardRef((({fieldProps:r,loadingProps:o,...i},n)=>e.jsx(rt,{...i,controlSize:r?.size,loadingProps:{...o,style:{height:22*(r?.rows??3)+10,...o?.style}},children:e.jsx(t.Input.TextArea,{...r,ref:n})})));at.displayName="HISD3FormTextArea";const st=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:r?.size,children:e.jsx(t.InputNumber,{...r,ref:i})})));st.displayName="HISD3FormInputNumber";const lt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:r?.size,children:e.jsx(t.Select,{...r,ref:i})})));lt.displayName="HISD3FormSelect";const dt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:r?.size,children:e.jsx(t.Radio.Group,{...r,ref:i})})));dt.displayName="HISD3FormRadioGroup";const pt=r.forwardRef((({fieldProps:r,text:o,...i},n)=>e.jsx(rt,{valuePropName:"checked",skeleton:ot(120),...i,children:e.jsx(t.Checkbox,{...r,ref:n,children:o??r?.children})})));pt.displayName="HISD3FormCheckbox";const ct=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,children:e.jsx(t.Checkbox.Group,{...r,ref:i})})));ct.displayName="HISD3FormCheckboxGroup";const ht=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{valuePropName:"checked",skeleton:ot("small"===r?.size?28:44),...o,children:e.jsx(t.Switch,{...r,ref:i})})));ht.displayName="HISD3FormSwitch";const xt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:r?.size,children:e.jsx(t.DatePicker,{...r,ref:i})})));xt.displayName="HISD3FormDatePicker";const gt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:r?.size,children:e.jsx(t.DatePicker.RangePicker,{...r,ref:i})})));gt.displayName="HISD3FormRangePicker";const ut=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:r?.size,children:e.jsx(t.TimePicker,{...r,ref:i})})));ut.displayName="HISD3FormTimePicker";const mt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:r?.size,children:e.jsx(t.TimePicker.RangePicker,{...r,ref:i})})));mt.displayName="HISD3FormTimeRangePicker";const bt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:r?.size,children:e.jsx(t.Input.Search,{...r,ref:i})})));bt.displayName="HISD3FormSearch";const ft=r.forwardRef((({fieldProps:r,loadingProps:o,...i},n)=>e.jsx(rt,{...i,controlSize:r?.size,loadingProps:{block:!1,...o,style:{width:48*(r?.length??6),...o?.style}},children:e.jsx(t.Input.OTP,{...r,ref:n})})));ft.displayName="HISD3FormOTP";const yt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:r?.size,children:e.jsx(t.AutoComplete,{...r,ref:i})})));yt.displayName="HISD3FormAutoComplete";const vt=r.forwardRef((({fieldProps:r,loadingProps:o,...i},n)=>e.jsx(rt,{...i,controlSize:r?.size,loadingProps:{...o,style:{height:22*(r?.rows??1)+18,...o?.style}},children:e.jsx(t.Mentions,{...r,ref:n})})));vt.displayName="HISD3FormMentions";const wt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:r?.size,children:e.jsx(t.Cascader,{...r,ref:i})})));wt.displayName="HISD3FormCascader";const St=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:r?.size,children:e.jsx(t.TreeSelect,{...r,ref:i})})));St.displayName="HISD3FormTreeSelect";const Dt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,skeleton:ot(200),children:e.jsx(t.Segmented,{...r,options:r?.options??[],ref:i})})));Dt.displayName="HISD3FormSegmented";const At=r.forwardRef((({fieldProps:r,loadingProps:o,...i},n)=>e.jsx(rt,{valuePropName:"targetKeys",loadingProps:{...o,style:{height:200,...o?.style}},...i,children:e.jsx(t.Transfer,{...r,ref:n})})));At.displayName="HISD3FormTransfer";const kt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,controlSize:"small",children:e.jsx(t.Slider,{...r,ref:i})})));kt.displayName="HISD3FormSlider";const jt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(rt,{...o,skeleton:ot(28*(r?.count??5)),children:e.jsx(t.Rate,{...r,ref:i})})));jt.displayName="HISD3FormRate";const It=({fieldProps:r,...o})=>e.jsx(rt,{getValueFromEvent:(e,t)=>t,skeleton:e.jsx(t.Skeleton.Button,{active:!0,shape:"square"}),...o,children:e.jsx(t.ColorPicker,{...r})});It.displayName="HISD3FormColorPicker";const Et=e=>Array.isArray(e)?e:e?.fileList??[],Ct=({fieldProps:r,children:o,...i})=>e.jsx(rt,{valuePropName:"fileList",getValueFromEvent:Et,skeleton:e.jsx(t.Skeleton.Button,{active:!0}),...i,children:e.jsx(t.Upload,{...r,children:o??r?.children})});Ct.displayName="HISD3FormUpload";const zt=({fieldProps:r,children:o,loadingProps:i,...n})=>e.jsx(rt,{valuePropName:"fileList",getValueFromEvent:Et,loadingProps:{...i,style:{height:150,...i?.style}},...n,children:e.jsx(t.Upload.Dragger,{...r,children:o??r?.children})});zt.displayName="HISD3FormUploadDragger";const Ft=r.createContext(null);let Tt=0;function Bt({Component:t,props:o,onClose:i,unmount:n}){const[a,s]=r.useState(!0),l=r.useRef(!1),d={...o,open:a,hide:r.useCallback((e=>{l.current||(l.current=!0,s(!1),i?.(e),window.setTimeout(n,320))}),[i,n])};return e.jsx(t,{...d})}var Rt,Nt,Ht,Lt,Pt,Mt,Ut,Ot,Gt,$t,qt,Qt,Kt;exports.ThemeStyle=void 0,(Rt=exports.ThemeStyle||(exports.ThemeStyle={})).MODERN="modern",Rt.STANDARD="standard",exports.ThemeStyleRadius=void 0,(Nt=exports.ThemeStyleRadius||(exports.ThemeStyleRadius={})).MODERN="30px",Nt.STANDARD="16px",exports.ThemeMode=void 0,(Ht=exports.ThemeMode||(exports.ThemeMode={})).LIGHT="light",Ht.SEMI_DARK="semi-dark",Ht.DARK="dark",exports.LayoutType=void 0,(Lt=exports.LayoutType||(exports.LayoutType={})).FULL_WIDTH="full-width",Lt.BOXED="boxed",Lt.FRAMED="framed",exports.MenuStyle=void 0,(Pt=exports.MenuStyle||(exports.MenuStyle={})).DEFAULT="default",Pt.STANDARD="standard",Pt.ROUNDED="rounded",Pt.ROUNDED_REVERSE="rounded-reverse",Pt.CURVED_MENU="curved-menu",exports.NavStyle=void 0,(Mt=exports.NavStyle||(exports.NavStyle={})).DEFAULT="default",Mt.MINI="mini",Mt.MINI_SIDEBAR_TOGGLE="mini-sidebar-toggle",Mt.STANDARD="standard",Mt.HEADER_USER="user-header",Mt.HEADER_USER_MINI="user-mini-header",Mt.DRAWER="drawer",Mt.BIT_BUCKET="bit-bucket",Mt.H_DEFAULT="h-default",Mt.HOR_HEADER_FIXED="hor-header-fixed",Mt.HOR_DARK_LAYOUT="hor-dark-layout",exports.FooterType=void 0,(Ut=exports.FooterType||(exports.FooterType={})).FIXED="fixed",Ut.FLUID="fluid",exports.LayoutDirection=void 0,(Ot=exports.LayoutDirection||(exports.LayoutDirection={})).RTL="rtl",Ot.LTR="ltr",exports.HeaderType=void 0,(Gt=exports.HeaderType||(exports.HeaderType={})).DARK="dark",Gt.LIGHT="light",exports.RouteTransition=void 0,($t=exports.RouteTransition||(exports.RouteTransition={})).NONE="none",$t.FADE="fade",$t.SLIDE_LEFT="slideLeft",$t.SLIDE_RIGHT="slideRight",$t.SLIDE_UP="slideUp",$t.SLIDE_DOWN="slideDown",exports.Fonts=void 0,(qt=exports.Fonts||(exports.Fonts={})).LIGHT="300",qt.REGULAR="400",qt.MEDIUM="500",qt.BOLD="600",exports.AuthType=void 0,(Qt=exports.AuthType||(exports.AuthType={})).FIREBASE="firebase",Qt.AWS_COGNITO="aws_cognito",Qt.AUTH0="auth0",Qt.JWT_AUTH="jwt_auth",exports.AppAnimates=void 0,(Kt=exports.AppAnimates||(exports.AppAnimates={})).SLIDEUPIN="transition.slideUpIn",Kt.SLIDEUPOUT="transition.slideUpOut",Kt.SLIDEDOWNIN="transition.slideDownIn",Kt.SLIDEDOWNOUT="transition.slideDownOut",Kt.SLIDELEFTIN="transition.slideLeftIn",Kt.SLIDELEFTOUT="transition.slideLeftOut",Kt.SLIDERIGHTIN="transition.slideRightIn",Kt.SLIDERIGHTOUT="transition.slideRightOut",Kt.FADEIN="transition.fadeIn",Kt.FADEOUT="transition.fadeOut";var Wt,Vt;exports.MessageType=void 0,(Wt=exports.MessageType||(exports.MessageType={}))[Wt.MEDIA=1]="MEDIA",Wt[Wt.TEXT=2]="TEXT",exports.RoutePermittedRole=void 0,(Vt=exports.RoutePermittedRole||(exports.RoutePermittedRole={})).Admin="admin",Vt.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.DialogProvider=function({children:t}){const[o,i]=r.useState([]),n=r.useMemo((()=>({mount:(e,t)=>i((r=>[...r.filter((t=>t.id!==e)),{id:e,node:t}])),unmount:e=>i((t=>t.filter((t=>t.id!==e))))})),[]);return e.jsxs(Ft.Provider,{value:n,children:[t,o.map((t=>e.jsx(r.Fragment,{children:t.node},t.id)))]})},exports.HISD3AvatarMenu=({account:o,avatarSrc:n,settingsUrl:a="/settings",onSettings:s,onLogout:l,confirmLogout:d=!0,extraItems:p,shape:c="circle",size:h=40,hideChevron:x=!1,className:g})=>{const{modal:u}=t.App.useApp(),[m,b]=r.useState(!1),f=[...p??[],...null!==a||s?[{key:"settings",icon:e.jsx(i.SettingOutlined,{}),label:"Settings",onClick:()=>{s?s():a&&(window.location.href=a)}}]:[],{key:"logout",icon:e.jsx(i.LogoutOutlined,{}),label:"Logout",onClick:()=>{d?u.confirm({title:"Are you sure you want to logout?",content:"Please click OK to continue",icon:e.jsx(i.ExclamationCircleOutlined,{}),okText:"Logout",onOk:l}):l()}}];return e.jsx(t.Dropdown,{open:m,onOpenChange:b,trigger:["click"],placement:"bottomRight",menu:{items:f,onClick:()=>b(!1)},popupRender:t=>e.jsxs(He,{children:[e.jsxs(Re,{children:[e.jsx(Ne,{$src:n,children:!n&&Le(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(Te,{type:"button",className:g,$shape:c,$size:h,$open:m,"aria-label":`Account menu for ${o.fullName}`,children:[n?e.jsx("img",{src:n,alt:""}):Le(o.fullName),!x&&e.jsx(Be,{$size:h,$open:m,"aria-hidden":!0,children:e.jsx(i.DownOutlined,{})})]})})},exports.HISD3Button=re,exports.HISD3FormAutoComplete=yt,exports.HISD3FormCascader=wt,exports.HISD3FormCheckbox=pt,exports.HISD3FormCheckboxGroup=ct,exports.HISD3FormColorPicker=It,exports.HISD3FormDatePicker=xt,exports.HISD3FormField=rt,exports.HISD3FormInput=it,exports.HISD3FormInputNumber=st,exports.HISD3FormMentions=vt,exports.HISD3FormOTP=ft,exports.HISD3FormPassword=nt,exports.HISD3FormRadioGroup=dt,exports.HISD3FormRangePicker=gt,exports.HISD3FormRate=jt,exports.HISD3FormSearch=bt,exports.HISD3FormSegmented=Dt,exports.HISD3FormSelect=lt,exports.HISD3FormSlider=kt,exports.HISD3FormSwitch=ht,exports.HISD3FormTextArea=at,exports.HISD3FormTimePicker=ut,exports.HISD3FormTimeRangePicker=mt,exports.HISD3FormTransfer=At,exports.HISD3FormTreeSelect=St,exports.HISD3FormUpload=Ct,exports.HISD3FormUploadDragger=zt,exports.HISD3HeaderActions=({children:t,divided:o=!1,className:i})=>{const n=r.Children.toArray(t).filter(Boolean);return e.jsx(Pe,{className:i,children:n.map(((t,i)=>e.jsxs(r.Fragment,{children:[o&&i===n.length-1&&i>0&&e.jsx(Me,{}),t]},i)))})},exports.HISD3Input=Ze,exports.HISD3LoginPage=({appName:o,tagline:n,logoSrc:a=_,title:s="Nice to see you again",subtitle:l,panelTitle:d="One system for every part of your hospital.",panelSubtitle:p="Patient care, billing and operations — connected.",panelImage:c,organisationName:h="HISD3",variant:x="soft",side:g="right",identifierLabel:u="User ID or email",identifierPlaceholder:m="Email or user ID",passwordLabel:b="Password",passwordPlaceholder:f="Enter password",submitLabel:y="Sign in",hideRemember:v=!1,rememberLabel:w="Remember me",onForgotPassword:S,forgotLabel:D="Forgot password?",error:A,loading:k=!1,onSubmit:j,footer:I,className:E})=>{const[C,z]=r.useState(""),[F,T]=r.useState(""),[B,R]=r.useState(!1),[N,H]=r.useState(!1);return e.jsxs(ae,{className:E,$side:g,children:[e.jsx(he,{$variant:x,$side:g,"aria-hidden":!0}),e.jsxs(se,{$variant:x,$side:g,children:[c?e.jsx(de,{$src:c,"aria-hidden":!0}):e.jsx(pe,{"aria-hidden":!0}),e.jsxs(ce,{$side:g,"aria-hidden":!0,children:[e.jsx("img",{src:_,alt:""}),h]}),e.jsxs(le,{children:[a&&e.jsx("img",{src:a,alt:""}),e.jsxs("span",{children:[e.jsx("span",{className:"hisd3-hero-name",children:o}),n&&e.jsx("span",{className:"hisd3-hero-tagline",children:n})]})]}),e.jsx("h2",{children:d}),p&&e.jsx("p",{children:p})]}),e.jsxs(xe,{$variant:x,$side:g,onSubmit:e=>{e.preventDefault(),k||j({identifier:C,password:F,remember:B})},noValidate:!0,children:[e.jsxs(ge,{$variant:x,children:[a&&e.jsx("img",{className:"hisd3-login-logo",src:a,alt:""}),e.jsxs("span",{children:[e.jsx("span",{className:"hisd3-login-name",children:o}),n&&e.jsx("span",{className:"hisd3-login-tagline",children:n})]})]}),e.jsx(ue,{$variant:x,children:s}),l&&e.jsx(me,{children:l}),A&&e.jsx(ye,{role:"alert",children:A}),e.jsxs(be,{$variant:x,children:[e.jsx("span",{className:"hisd3-field-label",children:u}),e.jsx("span",{className:"hisd3-field-control",children:e.jsx("input",{value:C,onChange:e=>z(e.target.value),placeholder:m,autoComplete:"username",disabled:k,autoFocus:!0})})]}),e.jsxs(be,{$variant:x,children:[e.jsx("span",{className:"hisd3-field-label",children:b}),e.jsxs("span",{className:"hisd3-field-control",children:[e.jsx("input",{type:N?"text":"password",value:F,onChange:e=>T(e.target.value),placeholder:f,autoComplete:"current-password",disabled:k}),e.jsx("button",{type:"button",className:"hisd3-field-reveal","aria-label":N?"Hide password":"Show password",onClick:()=>H((e=>!e)),tabIndex:-1,children:N?e.jsx(i.EyeInvisibleOutlined,{}):e.jsx(i.EyeOutlined,{})})]})]}),(!v||S)&&e.jsxs(fe,{children:[v?e.jsx("span",{}):e.jsxs("label",{className:"hisd3-remember",children:[e.jsx(t.Switch,{size:"small",checked:B,onChange:R,disabled:k}),w]}),S&&e.jsx("button",{type:"button",className:"hisd3-forgot",onClick:S,children:D})]}),e.jsx(re,{variant:"primary",htmlType:"submit",size:"large",loading:k,block:!0,style:{borderRadius:"soft"===x?10:0,height:50},children:y}),I&&e.jsx(ve,{children:I})]})]})},exports.HISD3NotificationButton=({items:o=[],count:n,loading:a=!1,title:s="Notifications",onMarkAllRead:l,onSeeAll:d,seeAllLabel:p="See all notifications",emptyText:c="You're all caught up",onOpenChange:h,size:x=40,icon:g,className:u})=>{const[m,b]=r.useState(!1),f=n??o.filter((e=>e.unread)).length,y=e.jsxs(De,{children:[e.jsxs(Ae,{children:[e.jsx("h4",{children:s}),l&&f>0&&e.jsx("button",{type:"button",onClick:l,children:"Mark all as read"})]}),a?e.jsx(Fe,{style:{textAlign:"center"},children:e.jsx(t.Spin,{})}):0===o.length?e.jsx(Fe,{children:e.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:c})}):e.jsx(ke,{children:o.map((t=>e.jsxs(je,{type:"button",$unread:t.unread,onClick:()=>{t.onClick?.(t),b(!1),h?.(!1)},children:[e.jsx(Ie,{$src:t.avatarSrc,children:!t.avatarSrc&&(t.icon??e.jsx(i.BellFilled,{}))}),e.jsxs(Ee,{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(Ce,{})]},t.id)))}),d&&e.jsx(ze,{type:"button",onClick:()=>{d(),b(!1),h?.(!1)},children:p})]});return e.jsx(t.Dropdown,{open:m,onOpenChange:e=>{b(e),h?.(e)},trigger:["click"],placement:"bottomRight",popupRender:()=>y,children:e.jsxs(we,{type:"button",$size:x,$open:m,className:u,"aria-label":`${s}${f?` (${f} unread)`:""}`,children:[g??e.jsx(i.BellFilled,{}),f>0&&e.jsx(Se,{$size:x,children:f>99?"99+":f})]})})},exports.HISD3PageBody=X,exports.HISD3PageHeader=({title:r,subtitle:o,breadcrumb:i,extra:n,leading:a,hideTopBar:s=!1,className:l})=>e.jsxs(V,{className:l,children:[!s&&e.jsxs(Y,{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(Z,{children:n})]}),e.jsxs(J,{children:[e.jsx("h1",{children:r}),o&&e.jsx("p",{children:o})]})]}),exports.HISD3Provider=({primary:i,radius:n,borders:a="hairline",lineWidth:s,overrides:l,theme:d,styledTheme:p={},children:c})=>{const h=r.useMemo((()=>d??g({primary:i,radius:n,borders:a,lineWidth:s,overrides:l})),[d,i,n,a,s,l]),x=r.useMemo((()=>u({primary:i,borders:a,lineWidth:s,radius:n})),[i,a,s,n]);return e.jsxs(f.Provider,{value:!0,children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:x}}),e.jsx(t.ConfigProvider,{theme:h,children:e.jsx(o.ThemeProvider,{theme:p,children:e.jsx(t.App,{component:!1,children:c})})})]})},exports.HISD3SearchInput=_e,exports.HISD3Sidebar=({children:n,account:a,logoUrl:s,appName:l,menuItems:d,onLogout:p,pathname:c,avatarSrc:h,styledTheme:x,settingsUrl:g,antdTheme:u,renderMenuLink:b=q,headerExtra:f,userMenuItems:v,onCollapse:w,collapsed:R=!1,loading:N=!1,hideSidebar:H=!1,layoutTop:L=!1,hideCollapseTrigger:P=!1,collapseTrigger:M="edge",collapseTriggerOffset:U=Math.round(A/2),siderWidth:O=S,bareContent:W=!1,hideHeaderBar:V=!1,brandHref:Y="/",hideAccountCard:Z=!1,scrollContent:J=!0})=>{const X=y(),_=void 0===u?X?null:m:u,[ee,te]=r.useState(R);r.useEffect((()=>{te(R)}),[R]);const re=r.useMemo((()=>$(d,b)),[d,b]),oe=r.useMemo((()=>((e,t)=>{let r;const o=(e,i)=>{(e??[]).forEach(((e,n)=>{const a=G(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]),[ie,ne]=r.useState((()=>oe.openKeys));r.useEffect((()=>{ne((e=>Array.from(new Set([...e,...oe.openKeys]))))}),[oe.openKeys.join("|")]);const ae=e=>{te(e),w?.(e)},se=oe.selectedKey?[oe.selectedKey]:[],le=P?"none":M,de=ee?"Expand menu":"Collapse menu",pe=e.jsxs(E,{href:Y,$collapsed:!L&&ee,children:[s?e.jsx("img",{src:s,alt:l}):e.jsx("span",{className:"hisd3-brand-mark","aria-hidden":!0}),(L||!ee)&&e.jsx("h1",{children:l})]}),ce=W?n:e.jsx(B,{children:n});if("undefined"==typeof document)return null;const he=e.jsx(t.App,{component:!1,children:e.jsx(t.Spin,{spinning:N,size:"large",children:H?e.jsx(e.Fragment,{children:n}):L?e.jsxs(k,{$appShell:J,children:[e.jsxs(C,{children:[pe,e.jsx(t.Menu,{mode:"horizontal",items:re,selectedKeys:se}),f,!Z&&e.jsx(Q,{account:a,avatarSrc:h,settingsUrl:g,onLogout:p,placement:"bottomRight",extraItems:v})]}),e.jsx(j,{$scroll:J,children:ce})]}):e.jsxs(k,{hasSider:!0,$appShell:J,children:[e.jsxs(K,{className:"hisd3-sider",width:O,collapsedWidth:D,collapsible:!0,collapsed:ee,trigger:null,theme:"light",breakpoint:"lg",onBreakpoint:e=>{e&&ae(!0)},children:[pe,e.jsx(I,{className:ee?"hisd3-collapsed":void 0,children:e.jsx(t.Menu,{mode:"inline",theme:"light",inlineCollapsed:ee,items:re,selectedKeys:se,openKeys:ee?void 0:ie,onOpenChange:e=>ne(e)})}),!Z&&e.jsx(Q,{account:a,avatarSrc:h,settingsUrl:g,onLogout:p,collapsed:ee,placement:"topRight",extraItems:v})]}),e.jsxs(j,{$scroll:J,children:[!V&&e.jsxs(z,{children:["header"===le&&e.jsx(F,{type:"button","aria-label":de,onClick:()=>ae(!ee),children:ee?e.jsx(i.MenuUnfoldOutlined,{}):e.jsx(i.MenuFoldOutlined,{})}),e.jsx("span",{style:{flex:1}}),f]}),ce]}),"edge"===le&&e.jsx(T,{type:"button","aria-label":de,title:de,$left:ee?D:O,$top:U,onClick:()=>ae(!ee),children:ee?e.jsx(i.RightOutlined,{}):e.jsx(i.LeftOutlined,{})})]})})});return X&&!x?_?e.jsx(t.ConfigProvider,{theme:_,children:he}):he:e.jsx(o.ThemeProvider,{theme:x??{},children:_?e.jsx(t.ConfigProvider,{theme:_,children:he}):he})},exports.HISD3Table=function({pagination:r,footer:o,...n}){const a=r||void 0,s=a?.pageSizeOptions??[10,20,50];return e.jsxs(Ue,{children:[e.jsx(t.Table,{...n,pagination:!1}),o&&e.jsx(Oe,{children:o}),a&&e.jsxs(Ge,{children:[e.jsx("span",{className:"hisd3-total",children:(a.renderTotal??qe)(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($e,{role:"group","aria-label":"Rows per page",children:s.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(Qe,{...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(Ve,{$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_LOGO_SRC=_,exports.HISD3_NEUTRALS=l,exports.HISD3_PRESETS=s,exports.HeaderIconButton=we,exports.UserMenu=Q,exports.borderVarsCss=(e="hairline",t)=>u({borders:e,lineWidth:t}),exports.createHisd3Theme=g,exports.getInitials=Le,exports.hisd3AntdTheme=m,exports.hisd3VarsCss=u,exports.normalizeUploadFileList=Et,exports.resolvePrimary=c,exports.shade=h,exports.tint=x,exports.useDialog=function(t){const o=r.useContext(Ft);if(!o)throw new Error("useDialog needs DialogProvider above it.");return r.useCallback(((r,i)=>{const n=Tt+=1;o.mount(n,e.jsx(Bt,{Component:t,props:r,onClose:i,unmount:()=>o.unmount(n)},n))}),[t,o])},exports.useInsideHISD3Provider=y;
1423
+ `,st=({node:t})=>e.jsx(e.Fragment,{children:t}),lt=({loading:r,loadingProps:o,vertical:i,bolderLabel:n,controlSize:a,skeleton:s,layout:l,className:d,children:p,...c})=>e.jsx(at,{...c,layout:i?"vertical":l,className:["hisd3-form-field",n?"hisd3-form-field-bold":"",d??""].join(" ").trim(),children:r?e.jsx(st,{node:s??e.jsx(t.Skeleton.Input,{active:!0,block:!0,size:a,...o})}):p}),dt=r=>e.jsx(t.Skeleton.Button,{active:!0,size:"small",style:{width:r,minWidth:r}}),pt=r.forwardRef((({fieldProps:t,propsinput:r,...o},i)=>{const n={...r,...t};return e.jsx(lt,{...o,controlSize:n.size,children:e.jsx(Ze,{...n,ref:i})})}));pt.displayName="HISD3FormInput";const ct=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,controlSize:r?.size,children:e.jsx(t.Input.Password,{...r,ref:i})})));ct.displayName="HISD3FormPassword";const ht=r.forwardRef((({fieldProps:r,loadingProps:o,...i},n)=>e.jsx(lt,{...i,controlSize:r?.size,loadingProps:{...o,style:{height:22*(r?.rows??3)+10,...o?.style}},children:e.jsx(t.Input.TextArea,{...r,ref:n})})));ht.displayName="HISD3FormTextArea";const xt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,controlSize:r?.size,children:e.jsx(t.InputNumber,{...r,ref:i})})));xt.displayName="HISD3FormInputNumber";const gt=r.forwardRef((({fieldProps:t,...r},o)=>e.jsx(lt,{...r,controlSize:t?.size,children:e.jsx(nt,{...t,ref:o})})));gt.displayName="HISD3FormSelect";const ut=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,controlSize:r?.size,children:e.jsx(t.Radio.Group,{...r,ref:i})})));ut.displayName="HISD3FormRadioGroup";const mt=r.forwardRef((({fieldProps:r,text:o,...i},n)=>e.jsx(lt,{valuePropName:"checked",skeleton:dt(120),...i,children:e.jsx(t.Checkbox,{...r,ref:n,children:o??r?.children})})));mt.displayName="HISD3FormCheckbox";const bt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,children:e.jsx(t.Checkbox.Group,{...r,ref:i})})));bt.displayName="HISD3FormCheckboxGroup";const ft=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{valuePropName:"checked",skeleton:dt("small"===r?.size?28:44),...o,children:e.jsx(t.Switch,{...r,ref:i})})));ft.displayName="HISD3FormSwitch";const vt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,controlSize:r?.size,children:e.jsx(t.DatePicker,{...r,ref:i})})));vt.displayName="HISD3FormDatePicker";const yt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,controlSize:r?.size,children:e.jsx(t.DatePicker.RangePicker,{...r,ref:i})})));yt.displayName="HISD3FormRangePicker";const wt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,controlSize:r?.size,children:e.jsx(t.TimePicker,{...r,ref:i})})));wt.displayName="HISD3FormTimePicker";const St=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,controlSize:r?.size,children:e.jsx(t.TimePicker.RangePicker,{...r,ref:i})})));St.displayName="HISD3FormTimeRangePicker";const Dt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,controlSize:r?.size,children:e.jsx(t.Input.Search,{...r,ref:i})})));Dt.displayName="HISD3FormSearch";const At=r.forwardRef((({fieldProps:r,loadingProps:o,...i},n)=>e.jsx(lt,{...i,controlSize:r?.size,loadingProps:{block:!1,...o,style:{width:48*(r?.length??6),...o?.style}},children:e.jsx(t.Input.OTP,{...r,ref:n})})));At.displayName="HISD3FormOTP";const kt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,controlSize:r?.size,children:e.jsx(t.AutoComplete,{...r,ref:i})})));kt.displayName="HISD3FormAutoComplete";const jt=r.forwardRef((({fieldProps:r,loadingProps:o,...i},n)=>e.jsx(lt,{...i,controlSize:r?.size,loadingProps:{...o,style:{height:22*(r?.rows??1)+18,...o?.style}},children:e.jsx(t.Mentions,{...r,ref:n})})));jt.displayName="HISD3FormMentions";const It=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,controlSize:r?.size,children:e.jsx(t.Cascader,{...r,ref:i})})));It.displayName="HISD3FormCascader";const Et=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,controlSize:r?.size,children:e.jsx(t.TreeSelect,{...r,ref:i})})));Et.displayName="HISD3FormTreeSelect";const Ct=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,skeleton:dt(200),children:e.jsx(t.Segmented,{...r,options:r?.options??[],ref:i})})));Ct.displayName="HISD3FormSegmented";const Ft=r.forwardRef((({fieldProps:r,loadingProps:o,...i},n)=>e.jsx(lt,{valuePropName:"targetKeys",loadingProps:{...o,style:{height:200,...o?.style}},...i,children:e.jsx(t.Transfer,{...r,ref:n})})));Ft.displayName="HISD3FormTransfer";const zt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,controlSize:"small",children:e.jsx(t.Slider,{...r,ref:i})})));zt.displayName="HISD3FormSlider";const Tt=r.forwardRef((({fieldProps:r,...o},i)=>e.jsx(lt,{...o,skeleton:dt(28*(r?.count??5)),children:e.jsx(t.Rate,{...r,ref:i})})));Tt.displayName="HISD3FormRate";const Rt=({fieldProps:r,...o})=>e.jsx(lt,{getValueFromEvent:(e,t)=>t,skeleton:e.jsx(t.Skeleton.Button,{active:!0,shape:"square"}),...o,children:e.jsx(t.ColorPicker,{...r})});Rt.displayName="HISD3FormColorPicker";const Nt=e=>Array.isArray(e)?e:e?.fileList??[],Bt=({fieldProps:r,children:o,...i})=>e.jsx(lt,{valuePropName:"fileList",getValueFromEvent:Nt,skeleton:e.jsx(t.Skeleton.Button,{active:!0}),...i,children:e.jsx(t.Upload,{...r,children:o??r?.children})});Bt.displayName="HISD3FormUpload";const Ht=({fieldProps:r,children:o,loadingProps:i,...n})=>e.jsx(lt,{valuePropName:"fileList",getValueFromEvent:Nt,loadingProps:{...i,style:{height:150,...i?.style}},...n,children:e.jsx(t.Upload.Dragger,{...r,children:o??r?.children})});Ht.displayName="HISD3FormUploadDragger";const Lt=r.createContext(null);let Pt=0;function Mt({Component:t,props:o,onClose:i,unmount:n}){const[a,s]=r.useState(!0),l=r.useRef(!1),d={...o,open:a,hide:r.useCallback((e=>{l.current||(l.current=!0,s(!1),i?.(e),window.setTimeout(n,320))}),[i,n])};return e.jsx(t,{...d})}var Ut,Ot,Gt,$t,qt,Qt,Kt,Wt,Vt,Yt,Zt,Jt,Xt;exports.ThemeStyle=void 0,(Ut=exports.ThemeStyle||(exports.ThemeStyle={})).MODERN="modern",Ut.STANDARD="standard",exports.ThemeStyleRadius=void 0,(Ot=exports.ThemeStyleRadius||(exports.ThemeStyleRadius={})).MODERN="30px",Ot.STANDARD="16px",exports.ThemeMode=void 0,(Gt=exports.ThemeMode||(exports.ThemeMode={})).LIGHT="light",Gt.SEMI_DARK="semi-dark",Gt.DARK="dark",exports.LayoutType=void 0,($t=exports.LayoutType||(exports.LayoutType={})).FULL_WIDTH="full-width",$t.BOXED="boxed",$t.FRAMED="framed",exports.MenuStyle=void 0,(qt=exports.MenuStyle||(exports.MenuStyle={})).DEFAULT="default",qt.STANDARD="standard",qt.ROUNDED="rounded",qt.ROUNDED_REVERSE="rounded-reverse",qt.CURVED_MENU="curved-menu",exports.NavStyle=void 0,(Qt=exports.NavStyle||(exports.NavStyle={})).DEFAULT="default",Qt.MINI="mini",Qt.MINI_SIDEBAR_TOGGLE="mini-sidebar-toggle",Qt.STANDARD="standard",Qt.HEADER_USER="user-header",Qt.HEADER_USER_MINI="user-mini-header",Qt.DRAWER="drawer",Qt.BIT_BUCKET="bit-bucket",Qt.H_DEFAULT="h-default",Qt.HOR_HEADER_FIXED="hor-header-fixed",Qt.HOR_DARK_LAYOUT="hor-dark-layout",exports.FooterType=void 0,(Kt=exports.FooterType||(exports.FooterType={})).FIXED="fixed",Kt.FLUID="fluid",exports.LayoutDirection=void 0,(Wt=exports.LayoutDirection||(exports.LayoutDirection={})).RTL="rtl",Wt.LTR="ltr",exports.HeaderType=void 0,(Vt=exports.HeaderType||(exports.HeaderType={})).DARK="dark",Vt.LIGHT="light",exports.RouteTransition=void 0,(Yt=exports.RouteTransition||(exports.RouteTransition={})).NONE="none",Yt.FADE="fade",Yt.SLIDE_LEFT="slideLeft",Yt.SLIDE_RIGHT="slideRight",Yt.SLIDE_UP="slideUp",Yt.SLIDE_DOWN="slideDown",exports.Fonts=void 0,(Zt=exports.Fonts||(exports.Fonts={})).LIGHT="300",Zt.REGULAR="400",Zt.MEDIUM="500",Zt.BOLD="600",exports.AuthType=void 0,(Jt=exports.AuthType||(exports.AuthType={})).FIREBASE="firebase",Jt.AWS_COGNITO="aws_cognito",Jt.AUTH0="auth0",Jt.JWT_AUTH="jwt_auth",exports.AppAnimates=void 0,(Xt=exports.AppAnimates||(exports.AppAnimates={})).SLIDEUPIN="transition.slideUpIn",Xt.SLIDEUPOUT="transition.slideUpOut",Xt.SLIDEDOWNIN="transition.slideDownIn",Xt.SLIDEDOWNOUT="transition.slideDownOut",Xt.SLIDELEFTIN="transition.slideLeftIn",Xt.SLIDELEFTOUT="transition.slideLeftOut",Xt.SLIDERIGHTIN="transition.slideRightIn",Xt.SLIDERIGHTOUT="transition.slideRightOut",Xt.FADEIN="transition.fadeIn",Xt.FADEOUT="transition.fadeOut";var _t,er;exports.MessageType=void 0,(_t=exports.MessageType||(exports.MessageType={}))[_t.MEDIA=1]="MEDIA",_t[_t.TEXT=2]="TEXT",exports.RoutePermittedRole=void 0,(er=exports.RoutePermittedRole||(exports.RoutePermittedRole={})).Admin="admin",er.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.DialogProvider=function({children:t}){const[o,i]=r.useState([]),n=r.useMemo((()=>({mount:(e,t)=>i((r=>[...r.filter((t=>t.id!==e)),{id:e,node:t}])),unmount:e=>i((t=>t.filter((t=>t.id!==e))))})),[]);return e.jsxs(Lt.Provider,{value:n,children:[t,o.map((t=>e.jsx(r.Fragment,{children:t.node},t.id)))]})},exports.HISD3AvatarMenu=({account:o,avatarSrc:n,settingsUrl:a="/settings",onSettings:s,onLogout:l,confirmLogout:d=!0,extraItems:p,shape:c="circle",size:h=40,hideChevron:x=!1,className:g})=>{const{modal:u}=t.App.useApp(),[m,b]=r.useState(!1),f=[...p??[],...null!==a||s?[{key:"settings",icon:e.jsx(i.SettingOutlined,{}),label:"Settings",onClick:()=>{s?s():a&&(window.location.href=a)}}]:[],{key:"logout",icon:e.jsx(i.LogoutOutlined,{}),label:"Logout",onClick:()=>{d?u.confirm({title:"Are you sure you want to logout?",content:"Please click OK to continue",icon:e.jsx(i.ExclamationCircleOutlined,{}),okText:"Logout",onOk:l}):l()}}];return e.jsx(t.Dropdown,{open:m,onOpenChange:b,trigger:["click"],placement:"bottomRight",menu:{items:f,onClick:()=>b(!1)},popupRender:t=>e.jsxs(He,{children:[e.jsxs(Ne,{children:[e.jsx(Be,{$src:n,children:!n&&Le(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(Te,{type:"button",className:g,$shape:c,$size:h,$open:m,"aria-label":`Account menu for ${o.fullName}`,children:[n?e.jsx("img",{src:n,alt:""}):Le(o.fullName),!x&&e.jsx(Re,{$size:h,$open:m,"aria-hidden":!0,children:e.jsx(i.DownOutlined,{})})]})})},exports.HISD3Button=re,exports.HISD3FormAutoComplete=kt,exports.HISD3FormCascader=It,exports.HISD3FormCheckbox=mt,exports.HISD3FormCheckboxGroup=bt,exports.HISD3FormColorPicker=Rt,exports.HISD3FormDatePicker=vt,exports.HISD3FormField=lt,exports.HISD3FormInput=pt,exports.HISD3FormInputNumber=xt,exports.HISD3FormMentions=jt,exports.HISD3FormOTP=At,exports.HISD3FormPassword=ct,exports.HISD3FormRadioGroup=ut,exports.HISD3FormRangePicker=yt,exports.HISD3FormRate=Tt,exports.HISD3FormSearch=Dt,exports.HISD3FormSegmented=Ct,exports.HISD3FormSelect=gt,exports.HISD3FormSlider=zt,exports.HISD3FormSwitch=ft,exports.HISD3FormTextArea=ht,exports.HISD3FormTimePicker=wt,exports.HISD3FormTimeRangePicker=St,exports.HISD3FormTransfer=Ft,exports.HISD3FormTreeSelect=Et,exports.HISD3FormUpload=Bt,exports.HISD3FormUploadDragger=Ht,exports.HISD3HeaderActions=({children:t,divided:o=!1,className:i})=>{const n=r.Children.toArray(t).filter(Boolean);return e.jsx(Pe,{className:i,children:n.map(((t,i)=>e.jsxs(r.Fragment,{children:[o&&i===n.length-1&&i>0&&e.jsx(Me,{}),t]},i)))})},exports.HISD3Input=Ze,exports.HISD3LoginPage=({appName:o,tagline:n,logoSrc:a=_,title:s="Nice to see you again",subtitle:l,panelTitle:d="One system for every part of your hospital.",panelSubtitle:p="Patient care, billing and operations — connected.",panelImage:c,organisationName:h="HISD3",variant:x="soft",side:g="right",identifierLabel:u="User ID or email",identifierPlaceholder:m="Email or user ID",passwordLabel:b="Password",passwordPlaceholder:f="Enter password",submitLabel:v="Sign in",hideRemember:y=!1,rememberLabel:w="Remember me",onForgotPassword:S,forgotLabel:D="Forgot password?",error:A,loading:k=!1,onSubmit:j,footer:I,className:E})=>{const[C,F]=r.useState(""),[z,T]=r.useState(""),[R,N]=r.useState(!1),[B,H]=r.useState(!1);return e.jsxs(ae,{className:E,$side:g,children:[e.jsx(he,{$variant:x,$side:g,"aria-hidden":!0}),e.jsxs(se,{$variant:x,$side:g,children:[c?e.jsx(de,{$src:c,"aria-hidden":!0}):e.jsx(pe,{"aria-hidden":!0}),e.jsxs(ce,{$side:g,"aria-hidden":!0,children:[e.jsx("img",{src:_,alt:""}),h]}),e.jsxs(le,{children:[a&&e.jsx("img",{src:a,alt:""}),e.jsxs("span",{children:[e.jsx("span",{className:"hisd3-hero-name",children:o}),n&&e.jsx("span",{className:"hisd3-hero-tagline",children:n})]})]}),e.jsx("h2",{children:d}),p&&e.jsx("p",{children:p})]}),e.jsxs(xe,{$variant:x,$side:g,onSubmit:e=>{e.preventDefault(),k||j({identifier:C,password:z,remember:R})},noValidate:!0,children:[e.jsxs(ge,{$variant:x,children:[a&&e.jsx("img",{className:"hisd3-login-logo",src:a,alt:""}),e.jsxs("span",{children:[e.jsx("span",{className:"hisd3-login-name",children:o}),n&&e.jsx("span",{className:"hisd3-login-tagline",children:n})]})]}),e.jsx(ue,{$variant:x,children:s}),l&&e.jsx(me,{children:l}),A&&e.jsx(ve,{role:"alert",children:A}),e.jsxs(be,{$variant:x,children:[e.jsx("span",{className:"hisd3-field-label",children:u}),e.jsx("span",{className:"hisd3-field-control",children:e.jsx("input",{value:C,onChange:e=>F(e.target.value),placeholder:m,autoComplete:"username",disabled:k,autoFocus:!0})})]}),e.jsxs(be,{$variant:x,children:[e.jsx("span",{className:"hisd3-field-label",children:b}),e.jsxs("span",{className:"hisd3-field-control",children:[e.jsx("input",{type:B?"text":"password",value:z,onChange:e=>T(e.target.value),placeholder:f,autoComplete:"current-password",disabled:k}),e.jsx("button",{type:"button",className:"hisd3-field-reveal","aria-label":B?"Hide password":"Show password",onClick:()=>H((e=>!e)),tabIndex:-1,children:B?e.jsx(i.EyeInvisibleOutlined,{}):e.jsx(i.EyeOutlined,{})})]})]}),(!y||S)&&e.jsxs(fe,{children:[y?e.jsx("span",{}):e.jsxs("label",{className:"hisd3-remember",children:[e.jsx(t.Switch,{size:"small",checked:R,onChange:N,disabled:k}),w]}),S&&e.jsx("button",{type:"button",className:"hisd3-forgot",onClick:S,children:D})]}),e.jsx(re,{variant:"primary",htmlType:"submit",size:"large",loading:k,block:!0,style:{borderRadius:"soft"===x?10:0,height:50},children:v}),I&&e.jsx(ye,{children:I})]})]})},exports.HISD3NotificationButton=({items:o=[],count:n,loading:a=!1,title:s="Notifications",onMarkAllRead:l,onSeeAll:d,seeAllLabel:p="See all notifications",emptyText:c="You're all caught up",onOpenChange:h,size:x=40,icon:g,className:u})=>{const[m,b]=r.useState(!1),f=n??o.filter((e=>e.unread)).length,v=e.jsxs(De,{children:[e.jsxs(Ae,{children:[e.jsx("h4",{children:s}),l&&f>0&&e.jsx("button",{type:"button",onClick:l,children:"Mark all as read"})]}),a?e.jsx(ze,{style:{textAlign:"center"},children:e.jsx(t.Spin,{})}):0===o.length?e.jsx(ze,{children:e.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:c})}):e.jsx(ke,{children:o.map((t=>e.jsxs(je,{type:"button",$unread:t.unread,onClick:()=>{t.onClick?.(t),b(!1),h?.(!1)},children:[e.jsx(Ie,{$src:t.avatarSrc,children:!t.avatarSrc&&(t.icon??e.jsx(i.BellFilled,{}))}),e.jsxs(Ee,{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(Ce,{})]},t.id)))}),d&&e.jsx(Fe,{type:"button",onClick:()=>{d(),b(!1),h?.(!1)},children:p})]});return e.jsx(t.Dropdown,{open:m,onOpenChange:e=>{b(e),h?.(e)},trigger:["click"],placement:"bottomRight",popupRender:()=>v,children:e.jsxs(we,{type:"button",$size:x,$open:m,className:u,"aria-label":`${s}${f?` (${f} unread)`:""}`,children:[g??e.jsx(i.BellFilled,{}),f>0&&e.jsx(Se,{$size:x,children:f>99?"99+":f})]})})},exports.HISD3PageBody=X,exports.HISD3PageHeader=({title:r,subtitle:o,breadcrumb:i,extra:n,leading:a,hideTopBar:s=!1,className:l})=>e.jsxs(V,{className:l,children:[!s&&e.jsxs(Y,{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(Z,{children:n})]}),e.jsxs(J,{children:[e.jsx("h1",{children:r}),o&&e.jsx("p",{children:o})]})]}),exports.HISD3Provider=({primary:i,radius:n,borders:a="hairline",lineWidth:s,overrides:l,theme:d,styledTheme:p={},children:c})=>{const h=r.useMemo((()=>d??g({primary:i,radius:n,borders:a,lineWidth:s,overrides:l})),[d,i,n,a,s,l]),x=r.useMemo((()=>u({primary:i,borders:a,lineWidth:s,radius:n})),[i,a,s,n]);return e.jsxs(f.Provider,{value:!0,children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:x}}),e.jsx(t.ConfigProvider,{theme:h,children:e.jsx(o.ThemeProvider,{theme:p,children:e.jsx(t.App,{component:!1,children:c})})})]})},exports.HISD3SearchInput=_e,exports.HISD3Select=nt,exports.HISD3SelectLabel=et,exports.HISD3Sidebar=({children:n,account:a,logoUrl:s,appName:l,menuItems:d,onLogout:p,pathname:c,avatarSrc:h,styledTheme:x,settingsUrl:g,antdTheme:u,renderMenuLink:b=q,headerExtra:f,userMenuItems:y,onCollapse:w,collapsed:N=!1,loading:B=!1,hideSidebar:H=!1,layoutTop:L=!1,hideCollapseTrigger:P=!1,collapseTrigger:M="edge",collapseTriggerOffset:U=Math.round(A/2),siderWidth:O=S,bareContent:W=!1,hideHeaderBar:V=!1,brandHref:Y="/",hideAccountCard:Z=!1,scrollContent:J=!0})=>{const X=v(),_=void 0===u?X?null:m:u,[ee,te]=r.useState(N);r.useEffect((()=>{te(N)}),[N]);const re=r.useMemo((()=>$(d,b)),[d,b]),oe=r.useMemo((()=>((e,t)=>{let r;const o=(e,i)=>{(e??[]).forEach(((e,n)=>{const a=G(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]),[ie,ne]=r.useState((()=>oe.openKeys));r.useEffect((()=>{ne((e=>Array.from(new Set([...e,...oe.openKeys]))))}),[oe.openKeys.join("|")]);const ae=e=>{te(e),w?.(e)},se=oe.selectedKey?[oe.selectedKey]:[],le=P?"none":M,de=ee?"Expand menu":"Collapse menu",pe=e.jsxs(E,{href:Y,$collapsed:!L&&ee,children:[s?e.jsx("img",{src:s,alt:l}):e.jsx("span",{className:"hisd3-brand-mark","aria-hidden":!0}),(L||!ee)&&e.jsx("h1",{children:l})]}),ce=W?n:e.jsx(R,{children:n});if("undefined"==typeof document)return null;const he=e.jsx(t.App,{component:!1,children:e.jsx(t.Spin,{spinning:B,size:"large",children:H?e.jsx(e.Fragment,{children:n}):L?e.jsxs(k,{$appShell:J,children:[e.jsxs(C,{children:[pe,e.jsx(t.Menu,{mode:"horizontal",items:re,selectedKeys:se}),f,!Z&&e.jsx(Q,{account:a,avatarSrc:h,settingsUrl:g,onLogout:p,placement:"bottomRight",extraItems:y})]}),e.jsx(j,{$scroll:J,children:ce})]}):e.jsxs(k,{hasSider:!0,$appShell:J,children:[e.jsxs(K,{className:"hisd3-sider",width:O,collapsedWidth:D,collapsible:!0,collapsed:ee,trigger:null,theme:"light",breakpoint:"lg",onBreakpoint:e=>{e&&ae(!0)},children:[pe,e.jsx(I,{className:ee?"hisd3-collapsed":void 0,children:e.jsx(t.Menu,{mode:"inline",theme:"light",inlineCollapsed:ee,items:re,selectedKeys:se,openKeys:ee?void 0:ie,onOpenChange:e=>ne(e)})}),!Z&&e.jsx(Q,{account:a,avatarSrc:h,settingsUrl:g,onLogout:p,collapsed:ee,placement:"topRight",extraItems:y})]}),e.jsxs(j,{$scroll:J,children:[!V&&e.jsxs(F,{children:["header"===le&&e.jsx(z,{type:"button","aria-label":de,onClick:()=>ae(!ee),children:ee?e.jsx(i.MenuUnfoldOutlined,{}):e.jsx(i.MenuFoldOutlined,{})}),e.jsx("span",{style:{flex:1}}),f]}),ce]}),"edge"===le&&e.jsx(T,{type:"button","aria-label":de,title:de,$left:ee?D:O,$top:U,onClick:()=>ae(!ee),children:ee?e.jsx(i.RightOutlined,{}):e.jsx(i.LeftOutlined,{})})]})})});return X&&!x?_?e.jsx(t.ConfigProvider,{theme:_,children:he}):he:e.jsx(o.ThemeProvider,{theme:x??{},children:_?e.jsx(t.ConfigProvider,{theme:_,children:he}):he})},exports.HISD3Table=function({pagination:r,footer:o,...n}){const a=r||void 0,s=a?.pageSizeOptions??[10,20,50];return e.jsxs(Ue,{children:[e.jsx(t.Table,{...n,pagination:!1}),o&&e.jsx(Oe,{children:o}),a&&e.jsxs(Ge,{children:[e.jsx("span",{className:"hisd3-total",children:(a.renderTotal??qe)(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($e,{role:"group","aria-label":"Rows per page",children:s.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(Qe,{...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(Ve,{$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_LOGO_SRC=_,exports.HISD3_NEUTRALS=l,exports.HISD3_PRESETS=s,exports.HeaderIconButton=we,exports.UserMenu=Q,exports.borderVarsCss=(e="hairline",t)=>u({borders:e,lineWidth:t}),exports.createHisd3Theme=g,exports.getInitials=Le,exports.hisd3AntdTheme=m,exports.hisd3VarsCss=u,exports.normalizeUploadFileList=Nt,exports.resolvePrimary=c,exports.shade=h,exports.tint=x,exports.useDialog=function(t){const o=r.useContext(Lt);if(!o)throw new Error("useDialog needs DialogProvider above it.");return r.useCallback(((r,i)=>{const n=Pt+=1;o.mount(n,e.jsx(Mt,{Component:t,props:r,onClose:i,unmount:()=>o.unmount(n)},n))}),[t,o])},exports.useInsideHISD3Provider=v;
1414
1424
  //# sourceMappingURL=index.cjs.js.map