@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.
- package/accordion/index.js +4 -4
- package/accordion/index.js.map +1 -1
- package/alert/index.js +42 -42
- package/alert/index.js.map +1 -1
- package/box-container/index.js +5 -5
- package/box-container/index.js.map +1 -1
- package/breadcrumb/index.js +2 -2
- package/breadcrumb/index.js.map +1 -1
- package/button/index.js +125 -125
- package/button/index.js.map +1 -1
- package/card/index.js +23 -23
- package/card/index.js.map +1 -1
- package/checkbox/index.js +3 -3
- package/checkbox/index.js.map +1 -1
- package/cjs/index.js +44 -46
- package/cjs/index.js.map +1 -1
- package/color/color.d.ts +4 -59
- package/color/index.js +1 -1
- package/color/index.js.map +1 -1
- package/color/types.d.ts +4 -0
- package/date-input/index.js +53 -49
- package/date-input/index.js.map +1 -1
- package/design-token/design-token.d.ts +4 -0
- package/design-token/index.d.ts +2 -0
- package/design-token/index.js +6 -0
- package/design-token/index.js.map +1 -0
- package/{icon → design-token}/package.json +1 -1
- package/design-token/types.d.ts +7 -0
- package/error-display/index.js +92 -92
- package/error-display/index.js.map +1 -1
- package/feedback-rating/index.js +58 -58
- package/feedback-rating/index.js.map +1 -1
- package/footer/index.js +10 -10
- package/footer/index.js.map +1 -1
- package/form/index.js +144 -140
- package/form/index.js.map +1 -1
- package/icon-button/index.js +3 -3
- package/icon-button/index.js.map +1 -1
- package/index.d.ts +0 -1
- package/index.js +63 -65
- package/index.js.map +1 -1
- package/input/index.js +18 -14
- package/input/index.js.map +1 -1
- package/input-group/index.js +125 -121
- package/input-group/index.js.map +1 -1
- package/input-select/index.js +32 -28
- package/input-select/index.js.map +1 -1
- package/input-textarea/index.js +112 -108
- package/input-textarea/index.js.map +1 -1
- package/link-list/index.js +35 -35
- package/link-list/index.js.map +1 -1
- package/modal/index.js +15 -15
- package/modal/index.js.map +1 -1
- package/navbar/index.js +188 -188
- package/navbar/index.js.map +1 -1
- package/notification-banner/index.js +2 -2
- package/notification-banner/index.js.map +1 -1
- package/package.json +1 -1
- package/phone-number-input/index.js +126 -122
- package/phone-number-input/index.js.map +1 -1
- package/popover/index.js +7 -7
- package/popover/index.js.map +1 -1
- package/progress-indicator/index.js +7 -7
- package/progress-indicator/index.js.map +1 -1
- package/radio-button/index.js +7 -7
- package/radio-button/index.js.map +1 -1
- package/smart-app-banner/index.js +14 -14
- package/smart-app-banner/index.js.map +1 -1
- package/spec/design-token-spec/base-design-token-set.d.ts +2 -0
- package/text/index.js +18 -18
- package/text/index.js.map +1 -1
- package/text/text-style.d.ts +4 -100
- package/text-list/index.js +7 -7
- package/text-list/index.js.map +1 -1
- package/theme/design-token-helper.d.ts +2 -0
- package/theme/index.js +1 -1
- package/theme/index.js.map +1 -1
- package/theme/types.d.ts +10 -1
- package/timeline/index.js +8 -8
- package/timeline/index.js.map +1 -1
- package/timepicker/index.js +61 -57
- package/timepicker/index.js.map +1 -1
- package/toggle-button/index.js +109 -109
- package/toggle-button/index.js.map +1 -1
- package/tooltip/index.js +5 -5
- package/tooltip/index.js.map +1 -1
- package/unit-number/index.js +113 -109
- package/unit-number/index.js.map +1 -1
- package/util/utility-types.d.ts +3 -0
- package/icon/document-with-pencil-icon.d.ts +0 -5
- package/icon/icon-data.d.ts +0 -3
- package/icon/icon-style.d.ts +0 -1
- package/icon/icon.d.ts +0 -6
- package/icon/index.d.ts +0 -2
- package/icon/index.js +0 -8
- package/icon/index.js.map +0 -1
- package/icon/location-unknown-icon.d.ts +0 -5
- package/icon/mail-unread-icon.d.ts +0 -5
- package/icon/types.d.ts +0 -18
package/button/index.js
CHANGED
|
@@ -1,160 +1,160 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e,{jsxs as t,jsx as n}from"react/jsx-runtime";import r from"react";import i,{keyframes as a,css as o}from"styled-components";var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},c=Array.isArray,d="object"==typeof l&&l&&l.Object===Object&&l,h="object"==typeof self&&self&&self.Object===Object&&self,g=d||h||Function("return this")(),s=g.Symbol,u=s,f=Object.prototype,p=f.hasOwnProperty,y=f.toString,m=u?u.toStringTag:void 0;var S=function(e){var t=p.call(e,m),n=e[m];try{e[m]=void 0;var r=!0}catch(e){}var i=y.call(e);return r&&(t?e[m]=n:delete e[m]),i},F=Object.prototype.toString;var $=S,b=function(e){return F.call(e)},v=s?s.toStringTag:void 0;var H=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":v&&v in Object(e)?$(e):b(e)};var B=H,D=function(e){return null!=e&&"object"==typeof e};var _=function(e){return"symbol"==typeof e||D(e)&&"[object Symbol]"==B(e)},z=c,w=_,x=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C=/^\w*$/;var k=function(e,t){if(z(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!w(e))||(C.test(e)||!x.test(e)||null!=t&&e in Object(t))};var E=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},W=H,A=E;var N,O=function(e){if(!A(e))return!1;var t=W(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},j=g["__core-js_shared__"],T=(N=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"";var V=function(e){return!!T&&T in e},P=Function.prototype.toString;var R=O,I=V,L=E,X=function(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""},G=/^\[object .+?Constructor\]$/,M=Function.prototype,Z=Object.prototype,U=M.toString,Y=Z.hasOwnProperty,q=RegExp("^"+U.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var J=function(e){return!(!L(e)||I(e))&&(R(e)?q:G).test(X(e))},K=function(e,t){return null==e?void 0:e[t]};var Q=function(e,t){var n=K(e,t);return J(n)?n:void 0},ee=Q(Object,"create"),te=ee;var ne=function(){this.__data__=te?te(null):{},this.size=0};var re=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ie=ee,ae=Object.prototype.hasOwnProperty;var oe=function(e){var t=this.__data__;if(ie){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ae.call(t,e)?t[e]:void 0},le=ee,ce=Object.prototype.hasOwnProperty;var de=ee;var he=ne,ge=re,se=oe,ue=function(e){var t=this.__data__;return le?void 0!==t[e]:ce.call(t,e)},fe=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=de&&void 0===t?"__lodash_hash_undefined__":t,this};function pe(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])}}pe.prototype.clear=he,pe.prototype.delete=ge,pe.prototype.get=se,pe.prototype.has=ue,pe.prototype.set=fe;var ye=pe;var me=function(){this.__data__=[],this.size=0};var Se=function(e,t){return e===t||e!=e&&t!=t};var Fe=function(e,t){for(var n=e.length;n--;)if(Se(e[n][0],t))return n;return-1},$e=Fe,be=Array.prototype.splice;var ve=Fe;var He=Fe;var Be=Fe;var De=me,_e=function(e){var t=this.__data__,n=$e(t,e);return!(n<0)&&(n==t.length-1?t.pop():be.call(t,n,1),--this.size,!0)},ze=function(e){var t=this.__data__,n=ve(t,e);return n<0?void 0:t[n][1]},we=function(e){return He(this.__data__,e)>-1},xe=function(e,t){var n=this.__data__,r=Be(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Ce(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])}}Ce.prototype.clear=De,Ce.prototype.delete=_e,Ce.prototype.get=ze,Ce.prototype.has=we,Ce.prototype.set=xe;var ke=Ce,Ee=Q(g,"Map"),We=ye,Ae=ke,Ne=Ee;var Oe=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var je=function(e,t){var n=e.__data__;return Oe(t)?n["string"==typeof t?"string":"hash"]:n.map},Te=je;var Ve=je;var Pe=je;var Re=je;var Ie=function(){this.size=0,this.__data__={hash:new We,map:new(Ne||Ae),string:new We}},Le=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},Xe=function(e){return Ve(this,e).get(e)},Ge=function(e){return Pe(this,e).has(e)},Me=function(e,t){var n=Re(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ze(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])}}Ze.prototype.clear=Ie,Ze.prototype.delete=Le,Ze.prototype.get=Xe,Ze.prototype.has=Ge,Ze.prototype.set=Me;var Ue=Ze;function Ye(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(Ye.Cache||Ue),n}Ye.Cache=Ue;var qe=Ye;var Je=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ke=/\\(\\)?/g,Qe=function(e){var t=qe(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(Je,(function(e,n,r,i){t.push(r?i.replace(Ke,"$1"):n||e)})),t}));var et=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},tt=c,nt=_,rt=s?s.prototype:void 0,it=rt?rt.toString:void 0;var at=function e(t){if("string"==typeof t)return t;if(tt(t))return et(t,e)+"";if(nt(t))return it?it.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},ot=at;var lt=c,ct=k,dt=Qe,ht=function(e){return null==e?"":ot(e)};var gt=_;var st=function(e,t){return lt(e)?e:ct(e,t)?[e]:dt(ht(e))},ut=function(e){if("string"==typeof e||gt(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};var ft=function(e,t){for(var n=0,r=(t=st(t,e)).length;null!=e&&n<r;)e=e[ut(t[n++])];return n&&n==r?e:void 0};var pt=function(e,t,n){var r=null==e?void 0:ft(e,t);return void 0===r?n:r};const yt=(e,t,n)=>t?pt(n,t)||pt(e,t):n||e,mt=(e,t)=>{const n=t||e.defaultValue;return pt(e.collections,n)};var St;!function(e){e.colorScheme="colorScheme",e.layout="layout",e.textStyleScheme="textStyleScheme",e.designTokenScheme="designTokenScheme"}(St||(St={}));const Ft={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"},$t=e=>t=>{const n=t.theme,r=mt(Ft,n[St.colorScheme]);return n.options&&n.options.color?yt(r,e,n.options.color):yt(r,e)},bt={Brand:{1:$t("Brand.1"),2:$t("Brand.2"),3:$t("Brand.3"),4:$t("Brand.4"),5:$t("Brand.5"),6:$t("Brand.6")},Primary:$t("Primary"),PrimaryDark:$t("PrimaryDark"),Secondary:$t("Secondary"),Accent:{Light:{1:$t("Accent.Light.1"),2:$t("Accent.Light.2"),3:$t("Accent.Light.3"),4:$t("Accent.Light.4"),5:$t("Accent.Light.5"),6:$t("Accent.Light.6")},Dark:{1:$t("Accent.Dark.1"),2:$t("Accent.Dark.2"),3:$t("Accent.Dark.3")}},Neutral:{1:$t("Neutral.1"),2:$t("Neutral.2"),3:$t("Neutral.3"),4:$t("Neutral.4"),5:$t("Neutral.5"),6:$t("Neutral.6"),7:$t("Neutral.7"),8:$t("Neutral.8")},Validation:{Green:{Text:$t("Validation.Green.Text"),Icon:$t("Validation.Green.Icon"),Border:$t("Validation.Green.Border"),Background:$t("Validation.Green.Background")},Orange:{Text:$t("Validation.Orange.Text"),Icon:$t("Validation.Orange.Icon"),Border:$t("Validation.Orange.Border"),Background:$t("Validation.Orange.Background"),Badge:$t("Validation.Orange.Badge")},Red:{Text:$t("Validation.Red.Text"),Icon:$t("Validation.Red.Icon"),Border:$t("Validation.Red.Border"),Background:$t("Validation.Red.Background")}},Shadow:{Accent:$t("Shadow.Accent"),Red:$t("Shadow.Red")}},vt={mobileS:320,mobileM:375,mobileL:480,tablet:1199,desktopM:1399,desktopL:1999,desktop4k:3840},Ht=e=>Object.keys(vt).reduce(((t,n)=>{const r=vt[n];return t[n]=`@media screen and (${e}: ${r}px)`,t}),{}),Bt=Ht("max-width"),Dt=(Ht("min-width"),i.div`
|
|
2
2
|
display: inline-block;
|
|
3
3
|
position: relative;
|
|
4
|
-
width: ${
|
|
5
|
-
height: ${
|
|
6
|
-
`),
|
|
4
|
+
width: ${e=>e.$size}px;
|
|
5
|
+
height: ${e=>e.$size}px;
|
|
6
|
+
`),_t=a`
|
|
7
7
|
0% {
|
|
8
8
|
transform: rotate(0deg);
|
|
9
9
|
}
|
|
10
10
|
100% {
|
|
11
11
|
transform: rotate(360deg);
|
|
12
12
|
}
|
|
13
|
-
`,
|
|
13
|
+
`,zt=i.div`
|
|
14
14
|
box-sizing: border-box;
|
|
15
15
|
display: block;
|
|
16
16
|
position: absolute;
|
|
17
|
-
width: ${
|
|
18
|
-
height: ${
|
|
19
|
-
margin: ${
|
|
20
|
-
border-width: ${
|
|
17
|
+
width: ${e=>e.$size}px;
|
|
18
|
+
height: ${e=>e.$size}px;
|
|
19
|
+
margin: ${e=>e.$borderWidth}px;
|
|
20
|
+
border-width: ${e=>e.$borderWidth}px;
|
|
21
21
|
border-style: solid;
|
|
22
22
|
border-radius: 50%;
|
|
23
|
-
border-color: ${
|
|
23
|
+
border-color: ${e=>e.$color||bt.Neutral[8](e)}
|
|
24
24
|
transparent transparent transparent;
|
|
25
|
-
animation: ${
|
|
26
|
-
`,
|
|
25
|
+
animation: ${_t} 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
|
26
|
+
`,wt=i(zt)`
|
|
27
27
|
animation-delay: -0.45s;
|
|
28
|
-
`,
|
|
28
|
+
`,xt=i(zt)`
|
|
29
29
|
animation-delay: -0.3s;
|
|
30
|
-
`,
|
|
30
|
+
`,Ct=i(zt)`
|
|
31
31
|
animation-delay: -0.15s;
|
|
32
|
-
`,
|
|
33
|
-
font-family: ${
|
|
32
|
+
`,kt={Regular:"Open Sans",Semibold:"Open Sans Semibold",Bold:"Open Sans Bold",Light:"Open Sans Light"},Et={collections:{base:{D1:{fontFamily:kt.Bold,fontSize:3,fontWeight:700,lineHeight:4,letterSpacing:-.056},D2:{fontFamily:kt.Bold,fontSize:2.5,fontWeight:700,lineHeight:3.5,letterSpacing:-.032},D3:{fontFamily:kt.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},D4:{fontFamily:kt.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},DBody:{fontFamily:kt.Regular,fontSize:1.375,lineHeight:1.75},H1:{fontFamily:kt.Bold,fontSize:2,fontWeight:700,lineHeight:2.5},H2:{fontFamily:kt.Bold,fontSize:1.625,fontWeight:700,lineHeight:2.25},H3:{fontFamily:kt.Bold,fontSize:1.375,fontWeight:700,lineHeight:1.75},H4:{fontFamily:kt.Bold,fontSize:1.125,fontWeight:700,lineHeight:1.625},H5:{fontFamily:kt.Bold,fontSize:1,fontWeight:700,lineHeight:1.5,letterSpacing:.014},H6:{fontFamily:kt.Bold,fontSize:.875,fontWeight:700,lineHeight:1.6,letterSpacing:.012},Body:{fontFamily:kt.Regular,fontSize:1.125,lineHeight:1.625},BodySmall:{fontFamily:kt.Regular,fontSize:1,lineHeight:1.5,letterSpacing:.014},XSmall:{fontFamily:kt.Regular,fontSize:.75,lineHeight:1.2,letterSpacing:.012}}},defaultValue:"base"},Wt=e=>t=>{const n=t.theme,r=mt(Et,n[St.textStyleScheme]);return n.options&&n.options.textStyle?yt(r,e,n.options.textStyle):yt(r,e)},At={D1:{fontFamily:Wt("D1.fontFamily"),fontSize:Wt("D1.fontSize"),fontWeight:Wt("D1.fontWeight"),lineHeight:Wt("D1.lineHeight"),letterSpacing:Wt("D1.letterSpacing")},D2:{fontFamily:Wt("D2.fontFamily"),fontSize:Wt("D2.fontSize"),fontWeight:Wt("D2.fontWeight"),lineHeight:Wt("D2.lineHeight"),letterSpacing:Wt("D2.letterSpacing")},D3:{fontFamily:Wt("D3.fontFamily"),fontSize:Wt("D3.fontSize"),fontWeight:Wt("D3.fontWeight"),lineHeight:Wt("D3.lineHeight"),letterSpacing:Wt("D3.letterSpacing")},D4:{fontFamily:Wt("D4.fontFamily"),fontSize:Wt("D4.fontSize"),fontWeight:Wt("D4.fontWeight"),lineHeight:Wt("D4.lineHeight"),letterSpacing:Wt("D4.letterSpacing")},DBody:{fontFamily:Wt("DBody.fontFamily"),fontSize:Wt("DBody.fontSize"),fontWeight:Wt("DBody.fontWeight"),lineHeight:Wt("DBody.lineHeight"),letterSpacing:Wt("DBody.letterSpacing")},H1:{fontFamily:Wt("H1.fontFamily"),fontSize:Wt("H1.fontSize"),fontWeight:Wt("H1.fontWeight"),lineHeight:Wt("H1.lineHeight"),letterSpacing:Wt("H1.letterSpacing")},H2:{fontFamily:Wt("H2.fontFamily"),fontSize:Wt("H2.fontSize"),fontWeight:Wt("H2.fontWeight"),lineHeight:Wt("H2.lineHeight"),letterSpacing:Wt("H2.letterSpacing")},H3:{fontFamily:Wt("H3.fontFamily"),fontSize:Wt("H3.fontSize"),fontWeight:Wt("H3.fontWeight"),lineHeight:Wt("H3.lineHeight"),letterSpacing:Wt("H3.letterSpacing")},H4:{fontFamily:Wt("H4.fontFamily"),fontSize:Wt("H4.fontSize"),fontWeight:Wt("H4.fontWeight"),lineHeight:Wt("H4.lineHeight"),letterSpacing:Wt("H4.letterSpacing")},H5:{fontFamily:Wt("H5.fontFamily"),fontSize:Wt("H5.fontSize"),fontWeight:Wt("H5.fontWeight"),lineHeight:Wt("H5.lineHeight"),letterSpacing:Wt("H5.letterSpacing")},H6:{fontFamily:Wt("H6.fontFamily"),fontSize:Wt("H6.fontSize"),fontWeight:Wt("H6.fontWeight"),lineHeight:Wt("H6.lineHeight"),letterSpacing:Wt("H6.letterSpacing")},Body:{fontFamily:Wt("Body.fontFamily"),fontSize:Wt("Body.fontSize"),fontWeight:Wt("Body.fontWeight"),lineHeight:Wt("Body.lineHeight"),letterSpacing:Wt("Body.letterSpacing")},BodySmall:{fontFamily:Wt("BodySmall.fontFamily"),fontSize:Wt("BodySmall.fontSize"),fontWeight:Wt("BodySmall.fontWeight"),lineHeight:Wt("BodySmall.lineHeight"),letterSpacing:Wt("BodySmall.letterSpacing")},XSmall:{fontFamily:Wt("XSmall.fontFamily"),fontSize:Wt("XSmall.fontSize"),fontWeight:Wt("XSmall.fontWeight"),lineHeight:Wt("XSmall.lineHeight"),letterSpacing:Wt("XSmall.letterSpacing")}},Nt=e=>{switch(e){case 700:case"bold":return kt.Bold;case 600:case"semibold":return kt.Semibold;case 300:case"light":return kt.Light;case 400:case"regular":return kt.Regular;default:return""}},Ot=(e,t)=>n=>{const r=At[e].fontFamily(n),i=At[e].fontWeight(n);return Object.values(kt).includes(r)?o`
|
|
33
|
+
font-family: ${Nt(t)||Nt(i)||r};
|
|
34
34
|
font-weight: normal !important;
|
|
35
35
|
`:o`
|
|
36
|
-
font-family: ${
|
|
37
|
-
font-weight: ${(
|
|
38
|
-
`},
|
|
39
|
-
${
|
|
36
|
+
font-family: ${r};
|
|
37
|
+
font-weight: ${(jt(t)||i)??"normal"};
|
|
38
|
+
`},jt=e=>{switch(e){case 300:case"light":return 300;case 400:case"regular":return 400;case 600:case"semibold":return 600;case 700:case"bold":return 700;case 900:case"black":return 900;default:return""}},Tt=(e,t,n=!1)=>r=>{const i=At[e],a=i.fontSize(r);return o`
|
|
39
|
+
${Ot(e,t)}
|
|
40
40
|
font-size: ${a}rem !important;
|
|
41
41
|
line-height: ${i.lineHeight}rem !important;
|
|
42
|
-
letter-spacing: ${i.letterSpacing(
|
|
42
|
+
letter-spacing: ${i.letterSpacing(r)||0}rem !important;
|
|
43
43
|
${o`
|
|
44
|
-
margin-bottom: ${a*(
|
|
44
|
+
margin-bottom: ${a*(n?1.05:0)}rem;
|
|
45
45
|
`}
|
|
46
|
-
`},
|
|
46
|
+
`},Vt=(e=!1,t=!1)=>t?o`
|
|
47
47
|
display: block;
|
|
48
|
-
`:
|
|
48
|
+
`:e?o`
|
|
49
49
|
display: inline;
|
|
50
50
|
`:o`
|
|
51
51
|
display: block;
|
|
52
|
-
`;var
|
|
53
|
-
${
|
|
54
|
-
${
|
|
55
|
-
color: ${
|
|
56
|
-
${
|
|
52
|
+
`;var Pt,Rt={};Object.defineProperty(Rt,"__esModule",{value:!0});var It=e;const Lt=e=>It.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:It.jsx("path",{d:"M4.25 17.5C3.764 17.5 3.35067 17.33 3.01 16.99C2.67 16.6493 2.5 16.236 2.5 15.75V4.25C2.5 3.764 2.67 3.35067 3.01 3.01C3.35067 2.67 3.764 2.5 4.25 2.5H9.208C9.444 2.5 9.649 2.58667 9.823 2.76C9.99633 2.934 10.083 3.139 10.083 3.375C10.083 3.611 9.99633 3.816 9.823 3.99C9.649 4.16333 9.444 4.25 9.208 4.25H4.25V15.75H15.75V10.792C15.75 10.556 15.8367 10.351 16.01 10.177C16.184 10.0037 16.389 9.917 16.625 9.917C16.861 9.917 17.066 10.0037 17.24 10.177C17.4133 10.351 17.5 10.556 17.5 10.792V15.75C17.5 16.236 17.33 16.6493 16.99 16.99C16.6493 17.33 16.236 17.5 15.75 17.5H4.25ZM7.5 12.5C7.33333 12.3333 7.25 12.1283 7.25 11.885C7.25 11.6423 7.33333 11.4377 7.5 11.271L14.521 4.25H12.708C12.472 4.25 12.2673 4.16333 12.094 3.99C11.92 3.816 11.833 3.611 11.833 3.375C11.833 3.139 11.92 2.934 12.094 2.76C12.2673 2.58667 12.472 2.5 12.708 2.5H16.625C16.861 2.5 17.066 2.58667 17.24 2.76C17.4133 2.934 17.5 3.139 17.5 3.375V7.292C17.5 7.528 17.4133 7.73267 17.24 7.906C17.066 8.08 16.861 8.167 16.625 8.167C16.389 8.167 16.184 8.08 16.01 7.906C15.8367 7.73267 15.75 7.528 15.75 7.292V5.479L8.708 12.521C8.54133 12.6877 8.34367 12.771 8.115 12.771C7.88567 12.771 7.68067 12.6807 7.5 12.5Z",fill:"currentColor"})});var Xt;Lt.displayName="ExternalIcon",Pt=Rt.ExternalIcon=Lt,function(e){e.D1=i.h1`
|
|
53
|
+
${e=>o`
|
|
54
|
+
${Tt("D1",e.weight,e.paragraph)}
|
|
55
|
+
color: ${bt.Neutral[1]};
|
|
56
|
+
${Vt(e.inline,e.paragraph)}
|
|
57
57
|
`}
|
|
58
|
-
`,
|
|
59
|
-
${
|
|
60
|
-
${
|
|
61
|
-
color: ${
|
|
62
|
-
${
|
|
58
|
+
`,e.D2=i.h1`
|
|
59
|
+
${e=>o`
|
|
60
|
+
${Tt("D2",e.weight,e.paragraph)}
|
|
61
|
+
color: ${bt.Neutral[1]};
|
|
62
|
+
${Vt(e.inline,e.paragraph)}
|
|
63
63
|
`}
|
|
64
|
-
`,
|
|
65
|
-
${
|
|
66
|
-
${
|
|
67
|
-
color: ${
|
|
68
|
-
${
|
|
64
|
+
`,e.D3=i.h1`
|
|
65
|
+
${e=>o`
|
|
66
|
+
${Tt("D3",e.weight,e.paragraph)}
|
|
67
|
+
color: ${bt.Neutral[1]};
|
|
68
|
+
${Vt(e.inline,e.paragraph)}
|
|
69
69
|
`}
|
|
70
|
-
`,
|
|
71
|
-
${
|
|
72
|
-
${
|
|
73
|
-
color: ${
|
|
74
|
-
${
|
|
70
|
+
`,e.D4=i.h1`
|
|
71
|
+
${e=>o`
|
|
72
|
+
${Tt("D4",e.weight,e.paragraph)}
|
|
73
|
+
color: ${bt.Neutral[1]};
|
|
74
|
+
${Vt(e.inline,e.paragraph)}
|
|
75
75
|
`}
|
|
76
|
-
`,
|
|
77
|
-
${
|
|
78
|
-
${
|
|
79
|
-
color: ${
|
|
80
|
-
${
|
|
76
|
+
`,e.DBody=i.h1`
|
|
77
|
+
${e=>o`
|
|
78
|
+
${Tt("DBody",e.weight,e.paragraph)}
|
|
79
|
+
color: ${bt.Neutral[1]};
|
|
80
|
+
${Vt(e.inline,e.paragraph)}
|
|
81
81
|
`}
|
|
82
|
-
`,
|
|
83
|
-
${
|
|
84
|
-
${
|
|
85
|
-
color: ${
|
|
86
|
-
${
|
|
82
|
+
`,e.H1=i.h1`
|
|
83
|
+
${e=>o`
|
|
84
|
+
${Tt("H1",e.weight,e.paragraph)}
|
|
85
|
+
color: ${bt.Neutral[1]};
|
|
86
|
+
${Vt(e.inline,e.paragraph)}
|
|
87
87
|
`}
|
|
88
|
-
`,
|
|
89
|
-
${
|
|
90
|
-
${
|
|
91
|
-
color: ${
|
|
92
|
-
${
|
|
88
|
+
`,e.H2=i.h2`
|
|
89
|
+
${e=>o`
|
|
90
|
+
${Tt("H2",e.weight,e.paragraph)}
|
|
91
|
+
color: ${bt.Neutral[1]};
|
|
92
|
+
${Vt(e.inline,e.paragraph)}
|
|
93
93
|
`}
|
|
94
|
-
`,
|
|
95
|
-
${
|
|
96
|
-
${
|
|
97
|
-
color: ${
|
|
98
|
-
${
|
|
94
|
+
`,e.H3=i.h3`
|
|
95
|
+
${e=>o`
|
|
96
|
+
${Tt("H3",e.weight,e.paragraph)}
|
|
97
|
+
color: ${bt.Neutral[1]};
|
|
98
|
+
${Vt(e.inline,e.paragraph)}
|
|
99
99
|
`}
|
|
100
|
-
`,
|
|
101
|
-
${
|
|
102
|
-
${
|
|
103
|
-
color: ${
|
|
104
|
-
${
|
|
100
|
+
`,e.H4=i.h4`
|
|
101
|
+
${e=>o`
|
|
102
|
+
${Tt("H4",e.weight,e.paragraph)}
|
|
103
|
+
color: ${bt.Neutral[1]};
|
|
104
|
+
${Vt(e.inline,e.paragraph)}
|
|
105
105
|
`}
|
|
106
|
-
`,
|
|
107
|
-
${
|
|
108
|
-
${
|
|
109
|
-
color: ${
|
|
110
|
-
${
|
|
106
|
+
`,e.H5=i.h5`
|
|
107
|
+
${e=>o`
|
|
108
|
+
${Tt("H5",e.weight,e.paragraph)}
|
|
109
|
+
color: ${bt.Neutral[1]};
|
|
110
|
+
${Vt(e.inline,e.paragraph)}
|
|
111
111
|
`}
|
|
112
|
-
`,
|
|
113
|
-
${
|
|
114
|
-
${
|
|
115
|
-
color: ${
|
|
116
|
-
${
|
|
112
|
+
`,e.H6=i.h6`
|
|
113
|
+
${e=>o`
|
|
114
|
+
${Tt("H6",e.weight,e.paragraph)}
|
|
115
|
+
color: ${bt.Neutral[1]};
|
|
116
|
+
${Vt(e.inline,e.paragraph)}
|
|
117
117
|
`}
|
|
118
|
-
`,
|
|
119
|
-
${
|
|
120
|
-
${
|
|
121
|
-
color: ${
|
|
122
|
-
${
|
|
118
|
+
`,e.Body=i.p`
|
|
119
|
+
${e=>o`
|
|
120
|
+
${Tt("Body",e.weight,e.paragraph)}
|
|
121
|
+
color: ${bt.Neutral[1]};
|
|
122
|
+
${Vt(e.inline,e.paragraph)}
|
|
123
123
|
`}
|
|
124
|
-
`,
|
|
125
|
-
${
|
|
126
|
-
${
|
|
127
|
-
color: ${
|
|
128
|
-
${
|
|
124
|
+
`,e.BodySmall=i.p`
|
|
125
|
+
${e=>o`
|
|
126
|
+
${Tt("BodySmall",e.weight,e.paragraph)}
|
|
127
|
+
color: ${bt.Neutral[1]};
|
|
128
|
+
${Vt(e.inline,e.paragraph)}
|
|
129
129
|
`}
|
|
130
|
-
`,
|
|
131
|
-
${
|
|
132
|
-
${
|
|
133
|
-
color: ${
|
|
134
|
-
${
|
|
130
|
+
`,e.XSmall=i.span`
|
|
131
|
+
${e=>o`
|
|
132
|
+
${Tt("XSmall",e.weight,e.paragraph)}
|
|
133
|
+
color: ${bt.Neutral[1]};
|
|
134
|
+
${Vt(e.inline,e.paragraph)}
|
|
135
135
|
`}
|
|
136
|
-
`,
|
|
137
|
-
${
|
|
138
|
-
${
|
|
139
|
-
color: ${
|
|
136
|
+
`,e.Hyperlink={Default:e=>Zt({...e,textStyle:"Body"}),Small:e=>Zt({...e,textStyle:"BodySmall"})}}(Xt||(Xt={}));const Gt=i.a`
|
|
137
|
+
${e=>o`
|
|
138
|
+
${Tt(e.textStyle,e.weight)}
|
|
139
|
+
color: ${bt.Primary};
|
|
140
140
|
text-decoration: none;
|
|
141
141
|
|
|
142
142
|
:hover,
|
|
143
143
|
:active,
|
|
144
144
|
:focus {
|
|
145
|
-
color: ${
|
|
145
|
+
color: ${bt.Secondary};
|
|
146
146
|
|
|
147
147
|
svg {
|
|
148
|
-
color: ${
|
|
148
|
+
color: ${bt.Secondary};
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
`}
|
|
152
|
-
`,
|
|
152
|
+
`,Mt=i(Pt)`
|
|
153
153
|
height: 1rem;
|
|
154
154
|
width: 1rem;
|
|
155
155
|
margin-left: 0.4rem;
|
|
156
156
|
vertical-align: middle;
|
|
157
|
-
`,
|
|
157
|
+
`,Zt=({external:e=!1,children:r,...i})=>t(Gt,{...i,children:[r,e&&n(Mt,{})]});var Ut;!function(e){e[e.Subpage=0]="Subpage",e[e.Domain=1]="Domain"}(Ut||(Ut={}));const Yt=i.button`
|
|
158
158
|
padding: 0.5rem 1rem;
|
|
159
159
|
min-width: 4rem;
|
|
160
160
|
border-radius: 4px;
|
|
@@ -173,22 +173,22 @@ import t,{jsxs as e,jsx as r}from"react/jsx-runtime";import n from"react";import
|
|
|
173
173
|
// -----------------------------------------------------------------------------
|
|
174
174
|
// BUTTON STYLE + TEXT COLOR
|
|
175
175
|
// -----------------------------------------------------------------------------
|
|
176
|
-
${
|
|
177
|
-
background-color: ${
|
|
178
|
-
border: 1px solid ${
|
|
176
|
+
${e=>{switch(e.$buttonStyle){case"secondary":return o`
|
|
177
|
+
background-color: ${bt.Neutral[8](e)};
|
|
178
|
+
border: 1px solid ${bt.Primary(e)};
|
|
179
179
|
|
|
180
180
|
span {
|
|
181
|
-
color: ${
|
|
181
|
+
color: ${bt.Primary(e)};
|
|
182
182
|
}
|
|
183
183
|
`;case"light":return o`
|
|
184
|
-
background-color: ${
|
|
185
|
-
border: 1px solid ${
|
|
184
|
+
background-color: ${bt.Neutral[8](e)};
|
|
185
|
+
border: 1px solid ${bt.Neutral[5](e)};
|
|
186
186
|
|
|
187
187
|
span {
|
|
188
|
-
color: ${
|
|
188
|
+
color: ${bt.Primary(e)};
|
|
189
189
|
}
|
|
190
190
|
`;case"disabled":return o`
|
|
191
|
-
background-color: ${
|
|
191
|
+
background-color: ${bt.Neutral[6](e)};
|
|
192
192
|
border: 1px solid transparent;
|
|
193
193
|
cursor: not-allowed;
|
|
194
194
|
|
|
@@ -197,7 +197,7 @@ import t,{jsxs as e,jsx as r}from"react/jsx-runtime";import n from"react";import
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
span {
|
|
200
|
-
color: ${
|
|
200
|
+
color: ${bt.Neutral[3](e)};
|
|
201
201
|
}
|
|
202
202
|
`;case"link":return o`
|
|
203
203
|
background-color: transparent;
|
|
@@ -208,58 +208,58 @@ import t,{jsxs as e,jsx as r}from"react/jsx-runtime";import n from"react";import
|
|
|
208
208
|
box-shadow: none;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
color: ${
|
|
211
|
+
color: ${bt.Primary};
|
|
212
212
|
:hover,
|
|
213
213
|
:active,
|
|
214
214
|
:focus {
|
|
215
215
|
span {
|
|
216
|
-
color: ${
|
|
216
|
+
color: ${bt.Secondary};
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
`;default:return o`
|
|
220
|
-
background-color: ${
|
|
220
|
+
background-color: ${bt.Primary(e)};
|
|
221
221
|
border: 1px solid transparent;
|
|
222
222
|
|
|
223
|
-
${
|
|
223
|
+
${Bt.mobileL} {
|
|
224
224
|
width: 100%;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
span {
|
|
228
|
-
color: ${
|
|
228
|
+
color: ${bt.Neutral[8](e)};
|
|
229
229
|
}
|
|
230
230
|
`}}}
|
|
231
231
|
|
|
232
232
|
// -----------------------------------------------------------------------------
|
|
233
233
|
// BUTTON SIZE + TEXT SIZE
|
|
234
234
|
// -----------------------------------------------------------------------------
|
|
235
|
-
${
|
|
235
|
+
${e=>"small"===e.$buttonSizeStyle?o`
|
|
236
236
|
height: 2.5rem;
|
|
237
237
|
span {
|
|
238
|
-
${
|
|
238
|
+
${Tt("H5","semibold")}
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
${
|
|
241
|
+
${Bt.mobileS} {
|
|
242
242
|
height: auto;
|
|
243
243
|
}
|
|
244
244
|
`:o`
|
|
245
245
|
height: 3rem;
|
|
246
246
|
span {
|
|
247
|
-
${
|
|
247
|
+
${Tt("H4","semibold")}
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
${
|
|
250
|
+
${Bt.mobileS} {
|
|
251
251
|
height: auto;
|
|
252
252
|
}
|
|
253
253
|
`}
|
|
254
|
-
`,
|
|
254
|
+
`,qt=i((({color:e,className:r,size:i=18})=>t(Dt,{className:r,$size:i,$color:e,children:[n(zt,{id:"inner1",$size:i-2,$borderWidth:2}),n(wt,{id:"inner2",$size:i-2,$borderWidth:2}),n(xt,{id:"inner3",$size:i-2,$borderWidth:2}),n(Ct,{id:"inner4",$size:i-2,$borderWidth:2})]})))`
|
|
255
255
|
margin-right: 0.5rem;
|
|
256
|
-
${
|
|
256
|
+
${e=>{let t;switch(e.$buttonStyle){case"secondary":case"light":case"link":t=bt.Primary(e);break;case"disabled":t=bt.Neutral[3](e);break;default:t=bt.Neutral[8](e)}return o`
|
|
257
257
|
#inner1,
|
|
258
258
|
#inner2,
|
|
259
259
|
#inner3,
|
|
260
260
|
#inner4 {
|
|
261
|
-
border-color: ${
|
|
261
|
+
border-color: ${t} transparent transparent transparent;
|
|
262
262
|
}
|
|
263
263
|
`}}
|
|
264
|
-
`,
|
|
264
|
+
`,Jt={Default:r.forwardRef(((e,r)=>{const{children:i,disabled:a=!1,loading:o=!1,styleType:l="default",...c}=e,d={$buttonStyle:a?"disabled":l,$buttonSizeStyle:"default"};return t(Yt,{ref:r,"data-testid":c["data-testid"]||"button",disabled:a,...d,...c,children:[o&&n(qt,{...d}),n("span",{children:i})]})})),Small:r.forwardRef(((e,r)=>{const{children:i,disabled:a=!1,loading:o=!1,styleType:l="default",...c}=e,d={$buttonStyle:a?"disabled":l,$buttonSizeStyle:"small"};return t(Yt,{ref:r,"data-testid":c["data-testid"]||"button",disabled:a,...d,...c,children:[o&&n(qt,{...d,size:16}),n("span",{children:i})]})}))};export{Jt as Button};
|
|
265
265
|
//# sourceMappingURL=index.js.map
|