@lifesg/react-design-system 1.0.0-alpha.19 → 1.0.0-alpha.20

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 (99) hide show
  1. package/accordion/index.js +4 -4
  2. package/accordion/index.js.map +1 -1
  3. package/alert/index.js +42 -42
  4. package/alert/index.js.map +1 -1
  5. package/box-container/index.js +5 -5
  6. package/box-container/index.js.map +1 -1
  7. package/breadcrumb/index.js +2 -2
  8. package/breadcrumb/index.js.map +1 -1
  9. package/button/index.js +125 -125
  10. package/button/index.js.map +1 -1
  11. package/card/index.js +23 -23
  12. package/card/index.js.map +1 -1
  13. package/checkbox/index.js +3 -3
  14. package/checkbox/index.js.map +1 -1
  15. package/cjs/index.js +44 -46
  16. package/cjs/index.js.map +1 -1
  17. package/color/color.d.ts +4 -59
  18. package/color/index.js +1 -1
  19. package/color/index.js.map +1 -1
  20. package/color/types.d.ts +4 -0
  21. package/date-input/index.js +53 -49
  22. package/date-input/index.js.map +1 -1
  23. package/design-token/design-token.d.ts +4 -0
  24. package/design-token/index.d.ts +2 -0
  25. package/design-token/index.js +6 -0
  26. package/design-token/index.js.map +1 -0
  27. package/{icon → design-token}/package.json +1 -1
  28. package/design-token/types.d.ts +7 -0
  29. package/error-display/index.js +92 -92
  30. package/error-display/index.js.map +1 -1
  31. package/feedback-rating/index.js +58 -58
  32. package/feedback-rating/index.js.map +1 -1
  33. package/footer/index.js +10 -10
  34. package/footer/index.js.map +1 -1
  35. package/form/index.js +144 -140
  36. package/form/index.js.map +1 -1
  37. package/icon-button/index.js +3 -3
  38. package/icon-button/index.js.map +1 -1
  39. package/index.d.ts +0 -1
  40. package/index.js +63 -65
  41. package/index.js.map +1 -1
  42. package/input/index.js +18 -14
  43. package/input/index.js.map +1 -1
  44. package/input-group/index.js +125 -121
  45. package/input-group/index.js.map +1 -1
  46. package/input-select/index.js +32 -28
  47. package/input-select/index.js.map +1 -1
  48. package/input-textarea/index.js +112 -108
  49. package/input-textarea/index.js.map +1 -1
  50. package/link-list/index.js +35 -35
  51. package/link-list/index.js.map +1 -1
  52. package/modal/index.js +15 -15
  53. package/modal/index.js.map +1 -1
  54. package/navbar/index.js +188 -188
  55. package/navbar/index.js.map +1 -1
  56. package/notification-banner/index.js +2 -2
  57. package/notification-banner/index.js.map +1 -1
  58. package/package.json +1 -1
  59. package/phone-number-input/index.js +126 -122
  60. package/phone-number-input/index.js.map +1 -1
  61. package/popover/index.js +7 -7
  62. package/popover/index.js.map +1 -1
  63. package/progress-indicator/index.js +7 -7
  64. package/progress-indicator/index.js.map +1 -1
  65. package/radio-button/index.js +7 -7
  66. package/radio-button/index.js.map +1 -1
  67. package/smart-app-banner/index.js +14 -14
  68. package/smart-app-banner/index.js.map +1 -1
  69. package/spec/design-token-spec/base-design-token-set.d.ts +2 -0
  70. package/text/index.js +18 -18
  71. package/text/index.js.map +1 -1
  72. package/text/text-style.d.ts +4 -100
  73. package/text-list/index.js +7 -7
  74. package/text-list/index.js.map +1 -1
  75. package/theme/design-token-helper.d.ts +2 -0
  76. package/theme/index.js +1 -1
  77. package/theme/index.js.map +1 -1
  78. package/theme/types.d.ts +10 -1
  79. package/timeline/index.js +8 -8
  80. package/timeline/index.js.map +1 -1
  81. package/timepicker/index.js +61 -57
  82. package/timepicker/index.js.map +1 -1
  83. package/toggle-button/index.js +109 -109
  84. package/toggle-button/index.js.map +1 -1
  85. package/tooltip/index.js +5 -5
  86. package/tooltip/index.js.map +1 -1
  87. package/unit-number/index.js +113 -109
  88. package/unit-number/index.js.map +1 -1
  89. package/util/utility-types.d.ts +3 -0
  90. package/icon/document-with-pencil-icon.d.ts +0 -5
  91. package/icon/icon-data.d.ts +0 -3
  92. package/icon/icon-style.d.ts +0 -1
  93. package/icon/icon.d.ts +0 -6
  94. package/icon/index.d.ts +0 -2
  95. package/icon/index.js +0 -8
  96. package/icon/index.js.map +0 -1
  97. package/icon/location-unknown-icon.d.ts +0 -5
  98. package/icon/mail-unread-icon.d.ts +0 -5
  99. package/icon/types.d.ts +0 -18
@@ -1,110 +1,114 @@
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 u,d;!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}(u||(u={})),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}}(d||(d={}));var g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},p=Array.isArray,f="object"==typeof g&&g&&g.Object===Object&&g,s="object"==typeof self&&self&&self.Object===Object&&self,y=f||s||Function("return this")(),m=y.Symbol,S=m,F=Object.prototype,v=F.hasOwnProperty,B=F.toString,H=S?S.toStringTag:void 0;var $=function(e){var t=v.call(e,H),n=e[H];try{e[H]=void 0;var r=!0}catch(e){}var a=B.call(e);return r&&(t?e[H]=n:delete e[H]),a},b=Object.prototype.toString;var D=$,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 E=function(e){return"symbol"==typeof e||C(e)&&"[object Symbol]"==z(e)},k=p,O=E,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,A=/^\w*$/;var V=function(e,t){if(k(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!O(e))||(A.test(e)||!W.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,L=N;var I,T=function(e){if(!L(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=T,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,ue=Object.prototype.hasOwnProperty;var de=function(e){var t=this.__data__;if(he){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ue.call(t,e)?t[e]:void 0},ge=oe,pe=Object.prototype.hasOwnProperty;var fe=oe;var se=le,ye=ce,me=de,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]=fe&&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=se,ve.prototype.delete=ye,ve.prototype.get=me,ve.prototype.has=Se,ve.prototype.set=Fe;var Be=ve;var He=function(){this.__data__=[],this.size=0};var $e=function(e,t){return e===t||e!=e&&t!=t};var be=function(e,t){for(var n=e.length;n--;)if($e(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=He,Ee=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)},ke=function(e){var t=this.__data__,n=_e(t,e);return n<0?void 0:t[n][1]},Oe=function(e){return xe(this.__data__,e)>-1},We=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 Ae(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])}}Ae.prototype.clear=Ce,Ae.prototype.delete=Ee,Ae.prototype.get=ke,Ae.prototype.has=Oe,Ae.prototype.set=We;var Ve=Ae,Ne=ae(y,"Map"),je=Be,Le=Ve,Ie=Ne;var Te=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 Te(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||Le),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=E,ct=m?m.prototype:void 0,ht=ct?ct.toString:void 0;var ut=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},dt=ut;var gt=p,pt=V,ft=at,st=function(e){return null==e?"":dt(e)};var yt=E;var mt=function(e,t){return gt(e)?e:pt(e,t)?[e]:ft(st(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,Ht=(e,t)=>{const n=t||e.defaultValue;return vt(e.collections,n)};var $t;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme"}($t||($t={}));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"}}},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"}}}},defaultValue:"base"},Dt=e=>t=>{const n=t.theme,r=Ht(bt,n[$t.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")}}},_t={Regular:"Open Sans",Semibold:"Open Sans Semibold",Bold:"Open Sans Bold",Light:"Open Sans Light"},xt={collections:{base:{D1:{fontFamily:_t.Bold,fontSize:3,fontWeight:700,lineHeight:4,letterSpacing:-.056},D2:{fontFamily:_t.Bold,fontSize:2.5,fontWeight:700,lineHeight:3.5,letterSpacing:-.032},D3:{fontFamily:_t.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},D4:{fontFamily:_t.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},DBody:{fontFamily:_t.Regular,fontSize:1.375,lineHeight:1.75},H1:{fontFamily:_t.Bold,fontSize:2,fontWeight:700,lineHeight:2.5},H2:{fontFamily:_t.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},H3:{fontFamily:_t.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},H4:{fontFamily:_t.Bold,fontSize:1.125,fontWeight:700,lineHeight:1.625},H5:{fontFamily:_t.Bold,fontSize:1,fontWeight:700,lineHeight:1.5,letterSpacing:.014},H6:{fontFamily:_t.Bold,fontSize:.875,fontWeight:700,lineHeight:1.6,letterSpacing:.012},Body:{fontFamily:_t.Regular,fontSize:1.125,lineHeight:1.625},BodySmall:{fontFamily:_t.Regular,fontSize:1,lineHeight:1.5,letterSpacing:.014},XSmall:{fontFamily:_t.Regular,fontSize:.75,lineHeight:1.2,letterSpacing:.012}}},defaultValue:"base"},zt=e=>t=>{const n=t.theme,r=Ht(xt,n[$t.textStyleScheme]);return n.options&&n.options.textStyle?Bt(r,e,n.options.textStyle):Bt(r,e)},Ct={D1:{fontFamily:zt("D1.fontFamily"),fontSize:zt("D1.fontSize"),fontWeight:zt("D1.fontWeight"),lineHeight:zt("D1.lineHeight"),letterSpacing:zt("D1.letterSpacing")},D2:{fontFamily:zt("D2.fontFamily"),fontSize:zt("D2.fontSize"),fontWeight:zt("D2.fontWeight"),lineHeight:zt("D2.lineHeight"),letterSpacing:zt("D2.letterSpacing")},D3:{fontFamily:zt("D3.fontFamily"),fontSize:zt("D3.fontSize"),fontWeight:zt("D3.fontWeight"),lineHeight:zt("D3.lineHeight"),letterSpacing:zt("D3.letterSpacing")},D4:{fontFamily:zt("D4.fontFamily"),fontSize:zt("D4.fontSize"),fontWeight:zt("D4.fontWeight"),lineHeight:zt("D4.lineHeight"),letterSpacing:zt("D4.letterSpacing")},DBody:{fontFamily:zt("DBody.fontFamily"),fontSize:zt("DBody.fontSize"),fontWeight:zt("DBody.fontWeight"),lineHeight:zt("DBody.lineHeight"),letterSpacing:zt("DBody.letterSpacing")},H1:{fontFamily:zt("H1.fontFamily"),fontSize:zt("H1.fontSize"),fontWeight:zt("H1.fontWeight"),lineHeight:zt("H1.lineHeight"),letterSpacing:zt("H1.letterSpacing")},H2:{fontFamily:zt("H2.fontFamily"),fontSize:zt("H2.fontSize"),fontWeight:zt("H2.fontWeight"),lineHeight:zt("H2.lineHeight"),letterSpacing:zt("H2.letterSpacing")},H3:{fontFamily:zt("H3.fontFamily"),fontSize:zt("H3.fontSize"),fontWeight:zt("H3.fontWeight"),lineHeight:zt("H3.lineHeight"),letterSpacing:zt("H3.letterSpacing")},H4:{fontFamily:zt("H4.fontFamily"),fontSize:zt("H4.fontSize"),fontWeight:zt("H4.fontWeight"),lineHeight:zt("H4.lineHeight"),letterSpacing:zt("H4.letterSpacing")},H5:{fontFamily:zt("H5.fontFamily"),fontSize:zt("H5.fontSize"),fontWeight:zt("H5.fontWeight"),lineHeight:zt("H5.lineHeight"),letterSpacing:zt("H5.letterSpacing")},H6:{fontFamily:zt("H6.fontFamily"),fontSize:zt("H6.fontSize"),fontWeight:zt("H6.fontWeight"),lineHeight:zt("H6.lineHeight"),letterSpacing:zt("H6.letterSpacing")},Body:{fontFamily:zt("Body.fontFamily"),fontSize:zt("Body.fontSize"),fontWeight:zt("Body.fontWeight"),lineHeight:zt("Body.lineHeight"),letterSpacing:zt("Body.letterSpacing")},BodySmall:{fontFamily:zt("BodySmall.fontFamily"),fontSize:zt("BodySmall.fontSize"),fontWeight:zt("BodySmall.fontWeight"),lineHeight:zt("BodySmall.lineHeight"),letterSpacing:zt("BodySmall.letterSpacing")},XSmall:{fontFamily:zt("XSmall.fontFamily"),fontSize:zt("XSmall.fontSize"),fontWeight:zt("XSmall.fontWeight"),lineHeight:zt("XSmall.lineHeight"),letterSpacing:zt("XSmall.letterSpacing")}},Et=e=>{switch(e){case 700:case"bold":return _t.Bold;case 600:case"semibold":return _t.Semibold;case 300:case"light":return _t.Light;case 400:case"regular":return _t.Regular;default:return""}},kt=(e,t)=>n=>{const r=Ct[e].fontFamily(n),a=Ct[e].fontWeight(n);return Object.values(_t).includes(r)?l`
2
- font-family: ${Et(t)||Et(a)||r};
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}
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};
3
7
  font-weight: normal !important;
4
8
  `:l`
5
9
  font-family: ${r};
6
- font-weight: ${(Ot(t)||a)??"normal"};
7
- `},Ot=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""}},Wt=(e,t,n=!1)=>r=>{const a=Ct[e],o=a.fontSize(r);return l`
8
- ${kt(e,t)}
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)}
9
13
  font-size: ${o}rem !important;
10
14
  line-height: ${a.lineHeight}rem !important;
11
15
  letter-spacing: ${a.letterSpacing(r)||0}rem !important;
12
16
  ${l`
13
17
  margin-bottom: ${o*(n?1.05:0)}rem;
14
18
  `}
15
- `},At=(e=!1,t=!1)=>t?l`
19
+ `},Tt=(e=!1,t=!1)=>t?l`
16
20
  display: block;
17
21
  `:e?l`
18
22
  display: inline;
19
23
  `:l`
20
24
  display: block;
21
- `;var Vt,Nt={};Object.defineProperty(Nt,"__esModule",{value:!0});var jt=e;const Lt=e=>jt.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:jt.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 It;Lt.displayName="ExternalIcon",Vt=Nt.ExternalIcon=Lt,function(e){e.D1=i.h1`
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`
22
26
  ${e=>l`
23
- ${Wt("D1",e.weight,e.paragraph)}
27
+ ${jt("D1",e.weight,e.paragraph)}
24
28
  color: ${wt.Neutral[1]};
25
- ${At(e.inline,e.paragraph)}
29
+ ${Tt(e.inline,e.paragraph)}
26
30
  `}
27
31
  `,e.D2=i.h1`
28
32
  ${e=>l`
29
- ${Wt("D2",e.weight,e.paragraph)}
33
+ ${jt("D2",e.weight,e.paragraph)}
30
34
  color: ${wt.Neutral[1]};
31
- ${At(e.inline,e.paragraph)}
35
+ ${Tt(e.inline,e.paragraph)}
32
36
  `}
33
37
  `,e.D3=i.h1`
34
38
  ${e=>l`
35
- ${Wt("D3",e.weight,e.paragraph)}
39
+ ${jt("D3",e.weight,e.paragraph)}
36
40
  color: ${wt.Neutral[1]};
37
- ${At(e.inline,e.paragraph)}
41
+ ${Tt(e.inline,e.paragraph)}
38
42
  `}
39
43
  `,e.D4=i.h1`
40
44
  ${e=>l`
41
- ${Wt("D4",e.weight,e.paragraph)}
45
+ ${jt("D4",e.weight,e.paragraph)}
42
46
  color: ${wt.Neutral[1]};
43
- ${At(e.inline,e.paragraph)}
47
+ ${Tt(e.inline,e.paragraph)}
44
48
  `}
45
49
  `,e.DBody=i.h1`
46
50
  ${e=>l`
47
- ${Wt("DBody",e.weight,e.paragraph)}
51
+ ${jt("DBody",e.weight,e.paragraph)}
48
52
  color: ${wt.Neutral[1]};
49
- ${At(e.inline,e.paragraph)}
53
+ ${Tt(e.inline,e.paragraph)}
50
54
  `}
51
55
  `,e.H1=i.h1`
52
56
  ${e=>l`
53
- ${Wt("H1",e.weight,e.paragraph)}
57
+ ${jt("H1",e.weight,e.paragraph)}
54
58
  color: ${wt.Neutral[1]};
55
- ${At(e.inline,e.paragraph)}
59
+ ${Tt(e.inline,e.paragraph)}
56
60
  `}
57
61
  `,e.H2=i.h2`
58
62
  ${e=>l`
59
- ${Wt("H2",e.weight,e.paragraph)}
63
+ ${jt("H2",e.weight,e.paragraph)}
60
64
  color: ${wt.Neutral[1]};
61
- ${At(e.inline,e.paragraph)}
65
+ ${Tt(e.inline,e.paragraph)}
62
66
  `}
63
67
  `,e.H3=i.h3`
64
68
  ${e=>l`
65
- ${Wt("H3",e.weight,e.paragraph)}
69
+ ${jt("H3",e.weight,e.paragraph)}
66
70
  color: ${wt.Neutral[1]};
67
- ${At(e.inline,e.paragraph)}
71
+ ${Tt(e.inline,e.paragraph)}
68
72
  `}
69
73
  `,e.H4=i.h4`
70
74
  ${e=>l`
71
- ${Wt("H4",e.weight,e.paragraph)}
75
+ ${jt("H4",e.weight,e.paragraph)}
72
76
  color: ${wt.Neutral[1]};
73
- ${At(e.inline,e.paragraph)}
77
+ ${Tt(e.inline,e.paragraph)}
74
78
  `}
75
79
  `,e.H5=i.h5`
76
80
  ${e=>l`
77
- ${Wt("H5",e.weight,e.paragraph)}
81
+ ${jt("H5",e.weight,e.paragraph)}
78
82
  color: ${wt.Neutral[1]};
79
- ${At(e.inline,e.paragraph)}
83
+ ${Tt(e.inline,e.paragraph)}
80
84
  `}
81
85
  `,e.H6=i.h6`
82
86
  ${e=>l`
83
- ${Wt("H6",e.weight,e.paragraph)}
87
+ ${jt("H6",e.weight,e.paragraph)}
84
88
  color: ${wt.Neutral[1]};
85
- ${At(e.inline,e.paragraph)}
89
+ ${Tt(e.inline,e.paragraph)}
86
90
  `}
87
91
  `,e.Body=i.p`
88
92
  ${e=>l`
89
- ${Wt("Body",e.weight,e.paragraph)}
93
+ ${jt("Body",e.weight,e.paragraph)}
90
94
  color: ${wt.Neutral[1]};
91
- ${At(e.inline,e.paragraph)}
95
+ ${Tt(e.inline,e.paragraph)}
92
96
  `}
93
97
  `,e.BodySmall=i.p`
94
98
  ${e=>l`
95
- ${Wt("BodySmall",e.weight,e.paragraph)}
99
+ ${jt("BodySmall",e.weight,e.paragraph)}
96
100
  color: ${wt.Neutral[1]};
97
- ${At(e.inline,e.paragraph)}
101
+ ${Tt(e.inline,e.paragraph)}
98
102
  `}
99
103
  `,e.XSmall=i.span`
100
104
  ${e=>l`
101
- ${Wt("XSmall",e.weight,e.paragraph)}
105
+ ${jt("XSmall",e.weight,e.paragraph)}
102
106
  color: ${wt.Neutral[1]};
103
- ${At(e.inline,e.paragraph)}
107
+ ${Tt(e.inline,e.paragraph)}
104
108
  `}
105
- `,e.Hyperlink={Default:e=>Mt({...e,textStyle:"Body"}),Small:e=>Mt({...e,textStyle:"BodySmall"})}}(It||(It={}));const Tt=i.a`
109
+ `,e.Hyperlink={Default:e=>Yt({...e,textStyle:"Body"}),Small:e=>Yt({...e,textStyle:"BodySmall"})}}(Pt||(Pt={}));const Xt=i.a`
106
110
  ${e=>l`
107
- ${Wt(e.textStyle,e.weight)}
111
+ ${jt(e.textStyle,e.weight)}
108
112
  color: ${wt.Primary};
109
113
  text-decoration: none;
110
114
 
@@ -118,12 +122,12 @@ import e,{jsxs as t,jsx as n}from"react/jsx-runtime";import{useState as r,useRef
118
122
  }
119
123
  }
120
124
  `}
121
- `,Rt=i(Vt)`
125
+ `,Gt=i(It)`
122
126
  height: 1rem;
123
127
  width: 1rem;
124
128
  margin-left: 0.4rem;
125
129
  vertical-align: middle;
126
- `,Mt=({external:e=!1,children:r,...a})=>t(Tt,{...a,children:[r,e&&n(Rt,{})]}),Pt=i.div`
130
+ `,Yt=({external:e=!1,children:r,...a})=>t(Xt,{...a,children:[r,e&&n(Gt,{})]}),Zt=i.div`
127
131
  display: flex;
128
132
  position: relative;
129
133
  align-items: center;
@@ -137,7 +141,7 @@ import e,{jsxs as t,jsx as n}from"react/jsx-runtime";import{useState as r,useRef
137
141
  :focus,
138
142
  :focus-within {
139
143
  border: 1px solid ${wt.Accent.Light[1]};
140
- box-shadow: inset 0 0 5px 1px rgba(87, 169, 255, 0.5);
144
+ box-shadow: ${zt};
141
145
  }
142
146
 
143
147
  ${e=>e.$readOnly?l`
@@ -164,18 +168,18 @@ import e,{jsxs as t,jsx as n}from"react/jsx-runtime";import{useState as r,useRef
164
168
 
165
169
  :focus-within {
166
170
  border: 1px solid ${wt.Validation.Red.Border(e)};
167
- box-shadow: inset 0 0 4px 1px rgba(221, 102, 102, 0.8);
171
+ box-shadow: ${Ct};
168
172
  }
169
173
  `:void 0}
170
- `,Xt=i.div`
174
+ `,Kt=i.div`
171
175
  position: absolute;
172
176
  top: 0;
173
177
  left: ${e=>e.$readOnly?"-0.5rem":"1rem"};
174
178
  height: 100%;
175
179
  display: flex;
176
180
  align-items: center;
177
- `,Gt=i.input`
178
- ${Wt("Body","regular")}
181
+ `,Ut=i.input`
182
+ ${jt("Body","regular")}
179
183
  background: transparent;
180
184
  height: 100%;
181
185
  width: 2.5rem;
@@ -204,18 +208,18 @@ import e,{jsxs as t,jsx as n}from"react/jsx-runtime";import{useState as r,useRef
204
208
  ${e=>{if(e.disabled)return l`
205
209
  cursor: not-allowed;
206
210
  `}}
207
- `,Yt=i(Gt)`
211
+ `,qt=i(Ut)`
208
212
  width: 2.6rem;
209
- `,Zt=i(Gt)`
213
+ `,Jt=i(Ut)`
210
214
  width: 3.5rem;
211
- `,Kt=i(It.Body)`
215
+ `,Qt=i(Pt.Body)`
212
216
  margin: 0.1rem 0.2rem 0 0.2rem;
213
217
  ${e=>{if(e.$hide)return l`
214
218
  color: ${wt.Neutral[3]};
215
219
  `}}
216
- `;i(Kt)`
220
+ `;i(Qt)`
217
221
  ${e=>{if(e.$compress)return l`
218
222
  margin: 0.1rem 0.1rem 0 0.1rem;
219
223
  `}}
220
- `;const Ut=({disabled:e,error:i,value:l,onChange:c,onBlur:h,onChangeRaw:g,onBlurRaw:p,readOnly:f,id:s,...y})=>{const[m,S]=r(""),[F,v]=r(""),[B,H]=r(""),[$,b]=r("none"),D=a(null),w=a(null),_=a(null),x=a(null),z=a(m),C=a(F),E=a(B),k=a($),O=e=>{z.current=e,S(e)},W=e=>{C.current=e,v(e)},A=e=>{E.current=e,H(e)},V=e=>{k.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)})),[$]),o((()=>{"day"===$&&2===m.length&&_.current&&_.current.focus()}),[m]),o((()=>{"month"===$&&2===F.length&&x.current&&x.current.focus()}),[F]),o((()=>{M(l)}),[l]);const N=t=>{e||f||D&&D.current.contains(t.target)||"none"!==k.current&&(V("none"),X())},j=e=>{"year"===e.target.name&&"Tab"===e.code&&(V("none"),X())},L=e=>{V(e.target.name),e.target.select()},I=e=>{const t=e.target.name,n=d.padValue(e.target.value,!0);switch(t){case"day":O(n);break;case"month":W(n)}const r=m.length&&F.length&&4===B.length,a="day"===t,o=u.clampMonth(F);r&&(O(d.padValue(u.clampDay(a?n:m,o,B))),W(d.padValue(o)))},T=e=>{const t=e.target.name,n=e.target.value.replace(/[^0-9]/g,"");switch(t){case"day":O(n),P(n,t);break;case"month":W(n),P(n,t);break;case"year":A(n),P(n,t)}},R=e=>{"Backspace"!==e.code&&"Backspace"!==e.key||("month"===$&&0===F.length&&w.current.focus(),"year"===$&&0===B.length&&_.current.focus())},M=e=>{if(void 0===e||""===e)O(""),W(""),A("");else{const t=new Date(e);if(!isNaN(t.getTime())){const e=(t.getMonth()+1).toString(),n=t.getFullYear().toString(),r=u.clampDay(t.getDate().toString(),e,n);O(d.padValue(r)),W(d.padValue(e)),A(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?[d.padValue(e)]:[m],..."month"===t?[d.padValue(e)]:[F],..."year"===t?[e]:[B]];g(n)}},X=()=>{if(h){const e={day:z.current,month:C.current,year:E.current},t=G(e);h(t)}if(p){const e=[d.padValue(z.current.toString()),d.padValue(C.current.toString()),E.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))?"":qt};return n(Pt,{ref:D,onClick:()=>{"none"===$&&w.current&&w.current.focus()},disabled:e,$error:i,id:s,"data-testid":y["data-testid"],$readOnly:f,children:t(Xt,{$readOnly:f,children:[n(Gt,{name:"day",maxLength:2,value:m,ref:w,onFocus:L,onBlur:I,onChange:T,disabled:e,type:"text",inputMode:"numeric",pattern:"[0-9]{2}","data-testid":"day-input","aria-label":"day-input",readOnly:f,placeholder:"day"!==$||f?"DD":""}),n(Kt,{$hide:0===m.length,children:"/"}),n(Yt,{name:"month",maxLength:2,value:F,ref:_,onFocus:L,onBlur:I,onChange:T,onKeyDown:R,disabled:e,type:"text",inputMode:"numeric",pattern:"[0-9]{2}","data-testid":"month-input","aria-label":"month-input",readOnly:f,placeholder:"month"!==$||f?"MM":""}),n(Kt,{$hide:0===F.length,children:"/"}),n(Zt,{name:"year",maxLength:4,value:B,ref:x,onFocus:L,onBlur:I,onChange:T,onKeyDown:R,disabled:e,type:"text",inputMode:"numeric",pattern:"[0-9]{4}","data-testid":"year-input","aria-label":"year-input",readOnly:f,placeholder:"year"!==$||f?"YYYY":""})]})})},qt="Invalid date";export{Ut as DateInput};
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};
221
225
  //# sourceMappingURL=index.js.map