@ukic/web-components 2.1.0-beta.6 → 2.1.0-beta.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/ic-data-row.cjs.entry.js +11 -9
- package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js +1 -1
- package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-link.cjs.entry.js +0 -2
- package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.test.a11y.js +1 -1
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-data-row/ic-data-row.js +11 -9
- package/dist/collection/components/ic-data-row/ic-data-row.js.map +1 -1
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.test.a11y.js +1 -1
- package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-hero/ic-hero.css +5 -0
- package/dist/collection/components/ic-link/ic-link.js +0 -2
- package/dist/collection/components/ic-link/ic-link.js.map +1 -1
- package/dist/collection/components/ic-page-header/ic-page-header.js +1 -1
- package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.test.a11y.js +1 -1
- package/dist/collection/components/ic-radio-group/ic-radio-group.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-tab-context/ic-tab-context.test.a11y.js +1 -1
- package/dist/collection/components/ic-tab-context/ic-tab-context.test.a11y.js.map +1 -1
- package/dist/collection/components/ic-tab-group/ic-tab-group.js +1 -1
- package/dist/collection/components/ic-tab-group/ic-tab-group.js.map +1 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.test.a11y.js +1 -1
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.test.a11y.js.map +1 -1
- package/dist/components/ic-data-row.js +11 -9
- package/dist/components/ic-data-row.js.map +1 -1
- package/dist/components/ic-hero.js +1 -1
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-link2.js +0 -2
- package/dist/components/ic-link2.js.map +1 -1
- package/dist/components/ic-page-header.js +2 -2
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-tab-group.js +1 -1
- package/dist/components/ic-tab-group.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/{p-c1d78a64.entry.js → p-4902b46a.entry.js} +2 -2
- package/dist/core/{p-c1d78a64.entry.js.map → p-4902b46a.entry.js.map} +1 -1
- package/dist/core/{p-9fbceeb2.entry.js → p-541918c2.entry.js} +2 -2
- package/dist/core/{p-9fbceeb2.entry.js.map → p-541918c2.entry.js.map} +1 -1
- package/dist/core/{p-217fa7de.entry.js → p-9020d1ff.entry.js} +2 -2
- package/dist/core/p-9020d1ff.entry.js.map +1 -0
- package/dist/core/{p-eaea567e.entry.js → p-a38cbb3f.entry.js} +2 -2
- package/dist/core/p-a38cbb3f.entry.js.map +1 -0
- package/dist/core/{p-23bf0b7a.entry.js → p-c5e453eb.entry.js} +2 -2
- package/dist/core/p-c5e453eb.entry.js.map +1 -0
- package/dist/esm/ic-data-row.entry.js +11 -9
- package/dist/esm/ic-data-row.entry.js.map +1 -1
- package/dist/esm/ic-hero.entry.js +1 -1
- package/dist/esm/ic-hero.entry.js.map +1 -1
- package/dist/esm/ic-link.entry.js +0 -2
- package/dist/esm/ic-link.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +2 -2
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-tab-group.entry.js +1 -1
- package/dist/esm/ic-tab-group.entry.js.map +1 -1
- package/dist/types/components/ic-link/ic-link.d.ts +0 -1
- package/hydrate/index.js +14 -14
- package/package.json +3 -3
- package/dist/core/p-217fa7de.entry.js.map +0 -1
- package/dist/core/p-23bf0b7a.entry.js.map +0 -1
- package/dist/core/p-eaea567e.entry.js.map +0 -1
package/hydrate/index.js
CHANGED
@@ -7465,14 +7465,16 @@ class DataRow {
|
|
7465
7465
|
checkLabelAbove() {
|
7466
7466
|
var _a;
|
7467
7467
|
const rowSize = (_a = this.el.shadowRoot.querySelector(".data")) === null || _a === void 0 ? void 0 : _a.clientWidth;
|
7468
|
-
if (rowSize
|
7469
|
-
|
7470
|
-
|
7471
|
-
|
7472
|
-
|
7473
|
-
|
7474
|
-
|
7475
|
-
|
7468
|
+
if (rowSize) {
|
7469
|
+
if (rowSize + 46 < DEVICE_SIZES.S) {
|
7470
|
+
this.entitySize = "xs";
|
7471
|
+
}
|
7472
|
+
else if (rowSize + 46 < DEVICE_SIZES.M) {
|
7473
|
+
this.entitySize = "m";
|
7474
|
+
}
|
7475
|
+
else {
|
7476
|
+
this.entitySize = "xl";
|
7477
|
+
}
|
7476
7478
|
}
|
7477
7479
|
}
|
7478
7480
|
labelEndComponent() {
|
@@ -7482,10 +7484,10 @@ class DataRow {
|
|
7482
7484
|
componentWillLoad() {
|
7483
7485
|
this.deviceSize = getCurrentDeviceSize();
|
7484
7486
|
this.hasEndComponent = slotHasContent(this.el, "end-component");
|
7487
|
+
this.checkLabelAbove();
|
7485
7488
|
}
|
7486
7489
|
componentDidLoad() {
|
7487
7490
|
checkResizeObserver(this.runResizeObserver);
|
7488
|
-
this.checkLabelAbove();
|
7489
7491
|
if (this.hasEndComponent) {
|
7490
7492
|
this.labelEndComponent();
|
7491
7493
|
}
|
@@ -7785,7 +7787,7 @@ class FooterLinkGroup {
|
|
7785
7787
|
}; }
|
7786
7788
|
}
|
7787
7789
|
|
7788
|
-
const icHeroCss = "/*!@html*/html.sc-ic-hero{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-hero{margin:0}/*!@main*/main.sc-ic-hero{display:block}/*!@h1*/h1.sc-ic-hero{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-hero{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-hero{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-hero{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-hero{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-hero,strong.sc-ic-hero{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-hero,kbd.sc-ic-hero,samp.sc-ic-hero{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-hero{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-hero,sup.sc-ic-hero{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-hero{bottom:-0.25em}/*!@sup*/sup.sc-ic-hero{top:-0.5em}/*!@img*/img.sc-ic-hero{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-hero,input.sc-ic-hero,optgroup.sc-ic-hero,select.sc-ic-hero,textarea.sc-ic-hero{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-hero,input.sc-ic-hero{overflow:visible}/*!@button,\nselect*/button.sc-ic-hero,select.sc-ic-hero{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-hero,[type=\"button\"].sc-ic-hero,[type=\"reset\"].sc-ic-hero,[type=\"submit\"].sc-ic-hero{-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-hero::-moz-focus-inner,[type=\"button\"].sc-ic-hero::-moz-focus-inner,[type=\"reset\"].sc-ic-hero::-moz-focus-inner,[type=\"submit\"].sc-ic-hero::-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-hero:-moz-focusring,[type=\"button\"].sc-ic-hero:-moz-focusring,[type=\"reset\"].sc-ic-hero:-moz-focusring,[type=\"submit\"].sc-ic-hero:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-hero{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-hero{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-hero{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-hero{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-hero,[type=\"radio\"].sc-ic-hero{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-hero::-webkit-inner-spin-button,[type=\"number\"].sc-ic-hero::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-hero{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-hero::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-hero::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-hero{display:block}/*!@summary*/summary.sc-ic-hero{display:list-item}/*!@template*/template.sc-ic-hero{display:none}/*!@[hidden]*/[hidden].sc-ic-hero{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-hero,body.sc-ic-hero,div.sc-ic-hero,span.sc-ic-hero,applet.sc-ic-hero,object.sc-ic-hero,iframe.sc-ic-hero,h1.sc-ic-hero,h2.sc-ic-hero,h3.sc-ic-hero,h4.sc-ic-hero,h5.sc-ic-hero,h6.sc-ic-hero,p.sc-ic-hero,blockquote.sc-ic-hero,pre.sc-ic-hero,a.sc-ic-hero,abbr.sc-ic-hero,acronym.sc-ic-hero,address.sc-ic-hero,big.sc-ic-hero,cite.sc-ic-hero,code.sc-ic-hero,del.sc-ic-hero,dfn.sc-ic-hero,em.sc-ic-hero,img.sc-ic-hero,ins.sc-ic-hero,kbd.sc-ic-hero,q.sc-ic-hero,s.sc-ic-hero,samp.sc-ic-hero,small.sc-ic-hero,strike.sc-ic-hero,strong.sc-ic-hero,sub.sc-ic-hero,sup.sc-ic-hero,tt.sc-ic-hero,var.sc-ic-hero,b.sc-ic-hero,u.sc-ic-hero,i.sc-ic-hero,center.sc-ic-hero,dl.sc-ic-hero,dt.sc-ic-hero,dd.sc-ic-hero,ol.sc-ic-hero,ul.sc-ic-hero,li.sc-ic-hero,fieldset.sc-ic-hero,form.sc-ic-hero,label.sc-ic-hero,legend.sc-ic-hero,table.sc-ic-hero,caption.sc-ic-hero,tbody.sc-ic-hero,tfoot.sc-ic-hero,thead.sc-ic-hero,tr.sc-ic-hero,th.sc-ic-hero,td.sc-ic-hero,article.sc-ic-hero,aside.sc-ic-hero,canvas.sc-ic-hero,details.sc-ic-hero,embed.sc-ic-hero,figure.sc-ic-hero,figcaption.sc-ic-hero,footer.sc-ic-hero,header.sc-ic-hero,hgroup.sc-ic-hero,menu.sc-ic-hero,nav.sc-ic-hero,output.sc-ic-hero,ruby.sc-ic-hero,section.sc-ic-hero,summary.sc-ic-hero,time.sc-ic-hero,mark.sc-ic-hero,audio.sc-ic-hero,video.sc-ic-hero{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-hero-h{display:block;background-color:var(--ic-theme-tertiary);color:var(--ic-theme-text);--hero-heading-bottom-margin:var(--ic-space-md)}/*!@:host(.dark)*/.dark.sc-ic-hero-h{background-color:var(--ic-theme-secondary)}/*!@:host(.has-background-image)*/.has-background-image.sc-ic-hero-h{background-repeat:no-repeat;background-position:right -100px;background-size:auto calc(100% + 100px);box-shadow:var(--ic-elevation-inset)}@media (prefers-reduced-motion){/*!@:host(.has-background-image)*/.has-background-image.sc-ic-hero-h{background-position:right -100px !important}}/*!@ic-typography.heading-bottom-spacing*/ic-typography.heading-bottom-spacing.sc-ic-hero{margin-bottom:var(--hero-heading-bottom-margin)}/*!@.section-container*/.section-container.sc-ic-hero{display:flex;align-items:center;height:100%}/*!@.left-container*/.left-container.sc-ic-hero{padding:var(--ic-space-xl) 0}/*!@.left-container:not(.left-container-full-width)*/.left-container.sc-ic-hero:not(.left-container-full-width){flex-basis:50%}/*!@.left-container-full-width*/.left-container-full-width.sc-ic-hero{width:100%}/*!@.right-container*/.right-container.sc-ic-hero{flex-basis:50%}/*!@.interaction-container*/.interaction-container.sc-ic-hero{display:flex;gap:var(--ic-space-md);margin-top:var(--ic-space-lg)}/*!@.secondary-container*/.secondary-container.sc-ic-hero{display:flex;flex-direction:column;justify-content:center;border-left:var(--ic-space-xxxs) solid var(--ic-theme-text)}/*!@.secondary-subheading*/.secondary-subheading.sc-ic-hero{margin-top:var(--ic-space-xxs)}/*!@:host([content-aligned=\"left\"]) .left-container,\n:host([content-aligned=\"left\"]) .interaction-container*/[content-aligned=\"left\"].sc-ic-hero-h .left-container.sc-ic-hero,[content-aligned=\"left\"].sc-ic-hero-h .interaction-container.sc-ic-hero{justify-content:flex-start;text-align:left}/*!@:host([content-aligned=\"center\"]) .left-container,\n:host([content-aligned=\"center\"]) .interaction-container*/[content-aligned=\"center\"].sc-ic-hero-h .left-container.sc-ic-hero,[content-aligned=\"center\"].sc-ic-hero-h .interaction-container.sc-ic-hero{justify-content:center;text-align:center}@media (min-width: 992px){/*!@.left-container-full-width*/.left-container-full-width.sc-ic-hero{width:66.6%}}@media (min-width: 1044px){/*!@:host,\n .section-container*/.sc-ic-hero-h,.section-container.sc-ic-hero{min-height:208px}/*!@:host([small]),\n :host([small]) .section-container*/[small].sc-ic-hero-h,[small].sc-ic-hero-h .section-container.sc-ic-hero{min-height:173px}/*!@.left-container:not(.left-container-full-width)*/.left-container.sc-ic-hero:not(.left-container-full-width){flex-basis:66.6%}/*!@.left-container*/.left-container.sc-ic-hero{min-height:144px}/*!@.right-container*/.right-container.sc-ic-hero{flex-basis:33.3%;margin-left:50px}/*!@.secondary-container*/.secondary-container.sc-ic-hero{min-height:144px}/*!@.secondary-heading,\n .secondary-subheading*/.secondary-heading.sc-ic-hero,.secondary-subheading.sc-ic-hero{margin-left:63px}}@media (min-width: 801px) and (max-width: 1043px){/*!@:host(.has-background-image)*/.has-background-image.sc-ic-hero-h{background-image:none !important}/*!@:host,\n .section-container*/.sc-ic-hero-h,.section-container.sc-ic-hero{min-height:256px}/*!@:host([small]),\n :host([small]) .section-container*/[small].sc-ic-hero-h,[small].sc-ic-hero-h .section-container.sc-ic-hero{min-height:240px}/*!@:host([secondary-heading]),\n :host([secondary-heading]) .section-container*/[secondary-heading].sc-ic-hero-h,[secondary-heading].sc-ic-hero-h .section-container.sc-ic-hero{min-height:224px}/*!@.left-container*/.left-container.sc-ic-hero{min-height:160px}/*!@.secondary-container*/.secondary-container.sc-ic-hero{min-height:160px}/*!@.secondary-heading,\n .secondary-subheading*/.secondary-heading.sc-ic-hero,.secondary-subheading.sc-ic-hero{margin-left:94.75px}/*!@.right-container*/.right-container.sc-ic-hero{margin-left:50px}}@media (min-width: 641px) and (max-width: 800px){/*!@:host(.has-background-image)*/.has-background-image.sc-ic-hero-h{background-image:none !important}/*!@:host,\n .section-container*/.sc-ic-hero-h,.section-container.sc-ic-hero{min-height:256px}/*!@:host([small]),\n :host([small]) .section-container*/[small].sc-ic-hero-h,[small].sc-ic-hero-h .section-container.sc-ic-hero{min-height:240px}/*!@:host([secondary-heading]),\n :host([secondary-heading]) .section-container*/[secondary-heading].sc-ic-hero-h,[secondary-heading].sc-ic-hero-h .section-container.sc-ic-hero{min-height:224px}/*!@.left-container*/.left-container.sc-ic-hero{min-height:160px}/*!@.secondary-container*/.secondary-container.sc-ic-hero{min-height:160px}/*!@.secondary-heading,\n .secondary-subheading*/.secondary-heading.sc-ic-hero,.secondary-subheading.sc-ic-hero{margin-left:34px}/*!@.right-container*/.right-container.sc-ic-hero{margin-left:50px}}@media (min-width: 481px) and (max-width: 640px){/*!@:host(.has-background-image)*/.has-background-image.sc-ic-hero-h{background-image:none !important}/*!@:host,\n .section-container*/.sc-ic-hero-h,.section-container.sc-ic-hero{min-height:208px}/*!@:host([small]),\n :host([small]) .section-container*/[small].sc-ic-hero-h,[small].sc-ic-hero-h .section-container.sc-ic-hero{min-height:173px}/*!@:host([secondary-heading]),\n :host([secondary-heading]) .section-container*/[secondary-heading].sc-ic-hero-h,[secondary-heading].sc-ic-hero-h .section-container.sc-ic-hero{min-height:280px}/*!@:host([secondary-heading]) .section-container,\n :host([small]) .section-container,\n .section-container*/[secondary-heading].sc-ic-hero-h .section-container.sc-ic-hero,[small].sc-ic-hero-h .section-container.sc-ic-hero,.section-container.sc-ic-hero{flex-direction:column;align-items:flex-start}/*!@.left-container*/.left-container.sc-ic-hero{height:-moz-fit-content;height:fit-content}/*!@.secondary-container*/.secondary-container.sc-ic-hero{height:-moz-fit-content;height:fit-content;border:none}/*!@.right-container*/.right-container.sc-ic-hero{margin-bottom:40px}}@media (max-width: 480px){/*!@:host(.has-background-image)*/.has-background-image.sc-ic-hero-h{background-image:none !important}/*!@:host,\n .section-container*/.sc-ic-hero-h,.section-container.sc-ic-hero{min-height:192px}/*!@:host([small]),\n :host([small]) .section-container*/[small].sc-ic-hero-h,[small].sc-ic-hero-h .section-container.sc-ic-hero{min-height:173px}/*!@:host([secondary-heading]),\n :host([secondary-heading]) .section-container*/[secondary-heading].sc-ic-hero-h,[secondary-heading].sc-ic-hero-h .section-container.sc-ic-hero{min-height:264px}/*!@:host([secondary-heading]) .section-container,\n :host([small]) .section-container,\n .section-container*/[secondary-heading].sc-ic-hero-h .section-container.sc-ic-hero,[small].sc-ic-hero-h .section-container.sc-ic-hero,.section-container.sc-ic-hero{flex-direction:column;align-items:flex-start}/*!@.left-container*/.left-container.sc-ic-hero{height:-moz-fit-content;height:fit-content}/*!@.secondary-container*/.secondary-container.sc-ic-hero{height:-moz-fit-content;height:fit-content;border:none}}";
|
7790
|
+
const icHeroCss = "/*!@html*/html.sc-ic-hero{line-height:1.15;-webkit-text-size-adjust:100%}/*!@body*/body.sc-ic-hero{margin:0}/*!@main*/main.sc-ic-hero{display:block}/*!@h1*/h1.sc-ic-hero{font-size:2em;margin:0.67em 0}/*!@hr*/hr.sc-ic-hero{box-sizing:content-box;height:0;overflow:visible}/*!@pre*/pre.sc-ic-hero{font-family:monospace, monospace;font-size:1em}/*!@a*/a.sc-ic-hero{background-color:transparent}/*!@abbr[title]*/abbr[title].sc-ic-hero{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}/*!@b,\nstrong*/b.sc-ic-hero,strong.sc-ic-hero{font-weight:bolder}/*!@code,\nkbd,\nsamp*/code.sc-ic-hero,kbd.sc-ic-hero,samp.sc-ic-hero{font-family:monospace, monospace;font-size:1em}/*!@small*/small.sc-ic-hero{font-size:80%}/*!@sub,\nsup*/sub.sc-ic-hero,sup.sc-ic-hero{font-size:75%;line-height:0;position:relative;vertical-align:baseline}/*!@sub*/sub.sc-ic-hero{bottom:-0.25em}/*!@sup*/sup.sc-ic-hero{top:-0.5em}/*!@img*/img.sc-ic-hero{border-style:none}/*!@button,\ninput,\noptgroup,\nselect,\ntextarea*/button.sc-ic-hero,input.sc-ic-hero,optgroup.sc-ic-hero,select.sc-ic-hero,textarea.sc-ic-hero{font-family:inherit;font-size:100%;line-height:1.15;margin:0}/*!@button,\ninput*/button.sc-ic-hero,input.sc-ic-hero{overflow:visible}/*!@button,\nselect*/button.sc-ic-hero,select.sc-ic-hero{text-transform:none}/*!@button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"]*/button.sc-ic-hero,[type=\"button\"].sc-ic-hero,[type=\"reset\"].sc-ic-hero,[type=\"submit\"].sc-ic-hero{-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-hero::-moz-focus-inner,[type=\"button\"].sc-ic-hero::-moz-focus-inner,[type=\"reset\"].sc-ic-hero::-moz-focus-inner,[type=\"submit\"].sc-ic-hero::-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-hero:-moz-focusring,[type=\"button\"].sc-ic-hero:-moz-focusring,[type=\"reset\"].sc-ic-hero:-moz-focusring,[type=\"submit\"].sc-ic-hero:-moz-focusring{outline:1px dotted ButtonText}/*!@fieldset*/fieldset.sc-ic-hero{padding:0.35em 0.75em 0.625em}/*!@legend*/legend.sc-ic-hero{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}/*!@progress*/progress.sc-ic-hero{vertical-align:baseline}/*!@textarea*/textarea.sc-ic-hero{overflow:auto}/*!@[type=\"checkbox\"],\n[type=\"radio\"]*/[type=\"checkbox\"].sc-ic-hero,[type=\"radio\"].sc-ic-hero{box-sizing:border-box;padding:0}/*!@[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button*/[type=\"number\"].sc-ic-hero::-webkit-inner-spin-button,[type=\"number\"].sc-ic-hero::-webkit-outer-spin-button{height:auto}/*!@[type=\"search\"]*/[type=\"search\"].sc-ic-hero{-webkit-appearance:textfield;outline-offset:-2px}/*!@[type=\"search\"]::-webkit-search-decoration*/[type=\"search\"].sc-ic-hero::-webkit-search-decoration{-webkit-appearance:none}/*!@::-webkit-file-upload-button*/.sc-ic-hero::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}/*!@details*/details.sc-ic-hero{display:block}/*!@summary*/summary.sc-ic-hero{display:list-item}/*!@template*/template.sc-ic-hero{display:none}/*!@[hidden]*/[hidden].sc-ic-hero{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-hero,body.sc-ic-hero,div.sc-ic-hero,span.sc-ic-hero,applet.sc-ic-hero,object.sc-ic-hero,iframe.sc-ic-hero,h1.sc-ic-hero,h2.sc-ic-hero,h3.sc-ic-hero,h4.sc-ic-hero,h5.sc-ic-hero,h6.sc-ic-hero,p.sc-ic-hero,blockquote.sc-ic-hero,pre.sc-ic-hero,a.sc-ic-hero,abbr.sc-ic-hero,acronym.sc-ic-hero,address.sc-ic-hero,big.sc-ic-hero,cite.sc-ic-hero,code.sc-ic-hero,del.sc-ic-hero,dfn.sc-ic-hero,em.sc-ic-hero,img.sc-ic-hero,ins.sc-ic-hero,kbd.sc-ic-hero,q.sc-ic-hero,s.sc-ic-hero,samp.sc-ic-hero,small.sc-ic-hero,strike.sc-ic-hero,strong.sc-ic-hero,sub.sc-ic-hero,sup.sc-ic-hero,tt.sc-ic-hero,var.sc-ic-hero,b.sc-ic-hero,u.sc-ic-hero,i.sc-ic-hero,center.sc-ic-hero,dl.sc-ic-hero,dt.sc-ic-hero,dd.sc-ic-hero,ol.sc-ic-hero,ul.sc-ic-hero,li.sc-ic-hero,fieldset.sc-ic-hero,form.sc-ic-hero,label.sc-ic-hero,legend.sc-ic-hero,table.sc-ic-hero,caption.sc-ic-hero,tbody.sc-ic-hero,tfoot.sc-ic-hero,thead.sc-ic-hero,tr.sc-ic-hero,th.sc-ic-hero,td.sc-ic-hero,article.sc-ic-hero,aside.sc-ic-hero,canvas.sc-ic-hero,details.sc-ic-hero,embed.sc-ic-hero,figure.sc-ic-hero,figcaption.sc-ic-hero,footer.sc-ic-hero,header.sc-ic-hero,hgroup.sc-ic-hero,menu.sc-ic-hero,nav.sc-ic-hero,output.sc-ic-hero,ruby.sc-ic-hero,section.sc-ic-hero,summary.sc-ic-hero,time.sc-ic-hero,mark.sc-ic-hero,audio.sc-ic-hero,video.sc-ic-hero{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}/*!@:host*/.sc-ic-hero-h{display:block;background-color:var(--ic-theme-tertiary);color:var(--ic-theme-text);--hero-heading-bottom-margin:var(--ic-space-md)}/*!@:host(.dark)*/.dark.sc-ic-hero-h{background-color:var(--ic-theme-secondary)}/*!@:host(.has-background-image)*/.has-background-image.sc-ic-hero-h{background-repeat:no-repeat;background-position:right -100px;background-size:auto calc(100% + 100px);box-shadow:var(--ic-elevation-inset)}@media (prefers-reduced-motion){/*!@:host(.has-background-image)*/.has-background-image.sc-ic-hero-h{background-position:right -100px !important}}/*!@ic-typography.heading-bottom-spacing*/ic-typography.heading-bottom-spacing.sc-ic-hero{margin-bottom:var(--hero-heading-bottom-margin)}/*!@.section-container*/.section-container.sc-ic-hero{display:flex;align-items:center;height:100%}/*!@.left-container*/.left-container.sc-ic-hero{padding:var(--ic-space-xl) 0}/*!@.left-container:not(.left-container-full-width)*/.left-container.sc-ic-hero:not(.left-container-full-width){flex-basis:50%}/*!@.left-container-full-width*/.left-container-full-width.sc-ic-hero{width:100%}/*!@.right-container*/.right-container.sc-ic-hero{flex-basis:50%}/*!@.interaction-container*/.interaction-container.sc-ic-hero{display:flex;gap:var(--ic-space-md);margin-top:var(--ic-space-lg)}/*!@.secondary-container*/.secondary-container.sc-ic-hero{display:flex;flex-direction:column;justify-content:center;border-left:var(--ic-space-xxxs) solid var(--ic-theme-text)}/*!@.secondary-subheading*/.secondary-subheading.sc-ic-hero{margin-top:var(--ic-space-xxs)}/*!@:host([content-aligned=\"left\"]) .left-container,\n:host([content-aligned=\"left\"]) .interaction-container*/[content-aligned=\"left\"].sc-ic-hero-h .left-container.sc-ic-hero,[content-aligned=\"left\"].sc-ic-hero-h .interaction-container.sc-ic-hero{justify-content:flex-start;text-align:left}/*!@:host([content-aligned=\"center\"]) .left-container,\n:host([content-aligned=\"center\"]) .interaction-container*/[content-aligned=\"center\"].sc-ic-hero-h .left-container.sc-ic-hero,[content-aligned=\"center\"].sc-ic-hero-h .interaction-container.sc-ic-hero{justify-content:center;text-align:center}@media (min-width: 992px){/*!@.left-container-full-width*/.left-container-full-width.sc-ic-hero{width:66.6%}}@media (min-width: 1044px){/*!@:host,\n .section-container*/.sc-ic-hero-h,.section-container.sc-ic-hero{min-height:208px}/*!@:host([small]),\n :host([small]) .section-container*/[small].sc-ic-hero-h,[small].sc-ic-hero-h .section-container.sc-ic-hero{min-height:173px}/*!@.left-container:not(.left-container-full-width)*/.left-container.sc-ic-hero:not(.left-container-full-width){flex-basis:66.6%}/*!@.left-container*/.left-container.sc-ic-hero{min-height:144px}/*!@.right-container*/.right-container.sc-ic-hero{flex-basis:33.3%;margin-left:50px}/*!@.secondary-container*/.secondary-container.sc-ic-hero{min-height:144px}/*!@.secondary-heading,\n .secondary-subheading*/.secondary-heading.sc-ic-hero,.secondary-subheading.sc-ic-hero{margin-left:63px}}@media (min-width: 801px) and (max-width: 1043px){/*!@:host(.has-background-image)*/.has-background-image.sc-ic-hero-h{background-image:none !important}/*!@:host,\n .section-container*/.sc-ic-hero-h,.section-container.sc-ic-hero{min-height:256px}/*!@:host([small]),\n :host([small]) .section-container*/[small].sc-ic-hero-h,[small].sc-ic-hero-h .section-container.sc-ic-hero{min-height:240px}/*!@:host([secondary-heading]),\n :host([secondary-heading]) .section-container*/[secondary-heading].sc-ic-hero-h,[secondary-heading].sc-ic-hero-h .section-container.sc-ic-hero{min-height:224px}/*!@.left-container*/.left-container.sc-ic-hero{min-height:160px}/*!@.secondary-container*/.secondary-container.sc-ic-hero{min-height:160px}/*!@.secondary-heading,\n .secondary-subheading*/.secondary-heading.sc-ic-hero,.secondary-subheading.sc-ic-hero{margin-left:94.75px}/*!@.right-container*/.right-container.sc-ic-hero{margin-left:50px}}@media (min-width: 641px) and (max-width: 800px){/*!@:host(.has-background-image)*/.has-background-image.sc-ic-hero-h{background-image:none !important}/*!@:host,\n .section-container*/.sc-ic-hero-h,.section-container.sc-ic-hero{min-height:256px}/*!@:host([small]),\n :host([small]) .section-container*/[small].sc-ic-hero-h,[small].sc-ic-hero-h .section-container.sc-ic-hero{min-height:240px}/*!@:host([secondary-heading]),\n :host([secondary-heading]) .section-container*/[secondary-heading].sc-ic-hero-h,[secondary-heading].sc-ic-hero-h .section-container.sc-ic-hero{min-height:224px}/*!@.left-container*/.left-container.sc-ic-hero{min-height:160px}/*!@.secondary-container*/.secondary-container.sc-ic-hero{min-height:160px}/*!@.secondary-heading,\n .secondary-subheading*/.secondary-heading.sc-ic-hero,.secondary-subheading.sc-ic-hero{margin-left:34px}/*!@.right-container*/.right-container.sc-ic-hero{margin-left:50px}}@media (min-width: 481px) and (max-width: 640px){/*!@:host(.has-background-image)*/.has-background-image.sc-ic-hero-h{background-image:none !important}/*!@:host,\n .section-container*/.sc-ic-hero-h,.section-container.sc-ic-hero{min-height:208px}/*!@:host([small]),\n :host([small]) .section-container*/[small].sc-ic-hero-h,[small].sc-ic-hero-h .section-container.sc-ic-hero{min-height:173px}/*!@:host([secondary-heading]),\n :host([secondary-heading]) .section-container*/[secondary-heading].sc-ic-hero-h,[secondary-heading].sc-ic-hero-h .section-container.sc-ic-hero{min-height:280px}/*!@:host([secondary-heading]) .section-container,\n :host([small]) .section-container,\n .section-container*/[secondary-heading].sc-ic-hero-h .section-container.sc-ic-hero,[small].sc-ic-hero-h .section-container.sc-ic-hero,.section-container.sc-ic-hero{flex-direction:column;align-items:flex-start}/*!@.left-container*/.left-container.sc-ic-hero{height:-moz-fit-content;height:fit-content}/*!@.secondary-container*/.secondary-container.sc-ic-hero{height:-moz-fit-content;height:fit-content;border:none}/*!@.right-container*/.right-container.sc-ic-hero{margin-bottom:40px}}@media (max-width: 480px){/*!@:host(.has-background-image)*/.has-background-image.sc-ic-hero-h{background-image:none !important}/*!@:host,\n .section-container*/.sc-ic-hero-h,.section-container.sc-ic-hero{min-height:192px}/*!@:host,\n .right-container*/.sc-ic-hero-h,.right-container.sc-ic-hero{margin-bottom:var(--ic-space-md)}/*!@:host([small]),\n :host([small]) .section-container*/[small].sc-ic-hero-h,[small].sc-ic-hero-h .section-container.sc-ic-hero{min-height:173px}/*!@:host([secondary-heading]),\n :host([secondary-heading]) .section-container*/[secondary-heading].sc-ic-hero-h,[secondary-heading].sc-ic-hero-h .section-container.sc-ic-hero{min-height:264px}/*!@:host([secondary-heading]) .section-container,\n :host([small]) .section-container,\n .section-container*/[secondary-heading].sc-ic-hero-h .section-container.sc-ic-hero,[small].sc-ic-hero-h .section-container.sc-ic-hero,.section-container.sc-ic-hero{flex-direction:column;align-items:flex-start}/*!@.left-container*/.left-container.sc-ic-hero{height:-moz-fit-content;height:fit-content}/*!@.secondary-container*/.secondary-container.sc-ic-hero{height:-moz-fit-content;height:fit-content;border:none}}";
|
7789
7791
|
|
7790
7792
|
/**
|
7791
7793
|
* @slot heading - Content will be rendered in the title area, in place of the heading.
|
@@ -8112,8 +8114,6 @@ class Link {
|
|
8112
8114
|
...IC_INHERITED_ARIA,
|
8113
8115
|
"aria-expanded",
|
8114
8116
|
]);
|
8115
|
-
}
|
8116
|
-
componentDidLoad() {
|
8117
8117
|
this.updateTheme();
|
8118
8118
|
}
|
8119
8119
|
hasRouterSlot() {
|
@@ -11307,7 +11307,7 @@ class PageHeader {
|
|
11307
11307
|
registerInstance(this, hostRef);
|
11308
11308
|
this.resizeObserver = null;
|
11309
11309
|
this.resizeObserverCallback = () => {
|
11310
|
-
if (this.reverseOrder) {
|
11310
|
+
if (this.reverseOrder && isSlotUsed(this.el, "actions")) {
|
11311
11311
|
this.applyReverseOrder();
|
11312
11312
|
}
|
11313
11313
|
};
|
@@ -13935,7 +13935,7 @@ class TabGroup {
|
|
13935
13935
|
return runningTotal;
|
13936
13936
|
});
|
13937
13937
|
checkResizeObserver(this.runResizeObserver);
|
13938
|
-
onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Tab
|
13938
|
+
onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Tab Group");
|
13939
13939
|
}
|
13940
13940
|
disconnectedCallback() {
|
13941
13941
|
this.resizeObserver.disconnect();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ukic/web-components",
|
3
|
-
"version": "2.1.0-beta.
|
3
|
+
"version": "2.1.0-beta.7",
|
4
4
|
"description": "A web component UI library compiled with StencilJS",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "./dist/index.js",
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"dependencies": {
|
41
41
|
"@popperjs/core": "^2.11.2",
|
42
42
|
"@stencil/core": "^2.16.1",
|
43
|
-
"@ukic/fonts": "^2.1.0-beta.
|
43
|
+
"@ukic/fonts": "^2.1.0-beta.7"
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
46
|
"@babel/core": "^7.16.0",
|
@@ -74,5 +74,5 @@
|
|
74
74
|
"webpack": "^5.75.0"
|
75
75
|
},
|
76
76
|
"license": "MIT",
|
77
|
-
"gitHead": "
|
77
|
+
"gitHead": "1a0bcc649d7cb592de4517a3123fdb4c9b4561b7"
|
78
78
|
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["src/components/ic-page-header/ic-page-header.css?tag=ic-page-header&encapsulation=shadow","src/components/ic-page-header/ic-page-header.tsx"],"names":["icPageHeaderCss","PageHeader","this","resizeObserver","resizeObserverCallback","reverseOrder","applyReverseOrder","runResizeObserver","ResizeObserver","observe","el","currSize","getCurrentDeviceSize","deviceSize","actionArea","shadowRoot","querySelector","actionHeights","i","actionContent","length","action","actionHeight","offsetHeight","undefined","push","max","Math","actionAreaHeight","DEVICE_SIZES","S","areButtonsReversed","reverse","forEach","btn","append","XL","[object Object]","Array","from","querySelectorAll","checkResizeObserver","disconnect","small","border","heading","subheading","aligned","sticky","stickyDesktopOnly","h","Host","class","isSlotUsed","fullHeight","name","variant","aria-label"],"mappings":"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","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\n:host(.sticky) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n}\n\nheader {\n background-color: var(--ic-architectural-40);\n}\n\nheader.border-bottom {\n border-bottom: 1px solid var(--ic-architectural-300);\n}\n\nheader.tabs {\n padding-top: var(--ic-space-md);\n}\n\n.breadcrumb-area {\n margin-bottom: var(--ic-space-md);\n}\n\n.main-content {\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas:\n \"title-area action-area\"\n \"input-area action-area\";\n column-gap: var(--ic-space-md);\n justify-content: space-between;\n width: 100%;\n}\n\n.title-area {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 304px;\n grid-area: title-area;\n}\n\n.header-content {\n display: flex;\n align-items: center;\n width: 100%;\n flex-wrap: wrap;\n row-gap: var(--ic-space-xs);\n column-gap: var(--ic-space-md);\n}\n\n.heading {\n display: inline-block;\n overflow-wrap: break-word;\n hyphens: auto;\n}\n\n.subheading.small {\n margin-top: var(--ic-space-xs);\n}\n\n.action-area {\n display: flex;\n gap: var(--ic-space-md);\n flex-flow: row wrap;\n justify-self: end;\n justify-content: flex-end;\n height: fit-content;\n grid-area: action-area;\n}\n\n.input-area,\n.navigation-area {\n margin-top: var(--ic-space-md);\n width: 100%;\n}\n\n.tabs-slot {\n display: flex;\n overflow-x: auto;\n padding: 8px;\n margin: -8px;\n}\n\n.input-area {\n grid-area: input-area;\n}\n\n@media screen and (max-width: 576px) {\n ::slotted(ic-text-field) {\n --input-width: 100%;\n\n max-width: 320px;\n }\n\n .main-content {\n grid-template-areas:\n \"title-area\"\n \"action-area\"\n \"input-area\";\n justify-content: flex-start;\n }\n\n .title-area {\n min-width: 0;\n }\n\n .action-area {\n min-width: 100%;\n margin-top: var(--ic-space-md);\n justify-content: start;\n }\n}\n\n@media screen and (min-width: 992px) {\n :host(.sticky-desktop) {\n position: sticky;\n top: 0;\n box-shadow: var(--ic-elevation-overlay);\n }\n}\n","import { Component, Host, h, Prop, Element, State } from \"@stencil/core\";\n\nimport { IcAlignment } from \"../../utils/types\";\n\nimport {\n isSlotUsed,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n checkResizeObserver,\n} from \"../../utils/helpers\";\n\n/**\n * @slot breadcrumbs - Content will be rendered in the breadcrumb area, above the title and action areas.\n * @slot heading - Content will be rendered in the title area, in place of the heading.\n * @slot subheading - Content will be rendered in the title area, in place of the subheading.\n * @slot heading-adornment - Content will be rendered in the title area, adjacent to the heading.\n * @slot actions - Content will be rendered in the action area, adjacent to the title area.\n * @slot input - Content will be rendered in the input area, below the title area and adjacent to the action area.\n * @slot stepper - Content will be rendered in the navigation area, below the title and action areas. Note: stepper slot cannot be used when the tabs slot is being used.\n * @slot tabs - Content will be rendered in the navigation area, below the title and action areas. Note: the stepper slot cannot be used when the tabs slot is being used.\n */\n\n@Component({\n tag: \"ic-page-header\",\n styleUrl: \"ic-page-header.css\",\n shadow: true,\n})\nexport class PageHeader {\n @Element() el: HTMLIcPageHeaderElement;\n /**\n * The title to render on the page header.\n */\n @Prop() heading?: string;\n /**\n * The subtitle to render on the page header.\n */\n @Prop() subheading?: string;\n /**\n * The alignment of the page header.\n */\n @Prop() aligned?: IcAlignment = \"left\";\n /**\n * If `true`, the small styling will be applied to the page header.\n */\n @Prop() small?: boolean = false;\n /**\n * If `true`, a border will be displayed along the bottom of the page header.\n */\n @Prop() border?: boolean = true;\n /**\n * If `true`, the page header will be sticky at all breakpoints.\n */\n @Prop() sticky?: boolean = false;\n /**\n * If `true`, the page header will only be sticky for viewport widths of 992px and above.\n */\n @Prop() stickyDesktopOnly?: boolean = false;\n /**\n * If `true`, the reading pattern and tab order will change in the action area for viewport widths of above 576px and when actions have not wrapped.\n */\n @Prop() reverseOrder?: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() areButtonsReversed: boolean = false;\n\n @State() actionContent: Node[];\n\n private resizeObserver: ResizeObserver = null;\n\n private resizeObserverCallback = () => {\n if (this.reverseOrder) {\n this.applyReverseOrder();\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n private applyReverseOrder = (): void => {\n const currSize = getCurrentDeviceSize();\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n }\n\n const actionArea = this.el.shadowRoot.querySelector(\n \"div.action-area\"\n ) as HTMLElement;\n const actionHeights: number[] = [];\n\n /* For each button in the actions slot, check the height of the button and push this number into the actionHeights array and then find the greatest number in this array (i.e. find the height of the tallest button) */\n for (let i = 0; i < this.actionContent.length; i++) {\n const action = this.actionContent[i] as HTMLElement;\n let actionHeight = action.offsetHeight;\n if (actionHeight === undefined) {\n actionHeight = 0;\n }\n actionHeights.push(actionHeight);\n }\n\n const max = Math.max(...actionHeights);\n\n /* The smallest breakpoint displays buttons in the same order the user has slotted them in. When the device size is larger than the small breakpoiint then the order of the button reverses due to best practice for reading patterns. If the device size is larger than the small breakpoint and the buttons have started to wrap then they follow the order the user has slotted them in. This logic is programmed based on the height of the action-area div that wraps the actions slot. If the height of the action-area div is taller than the height of the tallest button, then it is assumed that the taller height is caused by the buttons wrapping */\n let actionAreaHeight = actionArea.offsetHeight;\n\n if (actionAreaHeight === undefined) {\n actionAreaHeight = 0;\n }\n\n if (\n this.deviceSize > DEVICE_SIZES.S &&\n actionAreaHeight <= max &&\n !this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n } else if (\n ((this.deviceSize > DEVICE_SIZES.S && actionAreaHeight > max) ||\n this.deviceSize <= DEVICE_SIZES.S) &&\n this.areButtonsReversed\n ) {\n this.actionContent = this.actionContent.reverse();\n this.actionContent.forEach((btn: string | Node) => {\n this.el.append(btn);\n });\n this.areButtonsReversed = !this.areButtonsReversed;\n }\n };\n\n componentWillLoad(): void {\n this.actionContent = Array.from(\n this.el.querySelectorAll(`[slot=\"actions\"]`)\n );\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const {\n small,\n border,\n heading,\n subheading,\n aligned,\n sticky,\n stickyDesktopOnly,\n } = this;\n\n return (\n <Host\n class={{\n [\"sticky\"]: sticky,\n [\"sticky-desktop\"]: !sticky && stickyDesktopOnly,\n }}\n >\n <header\n class={{\n [\"border-bottom\"]: border,\n [\"tabs\"]: isSlotUsed(this.el, \"tabs\"),\n }}\n >\n <ic-section-container\n aligned={aligned}\n fullHeight={isSlotUsed(this.el, \"tabs\")}\n >\n {isSlotUsed(this.el, \"breadcrumbs\") && (\n <div class=\"breadcrumb-area\">\n <slot name=\"breadcrumbs\" />\n </div>\n )}\n <div class=\"main-content\">\n <div class=\"title-area\">\n <div class=\"header-content\">\n <slot name=\"heading\">\n <ic-typography\n variant={small ? \"h4\" : \"h2\"}\n class=\"heading\"\n >\n <h2>{heading}</h2>\n </ic-typography>\n </slot>\n <slot name=\"heading-adornment\" />\n </div>\n <div>\n <slot name=\"subheading\">\n {subheading && (\n <ic-typography\n variant=\"body\"\n class={{ [\"subheading\"]: true, [\"small\"]: small }}\n >\n {subheading}\n </ic-typography>\n )}\n </slot>\n </div>\n </div>\n {isSlotUsed(this.el, \"actions\") && (\n <div class=\"action-area\">\n <slot name=\"actions\" />\n </div>\n )}\n {isSlotUsed(this.el, \"input\") && (\n <div class=\"input-area\">\n <slot name=\"input\" />\n </div>\n )}\n </div>\n\n {(isSlotUsed(this.el, \"stepper\") ||\n isSlotUsed(this.el, \"tabs\")) && (\n <div class=\"navigation-area\">\n {isSlotUsed(this.el, \"stepper\") &&\n !isSlotUsed(this.el, \"tabs\") && <slot name=\"stepper\" />}\n {isSlotUsed(this.el, \"tabs\") && (\n <nav\n class=\"tabs-slot\"\n aria-label=\"navigation-landmark-page-header\"\n >\n <slot name=\"tabs\" />\n </nav>\n )}\n </div>\n )}\n </ic-section-container>\n </header>\n </Host>\n );\n }\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["src/components/ic-link/ic-link.css?tag=ic-link&encapsulation=shadow","src/components/ic-link/ic-link.tsx"],"names":["icLinkCss","Link","this","inheritedAttributes","[object Object]","ev","theme","detail","updateTheme","mode","newTheme","getThemeFromContext","el","IcThemeForegroundEnum","Light","appearance","Dark","inheritAttributes","IC_INHERITED_ARIA","routerSlot","querySelector","ariaLabel","textContent","download","href","hreflang","referrerpolicy","rel","target","showIcon","h","Host","class","hasRouterSlot","name","Object","assign","hrefLang","referrerPolicy","tabindex","innerHTML","OpenInNew"],"mappings":"0aAAA,MAAMA,EAAY,ynJCoBLC,EAAI,+BACPC,KAAAC,oBAAgD,iBAQlB,gBAKd,4IA8BkC,UAG1DC,mBAAmBC,GACjB,MAAMC,EAAiBD,EAAGE,OAC1BL,KAAKM,YAAYF,EAAMG,MAGjBL,YAAYM,EAA8B,MAChD,MAAMJ,EAAQK,EAAoBT,KAAKU,GAAIF,GAAY,MAEvD,OAAQJ,GACN,KAAKO,EAAsBC,MACzBZ,KAAKa,WAAaF,EAAsBC,MACxC,MACF,KAAKD,EAAsBG,KACzBd,KAAKa,WAAaF,EAAsBG,KACxC,OAINZ,oBACEF,KAAKC,oBAAsBc,EAAkBf,KAAKU,GAAI,IACjDM,EACH,kBAIJd,mBACEF,KAAKM,cAGCJ,gBACNF,KAAKiB,WAAajB,KAAKU,GAAGQ,cAAc,wBACxC,GAAIlB,KAAKiB,WAAY,CACnBjB,KAAKiB,WAAWE,UAAYnB,KAAKiB,WAAWG,YAE9C,QAASpB,KAAKiB,WAGhBf,SACE,MAAMmB,SACJA,EAAQC,KACRA,EAAIC,SACJA,EAAQC,eACRA,EAAcC,IACdA,EAAGC,OACHA,EAAMC,SACNA,EAAQd,WACRA,GACEb,KAEJ,OACE4B,EAACC,EAAI,CAACC,MAAO,CAAE5B,CAAC,QAAS,KAAMA,CAAC,GAAGW,KAAe,OAC/Cb,KAAK+B,gBACJH,EAAA,OAAA,CAAMI,KAAK,gBAEXJ,EAAA,IAAAK,OAAAC,OAAA,CACEJ,MAAO,CACL5B,CAAC,WAAYoB,IAAS,KACtBpB,CAAC,GAAGW,KAAeS,IAAS,MAE9BD,SAAUA,IAAa,MAAQA,EAAW,KAC1CC,KAAMA,EACNa,SAAUZ,EACVa,eAAgBZ,EAChBC,IAAKA,EACLC,OAAQA,EACRW,SAAUf,IAAS,KAAO,IAAM,MAC5BtB,KAAKC,qBAET2B,EAAA,OAAA,MACCD,GACCC,EAAA,OAAA,CAAME,MAAM,2BAA2BQ,UAAWC","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.link) .ic-link,\n:host(.link) ::slotted(a) {\n color: var(--ic-hyperlink);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n transition: var(--ic-easing-transition-fast);\n}\n\n:host(.link.dark) .ic-link.dark,\n:host(.link.dark) ::slotted(a) {\n color: var(--ic-color-primary-text);\n}\n\n:host(.link.light) .ic-link.light,\n:host(.link.light) ::slotted(a) {\n color: var(--ic-color-white-text);\n}\n\n:host(.link) .ic-link:visited,\n:host(.link) ::slotted(a:visited) {\n color: var(--ic-hyperlink-visited);\n}\n\n:host(.link) .ic-link:hover,\n:host(.link) .ic-link:focus,\n:host(.link) ::slotted(a:hover),\n:host(.link) ::slotted(a:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n}\n\n:host(.link) .ic-link:hover,\n:host(.link) ::slotted(a:hover) {\n outline: none;\n}\n\n:host(.link) .ic-link:focus,\n:host(.link) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.link) .ic-link:active,\n:host(.link) .ic-link:focus:active,\n:host(.link) .ic-link:visited:active,\n:host(.link) ::slotted(a:active),\n:host(.link) ::slotted(a:focus:active),\n:host(.link) ::slotted(a:visited:active) {\n text-decoration: none;\n}\n\n.ic-link-open-in-new-icon {\n vertical-align: middle;\n margin-left: var(--ic-space-xxs);\n}\n\n.ic-link > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink);\n}\n\n.ic-link.dark > .ic-link-open-in-new-icon {\n fill: var(--ic-color-primary-text);\n}\n\n.ic-link.light > .ic-link-open-in-new-icon {\n fill: var(--ic-color-white-text);\n}\n\n.ic-link-open-in-new-icon > svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n fill: currentcolor;\n}\n\n.ic-link:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink-visited);\n}\n\n.ic-link.light:visited > .ic-link-open-in-new-icon {\n fill: var(--ic-hyperlink-contrast-visited);\n}\n\n:host(.breadcrumb-link) .ic-link {\n display: var(--breadcrumb-link-display);\n align-items: var(--breadcrumb-link-align-items);\n gap: var(--breadcrumb-link-gap);\n}\n\n:host(.breadcrumb-link) .ic-link ::slotted(.back-icon) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n}\n\n:host(.breadcrumb-link.current-page) a,\n:host(.breadcrumb-link.current-page) ::slotted(a) {\n font-weight: normal;\n color: inherit;\n text-decoration: none;\n display: flex;\n align-items: center;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link,\n:host(.breadcrumb-link.current-page) ::slotted(a:focus) {\n outline: var(--ic-hc-focus-outline);\n text-decoration: none;\n}\n\n:host(.breadcrumb-link.current-page) .ic-link:visited {\n color: var(--ic-color-primary-text);\n}\n","import { Component, Element, Prop, h, Host, Listen } from \"@stencil/core\";\n\nimport OpenInNew from \"./assets/OpenInNew.svg\";\nimport { getThemeFromContext, inheritAttributes } from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\n\n/**\n * @slot router-item - Handle routing by nesting your routes in this slot.\n */\n\n@Component({\n tag: \"ic-link\",\n styleUrl: \"ic-link.css\",\n shadow: true,\n})\nexport class Link {\n private inheritedAttributes: { [k: string]: unknown } = {};\n private routerSlot: HTMLElement;\n\n @Element() el: HTMLIcLinkElement;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * The URL that the link points to.\n */\n @Prop() href?: string = null;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * If `true`, the 'open in new tab/window' icon will be displayed.\n */\n @Prop() showIcon?: boolean;\n\n /**\n * The appearance of the link, e.g. dark, light, or default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler(ev: CustomEvent): void {\n const theme: IcTheme = ev.detail;\n this.updateTheme(theme.mode);\n }\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const theme = getThemeFromContext(this.el, newTheme || null);\n\n switch (theme) {\n case IcThemeForegroundEnum.Light:\n this.appearance = IcThemeForegroundEnum.Light;\n break;\n case IcThemeForegroundEnum.Dark:\n this.appearance = IcThemeForegroundEnum.Dark;\n break;\n }\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, [\n ...IC_INHERITED_ARIA,\n \"aria-expanded\",\n ]);\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n }\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n render() {\n const {\n download,\n href,\n hreflang,\n referrerpolicy,\n rel,\n target,\n showIcon,\n appearance,\n } = this;\n\n return (\n <Host class={{ [\"link\"]: true, [`${appearance}`]: true }}>\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <a\n class={{\n [\"ic-link\"]: href !== null,\n [`${appearance}`]: href !== null,\n }}\n download={download !== false ? download : null}\n href={href}\n hrefLang={hreflang}\n referrerPolicy={referrerpolicy}\n rel={rel}\n target={target}\n tabindex={href !== null ? \"0\" : \"-1\"}\n {...this.inheritedAttributes}\n >\n <slot />\n {showIcon && (\n <span class=\"ic-link-open-in-new-icon\" innerHTML={OpenInNew} />\n )}\n </a>\n )}\n </Host>\n );\n }\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["src/components/ic-data-row/ic-data-row.css?tag=ic-data-row&encapsulation=shadow","src/components/ic-data-row/ic-data-row.tsx"],"names":["icDataRowCss","DataRow","this","resizeObserver","hasEndComponent","runResizeObserver","ResizeObserver","checkLabelAbove","observe","el","DEVICE_SIZES","XL","[object Object]","rowSize","_a","shadowRoot","querySelector","clientWidth","S","entitySize","M","component","querySelectorAll","forEach","child","setAttribute","label","deviceSize","getCurrentDeviceSize","slotHasContent","checkResizeObserver","labelEndComponent","disconnect","value","small","h","Host","class","role","name","variant"],"mappings":"qIAAA,MAAMA,EAAe,ogHCkBRC,EAAO,+BAsBVC,KAAAC,eAAiC,KAEjCD,KAAAE,gBAA2B,MAE3BF,KAAAG,kBAAoB,KAC1BH,KAAKC,eAAiB,IAAIG,gBAAe,KACvCJ,KAAKK,qBAGPL,KAAKC,eAAeK,QAAQN,KAAKO,0DAfV,sBAEKC,EAAaC,6BAgBnCC,wBACN,MAAMC,GAAUC,EAAAZ,KAAKO,GAAGM,WAAWC,cAAc,YAAQ,MAAAF,SAAA,OAAA,EAAAA,EAAEG,YAC3D,GAAIJ,EAAU,GAAKH,EAAaQ,EAAG,CACjChB,KAAKiB,WAAa,UACb,GAAIN,EAAU,GAAKH,EAAaU,EAAG,CACxClB,KAAKiB,WAAa,QACb,CACLjB,KAAKiB,WAAa,MAIdP,oBACN,MAAMS,EAAYnB,KAAKO,GAAGM,WAAWO,iBACnC,4BAGFD,EAAUE,SAASC,GACjBA,EAAMC,aAAa,aAAc,OAASvB,KAAKwB,MAAQ,UAI3Dd,oBACEV,KAAKyB,WAAaC,IAClB1B,KAAKE,gBAAkByB,EAAe3B,KAAKO,GAAI,iBAGjDG,mBACEkB,EAAoB5B,KAAKG,mBACzBH,KAAKK,kBACL,GAAIL,KAAKE,gBAAiB,CACxBF,KAAK6B,qBAITnB,uBACE,GAAIV,KAAKC,iBAAmB,KAAM,CAChCD,KAAKC,eAAe6B,cAIxBpB,SACE,MAAMc,MAAEA,EAAKO,MAAEA,EAAKC,MAAEA,GAAUhC,KAEhC,OACEiC,EAACC,EAAI,CACHC,MAAO,CACLzB,CAAC,SAAUsB,EACXtB,CAAC,qBAAsBV,KAAKiB,aAAe,IAC3CP,CAAC,iBAAkBV,KAAKiB,aAAe,MAEzCmB,KAAK,YAELH,EAAA,MAAA,CAAKE,MAAM,QACTF,EAAA,MAAA,CAAKE,MAAM,cACTF,EAAA,MAAA,CAAKE,MAAM,SACTF,EAAA,OAAA,CAAMI,KAAK,SACTJ,EAAA,gBAAA,CACEK,QACEtC,KAAKiB,aAAe,KAAO,QAAU,kBAGtCO,KAIPS,EAAA,MAAA,CAAKE,MAAM,SACTF,EAAA,OAAA,CAAMI,KAAK,SACTJ,EAAA,gBAAA,CAAeK,QAAQ,QAAQP,MAIpC/B,KAAKE,iBACJ+B,EAAA,MAAA,CAAKE,MAAM,iBACTF,EAAA,MAAA,CAAKG,KAAK,QACRH,EAAA,OAAA,CAAMI,KAAK,qBAKnBJ,EAAA,MAAA,CAAKE,MAAM","sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n position: relative;\n display: block;\n}\n\n.data {\n display: flex;\n align-items: center;\n}\n\n.text-cells {\n display: flex;\n flex-grow: 1;\n min-width: 0;\n}\n\n.label {\n width: 200px;\n min-width: 200px;\n margin-right: var(--ic-space-md);\n color: var(--ic-color-tertiary-text);\n}\n\n.value {\n flex-grow: 1;\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[small][readonly][hide-label]) {\n margin-top: calc(var(--ic-space-xxs) * -1);\n}\n\nslot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows]) {\n margin-top: calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs));\n}\n\n.end-component {\n width: fit-content;\n margin-left: 56px;\n}\n\n.divider {\n margin-top: var(--ic-space-md);\n height: 1px;\n background-color: var(--ic-architectural-300);\n}\n\n:host(.small) .divider {\n margin-top: var(--ic-space-xs);\n}\n\n:host(.breakpoint-medium) .label {\n width: 160px;\n min-width: 160px;\n}\n\n:host(.breakpoint-xs) .text-cells {\n flex-direction: column;\n}\n\n:host(.breakpoint-xs) .label {\n width: 128px;\n margin-bottom: var(--ic-space-xs);\n}\n\n:host(.breakpoint-xs) .value {\n max-width: 95%;\n}\n\n:host(.breakpoint-xs) .end-component {\n margin-left: 0;\n}\n\n@media (forced-colors: active) {\n .divider {\n background-color: canvastext;\n }\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n slotHasContent,\n} from \"../../utils/helpers\";\n\n/**\n * @slot label - Content will be rendered in the leftmost cell.\n * @slot value - Content will be rendered to the right of the label.\n * @slot end-component - Content will be displayed in the rightmost cell.\n */\n@Component({\n tag: \"ic-data-row\",\n styleUrl: \"ic-data-row.css\",\n shadow: true,\n})\nexport class DataRow {\n @Element() el: HTMLIcDataRowElement;\n\n /**\n * The label in the leftmost cell of the row.\n */\n @Prop() label: string;\n\n /**\n * The value of the middle (right if no end-component supplied) cell of the row.\n */\n @Prop() value: string;\n\n /**\n * If `true`, the small styling will be applied to the row. This is automatically applied if small is set on the parent data heading.\n */\n @Prop() small: boolean = false;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n @State() entitySize: \"xl\" | \"m\" | \"xs\";\n\n private resizeObserver: ResizeObserver = null;\n\n private hasEndComponent: boolean = false;\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.checkLabelAbove();\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n private checkLabelAbove() {\n const rowSize = this.el.shadowRoot.querySelector(\".data\")?.clientWidth;\n if (rowSize + 46 < DEVICE_SIZES.S) {\n this.entitySize = \"xs\";\n } else if (rowSize + 46 < DEVICE_SIZES.M) {\n this.entitySize = \"m\";\n } else {\n this.entitySize = \"xl\";\n }\n }\n\n private labelEndComponent(): void {\n const component = this.el.shadowRoot.querySelectorAll(\n \"slot[name=end-component]\"\n );\n\n component.forEach((child: HTMLElement) =>\n child.setAttribute(\"aria-label\", \"for \" + this.label + \" row\")\n );\n }\n\n componentWillLoad(): void {\n this.deviceSize = getCurrentDeviceSize();\n this.hasEndComponent = slotHasContent(this.el, \"end-component\");\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n this.checkLabelAbove();\n if (this.hasEndComponent) {\n this.labelEndComponent();\n }\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const { label, value, small } = this;\n\n return (\n <Host\n class={{\n [\"small\"]: small,\n [\"breakpoint-medium\"]: this.entitySize === \"m\",\n [\"breakpoint-xs\"]: this.entitySize === \"xs\",\n }}\n role=\"listitem\"\n >\n <div class=\"data\">\n <div class=\"text-cells\">\n <div class=\"label\">\n <slot name=\"label\">\n <ic-typography\n variant={\n this.entitySize === \"xs\" ? \"label\" : \"subtitle-large\"\n }\n >\n {label}\n </ic-typography>\n </slot>\n </div>\n <div class=\"value\">\n <slot name=\"value\">\n <ic-typography variant=\"body\">{value}</ic-typography>\n </slot>\n </div>\n </div>\n {this.hasEndComponent && (\n <div class=\"end-component\">\n <div role=\"cell\">\n <slot name=\"end-component\"></slot>\n </div>\n </div>\n )}\n </div>\n <div class=\"divider\" />\n </Host>\n );\n }\n}\n"]}
|