Skip to content

Commit

Permalink
Merge branch 'main' into docs/storybook-internalize-legal-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
nowseemee authored Jan 14, 2022
2 parents ba6a565 + e87cc07 commit 95c8d09
Show file tree
Hide file tree
Showing 75 changed files with 363 additions and 190 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-beta.42](https://github.com/telekom/scale/compare/v3.0.0-beta.41...v3.0.0-beta.42) (2022-01-14)


### Bug Fixes

* **checkbox:** spacing problem ([#783](https://github.com/telekom/scale/issues/783)) ([3507aa2](https://github.com/telekom/scale/commit/3507aa24d37bcdf6c2ea5781e5669c517e358072))
* **dropdown:** set default background color ([#787](https://github.com/telekom/scale/issues/787)) ([b381940](https://github.com/telekom/scale/commit/b381940f135619e1945db00876b8de30973c7d3f))
* **notification-message:** add lifecycle method for slots ([#793](https://github.com/telekom/scale/issues/793)) ([026fbd3](https://github.com/telekom/scale/commit/026fbd355fd891944583079373c417e2e37203ee))
* **spinner:** centering problems ([#791](https://github.com/telekom/scale/issues/791)) ([8f84642](https://github.com/telekom/scale/commit/8f84642c1f3cb0991ca4e3c9b713973b7d32599e))
* **toggle-button:** left side border is missing when there is only one button in the group ([#782](https://github.com/telekom/scale/issues/782)) ([71469b1](https://github.com/telekom/scale/commit/71469b19f6a02651b690f22dcff78b1826dabc34))





# [3.0.0-beta.41](https://github.com/telekom/scale/compare/v3.0.0-beta.40...v3.0.0-beta.41) (2022-01-11)


Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"--pure-lockfile"
],
"useWorkspaces": true,
"version": "3.0.0-beta.41",
"version": "3.0.0-beta.42",
"command": {
"version": {
"allowBranch": "main"
Expand Down
8 changes: 8 additions & 0 deletions packages/components-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-beta.42](https://github.com/telekom/scale/compare/v3.0.0-beta.41...v3.0.0-beta.42) (2022-01-14)

**Note:** Version bump only for package @telekom/scale-components-angular





# [3.0.0-beta.41](https://github.com/telekom/scale/compare/v3.0.0-beta.40...v3.0.0-beta.41) (2022-01-11)

**Note:** Version bump only for package @telekom/scale-components-angular
Expand Down
2 changes: 1 addition & 1 deletion packages/components-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@telekom/scale-components-angular",
"version": "3.0.0-beta.41",
"version": "3.0.0-beta.42",
"description": "Angular specific wrapper for @telekom/scale-components",
"license": "MPL-2.0",
"homepage": "https://github.com/telekom/scale",
Expand Down
8 changes: 8 additions & 0 deletions packages/components-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-beta.42](https://github.com/telekom/scale/compare/v3.0.0-beta.41...v3.0.0-beta.42) (2022-01-14)

**Note:** Version bump only for package @telekom/scale-components-react





# [3.0.0-beta.41](https://github.com/telekom/scale/compare/v3.0.0-beta.40...v3.0.0-beta.41) (2022-01-11)

**Note:** Version bump only for package @telekom/scale-components-react
Expand Down
2 changes: 1 addition & 1 deletion packages/components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@telekom/scale-components-react",
"sideEffects": false,
"version": "3.0.0-beta.41",
"version": "3.0.0-beta.42",
"description": "React proxy for @telekom/scale-components",
"license": "MPL-2.0",
"homepage": "https://github.com/telekom/scale",
Expand Down
8 changes: 8 additions & 0 deletions packages/components-sketch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-beta.42](https://github.com/telekom/scale/compare/v3.0.0-beta.41...v3.0.0-beta.42) (2022-01-14)

**Note:** Version bump only for package @telekom/scale-components-sketch-telekom





# [3.0.0-beta.41](https://github.com/telekom/scale/compare/v3.0.0-beta.40...v3.0.0-beta.41) (2022-01-11)

**Note:** Version bump only for package @telekom/scale-components-sketch-telekom
Expand Down
2 changes: 1 addition & 1 deletion packages/components-sketch/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@telekom/scale-components-sketch-telekom",
"private": true,
"version": "3.0.0-beta.41",
"version": "3.0.0-beta.42",
"description": "",
"license": "MPL-2.0",
"scripts": {
Expand Down
8 changes: 8 additions & 0 deletions packages/components-vue/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-beta.42](https://github.com/telekom/scale/compare/v3.0.0-beta.41...v3.0.0-beta.42) (2022-01-14)

**Note:** Version bump only for package @telekom/scale-components-vue





# [3.0.0-beta.41](https://github.com/telekom/scale/compare/v3.0.0-beta.40...v3.0.0-beta.41) (2022-01-11)

**Note:** Version bump only for package @telekom/scale-components-vue
Expand Down
2 changes: 1 addition & 1 deletion packages/components-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@telekom/scale-components-vue",
"sideEffects": false,
"version": "3.0.0-beta.41",
"version": "3.0.0-beta.42",
"description": "Vue specific wrapper for @telekom/scale-components",
"license": "MPL-2.0",
"homepage": "https://github.com/telekom/scale",
Expand Down
15 changes: 15 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [3.0.0-beta.42](https://github.com/telekom/scale/compare/v3.0.0-beta.41...v3.0.0-beta.42) (2022-01-14)


### Bug Fixes

* **checkbox:** spacing problem ([#783](https://github.com/telekom/scale/issues/783)) ([3507aa2](https://github.com/telekom/scale/commit/3507aa24d37bcdf6c2ea5781e5669c517e358072))
* **dropdown:** set default background color ([#787](https://github.com/telekom/scale/issues/787)) ([b381940](https://github.com/telekom/scale/commit/b381940f135619e1945db00876b8de30973c7d3f))
* **notification-message:** add lifecycle method for slots ([#793](https://github.com/telekom/scale/issues/793)) ([026fbd3](https://github.com/telekom/scale/commit/026fbd355fd891944583079373c417e2e37203ee))
* **spinner:** centering problems ([#791](https://github.com/telekom/scale/issues/791)) ([8f84642](https://github.com/telekom/scale/commit/8f84642c1f3cb0991ca4e3c9b713973b7d32599e))
* **toggle-button:** left side border is missing when there is only one button in the group ([#782](https://github.com/telekom/scale/issues/782)) ([71469b1](https://github.com/telekom/scale/commit/71469b19f6a02651b690f22dcff78b1826dabc34))





# [3.0.0-beta.41](https://github.com/telekom/scale/compare/v3.0.0-beta.40...v3.0.0-beta.41) (2022-01-11)


Expand Down
4 changes: 2 additions & 2 deletions packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@telekom/scale-components",
"version": "3.0.0-beta.41",
"version": "3.0.0-beta.42",
"description": "Scale is the digital design system for Telekom products and experiences.",
"homepage": "https://github.com/telekom/scale",
"repository": {
Expand Down Expand Up @@ -70,7 +70,7 @@
"@popperjs/core": "2.6.0",
"@proyecto26/animatable-component": "^1.1.8",
"@stencil/core": "^2.7.1",
"@telekom/scale-design-tokens": "^3.0.0-beta.41",
"@telekom/scale-design-tokens": "^3.0.0-beta.42",
"classnames": "^2.2.6",
"stencil-inline-svg": "^1.0.1",
"web-animations-js": "^2.3.2"
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/components/checkbox/checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ scale-checkbox {
:host,
scale-checkbox {
display: flex;
width: fit-content;
padding: 0 2px 0 2px;
flex-direction: column;
color: var(--color-text);
}
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/components/dropdown/dropdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ scale-dropdown {
text-overflow: ellipsis;
appearance: none;
-webkit-appearance: none;
background-color: var(--scl-color-background-standard);
}

@-moz-document url-prefix() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`LoadingSpinner should match snapshot 1`] = `
<div aria-live="polite" class="sr-only" id="spinner-label-1">
Loading
</div>
<div aria-hidden="true" class="spinner__text" part="text"></div>
<div></div>
</div>
</mock:shadow-root>
</scale-loading-spinner>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
--font-weight: var(--scl-font-weight-bold);
--font-size: var(--scl-font-size-16);

--spacing: var(--scl-spacing-8);

--color-circle-primary: var(--scl-color-primary);
--color-circle-primary-inner: var(--scl-color-grey-20);
--color-text-primary: var(--scl-color-grey-60);
Expand Down Expand Up @@ -55,35 +53,41 @@

.spinner.spinner--alignment-horizontal.spinner--size-small .spinner__text {
line-height: var(--line-height-size-small);
padding-left: 12px;
}

.spinner.spinner--alignment-horizontal.spinner--size-large .spinner__text {
line-height: var(--line-height-size-large);
margin-top: 5px;
padding-left: 12px;
}

.spinner.spinner--alignment-vertical .spinner__text {
margin-top: var(--spacing);
}

.spinner.spinner--alignment-vertical.spinner--size-small .spinner__container {
height: 24px;
padding-bottom: 5px;
height: 28px;
width: 28px;
padding-bottom: 4px;
}

.spinner.spinner--alignment-vertical.spinner--size-large .spinner__container {
height: 48px;
padding-bottom: 5px;
height: 56px;
width: 56px;
padding-bottom: 4px;
}

.spinner.spinner--alignment-horizontal.spinner--size-small .spinner__container {
height: 24px;
padding-right: 30px;
height: 28px;
width: 28px;
text-align: left;
}

.spinner.spinner--alignment-horizontal.spinner--size-large .spinner__container {
height: 48px;
padding-right: 60px;
height: 56px;
width: 56px;
text-align: left;
}

.spinner .spinner__container .spinner__circle {
Expand All @@ -101,35 +105,11 @@
height: var(--size-outer-small);
}

.spinner.spinner.spinner--alignment-vertical
.spinner__container
.spinner__circle-background {
margin-left: -15px;
}

.spinner.spinner--size-large .spinner__container .spinner__circle-background {
width: var(--size-outer-large);
height: var(--size-outer-large);
}

.spinner.spinner--alignment-vertical.spinner--size-large
.spinner__container
.spinner__circle-background {
margin-left: -30px;
}

.spinner.spinner.spinner--alignment-vertical
.spinner__container
.spinner__circle {
margin-left: -15px;
}

.spinner.spinner--alignment-vertical.spinner--size-large
.spinner__container
.spinner__circle {
margin-left: -30px;
}

.spinner.spinner--size-large .spinner__container .spinner__circle {
width: var(--size-inner-large);
height: var(--size-inner-large);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ export class LoadingSpinner {
<div class="sr-only" aria-live="polite" id={`spinner-label-${i}`}>
{this.text || 'Loading'}
</div>
<div part="text" class="spinner__text" aria-hidden="true">
{this.text}
</div>
{this.text ? (
<div part="text" class="spinner__text" aria-hidden="true">
{this.text}
</div>
) : (
<div></div>
)}
</div>
</Host>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

import {
Component,
h,
Host,
Prop,
Element,
Method,
State,
} from '@stencil/core';
import { Component, h, Host, Prop, Element, Method } from '@stencil/core';
import classNames from 'classnames';
import statusNote from '../../utils/status-note';

Expand All @@ -37,16 +29,17 @@ export class NotificationBanner {
@Prop() autoHideDuration?: number = 3000;
@Prop() href: string;

@State() hasText?: boolean;
@State() hasLink?: boolean;
hasSlotText?: boolean;
hasSlotLink?: boolean;

componentWillLoad() {
if (this.hostElement.querySelectorAll('[slot=text]').length !== 0) {
this.hasText = true;
}
if (this.hostElement.querySelectorAll('[slot=link]').length !== 0) {
this.hasLink = true;
}
this.hasSlotText = !!this.hostElement.querySelector('[slot=text]');
this.hasSlotLink = !!this.hostElement.querySelector('[slot=link]');
}

componentDidUpdate() {
this.hasSlotText = !!this.hostElement.querySelector('[slot=text]');
this.hasSlotLink = !!this.hostElement.querySelector('[slot=link]');
}

connectedCallback() {
Expand Down Expand Up @@ -133,17 +126,17 @@ export class NotificationBanner {
<scale-icon-action-circle-close accessibility-title="close" />
</button>
)}
{this.hasText ? (
{this.hasSlotText && (
<div part="text" class="notification-banner__text">
<slot name="text" />
</div>
) : null}
)}

{this.hasLink ? (
{this.hasSlotLink && (
<scale-link href={this.href} class="notification-banner__link">
<slot name="link" />
</scale-link>
) : null}
)}
</div>
</div>
</div>
Expand All @@ -166,8 +159,8 @@ export class NotificationBanner {
return classNames(
name,
this.variant && `${prefix}variant-${this.variant}`,
this.hasText && `${prefix}has-text`,
!this.hasText && `${prefix}has-no-text`
this.hasSlotText && `${prefix}has-text`,
!this.hasSlotText && `${prefix}has-no-text`
);
}
}
Loading

0 comments on commit 95c8d09

Please sign in to comment.