@roadtrip/components 3.6.0 → 3.8.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.
Files changed (259) hide show
  1. package/dist/cjs/{app-d94011e3.js → app-04522e32.js} +1 -1
  2. package/dist/cjs/{index-a2306350.js → index-2e5d330e.js} +247 -2
  3. package/dist/cjs/index.cjs.js +2 -2
  4. package/dist/cjs/loader.cjs.js +3 -3
  5. package/dist/cjs/road-accordion.cjs.entry.js +1 -1
  6. package/dist/cjs/road-alert.cjs.entry.js +1 -1
  7. package/dist/cjs/road-autocomplete.cjs.entry.js +1 -1
  8. package/dist/cjs/road-avatar.cjs.entry.js +1 -1
  9. package/dist/cjs/road-badge_14.cjs.entry.js +3 -3
  10. package/dist/cjs/road-banner.cjs.entry.js +1 -1
  11. package/dist/cjs/road-button-floating.cjs.entry.js +1 -1
  12. package/dist/cjs/road-card.cjs.entry.js +1 -1
  13. package/dist/cjs/road-carousel-item.cjs.entry.js +1 -1
  14. package/dist/cjs/road-carousel.cjs.entry.js +1 -1
  15. package/dist/cjs/road-checkbox.cjs.entry.js +1 -1
  16. package/dist/cjs/road-chip.cjs.entry.js +1 -1
  17. package/dist/cjs/road-collapse.cjs.entry.js +1 -1
  18. package/dist/cjs/road-dialog.cjs.entry.js +1 -1
  19. package/dist/cjs/road-dropdown.cjs.entry.js +1 -1
  20. package/dist/cjs/road-duration.cjs.entry.js +1 -1
  21. package/dist/cjs/road-flap.cjs.entry.js +1 -1
  22. package/dist/cjs/road-global-navigation.cjs.entry.js +1 -1
  23. package/dist/cjs/road-img.cjs.entry.js +1 -1
  24. package/dist/cjs/road-modal.cjs.entry.js +1 -1
  25. package/dist/cjs/road-navbar-item.cjs.entry.js +2 -2
  26. package/dist/cjs/road-navbar.cjs.entry.js +1 -1
  27. package/dist/cjs/road-plate-number.cjs.entry.js +1 -1
  28. package/dist/cjs/road-profil-dropdown.cjs.entry.js +1 -1
  29. package/dist/cjs/road-progress-indicator-horizontal.cjs.entry.js +1 -1
  30. package/dist/cjs/road-progress-indicator-vertical-item.cjs.entry.js +1 -1
  31. package/dist/cjs/road-progress-indicator-vertical.cjs.entry.js +1 -1
  32. package/dist/cjs/road-progress-tracker-item.cjs.entry.js +1 -1
  33. package/dist/cjs/road-progress-tracker.cjs.entry.js +1 -1
  34. package/dist/cjs/road-progress.cjs.entry.js +2 -2
  35. package/dist/cjs/road-radio-group.cjs.entry.js +1 -1
  36. package/dist/cjs/road-radio.cjs.entry.js +1 -1
  37. package/dist/cjs/road-range.cjs.entry.js +1 -1
  38. package/dist/cjs/road-rating.cjs.entry.js +6 -2
  39. package/dist/cjs/road-segmented-button-bar.cjs.entry.js +1 -1
  40. package/dist/cjs/road-segmented-button.cjs.entry.js +1 -1
  41. package/dist/cjs/road-segmented-buttons.cjs.entry.js +1 -1
  42. package/dist/cjs/road-select-filter.cjs.entry.js +1 -1
  43. package/dist/cjs/road-select.cjs.entry.js +1 -1
  44. package/dist/cjs/road-skeleton.cjs.entry.js +1 -1
  45. package/dist/cjs/road-spinner.cjs.entry.js +1 -1
  46. package/dist/cjs/road-switch.cjs.entry.js +1 -1
  47. package/dist/cjs/road-tab-bar.cjs.entry.js +1 -1
  48. package/dist/cjs/road-tab-button.cjs.entry.js +1 -1
  49. package/dist/cjs/road-tab.cjs.entry.js +1 -1
  50. package/dist/cjs/road-table.cjs.entry.js +1 -1
  51. package/dist/cjs/road-tabs.cjs.entry.js +1 -1
  52. package/dist/cjs/road-tag.cjs.entry.js +8 -3
  53. package/dist/cjs/road-text.cjs.entry.js +1 -1
  54. package/dist/cjs/road-textarea.cjs.entry.js +8 -3
  55. package/dist/cjs/road-toast.cjs.entry.js +1 -1
  56. package/dist/cjs/road-toggle.cjs.entry.js +1 -1
  57. package/dist/cjs/road-toolbar-title-page.cjs.entry.js +1 -1
  58. package/dist/cjs/road-toolbar-title.cjs.entry.js +1 -1
  59. package/dist/cjs/road-tooltip.cjs.entry.js +1 -1
  60. package/dist/cjs/roadtrip.cjs.js +3 -3
  61. package/dist/cjs/{utils-5c31da25.js → utils-396a6425.js} +1 -1
  62. package/dist/collection/components/button/button.css +1 -0
  63. package/dist/collection/components/global-navigation/global-navigation.stories.js +11 -11
  64. package/dist/collection/components/icon/svg/cookie-color.svg +1 -0
  65. package/dist/collection/components/icon/svg/cookie-outline.svg +1 -0
  66. package/dist/collection/components/icon/svg/folding-chair-color.svg +1 -1
  67. package/dist/collection/components/icon/svg/folding-chair-outline.svg +1 -1
  68. package/dist/collection/components/icon/svg/furniture-color.svg +1 -1
  69. package/dist/collection/components/icon/svg/furniture-outline.svg +1 -1
  70. package/dist/collection/components/icon/svg/microwave-color.svg +1 -1
  71. package/dist/collection/components/icon/svg/microwave-outline.svg +1 -1
  72. package/dist/collection/components/icon/svg/player-arrow-play-outline.svg +1 -0
  73. package/dist/collection/components/icon/svg/player-break-outline.svg +1 -0
  74. package/dist/collection/components/icon/svg/player-irregular-outline.svg +1 -0
  75. package/dist/collection/components/icon/svg/player-pause-outline.svg +1 -0
  76. package/dist/collection/components/icon/svg/player-regular-outline.svg +1 -0
  77. package/dist/collection/components/icon/svg/player-unlimited-outline.svg +1 -0
  78. package/dist/collection/components/icon/svg/season-swap-color.svg +1 -0
  79. package/dist/collection/components/icon/svg/season-swap-outline.svg +1 -0
  80. package/dist/collection/components/icon/svg/shower-color.svg +1 -1
  81. package/dist/collection/components/icon/svg/shower-outline.svg +1 -1
  82. package/dist/collection/components/input/input.css +3 -1
  83. package/dist/collection/components/navbar/navbar.stories.js +11 -11
  84. package/dist/collection/components/navbar-item/navbar-item.css +1 -1
  85. package/dist/collection/components/patterns/breadcrumb.stories.js +9 -9
  86. package/dist/collection/components/progress/progress.css +4 -0
  87. package/dist/collection/components/progress/progress.js +2 -2
  88. package/dist/collection/components/progress/progress.stories.js +6 -1
  89. package/dist/collection/components/rating/rating.js +23 -1
  90. package/dist/collection/components/rating/rating.stories.js +13 -1
  91. package/dist/collection/components/tag/tag.css +29 -0
  92. package/dist/collection/components/tag/tag.js +24 -1
  93. package/dist/collection/components/tag/tag.stories.js +10 -1
  94. package/dist/collection/components/textarea/textarea.css +4 -0
  95. package/dist/collection/components/textarea/textarea.js +24 -1
  96. package/dist/collection/components/textarea/textarea.stories.js +9 -0
  97. package/dist/esm/{app-ca51f056.js → app-36d3a1be.js} +1 -1
  98. package/dist/esm/{index-a99a5e7b.js → index-3648a167.js} +247 -2
  99. package/dist/esm/index.js +2 -2
  100. package/dist/esm/loader.js +3 -3
  101. package/dist/esm/road-accordion.entry.js +1 -1
  102. package/dist/esm/road-alert.entry.js +1 -1
  103. package/dist/esm/road-autocomplete.entry.js +1 -1
  104. package/dist/esm/road-avatar.entry.js +1 -1
  105. package/dist/esm/road-badge_14.entry.js +3 -3
  106. package/dist/esm/road-banner.entry.js +1 -1
  107. package/dist/esm/road-button-floating.entry.js +1 -1
  108. package/dist/esm/road-card.entry.js +1 -1
  109. package/dist/esm/road-carousel-item.entry.js +1 -1
  110. package/dist/esm/road-carousel.entry.js +1 -1
  111. package/dist/esm/road-checkbox.entry.js +1 -1
  112. package/dist/esm/road-chip.entry.js +1 -1
  113. package/dist/esm/road-collapse.entry.js +1 -1
  114. package/dist/esm/road-dialog.entry.js +1 -1
  115. package/dist/esm/road-dropdown.entry.js +1 -1
  116. package/dist/esm/road-duration.entry.js +1 -1
  117. package/dist/esm/road-flap.entry.js +1 -1
  118. package/dist/esm/road-global-navigation.entry.js +1 -1
  119. package/dist/esm/road-img.entry.js +1 -1
  120. package/dist/esm/road-modal.entry.js +1 -1
  121. package/dist/esm/road-navbar-item.entry.js +2 -2
  122. package/dist/esm/road-navbar.entry.js +1 -1
  123. package/dist/esm/road-plate-number.entry.js +1 -1
  124. package/dist/esm/road-profil-dropdown.entry.js +1 -1
  125. package/dist/esm/road-progress-indicator-horizontal.entry.js +1 -1
  126. package/dist/esm/road-progress-indicator-vertical-item.entry.js +1 -1
  127. package/dist/esm/road-progress-indicator-vertical.entry.js +1 -1
  128. package/dist/esm/road-progress-tracker-item.entry.js +1 -1
  129. package/dist/esm/road-progress-tracker.entry.js +1 -1
  130. package/dist/esm/road-progress.entry.js +2 -2
  131. package/dist/esm/road-radio-group.entry.js +1 -1
  132. package/dist/esm/road-radio.entry.js +1 -1
  133. package/dist/esm/road-range.entry.js +1 -1
  134. package/dist/esm/road-rating.entry.js +6 -2
  135. package/dist/esm/road-segmented-button-bar.entry.js +1 -1
  136. package/dist/esm/road-segmented-button.entry.js +1 -1
  137. package/dist/esm/road-segmented-buttons.entry.js +1 -1
  138. package/dist/esm/road-select-filter.entry.js +1 -1
  139. package/dist/esm/road-select.entry.js +1 -1
  140. package/dist/esm/road-skeleton.entry.js +1 -1
  141. package/dist/esm/road-spinner.entry.js +1 -1
  142. package/dist/esm/road-switch.entry.js +1 -1
  143. package/dist/esm/road-tab-bar.entry.js +1 -1
  144. package/dist/esm/road-tab-button.entry.js +1 -1
  145. package/dist/esm/road-tab.entry.js +1 -1
  146. package/dist/esm/road-table.entry.js +1 -1
  147. package/dist/esm/road-tabs.entry.js +1 -1
  148. package/dist/esm/road-tag.entry.js +8 -3
  149. package/dist/esm/road-text.entry.js +1 -1
  150. package/dist/esm/road-textarea.entry.js +8 -3
  151. package/dist/esm/road-toast.entry.js +1 -1
  152. package/dist/esm/road-toggle.entry.js +1 -1
  153. package/dist/esm/road-toolbar-title-page.entry.js +1 -1
  154. package/dist/esm/road-toolbar-title.entry.js +1 -1
  155. package/dist/esm/road-tooltip.entry.js +1 -1
  156. package/dist/esm/roadtrip.js +3 -3
  157. package/dist/esm/{utils-0ec32b47.js → utils-4fb81650.js} +1 -1
  158. package/dist/html.html-data.json +15 -0
  159. package/dist/icons/icons.svg +1 -1
  160. package/dist/icons/index.d.ts +11 -1
  161. package/dist/icons/index.js +11 -1
  162. package/dist/roadtrip/index.esm.js +1 -1
  163. package/dist/roadtrip/{p-e51617fb.entry.js → p-028fbc98.entry.js} +1 -1
  164. package/dist/roadtrip/{p-e6a69601.entry.js → p-047f9d06.entry.js} +1 -1
  165. package/dist/roadtrip/{p-df5abb4b.entry.js → p-0ecd9c44.entry.js} +1 -1
  166. package/dist/roadtrip/{p-0ad2e739.entry.js → p-11198399.entry.js} +1 -1
  167. package/dist/roadtrip/{p-b6925b27.entry.js → p-11e8b7d8.entry.js} +1 -1
  168. package/dist/roadtrip/{p-07ff311d.entry.js → p-17019ebc.entry.js} +1 -1
  169. package/dist/roadtrip/{p-1294ad0d.entry.js → p-1aa14002.entry.js} +1 -1
  170. package/dist/roadtrip/{p-b4381f61.entry.js → p-20474fa0.entry.js} +1 -1
  171. package/dist/roadtrip/{p-b3f165f4.entry.js → p-25dbf5ae.entry.js} +1 -1
  172. package/dist/roadtrip/{p-6cef5b4e.entry.js → p-2c70343a.entry.js} +1 -1
  173. package/dist/roadtrip/{p-4b77e940.entry.js → p-3ca57e80.entry.js} +1 -1
  174. package/dist/roadtrip/{p-7ef481b0.entry.js → p-3f9914a0.entry.js} +1 -1
  175. package/dist/roadtrip/{p-e189433e.entry.js → p-4530a324.entry.js} +1 -1
  176. package/dist/roadtrip/{p-d24c06f2.entry.js → p-4694f970.entry.js} +1 -1
  177. package/dist/roadtrip/{p-cfbb1cd3.entry.js → p-479f7ce5.entry.js} +1 -1
  178. package/dist/roadtrip/{p-0ce3567a.entry.js → p-4977f51b.entry.js} +1 -1
  179. package/dist/roadtrip/{p-85d01de7.entry.js → p-52fb41ab.entry.js} +1 -1
  180. package/dist/roadtrip/{p-3e6f0b0f.entry.js → p-5901cc95.entry.js} +1 -1
  181. package/dist/roadtrip/{p-df3469df.entry.js → p-5a19ef74.entry.js} +1 -1
  182. package/dist/roadtrip/p-5b4962a5.entry.js +1 -0
  183. package/dist/roadtrip/{p-7a724931.entry.js → p-5cd99182.entry.js} +1 -1
  184. package/dist/roadtrip/{p-dc18333b.entry.js → p-60a3cc90.entry.js} +1 -1
  185. package/dist/roadtrip/{p-b65936d0.entry.js → p-635ee169.entry.js} +1 -1
  186. package/dist/roadtrip/p-66507c19.js +1 -0
  187. package/dist/roadtrip/{p-ea321cc5.entry.js → p-6663a74c.entry.js} +1 -1
  188. package/dist/roadtrip/{p-451c3bbf.entry.js → p-66bb99b9.entry.js} +1 -1
  189. package/dist/roadtrip/{p-d6a872f3.entry.js → p-69bd9471.entry.js} +1 -1
  190. package/dist/roadtrip/{p-10024b8f.entry.js → p-6aef81aa.entry.js} +1 -1
  191. package/dist/roadtrip/{p-00762fb0.entry.js → p-6e6ebf56.entry.js} +1 -1
  192. package/dist/roadtrip/{p-88aad04d.entry.js → p-70c75b69.entry.js} +1 -1
  193. package/dist/roadtrip/{p-38cf1a21.entry.js → p-7a5882c0.entry.js} +1 -1
  194. package/dist/roadtrip/{p-f5f42766.entry.js → p-89d61829.entry.js} +1 -1
  195. package/dist/roadtrip/{p-57e3fe85.entry.js → p-8de8c288.entry.js} +1 -1
  196. package/dist/roadtrip/{p-6312516e.js → p-8e76838b.js} +1 -1
  197. package/dist/roadtrip/{p-5d29e9c8.entry.js → p-8ee48870.entry.js} +1 -1
  198. package/dist/roadtrip/p-95c62aad.entry.js +1 -0
  199. package/dist/roadtrip/{p-510fe45c.entry.js → p-9a95dd74.entry.js} +1 -1
  200. package/dist/roadtrip/p-9b0bc49b.js +2 -0
  201. package/dist/roadtrip/{p-e9bbb36d.entry.js → p-9ec3e9c2.entry.js} +1 -1
  202. package/dist/roadtrip/{p-07bb357f.entry.js → p-af65ced2.entry.js} +1 -1
  203. package/dist/roadtrip/{p-850ed3d4.entry.js → p-aff2ba21.entry.js} +1 -1
  204. package/dist/roadtrip/{p-9ef4cedb.entry.js → p-b5d485a2.entry.js} +1 -1
  205. package/dist/roadtrip/{p-fb23c9b4.entry.js → p-bb114085.entry.js} +1 -1
  206. package/dist/roadtrip/{p-a41b478a.entry.js → p-bf731c34.entry.js} +1 -1
  207. package/dist/roadtrip/{p-300fe50e.entry.js → p-c07004df.entry.js} +1 -1
  208. package/dist/roadtrip/{p-2db00cbc.entry.js → p-c4365897.entry.js} +1 -1
  209. package/dist/roadtrip/{p-173c9d0d.entry.js → p-c91a0dce.entry.js} +1 -1
  210. package/dist/roadtrip/{p-e7e55fc6.entry.js → p-d018d6d2.entry.js} +1 -1
  211. package/dist/roadtrip/{p-a2999a4e.entry.js → p-d437641f.entry.js} +1 -1
  212. package/dist/roadtrip/{p-604b9899.entry.js → p-d9b5400f.entry.js} +1 -1
  213. package/dist/roadtrip/{p-a4e187ea.entry.js → p-e2120e8f.entry.js} +1 -1
  214. package/dist/roadtrip/{p-400b12e7.entry.js → p-e4423dbb.entry.js} +1 -1
  215. package/dist/roadtrip/{p-921fd6c1.entry.js → p-e7686dab.entry.js} +1 -1
  216. package/dist/roadtrip/{p-e669be7b.entry.js → p-eb83cab4.entry.js} +1 -1
  217. package/dist/roadtrip/{p-6298ef24.entry.js → p-eb8f7fc4.entry.js} +1 -1
  218. package/dist/roadtrip/{p-72612490.entry.js → p-f38dbbb7.entry.js} +1 -1
  219. package/dist/roadtrip/p-f5e78215.entry.js +1 -0
  220. package/dist/roadtrip/{p-0ca6fb50.entry.js → p-fa38ac58.entry.js} +1 -1
  221. package/dist/roadtrip/roadtrip.css +1 -1
  222. package/dist/roadtrip/roadtrip.esm.js +1 -1
  223. package/dist/roadtrip/svg/cookie-color.svg +1 -0
  224. package/dist/roadtrip/svg/cookie-outline.svg +1 -0
  225. package/dist/roadtrip/svg/folding-chair-color.svg +1 -1
  226. package/dist/roadtrip/svg/folding-chair-outline.svg +1 -1
  227. package/dist/roadtrip/svg/furniture-color.svg +1 -1
  228. package/dist/roadtrip/svg/furniture-outline.svg +1 -1
  229. package/dist/roadtrip/svg/microwave-color.svg +1 -1
  230. package/dist/roadtrip/svg/microwave-outline.svg +1 -1
  231. package/dist/roadtrip/svg/player-arrow-play-outline.svg +1 -0
  232. package/dist/roadtrip/svg/player-break-outline.svg +1 -0
  233. package/dist/roadtrip/svg/player-irregular-outline.svg +1 -0
  234. package/dist/roadtrip/svg/player-pause-outline.svg +1 -0
  235. package/dist/roadtrip/svg/player-regular-outline.svg +1 -0
  236. package/dist/roadtrip/svg/player-unlimited-outline.svg +1 -0
  237. package/dist/roadtrip/svg/season-swap-color.svg +1 -0
  238. package/dist/roadtrip/svg/season-swap-outline.svg +1 -0
  239. package/dist/roadtrip/svg/shower-color.svg +1 -1
  240. package/dist/roadtrip/svg/shower-outline.svg +1 -1
  241. package/dist/types/components/progress/progress.d.ts +1 -1
  242. package/dist/types/components/rating/rating.d.ts +4 -0
  243. package/dist/types/components/tag/tag.d.ts +4 -0
  244. package/dist/types/components/textarea/textarea.d.ts +4 -0
  245. package/dist/types/components.d.ts +26 -2
  246. package/hydrate/index.d.ts +217 -0
  247. package/hydrate/index.js +20108 -0
  248. package/hydrate/package.json +6 -0
  249. package/icons/icons.svg +1 -1
  250. package/icons/index.d.ts +11 -1
  251. package/icons/index.js +11 -1
  252. package/package.json +3 -2
  253. package/dist/roadtrip/p-80e42f95.entry.js +0 -1
  254. package/dist/roadtrip/p-c44f7bd9.entry.js +0 -1
  255. package/dist/roadtrip/p-cdc666bc.js +0 -2
  256. package/dist/roadtrip/p-dced2265.entry.js +0 -1
  257. package/dist/roadtrip/p-e64fe690.js +0 -1
  258. /package/dist/collection/components/icon/svg/{cookie.svg → cookie-solid.svg} +0 -0
  259. /package/dist/roadtrip/svg/{cookie.svg → cookie-solid.svg} +0 -0
@@ -10,6 +10,10 @@ export class Rating {
10
10
  * Rate review between 0 and 5
11
11
  */
12
12
  this.rate = 0;
13
+ /**
14
+ * Show reviews
15
+ */
16
+ this.showreviews = true;
13
17
  /**
14
18
  * number of reviews
15
19
  */
@@ -24,7 +28,7 @@ export class Rating {
24
28
  const rateDecimale = this.rate - Math.floor(this.rate) > 0 ? 1 : 0;
25
29
  const sizeRatingStarsClass = this.size !== undefined ? `rating-stars rating-stars--${this.size}` : 'rating-stars';
26
30
  const sizeRatingNumberClass = this.size !== undefined ? `rating-number rating-number--${this.size}` : 'rating-number';
27
- return (h(Host, null, h("div", { class: `${sizeRatingStarsClass}` }, [...Array(rate)].map(() => h("road-icon", { icon: star, size: "sm", color: "warning" })), [...Array(rateDecimale)].map(() => h("road-icon", { icon: starHalfColor, size: "sm", class: "rating-star" })), [...Array(5 - rate - rateDecimale)].map(() => h("road-icon", { icon: star, size: "sm", class: "rating-star" }))), h("a", { class: `${sizeRatingNumberClass}`, href: "#" }, "(", this.reviews, this.reviewsText && ` ${this.reviewsText}`, ")")));
31
+ return (h(Host, null, h("div", { class: `${sizeRatingStarsClass}` }, [...Array(rate)].map(() => h("road-icon", { icon: star, size: "sm", color: "warning" })), [...Array(rateDecimale)].map(() => h("road-icon", { icon: starHalfColor, size: "sm", class: "rating-star" })), [...Array(5 - rate - rateDecimale)].map(() => h("road-icon", { icon: star, size: "sm", class: "rating-star" }))), this.showreviews && h("a", { class: `${sizeRatingNumberClass}`, href: "#" }, "(", this.reviews, this.reviewsText && ` ${this.reviewsText}`, ")")));
28
32
  }
29
33
  static get is() { return "road-rating"; }
30
34
  static get encapsulation() { return "shadow"; }
@@ -76,6 +80,24 @@ export class Rating {
76
80
  "reflect": false,
77
81
  "defaultValue": "0"
78
82
  },
83
+ "showreviews": {
84
+ "type": "boolean",
85
+ "mutable": false,
86
+ "complexType": {
87
+ "original": "boolean",
88
+ "resolved": "boolean",
89
+ "references": {}
90
+ },
91
+ "required": false,
92
+ "optional": false,
93
+ "docs": {
94
+ "tags": [],
95
+ "text": "Show reviews"
96
+ },
97
+ "attribute": "showreviews",
98
+ "reflect": false,
99
+ "defaultValue": "true"
100
+ },
79
101
  "reviews": {
80
102
  "type": "number",
81
103
  "mutable": false,
@@ -18,6 +18,9 @@ export default {
18
18
  max: '5',
19
19
  },
20
20
  },
21
+ showreviews: {
22
+ control: 'boolean',
23
+ },
21
24
  reviews: {
22
25
  control: {
23
26
  type: 'number',
@@ -38,7 +41,8 @@ const Template = (args) => html`
38
41
  rate="${ifDefined(args.rate)}"
39
42
  reviews="${ifDefined(args.reviews)}"
40
43
  reviews-text="${ifDefined(args['reviews-text'])}"
41
- size="${ifDefined(args.size)}"
44
+ size="${ifDefined(args.size)}"
45
+ showreviews="${ifDefined(args.showreviews)}"
42
46
  ></road-rating>
43
47
  `;
44
48
 
@@ -47,6 +51,7 @@ Playground.args = {
47
51
  rate: 3,
48
52
  reviews: 5,
49
53
  'reviews-text': 'reviews',
54
+ showreviews:'true',
50
55
  };
51
56
 
52
57
  export const Rating = Template.bind({});
@@ -60,3 +65,10 @@ MaxRating.args = {
60
65
  rate: 5,
61
66
  reviews: 50,
62
67
  };
68
+
69
+ export const LightRating = Template.bind({});
70
+ LightRating.args = {
71
+ rate: 5,
72
+ reviews: 50,
73
+ showreviews:'false',
74
+ };
@@ -22,31 +22,60 @@
22
22
  background-color: var(--road-grey-85);
23
23
  }
24
24
 
25
+ :host(.tag-grey.tag-grey-contrast) {
26
+ color: var(--road-on-primary);
27
+ background-color: var(--road-grey-40);
28
+ }
29
+
25
30
  :host(.tag-yellow) {
26
31
  color: var(--road-yellow-mikado-20);
27
32
  background-color: var(--road-yellow-mikado-90);
28
33
  }
29
34
 
35
+ :host(.tag-yellow.tag-yellow-contrast) {
36
+ color: var(--road-yellow-mikado-20);
37
+ background-color: var(--road-yellow-mikado-60);
38
+ }
39
+
30
40
  :host(.tag-red) {
31
41
  color: var(--road-red-pepper-30);
32
42
  background-color: var(--road-red-pepper-95);
33
43
  }
34
44
 
45
+ :host(.tag-red.tag-red-contrast) {
46
+ color: var(--road-on-primary);
47
+ background-color: var(--road-red-pepper-60);
48
+ }
49
+
35
50
  :host(.tag-violet) {
36
51
  color: var(--road-violet-electric-30);
37
52
  background-color: var(--road-violet-electric-95);
38
53
  }
39
54
 
55
+ :host(.tag-violet.tag-violet-contrast) {
56
+ color: var(--road-on-primary);
57
+ background-color: var(--road-violet-electric-60);
58
+ }
59
+
40
60
  :host(.tag-blue) {
41
61
  color: var(--road-blue-klein-40);
42
62
  background-color: var(--road-blue-klein-95);
43
63
  }
44
64
 
65
+ :host(.tag-blue.tag-blue-contrast) {
66
+ color: var(--road-on-primary);
67
+ background-color: var(--road-blue-klein-60);
68
+ }
69
+
45
70
  :host(.tag-green) {
46
71
  color: var(--road-green-monstera-30);
47
72
  background-color: var(--road-green-monstera-95);
48
73
  }
49
74
 
75
+ :host(.tag-green.tag-green-contrast) {
76
+ color: var(--road-on-primary);
77
+ background-color: var(--road-green-monstera-60);
78
+ }
50
79
 
51
80
  /**
52
81
  * Hover state
@@ -9,9 +9,14 @@ export class Tag {
9
9
  * The color to use from your application's color palette.
10
10
  */
11
11
  this.color = 'grey';
12
+ /**
13
+ * Set to `true` for a contrast tag, for example on a gryy surface
14
+ */
15
+ this.contrast = false;
12
16
  }
13
17
  render() {
14
- return (h(Host, { class: `tag-${this.color}` }, h("slot", null)));
18
+ const contrastClass = this.contrast ? `tag-${this.color} tag-${this.color}-contrast` : `tag-${this.color}`;
19
+ return (h(Host, { class: `${contrastClass}` }, h("slot", null)));
15
20
  }
16
21
  static get is() { return "road-tag"; }
17
22
  static get encapsulation() { return "shadow"; }
@@ -44,6 +49,24 @@ export class Tag {
44
49
  "attribute": "color",
45
50
  "reflect": false,
46
51
  "defaultValue": "'grey'"
52
+ },
53
+ "contrast": {
54
+ "type": "boolean",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "boolean",
58
+ "resolved": "boolean",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": false,
63
+ "docs": {
64
+ "tags": [],
65
+ "text": "Set to `true` for a contrast tag, for example on a gryy surface"
66
+ },
67
+ "attribute": "contrast",
68
+ "reflect": false,
69
+ "defaultValue": "false"
47
70
  }
48
71
  };
49
72
  }
@@ -20,6 +20,9 @@ export default {
20
20
  type: 'select',
21
21
  },
22
22
  },
23
+ contrast: {
24
+ control: 'boolean',
25
+ },
23
26
  },
24
27
  args: {
25
28
  ' ': `Label`,
@@ -28,7 +31,7 @@ export default {
28
31
 
29
32
  const Template = (args) => html`
30
33
  <road-tag
31
- color="${ifDefined(args.color)}"
34
+ color="${ifDefined(args.color)}" contrast="${ifDefined(args.contrast)}"
32
35
  >
33
36
  ${unsafeHTML(args[' '])}
34
37
  </road-tag>
@@ -38,4 +41,10 @@ export const Color = Template.bind({});
38
41
  Color.args = {
39
42
  color: 'grey',
40
43
  ' ': `Reset`,
44
+ };
45
+
46
+ export const Contrast = Template.bind({});
47
+ Contrast.args = {
48
+ color: 'grey',
49
+ contrast: true,
41
50
  };
@@ -109,6 +109,10 @@
109
109
  line-height: 1.5;
110
110
  }
111
111
 
112
+ .textarea-control.no-resize {
113
+ resize: none;
114
+ }
115
+
112
116
  /* LABEL
113
117
  -------------------- */
114
118
 
@@ -37,6 +37,10 @@ export class Textarea {
37
37
  * If `true`, the element will have its spelling and grammar checked.
38
38
  */
39
39
  this.spellcheck = false;
40
+ /**
41
+ * If `false`, to disabled resize.
42
+ */
43
+ this.resize = true;
40
44
  /**
41
45
  * The value of the textarea.
42
46
  */
@@ -76,8 +80,9 @@ export class Textarea {
76
80
  const value = this.getValue();
77
81
  const labelId = this.textareaId + '-label';
78
82
  const hasValueClass = this.value !== '' ? 'has-value' : '';
83
+ const noResizeClass = this.resize == false ? 'no-resize' : '';
79
84
  const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
80
- return (h(Host, { "aria-disabled": this.disabled ? 'true' : null, class: this.sizes && `input-${this.sizes}` }, h("textarea", { class: `form-control textarea-control ${hasValueClass} ${isInvalidClass}`, id: this.textareaId, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, maxLength: this.maxlength, minLength: this.minlength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, value: value, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus }), h("label", { class: "form-label", id: labelId, htmlFor: this.textareaId }, this.label), this.error && this.error !== '' && h("p", { class: "invalid-feedback" }, this.error), this.helper && this.helper !== '' && h("p", { class: "helper" }, this.helper)));
85
+ return (h(Host, { "aria-disabled": this.disabled ? 'true' : null, class: this.sizes && `input-${this.sizes}` }, h("textarea", { class: `form-control textarea-control ${hasValueClass} ${noResizeClass} ${isInvalidClass}`, id: this.textareaId, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, maxLength: this.maxlength, minLength: this.minlength, name: this.name, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, value: value, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus }), h("label", { class: "form-label", id: labelId, htmlFor: this.textareaId }, this.label), this.error && this.error !== '' && h("p", { class: "invalid-feedback" }, this.error), this.helper && this.helper !== '' && h("p", { class: "helper" }, this.helper)));
81
86
  }
82
87
  static get is() { return "road-textarea"; }
83
88
  static get encapsulation() { return "scoped"; }
@@ -340,6 +345,24 @@ export class Textarea {
340
345
  "reflect": false,
341
346
  "defaultValue": "false"
342
347
  },
348
+ "resize": {
349
+ "type": "boolean",
350
+ "mutable": false,
351
+ "complexType": {
352
+ "original": "boolean",
353
+ "resolved": "boolean",
354
+ "references": {}
355
+ },
356
+ "required": false,
357
+ "optional": false,
358
+ "docs": {
359
+ "tags": [],
360
+ "text": "If `false`, to disabled resize."
361
+ },
362
+ "attribute": "resize",
363
+ "reflect": false,
364
+ "defaultValue": "true"
365
+ },
343
366
  "cols": {
344
367
  "type": "number",
345
368
  "mutable": false,
@@ -25,6 +25,9 @@ export default {
25
25
  spellcheck: {
26
26
  control: 'boolean',
27
27
  },
28
+ resize: {
29
+ control: 'boolean',
30
+ },
28
31
  error: {
29
32
  control: 'text',
30
33
  },
@@ -143,6 +146,7 @@ const Template = (args) => html`
143
146
  sizes="${ifDefined(args.sizes)}"
144
147
  value="${ifDefined(args.value)}"
145
148
  spellcheck="${ifDefined(args.spellcheck)}"
149
+ resize="${ifDefined(args.resize)}"
146
150
  placeholder="${ifDefined(args.placeholder)}"
147
151
  autocapitalize="${ifDefined(args.autocapitalize)}"
148
152
  enterkeyhint="${ifDefined(args.enterkeyhint)}"
@@ -168,6 +172,11 @@ Disabled.args = {
168
172
  disabled: true,
169
173
  };
170
174
 
175
+ export const noResize = Template.bind({});
176
+ noResize.args = {
177
+ resize: false,
178
+ };
179
+
171
180
  export const Error = Template.bind({});
172
181
  Error.args = {
173
182
  error: 'This field is required',
@@ -1,4 +1,4 @@
1
- import { s as setMode } from './index-a99a5e7b.js';
1
+ import { s as setMode } from './index-3648a167.js';
2
2
 
3
3
  setMode(elm => {
4
4
  return elm.mode || elm.getAttribute('mode') || 'light';
@@ -34,6 +34,13 @@ const uniqueTime = (key, measureText) => {
34
34
  };
35
35
  }
36
36
  };
37
+ const CONTENT_REF_ID = 'r';
38
+ const ORG_LOCATION_ID = 'o';
39
+ const SLOT_NODE_ID = 's';
40
+ const TEXT_NODE_ID = 't';
41
+ const HYDRATE_ID = 's-id';
42
+ const HYDRATED_STYLE_ID = 'sty-id';
43
+ const HYDRATE_CHILD_ID = 'c-id';
37
44
  const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
38
45
  const XLINK_NS = 'http://www.w3.org/1999/xlink';
39
46
  /**
@@ -184,6 +191,211 @@ const convertToPrivate = (node) => {
184
191
  vnode.$name$ = node.vname;
185
192
  return vnode;
186
193
  };
194
+ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
195
+ const endHydrate = createTime('hydrateClient', tagName);
196
+ const shadowRoot = hostElm.shadowRoot;
197
+ const childRenderNodes = [];
198
+ const slotNodes = [];
199
+ const shadowRootNodes = shadowRoot ? [] : null;
200
+ const vnode = (hostRef.$vnode$ = newVNode(tagName, null));
201
+ if (!plt.$orgLocNodes$) {
202
+ initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));
203
+ }
204
+ hostElm[HYDRATE_ID] = hostId;
205
+ hostElm.removeAttribute(HYDRATE_ID);
206
+ clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
207
+ childRenderNodes.map((c) => {
208
+ const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
209
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
210
+ const node = c.$elm$;
211
+ if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
212
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
213
+ }
214
+ if (!shadowRoot) {
215
+ node['s-hn'] = tagName;
216
+ if (orgLocationNode) {
217
+ node['s-ol'] = orgLocationNode;
218
+ node['s-ol']['s-nr'] = node;
219
+ }
220
+ }
221
+ plt.$orgLocNodes$.delete(orgLocationId);
222
+ });
223
+ if (shadowRoot) {
224
+ shadowRootNodes.map((shadowRootNode) => {
225
+ if (shadowRootNode) {
226
+ shadowRoot.appendChild(shadowRootNode);
227
+ }
228
+ });
229
+ }
230
+ endHydrate();
231
+ };
232
+ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
233
+ let childNodeType;
234
+ let childIdSplt;
235
+ let childVNode;
236
+ let i;
237
+ if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
238
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
239
+ if (childNodeType) {
240
+ // got the node data from the element's attribute
241
+ // `${hostId}.${nodeId}.${depth}.${index}`
242
+ childIdSplt = childNodeType.split('.');
243
+ if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {
244
+ childVNode = {
245
+ $flags$: 0,
246
+ $hostId$: childIdSplt[0],
247
+ $nodeId$: childIdSplt[1],
248
+ $depth$: childIdSplt[2],
249
+ $index$: childIdSplt[3],
250
+ $tag$: node.tagName.toLowerCase(),
251
+ $elm$: node,
252
+ $attrs$: null,
253
+ $children$: null,
254
+ $key$: null,
255
+ $name$: null,
256
+ $text$: null,
257
+ };
258
+ childRenderNodes.push(childVNode);
259
+ node.removeAttribute(HYDRATE_CHILD_ID);
260
+ // this is a new child vnode
261
+ // so ensure its parent vnode has the vchildren array
262
+ if (!parentVNode.$children$) {
263
+ parentVNode.$children$ = [];
264
+ }
265
+ // add our child vnode to a specific index of the vnode's children
266
+ parentVNode.$children$[childVNode.$index$] = childVNode;
267
+ // this is now the new parent vnode for all the next child checks
268
+ parentVNode = childVNode;
269
+ if (shadowRootNodes && childVNode.$depth$ === '0') {
270
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
271
+ }
272
+ }
273
+ }
274
+ // recursively drill down, end to start so we can remove nodes
275
+ for (i = node.childNodes.length - 1; i >= 0; i--) {
276
+ clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);
277
+ }
278
+ if (node.shadowRoot) {
279
+ // keep drilling down through the shadow root nodes
280
+ for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {
281
+ clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);
282
+ }
283
+ }
284
+ }
285
+ else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
286
+ // `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`
287
+ childIdSplt = node.nodeValue.split('.');
288
+ if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {
289
+ // comment node for either the host id or a 0 host id
290
+ childNodeType = childIdSplt[0];
291
+ childVNode = {
292
+ $flags$: 0,
293
+ $hostId$: childIdSplt[1],
294
+ $nodeId$: childIdSplt[2],
295
+ $depth$: childIdSplt[3],
296
+ $index$: childIdSplt[4],
297
+ $elm$: node,
298
+ $attrs$: null,
299
+ $children$: null,
300
+ $key$: null,
301
+ $name$: null,
302
+ $tag$: null,
303
+ $text$: null,
304
+ };
305
+ if (childNodeType === TEXT_NODE_ID) {
306
+ childVNode.$elm$ = node.nextSibling;
307
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* NODE_TYPE.TextNode */) {
308
+ childVNode.$text$ = childVNode.$elm$.textContent;
309
+ childRenderNodes.push(childVNode);
310
+ // remove the text comment since it's no longer needed
311
+ node.remove();
312
+ if (!parentVNode.$children$) {
313
+ parentVNode.$children$ = [];
314
+ }
315
+ parentVNode.$children$[childVNode.$index$] = childVNode;
316
+ if (shadowRootNodes && childVNode.$depth$ === '0') {
317
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
318
+ }
319
+ }
320
+ }
321
+ else if (childVNode.$hostId$ === hostId) {
322
+ // this comment node is specifcally for this host id
323
+ if (childNodeType === SLOT_NODE_ID) {
324
+ // `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;
325
+ childVNode.$tag$ = 'slot';
326
+ if (childIdSplt[5]) {
327
+ node['s-sn'] = childVNode.$name$ = childIdSplt[5];
328
+ }
329
+ else {
330
+ node['s-sn'] = '';
331
+ }
332
+ node['s-sr'] = true;
333
+ if (shadowRootNodes) {
334
+ // browser support shadowRoot and this is a shadow dom component
335
+ // create an actual slot element
336
+ childVNode.$elm$ = doc.createElement(childVNode.$tag$);
337
+ if (childVNode.$name$) {
338
+ // add the slot name attribute
339
+ childVNode.$elm$.setAttribute('name', childVNode.$name$);
340
+ }
341
+ // insert the new slot element before the slot comment
342
+ node.parentNode.insertBefore(childVNode.$elm$, node);
343
+ // remove the slot comment since it's not needed for shadow
344
+ node.remove();
345
+ if (childVNode.$depth$ === '0') {
346
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
347
+ }
348
+ }
349
+ slotNodes.push(childVNode);
350
+ if (!parentVNode.$children$) {
351
+ parentVNode.$children$ = [];
352
+ }
353
+ parentVNode.$children$[childVNode.$index$] = childVNode;
354
+ }
355
+ else if (childNodeType === CONTENT_REF_ID) {
356
+ // `${CONTENT_REF_ID}.${hostId}`;
357
+ if (shadowRootNodes) {
358
+ // remove the content ref comment since it's not needed for shadow
359
+ node.remove();
360
+ }
361
+ else {
362
+ hostElm['s-cr'] = node;
363
+ node['s-cn'] = true;
364
+ }
365
+ }
366
+ }
367
+ }
368
+ }
369
+ else if (parentVNode && parentVNode.$tag$ === 'style') {
370
+ const vnode = newVNode(null, node.textContent);
371
+ vnode.$elm$ = node;
372
+ vnode.$index$ = '0';
373
+ parentVNode.$children$ = [vnode];
374
+ }
375
+ };
376
+ const initializeDocumentHydrate = (node, orgLocNodes) => {
377
+ if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
378
+ let i = 0;
379
+ for (; i < node.childNodes.length; i++) {
380
+ initializeDocumentHydrate(node.childNodes[i], orgLocNodes);
381
+ }
382
+ if (node.shadowRoot) {
383
+ for (i = 0; i < node.shadowRoot.childNodes.length; i++) {
384
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);
385
+ }
386
+ }
387
+ }
388
+ else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
389
+ const childIdSplt = node.nodeValue.split('.');
390
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
391
+ orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);
392
+ node.nodeValue = '';
393
+ // useful to know if the original location is
394
+ // the root light-dom of a shadow dom component
395
+ node['s-en'] = childIdSplt[3];
396
+ }
397
+ }
398
+ };
187
399
  // Private
188
400
  const computeMode = (elm) => modeResolutionChain.map((h) => h(elm)).find((m) => !!m);
189
401
  // Public
@@ -293,7 +505,12 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
293
505
  rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
294
506
  }
295
507
  if (!appliedStyles.has(scopeId)) {
296
- {
508
+ if (styleContainerNode.host &&
509
+ (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
510
+ // This is only happening on native shadow-dom, do not needs CSS var shim
511
+ styleElm.innerHTML = style;
512
+ }
513
+ else {
297
514
  if (plt.$cssShim$) {
298
515
  styleElm = plt.$cssShim$.createHostStyle(hostElm, scopeId, style, !!(cmpMeta.$flags$ & 10 /* CMP_FLAGS.needsScopedEncapsulation */));
299
516
  const newScopeId = styleElm['s-sc'];
@@ -345,6 +562,7 @@ const attachStyles = (hostRef) => {
345
562
  endAttachStyles();
346
563
  };
347
564
  const getScopeId = (cmp, mode) => 'sc-' + (mode && cmp.$flags$ & 32 /* CMP_FLAGS.hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);
565
+ const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
348
566
  /**
349
567
  * Production setAccessor() function based on Preact by
350
568
  * Jason Miller (@developit)
@@ -1699,7 +1917,19 @@ const connectedCallback = (elm) => {
1699
1917
  if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1700
1918
  // first time this component has connected
1701
1919
  hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1920
+ let hostId;
1702
1921
  {
1922
+ hostId = elm.getAttribute(HYDRATE_ID);
1923
+ if (hostId) {
1924
+ if (supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
1925
+ const scopeId = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode'))
1926
+ ;
1927
+ elm.classList.remove(scopeId + '-h', scopeId + '-s');
1928
+ }
1929
+ initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
1930
+ }
1931
+ }
1932
+ if (!hostId) {
1703
1933
  // initUpdate
1704
1934
  // if the slot polyfill is required we'll need to put some nodes
1705
1935
  // in here to act as original content anchors as we move nodes around
@@ -1715,7 +1945,10 @@ const connectedCallback = (elm) => {
1715
1945
  while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1716
1946
  // climb up the ancestors looking for the first
1717
1947
  // component that hasn't finished its lifecycle update yet
1718
- if (ancestorComponent['s-p']) {
1948
+ if ((ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
1949
+ ancestorComponent.hasAttribute('s-id') &&
1950
+ ancestorComponent['s-p']) ||
1951
+ ancestorComponent['s-p']) {
1719
1952
  // we found this components first ancestor component
1720
1953
  // keep a reference to this component's ancestor component
1721
1954
  attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
@@ -1788,10 +2021,22 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1788
2021
  const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1789
2022
  const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1790
2023
  const deferredConnectedCallbacks = [];
2024
+ const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1791
2025
  let appLoadFallback;
1792
2026
  let isBootstrapping = true;
2027
+ let i = 0;
1793
2028
  Object.assign(plt, options);
1794
2029
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
2030
+ {
2031
+ // If the app is already hydrated there is not point to disable the
2032
+ // async queue. This will improve the first input delay
2033
+ plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;
2034
+ }
2035
+ {
2036
+ for (; i < styles.length; i++) {
2037
+ registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
2038
+ }
2039
+ }
1795
2040
  lazyBundles.map((lazyBundle) => {
1796
2041
  lazyBundle[1].map((compactMeta) => {
1797
2042
  const cmpMeta = {
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { a as addIcons } from './utils-0ec32b47.js';
2
- import './index-a99a5e7b.js';
1
+ export { a as addIcons } from './utils-4fb81650.js';
2
+ import './index-3648a167.js';