@affinda/wc 0.0.1 → 0.0.3

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 (227) hide show
  1. package/dist/affinda/af-aspect-ratio.entry.esm.js.map +1 -0
  2. package/dist/affinda/af-button-group.entry.esm.js.map +1 -0
  3. package/dist/affinda/af-button.entry.esm.js.map +1 -0
  4. package/dist/affinda/af-color-swatch.entry.esm.js.map +1 -0
  5. package/dist/affinda/af-container.entry.esm.js.map +1 -0
  6. package/dist/affinda/af-heading.af-logo.af-nav-item.af-navbar.af-text.entry.esm.js.map +1 -0
  7. package/dist/affinda/af-icon-button.entry.esm.js.map +1 -0
  8. package/dist/affinda/af-typography-lockup.entry.esm.js.map +1 -0
  9. package/dist/affinda/affinda.css +1 -1
  10. package/dist/affinda/affinda.esm.js +1 -1
  11. package/dist/affinda/index.esm.js +1 -1
  12. package/dist/affinda/index.esm.js.map +1 -1
  13. package/dist/affinda/p-540af9d9.entry.js +2 -0
  14. package/dist/affinda/p-540af9d9.entry.js.map +1 -0
  15. package/dist/affinda/p-619bc077.entry.js +2 -0
  16. package/dist/affinda/p-619bc077.entry.js.map +1 -0
  17. package/dist/affinda/p-6b07f590.entry.js +2 -0
  18. package/dist/affinda/p-6b07f590.entry.js.map +1 -0
  19. package/dist/affinda/p-8d3b4917.entry.js +2 -0
  20. package/dist/affinda/p-8d3b4917.entry.js.map +1 -0
  21. package/dist/affinda/p-9d0e6ed1.entry.js +2 -0
  22. package/dist/affinda/p-9d0e6ed1.entry.js.map +1 -0
  23. package/dist/affinda/p-DxVtR6vj.js +3 -0
  24. package/dist/affinda/p-DxVtR6vj.js.map +1 -0
  25. package/dist/affinda/p-afbe9cb3.entry.js +2 -0
  26. package/dist/affinda/p-afbe9cb3.entry.js.map +1 -0
  27. package/dist/affinda/p-cbb06a14.entry.js +2 -0
  28. package/dist/affinda/p-cbb06a14.entry.js.map +1 -0
  29. package/dist/affinda/p-e274e11a.entry.js +2 -0
  30. package/dist/affinda/p-e274e11a.entry.js.map +1 -0
  31. package/dist/cjs/af-aspect-ratio.cjs.entry.js +83 -0
  32. package/dist/cjs/af-aspect-ratio.entry.cjs.js.map +1 -0
  33. package/dist/cjs/af-button-group.cjs.entry.js +30 -0
  34. package/dist/cjs/af-button-group.entry.cjs.js.map +1 -0
  35. package/dist/cjs/af-button.cjs.entry.js +48 -0
  36. package/dist/cjs/af-button.entry.cjs.js.map +1 -0
  37. package/dist/cjs/af-color-swatch.cjs.entry.js +23 -0
  38. package/dist/cjs/af-color-swatch.entry.cjs.js.map +1 -0
  39. package/dist/cjs/af-container.cjs.entry.js +26 -0
  40. package/dist/cjs/af-container.entry.cjs.js.map +1 -0
  41. package/dist/cjs/af-heading.af-logo.af-nav-item.af-navbar.af-text.entry.cjs.js.map +1 -0
  42. package/dist/cjs/af-heading_5.cjs.entry.js +128 -0
  43. package/dist/cjs/af-icon-button.cjs.entry.js +44 -0
  44. package/dist/cjs/af-icon-button.entry.cjs.js.map +1 -0
  45. package/dist/cjs/af-typography-lockup.cjs.entry.js +45 -0
  46. package/dist/cjs/af-typography-lockup.entry.cjs.js.map +1 -0
  47. package/dist/cjs/affinda.cjs.js +2 -2
  48. package/dist/cjs/{index-5BGpYleS.js → index-E2jkaTPt.js} +92 -61
  49. package/dist/cjs/index-E2jkaTPt.js.map +1 -0
  50. package/dist/cjs/index.cjs.js +24 -136
  51. package/dist/cjs/index.cjs.js.map +1 -1
  52. package/dist/cjs/loader.cjs.js +2 -2
  53. package/dist/collection/collection-manifest.json +10 -3
  54. package/dist/collection/components/af-aspect-ratio/af-aspect-ratio.css +17 -0
  55. package/dist/collection/components/af-aspect-ratio/af-aspect-ratio.js +117 -0
  56. package/dist/collection/components/af-aspect-ratio/af-aspect-ratio.js.map +1 -0
  57. package/dist/collection/components/af-button/af-button.css +151 -42
  58. package/dist/collection/components/af-button/af-button.js +62 -57
  59. package/dist/collection/components/af-button/af-button.js.map +1 -1
  60. package/dist/collection/components/af-button-group/af-button-group.css +22 -0
  61. package/dist/collection/components/af-button-group/af-button-group.js +77 -0
  62. package/dist/collection/components/af-button-group/af-button-group.js.map +1 -0
  63. package/dist/collection/components/af-color-swatch/af-color-swatch.css +42 -0
  64. package/dist/collection/components/af-color-swatch/af-color-swatch.js +88 -0
  65. package/dist/collection/components/af-color-swatch/af-color-swatch.js.map +1 -0
  66. package/dist/collection/components/af-container/af-container.css +76 -0
  67. package/dist/collection/components/af-container/af-container.js +57 -0
  68. package/dist/collection/components/af-container/af-container.js.map +1 -0
  69. package/dist/collection/components/af-heading/af-heading.css +99 -0
  70. package/dist/collection/components/af-heading/af-heading.js +86 -0
  71. package/dist/collection/components/af-heading/af-heading.js.map +1 -0
  72. package/dist/collection/components/af-icon-button/af-icon-button.css +140 -41
  73. package/dist/collection/components/af-icon-button/af-icon-button.js +81 -57
  74. package/dist/collection/components/af-icon-button/af-icon-button.js.map +1 -1
  75. package/dist/collection/components/af-logo/af-logo.css +10 -0
  76. package/dist/collection/components/af-logo/af-logo.js +22 -0
  77. package/dist/collection/components/af-logo/af-logo.js.map +1 -0
  78. package/dist/collection/components/af-nav-item/af-nav-item.css +146 -0
  79. package/dist/collection/components/af-nav-item/af-nav-item.js +134 -0
  80. package/dist/collection/components/af-nav-item/af-nav-item.js.map +1 -0
  81. package/dist/collection/components/af-navbar/af-navbar.css +119 -0
  82. package/dist/collection/components/af-navbar/af-navbar.js +23 -0
  83. package/dist/collection/components/af-navbar/af-navbar.js.map +1 -0
  84. package/dist/collection/components/af-text/af-text.css +61 -0
  85. package/dist/collection/components/af-text/af-text.js +96 -0
  86. package/dist/collection/components/af-text/af-text.js.map +1 -0
  87. package/dist/collection/components/af-typography-lockup/af-typography-lockup.css +168 -0
  88. package/dist/collection/components/af-typography-lockup/af-typography-lockup.js +151 -0
  89. package/dist/collection/components/af-typography-lockup/af-typography-lockup.js.map +1 -0
  90. package/dist/collection/components.js +10 -3
  91. package/dist/collection/components.js.map +1 -1
  92. package/dist/components/af-aspect-ratio.d.ts +11 -0
  93. package/dist/components/af-aspect-ratio.js +9 -0
  94. package/dist/components/af-aspect-ratio.js.map +1 -0
  95. package/dist/components/af-button-group.d.ts +11 -0
  96. package/dist/components/af-button-group.js +9 -0
  97. package/dist/components/af-button-group.js.map +1 -0
  98. package/dist/components/af-button.js +1 -1
  99. package/dist/components/af-color-swatch.d.ts +11 -0
  100. package/dist/components/af-color-swatch.js +9 -0
  101. package/dist/components/af-color-swatch.js.map +1 -0
  102. package/dist/components/af-container.d.ts +11 -0
  103. package/dist/components/af-container.js +9 -0
  104. package/dist/components/af-container.js.map +1 -0
  105. package/dist/components/af-heading.d.ts +11 -0
  106. package/dist/components/af-heading.js +9 -0
  107. package/dist/components/af-heading.js.map +1 -0
  108. package/dist/components/af-icon-button.js +1 -1
  109. package/dist/components/{af-card.d.ts → af-logo.d.ts} +4 -4
  110. package/dist/components/af-logo.js +9 -0
  111. package/dist/components/af-logo.js.map +1 -0
  112. package/dist/components/af-nav-item.d.ts +11 -0
  113. package/dist/components/af-nav-item.js +9 -0
  114. package/dist/components/af-nav-item.js.map +1 -0
  115. package/dist/components/{af-badge.d.ts → af-navbar.d.ts} +4 -4
  116. package/dist/components/af-navbar.js +9 -0
  117. package/dist/components/af-navbar.js.map +1 -0
  118. package/dist/components/{af-input.d.ts → af-text.d.ts} +4 -4
  119. package/dist/components/af-text.js +9 -0
  120. package/dist/components/af-text.js.map +1 -0
  121. package/dist/components/af-typography-lockup.d.ts +11 -0
  122. package/dist/components/af-typography-lockup.js +9 -0
  123. package/dist/components/af-typography-lockup.js.map +1 -0
  124. package/dist/components/index.js +13 -6
  125. package/dist/components/index.js.map +1 -1
  126. package/dist/components/p-B17zxKkI.js +35 -0
  127. package/dist/components/p-B17zxKkI.js.map +1 -0
  128. package/dist/components/p-BJDmHNDi.js +59 -0
  129. package/dist/components/p-BJDmHNDi.js.map +1 -0
  130. package/dist/components/p-BfmeW04T.js +50 -0
  131. package/dist/components/p-BfmeW04T.js.map +1 -0
  132. package/dist/components/p-BoU5qaPt.js +68 -0
  133. package/dist/components/p-BoU5qaPt.js.map +1 -0
  134. package/dist/components/p-CT_9_xN3.js +50 -0
  135. package/dist/components/p-CT_9_xN3.js.map +1 -0
  136. package/dist/components/{p-DOtgsZRB.js → p-CzaQ1fCu.js} +92 -65
  137. package/dist/components/p-CzaQ1fCu.js.map +1 -0
  138. package/dist/components/p-DG7Mtz0G.js +66 -0
  139. package/dist/components/p-DG7Mtz0G.js.map +1 -0
  140. package/dist/components/p-DcFGu6up.js +68 -0
  141. package/dist/components/p-DcFGu6up.js.map +1 -0
  142. package/dist/components/p-DfIqdEs7.js +45 -0
  143. package/dist/components/p-DfIqdEs7.js.map +1 -0
  144. package/dist/components/p-DqIqR4VU.js +102 -0
  145. package/dist/components/p-DqIqR4VU.js.map +1 -0
  146. package/dist/components/p-LEksuu7O.js +44 -0
  147. package/dist/components/p-LEksuu7O.js.map +1 -0
  148. package/dist/components/p-uhOM63Ux.js +71 -0
  149. package/dist/components/p-uhOM63Ux.js.map +1 -0
  150. package/dist/components/p-zBrKMKWE.js +35 -0
  151. package/dist/components/p-zBrKMKWE.js.map +1 -0
  152. package/dist/esm/af-aspect-ratio.entry.js +81 -0
  153. package/dist/esm/af-aspect-ratio.entry.js.map +1 -0
  154. package/dist/esm/af-button-group.entry.js +28 -0
  155. package/dist/esm/af-button-group.entry.js.map +1 -0
  156. package/dist/esm/af-button.entry.js +46 -0
  157. package/dist/esm/af-button.entry.js.map +1 -0
  158. package/dist/esm/af-color-swatch.entry.js +21 -0
  159. package/dist/esm/af-color-swatch.entry.js.map +1 -0
  160. package/dist/esm/af-container.entry.js +24 -0
  161. package/dist/esm/af-container.entry.js.map +1 -0
  162. package/dist/esm/af-heading.af-logo.af-nav-item.af-navbar.af-text.entry.js.map +1 -0
  163. package/dist/esm/af-heading_5.entry.js +122 -0
  164. package/dist/esm/af-icon-button.entry.js +42 -0
  165. package/dist/esm/af-icon-button.entry.js.map +1 -0
  166. package/dist/esm/af-typography-lockup.entry.js +43 -0
  167. package/dist/esm/af-typography-lockup.entry.js.map +1 -0
  168. package/dist/esm/affinda.js +3 -3
  169. package/dist/esm/{index-o0tfWqnY.js → index-DxVtR6vj.js} +92 -61
  170. package/dist/esm/index-DxVtR6vj.js.map +1 -0
  171. package/dist/esm/index.js +9 -132
  172. package/dist/esm/index.js.map +1 -1
  173. package/dist/esm/loader.js +3 -3
  174. package/dist/types/components/af-aspect-ratio/af-aspect-ratio.d.ts +18 -0
  175. package/dist/types/components/af-button/af-button.d.ts +19 -11
  176. package/dist/types/components/af-button-group/af-button-group.d.ts +11 -0
  177. package/dist/types/components/af-color-swatch/af-color-swatch.d.ts +9 -0
  178. package/dist/types/components/af-container/af-container.d.ts +15 -0
  179. package/dist/types/components/af-heading/af-heading.d.ts +8 -0
  180. package/dist/types/components/af-icon-button/af-icon-button.d.ts +23 -11
  181. package/dist/types/components/af-logo/af-logo.d.ts +6 -0
  182. package/dist/types/components/af-nav-item/af-nav-item.d.ts +27 -0
  183. package/dist/types/components/af-navbar/af-navbar.d.ts +7 -0
  184. package/dist/types/components/af-text/af-text.d.ts +9 -0
  185. package/dist/types/components/af-typography-lockup/af-typography-lockup.d.ts +23 -0
  186. package/dist/types/components.d.ts +416 -163
  187. package/package.json +13 -13
  188. package/dist/affinda/af-badge.af-button.af-card.af-icon-button.af-input.entry.esm.js.map +0 -1
  189. package/dist/affinda/p-bca10492.entry.js +0 -2
  190. package/dist/affinda/p-bca10492.entry.js.map +0 -1
  191. package/dist/affinda/p-o0tfWqnY.js +0 -3
  192. package/dist/affinda/p-o0tfWqnY.js.map +0 -1
  193. package/dist/cjs/af-badge.af-button.af-card.af-icon-button.af-input.entry.cjs.js.map +0 -1
  194. package/dist/cjs/af-badge_5.cjs.entry.js +0 -13
  195. package/dist/cjs/index-5BGpYleS.js.map +0 -1
  196. package/dist/collection/components/af-badge/af-badge.css +0 -29
  197. package/dist/collection/components/af-badge/af-badge.js +0 -47
  198. package/dist/collection/components/af-badge/af-badge.js.map +0 -1
  199. package/dist/collection/components/af-card/af-card.css +0 -69
  200. package/dist/collection/components/af-card/af-card.js +0 -70
  201. package/dist/collection/components/af-card/af-card.js.map +0 -1
  202. package/dist/collection/components/af-input/af-input.css +0 -57
  203. package/dist/collection/components/af-input/af-input.js +0 -193
  204. package/dist/collection/components/af-input/af-input.js.map +0 -1
  205. package/dist/components/af-badge.js +0 -9
  206. package/dist/components/af-badge.js.map +0 -1
  207. package/dist/components/af-card.js +0 -9
  208. package/dist/components/af-card.js.map +0 -1
  209. package/dist/components/af-input.js +0 -9
  210. package/dist/components/af-input.js.map +0 -1
  211. package/dist/components/p-B7I93sz2.js +0 -39
  212. package/dist/components/p-B7I93sz2.js.map +0 -1
  213. package/dist/components/p-CZd1ieht.js +0 -62
  214. package/dist/components/p-CZd1ieht.js.map +0 -1
  215. package/dist/components/p-D6PwARU0.js +0 -59
  216. package/dist/components/p-D6PwARU0.js.map +0 -1
  217. package/dist/components/p-DOtgsZRB.js.map +0 -1
  218. package/dist/components/p-DZIXhvI0.js +0 -44
  219. package/dist/components/p-DZIXhvI0.js.map +0 -1
  220. package/dist/components/p-zIKPa48S.js +0 -62
  221. package/dist/components/p-zIKPa48S.js.map +0 -1
  222. package/dist/esm/af-badge.af-button.af-card.af-icon-button.af-input.entry.js.map +0 -1
  223. package/dist/esm/af-badge_5.entry.js +0 -3
  224. package/dist/esm/index-o0tfWqnY.js.map +0 -1
  225. package/dist/types/components/af-badge/af-badge.d.ts +0 -5
  226. package/dist/types/components/af-card/af-card.d.ts +0 -7
  227. package/dist/types/components/af-input/af-input.d.ts +0 -24
@@ -2,7 +2,7 @@ const NAMESPACE = 'affinda';
2
2
  const BUILD = /* affinda */ { hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: false, updatable: true};
3
3
 
4
4
  const globalScripts = () => {};
5
- const globalStyles = ":root{--af-color-brand-primary-500:#7c3aed;--af-color-brand-primary-600:#6d28d9;--af-color-fg-default:#120f1f;--af-color-fg-muted:#5b4b8a;--af-color-fg-inverse:#f7f5ff;--af-color-bg-surface:#ffffff;--af-color-bg-subtle:#f5f3ff;--af-color-bg-inverse:#2f165e;--af-radius-sm:6px;--af-radius-md:12px;--af-radius-pill:999px;--af-space-1:4px;--af-space-2:8px;--af-space-3:12px;--af-space-4:16px;--af-font-family-sans:'Inter', 'Segoe UI', system-ui, sans-serif;--af-font-weight-regular:400;--af-font-weight-semibold:600;--af-size-font-sm:0.875rem;--af-size-font-md:1rem;--af-size-font-lg:1.125rem}[data-theme=\"dark\"]{--af-color-fg-default:#f7f5ff;--af-color-fg-muted:#dcd1ff;--af-color-fg-inverse:#120f1f;--af-color-bg-surface:#1b1530;--af-color-bg-subtle:#241943;--af-color-bg-inverse:#f7f5ff}:root{font-family:var(--af-font-family-sans);font-weight:var(--af-font-weight-regular);background-color:var(--af-color-bg-surface);color:var(--af-color-fg-default)}body{font-size:var(--af-size-font-md);display:flex;flex-direction:column;min-height:100%}.af-focus-ring{outline:2px solid var(--af-color-brand-primary-500);outline-offset:2px}.af-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}";
5
+ const globalStyles = ":root{--af-color-brand-primary-500:#7c3aed;--af-color-brand-primary-600:#6d28d9;--af-color-fg-default:#120f1f;--af-color-fg-muted:#5b4b8a;--af-color-fg-inverse:#f7f5ff;--af-color-bg-surface:#ffffff;--af-color-bg-subtle:#f5f3ff;--af-color-bg-inverse:#2f165e;--af-radius-sm:6px;--af-radius-md:12px;--af-radius-pill:999px;--af-space-1:4px;--af-space-2:8px;--af-space-3:12px;--af-space-4:16px;--af-font-family-sans:'Inter', 'Segoe UI', system-ui, sans-serif;--af-font-weight-regular:400;--af-font-weight-semibold:600;--af-size-font-sm:0.875rem;--af-size-font-md:1rem;--af-size-font-lg:1.125rem}[data-theme=\"dark\"]{--af-color-fg-default:#f7f5ff;--af-color-fg-muted:#dcd1ff;--af-color-fg-inverse:#120f1f;--af-color-bg-surface:#1b1530;--af-color-bg-subtle:#241943;--af-color-bg-inverse:#f7f5ff}";
6
6
 
7
7
  /*
8
8
  Stencil Client Platform v4.38.2 | MIT Licensed | https://stenciljs.com
@@ -13,6 +13,10 @@ var __export = (target, all) => {
13
13
  __defProp(target, name, { get: all[name], enumerable: true });
14
14
  };
15
15
 
16
+ // src/utils/constants.ts
17
+ var SVG_NS = "http://www.w3.org/2000/svg";
18
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
19
+
16
20
  // src/client/client-host-ref.ts
17
21
  var getHostRef = (ref) => {
18
22
  if (ref.__stencil__getHostRef) {
@@ -380,6 +384,13 @@ var h = (nodeName, vnodeData, ...children) => {
380
384
  }
381
385
  }
382
386
  }
387
+ if (typeof nodeName === "function") {
388
+ return nodeName(
389
+ vnodeData === null ? {} : vnodeData,
390
+ vNodeChildren,
391
+ vdomFnUtils
392
+ );
393
+ }
383
394
  const vnode = newVNode(nodeName, null);
384
395
  vnode.$attrs$ = vnodeData;
385
396
  if (vNodeChildren.length > 0) {
@@ -408,6 +419,36 @@ var newVNode = (tag, text) => {
408
419
  };
409
420
  var Host = {};
410
421
  var isHost = (node) => node && node.$tag$ === Host;
422
+ var vdomFnUtils = {
423
+ forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
424
+ map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
425
+ };
426
+ var convertToPublic = (node) => ({
427
+ vattrs: node.$attrs$,
428
+ vchildren: node.$children$,
429
+ vkey: node.$key$,
430
+ vname: node.$name$,
431
+ vtag: node.$tag$,
432
+ vtext: node.$text$
433
+ });
434
+ var convertToPrivate = (node) => {
435
+ if (typeof node.vtag === "function") {
436
+ const vnodeData = { ...node.vattrs };
437
+ if (node.vkey) {
438
+ vnodeData.key = node.vkey;
439
+ }
440
+ if (node.vname) {
441
+ vnodeData.name = node.vname;
442
+ }
443
+ return h(node.vtag, vnodeData, ...node.vchildren || []);
444
+ }
445
+ const vnode = newVNode(node.vtag, node.vtext);
446
+ vnode.$attrs$ = node.vattrs;
447
+ vnode.$children$ = node.vchildren;
448
+ vnode.$key$ = node.vkey;
449
+ vnode.$name$ = node.vname;
450
+ return vnode;
451
+ };
411
452
  var createSupportsRuleRe = (selector) => {
412
453
  const safeSelector2 = escapeRegExpSpecialCharacters(selector);
413
454
  return new RegExp(
@@ -427,6 +468,9 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
427
468
  return propValue === "false" ? false : propValue === "" || !!propValue;
428
469
  }
429
470
  }
471
+ if (propType & 2 /* Number */) {
472
+ return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
473
+ }
430
474
  if (propType & 1 /* String */) {
431
475
  return String(propValue);
432
476
  }
@@ -434,25 +478,6 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
434
478
  }
435
479
  return propValue;
436
480
  };
437
- var getElement = (ref) => {
438
- var _a;
439
- return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
440
- };
441
-
442
- // src/runtime/event-emitter.ts
443
- var createEvent = (ref, name, flags) => {
444
- const elm = getElement(ref);
445
- return {
446
- emit: (detail) => {
447
- return emitEvent(elm, name, {
448
- bubbles: true,
449
- composed: true,
450
- cancelable: true,
451
- detail
452
- });
453
- }
454
- };
455
- };
456
481
  var emitEvent = (elm, name, opts) => {
457
482
  const ev = plt.ce(name, opts);
458
483
  elm.dispatchEvent(ev);
@@ -463,7 +488,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
463
488
  return;
464
489
  }
465
490
  let isProp = isMemberInElement(elm, memberName);
466
- let ln = memberName.toLowerCase();
491
+ memberName.toLowerCase();
467
492
  if (memberName === "class") {
468
493
  const classList = elm.classList;
469
494
  const oldClasses = parseClassList(oldValue);
@@ -472,27 +497,30 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
472
497
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
473
498
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
474
499
  }
475
- } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
476
- if (memberName[2] === "-") {
477
- memberName = memberName.slice(3);
478
- } else if (isMemberInElement(win, ln)) {
479
- memberName = ln.slice(2);
480
- } else {
481
- memberName = ln[2] + memberName.slice(3);
482
- }
483
- if (oldValue || newValue) {
484
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
485
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
486
- if (oldValue) {
487
- plt.rel(elm, memberName, oldValue, capture);
500
+ } else if (memberName === "style") {
501
+ {
502
+ for (const prop in oldValue) {
503
+ if (!newValue || newValue[prop] == null) {
504
+ if (prop.includes("-")) {
505
+ elm.style.removeProperty(prop);
506
+ } else {
507
+ elm.style[prop] = "";
508
+ }
509
+ }
488
510
  }
489
- if (newValue) {
490
- plt.ael(elm, memberName, newValue, capture);
511
+ }
512
+ for (const prop in newValue) {
513
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
514
+ if (prop.includes("-")) {
515
+ elm.style.setProperty(prop, newValue[prop]);
516
+ } else {
517
+ elm.style[prop] = newValue[prop];
518
+ }
491
519
  }
492
520
  }
493
- } else {
521
+ } else if (memberName === "key") ; else {
494
522
  const isComplex = isComplexType(newValue);
495
- if ((isProp || isComplex && newValue !== null) && true) {
523
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
496
524
  try {
497
525
  if (!elm.tagName.includes("-")) {
498
526
  const n = newValue == null ? "" : newValue;
@@ -535,8 +563,6 @@ var parseClassList = (value) => {
535
563
  }
536
564
  return value.split(parseClassListRegex);
537
565
  };
538
- var CAPTURE_EVENT_SUFFIX = "Capture";
539
- var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
540
566
 
541
567
  // src/runtime/vdom/update-element.ts
542
568
  var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
@@ -585,14 +611,21 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
585
611
  if (newVNode2.$text$ !== null) {
586
612
  elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
587
613
  } else {
614
+ if (!isSvgMode) {
615
+ isSvgMode = newVNode2.$tag$ === "svg";
616
+ }
588
617
  if (!win.document) {
589
618
  throw new Error(
590
619
  "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
591
620
  );
592
621
  }
593
- elm = newVNode2.$elm$ = win.document.createElement(
622
+ elm = newVNode2.$elm$ = win.document.createElementNS(
623
+ isSvgMode ? SVG_NS : HTML_NS,
594
624
  newVNode2.$tag$
595
- );
625
+ ) ;
626
+ if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
627
+ isSvgMode = false;
628
+ }
596
629
  {
597
630
  updateElement(null, newVNode2, isSvgMode);
598
631
  }
@@ -604,6 +637,13 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
604
637
  }
605
638
  }
606
639
  }
640
+ {
641
+ if (newVNode2.$tag$ === "svg") {
642
+ isSvgMode = false;
643
+ } else if (elm.tagName === "foreignObject") {
644
+ isSvgMode = true;
645
+ }
646
+ }
607
647
  }
608
648
  elm["s-hn"] = hostTagName;
609
649
  return elm;
@@ -735,8 +775,12 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
735
775
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
736
776
  const oldChildren = oldVNode.$children$;
737
777
  const newChildren = newVNode2.$children$;
778
+ const tag = newVNode2.$tag$;
738
779
  const text = newVNode2.$text$;
739
780
  if (text === null) {
781
+ {
782
+ isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
783
+ }
740
784
  {
741
785
  updateElement(oldVNode, newVNode2, isSvgMode);
742
786
  }
@@ -753,6 +797,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
753
797
  ) {
754
798
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
755
799
  } else ;
800
+ if (isSvgMode && tag === "svg") {
801
+ isSvgMode = false;
802
+ }
756
803
  } else if (oldVNode.$text$ !== text) {
757
804
  elm.data = text;
758
805
  }
@@ -764,19 +811,10 @@ var insertBefore = (parent, newNode, reference) => {
764
811
  };
765
812
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
766
813
  const hostElm = hostRef.$hostElement$;
767
- const cmpMeta = hostRef.$cmpMeta$;
768
814
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
769
815
  const isHostElement = isHost(renderFnResults);
770
816
  const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
771
817
  hostTagName = hostElm.tagName;
772
- if (cmpMeta.$attrsToReflect$) {
773
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
774
- cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
775
- {
776
- rootVnode.$attrs$[attribute] = hostElm[propName];
777
- }
778
- });
779
- }
780
818
  if (isInitialLoad && rootVnode.$attrs$) {
781
819
  for (const key of Object.keys(rootVnode.$attrs$)) {
782
820
  if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
@@ -1113,12 +1151,8 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1113
1151
  /* @__PURE__ */ new Set([
1114
1152
  ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
1115
1153
  ...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
1116
- var _a2;
1117
1154
  const attrName = m[1] || propName;
1118
1155
  attrNameToPropName.set(attrName, propName);
1119
- if (m[0] & 512 /* ReflectAttr */) {
1120
- (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
1121
- }
1122
1156
  return attrName;
1123
1157
  })
1124
1158
  ])
@@ -1294,9 +1328,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1294
1328
  {
1295
1329
  cmpMeta.$members$ = compactMeta[2];
1296
1330
  }
1297
- {
1298
- cmpMeta.$attrsToReflect$ = [];
1299
- }
1300
1331
  const tagName = cmpMeta.$tagName$;
1301
1332
  const HostElement = class extends HTMLElement {
1302
1333
  // StencilLazyHost
@@ -1399,7 +1430,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1399
1430
  // src/runtime/nonce.ts
1400
1431
  var setNonce = (nonce) => plt.$nonce$ = nonce;
1401
1432
 
1402
- export { bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
1403
- //# sourceMappingURL=index-o0tfWqnY.js.map
1433
+ export { Host as H, bootstrapLazy as b, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
1434
+ //# sourceMappingURL=index-DxVtR6vj.js.map
1404
1435
 
1405
- //# sourceMappingURL=index-o0tfWqnY.js.map
1436
+ //# sourceMappingURL=index-DxVtR6vj.js.map