@cleartrip/ct-design-theme
Advanced tools
Comparing version 3.2.0-SNAPSHOT-shimmer-bbottomsheet.0 to 3.2.0
@@ -1,2 +0,2 @@ | ||
"use strict";var r=require("tslib"),o=require("@cleartrip/ct-design-tokens"),e=require("styled-components"),l=require("react/jsx-runtime"),a=require("react"),s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},n={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"};var c={enabled:{stroke:o.colors.neutral900},disabled:{stroke:o.colors.neutral500}},t={color:{text:{primary:o.colors.neutral900,secondary:o.colors.brandText,tertiary:o.colors.neutral500,heading:o.colors.neutral900,subHeading:o.colors.neutral700,disabled:o.colors.disabledText,success:o.colors.successText,alert:o.colors.alertText,warning:o.colors.warningText,link:o.colors.linkText,brand:o.colors.brandText,neutral:o.colors.neutral100,link2:o.colors.link2,margarita:o.colors.margarita750},button:{outlinedPrimaryLabel:o.colors.neutral900,outlinedPrimaryBorder:o.colors.neutral900,outlinedPrimaryBg:o.colors.neutral100,outlinedSecondaryLabel:o.colors.brand,outlinedSecondaryBorder:o.colors.brand,outlinedSecondaryBg:o.colors.neutral100,outlinedTertiaryLabel:o.colors.link,outlinedTertiaryBorder:o.colors.link,outlinedTertiaryBg:o.colors.neutral100,outlinedDisabledLabel:o.colors.disabledText,outlinedDisabledBg:o.colors.neutral300,containedPrimaryLabel:o.colors.neutral100,containedPrimaryBg:o.colors.neutral900,containedSecondaryLabel:o.colors.neutral100,containedSecondaryBg:o.colors.brand,containedTertiaryLabel:o.colors.neutral100,containedTertiaryBg:o.colors.link,containedDisabledLabel:o.colors.disabledText,containedDisabledBg:o.colors.neutral300,hover:function(r){var e;return((e={})[o.colors.neutral100]=o.colors.neutral100,e[o.colors.neutral900]=o.colors.neutral900,e[o.colors.neutral900]=o.colors.neutral900,e[o.colors.neutral100]=o.colors.neutral100,e[o.colors.brand]=o.colors.bgPrimaryHover,e[o.colors.neutral100]=o.colors.neutral100,e[o.colors.disabledText]=o.colors.disabledText,e[o.colors.neutral300]=o.colors.neutral300,e[o.colors.neutral100]=o.colors.neutral100,e[o.colors.link2]=o.colors.link2Hover,e[o.colors.neutral100]=o.colors.neutral100,e[o.colors.neutral900]=o.colors.neutral900,e[o.colors.neutral100]=o.colors.neutral100,e[o.colors.disabledText]=o.colors.disabledText,e[o.colors.neutral300]=o.colors.neutral300,e)[r]}},chip:{nonSelectedPrimaryLabel:o.colors.neutral900,disabledPrimaryLabel:o.colors.disabledText,selectedPrimaryLabel:o.colors.neutral900,selectedPrimaryBorder:o.colors.neutral900,selectedPrimaryBg:o.colors.neutral300},dropdown:{shadow:o.colors.shadow},tab:{nonSelectedPrimaryLabel:o.colors.neutral700,selectedPrimaryLabel:o.colors.neutral900},sidenav:{primaryBg:o.colors.neutral900,selectedTabBg:o.colors.highlightBg},tooltip:{primaryBg:o.colors.neutral900},background:{primary:o.colors.neutral900,secondary:o.colors.brand,tertiary:o.colors.link,brand:o.colors.brand,brandLightBg:o.colors.brandBg,link:o.colors.link,link2:o.colors.link2,linkLightBg:o.colors.linkBg,success:o.colors.success,successLightBg:o.colors.successBg,alert:o.colors.alert,alertLightBg:o.colors.alertBg,warning:o.colors.warning,warningLightBg:o.colors.warningBg,neutral:o.colors.neutral100,disabled:o.colors.neutral300,disabledSecondaryLight:o.colors.neutral350,disabledSecondary:o.colors.neutral400,disabledDark:o.colors.disabled100,defaultDark:o.colors.neutral700,defaultDarkest:o.colors.neutral900},border:{primary:o.colors.neutral900,secondary:o.colors.brand,tertiary:o.colors.link,brand:o.colors.brand,neutral:o.colors.neutral900,link:o.colors.link,default:o.colors.line,defaultDark:o.colors.neutral700,disabled:o.colors.neutral500,disabledDark:o.colors.disabled100,warning:o.colors.warning},spinner:{primary:o.colors.neutral700,primaryBg:o.colors.alertBg},shimmer:{disabledLight:o.colors.disabledLight,disabledDark:o.colors.disabled250},coupon:{primaryBg:o.colors.blue100},alert:{success:o.colors.successBg,warning:o.colors.alertBg,info:o.colors.blue100,error:o.colors.orange100,neutral:o.colors.neutral100},badge:{curacao:o.colors.curacao250,pinaColada:o.colors.pinaColada250,margarita250:o.colors.margarita250,default:o.colors.neutral300,green:o.colors.successBg,margarita100:o.colors.margarita100,yellow:o.colors.alertBg,orange100:o.colors.orange100,orange250:o.colors.orange250,red:o.colors.warningBg,green500:o.colors.success500,green600:o.colors.success600,purple100:o.colors.purple100,purple250:o.colors.purple250,gray100:o.colors.gray100,gray250:o.colors.gray250,aqua100:o.colors.aqua100,aqua250:o.colors.aqua250,black:o.colors.black,link:o.colors.link,neutral100:o.colors.neutral100},counter:c,calendar:{accent:o.colors.neutral900,background:o.colors.neutral300,selected:o.colors.neutral900}},elevation:r.__assign({},o.elevation),border:r.__assign({},o.border),spacing:r.__assign({},o.spacing),typography:r.__assign({},o.typography),size:r.__assign({},o.size),transitions:{duration:s,easing:n,create:function(r,o){void 0===r&&(r=["all"]),void 0===o&&(o={});var e=o.duration,l=void 0===e?s.standard:e,a=o.easing,c=void 0===a?n.easeInOut:a,t=o.delay,i=void 0===t?0:t;return(Array.isArray(r)?r:[r]).map((function(r){return"".concat(r," ").concat("string"==typeof l?l:"".concat(l,"ms")," ").concat(c," ").concat("string"==typeof i?i:"".concat(i,"ms"))})).join(",")},getAutoHeightDuration:function(r){if(!r)return 0;var o=r/36;return Math.round(10*(4+15*Math.pow(o,.25)+o/5))}},zIndex:{drawer:1200,modal:1300,popOver:1300,tooltip:1500,sideNav:100,toolbar:50,bottomSheet:100}},i=r.__assign({},t),d=r.__assign(r.__assign({},t),{color:r.__assign(r.__assign({},t.color),{text:r.__assign(r.__assign({},t.color.text),{secondary:o.colors.link2,tertiary:o.colors.neutral500}),button:{outlinedPrimaryLabel:o.colors.link2,outlinedPrimaryBorder:o.colors.link2,outlinedPrimaryBg:o.colors.neutral100,outlinedSecondaryLabel:o.colors.neutral900,outlinedSecondaryBorder:o.colors.neutral900,outlinedSecondaryBg:o.colors.neutral100,outlinedTertiaryLabel:o.colors.brand,outlinedTertiaryBorder:o.colors.brand,outlinedTertiaryBg:o.colors.neutral100,outlinedDisabledLabel:o.colors.disabledText,outlinedDisabledBg:o.colors.neutral300,containedPrimaryLabel:o.colors.neutral100,containedPrimaryBg:o.colors.link2,containedSecondaryLabel:o.colors.neutral100,containedSecondaryBg:o.colors.neutral900,containedTertiaryLabel:o.colors.neutral100,containedTertiaryBg:o.colors.brand,containedDisabledLabel:o.colors.disabledText,containedDisabledBg:o.colors.neutral300,hover:function(r){var e;return((e={})[o.colors.neutral100]=o.colors.neutral100,e[o.colors.neutral900]=o.colors.neutral900,e[o.colors.neutral900]=o.colors.neutral900,e[o.colors.neutral100]=o.colors.neutral100,e[o.colors.brand]=o.colors.bgPrimaryHover,e[o.colors.neutral100]=o.colors.neutral100,e[o.colors.disabledText]=o.colors.disabledText,e[o.colors.neutral300]=o.colors.neutral300,e[o.colors.neutral100]=o.colors.neutral100,e[o.colors.link2]=o.colors.link2Hover,e[o.colors.neutral100]=o.colors.neutral100,e[o.colors.neutral900]=o.colors.neutral900,e[o.colors.neutral100]=o.colors.neutral100,e[o.colors.disabledText]=o.colors.disabledText,e[o.colors.neutral300]=o.colors.neutral300,e)[r]}},chip:r.__assign(r.__assign({},t.color.chip),{selectedPrimaryLabel:o.colors.link2,selectedPrimaryBorder:o.colors.link2,selectedPrimaryBg:o.colors.linkBg}),tab:r.__assign(r.__assign({},t.color.tab),{nonSelectedPrimaryLabel:o.colors.neutral900,selectedPrimaryLabel:o.colors.link2}),background:r.__assign(r.__assign({},t.color.background),{primary:o.colors.link2,secondary:o.colors.neutral900,tertiary:o.colors.brand}),border:r.__assign(r.__assign({},t.color.border),{primary:o.colors.link2,secondary:o.colors.neutral900,tertiary:o.colors.brand}),spinner:{primary:o.colors.link2,primaryBg:o.colors.alertBg},calendar:{accent:"",background:"",selected:o.colors.link2}})}),u=a.createContext({theme:i,platform:"mobile"}),g=function(o){var a=o.children,s=o.theme,n=void 0===s?"B2C":s,c=o.platform,t=void 0===c?"mobile":c,g=function(r){switch(r){case"B2C":default:return i;case"B2B":return d}}(n);return l.jsx(u.Provider,r.__assign({value:{theme:g,platform:t}},{children:l.jsx(e.ThemeProvider,r.__assign({theme:g},{children:l.jsx(l.Fragment,{children:a})}))}))};g.defaultProps={children:null};exports.B2BTheme=d,exports.B2CTheme=i,exports.BaseTheme=t,exports.ThemeContext=u,exports.ThemeProvider=g,exports.useTheme=function(){return(a.useContext(u)||{theme:i}).theme},exports.useThemeContext=function(){return a.useContext(u)}; | ||
"use strict";var r=require("tslib"),o=require("@cleartrip/ct-design-tokens"),l=require("styled-components"),e=require("react/jsx-runtime"),a=require("react"),s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},n={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"};var c={enabled:{stroke:o.colors.neutral900},disabled:{stroke:o.colors.neutral500}},t={color:{text:{primary:o.colors.neutral900,secondary:o.colors.brandText,tertiary:o.colors.neutral500,heading:o.colors.neutral900,subHeading:o.colors.neutral700,disabled:o.colors.disabledText,success:o.colors.successText,alert:o.colors.alertText,warning:o.colors.warningText,link:o.colors.linkText,brand:o.colors.brandText,neutral:o.colors.neutral100,link2:o.colors.link2,margarita:o.colors.margarita750},button:{outlinedPrimaryLabel:o.colors.neutral900,outlinedPrimaryBorder:o.colors.neutral900,outlinedPrimaryBg:o.colors.neutral100,outlinedSecondaryLabel:o.colors.brand,outlinedSecondaryBorder:o.colors.brand,outlinedSecondaryBg:o.colors.neutral100,outlinedTertiaryLabel:o.colors.link,outlinedTertiaryBorder:o.colors.link,outlinedTertiaryBg:o.colors.neutral100,outlinedDisabledLabel:o.colors.disabledText,outlinedDisabledBg:o.colors.neutral300,containedPrimaryLabel:o.colors.neutral100,containedPrimaryBg:o.colors.neutral900,containedSecondaryLabel:o.colors.neutral100,containedSecondaryBg:o.colors.brand,containedTertiaryLabel:o.colors.neutral100,containedTertiaryBg:o.colors.link,containedDisabledLabel:o.colors.disabledText,containedDisabledBg:o.colors.neutral300,hover:function(r){var l;return((l={})[o.colors.neutral100]=o.colors.neutral100,l[o.colors.neutral900]=o.colors.neutral900,l[o.colors.neutral900]=o.colors.neutral900,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.brand]=o.colors.bgPrimaryHover,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.disabledText]=o.colors.disabledText,l[o.colors.neutral300]=o.colors.neutral300,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.link2]=o.colors.link2Hover,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.neutral900]=o.colors.neutral900,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.disabledText]=o.colors.disabledText,l[o.colors.neutral300]=o.colors.neutral300,l)[r]}},chip:{nonSelectedPrimaryLabel:o.colors.neutral900,disabledPrimaryLabel:o.colors.disabledText,selectedPrimaryLabel:o.colors.neutral900,selectedPrimaryBorder:o.colors.neutral900,selectedPrimaryBg:o.colors.neutral300},dropdown:{shadow:o.colors.shadow},tab:{nonSelectedPrimaryLabel:o.colors.neutral700,selectedPrimaryLabel:o.colors.neutral900},sidenav:{primaryBg:o.colors.neutral900,selectedTabBg:o.colors.highlightBg},tooltip:{primaryBg:o.colors.neutral900},background:{primary:o.colors.neutral900,secondary:o.colors.brand,tertiary:o.colors.link,brand:o.colors.brand,brandLightBg:o.colors.brandBg,link:o.colors.link,link2:o.colors.link2,linkLightBg:o.colors.linkBg,success:o.colors.success,successLightBg:o.colors.successBg,alert:o.colors.alert,alertLightBg:o.colors.alertBg,warning:o.colors.warning,warningLightBg:o.colors.warningBg,neutral:o.colors.neutral100,disabled:o.colors.neutral300,disabledSecondaryLight:o.colors.neutral350,disabledSecondary:o.colors.neutral400,disabledDark:o.colors.disabled100,defaultDark:o.colors.neutral700,defaultDarkest:o.colors.neutral900},border:{primary:o.colors.neutral900,secondary:o.colors.brand,tertiary:o.colors.link,brand:o.colors.brand,neutral:o.colors.neutral900,link:o.colors.link,default:o.colors.line,defaultDark:o.colors.neutral700,disabled:o.colors.neutral500,disabledDark:o.colors.disabled100,warning:o.colors.warning},spinner:{primary:o.colors.neutral700,primaryBg:o.colors.alertBg},coupon:{primaryBg:o.colors.blue100},alert:{success:o.colors.successBg,warning:o.colors.alertBg,info:o.colors.blue100,error:o.colors.orange100,neutral:o.colors.neutral100},badge:{curacao:o.colors.curacao250,pinaColada:o.colors.pinaColada250,margarita250:o.colors.margarita250,default:o.colors.neutral300,green:o.colors.successBg,margarita100:o.colors.margarita100,yellow:o.colors.alertBg,orange100:o.colors.orange100,orange250:o.colors.orange250,red:o.colors.warningBg,green500:o.colors.success500,green600:o.colors.success600,purple100:o.colors.purple100,purple250:o.colors.purple250,gray100:o.colors.gray100,gray250:o.colors.gray250,aqua100:o.colors.aqua100,aqua250:o.colors.aqua250,black:o.colors.black,link:o.colors.link,neutral100:o.colors.neutral100},counter:c,calendar:{accent:o.colors.neutral900,background:o.colors.neutral300,selected:o.colors.neutral900}},elevation:r.__assign({},o.elevation),border:r.__assign({},o.border),spacing:r.__assign({},o.spacing),typography:r.__assign({},o.typography),size:r.__assign({},o.size),transitions:{duration:s,easing:n,create:function(r,o){void 0===r&&(r=["all"]),void 0===o&&(o={});var l=o.duration,e=void 0===l?s.standard:l,a=o.easing,c=void 0===a?n.easeInOut:a,t=o.delay,i=void 0===t?0:t;return(Array.isArray(r)?r:[r]).map((function(r){return"".concat(r," ").concat("string"==typeof e?e:"".concat(e,"ms")," ").concat(c," ").concat("string"==typeof i?i:"".concat(i,"ms"))})).join(",")},getAutoHeightDuration:function(r){if(!r)return 0;var o=r/36;return Math.round(10*(4+15*Math.pow(o,.25)+o/5))}},zIndex:{drawer:1200,modal:1300,popOver:1300,tooltip:1500,sideNav:100,toolbar:50}},i=r.__assign({},t),u=r.__assign(r.__assign({},t),{color:r.__assign(r.__assign({},t.color),{text:r.__assign(r.__assign({},t.color.text),{secondary:o.colors.link2,tertiary:o.colors.neutral500}),button:{outlinedPrimaryLabel:o.colors.link2,outlinedPrimaryBorder:o.colors.link2,outlinedPrimaryBg:o.colors.neutral100,outlinedSecondaryLabel:o.colors.neutral900,outlinedSecondaryBorder:o.colors.neutral900,outlinedSecondaryBg:o.colors.neutral100,outlinedTertiaryLabel:o.colors.brand,outlinedTertiaryBorder:o.colors.brand,outlinedTertiaryBg:o.colors.neutral100,outlinedDisabledLabel:o.colors.disabledText,outlinedDisabledBg:o.colors.neutral300,containedPrimaryLabel:o.colors.neutral100,containedPrimaryBg:o.colors.link2,containedSecondaryLabel:o.colors.neutral100,containedSecondaryBg:o.colors.neutral900,containedTertiaryLabel:o.colors.neutral100,containedTertiaryBg:o.colors.brand,containedDisabledLabel:o.colors.disabledText,containedDisabledBg:o.colors.neutral300,hover:function(r){var l;return((l={})[o.colors.neutral100]=o.colors.neutral100,l[o.colors.neutral900]=o.colors.neutral900,l[o.colors.neutral900]=o.colors.neutral900,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.brand]=o.colors.bgPrimaryHover,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.disabledText]=o.colors.disabledText,l[o.colors.neutral300]=o.colors.neutral300,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.link2]=o.colors.link2Hover,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.neutral900]=o.colors.neutral900,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.disabledText]=o.colors.disabledText,l[o.colors.neutral300]=o.colors.neutral300,l)[r]}},chip:r.__assign(r.__assign({},t.color.chip),{selectedPrimaryLabel:o.colors.link2,selectedPrimaryBorder:o.colors.link2,selectedPrimaryBg:o.colors.linkBg}),tab:r.__assign(r.__assign({},t.color.tab),{nonSelectedPrimaryLabel:o.colors.neutral900,selectedPrimaryLabel:o.colors.link2}),background:r.__assign(r.__assign({},t.color.background),{primary:o.colors.link2,secondary:o.colors.neutral900,tertiary:o.colors.brand}),border:r.__assign(r.__assign({},t.color.border),{primary:o.colors.link2,secondary:o.colors.neutral900,tertiary:o.colors.brand}),spinner:{primary:o.colors.link2,primaryBg:o.colors.alertBg},calendar:{accent:"",background:"",selected:o.colors.link2}})}),d={enabled:{stroke:o.colors.bluePrimary500},disabled:{stroke:o.colors.neutral500}},g=r.__assign(r.__assign({},t),{color:r.__assign(r.__assign({},t.color),{text:r.__assign(r.__assign({},t.color.text),{link:o.colors.bluePrimary500}),button:r.__assign(r.__assign({},t.color.button),{outlinedPrimaryLabel:o.colors.primaryNeutral900,outlinedPrimaryBg:o.colors.neutral100,containedPrimaryLabel:o.colors.neutral100,containedPrimaryBg:o.colors.bluePrimary500,containedSecondaryLabel:o.colors.primaryNeutral900,containedSecondaryBg:o.colors.yellowSecondary,hover:function(r){var l;return((l={})[o.colors.neutral100]=o.colors.neutral100,l[o.colors.neutral900]=o.colors.neutral900,l[o.colors.neutral900]=o.colors.neutral900,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.brand]=o.colors.bgPrimaryHover,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.disabledText]=o.colors.disabledText,l[o.colors.neutral300]=o.colors.neutral300,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.link2]=o.colors.link2Hover,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.neutral900]=o.colors.neutral900,l[o.colors.neutral100]=o.colors.neutral100,l[o.colors.disabledText]=o.colors.disabledText,l[o.colors.neutral300]=o.colors.neutral300,l)[r]}}),chip:r.__assign(r.__assign({},t.color.chip),{selectedPrimaryLabel:o.colors.link2,selectedPrimaryBorder:o.colors.link2,selectedPrimaryBg:o.colors.linkBg,nonSelectedPrimaryLabel:o.colors.neutral900}),tab:r.__assign(r.__assign({},t.color.tab),{nonSelectedPrimaryLabel:o.colors.neutral900,selectedPrimaryLabel:o.colors.bluePrimary500}),background:r.__assign(r.__assign({},t.color.background),{primary:o.colors.bluePrimary500,secondary:o.colors.neutral900,tertiary:o.colors.brand,linkLightBg:o.colors.blueSecondary}),border:r.__assign(r.__assign({},t.color.border),{primary:o.colors.bluePrimary500,brand:o.colors.bluePrimary500}),spinner:{primary:o.colors.link2,primaryBg:o.colors.alertBg},counter:d,calendar:{accent:o.colors.bluePrimary500,background:o.colors.blueSecondary,selected:o.colors.bluePrimary500}})}),b=a.createContext({theme:i,platform:"mobile",themeType:"B2C"}),y=function(o){var a=o.children,s=o.theme,n=void 0===s?"B2C":s,c=o.platform,t=void 0===c?"mobile":c,d=function(r){switch(r){case"B2C":default:return i;case"B2B":return u;case"FK":return g}}(n);return e.jsx(b.Provider,r.__assign({value:{theme:d,platform:t,themeType:n}},{children:e.jsx(l.ThemeProvider,r.__assign({theme:d},{children:e.jsx(e.Fragment,{children:a})}))}))};y.defaultProps={children:null};exports.B2BTheme=u,exports.B2CTheme=i,exports.BaseTheme=t,exports.FKTheme=g,exports.ThemeContext=b,exports.ThemeProvider=y,exports.useTheme=function(){return(a.useContext(b)||{theme:i}).theme},exports.useThemeContext=function(){return a.useContext(b)}; | ||
//# sourceMappingURL=ct-design-theme.browser.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
import{__assign as e}from"tslib";import{colors as r,elevation as a,border as n,spacing as t,typography as l,size as i}from"@cleartrip/ct-design-tokens";import{ThemeProvider as d}from"styled-components";import{jsx as u,Fragment as o}from"react/jsx-runtime";import{createContext as c,useContext as s}from"react";var b={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},g={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"};var y={enabled:{stroke:r.neutral900},disabled:{stroke:r.neutral500}},m={color:{text:{primary:r.neutral900,secondary:r.brandText,tertiary:r.neutral500,heading:r.neutral900,subHeading:r.neutral700,disabled:r.disabledText,success:r.successText,alert:r.alertText,warning:r.warningText,link:r.linkText,brand:r.brandText,neutral:r.neutral100,link2:r.link2,margarita:r.margarita750},button:{outlinedPrimaryLabel:r.neutral900,outlinedPrimaryBorder:r.neutral900,outlinedPrimaryBg:r.neutral100,outlinedSecondaryLabel:r.brand,outlinedSecondaryBorder:r.brand,outlinedSecondaryBg:r.neutral100,outlinedTertiaryLabel:r.link,outlinedTertiaryBorder:r.link,outlinedTertiaryBg:r.neutral100,outlinedDisabledLabel:r.disabledText,outlinedDisabledBg:r.neutral300,containedPrimaryLabel:r.neutral100,containedPrimaryBg:r.neutral900,containedSecondaryLabel:r.neutral100,containedSecondaryBg:r.brand,containedTertiaryLabel:r.neutral100,containedTertiaryBg:r.link,containedDisabledLabel:r.disabledText,containedDisabledBg:r.neutral300,hover:function(e){var a;return((a={})[r.neutral100]=r.neutral100,a[r.neutral900]=r.neutral900,a[r.neutral900]=r.neutral900,a[r.neutral100]=r.neutral100,a[r.brand]=r.bgPrimaryHover,a[r.neutral100]=r.neutral100,a[r.disabledText]=r.disabledText,a[r.neutral300]=r.neutral300,a[r.neutral100]=r.neutral100,a[r.link2]=r.link2Hover,a[r.neutral100]=r.neutral100,a[r.neutral900]=r.neutral900,a[r.neutral100]=r.neutral100,a[r.disabledText]=r.disabledText,a[r.neutral300]=r.neutral300,a)[e]}},chip:{nonSelectedPrimaryLabel:r.neutral900,disabledPrimaryLabel:r.disabledText,selectedPrimaryLabel:r.neutral900,selectedPrimaryBorder:r.neutral900,selectedPrimaryBg:r.neutral300},dropdown:{shadow:r.shadow},tab:{nonSelectedPrimaryLabel:r.neutral700,selectedPrimaryLabel:r.neutral900},sidenav:{primaryBg:r.neutral900,selectedTabBg:r.highlightBg},tooltip:{primaryBg:r.neutral900},background:{primary:r.neutral900,secondary:r.brand,tertiary:r.link,brand:r.brand,brandLightBg:r.brandBg,link:r.link,link2:r.link2,linkLightBg:r.linkBg,success:r.success,successLightBg:r.successBg,alert:r.alert,alertLightBg:r.alertBg,warning:r.warning,warningLightBg:r.warningBg,neutral:r.neutral100,disabled:r.neutral300,disabledSecondaryLight:r.neutral350,disabledSecondary:r.neutral400,disabledDark:r.disabled100,defaultDark:r.neutral700,defaultDarkest:r.neutral900},border:{primary:r.neutral900,secondary:r.brand,tertiary:r.link,brand:r.brand,neutral:r.neutral900,link:r.link,default:r.line,defaultDark:r.neutral700,disabled:r.neutral500,disabledDark:r.disabled100,warning:r.warning},spinner:{primary:r.neutral700,primaryBg:r.alertBg},shimmer:{disabledLight:r.disabledLight,disabledDark:r.disabled250},coupon:{primaryBg:r.blue100},alert:{success:r.successBg,warning:r.alertBg,info:r.blue100,error:r.orange100,neutral:r.neutral100},badge:{curacao:r.curacao250,pinaColada:r.pinaColada250,margarita250:r.margarita250,default:r.neutral300,green:r.successBg,margarita100:r.margarita100,yellow:r.alertBg,orange100:r.orange100,orange250:r.orange250,red:r.warningBg,green500:r.success500,green600:r.success600,purple100:r.purple100,purple250:r.purple250,gray100:r.gray100,gray250:r.gray250,aqua100:r.aqua100,aqua250:r.aqua250,black:r.black,link:r.link,neutral100:r.neutral100},counter:y,calendar:{accent:r.neutral900,background:r.neutral300,selected:r.neutral900}},elevation:e({},a),border:e({},n),spacing:e({},t),typography:e({},l),size:e({},i),transitions:{duration:b,easing:g,create:function(e,r){void 0===e&&(e=["all"]),void 0===r&&(r={});var a=r.duration,n=void 0===a?b.standard:a,t=r.easing,l=void 0===t?g.easeInOut:t,i=r.delay,d=void 0===i?0:i;return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof n?n:"".concat(n,"ms")," ").concat(l," ").concat("string"==typeof d?d:"".concat(d,"ms"))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var r=e/36;return Math.round(10*(4+15*Math.pow(r,.25)+r/5))}},zIndex:{drawer:1200,modal:1300,popOver:1300,tooltip:1500,sideNav:100,toolbar:50,bottomSheet:100}},B=e({},m),p=e(e({},m),{color:e(e({},m.color),{text:e(e({},m.color.text),{secondary:r.link2,tertiary:r.neutral500}),button:{outlinedPrimaryLabel:r.link2,outlinedPrimaryBorder:r.link2,outlinedPrimaryBg:r.neutral100,outlinedSecondaryLabel:r.neutral900,outlinedSecondaryBorder:r.neutral900,outlinedSecondaryBg:r.neutral100,outlinedTertiaryLabel:r.brand,outlinedTertiaryBorder:r.brand,outlinedTertiaryBg:r.neutral100,outlinedDisabledLabel:r.disabledText,outlinedDisabledBg:r.neutral300,containedPrimaryLabel:r.neutral100,containedPrimaryBg:r.link2,containedSecondaryLabel:r.neutral100,containedSecondaryBg:r.neutral900,containedTertiaryLabel:r.neutral100,containedTertiaryBg:r.brand,containedDisabledLabel:r.disabledText,containedDisabledBg:r.neutral300,hover:function(e){var a;return((a={})[r.neutral100]=r.neutral100,a[r.neutral900]=r.neutral900,a[r.neutral900]=r.neutral900,a[r.neutral100]=r.neutral100,a[r.brand]=r.bgPrimaryHover,a[r.neutral100]=r.neutral100,a[r.disabledText]=r.disabledText,a[r.neutral300]=r.neutral300,a[r.neutral100]=r.neutral100,a[r.link2]=r.link2Hover,a[r.neutral100]=r.neutral100,a[r.neutral900]=r.neutral900,a[r.neutral100]=r.neutral100,a[r.disabledText]=r.disabledText,a[r.neutral300]=r.neutral300,a)[e]}},chip:e(e({},m.color.chip),{selectedPrimaryLabel:r.link2,selectedPrimaryBorder:r.link2,selectedPrimaryBg:r.linkBg}),tab:e(e({},m.color.tab),{nonSelectedPrimaryLabel:r.neutral900,selectedPrimaryLabel:r.link2}),background:e(e({},m.color.background),{primary:r.link2,secondary:r.neutral900,tertiary:r.brand}),border:e(e({},m.color.border),{primary:r.link2,secondary:r.neutral900,tertiary:r.brand}),spinner:{primary:r.link2,primaryBg:r.alertBg},calendar:{accent:"",background:"",selected:r.link2}})}),k=c({theme:B,platform:"mobile"}),h=function(r){var a=r.children,n=r.theme,t=void 0===n?"B2C":n,l=r.platform,i=void 0===l?"mobile":l,c=function(e){switch(e){case"B2C":default:return B;case"B2B":return p}}(t);return u(k.Provider,e({value:{theme:c,platform:i}},{children:u(d,e({theme:c},{children:u(o,{children:a})}))}))};h.defaultProps={children:null};var L=function(){return(s(k)||{theme:B}).theme},T=function(){return s(k)};export{p as B2BTheme,B as B2CTheme,m as BaseTheme,k as ThemeContext,h as ThemeProvider,L as useTheme,T as useThemeContext}; | ||
import{__assign as e}from"tslib";import{colors as r,elevation as a,border as n,spacing as t,typography as l,size as i}from"@cleartrip/ct-design-tokens";import{ThemeProvider as u}from"styled-components";import{jsx as d,Fragment as o}from"react/jsx-runtime";import{createContext as c,useContext as b}from"react";var s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},y={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"};var g={enabled:{stroke:r.neutral900},disabled:{stroke:r.neutral500}},m={color:{text:{primary:r.neutral900,secondary:r.brandText,tertiary:r.neutral500,heading:r.neutral900,subHeading:r.neutral700,disabled:r.disabledText,success:r.successText,alert:r.alertText,warning:r.warningText,link:r.linkText,brand:r.brandText,neutral:r.neutral100,link2:r.link2,margarita:r.margarita750},button:{outlinedPrimaryLabel:r.neutral900,outlinedPrimaryBorder:r.neutral900,outlinedPrimaryBg:r.neutral100,outlinedSecondaryLabel:r.brand,outlinedSecondaryBorder:r.brand,outlinedSecondaryBg:r.neutral100,outlinedTertiaryLabel:r.link,outlinedTertiaryBorder:r.link,outlinedTertiaryBg:r.neutral100,outlinedDisabledLabel:r.disabledText,outlinedDisabledBg:r.neutral300,containedPrimaryLabel:r.neutral100,containedPrimaryBg:r.neutral900,containedSecondaryLabel:r.neutral100,containedSecondaryBg:r.brand,containedTertiaryLabel:r.neutral100,containedTertiaryBg:r.link,containedDisabledLabel:r.disabledText,containedDisabledBg:r.neutral300,hover:function(e){var a;return((a={})[r.neutral100]=r.neutral100,a[r.neutral900]=r.neutral900,a[r.neutral900]=r.neutral900,a[r.neutral100]=r.neutral100,a[r.brand]=r.bgPrimaryHover,a[r.neutral100]=r.neutral100,a[r.disabledText]=r.disabledText,a[r.neutral300]=r.neutral300,a[r.neutral100]=r.neutral100,a[r.link2]=r.link2Hover,a[r.neutral100]=r.neutral100,a[r.neutral900]=r.neutral900,a[r.neutral100]=r.neutral100,a[r.disabledText]=r.disabledText,a[r.neutral300]=r.neutral300,a)[e]}},chip:{nonSelectedPrimaryLabel:r.neutral900,disabledPrimaryLabel:r.disabledText,selectedPrimaryLabel:r.neutral900,selectedPrimaryBorder:r.neutral900,selectedPrimaryBg:r.neutral300},dropdown:{shadow:r.shadow},tab:{nonSelectedPrimaryLabel:r.neutral700,selectedPrimaryLabel:r.neutral900},sidenav:{primaryBg:r.neutral900,selectedTabBg:r.highlightBg},tooltip:{primaryBg:r.neutral900},background:{primary:r.neutral900,secondary:r.brand,tertiary:r.link,brand:r.brand,brandLightBg:r.brandBg,link:r.link,link2:r.link2,linkLightBg:r.linkBg,success:r.success,successLightBg:r.successBg,alert:r.alert,alertLightBg:r.alertBg,warning:r.warning,warningLightBg:r.warningBg,neutral:r.neutral100,disabled:r.neutral300,disabledSecondaryLight:r.neutral350,disabledSecondary:r.neutral400,disabledDark:r.disabled100,defaultDark:r.neutral700,defaultDarkest:r.neutral900},border:{primary:r.neutral900,secondary:r.brand,tertiary:r.link,brand:r.brand,neutral:r.neutral900,link:r.link,default:r.line,defaultDark:r.neutral700,disabled:r.neutral500,disabledDark:r.disabled100,warning:r.warning},spinner:{primary:r.neutral700,primaryBg:r.alertBg},coupon:{primaryBg:r.blue100},alert:{success:r.successBg,warning:r.alertBg,info:r.blue100,error:r.orange100,neutral:r.neutral100},badge:{curacao:r.curacao250,pinaColada:r.pinaColada250,margarita250:r.margarita250,default:r.neutral300,green:r.successBg,margarita100:r.margarita100,yellow:r.alertBg,orange100:r.orange100,orange250:r.orange250,red:r.warningBg,green500:r.success500,green600:r.success600,purple100:r.purple100,purple250:r.purple250,gray100:r.gray100,gray250:r.gray250,aqua100:r.aqua100,aqua250:r.aqua250,black:r.black,link:r.link,neutral100:r.neutral100},counter:g,calendar:{accent:r.neutral900,background:r.neutral300,selected:r.neutral900}},elevation:e({},a),border:e({},n),spacing:e({},t),typography:e({},l),size:e({},i),transitions:{duration:s,easing:y,create:function(e,r){void 0===e&&(e=["all"]),void 0===r&&(r={});var a=r.duration,n=void 0===a?s.standard:a,t=r.easing,l=void 0===t?y.easeInOut:t,i=r.delay,u=void 0===i?0:i;return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof n?n:"".concat(n,"ms")," ").concat(l," ").concat("string"==typeof u?u:"".concat(u,"ms"))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var r=e/36;return Math.round(10*(4+15*Math.pow(r,.25)+r/5))}},zIndex:{drawer:1200,modal:1300,popOver:1300,tooltip:1500,sideNav:100,toolbar:50}},p=e({},m),B=e(e({},m),{color:e(e({},m.color),{text:e(e({},m.color.text),{secondary:r.link2,tertiary:r.neutral500}),button:{outlinedPrimaryLabel:r.link2,outlinedPrimaryBorder:r.link2,outlinedPrimaryBg:r.neutral100,outlinedSecondaryLabel:r.neutral900,outlinedSecondaryBorder:r.neutral900,outlinedSecondaryBg:r.neutral100,outlinedTertiaryLabel:r.brand,outlinedTertiaryBorder:r.brand,outlinedTertiaryBg:r.neutral100,outlinedDisabledLabel:r.disabledText,outlinedDisabledBg:r.neutral300,containedPrimaryLabel:r.neutral100,containedPrimaryBg:r.link2,containedSecondaryLabel:r.neutral100,containedSecondaryBg:r.neutral900,containedTertiaryLabel:r.neutral100,containedTertiaryBg:r.brand,containedDisabledLabel:r.disabledText,containedDisabledBg:r.neutral300,hover:function(e){var a;return((a={})[r.neutral100]=r.neutral100,a[r.neutral900]=r.neutral900,a[r.neutral900]=r.neutral900,a[r.neutral100]=r.neutral100,a[r.brand]=r.bgPrimaryHover,a[r.neutral100]=r.neutral100,a[r.disabledText]=r.disabledText,a[r.neutral300]=r.neutral300,a[r.neutral100]=r.neutral100,a[r.link2]=r.link2Hover,a[r.neutral100]=r.neutral100,a[r.neutral900]=r.neutral900,a[r.neutral100]=r.neutral100,a[r.disabledText]=r.disabledText,a[r.neutral300]=r.neutral300,a)[e]}},chip:e(e({},m.color.chip),{selectedPrimaryLabel:r.link2,selectedPrimaryBorder:r.link2,selectedPrimaryBg:r.linkBg}),tab:e(e({},m.color.tab),{nonSelectedPrimaryLabel:r.neutral900,selectedPrimaryLabel:r.link2}),background:e(e({},m.color.background),{primary:r.link2,secondary:r.neutral900,tertiary:r.brand}),border:e(e({},m.color.border),{primary:r.link2,secondary:r.neutral900,tertiary:r.brand}),spinner:{primary:r.link2,primaryBg:r.alertBg},calendar:{accent:"",background:"",selected:r.link2}})}),k={enabled:{stroke:r.bluePrimary500},disabled:{stroke:r.neutral500}},P=e(e({},m),{color:e(e({},m.color),{text:e(e({},m.color.text),{link:r.bluePrimary500}),button:e(e({},m.color.button),{outlinedPrimaryLabel:r.primaryNeutral900,outlinedPrimaryBg:r.neutral100,containedPrimaryLabel:r.neutral100,containedPrimaryBg:r.bluePrimary500,containedSecondaryLabel:r.primaryNeutral900,containedSecondaryBg:r.yellowSecondary,hover:function(e){var a;return((a={})[r.neutral100]=r.neutral100,a[r.neutral900]=r.neutral900,a[r.neutral900]=r.neutral900,a[r.neutral100]=r.neutral100,a[r.brand]=r.bgPrimaryHover,a[r.neutral100]=r.neutral100,a[r.disabledText]=r.disabledText,a[r.neutral300]=r.neutral300,a[r.neutral100]=r.neutral100,a[r.link2]=r.link2Hover,a[r.neutral100]=r.neutral100,a[r.neutral900]=r.neutral900,a[r.neutral100]=r.neutral100,a[r.disabledText]=r.disabledText,a[r.neutral300]=r.neutral300,a)[e]}}),chip:e(e({},m.color.chip),{selectedPrimaryLabel:r.link2,selectedPrimaryBorder:r.link2,selectedPrimaryBg:r.linkBg,nonSelectedPrimaryLabel:r.neutral900}),tab:e(e({},m.color.tab),{nonSelectedPrimaryLabel:r.neutral900,selectedPrimaryLabel:r.bluePrimary500}),background:e(e({},m.color.background),{primary:r.bluePrimary500,secondary:r.neutral900,tertiary:r.brand,linkLightBg:r.blueSecondary}),border:e(e({},m.color.border),{primary:r.bluePrimary500,brand:r.bluePrimary500}),spinner:{primary:r.link2,primaryBg:r.alertBg},counter:k,calendar:{accent:r.bluePrimary500,background:r.blueSecondary,selected:r.bluePrimary500}})}),h=c({theme:p,platform:"mobile",themeType:"B2C"}),L=function(r){var a=r.children,n=r.theme,t=void 0===n?"B2C":n,l=r.platform,i=void 0===l?"mobile":l,c=function(e){switch(e){case"B2C":default:return p;case"B2B":return B;case"FK":return P}}(t);return d(h.Provider,e({value:{theme:c,platform:i,themeType:t}},{children:d(u,e({theme:c},{children:d(o,{children:a})}))}))};L.defaultProps={children:null};var T=function(){return(b(h)||{theme:p}).theme},v=function(){return b(h)};export{B as B2BTheme,p as B2CTheme,m as BaseTheme,P as FKTheme,h as ThemeContext,L as ThemeProvider,T as useTheme,v as useThemeContext}; | ||
//# sourceMappingURL=ct-design-theme.browser.esm.js.map |
@@ -41,3 +41,3 @@ 'use strict'; | ||
}; | ||
var hover$1 = function (key) { | ||
var hover$2 = function (key) { | ||
var _a; | ||
@@ -70,5 +70,4 @@ var bg = (_a = {}, | ||
toolbar: 50, | ||
bottomSheet: 100, | ||
}; | ||
var counter = { | ||
var counter$1 = { | ||
enabled: { | ||
@@ -119,3 +118,3 @@ stroke: ctDesignTokens.colors.neutral900, | ||
containedDisabledBg: ctDesignTokens.colors.neutral300, | ||
hover: hover$1, | ||
hover: hover$2, | ||
}, | ||
@@ -183,6 +182,2 @@ chip: { | ||
}, | ||
shimmer: { | ||
disabledLight: ctDesignTokens.colors.disabledLight, | ||
disabledDark: ctDesignTokens.colors.disabled250, | ||
}, | ||
coupon: { | ||
@@ -221,3 +216,3 @@ primaryBg: ctDesignTokens.colors.blue100, | ||
}, | ||
counter: counter, | ||
counter: counter$1, | ||
calendar: { | ||
@@ -245,3 +240,3 @@ accent: ctDesignTokens.colors.neutral900, | ||
var hover = function (key) { | ||
var hover$1 = function (key) { | ||
var _a; | ||
@@ -287,3 +282,3 @@ var bg = (_a = {}, | ||
containedDisabledBg: ctDesignTokens.colors.neutral300, | ||
hover: hover, | ||
hover: hover$1, | ||
}, chip: tslib.__assign(tslib.__assign({}, BaseTheme.color.chip), { selectedPrimaryLabel: ctDesignTokens.colors.link2, selectedPrimaryBorder: ctDesignTokens.colors.link2, selectedPrimaryBg: ctDesignTokens.colors.linkBg }), tab: tslib.__assign(tslib.__assign({}, BaseTheme.color.tab), { nonSelectedPrimaryLabel: ctDesignTokens.colors.neutral900, selectedPrimaryLabel: ctDesignTokens.colors.link2 }), background: tslib.__assign(tslib.__assign({}, BaseTheme.color.background), { primary: ctDesignTokens.colors.link2, secondary: ctDesignTokens.colors.neutral900, tertiary: ctDesignTokens.colors.brand }), border: tslib.__assign(tslib.__assign({}, BaseTheme.color.border), { primary: ctDesignTokens.colors.link2, secondary: ctDesignTokens.colors.neutral900, tertiary: ctDesignTokens.colors.brand }), spinner: { | ||
@@ -298,2 +293,40 @@ primary: ctDesignTokens.colors.link2, | ||
var hover = function (key) { | ||
var _a; | ||
var bg = (_a = {}, | ||
_a[ctDesignTokens.colors.neutral100] = ctDesignTokens.colors.neutral100, | ||
_a[ctDesignTokens.colors.neutral900] = ctDesignTokens.colors.neutral900, | ||
_a[ctDesignTokens.colors.neutral900] = ctDesignTokens.colors.neutral900, | ||
_a[ctDesignTokens.colors.neutral100] = ctDesignTokens.colors.neutral100, | ||
_a[ctDesignTokens.colors.brand] = ctDesignTokens.colors.bgPrimaryHover, | ||
_a[ctDesignTokens.colors.neutral100] = ctDesignTokens.colors.neutral100, | ||
_a[ctDesignTokens.colors.disabledText] = ctDesignTokens.colors.disabledText, | ||
_a[ctDesignTokens.colors.neutral300] = ctDesignTokens.colors.neutral300, | ||
_a[ctDesignTokens.colors.neutral100] = ctDesignTokens.colors.neutral100, | ||
_a[ctDesignTokens.colors.link2] = ctDesignTokens.colors.link2Hover, | ||
_a[ctDesignTokens.colors.neutral100] = ctDesignTokens.colors.neutral100, | ||
_a[ctDesignTokens.colors.neutral900] = ctDesignTokens.colors.neutral900, | ||
_a[ctDesignTokens.colors.neutral100] = ctDesignTokens.colors.neutral100, | ||
_a[ctDesignTokens.colors.disabledText] = ctDesignTokens.colors.disabledText, | ||
_a[ctDesignTokens.colors.neutral300] = ctDesignTokens.colors.neutral300, | ||
_a); | ||
return bg[key]; | ||
}; | ||
var counter = { | ||
enabled: { | ||
stroke: ctDesignTokens.colors.bluePrimary500, | ||
}, | ||
disabled: { | ||
stroke: ctDesignTokens.colors.neutral500, | ||
}, | ||
}; | ||
var FKTheme = tslib.__assign(tslib.__assign({}, BaseTheme), { color: tslib.__assign(tslib.__assign({}, BaseTheme.color), { text: tslib.__assign(tslib.__assign({}, BaseTheme.color.text), { link: ctDesignTokens.colors.bluePrimary500 }), button: tslib.__assign(tslib.__assign({}, BaseTheme.color.button), { outlinedPrimaryLabel: ctDesignTokens.colors.primaryNeutral900, outlinedPrimaryBg: ctDesignTokens.colors.neutral100, containedPrimaryLabel: ctDesignTokens.colors.neutral100, containedPrimaryBg: ctDesignTokens.colors.bluePrimary500, containedSecondaryLabel: ctDesignTokens.colors.primaryNeutral900, containedSecondaryBg: ctDesignTokens.colors.yellowSecondary, hover: hover }), chip: tslib.__assign(tslib.__assign({}, BaseTheme.color.chip), { selectedPrimaryLabel: ctDesignTokens.colors.link2, selectedPrimaryBorder: ctDesignTokens.colors.link2, selectedPrimaryBg: ctDesignTokens.colors.linkBg, nonSelectedPrimaryLabel: ctDesignTokens.colors.neutral900 }), tab: tslib.__assign(tslib.__assign({}, BaseTheme.color.tab), { nonSelectedPrimaryLabel: ctDesignTokens.colors.neutral900, selectedPrimaryLabel: ctDesignTokens.colors.bluePrimary500 }), background: tslib.__assign(tslib.__assign({}, BaseTheme.color.background), { primary: ctDesignTokens.colors.bluePrimary500, secondary: ctDesignTokens.colors.neutral900, tertiary: ctDesignTokens.colors.brand, linkLightBg: ctDesignTokens.colors.blueSecondary }), border: tslib.__assign(tslib.__assign({}, BaseTheme.color.border), { primary: ctDesignTokens.colors.bluePrimary500, brand: ctDesignTokens.colors.bluePrimary500 }), spinner: { | ||
primary: ctDesignTokens.colors.link2, | ||
primaryBg: ctDesignTokens.colors.alertBg, | ||
}, counter: counter, calendar: { | ||
accent: ctDesignTokens.colors.bluePrimary500, | ||
background: ctDesignTokens.colors.blueSecondary, | ||
selected: ctDesignTokens.colors.bluePrimary500, | ||
} }) }); | ||
var getTheme = function (themeType) { | ||
@@ -307,2 +340,5 @@ switch (themeType) { | ||
} | ||
case 'FK': { | ||
return FKTheme; | ||
} | ||
default: { | ||
@@ -317,2 +353,3 @@ return B2CTheme; | ||
platform: 'mobile', | ||
themeType: 'B2C', | ||
}); | ||
@@ -322,3 +359,3 @@ var ThemeProvider = function (_a) { | ||
var theme = getTheme(themeType); | ||
return (jsxRuntime.jsx(ThemeContext.Provider, tslib.__assign({ value: { theme: theme, platform: platform } }, { children: jsxRuntime.jsx(styledComponents.ThemeProvider, tslib.__assign({ theme: theme }, { children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: children }) })) }))); | ||
return (jsxRuntime.jsx(ThemeContext.Provider, tslib.__assign({ value: { theme: theme, platform: platform, themeType: themeType } }, { children: jsxRuntime.jsx(styledComponents.ThemeProvider, tslib.__assign({ theme: theme }, { children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: children }) })) }))); | ||
}; | ||
@@ -342,2 +379,3 @@ ThemeProvider.defaultProps = { | ||
exports.BaseTheme = BaseTheme; | ||
exports.FKTheme = FKTheme; | ||
exports.ThemeContext = ThemeContext; | ||
@@ -344,0 +382,0 @@ exports.ThemeProvider = ThemeProvider; |
@@ -39,3 +39,3 @@ import { __assign } from 'tslib'; | ||
}; | ||
var hover$1 = function (key) { | ||
var hover$2 = function (key) { | ||
var _a; | ||
@@ -68,5 +68,4 @@ var bg = (_a = {}, | ||
toolbar: 50, | ||
bottomSheet: 100, | ||
}; | ||
var counter = { | ||
var counter$1 = { | ||
enabled: { | ||
@@ -117,3 +116,3 @@ stroke: colors.neutral900, | ||
containedDisabledBg: colors.neutral300, | ||
hover: hover$1, | ||
hover: hover$2, | ||
}, | ||
@@ -181,6 +180,2 @@ chip: { | ||
}, | ||
shimmer: { | ||
disabledLight: colors.disabledLight, | ||
disabledDark: colors.disabled250, | ||
}, | ||
coupon: { | ||
@@ -219,3 +214,3 @@ primaryBg: colors.blue100, | ||
}, | ||
counter: counter, | ||
counter: counter$1, | ||
calendar: { | ||
@@ -243,3 +238,3 @@ accent: colors.neutral900, | ||
var hover = function (key) { | ||
var hover$1 = function (key) { | ||
var _a; | ||
@@ -285,3 +280,3 @@ var bg = (_a = {}, | ||
containedDisabledBg: colors.neutral300, | ||
hover: hover, | ||
hover: hover$1, | ||
}, chip: __assign(__assign({}, BaseTheme.color.chip), { selectedPrimaryLabel: colors.link2, selectedPrimaryBorder: colors.link2, selectedPrimaryBg: colors.linkBg }), tab: __assign(__assign({}, BaseTheme.color.tab), { nonSelectedPrimaryLabel: colors.neutral900, selectedPrimaryLabel: colors.link2 }), background: __assign(__assign({}, BaseTheme.color.background), { primary: colors.link2, secondary: colors.neutral900, tertiary: colors.brand }), border: __assign(__assign({}, BaseTheme.color.border), { primary: colors.link2, secondary: colors.neutral900, tertiary: colors.brand }), spinner: { | ||
@@ -296,2 +291,40 @@ primary: colors.link2, | ||
var hover = function (key) { | ||
var _a; | ||
var bg = (_a = {}, | ||
_a[colors.neutral100] = colors.neutral100, | ||
_a[colors.neutral900] = colors.neutral900, | ||
_a[colors.neutral900] = colors.neutral900, | ||
_a[colors.neutral100] = colors.neutral100, | ||
_a[colors.brand] = colors.bgPrimaryHover, | ||
_a[colors.neutral100] = colors.neutral100, | ||
_a[colors.disabledText] = colors.disabledText, | ||
_a[colors.neutral300] = colors.neutral300, | ||
_a[colors.neutral100] = colors.neutral100, | ||
_a[colors.link2] = colors.link2Hover, | ||
_a[colors.neutral100] = colors.neutral100, | ||
_a[colors.neutral900] = colors.neutral900, | ||
_a[colors.neutral100] = colors.neutral100, | ||
_a[colors.disabledText] = colors.disabledText, | ||
_a[colors.neutral300] = colors.neutral300, | ||
_a); | ||
return bg[key]; | ||
}; | ||
var counter = { | ||
enabled: { | ||
stroke: colors.bluePrimary500, | ||
}, | ||
disabled: { | ||
stroke: colors.neutral500, | ||
}, | ||
}; | ||
var FKTheme = __assign(__assign({}, BaseTheme), { color: __assign(__assign({}, BaseTheme.color), { text: __assign(__assign({}, BaseTheme.color.text), { link: colors.bluePrimary500 }), button: __assign(__assign({}, BaseTheme.color.button), { outlinedPrimaryLabel: colors.primaryNeutral900, outlinedPrimaryBg: colors.neutral100, containedPrimaryLabel: colors.neutral100, containedPrimaryBg: colors.bluePrimary500, containedSecondaryLabel: colors.primaryNeutral900, containedSecondaryBg: colors.yellowSecondary, hover: hover }), chip: __assign(__assign({}, BaseTheme.color.chip), { selectedPrimaryLabel: colors.link2, selectedPrimaryBorder: colors.link2, selectedPrimaryBg: colors.linkBg, nonSelectedPrimaryLabel: colors.neutral900 }), tab: __assign(__assign({}, BaseTheme.color.tab), { nonSelectedPrimaryLabel: colors.neutral900, selectedPrimaryLabel: colors.bluePrimary500 }), background: __assign(__assign({}, BaseTheme.color.background), { primary: colors.bluePrimary500, secondary: colors.neutral900, tertiary: colors.brand, linkLightBg: colors.blueSecondary }), border: __assign(__assign({}, BaseTheme.color.border), { primary: colors.bluePrimary500, brand: colors.bluePrimary500 }), spinner: { | ||
primary: colors.link2, | ||
primaryBg: colors.alertBg, | ||
}, counter: counter, calendar: { | ||
accent: colors.bluePrimary500, | ||
background: colors.blueSecondary, | ||
selected: colors.bluePrimary500, | ||
} }) }); | ||
var getTheme = function (themeType) { | ||
@@ -305,2 +338,5 @@ switch (themeType) { | ||
} | ||
case 'FK': { | ||
return FKTheme; | ||
} | ||
default: { | ||
@@ -315,2 +351,3 @@ return B2CTheme; | ||
platform: 'mobile', | ||
themeType: 'B2C', | ||
}); | ||
@@ -320,3 +357,3 @@ var ThemeProvider = function (_a) { | ||
var theme = getTheme(themeType); | ||
return (jsx(ThemeContext.Provider, __assign({ value: { theme: theme, platform: platform } }, { children: jsx(ThemeProvider$1, __assign({ theme: theme }, { children: jsx(Fragment, { children: children }) })) }))); | ||
return (jsx(ThemeContext.Provider, __assign({ value: { theme: theme, platform: platform, themeType: themeType } }, { children: jsx(ThemeProvider$1, __assign({ theme: theme }, { children: jsx(Fragment, { children: children }) })) }))); | ||
}; | ||
@@ -337,3 +374,3 @@ ThemeProvider.defaultProps = { | ||
export { B2BTheme, B2CTheme, BaseTheme, ThemeContext, ThemeProvider, useTheme, useThemeContext }; | ||
export { B2BTheme, B2CTheme, BaseTheme, FKTheme, ThemeContext, ThemeProvider, useTheme, useThemeContext }; | ||
//# sourceMappingURL=ct-design-theme.esm.js.map |
@@ -70,3 +70,3 @@ (function (global, factory) { | ||
}; | ||
var hover$1 = function (key) { | ||
var hover$2 = function (key) { | ||
var _a; | ||
@@ -99,5 +99,4 @@ var bg = (_a = {}, | ||
toolbar: 50, | ||
bottomSheet: 100, | ||
}; | ||
var counter = { | ||
var counter$1 = { | ||
enabled: { | ||
@@ -148,3 +147,3 @@ stroke: ctDesignTokens.colors.neutral900, | ||
containedDisabledBg: ctDesignTokens.colors.neutral300, | ||
hover: hover$1, | ||
hover: hover$2, | ||
}, | ||
@@ -212,6 +211,2 @@ chip: { | ||
}, | ||
shimmer: { | ||
disabledLight: ctDesignTokens.colors.disabledLight, | ||
disabledDark: ctDesignTokens.colors.disabled250, | ||
}, | ||
coupon: { | ||
@@ -250,3 +245,3 @@ primaryBg: ctDesignTokens.colors.blue100, | ||
}, | ||
counter: counter, | ||
counter: counter$1, | ||
calendar: { | ||
@@ -274,3 +269,3 @@ accent: ctDesignTokens.colors.neutral900, | ||
var hover = function (key) { | ||
var hover$1 = function (key) { | ||
var _a; | ||
@@ -316,3 +311,3 @@ var bg = (_a = {}, | ||
containedDisabledBg: ctDesignTokens.colors.neutral300, | ||
hover: hover, | ||
hover: hover$1, | ||
}, chip: __assign(__assign({}, BaseTheme.color.chip), { selectedPrimaryLabel: ctDesignTokens.colors.link2, selectedPrimaryBorder: ctDesignTokens.colors.link2, selectedPrimaryBg: ctDesignTokens.colors.linkBg }), tab: __assign(__assign({}, BaseTheme.color.tab), { nonSelectedPrimaryLabel: ctDesignTokens.colors.neutral900, selectedPrimaryLabel: ctDesignTokens.colors.link2 }), background: __assign(__assign({}, BaseTheme.color.background), { primary: ctDesignTokens.colors.link2, secondary: ctDesignTokens.colors.neutral900, tertiary: ctDesignTokens.colors.brand }), border: __assign(__assign({}, BaseTheme.color.border), { primary: ctDesignTokens.colors.link2, secondary: ctDesignTokens.colors.neutral900, tertiary: ctDesignTokens.colors.brand }), spinner: { | ||
@@ -327,2 +322,40 @@ primary: ctDesignTokens.colors.link2, | ||
var hover = function (key) { | ||
var _a; | ||
var bg = (_a = {}, | ||
_a[ctDesignTokens.colors.neutral100] = ctDesignTokens.colors.neutral100, | ||
_a[ctDesignTokens.colors.neutral900] = ctDesignTokens.colors.neutral900, | ||
_a[ctDesignTokens.colors.neutral900] = ctDesignTokens.colors.neutral900, | ||
_a[ctDesignTokens.colors.neutral100] = ctDesignTokens.colors.neutral100, | ||
_a[ctDesignTokens.colors.brand] = ctDesignTokens.colors.bgPrimaryHover, | ||
_a[ctDesignTokens.colors.neutral100] = ctDesignTokens.colors.neutral100, | ||
_a[ctDesignTokens.colors.disabledText] = ctDesignTokens.colors.disabledText, | ||
_a[ctDesignTokens.colors.neutral300] = ctDesignTokens.colors.neutral300, | ||
_a[ctDesignTokens.colors.neutral100] = ctDesignTokens.colors.neutral100, | ||
_a[ctDesignTokens.colors.link2] = ctDesignTokens.colors.link2Hover, | ||
_a[ctDesignTokens.colors.neutral100] = ctDesignTokens.colors.neutral100, | ||
_a[ctDesignTokens.colors.neutral900] = ctDesignTokens.colors.neutral900, | ||
_a[ctDesignTokens.colors.neutral100] = ctDesignTokens.colors.neutral100, | ||
_a[ctDesignTokens.colors.disabledText] = ctDesignTokens.colors.disabledText, | ||
_a[ctDesignTokens.colors.neutral300] = ctDesignTokens.colors.neutral300, | ||
_a); | ||
return bg[key]; | ||
}; | ||
var counter = { | ||
enabled: { | ||
stroke: ctDesignTokens.colors.bluePrimary500, | ||
}, | ||
disabled: { | ||
stroke: ctDesignTokens.colors.neutral500, | ||
}, | ||
}; | ||
var FKTheme = __assign(__assign({}, BaseTheme), { color: __assign(__assign({}, BaseTheme.color), { text: __assign(__assign({}, BaseTheme.color.text), { link: ctDesignTokens.colors.bluePrimary500 }), button: __assign(__assign({}, BaseTheme.color.button), { outlinedPrimaryLabel: ctDesignTokens.colors.primaryNeutral900, outlinedPrimaryBg: ctDesignTokens.colors.neutral100, containedPrimaryLabel: ctDesignTokens.colors.neutral100, containedPrimaryBg: ctDesignTokens.colors.bluePrimary500, containedSecondaryLabel: ctDesignTokens.colors.primaryNeutral900, containedSecondaryBg: ctDesignTokens.colors.yellowSecondary, hover: hover }), chip: __assign(__assign({}, BaseTheme.color.chip), { selectedPrimaryLabel: ctDesignTokens.colors.link2, selectedPrimaryBorder: ctDesignTokens.colors.link2, selectedPrimaryBg: ctDesignTokens.colors.linkBg, nonSelectedPrimaryLabel: ctDesignTokens.colors.neutral900 }), tab: __assign(__assign({}, BaseTheme.color.tab), { nonSelectedPrimaryLabel: ctDesignTokens.colors.neutral900, selectedPrimaryLabel: ctDesignTokens.colors.bluePrimary500 }), background: __assign(__assign({}, BaseTheme.color.background), { primary: ctDesignTokens.colors.bluePrimary500, secondary: ctDesignTokens.colors.neutral900, tertiary: ctDesignTokens.colors.brand, linkLightBg: ctDesignTokens.colors.blueSecondary }), border: __assign(__assign({}, BaseTheme.color.border), { primary: ctDesignTokens.colors.bluePrimary500, brand: ctDesignTokens.colors.bluePrimary500 }), spinner: { | ||
primary: ctDesignTokens.colors.link2, | ||
primaryBg: ctDesignTokens.colors.alertBg, | ||
}, counter: counter, calendar: { | ||
accent: ctDesignTokens.colors.bluePrimary500, | ||
background: ctDesignTokens.colors.blueSecondary, | ||
selected: ctDesignTokens.colors.bluePrimary500, | ||
} }) }); | ||
var getTheme = function (themeType) { | ||
@@ -336,2 +369,5 @@ switch (themeType) { | ||
} | ||
case 'FK': { | ||
return FKTheme; | ||
} | ||
default: { | ||
@@ -346,2 +382,3 @@ return B2CTheme; | ||
platform: 'mobile', | ||
themeType: 'B2C', | ||
}); | ||
@@ -351,3 +388,3 @@ var ThemeProvider = function (_a) { | ||
var theme = getTheme(themeType); | ||
return (jsxRuntime.jsx(ThemeContext.Provider, __assign({ value: { theme: theme, platform: platform } }, { children: jsxRuntime.jsx(styledComponents.ThemeProvider, __assign({ theme: theme }, { children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: children }) })) }))); | ||
return (jsxRuntime.jsx(ThemeContext.Provider, __assign({ value: { theme: theme, platform: platform, themeType: themeType } }, { children: jsxRuntime.jsx(styledComponents.ThemeProvider, __assign({ theme: theme }, { children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: children }) })) }))); | ||
}; | ||
@@ -371,2 +408,3 @@ ThemeProvider.defaultProps = { | ||
exports.BaseTheme = BaseTheme; | ||
exports.FKTheme = FKTheme; | ||
exports.ThemeContext = ThemeContext; | ||
@@ -373,0 +411,0 @@ exports.ThemeProvider = ThemeProvider; |
@@ -7,2 +7,3 @@ import { ReactNode } from 'react'; | ||
platform: PlatformType; | ||
themeType: ThemeType; | ||
}; | ||
@@ -9,0 +10,0 @@ export interface ThemeProviderProps { |
@@ -102,6 +102,2 @@ declare const B2CTheme: { | ||
}; | ||
shimmer: { | ||
disabledLight: string; | ||
disabledDark: string; | ||
}; | ||
counter: { | ||
@@ -225,5 +221,5 @@ enabled: { | ||
}; | ||
zIndex: Record<"modal" | "drawer" | "tooltip" | "popOver" | "sideNav" | "toolbar" | "bottomSheet", number>; | ||
zIndex: Record<"modal" | "drawer" | "tooltip" | "popOver" | "sideNav" | "toolbar", number>; | ||
}; | ||
export default B2CTheme; | ||
//# sourceMappingURL=B2CTheme.d.ts.map |
export { default as B2CTheme } from './B2CTheme'; | ||
export { default as B2BTheme } from './B2BTheme'; | ||
export { default as FKTheme } from './UltraFkTheme'; | ||
export { default as BaseTheme } from './BaseTheme'; | ||
export * from './type'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -107,6 +107,2 @@ import 'styled-components'; | ||
}; | ||
shimmer: { | ||
disabledLight: string; | ||
disabledDark: string; | ||
}; | ||
counter: { | ||
@@ -183,3 +179,3 @@ enabled: { | ||
}; | ||
zIndex: Record<'modal' | 'drawer' | 'tooltip' | 'popOver' | 'sideNav' | 'toolbar' | 'bottomSheet', number>; | ||
zIndex: Record<'modal' | 'drawer' | 'tooltip' | 'popOver' | 'sideNav' | 'toolbar', number>; | ||
}; | ||
@@ -190,3 +186,3 @@ declare module 'styled-components' { | ||
} | ||
export type ThemeType = 'B2C' | 'B2B'; | ||
export type ThemeType = 'B2C' | 'B2B' | 'FK'; | ||
//# sourceMappingURL=type.d.ts.map |
{ | ||
"name": "@cleartrip/ct-design-theme", | ||
"version": "3.2.0-SNAPSHOT-shimmer-bbottomsheet.0", | ||
"version": "3.2.0", | ||
"description": "", | ||
@@ -18,3 +18,3 @@ "types": "dist/index.d.ts", | ||
"dependencies": { | ||
"@cleartrip/ct-design-tokens": "3.2.0-SNAPSHOT-shimmer-bbottomsheet.0" | ||
"@cleartrip/ct-design-tokens": "3.2.0" | ||
}, | ||
@@ -21,0 +21,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
189032
8512
39
1679
2
3
127
+ Added@cleartrip/ct-design-tokens@3.2.0(transitive)
- Removed@cleartrip/ct-design-tokens@3.2.0-SNAPSHOT-shimmer-bbottomsheet.0(transitive)