@ptcwebops/ptcw-design 0.6.9 → 0.7.1

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.
Files changed (172) hide show
  1. package/dist/cjs/dropdown-item.cjs.entry.js +1 -1
  2. package/dist/cjs/icon-asset.cjs.entry.js +65 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/ptc-button.cjs.entry.js +76 -0
  5. package/dist/cjs/{ptc-card.cjs.entry.js → ptc-card_6.cjs.entry.js} +492 -0
  6. package/dist/cjs/ptc-checkbox.cjs.entry.js +42 -0
  7. package/dist/cjs/ptc-container.cjs.entry.js +46 -0
  8. package/dist/cjs/ptc-dropdown.cjs.entry.js +75 -0
  9. package/dist/cjs/ptc-ellipsis-dropdown.cjs.entry.js +1 -1
  10. package/dist/cjs/ptc-filter-tag.cjs.entry.js +67 -0
  11. package/dist/cjs/ptc-icon-minimize.cjs.entry.js +46 -0
  12. package/dist/cjs/ptc-link.cjs.entry.js +53 -0
  13. package/dist/cjs/ptc-modal.cjs.entry.js +162 -0
  14. package/dist/cjs/ptc-pricing-block.cjs.entry.js +1 -1
  15. package/dist/cjs/ptc-shopping-cart.cjs.entry.js +64 -0
  16. package/dist/cjs/ptc-tab-list.cjs.entry.js +13 -9
  17. package/dist/cjs/ptc-text-copy-with-background.cjs.entry.js +35 -0
  18. package/dist/cjs/ptc-title.cjs.entry.js +84 -0
  19. package/dist/cjs/ptcw-design.cjs.js +1 -1
  20. package/dist/cjs/tab-header.cjs.entry.js +1 -1
  21. package/dist/collection/collection-manifest.json +1 -0
  22. package/dist/collection/components/dropdown-item/dropdown-item.css +2 -7
  23. package/dist/collection/components/ptc-checkbox/ptc-checkbox.css +1 -1
  24. package/dist/collection/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.css +10 -15
  25. package/dist/collection/components/ptc-para/ptc-para.css +7 -0
  26. package/dist/collection/components/ptc-para/ptc-para.js +30 -2
  27. package/dist/collection/components/ptc-pricing-block/ptc-pricing-block.css +14 -14
  28. package/dist/collection/components/ptc-tab-list/ptc-tab-list.css +4 -4
  29. package/dist/collection/components/ptc-tab-list/ptc-tab-list.js +14 -10
  30. package/dist/collection/components/ptc-text-copy-with-background/ptc-text-copy-with-background.css +96 -0
  31. package/dist/collection/components/ptc-text-copy-with-background/ptc-text-copy-with-background.js +129 -0
  32. package/dist/collection/components/ptc-title/ptc-title.css +34 -3
  33. package/dist/collection/components/ptc-title/ptc-title.js +54 -2
  34. package/dist/collection/components/tab-header/tab-header.css +22 -6
  35. package/dist/custom-elements/index.d.ts +6 -0
  36. package/dist/custom-elements/index.js +86 -23
  37. package/dist/esm/dropdown-item.entry.js +2 -2
  38. package/dist/esm/icon-asset.entry.js +61 -0
  39. package/dist/esm/{index-a91c2367.js → index-5ff11327.js} +1 -1
  40. package/dist/esm/list-item.entry.js +1 -1
  41. package/dist/esm/loader.js +2 -2
  42. package/dist/esm/lottie-player.entry.js +1 -1
  43. package/dist/esm/my-component.entry.js +1 -1
  44. package/dist/esm/ptc-accordion-item.entry.js +1 -1
  45. package/dist/esm/ptc-accordion.entry.js +1 -1
  46. package/dist/esm/ptc-announcement.entry.js +1 -1
  47. package/dist/esm/ptc-breadcrumb.entry.js +1 -1
  48. package/dist/esm/ptc-button.entry.js +72 -0
  49. package/dist/esm/ptc-card-bottom.entry.js +1 -1
  50. package/dist/esm/ptc-card-content.entry.js +1 -1
  51. package/dist/esm/ptc-card-plm.entry.js +1 -1
  52. package/dist/esm/{ptc-card.entry.js → ptc-card_6.entry.js} +489 -2
  53. package/dist/esm/ptc-checkbox.entry.js +38 -0
  54. package/dist/esm/ptc-collapse-list.entry.js +1 -1
  55. package/dist/esm/ptc-container.entry.js +42 -0
  56. package/dist/esm/ptc-dropdown.entry.js +71 -0
  57. package/dist/esm/ptc-dynamic-card.entry.js +1 -1
  58. package/dist/esm/ptc-ellipsis-dropdown.entry.js +2 -2
  59. package/dist/esm/ptc-filter-tag.entry.js +63 -0
  60. package/dist/esm/ptc-hero-footer-cta.entry.js +1 -1
  61. package/dist/esm/ptc-hero.entry.js +1 -1
  62. package/dist/esm/ptc-icon-list.entry.js +1 -1
  63. package/dist/esm/ptc-icon-minimize.entry.js +42 -0
  64. package/dist/esm/ptc-link.entry.js +49 -0
  65. package/dist/esm/ptc-list.entry.js +1 -1
  66. package/dist/esm/ptc-lottie.entry.js +1 -1
  67. package/dist/esm/ptc-minimized-footer.entry.js +1 -1
  68. package/dist/esm/ptc-minimized-header.entry.js +1 -1
  69. package/dist/esm/ptc-mobile-select.entry.js +1 -1
  70. package/dist/esm/ptc-modal.entry.js +158 -0
  71. package/dist/esm/ptc-nav-item.entry.js +1 -1
  72. package/dist/esm/ptc-nav.entry.js +1 -1
  73. package/dist/esm/ptc-overlay.entry.js +1 -1
  74. package/dist/esm/ptc-pagenation.entry.js +1 -1
  75. package/dist/esm/ptc-previous-url.entry.js +1 -1
  76. package/dist/esm/ptc-pricing-block.entry.js +2 -2
  77. package/dist/esm/ptc-quote.entry.js +1 -1
  78. package/dist/esm/ptc-responsive-wrapper.entry.js +1 -1
  79. package/dist/esm/ptc-shopping-cart.entry.js +60 -0
  80. package/dist/esm/ptc-social-share.entry.js +1 -1
  81. package/dist/esm/ptc-span.entry.js +1 -1
  82. package/dist/esm/ptc-svg-btn.entry.js +1 -1
  83. package/dist/esm/ptc-tab-list.entry.js +14 -10
  84. package/dist/esm/ptc-text-copy-with-background.entry.js +31 -0
  85. package/dist/esm/ptc-title.entry.js +80 -0
  86. package/dist/esm/ptc-two-column-media.entry.js +1 -1
  87. package/dist/esm/ptcw-design.js +2 -2
  88. package/dist/esm/tab-content.entry.js +1 -1
  89. package/dist/esm/tab-header.entry.js +2 -2
  90. package/dist/ptcw-design/p-09351f78.entry.js +1 -0
  91. package/dist/ptcw-design/{p-401e8ad1.entry.js → p-10385027.entry.js} +1 -1
  92. package/dist/ptcw-design/{p-7274d38e.entry.js → p-10f6d8ae.entry.js} +1 -1
  93. package/dist/ptcw-design/{p-b614e18a.entry.js → p-1a77a824.entry.js} +1 -1
  94. package/dist/ptcw-design/p-1eb22408.entry.js +1 -0
  95. package/dist/ptcw-design/{p-09abf994.entry.js → p-1ec512ea.entry.js} +1 -1
  96. package/dist/ptcw-design/{p-0507d8de.entry.js → p-39b8d25b.entry.js} +1 -1
  97. package/dist/ptcw-design/{p-a0ddea6e.entry.js → p-3a4bb2b1.entry.js} +1 -1
  98. package/dist/ptcw-design/p-3c779cf2.entry.js +1 -0
  99. package/dist/ptcw-design/{p-22a11703.js → p-4355ed7c.js} +1 -1
  100. package/dist/ptcw-design/{p-a6a938d2.entry.js → p-446423fc.entry.js} +1 -1
  101. package/dist/ptcw-design/{p-a3e99867.entry.js → p-4ab335ac.entry.js} +1 -1
  102. package/dist/ptcw-design/p-4da25d67.entry.js +1 -0
  103. package/dist/ptcw-design/{p-b1354b54.entry.js → p-53790fb4.entry.js} +1 -1
  104. package/dist/ptcw-design/{p-6956e9cf.entry.js → p-5a92fdf0.entry.js} +1 -1
  105. package/dist/ptcw-design/{p-870406ab.entry.js → p-5bf5932c.entry.js} +1 -1
  106. package/dist/ptcw-design/p-5c02f876.entry.js +1 -0
  107. package/dist/ptcw-design/{p-e3b5792a.entry.js → p-5c5c8f25.entry.js} +1 -1
  108. package/dist/ptcw-design/{p-82d428ea.entry.js → p-5e845a15.entry.js} +1 -1
  109. package/dist/ptcw-design/p-64f85e40.entry.js +1 -0
  110. package/dist/ptcw-design/p-696646db.entry.js +1 -0
  111. package/dist/ptcw-design/{p-80be8fe1.entry.js → p-6ab5aee9.entry.js} +1 -1
  112. package/dist/ptcw-design/{p-b6a9d66f.entry.js → p-70d2c46d.entry.js} +1 -1
  113. package/dist/ptcw-design/{p-735fb369.entry.js → p-74a31734.entry.js} +1 -1
  114. package/dist/ptcw-design/{p-03648d85.entry.js → p-7599491c.entry.js} +1 -1
  115. package/dist/ptcw-design/p-7a37d762.entry.js +1 -0
  116. package/dist/ptcw-design/{p-f4148769.entry.js → p-83a9720c.entry.js} +1 -1
  117. package/dist/ptcw-design/{p-77327ab7.entry.js → p-85e7bbc3.entry.js} +1 -1
  118. package/dist/ptcw-design/{p-0004abbb.entry.js → p-8c0ba2d5.entry.js} +1 -1
  119. package/dist/ptcw-design/p-8c594b35.entry.js +1 -0
  120. package/dist/ptcw-design/p-8d46a06e.entry.js +1 -0
  121. package/dist/ptcw-design/p-93ab498c.entry.js +1 -0
  122. package/dist/ptcw-design/{p-f2d7ecd0.entry.js → p-96bfb95b.entry.js} +1 -1
  123. package/dist/ptcw-design/p-a06bc9a8.entry.js +1 -0
  124. package/dist/ptcw-design/p-a6d80697.entry.js +1 -0
  125. package/dist/ptcw-design/{p-3f2c3e47.entry.js → p-b1bfc20f.entry.js} +1 -1
  126. package/dist/ptcw-design/p-baa7d351.entry.js +1 -0
  127. package/dist/ptcw-design/{p-e7e07b91.entry.js → p-bb4485e3.entry.js} +1 -1
  128. package/dist/ptcw-design/{p-30f33198.entry.js → p-bcfd05dc.entry.js} +1 -1
  129. package/dist/ptcw-design/{p-3f0d3485.entry.js → p-c05f0c98.entry.js} +1 -1
  130. package/dist/ptcw-design/{p-273ff521.entry.js → p-c267b720.entry.js} +1 -1
  131. package/dist/ptcw-design/{p-ca54a4bc.entry.js → p-c26e343e.entry.js} +1 -1
  132. package/dist/ptcw-design/{p-c9ba3915.entry.js → p-c460a62d.entry.js} +1 -1
  133. package/dist/ptcw-design/p-c992aa57.entry.js +1 -0
  134. package/dist/ptcw-design/p-d39668ca.entry.js +1 -0
  135. package/dist/ptcw-design/p-dad7e9f8.entry.js +1 -0
  136. package/dist/ptcw-design/p-e0090602.entry.js +1 -0
  137. package/dist/ptcw-design/{p-07e08a42.entry.js → p-e955c833.entry.js} +1 -1
  138. package/dist/ptcw-design/p-f5ba2d0e.entry.js +1 -0
  139. package/dist/ptcw-design/{p-33b70553.entry.js → p-f7d18b93.entry.js} +1 -1
  140. package/dist/ptcw-design/p-fce72f70.entry.js +1 -0
  141. package/dist/ptcw-design/ptcw-design.css +1 -1
  142. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  143. package/dist/types/components/ptc-para/ptc-para.d.ts +5 -0
  144. package/dist/types/components/ptc-text-copy-with-background/ptc-text-copy-with-background.d.ts +25 -0
  145. package/dist/types/components/ptc-title/ptc-title.d.ts +9 -0
  146. package/dist/types/components.d.ts +77 -0
  147. package/dist/types/utils/interfaces.d.ts +4 -1
  148. package/package.json +1 -1
  149. package/readme.md +1 -1
  150. package/dist/cjs/icon-asset_13.cjs.entry.js +0 -797
  151. package/dist/cjs/interfaces-0ecd8027.js +0 -15
  152. package/dist/cjs/ptc-date.cjs.entry.js +0 -59
  153. package/dist/cjs/ptc-img.cjs.entry.js +0 -159
  154. package/dist/cjs/ptc-picture.cjs.entry.js +0 -179
  155. package/dist/esm/icon-asset_13.entry.js +0 -781
  156. package/dist/esm/interfaces-3cb94654.js +0 -12
  157. package/dist/esm/ptc-date.entry.js +0 -55
  158. package/dist/esm/ptc-img.entry.js +0 -155
  159. package/dist/esm/ptc-picture.entry.js +0 -175
  160. package/dist/ptcw-design/p-08b4804a.entry.js +0 -1
  161. package/dist/ptcw-design/p-12b7ebad.entry.js +0 -1
  162. package/dist/ptcw-design/p-240733ce.js +0 -1
  163. package/dist/ptcw-design/p-2469a843.entry.js +0 -1
  164. package/dist/ptcw-design/p-2f0223da.entry.js +0 -1
  165. package/dist/ptcw-design/p-43e3f76e.entry.js +0 -1
  166. package/dist/ptcw-design/p-62e7565c.entry.js +0 -1
  167. package/dist/ptcw-design/p-7b601573.entry.js +0 -1
  168. package/dist/ptcw-design/p-831f5c16.entry.js +0 -1
  169. package/dist/ptcw-design/p-a2ca6ff1.entry.js +0 -1
  170. package/dist/ptcw-design/p-b30ba340.entry.js +0 -1
  171. package/dist/ptcw-design/p-b985e510.entry.js +0 -1
  172. package/dist/ptcw-design/p-ee3e5807.entry.js +0 -1
@@ -77,4 +77,496 @@ let PtcCard = class {
77
77
  };
78
78
  PtcCard.style = ptcCardCss;
79
79
 
80
+ const ptcDateCss = ":host{display:block}:host(.small) span{font-size:var(--ptc-font-size-xx-small)}:host(.medium) span{font-size:var(--ptc-font-size-x-small)}:host(.primary-grey){color:var(--color-primary-gray-new)}:host(.white) span{color:var(--color-white)}:host(.date-m-top){margin-top:var(--ptc-element-spacing-01)}";
81
+
82
+ let PtcDate = class {
83
+ constructor(hostRef) {
84
+ index.registerInstance(this, hostRef);
85
+ /**
86
+ * Year
87
+ */
88
+ this.year = 1900;
89
+ /**
90
+ * Month
91
+ * An integer between 1 (January) and 12 (December) representing the month.If omitted, defaults to 0.
92
+ */
93
+ this.month = 0;
94
+ /**
95
+ * Day
96
+ * An integer between 1 and 31 representing the day of the month. If omitted, defaults to 1.
97
+ */
98
+ this.day = 1;
99
+ /**
100
+ * Country
101
+ * examples: en-US, zh-CN, zh-TW, fr-FR, ja-JP, ru-RU, de-DE, ko-KR, it-IT, es-ES
102
+ */
103
+ this.country = 'en-US';
104
+ /**
105
+ * Date Font Size
106
+ */
107
+ this.dataSize = 'small';
108
+ }
109
+ render() {
110
+ // const newDate = new Date(this.year, this.month, this.day);
111
+ const classMap = this.getCssClassMap();
112
+ return (index.h(index.Host, { class: classMap }, this.dateStyles && index.h("style", null, this.dateStyles), index.h("span", { part: "part-ptc-date" }, this.getDate().toLocaleDateString(this.country, { year: 'numeric', month: 'short', day: 'numeric' }))));
113
+ }
114
+ getCssClassMap() {
115
+ return {
116
+ [this.dateColor]: !!this.dateColor ? true : false,
117
+ [this.dataSize]: !!this.dataSize ? true : false,
118
+ };
119
+ }
120
+ getDate() {
121
+ if (this.dateString) {
122
+ let newDate = new Date(this.dateString.replace(/-/g, '/'));
123
+ return newDate;
124
+ }
125
+ else {
126
+ return new Date(this.year, this.month - 1, this.day);
127
+ }
128
+ }
129
+ };
130
+ PtcDate.style = ptcDateCss;
131
+
132
+ let ResponsiveBgVariables = {
133
+ envs: ['xs', 'sm', 'md', 'lg'],
134
+ selector: '.ptc-img',
135
+ interval: 250
136
+ };
137
+ let ResponsivePictureVariables = {
138
+ envs: ['xs', 'sm', 'md', 'lg'],
139
+ selector: '.ptc-picture',
140
+ interval: 250
141
+ };
142
+
143
+ 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}}";
144
+
145
+ let PtcImg = class {
146
+ constructor(hostRef) {
147
+ index.registerInstance(this, hostRef);
148
+ /**
149
+ * Image size for smallest screen
150
+ * <=767px
151
+ */
152
+ this.sizeXs = '510x340';
153
+ /**
154
+ * Image size for small screen
155
+ * >=768px and <=991px
156
+ */
157
+ this.sizeSm = '1240x496';
158
+ /**
159
+ * Image size for medium screen
160
+ * >=992px and <=1199px
161
+ */
162
+ this.sizeMd = '1366x500';
163
+ /**
164
+ * Image solution for large screen
165
+ * >=1200px
166
+ */
167
+ this.sizeLg = '1920x1080';
168
+ /**
169
+ * Image type
170
+ */
171
+ this.imageType = 'smart-bg';
172
+ /**
173
+ * Image border shape
174
+ */
175
+ this.borderRadius = '';
176
+ /**
177
+ * Lazy loading option
178
+ */
179
+ this.loadMode = 'lazy-bg';
180
+ }
181
+ /**
182
+ * Image Z Index
183
+ */
184
+ // @Prop() imageZIndex: 'z-index-auto' | 'z-index-n-2' | 'z-index-n-1' | 'z-index-p-1' | 'z-index-p-2' = 'z-index-auto';
185
+ WindowResize() {
186
+ this.setResponsiveBg();
187
+ }
188
+ render() {
189
+ const classMap = this.getCssClassMap();
190
+ 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)));
191
+ }
192
+ componentDidLoad() {
193
+ this.addIntersectionObserver();
194
+ this.setResponsiveBg();
195
+ }
196
+ componentWillUpdate() {
197
+ // console.log('componentWillUpdate!');
198
+ this.addIntersectionObserver();
199
+ this.setResponsiveBg();
200
+ }
201
+ //responsive image
202
+ setResponsiveBg() {
203
+ // Define local variables
204
+ let backgrounds = (this.el || document).querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
205
+ // console.log('current breakpoint: ' + currentBreakpoint);
206
+ // Loop through all target elements
207
+ for (var i = 0, len = backgrounds.length; i < len; i++) {
208
+ // Set current variables
209
+ el = backgrounds[i];
210
+ elData = el.getAttribute('data-' + currentBreakpoint);
211
+ // If the data attribute exists, set the background
212
+ if (elData !== null) {
213
+ el.style.backgroundImage = "url('" + elData + "')";
214
+ }
215
+ else {
216
+ if (typeof console == 'object') {
217
+ console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
218
+ }
219
+ }
220
+ }
221
+ }
222
+ //lazy loading
223
+ addIntersectionObserver() {
224
+ if (!this.imgUrl) {
225
+ console.log('no image!');
226
+ return;
227
+ }
228
+ if ('IntersectionObserver' in window) {
229
+ let lazyLoadBgs = (this.el || document).querySelectorAll('.lazy-bg');
230
+ let bgObserver = new IntersectionObserver(entries => {
231
+ entries.forEach(entry => {
232
+ if (entry.isIntersecting) {
233
+ const image = entry.target;
234
+ image.classList.remove('lazy-bg');
235
+ // console.log('loaded');
236
+ bgObserver.unobserve(image);
237
+ }
238
+ });
239
+ });
240
+ lazyLoadBgs.forEach(image => {
241
+ bgObserver.observe(image);
242
+ });
243
+ }
244
+ }
245
+ getCssClassMap() {
246
+ return {
247
+ [this.imageType]: true,
248
+ 'ptc-img': true,
249
+ [this.borderRadius]: true,
250
+ [this.loadMode]: true,
251
+ // [this.imageZIndex] : true
252
+ };
253
+ }
254
+ getCurrentBreakPoints() {
255
+ // Define local variables
256
+ let doc = window.document, temp = doc.createElement('div'), env;
257
+ // Append test node
258
+ doc.body.appendChild(temp);
259
+ // Loop through breakpoints
260
+ for (let i = ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
261
+ env = ResponsiveBgVariables.envs[i];
262
+ // Add classes
263
+ temp.className = 'hidden-' + env;
264
+ // Found breakpoint
265
+ if (temp.offsetParent === null) {
266
+ // Remove our test node
267
+ doc.body.removeChild(temp);
268
+ // Return current breakpoint
269
+ return env;
270
+ }
271
+ }
272
+ // Breakpoint not found, try fallback
273
+ doc.body.removeChild(temp);
274
+ return this.getFallbackBreakpoint();
275
+ }
276
+ getFallbackBreakpoint() {
277
+ if (window.matchMedia('(min-width: 992px)').matches) {
278
+ return 'lg';
279
+ }
280
+ else if (window.matchMedia('(min-width: 768px)').matches) {
281
+ return 'md';
282
+ }
283
+ else if (window.matchMedia('(min-width: 576px)').matches) {
284
+ return 'sm';
285
+ }
286
+ else {
287
+ return 'xs';
288
+ }
289
+ }
290
+ get el() { return index.getElement(this); }
291
+ };
292
+ PtcImg.style = ptcImgCss;
293
+
294
+ 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)}p.ellipsis-boxing{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}";
295
+
296
+ let PtcPara = class {
297
+ constructor(hostRef) {
298
+ index.registerInstance(this, hostRef);
299
+ /**
300
+ * Paragraph font size
301
+ **/
302
+ this.fontSize = "x-small";
303
+ /**
304
+ * Paragraph font weight
305
+ **/
306
+ this.fontWeight = 'w-4';
307
+ /**
308
+ * Paragraph Style
309
+ **/
310
+ this.paraStyle = 'default';
311
+ /**
312
+ * Paragraph Color
313
+ */
314
+ this.paraColor = 'primary-grey';
315
+ /**
316
+ * line height
317
+ */
318
+ this.paraLineH = 'line-height-normal';
319
+ }
320
+ render() {
321
+ const classMap = this.getCssClassMap();
322
+ const colorClass = this.addWhiteClass();
323
+ const cutOff = this.getLineCuttoff();
324
+ return (index.h(index.Host, { class: colorClass }, index.h("p", { class: classMap, part: "part-para", style: cutOff }, index.h("slot", null))));
325
+ }
326
+ getCssClassMap() {
327
+ return {
328
+ [this.fontSize]: true,
329
+ [this.fontWeight]: true,
330
+ [this.paraStyle]: true,
331
+ [this.paraMargin]: !!this.paraMargin ? true : false,
332
+ [this.paraColor]: true,
333
+ [this.paraLineH]: true,
334
+ ['ellipsis-boxing']: this.ellipsisLineCutoff && this.ellipsisLineCutoff > 0
335
+ };
336
+ }
337
+ //WEB-2392
338
+ addWhiteClass() {
339
+ if (this.paraColor == "white") {
340
+ return {
341
+ [this.paraColor]: true,
342
+ };
343
+ }
344
+ }
345
+ getLineCuttoff() {
346
+ let result;
347
+ if (this.ellipsisLineCutoff && this.ellipsisLineCutoff > 0) {
348
+ result = {
349
+ ['-webkit-line-clamp']: `${this.ellipsisLineCutoff}`
350
+ };
351
+ }
352
+ return result;
353
+ }
354
+ };
355
+ PtcPara.style = ptcParaCss;
356
+
357
+ const ptcPictureCss = ":host{display:block;overflow:hidden}:host img{display:block}:host(.relative){position:relative}:host(.static){position:static}:host(.absoltue){position:absolute}img{max-width:100%}.cover{object-fit:cover}.fill{object-fit:fill}.contain{object-fit:contain}.scale-down{object-fit:scale-down}.none{object-fit:none}.initial{object-fit:initial}.inherit{object-fit:inherit}.radius-standard{border-radius:var(--ptc-border-radius-standard)}.radius-large{border-radius:var(--ptc-border-radius-large)}.is-full-height{height:100%}.is-full-width{width:100%}:host(.left){text-align:left}:host(.right){text-align:right}:host(.center){text-align:center}";
358
+
359
+ let PtcPicture = class {
360
+ constructor(hostRef) {
361
+ index.registerInstance(this, hostRef);
362
+ /**
363
+ * Image alt
364
+ */
365
+ this.alt = "image";
366
+ /**
367
+ * Image size for smallest screen
368
+ * <=767px
369
+ */
370
+ this.sizeXs = '510x340';
371
+ /**
372
+ * Image size for small screen
373
+ * >=768px and <=991px
374
+ */
375
+ this.sizeSm = '1240x496';
376
+ /**
377
+ * Image size for medium screen
378
+ * >=992px and <=1199px
379
+ */
380
+ this.sizeMd = '1366x500';
381
+ /**
382
+ * Image solution for large screen
383
+ * >=1200px
384
+ */
385
+ this.sizeLg = '1920x1080';
386
+ /**
387
+ * Image Position
388
+ */
389
+ this.imagePosition = 'static';
390
+ /**
391
+ * Object Fit
392
+ * Default: cover
393
+ */
394
+ this.objectFit = 'cover';
395
+ /**
396
+ * Stretch height to 100%?
397
+ */
398
+ this.isFullHeight = false;
399
+ /**
400
+ * Stretch width to 100%?
401
+ */
402
+ this.isFullWidth = false;
403
+ /**
404
+ * (optional) Image alignment
405
+ **/
406
+ this.imageAlignment = 'left';
407
+ }
408
+ WindowResize() {
409
+ this.addIntersectionObserver();
410
+ }
411
+ componentDidLoad() {
412
+ this.addIntersectionObserver();
413
+ }
414
+ componentWillUpdate() {
415
+ if (this.src !== this.oldSrc) {
416
+ this.addIntersectionObserver();
417
+ }
418
+ this.oldSrc = this.src;
419
+ }
420
+ //lazy-loading
421
+ addIntersectionObserver() {
422
+ if (!this.src) {
423
+ return;
424
+ }
425
+ if ('IntersectionObserver' in window) {
426
+ let lazyLoadImages = new IntersectionObserver(entries => {
427
+ entries.forEach(entry => {
428
+ if (entry.isIntersecting) {
429
+ const image = this.el.shadowRoot.querySelector('img');
430
+ image.src = this.setResponsiveBg();
431
+ console.log('loaded');
432
+ lazyLoadImages.unobserve(image);
433
+ }
434
+ });
435
+ });
436
+ lazyLoadImages.observe(this.el.shadowRoot.querySelector('img'));
437
+ }
438
+ else {
439
+ // fall back to setTimeout for Safari and IE
440
+ setTimeout(() => {
441
+ const image = this.el.shadowRoot.querySelector('img');
442
+ image.src = this.setResponsiveBg();
443
+ image.onload = () => {
444
+ image.removeAttribute('data-src');
445
+ console.log('loaded fallback');
446
+ };
447
+ }, 5000);
448
+ }
449
+ }
450
+ //responsive image
451
+ setResponsiveBg() {
452
+ // Define local variables
453
+ let backgrounds = (this.el.shadowRoot || document).querySelectorAll('img'), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
454
+ for (var i = 0, len = backgrounds.length; i < len; i++) {
455
+ // Set current variables
456
+ el = backgrounds[i];
457
+ elData = el.getAttribute('data-' + currentBreakpoint);
458
+ if (elData !== null) {
459
+ // console.log('img src= ' + elData);
460
+ return elData;
461
+ }
462
+ else {
463
+ if (typeof console == 'object') {
464
+ console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
465
+ }
466
+ }
467
+ }
468
+ }
469
+ render() {
470
+ const classMap = this.getCssClassMap();
471
+ const classMapHost = this.getCssClassMapHost();
472
+ return (index.h(index.Host, { class: classMapHost }, this.styles && index.h("style", null, this.styles), index.h("img", Object.assign({ class: classMap, "data-xs": !!this.sizeXs ? `${this.src}:${this.sizeXs}` : `${this.src}`, "data-sm": !!this.sizeSm ? `${this.src}:${this.sizeSm}` : `${this.src}`, "data-md": !!this.sizeMd ? `${this.src}:${this.sizeMd}` : `${this.src}`, "data-lg": !!this.sizeLg ? `${this.src}:${this.sizeLg}` : `${this.src}` }, (!!this.width ? { width: this.width } : {}), (!!this.height ? { height: this.height } : {}), { alt: this.alt, style: Object.assign({}, (!!this.maxWidth ? { maxWidth: this.maxWidth + 'px' } : {})) })), index.h("slot", null)));
473
+ }
474
+ getCurrentBreakPoints() {
475
+ // Define local variables
476
+ let doc = window.document, temp = doc.createElement('div'), env;
477
+ // Append test node
478
+ doc.body.appendChild(temp);
479
+ // Loop through breakpoints
480
+ for (let i = ResponsivePictureVariables.envs.length - 1; i >= 0; i--) {
481
+ env = ResponsivePictureVariables.envs[i];
482
+ // Add classes
483
+ temp.className = 'hidden-' + env;
484
+ // Found breakpoint
485
+ if (temp.offsetParent === null) {
486
+ // Remove our test node
487
+ doc.body.removeChild(temp);
488
+ // Return current breakpoint
489
+ return env;
490
+ }
491
+ }
492
+ // Breakpoint not found, try fallback
493
+ doc.body.removeChild(temp);
494
+ return this.getFallbackBreakpoint();
495
+ }
496
+ getFallbackBreakpoint() {
497
+ if (window.matchMedia('(min-width: 992px)').matches) {
498
+ return 'lg';
499
+ }
500
+ else if (window.matchMedia('(min-width: 768px)').matches) {
501
+ return 'md';
502
+ }
503
+ else if (window.matchMedia('(min-width: 576px)').matches) {
504
+ return 'sm';
505
+ }
506
+ else {
507
+ return 'xs';
508
+ }
509
+ }
510
+ getCssClassMap() {
511
+ return {
512
+ [this.borderRadius]: this.borderRadius ? true : false,
513
+ [this.objectFit]: true,
514
+ [this.isFullHeight ? 'is-full-height' : 'is-normal-height']: true,
515
+ [this.isFullWidth ? 'is-full-width' : 'is-normal-width']: true
516
+ };
517
+ }
518
+ getCssClassMapHost() {
519
+ return {
520
+ [this.imagePosition]: true,
521
+ [this.imageAlignment]: true
522
+ };
523
+ }
524
+ get el() { return index.getElement(this); }
525
+ };
526
+ PtcPicture.style = ptcPictureCss;
527
+
528
+ const ptcSpacerCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.ptc-spacer-horizontal){display:inline-block;height:100% !important}:host(.ptc-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.ptc-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.ptc-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.small){width:12px;min-width:12px}}:host(.ptc-spacer-horizontal.medium){height:100%}:host(.ptc-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.large){width:20px;min-width:20px}}:host(.ptc-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.ptc-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.ptc-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.ptc-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.ptc-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.ptc-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.ptc-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.ptc-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.ptc-spacer-vertical.small){height:12px;min-height:12px}}:host(.ptc-spacer-vertical.medium){width:100%}:host(.ptc-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.ptc-spacer-vertical.large){height:20px;min-height:20px}}:host(.ptc-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.ptc-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.ptc-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.ptc-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.ptc-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.ptc-spacer-vertical.space-144){width:100%;height:144px;min-height:144px}:host(.ptc-spacer-vertical.space-120){width:100%;height:120px;min-height:120px}:host(.ptc-spacer-vertical.space-128){width:100%;height:128px;min-height:128px}:host(.ptc-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.ptc-spacer-xx-small){display:block}}:host(.ptc-spacer-x-small){display:none}@media (max-width: 35.9375em){:host(.ptc-spacer-x-small){display:block}}:host(.ptc-spacer-small){display:none}@media (min-width: 36em){:host(.ptc-spacer-small){display:block}}:host(.ptc-spacer-medium){display:none}@media (min-width: 48em){:host(.ptc-spacer-medium){display:block}}:host(.ptc-spacer-large){display:none}@media (min-width: 62em){:host(.ptc-spacer-large){display:block}}:host(.ptc-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.ptc-spacer-x-large){display:block}}:host(.ptc-spacer-xx-large){display:none}@media (min-width: 76.25em){:host(.ptc-spacer-xx-large){display:block}}";
529
+
530
+ let PtcSpacer = class {
531
+ constructor(hostRef) {
532
+ index.registerInstance(this, hostRef);
533
+ /**
534
+ * Breakpoint
535
+ */
536
+ this.breakpoint = '';
537
+ /**
538
+ * Spacing Size
539
+ */
540
+ this.size = 'medium';
541
+ /**
542
+ * Direction
543
+ */
544
+ this.direction = 'vertical';
545
+ }
546
+ render() {
547
+ const classMap = this.getCssClassMap();
548
+ return (index.h(index.Host, { class: classMap }));
549
+ }
550
+ getCssClassMap() {
551
+ return {
552
+ [this.size]: true,
553
+ ['ptc-spacer-horizontal']: this.direction === 'horizontal',
554
+ ['ptc-spacer-vertical']: this.direction === 'vertical',
555
+ ['ptc-spacer-xx-small']: this.breakpoint === 'xx-small',
556
+ ['ptc-spacer-x-small']: this.breakpoint === 'x-small',
557
+ ['ptc-spacer-small']: this.breakpoint === 'small',
558
+ ['ptc-spacer-medium']: this.breakpoint === 'medium',
559
+ ['ptc-spacer-large']: this.breakpoint === 'large',
560
+ ['ptc-spacer-x-large']: this.breakpoint === 'x-large',
561
+ ['ptc-spacer-xx-large']: this.breakpoint === 'xx-large',
562
+ };
563
+ }
564
+ };
565
+ PtcSpacer.style = ptcSpacerCss;
566
+
80
567
  exports.ptc_card = PtcCard;
568
+ exports.ptc_date = PtcDate;
569
+ exports.ptc_img = PtcImg;
570
+ exports.ptc_para = PtcPara;
571
+ exports.ptc_picture = PtcPicture;
572
+ exports.ptc_spacer = PtcSpacer;
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-b3fabe79.js');
6
+
7
+ 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:4px}: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}";
8
+
9
+ let PtcCheckbox = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.checkedChanged = index.createEvent(this, "checkedChanged", 7);
13
+ this.checked = 'unchecked';
14
+ this.handleClick = (e) => {
15
+ let input = this.host.shadowRoot.querySelector('input');
16
+ if (this.checked == 'unchecked') {
17
+ this.checked = 'checked';
18
+ }
19
+ else {
20
+ this.checked = 'unchecked';
21
+ }
22
+ let parameter = {
23
+ event: e,
24
+ sender: input,
25
+ value: this.value,
26
+ checked: this.checked
27
+ };
28
+ this.checkedChanged.emit(parameter);
29
+ };
30
+ }
31
+ componentDidLoad() {
32
+ let input = this.host.shadowRoot.querySelector('input');
33
+ input.checked = this.checked == 'checked';
34
+ }
35
+ render() {
36
+ 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" }))))));
37
+ }
38
+ get host() { return index.getElement(this); }
39
+ };
40
+ PtcCheckbox.style = ptcCheckboxCss;
41
+
42
+ exports.ptc_checkbox = PtcCheckbox;
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-b3fabe79.js');
6
+
7
+ 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)}";
8
+
9
+ let PtcContainer = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * Theme
14
+ */
15
+ this.backgroundColor = 'white';
16
+ this.elevation = 'small';
17
+ this.containerType = 'normal';
18
+ this.spacing = 'xxx-large';
19
+ }
20
+ render() {
21
+ const classMap = this.getCssClassMap();
22
+ return (index.h(index.Host, { class: this.getContainerClass() }, index.h("div", { class: classMap }, index.h("slot", null))));
23
+ }
24
+ getContainerClass() {
25
+ switch (this.containerType) {
26
+ case 'large':
27
+ return 'ptc-container-lg';
28
+ case 'none':
29
+ return undefined;
30
+ default:
31
+ return 'ptc-container';
32
+ }
33
+ }
34
+ getCssClassMap() {
35
+ const spacing = `spacing-${this.spacing}`;
36
+ return {
37
+ ['content-wrapper']: true,
38
+ [this.backgroundColor]: true,
39
+ [this.elevation]: true,
40
+ [spacing]: true
41
+ };
42
+ }
43
+ };
44
+ PtcContainer.style = ptcContainerCss;
45
+
46
+ exports.ptc_container = PtcContainer;
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-b3fabe79.js');
6
+
7
+ const ptcDropdownCss = "@charset \"UTF-8\";:host{position:relative}:host .dropdown__header{cursor:pointer;transition:background-color ease-out 250ms, border-color ease-out 250ms;background-color:var(--color-white);display:flex;align-items:center;align-content:center;border:1px solid var(--color-gray-05);padding:0.25rem 0.75rem 0.25rem 0.75rem;border-radius:4px;font-family:Raleway;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0em;text-align:left}:host .dropdown__header b{font-weight:600}:host .dropdown__header icon-asset{width:1rem;height:1rem;margin-left:0.5rem}:host .dropdown__header:hover{background-color:var(--color-gray-02)}:host .dropdown__list{display:table;border:1px solid rgba(0, 0, 0, 0.24);border-radius:8px}:host ul{display:block;top:0.2rem;right:0.2rem;margin:0;list-style-type:none;padding-inline-start:0;padding:0.25rem 0.25rem;background-color:var(--color-gray-02);cursor:pointer;position:absolute;z-index:500}:host ul li{white-space:nowrap;padding:3px 1rem;font-weight:500}:host ul li.selected:before{content:\"✓\";display:block;position:absolute;left:0.4rem}:host ul li:hover{color:#fff;background-color:#699af8;border-radius:4px}.ptc-dropdown{position:relative}";
8
+
9
+ let PtcDropdown = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.clickedItem = index.createEvent(this, "clickedItem", 7);
13
+ /**
14
+ * Theme
15
+ */
16
+ this.theme = 'sort';
17
+ this.toggle = false;
18
+ this.handleClick = (item) => {
19
+ this.listItems.forEach((item) => item.selected = undefined);
20
+ item.selected = true;
21
+ this.selectedItem = item;
22
+ this.toggle = !this.toggle;
23
+ this.clickedItem.emit(item);
24
+ };
25
+ this.toggleList = () => {
26
+ this.toggle = !this.toggle;
27
+ };
28
+ }
29
+ offClick(e) {
30
+ if (e && !this.host.contains(e.target) && this.toggle) {
31
+ this.toggle = false;
32
+ }
33
+ }
34
+ componentWillLoad() {
35
+ let items = this.host.querySelectorAll('item');
36
+ if (!this.listItems) {
37
+ this.listItems = [];
38
+ }
39
+ items.forEach(item => {
40
+ if (item && item.getAttribute('label')) {
41
+ let listItem = {
42
+ element: item,
43
+ label: item.getAttribute('label'),
44
+ value: item.getAttribute('value'),
45
+ selected: item.hasAttribute('selected')
46
+ };
47
+ this.listItems.push(listItem);
48
+ if (item.hasAttribute('selected')) {
49
+ this.selectedItem = listItem;
50
+ }
51
+ }
52
+ });
53
+ }
54
+ render() {
55
+ const classMap = this.getCssClassMap();
56
+ 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 &&
57
+ index.h("ul", { tabIndex: -1, class: "dropdown__list", onBlur: () => { this.toggle = false; } }, this.listItems.map((item) => {
58
+ let cssClass = "dropdown__item";
59
+ if (item.selected) {
60
+ cssClass += " selected";
61
+ }
62
+ return (index.h("li", { class: cssClass, onClick: () => this.handleClick(item) }, item.label));
63
+ }))));
64
+ }
65
+ getCssClassMap() {
66
+ return {
67
+ ['ptc-dropdown']: true,
68
+ [this.theme]: true
69
+ };
70
+ }
71
+ get host() { return index.getElement(this); }
72
+ };
73
+ PtcDropdown.style = ptcDropdownCss;
74
+
75
+ exports.ptc_dropdown = PtcDropdown;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b3fabe79.js');
6
6
 
7
- 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}";
7
+ const ptcEllipsisDropdownCss = ".ellipsis-icon{border:1px solid #6E717C;border-radius:2px;vertical-align:middle;height:18px;width:18px;text-align:center;display:flex;align-items:center;justify-content:center;transition:background-color var(--ptc-ease-out) var(--ptc-transition-medium), border-color var(--ptc-ease-out) var(--ptc-transition-medium)}.ellipsis-icon:hover{background-color:var(--color-gray-04);border-color:var(--color-gray-04)}.ellipsis-icon icon-asset{display:inline-block}.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;padding:7px;cursor:pointer}.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:var(--color-white);padding:0.8rem 0;right:0;left:auto;min-width:max-content;width:100%}.show .dropdown-container{display:inline-block}";
8
8
 
9
9
  let PtcEllipsisDropdown = class {
10
10
  constructor(hostRef) {