@genesislcap/design-system-configurator 15.92.0 → 15.93.0
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.
- package/dist/{109.109.fb2b0accbb70990590ec.js → 109.109.2ba3fbc297d70ae88db8.js} +2 -2
- package/dist/109.1860458195909a0a7e1f1372dbc60ed7.js.map +1 -0
- package/dist/{249.249.ab8c0fd9a9ad6d8f30dc.js → 249.249.513e73462de49d8857c8.js} +2 -2
- package/dist/249.51c673672aa05792337f718dcbc0e597.js.map +1 -0
- package/dist/{designSystemConfigurator.98d2bd7d5ebbc8c508790c37002f59e5.js.map → designSystemConfigurator.5bd02c3ded95828100ee1d958fa593f4.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{main.afba40c4a15ab612b377.js → main.af946969ed10d322fec8.js} +2 -2
- package/dist/{main.262eadc4786ec42363ccb197be1234d6.js.map → main.c8377a41b6407b315b935be7f17f7af8.js.map} +1 -1
- package/dist/remoteEntry.js +2 -2
- package/package.json +11 -11
- package/dist/109.d571465170a1ddda1c3d11f80c3c6484.js.map +0 -1
- package/dist/249.c6248384be1fa36db1a00b9a67c2476f.js.map +0 -1
|
@@ -3450,7 +3450,7 @@
|
|
|
3450
3450
|
${(0,a.endSlotTemplate)(e,t)}
|
|
3451
3451
|
</div>
|
|
3452
3452
|
</template>
|
|
3453
|
-
`,Rl=9,Al=new Map,Ll=e=>{var t,i;const o=Al.get(e);if(o)return o;const n=new Intl.NumberFormat(e).formatToParts(12345.6),s=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)],a={decimalSeparator:(null===(t=n.find(e=>"decimal"===e.type))||void 0===t?void 0:t.value)||".",groupSeparator:(null===(i=n.find(e=>"group"===e.type))||void 0===i?void 0:i.value)||"",digits:new Set([..."0123456789",...s]),zeroDigits:new Set(["0",s[s.length-1]])};return Al.set(e,a),a},Nl=(e,t)=>{const{decimalSeparator:i,groupSeparator:o}=Ll(t);return{decimalSeparator:i,groupSeparator:o}},Fl=/[kmb]\s*$/i,Ml=(e,t)=>{const{decimalSeparator:i,digits:o,zeroDigits:n}=Ll(t);let s=!0;return t=>{const a=e[t];return a===i?(s=!1,!0):"-"===a||"−"===a||!!o.has(a)&&((!s||!n.has(a))&&(s=!1,!0))}},_l=(e,t,i,o)=>{const n=Math.min(Math.max(i,0),e.length),s=e.length-t.length;if(s>0&&s<=n&&e.slice(0,n-s)+e.slice(n)===t)return n-s;if(n===e.length&&Fl.test(e))return t.length;const a=Ml(e,o);let r=0;for(let e=0;e<n;e+=1)a(e)&&(r+=1);const l=Ml(t,o);if(0===r){for(let e=0;e<t.length;e+=1)if(l(e))return e;return n===e.length?t.length:0}let d=0;for(let e=0;e<t.length;e+=1)if(l(e)&&(d+=1,d===r))return e+1;return t.length},Pl=(e,t)=>{const{groupSeparator:i,decimalSeparator:o}=Ll(t);let n=e.trim();return i&&(n=n.split(i).join("")),"."!==o&&(n=n.replace(o,".")),n},Hl=(e,t)=>{const{decimalSeparator:i}=Ll(t);let o=0;for(const t of e)t===i&&(o+=1);return o},zl=(e,t)=>Hl(e,t)>1,Ul=(e,t,i,o)=>((e,t,i)=>{const o=Pl(String(null!=e?e:""),t);return!(!o||!/^-?\d+$/.test(o))&&o.replace(/^-/,"").length>=i})(e,i,o)&&Hl(t,i)>0,Bl=(e,t,i)=>{const o=e.startsWith("-"),n=o?e.slice(1):e,s=n.indexOf("."),a=-1===s?n:n.slice(0,s);let r=-1===s?"":n.slice(s+1);const l=i.minimumFractionDigits,d=i.maximumFractionDigits;void 0!==d&&r.length>d&&(r=r.slice(0,d)),void 0!==l&&r.length<l&&(r=r.padEnd(l,"0"));const c=((e,t)=>{const i=e.startsWith("-"),o=i?e.slice(1):e,n=Ll(t).groupSeparator||",",s=[];let a=o;for(;a.length>3;)s.unshift(a.slice(-3)),a=a.slice(0,-3);s.unshift(a);const r=s.join(n);return i?`-${r}`:r})(o?`-${a}`:a,t),{decimalSeparator:u}=Nl(0,t);return-1===s?void 0!==l&&l>0?`${c}${u}${"0".repeat(l)}`:c:0===d?c:`${c}${u}${r}`},Vl=(e,t)=>{const{decimalSeparator:i}=Nl(0,t);return"."===i?e:e.replace(/\./g,i)},Gl=(e,t,i)=>""===e?"":(e=>{const t=e.replace(/^-/,""),i=t.indexOf(".");return(-1===i?t:t.slice(0,i)).length>15})(e)&&/^-?\d+(\.\d*)?$/.test(e)?Bl(e,t,i):Intl.NumberFormat(t,i).format(Number(e)),jl=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,s=n?e.length-o-1:0,a=t.minimumFractionDigits,r=t.maximumFractionDigits;if(s>=a&&s<=r)return e;let l=e;if(s<a){n||(l=e+".");l+="0".repeat(a-s)}if(s>r){const t=n?e.substring(0,o):e,i=(n?e.substring(o+1):"").substring(0,r);l=0===r?t:`${t}.${i}`}return l},Yl=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,s=null!=o?o:12;if(zl(n,t))return"";let a;if(i)a=((e,t)=>{const i=Pl(String(e),t),o=i.replace(/^-/,"").replace(".","").length;return/^-?\d+(\.\d+)?$/.test(i)&&o>15?i:String(new El(t).parse(String(e)))})(n,t);else{const{decimalSeparator:e}=Nl(0,t);if("."!==e){a=n.replace(new RegExp(`\\${e}`,"g"),".");const t=a.indexOf(".");-1!==t&&(a=a.substring(0,t))}else a=n}a=String(a);if(!/^-?\d*\.?\d+$/.test(a))return"";if(void 0!==s){if(a.replace(".","").replace(/^0+/,"").length>s){const e=a.indexOf(".");if(-1!==e){const t=a.substring(0,e),i=t.length;if(i>=s)return a.substring(0,s);{const o=s-i;return`${t}.${a.substring(e+1).substring(0,o)}`}}return a.substring(0,s)}}return a},Wl=(e,t,i,o)=>{if(void 0!==i&&Hl(e,t)>0){const n=Pl(e,t),s=n.indexOf("."),a=-1===s?n:n.slice(0,s);if(Ul(void 0!==o?o:a,e,t,i))return""}return((e,t,i)=>{const{decimalSeparator:o}=Nl(0,i),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp(`${n}(\\d*?)(0+)$`),a=e.match(s);if(a){const e=a[1],i=a[2],o=String(t);if(!isNaN(Number(t))){if(o.includes(".")){const t=o.split(".")[1],n=Math.max(0,i.length-(t.length-e.length));return o+"0".repeat(n)}return o+"."+e+i}}return String(t)})(e,Yl(e,t,!0,i),t)},ql=(e,t,i=!0,o,n,s)=>{const a=Yl(e,t,i,s);if(!a)return"";const r=a.replace(/^-/,"").replace(".","").length;if(/^-?\d+$/.test(a)&&r>15)try{return((e,t,i)=>{let o=BigInt(e);if(void 0!==i&&!Number.isNaN(i)){const e=BigInt(Math.trunc(i));o>e&&(o=e)}if(void 0!==t&&!Number.isNaN(t)){const e=BigInt(Math.trunc(t));o<e&&(o=e)}return o.toString()})(a,o,n)}catch(e){return a}let l=parseFloat(a);return isNaN(l)?l="":(l=Math.min(l,null!=n?n:l),l=Math.max(l,null!=o?o:l)),String(l)},Kl=e=>{try{const t="string"==typeof e?e:e.toString(),i=t.indexOf(".");if(-1===i)return 1;const o=t.substring(i+1).length;if(0===o)return 1;const n=Math.pow(10,-o);return parseFloat(n.toFixed(o))}catch(t){const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return 1;const n=i.substring(o+1).length;if(0===n)return 1;const s=Math.pow(10,-n);return parseFloat(s.toFixed(n))}};class Xl extends(Tl(r.NumberField)){constructor(){super(...arguments),this.autocomplete="off",this.hideStep=!1,this.value="",this.withFormatting=!1,this.locale="en-US",this.autoStepPrecision=!1,this.maximumInputPrecision=12,this.options={maximumFractionDigits:3,minimumFractionDigits:0}}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}stepUp(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Kl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)+t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))+1;if(a<=Rl){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))+t;o<=Rl?(e=o+e,t=0):(e="0"+e,t=1)}return 1===t?parseInt(i.substring(0,o))+1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)+t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=ql(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}stepDown(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Kl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)-t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))-1;if(a>=0){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))-t;o>=0?(e=o+e,t=0):(e=Rl.toString()+e,t=1)}return 1===t?parseInt(i.substring(0,o))-1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)-t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=ql(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}writeControlValue(e){const t=this.control,i=t.value;if(i===e)return;const{selectionStart:o,selectionEnd:n}=t;if(t.value=e,null===o||t.getRootNode().activeElement!==t)return;const s=_l(i,e,o,this.locale),a=null===n||n===o?s:_l(i,e,n,this.locale);t.setSelectionRange(s,a)}restoreControlToCommittedValue(){if(!this.control)return;const e=this.value;this.writeControlValue(e?this.withFormatting?Gl(e,this.locale,this.options):Vl(String(e),this.locale):""),this.isUserInput=!1}skipGroupSeparator(e){if(!this.withFormatting||e.ctrlKey||e.metaKey||e.altKey)return;const{value:t,selectionStart:i,selectionEnd:o}=this.control;if(null===i||i!==o)return;const{groupSeparator:n}=Nl(0,this.locale);n&&(e.key===Ol.R9&&t[i-1]===n?this.control.setSelectionRange(i-1,i-1):e.key===Ol.De&&t[i]===n&&this.control.setSelectionRange(i+1,i+1))}handleKeyDown(e){return e.key===Ol.Mm&&(this.isUserInput=!1),!this.control||e.key!==Ol.R9&&e.key!==Ol.De||this.skipGroupSeparator(e),super.handleKeyDown(e)}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(zl(this.control.value,this.locale)||Ul(this.value,this.control.value,this.locale,this.maximumInputPrecision)?this.restoreControlToCommittedValue():(this.isUserInput=!0,this.withFormatting&&!new El(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=this.value,t=Wl(this.control.value,this.locale,this.maximumInputPrecision,this.value);if(t||!e||""===this.control.value){if(this.control){const e=this.withFormatting&&""!==t?Gl(t,this.locale,this.options):Vl(t,this.locale);this.writeControlValue(jl(e,this.options))}this.value=jl(t,this.options),this.$emit("input")}else this.restoreControlToCommittedValue()}):this.withFormatting||this.hasSeparatorWithoutDecimals().test(this.control.value)||l.DOM.queueUpdate(()=>{var e;this.control&&this.writeControlValue(this.control.value.replace(/[^0-9\-+e.]/g,"")),this.value=(null===(e=this.control)||void 0===e?void 0:e.value)||"",this.$emit("input")})))}valueChanged(e,t){if(null!=t||!this.control)return null!=t&&t!==e?this.isUserInput?void 0:(this.value=ql(this.value,this.locale,!1,this.min,this.max,this.maximumInputPrecision),void l.DOM.queueUpdate(()=>{this.isUserInput||this.control&&(this.control.value=this.withFormatting&&this.value?Gl(this.value,this.locale,this.options):this.value)})):void 0;this.control.value=""}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=ql(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?jl(e,this.options):e),this.control.value=this.withFormatting&&this.value?Gl(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],Xl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xl.prototype,"hideStep",void 0),(0,C.Cg)([(0,l.attr)({converter:{fromView:e=>null==e?"":String(e),toView:e=>e}})],Xl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],Xl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],Xl.prototype,"maximumInputPrecision",void 0);const Jl={delegatesFocus:!0,mode:"open"},Ql={stepDownGlyph:'\n <svg class="step-down-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 8C5.02785 8 4.45387 9.2649 5.16108 10.0731L10.6829 16.3838C11.3801 17.1806 12.6197 17.1806 13.3169 16.3838L18.8388 10.0731C19.5459 9.2649 18.972 8 17.898 8H6.1018Z"/>\n </svg>\n ',stepUpGlyph:'\n <svg class="step-up-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 16.9814C5.02785 16.9814 4.45387 15.7165 5.16108 14.9083L10.6829 8.59762C11.3801 7.80079 12.6197 7.80079 13.3169 8.59762L18.8388 14.9083C19.5459 15.7165 18.972 16.9814 17.898 16.9814H6.1018Z"/>\n </svg>\n '},Zl=Xl.compose(Object.assign({baseName:"number-field",template:Il,styles:Dl,shadowOptions:Jl},Ql)),ed=(e,t)=>l.css`
|
|
3453
|
+
`,Rl=9,Al=new Map,Ll=e=>{var t,i;const o=Al.get(e);if(o)return o;const n=new Intl.NumberFormat(e).formatToParts(12345.6),s=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)],a={decimalSeparator:(null===(t=n.find(e=>"decimal"===e.type))||void 0===t?void 0:t.value)||".",groupSeparator:(null===(i=n.find(e=>"group"===e.type))||void 0===i?void 0:i.value)||"",digits:new Set([..."0123456789",...s]),zeroDigits:new Set(["0",s[s.length-1]])};return Al.set(e,a),a},Nl=(e,t)=>{const{decimalSeparator:i,groupSeparator:o}=Ll(t);return{decimalSeparator:i,groupSeparator:o}},Fl=/[kmb]\s*$/i,Ml=(e,t)=>{const{decimalSeparator:i,digits:o,zeroDigits:n}=Ll(t);let s=!0;return t=>{const a=e[t];return a===i?(s=!1,!0):"-"===a||"−"===a||!!o.has(a)&&((!s||!n.has(a))&&(s=!1,!0))}},_l=(e,t,i,o)=>{const n=Math.min(Math.max(i,0),e.length),s=e.length-t.length;if(s>0&&s<=n&&e.slice(0,n-s)+e.slice(n)===t)return n-s;if(n===e.length&&Fl.test(e))return t.length;const a=Ml(e,o);let r=0;for(let e=0;e<n;e+=1)a(e)&&(r+=1);const l=Ml(t,o);if(0===r){for(let e=0;e<t.length;e+=1)if(l(e))return e;return n===e.length?t.length:0}let d=0;for(let e=0;e<t.length;e+=1)if(l(e)&&(d+=1,d===r))return e+1;return t.length},Pl=(e,t)=>{const{groupSeparator:i,decimalSeparator:o}=Ll(t);let n=e.trim();return i&&(n=n.split(i).join("")),"."!==o&&(n=n.replace(o,".")),n},Hl=(e,t)=>{const{decimalSeparator:i}=Ll(t);let o=0;for(const t of e)t===i&&(o+=1);return o},zl=(e,t)=>Hl(e,t)>1,Ul=(e,t,i,o)=>((e,t,i)=>{const o=Pl(String(null!=e?e:""),t);return!(!o||!/^-?\d+$/.test(o))&&o.replace(/^-/,"").length>=i})(e,i,o)&&Hl(t,i)>0,Bl=(e,t,i)=>{const o=e.startsWith("-"),n=o?e.slice(1):e,s=n.indexOf("."),a=-1===s?n:n.slice(0,s);let r=-1===s?"":n.slice(s+1);const l=i.minimumFractionDigits,d=i.maximumFractionDigits;void 0!==d&&r.length>d&&(r=r.slice(0,d)),void 0!==l&&r.length<l&&(r=r.padEnd(l,"0"));const c=((e,t)=>{const i=e.startsWith("-"),o=i?e.slice(1):e,n=Ll(t).groupSeparator||",",s=[];let a=o;for(;a.length>3;)s.unshift(a.slice(-3)),a=a.slice(0,-3);s.unshift(a);const r=s.join(n);return i?`-${r}`:r})(o?`-${a}`:a,t),{decimalSeparator:u}=Nl(0,t);return-1===s?void 0!==l&&l>0?`${c}${u}${"0".repeat(l)}`:c:0===d?c:`${c}${u}${r}`},Vl=(e,t)=>{const{decimalSeparator:i}=Nl(0,t);return"."===i?e:e.replace(/\./g,i)},Gl=(e,t,i)=>""===e?"":(e=>{const t=e.replace(/^-/,""),i=t.indexOf(".");return(-1===i?t:t.slice(0,i)).length>15})(e)&&/^-?\d+(\.\d*)?$/.test(e)?Bl(e,t,i):Intl.NumberFormat(t,i).format(Number(e)),jl=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,s=n?e.length-o-1:0,a=t.minimumFractionDigits,r=t.maximumFractionDigits;if(s>=a&&s<=r)return e;let l=e;if(s<a){n||(l=e+".");l+="0".repeat(a-s)}if(s>r){const t=n?e.substring(0,o):e,i=(n?e.substring(o+1):"").substring(0,r);l=0===r?t:`${t}.${i}`}return l},Yl=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,s=null!=o?o:12;if(zl(n,t))return"";let a;if(i)a=((e,t)=>{const i=Pl(String(e),t),o=i.replace(/^-/,"").replace(".","").length;return/^-?\d+(\.\d+)?$/.test(i)&&o>15?i:String(new El(t).parse(String(e)))})(n,t);else{const{decimalSeparator:e}=Nl(0,t);if("."!==e){a=n.replace(new RegExp(`\\${e}`,"g"),".");const t=a.indexOf(".");-1!==t&&(a=a.substring(0,t))}else a=n}a=String(a);if(!/^-?\d*\.?\d+$/.test(a))return"";if(void 0!==s){if(a.replace(".","").replace(/^0+/,"").length>s){const e=a.indexOf(".");if(-1!==e){const t=a.substring(0,e),i=t.length;if(i>=s)return a.substring(0,s);{const o=s-i;return`${t}.${a.substring(e+1).substring(0,o)}`}}return a.substring(0,s)}}return a},Wl=(e,t,i,o)=>{if(void 0!==i&&Hl(e,t)>0){const n=Pl(e,t),s=n.indexOf("."),a=-1===s?n:n.slice(0,s);if(Ul(void 0!==o?o:a,e,t,i))return""}return((e,t,i)=>{const{decimalSeparator:o}=Nl(0,i),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp(`${n}(\\d*?)(0+)$`),a=e.match(s);if(a){const e=a[1],i=a[2],o=String(t);if(!isNaN(Number(t))){if(o.includes(".")){const t=o.split(".")[1],n=Math.max(0,i.length-(t.length-e.length));return o+"0".repeat(n)}return o+"."+e+i}}return String(t)})(e,Yl(e,t,!0,i),t)},ql=(e,t,i=!0,o,n,s)=>{const a=Yl(e,t,i,s);if(!a)return"";const r=a.replace(/^-/,"").replace(".","").length;if(/^-?\d+$/.test(a)&&r>15)try{return((e,t,i)=>{let o=BigInt(e);if(void 0!==i&&!Number.isNaN(i)){const e=BigInt(Math.trunc(i));o>e&&(o=e)}if(void 0!==t&&!Number.isNaN(t)){const e=BigInt(Math.trunc(t));o<e&&(o=e)}return o.toString()})(a,o,n)}catch(e){return a}let l=parseFloat(a);return isNaN(l)?l="":(l=Math.min(l,null!=n?n:l),l=Math.max(l,null!=o?o:l)),String(l)},Kl=e=>{try{const t="string"==typeof e?e:e.toString(),i=t.indexOf(".");if(-1===i)return 1;const o=t.substring(i+1).length;if(0===o)return 1;const n=Math.pow(10,-o);return parseFloat(n.toFixed(o))}catch(t){const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return 1;const n=i.substring(o+1).length;if(0===n)return 1;const s=Math.pow(10,-n);return parseFloat(s.toFixed(n))}};class Xl extends(Tl(r.NumberField)){constructor(){super(...arguments),this.autocomplete="off",this.hideStep=!1,this.value="",this.withFormatting=!1,this.locale="en-US",this.autoStepPrecision=!1,this.maximumInputPrecision=12,this.options={maximumFractionDigits:3,minimumFractionDigits:0}}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}stepUp(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Kl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)+t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))+1;if(a<=Rl){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))+t;o<=Rl?(e=o+e,t=0):(e="0"+e,t=1)}return 1===t?parseInt(i.substring(0,o))+1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)+t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=ql(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}stepDown(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Kl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)-t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))-1;if(a>=0){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))-t;o>=0?(e=o+e,t=0):(e=Rl.toString()+e,t=1)}return 1===t?parseInt(i.substring(0,o))-1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)-t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=ql(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}writeControlValue(e){const t=this.control,i=t.value;if(i===e)return;const{selectionStart:o,selectionEnd:n}=t;if(t.value=e,null===o||t.getRootNode().activeElement!==t)return;const s=_l(i,e,o,this.locale),a=null===n||n===o?s:_l(i,e,n,this.locale);t.setSelectionRange(s,a)}restoreControlToCommittedValue(){if(!this.control)return;const e=this.value;this.writeControlValue(e?this.withFormatting?Gl(e,this.locale,this.options):Vl(String(e),this.locale):""),this.isUserInput=!1}skipGroupSeparator(e){if(!this.withFormatting||e.ctrlKey||e.metaKey||e.altKey)return;const{value:t,selectionStart:i,selectionEnd:o}=this.control;if(null===i||i!==o)return;const{groupSeparator:n}=Nl(0,this.locale);n&&(e.key===Ol.R9&&t[i-1]===n?this.control.setSelectionRange(i-1,i-1):e.key===Ol.De&&t[i]===n&&this.control.setSelectionRange(i+1,i+1))}handleKeyDown(e){return e.key===Ol.Mm&&(this.isUserInput=!1),!this.control||e.key!==Ol.R9&&e.key!==Ol.De||this.skipGroupSeparator(e),super.handleKeyDown(e)}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(zl(this.control.value,this.locale)||Ul(this.value,this.control.value,this.locale,this.maximumInputPrecision)?this.restoreControlToCommittedValue():(this.isUserInput=!0,this.withFormatting&&!new El(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=this.value,t=Wl(this.control.value,this.locale,this.maximumInputPrecision,this.value);if(t||!e||""===this.control.value){if(this.control){const e=this.withFormatting&&""!==t?Gl(t,this.locale,this.options):Vl(t,this.locale);this.writeControlValue(jl(e,this.options))}this.value=jl(t,this.options),this.$emit("input")}else this.restoreControlToCommittedValue()}):this.withFormatting||this.hasSeparatorWithoutDecimals().test(this.control.value)||l.DOM.queueUpdate(()=>{var e;this.control&&this.writeControlValue(this.control.value.replace(/[^0-9.-]/g,"").replace(/(?!^)-/g,"")),this.value=(null===(e=this.control)||void 0===e?void 0:e.value)||"",this.$emit("input")})))}valueChanged(e,t){if(null!=t||!this.control)return null!=t&&t!==e?this.isUserInput?void 0:(this.value=ql(this.value,this.locale,!1,this.min,this.max,this.maximumInputPrecision),void l.DOM.queueUpdate(()=>{this.isUserInput||this.control&&(this.control.value=this.withFormatting&&this.value?Gl(this.value,this.locale,this.options):this.value)})):void 0;this.control.value=""}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=ql(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?jl(e,this.options):e),this.control.value=this.withFormatting&&this.value?Gl(this.value,this.locale,this.options):this.value,this.$emit("input")}}(0,C.Cg)([l.attr],Xl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xl.prototype,"hideStep",void 0),(0,C.Cg)([(0,l.attr)({converter:{fromView:e=>null==e?"":String(e),toView:e=>e}})],Xl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],Xl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],Xl.prototype,"maximumInputPrecision",void 0);const Jl={delegatesFocus:!0,mode:"open"},Ql={stepDownGlyph:'\n <svg class="step-down-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 8C5.02785 8 4.45387 9.2649 5.16108 10.0731L10.6829 16.3838C11.3801 17.1806 12.6197 17.1806 13.3169 16.3838L18.8388 10.0731C19.5459 9.2649 18.972 8 17.898 8H6.1018Z"/>\n </svg>\n ',stepUpGlyph:'\n <svg class="step-up-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 16.9814C5.02785 16.9814 4.45387 15.7165 5.16108 14.9083L10.6829 8.59762C11.3801 7.80079 12.6197 7.80079 13.3169 8.59762L18.8388 14.9083C19.5459 15.7165 18.972 16.9814 17.898 16.9814H6.1018Z"/>\n </svg>\n '},Zl=Xl.compose(Object.assign({baseName:"number-field",template:Il,styles:Dl,shadowOptions:Jl},Ql)),ed=(e,t)=>l.css`
|
|
3454
3454
|
:host {
|
|
3455
3455
|
display: block;
|
|
3456
3456
|
}
|
|
@@ -6823,4 +6823,4 @@ class="margin"
|
|
|
6823
6823
|
height: 70px;
|
|
6824
6824
|
}
|
|
6825
6825
|
`;class Nf extends a.FoundationElement{constructor(){super(...arguments),this.hideProgress=!1,this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.indicatorOnly=!1,this.orientation=a.TabsOrientation.vertical,this.tabs=[],this.tabpanels=[],this.progressValue=0,this.activeTabIndex=0,this.pendingNextStep=!1,this.slotsInitialized=!1,this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach((e,t)=>{if("tab"===e.slot){const i=this.activeTabIndex===t,o=t+1===this.tabIds.length,n=this.tabIds[t],s=this.tabpanelIds[t];e.setAttribute("id",n),e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("aria-disabled",i?"false":"true"),l.DOM.setBooleanAttribute(e,"selected",i),e.setAttribute("orientation",this.orientation),s&&e.setAttribute("aria-controls",s),e.setAttribute("tab-position",String(t+1)),l.DOM.setBooleanAttribute(e,"isLast",o),l.DOM.setBooleanAttribute(e,"hideStepNumber",!0===this.hideStepNumber),e.setAttribute("tabindex",i?"0":"-1"),l.DOM.setBooleanAttribute(e,"showCursorPointer",t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps),i&&(this.activetab=e,this.activeid=n)}}),0===this.activeTabIndex&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)});const t=this.indicatorOnly?this.tabs.length:this.tabpanels.length;this.progressValue=t?Math.round(e/t*100):0},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{const i=this.tabIds[t],o=this.tabpanelIds[t];e.setAttribute("id",o),e.setAttribute("aria-labelledby",i),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("hidden")})}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels())}activeidChanged(e,t){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}setTabsAndTabPanels(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.getCompletedTabs(),this.slotsInitialized=this.tabs.length>0&&(this.indicatorOnly||this.tabpanels.length>0)}checkAndExecutePendingNextStep(){this.pendingNextStep&&this.slotsInitialized&&(this.pendingNextStep=!1,this.nextStep())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}goToStep(e,t=!1){const i=e-1;if(e<1||e>this.tabs.length)return dt.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(i===this.activeTabIndex)return!1;if(t){if(i<this.activeTabIndex)return this.handleBackwardJump(i);if(i>this.activeTabIndex)return this.handleForwardJump(i)}if(i<this.activeTabIndex&&this.allowBackwardJumps){return this.handleBackwardJump(i)}if(i>this.activeTabIndex&&this.allowForwardJumps){return this.handleForwardJump(i)}return i===this.activeTabIndex+1?(this.nextStep(),!0):(dt.warn(`[Stepper] Cannot jump to step ${e}. Jumps are not allowed or step is not adjacent.`),!1)}goToFirstStep(){return this.goToStep(1,!0)}goToLastStep(){return this.goToStep(this.tabs.length,!0)}handleStepClick(e){e<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(e):e>this.activeTabIndex&&this.allowForwardJumps&&this.handleForwardJump(e)}handleBackwardJump(e){for(let t=e+1;t<=this.activeTabIndex;t+=1)this.tabs[t].completed=!1;return this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}handleForwardJump(e){for(let t=this.activeTabIndex;t<e;t+=1)if(this.validation&&this.validation[t]){if(!this.validation[t].isValid())return this.tabs[t].completed=!1,this.tabs[t].error=!0,this.getCompletedTabs(),this.$emit("validation-failure",{stepIndex:t,stepId:this.tabIds[t],message:`Validation failed for step ${t+1}`}),!1;this.tabs[t].error=!1}for(let t=this.activeTabIndex;t<e;t+=1)this.tabs[t].completed=!0,this.tabs[t].error=!1;return this.tabs[e].completed=!1,this.tabs[e].error=!1,this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.getCompletedTabs(),this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}get disabledPreviousStep(){return 0===this.activeTabIndex}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){var e;const t=this.tabs.length-1;return this.activeTabIndex===t&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs(),!1):(this.tabs[t].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit("submit")}nextStep(){var e;if(!this.slotsInitialized)return void(this.pendingNextStep=!0);if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid())return this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,void this.getCompletedTabs();this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex=this.activeTabIndex+1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit("next-step"),this.$emit("validation-success"));const t=this.tabs.length-1,i=this.activeTabIndex===t;this.hideSubmitButton&&i&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs()):(this.tabs[t].completed=!1,this.getCompletedTabs())}previousStep(){0!==this.activeTabIndex&&(this.tabs[this.activeTabIndex].completed=!1,this.activeTabIndex=this.activeTabIndex-1,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`tab-${(0,Ea.NF)()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${(0,Ea.NF)()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}(0,C.Cg)([(0,l.attr)({attribute:"hide-submit-button",mode:"boolean"})],Nf.prototype,"hideSubmitButton",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-progress",mode:"boolean"})],Nf.prototype,"hideProgress",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-step-number",mode:"boolean"})],Nf.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-backward-jumps",mode:"boolean"})],Nf.prototype,"allowBackwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-forward-jumps",mode:"boolean"})],Nf.prototype,"allowForwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-all-buttons",mode:"boolean"})],Nf.prototype,"hideAllButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-tabs",mode:"boolean"})],Nf.prototype,"hideTabs",void 0),(0,C.Cg)([(0,l.attr)({attribute:"indicator-only",mode:"boolean"})],Nf.prototype,"indicatorOnly",void 0),(0,C.Cg)([l.attr],Nf.prototype,"orientation",void 0),(0,C.Cg)([l.attr],Nf.prototype,"activeid",void 0),(0,C.Cg)([l.observable],Nf.prototype,"tabs",void 0),(0,C.Cg)([l.observable],Nf.prototype,"tabpanels",void 0),(0,C.Cg)([l.observable],Nf.prototype,"validation",void 0),(0,C.Cg)([l.observable],Nf.prototype,"progressValue",void 0),(0,C.Cg)([l.observable],Nf.prototype,"activeTabIndex",void 0),(0,C.Cg)([l.volatile],Nf.prototype,"disabledPreviousStep",null),(0,C.Cg)([l.volatile],Nf.prototype,"isLastStep",null),(0,C.Cg)([l.volatile],Nf.prototype,"islastStepValid",null);const Ff=void 0,Mf={},_f=Nf.compose(Object.assign({baseName:"stepper",template:Af,styles:Lf,shadowOptions:Ff},Mf)),Pf=["input","textarea","select",'[contenteditable="true"]','[contenteditable=""]','[role="textbox"]','[role="searchbox"]','[role="combobox"]'],Hf={rapid:(zf="rapid",["text-field","text-area","combobox"].map(e=>`${zf}-${e}`))};var zf;function Uf(e,t=[]){const i=e.flatMap(e=>{var t;return null!==(t=Hf[e])&&void 0!==t?t:[]}),o=t.filter(Boolean);return Array.from(new Set([...Pf,...i,...o])).join(",")}Uf(["rapid"]);const Bf=()=>Id().register(ov)},70997(e,t,i){"use strict";function o(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),s=o(i);return(t,i)=>e(t,i)?n(t,i):s(t,i)}i.d(t,{q:()=>o})},80273(e,t,i){"use strict";i.d(t,{Du:()=>l,IT:()=>a,WP:()=>n,f4:()=>r,zz:()=>s});var o=i(52945);const n=(e,t)=>{(0,o.O5)(e,t)};var s,a;!function(e){e.Italic="italic",e.Normal="normal"}(s||(s={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(a||(a={}));const r=(e,t=s.Normal,i=a.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${i};\n`,l={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}}}]);
|
|
6826
|
-
//# sourceMappingURL=249.
|
|
6826
|
+
//# sourceMappingURL=249.51c673672aa05792337f718dcbc0e597.js.map
|