@ukic/web-components 2.16.0 → 2.17.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/helpers-3d0705ed.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +15 -7
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js +2 -1
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/collection/components/ic-badge/ic-badge.js +15 -7
- package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
- package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js +2 -2
- package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js.map +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.js +2 -1
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
- package/dist/collection/utils/helpers.js +14 -0
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/ic-badge.js +16 -8
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-dialog.js +2 -1
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/{p-aac0195e.entry.js → p-01da2341.entry.js} +2 -2
- package/dist/core/{p-c2173562.entry.js → p-034723b0.entry.js} +2 -2
- package/dist/core/{p-04d2f198.entry.js → p-0c679975.entry.js} +2 -2
- package/dist/core/{p-8cbbe579.entry.js → p-14a0c9a9.entry.js} +2 -2
- package/dist/core/{p-f026466e.entry.js → p-19247a5a.entry.js} +2 -2
- package/dist/core/{p-563c2522.entry.js → p-196511f4.entry.js} +2 -2
- package/dist/core/{p-2edbdbaf.entry.js → p-1cca9f24.entry.js} +2 -2
- package/dist/core/p-227761a5.entry.js +2 -0
- package/dist/core/p-227761a5.entry.js.map +1 -0
- package/dist/core/{p-fc91292d.entry.js → p-2499416a.entry.js} +2 -2
- package/dist/core/{p-cc0ab439.entry.js → p-2f973f6a.entry.js} +2 -2
- package/dist/core/{p-ab14339d.entry.js → p-389d8200.entry.js} +2 -2
- package/dist/core/{p-fc83d8d7.entry.js → p-3aa1b3c7.entry.js} +2 -2
- package/dist/core/p-40a59fd5.entry.js +2 -0
- package/dist/core/p-40a59fd5.entry.js.map +1 -0
- package/dist/core/{p-2ed0232c.entry.js → p-47b1ec8a.entry.js} +2 -2
- package/dist/core/{p-5479d3e5.entry.js → p-4c992683.entry.js} +2 -2
- package/dist/core/{p-268355c1.js → p-4cefa844.js} +2 -2
- package/dist/core/{p-268355c1.js.map → p-4cefa844.js.map} +1 -1
- package/dist/core/{p-cd2d2141.entry.js → p-55f7eecc.entry.js} +2 -2
- package/dist/core/{p-880bcf91.entry.js → p-573186d7.entry.js} +2 -2
- package/dist/core/{p-ba31ee69.entry.js → p-625a06af.entry.js} +2 -2
- package/dist/core/{p-65d3c0f1.entry.js → p-63d6ce35.entry.js} +2 -2
- package/dist/core/p-67f670b2.entry.js +2 -0
- package/dist/core/{p-9b4fd843.entry.js.map → p-67f670b2.entry.js.map} +1 -1
- package/dist/core/{p-8841668b.entry.js → p-6d623125.entry.js} +2 -2
- package/dist/core/{p-4e3d46f2.entry.js → p-72621de7.entry.js} +2 -2
- package/dist/core/{p-dfef57d3.entry.js → p-76d82d3c.entry.js} +2 -2
- package/dist/core/{p-5421ceb4.entry.js → p-7e636a51.entry.js} +2 -2
- package/dist/core/{p-e7483ee5.entry.js → p-83d1a0e1.entry.js} +2 -2
- package/dist/core/p-87ec0cef.entry.js +2 -0
- package/dist/core/{p-ba8d968c.entry.js.map → p-87ec0cef.entry.js.map} +1 -1
- package/dist/core/{p-9c157974.entry.js → p-901eacb8.entry.js} +2 -2
- package/dist/core/{p-c43946b0.entry.js → p-91527032.entry.js} +2 -2
- package/dist/core/{p-04dd9fe8.entry.js → p-917abbfa.entry.js} +2 -2
- package/dist/core/{p-14ea9cc7.entry.js → p-91dd1555.entry.js} +2 -2
- package/dist/core/{p-e47f887a.entry.js → p-9870bc1a.entry.js} +2 -2
- package/dist/core/{p-2e3845be.entry.js → p-99db319c.entry.js} +2 -2
- package/dist/core/{p-a222554a.entry.js → p-a14b672a.entry.js} +2 -2
- package/dist/core/{p-2436d4bd.entry.js → p-a98506a6.entry.js} +2 -2
- package/dist/core/{p-934c2a94.entry.js → p-af5931f4.entry.js} +2 -2
- package/dist/core/{p-e7b676fc.entry.js → p-b0892084.entry.js} +2 -2
- package/dist/core/{p-1e84a765.entry.js → p-b8a82735.entry.js} +2 -2
- package/dist/core/{p-8352d752.entry.js → p-c37bf1c6.entry.js} +2 -2
- package/dist/core/{p-8a77a417.entry.js → p-c4ff9e66.entry.js} +2 -2
- package/dist/core/{p-c1bb5018.entry.js → p-c8538a01.entry.js} +2 -2
- package/dist/core/{p-b7bf772b.entry.js → p-d192a1e4.entry.js} +2 -2
- package/dist/core/{p-8eb0e85f.entry.js → p-d93267e0.entry.js} +2 -2
- package/dist/core/{p-77503f4f.entry.js → p-dd8861c0.entry.js} +2 -2
- package/dist/core/{p-cdb51adf.entry.js → p-e21263d5.entry.js} +2 -2
- package/dist/core/{p-c0525936.entry.js → p-e6eafc88.entry.js} +2 -2
- package/dist/core/{p-917b15da.entry.js → p-eacc562b.entry.js} +2 -2
- package/dist/core/{p-f926174d.entry.js → p-ec1c7ecd.entry.js} +2 -2
- package/dist/core/{p-18137908.entry.js → p-edbb9e9d.entry.js} +2 -2
- package/dist/core/{p-d5cadfa1.entry.js → p-ef21f737.entry.js} +2 -2
- package/dist/core/{p-77a00075.entry.js → p-fc20178a.entry.js} +2 -2
- package/dist/core/{p-f24084fa.entry.js → p-fcf42a0a.entry.js} +2 -2
- package/dist/esm/{helpers-4262def4.js → helpers-8cc07380.js} +2 -2
- package/dist/esm/{helpers-4262def4.js.map → helpers-8cc07380.js.map} +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js +1 -1
- package/dist/esm/ic-back-to-top.entry.js +1 -1
- package/dist/esm/ic-badge.entry.js +16 -8
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
- package/dist/esm/ic-breadcrumb.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js +1 -1
- package/dist/esm/ic-card.entry.js +1 -1
- package/dist/esm/ic-checkbox-group.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +1 -1
- package/dist/esm/ic-chip.entry.js +1 -1
- package/dist/esm/ic-data-row.entry.js +1 -1
- package/dist/esm/ic-dialog.entry.js +3 -2
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-divider.entry.js +1 -1
- package/dist/esm/ic-empty-state.entry.js +1 -1
- package/dist/esm/ic-footer-link-group.entry.js +1 -1
- package/dist/esm/ic-footer-link.entry.js +1 -1
- package/dist/esm/ic-footer.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +1 -1
- package/dist/esm/ic-input-label_2.entry.js +1 -1
- package/dist/esm/ic-link.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-item.entry.js +1 -1
- package/dist/esm/ic-navigation-button.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-menu.entry.js +1 -1
- package/dist/esm/ic-page-header.entry.js +1 -1
- package/dist/esm/ic-pagination-item.entry.js +1 -1
- package/dist/esm/ic-pagination.entry.js +1 -1
- package/dist/esm/ic-popover-menu.entry.js +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-option.entry.js +1 -1
- package/dist/esm/ic-search-bar.entry.js +1 -1
- package/dist/esm/ic-select.entry.js +1 -1
- package/dist/esm/ic-side-navigation.entry.js +1 -1
- package/dist/esm/ic-status-tag.entry.js +1 -1
- package/dist/esm/ic-step.entry.js +1 -1
- package/dist/esm/ic-stepper.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-panel.entry.js +1 -1
- package/dist/esm/ic-tab.entry.js +1 -1
- package/dist/esm/ic-text-field.entry.js +1 -1
- package/dist/esm/ic-theme.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toggle-button.entry.js +1 -1
- package/dist/esm/ic-top-navigation.entry.js +1 -1
- package/dist/esm/ic-typography.entry.js +1 -1
- package/dist/types/components/ic-badge/ic-badge.d.ts +1 -0
- package/dist/types/utils/helpers.d.ts +1 -0
- package/hydrate/index.js +17 -8
- package/package.json +2 -2
- package/dist/core/p-22cbe39b.entry.js +0 -2
- package/dist/core/p-22cbe39b.entry.js.map +0 -1
- package/dist/core/p-9b4fd843.entry.js +0 -2
- package/dist/core/p-b1e74a89.entry.js +0 -2
- package/dist/core/p-b1e74a89.entry.js.map +0 -1
- package/dist/core/p-ba8d968c.entry.js +0 -2
- /package/dist/core/{p-aac0195e.entry.js.map → p-01da2341.entry.js.map} +0 -0
- /package/dist/core/{p-c2173562.entry.js.map → p-034723b0.entry.js.map} +0 -0
- /package/dist/core/{p-04d2f198.entry.js.map → p-0c679975.entry.js.map} +0 -0
- /package/dist/core/{p-8cbbe579.entry.js.map → p-14a0c9a9.entry.js.map} +0 -0
- /package/dist/core/{p-f026466e.entry.js.map → p-19247a5a.entry.js.map} +0 -0
- /package/dist/core/{p-563c2522.entry.js.map → p-196511f4.entry.js.map} +0 -0
- /package/dist/core/{p-2edbdbaf.entry.js.map → p-1cca9f24.entry.js.map} +0 -0
- /package/dist/core/{p-fc91292d.entry.js.map → p-2499416a.entry.js.map} +0 -0
- /package/dist/core/{p-cc0ab439.entry.js.map → p-2f973f6a.entry.js.map} +0 -0
- /package/dist/core/{p-ab14339d.entry.js.map → p-389d8200.entry.js.map} +0 -0
- /package/dist/core/{p-fc83d8d7.entry.js.map → p-3aa1b3c7.entry.js.map} +0 -0
- /package/dist/core/{p-2ed0232c.entry.js.map → p-47b1ec8a.entry.js.map} +0 -0
- /package/dist/core/{p-5479d3e5.entry.js.map → p-4c992683.entry.js.map} +0 -0
- /package/dist/core/{p-cd2d2141.entry.js.map → p-55f7eecc.entry.js.map} +0 -0
- /package/dist/core/{p-880bcf91.entry.js.map → p-573186d7.entry.js.map} +0 -0
- /package/dist/core/{p-ba31ee69.entry.js.map → p-625a06af.entry.js.map} +0 -0
- /package/dist/core/{p-65d3c0f1.entry.js.map → p-63d6ce35.entry.js.map} +0 -0
- /package/dist/core/{p-8841668b.entry.js.map → p-6d623125.entry.js.map} +0 -0
- /package/dist/core/{p-4e3d46f2.entry.js.map → p-72621de7.entry.js.map} +0 -0
- /package/dist/core/{p-dfef57d3.entry.js.map → p-76d82d3c.entry.js.map} +0 -0
- /package/dist/core/{p-5421ceb4.entry.js.map → p-7e636a51.entry.js.map} +0 -0
- /package/dist/core/{p-e7483ee5.entry.js.map → p-83d1a0e1.entry.js.map} +0 -0
- /package/dist/core/{p-9c157974.entry.js.map → p-901eacb8.entry.js.map} +0 -0
- /package/dist/core/{p-c43946b0.entry.js.map → p-91527032.entry.js.map} +0 -0
- /package/dist/core/{p-04dd9fe8.entry.js.map → p-917abbfa.entry.js.map} +0 -0
- /package/dist/core/{p-14ea9cc7.entry.js.map → p-91dd1555.entry.js.map} +0 -0
- /package/dist/core/{p-e47f887a.entry.js.map → p-9870bc1a.entry.js.map} +0 -0
- /package/dist/core/{p-2e3845be.entry.js.map → p-99db319c.entry.js.map} +0 -0
- /package/dist/core/{p-a222554a.entry.js.map → p-a14b672a.entry.js.map} +0 -0
- /package/dist/core/{p-2436d4bd.entry.js.map → p-a98506a6.entry.js.map} +0 -0
- /package/dist/core/{p-934c2a94.entry.js.map → p-af5931f4.entry.js.map} +0 -0
- /package/dist/core/{p-e7b676fc.entry.js.map → p-b0892084.entry.js.map} +0 -0
- /package/dist/core/{p-1e84a765.entry.js.map → p-b8a82735.entry.js.map} +0 -0
- /package/dist/core/{p-8352d752.entry.js.map → p-c37bf1c6.entry.js.map} +0 -0
- /package/dist/core/{p-8a77a417.entry.js.map → p-c4ff9e66.entry.js.map} +0 -0
- /package/dist/core/{p-c1bb5018.entry.js.map → p-c8538a01.entry.js.map} +0 -0
- /package/dist/core/{p-b7bf772b.entry.js.map → p-d192a1e4.entry.js.map} +0 -0
- /package/dist/core/{p-8eb0e85f.entry.js.map → p-d93267e0.entry.js.map} +0 -0
- /package/dist/core/{p-77503f4f.entry.js.map → p-dd8861c0.entry.js.map} +0 -0
- /package/dist/core/{p-cdb51adf.entry.js.map → p-e21263d5.entry.js.map} +0 -0
- /package/dist/core/{p-c0525936.entry.js.map → p-e6eafc88.entry.js.map} +0 -0
- /package/dist/core/{p-917b15da.entry.js.map → p-eacc562b.entry.js.map} +0 -0
- /package/dist/core/{p-f926174d.entry.js.map → p-ec1c7ecd.entry.js.map} +0 -0
- /package/dist/core/{p-18137908.entry.js.map → p-edbb9e9d.entry.js.map} +0 -0
- /package/dist/core/{p-d5cadfa1.entry.js.map → p-ef21f737.entry.js.map} +0 -0
- /package/dist/core/{p-77a00075.entry.js.map → p-fc20178a.entry.js.map} +0 -0
- /package/dist/core/{p-f24084fa.entry.js.map → p-fcf42a0a.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,h as t,g as i}from"./p-6b5e91e2.js";import{j as a,i as o,a as r,k as n}from"./p-268355c1.js";import{I as s}from"./p-26b7b18f.js";import{C as c}from"./p-3b185c32.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:flex}a{text-decoration:none !important;color:var(--ic-architechtural-black) !important}button{border:none;background-color:transparent;outline:var(--ic-hc-focus-outline)}.card,.card.clickable{display:flex;flex-direction:column;border:var(--ic-border-default);border-radius:var(--ic-border-radius);box-sizing:border-box;padding:var(--ic-space-md);text-align:left;color:var(--ic-architechtural-black);transition:var(--ic-easing-transition-fast);width:inherit;position:relative}.dark.card,.dark.card.clickable{border:var(--ic-border-width) solid var(--ic-architectural-700)}.card.clickable:hover{background-color:var(--ic-action-default-bg-hover);border:var(--ic-border-hover);cursor:pointer}.card.clickable:focus,.card.clickable.focussed{background-color:var(--ic-action-default-bg-hover);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);border:var(--ic-border-pressed)}.card.clickable:active{background-color:var(--ic-action-default-bg-active);box-shadow:var(--ic-border-focus)}.card.disabled{border:var(--ic-border-disabled)}.card.fullwidth{width:100%}.card-header{display:flex;align-items:center}.icon{display:flex;align-items:center;padding-right:var(--ic-space-xs)}.card.disabled ::slotted(svg){fill:var(--ic-color-tertiary-text)}.card.clickable .card-title{color:var(--ic-hyperlink);text-decoration:underline;text-decoration-thickness:var(--ic-space-1px)}.card.clickable:hover .card-title,.card.clickable:focus .card-title,.card.clickable.focussed .card-title{display:inline-block;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none}@supports (text-decoration-thickness: 25%){.card.clickable:hover .card-title,.card.clickable:focus .card-title,.card.clickable.focussed .card-title{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}.card.clickable:active .card-title{text-decoration:none}.card.disabled .card-title{text-decoration:underline;text-decoration-thickness:var(--ic-space-1px);text-decoration-color:var(--ic-color-tertiary-text);color:var(--ic-color-tertiary-text)}.subheading{margin-top:var(--ic-space-xxs)}.adornment{margin-top:var(--ic-space-xxs)}.card-message{margin-top:var(--ic-space-md);align-items:left}.card.disabled .card-message,.card.disabled .subheading{color:var(--ic-color-tertiary-text)}.interaction-button{margin-left:auto}.image-top{margin-bottom:var(--ic-space-md);display:flex;justify-content:center}.image-mid{margin-top:var(--ic-space-md);display:flex;justify-content:center}.interaction-area{display:flex;flex-grow:1;gap:var(--ic-space-md);margin-top:var(--ic-space-md);align-items:flex-end}.interaction-controls{display:flex;align-items:center;flex-wrap:wrap;gap:var(--ic-space-sm)}.toggle-button{color:var(--ic-action-default);width:2.5rem;height:2.5rem;padding:var(--ic-space-xs);margin:var(--ic-space-1px) 0;min-width:0;cursor:pointer;transition:var(--ic-easing-transition-fast);border-radius:var(--ic-border-radius);display:inline-flex;flex-direction:row;justify-content:center;align-items:center;background:none;border:none;box-sizing:border-box;white-space:nowrap;vertical-align:middle}#ic-tooltip-expand-button{margin-left:auto;position:relative}.toggle-button:hover,.toggle-button:hover:focus{background-color:var(--ic-action-default-bg-hover);color:var(--ic-action-default-hover)}.toggle-button:focus{box-shadow:var(--ic-border-focus)}.toggle-button:active:not(:focus){background-color:var(--ic-action-default-bg-active);color:var(--ic-action-default-active)}.toggle-button svg{pointer-events:none;width:100% !important;height:100% !important;fill:currentcolor !important}.toggle-button-closed svg{transform:rotate(90deg)}.toggle-button-expanded svg{transform:rotate(-90deg)}.expanded-content{margin-top:var(--ic-space-md)}@media (forced-colors: active){.card ::slotted(svg){fill:currentcolor}.card.disabled ::slotted(svg){fill:GrayText !important}.card.disabled{border-color:GrayText !important}.card.disabled .card-message,.card.disabled .subheading,.card.disabled .card-title{color:GrayText}}';const l=class{constructor(t){e(this,t);this.parentFocussed=()=>{this.isFocussed=true};this.parentBlurred=()=>{this.isFocussed=false};this.toggleExpanded=()=>{this.areaExpanded=!this.areaExpanded};this.appearance="default";this.areaExpanded=false;this.isFocussed=false;this.parentEl=null;this.parentIsAnchorTag=false;this.clickable=false;this.disabled=false;this.expandable=false;this.fullWidth=false;this.heading=undefined;this.href=undefined;this.hreflang="";this.message="";this.referrerpolicy=undefined;this.rel=undefined;this.subheading=undefined;this.target=undefined}disconnectedCallback(){if(this.parentIsAnchorTag){this.parentEl.removeEventListener("focus",this.parentFocussed);this.parentEl.removeEventListener("blur",this.parentBlurred)}}componentWillLoad(){this.parentEl=this.el.parentElement;if(this.parentEl.tagName==="A"){this.clickable=true;this.parentIsAnchorTag=true;this.parentEl.classList.add("ic-card-wrapper-link");this.parentEl.addEventListener("focus",this.parentFocussed);this.parentEl.addEventListener("blur",this.parentBlurred)}a(this.disabled,this.el)}componentDidLoad(){!o(this.el,"heading")&&r([{prop:this.heading,propName:"heading"}],"Card");this.updateTheme()}handleHostClick(e){if(this.disabled){e.stopImmediatePropagation()}}themeChangeHandler(e){const t=e.detail;this.updateTheme(t.mode)}async setFocus(){if(this.el.shadowRoot.querySelector("a")){this.el.shadowRoot.querySelector("a").focus()}else if(this.el.shadowRoot.querySelector("button")){this.el.shadowRoot.querySelector("button").focus()}}updateTheme(e=null){const t=n(this.el,e||null);if(t!==s.Default){this.appearance=t}}render(){const{clickable:e,disabled:i,expandable:a,heading:r,message:n,href:d,hreflang:l,referrerpolicy:b,rel:u,subheading:p,target:h,fullWidth:m,parentIsAnchorTag:g,isFocussed:f}=this;const v=g?"div":e?this.href===undefined?"button":"a":"div";const x=v=="a"&&{href:d,hrefLang:l,referrerPolicy:b,rel:u,target:h};return t(v,Object.assign({class:{["card"]:true,["clickable"]:e&&!i,["disabled"]:i,["fullwidth"]:m,["focussed"]:f,["dark"]:this.appearance===s.Dark},tabindex:e&&!g?0:null,"aria-disabled":i?"true":null,disabled:i?true:null},x),o(this.el,"image-top")&&t("div",{class:"image-top"},t("slot",{name:"image-top"})),t("div",{class:"card-header"},o(this.el,"icon")&&t("div",{class:"icon"},t("slot",{name:"icon"})),t("div",{class:"card-title"},t("slot",{name:"heading"},t("ic-typography",{variant:"h4"},t("p",null,r)))),o(this.el,"interaction-button")&&t("div",{class:"interaction-button"},t("slot",{name:"interaction-button"}))),(p||o(this.el,"subheading"))&&t("div",{class:"subheading"},t("slot",{name:"subheading"},t("ic-typography",{variant:"subtitle-small"},p))),o(this.el,"adornment")&&t("div",{class:"adornment"},t("slot",{name:"adornment"})),o(this.el,"image-mid")&&t("div",{class:"image-mid"},t("slot",{name:"image-mid"})),(n||o(this.el,"message"))&&t("div",{class:{["card-message"]:true}},n&&t("ic-typography",{variant:"body"},n),o(this.el,"message")&&t("slot",{name:"message"})),(o(this.el,"interaction-controls")||a)&&t("div",{class:"interaction-area"},t("div",{class:"interaction-controls"},t("slot",{name:"interaction-controls"})),a&&t("ic-tooltip",{id:"ic-tooltip-expand-button",label:"Toggle expandable area",silent:true},t("button",{class:{["toggle-button"]:true,[`toggle-button-${this.areaExpanded?"expanded":"closed"}`]:true},"aria-label":"Toggle expandable area","aria-expanded":`${this.areaExpanded}`,"aria-controls":this.areaExpanded?"expanded-content-area":null,onClick:this.toggleExpanded,innerHTML:c}))),o(this.el,"expanded-content")&&this.areaExpanded&&t("div",{class:"expanded-content",id:"expanded-content-area"},t("slot",{name:"expanded-content"})),o(this.el,"badge")&&t("slot",{name:"badge"}))}get el(){return i(this)}};l.style=d;export{l as ic_card};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,h as t,g as i}from"./p-6b5e91e2.js";import{j as a,i as o,a as r,k as n}from"./p-4cefa844.js";import{I as s}from"./p-26b7b18f.js";import{C as c}from"./p-3b185c32.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:flex}a{text-decoration:none !important;color:var(--ic-architechtural-black) !important}button{border:none;background-color:transparent;outline:var(--ic-hc-focus-outline)}.card,.card.clickable{display:flex;flex-direction:column;border:var(--ic-border-default);border-radius:var(--ic-border-radius);box-sizing:border-box;padding:var(--ic-space-md);text-align:left;color:var(--ic-architechtural-black);transition:var(--ic-easing-transition-fast);width:inherit;position:relative}.dark.card,.dark.card.clickable{border:var(--ic-border-width) solid var(--ic-architectural-700)}.card.clickable:hover{background-color:var(--ic-action-default-bg-hover);border:var(--ic-border-hover);cursor:pointer}.card.clickable:focus,.card.clickable.focussed{background-color:var(--ic-action-default-bg-hover);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);border:var(--ic-border-pressed)}.card.clickable:active{background-color:var(--ic-action-default-bg-active);box-shadow:var(--ic-border-focus)}.card.disabled{border:var(--ic-border-disabled)}.card.fullwidth{width:100%}.card-header{display:flex;align-items:center}.icon{display:flex;align-items:center;padding-right:var(--ic-space-xs)}.card.disabled ::slotted(svg){fill:var(--ic-color-tertiary-text)}.card.clickable .card-title{color:var(--ic-hyperlink);text-decoration:underline;text-decoration-thickness:var(--ic-space-1px)}.card.clickable:hover .card-title,.card.clickable:focus .card-title,.card.clickable.focussed .card-title{display:inline-block;border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none}@supports (text-decoration-thickness: 25%){.card.clickable:hover .card-title,.card.clickable:focus .card-title,.card.clickable.focussed .card-title{text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}.card.clickable:active .card-title{text-decoration:none}.card.disabled .card-title{text-decoration:underline;text-decoration-thickness:var(--ic-space-1px);text-decoration-color:var(--ic-color-tertiary-text);color:var(--ic-color-tertiary-text)}.subheading{margin-top:var(--ic-space-xxs)}.adornment{margin-top:var(--ic-space-xxs)}.card-message{margin-top:var(--ic-space-md);align-items:left}.card.disabled .card-message,.card.disabled .subheading{color:var(--ic-color-tertiary-text)}.interaction-button{margin-left:auto}.image-top{margin-bottom:var(--ic-space-md);display:flex;justify-content:center}.image-mid{margin-top:var(--ic-space-md);display:flex;justify-content:center}.interaction-area{display:flex;flex-grow:1;gap:var(--ic-space-md);margin-top:var(--ic-space-md);align-items:flex-end}.interaction-controls{display:flex;align-items:center;flex-wrap:wrap;gap:var(--ic-space-sm)}.toggle-button{color:var(--ic-action-default);width:2.5rem;height:2.5rem;padding:var(--ic-space-xs);margin:var(--ic-space-1px) 0;min-width:0;cursor:pointer;transition:var(--ic-easing-transition-fast);border-radius:var(--ic-border-radius);display:inline-flex;flex-direction:row;justify-content:center;align-items:center;background:none;border:none;box-sizing:border-box;white-space:nowrap;vertical-align:middle}#ic-tooltip-expand-button{margin-left:auto;position:relative}.toggle-button:hover,.toggle-button:hover:focus{background-color:var(--ic-action-default-bg-hover);color:var(--ic-action-default-hover)}.toggle-button:focus{box-shadow:var(--ic-border-focus)}.toggle-button:active:not(:focus){background-color:var(--ic-action-default-bg-active);color:var(--ic-action-default-active)}.toggle-button svg{pointer-events:none;width:100% !important;height:100% !important;fill:currentcolor !important}.toggle-button-closed svg{transform:rotate(90deg)}.toggle-button-expanded svg{transform:rotate(-90deg)}.expanded-content{margin-top:var(--ic-space-md)}@media (forced-colors: active){.card ::slotted(svg){fill:currentcolor}.card.disabled ::slotted(svg){fill:GrayText !important}.card.disabled{border-color:GrayText !important}.card.disabled .card-message,.card.disabled .subheading,.card.disabled .card-title{color:GrayText}}';const l=class{constructor(t){e(this,t);this.parentFocussed=()=>{this.isFocussed=true};this.parentBlurred=()=>{this.isFocussed=false};this.toggleExpanded=()=>{this.areaExpanded=!this.areaExpanded};this.appearance="default";this.areaExpanded=false;this.isFocussed=false;this.parentEl=null;this.parentIsAnchorTag=false;this.clickable=false;this.disabled=false;this.expandable=false;this.fullWidth=false;this.heading=undefined;this.href=undefined;this.hreflang="";this.message="";this.referrerpolicy=undefined;this.rel=undefined;this.subheading=undefined;this.target=undefined}disconnectedCallback(){if(this.parentIsAnchorTag){this.parentEl.removeEventListener("focus",this.parentFocussed);this.parentEl.removeEventListener("blur",this.parentBlurred)}}componentWillLoad(){this.parentEl=this.el.parentElement;if(this.parentEl.tagName==="A"){this.clickable=true;this.parentIsAnchorTag=true;this.parentEl.classList.add("ic-card-wrapper-link");this.parentEl.addEventListener("focus",this.parentFocussed);this.parentEl.addEventListener("blur",this.parentBlurred)}a(this.disabled,this.el)}componentDidLoad(){!o(this.el,"heading")&&r([{prop:this.heading,propName:"heading"}],"Card");this.updateTheme()}handleHostClick(e){if(this.disabled){e.stopImmediatePropagation()}}themeChangeHandler(e){const t=e.detail;this.updateTheme(t.mode)}async setFocus(){if(this.el.shadowRoot.querySelector("a")){this.el.shadowRoot.querySelector("a").focus()}else if(this.el.shadowRoot.querySelector("button")){this.el.shadowRoot.querySelector("button").focus()}}updateTheme(e=null){const t=n(this.el,e||null);if(t!==s.Default){this.appearance=t}}render(){const{clickable:e,disabled:i,expandable:a,heading:r,message:n,href:d,hreflang:l,referrerpolicy:b,rel:u,subheading:p,target:h,fullWidth:m,parentIsAnchorTag:g,isFocussed:f}=this;const v=g?"div":e?this.href===undefined?"button":"a":"div";const x=v=="a"&&{href:d,hrefLang:l,referrerPolicy:b,rel:u,target:h};return t(v,Object.assign({class:{["card"]:true,["clickable"]:e&&!i,["disabled"]:i,["fullwidth"]:m,["focussed"]:f,["dark"]:this.appearance===s.Dark},tabindex:e&&!g?0:null,"aria-disabled":i?"true":null,disabled:i?true:null},x),o(this.el,"image-top")&&t("div",{class:"image-top"},t("slot",{name:"image-top"})),t("div",{class:"card-header"},o(this.el,"icon")&&t("div",{class:"icon"},t("slot",{name:"icon"})),t("div",{class:"card-title"},t("slot",{name:"heading"},t("ic-typography",{variant:"h4"},t("p",null,r)))),o(this.el,"interaction-button")&&t("div",{class:"interaction-button"},t("slot",{name:"interaction-button"}))),(p||o(this.el,"subheading"))&&t("div",{class:"subheading"},t("slot",{name:"subheading"},t("ic-typography",{variant:"subtitle-small"},p))),o(this.el,"adornment")&&t("div",{class:"adornment"},t("slot",{name:"adornment"})),o(this.el,"image-mid")&&t("div",{class:"image-mid"},t("slot",{name:"image-mid"})),(n||o(this.el,"message"))&&t("div",{class:{["card-message"]:true}},n&&t("ic-typography",{variant:"body"},n),o(this.el,"message")&&t("slot",{name:"message"})),(o(this.el,"interaction-controls")||a)&&t("div",{class:"interaction-area"},t("div",{class:"interaction-controls"},t("slot",{name:"interaction-controls"})),a&&t("ic-tooltip",{id:"ic-tooltip-expand-button",label:"Toggle expandable area",silent:true},t("button",{class:{["toggle-button"]:true,[`toggle-button-${this.areaExpanded?"expanded":"closed"}`]:true},"aria-label":"Toggle expandable area","aria-expanded":`${this.areaExpanded}`,"aria-controls":this.areaExpanded?"expanded-content-area":null,onClick:this.toggleExpanded,innerHTML:c}))),o(this.el,"expanded-content")&&this.areaExpanded&&t("div",{class:"expanded-content",id:"expanded-content-area"},t("slot",{name:"expanded-content"})),o(this.el,"badge")&&t("slot",{name:"badge"}))}get el(){return i(this)}};l.style=d;export{l as ic_card};
|
2
|
+
//# sourceMappingURL=p-1cca9f24.entry.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as a}from"./p-6b5e91e2.js";import{c as n}from"./p-f074ef5b.js";import{f as o,c as r,i as l}from"./p-4cefa844.js";import"./p-26b7b18f.js";const h='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;min-height:100% !important;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);opacity:0;transition:opacity var(--ic-easing-transition-slow)}:host(.disable-height-constraint){background:none;justify-content:unset;align-items:unset}.dialog.disable-height-constraint{max-height:none;position:relative}.dialog.disable-height-constraint .content-area{overflow-y:visible}:host(.fade-in){opacity:1;transition:opacity var(--ic-easing-transition-slow)}:host(.hidden){display:none}.dialog{background-color:var(--ic-architectural-white);border:var(--ic-border-default);border-radius:var(--ic-border-radius);padding:var(--ic-space-xs) 0 var(--ic-space-md);transform:translateY(-3rem);transition:transform 1000s;display:flex;flex-direction:column;box-sizing:border-box;overflow-x:visible}:host(.fade-in) .dialog{transform:translateY(0);transition:transform var(--ic-easing-transition-slow)}.small{width:50%;max-width:25rem;min-height:11rem;max-height:70vh}.medium{width:70vw;max-width:44rem;min-height:12.5rem;max-height:70vh}.large{width:90vw;max-width:62.5rem;min-height:12.5rem;max-height:90vh}.heading-area{display:flex;margin-bottom:var(--ic-space-xs);padding:0 var(--ic-space-md)}.heading{overflow-wrap:break-word}.close-icon{margin-left:auto}.content-area{-ms-overflow-style:none;scrollbar-width:none;padding:0 var(--ic-space-md);margin:0;overflow-y:auto}.content-area::-webkit-scrollbar{display:none}#dialog-content{margin-bottom:var(--ic-space-sm)}#dialog-content ::slotted(ic-typography){overflow-wrap:break-word}#dialog-content ::slotted(*){position:relative}.status-alert{margin-bottom:var(--ic-space-xs)}.dialog-controls{margin-top:auto;padding:var(--ic-space-xs) var(--ic-space-md) 0;display:flex;justify-content:flex-end;gap:var(--ic-space-md)}.dialog-control-button{width:-moz-fit-content;width:fit-content}.backdrop{overflow-y:auto;position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgb(0 0 0 / 60%);z-index:var(--ic-z-index-dialog);padding-top:16px;padding-bottom:16px}@media (min-width: 800px){:host([size="large"]) .dialog:not(.disable-width-constraint)>.content-area{width:75%}}@media (max-width: 576px){.dialog{width:100vw;height:100vh;transform:translateY(-5rem);max-width:none;max-height:none;box-sizing:border-box}.backdrop{padding:0}.dialog.disable-height-constraint{height:auto;min-height:100vh}}@media (max-width: 364px){.triple-button{flex-direction:column;gap:var(--ic-space-xs)}.dialog-control-button{width:unset}}';const d=class{constructor(s){t(this,s);this.icDialogCancelled=i(this,"icDialogCancelled",7);this.icDialogClosed=i(this,"icDialogClosed",7);this.icDialogConfirmed=i(this,"icDialogConfirmed",7);this.icDialogOpened=i(this,"icDialogOpened",7);this.DATA_GETS_FOCUS="data-gets-focus";this.DATA_GETS_FOCUS_SELECTOR="[data-gets-focus]";this.DIALOG_CONTROLS="dialog-controls";this.dialogHeight=0;this.focusedElementIndex=0;this.IC_TEXT_FIELD="IC-TEXT-FIELD";this.IC_ACCORDION="IC-ACCORDION";this.resizeObserver=null;this.dialogOpened=()=>{var t;this.dialogRendered=true;if(this.disableHeightConstraint){this.dialogEl.show()}else{(t=this.dialogEl)===null||t===void 0?void 0:t.showModal()}setTimeout((()=>{this.fadeIn=true;if(this.disableHeightConstraint&&this.backdropEl.scrollTop!==0){this.backdropEl.scrollTop=0}}),10);setTimeout((()=>{this.setInitialFocus();o(this.runResizeObserver)}),75);setTimeout((()=>{this.getFocusedElementIndex();this.icDialogOpened.emit()}),80)};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{clearTimeout(this.resizeTimeout);this.resizeTimeout=window.setTimeout(this.resizeObserverCallback,80)}));this.resizeObserver.observe(this.dialogEl)};this.resizeObserverCallback=()=>{if(this.dialogEl.clientHeight!==this.dialogHeight){this.dialogHeight=this.dialogEl.clientHeight}};this.refreshInteractiveElementsOnSlotChange=()=>{this.contentArea=this.el.shadowRoot.querySelector("#dialog-content slot");this.contentArea.addEventListener("slotchange",this.getInteractiveElements)};this.removeSlotChangeListener=()=>{if(this.contentArea){this.contentArea.removeEventListener("slotchange",this.getInteractiveElements)}};this.setInitialFocus=()=>{this.sourceElement=document.activeElement;let t;if(this.el.querySelector(this.DATA_GETS_FOCUS_SELECTOR)!==null){t=this.el.querySelector(this.DATA_GETS_FOCUS_SELECTOR)}else{t=this.el.shadowRoot.querySelector(this.DATA_GETS_FOCUS_SELECTOR)}if(t.tagName===this.IC_TEXT_FIELD){t.setFocus()}else if(t.tagName===this.IC_ACCORDION){t.setFocus()}else{t.focus({preventScroll:this.disableHeightConstraint?true:false})}};this.getFocusedElementIndex=()=>{for(let t=0;t<this.interactiveElementList.length;t++){if(this.interactiveElementList[t]===(this.el.shadowRoot.activeElement||document.activeElement)){this.focusedElementIndex=t}}};this.setAlertVariant=()=>{if(r(this.status)&&this.status!==null){const t=this.el.shadowRoot.querySelector("ic-alert");t.setAttribute("variant",this.status)}};this.closeIconClick=()=>{this.open=false};this.getInteractiveElements=()=>{this.interactiveElementList=Array.from(this.el.shadowRoot.querySelectorAll("ic-button"));const t=Array.from(this.el.querySelectorAll(`a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex="-1"]), \n ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-group, ic-radio-group, \n ic-back-to-top, ic-breadcrumb, ic-chip[dismissible="true"], ic-footer-link, ic-link, ic-navigation-button, \n ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion`));if(t.length>0){if(t[0].slot!==this.DIALOG_CONTROLS){t[0].setAttribute(this.DATA_GETS_FOCUS,"")}else if(!this.destructive){t[t.length-1].setAttribute(this.DATA_GETS_FOCUS,"")}}for(let i=0;i<t.length;i++){this.interactiveElementList.splice(1+i,0,t[i])}};this.getNextFocusEl=t=>this.interactiveElementList[t];this.focusNextInteractiveElement=t=>{this.getFocusedElementIndex();this.setFocusIndexBasedOnShiftKey(t);this.loopNextFocusIndexIfLastElement();let i=this.getNextFocusEl(this.focusedElementIndex);const e=getComputedStyle(i).visibility==="hidden";if(i.tagName===this.IC_TEXT_FIELD){i.setFocus()}else{if(e){this.setFocusIndexBasedOnShiftKey(t);this.loopNextFocusIndexIfLastElement();i=this.getNextFocusEl(this.focusedElementIndex)}if(i.tagName===this.IC_ACCORDION){i.setFocus()}else{i.focus()}}};this.setButtonOnClick=()=>{var t,i,e;if(this.buttons){this.buttonOnclick0=new Function((t=this.buttonProps[0])===null||t===void 0?void 0:t.onclick);this.buttonOnclick1=new Function((i=this.buttonProps[1])===null||i===void 0?void 0:i.onclick);this.buttonOnclick2=new Function((e=this.buttonProps[2])===null||e===void 0?void 0:e.onclick)}};this.getButtonOnclick=t=>{if(t===0){return this.buttonOnclick0()}else if(t===1){return this.buttonOnclick1()}else{return this.buttonOnclick2()}};this.getButtonVariant=t=>{const i=this.destructive?"destructive":"primary";if(this.buttonProps.length===1){return i}else if(this.buttonProps.length===2){if(t===0){return"tertiary"}else{return i}}else{if(t===2){return i}else{return"secondary"}}};this.renderDialog=()=>{const{alertHeading:t,alertMessage:i,buttons:s,buttonProps:a,size:o,heading:r,label:h,status:d,destructive:c,dismissLabel:u,hideCloseButton:m}=this;return e("dialog",{class:{["dialog"]:true,[`${o}`]:true,["disable-height-constraint"]:this.disableHeightConstraint,["disable-width-constraint"]:this.disableWidthConstraint},"aria-labelledby":"dialog-label dialog-heading","aria-describedby":"dialog-alert dialog-content",ref:t=>this.dialogEl=t},e("div",{class:"heading-area"},e("div",{class:"heading-content"},e("div",{class:"label"},e("slot",{name:"label"},e("ic-typography",{variant:"label",id:"dialog-label"},h))),e("div",{class:"heading"},e("slot",{name:"heading"},e("ic-typography",{variant:"h4",id:"dialog-heading"},r)))),!m&&e("ic-button",{class:"close-icon",variant:"icon",innerHTML:n,"aria-label":u,onClick:this.closeIconClick,"data-gets-focus":c||!s?"":null})),e("div",{class:"content-area"},l(this.el,"alert")?e("slot",{name:"alert"}):d&&e("ic-alert",{variant:d,heading:t,message:i,"title-above":true,class:"status-alert",id:"dialog-alert"}),e("div",{id:"dialog-content"},e("slot",null))),(s||l(this.el,this.DIALOG_CONTROLS))&&e("div",{class:{[this.DIALOG_CONTROLS]:true,["triple-button"]:a.length===3}},e("slot",{name:this.DIALOG_CONTROLS},!l(this.el,this.DIALOG_CONTROLS)&&a.map(((t,i)=>{if(i>2){return}else{return e("ic-button",{variant:this.getButtonVariant(i),onClick:()=>this.getButtonOnclick(i),class:"dialog-control-button","full-width":a.length===3,"data-gets-focus":this.getButtonVariant(i)==="primary"?"":null},t.label)}})))))};this.dialogRendered=false;this.fadeIn=false;this.alertHeading=undefined;this.alertMessage=undefined;this.buttons=true;this.closeOnBackdropClick=true;this.destructive=false;this.dismissLabel="Dismiss";this.disableHeightConstraint=false;this.disableWidthConstraint=false;this.hideCloseButton=false;this.heading=undefined;this.label=undefined;this.open=undefined;this.size="small";this.status=undefined;this.buttonProps=[{label:"Cancel",onclick:"this.cancelDialog();"},{label:"Confirm",onclick:"this.confirmDialog();"}]}watchOpenHandler(){if(this.open){this.dialogOpened()}else{this.fadeIn=false;if(this.resizeObserver!==null){this.resizeObserver.disconnect()}setTimeout((()=>{var t;this.dialogRendered=false;this.dialogEl.close();(t=this.sourceElement)===null||t===void 0?void 0:t.focus();this.dialogHeight=0;this.icDialogClosed.emit()}),80)}}watchPropHandler(){this.setButtonOnClick()}disconnectedCallback(){this.removeSlotChangeListener()}componentWillLoad(){if(this.buttonProps.length){this.setButtonOnClick()}}componentDidLoad(){this.getInteractiveElements();this.setAlertVariant();this.refreshInteractiveElementsOnSlotChange();if(this.open){this.dialogOpened()}}componentDidRender(){if(getComputedStyle(this.el).display!=="none"&&this.disableHeightConstraint){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}}handleKeyboard(t){if(this.dialogRendered){switch(t.key){case"Tab":t.preventDefault();this.focusNextInteractiveElement(t.shiftKey);break;case"Escape":if(!t.repeat){this.open=false}t.stopImmediatePropagation();break}}}handleClick(t){const i=this.el.shadowRoot.querySelector("dialog");if(this.closeOnBackdropClick&&t.composedPath().indexOf(i)<=0){const i=this.dialogEl.getBoundingClientRect();const e=i.top<=t.clientY&&t.clientY<=i.top+i.height&&i.left<=t.clientX&&t.clientX<=i.left+i.width;if(!e){this.open=false}}}async showDialog(){this.open=true}async hideDialog(){this.open=false}async cancelDialog(){this.icDialogCancelled.emit();this.open=false}async confirmDialog(){this.icDialogConfirmed.emit()}loopNextFocusIndexIfLastElement(){if(this.focusedElementIndex>this.interactiveElementList.length-1)this.focusedElementIndex=0;else if(this.focusedElementIndex<0){this.focusedElementIndex=this.interactiveElementList.length-1}}setFocusIndexBasedOnShiftKey(t){if(t){this.focusedElementIndex-=1}else{this.focusedElementIndex+=1}}render(){return e(s,{class:{["hidden"]:!this.dialogRendered,["fade-in"]:this.fadeIn,["disable-height-constraint"]:this.disableHeightConstraint}},this.disableHeightConstraint?e("div",{class:"backdrop",ref:t=>this.backdropEl=t},this.renderDialog()):this.renderDialog())}get el(){return a(this)}static get watchers(){return{open:["watchOpenHandler"],buttonProps:["watchPropHandler"]}}};d.style=h;export{d as ic_dialog};
|
2
|
+
//# sourceMappingURL=p-227761a5.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icDialogCss","Dialog","this","DATA_GETS_FOCUS","DATA_GETS_FOCUS_SELECTOR","DIALOG_CONTROLS","dialogHeight","focusedElementIndex","IC_TEXT_FIELD","IC_ACCORDION","resizeObserver","dialogOpened","dialogRendered","disableHeightConstraint","dialogEl","show","_a","showModal","setTimeout","fadeIn","backdropEl","scrollTop","setInitialFocus","checkResizeObserver","runResizeObserver","getFocusedElementIndex","icDialogOpened","emit","ResizeObserver","clearTimeout","resizeTimeout","window","resizeObserverCallback","observe","clientHeight","refreshInteractiveElementsOnSlotChange","contentArea","el","shadowRoot","querySelector","addEventListener","getInteractiveElements","removeSlotChangeListener","removeEventListener","sourceElement","document","activeElement","focusedElement","tagName","setFocus","focus","preventScroll","i","interactiveElementList","length","setAlertVariant","isPropDefined","status","alert","setAttribute","closeIconClick","open","Array","from","querySelectorAll","slottedInteractiveElements","slot","destructive","splice","getNextFocusEl","focusNextInteractiveElement","shiftKey","setFocusIndexBasedOnShiftKey","loopNextFocusIndexIfLastElement","nextFocusEl","isHidden","getComputedStyle","visibility","setButtonOnClick","buttons","buttonOnclick0","Function","buttonProps","onclick","buttonOnclick1","_b","buttonOnclick2","_c","getButtonOnclick","index","getButtonVariant","mainVariant","renderDialog","alertHeading","alertMessage","size","heading","label","dismissLabel","hideCloseButton","h","class","disableWidthConstraint","ref","name","variant","id","innerHTML","closeIcon","onClick","isSlotUsed","message","map","props","undefined","watchOpenHandler","disconnect","close","icDialogClosed","watchPropHandler","disconnectedCallback","componentWillLoad","componentDidLoad","componentDidRender","display","body","style","overflow","handleKeyboard","ev","key","preventDefault","repeat","stopImmediatePropagation","handleClick","dialogElement","closeOnBackdropClick","composedPath","indexOf","rect","getBoundingClientRect","isInDialog","top","clientY","height","left","clientX","width","showDialog","hideDialog","cancelDialog","icDialogCancelled","confirmDialog","icDialogConfirmed","render","Host"],"sources":["src/components/ic-dialog/ic-dialog.css?tag=ic-dialog&encapsulation=shadow","src/components/ic-dialog/ic-dialog.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-dialog: z-index of dialog \n */\n\n:host {\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100% !important;\n background: rgb(0 0 0 / 60%);\n z-index: var(--ic-z-index-dialog);\n opacity: 0;\n transition: opacity var(--ic-easing-transition-slow);\n}\n\n:host(.disable-height-constraint) {\n background: none;\n justify-content: unset;\n align-items: unset;\n}\n\n.dialog.disable-height-constraint {\n max-height: none;\n position: relative;\n}\n\n.dialog.disable-height-constraint .content-area {\n overflow-y: visible;\n}\n\n:host(.fade-in) {\n opacity: 1;\n transition: opacity var(--ic-easing-transition-slow);\n}\n\n:host(.hidden) {\n display: none;\n}\n\n.dialog {\n background-color: var(--ic-architectural-white);\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n padding: var(--ic-space-xs) 0 var(--ic-space-md);\n transform: translateY(-3rem);\n transition: transform 1000s;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n overflow-x: visible;\n}\n\n:host(.fade-in) .dialog {\n transform: translateY(0);\n transition: transform var(--ic-easing-transition-slow);\n}\n\n.small {\n width: 50%;\n max-width: 25rem;\n min-height: 11rem;\n max-height: 70vh;\n}\n\n.medium {\n width: 70vw;\n max-width: 44rem;\n min-height: 12.5rem;\n max-height: 70vh;\n}\n\n.large {\n width: 90vw;\n max-width: 62.5rem;\n min-height: 12.5rem;\n max-height: 90vh;\n}\n\n.heading-area {\n display: flex;\n margin-bottom: var(--ic-space-xs);\n padding: 0 var(--ic-space-md);\n}\n\n.heading {\n overflow-wrap: break-word;\n}\n\n.close-icon {\n margin-left: auto;\n}\n\n.content-area {\n -ms-overflow-style: none;\n scrollbar-width: none;\n padding: 0 var(--ic-space-md);\n margin: 0;\n overflow-y: auto;\n}\n\n.content-area::-webkit-scrollbar {\n display: none;\n}\n\n#dialog-content {\n margin-bottom: var(--ic-space-sm);\n}\n\n#dialog-content ::slotted(ic-typography) {\n overflow-wrap: break-word;\n}\n\n#dialog-content ::slotted(*) {\n position: relative;\n}\n\n.status-alert {\n margin-bottom: var(--ic-space-xs);\n}\n\n.dialog-controls {\n margin-top: auto;\n padding: var(--ic-space-xs) var(--ic-space-md) 0;\n display: flex;\n justify-content: flex-end;\n gap: var(--ic-space-md);\n}\n\n.dialog-control-button {\n width: fit-content;\n}\n\n.backdrop {\n overflow-y: auto;\n position: fixed;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgb(0 0 0 / 60%);\n z-index: var(--ic-z-index-dialog);\n padding-top: 16px;\n padding-bottom: 16px;\n}\n\n@media (min-width: 800px) {\n :host([size=\"large\"]) .dialog:not(.disable-width-constraint) > .content-area {\n width: 75%;\n }\n}\n\n@media (max-width: 576px) {\n .dialog {\n width: 100vw;\n height: 100vh;\n transform: translateY(-5rem);\n max-width: none;\n max-height: none;\n box-sizing: border-box;\n }\n\n .backdrop {\n padding: 0;\n }\n\n .dialog.disable-height-constraint {\n height: auto;\n min-height: 100vh;\n }\n}\n\n@media (max-width: 364px) {\n .triple-button {\n flex-direction: column;\n gap: var(--ic-space-xs);\n }\n\n .dialog-control-button {\n width: unset;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Prop,\n State,\n Method,\n Listen,\n Watch,\n h,\n} from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport {\n isSlotUsed,\n checkResizeObserver,\n isPropDefined,\n} from \"../../utils/helpers\";\n\n/**\n * @slot dialog-controls - Content will be place at the bottom of the dialog.\n * @slot heading - Content will be placed at the top of the dialog.\n * @slot label - Content will be placed above the dialog heading.\n * @slot alert - Content will be placed at the top of the content area of the dialog.\n */\n@Component({\n tag: \"ic-dialog\",\n styleUrl: \"ic-dialog.css\",\n shadow: true,\n})\nexport class Dialog {\n private backdropEl: HTMLDivElement;\n private contentArea: HTMLSlotElement;\n private DATA_GETS_FOCUS: string = \"data-gets-focus\";\n private DATA_GETS_FOCUS_SELECTOR: string = \"[data-gets-focus]\";\n private DIALOG_CONTROLS: string = \"dialog-controls\";\n private dialogEl: HTMLDialogElement;\n private dialogHeight: number = 0;\n private focusedElementIndex = 0;\n private IC_TEXT_FIELD: string = \"IC-TEXT-FIELD\";\n private IC_ACCORDION: string = \"IC-ACCORDION\";\n private interactiveElementList: HTMLElement[];\n private resizeObserver: ResizeObserver = null;\n private resizeTimeout: number;\n private sourceElement: HTMLElement;\n\n /* eslint-disable */\n\n private buttonOnclick0: Function;\n private buttonOnclick1: Function;\n private buttonOnclick2: Function;\n\n /* eslint-enable */\n\n @Element() el: HTMLIcDialogElement;\n\n @State() dialogRendered: boolean = false;\n @State() fadeIn: boolean = false;\n\n /**\n * @deprecated This prop should not be used anymore. Use an ic-alert/IcAlert component within an alert slot with a heading instead.\n */\n @Prop() alertHeading?: string;\n\n /**\n * @deprecated This prop should not be used anymore. Use an ic-alert/IcAlert component within an alert slot with a message instead.\n */\n @Prop() alertMessage?: string;\n\n /**\n * If set to `false`, dialog controls will not be displayed overriding buttonProps or slotted dialog controls.\n */\n @Prop() buttons?: boolean = true;\n\n /**\n * If set to `true`, the dialog will not close when the backdrop is clicked.\n */\n @Prop() closeOnBackdropClick?: boolean = true;\n\n /**\n * If default buttons are displayed, sets the 'primary' or rightmost button to the destructive variant. Stops initial focus being set on the 'primary' or rightmost default or slotted button.\n */\n @Prop() destructive?: boolean = false;\n\n /**\n * Sets the dismiss label tooltip and aria label.\n */\n @Prop() dismissLabel?: string = \"Dismiss\";\n\n /**\n * If set to `true`, the content area max height and overflow properties are removed allowing the dialog to stretch below the fold.\n * This prop also prevents popover elements from being cut off within the content area.\n */\n @Prop() disableHeightConstraint?: boolean = false;\n\n /**\n * If set to `true`, the content area width property is removed, allowing content to take the full width of the dialog when using the large variant.\n */\n @Prop() disableWidthConstraint?: boolean = false;\n\n /**\n * If `true`, the close button will not be displayed.\n */\n @Prop() hideCloseButton?: boolean = false;\n\n /**\n * Sets the heading for the dialog.\n */\n @Prop() heading!: string;\n\n /**\n * Sets the optional label for the dialog which appears above the heading.\n */\n @Prop() label?: string;\n\n /**\n * If `true`, the dialog will be displayed.\n */\n @Prop({ reflect: true, mutable: true }) open: boolean = undefined;\n\n @Watch(\"open\")\n watchOpenHandler(): void {\n if (this.open) {\n this.dialogOpened();\n } else {\n this.fadeIn = false;\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n setTimeout(() => {\n this.dialogRendered = false;\n this.dialogEl.close();\n this.sourceElement?.focus();\n this.dialogHeight = 0;\n this.icDialogClosed.emit();\n }, 80);\n }\n }\n\n /**\n * Sets the maximum and minimum height and width for the dialog.\n */\n @Prop() size?: \"small\" | \"medium\" | \"large\" = \"small\";\n\n /**\n * @deprecated This prop should not be used anymore. Use an ic-alert/IcAlert component within an alert slot with a variant instead.\n */\n @Prop() status?: \"neutral\" | \"info\" | \"warning\" | \"error\" | \"success\";\n\n /**\n * Sets the label and onclick functions for default buttons.\n */\n @Prop() buttonProps?: { label: string; onclick: string }[] = [\n {\n label: \"Cancel\",\n onclick: \"this.cancelDialog();\",\n },\n { label: \"Confirm\", onclick: \"this.confirmDialog();\" },\n ];\n\n @Watch(\"buttonProps\")\n watchPropHandler(): void {\n this.setButtonOnClick();\n }\n\n /**\n * Cancelation event emitted when default 'Cancel' button clicked or 'cancelDialog' method is called.\n */\n @Event() icDialogCancelled: EventEmitter<void>;\n\n /**\n * Emitted when dialog has closed.\n */\n @Event() icDialogClosed: EventEmitter<void>;\n\n /**\n * Confirmation event emitted when default 'Confirm' primary button clicked or 'confirmDialog' method is called.\n */\n @Event() icDialogConfirmed: EventEmitter<void>;\n\n /**\n * Emitted when dialog has opened.\n */\n @Event() icDialogOpened: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.removeSlotChangeListener();\n }\n\n componentWillLoad(): void {\n if (this.buttonProps.length) {\n this.setButtonOnClick();\n }\n }\n\n componentDidLoad(): void {\n this.getInteractiveElements();\n this.setAlertVariant();\n\n this.refreshInteractiveElementsOnSlotChange();\n\n if (this.open) {\n this.dialogOpened();\n }\n }\n\n componentDidRender(): void {\n if (\n getComputedStyle(this.el).display !== \"none\" &&\n this.disableHeightConstraint\n ) {\n document.body.style.overflow = \"hidden\";\n } else {\n document.body.style.overflow = \"auto\";\n }\n }\n\n @Listen(\"keydown\", { target: \"document\" })\n handleKeyboard(ev: KeyboardEvent): void {\n if (this.dialogRendered) {\n switch (ev.key) {\n case \"Tab\":\n ev.preventDefault();\n this.focusNextInteractiveElement(ev.shiftKey);\n break;\n case \"Escape\":\n if (!ev.repeat) {\n this.open = false;\n }\n ev.stopImmediatePropagation();\n break;\n }\n }\n }\n\n @Listen(\"click\", {})\n handleClick(ev: MouseEvent): void {\n const dialogElement = this.el.shadowRoot.querySelector(\"dialog\");\n if (\n this.closeOnBackdropClick &&\n ev.composedPath().indexOf(dialogElement) <= 0\n ) {\n const rect = this.dialogEl.getBoundingClientRect();\n const isInDialog =\n rect.top <= ev.clientY &&\n ev.clientY <= rect.top + rect.height &&\n rect.left <= ev.clientX &&\n ev.clientX <= rect.left + rect.width;\n if (!isInDialog) {\n this.open = false;\n }\n }\n }\n\n /**\n * @deprecated This method should not be used anymore. Use open prop to set dialog visibility.\n */\n @Method()\n async showDialog(): Promise<void> {\n this.open = true;\n }\n\n /**\n * @deprecated This method should not be used anymore. Use open prop to set dialog visibility.\n */\n @Method()\n async hideDialog(): Promise<void> {\n this.open = false;\n }\n\n /**\n * Cancels the dialog. Used by the default 'Cancel' button or can be called manually to trigger cancelling of dialog.\n */\n @Method()\n async cancelDialog(): Promise<void> {\n this.icDialogCancelled.emit();\n this.open = false;\n }\n\n /**\n * Confirms the dialog. Used by the default 'Confirm' button or can be called manually to trigger confirming of dialog.\n */\n @Method()\n async confirmDialog(): Promise<void> {\n this.icDialogConfirmed.emit();\n }\n\n private dialogOpened = () => {\n this.dialogRendered = true;\n\n if (this.disableHeightConstraint) {\n this.dialogEl.show();\n } else {\n this.dialogEl?.showModal();\n }\n\n setTimeout(() => {\n this.fadeIn = true;\n\n /**\n * This is required to set scroll back to top if:\n * - dialog content goes below the fold\n * - is closed using cancel or confirm and reopened.\n *\n * Without this, the scroll bar will start from the dialog's last scroll-x coordinate.\n */\n if (this.disableHeightConstraint && this.backdropEl.scrollTop !== 0) {\n this.backdropEl.scrollTop = 0;\n }\n }, 10);\n\n setTimeout(() => {\n this.setInitialFocus();\n checkResizeObserver(this.runResizeObserver);\n }, 75);\n\n setTimeout(() => {\n this.getFocusedElementIndex();\n this.icDialogOpened.emit();\n }, 80);\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n clearTimeout(this.resizeTimeout);\n this.resizeTimeout = window.setTimeout(this.resizeObserverCallback, 80);\n });\n this.resizeObserver.observe(this.dialogEl);\n };\n\n private resizeObserverCallback = () => {\n if (this.dialogEl.clientHeight !== this.dialogHeight) {\n this.dialogHeight = this.dialogEl.clientHeight;\n }\n };\n\n private refreshInteractiveElementsOnSlotChange = () => {\n this.contentArea = this.el.shadowRoot.querySelector(\"#dialog-content slot\");\n\n this.contentArea.addEventListener(\n \"slotchange\",\n this.getInteractiveElements\n );\n };\n\n private removeSlotChangeListener = () => {\n if (this.contentArea) {\n this.contentArea.removeEventListener(\n \"slotchange\",\n this.getInteractiveElements\n );\n }\n };\n\n private setInitialFocus = () => {\n this.sourceElement = document.activeElement as HTMLElement;\n\n let focusedElement;\n\n if (this.el.querySelector(this.DATA_GETS_FOCUS_SELECTOR) !== null) {\n focusedElement = this.el.querySelector(\n this.DATA_GETS_FOCUS_SELECTOR\n ) as HTMLElement;\n } else {\n focusedElement = this.el.shadowRoot.querySelector(\n this.DATA_GETS_FOCUS_SELECTOR\n ) as HTMLElement;\n }\n if (focusedElement.tagName === this.IC_TEXT_FIELD) {\n (focusedElement as HTMLIcTextFieldElement).setFocus();\n } else if (focusedElement.tagName === this.IC_ACCORDION) {\n (focusedElement as HTMLIcAccordionElement).setFocus();\n } else {\n focusedElement.focus({\n preventScroll: this.disableHeightConstraint ? true : false,\n });\n }\n };\n\n private getFocusedElementIndex = () => {\n for (let i = 0; i < this.interactiveElementList.length; i++) {\n if (\n (this.interactiveElementList[i] as HTMLElement) ===\n (this.el.shadowRoot.activeElement || document.activeElement)\n ) {\n this.focusedElementIndex = i;\n }\n }\n };\n\n private setAlertVariant = () => {\n if (isPropDefined(this.status) && this.status !== null) {\n const alert = this.el.shadowRoot.querySelector(\"ic-alert\");\n alert.setAttribute(\"variant\", this.status);\n }\n };\n\n private closeIconClick = () => {\n this.open = false;\n };\n\n private getInteractiveElements = () => {\n this.interactiveElementList = Array.from(\n this.el.shadowRoot.querySelectorAll(\"ic-button\")\n );\n const slottedInteractiveElements = Array.from(\n this.el.querySelectorAll(\n `a[href], button, input:not(.ic-input), textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), \n ic-button, ic-checkbox, ic-select, ic-search-bar, ic-tab-group, ic-radio-group, \n ic-back-to-top, ic-breadcrumb, ic-chip[dismissible=\"true\"], ic-footer-link, ic-link, ic-navigation-button, \n ic-navigation-item, ic-switch, ic-text-field, ic-accordion-group, ic-accordion`\n )\n );\n if (slottedInteractiveElements.length > 0) {\n if (slottedInteractiveElements[0].slot !== this.DIALOG_CONTROLS) {\n slottedInteractiveElements[0].setAttribute(this.DATA_GETS_FOCUS, \"\");\n } else if (!this.destructive) {\n slottedInteractiveElements[\n slottedInteractiveElements.length - 1\n ].setAttribute(this.DATA_GETS_FOCUS, \"\");\n }\n }\n for (let i = 0; i < slottedInteractiveElements.length; i++) {\n this.interactiveElementList.splice(\n 1 + i,\n 0,\n slottedInteractiveElements[i] as HTMLElement\n );\n }\n };\n\n private getNextFocusEl = (focusedElementIndex: number) =>\n this.interactiveElementList[focusedElementIndex];\n\n private focusNextInteractiveElement = (shiftKey: boolean) => {\n this.getFocusedElementIndex();\n this.setFocusIndexBasedOnShiftKey(shiftKey);\n this.loopNextFocusIndexIfLastElement();\n\n let nextFocusEl = this.getNextFocusEl(this.focusedElementIndex);\n\n const isHidden = getComputedStyle(nextFocusEl).visibility === \"hidden\";\n\n if (nextFocusEl.tagName === this.IC_TEXT_FIELD) {\n (nextFocusEl as HTMLIcTextFieldElement).setFocus();\n } else {\n if (isHidden) {\n this.setFocusIndexBasedOnShiftKey(shiftKey);\n this.loopNextFocusIndexIfLastElement();\n\n nextFocusEl = this.getNextFocusEl(this.focusedElementIndex);\n }\n if (nextFocusEl.tagName === this.IC_ACCORDION) {\n (nextFocusEl as HTMLIcAccordionElement).setFocus();\n } else {\n (nextFocusEl as HTMLElement).focus();\n }\n }\n };\n\n private setButtonOnClick = () => {\n if (this.buttons) {\n this.buttonOnclick0 = new Function(this.buttonProps[0]?.onclick);\n this.buttonOnclick1 = new Function(this.buttonProps[1]?.onclick);\n this.buttonOnclick2 = new Function(this.buttonProps[2]?.onclick);\n }\n };\n\n private getButtonOnclick = (index: number) => {\n if (index === 0) {\n return this.buttonOnclick0();\n } else if (index === 1) {\n return this.buttonOnclick1();\n } else {\n return this.buttonOnclick2();\n }\n };\n\n private getButtonVariant = (index: number) => {\n const mainVariant = this.destructive ? \"destructive\" : \"primary\";\n if (this.buttonProps.length === 1) {\n return mainVariant;\n } else if (this.buttonProps.length === 2) {\n if (index === 0) {\n return \"tertiary\";\n } else {\n return mainVariant;\n }\n } else {\n if (index === 2) {\n return mainVariant;\n } else {\n return \"secondary\";\n }\n }\n };\n\n private loopNextFocusIndexIfLastElement() {\n if (this.focusedElementIndex > this.interactiveElementList.length - 1)\n this.focusedElementIndex = 0;\n else if (this.focusedElementIndex < 0) {\n this.focusedElementIndex = this.interactiveElementList.length - 1;\n }\n }\n\n private setFocusIndexBasedOnShiftKey(shiftKey: boolean) {\n if (shiftKey) {\n this.focusedElementIndex -= 1;\n } else {\n this.focusedElementIndex += 1;\n }\n }\n\n private renderDialog = () => {\n const {\n alertHeading,\n alertMessage,\n buttons,\n buttonProps,\n size,\n heading,\n label,\n status,\n destructive,\n dismissLabel,\n hideCloseButton,\n } = this;\n\n return (\n <dialog\n class={{\n [\"dialog\"]: true,\n [`${size}`]: true,\n [\"disable-height-constraint\"]: this.disableHeightConstraint,\n [\"disable-width-constraint\"]: this.disableWidthConstraint,\n }}\n aria-labelledby=\"dialog-label dialog-heading\"\n aria-describedby=\"dialog-alert dialog-content\"\n ref={(el) => (this.dialogEl = el)}\n >\n <div class=\"heading-area\">\n <div class=\"heading-content\">\n <div class=\"label\">\n <slot name=\"label\">\n <ic-typography variant=\"label\" id=\"dialog-label\">\n {label}\n </ic-typography>\n </slot>\n </div>\n <div class=\"heading\">\n <slot name=\"heading\">\n <ic-typography variant=\"h4\" id=\"dialog-heading\">\n {heading}\n </ic-typography>\n </slot>\n </div>\n </div>\n {!hideCloseButton && (\n <ic-button\n class=\"close-icon\"\n variant=\"icon\"\n innerHTML={closeIcon}\n aria-label={dismissLabel}\n onClick={this.closeIconClick}\n data-gets-focus={destructive || !buttons ? \"\" : null}\n ></ic-button>\n )}\n </div>\n <div class=\"content-area\">\n {isSlotUsed(this.el, \"alert\") ? (\n <slot name=\"alert\"></slot>\n ) : (\n status && (\n <ic-alert\n variant={status}\n heading={alertHeading}\n message={alertMessage}\n title-above\n class=\"status-alert\"\n id=\"dialog-alert\"\n ></ic-alert>\n )\n )}\n <div id=\"dialog-content\">\n <slot></slot>\n </div>\n </div>\n {(buttons || isSlotUsed(this.el, this.DIALOG_CONTROLS)) && (\n <div\n class={{\n [this.DIALOG_CONTROLS]: true,\n [\"triple-button\"]: buttonProps.length === 3,\n }}\n >\n <slot name={this.DIALOG_CONTROLS}>\n {!isSlotUsed(this.el, this.DIALOG_CONTROLS) &&\n buttonProps.map((props, index) => {\n if (index > 2) {\n return;\n } else {\n return (\n <ic-button\n variant={this.getButtonVariant(index)}\n onClick={() => this.getButtonOnclick(index)}\n class=\"dialog-control-button\"\n full-width={buttonProps.length === 3}\n data-gets-focus={\n this.getButtonVariant(index) === \"primary\" ? \"\" : null\n }\n >\n {props.label}\n </ic-button>\n );\n }\n })}\n </slot>\n </div>\n )}\n </dialog>\n );\n };\n\n render() {\n return (\n <Host\n class={{\n [\"hidden\"]: !this.dialogRendered,\n [\"fade-in\"]: this.fadeIn,\n [\"disable-height-constraint\"]: this.disableHeightConstraint,\n }}\n >\n {this.disableHeightConstraint ? (\n <div class=\"backdrop\" ref={(el) => (this.backdropEl = el)}>\n {this.renderDialog()}\n </div>\n ) : (\n this.renderDialog()\n )}\n </Host>\n );\n }\n}\n"],"mappings":"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"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as i,c as t,h as a,H as s,g as e}from"./p-6b5e91e2.js";import{c as o}from"./p-f074ef5b.js";import{C as n}from"./p-3b185c32.js";import{g as l,i as r,D as d,G as p,e as h,u as c,f as v,a as g,v as m,d as b}from"./p-268355c1.js";import{I as u}from"./p-26b7b18f.js";const y=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">\n <path d="M0 0h24v24H0V0z" fill="none" />\n <path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" />\n <title>menu icon</title>\n</svg>\n`;const x=':host{display:block;--side-navigation-position:fixed;--side-navigation-position-left:0;--side-navigation-position-top:var(--ic-space-xxl);--side-navigation-height:var(--ic-space-xxl);--sm-side-navigation-top-bar-height:3.5rem;--sm-side-navigation-collapsed-labels-width:6rem;--sm-side-navigation-expand-transition-duration:var(\n --ic-transition-duration-slow\n );--side-navigation-width:20rem;--sm-side-navigation-bottom-bar-height:3.5rem;z-index:var(--ic-z-index-side-navigation)}:host>*{box-sizing:border-box}.side-navigation{display:flex;flex-direction:column;width:var(--side-navigation-width);color:var(--ic-theme-text);position:var(--side-navigation-position);top:var(--side-navigation-position-top);left:calc(var(--side-navigation-width) * -1);bottom:0;background-color:var(--ic-theme-primary);z-index:var(--ic-z-index-side-navigation)}:host(.inline) .side-navigation{position:absolute;height:100%}:host(.anchor-right) .side-navigation{right:calc(var(--side-navigation-width) * -1)}.classification-spacing{margin-bottom:var(--ic-space-lg)}.navigation-list{padding:0;margin:0;list-style:none}.side-navigation-inner{background-color:var(--ic-theme-primary);display:flex;flex-direction:column;flex:1 1 0;overflow:auto}:host(.inline) .side-navigation-inner{flex:1}:host(.xs-menu-open) .side-navigation{transition:left var(--ic-easing-transition-slow);left:0}:host(:has(.xs-menu-open,.xs-menu-close)) ::slotted(ic-navigation-item){--navigation-item-side-nav-right:var(--ic-space-xl)}:host(.xs-menu-close) .side-navigation{left:calc(var(--side-navigation-width) * -1);transition:left var(--ic-easing-transition-slow)}:host(.xs-menu-close) .side-navigation>*{visibility:hidden}:host(.anchor-right.xs-menu-open) .side-navigation{right:0;left:auto}:host(.anchor-right.xs-menu-close) .side-navigation{right:calc(var(--side-navigation-width) * -1);left:auto;transition:right var(--ic-easing-transition-slow)}.bottom-wrapper{border-top:var(--ic-keyline-lighten);bottom:0;left:0;z-index:2;box-shadow:-0.188rem -0.188rem 0.5rem rgb(0 0 0 / 20%);background-color:var(--ic-theme-primary);display:flex;flex-direction:column}:host(.inline) .bottom-wrapper{position:sticky}:host(.dark) .bottom-wrapper{border-top:var(--ic-keyline-darken)}.top-bar{display:flex;flex-direction:row;align-items:center;min-height:var(--side-navigation-height);padding:var(--ic-space-xs);box-sizing:border-box;background-color:var(--ic-theme-primary);position:fixed;top:0;left:0;right:0;border-bottom:var(--ic-keyline-darken);box-shadow:var(--ic-elevation-overlay);z-index:2;overflow:hidden;visibility:visible}:host(.inline) .top-bar{position:absolute}.top-bar.dark a:focus{box-shadow:var(--ic-border-focus)}.top-bar.light{border-bottom:var(--ic-keyline-lighten)}.app-title-wrapper{display:flex;margin-left:var(--ic-space-xs);border-left:var(--ic-keyline-darken);padding-left:var(--ic-space-xxs);color:var(--ic-theme-text);align-items:center}.app-title-wrapper ic-typography h1{margin:0}@media screen and (min-width: 340px){.app-title-wrapper ic-typography{margin-left:var(--ic-space-xs)}}:host .title-link{display:flex;align-items:center;transition:box-shadow var(--ic-easing-transition-fast),\n background-color var(--ic-easing-transition-fast);text-decoration:none;padding:var(--ic-space-xxs);color:var(--ic-theme-text)}:host .title-link:visited,:host .title-link:active{color:var(--ic-theme-text)}slot[name="app-title"]::slotted(a),slot[name="app-icon"]::slotted(a){color:var(--ic-theme-text);outline:none;text-decoration:none;display:flex}slot[name="app-title"]::slotted(ic-typography),slot[name="app-title"]::slotted(a){margin-left:var(--ic-space-xs) !important}slot[name="app-title"]::slotted(a){font:var(--ic-font-subtitle-small)}@media screen and (min-width: 577px){:host(.sm-collapsed) slot[name="app-title"]::slotted(ic-typography),:host(.sm-collapsed) slot[name="app-title"]::slotted(a){position:absolute;left:-9999px;opacity:0;transition:opacity var(--ic-easing-transition-slow)}:host(.sm-expanded) slot[name="app-title"]::slotted(a){font:var(--ic-font-h3) !important;font-weight:var(--ic-font-weight-semibold) !important;margin-left:var(--ic-space-xs) !important}}:host .title-link:hover{border-radius:var(--ic-border-radius);background-color:var(--ic-theme-hover)}:host .title-link:active{background-color:var(--ic-theme-active)}:host .title-link:focus,:host .title-link:focus-within{border-radius:var(--ic-border-radius);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);background-color:transparent}:host .title-link ic-typography{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.app-title-wrapper ::slotted(svg){fill:var(--ic-theme-text)}.app-icon-container{display:none}.button-label{display:flex;align-items:center}.mobile-top-bar-menu-icon{display:flex}.menu-button{width:6.5rem}.app-status-wrapper{inset:0 var(--ic-space-sm) 0 3.5rem;width:auto;display:flex;gap:var(--ic-space-xs);padding:var(--ic-space-sm) 0;justify-content:flex-end;align-items:flex-end;pointer-events:none;height:-moz-fit-content;height:fit-content;margin:0 var(--ic-space-xs)}.app-status-wrapper .app-version{display:flex;overflow-wrap:break-word;padding-bottom:var(--ic-space-xxs)}.app-status-wrapper .app-status{display:flex;border-radius:1rem;background-color:var(--ic-theme-text);color:var(--ic-color-primary-text);padding:var(--ic-space-xxs) var(--ic-space-lg);min-width:1rem}.app-status-wrapper .app-status-text{overflow-wrap:break-word}:host(.dark) .app-status-wrapper .app-status{color:var(--ic-color-white-text)}.navigation-landmark-title{position:absolute;width:var(--ic-space-1px);height:var(--ic-space-1px);padding:0;margin:calc(-1 * var(--ic-space-1px));overflow:hidden}::slotted(ic-navigation-group){--navigation-group-height:2.75rem;--navigation-group-width:100%;--navigation-group-justify-content:space-between;--navigation-group-hover:var(--ic-theme-hover);--navigation-group-text-hover:var(--ic-theme-text);--navigation-item-child-height:3.5rem;--navigation-item-child-active:var(--ic-action-dark-bg-active);--navigation-item-child-color:var(--ic-theme-text);--navigation-group-expand-toggle-padding:0.25rem}::slotted(ic-navigation-item),::slotted(ic-navigation-group){--navigation-item-justify-content:flex-start;--navigation-item-min-height:56px;--navigation-item-height:100%}.bottom-side-nav{position:relative;align-content:flex-end;min-height:var(--sm-side-navigation-top-bar-height)}.bottom-side-nav ic-divider{position:absolute;top:0;width:100%}.primary-navigation{flex:1;display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:none}.primary-navigation::-webkit-scrollbar{display:none}.primary-navigation,.secondary-navigation{overflow-x:hidden}.bottom-side-nav .menu-expand-button{position:absolute;display:none}.menu-visibility-visible{visibility:visible;width:100%}.app-title-show{min-width:15.5rem}:host(.side-display){display:flex;flex-direction:column;height:100vh;position:var(--side-navigation-position);left:0;top:0;bottom:0}:host(.side-display) .app-icon-container{height:40px;display:flex;align-items:center}:host(.side-display) .top-bar{--side-navigation-height:var(--sm-side-navigation-top-bar-height);position:relative;padding:0;box-shadow:-0.188rem 0.188rem 0.5rem rgb(0 0 0 / 20%)}:host(.inline.side-display) .top-bar{position:sticky}:host(.anchor-right.side-display) .top-bar{box-shadow:0.188rem 0.188rem 0.5rem rgb(0 0 0 / 20%)}:host(.anchor-right.side-display) .bottom-wrapper{box-shadow:0.188rem -0.188rem 0.5rem rgb(0 0 0 / 20%)}:host(.side-display) .side-navigation,:host(.side-display) .top-bar{width:var(--sm-side-navigation-top-bar-height)}:host(.sm-collapsed.side-display){width:var(--sm-side-navigation-top-bar-height);transition:width var(--ic-easing-transition-slow)}:host(.sm-collapsed.collapsed-labels.side-display){width:var(--sm-side-navigation-collapsed-labels-width)}:host(.sm-expanded.side-display){width:var(--side-navigation-width);transition:width var(--ic-easing-transition-slow);box-shadow:var(--ic-elevation-overlay)}:host(.side-display) .side-navigation{--side-navigation-position-top:0;flex:1;position:relative;top:auto;left:auto;bottom:auto}:host(.inline.side-display) .side-navigation{position:relative}:host(.anchor-right.side-display) .side-navigation{left:auto;right:0}:host(.side-display) .app-title-wrapper{margin-left:0;border-left:none;padding:var(--ic-space-xs) var(--ic-space-sm)}:host(.side-display) .app-title-wrapper ::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg)}:host(.side-display) .app-title-wrapper ic-typography{font-weight:var(--ic-font-weight-semibold)}:host(.sm-collapsed.side-display) .app-title-wrapper ic-typography{position:absolute;left:-9999px;opacity:0;transition:opacity var(--ic-easing-transition-slow)}:host(.sm-expanded.side-display) ic-typography{position:relative;left:0}:host(.sm-expanded.side-display) :is(.side-navigation,.top-bar){width:var(--side-navigation-width);transition:width var(--ic-easing-transition-slow)}:host(.sm-collapsed.side-display) :is(.side-navigation,.top-bar){width:var(--sm-side-navigation-top-bar-height);transition:width var(--ic-easing-transition-slow)}:host(.anchor-right.sm-expanded.side-display) :is(.side-navigation,.top-bar){left:auto;right:0}:host(.side-display) .app-status-wrapper,:host(.sm-collapsed.side-display) .app-status-wrapper{display:none;margin-left:0}:host(.sm-expanded.side-display) .app-status-wrapper{display:flex;max-width:16rem;margin-right:calc(var(--ic-space-xxxs) + var(--ic-space-xs))}:host(.side-display) .bottom-side-nav{justify-items:flex-end;align-items:flex-end;justify-content:flex-end;display:flex;outline:none}:host(.side-display) .bottom-side-nav .menu-expand-button{padding-left:var(--ic-space-md);height:var(--sm-side-navigation-top-bar-height);width:100%;color:var(--ic-theme-text);background-color:transparent;outline:var(--ic-hc-focus-outline);border:none;cursor:pointer;display:flex;transition:var(--ic-easing-transition-fast)}:host(.sm-expanded.side-display) .bottom-side-nav .menu-expand-button{height:100%}:host(.side-display) .bottom-side-nav .menu-expand-button svg{justify-items:flex-start;align-self:center;display:inline-block;width:var(--ic-space-lg);height:var(--ic-space-lg)}:host(.side-display) .bottom-side-nav .menu-expand-button:hover{background-color:var(--ic-theme-hover)}:host(.side-display) .bottom-side-nav .menu-expand-button:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);background-color:transparent}:host(.sm-collapsed.side-display) .bottom-side-nav .menu-expand-button svg{transform:scaleX(1);transition:transform var(--ic-easing-transition-slow)}:host(.sm-expanded.side-display) .bottom-side-nav .menu-expand-button svg{transform:scaleX(-1);transition:transform var(--ic-easing-transition-slow);align-self:flex-end;margin-bottom:0.875rem}:host(.anchor-right.sm-collapsed.side-display) .bottom-side-nav .menu-expand-button svg{transform:scaleX(-1)}:host(.anchor-right.sm-expanded.side-display) .bottom-side-nav .menu-expand-button svg{transform:scaleX(1)}:host(.sm-collapsed.side-display) ::slotted(ic-navigation-item){--navigation-item-label-opacity:1}:host(.sm-collapsed.side-display) ::slotted(ic-navigation-item),:host(.sm-collapsed.side-display) ::slotted(ic-navigation-group){--navigation-item-label-opacity:0;--navigation-item-min-height:56px;--navigation-item-height:56px}:host(.sm-expanded.side-display) ::slotted(ic-navigation-item),:host(.sm-expanded.side-display) ::slotted(ic-navigation-group){--navigation-item-label-opacity:1;--navigation-item-height:100%;--navigation-item-min-height:56px;--navigation-item-width:320px;--navigation-item-side-nav-right:var(--ic-space-xl)}:host(.sm-collapsed.side-display) ::slotted(ic-navigation-group){--navigation-group-title-position:absolute;--navigation-group-title-position-left:-9999px;--navigation-group-title-opacity:none}:host(.sm-expanded.side-display) ::slotted(ic-navigation-group){--navigation-group-title-position:relative;--navigation-group-title-position-left:0;--navigation-group-expand-toggle-padding:0.25rem;--navigation-group-title-opacity:flex}:host(.sm-collapsed.collapsed-labels.side-display) .side-navigation,:host(.sm-collapsed.collapsed-labels.side-display) .top-bar{width:var(--sm-side-navigation-collapsed-labels-width)}:host(.sm-collapsed.collapsed-labels.side-display) .menu-expand-button{padding:0}:host(.sm-collapsed.collapsed-labels.side-display) .app-title-wrapper{width:100%;justify-content:center}:host(.sm-collapsed.collapsed-labels.side-display) ::slotted(ic-navigation-group){--navigation-group-justify-content:center;--navigation-item-label-opacity:1;--navigation-group-item-min-width:100%;--navigation-group-expand-toggle-padding:1rem}:host(.collapsed-labels.side-display) .bottom-side-nav .menu-expand-button{justify-content:center}:host(.side-display) .collapsed-icon-labels-start{visibility:hidden;opacity:0}:host(.side-display) .collapsed-icon-labels-end{visibility:visible;opacity:1;transition:visibility 0s, opacity var(--ic-easing-transition-slow)}@media screen and (min-width: 340px){.app-icon-container{display:flex}}@media screen and (min-width: 993px){:host(.side-display){position:sticky;left:auto;top:0;bottom:0}:host(.sm-expanded.side-display){box-shadow:none}}@media (forced-colors: active){.side-navigation,.top-bar{border-right:var(--ic-hc-border)}slot[name="app-icon"]::slotted(svg){fill:currentcolor}}';const f=class{constructor(s){i(this,s);this.sideNavExpanded=t(this,"sideNavExpanded",7);this.ANIMATION_DURATION=parseInt(l("--ic-transition-duration-slow"))||0;this.IC_NAVIGATION_ITEM="ic-navigation-item";this.resizeObserver=null;this.COLLAPSED_ICON_LABELS_END="collapsed-icon-labels-end";this.COLLAPSED_ICON_LABELS_START="collapsed-icon-labels-start";this.menuButton=null;this.emitSideNavigationExpanded=i=>{this.sideNavExpanded.emit({sideNavExpanded:i.sideNavExpanded,sideNavMobile:i.sideNavMobile})};this.toggleMenu=()=>{this.menuOpen=!this.menuOpen;this.setMobileMenuAriaAttributes(this.menuOpen);this.arrangeSlottedNavigationItem(this.menuOpen);this.setToggleMenuFlyoutMenuVisibility(this.menuOpen);this.emitSideNavigationExpanded({sideNavExpanded:this.menuOpen,sideNavMobile:true})};this.setToggleMenuFlyoutMenuVisibility=i=>{const t=this.el.shadowRoot.querySelector("#side-navigation");const a=t.querySelector(".side-navigation-inner");const s=t.querySelector(".bottom-wrapper");const e="menu-visibility-visible";if(i){s.classList.add(e);a.classList.add(e)}else{setTimeout((()=>{a.classList.remove(e);s.classList.remove(e)}),this.ANIMATION_DURATION)}};this.setMobileMenuAriaAttributes=i=>{if(this.menuButton!==null){this.menuButton.setAttribute("aria-expanded",`${i}`);this.menuButton.setAttribute("aria-label",`${i?"Close":"Open"} navigation menu`)}};this.setAndRemoveNoWrapAfterMenuExpanded=()=>{const i=this.el.shadowRoot.querySelector(".title-link ic-typography")||this.el.querySelector("[slot='app-title']");i.classList.add("ic-typography-no-wrap");setTimeout((()=>{i.classList.remove("ic-typography-no-wrap")}),this.ANIMATION_DURATION)};this.toggleMenuExpanded=()=>{this.menuExpanded=!this.menuExpanded;if(this.menuExpanded){this.setAndRemoveNoWrapAfterMenuExpanded();this.el.shadowRoot.querySelector(".app-title-inner-wrapper").classList.add("app-title-show")}else{this.el.style.setProperty("--navigation-item-width","320px");this.el.shadowRoot.querySelector(".app-title-inner-wrapper").classList.remove("app-title-show");this.el.addEventListener("transitionend",(i=>{if(i.propertyName==="width"){this.el.style.setProperty("--navigation-item-width",null)}}))}this.arrangeSlottedNavigationItem(this.menuExpanded);this.displayTooltipWithExpandedLongLabel(this.menuExpanded);if(this.collapsedIconLabels){this.animateCollapsedIconLabels()}this.setExpandedButtonHeight();this.emitSideNavigationExpanded({sideNavExpanded:this.menuExpanded})};this.arrangeSlottedNavigationItem=i=>{const t=this.el.querySelectorAll("ic-navigation-item");t.forEach((t=>{const a=r(t,"navigation-item");const s=t.children[0]&&!t.children[0].getAttribute("slot");if(a||s){let s;if(a){s=t.querySelector("[slot='navigation-item']")}else{s=t.children[0]}const e=document.createElement("div");const o=s.querySelector("svg");const n=t.textContent.trim();const l=document.createElement("ic-typography");l.classList.add("ic-typography-label","hydrated","navigation-item-side-nav-slotted-text");e.style.height="var(--ic-space-lg)";e.append(o);s.textContent="";l.textContent=n;s.append(e);s.append(l);if(this.collapsedIconLabels){this.styleSlottedCollapsedIconLabels(i,l)}else{this.styleSlottedIconLabels(i,l)}}}))};this.styleSlottedCollapsedIconLabels=(i,t)=>{if(i){t.style.marginTop="0";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.textOverflow="ellipsis"}else{t.style.marginTop="10px";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.textOverflow="ellipsis"}};this.setExpandedButtonHeight=()=>{const i=this.el.shadowRoot.querySelector("#side-navigation > .bottom-wrapper > .bottom-side-nav > .app-status-wrapper");if(i.offsetHeight!==0){this.el.style.setProperty("--sm-side-navigation-bottom-bar-height",`${i.offsetHeight}px`)}};this.styleSlottedIconLabels=(i,t)=>{if(i){t.style.opacity="1";t.style.visibility="visible";t.style.transition="visibility 0s, opacity var(--ic-easing-transition-slow)"}else{t.style.opacity="0";t.style.visibility="hidden";t.style.transition="visibility 0s, opacity var(--ic-easing-transition-slow)"}};this.transitionHandler=i=>{const t=this.el.shadowRoot.querySelector(".primary-navigation");const a=this.el.shadowRoot.querySelector(".bottom-wrapper > .secondary-navigation");const s=i==="start"?this.COLLAPSED_ICON_LABELS_END:this.COLLAPSED_ICON_LABELS_START;const e=i==="start"?this.COLLAPSED_ICON_LABELS_START:this.COLLAPSED_ICON_LABELS_END;if(t){t.classList.remove(s);t.classList.add(e)}if(a){a.classList.remove(s);a.classList.add(e)}};this.transitionEndHandler=()=>{this.transitionHandler("end")};this.animateCollapsedIconLabels=()=>{this.transitionHandler("start");this.transitionEndHandler();this.el.addEventListener("transitionend",this.transitionEndHandler)};this.paddingIconWidth=i=>{const t=i[0].shadowRoot&&(i[0].shadowRoot.querySelector("ic-tooltip a")||i[0].shadowRoot.querySelector("ic-tooltip div"))||i[0].querySelector("a")||i[0].querySelector("div");const a=i[0].querySelector("svg");const s={gap:window.getComputedStyle(t).gap,iconWidth:window.getComputedStyle(a).width,paddingLeft:window.getComputedStyle(t).paddingLeft};return Object.values(s).reduce(((i,t)=>i+=parseInt(t)),0)};this.displayTooltipWithExpandedLongLabel=i=>{let t;if(i){t=setTimeout((()=>{const i=this.el.clientWidth;const t=Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));const a=t.length?this.paddingIconWidth(t):0;t.forEach((t=>{var s,e;const o=((s=t.shadowRoot&&t.shadowRoot.querySelector("ic-tooltip .link ic-typography.ic-typography-label"))===null||s===void 0?void 0:s.scrollWidth)||((e=t.querySelector("ic-typography.ic-typography-label"))===null||e===void 0?void 0:e.scrollWidth);if(o>i-a){t.setAttribute("display-navigation-tooltip","true")}}))}),this.ANIMATION_DURATION)}else{clearTimeout(t);const i=Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));i.forEach((i=>{i.setAttribute("display-navigation-tooltip","false")}))}};this.setMenuExpanded=i=>{this.menuExpanded=i};this.setParentPaddingTop=i=>{this.el.parentElement.style.setProperty("padding-top",i)};this.setParentPaddingLeft=i=>{this.el.parentElement.style.setProperty("padding-left",i)};this.renderAppTitle=i=>{const t=this.deviceSize<=d.S&&!p(this.shortAppTitle);return a("ic-typography",{variant:t||i?"subtitle-small":"h3","aria-label":t?`${this.appTitle} (${this.shortAppTitle})`:undefined},a("h1",null,t?this.shortAppTitle:this.appTitle))};this.resizeObserverCallback=i=>{var t;this.deviceSize=i;const a=i===d.S&&!this.disableTopBarBehaviour;if(!this.disableAutoParentStyling){const i=(t=this.el.shadowRoot.querySelector(".top-bar"))===null||t===void 0?void 0:t.scrollHeight;this.setParentPaddingTop(a?`${i}px`:"0");if(a)this.setParentPaddingLeft("0");if(a&&this.inline){this.el.parentElement.style.setProperty("height",`calc(100% - ${i}px)`)}else if(!a){this.el.parentElement.style.setProperty("height","100%")}}if(!this.disableAutoParentStyling){const t=`calc(var(--ic-space-xxl) ${this.collapsedIconLabels?"* 2":"+ var(--ic-space-xs)"})`;if(i>d.L){this.setParentPaddingTop("0");this.setParentPaddingLeft("0")}else if((i>d.S||this.disableTopBarBehaviour)&&i<=d.M&&this.static){this.setParentPaddingLeft(t)}else if((i>d.S||this.disableTopBarBehaviour)&&i<=d.L){this.setParentPaddingLeft(this.static&&this.menuExpanded?"calc(var(--ic-space-xl) * 10)":t)}}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const i=h();this.deviceSizeAppTitle=i;this.resizeObserverCallback(i)}));this.resizeObserver.observe(document.body,{box:"content-box"})};this.setCollapsedIconLabels=()=>{const i=Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));i.forEach((i=>{i.setAttribute("collapsed-icon-label","true")}))};this.styleSlottedCollapsedIconLabel=()=>{const i=Array.from(this.el.querySelectorAll(".navigation-item-side-nav-slotted-text"));i.forEach((i=>{var t,a;if((a=(t=i===null||i===void 0?void 0:i.parentElement)===null||t===void 0?void 0:t.parentElement)===null||a===void 0?void 0:a.classList.contains("navigation-item-side-nav-collapsed-with-label")){i.style.whiteSpace="nowrap";i.style.overflow="hidden";i.style.textOverflow="ellipsis";i.style.marginTop="10px"}}))};this.renderTopBar=({isSDevice:i,foregroundColor:t,menuOpen:s,href:e,isAppNameSubtitleVariant:n})=>{const l=this.appTitle!==""&&b(this.appTitle);const d=r(this.el,"app-title")?"div":"a";const p=d=="a"&&{href:e};return a("div",{class:{"top-bar":true,[this.foregroundColor]:true}},i&&a("nav",{"aria-labelledby":"menu-navigation-toggle-button-landmark","aria-hidden":"false"},a("ic-button",{"aria-label":"Open navigation menu",class:"menu-button",id:"menu-button",variant:"secondary",size:"small","full-width":"true",appearance:t,onClick:this.toggleMenu,ariaOwnsId:"side-navigation","aria-haspopup":"true","aria-expanded":"false",ref:i=>this.menuButton=i},a("span",{class:"mobile-top-bar-menu-icon",slot:"icon",innerHTML:s?o:y}),s?"Close":"Menu"),a("span",{id:"menu-navigation-toggle-button-landmark",class:"navigation-landmark-title","aria-hidden":"true"},"Navigation menu toggle button")),a("div",{class:"app-title-wrapper"},(l||r(this.el,"app-title"))&&a(d,Object.assign({},p,{class:"title-link"}),a("div",{class:"app-icon-container","aria-hidden":"true"},a("slot",{name:"app-icon"})),a("div",{class:"app-title-inner-wrapper"},r(this.el,"app-title")?a("slot",{name:"app-title"}):this.renderAppTitle(n)))))};this.deviceSize=h();this.deviceSizeAppTitle=d.S;this.foregroundColor=c();this.hasSecondaryNavigation=false;this.menuExpanded=false;this.menuOpen=false;this.appTitle=undefined;this.collapsedIconLabels=false;this.disableAutoParentStyling=false;this.disableTopBarBehaviour=false;this.expanded=false;this.href="/";this.inline=false;this.shortAppTitle="";this.static=false;this.status=undefined;this.version=undefined}watchExpandedHandler(){this.setMenuExpanded(this.expanded)}componentWillLoad(){this.setMenuExpanded(this.expanded);if(this.collapsedIconLabels){this.setCollapsedIconLabels()}this.hasSecondaryNavigation=r(this.el,"secondary-navigation")}componentDidLoad(){this.emitSideNavigationExpanded({sideNavExpanded:this.menuExpanded,sideNavMobile:this.deviceSize===d.S&&!this.disableTopBarBehaviour});v(this.runResizeObserver);this.styleSlottedCollapsedIconLabel();this.arrangeSlottedNavigationItem(this.menuExpanded);this.displayTooltipWithExpandedLongLabel(this.menuExpanded);this.setExpandedButtonHeight();!r(this.el,"app-title")&&g([{prop:this.appTitle,propName:"app-title"}],"Side Navigation")}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}this.el.removeEventListener("transitionend",this.transitionEndHandler)}themeChangeHandler({detail:i}){this.foregroundColor=i.mode}render(){const{appTitle:i,menuOpen:t,foregroundColor:e,menuExpanded:o,href:l,status:p,version:h,collapsedIconLabels:c,inline:v}=this;const g=!this.disableTopBarBehaviour&&this.deviceSize===d.S;const b=this.deviceSize===d.M;const y=this.deviceSize>=d.L;const x=this.deviceSizeAppTitle===d.S;const f=b||this.disableTopBarBehaviour||y&&!this.static;const w={isSDevice:g,foregroundColor:e,menuOpen:t,href:l,isAppNameSubtitleVariant:x,appTitle:i};return a(s,{class:{"xs-menu-open":t&&g,"xs-menu-close":!t&&g,"sm-collapsed":!g&&!o,"sm-expanded":!g&&o,"side-display":this.deviceSize>d.S||this.disableTopBarBehaviour,[u.Dark]:e===u.Dark,["collapsed-labels"]:!g&&!o&&c,["inline"]:v}},g&&this.renderTopBar(Object.assign({},w)),a("div",{class:"side-navigation",id:"side-navigation"},!g&&this.renderTopBar(Object.assign({},w)),a("div",{class:"side-navigation-inner"},r(this.el,"primary-navigation")&&a("nav",{class:"primary-navigation","aria-labelledby":"primary-navigation-landmark"},a("span",{"aria-hidden":"true",class:"navigation-landmark-title",id:"primary-navigation-landmark"},"Primary"),a("ul",{class:"navigation-list"},a("slot",{name:"primary-navigation"})))),a("div",{class:{["bottom-wrapper"]:true,["classification-spacing"]:m()}},r(this.el,"secondary-navigation")&&a("nav",{class:"secondary-navigation","aria-labelledby":"secondary-navigation-landmark"},a("span",{"aria-hidden":"true",class:"navigation-landmark-title",id:"secondary-navigation-landmark"},"Secondary"),a("ul",{class:"navigation-list"},a("slot",{name:"secondary-navigation"}))),a("div",{class:"bottom-side-nav"},this.hasSecondaryNavigation&&a("ic-divider",null),f&&a("button",{class:"menu-expand-button",innerHTML:n,onClick:this.toggleMenuExpanded,"aria-label":`${o?"Collapse":"Expand"} side navigation`}),a("div",{class:"app-status-wrapper"},p!==""&&a("div",{class:{["app-status"]:true}},a("ic-typography",{"aria-label":"app tag",variant:"label-uppercase",class:"app-status-text"},p)),h!==""&&a("ic-typography",{variant:"label",class:"app-version","aria-label":"app version"},h))))))}get el(){return e(this)}static get watchers(){return{expanded:["watchExpandedHandler"]}}};f.style=x;export{f as ic_side_navigation};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as i,c as t,h as a,H as s,g as e}from"./p-6b5e91e2.js";import{c as o}from"./p-f074ef5b.js";import{C as n}from"./p-3b185c32.js";import{g as l,i as r,D as d,G as p,e as h,u as c,f as v,a as g,v as m,c as b}from"./p-4cefa844.js";import{I as u}from"./p-26b7b18f.js";const y=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">\n <path d="M0 0h24v24H0V0z" fill="none" />\n <path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" />\n <title>menu icon</title>\n</svg>\n`;const x=':host{display:block;--side-navigation-position:fixed;--side-navigation-position-left:0;--side-navigation-position-top:var(--ic-space-xxl);--side-navigation-height:var(--ic-space-xxl);--sm-side-navigation-top-bar-height:3.5rem;--sm-side-navigation-collapsed-labels-width:6rem;--sm-side-navigation-expand-transition-duration:var(\n --ic-transition-duration-slow\n );--side-navigation-width:20rem;--sm-side-navigation-bottom-bar-height:3.5rem;z-index:var(--ic-z-index-side-navigation)}:host>*{box-sizing:border-box}.side-navigation{display:flex;flex-direction:column;width:var(--side-navigation-width);color:var(--ic-theme-text);position:var(--side-navigation-position);top:var(--side-navigation-position-top);left:calc(var(--side-navigation-width) * -1);bottom:0;background-color:var(--ic-theme-primary);z-index:var(--ic-z-index-side-navigation)}:host(.inline) .side-navigation{position:absolute;height:100%}:host(.anchor-right) .side-navigation{right:calc(var(--side-navigation-width) * -1)}.classification-spacing{margin-bottom:var(--ic-space-lg)}.navigation-list{padding:0;margin:0;list-style:none}.side-navigation-inner{background-color:var(--ic-theme-primary);display:flex;flex-direction:column;flex:1 1 0;overflow:auto}:host(.inline) .side-navigation-inner{flex:1}:host(.xs-menu-open) .side-navigation{transition:left var(--ic-easing-transition-slow);left:0}:host(:has(.xs-menu-open,.xs-menu-close)) ::slotted(ic-navigation-item){--navigation-item-side-nav-right:var(--ic-space-xl)}:host(.xs-menu-close) .side-navigation{left:calc(var(--side-navigation-width) * -1);transition:left var(--ic-easing-transition-slow)}:host(.xs-menu-close) .side-navigation>*{visibility:hidden}:host(.anchor-right.xs-menu-open) .side-navigation{right:0;left:auto}:host(.anchor-right.xs-menu-close) .side-navigation{right:calc(var(--side-navigation-width) * -1);left:auto;transition:right var(--ic-easing-transition-slow)}.bottom-wrapper{border-top:var(--ic-keyline-lighten);bottom:0;left:0;z-index:2;box-shadow:-0.188rem -0.188rem 0.5rem rgb(0 0 0 / 20%);background-color:var(--ic-theme-primary);display:flex;flex-direction:column}:host(.inline) .bottom-wrapper{position:sticky}:host(.dark) .bottom-wrapper{border-top:var(--ic-keyline-darken)}.top-bar{display:flex;flex-direction:row;align-items:center;min-height:var(--side-navigation-height);padding:var(--ic-space-xs);box-sizing:border-box;background-color:var(--ic-theme-primary);position:fixed;top:0;left:0;right:0;border-bottom:var(--ic-keyline-darken);box-shadow:var(--ic-elevation-overlay);z-index:2;overflow:hidden;visibility:visible}:host(.inline) .top-bar{position:absolute}.top-bar.dark a:focus{box-shadow:var(--ic-border-focus)}.top-bar.light{border-bottom:var(--ic-keyline-lighten)}.app-title-wrapper{display:flex;margin-left:var(--ic-space-xs);border-left:var(--ic-keyline-darken);padding-left:var(--ic-space-xxs);color:var(--ic-theme-text);align-items:center}.app-title-wrapper ic-typography h1{margin:0}@media screen and (min-width: 340px){.app-title-wrapper ic-typography{margin-left:var(--ic-space-xs)}}:host .title-link{display:flex;align-items:center;transition:box-shadow var(--ic-easing-transition-fast),\n background-color var(--ic-easing-transition-fast);text-decoration:none;padding:var(--ic-space-xxs);color:var(--ic-theme-text)}:host .title-link:visited,:host .title-link:active{color:var(--ic-theme-text)}slot[name="app-title"]::slotted(a),slot[name="app-icon"]::slotted(a){color:var(--ic-theme-text);outline:none;text-decoration:none;display:flex}slot[name="app-title"]::slotted(ic-typography),slot[name="app-title"]::slotted(a){margin-left:var(--ic-space-xs) !important}slot[name="app-title"]::slotted(a){font:var(--ic-font-subtitle-small)}@media screen and (min-width: 577px){:host(.sm-collapsed) slot[name="app-title"]::slotted(ic-typography),:host(.sm-collapsed) slot[name="app-title"]::slotted(a){position:absolute;left:-9999px;opacity:0;transition:opacity var(--ic-easing-transition-slow)}:host(.sm-expanded) slot[name="app-title"]::slotted(a){font:var(--ic-font-h3) !important;font-weight:var(--ic-font-weight-semibold) !important;margin-left:var(--ic-space-xs) !important}}:host .title-link:hover{border-radius:var(--ic-border-radius);background-color:var(--ic-theme-hover)}:host .title-link:active{background-color:var(--ic-theme-active)}:host .title-link:focus,:host .title-link:focus-within{border-radius:var(--ic-border-radius);box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);background-color:transparent}:host .title-link ic-typography{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.app-title-wrapper ::slotted(svg){fill:var(--ic-theme-text)}.app-icon-container{display:none}.button-label{display:flex;align-items:center}.mobile-top-bar-menu-icon{display:flex}.menu-button{width:6.5rem}.app-status-wrapper{inset:0 var(--ic-space-sm) 0 3.5rem;width:auto;display:flex;gap:var(--ic-space-xs);padding:var(--ic-space-sm) 0;justify-content:flex-end;align-items:flex-end;pointer-events:none;height:-moz-fit-content;height:fit-content;margin:0 var(--ic-space-xs)}.app-status-wrapper .app-version{display:flex;overflow-wrap:break-word;padding-bottom:var(--ic-space-xxs)}.app-status-wrapper .app-status{display:flex;border-radius:1rem;background-color:var(--ic-theme-text);color:var(--ic-color-primary-text);padding:var(--ic-space-xxs) var(--ic-space-lg);min-width:1rem}.app-status-wrapper .app-status-text{overflow-wrap:break-word}:host(.dark) .app-status-wrapper .app-status{color:var(--ic-color-white-text)}.navigation-landmark-title{position:absolute;width:var(--ic-space-1px);height:var(--ic-space-1px);padding:0;margin:calc(-1 * var(--ic-space-1px));overflow:hidden}::slotted(ic-navigation-group){--navigation-group-height:2.75rem;--navigation-group-width:100%;--navigation-group-justify-content:space-between;--navigation-group-hover:var(--ic-theme-hover);--navigation-group-text-hover:var(--ic-theme-text);--navigation-item-child-height:3.5rem;--navigation-item-child-active:var(--ic-action-dark-bg-active);--navigation-item-child-color:var(--ic-theme-text);--navigation-group-expand-toggle-padding:0.25rem}::slotted(ic-navigation-item),::slotted(ic-navigation-group){--navigation-item-justify-content:flex-start;--navigation-item-min-height:56px;--navigation-item-height:100%}.bottom-side-nav{position:relative;align-content:flex-end;min-height:var(--sm-side-navigation-top-bar-height)}.bottom-side-nav ic-divider{position:absolute;top:0;width:100%}.primary-navigation{flex:1;display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:none}.primary-navigation::-webkit-scrollbar{display:none}.primary-navigation,.secondary-navigation{overflow-x:hidden}.bottom-side-nav .menu-expand-button{position:absolute;display:none}.menu-visibility-visible{visibility:visible;width:100%}.app-title-show{min-width:15.5rem}:host(.side-display){display:flex;flex-direction:column;height:100vh;position:var(--side-navigation-position);left:0;top:0;bottom:0}:host(.side-display) .app-icon-container{height:40px;display:flex;align-items:center}:host(.side-display) .top-bar{--side-navigation-height:var(--sm-side-navigation-top-bar-height);position:relative;padding:0;box-shadow:-0.188rem 0.188rem 0.5rem rgb(0 0 0 / 20%)}:host(.inline.side-display) .top-bar{position:sticky}:host(.anchor-right.side-display) .top-bar{box-shadow:0.188rem 0.188rem 0.5rem rgb(0 0 0 / 20%)}:host(.anchor-right.side-display) .bottom-wrapper{box-shadow:0.188rem -0.188rem 0.5rem rgb(0 0 0 / 20%)}:host(.side-display) .side-navigation,:host(.side-display) .top-bar{width:var(--sm-side-navigation-top-bar-height)}:host(.sm-collapsed.side-display){width:var(--sm-side-navigation-top-bar-height);transition:width var(--ic-easing-transition-slow)}:host(.sm-collapsed.collapsed-labels.side-display){width:var(--sm-side-navigation-collapsed-labels-width)}:host(.sm-expanded.side-display){width:var(--side-navigation-width);transition:width var(--ic-easing-transition-slow);box-shadow:var(--ic-elevation-overlay)}:host(.side-display) .side-navigation{--side-navigation-position-top:0;flex:1;position:relative;top:auto;left:auto;bottom:auto}:host(.inline.side-display) .side-navigation{position:relative}:host(.anchor-right.side-display) .side-navigation{left:auto;right:0}:host(.side-display) .app-title-wrapper{margin-left:0;border-left:none;padding:var(--ic-space-xs) var(--ic-space-sm)}:host(.side-display) .app-title-wrapper ::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg)}:host(.side-display) .app-title-wrapper ic-typography{font-weight:var(--ic-font-weight-semibold)}:host(.sm-collapsed.side-display) .app-title-wrapper ic-typography{position:absolute;left:-9999px;opacity:0;transition:opacity var(--ic-easing-transition-slow)}:host(.sm-expanded.side-display) ic-typography{position:relative;left:0}:host(.sm-expanded.side-display) :is(.side-navigation,.top-bar){width:var(--side-navigation-width);transition:width var(--ic-easing-transition-slow)}:host(.sm-collapsed.side-display) :is(.side-navigation,.top-bar){width:var(--sm-side-navigation-top-bar-height);transition:width var(--ic-easing-transition-slow)}:host(.anchor-right.sm-expanded.side-display) :is(.side-navigation,.top-bar){left:auto;right:0}:host(.side-display) .app-status-wrapper,:host(.sm-collapsed.side-display) .app-status-wrapper{display:none;margin-left:0}:host(.sm-expanded.side-display) .app-status-wrapper{display:flex;max-width:16rem;margin-right:calc(var(--ic-space-xxxs) + var(--ic-space-xs))}:host(.side-display) .bottom-side-nav{justify-items:flex-end;align-items:flex-end;justify-content:flex-end;display:flex;outline:none}:host(.side-display) .bottom-side-nav .menu-expand-button{padding-left:var(--ic-space-md);height:var(--sm-side-navigation-top-bar-height);width:100%;color:var(--ic-theme-text);background-color:transparent;outline:var(--ic-hc-focus-outline);border:none;cursor:pointer;display:flex;transition:var(--ic-easing-transition-fast)}:host(.sm-expanded.side-display) .bottom-side-nav .menu-expand-button{height:100%}:host(.side-display) .bottom-side-nav .menu-expand-button svg{justify-items:flex-start;align-self:center;display:inline-block;width:var(--ic-space-lg);height:var(--ic-space-lg)}:host(.side-display) .bottom-side-nav .menu-expand-button:hover{background-color:var(--ic-theme-hover)}:host(.side-display) .bottom-side-nav .menu-expand-button:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);background-color:transparent}:host(.sm-collapsed.side-display) .bottom-side-nav .menu-expand-button svg{transform:scaleX(1);transition:transform var(--ic-easing-transition-slow)}:host(.sm-expanded.side-display) .bottom-side-nav .menu-expand-button svg{transform:scaleX(-1);transition:transform var(--ic-easing-transition-slow);align-self:flex-end;margin-bottom:0.875rem}:host(.anchor-right.sm-collapsed.side-display) .bottom-side-nav .menu-expand-button svg{transform:scaleX(-1)}:host(.anchor-right.sm-expanded.side-display) .bottom-side-nav .menu-expand-button svg{transform:scaleX(1)}:host(.sm-collapsed.side-display) ::slotted(ic-navigation-item){--navigation-item-label-opacity:1}:host(.sm-collapsed.side-display) ::slotted(ic-navigation-item),:host(.sm-collapsed.side-display) ::slotted(ic-navigation-group){--navigation-item-label-opacity:0;--navigation-item-min-height:56px;--navigation-item-height:56px}:host(.sm-expanded.side-display) ::slotted(ic-navigation-item),:host(.sm-expanded.side-display) ::slotted(ic-navigation-group){--navigation-item-label-opacity:1;--navigation-item-height:100%;--navigation-item-min-height:56px;--navigation-item-width:320px;--navigation-item-side-nav-right:var(--ic-space-xl)}:host(.sm-collapsed.side-display) ::slotted(ic-navigation-group){--navigation-group-title-position:absolute;--navigation-group-title-position-left:-9999px;--navigation-group-title-opacity:none}:host(.sm-expanded.side-display) ::slotted(ic-navigation-group){--navigation-group-title-position:relative;--navigation-group-title-position-left:0;--navigation-group-expand-toggle-padding:0.25rem;--navigation-group-title-opacity:flex}:host(.sm-collapsed.collapsed-labels.side-display) .side-navigation,:host(.sm-collapsed.collapsed-labels.side-display) .top-bar{width:var(--sm-side-navigation-collapsed-labels-width)}:host(.sm-collapsed.collapsed-labels.side-display) .menu-expand-button{padding:0}:host(.sm-collapsed.collapsed-labels.side-display) .app-title-wrapper{width:100%;justify-content:center}:host(.sm-collapsed.collapsed-labels.side-display) ::slotted(ic-navigation-group){--navigation-group-justify-content:center;--navigation-item-label-opacity:1;--navigation-group-item-min-width:100%;--navigation-group-expand-toggle-padding:1rem}:host(.collapsed-labels.side-display) .bottom-side-nav .menu-expand-button{justify-content:center}:host(.side-display) .collapsed-icon-labels-start{visibility:hidden;opacity:0}:host(.side-display) .collapsed-icon-labels-end{visibility:visible;opacity:1;transition:visibility 0s, opacity var(--ic-easing-transition-slow)}@media screen and (min-width: 340px){.app-icon-container{display:flex}}@media screen and (min-width: 993px){:host(.side-display){position:sticky;left:auto;top:0;bottom:0}:host(.sm-expanded.side-display){box-shadow:none}}@media (forced-colors: active){.side-navigation,.top-bar{border-right:var(--ic-hc-border)}slot[name="app-icon"]::slotted(svg){fill:currentcolor}}';const f=class{constructor(s){i(this,s);this.sideNavExpanded=t(this,"sideNavExpanded",7);this.ANIMATION_DURATION=parseInt(l("--ic-transition-duration-slow"))||0;this.IC_NAVIGATION_ITEM="ic-navigation-item";this.resizeObserver=null;this.COLLAPSED_ICON_LABELS_END="collapsed-icon-labels-end";this.COLLAPSED_ICON_LABELS_START="collapsed-icon-labels-start";this.menuButton=null;this.emitSideNavigationExpanded=i=>{this.sideNavExpanded.emit({sideNavExpanded:i.sideNavExpanded,sideNavMobile:i.sideNavMobile})};this.toggleMenu=()=>{this.menuOpen=!this.menuOpen;this.setMobileMenuAriaAttributes(this.menuOpen);this.arrangeSlottedNavigationItem(this.menuOpen);this.setToggleMenuFlyoutMenuVisibility(this.menuOpen);this.emitSideNavigationExpanded({sideNavExpanded:this.menuOpen,sideNavMobile:true})};this.setToggleMenuFlyoutMenuVisibility=i=>{const t=this.el.shadowRoot.querySelector("#side-navigation");const a=t.querySelector(".side-navigation-inner");const s=t.querySelector(".bottom-wrapper");const e="menu-visibility-visible";if(i){s.classList.add(e);a.classList.add(e)}else{setTimeout((()=>{a.classList.remove(e);s.classList.remove(e)}),this.ANIMATION_DURATION)}};this.setMobileMenuAriaAttributes=i=>{if(this.menuButton!==null){this.menuButton.setAttribute("aria-expanded",`${i}`);this.menuButton.setAttribute("aria-label",`${i?"Close":"Open"} navigation menu`)}};this.setAndRemoveNoWrapAfterMenuExpanded=()=>{const i=this.el.shadowRoot.querySelector(".title-link ic-typography")||this.el.querySelector("[slot='app-title']");i.classList.add("ic-typography-no-wrap");setTimeout((()=>{i.classList.remove("ic-typography-no-wrap")}),this.ANIMATION_DURATION)};this.toggleMenuExpanded=()=>{this.menuExpanded=!this.menuExpanded;if(this.menuExpanded){this.setAndRemoveNoWrapAfterMenuExpanded();this.el.shadowRoot.querySelector(".app-title-inner-wrapper").classList.add("app-title-show")}else{this.el.style.setProperty("--navigation-item-width","320px");this.el.shadowRoot.querySelector(".app-title-inner-wrapper").classList.remove("app-title-show");this.el.addEventListener("transitionend",(i=>{if(i.propertyName==="width"){this.el.style.setProperty("--navigation-item-width",null)}}))}this.arrangeSlottedNavigationItem(this.menuExpanded);this.displayTooltipWithExpandedLongLabel(this.menuExpanded);if(this.collapsedIconLabels){this.animateCollapsedIconLabels()}this.setExpandedButtonHeight();this.emitSideNavigationExpanded({sideNavExpanded:this.menuExpanded})};this.arrangeSlottedNavigationItem=i=>{const t=this.el.querySelectorAll("ic-navigation-item");t.forEach((t=>{const a=r(t,"navigation-item");const s=t.children[0]&&!t.children[0].getAttribute("slot");if(a||s){let s;if(a){s=t.querySelector("[slot='navigation-item']")}else{s=t.children[0]}const e=document.createElement("div");const o=s.querySelector("svg");const n=t.textContent.trim();const l=document.createElement("ic-typography");l.classList.add("ic-typography-label","hydrated","navigation-item-side-nav-slotted-text");e.style.height="var(--ic-space-lg)";e.append(o);s.textContent="";l.textContent=n;s.append(e);s.append(l);if(this.collapsedIconLabels){this.styleSlottedCollapsedIconLabels(i,l)}else{this.styleSlottedIconLabels(i,l)}}}))};this.styleSlottedCollapsedIconLabels=(i,t)=>{if(i){t.style.marginTop="0";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.textOverflow="ellipsis"}else{t.style.marginTop="10px";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.textOverflow="ellipsis"}};this.setExpandedButtonHeight=()=>{const i=this.el.shadowRoot.querySelector("#side-navigation > .bottom-wrapper > .bottom-side-nav > .app-status-wrapper");if(i.offsetHeight!==0){this.el.style.setProperty("--sm-side-navigation-bottom-bar-height",`${i.offsetHeight}px`)}};this.styleSlottedIconLabels=(i,t)=>{if(i){t.style.opacity="1";t.style.visibility="visible";t.style.transition="visibility 0s, opacity var(--ic-easing-transition-slow)"}else{t.style.opacity="0";t.style.visibility="hidden";t.style.transition="visibility 0s, opacity var(--ic-easing-transition-slow)"}};this.transitionHandler=i=>{const t=this.el.shadowRoot.querySelector(".primary-navigation");const a=this.el.shadowRoot.querySelector(".bottom-wrapper > .secondary-navigation");const s=i==="start"?this.COLLAPSED_ICON_LABELS_END:this.COLLAPSED_ICON_LABELS_START;const e=i==="start"?this.COLLAPSED_ICON_LABELS_START:this.COLLAPSED_ICON_LABELS_END;if(t){t.classList.remove(s);t.classList.add(e)}if(a){a.classList.remove(s);a.classList.add(e)}};this.transitionEndHandler=()=>{this.transitionHandler("end")};this.animateCollapsedIconLabels=()=>{this.transitionHandler("start");this.transitionEndHandler();this.el.addEventListener("transitionend",this.transitionEndHandler)};this.paddingIconWidth=i=>{const t=i[0].shadowRoot&&(i[0].shadowRoot.querySelector("ic-tooltip a")||i[0].shadowRoot.querySelector("ic-tooltip div"))||i[0].querySelector("a")||i[0].querySelector("div");const a=i[0].querySelector("svg");const s={gap:window.getComputedStyle(t).gap,iconWidth:window.getComputedStyle(a).width,paddingLeft:window.getComputedStyle(t).paddingLeft};return Object.values(s).reduce(((i,t)=>i+=parseInt(t)),0)};this.displayTooltipWithExpandedLongLabel=i=>{let t;if(i){t=setTimeout((()=>{const i=this.el.clientWidth;const t=Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));const a=t.length?this.paddingIconWidth(t):0;t.forEach((t=>{var s,e;const o=((s=t.shadowRoot&&t.shadowRoot.querySelector("ic-tooltip .link ic-typography.ic-typography-label"))===null||s===void 0?void 0:s.scrollWidth)||((e=t.querySelector("ic-typography.ic-typography-label"))===null||e===void 0?void 0:e.scrollWidth);if(o>i-a){t.setAttribute("display-navigation-tooltip","true")}}))}),this.ANIMATION_DURATION)}else{clearTimeout(t);const i=Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));i.forEach((i=>{i.setAttribute("display-navigation-tooltip","false")}))}};this.setMenuExpanded=i=>{this.menuExpanded=i};this.setParentPaddingTop=i=>{this.el.parentElement.style.setProperty("padding-top",i)};this.setParentPaddingLeft=i=>{this.el.parentElement.style.setProperty("padding-left",i)};this.renderAppTitle=i=>{const t=this.deviceSize<=d.S&&!p(this.shortAppTitle);return a("ic-typography",{variant:t||i?"subtitle-small":"h3","aria-label":t?`${this.appTitle} (${this.shortAppTitle})`:undefined},a("h1",null,t?this.shortAppTitle:this.appTitle))};this.resizeObserverCallback=i=>{var t;this.deviceSize=i;const a=i===d.S&&!this.disableTopBarBehaviour;if(!this.disableAutoParentStyling){const i=(t=this.el.shadowRoot.querySelector(".top-bar"))===null||t===void 0?void 0:t.scrollHeight;this.setParentPaddingTop(a?`${i}px`:"0");if(a)this.setParentPaddingLeft("0");if(a&&this.inline){this.el.parentElement.style.setProperty("height",`calc(100% - ${i}px)`)}else if(!a){this.el.parentElement.style.setProperty("height","100%")}}if(!this.disableAutoParentStyling){const t=`calc(var(--ic-space-xxl) ${this.collapsedIconLabels?"* 2":"+ var(--ic-space-xs)"})`;if(i>d.L){this.setParentPaddingTop("0");this.setParentPaddingLeft("0")}else if((i>d.S||this.disableTopBarBehaviour)&&i<=d.M&&this.static){this.setParentPaddingLeft(t)}else if((i>d.S||this.disableTopBarBehaviour)&&i<=d.L){this.setParentPaddingLeft(this.static&&this.menuExpanded?"calc(var(--ic-space-xl) * 10)":t)}}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const i=h();this.deviceSizeAppTitle=i;this.resizeObserverCallback(i)}));this.resizeObserver.observe(document.body,{box:"content-box"})};this.setCollapsedIconLabels=()=>{const i=Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));i.forEach((i=>{i.setAttribute("collapsed-icon-label","true")}))};this.styleSlottedCollapsedIconLabel=()=>{const i=Array.from(this.el.querySelectorAll(".navigation-item-side-nav-slotted-text"));i.forEach((i=>{var t,a;if((a=(t=i===null||i===void 0?void 0:i.parentElement)===null||t===void 0?void 0:t.parentElement)===null||a===void 0?void 0:a.classList.contains("navigation-item-side-nav-collapsed-with-label")){i.style.whiteSpace="nowrap";i.style.overflow="hidden";i.style.textOverflow="ellipsis";i.style.marginTop="10px"}}))};this.renderTopBar=({isSDevice:i,foregroundColor:t,menuOpen:s,href:e,isAppNameSubtitleVariant:n})=>{const l=this.appTitle!==""&&b(this.appTitle);const d=r(this.el,"app-title")?"div":"a";const p=d=="a"&&{href:e};return a("div",{class:{"top-bar":true,[this.foregroundColor]:true}},i&&a("nav",{"aria-labelledby":"menu-navigation-toggle-button-landmark","aria-hidden":"false"},a("ic-button",{"aria-label":"Open navigation menu",class:"menu-button",id:"menu-button",variant:"secondary",size:"small","full-width":"true",appearance:t,onClick:this.toggleMenu,ariaOwnsId:"side-navigation","aria-haspopup":"true","aria-expanded":"false",ref:i=>this.menuButton=i},a("span",{class:"mobile-top-bar-menu-icon",slot:"icon",innerHTML:s?o:y}),s?"Close":"Menu"),a("span",{id:"menu-navigation-toggle-button-landmark",class:"navigation-landmark-title","aria-hidden":"true"},"Navigation menu toggle button")),a("div",{class:"app-title-wrapper"},(l||r(this.el,"app-title"))&&a(d,Object.assign({},p,{class:"title-link"}),a("div",{class:"app-icon-container","aria-hidden":"true"},a("slot",{name:"app-icon"})),a("div",{class:"app-title-inner-wrapper"},r(this.el,"app-title")?a("slot",{name:"app-title"}):this.renderAppTitle(n)))))};this.deviceSize=h();this.deviceSizeAppTitle=d.S;this.foregroundColor=c();this.hasSecondaryNavigation=false;this.menuExpanded=false;this.menuOpen=false;this.appTitle=undefined;this.collapsedIconLabels=false;this.disableAutoParentStyling=false;this.disableTopBarBehaviour=false;this.expanded=false;this.href="/";this.inline=false;this.shortAppTitle="";this.static=false;this.status=undefined;this.version=undefined}watchExpandedHandler(){this.setMenuExpanded(this.expanded)}componentWillLoad(){this.setMenuExpanded(this.expanded);if(this.collapsedIconLabels){this.setCollapsedIconLabels()}this.hasSecondaryNavigation=r(this.el,"secondary-navigation")}componentDidLoad(){this.emitSideNavigationExpanded({sideNavExpanded:this.menuExpanded,sideNavMobile:this.deviceSize===d.S&&!this.disableTopBarBehaviour});v(this.runResizeObserver);this.styleSlottedCollapsedIconLabel();this.arrangeSlottedNavigationItem(this.menuExpanded);this.displayTooltipWithExpandedLongLabel(this.menuExpanded);this.setExpandedButtonHeight();!r(this.el,"app-title")&&g([{prop:this.appTitle,propName:"app-title"}],"Side Navigation")}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}this.el.removeEventListener("transitionend",this.transitionEndHandler)}themeChangeHandler({detail:i}){this.foregroundColor=i.mode}render(){const{appTitle:i,menuOpen:t,foregroundColor:e,menuExpanded:o,href:l,status:p,version:h,collapsedIconLabels:c,inline:v}=this;const g=!this.disableTopBarBehaviour&&this.deviceSize===d.S;const b=this.deviceSize===d.M;const y=this.deviceSize>=d.L;const x=this.deviceSizeAppTitle===d.S;const f=b||this.disableTopBarBehaviour||y&&!this.static;const w={isSDevice:g,foregroundColor:e,menuOpen:t,href:l,isAppNameSubtitleVariant:x,appTitle:i};return a(s,{class:{"xs-menu-open":t&&g,"xs-menu-close":!t&&g,"sm-collapsed":!g&&!o,"sm-expanded":!g&&o,"side-display":this.deviceSize>d.S||this.disableTopBarBehaviour,[u.Dark]:e===u.Dark,["collapsed-labels"]:!g&&!o&&c,["inline"]:v}},g&&this.renderTopBar(Object.assign({},w)),a("div",{class:"side-navigation",id:"side-navigation"},!g&&this.renderTopBar(Object.assign({},w)),a("div",{class:"side-navigation-inner"},r(this.el,"primary-navigation")&&a("nav",{class:"primary-navigation","aria-labelledby":"primary-navigation-landmark"},a("span",{"aria-hidden":"true",class:"navigation-landmark-title",id:"primary-navigation-landmark"},"Primary"),a("ul",{class:"navigation-list"},a("slot",{name:"primary-navigation"})))),a("div",{class:{["bottom-wrapper"]:true,["classification-spacing"]:m()}},r(this.el,"secondary-navigation")&&a("nav",{class:"secondary-navigation","aria-labelledby":"secondary-navigation-landmark"},a("span",{"aria-hidden":"true",class:"navigation-landmark-title",id:"secondary-navigation-landmark"},"Secondary"),a("ul",{class:"navigation-list"},a("slot",{name:"secondary-navigation"}))),a("div",{class:"bottom-side-nav"},this.hasSecondaryNavigation&&a("ic-divider",null),f&&a("button",{class:"menu-expand-button",innerHTML:n,onClick:this.toggleMenuExpanded,"aria-label":`${o?"Collapse":"Expand"} side navigation`}),a("div",{class:"app-status-wrapper"},p!==""&&a("div",{class:{["app-status"]:true}},a("ic-typography",{"aria-label":"app tag",variant:"label-uppercase",class:"app-status-text"},p)),h!==""&&a("ic-typography",{variant:"label",class:"app-version","aria-label":"app version"},h))))))}get el(){return e(this)}static get watchers(){return{expanded:["watchExpandedHandler"]}}};f.style=x;export{f as ic_side_navigation};
|
2
|
+
//# sourceMappingURL=p-2499416a.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,c as i,h as t,H as a,g as o}from"./p-6b5e91e2.js";import{j as r,l as c,a as n,m as s,n as d,p as l,i as h,d as b}from"./p-268355c1.js";import"./p-26b7b18f.js";const m='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host(.disabled){color:var(--ic-architectural-200);pointer-events:none}.container{display:flex;width:-moz-fit-content;width:fit-content;padding:var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs);margin-bottom:var(--ic-space-xxs);align-items:center}:host(.small) .container{margin-bottom:var(--ic-space-xxxs)}.checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:block;position:relative;top:0;left:0;height:var(--ic-space-lg);width:var(--ic-space-lg);background-color:var(--ic-architectural-white);border:var(--ic-border-width) solid var(--ic-architectural-300);border-radius:var(--ic-border-radius);outline:none;cursor:pointer;transition:var(--ic-easing-transition-fast);flex-shrink:0}:host(.small) .checkbox,:host(.small) .container svg{width:var(--ic-space-md);height:var(--ic-space-md)}:host(.large) .checkbox,:host(.large) .container svg{width:var(--ic-space-xl);height:var(--ic-space-xl)}.checkbox:checked{background-color:var(--ic-action-default);border:var(--ic-border-width) solid var(--ic-action-default);transition:var(--ic-easing-transition-slow)}.checkbox:checked:disabled{background-color:var(--ic-architectural-200)}.checkbox:indeterminate,.checkbox.indeterminate:checked{background-color:var(--ic-architectural-white);border:0.125rem solid var(--ic-action-default)}.checkbox:checked:hover{background-color:var(--ic-action-default-hover)}.checkbox:indeterminate:hover,.checkbox.indeterminate:checked:hover{background-color:var(--ic-action-default-bg-hover-no-alpha);border:0.125rem solid var(--ic-action-default-hover)}.checkbox:checked:active{background-color:var(--ic-action-default-active)}.checkbox:indeterminate:active,.checkbox.indeterminate:checked:active{background-color:var(--ic-action-default-bg-active-no-alpha);border:0.125rem solid var(--ic-action-default-active)}.checkbox:hover{background-color:var(--ic-action-default-bg-hover-no-alpha);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-hover);border:var(--ic-border-width) solid var(--ic-action-default-hover)}.checkbox:active{background-color:var(--ic-action-default-bg-active-no-alpha);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-active);border:var(--ic-border-width) solid var(--ic-action-default-active)}.checkbox:focus{box-shadow:var(--ic-border-focus)}.checkbox:disabled{border:var(--ic-border-width) dashed var(--ic-architectural-200)}.checkbox-label{padding-left:var(--ic-space-sm)}.checkbox-label:hover{cursor:pointer}.checkmark{position:relative;right:calc(-1 * var(--ic-space-lg));margin-left:calc(-1 * var(--ic-space-lg));fill:white;z-index:1;background-color:transparent;pointer-events:none;flex-shrink:0}:host(.small) .checkmark{margin-left:calc(-1 * var(--ic-space-md));right:calc(-1 * var(--ic-space-md))}:host(.large) .checkmark{margin-left:calc(-1 * var(--ic-space-xl));right:calc(-1 * var(--ic-space-xl))}.indeterminate-symbol{position:relative;width:0.875rem;height:var(--ic-space-xxxs);right:-1.188rem;margin-left:-0.875rem;z-index:1;background-color:var(--ic-action-default);pointer-events:none;flex-shrink:0}:host(.small) .indeterminate-symbol{width:0.6rem;right:-0.8rem;margin-left:-0.6rem}:host(.large) .indeterminate-symbol{width:1.25rem;right:-1.625rem;margin-left:-1.25rem}.container:hover .indeterminate-symbol{background-color:var(--ic-action-default-hover)}.container:active .indeterminate-symbol{background-color:var(--ic-action-default-active)}.additional-field-wrapper{margin-left:calc(var(--ic-space-md) + var(--ic-space-lg));margin-top:calc(var(--ic-space-sm) / 2)}.branch-corner{color:var(--ic-action-default);height:var(--ic-space-md);width:var(--ic-space-xl);border-radius:0 0 0 0.188rem;border-bottom:0.125rem solid var(--ic-action-default);border-left:0.125rem solid var(--ic-action-default)}.dynamic-container{display:flex;position:relative;margin:var(--ic-space-xxxs) 0 var(--ic-space-xxs) var(--ic-space-md);gap:var(--ic-space-xs)}.dynamic-text{color:var(--ic-action-default);margin-top:calc(var(--ic-space-sm) / 2);margin-bottom:var(--ic-space-xs);border-radius:2%}@media (max-width: 576px){::slotted(ic-text-field){--input-width:100%}}@media (forced-colors: active){.checkbox{-webkit-appearance:revert;-moz-appearance:revert;appearance:revert;transition:none}.checkbox:checked{transition:none}.checkbox:focus-visible{outline:0.125rem solid highlight}.checkbox:disabled:not(:checked){-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}.checkmark{fill:none}.indeterminate-symbol{display:none}}';const p=class{constructor(t){e(this,t);this.checkboxChecked=i(this,"checkboxChecked",7);this.icCheck=i(this,"icCheck",7);this.IC_TEXT_FIELD="ic-text-field";this.handleClick=()=>{this.checked=!this.checked;this.icCheck.emit();this.checkboxChecked.emit()};this.handleFormReset=()=>{this.checked=this.initiallyChecked};this.additionalFieldDisplay="static";this.checked=false;this.initiallyChecked=this.checked;this.disabled=false;this.dynamicText="This selection requires additional answers";this.form=undefined;this.formaction=undefined;this.formenctype=undefined;this.formmethod=undefined;this.formnovalidate=undefined;this.formtarget=undefined;this.groupLabel=undefined;this.indeterminate=false;this.label=undefined;this.name=undefined;this.size=undefined;this.small=false;this.value=undefined}componentWillLoad(){r(this.disabled,this.el);c(this.el,this.handleFormReset)}componentDidLoad(){n([{prop:this.label,propName:"label"},{prop:this.value,propName:"value"}],"Checkbox")}componentDidRender(){if(this.additionalFieldDisplay==="static"){const e=this.el.querySelector(this.IC_TEXT_FIELD);if(!this.checked){e&&e.setAttribute("disabled","")}else{e&&e.removeAttribute("disabled")}}else if(this.additionalFieldContainer){if(!this.checked){this.additionalFieldContainer.style.display="none"}else{this.additionalFieldContainer.style.display="flex"}}}disconnectedCallback(){s(this.el,this.handleFormReset)}async setFocus(){const e=this.el.shadowRoot.querySelector(".checkbox");if(e){e.focus()}}render(){let e=`ic-checkbox-${b(this.label)?this.label:this.value}-${this.groupLabel}`;e=e.replace(/ /g,"-");const i=this.el.parentElement.size;this.checked?d(true,this.el,this.name,this.checked&&this.value,this.disabled):l(this.el);return t(a,{class:{["disabled"]:this.disabled,["small"]:this.small,[`${this.size||i}`]:true}},t("div",{class:"container"},this.checked&&!this.indeterminate&&t("svg",{class:"checkmark",width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","fill-rule":"evenodd","clip-rule":"evenodd"},t("title",null,"checkmark icon"),t("path",{d:"M21 6.285l-11.16 12.733-6.84-6.018 1.319-1.49 5.341 4.686 9.865-11.196 1.475 1.285z"})),this.checked&&this.indeterminate&&t("div",{class:"indeterminate-symbol"}),t("input",{role:"checkbox",class:{["checkbox"]:true,["checked"]:this.checked,["indeterminate"]:this.indeterminate},type:"checkbox",name:this.name,id:e,value:this.value,disabled:this.disabled?true:null,checked:this.checked,indeterminate:this.indeterminate,onClick:this.handleClick,form:this.form,formaction:this.formaction,formenctype:this.formenctype,formmethod:this.formmethod,formnovalidate:this.formnovalidate,formtarget:this.formtarget}),t("ic-typography",{class:"checkbox-label",variant:"body"},t("label",{htmlFor:e},this.label))),h(this.el,"additional-field")&&t("div",{class:"dynamic-container",ref:e=>this.additionalFieldContainer=e},this.additionalFieldDisplay==="dynamic"&&t("div",{class:"branch-corner"}),t("div",null,this.additionalFieldDisplay==="dynamic"&&t("ic-typography",{variant:"caption"},t("p",{class:"dynamic-text","aria-live":"polite"},this.dynamicText)),t("div",{class:{"additional-field-wrapper":this.additionalFieldDisplay==="static"}},t("slot",{name:"additional-field"})))))}static get delegatesFocus(){return true}get el(){return o(this)}};p.style=m;export{p as ic_checkbox};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,c as i,h as t,H as a,g as o}from"./p-6b5e91e2.js";import{j as r,l as c,a as n,m as s,n as d,p as l,i as h,c as b}from"./p-4cefa844.js";import"./p-26b7b18f.js";const m='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host(.disabled){color:var(--ic-architectural-200);pointer-events:none}.container{display:flex;width:-moz-fit-content;width:fit-content;padding:var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs);margin-bottom:var(--ic-space-xxs);align-items:center}:host(.small) .container{margin-bottom:var(--ic-space-xxxs)}.checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:block;position:relative;top:0;left:0;height:var(--ic-space-lg);width:var(--ic-space-lg);background-color:var(--ic-architectural-white);border:var(--ic-border-width) solid var(--ic-architectural-300);border-radius:var(--ic-border-radius);outline:none;cursor:pointer;transition:var(--ic-easing-transition-fast);flex-shrink:0}:host(.small) .checkbox,:host(.small) .container svg{width:var(--ic-space-md);height:var(--ic-space-md)}:host(.large) .checkbox,:host(.large) .container svg{width:var(--ic-space-xl);height:var(--ic-space-xl)}.checkbox:checked{background-color:var(--ic-action-default);border:var(--ic-border-width) solid var(--ic-action-default);transition:var(--ic-easing-transition-slow)}.checkbox:checked:disabled{background-color:var(--ic-architectural-200)}.checkbox:indeterminate,.checkbox.indeterminate:checked{background-color:var(--ic-architectural-white);border:0.125rem solid var(--ic-action-default)}.checkbox:checked:hover{background-color:var(--ic-action-default-hover)}.checkbox:indeterminate:hover,.checkbox.indeterminate:checked:hover{background-color:var(--ic-action-default-bg-hover-no-alpha);border:0.125rem solid var(--ic-action-default-hover)}.checkbox:checked:active{background-color:var(--ic-action-default-active)}.checkbox:indeterminate:active,.checkbox.indeterminate:checked:active{background-color:var(--ic-action-default-bg-active-no-alpha);border:0.125rem solid var(--ic-action-default-active)}.checkbox:hover{background-color:var(--ic-action-default-bg-hover-no-alpha);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-hover);border:var(--ic-border-width) solid var(--ic-action-default-hover)}.checkbox:active{background-color:var(--ic-action-default-bg-active-no-alpha);box-shadow:0 0 0 0.25rem var(--ic-action-default-bg-active);border:var(--ic-border-width) solid var(--ic-action-default-active)}.checkbox:focus{box-shadow:var(--ic-border-focus)}.checkbox:disabled{border:var(--ic-border-width) dashed var(--ic-architectural-200)}.checkbox-label{padding-left:var(--ic-space-sm)}.checkbox-label:hover{cursor:pointer}.checkmark{position:relative;right:calc(-1 * var(--ic-space-lg));margin-left:calc(-1 * var(--ic-space-lg));fill:white;z-index:1;background-color:transparent;pointer-events:none;flex-shrink:0}:host(.small) .checkmark{margin-left:calc(-1 * var(--ic-space-md));right:calc(-1 * var(--ic-space-md))}:host(.large) .checkmark{margin-left:calc(-1 * var(--ic-space-xl));right:calc(-1 * var(--ic-space-xl))}.indeterminate-symbol{position:relative;width:0.875rem;height:var(--ic-space-xxxs);right:-1.188rem;margin-left:-0.875rem;z-index:1;background-color:var(--ic-action-default);pointer-events:none;flex-shrink:0}:host(.small) .indeterminate-symbol{width:0.6rem;right:-0.8rem;margin-left:-0.6rem}:host(.large) .indeterminate-symbol{width:1.25rem;right:-1.625rem;margin-left:-1.25rem}.container:hover .indeterminate-symbol{background-color:var(--ic-action-default-hover)}.container:active .indeterminate-symbol{background-color:var(--ic-action-default-active)}.additional-field-wrapper{margin-left:calc(var(--ic-space-md) + var(--ic-space-lg));margin-top:calc(var(--ic-space-sm) / 2)}.branch-corner{color:var(--ic-action-default);height:var(--ic-space-md);width:var(--ic-space-xl);border-radius:0 0 0 0.188rem;border-bottom:0.125rem solid var(--ic-action-default);border-left:0.125rem solid var(--ic-action-default)}.dynamic-container{display:flex;position:relative;margin:var(--ic-space-xxxs) 0 var(--ic-space-xxs) var(--ic-space-md);gap:var(--ic-space-xs)}.dynamic-text{color:var(--ic-action-default);margin-top:calc(var(--ic-space-sm) / 2);margin-bottom:var(--ic-space-xs);border-radius:2%}@media (max-width: 576px){::slotted(ic-text-field){--input-width:100%}}@media (forced-colors: active){.checkbox{-webkit-appearance:revert;-moz-appearance:revert;appearance:revert;transition:none}.checkbox:checked{transition:none}.checkbox:focus-visible{outline:0.125rem solid highlight}.checkbox:disabled:not(:checked){-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}.checkmark{fill:none}.indeterminate-symbol{display:none}}';const p=class{constructor(t){e(this,t);this.checkboxChecked=i(this,"checkboxChecked",7);this.icCheck=i(this,"icCheck",7);this.IC_TEXT_FIELD="ic-text-field";this.handleClick=()=>{this.checked=!this.checked;this.icCheck.emit();this.checkboxChecked.emit()};this.handleFormReset=()=>{this.checked=this.initiallyChecked};this.additionalFieldDisplay="static";this.checked=false;this.initiallyChecked=this.checked;this.disabled=false;this.dynamicText="This selection requires additional answers";this.form=undefined;this.formaction=undefined;this.formenctype=undefined;this.formmethod=undefined;this.formnovalidate=undefined;this.formtarget=undefined;this.groupLabel=undefined;this.indeterminate=false;this.label=undefined;this.name=undefined;this.size=undefined;this.small=false;this.value=undefined}componentWillLoad(){r(this.disabled,this.el);c(this.el,this.handleFormReset)}componentDidLoad(){n([{prop:this.label,propName:"label"},{prop:this.value,propName:"value"}],"Checkbox")}componentDidRender(){if(this.additionalFieldDisplay==="static"){const e=this.el.querySelector(this.IC_TEXT_FIELD);if(!this.checked){e&&e.setAttribute("disabled","")}else{e&&e.removeAttribute("disabled")}}else if(this.additionalFieldContainer){if(!this.checked){this.additionalFieldContainer.style.display="none"}else{this.additionalFieldContainer.style.display="flex"}}}disconnectedCallback(){s(this.el,this.handleFormReset)}async setFocus(){const e=this.el.shadowRoot.querySelector(".checkbox");if(e){e.focus()}}render(){let e=`ic-checkbox-${b(this.label)?this.label:this.value}-${this.groupLabel}`;e=e.replace(/ /g,"-");const i=this.el.parentElement.size;this.checked?d(true,this.el,this.name,this.checked&&this.value,this.disabled):l(this.el);return t(a,{class:{["disabled"]:this.disabled,["small"]:this.small,[`${this.size||i}`]:true}},t("div",{class:"container"},this.checked&&!this.indeterminate&&t("svg",{class:"checkmark",width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","fill-rule":"evenodd","clip-rule":"evenodd"},t("title",null,"checkmark icon"),t("path",{d:"M21 6.285l-11.16 12.733-6.84-6.018 1.319-1.49 5.341 4.686 9.865-11.196 1.475 1.285z"})),this.checked&&this.indeterminate&&t("div",{class:"indeterminate-symbol"}),t("input",{role:"checkbox",class:{["checkbox"]:true,["checked"]:this.checked,["indeterminate"]:this.indeterminate},type:"checkbox",name:this.name,id:e,value:this.value,disabled:this.disabled?true:null,checked:this.checked,indeterminate:this.indeterminate,onClick:this.handleClick,form:this.form,formaction:this.formaction,formenctype:this.formenctype,formmethod:this.formmethod,formnovalidate:this.formnovalidate,formtarget:this.formtarget}),t("ic-typography",{class:"checkbox-label",variant:"body"},t("label",{htmlFor:e},this.label))),h(this.el,"additional-field")&&t("div",{class:"dynamic-container",ref:e=>this.additionalFieldContainer=e},this.additionalFieldDisplay==="dynamic"&&t("div",{class:"branch-corner"}),t("div",null,this.additionalFieldDisplay==="dynamic"&&t("ic-typography",{variant:"caption"},t("p",{class:"dynamic-text","aria-live":"polite"},this.dynamicText)),t("div",{class:{"additional-field-wrapper":this.additionalFieldDisplay==="static"}},t("slot",{name:"additional-field"})))))}static get delegatesFocus(){return true}get el(){return o(this)}};p.style=m;export{p as ic_checkbox};
|
2
|
+
//# sourceMappingURL=p-2f973f6a.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as i,c as e,h as t,g as a}from"./p-6b5e91e2.js";import{j as o,a as s,i as r}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as i,c as e,h as t,g as a}from"./p-6b5e91e2.js";import{j as o,a as s,i as r}from"./p-4cefa844.js";import"./p-26b7b18f.js";const n=`<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M10 0C4.47 0 0 4.47 0 10C0 15.53 4.47 20 10 20C15.53 20 20 15.53 20 10C20 4.47 15.53 0 10 0ZM15 13.59L13.59 15L10 11.41L6.41 15L5 13.59L8.59 10L5 6.41L6.41 5L10 8.59L13.59 5L15 6.41L11.41 10L15 13.59Z" fill="currentColor"/>\n</svg>\n`;const c='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:inline-block}.chip{display:flex;padding:var(--ic-space-xxs);font-size:0.875rem;border-radius:var(--ic-space-md);text-align:left;text-decoration:none;transition:var(--ic-easing-transition-fast);position:relative}.chip.small{padding:var(--ic-space-xxxs);border-radius:calc(var(--ic-space-md) - var(--ic-space-xxxs))}.chip.large{padding:var(--ic-space-xs);border-radius:calc(var(--ic-space-md) + var(--ic-space-xxs))}.label{padding:0 var(--ic-space-xs)}.chip.hovered:not(:focus-within){background-color:var(--ic-architectural-300)}.chip:focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);z-index:1}.chip.outline.hovered:not(:focus-within),.chip.outlined.hovered:not(:focus-within){background-color:var(--ic-action-dark-bg-hover)}ic-tooltip:focus-within{z-index:1}.filled{background-color:var(--ic-architectural-200);color:black;border:none}.filled.disabled{background-color:var(--ic-architectural-100)}.outline,.outlined{color:var(--ic-architectural-900);border:var(--ic-border-width) solid var(--ic-architectural-900);padding:calc(var(--ic-space-xxs) - var(--ic-space-1px))}.outline.small,.outlined.small{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}.outline.large,.outlined.large{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}.outline.disabled,.outlined.disabled{border:var(--ic-border-disabled);background:none}.chip.disabled ic-typography{color:var(--ic-architectural-200)}.dismiss-icon{border:none;border-radius:50%;padding:0;background:none;cursor:pointer;margin:var(--ic-space-xxxs);height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs))}.dismiss-icon:focus{outline:var(--ic-hc-focus-outline)}.dismiss-icon[disabled]{pointer-events:none;color:var(--ic-architectural-200)}.icon{padding:var(--ic-space-xxxs);box-sizing:border-box}.icon,ic-tooltip{width:var(--ic-space-lg);height:var(--ic-space-lg)}.chip.disabled path,.chip.disabled ::slotted(svg){fill:var(--ic-architectural-200)}.chip.white-background{background-color:var(--ic-architectural-white)}.chip.white-background.hovered:not(:focus-within){background-color:var(--ic-action-dark-bg-hover-no-alpha) !important}@media (forced-colors: active){.chip{border:var(--ic-hc-border)}.filled.small{padding:calc(var(--ic-space-xxxs) - var(--ic-space-1px))}.filled{padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}.filled.large{padding:calc(var(--ic-space-xs) - var(--ic-space-1px))}.chip.disabled{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-color:GrayText}.chip.disabled ic-typography{color:GrayText}.chip.disabled path,.chip.disabled ::slotted(svg){fill:GrayText}.chip:focus-within{outline:none;border-color:Highlight}}';const l=class{constructor(t){i(this,t);this.dismiss=e(this,"dismiss",7);this.icDismiss=e(this,"icDismiss",7);this.dismissAction=()=>{this.dismiss.emit();this.icDismiss.emit()};this.mouseEnterHandler=()=>{this.isHovered=true};this.mouseLeaveHandler=()=>{this.isHovered=false};this.isHovered=false;this.visible=true;this.appearance=undefined;this.disabled=false;this.dismissible=false;this.label=undefined;this.size="default";this.transparentBackground=true;this.variant="filled"}componentWillLoad(){o(this.disabled,this.el);if(this.appearance==="outline"){this.variant="outlined"}}componentDidLoad(){var i;this.dismissible&&((i=this.el.shadowRoot.querySelector("span.ic-tooltip-label"))===null||i===void 0?void 0:i.setAttribute("aria-hidden","true"));s([{prop:this.label,propName:"label"}],"Chip")}handleClick(){this.visible=!this.visible}async setFocus(){if(this.el.shadowRoot.querySelector("button")){this.el.shadowRoot.querySelector("button").focus()}}render(){const{label:i,appearance:e,variant:a,size:o,dismissible:s,visible:c,disabled:l,isHovered:d}=this;return c&&t("div",{class:{["chip"]:true,[`${e}`]:e!==undefined,[`${a}`]:true,[`${o}`]:true,["disabled"]:l,["dismissible"]:s,["hovered"]:d,["white-background"]:this.variant==="outlined"&&!this.transparentBackground}},r(this.el,"icon")&&t("div",{class:"icon"},t("slot",{name:"icon"})),t("ic-typography",{variant:"label","apply-vertical-margins":false,class:"label"},t("span",null,i)),s&&t("ic-tooltip",{label:"Dismiss",target:"dismiss-icon",class:{["tooltip-disabled"]:l}},t("button",{id:"dismiss-icon",class:{["dismiss-icon"]:true},"aria-label":`Dismiss ${i} chip`,disabled:l,tabindex:l?-1:0,onClick:this.dismissAction,onMouseEnter:this.mouseEnterHandler,onMouseLeave:this.mouseLeaveHandler,innerHTML:n})),r(this.el,"badge")&&t("slot",{name:"badge"}))}static get delegatesFocus(){return true}get el(){return a(this)}};l.style=c;export{l as ic_chip};
|
2
|
+
//# sourceMappingURL=p-389d8200.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,c as t,h as i,H as o,g as n}from"./p-6b5e91e2.js";import{I as a}from"./p-26b7b18f.js";import{
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,c as t,h as i,H as o,g as n}from"./p-6b5e91e2.js";import{I as a}from"./p-26b7b18f.js";import{c as s}from"./p-4cefa844.js";const r='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host:not[hidden]{display:block}:host(.ic-tab-panel-light){color:white}';const l=class{constructor(i){e(this,i);this.tabPanelCreated=t(this,"tabPanelCreated",7);this.tabPanelRemoved=t(this,"tabPanelRemoved",7);this.appearance="dark";this.contextId="default";this.panelId=undefined;this.selectedTab=undefined;this.tabPosition=undefined}connectedCallback(){this.tabPanelCreated.emit(this.el)}disconnectedCallback(){const e=document.querySelector(`ic-tab-context[context-id=${this.contextId}]`);if(e){e.tabRemovedHandler()}}render(){const{panelId:e,selectedTab:t,appearance:n}=this;return i(o,{class:{["ic-tab-panel-light"]:n===a.Light},role:"tabpanel",hidden:s(e)&&s(t)?!(e===t):true},i("div",null,i("slot",null)))}get el(){return n(this)}};l.style=r;export{l as ic_tab_panel};
|
2
|
+
//# sourceMappingURL=p-3aa1b3c7.entry.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as s,h as t,H as a,g as i}from"./p-6b5e91e2.js";import{I as c}from"./p-26b7b18f.js";import{h as r,r as e,g as o,b as h,c as n,a as l,d as p}from"./p-4cefa844.js";const d="@media (prefers-reduced-motion: no-preference){:host(.show){animation:expand var(--ic-transition-duration-slow)}:host(.hide){animation:shrink var(--ic-transition-duration-slow)}}:host{display:flex;height:var(--ic-space-md);min-width:var(--ic-space-md);width:-moz-fit-content;width:fit-content;border-radius:calc(2 * var(--ic-space-xxl));position:absolute}:host(.neutral){background-color:var(--ic-architectural-500)}:host(.light){background-color:var(--ic-architectural-40)}:host(.info){background-color:var(--ic-status-info)}:host(.warning){background-color:var(--ic-status-warning-mid)}:host(.error){background-color:var(--ic-status-error)}:host(.success){background-color:var(--ic-status-success)}:host(.small){height:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.large){height:calc(var(--ic-space-md) + var(--ic-space-xxs));min-width:calc(var(--ic-space-md) + var(--ic-space-xxs))}:host(.dot.default){height:var(--ic-space-xs);width:var(--ic-space-xs);min-width:var(--ic-space-xs)}:host(.dot.small){height:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs));min-width:calc(var(--ic-space-xxs) + var(--ic-space-xxxs))}:host(.dot.large){height:var(--ic-space-sm);width:var(--ic-space-sm);min-width:var(--ic-space-sm)}:host(.foreground-dark) ::slotted(*){fill:var(--ic-color-primary-text)}:host(.foreground-light) ::slotted(*){fill:white}:host(.foreground-dark) ic-typography{color:var(--ic-color-primary-text)}:host(.foreground-light) ic-typography{color:white}:host(.text) ic-typography{align-self:center;padding:0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.text.small) ic-typography{padding:0 0.2132rem}:host(.text.large) ic-typography{padding:0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}:host(.icon) ::slotted(svg){width:var(--ic-space-sm);height:var(--ic-space-sm);padding:var(--ic-space-xxxs)}:host(.icon.small) ::slotted(svg){width:var(--ic-space-xs);height:var(--ic-space-xs)}:host(.icon.large) ::slotted(svg){width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));height:calc(var(--ic-space-sm) + var(--ic-space-xxxs));padding:calc(var(--ic-space-xxxs) + var(--ic-space-1px))}:host(.far){top:calc(-1 * var(--ic-space-xs));right:calc(-1 * var(--ic-space-xs))}:host(.far.small),:host(.dot.far.large){top:calc(-1 * var(--ic-space-xxs));right:calc(-1 * var(--ic-space-xxs))}:host(.dot.far),:host(.dot.far.small){top:calc(-1 * var(--ic-space-xxxs));right:calc(-1 * var(--ic-space-xxxs))}:host(.near){top:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));right:calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)))}:host(.dot.near){top:calc(-1 * var(--ic-space-1px));right:calc(-1 * var(--ic-space-1px))}:host(.inline){position:static}:host(.hide){visibility:hidden !important;transition:visibility var(--ic-transition-duration-slow)}@keyframes expand{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes shrink{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}";const u=class{constructor(t){s(this,t);this.ariaLabel=null;this.setBadgeColour=()=>{let s=null;if(this.customColor!==null){const t=this.customColor.slice(0,1);if(t==="#"){s=r(this.customColor)}else if(t.toLowerCase()==="r"){s=e(this.customColor)}this.customColorRGBA=s;this.el.style.backgroundColor=`rgba(${s.r.toString()}, ${s.g.toString()}, ${s.b.toString()}, ${s.a.toString()})`}};this.getBadgeForeground=()=>{let s;let t;let a;switch(this.variant){case"custom":s=this.customColorRGBA.r;t=this.customColorRGBA.g;a=this.customColorRGBA.b;break;case"error":s=parseInt(o("--ic-status-error-r"));t=parseInt(o("--ic-status-error-g"));a=parseInt(o("--ic-status-error-b"));break;case"success":s=parseInt(o("--ic-status-success-r"));t=parseInt(o("--ic-status-success-g"));a=parseInt(o("--ic-status-success-b"));break;case"warning":s=parseInt(o("--ic-status-warning-r"));t=parseInt(o("--ic-status-warning-g"));a=parseInt(o("--ic-status-warning-b"));break;case"info":{const i=r(o("--ic-status-info"));s=i.r;t=i.g;a=i.b;break}case"neutral":{const i=r(o("--ic-architectural-500"));s=i.r;t=i.g;a=i.b;break}case"light":{const i=r(o("--ic-architectural-40"));s=i.r;t=i.g;a=i.b;break}}const i=(s*299+t*587+a*114)/1e3;this.foregroundColour=i>133.3505?c.Dark:c.Light};this.getTextLabel=()=>{let s;if(this.textLabel!==null){if(this.maxNumber!==null){s=Number(this.textLabel)>this.maxNumber?`${this.maxNumber}+`:this.textLabel}else{s=this.textLabel}}return s};this.setAccessibleLabel=()=>{const s=p(this.el);const t=h(this.el).ariaLabel;const a=this.isAccessibleLabelDefined()?this.accessibleLabel:this.textLabel||"with badge being displayed";if(h(this.el)!==null){if(s!=="IC-CARD"&&(s!=="IC-TAB"||s==="IC-TAB"&&t)){h(this.el).ariaLabel=`${t?`${t} ,`:""} ${a}`}else{this.ariaLabel=`, ${a}`}}};this.isAccessibleLabelDefined=()=>n(this.accessibleLabel)&&this.accessibleLabel!==null;this.accessibleLabel=undefined;this.customColor=null;this.maxNumber=undefined;this.position="far";this.size="default";this.textLabel=undefined;this.type="text";this.variant="neutral";this.visible=true}componentWillLoad(){this.variant==="custom"&&this.setBadgeColour();this.getBadgeForeground();this.setAccessibleLabel()}componentDidLoad(){this.type==="text"&&l([{prop:this.textLabel,propName:"text-label"}],"Badge")}async showBadge(){this.visible=true}async hideBadge(){this.visible=false}render(){const{position:s,size:i,type:c,variant:r,foregroundColour:e,visible:o}=this;return t(a,{class:{[`${s}`]:true,[`${i}`]:true,[`${r}`]:true,[`${c}`]:true,[`foreground-${e}`]:e!==null,["show"]:o,["hide"]:!o},id:this.el.id||null,"aria-label":this.ariaLabel,role:"status"},c==="icon"&&t("slot",{name:"badge-icon"}),c==="text"&&t("ic-typography",{variant:i==="small"?"badge-small":"badge"},this.getTextLabel()))}static get delegatesFocus(){return true}get el(){return i(this)}};u.style=d;export{u as ic_badge};
|
2
|
+
//# sourceMappingURL=p-40a59fd5.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icBadgeCss","Badge","this","ariaLabel","setBadgeColour","colorRGBA","customColor","firstChar","slice","hexToRgba","toLowerCase","rgbaStrToObj","customColorRGBA","el","style","backgroundColor","r","toString","g","b","a","getBadgeForeground","red","green","blue","variant","parseInt","getCssProperty","info","neutral","light","brightness","foregroundColour","IcThemeForegroundEnum","Dark","Light","getTextLabel","label","textLabel","maxNumber","Number","setAccessibleLabel","parentElType","getParentElementType","parentElAriaLabel","getParentElement","defaultAriaLabel","isAccessibleLabelDefined","accessibleLabel","isPropDefined","componentWillLoad","componentDidLoad","type","onComponentRequiredPropUndefined","prop","propName","showBadge","visible","hideBadge","render","position","size","h","Host","class","id","role","name"],"sources":["src/components/ic-badge/ic-badge.css?tag=ic-badge&encapsulation=shadow","src/components/ic-badge/ic-badge.tsx"],"sourcesContent":["@media (prefers-reduced-motion: no-preference) {\n :host(.show) {\n animation: expand var(--ic-transition-duration-slow);\n }\n\n :host(.hide) {\n animation: shrink var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n display: flex;\n height: var(--ic-space-md);\n min-width: var(--ic-space-md);\n width: fit-content;\n border-radius: calc(2 * var(--ic-space-xxl));\n position: absolute;\n}\n\n:host(.neutral) {\n background-color: var(--ic-architectural-500);\n}\n\n:host(.light) {\n background-color: var(--ic-architectural-40);\n}\n\n:host(.info) {\n background-color: var(--ic-status-info);\n}\n\n:host(.warning) {\n background-color: var(--ic-status-warning-mid);\n}\n\n:host(.error) {\n background-color: var(--ic-status-error);\n}\n\n:host(.success) {\n background-color: var(--ic-status-success);\n}\n\n:host(.small) {\n height: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.large) {\n height: calc(var(--ic-space-md) + var(--ic-space-xxs));\n min-width: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n:host(.dot.default) {\n height: var(--ic-space-xs);\n width: var(--ic-space-xs);\n min-width: var(--ic-space-xs);\n}\n\n:host(.dot.small) {\n height: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n min-width: calc(var(--ic-space-xxs) + var(--ic-space-xxxs));\n}\n\n:host(.dot.large) {\n height: var(--ic-space-sm);\n width: var(--ic-space-sm);\n min-width: var(--ic-space-sm);\n}\n\n:host(.foreground-dark) ::slotted(*) {\n fill: var(--ic-color-primary-text);\n}\n\n:host(.foreground-light) ::slotted(*) {\n fill: white;\n}\n\n:host(.foreground-dark) ic-typography {\n color: var(--ic-color-primary-text);\n}\n\n:host(.foreground-light) ic-typography {\n color: white;\n}\n\n:host(.text) ic-typography {\n align-self: center;\n padding: 0 calc((var(--ic-space-xs) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.text.small) ic-typography {\n padding: 0 0.2132rem;\n}\n\n:host(.text.large) ic-typography {\n padding: 0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px);\n}\n\n:host(.icon) ::slotted(svg) {\n width: var(--ic-space-sm);\n height: var(--ic-space-sm);\n padding: var(--ic-space-xxxs);\n}\n\n:host(.icon.small) ::slotted(svg) {\n width: var(--ic-space-xs);\n height: var(--ic-space-xs);\n}\n\n:host(.icon.large) ::slotted(svg) {\n width: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n height: calc(var(--ic-space-sm) + var(--ic-space-xxxs));\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\n:host(.far) {\n top: calc(-1 * var(--ic-space-xs));\n right: calc(-1 * var(--ic-space-xs));\n}\n\n:host(.far.small),\n:host(.dot.far.large) {\n top: calc(-1 * var(--ic-space-xxs));\n right: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.dot.far),\n:host(.dot.far.small) {\n top: calc(-1 * var(--ic-space-xxxs));\n right: calc(-1 * var(--ic-space-xxxs));\n}\n\n:host(.near) {\n top: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n right: calc(-1 * calc(var(--ic-space-xxs) + var(--ic-space-1px)));\n}\n\n:host(.dot.near) {\n top: calc(-1 * var(--ic-space-1px));\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.inline) {\n position: static;\n}\n\n:host(.hide) {\n visibility: hidden !important;\n transition: visibility var(--ic-transition-duration-slow);\n}\n\n@keyframes expand {\n from {\n opacity: 0;\n transform: scale(0);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes shrink {\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0);\n }\n}\n","import { Component, Element, Host, Method, Prop, h } from \"@stencil/core\";\nimport {\n IcBadgePositions,\n IcBadgeTypes,\n IcBadgeVariants,\n IcColor,\n} from \"./ic-badge.types\";\nimport {\n IcColorRGBA,\n IcSizes,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport {\n getCssProperty,\n getParentElement,\n getParentElementType,\n hexToRgba,\n isPropDefined,\n onComponentRequiredPropUndefined,\n rgbaStrToObj,\n} from \"../../utils/helpers\";\n\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\n@Component({\n tag: \"ic-badge\",\n styleUrl: \"ic-badge.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Badge {\n private ariaLabel: string = null;\n private customColorRGBA: IcColorRGBA;\n private foregroundColour: IcThemeForeground;\n\n @Element() el: HTMLIcBadgeElement;\n\n /**\n * The accessible label of the badge component to provide context for screen reader users.\n */\n @Prop() accessibleLabel?: string;\n\n /**\n * The custom badge colour. This will only style the badge component if variant=\"custom\".\n * Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n @Prop() customColor?: IcColor = null;\n\n /**\n * The maximum number shown on the badge appended with a +.\n * This will only be displayed if type=\"text\" and textLabel is not empty.\n */\n @Prop() maxNumber?: number;\n\n /**\n * The positioning of the badge in reference to the parent element.\n */\n @Prop() position?: IcBadgePositions = \"far\";\n\n /**\n * The size of the badge to be displayed.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * The text displayed in the badge. This will only be displayed if type=\"text\".\n */\n @Prop() textLabel?: string;\n\n /**\n * The type of badge to be displayed.\n */\n @Prop() type?: IcBadgeTypes = \"text\";\n\n /**\n * The variant of the badge to be displayed.\n */\n @Prop() variant?: IcBadgeVariants = \"neutral\";\n\n /**\n * If `true`, the badge will be displayed.\n */\n @Prop({ mutable: true }) visible: boolean = true;\n\n componentWillLoad(): void {\n this.variant === \"custom\" && this.setBadgeColour();\n\n this.getBadgeForeground();\n\n this.setAccessibleLabel();\n }\n\n componentDidLoad(): void {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined(\n [{ prop: this.textLabel, propName: \"text-label\" }],\n \"Badge\"\n );\n }\n\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n @Method()\n async showBadge(): Promise<void> {\n this.visible = true;\n }\n\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n @Method()\n async hideBadge(): Promise<void> {\n this.visible = false;\n }\n\n private setBadgeColour = () => {\n let colorRGBA = null;\n if (this.customColor !== null) {\n const firstChar = this.customColor.slice(0, 1);\n if (firstChar === \"#\") {\n colorRGBA = hexToRgba(this.customColor);\n } else if (firstChar.toLowerCase() === \"r\") {\n colorRGBA = rgbaStrToObj(this.customColor);\n }\n this.customColorRGBA = colorRGBA;\n this.el.style.backgroundColor = `rgba(${colorRGBA.r.toString()}, ${colorRGBA.g.toString()}, ${colorRGBA.b.toString()}, ${colorRGBA.a.toString()})`;\n }\n };\n\n private getBadgeForeground = () => {\n let red: number;\n let green: number;\n let blue: number;\n\n switch (this.variant) {\n case \"custom\":\n red = this.customColorRGBA.r;\n green = this.customColorRGBA.g;\n blue = this.customColorRGBA.b;\n break;\n case \"error\":\n red = parseInt(getCssProperty(\"--ic-status-error-r\"));\n green = parseInt(getCssProperty(\"--ic-status-error-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-error-b\"));\n break;\n case \"success\":\n red = parseInt(getCssProperty(\"--ic-status-success-r\"));\n green = parseInt(getCssProperty(\"--ic-status-success-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-success-b\"));\n break;\n case \"warning\":\n red = parseInt(getCssProperty(\"--ic-status-warning-r\"));\n green = parseInt(getCssProperty(\"--ic-status-warning-g\"));\n blue = parseInt(getCssProperty(\"--ic-status-warning-b\"));\n break;\n case \"info\": {\n const info = hexToRgba(getCssProperty(\"--ic-status-info\"));\n red = info.r;\n green = info.g;\n blue = info.b;\n break;\n }\n case \"neutral\": {\n const neutral = hexToRgba(getCssProperty(\"--ic-architectural-500\"));\n red = neutral.r;\n green = neutral.g;\n blue = neutral.b;\n break;\n }\n case \"light\": {\n const light = hexToRgba(getCssProperty(\"--ic-architectural-40\"));\n red = light.r;\n green = light.g;\n blue = light.b;\n break;\n }\n }\n\n const brightness = (red * 299 + green * 587 + blue * 114) / 1000;\n this.foregroundColour =\n brightness > 133.3505\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n };\n\n private getTextLabel = () => {\n let label;\n if (this.textLabel !== null) {\n if (this.maxNumber !== null) {\n label =\n Number(this.textLabel) > this.maxNumber\n ? `${this.maxNumber}+`\n : this.textLabel;\n } else {\n label = this.textLabel;\n }\n }\n return label;\n };\n\n // Set aria-label on badge and / or parent element\n // Aria-describedby seems to not work, probably due to shadow DOM\n private setAccessibleLabel = () => {\n const parentElType = getParentElementType(this.el);\n const parentElAriaLabel = getParentElement(this.el).ariaLabel;\n const defaultAriaLabel = this.isAccessibleLabelDefined()\n ? this.accessibleLabel\n : this.textLabel || \"with badge being displayed\";\n\n if (getParentElement(this.el) !== null) {\n if (\n parentElType !== \"IC-CARD\" &&\n (parentElType !== \"IC-TAB\" ||\n (parentElType === \"IC-TAB\" && parentElAriaLabel))\n ) {\n getParentElement(this.el).ariaLabel = `${\n parentElAriaLabel ? `${parentElAriaLabel} ,` : \"\"\n } ${defaultAriaLabel}`;\n } else {\n this.ariaLabel = `, ${defaultAriaLabel}`;\n }\n }\n };\n\n private isAccessibleLabelDefined = () => {\n return isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n };\n\n render() {\n const { position, size, type, variant, foregroundColour, visible } = this;\n\n return (\n <Host\n class={{\n [`${position}`]: true,\n [`${size}`]: true,\n [`${variant}`]: true,\n [`${type}`]: true,\n [`foreground-${foregroundColour}`]: foregroundColour !== null,\n [\"show\"]: visible,\n [\"hide\"]: !visible,\n }}\n id={this.el.id || null}\n aria-label={this.ariaLabel}\n role=\"status\"\n >\n {type === \"icon\" && <slot name=\"badge-icon\"></slot>}\n {type === \"text\" && (\n <ic-typography variant={size === \"small\" ? \"badge-small\" : \"badge\"}>\n {this.getTextLabel()}\n </ic-typography>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"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"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as i,h as t,H as e,g as o}from"./p-6b5e91e2.js";import{D as s,u as n,e as a,y as r}from"./p-268355c1.js";import{C as h}from"./p-3b185c32.js";import"./p-26b7b18f.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host(.in-side-menu){border-bottom:var(--ic-border-width) solid var(--ic-architectural-200);padding:var(--ic-space-md) 0}:host .navigation-group{height:100%;width:-moz-fit-content;width:fit-content;color:var(--ic-theme-text);display:flex;align-items:center;justify-content:center;padding:0 var(--ic-space-md);transition:var(--ic-easing-transition-slow);position:relative;background:none;border:none;white-space:nowrap}:host(.in-side-menu) .navigation-group{height:2.5rem;width:100%;text-align:left}:host(.in-side-menu) .navigation-group .ic-typography-label{width:11.875rem}:host(.in-side-menu) .navigation-group-side-menu{color:var(--ic-action-default);justify-content:flex-start;padding:0 var(--ic-space-md) 0 var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-collapsed,:host(.in-side-menu) .navigation-group-side-menu-expanded{color:var(--ic-action-default);justify-content:flex-start;padding-left:var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-expanded{margin-bottom:var(--ic-space-xs)}:host(.in-side-menu) .navigation-group-side-menu-collapsed::after,:host(.in-side-menu) .navigation-group-side-menu-expanded::after{border-style:solid;border-width:0.125em 0.125em 0 0;content:"";display:inline-block;height:0.45em;left:0.75em;position:relative;top:-0.1em;transform:rotate(135deg);vertical-align:top;width:0.45em}:host(.in-side-menu) .navigation-group-side-menu-expanded::after{top:0.15em;transform:rotate(-45deg)}:host .navigation-group:hover,:host .navigation-group:active,:host .selected{background-color:var(--ic-architectural-20);color:var(--ic-color-primary-text);outline:none;cursor:pointer}:host(:not(.in-side-menu)) .navigation-group:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);outline:var(--ic-hc-focus-outline);z-index:var(--ic-z-index-navigation-item);transition:box-shadow var(--ic-easing-transition-fast)}:host(.in-side-menu) .navigation-group-side-menu:hover,:host(.in-side-menu) .navigation-group-side-menu:active,:host(.in-side-menu) .navigation-group-side-menu:focus{background-color:var(--ic-architectural-20);color:var(--ic-action-default);cursor:auto;box-shadow:none;outline:none}:host(.in-side-menu) .navigation-group-side-menu:focus{outline:var(--ic-hc-focus-outline)}:host(.in-side-menu) .navigation-group-side-menu-expanded:hover:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:hover:not(:focus){background-color:var(--ic-action-dark-bg-hover);color:var(--ic-action-default);cursor:pointer}:host(.in-side-menu) .navigation-group-side-menu-expanded:active:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:active:not(:focus){background-color:var(--ic-action-dark-bg-active);color:var(--ic-action-default)}:host(.in-side-menu) .navigation-group-side-menu-expanded:focus,:host(.in-side-menu) .navigation-group-side-menu-collapsed:focus{color:var(--ic-action-default);box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline)}:host .navigation-group-dropdown{background-color:var(--ic-architectural-20);border-bottom:var(--ic-border-default);position:absolute;left:0;right:0;padding:var(--ic-space-xs) var(--ic-space-md);box-shadow:0 0.375rem 0.5rem -0.375rem rgba(0 0 0 / 20%);z-index:calc(var(--ic-z-index-navigation-item) - 1)}:host .navigation-group-dropdown-items-list{list-style:none;display:flex;flex-flow:column wrap;align-content:flex-start;padding-left:var(--ic-space-md);max-height:16.5rem}:host .chevron-toggle-icon-wrapper{display:flex;align-items:center}:host .chevron-toggle-icon-wrapper svg{transform:rotate(90deg);height:var(--ic-space-lg);width:var(--ic-space-lg)}:host .chevron-toggle-icon-closed svg{transform:rotate(-90deg)}:host(.expanded) .grouped-links-wrapper{height:var(--navigation-child-items-height, auto) !important;transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.navigation-group-side-nav) .link,:host(.navigation-group-side-nav) ::slotted(a){height:var(--navigation-child-items-height, auto)}:host(.collapsed) .grouped-links-wrapper{height:0;transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.navigation-group-side-nav) .navigation-group{height:var(--navigation-group-height);width:var(--navigation-group-width);justify-content:var(--navigation-group-justify-content);padding-right:var(--navigation-group-expand-toggle-padding)}:host(.navigation-group-side-nav) .navigation-group:hover,:host(.navigation-group-side-nav) .navigation-group:active,:host(.navigation-group-side-nav) .selected{background-color:var(--navigation-group-hover);color:var(--navigation-group-text-hover)}:host(.navigation-group-side-nav) .navigation-group:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);background:none}:host(.navigation-group-side-nav) .ic-typography-caption{position:var(--navigation-group-title-position);left:var(--navigation-group-title-position-left);white-space:nowrap}';const u=class{constructor(e){i(this,e);this.allGroupedNavigationItems=[];this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS=100;this.IC_NAVIGATION_ITEM="ic-navigation-item";this.mouseGate=false;this.nodeName="IC-NAVIGATION-GROUP";this.GROUPED_LINKS_WRAPPER_CLASS=".grouped-links-wrapper";this.sideNavExpandHandler=i=>{this.isSideNavExpanded=i.detail.sideNavExpanded;const t=this.el.shadowRoot.querySelector(this.GROUPED_LINKS_WRAPPER_CLASS);if(!t)return;if(this.isSideNavExpanded){if(this.expanded&&this.expandedNavItemsHeight){this.setGroupedLinksElementHeight(t,this.expandedNavItemsHeight)}else if(this.expanded){setTimeout((()=>{this.expandedNavItemsHeight=this.getNavigationChildItemsHeight();this.setGroupedLinksElementHeight(t,this.expandedNavItemsHeight)}),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}}else{if(this.expanded&&this.collapsedNavItemsHeight){this.setGroupedLinksElementHeight(t,this.collapsedNavItemsHeight)}else if(this.expanded){setTimeout((()=>{this.collapsedNavItemsHeight=this.getNavigationChildItemsHeight();this.setGroupedLinksElementHeight(t,this.collapsedNavItemsHeight)}),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}}};this.topNavResizedHandler=({detail:i})=>{var t;const{size:e}=i;if(e!==this.deviceSize){this.deviceSize=e;this.inTopNavSideMenu=e<=(((t=this.parentEl)===null||t===void 0?void 0:t.customMobileBreakpoint)||s.L)}};this.setGroupedNavItemTabIndex=i=>{this.el.querySelectorAll(this.IC_NAVIGATION_ITEM).forEach((t=>{const e=t.shadowRoot.querySelector("a")||t.querySelector("a");if(e){e.setAttribute("tabindex",i)}}))};this.toggleGroupedLinkWrapperHeight=(i,t)=>{if(!i)return;if(t){if(this.isSideNavExpanded){this.setGroupedLinksElementHeight(i,this.expandedNavItemsHeight)}else{this.setGroupedLinksElementHeight(i,this.collapsedNavItemsHeight)}this.setGroupedNavItemTabIndex("0")}else{i.style.setProperty("--navigation-child-items-height","0");this.setGroupedNavItemTabIndex("-1")}};this.toggleExpanded=()=>{this.expanded=!this.expanded;const i=this.el.shadowRoot.querySelector(this.GROUPED_LINKS_WRAPPER_CLASS);this.toggleGroupedLinkWrapperHeight(i,this.expanded)};this.handleClick=i=>{if(this.navigationType==="top"&&i.detail){this.toggleDropdown()}else{this.toggleExpanded()}};this.handleBlur=i=>{const t=i.relatedTarget;if(!this.el.contains(t)){this.hideDropdown()}};this.handleTopNavKeydown=i=>{if(i.key===" "||i.key==="Enter"){this.toggleDropdown()}else if(!this.inTopNavSideMenu&&i.key==="Escape"){this.hideDropdown()}};this.handleKeydown=i=>{if(i.key==="Enter"||i.key===" "||i.key==="Escape"){switch(this.navigationType){case"top":this.handleTopNavKeydown(i);break;case"side":this.toggleExpanded();i.preventDefault();break;default:this.toggleExpanded();break}}};this.handleMouseLeave=i=>{const t=i.relatedTarget;this.mouseGate=false;if(!this.el.contains(t)&&t!==this.dropdown&&document.activeElement!==this.el&&!this.el.contains(document.activeElement)&&(t===null||t===void 0?void 0:t.nodeName)===this.nodeName&&this.dropdownOpen===true){this.mouseGate=true;this.hideDropdown()}else if(!this.el.contains(t)&&t!==this.dropdown&&!this.el.contains(document.activeElement)){this.mouseGate=false;setTimeout((()=>{this.dropdownOpen?this.hideDropdown():null}),500)}};this.handleMouseEnter=i=>{const t=i.relatedTarget;document.addEventListener("keydown",this.handleKeydown);if((t===null||t===void 0?void 0:t.nodeName)===this.nodeName&&this.mouseGate===true){this.showDropdown()}else if(this.dropdownOpen===false&&t!==null&&this.mouseGate===false){this.mouseGate=true;setTimeout((()=>{this.mouseGate&&this.showDropdown()}),500)}};this.renderDropdownGroupedLinks=()=>t("div",{class:{["navigation-group-dropdown"]:!this.inTopNavSideMenu,["navigation-group-dropdown-side-menu"]:this.inTopNavSideMenu,["selected"]:this.dropdownOpen&&!this.inTopNavSideMenu},onMouseLeave:!this.inTopNavSideMenu?this.handleMouseLeave:null,ref:i=>this.dropdown=i},t("nav",{class:{["navigation-group-dropdown-items"]:!this.inTopNavSideMenu}},t("ul",null,t("slot",null))));this.renderGroupedLinks=()=>t("ul",{class:"grouped-links-wrapper"},t("slot",null));this.getNavigationChildItemsHeight=()=>{let i=0;this.allGroupedNavigationItems.forEach((t=>{i+=t.offsetHeight}));return`${i}px`};this.setInitialGroupedLinksWrapperHeight=()=>{const i=this.el.shadowRoot.querySelector(this.GROUPED_LINKS_WRAPPER_CLASS);if(!i)return;if(!this.isSideNavExpanded&&!this.collapsedNavItemsHeight&&this.expanded){this.collapsedNavItemsHeight=this.getNavigationChildItemsHeight();this.setGroupedLinksElementHeight(i,this.collapsedNavItemsHeight)}if(this.isSideNavExpanded&&this.expanded){this.expandedNavItemsHeight=this.getNavigationChildItemsHeight();this.setGroupedLinksElementHeight(i,this.expandedNavItemsHeight)}};this.renderNavigationItems=()=>{if(this.dropdownOpen||this.inTopNavSideMenu&&!this.expandable){return this.renderDropdownGroupedLinks()}if(this.navigationType!=="top"){return this.renderGroupedLinks()}return null};this.deviceSize=s.XL;this.dropdownOpen=false;this.expanded=true;this.focusStyle=n();this.inTopNavSideMenu=false;this.navigationType=undefined;this.parentEl=undefined;this.expandable=false;this.label=undefined}disconnectedCallback(){if(this.navigationType==="side"){this.parentEl.removeEventListener("sideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.removeEventListener("topNavResized",this.topNavResizedHandler)}}componentWillLoad(){this.deviceSize=a();const{navType:i,parent:t}=r(this.el);this.navigationType=i;this.parentEl=t;if(this.navigationType==="side"){this.parentEl.addEventListener("sideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.addEventListener("topNavResized",this.topNavResizedHandler);if(this.deviceSize<=this.parentEl.customMobileBreakpoint)this.inTopNavSideMenu=true}}componentDidLoad(){this.allGroupedNavigationItems=Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));setTimeout((()=>this.setInitialGroupedLinksWrapperHeight()),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}childBlurHandler(){this.hideDropdown()}navItemClickHandler(){this.hideDropdown()}themeChangeHandler(i){const t=i.detail;this.focusStyle=t.mode}async setFocus(){if(this.groupEl){this.groupEl.focus()}}toggleDropdown(){this.dropdownOpen=!this.dropdownOpen}showDropdown(){if(!this.dropdownOpen){this.toggleDropdown()}}hideDropdown(){document.removeEventListener("keydown",this.handleKeydown);if(this.dropdownOpen){this.toggleDropdown()}}setGroupedLinksElementHeight(i,t){i.style.setProperty("--navigation-child-items-height",t)}render(){const{label:i,dropdownOpen:o,inTopNavSideMenu:s,expandable:n}=this;return t(e,{class:{["in-side-menu"]:s,expanded:this.expanded,collapsed:!this.expanded,["navigation-group-side-nav"]:this.navigationType==="side"},role:"listitem"},t("button",{onMouseEnter:!s&&this.navigationType==="top"&&this.handleMouseEnter,onMouseLeave:this.navigationType==="top"&&this.handleMouseLeave,tabindex:s&&!n?"-1":"0",onBlur:this.handleBlur,onClick:n?this.handleClick:null,onKeyDown:this.handleKeydown,class:{["navigation-group"]:true,[this.focusStyle]:!s,["navigation-group-side-menu"]:s&&!n,["navigation-group-side-menu-collapsed"]:s&&n&&!o,["navigation-group-side-menu-expanded"]:s&&n&&o,["selected"]:o&&!s},ref:i=>this.groupEl=i,"aria-expanded":`${o||this.expanded}`,"aria-haspopup":`${!s&&this.navigationType==="top"}`},t("ic-typography",{variant:this.navigationType==="side"?"caption":"label"},i),this.navigationType==="side"&&n&&t("div",{class:{"chevron-toggle-icon-wrapper":true,"chevron-toggle-icon-closed":this.expanded},innerHTML:h})),this.renderNavigationItems())}static get delegatesFocus(){return true}get el(){return o(this)}};u.style=d;export{u as ic_navigation_group};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as i,h as t,H as e,g as o}from"./p-6b5e91e2.js";import{D as s,u as n,e as a,y as r}from"./p-4cefa844.js";import{C as h}from"./p-3b185c32.js";import"./p-26b7b18f.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host(.in-side-menu){border-bottom:var(--ic-border-width) solid var(--ic-architectural-200);padding:var(--ic-space-md) 0}:host .navigation-group{height:100%;width:-moz-fit-content;width:fit-content;color:var(--ic-theme-text);display:flex;align-items:center;justify-content:center;padding:0 var(--ic-space-md);transition:var(--ic-easing-transition-slow);position:relative;background:none;border:none;white-space:nowrap}:host(.in-side-menu) .navigation-group{height:2.5rem;width:100%;text-align:left}:host(.in-side-menu) .navigation-group .ic-typography-label{width:11.875rem}:host(.in-side-menu) .navigation-group-side-menu{color:var(--ic-action-default);justify-content:flex-start;padding:0 var(--ic-space-md) 0 var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-collapsed,:host(.in-side-menu) .navigation-group-side-menu-expanded{color:var(--ic-action-default);justify-content:flex-start;padding-left:var(--ic-space-md)}:host(.in-side-menu) .navigation-group-side-menu-expanded{margin-bottom:var(--ic-space-xs)}:host(.in-side-menu) .navigation-group-side-menu-collapsed::after,:host(.in-side-menu) .navigation-group-side-menu-expanded::after{border-style:solid;border-width:0.125em 0.125em 0 0;content:"";display:inline-block;height:0.45em;left:0.75em;position:relative;top:-0.1em;transform:rotate(135deg);vertical-align:top;width:0.45em}:host(.in-side-menu) .navigation-group-side-menu-expanded::after{top:0.15em;transform:rotate(-45deg)}:host .navigation-group:hover,:host .navigation-group:active,:host .selected{background-color:var(--ic-architectural-20);color:var(--ic-color-primary-text);outline:none;cursor:pointer}:host(:not(.in-side-menu)) .navigation-group:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);outline:var(--ic-hc-focus-outline);z-index:var(--ic-z-index-navigation-item);transition:box-shadow var(--ic-easing-transition-fast)}:host(.in-side-menu) .navigation-group-side-menu:hover,:host(.in-side-menu) .navigation-group-side-menu:active,:host(.in-side-menu) .navigation-group-side-menu:focus{background-color:var(--ic-architectural-20);color:var(--ic-action-default);cursor:auto;box-shadow:none;outline:none}:host(.in-side-menu) .navigation-group-side-menu:focus{outline:var(--ic-hc-focus-outline)}:host(.in-side-menu) .navigation-group-side-menu-expanded:hover:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:hover:not(:focus){background-color:var(--ic-action-dark-bg-hover);color:var(--ic-action-default);cursor:pointer}:host(.in-side-menu) .navigation-group-side-menu-expanded:active:not(:focus),:host(.in-side-menu) .navigation-group-side-menu-collapsed:active:not(:focus){background-color:var(--ic-action-dark-bg-active);color:var(--ic-action-default)}:host(.in-side-menu) .navigation-group-side-menu-expanded:focus,:host(.in-side-menu) .navigation-group-side-menu-collapsed:focus{color:var(--ic-action-default);box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);outline:var(--ic-hc-focus-outline)}:host .navigation-group-dropdown{background-color:var(--ic-architectural-20);border-bottom:var(--ic-border-default);position:absolute;left:0;right:0;padding:var(--ic-space-xs) var(--ic-space-md);box-shadow:0 0.375rem 0.5rem -0.375rem rgba(0 0 0 / 20%);z-index:calc(var(--ic-z-index-navigation-item) - 1)}:host .navigation-group-dropdown-items-list{list-style:none;display:flex;flex-flow:column wrap;align-content:flex-start;padding-left:var(--ic-space-md);max-height:16.5rem}:host .chevron-toggle-icon-wrapper{display:flex;align-items:center}:host .chevron-toggle-icon-wrapper svg{transform:rotate(90deg);height:var(--ic-space-lg);width:var(--ic-space-lg)}:host .chevron-toggle-icon-closed svg{transform:rotate(-90deg)}:host(.expanded) .grouped-links-wrapper{height:var(--navigation-child-items-height, auto) !important;transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.navigation-group-side-nav) .link,:host(.navigation-group-side-nav) ::slotted(a){height:var(--navigation-child-items-height, auto)}:host(.collapsed) .grouped-links-wrapper{height:0;transition:var(--ic-easing-transition-slow);overflow:hidden}:host(.navigation-group-side-nav) .navigation-group{height:var(--navigation-group-height);width:var(--navigation-group-width);justify-content:var(--navigation-group-justify-content);padding-right:var(--navigation-group-expand-toggle-padding)}:host(.navigation-group-side-nav) .navigation-group:hover,:host(.navigation-group-side-nav) .navigation-group:active,:host(.navigation-group-side-nav) .selected{background-color:var(--navigation-group-hover);color:var(--navigation-group-text-hover)}:host(.navigation-group-side-nav) .navigation-group:focus{box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);background:none}:host(.navigation-group-side-nav) .ic-typography-caption{position:var(--navigation-group-title-position);left:var(--navigation-group-title-position-left);white-space:nowrap}';const u=class{constructor(e){i(this,e);this.allGroupedNavigationItems=[];this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS=100;this.IC_NAVIGATION_ITEM="ic-navigation-item";this.mouseGate=false;this.nodeName="IC-NAVIGATION-GROUP";this.GROUPED_LINKS_WRAPPER_CLASS=".grouped-links-wrapper";this.sideNavExpandHandler=i=>{this.isSideNavExpanded=i.detail.sideNavExpanded;const t=this.el.shadowRoot.querySelector(this.GROUPED_LINKS_WRAPPER_CLASS);if(!t)return;if(this.isSideNavExpanded){if(this.expanded&&this.expandedNavItemsHeight){this.setGroupedLinksElementHeight(t,this.expandedNavItemsHeight)}else if(this.expanded){setTimeout((()=>{this.expandedNavItemsHeight=this.getNavigationChildItemsHeight();this.setGroupedLinksElementHeight(t,this.expandedNavItemsHeight)}),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}}else{if(this.expanded&&this.collapsedNavItemsHeight){this.setGroupedLinksElementHeight(t,this.collapsedNavItemsHeight)}else if(this.expanded){setTimeout((()=>{this.collapsedNavItemsHeight=this.getNavigationChildItemsHeight();this.setGroupedLinksElementHeight(t,this.collapsedNavItemsHeight)}),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}}};this.topNavResizedHandler=({detail:i})=>{var t;const{size:e}=i;if(e!==this.deviceSize){this.deviceSize=e;this.inTopNavSideMenu=e<=(((t=this.parentEl)===null||t===void 0?void 0:t.customMobileBreakpoint)||s.L)}};this.setGroupedNavItemTabIndex=i=>{this.el.querySelectorAll(this.IC_NAVIGATION_ITEM).forEach((t=>{const e=t.shadowRoot.querySelector("a")||t.querySelector("a");if(e){e.setAttribute("tabindex",i)}}))};this.toggleGroupedLinkWrapperHeight=(i,t)=>{if(!i)return;if(t){if(this.isSideNavExpanded){this.setGroupedLinksElementHeight(i,this.expandedNavItemsHeight)}else{this.setGroupedLinksElementHeight(i,this.collapsedNavItemsHeight)}this.setGroupedNavItemTabIndex("0")}else{i.style.setProperty("--navigation-child-items-height","0");this.setGroupedNavItemTabIndex("-1")}};this.toggleExpanded=()=>{this.expanded=!this.expanded;const i=this.el.shadowRoot.querySelector(this.GROUPED_LINKS_WRAPPER_CLASS);this.toggleGroupedLinkWrapperHeight(i,this.expanded)};this.handleClick=i=>{if(this.navigationType==="top"&&i.detail){this.toggleDropdown()}else{this.toggleExpanded()}};this.handleBlur=i=>{const t=i.relatedTarget;if(!this.el.contains(t)){this.hideDropdown()}};this.handleTopNavKeydown=i=>{if(i.key===" "||i.key==="Enter"){this.toggleDropdown()}else if(!this.inTopNavSideMenu&&i.key==="Escape"){this.hideDropdown()}};this.handleKeydown=i=>{if(i.key==="Enter"||i.key===" "||i.key==="Escape"){switch(this.navigationType){case"top":this.handleTopNavKeydown(i);break;case"side":this.toggleExpanded();i.preventDefault();break;default:this.toggleExpanded();break}}};this.handleMouseLeave=i=>{const t=i.relatedTarget;this.mouseGate=false;if(!this.el.contains(t)&&t!==this.dropdown&&document.activeElement!==this.el&&!this.el.contains(document.activeElement)&&(t===null||t===void 0?void 0:t.nodeName)===this.nodeName&&this.dropdownOpen===true){this.mouseGate=true;this.hideDropdown()}else if(!this.el.contains(t)&&t!==this.dropdown&&!this.el.contains(document.activeElement)){this.mouseGate=false;setTimeout((()=>{this.dropdownOpen?this.hideDropdown():null}),500)}};this.handleMouseEnter=i=>{const t=i.relatedTarget;document.addEventListener("keydown",this.handleKeydown);if((t===null||t===void 0?void 0:t.nodeName)===this.nodeName&&this.mouseGate===true){this.showDropdown()}else if(this.dropdownOpen===false&&t!==null&&this.mouseGate===false){this.mouseGate=true;setTimeout((()=>{this.mouseGate&&this.showDropdown()}),500)}};this.renderDropdownGroupedLinks=()=>t("div",{class:{["navigation-group-dropdown"]:!this.inTopNavSideMenu,["navigation-group-dropdown-side-menu"]:this.inTopNavSideMenu,["selected"]:this.dropdownOpen&&!this.inTopNavSideMenu},onMouseLeave:!this.inTopNavSideMenu?this.handleMouseLeave:null,ref:i=>this.dropdown=i},t("nav",{class:{["navigation-group-dropdown-items"]:!this.inTopNavSideMenu}},t("ul",null,t("slot",null))));this.renderGroupedLinks=()=>t("ul",{class:"grouped-links-wrapper"},t("slot",null));this.getNavigationChildItemsHeight=()=>{let i=0;this.allGroupedNavigationItems.forEach((t=>{i+=t.offsetHeight}));return`${i}px`};this.setInitialGroupedLinksWrapperHeight=()=>{const i=this.el.shadowRoot.querySelector(this.GROUPED_LINKS_WRAPPER_CLASS);if(!i)return;if(!this.isSideNavExpanded&&!this.collapsedNavItemsHeight&&this.expanded){this.collapsedNavItemsHeight=this.getNavigationChildItemsHeight();this.setGroupedLinksElementHeight(i,this.collapsedNavItemsHeight)}if(this.isSideNavExpanded&&this.expanded){this.expandedNavItemsHeight=this.getNavigationChildItemsHeight();this.setGroupedLinksElementHeight(i,this.expandedNavItemsHeight)}};this.renderNavigationItems=()=>{if(this.dropdownOpen||this.inTopNavSideMenu&&!this.expandable){return this.renderDropdownGroupedLinks()}if(this.navigationType!=="top"){return this.renderGroupedLinks()}return null};this.deviceSize=s.XL;this.dropdownOpen=false;this.expanded=true;this.focusStyle=n();this.inTopNavSideMenu=false;this.navigationType=undefined;this.parentEl=undefined;this.expandable=false;this.label=undefined}disconnectedCallback(){if(this.navigationType==="side"){this.parentEl.removeEventListener("sideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.removeEventListener("topNavResized",this.topNavResizedHandler)}}componentWillLoad(){this.deviceSize=a();const{navType:i,parent:t}=r(this.el);this.navigationType=i;this.parentEl=t;if(this.navigationType==="side"){this.parentEl.addEventListener("sideNavExpanded",this.sideNavExpandHandler)}else if(this.navigationType==="top"){this.parentEl.addEventListener("topNavResized",this.topNavResizedHandler);if(this.deviceSize<=this.parentEl.customMobileBreakpoint)this.inTopNavSideMenu=true}}componentDidLoad(){this.allGroupedNavigationItems=Array.from(this.el.querySelectorAll(this.IC_NAVIGATION_ITEM));setTimeout((()=>this.setInitialGroupedLinksWrapperHeight()),this.DYNAMIC_GROUPED_LINKS_HEIGHT_MS)}childBlurHandler(){this.hideDropdown()}navItemClickHandler(){this.hideDropdown()}themeChangeHandler(i){const t=i.detail;this.focusStyle=t.mode}async setFocus(){if(this.groupEl){this.groupEl.focus()}}toggleDropdown(){this.dropdownOpen=!this.dropdownOpen}showDropdown(){if(!this.dropdownOpen){this.toggleDropdown()}}hideDropdown(){document.removeEventListener("keydown",this.handleKeydown);if(this.dropdownOpen){this.toggleDropdown()}}setGroupedLinksElementHeight(i,t){i.style.setProperty("--navigation-child-items-height",t)}render(){const{label:i,dropdownOpen:o,inTopNavSideMenu:s,expandable:n}=this;return t(e,{class:{["in-side-menu"]:s,expanded:this.expanded,collapsed:!this.expanded,["navigation-group-side-nav"]:this.navigationType==="side"},role:"listitem"},t("button",{onMouseEnter:!s&&this.navigationType==="top"&&this.handleMouseEnter,onMouseLeave:this.navigationType==="top"&&this.handleMouseLeave,tabindex:s&&!n?"-1":"0",onBlur:this.handleBlur,onClick:n?this.handleClick:null,onKeyDown:this.handleKeydown,class:{["navigation-group"]:true,[this.focusStyle]:!s,["navigation-group-side-menu"]:s&&!n,["navigation-group-side-menu-collapsed"]:s&&n&&!o,["navigation-group-side-menu-expanded"]:s&&n&&o,["selected"]:o&&!s},ref:i=>this.groupEl=i,"aria-expanded":`${o||this.expanded}`,"aria-haspopup":`${!s&&this.navigationType==="top"}`},t("ic-typography",{variant:this.navigationType==="side"?"caption":"label"},i),this.navigationType==="side"&&n&&t("div",{class:{"chevron-toggle-icon-wrapper":true,"chevron-toggle-icon-closed":this.expanded},innerHTML:h})),this.renderNavigationItems())}static get delegatesFocus(){return true}get el(){return o(this)}};u.style=d;export{u as ic_navigation_group};
|
2
|
+
//# sourceMappingURL=p-47b1ec8a.entry.js.map
|