@cleartrip/ct-design-theme
Advanced tools
Comparing version 2.11.0 to 2.12.0-SANPSHOT-badgecolor.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"),n={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},s={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 t={enabled:{stroke:o.colors.neutral900},disabled:{stroke:o.colors.neutral500}},c={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},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},counter:t},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:n,easing:s,create:function(r,o){void 0===r&&(r=["all"]),void 0===o&&(o={});var e=o.duration,l=void 0===e?n.standard:e,a=o.easing,t=void 0===a?s.easeInOut:a,c=o.delay,i=void 0===c?0:c;return(Array.isArray(r)?r:[r]).map((function(r){return"".concat(r," ").concat("string"==typeof l?l:"".concat(l,"ms")," ").concat(t," ").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({},c),d=r.__assign(r.__assign({},c),{color:r.__assign(r.__assign({},c.color),{text:r.__assign(r.__assign({},c.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({},c.color.chip),{selectedPrimaryLabel:o.colors.link2,selectedPrimaryBorder:o.colors.link2,selectedPrimaryBg:o.colors.linkBg}),tab:r.__assign(r.__assign({},c.color.tab),{nonSelectedPrimaryLabel:o.colors.neutral900,selectedPrimaryLabel:o.colors.link2}),background:r.__assign(r.__assign({},c.color.background),{primary:o.colors.link2,secondary:o.colors.neutral900,tertiary:o.colors.brand}),border:r.__assign(r.__assign({},c.color.border),{primary:o.colors.link2,secondary:o.colors.neutral900,tertiary:o.colors.brand}),spinner:{primary:o.colors.link2,primaryBg:o.colors.alertBg}})}),u=a.createContext({theme:i,platform:"mobile"}),g=function(o){var a=o.children,n=o.theme,s=void 0===n?"B2C":n,t=o.platform,c=void 0===t?"mobile":t,g=function(r){switch(r){case"B2C":default:return i;case"B2B":return d}}(s);return l.jsx(u.Provider,r.__assign({value:{theme:g,platform:c}},{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=c,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"),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 t={enabled:{stroke:o.colors.neutral900},disabled:{stroke:o.colors.neutral500}},c={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},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},counter:t},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,t=void 0===a?n.easeInOut:a,c=o.delay,i=void 0===c?0:c;return(Array.isArray(r)?r:[r]).map((function(r){return"".concat(r," ").concat("string"==typeof l?l:"".concat(l,"ms")," ").concat(t," ").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({},c),d=r.__assign(r.__assign({},c),{color:r.__assign(r.__assign({},c.color),{text:r.__assign(r.__assign({},c.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({},c.color.chip),{selectedPrimaryLabel:o.colors.link2,selectedPrimaryBorder:o.colors.link2,selectedPrimaryBg:o.colors.linkBg}),tab:r.__assign(r.__assign({},c.color.tab),{nonSelectedPrimaryLabel:o.colors.neutral900,selectedPrimaryLabel:o.colors.link2}),background:r.__assign(r.__assign({},c.color.background),{primary:o.colors.link2,secondary:o.colors.neutral900,tertiary:o.colors.brand}),border:r.__assign(r.__assign({},c.color.border),{primary:o.colors.link2,secondary:o.colors.neutral900,tertiary:o.colors.brand}),spinner:{primary:o.colors.link2,primaryBg:o.colors.alertBg}})}),u=a.createContext({theme:i,platform:"mobile"}),g=function(o){var a=o.children,s=o.theme,n=void 0===s?"B2C":s,t=o.platform,c=void 0===t?"mobile":t,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:c}},{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=c,exports.ThemeContext=u,exports.ThemeProvider=g,exports.useTheme=function(){return(a.useContext(u)||{theme:i}).theme},exports.useThemeContext=function(){return a.useContext(u)}; | ||
//# 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},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},counter:y},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}},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}})}),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 T=function(){return(s(k)||{theme:B}).theme},L=function(){return s(k)};export{p as B2BTheme,B as B2CTheme,m as BaseTheme,k as ThemeContext,h as ThemeProvider,T as useTheme,L 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 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},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},counter:y},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}},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}})}),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 T=function(){return(s(k)||{theme:B}).theme},L=function(){return s(k)};export{p as B2BTheme,B as B2CTheme,m as BaseTheme,k as ThemeContext,h as ThemeProvider,T as useTheme,L as useThemeContext}; | ||
//# sourceMappingURL=ct-design-theme.browser.esm.js.map |
@@ -202,2 +202,10 @@ 'use strict'; | ||
green600: ctDesignTokens.colors.success600, | ||
purple100: ctDesignTokens.colors.purple100, | ||
purple250: ctDesignTokens.colors.purple250, | ||
gray100: ctDesignTokens.colors.gray100, | ||
gray250: ctDesignTokens.colors.gray250, | ||
aqua100: ctDesignTokens.colors.aqua100, | ||
aqua250: ctDesignTokens.colors.aqua250, | ||
black: ctDesignTokens.colors.black, | ||
link: ctDesignTokens.colors.link, | ||
}, | ||
@@ -204,0 +212,0 @@ counter: counter, |
@@ -200,2 +200,10 @@ import { __assign } from 'tslib'; | ||
green600: colors.success600, | ||
purple100: colors.purple100, | ||
purple250: colors.purple250, | ||
gray100: colors.gray100, | ||
gray250: colors.gray250, | ||
aqua100: colors.aqua100, | ||
aqua250: colors.aqua250, | ||
black: colors.black, | ||
link: colors.link, | ||
}, | ||
@@ -202,0 +210,0 @@ counter: counter, |
@@ -231,2 +231,10 @@ (function (global, factory) { | ||
green600: ctDesignTokens.colors.success600, | ||
purple100: ctDesignTokens.colors.purple100, | ||
purple250: ctDesignTokens.colors.purple250, | ||
gray100: ctDesignTokens.colors.gray100, | ||
gray250: ctDesignTokens.colors.gray250, | ||
aqua100: ctDesignTokens.colors.aqua100, | ||
aqua250: ctDesignTokens.colors.aqua250, | ||
black: ctDesignTokens.colors.black, | ||
link: ctDesignTokens.colors.link, | ||
}, | ||
@@ -233,0 +241,0 @@ counter: counter, |
@@ -133,2 +133,10 @@ declare const B2CTheme: { | ||
green600: string; | ||
purple100: string; | ||
purple250: string; | ||
gray100: string; | ||
gray250: string; | ||
aqua100: string; | ||
aqua250: string; | ||
black: string; | ||
link: string; | ||
}; | ||
@@ -135,0 +143,0 @@ }; |
@@ -138,2 +138,10 @@ import 'styled-components'; | ||
green600: string; | ||
purple100: string; | ||
purple250: string; | ||
gray100: string; | ||
gray250: string; | ||
aqua100: string; | ||
aqua250: string; | ||
black: string; | ||
link: string; | ||
}; | ||
@@ -140,0 +148,0 @@ }; |
{ | ||
"name": "@cleartrip/ct-design-theme", | ||
"version": "2.11.0", | ||
"version": "2.12.0-SANPSHOT-badgecolor.0", | ||
"description": "", | ||
@@ -18,3 +18,3 @@ "types": "dist/index.d.ts", | ||
"dependencies": { | ||
"@cleartrip/ct-design-tokens": "2.11.0" | ||
"@cleartrip/ct-design-tokens": "2.12.0-SANPSHOT-badgecolor.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
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
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
159469
1476
3
16
+ Added@cleartrip/ct-design-tokens@2.12.0-SANPSHOT-badgecolor.0(transitive)
- Removed@cleartrip/ct-design-tokens@2.11.0(transitive)
Updated@cleartrip/ct-design-tokens@2.12.0-SANPSHOT-badgecolor.0