Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch 'main' into release #2355

Merged
merged 8 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,15 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v3
with:
node-version: 16

- name: Set up Docker Compose alias
run: |
sudo touch /usr/bin/docker-compose
echo 'docker compose --compatibility "$@"' | sudo tee /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose

- name: Restore Lerna
id: yarn-cache
uses: actions/cache@v2
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
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.153](https://github.com/amir-ba/scale/compare/v3.0.0-beta.152...v3.0.0-beta.153) (2024-09-19)


### Bug Fixes

* dropdown scroll fixed ([#2327](https://github.com/scale/issues/2327)) ([6f326eb](https://github.com/telekom/scale/commit/6f326eb138eff93080d39b1c74d48d9393fd1684))
* chip accessibility fix ([#2328](https://github.com/telekom/scale/issues/2328)) ([0b21978](https://github.com/telekom/scale/commit/0b21978bad9516d9958aa61e733a3f8348d11799))
* checkbox and switch css fixes for high contrast mode ([#2300](https://github.com/scale/issues/2300)) ([318df56](https://github.com/telekom/scale/commit/318df5658a21b7eea44abe37eba1fc6bedfc243c))
* ghost btn in storybook ([#2312](https://github.com/scale/issues/2312)) ([168f710](https://github.com/telekom/scale/commit/168f710fedae9df7f08decb79066b14bd7f73d1e))
* update of event descriptions in storybook ([#2315](https://github.com/scale/issues/2315)) ([8681ed8](https://github.com/telekom/scale/commit/8681ed8d4f1cd08a756cf7e952e520df840c40b4))
* aria describedby added extended for other use cases in text field ([#2349](https://github.com/scale/issues/2349)) ([2706542](https://github.com/telekom/scale/commit/270654297695571068c894aee30178729f361833))



# [3.0.0-beta.152](https://github.com/telekom/scale/compare/v3.0.0-beta.151...v3.0.0-beta.152) (2024-07-10)


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.152",
"version": "3.0.0-beta.153",
"command": {
"version": {
"allowBranch": "main"
Expand Down
9 changes: 9 additions & 0 deletions packages/components-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
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.153](https://github.com/telekom/scale/compare/v3.0.0-beta.152...v3.0.0-beta.153) (2024-09-19)

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






# [3.0.0-beta.152](https://github.com/telekom/scale/compare/v3.0.0-beta.151...v3.0.0-beta.152) (2024-07-10)

**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.152",
"version": "3.0.0-beta.153",
"description": "Angular specific wrapper for @telekom/scale-components",
"license": "MPL-2.0",
"homepage": "https://github.com/telekom/scale",
Expand Down
9 changes: 9 additions & 0 deletions packages/components-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
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.153](https://github.com/telekom/scale/compare/v3.0.0-beta.152...v3.0.0-beta.153) (2024-09-19)

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






# [3.0.0-beta.152](https://github.com/telekom/scale/compare/v3.0.0-beta.151...v3.0.0-beta.152) (2024-07-10)

**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.152",
"version": "3.0.0-beta.153",
"description": "React proxy for @telekom/scale-components",
"license": "MPL-2.0",
"homepage": "https://github.com/telekom/scale",
Expand Down
9 changes: 9 additions & 0 deletions packages/components-vue/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
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.153](https://github.com/telekom/scale/compare/v3.0.0-beta.152...v3.0.0-beta.153) (2024-09-19)

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






# [3.0.0-beta.152](https://github.com/telekom/scale/compare/v3.0.0-beta.151...v3.0.0-beta.152) (2024-07-10)

**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.152",
"version": "3.0.0-beta.153",
"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.153](https://github.com/telekom/scale/compare/v3.0.0-beta.152...v3.0.0-beta.153) (2024-09-19)


### Bug Fixes

* dropdown scroll fixed ([#2327](https://github.com/scale/issues/2327)) ([6f326eb](https://github.com/telekom/scale/commit/6f326eb138eff93080d39b1c74d48d9393fd1684))
* chip accessibility fix ([#2328](https://github.com/telekom/scale/issues/2328)) ([0b21978](https://github.com/telekom/scale/commit/0b21978bad9516d9958aa61e733a3f8348d11799))
* checkbox and switch css fixes for high contrast mode ([#2300](https://github.com/scale/issues/2300)) ([318df56](https://github.com/telekom/scale/commit/318df5658a21b7eea44abe37eba1fc6bedfc243c))
* ghost btn in storybook ([#2312](https://github.com/scale/issues/2312)) ([168f710](https://github.com/telekom/scale/commit/168f710fedae9df7f08decb79066b14bd7f73d1e))
* update of event descriptions in storybook ([#2315](https://github.com/scale/issues/2315)) ([8681ed8](https://github.com/telekom/scale/commit/8681ed8d4f1cd08a756cf7e952e520df840c40b4))
* aria describedby added extended for other use cases in text field ([#2349](https://github.com/scale/issues/2349)) ([2706542](https://github.com/telekom/scale/commit/270654297695571068c894aee30178729f361833))




# [3.0.0-beta.152](https://github.com/telekom/scale/compare/v3.0.0-beta.151...v3.0.0-beta.152) (2024-07-10)


Expand Down
2 changes: 1 addition & 1 deletion 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.152",
"version": "3.0.0-beta.153",
"description": "Scale is the digital design system for Telekom products and experiences.",
"homepage": "https://github.com/telekom/scale",
"repository": {
Expand Down
13 changes: 13 additions & 0 deletions packages/components/src/components/checkbox/checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ scale-checkbox.indeterminate [part='checkbox'] {
border: none;
color: var(--color-icon-checked-active);
}

@media screen and (forced-colors: active), (-ms-high-contrast: active) {
scale-checkbox.indeterminate [part='checkbox'] {
border: 1px solid;
}
}

scale-checkbox.indeterminate [part='icon'] {
color: var(--color-icon-checked-active);
}
Expand Down Expand Up @@ -256,6 +263,12 @@ scale-checkbox.error [part='checkbox'] {
border: none;
}

@media screen and (forced-colors: active), (-ms-high-contrast: active) {
scale-checkbox.error [part='checkbox'] {
border: 1px solid;
}
}

scale-checkbox.error
[part='input']:focus
~ [part='container']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`Chip should match snapshot 1`] = `
<scale-chip>
<mock:shadow-root>
<span aria-checked="false" class="chip chip--type-persistent chip--variant-standard" part="base type-persistent variant-standard" role="switch" tabindex="-1">
<span aria-checked="false" class="chip chip--type-persistent chip--variant-standard" part="base type-persistent variant-standard" role="switch" tabindex="0">
<slot name="chip-icon"></slot>
<span class="chip-label">
<slot></slot>
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/components/chip/chip.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@
color: var(--telekom-color-text-and-icon-inverted-standard);
}

.chip:not(.chip--disabled):not(.chip--type-dynamic):focus,
.chip.chip--type-dynamic:not(.chip--selected):focus {
.chip:not(.chip--disabled):focus {
outline: var(--telekom-spacing-composition-space-02) solid var(--color-focus);
outline-offset: var(--telekom-spacing-composition-space-01);
}
Expand Down
73 changes: 27 additions & 46 deletions packages/components/src/components/chip/chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class Chip {
/** (optional) */
@Prop() type?: 'dynamic' | 'persistent' = 'persistent';
/** (optional) */
@Prop() selected?: boolean = false;
@Prop({ mutable: true }) selected?: boolean = false;
/** (optional) chip aria-role */
@Prop() ariaRoleTitle?:
| 'switch'
Expand All @@ -52,7 +52,7 @@ export class Chip {
/** (optional) Injected CSS styles */
@Prop() styles?: string;

/** (optional) Change icon click event */
/** (optional) Change event */
@Event({ eventName: 'scale-change' }) scaleChange: EventEmitter<MouseEvent>;
/** @deprecated in v3 in favor of kebab-case event names */
@Event({ eventName: 'scaleChange' })
Expand Down Expand Up @@ -87,21 +87,26 @@ export class Chip {
handleClose = (event: MouseEvent) => {
event.preventDefault();
event.stopPropagation();
if (this.disabled && this.type !== 'dynamic') {
return;
}
emitEvent(this, 'scaleClose', event);
};

handleClick = (event: MouseEvent) => {
if (this.type !== 'dynamic') {
this.selected = !this.selected;
this.handleChange(event);
};

handleKeyDown = (event: KeyboardEvent) => {
if (event.code === 'Space') {
this.handleChange(event);
}
};

handleChange = (event: MouseEvent | KeyboardEvent): void => {
event.preventDefault();
event.stopPropagation();
if (this.disabled && this.type !== 'dynamic') {
if (this.disabled || this.type === 'dynamic') {
return;
}
this.selected = !this.selected;
emitEvent(this, 'scaleChange', event);
};

Expand Down Expand Up @@ -140,45 +145,21 @@ export class Chip {
return (
<Host>
{this.styles && <style>{this.styles}</style>}
{this.type === 'dynamic' && this.selected ? (
<span
role={this.ariaRoleTitle}
tabindex={this.selected ? '0' : '-1'}
part={this.getBasePartMap()}
class={this.getCssClassMap()}
aria-checked={this.selected.toString()}
onClick={
!this.disabled || this.type === 'dynamic'
? this.handleClick
: null
}
>
<slot name="chip-icon"></slot>
<span class="chip-label">
<slot />
</span>
{this.selected ? this.getIcon() : null}
</span>
) : (
<span
role={this.ariaRoleTitle}
aria-checked={this.selected.toString()}
tabindex={this.selected ? '0' : '-1'}
part={this.getBasePartMap()}
class={this.getCssClassMap()}
onClick={
!this.disabled || this.type === 'dynamic'
? this.handleClick
: null
}
>
<slot name="chip-icon"></slot>
<span class="chip-label">
<slot />
</span>
{this.selected ? this.getIcon() : null}
<span
role={this.ariaRoleTitle}
aria-checked={this.selected.toString()}
tabindex={this.disabled ? '-1' : '0'}
part={this.getBasePartMap()}
class={this.getCssClassMap()}
onClick={this.handleClick}
onKeyDown={this.handleKeyDown}
>
<slot name="chip-icon"></slot>
<span class="chip-label">
<slot />
</span>
)}
{this.selected ? this.getIcon() : null}
</span>
</Host>
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/chip/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

| Event | Description | Type |
| -------------- | -------------------------------------------------------------------------------------------------- | ------------------------- |
| `scale-change` | (optional) Change icon click event | `CustomEvent<MouseEvent>` |
| `scale-change` | (optional) Change event | `CustomEvent<MouseEvent>` |
| `scale-close` | (optional) Close icon click event | `CustomEvent<MouseEvent>` |
| `scaleChange` | <span style="color:red">**[DEPRECATED]**</span> in v3 in favor of kebab-case event names<br/><br/> | `CustomEvent<MouseEvent>` |
| `scaleClose` | <span style="color:red">**[DEPRECATED]**</span> in v3 in favor of kebab-case event names<br/><br/> | `CustomEvent<MouseEvent>` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export class DropdownSelect {
@State() hasFocus: boolean = false;

private comboEl: HTMLElement;
private listboxEl: HTMLElement;
private scrollContainer: HTMLElement;
private listboxPadEl: HTMLElement;
private hiddenInput: HTMLInputElement;

Expand Down Expand Up @@ -346,10 +346,10 @@ export class DropdownSelect {

bringIntoView(index) {
const options: NodeListOf<HTMLElement> =
this.listboxEl.querySelectorAll('[role=option]');
this.scrollContainer.querySelectorAll('[role=option]');

if (hasOverflow(this.listboxEl)) {
keepInView(options[index], this.listboxEl);
if (hasOverflow(this.scrollContainer)) {
keepInView(options[index], this.scrollContainer);
}

if (!isInView(options[index])) {
Expand Down Expand Up @@ -530,13 +530,13 @@ export class DropdownSelect {
</div>
<div part="listbox-pad" ref={(el) => (this.listboxPadEl = el)}>
<div
ref={(el) => (this.scrollContainer = el)}
part="listbox-scroll-container"
onMouseDown={(e) => {
e.preventDefault();
}}
>
<div
ref={(el) => (this.listboxEl = el)}
part="listbox"
role="listbox"
id={`${this.comboboxId}-listbox`}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/switch/switch.css
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ scale-switch scale-icon-action-success {
.switch__toggle {
border: 1px solid;
}
scale-icon-action-checkmark {
scale-switch scale-icon-action-checkmark {
visibility: hidden !important;
}
}
2 changes: 0 additions & 2 deletions packages/components/src/components/text-field/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# scale-text-field



<!-- Auto Generated Below -->


Expand Down
Loading
Loading