diff --git a/apps/ui-e2e/src/component/radio-button.component.cy.ts b/apps/ui-e2e/src/component/radio-button.component.cy.ts index f08967e7..27d630c4 100644 --- a/apps/ui-e2e/src/component/radio-button.component.cy.ts +++ b/apps/ui-e2e/src/component/radio-button.component.cy.ts @@ -6,7 +6,7 @@ describe('RadioButtonComponent', () => { it('Renders default radio button and checks it', () => { cy.loadStory('Angular Radio Button', 'Default') .get('veera-ng-radio-button') - .shouldHaveClasses('input', 'c-radio') + .shouldHaveClasses('input', 'veera-radio-group__item-control') .should('not.be.checked') .check() .should('be.checked'); diff --git a/apps/ui-e2e/src/component/radio-group.component.cy.ts b/apps/ui-e2e/src/component/radio-group.component.cy.ts index 2c22011b..324b9930 100644 --- a/apps/ui-e2e/src/component/radio-group.component.cy.ts +++ b/apps/ui-e2e/src/component/radio-group.component.cy.ts @@ -8,7 +8,7 @@ describe('RadioGroupComponent', () => { .runRadioGroupCommonTest('regular') .get('[data-cy="option_1"]') .shouldHaveClasses('label', 'veera-radio-group__item-inner') - .shouldHaveClasses('input', 'c-radio'); + .shouldHaveClasses('input', 'veera-radio-group__item-control'); cy.get('[type="radio"]') .first() diff --git a/libs/styles/src/lib/scss/components/_cards.scss b/libs/styles/src/lib/scss/components/_cards.scss deleted file mode 100644 index 77586e36..00000000 --- a/libs/styles/src/lib/scss/components/_cards.scss +++ /dev/null @@ -1,259 +0,0 @@ -.c-card { - background-color: get-color(white); - border-radius: $veera-radius-s; - border: 1px solid get-color(black-coral-2); - font-family: $font-family-base; - width: 392px; - - &--small { - height: 80px; - } - - &--large { - height: 256px; - } - - .title-row { - display: flex; - } - - .card-title-icon { - height: 16px; - width: 16px; - margin-right: 12px; - margin-left: 28px; - margin-top: 13px; - vertical-align: middle; - } - - .line { - border-color: get-color(black-coral-2); - border-top: 1px; - width: 343px; - margin: 0 25px; - } - - h1 { - color: get-color(black-coral-10); - display: inline-flex; - font-size: 14px; - line-height: 22px; - text-transform: uppercase; - margin: 11px 0 2px 0; - } - - h2 { - color: get-color(sapphire-blue-10); - font-weight: normal; - font-size: 18px; - line-height: 27px; - margin: 7px 0 0 25px; - } - - a { - color: get-color(sapphire-blue-10); - font-size: 14px; - line-height: 23px; - margin-right: 6px; - } - - p { - padding-right: 8px; - margin: 0; - } - - .link-divider { - margin: 8px 0 8px 25px; - } - - th, - td { - font-weight: normal; - font-size: 14px; - line-height: 21px; - padding: $veera-radius-s 0 $veera-radius-s 25px; - text-align: left; - } - - .card-columns { - column-count: 4; - } - - &--info-arrow { - margin-top: 7px; - margin-right: 25px; - margin-left: 8px; - } - - .arrow-rotate { - -webkit-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); - } - - .card-info-button { - color: get-color(sapphire-blue-10); - display: inline-flex; - font-size: 14px; - line-height: 22px; - margin-top: 11px; - margin-left: auto; - outline: none; - } -} - -.c-card-cookie { - background-color: get-color(white); - border: 1px solid get-color(black-coral-2); - border-radius: $veera-radius-s; - font-family: $font-family-base; - font-size: $veera-font-size-70; - height: 83px; - width: 323px; - - p { - color: get-color(black); - font-size: 12px; - line-height: 18px; - margin: 0; - padding: 8px 8px 6px 8px; - } - - a { - color: get-color(sapphire-blue-10); - } - - &--buttons { - display: inline-flex; - width: 100%; - place-content: center; - } - - &--btn-text { - border: 2px solid transparent; - color: get-color(sapphire-blue-10); - margin-right: 8px; - margin-top: 3px; - text-decoration: underline; - - &:focus { - border: 2px solid get-color(sapphire-blue-10); - border-radius: 2px; - } - - &:hover { - text-decoration: none; - } - } - - &--btn-primary { - background-color: get-color(sapphire-blue-10); - border: 2px solid get-color(sapphire-blue-10); - border-radius: 20px; - color: get-color(white); - width: 87px; - height: 25px; - margin-left: 8px; - - &:hover { - background-color: get-color(sapphire-blue-13); - border-color: get-color(sapphire-blue-13); - } - - &:focus { - box-shadow: inset 1px 0 0 get-color(white), - inset -1px 0 0 get-color(white), inset 0 1px 0 get-color(white), - inset 0 -1px 0 get-color(white); - } - } -} - -.c-list { - background-color: get-color(white); - border-radius: $veera-radius-s; - border: 1px solid get-color(black-coral-2); - font-family: $font-family-base; - - h1 { - color: get-color(sapphire-blue-10); - font-size: $veera-font-size-200; - font-weight: normal; - margin: 0; - line-height: 27px; - } - - h2 { - color: #34394c; - font-size: $veera-font-size-200; - font-weight: normal; - line-height: 22px; - margin: 0; - } - - p { - line-height: 22px; - font-size: 14px; - color: get-color(black-coral-10); - margin: 0; - } - - .line { - border-color: get-color(black-coral-2); - width: auto; - } - - &--price { - background-color: get-color(black-coral-1); - } - - //mobile - @media only screen and (max-width: 767px) { - width: 340px; - height: 183px; - .price-break { - display: none; - } - - &--text { - padding: 0 20px; - } - - &--price { - border-bottom-left-radius: $veera-radius-s; - border-bottom-right-radius: $veera-radius-s; - text-align: center; - position: inherit; - padding: 15px; - margin-top: 10px; - } - - .line { - margin-top: 35.89px; - margin-bottom: 7.11px; - } - } - - //desktop - @media only screen and (min-width: 768px) { - width: 100%; - height: 135px; - display: flex; - .text-break { - display: none; - } - - &--text { - padding-left: 25px; - flex: auto; - } - - &--price { - float: right; - padding: 46px 61px 43px 51px; - } - - .line { - margin: 30px 0 18px 0; - } - } -} diff --git a/libs/styles/src/lib/scss/components/_checkbox.scss b/libs/styles/src/lib/scss/components/_checkbox.scss deleted file mode 100644 index 7ee57006..00000000 --- a/libs/styles/src/lib/scss/components/_checkbox.scss +++ /dev/null @@ -1,64 +0,0 @@ -.c-checkbox { - div { - box-sizing: border-box; - position: relative; - } - label { - cursor: pointer; - display: block; - font-size: $veera-font-size-100; - line-height: 2.5; - } - - [type='checkbox'] { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; - } - - [type='checkbox'] + label::before { - border: 1px solid get-color(black-coral-2); - border-radius: 2px; - content: ''; - display: inline-block; - height: 1em; - width: 1em; - margin-right: 0.75em; - vertical-align: -0.15em; - } - - [type='checkbox']:checked + label::before { - background: get-color(sapphire-blue-10); - border: 1px solid get-color(sapphire-blue-10); - } - - [type='checkbox'] + label::after { - content: ''; - display: inline-block; - height: 1em; - width: 1em; - position: absolute; - top: 0.5em; - left: 0.5em; - transform: rotate(0deg); - } - - [type='checkbox']:checked + label::after { - border-right: 0.1em solid get-color(white); - border-bottom: 0.1em solid get-color(white); - top: 0.9em; - left: 0.35em; - width: 0.3em; - height: 0.5em; - transform: rotate(45deg); - } - - [type='checkbox']:focus + label { - outline: 1px dotted get-color(sapphire-blue-10); - } -} diff --git a/libs/styles/src/lib/scss/components/_dropdown.scss b/libs/styles/src/lib/scss/components/_dropdown.scss deleted file mode 100644 index ed4a3c3e..00000000 --- a/libs/styles/src/lib/scss/components/_dropdown.scss +++ /dev/null @@ -1,48 +0,0 @@ -.c-dropdown { - box-sizing: border-box; - font-size: $veera-font-size-100; - position: relative; - padding-left: 8px; - - select { - background: get-color(white); - border: 1px solid get-color(black-coral-5); - border-radius: 5px; - cursor: pointer; - color: get-color(black-coral-10); - font-size: $veera-font-size-100; - height: 40px; - padding-left: 8px; - - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - } - - /* Targetting Webkit browsers only. FF will show the dropdown arrow with so much padding. */ - @media screen and (-webkit-min-device-pixel-ratio: 0) { - select { - padding-right: 18px; - } - } - &:after { - border-right: 0.25em solid get-color(black-coral-10); - border-bottom: 0.25em solid get-color(black-coral-10); - content: ''; - height: 0.7em; - width: 0.7em; - transform: rotate(45deg); - right: 0.7em; - top: 0.2em; - position: absolute; - pointer-events: none; - } - - &--large { - width: 420px; - } - - &--small { - width: 140px; - } -} diff --git a/libs/styles/src/lib/scss/components/_radio.scss b/libs/styles/src/lib/scss/components/_radio.scss deleted file mode 100644 index 2f579564..00000000 --- a/libs/styles/src/lib/scss/components/_radio.scss +++ /dev/null @@ -1,45 +0,0 @@ -.c-radio { - legend { - font-size: $veera-font-size-100; - } - - label { - cursor: pointer; - display: block; - font-size: $veera-font-size-100; - line-height: 2.5; - } - - :not(.lt-ie9) { - [type='radio'] { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - width: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - } - - [type='radio'] + span::before { - border-radius: 1em; - border: 1px solid #8f91a8; - content: ''; - display: inline-block; - height: 1em; - width: 1em; - margin-right: 0.75em; - vertical-align: -0.15em; - } - - [type='radio']:checked + span::before { - background: get-color(sapphire-blue-10); - box-shadow: inset 0 0 0 2px get-color(white); - } - - [type='radio']:focus + span { - outline: 1px dotted get-color(sapphire-blue-10); - } - } -} diff --git a/libs/styles/src/lib/scss/components/_snackbar.scss b/libs/styles/src/lib/scss/components/_snackbar.scss deleted file mode 100644 index df383a8f..00000000 --- a/libs/styles/src/lib/scss/components/_snackbar.scss +++ /dev/null @@ -1,122 +0,0 @@ -.c-snackbar { - border-radius: $veera-radius-s; - width: 392px; - height: 134px; - - h1 { - padding-top: 16px; - padding-left: 25px; - padding-bottom: 2px; - width: 330px; - display: inline-flex; - line-height: 22px; - font-size: 14px; - text-transform: uppercase; - } - - p { - font-size: 14px; - line-height: 21px; - padding-left: 25px; - padding-top: 5px; - } - - a { - text-decoration: underline; - color: get-color(sapphire-blue-10); - } - .close { - float: right; - height: 14px; - width: 14px; - margin-top: 19px; - margin-right: 31px; - } - - .snackbar-w-icon { - height: 13.33px; - width: 13.33px; - margin-right: 6px; - margin-bottom: 2px; - vertical-align: middle; - } - - &--info { - background-color: get-color(sapphire-blue-1); - border: 1px solid get-color(sapphire-blue-10); - } - - &--success { - background-color: get-color(sea-green-2); - border: 1px solid get-color(sea-green-10); - } - - &--warning { - background-color: get-color(dark-tangerine-2); - border: 1px solid get-color(dark-tangerine-11); - } - - &--error { - background-color: get-color(jasper-1); - border: 1px solid get-color(jasper-10); - } - &--info-grayscale { - background-color: #dddddd; - border: 1px solid #474747; - } - - &--success-grayscale { - background-color: #d5d5d5; - border: 1px solid #666666; - } - - &--warning-grayscale { - background-color: #ebebeb; - border: 1px solid #a8a8a8; - } - - &--error-grayscale { - background-color: #e3e3e3; - border: 1px solid #6c6c6c; - } - - &--info-deuteranopia { - background-color: #ecdaf1; - border: 1px solid #0063a5; - } - - &--success-deuteranopia { - background-color: #efd3d6; - border: 1px solid #927862; - } - - &--warning-deuteranopia { - background-color: #ffe8da; - border: 1px solid #e2ac18; - } - - &--error-deuteranopia { - background-color: #f9dbdd; - border: 1px solid #99773d; - } - - &--info-tritanopia { - background-color: #d3e2f2; - border: 1px solid #006b71; - } - - &--success-tritanopia { - background-color: #cddbeb; - border: 1px solid #4e858f; - } - - &--warning-tritanopia { - background-color: #ffe6f1; - border: 1px solid #f09ea9; - } - - &--error-tritanopia { - background-color: #f9daea; - border: 1px solid #d9474a; - } -} diff --git a/libs/styles/src/lib/scss/components/navigation/_navigation.scss b/libs/styles/src/lib/scss/components/navigation/_navigation.scss deleted file mode 100644 index 039a7c94..00000000 --- a/libs/styles/src/lib/scss/components/navigation/_navigation.scss +++ /dev/null @@ -1,378 +0,0 @@ -.c-sidenav { - font-size: 14px; - - a { - color: get-color(white); - overflow: hidden; - text-overflow: ellipsis; - white-space: normal; - } - //bootstrap overwrite - p { - margin: 0; - } - - .shadowClass { - box-shadow: inset 10px 0 20px -10px get-color(sapphire-blue-15); - } - /* --------------------------------------------------- - SIDEBAR STYLE - ----------------------------------------------------- */ - - .wrapper { - display: flex; - align-items: stretch; - } - - //overwrites bootstrap dropdown collapsing animation - .collapsing { - -webkit-transition: none; - transition: none; - display: none; - } - - // gives expanded tabs active/hover styling - a[aria-expanded='true'] { - background: get-color(sapphire-blue-12); - font-weight: bold; - box-shadow: inset 10px 0 20px -10px get-color(sapphire-blue-15); - } - - #sidebar { - background: get-color(sapphire-blue-10); - } - - #sidebar ul li a { - border: 3px solid transparent; - border-bottom: 1px solid get-color(sapphire-blue-14); - box-sizing: border-box; - color: get-color(white); - display: flex; - align-items: center; - text-align: left; - padding-left: 31px; - p { - display: inline-block; - color: get-color(white); - padding-left: 20px; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - } - - @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { - .ie10up { - p { - position: relative; - width: 400px; - overflow: hidden; - display: -webkit-box; - line-height: 21px; - max-height: 44px; - -webkit-box-orient: vertical; - -moz-box-orient: vertical; - } - - p::after { - letter-spacing: 0.1em; - content: '...'; - position: absolute; - bottom: 0; - right: 0; - padding: 0 10px 2px 45px; - } - } - } - - &:hover { - background: get-color(sapphire-blue-12); - box-shadow: inset 10px 0 20px -10px get-color(sapphire-blue-15); - } - - &:focus { - border-color: get-color(sapphire-blue-4); - border-bottom-width: 3px; - } - } - - #sidebar.active a { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - padding: 0 20px; - } - - // level definitions - #sidebar ul ul { - background: get-color(sapphire-blue-10); - } - - #sidebar ul ul ul { - background: get-color(sapphire-blue-10); - a { - padding-left: 20px; - } - } - - &--over-8 { - img { - height: 20px; - min-width: 20px; - opacity: 0.5; - } - - #sidebar { - min-width: 200px; - max-width: 200px; - li { - min-width: 200px; - max-width: 200px; - } - } - #sidebar.active { - min-width: 57px; - max-width: 57px; - text-align: center; - li { - min-width: 57px; - max-width: 57px; - a p { - display: none; - } - } - } - - #sidebar ul li a { - height: 50px; - padding-left: 17px; - } - - #sidebar.active a { - display: flex; - justify-content: center; - padding: 0; - } - - #sidebar ul ul { - position: absolute; - - left: 200px; - margin-top: -50px; - } - - #sidebar ul ul ul { - position: absolute; - - left: 200px; - margin-top: -50px; - } - //changes between close and open text in nav header - #sidebar .sidenav-header img { - opacity: 1; - &:first-child { - display: none; - } - } - #sidebar.active .sidenav-header { - img:first-child { - display: block; - } - img { - display: none; - } - } - } - &--under-8 { - font-size: 18px; - - img { - height: 32px; - min-width: 32px; - opacity: 0.5; - } - - #sidebar li { - min-width: 280px; - max-width: 280px; - a { - height: 100px; - padding: 0 20px; - - p { - text-align: center; - padding-left: 20px; - } - } - } - - #sidebar.active { - font-size: 14px; - - min-width: 144px; - max-width: 144px; - li { - min-width: 144px; - max-width: 144px; - a p { - padding-left: 0; - } - } - - //changes between close and open text in nav header - .sidenav-header > div:last-child { - display: flex; - flex-direction: column; - align-items: center; - } - - .sidenav-header > div:first-child { - display: none; - } - } - - #sidebar ul ul { - position: absolute; - left: 280px; - margin-top: -100px; - } - - #sidebar ul ul ul { - position: absolute; - left: 280px; - margin-top: -100px; - } - - .sidenav-header div { - align-items: center; - display: flex; - } - //changes between close and open text in nav header - .sidenav-header img { - opacity: 1; - } - #sidebar .sidenav-header > div:last-child { - display: none; - } - } - &--mobile { - width: 375px; - - img { - height: 24px; - min-width: 24px; - opacity: 0.5; - } - - #sidebar.active { - display: none; - } - - #sidebar { - min-width: 100%; - max-width: 100%; - a { - height: 50px; - } - } - - // level definitions - #sidebar ul ul { - position: relative; - - background: get-color(sapphire-blue-15); - } - - #sidebar ul ul ul { - background: get-color(sapphire-blue-17); - a { - padding-left: 41px; - } - } - } - - /* --------------------------------------------------- - CONTENT STYLE - ----------------------------------------------------- */ - - #content { - width: 100%; - padding: 20px; - min-height: 100vh; - transition: all 0.3s; - } - - /* --------------------------------------------------- - MEDIAQUERIES - ----------------------------------------------------- */ - - @media only screen and (max-width: 375px) { - width: 375px; - - img { - height: 24px; - min-width: 24px; - opacity: 0.5; - } - - #content { - padding: 0; - } - - #sidebar.active { - display: none; - } - - #sidebar { - min-width: 100%; - max-width: 100%; - li { - min-width: 100%; - max-width: 100%; - } - a { - height: 50px; - } - } - - // level definitions - #sidebar ul ul { - background: get-color(sapphire-blue-15); - position: relative; - left: 0; - margin-top: 0; - } - - #sidebar ul ul ul { - background: get-color(sapphire-blue-17); - position: relative; - left: 0; - margin-top: 0; - a { - padding-left: 41px; - } - } - } -} - -// For demonstration -.c-mobile-header { - width: 375px; - height: 70px; - border-bottom: 1px solid get-color(sapphire-blue-14); - display: flex; - justify-content: space-around; - align-items: center; - background: get-color(sapphire-blue-10); - - &.active { - background: get-color(white); - } - - img { - height: 40px; - min-width: 35px; - } -} diff --git a/libs/styles/src/lib/scss/main.scss b/libs/styles/src/lib/scss/main.scss index 6352e508..3aec05d8 100644 --- a/libs/styles/src/lib/scss/main.scss +++ b/libs/styles/src/lib/scss/main.scss @@ -29,17 +29,11 @@ @import 'components/steps'; @import 'components/radio-group'; @import 'components/labeled-icon'; -@import 'components/radio'; @import 'components/accordion'; @import 'components/html-section'; @import 'components/notification'; -// @import 'components/checkbox'; -// @import 'components/dropdown'; @import 'components/breadcrumbs'; -// @import 'components/snackbar'; -// @import 'components/cards'; @import 'components/table'; -// @import 'components/navigation/navigation'; @import 'components/select'; @import 'components/tooltip'; @import 'components/tab-group'; diff --git a/libs/ui/src/lib/character-counter/character-counter.directive.ts b/libs/ui/src/lib/character-counter/character-counter.directive.ts index 9066c875..89b4e3c2 100644 --- a/libs/ui/src/lib/character-counter/character-counter.directive.ts +++ b/libs/ui/src/lib/character-counter/character-counter.directive.ts @@ -14,9 +14,7 @@ import { CharacterCounterComponent } from './character-counter.component'; selector: '[veeraNgCharacterCounter]', exportAs: 'veeraNgCharacterCounter', }) -export class CharacterCounterDirective - implements AfterViewInit -{ +export class CharacterCounterDirective implements AfterViewInit { @Input() maxChars = ''; private componentRef: ComponentRef | null = null; diff --git a/libs/ui/src/lib/feedback/feedback/feedback.component.ts b/libs/ui/src/lib/feedback/feedback/feedback.component.ts index 506917b3..39c051a2 100644 --- a/libs/ui/src/lib/feedback/feedback/feedback.component.ts +++ b/libs/ui/src/lib/feedback/feedback/feedback.component.ts @@ -44,8 +44,10 @@ export class FeedbackComponent /** Display or hide 'sad-face' and 'happy-face' icons */ @Input() showIcons = false; + /** @internal */ radioButtonsControl = new FormControl(''); + /** @internal */ private destroyed$ = new Subject(); // eslint-disable-next-line @typescript-eslint/no-empty-function diff --git a/libs/ui/src/lib/radio-button/radio-button/radio-button.component.html b/libs/ui/src/lib/radio-button/radio-button/radio-button.component.html index 93456ef3..2cc0f33a 100644 --- a/libs/ui/src/lib/radio-button/radio-button/radio-button.component.html +++ b/libs/ui/src/lib/radio-button/radio-button/radio-button.component.html @@ -1,5 +1,5 @@