@rededor/cura 0.5.0 → 0.5.2

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 (221) hide show
  1. package/dist/cjs/{app-globals-0e3b7fc6.js → app-globals-2988084b.js} +5 -5
  2. package/dist/cjs/app-globals-2988084b.js.map +1 -0
  3. package/dist/cjs/cura-accordion_8.cjs.entry.js +452 -0
  4. package/dist/cjs/cura-accordion_8.cjs.entry.js.map +1 -0
  5. package/dist/cjs/cura-button-outline.cjs.entry.js +83 -0
  6. package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -0
  7. package/dist/cjs/cura-button-transparent.cjs.entry.js +83 -0
  8. package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -0
  9. package/dist/cjs/cura-display.cjs.entry.js +74 -0
  10. package/dist/cjs/cura-display.cjs.entry.js.map +1 -0
  11. package/dist/cjs/cura-icons-view.cjs.entry.js +29 -0
  12. package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -0
  13. package/dist/cjs/cura-label.cjs.entry.js +69 -0
  14. package/dist/cjs/cura-label.cjs.entry.js.map +1 -0
  15. package/dist/cjs/cura.cjs.js +3 -3
  16. package/dist/cjs/{index-72217b50.js → index-404d93e9.js} +247 -3
  17. package/dist/cjs/index-404d93e9.js.map +1 -0
  18. package/dist/cjs/index.cjs.js +7 -0
  19. package/dist/cjs/index.cjs.js.map +1 -1
  20. package/dist/cjs/loader.cjs.js +3 -3
  21. package/dist/collection/api/cura-api.type.js.map +1 -1
  22. package/dist/collection/api/modules/cura-theme-breakpoints-module.js +1 -1
  23. package/dist/collection/api/modules/cura-theme-breakpoints-module.js.map +1 -1
  24. package/dist/collection/api/modules/cura-theme-colors-module.js +1 -1
  25. package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -1
  26. package/dist/collection/api/theme-presets/static.js +2 -2
  27. package/dist/collection/api/theme-presets/static.js.map +1 -1
  28. package/dist/collection/collection-manifest.json +1 -0
  29. package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js +1 -1
  30. package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js.map +1 -1
  31. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +10 -6
  32. package/dist/collection/components/buttons/cura-button/cura-button.js +4 -3
  33. package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
  34. package/dist/collection/components/buttons/cura-button/cura-button.stories.js +1 -1
  35. package/dist/collection/components/buttons/cura-button/cura-button.stories.js.map +1 -1
  36. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +4 -3
  37. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
  38. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js +1 -1
  39. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map +1 -1
  40. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +4 -3
  41. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
  42. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js +1 -1
  43. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js.map +1 -1
  44. package/dist/collection/components/cura-icon/cura-icon.stories.js +1 -1
  45. package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -1
  46. package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js +1 -1
  47. package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js.map +1 -1
  48. package/dist/collection/components/cura-page-template/cura-page-template.css +13 -9
  49. package/dist/collection/components/forms/cura-label/cura-label.css +70 -0
  50. package/dist/collection/components/forms/cura-label/cura-label.js +190 -0
  51. package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -0
  52. package/dist/collection/components/forms/cura-label/cura-label.stories.js +137 -0
  53. package/dist/collection/components/forms/cura-label/cura-label.stories.js.map +1 -0
  54. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js +1 -1
  55. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js.map +1 -1
  56. package/dist/collection/components/text/cura-display/cura-display.css +21 -38
  57. package/dist/collection/components/text/cura-display/cura-display.js +80 -49
  58. package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
  59. package/dist/collection/components/text/cura-display/cura-display.stories.js +79 -34
  60. package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -1
  61. package/dist/collection/components/text/cura-heading/cura-heading.css +50 -24
  62. package/dist/collection/components/text/cura-heading/cura-heading.js +94 -39
  63. package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
  64. package/dist/collection/components/text/cura-heading/cura-heading.stories.js +93 -37
  65. package/dist/collection/components/text/cura-heading/cura-heading.stories.js.map +1 -1
  66. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +37 -38
  67. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +62 -41
  68. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
  69. package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +79 -47
  70. package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -1
  71. package/dist/collection/index.js +3 -1
  72. package/dist/collection/index.js.map +1 -1
  73. package/dist/components/cura-accordion-item.js +1 -1
  74. package/dist/components/cura-accordion-item.js.map +1 -1
  75. package/dist/components/cura-button-outline.js +1 -1
  76. package/dist/components/cura-button-outline.js.map +1 -1
  77. package/dist/components/cura-button-transparent.js +1 -1
  78. package/dist/components/cura-button-transparent.js.map +1 -1
  79. package/dist/components/cura-button.js +1 -1
  80. package/dist/components/cura-button.js.map +1 -1
  81. package/dist/components/cura-display.js +41 -35
  82. package/dist/components/cura-display.js.map +1 -1
  83. package/dist/components/cura-heading.js +34 -21
  84. package/dist/components/cura-heading.js.map +1 -1
  85. package/dist/components/cura-label.d.ts +11 -0
  86. package/dist/components/cura-label.js +91 -0
  87. package/dist/components/cura-label.js.map +1 -0
  88. package/dist/components/cura-page-template.js +1 -1
  89. package/dist/components/cura-page-template.js.map +1 -1
  90. package/dist/components/cura-paragraph.js +25 -23
  91. package/dist/components/cura-paragraph.js.map +1 -1
  92. package/dist/components/index.js +11 -5
  93. package/dist/components/index.js.map +1 -1
  94. package/dist/cura/cura.esm.js +1 -1
  95. package/dist/cura/cura.esm.js.map +1 -1
  96. package/dist/cura/cura.js +1 -1
  97. package/dist/cura/index.esm.js +1 -1
  98. package/dist/cura/index.esm.js.map +1 -1
  99. package/dist/cura/p-03047b3e.entry.js +2 -0
  100. package/dist/cura/p-03047b3e.entry.js.map +1 -0
  101. package/dist/cura/p-0c79c54e.entry.js +2 -0
  102. package/dist/cura/p-0c79c54e.entry.js.map +1 -0
  103. package/dist/cura/p-120926c5.system.js +2 -0
  104. package/dist/cura/p-120926c5.system.js.map +1 -0
  105. package/dist/cura/p-223924fb.system.entry.js +2 -0
  106. package/dist/cura/p-223924fb.system.entry.js.map +1 -0
  107. package/dist/cura/p-46d20db3.js +3 -0
  108. package/dist/cura/p-46d20db3.js.map +1 -0
  109. package/dist/cura/p-48426f60.system.js +2 -0
  110. package/dist/cura/p-48426f60.system.js.map +1 -0
  111. package/dist/cura/p-49813052.entry.js +2 -0
  112. package/dist/cura/p-49813052.entry.js.map +1 -0
  113. package/dist/cura/p-4bdbcdf0.system.entry.js +2 -0
  114. package/dist/cura/p-4bdbcdf0.system.entry.js.map +1 -0
  115. package/dist/cura/p-7c8f3c77.system.entry.js +2 -0
  116. package/dist/cura/p-7c8f3c77.system.entry.js.map +1 -0
  117. package/dist/cura/p-8b18b5f7.system.js +2 -0
  118. package/dist/cura/p-8b18b5f7.system.js.map +1 -0
  119. package/dist/cura/p-91b0f78e.entry.js +2 -0
  120. package/dist/cura/p-91b0f78e.entry.js.map +1 -0
  121. package/dist/cura/p-a0395f90.entry.js +2 -0
  122. package/dist/cura/p-a0395f90.entry.js.map +1 -0
  123. package/dist/cura/p-a7ef255f.entry.js +2 -0
  124. package/dist/cura/p-a7ef255f.entry.js.map +1 -0
  125. package/dist/cura/p-c0c00396.system.js +3 -0
  126. package/dist/cura/p-c0c00396.system.js.map +1 -0
  127. package/dist/cura/p-ca054b07.system.entry.js +2 -0
  128. package/dist/cura/p-ca054b07.system.entry.js.map +1 -0
  129. package/dist/cura/p-d47b9cfe.system.entry.js +2 -0
  130. package/dist/cura/p-d47b9cfe.system.entry.js.map +1 -0
  131. package/dist/cura/p-f8fffdc1.js +2 -0
  132. package/dist/cura/p-f8fffdc1.js.map +1 -0
  133. package/dist/cura/p-fc77814b.system.entry.js +2 -0
  134. package/dist/cura/p-fc77814b.system.entry.js.map +1 -0
  135. package/dist/esm/{app-globals-cc003eaf.js → app-globals-29001758.js} +5 -5
  136. package/dist/esm/app-globals-29001758.js.map +1 -0
  137. package/dist/esm/cura-accordion_8.entry.js +441 -0
  138. package/dist/esm/cura-accordion_8.entry.js.map +1 -0
  139. package/dist/esm/cura-button-outline.entry.js +79 -0
  140. package/dist/esm/cura-button-outline.entry.js.map +1 -0
  141. package/dist/esm/cura-button-transparent.entry.js +79 -0
  142. package/dist/esm/cura-button-transparent.entry.js.map +1 -0
  143. package/dist/esm/cura-display.entry.js +70 -0
  144. package/dist/esm/cura-display.entry.js.map +1 -0
  145. package/dist/esm/cura-icons-view.entry.js +25 -0
  146. package/dist/esm/cura-icons-view.entry.js.map +1 -0
  147. package/dist/esm/cura-label.entry.js +65 -0
  148. package/dist/esm/cura-label.entry.js.map +1 -0
  149. package/dist/esm/cura.js +4 -4
  150. package/dist/esm/{index-9af0cdbd.js → index-d99da69e.js} +247 -3
  151. package/dist/esm/index-d99da69e.js.map +1 -0
  152. package/dist/esm/index.js +4 -0
  153. package/dist/esm/index.js.map +1 -1
  154. package/dist/esm/loader.js +4 -4
  155. package/dist/esm-es5/app-globals-29001758.js +2 -0
  156. package/dist/esm-es5/app-globals-29001758.js.map +1 -0
  157. package/dist/esm-es5/cura-accordion_8.entry.js +2 -0
  158. package/dist/esm-es5/cura-accordion_8.entry.js.map +1 -0
  159. package/dist/esm-es5/cura-button-outline.entry.js +2 -0
  160. package/dist/esm-es5/cura-button-outline.entry.js.map +1 -0
  161. package/dist/esm-es5/cura-button-transparent.entry.js +2 -0
  162. package/dist/esm-es5/cura-button-transparent.entry.js.map +1 -0
  163. package/dist/esm-es5/cura-display.entry.js +2 -0
  164. package/dist/esm-es5/cura-display.entry.js.map +1 -0
  165. package/dist/esm-es5/cura-icons-view.entry.js +2 -0
  166. package/dist/esm-es5/cura-icons-view.entry.js.map +1 -0
  167. package/dist/esm-es5/cura-label.entry.js +2 -0
  168. package/dist/esm-es5/cura-label.entry.js.map +1 -0
  169. package/dist/esm-es5/cura.js +1 -1
  170. package/dist/esm-es5/cura.js.map +1 -1
  171. package/dist/esm-es5/index-d99da69e.js +3 -0
  172. package/dist/esm-es5/index-d99da69e.js.map +1 -0
  173. package/dist/esm-es5/index.js +1 -1
  174. package/dist/esm-es5/index.js.map +1 -1
  175. package/dist/esm-es5/loader.js +1 -1
  176. package/dist/esm-es5/loader.js.map +1 -1
  177. package/dist/types/api/cura-api.type.d.ts +1 -0
  178. package/dist/types/components/buttons/cura-button/cura-button.d.ts +1 -1
  179. package/dist/types/components/buttons/cura-button-outline/cura-button-outline.d.ts +1 -1
  180. package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.d.ts +1 -1
  181. package/dist/types/components/forms/cura-label/cura-label.d.ts +54 -0
  182. package/dist/types/components/forms/cura-label/cura-label.stories.d.ts +126 -0
  183. package/dist/types/components/text/cura-display/cura-display.d.ts +29 -18
  184. package/dist/types/components/text/cura-display/cura-display.stories.d.ts +52 -14
  185. package/dist/types/components/text/cura-heading/cura-heading.d.ts +34 -17
  186. package/dist/types/components/text/cura-heading/cura-heading.stories.d.ts +58 -6
  187. package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +24 -12
  188. package/dist/types/components/text/cura-paragraph/cura-paragraph.stories.d.ts +47 -9
  189. package/dist/types/components.d.ts +145 -52
  190. package/dist/types/index.d.ts +9 -0
  191. package/package.json +2 -4
  192. package/dist/cjs/app-globals-0e3b7fc6.js.map +0 -1
  193. package/dist/cjs/cura-accordion_12.cjs.entry.js +0 -674
  194. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +0 -1
  195. package/dist/cjs/index-72217b50.js.map +0 -1
  196. package/dist/cura/p-2cbf52f1.js +0 -3
  197. package/dist/cura/p-2cbf52f1.js.map +0 -1
  198. package/dist/cura/p-4cdbc8a1.system.entry.js +0 -2
  199. package/dist/cura/p-4cdbc8a1.system.entry.js.map +0 -1
  200. package/dist/cura/p-50ea2036.system.js +0 -2
  201. package/dist/cura/p-50ea2036.system.js.map +0 -1
  202. package/dist/cura/p-788e035b.system.js +0 -2
  203. package/dist/cura/p-788e035b.system.js.map +0 -1
  204. package/dist/cura/p-8da635b7.system.js +0 -3
  205. package/dist/cura/p-8da635b7.system.js.map +0 -1
  206. package/dist/cura/p-c54ce246.entry.js +0 -2
  207. package/dist/cura/p-c54ce246.entry.js.map +0 -1
  208. package/dist/cura/p-d5c64a5f.js +0 -2
  209. package/dist/cura/p-d5c64a5f.js.map +0 -1
  210. package/dist/cura/p-f4232daa.system.js +0 -2
  211. package/dist/cura/p-f4232daa.system.js.map +0 -1
  212. package/dist/esm/app-globals-cc003eaf.js.map +0 -1
  213. package/dist/esm/cura-accordion_12.entry.js +0 -659
  214. package/dist/esm/cura-accordion_12.entry.js.map +0 -1
  215. package/dist/esm/index-9af0cdbd.js.map +0 -1
  216. package/dist/esm-es5/app-globals-cc003eaf.js +0 -2
  217. package/dist/esm-es5/app-globals-cc003eaf.js.map +0 -1
  218. package/dist/esm-es5/cura-accordion_12.entry.js +0 -2
  219. package/dist/esm-es5/cura-accordion_12.entry.js.map +0 -1
  220. package/dist/esm-es5/index-9af0cdbd.js +0 -3
  221. package/dist/esm-es5/index-9af0cdbd.js.map +0 -1
@@ -0,0 +1,69 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-404d93e9.js');
6
+
7
+ const curaLabelCss = ":host{display:block;font-size:var(--font-size-base)}:host p{font-family:var(--font-family);font-size:1.143em;font-weight:var(--font-weight-medium);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0.32px}:host p.bold-weight,:host p ::slotted(b),:host p ::slotted(strong),:host p ::slotted(u){font-weight:var(--font-weight-bold)}:host p.large{font-size:1.357em;line-height:calc(var(--line-height) - 4%);letter-spacing:0px}:host p.small{font-size:1em;line-height:calc(var(--line-height) - 4%);letter-spacing:0.56px}:host p.xsmall{font-size:0.857em;line-height:calc(var(--line-height) - 17%);letter-spacing:0.72px}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%}:host ::slotted(u){text-underline-offset:10%}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";
8
+
9
+ const CuraLabel = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.theme = window.CuraAPI.theme;
13
+ this.size = 'medium';
14
+ this.weight = 'regular';
15
+ this.spotColor = 'accent-dark';
16
+ this.color = undefined;
17
+ this.marginBlock = '0';
18
+ this.lineHeight = '125%';
19
+ this.styles = {};
20
+ }
21
+ handleChangeColor() {
22
+ this.setColors();
23
+ }
24
+ connectedCallback() {
25
+ this.setFontProperties();
26
+ this.setColors();
27
+ }
28
+ getClasses() {
29
+ const sizeclass = {};
30
+ sizeclass[this.size.toLowerCase()] = true;
31
+ sizeclass[`${this.weight.toLowerCase()}-weight`] = true;
32
+ return sizeclass;
33
+ }
34
+ setFontProperties() {
35
+ this.weights = this.theme.fonts.getWeights();
36
+ this.fontSizeBase = this.theme.fonts.getSize();
37
+ this.styles = {
38
+ '--font-family': this.theme.fonts.getFamily('body'),
39
+ '--font-weight-medium': this.weights.medium,
40
+ '--font-weight-bold': this.weights.bold
41
+ };
42
+ }
43
+ setColors() {
44
+ const fontColor = this.color
45
+ ? this.theme.colors.getColor(this.color)
46
+ : this.theme.fonts.getColor();
47
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'), '--color-link': this.theme.colors.getColor(`${this.spotColor}`) });
48
+ }
49
+ hostCSSProperties() {
50
+ return {
51
+ '--margin-block': this.marginBlock,
52
+ '--font-size-base': this.fontSizeBase,
53
+ '--line-height': this.lineHeight
54
+ };
55
+ }
56
+ render() {
57
+ return (index.h(index.Host, { style: this.hostCSSProperties() }, index.h("p", { style: this.styles, class: this.getClasses() }, index.h("slot", null))));
58
+ }
59
+ get host() { return index.getElement(this); }
60
+ static get watchers() { return {
61
+ "color": ["handleChangeColor"],
62
+ "spotColor": ["handleChangeColor"]
63
+ }; }
64
+ };
65
+ CuraLabel.style = curaLabelCss;
66
+
67
+ exports.cura_label = CuraLabel;
68
+
69
+ //# sourceMappingURL=cura-label.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"cura-label.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,6/BAA6/B;;MCOrgC,SAAS;;;IAsDpB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;gBAhD0C,QAAQ;kBAM3B,SAAS;qBAM1B,aAAa;;uBAiBX,GAAG;sBAMJ,MAAM;kBAYxB,EAAE;;EA1BpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;GAClB;EA2BD,iBAAiB;IACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACzB,IAAI,CAAC,SAAS,EAAE,CAAC;GAClB;EAED,UAAU;IACR,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;IAC1C,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC;IACxD,OAAO,SAAS,CAAC;GAClB;EAED,iBAAiB;IACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IAC7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IAC/C,IAAI,CAAC,MAAM,GAAG;MACZ,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;MACnD,sBAAsB,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;MAC3C,oBAAoB,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;KACxC,CAAC;GACH;EAED,SAAS;IACP,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK;QACxB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;QACtC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAChC,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,cAAc,EAAE,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EACzE,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,GAChE,CAAC;GACH;EAED,iBAAiB;IACf,OAAO;MACL,gBAAgB,EAAE,IAAI,CAAC,WAAW;MAClC,kBAAkB,EAAE,IAAI,CAAC,YAAY;MACrC,eAAe,EAAE,IAAI,CAAC,UAAU;KACjC,CAAC;GACH;EAED,MAAM;IACJ,QACEA,QAACC,UAAI,IAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,IACnCD,eAAG,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAC7CA,qBAAa,CACX,CACC,EACP;GACH;;;;;;;;;;;","names":["h","Host"],"sources":["./src/components/forms/cura-label/cura-label.scss?tag=cura-label&encapsulation=shadow","./src/components/forms/cura-label/cura-label.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n font-size: var(--font-size-base);\n\n p {\n font-family: var(--font-family);\n font-size: 1.143em;\n font-weight: var(--font-weight-medium);\n color: var(--color-body);\n line-height: var(--line-height);\n margin-block: var(--margin-block);\n letter-spacing: 0.32px;\n\n &.bold-weight, ::slotted(b), ::slotted(strong), ::slotted(u) {\n font-weight: var(--font-weight-bold);\n }\n\n &.large {\n font-size: 1.357em;\n line-height: calc(var(--line-height) - 4%);\n letter-spacing: 0px;\n }\n\n &.small {\n font-size: 1em;\n line-height: calc(var(--line-height) - 4%);\n letter-spacing: 0.56px;\n }\n\n &.xsmall {\n font-size: 0.857em;\n line-height: calc(var(--line-height) - 17%);\n letter-spacing: 0.72px;\n }\n }\n\n ::slotted(a) {\n font-weight: var(--font-weight-bold);\n color: var(--color-link);\n text-underline-offset: 10%;\n }\n\n ::slotted(u) {\n text-underline-offset: 10%;\n }\n\n ::slotted(abbr) {\n color: var(--color-link);\n text-decoration: underline dashed 1px var(--color-link);\n text-underline-offset: 10%;\n cursor: default;\n }\n\n}\n\n","import { Component, Host, Prop, h, Element, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-label',\n styleUrl: 'cura-label.scss',\n shadow: true,\n})\nexport class CuraLabel {\n\n /**\n * Set size of body text.\n * Values: medium (default) | large | small | xsmall.\n */\n @Prop({reflect: true}) size: 'medium' | 'large' | 'small' | 'xsmall' = 'medium';\n\n /**\n * Label font weight. It is possible to use regular HTML tags like <b> or <strong> as well.\n * Values: regular (default) | bold.\n */\n @Prop({reflect: true}) weight: 'regular' | 'bold' = 'regular';\n\n /**\n * Apply design system color to interactive elements like <a> and <abbr> inside the text.\n * Values: Color from design system scheme. Default to 'accent-dark'.\n */\n @Prop({reflect: true}) spotColor = 'accent-dark';\n\n /**\n * Text color.\n * Values: Color from design system scheme. Default to the font color from the theme.\n */\n @Prop() color: string;\n @Watch('color')\n @Watch('spotColor')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * CSS margin-block property values.\n * Default to 1.25em\n */\n @Prop({reflect: true}) marginBlock = '0';\n\n /**\n * CSS line-height property values.\n * Default to 140%\n */\n @Prop({reflect: true}) lineHeight = '125%';\n\n /**\n * Host element <cura-label>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n fontSizeBase: string;\n @State() styles = {};\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n this.setFontProperties();\n this.setColors();\n }\n\n getClasses() {\n const sizeclass = {};\n sizeclass[this.size.toLowerCase()] = true;\n sizeclass[`${this.weight.toLowerCase()}-weight`] = true;\n return sizeclass;\n }\n\n setFontProperties() {\n this.weights = this.theme.fonts.getWeights();\n this.fontSizeBase = this.theme.fonts.getSize();\n this.styles = {\n '--font-family': this.theme.fonts.getFamily('body'),\n '--font-weight-medium': this.weights.medium,\n '--font-weight-bold': this.weights.bold\n };\n }\n\n setColors() {\n const fontColor = this.color\n ? this.theme.colors.getColor(this.color)\n : this.theme.fonts.getColor();\n this.styles = {\n ...this.styles,\n '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'),\n '--color-link': this.theme.colors.getColor(`${this.spotColor}`)\n };\n }\n\n hostCSSProperties() {\n return {\n '--margin-block': this.marginBlock,\n '--font-size-base': this.fontSizeBase,\n '--line-height': this.lineHeight\n };\n }\n\n render() {\n return (\n <Host style={this.hostCSSProperties()}>\n <p style={this.styles} class={this.getClasses()}>\n <slot></slot>\n </p>\n </Host>\n );\n }\n\n}\n"],"version":3}
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-72217b50.js');
6
- const appGlobals = require('./app-globals-0e3b7fc6.js');
5
+ const index = require('./index-404d93e9.js');
6
+ const appGlobals = require('./app-globals-2988084b.js');
7
7
 
8
8
  /*
9
9
  Stencil Client Patch Browser v3.3.0 | MIT Licensed | https://stenciljs.com
@@ -28,7 +28,7 @@ const patchBrowser = () => {
28
28
 
29
29
  patchBrowser().then(options => {
30
30
  appGlobals.globalScripts();
31
- return index.bootstrapLazy([["cura-accordion_12.cjs",[[1,"cura-button",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}],[1,"cura-button-outline",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}],[1,"cura-button-transparent",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}],[1,"cura-accordion-item",{"label":[513],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"colorMode":[1,"color-mode"],"opened":[1540],"styles":[32]}],[1,"cura-icons-view",{"selected":[32]}],[1,"cura-accordion",{"color":[513],"activeColor":[513,"active-color"],"colorMode":[513,"color-mode"],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"behavior":[513],"styles":[32]}],[1,"cura-display",{"level":[514],"size":[513],"inverted":[516],"spotColor":[513,"spot-color"]}],[1,"cura-heading",{"level":[514],"size":[513],"weight":[513],"inverted":[516],"spotColor":[513,"spot-color"]}],[1,"cura-page-template",{"contentwidth":[513]}],[1,"cura-paragraph",{"size":[513],"inverted":[516],"spotColor":[513,"spot-color"],"color":[8],"styles":[32]}],[1,"cura-loader-circle",{"size":[513],"color":[513]}],[1,"cura-icon",{"name":[513],"color":[1],"size":[8],"iconset":[513],"disabled":[4]}]]]], options);
31
+ return index.bootstrapLazy([["cura-accordion_8.cjs",[[1,"cura-button",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}],[1,"cura-accordion-item",{"label":[513],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"colorMode":[1,"color-mode"],"opened":[1540],"styles":[32]}],[1,"cura-accordion",{"color":[513],"activeColor":[513,"active-color"],"colorMode":[513,"color-mode"],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"behavior":[513],"styles":[32]}],[1,"cura-heading",{"level":[514],"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}],[1,"cura-page-template",{"contentwidth":[513]}],[1,"cura-paragraph",{"size":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}],[1,"cura-loader-circle",{"size":[513],"color":[513]}],[1,"cura-icon",{"name":[513],"color":[1],"size":[8],"iconset":[513],"disabled":[4]}]]],["cura-button-outline.cjs",[[1,"cura-button-outline",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}]]],["cura-button-transparent.cjs",[[1,"cura-button-transparent",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}]]],["cura-icons-view.cjs",[[1,"cura-icons-view",{"selected":[32]}]]],["cura-display.cjs",[[1,"cura-display",{"level":[514],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}]]],["cura-label.cjs",[[1,"cura-label",{"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}]]]], options);
32
32
  });
33
33
 
34
34
  exports.setNonce = index.setNonce;
@@ -52,6 +52,13 @@ const uniqueTime = (key, measureText) => {
52
52
  };
53
53
  }
54
54
  };
55
+ const CONTENT_REF_ID = 'r';
56
+ const ORG_LOCATION_ID = 'o';
57
+ const SLOT_NODE_ID = 's';
58
+ const TEXT_NODE_ID = 't';
59
+ const HYDRATE_ID = 's-id';
60
+ const HYDRATED_STYLE_ID = 'sty-id';
61
+ const HYDRATE_CHILD_ID = 'c-id';
55
62
  const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
56
63
  const XLINK_NS = 'http://www.w3.org/1999/xlink';
57
64
  /**
@@ -189,6 +196,211 @@ const Host = {};
189
196
  * @returns whether it's a Host node or not
190
197
  */
191
198
  const isHost = (node) => node && node.$tag$ === Host;
199
+ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
200
+ const endHydrate = createTime('hydrateClient', tagName);
201
+ const shadowRoot = hostElm.shadowRoot;
202
+ const childRenderNodes = [];
203
+ const slotNodes = [];
204
+ const shadowRootNodes = shadowRoot ? [] : null;
205
+ const vnode = (hostRef.$vnode$ = newVNode(tagName, null));
206
+ if (!plt.$orgLocNodes$) {
207
+ initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));
208
+ }
209
+ hostElm[HYDRATE_ID] = hostId;
210
+ hostElm.removeAttribute(HYDRATE_ID);
211
+ clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
212
+ childRenderNodes.map((c) => {
213
+ const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
214
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
215
+ const node = c.$elm$;
216
+ if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
217
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
218
+ }
219
+ if (!shadowRoot) {
220
+ node['s-hn'] = tagName;
221
+ if (orgLocationNode) {
222
+ node['s-ol'] = orgLocationNode;
223
+ node['s-ol']['s-nr'] = node;
224
+ }
225
+ }
226
+ plt.$orgLocNodes$.delete(orgLocationId);
227
+ });
228
+ if (shadowRoot) {
229
+ shadowRootNodes.map((shadowRootNode) => {
230
+ if (shadowRootNode) {
231
+ shadowRoot.appendChild(shadowRootNode);
232
+ }
233
+ });
234
+ }
235
+ endHydrate();
236
+ };
237
+ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
238
+ let childNodeType;
239
+ let childIdSplt;
240
+ let childVNode;
241
+ let i;
242
+ if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
243
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
244
+ if (childNodeType) {
245
+ // got the node data from the element's attribute
246
+ // `${hostId}.${nodeId}.${depth}.${index}`
247
+ childIdSplt = childNodeType.split('.');
248
+ if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {
249
+ childVNode = {
250
+ $flags$: 0,
251
+ $hostId$: childIdSplt[0],
252
+ $nodeId$: childIdSplt[1],
253
+ $depth$: childIdSplt[2],
254
+ $index$: childIdSplt[3],
255
+ $tag$: node.tagName.toLowerCase(),
256
+ $elm$: node,
257
+ $attrs$: null,
258
+ $children$: null,
259
+ $key$: null,
260
+ $name$: null,
261
+ $text$: null,
262
+ };
263
+ childRenderNodes.push(childVNode);
264
+ node.removeAttribute(HYDRATE_CHILD_ID);
265
+ // this is a new child vnode
266
+ // so ensure its parent vnode has the vchildren array
267
+ if (!parentVNode.$children$) {
268
+ parentVNode.$children$ = [];
269
+ }
270
+ // add our child vnode to a specific index of the vnode's children
271
+ parentVNode.$children$[childVNode.$index$] = childVNode;
272
+ // this is now the new parent vnode for all the next child checks
273
+ parentVNode = childVNode;
274
+ if (shadowRootNodes && childVNode.$depth$ === '0') {
275
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
276
+ }
277
+ }
278
+ }
279
+ // recursively drill down, end to start so we can remove nodes
280
+ for (i = node.childNodes.length - 1; i >= 0; i--) {
281
+ clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);
282
+ }
283
+ if (node.shadowRoot) {
284
+ // keep drilling down through the shadow root nodes
285
+ for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {
286
+ clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);
287
+ }
288
+ }
289
+ }
290
+ else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
291
+ // `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`
292
+ childIdSplt = node.nodeValue.split('.');
293
+ if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {
294
+ // comment node for either the host id or a 0 host id
295
+ childNodeType = childIdSplt[0];
296
+ childVNode = {
297
+ $flags$: 0,
298
+ $hostId$: childIdSplt[1],
299
+ $nodeId$: childIdSplt[2],
300
+ $depth$: childIdSplt[3],
301
+ $index$: childIdSplt[4],
302
+ $elm$: node,
303
+ $attrs$: null,
304
+ $children$: null,
305
+ $key$: null,
306
+ $name$: null,
307
+ $tag$: null,
308
+ $text$: null,
309
+ };
310
+ if (childNodeType === TEXT_NODE_ID) {
311
+ childVNode.$elm$ = node.nextSibling;
312
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* NODE_TYPE.TextNode */) {
313
+ childVNode.$text$ = childVNode.$elm$.textContent;
314
+ childRenderNodes.push(childVNode);
315
+ // remove the text comment since it's no longer needed
316
+ node.remove();
317
+ if (!parentVNode.$children$) {
318
+ parentVNode.$children$ = [];
319
+ }
320
+ parentVNode.$children$[childVNode.$index$] = childVNode;
321
+ if (shadowRootNodes && childVNode.$depth$ === '0') {
322
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
323
+ }
324
+ }
325
+ }
326
+ else if (childVNode.$hostId$ === hostId) {
327
+ // this comment node is specifcally for this host id
328
+ if (childNodeType === SLOT_NODE_ID) {
329
+ // `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;
330
+ childVNode.$tag$ = 'slot';
331
+ if (childIdSplt[5]) {
332
+ node['s-sn'] = childVNode.$name$ = childIdSplt[5];
333
+ }
334
+ else {
335
+ node['s-sn'] = '';
336
+ }
337
+ node['s-sr'] = true;
338
+ if (shadowRootNodes) {
339
+ // browser support shadowRoot and this is a shadow dom component
340
+ // create an actual slot element
341
+ childVNode.$elm$ = doc.createElement(childVNode.$tag$);
342
+ if (childVNode.$name$) {
343
+ // add the slot name attribute
344
+ childVNode.$elm$.setAttribute('name', childVNode.$name$);
345
+ }
346
+ // insert the new slot element before the slot comment
347
+ node.parentNode.insertBefore(childVNode.$elm$, node);
348
+ // remove the slot comment since it's not needed for shadow
349
+ node.remove();
350
+ if (childVNode.$depth$ === '0') {
351
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
352
+ }
353
+ }
354
+ slotNodes.push(childVNode);
355
+ if (!parentVNode.$children$) {
356
+ parentVNode.$children$ = [];
357
+ }
358
+ parentVNode.$children$[childVNode.$index$] = childVNode;
359
+ }
360
+ else if (childNodeType === CONTENT_REF_ID) {
361
+ // `${CONTENT_REF_ID}.${hostId}`;
362
+ if (shadowRootNodes) {
363
+ // remove the content ref comment since it's not needed for shadow
364
+ node.remove();
365
+ }
366
+ else {
367
+ hostElm['s-cr'] = node;
368
+ node['s-cn'] = true;
369
+ }
370
+ }
371
+ }
372
+ }
373
+ }
374
+ else if (parentVNode && parentVNode.$tag$ === 'style') {
375
+ const vnode = newVNode(null, node.textContent);
376
+ vnode.$elm$ = node;
377
+ vnode.$index$ = '0';
378
+ parentVNode.$children$ = [vnode];
379
+ }
380
+ };
381
+ const initializeDocumentHydrate = (node, orgLocNodes) => {
382
+ if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
383
+ let i = 0;
384
+ for (; i < node.childNodes.length; i++) {
385
+ initializeDocumentHydrate(node.childNodes[i], orgLocNodes);
386
+ }
387
+ if (node.shadowRoot) {
388
+ for (i = 0; i < node.shadowRoot.childNodes.length; i++) {
389
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);
390
+ }
391
+ }
392
+ }
393
+ else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
394
+ const childIdSplt = node.nodeValue.split('.');
395
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
396
+ orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);
397
+ node.nodeValue = '';
398
+ // useful to know if the original location is
399
+ // the root light-dom of a shadow dom component
400
+ node['s-en'] = childIdSplt[3];
401
+ }
402
+ }
403
+ };
192
404
  /**
193
405
  * Parse a new property value for a given property type.
194
406
  *
@@ -282,7 +494,12 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
282
494
  rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
283
495
  }
284
496
  if (!appliedStyles.has(scopeId)) {
285
- {
497
+ if (styleContainerNode.host &&
498
+ (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
499
+ // This is only happening on native shadow-dom, do not needs CSS var shim
500
+ styleElm.innerHTML = style;
501
+ }
502
+ else {
286
503
  // TODO(STENCIL-659): Remove code implementing the CSS variable shim
287
504
  if (plt.$cssShim$) {
288
505
  // TODO(STENCIL-659): Remove code implementing the CSS variable shim
@@ -341,6 +558,7 @@ const attachStyles = (hostRef) => {
341
558
  endAttachStyles();
342
559
  };
343
560
  const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
561
+ const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
344
562
  /**
345
563
  * Production setAccessor() function based on Preact by
346
564
  * Jason Miller (@developit)
@@ -1689,7 +1907,18 @@ const connectedCallback = (elm) => {
1689
1907
  if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1690
1908
  // first time this component has connected
1691
1909
  hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1910
+ let hostId;
1692
1911
  {
1912
+ hostId = elm.getAttribute(HYDRATE_ID);
1913
+ if (hostId) {
1914
+ if (supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
1915
+ const scopeId = addStyle(elm.shadowRoot, cmpMeta);
1916
+ elm.classList.remove(scopeId + '-h', scopeId + '-s');
1917
+ }
1918
+ initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
1919
+ }
1920
+ }
1921
+ if (!hostId) {
1693
1922
  // initUpdate
1694
1923
  // if the slot polyfill is required we'll need to put some nodes
1695
1924
  // in here to act as original content anchors as we move nodes around
@@ -1706,7 +1935,10 @@ const connectedCallback = (elm) => {
1706
1935
  while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1707
1936
  // climb up the ancestors looking for the first
1708
1937
  // component that hasn't finished its lifecycle update yet
1709
- if (ancestorComponent['s-p']) {
1938
+ if ((ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
1939
+ ancestorComponent.hasAttribute('s-id') &&
1940
+ ancestorComponent['s-p']) ||
1941
+ ancestorComponent['s-p']) {
1710
1942
  // we found this components first ancestor component
1711
1943
  // keep a reference to this component's ancestor component
1712
1944
  attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
@@ -1772,10 +2004,22 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1772
2004
  const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1773
2005
  const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1774
2006
  const deferredConnectedCallbacks = [];
2007
+ const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1775
2008
  let appLoadFallback;
1776
2009
  let isBootstrapping = true;
2010
+ let i = 0;
1777
2011
  Object.assign(plt, options);
1778
2012
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
2013
+ {
2014
+ // If the app is already hydrated there is not point to disable the
2015
+ // async queue. This will improve the first input delay
2016
+ plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;
2017
+ }
2018
+ {
2019
+ for (; i < styles.length; i++) {
2020
+ registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
2021
+ }
2022
+ }
1779
2023
  lazyBundles.map((lazyBundle) => {
1780
2024
  lazyBundle[1].map((compactMeta) => {
1781
2025
  const cmpMeta = {
@@ -2000,4 +2244,4 @@ exports.registerInstance = registerInstance;
2000
2244
  exports.setNonce = setNonce;
2001
2245
  exports.win = win;
2002
2246
 
2003
- //# sourceMappingURL=index-72217b50.js.map
2247
+ //# sourceMappingURL=index-404d93e9.js.map