@ptcwebops/ptcw-design 0.7.6 → 0.7.7

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 (283) hide show
  1. package/dist/cjs/dropdown-item.cjs.entry.js +2 -2
  2. package/dist/cjs/icon-asset.cjs.entry.js +9 -21
  3. package/dist/cjs/{index-b3fabe79.js → index-8745a0a3.js} +486 -255
  4. package/dist/cjs/list-item.cjs.entry.js +2 -2
  5. package/dist/cjs/loader.cjs.js +3 -3
  6. package/dist/cjs/lottie-player.cjs.entry.js +2 -2
  7. package/dist/cjs/my-component.cjs.entry.js +5 -2
  8. package/dist/cjs/ptc-accordion-item.cjs.entry.js +2 -16
  9. package/dist/cjs/ptc-accordion.cjs.entry.js +2 -5
  10. package/dist/cjs/ptc-announcement.cjs.entry.js +11 -22
  11. package/dist/cjs/ptc-breadcrumb.cjs.entry.js +2 -2
  12. package/dist/cjs/ptc-button.cjs.entry.js +3 -34
  13. package/dist/cjs/ptc-card-bottom.cjs.entry.js +4 -2
  14. package/dist/cjs/ptc-card-content.cjs.entry.js +4 -2
  15. package/dist/cjs/ptc-card-plm.cjs.entry.js +5 -2
  16. package/dist/cjs/ptc-card_6.cjs.entry.js +27 -135
  17. package/dist/cjs/ptc-checkbox.cjs.entry.js +5 -3
  18. package/dist/cjs/ptc-collapse-list.cjs.entry.js +13 -2
  19. package/dist/cjs/ptc-container.cjs.entry.js +2 -5
  20. package/dist/cjs/ptc-dropdown.cjs.entry.js +7 -7
  21. package/dist/cjs/ptc-dynamic-card.cjs.entry.js +32 -25
  22. package/dist/cjs/ptc-ellipsis-dropdown.cjs.entry.js +3 -2
  23. package/dist/cjs/ptc-filter-tag.cjs.entry.js +4 -3
  24. package/dist/cjs/ptc-hero-footer-cta.cjs.entry.js +5 -2
  25. package/dist/cjs/ptc-hero.cjs.entry.js +3 -5
  26. package/dist/cjs/ptc-icon-list.cjs.entry.js +2 -14
  27. package/dist/cjs/ptc-icon-minimize.cjs.entry.js +3 -2
  28. package/dist/cjs/ptc-link.cjs.entry.js +4 -20
  29. package/dist/cjs/ptc-list.cjs.entry.js +2 -2
  30. package/dist/cjs/ptc-lottie.cjs.entry.js +3 -5
  31. package/dist/cjs/ptc-minimized-footer.cjs.entry.js +2 -2
  32. package/dist/cjs/ptc-minimized-header.cjs.entry.js +2 -2
  33. package/dist/cjs/ptc-mobile-select.cjs.entry.js +5 -20
  34. package/dist/cjs/ptc-modal.cjs.entry.js +5 -23
  35. package/dist/cjs/ptc-overlay.cjs.entry.js +5 -5
  36. package/dist/cjs/ptc-pagenation.cjs.entry.js +13 -12
  37. package/dist/cjs/ptc-previous-url.cjs.entry.js +4 -2
  38. package/dist/cjs/ptc-pricing-block.cjs.entry.js +3 -2
  39. package/dist/cjs/ptc-quote.cjs.entry.js +6 -8
  40. package/dist/cjs/ptc-readmore_2.cjs.entry.js +4 -37
  41. package/dist/cjs/ptc-responsive-wrapper.cjs.entry.js +2 -2
  42. package/dist/cjs/ptc-shopping-cart.cjs.entry.js +3 -2
  43. package/dist/cjs/ptc-social-share.cjs.entry.js +5 -12
  44. package/dist/cjs/ptc-span.cjs.entry.js +3 -8
  45. package/dist/cjs/ptc-svg-btn.cjs.entry.js +3 -5
  46. package/dist/cjs/ptc-tab-list.cjs.entry.js +3 -2
  47. package/dist/cjs/ptc-text-copy-with-background.cjs.entry.js +5 -9
  48. package/dist/cjs/ptc-title.cjs.entry.js +9 -17
  49. package/dist/cjs/ptc-two-column-media.cjs.entry.js +3 -2
  50. package/dist/cjs/ptcw-design.cjs.js +3 -3
  51. package/dist/cjs/tab-content.cjs.entry.js +3 -2
  52. package/dist/cjs/tab-header.cjs.entry.js +3 -2
  53. package/dist/collection/collection-manifest.json +2 -4
  54. package/dist/collection/components/dropdown-item/dropdown-item.js +51 -46
  55. package/dist/collection/components/icon-asset/icon-asset.js +167 -185
  56. package/dist/collection/components/list-item/list-item.js +85 -81
  57. package/dist/collection/components/my-component/my-component.js +70 -61
  58. package/dist/collection/components/ptc-accordion/ptc-accordion-item/ptc-accordion-item.js +199 -208
  59. package/dist/collection/components/ptc-accordion/ptc-accordion.js +43 -39
  60. package/dist/collection/components/ptc-announcement/ptc-announcement.js +199 -209
  61. package/dist/collection/components/ptc-breadcrumb/ptc-breadcrumb.js +12 -11
  62. package/dist/collection/components/ptc-button/ptc-button.js +221 -250
  63. package/dist/collection/components/ptc-card/ptc-card.css +167 -6
  64. package/dist/collection/components/ptc-card/ptc-card.js +261 -291
  65. package/dist/collection/components/ptc-card-bottom/ptc-card-bottom.js +85 -76
  66. package/dist/collection/components/ptc-card-content/ptc-card-content.js +85 -76
  67. package/dist/collection/components/ptc-card-plm/ptc-card-plm.js +85 -78
  68. package/dist/collection/components/ptc-checkbox/ptc-checkbox.js +86 -82
  69. package/dist/collection/components/ptc-collapse-list/ptc-collapse-list.js +238 -225
  70. package/dist/collection/components/ptc-container/ptc-container.js +85 -84
  71. package/dist/collection/components/ptc-date/ptc-date.js +160 -171
  72. package/dist/collection/components/ptc-dropdown/ptc-dropdown.js +108 -103
  73. package/dist/collection/components/ptc-dynamic-card/media/nav-active-dotslick.svg +16 -0
  74. package/dist/collection/components/ptc-dynamic-card/ptc-dynamic-card.css +4 -0
  75. package/dist/collection/components/ptc-dynamic-card/ptc-dynamic-card.js +158 -131
  76. package/dist/collection/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.js +89 -82
  77. package/dist/collection/components/ptc-filter-tag/ptc-filter-tag.js +58 -50
  78. package/dist/collection/components/ptc-hero/ptc-hero.js +51 -51
  79. package/dist/collection/components/ptc-hero-footer-cta/ptc-hero-footer-cta.js +70 -69
  80. package/dist/collection/components/ptc-icon-list/ptc-icon-list.js +102 -121
  81. package/dist/collection/components/ptc-icon-minimize/ptc-icon-minimize.js +51 -50
  82. package/dist/collection/components/ptc-img/ptc-img.js +162 -179
  83. package/dist/collection/components/ptc-link/ptc-link.js +160 -174
  84. package/dist/collection/components/ptc-list/ptc-list.js +51 -46
  85. package/dist/collection/components/ptc-lottie/ptc-lottie.js +50 -46
  86. package/dist/collection/components/ptc-minimized-footer/ptc-minimized-footer.js +12 -11
  87. package/dist/collection/components/ptc-minimized-header/ptc-minimized-header.js +68 -67
  88. package/dist/collection/components/ptc-mobile-select/ptc-mobile-select.js +156 -168
  89. package/dist/collection/components/ptc-modal/ptc-modal.js +206 -224
  90. package/dist/collection/components/ptc-overlay/ptc-overlay.js +84 -78
  91. package/dist/collection/components/ptc-pagenation/ptc-pagenation.js +221 -216
  92. package/dist/collection/components/ptc-para/ptc-para.js +136 -145
  93. package/dist/collection/components/ptc-picture/ptc-picture.js +319 -340
  94. package/dist/collection/components/ptc-previous-url/ptc-previous-url.js +53 -47
  95. package/dist/collection/components/ptc-pricing-block/ptc-pricing-block.js +36 -32
  96. package/dist/collection/components/ptc-quote/ptc-quote.js +120 -130
  97. package/dist/collection/components/ptc-readmore/ptc-readmore.js +97 -107
  98. package/dist/collection/components/ptc-responsive-wrapper/ptc-responsive-wrapper.js +12 -9
  99. package/dist/collection/components/ptc-shopping-cart/ptc-shopping-cart.js +51 -45
  100. package/dist/collection/components/ptc-social-share/ptc-social-share.js +141 -146
  101. package/dist/collection/components/ptc-spacer/ptc-spacer.js +67 -70
  102. package/dist/collection/components/ptc-span/ptc-span.js +68 -70
  103. package/dist/collection/components/ptc-svg-btn/ptc-svg-btn.js +52 -51
  104. package/dist/collection/components/ptc-tab-list/ptc-tab-list.js +35 -30
  105. package/dist/collection/components/ptc-text-copy-with-background/ptc-text-copy-with-background.js +103 -109
  106. package/dist/collection/components/ptc-title/ptc-title.js +221 -227
  107. package/dist/collection/components/ptc-tooltip/ptc-tooltip.js +119 -136
  108. package/dist/collection/components/ptc-two-column-media/ptc-two-column-media.js +36 -28
  109. package/dist/collection/components/tab-content/tab-content.js +57 -47
  110. package/dist/collection/components/tab-header/tab-header.js +74 -62
  111. package/dist/custom-elements/index.d.ts +0 -12
  112. package/dist/custom-elements/index.js +212 -582
  113. package/dist/esm/dropdown-item.entry.js +2 -2
  114. package/dist/esm/icon-asset.entry.js +9 -21
  115. package/dist/esm/{index-5ff11327.js → index-0c73b51e.js} +486 -255
  116. package/dist/esm/list-item.entry.js +2 -2
  117. package/dist/esm/loader.js +3 -3
  118. package/dist/esm/lottie-player.entry.js +2 -2
  119. package/dist/esm/my-component.entry.js +5 -2
  120. package/dist/esm/polyfills/css-shim.js +1 -1
  121. package/dist/esm/ptc-accordion-item.entry.js +2 -16
  122. package/dist/esm/ptc-accordion.entry.js +2 -5
  123. package/dist/esm/ptc-announcement.entry.js +11 -22
  124. package/dist/esm/ptc-breadcrumb.entry.js +2 -2
  125. package/dist/esm/ptc-button.entry.js +3 -34
  126. package/dist/esm/ptc-card-bottom.entry.js +4 -2
  127. package/dist/esm/ptc-card-content.entry.js +4 -2
  128. package/dist/esm/ptc-card-plm.entry.js +5 -2
  129. package/dist/esm/ptc-card_6.entry.js +27 -135
  130. package/dist/esm/ptc-checkbox.entry.js +5 -3
  131. package/dist/esm/ptc-collapse-list.entry.js +13 -2
  132. package/dist/esm/ptc-container.entry.js +2 -5
  133. package/dist/esm/ptc-dropdown.entry.js +7 -7
  134. package/dist/esm/ptc-dynamic-card.entry.js +32 -25
  135. package/dist/esm/ptc-ellipsis-dropdown.entry.js +3 -2
  136. package/dist/esm/ptc-filter-tag.entry.js +4 -3
  137. package/dist/esm/ptc-hero-footer-cta.entry.js +5 -2
  138. package/dist/esm/ptc-hero.entry.js +3 -5
  139. package/dist/esm/ptc-icon-list.entry.js +2 -14
  140. package/dist/esm/ptc-icon-minimize.entry.js +3 -2
  141. package/dist/esm/ptc-link.entry.js +4 -20
  142. package/dist/esm/ptc-list.entry.js +2 -2
  143. package/dist/esm/ptc-lottie.entry.js +3 -5
  144. package/dist/esm/ptc-minimized-footer.entry.js +2 -2
  145. package/dist/esm/ptc-minimized-header.entry.js +2 -2
  146. package/dist/esm/ptc-mobile-select.entry.js +5 -20
  147. package/dist/esm/ptc-modal.entry.js +5 -23
  148. package/dist/esm/ptc-overlay.entry.js +5 -5
  149. package/dist/esm/ptc-pagenation.entry.js +13 -12
  150. package/dist/esm/ptc-previous-url.entry.js +4 -2
  151. package/dist/esm/ptc-pricing-block.entry.js +3 -2
  152. package/dist/esm/ptc-quote.entry.js +6 -8
  153. package/dist/esm/ptc-readmore_2.entry.js +4 -37
  154. package/dist/esm/ptc-responsive-wrapper.entry.js +2 -2
  155. package/dist/esm/ptc-shopping-cart.entry.js +3 -2
  156. package/dist/esm/ptc-social-share.entry.js +5 -12
  157. package/dist/esm/ptc-span.entry.js +3 -8
  158. package/dist/esm/ptc-svg-btn.entry.js +3 -5
  159. package/dist/esm/ptc-tab-list.entry.js +3 -2
  160. package/dist/esm/ptc-text-copy-with-background.entry.js +5 -9
  161. package/dist/esm/ptc-title.entry.js +9 -17
  162. package/dist/esm/ptc-two-column-media.entry.js +3 -2
  163. package/dist/esm/ptcw-design.js +3 -3
  164. package/dist/esm/tab-content.entry.js +3 -2
  165. package/dist/esm/tab-header.entry.js +3 -2
  166. package/dist/ptcw-design/media/nav-active-dotslick.svg +16 -0
  167. package/dist/ptcw-design/p-009001dc.js +2 -0
  168. package/dist/ptcw-design/p-00c1343b.entry.js +1 -0
  169. package/dist/ptcw-design/p-188d69d9.entry.js +1 -0
  170. package/dist/ptcw-design/p-1964f1f4.entry.js +1 -0
  171. package/dist/ptcw-design/p-1cd396ab.entry.js +1 -0
  172. package/dist/ptcw-design/p-1e80c01f.entry.js +1 -0
  173. package/dist/ptcw-design/p-21e27f2b.entry.js +1 -0
  174. package/dist/ptcw-design/p-24321c52.entry.js +1 -0
  175. package/dist/ptcw-design/p-2b6244ad.entry.js +1 -0
  176. package/dist/ptcw-design/{p-7599491c.entry.js → p-2dcea9db.entry.js} +1 -1
  177. package/dist/ptcw-design/p-36a453d4.entry.js +1 -0
  178. package/dist/ptcw-design/p-3db835e4.entry.js +1 -0
  179. package/dist/ptcw-design/p-3f85b469.entry.js +1 -0
  180. package/dist/ptcw-design/p-482a8bc9.entry.js +1 -0
  181. package/dist/ptcw-design/p-4de70656.entry.js +1 -0
  182. package/dist/ptcw-design/p-5105d9e5.entry.js +1 -0
  183. package/dist/ptcw-design/p-58e06eee.entry.js +1 -0
  184. package/dist/ptcw-design/p-5bb7354a.entry.js +1 -0
  185. package/dist/ptcw-design/p-5d585b54.entry.js +1 -0
  186. package/dist/ptcw-design/p-5dbf98a9.entry.js +1 -0
  187. package/dist/ptcw-design/p-60843852.entry.js +1 -0
  188. package/dist/ptcw-design/p-6131b9a1.entry.js +1 -0
  189. package/dist/ptcw-design/p-6b1fdce6.entry.js +1 -0
  190. package/dist/ptcw-design/p-6d713986.entry.js +1 -0
  191. package/dist/ptcw-design/p-8637cefc.entry.js +1 -0
  192. package/dist/ptcw-design/p-8808ecc8.entry.js +1 -0
  193. package/dist/ptcw-design/p-8b197833.entry.js +1 -0
  194. package/dist/ptcw-design/p-8b5b5614.entry.js +1 -0
  195. package/dist/ptcw-design/p-8bb41e7c.entry.js +1 -0
  196. package/dist/ptcw-design/p-9311ee3f.entry.js +1 -0
  197. package/dist/ptcw-design/p-97e00dfa.entry.js +1 -0
  198. package/dist/ptcw-design/p-a05fe3d0.entry.js +1 -0
  199. package/dist/ptcw-design/p-a0f25c98.entry.js +1 -0
  200. package/dist/ptcw-design/p-a4900673.entry.js +1 -0
  201. package/dist/ptcw-design/p-a749c353.entry.js +1 -0
  202. package/dist/ptcw-design/p-adcc9906.entry.js +1 -0
  203. package/dist/ptcw-design/p-b420e81a.entry.js +1 -0
  204. package/dist/ptcw-design/p-b701bbc0.entry.js +1 -0
  205. package/dist/ptcw-design/p-bbbced85.entry.js +1 -0
  206. package/dist/ptcw-design/p-c3f73953.entry.js +1 -0
  207. package/dist/ptcw-design/p-c4e20f99.entry.js +1 -0
  208. package/dist/ptcw-design/p-ca9efc42.entry.js +1 -0
  209. package/dist/ptcw-design/p-d56b953e.entry.js +1 -0
  210. package/dist/ptcw-design/{p-5e845a15.entry.js → p-d910c9d6.entry.js} +2 -2
  211. package/dist/ptcw-design/p-e3280772.entry.js +1 -0
  212. package/dist/ptcw-design/p-e34d194d.entry.js +1 -0
  213. package/dist/ptcw-design/p-e87bc2cd.entry.js +1 -0
  214. package/dist/ptcw-design/p-f2cb8bc4.entry.js +1 -0
  215. package/dist/ptcw-design/p-f9694131.entry.js +1 -0
  216. package/dist/ptcw-design/p-fbd43055.entry.js +1 -0
  217. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  218. package/dist/types/components/ptc-dynamic-card/ptc-dynamic-card.d.ts +11 -3
  219. package/dist/types/components.d.ts +86 -111
  220. package/dist/types/stencil-public-runtime.d.ts +20 -4
  221. package/loader/package.json +1 -0
  222. package/package.json +4 -3
  223. package/readme.md +1 -1
  224. package/dist/cjs/ptc-nav-item.cjs.entry.js +0 -94
  225. package/dist/cjs/ptc-nav.cjs.entry.js +0 -19
  226. package/dist/collection/components/ptc-nav/ptc-nav.css +0 -29
  227. package/dist/collection/components/ptc-nav/ptc-nav.js +0 -21
  228. package/dist/collection/components/ptc-nav-item/ptc-nav-item.css +0 -81
  229. package/dist/collection/components/ptc-nav-item/ptc-nav-item.js +0 -252
  230. package/dist/esm/ptc-nav-item.entry.js +0 -90
  231. package/dist/esm/ptc-nav.entry.js +0 -15
  232. package/dist/ptcw-design/p-09351f78.entry.js +0 -1
  233. package/dist/ptcw-design/p-10385027.entry.js +0 -1
  234. package/dist/ptcw-design/p-15ec8469.entry.js +0 -1
  235. package/dist/ptcw-design/p-1743d0ef.entry.js +0 -1
  236. package/dist/ptcw-design/p-1a77a824.entry.js +0 -1
  237. package/dist/ptcw-design/p-1ec512ea.entry.js +0 -1
  238. package/dist/ptcw-design/p-2de688ba.entry.js +0 -1
  239. package/dist/ptcw-design/p-2f6ecdf8.entry.js +0 -1
  240. package/dist/ptcw-design/p-39b8d25b.entry.js +0 -1
  241. package/dist/ptcw-design/p-3a4bb2b1.entry.js +0 -1
  242. package/dist/ptcw-design/p-3b87cd6f.entry.js +0 -1
  243. package/dist/ptcw-design/p-3b994b78.entry.js +0 -1
  244. package/dist/ptcw-design/p-4355ed7c.js +0 -1
  245. package/dist/ptcw-design/p-446423fc.entry.js +0 -1
  246. package/dist/ptcw-design/p-493b2571.entry.js +0 -1
  247. package/dist/ptcw-design/p-4ab335ac.entry.js +0 -1
  248. package/dist/ptcw-design/p-4da25d67.entry.js +0 -1
  249. package/dist/ptcw-design/p-53790fb4.entry.js +0 -1
  250. package/dist/ptcw-design/p-5bf5932c.entry.js +0 -1
  251. package/dist/ptcw-design/p-5c02f876.entry.js +0 -1
  252. package/dist/ptcw-design/p-5c5c8f25.entry.js +0 -1
  253. package/dist/ptcw-design/p-5fd37a0e.entry.js +0 -1
  254. package/dist/ptcw-design/p-5fd60b15.entry.js +0 -1
  255. package/dist/ptcw-design/p-6ab5aee9.entry.js +0 -1
  256. package/dist/ptcw-design/p-70d2c46d.entry.js +0 -1
  257. package/dist/ptcw-design/p-74a31734.entry.js +0 -1
  258. package/dist/ptcw-design/p-7a37d762.entry.js +0 -1
  259. package/dist/ptcw-design/p-83a9720c.entry.js +0 -1
  260. package/dist/ptcw-design/p-85e7bbc3.entry.js +0 -1
  261. package/dist/ptcw-design/p-87f9430f.entry.js +0 -1
  262. package/dist/ptcw-design/p-8ba6cef7.entry.js +0 -1
  263. package/dist/ptcw-design/p-8c0ba2d5.entry.js +0 -1
  264. package/dist/ptcw-design/p-8c594b35.entry.js +0 -1
  265. package/dist/ptcw-design/p-8d46a06e.entry.js +0 -1
  266. package/dist/ptcw-design/p-8e2e81c8.entry.js +0 -1
  267. package/dist/ptcw-design/p-96bfb95b.entry.js +0 -1
  268. package/dist/ptcw-design/p-baa7d351.entry.js +0 -1
  269. package/dist/ptcw-design/p-bcfd05dc.entry.js +0 -1
  270. package/dist/ptcw-design/p-be32e928.entry.js +0 -1
  271. package/dist/ptcw-design/p-c05f0c98.entry.js +0 -1
  272. package/dist/ptcw-design/p-c267b720.entry.js +0 -1
  273. package/dist/ptcw-design/p-c460a62d.entry.js +0 -1
  274. package/dist/ptcw-design/p-c91a875b.entry.js +0 -1
  275. package/dist/ptcw-design/p-cd2404f0.entry.js +0 -1
  276. package/dist/ptcw-design/p-ce5ee58d.entry.js +0 -1
  277. package/dist/ptcw-design/p-d39668ca.entry.js +0 -1
  278. package/dist/ptcw-design/p-e955c833.entry.js +0 -1
  279. package/dist/ptcw-design/p-f0cd0fb4.entry.js +0 -1
  280. package/dist/ptcw-design/p-f7d18b93.entry.js +0 -1
  281. package/dist/ptcw-design/p-fce72f70.entry.js +0 -1
  282. package/dist/types/components/ptc-nav/ptc-nav.d.ts +0 -3
  283. package/dist/types/components/ptc-nav-item/ptc-nav-item.d.ts +0 -53
@@ -1,11 +1,6 @@
1
- import { Component, h, Prop, State, Event, Element, Listen } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  export class PtcDropdown {
3
3
  constructor() {
4
- /**
5
- * Theme
6
- */
7
- this.theme = 'sort';
8
- this.toggle = false;
9
4
  this.handleClick = (item) => {
10
5
  this.listItems.forEach((item) => item.selected = undefined);
11
6
  item.selected = true;
@@ -16,6 +11,11 @@ export class PtcDropdown {
16
11
  this.toggleList = () => {
17
12
  this.toggle = !this.toggle;
18
13
  };
14
+ this.theme = 'sort';
15
+ this.label = undefined;
16
+ this.listItems = undefined;
17
+ this.toggle = false;
18
+ this.selectedItem = undefined;
19
19
  }
20
20
  offClick(e) {
21
21
  if (e && !this.host.contains(e.target) && this.toggle) {
@@ -44,21 +44,14 @@ export class PtcDropdown {
44
44
  }
45
45
  render() {
46
46
  const classMap = this.getCssClassMap();
47
- return (h("div", { class: classMap },
48
- h("header", { class: "dropdown__header", onClick: this.toggleList },
49
- h("label", null,
50
- h("b", null, this.label),
51
- " ",
52
- this.selectedItem ? this.selectedItem.label : "Select Option"),
53
- h("icon-asset", { type: "solid", size: "x-small", name: "chevron-down" })),
54
- this.toggle &&
55
- h("ul", { tabIndex: -1, class: "dropdown__list", onBlur: () => { this.toggle = false; } }, this.listItems.map((item) => {
56
- let cssClass = "dropdown__item";
57
- if (item.selected) {
58
- cssClass += " selected";
59
- }
60
- return (h("li", { class: cssClass, onClick: () => this.handleClick(item) }, item.label));
61
- }))));
47
+ return (h("div", { class: classMap }, h("header", { class: "dropdown__header", onClick: this.toggleList }, h("label", null, h("b", null, this.label), " ", this.selectedItem ? this.selectedItem.label : "Select Option"), h("icon-asset", { type: "solid", size: "x-small", name: "chevron-down" })), this.toggle &&
48
+ h("ul", { tabIndex: -1, class: "dropdown__list", onBlur: () => { this.toggle = false; } }, this.listItems.map((item) => {
49
+ let cssClass = "dropdown__item";
50
+ if (item.selected) {
51
+ cssClass += " selected";
52
+ }
53
+ return (h("li", { class: cssClass, onClick: () => this.handleClick(item) }, item.label));
54
+ }))));
62
55
  }
63
56
  getCssClassMap() {
64
57
  return {
@@ -68,90 +61,102 @@ export class PtcDropdown {
68
61
  }
69
62
  static get is() { return "ptc-dropdown"; }
70
63
  static get encapsulation() { return "shadow"; }
71
- static get originalStyleUrls() { return {
72
- "$": ["ptc-dropdown.scss"]
73
- }; }
74
- static get styleUrls() { return {
75
- "$": ["ptc-dropdown.css"]
76
- }; }
77
- static get properties() { return {
78
- "theme": {
79
- "type": "string",
80
- "mutable": false,
81
- "complexType": {
82
- "original": "'sort'",
83
- "resolved": "\"sort\"",
84
- "references": {}
85
- },
86
- "required": false,
87
- "optional": false,
88
- "docs": {
89
- "tags": [],
90
- "text": "Theme"
91
- },
92
- "attribute": "theme",
93
- "reflect": false,
94
- "defaultValue": "'sort'"
95
- },
96
- "label": {
97
- "type": "string",
98
- "mutable": false,
99
- "complexType": {
100
- "original": "string",
101
- "resolved": "string",
102
- "references": {}
103
- },
104
- "required": false,
105
- "optional": false,
106
- "docs": {
107
- "tags": [],
108
- "text": ""
109
- },
110
- "attribute": "label",
111
- "reflect": false
112
- },
113
- "listItems": {
114
- "type": "unknown",
115
- "mutable": false,
116
- "complexType": {
117
- "original": "any[]",
118
- "resolved": "any[]",
119
- "references": {}
64
+ static get originalStyleUrls() {
65
+ return {
66
+ "$": ["ptc-dropdown.scss"]
67
+ };
68
+ }
69
+ static get styleUrls() {
70
+ return {
71
+ "$": ["ptc-dropdown.css"]
72
+ };
73
+ }
74
+ static get properties() {
75
+ return {
76
+ "theme": {
77
+ "type": "string",
78
+ "mutable": false,
79
+ "complexType": {
80
+ "original": "'sort'",
81
+ "resolved": "\"sort\"",
82
+ "references": {}
83
+ },
84
+ "required": false,
85
+ "optional": false,
86
+ "docs": {
87
+ "tags": [],
88
+ "text": "Theme"
89
+ },
90
+ "attribute": "theme",
91
+ "reflect": false,
92
+ "defaultValue": "'sort'"
120
93
  },
121
- "required": false,
122
- "optional": false,
123
- "docs": {
124
- "tags": [],
125
- "text": ""
126
- }
127
- }
128
- }; }
129
- static get states() { return {
130
- "toggle": {},
131
- "selectedItem": {}
132
- }; }
133
- static get events() { return [{
134
- "method": "clickedItem",
135
- "name": "clickedItem",
136
- "bubbles": true,
137
- "cancelable": true,
138
- "composed": true,
139
- "docs": {
140
- "tags": [],
141
- "text": ""
94
+ "label": {
95
+ "type": "string",
96
+ "mutable": false,
97
+ "complexType": {
98
+ "original": "string",
99
+ "resolved": "string",
100
+ "references": {}
101
+ },
102
+ "required": false,
103
+ "optional": false,
104
+ "docs": {
105
+ "tags": [],
106
+ "text": ""
107
+ },
108
+ "attribute": "label",
109
+ "reflect": false
142
110
  },
143
- "complexType": {
144
- "original": "any",
145
- "resolved": "any",
146
- "references": {}
111
+ "listItems": {
112
+ "type": "unknown",
113
+ "mutable": false,
114
+ "complexType": {
115
+ "original": "any[]",
116
+ "resolved": "any[]",
117
+ "references": {}
118
+ },
119
+ "required": false,
120
+ "optional": false,
121
+ "docs": {
122
+ "tags": [],
123
+ "text": ""
124
+ }
147
125
  }
148
- }]; }
126
+ };
127
+ }
128
+ static get states() {
129
+ return {
130
+ "toggle": {},
131
+ "selectedItem": {}
132
+ };
133
+ }
134
+ static get events() {
135
+ return [{
136
+ "method": "clickedItem",
137
+ "name": "clickedItem",
138
+ "bubbles": true,
139
+ "cancelable": true,
140
+ "composed": true,
141
+ "docs": {
142
+ "tags": [],
143
+ "text": ""
144
+ },
145
+ "complexType": {
146
+ "original": "any",
147
+ "resolved": "any",
148
+ "references": {}
149
+ }
150
+ }];
151
+ }
149
152
  static get elementRef() { return "host"; }
150
- static get listeners() { return [{
151
- "name": "click",
152
- "method": "offClick",
153
- "target": "document",
154
- "capture": false,
155
- "passive": false
156
- }]; }
153
+ static get listeners() {
154
+ return [{
155
+ "name": "click",
156
+ "method": "offClick",
157
+ "target": "document",
158
+ "capture": false,
159
+ "passive": false
160
+ }];
161
+ }
157
162
  }
@@ -0,0 +1,16 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
2
+ <defs>
3
+ <style>
4
+ .cls-1 {
5
+ fill: #18723b;
6
+ }
7
+
8
+ .cls-2 {
9
+ fill: #f3f3f3;
10
+ }
11
+ </style>
12
+ </defs>
13
+ <circle id="Ellipse_1_copy_2" data-name="Ellipse 1 copy 2" class="cls-1" cx="10" cy="10" r="10"/>
14
+ <circle id="Ellipse_1_copy" data-name="Ellipse 1 copy" class="cls-2" cx="10" cy="10" r="7.781"/>
15
+ <circle class="cls-1" cx="10" cy="10" r="5"/>
16
+ </svg>
@@ -16,6 +16,7 @@
16
16
  }
17
17
  :host(.sequential) .card-mobile ptc-card-content, :host(.sequential) .card-dt-open ptc-card-content {
18
18
  display: flex;
19
+ flex-basis: 38%;
19
20
  justify-content: center;
20
21
  align-items: center;
21
22
  padding: var(--ptc-element-spacing-06) var(--ptc-element-spacing-06) var(--ptc-element-spacing-07) var(--ptc-element-spacing-06);
@@ -26,6 +27,9 @@
26
27
  padding-right: var(--ptc-element-spacing-08);
27
28
  }
28
29
  }
30
+ :host(.sequential) .card-mobile ptc-picture, :host(.sequential) .card-dt-open ptc-picture {
31
+ flex-basis: 62%;
32
+ }
29
33
  :host(.sequential) .card-mobile .card-title h3, :host(.sequential) .card-dt-open .card-title h3 {
30
34
  color: var(--color-white);
31
35
  font-size: var(--ptc-font-size-large);
@@ -1,23 +1,35 @@
1
- import { Component, Host, h, Prop, State, Listen } from '@stencil/core';
1
+ import { Host, h, getAssetPath } from '@stencil/core';
2
+ //import navDotSlick from '../../media/svg-imgs/nav-active-dotslick.svg';
2
3
  export class PtcDynamicCard {
3
4
  constructor() {
4
- /** Dynamic Card Type */
5
+ this.dotSvg = getAssetPath('./media/nav-active-dotslick.svg');
5
6
  this.cardType = 'sequential';
6
- /** Card Title */
7
7
  this.cardTitle = 'Card Title Goes Here';
8
- /** Card Status */
8
+ this.cardImgSrc = undefined;
9
+ this.cardImgAlt = undefined;
10
+ this.outCardState = undefined;
9
11
  this.cardStatus = 'desktop-closed';
12
+ this.overlayExists = true;
10
13
  }
11
- handleClick() {
12
- if (this.cardStatus === 'desktop-closed') {
13
- this.cardStatus = 'desktop-expanded';
14
- }
15
- else if (this.cardStatus === 'desktop-expanded') {
16
- this.cardStatus = 'desktop-closed';
17
- }
18
- else {
19
- console.log('mobile state!');
20
- }
14
+ cardStateChanged(newState) {
15
+ this.cardStatus = newState;
16
+ }
17
+ async changeState(newState) {
18
+ this.outCardState = newState;
19
+ }
20
+ componentDidLoad() {
21
+ this.handleResize();
22
+ this.el.addEventListener('mouseenter', () => this.overlayExists = false);
23
+ this.el.addEventListener('mouseleave', () => this.overlayExists = true);
24
+ }
25
+ render() {
26
+ const classMap = this.getCssClassMap();
27
+ return (h(Host, { class: classMap }, h("div", { class: "card-wrapper" }, this.cardStatus == 'mobile' ? (h("div", { class: "card card-mobile" }, h("ptc-picture", { alt: this.cardImgAlt, src: this.cardImgSrc }), h("ptc-card-content", { "card-type": "card-dynamic" }, h("div", { class: "card-title" }, h("h3", null, this.cardTitle)), h("div", { class: "card-content" }, h("slot", null))))) : this.cardStatus == 'desktop-closed' ? (h("div", null, h("div", { class: "card card-dt-closed" }, h("ptc-picture", { alt: this.cardImgAlt, src: this.cardImgSrc, "image-position": "relative", width: "135", height: "424" }, this.overlayExists ? h("ptc-overlay", { "filter-color": "black-3" }) : h("ptc-overlay", { "filter-color": "black-2" })), h("ptc-card-content", { "card-type": "card-dynamic" }, h("div", { class: "card-title" }, h("h2", null, this.cardTitle)))))) : (h("div", null, h("div", { class: "card card-dt-open" }, h("ptc-card-content", { "card-type": "card-dynamic" }, h("div", { class: "card-title" }, h("h3", null, this.cardTitle)), h("div", { class: "card-content" }, h("slot", null))), h("ptc-picture", { alt: this.cardImgAlt, src: this.cardImgSrc, "is-full-height": "true", "image-alignment": "center" }))))), h("div", { hidden: true }, h("svg", null, h("use", { href: `${this.dotSvg}` })))));
28
+ }
29
+ getCssClassMap() {
30
+ return {
31
+ [this.cardType]: true,
32
+ };
21
33
  }
22
34
  handleResize() {
23
35
  //console.log('window width:', window.innerWidth);
@@ -28,129 +40,144 @@ export class PtcDynamicCard {
28
40
  this.cardStatus = 'desktop-closed';
29
41
  }
30
42
  }
31
- render() {
32
- const classMap = this.getCssClassMap();
33
- return (h(Host, { class: classMap },
34
- h("div", { class: "card-wrapper" }, this.cardStatus == 'mobile' ? (h("div", { class: "card card-mobile" },
35
- h("ptc-picture", { alt: this.cardImgAlt, src: this.cardImgSrc }),
36
- h("ptc-card-content", { "card-type": "card-dynamic" },
37
- h("div", { class: "card-title" },
38
- h("h3", null, this.cardTitle)),
39
- h("div", { class: "card-content" },
40
- h("slot", null))))) : this.cardStatus == 'desktop-closed' ? (h("div", null,
41
- h("div", { class: "card card-dt-closed" },
42
- h("ptc-picture", { alt: this.cardImgAlt, src: this.cardImgSrc, "image-position": "relative", width: "135", height: "424" },
43
- h("ptc-overlay", { "filter-color": "black-3" })),
44
- h("ptc-card-content", { "card-type": "card-dynamic" },
45
- h("div", { class: "card-title" },
46
- h("h2", null, this.cardTitle)))))) : (h("div", null,
47
- h("div", { class: "card card-dt-open" },
48
- h("ptc-card-content", { "card-type": "card-dynamic" },
49
- h("div", { class: "card-title" },
50
- h("h3", null, this.cardTitle)),
51
- h("div", { class: "card-content" },
52
- h("slot", null))),
53
- h("ptc-picture", { alt: this.cardImgAlt, src: this.cardImgSrc, "is-full-height": "true", "image-alignment": "center" })))))));
43
+ static get is() { return "ptc-dynamic-card"; }
44
+ static get encapsulation() { return "shadow"; }
45
+ static get originalStyleUrls() {
46
+ return {
47
+ "$": ["ptc-dynamic-card.scss"]
48
+ };
54
49
  }
55
- getCssClassMap() {
50
+ static get styleUrls() {
56
51
  return {
57
- [this.cardType]: true,
52
+ "$": ["ptc-dynamic-card.css"]
58
53
  };
59
54
  }
60
- static get is() { return "ptc-dynamic-card"; }
61
- static get encapsulation() { return "shadow"; }
62
- static get originalStyleUrls() { return {
63
- "$": ["ptc-dynamic-card.scss"]
64
- }; }
65
- static get styleUrls() { return {
66
- "$": ["ptc-dynamic-card.css"]
67
- }; }
68
- static get properties() { return {
69
- "cardType": {
70
- "type": "string",
71
- "mutable": false,
72
- "complexType": {
73
- "original": "'sequential'",
74
- "resolved": "\"sequential\"",
75
- "references": {}
76
- },
77
- "required": false,
78
- "optional": false,
79
- "docs": {
80
- "tags": [],
81
- "text": "Dynamic Card Type"
82
- },
83
- "attribute": "card-type",
84
- "reflect": false,
85
- "defaultValue": "'sequential'"
86
- },
87
- "cardTitle": {
88
- "type": "string",
89
- "mutable": false,
90
- "complexType": {
91
- "original": "string",
92
- "resolved": "string",
93
- "references": {}
94
- },
95
- "required": false,
96
- "optional": false,
97
- "docs": {
98
- "tags": [],
99
- "text": "Card Title"
100
- },
101
- "attribute": "card-title",
102
- "reflect": false,
103
- "defaultValue": "'Card Title Goes Here'"
104
- },
105
- "cardImgSrc": {
106
- "type": "string",
107
- "mutable": false,
108
- "complexType": {
109
- "original": "string",
110
- "resolved": "string",
111
- "references": {}
55
+ static get assetsDirs() { return ["media"]; }
56
+ static get properties() {
57
+ return {
58
+ "cardType": {
59
+ "type": "string",
60
+ "mutable": false,
61
+ "complexType": {
62
+ "original": "'sequential'",
63
+ "resolved": "\"sequential\"",
64
+ "references": {}
65
+ },
66
+ "required": false,
67
+ "optional": false,
68
+ "docs": {
69
+ "tags": [],
70
+ "text": "Dynamic Card Type"
71
+ },
72
+ "attribute": "card-type",
73
+ "reflect": false,
74
+ "defaultValue": "'sequential'"
112
75
  },
113
- "required": false,
114
- "optional": true,
115
- "docs": {
116
- "tags": [],
117
- "text": "Card Image Src"
76
+ "cardTitle": {
77
+ "type": "string",
78
+ "mutable": false,
79
+ "complexType": {
80
+ "original": "string",
81
+ "resolved": "string",
82
+ "references": {}
83
+ },
84
+ "required": false,
85
+ "optional": false,
86
+ "docs": {
87
+ "tags": [],
88
+ "text": "Card Title"
89
+ },
90
+ "attribute": "card-title",
91
+ "reflect": false,
92
+ "defaultValue": "'Card Title Goes Here'"
118
93
  },
119
- "attribute": "card-img-src",
120
- "reflect": false
121
- },
122
- "cardImgAlt": {
123
- "type": "string",
124
- "mutable": false,
125
- "complexType": {
126
- "original": "string",
127
- "resolved": "string",
128
- "references": {}
94
+ "cardImgSrc": {
95
+ "type": "string",
96
+ "mutable": false,
97
+ "complexType": {
98
+ "original": "string",
99
+ "resolved": "string",
100
+ "references": {}
101
+ },
102
+ "required": false,
103
+ "optional": true,
104
+ "docs": {
105
+ "tags": [],
106
+ "text": "Card Image Src"
107
+ },
108
+ "attribute": "card-img-src",
109
+ "reflect": false
129
110
  },
130
- "required": false,
131
- "optional": true,
132
- "docs": {
133
- "tags": [],
134
- "text": "Card Image Alt"
111
+ "cardImgAlt": {
112
+ "type": "string",
113
+ "mutable": false,
114
+ "complexType": {
115
+ "original": "string",
116
+ "resolved": "string",
117
+ "references": {}
118
+ },
119
+ "required": false,
120
+ "optional": true,
121
+ "docs": {
122
+ "tags": [],
123
+ "text": "Card Image Alt"
124
+ },
125
+ "attribute": "card-img-alt",
126
+ "reflect": false
135
127
  },
136
- "attribute": "card-img-alt",
137
- "reflect": false
138
- }
139
- }; }
140
- static get states() { return {
141
- "cardStatus": {}
142
- }; }
143
- static get listeners() { return [{
144
- "name": "click",
145
- "method": "handleClick",
146
- "target": undefined,
147
- "capture": true,
148
- "passive": false
149
- }, {
150
- "name": "resize",
151
- "method": "handleResize",
152
- "target": "window",
153
- "capture": false,
154
- "passive": true
155
- }]; }
128
+ "outCardState": {
129
+ "type": "string",
130
+ "mutable": true,
131
+ "complexType": {
132
+ "original": "string",
133
+ "resolved": "string",
134
+ "references": {}
135
+ },
136
+ "required": false,
137
+ "optional": false,
138
+ "docs": {
139
+ "tags": [],
140
+ "text": "Public card state"
141
+ },
142
+ "attribute": "out-card-state",
143
+ "reflect": false
144
+ }
145
+ };
146
+ }
147
+ static get states() {
148
+ return {
149
+ "cardStatus": {},
150
+ "overlayExists": {}
151
+ };
152
+ }
153
+ static get methods() {
154
+ return {
155
+ "changeState": {
156
+ "complexType": {
157
+ "signature": "(newState: 'mobile' | 'desktop-closed' | 'desktop-expanded') => Promise<void>",
158
+ "parameters": [{
159
+ "tags": [],
160
+ "text": ""
161
+ }],
162
+ "references": {
163
+ "Promise": {
164
+ "location": "global"
165
+ }
166
+ },
167
+ "return": "Promise<void>"
168
+ },
169
+ "docs": {
170
+ "text": "",
171
+ "tags": []
172
+ }
173
+ }
174
+ };
175
+ }
176
+ static get elementRef() { return "el"; }
177
+ static get watchers() {
178
+ return [{
179
+ "propName": "outCardState",
180
+ "methodName": "cardStateChanged"
181
+ }];
182
+ }
156
183
  }