Skip to content

Commit

Permalink
fix(menu)!: rename "lib" directory to "internal"
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Rename `@material/web/menu/lib` to `@material/web/menu/internal`. Prefer not using internal files.

PiperOrigin-RevId: 550589890
  • Loading branch information
AndrewJakubowicz authored and copybara-github committed Jul 24, 2023
1 parent c6e6f65 commit a8c2fa9
Show file tree
Hide file tree
Showing 29 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion field/internal/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {property, query, queryAssignedElements, state} from 'lit/decorators.js';
import {classMap} from 'lit/directives/class-map.js';

import {EASING} from '../../internal/motion/animation.js';
import {SurfacePositionTarget} from '../../menu/lib/surfacePositionController.js';
import {SurfacePositionTarget} from '../../menu/internal/surfacePositionController.js';

/**
* A field component.
Expand Down
2 changes: 1 addition & 1 deletion menu/_menu-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// SPDX-License-Identifier: Apache-2.0
//

@forward './lib/menuitem/menu-item' show theme;
@forward './internal/menuitem/menu-item' show theme;
2 changes: 1 addition & 1 deletion menu/_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// SPDX-License-Identifier: Apache-2.0
//

@forward './lib/menu' show theme;
@forward './internal/menu' show theme;
2 changes: 1 addition & 1 deletion menu/demo/stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import '@material/web/divider/divider.js';
import '@material/web/icon/icon.js';

import {MaterialStoryInit} from './material-collection.js';
import {CloseMenuEvent} from '@material/web/menu/lib/shared.js';
import {CloseMenuEvent} from '@material/web/menu/internal/shared.js';
import {Corner, DefaultFocusState, MdMenu} from '@material/web/menu/menu.js';
import {css, html, nothing, TemplateResult} from 'lit';
import {createRef, ref, Ref} from 'lit/directives/ref.js';
Expand Down
6 changes: 3 additions & 3 deletions menu/harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {LitElement} from 'lit';

import {Harness} from '../testing/harness.js';

import {Menu} from './lib/menu.js';
import {MenuItemHarness} from './lib/menuitem/harness.js';
import {Menu} from './internal/menu.js';
import {MenuItemHarness} from './internal/menuitem/harness.js';

export {MenuItemHarness} from './lib/menuitem/harness.js';
export {MenuItemHarness} from './internal/menuitem/harness.js';

/**
* Test harness for menu.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions menu/menu-item-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import {customElement} from 'lit/decorators.js';
import {styles as listItemForcedColorsStyles} from '../list/internal/listitem/forced-colors-styles.css.js';
import {styles as listItemStyles} from '../list/internal/listitem/list-item-styles.css.js';

import {styles as forcedColorsStyles} from './lib/menuitem/forced-colors-styles.css.js';
import {styles} from './lib/menuitem/menu-item-styles.css.js';
import {MenuItemLink} from './lib/menuitemlink/menu-item-link.js';
import {styles as forcedColorsStyles} from './internal/menuitem/forced-colors-styles.css.js';
import {styles} from './internal/menuitem/menu-item-styles.css.js';
import {MenuItemLink} from './internal/menuitemlink/menu-item-link.js';

export {ListItem} from '../list/internal/listitem/list-item.js';
export {CloseMenuEvent, DeactivateItemsEvent, MenuItem} from './lib/shared.js';
export {CloseMenuEvent, DeactivateItemsEvent, MenuItem} from './internal/shared.js';


declare global {
Expand Down
8 changes: 4 additions & 4 deletions menu/menu-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import {customElement} from 'lit/decorators.js';
import {styles as listItemForcedColorsStyles} from '../list/internal/listitem/forced-colors-styles.css.js';
import {styles as listItemStyles} from '../list/internal/listitem/list-item-styles.css.js';

import {styles as forcedColorsStyles} from './lib/menuitem/forced-colors-styles.css.js';
import {MenuItemEl} from './lib/menuitem/menu-item.js';
import {styles} from './lib/menuitem/menu-item-styles.css.js';
import {styles as forcedColorsStyles} from './internal/menuitem/forced-colors-styles.css.js';
import {MenuItemEl} from './internal/menuitem/menu-item.js';
import {styles} from './internal/menuitem/menu-item-styles.css.js';

export {ListItem} from '../list/internal/listitem/list-item.js';
export {CloseMenuEvent, DeactivateItemsEvent, MenuItem} from './lib/shared.js';
export {CloseMenuEvent, DeactivateItemsEvent, MenuItem} from './internal/shared.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down
10 changes: 5 additions & 5 deletions menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

import {customElement} from 'lit/decorators.js';

import {styles as forcedColors} from './lib/forced-colors-styles.css.js';
import {Menu} from './lib/menu.js';
import {styles} from './lib/menu-styles.css.js';
import {styles as forcedColors} from './internal/forced-colors-styles.css.js';
import {Menu} from './internal/menu.js';
import {styles} from './internal/menu-styles.css.js';

export {ListItem} from '../list/internal/listitem/list-item.js';
export {Corner, DefaultFocusState} from './lib/menu.js';
export {CloseMenuEvent, DeactivateItemsEvent, MenuItem} from './lib/shared.js';
export {Corner, DefaultFocusState} from './internal/menu.js';
export {CloseMenuEvent, DeactivateItemsEvent, MenuItem} from './internal/shared.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down
8 changes: 4 additions & 4 deletions menu/sub-menu-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import {customElement} from 'lit/decorators.js';
import {styles as listItemForcedColorsStyles} from '../list/internal/listitem/forced-colors-styles.css.js';
import {styles as listItemStyles} from '../list/internal/listitem/list-item-styles.css.js';

import {styles as forcedColorsStyles} from './lib/menuitem/forced-colors-styles.css.js';
import {styles} from './lib/menuitem/menu-item-styles.css.js';
import {SubMenuItem} from './lib/submenuitem/sub-menu-item.js';
import {styles as forcedColorsStyles} from './internal/menuitem/forced-colors-styles.css.js';
import {styles} from './internal/menuitem/menu-item-styles.css.js';
import {SubMenuItem} from './internal/submenuitem/sub-menu-item.js';

export {ListItem} from '../list/internal/listitem/list-item.js';
export {CloseMenuEvent, DeactivateItemsEvent, MenuItem} from './lib/shared.js';
export {CloseMenuEvent, DeactivateItemsEvent, MenuItem} from './internal/shared.js';

declare global {
interface HTMLElementTagNameMap {
Expand Down
6 changes: 3 additions & 3 deletions select/lib/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {html as staticHtml, StaticValue} from 'lit/static-html.js';

import {Field} from '../../field/internal/field.js';
import {List} from '../../list/internal/list.js';
import {DEFAULT_TYPEAHEAD_BUFFER_TIME, Menu} from '../../menu/lib/menu.js';
import {DefaultCloseMenuEvent, isElementInSubtree, isSelectableKey} from '../../menu/lib/shared.js';
import {TYPEAHEAD_RECORD} from '../../menu/lib/typeaheadController.js';
import {DEFAULT_TYPEAHEAD_BUFFER_TIME, Menu} from '../../menu/internal/menu.js';
import {DefaultCloseMenuEvent, isElementInSubtree, isSelectableKey} from '../../menu/internal/shared.js';
import {TYPEAHEAD_RECORD} from '../../menu/internal/typeaheadController.js';

import {getSelectedItems, RequestDeselectionEvent, RequestSelectionEvent, SelectOption, SelectOptionRecord} from './shared.js';

Expand Down
2 changes: 1 addition & 1 deletion select/lib/selectoption/select-option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import {PropertyValues} from 'lit';
import {property} from 'lit/decorators.js';

import {ListItemRole, MenuItemEl} from '../../../menu/lib/menuitem/menu-item.js';
import {ListItemRole, MenuItemEl} from '../../../menu/internal/menuitem/menu-item.js';
import {RequestDeselectionEvent, RequestSelectionEvent, SelectOption} from '../shared.js';

/**
Expand Down
2 changes: 1 addition & 1 deletion select/lib/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {MenuItem} from '../../menu/lib/shared.js';
import {MenuItem} from '../../menu/internal/shared.js';

/**
* The interface specific to a Select Option
Expand Down
4 changes: 2 additions & 2 deletions select/select-option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {customElement} from 'lit/decorators.js';

import {styles as listItemForcedColorsStyles} from '../list/internal/listitem/forced-colors-styles.css.js';
import {styles as listItemStyles} from '../list/internal/listitem/list-item-styles.css.js';
import {styles as forcedColorsStyles} from '../menu/lib/menuitem/forced-colors-styles.css.js';
import {styles} from '../menu/lib/menuitem/menu-item-styles.css.js';
import {styles as forcedColorsStyles} from '../menu/internal/menuitem/forced-colors-styles.css.js';
import {styles} from '../menu/internal/menuitem/menu-item-styles.css.js';

// TODO(b/236285090): update with HCM best practices
import {SelectOptionEl} from './lib/selectoption/select-option.js';
Expand Down

0 comments on commit a8c2fa9

Please sign in to comment.