@lifesg/react-design-system 1.0.0-alpha.20 → 1.0.0-alpha.21
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/animations/index.d.ts +1 -0
- package/animations/index.js +6 -3
- package/animations/index.js.map +1 -1
- package/animations/loading-dots-spinner/loading-dots-spinner.d.ts +2 -0
- package/animations/loading-dots-spinner/lottie-animation.d.ts +2 -0
- package/calendar/calendar-day.d.ts +11 -0
- package/calendar/calendar-day.style.d.ts +23 -0
- package/calendar/calendar-month.d.ts +12 -0
- package/calendar/calendar-month.style.d.ts +12 -0
- package/calendar/calendar-year.d.ts +12 -0
- package/calendar/calendar-year.style.d.ts +12 -0
- package/calendar/calendar.d.ts +4 -0
- package/calendar/calendar.style.d.ts +35 -0
- package/calendar/index.d.ts +2 -0
- package/calendar/index.js +381 -0
- package/calendar/index.js.map +1 -0
- package/calendar/package.json +7 -0
- package/calendar/types.d.ts +15 -0
- package/cjs/index.js +426 -221
- package/cjs/index.js.map +1 -1
- package/date-input/index.js +115 -115
- package/date-input/index.js.map +1 -1
- package/error-display/index.js +1 -0
- package/error-display/index.js.map +1 -1
- package/form/index.js +440 -471
- package/form/index.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +461 -256
- package/index.js.map +1 -1
- package/input/index.js +71 -70
- package/input/index.js.map +1 -1
- package/input/input.style.d.ts +3 -7
- package/input-group/index.js +375 -363
- package/input-group/index.js.map +1 -1
- package/input-group/input-group-list-addon.d.ts +1 -1
- package/input-group/input-group-list-addon.style.d.ts +9 -1
- package/input-group/input-group.style.d.ts +4 -7
- package/input-group/types.d.ts +3 -2
- package/input-select/index.js +10 -4
- package/input-select/index.js.map +1 -1
- package/otp-input/index.d.ts +2 -0
- package/otp-input/index.js +600 -0
- package/otp-input/index.js.map +1 -0
- package/otp-input/otp-input.d.ts +3 -0
- package/otp-input/otp-input.styles.d.ts +5 -0
- package/otp-input/package.json +7 -0
- package/otp-input/types.d.ts +22 -0
- package/package.json +1 -1
- package/phone-number-input/index.d.ts +1 -0
- package/phone-number-input/index.js +375 -365
- package/phone-number-input/index.js.map +1 -1
- package/phone-number-input/phone-number-input-helper.d.ts +2 -2
- package/phone-number-input/phone-number-input.d.ts +1 -1
- package/phone-number-input/types.d.ts +9 -0
- package/shared/dropdown-list/dropdown-list.d.ts +1 -1
- package/shared/dropdown-list/types.d.ts +1 -0
- package/shared/input-wrapper/input-wrapper.d.ts +8 -0
- package/unit-number/index.js +256 -302
- package/unit-number/index.js.map +1 -1
- package/unit-number/unit-number-input.style.d.ts +7 -12
- package/util/calendar-helper.d.ts +10 -0
- package/util/index.d.ts +1 -0
- package/phone-number-input/phone-number-input.styles.d.ts +0 -1
package/input/index.js
CHANGED
|
@@ -1,92 +1,73 @@
|
|
|
1
|
-
import t,{jsxs as e,jsx as n}from"react/jsx-runtime";import r from"react";import o,{css as i}from"styled-components";var a;!function(t){t.transformWithSpaces=(t,e)=>{const n="(.{"+e+"})";return t.replace(/[^\dA-Z]/gi,"").replace(new RegExp(n,"g"),"$1 ").trim()},t.padValue=(t,e)=>{if("0"===t)return e?t:t.padStart(2,"0");if(""===t)return t;return parseInt(t).toString().padStart(2,"0")},t.shouldTruncateToTwoLines=(t,e)=>{const n=Math.floor(e/9);return t.length>=2*n||1===t.split(" ").length&&t.length>n},t.truncateOneLine=(t,e,n,r)=>{let o=0;e>n&&(o=Math.floor((e-n)/8));const i=r+o;if(i<t.length){const e=Math.floor(i/2);return t.substring(0,e)+" ... "+t.substring(t.length-e,t.length)}return t}}(a||(a={}));var l,c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},d={};Object.defineProperty(d,"__esModule",{value:!0});var f=t;const u=t=>f.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:f.jsx("path",{d:"M9.99991 11.229L5.97891 15.25C5.81224 15.4167 5.61091 15.4967 5.37491 15.49C5.13891 15.4827 4.93757 15.3957 4.77091 15.229C4.60424 15.0623 4.52091 14.8577 4.52091 14.615C4.52091 14.3717 4.60424 14.1667 4.77091 14L8.77091 10L4.74991 5.979C4.58324 5.81233 4.50324 5.60767 4.50991 5.365C4.51724 5.12167 4.60424 4.91667 4.77091 4.75C4.93757 4.58333 5.14224 4.5 5.38491 4.5C5.62824 4.5 5.83324 4.58333 5.99991 4.75L9.99991 8.771L14.0209 4.75C14.1876 4.58333 14.3922 4.5 14.6349 4.5C14.8782 4.5 15.0832 4.58333 15.2499 4.75C15.4166 4.91667 15.4999 5.12167 15.4999 5.365C15.4999 5.60767 15.4166 5.81233 15.2499 5.979L11.2289 10L15.2499 14.021C15.4166 14.1877 15.4999 14.389 15.4999 14.625C15.4999 14.861 15.4166 15.0623 15.2499 15.229C15.0832 15.3957 14.8782 15.479 14.6349 15.479C14.3922 15.479 14.1876 15.3957 14.0209 15.229L9.99991 11.229Z",fill:"currentColor"})});u.displayName="CrossIcon",l=d.CrossIcon=u;var h=Array.isArray,g="object"==typeof c&&c&&c.Object===Object&&c,s="object"==typeof self&&self&&self.Object===Object&&self,p=g||s||Function("return this")(),y=p.Symbol,S=y,F=Object.prototype,m=F.hasOwnProperty,v=F.toString,B=S?S.toStringTag:void 0;var b=function(t){var e=m.call(t,B),n=t[B];try{t[B]=void 0;var r=!0}catch(t){}var o=v.call(t);return r&&(e?t[B]=n:delete t[B]),o},H=Object.prototype.toString;var D=b,_=function(t){return H.call(t)},w=y?y.toStringTag:void 0;var z=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":w&&w in Object(t)?D(t):_(t)};var x=z,C=function(t){return null!=t&&"object"==typeof t};var E=function(t){return"symbol"==typeof t||C(t)&&"[object Symbol]"==x(t)},A=h,k=E,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/;var $=function(t,e){if(A(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!k(t))||(O.test(t)||!W.test(t)||null!=e&&t in Object(e))};var j=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},T=z,R=j;var L,V=function(t){if(!R(t))return!1;var e=T(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},I=p["__core-js_shared__"],N=(L=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"";var P=function(t){return!!N&&N in t},G=Function.prototype.toString;var X=V,M=P,Z=j,U=function(t){if(null!=t){try{return G.call(t)}catch(t){}try{return t+""}catch(t){}}return""},q=/^\[object .+?Constructor\]$/,J=Function.prototype,K=Object.prototype,Q=J.toString,Y=K.hasOwnProperty,tt=RegExp("^"+Q.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var et=function(t){return!(!Z(t)||M(t))&&(X(t)?tt:q).test(U(t))},nt=function(t,e){return null==t?void 0:t[e]};var rt=function(t,e){var n=nt(t,e);return et(n)?n:void 0},ot=rt(Object,"create"),it=ot;var at=function(){this.__data__=it?it(null):{},this.size=0};var lt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ct=ot,dt=Object.prototype.hasOwnProperty;var ft=function(t){var e=this.__data__;if(ct){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return dt.call(e,t)?e[t]:void 0},ut=ot,ht=Object.prototype.hasOwnProperty;var gt=ot;var st=at,pt=lt,yt=ft,St=function(t){var e=this.__data__;return ut?void 0!==e[t]:ht.call(e,t)},Ft=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=gt&&void 0===e?"__lodash_hash_undefined__":e,this};function mt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}mt.prototype.clear=st,mt.prototype.delete=pt,mt.prototype.get=yt,mt.prototype.has=St,mt.prototype.set=Ft;var vt=mt;var Bt=function(){this.__data__=[],this.size=0};var bt=function(t,e){return t===e||t!=t&&e!=e};var Ht=function(t,e){for(var n=t.length;n--;)if(bt(t[n][0],e))return n;return-1},Dt=Ht,_t=Array.prototype.splice;var wt=Ht;var zt=Ht;var xt=Ht;var Ct=Bt,Et=function(t){var e=this.__data__,n=Dt(e,t);return!(n<0)&&(n==e.length-1?e.pop():_t.call(e,n,1),--this.size,!0)},At=function(t){var e=this.__data__,n=wt(e,t);return n<0?void 0:e[n][1]},kt=function(t){return zt(this.__data__,t)>-1},Wt=function(t,e){var n=this.__data__,r=xt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function Ot(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ot.prototype.clear=Ct,Ot.prototype.delete=Et,Ot.prototype.get=At,Ot.prototype.has=kt,Ot.prototype.set=Wt;var $t=Ot,jt=rt(p,"Map"),Tt=vt,Rt=$t,Lt=jt;var Vt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var It=function(t,e){var n=t.__data__;return Vt(e)?n["string"==typeof e?"string":"hash"]:n.map},Nt=It;var Pt=It;var Gt=It;var Xt=It;var Mt=function(){this.size=0,this.__data__={hash:new Tt,map:new(Lt||Rt),string:new Tt}},Zt=function(t){var e=Nt(this,t).delete(t);return this.size-=e?1:0,e},Ut=function(t){return Pt(this,t).get(t)},qt=function(t){return Gt(this,t).has(t)},Jt=function(t,e){var n=Xt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Kt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Kt.prototype.clear=Mt,Kt.prototype.delete=Zt,Kt.prototype.get=Ut,Kt.prototype.has=qt,Kt.prototype.set=Jt;var Qt=Kt;function Yt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Yt.Cache||Qt),n}Yt.Cache=Qt;var te=Yt;var ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/\\(\\)?/g,re=function(t){var e=te(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(ee,(function(t,n,r,o){e.push(r?o.replace(ne,"$1"):n||t)})),e}));var oe=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},ie=h,ae=E,le=y?y.prototype:void 0,ce=le?le.toString:void 0;var de=function t(e){if("string"==typeof e)return e;if(ie(e))return oe(e,t)+"";if(ae(e))return ce?ce.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n},fe=de;var ue=h,he=$,ge=re,se=function(t){return null==t?"":fe(t)};var pe=E;var ye=function(t,e){return ue(t)?t:he(t,e)?[t]:ge(se(t))},Se=function(t){if("string"==typeof t||pe(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Fe=function(t,e){for(var n=0,r=(e=ye(e,t)).length;null!=t&&n<r;)t=t[Se(e[n++])];return n&&n==r?t:void 0};var me=function(t,e,n){var r=null==t?void 0:Fe(t,e);return void 0===r?n:r};const ve=(t,e,n)=>e?me(n,e)||me(t,e):n||t,Be=(t,e)=>{const n=e||t.defaultValue;return me(t.collections,n)};var be;!function(t){t.colorScheme="colorScheme",t.layout="layout",t.textStyleScheme="textStyleScheme",t.designTokenScheme="designTokenScheme"}(be||(be={}));const He={collections:{base:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#465A88",2:"#556D99",3:"#8D8DBF"},Light:{1:"#57A9FF",2:"#81BFFF",3:"#BED7FF",4:"#E2ECFD",5:"#F6F8FF",6:"#FBFCFE"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}},Shadow:{Accent:"rgba(87, 169, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)"}},bookingsg:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#6F4AB8",PrimaryDark:"#6443A6",Secondary:"#6443A6",Accent:{Dark:{1:"#355985",2:"#68819D",3:"#9AABBE"},Light:{1:"#9F82D9",2:"#B5A5D7",3:"#CEC3E4 ",4:"#E2DBEF",5:"#F2EFF8",6:"#F7F6FB"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}},Shadow:{Accent:"rgba(161, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)"}}},defaultValue:"base"},De=t=>e=>{const n=e.theme,r=Be(He,n[be.colorScheme]);return n.options&&n.options.color?ve(r,t,n.options.color):ve(r,t)},_e={Brand:{1:De("Brand.1"),2:De("Brand.2"),3:De("Brand.3"),4:De("Brand.4"),5:De("Brand.5"),6:De("Brand.6")},Primary:De("Primary"),PrimaryDark:De("PrimaryDark"),Secondary:De("Secondary"),Accent:{Light:{1:De("Accent.Light.1"),2:De("Accent.Light.2"),3:De("Accent.Light.3"),4:De("Accent.Light.4"),5:De("Accent.Light.5"),6:De("Accent.Light.6")},Dark:{1:De("Accent.Dark.1"),2:De("Accent.Dark.2"),3:De("Accent.Dark.3")}},Neutral:{1:De("Neutral.1"),2:De("Neutral.2"),3:De("Neutral.3"),4:De("Neutral.4"),5:De("Neutral.5"),6:De("Neutral.6"),7:De("Neutral.7"),8:De("Neutral.8")},Validation:{Green:{Text:De("Validation.Green.Text"),Icon:De("Validation.Green.Icon"),Border:De("Validation.Green.Border"),Background:De("Validation.Green.Background")},Orange:{Text:De("Validation.Orange.Text"),Icon:De("Validation.Orange.Icon"),Border:De("Validation.Orange.Border"),Background:De("Validation.Orange.Background"),Badge:De("Validation.Orange.Badge")},Red:{Text:De("Validation.Red.Text"),Icon:De("Validation.Red.Icon"),Border:De("Validation.Red.Border"),Background:De("Validation.Red.Background")}},Shadow:{Accent:De("Shadow.Accent"),Red:De("Shadow.Red")}},we={collections:{base:{InputBoxShadow:i`
|
|
2
|
-
inset 0 0 6px 1px ${
|
|
3
|
-
`,InputErrorBoxShadow:
|
|
4
|
-
inset 0 0 6px 1px ${
|
|
5
|
-
`}},defaultValue:"base"},
|
|
6
|
-
font-family: ${Oe(e)||Oe(o)||r};
|
|
7
|
-
font-weight: normal !important;
|
|
8
|
-
`:i`
|
|
9
|
-
font-family: ${r};
|
|
10
|
-
font-weight: ${(je(e)||o)??"normal"};
|
|
11
|
-
`},je=t=>{switch(t){case 300:case"light":return 300;case 400:case"regular":return 400;case 600:case"semibold":return 600;case 700:case"bold":return 700;case 900:case"black":return 900;default:return""}},Te=(t,e,n=!1)=>r=>{const o=We[t],a=o.fontSize(r);return i`
|
|
12
|
-
${$e(t,e)}
|
|
13
|
-
font-size: ${a}rem !important;
|
|
14
|
-
line-height: ${o.lineHeight}rem !important;
|
|
15
|
-
letter-spacing: ${o.letterSpacing(r)||0}rem !important;
|
|
16
|
-
${i`
|
|
17
|
-
margin-bottom: ${a*(n?1.05:0)}rem;
|
|
18
|
-
`}
|
|
19
|
-
`},Re=o.div`
|
|
20
|
-
${Te("Body","regular")}
|
|
21
|
-
border: 1px solid ${_e.Neutral[5]};
|
|
22
|
-
border-radius: 4px;
|
|
1
|
+
import t,{jsxs as e,jsx as n}from"react/jsx-runtime";import r,{useRef as o,useImperativeHandle as i}from"react";import a,{css as l}from"styled-components";var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},d=Array.isArray,f="object"==typeof c&&c&&c.Object===Object&&c,u="object"==typeof self&&self&&self.Object===Object&&self,g=f||u||Function("return this")(),h=g.Symbol,s=h,p=Object.prototype,y=p.hasOwnProperty,F=p.toString,S=s?s.toStringTag:void 0;var m=function(t){var e=y.call(t,S),n=t[S];try{t[S]=void 0;var r=!0}catch(t){}var o=F.call(t);return r&&(e?t[S]=n:delete t[S]),o},v=Object.prototype.toString;var B=m,b=function(t){return v.call(t)},H=h?h.toStringTag:void 0;var D=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":H&&H in Object(t)?B(t):b(t)};var _=D,w=function(t){return null!=t&&"object"==typeof t};var z=function(t){return"symbol"==typeof t||w(t)&&"[object Symbol]"==_(t)},x=d,C=z,E=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,A=/^\w*$/;var $=function(t,e){if(x(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!C(t))||(A.test(t)||!E.test(t)||null!=e&&t in Object(e))};var k=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},W=D,O=k;var j,T=function(t){if(!O(t))return!1;var e=W(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},R=g["__core-js_shared__"],L=(j=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+j:"";var V=function(t){return!!L&&L in t},I=Function.prototype.toString;var N=T,P=V,G=k,X=function(t){if(null!=t){try{return I.call(t)}catch(t){}try{return t+""}catch(t){}}return""},M=/^\[object .+?Constructor\]$/,Z=Function.prototype,U=Object.prototype,q=Z.toString,J=U.hasOwnProperty,K=RegExp("^"+q.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Q=function(t){return!(!G(t)||P(t))&&(N(t)?K:M).test(X(t))},Y=function(t,e){return null==t?void 0:t[e]};var tt=function(t,e){var n=Y(t,e);return Q(n)?n:void 0},et=tt(Object,"create"),nt=et;var rt=function(){this.__data__=nt?nt(null):{},this.size=0};var ot=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},it=et,at=Object.prototype.hasOwnProperty;var lt=function(t){var e=this.__data__;if(it){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return at.call(e,t)?e[t]:void 0},ct=et,dt=Object.prototype.hasOwnProperty;var ft=et;var ut=rt,gt=ot,ht=lt,st=function(t){var e=this.__data__;return ct?void 0!==e[t]:dt.call(e,t)},pt=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ft&&void 0===e?"__lodash_hash_undefined__":e,this};function yt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}yt.prototype.clear=ut,yt.prototype.delete=gt,yt.prototype.get=ht,yt.prototype.has=st,yt.prototype.set=pt;var Ft=yt;var St=function(){this.__data__=[],this.size=0};var mt=function(t,e){return t===e||t!=t&&e!=e};var vt=function(t,e){for(var n=t.length;n--;)if(mt(t[n][0],e))return n;return-1},Bt=vt,bt=Array.prototype.splice;var Ht=vt;var Dt=vt;var _t=vt;var wt=St,zt=function(t){var e=this.__data__,n=Bt(e,t);return!(n<0)&&(n==e.length-1?e.pop():bt.call(e,n,1),--this.size,!0)},xt=function(t){var e=this.__data__,n=Ht(e,t);return n<0?void 0:e[n][1]},Ct=function(t){return Dt(this.__data__,t)>-1},Et=function(t,e){var n=this.__data__,r=_t(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function At(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}At.prototype.clear=wt,At.prototype.delete=zt,At.prototype.get=xt,At.prototype.has=Ct,At.prototype.set=Et;var $t=At,kt=tt(g,"Map"),Wt=Ft,Ot=$t,jt=kt;var Tt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Rt=function(t,e){var n=t.__data__;return Tt(e)?n["string"==typeof e?"string":"hash"]:n.map},Lt=Rt;var Vt=Rt;var It=Rt;var Nt=Rt;var Pt=function(){this.size=0,this.__data__={hash:new Wt,map:new(jt||Ot),string:new Wt}},Gt=function(t){var e=Lt(this,t).delete(t);return this.size-=e?1:0,e},Xt=function(t){return Vt(this,t).get(t)},Mt=function(t){return It(this,t).has(t)},Zt=function(t,e){var n=Nt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Ut(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ut.prototype.clear=Pt,Ut.prototype.delete=Gt,Ut.prototype.get=Xt,Ut.prototype.has=Mt,Ut.prototype.set=Zt;var qt=Ut;function Jt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Jt.Cache||qt),n}Jt.Cache=qt;var Kt=Jt;var Qt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yt=/\\(\\)?/g,te=function(t){var e=Kt(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Qt,(function(t,n,r,o){e.push(r?o.replace(Yt,"$1"):n||t)})),e}));var ee=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},ne=d,re=z,oe=h?h.prototype:void 0,ie=oe?oe.toString:void 0;var ae=function t(e){if("string"==typeof e)return e;if(ne(e))return ee(e,t)+"";if(re(e))return ie?ie.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n},le=ae;var ce=d,de=$,fe=te,ue=function(t){return null==t?"":le(t)};var ge=z;var he=function(t,e){return ce(t)?t:de(t,e)?[t]:fe(ue(t))},se=function(t){if("string"==typeof t||ge(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var pe=function(t,e){for(var n=0,r=(e=he(e,t)).length;null!=t&&n<r;)t=t[se(e[n++])];return n&&n==r?t:void 0};var ye=function(t,e,n){var r=null==t?void 0:pe(t,e);return void 0===r?n:r};const Fe=(t,e,n)=>e?ye(n,e)||ye(t,e):n||t,Se=(t,e)=>{const n=e||t.defaultValue;return ye(t.collections,n)};var me;!function(t){t.colorScheme="colorScheme",t.layout="layout",t.textStyleScheme="textStyleScheme",t.designTokenScheme="designTokenScheme"}(me||(me={}));const ve={collections:{base:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#465A88",2:"#556D99",3:"#8D8DBF"},Light:{1:"#57A9FF",2:"#81BFFF",3:"#BED7FF",4:"#E2ECFD",5:"#F6F8FF",6:"#FBFCFE"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}},Shadow:{Accent:"rgba(87, 169, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)"}},bookingsg:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#6F4AB8",PrimaryDark:"#6443A6",Secondary:"#6443A6",Accent:{Dark:{1:"#355985",2:"#68819D",3:"#9AABBE"},Light:{1:"#9F82D9",2:"#B5A5D7",3:"#CEC3E4 ",4:"#E2DBEF",5:"#F2EFF8",6:"#F7F6FB"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}},Shadow:{Accent:"rgba(161, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)"}}},defaultValue:"base"},Be=t=>e=>{const n=e.theme,r=Se(ve,n[me.colorScheme]);return n.options&&n.options.color?Fe(r,t,n.options.color):Fe(r,t)},be={Brand:{1:Be("Brand.1"),2:Be("Brand.2"),3:Be("Brand.3"),4:Be("Brand.4"),5:Be("Brand.5"),6:Be("Brand.6")},Primary:Be("Primary"),PrimaryDark:Be("PrimaryDark"),Secondary:Be("Secondary"),Accent:{Light:{1:Be("Accent.Light.1"),2:Be("Accent.Light.2"),3:Be("Accent.Light.3"),4:Be("Accent.Light.4"),5:Be("Accent.Light.5"),6:Be("Accent.Light.6")},Dark:{1:Be("Accent.Dark.1"),2:Be("Accent.Dark.2"),3:Be("Accent.Dark.3")}},Neutral:{1:Be("Neutral.1"),2:Be("Neutral.2"),3:Be("Neutral.3"),4:Be("Neutral.4"),5:Be("Neutral.5"),6:Be("Neutral.6"),7:Be("Neutral.7"),8:Be("Neutral.8")},Validation:{Green:{Text:Be("Validation.Green.Text"),Icon:Be("Validation.Green.Icon"),Border:Be("Validation.Green.Border"),Background:Be("Validation.Green.Background")},Orange:{Text:Be("Validation.Orange.Text"),Icon:Be("Validation.Orange.Icon"),Border:Be("Validation.Orange.Border"),Background:Be("Validation.Orange.Background"),Badge:Be("Validation.Orange.Badge")},Red:{Text:Be("Validation.Red.Text"),Icon:Be("Validation.Red.Icon"),Border:Be("Validation.Red.Border"),Background:Be("Validation.Red.Background")}},Shadow:{Accent:Be("Shadow.Accent"),Red:Be("Shadow.Red")}},He={collections:{base:{InputBoxShadow:l`
|
|
2
|
+
inset 0 0 6px 1px ${be.Shadow.Accent}
|
|
3
|
+
`,InputErrorBoxShadow:l`
|
|
4
|
+
inset 0 0 6px 1px ${be.Shadow.Red}
|
|
5
|
+
`}},defaultValue:"base"},De=t=>e=>{const n=e.theme,r=Se(He,n[me.designTokenScheme]);return n.options?.designToken?Fe(r,t,n.options.designToken):Fe(r,t)},_e=De("InputBoxShadow"),we=De("InputErrorBoxShadow"),ze=a.div`
|
|
23
6
|
display: flex;
|
|
7
|
+
align-items: center;
|
|
24
8
|
position: relative;
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
border: 1px solid ${be.Neutral[5]};
|
|
10
|
+
border-radius: 4px;
|
|
11
|
+
background: ${be.Neutral[8]};
|
|
12
|
+
height: max-content;
|
|
27
13
|
width: 100%;
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
padding: 0 1rem;
|
|
15
|
+
flex-direction: ${t=>"right"===t.$position?"row-reverse":"row"};
|
|
30
16
|
|
|
31
17
|
:focus-within {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
box-shadow: ${xe};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
::placeholder,
|
|
38
|
-
::-webkit-input-placeholder {
|
|
39
|
-
color: ${_e.Neutral[3]};
|
|
18
|
+
border: 1px solid ${be.Accent.Light[1]};
|
|
19
|
+
box-shadow: ${_e};
|
|
40
20
|
}
|
|
41
21
|
|
|
42
|
-
${t=>
|
|
43
|
-
// Chrome, Safari, Edge, Opera
|
|
44
|
-
::-webkit-outer-spin-button,
|
|
45
|
-
::-webkit-inner-spin-button {
|
|
46
|
-
-webkit-appearance: none;
|
|
47
|
-
margin: 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Firefox
|
|
51
|
-
-moz-appearance: textfield;
|
|
52
|
-
`}}
|
|
53
|
-
|
|
54
|
-
${t=>t.readOnly?i`
|
|
22
|
+
${t=>t.$readOnly?l`
|
|
55
23
|
border: none;
|
|
56
|
-
padding: 0
|
|
24
|
+
padding: 0;
|
|
57
25
|
background: transparent !important;
|
|
26
|
+
|
|
58
27
|
:focus-within {
|
|
59
28
|
border: none;
|
|
60
29
|
box-shadow: none;
|
|
61
30
|
}
|
|
62
|
-
`:t.disabled?
|
|
63
|
-
background: ${
|
|
64
|
-
:
|
|
65
|
-
cursor: not-allowed;
|
|
66
|
-
}
|
|
31
|
+
`:t.disabled?l`
|
|
32
|
+
background: ${be.Neutral[6](t)};
|
|
33
|
+
cursor: not-allowed;
|
|
67
34
|
|
|
68
35
|
:focus-within {
|
|
69
|
-
|
|
70
|
-
border: 1px solid ${_e.Neutral[5](t)};
|
|
36
|
+
border: 1px solid ${be.Neutral[5](t)};
|
|
71
37
|
box-shadow: none;
|
|
72
38
|
}
|
|
73
|
-
`:t
|
|
74
|
-
border: 1px solid ${
|
|
39
|
+
`:t.$error?l`
|
|
40
|
+
border: 1px solid ${be.Validation.Red.Border(t)};
|
|
75
41
|
|
|
76
42
|
:focus-within {
|
|
77
|
-
border: 1px solid ${
|
|
78
|
-
box-shadow: ${
|
|
43
|
+
border: 1px solid ${be.Validation.Red.Border(t)};
|
|
44
|
+
box-shadow: ${we};
|
|
79
45
|
}
|
|
80
46
|
`:void 0}
|
|
81
|
-
|
|
47
|
+
`;var xe;!function(t){t.transformWithSpaces=(t,e)=>{const n="(.{"+e+"})";return t.replace(/[^\dA-Z]/gi,"").replace(new RegExp(n,"g"),"$1 ").trim()},t.padValue=(t,e)=>{if("0"===t)return e?t:t.padStart(2,"0");if(""===t)return t;return parseInt(t).toString().padStart(2,"0")},t.shouldTruncateToTwoLines=(t,e)=>{const n=Math.floor(e/9);return t.length>=2*n||1===t.split(" ").length&&t.length>n},t.truncateOneLine=(t,e,n,r)=>{let o=0;e>n&&(o=Math.floor((e-n)/8));const i=r+o;if(i<t.length){const e=Math.floor(i/2);return t.substring(0,e)+" ... "+t.substring(t.length-e,t.length)}return t}}(xe||(xe={}));var Ce,Ee={};Object.defineProperty(Ee,"__esModule",{value:!0});var Ae=t;const $e=t=>Ae.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Ae.jsx("path",{d:"M9.99991 11.229L5.97891 15.25C5.81224 15.4167 5.61091 15.4967 5.37491 15.49C5.13891 15.4827 4.93757 15.3957 4.77091 15.229C4.60424 15.0623 4.52091 14.8577 4.52091 14.615C4.52091 14.3717 4.60424 14.1667 4.77091 14L8.77091 10L4.74991 5.979C4.58324 5.81233 4.50324 5.60767 4.50991 5.365C4.51724 5.12167 4.60424 4.91667 4.77091 4.75C4.93757 4.58333 5.14224 4.5 5.38491 4.5C5.62824 4.5 5.83324 4.58333 5.99991 4.75L9.99991 8.771L14.0209 4.75C14.1876 4.58333 14.3922 4.5 14.6349 4.5C14.8782 4.5 15.0832 4.58333 15.2499 4.75C15.4166 4.91667 15.4999 5.12167 15.4999 5.365C15.4999 5.60767 15.4166 5.81233 15.2499 5.979L11.2289 10L15.2499 14.021C15.4166 14.1877 15.4999 14.389 15.4999 14.625C15.4999 14.861 15.4166 15.0623 15.2499 15.229C15.0832 15.3957 14.8782 15.479 14.6349 15.479C14.3922 15.479 14.1876 15.3957 14.0209 15.229L9.99991 11.229Z",fill:"currentColor"})});$e.displayName="CrossIcon",Ce=Ee.CrossIcon=$e;const ke={Regular:"Open Sans",Semibold:"Open Sans Semibold",Bold:"Open Sans Bold",Light:"Open Sans Light"},We={collections:{base:{D1:{fontFamily:ke.Bold,fontSize:3,fontWeight:700,lineHeight:4,letterSpacing:-.056},D2:{fontFamily:ke.Bold,fontSize:2.5,fontWeight:700,lineHeight:3.5,letterSpacing:-.032},D3:{fontFamily:ke.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},D4:{fontFamily:ke.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},DBody:{fontFamily:ke.Regular,fontSize:1.375,lineHeight:1.75},H1:{fontFamily:ke.Bold,fontSize:2,fontWeight:700,lineHeight:2.5},H2:{fontFamily:ke.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},H3:{fontFamily:ke.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},H4:{fontFamily:ke.Bold,fontSize:1.125,fontWeight:700,lineHeight:1.625},H5:{fontFamily:ke.Bold,fontSize:1,fontWeight:700,lineHeight:1.5,letterSpacing:.014},H6:{fontFamily:ke.Bold,fontSize:.875,fontWeight:700,lineHeight:1.6,letterSpacing:.012},Body:{fontFamily:ke.Regular,fontSize:1.125,lineHeight:1.625},BodySmall:{fontFamily:ke.Regular,fontSize:1,lineHeight:1.5,letterSpacing:.014},XSmall:{fontFamily:ke.Regular,fontSize:.75,lineHeight:1.2,letterSpacing:.012}}},defaultValue:"base"},Oe=t=>e=>{const n=e.theme,r=Se(We,n[me.textStyleScheme]);return n.options&&n.options.textStyle?Fe(r,t,n.options.textStyle):Fe(r,t)},je={D1:{fontFamily:Oe("D1.fontFamily"),fontSize:Oe("D1.fontSize"),fontWeight:Oe("D1.fontWeight"),lineHeight:Oe("D1.lineHeight"),letterSpacing:Oe("D1.letterSpacing")},D2:{fontFamily:Oe("D2.fontFamily"),fontSize:Oe("D2.fontSize"),fontWeight:Oe("D2.fontWeight"),lineHeight:Oe("D2.lineHeight"),letterSpacing:Oe("D2.letterSpacing")},D3:{fontFamily:Oe("D3.fontFamily"),fontSize:Oe("D3.fontSize"),fontWeight:Oe("D3.fontWeight"),lineHeight:Oe("D3.lineHeight"),letterSpacing:Oe("D3.letterSpacing")},D4:{fontFamily:Oe("D4.fontFamily"),fontSize:Oe("D4.fontSize"),fontWeight:Oe("D4.fontWeight"),lineHeight:Oe("D4.lineHeight"),letterSpacing:Oe("D4.letterSpacing")},DBody:{fontFamily:Oe("DBody.fontFamily"),fontSize:Oe("DBody.fontSize"),fontWeight:Oe("DBody.fontWeight"),lineHeight:Oe("DBody.lineHeight"),letterSpacing:Oe("DBody.letterSpacing")},H1:{fontFamily:Oe("H1.fontFamily"),fontSize:Oe("H1.fontSize"),fontWeight:Oe("H1.fontWeight"),lineHeight:Oe("H1.lineHeight"),letterSpacing:Oe("H1.letterSpacing")},H2:{fontFamily:Oe("H2.fontFamily"),fontSize:Oe("H2.fontSize"),fontWeight:Oe("H2.fontWeight"),lineHeight:Oe("H2.lineHeight"),letterSpacing:Oe("H2.letterSpacing")},H3:{fontFamily:Oe("H3.fontFamily"),fontSize:Oe("H3.fontSize"),fontWeight:Oe("H3.fontWeight"),lineHeight:Oe("H3.lineHeight"),letterSpacing:Oe("H3.letterSpacing")},H4:{fontFamily:Oe("H4.fontFamily"),fontSize:Oe("H4.fontSize"),fontWeight:Oe("H4.fontWeight"),lineHeight:Oe("H4.lineHeight"),letterSpacing:Oe("H4.letterSpacing")},H5:{fontFamily:Oe("H5.fontFamily"),fontSize:Oe("H5.fontSize"),fontWeight:Oe("H5.fontWeight"),lineHeight:Oe("H5.lineHeight"),letterSpacing:Oe("H5.letterSpacing")},H6:{fontFamily:Oe("H6.fontFamily"),fontSize:Oe("H6.fontSize"),fontWeight:Oe("H6.fontWeight"),lineHeight:Oe("H6.lineHeight"),letterSpacing:Oe("H6.letterSpacing")},Body:{fontFamily:Oe("Body.fontFamily"),fontSize:Oe("Body.fontSize"),fontWeight:Oe("Body.fontWeight"),lineHeight:Oe("Body.lineHeight"),letterSpacing:Oe("Body.letterSpacing")},BodySmall:{fontFamily:Oe("BodySmall.fontFamily"),fontSize:Oe("BodySmall.fontSize"),fontWeight:Oe("BodySmall.fontWeight"),lineHeight:Oe("BodySmall.lineHeight"),letterSpacing:Oe("BodySmall.letterSpacing")},XSmall:{fontFamily:Oe("XSmall.fontFamily"),fontSize:Oe("XSmall.fontSize"),fontWeight:Oe("XSmall.fontWeight"),lineHeight:Oe("XSmall.lineHeight"),letterSpacing:Oe("XSmall.letterSpacing")}},Te=t=>{switch(t){case 700:case"bold":return ke.Bold;case 600:case"semibold":return ke.Semibold;case 300:case"light":return ke.Light;case 400:case"regular":return ke.Regular;default:return""}},Re=(t,e)=>n=>{const r=je[t].fontFamily(n),o=je[t].fontWeight(n);return Object.values(ke).includes(r)?l`
|
|
48
|
+
font-family: ${Te(e)||Te(o)||r};
|
|
49
|
+
font-weight: normal !important;
|
|
50
|
+
`:l`
|
|
51
|
+
font-family: ${r};
|
|
52
|
+
font-weight: ${(Le(e)||o)??"normal"};
|
|
53
|
+
`},Le=t=>{switch(t){case 300:case"light":return 300;case 400:case"regular":return 400;case 600:case"semibold":return 600;case 700:case"bold":return 700;case 900:case"black":return 900;default:return""}},Ve=(t,e,n=!1)=>r=>{const o=je[t],i=o.fontSize(r);return l`
|
|
54
|
+
${Re(t,e)}
|
|
55
|
+
font-size: ${i}rem !important;
|
|
56
|
+
line-height: ${o.lineHeight}rem !important;
|
|
57
|
+
letter-spacing: ${o.letterSpacing(r)||0}rem !important;
|
|
58
|
+
${l`
|
|
59
|
+
margin-bottom: ${i*(n?1.05:0)}rem;
|
|
60
|
+
`}
|
|
61
|
+
`},Ie=a.input`
|
|
62
|
+
${Ve("Body","regular")}
|
|
63
|
+
color: ${be.Neutral[1]};
|
|
64
|
+
|
|
82
65
|
// overwrite default styles
|
|
83
66
|
background: transparent;
|
|
84
67
|
border: none;
|
|
85
68
|
height: 3rem;
|
|
86
69
|
width: 100%;
|
|
87
|
-
|
|
88
|
-
${Te("Body","regular")}
|
|
89
|
-
padding: 0.2rem 1rem 0.3rem; // Somehow the input text appears lower
|
|
70
|
+
padding: 0;
|
|
90
71
|
|
|
91
72
|
:focus,
|
|
92
73
|
:active {
|
|
@@ -94,18 +75,38 @@ import t,{jsxs as e,jsx as n}from"react/jsx-runtime";import r from"react";import
|
|
|
94
75
|
border: none;
|
|
95
76
|
box-shadow: none;
|
|
96
77
|
}
|
|
97
|
-
|
|
78
|
+
|
|
79
|
+
::placeholder,
|
|
80
|
+
::-webkit-input-placeholder {
|
|
81
|
+
color: ${be.Neutral[3]};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
${t=>"number"===t.type?l`
|
|
85
|
+
// Chrome, Safari, Edge, Opera
|
|
86
|
+
::-webkit-outer-spin-button,
|
|
87
|
+
::-webkit-inner-spin-button {
|
|
88
|
+
-webkit-appearance: none;
|
|
89
|
+
margin: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Firefox
|
|
93
|
+
-moz-appearance: textfield;
|
|
94
|
+
`:t.disabled?l`
|
|
95
|
+
cursor: not-allowed;
|
|
96
|
+
`:void 0}
|
|
97
|
+
`,Ne=a.button`
|
|
98
98
|
position: relative;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
height: auto;
|
|
100
|
+
padding: 0 1rem;
|
|
101
|
+
|
|
102
|
+
margin-right: -1rem; // offset the padding
|
|
102
103
|
cursor: pointer;
|
|
103
104
|
|
|
104
|
-
color: ${
|
|
105
|
+
color: ${be.Neutral[3]};
|
|
105
106
|
background-color: transparent;
|
|
106
107
|
border: none;
|
|
107
|
-
`,
|
|
108
|
+
`,Pe=a(Ce)`
|
|
108
109
|
height: 1.25rem;
|
|
109
110
|
width: 1.25rem;
|
|
110
|
-
`,
|
|
111
|
+
`,Ge=r.forwardRef((({value:t,spacing:r,type:a,error:l,disabled:c,readOnly:d,onChange:f,onClear:u,allowClear:g=!1,className:h,...s},p)=>{const y=o();i(p,(()=>y.current),[]);const F=()=>"tel"===a&&r,S=t=>{const e=t.target,n=e.value,r=e.value.replace(/\s/g,"");e.value=r,f(t),e.value=n},m=t?(t=>t?F()?xe.transformWithSpaces(t,r):t:"")(t):t;return e(ze,{disabled:c,$error:l,$readOnly:d,className:h,children:[n(Ie,{"data-testid":"input",ref:y,disabled:c,value:m,onChange:t=>{f&&(F()?S(t):f(t))},type:a,readOnly:d,...s}),g&&!c&&!d&&!!t&&n(Ne,{onClick:()=>{u&&u(),y&&y.current&&y.current.focus()},children:n(Pe,{})})]})}));export{Ge as Input};
|
|
111
112
|
//# sourceMappingURL=index.js.map
|