@ukic/web-components 2.27.1 → 2.29.0
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/ic-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +9 -4
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +2 -2
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-text-field.cjs.entry.js +2 -1
- package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast-region.cjs.entry.js +6 -0
- package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-accordion/ic-accordion.css +6 -0
- package/dist/collection/components/ic-alert/ic-alert.css +9 -1
- package/dist/collection/components/ic-alert/ic-alert.js +27 -3
- package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
- package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js +114 -0
- package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js.map +1 -1
- package/dist/collection/components/ic-badge/ic-badge.css +5 -0
- package/dist/collection/components/ic-badge/ic-badge.js +1 -1
- package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.js +1 -1
- package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
- package/dist/collection/components/ic-text-field/ic-text-field.js +20 -1
- package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js +7 -0
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js.map +1 -1
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js +47 -17
- package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js.map +1 -1
- package/dist/collection/components/ic-toast-region/ic-toast-region.js +6 -0
- package/dist/collection/components/ic-toast-region/ic-toast-region.js.map +1 -1
- package/dist/components/ic-accordion.js +1 -1
- package/dist/components/ic-accordion.js.map +1 -1
- package/dist/components/ic-alert2.js +11 -5
- package/dist/components/ic-alert2.js.map +1 -1
- package/dist/components/ic-badge.js +2 -2
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-dialog.js.map +1 -1
- package/dist/components/ic-text-field2.js +3 -1
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-toast-region.js +6 -0
- package/dist/components/ic-toast-region.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-3969d3c0.entry.js +2 -0
- package/dist/core/p-3969d3c0.entry.js.map +1 -0
- package/dist/core/{p-9146a7f9.entry.js → p-4562904d.entry.js} +2 -2
- package/dist/core/p-4562904d.entry.js.map +1 -0
- package/dist/core/p-55b11f6f.entry.js.map +1 -1
- package/dist/core/p-78605899.entry.js +2 -0
- package/dist/core/p-78605899.entry.js.map +1 -0
- package/dist/core/p-9e15d0e1.entry.js +2 -0
- package/dist/core/p-9e15d0e1.entry.js.map +1 -0
- package/dist/core/{p-49e997c7.entry.js → p-b1879a44.entry.js} +2 -2
- package/dist/core/p-b1879a44.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/ic-accordion.entry.js +1 -1
- package/dist/esm/ic-accordion.entry.js.map +1 -1
- package/dist/esm/ic-alert.entry.js +10 -5
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-badge.entry.js +2 -2
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-dialog.entry.js.map +1 -1
- package/dist/esm/ic-text-field.entry.js +2 -1
- package/dist/esm/ic-text-field.entry.js.map +1 -1
- package/dist/esm/ic-toast-region.entry.js +6 -0
- package/dist/esm/ic-toast-region.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-alert/ic-alert.d.ts +5 -0
- package/dist/types/components/ic-dialog/ic-dialog.d.ts +1 -1
- package/dist/types/components/ic-text-field/ic-text-field.d.ts +4 -0
- package/dist/types/components/ic-toast-region/ic-toast-region.d.ts +1 -0
- package/dist/types/components.d.ts +18 -2
- package/hydrate/index.js +23 -8
- package/package.json +2 -2
- package/vscode-data.json +9 -1
- package/dist/core/p-1145e33c.entry.js +0 -2
- package/dist/core/p-1145e33c.entry.js.map +0 -1
- package/dist/core/p-49e997c7.entry.js.map +0 -1
- package/dist/core/p-9146a7f9.entry.js.map +0 -1
- package/dist/core/p-ad67c84f.entry.js +0 -2
- package/dist/core/p-ad67c84f.entry.js.map +0 -1
- package/dist/core/p-f735a277.entry.js +0 -2
- package/dist/core/p-f735a277.entry.js.map +0 -1
@@ -40,7 +40,7 @@ export declare class Dialog {
|
|
40
40
|
*/
|
41
41
|
buttons?: boolean;
|
42
42
|
/**
|
43
|
-
* If set to `
|
43
|
+
* If set to `false`, the dialog will not close when the backdrop is clicked.
|
44
44
|
*/
|
45
45
|
closeOnBackdropClick?: boolean;
|
46
46
|
/**
|
@@ -101,6 +101,10 @@ export declare class TextField {
|
|
101
101
|
* The count of characters in the field. Will display a warning if the bound is reached.
|
102
102
|
*/
|
103
103
|
maxLength: number;
|
104
|
+
/**
|
105
|
+
* The text to display as the validation message when the maximum length is exceeded.
|
106
|
+
*/
|
107
|
+
maxLengthMessage: string;
|
104
108
|
/**
|
105
109
|
* The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)
|
106
110
|
*/
|
@@ -138,6 +138,10 @@ export namespace Components {
|
|
138
138
|
* The main body message of the alert.
|
139
139
|
*/
|
140
140
|
"message"?: string;
|
141
|
+
/**
|
142
|
+
* If `true`, the default icon for the neutral variant will be appear on the left of the alert.
|
143
|
+
*/
|
144
|
+
"showDefaultIcon": boolean;
|
141
145
|
/**
|
142
146
|
* If `true`, the title and message will appear above and below instead of inline.
|
143
147
|
*/
|
@@ -653,7 +657,7 @@ export namespace Components {
|
|
653
657
|
*/
|
654
658
|
"cancelDialog": () => Promise<void>;
|
655
659
|
/**
|
656
|
-
* If set to `
|
660
|
+
* If set to `false`, the dialog will not close when the backdrop is clicked.
|
657
661
|
*/
|
658
662
|
"closeOnBackdropClick"?: boolean;
|
659
663
|
/**
|
@@ -2093,6 +2097,10 @@ export namespace Components {
|
|
2093
2097
|
* The count of characters in the field. Will display a warning if the bound is reached.
|
2094
2098
|
*/
|
2095
2099
|
"maxLength": number;
|
2100
|
+
/**
|
2101
|
+
* The text to display as the validation message when the maximum length is exceeded.
|
2102
|
+
*/
|
2103
|
+
"maxLengthMessage": string;
|
2096
2104
|
/**
|
2097
2105
|
* The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)
|
2098
2106
|
*/
|
@@ -3460,6 +3468,10 @@ declare namespace LocalJSX {
|
|
3460
3468
|
* Is emitted when the user dismisses the alert.
|
3461
3469
|
*/
|
3462
3470
|
"onIcDismiss"?: (event: IcAlertCustomEvent<void>) => void;
|
3471
|
+
/**
|
3472
|
+
* If `true`, the default icon for the neutral variant will be appear on the left of the alert.
|
3473
|
+
*/
|
3474
|
+
"showDefaultIcon"?: boolean;
|
3463
3475
|
/**
|
3464
3476
|
* If `true`, the title and message will appear above and below instead of inline.
|
3465
3477
|
*/
|
@@ -3971,7 +3983,7 @@ declare namespace LocalJSX {
|
|
3971
3983
|
*/
|
3972
3984
|
"buttons"?: boolean;
|
3973
3985
|
/**
|
3974
|
-
* If set to `
|
3986
|
+
* If set to `false`, the dialog will not close when the backdrop is clicked.
|
3975
3987
|
*/
|
3976
3988
|
"closeOnBackdropClick"?: boolean;
|
3977
3989
|
/**
|
@@ -5454,6 +5466,10 @@ declare namespace LocalJSX {
|
|
5454
5466
|
* The count of characters in the field. Will display a warning if the bound is reached.
|
5455
5467
|
*/
|
5456
5468
|
"maxLength"?: number;
|
5469
|
+
/**
|
5470
|
+
* The text to display as the validation message when the maximum length is exceeded.
|
5471
|
+
*/
|
5472
|
+
"maxLengthMessage"?: string;
|
5457
5473
|
/**
|
5458
5474
|
* The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)
|
5459
5475
|
*/
|
package/hydrate/index.js
CHANGED
@@ -8079,7 +8079,7 @@ var chevronIcon = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org
|
|
8079
8079
|
</svg>
|
8080
8080
|
`;
|
8081
8081
|
|
8082
|
-
const icAccordionCss = "/*!@html*/html.sc-ic-accordion{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-accordion{margin:0}/*!@main*/main.sc-ic-accordion{display:block}/*!@h1*/h1.sc-ic-accordion{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-accordion{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-accordion{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-accordion{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-accordion{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-accordion,strong.sc-ic-accordion{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-accordion,kbd.sc-ic-accordion,samp.sc-ic-accordion{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-accordion{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-accordion,sup.sc-ic-accordion{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-accordion{bottom:-0.25em}/*!@sup*/sup.sc-ic-accordion{top:-0.5em}/*!@img*/img.sc-ic-accordion{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-accordion,input.sc-ic-accordion,optgroup.sc-ic-accordion,select.sc-ic-accordion,textarea.sc-ic-accordion{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-accordion,input.sc-ic-accordion{overflow:visible}/*!@button,\nselect*/button.sc-ic-accordion,select.sc-ic-accordion{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-accordion,[type=\"button\"].sc-ic-accordion,[type=\"reset\"].sc-ic-accordion,[type=\"submit\"].sc-ic-accordion{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-accordion::-moz-focus-inner,[type=\"button\"].sc-ic-accordion::-moz-focus-inner,[type=\"reset\"].sc-ic-accordion::-moz-focus-inner,[type=\"submit\"].sc-ic-accordion::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-accordion:-moz-focusring,[type=\"button\"].sc-ic-accordion:-moz-focusring,[type=\"reset\"].sc-ic-accordion:-moz-focusring,[type=\"submit\"].sc-ic-accordion:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-accordion{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-accordion{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-accordion{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-accordion{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-accordion,[type=\"radio\"].sc-ic-accordion{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-accordion::-webkit-inner-spin-button,[type=\"number\"].sc-ic-accordion::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-accordion{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-accordion::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-accordion::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-accordion{display:block}/*!@summary*/summary.sc-ic-accordion{display:list-item}/*!@template*/template.sc-ic-accordion{display:none}/*!@[hidden]*/[hidden].sc-ic-accordion{display:none}/*!@html,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo*/html.sc-ic-accordion,body.sc-ic-accordion,div.sc-ic-accordion,span.sc-ic-accordion,applet.sc-ic-accordion,object.sc-ic-accordion,iframe.sc-ic-accordion,h1.sc-ic-accordion,h2.sc-ic-accordion,h3.sc-ic-accordion,h4.sc-ic-accordion,h5.sc-ic-accordion,h6.sc-ic-accordion,p.sc-ic-accordion,blockquote.sc-ic-accordion,pre.sc-ic-accordion,a.sc-ic-accordion,abbr.sc-ic-accordion,acronym.sc-ic-accordion,address.sc-ic-accordion,big.sc-ic-accordion,cite.sc-ic-accordion,code.sc-ic-accordion,del.sc-ic-accordion,dfn.sc-ic-accordion,em.sc-ic-accordion,img.sc-ic-accordion,ins.sc-ic-accordion,kbd.sc-ic-accordion,q.sc-ic-accordion,s.sc-ic-accordion,samp.sc-ic-accordion,small.sc-ic-accordion,strike.sc-ic-accordion,strong.sc-ic-accordion,sub.sc-ic-accordion,sup.sc-ic-accordion,tt.sc-ic-accordion,var.sc-ic-accordion,b.sc-ic-accordion,u.sc-ic-accordion,i.sc-ic-accordion,center.sc-ic-accordion,dl.sc-ic-accordion,dt.sc-ic-accordion,dd.sc-ic-accordion,ol.sc-ic-accordion,ul.sc-ic-accordion,li.sc-ic-accordion,fieldset.sc-ic-accordion,form.sc-ic-accordion,label.sc-ic-accordion,legend.sc-ic-accordion,table.sc-ic-accordion,caption.sc-ic-accordion,tbody.sc-ic-accordion,tfoot.sc-ic-accordion,thead.sc-ic-accordion,tr.sc-ic-accordion,th.sc-ic-accordion,td.sc-ic-accordion,article.sc-ic-accordion,aside.sc-ic-accordion,canvas.sc-ic-accordion,details.sc-ic-accordion,embed.sc-ic-accordion,figure.sc-ic-accordion,figcaption.sc-ic-accordion,footer.sc-ic-accordion,header.sc-ic-accordion,hgroup.sc-ic-accordion,menu.sc-ic-accordion,nav.sc-ic-accordion,output.sc-ic-accordion,ruby.sc-ic-accordion,section.sc-ic-accordion,summary.sc-ic-accordion,time.sc-ic-accordion,mark.sc-ic-accordion,audio.sc-ic-accordion,video.sc-ic-accordion{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-accordion-h{display:block;border-bottom:var(--ic-border-default)}/*!@:host ic-typography,\n:host .expand-chevron*/.sc-ic-accordion-h ic-typography.sc-ic-accordion,.sc-ic-accordion-h .expand-chevron.sc-ic-accordion{color:var(--ic-color-primary-text)}/*!@:host(.light) ic-typography,\n:host(.light) .expanded-content,\n:host(.light) .icon-container,\n:host(.light) .expand-chevron*/.light.sc-ic-accordion-h ic-typography.sc-ic-accordion,.light.sc-ic-accordion-h .expanded-content.sc-ic-accordion,.light.sc-ic-accordion-h .icon-container.sc-ic-accordion,.light.sc-ic-accordion-h .expand-chevron.sc-ic-accordion{color:var(--ic-color-white-text)}/*!@:host(.disabled) ic-typography,\n:host(.disabled) .icon-container,\n:host(.disabled) .expand-chevron*/.disabled.sc-ic-accordion-h ic-typography.sc-ic-accordion,.disabled.sc-ic-accordion-h .icon-container.sc-ic-accordion,.disabled.sc-ic-accordion-h .expand-chevron.sc-ic-accordion{color:var(--ic-architectural-500)}/*!@.section-button.small*/.section-button.small.sc-ic-accordion{padding:var(--ic-space-xxs) var(--ic-space-xs)}/*!@.section-button.large*/.section-button.large.sc-ic-accordion{padding:var(--ic-space-sm) var(--ic-space-xs)}/*!@:host(:first-of-type)*/.sc-ic-accordion-h:first-of-type{border-top:var(--ic-border-default)}/*!@:focus*/.sc-ic-accordion:focus{outline:none}/*!@.section-button*/.section-button.sc-ic-accordion{background-color:transparent;display:flex;align-items:center;width:100%;padding:var(--ic-space-xs);font-weight:var(--ic-font-weight-bold);border:none}/*!@.section-header*/.section-header.sc-ic-accordion{text-align:left;flex:1 0}/*!@button:hover:enabled*/button.sc-ic-accordion:hover:enabled{background-color:var(--ic-action-dark-bg-hover);cursor:pointer}/*!@button:active*/button.sc-ic-accordion:active{background-color:var(--ic-action-dark-bg-active)}/*!@button:focus*/button.sc-ic-accordion:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast)}/*!@button:disabled*/button.sc-ic-accordion:disabled{pointer-events:none}/*!@.icon-container*/.icon-container.sc-ic-accordion{margin:0 var(--ic-space-xs) 0 0;display:flex;align-items:center;width:var(--ic-space-lg);height:var(--ic-space-lg)}/*!@::slotted(svg)*/.sc-ic-accordion-s>svg{width:var(--ic-space-md);height:var(--ic-space-md)}/*!@.expand-chevron*/.expand-chevron.sc-ic-accordion{width:var(--ic-space-lg);height:var(--ic-space-lg);margin-left:calc(var(--ic-space-xl) + var(--ic-space-xs));transform:rotate(90deg);justify-self:end}/*!@.content-expanded-chevron*/.content-expanded-chevron.sc-ic-accordion{transform:rotate(-90deg)}/*!@.expanded-content*/.expanded-content.sc-ic-accordion{height:0;overflow:hidden;display:flex;flex-direction:column;visibility:var(--ic-expanded-content-visibility, hidden)}/*!@.expanded-content-inner*/.expanded-content-inner.sc-ic-accordion{padding:var(--ic-space-xs)}/*!@.expanded-content-opened*/.expanded-content-opened.sc-ic-accordion{overflow:visible}";
|
8082
|
+
const icAccordionCss = "/*!@html*/html.sc-ic-accordion{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-accordion{margin:0}/*!@main*/main.sc-ic-accordion{display:block}/*!@h1*/h1.sc-ic-accordion{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-accordion{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-accordion{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-accordion{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-accordion{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-accordion,strong.sc-ic-accordion{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-accordion,kbd.sc-ic-accordion,samp.sc-ic-accordion{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-accordion{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-accordion,sup.sc-ic-accordion{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-accordion{bottom:-0.25em}/*!@sup*/sup.sc-ic-accordion{top:-0.5em}/*!@img*/img.sc-ic-accordion{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-accordion,input.sc-ic-accordion,optgroup.sc-ic-accordion,select.sc-ic-accordion,textarea.sc-ic-accordion{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-accordion,input.sc-ic-accordion{overflow:visible}/*!@button,\nselect*/button.sc-ic-accordion,select.sc-ic-accordion{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-accordion,[type=\"button\"].sc-ic-accordion,[type=\"reset\"].sc-ic-accordion,[type=\"submit\"].sc-ic-accordion{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-accordion::-moz-focus-inner,[type=\"button\"].sc-ic-accordion::-moz-focus-inner,[type=\"reset\"].sc-ic-accordion::-moz-focus-inner,[type=\"submit\"].sc-ic-accordion::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-accordion:-moz-focusring,[type=\"button\"].sc-ic-accordion:-moz-focusring,[type=\"reset\"].sc-ic-accordion:-moz-focusring,[type=\"submit\"].sc-ic-accordion:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-accordion{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-accordion{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-accordion{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-accordion{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-accordion,[type=\"radio\"].sc-ic-accordion{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-accordion::-webkit-inner-spin-button,[type=\"number\"].sc-ic-accordion::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-accordion{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-accordion::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-accordion::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-accordion{display:block}/*!@summary*/summary.sc-ic-accordion{display:list-item}/*!@template*/template.sc-ic-accordion{display:none}/*!@[hidden]*/[hidden].sc-ic-accordion{display:none}/*!@html,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo*/html.sc-ic-accordion,body.sc-ic-accordion,div.sc-ic-accordion,span.sc-ic-accordion,applet.sc-ic-accordion,object.sc-ic-accordion,iframe.sc-ic-accordion,h1.sc-ic-accordion,h2.sc-ic-accordion,h3.sc-ic-accordion,h4.sc-ic-accordion,h5.sc-ic-accordion,h6.sc-ic-accordion,p.sc-ic-accordion,blockquote.sc-ic-accordion,pre.sc-ic-accordion,a.sc-ic-accordion,abbr.sc-ic-accordion,acronym.sc-ic-accordion,address.sc-ic-accordion,big.sc-ic-accordion,cite.sc-ic-accordion,code.sc-ic-accordion,del.sc-ic-accordion,dfn.sc-ic-accordion,em.sc-ic-accordion,img.sc-ic-accordion,ins.sc-ic-accordion,kbd.sc-ic-accordion,q.sc-ic-accordion,s.sc-ic-accordion,samp.sc-ic-accordion,small.sc-ic-accordion,strike.sc-ic-accordion,strong.sc-ic-accordion,sub.sc-ic-accordion,sup.sc-ic-accordion,tt.sc-ic-accordion,var.sc-ic-accordion,b.sc-ic-accordion,u.sc-ic-accordion,i.sc-ic-accordion,center.sc-ic-accordion,dl.sc-ic-accordion,dt.sc-ic-accordion,dd.sc-ic-accordion,ol.sc-ic-accordion,ul.sc-ic-accordion,li.sc-ic-accordion,fieldset.sc-ic-accordion,form.sc-ic-accordion,label.sc-ic-accordion,legend.sc-ic-accordion,table.sc-ic-accordion,caption.sc-ic-accordion,tbody.sc-ic-accordion,tfoot.sc-ic-accordion,thead.sc-ic-accordion,tr.sc-ic-accordion,th.sc-ic-accordion,td.sc-ic-accordion,article.sc-ic-accordion,aside.sc-ic-accordion,canvas.sc-ic-accordion,details.sc-ic-accordion,embed.sc-ic-accordion,figure.sc-ic-accordion,figcaption.sc-ic-accordion,footer.sc-ic-accordion,header.sc-ic-accordion,hgroup.sc-ic-accordion,menu.sc-ic-accordion,nav.sc-ic-accordion,output.sc-ic-accordion,ruby.sc-ic-accordion,section.sc-ic-accordion,summary.sc-ic-accordion,time.sc-ic-accordion,mark.sc-ic-accordion,audio.sc-ic-accordion,video.sc-ic-accordion{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-accordion-h{display:block;border-bottom:var(--ic-border-default)}/*!@:host ic-typography,\n:host .expand-chevron*/.sc-ic-accordion-h ic-typography.sc-ic-accordion,.sc-ic-accordion-h .expand-chevron.sc-ic-accordion{color:var(--ic-color-primary-text)}/*!@:host(.light) ic-typography,\n:host(.light) .expanded-content,\n:host(.light) .icon-container,\n:host(.light) .expand-chevron*/.light.sc-ic-accordion-h ic-typography.sc-ic-accordion,.light.sc-ic-accordion-h .expanded-content.sc-ic-accordion,.light.sc-ic-accordion-h .icon-container.sc-ic-accordion,.light.sc-ic-accordion-h .expand-chevron.sc-ic-accordion{color:var(--ic-color-white-text)}/*!@:host(.disabled) ic-typography,\n:host(.disabled) .icon-container,\n:host(.disabled) .expand-chevron*/.disabled.sc-ic-accordion-h ic-typography.sc-ic-accordion,.disabled.sc-ic-accordion-h .icon-container.sc-ic-accordion,.disabled.sc-ic-accordion-h .expand-chevron.sc-ic-accordion{color:var(--ic-architectural-500)}/*!@.section-button.small*/.section-button.small.sc-ic-accordion{padding:var(--ic-space-xxs) var(--ic-space-xs)}/*!@.section-button.large*/.section-button.large.sc-ic-accordion{padding:var(--ic-space-sm) var(--ic-space-xs)}/*!@:host(:first-of-type)*/.sc-ic-accordion-h:first-of-type{border-top:var(--ic-border-default)}/*!@:focus*/.sc-ic-accordion:focus{outline:none}/*!@.section-button*/.section-button.sc-ic-accordion{background-color:transparent;display:flex;align-items:center;width:100%;padding:var(--ic-space-xs);font-weight:var(--ic-font-weight-bold);border:none}/*!@.section-header*/.section-header.sc-ic-accordion{text-align:left;flex:1 0}/*!@button:hover:enabled*/button.sc-ic-accordion:hover:enabled{background-color:var(--ic-action-dark-bg-hover);cursor:pointer}/*!@button:active*/button.sc-ic-accordion:active{background-color:var(--ic-action-dark-bg-active)}/*!@button:focus*/button.sc-ic-accordion:focus{box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast)}/*!@button:disabled*/button.sc-ic-accordion:disabled{pointer-events:none}/*!@.icon-container*/.icon-container.sc-ic-accordion{margin:0 var(--ic-space-xs) 0 0;display:flex;align-items:center;width:var(--ic-space-lg);height:var(--ic-space-lg)}/*!@::slotted(svg)*/.sc-ic-accordion-s>svg{width:var(--ic-space-md);height:var(--ic-space-md)}/*!@.expand-chevron*/.expand-chevron.sc-ic-accordion{width:var(--ic-space-lg);height:var(--ic-space-lg);margin-left:calc(var(--ic-space-xl) + var(--ic-space-xs));transform:rotate(90deg);justify-self:end}/*!@.content-expanded-chevron*/.content-expanded-chevron.sc-ic-accordion{transform:rotate(-90deg)}/*!@.expanded-content*/.expanded-content.sc-ic-accordion{height:0;overflow:hidden;display:flex;flex-direction:column;visibility:var(--ic-expanded-content-visibility, hidden)}/*!@.expanded-content-inner*/.expanded-content-inner.sc-ic-accordion{padding:var(--ic-space-xs)}/*!@.expanded-content-opened*/.expanded-content-opened.sc-ic-accordion{overflow:visible}@media (forced-colors: active){/*!@button:focus*/button.sc-ic-accordion:focus{border:var(--ic-hc-border) !important}}";
|
8083
8083
|
|
8084
8084
|
let accordionIds = 0;
|
8085
8085
|
/**
|
@@ -8344,11 +8344,12 @@ var closeIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fil
|
|
8344
8344
|
</svg>
|
8345
8345
|
`;
|
8346
8346
|
|
8347
|
-
const icAlertCss = "/*!@html*/html.sc-ic-alert{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-alert{margin:0}/*!@main*/main.sc-ic-alert{display:block}/*!@h1*/h1.sc-ic-alert{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-alert{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-alert{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-alert{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-alert{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-alert,strong.sc-ic-alert{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-alert,kbd.sc-ic-alert,samp.sc-ic-alert{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-alert{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-alert,sup.sc-ic-alert{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-alert{bottom:-0.25em}/*!@sup*/sup.sc-ic-alert{top:-0.5em}/*!@img*/img.sc-ic-alert{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-alert,input.sc-ic-alert,optgroup.sc-ic-alert,select.sc-ic-alert,textarea.sc-ic-alert{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-alert,input.sc-ic-alert{overflow:visible}/*!@button,\nselect*/button.sc-ic-alert,select.sc-ic-alert{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-alert,[type=\"button\"].sc-ic-alert,[type=\"reset\"].sc-ic-alert,[type=\"submit\"].sc-ic-alert{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-alert::-moz-focus-inner,[type=\"button\"].sc-ic-alert::-moz-focus-inner,[type=\"reset\"].sc-ic-alert::-moz-focus-inner,[type=\"submit\"].sc-ic-alert::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-alert:-moz-focusring,[type=\"button\"].sc-ic-alert:-moz-focusring,[type=\"reset\"].sc-ic-alert:-moz-focusring,[type=\"submit\"].sc-ic-alert:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-alert{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-alert{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-alert{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-alert{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-alert,[type=\"radio\"].sc-ic-alert{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-alert::-webkit-inner-spin-button,[type=\"number\"].sc-ic-alert::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-alert{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-alert::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-alert::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-alert{display:block}/*!@summary*/summary.sc-ic-alert{display:list-item}/*!@template*/template.sc-ic-alert{display:none}/*!@[hidden]*/[hidden].sc-ic-alert{display:none}/*!@html,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo*/html.sc-ic-alert,body.sc-ic-alert,div.sc-ic-alert,span.sc-ic-alert,applet.sc-ic-alert,object.sc-ic-alert,iframe.sc-ic-alert,h1.sc-ic-alert,h2.sc-ic-alert,h3.sc-ic-alert,h4.sc-ic-alert,h5.sc-ic-alert,h6.sc-ic-alert,p.sc-ic-alert,blockquote.sc-ic-alert,pre.sc-ic-alert,a.sc-ic-alert,abbr.sc-ic-alert,acronym.sc-ic-alert,address.sc-ic-alert,big.sc-ic-alert,cite.sc-ic-alert,code.sc-ic-alert,del.sc-ic-alert,dfn.sc-ic-alert,em.sc-ic-alert,img.sc-ic-alert,ins.sc-ic-alert,kbd.sc-ic-alert,q.sc-ic-alert,s.sc-ic-alert,samp.sc-ic-alert,small.sc-ic-alert,strike.sc-ic-alert,strong.sc-ic-alert,sub.sc-ic-alert,sup.sc-ic-alert,tt.sc-ic-alert,var.sc-ic-alert,b.sc-ic-alert,u.sc-ic-alert,i.sc-ic-alert,center.sc-ic-alert,dl.sc-ic-alert,dt.sc-ic-alert,dd.sc-ic-alert,ol.sc-ic-alert,ul.sc-ic-alert,li.sc-ic-alert,fieldset.sc-ic-alert,form.sc-ic-alert,label.sc-ic-alert,legend.sc-ic-alert,table.sc-ic-alert,caption.sc-ic-alert,tbody.sc-ic-alert,tfoot.sc-ic-alert,thead.sc-ic-alert,tr.sc-ic-alert,th.sc-ic-alert,td.sc-ic-alert,article.sc-ic-alert,aside.sc-ic-alert,canvas.sc-ic-alert,details.sc-ic-alert,embed.sc-ic-alert,figure.sc-ic-alert,figcaption.sc-ic-alert,footer.sc-ic-alert,header.sc-ic-alert,hgroup.sc-ic-alert,menu.sc-ic-alert,nav.sc-ic-alert,output.sc-ic-alert,ruby.sc-ic-alert,section.sc-ic-alert,summary.sc-ic-alert,time.sc-ic-alert,mark.sc-ic-alert,audio.sc-ic-alert,video.sc-ic-alert{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-alert-h{display:block}/*!@.container*/.container.sc-ic-alert{min-height:3.5rem;border-radius:var(--ic-border-radius);position:relative;display:flex;align-items:center}/*!@.container-neutral*/.container-neutral.sc-ic-alert{background-color:var(--ic-status-unknown-light)}/*!@.container-info*/.container-info.sc-ic-alert{background-color:var(--ic-status-info-light)}/*!@.container-warning*/.container-warning.sc-ic-alert{background-color:var(--ic-status-warning-light)}/*!@.container-error*/.container-error.sc-ic-alert{background-color:var(--ic-status-error-light)}/*!@.container-success*/.container-success.sc-ic-alert{background-color:var(--ic-status-success-light)}/*!@.alert-icon-container*/.alert-icon-container.sc-ic-alert{height:100%;display:flex;align-items:center}/*!@.divider*/.divider.sc-ic-alert{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}/*!@.divider-neutral*/.divider-neutral.sc-ic-alert{background-color:var(--ic-status-unknown)}/*!@.divider-info*/.divider-info.sc-ic-alert{background-color:var(--ic-status-info)}/*!@.divider-warning*/.divider-warning.sc-ic-alert{background-color:var(--ic-status-warning)}/*!@.divider-error*/.divider-error.sc-ic-alert{background-color:var(--ic-status-error)}/*!@.divider-success*/.divider-success.sc-ic-alert{background-color:var(--ic-status-success)}/*!@.alert-icon*/.alert-icon.sc-ic-alert{height:var(--ic-space-lg);width:1.375rem;margin-left:1.125rem}/*!@.alert-icon > svg*/.alert-icon.sc-ic-alert>svg.sc-ic-alert{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}/*!@.icon-neutral > svg*/.icon-neutral.sc-ic-alert>svg.sc-ic-alert{fill:var(--ic-status-unknown)}/*!@:host([variant=\"info\"]) .alert-icon svg*/[variant=\"info\"].sc-ic-alert-h .alert-icon.sc-ic-alert svg.sc-ic-alert{fill:var(--ic-status-info)}/*!@:host([variant=\"warning\"]) .alert-icon svg*/[variant=\"warning\"].sc-ic-alert-h .alert-icon.sc-ic-alert svg.sc-ic-alert{fill:var(--ic-status-warning)}/*!@:host([variant=\"error\"]) .alert-icon svg*/[variant=\"error\"].sc-ic-alert-h .alert-icon.sc-ic-alert svg.sc-ic-alert{fill:var(--ic-status-error)}/*!@:host([variant=\"success\"]) .alert-icon svg*/[variant=\"success\"].sc-ic-alert-h .alert-icon.sc-ic-alert svg.sc-ic-alert{fill:var(--ic-status-success)}/*!@.alert-content*/.alert-content.sc-ic-alert{display:flex;align-items:center;margin-left:0.625rem;width:100%}/*!@.alert-message*/.alert-message.sc-ic-alert{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*/.alert-message-title-above.sc-ic-alert{display:inline}/*!@.alert-title*/.alert-title.sc-ic-alert{margin-right:var(--ic-space-xs)}/*!@.alert-title-above*/.alert-title-above.sc-ic-alert{white-space:normal}/*!@.alert-action-container*/.alert-action-container.sc-ic-alert{margin-right:var(--ic-space-xs);display:flex;align-items:center}/*!@.dismiss-icon*/.dismiss-icon.sc-ic-alert{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*/.dismiss-icon.sc-ic-alert:hover{cursor:pointer}@media (max-width: 628px){/*!@.alert-content*/.alert-content.sc-ic-alert{display:flex;flex-direction:column;align-items:flex-start}/*!@.alert-message*/.alert-message.sc-ic-alert{display:flex;flex-direction:column;align-items:flex-start}/*!@.alert-title*/.alert-title.sc-ic-alert{white-space:normal}/*!@.alert-action-container*/.alert-action-container.sc-ic-alert{margin-bottom:var(--ic-space-xs)}}@media (forced-colors: active){/*!@.container*/.container.sc-ic-alert{border:var(--ic-hc-border)}}";
|
8347
|
+
const icAlertCss = "/*!@html*/html.sc-ic-alert{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-alert{margin:0}/*!@main*/main.sc-ic-alert{display:block}/*!@h1*/h1.sc-ic-alert{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-alert{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-alert{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-alert{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-alert{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-alert,strong.sc-ic-alert{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-alert,kbd.sc-ic-alert,samp.sc-ic-alert{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-alert{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-alert,sup.sc-ic-alert{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-alert{bottom:-0.25em}/*!@sup*/sup.sc-ic-alert{top:-0.5em}/*!@img*/img.sc-ic-alert{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-alert,input.sc-ic-alert,optgroup.sc-ic-alert,select.sc-ic-alert,textarea.sc-ic-alert{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-alert,input.sc-ic-alert{overflow:visible}/*!@button,\nselect*/button.sc-ic-alert,select.sc-ic-alert{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-alert,[type=\"button\"].sc-ic-alert,[type=\"reset\"].sc-ic-alert,[type=\"submit\"].sc-ic-alert{-webkit-appearance:button}/*!@button::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner*/button.sc-ic-alert::-moz-focus-inner,[type=\"button\"].sc-ic-alert::-moz-focus-inner,[type=\"reset\"].sc-ic-alert::-moz-focus-inner,[type=\"submit\"].sc-ic-alert::-moz-focus-inner{border-style:none;padding:0}/*!@button:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring*/button.sc-ic-alert:-moz-focusring,[type=\"button\"].sc-ic-alert:-moz-focusring,[type=\"reset\"].sc-ic-alert:-moz-focusring,[type=\"submit\"].sc-ic-alert:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-alert{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-alert{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-alert{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-alert{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-alert,[type=\"radio\"].sc-ic-alert{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-alert::-webkit-inner-spin-button,[type=\"number\"].sc-ic-alert::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-alert{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-alert::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-alert::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-alert{display:block}/*!@summary*/summary.sc-ic-alert{display:list-item}/*!@template*/template.sc-ic-alert{display:none}/*!@[hidden]*/[hidden].sc-ic-alert{display:none}/*!@html,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo*/html.sc-ic-alert,body.sc-ic-alert,div.sc-ic-alert,span.sc-ic-alert,applet.sc-ic-alert,object.sc-ic-alert,iframe.sc-ic-alert,h1.sc-ic-alert,h2.sc-ic-alert,h3.sc-ic-alert,h4.sc-ic-alert,h5.sc-ic-alert,h6.sc-ic-alert,p.sc-ic-alert,blockquote.sc-ic-alert,pre.sc-ic-alert,a.sc-ic-alert,abbr.sc-ic-alert,acronym.sc-ic-alert,address.sc-ic-alert,big.sc-ic-alert,cite.sc-ic-alert,code.sc-ic-alert,del.sc-ic-alert,dfn.sc-ic-alert,em.sc-ic-alert,img.sc-ic-alert,ins.sc-ic-alert,kbd.sc-ic-alert,q.sc-ic-alert,s.sc-ic-alert,samp.sc-ic-alert,small.sc-ic-alert,strike.sc-ic-alert,strong.sc-ic-alert,sub.sc-ic-alert,sup.sc-ic-alert,tt.sc-ic-alert,var.sc-ic-alert,b.sc-ic-alert,u.sc-ic-alert,i.sc-ic-alert,center.sc-ic-alert,dl.sc-ic-alert,dt.sc-ic-alert,dd.sc-ic-alert,ol.sc-ic-alert,ul.sc-ic-alert,li.sc-ic-alert,fieldset.sc-ic-alert,form.sc-ic-alert,label.sc-ic-alert,legend.sc-ic-alert,table.sc-ic-alert,caption.sc-ic-alert,tbody.sc-ic-alert,tfoot.sc-ic-alert,thead.sc-ic-alert,tr.sc-ic-alert,th.sc-ic-alert,td.sc-ic-alert,article.sc-ic-alert,aside.sc-ic-alert,canvas.sc-ic-alert,details.sc-ic-alert,embed.sc-ic-alert,figure.sc-ic-alert,figcaption.sc-ic-alert,footer.sc-ic-alert,header.sc-ic-alert,hgroup.sc-ic-alert,menu.sc-ic-alert,nav.sc-ic-alert,output.sc-ic-alert,ruby.sc-ic-alert,section.sc-ic-alert,summary.sc-ic-alert,time.sc-ic-alert,mark.sc-ic-alert,audio.sc-ic-alert,video.sc-ic-alert{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-alert-h{display:block}/*!@.container*/.container.sc-ic-alert{min-height:3.5rem;border-radius:var(--ic-border-radius);position:relative;display:flex;align-items:center}/*!@.container-neutral*/.container-neutral.sc-ic-alert{background-color:var(--ic-status-unknown-light)}/*!@.container-info*/.container-info.sc-ic-alert{background-color:var(--ic-status-info-light)}/*!@.container-warning*/.container-warning.sc-ic-alert{background-color:var(--ic-status-warning-light)}/*!@.container-error*/.container-error.sc-ic-alert{background-color:var(--ic-status-error-light)}/*!@.container-success*/.container-success.sc-ic-alert{background-color:var(--ic-status-success-light)}/*!@.alert-icon-container*/.alert-icon-container.sc-ic-alert{height:100%;display:flex;align-items:center}/*!@.divider*/.divider.sc-ic-alert{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}/*!@.divider-neutral*/.divider-neutral.sc-ic-alert{background-color:var(--ic-status-unknown)}/*!@.divider-info*/.divider-info.sc-ic-alert{background-color:var(--ic-status-info)}/*!@.divider-warning*/.divider-warning.sc-ic-alert{background-color:var(--ic-status-warning)}/*!@.divider-error*/.divider-error.sc-ic-alert{background-color:var(--ic-status-error)}/*!@.divider-success*/.divider-success.sc-ic-alert{background-color:var(--ic-status-success)}/*!@.alert-icon*/.alert-icon.sc-ic-alert{height:var(--ic-space-lg);width:1.375rem;margin-left:1.125rem}/*!@.icon-placeholder*/.icon-placeholder.sc-ic-alert{margin-left:var(--ic-space-xs)}/*!@.alert-icon > svg*/.alert-icon.sc-ic-alert>svg.sc-ic-alert{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}/*!@.icon-neutral > svg,\n::slotted(svg)*/.icon-neutral.sc-ic-alert>svg.sc-ic-alert,.sc-ic-alert-s>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block;fill:var(--ic-status-unknown)}/*!@:host([variant=\"info\"]) .alert-icon svg*/[variant=\"info\"].sc-ic-alert-h .alert-icon.sc-ic-alert svg.sc-ic-alert{fill:var(--ic-status-info)}/*!@:host([variant=\"warning\"]) .alert-icon svg*/[variant=\"warning\"].sc-ic-alert-h .alert-icon.sc-ic-alert svg.sc-ic-alert{fill:var(--ic-status-warning)}/*!@:host([variant=\"error\"]) .alert-icon svg*/[variant=\"error\"].sc-ic-alert-h .alert-icon.sc-ic-alert svg.sc-ic-alert{fill:var(--ic-status-error)}/*!@:host([variant=\"success\"]) .alert-icon svg*/[variant=\"success\"].sc-ic-alert-h .alert-icon.sc-ic-alert svg.sc-ic-alert{fill:var(--ic-status-success)}/*!@.alert-content*/.alert-content.sc-ic-alert{display:flex;align-items:center;margin-left:0.625rem;width:100%}/*!@.alert-message*/.alert-message.sc-ic-alert{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*/.alert-message-title-above.sc-ic-alert{display:inline}/*!@.alert-title*/.alert-title.sc-ic-alert{margin-right:var(--ic-space-xs)}/*!@.alert-title-above*/.alert-title-above.sc-ic-alert{white-space:normal}/*!@.alert-action-container*/.alert-action-container.sc-ic-alert{margin-right:var(--ic-space-xs);display:flex;align-items:center}/*!@.dismiss-icon*/.dismiss-icon.sc-ic-alert{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*/.dismiss-icon.sc-ic-alert:hover{cursor:pointer}@media (max-width: 628px){/*!@.alert-content*/.alert-content.sc-ic-alert{display:flex;flex-direction:column;align-items:flex-start}/*!@.alert-message*/.alert-message.sc-ic-alert{display:flex;flex-direction:column;align-items:flex-start}/*!@.alert-title*/.alert-title.sc-ic-alert{white-space:normal}/*!@.alert-action-container*/.alert-action-container.sc-ic-alert{margin-bottom:var(--ic-space-xs)}}@media (forced-colors: active){/*!@.container*/.container.sc-ic-alert{border:var(--ic-hc-border)}}";
|
8348
8348
|
|
8349
8349
|
/**
|
8350
8350
|
* @slot message - Content is placed to the right of the title.
|
8351
8351
|
* @slot action - Content is placed to the right of the message.
|
8352
|
+
* @slot neutral-icon - A custom neutral icon is placed to the left of the title. This will override the default icon if used.
|
8352
8353
|
*/
|
8353
8354
|
class Alert {
|
8354
8355
|
constructor(hostRef) {
|
@@ -8373,6 +8374,7 @@ class Alert {
|
|
8373
8374
|
this.message = undefined;
|
8374
8375
|
this.titleAbove = false;
|
8375
8376
|
this.variant = "neutral";
|
8377
|
+
this.showDefaultIcon = true;
|
8376
8378
|
}
|
8377
8379
|
disconnectedCallback() {
|
8378
8380
|
var _a;
|
@@ -8395,7 +8397,7 @@ class Alert {
|
|
8395
8397
|
this.alertTitleWrap = true;
|
8396
8398
|
}
|
8397
8399
|
render() {
|
8398
|
-
const { variant, heading, message, titleAbove, dismissible, announced, visible, } = this;
|
8400
|
+
const { variant, heading, message, titleAbove, dismissible, announced, visible, showDefaultIcon, } = this;
|
8399
8401
|
return (visible && (hAsync(Host, { role: announced ? "alert" : null, class: {
|
8400
8402
|
[IcThemeForegroundEnum.Dark]: true,
|
8401
8403
|
} }, hAsync("div", { class: {
|
@@ -8404,11 +8406,15 @@ class Alert {
|
|
8404
8406
|
} }, hAsync("div", { class: "alert-icon-container" }, hAsync("div", { class: {
|
8405
8407
|
["divider"]: true,
|
8406
8408
|
[`divider-${variant}`]: true,
|
8407
|
-
} }), hAsync("span", { class: {
|
8409
|
+
} }), variant === "neutral" ? (isSlotUsed(this.el, "neutral-icon") ? (hAsync("div", { class: "alert-icon svg-container icon-neutral" }, hAsync("slot", { name: "neutral-icon" }))) : showDefaultIcon ? (hAsync("span", { class: {
|
8408
8410
|
["alert-icon"]: true,
|
8409
8411
|
["svg-container"]: true,
|
8410
8412
|
[`icon-${variant}`]: true,
|
8411
|
-
}, innerHTML: VARIANT_ICONS[variant].icon }))
|
8413
|
+
}, innerHTML: VARIANT_ICONS[variant].icon })) : (hAsync("div", { class: "icon-placeholder" }))) : (hAsync("span", { class: {
|
8414
|
+
["alert-icon"]: true,
|
8415
|
+
["svg-container"]: true,
|
8416
|
+
[`icon-${variant}`]: true,
|
8417
|
+
}, innerHTML: VARIANT_ICONS[variant].icon }))), hAsync("div", { class: "alert-content" }, hAsync("div", { class: {
|
8412
8418
|
["alert-message"]: true,
|
8413
8419
|
["alert-message-title-above"]: titleAbove || this.alertTitleWrap,
|
8414
8420
|
} }, heading && (hAsync("ic-typography", { class: {
|
@@ -8431,6 +8437,7 @@ class Alert {
|
|
8431
8437
|
"message": [1],
|
8432
8438
|
"titleAbove": [4, "title-above"],
|
8433
8439
|
"variant": [1],
|
8440
|
+
"showDefaultIcon": [4, "show-default-icon"],
|
8434
8441
|
"alertTitleWrap": [32],
|
8435
8442
|
"visible": [32]
|
8436
8443
|
},
|
@@ -8597,7 +8604,7 @@ class BackToTop {
|
|
8597
8604
|
}; }
|
8598
8605
|
}
|
8599
8606
|
|
8600
|
-
const icBadgeCss = "@media (prefers-reduced-motion: no-preference){/*!@:host(.show)*/.show.sc-ic-badge-h{animation:expand var(--ic-transition-duration-slow)}/*!@:host(.hide)*/.hide.sc-ic-badge-h{animation:shrink var(--ic-transition-duration-slow)}}/*!@:host*/.sc-ic-badge-h{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)*/.neutral.sc-ic-badge-h{background-color:var(--ic-architectural-500)}/*!@:host(.light)*/.light.sc-ic-badge-h{background-color:var(--ic-architectural-40)}/*!@:host(.info)*/.info.sc-ic-badge-h{background-color:var(--ic-status-info)}/*!@:host(.warning)*/.warning.sc-ic-badge-h{background-color:var(--ic-status-warning-mid)}/*!@:host(.error)*/.error.sc-ic-badge-h{background-color:var(--ic-status-error)}/*!@:host(.success)*/.success.sc-ic-badge-h{background-color:var(--ic-status-success)}/*!@:host(.small)*/.small.sc-ic-badge-h{height:var(--ic-space-sm);min-width:var(--ic-space-sm)}/*!@:host(.large)*/.large.sc-ic-badge-h{height:calc(var(--ic-space-md) + var(--ic-space-xxs));min-width:calc(var(--ic-space-md) + var(--ic-space-xxs))}/*!@:host(.dot.default)*/.dot.default.sc-ic-badge-h{height:var(--ic-space-xs);width:var(--ic-space-xs);min-width:var(--ic-space-xs)}/*!@:host(.dot.small)*/.dot.small.sc-ic-badge-h{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)*/.dot.large.sc-ic-badge-h{height:var(--ic-space-sm);width:var(--ic-space-sm);min-width:var(--ic-space-sm)}/*!@:host(.foreground-dark) ::slotted(*)*/.sc-ic-badge-h.foreground-dark .sc-ic-badge-s>*{fill:var(--ic-color-primary-text)}/*!@:host(.foreground-light) ::slotted(*)*/.sc-ic-badge-h.foreground-light .sc-ic-badge-s>*{fill:white}/*!@:host(.foreground-dark) ic-typography*/.foreground-dark.sc-ic-badge-h ic-typography.sc-ic-badge{color:var(--ic-color-primary-text)}/*!@:host(.foreground-light) ic-typography*/.foreground-light.sc-ic-badge-h ic-typography.sc-ic-badge{color:white}/*!@:host(.text) ic-typography*/.text.sc-ic-badge-h ic-typography.sc-ic-badge{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*/.text.small.sc-ic-badge-h ic-typography.sc-ic-badge{padding:0 0.2132rem}/*!@:host(.text.large) ic-typography*/.text.large.sc-ic-badge-h ic-typography.sc-ic-badge{padding:0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}/*!@:host(.icon) ::slotted(svg)*/.sc-ic-badge-h.icon .sc-ic-badge-s>svg{width:var(--ic-space-sm);height:var(--ic-space-sm);padding:var(--ic-space-xxxs)}/*!@:host(.icon.small) ::slotted(svg)*/.sc-ic-badge-h.icon.small .sc-ic-badge-s>svg{width:var(--ic-space-xs);height:var(--ic-space-xs)}/*!@:host(.icon.large) ::slotted(svg)*/.sc-ic-badge-h.icon.large .sc-ic-badge-s>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)*/.far.sc-ic-badge-h{top:calc(-1 * var(--ic-space-xs));right:calc(-1 * var(--ic-space-xs))}/*!@:host(.far.small),\n:host(.dot.far.large)*/.far.small.sc-ic-badge-h,.dot.far.large.sc-ic-badge-h{top:calc(-1 * var(--ic-space-xxs));right:calc(-1 * var(--ic-space-xxs))}/*!@:host(.dot.far),\n:host(.dot.far.small)*/.dot.far.sc-ic-badge-h,.dot.far.small.sc-ic-badge-h{top:calc(-1 * var(--ic-space-xxxs));right:calc(-1 * var(--ic-space-xxxs))}/*!@:host(.near)*/.near.sc-ic-badge-h{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)*/.dot.near.sc-ic-badge-h{top:calc(-1 * var(--ic-space-1px));right:calc(-1 * var(--ic-space-1px))}/*!@:host(.inline)*/.inline.sc-ic-badge-h{position:static}/*!@:host(.hide)*/.hide.sc-ic-badge-h{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)}}";
|
8607
|
+
const icBadgeCss = "@media (prefers-reduced-motion: no-preference){/*!@:host(.show)*/.show.sc-ic-badge-h{animation:expand var(--ic-transition-duration-slow)}/*!@:host(.hide)*/.hide.sc-ic-badge-h{animation:shrink var(--ic-transition-duration-slow)}}/*!@:host*/.sc-ic-badge-h{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)*/.neutral.sc-ic-badge-h{background-color:var(--ic-architectural-500)}/*!@:host(.light)*/.light.sc-ic-badge-h{background-color:var(--ic-architectural-40)}/*!@:host(.info)*/.info.sc-ic-badge-h{background-color:var(--ic-status-info)}/*!@:host(.warning)*/.warning.sc-ic-badge-h{background-color:var(--ic-status-warning-mid)}/*!@:host(.error)*/.error.sc-ic-badge-h{background-color:var(--ic-status-error)}/*!@:host(.success)*/.success.sc-ic-badge-h{background-color:var(--ic-status-success)}/*!@:host(.small)*/.small.sc-ic-badge-h{height:var(--ic-space-sm);min-width:var(--ic-space-sm)}/*!@:host(.large)*/.large.sc-ic-badge-h{height:calc(var(--ic-space-md) + var(--ic-space-xxs));min-width:calc(var(--ic-space-md) + var(--ic-space-xxs))}/*!@:host(.dot.default)*/.dot.default.sc-ic-badge-h{height:var(--ic-space-xs);width:var(--ic-space-xs);min-width:var(--ic-space-xs)}/*!@:host(.dot.small)*/.dot.small.sc-ic-badge-h{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)*/.dot.large.sc-ic-badge-h{height:var(--ic-space-sm);width:var(--ic-space-sm);min-width:var(--ic-space-sm)}/*!@:host(.foreground-dark) ::slotted(*)*/.sc-ic-badge-h.foreground-dark .sc-ic-badge-s>*{fill:var(--ic-color-primary-text)}/*!@:host(.foreground-light) ::slotted(*)*/.sc-ic-badge-h.foreground-light .sc-ic-badge-s>*{fill:white}/*!@:host(.foreground-dark) ic-typography*/.foreground-dark.sc-ic-badge-h ic-typography.sc-ic-badge{color:var(--ic-color-primary-text)}/*!@:host(.foreground-light) ic-typography*/.foreground-light.sc-ic-badge-h ic-typography.sc-ic-badge{color:white}/*!@:host(.text) ic-typography*/.text.sc-ic-badge-h ic-typography.sc-ic-badge{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*/.text.small.sc-ic-badge-h ic-typography.sc-ic-badge{padding:0 0.2132rem}/*!@:host(.text.large) ic-typography*/.text.large.sc-ic-badge-h ic-typography.sc-ic-badge{padding:0 calc((var(--ic-space-sm) + var(--ic-space-1px)) / 2)\n var(--ic-space-1px)}/*!@:host(.icon) ::slotted(svg)*/.sc-ic-badge-h.icon .sc-ic-badge-s>svg{width:var(--ic-space-sm);height:var(--ic-space-sm);padding:var(--ic-space-xxxs)}/*!@:host(.icon.small) ::slotted(svg)*/.sc-ic-badge-h.icon.small .sc-ic-badge-s>svg{width:var(--ic-space-xs);height:var(--ic-space-xs)}/*!@:host(.icon.large) ::slotted(svg)*/.sc-ic-badge-h.icon.large .sc-ic-badge-s>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)*/.far.sc-ic-badge-h{top:calc(-1 * var(--ic-space-xs));right:calc(-1 * var(--ic-space-xs))}/*!@:host(.far.small),\n:host(.dot.far.large)*/.far.small.sc-ic-badge-h,.dot.far.large.sc-ic-badge-h{top:calc(-1 * var(--ic-space-xxs));right:calc(-1 * var(--ic-space-xxs))}/*!@:host(.dot.far),\n:host(.dot.far.small)*/.dot.far.sc-ic-badge-h,.dot.far.small.sc-ic-badge-h{top:calc(-1 * var(--ic-space-xxxs));right:calc(-1 * var(--ic-space-xxxs))}/*!@:host(.near)*/.near.sc-ic-badge-h{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)*/.dot.near.sc-ic-badge-h{top:calc(-1 * var(--ic-space-1px));right:calc(-1 * var(--ic-space-1px))}/*!@:host(.inline)*/.inline.sc-ic-badge-h{position:static}/*!@:host(.hide)*/.hide.sc-ic-badge-h{visibility:hidden !important;transition:visibility var(--ic-transition-duration-slow)}/*!@.sr-only*/.sr-only.sc-ic-badge{position:absolute;left:-9999px}@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)}}";
|
8601
8608
|
|
8602
8609
|
/**
|
8603
8610
|
* @slot badge-icon - Icon will be rendered inside the badge if type is set to icon.
|
@@ -8716,7 +8723,7 @@ class Badge {
|
|
8716
8723
|
[`${type}`]: true,
|
8717
8724
|
[`foreground-${foregroundColour}`]: foregroundColour !== null,
|
8718
8725
|
[`${visible ? "show" : "hide"}`]: true,
|
8719
|
-
}, id: el.id || null, "aria-label": ariaLabel, role: "status" }, type === "icon" && hAsync("slot", { name: "badge-icon" }), type === "text" && textLabel && (hAsync("ic-typography", { variant: size === "small" ? "badge-small" : "badge" }, getTextLabel()))));
|
8726
|
+
}, id: el.id || null, "aria-label": ariaLabel, role: "status" }, type === "icon" && hAsync("slot", { name: "badge-icon" }), type === "text" && textLabel && (hAsync("ic-typography", { variant: size === "small" ? "badge-small" : "badge" }, getTextLabel())), type === "dot" && hAsync("span", { class: "sr-only" }, "badge")));
|
8720
8727
|
}
|
8721
8728
|
static get delegatesFocus() { return true; }
|
8722
8729
|
get el() { return getElement(this); }
|
@@ -19210,6 +19217,7 @@ class TextField {
|
|
19210
19217
|
this.max = undefined;
|
19211
19218
|
this.maxCharacters = 0;
|
19212
19219
|
this.maxLength = 0;
|
19220
|
+
this.maxLengthMessage = "Maximum length exceeded";
|
19213
19221
|
this.min = undefined;
|
19214
19222
|
this.minCharacters = 0;
|
19215
19223
|
this.name = this.inputId;
|
@@ -19301,7 +19309,7 @@ class TextField {
|
|
19301
19309
|
: IcInformationStatus.Error
|
19302
19310
|
: validationStatus;
|
19303
19311
|
const currentValidationText = maxLengthExceeded
|
19304
|
-
?
|
19312
|
+
? this.maxLengthMessage
|
19305
19313
|
: maxCharactersError
|
19306
19314
|
? `Maximum input is ${maxCharacters} characters`
|
19307
19315
|
: maxValueExceeded
|
@@ -19389,6 +19397,7 @@ class TextField {
|
|
19389
19397
|
"max": [8],
|
19390
19398
|
"maxCharacters": [2, "max-characters"],
|
19391
19399
|
"maxLength": [2, "max-length"],
|
19400
|
+
"maxLengthMessage": [1, "max-length-message"],
|
19392
19401
|
"min": [8],
|
19393
19402
|
"minCharacters": [2, "min-characters"],
|
19394
19403
|
"name": [1],
|
@@ -19681,6 +19690,12 @@ class ToastRegion {
|
|
19681
19690
|
this.openToast = undefined;
|
19682
19691
|
}
|
19683
19692
|
}
|
19693
|
+
componentDidLoad() {
|
19694
|
+
if (this.openToast) {
|
19695
|
+
this.showToast(this.openToast);
|
19696
|
+
this.openToast = undefined;
|
19697
|
+
}
|
19698
|
+
}
|
19684
19699
|
handleDismissedToast() {
|
19685
19700
|
var _a;
|
19686
19701
|
if (this.pendingVisibility.length > 0) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ukic/web-components",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.29.0",
|
4
4
|
"description": "A web component UI library compiled with StencilJS",
|
5
5
|
"author": "mi6",
|
6
6
|
"bugs": {
|
@@ -96,5 +96,5 @@
|
|
96
96
|
"webpack": "^5.76.0"
|
97
97
|
},
|
98
98
|
"license": "MIT",
|
99
|
-
"gitHead": "
|
99
|
+
"gitHead": "eac36044d122bbfe72142a35877135ebff6dce5e"
|
100
100
|
}
|
package/vscode-data.json
CHANGED
@@ -119,6 +119,10 @@
|
|
119
119
|
"name": "message",
|
120
120
|
"description": "The main body message of the alert."
|
121
121
|
},
|
122
|
+
{
|
123
|
+
"name": "show-default-icon",
|
124
|
+
"description": "If `true`, the default icon for the neutral variant will be appear on the left of the alert."
|
125
|
+
},
|
122
126
|
{
|
123
127
|
"name": "title-above",
|
124
128
|
"description": "If `true`, the title and message will appear above and below instead of inline."
|
@@ -1003,7 +1007,7 @@
|
|
1003
1007
|
},
|
1004
1008
|
{
|
1005
1009
|
"name": "close-on-backdrop-click",
|
1006
|
-
"description": "If set to `
|
1010
|
+
"description": "If set to `false`, the dialog will not close when the backdrop is clicked."
|
1007
1011
|
},
|
1008
1012
|
{
|
1009
1013
|
"name": "destructive",
|
@@ -3634,6 +3638,10 @@
|
|
3634
3638
|
"name": "max-length",
|
3635
3639
|
"description": "The count of characters in the field. Will display a warning if the bound is reached."
|
3636
3640
|
},
|
3641
|
+
{
|
3642
|
+
"name": "max-length-message",
|
3643
|
+
"description": "The text to display as the validation message when the maximum length is exceeded."
|
3644
|
+
},
|
3637
3645
|
{
|
3638
3646
|
"name": "min",
|
3639
3647
|
"description": "The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)"
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as s,h as t,g as i}from"./p-6b5e91e2.js";const e=class{constructor(t){s(this,t);this.pendingVisibility=[];this.showToast=s=>{const t=Array.from(document.querySelectorAll("ic-toast")).filter((s=>window.getComputedStyle(s).display!=="none"));if(t.indexOf(s)===-1&&t.length<=0){s.setVisible().then((s=>this.previouslyFocused=s))}if(t.length>0)this.pendingVisibility.push(s)};this.openToast=undefined}watchOpenToastHandler(s){if(this.openToast!==undefined){this.showToast(s);this.openToast=undefined}}handleDismissedToast(){var s;if(this.pendingVisibility.length>0){this.pendingVisibility[0].setVisible().then((s=>this.previouslyFocused=s));this.pendingVisibility.shift()}else{if(this.previouslyFocused&&"setFocus"in this.previouslyFocused){this.previouslyFocused.setFocus()}else(s=this.previouslyFocused)===null||s===void 0?void 0:s.focus()}}async setVisible(s){this.showToast(s)}render(){return t("slot",null)}get el(){return i(this)}static get watchers(){return{openToast:["watchOpenToastHandler"]}}};export{e as ic_toast_region};
|
2
|
-
//# sourceMappingURL=p-1145e33c.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["ToastRegion","this","pendingVisibility","showToast","toast","visibleToasts","Array","from","document","querySelectorAll","filter","el","window","getComputedStyle","display","indexOf","length","setVisible","then","res","previouslyFocused","push","watchOpenToastHandler","newValue","openToast","undefined","handleDismissedToast","shift","setFocus","_a","focus","render","h"],"sources":["src/components/ic-toast-region/ic-toast-region.tsx"],"sourcesContent":["import {\n Component,\n Element,\n h,\n Listen,\n Method,\n Prop,\n Watch,\n} from \"@stencil/core\";\nimport { IcFocusableComponents } from \"../../utils/types\";\n\n@Component({ tag: \"ic-toast-region\" })\nexport class ToastRegion {\n private pendingVisibility: HTMLIcToastElement[] = [];\n private previouslyFocused: HTMLElement;\n\n @Element() el: HTMLIcToastRegionElement;\n\n /**\n * The toast element to be displayed.\n */\n @Prop({ mutable: true }) openToast: HTMLIcToastElement;\n @Watch(\"openToast\")\n watchOpenToastHandler(newValue: HTMLIcToastElement): void {\n if (this.openToast !== undefined) {\n this.showToast(newValue);\n this.openToast = undefined;\n }\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleDismissedToast(): void {\n if (this.pendingVisibility.length > 0) {\n this.pendingVisibility[0]\n .setVisible()\n .then((res) => (this.previouslyFocused = res));\n this.pendingVisibility.shift();\n } else {\n if (this.previouslyFocused && \"setFocus\" in this.previouslyFocused) {\n (this.previouslyFocused as IcFocusableComponents).setFocus();\n } else this.previouslyFocused?.focus();\n }\n }\n\n private showToast = (toast: HTMLIcToastElement) => {\n const visibleToasts = Array.from(\n document.querySelectorAll(\"ic-toast\")\n ).filter((el) => window.getComputedStyle(el).display !== \"none\");\n if (visibleToasts.indexOf(toast) === -1 && visibleToasts.length <= 0) {\n toast.setVisible().then((res) => (this.previouslyFocused = res));\n }\n if (visibleToasts.length > 0) this.pendingVisibility.push(toast);\n };\n\n /**\n * @deprecated Use openToast prop to display toast instead.\n * @param {HTMLIcToastElement} toast The toast component to display\n */\n @Method()\n async setVisible(toast: HTMLIcToastElement): Promise<void> {\n this.showToast(toast);\n }\n\n render() {\n return <slot></slot>;\n }\n}\n"],"mappings":"wDAYaA,EAAW,M,yBACdC,KAAAC,kBAA0C,GA+B1CD,KAAAE,UAAaC,IACnB,MAAMC,EAAgBC,MAAMC,KAC1BC,SAASC,iBAAiB,aAC1BC,QAAQC,GAAOC,OAAOC,iBAAiBF,GAAIG,UAAY,SACzD,GAAIT,EAAcU,QAAQX,MAAY,GAAKC,EAAcW,QAAU,EAAG,CACpEZ,EAAMa,aAAaC,MAAMC,GAASlB,KAAKmB,kBAAoBD,G,CAE7D,GAAId,EAAcW,OAAS,EAAGf,KAAKC,kBAAkBmB,KAAKjB,EAAM,E,yBA5BlE,qBAAAkB,CAAsBC,GACpB,GAAItB,KAAKuB,YAAcC,UAAW,CAChCxB,KAAKE,UAAUoB,GACftB,KAAKuB,UAAYC,S,EAKrB,oBAAAC,G,MACE,GAAIzB,KAAKC,kBAAkBc,OAAS,EAAG,CACrCf,KAAKC,kBAAkB,GACpBe,aACAC,MAAMC,GAASlB,KAAKmB,kBAAoBD,IAC3ClB,KAAKC,kBAAkByB,O,KAClB,CACL,GAAI1B,KAAKmB,mBAAqB,aAAcnB,KAAKmB,kBAAmB,CACjEnB,KAAKmB,kBAA4CQ,U,MAC7CC,EAAA5B,KAAKmB,qBAAiB,MAAAS,SAAA,SAAAA,EAAEC,O,EAmBnC,gBAAMb,CAAWb,GACfH,KAAKE,UAAUC,E,CAGjB,MAAA2B,GACE,OAAOC,EAAA,Y"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icAccordionCss","accordionIds","Accordion","this","accordionId","CONTENT_VISIBILITY_PROPERTY","toggleExpanded","expanded","accordionClicked","emit","id","setAccordionAnimation","el","duration","property","delay","style","transitionDuration","transitionProperty","transitionDelay","setExpandedContentStyle","ev","expandedContent","propertyName","clientHeight","classList","add","height","hideExpandedContent","setProperty","animateExpandedContent","elementHeight","expandedContentEl","scrollHeight","addEventListener","e","remove","handleExpandedWatch","setFocus","accordionBtnHeading","focus","disconnectedCallback","removeEventListener","componentDidLoad","render","appearance","size","disabled","h","Host","class","ref","tabindex","onClick","isSlotUsed","name","variant","innerHTML","chevronIcon","role","message"],"sources":["src/components/ic-accordion/ic-accordion.css?tag=ic-accordion&encapsulation=shadow","src/components/ic-accordion/ic-accordion.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n border-bottom: var(--ic-border-default);\n}\n\n:host ic-typography,\n:host .expand-chevron {\n color: var(--ic-color-primary-text);\n}\n\n:host(.light) ic-typography,\n:host(.light) .expanded-content,\n:host(.light) .icon-container,\n:host(.light) .expand-chevron {\n color: var(--ic-color-white-text);\n}\n\n:host(.disabled) ic-typography,\n:host(.disabled) .icon-container,\n:host(.disabled) .expand-chevron {\n color: var(--ic-architectural-500);\n}\n\n.section-button.small {\n padding: var(--ic-space-xxs) var(--ic-space-xs);\n}\n\n.section-button.large {\n padding: var(--ic-space-sm) var(--ic-space-xs);\n}\n\n:host(:first-of-type) {\n border-top: var(--ic-border-default);\n}\n\n:focus {\n outline: none;\n}\n\n.section-button {\n background-color: transparent;\n display: flex;\n align-items: center;\n width: 100%;\n padding: var(--ic-space-xs);\n font-weight: var(--ic-font-weight-bold);\n border: none;\n}\n\n.section-header {\n text-align: left;\n flex: 1 0;\n}\n\nbutton:hover:enabled {\n background-color: var(--ic-action-dark-bg-hover);\n cursor: pointer;\n}\n\nbutton:active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\nbutton:focus {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n}\n\nbutton:disabled {\n pointer-events: none;\n}\n\n.icon-container {\n margin: 0 var(--ic-space-xs) 0 0;\n display: flex;\n align-items: center;\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n::slotted(svg) {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n}\n\n.expand-chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n margin-left: calc(var(--ic-space-xl) + var(--ic-space-xs));\n transform: rotate(90deg);\n justify-self: end;\n}\n\n.content-expanded-chevron {\n transform: rotate(-90deg);\n}\n\n.expanded-content {\n height: 0;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n visibility: var(--ic-expanded-content-visibility, hidden);\n}\n\n.expanded-content-inner {\n padding: var(--ic-space-xs);\n}\n\n.expanded-content-opened {\n overflow: visible;\n}\n","import {\n Component,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n Host,\n Watch,\n Method,\n} from \"@stencil/core\";\nimport { isSlotUsed } from \"../../utils/helpers\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport { IcThemeForeground, IcSizes } from \"../../utils/types\";\n\nlet accordionIds = 0;\n\n/**\n * @slot heading - Content is placed as the accordion heading.\n * @slot icon - Content is placed to the left of the heading.\n */\n\n@Component({\n tag: \"ic-accordion\",\n styleUrl: \"ic-accordion.css\",\n shadow: true,\n})\nexport class Accordion {\n private accordionId = `ic-accordion-${accordionIds++}`;\n private expandedContentEl: HTMLDivElement;\n private accordionBtnHeading: HTMLButtonElement;\n private CONTENT_VISIBILITY_PROPERTY = \"--ic-expanded-content-visibility\";\n\n @Element() el: HTMLIcAccordionElement;\n /**\n * @internal Determines whether the light or dark variant of the accordion should be displayed.\n */\n @Prop() appearance?: IcThemeForeground = \"default\";\n\n /**\n * If `true`, the accordion will be disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the accordion appears expanded.\n */\n @Prop({ mutable: true }) expanded: boolean = false;\n\n /**\n * The section header outlining section content.\n */\n @Prop() heading?: string = \"\";\n\n /**\n * The main body message of the accordion.\n */\n @Prop() message?: string = \"\";\n\n /**\n * The size of the accordion.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * @internal Emitted when accordion is clicked.\n */\n @Event() accordionClicked: EventEmitter<{ id: string }>;\n\n // Every time expanded is set via toggleExpanded or accordionGroup, animate to open or close\n @Watch(\"expanded\")\n handleExpandedWatch(): void {\n this.animateExpandedContent();\n }\n\n /**\n * Sets focus on accordion heading.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.accordionBtnHeading) {\n this.accordionBtnHeading.focus();\n }\n }\n\n disconnectedCallback(): void {\n if (this.expandedContentEl) {\n this.expandedContentEl.removeEventListener(\n \"transitionend\",\n (e) => this.setExpandedContentStyle(e, this.expandedContentEl),\n true\n );\n this.expandedContentEl.removeEventListener(\n \"transitionend\",\n (e) => this.hideExpandedContent(e, this.expandedContentEl),\n true\n );\n }\n }\n\n componentDidLoad(): void {\n // So accordion opens by default if expanded set to true\n if (this.expanded) {\n this.expandedContentEl.style.height = \"auto\";\n this.expandedContentEl.style.setProperty(\n this.CONTENT_VISIBILITY_PROPERTY,\n \"visible\"\n );\n }\n }\n\n private toggleExpanded = (): void => {\n this.expanded = !this.expanded;\n this.accordionClicked.emit({ id: this.accordionId });\n };\n\n // Set accordion animation\n private setAccordionAnimation = (\n el: HTMLElement,\n duration: string,\n property: string,\n delay: string\n ) => {\n el.style.transitionDuration = `${duration}ms`;\n el.style.transitionProperty = property;\n el.style.transitionDelay = delay;\n };\n\n private setExpandedContentStyle = (\n ev: TransitionEvent,\n expandedContent: HTMLDivElement\n ) => {\n if (ev.propertyName === \"height\" && expandedContent.clientHeight > 0) {\n expandedContent.classList.add(\"expanded-content-opened\");\n expandedContent.style.height = \"auto\";\n }\n };\n\n private hideExpandedContent = (\n ev: TransitionEvent,\n expandedContent: HTMLDivElement\n ) => {\n if (ev.propertyName === \"height\" && expandedContent.clientHeight === 0) {\n expandedContent.style.setProperty(\n this.CONTENT_VISIBILITY_PROPERTY,\n \"hidden\"\n );\n }\n };\n\n private animateExpandedContent = () => {\n const elementHeight = this.expandedContentEl.scrollHeight;\n if (elementHeight > 0 && this.expanded) {\n this.expandedContentEl.style.setProperty(\n this.CONTENT_VISIBILITY_PROPERTY,\n \"visible\"\n );\n this.expandedContentEl.style.height = `${elementHeight}px`;\n this.setAccordionAnimation(\n this.expandedContentEl,\n \"300\",\n \"height\",\n \"ease-out\"\n );\n\n this.expandedContentEl.addEventListener(\n \"transitionend\",\n (e: TransitionEvent) => {\n this.setExpandedContentStyle(e, this.expandedContentEl);\n }\n );\n } else if (!this.expanded) {\n this.expandedContentEl.style.height = `${this.expandedContentEl.scrollHeight}px`;\n if (this.expandedContentEl.scrollHeight > 0 && !this.expanded) {\n this.expandedContentEl.style.height = \"0\";\n this.setAccordionAnimation(\n this.expandedContentEl,\n \"300\",\n \"height\",\n \"ease-in\"\n );\n this.expandedContentEl.classList.remove(\"expanded-content-opened\");\n }\n this.expandedContentEl.addEventListener(\"transitionend\", (e) => {\n this.hideExpandedContent(e, this.expandedContentEl);\n });\n }\n };\n\n render() {\n const { appearance, size, disabled, expanded } = this;\n return (\n <Host\n id={this.accordionId}\n class={{\n [`${appearance}`]: true,\n [\"disabled\"]: disabled,\n }}\n aria-disabled={disabled ? \"true\" : \"false\"}\n >\n <button\n ref={(el) => (this.accordionBtnHeading = el)}\n id={`${this.accordionId}-button`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n class={{\n [`${size}`]: true,\n [\"section-button\"]: true,\n [\"section-button-open\"]: expanded && !disabled,\n }}\n aria-expanded={`${expanded}`}\n aria-controls=\"expanded-content-area\"\n onClick={this.toggleExpanded}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography variant=\"subtitle-large\" class=\"section-header\">\n {isSlotUsed(this.el, \"heading\") ? (\n <slot name=\"heading\" />\n ) : (\n this.heading\n )}\n </ic-typography>\n <span\n class={{\n [\"expand-chevron\"]: true,\n [\"content-expanded-chevron\"]: expanded && !disabled,\n }}\n aria-hidden=\"true\"\n innerHTML={chevronIcon}\n />\n </button>\n <div\n class={{\n [\"expanded-content\"]: true,\n }}\n aria-labelledby={`${this.accordionId}-button`}\n role=\"region\"\n aria-hidden={`${!expanded}`}\n id=\"expanded-content-area\"\n ref={(el) => (this.expandedContentEl = el)}\n >\n <div class=\"expanded-content-inner\">\n {this.message ? (\n <ic-typography variant=\"body\">{this.message}</ic-typography>\n ) : (\n <slot />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"gKAAA,MAAMA,EAAiB,0mICevB,IAAIC,EAAe,E,MAYNC,EAAS,M,4EACZC,KAAAC,YAAc,gBAAgBH,MAG9BE,KAAAE,4BAA8B,mCA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iBN,MAAM,kBAC3CI,EAAWnD,KAAKS,GAAI,WACnBoC,EAAA,QAAMO,KAAK,YAEXpD,KAAY,SAGhB6C,EAAA,QACEE,MAAO,CACL,CAAC,kBAAmB,KACpB,CAAC,4BAA6B3C,IAAawC,GAC5C,cACW,OACZU,UAAWC,KAGfV,EAAA,OACEE,MAAO,CACL,CAAC,oBAAqB,MACvB,kBACgB,GAAG/C,KAAKC,qBACzBuD,KAAK,SAAQ,cACA,IAAIpD,IACjBG,GAAG,wBACHyC,IAAMvC,GAAQT,KAAK6B,kBAAoBpB,GAEvCoC,EAAA,OAAKE,MAAM,0BACR/C,KAAKyD,QACJZ,EAAA,iBAAeQ,QAAQ,QAAQrD,KAAKyD,SAEpCZ,EAAA,e"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icTextFieldCss","inputIds","MUTABLE_ATTRIBUTES","IC_INHERITED_ARIA","TextField","this","inheritedAttributes","hostMutationObserver","getMaxLengthExceeded","value","numChars","length","type","minValueUnattained","Number","min","maxValueExceeded","max","maxLength","maxLengthExceeded","getMaxCharactersReached","maxCharactersReached","maxCharacters","maxCharactersError","onInput","ev","target","icInput","emit","onBlur","minCharactersUnattained","minCharacters","icBlur","onFocus","icFocus","hasStatus","status","disabled","handleFormReset","initialValue","hostMutationCallback","mutationList","forceComponentUpdate","forEach","attributeName","addedNodes","removedNodes","includes","el","getAttribute","checkSlotInChildMutations","forceUpdate","undefined","inputId","debounceChanged","icChange","debounceEvent","debounce","watchValueHandler","newValue","inputEl","connectedCallback","disconnectedCallback","removeFormResetListener","_a","disconnect","componentWillLoad","inheritAttributes","readonly","addFormResetListener","removeDisabledFalse","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","validationInlineInternal","getValidationText","validationText","MutationObserver","observe","attributes","childList","handleKeyDown","icKeydown","event","setFocus","focus","render","name","required","size","small","placeholder","helperText","rows","resize","validationStatus","validationInline","spellcheck","inputmode","fullWidth","truncateValue","hiddenInput","disabledMode","currentStatus","IcInformationStatus","Warning","Error","currentValidationText","maxNumChars","messageAriaLive","showStatusText","Success","multiline","hiddenCharCountDescId","describedBy","getInputDescribedByText","trim","disabledText","showLeftIcon","querySelector","invalid","renderHiddenInput","h","Host","class","hideLabel","for","multiLine","slot","Object","assign","id","ref","ariaActiveDescendant","ariaExpanded","ariaOwns","autocomplete","autocapitalize","autoFocus","role","maxlength","minlength","isSlotUsed","isEmptyString","message","ariaLiveMode","variant","hidden"],"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field\n */\n display: block;\n}\n\n:host(.fullwidth) {\n width: 100%;\n}\n\n::placeholder {\n color: var(--ic-color-tertiary-text);\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 0.375rem;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(--ic-architectural-200);\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-color-primary-text);\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.maxlengthtext {\n color: var(--ic-color-secondary-text);\n padding-right: var(--ic-space-xxxs);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-primary-text);\n}\n\n.charcount {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\n} from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n isSlotUsed,\n removeDisabledFalse,\n checkSlotInChildMutations,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n private inheritedAttributes: { [k: string]: string } = {};\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcTextFieldElement;\n\n @State() numChars: number = 0;\n @State() maxCharactersReached: boolean = false;\n @State() maxCharactersError: boolean = false;\n @State() minCharactersUnattained: boolean = false;\n @State() maxLengthExceeded: boolean = false;\n @State() maxValueExceeded: boolean = false;\n @State() minValueUnattained: boolean = false;\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete: IcAriaAutocompleteTypes = undefined;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns: string;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autoFocus = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-text-field-input-${inputIds++}`;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * The maximum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of max value in `helperText` or `label`)\n */\n @Prop() max: string | number = undefined;\n\n /**\n * The maximum number of characters that can be entered in the field. Will display an error if too many characters are entered.\n */\n @Prop() maxCharacters: number = 0;\n\n /**\n * The count of characters in the field. Will display a warning if the bound is reached.\n */\n @Prop() maxLength: number = 0;\n\n /**\n * The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)\n */\n @Prop() min: string | number = undefined;\n\n /**\n * The minimum number of characters that can be entered in the field.\n */\n @Prop() minCharacters: number = 0;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * The size of the text field component.\n */\n @Prop() size?: IcSizesNoLarge = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue?: boolean;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * @internal If `true`, the validation will display inline.\n */\n @Prop() validationInlineInternal: boolean = false;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce: number = 0;\n\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = \"\";\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n private watchValueHandler(newValue: string): void {\n if (this.inputEl && this.inputEl.value !== newValue) {\n this.inputEl.value = newValue;\n }\n\n this.getMaxLengthExceeded(newValue);\n\n this.getMaxCharactersReached(newValue);\n\n this.icChange.emit({ value: newValue });\n }\n\n /**\n * @internal Emitted when the validationInlineInternal is `true`\n */\n @Event() getValidationText: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n if (this.value !== this.initialValue) {\n this.watchValueHandler(this.value);\n }\n\n this.getMaxLengthExceeded(this.value);\n\n this.getMaxCharactersReached(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);\n\n if (this.readonly) {\n this.maxLengthExceeded = false;\n this.maxValueExceeded = false;\n this.minValueUnattained = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n if (this.validationInlineInternal) {\n this.getValidationText.emit({ value: this.validationText });\n }\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n }\n\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n this.maxCharactersError = this.maxCharactersReached;\n }\n\n /**\n * Sets focus on the native `input`.\n */\n\n @Method()\n async setFocus(): Promise<void> {\n this.inputEl?.focus();\n }\n\n private getMaxLengthExceeded = (value: string) => {\n this.numChars = value.length;\n\n if (this.type === \"number\") {\n this.minValueUnattained = value && Number(value) < Number(this.min);\n this.maxValueExceeded = Number(value) > Number(this.max);\n }\n\n if (this.maxLength > 0) {\n this.maxLengthExceeded = this.numChars > this.maxLength;\n }\n };\n\n private getMaxCharactersReached = (value: string) => {\n this.numChars = value.length;\n this.maxCharactersReached =\n this.maxCharacters > 0 ? this.numChars >= this.maxCharacters : false;\n\n if (this.maxCharactersError && !this.maxCharactersReached) {\n this.maxCharactersError = false;\n }\n };\n\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n private onBlur = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.numChars = value.length;\n this.minCharactersUnattained =\n this.minCharacters > 0 ? this.numChars < this.minCharacters : false;\n this.icBlur.emit({ value: value });\n };\n\n private onFocus = (ev: Event) => {\n this.icFocus.emit({ value: (ev.target as HTMLInputElement).value });\n };\n\n private hasStatus = (status: IcInformationStatusOrEmpty) =>\n status !== \"\" && !this.disabled;\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] =\n this.el.getAttribute(attributeName);\n forceComponentUpdate = true;\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n size,\n small,\n placeholder,\n helperText,\n rows,\n resize,\n disabled,\n value,\n min,\n max,\n maxLength,\n numChars,\n readonly,\n maxLengthExceeded,\n maxCharacters,\n maxCharactersError,\n maxCharactersReached,\n minCharacters,\n minCharactersUnattained,\n minValueUnattained,\n maxValueExceeded,\n validationStatus,\n validationText,\n validationInline,\n validationInlineInternal,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n } = this;\n\n const disabledMode = readonly ? true : disabled;\n\n const currentStatus =\n maxLengthExceeded ||\n maxValueExceeded ||\n minValueUnattained ||\n minCharactersUnattained ||\n maxCharactersError\n ? maxCharactersError\n ? IcInformationStatus.Warning\n : IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxLengthExceeded\n ? \"Maximum length exceeded\"\n : maxCharactersError\n ? `Maximum input is ${maxCharacters} characters`\n : maxValueExceeded\n ? `Maximum value of ${max} exceeded`\n : minValueUnattained\n ? `Minimum value of ${min} not met`\n : minCharactersUnattained\n ? `Minimum input is ${minCharacters} characters`\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxLength;\n const messageAriaLive =\n maxLengthExceeded ||\n maxCharactersError ||\n maxValueExceeded ||\n minValueUnattained ||\n (maxLength === 0 && currentStatus === IcInformationStatus.Error)\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText =\n this.hasStatus(currentStatus) &&\n !(currentStatus == IcInformationStatus.Success && validationInline) &&\n !validationInlineInternal;\n\n const multiline = rows > 1;\n const hiddenCharCountDescId =\n maxLength > 0 ? `${inputId}-charcount-desc` : \"\";\n\n const describedBy = `${hiddenCharCountDescId} ${getInputDescribedByText(\n inputId,\n helperText !== \"\",\n showStatusText\n )}`.trim();\n\n const disabledText = disabledMode && !readonly;\n const showLeftIcon =\n !!this.el.querySelector(`[slot=\"icon\"]`) && !disabledText;\n\n const invalid = `${currentStatus === IcInformationStatus.Error}`;\n\n if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n return (\n <Host class={{ [\"fullwidth\"]: fullWidth }}>\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n size={small ? \"small\" : size}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {showLeftIcon && (\n <span\n class={{\n [\"readonly\"]: readonly,\n [\"has-value\"]: value.length > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline ? (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={this.type}\n min={min}\n max={max}\n value={value}\n class={{\n [\"no-left-pad\"]: !showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n [\"truncate-value\"]: truncateValue,\n }}\n placeholder={placeholder ? placeholder : \"\"}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></input>\n ) : (\n <textarea\n id={inputId}\n class={{\n [\"no-resize\"]: resize === false || readonly,\n [\"no-left-pad\"]: !showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholder ? placeholder : \"\"}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n {isSlotUsed(this.el, \"clear-button\") && (\n <slot name=\"clear-button\"></slot>\n )}\n {isSlotUsed(this.el, \"search-submit-button\") && (\n <slot name=\"search-submit-button\"></slot>\n )}\n </ic-input-component-container>\n {isSlotUsed(this.el, \"menu\") && <slot name=\"menu\"></slot>}\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0 ||\n maxValueExceeded ||\n maxCharactersError ||\n minCharactersUnattained ||\n minValueUnattained) &&\n !validationInlineInternal && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline) ||\n validationInlineInternal\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n <ic-typography\n variant=\"caption\"\n class={{\n [\"maxlengthtext\"]: true,\n [\"error\"]: maxLengthExceeded,\n [\"disabled\"]: disabledText,\n }}\n >\n <span\n aria-live=\"polite\"\n id={`${inputId}-charcount`}\n class=\"charcount\"\n >\n {numChars}/{maxNumChars}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </ic-typography>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"mappings":"4NAAA,MAAMA,EAAiB,k6HC0CvB,IAAIC,EAAW,EACf,MAAMC,EAAqB,IAAIC,EAAmB,S,MAUrCC,EAAS,M,uPACZC,KAAAC,oBAA+C,GAE/CD,KAAAE,qBAAyC,KAuUzCF,KAAAG,qBAAwBC,IAC9BJ,KAAKK,SAAWD,EAAME,OAEtB,GAAIN,KAAKO,OAAS,SAAU,CAC1BP,KAAKQ,mBAAqBJ,GAASK,OAAOL,GAASK,OAAOT,KAAKU,KAC/DV,KAAKW,iBAAmBF,OAAOL,GAASK,OAAOT,KAAKY,I,CAGtD,GAAIZ,KAAKa,UAAY,EAAG,CACtBb,KAAKc,kBAAoBd,KAAKK,SAAWL,KAAKa,S,GAI1Cb,KAAAe,wBAA2BX,IACjCJ,KAAKK,SAAWD,EAAME,OACtBN,KAAKgB,qBACHhB,KAAKiB,cAAgB,EAAIjB,KAAKK,UAAYL,KAAKiB,cAAgB,MAEjE,GAAIjB,KAAKkB,qBAAuBlB,KAAKgB,qBAAsB,CACzDhB,KAAKkB,mBAAqB,K,GAItBlB,KAAAm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ENyC,QAASlC,EAAiBH,EAAwB,GAClDsC,aAAcpC,EACdiB,IAAK3E,EACLgD,UAAWA,IAETjC,GAAY0C,EAAc,GAC1Bc,EAAA,OAAKM,KAAK,gCACRN,EAAA,iBACEwB,QAAQ,UACRtB,MAAO,CACL,CAAC,iBAAkB,KACnB,CAAC,SAAU3G,EACX,CAAC,YAAaoG,IAGhBK,EAAA,oBACY,SACVS,GAAI,GAAGhF,cACPyE,MAAM,aAELpH,EAAQ,IAAGoG,GAEdc,EAAA,QAAMyB,OAAQ,KAAMhB,GAAIlB,GAAqB,kCACXL,EAAW,oB"}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as e,c as t,f as i,h as a,H as r,g as s}from"./p-6b5e91e2.js";import{c as n}from"./p-f074ef5b.js";import{j as o,V as l,i as c}from"./p-fef9e8c9.js";import{I as d}from"./p-26b7b18f.js";const u='/*! 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)}}';const m=class{constructor(a){e(this,a);this.dismiss=t(this,"dismiss",7);this.icDismiss=t(this,"icDismiss",7);this.hostMutationObserver=null;this.dismissAction=()=>{this.dismiss.emit();this.icDismiss.emit()};this.hostMutationCallback=e=>{if(e.some((({type:e,addedNodes:t,removedNodes:i})=>e==="childList"?o(t,i,"action"):false))){i(this)}};this.alertTitleWrap=false;this.visible=true;this.announced=true;this.dismissible=false;this.heading="";this.message=undefined;this.titleAbove=false;this.variant="neutral"}disconnectedCallback(){var e;(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect()}componentDidLoad(){this.alertTitleShouldWrap();this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{childList:true})}handleClick(){this.visible=!this.visible}alertTitleShouldWrap(){var e;const t=(e=this.el.shadowRoot.querySelector(".alert-title"))===null||e===void 0?void 0:e.clientHeight;if(t>24)this.alertTitleWrap=true}render(){const{variant:e,heading:t,message:i,titleAbove:s,dismissible:o,announced:u,visible:m}=this;return m&&a(r,{role:u?"alert":null,class:{[d.Dark]:true}},a("div",{class:{["container"]:true,[`container-${e}`]:true}},a("div",{class:"alert-icon-container"},a("div",{class:{["divider"]:true,[`divider-${e}`]:true}}),a("span",{class:{["alert-icon"]:true,["svg-container"]:true,[`icon-${e}`]:true},innerHTML:l[e].icon})),a("div",{class:"alert-content"},a("div",{class:{["alert-message"]:true,["alert-message-title-above"]:s||this.alertTitleWrap}},t&&a("ic-typography",{class:{["alert-title"]:true,["alert-title-above"]:s||this.alertTitleWrap},variant:"subtitle-large"},a("p",null,t)),a("slot",{name:"message"},a("ic-typography",{variant:"body"},i))),c(this.el,"action")&&a("div",{class:"alert-action-container"},a("slot",{name:"action"}))),a("div",{class:"dismiss-icon-container"},o&&a("ic-button",{class:{["svg-container"]:true,["dismiss-icon"]:true},innerHTML:n,onClick:this.dismissAction,variant:"icon",appearance:d.Dark,title:"dismiss"}))))}get el(){return s(this)}};m.style=u;export{m as ic_alert};
|
2
|
-
//# sourceMappingURL=p-ad67c84f.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icAlertCss","Alert","this","hostMutationObserver","dismissAction","dismiss","emit","icDismiss","hostMutationCallback","mutationList","some","type","addedNodes","removedNodes","checkSlotInChildMutations","forceUpdate","disconnectedCallback","_a","disconnect","componentDidLoad","alertTitleShouldWrap","MutationObserver","observe","el","childList","handleClick","visible","titleHeight","shadowRoot","querySelector","clientHeight","alertTitleWrap","render","variant","heading","message","titleAbove","dismissible","announced","h","Host","role","class","IcThemeForegroundEnum","Dark","innerHTML","VARIANT_ICONS","icon","name","isSlotUsed","closeIcon","onClick","appearance","title"],"sources":["src/components/ic-alert/ic-alert.css?tag=ic-alert&encapsulation=shadow","src/components/ic-alert/ic-alert.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\n.container {\n min-height: 3.5rem;\n border-radius: var(--ic-border-radius);\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.container-neutral {\n background-color: var(--ic-status-unknown-light);\n}\n\n.container-info {\n background-color: var(--ic-status-info-light);\n}\n\n.container-warning {\n background-color: var(--ic-status-warning-light);\n}\n\n.container-error {\n background-color: var(--ic-status-error-light);\n}\n\n.container-success {\n background-color: var(--ic-status-success-light);\n}\n\n.alert-icon-container {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.divider {\n height: 100%;\n width: var(--ic-space-xs);\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n position: absolute;\n}\n\n.divider-neutral {\n background-color: var(--ic-status-unknown);\n}\n\n.divider-info {\n background-color: var(--ic-status-info);\n}\n\n.divider-warning {\n background-color: var(--ic-status-warning);\n}\n\n.divider-error {\n background-color: var(--ic-status-error);\n}\n\n.divider-success {\n background-color: var(--ic-status-success);\n}\n\n.alert-icon {\n height: var(--ic-space-lg);\n width: 1.375rem;\n margin-left: 1.125rem;\n}\n\n.alert-icon > svg {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n display: inline-block;\n}\n\n.icon-neutral > svg {\n fill: var(--ic-status-unknown);\n}\n\n:host([variant=\"info\"]) .alert-icon svg {\n fill: var(--ic-status-info);\n}\n\n:host([variant=\"warning\"]) .alert-icon svg {\n fill: var(--ic-status-warning);\n}\n\n:host([variant=\"error\"]) .alert-icon svg {\n fill: var(--ic-status-error);\n}\n\n:host([variant=\"success\"]) .alert-icon svg {\n fill: var(--ic-status-success);\n}\n\n.alert-content {\n display: flex;\n align-items: center;\n margin-left: 0.625rem;\n width: 100%;\n}\n\n.alert-message {\n display: flex;\n align-items: center;\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n flex: 1;\n}\n\n.alert-message-title-above {\n display: inline;\n}\n\n.alert-title {\n margin-right: var(--ic-space-xs);\n}\n\n.alert-title-above {\n white-space: normal;\n}\n\n.alert-action-container {\n margin-right: var(--ic-space-xs);\n display: flex;\n align-items: center;\n}\n\n.dismiss-icon {\n margin-right: var(--ic-space-xxxs);\n margin-left: -0.375rem;\n padding: 0.375rem;\n border: none;\n border-radius: 50%;\n background-color: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.dismiss-icon:hover {\n cursor: pointer;\n}\n\n@media (max-width: 628px) {\n .alert-content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .alert-message {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .alert-title {\n white-space: normal;\n }\n\n .alert-action-container {\n margin-bottom: var(--ic-space-xs);\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-hc-border);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n State,\n Listen,\n Prop,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { isSlotUsed, checkSlotInChildMutations } from \"../../utils/helpers\";\nimport { IcThemeForegroundEnum, IcStatusVariants } from \"../../utils/types\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\n\n/**\n * @slot message - Content is placed to the right of the title.\n * @slot action - Content is placed to the right of the message.\n */\n@Component({\n tag: \"ic-alert\",\n styleUrl: \"ic-alert.css\",\n shadow: true,\n})\nexport class Alert {\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcAlertElement;\n\n @State() alertTitleWrap: boolean = false;\n @State() visible: boolean = true;\n\n /**\n * If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\n */\n @Prop() announced?: boolean = true;\n\n /**\n * If `true`, the alert will have a close icon at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n\n /**\n * The optional title to display at the start of the alert.\n */\n @Prop() heading?: string = \"\";\n\n /**\n * The main body message of the alert.\n */\n @Prop() message?: string;\n\n /**\n * If `true`, the title and message will appear above and below instead of inline.\n */\n @Prop() titleAbove?: boolean = false;\n\n /**\n * The variant of the alert which will be rendered.\n */\n @Prop() variant?: IcStatusVariants = \"neutral\";\n\n /**\n * @deprecated This event should not be used anymore. Use icDismiss instead.\n */\n @Event() dismiss: EventEmitter<void>;\n\n /**\n * Is emitted when the user dismisses the alert.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n componentDidLoad(): void {\n this.alertTitleShouldWrap();\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n this.icDismiss.emit();\n };\n\n private alertTitleShouldWrap() {\n const titleHeight =\n this.el.shadowRoot.querySelector(\".alert-title\")?.clientHeight;\n if (titleHeight > 24) this.alertTitleWrap = true;\n }\n\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n if (\n mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, \"action\")\n : false\n )\n ) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n variant,\n heading,\n message,\n titleAbove,\n dismissible,\n announced,\n visible,\n } = this;\n\n return (\n visible && (\n <Host\n role={announced ? \"alert\" : null}\n class={{\n [IcThemeForegroundEnum.Dark]: true,\n }}\n >\n <div\n class={{\n [\"container\"]: true,\n [`container-${variant}`]: true,\n }}\n >\n <div class=\"alert-icon-container\">\n <div\n class={{\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n }}\n ></div>\n <span\n class={{\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }}\n innerHTML={VARIANT_ICONS[variant].icon}\n ></span>\n </div>\n <div class=\"alert-content\">\n <div\n class={{\n [\"alert-message\"]: true,\n [\"alert-message-title-above\"]:\n titleAbove || this.alertTitleWrap,\n }}\n >\n {heading && (\n <ic-typography\n class={{\n [\"alert-title\"]: true,\n [\"alert-title-above\"]: titleAbove || this.alertTitleWrap,\n }}\n variant=\"subtitle-large\"\n >\n <p>{heading}</p>\n </ic-typography>\n )}\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"alert-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n <div class=\"dismiss-icon-container\">\n {dismissible && (\n <ic-button\n class={{\n [\"svg-container\"]: true,\n [\"dismiss-icon\"]: true,\n }}\n innerHTML={closeIcon}\n onClick={this.dismissAction}\n variant=\"icon\"\n appearance={IcThemeForegroundEnum.Dark}\n title=\"dismiss\"\n ></ic-button>\n )}\n </div>\n </div>\n </Host>\n )\n );\n }\n}\n"],"mappings":"iMAAA,MAAMA,EAAa,0sJ,MC0BNC,EAAK,M,+FACRC,KAAAC,qBAAyC,KAiEzCD,KAAAE,cAAgB,KACtBF,KAAKG,QAAQC,OACbJ,KAAKK,UAAUD,MAAM,EASfJ,KAAAM,qBAAwBC,IAC9B,GACEA,EAAaC,MAAK,EAAGC,OAAMC,aAAYC,kBACrCF,IAAS,YACLG,EAA0BF,EAAYC,EAAc,UACpD,QAEN,CACAE,EAAYb,K,uBAhFmB,M,aACP,K,eAKE,K,iBAKE,M,aAKL,G,uCAUI,M,aAKM,S,CAYrC,oBAAAc,G,OACEC,EAAAf,KAAKC,wBAAoB,MAAAc,SAAA,SAAAA,EAAEC,Y,CAG7B,gBAAAC,GACEjB,KAAKkB,uBAELlB,KAAKC,qBAAuB,IAAIkB,iBAAiBnB,KAAKM,sBACtDN,KAAKC,qBAAqBmB,QAAQpB,KAAKqB,GAAI,CACzCC,UAAW,M,CAKf,WAAAC,GACEvB,KAAKwB,SAAWxB,KAAKwB,O,CAQf,oBAAAN,G,MACN,MAAMO,GACJV,EAAAf,KAAKqB,GAAGK,WAAWC,cAAc,mBAAe,MAAAZ,SAAA,SAAAA,EAA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e8c9.js";import"./p-26b7b18f.js";const p="@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 d=class{constructor(a){s(this,a);this.ariaLabel=null;this.setBadgeColour=()=>{const s=c(this.customColor);if(s){this.customColorRGBA=s;const{r:a,g:t,b:i,a:c}=s;this.el.style.backgroundColor=`rgba(${a}, ${t}, ${i}, ${c})`}};this.getBadgeRGB=()=>{switch(this.variant){case"custom":return this.customColorRGBA;case"error":case"success":case"warning":case"info":{return o(r(`--ic-status-${this.variant}`))}case"neutral":case"light":return e(r(`--ic-architectural-${this.variant==="neutral"?500:40}`))}};this.getBadgeForeground=()=>{const{r:s,g:a,b:t}=this.getBadgeRGB();this.foregroundColour=h((s*299+a*587+t*114)/1e3)};this.getTextLabel=()=>this.maxNumber&&Number(this.textLabel)>this.maxNumber?`${this.maxNumber}+`:this.textLabel;this.setAccessibleLabel=()=>{const s=this.el.parentElement;const a=this.isAccessibleLabelDefined()?this.accessibleLabel:this.textLabel||"with badge being displayed";if(s){const{tagName:t}=s;if(t!=="IC-CARD"&&(t!=="IC-TAB"||t==="IC-TAB"&&this.parentAriaLabel)){const t=this.parentAriaLabel?`${this.parentAriaLabel} ,`:"";s.ariaLabel=this.visible?`${t} ${a}`:undefined}else{this.ariaLabel=`, ${a}`}}};this.isAccessibleLabelDefined=()=>l(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}accessibleLabelHandler(){this.setAccessibleLabel()}customColorHandler(){this.variant==="custom"&&this.setBadgeColour()}variantHandler(){this.getBadgeForeground()}visibleHandler(){this.setAccessibleLabel()}componentWillLoad(){var s;this.variant==="custom"&&this.setBadgeColour();this.getBadgeForeground();const a=(s=this.el.parentElement)===null||s===void 0?void 0:s.ariaLabel;if(a)this.parentAriaLabel=a;this.setAccessibleLabel()}componentDidLoad(){this.type==="text"&&n([{prop:this.textLabel,propName:"text-label"}],"Badge")}async showBadge(){this.visible=true}async hideBadge(){this.visible=false}render(){const{ariaLabel:s,el:i,foregroundColour:c,getTextLabel:e,position:r,size:o,textLabel:h,type:l,variant:n,visible:p}=this;return a(t,{class:{[`${r}`]:true,[`${o}`]:true,[`${n}`]:true,[`${l}`]:true,[`foreground-${c}`]:c!==null,[`${p?"show":"hide"}`]:true},id:i.id||null,"aria-label":s,role:"status"},l==="icon"&&a("slot",{name:"badge-icon"}),l==="text"&&h&&a("ic-typography",{variant:o==="small"?"badge-small":"badge"},e()))}static get delegatesFocus(){return true}get el(){return i(this)}static get watchers(){return{accessibleLabel:["accessibleLabelHandler"],customColor:["customColorHandler"],variant:["variantHandler"],visible:["visibleHandler"]}}};d.style=p;export{d as ic_badge};
|
2
|
-
//# sourceMappingURL=p-f735a277.entry.js.map
|