feature(ui-library): Added own library of UI components to replace digi-ng. Skeleton is first component moved (TV-850)
Squashed commit of the following: commit d76e32cd99e2e823142f4410e66c66df5e096041 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Thu Oct 28 10:28:02 2021 +0200 Move styles to own library commit 85f0a5788ebdd7309499b1b623f4ac1046f45811 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Thu Oct 28 10:09:23 2021 +0200 double quotes in html commit eeb600cd631e3478c136795a8109e8927546b14b Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Oct 27 16:42:48 2021 +0200 UI library with copy of digi-ng's skeleton commit 11a24c0eef173e6b2f087eca5e96063036e6394b Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Oct 27 16:06:43 2021 +0200 Update .eslintrc.json commit 3c4b2e4823dbd8e9ca8dd332966bd10ac0fc098f Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Wed Oct 27 15:08:32 2021 +0200 add nx library
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
@mixin msfa__a11y-sr-only {
|
||||
border: 0;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
-webkit-clip-path: inset(50%);
|
||||
clip-path: inset(50%);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
@import '../variables/z-index';
|
||||
|
||||
@mixin msfa__backdrop($zIndex: $msfa__z-index-default, $fullScreen: true, $opaqueBackground: false) {
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: $zIndex;
|
||||
|
||||
@if $opaqueBackground {
|
||||
background-color: var(--digi--ui--color--background);
|
||||
} @else {
|
||||
background-color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
@if $fullScreen {
|
||||
position: fixed;
|
||||
} @else {
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
@import '~@digi/core/dist/collection/components/_button/button/button.css';
|
||||
|
||||
@mixin msfa__button($type: 'primary') {
|
||||
padding: var(--digi-button--padding);
|
||||
border-radius: var(--digi-button--border-radius);
|
||||
transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
|
||||
text-decoration: none;
|
||||
font-weight: var(--digi-button--font-weight);
|
||||
font-size: var(--digi-button--font-size);
|
||||
width: var(--digi-button--width);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
text-align: var(--digi-button--text-align);
|
||||
border: var(--digi-button--border);
|
||||
outline: var(--digi-button--outline);
|
||||
border-color: var(--digi-button--border-color);
|
||||
|
||||
@if $type == 'secondary' {
|
||||
background-color: var(--digi-button--background--secondary);
|
||||
color: var(--digi-button--color--secondary);
|
||||
} @else if $type == 'tertiary' {
|
||||
background-color: transparent;
|
||||
color: var(--digi-button--color--tertiary);
|
||||
border-width: 0;
|
||||
} @else {
|
||||
background-color: var(--digi-button--background);
|
||||
color: var(--digi-button--color);
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
outline: var(--digi-button--outline--focus);
|
||||
border-color: var(--digi-button--border-color--hover);
|
||||
|
||||
@if $type == 'secondary' {
|
||||
background-color: var(--digi-button--background--secondary--hover);
|
||||
color: var(--digi-button--color--secondary);
|
||||
} @else if $type == 'tertiary' {
|
||||
color: var(--digi-button--color--tertiary--hover);
|
||||
} @else {
|
||||
background-color: var(--digi-button--background--hover);
|
||||
color: var(--digi-button--color--hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
@mixin msfa__flex-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
@import '../variables/colors';
|
||||
@import '../variables/gutters';
|
||||
|
||||
|
||||
@mixin msfa__fieldset($legendAsHeading: true) {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-width: 0;
|
||||
|
||||
legend {
|
||||
position: relative;
|
||||
text-align: left;
|
||||
|
||||
@if $legendAsHeading {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-bottom: var(--digi--layout--gutter--xs);
|
||||
margin: 0;
|
||||
font-weight: var(--digi--typography--font-weight--bold);
|
||||
font-size: var(--digi--typography--font-size--s);
|
||||
border-bottom: 1px solid var(--digi--ui--color--background--off);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
@mixin msfa__digi-ng-icon($width: 1em) {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: $width;
|
||||
max-height: $width;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
@mixin msfa__link($ignore-visited: false, $theme: 'dark') {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
color: var(--digi--typography--color--link);
|
||||
font-size: var(--digi--typography--font-size);
|
||||
font-weight: var(--digi--typography--font-weight--semibold);
|
||||
gap: var(--digi--layout--gutter--xs);
|
||||
|
||||
@if ($theme == 'light') {
|
||||
color: var(--digi--typography--color--text--light);
|
||||
|
||||
&:visited {
|
||||
color: var(--digi--typography--color--text--light);
|
||||
|
||||
&:hover {
|
||||
color: var(--digi--typography--color--text--light);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@if ($ignore-visited) {
|
||||
&:visited {
|
||||
color: var(--digi--typography--color--link);
|
||||
|
||||
&:hover {
|
||||
color: var(--digi--typography--color--link--active);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin msfa__button-as-link($ignore-visited: false) {
|
||||
@include msfa__link($ignore-visited);
|
||||
background-color: transparent;
|
||||
border-width: 0;
|
||||
padding: 0;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
@mixin msfa__reset-list {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
Reference in New Issue
Block a user