@sme.up/ketchup2 2.0.0-SNAPSHOT-20250603082247 → 2.0.0-SNAPSHOT-20250603133713

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.
@@ -19,7 +19,7 @@
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,D,k,B,k),I[k+D]=!0)}if(k=null,w!==void 0&&(t(w),k=""+w),o(m)&&(t(m.key),k=""+m.key),"key"in m){w={};for(var H in m)H!=="key"&&(w[H]=m[H])}else w=m;return k&&i(w,typeof d=="function"?d.displayName||d.name||"Unknown":d),c(d,k,P,T,s(),w,_,M)}function f(d){typeof d=="object"&&d!==null&&d.$$typeof===g&&d._store&&(d._store.validated=1)}var p=L,g=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),O=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),N=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,X=Array.isArray,K=console.createTask?console.createTask:function(){return null};p={"react-stack-bottom-frame":function(d){return d()}};var ne,J={},W=p["react-stack-bottom-frame"].bind(p,a)(),G=K(r(a)),I={};Te.Fragment=y,Te.jsx=function(d,m,w,D,T){var P=1e4>N.recentlyCreatedOwnerStacks++;return u(d,m,w,!1,D,T,P?Error("react-stack-top-frame"):W,P?K(r(d)):G)},Te.jsxs=function(d,m,w,D,T){var P=1e4>N.recentlyCreatedOwnerStacks++;return u(d,m,w,!0,D,T,P?Error("react-stack-top-frame"):W,P?K(r(d)):G)}}()),Te}var vt;function Dr(){return vt||(vt=1,process.env.NODE_ENV==="production"?je.exports=Or():je.exports=Rr()),je.exports}var x=Dr();const oe={AUTOCOMPLETE:"ACP",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",IMAGE:"IMG",MULTI_AUTOCOMPLETE:"AML",SPOTLIGHT:"SPL",TEXT_FIELD:"ITX",PASSWORD:"PWD"},Pr=n=>n.t=="D8",Ar=n=>{if(n){const e=n.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class Ve{constructor(e,t){ye(this,"class");ye(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new Ve(e,e.k=="1"||e.k=="true")}getValue(){return this.value}getLegacyValue(){if(this.class.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}function Cr(n,e){if(ft(n)){const u=new Date(n);if(!isNaN(u.getTime()))return u}const t=new Date,r=n.replaceAll("/","").replaceAll("-","");let s="DDMMYYYY";e==="en"&&(s="MMDDYYYY");const a=s.indexOf("DD"),o=s.indexOf("MM");let i=0,l=0,c="";switch(r.length){case 1:case 2:return i=parseInt(r),t.setDate(i),Le(t)?t:n;case 3:case 4:return i=parseInt(r.substring(0,2)),l=parseInt(r.substring(2,4)),o===0?(t.setDate(l),t.setMonth(i-1)):a===0&&(t.setDate(i),t.setMonth(l-1)),Le(t)?t:n;case 5:case 6:{i=parseInt(r.substring(0,2)),l=parseInt(r.substring(2,4)),Number(r.substring(4))>50?c="19"+r.substring(4):c="20"+r.substring(4);let u=0,f=0;return o===0?(u=l,f=i-1,t.setFullYear(parseInt(c),f,u)):a===0&&(u=i,f=l-1,t.setFullYear(parseInt(c),f,u)),it(i,f,parseInt(c))&&Le(t)?t:n}case 7:case 8:{i=parseInt(r.substring(0,2)),l=parseInt(r.substring(2,4)),c=r.substring(4);let u=0,f=0;return o===0?(u=l,f=i-1,t.setFullYear(parseInt(c),f,u)):a===0&&(u=i,f=l-1,t.setFullYear(parseInt(c),f,u)),it(u,f,parseInt(c))&&Le(t)?t:n}}return n}function ft(n){return/^\d{4}-\d{2}-\d{2}$/.test(n)&&n.length===10}function Le(n){return n instanceof Date&&!isNaN(n.getTime())}function $r(n){if(!/^\d{8}$/.test(n))return!1;const e=parseInt(n.slice(0,4),10),t=parseInt(n.slice(4,6),10),r=parseInt(n.slice(6,8),10);return it(r,t-1,e)}function it(n,e,t){const r=[31,jr(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||n<1||n>r[e])}function jr(n){return n%4===0&&(n%100!==0||n%400===0)}function Lr(n){const e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return isNaN(e)||isNaN(Number(t))||isNaN(Number(r))?n.toString():`${e}-${t}-${r}`}class Ye{constructor(e,t){ye(this,"class");ye(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=bt.get(`${e.t}${e.p}`);if(t)return new Ye(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=bt.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const bt=new Map([["D8*YYMD",{legacyToIso(n){return $r(n)&&`${n.substring(0,4)}-${n.substring(4,6)}-${n.substring(6,8)}`||n},isoToLegacy(n){return ft(n)&&n.replaceAll("-","")||n}}]]),Ue=(n,e)=>{L.useEffect(()=>{const t=r=>{typeof n=="object"&&n!==null&&"current"in n&&n.current&&!n.current.contains(r.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[n,e])};function dt({position:n="bottom",enabled:e=!0}){const t=L.useRef(null),r=L.useRef(null),[s,a]=L.useState(0),o=L.useCallback(()=>{const i=t.current,l=r.current;if(!i||!l)return;const{top:c,left:u,width:f,height:p}=i.getBoundingClientRect();a(f);const g=l.offsetHeight,h=l.offsetWidth;if(h===0||g===0){requestAnimationFrame(o);return}let y=c+window.scrollY,S=u+window.scrollX;switch(n){case"top":y-=g;break;case"bottom":y+=p;break;case"left":S-=h;break;case"right":S+=f;break}requestAnimationFrame(()=>{l.style.transform=`translate(${S}px, ${y}px)`})},[n]);return L.useLayoutEffect(()=>{e&&t.current&&r.current&&o();const i=new MutationObserver(()=>{r.current&&o()});return r.current&&i.observe(r.current,{childList:!0,subtree:!0}),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0),i.disconnect()}},[o,e]),{anchorRef:t,targetRef:r,anchorWidth:s}}const We=(n,e,t)=>{if(t)switch(t){case"CodeOnly":return n;case"DescOnly":return e||"";case"Both":return`${n} - ${e}`}return n},kr=({helperText:n,disabled:e,state:t})=>{const r={container:`smp-helper-text ${e?"smp-helper-text-disabled":""} ${t?`smp-helper-text-${t}`:""}`};return x.jsx("span",{className:r.container,children:n})},nr=({label:n,disabled:e})=>{const t={container:`smp-label ${e?"smp-label-disabled":""}`};return x.jsx("span",{className:t.container,children:n})};function Ir(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}function He(){return He=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},He.apply(null,arguments)}function ot(n,e){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},ot(n,e)}function Nr(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,ot(n,e)}function Xe(n,e,t){if(t||arguments.length===2)for(var r=0,s=e.length,a;r<s;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return n.concat(a||Array.prototype.slice.call(e))}var ke={};/*!
22
+ <%s key={someKey} {...props} />`,D,k,B,k),I[k+D]=!0)}if(k=null,w!==void 0&&(t(w),k=""+w),o(m)&&(t(m.key),k=""+m.key),"key"in m){w={};for(var H in m)H!=="key"&&(w[H]=m[H])}else w=m;return k&&i(w,typeof d=="function"?d.displayName||d.name||"Unknown":d),c(d,k,P,T,s(),w,_,M)}function f(d){typeof d=="object"&&d!==null&&d.$$typeof===g&&d._store&&(d._store.validated=1)}var p=L,g=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),O=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),N=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,X=Array.isArray,K=console.createTask?console.createTask:function(){return null};p={"react-stack-bottom-frame":function(d){return d()}};var ne,J={},W=p["react-stack-bottom-frame"].bind(p,a)(),G=K(r(a)),I={};Te.Fragment=y,Te.jsx=function(d,m,w,D,T){var P=1e4>N.recentlyCreatedOwnerStacks++;return u(d,m,w,!1,D,T,P?Error("react-stack-top-frame"):W,P?K(r(d)):G)},Te.jsxs=function(d,m,w,D,T){var P=1e4>N.recentlyCreatedOwnerStacks++;return u(d,m,w,!0,D,T,P?Error("react-stack-top-frame"):W,P?K(r(d)):G)}}()),Te}var vt;function Dr(){return vt||(vt=1,process.env.NODE_ENV==="production"?je.exports=Or():je.exports=Rr()),je.exports}var x=Dr();const oe={AUTOCOMPLETE:"ACP",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",IMAGE:"IMG",MULTI_AUTOCOMPLETE:"AML",SPOTLIGHT:"SPL",TEXT_FIELD:"ITX",PASSWORD:"PWD"},Pr=n=>n.t=="D8",Ar=n=>{if(n){const e=n.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class Ve{constructor(e,t){ye(this,"class");ye(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new Ve(e,e.k=="1"||e.k=="true")}getValue(){return this.value}getLegacyValue(){if(this.class.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}function Cr(n,e){if(ft(n)){const u=new Date(n);if(!isNaN(u.getTime()))return u}const t=new Date,r=n.replaceAll("/","").replaceAll("-","");let s="DDMMYYYY";e==="en"&&(s="MMDDYYYY");const a=s.indexOf("DD"),o=s.indexOf("MM");let i=0,l=0,c="";switch(r.length){case 1:case 2:return i=parseInt(r),t.setDate(i),Le(t)?t:n;case 3:case 4:return i=parseInt(r.substring(0,2)),l=parseInt(r.substring(2,4)),o===0?(t.setMonth(i-1),t.setDate(l)):a===0&&(t.setMonth(l-1),t.setDate(i)),Le(t)?t:n;case 5:case 6:{i=parseInt(r.substring(0,2)),l=parseInt(r.substring(2,4)),Number(r.substring(4))>50?c="19"+r.substring(4):c="20"+r.substring(4);let u=0,f=0;return o===0?(u=l,f=i-1,t.setFullYear(parseInt(c),f,u)):a===0&&(u=i,f=l-1,t.setFullYear(parseInt(c),f,u)),it(i,f,parseInt(c))&&Le(t)?t:n}case 7:case 8:{i=parseInt(r.substring(0,2)),l=parseInt(r.substring(2,4)),c=r.substring(4);let u=0,f=0;return o===0?(u=l,f=i-1,t.setFullYear(parseInt(c),f,u)):a===0&&(u=i,f=l-1,t.setFullYear(parseInt(c),f,u)),it(u,f,parseInt(c))&&Le(t)?t:n}}return n}function ft(n){return/^\d{4}-\d{2}-\d{2}$/.test(n)&&n.length===10}function Le(n){return n instanceof Date&&!isNaN(n.getTime())}function $r(n){if(!/^\d{8}$/.test(n))return!1;const e=parseInt(n.slice(0,4),10),t=parseInt(n.slice(4,6),10),r=parseInt(n.slice(6,8),10);return it(r,t-1,e)}function it(n,e,t){const r=[31,jr(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||n<1||n>r[e])}function jr(n){return n%4===0&&(n%100!==0||n%400===0)}function Lr(n){const e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return isNaN(e)||isNaN(Number(t))||isNaN(Number(r))?n.toString():`${e}-${t}-${r}`}class Ye{constructor(e,t){ye(this,"class");ye(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=bt.get(`${e.t}${e.p}`);if(t)return new Ye(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=bt.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const bt=new Map([["D8*YYMD",{legacyToIso(n){return $r(n)&&`${n.substring(0,4)}-${n.substring(4,6)}-${n.substring(6,8)}`||n},isoToLegacy(n){return ft(n)&&n.replaceAll("-","")||n}}]]),Ue=(n,e)=>{L.useEffect(()=>{const t=r=>{typeof n=="object"&&n!==null&&"current"in n&&n.current&&!n.current.contains(r.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[n,e])};function dt({position:n="bottom",enabled:e=!0}){const t=L.useRef(null),r=L.useRef(null),[s,a]=L.useState(0),o=L.useCallback(()=>{const i=t.current,l=r.current;if(!i||!l)return;const{top:c,left:u,width:f,height:p}=i.getBoundingClientRect();a(f);const g=l.offsetHeight,h=l.offsetWidth;if(h===0||g===0){requestAnimationFrame(o);return}let y=c+window.scrollY,S=u+window.scrollX;switch(n){case"top":y-=g;break;case"bottom":y+=p;break;case"left":S-=h;break;case"right":S+=f;break}requestAnimationFrame(()=>{l.style.transform=`translate(${S}px, ${y}px)`})},[n]);return L.useLayoutEffect(()=>{e&&t.current&&r.current&&o();const i=new MutationObserver(()=>{r.current&&o()});return r.current&&i.observe(r.current,{childList:!0,subtree:!0}),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0),i.disconnect()}},[o,e]),{anchorRef:t,targetRef:r,anchorWidth:s}}const We=(n,e,t)=>{if(t)switch(t){case"CodeOnly":return n;case"DescOnly":return e||"";case"Both":return`${n} - ${e}`}return n},kr=({helperText:n,disabled:e,state:t})=>{const r={container:`smp-helper-text ${e?"smp-helper-text-disabled":""} ${t?`smp-helper-text-${t}`:""}`};return x.jsx("span",{className:r.container,children:n})},nr=({label:n,disabled:e})=>{const t={container:`smp-label ${e?"smp-label-disabled":""}`};return x.jsx("span",{className:t.container,children:n})};function Ir(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}function He(){return He=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},He.apply(null,arguments)}function ot(n,e){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},ot(n,e)}function Nr(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,ot(n,e)}function Xe(n,e,t){if(t||arguments.length===2)for(var r=0,s=e.length,a;r<s;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return n.concat(a||Array.prototype.slice.call(e))}var ke={};/*!
23
23
  * content-type
24
24
  * Copyright(c) 2015 Douglas Christopher Wilson
25
25
  * MIT Licensed
@@ -351,7 +351,7 @@ function Cr(n, e) {
351
351
  return i = parseInt(r), t.setDate(i), Ie(t) ? t : n;
352
352
  case 3:
353
353
  case 4:
354
- return i = parseInt(r.substring(0, 2)), l = parseInt(r.substring(2, 4)), o === 0 ? (t.setDate(l), t.setMonth(i - 1)) : a === 0 && (t.setDate(i), t.setMonth(l - 1)), Ie(t) ? t : n;
354
+ return i = parseInt(r.substring(0, 2)), l = parseInt(r.substring(2, 4)), o === 0 ? (t.setMonth(i - 1), t.setDate(l)) : a === 0 && (t.setMonth(l - 1), t.setDate(i)), Ie(t) ? t : n;
355
355
  case 5:
356
356
  case 6: {
357
357
  i = parseInt(r.substring(0, 2)), l = parseInt(r.substring(2, 4)), Number(r.substring(4)) > 50 ? c = "19" + r.substring(4) : c = "20" + r.substring(4);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sme.up/ketchup2",
3
- "version": "2.0.0-SNAPSHOT-20250603082247",
3
+ "version": "2.0.0-SNAPSHOT-20250603133713",
4
4
  "description": "Sme.UP web components library",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Smeup LAB <info@smeup.com> (https://www.smeup.com/)",
@@ -57,7 +57,7 @@
57
57
  "eslint-plugin-react-hooks": "5.2.0",
58
58
  "eslint-plugin-react-refresh": "0.4.20",
59
59
  "eslint-plugin-storybook": "0.12.0",
60
- "globals": "16.1.0",
60
+ "globals": "16.2.0",
61
61
  "i18next": "25",
62
62
  "jsdom": "26.1.0",
63
63
  "playwright": "1.52.0",