Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
felixw committed Feb 23, 2024
2 parents 9cde0c8 + 81acd22 commit 014a698
Show file tree
Hide file tree
Showing 60 changed files with 1,688 additions and 153 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ jobs:
run: |
npm deprecate @telekom/scale-components-vue@~3.0.0-beta.17 "Please use @telekom/scale-components directly, see the Scale docs. Vue support for web components is already great."
- name: Deprecate Scale Design Tokens Package
run: |
npm deprecate @telekom/scale-design-tokens@~3.0.0-beta.100 "Deprecated in favor of @telekom/design-tokens."
publish-neutral:
runs-on: ubuntu-20.04
environment: RELEASE
Expand Down Expand Up @@ -190,6 +186,3 @@ jobs:
run: |
npm deprecate @telekom/scale-components-vue-neutral@~3.0.0-beta.17 "Please use @telekom/scale-components directly, see the Scale docs. Vue support for web components is already great."
- name: Deprecate Scale Design Tokens Package
run: |
npm deprecate @telekom/scale-design-tokens-neutral@~3.0.0-beta.100 "Deprecated in favor of @telekom/design-tokens."
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
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.149](https://github.com/telekom/scale/compare/v3.0.0-beta.148...v3.0.0-beta.149) (2024-02-23)


### Bug Fixes

* **telekom-profile-menu:** stories and flyout menu fixes ([#2273](https://github.com/telekom/scale/issues/2273)) ([aa0e237](https://github.com/telekom/scale/commit/aa0e2371305515f0e37fd06acc5d3c9c381d47ac))





# [3.0.0-beta.148](https://github.com/telekom/scale/compare/v3.0.0-beta.147...v3.0.0-beta.148) (2024-02-15)


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.148",
"version": "3.0.0-beta.149",
"command": {
"version": {
"allowBranch": "main"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"new-version": "lerna version --conventional-commits --no-push",
"force-version": "lerna version --conventional-commits --force-publish",
"format": "lerna run format",
"publish-telekom": "lerna publish -y from-package --no-verify-access --no-git-tag-version --no-push --force-publish @telekom/scale-components,@telekom/scale-components-react,@telekom/scale-components-angular,@telekom/scale-components-vue,@telekom/scale-design-tokens --dist-tag next",
"publish-telekom": "lerna publish -y from-package --no-verify-access --no-git-tag-version --no-push --force-publish @telekom/scale-components,@telekom/scale-components-react,@telekom/scale-components-angular,@telekom/scale-components-vue --dist-tag next",
"prepare-neutral": "node scripts/prepare-neutral-release.js && git commit . -m 'chore: temp commit'",
"publish-neutral": "lerna publish -y from-package --no-verify-access --no-git-tag-version --no-push --force-publish @telekom/scale-components-neutral,@telekom/scale-components-react-neutral,@telekom/scale-components-angular-neutral,@telekom/scale-components-vue-neutral,@telekom/scale-design-tokens-neutral --dist-tag next"
"publish-neutral": "lerna publish -y from-package --no-verify-access --no-git-tag-version --no-push --force-publish @telekom/scale-components-neutral,@telekom/scale-components-react-neutral,@telekom/scale-components-angular-neutral,@telekom/scale-components-vue-neutral --dist-tag next"
},
"devDependencies": {
"@commitlint/cli": "^12.1.1",
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.149](https://github.com/telekom/scale/compare/v3.0.0-beta.148...v3.0.0-beta.149) (2024-02-23)

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





# [3.0.0-beta.148](https://github.com/telekom/scale/compare/v3.0.0-beta.147...v3.0.0-beta.148) (2024-02-15)

**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.148",
"version": "3.0.0-beta.149",
"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.149](https://github.com/telekom/scale/compare/v3.0.0-beta.148...v3.0.0-beta.149) (2024-02-23)

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





# [3.0.0-beta.148](https://github.com/telekom/scale/compare/v3.0.0-beta.147...v3.0.0-beta.148) (2024-02-15)

**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.148",
"version": "3.0.0-beta.149",
"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-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.149](https://github.com/telekom/scale/compare/v3.0.0-beta.148...v3.0.0-beta.149) (2024-02-23)

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





# [3.0.0-beta.148](https://github.com/telekom/scale/compare/v3.0.0-beta.147...v3.0.0-beta.148) (2024-02-15)

**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.148",
"version": "3.0.0-beta.149",
"description": "Vue specific wrapper for @telekom/scale-components",
"license": "MPL-2.0",
"homepage": "https://github.com/telekom/scale",
Expand Down
11 changes: 11 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
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.149](https://github.com/telekom/scale/compare/v3.0.0-beta.148...v3.0.0-beta.149) (2024-02-23)


### Bug Fixes

* **telekom-profile-menu:** stories and flyout menu fixes ([#2273](https://github.com/telekom/scale/issues/2273)) ([aa0e237](https://github.com/telekom/scale/commit/aa0e2371305515f0e37fd06acc5d3c9c381d47ac))





# [3.0.0-beta.148](https://github.com/telekom/scale/compare/v3.0.0-beta.147...v3.0.0-beta.148) (2024-02-15)


Expand Down
3 changes: 1 addition & 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.148",
"version": "3.0.0-beta.149",
"description": "Scale is the digital design system for Telekom products and experiences.",
"homepage": "https://github.com/telekom/scale",
"repository": {
Expand Down Expand Up @@ -73,7 +73,6 @@
"@floating-ui/dom": "^1.2.8",
"@stencil/core": "^2.17.0",
"@telekom/design-tokens": "1.0.0-beta.10",
"@telekom/scale-design-tokens": "^3.0.0-beta.148",
"classnames": "^2.2.6",
"composed-offset-position": "^0.0.4",
"stencil-inline-svg": "^1.0.1"
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/components/badge/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class Badge {
aria-label={this.count ? this.getAriaLabel() : this.label}
>
<slot />
<slot name="dot" />
<span
aria-hidden="true"
part={cx(`circle`, this.count ? `has-count` : 'no-count')}
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/components/badge/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
### Used by

- [scale-telekom-header-data-back-compat](../telekom/telekom-header-data-back-compat)
- [scale-telekom-profile-menu](../telekom/telekom-profile-menu)

### Graph
```mermaid
graph TD;
scale-telekom-header-data-back-compat --> scale-badge
scale-telekom-profile-menu --> scale-badge
style scale-badge fill:#f9f,stroke:#333,stroke-width:4px
```

Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/components/button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ Type: `Promise<void>`
- [app-navigation-user-menu](../telekom/app-navigation-user-menu)
- [scale-data-grid](../data-grid)
- [scale-notification](../notification)
- [scale-telekom-profile-menu](../telekom/telekom-profile-menu)

### Graph
```mermaid
graph TD;
app-navigation-user-menu --> scale-button
scale-data-grid --> scale-button
scale-notification --> scale-button
scale-telekom-profile-menu --> scale-button
style scale-button fill:#f9f,stroke:#333,stroke-width:4px
```

Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/components/link/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,15 @@ Type: `Promise<void>`
- [scale-data-grid](../data-grid)
- [scale-notification-banner](../notification-banner)
- [scale-notification-toast](../notification-toast)
- [scale-telekom-profile-menu](../telekom/telekom-profile-menu)

### Graph
```mermaid
graph TD;
scale-data-grid --> scale-link
scale-notification-banner --> scale-link
scale-notification-toast --> scale-link
scale-telekom-profile-menu --> scale-link
style scale-link fill:#f9f,stroke:#333,stroke-width:4px
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export class MenuFlyoutList {
@Prop() brandHeaderDropdown: boolean = false;
/** (optional) Injected styles */
@Prop() styles?: string;
/** (optional) set to true to prevent flipping orientation when off the screen vertically */
@Prop() preventFlipVertical: boolean = false;

/** Event triggered when menu list opened */
@Event({ eventName: 'scale-open' }) scaleOpen: EventEmitter<{
Expand Down Expand Up @@ -102,6 +104,12 @@ export class MenuFlyoutList {
return this.trigger().getBoundingClientRect();
}

componentDidLoad() {
if (!this.hostElement.hasAttribute('role')) {
this.hostElement.setAttribute('role', 'menu');
}
}

componentDidRender() {
if (this.opened && this.needsCheckPlacement) {
this.setSize();
Expand Down Expand Up @@ -282,7 +290,10 @@ export class MenuFlyoutList {

updateTriggerAttributes() {
const trigger = this.trigger();
if (trigger && trigger.getAttribute('aria-haspopup') === 'true') {
if (
(trigger && trigger.getAttribute('aria-haspopup') === 'true') ||
trigger.classList.contains('scale-menu-trigger')
) {
trigger.setAttribute('aria-expanded', String(this.opened));
}
}
Expand Down Expand Up @@ -341,14 +352,14 @@ export class MenuFlyoutList {
if (rect.top < PAD) {
// console.log('off top edge');
isOutOfBounds = true;
if (this.direction.includes('top')) {
if (this.direction.includes('top') && !this.preventFlipVertical) {
this.flipVertical = true;
}
}
if (rect.bottom > this.windowHeight - PAD) {
// console.log('off bottom edge');
isOutOfBounds = true;
if (this.direction.includes('bottom')) {
if (this.direction.includes('bottom') && !this.preventFlipVertical) {
this.flipVertical = true;
}
}
Expand Down Expand Up @@ -467,7 +478,7 @@ export class MenuFlyoutList {

render() {
return (
<Host role="menu">
<Host class="scale-menu-flyout-list">
{this.styles && <style>{this.styles}</style>}
<div
class={this.getCssClassMap()}
Expand Down
21 changes: 12 additions & 9 deletions packages/components/src/components/menu-flyout-list/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@

## Properties

| Property | Attribute | Description | Type | Default |
| --------------------- | ----------------------- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------- |
| `active` | `active` | | `boolean` | `false` |
| `brandHeaderDropdown` | `brand-header-dropdown` | (optional) set to true when using in telekom-brand-header | `boolean` | `false` |
| `closeOnSelect` | `close-on-select` | (optional) Determines whether the flyout should close when a menu item is selected | `boolean` | `true` |
| `direction` | `direction` | (optional) Set preference for where the menu appears, space permitting | `"bottom-left" \| "bottom-right" \| "left" \| "right" \| "top-left" \| "top-right"` | `'bottom-right'` |
| `opened` | `opened` | | `boolean` | `false` |
| `styles` | `styles` | (optional) Injected styles | `string` | `undefined` |
| `trigger` | -- | | `() => HTMLElement` | `undefined` |
| Property | Attribute | Description | Type | Default |
| --------------------- | ----------------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------- |
| `active` | `active` | | `boolean` | `false` |
| `brandHeaderDropdown` | `brand-header-dropdown` | (optional) set to true when using in telekom-brand-header | `boolean` | `false` |
| `closeOnSelect` | `close-on-select` | (optional) Determines whether the flyout should close when a menu item is selected | `boolean` | `true` |
| `direction` | `direction` | (optional) Set preference for where the menu appears, space permitting | `"bottom-left" \| "bottom-right" \| "left" \| "right" \| "top-left" \| "top-right"` | `'bottom-right'` |
| `opened` | `opened` | | `boolean` | `false` |
| `preventFlipVertical` | `prevent-flip-vertical` | (optional) set to true to prevent flipping orientation when off the screen vertically | `boolean` | `false` |
| `styles` | `styles` | (optional) Injected styles | `string` | `undefined` |
| `trigger` | -- | | `() => HTMLElement` | `undefined` |


## Events
Expand Down Expand Up @@ -75,13 +76,15 @@ Type: `Promise<void>`
- [scale-app-header](../telekom/app-header)
- [scale-data-grid](../data-grid)
- [scale-telekom-header-data-back-compat](../telekom/telekom-header-data-back-compat)
- [scale-telekom-profile-menu](../telekom/telekom-profile-menu)

### Graph
```mermaid
graph TD;
scale-app-header --> scale-menu-flyout-list
scale-data-grid --> scale-menu-flyout-list
scale-telekom-header-data-back-compat --> scale-menu-flyout-list
scale-telekom-profile-menu --> scale-menu-flyout-list
style scale-menu-flyout-list fill:#f9f,stroke:#333,stroke-width:4px
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import { Component, Prop, h, Host, Element, Listen } from '@stencil/core';
import { isClickOutside } from '../../utils/utils';

const MENU_SELECTOR = '[role="menu"]';
const MENU_SELECTOR = '.scale-menu-flyout-list';

const isButtonOrLink = (el: HTMLElement) => {
if (
Expand All @@ -34,6 +34,8 @@ export class MenuFlyout {

/** (optional) Determines whether the flyout should close when a menu item is selected */
@Prop() closeOnSelect = true;
/** (optional) Determines whether the flyout trigger should get the aria-haspopup attribute */
@Prop() triggerHasPopup = true;
/** (optional) Set preference for where the menu appears, space permitting */
@Prop() direction:
| 'bottom-right'
Expand Down Expand Up @@ -152,7 +154,10 @@ export class MenuFlyout {
.concat([isButtonOrLink(this.trigger)])
.filter((x) => x != null);
triggers.forEach((el) => {
el.setAttribute('aria-haspopup', 'true');
if (this.triggerHasPopup) {
el.setAttribute('aria-haspopup', 'true');
}
el.classList.add('scale-menu-trigger');
el.setAttribute('aria-expanded', 'false');
});
}
Expand Down
Loading

0 comments on commit 014a698

Please sign in to comment.