@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.
Files changed (63) hide show
  1. package/animations/index.d.ts +1 -0
  2. package/animations/index.js +6 -3
  3. package/animations/index.js.map +1 -1
  4. package/animations/loading-dots-spinner/loading-dots-spinner.d.ts +2 -0
  5. package/animations/loading-dots-spinner/lottie-animation.d.ts +2 -0
  6. package/calendar/calendar-day.d.ts +11 -0
  7. package/calendar/calendar-day.style.d.ts +23 -0
  8. package/calendar/calendar-month.d.ts +12 -0
  9. package/calendar/calendar-month.style.d.ts +12 -0
  10. package/calendar/calendar-year.d.ts +12 -0
  11. package/calendar/calendar-year.style.d.ts +12 -0
  12. package/calendar/calendar.d.ts +4 -0
  13. package/calendar/calendar.style.d.ts +35 -0
  14. package/calendar/index.d.ts +2 -0
  15. package/calendar/index.js +381 -0
  16. package/calendar/index.js.map +1 -0
  17. package/calendar/package.json +7 -0
  18. package/calendar/types.d.ts +15 -0
  19. package/cjs/index.js +426 -221
  20. package/cjs/index.js.map +1 -1
  21. package/date-input/index.js +115 -115
  22. package/date-input/index.js.map +1 -1
  23. package/error-display/index.js +1 -0
  24. package/error-display/index.js.map +1 -1
  25. package/form/index.js +440 -471
  26. package/form/index.js.map +1 -1
  27. package/index.d.ts +1 -0
  28. package/index.js +461 -256
  29. package/index.js.map +1 -1
  30. package/input/index.js +71 -70
  31. package/input/index.js.map +1 -1
  32. package/input/input.style.d.ts +3 -7
  33. package/input-group/index.js +375 -363
  34. package/input-group/index.js.map +1 -1
  35. package/input-group/input-group-list-addon.d.ts +1 -1
  36. package/input-group/input-group-list-addon.style.d.ts +9 -1
  37. package/input-group/input-group.style.d.ts +4 -7
  38. package/input-group/types.d.ts +3 -2
  39. package/input-select/index.js +10 -4
  40. package/input-select/index.js.map +1 -1
  41. package/otp-input/index.d.ts +2 -0
  42. package/otp-input/index.js +600 -0
  43. package/otp-input/index.js.map +1 -0
  44. package/otp-input/otp-input.d.ts +3 -0
  45. package/otp-input/otp-input.styles.d.ts +5 -0
  46. package/otp-input/package.json +7 -0
  47. package/otp-input/types.d.ts +22 -0
  48. package/package.json +1 -1
  49. package/phone-number-input/index.d.ts +1 -0
  50. package/phone-number-input/index.js +375 -365
  51. package/phone-number-input/index.js.map +1 -1
  52. package/phone-number-input/phone-number-input-helper.d.ts +2 -2
  53. package/phone-number-input/phone-number-input.d.ts +1 -1
  54. package/phone-number-input/types.d.ts +9 -0
  55. package/shared/dropdown-list/dropdown-list.d.ts +1 -1
  56. package/shared/dropdown-list/types.d.ts +1 -0
  57. package/shared/input-wrapper/input-wrapper.d.ts +8 -0
  58. package/unit-number/index.js +256 -302
  59. package/unit-number/index.js.map +1 -1
  60. package/unit-number/unit-number-input.style.d.ts +7 -12
  61. package/util/calendar-helper.d.ts +10 -0
  62. package/util/index.d.ts +1 -0
  63. package/phone-number-input/phone-number-input.styles.d.ts +0 -1
@@ -1,150 +1,150 @@
1
- import e,{jsxs as t,jsx as n}from"react/jsx-runtime";import{useState as r,useRef as a,useEffect as o}from"react";import i,{css as l}from"styled-components";const c=[1,3,5,7,8,10,12],h=[4,6,9,11];var d,u;!function(e){e.clampDay=(t,n,r)=>{const a=parseInt(t),o=parseInt(n),i=parseInt(r);return 0==a?"1":c.includes(o)?Math.min(a,31).toString():h.includes(o)?Math.min(a,30).toString():2===o?e.isLeapYear(i)?Math.min(a,29).toString():Math.min(a,28).toString():t},e.clampMonth=e=>{const t=parseInt(e);return 0==t?"1":t>12?"12":e},e.isLeapYear=e=>e%4==0&&e%100!=0||e%400==0}(d||(d={})),function(e){e.transformWithSpaces=(e,t)=>{const n="(.{"+t+"})";return e.replace(/[^\dA-Z]/gi,"").replace(new RegExp(n,"g"),"$1 ").trim()},e.padValue=(e,t)=>{if("0"===e)return t?e:e.padStart(2,"0");if(""===e)return e;return parseInt(e).toString().padStart(2,"0")},e.shouldTruncateToTwoLines=(e,t)=>{const n=Math.floor(t/9);return e.length>=2*n||1===e.split(" ").length&&e.length>n},e.truncateOneLine=(e,t,n,r)=>{let a=0;t>n&&(a=Math.floor((t-n)/8));const o=r+a;if(o<e.length){const t=Math.floor(o/2);return e.substring(0,t)+" ... "+e.substring(e.length-t,e.length)}return e}}(u||(u={}));var g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},p=Array.isArray,s="object"==typeof g&&g&&g.Object===Object&&g,f="object"==typeof self&&self&&self.Object===Object&&self,y=s||f||Function("return this")(),m=y.Symbol,S=m,F=Object.prototype,v=F.hasOwnProperty,B=F.toString,$=S?S.toStringTag:void 0;var H=function(e){var t=v.call(e,$),n=e[$];try{e[$]=void 0;var r=!0}catch(e){}var a=B.call(e);return r&&(t?e[$]=n:delete e[$]),a},b=Object.prototype.toString;var D=H,w=function(e){return b.call(e)},_=m?m.toStringTag:void 0;var x=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_&&_ in Object(e)?D(e):w(e)};var z=x,C=function(e){return null!=e&&"object"==typeof e};var k=function(e){return"symbol"==typeof e||C(e)&&"[object Symbol]"==z(e)},E=p,A=k,O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/;var V=function(e,t){if(E(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!A(e))||(W.test(e)||!O.test(e)||null!=t&&e in Object(t))};var N=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},j=x,T=N;var I,L=function(e){if(!T(e))return!1;var t=j(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},R=y["__core-js_shared__"],M=(I=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"";var P=function(e){return!!M&&M in e},X=Function.prototype.toString;var G=L,Y=P,Z=N,K=function(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""},U=/^\[object .+?Constructor\]$/,q=Function.prototype,J=Object.prototype,Q=q.toString,ee=J.hasOwnProperty,te=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ne=function(e){return!(!Z(e)||Y(e))&&(G(e)?te:U).test(K(e))},re=function(e,t){return null==e?void 0:e[t]};var ae=function(e,t){var n=re(e,t);return ne(n)?n:void 0},oe=ae(Object,"create"),ie=oe;var le=function(){this.__data__=ie?ie(null):{},this.size=0};var ce=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},he=oe,de=Object.prototype.hasOwnProperty;var ue=function(e){var t=this.__data__;if(he){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return de.call(t,e)?t[e]:void 0},ge=oe,pe=Object.prototype.hasOwnProperty;var se=oe;var fe=le,ye=ce,me=ue,Se=function(e){var t=this.__data__;return ge?void 0!==t[e]:pe.call(t,e)},Fe=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=se&&void 0===t?"__lodash_hash_undefined__":t,this};function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ve.prototype.clear=fe,ve.prototype.delete=ye,ve.prototype.get=me,ve.prototype.has=Se,ve.prototype.set=Fe;var Be=ve;var $e=function(){this.__data__=[],this.size=0};var He=function(e,t){return e===t||e!=e&&t!=t};var be=function(e,t){for(var n=e.length;n--;)if(He(e[n][0],t))return n;return-1},De=be,we=Array.prototype.splice;var _e=be;var xe=be;var ze=be;var Ce=$e,ke=function(e){var t=this.__data__,n=De(t,e);return!(n<0)&&(n==t.length-1?t.pop():we.call(t,n,1),--this.size,!0)},Ee=function(e){var t=this.__data__,n=_e(t,e);return n<0?void 0:t[n][1]},Ae=function(e){return xe(this.__data__,e)>-1},Oe=function(e,t){var n=this.__data__,r=ze(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function We(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}We.prototype.clear=Ce,We.prototype.delete=ke,We.prototype.get=Ee,We.prototype.has=Ae,We.prototype.set=Oe;var Ve=We,Ne=ae(y,"Map"),je=Be,Te=Ve,Ie=Ne;var Le=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Re=function(e,t){var n=e.__data__;return Le(t)?n["string"==typeof t?"string":"hash"]:n.map},Me=Re;var Pe=Re;var Xe=Re;var Ge=Re;var Ye=function(){this.size=0,this.__data__={hash:new je,map:new(Ie||Te),string:new je}},Ze=function(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t},Ke=function(e){return Pe(this,e).get(e)},Ue=function(e){return Xe(this,e).has(e)},qe=function(e,t){var n=Ge(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Je(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Je.prototype.clear=Ye,Je.prototype.delete=Ze,Je.prototype.get=Ke,Je.prototype.has=Ue,Je.prototype.set=qe;var Qe=Je;function et(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(et.Cache||Qe),n}et.Cache=Qe;var tt=et;var nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/\\(\\)?/g,at=function(e){var t=tt(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(nt,(function(e,n,r,a){t.push(r?a.replace(rt,"$1"):n||e)})),t}));var ot=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},it=p,lt=k,ct=m?m.prototype:void 0,ht=ct?ct.toString:void 0;var dt=function e(t){if("string"==typeof t)return t;if(it(t))return ot(t,e)+"";if(lt(t))return ht?ht.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},ut=dt;var gt=p,pt=V,st=at,ft=function(e){return null==e?"":ut(e)};var yt=k;var mt=function(e,t){return gt(e)?e:pt(e,t)?[e]:st(ft(e))},St=function(e){if("string"==typeof e||yt(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};var Ft=function(e,t){for(var n=0,r=(t=mt(t,e)).length;null!=e&&n<r;)e=e[St(t[n++])];return n&&n==r?e:void 0};var vt=function(e,t,n){var r=null==e?void 0:Ft(e,t);return void 0===r?n:r};const Bt=(e,t,n)=>t?vt(n,t)||vt(e,t):n||e,$t=(e,t)=>{const n=t||e.defaultValue;return vt(e.collections,n)};var Ht;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme",e.designTokenScheme="designTokenScheme"}(Ht||(Ht={}));const bt={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"},Dt=e=>t=>{const n=t.theme,r=$t(bt,n[Ht.colorScheme]);return n.options&&n.options.color?Bt(r,e,n.options.color):Bt(r,e)},wt={Brand:{1:Dt("Brand.1"),2:Dt("Brand.2"),3:Dt("Brand.3"),4:Dt("Brand.4"),5:Dt("Brand.5"),6:Dt("Brand.6")},Primary:Dt("Primary"),PrimaryDark:Dt("PrimaryDark"),Secondary:Dt("Secondary"),Accent:{Light:{1:Dt("Accent.Light.1"),2:Dt("Accent.Light.2"),3:Dt("Accent.Light.3"),4:Dt("Accent.Light.4"),5:Dt("Accent.Light.5"),6:Dt("Accent.Light.6")},Dark:{1:Dt("Accent.Dark.1"),2:Dt("Accent.Dark.2"),3:Dt("Accent.Dark.3")}},Neutral:{1:Dt("Neutral.1"),2:Dt("Neutral.2"),3:Dt("Neutral.3"),4:Dt("Neutral.4"),5:Dt("Neutral.5"),6:Dt("Neutral.6"),7:Dt("Neutral.7"),8:Dt("Neutral.8")},Validation:{Green:{Text:Dt("Validation.Green.Text"),Icon:Dt("Validation.Green.Icon"),Border:Dt("Validation.Green.Border"),Background:Dt("Validation.Green.Background")},Orange:{Text:Dt("Validation.Orange.Text"),Icon:Dt("Validation.Orange.Icon"),Border:Dt("Validation.Orange.Border"),Background:Dt("Validation.Orange.Background"),Badge:Dt("Validation.Orange.Badge")},Red:{Text:Dt("Validation.Red.Text"),Icon:Dt("Validation.Red.Icon"),Border:Dt("Validation.Red.Border"),Background:Dt("Validation.Red.Background")}},Shadow:{Accent:Dt("Shadow.Accent"),Red:Dt("Shadow.Red")}},_t={collections:{base:{InputBoxShadow:l`
2
- inset 0 0 6px 1px ${wt.Shadow.Accent}
1
+ import t,{jsxs as e,jsx as n}from"react/jsx-runtime";import{useState as r,useRef as a,useEffect as i}from"react";import o,{css as l}from"styled-components";var c,u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s={exports:{}},h=s.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",a="second",i="minute",o="hour",l="day",c="week",u="month",s="quarter",h="year",d="date",f="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},S={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),a=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(a,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),a=e.clone().add(r,u),i=n-a<0,o=e.clone().add(r+(i?-1:1),u);return+(-(r+(n-a)/(i?a-o:o-a))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:h,w:c,d:l,D:d,h:o,m:i,s:a,ms:r,Q:s}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},$="en",v={};v[$]=y;var F=function(t){return t instanceof b},D=function t(e,n,r){var a;if(!e)return $;if("string"==typeof e){var i=e.toLowerCase();v[i]&&(a=i),n&&(v[i]=n,a=i);var o=e.split("-");if(!a&&o.length>1)return t(o[0])}else{var l=e.name;v[l]=e,a=l}return!r&&a&&($=a),a||!r&&$},B=function(t,e){if(F(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new b(n)},H=S;H.l=D,H.i=F,H.w=function(t,e){return B(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var b=function(){function y(t){this.$L=D(t.locale,null,!0),this.parse(t)}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(H.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(g);if(r){var a=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return H},m.isValid=function(){return!(this.$d.toString()===f)},m.isSame=function(t,e){var n=B(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return B(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<B(t)},m.$g=function(t,e,n){return H.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!H.u(e)||e,s=H.p(t),f=function(t,e){var a=H.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?a:a.endOf(l)},g=function(t,e){return H.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},p=this.$W,y=this.$M,m=this.$D,S="set"+(this.$u?"UTC":"");switch(s){case h:return r?f(1,0):f(31,11);case u:return r?f(1,y):f(0,y+1);case c:var $=this.$locale().weekStart||0,v=(p<$?p+7:p)-$;return f(r?m-v:m+(6-v),y);case l:case d:return g(S+"Hours",0);case o:return g(S+"Minutes",1);case i:return g(S+"Seconds",2);case a:return g(S+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,c=H.p(t),s="set"+(this.$u?"UTC":""),f=(n={},n[l]=s+"Date",n[d]=s+"Date",n[u]=s+"Month",n[h]=s+"FullYear",n[o]=s+"Hours",n[i]=s+"Minutes",n[a]=s+"Seconds",n[r]=s+"Milliseconds",n)[c],g=c===l?this.$D+(e-this.$W):e;if(c===u||c===h){var p=this.clone().set(d,1);p.$d[f](g),p.init(),this.$d=p.set(d,Math.min(this.$D,p.daysInMonth())).$d}else f&&this.$d[f](g);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[H.p(t)]()},m.add=function(r,s){var d,f=this;r=Number(r);var g=H.p(s),p=function(t){var e=B(f);return H.w(e.date(e.date()+Math.round(t*r)),f)};if(g===u)return this.set(u,this.$M+r);if(g===h)return this.set(h,this.$y+r);if(g===l)return p(1);if(g===c)return p(7);var y=(d={},d[i]=e,d[o]=n,d[a]=t,d)[g]||1,m=this.$d.getTime()+r*y;return H.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=t||"YYYY-MM-DDTHH:mm:ssZ",a=H.z(this),i=this.$H,o=this.$m,l=this.$M,c=n.weekdays,u=n.months,s=function(t,n,a,i){return t&&(t[n]||t(e,r))||a[n].slice(0,i)},h=function(t){return H.s(i%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},g={YY:String(this.$y).slice(-2),YYYY:this.$y,M:l+1,MM:H.s(l+1,2,"0"),MMM:s(n.monthsShort,l,u,3),MMMM:s(u,l),D:this.$D,DD:H.s(this.$D,2,"0"),d:String(this.$W),dd:s(n.weekdaysMin,this.$W,c,2),ddd:s(n.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(i),HH:H.s(i,2,"0"),h:h(1),hh:h(2),a:d(i,o,!0),A:d(i,o,!1),m:String(o),mm:H.s(o,2,"0"),s:String(this.$s),ss:H.s(this.$s,2,"0"),SSS:H.s(this.$ms,3,"0"),Z:a};return r.replace(p,(function(t,e){return e||g[t]||a.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,f){var g,p=H.p(d),y=B(r),m=(y.utcOffset()-this.utcOffset())*e,S=this-y,$=H.m(this,y);return $=(g={},g[h]=$/12,g[u]=$,g[s]=$/3,g[c]=(S-m)/6048e5,g[l]=(S-m)/864e5,g[o]=S/n,g[i]=S/e,g[a]=S/t,g)[p]||S,f?$:H.a($)},m.daysInMonth=function(){return this.endOf(u).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=D(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return H.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),w=b.prototype;return B.prototype=w,[["$ms",r],["$s",a],["$m",i],["$H",o],["$W",l],["$M",u],["$y",h],["$D",d]].forEach((function(t){w[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),B.extend=function(t,e){return t.$i||(t(e,b,B),t.$i=!0),B},B.locale=D,B.isDayjs=F,B.unix=function(t){return B(1e3*t)},B.en=v[$],B.Ls=v,B.p={},B}();!function(t){t.generateDays=t=>{const e=t.startOf("month"),n=h(e).startOf("week");return d(n).map((t=>f(t)))},t.generateMonths=t=>{const e=[];for(let n=0;n<12;n++){const r=t.month(n);e.push(h(r))}return e},t.generateDecadeOfYears=t=>{const e=t.year(),n=10*Math.floor(e/10),r=t.year(n),a=[r.subtract(1,"year"),r];for(let t=1;t<11;t++)a.push(r.add(t,"year"));return a},t.getStartEndDecade=t=>{const e=10*Math.floor(+t.format("YYYY")/10);return{beginDecade:e,endDecade:+h(`${e+9}-01-01`).format("YYYY")}}}(c||(c={}));const d=t=>{const e=[t];for(let n=1;n<6;n++){const r=t.add(n,"week");e.push(r)}return e},f=t=>{const e=[];for(let n=0;n<7;n++){const r=t.add(n,"day");e.push(r)}return e},g=[1,3,5,7,8,10,12],p=[4,6,9,11];var y,m;!function(t){t.clampDay=(e,n,r)=>{const a=parseInt(e),i=parseInt(n),o=parseInt(r);return 0==a?"1":g.includes(i)?Math.min(a,31).toString():p.includes(i)?Math.min(a,30).toString():2===i?t.isLeapYear(o)?Math.min(a,29).toString():Math.min(a,28).toString():e},t.clampMonth=t=>{const e=parseInt(t);return 0==e?"1":e>12?"12":t},t.isLeapYear=t=>t%4==0&&t%100!=0||t%400==0}(y||(y={})),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 a=0;e>n&&(a=Math.floor((e-n)/8));const i=r+a;if(i<t.length){const e=Math.floor(i/2);return t.substring(0,e)+" ... "+t.substring(t.length-e,t.length)}return t}}(m||(m={}));var S=Array.isArray,$="object"==typeof u&&u&&u.Object===Object&&u,v="object"==typeof self&&self&&self.Object===Object&&self,F=$||v||Function("return this")(),D=F.Symbol,B=D,H=Object.prototype,b=H.hasOwnProperty,w=H.toString,_=B?B.toStringTag:void 0;var x=function(t){var e=b.call(t,_),n=t[_];try{t[_]=void 0;var r=!0}catch(t){}var a=w.call(t);return r&&(e?t[_]=n:delete t[_]),a},O=Object.prototype.toString;var C=x,M=function(t){return O.call(t)},z=D?D.toStringTag:void 0;var k=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":z&&z in Object(t)?C(t):M(t)};var E=k,A=function(t){return null!=t&&"object"==typeof t};var W=function(t){return"symbol"==typeof t||A(t)&&"[object Symbol]"==E(t)},V=S,T=W,N=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L=/^\w*$/;var j=function(t,e){if(V(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!T(t))||(L.test(t)||!N.test(t)||null!=e&&t in Object(e))};var I=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Y=k,R=I;var P,X=function(t){if(!R(t))return!1;var e=Y(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},G=F["__core-js_shared__"],Z=(P=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+P:"";var U=function(t){return!!Z&&Z in t},J=Function.prototype.toString;var K=X,q=U,Q=I,tt=function(t){if(null!=t){try{return J.call(t)}catch(t){}try{return t+""}catch(t){}}return""},et=/^\[object .+?Constructor\]$/,nt=Function.prototype,rt=Object.prototype,at=nt.toString,it=rt.hasOwnProperty,ot=RegExp("^"+at.call(it).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var lt=function(t){return!(!Q(t)||q(t))&&(K(t)?ot:et).test(tt(t))},ct=function(t,e){return null==t?void 0:t[e]};var ut=function(t,e){var n=ct(t,e);return lt(n)?n:void 0},st=ut(Object,"create"),ht=st;var dt=function(){this.__data__=ht?ht(null):{},this.size=0};var ft=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},gt=st,pt=Object.prototype.hasOwnProperty;var yt=function(t){var e=this.__data__;if(gt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return pt.call(e,t)?e[t]:void 0},mt=st,St=Object.prototype.hasOwnProperty;var $t=st;var vt=dt,Ft=ft,Dt=yt,Bt=function(t){var e=this.__data__;return mt?void 0!==e[t]:St.call(e,t)},Ht=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=$t&&void 0===e?"__lodash_hash_undefined__":e,this};function bt(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])}}bt.prototype.clear=vt,bt.prototype.delete=Ft,bt.prototype.get=Dt,bt.prototype.has=Bt,bt.prototype.set=Ht;var wt=bt;var _t=function(){this.__data__=[],this.size=0};var xt=function(t,e){return t===e||t!=t&&e!=e};var Ot=function(t,e){for(var n=t.length;n--;)if(xt(t[n][0],e))return n;return-1},Ct=Ot,Mt=Array.prototype.splice;var zt=Ot;var kt=Ot;var Et=Ot;var At=_t,Wt=function(t){var e=this.__data__,n=Ct(e,t);return!(n<0)&&(n==e.length-1?e.pop():Mt.call(e,n,1),--this.size,!0)},Vt=function(t){var e=this.__data__,n=zt(e,t);return n<0?void 0:e[n][1]},Tt=function(t){return kt(this.__data__,t)>-1},Nt=function(t,e){var n=this.__data__,r=Et(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function Lt(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])}}Lt.prototype.clear=At,Lt.prototype.delete=Wt,Lt.prototype.get=Vt,Lt.prototype.has=Tt,Lt.prototype.set=Nt;var jt=Lt,It=ut(F,"Map"),Yt=wt,Rt=jt,Pt=It;var Xt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Gt=function(t,e){var n=t.__data__;return Xt(e)?n["string"==typeof e?"string":"hash"]:n.map},Zt=Gt;var Ut=Gt;var Jt=Gt;var Kt=Gt;var qt=function(){this.size=0,this.__data__={hash:new Yt,map:new(Pt||Rt),string:new Yt}},Qt=function(t){var e=Zt(this,t).delete(t);return this.size-=e?1:0,e},te=function(t){return Ut(this,t).get(t)},ee=function(t){return Jt(this,t).has(t)},ne=function(t,e){var n=Kt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function re(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])}}re.prototype.clear=qt,re.prototype.delete=Qt,re.prototype.get=te,re.prototype.has=ee,re.prototype.set=ne;var ae=re;function ie(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=e?e.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=t.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(ie.Cache||ae),n}ie.Cache=ae;var oe=ie;var le=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ce=/\\(\\)?/g,ue=function(t){var e=oe(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(le,(function(t,n,r,a){e.push(r?a.replace(ce,"$1"):n||t)})),e}));var se=function(t,e){for(var n=-1,r=null==t?0:t.length,a=Array(r);++n<r;)a[n]=e(t[n],n,t);return a},he=S,de=W,fe=D?D.prototype:void 0,ge=fe?fe.toString:void 0;var pe=function t(e){if("string"==typeof e)return e;if(he(e))return se(e,t)+"";if(de(e))return ge?ge.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n},ye=pe;var me=S,Se=j,$e=ue,ve=function(t){return null==t?"":ye(t)};var Fe=W;var De=function(t,e){return me(t)?t:Se(t,e)?[t]:$e(ve(t))},Be=function(t){if("string"==typeof t||Fe(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var He=function(t,e){for(var n=0,r=(e=De(e,t)).length;null!=t&&n<r;)t=t[Be(e[n++])];return n&&n==r?t:void 0};var be=function(t,e,n){var r=null==t?void 0:He(t,e);return void 0===r?n:r};const we=(t,e,n)=>e?be(n,e)||be(t,e):n||t,_e=(t,e)=>{const n=e||t.defaultValue;return be(t.collections,n)};var xe;!function(t){t.colorScheme="colorScheme",t.layout="layout",t.textStyleScheme="textStyleScheme",t.designTokenScheme="designTokenScheme"}(xe||(xe={}));const Oe={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"},Ce=t=>e=>{const n=e.theme,r=_e(Oe,n[xe.colorScheme]);return n.options&&n.options.color?we(r,t,n.options.color):we(r,t)},Me={Brand:{1:Ce("Brand.1"),2:Ce("Brand.2"),3:Ce("Brand.3"),4:Ce("Brand.4"),5:Ce("Brand.5"),6:Ce("Brand.6")},Primary:Ce("Primary"),PrimaryDark:Ce("PrimaryDark"),Secondary:Ce("Secondary"),Accent:{Light:{1:Ce("Accent.Light.1"),2:Ce("Accent.Light.2"),3:Ce("Accent.Light.3"),4:Ce("Accent.Light.4"),5:Ce("Accent.Light.5"),6:Ce("Accent.Light.6")},Dark:{1:Ce("Accent.Dark.1"),2:Ce("Accent.Dark.2"),3:Ce("Accent.Dark.3")}},Neutral:{1:Ce("Neutral.1"),2:Ce("Neutral.2"),3:Ce("Neutral.3"),4:Ce("Neutral.4"),5:Ce("Neutral.5"),6:Ce("Neutral.6"),7:Ce("Neutral.7"),8:Ce("Neutral.8")},Validation:{Green:{Text:Ce("Validation.Green.Text"),Icon:Ce("Validation.Green.Icon"),Border:Ce("Validation.Green.Border"),Background:Ce("Validation.Green.Background")},Orange:{Text:Ce("Validation.Orange.Text"),Icon:Ce("Validation.Orange.Icon"),Border:Ce("Validation.Orange.Border"),Background:Ce("Validation.Orange.Background"),Badge:Ce("Validation.Orange.Badge")},Red:{Text:Ce("Validation.Red.Text"),Icon:Ce("Validation.Red.Icon"),Border:Ce("Validation.Red.Border"),Background:Ce("Validation.Red.Background")}},Shadow:{Accent:Ce("Shadow.Accent"),Red:Ce("Shadow.Red")}},ze={collections:{base:{InputBoxShadow:l`
2
+ inset 0 0 6px 1px ${Me.Shadow.Accent}
3
3
  `,InputErrorBoxShadow:l`
4
- inset 0 0 6px 1px ${wt.Shadow.Red}
5
- `}},defaultValue:"base"},xt=e=>t=>{const n=t.theme,r=$t(_t,n[Ht.designTokenScheme]);return n.options?.designToken?Bt(r,e,n.options.designToken):Bt(r,e)},zt=xt("InputBoxShadow"),Ct=xt("InputErrorBoxShadow"),kt={Regular:"Open Sans",Semibold:"Open Sans Semibold",Bold:"Open Sans Bold",Light:"Open Sans Light"},Et={collections:{base:{D1:{fontFamily:kt.Bold,fontSize:3,fontWeight:700,lineHeight:4,letterSpacing:-.056},D2:{fontFamily:kt.Bold,fontSize:2.5,fontWeight:700,lineHeight:3.5,letterSpacing:-.032},D3:{fontFamily:kt.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},D4:{fontFamily:kt.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},DBody:{fontFamily:kt.Regular,fontSize:1.375,lineHeight:1.75},H1:{fontFamily:kt.Bold,fontSize:2,fontWeight:700,lineHeight:2.5},H2:{fontFamily:kt.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},H3:{fontFamily:kt.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},H4:{fontFamily:kt.Bold,fontSize:1.125,fontWeight:700,lineHeight:1.625},H5:{fontFamily:kt.Bold,fontSize:1,fontWeight:700,lineHeight:1.5,letterSpacing:.014},H6:{fontFamily:kt.Bold,fontSize:.875,fontWeight:700,lineHeight:1.6,letterSpacing:.012},Body:{fontFamily:kt.Regular,fontSize:1.125,lineHeight:1.625},BodySmall:{fontFamily:kt.Regular,fontSize:1,lineHeight:1.5,letterSpacing:.014},XSmall:{fontFamily:kt.Regular,fontSize:.75,lineHeight:1.2,letterSpacing:.012}}},defaultValue:"base"},At=e=>t=>{const n=t.theme,r=$t(Et,n[Ht.textStyleScheme]);return n.options&&n.options.textStyle?Bt(r,e,n.options.textStyle):Bt(r,e)},Ot={D1:{fontFamily:At("D1.fontFamily"),fontSize:At("D1.fontSize"),fontWeight:At("D1.fontWeight"),lineHeight:At("D1.lineHeight"),letterSpacing:At("D1.letterSpacing")},D2:{fontFamily:At("D2.fontFamily"),fontSize:At("D2.fontSize"),fontWeight:At("D2.fontWeight"),lineHeight:At("D2.lineHeight"),letterSpacing:At("D2.letterSpacing")},D3:{fontFamily:At("D3.fontFamily"),fontSize:At("D3.fontSize"),fontWeight:At("D3.fontWeight"),lineHeight:At("D3.lineHeight"),letterSpacing:At("D3.letterSpacing")},D4:{fontFamily:At("D4.fontFamily"),fontSize:At("D4.fontSize"),fontWeight:At("D4.fontWeight"),lineHeight:At("D4.lineHeight"),letterSpacing:At("D4.letterSpacing")},DBody:{fontFamily:At("DBody.fontFamily"),fontSize:At("DBody.fontSize"),fontWeight:At("DBody.fontWeight"),lineHeight:At("DBody.lineHeight"),letterSpacing:At("DBody.letterSpacing")},H1:{fontFamily:At("H1.fontFamily"),fontSize:At("H1.fontSize"),fontWeight:At("H1.fontWeight"),lineHeight:At("H1.lineHeight"),letterSpacing:At("H1.letterSpacing")},H2:{fontFamily:At("H2.fontFamily"),fontSize:At("H2.fontSize"),fontWeight:At("H2.fontWeight"),lineHeight:At("H2.lineHeight"),letterSpacing:At("H2.letterSpacing")},H3:{fontFamily:At("H3.fontFamily"),fontSize:At("H3.fontSize"),fontWeight:At("H3.fontWeight"),lineHeight:At("H3.lineHeight"),letterSpacing:At("H3.letterSpacing")},H4:{fontFamily:At("H4.fontFamily"),fontSize:At("H4.fontSize"),fontWeight:At("H4.fontWeight"),lineHeight:At("H4.lineHeight"),letterSpacing:At("H4.letterSpacing")},H5:{fontFamily:At("H5.fontFamily"),fontSize:At("H5.fontSize"),fontWeight:At("H5.fontWeight"),lineHeight:At("H5.lineHeight"),letterSpacing:At("H5.letterSpacing")},H6:{fontFamily:At("H6.fontFamily"),fontSize:At("H6.fontSize"),fontWeight:At("H6.fontWeight"),lineHeight:At("H6.lineHeight"),letterSpacing:At("H6.letterSpacing")},Body:{fontFamily:At("Body.fontFamily"),fontSize:At("Body.fontSize"),fontWeight:At("Body.fontWeight"),lineHeight:At("Body.lineHeight"),letterSpacing:At("Body.letterSpacing")},BodySmall:{fontFamily:At("BodySmall.fontFamily"),fontSize:At("BodySmall.fontSize"),fontWeight:At("BodySmall.fontWeight"),lineHeight:At("BodySmall.lineHeight"),letterSpacing:At("BodySmall.letterSpacing")},XSmall:{fontFamily:At("XSmall.fontFamily"),fontSize:At("XSmall.fontSize"),fontWeight:At("XSmall.fontWeight"),lineHeight:At("XSmall.lineHeight"),letterSpacing:At("XSmall.letterSpacing")}},Wt=e=>{switch(e){case 700:case"bold":return kt.Bold;case 600:case"semibold":return kt.Semibold;case 300:case"light":return kt.Light;case 400:case"regular":return kt.Regular;default:return""}},Vt=(e,t)=>n=>{const r=Ot[e].fontFamily(n),a=Ot[e].fontWeight(n);return Object.values(kt).includes(r)?l`
6
- font-family: ${Wt(t)||Wt(a)||r};
4
+ inset 0 0 6px 1px ${Me.Shadow.Red}
5
+ `}},defaultValue:"base"},ke=t=>e=>{const n=e.theme,r=_e(ze,n[xe.designTokenScheme]);return n.options?.designToken?we(r,t,n.options.designToken):we(r,t)},Ee=ke("InputBoxShadow"),Ae=ke("InputErrorBoxShadow"),We={Regular:"Open Sans",Semibold:"Open Sans Semibold",Bold:"Open Sans Bold",Light:"Open Sans Light"},Ve={collections:{base:{D1:{fontFamily:We.Bold,fontSize:3,fontWeight:700,lineHeight:4,letterSpacing:-.056},D2:{fontFamily:We.Bold,fontSize:2.5,fontWeight:700,lineHeight:3.5,letterSpacing:-.032},D3:{fontFamily:We.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},D4:{fontFamily:We.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},DBody:{fontFamily:We.Regular,fontSize:1.375,lineHeight:1.75},H1:{fontFamily:We.Bold,fontSize:2,fontWeight:700,lineHeight:2.5},H2:{fontFamily:We.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},H3:{fontFamily:We.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},H4:{fontFamily:We.Bold,fontSize:1.125,fontWeight:700,lineHeight:1.625},H5:{fontFamily:We.Bold,fontSize:1,fontWeight:700,lineHeight:1.5,letterSpacing:.014},H6:{fontFamily:We.Bold,fontSize:.875,fontWeight:700,lineHeight:1.6,letterSpacing:.012},Body:{fontFamily:We.Regular,fontSize:1.125,lineHeight:1.625},BodySmall:{fontFamily:We.Regular,fontSize:1,lineHeight:1.5,letterSpacing:.014},XSmall:{fontFamily:We.Regular,fontSize:.75,lineHeight:1.2,letterSpacing:.012}}},defaultValue:"base"},Te=t=>e=>{const n=e.theme,r=_e(Ve,n[xe.textStyleScheme]);return n.options&&n.options.textStyle?we(r,t,n.options.textStyle):we(r,t)},Ne={D1:{fontFamily:Te("D1.fontFamily"),fontSize:Te("D1.fontSize"),fontWeight:Te("D1.fontWeight"),lineHeight:Te("D1.lineHeight"),letterSpacing:Te("D1.letterSpacing")},D2:{fontFamily:Te("D2.fontFamily"),fontSize:Te("D2.fontSize"),fontWeight:Te("D2.fontWeight"),lineHeight:Te("D2.lineHeight"),letterSpacing:Te("D2.letterSpacing")},D3:{fontFamily:Te("D3.fontFamily"),fontSize:Te("D3.fontSize"),fontWeight:Te("D3.fontWeight"),lineHeight:Te("D3.lineHeight"),letterSpacing:Te("D3.letterSpacing")},D4:{fontFamily:Te("D4.fontFamily"),fontSize:Te("D4.fontSize"),fontWeight:Te("D4.fontWeight"),lineHeight:Te("D4.lineHeight"),letterSpacing:Te("D4.letterSpacing")},DBody:{fontFamily:Te("DBody.fontFamily"),fontSize:Te("DBody.fontSize"),fontWeight:Te("DBody.fontWeight"),lineHeight:Te("DBody.lineHeight"),letterSpacing:Te("DBody.letterSpacing")},H1:{fontFamily:Te("H1.fontFamily"),fontSize:Te("H1.fontSize"),fontWeight:Te("H1.fontWeight"),lineHeight:Te("H1.lineHeight"),letterSpacing:Te("H1.letterSpacing")},H2:{fontFamily:Te("H2.fontFamily"),fontSize:Te("H2.fontSize"),fontWeight:Te("H2.fontWeight"),lineHeight:Te("H2.lineHeight"),letterSpacing:Te("H2.letterSpacing")},H3:{fontFamily:Te("H3.fontFamily"),fontSize:Te("H3.fontSize"),fontWeight:Te("H3.fontWeight"),lineHeight:Te("H3.lineHeight"),letterSpacing:Te("H3.letterSpacing")},H4:{fontFamily:Te("H4.fontFamily"),fontSize:Te("H4.fontSize"),fontWeight:Te("H4.fontWeight"),lineHeight:Te("H4.lineHeight"),letterSpacing:Te("H4.letterSpacing")},H5:{fontFamily:Te("H5.fontFamily"),fontSize:Te("H5.fontSize"),fontWeight:Te("H5.fontWeight"),lineHeight:Te("H5.lineHeight"),letterSpacing:Te("H5.letterSpacing")},H6:{fontFamily:Te("H6.fontFamily"),fontSize:Te("H6.fontSize"),fontWeight:Te("H6.fontWeight"),lineHeight:Te("H6.lineHeight"),letterSpacing:Te("H6.letterSpacing")},Body:{fontFamily:Te("Body.fontFamily"),fontSize:Te("Body.fontSize"),fontWeight:Te("Body.fontWeight"),lineHeight:Te("Body.lineHeight"),letterSpacing:Te("Body.letterSpacing")},BodySmall:{fontFamily:Te("BodySmall.fontFamily"),fontSize:Te("BodySmall.fontSize"),fontWeight:Te("BodySmall.fontWeight"),lineHeight:Te("BodySmall.lineHeight"),letterSpacing:Te("BodySmall.letterSpacing")},XSmall:{fontFamily:Te("XSmall.fontFamily"),fontSize:Te("XSmall.fontSize"),fontWeight:Te("XSmall.fontWeight"),lineHeight:Te("XSmall.lineHeight"),letterSpacing:Te("XSmall.letterSpacing")}},Le=t=>{switch(t){case 700:case"bold":return We.Bold;case 600:case"semibold":return We.Semibold;case 300:case"light":return We.Light;case 400:case"regular":return We.Regular;default:return""}},je=(t,e)=>n=>{const r=Ne[t].fontFamily(n),a=Ne[t].fontWeight(n);return Object.values(We).includes(r)?l`
6
+ font-family: ${Le(e)||Le(a)||r};
7
7
  font-weight: normal !important;
8
8
  `:l`
9
9
  font-family: ${r};
10
- font-weight: ${(Nt(t)||a)??"normal"};
11
- `},Nt=e=>{switch(e){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""}},jt=(e,t,n=!1)=>r=>{const a=Ot[e],o=a.fontSize(r);return l`
12
- ${Vt(e,t)}
13
- font-size: ${o}rem !important;
10
+ font-weight: ${(Ie(e)||a)??"normal"};
11
+ `},Ie=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""}},Ye=(t,e,n=!1)=>r=>{const a=Ne[t],i=a.fontSize(r);return l`
12
+ ${je(t,e)}
13
+ font-size: ${i}rem !important;
14
14
  line-height: ${a.lineHeight}rem !important;
15
15
  letter-spacing: ${a.letterSpacing(r)||0}rem !important;
16
16
  ${l`
17
- margin-bottom: ${o*(n?1.05:0)}rem;
17
+ margin-bottom: ${i*(n?1.05:0)}rem;
18
18
  `}
19
- `},Tt=(e=!1,t=!1)=>t?l`
19
+ `},Re=(t=!1,e=!1)=>e?l`
20
20
  display: block;
21
- `:e?l`
21
+ `:t?l`
22
22
  display: inline;
23
23
  `:l`
24
24
  display: block;
25
- `;var It,Lt={};Object.defineProperty(Lt,"__esModule",{value:!0});var Rt=e;const Mt=e=>Rt.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Rt.jsx("path",{d:"M4.25 17.5C3.764 17.5 3.35067 17.33 3.01 16.99C2.67 16.6493 2.5 16.236 2.5 15.75V4.25C2.5 3.764 2.67 3.35067 3.01 3.01C3.35067 2.67 3.764 2.5 4.25 2.5H9.208C9.444 2.5 9.649 2.58667 9.823 2.76C9.99633 2.934 10.083 3.139 10.083 3.375C10.083 3.611 9.99633 3.816 9.823 3.99C9.649 4.16333 9.444 4.25 9.208 4.25H4.25V15.75H15.75V10.792C15.75 10.556 15.8367 10.351 16.01 10.177C16.184 10.0037 16.389 9.917 16.625 9.917C16.861 9.917 17.066 10.0037 17.24 10.177C17.4133 10.351 17.5 10.556 17.5 10.792V15.75C17.5 16.236 17.33 16.6493 16.99 16.99C16.6493 17.33 16.236 17.5 15.75 17.5H4.25ZM7.5 12.5C7.33333 12.3333 7.25 12.1283 7.25 11.885C7.25 11.6423 7.33333 11.4377 7.5 11.271L14.521 4.25H12.708C12.472 4.25 12.2673 4.16333 12.094 3.99C11.92 3.816 11.833 3.611 11.833 3.375C11.833 3.139 11.92 2.934 12.094 2.76C12.2673 2.58667 12.472 2.5 12.708 2.5H16.625C16.861 2.5 17.066 2.58667 17.24 2.76C17.4133 2.934 17.5 3.139 17.5 3.375V7.292C17.5 7.528 17.4133 7.73267 17.24 7.906C17.066 8.08 16.861 8.167 16.625 8.167C16.389 8.167 16.184 8.08 16.01 7.906C15.8367 7.73267 15.75 7.528 15.75 7.292V5.479L8.708 12.521C8.54133 12.6877 8.34367 12.771 8.115 12.771C7.88567 12.771 7.68067 12.6807 7.5 12.5Z",fill:"currentColor"})});var Pt;Mt.displayName="ExternalIcon",It=Lt.ExternalIcon=Mt,function(e){e.D1=i.h1`
26
- ${e=>l`
27
- ${jt("D1",e.weight,e.paragraph)}
28
- color: ${wt.Neutral[1]};
29
- ${Tt(e.inline,e.paragraph)}
25
+ `;var Pe,Xe={};Object.defineProperty(Xe,"__esModule",{value:!0});var Ge=t;const Ze=t=>Ge.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Ge.jsx("path",{d:"M4.25 17.5C3.764 17.5 3.35067 17.33 3.01 16.99C2.67 16.6493 2.5 16.236 2.5 15.75V4.25C2.5 3.764 2.67 3.35067 3.01 3.01C3.35067 2.67 3.764 2.5 4.25 2.5H9.208C9.444 2.5 9.649 2.58667 9.823 2.76C9.99633 2.934 10.083 3.139 10.083 3.375C10.083 3.611 9.99633 3.816 9.823 3.99C9.649 4.16333 9.444 4.25 9.208 4.25H4.25V15.75H15.75V10.792C15.75 10.556 15.8367 10.351 16.01 10.177C16.184 10.0037 16.389 9.917 16.625 9.917C16.861 9.917 17.066 10.0037 17.24 10.177C17.4133 10.351 17.5 10.556 17.5 10.792V15.75C17.5 16.236 17.33 16.6493 16.99 16.99C16.6493 17.33 16.236 17.5 15.75 17.5H4.25ZM7.5 12.5C7.33333 12.3333 7.25 12.1283 7.25 11.885C7.25 11.6423 7.33333 11.4377 7.5 11.271L14.521 4.25H12.708C12.472 4.25 12.2673 4.16333 12.094 3.99C11.92 3.816 11.833 3.611 11.833 3.375C11.833 3.139 11.92 2.934 12.094 2.76C12.2673 2.58667 12.472 2.5 12.708 2.5H16.625C16.861 2.5 17.066 2.58667 17.24 2.76C17.4133 2.934 17.5 3.139 17.5 3.375V7.292C17.5 7.528 17.4133 7.73267 17.24 7.906C17.066 8.08 16.861 8.167 16.625 8.167C16.389 8.167 16.184 8.08 16.01 7.906C15.8367 7.73267 15.75 7.528 15.75 7.292V5.479L8.708 12.521C8.54133 12.6877 8.34367 12.771 8.115 12.771C7.88567 12.771 7.68067 12.6807 7.5 12.5Z",fill:"currentColor"})});var Ue;Ze.displayName="ExternalIcon",Pe=Xe.ExternalIcon=Ze,function(t){t.D1=o.h1`
26
+ ${t=>l`
27
+ ${Ye("D1",t.weight,t.paragraph)}
28
+ color: ${Me.Neutral[1]};
29
+ ${Re(t.inline,t.paragraph)}
30
30
  `}
31
- `,e.D2=i.h1`
32
- ${e=>l`
33
- ${jt("D2",e.weight,e.paragraph)}
34
- color: ${wt.Neutral[1]};
35
- ${Tt(e.inline,e.paragraph)}
31
+ `,t.D2=o.h1`
32
+ ${t=>l`
33
+ ${Ye("D2",t.weight,t.paragraph)}
34
+ color: ${Me.Neutral[1]};
35
+ ${Re(t.inline,t.paragraph)}
36
36
  `}
37
- `,e.D3=i.h1`
38
- ${e=>l`
39
- ${jt("D3",e.weight,e.paragraph)}
40
- color: ${wt.Neutral[1]};
41
- ${Tt(e.inline,e.paragraph)}
37
+ `,t.D3=o.h1`
38
+ ${t=>l`
39
+ ${Ye("D3",t.weight,t.paragraph)}
40
+ color: ${Me.Neutral[1]};
41
+ ${Re(t.inline,t.paragraph)}
42
42
  `}
43
- `,e.D4=i.h1`
44
- ${e=>l`
45
- ${jt("D4",e.weight,e.paragraph)}
46
- color: ${wt.Neutral[1]};
47
- ${Tt(e.inline,e.paragraph)}
43
+ `,t.D4=o.h1`
44
+ ${t=>l`
45
+ ${Ye("D4",t.weight,t.paragraph)}
46
+ color: ${Me.Neutral[1]};
47
+ ${Re(t.inline,t.paragraph)}
48
48
  `}
49
- `,e.DBody=i.h1`
50
- ${e=>l`
51
- ${jt("DBody",e.weight,e.paragraph)}
52
- color: ${wt.Neutral[1]};
53
- ${Tt(e.inline,e.paragraph)}
49
+ `,t.DBody=o.h1`
50
+ ${t=>l`
51
+ ${Ye("DBody",t.weight,t.paragraph)}
52
+ color: ${Me.Neutral[1]};
53
+ ${Re(t.inline,t.paragraph)}
54
54
  `}
55
- `,e.H1=i.h1`
56
- ${e=>l`
57
- ${jt("H1",e.weight,e.paragraph)}
58
- color: ${wt.Neutral[1]};
59
- ${Tt(e.inline,e.paragraph)}
55
+ `,t.H1=o.h1`
56
+ ${t=>l`
57
+ ${Ye("H1",t.weight,t.paragraph)}
58
+ color: ${Me.Neutral[1]};
59
+ ${Re(t.inline,t.paragraph)}
60
60
  `}
61
- `,e.H2=i.h2`
62
- ${e=>l`
63
- ${jt("H2",e.weight,e.paragraph)}
64
- color: ${wt.Neutral[1]};
65
- ${Tt(e.inline,e.paragraph)}
61
+ `,t.H2=o.h2`
62
+ ${t=>l`
63
+ ${Ye("H2",t.weight,t.paragraph)}
64
+ color: ${Me.Neutral[1]};
65
+ ${Re(t.inline,t.paragraph)}
66
66
  `}
67
- `,e.H3=i.h3`
68
- ${e=>l`
69
- ${jt("H3",e.weight,e.paragraph)}
70
- color: ${wt.Neutral[1]};
71
- ${Tt(e.inline,e.paragraph)}
67
+ `,t.H3=o.h3`
68
+ ${t=>l`
69
+ ${Ye("H3",t.weight,t.paragraph)}
70
+ color: ${Me.Neutral[1]};
71
+ ${Re(t.inline,t.paragraph)}
72
72
  `}
73
- `,e.H4=i.h4`
74
- ${e=>l`
75
- ${jt("H4",e.weight,e.paragraph)}
76
- color: ${wt.Neutral[1]};
77
- ${Tt(e.inline,e.paragraph)}
73
+ `,t.H4=o.h4`
74
+ ${t=>l`
75
+ ${Ye("H4",t.weight,t.paragraph)}
76
+ color: ${Me.Neutral[1]};
77
+ ${Re(t.inline,t.paragraph)}
78
78
  `}
79
- `,e.H5=i.h5`
80
- ${e=>l`
81
- ${jt("H5",e.weight,e.paragraph)}
82
- color: ${wt.Neutral[1]};
83
- ${Tt(e.inline,e.paragraph)}
79
+ `,t.H5=o.h5`
80
+ ${t=>l`
81
+ ${Ye("H5",t.weight,t.paragraph)}
82
+ color: ${Me.Neutral[1]};
83
+ ${Re(t.inline,t.paragraph)}
84
84
  `}
85
- `,e.H6=i.h6`
86
- ${e=>l`
87
- ${jt("H6",e.weight,e.paragraph)}
88
- color: ${wt.Neutral[1]};
89
- ${Tt(e.inline,e.paragraph)}
85
+ `,t.H6=o.h6`
86
+ ${t=>l`
87
+ ${Ye("H6",t.weight,t.paragraph)}
88
+ color: ${Me.Neutral[1]};
89
+ ${Re(t.inline,t.paragraph)}
90
90
  `}
91
- `,e.Body=i.p`
92
- ${e=>l`
93
- ${jt("Body",e.weight,e.paragraph)}
94
- color: ${wt.Neutral[1]};
95
- ${Tt(e.inline,e.paragraph)}
91
+ `,t.Body=o.p`
92
+ ${t=>l`
93
+ ${Ye("Body",t.weight,t.paragraph)}
94
+ color: ${Me.Neutral[1]};
95
+ ${Re(t.inline,t.paragraph)}
96
96
  `}
97
- `,e.BodySmall=i.p`
98
- ${e=>l`
99
- ${jt("BodySmall",e.weight,e.paragraph)}
100
- color: ${wt.Neutral[1]};
101
- ${Tt(e.inline,e.paragraph)}
97
+ `,t.BodySmall=o.p`
98
+ ${t=>l`
99
+ ${Ye("BodySmall",t.weight,t.paragraph)}
100
+ color: ${Me.Neutral[1]};
101
+ ${Re(t.inline,t.paragraph)}
102
102
  `}
103
- `,e.XSmall=i.span`
104
- ${e=>l`
105
- ${jt("XSmall",e.weight,e.paragraph)}
106
- color: ${wt.Neutral[1]};
107
- ${Tt(e.inline,e.paragraph)}
103
+ `,t.XSmall=o.span`
104
+ ${t=>l`
105
+ ${Ye("XSmall",t.weight,t.paragraph)}
106
+ color: ${Me.Neutral[1]};
107
+ ${Re(t.inline,t.paragraph)}
108
108
  `}
109
- `,e.Hyperlink={Default:e=>Yt({...e,textStyle:"Body"}),Small:e=>Yt({...e,textStyle:"BodySmall"})}}(Pt||(Pt={}));const Xt=i.a`
110
- ${e=>l`
111
- ${jt(e.textStyle,e.weight)}
112
- color: ${wt.Primary};
109
+ `,t.Hyperlink={Default:t=>qe({...t,textStyle:"Body"}),Small:t=>qe({...t,textStyle:"BodySmall"})}}(Ue||(Ue={}));const Je=o.a`
110
+ ${t=>l`
111
+ ${Ye(t.textStyle,t.weight)}
112
+ color: ${Me.Primary};
113
113
  text-decoration: none;
114
114
 
115
115
  :hover,
116
116
  :active,
117
117
  :focus {
118
- color: ${wt.Secondary};
118
+ color: ${Me.Secondary};
119
119
 
120
120
  svg {
121
- color: ${wt.Secondary};
121
+ color: ${Me.Secondary};
122
122
  }
123
123
  }
124
124
  `}
125
- `,Gt=i(It)`
125
+ `,Ke=o(Pe)`
126
126
  height: 1rem;
127
127
  width: 1rem;
128
128
  margin-left: 0.4rem;
129
129
  vertical-align: middle;
130
- `,Yt=({external:e=!1,children:r,...a})=>t(Xt,{...a,children:[r,e&&n(Gt,{})]}),Zt=i.div`
130
+ `,qe=({external:t=!1,children:r,...a})=>e(Je,{...a,children:[r,t&&n(Ke,{})]}),Qe=o.div`
131
131
  display: flex;
132
132
  position: relative;
133
133
  align-items: center;
134
- border: 1px solid ${wt.Neutral[5]};
134
+ border: 1px solid ${Me.Neutral[5]};
135
135
  border-radius: 4px;
136
- background: ${wt.Neutral[8]};
136
+ background: ${Me.Neutral[8]};
137
137
  height: 3rem;
138
138
  width: 100%;
139
139
  padding: 0.1rem 1rem 0;
140
140
 
141
141
  :focus,
142
142
  :focus-within {
143
- border: 1px solid ${wt.Accent.Light[1]};
144
- box-shadow: ${zt};
143
+ border: 1px solid ${Me.Accent.Light[1]};
144
+ box-shadow: ${Ee};
145
145
  }
146
146
 
147
- ${e=>e.$readOnly?l`
147
+ ${t=>t.$readOnly?l`
148
148
  border: none;
149
149
  padding-left: 0rem;
150
150
  background: transparent !important;
@@ -153,33 +153,33 @@ import e,{jsxs as t,jsx as n}from"react/jsx-runtime";import{useState as r,useRef
153
153
  border: none;
154
154
  box-shadow: none;
155
155
  }
156
- `:e.disabled?l`
157
- background: ${wt.Neutral[6](e)};
156
+ `:t.disabled?l`
157
+ background: ${Me.Neutral[6](t)};
158
158
  :hover {
159
159
  cursor: not-allowed;
160
160
  }
161
161
 
162
162
  :focus-within {
163
- border: 1px solid ${wt.Neutral[5](e)};
163
+ border: 1px solid ${Me.Neutral[5](t)};
164
164
  box-shadow: none;
165
165
  }
166
- `:e.$error?l`
167
- border: 1px solid ${wt.Validation.Red.Border(e)};
166
+ `:t.$error?l`
167
+ border: 1px solid ${Me.Validation.Red.Border(t)};
168
168
 
169
169
  :focus-within {
170
- border: 1px solid ${wt.Validation.Red.Border(e)};
171
- box-shadow: ${Ct};
170
+ border: 1px solid ${Me.Validation.Red.Border(t)};
171
+ box-shadow: ${Ae};
172
172
  }
173
173
  `:void 0}
174
- `,Kt=i.div`
174
+ `,tn=o.div`
175
175
  position: absolute;
176
176
  top: 0;
177
- left: ${e=>e.$readOnly?"-0.5rem":"1rem"};
177
+ left: ${t=>t.$readOnly?"-0.5rem":"1rem"};
178
178
  height: 100%;
179
179
  display: flex;
180
180
  align-items: center;
181
- `,Ut=i.input`
182
- ${jt("Body","regular")}
181
+ `,en=o.input`
182
+ ${Ye("Body","regular")}
183
183
  background: transparent;
184
184
  height: 100%;
185
185
  width: 2.5rem;
@@ -205,21 +205,21 @@ import e,{jsxs as t,jsx as n}from"react/jsx-runtime";import{useState as r,useRef
205
205
  outline: none;
206
206
  }
207
207
 
208
- ${e=>{if(e.disabled)return l`
208
+ ${t=>{if(t.disabled)return l`
209
209
  cursor: not-allowed;
210
210
  `}}
211
- `,qt=i(Ut)`
211
+ `,nn=o(en)`
212
212
  width: 2.6rem;
213
- `,Jt=i(Ut)`
213
+ `,rn=o(en)`
214
214
  width: 3.5rem;
215
- `,Qt=i(Pt.Body)`
215
+ `,an=o(Ue.Body)`
216
216
  margin: 0.1rem 0.2rem 0 0.2rem;
217
- ${e=>{if(e.$hide)return l`
218
- color: ${wt.Neutral[3]};
217
+ ${t=>{if(t.$hide)return l`
218
+ color: ${Me.Neutral[3]};
219
219
  `}}
220
- `;i(Qt)`
221
- ${e=>{if(e.$compress)return l`
220
+ `;o(an)`
221
+ ${t=>{if(t.$compress)return l`
222
222
  margin: 0.1rem 0.1rem 0 0.1rem;
223
223
  `}}
224
- `;const en=({disabled:e,error:i,value:l,onChange:c,onBlur:h,onChangeRaw:g,onBlurRaw:p,readOnly:s,id:f,...y})=>{const[m,S]=r(""),[F,v]=r(""),[B,$]=r(""),[H,b]=r("none"),D=a(null),w=a(null),_=a(null),x=a(null),z=a(m),C=a(F),k=a(B),E=a(H),A=e=>{z.current=e,S(e)},O=e=>{C.current=e,v(e)},W=e=>{k.current=e,$(e)},V=e=>{E.current=e,b(e)};o((()=>(document.addEventListener("mousedown",N),D.current&&D.current.addEventListener("keydown",j),()=>{document.removeEventListener("mousedown",N),D.current&&D.current.removeEventListener("keydown",j)})),[H]),o((()=>{"day"===H&&2===m.length&&_.current&&_.current.focus()}),[m]),o((()=>{"month"===H&&2===F.length&&x.current&&x.current.focus()}),[F]),o((()=>{M(l)}),[l]);const N=t=>{e||s||D&&D.current.contains(t.target)||"none"!==E.current&&(V("none"),X())},j=e=>{"year"===e.target.name&&"Tab"===e.code&&(V("none"),X())},T=e=>{V(e.target.name),e.target.select()},I=e=>{const t=e.target.name,n=u.padValue(e.target.value,!0);switch(t){case"day":A(n);break;case"month":O(n)}const r=m.length&&F.length&&4===B.length,a="day"===t,o=d.clampMonth(F);r&&(A(u.padValue(d.clampDay(a?n:m,o,B))),O(u.padValue(o)))},L=e=>{const t=e.target.name,n=e.target.value.replace(/[^0-9]/g,"");switch(t){case"day":A(n),P(n,t);break;case"month":O(n),P(n,t);break;case"year":W(n),P(n,t)}},R=e=>{"Backspace"!==e.code&&"Backspace"!==e.key||("month"===H&&0===F.length&&w.current.focus(),"year"===H&&0===B.length&&_.current.focus())},M=e=>{if(void 0===e||""===e)A(""),O(""),W("");else{const t=new Date(e);if(!isNaN(t.getTime())){const e=(t.getMonth()+1).toString(),n=t.getFullYear().toString(),r=d.clampDay(t.getDate().toString(),e,n);A(u.padValue(r)),O(u.padValue(e)),W(n)}}},P=(e,t)=>{if(c){const n={day:m,month:F,year:B};n[t]=e;const r=G(n);c(r)}if(g){const n=[..."day"===t?[u.padValue(e)]:[m],..."month"===t?[u.padValue(e)]:[F],..."year"===t?[e]:[B]];g(n)}},X=()=>{if(h){const e={day:z.current,month:C.current,year:k.current},t=G(e);h(t)}if(p){const e=[u.padValue(z.current.toString()),u.padValue(C.current.toString()),k.current];p(e)}},G=e=>{const t=[e.year,e.month,e.day];return e.day.length>=1&&e.month.length>=1&&4===e.year.length?t.join("-"):t.every((e=>""===e))?"":tn};return n(Zt,{ref:D,onClick:()=>{"none"===H&&w.current&&w.current.focus()},disabled:e,$error:i,id:f,"data-testid":y["data-testid"],$readOnly:s,children:t(Kt,{$readOnly:s,children:[n(Ut,{name:"day",maxLength:2,value:m,ref:w,onFocus:T,onBlur:I,onChange:L,disabled:e,type:"text",inputMode:"numeric",pattern:"[0-9]{2}","data-testid":"day-input","aria-label":"day-input",readOnly:s,placeholder:"day"!==H||s?"DD":""}),n(Qt,{$hide:0===m.length,children:"/"}),n(qt,{name:"month",maxLength:2,value:F,ref:_,onFocus:T,onBlur:I,onChange:L,onKeyDown:R,disabled:e,type:"text",inputMode:"numeric",pattern:"[0-9]{2}","data-testid":"month-input","aria-label":"month-input",readOnly:s,placeholder:"month"!==H||s?"MM":""}),n(Qt,{$hide:0===F.length,children:"/"}),n(Jt,{name:"year",maxLength:4,value:B,ref:x,onFocus:T,onBlur:I,onChange:L,onKeyDown:R,disabled:e,type:"text",inputMode:"numeric",pattern:"[0-9]{4}","data-testid":"year-input","aria-label":"year-input",readOnly:s,placeholder:"year"!==H||s?"YYYY":""})]})})},tn="Invalid date";export{en as DateInput};
224
+ `;const on=({disabled:t,error:o,value:l,onChange:c,onBlur:u,onChangeRaw:s,onBlurRaw:h,readOnly:d,id:f,...g})=>{const[p,S]=r(""),[$,v]=r(""),[F,D]=r(""),[B,H]=r("none"),b=a(null),w=a(null),_=a(null),x=a(null),O=a(p),C=a($),M=a(F),z=a(B),k=t=>{O.current=t,S(t)},E=t=>{C.current=t,v(t)},A=t=>{M.current=t,D(t)},W=t=>{z.current=t,H(t)};i((()=>(document.addEventListener("mousedown",V),b.current&&b.current.addEventListener("keydown",T),()=>{document.removeEventListener("mousedown",V),b.current&&b.current.removeEventListener("keydown",T)})),[B]),i((()=>{"day"===B&&2===p.length&&_.current&&_.current.focus()}),[p]),i((()=>{"month"===B&&2===$.length&&x.current&&x.current.focus()}),[$]),i((()=>{Y(l)}),[l]);const V=e=>{t||d||b&&b.current.contains(e.target)||"none"!==z.current&&(W("none"),P())},T=t=>{"year"===t.target.name&&"Tab"===t.code&&(W("none"),P())},N=t=>{W(t.target.name),t.target.select()},L=t=>{const e=t.target.name,n=m.padValue(t.target.value,!0);switch(e){case"day":k(n);break;case"month":E(n)}const r=p.length&&$.length&&4===F.length,a="day"===e,i=y.clampMonth($);r&&(k(m.padValue(y.clampDay(a?n:p,i,F))),E(m.padValue(i)))},j=t=>{const e=t.target.name,n=t.target.value.replace(/[^0-9]/g,"");switch(e){case"day":k(n),R(n,e);break;case"month":E(n),R(n,e);break;case"year":A(n),R(n,e)}},I=t=>{"Backspace"!==t.code&&"Backspace"!==t.key||("month"===B&&0===$.length&&w.current.focus(),"year"===B&&0===F.length&&_.current.focus())},Y=t=>{if(void 0===t||""===t)k(""),E(""),A("");else{const e=new Date(t);if(!isNaN(e.getTime())){const t=(e.getMonth()+1).toString(),n=e.getFullYear().toString(),r=y.clampDay(e.getDate().toString(),t,n);k(m.padValue(r)),E(m.padValue(t)),A(n)}}},R=(t,e)=>{if(c){const n={day:p,month:$,year:F};n[e]=t;const r=X(n);c(r)}if(s){const n=[..."day"===e?[m.padValue(t)]:[p],..."month"===e?[m.padValue(t)]:[$],..."year"===e?[t]:[F]];s(n)}},P=()=>{if(u){const t={day:O.current,month:C.current,year:M.current},e=X(t);u(e)}if(h){const t=[m.padValue(O.current.toString()),m.padValue(C.current.toString()),M.current];h(t)}},X=t=>{const e=[t.year,t.month,t.day];return t.day.length>=1&&t.month.length>=1&&4===t.year.length?e.join("-"):e.every((t=>""===t))?"":ln};return n(Qe,{ref:b,onClick:()=>{"none"===B&&w.current&&w.current.focus()},disabled:t,$error:o,id:f,"data-testid":g["data-testid"],$readOnly:d,children:e(tn,{$readOnly:d,children:[n(en,{name:"day",maxLength:2,value:p,ref:w,onFocus:N,onBlur:L,onChange:j,disabled:t,type:"text",inputMode:"numeric",pattern:"[0-9]{2}","data-testid":"day-input","aria-label":"day-input",readOnly:d,placeholder:"day"!==B||d?"DD":""}),n(an,{$hide:0===p.length,children:"/"}),n(nn,{name:"month",maxLength:2,value:$,ref:_,onFocus:N,onBlur:L,onChange:j,onKeyDown:I,disabled:t,type:"text",inputMode:"numeric",pattern:"[0-9]{2}","data-testid":"month-input","aria-label":"month-input",readOnly:d,placeholder:"month"!==B||d?"MM":""}),n(an,{$hide:0===$.length,children:"/"}),n(rn,{name:"year",maxLength:4,value:F,ref:x,onFocus:N,onBlur:L,onChange:j,onKeyDown:I,disabled:t,type:"text",inputMode:"numeric",pattern:"[0-9]{4}","data-testid":"year-input","aria-label":"year-input",readOnly:d,placeholder:"year"!==B||d?"YYYY":""})]})})},ln="Invalid date";export{on as DateInput};
225
225
  //# sourceMappingURL=index.js.map