@lifesg/react-design-system 2.1.0-canary.1 → 2.1.0-canary.2

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.
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { CheckboxProps } from "./types";
3
- export declare const Checkbox: ({ className, checked, disabled, onChange, onKeyPress, displaySize, ...otherProps }: CheckboxProps) => JSX.Element;
3
+ export declare const Checkbox: ({ className, checked, disabled, indeterminate, onChange, onKeyPress, displaySize, ...otherProps }: CheckboxProps) => JSX.Element;
@@ -1,14 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { CheckboxProps, CheckboxSize } from "./types";
3
2
  interface StyleProps {
4
- selected?: boolean;
5
- disabled?: boolean;
3
+ $unchecked?: boolean;
4
+ $disabled?: boolean;
6
5
  $displaySize?: CheckboxSize;
7
6
  }
8
7
  export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyleProps, never>;
9
8
  export declare const Input: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, CheckboxProps, never>;
10
- export declare const Checkmark: import("styled-components").StyledComponent<{
11
- (props: import("react").SVGProps<SVGSVGElement>): JSX.Element;
12
- displayName: string;
13
- }, import("styled-components").DefaultTheme, StyleProps, never>;
14
9
  export {};
package/checkbox/index.js CHANGED
@@ -1,31 +1,32 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useEffect as n}from"react";import a,{css as o}from"styled-components";import{TickIcon as i}from"@lifesg/react-icons/tick";var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l=Array.isArray,d="object"==typeof c&&c&&c.Object===Object&&c,u="object"==typeof self&&self&&self.Object===Object&&self,s=d||u||Function("return this")(),F=s.Symbol,h=F,p=Object.prototype,f=p.hasOwnProperty,y=p.toString,g=h?h.toStringTag:void 0;var v=function(e){var t=f.call(e,g),r=e[g];try{e[g]=void 0;var n=!0}catch(e){}var a=y.call(e);return n&&(t?e[g]=r:delete e[g]),a},B=Object.prototype.toString;var b=v,_=function(e){return B.call(e)},E=F?F.toStringTag:void 0;var m=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":E&&E in Object(e)?b(e):_(e)};var D=m,A=function(e){return null!=e&&"object"==typeof e};var k=function(e){return"symbol"==typeof e||A(e)&&"[object Symbol]"==D(e)},x=l,C=k,S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/;var j=function(e,t){if(x(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!C(e))||(O.test(e)||!S.test(e)||null!=t&&e in Object(t))};var w=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},T=m,I=w;var $,P=function(e){if(!I(e))return!1;var t=T(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},V=s["__core-js_shared__"],N=($=/[^.]+$/.exec(V&&V.keys&&V.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"";var z=function(e){return!!N&&N in e},R=Function.prototype.toString;var L=P,G=z,K=w,M=function(e){if(null!=e){try{return R.call(e)}catch(e){}try{return e+""}catch(e){}}return""},U=/^\[object .+?Constructor\]$/,q=Function.prototype,H=Object.prototype,J=q.toString,Q=H.hasOwnProperty,W=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var X=function(e){return!(!K(e)||G(e))&&(L(e)?W:U).test(M(e))},Y=function(e,t){return null==e?void 0:e[t]};var Z=function(e,t){var r=Y(e,t);return X(r)?r:void 0},ee=Z(Object,"create"),te=ee;var re=function(){this.__data__=te?te(null):{},this.size=0};var ne=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ae=ee,oe=Object.prototype.hasOwnProperty;var ie=function(e){var t=this.__data__;if(ae){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return oe.call(t,e)?t[e]:void 0},ce=ee,le=Object.prototype.hasOwnProperty;var de=ee;var ue=re,se=ne,Fe=ie,he=function(e){var t=this.__data__;return ce?void 0!==t[e]:le.call(t,e)},pe=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=de&&void 0===t?"__lodash_hash_undefined__":t,this};function fe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}fe.prototype.clear=ue,fe.prototype.delete=se,fe.prototype.get=Fe,fe.prototype.has=he,fe.prototype.set=pe;var ye=fe;var ge=function(){this.__data__=[],this.size=0};var ve=function(e,t){return e===t||e!=e&&t!=t};var Be=function(e,t){for(var r=e.length;r--;)if(ve(e[r][0],t))return r;return-1},be=Be,_e=Array.prototype.splice;var Ee=Be;var me=Be;var De=Be;var Ae=ge,ke=function(e){var t=this.__data__,r=be(t,e);return!(r<0)&&(r==t.length-1?t.pop():_e.call(t,r,1),--this.size,!0)},xe=function(e){var t=this.__data__,r=Ee(t,e);return r<0?void 0:t[r][1]},Ce=function(e){return me(this.__data__,e)>-1},Se=function(e,t){var r=this.__data__,n=De(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Oe.prototype.clear=Ae,Oe.prototype.delete=ke,Oe.prototype.get=xe,Oe.prototype.has=Ce,Oe.prototype.set=Se;var je=Oe,we=Z(s,"Map"),Te=ye,Ie=je,$e=we;var Pe=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Ve=function(e,t){var r=e.__data__;return Pe(t)?r["string"==typeof t?"string":"hash"]:r.map},Ne=Ve;var ze=Ve;var Re=Ve;var Le=Ve;var Ge=function(){this.size=0,this.__data__={hash:new Te,map:new($e||Ie),string:new Te}},Ke=function(e){var t=Ne(this,e).delete(e);return this.size-=t?1:0,t},Me=function(e){return ze(this,e).get(e)},Ue=function(e){return Re(this,e).has(e)},qe=function(e,t){var r=Le(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function He(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}He.prototype.clear=Ge,He.prototype.delete=Ke,He.prototype.get=Me,He.prototype.has=Ue,He.prototype.set=qe;var Je=He;function Qe(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var i=e.apply(this,n);return r.cache=o.set(a,i)||o,i};return r.cache=new(Qe.Cache||Je),r}Qe.Cache=Je;var We=Qe;var Xe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ye=/\\(\\)?/g,Ze=function(e){var t=We(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Xe,(function(e,r,n,a){t.push(n?a.replace(Ye,"$1"):r||e)})),t}));var et=function(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a},tt=l,rt=k,nt=F?F.prototype:void 0,at=nt?nt.toString:void 0;var ot=function e(t){if("string"==typeof t)return t;if(tt(t))return et(t,e)+"";if(rt(t))return at?at.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r},it=ot;var ct=l,lt=j,dt=Ze,ut=function(e){return null==e?"":it(e)};var st=k;var Ft=function(e,t){return ct(e)?e:lt(e,t)?[e]:dt(ut(e))},ht=function(e){if("string"==typeof e||st(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};var pt=function(e,t){for(var r=0,n=(t=Ft(t,e)).length;null!=e&&r<n;)e=e[ht(t[r++])];return r&&r==n?e:void 0};var ft=function(e,t,r){var n=null==e?void 0:pt(e,t);return void 0===n?r:n};const yt=(e,t,r)=>t?ft(r,t)||ft(e,t):r||e;var gt;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme",e.designTokenScheme="designTokenScheme",e.resourceScheme="resourceScheme"}(gt||(gt={}));const vt={collections:{base:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#4B539F",2:"#6D74B1",3:"#959BC5"},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"},Blue:{Text:"#064D70",Icon:" #066391",Border:"#84B7DB",Background:"#E8F4FA"}},Shadow:{Accent:"rgba(87, 169, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}},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:"#977ECC",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"},Blue:{Text:"#064D70",Icon:" #066391",Border:"#84B7DB",Background:"#E8F4FA"}},Shadow:{Accent:"rgba(161, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}},rbs:{Brand:{1:"#3E4DFF",2:"#AEACFF",3:"#AD44FF",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#4855D4",PrimaryDark:"#3E49B2",Secondary:"#364891",Accent:{Dark:{1:"#5E516E",2:"#7A6F87",3:"#C5C0CC"},Light:{1:"#8397FC",2:"#ABB8FC",3:"#CED6FD ",4:"#E1E4FA",5:"#F0F2FF",6:"#FAFBFF"}},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"},Blue:{Text:"#064D70",Icon:" #066391",Border:"#84B7DB",Background:"#E8F4FA"}},Shadow:{Accent:"rgba(90, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}}},defaultValue:"base"},Bt=e=>t=>{const r=t.theme,n=((e,t)=>{const r=t||e.defaultValue;return ft(e.collections,r)})(vt,r[gt.colorScheme]);return r.options&&r.options.color?yt(n,e,r.options.color):yt(n,e)},bt={Brand:{1:Bt("Brand.1"),2:Bt("Brand.2"),3:Bt("Brand.3"),4:Bt("Brand.4"),5:Bt("Brand.5"),6:Bt("Brand.6")},Primary:Bt("Primary"),PrimaryDark:Bt("PrimaryDark"),Secondary:Bt("Secondary"),Accent:{Light:{1:Bt("Accent.Light.1"),2:Bt("Accent.Light.2"),3:Bt("Accent.Light.3"),4:Bt("Accent.Light.4"),5:Bt("Accent.Light.5"),6:Bt("Accent.Light.6")},Dark:{1:Bt("Accent.Dark.1"),2:Bt("Accent.Dark.2"),3:Bt("Accent.Dark.3")}},Neutral:{1:Bt("Neutral.1"),2:Bt("Neutral.2"),3:Bt("Neutral.3"),4:Bt("Neutral.4"),5:Bt("Neutral.5"),6:Bt("Neutral.6"),7:Bt("Neutral.7"),8:Bt("Neutral.8")},Validation:{Green:{Text:Bt("Validation.Green.Text"),Icon:Bt("Validation.Green.Icon"),Border:Bt("Validation.Green.Border"),Background:Bt("Validation.Green.Background")},Orange:{Text:Bt("Validation.Orange.Text"),Icon:Bt("Validation.Orange.Icon"),Border:Bt("Validation.Orange.Border"),Background:Bt("Validation.Orange.Background"),Badge:Bt("Validation.Orange.Badge")},Red:{Text:Bt("Validation.Red.Text"),Icon:Bt("Validation.Red.Icon"),Border:Bt("Validation.Red.Border"),Background:Bt("Validation.Red.Background")},Blue:{Text:Bt("Validation.Blue.Text"),Icon:Bt("Validation.Blue.Icon"),Border:Bt("Validation.Blue.Border"),Background:Bt("Validation.Blue.Background")}},Shadow:{Accent:Bt("Shadow.Accent"),Red:Bt("Shadow.Red"),Elevation:Bt("Shadow.Elevation")}},_t=a.div`
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as r,useEffect as n}from"react";import a,{keyframes as o,css as i}from"styled-components";import{MinusSquareFillIcon as c,SquareTickFillIcon as d,SquareFillIcon as u,SquareIcon as l}from"@lifesg/react-icons";var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},F=Array.isArray,h="object"==typeof s&&s&&s.Object===Object&&s,p="object"==typeof self&&self&&self.Object===Object&&self,f=h||p||Function("return this")(),y=f.Symbol,g=y,v=Object.prototype,B=v.hasOwnProperty,b=v.toString,_=g?g.toStringTag:void 0;var E=function(e){var t=B.call(e,_),r=e[_];try{e[_]=void 0;var n=!0}catch(e){}var a=b.call(e);return n&&(t?e[_]=r:delete e[_]),a},m=Object.prototype.toString;var D=E,A=function(e){return m.call(e)},k=y?y.toStringTag:void 0;var x=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":k&&k in Object(e)?D(e):A(e)};var C=x,O=function(e){return null!=e&&"object"==typeof e};var S=function(e){return"symbol"==typeof e||O(e)&&"[object Symbol]"==C(e)},j=F,w=S,T=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,I=/^\w*$/;var P=function(e,t){if(j(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!w(e))||(I.test(e)||!T.test(e)||null!=t&&e in Object(t))};var V=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},$=x,N=V;var z,R=function(e){if(!N(e))return!1;var t=$(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},L=f["__core-js_shared__"],G=(z=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"";var K=function(e){return!!G&&G in e},M=Function.prototype.toString;var U=R,q=K,H=V,J=function(e){if(null!=e){try{return M.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Q=/^\[object .+?Constructor\]$/,W=Function.prototype,X=Object.prototype,Y=W.toString,Z=X.hasOwnProperty,ee=RegExp("^"+Y.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var te=function(e){return!(!H(e)||q(e))&&(U(e)?ee:Q).test(J(e))},re=function(e,t){return null==e?void 0:e[t]};var ne=function(e,t){var r=re(e,t);return te(r)?r:void 0},ae=ne(Object,"create"),oe=ae;var ie=function(){this.__data__=oe?oe(null):{},this.size=0};var ce=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},de=ae,ue=Object.prototype.hasOwnProperty;var le=function(e){var t=this.__data__;if(de){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return ue.call(t,e)?t[e]:void 0},se=ae,Fe=Object.prototype.hasOwnProperty;var he=ae;var pe=ie,fe=ce,ye=le,ge=function(e){var t=this.__data__;return se?void 0!==t[e]:Fe.call(t,e)},ve=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=he&&void 0===t?"__lodash_hash_undefined__":t,this};function Be(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Be.prototype.clear=pe,Be.prototype.delete=fe,Be.prototype.get=ye,Be.prototype.has=ge,Be.prototype.set=ve;var be=Be;var _e=function(){this.__data__=[],this.size=0};var Ee=function(e,t){return e===t||e!=e&&t!=t};var me=function(e,t){for(var r=e.length;r--;)if(Ee(e[r][0],t))return r;return-1},De=me,Ae=Array.prototype.splice;var ke=me;var xe=me;var Ce=me;var Oe=_e,Se=function(e){var t=this.__data__,r=De(t,e);return!(r<0)&&(r==t.length-1?t.pop():Ae.call(t,r,1),--this.size,!0)},je=function(e){var t=this.__data__,r=ke(t,e);return r<0?void 0:t[r][1]},we=function(e){return xe(this.__data__,e)>-1},Te=function(e,t){var r=this.__data__,n=Ce(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Ie(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ie.prototype.clear=Oe,Ie.prototype.delete=Se,Ie.prototype.get=je,Ie.prototype.has=we,Ie.prototype.set=Te;var Pe=Ie,Ve=ne(f,"Map"),$e=be,Ne=Pe,ze=Ve;var Re=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Le=function(e,t){var r=e.__data__;return Re(t)?r["string"==typeof t?"string":"hash"]:r.map},Ge=Le;var Ke=Le;var Me=Le;var Ue=Le;var qe=function(){this.size=0,this.__data__={hash:new $e,map:new(ze||Ne),string:new $e}},He=function(e){var t=Ge(this,e).delete(e);return this.size-=t?1:0,t},Je=function(e){return Ke(this,e).get(e)},Qe=function(e){return Me(this,e).has(e)},We=function(e,t){var r=Ue(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Xe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Xe.prototype.clear=qe,Xe.prototype.delete=He,Xe.prototype.get=Je,Xe.prototype.has=Qe,Xe.prototype.set=We;var Ye=Xe;function Ze(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var i=e.apply(this,n);return r.cache=o.set(a,i)||o,i};return r.cache=new(Ze.Cache||Ye),r}Ze.Cache=Ye;var et=Ze;var tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/\\(\\)?/g,nt=function(e){var t=et(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(tt,(function(e,r,n,a){t.push(n?a.replace(rt,"$1"):r||e)})),t}));var at=function(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a},ot=F,it=S,ct=y?y.prototype:void 0,dt=ct?ct.toString:void 0;var ut=function e(t){if("string"==typeof t)return t;if(ot(t))return at(t,e)+"";if(it(t))return dt?dt.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r},lt=ut;var st=F,Ft=P,ht=nt,pt=function(e){return null==e?"":lt(e)};var ft=S;var yt=function(e,t){return st(e)?e:Ft(e,t)?[e]:ht(pt(e))},gt=function(e){if("string"==typeof e||ft(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};var vt=function(e,t){for(var r=0,n=(t=yt(t,e)).length;null!=e&&r<n;)e=e[gt(t[r++])];return r&&r==n?e:void 0};var Bt=function(e,t,r){var n=null==e?void 0:vt(e,t);return void 0===n?r:n};const bt=(e,t,r)=>t?Bt(r,t)||Bt(e,t):r||e;var _t;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme",e.designTokenScheme="designTokenScheme",e.resourceScheme="resourceScheme"}(_t||(_t={}));const Et={collections:{base:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#4B539F",2:"#6D74B1",3:"#959BC5"},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"},Blue:{Text:"#064D70",Icon:" #066391",Border:"#84B7DB",Background:"#E8F4FA"}},Shadow:{Accent:"rgba(87, 169, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}},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:"#977ECC",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"},Blue:{Text:"#064D70",Icon:" #066391",Border:"#84B7DB",Background:"#E8F4FA"}},Shadow:{Accent:"rgba(161, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}},rbs:{Brand:{1:"#3E4DFF",2:"#AEACFF",3:"#AD44FF",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#4855D4",PrimaryDark:"#3E49B2",Secondary:"#364891",Accent:{Dark:{1:"#5E516E",2:"#7A6F87",3:"#C5C0CC"},Light:{1:"#8397FC",2:"#ABB8FC",3:"#CED6FD ",4:"#E1E4FA",5:"#F0F2FF",6:"#FAFBFF"}},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"},Blue:{Text:"#064D70",Icon:" #066391",Border:"#84B7DB",Background:"#E8F4FA"}},Shadow:{Accent:"rgba(90, 87, 255, 0.5)",Red:"rgba(221, 102, 102, 0.8)",Elevation:"rgba(75, 83, 159, 0.24)"}}},defaultValue:"base"},mt=e=>t=>{const r=t.theme,n=((e,t)=>{const r=t||e.defaultValue;return Bt(e.collections,r)})(Et,r[_t.colorScheme]);return r.options&&r.options.color?bt(n,e,r.options.color):bt(n,e)},Dt={Brand:{1:mt("Brand.1"),2:mt("Brand.2"),3:mt("Brand.3"),4:mt("Brand.4"),5:mt("Brand.5"),6:mt("Brand.6")},Primary:mt("Primary"),PrimaryDark:mt("PrimaryDark"),Secondary:mt("Secondary"),Accent:{Light:{1:mt("Accent.Light.1"),2:mt("Accent.Light.2"),3:mt("Accent.Light.3"),4:mt("Accent.Light.4"),5:mt("Accent.Light.5"),6:mt("Accent.Light.6")},Dark:{1:mt("Accent.Dark.1"),2:mt("Accent.Dark.2"),3:mt("Accent.Dark.3")}},Neutral:{1:mt("Neutral.1"),2:mt("Neutral.2"),3:mt("Neutral.3"),4:mt("Neutral.4"),5:mt("Neutral.5"),6:mt("Neutral.6"),7:mt("Neutral.7"),8:mt("Neutral.8")},Validation:{Green:{Text:mt("Validation.Green.Text"),Icon:mt("Validation.Green.Icon"),Border:mt("Validation.Green.Border"),Background:mt("Validation.Green.Background")},Orange:{Text:mt("Validation.Orange.Text"),Icon:mt("Validation.Orange.Icon"),Border:mt("Validation.Orange.Border"),Background:mt("Validation.Orange.Background"),Badge:mt("Validation.Orange.Badge")},Red:{Text:mt("Validation.Red.Text"),Icon:mt("Validation.Red.Icon"),Border:mt("Validation.Red.Border"),Background:mt("Validation.Red.Background")},Blue:{Text:mt("Validation.Blue.Text"),Icon:mt("Validation.Blue.Icon"),Border:mt("Validation.Blue.Border"),Background:mt("Validation.Blue.Background")}},Shadow:{Accent:mt("Shadow.Accent"),Red:mt("Shadow.Red"),Elevation:mt("Shadow.Elevation")}},At=o`
2
+ 0% {
3
+ opacity: 0;
4
+ }
5
+ 100% {
6
+ opacity: 1;
7
+ }
8
+ `,kt=a.div`
2
9
  display: flex;
3
10
  justify-content: center;
4
11
  align-items: center;
12
+ position: relative;
5
13
 
6
- ${e=>{let t,r;if("small"===e.$displaySize)t="1.5rem",r="1.5rem";else t="2rem",r="2rem";return o`
14
+ ${e=>{let t,r;if("small"===e.$displaySize)t="1.5rem",r="1.5rem";else t="2rem",r="2rem";return i`
7
15
  height: ${t};
8
16
  width: ${r};
9
17
  `}}
10
18
 
11
- position: relative;
12
- border-radius: 4px;
13
- transition: all 200ms ease-in-out;
14
- border: 1px solid ${bt.Accent.Light[2]};
15
- background: transparent;
16
-
17
- ${e=>{let t,r;return e.selected&&(t=bt.Primary(e),r=bt.Primary(e)),e.disabled&&(t=bt.Neutral[6](e),r=bt.Neutral[6](e)),`\n\t\t\tborder: 1px solid ${t};\n\t\t\tbackground: ${r};\n\t\t`}}
18
- `,Et=a.input`
19
+ svg {
20
+ animation: 200ms ease-in-out ${At};
21
+ width: 100%;
22
+ height: 100%;
23
+ color: ${e=>e.$disabled?Dt.Neutral[4](e):e.$unchecked?Dt.Accent.Light[2](e):Dt.Primary(e)};
24
+ }
25
+ `,xt=a.input`
19
26
  position: absolute;
20
27
  opacity: 0;
21
- height: 100%;
22
28
  width: 100%;
29
+ height: 100%;
23
30
  cursor: ${e=>e.disabled?"not-allowed":"pointer"};
24
- `,mt=a(i)`
25
- ${e=>{let t;if("small"===e.$displaySize)t="1.5rem";else t="1.75rem";return o`
26
- height: ${t};
27
- width: ${t};
28
- `}}
29
- color: ${e=>e.disabled?bt.Neutral[4]:bt.Neutral[8]};
30
- `,Dt=a=>{var{className:o,checked:i,disabled:c,onChange:l,onKeyPress:d,displaySize:u="default"}=a,s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}(a,["className","checked","disabled","onChange","onKeyPress","displaySize"]);const[F,h]=r(i);n((()=>{h(i)}),[i]);const p=e=>{if(!c){const t=e;if(!(" "===t.key||"change"===e.type))return;l&&l(e),d&&d(t)}};return e(_t,Object.assign({selected:F,disabled:c,className:o,"data-testid":"checkbox",$displaySize:u,role:"checkbox","aria-checked":F,"aria-labelledby":"checkbox-input",tabIndex:c?-1:0,onKeyDown:p},{children:[t(Et,Object.assign({id:"checkbox-input","data-testid":"checkbox-input","aria-hidden":"true",type:"checkbox",tabIndex:-1,onChange:p,disabled:c,checked:F},s)),F&&t(mt,{id:"checkmark","data-testid":"checkmark",disabled:c,$displaySize:u})]}))};export{Dt as Checkbox};
31
+ `,Ct=a=>{var{className:o,checked:i,disabled:s,indeterminate:F,onChange:h,onKeyPress:p,displaySize:f="default"}=a,y=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}(a,["className","checked","disabled","indeterminate","onChange","onKeyPress","displaySize"]);const g=r();n((()=>{g.current.indeterminate=F}),[F]);const v=e=>{if(!s){const t=e;if(!(" "===t.key||"change"===e.type))return;h&&h(e),p&&p(t)}};return e(kt,Object.assign({className:o,"data-testid":"checkbox",role:"checkbox","aria-checked":F?"mixed":i,"aria-labelledby":"checkbox-input",tabIndex:s?-1:0,onKeyDown:v,$displaySize:f,$disabled:s,$unchecked:!(F||i||s)},{children:[t(xt,Object.assign({id:"checkbox-input","data-testid":"checkbox-input","aria-hidden":"true",type:"checkbox",checked:i,ref:g,tabIndex:-1,onChange:v,disabled:s},y)),F?t(c,{"data-testid":"indeterminate"}):i?t(d,{"data-testid":"checkmark"}):s?t(u,{"data-testid":"disabled-empty-checkbox"}):t(l,{"data-testid":"empty-checkbox"})]}))};export{Ct as Checkbox};
31
32
  //# sourceMappingURL=index.js.map