@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
package/modal/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import t,{jsx as e,jsxs as n}from"react/jsx-runtime";import r,{useState as o,useRef as i,useEffect as a}from"react";import c from"react-dom";import l,{css as s}from"styled-components";const d=l.div`
1
+ import t,{jsx as e,jsxs as n}from"react/jsx-runtime";import r,{useState as o,useRef as i,useEffect as a}from"react";import c from"react-dom";import l,{css as d}from"styled-components";const s=l.div`
2
2
  position: fixed;
3
3
  left: 0;
4
4
  top: 0;
@@ -7,7 +7,7 @@ import t,{jsx as e,jsxs as n}from"react/jsx-runtime";import r,{useState as o,use
7
7
  visibility: hidden;
8
8
  z-index: ${t=>t.zIndex||(t.$stacked?99999:99998)};
9
9
 
10
- ${t=>{if(t.$show)return s`
10
+ ${t=>{if(t.$show)return d`
11
11
  height: 100%;
12
12
  width: 100vw;
13
13
  visibility: visible;
@@ -20,23 +20,23 @@ import t,{jsx as e,jsxs as n}from"react/jsx-runtime";import r,{useState as o,use
20
20
  backdrop-filter: ${t=>(t=>{let e="";return t&&(e+="blur(10px)"),e.length>0?e:"none"})(t.$backgroundBlur)};
21
21
  transition: opacity 200ms ease;
22
22
 
23
- ${t=>{let e="";return t.$show?e+=s`
23
+ ${t=>{let e="";return t.$show?e+=d`
24
24
  visibility: visible;
25
25
  opacity: 1;
26
26
  pointer-events: auto;
27
27
  height: 100%;
28
28
  width: 100vw;
29
- `:e+=s`
29
+ `:e+=d`
30
30
  visibility: hidden;
31
31
  opacity: 0;
32
32
  transition-delay: ${t.$disableTransition?"0ms":"400ms"};
33
33
  pointer-events: none;
34
34
  height: 0;
35
35
  width: 0;
36
- `,t.$disableTransition&&(e+=s`
36
+ `,t.$disableTransition&&(e+=d`
37
37
  transition: none;
38
38
  `),e}}
39
- `,h=({show:t=!1,rootId:n,onOverlayClick:l,children:s,backgroundOpacity:h,backgroundBlur:f=!0,disableTransition:y=!1,enableOverlayClick:g=!1,zIndex:m,id:b})=>{const[F,w]=o(null),[_,B]=o(),C=i(),$=i(null),k=s&&r.cloneElement(s,{ref:$}),E=b?`lifesg-ds-overlay-root-${b}`:"lifesg-ds-overlay-root";a((()=>{if(t){const t=D();if(x(t),!t){const t=setTimeout((()=>{j("add")}),200);return()=>clearTimeout(t)}}else if(!C.current){const t=setTimeout((()=>{j("remove")}),200);return()=>clearTimeout(t)}}),[t]),a((()=>{w(O());const t=D();return x(t),t||A(),()=>{j("remove")}}),[]);const x=t=>{C.current=t,B(t)},O=()=>document&&n?document.getElementById(n):document?document.body:null,D=()=>document.body.classList.contains(v),A=()=>{if(!document.getElementById(p)){const t=document.createElement("style");t.id=p;const e=document.documentElement.clientWidth,n=window.innerWidth-e;t.innerHTML=`\n\t\t\t\t.${v} {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\tpadding-right: ${n}px !important;\n\t\t\t\t\t-ms-overflow-style: none;\n\t\t\t\t\tscrollbar-width: none;\n\t\t\t\t}\n\n\t\t\t\t.${v}::-webkit-scrollbar {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t`,document.body.appendChild(t)}},j=t=>{const e=document.body.classList.contains(v);"add"!==t||e?"remove"===t&&e&&document.body.classList.remove(v):document.body.classList.add(v)},L=t=>{t.preventDefault();const e=$.current?.firstChild;e&&e.contains(t.target)||l&&g&&l()};return F?c.createPortal(e(d,{id:E,"data-testid":E,$show:t,zIndex:m,$stacked:_,children:s&&e(u,{"data-testid":"overlay-wrapper",$show:t,$backgroundOpacity:h||(_?.5:.8),$backgroundBlur:f,$disableTransition:y,$enableOverlayClick:g,onClick:L,children:k})}),F):null},p="lifesg-ds-overlay-stylesheet",v="lifesg-ds-overlay-open",f={mobileS:320,mobileM:375,mobileL:480,tablet:1199,desktopM:1399,desktopL:1999,desktop4k:3840},y=t=>Object.keys(f).reduce(((e,n)=>{const r=f[n];return e[n]=`@media screen and (${t}: ${r}px)`,e}),{}),g=y("max-width"),m=(y("min-width"),l.div`
39
+ `,h=({show:t=!1,rootId:n,onOverlayClick:l,children:d,backgroundOpacity:h,backgroundBlur:f=!0,disableTransition:g=!1,enableOverlayClick:y=!1,zIndex:m,id:b})=>{const[F,w]=o(null),[_,B]=o(),C=i(),$=i(null),k=d&&r.cloneElement(d,{ref:$}),E=b?`lifesg-ds-overlay-root-${b}`:"lifesg-ds-overlay-root";a((()=>{if(t){const t=D();if(x(t),!t){const t=setTimeout((()=>{j("add")}),200);return()=>clearTimeout(t)}}else if(!C.current){const t=setTimeout((()=>{j("remove")}),200);return()=>clearTimeout(t)}}),[t]),a((()=>{w(O());const t=D();return x(t),t||A(),()=>{j("remove")}}),[]);const x=t=>{C.current=t,B(t)},O=()=>document&&n?document.getElementById(n):document?document.body:null,D=()=>document.body.classList.contains(v),A=()=>{if(!document.getElementById(p)){const t=document.createElement("style");t.id=p;const e=document.documentElement.clientWidth,n=window.innerWidth-e;t.innerHTML=`\n\t\t\t\t.${v} {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\tpadding-right: ${n}px !important;\n\t\t\t\t\t-ms-overflow-style: none;\n\t\t\t\t\tscrollbar-width: none;\n\t\t\t\t}\n\n\t\t\t\t.${v}::-webkit-scrollbar {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t`,document.body.appendChild(t)}},j=t=>{const e=document.body.classList.contains(v);"add"!==t||e?"remove"===t&&e&&document.body.classList.remove(v):document.body.classList.add(v)},L=t=>{t.preventDefault();const e=$.current?.firstChild;e&&e.contains(t.target)||l&&y&&l()};return F?c.createPortal(e(s,{id:E,"data-testid":E,$show:t,zIndex:m,$stacked:_,children:d&&e(u,{"data-testid":"overlay-wrapper",$show:t,$backgroundOpacity:h||(_?.5:.8),$backgroundBlur:f,$disableTransition:g,$enableOverlayClick:y,onClick:L,children:k})}),F):null},p="lifesg-ds-overlay-stylesheet",v="lifesg-ds-overlay-open",f={mobileS:320,mobileM:375,mobileL:480,tablet:1199,desktopM:1399,desktopL:1999,desktop4k:3840},g=t=>Object.keys(f).reduce(((e,n)=>{const r=f[n];return e[n]=`@media screen and (${t}: ${r}px)`,e}),{}),y=g("max-width"),m=(g("min-width"),l.div`
40
40
  position: relative;
41
41
  display: flex;
42
42
  justify-content: center;
@@ -46,14 +46,14 @@ import t,{jsx as e,jsxs as n}from"react/jsx-runtime";import r,{useState as o,use
46
46
  overflow: hidden;
47
47
  ${t=>{return e=t.show,n=t.animationFrom||"bottom",e?`\n\t\t\t${n}: 0;\n\t\t\topacity: 1;\n\t\t\ttransition: all 300ms cubic-bezier(0.21, 0.79, 0.53, 1);\n\t\t\ttransition-delay: 200ms;\n\t\t`:`\n\t\t${n}: -3%;\n\t\topacity: 0;\n\t\ttransition: all 300ms cubic-bezier(0.4, 0.34, 0.38, 1);\n\t`;var e,n}}
48
48
 
49
- ${g.mobileL} {
49
+ ${y.mobileL} {
50
50
  height: calc(
51
51
  ${t=>t.verticalHeight?`${t.verticalHeight}px`:"1vh"} * 100
52
52
  );
53
53
 
54
54
  top: ${t=>t.offsetTop||0}px;
55
55
  }
56
- `);var b,F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},w={};Object.defineProperty(w,"__esModule",{value:!0});var _=t;const B=t=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:_.jsx("path",{d:"M9.99991 11.229L5.97891 15.25C5.81224 15.4167 5.61091 15.4967 5.37491 15.49C5.13891 15.4827 4.93757 15.3957 4.77091 15.229C4.60424 15.0623 4.52091 14.8577 4.52091 14.615C4.52091 14.3717 4.60424 14.1667 4.77091 14L8.77091 10L4.74991 5.979C4.58324 5.81233 4.50324 5.60767 4.50991 5.365C4.51724 5.12167 4.60424 4.91667 4.77091 4.75C4.93757 4.58333 5.14224 4.5 5.38491 4.5C5.62824 4.5 5.83324 4.58333 5.99991 4.75L9.99991 8.771L14.0209 4.75C14.1876 4.58333 14.3922 4.5 14.6349 4.5C14.8782 4.5 15.0832 4.58333 15.2499 4.75C15.4166 4.91667 15.4999 5.12167 15.4999 5.365C15.4999 5.60767 15.4166 5.81233 15.2499 5.979L11.2289 10L15.2499 14.021C15.4166 14.1877 15.4999 14.389 15.4999 14.625C15.4999 14.861 15.4166 15.0623 15.2499 15.229C15.0832 15.3957 14.8782 15.479 14.6349 15.479C14.3922 15.479 14.1876 15.3957 14.0209 15.229L9.99991 11.229Z",fill:"currentColor"})});B.displayName="CrossIcon",b=w.CrossIcon=B;var C=Array.isArray,$="object"==typeof F&&F&&F.Object===Object&&F,k="object"==typeof self&&self&&self.Object===Object&&self,E=$||k||Function("return this")(),x=E.Symbol,O=x,D=Object.prototype,A=D.hasOwnProperty,j=D.toString,L=O?O.toStringTag:void 0;var T=function(t){var e=A.call(t,L),n=t[L];try{t[L]=void 0;var r=!0}catch(t){}var o=j.call(t);return r&&(e?t[L]=n:delete t[L]),o},z=Object.prototype.toString;var I=T,S=function(t){return z.call(t)},V=x?x.toStringTag:void 0;var P=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":V&&V in Object(t)?I(t):S(t)};var N=P,R=function(t){return null!=t&&"object"==typeof t};var G=function(t){return"symbol"==typeof t||R(t)&&"[object Symbol]"==N(t)},H=C,M=G,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/;var U=function(t,e){if(H(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!M(t))||(K.test(t)||!W.test(t)||null!=e&&t in Object(e))};var Z=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},q=P,J=Z;var Q,X=function(t){if(!J(t))return!1;var e=q(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Y=E["__core-js_shared__"],tt=(Q=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+Q:"";var et=function(t){return!!tt&&tt in t},nt=Function.prototype.toString;var rt=X,ot=et,it=Z,at=function(t){if(null!=t){try{return nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},ct=/^\[object .+?Constructor\]$/,lt=Function.prototype,st=Object.prototype,dt=lt.toString,ut=st.hasOwnProperty,ht=RegExp("^"+dt.call(ut).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var pt=function(t){return!(!it(t)||ot(t))&&(rt(t)?ht:ct).test(at(t))},vt=function(t,e){return null==t?void 0:t[e]};var ft=function(t,e){var n=vt(t,e);return pt(n)?n:void 0},yt=ft(Object,"create"),gt=yt;var mt=function(){this.__data__=gt?gt(null):{},this.size=0};var bt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ft=yt,wt=Object.prototype.hasOwnProperty;var _t=function(t){var e=this.__data__;if(Ft){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return wt.call(e,t)?e[t]:void 0},Bt=yt,Ct=Object.prototype.hasOwnProperty;var $t=yt;var kt=mt,Et=bt,xt=_t,Ot=function(t){var e=this.__data__;return Bt?void 0!==e[t]:Ct.call(e,t)},Dt=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 At(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}At.prototype.clear=kt,At.prototype.delete=Et,At.prototype.get=xt,At.prototype.has=Ot,At.prototype.set=Dt;var jt=At;var Lt=function(){this.__data__=[],this.size=0};var Tt=function(t,e){return t===e||t!=t&&e!=e};var zt=function(t,e){for(var n=t.length;n--;)if(Tt(t[n][0],e))return n;return-1},It=zt,St=Array.prototype.splice;var Vt=zt;var Pt=zt;var Nt=zt;var Rt=Lt,Gt=function(t){var e=this.__data__,n=It(e,t);return!(n<0)&&(n==e.length-1?e.pop():St.call(e,n,1),--this.size,!0)},Ht=function(t){var e=this.__data__,n=Vt(e,t);return n<0?void 0:e[n][1]},Mt=function(t){return Pt(this.__data__,t)>-1},Wt=function(t,e){var n=this.__data__,r=Nt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function Kt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Kt.prototype.clear=Rt,Kt.prototype.delete=Gt,Kt.prototype.get=Ht,Kt.prototype.has=Mt,Kt.prototype.set=Wt;var Ut=Kt,Zt=ft(E,"Map"),qt=jt,Jt=Ut,Qt=Zt;var Xt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Yt=function(t,e){var n=t.__data__;return Xt(e)?n["string"==typeof e?"string":"hash"]:n.map},te=Yt;var ee=Yt;var ne=Yt;var re=Yt;var oe=function(){this.size=0,this.__data__={hash:new qt,map:new(Qt||Jt),string:new qt}},ie=function(t){var e=te(this,t).delete(t);return this.size-=e?1:0,e},ae=function(t){return ee(this,t).get(t)},ce=function(t){return ne(this,t).has(t)},le=function(t,e){var n=re(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function se(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])}}se.prototype.clear=oe,se.prototype.delete=ie,se.prototype.get=ae,se.prototype.has=ce,se.prototype.set=le;var de=se;function ue(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ue.Cache||de),n}ue.Cache=de;var he=ue;var pe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ve=/\\(\\)?/g,fe=function(t){var e=he(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(pe,(function(t,n,r,o){e.push(r?o.replace(ve,"$1"):n||t)})),e}));var ye=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},ge=C,me=G,be=x?x.prototype:void 0,Fe=be?be.toString:void 0;var we=function t(e){if("string"==typeof e)return e;if(ge(e))return ye(e,t)+"";if(me(e))return Fe?Fe.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n},_e=we;var Be=C,Ce=U,$e=fe,ke=function(t){return null==t?"":_e(t)};var Ee=G;var xe=function(t,e){return Be(t)?t:Ce(t,e)?[t]:$e(ke(t))},Oe=function(t){if("string"==typeof t||Ee(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var De=function(t,e){for(var n=0,r=(e=xe(e,t)).length;null!=t&&n<r;)t=t[Oe(e[n++])];return n&&n==r?t:void 0};var Ae=function(t,e,n){var r=null==t?void 0:De(t,e);return void 0===r?n:r};const je=(t,e,n)=>e?Ae(n,e)||Ae(t,e):n||t;var Le;!function(t){t.colorScheme="colorScheme",t.layout="layout",t.textStyleScheme="textStyleScheme"}(Le||(Le={}));const Te={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"},ze=t=>e=>{const n=e.theme,r=((t,e)=>{const n=e||t.defaultValue;return Ae(t.collections,n)})(Te,n[Le.colorScheme]);return n.options&&n.options.color?je(r,t,n.options.color):je(r,t)},Ie=(ze("Brand.1"),ze("Brand.2"),ze("Brand.3"),ze("Brand.4"),ze("Brand.5"),ze("Brand.6"),ze("Primary"),ze("PrimaryDark"),ze("Secondary"),{Light:{1:ze("Accent.Light.1"),2:ze("Accent.Light.2"),3:ze("Accent.Light.3"),4:ze("Accent.Light.4"),5:ze("Accent.Light.5"),6:ze("Accent.Light.6")},Dark:{1:ze("Accent.Dark.1"),2:ze("Accent.Dark.2"),3:ze("Accent.Dark.3")}}),Se={1:ze("Neutral.1"),2:ze("Neutral.2"),3:ze("Neutral.3"),4:ze("Neutral.4"),5:ze("Neutral.5"),6:ze("Neutral.6"),7:ze("Neutral.7"),8:ze("Neutral.8")},Ve=(ze("Validation.Green.Text"),ze("Validation.Green.Icon"),ze("Validation.Green.Border"),ze("Validation.Green.Background"),ze("Validation.Orange.Text"),ze("Validation.Orange.Icon"),ze("Validation.Orange.Border"),ze("Validation.Orange.Background"),ze("Validation.Orange.Badge"),ze("Validation.Red.Text"),ze("Validation.Red.Icon"),ze("Validation.Red.Border"),ze("Validation.Red.Background"),l.button`
56
+ `);var b,F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},w={};Object.defineProperty(w,"__esModule",{value:!0});var _=t;const B=t=>_.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:_.jsx("path",{d:"M9.99991 11.229L5.97891 15.25C5.81224 15.4167 5.61091 15.4967 5.37491 15.49C5.13891 15.4827 4.93757 15.3957 4.77091 15.229C4.60424 15.0623 4.52091 14.8577 4.52091 14.615C4.52091 14.3717 4.60424 14.1667 4.77091 14L8.77091 10L4.74991 5.979C4.58324 5.81233 4.50324 5.60767 4.50991 5.365C4.51724 5.12167 4.60424 4.91667 4.77091 4.75C4.93757 4.58333 5.14224 4.5 5.38491 4.5C5.62824 4.5 5.83324 4.58333 5.99991 4.75L9.99991 8.771L14.0209 4.75C14.1876 4.58333 14.3922 4.5 14.6349 4.5C14.8782 4.5 15.0832 4.58333 15.2499 4.75C15.4166 4.91667 15.4999 5.12167 15.4999 5.365C15.4999 5.60767 15.4166 5.81233 15.2499 5.979L11.2289 10L15.2499 14.021C15.4166 14.1877 15.4999 14.389 15.4999 14.625C15.4999 14.861 15.4166 15.0623 15.2499 15.229C15.0832 15.3957 14.8782 15.479 14.6349 15.479C14.3922 15.479 14.1876 15.3957 14.0209 15.229L9.99991 11.229Z",fill:"currentColor"})});B.displayName="CrossIcon",b=w.CrossIcon=B;var C=Array.isArray,$="object"==typeof F&&F&&F.Object===Object&&F,k="object"==typeof self&&self&&self.Object===Object&&self,E=$||k||Function("return this")(),x=E.Symbol,O=x,D=Object.prototype,A=D.hasOwnProperty,j=D.toString,L=O?O.toStringTag:void 0;var T=function(t){var e=A.call(t,L),n=t[L];try{t[L]=void 0;var r=!0}catch(t){}var o=j.call(t);return r&&(e?t[L]=n:delete t[L]),o},S=Object.prototype.toString;var z=T,I=function(t){return S.call(t)},V=x?x.toStringTag:void 0;var P=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":V&&V in Object(t)?z(t):I(t)};var N=P,R=function(t){return null!=t&&"object"==typeof t};var G=function(t){return"symbol"==typeof t||R(t)&&"[object Symbol]"==N(t)},H=C,M=G,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/;var U=function(t,e){if(H(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!M(t))||(K.test(t)||!W.test(t)||null!=e&&t in Object(e))};var Z=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},q=P,J=Z;var Q,X=function(t){if(!J(t))return!1;var e=q(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Y=E["__core-js_shared__"],tt=(Q=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+Q:"";var et=function(t){return!!tt&&tt in t},nt=Function.prototype.toString;var rt=X,ot=et,it=Z,at=function(t){if(null!=t){try{return nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},ct=/^\[object .+?Constructor\]$/,lt=Function.prototype,dt=Object.prototype,st=lt.toString,ut=dt.hasOwnProperty,ht=RegExp("^"+st.call(ut).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var pt=function(t){return!(!it(t)||ot(t))&&(rt(t)?ht:ct).test(at(t))},vt=function(t,e){return null==t?void 0:t[e]};var ft=function(t,e){var n=vt(t,e);return pt(n)?n:void 0},gt=ft(Object,"create"),yt=gt;var mt=function(){this.__data__=yt?yt(null):{},this.size=0};var bt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ft=gt,wt=Object.prototype.hasOwnProperty;var _t=function(t){var e=this.__data__;if(Ft){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return wt.call(e,t)?e[t]:void 0},Bt=gt,Ct=Object.prototype.hasOwnProperty;var $t=gt;var kt=mt,Et=bt,xt=_t,Ot=function(t){var e=this.__data__;return Bt?void 0!==e[t]:Ct.call(e,t)},Dt=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 At(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}At.prototype.clear=kt,At.prototype.delete=Et,At.prototype.get=xt,At.prototype.has=Ot,At.prototype.set=Dt;var jt=At;var Lt=function(){this.__data__=[],this.size=0};var Tt=function(t,e){return t===e||t!=t&&e!=e};var St=function(t,e){for(var n=t.length;n--;)if(Tt(t[n][0],e))return n;return-1},zt=St,It=Array.prototype.splice;var Vt=St;var Pt=St;var Nt=St;var Rt=Lt,Gt=function(t){var e=this.__data__,n=zt(e,t);return!(n<0)&&(n==e.length-1?e.pop():It.call(e,n,1),--this.size,!0)},Ht=function(t){var e=this.__data__,n=Vt(e,t);return n<0?void 0:e[n][1]},Mt=function(t){return Pt(this.__data__,t)>-1},Wt=function(t,e){var n=this.__data__,r=Nt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function Kt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Kt.prototype.clear=Rt,Kt.prototype.delete=Gt,Kt.prototype.get=Ht,Kt.prototype.has=Mt,Kt.prototype.set=Wt;var Ut=Kt,Zt=ft(E,"Map"),qt=jt,Jt=Ut,Qt=Zt;var Xt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Yt=function(t,e){var n=t.__data__;return Xt(e)?n["string"==typeof e?"string":"hash"]:n.map},te=Yt;var ee=Yt;var ne=Yt;var re=Yt;var oe=function(){this.size=0,this.__data__={hash:new qt,map:new(Qt||Jt),string:new qt}},ie=function(t){var e=te(this,t).delete(t);return this.size-=e?1:0,e},ae=function(t){return ee(this,t).get(t)},ce=function(t){return ne(this,t).has(t)},le=function(t,e){var n=re(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function de(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])}}de.prototype.clear=oe,de.prototype.delete=ie,de.prototype.get=ae,de.prototype.has=ce,de.prototype.set=le;var se=de;function ue(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ue.Cache||se),n}ue.Cache=se;var he=ue;var pe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ve=/\\(\\)?/g,fe=function(t){var e=he(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(pe,(function(t,n,r,o){e.push(r?o.replace(ve,"$1"):n||t)})),e}));var ge=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},ye=C,me=G,be=x?x.prototype:void 0,Fe=be?be.toString:void 0;var we=function t(e){if("string"==typeof e)return e;if(ye(e))return ge(e,t)+"";if(me(e))return Fe?Fe.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n},_e=we;var Be=C,Ce=U,$e=fe,ke=function(t){return null==t?"":_e(t)};var Ee=G;var xe=function(t,e){return Be(t)?t:Ce(t,e)?[t]:$e(ke(t))},Oe=function(t){if("string"==typeof t||Ee(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var De=function(t,e){for(var n=0,r=(e=xe(e,t)).length;null!=t&&n<r;)t=t[Oe(e[n++])];return n&&n==r?t:void 0};var Ae=function(t,e,n){var r=null==t?void 0:De(t,e);return void 0===r?n:r};const je=(t,e,n)=>e?Ae(n,e)||Ae(t,e):n||t;var Le;!function(t){t.colorScheme="colorScheme",t.layout="layout",t.textStyleScheme="textStyleScheme",t.designTokenScheme="designTokenScheme"}(Le||(Le={}));const Te={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"},Se=t=>e=>{const n=e.theme,r=((t,e)=>{const n=e||t.defaultValue;return Ae(t.collections,n)})(Te,n[Le.colorScheme]);return n.options&&n.options.color?je(r,t,n.options.color):je(r,t)},ze=(Se("Brand.1"),Se("Brand.2"),Se("Brand.3"),Se("Brand.4"),Se("Brand.5"),Se("Brand.6"),Se("Primary"),Se("PrimaryDark"),Se("Secondary"),{Light:{1:Se("Accent.Light.1"),2:Se("Accent.Light.2"),3:Se("Accent.Light.3"),4:Se("Accent.Light.4"),5:Se("Accent.Light.5"),6:Se("Accent.Light.6")},Dark:{1:Se("Accent.Dark.1"),2:Se("Accent.Dark.2"),3:Se("Accent.Dark.3")}}),Ie={1:Se("Neutral.1"),2:Se("Neutral.2"),3:Se("Neutral.3"),4:Se("Neutral.4"),5:Se("Neutral.5"),6:Se("Neutral.6"),7:Se("Neutral.7"),8:Se("Neutral.8")},Ve=(Se("Validation.Green.Text"),Se("Validation.Green.Icon"),Se("Validation.Green.Border"),Se("Validation.Green.Background"),Se("Validation.Orange.Text"),Se("Validation.Orange.Icon"),Se("Validation.Orange.Border"),Se("Validation.Orange.Background"),Se("Validation.Orange.Badge"),Se("Validation.Red.Text"),Se("Validation.Red.Icon"),Se("Validation.Red.Border"),Se("Validation.Red.Background"),Se("Shadow.Accent"),Se("Shadow.Red"),l.button`
57
57
  display: flex;
58
58
  justify-content: center;
59
59
  align-items: center;
@@ -71,8 +71,8 @@ import t,{jsx as e,jsxs as n}from"react/jsx-runtime";import r,{useState as o,use
71
71
  &:focus {
72
72
  ${({$outline:t})=>"none"===t&&"outline: none;"}
73
73
 
74
- ${({$highlight:t})=>t&&s`
75
- background-color: ${Se[7]};
74
+ ${({$highlight:t})=>t&&d`
75
+ background-color: ${Ie[7]};
76
76
  `}
77
77
  }
78
78
  `),Pe=r.forwardRef((({children:t,focusHighlight:n=!0,focusOutline:r="none",...o},i)=>e(Ve,{ref:i,$outline:r,$highlight:n,...o,children:t}))),Ne=l.div`
@@ -81,12 +81,12 @@ import t,{jsx as e,jsxs as n}from"react/jsx-runtime";import r,{useState as o,use
81
81
  flex-direction: column;
82
82
  width: 40rem;
83
83
  max-height: 70%;
84
- background: ${Se[8]};
84
+ background: ${Ie[8]};
85
85
  box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.45);
86
86
  border-radius: 0.75rem;
87
87
  overflow: hidden;
88
88
 
89
- ${g.mobileL} {
89
+ ${y.mobileL} {
90
90
  width: 90%;
91
91
  max-height: 70%;
92
92
  }
@@ -97,11 +97,11 @@ import t,{jsx as e,jsxs as n}from"react/jsx-runtime";import r,{useState as o,use
97
97
  padding: 1rem 0.75rem;
98
98
  border-top-right-radius: 0.75rem;
99
99
  :focus-visible {
100
- outline: 4px solid ${Ie.Light[1]};
100
+ outline: 4px solid ${ze.Light[1]};
101
101
  }
102
102
  `,Ge=l(b)`
103
103
  height: 1.5rem;
104
104
  width: 1.5rem;
105
- color: ${Se[4]};
106
- `,He=Object.assign((({id:t="modal",show:n,animationFrom:r="bottom",children:i,enableOverlayClick:c=!0,rootComponentId:l,zIndex:s,onOverlayClick:d,dismissKeyboardOnShow:u=!0,...p})=>{const[v,f]=o(),[y,g]=o();a((()=>window.visualViewport?(F(),window.visualViewport.addEventListener("resize",F),()=>{window.visualViewport.removeEventListener("resize",F)}):(b(),window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)})),[]),a((()=>{n&&u&&document.activeElement?.blur?.()}),[n]);const b=()=>{const t=.01*window.innerHeight;f(t)},F=()=>{const t=.01*window.visualViewport.height;f(t),g(window.visualViewport.offsetTop)};return e(h,{"data-testid":`${t}-overlay`,show:n,enableOverlayClick:c,onOverlayClick:d,id:t,rootId:l,zIndex:s,children:e(m,{show:n,animationFrom:r,"data-testid":t,verticalHeight:v,offsetTop:y,...p,children:i})})}),{Box:({id:t="modal-box",children:r,onClose:o,showCloseButton:i=!0,...a})=>n(Ne,{"data-testid":t,...a,onClick:t=>{t.stopPropagation()},children:[i&&e(Re,{type:"button",onClick:o,"data-testid":"close-button",focusHighlight:!1,children:e(Ge,{})}),r]})});export{He as Modal};
105
+ color: ${Ie[4]};
106
+ `,He=Object.assign((({id:t="modal",show:n,animationFrom:r="bottom",children:i,enableOverlayClick:c=!0,rootComponentId:l,zIndex:d,onOverlayClick:s,dismissKeyboardOnShow:u=!0,...p})=>{const[v,f]=o(),[g,y]=o();a((()=>window.visualViewport?(F(),window.visualViewport.addEventListener("resize",F),()=>{window.visualViewport.removeEventListener("resize",F)}):(b(),window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)})),[]),a((()=>{n&&u&&document.activeElement?.blur?.()}),[n]);const b=()=>{const t=.01*window.innerHeight;f(t)},F=()=>{const t=.01*window.visualViewport.height;f(t),y(window.visualViewport.offsetTop)};return e(h,{"data-testid":`${t}-overlay`,show:n,enableOverlayClick:c,onOverlayClick:s,id:t,rootId:l,zIndex:d,children:e(m,{show:n,animationFrom:r,"data-testid":t,verticalHeight:v,offsetTop:g,...p,children:i})})}),{Box:({id:t="modal-box",children:r,onClose:o,showCloseButton:i=!0,...a})=>n(Ne,{"data-testid":t,...a,onClick:t=>{t.stopPropagation()},children:[i&&e(Re,{type:"button",onClick:o,"data-testid":"close-button",focusHighlight:!1,children:e(Ge,{})}),r]})});export{He as Modal};
107
107
  //# sourceMappingURL=index.js.map