Skip to content

Commit

Permalink
chore: temporarily revert "feat(telekom-profile-menu): WIP (#2208)" (#…
Browse files Browse the repository at this point in the history
…2274)

This reverts commit 41374f0.
  • Loading branch information
Arturo Castillo Delgado authored Feb 8, 2024
1 parent 41374f0 commit b953a37
Show file tree
Hide file tree
Showing 34 changed files with 43 additions and 1,604 deletions.
1 change: 0 additions & 1 deletion packages/components/src/components/badge/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ 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: 0 additions & 2 deletions packages/components/src/components/badge/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@
### Used by

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

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

Expand Down
2 changes: 0 additions & 2 deletions packages/components/src/components/button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,13 @@ Type: `Promise<void>`
- [app-navigation-user-menu](../telekom/app-navigation-user-menu)
- [scale-data-grid](../data-grid)
- [scale-notification](../notification)
- [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
telekom-profile-menu --> scale-button
style scale-button fill:#f9f,stroke:#333,stroke-width:4px
```

Expand Down
2 changes: 0 additions & 2 deletions packages/components/src/components/link/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,13 @@ Type: `Promise<void>`
- [scale-data-grid](../data-grid)
- [scale-notification-banner](../notification-banner)
- [scale-notification-toast](../notification-toast)
- [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
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,11 +59,6 @@ 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;

/** (optional) override to set a custom role */
@Prop() role? = "menu";

/** Event triggered when menu list opened */
@Event({ eventName: 'scale-open' }) scaleOpen: EventEmitter<{
Expand Down Expand Up @@ -287,7 +282,7 @@ export class MenuFlyoutList {

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

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

## 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` |
| `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` |
| 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` |


## Events
Expand Down Expand Up @@ -76,15 +75,13 @@ 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)
- [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
telekom-profile-menu --> scale-menu-flyout-list
style scale-menu-flyout-list fill:#f9f,stroke:#333,stroke-width:4px
```

Expand Down
13 changes: 2 additions & 11 deletions packages/components/src/components/menu-flyout/menu-flyout.tsx
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 = '.scale-menu';
const MENU_SELECTOR = '[role="menu"]';

const isButtonOrLink = (el: HTMLElement) => {
if (
Expand All @@ -34,8 +34,6 @@ 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() hasPopup = true;
/** (optional) Set preference for where the menu appears, space permitting */
@Prop() direction:
| 'bottom-right'
Expand Down Expand Up @@ -154,14 +152,7 @@ export class MenuFlyout {
.concat([isButtonOrLink(this.trigger)])
.filter((x) => x != null);
triggers.forEach((el) => {

if(this.hasPopup) {
el.setAttribute('aria-haspopup', 'true');
}

el.setAttribute('class', 'scale-menu-trigger');


el.setAttribute('aria-haspopup', 'true');
el.setAttribute('aria-expanded', 'false');
});
}
Expand Down
2 changes: 0 additions & 2 deletions packages/components/src/components/menu-flyout/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@
- [scale-app-header](../telekom/app-header)
- [scale-data-grid](../data-grid)
- [scale-telekom-header-data-back-compat](../telekom/telekom-header-data-back-compat)
- [telekom-profile-menu](../telekom/telekom-profile-menu)

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class AppNavigationUserMenu {
@Element() hostElement: HTMLElement;
@Prop() hide: () => void;
@Prop() navigation: any;
@Prop() styles: string;
@Event({
eventName: 'closeMenu',
composed: true,
Expand All @@ -41,10 +40,7 @@ export class AppNavigationUserMenu {
render() {
return (
<Host>
{this.styles && <style>{this.styles}</style>}
<div class="app-navigation-user-menu">
<slot />

{this.navigation.map((item) => {
if (item.type === 'divider') {
return (
Expand All @@ -57,10 +53,7 @@ export class AppNavigationUserMenu {

if (item.type === 'userInfo') {
return (
<div
class="app-navigation-user-menu__user-info"
part="userInfo"
>
<div class="app-navigation-user-menu__user-info">
<div class="app-navigation-user-menu__user-info--name scl-font-variant-heading-4">
{item.name}
</div>
Expand All @@ -78,7 +71,6 @@ export class AppNavigationUserMenu {
target={item.target || '_self'}
tabindex={0}
class="app-navigation-user-menu__item"
part="item"
onClick={(e) => {
e.stopImmediatePropagation();
if (item.onClick) {
Expand Down Expand Up @@ -125,7 +117,6 @@ export class AppNavigationUserMenu {
return (
<scale-button
class="app-navigation-user-menu__button"
part="button"
onClick={(e) => {
if (item.onClick) {
item.onClick(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
| ------------ | ------------ | ----------- | ------------ | ----------- |
| `hide` | -- | | `() => void` | `undefined` |
| `navigation` | `navigation` | | `any` | `undefined` |
| `styles` | `styles` | | `string` | `undefined` |


## Events
Expand All @@ -25,10 +24,7 @@

| Part | Description |
| ------------------- | ----------- |
| `"button"` | |
| `"item"` | |
| `"rule-horizontal"` | |
| `"userinfo"` | |


## Dependencies
Expand All @@ -37,7 +33,6 @@

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

### Depends on

Expand All @@ -51,7 +46,6 @@ graph TD;
app-navigation-user-menu --> scale-icon
scale-app-header --> app-navigation-user-menu
scale-telekom-header-data-back-compat --> app-navigation-user-menu
telekom-profile-menu --> app-navigation-user-menu
style app-navigation-user-menu fill:#f9f,stroke:#333,stroke-width:4px
```

Expand Down
8 changes: 4 additions & 4 deletions packages/components/src/components/telekom/logo/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# scale-logo



# scale-logo



<!-- Auto Generated Below -->


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# scale-telekom-footer-extended-navigation-column



# scale-telekom-footer-extended-navigation-column



<!-- Auto Generated Below -->


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# scale-telekom-footer



# scale-telekom-footer



<!-- Auto Generated Below -->


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# scale-telekom-mega-menu-column



# scale-telekom-mega-menu-column



<!-- Auto Generated Below -->


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
### Used by

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

### Depends on

Expand All @@ -51,7 +50,6 @@
graph TD;
scale-telekom-mobile-flyout-canvas --> scale-icon-action-close
scale-telekom-header-data-back-compat --> scale-telekom-mobile-flyout-canvas
telekom-profile-menu --> scale-telekom-mobile-flyout-canvas
style scale-telekom-mobile-flyout-canvas fill:#f9f,stroke:#333,stroke-width:4px
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ Type: `Promise<void>`
### Used by

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@
### Used by

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,6 @@
width: 20px;
}

.scale-telekom-nav-list[variant='functions'] [slot='dot'] .scale-icon {
height: 12px;
width: 12px;
}

@media screen and (--2xl) {
.scale-telekom-nav-list[variant='functions'] .scale-icon {
height: 24px;
Expand Down
Loading

0 comments on commit b953a37

Please sign in to comment.