@ptcwebops/ptcw-design 0.6.8 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{icon-asset_13.cjs.entry.js → dropdown-item_19.cjs.entry.js} +539 -343
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-checkbox.cjs.entry.js +42 -0
- package/dist/cjs/ptc-dropdown.cjs.entry.js +75 -0
- package/dist/cjs/ptc-filter-tag.cjs.entry.js +67 -0
- package/dist/cjs/ptc-icon-minimize.cjs.entry.js +46 -0
- package/dist/cjs/ptc-link.cjs.entry.js +53 -0
- package/dist/cjs/ptc-modal.cjs.entry.js +162 -0
- package/dist/cjs/ptc-picture.cjs.entry.js +0 -1
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/components/ptc-checkbox/ptc-checkbox.css +1 -1
- package/dist/collection/components/ptc-img/ptc-img.js +0 -1
- package/dist/collection/components/ptc-picture/ptc-picture.js +0 -1
- package/dist/collection/components/ptc-pricing-block/ptc-pricing-block.css +0 -1
- package/dist/collection/components/ptc-tab-list/ptc-tab-list.css +2 -2
- package/dist/collection/components/tab-header/tab-header.css +4 -3
- package/dist/custom-elements/index.js +4 -6
- package/dist/esm/{icon-asset_13.entry.js → dropdown-item_19.entry.js} +529 -339
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ptc-checkbox.entry.js +38 -0
- package/dist/esm/ptc-dropdown.entry.js +71 -0
- package/dist/esm/ptc-filter-tag.entry.js +63 -0
- package/dist/esm/ptc-icon-minimize.entry.js +42 -0
- package/dist/esm/ptc-link.entry.js +49 -0
- package/dist/esm/ptc-modal.entry.js +158 -0
- package/dist/esm/ptc-picture.entry.js +0 -1
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/ptcw-design/p-13d45895.entry.js +1 -0
- package/dist/ptcw-design/p-3ef2b02f.entry.js +1 -0
- package/dist/ptcw-design/{p-848f34bb.entry.js → p-62e7565c.entry.js} +1 -1
- package/dist/ptcw-design/p-6c034edd.entry.js +1 -0
- package/dist/ptcw-design/p-704bf1cd.entry.js +1 -0
- package/dist/ptcw-design/p-75a36c38.entry.js +1 -0
- package/dist/ptcw-design/p-92d95119.entry.js +1 -0
- package/dist/ptcw-design/p-c7e63622.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/cjs/dropdown-item.cjs.entry.js +0 -21
- package/dist/cjs/list-item.cjs.entry.js +0 -30
- package/dist/cjs/ptc-ellipsis-dropdown.cjs.entry.js +0 -48
- package/dist/cjs/ptc-hero.cjs.entry.js +0 -29
- package/dist/cjs/ptc-img.cjs.entry.js +0 -160
- package/dist/cjs/ptc-overlay.cjs.entry.js +0 -31
- package/dist/cjs/ptc-previous-url.cjs.entry.js +0 -19
- package/dist/cjs/ptc-pricing-block.cjs.entry.js +0 -26
- package/dist/cjs/ptc-svg-btn.cjs.entry.js +0 -94
- package/dist/cjs/ptc-tab-list.cjs.entry.js +0 -129
- package/dist/cjs/tab-content.cjs.entry.js +0 -37
- package/dist/cjs/tab-header.cjs.entry.js +0 -54
- package/dist/esm/dropdown-item.entry.js +0 -17
- package/dist/esm/list-item.entry.js +0 -26
- package/dist/esm/ptc-ellipsis-dropdown.entry.js +0 -44
- package/dist/esm/ptc-hero.entry.js +0 -25
- package/dist/esm/ptc-img.entry.js +0 -156
- package/dist/esm/ptc-overlay.entry.js +0 -27
- package/dist/esm/ptc-previous-url.entry.js +0 -15
- package/dist/esm/ptc-pricing-block.entry.js +0 -22
- package/dist/esm/ptc-svg-btn.entry.js +0 -90
- package/dist/esm/ptc-tab-list.entry.js +0 -125
- package/dist/esm/tab-content.entry.js +0 -33
- package/dist/esm/tab-header.entry.js +0 -50
- package/dist/ptcw-design/p-09abf994.entry.js +0 -1
- package/dist/ptcw-design/p-2469a843.entry.js +0 -1
- package/dist/ptcw-design/p-2f0223da.entry.js +0 -1
- package/dist/ptcw-design/p-33b70553.entry.js +0 -1
- package/dist/ptcw-design/p-3f65b998.entry.js +0 -1
- package/dist/ptcw-design/p-6956e9cf.entry.js +0 -1
- package/dist/ptcw-design/p-70693e51.entry.js +0 -1
- package/dist/ptcw-design/p-831f5c16.entry.js +0 -1
- package/dist/ptcw-design/p-a0ddea6e.entry.js +0 -1
- package/dist/ptcw-design/p-ab716377.entry.js +0 -1
- package/dist/ptcw-design/p-b1354b54.entry.js +0 -1
- package/dist/ptcw-design/p-b30ba340.entry.js +0 -1
- package/dist/ptcw-design/p-f2d7ecd0.entry.js +0 -1
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b3fabe79.js');
|
|
6
|
+
const interfaces = require('./interfaces-0ecd8027.js');
|
|
7
|
+
|
|
8
|
+
const dropdownItemCss = ".dropdown-item{padding:0.375rem 1.5rem;transition:background-color ease-out 250ms}.dropdown-item:hover,.dropdown-item:active,.dropdown-item:focus,.dropdown-item:focus-visible{background-color:var(--color-gray-02)}.dropdown-item a{font-family:\"Raleway\";font-style:normal;font-weight:var(--ptc-font-weight-regular);font-size:var(--ptc-font-size-x-small);line-height:var(--ptc-line-height-dense);color:var(--color-gray-12);text-decoration:none}.dropdown-item a:hover,.dropdown-item a:visited,.dropdown-item a:active,.dropdown-item a:focus,.dropdown-item a:focus-visible{color:var(--color-gray-12)}.dropdown-item:first-child a{margin-top:0.75rem}.dropdown-item:last-child a{margin-bottom:0.75rem}";
|
|
9
|
+
|
|
10
|
+
let DropdownItem = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.linkHref = undefined;
|
|
14
|
+
this.linkTarget = '_self';
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return (index.h("div", { class: "dropdown-item" }, index.h("slot", null)));
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
DropdownItem.style = dropdownItemCss;
|
|
6
21
|
|
|
7
22
|
const iconAssetCss = ".svg-inline--fa.sc-icon-asset,svg.sc-icon-asset:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa.sc-icon-asset{display:inline-block;font-size:inherit;height:1em;vertical-align:-.125em}.svg-inline--fa.fa-lg.sc-icon-asset{vertical-align:-.225em}.svg-inline--fa.fa-w-1.sc-icon-asset{width:.0625em}.svg-inline--fa.fa-w-2.sc-icon-asset{width:.125em}.svg-inline--fa.fa-w-3.sc-icon-asset{width:.1875em}.svg-inline--fa.fa-w-4.sc-icon-asset{width:.25em}.svg-inline--fa.fa-w-5.sc-icon-asset{width:.3125em}.svg-inline--fa.fa-w-6.sc-icon-asset{width:.375em}.svg-inline--fa.fa-w-7.sc-icon-asset{width:.4375em}.svg-inline--fa.fa-w-8.sc-icon-asset{width:.5em}.svg-inline--fa.fa-w-9.sc-icon-asset{width:.5625em}.svg-inline--fa.fa-w-10.sc-icon-asset{width:.625em}.svg-inline--fa.fa-w-11.sc-icon-asset{width:.6875em}.svg-inline--fa.fa-w-12.sc-icon-asset{width:.75em}.svg-inline--fa.fa-w-13.sc-icon-asset{width:.8125em}.svg-inline--fa.fa-w-14.sc-icon-asset{width:.875em}.svg-inline--fa.fa-w-15.sc-icon-asset{width:.9375em}.svg-inline--fa.fa-w-16.sc-icon-asset{width:1em}.svg-inline--fa.fa-w-17.sc-icon-asset{width:1.0625em}.svg-inline--fa.fa-w-18.sc-icon-asset{width:1.125em}.svg-inline--fa.fa-w-19.sc-icon-asset{width:1.1875em}.svg-inline--fa.fa-w-20.sc-icon-asset{width:1.25em}.svg-inline--fa.fa-pull-left.sc-icon-asset{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right.sc-icon-asset{margin-left:.3em;width:auto}.svg-inline--fa.fa-border.sc-icon-asset{height:1.5em}.svg-inline--fa.fa-li.sc-icon-asset{width:2em}.svg-inline--fa.fa-fw.sc-icon-asset{width:1.25em}.fa-layers.sc-icon-asset svg.svg-inline--fa.sc-icon-asset{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers.sc-icon-asset{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers.sc-icon-asset svg.svg-inline--fa.sc-icon-asset{-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter.sc-icon-asset,.fa-layers-text.sc-icon-asset{display:inline-block;position:absolute;text-align:center}.fa-layers-text.sc-icon-asset{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter.sc-icon-asset{background-color:#ff253a;border-radius:1em;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-bottom-right.sc-icon-asset{bottom:0;right:0;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom right;transform-origin:bottom right}.fa-layers-bottom-left.sc-icon-asset{bottom:0;left:0;right:auto;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom left;transform-origin:bottom left}.fa-layers-top-right.sc-icon-asset{right:0;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-top-left.sc-icon-asset{left:0;right:auto;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top left;transform-origin:top left}.fa-lg.sc-icon-asset{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs.sc-icon-asset{font-size:.75em}.fa-sm.sc-icon-asset{font-size:.875em}.fa-1x.sc-icon-asset{font-size:1em}.fa-2x.sc-icon-asset{font-size:2em}.fa-3x.sc-icon-asset{font-size:3em}.fa-4x.sc-icon-asset{font-size:4em}.fa-5x.sc-icon-asset{font-size:5em}.fa-6x.sc-icon-asset{font-size:6em}.fa-7x.sc-icon-asset{font-size:7em}.fa-8x.sc-icon-asset{font-size:8em}.fa-9x.sc-icon-asset{font-size:9em}.fa-10x.sc-icon-asset{font-size:10em}.fa-fw.sc-icon-asset{text-align:center;width:1.25em}.fa-ul.sc-icon-asset{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul.sc-icon-asset>li.sc-icon-asset{position:relative}.fa-li.sc-icon-asset{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border.sc-icon-asset{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left.sc-icon-asset{float:left}.fa-pull-right.sc-icon-asset{float:right}.fa.fa-pull-left.sc-icon-asset,.fab.fa-pull-left.sc-icon-asset,.fal.fa-pull-left.sc-icon-asset,.far.fa-pull-left.sc-icon-asset,.fas.fa-pull-left.sc-icon-asset{margin-right:.3em}.fa.fa-pull-right.sc-icon-asset,.fab.fa-pull-right.sc-icon-asset,.fal.fa-pull-right.sc-icon-asset,.far.fa-pull-right.sc-icon-asset,.fas.fa-pull-right.sc-icon-asset{margin-left:.3em}.fa-spin.sc-icon-asset{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse.sc-icon-asset{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fa-rotate-90.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical.sc-icon-asset{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.fa-flip-both.sc-icon-asset,.fa-flip-horizontal.fa-flip-vertical.sc-icon-asset,.fa-flip-vertical.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\"}.fa-flip-both.sc-icon-asset,.fa-flip-horizontal.fa-flip-vertical.sc-icon-asset{-webkit-transform:scale(-1);transform:scale(-1)}.sc-icon-asset:root .fa-flip-both.sc-icon-asset,.sc-icon-asset:root .fa-flip-horizontal.sc-icon-asset,.sc-icon-asset:root .fa-flip-vertical.sc-icon-asset,.sc-icon-asset:root .fa-rotate-90.sc-icon-asset,.sc-icon-asset:root .fa-rotate-180.sc-icon-asset,.sc-icon-asset:root .fa-rotate-270.sc-icon-asset{-webkit-filter:none;filter:none}.fa-stack.sc-icon-asset{display:inline-block;height:2em;position:relative;width:2.5em}.fa-stack-1x.sc-icon-asset,.fa-stack-2x.sc-icon-asset{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x.sc-icon-asset{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x.sc-icon-asset{height:2em;width:2.5em}.fa-inverse.sc-icon-asset{color:#fff}.sr-only.sc-icon-asset{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable.sc-icon-asset:active,.sr-only-focusable.sc-icon-asset:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.svg-inline--fa.sc-icon-asset .fa-primary.sc-icon-asset{fill:var(--fa-primary-color,currentColor);opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa.sc-icon-asset .fa-secondary.sc-icon-asset{fill:var(--fa-secondary-color,currentColor)}.svg-inline--fa.sc-icon-asset .fa-secondary.sc-icon-asset,.svg-inline--fa.fa-swap-opacity.sc-icon-asset .fa-primary.sc-icon-asset{opacity:.4;opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity.sc-icon-asset .fa-secondary.sc-icon-asset{opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa.sc-icon-asset mask.sc-icon-asset .fa-primary.sc-icon-asset,.svg-inline--fa.sc-icon-asset mask.sc-icon-asset .fa-secondary.sc-icon-asset{fill:#000}.fad.fa-inverse.sc-icon-asset{color:#fff}icon-asset.sc-icon-asset{vertical-align:middle}svg.sc-icon-asset{transition:all var(--ptc-transition-medium) var(--ptc-ease-inout)}svg.micro.sc-icon-asset{width:calc(var(--ptc-font-size-x-small)/2);height:calc(var(--ptc-font-size-x-small)/2)}svg.xxx-small.sc-icon-asset{width:var(--ptc-font-size-xxx-small);height:var(--ptc-font-size-xxx-small)}svg.xx-small.sc-icon-asset{width:var(--ptc-font-size-xx-small);height:var(--ptc-font-size-xx-small)}svg.x-small.sc-icon-asset{width:var(--ptc-font-size-x-small);height:var(--ptc-font-size-x-small)}svg.small.sc-icon-asset{width:var(--ptc-font-size-small);height:var(--ptc-font-size-small)}svg.medium.sc-icon-asset{width:var(--ptc-font-size-medium);height:var(--ptc-font-size-medium)}svg.large.sc-icon-asset{width:var(--ptc-font-size-large);height:var(--ptc-font-size-large)}svg.x-large.sc-icon-asset{width:var(--ptc-font-size-x-large);height:var(--ptc-font-size-x-large)}svg.xx-large.sc-icon-asset{width:var(--ptc-font-size-xx-large);height:var(--ptc-font-size-xx-large)}svg.xxx-large.sc-icon-asset{width:var(--ptc-font-size-xxx-large);height:var(--ptc-font-size-xxx-large)}svg.xxxx-large.sc-icon-asset{width:var(--ptc-font-size-xxxx-large);height:var(--ptc-font-size-xxxx-large)}svg.white.sc-icon-asset{fill:var(--color-white)}svg.white.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.white.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.white.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-white)}svg.black.sc-icon-asset{fill:var(--color-black)}svg.black.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.black.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.black.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-black)}svg.ptc-green.sc-icon-asset{fill:var(--color-green-07)}svg.ptc-green.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.ptc-green.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.ptc-green.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-green-07)}svg.gray.sc-icon-asset{fill:var(--color-gray-06)}svg.gray.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.gray.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.gray.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-gray-06)}svg.light-gray.sc-icon-asset{fill:var(--color-gray-05)}svg.light-gray.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.light-gray.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.light-gray.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-gray-05)}svg.inherit.sc-icon-asset{fill:inherit}svg.inherit.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.inherit.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.inherit.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:inherit}";
|
|
8
23
|
|
|
@@ -62,6 +77,29 @@ let IconAsset = class {
|
|
|
62
77
|
};
|
|
63
78
|
IconAsset.style = iconAssetCss;
|
|
64
79
|
|
|
80
|
+
const listItemCss = ":host(.list-primary){display:block}:host(.flush-before) li::before{content:\"\" !important}:host(.breadcrumb){display:inline-block}:host(.breadcrumb) li{position:relative;display:inline-block;color:var(--color-white);font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-xxx-small);line-height:var(--ptc-line-height-densest)}:host(.breadcrumb) li::before{content:\"/\";top:0;left:0}:host(.breadcrumb) li a.item-link{color:var(--color-white);font-weight:var(--ptc-font-weight-bold) !important;font-size:var(--ptc-font-size-xxx-small) !important;line-height:var(--ptc-line-height-densest);text-decoration:underline;text-decoration-color:transparent;text-underline-offset:2px;text-decoration-thickness:1px;outline:none;transition:text-decoration-color var(--ptc-transition-medium) var(--ptc-ease-inout)}:host(.breadcrumb) li a.item-link:hover{text-decoration:underline;text-decoration-color:var(--color-green-07);outline:none}:host(:not(.flush-before)) li::before{margin-right:2px}:host(.list-footer) li{display:inline-block;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-regular);font-style:normal;font-stretch:normal;line-height:var(--ptc-line-height-denser);letter-spacing:normal;color:var(--color-white);margin:0 0.5rem}:host(.list-footer) li a{color:var(--color-white-grey);border-bottom:1px solid transparent;display:inline-block;text-decoration:none}:host(.list-footer) li a:hover,:host(.list-footer) li a:focus,:host(.list-footer) li a:active{text-decoration:none;border-bottom:1px solid var(--color-green-06);color:var(--color-white-grey);transition:border var(--ptc-ease-inout) var(--ptc-transition-medium)}:host(.list-footer) li a:focus{outline:3px solid var(--color-blue-07);outline-offset:2px;border-radius:var(--ptc-border-radius-standard);text-decoration:none;border-color:transparent !important}";
|
|
81
|
+
|
|
82
|
+
let ListItem = class {
|
|
83
|
+
constructor(hostRef) {
|
|
84
|
+
index.registerInstance(this, hostRef);
|
|
85
|
+
this.listType = 'list-primary';
|
|
86
|
+
this.linkHref = undefined;
|
|
87
|
+
this.flushBefore = false;
|
|
88
|
+
this.linkTarget = '_self';
|
|
89
|
+
}
|
|
90
|
+
render() {
|
|
91
|
+
const classMap = this.getCssClassMap();
|
|
92
|
+
return (index.h(index.Host, { class: classMap }, index.h("li", null, this.linkHref ? (index.h("a", Object.assign({ class: "item-link", target: this.linkTarget }, (this.linkHref ? { href: this.linkHref } : {})), index.h("slot", null))) : (index.h("slot", null)))));
|
|
93
|
+
}
|
|
94
|
+
getCssClassMap() {
|
|
95
|
+
return {
|
|
96
|
+
[this.listType]: true,
|
|
97
|
+
['flush-before']: this.flushBefore ? true : false
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
ListItem.style = listItemCss;
|
|
102
|
+
|
|
65
103
|
const ptcButtonCss = "button.disabled{pointer-events:none;opacity:0.6}button{background-color:var(--color-gray-10);display:inline-block;border-style:solid;border-width:1px;white-space:normal;position:relative;text-decoration:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;cursor:pointer;padding:9.4px 17.5px;border-radius:var(--ptc-border-radius-standard)}button.animation-right ::slotted([slot=slot-after-text]),button.animation-right ::slotted([slot=slot-before-text]),button.animation-down ::slotted([slot=slot-after-text]),button.animation-down ::slotted([slot=slot-before-text]){transition:transform var(--ptc-transition-medium) var(--ptc-ease-inout);position:relative;display:inline-block}button:hover.animation-right ::slotted([slot=slot-after-text]),button:hover.animation-right ::slotted([slot=slot-before-text]){transform:translateX(var(--ptc-element-spacing-02))}button:hover.animation-down ::slotted([slot=slot-after-text]),button:hover.animation-down ::slotted([slot=slot-before-text]){transform:translateY(var(--ptc-element-spacing-02))}button span{font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-small);font-weight:bold;line-height:var(--ptc-line-height-densest)}.icon-left ::slotted([slot=slot-before-text]){margin-right:var(--ptc-element-spacing-01)}.icon-right ::slotted([slot=slot-after-text]){margin-left:var(--ptc-element-spacing-01)}.blackgrey{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-gray-10);background-image:linear-gradient(285deg, var(--color-gray-10) 155%, var(--color-gray-07) 62%)}.blackgrey:hover{box-shadow:var(--ptc-shadow-x-large)}.blackgrey span{color:var(--color-white)}.turtlegreen{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-green-07);background-image:linear-gradient(285deg, var(--color-green-07) 155%, var(--color-green-07) 62%)}.turtlegreen:hover{box-shadow:var(--ptc-shadow-x-large)}.turtlegreen span{color:var(--color-white)}.offwhite{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-gray-10);background-image:linear-gradient(to right, var(--color-white), var(--color-gray-02), var(--color-gray-01))}.offwhite:hover{box-shadow:var(--ptc-shadow-x-large)}.offwhite span{color:var(--color-gray-10)}.legacy-green{margin-left:10px;padding:10px 20px;margin-bottom:var(--ptc-element-spacing-01);margin-top:var(--ptc-element-spacing-01);box-shadow:var(--ptc-shadow-large);border:solid 2.5px var(--color-green-08);background-image:linear-gradient(to right, var(--color-green-06), var(--color-green-08))}.legacy-green:after{position:absolute;content:\"\";top:-1px;left:0;bottom:0;right:0;width:100%;height:103%;background-image:linear-gradient(to right, var(--color-green-08), var(--color-green-06));opacity:0;transition:opacity var(--ptc-transition-x-slow) var(--ptc-ease-inout);border-radius:2px}.legacy-green:hover{box-shadow:var(--ptc-shadow-x-large)}.legacy-green:hover span{color:var(--color-white)}.legacy-green:hover:after{opacity:1}.legacy-green span{font-family:var(--ptc-font-secondary-latin);color:var(--color-white);z-index:100;position:relative;text-transform:uppercase;font-weight:var(--ptc-font-weight-bold);letter-spacing:var(--ptc-letter-spacing-normal);font-size:var(--ptc-font-size-x-small)}@media only screen and (min-width: 768px){.legacy-green span{font-size:var(--ptc-font-size-small);letter-spacing:var(--ptc-letter-spacing-loose)}}.legacy-green icon-asset{display:inline}a{border-style:solid;border-width:1px;position:relative;text-decoration:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding:9.4px 17.5px;border-radius:var(--ptc-border-radius-standard);display:inline-block;position:relative}a.animation-right ::slotted([slot=slot-after-text]),a.animation-right ::slotted([slot=slot-before-text]),a.animation-down ::slotted([slot=slot-after-text]),a.animation-down ::slotted([slot=slot-before-text]){transition:all var(--ptc-ease-inout) var(--ptc-transition-medium);position:relative;display:inline-block;margin-left:5px}a:hover.animation-right ::slotted([slot=slot-after-text]),a:hover.animation-right ::slotted([slot=slot-before-text]){transform:translateX(var(--ptc-element-spacing-02))}a:hover.animation-down ::slotted([slot=slot-after-text]),a:hover.animation-down ::slotted([slot=slot-before-text]){transform:translateY(var(--ptc-element-spacing-02))}.nav{font-family:var(--ptc-font-latin);background-color:var(--color-gray-10);border-radius:var(--ptc-border-radius-standard);border:1px solid var(--color-white);border-bottom-style:solid;border-bottom-width:1px;box-sizing:border-box;color:var(--color-white);display:inline-block;font-size:var(--ptc-font-size-xx-small);font-stretch:100%;font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-loose);list-style:none;padding:3px var(--ptc-element-spacing-04);position:relative;text-align:center;text-decoration:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;transition:background-color var(--ptc-transition-medium) var(--ptc-ease-inout)}.nav:focus{outline:3px solid var(--color-blue-07);outline-offset:2px}.nav:hover{background-color:var(--color-gray-12)}.ptc-primary,.ptc-quaternary,.ptc-secondary,.ptc-tertiary{padding:var(--ptc-font-size-xx-small) var(--ptc-font-size-medium);transition:background-color var(--ptc-ease-inout) var(--ptc-transition-medium);line-height:20px}.ptc-primary.disabled,.ptc-quaternary.disabled,.ptc-secondary.disabled,.ptc-tertiary.disabled{pointer-events:none;border-color:var(--color-gray-03);background:var(--color-gray-02)}.ptc-primary.disabled span,.ptc-quaternary.disabled span,.ptc-secondary.disabled span,.ptc-tertiary.disabled span{color:var(--color-gray-03)}.ptc-primary.disabled ::slotted([slot=slot-after-text]),.ptc-quaternary.disabled ::slotted([slot=slot-after-text]),.ptc-secondary.disabled ::slotted([slot=slot-after-text]),.ptc-tertiary.disabled ::slotted([slot=slot-after-text]){fill:var(--color-gray-03) !important}.ptc-primary:focus,.ptc-quaternary:focus,.ptc-secondary:focus,.ptc-tertiary:focus{outline:3px solid var(--color-blue-07);outline-offset:2px}.ptc-primary span,.ptc-quaternary span,.ptc-secondary span,.ptc-tertiary span{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-small);line-height:var(--ptc-line-height-densest);letter-spacing:normal}.ptc-primary{background:var(--color-gray-10);border:2px solid var(--color-green-07);border-radius:var(--ptc-border-radius-standard)}.ptc-primary:hover{background-color:var(--color-gray-12)}.ptc-primary:active{background-color:var(--color-black)}.ptc-primary span{color:var(--color-white)}.ptc-primary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.ptc-secondary{background:var(--color-gray-10);border:2px solid var(--color-gray-08);border-radius:var(--ptc-border-radius-standard)}.ptc-secondary:hover{background-color:var(--color-gray-12)}.ptc-secondary:active{background-color:var(--color-black)}.ptc-secondary span{color:var(--color-white)}.ptc-secondary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.ptc-tertiary{background:var(--color-white);border:2px solid var(--color-gray-10);border-radius:var(--ptc-border-radius-standard)}.ptc-tertiary:hover{background-color:var(--color-gray-02)}.ptc-tertiary:active{background-color:var(--color-gray-03)}.ptc-tertiary span{color:var(--color-gray-10)}.ptc-tertiary ::slotted([slot=slot-after-text]){fill:var(--color-gray-10) !important}.ptc-quaternary{background:var(--color-green-07);border:2px solid var(--color-green-07);border-radius:var(--ptc-border-radius-standard)}.ptc-quaternary:hover{background-color:var(--color-green-08)}.ptc-quaternary:active{background-color:var(--color-green-09)}.ptc-quaternary span{color:var(--color-white)}.ptc-quaternary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}";
|
|
66
104
|
|
|
67
105
|
let PtcButton = class {
|
|
@@ -131,41 +169,6 @@ let PtcButton = class {
|
|
|
131
169
|
};
|
|
132
170
|
PtcButton.style = ptcButtonCss;
|
|
133
171
|
|
|
134
|
-
const ptcCheckboxCss = ":host{display:block}:host .ptc-checkbox{display:block;position:relative;user-select:none;cursor:pointer;font-family:\"Raleway\";font-style:normal;color:var(--color-gray-10);padding-left:var(--spacing-lg);font-weight:var(--ptc-font-weight-regular);font-size:var(--ptc-font-size-x-small);line-height:var(--ptc-line-height-densest)}:host .ptc-checkbox input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}:host .ptc-checkbox .check{position:absolute;top:0;left:0;height:1.375rem;width:1.375rem;background-color:var(--color-white);border:1px solid var(--color-gray-07);box-sizing:border-box;border-radius:0.4rem}:host .ptc-checkbox .check .mark{position:absolute;transition:opacity ease-out 250ms;opacity:0;left:3px;top:2px;width:1.375rem;height:1.375rem}:host .ptc-checkbox input:checked~.check{background-color:#1F2024}:host .ptc-checkbox input:checked~.check .mark{opacity:1}:host .ptc-checkbox:hover input~.check{background-color:#E4E7E9}:host .ptc-checkbox:hover input:checked~.check{background-color:#33353A}";
|
|
135
|
-
|
|
136
|
-
let PtcCheckbox = class {
|
|
137
|
-
constructor(hostRef) {
|
|
138
|
-
index.registerInstance(this, hostRef);
|
|
139
|
-
this.checkedChanged = index.createEvent(this, "checkedChanged", 7);
|
|
140
|
-
this.checked = 'unchecked';
|
|
141
|
-
this.handleClick = (e) => {
|
|
142
|
-
let input = this.host.shadowRoot.querySelector('input');
|
|
143
|
-
if (this.checked == 'unchecked') {
|
|
144
|
-
this.checked = 'checked';
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
this.checked = 'unchecked';
|
|
148
|
-
}
|
|
149
|
-
let parameter = {
|
|
150
|
-
event: e,
|
|
151
|
-
sender: input,
|
|
152
|
-
value: this.value,
|
|
153
|
-
checked: this.checked
|
|
154
|
-
};
|
|
155
|
-
this.checkedChanged.emit(parameter);
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
componentDidLoad() {
|
|
159
|
-
let input = this.host.shadowRoot.querySelector('input');
|
|
160
|
-
input.checked = this.checked == 'checked';
|
|
161
|
-
}
|
|
162
|
-
render() {
|
|
163
|
-
return (index.h(index.Host, null, index.h("label", { class: "ptc-checkbox" }, index.h("slot", null), index.h("input", { type: "checkbox", checked: this.checked == "checked", name: this.inputName, value: this.value, onChange: (e) => this.handleClick(e) }), index.h("span", { class: "check" }, index.h("span", { class: "mark" }, index.h("icon-asset", { type: "ptc", color: "white", size: "xx-small", name: "checkmark" }))))));
|
|
164
|
-
}
|
|
165
|
-
get host() { return index.getElement(this); }
|
|
166
|
-
};
|
|
167
|
-
PtcCheckbox.style = ptcCheckboxCss;
|
|
168
|
-
|
|
169
172
|
const ptcContainerCss = ":host{display:block;position:relative}.white{border-radius:4px;background-color:var(--color-white)}.gray{border-radius:4px;background-color:var(--color-white-gray)}.content-wrapper{font-family:Raleway;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;text-align:left}.content-wrapper.x-small{box-shadow:var(--ptc-shadow-x-small)}.content-wrapper.small{box-shadow:var(--ptc-shadow-small)}.content-wrapper.medium{box-shadow:var(--ptc-shadow-medium)}.content-wrapper.large{box-shadow:var(--ptc-shadow-large)}.content-wrapper.x-large{box-shadow:var(--ptc-shadow-x-large)}.content-wrapper.spacing-xx-small{padding:var(--ptc-element-spacing-01)}.content-wrapper.spacing-x-small{padding:var(--ptc-element-spacing-02)}.content-wrapper.spacing-small{padding:var(--ptc-element-spacing-03)}.content-wrapper.spacing-medium{padding:var(--ptc-element-spacing-04)}.content-wrapper.spacing-large{padding:var(--ptc-element-spacing-05)}.content-wrapper.spacing-x-large{padding:var(--ptc-element-spacing-06)}.content-wrapper.spacing-xx-large{padding:var(--ptc-element-spacing-07)}.content-wrapper.spacing-xxx-large{padding:var(--ptc-element-spacing-08)}";
|
|
170
173
|
|
|
171
174
|
let PtcContainer = class {
|
|
@@ -205,373 +208,243 @@ let PtcContainer = class {
|
|
|
205
208
|
};
|
|
206
209
|
PtcContainer.style = ptcContainerCss;
|
|
207
210
|
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
let PtcDropdown = class {
|
|
211
|
-
constructor(hostRef) {
|
|
212
|
-
index.registerInstance(this, hostRef);
|
|
213
|
-
this.clickedItem = index.createEvent(this, "clickedItem", 7);
|
|
214
|
-
/**
|
|
215
|
-
* Theme
|
|
216
|
-
*/
|
|
217
|
-
this.theme = 'sort';
|
|
218
|
-
this.toggle = false;
|
|
219
|
-
this.handleClick = (item) => {
|
|
220
|
-
this.listItems.forEach((item) => item.selected = undefined);
|
|
221
|
-
item.selected = true;
|
|
222
|
-
this.selectedItem = item;
|
|
223
|
-
this.toggle = !this.toggle;
|
|
224
|
-
this.clickedItem.emit(item);
|
|
225
|
-
};
|
|
226
|
-
this.toggleList = () => {
|
|
227
|
-
this.toggle = !this.toggle;
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
offClick(e) {
|
|
231
|
-
if (e && !this.host.contains(e.target) && this.toggle) {
|
|
232
|
-
this.toggle = false;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
componentWillLoad() {
|
|
236
|
-
let items = this.host.querySelectorAll('item');
|
|
237
|
-
if (!this.listItems) {
|
|
238
|
-
this.listItems = [];
|
|
239
|
-
}
|
|
240
|
-
items.forEach(item => {
|
|
241
|
-
if (item && item.getAttribute('label')) {
|
|
242
|
-
let listItem = {
|
|
243
|
-
element: item,
|
|
244
|
-
label: item.getAttribute('label'),
|
|
245
|
-
value: item.getAttribute('value'),
|
|
246
|
-
selected: item.hasAttribute('selected')
|
|
247
|
-
};
|
|
248
|
-
this.listItems.push(listItem);
|
|
249
|
-
if (item.hasAttribute('selected')) {
|
|
250
|
-
this.selectedItem = listItem;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
render() {
|
|
256
|
-
const classMap = this.getCssClassMap();
|
|
257
|
-
return (index.h("div", { class: classMap }, index.h("header", { class: "dropdown__header", onClick: this.toggleList }, index.h("label", null, index.h("b", null, this.label), " ", this.selectedItem ? this.selectedItem.label : "Select Option"), index.h("icon-asset", { type: "solid", size: "x-small", name: "chevron-down" })), this.toggle &&
|
|
258
|
-
index.h("ul", { tabIndex: -1, class: "dropdown__list", onBlur: () => { this.toggle = false; } }, this.listItems.map((item) => {
|
|
259
|
-
let cssClass = "dropdown__item";
|
|
260
|
-
if (item.selected) {
|
|
261
|
-
cssClass += " selected";
|
|
262
|
-
}
|
|
263
|
-
return (index.h("li", { class: cssClass, onClick: () => this.handleClick(item) }, item.label));
|
|
264
|
-
}))));
|
|
265
|
-
}
|
|
266
|
-
getCssClassMap() {
|
|
267
|
-
return {
|
|
268
|
-
['ptc-dropdown']: true,
|
|
269
|
-
[this.theme]: true
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
get host() { return index.getElement(this); }
|
|
273
|
-
};
|
|
274
|
-
PtcDropdown.style = ptcDropdownCss;
|
|
275
|
-
|
|
276
|
-
const ptcFilterTagCss = ".ptc-filter-tag{display:block;cursor:pointer;position:relative;margin:0.25rem}.ptc-filter-tag.bubble{display:inline-block;font-family:Raleway;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-semibold);line-height:var(--ptc-line-height-denser);letter-spacing:var(--ptc-letter-spacing-normal);text-align:left;align-items:center;transition:border-color ease-out 250ms;border:1px solid var(--color-gray-05);border-radius:999px;padding:0.375rem 1.875rem 0.375rem 0.875rem;background:var(--color-white)}.ptc-filter-tag.bubble:hover{border:1px solid var(--color-gray-12)}.ptc-filter-tag.bubble .cls{display:block;position:absolute;top:0.35rem;right:0.8rem}.ptc-filter-tag.link,.ptc-filter-tag.link-lg{display:inline-block;font-family:Raleway;font-size:var(--ptc-font-size-x-small);font-weight:var(--ptc-font-weight-semibold);line-height:var(--ptc-line-height-denser);letter-spacing:var(--ptc-letter-spacing-normal);text-align:right;border-bottom:1px solid transparent;background:var(--color-white)}.ptc-filter-tag.link:hover,.ptc-filter-tag.link-lg:hover{text-decoration:underline}.ptc-filter-tag.link .cls,.ptc-filter-tag.link-lg .cls{display:none}.ptc-filter-tag.link-lg{font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-bold)}.ptc-filter-tag.button{background:var(--color-gray-10);border-radius:var(--ptc-border-radius-standard);padding:0.625rem 1rem;font-family:\"Raleway\";font-style:normal;font-size:var(--ptc-font-size-x-small);font-weight:var(--ptc-font-weight-semibold);line-height:var(--ptc-line-height-denser);color:var(--color-white)}.ptc-filter-tag.button:hover{background-color:var(--color-gray-12)}.ptc-filter-tag.button:active{background-color:var(--color-black)}.ptc-filter-tag.button .cls{display:none}.ptc-filter-tag.standard{display:inline-flex;background:var(--color-gray-10);font-family:\"Raleway\";font-style:normal;font-size:var(--ptc-font-size-x-small);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-denser);color:var(--color-green-07);background-color:transparent}.ptc-filter-tag.standard .cls{display:block;margin-left:0.25rem}";
|
|
211
|
+
const ptcEllipsisDropdownCss = ".ellipsis-icon{border:1px solid #6E717C;border-radius:2px;vertical-align:middle;height:18px;width:18px;text-align:center;transition:background-color var(--ptc-ease-out) var(--ptc-transition-medium), border-color var(--ptc-ease-out) var(--ptc-transition-medium)}.ellipsis-icon icon-asset{display:inline-block;margin-bottom:2px}.ellipsis-icon icon-asset svg{margin:0 auto;display:block}.ellipsis-icon.active{background-color:var(--color-green-07);border-color:var(--color-green-07)}.ptc-ellipsis-dropdown{position:relative;display:inline-block}.dropdown-container{display:none;margin-top:16px;box-shadow:0 6px 16px rgba(0, 0, 0, 0.24);border-radius:4px;position:absolute;z-index:100;background:#FFF;padding:0.8rem 0;right:0;left:auto;min-width:max-content;width:100%}.dropdown-container dropdown-item{}.dropdown-container dropdown-item a{display:inline-block;border-bottom:2px solid transparent;transition:border var(--ptc-ease-out) var(--ptc-transition-medium)}.show .dropdown-container{display:inline-block}";
|
|
277
212
|
|
|
278
|
-
let
|
|
213
|
+
let PtcEllipsisDropdown = class {
|
|
279
214
|
constructor(hostRef) {
|
|
280
215
|
index.registerInstance(this, hostRef);
|
|
281
|
-
this.
|
|
282
|
-
this.
|
|
283
|
-
this.
|
|
284
|
-
this.clicked.emit(this);
|
|
285
|
-
};
|
|
216
|
+
this.itemSelected = index.createEvent(this, "itemSelected", 7);
|
|
217
|
+
this.dataItems = [];
|
|
218
|
+
this.isDropdownOpen = false;
|
|
286
219
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
'hover': 'black',
|
|
291
|
-
'standard': 'light-gray'
|
|
292
|
-
},
|
|
293
|
-
'standard': {
|
|
294
|
-
'hover': 'ptc-green',
|
|
295
|
-
'standard': 'black'
|
|
296
|
-
},
|
|
297
|
-
};
|
|
220
|
+
dropdownToggle(e) {
|
|
221
|
+
e.currentTarget.classList.toggle("show");
|
|
222
|
+
this.isDropdownOpen = e.currentTarget.classList.contains("show");
|
|
298
223
|
}
|
|
299
|
-
|
|
300
|
-
this.
|
|
224
|
+
onItemSelected(e) {
|
|
225
|
+
this.itemSelected.emit(e);
|
|
301
226
|
}
|
|
302
|
-
|
|
303
|
-
this.
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
if (icon) {
|
|
308
|
-
if (this.iconColorMap[this.theme]) {
|
|
309
|
-
icon.setAttribute('color', this.iconColorMap[this.theme][state]);
|
|
310
|
-
}
|
|
227
|
+
offClick(e) {
|
|
228
|
+
let container = this.host.shadowRoot.querySelector('.ptc-ellipsis-dropdown');
|
|
229
|
+
if (e && !this.host.contains(e.target) && this.isDropdownOpen) {
|
|
230
|
+
container.classList.remove("show");
|
|
231
|
+
this.isDropdownOpen = false;
|
|
311
232
|
}
|
|
312
233
|
}
|
|
313
234
|
render() {
|
|
314
|
-
|
|
315
|
-
let
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
icon = (index.h("icon-asset", { class: "cls", type: "ptc", color: "light-gray", name: "times", size: "micro" }));
|
|
319
|
-
break;
|
|
320
|
-
case 'standard':
|
|
321
|
-
icon = (index.h("icon-asset", { class: "cls", type: "ptc", color: "black", name: "times", size: "xxx-small" }));
|
|
322
|
-
break;
|
|
235
|
+
let activeTab = this.dataItems.find(z => z.value == this.selectedTab);
|
|
236
|
+
let isActive = false;
|
|
237
|
+
if (activeTab) {
|
|
238
|
+
isActive = true;
|
|
323
239
|
}
|
|
324
|
-
return (index.h(
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
get el() { return index.getElement(this); }
|
|
333
|
-
};
|
|
334
|
-
PtcFilterTag.style = ptcFilterTagCss;
|
|
335
|
-
|
|
336
|
-
const ptcIconMinimizeCss = ".content{transition:max-height ease-out 250ms;overflow:hidden;max-height:0}.ptc-icon-minimize .header{display:flex;justify-content:space-between;align-items:center;align-content:center}.ptc-icon-minimize .header .title{color:var(--color-gray-10);font-family:\"Raleway\";font-style:normal;font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-x-small);line-height:var(--ptc-line-height-normal)}.ptc-icon-minimize .header .icon{cursor:pointer;border:1px solid var(--color-gray-10);border-radius:2px;transition:background-color ease-out 250ms;background-color:transparent;height:1.25rem;width:1.25rem;text-align:center;display:flex;align-items:center;justify-content:center}.ptc-icon-minimize .header .icon:hover{background-color:var(--color-gray-02)}.ptc-icon-minimize .header .icon icon-asset{position:relative;width:var(--ptc-font-size-xxx-small);height:var(--ptc-font-size-xxx-small);display:flex}";
|
|
337
|
-
|
|
338
|
-
let PtcIconMinimize = class {
|
|
339
|
-
constructor(hostRef) {
|
|
340
|
-
index.registerInstance(this, hostRef);
|
|
341
|
-
this.opened = true;
|
|
342
|
-
}
|
|
343
|
-
componentDidLoad() {
|
|
344
|
-
let content = this.host.shadowRoot.querySelector('.content');
|
|
345
|
-
if (this.opened && !content.style.maxHeight) {
|
|
346
|
-
content.style.maxHeight = content.scrollHeight + "px";
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
dropdownToggle() {
|
|
350
|
-
this.opened = !this.opened;
|
|
351
|
-
}
|
|
352
|
-
getScrollHeight() {
|
|
353
|
-
let result = undefined;
|
|
354
|
-
let content = this.host.shadowRoot.querySelector('.content');
|
|
355
|
-
if (this.opened && content) {
|
|
356
|
-
result = { 'max-height': content.scrollHeight + "px" };
|
|
357
|
-
}
|
|
358
|
-
else if (this.opened) {
|
|
359
|
-
result = { 'max-height': 350 + "px" };
|
|
360
|
-
}
|
|
361
|
-
else if (content && content.style.maxHeight) {
|
|
362
|
-
content.style.removeProperty('max-height');
|
|
363
|
-
}
|
|
364
|
-
return result;
|
|
365
|
-
}
|
|
366
|
-
render() {
|
|
367
|
-
let scrollHeight = this.getScrollHeight();
|
|
368
|
-
let icon = this.opened ? 'minus' : 'plus';
|
|
369
|
-
return (index.h("div", { class: "ptc-icon-minimize" }, index.h("div", { class: "header" }, index.h("div", { class: "title" }, this.heading), index.h("div", { class: "icon", onClick: () => this.dropdownToggle() }, index.h("icon-asset", { type: "ptc", color: "black", size: "xxx-small", name: icon }))), index.h("div", { class: "content", style: scrollHeight }, index.h("slot", null))));
|
|
240
|
+
return (index.h("div", { class: "ptc-ellipsis-dropdown", onClick: (e) => this.dropdownToggle(e) }, index.h("div", { class: isActive || this.isDropdownOpen ? "ellipsis-icon active" : "ellipsis-icon" }, index.h("icon-asset", { type: "ptc", size: "xxx-small", name: "ellipsis", color: isActive || this.isDropdownOpen ? 'white' : 'black' })), index.h("div", { class: "dropdown-container" }, index.h("slot", { name: "dropdown" }), this.dataItems.map(dataItem => {
|
|
241
|
+
let activeClass = dataItem.value == this.selectedTab ? 'active' : '';
|
|
242
|
+
return (index.h("dropdown-item", { class: activeClass }, index.h("a", { href: "#", onClick: (e) => {
|
|
243
|
+
e.preventDefault();
|
|
244
|
+
this.onItemSelected(dataItem);
|
|
245
|
+
} }, dataItem.text)));
|
|
246
|
+
}))));
|
|
370
247
|
}
|
|
371
248
|
get host() { return index.getElement(this); }
|
|
372
249
|
};
|
|
373
|
-
|
|
250
|
+
PtcEllipsisDropdown.style = ptcEllipsisDropdownCss;
|
|
374
251
|
|
|
375
|
-
const
|
|
252
|
+
const ptcHeroCss = ":host{display:block;position:relative}:host(.jumbotron) .ptc-hero-wrapper,:host(.footer-cta) .ptc-hero-wrapper{position:relative}:host(.footer-cta) .ptc-hero-wrapper div>*{text-align:center}";
|
|
376
253
|
|
|
377
|
-
let
|
|
254
|
+
let PtcHero = class {
|
|
378
255
|
constructor(hostRef) {
|
|
379
256
|
index.registerInstance(this, hostRef);
|
|
380
257
|
/**
|
|
381
|
-
*
|
|
382
|
-
*/
|
|
383
|
-
this.disabled = false;
|
|
384
|
-
/**
|
|
385
|
-
* Rxternal link
|
|
386
|
-
* */
|
|
387
|
-
this.external = false;
|
|
388
|
-
/**
|
|
389
|
-
* Target
|
|
390
|
-
*/
|
|
391
|
-
this.target = '_self';
|
|
392
|
-
/**
|
|
393
|
-
* Theme
|
|
394
|
-
*/
|
|
395
|
-
this.theme = 'simple';
|
|
396
|
-
/**
|
|
397
|
-
* Uppercase
|
|
258
|
+
* Hero Background Image URL
|
|
398
259
|
*/
|
|
399
|
-
this.
|
|
400
|
-
/**
|
|
401
|
-
* Font Size
|
|
402
|
-
*/
|
|
403
|
-
this.fontSize = 'medium';
|
|
260
|
+
this.bgUrl = undefined;
|
|
404
261
|
}
|
|
405
262
|
render() {
|
|
406
263
|
const classMap = this.getCssClassMap();
|
|
407
|
-
return (index.h(index.Host,
|
|
264
|
+
return (index.h(index.Host, { class: classMap }, index.h("div", { class: "ptc-hero-wrapper" }, index.h("ptc-img", Object.assign({ "image-type": "smart-bg" }, (!!this.bgUrl ? { imgUrl: this.bgUrl } : {}), { "size-xs": "600x450", "size-sm": "1108x658", "size-md": "1920x1080", "size-lg": "2700x1500" }), this.heroType == 'jumbotron' ? ([index.h("ptc-overlay", { "filter-color": "black-1" }), index.h("ptc-overlay", { "filter-color": "black-2" })]) : this.heroType == 'footer-cta' ? (index.h("ptc-overlay", { "filter-color": "black-3" })) : null, index.h("slot", null)))));
|
|
408
265
|
}
|
|
409
266
|
getCssClassMap() {
|
|
410
267
|
return {
|
|
411
|
-
[
|
|
412
|
-
[this.theme]: true,
|
|
413
|
-
['uppercase']: this.uppercase,
|
|
414
|
-
['disabled']: this.disabled,
|
|
415
|
-
[this.fontSize]: true,
|
|
268
|
+
[this.heroType]: this.heroType ? true : false,
|
|
416
269
|
};
|
|
417
270
|
}
|
|
418
271
|
};
|
|
419
|
-
|
|
272
|
+
PtcHero.style = ptcHeroCss;
|
|
420
273
|
|
|
421
|
-
const
|
|
274
|
+
const ptcImgCss = ".smart-bg{width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.smart-img{position:absolute;display:block;width:100%;height:100%;top:0;left:0;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.radius-standard{border-radius:var(--ptc-border-radius-standard)}.radius-large{border-radius:var(--ptc-border-radius-large)}.lazy-bg{background-image:none !important;background-color:var(--color-gray-03)}@media only screen and (min-width: 768px){.hidden-xs{display:none !important}}@media (min-width: 768px) and (max-width: 991px){.hidden-sm{display:none !important}}@media (min-width: 992px) and (max-width: 1199px){.hidden-md{display:none !important}}@media only screen and (min-width: 768px){.hidden-lg{display:none !important}}";
|
|
422
275
|
|
|
423
|
-
let
|
|
276
|
+
let PtcImg = class {
|
|
424
277
|
constructor(hostRef) {
|
|
425
278
|
index.registerInstance(this, hostRef);
|
|
426
|
-
this.closed = index.createEvent(this, "closed", 7);
|
|
427
|
-
this.opened = index.createEvent(this, "opened", 7);
|
|
428
279
|
/**
|
|
429
|
-
*
|
|
280
|
+
* Image size for smallest screen
|
|
281
|
+
* <=767px
|
|
430
282
|
*/
|
|
431
|
-
this.
|
|
283
|
+
this.sizeXs = '510x340';
|
|
432
284
|
/**
|
|
433
|
-
*
|
|
285
|
+
* Image size for small screen
|
|
286
|
+
* >=768px and <=991px
|
|
434
287
|
*/
|
|
435
|
-
this.
|
|
288
|
+
this.sizeSm = '1240x496';
|
|
436
289
|
/**
|
|
437
|
-
*
|
|
290
|
+
* Image size for medium screen
|
|
291
|
+
* >=992px and <=1199px
|
|
438
292
|
*/
|
|
439
|
-
this.
|
|
293
|
+
this.sizeMd = '1366x500';
|
|
440
294
|
/**
|
|
441
|
-
*
|
|
295
|
+
* Image solution for large screen
|
|
296
|
+
* >=1200px
|
|
442
297
|
*/
|
|
443
|
-
this.
|
|
298
|
+
this.sizeLg = '1920x1080';
|
|
444
299
|
/**
|
|
445
|
-
*
|
|
300
|
+
* Image type
|
|
446
301
|
*/
|
|
447
|
-
this.
|
|
302
|
+
this.imageType = 'smart-bg';
|
|
448
303
|
/**
|
|
449
|
-
*
|
|
304
|
+
* Image border shape
|
|
450
305
|
*/
|
|
451
|
-
this.
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
306
|
+
this.borderRadius = '';
|
|
307
|
+
/**
|
|
308
|
+
* Lazy loading option
|
|
309
|
+
*/
|
|
310
|
+
this.loadMode = 'lazy-bg';
|
|
455
311
|
}
|
|
456
|
-
|
|
457
|
-
|
|
312
|
+
/**
|
|
313
|
+
* Image Z Index
|
|
314
|
+
*/
|
|
315
|
+
// @Prop() imageZIndex: 'z-index-auto' | 'z-index-n-2' | 'z-index-n-1' | 'z-index-p-1' | 'z-index-p-2' = 'z-index-auto';
|
|
316
|
+
WindowResize() {
|
|
317
|
+
this.setResponsiveBg();
|
|
458
318
|
}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
this.
|
|
462
|
-
//overflow: body.style['overflow'],
|
|
463
|
-
overflowY: body.style['overflowY'],
|
|
464
|
-
overflowX: body.style['overflowX'],
|
|
465
|
-
};
|
|
319
|
+
render() {
|
|
320
|
+
const classMap = this.getCssClassMap();
|
|
321
|
+
return (index.h(index.Host, null, index.h("div", { class: classMap, "data-xs": `${this.imgUrl}:${this.sizeXs}`, "data-sm": `${this.imgUrl}:${this.sizeSm}`, "data-md": `${this.imgUrl}:${this.sizeMd}`, "data-lg": `${this.imgUrl}:${this.sizeLg}` }, this.imageType == 'smart-bg' ? index.h("slot", null) : null)));
|
|
466
322
|
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
323
|
+
componentDidLoad() {
|
|
324
|
+
this.addIntersectionObserver();
|
|
325
|
+
this.setResponsiveBg();
|
|
326
|
+
}
|
|
327
|
+
componentWillUpdate() {
|
|
328
|
+
// console.log('componentWillUpdate!');
|
|
329
|
+
this.addIntersectionObserver();
|
|
330
|
+
this.setResponsiveBg();
|
|
331
|
+
}
|
|
332
|
+
//responsive image
|
|
333
|
+
setResponsiveBg() {
|
|
334
|
+
// Define local variables
|
|
335
|
+
let backgrounds = (this.el || document).querySelectorAll(interfaces.ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
336
|
+
// console.log('current breakpoint: ' + currentBreakpoint);
|
|
337
|
+
// Loop through all target elements
|
|
338
|
+
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
339
|
+
// Set current variables
|
|
340
|
+
el = backgrounds[i];
|
|
341
|
+
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
342
|
+
// If the data attribute exists, set the background
|
|
343
|
+
if (elData !== null) {
|
|
344
|
+
el.style.backgroundImage = "url('" + elData + "')";
|
|
474
345
|
}
|
|
475
346
|
else {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
347
|
+
if (typeof console == 'object') {
|
|
348
|
+
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
349
|
+
}
|
|
479
350
|
}
|
|
480
351
|
}
|
|
481
352
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
353
|
+
//lazy loading
|
|
354
|
+
addIntersectionObserver() {
|
|
355
|
+
if (!this.imgUrl) {
|
|
356
|
+
console.log('no image!');
|
|
357
|
+
return;
|
|
485
358
|
}
|
|
486
|
-
if (
|
|
487
|
-
this.
|
|
359
|
+
if ('IntersectionObserver' in window) {
|
|
360
|
+
let lazyLoadBgs = (this.el || document).querySelectorAll('.lazy-bg');
|
|
361
|
+
let bgObserver = new IntersectionObserver(entries => {
|
|
362
|
+
entries.forEach(entry => {
|
|
363
|
+
if (entry.isIntersecting) {
|
|
364
|
+
const image = entry.target;
|
|
365
|
+
image.classList.remove('lazy-bg');
|
|
366
|
+
// console.log('loaded');
|
|
367
|
+
bgObserver.unobserve(image);
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
});
|
|
371
|
+
lazyLoadBgs.forEach(image => {
|
|
372
|
+
bgObserver.observe(image);
|
|
373
|
+
});
|
|
488
374
|
}
|
|
489
375
|
}
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
this.
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
this.
|
|
496
|
-
|
|
376
|
+
getCssClassMap() {
|
|
377
|
+
return {
|
|
378
|
+
[this.imageType]: true,
|
|
379
|
+
'ptc-img': true,
|
|
380
|
+
[this.borderRadius]: true,
|
|
381
|
+
[this.loadMode]: true,
|
|
382
|
+
// [this.imageZIndex] : true
|
|
383
|
+
};
|
|
497
384
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
if (modal) {
|
|
515
|
-
let body = modal.querySelector('.modal-body');
|
|
516
|
-
var height = body.clientHeight;
|
|
517
|
-
var scrollHeight = body.scrollHeight;
|
|
518
|
-
var scrollTop = body.scrollTop;
|
|
519
|
-
var offset = body.offsetHeight;
|
|
520
|
-
if (height < scrollHeight) { //has scrollbar
|
|
521
|
-
if (scrollTop > 0) { //can scroll up
|
|
522
|
-
modal.classList.add('scroll-top');
|
|
523
|
-
}
|
|
524
|
-
else {
|
|
525
|
-
modal.classList.remove('scroll-top');
|
|
526
|
-
}
|
|
527
|
-
if (offset + scrollTop < scrollHeight) { //can scroll down
|
|
528
|
-
modal.classList.add('scroll-bottom');
|
|
529
|
-
}
|
|
530
|
-
else {
|
|
531
|
-
modal.classList.remove('scroll-bottom');
|
|
532
|
-
}
|
|
385
|
+
getCurrentBreakPoints() {
|
|
386
|
+
// Define local variables
|
|
387
|
+
let doc = window.document, temp = doc.createElement('div'), env;
|
|
388
|
+
// Append test node
|
|
389
|
+
doc.body.appendChild(temp);
|
|
390
|
+
// Loop through breakpoints
|
|
391
|
+
for (let i = interfaces.ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
|
|
392
|
+
env = interfaces.ResponsiveBgVariables.envs[i];
|
|
393
|
+
// Add classes
|
|
394
|
+
temp.className = 'hidden-' + env;
|
|
395
|
+
// Found breakpoint
|
|
396
|
+
if (temp.offsetParent === null) {
|
|
397
|
+
// Remove our test node
|
|
398
|
+
doc.body.removeChild(temp);
|
|
399
|
+
// Return current breakpoint
|
|
400
|
+
return env;
|
|
533
401
|
}
|
|
534
402
|
}
|
|
403
|
+
// Breakpoint not found, try fallback
|
|
404
|
+
doc.body.removeChild(temp);
|
|
405
|
+
return this.getFallbackBreakpoint();
|
|
535
406
|
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
render() {
|
|
540
|
-
let content;
|
|
541
|
-
let overlay;
|
|
542
|
-
let type = this.iframeUrl ? 'frame' : 'html';
|
|
543
|
-
let closebtn = (index.h("div", { class: "close" }, index.h("a", { href: "#", onClick: (e) => { e.preventDefault(); this.close(); } }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, index.h("path", { d: "M1 1L13 13", stroke: "black" }), index.h("path", { d: "M13 1L1 13", stroke: "black" })))));
|
|
544
|
-
if (this.iframeUrl) {
|
|
545
|
-
content = (index.h("iframe", { src: this.iframeUrl, frameBorder: 0, allowFullScreen: false, height: "100%", width: "100%", scrolling: "no", onLoad: this.resizeIframe }));
|
|
407
|
+
getFallbackBreakpoint() {
|
|
408
|
+
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
409
|
+
return 'lg';
|
|
546
410
|
}
|
|
547
|
-
else {
|
|
548
|
-
|
|
549
|
-
content = (index.h("slot", { name: "body" }));
|
|
550
|
-
}
|
|
551
|
-
else {
|
|
552
|
-
content = (index.h("slot", null));
|
|
553
|
-
}
|
|
411
|
+
else if (window.matchMedia('(min-width: 768px)').matches) {
|
|
412
|
+
return 'md';
|
|
554
413
|
}
|
|
555
|
-
if (
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
overlay = index.h("div", { class: "overlay" });
|
|
561
|
-
}
|
|
414
|
+
else if (window.matchMedia('(min-width: 576px)').matches) {
|
|
415
|
+
return 'sm';
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
return 'xs';
|
|
562
419
|
}
|
|
563
|
-
return (index.h(index.Host, null, index.h("div", { class: `wrapper ${this.show ? "show" : "hide"}` }, overlay, index.h("div", { class: `modal-popup ${this.size} ${type} ${this.rounded ? 'rounded' : ''} ${this.showHeaderFooter ? 'shadow-scroller' : ''} ` }, this.showHeaderFooter ? [
|
|
564
|
-
index.h("div", { class: "modal-header" }, index.h("slot", { name: "header" }), closebtn),
|
|
565
|
-
index.h("div", { class: "modal-body", onScroll: () => this.handleScroll() }, content),
|
|
566
|
-
index.h("div", { class: "modal-footer" }, index.h("slot", { name: "footer" }))
|
|
567
|
-
] : [
|
|
568
|
-
closebtn,
|
|
569
|
-
index.h("div", { class: "modal-body" }, content)
|
|
570
|
-
]))));
|
|
571
420
|
}
|
|
572
421
|
get el() { return index.getElement(this); }
|
|
573
422
|
};
|
|
574
|
-
|
|
423
|
+
PtcImg.style = ptcImgCss;
|
|
424
|
+
|
|
425
|
+
const ptcOverlayCss = ":host{display:block;position:absolute;top:0;left:0;width:100%;height:100%}:host(.blue){background:linear-gradient(180deg, rgba(25, 123, 192, 0.2) 0%, var(--color-blue-07) 100%)}:host(.red){background:linear-gradient(180deg, rgba(209, 44, 58, 0.2) 0%, var(--color-red-07) 100%)}:host(.orange){background:linear-gradient(180deg, rgba(195, 119, 41, 0.2) 0%, var(--color-orange-07) 100%)}:host(.green){background:linear-gradient(180deg, rgba(0, 137, 11, 0.2) 0%, var(--color-green-07) 100%)}:host(.black-1){background:linear-gradient(270deg, rgba(32, 38, 42, 0.32) 33.33%, var(--color-gray-12) 100%)}:host(.black-2){background:linear-gradient(180deg, rgba(32, 38, 42, 0) 0%, var(--color-gray-12) 100%)}@media only screen and (min-width: 768px){:host(.black-1){background:linear-gradient(270deg, rgba(32, 38, 42, 0) 33.33%, var(--color-gray-12) 100%)}:host(.black-2){background:linear-gradient(180deg, rgba(32, 38, 42, 0) 0%, var(--color-gray-12) 100%)}}:host(.black-3){background:linear-gradient(180deg, var(--color-gray-12) 0%, rgba(32, 38, 42, 0.55) 100%)}:host(.slate-grey){background:linear-gradient(180deg, rgba(97, 116, 128, 0.2) 0%, var(--color-gray-07) 100%)}:host(.radius-standard){border-radius:var(--ptc-border-radius-standard)}:host(.radius-large){border-radius:var(--ptc-border-radius-large)}:host(.z-index-auto){z-index:auto}:host(.z-index-n-1){z-index:-1}:host(.z-index-n-2){z-index:-2}:host(.z-index-p-1){z-index:1}:host(.z-index-p-2){z-index:2}";
|
|
426
|
+
|
|
427
|
+
let PtcOverlay = class {
|
|
428
|
+
constructor(hostRef) {
|
|
429
|
+
index.registerInstance(this, hostRef);
|
|
430
|
+
/**
|
|
431
|
+
* Overlay z-index
|
|
432
|
+
*/
|
|
433
|
+
this.overlayZIndex = 'z-index-auto';
|
|
434
|
+
}
|
|
435
|
+
render() {
|
|
436
|
+
const classMap = this.getCssClassMap();
|
|
437
|
+
return index.h(index.Host, { class: classMap });
|
|
438
|
+
}
|
|
439
|
+
getCssClassMap() {
|
|
440
|
+
return {
|
|
441
|
+
[this.filterColor]: !!this.filterColor ? true : false,
|
|
442
|
+
[this.borderRadius]: !!this.borderRadius ? true : false,
|
|
443
|
+
[this.overlayZIndex]: true
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
PtcOverlay.style = ptcOverlayCss;
|
|
575
448
|
|
|
576
449
|
const ptcParaCss = ":host{z-index:1}:host(.white){color:var(--color-white)}p.default{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;}p.main{text-shadow:0 3px 6px var(--color-white);line-height:var(--ptc-line-height-dense);color:var(--color-gray-10)}p.primary-grey{color:var(--color-gray-10)}p.white{color:var(--color-white)}p.xxx-small{font-size:var(--ptc-font-size-xxx-small)}p.xx-small{font-size:var(--ptc-font-size-xx-small)}p.x-small{font-size:var(--ptc-font-size-x-small)}p.small{font-size:var(--ptc-font-size-small)}p.medium{font-size:var(--ptc-font-size-medium)}p.large{font-size:var(--ptc-font-size-large)}p.x-large{font-size:var(--ptc-font-size-x-large)}p.xx-large{font-size:var(--ptc-font-size-xx-large)}p.xxx-large{font-size:var(--ptc-font-size-xxx-large)}p.xxxx-large{font-size:var(--ptc-font-size-xxxx-large)}p.w-3{font-weight:var(--ptc-font-weight-thin)}p.w-4{font-weight:var(--ptc-font-weight-regular)}p.w-5{font-weight:var(--ptc-font-weight-medium)}p.w-6{font-weight:var(--ptc-font-weight-semibold)}p.w-7{font-weight:var(--ptc-font-weight-bold)}p.w-8{font-weight:var(--ptc-font-weight-extrabold)}p.w-9{font-weight:var(--ptc-font-weight-black)}p.margin-flush{margin-top:0;margin-bottom:0}p.margin-top-1{margin-top:var(--ptc-element-spacing-01);margin-bottom:0}p.margin-top-2{margin-top:var(--ptc-element-spacing-02);margin-bottom:0}p.margin-top-3{margin-top:var(--ptc-element-spacing-03);margin-bottom:0}p.margin-top-4{margin-top:var(--ptc-element-spacing-04);margin-bottom:0}p.margin-top-5{margin-top:var(--ptc-element-spacing-05);margin-bottom:0}p.margin-top-6{margin-top:var(--ptc-element-spacing-06);margin-bottom:0}p.margin-bottom-1{margin-bottom:var(--ptc-element-spacing-01);margin-top:0}p.margin-bottom-2{margin-bottom:var(--ptc-element-spacing-02);margin-top:0}p.margin-bottom-3{margin-bottom:var(--ptc-element-spacing-03);margin-top:0}p.margin-bottom-4{margin-bottom:var(--ptc-element-spacing-04);margin-top:0}p.margin-bottom-5{margin-bottom:var(--ptc-element-spacing-05);margin-top:0}p.margin-bottom-6{margin-bottom:var(--ptc-element-spacing-06);margin-top:0}p.margin-1{margin-top:var(--ptc-element-spacing-01);margin-bottom:var(--ptc-element-spacing-01)}p.margin-2{margin-top:var(--ptc-element-spacing-02);margin-bottom:var(--ptc-element-spacing-02)}p.margin-3{margin-top:var(--ptc-element-spacing-03);margin-bottom:var(--ptc-element-spacing-03)}p.margin-4{margin-top:var(--ptc-element-spacing-04);margin-bottom:var(--ptc-element-spacing-04)}p.margin-5{margin-top:var(--ptc-element-spacing-05);margin-bottom:var(--ptc-element-spacing-05)}p.margin-6{margin-top:var(--ptc-element-spacing-06);margin-bottom:var(--ptc-element-spacing-06)}p.line-height-densest{line-height:var(--ptc-line-height-densest)}p.line-height-denser{line-height:var(--ptc-line-height-denser)}p.line-height-p{line-height:var(--ptc-line-height-p)}p.line-height-dense{line-height:var(--ptc-line-height-dense)}p.line-height-normal{line-height:var(--ptc-line-height-normal)}p.line-height-loose{line-height:var(--ptc-line-height-loose)}p.line-height-looser{line-height:var(--ptc-line-height-looser)}p.announcement{text-transform:uppercase;font-size:var(--ptc-font-size-small);color:var(--color-gray-07);line-height:var(--ptc-line-height-looser);letter-spacing:var(--ptc-letter-spacing-loose)}";
|
|
577
450
|
|
|
@@ -625,6 +498,37 @@ let PtcPara = class {
|
|
|
625
498
|
};
|
|
626
499
|
PtcPara.style = ptcParaCss;
|
|
627
500
|
|
|
501
|
+
const ptcPreviousUrlCss = ":host{display:block;margin-top:var(--ptc-element-spacing-03)}.back-to-videos{display:inline-block;font-family:var(--ptc-font-latin);font-style:normal;font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-xx-small);line-height:var(--ptc-line-height-dense)}.back-to-videos:hover{text-decoration:underline;text-decoration-color:var(--color-green-07);outline:none}::slotted(*){transform:translate(-2px, -2px)}.backarrow:hover+.back-to-videos{text-decoration:underline;text-decoration-color:var(--color-green-07);outline:none}";
|
|
502
|
+
|
|
503
|
+
let PtcPreviousUrl = class {
|
|
504
|
+
constructor(hostRef) {
|
|
505
|
+
index.registerInstance(this, hostRef);
|
|
506
|
+
}
|
|
507
|
+
render() {
|
|
508
|
+
return (index.h(index.Host, null, index.h("list-item", { listType: 'breadcrumb', flushBefore: true, "link-href": this.href }, index.h("ptc-svg-btn", { class: "backarrow", "svg-name": "back-arrow", display: "inline-block" }), index.h("a", { class: "back-to-videos" }, this.text)), index.h("slot", null)));
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
PtcPreviousUrl.style = ptcPreviousUrlCss;
|
|
512
|
+
|
|
513
|
+
const ptcPricingBlockCss = ":host{display:block}:host .ptc-pricing-block{width:100%;background:#E4E7E9;border-radius:4px;font-family:Raleway;font-size:18px;font-weight:500;line-height:27px;display:block}:host .ptc-pricing-block.active{background:#20262A;color:#FFFFFF}:host .right-text{font-family:Raleway;font-size:18px;font-weight:800;line-height:27px;text-align:right;float:right;margin:15px 20px 15px 15px;margin:15px;display:inline-block}:host .left-text{font-family:Raleway;font-size:18px;font-weight:500;line-height:27px;text-align:left;margin:15px 15px 15px 20px;display:inline-block}";
|
|
514
|
+
|
|
515
|
+
let PtcPricingBlock = class {
|
|
516
|
+
constructor(hostRef) {
|
|
517
|
+
index.registerInstance(this, hostRef);
|
|
518
|
+
}
|
|
519
|
+
render() {
|
|
520
|
+
const classMap = this.getCssClassMap();
|
|
521
|
+
return (index.h(index.Host, null, index.h("div", { class: classMap }, index.h("span", { class: "left-text" }, index.h("slot", { name: "left-text" })), index.h("span", { class: "right-text" }, index.h("slot", { name: "right-text" })))));
|
|
522
|
+
}
|
|
523
|
+
getCssClassMap() {
|
|
524
|
+
return {
|
|
525
|
+
['ptc-pricing-block']: true,
|
|
526
|
+
['active']: this.active ? true : false
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
PtcPricingBlock.style = ptcPricingBlockCss;
|
|
531
|
+
|
|
628
532
|
const ShoppingCartBlack = `<svg width="26" height="24" viewBox="0 0 26 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
629
533
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.0047 16.9625H7.80762L6.89267 18.9387H22.1419V20.4358H21.288C21.5163 20.7841 21.6448 21.1863 21.66 21.6002C21.6753 22.0141 21.5767 22.4243 21.3747 22.7879C21.1726 23.1514 20.8746 23.4548 20.5118 23.6662C20.1491 23.8776 19.735 23.9892 19.3132 23.9892C18.8914 23.9892 18.4773 23.8776 18.1146 23.6662C17.7518 23.4548 17.4538 23.1514 17.2517 22.7879C17.0497 22.4243 16.9511 22.0141 16.9663 21.6002C16.9816 21.1863 17.1101 20.7841 17.3384 20.4358H9.27155C9.47218 20.7382 9.59773 21.0825 9.63811 21.4412C9.67848 21.7998 9.63255 22.1627 9.50401 22.5008C9.37547 22.8388 9.16791 23.1425 8.89803 23.3875C8.62815 23.6324 8.30348 23.8117 7.95014 23.911C7.5968 24.0103 7.22465 24.0268 6.86364 23.9591C6.50263 23.8915 6.16283 23.7416 5.87158 23.5215C5.58033 23.3014 5.34576 23.0173 5.18674 22.692C5.02772 22.3667 4.94869 22.0093 4.95601 21.6485C4.96201 21.221 5.08301 20.8027 5.30675 20.4358H4.33079L6.49619 14.9713H18.6041V13.7137H6.23695L2.33314 2.08101L0 1.25759V0L3.20235 1.10788L4.43754 4.49139H26L22.0047 16.9625ZM6.64528 22.5946C6.83586 22.7196 7.05993 22.7863 7.28915 22.7863C7.59652 22.7863 7.8913 22.6665 8.10865 22.4531C8.32599 22.2397 8.44809 21.9503 8.44809 21.6485C8.44809 21.4235 8.38012 21.2035 8.25278 21.0164C8.12543 20.8293 7.94443 20.6834 7.73266 20.5973C7.52089 20.5112 7.28786 20.4887 7.06305 20.5326C6.83824 20.5765 6.63173 20.6848 6.46965 20.844C6.30757 21.0031 6.19719 21.2058 6.15247 21.4265C6.10776 21.6473 6.13071 21.876 6.21843 22.0839C6.30614 22.2919 6.45469 22.4696 6.64528 22.5946ZM18.6769 22.5946C18.8675 22.7196 19.0916 22.7863 19.3208 22.7863C19.6282 22.7863 19.923 22.6665 20.1403 22.4531C20.3577 22.2397 20.4798 21.9503 20.4798 21.6485C20.4798 21.4235 20.4118 21.2035 20.2845 21.0164C20.1571 20.8293 19.9761 20.6834 19.7643 20.5973C19.5526 20.5112 19.3195 20.4887 19.0947 20.5326C18.8699 20.5765 18.6634 20.6848 18.5013 20.844C18.3392 21.0031 18.2289 21.2058 18.1841 21.4265C18.1394 21.6473 18.1624 21.876 18.2501 22.0839C18.3378 22.2919 18.4864 22.4696 18.6769 22.5946ZM19.3206 21.1395C19.2138 21.1365 19.1086 21.1651 19.0185 21.2215C18.9284 21.278 18.8577 21.3596 18.8154 21.456C18.7731 21.5523 18.7613 21.6589 18.7814 21.7619C18.8015 21.8649 18.8526 21.9596 18.9282 22.0338C19.0037 22.108 19.1002 22.1582 19.2051 22.1779C19.3101 22.1977 19.4186 22.186 19.5167 22.1445C19.6149 22.103 19.698 22.0336 19.7555 21.9451C19.813 21.8567 19.8421 21.7534 19.8391 21.6485C19.8391 21.5135 19.7845 21.384 19.6872 21.2886C19.59 21.1931 19.4581 21.1395 19.3206 21.1395ZM7.28896 21.1395C7.18276 21.1395 7.07899 21.1707 6.99092 21.2289C6.90285 21.2872 6.83449 21.3699 6.79458 21.4665C6.75467 21.5632 6.74503 21.6693 6.76689 21.7713C6.78875 21.8734 6.84111 21.9667 6.91729 22.0393C6.99347 22.112 7.08999 22.1607 7.1945 22.1791C7.29902 22.1976 7.40678 22.1851 7.504 22.1431C7.60122 22.1012 7.68348 22.0317 7.74025 21.9436C7.79702 21.8555 7.82572 21.7527 7.82269 21.6485C7.81872 21.5121 7.76074 21.3827 7.66107 21.2876C7.56141 21.1926 7.42791 21.1394 7.28896 21.1395Z" fill="#20262A"/>
|
|
630
534
|
</svg>
|
|
@@ -721,6 +625,215 @@ let PtcSpacer = class {
|
|
|
721
625
|
};
|
|
722
626
|
PtcSpacer.style = ptcSpacerCss;
|
|
723
627
|
|
|
628
|
+
const closeSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 42 41.485">
|
|
629
|
+
<g id="Group_1042" data-name="Group 1042" transform="rotate(180 108.25 87.993)">
|
|
630
|
+
<path id="Line_446" d="M0 0v39.486" class="cls-1" data-name="Line 446"></path>
|
|
631
|
+
<path id="Line_447" d="M0 0h40" class="cls-1" data-name="Line 447"></path>
|
|
632
|
+
<path id="Line_448" d="M0 33.592V0" class="cls-1" data-name="Line 448"></path>
|
|
633
|
+
<path id="Line_449" d="M23.994 0H0" class="cls-1" data-name="Line 449"></path>
|
|
634
|
+
<path id="Line_450" d="M0 0l17.596 17.596" class="cls-2" data-name="Line 450" transform="translate(187.229 147.226)"></path>
|
|
635
|
+
<path id="Line_451" d="M0 7.198L7.199 0" class="cls-2" data-name="Line 451" transform="translate(197.55 147.312)"></path>
|
|
636
|
+
<path id="Path_114" d="M0 7.2L7.2 0" class="cls-2" data-name="Path 114" transform="translate(187.313 157.549)"></path>
|
|
637
|
+
</g>
|
|
638
|
+
</svg>`;
|
|
639
|
+
|
|
640
|
+
const arrowSvgLeft = `<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
641
|
+
<g filter="url(#filter0_d_494_37)">
|
|
642
|
+
<circle cx="24" cy="22" r="20" fill="white"/>
|
|
643
|
+
<path d="M23.1444 16L23.1444 20.5762L31 20.5762L31 23.4239L23.1444 23.4239L23.1444 28L17 21.9669L23.1444 16Z" class="arrow"/>
|
|
644
|
+
</g>
|
|
645
|
+
<defs>
|
|
646
|
+
<filter id="filter0_d_494_37" x="0" y="0" width="48" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
647
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
648
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
649
|
+
<feOffset dy="2"/>
|
|
650
|
+
<feGaussianBlur stdDeviation="2"/>
|
|
651
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
652
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
653
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_494_37"/>
|
|
654
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_494_37" result="shape"/>
|
|
655
|
+
</filter>
|
|
656
|
+
</defs>
|
|
657
|
+
</svg>
|
|
658
|
+
`;
|
|
659
|
+
|
|
660
|
+
const arrowSvgRight = `<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
661
|
+
<g filter="url(#filter0_d_494_34)">
|
|
662
|
+
<circle cx="24" cy="22" r="20" fill="white"/>
|
|
663
|
+
<path d="M24.8556 16L24.8556 20.5762L17 20.5762L17 23.4239L24.8556 23.4239L24.8556 28L31 21.9669L24.8556 16Z" class="arrow"/>
|
|
664
|
+
</g>
|
|
665
|
+
<defs>
|
|
666
|
+
<filter id="filter0_d_494_34" x="0" y="0" width="48" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
667
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
668
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
669
|
+
<feOffset dy="2"/>
|
|
670
|
+
<feGaussianBlur stdDeviation="2"/>
|
|
671
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
672
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
673
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_494_34"/>
|
|
674
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_494_34" result="shape"/>
|
|
675
|
+
</filter>
|
|
676
|
+
</defs>
|
|
677
|
+
</svg>
|
|
678
|
+
`;
|
|
679
|
+
|
|
680
|
+
const backarrow = `<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 311 512">
|
|
681
|
+
<defs>
|
|
682
|
+
<style>
|
|
683
|
+
.cls-1 {
|
|
684
|
+
fill: #fff;
|
|
685
|
+
fill-rule: evenodd;
|
|
686
|
+
}
|
|
687
|
+
</style>
|
|
688
|
+
</defs>
|
|
689
|
+
<path class="cls-1" d="M251.762,512L311,452.638,114.774,256,311,59.362,251.762,0,0,252.29Z"/>
|
|
690
|
+
</svg>
|
|
691
|
+
`;
|
|
692
|
+
|
|
693
|
+
const ptcSvgBtnCss = ":host{cursor:pointer}:host(.block){display:block}:host(.inline){display:inline}:host(.inline-block){display:inline-block}:host(.flex){display:flex}:host(:focus-visible){outline:none}:host(.backarrow){margin:8px 8px 0px -2px}:focus-visible{outline:none}.svg-close svg .cls-1,.svg-close svg .cls-2{fill:none;stroke-width:2px}.svg-close svg .cls-1{stroke:var(--color-gray-10);stroke-linecap:square}.svg-close svg .cls-2{stroke:var(--color-gray-10)}.svg-close svg path{transition:all var(--ptc-transition-medium) var(--ptc-ease-inout)}.svg-close svg .cls-1:first-child{-webkit-transform:translate(175.5px, 135.5px);-ms-transform:translate(175.5px, 135.5px);transform:translate(175.5px, 135.5px)}.svg-close svg .cls-1:nth-child(2){-webkit-transform:translate(175.5px, 174.985px);-ms-transform:translate(175.5px, 174.985px);transform:translate(175.5px, 174.985px)}.svg-close svg .cls-1:nth-child(3){-webkit-transform:translate(215.5px, 141.393px);-ms-transform:translate(215.5px, 141.393px);transform:translate(215.5px, 141.393px)}.svg-close svg .cls-1:nth-child(4){-webkit-transform:translate(175.5px, 135.5px);-ms-transform:translate(175.5px, 135.5px);transform:translate(175.5px, 135.5px)}.svg-close:hover svg .cls-1:first-child{-webkit-transform:translate(175.5px, 162px);-ms-transform:translate(175.5px, 162px);transform:translate(175.5px, 162px)}.svg-close:hover svg .cls-1:nth-child(2){-webkit-transform:translate(149px, 174.985px);-ms-transform:translate(149px, 174.985px);transform:translate(149px, 174.985px)}.svg-close:hover svg .cls-1:nth-child(3){-webkit-transform:translate(215.5px, 174px);-ms-transform:translate(215.5px, 174px);transform:translate(215.5px, 174px)}.svg-close:hover svg .cls-1:nth-child(4){-webkit-transform:translate(152.5px, 135.5px);-ms-transform:translate(152.5px, 135.5px);transform:translate(152.5px, 135.5px)}.svg-close.svg-close-white .cls-1{stroke:var(--color-white)}.slider-left,.slider-right{transition:all var(--ptc-transition-medium) var(--ptc-ease-inout)}.slider-left svg .arrow,.slider-right svg .arrow{fill:var(--color-gray-10)}.slider-left:hover svg .arrow,.slider-right:hover svg .arrow{fill:var(--color-green-06)}.back-arrow{display:inline-block;fill:none;stroke-width:30px;stroke:var(--color-gray-10);stroke-linecap:square;height:10px;width:20px;position:relative;top:1px;text-align:center}@media only screen and (max-width: 1024px) and (min-width: 576px){:host(.back-arrow){margin:8px 8px 16px -2px}}";
|
|
694
|
+
|
|
695
|
+
let PtcSvgBtn = class {
|
|
696
|
+
constructor(hostRef) {
|
|
697
|
+
index.registerInstance(this, hostRef);
|
|
698
|
+
/**
|
|
699
|
+
* Display
|
|
700
|
+
*/
|
|
701
|
+
this.display = 'block';
|
|
702
|
+
}
|
|
703
|
+
render() {
|
|
704
|
+
const classMap = this.getCssClassMap();
|
|
705
|
+
return (index.h(index.Host, { class: classMap }, !!this.svgName && this.svgName === 'close' ? index.h("div", { class: 'svg-close', innerHTML: closeSvg }) : null, !!this.svgName && this.svgName === 'slider-left' ? index.h("div", { class: 'slider-left', innerHTML: arrowSvgLeft }) : null, !!this.svgName && this.svgName === 'slider-right' ? index.h("div", { class: 'slider-right', innerHTML: arrowSvgRight }) : null, !!this.svgName && this.svgName === 'back-arrow' ? index.h("div", { class: 'back-arrow', innerHTML: backarrow }) : null));
|
|
706
|
+
}
|
|
707
|
+
getCssClassMap() {
|
|
708
|
+
return {
|
|
709
|
+
[this.display]: true
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
PtcSvgBtn.style = ptcSvgBtnCss;
|
|
714
|
+
|
|
715
|
+
const ptcTabListCss = "ptc-tab-list{display:block;position:relative}.tabs-header-container{overflow:hidden;width:100%;border-bottom:2px solid #E4E7E9}.tabs-header{display:flex;padding-left:2rem;padding-right:2rem;transition:opacity ease-out 250ms;opacity:0;width:92.5%}.tabs-header.active{opacity:1}.tabs-content{padding:40px 35px 35px 20px}.ellipsis-btn{position:absolute;top:0.5rem;right:1rem;display:none}.ellipsis-btn.active{display:block}";
|
|
716
|
+
|
|
717
|
+
let PtcTabList = class {
|
|
718
|
+
constructor(hostRef) {
|
|
719
|
+
index.registerInstance(this, hostRef);
|
|
720
|
+
}
|
|
721
|
+
componentDidLoad() {
|
|
722
|
+
this.createGroup();
|
|
723
|
+
this.calculateHeaderTabsRendering();
|
|
724
|
+
/*const [group] = this.tabGroup;
|
|
725
|
+
this.selectGroup(group);*/
|
|
726
|
+
}
|
|
727
|
+
onSelectedTab(event) {
|
|
728
|
+
let self = this;
|
|
729
|
+
this.tabGroup.forEach(group => {
|
|
730
|
+
event.detail.then(res => {
|
|
731
|
+
if (group.header.name === res.name) {
|
|
732
|
+
self.selectGroup(group);
|
|
733
|
+
}
|
|
734
|
+
});
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
calculateHeaderTabsRendering() {
|
|
738
|
+
let header = this.host.querySelector('.tabs-header');
|
|
739
|
+
let dropdown = this.host.querySelector('.ellipsis-btn');
|
|
740
|
+
let tabs = header.children;
|
|
741
|
+
let activateDropDown = false;
|
|
742
|
+
let hiddenTabs = [];
|
|
743
|
+
header.classList.remove('active');
|
|
744
|
+
for (let index = 0; index < tabs.length; index++) {
|
|
745
|
+
tabs[index].style.removeProperty('display');
|
|
746
|
+
}
|
|
747
|
+
for (let index = tabs.length - 1; index >= 0; index--) {
|
|
748
|
+
let tab = tabs[index];
|
|
749
|
+
if (header.scrollWidth > header.clientWidth) {
|
|
750
|
+
tab.style.display = 'none';
|
|
751
|
+
activateDropDown = true;
|
|
752
|
+
hiddenTabs.push({
|
|
753
|
+
value: tab.getAttribute('name'),
|
|
754
|
+
text: tab.textContent,
|
|
755
|
+
isSelected: tab.isSelected
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
header.classList.add('active');
|
|
760
|
+
if (activateDropDown) {
|
|
761
|
+
dropdown.classList.add('active');
|
|
762
|
+
dropdown.dataItems = hiddenTabs.reverse();
|
|
763
|
+
}
|
|
764
|
+
else {
|
|
765
|
+
dropdown.classList.remove('active');
|
|
766
|
+
dropdown.dataItems = [];
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
createGroup() {
|
|
770
|
+
let self = this;
|
|
771
|
+
let headerComplete = false;
|
|
772
|
+
let contentComplete = false;
|
|
773
|
+
let headerCount = 0;
|
|
774
|
+
let contentCount = 0;
|
|
775
|
+
let headerData = [];
|
|
776
|
+
let contentData = [];
|
|
777
|
+
const tabsHeaderEl = Array.from(this.host.querySelectorAll('tab-header'));
|
|
778
|
+
this.tabsHeader = tabsHeaderEl.map(el => el.getChild().then(res => {
|
|
779
|
+
headerCount++;
|
|
780
|
+
if (headerCount === tabsHeaderEl.length) {
|
|
781
|
+
headerComplete = true;
|
|
782
|
+
}
|
|
783
|
+
headerData.push(res);
|
|
784
|
+
}));
|
|
785
|
+
this.tabsHeader = headerData;
|
|
786
|
+
const tabsContentEl = Array.from(this.host.querySelectorAll('tab-content'));
|
|
787
|
+
this.tabsContent = tabsContentEl.map(el => el.getChild().then(res => {
|
|
788
|
+
contentCount++;
|
|
789
|
+
if (contentCount === tabsContentEl.length) {
|
|
790
|
+
contentComplete = true;
|
|
791
|
+
}
|
|
792
|
+
contentData.push(res);
|
|
793
|
+
}));
|
|
794
|
+
this.tabsContent = contentData;
|
|
795
|
+
let myInterval = setInterval(() => {
|
|
796
|
+
if (headerComplete && contentComplete) {
|
|
797
|
+
clearInterval(myInterval);
|
|
798
|
+
self.tabGroup = self.tabsHeader.map(header => {
|
|
799
|
+
const content = self.tabsContent.find(content => content.name === header.name);
|
|
800
|
+
return {
|
|
801
|
+
header: header,
|
|
802
|
+
content: content
|
|
803
|
+
};
|
|
804
|
+
});
|
|
805
|
+
const group = self.tabGroup[0];
|
|
806
|
+
self.selectGroup(group);
|
|
807
|
+
}
|
|
808
|
+
}, 100);
|
|
809
|
+
}
|
|
810
|
+
selectGroup(group) {
|
|
811
|
+
let self = this;
|
|
812
|
+
self.tabGroup.forEach(_ => {
|
|
813
|
+
_.header.unselect();
|
|
814
|
+
_.content.unselect();
|
|
815
|
+
});
|
|
816
|
+
group.header.select();
|
|
817
|
+
group.content.select();
|
|
818
|
+
self.selectedValue = group.header.name;
|
|
819
|
+
}
|
|
820
|
+
onDropdownItemSelected(selectedItem) {
|
|
821
|
+
if (selectedItem) {
|
|
822
|
+
let selectedTabGroub = this.tabGroup.find((group) => {
|
|
823
|
+
return group.header.name == selectedItem.value;
|
|
824
|
+
});
|
|
825
|
+
if (selectedTabGroub) {
|
|
826
|
+
this.selectGroup(selectedTabGroub);
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
render() {
|
|
831
|
+
return (index.h(index.Host, null, index.h("div", { class: "tabs-header-container" }, index.h("div", { class: "tabs-header" }, index.h("slot", { name: "header" }))), index.h("div", { class: "tabs-content" }, index.h("slot", { name: "content" })), index.h("ptc-ellipsis-dropdown", { "selected-tab": this.selectedValue, class: "ellipsis-btn", onItemSelected: (e) => { this.onDropdownItemSelected(e.detail); } })));
|
|
832
|
+
}
|
|
833
|
+
get host() { return index.getElement(this); }
|
|
834
|
+
};
|
|
835
|
+
PtcTabList.style = ptcTabListCss;
|
|
836
|
+
|
|
724
837
|
const ptcTitleCss = "div.center.sc-ptc-title{text-align:center}div.center.dotted.sc-ptc-title h1.sc-ptc-title::before,div.center.dotted.sc-ptc-title h2.sc-ptc-title::before,div.center.dotted.sc-ptc-title h3.sc-ptc-title::before,div.center.dotted.sc-ptc-title h4.sc-ptc-title::before,div.center.dotted.sc-ptc-title h5.sc-ptc-title::before,div.center.dotted.sc-ptc-title h6.sc-ptc-title::before{left:50%;transform:translateX(-50%)}div.left.sc-ptc-title{text-align:left}div.left.dotted.sc-ptc-title h1.sc-ptc-title::before,div.left.dotted.sc-ptc-title h2.sc-ptc-title::before,div.left.dotted.sc-ptc-title h3.sc-ptc-title::before,div.left.dotted.sc-ptc-title h4.sc-ptc-title::before,div.left.dotted.sc-ptc-title h5.sc-ptc-title::before,div.left.dotted.sc-ptc-title h6.sc-ptc-title::before{left:0%}div.right.sc-ptc-title{text-align:right}div.right.dotted.sc-ptc-title h1.sc-ptc-title::before,div.right.dotted.sc-ptc-title h2.sc-ptc-title::before,div.right.dotted.sc-ptc-title h3.sc-ptc-title::before,div.right.dotted.sc-ptc-title h4.sc-ptc-title::before,div.right.dotted.sc-ptc-title h5.sc-ptc-title::before,div.right.dotted.sc-ptc-title h6.sc-ptc-title::before{right:0%}div.inherit.sc-ptc-title{text-align:inherit}div.dotted.sc-ptc-title h1.sc-ptc-title::before,div.dotted.sc-ptc-title h2.sc-ptc-title::before,div.dotted.sc-ptc-title h3.sc-ptc-title::before,div.dotted.sc-ptc-title h4.sc-ptc-title::before,div.dotted.sc-ptc-title h5.sc-ptc-title::before,div.dotted.sc-ptc-title h6.sc-ptc-title::before{content:\"\";position:absolute;top:-6px;width:30%;display:block;border-top:3px dashed var(--color-green-07)}div.solid.sc-ptc-title h1.sc-ptc-title::before,div.solid.sc-ptc-title h2.sc-ptc-title::before,div.solid.sc-ptc-title h3.sc-ptc-title::before,div.solid.sc-ptc-title h4.sc-ptc-title::before,div.solid.sc-ptc-title h5.sc-ptc-title::before,div.solid.sc-ptc-title h6.sc-ptc-title::before{content:\"\";position:absolute;width:100%;height:0.7px;background-color:var(--color-gray-07);opacity:0.9;left:0px}div.solid.sc-ptc-title h1.sc-ptc-title::after,div.solid.sc-ptc-title h2.sc-ptc-title::after,div.solid.sc-ptc-title h3.sc-ptc-title::after,div.solid.sc-ptc-title h4.sc-ptc-title::after,div.solid.sc-ptc-title h5.sc-ptc-title::after,div.solid.sc-ptc-title h6.sc-ptc-title::after{content:\"\";position:absolute;width:20%;height:2px;background-color:var(--color-green-07);top:-2px;left:0px}div.is-standard.sc-ptc-title h1.sc-ptc-title,div.is-standard.sc-ptc-title h2.sc-ptc-title,div.is-standard.sc-ptc-title h3.sc-ptc-title,div.is-standard.sc-ptc-title h4.sc-ptc-title,div.is-standard.sc-ptc-title h5.sc-ptc-title,div.is-standard.sc-ptc-title h6.sc-ptc-title{display:inline-block;position:relative}div.is-standard.sc-ptc-title h1.sc-ptc-title{font-size:var(--ptc-font-size-xxxx-large);line-height:var(--ptc-line-height-densest);font-weight:var(--ptc-font-weight-extrabold);letter-spacing:0px;color:var(--color-gray-10)}div.is-standard.sc-ptc-title h2.sc-ptc-title{font-size:var(--ptc-font-size-x-large);line-height:var(--ptc-line-height-densest);font-weight:var(--ptc-font-weight-extrabold);color:var(--color-gray-10)}div.is-plm-hub.sc-ptc-title h1.sc-ptc-title,div.is-plm-hub.sc-ptc-title h2.sc-ptc-title,div.is-plm-hub.sc-ptc-title h3.sc-ptc-title,div.is-plm-hub.sc-ptc-title h4.sc-ptc-title,div.is-plm-hub.sc-ptc-title h5.sc-ptc-title,div.is-plm-hub.sc-ptc-title h6.sc-ptc-title{display:inline-block;position:relative;margin-block-start:0em;margin-block-end:0em;margin-inline-start:0px;margin-inline-end:0px;color:var(--color-white)}div.margin-flush.sc-ptc-title{margin-top:0;margin-bottom:0}div.margin-flush.sc-ptc-title h1.sc-ptc-title,div.margin-flush.sc-ptc-title h2.sc-ptc-title,div.margin-flush.sc-ptc-title h3.sc-ptc-title,div.margin-flush.sc-ptc-title h4.sc-ptc-title,div.margin-flush.sc-ptc-title h5.sc-ptc-title{margin-top:0;margin-bottom:0}div.margin-top-2.sc-ptc-title{margin-top:var(--ptc-element-spacing-02);margin-bottom:0}div.margin-top-3.sc-ptc-title{margin-top:var(--ptc-element-spacing-03);margin-bottom:0}div.margin-top-4.sc-ptc-title{margin-top:var(--ptc-element-spacing-04);margin-bottom:0}div.margin-top-5.sc-ptc-title{margin-top:var(--ptc-element-spacing-05);margin-bottom:0}div.margin-top-6.sc-ptc-title{margin-top:var(--ptc-element-spacing-06);margin-bottom:0}div.margin-bottom-2.sc-ptc-title{margin-bottom:var(--ptc-element-spacing-02);margin-top:0}div.margin-bottom-3.sc-ptc-title{margin-bottom:var(--ptc-element-spacing-03);margin-top:0}div.margin-bottom-4.sc-ptc-title{margin-bottom:var(--ptc-element-spacing-04);margin-top:0}div.margin-bottom-5.sc-ptc-title{margin-bottom:var(--ptc-element-spacing-05);margin-top:0}div.margin-bottom-6.sc-ptc-title{margin-bottom:var(--ptc-element-spacing-06);margin-top:0}div.margin-2.sc-ptc-title{margin-top:var(--ptc-element-spacing-02);margin-bottom:var(--ptc-element-spacing-02)}div.margin-3.sc-ptc-title{margin-top:var(--ptc-element-spacing-03);margin-bottom:var(--ptc-element-spacing-03)}div.margin-4.sc-ptc-title{margin-top:var(--ptc-element-spacing-04);margin-bottom:var(--ptc-element-spacing-04)}div.margin-5.sc-ptc-title{margin-top:var(--ptc-element-spacing-05);margin-bottom:var(--ptc-element-spacing-05)}div.margin-5.sc-ptc-title h4.sc-ptc-title{margin-top:0;margin-bottom:0}div.margin-6.sc-ptc-title{margin-top:var(--ptc-element-spacing-06);margin-bottom:var(--ptc-element-spacing-06)}div.green.sc-ptc-title h1.sc-ptc-title,div.green.sc-ptc-title h2.sc-ptc-title,div.green.sc-ptc-title h3.sc-ptc-title,div.green.sc-ptc-title h4.sc-ptc-title,div.green.sc-ptc-title h5.sc-ptc-title,div.green.sc-ptc-title h6.sc-ptc-title{text-shadow:0px 0px var(--ptc-element-spacing-03) var(--color-green-07)}div.blue.sc-ptc-title h1.sc-ptc-title,div.blue.sc-ptc-title h2.sc-ptc-title,div.blue.sc-ptc-title h3.sc-ptc-title,div.blue.sc-ptc-title h4.sc-ptc-title,div.blue.sc-ptc-title h5.sc-ptc-title,div.blue.sc-ptc-title h6.sc-ptc-title{text-shadow:0px 0px var(--ptc-element-spacing-03) var(--color-blue-07)}div.red.sc-ptc-title h1.sc-ptc-title,div.red.sc-ptc-title h2.sc-ptc-title,div.red.sc-ptc-title h3.sc-ptc-title,div.red.sc-ptc-title h4.sc-ptc-title,div.red.sc-ptc-title h5.sc-ptc-title,div.red.sc-ptc-title h6.sc-ptc-title{text-shadow:0px 0px var(--ptc-element-spacing-03) var(--color-red-07)}div.orange.sc-ptc-title h1.sc-ptc-title,div.orange.sc-ptc-title h2.sc-ptc-title,div.orange.sc-ptc-title h3.sc-ptc-title,div.orange.sc-ptc-title h4.sc-ptc-title,div.orange.sc-ptc-title h5.sc-ptc-title,div.orange.sc-ptc-title h6.sc-ptc-title{text-shadow:0px 0px var(--ptc-element-spacing-03) var(--color-orange-07)}div.slate-grey.sc-ptc-title h1.sc-ptc-title,div.slate-grey.sc-ptc-title h2.sc-ptc-title,div.slate-grey.sc-ptc-title h3.sc-ptc-title,div.slate-grey.sc-ptc-title h4.sc-ptc-title,div.slate-grey.sc-ptc-title h5.sc-ptc-title,div.slate-grey.sc-ptc-title h6.sc-ptc-title{text-shadow:0px 0px var(--ptc-element-spacing-03) var(--color-grey-07)}div.w-3.sc-ptc-title h1.sc-ptc-title,div.w-3.sc-ptc-title h2.sc-ptc-title,div.w-3.sc-ptc-title h3.sc-ptc-title,div.w-3.sc-ptc-title h4.sc-ptc-title,div.w-3.sc-ptc-title h5.sc-ptc-title,div.w-3.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-thin)}div.w-4.sc-ptc-title h1.sc-ptc-title,div.w-4.sc-ptc-title h2.sc-ptc-title,div.w-4.sc-ptc-title h3.sc-ptc-title,div.w-4.sc-ptc-title h4.sc-ptc-title,div.w-4.sc-ptc-title h5.sc-ptc-title,div.w-4.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-regular)}div.w-5.sc-ptc-title h1.sc-ptc-title,div.w-5.sc-ptc-title h2.sc-ptc-title,div.w-5.sc-ptc-title h3.sc-ptc-title,div.w-5.sc-ptc-title h4.sc-ptc-title,div.w-5.sc-ptc-title h5.sc-ptc-title,div.w-5.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-medium)}div.w-6.sc-ptc-title h1.sc-ptc-title,div.w-6.sc-ptc-title h2.sc-ptc-title,div.w-6.sc-ptc-title h3.sc-ptc-title,div.w-6.sc-ptc-title h4.sc-ptc-title,div.w-6.sc-ptc-title h5.sc-ptc-title,div.w-6.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-semibold)}div.w-7.sc-ptc-title h1.sc-ptc-title,div.w-7.sc-ptc-title h2.sc-ptc-title,div.w-7.sc-ptc-title h3.sc-ptc-title,div.w-7.sc-ptc-title h4.sc-ptc-title,div.w-7.sc-ptc-title h5.sc-ptc-title,div.w-7.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-bold)}div.w-8.sc-ptc-title h1.sc-ptc-title,div.w-8.sc-ptc-title h2.sc-ptc-title,div.w-8.sc-ptc-title h3.sc-ptc-title,div.w-8.sc-ptc-title h4.sc-ptc-title,div.w-8.sc-ptc-title h5.sc-ptc-title,div.w-8.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-extrabold)}div.w-9.sc-ptc-title h1.sc-ptc-title,div.w-9.sc-ptc-title h2.sc-ptc-title,div.w-9.sc-ptc-title h3.sc-ptc-title,div.w-9.sc-ptc-title h4.sc-ptc-title,div.w-9.sc-ptc-title h5.sc-ptc-title,div.w-9.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-black)}div.xx-small.sc-ptc-title h1.sc-ptc-title,div.xx-small.sc-ptc-title h2.sc-ptc-title,div.xx-small.sc-ptc-title h3.sc-ptc-title,div.xx-small.sc-ptc-title h4.sc-ptc-title,div.xx-small.sc-ptc-title h5.sc-ptc-title,div.xx-small.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xx-small)}div.x-small.sc-ptc-title h1.sc-ptc-title,div.x-small.sc-ptc-title h2.sc-ptc-title,div.x-small.sc-ptc-title h3.sc-ptc-title,div.x-small.sc-ptc-title h4.sc-ptc-title,div.x-small.sc-ptc-title h5.sc-ptc-title,div.x-small.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-x-small)}div.small.sc-ptc-title h1.sc-ptc-title,div.small.sc-ptc-title h2.sc-ptc-title,div.small.sc-ptc-title h3.sc-ptc-title,div.small.sc-ptc-title h4.sc-ptc-title,div.small.sc-ptc-title h5.sc-ptc-title,div.small.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-small)}div.medium.sc-ptc-title h1.sc-ptc-title,div.medium.sc-ptc-title h2.sc-ptc-title,div.medium.sc-ptc-title h3.sc-ptc-title,div.medium.sc-ptc-title h4.sc-ptc-title,div.medium.sc-ptc-title h5.sc-ptc-title,div.medium.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-medium)}div.large.sc-ptc-title h1.sc-ptc-title,div.large.sc-ptc-title h2.sc-ptc-title,div.large.sc-ptc-title h3.sc-ptc-title,div.large.sc-ptc-title h4.sc-ptc-title,div.large.sc-ptc-title h5.sc-ptc-title,div.large.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-large)}div.x-large.sc-ptc-title h1.sc-ptc-title,div.x-large.sc-ptc-title h2.sc-ptc-title,div.x-large.sc-ptc-title h3.sc-ptc-title,div.x-large.sc-ptc-title h4.sc-ptc-title,div.x-large.sc-ptc-title h5.sc-ptc-title,div.x-large.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-x-large)}div.xx-large.sc-ptc-title h1.sc-ptc-title,div.xx-large.sc-ptc-title h2.sc-ptc-title,div.xx-large.sc-ptc-title h3.sc-ptc-title,div.xx-large.sc-ptc-title h4.sc-ptc-title{font-size:var(--ptc-font-size-xx-large)}div.xxx-large.sc-ptc-title h1.sc-ptc-title,div.xxx-large.sc-ptc-title h2.sc-ptc-title,div.xxx-large.sc-ptc-title h3.sc-ptc-title,div.xxx-large.sc-ptc-title h4.sc-ptc-title,div.xxx-large.sc-ptc-title h5.sc-ptc-title,div.xxx-large.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xxx-large)}div.xxxx-large.sc-ptc-title h1.sc-ptc-title,div.xxxx-large.sc-ptc-title h2.sc-ptc-title,div.xxxx-large.sc-ptc-title h3.sc-ptc-title,div.xxxx-large.sc-ptc-title h4.sc-ptc-title,div.xxxx-large.sc-ptc-title h5.sc-ptc-title,div.xxxx-large.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xxxx-large)}div.densest.sc-ptc-title h1.sc-ptc-title,div.densest.sc-ptc-title h2.sc-ptc-title,div.densest.sc-ptc-title h3.sc-ptc-title,div.densest.sc-ptc-title h4.sc-ptc-title,div.densest.sc-ptc-title h5.sc-ptc-title,div.densest.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-densest)}div.denser.sc-ptc-title h1.sc-ptc-title,div.denser.sc-ptc-title h2.sc-ptc-title,div.denser.sc-ptc-title h3.sc-ptc-title,div.denser.sc-ptc-title h4.sc-ptc-title,div.denser.sc-ptc-title h5.sc-ptc-title,div.denser.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-denser)}div.dense.sc-ptc-title h1.sc-ptc-title,div.dense.sc-ptc-title h2.sc-ptc-title,div.dense.sc-ptc-title h3.sc-ptc-title,div.dense.sc-ptc-title h4.sc-ptc-title,div.dense.sc-ptc-title h5.sc-ptc-title,div.dense.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-dense)}div.normal.sc-ptc-title h1.sc-ptc-title,div.normal.sc-ptc-title h2.sc-ptc-title,div.normal.sc-ptc-title h3.sc-ptc-title,div.normal.sc-ptc-title h4.sc-ptc-title,div.normal.sc-ptc-title h5.sc-ptc-title,div.normal.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-normal)}div.loose.sc-ptc-title h1.sc-ptc-title,div.loose.sc-ptc-title h2.sc-ptc-title,div.loose.sc-ptc-title h3.sc-ptc-title,div.loose.sc-ptc-title h4.sc-ptc-title,div.loose.sc-ptc-title h5.sc-ptc-title,div.loose.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-loose)}div.looser.sc-ptc-title h1.sc-ptc-title,div.looser.sc-ptc-title h2.sc-ptc-title,div.looser.sc-ptc-title h3.sc-ptc-title,div.looser.sc-ptc-title h4.sc-ptc-title,div.looser.sc-ptc-title h5.sc-ptc-title,div.looser.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-looser)}div.paragraph.sc-ptc-title h1.sc-ptc-title,div.paragraph.sc-ptc-title h2.sc-ptc-title,div.paragraph.sc-ptc-title h3.sc-ptc-title,div.paragraph.sc-ptc-title h4.sc-ptc-title,div.paragraph.sc-ptc-title h5.sc-ptc-title,div.paragraph.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-paragraph)}";
|
|
725
838
|
|
|
726
839
|
let PtcTitle = class {
|
|
@@ -782,16 +895,99 @@ let PtcTitle = class {
|
|
|
782
895
|
};
|
|
783
896
|
PtcTitle.style = ptcTitleCss;
|
|
784
897
|
|
|
898
|
+
const tabContentCss = ".tab-content{display:none}.tab-content-selected{display:block}p{max-width:720px;font-weight:400px}.tab-content h3{font-size:24px;font-weight:700}";
|
|
899
|
+
|
|
900
|
+
let TabContent = class {
|
|
901
|
+
constructor(hostRef) {
|
|
902
|
+
index.registerInstance(this, hostRef);
|
|
903
|
+
this.isSelected = false;
|
|
904
|
+
}
|
|
905
|
+
async getChild() {
|
|
906
|
+
return {
|
|
907
|
+
select: this.select.bind(this),
|
|
908
|
+
unselect: this.unselect.bind(this),
|
|
909
|
+
name: this.name
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
unselect() {
|
|
913
|
+
this.isSelected = false;
|
|
914
|
+
}
|
|
915
|
+
select() {
|
|
916
|
+
this.isSelected = true;
|
|
917
|
+
}
|
|
918
|
+
render() {
|
|
919
|
+
const classes = {
|
|
920
|
+
'tab-content': true,
|
|
921
|
+
'tab-content-selected': this.isSelected
|
|
922
|
+
};
|
|
923
|
+
return (index.h("div", { class: classes }, index.h("slot", null)));
|
|
924
|
+
}
|
|
925
|
+
};
|
|
926
|
+
TabContent.style = tabContentCss;
|
|
927
|
+
|
|
928
|
+
const tabHeaderCss = ".tab-header{min-height:40px;min-width:40px;padding:5px;margin:0;cursor:pointer;position:relative;display:flex;justify-content:center;align-items:center;border-bottom:2px solid transparent;font-family:\"Raleway\";font-style:normal;font-weight:700;font-size:18px;line-height:27px;white-space:nowrap;text-align:center;color:var(--color-gray-07)}@media (max-width: 599px){.tab-header{min-width:100px}}.tab-header-selected{border-bottom:2px solid var(--color-green-07);color:var(--color-gray-10);font-weight:700}";
|
|
929
|
+
|
|
930
|
+
let TabHeader = class {
|
|
931
|
+
constructor(hostRef) {
|
|
932
|
+
index.registerInstance(this, hostRef);
|
|
933
|
+
this.tabClicked = index.createEvent(this, "tabClicked", 7);
|
|
934
|
+
this.id = this.generateId();
|
|
935
|
+
this.isSelected = false;
|
|
936
|
+
}
|
|
937
|
+
async getChild() {
|
|
938
|
+
let self = this;
|
|
939
|
+
let myPromise = new Promise(function (resolve) {
|
|
940
|
+
let data = {
|
|
941
|
+
select: self.select.bind(self),
|
|
942
|
+
unselect: self.unselect.bind(self),
|
|
943
|
+
name: self.name,
|
|
944
|
+
id: self.id
|
|
945
|
+
};
|
|
946
|
+
resolve(data);
|
|
947
|
+
});
|
|
948
|
+
let result = await myPromise;
|
|
949
|
+
return result;
|
|
950
|
+
}
|
|
951
|
+
unselect() {
|
|
952
|
+
this.isSelected = false;
|
|
953
|
+
}
|
|
954
|
+
select() {
|
|
955
|
+
this.isSelected = true;
|
|
956
|
+
}
|
|
957
|
+
onClick() {
|
|
958
|
+
this.tabClicked.emit(this.getChild());
|
|
959
|
+
}
|
|
960
|
+
generateId() {
|
|
961
|
+
return Math.random().toString(36).substring(2, 10);
|
|
962
|
+
}
|
|
963
|
+
render() {
|
|
964
|
+
const classes = {
|
|
965
|
+
'tab-header': true,
|
|
966
|
+
'tab-header-selected': this.isSelected
|
|
967
|
+
};
|
|
968
|
+
return [
|
|
969
|
+
index.h("h2", { class: classes, onClick: this.onClick.bind(this) }, index.h("slot", null)),
|
|
970
|
+
];
|
|
971
|
+
}
|
|
972
|
+
};
|
|
973
|
+
TabHeader.style = tabHeaderCss;
|
|
974
|
+
|
|
975
|
+
exports.dropdown_item = DropdownItem;
|
|
785
976
|
exports.icon_asset = IconAsset;
|
|
977
|
+
exports.list_item = ListItem;
|
|
786
978
|
exports.ptc_button = PtcButton;
|
|
787
|
-
exports.ptc_checkbox = PtcCheckbox;
|
|
788
979
|
exports.ptc_container = PtcContainer;
|
|
789
|
-
exports.
|
|
790
|
-
exports.
|
|
791
|
-
exports.
|
|
792
|
-
exports.
|
|
793
|
-
exports.ptc_modal = PtcModal;
|
|
980
|
+
exports.ptc_ellipsis_dropdown = PtcEllipsisDropdown;
|
|
981
|
+
exports.ptc_hero = PtcHero;
|
|
982
|
+
exports.ptc_img = PtcImg;
|
|
983
|
+
exports.ptc_overlay = PtcOverlay;
|
|
794
984
|
exports.ptc_para = PtcPara;
|
|
985
|
+
exports.ptc_previous_url = PtcPreviousUrl;
|
|
986
|
+
exports.ptc_pricing_block = PtcPricingBlock;
|
|
795
987
|
exports.ptc_shopping_cart = PtcShoppingCart;
|
|
796
988
|
exports.ptc_spacer = PtcSpacer;
|
|
989
|
+
exports.ptc_svg_btn = PtcSvgBtn;
|
|
990
|
+
exports.ptc_tab_list = PtcTabList;
|
|
797
991
|
exports.ptc_title = PtcTitle;
|
|
992
|
+
exports.tab_content = TabContent;
|
|
993
|
+
exports.tab_header = TabHeader;
|