UNPKG

@randstad-design/orbit-multitheme

Version:

multitheme Front-end code based on Randstad Human Forward components

1 lines 19.9 kB
{"version":3,"sources":["../scss/03_molecules/animations/_toast.scss","00_helpers/variables/_spacing.scss","../scss/03_molecules/notifications/_toast.scss","00_helpers/mixins/_font-style.scss","00_helpers/variables/_fonts.scss","00_helpers/variables/_sizing.scss","00_helpers/variables/_toast.scss","00_helpers/variables/_transitions.scss","00_helpers/mixins/_media-queries.scss","00_tools/_background-variants.scss","00_helpers/mixins/notifications/_toast.scss","../scss/00_tools/cssVartoSass.scss","00_helpers/mixins/bg-map-buttons/_button-bg-map.scss","00_helpers/mixins/bg-map-buttons/_button-filled-bg-map.scss"],"names":[],"mappings":"AACA;EACE;IACE,SAAS;IACT,UAAU;IACV,kBAAkB,EAAA;EAGpB;IACE,YCEuB;IDDvB,UAAU;IACV,mBAAmB,EAAA,EAAA;;AAVvB;EACE;IACE,SAAS;IACT,UAAU;IACV,kBAAkB,EAAA;EAGpB;IACE,YCEuB;IDDvB,UAAU;IACV,mBAAmB,EAAA,EAAA;;AAKvB;EACE;IACE,SAAS;IACT,UAAU;IACV,kBAAkB,EAAA;EAGpB;IACE,YCXsB;IDYtB,UAAU;IACV,mBAAmB,EAAA,EAAA;;AAVvB;EACE;IACE,SAAS;IACT,UAAU;IACV,kBAAkB,EAAA;EAGpB;IACE,YCXsB;IDYtB,UAAU;IACV,mBAAmB,EAAA,EAAA;;AE1BvB;EC4BE,eCGiB;EDFjB,iBCImB;EDHnB,iBCEmB;EF9BnB,kBGOoB;EHNpB,oBAAa;EAAb,qBAAa;EAAb,oBAAa;EAAb,aAAa;EACb,8BAAmB;EAAnB,6BAAmB;EAAnB,2BAAmB;EAAnB,uBAAmB;EAAnB,mBAAmB;EACnB,wBAAwB;EACxB,4BDMwB;ECLxB,eAAe;EACf,kBAAkB,EAAA;EAElB;IACE,YAAY;IACZ,8BAA8B;IAC9B,mBAAmB;IACnB,UAAU,EAAA;EAdd;IAkBI,qCIViB;IJUj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AA;IFoD/B;MI3CV,oCFTyC;MEUzC,mCFVyC;MEWzC,gCFXyC,EAAA;MFoD/B;QItCR,kCFduC,EAAA;IFoD/B;MIjCV,uDFnByC;MEoBzC,mCFpByC;MEqBzC,mDFrByC,EAAA;MFoD/B;QI5BR,kCFxBuC,EAAA","file":"toast.css","sourcesContent":["// fade in toast animation\n@keyframes fade-in-toast {\n from {\n bottom: 0;\n opacity: 0;\n visibility: hidden;\n }\n\n to {\n bottom: $toast-spacing-bottom;\n opacity: 1;\n visibility: visible;\n }\n}\n\n// fade in toast animation : large\n@keyframes fade-in-toast--l {\n from {\n bottom: 0;\n opacity: 0;\n visibility: hidden;\n }\n\n to {\n bottom: $toast-spacing-bottom--l;\n opacity: 1;\n visibility: visible;\n }\n}\n","// | variable | size | calculation |\n// |---------------|-------|-----------------|\n// | $spacing--xxs | 5px | $baseline * 0.5 |\n// | $spacing--xs | 10px | $baseline * 1 |\n// | $spacing--s | 20px | $baseline * 2 |\n// | $spacing--m | 30px | $baseline * 3 |\n// | $spacing--l | 50px | $baseline * 5 |\n// | $spacing--xl | 80px | $baseline * 8 |\n// | $spacing--xxl | 130px | $baseline * 13 |\n\n$spacing--xxs: $baseline * 0.5;\n$spacing--xs: $baseline * 1;\n$spacing--s: $baseline * 2;\n$spacing--m: $baseline * 3;\n$spacing--l: $baseline * 5;\n$spacing--xl: $baseline * 8;\n$spacing--xxl: $baseline * 13;\n\n// grid spacings\n$grid-margin--s: 25px;\n$grid-margin--m: 50px;\n$grid-margin--l: 100px;\n",".toast {\n @include font-style('body--m');\n border-radius: $border-radius--l;\n display: flex;\n flex-flow: row wrap;\n max-height: 0 !important; // overwrite inline style to enable animation\n padding: 12px $spacing--s $spacing--s $spacing--s;\n position: fixed;\n visibility: hidden;\n\n &--active {\n height: auto;\n max-height: inherit !important; // overwrite inline style to enable animation\n visibility: visible;\n z-index: 1;\n }\n\n &.closable--closed {\n animation: fade-out $transition-duration--fast $toast-duration;\n max-height: none !important; // overwrite inline style to enable animation\n opacity: 0;\n transition: visibility $transition-duration--fast ease, opacity $transition-duration--fast ease;\n visibility: hidden;\n }\n\n &__message {\n @include font-style('body--m');\n margin-bottom: 0;\n }\n\n &__cta {\n margin: $spacing--s 0 0 auto;\n padding-left: $spacing--xs;\n text-align: right;\n }\n\n .icon svg {\n transition: fill $transition-duration--fast;\n }\n}\n\n// viewport s - m\n@include viewport--l('inversed') {\n .toast {\n bottom: $toast-spacing-bottom;\n left: 10px;\n right: 10px;\n\n &__message {\n flex: 1 100%;\n margin-right: 35px;\n width: 100%;\n }\n\n &__cta {\n flex: 1 100%;\n }\n\n .icon {\n right: 15px;\n top: $baseline * 1.5;\n }\n\n &--active {\n animation: fade-in-toast $transition-duration--fast;\n }\n }\n}\n\n// viewport l\n@include viewport--l {\n .toast {\n bottom: $toast-spacing-bottom--l;\n right: 30px;\n width: $toast-width;\n\n &__message {\n margin-right: 45px;\n width: auto;\n }\n\n .icon {\n top: $baseline * 1.8;\n right: 20px;\n }\n\n &--active {\n animation: fade-in-toast--l $transition-duration--fast;\n }\n }\n}\n\n@include toast-background-mapping;\n","// @font-style($font-style-small, $font-style-large)\n\n// $font-style-small - Desired type size for small/medium viewport.\n// $font-style-large - Desired type size for large viewport. This includes default fallback\n// for the S/M viewport.\n\n//\n// | viewport S | viewport M | viewport L | default mapping |\n// |------------------|------------------|-----------------|-----------------|\n// | title l | 40 | title l | 40 | title xxl | 80 | default |\n// | title m | 32 | title m | 32 | title xl | 60 | default |\n// | title s | 26 | title s | 26 | title l | 40 | |\n// | title s | 26 | title s | 26 | title m | 32 | default |\n// | title xs | 20 | title xs | 20 | title s | 26 | |\n// | title xs | 20 | title xs | 20 | title xs | 20 | default |\n// | title xxs | 18 | title xxs | 18 | title xxs | 18 | |\n// | | | | | | | |\n// | body l | 18 | body l | 18 | body l | 18 | |\n// | body m | 16 | body m | 16 | body m | 16 | |\n// | body s | 12 | body s | 12 | body s | 12 | |\n\n// import variables needed for the mixins\n@import '../variables/__variables.scss';\n\n// mixin to get applicable properties for chosen type size\n@mixin typeset($type) {\n $type: map-get($types, $type);\n\n font-size: (map-get($type, font-size));\n letter-spacing: (map-get($type, letter-spacing));\n line-height: (map-get($type, line-height));\n}\n\n// get correct font characteristics based on font\n@mixin type-size($size) {\n $size: map-get($type-sizes, $size);\n @include typeset($size);\n}\n\n// mixin to get font-size\n@mixin font-style($font-style-small: 'body--l', $font-style-large: null) {\n // if both arguments are added\n @if ($font-style-large != null) {\n // make sure $font-style-small & $font-style-large are not equal\n @if ($font-style-small != $font-style-large) {\n @include type-size($font-style-small);\n\n @include viewport--l {\n @include type-size($font-style-large);\n }\n } @else {\n @include type-size($font-style-small);\n }\n } @else {\n @include type-size($font-style-small);\n // default font style mappings\n @if ($font-style-small == 'title--l') {\n @include viewport--l {\n @include type-size('title--xxl');\n }\n } @else if ($font-style-small == 'title--m') {\n @include viewport--l {\n @include type-size('title--xl');\n }\n } @else if ($font-style-small == 'title--s') {\n @include viewport--l {\n @include type-size('title--m');\n }\n }\n }\n}\n","// | viewport S | viewport M | viewport L | default mapping |\n// |------------------|------------------|-----------------|-----------------|\n// | title l | 40 | title l | 40 | title xxl | 80 | default |\n// | title m | 32 | title m | 32 | title xl | 60 | default |\n// | title s | 26 | title s | 26 | title l | 40 | |\n// | title s | 26 | title s | 26 | title m | 32 | default |\n// | title xs | 20 | title xs | 20 | title s | 26 | |\n// | title xs | 20 | title xs | 20 | title xs | 20 | default |\n// | title xxs | 18 | title xxs | 18 | title xxs | 18 | |\n// | | | | | | | |\n// | body l | 18 | body l | 18 | body l | 18 | |\n// | body m | 16 | body m | 16 | body m | 16 | |\n// | body s | 14 | body s | 14 | body s | 14 | |\n// | body xs | 12 | body xs | 12 | body xs | 12 | |\n\n// font family\n$font-family-theme: Graphik, Tahoma, 'sans-serif';\n\n// font mappings - font-size / line-height / letter-spacing\n$types: (\n 12: (\n font-size: 12px,\n line-height: 15px,\n letter-spacing: 0\n ),\n 14: (\n font-size: 14px,\n line-height: 25px,\n letter-spacing: 0\n ),\n 16: (\n font-size: 16px,\n line-height: 25px,\n letter-spacing: 0\n ),\n 18: (\n font-size: 18px,\n line-height: 30px,\n letter-spacing: 0\n ),\n 20: (\n font-size: 20px,\n line-height: 30px,\n letter-spacing: 0\n ),\n 26: (\n font-size: 26px,\n line-height: 30px,\n letter-spacing: -1px\n ),\n 32: (\n font-size: 32px,\n line-height: 40px,\n letter-spacing: -1px\n ),\n 40: (\n font-size: 40px,\n line-height: 45px,\n letter-spacing: -2px\n ),\n 60: (\n font-size: 60px,\n line-height: 60px,\n letter-spacing: -3px\n ),\n 80: (\n font-size: 80px,\n line-height: 80px,\n letter-spacing: -4px\n )\n);\n\n// type-sizes - links the type-size to correct font mapping\n$type-sizes: (\n title--xxl: 80,\n title--xl: 60,\n title--l: 40,\n title--m: 32,\n title--s: 26,\n title--xs: 20,\n title--xxs: 18,\n body--l: 18,\n body--m: 16,\n body--s: 14,\n body--xs: 12\n);\n","// baseline size, used for every calculation\n$baseline: 10px;\n\n// border radius\n$border-radius: 4px;\n$border-radius--s: 3px;\n$border-radius--xs: 2px;\n$border-radius--m: 5px;\n$border-radius--m-l: 6px;\n$border-radius--l: 8px;\n$border-radius--max: 30px;\n","// toast size\n$toast-width: 450px;\n\n// toast spacing\n$toast-spacing-bottom: $spacing--xs;\n$toast-spacing-bottom--l: $spacing--m;\n\n// toast duration\n$toast-duration: 9.8s;\n","$transition-duration--faster: 0.1s;\n$transition-duration--fast: 0.2s;\n$transition-duration: 0.3s;\n$transition-duration--slow: 0.5s;\n$transition-duration--slower: 0.7s;\n$transition-duration--slowest: 0.9s;\n","// @viewport--x($reversed)\n\n// viewport s\n@mixin viewport--s($type: null) {\n // inversed\n @if ($type == 'inversed') {\n @media (max-width: #{($breakpoint-viewport--s - 1)}) {\n @content;\n }\n }\n // range\n @else if ($type== 'range') {\n @media (min-width:0) and (max-width: #{($breakpoint-viewport--s - 1)}) {\n @content;\n }\n }\n // default\n @else {\n @media (min-width: #{$breakpoint-viewport--s}) {\n @content;\n }\n }\n}\n\n// viewport m\n@mixin viewport--m($type: null) {\n // inversed\n @if ($type == 'inversed') {\n @media (max-width: #{($breakpoint-viewport--m - 1)}) {\n @content;\n }\n }\n // range\n @else if ($type== 'range') {\n @media (min-width: $breakpoint-viewport--m) and (max-width: #{($breakpoint-viewport--l - 1)}) {\n @content;\n }\n }\n // default\n @else {\n @media (min-width: #{$breakpoint-viewport--m}) {\n @content;\n }\n }\n}\n\n// viewport l\n@mixin viewport--l($type: null) {\n // inversed\n @if ($type == 'inversed') {\n @media (max-width: #{($breakpoint-viewport--l - 1)}) {\n @content;\n }\n }\n // range\n @else if ($type== 'range') {\n @media (min-width: $breakpoint-viewport--l) and (max-width: #{($breakpoint-viewport--xl - 1)}) {\n @content;\n }\n }\n // default\n @else {\n @media (min-width: #{$breakpoint-viewport--l}) {\n @content;\n }\n }\n}\n\n// viewport xl\n@mixin viewport--xl($type: null) {\n @if ($type == 'inversed') {\n @media (max-width: #{($breakpoint-viewport--xl - 1)}) {\n @content;\n }\n }\n // range\n @else if ($type== 'range') {\n @media (min-width: $breakpoint-viewport--xl) and (max-width: #{($breakpoint-viewport--xxl - 1)}) {\n @content;\n }\n }\n // default\n @else {\n @media (min-width: #{$breakpoint-viewport--xl}) {\n @content;\n }\n }\n}\n\n// viewport xxl\n@mixin viewport--xxl($type: null) {\n // inversed\n @if ($type == 'inversed') {\n @media (max-width: #{($breakpoint-viewport--xxl - 1)}) {\n @content;\n }\n }\n // default\n @else {\n @media (min-width: #{$breakpoint-viewport--xxl}) {\n @content;\n }\n }\n}\n\n// viewport range\n@mixin viewport--range($viewport1, $viewport2) {\n @media (min-width: #{($viewport1)}) and (max-width: #{($viewport2 - 1)}) {\n @content;\n }\n}\n\n// Internet Explorer 10 + 11\n@mixin internet-explorer-10-11 {\n @media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {\n @content;\n }\n}\n","@import '../00_settings/background-variants-color-map';\n// Creates the .bg-variant-#{$variant} classes with the right background-color property from the background-variants-color-map\n// Use only once to set up the utilities\n// e.g.\n//\n// @include bg-variant-classes();\n@mixin bg-variant-classes($backgroundmap: $backgrounds) {\n @each $variant, $value in $backgroundmap {\n $backgroundColor: map-get($value, 'background');\n $defaultTextColor: map-get($value, 'bodyPrimary');\n\n .bg-variant-#{$variant} {\n background-color: returnColorCSSVar($backgroundColor);\n color: returnColorCSSVar($defaultTextColor);\n }\n }\n}\n\n// Iterates over all backgrounds mapped in background-variants-color-map and outputs whatever is wrapped inside it with a .bg-variant-#{$variant} class selector before it\n// .bg-variant-#{$variant} &\n// Use together with varient-property function\n// Pass the $supportedBackgrounds as a list, if you only want to create classes for certain backgrounds\n// Set the $isChained to true, if you need to have a class that is chained to the parent e.g. .block.bg-variant-brand-primary\n// e.g.\n//\n// .divider {\n// @include bg-variants(\n// $supportedBackgrounds: (\n// 'brand-primary',\n// 'brand-senary'\n// )\n// ) {\n// color: variant-property('divider');\n// }\n// }\n//\n// .divider {\n// @include bg-variants() {\n// border-color: variant-property('divider');\n// }\n// }\n@mixin bg-variants(\n $backgroundmap: $backgrounds,\n $supportedBackgrounds: null,\n $isChained: false\n) {\n @if ($supportedBackgrounds != null) {\n @each $variant in $supportedBackgrounds {\n $className: if(\n $isChained==true,\n '.bg-variant-#{$variant}#{&}',\n '.bg-variant-#{$variant} &'\n );\n\n @at-root #{$className} {\n $variant-map: () !global;\n\n $supportedMap: if(\n map-has-key($backgroundmap, $variant),\n map-get($backgroundmap, $variant),\n null\n );\n\n @each $key, $value in $supportedMap {\n $variant-map: map-merge(\n $variant-map,\n (\n $key: returnColorCSSVar($value)\n )\n ) !global;\n }\n\n @content;\n $variant-map: null !global;\n }\n }\n } @else {\n @each $variant, $map in $backgroundmap {\n $className: if(\n $isChained==true,\n '.bg-variant-#{$variant}#{&}',\n '.bg-variant-#{$variant} &'\n );\n\n @at-root #{$className} {\n // Makes a global map that can be accessed by the variant-property function\n $variant-map: () !global;\n\n @each $key, $submap in $map {\n $value: map-get(map-get($backgroundmap, $variant), '#{$key}');\n $variant-map: map-merge(\n $variant-map,\n (\n $key: returnColorCSSVar($value)\n )\n ) !global;\n }\n\n @content;\n $variant-map: null !global;\n }\n }\n }\n}\n\n// function to use inside the wrapped content and access the\n// Use together with bg-varients mixin\n// e.g.\n//\n// .divider {\n// @include bg-variants() {\n// border-color: variant-property('divider');\n// }\n// }\n@function variant-property($key) {\n $value: map-get($variant-map, $key);\n\n @if ($value != null) {\n @return map-get($variant-map, $key);\n } @else {\n @return null;\n }\n}\n","@mixin toast-background-mapping {\n .toast {\n @include bg-variants(\n $isChained: true,\n $supportedBackgrounds: (\n 'brand-secondary'\n )\n ) {\n background: variant-property('background');\n border: 1px solid variant-property('titlePrimary');\n color: variant-property('titlePrimary');\n\n .icon svg {\n fill: variant-property('navigationLinkIdle');\n\n &:hover {\n fill: variant-property('navigationLinkHover');\n }\n }\n\n .button {\n @include button-bg-map;\n }\n\n .button--filled {\n @include button-filled-bg-map;\n }\n }\n }\n}\n","// Returns CSS4 color variables\n@function returnColorCSSVar($color-name) {\n @return var(--color-#{$color-name});\n}\n","@mixin button-bg-map {\n border-color: variant-property('ghostBorderIdle');\n color: variant-property('ghostTextIdle');\n\n .icon svg {\n fill: variant-property('ghostTextIdle');\n }\n\n &:hover,\n &:focus {\n background-color: variant-property('ghostBackgroundHover');\n color: variant-property('ghostTextHover');\n\n .icon svg {\n fill: variant-property('ghostTextHover');\n }\n }\n\n &:active {\n background-color: variant-property('ghostBackgroundPressed');\n color: variant-property('ghostTextPressed');\n border-color: variant-property('ghostBackgroundPressed');\n\n .icon svg {\n fill: variant-property('ghostTextPressed');\n }\n }\n}\n","@mixin button-filled-bg-map {\n background: variant-property('filledBackgroundIdle');\n border-color: variant-property('filledBackgroundIdle');\n color: variant-property('filledTextIdle');\n\n .icon svg {\n fill: variant-property('filledTextIdle');\n }\n\n &:hover,\n &:focus {\n background-color: variant-property('filledBackgroundHover');\n color: variant-property('filledTextHover');\n border-color: variant-property('filledBackgroundHover');\n\n .icon svg {\n fill: variant-property('filledTextHover');\n }\n }\n\n &:active {\n background-color: variant-property('filledBackgroundPressed');\n color: variant-property('filledTextPressed');\n border-color: variant-property('filledBackgroundPressed');\n\n .icon svg {\n fill: variant-property('filledTextPressed');\n }\n }\n}\n"]}