@jupyterlab/ui-components
Advanced tools
Comparing version 2.0.0-alpha.0 to 2.0.0-alpha.1
@@ -61,3 +61,3 @@ // Copyright (c) Jupyter Development Team. | ||
container.textContent = title || ''; | ||
container.className = classes(name, className, propsStyle ? iconStyleFlat(propsStyle) : ''); | ||
container.className = classes(name, className); | ||
return container; | ||
@@ -124,3 +124,3 @@ } | ||
if (fallback) { | ||
return (React.createElement(Tag, { className: classes(name, className, propsStyle ? iconStyleFlat(propsStyle) : '') }, title || '')); | ||
return React.createElement(Tag, { className: classes(name, className) }, title || ''); | ||
} | ||
@@ -127,0 +127,0 @@ // bail if failing silently |
@@ -14,3 +14,3 @@ // Copyright (c) Jupyter Development Team. | ||
}; | ||
import { cssRule, style } from 'typestyle/lib'; | ||
import { style } from 'typestyle/lib'; | ||
/** | ||
@@ -39,2 +39,3 @@ * styles for centering node inside of containers | ||
verticalAlign: 'middle', | ||
// `&` will be substituted for the generated classname (interpolation) | ||
$nest: { | ||
@@ -47,3 +48,3 @@ '&:hover': { | ||
}, | ||
['.jp-mod-dropTarget']: { | ||
['.jp-mod-dropTarget&']: { | ||
backgroundColor: 'var(--jp-brand-color2)', | ||
@@ -134,3 +135,29 @@ opacity: 0.7 | ||
const containerCSSSideBar = { | ||
transform: 'rotate(90deg)' | ||
// `&` will be substituted for the generated classname (interpolation) | ||
$nest: { | ||
// left sidebar tab divs | ||
'.jp-SideBar.jp-mod-left .p-TabBar-tab &': { | ||
transform: 'rotate(90deg)' | ||
}, | ||
// left sidebar currently selected tab div | ||
'.jp-SideBar.jp-mod-left .p-TabBar-tab.p-mod-current &': { | ||
transform: 'rotate(90deg)\n' + | ||
' translate(\n' + | ||
' calc(-0.5 * var(--jp-border-width)),\n' + | ||
' calc(-0.5 * var(--jp-border-width))\n' + | ||
' )' | ||
}, | ||
// right sidebar tab divs | ||
'.jp-SideBar.jp-mod-right .p-TabBar-tab &': { | ||
transform: 'rotate(-90deg)' | ||
}, | ||
// right sidebar currently selected tab div | ||
'.jp-SideBar.jp-mod-right .p-TabBar-tab.p-mod-current &': { | ||
transform: 'rotate(-90deg)\n' + | ||
' translate(\n' + | ||
' calc(0.5 * var(--jp-border-width)),\n' + | ||
' calc(-0.5 * var(--jp-border-width))\n' + | ||
' )' | ||
} | ||
} | ||
}; | ||
@@ -147,2 +174,7 @@ const containerCSSSplash = { | ||
}; | ||
const containerCSSToolbarButton = { | ||
display: 'inline-block', | ||
margin: 'auto', | ||
verticalAlign: 'middle' | ||
}; | ||
const containerCSSKind = { | ||
@@ -159,3 +191,3 @@ breadCrumb: {}, | ||
tabManager: containerCSSTabManager, | ||
toolbarButton: {}, | ||
toolbarButton: containerCSSToolbarButton, | ||
unset: {} | ||
@@ -183,5 +215,4 @@ }; | ||
export const iconStyle = (props) => { | ||
return style(Object.assign({}, containerCSS(props), { $nest: { | ||
['svg']: iconCSS(props) | ||
} })); | ||
const conCSS = containerCSS(props); | ||
return style(Object.assign({}, conCSS, { $nest: Object.assign({}, conCSS.$nest, { ['svg']: iconCSS(props) }) })); | ||
}; | ||
@@ -194,13 +225,2 @@ /** | ||
}; | ||
// TODO: Figure out a better cludge for styling current sidebar tab selection | ||
cssRule(`.p-TabBar-tab.p-mod-current .${iconStyle({ | ||
center: true, | ||
kind: 'sideBar' | ||
})}`, { | ||
transform: 'rotate(90deg)\n' + | ||
' translate(\n' + | ||
' calc(-0.5 * var(--jp-border-width)),\n' + | ||
' calc(-0.5 * var(--jp-border-width))\n' + | ||
' )' | ||
}); | ||
//# sourceMappingURL=icon.js.map |
{ | ||
"name": "@jupyterlab/ui-components", | ||
"version": "2.0.0-alpha.0", | ||
"version": "2.0.0-alpha.1", | ||
"description": "JupyterLab - UI components written in React", | ||
@@ -38,3 +38,3 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"@blueprintjs/select": "^3.3.0", | ||
"@jupyterlab/coreutils": "^4.0.0-alpha.0", | ||
"@jupyterlab/coreutils": "^4.0.0-alpha.1", | ||
"@phosphor/coreutils": "^1.3.1", | ||
@@ -68,3 +68,3 @@ "@phosphor/messaging": "^1.3.0", | ||
}, | ||
"gitHead": "92e8f227ad78ffba9d9f65e566e9174c8b6ab75a" | ||
"gitHead": "28adfa9819d61e80c2cce55fb19d9eb03ac52c10" | ||
} |
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
128427
1231