diff --git a/core/package.json b/core/package.json index 3e4eaa6798..5c5623e7f1 100644 --- a/core/package.json +++ b/core/package.json @@ -33,7 +33,7 @@ "ionicons": "4.5.5" }, "devDependencies": { - "@stencil/core": "0.17.0", + "@stencil/core": "0.17.3-0", "@stencil/sass": "0.1.1", "@stencil/utils": "latest", "@types/jest": "^23.3.13", diff --git a/core/src/components/button/button.tsx b/core/src/components/button/button.tsx index 458f2cf7cb..0d550c19eb 100644 --- a/core/src/components/button/button.tsx +++ b/core/src/components/button/button.tsx @@ -4,6 +4,12 @@ import { Color, Mode, RouterDirection } from '../../interface'; import { hasShadowDom } from '../../utils/helpers'; import { createColorClasses, openURL } from '../../utils/theme'; +/** + * @slot - Content is placed between the named slots if provided without a slot. + * @slot icon-only - Should be used on an icon in a button that has no text. + * @slot start - Content is placed to the left of the button text in LTR, and to the right in RTL. + * @slot end - Content is placed to the right of the button text in LTR, and to the left in RTL. + */ @Component({ tag: 'ion-button', styleUrls: { diff --git a/core/src/components/button/readme.md b/core/src/components/button/readme.md index 30d5bc6124..33fc3591f6 100644 --- a/core/src/components/button/readme.md +++ b/core/src/components/button/readme.md @@ -118,6 +118,16 @@ This attribute specifies the size of the button. Setting this attribute will cha | `ionFocus` | Emitted when the button has focus. | `CustomEvent` | +## Slots + +| Slot | Description | +| ------------- | --------------------------------------------------------------------------------- | +| | Content is placed between the named slots if provided without a slot. | +| `"end"` | Content is placed to the right of the button text in LTR, and to the left in RTL. | +| `"icon-only"` | Should be used on an icon in a button that has no text. | +| `"start"` | Content is placed to the left of the button text in LTR, and to the right in RTL. | + + ## CSS Custom Properties | Name | Description | diff --git a/core/src/components/content/content.tsx b/core/src/components/content/content.tsx index 34e0c3b1ef..2e0b17001a 100644 --- a/core/src/components/content/content.tsx +++ b/core/src/components/content/content.tsx @@ -4,6 +4,10 @@ import { Color, Config, Mode, ScrollBaseDetail, ScrollDetail } from '../../inter import { isPlatform } from '../../utils/platform'; import { createColorClasses, hostContext } from '../../utils/theme'; +/** + * @slot - Content is placed in the scrollable area if provided without a slot. + * @slot fixed - Should be used for fixed content that should not scroll. + */ @Component({ tag: 'ion-content', styleUrl: 'content.scss', diff --git a/core/src/components/content/readme.md b/core/src/components/content/readme.md index 7e960fe03b..d122cf6735 100644 --- a/core/src/components/content/readme.md +++ b/core/src/components/content/readme.md @@ -144,6 +144,14 @@ Type: `Promise` +## Slots + +| Slot | Description | +| --------- | -------------------------------------------------------------------- | +| | Content is placed in the scrollable area if provided without a slot. | +| `"fixed"` | Should be used for fixed content that should not scroll. | + + ## CSS Custom Properties | Name | Description | diff --git a/core/src/components/item-divider/item-divider.tsx b/core/src/components/item-divider/item-divider.tsx index a77e192267..0a572545a1 100644 --- a/core/src/components/item-divider/item-divider.tsx +++ b/core/src/components/item-divider/item-divider.tsx @@ -3,6 +3,11 @@ import { Component, ComponentInterface, Element, Prop } from '@stencil/core'; import { Color, Mode } from '../../interface'; import { createColorClasses } from '../../utils/theme'; +/** + * @slot - Content is placed between the named slots if provided without a slot. + * @slot start - Content is placed to the left of the divider text in LTR, and to the right in RTL. + * @slot end - Content is placed to the right of the divider text in LTR, and to the left in RTL. + */ @Component({ tag: 'ion-item-divider', styleUrls: { diff --git a/core/src/components/item-divider/readme.md b/core/src/components/item-divider/readme.md index e7c0d0c211..43863db7fe 100644 --- a/core/src/components/item-divider/readme.md +++ b/core/src/components/item-divider/readme.md @@ -61,6 +61,15 @@ Item Dividers are block elements that can be used to separate items in a list. T | `sticky` | `sticky` | When it's set to `true`, the item-divider will stay visible when it reaches the top of the viewport until the next `ion-item-divider` replaces it. This feature relies in `position:sticky`: https://caniuse.com/#feat=css-sticky | `boolean` | `false` | +## Slots + +| Slot | Description | +| --------- | ---------------------------------------------------------------------------------- | +| | Content is placed between the named slots if provided without a slot. | +| `"end"` | Content is placed to the right of the divider text in LTR, and to the left in RTL. | +| `"start"` | Content is placed to the left of the divider text in LTR, and to the right in RTL. | + + ## CSS Custom Properties | Name | Description | diff --git a/core/src/components/item-option/item-option.tsx b/core/src/components/item-option/item-option.tsx index ef82eabc21..6e93fbde4d 100644 --- a/core/src/components/item-option/item-option.tsx +++ b/core/src/components/item-option/item-option.tsx @@ -3,6 +3,14 @@ import { Component, ComponentInterface, Element, Listen, Prop } from '@stencil/c import { Color, Mode } from '../../interface'; import { createColorClasses } from '../../utils/theme'; +/** + * @slot - Content is placed between the named slots if provided without a slot. + * @slot start - Content is placed to the left of the option text in LTR, and to the right in RTL. + * @slot top - Content is placed above the option text. + * @slot icon-only - Should be used on an icon in an option that has no text. + * @slot bottom - Content is placed below the option text. + * @slot end - Content is placed to the right of the option text in LTR, and to the left in RTL. + */ @Component({ tag: 'ion-item-option', styleUrls: { diff --git a/core/src/components/item-option/readme.md b/core/src/components/item-option/readme.md index 8b6c37ab21..f57c1469f2 100644 --- a/core/src/components/item-option/readme.md +++ b/core/src/components/item-option/readme.md @@ -18,6 +18,18 @@ action for the item. | `mode` | `mode` | The mode determines which platform styles to use. | `"ios" \| "md"` | `undefined` | +## Slots + +| Slot | Description | +| ------------- | --------------------------------------------------------------------------------- | +| | Content is placed between the named slots if provided without a slot. | +| `"bottom"` | Content is placed below the option text. | +| `"end"` | Content is placed to the right of the option text in LTR, and to the left in RTL. | +| `"icon-only"` | Should be used on an icon in an option that has no text. | +| `"start"` | Content is placed to the left of the option text in LTR, and to the right in RTL. | +| `"top"` | Content is placed above the option text. | + + ## CSS Custom Properties | Name | Description | diff --git a/core/src/components/item/item.tsx b/core/src/components/item/item.tsx index 45ecbce226..6f3ac22c93 100644 --- a/core/src/components/item/item.tsx +++ b/core/src/components/item/item.tsx @@ -3,6 +3,11 @@ import { Component, ComponentInterface, Element, Listen, Prop, State } from '@st import { Color, CssClassMap, Mode, RouterDirection, StyleEventDetail } from '../../interface'; import { createColorClasses, hostContext, openURL } from '../../utils/theme'; +/** + * @slot - Content is placed between the named slots if provided without a slot. + * @slot start - Content is placed to the left of the item text in LTR, and to the right in RTL. + * @slot end - Content is placed to the right of the item text in LTR, and to the left in RTL. + */ @Component({ tag: 'ion-item', styleUrls: { diff --git a/core/src/components/item/readme.md b/core/src/components/item/readme.md index ef8982ab97..99133f29c7 100644 --- a/core/src/components/item/readme.md +++ b/core/src/components/item/readme.md @@ -721,6 +721,15 @@ Item Inputs | `type` | `type` | The type of the button. Only used when an `onclick` or `button` property is present. | `"button" \| "reset" \| "submit"` | `'button'` | +## Slots + +| Slot | Description | +| --------- | ------------------------------------------------------------------------------- | +| | Content is placed between the named slots if provided without a slot. | +| `"end"` | Content is placed to the right of the item text in LTR, and to the left in RTL. | +| `"start"` | Content is placed to the left of the item text in LTR, and to the right in RTL. | + + ## CSS Custom Properties | Name | Description | diff --git a/core/src/components/range/range.tsx b/core/src/components/range/range.tsx index 7c7f399aff..d84a8e095a 100644 --- a/core/src/components/range/range.tsx +++ b/core/src/components/range/range.tsx @@ -4,6 +4,10 @@ import { Color, Gesture, GestureDetail, KnobName, Mode, RangeChangeEventDetail, import { clamp, debounceEvent } from '../../utils/helpers'; import { createColorClasses, hostContext } from '../../utils/theme'; +/** + * @slot start - Content is placed to the left of the range slider in LTR, and to the right in RTL. + * @slot end - Content is placed to the right of the range slider in LTR, and to the left in RTL. + */ @Component({ tag: 'ion-range', styleUrls: { diff --git a/core/src/components/range/readme.md b/core/src/components/range/readme.md index 97e52212d3..ca9655cb49 100644 --- a/core/src/components/range/readme.md +++ b/core/src/components/range/readme.md @@ -111,6 +111,14 @@ left or right of the range. | `ionFocus` | Emitted when the range has focus. | `CustomEvent` | +## Slots + +| Slot | Description | +| --------- | ---------------------------------------------------------------------------------- | +| `"end"` | Content is placed to the right of the range slider in LTR, and to the left in RTL. | +| `"start"` | Content is placed to the left of the range slider in LTR, and to the right in RTL. | + + ## CSS Custom Properties | Name | Description | diff --git a/core/src/components/slides/swiper/swiper.bundle.js b/core/src/components/slides/swiper/swiper.bundle.js index 477bad2b1c..d116f4f655 100644 --- a/core/src/components/slides/swiper/swiper.bundle.js +++ b/core/src/components/slides/swiper/swiper.bundle.js @@ -72,17 +72,17 @@ var win = (typeof window === 'undefined') ? { } : window; // eslint-disable-line /** - * Dom7 2.1.2 + * Dom7 2.1.3 * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API * http://framework7.io/docs/dom.html * - * Copyright 2018, Vladimir Kharlampidi + * Copyright 2019, Vladimir Kharlampidi * The iDangero.us * http://www.idangero.us/ * * Licensed under MIT * - * Released on: September 13, 2018 + * Released on: February 11, 2019 */ class Dom7 { @@ -361,6 +361,9 @@ function off(...args) { if (listener && handler.listener === listener) { el.removeEventListener(event, handler.proxyListener, capture); handlers.splice(k, 1); + } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); } else if (!listener) { el.removeEventListener(event, handler.proxyListener, capture); handlers.splice(k, 1); diff --git a/core/src/components/tabs/readme.md b/core/src/components/tabs/readme.md index aa70a6e48f..4fb59d565a 100644 --- a/core/src/components/tabs/readme.md +++ b/core/src/components/tabs/readme.md @@ -217,6 +217,15 @@ Type: `Promise` +## Slots + +| Slot | Description | +| ---------- | --------------------------------------------------------------------- | +| | Content is placed between the named slots if provided without a slot. | +| `"bottom"` | Content is placed at the bottom of the screen. | +| `"top"` | Content is placed at the top of the screen. | + + ---------------------------------------------- *Built with [StencilJS](https://stenciljs.com/)* diff --git a/core/src/components/tabs/tabs.tsx b/core/src/components/tabs/tabs.tsx index e0d958ce6c..3ba5c581bd 100644 --- a/core/src/components/tabs/tabs.tsx +++ b/core/src/components/tabs/tabs.tsx @@ -2,6 +2,11 @@ import { Component, Element, Event, EventEmitter, Listen, Method, Prop, State } import { Config, NavOutlet, RouteID, RouteWrite, TabButtonClickEventDetail } from '../../interface'; +/** + * @slot - Content is placed between the named slots if provided without a slot. + * @slot top - Content is placed at the top of the screen. + * @slot bottom - Content is placed at the bottom of the screen. + */ @Component({ tag: 'ion-tabs', styleUrl: 'tabs.scss', diff --git a/core/src/components/toolbar/readme.md b/core/src/components/toolbar/readme.md index 1f9f75c8c2..40f4087ee6 100644 --- a/core/src/components/toolbar/readme.md +++ b/core/src/components/toolbar/readme.md @@ -351,6 +351,17 @@ In `md` mode, the `` will receive a box-shadow on the bottom, and th | `mode` | `mode` | The mode determines which platform styles to use. | `"ios" \| "md"` | `undefined` | +## Slots + +| Slot | Description | +| ------------- | -------------------------------------------------------------------------------------------------------- | +| | Content is placed between the named slots if provided without a slot. | +| `"end"` | Content is placed to the left of the toolbar text in LTR, and to the right in RTL. | +| `"primary"` | Content is placed to the right of the toolbar text in `ios` mode, and to the far right in `md` mode. | +| `"secondary"` | Content is placed to the left of the toolbar text in `ios` mode, and directly to the right in `md` mode. | +| `"start"` | Content is placed to the left of the toolbar text in LTR, and to the right in RTL. | + + ## CSS Custom Properties | Name | Description | diff --git a/core/src/components/toolbar/toolbar.tsx b/core/src/components/toolbar/toolbar.tsx index efc55bd1f7..b1e5e0fa6c 100644 --- a/core/src/components/toolbar/toolbar.tsx +++ b/core/src/components/toolbar/toolbar.tsx @@ -3,6 +3,13 @@ import { Component, ComponentInterface, Element, Listen, Prop } from '@stencil/c import { Color, Config, CssClassMap, Mode, StyleEventDetail } from '../../interface'; import { createColorClasses } from '../../utils/theme'; +/** + * @slot - Content is placed between the named slots if provided without a slot. + * @slot start - Content is placed to the left of the toolbar text in LTR, and to the right in RTL. + * @slot secondary - Content is placed to the left of the toolbar text in `ios` mode, and directly to the right in `md` mode. + * @slot primary - Content is placed to the right of the toolbar text in `ios` mode, and to the far right in `md` mode. + * @slot end - Content is placed to the left of the toolbar text in LTR, and to the right in RTL. + */ @Component({ tag: 'ion-toolbar', styleUrls: {