@ukic/canary-web-components 2.0.0-canary.10 → 2.0.0-canary.11
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/helpers-7a069459.js.map +1 -1
- package/dist/cjs/helpers-f75cf7cf.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-date-input.cjs.entry.js +24 -8
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/ic-date-picker.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/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js +52 -8
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +0 -17
- package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +3 -3
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-date-picker/story-data.js +1 -0
- package/dist/collection/components/ic-date-picker/story-data.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/helpers2.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-date-input2.js +26 -9
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +3 -3
- package/dist/components/ic-date-picker.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/core.esm.js.map +1 -1
- package/dist/core/{p-ca8cbd6a.entry.js → p-0080bbce.entry.js} +2 -2
- package/dist/core/{p-6690bc04.entry.js → p-02d0ecd2.entry.js} +2 -2
- package/dist/core/{p-a0f9b259.entry.js → p-0388b484.entry.js} +2 -2
- package/dist/core/{p-982a6e88.entry.js → p-06aef486.entry.js} +2 -2
- package/dist/core/{p-1ce75941.entry.js → p-0b32ba5b.entry.js} +2 -2
- package/dist/core/{p-d4fdd8c1.entry.js → p-170f6408.entry.js} +2 -2
- package/dist/core/{p-2c1fecb9.entry.js → p-1857e9a7.entry.js} +2 -2
- package/dist/core/{p-a42c2f37.entry.js → p-1f1b4b8b.entry.js} +2 -2
- package/dist/core/{p-2e2e0099.entry.js → p-21da96a9.entry.js} +2 -2
- package/dist/core/{p-b306cbc8.entry.js → p-221d03e1.entry.js} +2 -2
- package/dist/core/{p-7cecf5d5.entry.js → p-23a13636.entry.js} +2 -2
- package/dist/core/{p-86012178.entry.js → p-25a458bf.entry.js} +2 -2
- package/dist/core/{p-d35c7c18.js → p-2c3cdfa3.js} +2 -2
- package/dist/core/{p-d35c7c18.js.map → p-2c3cdfa3.js.map} +1 -1
- package/dist/core/{p-5fe96107.entry.js → p-2f31bb92.entry.js} +2 -2
- package/dist/core/{p-8c90110a.entry.js → p-31fdb740.entry.js} +2 -2
- package/dist/core/p-40ba5a51.entry.js +2 -0
- package/dist/core/p-40ba5a51.entry.js.map +1 -0
- package/dist/core/p-4f0178a7.entry.js +2 -0
- package/dist/core/{p-d5c99ec3.entry.js.map → p-4f0178a7.entry.js.map} +1 -1
- package/dist/core/{p-9d540656.entry.js → p-56d01bdb.entry.js} +2 -2
- package/dist/core/p-5d6750ea.entry.js +2 -0
- package/dist/core/p-5d6750ea.entry.js.map +1 -0
- package/dist/core/{p-776671cf.entry.js → p-655df7fe.entry.js} +2 -2
- package/dist/core/{p-1b7d426b.entry.js → p-65a8c1d6.entry.js} +2 -2
- package/dist/core/{p-a6447b13.entry.js → p-6e32683c.entry.js} +2 -2
- package/dist/core/{p-5e2e6c3b.entry.js → p-70b48a14.entry.js} +2 -2
- package/dist/core/{p-76d26018.entry.js → p-7373beb0.entry.js} +2 -2
- package/dist/core/{p-1832f4b5.entry.js → p-75a2cdac.entry.js} +2 -2
- package/dist/core/{p-8ab12a15.entry.js → p-7c0f24b6.entry.js} +2 -2
- package/dist/core/{p-98448bdb.entry.js → p-8f1aa87d.entry.js} +2 -2
- package/dist/core/{p-e74f1d09.entry.js → p-95374ba1.entry.js} +2 -2
- package/dist/core/{p-06ae5bec.entry.js → p-98c8d46a.entry.js} +2 -2
- package/dist/core/{p-f55ad6ae.entry.js → p-9f9b3151.entry.js} +2 -2
- package/dist/core/{p-4f1ffa39.entry.js → p-a16c6ff3.entry.js} +2 -2
- package/dist/core/{p-5392bca0.entry.js → p-a22fd338.entry.js} +2 -2
- package/dist/core/{p-85609bdd.entry.js → p-a6e9a8e7.entry.js} +2 -2
- package/dist/core/p-b1e3f20a.entry.js +2 -0
- package/dist/core/{p-8ea47d42.entry.js.map → p-b1e3f20a.entry.js.map} +1 -1
- package/dist/core/{p-5759d771.entry.js → p-b1e646e4.entry.js} +2 -2
- package/dist/core/{p-d3856ed3.entry.js → p-b3ce9fe4.entry.js} +2 -2
- package/dist/core/{p-33679c06.entry.js → p-c680c7f9.entry.js} +2 -2
- package/dist/core/p-cd799087.js.map +1 -1
- package/dist/core/{p-0939ce92.entry.js → p-ce898d90.entry.js} +2 -2
- package/dist/core/p-d184d9e2.entry.js +2 -0
- package/dist/core/p-d184d9e2.entry.js.map +1 -0
- package/dist/core/{p-16f67397.entry.js → p-df5d7aa4.entry.js} +2 -2
- package/dist/core/{p-9d01a7ad.entry.js → p-df63896a.entry.js} +2 -2
- package/dist/core/{p-62e22508.entry.js → p-e21083c8.entry.js} +2 -2
- package/dist/core/{p-47ac6838.entry.js → p-e2155d7f.entry.js} +2 -2
- package/dist/core/{p-caf857de.entry.js → p-e33bdca9.entry.js} +2 -2
- package/dist/core/{p-3745da83.entry.js → p-e9e7a7f9.entry.js} +2 -2
- package/dist/core/{p-c7820c23.entry.js → p-ee09f1b3.entry.js} +2 -2
- package/dist/core/{p-f91527a0.entry.js → p-eeacd610.entry.js} +2 -2
- package/dist/core/{p-6c0e2ceb.entry.js → p-f24c9356.entry.js} +2 -2
- package/dist/core/p-f5d5f0be.entry.js +2 -0
- package/dist/core/p-f5d5f0be.entry.js.map +1 -0
- package/dist/core/{p-d32692e2.entry.js → p-f62cd6d2.entry.js} +2 -2
- package/dist/core/{p-ae422058.entry.js → p-fb58d1d1.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-7aa21b0a.js → helpers-b5f64263.js} +2 -2
- package/dist/esm/{helpers-7aa21b0a.js.map → helpers-b5f64263.js.map} +1 -1
- package/dist/esm/helpers-f328a7b6.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-date-input.entry.js +24 -8
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +3 -3
- package/dist/esm/ic-date-picker.entry.js.map +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_4.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-menu.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_4.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-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-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/esm/loader.js +1 -1
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +6 -0
- package/dist/types/components.d.ts +1 -0
- package/dist/types/utils/helpers.d.ts +1 -0
- package/hydrate/index.js +46 -20
- package/package.json +3 -3
- package/dist/core/p-36508aad.entry.js +0 -2
- package/dist/core/p-36508aad.entry.js.map +0 -1
- package/dist/core/p-550a5674.entry.js +0 -2
- package/dist/core/p-550a5674.entry.js.map +0 -1
- package/dist/core/p-8ea47d42.entry.js +0 -2
- package/dist/core/p-d5c99ec3.entry.js +0 -2
- package/dist/core/p-e5d76564.entry.js +0 -2
- package/dist/core/p-e5d76564.entry.js.map +0 -1
- package/dist/core/p-e84b0310.entry.js +0 -2
- package/dist/core/p-e84b0310.entry.js.map +0 -1
- /package/dist/core/{p-ca8cbd6a.entry.js.map → p-0080bbce.entry.js.map} +0 -0
- /package/dist/core/{p-6690bc04.entry.js.map → p-02d0ecd2.entry.js.map} +0 -0
- /package/dist/core/{p-a0f9b259.entry.js.map → p-0388b484.entry.js.map} +0 -0
- /package/dist/core/{p-982a6e88.entry.js.map → p-06aef486.entry.js.map} +0 -0
- /package/dist/core/{p-1ce75941.entry.js.map → p-0b32ba5b.entry.js.map} +0 -0
- /package/dist/core/{p-d4fdd8c1.entry.js.map → p-170f6408.entry.js.map} +0 -0
- /package/dist/core/{p-2c1fecb9.entry.js.map → p-1857e9a7.entry.js.map} +0 -0
- /package/dist/core/{p-a42c2f37.entry.js.map → p-1f1b4b8b.entry.js.map} +0 -0
- /package/dist/core/{p-2e2e0099.entry.js.map → p-21da96a9.entry.js.map} +0 -0
- /package/dist/core/{p-b306cbc8.entry.js.map → p-221d03e1.entry.js.map} +0 -0
- /package/dist/core/{p-7cecf5d5.entry.js.map → p-23a13636.entry.js.map} +0 -0
- /package/dist/core/{p-86012178.entry.js.map → p-25a458bf.entry.js.map} +0 -0
- /package/dist/core/{p-5fe96107.entry.js.map → p-2f31bb92.entry.js.map} +0 -0
- /package/dist/core/{p-8c90110a.entry.js.map → p-31fdb740.entry.js.map} +0 -0
- /package/dist/core/{p-9d540656.entry.js.map → p-56d01bdb.entry.js.map} +0 -0
- /package/dist/core/{p-776671cf.entry.js.map → p-655df7fe.entry.js.map} +0 -0
- /package/dist/core/{p-1b7d426b.entry.js.map → p-65a8c1d6.entry.js.map} +0 -0
- /package/dist/core/{p-a6447b13.entry.js.map → p-6e32683c.entry.js.map} +0 -0
- /package/dist/core/{p-5e2e6c3b.entry.js.map → p-70b48a14.entry.js.map} +0 -0
- /package/dist/core/{p-76d26018.entry.js.map → p-7373beb0.entry.js.map} +0 -0
- /package/dist/core/{p-1832f4b5.entry.js.map → p-75a2cdac.entry.js.map} +0 -0
- /package/dist/core/{p-8ab12a15.entry.js.map → p-7c0f24b6.entry.js.map} +0 -0
- /package/dist/core/{p-98448bdb.entry.js.map → p-8f1aa87d.entry.js.map} +0 -0
- /package/dist/core/{p-e74f1d09.entry.js.map → p-95374ba1.entry.js.map} +0 -0
- /package/dist/core/{p-06ae5bec.entry.js.map → p-98c8d46a.entry.js.map} +0 -0
- /package/dist/core/{p-f55ad6ae.entry.js.map → p-9f9b3151.entry.js.map} +0 -0
- /package/dist/core/{p-4f1ffa39.entry.js.map → p-a16c6ff3.entry.js.map} +0 -0
- /package/dist/core/{p-5392bca0.entry.js.map → p-a22fd338.entry.js.map} +0 -0
- /package/dist/core/{p-85609bdd.entry.js.map → p-a6e9a8e7.entry.js.map} +0 -0
- /package/dist/core/{p-5759d771.entry.js.map → p-b1e646e4.entry.js.map} +0 -0
- /package/dist/core/{p-d3856ed3.entry.js.map → p-b3ce9fe4.entry.js.map} +0 -0
- /package/dist/core/{p-33679c06.entry.js.map → p-c680c7f9.entry.js.map} +0 -0
- /package/dist/core/{p-0939ce92.entry.js.map → p-ce898d90.entry.js.map} +0 -0
- /package/dist/core/{p-16f67397.entry.js.map → p-df5d7aa4.entry.js.map} +0 -0
- /package/dist/core/{p-9d01a7ad.entry.js.map → p-df63896a.entry.js.map} +0 -0
- /package/dist/core/{p-62e22508.entry.js.map → p-e21083c8.entry.js.map} +0 -0
- /package/dist/core/{p-47ac6838.entry.js.map → p-e2155d7f.entry.js.map} +0 -0
- /package/dist/core/{p-caf857de.entry.js.map → p-e33bdca9.entry.js.map} +0 -0
- /package/dist/core/{p-3745da83.entry.js.map → p-e9e7a7f9.entry.js.map} +0 -0
- /package/dist/core/{p-c7820c23.entry.js.map → p-ee09f1b3.entry.js.map} +0 -0
- /package/dist/core/{p-f91527a0.entry.js.map → p-eeacd610.entry.js.map} +0 -0
- /package/dist/core/{p-6c0e2ceb.entry.js.map → p-f24c9356.entry.js.map} +0 -0
- /package/dist/core/{p-d32692e2.entry.js.map → p-f62cd6d2.entry.js.map} +0 -0
- /package/dist/core/{p-ae422058.entry.js.map → p-fb58d1d1.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-93509377.js';
|
2
|
-
import { i as isSlotUsed } from './helpers-
|
2
|
+
import { i as isSlotUsed } from './helpers-b5f64263.js';
|
3
3
|
import { C as Chevron } from './chevron-icon-875b7af2.js';
|
4
4
|
import './types-f605c21c.js';
|
5
5
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-93509377.js';
|
2
2
|
import { c as closeIcon } from './close-icon-c9e09475.js';
|
3
|
-
import { V as VARIANT_ICONS, i as isSlotUsed } from './helpers-
|
3
|
+
import { V as VARIANT_ICONS, i as isSlotUsed } from './helpers-b5f64263.js';
|
4
4
|
import { I as IcThemeForegroundEnum } from './types-f605c21c.js';
|
5
5
|
|
6
6
|
const icAlertCss = "/*! 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}.container{min-height:3.5rem;border-radius:var(--ic-border-radius);position:relative;display:flex;align-items:center}.container-neutral{background-color:var(--ic-status-unknown-light)}.container-info{background-color:var(--ic-status-info-light)}.container-warning{background-color:var(--ic-status-warning-light)}.container-error{background-color:var(--ic-status-error-light)}.container-success{background-color:var(--ic-status-success-light)}.alert-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}.divider-neutral{background-color:var(--ic-status-unknown)}.divider-info{background-color:var(--ic-status-info)}.divider-warning{background-color:var(--ic-status-warning)}.divider-error{background-color:var(--ic-status-error)}.divider-success{background-color:var(--ic-status-success)}.alert-icon{height:var(--ic-space-lg);width:1.375rem;margin-left:1.125rem}.alert-icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}.icon-neutral>svg{fill:var(--ic-status-unknown)}:host([variant=\"info\"]) .alert-icon svg{fill:var(--ic-status-info)}:host([variant=\"warning\"]) .alert-icon svg{fill:var(--ic-status-warning)}:host([variant=\"error\"]) .alert-icon svg{fill:var(--ic-status-error)}:host([variant=\"success\"]) .alert-icon svg{fill:var(--ic-status-success)}.alert-content{display:flex;align-items:center;margin-left:0.625rem;width:100%}.alert-message{display:flex;align-items:center;padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;flex:1}.alert-message-title-above{display:inline}.alert-title{margin-right:var(--ic-space-xs)}.alert-title-above{white-space:normal}.alert-action-container{margin-right:var(--ic-space-xs);display:flex;align-items:center}.dismiss-icon{margin-right:var(--ic-space-xxxs);margin-left:-0.375rem;padding:0.375rem;border:none;border-radius:50%;background-color:inherit;display:flex;align-items:center;justify-content:center}.dismiss-icon:hover{cursor:pointer}@media (max-width: 628px){.alert-content{display:flex;flex-direction:column;align-items:flex-start}.alert-message{display:flex;flex-direction:column;align-items:flex-start}.alert-title{white-space:normal}.alert-action-container{margin-bottom:var(--ic-space-xs)}}@media (forced-colors: active){.container{border:var(--ic-hc-border)}}";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-93509377.js';
|
2
|
-
import { o as onComponentPropUndefinedChange, a as onComponentRequiredPropUndefined } from './helpers-
|
2
|
+
import { o as onComponentPropUndefinedChange, a as onComponentRequiredPropUndefined } from './helpers-b5f64263.js';
|
3
3
|
import './types-f605c21c.js';
|
4
4
|
|
5
5
|
const ArrowUpward = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" aria-hidden="true">
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-93509377.js';
|
2
2
|
import { I as IcThemeForegroundEnum } from './types-f605c21c.js';
|
3
|
-
import { h as hexToRgba, r as rgbaStrToObj, g as getCssProperty, b as getParentElement, c as
|
3
|
+
import { h as hexToRgba, r as rgbaStrToObj, g as getCssProperty, b as getParentElement, c as isPropDefined, a as onComponentRequiredPropUndefined, d as getParentElementType } from './helpers-b5f64263.js';
|
4
4
|
|
5
5
|
const icBadgeCss = "@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)}}";
|
6
6
|
|
7
7
|
const Badge = class {
|
8
8
|
constructor(hostRef) {
|
9
9
|
registerInstance(this, hostRef);
|
10
|
+
this.ariaLabel = null;
|
10
11
|
this.setBadgeColour = () => {
|
11
12
|
let colorRGBA = null;
|
12
13
|
if (this.customColor !== null) {
|
@@ -89,13 +90,22 @@ const Badge = class {
|
|
89
90
|
}
|
90
91
|
return label;
|
91
92
|
};
|
93
|
+
// Set aria-label on badge and / or parent element
|
94
|
+
// Aria-describedby seems to not work, probably due to shadow DOM
|
92
95
|
this.setAccessibleLabel = () => {
|
96
|
+
const parentElType = getParentElementType(this.el);
|
97
|
+
const parentElAriaLabel = getParentElement(this.el).ariaLabel;
|
98
|
+
const defaultAriaLabel = this.isAccessibleLabelDefined()
|
99
|
+
? this.accessibleLabel
|
100
|
+
: this.textLabel || "with badge being displayed";
|
93
101
|
if (getParentElement(this.el) !== null) {
|
94
|
-
if (
|
95
|
-
|
102
|
+
if (parentElType !== "IC-CARD" &&
|
103
|
+
(parentElType !== "IC-TAB" ||
|
104
|
+
(parentElType === "IC-TAB" && parentElAriaLabel))) {
|
105
|
+
getParentElement(this.el).ariaLabel = `${parentElAriaLabel ? `${parentElAriaLabel} ,` : ""} ${defaultAriaLabel}`;
|
96
106
|
}
|
97
107
|
else {
|
98
|
-
|
108
|
+
this.ariaLabel = `, ${defaultAriaLabel}`;
|
99
109
|
}
|
100
110
|
}
|
101
111
|
};
|
@@ -115,7 +125,7 @@ const Badge = class {
|
|
115
125
|
componentWillLoad() {
|
116
126
|
this.variant === "custom" && this.setBadgeColour();
|
117
127
|
this.getBadgeForeground();
|
118
|
-
this.
|
128
|
+
this.setAccessibleLabel();
|
119
129
|
}
|
120
130
|
componentDidLoad() {
|
121
131
|
this.type === "text" &&
|
@@ -143,9 +153,7 @@ const Badge = class {
|
|
143
153
|
[`foreground-${foregroundColour}`]: foregroundColour !== null,
|
144
154
|
["show"]: visible,
|
145
155
|
["hide"]: !visible,
|
146
|
-
}, id: this.el.id || null, "aria-label": this.
|
147
|
-
? `badge displaying ${this.accessibleLabel}`
|
148
|
-
: "badge being displayed", role: "status" }, type === "icon" && h("slot", { name: "badge-icon" }), type === "text" && (h("ic-typography", { variant: size === "small" ? "badge-small" : "badge" }, this.getTextLabel()))));
|
156
|
+
}, id: this.el.id || null, "aria-label": this.ariaLabel, role: "status" }, type === "icon" && h("slot", { name: "badge-icon" }), type === "text" && (h("ic-typography", { variant: size === "small" ? "badge-small" : "badge" }, this.getTextLabel()))));
|
149
157
|
}
|
150
158
|
static get delegatesFocus() { return true; }
|
151
159
|
get el() { return getElement(this); }
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ic-badge.entry.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,s/FAAs/F;;MCM5/F,KAAK;IACd;;QACI,IAAI,CAAC,cAAc,GAAG;YAClB,IAAI,SAAS,GAAG,IAAI,CAAC;YACrB,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,EAAE;gBAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC/C,IAAI,SAAS,KAAK,GAAG,EAAE;oBACnB,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBAC3C;qBACI,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,GAAG,EAAE;oBACtC,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBAC9C;gBACD,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;gBACjC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,GAAG,QAAQ,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC;aACtJ;SACJ,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG;YACtB,IAAI,GAAG,CAAC;YACR,IAAI,KAAK,CAAC;YACV,IAAI,IAAI,CAAC;YACT,QAAQ,IAAI,CAAC,OAAO;gBAChB,KAAK,QAAQ;oBACT,GAAG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IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;KACxB;IACD,MAAM;QACF,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAC1E,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE;gBACjB,CAAC,GAAG,QAAQ,EAAE,GAAG,IAAI;gBACrB,CAAC,GAAG,IAAI,EAAE,GAAG,IAAI;gBACjB,CAAC,GAAG,OAAO,EAAE,GAAG,IAAI;gBACpB,CAAC,GAAG,IAAI,EAAE,GAAG,IAAI;gBACjB,CAAC,cAAc,gBAAgB,EAAE,GAAG,gBAAgB,KAAK,IAAI;gBAC7D,CAAC,MAAM,GAAG,OAAO;gBACjB,CAAC,MAAM,GAAG,CAAC,OAAO;aACrB,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,wBAAwB,EAAE;kBAClE,oBAAoB,IAAI,CAAC,eAAe,EAAE;kBAC1C,uBAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,KAAK,MAAM,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,KAAK,MAAM,KAAK,CAAC,CAAC,eAAe,EAAE,EAAE,OAAO,EAAE,IAAI,KAAK,OAAO,GAAG,aAAa,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE;KACtO;IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-badge/ic-badge.css?tag=ic-badge&encapsulation=shadow","../web-components/dist/collection/components/ic-badge/ic-badge.js"],"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: -moz-fit-content;\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 { Host, h } from \"@stencil/core\";\nimport { IcThemeForegroundEnum, } from \"../../utils/types\";\nimport { getCssProperty, getParentElement, getParentElementType, hexToRgba, isPropDefined, onComponentRequiredPropUndefined, rgbaStrToObj, } from \"../../utils/helpers\";\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\nexport class Badge {\n constructor() {\n this.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 }\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 this.getBadgeForeground = () => {\n let red;\n let green;\n let blue;\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 const brightness = (red * 299 + green * 587 + blue * 114) / 1000;\n this.foregroundColour =\n brightness > 133.3505\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n };\n this.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 }\n else {\n label = this.textLabel;\n }\n }\n return label;\n };\n this.setAccessibleLabel = () => {\n if (getParentElement(this.el) !== null) {\n if (getParentElementType(this.el) === \"IC-TAB\") {\n getParentElement(this.el).setAttribute(\"aria-describedby\", \"badge\");\n }\n else {\n getParentElement(this.el).ariaLabel = `badge displaying ${this.accessibleLabel}`;\n }\n }\n };\n this.isAccessibleLabelDefined = () => {\n return isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n };\n this.accessibleLabel = undefined;\n this.customColor = null;\n this.maxNumber = undefined;\n this.position = \"far\";\n this.size = \"default\";\n this.textLabel = undefined;\n this.type = \"text\";\n this.variant = \"neutral\";\n this.visible = true;\n }\n componentWillLoad() {\n this.variant === \"custom\" && this.setBadgeColour();\n this.getBadgeForeground();\n this.isAccessibleLabelDefined() && this.setAccessibleLabel();\n }\n componentDidLoad() {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined([{ prop: this.textLabel, propName: \"text-label\" }], \"Badge\");\n }\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n async showBadge() {\n this.visible = true;\n }\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n async hideBadge() {\n this.visible = false;\n }\n render() {\n const { position, size, type, variant, foregroundColour, visible } = this;\n return (h(Host, { 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 }, id: this.el.id || null, \"aria-label\": this.isAccessibleLabelDefined()\n ? `badge displaying ${this.accessibleLabel}`\n : \"badge being displayed\", role: \"status\" }, type === \"icon\" && h(\"slot\", { name: \"badge-icon\" }), type === \"text\" && (h(\"ic-typography\", { variant: size === \"small\" ? \"badge-small\" : \"badge\" }, this.getTextLabel()))));\n }\n static get is() { return \"ic-badge\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-badge.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-badge.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label of the badge component to provide context for screen reader users.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false\n },\n \"customColor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcColor\",\n \"resolved\": \"`#${string}` | `rgb(${string})` | `rgba(${string})`\",\n \"references\": {\n \"IcColor\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcColor\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The custom badge colour. This will only style the badge component if variant=\\\"custom\\\".\\nCan 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 \"attribute\": \"custom-color\",\n \"reflect\": false,\n \"defaultValue\": \"null\"\n },\n \"maxNumber\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The maximum number shown on the badge appended with a +.\\nThis will only be displayed if type=\\\"text\\\" and textLabel is not empty.\"\n },\n \"attribute\": \"max-number\",\n \"reflect\": false\n },\n \"position\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgePositions\",\n \"resolved\": \"\\\"far\\\" | \\\"inline\\\" | \\\"near\\\"\",\n \"references\": {\n \"IcBadgePositions\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgePositions\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The positioning of the badge in reference to the parent element.\"\n },\n \"attribute\": \"position\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"far\\\"\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"default\\\" | \\\"large\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the badge to be displayed.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"textLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The text displayed in the badge. This will only be displayed if type=\\\"text\\\".\"\n },\n \"attribute\": \"text-label\",\n \"reflect\": false\n },\n \"type\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgeTypes\",\n \"resolved\": \"\\\"dot\\\" | \\\"icon\\\" | \\\"text\\\"\",\n \"references\": {\n \"IcBadgeTypes\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgeTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The type of badge to be displayed.\"\n },\n \"attribute\": \"type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"text\\\"\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgeVariants\",\n \"resolved\": \"\\\"custom\\\" | \\\"error\\\" | \\\"info\\\" | \\\"light\\\" | \\\"neutral\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {\n \"IcBadgeVariants\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgeVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the badge to be displayed.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"neutral\\\"\"\n },\n \"visible\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the badge will be displayed.\"\n },\n \"attribute\": \"visible\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n }\n };\n }\n static get methods() {\n return {\n \"showBadge\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This method should not be used anymore. Use visible prop to set badge visibility.\"\n }]\n }\n },\n \"hideBadge\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This method should not be used anymore. Use visible prop to set badge visibility.\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=ic-badge.js.map\n"],"version":3}
|
1
|
+
{"file":"ic-badge.entry.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,s/FAAs/F;;MCM5/F,KAAK;IACd;;QACI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG;YAClB,IAAI,SAAS,GAAG,IAAI,CAAC;YACrB,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,EAAE;gBAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC/C,IAAI,SAAS,KAAK,GAAG,EAAE;oBACnB,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBAC3C;qBACI,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,GAAG,EAAE;oBACtC,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBAC9C;gBACD,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;gBACjC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,GAAG,QAAQ,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC;aACtJ;SACJ,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG;YACtB,IAAI,GAAG,CAAC;YACR,IAAI,KAAK,CAAC;YACV,IAAI,IAAI,CAAC;YACT,QAAQ,IAAI,CAAC,OAAO;gBAChB,KAAK,QAAQ;oBACT,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAA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E;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-badge/ic-badge.css?tag=ic-badge&encapsulation=shadow","../web-components/dist/collection/components/ic-badge/ic-badge.js"],"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: -moz-fit-content;\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 { Host, h } from \"@stencil/core\";\nimport { IcThemeForegroundEnum, } from \"../../utils/types\";\nimport { getCssProperty, getParentElement, getParentElementType, hexToRgba, isPropDefined, onComponentRequiredPropUndefined, rgbaStrToObj, } from \"../../utils/helpers\";\n/**\n * @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.\n */\nexport class Badge {\n constructor() {\n this.ariaLabel = null;\n this.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 }\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 this.getBadgeForeground = () => {\n let red;\n let green;\n let blue;\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 const brightness = (red * 299 + green * 587 + blue * 114) / 1000;\n this.foregroundColour =\n brightness > 133.3505\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\n };\n this.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 }\n else {\n label = this.textLabel;\n }\n }\n return label;\n };\n // Set aria-label on badge and / or parent element\n // Aria-describedby seems to not work, probably due to shadow DOM\n this.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 if (getParentElement(this.el) !== null) {\n if (parentElType !== \"IC-CARD\" &&\n (parentElType !== \"IC-TAB\" ||\n (parentElType === \"IC-TAB\" && parentElAriaLabel))) {\n getParentElement(this.el).ariaLabel = `${parentElAriaLabel ? `${parentElAriaLabel} ,` : \"\"} ${defaultAriaLabel}`;\n }\n else {\n this.ariaLabel = `, ${defaultAriaLabel}`;\n }\n }\n };\n this.isAccessibleLabelDefined = () => {\n return isPropDefined(this.accessibleLabel) && this.accessibleLabel !== null;\n };\n this.accessibleLabel = undefined;\n this.customColor = null;\n this.maxNumber = undefined;\n this.position = \"far\";\n this.size = \"default\";\n this.textLabel = undefined;\n this.type = \"text\";\n this.variant = \"neutral\";\n this.visible = true;\n }\n componentWillLoad() {\n this.variant === \"custom\" && this.setBadgeColour();\n this.getBadgeForeground();\n this.setAccessibleLabel();\n }\n componentDidLoad() {\n this.type === \"text\" &&\n onComponentRequiredPropUndefined([{ prop: this.textLabel, propName: \"text-label\" }], \"Badge\");\n }\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n async showBadge() {\n this.visible = true;\n }\n /**\n * @deprecated This method should not be used anymore. Use visible prop to set badge visibility.\n */\n async hideBadge() {\n this.visible = false;\n }\n render() {\n const { position, size, type, variant, foregroundColour, visible } = this;\n return (h(Host, { 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 }, id: this.el.id || null, \"aria-label\": this.ariaLabel, role: \"status\" }, type === \"icon\" && h(\"slot\", { name: \"badge-icon\" }), type === \"text\" && (h(\"ic-typography\", { variant: size === \"small\" ? \"badge-small\" : \"badge\" }, this.getTextLabel()))));\n }\n static get is() { return \"ic-badge\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-badge.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-badge.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label of the badge component to provide context for screen reader users.\"\n },\n \"attribute\": \"accessible-label\",\n \"reflect\": false\n },\n \"customColor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcColor\",\n \"resolved\": \"`#${string}` | `rgb(${string})` | `rgba(${string})`\",\n \"references\": {\n \"IcColor\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcColor\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The custom badge colour. This will only style the badge component if variant=\\\"custom\\\".\\nCan 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 \"attribute\": \"custom-color\",\n \"reflect\": false,\n \"defaultValue\": \"null\"\n },\n \"maxNumber\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The maximum number shown on the badge appended with a +.\\nThis will only be displayed if type=\\\"text\\\" and textLabel is not empty.\"\n },\n \"attribute\": \"max-number\",\n \"reflect\": false\n },\n \"position\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgePositions\",\n \"resolved\": \"\\\"far\\\" | \\\"inline\\\" | \\\"near\\\"\",\n \"references\": {\n \"IcBadgePositions\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgePositions\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The positioning of the badge in reference to the parent element.\"\n },\n \"attribute\": \"position\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"far\\\"\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"default\\\" | \\\"large\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the badge to be displayed.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"textLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The text displayed in the badge. This will only be displayed if type=\\\"text\\\".\"\n },\n \"attribute\": \"text-label\",\n \"reflect\": false\n },\n \"type\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgeTypes\",\n \"resolved\": \"\\\"dot\\\" | \\\"icon\\\" | \\\"text\\\"\",\n \"references\": {\n \"IcBadgeTypes\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgeTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The type of badge to be displayed.\"\n },\n \"attribute\": \"type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"text\\\"\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBadgeVariants\",\n \"resolved\": \"\\\"custom\\\" | \\\"error\\\" | \\\"info\\\" | \\\"light\\\" | \\\"neutral\\\" | \\\"success\\\" | \\\"warning\\\"\",\n \"references\": {\n \"IcBadgeVariants\": {\n \"location\": \"import\",\n \"path\": \"./ic-badge.types\",\n \"id\": \"src/components/ic-badge/ic-badge.types.ts::IcBadgeVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the badge to be displayed.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"neutral\\\"\"\n },\n \"visible\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the badge will be displayed.\"\n },\n \"attribute\": \"visible\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n }\n };\n }\n static get methods() {\n return {\n \"showBadge\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This method should not be used anymore. Use visible prop to set badge visibility.\"\n }]\n }\n },\n \"hideBadge\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This method should not be used anymore. Use visible prop to set badge visibility.\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=ic-badge.js.map\n"],"version":3}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-93509377.js';
|
2
|
-
import { D as DEVICE_SIZES, e as getCurrentDeviceSize, f as checkResizeObserver } from './helpers-
|
2
|
+
import { D as DEVICE_SIZES, e as getCurrentDeviceSize, f as checkResizeObserver } from './helpers-b5f64263.js';
|
3
3
|
import './types-f605c21c.js';
|
4
4
|
|
5
5
|
const icBreadcrumbGroupCss = ":host{display:block}:host ol{display:flex;list-style-type:none;align-items:center;flex-wrap:wrap;padding:0;margin:0}:host(.back) ol ::slotted(ic-breadcrumb){display:none}:host(.back) ol ::slotted(ic-breadcrumb.show){display:flex}:host(.collapsed) ol ::slotted(ic-breadcrumb.hide){display:none;opacity:0;visibility:hidden}:host(.collapsed) ol ::slotted(ic-breadcrumb.visuallyhidden){display:block;opacity:0;transition:all var(--ic-easing-transition-slow)}:host(.collapsed) ol ::slotted(ic-breadcrumb.fade){opacity:1}";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-93509377.js';
|
2
2
|
import { C as Chevron } from './chevron-icon-875b7af2.js';
|
3
|
-
import { i as isSlotUsed,
|
3
|
+
import { i as isSlotUsed, c as isPropDefined } from './helpers-b5f64263.js';
|
4
4
|
import './types-f605c21c.js';
|
5
5
|
|
6
6
|
const backIcon = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-93509377.js';
|
2
|
-
import { x as IC_INHERITED_ARIA, T as renderFileHiddenInput, j as removeDisabledFalse, w as inheritAttributes, k as getThemeFromContext, i as isSlotUsed,
|
2
|
+
import { x as IC_INHERITED_ARIA, T as renderFileHiddenInput, j as removeDisabledFalse, w as inheritAttributes, k as getThemeFromContext, i as isSlotUsed, c as isPropDefined, a as onComponentRequiredPropUndefined } from './helpers-b5f64263.js';
|
3
3
|
import { I as IcThemeForegroundEnum } from './types-f605c21c.js';
|
4
4
|
import { c as createPopper } from './popper-b8cc3f16.js';
|
5
5
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-93509377.js';
|
2
|
-
import { j as removeDisabledFalse, i as isSlotUsed, a as onComponentRequiredPropUndefined, k as getThemeFromContext } from './helpers-
|
2
|
+
import { j as removeDisabledFalse, i as isSlotUsed, a as onComponentRequiredPropUndefined, k as getThemeFromContext } from './helpers-b5f64263.js';
|
3
3
|
import { I as IcThemeForegroundEnum } from './types-f605c21c.js';
|
4
4
|
import { C as Chevron } from './chevron-icon-875b7af2.js';
|
5
5
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-93509377.js';
|
2
|
-
import { j as removeDisabledFalse, a as onComponentRequiredPropUndefined, q as getInputDescribedByText, s as hasValidationStatus } from './helpers-
|
2
|
+
import { j as removeDisabledFalse, a as onComponentRequiredPropUndefined, q as getInputDescribedByText, s as hasValidationStatus } from './helpers-b5f64263.js';
|
3
3
|
import './types-f605c21c.js';
|
4
4
|
|
5
5
|
const icCheckboxGroupCss = "/*! 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}ic-input-label.error{color:var(--ic-status-error)}ic-input-label ic-typography{margin-bottom:var(--ic-space-sm)}:host(.small) ic-input-label ic-typography{margin-bottom:calc(var(--ic-space-sm) / 2)}ic-input-validation{margin-top:var(--ic-space-sm)}:host(.small) ic-input-validation{margin-top:calc(var(--ic-space-sm) / 2)}.checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxs))}:host(.small) .checkboxes-container{margin-bottom:calc(-1 * var(--ic-space-xxxs))}.screen-reader-only-text{position:absolute;left:-9999px;background-color:#fff;color:#000;text-transform:none}";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-93509377.js';
|
2
|
-
import { j as removeDisabledFalse, l as addFormResetListener, a as onComponentRequiredPropUndefined, m as removeFormResetListener, n as renderHiddenInput, p as removeHiddenInput, i as isSlotUsed,
|
2
|
+
import { j as removeDisabledFalse, l as addFormResetListener, a as onComponentRequiredPropUndefined, m as removeFormResetListener, n as renderHiddenInput, p as removeHiddenInput, i as isSlotUsed, c as isPropDefined } from './helpers-b5f64263.js';
|
3
3
|
import './types-f605c21c.js';
|
4
4
|
|
5
5
|
const icCheckboxCss = "/*! 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}}";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-93509377.js';
|
2
|
-
import { j as removeDisabledFalse, a as onComponentRequiredPropUndefined, i as isSlotUsed } from './helpers-
|
2
|
+
import { j as removeDisabledFalse, a as onComponentRequiredPropUndefined, i as isSlotUsed } from './helpers-b5f64263.js';
|
3
3
|
import './types-f605c21c.js';
|
4
4
|
|
5
5
|
const dismissIcon = `<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-93509377.js';
|
2
|
-
import { i as isSlotUsed, D as DEVICE_SIZES, e as getCurrentDeviceSize, t as slotHasContent, f as checkResizeObserver } from './helpers-
|
2
|
+
import { i as isSlotUsed, D as DEVICE_SIZES, e as getCurrentDeviceSize, t as slotHasContent, f as checkResizeObserver } from './helpers-b5f64263.js';
|
3
3
|
import './types-f605c21c.js';
|
4
4
|
|
5
5
|
const icDataRowCss = "/*! 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:relative;display:block}.data{display:flex;align-items:center}.text-cells{display:flex;flex-grow:1;min-width:0}.label{width:12.5rem;min-width:12.5rem;margin-right:var(--ic-space-md);color:var(--ic-color-tertiary-text)}.value{flex-grow:1}slot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label]){margin-top:calc(var(--ic-space-xs) * -1)}slot[name=\"value\"]::slotted(ic-text-field[small][readonly][hide-label]){margin-top:calc(var(--ic-space-xxs) * -1)}slot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows]){margin-top:calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs))}.end-component{width:-moz-fit-content;width:fit-content;margin-left:3.5rem}.divider{margin-top:var(--ic-space-md);height:var(--ic-border-width);background-color:var(--ic-architectural-300)}:host(.small) .divider{margin-top:var(--ic-space-xs)}:host(.breakpoint-medium) .label{width:10rem;min-width:10rem}:host(.breakpoint-xs) .text-cells{flex-direction:column}:host(.breakpoint-xs) .label{width:8rem;margin-bottom:var(--ic-space-xs)}:host(.breakpoint-xs) .value{max-width:95%}:host(.breakpoint-xs) .end-component{margin-left:0}@media (forced-colors: active){.divider{background-color:canvastext}}";
|
@@ -40,6 +40,7 @@ const DateInput = class {
|
|
40
40
|
this.KEYBOARD_EVENT_OBJECT_STRING = "[object KeyboardEvent]";
|
41
41
|
this.MAX_DAY = 31;
|
42
42
|
this.MAX_MONTH = 12;
|
43
|
+
this.previousEmittedDate = undefined;
|
43
44
|
this.previousSelectedDate = null;
|
44
45
|
this.selectedDate = null;
|
45
46
|
this.setInputPasteValue = (input, pastedValue) => {
|
@@ -666,7 +667,8 @@ const DateInput = class {
|
|
666
667
|
this.icBlur.emit({ value: this.selectedDate });
|
667
668
|
};
|
668
669
|
this.handleHostFocus = () => {
|
669
|
-
|
670
|
+
var _a;
|
671
|
+
if ((_a = this.el.shadowRoot.activeElement) === null || _a === void 0 ? void 0 : _a.id.match(/(day|month|year)-input$/)) {
|
670
672
|
this.removeLabelledBy = false;
|
671
673
|
}
|
672
674
|
else {
|
@@ -764,19 +766,16 @@ const DateInput = class {
|
|
764
766
|
this.inputsInOrder[0].focus();
|
765
767
|
};
|
766
768
|
this.handleCalendarOpen = (ev) => {
|
769
|
+
var _a, _b;
|
767
770
|
ev.stopImmediatePropagation();
|
768
|
-
this.calendarButtonEl.shadowRoot
|
769
|
-
.querySelector("ic-tooltip")
|
770
|
-
.displayTooltip(false);
|
771
|
+
(_a = this.calendarButtonEl) === null || _a === void 0 ? void 0 : _a.shadowRoot.querySelector("ic-tooltip").displayTooltip(false);
|
771
772
|
this.calendarButtonClicked.emit({ value: this.selectedDate });
|
772
|
-
this.calendarButtonEl.shadowRoot
|
773
|
-
.querySelector("ic-tooltip")
|
774
|
-
.displayTooltip(false);
|
773
|
+
(_b = this.calendarButtonEl) === null || _b === void 0 ? void 0 : _b.shadowRoot.querySelector("ic-tooltip").displayTooltip(false);
|
775
774
|
this.isDateSetFromKeyboardEvent = false;
|
776
775
|
};
|
777
776
|
this.setValueAndEmitChange = (value) => {
|
778
777
|
if (!dateMatches(new Date(this.value), value)) {
|
779
|
-
this.
|
778
|
+
this.emitIcChange(value);
|
780
779
|
this.value = value;
|
781
780
|
}
|
782
781
|
};
|
@@ -799,6 +798,13 @@ const DateInput = class {
|
|
799
798
|
}
|
800
799
|
this.removeLabelledBy = true;
|
801
800
|
};
|
801
|
+
this.emitIcChange = (d) => {
|
802
|
+
if (!(d === null && this.previousEmittedDate === null) &&
|
803
|
+
!dateMatches(d, this.previousEmittedDate)) {
|
804
|
+
this.previousEmittedDate = d;
|
805
|
+
this.icChange.emit({ value: d });
|
806
|
+
}
|
807
|
+
};
|
802
808
|
this.day = "";
|
803
809
|
this.invalidDateText = undefined;
|
804
810
|
this.maxDate = undefined;
|
@@ -858,6 +864,10 @@ const DateInput = class {
|
|
858
864
|
this.watchMaxHandler();
|
859
865
|
if (this.value) {
|
860
866
|
this.setDate(this.value);
|
867
|
+
this.previousEmittedDate = this.selectedDate;
|
868
|
+
}
|
869
|
+
else {
|
870
|
+
this.previousEmittedDate = null;
|
861
871
|
}
|
862
872
|
this.screenReaderInfoId = `${this.inputId}-screen-reader-info`;
|
863
873
|
this.assistiveHintId = `${this.inputId}-assistive-hint`;
|
@@ -928,6 +938,12 @@ const DateInput = class {
|
|
928
938
|
async setDisableDays(days) {
|
929
939
|
this.disableDays = days;
|
930
940
|
}
|
941
|
+
/**
|
942
|
+
* @internal Used to enable other components to invoke an IcChange event from the input.
|
943
|
+
*/
|
944
|
+
async triggerIcChange(d) {
|
945
|
+
this.emitIcChange(d);
|
946
|
+
}
|
931
947
|
removeAriaLabelledBy() {
|
932
948
|
this.inputCompContainerEl.removeAttribute(this.ARIA_LABELLED_BY);
|
933
949
|
}
|