diff --git a/packages/core/src/components.d.ts b/packages/core/src/components.d.ts index 16ce01283e..7db3eaf8d2 100644 --- a/packages/core/src/components.d.ts +++ b/packages/core/src/components.d.ts @@ -1751,6 +1751,7 @@ declare global { canGoBack?: any, canSwipeBack?: any, getFirstView?: any, + resize?: any, root?: any, delegate?: any } @@ -2782,40 +2783,70 @@ declare global { } } -import { TabBar as IonTabBar } from './components/tabs/tab-bar'; +import { PageTab as PageTab } from './components/tabs/page-tab'; -interface HTMLIonTabBarElement extends IonTabBar, HTMLElement { +interface HTMLPageTabElement extends PageTab, HTMLElement { } -declare var HTMLIonTabBarElement: { - prototype: HTMLIonTabBarElement; - new (): HTMLIonTabBarElement; +declare var HTMLPageTabElement: { + prototype: HTMLPageTabElement; + new (): HTMLPageTabElement; }; declare global { interface HTMLElementTagNameMap { - "ion-tab-bar": HTMLIonTabBarElement; + "page-tab": HTMLPageTabElement; } interface ElementTagNameMap { - "ion-tab-bar": HTMLIonTabBarElement; + "page-tab": HTMLPageTabElement; } namespace JSX { interface IntrinsicElements { - "ion-tab-bar": JSXElements.IonTabBarAttributes; + "page-tab": JSXElements.PageTabAttributes; } } namespace JSXElements { - export interface IonTabBarAttributes extends HTMLAttributes { + export interface PageTabAttributes extends HTMLAttributes { mode?: string, color?: string, - tabs?: any, - onTabSelected?: any, - selectedIndex?: number, - tabsLayout?: string } } } -import { TabButton as IonTabButton } from './components/tabs/tab-button'; +import { TabBar as IonTabbar } from './components/tabs/tab-bar'; + +interface HTMLIonTabbarElement extends IonTabbar, HTMLElement { +} +declare var HTMLIonTabbarElement: { + prototype: HTMLIonTabbarElement; + new (): HTMLIonTabbarElement; +}; +declare global { + interface HTMLElementTagNameMap { + "ion-tabbar": HTMLIonTabbarElement; + } + interface ElementTagNameMap { + "ion-tabbar": HTMLIonTabbarElement; + } + namespace JSX { + interface IntrinsicElements { + "ion-tabbar": JSXElements.IonTabbarAttributes; + } + } + namespace JSXElements { + export interface IonTabbarAttributes extends HTMLAttributes { + mode?: string, + color?: string, + + placement?: string, + tabs?: any, + selectedTab?: any, + layout?: string, + highlight?: boolean + } + } +} + +import { TabbarButton as IonTabButton } from './components/tabs/tab-button'; interface HTMLIonTabButtonElement extends IonTabButton, HTMLElement { } @@ -2840,10 +2871,8 @@ declare global { mode?: string, color?: string, - tab?: any, - layout?: string, - selectedIndex?: number, - index?: number + selected?: boolean, + tab?: any } } } @@ -2873,6 +2902,7 @@ declare global { mode?: string, color?: string, + selectedTab?: any } } } @@ -2902,16 +2932,23 @@ declare global { mode?: string, color?: string, - root?: string, + _setActive?: any, + resize?: any, + goToRoot?: any, + getActive?: any, + getNav?: any, + btnId?: string, + root?: any, rootParams?: any, - tabTitle?: string, - tabIcon?: string, - tabBadge?: string, - tabBadgeStyle?: string, + urlPath?: string, + title?: string, + icon?: string, + badge?: string, + badgeStyle?: string, enabled?: boolean, - shown?: boolean, + show?: boolean, tabsHideOnSubPages?: boolean, - onSelected?: any + selected?: boolean } } } @@ -2941,10 +2978,18 @@ declare global { mode?: string, color?: string, - tabsLayout?: string, - tabsPlacement?: string, - tabsHighlight?: boolean, - ionChange?: any + select?: any, + getByIndex?: any, + getSelected?: any, + getIndex?: any, + getTabs?: any, + previousTab?: any, + resize?: any, + name?: string, + tabbarHidden?: boolean, + tabbarLayout?: string, + tabbarPlacement?: string, + tabbarHighlight?: boolean } } } diff --git a/packages/core/src/components/app/app.scss b/packages/core/src/components/app/app.scss index f41181b64f..ec54e0b867 100644 --- a/packages/core/src/components/app/app.scss +++ b/packages/core/src/components/app/app.scss @@ -224,7 +224,6 @@ sub { ion-app, ion-nav, -ion-tab, ion-tabs, ion-page, .ion-page { @@ -240,21 +239,37 @@ ion-page, contain: strict; } -ion-nav, -ion-tab, ion-tabs { - overflow: hidden; + display: flex; + + flex-direction: column; +} + +.tabs-inner { + position: relative; + flex: 1; + + contain: strict; } ion-tab { + @include position(0, null, null, 0); + + position: absolute; + z-index: -1; display: none; + + width: 100%; + height: 100%; + + contain: strict; } ion-tab.show-tab { + z-index: $z-index-page-container; display: block; } - // Page Container Structure // -------------------------------------------------- diff --git a/packages/core/src/components/backdrop/backdrop.scss b/packages/core/src/components/backdrop/backdrop.scss index 5eab9f1179..fef0ea5558 100644 --- a/packages/core/src/components/backdrop/backdrop.scss +++ b/packages/core/src/components/backdrop/backdrop.scss @@ -19,6 +19,8 @@ ion-backdrop { background-color: $backdrop-color; opacity: .01; transform: translateZ(0); + + contain: strict; } ion-backdrop.backdrop-no-tappable { diff --git a/packages/core/src/components/menu/menu.tsx b/packages/core/src/components/menu/menu.tsx index fa97348621..a67125fc5a 100644 --- a/packages/core/src/components/menu/menu.tsx +++ b/packages/core/src/components/menu/menu.tsx @@ -428,7 +428,7 @@ export class Menu { protected hostData() { const typeClass = 'menu-type-' + this.type; return { - role: 'navigation', + role: 'complementary', class: { 'menu-enabled': this.isActive(), 'menu-side-right': this.isRightSide, diff --git a/packages/core/src/components/nav/nav.tsx b/packages/core/src/components/nav/nav.tsx index 994cb913b7..241a1caa08 100644 --- a/packages/core/src/components/nav/nav.tsx +++ b/packages/core/src/components/nav/nav.tsx @@ -36,7 +36,6 @@ export class IonNav implements Nav { componentDidLoad() { componentDidLoadImpl(this); - } getViews(): ViewController[] { @@ -118,6 +117,11 @@ export class IonNav implements Nav { return getFirstView(this); } + @Method() + resize() { + console.log('resize content'); + } + @Listen('navInit') navInitialized(event: CustomEvent) { navInitializedImpl(this, event); @@ -134,7 +138,6 @@ export function componentDidLoadImpl(nav: Nav) { if (nav.root) { nav.setRoot(nav.root); } - } export function pushImpl(nav: Nav, component: any, data: any, opts: NavOptions) { diff --git a/packages/core/src/components/nav/page-one.tsx b/packages/core/src/components/nav/page-one.tsx index c130b57415..7ce789ec9d 100644 --- a/packages/core/src/components/nav/page-one.tsx +++ b/packages/core/src/components/nav/page-one.tsx @@ -17,17 +17,30 @@ export class PageOne { } protected render() { - return [ - - Page One - - , - - Page One Content -
- this.nextPage()}>Go to Page Two -
-
+ return [ + + + Page One + + , + +
+ Page One Content + this.nextPage()}>Go to Page Two + + + + + + + + + + + + +
+
]; } } diff --git a/packages/core/src/components/nav/page-two.tsx b/packages/core/src/components/nav/page-two.tsx index ce2c9bda27..586c693e96 100644 --- a/packages/core/src/components/nav/page-two.tsx +++ b/packages/core/src/components/nav/page-two.tsx @@ -27,7 +27,7 @@ export class PageTwo { Page Two , - + Page Two Content
this.nextPage()}>Go to Page Three diff --git a/packages/core/src/components/nav/test/basic.html b/packages/core/src/components/nav/test/basic.html index bba5c23aca..fd94a0b9cd 100644 --- a/packages/core/src/components/nav/test/basic.html +++ b/packages/core/src/components/nav/test/basic.html @@ -12,5 +12,18 @@ + \ No newline at end of file diff --git a/packages/core/src/components/picker/picker-column.tsx b/packages/core/src/components/picker/picker-column.tsx index c1d9f65bfb..69bfe5287a 100644 --- a/packages/core/src/components/picker/picker-column.tsx +++ b/packages/core/src/components/picker/picker-column.tsx @@ -396,7 +396,7 @@ export class PickerColumnCmp { } } - hostData() { + protected hostData() { return { class: { 'picker-opts-left': this.col.align === 'left', @@ -405,7 +405,7 @@ export class PickerColumnCmp { style: { 'max-width': this.col.columnWidth } - } + }; } protected render() { @@ -424,7 +424,7 @@ export class PickerColumnCmp { if (col.prefix) { results.push( -
+
{col.prefix}
); @@ -445,7 +445,7 @@ export class PickerColumnCmp { 'attachTo': 'parent', 'block': this.activeBlock }}>, -
+
{options.map((o, index) =>