@lifesg/react-design-system 1.0.0-alpha.3 → 1.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.css +1 -0
- package/accordion/index.js +70 -73
- package/accordion/index.js.map +1 -1
- package/alert/index.css +1 -0
- package/alert/index.js +48 -51
- package/alert/index.js.map +1 -1
- package/animations/index.css +1 -0
- package/box-container/index.css +1 -0
- package/box-container/index.js +58 -61
- package/box-container/index.js.map +1 -1
- package/breadcrumb/index.css +1 -0
- package/breadcrumb/index.js +52 -55
- package/breadcrumb/index.js.map +1 -1
- package/button/index.css +1 -0
- package/button/index.js +48 -51
- package/button/index.js.map +1 -1
- package/checkbox/index.css +1 -0
- package/checkbox/index.js +5 -8
- package/checkbox/index.js.map +1 -1
- package/cjs/index.css +1 -0
- package/cjs/index.js +676 -82
- package/cjs/index.js.map +1 -1
- package/color/index.css +1 -0
- package/color/index.js.map +1 -1
- package/date-input/index.css +1 -0
- package/date-input/index.js +53 -68
- package/date-input/index.js.map +1 -1
- package/footer/footer-download-app.d.ts +2 -0
- package/footer/footer-download-app.style.d.ts +6 -0
- package/footer/footer-helper.d.ts +12 -0
- package/footer/footer.d.ts +3 -0
- package/footer/footer.style.d.ts +12 -0
- package/footer/index.css +1 -0
- package/footer/index.d.ts +2 -0
- package/footer/index.js +361 -0
- package/footer/index.js.map +1 -0
- package/footer/package.json +7 -0
- package/footer/types.d.ts +31 -0
- package/form/form-label.d.ts +1 -1
- package/form/form-label.style.d.ts +1 -0
- package/form/index.css +1 -0
- package/form/index.d.ts +1 -1
- package/form/index.js +194 -191
- package/form/index.js.map +1 -1
- package/form/types.d.ts +2 -0
- package/icon/cross-icon.d.ts +3 -0
- package/icon/index.css +1 -0
- package/icon/index.js +3 -6
- package/icon/index.js.map +1 -1
- package/icon/play-icon.d.ts +3 -0
- package/icon-button/index.css +1 -0
- package/icon-button/index.js +7 -10
- package/icon-button/index.js.map +1 -1
- package/index.css +1 -0
- package/index.d.ts +5 -0
- package/index.js +677 -83
- package/index.js.map +1 -1
- package/input/index.css +1 -0
- package/input/index.js +15 -3
- package/input/index.js.map +1 -1
- package/input/input.style.d.ts +2 -0
- package/input-group/index.css +1 -0
- package/input-group/index.js +128 -119
- package/input-group/index.js.map +1 -1
- package/input-group/input-group.style.d.ts +1 -0
- package/input-select/index.css +1 -0
- package/input-select/index.js +98 -104
- package/input-select/index.js.map +1 -1
- package/input-textarea/index.css +1 -0
- package/input-textarea/index.js +118 -111
- package/input-textarea/index.js.map +1 -1
- package/input-textarea/textarea-counter.d.ts +2 -1
- package/input-textarea/types.d.ts +1 -0
- package/layout/container.d.ts +3 -0
- package/layout/content.d.ts +3 -0
- package/layout/index.css +1 -0
- package/layout/index.d.ts +7 -0
- package/layout/index.js +51 -0
- package/layout/index.js.map +1 -0
- package/layout/package.json +7 -0
- package/layout/section.d.ts +3 -0
- package/layout/types.d.ts +15 -0
- package/link-list/index.css +1 -0
- package/link-list/index.js +55 -58
- package/link-list/index.js.map +1 -1
- package/masonry/index.css +1 -0
- package/masonry/index.js.map +1 -1
- package/masthead/index.css +1 -0
- package/masthead/index.d.ts +1 -0
- package/masthead/index.js +5 -0
- package/masthead/index.js.map +1 -0
- package/masthead/masthead.d.ts +3 -0
- package/masthead/package.json +7 -0
- package/media/index.css +1 -0
- package/media/index.js +1 -1
- package/media/index.js.map +1 -1
- package/media/media.d.ts +2 -1
- package/modal/index.css +1 -0
- package/modal/index.js +12 -15
- package/modal/index.js.map +1 -1
- package/navbar/brand.d.ts +10 -0
- package/navbar/brand.styles.d.ts +5 -0
- package/navbar/drawer.d.ts +3 -0
- package/navbar/drawer.styles.d.ts +12 -0
- package/navbar/index.css +1 -0
- package/navbar/index.d.ts +6 -0
- package/navbar/index.js +659 -0
- package/navbar/index.js.map +1 -0
- package/navbar/navbar-action-buttons.d.ts +10 -0
- package/navbar/navbar-action-buttons.styles.d.ts +9 -0
- package/navbar/navbar-items.d.ts +11 -0
- package/navbar/navbar-items.styles.d.ts +10 -0
- package/navbar/navbar.d.ts +3 -0
- package/navbar/navbar.styles.d.ts +14 -0
- package/navbar/package.json +7 -0
- package/navbar/types.d.ts +56 -0
- package/notification-banner/index.css +1 -0
- package/notification-banner/index.d.ts +3 -0
- package/notification-banner/index.js +262 -0
- package/notification-banner/index.js.map +1 -0
- package/notification-banner/notification-banner-hoc.d.ts +3 -0
- package/notification-banner/notification-banner-label.d.ts +3 -0
- package/notification-banner/notification-banner.d.ts +6 -0
- package/notification-banner/notification-banner.styles.d.ts +12 -0
- package/notification-banner/package.json +7 -0
- package/notification-banner/types.d.ts +22 -0
- package/overlay/index.css +1 -0
- package/package.json +1 -1
- package/popover/index.css +1 -0
- package/popover/index.js +55 -58
- package/popover/index.js.map +1 -1
- package/radio-button/index.css +1 -0
- package/radio-button/index.js.map +1 -1
- package/text/index.css +1 -0
- package/text/index.js +25 -28
- package/text/index.js.map +1 -1
- package/text-list/index.css +1 -0
- package/text-list/index.js.map +1 -1
- package/theme/index.css +1 -0
- package/theme/index.js.map +1 -1
- package/theme/types.d.ts +2 -2
- package/timeline/index.css +1 -0
- package/timeline/index.js +52 -55
- package/timeline/index.js.map +1 -1
- package/timepicker/index.css +1 -0
- package/timepicker/index.js +88 -91
- package/timepicker/index.js.map +1 -1
- package/toggle-button/index.css +1 -0
- package/toggle-button/index.js +110 -113
- package/toggle-button/index.js.map +1 -1
- package/tooltip/index.css +1 -0
- package/tooltip/index.js +51 -54
- package/tooltip/index.js.map +1 -1
- package/transition/index.css +1 -0
- package/icon/play-alt-icon.d.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--sgds-masthead-font-family:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--sgds-masthead-background-color:hsl(0, 0%, 94%);--sgds-masthead-text-color:hsl(0, 0%, 28%);--sgds-masthead-link-color:hsl(220, 100%, 47%);--sgds-masthead-link-hover-color:hsl(220, 100%, 37%);--sgds-masthead-tablet-padding-x:1.25rem;--sgds-masthead-tablet-font-size:0.75rem;--sgds-masthead-crest-color:rgb(239, 51, 32)}
|
package/toggle-button/index.js
CHANGED
|
@@ -1,132 +1,129 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as n,useRef as r,useEffect as i,useCallback as a}from"react";import o,{css as l}from"styled-components";var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},h=Array.isArray,g="object"==typeof c&&c&&c.Object===Object&&c,d="object"==typeof self&&self&&self.Object===Object&&self,f=g||d||Function("return this")(),u=f.Symbol,p=u,s=Object.prototype,y=s.hasOwnProperty,m=s.toString,F=p?p.toStringTag:void 0;var S=function(e){var t=y.call(e,F),n=e[F];try{e[F]=void 0;var r=!0}catch(e){}var i=m.call(e);return r&&(t?e[F]=n:delete e[F]),i},v=Object.prototype.toString;var B=S,$=function(e){return v.call(e)},H=u?u.toStringTag:void 0;var b=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":H&&H in Object(e)?B(e):$(e)};var D=b,w=function(e){return null!=e&&"object"==typeof e};var _=function(e){return"symbol"==typeof e||w(e)&&"[object Symbol]"==D(e)},z=h,x=_,C=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,k=/^\w*$/;var E=function(e,t){if(z(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!x(e))||(k.test(e)||!C.test(e)||null!=t&&e in Object(t))};var N=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},W=b,A=N;var O,j=function(e){if(!A(e))return!1;var t=W(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},R=f["__core-js_shared__"],V=(O=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"";var L=function(e){return!!V&&V in e},P=Function.prototype.toString;var T=j,I=L,X=N,G=function(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""},M=/^\[object .+?Constructor\]$/,Z=Function.prototype,U=Object.prototype,q=Z.toString,J=U.hasOwnProperty,K=RegExp("^"+q.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Q=function(e){return!(!X(e)||I(e))&&(T(e)?K:M).test(G(e))},Y=function(e,t){return null==e?void 0:e[t]};var ee=function(e,t){var n=Y(e,t);return Q(n)?n:void 0},te=ee(Object,"create"),ne=te;var re=function(){this.__data__=ne?ne(null):{},this.size=0};var ie=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ae=te,oe=Object.prototype.hasOwnProperty;var le=function(e){var t=this.__data__;if(ae){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return oe.call(t,e)?t[e]:void 0},ce=te,he=Object.prototype.hasOwnProperty;var ge=te;var de=re,fe=ie,ue=le,pe=function(e){var t=this.__data__;return ce?void 0!==t[e]:he.call(t,e)},se=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ge&&void 0===t?"__lodash_hash_undefined__":t,this};function ye(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])}}ye.prototype.clear=de,ye.prototype.delete=fe,ye.prototype.get=ue,ye.prototype.has=pe,ye.prototype.set=se;var me=ye;var Fe=function(){this.__data__=[],this.size=0};var Se=function(e,t){return e===t||e!=e&&t!=t};var ve=function(e,t){for(var n=e.length;n--;)if(Se(e[n][0],t))return n;return-1},Be=ve,$e=Array.prototype.splice;var He=ve;var be=ve;var De=ve;var we=Fe,_e=function(e){var t=this.__data__,n=Be(t,e);return!(n<0)&&(n==t.length-1?t.pop():$e.call(t,n,1),--this.size,!0)},ze=function(e){var t=this.__data__,n=He(t,e);return n<0?void 0:t[n][1]},xe=function(e){return be(this.__data__,e)>-1},Ce=function(e,t){var n=this.__data__,r=De(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function ke(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])}}ke.prototype.clear=we,ke.prototype.delete=_e,ke.prototype.get=ze,ke.prototype.has=xe,ke.prototype.set=Ce;var Ee=ke,Ne=ee(f,"Map"),We=me,Ae=Ee,Oe=Ne;var je=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 je(t)?n["string"==typeof t?"string":"hash"]:n.map},Ve=Re;var Le=Re;var Pe=Re;var Te=Re;var Ie=function(){this.size=0,this.__data__={hash:new We,map:new(Oe||Ae),string:new We}},Xe=function(e){var t=Ve(this,e).delete(e);return this.size-=t?1:0,t},Ge=function(e){return Le(this,e).get(e)},Me=function(e){return Pe(this,e).has(e)},Ze=function(e,t){var n=Te(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ue(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])}}Ue.prototype.clear=Ie,Ue.prototype.delete=Xe,Ue.prototype.get=Ge,Ue.prototype.has=Me,Ue.prototype.set=Ze;var qe=Ue;function Je(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Je.Cache||qe),n}Je.Cache=qe;var Ke=Je;var Qe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ye=/\\(\\)?/g,et=function(e){var t=Ke(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(Qe,(function(e,n,r,i){t.push(r?i.replace(Ye,"$1"):n||e)})),t}));var tt=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},nt=h,rt=_,it=u?u.prototype:void 0,at=it?it.toString:void 0;var ot=function e(t){if("string"==typeof t)return t;if(nt(t))return tt(t,e)+"";if(rt(t))return at?at.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},lt=ot;var ct=h,ht=E,gt=et,dt=function(e){return null==e?"":lt(e)};var ft=_;var ut=function(e,t){return ct(e)?e:ht(e,t)?[e]:gt(dt(e))},pt=function(e){if("string"==typeof e||ft(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};var st=function(e,t){for(var n=0,r=(t=ut(t,e)).length;null!=e&&n<r;)e=e[pt(t[n++])];return n&&n==r?e:void 0};var yt=function(e,t,n){var r=null==e?void 0:st(e,t);return void 0===r?n:r};const mt=(e,t,n)=>t?yt(n,t)||yt(e,t):n||e,Ft=(e,t)=>{const n=t||e.defaultValue;return yt(e.collections,n)};var St;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme"}(St||(St={}));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:"#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"},Bt=e=>t=>{const n=t.theme,r=Ft(vt,n[St.colorScheme]);return n.options&&n.options.color?mt(r,e,n.options.color):mt(r,e)},$t={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")}}},Ht={Regular:"Open Sans",Semibold:"Open Sans Semibold",Bold:"Open Sans Bold",Light:"Open Sans Light"},bt={collections:{base:{D1:{fontFamily:Ht.Bold,fontSize:3,fontWeight:700,lineHeight:4,letterSpacing:-.056},D2:{fontFamily:Ht.Bold,fontSize:2.5,fontWeight:700,lineHeight:3.5,letterSpacing:-.032},D3:{fontFamily:Ht.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},D4:{fontFamily:Ht.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},DBody:{fontFamily:Ht.Regular,fontSize:1.375,lineHeight:1.75},H1:{fontFamily:Ht.Bold,fontSize:2,fontWeight:700,lineHeight:2.5},H2:{fontFamily:Ht.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},H3:{fontFamily:Ht.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},H4:{fontFamily:Ht.Bold,fontSize:1.125,fontWeight:700,lineHeight:1.625},H5:{fontFamily:Ht.Bold,fontSize:1,fontWeight:700,lineHeight:1.5,letterSpacing:.014},H6:{fontFamily:Ht.Bold,fontSize:.875,fontWeight:700,lineHeight:1.6,letterSpacing:.012},Body:{fontFamily:Ht.Regular,fontSize:1.125,lineHeight:1.625},BodySmall:{fontFamily:Ht.Regular,fontSize:1,lineHeight:1.5,letterSpacing:.014},XSmall:{fontFamily:Ht.Regular,fontSize:.75,lineHeight:1.2,letterSpacing:.012}}},defaultValue:"base"},Dt=e=>t=>{const n=t.theme,r=Ft(bt,n[St.textStyleScheme]);return n.options&&n.options.textStyle?mt(r,e,n.options.textStyle):mt(r,e)},wt={D1:{fontFamily:Dt("D1.fontFamily"),fontSize:Dt("D1.fontSize"),fontWeight:Dt("D1.fontWeight"),lineHeight:Dt("D1.lineHeight"),letterSpacing:Dt("D1.letterSpacing")},D2:{fontFamily:Dt("D2.fontFamily"),fontSize:Dt("D2.fontSize"),fontWeight:Dt("D2.fontWeight"),lineHeight:Dt("D2.lineHeight"),letterSpacing:Dt("D2.letterSpacing")},D3:{fontFamily:Dt("D3.fontFamily"),fontSize:Dt("D3.fontSize"),fontWeight:Dt("D3.fontWeight"),lineHeight:Dt("D3.lineHeight"),letterSpacing:Dt("D3.letterSpacing")},D4:{fontFamily:Dt("D4.fontFamily"),fontSize:Dt("D4.fontSize"),fontWeight:Dt("D4.fontWeight"),lineHeight:Dt("D4.lineHeight"),letterSpacing:Dt("D4.letterSpacing")},DBody:{fontFamily:Dt("DBody.fontFamily"),fontSize:Dt("DBody.fontSize"),fontWeight:Dt("DBody.fontWeight"),lineHeight:Dt("DBody.lineHeight"),letterSpacing:Dt("DBody.letterSpacing")},H1:{fontFamily:Dt("H1.fontFamily"),fontSize:Dt("H1.fontSize"),fontWeight:Dt("H1.fontWeight"),lineHeight:Dt("H1.lineHeight"),letterSpacing:Dt("H1.letterSpacing")},H2:{fontFamily:Dt("H2.fontFamily"),fontSize:Dt("H2.fontSize"),fontWeight:Dt("H2.fontWeight"),lineHeight:Dt("H2.lineHeight"),letterSpacing:Dt("H2.letterSpacing")},H3:{fontFamily:Dt("H3.fontFamily"),fontSize:Dt("H3.fontSize"),fontWeight:Dt("H3.fontWeight"),lineHeight:Dt("H3.lineHeight"),letterSpacing:Dt("H3.letterSpacing")},H4:{fontFamily:Dt("H4.fontFamily"),fontSize:Dt("H4.fontSize"),fontWeight:Dt("H4.fontWeight"),lineHeight:Dt("H4.lineHeight"),letterSpacing:Dt("H4.letterSpacing")},H5:{fontFamily:Dt("H5.fontFamily"),fontSize:Dt("H5.fontSize"),fontWeight:Dt("H5.fontWeight"),lineHeight:Dt("H5.lineHeight"),letterSpacing:Dt("H5.letterSpacing")},H6:{fontFamily:Dt("H6.fontFamily"),fontSize:Dt("H6.fontSize"),fontWeight:Dt("H6.fontWeight"),lineHeight:Dt("H6.lineHeight"),letterSpacing:Dt("H6.letterSpacing")},Body:{fontFamily:Dt("Body.fontFamily"),fontSize:Dt("Body.fontSize"),fontWeight:Dt("Body.fontWeight"),lineHeight:Dt("Body.lineHeight"),letterSpacing:Dt("Body.letterSpacing")},BodySmall:{fontFamily:Dt("BodySmall.fontFamily"),fontSize:Dt("BodySmall.fontSize"),fontWeight:Dt("BodySmall.fontWeight"),lineHeight:Dt("BodySmall.lineHeight"),letterSpacing:Dt("BodySmall.letterSpacing")},XSmall:{fontFamily:Dt("XSmall.fontFamily"),fontSize:Dt("XSmall.fontSize"),fontWeight:Dt("XSmall.fontWeight"),lineHeight:Dt("XSmall.lineHeight"),letterSpacing:Dt("XSmall.letterSpacing")}},_t=e=>{switch(e){case 700:case"bold":return Ht.Bold;case 600:case"semibold":return Ht.Semibold;case 300:case"light":return Ht.Light;case 400:case"regular":return Ht.Regular;default:return""}},zt=(e,t)=>n=>{const r=wt[e].fontFamily(n),i=wt[e].fontWeight(n);return Object.values(Ht).includes(r)?l`
|
|
2
|
-
font-family: ${
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useState as n,useRef as r,useEffect as i,useCallback as a}from"react";import o,{css as l}from"styled-components";var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},h=Array.isArray,g="object"==typeof c&&c&&c.Object===Object&&c,d="object"==typeof self&&self&&self.Object===Object&&self,u=g||d||Function("return this")(),f=u.Symbol,s=f,p=Object.prototype,y=p.hasOwnProperty,m=p.toString,F=s?s.toStringTag:void 0;var S=function(t){var e=y.call(t,F),n=t[F];try{t[F]=void 0;var r=!0}catch(t){}var i=m.call(t);return r&&(e?t[F]=n:delete t[F]),i},v=Object.prototype.toString;var B=S,$=function(t){return v.call(t)},H=f?f.toStringTag:void 0;var b=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":H&&H in Object(t)?B(t):$(t)};var D=b,w=function(t){return null!=t&&"object"==typeof t};var _=function(t){return"symbol"==typeof t||w(t)&&"[object Symbol]"==D(t)},C=h,z=_,x=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,k=/^\w*$/;var E=function(t,e){if(C(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!z(t))||(k.test(t)||!x.test(t)||null!=e&&t in Object(e))};var N=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},W=b,A=N;var O,L=function(t){if(!A(t))return!1;var e=W(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},j=u["__core-js_shared__"],V=(O=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"";var P=function(t){return!!V&&V in t},R=Function.prototype.toString;var T=L,I=P,X=N,G=function(t){if(null!=t){try{return R.call(t)}catch(t){}try{return t+""}catch(t){}}return""},M=/^\[object .+?Constructor\]$/,Z=Function.prototype,U=Object.prototype,q=Z.toString,J=U.hasOwnProperty,K=RegExp("^"+q.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Q=function(t){return!(!X(t)||I(t))&&(T(t)?K:M).test(G(t))},Y=function(t,e){return null==t?void 0:t[e]};var tt=function(t,e){var n=Y(t,e);return Q(n)?n:void 0},et=tt(Object,"create"),nt=et;var rt=function(){this.__data__=nt?nt(null):{},this.size=0};var it=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},at=et,ot=Object.prototype.hasOwnProperty;var lt=function(t){var e=this.__data__;if(at){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ot.call(e,t)?e[t]:void 0},ct=et,ht=Object.prototype.hasOwnProperty;var gt=et;var dt=rt,ut=it,ft=lt,st=function(t){var e=this.__data__;return ct?void 0!==e[t]:ht.call(e,t)},pt=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=gt&&void 0===e?"__lodash_hash_undefined__":e,this};function yt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}yt.prototype.clear=dt,yt.prototype.delete=ut,yt.prototype.get=ft,yt.prototype.has=st,yt.prototype.set=pt;var mt=yt;var Ft=function(){this.__data__=[],this.size=0};var St=function(t,e){return t===e||t!=t&&e!=e};var vt=function(t,e){for(var n=t.length;n--;)if(St(t[n][0],e))return n;return-1},Bt=vt,$t=Array.prototype.splice;var Ht=vt;var bt=vt;var Dt=vt;var wt=Ft,_t=function(t){var e=this.__data__,n=Bt(e,t);return!(n<0)&&(n==e.length-1?e.pop():$t.call(e,n,1),--this.size,!0)},Ct=function(t){var e=this.__data__,n=Ht(e,t);return n<0?void 0:e[n][1]},zt=function(t){return bt(this.__data__,t)>-1},xt=function(t,e){var n=this.__data__,r=Dt(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=wt,kt.prototype.delete=_t,kt.prototype.get=Ct,kt.prototype.has=zt,kt.prototype.set=xt;var Et=kt,Nt=tt(u,"Map"),Wt=mt,At=Et,Ot=Nt;var Lt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var jt=function(t,e){var n=t.__data__;return Lt(e)?n["string"==typeof e?"string":"hash"]:n.map},Vt=jt;var Pt=jt;var Rt=jt;var Tt=jt;var It=function(){this.size=0,this.__data__={hash:new Wt,map:new(Ot||At),string:new Wt}},Xt=function(t){var e=Vt(this,t).delete(t);return this.size-=e?1:0,e},Gt=function(t){return Pt(this,t).get(t)},Mt=function(t){return Rt(this,t).has(t)},Zt=function(t,e){var n=Tt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Ut(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ut.prototype.clear=It,Ut.prototype.delete=Xt,Ut.prototype.get=Gt,Ut.prototype.has=Mt,Ut.prototype.set=Zt;var qt=Ut;function Jt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Jt.Cache||qt),n}Jt.Cache=qt;var Kt=Jt;var Qt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yt=/\\(\\)?/g,te=function(t){var e=Kt(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Qt,(function(t,n,r,i){e.push(r?i.replace(Yt,"$1"):n||t)})),e}));var ee=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i},ne=h,re=_,ie=f?f.prototype:void 0,ae=ie?ie.toString:void 0;var oe=function t(e){if("string"==typeof e)return e;if(ne(e))return ee(e,t)+"";if(re(e))return ae?ae.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n},le=oe;var ce=h,he=E,ge=te,de=function(t){return null==t?"":le(t)};var ue=_;var fe=function(t,e){return ce(t)?t:he(t,e)?[t]:ge(de(t))},se=function(t){if("string"==typeof t||ue(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var pe=function(t,e){for(var n=0,r=(e=fe(e,t)).length;null!=t&&n<r;)t=t[se(e[n++])];return n&&n==r?t:void 0};var ye=function(t,e,n){var r=null==t?void 0:pe(t,e);return void 0===r?n:r};const me=(t,e,n)=>e?ye(n,e)||ye(t,e):n||t,Fe=(t,e)=>{const n=e||t.defaultValue;return ye(t.collections,n)};var Se;!function(t){t.colorScheme="colorScheme",t.layout="layout",t.textStyleScheme="textStyleScheme"}(Se||(Se={}));const ve={collections:{base:{Brand:{1:"#EF413D",2:"#F26664",3:"#F58E8B",4:"#F9B5B2",5:"#FDDDD7",6:"#FFEEEA"},Primary:"#1C76D5",PrimaryDark:"#1869BF",Secondary:"#0056b3",Accent:{Dark:{1:"#465A88",2:"#556D99",3:"#8D8DBF"},Light:{1:"#57A9FF",2:"#81BFFF",3:"#BED7FF",4:"#E2ECFD",5:"#F6F8FF",6:"#FBFCFE"}},Neutral:{1:"#282828",2:"#424242",3:"#686868",4:"#A4A4A4",5:"#E0E4E5",6:"#ECEFEF",7:"#F8F8F8",8:"#FFFFFF"},Validation:{Green:{Text:"#097123",Icon:"#4FC029",Border:"#95D97F",Background:"#F9FDF8"},Orange:{Text:"#B34E00",Icon:"#FEAB10",Border:"#F9CB77",Background:"#FFFCF7",Badge:"#F57F17"},Red:{Text:"#C60000",Icon:"#C60000",Border:"#DD6666",Background:"#FDF7F7"}}},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"},Be=t=>e=>{const n=e.theme,r=Fe(ve,n[Se.colorScheme]);return n.options&&n.options.color?me(r,t,n.options.color):me(r,t)},$e={Brand:{1:Be("Brand.1"),2:Be("Brand.2"),3:Be("Brand.3"),4:Be("Brand.4"),5:Be("Brand.5"),6:Be("Brand.6")},Primary:Be("Primary"),PrimaryDark:Be("PrimaryDark"),Secondary:Be("Secondary"),Accent:{Light:{1:Be("Accent.Light.1"),2:Be("Accent.Light.2"),3:Be("Accent.Light.3"),4:Be("Accent.Light.4"),5:Be("Accent.Light.5"),6:Be("Accent.Light.6")},Dark:{1:Be("Accent.Dark.1"),2:Be("Accent.Dark.2"),3:Be("Accent.Dark.3")}},Neutral:{1:Be("Neutral.1"),2:Be("Neutral.2"),3:Be("Neutral.3"),4:Be("Neutral.4"),5:Be("Neutral.5"),6:Be("Neutral.6"),7:Be("Neutral.7"),8:Be("Neutral.8")},Validation:{Green:{Text:Be("Validation.Green.Text"),Icon:Be("Validation.Green.Icon"),Border:Be("Validation.Green.Border"),Background:Be("Validation.Green.Background")},Orange:{Text:Be("Validation.Orange.Text"),Icon:Be("Validation.Orange.Icon"),Border:Be("Validation.Orange.Border"),Background:Be("Validation.Orange.Background"),Badge:Be("Validation.Orange.Badge")},Red:{Text:Be("Validation.Red.Text"),Icon:Be("Validation.Red.Icon"),Border:Be("Validation.Red.Border"),Background:Be("Validation.Red.Background")}}},He={Regular:"Open Sans",Semibold:"Open Sans Semibold",Bold:"Open Sans Bold",Light:"Open Sans Light"},be={collections:{base:{D1:{fontFamily:He.Bold,fontSize:3,fontWeight:700,lineHeight:4,letterSpacing:-.056},D2:{fontFamily:He.Bold,fontSize:2.5,fontWeight:700,lineHeight:3.5,letterSpacing:-.032},D3:{fontFamily:He.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},D4:{fontFamily:He.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},DBody:{fontFamily:He.Regular,fontSize:1.375,lineHeight:1.75},H1:{fontFamily:He.Bold,fontSize:2,fontWeight:700,lineHeight:2.5},H2:{fontFamily:He.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},H3:{fontFamily:He.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},H4:{fontFamily:He.Bold,fontSize:1.125,fontWeight:700,lineHeight:1.625},H5:{fontFamily:He.Bold,fontSize:1,fontWeight:700,lineHeight:1.5,letterSpacing:.014},H6:{fontFamily:He.Bold,fontSize:.875,fontWeight:700,lineHeight:1.6,letterSpacing:.012},Body:{fontFamily:He.Regular,fontSize:1.125,lineHeight:1.625},BodySmall:{fontFamily:He.Regular,fontSize:1,lineHeight:1.5,letterSpacing:.014},XSmall:{fontFamily:He.Regular,fontSize:.75,lineHeight:1.2,letterSpacing:.012}}},defaultValue:"base"},De=t=>e=>{const n=e.theme,r=Fe(be,n[Se.textStyleScheme]);return n.options&&n.options.textStyle?me(r,t,n.options.textStyle):me(r,t)},we={D1:{fontFamily:De("D1.fontFamily"),fontSize:De("D1.fontSize"),fontWeight:De("D1.fontWeight"),lineHeight:De("D1.lineHeight"),letterSpacing:De("D1.letterSpacing")},D2:{fontFamily:De("D2.fontFamily"),fontSize:De("D2.fontSize"),fontWeight:De("D2.fontWeight"),lineHeight:De("D2.lineHeight"),letterSpacing:De("D2.letterSpacing")},D3:{fontFamily:De("D3.fontFamily"),fontSize:De("D3.fontSize"),fontWeight:De("D3.fontWeight"),lineHeight:De("D3.lineHeight"),letterSpacing:De("D3.letterSpacing")},D4:{fontFamily:De("D4.fontFamily"),fontSize:De("D4.fontSize"),fontWeight:De("D4.fontWeight"),lineHeight:De("D4.lineHeight"),letterSpacing:De("D4.letterSpacing")},DBody:{fontFamily:De("DBody.fontFamily"),fontSize:De("DBody.fontSize"),fontWeight:De("DBody.fontWeight"),lineHeight:De("DBody.lineHeight"),letterSpacing:De("DBody.letterSpacing")},H1:{fontFamily:De("H1.fontFamily"),fontSize:De("H1.fontSize"),fontWeight:De("H1.fontWeight"),lineHeight:De("H1.lineHeight"),letterSpacing:De("H1.letterSpacing")},H2:{fontFamily:De("H2.fontFamily"),fontSize:De("H2.fontSize"),fontWeight:De("H2.fontWeight"),lineHeight:De("H2.lineHeight"),letterSpacing:De("H2.letterSpacing")},H3:{fontFamily:De("H3.fontFamily"),fontSize:De("H3.fontSize"),fontWeight:De("H3.fontWeight"),lineHeight:De("H3.lineHeight"),letterSpacing:De("H3.letterSpacing")},H4:{fontFamily:De("H4.fontFamily"),fontSize:De("H4.fontSize"),fontWeight:De("H4.fontWeight"),lineHeight:De("H4.lineHeight"),letterSpacing:De("H4.letterSpacing")},H5:{fontFamily:De("H5.fontFamily"),fontSize:De("H5.fontSize"),fontWeight:De("H5.fontWeight"),lineHeight:De("H5.lineHeight"),letterSpacing:De("H5.letterSpacing")},H6:{fontFamily:De("H6.fontFamily"),fontSize:De("H6.fontSize"),fontWeight:De("H6.fontWeight"),lineHeight:De("H6.lineHeight"),letterSpacing:De("H6.letterSpacing")},Body:{fontFamily:De("Body.fontFamily"),fontSize:De("Body.fontSize"),fontWeight:De("Body.fontWeight"),lineHeight:De("Body.lineHeight"),letterSpacing:De("Body.letterSpacing")},BodySmall:{fontFamily:De("BodySmall.fontFamily"),fontSize:De("BodySmall.fontSize"),fontWeight:De("BodySmall.fontWeight"),lineHeight:De("BodySmall.lineHeight"),letterSpacing:De("BodySmall.letterSpacing")},XSmall:{fontFamily:De("XSmall.fontFamily"),fontSize:De("XSmall.fontSize"),fontWeight:De("XSmall.fontWeight"),lineHeight:De("XSmall.lineHeight"),letterSpacing:De("XSmall.letterSpacing")}},_e=t=>{switch(t){case 700:case"bold":return He.Bold;case 600:case"semibold":return He.Semibold;case 300:case"light":return He.Light;case 400:case"regular":return He.Regular;default:return""}},Ce=(t,e)=>n=>{const r=we[t].fontFamily(n),i=we[t].fontWeight(n);return Object.values(He).includes(r)?l`
|
|
2
|
+
font-family: ${_e(e)||_e(i)||r};
|
|
3
3
|
font-weight: normal !important;
|
|
4
4
|
`:l`
|
|
5
5
|
font-family: ${r};
|
|
6
|
-
font-weight: ${(
|
|
7
|
-
`},
|
|
8
|
-
${
|
|
6
|
+
font-weight: ${(ze(e)||i)??"normal"};
|
|
7
|
+
`},ze=t=>{switch(t){case 300:case"light":return 300;case 400:case"regular":return 400;case 600:case"semibold":return 600;case 700:case"bold":return 700;case 900:case"black":return 900;default:return""}},xe=(t,e,n=!1)=>r=>{const i=we[t],a=i.fontSize(r);return l`
|
|
8
|
+
${Ce(t,e)}
|
|
9
9
|
font-size: ${a}rem !important;
|
|
10
10
|
line-height: ${i.lineHeight}rem !important;
|
|
11
11
|
letter-spacing: ${i.letterSpacing(r)||0}rem !important;
|
|
12
12
|
${l`
|
|
13
13
|
margin-bottom: ${a*(n?1.05:0)}rem;
|
|
14
14
|
`}
|
|
15
|
-
`},
|
|
15
|
+
`},ke=(t=!1,e=!1)=>e?l`
|
|
16
16
|
display: block;
|
|
17
|
-
`:
|
|
17
|
+
`:t?l`
|
|
18
18
|
display: inline;
|
|
19
19
|
`:l`
|
|
20
20
|
display: block;
|
|
21
|
-
`,
|
|
21
|
+
`,Ee=o.svg`
|
|
22
22
|
height: 1rem;
|
|
23
23
|
width: 1rem;
|
|
24
24
|
vertical-align: text-top;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
fill: ${$t.Neutral[8]};
|
|
28
|
-
}
|
|
29
|
-
`,Nt=t=>e(Et,{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 16 16",...t,children:e("g",{fill:"none",fillRule:"evenodd",children:e("g",{id:"path",fillRule:"nonzero",children:e("g",{children:e("g",{children:e("g",{children:e("path",{d:"M8.706 14.603l6.075-6.075c.294-.29.294-.765 0-1.06L8.706 1.398c-.29-.294-.765-.294-1.06 0l-.693.694c-.3.297-.294.78.013 1.072L10.73 6.75H1.75c-.416 0-.75.334-.75.75v1c0 .416.334.75.75.75h8.981l-3.765 3.587c-.304.291-.31.775-.013 1.072l.694.694c.29.294.765.294 1.06 0z",transform:"translate(-2384.000000, -760.000000) translate(2253.000000, 692.000000) translate(16.000000, 64.000000) translate(115.000000, 4.000000) translate(0.000000, 0.000000)"})})})})})})}),Wt=t=>e(Et,{width:"1rem",height:"1rem",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",...t,children:e("path",{id:"path",d:"M20\n\t\t8.639c-.934\n\t\t0-1.742.342-2.43 1.03-.684.684-1.03 1.495-1.03 2.429 0 .931.346 1.742 1.03 2.426.688.688 1.496 1.03 2.43 1.03.931 0 1.742-.342 2.43-1.03.684-.684 1.026-1.495 1.026-2.426 0-.934-.342-1.745-1.026-2.43-.688-.687-1.499-1.03-2.43-1.03m4.61 20.91v-1.976a.959.959 0 0 0-.287-.7.959.959 0 0 0-.7-.286h-.99v-8.232a.954.954 0 0 0-.287-.7.945.945 0 0 0-.7-.29h-5.269a.95.95 0 0 0-.7.29.954.954 0 0 0-.286.7v1.976c0 .271.095.506.286.7a.959.959 0 0 0 .7.287h.99v5.269h-.99a.959.959 0 0 0-.7.286.959.959 0 0 0-.286.7v1.977c0 .274.095.505.286.7a.959.959 0 0 0 .7.286h7.246a.959.959 0 0 0 .7-.287.959.959 0 0 0 .286-.7M20 2.5c3.15 0 6.068.788 8.75 2.365a17.67 17.67 0 0 1 6.385 6.386C36.71 13.933 37.5 16.848 37.5 20c0 3.15-.79 6.068-2.365 8.751a17.71 17.71 0 0 1-6.385 6.385C26.068 36.712 23.15 37.5 20 37.5c-3.153 0-6.068-.788-8.75-2.363a17.71 17.71 0 0 1-6.385-6.385c-1.575-2.683-2.365-5.6-2.365-8.75 0-3.154.79-6.069 2.365-8.751a17.67 17.67 0 0 1 6.385-6.386C13.932 3.288 16.847 2.5 20 2.5",fillRule:"nonzero"})}),At=t=>e(Et,{xmlns:"http://www.w3.org/2000/svg",width:"2rem",height:"2rem",viewBox:"0 0 64 64",id:"play-icon",...t,children:e("path",{id:"path",d:"M52.762 37.237 20.474 53.38A5.856 5.856 0 0 1 12 48.143V15.856a5.856 5.856 0 0 1 8.474-5.238l32.288 16.144a5.856 5.856 0 0 1 0 10.475z",fillRule:"nonzero"})}),Ot=t=>e(Et,{xmlns:"http://www.w3.org/2000/svg",width:"2rem",height:"2rem",viewBox:"0 0 32 32",fill:"none",...t,children:e("g",{id:"search",children:e("path",{id:"path",fillRule:"evenodd",clipRule:"evenodd",d:"M7.60986 7.60986C5.86994 9.34977 5 11.445 5 13.8956C5 16.3462 5.86994 18.4414 7.60986 20.1813C9.34977 21.9212 11.445 22.7911 13.8956 22.7911C15.6355 22.7911 17.2345 22.3133 18.6926 21.3576L24.2063 26.8713C24.3044 26.9571 24.4146 27 24.5372 27C24.6597 27 24.77 26.9571 24.868 26.8713L26.8713 24.868C26.9571 24.77 27 24.6597 27 24.5372C27 24.4146 26.9571 24.3044 26.8713 24.2063L21.3576 18.6926C22.3133 17.2345 22.7911 15.6355 22.7911 13.8956C22.7911 11.445 21.9212 9.34977 20.1813 7.60986C18.4414 5.86994 16.3462 5 13.8956 5C11.445 5 9.34977 5.86994 7.60986 7.60986ZM9.59484 18.178C8.4063 16.9894 7.81205 15.562 7.81205 13.8956C7.81205 12.2292 8.4063 10.8017 9.59484 9.61321C10.7834 8.42468 12.2169 7.83042 13.8956 7.83042C15.5742 7.83042 17.0047 8.42162 18.1872 9.60403C19.3696 10.7864 19.9608 12.2169 19.9608 13.8956C19.9608 15.5742 19.3696 17.0047 18.1872 18.1872C17.0047 19.3696 15.5742 19.9608 13.8956 19.9608C12.2169 19.9608 10.7834 19.3665 9.59484 18.178Z"})})}),jt=o.span`
|
|
25
|
+
color: ${$e.Primary};
|
|
26
|
+
`,Ne=e=>t(Ee,{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 16 16",...e,children:t("path",{fill:"currentColor",d:"M8.706 14.603l6.075-6.075c.294-.29.294-.765 0-1.06L8.706 1.398c-.29-.294-.765-.294-1.06 0l-.693.694c-.3.297-.294.78.013 1.072L10.73 6.75H1.75c-.416 0-.75.334-.75.75v1c0 .416.334.75.75.75h8.981l-3.765 3.587c-.304.291-.31.775-.013 1.072l.694.694c.29.294.765.294 1.06 0z",transform:"translate(-2384.000000, -760.000000) translate(2253.000000, 692.000000) translate(16.000000, 64.000000) translate(115.000000, 4.000000) translate(0.000000, 0.000000)"})}),We=e=>t(Ee,{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t("path",{fill:"currentColor",d:"M23.8785 5.13337C24.0563 4.95554 24.3408 4.95554 24.5186 5.13337L26.8666 7.48184C27.0444 7.65572 27.0444 7.9442 26.8666 8.11808L19.3082 15.6819C19.1304 15.8558 19.1304 16.1442 19.3082 16.3221L26.8666 23.8819C27.0444 24.0558 27.0444 24.3443 26.8666 24.5182L24.5186 26.8666C24.3408 27.0445 24.0563 27.0445 23.8785 26.8666L16.32 19.3068C16.1422 19.129 15.8578 19.129 15.68 19.3068L8.12148 26.8666C7.94368 27.0445 7.65919 27.0445 7.48139 26.8666L5.13335 24.5182C4.95555 24.3443 4.95555 24.0558 5.13335 23.8819L12.6918 16.3221C12.8696 16.1442 12.8696 15.8558 12.6918 15.6819L5.13335 8.11808C4.95555 7.9442 4.95555 7.65572 5.13335 7.48184L7.48139 5.13337C7.65919 4.95554 7.94368 4.95554 8.12148 5.13337L15.68 12.6932C15.8578 12.871 16.1422 12.871 16.32 12.6932L23.8785 5.13337Z"})}),Ae=e=>t(Ee,{width:"1rem",height:"1rem",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",...e,children:t("path",{fill:"currentColor",id:"path",d:"M20\n\t\t8.639c-.934\n\t\t0-1.742.342-2.43 1.03-.684.684-1.03 1.495-1.03 2.429 0 .931.346 1.742 1.03 2.426.688.688 1.496 1.03 2.43 1.03.931 0 1.742-.342 2.43-1.03.684-.684 1.026-1.495 1.026-2.426 0-.934-.342-1.745-1.026-2.43-.688-.687-1.499-1.03-2.43-1.03m4.61 20.91v-1.976a.959.959 0 0 0-.287-.7.959.959 0 0 0-.7-.286h-.99v-8.232a.954.954 0 0 0-.287-.7.945.945 0 0 0-.7-.29h-5.269a.95.95 0 0 0-.7.29.954.954 0 0 0-.286.7v1.976c0 .271.095.506.286.7a.959.959 0 0 0 .7.287h.99v5.269h-.99a.959.959 0 0 0-.7.286.959.959 0 0 0-.286.7v1.977c0 .274.095.505.286.7a.959.959 0 0 0 .7.286h7.246a.959.959 0 0 0 .7-.287.959.959 0 0 0 .286-.7M20 2.5c3.15 0 6.068.788 8.75 2.365a17.67 17.67 0 0 1 6.385 6.386C36.71 13.933 37.5 16.848 37.5 20c0 3.15-.79 6.068-2.365 8.751a17.71 17.71 0 0 1-6.385 6.385C26.068 36.712 23.15 37.5 20 37.5c-3.153 0-6.068-.788-8.75-2.363a17.71 17.71 0 0 1-6.385-6.385c-1.575-2.683-2.365-5.6-2.365-8.75 0-3.154.79-6.069 2.365-8.751a17.67 17.67 0 0 1 6.385-6.386C13.932 3.288 16.847 2.5 20 2.5",fillRule:"nonzero"})}),Oe=e=>t(Ee,{xmlns:"http://www.w3.org/2000/svg",width:"2rem",height:"2rem",viewBox:"0 0 64 64",id:"play-icon",...e,children:t("path",{fill:"currentColor",fillRule:"nonzero",d:"M52.762 37.237 20.474 53.38A5.856 5.856 0 0 1 12 48.143V15.856a5.856 5.856 0 0 1 8.474-5.238l32.288 16.144a5.856 5.856 0 0 1 0 10.475z"})}),Le=e=>t(Ee,{xmlns:"http://www.w3.org/2000/svg",width:"2rem",height:"2rem",viewBox:"0 0 32 32",...e,children:t("path",{id:"path",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M7.60986 7.60986C5.86994 9.34977 5 11.445 5 13.8956C5 16.3462 5.86994 18.4414 7.60986 20.1813C9.34977 21.9212 11.445 22.7911 13.8956 22.7911C15.6355 22.7911 17.2345 22.3133 18.6926 21.3576L24.2063 26.8713C24.3044 26.9571 24.4146 27 24.5372 27C24.6597 27 24.77 26.9571 24.868 26.8713L26.8713 24.868C26.9571 24.77 27 24.6597 27 24.5372C27 24.4146 26.9571 24.3044 26.8713 24.2063L21.3576 18.6926C22.3133 17.2345 22.7911 15.6355 22.7911 13.8956C22.7911 11.445 21.9212 9.34977 20.1813 7.60986C18.4414 5.86994 16.3462 5 13.8956 5C11.445 5 9.34977 5.86994 7.60986 7.60986ZM9.59484 18.178C8.4063 16.9894 7.81205 15.562 7.81205 13.8956C7.81205 12.2292 8.4063 10.8017 9.59484 9.61321C10.7834 8.42468 12.2169 7.83042 13.8956 7.83042C15.5742 7.83042 17.0047 8.42162 18.1872 9.60403C19.3696 10.7864 19.9608 12.2169 19.9608 13.8956C19.9608 15.5742 19.3696 17.0047 18.1872 18.1872C17.0047 19.3696 15.5742 19.9608 13.8956 19.9608C12.2169 19.9608 10.7834 19.3665 9.59484 18.178Z"})}),je=o.span`
|
|
30
27
|
font-size: 1rem;
|
|
31
|
-
`;var
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
color: ${$
|
|
35
|
-
${
|
|
28
|
+
`;var Ve;!function(t){t.D1=o.h1`
|
|
29
|
+
${t=>l`
|
|
30
|
+
${xe("D1",t.weight,t.paragraph)}
|
|
31
|
+
color: ${$e.Neutral[1]};
|
|
32
|
+
${ke(t.inline,t.paragraph)}
|
|
36
33
|
`}
|
|
37
|
-
`,
|
|
38
|
-
${
|
|
39
|
-
${
|
|
40
|
-
color: ${$
|
|
41
|
-
${
|
|
34
|
+
`,t.D2=o.h1`
|
|
35
|
+
${t=>l`
|
|
36
|
+
${xe("D2",t.weight,t.paragraph)}
|
|
37
|
+
color: ${$e.Neutral[1]};
|
|
38
|
+
${ke(t.inline,t.paragraph)}
|
|
42
39
|
`}
|
|
43
|
-
`,
|
|
44
|
-
${
|
|
45
|
-
${
|
|
46
|
-
color: ${$
|
|
47
|
-
${
|
|
40
|
+
`,t.D3=o.h1`
|
|
41
|
+
${t=>l`
|
|
42
|
+
${xe("D3",t.weight,t.paragraph)}
|
|
43
|
+
color: ${$e.Neutral[1]};
|
|
44
|
+
${ke(t.inline,t.paragraph)}
|
|
48
45
|
`}
|
|
49
|
-
`,
|
|
50
|
-
${
|
|
51
|
-
${
|
|
52
|
-
color: ${$
|
|
53
|
-
${
|
|
46
|
+
`,t.D4=o.h1`
|
|
47
|
+
${t=>l`
|
|
48
|
+
${xe("D4",t.weight,t.paragraph)}
|
|
49
|
+
color: ${$e.Neutral[1]};
|
|
50
|
+
${ke(t.inline,t.paragraph)}
|
|
54
51
|
`}
|
|
55
|
-
`,
|
|
56
|
-
${
|
|
57
|
-
${
|
|
58
|
-
color: ${$
|
|
59
|
-
${
|
|
52
|
+
`,t.DBody=o.h1`
|
|
53
|
+
${t=>l`
|
|
54
|
+
${xe("DBody",t.weight,t.paragraph)}
|
|
55
|
+
color: ${$e.Neutral[1]};
|
|
56
|
+
${ke(t.inline,t.paragraph)}
|
|
60
57
|
`}
|
|
61
|
-
`,
|
|
62
|
-
${
|
|
63
|
-
${
|
|
64
|
-
color: ${$
|
|
65
|
-
${
|
|
58
|
+
`,t.H1=o.h1`
|
|
59
|
+
${t=>l`
|
|
60
|
+
${xe("H1",t.weight,t.paragraph)}
|
|
61
|
+
color: ${$e.Neutral[1]};
|
|
62
|
+
${ke(t.inline,t.paragraph)}
|
|
66
63
|
`}
|
|
67
|
-
`,
|
|
68
|
-
${
|
|
69
|
-
${
|
|
70
|
-
color: ${$
|
|
71
|
-
${
|
|
64
|
+
`,t.H2=o.h2`
|
|
65
|
+
${t=>l`
|
|
66
|
+
${xe("H2",t.weight,t.paragraph)}
|
|
67
|
+
color: ${$e.Neutral[1]};
|
|
68
|
+
${ke(t.inline,t.paragraph)}
|
|
72
69
|
`}
|
|
73
|
-
`,
|
|
74
|
-
${
|
|
75
|
-
${
|
|
76
|
-
color: ${$
|
|
77
|
-
${
|
|
70
|
+
`,t.H3=o.h3`
|
|
71
|
+
${t=>l`
|
|
72
|
+
${xe("H3",t.weight,t.paragraph)}
|
|
73
|
+
color: ${$e.Neutral[1]};
|
|
74
|
+
${ke(t.inline,t.paragraph)}
|
|
78
75
|
`}
|
|
79
|
-
`,
|
|
80
|
-
${
|
|
81
|
-
${
|
|
82
|
-
color: ${$
|
|
83
|
-
${
|
|
76
|
+
`,t.H4=o.h4`
|
|
77
|
+
${t=>l`
|
|
78
|
+
${xe("H4",t.weight,t.paragraph)}
|
|
79
|
+
color: ${$e.Neutral[1]};
|
|
80
|
+
${ke(t.inline,t.paragraph)}
|
|
84
81
|
`}
|
|
85
|
-
`,
|
|
86
|
-
${
|
|
87
|
-
${
|
|
88
|
-
color: ${$
|
|
89
|
-
${
|
|
82
|
+
`,t.H5=o.h5`
|
|
83
|
+
${t=>l`
|
|
84
|
+
${xe("H5",t.weight,t.paragraph)}
|
|
85
|
+
color: ${$e.Neutral[1]};
|
|
86
|
+
${ke(t.inline,t.paragraph)}
|
|
90
87
|
`}
|
|
91
|
-
`,
|
|
92
|
-
${
|
|
93
|
-
${
|
|
94
|
-
color: ${$
|
|
95
|
-
${
|
|
88
|
+
`,t.H6=o.h6`
|
|
89
|
+
${t=>l`
|
|
90
|
+
${xe("H6",t.weight,t.paragraph)}
|
|
91
|
+
color: ${$e.Neutral[1]};
|
|
92
|
+
${ke(t.inline,t.paragraph)}
|
|
96
93
|
`}
|
|
97
|
-
`,
|
|
98
|
-
${
|
|
99
|
-
${
|
|
100
|
-
color: ${$
|
|
101
|
-
${
|
|
94
|
+
`,t.Body=o.p`
|
|
95
|
+
${t=>l`
|
|
96
|
+
${xe("Body",t.weight,t.paragraph)}
|
|
97
|
+
color: ${$e.Neutral[1]};
|
|
98
|
+
${ke(t.inline,t.paragraph)}
|
|
102
99
|
`}
|
|
103
|
-
`,
|
|
104
|
-
${
|
|
105
|
-
${
|
|
106
|
-
color: ${$
|
|
107
|
-
${
|
|
100
|
+
`,t.BodySmall=o.p`
|
|
101
|
+
${t=>l`
|
|
102
|
+
${xe("BodySmall",t.weight,t.paragraph)}
|
|
103
|
+
color: ${$e.Neutral[1]};
|
|
104
|
+
${ke(t.inline,t.paragraph)}
|
|
108
105
|
`}
|
|
109
|
-
`,
|
|
110
|
-
${
|
|
111
|
-
${
|
|
112
|
-
color: ${$
|
|
113
|
-
${
|
|
106
|
+
`,t.XSmall=o.span`
|
|
107
|
+
${t=>l`
|
|
108
|
+
${xe("XSmall",t.weight,t.paragraph)}
|
|
109
|
+
color: ${$e.Neutral[1]};
|
|
110
|
+
${ke(t.inline,t.paragraph)}
|
|
114
111
|
`}
|
|
115
|
-
`,
|
|
116
|
-
${
|
|
117
|
-
${
|
|
118
|
-
color: ${$
|
|
112
|
+
`,t.Hyperlink={Default:t=>Te({...t,textStyle:"Body"}),Small:t=>Te({...t,textStyle:"BodySmall"})}}(Ve||(Ve={}));const Pe=o.a`
|
|
113
|
+
${t=>l`
|
|
114
|
+
${xe(t.textStyle,t.weight)}
|
|
115
|
+
color: ${$e.Primary};
|
|
119
116
|
text-decoration: none;
|
|
120
117
|
|
|
121
118
|
:hover,
|
|
122
119
|
:active,
|
|
123
120
|
:focus {
|
|
124
|
-
color: ${$
|
|
121
|
+
color: ${$e.Secondary};
|
|
125
122
|
}
|
|
126
123
|
`}
|
|
127
|
-
`,
|
|
124
|
+
`,Re=o((({type:e,...n})=>{switch(e){case"arrow-right":return t(Ne,{...n});case"info":return t(Ae,{...n});case"cross":return t(We,{...n});case"play":return t(Oe,{...n});case"search":return t(Le,{...n});default:{const r=`sgds-icon sgds-icon-${e}`,i=n.className?`${r} ${n.className}`:r;return t(je,{...n,className:i})}}}))`
|
|
128
125
|
margin-left: 0.4rem;
|
|
129
|
-
`,
|
|
126
|
+
`,Te=({external:n=!1,children:r,...i})=>e(Pe,{...i,children:[r,n&&t(Re,{type:"external"})]});var Ie;!function(t){t[t.Subpage=0]="Subpage",t[t.Domain=1]="Domain"}(Ie||(Ie={}));const Xe=o.div`
|
|
130
127
|
position: relative;
|
|
131
128
|
display: inline-flex;
|
|
132
129
|
align-items: center;
|
|
@@ -135,56 +132,56 @@ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as n,useRef as
|
|
|
135
132
|
height: 3rem;
|
|
136
133
|
min-width: 5rem;
|
|
137
134
|
border-radius: 4px;
|
|
138
|
-
border: 1px solid ${$
|
|
139
|
-
background: ${$
|
|
135
|
+
border: 1px solid ${$e.Primary};
|
|
136
|
+
background: ${$e.Neutral[8]};
|
|
140
137
|
cursor: pointer;
|
|
141
138
|
|
|
142
139
|
:hover {
|
|
143
140
|
box-shadow: 0 0 4px 1px rgba(87, 169, 255, 0.5);
|
|
144
141
|
}
|
|
145
142
|
|
|
146
|
-
${
|
|
147
|
-
background: ${$
|
|
148
|
-
border: 1px solid ${$
|
|
143
|
+
${t=>t.disabled&&!t.$selected?l`
|
|
144
|
+
background: ${$e.Neutral[6](t)};
|
|
145
|
+
border: 1px solid ${$e.Neutral[6](t)};
|
|
149
146
|
cursor: not-allowed;
|
|
150
147
|
|
|
151
148
|
:hover {
|
|
152
149
|
box-shadow: none;
|
|
153
150
|
}
|
|
154
|
-
`:
|
|
155
|
-
background: ${$
|
|
156
|
-
border: 1px solid ${$
|
|
151
|
+
`:t.disabled&&t.$selected?l`
|
|
152
|
+
background: ${$e.Neutral[6](t)};
|
|
153
|
+
border: 1px solid ${$e.Neutral[4](t)};
|
|
157
154
|
cursor: not-allowed;
|
|
158
155
|
|
|
159
156
|
:hover {
|
|
160
157
|
box-shadow: none;
|
|
161
158
|
}
|
|
162
|
-
`:
|
|
163
|
-
background: ${$
|
|
159
|
+
`:t.$selected?l`
|
|
160
|
+
background: ${$e.Accent.Light[5](t)};
|
|
164
161
|
padding: 0.6875rem 0.912rem; // Bold font takes bigger width
|
|
165
|
-
`:0==
|
|
166
|
-
border: 1px solid ${$
|
|
162
|
+
`:0==t.$selected?l`
|
|
163
|
+
border: 1px solid ${$e.Neutral[5](t)};
|
|
167
164
|
`:void 0}
|
|
168
|
-
`,
|
|
165
|
+
`,Ge=o.input`
|
|
169
166
|
position: absolute;
|
|
170
167
|
height: 100%;
|
|
171
168
|
width: 100%;
|
|
172
|
-
cursor: ${
|
|
169
|
+
cursor: ${t=>t.disabled?"not-allowed":"pointer"};
|
|
173
170
|
|
|
174
171
|
/* Hide appearance but keep it focusable using keyboard interactions */
|
|
175
172
|
appearance: none;
|
|
176
173
|
background: transparent;
|
|
177
|
-
`,
|
|
178
|
-
${
|
|
179
|
-
${
|
|
174
|
+
`,Me=o.span`
|
|
175
|
+
${t=>l`
|
|
176
|
+
${xe("H4",t.$weight)}
|
|
180
177
|
`}
|
|
181
|
-
color: ${$
|
|
178
|
+
color: ${$e.Neutral[1]};
|
|
182
179
|
text-align: center;
|
|
183
180
|
|
|
184
|
-
${
|
|
185
|
-
color: ${$
|
|
186
|
-
`:
|
|
187
|
-
color: ${$
|
|
181
|
+
${t=>t.disabled?l`
|
|
182
|
+
color: ${$e.Neutral[3](t)};
|
|
183
|
+
`:t.$selected?l`
|
|
184
|
+
color: ${$e.Primary(t)};
|
|
188
185
|
`:void 0}
|
|
189
|
-
`,
|
|
186
|
+
`,Ze=({disabled:o,checked:l,onChange:c,type:h="checkbox",children:g,className:d,...u})=>{const[f,s]=n(l),p=r();i((()=>{s(l)}),[l]);const y=a((t=>{o||("radio"!==h||f||s(!0),"checkbox"===h&&s((t=>!t)),c&&c(t))}),[]);return e(Xe,{$selected:f,disabled:o,role:"checkbox","aria-checked":f,className:d,children:[t(Ge,{ref:p,type:"checkbox","data-testid":"toggle-button-input",disabled:o,onChange:y,checked:f,...u}),t(Me,{$weight:f?"bold":"regular",$selected:f,disabled:o,"data-testid":"toggle-button-label",children:g})]})};export{Ze as ToggleButton};
|
|
190
187
|
//# sourceMappingURL=index.js.map
|