@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
@@ -24,7 +24,7 @@ const NAMESPACE = 'iris-button';
24
24
  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 };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.23.0 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
@@ -202,20 +202,6 @@ var unwrapErr = (result) => {
202
202
  throw result.value;
203
203
  }
204
204
  };
205
- var createTime = (fnName, tagName = "") => {
206
- {
207
- return () => {
208
- return;
209
- };
210
- }
211
- };
212
- var uniqueTime = (key, measureText) => {
213
- {
214
- return () => {
215
- return;
216
- };
217
- }
218
- };
219
205
  var h = (nodeName, vnodeData, ...children) => {
220
206
  let child = null;
221
207
  let key = null;
@@ -290,108 +276,6 @@ var newVNode = (tag, text) => {
290
276
  };
291
277
  var Host = {};
292
278
  var isHost = (node) => node && node.$tag$ === Host;
293
- var parsePropertyValue = (propValue, propType) => {
294
- if (propValue != null && !isComplexType(propValue)) {
295
- if (propType & 4 /* Boolean */) {
296
- return propValue === "false" ? false : propValue === "" || !!propValue;
297
- }
298
- if (propType & 1 /* String */) {
299
- return String(propValue);
300
- }
301
- return propValue;
302
- }
303
- return propValue;
304
- };
305
- var emitEvent = (elm, name, opts) => {
306
- const ev = plt.ce(name, opts);
307
- elm.dispatchEvent(ev);
308
- return ev;
309
- };
310
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
311
- var registerStyle = (scopeId2, cssText, allowCS) => {
312
- let style = styles.get(scopeId2);
313
- if (supportsConstructableStylesheets && allowCS) {
314
- style = style || new CSSStyleSheet();
315
- if (typeof style === "string") {
316
- style = cssText;
317
- } else {
318
- style.replaceSync(cssText);
319
- }
320
- } else {
321
- style = cssText;
322
- }
323
- styles.set(scopeId2, style);
324
- };
325
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
326
- var _a;
327
- const scopeId2 = getScopeId(cmpMeta);
328
- const style = styles.get(scopeId2);
329
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
330
- if (style) {
331
- if (typeof style === "string") {
332
- styleContainerNode = styleContainerNode.head || styleContainerNode;
333
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
334
- let styleElm;
335
- if (!appliedStyles) {
336
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
337
- }
338
- if (!appliedStyles.has(scopeId2)) {
339
- {
340
- styleElm = doc.createElement("style");
341
- styleElm.innerHTML = style;
342
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
343
- if (nonce != null) {
344
- styleElm.setAttribute("nonce", nonce);
345
- }
346
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
347
- if (styleContainerNode.nodeName === "HEAD") {
348
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
349
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
350
- styleContainerNode.insertBefore(styleElm, referenceNode2);
351
- } else if ("host" in styleContainerNode) {
352
- if (supportsConstructableStylesheets) {
353
- const stylesheet = new CSSStyleSheet();
354
- stylesheet.replaceSync(style);
355
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
356
- } else {
357
- const existingStyleContainer = styleContainerNode.querySelector("style");
358
- if (existingStyleContainer) {
359
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
360
- } else {
361
- styleContainerNode.prepend(styleElm);
362
- }
363
- }
364
- } else {
365
- styleContainerNode.append(styleElm);
366
- }
367
- }
368
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
369
- styleContainerNode.insertBefore(styleElm, null);
370
- }
371
- }
372
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
373
- styleElm.innerHTML += SLOT_FB_CSS;
374
- }
375
- if (appliedStyles) {
376
- appliedStyles.add(scopeId2);
377
- }
378
- }
379
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
380
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
381
- }
382
- }
383
- return scopeId2;
384
- };
385
- var attachStyles = (hostRef) => {
386
- const cmpMeta = hostRef.$cmpMeta$;
387
- const elm = hostRef.$hostElement$;
388
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
389
- addStyle(
390
- elm.getRootNode(),
391
- cmpMeta);
392
- endAttachStyles();
393
- };
394
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
395
279
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
396
280
  if (oldValue !== newValue) {
397
281
  memberName.toLowerCase();
@@ -399,6 +283,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
399
283
  const classList = elm.classList;
400
284
  const oldClasses = parseClassList(oldValue);
401
285
  const newClasses = parseClassList(newValue);
286
+ if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
287
+ newClasses.push(elm["s-si"]);
288
+ }
402
289
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
403
290
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
404
291
  }
@@ -506,7 +393,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
506
393
  };
507
394
  var putBackInOriginalLocation = (parentElm, recursive) => {
508
395
  plt.$flags$ |= 1 /* isTmpDisconnected */;
509
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
396
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
510
397
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
511
398
  let node = parentElm;
512
399
  while (node = node.nextSibling) {
@@ -710,7 +597,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
710
597
  }
711
598
  };
712
599
  var updateFallbackSlotVisibility = (elm) => {
713
- const childNodes = elm.childNodes;
600
+ const childNodes = elm.__childNodes || elm.childNodes;
714
601
  for (const childNode of childNodes) {
715
602
  if (childNode.nodeType === 1 /* ElementNode */) {
716
603
  if (childNode["s-sr"]) {
@@ -723,7 +610,7 @@ var updateFallbackSlotVisibility = (elm) => {
723
610
  childNode.hidden = true;
724
611
  break;
725
612
  }
726
- } else {
613
+ } else if (slotName === siblingNode["s-sn"]) {
727
614
  if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
728
615
  childNode.hidden = true;
729
616
  break;
@@ -741,9 +628,10 @@ var markSlotContentForRelocation = (elm) => {
741
628
  let node;
742
629
  let hostContentNodes;
743
630
  let j;
744
- for (const childNode of elm.childNodes) {
631
+ const children = elm.__childNodes || elm.childNodes;
632
+ for (const childNode of children) {
745
633
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
746
- hostContentNodes = node.parentNode.childNodes;
634
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
747
635
  const slotName = childNode["s-sn"];
748
636
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
749
637
  node = hostContentNodes[j];
@@ -892,6 +780,122 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
892
780
  }
893
781
  contentRef = void 0;
894
782
  };
783
+ var createTime = (fnName, tagName = "") => {
784
+ {
785
+ return () => {
786
+ return;
787
+ };
788
+ }
789
+ };
790
+ var uniqueTime = (key, measureText) => {
791
+ {
792
+ return () => {
793
+ return;
794
+ };
795
+ }
796
+ };
797
+ var parsePropertyValue = (propValue, propType) => {
798
+ if (propValue != null && !isComplexType(propValue)) {
799
+ if (propType & 4 /* Boolean */) {
800
+ return propValue === "false" ? false : propValue === "" || !!propValue;
801
+ }
802
+ if (propType & 1 /* String */) {
803
+ return String(propValue);
804
+ }
805
+ return propValue;
806
+ }
807
+ return propValue;
808
+ };
809
+ var emitEvent = (elm, name, opts) => {
810
+ const ev = plt.ce(name, opts);
811
+ elm.dispatchEvent(ev);
812
+ return ev;
813
+ };
814
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
815
+ var registerStyle = (scopeId2, cssText, allowCS) => {
816
+ let style = styles.get(scopeId2);
817
+ if (supportsConstructableStylesheets && allowCS) {
818
+ style = style || new CSSStyleSheet();
819
+ if (typeof style === "string") {
820
+ style = cssText;
821
+ } else {
822
+ style.replaceSync(cssText);
823
+ }
824
+ } else {
825
+ style = cssText;
826
+ }
827
+ styles.set(scopeId2, style);
828
+ };
829
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
830
+ var _a;
831
+ const scopeId2 = getScopeId(cmpMeta);
832
+ const style = styles.get(scopeId2);
833
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
834
+ if (style) {
835
+ if (typeof style === "string") {
836
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
837
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
838
+ let styleElm;
839
+ if (!appliedStyles) {
840
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
841
+ }
842
+ if (!appliedStyles.has(scopeId2)) {
843
+ {
844
+ styleElm = doc.createElement("style");
845
+ styleElm.innerHTML = style;
846
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
847
+ if (nonce != null) {
848
+ styleElm.setAttribute("nonce", nonce);
849
+ }
850
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
851
+ if (styleContainerNode.nodeName === "HEAD") {
852
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
853
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
854
+ styleContainerNode.insertBefore(styleElm, referenceNode2);
855
+ } else if ("host" in styleContainerNode) {
856
+ if (supportsConstructableStylesheets) {
857
+ const stylesheet = new CSSStyleSheet();
858
+ stylesheet.replaceSync(style);
859
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
860
+ } else {
861
+ const existingStyleContainer = styleContainerNode.querySelector("style");
862
+ if (existingStyleContainer) {
863
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
864
+ } else {
865
+ styleContainerNode.prepend(styleElm);
866
+ }
867
+ }
868
+ } else {
869
+ styleContainerNode.append(styleElm);
870
+ }
871
+ }
872
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
873
+ styleContainerNode.insertBefore(styleElm, null);
874
+ }
875
+ }
876
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
877
+ styleElm.innerHTML += SLOT_FB_CSS;
878
+ }
879
+ if (appliedStyles) {
880
+ appliedStyles.add(scopeId2);
881
+ }
882
+ }
883
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
884
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
885
+ }
886
+ }
887
+ return scopeId2;
888
+ };
889
+ var attachStyles = (hostRef) => {
890
+ const cmpMeta = hostRef.$cmpMeta$;
891
+ const elm = hostRef.$hostElement$;
892
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
893
+ addStyle(
894
+ elm.getRootNode(),
895
+ cmpMeta);
896
+ endAttachStyles();
897
+ };
898
+ var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
895
899
 
896
900
  // src/runtime/update-component.ts
897
901
  var attachToAncestor = (hostRef, ancestorComponent) => {
@@ -1055,16 +1059,62 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1055
1059
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1056
1060
  members.map(([memberName, [memberFlags]]) => {
1057
1061
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1058
- Object.defineProperty(prototype, memberName, {
1059
- get() {
1060
- return getValue(this, memberName);
1061
- },
1062
- set(newValue) {
1063
- setValue(this, memberName, newValue, cmpMeta);
1064
- },
1065
- configurable: true,
1066
- enumerable: true
1067
- });
1062
+ if ((memberFlags & 2048 /* Getter */) === 0) {
1063
+ Object.defineProperty(prototype, memberName, {
1064
+ get() {
1065
+ return getValue(this, memberName);
1066
+ },
1067
+ set(newValue) {
1068
+ setValue(this, memberName, newValue, cmpMeta);
1069
+ },
1070
+ configurable: true,
1071
+ enumerable: true
1072
+ });
1073
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
1074
+ {
1075
+ Object.defineProperty(prototype, memberName, {
1076
+ get() {
1077
+ const ref = getHostRef(this);
1078
+ const instance = ref ? ref.$lazyInstance$ : prototype;
1079
+ if (!instance) return;
1080
+ return instance[memberName];
1081
+ },
1082
+ configurable: true,
1083
+ enumerable: true
1084
+ });
1085
+ }
1086
+ if (memberFlags & 4096 /* Setter */) {
1087
+ const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
1088
+ Object.defineProperty(prototype, memberName, {
1089
+ set(newValue) {
1090
+ const ref = getHostRef(this);
1091
+ if (origSetter) {
1092
+ const currentValue = ref.$hostElement$[memberName];
1093
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1094
+ ref.$instanceValues$.set(memberName, currentValue);
1095
+ }
1096
+ origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
1097
+ setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
1098
+ return;
1099
+ }
1100
+ if (!ref) return;
1101
+ const setterSetVal = () => {
1102
+ const currentValue = ref.$lazyInstance$[memberName];
1103
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1104
+ ref.$instanceValues$.set(memberName, currentValue);
1105
+ }
1106
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
1107
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1108
+ };
1109
+ if (ref.$lazyInstance$) {
1110
+ setterSetVal();
1111
+ } else {
1112
+ ref.$onReadyPromise$.then(() => setterSetVal());
1113
+ }
1114
+ }
1115
+ });
1116
+ }
1117
+ }
1068
1118
  }
1069
1119
  });
1070
1120
  if ((flags & 1 /* isElementConstructor */)) {
@@ -1093,7 +1143,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1093
1143
  }
1094
1144
  return;
1095
1145
  }
1096
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1146
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1147
+ if (!propDesc.get || !!propDesc.set) {
1148
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1149
+ }
1097
1150
  });
1098
1151
  };
1099
1152
  Cstr.observedAttributes = Array.from(
@@ -1343,4 +1396,4 @@ exports.promiseResolve = promiseResolve;
1343
1396
  exports.registerInstance = registerInstance;
1344
1397
  exports.setNonce = setNonce;
1345
1398
 
1346
- //# sourceMappingURL=index-15a93aad.js.map
1399
+ //# sourceMappingURL=index-f882627f.js.map