hisd3-ui-kit 4.2.0 → 4.2.2
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 +9 -3
- package/dist/index.cjs.js +126 -59
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +138 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ const menuItems = [
|
|
|
110
110
|
| Component | What it is |
|
|
111
111
|
| --- | --- |
|
|
112
112
|
| `HISD3Provider` | Root theme provider (see above). |
|
|
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`. |
|
|
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`. `collapseTrigger` places the collapse control: `"edge"` (default) floats a round chevron on the sidebar's right edge, level with the top bar — it works even when the top bar is hidden, and `collapseTriggerOffset` moves it down — `"header"` puts a square button in the shell's own top bar, `"none"` renders neither. |
|
|
114
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`. |
|
|
@@ -118,7 +118,7 @@ const menuItems = [
|
|
|
118
118
|
| `HISD3Button` | `variant`: `primary` (filled), `secondary` (default, dark 2px outline), `ghost`, `danger`. Accepts all antd `Button` props (`icon`, `size`, `loading`, …). |
|
|
119
119
|
| `HISD3Input` / `HISD3SearchInput` | 2px-bordered input; the search variant is the grey filled hero field with a leading icon (`compact` for a 48px version). |
|
|
120
120
|
| `HISD3HeaderActions` | Spacing wrapper for the top-right controls; `divided` inserts a rule before the last child. |
|
|
121
|
-
| `HISD3NotificationButton` | Soft-grey circular bell
|
|
121
|
+
| `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`. |
|
|
122
122
|
| `HISD3AvatarMenu` | Circular avatar button with a small chevron badge (Facebook-style); clicking it opens a menu with the signed-in identity plus Settings and Logout (confirm dialog by default). Falls back to initials on a grey circle when there is no photo. Props: `account`, `avatarSrc`, `settingsUrl` / `onSettings`, `onLogout`, `confirmLogout`, `extraItems`, `shape` (`circle` \| `square`), `size` (default 40), `hideChevron`. |
|
|
123
123
|
| `UserMenu` | The sidebar-footer account card, on its own. |
|
|
124
124
|
|
|
@@ -130,6 +130,11 @@ 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
|
+
Navigation chrome — the sidebar, the page top bar, the header controls, the tab
|
|
134
|
+
strip and the pagination bar — is not text-selectable, so dragging across a menu
|
|
135
|
+
never leaves a blue highlight. Table cells and page content stay selectable so
|
|
136
|
+
data remains copyable.
|
|
137
|
+
|
|
133
138
|
### Scrolling
|
|
134
139
|
|
|
135
140
|
The shell fills exactly one viewport and the content column scrolls inside it,
|
|
@@ -155,7 +160,7 @@ Inside styled-components or CSS you can rely on antd's variables:
|
|
|
155
160
|
`var(--ant-color-text)`, `var(--ant-color-text-tertiary)`,
|
|
156
161
|
`var(--ant-color-bg-layout)`. The header controls additionally read
|
|
157
162
|
`--hisd3-control-bg` / `--hisd3-control-bg-hover` (the grey circle fill) and
|
|
158
|
-
`--hisd3-popup-radius`, so you can retune them per app without forking the
|
|
163
|
+
`--hisd3-popup-radius`, `--hisd3-bell-stretch` (how wide the bell glyph is drawn, default `1.12`), `--hisd3-edge-trigger-bg` / `--hisd3-edge-trigger-color` (the sidebar collapse chevron, primary-filled by default), so you can retune them per app without forking the
|
|
159
164
|
components.
|
|
160
165
|
|
|
161
166
|
## Migrating
|
|
@@ -164,6 +169,7 @@ components.
|
|
|
164
169
|
|
|
165
170
|
- Wrap the app in `HISD3Provider` (the sidebar still works standalone with the red default, but the provider is what lets you pick a primary).
|
|
166
171
|
- The default look changed from teal/rounded to the red/square Backoffice style. To keep teal: `<HISD3Provider primary="teal">`.
|
|
172
|
+
- The collapse control now defaults to a round chevron on the sidebar edge (`collapseTrigger="edge"`). Pass `collapseTrigger="header"` for the old top-bar button, or `"none"` if your app renders its own.
|
|
167
173
|
- 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.
|
|
168
174
|
- Borders are now hairline by default; pass `borders="bold"` to `HISD3Provider` to keep the 2px near-black look.
|
|
169
175
|
- New `hideAccountCard` prop on `HISD3Sidebar` for apps that put the account in the header via `HISD3AvatarMenu`.
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
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,
|
|
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,j=o(t.Layout)`
|
|
2
|
+
position: relative; /* anchor for the edge collapse trigger */
|
|
2
3
|
background: var(--ant-color-bg-layout);
|
|
3
4
|
|
|
4
5
|
/*
|
|
@@ -12,7 +13,10 @@
|
|
|
12
13
|
* The Sider is rendered as a plain antd <Sider> (not styled(Sider)) because
|
|
13
14
|
* styled-components would swallow its \`theme\` prop; style it from here.
|
|
14
15
|
*/
|
|
16
|
+
/* the whole sidebar is chrome: never select its text on drag */
|
|
15
17
|
> .ant-layout-sider.hisd3-sider {
|
|
18
|
+
user-select: none;
|
|
19
|
+
-webkit-user-select: none;
|
|
16
20
|
position: sticky;
|
|
17
21
|
top: 0;
|
|
18
22
|
height: ${({$appShell:e})=>e?"100%":"100vh"};
|
|
@@ -26,7 +30,7 @@
|
|
|
26
30
|
height: 100%;
|
|
27
31
|
}
|
|
28
32
|
}
|
|
29
|
-
`,
|
|
33
|
+
`,I=o(t.Layout)`
|
|
30
34
|
background: transparent;
|
|
31
35
|
min-width: 0;
|
|
32
36
|
|
|
@@ -172,7 +176,7 @@
|
|
|
172
176
|
font-size: 14px;
|
|
173
177
|
font-weight: 500;
|
|
174
178
|
}
|
|
175
|
-
|
|
179
|
+
`,$=o(y)`
|
|
176
180
|
display: flex;
|
|
177
181
|
align-items: center;
|
|
178
182
|
gap: 12px;
|
|
@@ -185,7 +189,7 @@
|
|
|
185
189
|
z-index: 99;
|
|
186
190
|
background: var(--ant-color-bg-layout);
|
|
187
191
|
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
188
|
-
|
|
192
|
+
`,C=o.button`
|
|
189
193
|
border: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
190
194
|
background: transparent;
|
|
191
195
|
cursor: pointer;
|
|
@@ -201,10 +205,50 @@
|
|
|
201
205
|
&:hover {
|
|
202
206
|
background: rgba(0, 0, 0, 0.05);
|
|
203
207
|
}
|
|
204
|
-
`,z=o
|
|
208
|
+
`,z=o.button`
|
|
209
|
+
user-select: none;
|
|
210
|
+
-webkit-user-select: none;
|
|
211
|
+
position: absolute;
|
|
212
|
+
top: ${({$top:e})=>e}px;
|
|
213
|
+
left: ${({$left:e})=>e}px;
|
|
214
|
+
transform: translate(-50%, -50%);
|
|
215
|
+
z-index: 30;
|
|
216
|
+
width: 28px;
|
|
217
|
+
height: 28px;
|
|
218
|
+
padding: 0;
|
|
219
|
+
display: flex;
|
|
220
|
+
align-items: center;
|
|
221
|
+
justify-content: center;
|
|
222
|
+
font-size: 12px;
|
|
223
|
+
color: var(--hisd3-edge-trigger-color, #fff);
|
|
224
|
+
background: var(--hisd3-edge-trigger-bg, var(--ant-color-primary));
|
|
225
|
+
border: 2px solid var(--ant-color-bg-layout, #f3f2f0);
|
|
226
|
+
border-radius: 50%;
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
box-shadow: 0 1px 3px rgba(16, 15, 14, 0.12),
|
|
229
|
+
0 4px 12px rgba(16, 15, 14, 0.14);
|
|
230
|
+
transition: left 0.2s ease, filter 0.15s ease;
|
|
231
|
+
|
|
232
|
+
&:hover {
|
|
233
|
+
filter: brightness(1.08);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&:active {
|
|
237
|
+
filter: brightness(0.94);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&:focus-visible {
|
|
241
|
+
outline: 2px solid var(--ant-color-primary);
|
|
242
|
+
outline-offset: 2px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
& svg {
|
|
246
|
+
display: block;
|
|
247
|
+
}
|
|
248
|
+
`,L=o(v)`
|
|
205
249
|
flex: 1 0 auto;
|
|
206
250
|
padding: 24px ${a.pageGutter}px 40px;
|
|
207
|
-
`,
|
|
251
|
+
`,A=o.div`
|
|
208
252
|
flex: 0 0 auto;
|
|
209
253
|
display: flex;
|
|
210
254
|
flex-direction: column;
|
|
@@ -218,14 +262,14 @@
|
|
|
218
262
|
& .ant-dropdown-link {
|
|
219
263
|
color: inherit;
|
|
220
264
|
}
|
|
221
|
-
`,
|
|
265
|
+
`,N=o.a`
|
|
222
266
|
display: flex;
|
|
223
267
|
align-items: center;
|
|
224
268
|
justify-content: center;
|
|
225
269
|
cursor: pointer;
|
|
226
270
|
color: inherit;
|
|
227
271
|
gap: 10px;
|
|
228
|
-
`,
|
|
272
|
+
`,O=o.span`
|
|
229
273
|
width: 34px;
|
|
230
274
|
height: 34px;
|
|
231
275
|
flex: 0 0 auto;
|
|
@@ -236,15 +280,15 @@
|
|
|
236
280
|
font-weight: 700;
|
|
237
281
|
color: var(--ant-color-text);
|
|
238
282
|
background: ${({$src:e})=>e?`center / cover no-repeat url("${e}")`:"#D9D6D2"};
|
|
239
|
-
`,
|
|
283
|
+
`,R=o.span`
|
|
240
284
|
flex: 1 1 auto;
|
|
241
285
|
min-width: 0;
|
|
242
|
-
`,
|
|
286
|
+
`,F=o.span`
|
|
243
287
|
display: flex;
|
|
244
288
|
align-items: flex-start;
|
|
245
289
|
justify-content: space-between;
|
|
246
290
|
gap: 8px;
|
|
247
|
-
`,
|
|
291
|
+
`,H=o.h3`
|
|
248
292
|
margin: 0;
|
|
249
293
|
font-family: var(--font-body);
|
|
250
294
|
font-size: 14px;
|
|
@@ -256,7 +300,7 @@
|
|
|
256
300
|
display: -webkit-box;
|
|
257
301
|
-webkit-line-clamp: 2;
|
|
258
302
|
-webkit-box-orient: vertical;
|
|
259
|
-
`,
|
|
303
|
+
`,B=o.span`
|
|
260
304
|
width: 20px;
|
|
261
305
|
height: 22px;
|
|
262
306
|
display: flex;
|
|
@@ -268,7 +312,7 @@
|
|
|
268
312
|
& svg {
|
|
269
313
|
display: block;
|
|
270
314
|
}
|
|
271
|
-
`,
|
|
315
|
+
`,M=o.span`
|
|
272
316
|
display: block;
|
|
273
317
|
margin-top: 3px;
|
|
274
318
|
font-size: 11px;
|
|
@@ -279,16 +323,18 @@
|
|
|
279
323
|
overflow: hidden;
|
|
280
324
|
text-overflow: ellipsis;
|
|
281
325
|
white-space: nowrap;
|
|
282
|
-
`,
|
|
326
|
+
`,U=(e,t)=>e.key??e.path??`menu-${t}`,_=(e,t)=>(e??[]).filter((e=>e&&!e.hideInMenu)).map(((e,r)=>{const o=U(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)}})),P=(e,t)=>r.createElement("a",{href:e.path||"/"},t),G=({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(A,{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(N,{className:"ant-dropdown-link",onClick:e=>e.preventDefault(),children:[e.jsx(O,{$src:o,"aria-hidden":!0,children:!o&&h}),!l&&e.jsxs(R,{children:[e.jsxs(F,{children:[e.jsx(H,{title:r.fullName,children:r.fullName}),e.jsx(B,{children:e.jsx(n.DownOutlined,{})})]}),r.positionType&&e.jsx(M,{title:r.positionType,children:r.positionType})]})]})})})},{Sider:W}=t.Layout,K=a.pageGutter,X=o.header`
|
|
283
327
|
display: contents;
|
|
284
328
|
`,q=o.div`
|
|
329
|
+
user-select: none;
|
|
330
|
+
-webkit-user-select: none;
|
|
285
331
|
display: flex;
|
|
286
332
|
align-items: center;
|
|
287
333
|
gap: 16px;
|
|
288
334
|
height: ${a.topBarHeight}px; /* same as the sidebar brand block */
|
|
289
335
|
/* never shrink: these are flex items of the scrolling column */
|
|
290
336
|
flex: 0 0 ${a.topBarHeight}px;
|
|
291
|
-
padding: 0 ${
|
|
337
|
+
padding: 0 ${K}px;
|
|
292
338
|
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
293
339
|
background: var(--ant-color-bg-layout);
|
|
294
340
|
position: sticky;
|
|
@@ -304,18 +350,18 @@
|
|
|
304
350
|
.ant-breadcrumb ol {
|
|
305
351
|
flex-wrap: nowrap;
|
|
306
352
|
}
|
|
307
|
-
`,
|
|
353
|
+
`,V=o.div`
|
|
308
354
|
display: flex;
|
|
309
355
|
align-items: center;
|
|
310
356
|
gap: 10px;
|
|
311
357
|
flex: 0 0 auto;
|
|
312
|
-
`,
|
|
358
|
+
`,Y=o.div`
|
|
313
359
|
display: flex;
|
|
314
360
|
align-items: baseline;
|
|
315
361
|
gap: 16px;
|
|
316
362
|
flex-wrap: wrap;
|
|
317
363
|
flex: 0 0 auto;
|
|
318
|
-
padding: 20px ${
|
|
364
|
+
padding: 20px ${K}px 18px;
|
|
319
365
|
border-bottom: var(--hisd3-rule-width, 1px) solid var(--ant-color-border-secondary);
|
|
320
366
|
|
|
321
367
|
h1 {
|
|
@@ -333,10 +379,12 @@
|
|
|
333
379
|
font-size: 15px;
|
|
334
380
|
color: var(--ant-color-text-secondary);
|
|
335
381
|
}
|
|
336
|
-
`,
|
|
382
|
+
`,J=o.div`
|
|
337
383
|
flex: 1 0 auto;
|
|
338
|
-
padding: 24px ${
|
|
339
|
-
`,
|
|
384
|
+
padding: 24px ${K}px 40px;
|
|
385
|
+
`,Q=o.button`
|
|
386
|
+
user-select: none;
|
|
387
|
+
-webkit-user-select: none;
|
|
340
388
|
position: relative;
|
|
341
389
|
width: ${({$size:e=40})=>e}px;
|
|
342
390
|
height: ${({$size:e=40})=>e}px;
|
|
@@ -345,7 +393,7 @@
|
|
|
345
393
|
align-items: center;
|
|
346
394
|
justify-content: center;
|
|
347
395
|
padding: 0;
|
|
348
|
-
font-size: ${({$size:e=40})=>Math.round(.
|
|
396
|
+
font-size: ${({$size:e=40})=>Math.round(.54*e)}px;
|
|
349
397
|
line-height: 1;
|
|
350
398
|
color: var(--ant-color-text);
|
|
351
399
|
background: var(--hisd3-control-bg, #e6e4e1);
|
|
@@ -359,21 +407,37 @@
|
|
|
359
407
|
}
|
|
360
408
|
|
|
361
409
|
/* open state: tinted with the app's primary, like Facebook's blue */
|
|
362
|
-
|
|
363
|
-
background: var(--ant-color-primary-bg);
|
|
364
|
-
color: var(--ant-color-primary);
|
|
365
|
-
}
|
|
410
|
+
${({$open:e})=>e?"\n background: var(--ant-color-primary-bg);\n color: var(--ant-color-primary);\n &:hover { background: var(--ant-color-primary-bg-hover); }\n ":""}
|
|
366
411
|
|
|
367
412
|
&:focus-visible {
|
|
368
413
|
outline: 2px solid var(--ant-color-primary);
|
|
369
414
|
outline-offset: 2px;
|
|
370
415
|
}
|
|
371
416
|
|
|
372
|
-
.
|
|
373
|
-
color: inherit;
|
|
417
|
+
& > .anticon {
|
|
374
418
|
line-height: 0;
|
|
419
|
+
/* the stock bell is narrow; widen it a touch for a fuller silhouette */
|
|
420
|
+
transform: scaleX(var(--hisd3-bell-stretch, 1.12));
|
|
375
421
|
}
|
|
376
|
-
`,
|
|
422
|
+
`,Z=o.span`
|
|
423
|
+
position: absolute;
|
|
424
|
+
top: ${({$size:e})=>-Math.round(.05*e)}px;
|
|
425
|
+
right: ${({$size:e})=>-Math.round(.05*e)}px;
|
|
426
|
+
min-width: 18px;
|
|
427
|
+
height: 18px;
|
|
428
|
+
padding: 0 5px;
|
|
429
|
+
display: flex;
|
|
430
|
+
align-items: center;
|
|
431
|
+
justify-content: center;
|
|
432
|
+
font-size: 11px;
|
|
433
|
+
font-weight: 700;
|
|
434
|
+
line-height: 1;
|
|
435
|
+
color: #fff;
|
|
436
|
+
background: var(--ant-color-error, #e5401c);
|
|
437
|
+
border: 2px solid var(--ant-color-bg-layout, #f3f2f0);
|
|
438
|
+
border-radius: 999px;
|
|
439
|
+
pointer-events: none;
|
|
440
|
+
`,ee=o.div`
|
|
377
441
|
width: 360px;
|
|
378
442
|
max-width: calc(100vw - 32px);
|
|
379
443
|
overflow: hidden;
|
|
@@ -382,7 +446,7 @@
|
|
|
382
446
|
border-radius: var(--hisd3-popup-radius, 10px);
|
|
383
447
|
box-shadow: 0 2px 6px rgba(16, 15, 14, 0.06),
|
|
384
448
|
0 12px 32px rgba(16, 15, 14, 0.14);
|
|
385
|
-
`,
|
|
449
|
+
`,te=o.div`
|
|
386
450
|
display: flex;
|
|
387
451
|
align-items: center;
|
|
388
452
|
justify-content: space-between;
|
|
@@ -410,10 +474,10 @@
|
|
|
410
474
|
text-decoration: underline;
|
|
411
475
|
}
|
|
412
476
|
}
|
|
413
|
-
`,
|
|
477
|
+
`,re=o.div`
|
|
414
478
|
max-height: 380px;
|
|
415
479
|
overflow-y: auto;
|
|
416
|
-
`,
|
|
480
|
+
`,oe=o.button`
|
|
417
481
|
display: flex;
|
|
418
482
|
align-items: flex-start;
|
|
419
483
|
gap: 12px;
|
|
@@ -428,7 +492,7 @@
|
|
|
428
492
|
&:hover {
|
|
429
493
|
background: ${({$unread:e})=>e?"var(--ant-color-primary-bg-hover)":"rgba(0,0,0,0.04)"};
|
|
430
494
|
}
|
|
431
|
-
`,
|
|
495
|
+
`,ne=o.span`
|
|
432
496
|
width: 36px;
|
|
433
497
|
height: 36px;
|
|
434
498
|
flex: 0 0 auto;
|
|
@@ -439,7 +503,7 @@
|
|
|
439
503
|
color: var(--ant-color-text);
|
|
440
504
|
border-radius: 50%;
|
|
441
505
|
background: ${({$src:e})=>e?`center / cover no-repeat url("${e}")`:"rgba(0,0,0,0.06)"};
|
|
442
|
-
`,
|
|
506
|
+
`,ie=o.span`
|
|
443
507
|
flex: 1 1 auto;
|
|
444
508
|
min-width: 0;
|
|
445
509
|
|
|
@@ -464,14 +528,14 @@
|
|
|
464
528
|
font-size: 12px;
|
|
465
529
|
color: var(--ant-color-text-tertiary);
|
|
466
530
|
}
|
|
467
|
-
`,
|
|
531
|
+
`,ae=o.span`
|
|
468
532
|
width: 8px;
|
|
469
533
|
height: 8px;
|
|
470
534
|
margin-top: 6px;
|
|
471
535
|
flex: 0 0 auto;
|
|
472
536
|
border-radius: 50%;
|
|
473
537
|
background: var(--ant-color-primary);
|
|
474
|
-
`,
|
|
538
|
+
`,le=o.button`
|
|
475
539
|
display: block;
|
|
476
540
|
width: 100%;
|
|
477
541
|
padding: 12px 16px;
|
|
@@ -488,9 +552,11 @@
|
|
|
488
552
|
&:hover {
|
|
489
553
|
background: rgba(0, 0, 0, 0.04);
|
|
490
554
|
}
|
|
491
|
-
`,
|
|
555
|
+
`,se=o.div`
|
|
492
556
|
padding: 28px 16px;
|
|
493
|
-
`,
|
|
557
|
+
`,de=o.button`
|
|
558
|
+
user-select: none;
|
|
559
|
+
-webkit-user-select: none;
|
|
494
560
|
position: relative;
|
|
495
561
|
width: ${({$size:e})=>e}px;
|
|
496
562
|
height: ${({$size:e})=>e}px;
|
|
@@ -524,7 +590,7 @@
|
|
|
524
590
|
display: block;
|
|
525
591
|
border-radius: inherit;
|
|
526
592
|
}
|
|
527
|
-
`,
|
|
593
|
+
`,pe=o.span`
|
|
528
594
|
position: absolute;
|
|
529
595
|
right: ${({$size:e})=>-Math.round(.05*e)}px;
|
|
530
596
|
bottom: ${({$size:e})=>-Math.round(.05*e)}px;
|
|
@@ -540,15 +606,12 @@
|
|
|
540
606
|
border-radius: 50%;
|
|
541
607
|
pointer-events: none;
|
|
542
608
|
|
|
543
|
-
${
|
|
544
|
-
background: var(--ant-color-primary);
|
|
545
|
-
color: #fff;
|
|
546
|
-
}
|
|
609
|
+
${({$open:e})=>e?"\n background: var(--ant-color-primary);\n color: #fff;\n ":""}
|
|
547
610
|
|
|
548
611
|
& svg {
|
|
549
612
|
display: block;
|
|
550
613
|
}
|
|
551
|
-
`,
|
|
614
|
+
`,ce=o.div`
|
|
552
615
|
display: flex;
|
|
553
616
|
align-items: center;
|
|
554
617
|
gap: 12px;
|
|
@@ -583,7 +646,7 @@
|
|
|
583
646
|
overflow: hidden;
|
|
584
647
|
text-overflow: ellipsis;
|
|
585
648
|
}
|
|
586
|
-
`,
|
|
649
|
+
`,he=o.span`
|
|
587
650
|
width: 40px;
|
|
588
651
|
height: 40px;
|
|
589
652
|
flex: 0 0 auto;
|
|
@@ -594,7 +657,7 @@
|
|
|
594
657
|
font-weight: 700;
|
|
595
658
|
border-radius: 50%;
|
|
596
659
|
background: ${({$src:e})=>e?`center / cover no-repeat url("${e}")`:"rgba(0,0,0,0.08)"};
|
|
597
|
-
`,
|
|
660
|
+
`,ue=o.div`
|
|
598
661
|
overflow: hidden;
|
|
599
662
|
background: var(--ant-color-bg-elevated);
|
|
600
663
|
border: 1px solid var(--ant-color-border-secondary);
|
|
@@ -617,17 +680,17 @@
|
|
|
617
680
|
border-radius: 8px;
|
|
618
681
|
font-size: 14px;
|
|
619
682
|
}
|
|
620
|
-
`,
|
|
683
|
+
`,xe=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("")||"?",ge=o.div`
|
|
621
684
|
display: flex;
|
|
622
685
|
align-items: center;
|
|
623
686
|
gap: 8px;
|
|
624
687
|
flex: 0 0 auto;
|
|
625
|
-
`,
|
|
688
|
+
`,be=o.span`
|
|
626
689
|
width: 2px;
|
|
627
690
|
height: 24px;
|
|
628
691
|
background: var(--ant-color-border-secondary);
|
|
629
692
|
flex: 0 0 auto;
|
|
630
|
-
`,
|
|
693
|
+
`,me=o.div`
|
|
631
694
|
.ant-table-wrapper .ant-table {
|
|
632
695
|
background: transparent;
|
|
633
696
|
}
|
|
@@ -677,14 +740,16 @@
|
|
|
677
740
|
.hisd3-cell-muted {
|
|
678
741
|
color: var(--ant-color-text-tertiary);
|
|
679
742
|
}
|
|
680
|
-
`,
|
|
743
|
+
`,fe=o.div`
|
|
681
744
|
padding: 22px 0 14px;
|
|
682
745
|
font-size: 13px;
|
|
683
746
|
font-weight: 600;
|
|
684
747
|
letter-spacing: 0.1em;
|
|
685
748
|
text-transform: uppercase;
|
|
686
749
|
color: var(--ant-color-text-tertiary);
|
|
687
|
-
`,
|
|
750
|
+
`,ye=o.div`
|
|
751
|
+
user-select: none;
|
|
752
|
+
-webkit-user-select: none;
|
|
688
753
|
display: flex;
|
|
689
754
|
align-items: center;
|
|
690
755
|
gap: 24px;
|
|
@@ -744,7 +809,7 @@
|
|
|
744
809
|
font-weight: 700;
|
|
745
810
|
}
|
|
746
811
|
}
|
|
747
|
-
`,
|
|
812
|
+
`,ve=o.div`
|
|
748
813
|
display: inline-flex;
|
|
749
814
|
border: var(--hisd3-rule-width, 1px) solid var(--ant-color-border);
|
|
750
815
|
|
|
@@ -768,8 +833,10 @@
|
|
|
768
833
|
color: #fff;
|
|
769
834
|
}
|
|
770
835
|
}
|
|
771
|
-
`,
|
|
836
|
+
`,we=e=>`Total ${e.toLocaleString()} items`;const Se=o(t.Tabs)`
|
|
772
837
|
&.ant-tabs .ant-tabs-nav {
|
|
838
|
+
user-select: none;
|
|
839
|
+
-webkit-user-select: none;
|
|
773
840
|
margin: 0;
|
|
774
841
|
|
|
775
842
|
&::before {
|
|
@@ -801,7 +868,7 @@
|
|
|
801
868
|
.ant-tabs-tab-active .hisd3-tab-count {
|
|
802
869
|
color: var(--ant-color-primary);
|
|
803
870
|
}
|
|
804
|
-
`,
|
|
871
|
+
`,ke={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)"},je={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)"},Ie=o.span`
|
|
805
872
|
display: inline-flex;
|
|
806
873
|
align-items: center;
|
|
807
874
|
gap: 6px;
|
|
@@ -816,8 +883,8 @@
|
|
|
816
883
|
border: var(--hisd3-rule-width, 1px) solid transparent;
|
|
817
884
|
border-radius: 0;
|
|
818
885
|
|
|
819
|
-
${({$variant:e,$tone:t})=>{const r=
|
|
820
|
-
`,
|
|
886
|
+
${({$variant:e,$tone:t})=>{const r=ke[t],o=je[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);"}}}
|
|
887
|
+
`,Te=o(t.Button)`
|
|
821
888
|
&.ant-btn {
|
|
822
889
|
display: inline-flex;
|
|
823
890
|
align-items: center;
|
|
@@ -849,7 +916,7 @@
|
|
|
849
916
|
.anticon {
|
|
850
917
|
font-size: 1.05em;
|
|
851
918
|
}
|
|
852
|
-
`,
|
|
919
|
+
`,De={primary:{type:"primary"},secondary:{type:"default"},ghost:{type:"text"},danger:{type:"primary",danger:!0}},Ee=o(t.Input)`
|
|
853
920
|
&.ant-input,
|
|
854
921
|
&.ant-input-affix-wrapper {
|
|
855
922
|
border-width: var(--hisd3-rule-width, 1px);
|
|
@@ -861,7 +928,7 @@
|
|
|
861
928
|
color: var(--ant-color-text-tertiary);
|
|
862
929
|
font-size: 18px;
|
|
863
930
|
}
|
|
864
|
-
|
|
931
|
+
`,$e=o(Ee)`
|
|
865
932
|
&.ant-input-affix-wrapper {
|
|
866
933
|
background: var(--hisd3-bg-filled, #e6e4e1);
|
|
867
934
|
border-color: var(--ant-color-border-secondary);
|
|
@@ -895,5 +962,5 @@
|
|
|
895
962
|
font-size: 18px;
|
|
896
963
|
}
|
|
897
964
|
}
|
|
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;
|
|
965
|
+
`;var Ce,ze,Le,Ae,Ne,Oe,Re,Fe,He,Be,Me,Ue,_e;exports.ThemeStyle=void 0,(Ce=exports.ThemeStyle||(exports.ThemeStyle={})).MODERN="modern",Ce.STANDARD="standard",exports.ThemeStyleRadius=void 0,(ze=exports.ThemeStyleRadius||(exports.ThemeStyleRadius={})).MODERN="30px",ze.STANDARD="16px",exports.ThemeMode=void 0,(Le=exports.ThemeMode||(exports.ThemeMode={})).LIGHT="light",Le.SEMI_DARK="semi-dark",Le.DARK="dark",exports.LayoutType=void 0,(Ae=exports.LayoutType||(exports.LayoutType={})).FULL_WIDTH="full-width",Ae.BOXED="boxed",Ae.FRAMED="framed",exports.MenuStyle=void 0,(Ne=exports.MenuStyle||(exports.MenuStyle={})).DEFAULT="default",Ne.STANDARD="standard",Ne.ROUNDED="rounded",Ne.ROUNDED_REVERSE="rounded-reverse",Ne.CURVED_MENU="curved-menu",exports.NavStyle=void 0,(Oe=exports.NavStyle||(exports.NavStyle={})).DEFAULT="default",Oe.MINI="mini",Oe.MINI_SIDEBAR_TOGGLE="mini-sidebar-toggle",Oe.STANDARD="standard",Oe.HEADER_USER="user-header",Oe.HEADER_USER_MINI="user-mini-header",Oe.DRAWER="drawer",Oe.BIT_BUCKET="bit-bucket",Oe.H_DEFAULT="h-default",Oe.HOR_HEADER_FIXED="hor-header-fixed",Oe.HOR_DARK_LAYOUT="hor-dark-layout",exports.FooterType=void 0,(Re=exports.FooterType||(exports.FooterType={})).FIXED="fixed",Re.FLUID="fluid",exports.LayoutDirection=void 0,(Fe=exports.LayoutDirection||(exports.LayoutDirection={})).RTL="rtl",Fe.LTR="ltr",exports.HeaderType=void 0,(He=exports.HeaderType||(exports.HeaderType={})).DARK="dark",He.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,(Me=exports.Fonts||(exports.Fonts={})).LIGHT="300",Me.REGULAR="400",Me.MEDIUM="500",Me.BOLD="600",exports.AuthType=void 0,(Ue=exports.AuthType||(exports.AuthType={})).FIREBASE="firebase",Ue.AWS_COGNITO="aws_cognito",Ue.AUTH0="auth0",Ue.JWT_AUTH="jwt_auth",exports.AppAnimates=void 0,(_e=exports.AppAnimates||(exports.AppAnimates={})).SLIDEUPIN="transition.slideUpIn",_e.SLIDEUPOUT="transition.slideUpOut",_e.SLIDEDOWNIN="transition.slideDownIn",_e.SLIDEDOWNOUT="transition.slideDownOut",_e.SLIDELEFTIN="transition.slideLeftIn",_e.SLIDELEFTOUT="transition.slideLeftOut",_e.SLIDERIGHTIN="transition.slideRightIn",_e.SLIDERIGHTOUT="transition.slideRightOut",_e.FADEIN="transition.fadeIn",_e.FADEOUT="transition.fadeOut";var Pe,Ge;exports.MessageType=void 0,(Pe=exports.MessageType||(exports.MessageType={}))[Pe.MEDIA=1]="MEDIA",Pe[Pe.TEXT=2]="TEXT",exports.RoutePermittedRole=void 0,(Ge=exports.RoutePermittedRole||(exports.RoutePermittedRole={})).Admin="admin",Ge.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(ue,{children:[e.jsxs(ce,{children:[e.jsx(he,{$src:i,children:!i&&xe(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(de,{type:"button",className:x,$shape:c,$size:h,$open:b,"aria-label":`Account menu for ${o.fullName}`,children:[i?e.jsx("img",{src:i,alt:""}):xe(o.fullName),!u&&e.jsx(pe,{$size:h,$open:b,"aria-hidden":!0,children:e.jsx(n.DownOutlined,{})})]})})},exports.HISD3Button=({variant:t="secondary",...r})=>e.jsx(Te,{...De[t],...r}),exports.HISD3HeaderActions=({children:t,divided:o=!1,className:n})=>{const i=r.Children.toArray(t).filter(Boolean);return e.jsx(ge,{className:n,children:i.map(((t,n)=>e.jsxs(r.Fragment,{children:[o&&n===i.length-1&&n>0&&e.jsx(be,{}),t]},n)))})},exports.HISD3Input=t=>e.jsx(Ee,{...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,icon:x,className:g})=>{const[b,m]=r.useState(!1),f=i??o.filter((e=>e.unread)).length,y=e.jsxs(ee,{children:[e.jsxs(te,{children:[e.jsx("h4",{children:l}),s&&f>0&&e.jsx("button",{type:"button",onClick:s,children:"Mark all as read"})]}),a?e.jsx(se,{style:{textAlign:"center"},children:e.jsx(t.Spin,{})}):0===o.length?e.jsx(se,{children:e.jsx(t.Empty,{image:t.Empty.PRESENTED_IMAGE_SIMPLE,description:c})}):e.jsx(re,{children:o.map((t=>e.jsxs(oe,{type:"button",$unread:t.unread,onClick:()=>{t.onClick?.(t),m(!1),h?.(!1)},children:[e.jsx(ne,{$src:t.avatarSrc,children:!t.avatarSrc&&(t.icon??e.jsx(n.BellFilled,{}))}),e.jsxs(ie,{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(ae,{})]},t.id)))}),d&&e.jsx(le,{type:"button",onClick:()=>{d(),m(!1),h?.(!1)},children:p})]});return e.jsx(t.Dropdown,{open:b,onOpenChange:e=>{m(e),h?.(e)},trigger:["click"],placement:"bottomRight",popupRender:()=>y,children:e.jsxs(Q,{type:"button",$size:u,$open:b,className:g,"aria-label":`${l}${f?` (${f} unread)`:""}`,children:[x??e.jsx(n.BellFilled,{}),f>0&&e.jsx(Z,{$size:u,children:f>99?"99+":f})]})})},exports.HISD3PageBody=J,exports.HISD3PageHeader=({title:r,subtitle:o,breadcrumb:n,extra:i,leading:a,hideTopBar:l=!1,className:s})=>e.jsxs(X,{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(V,{children:i})]}),e.jsxs(Y,{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($e,{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=P,headerExtra:y,userMenuItems:v,onCollapse:A,collapsed:N=!1,loading:O=!1,hideSidebar:R=!1,layoutTop:F=!1,hideCollapseTrigger:H=!1,collapseTrigger:B="edge",collapseTriggerOffset:M=Math.round(k/2),siderWidth:K=w,bareContent:X=!1,hideHeaderBar:q=!1,brandHref:V="/",hideAccountCard:Y=!1,scrollContent:J=!0})=>{const Q=f(),Z=void 0===b?Q?null:g:b,[ee,te]=r.useState(N);r.useEffect((()=>{te(N)}),[N]);const re=r.useMemo((()=>_(d,m)),[d,m]),oe=r.useMemo((()=>((e,t)=>{let r;const o=(e,n)=>{(e??[]).forEach(((e,i)=>{const a=U(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]),[ne,ie]=r.useState((()=>oe.openKeys));r.useEffect((()=>{ie((e=>Array.from(new Set([...e,...oe.openKeys]))))}),[oe.openKeys.join("|")]);const ae=e=>{te(e),A?.(e)},le=oe.selectedKey?[oe.selectedKey]:[],se=H?"none":B,de=ee?"Expand menu":"Collapse menu",pe=e.jsxs(D,{href:V,$collapsed:!F&&ee,children:[l?e.jsx("img",{src:l,alt:s}):e.jsx("span",{className:"hisd3-brand-mark","aria-hidden":!0}),(F||!ee)&&e.jsx("h1",{children:s})]}),ce=X?i:e.jsx(L,{children:i});if("undefined"==typeof document)return null;const he=e.jsx(t.App,{component:!1,children:e.jsx(t.Spin,{spinning:O,size:"large",children:R?e.jsx(e.Fragment,{children:i}):F?e.jsxs(j,{$appShell:J,children:[e.jsxs(E,{children:[pe,e.jsx(t.Menu,{mode:"horizontal",items:re,selectedKeys:le}),y,!Y&&e.jsx(G,{account:a,avatarSrc:h,settingsUrl:x,onLogout:p,placement:"bottomRight",extraItems:v})]}),e.jsx(I,{$scroll:J,children:ce})]}):e.jsxs(j,{hasSider:!0,$appShell:J,children:[e.jsxs(W,{className:"hisd3-sider",width:K,collapsedWidth:S,collapsible:!0,collapsed:ee,trigger:null,theme:"light",breakpoint:"lg",onBreakpoint:e=>{e&&ae(!0)},children:[pe,e.jsx(T,{className:ee?"hisd3-collapsed":void 0,children:e.jsx(t.Menu,{mode:"inline",theme:"light",inlineCollapsed:ee,items:re,selectedKeys:le,openKeys:ee?void 0:ne,onOpenChange:e=>ie(e)})}),!Y&&e.jsx(G,{account:a,avatarSrc:h,settingsUrl:x,onLogout:p,collapsed:ee,placement:"topRight",extraItems:v})]}),e.jsxs(I,{$scroll:J,children:[!q&&e.jsxs($,{children:["header"===se&&e.jsx(C,{type:"button","aria-label":de,onClick:()=>ae(!ee),children:ee?e.jsx(n.MenuUnfoldOutlined,{}):e.jsx(n.MenuFoldOutlined,{})}),e.jsx("span",{style:{flex:1}}),y]}),ce]}),"edge"===se&&e.jsx(z,{type:"button","aria-label":de,title:de,$left:ee?S:K,$top:M,onClick:()=>ae(!ee),children:ee?e.jsx(n.RightOutlined,{}):e.jsx(n.LeftOutlined,{})})]})})});return Q&&!u?Z?e.jsx(t.ConfigProvider,{theme:Z,children:he}):he:e.jsx(o.ThemeProvider,{theme:u??{},children:Z?e.jsx(t.ConfigProvider,{theme:Z,children:he}):he})},exports.HISD3Table=function({pagination:r,footer:o,...i}){const a=r||void 0,l=a?.pageSizeOptions??[10,20,50];return e.jsxs(me,{children:[e.jsx(t.Table,{...i,pagination:!1}),o&&e.jsx(fe,{children:o}),a&&e.jsxs(ye,{children:[e.jsx("span",{className:"hisd3-total",children:(a.renderTotal??we)(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(ve,{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(Se,{...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(Ie,{$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=Q,exports.UserMenu=G,exports.borderVarsCss=x,exports.createHisd3Theme=u,exports.getInitials=xe,exports.hisd3AntdTheme=g,exports.resolvePrimary=c,exports.tint=h,exports.useInsideHISD3Provider=f;
|
|
899
966
|
//# sourceMappingURL=index.cjs.js.map
|