reorganize packages, start converting overall app to react (very broken at the moment)

This commit is contained in:
Erik Ziegler committed 2018-12-12 18:06:25 +01:00
1 parent 024fe1a448
commit 5f30f7bd35
479 files changed
+5364 -11611

No files matched your search

@@ -0,0 +1,29 @@
animationDefaults()
animation-duration: 0.3s
animation-direction: alternate
animation-timing-function: ease-out
animation-fill-mode: forwards
animateZoomIn()
animationDefaults()
animation-name: zoomIn
animateZoomOut()
animationDefaults()
animation-name: zoomOut
animateSlideInDown()
animationDefaults()
animation-name: slideInDown
animateSlideOutUp()
animationDefaults()
animation-name: slideOutUp
animateFadeIn()
animationDefaults()
animation-name: fadeIn
animateFadeOut()
animationDefaults()
animation-name: fadeOut
@@ -0,0 +1,57 @@
/*
Basic mixin which vendorizes a propery. Usage:
vendorize(box-sizing, border-box)
*/
vendorize(property, value)
-webkit-{property} value
-moz-{property} value
-ms-{property} value
-o-{property} value
{property} value
animation(a)
vendorize(animation, a)
border-radius(r)
vendorize(border-radius, r)
border-top-left-radius(r)
vendorize(border-top-left-radius, r)
border-top-right-radius(r)
vendorize(border-top-right-radius, r)
border-bottom-left-radius(r)
vendorize(border-bottom-left-radius, r)
border-bottom-right-radius(r)
vendorize(border-bottom-right-radius, r)
box-shadow(s)
vendorize(box-shadow, s)
text-shadow(s)
vendorize(text-shadow, s)
transform(t)
vendorize(transform, t)
transform-origin(o)
vendorize(transform-origin, o)
transition(t)
vendorize(transition, t)
transition-delay(d)
vendorize(transition-delay, d)
placeholder-color(c)
&::-webkit-input-placeholder
color: c
&:-moz-placeholder
color: c
&::-moz-placeholder
color: c
&:-ms-input-placeholder
color: c
@@ -0,0 +1,39 @@
$spacer = 1rem
$spacer-x = $spacer
$spacer-y = $spacer
generateSpacings($prefix, $spacerX, $spacerY)
$spacerAxis = $spacerX,
$spacerY
$spacings = 0 0,
1 1,
2 1.5,
3 3g
$properties = m margin,
p padding
$sides = t top 1,
r right 0,
b bottom 1,
l left 0
$axes = x left right 0,
y top bottom 1
.r-font
font-size: $spacerX
for $property in $properties
for $spacing in $spacings
.{$prefix}{$property[0]}-a-{$spacing[0]}
{$property[1]} $spacing[1]*$spacer !important
for $side in $sides
.{$prefix}{$property[0]}-{$side[0]}-{$spacing[0]}
{$property[1]}-{$side[1]} $spacing[1]*$spacerAxis[$side[2]] !important
for $axis in $axes
.{$prefix}{$property[0]}-{$axis[0]}-{$spacing[0]}
{$property[1]}-{$axis[1]} $spacing[1]*$spacerAxis[$axis[3]] !important
{$property[1]}-{$axis[2]} $spacing[1]*$spacerAxis[$axis[3]] !important
@@ -0,0 +1,47 @@
.theme-icon-crickets
.theme-icon-tide
.theme-icon-tigerlily
.theme-icon-quartz
.theme-icon-overcast
.theme-icon-mint
.theme-icon-honeycomb
display: inline-block
background: url('/packages/ohif_design/assets/theme-icons.png') no-repeat
overflow: hidden
text-indent: -9999px
text-align: left
.theme-icon-crickets
background-position: -0px -0px
width: 64px
height: 56px
.theme-icon-tide
background-position: -0px -56px
width: 64px
height: 54px
.theme-icon-tigerlily
background-position: -0px -110px
width: 62px
height: 61px
.theme-icon-quartz
background-position: -0px -171px
width: 59px
height: 64px
.theme-icon-overcast
background-position: -0px -235px
width: 58px
height: 37px
.theme-icon-mint
background-position: -0px -272px
width: 57px
height: 61px
.theme-icon-honeycomb
background-position: -0px -333px
width: 50px
height: 58px
@@ -0,0 +1,64 @@
@require "{ohif:themes}/themes"
/*
* Process each theme variable in the given value, splitting it by space
*/
parseSpaceVars($theme, $value, $alpha)
// Split values by space
$valueSplit = split(' ', $value)
// Create an empty list
$list = ''
pop($list)
// Iterate over split values
for $property in $valueSplit
// Try to get the theme with current property key
$val = $theme[$property]
if ($val)
if($val is a 'color')
// Apply given alpha if it's a color
$val = alpha($val, $alpha)
// Push the processed theme variable to the list
push($list, $val)
else
// Push the property itself if not found in theme variables
push($list, $property)
// Merge the resulting processed list by joining values back with space
join(' ', $list)
/*
* Process each theme variable in the given value, splitting it by comma
*/
parseCommaVars($theme, $value, $alpha)
// Split values by comma
$valueSplit = split(',', $value)
// Create an empty list
$list = ''
pop($list)
// Iterate over split values
for $sentence in $valueSplit
// Procces the values splitting by space
push($list, parseSpaceVars($theme, $sentence, $alpha))
// Merge the resulting processed list by joining values back with comma
unquote(join(',', $list))
/*
* Return a processed theme variable or color with alpha
*/
theme($property, $value, $alpha=1)
// Crete the selector for default theme
/ {selector()}
{$property}: parseCommaVars($themes[$defaultTheme], $value, $alpha)
// Create the selector for each registered theme
for $themeName, $theme in $themes
for $selectorPiece in split(',', selector())
// prefix the selector with the body.theme-{themeName} selector
/ body.theme-{$themeName} {$selectorPiece}
{$property}: parseCommaVars($theme, $value, $alpha)
@@ -0,0 +1,25 @@
@import "./theming.styl"
// Sizes
$topBarHeight = 40px
$topBarExpandedHeight = 160px
$toolbarHeight = 78px
$toolbarDrawerHeight = 62px
$studiesSidebarMenuWidth = 307px
$rightSidebarMenuWidth = 323px
$studyListPadding = 8%
$studyListPaddingMediumScreen = 10px
// Fonts
$logoFontFamily = "Sanchez"
$logoFontWeight = 300
// Transitions
$transitionDuration = 0.3s
$transitionEffect = ease
$sidebarTransition = all $transitionDuration $transitionEffect
// Thicknesses
$viewportBorderThickness = 1px
$uiBorderThickness = 1px