@atmgrupomaggioli/iris-button 0.0.1 → 0.0.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 (31) hide show
  1. package/dist/cjs/{index-15a93aad.js → index-f882627f.js} +187 -134
  2. package/dist/cjs/index-f882627f.js.map +1 -0
  3. package/dist/cjs/iris-button.cjs.entry.js +1 -1
  4. package/dist/cjs/iris-button.cjs.js +2 -2
  5. package/dist/cjs/iris-button.cjs.js.map +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +1 -1
  8. package/dist/collection/components/iris-button/iris-button.js +8 -0
  9. package/dist/collection/components/iris-button/iris-button.js.map +1 -1
  10. package/dist/components/index.js +1 -1
  11. package/dist/components/iris-button.js +1 -1
  12. package/dist/components/{p-9678c037.js → p-f7558cea.js} +172 -131
  13. package/dist/components/p-f7558cea.js.map +1 -0
  14. package/dist/esm/{index-73dab88a.js → index-000f519f.js} +187 -134
  15. package/dist/esm/index-000f519f.js.map +1 -0
  16. package/dist/esm/iris-button.entry.js +1 -1
  17. package/dist/esm/iris-button.js +3 -3
  18. package/dist/esm/iris-button.js.map +1 -1
  19. package/dist/esm/loader.js +2 -2
  20. package/dist/iris-button/iris-button.esm.js +1 -1
  21. package/dist/iris-button/iris-button.esm.js.map +1 -1
  22. package/dist/iris-button/{p-cc8752cf.entry.js → p-a8ef57f6.entry.js} +2 -2
  23. package/dist/iris-button/p-c58bb129.js +3 -0
  24. package/dist/iris-button/p-c58bb129.js.map +1 -0
  25. package/package.json +4 -4
  26. package/dist/cjs/index-15a93aad.js.map +0 -1
  27. package/dist/components/p-9678c037.js.map +0 -1
  28. package/dist/esm/index-73dab88a.js.map +0 -1
  29. package/dist/iris-button/p-f582cc7a.js +0 -3
  30. package/dist/iris-button/p-f582cc7a.js.map +0 -1
  31. /package/dist/iris-button/{p-cc8752cf.entry.js.map → p-a8ef57f6.entry.js.map} +0 -0
@@ -2,7 +2,7 @@ const NAMESPACE = 'iris-button';
2
2
  const BUILD = /* iris-button */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: false, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: false, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.23.0 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
@@ -180,20 +180,6 @@ var unwrapErr = (result) => {
180
180
  throw result.value;
181
181
  }
182
182
  };
183
- var createTime = (fnName, tagName = "") => {
184
- {
185
- return () => {
186
- return;
187
- };
188
- }
189
- };
190
- var uniqueTime = (key, measureText) => {
191
- {
192
- return () => {
193
- return;
194
- };
195
- }
196
- };
197
183
  var h = (nodeName, vnodeData, ...children) => {
198
184
  let child = null;
199
185
  let key = null;
@@ -268,108 +254,6 @@ var newVNode = (tag, text) => {
268
254
  };
269
255
  var Host = {};
270
256
  var isHost = (node) => node && node.$tag$ === Host;
271
- var parsePropertyValue = (propValue, propType) => {
272
- if (propValue != null && !isComplexType(propValue)) {
273
- if (propType & 4 /* Boolean */) {
274
- return propValue === "false" ? false : propValue === "" || !!propValue;
275
- }
276
- if (propType & 1 /* String */) {
277
- return String(propValue);
278
- }
279
- return propValue;
280
- }
281
- return propValue;
282
- };
283
- var emitEvent = (elm, name, opts) => {
284
- const ev = plt.ce(name, opts);
285
- elm.dispatchEvent(ev);
286
- return ev;
287
- };
288
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
289
- var registerStyle = (scopeId2, cssText, allowCS) => {
290
- let style = styles.get(scopeId2);
291
- if (supportsConstructableStylesheets && allowCS) {
292
- style = style || new CSSStyleSheet();
293
- if (typeof style === "string") {
294
- style = cssText;
295
- } else {
296
- style.replaceSync(cssText);
297
- }
298
- } else {
299
- style = cssText;
300
- }
301
- styles.set(scopeId2, style);
302
- };
303
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
304
- var _a;
305
- const scopeId2 = getScopeId(cmpMeta);
306
- const style = styles.get(scopeId2);
307
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
308
- if (style) {
309
- if (typeof style === "string") {
310
- styleContainerNode = styleContainerNode.head || styleContainerNode;
311
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
312
- let styleElm;
313
- if (!appliedStyles) {
314
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
315
- }
316
- if (!appliedStyles.has(scopeId2)) {
317
- {
318
- styleElm = doc.createElement("style");
319
- styleElm.innerHTML = style;
320
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
321
- if (nonce != null) {
322
- styleElm.setAttribute("nonce", nonce);
323
- }
324
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
325
- if (styleContainerNode.nodeName === "HEAD") {
326
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
327
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
328
- styleContainerNode.insertBefore(styleElm, referenceNode2);
329
- } else if ("host" in styleContainerNode) {
330
- if (supportsConstructableStylesheets) {
331
- const stylesheet = new CSSStyleSheet();
332
- stylesheet.replaceSync(style);
333
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
334
- } else {
335
- const existingStyleContainer = styleContainerNode.querySelector("style");
336
- if (existingStyleContainer) {
337
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
338
- } else {
339
- styleContainerNode.prepend(styleElm);
340
- }
341
- }
342
- } else {
343
- styleContainerNode.append(styleElm);
344
- }
345
- }
346
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
347
- styleContainerNode.insertBefore(styleElm, null);
348
- }
349
- }
350
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
351
- styleElm.innerHTML += SLOT_FB_CSS;
352
- }
353
- if (appliedStyles) {
354
- appliedStyles.add(scopeId2);
355
- }
356
- }
357
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
358
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
359
- }
360
- }
361
- return scopeId2;
362
- };
363
- var attachStyles = (hostRef) => {
364
- const cmpMeta = hostRef.$cmpMeta$;
365
- const elm = hostRef.$hostElement$;
366
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
367
- addStyle(
368
- elm.getRootNode(),
369
- cmpMeta);
370
- endAttachStyles();
371
- };
372
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
373
257
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
374
258
  if (oldValue !== newValue) {
375
259
  memberName.toLowerCase();
@@ -377,6 +261,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
377
261
  const classList = elm.classList;
378
262
  const oldClasses = parseClassList(oldValue);
379
263
  const newClasses = parseClassList(newValue);
264
+ if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
265
+ newClasses.push(elm["s-si"]);
266
+ }
380
267
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
381
268
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
382
269
  }
@@ -484,7 +371,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
484
371
  };
485
372
  var putBackInOriginalLocation = (parentElm, recursive) => {
486
373
  plt.$flags$ |= 1 /* isTmpDisconnected */;
487
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
374
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
488
375
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
489
376
  let node = parentElm;
490
377
  while (node = node.nextSibling) {
@@ -688,7 +575,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
688
575
  }
689
576
  };
690
577
  var updateFallbackSlotVisibility = (elm) => {
691
- const childNodes = elm.childNodes;
578
+ const childNodes = elm.__childNodes || elm.childNodes;
692
579
  for (const childNode of childNodes) {
693
580
  if (childNode.nodeType === 1 /* ElementNode */) {
694
581
  if (childNode["s-sr"]) {
@@ -701,7 +588,7 @@ var updateFallbackSlotVisibility = (elm) => {
701
588
  childNode.hidden = true;
702
589
  break;
703
590
  }
704
- } else {
591
+ } else if (slotName === siblingNode["s-sn"]) {
705
592
  if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
706
593
  childNode.hidden = true;
707
594
  break;
@@ -719,9 +606,10 @@ var markSlotContentForRelocation = (elm) => {
719
606
  let node;
720
607
  let hostContentNodes;
721
608
  let j;
722
- for (const childNode of elm.childNodes) {
609
+ const children = elm.__childNodes || elm.childNodes;
610
+ for (const childNode of children) {
723
611
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
724
- hostContentNodes = node.parentNode.childNodes;
612
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
725
613
  const slotName = childNode["s-sn"];
726
614
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
727
615
  node = hostContentNodes[j];
@@ -870,6 +758,122 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
870
758
  }
871
759
  contentRef = void 0;
872
760
  };
761
+ var createTime = (fnName, tagName = "") => {
762
+ {
763
+ return () => {
764
+ return;
765
+ };
766
+ }
767
+ };
768
+ var uniqueTime = (key, measureText) => {
769
+ {
770
+ return () => {
771
+ return;
772
+ };
773
+ }
774
+ };
775
+ var parsePropertyValue = (propValue, propType) => {
776
+ if (propValue != null && !isComplexType(propValue)) {
777
+ if (propType & 4 /* Boolean */) {
778
+ return propValue === "false" ? false : propValue === "" || !!propValue;
779
+ }
780
+ if (propType & 1 /* String */) {
781
+ return String(propValue);
782
+ }
783
+ return propValue;
784
+ }
785
+ return propValue;
786
+ };
787
+ var emitEvent = (elm, name, opts) => {
788
+ const ev = plt.ce(name, opts);
789
+ elm.dispatchEvent(ev);
790
+ return ev;
791
+ };
792
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
793
+ var registerStyle = (scopeId2, cssText, allowCS) => {
794
+ let style = styles.get(scopeId2);
795
+ if (supportsConstructableStylesheets && allowCS) {
796
+ style = style || new CSSStyleSheet();
797
+ if (typeof style === "string") {
798
+ style = cssText;
799
+ } else {
800
+ style.replaceSync(cssText);
801
+ }
802
+ } else {
803
+ style = cssText;
804
+ }
805
+ styles.set(scopeId2, style);
806
+ };
807
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
808
+ var _a;
809
+ const scopeId2 = getScopeId(cmpMeta);
810
+ const style = styles.get(scopeId2);
811
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
812
+ if (style) {
813
+ if (typeof style === "string") {
814
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
815
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
816
+ let styleElm;
817
+ if (!appliedStyles) {
818
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
819
+ }
820
+ if (!appliedStyles.has(scopeId2)) {
821
+ {
822
+ styleElm = doc.createElement("style");
823
+ styleElm.innerHTML = style;
824
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
825
+ if (nonce != null) {
826
+ styleElm.setAttribute("nonce", nonce);
827
+ }
828
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
829
+ if (styleContainerNode.nodeName === "HEAD") {
830
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
831
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
832
+ styleContainerNode.insertBefore(styleElm, referenceNode2);
833
+ } else if ("host" in styleContainerNode) {
834
+ if (supportsConstructableStylesheets) {
835
+ const stylesheet = new CSSStyleSheet();
836
+ stylesheet.replaceSync(style);
837
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
838
+ } else {
839
+ const existingStyleContainer = styleContainerNode.querySelector("style");
840
+ if (existingStyleContainer) {
841
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
842
+ } else {
843
+ styleContainerNode.prepend(styleElm);
844
+ }
845
+ }
846
+ } else {
847
+ styleContainerNode.append(styleElm);
848
+ }
849
+ }
850
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
851
+ styleContainerNode.insertBefore(styleElm, null);
852
+ }
853
+ }
854
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
855
+ styleElm.innerHTML += SLOT_FB_CSS;
856
+ }
857
+ if (appliedStyles) {
858
+ appliedStyles.add(scopeId2);
859
+ }
860
+ }
861
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
862
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
863
+ }
864
+ }
865
+ return scopeId2;
866
+ };
867
+ var attachStyles = (hostRef) => {
868
+ const cmpMeta = hostRef.$cmpMeta$;
869
+ const elm = hostRef.$hostElement$;
870
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
871
+ addStyle(
872
+ elm.getRootNode(),
873
+ cmpMeta);
874
+ endAttachStyles();
875
+ };
876
+ var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
873
877
 
874
878
  // src/runtime/update-component.ts
875
879
  var attachToAncestor = (hostRef, ancestorComponent) => {
@@ -1033,16 +1037,62 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1033
1037
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1034
1038
  members.map(([memberName, [memberFlags]]) => {
1035
1039
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1036
- Object.defineProperty(prototype, memberName, {
1037
- get() {
1038
- return getValue(this, memberName);
1039
- },
1040
- set(newValue) {
1041
- setValue(this, memberName, newValue, cmpMeta);
1042
- },
1043
- configurable: true,
1044
- enumerable: true
1045
- });
1040
+ if ((memberFlags & 2048 /* Getter */) === 0) {
1041
+ Object.defineProperty(prototype, memberName, {
1042
+ get() {
1043
+ return getValue(this, memberName);
1044
+ },
1045
+ set(newValue) {
1046
+ setValue(this, memberName, newValue, cmpMeta);
1047
+ },
1048
+ configurable: true,
1049
+ enumerable: true
1050
+ });
1051
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
1052
+ {
1053
+ Object.defineProperty(prototype, memberName, {
1054
+ get() {
1055
+ const ref = getHostRef(this);
1056
+ const instance = ref ? ref.$lazyInstance$ : prototype;
1057
+ if (!instance) return;
1058
+ return instance[memberName];
1059
+ },
1060
+ configurable: true,
1061
+ enumerable: true
1062
+ });
1063
+ }
1064
+ if (memberFlags & 4096 /* Setter */) {
1065
+ const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
1066
+ Object.defineProperty(prototype, memberName, {
1067
+ set(newValue) {
1068
+ const ref = getHostRef(this);
1069
+ if (origSetter) {
1070
+ const currentValue = ref.$hostElement$[memberName];
1071
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1072
+ ref.$instanceValues$.set(memberName, currentValue);
1073
+ }
1074
+ origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
1075
+ setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
1076
+ return;
1077
+ }
1078
+ if (!ref) return;
1079
+ const setterSetVal = () => {
1080
+ const currentValue = ref.$lazyInstance$[memberName];
1081
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1082
+ ref.$instanceValues$.set(memberName, currentValue);
1083
+ }
1084
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
1085
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1086
+ };
1087
+ if (ref.$lazyInstance$) {
1088
+ setterSetVal();
1089
+ } else {
1090
+ ref.$onReadyPromise$.then(() => setterSetVal());
1091
+ }
1092
+ }
1093
+ });
1094
+ }
1095
+ }
1046
1096
  }
1047
1097
  });
1048
1098
  if ((flags & 1 /* isElementConstructor */)) {
@@ -1071,7 +1121,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1071
1121
  }
1072
1122
  return;
1073
1123
  }
1074
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1124
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1125
+ if (!propDesc.get || !!propDesc.set) {
1126
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1127
+ }
1075
1128
  });
1076
1129
  };
1077
1130
  Cstr.observedAttributes = Array.from(
@@ -1317,4 +1370,4 @@ var setNonce = (nonce) => plt.$nonce$ = nonce;
1317
1370
 
1318
1371
  export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
1319
1372
 
1320
- //# sourceMappingURL=index-73dab88a.js.map
1373
+ //# sourceMappingURL=index-000f519f.js.map