Compare commits
65 Commits
test-layou
...
cb/module-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47b4a0c1a7 | ||
|
|
7f31ece67e | ||
|
|
b8ca441cf7 | ||
|
|
2bc3b1feae | ||
|
|
2ddc793e86 | ||
|
|
1295cedae9 | ||
|
|
d30afa5a44 | ||
|
|
10615bfb30 | ||
|
|
0196d45902 | ||
|
|
6a1b193ec4 | ||
|
|
556a05807c | ||
|
|
3f9ae8405b | ||
|
|
d70ea400a4 | ||
|
|
90893f46c9 | ||
|
|
4eb16298a3 | ||
|
|
485a1b6892 | ||
|
|
ba1c1dd2be | ||
|
|
9fec58680f | ||
|
|
2ec47e3a93 | ||
|
|
fda8397e1c | ||
|
|
085c243942 | ||
|
|
4c9083050b | ||
|
|
52ff0505e8 | ||
|
|
253465a8be | ||
|
|
8e3fcbb658 | ||
|
|
caa88b34e1 | ||
|
|
ceb41f31f3 | ||
|
|
3d6e2c4d2f | ||
|
|
ff214bd5f3 | ||
|
|
2c208da239 | ||
|
|
b848bac16f | ||
|
|
0ce1d34c66 | ||
|
|
020278eaf0 | ||
|
|
537e86d1e6 | ||
|
|
3514bfe07b | ||
|
|
ebefe1f428 | ||
|
|
5cdfac89f5 | ||
|
|
9cec8439f8 | ||
|
|
e1c0f45796 | ||
|
|
6a909f75ff | ||
|
|
f48bf8b118 | ||
|
|
af049c9fe0 | ||
|
|
65cbe4e345 | ||
|
|
d75664e467 | ||
|
|
b7489989ed | ||
|
|
868ebb7d26 | ||
|
|
34d4055c6b | ||
|
|
a7b1b43f41 | ||
|
|
624ceba2e1 | ||
|
|
b13822975b | ||
|
|
4bb19d09ed | ||
|
|
75fd488dc1 | ||
|
|
5cdfa1aaf4 | ||
|
|
9bfbd98ea0 | ||
|
|
f238b4258c | ||
|
|
eb5396fd56 | ||
|
|
665a24d175 | ||
|
|
829a57e7cf | ||
|
|
0f4cca14dc | ||
|
|
85728b7b35 | ||
|
|
05f857a39c | ||
|
|
7c56eb72b0 | ||
|
|
6beb0be4bd | ||
|
|
e826568c75 | ||
|
|
4640e046eb |
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* text=auto eol=lf
|
||||
@@ -6,11 +6,19 @@ runs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18.x
|
||||
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
path: ./core
|
||||
filename: CoreBuild.zip
|
||||
- name: Install Angular Server Dependencies
|
||||
run: npm ci
|
||||
shell: bash
|
||||
working-directory: ./packages/angular-server
|
||||
- name: Sync
|
||||
run: npm run sync
|
||||
shell: bash
|
||||
working-directory: ./packages/angular-server
|
||||
- name: Build
|
||||
run: npm run build.prod
|
||||
shell: bash
|
||||
|
||||
@@ -29,4 +29,4 @@ runs:
|
||||
with:
|
||||
name: ionic-core
|
||||
output: core/CoreBuild.zip
|
||||
paths: core/dist core/components core/src/foundations core/css core/hydrate core/loader core/src/components.d.ts
|
||||
paths: core/dist core/components core/css core/hydrate core/loader core/src/components.d.ts
|
||||
|
||||
@@ -31,4 +31,4 @@ runs:
|
||||
with:
|
||||
name: ionic-core
|
||||
output: core/CoreBuild.zip
|
||||
paths: core/dist core/components core/src/foundations core/css core/hydrate core/loader core/src/components.d.ts core/api.txt
|
||||
paths: core/dist core/components core/css core/hydrate core/loader core/src/components.d.ts core/api.txt
|
||||
|
||||
@@ -29,7 +29,7 @@ runs:
|
||||
shell: bash
|
||||
working-directory: ./packages/angular/test
|
||||
- name: Install Dependencies
|
||||
run: npm install --legacy-peer-deps # TODO(FW-6227): Remove legacy-peer-deps flag
|
||||
run: npm install
|
||||
shell: bash
|
||||
working-directory: ./packages/angular/test/build/${{ inputs.app }}
|
||||
- name: Sync Built Changes
|
||||
|
||||
4
.github/workflows/assign-issues.yml
vendored
@@ -11,8 +11,8 @@ jobs:
|
||||
issues: write
|
||||
steps:
|
||||
- name: 'Auto-assign issue'
|
||||
uses: pozil/auto-assign-issue@65947009a243e6b3993edeef4e64df3ca85d760c # v1.14.0
|
||||
uses: pozil/auto-assign-issue@c5bca5027e680b9e8411b826d16947afd8c76b32 # v2.0.0
|
||||
with:
|
||||
assignees: brandyscarney, thetaPC
|
||||
assignees: brandyscarney, thetaPC, joselrio, rugoncalves, BenOsodrac, JoaoFerreira-FrontEnd, OS-giulianasilva
|
||||
numOfAssignee: 1
|
||||
allowSelfAssign: false
|
||||
|
||||
287
BREAKING.md
@@ -4,31 +4,290 @@ This is a comprehensive list of the breaking changes introduced in the major ver
|
||||
|
||||
## Versions
|
||||
|
||||
- [Version 9.x](#version-9x)
|
||||
- [Version 8.x](./BREAKING_ARCHIVE/v8.md)
|
||||
- [Version 8.x](#version-8x)
|
||||
- [Version 7.x](./BREAKING_ARCHIVE/v7.md)
|
||||
- [Version 6.x](./BREAKING_ARCHIVE/v6.md)
|
||||
- [Version 5.x](./BREAKING_ARCHIVE/v5.md)
|
||||
- [Version 4.x](./BREAKING_ARCHIVE/v4.md)
|
||||
- [Legacy](https://github.com/ionic-team/ionic-v3/blob/master/CHANGELOG.md)
|
||||
|
||||
## Version 9.x
|
||||
## Version 8.x
|
||||
|
||||
- [Components](#version-9x-components)
|
||||
- [Button](#version-9x-button)
|
||||
- [Card](#version-9x-card)
|
||||
- [Chip](#version-9x-chip)
|
||||
- [Browser and Platform Support](#version-8x-browser-platform-support)
|
||||
- [Dark Mode](#version-8x-dark-mode)
|
||||
- [Global Styles](#version-8x-global-styles)
|
||||
- [Haptics](#version-8x-haptics)
|
||||
- [Components](#version-8x-components)
|
||||
- [Button](#version-8x-button)
|
||||
- [Checkbox](#version-8x-checkbox)
|
||||
- [Content](#version-8x-content)
|
||||
- [Datetime](#version-8x-datetime)
|
||||
- [Input](#version-8x-input)
|
||||
- [Item](#version-8x-item)
|
||||
- [Modal](#version-8x-modal)
|
||||
- [Nav](#version-8x-nav)
|
||||
- [Picker](#version-8x-picker)
|
||||
- [Progress bar](#version-8x-progress-bar)
|
||||
- [Radio](#version-8x-radio)
|
||||
- [Range](#version-8x-range)
|
||||
- [Searchbar](#version-8x-searchbar)
|
||||
- [Select](#version-8x-select)
|
||||
- [Textarea](#version-8x-textarea)
|
||||
- [Toggle](#version-8x-toggle)
|
||||
- [Framework Specific](#version-8x-framework-specific)
|
||||
- [Angular](#version-8x-angular)
|
||||
|
||||
<h2 id="version-9x-components">Components</h2>
|
||||
<h2 id="version-8x-browser-platform-support">Browser and Platform Support</h2>
|
||||
|
||||
<h4 id="version-9x-button">Button</h4>
|
||||
This section details the desktop browser, JavaScript framework, and mobile platform versions that are supported by Ionic 8.
|
||||
|
||||
- The `border-radius` of the `ios` and `md` button now defaults to `6px` and `999px` instead of `14px` and `4px`, respectively, in accordance with the iOS and Material Design 3 guidelines. To revert to the previous appearance, set the `shape` to `"soft"` for `md` and override the `--border-radius` CSS variable for `ios` to `14px`, or set it to a different value entirely.
|
||||
**Minimum Browser Versions**
|
||||
| Desktop Browser | Supported Versions |
|
||||
| --------------- | ----------------- |
|
||||
| Chrome | 89+ |
|
||||
| Safari | 15+ |
|
||||
| Firefox | 75+ |
|
||||
| Edge | 89+ |
|
||||
|
||||
<h4 id="version-9x-card">Card</h4>
|
||||
**Minimum JavaScript Framework Versions**
|
||||
| Framework | Supported Version |
|
||||
| --------- | --------------------- |
|
||||
| Angular | 16+ |
|
||||
| React | 17+ |
|
||||
| Vue | 3.0.6+ |
|
||||
|
||||
- The `border-radius` of the `ios` and `md` card now defaults to `14px` and `12px` instead of `8px` and `4px`, respectively, in accordance with the iOS and Material Design 3 guidelines. To revert to the previous appearance, set the `shape` to `"soft"`, or override the `--border-radius` CSS variable to specify a different value.
|
||||
**Minimum Mobile Platform Versions**
|
||||
| Platform | Supported Version |
|
||||
| -------- | ---------------------- |
|
||||
| iOS | 15+ |
|
||||
| Android | 5.1+ with Chromium 89+ |
|
||||
|
||||
<h4 id="version-9x-chip">Chip</h4>
|
||||
Ionic Framework v8 removes backwards support for CSS Animations in favor of the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API). All minimum browser versions listed above support the Web Animations API.
|
||||
|
||||
- The `border-radius` of the `ios` and `md` chip now defaults to `10px` and `8px`, respectively, instead of `16px` in accordance with the iOS and Material Design 3 guidelines. To revert to the previous appearance, set the `shape` to `"round"`, or override the `--border-radius` CSS variable to specify a different value.
|
||||
<h2 id="version-8x-dark-mode">Dark Mode</h2>
|
||||
|
||||
|
||||
In previous versions, it was recommended to define the dark palette in the following way:
|
||||
|
||||
```css
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
/* global app variables */
|
||||
}
|
||||
|
||||
.ios body {
|
||||
/* global ios app variables */
|
||||
}
|
||||
|
||||
.md body {
|
||||
/* global md app variables */
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In Ionic Framework version 8, the dark palette is being distributed via css files that can be imported. Below is an example of importing a dark palette file in Angular:
|
||||
|
||||
```css
|
||||
/* @import '@ionic/angular/css/palettes/dark.always.css'; */
|
||||
/* @import "@ionic/angular/css/palettes/dark.class.css"; */
|
||||
@import "@ionic/angular/css/palettes/dark.system.css";
|
||||
```
|
||||
|
||||
By importing the `dark.system.css` file, the dark palette variables will be defined like the following:
|
||||
|
||||
```css
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
/* global app variables */
|
||||
}
|
||||
|
||||
:root.ios {
|
||||
/* global ios app variables */
|
||||
}
|
||||
|
||||
:root.md {
|
||||
/* global md app variables */
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Notice that the dark palette is now applied to the `:root` selector instead of the `body` selector. The [`:root`](https://developer.mozilla.org/en-US/docs/Web/CSS/:root) selector represents the `<html>` element and is identical to the selector `html`, except that its specificity is higher.
|
||||
|
||||
While migrating to include the new dark palette files is unlikely to cause breaking changes, these new selectors can lead to unexpected overrides if custom CSS variables are being set on the `body` element. We recommend updating any instances where global application variables are set to target the `:root` selector instead.
|
||||
|
||||
For more information on the new dark palette files, refer to the [Dark Mode documentation](https://ionicframework.com/docs/theming/dark-mode).
|
||||
|
||||
<h2 id="version-8x-global-styles">Global Styles</h2>
|
||||
|
||||
<h4 id="version-8x-text-color">Text Color</h4>
|
||||
|
||||
The `core.css` file has been updated to set the text color on the `body` element:
|
||||
|
||||
```diff
|
||||
body {
|
||||
+ color: var(--ion-text-color);
|
||||
}
|
||||
```
|
||||
|
||||
This allows components to inherit the color properly when used outside of Ionic Framework and is required for custom themes to work properly. However, it may have unintentional side effects in apps if the color was not expected to inherit.
|
||||
|
||||
<h4 id="version-8x-dynamic-font">Dynamic Font</h4>
|
||||
|
||||
The `core.css` file has been updated to enable dynamic font scaling by default.
|
||||
|
||||
The `--ion-default-dynamic-font` variable has been removed and replaced with `--ion-dynamic-font`.
|
||||
|
||||
Developers who had previously chosen dynamic font scaling by activating it in their global stylesheets can revert to the default setting by removing their custom CSS. In doing so, their application will seamlessly continue utilizing dynamic font scaling as it did before. It's essential to note that altering the font-size of the html element should be avoided, as it may disrupt the proper functioning of dynamic font scaling.
|
||||
|
||||
Developers who want to disable dynamic font scaling can set `--ion-dynamic-font: initial;` in their global stylesheets. However, this is not recommended because it may introduce accessibility challenges for users who depend on enlarged font sizes.
|
||||
|
||||
For more information on the dynamic font, refer to the [Dynamic Font Scaling documentation](https://ionicframework.com/docs/layout/dynamic-font-scaling).
|
||||
|
||||
<h2 id="version-8x-haptics">Haptics</h2>
|
||||
|
||||
- Support for the Cordova Haptics plugin has been removed. Components that integrate with haptics, such as `ion-picker` and `ion-toggle`, will continue to function but will no longer play haptics in Cordova environments. Developers should migrate to Capacitor to continue to have haptics in these components.
|
||||
|
||||
<h2 id="version-8x-components">Components</h2>
|
||||
|
||||
<h4 id="version-8x-button">Button</h4>
|
||||
|
||||
- Button text now wraps by default. If this behavior is not desired, add the `ion-text-nowrap` class from the [CSS Utilities](https://ionicframework.com/docs/layout/css-utilities).
|
||||
|
||||
<h4 id="version-8x-checkbox">Checkbox</h4>
|
||||
|
||||
The `legacy` property and support for the legacy syntax, which involved placing an `ion-checkbox` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy checkbox syntax, refer to the [Checkbox documentation](https://ionicframework.com/docs/api/checkbox#migrating-from-legacy-checkbox-syntax).
|
||||
|
||||
<h4 id="version-8x-content">Content</h4>
|
||||
|
||||
- Content no longer sets the `--background` custom property when the `.outer-content` class is set on the host.
|
||||
|
||||
<h4 id="version-8x-datetime">Datetime</h4>
|
||||
|
||||
- The CSS shadow part for `month-year-button` has been changed to target a `button` element instead of `ion-item`. Developers should verify their UI renders as expected for the month/year toggle button inside of `ion-datetime`.
|
||||
- Developers using the CSS variables available on `ion-item` will need to migrate their CSS to use CSS properties. For example:
|
||||
```diff
|
||||
ion-datetime::part(month-year-button) {
|
||||
- --background: red;
|
||||
|
||||
+ background: red;
|
||||
}
|
||||
```
|
||||
|
||||
<h4 id="version-8x-input">Input</h4>
|
||||
|
||||
- `size` has been removed from the `ion-input` component. Developers should use CSS to specify the visible width of the input.
|
||||
- `accept` has been removed from the `ion-input` component. This was previously used in conjunction with the `type="file"`. However, the `file` value for `type` is not a valid value in Ionic Framework.
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-input` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy input syntax, refer to the [Input documentation](https://ionicframework.com/docs/api/input#migrating-from-legacy-input-syntax).
|
||||
|
||||
<h4 id="version-8x-item">Item</h4>
|
||||
|
||||
- The `helper` slot has been removed. Developers should use the `helperText` property on `ion-input` and `ion-textarea`.
|
||||
- The `error` slot has been removed. Developers should use the `errorText` property on `ion-input` and `ion-textarea`.
|
||||
- Counter functionality has been removed including the `counter` and `counterFormatter` properties. Developers should use the properties of the same name on `ion-input` and `ion-textarea`.
|
||||
- The `fill` property has been removed. Developers should use the property of the same name on `ion-input`, `ion-select`, and `ion-textarea`.
|
||||
- The `shape` property has been removed. Developers should use the property of the same name on `ion-input`, `ion-select`, and `ion-textarea`.
|
||||
- Item no longer automatically delegates focus to the first focusable element. While most developers should not need to make any changes to account for this update, usages of `ion-item` with interactive elements such as form controls (inputs, textareas, etc) should be evaluated to verify that interactions still work as expected.
|
||||
|
||||
<h5>CSS variables</h4>
|
||||
|
||||
The following deprecated CSS variables have been removed: `--highlight-height`, `--highlight-color-focused`, `--highlight-color-valid`, and `--highlight-color-invalid`. These variables were used on the bottom border highlight of an item when the form control inside of that item was focused. The form control syntax was [simplified in v7](https://ionic.io/blog/ionic-7-is-here#simplified-form-control-syntax) so that inputs, selects, and textareas would no longer be required to be used inside of an item.
|
||||
|
||||
If you have not yet migrated to the modern form control syntax, migration guides for each of the form controls that added a highlight to item can be found below:
|
||||
- [Input migration documentation](https://ionicframework.com/docs/api/input#migrating-from-legacy-input-syntax)
|
||||
- [Select migration documentation](https://ionicframework.com/docs/api/select#migrating-from-legacy-select-syntax)
|
||||
- [Textarea migration documentation](https://ionicframework.com/docs/api/textarea#migrating-from-legacy-textarea-syntax)
|
||||
|
||||
Once all form controls are using the modern syntax, the same variables can be used to customize them from the form control itself:
|
||||
|
||||
| Name | Description |
|
||||
| ----------------------------| ----------------------------------------|
|
||||
| `--highlight-color-focused` | The color of the highlight when focused |
|
||||
| `--highlight-color-invalid` | The color of the highlight when invalid |
|
||||
| `--highlight-color-valid` | The color of the highlight when valid |
|
||||
| `--highlight-height` | The height of the highlight indicator |
|
||||
|
||||
The following styles for item:
|
||||
|
||||
```css
|
||||
ion-item {
|
||||
--highlight-color-focused: purple;
|
||||
--highlight-color-valid: blue;
|
||||
--highlight-color-invalid: orange;
|
||||
--highlight-height: 6px;
|
||||
}
|
||||
```
|
||||
|
||||
will instead be applied on the form controls:
|
||||
|
||||
```css
|
||||
ion-input,
|
||||
ion-textarea,
|
||||
ion-select {
|
||||
--highlight-color-focused: purple;
|
||||
--highlight-color-valid: blue;
|
||||
--highlight-color-invalid: orange;
|
||||
--highlight-height: 6px;
|
||||
}
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> The input and textarea components are scoped, which means they will automatically scope their CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector. Targeting the `ion-input` or `ion-textarea` for customization will not work; therefore we recommend adding a class and customizing it that way.
|
||||
|
||||
<h4 id="version-8x-modal">Modal</h4>
|
||||
|
||||
- Detection for Capacitor <= 2 with applying status bar styles has been removed. Developers should ensure they are using Capacitor 3 or later when using the card modal presentation.
|
||||
|
||||
<h4 id="version-8x-nav">Nav</h4>
|
||||
|
||||
- `getLength` returns `Promise<number>` instead of `<number>`. This method was not previously available in Nav's TypeScript interface, but developers could still access it by casting Nav as `any`. Developers should ensure they `await` their `getLength` call before accessing the returned value.
|
||||
|
||||
<h4 id="version-8x-picker">Picker</h4>
|
||||
|
||||
- `ion-picker` and `ion-picker-column` have been renamed to `ion-picker-legacy` and `ion-picker-legacy-column`, respectively. This change was made to accommodate the new inline picker component while allowing developers to continue to use the legacy picker during this migration period.
|
||||
- Only the component names have been changed. Usages such as `ion-picker` or `IonPicker` should be changed to `ion-picker-legacy` and `IonPickerLegacy`, respectively.
|
||||
- Non-component usages such as `pickerController` or `useIonPicker` remain unchanged. The new picker displays inline with your page content and does not have equivalents for these non-component usages.
|
||||
|
||||
<h4 id="version-8x-progress-bar">Progress bar</h4>
|
||||
|
||||
- The `--buffer-background` CSS variable has been removed. Use `--background` instead.
|
||||
|
||||
<h4 id="version-8x-toast">Toast</h4>
|
||||
|
||||
- `cssClass` has been removed from the `ToastButton` interface. This was previously used to apply a custom class to the toast buttons. Developers can use the "button" shadow part to style the buttons.
|
||||
|
||||
For more information on styling toast buttons, refer to the [Toast Theming documentation](https://ionicframework.com/docs/api/toast#theming).
|
||||
|
||||
<h4 id="version-8x-radio">Radio</h4>
|
||||
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-radio` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy radio syntax, refer to the [Radio documentation](https://ionicframework.com/docs/api/radio#migrating-from-legacy-radio-syntax).
|
||||
|
||||
<h4 id="version-8x-range">Range</h4>
|
||||
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-range` inside of an `ion-item` with an `ion-label`, have been removed. Ionic will also no longer attempt to automatically associate form controls with sibling `<label>` elements as these label elements are now used inside the form control. Developers should provide a label (either visible text or `aria-label`) directly to the form control. For more information on migrating from the legacy range syntax, refer to the [Range documentation](https://ionicframework.com/docs/api/range#migrating-from-legacy-range-syntax).
|
||||
|
||||
<h4 id="version-8x-searchbar">Searchbar</h4>
|
||||
|
||||
- The `autocapitalize` property now defaults to `'off'`.
|
||||
|
||||
<h4 id="version-8x-select">Select</h4>
|
||||
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-select` inside of an `ion-item` with an `ion-label`, have been removed. Ionic will also no longer attempt to automatically associate form controls with sibling `<label>` elements as these label elements are now used inside the form control. Developers should provide a label (either visible text or `aria-label`) directly to the form control. For more information on migrating from the legacy select syntax, refer to the [Select documentation](https://ionicframework.com/docs/api/select#migrating-from-legacy-select-syntax).
|
||||
|
||||
<h4 id="version-8x-textarea">Textarea</h4>
|
||||
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-textarea` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy textarea syntax, refer to the [Textarea documentation](https://ionicframework.com/docs/api/textarea#migrating-from-legacy-textarea-syntax).
|
||||
|
||||
<h4 id="version-8x-toggle">Toggle</h4>
|
||||
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-toggle` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy toggle syntax, refer to the [Toggle documentation](https://ionicframework.com/docs/api/toggle#migrating-from-legacy-toggle-syntax).
|
||||
|
||||
<h2 id="version-8x-framework-specific">Framework Specific</h2>
|
||||
|
||||
<h4 id="version-8x-angular">Angular</h4>
|
||||
|
||||
- The `IonBackButtonDelegate` class has been removed in favor of `IonBackButton`.
|
||||
|
||||
```diff
|
||||
- import { IonBackButtonDelegate } from '@ionic/angular';
|
||||
+ import { IonBackButton } from '@ionic/angular';
|
||||
```
|
||||
|
||||
@@ -1,282 +0,0 @@
|
||||
# Breaking Changes
|
||||
|
||||
## Version 8.x
|
||||
|
||||
- [Browser and Platform Support](#version-8x-browser-platform-support)
|
||||
- [Dark Mode](#version-8x-dark-mode)
|
||||
- [Global Styles](#version-8x-global-styles)
|
||||
- [Haptics](#version-8x-haptics)
|
||||
- [Components](#version-8x-components)
|
||||
- [Button](#version-8x-button)
|
||||
- [Checkbox](#version-8x-checkbox)
|
||||
- [Content](#version-8x-content)
|
||||
- [Datetime](#version-8x-datetime)
|
||||
- [Input](#version-8x-input)
|
||||
- [Item](#version-8x-item)
|
||||
- [Modal](#version-8x-modal)
|
||||
- [Nav](#version-8x-nav)
|
||||
- [Picker](#version-8x-picker)
|
||||
- [Progress bar](#version-8x-progress-bar)
|
||||
- [Radio](#version-8x-radio)
|
||||
- [Range](#version-8x-range)
|
||||
- [Searchbar](#version-8x-searchbar)
|
||||
- [Select](#version-8x-select)
|
||||
- [Textarea](#version-8x-textarea)
|
||||
- [Toggle](#version-8x-toggle)
|
||||
- [Framework Specific](#version-8x-framework-specific)
|
||||
- [Angular](#version-8x-angular)
|
||||
|
||||
<h2 id="version-8x-browser-platform-support">Browser and Platform Support</h2>
|
||||
|
||||
This section details the desktop browser, JavaScript framework, and mobile platform versions that are supported by Ionic 8.
|
||||
|
||||
**Minimum Browser Versions**
|
||||
| Desktop Browser | Supported Versions |
|
||||
| --------------- | ----------------- |
|
||||
| Chrome | 89+ |
|
||||
| Safari | 15+ |
|
||||
| Firefox | 75+ |
|
||||
| Edge | 89+ |
|
||||
|
||||
**Minimum JavaScript Framework Versions**
|
||||
| Framework | Supported Version |
|
||||
| --------- | --------------------- |
|
||||
| Angular | 16+ |
|
||||
| React | 17+ |
|
||||
| Vue | 3.0.6+ |
|
||||
|
||||
**Minimum Mobile Platform Versions**
|
||||
| Platform | Supported Version |
|
||||
| -------- | ---------------------- |
|
||||
| iOS | 15+ |
|
||||
| Android | 5.1+ with Chromium 89+ |
|
||||
|
||||
Ionic Framework v8 removes backwards support for CSS Animations in favor of the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API). All minimum browser versions listed above support the Web Animations API.
|
||||
|
||||
<h2 id="version-8x-dark-mode">Dark Mode</h2>
|
||||
|
||||
|
||||
In previous versions, it was recommended to define the dark palette in the following way:
|
||||
|
||||
```css
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
/* global app variables */
|
||||
}
|
||||
|
||||
.ios body {
|
||||
/* global ios app variables */
|
||||
}
|
||||
|
||||
.md body {
|
||||
/* global md app variables */
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In Ionic Framework version 8, the dark palette is being distributed via css files that can be imported. Below is an example of importing a dark palette file in Angular:
|
||||
|
||||
```css
|
||||
/* @import '@ionic/angular/css/palettes/dark.always.css'; */
|
||||
/* @import "@ionic/angular/css/palettes/dark.class.css"; */
|
||||
@import "@ionic/angular/css/palettes/dark.system.css";
|
||||
```
|
||||
|
||||
By importing the `dark.system.css` file, the dark palette variables will be defined like the following:
|
||||
|
||||
```css
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
/* global app variables */
|
||||
}
|
||||
|
||||
:root.ios {
|
||||
/* global ios app variables */
|
||||
}
|
||||
|
||||
:root.md {
|
||||
/* global md app variables */
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Notice that the dark palette is now applied to the `:root` selector instead of the `body` selector. The [`:root`](https://developer.mozilla.org/en-US/docs/Web/CSS/:root) selector represents the `<html>` element and is identical to the selector `html`, except that its specificity is higher.
|
||||
|
||||
While migrating to include the new dark palette files is unlikely to cause breaking changes, these new selectors can lead to unexpected overrides if custom CSS variables are being set on the `body` element. We recommend updating any instances where global application variables are set to target the `:root` selector instead.
|
||||
|
||||
For more information on the new dark palette files, refer to the [Dark Mode documentation](https://ionicframework.com/docs/theming/dark-mode).
|
||||
|
||||
<h2 id="version-8x-global-styles">Global Styles</h2>
|
||||
|
||||
<h4 id="version-8x-text-color">Text Color</h4>
|
||||
|
||||
The `core.css` file has been updated to set the text color on the `body` element:
|
||||
|
||||
```diff
|
||||
body {
|
||||
+ color: var(--ion-text-color);
|
||||
}
|
||||
```
|
||||
|
||||
This allows components to inherit the color properly when used outside of Ionic Framework and is required for custom themes to work properly. However, it may have unintentional side effects in apps if the color was not expected to inherit.
|
||||
|
||||
<h4 id="version-8x-dynamic-font">Dynamic Font</h4>
|
||||
|
||||
The `core.css` file has been updated to enable dynamic font scaling by default.
|
||||
|
||||
The `--ion-default-dynamic-font` variable has been removed and replaced with `--ion-dynamic-font`.
|
||||
|
||||
Developers who had previously chosen dynamic font scaling by activating it in their global stylesheets can revert to the default setting by removing their custom CSS. In doing so, their application will seamlessly continue utilizing dynamic font scaling as it did before. It's essential to note that altering the font-size of the html element should be avoided, as it may disrupt the proper functioning of dynamic font scaling.
|
||||
|
||||
Developers who want to disable dynamic font scaling can set `--ion-dynamic-font: initial;` in their global stylesheets. However, this is not recommended because it may introduce accessibility challenges for users who depend on enlarged font sizes.
|
||||
|
||||
For more information on the dynamic font, refer to the [Dynamic Font Scaling documentation](https://ionicframework.com/docs/layout/dynamic-font-scaling).
|
||||
|
||||
<h2 id="version-8x-haptics">Haptics</h2>
|
||||
|
||||
- Support for the Cordova Haptics plugin has been removed. Components that integrate with haptics, such as `ion-picker` and `ion-toggle`, will continue to function but will no longer play haptics in Cordova environments. Developers should migrate to Capacitor to continue to have haptics in these components.
|
||||
|
||||
<h2 id="version-8x-components">Components</h2>
|
||||
|
||||
<h4 id="version-8x-button">Button</h4>
|
||||
|
||||
- Button text now wraps by default. If this behavior is not desired, add the `ion-text-nowrap` class from the [CSS Utilities](https://ionicframework.com/docs/layout/css-utilities).
|
||||
|
||||
<h4 id="version-8x-checkbox">Checkbox</h4>
|
||||
|
||||
The `legacy` property and support for the legacy syntax, which involved placing an `ion-checkbox` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy checkbox syntax, refer to the [Checkbox documentation](https://ionicframework.com/docs/api/checkbox#migrating-from-legacy-checkbox-syntax).
|
||||
|
||||
<h4 id="version-8x-content">Content</h4>
|
||||
|
||||
- Content no longer sets the `--background` custom property when the `.outer-content` class is set on the host.
|
||||
|
||||
<h4 id="version-8x-datetime">Datetime</h4>
|
||||
|
||||
- The CSS shadow part for `month-year-button` has been changed to target a `button` element instead of `ion-item`. Developers should verify their UI renders as expected for the month/year toggle button inside of `ion-datetime`.
|
||||
- Developers using the CSS variables available on `ion-item` will need to migrate their CSS to use CSS properties. For example:
|
||||
```diff
|
||||
ion-datetime::part(month-year-button) {
|
||||
- --background: red;
|
||||
|
||||
+ background: red;
|
||||
}
|
||||
```
|
||||
|
||||
<h4 id="version-8x-input">Input</h4>
|
||||
|
||||
- `size` has been removed from the `ion-input` component. Developers should use CSS to specify the visible width of the input.
|
||||
- `accept` has been removed from the `ion-input` component. This was previously used in conjunction with the `type="file"`. However, the `file` value for `type` is not a valid value in Ionic Framework.
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-input` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy input syntax, refer to the [Input documentation](https://ionicframework.com/docs/api/input#migrating-from-legacy-input-syntax).
|
||||
|
||||
<h4 id="version-8x-item">Item</h4>
|
||||
|
||||
- The `helper` slot has been removed. Developers should use the `helperText` property on `ion-input` and `ion-textarea`.
|
||||
- The `error` slot has been removed. Developers should use the `errorText` property on `ion-input` and `ion-textarea`.
|
||||
- Counter functionality has been removed including the `counter` and `counterFormatter` properties. Developers should use the properties of the same name on `ion-input` and `ion-textarea`.
|
||||
- The `fill` property has been removed. Developers should use the property of the same name on `ion-input`, `ion-select`, and `ion-textarea`.
|
||||
- The `shape` property has been removed. Developers should use the property of the same name on `ion-input`, `ion-select`, and `ion-textarea`.
|
||||
- Item no longer automatically delegates focus to the first focusable element. While most developers should not need to make any changes to account for this update, usages of `ion-item` with interactive elements such as form controls (inputs, textareas, etc) should be evaluated to verify that interactions still work as expected.
|
||||
|
||||
<h5>CSS variables</h4>
|
||||
|
||||
The following deprecated CSS variables have been removed: `--highlight-height`, `--highlight-color-focused`, `--highlight-color-valid`, and `--highlight-color-invalid`. These variables were used on the bottom border highlight of an item when the form control inside of that item was focused. The form control syntax was [simplified in v7](https://ionic.io/blog/ionic-7-is-here#simplified-form-control-syntax) so that inputs, selects, and textareas would no longer be required to be used inside of an item.
|
||||
|
||||
If you have not yet migrated to the modern form control syntax, migration guides for each of the form controls that added a highlight to item can be found below:
|
||||
- [Input migration documentation](https://ionicframework.com/docs/api/input#migrating-from-legacy-input-syntax)
|
||||
- [Select migration documentation](https://ionicframework.com/docs/api/select#migrating-from-legacy-select-syntax)
|
||||
- [Textarea migration documentation](https://ionicframework.com/docs/api/textarea#migrating-from-legacy-textarea-syntax)
|
||||
|
||||
Once all form controls are using the modern syntax, the same variables can be used to customize them from the form control itself:
|
||||
|
||||
| Name | Description |
|
||||
| ----------------------------| ----------------------------------------|
|
||||
| `--highlight-color-focused` | The color of the highlight when focused |
|
||||
| `--highlight-color-invalid` | The color of the highlight when invalid |
|
||||
| `--highlight-color-valid` | The color of the highlight when valid |
|
||||
| `--highlight-height` | The height of the highlight indicator |
|
||||
|
||||
The following styles for item:
|
||||
|
||||
```css
|
||||
ion-item {
|
||||
--highlight-color-focused: purple;
|
||||
--highlight-color-valid: blue;
|
||||
--highlight-color-invalid: orange;
|
||||
--highlight-height: 6px;
|
||||
}
|
||||
```
|
||||
|
||||
will instead be applied on the form controls:
|
||||
|
||||
```css
|
||||
ion-input,
|
||||
ion-textarea,
|
||||
ion-select {
|
||||
--highlight-color-focused: purple;
|
||||
--highlight-color-valid: blue;
|
||||
--highlight-color-invalid: orange;
|
||||
--highlight-height: 6px;
|
||||
}
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> The input and textarea components are scoped, which means they will automatically scope their CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector. Targeting the `ion-input` or `ion-textarea` for customization will not work; therefore we recommend adding a class and customizing it that way.
|
||||
|
||||
<h4 id="version-8x-modal">Modal</h4>
|
||||
|
||||
- Detection for Capacitor <= 2 with applying status bar styles has been removed. Developers should ensure they are using Capacitor 3 or later when using the card modal presentation.
|
||||
|
||||
<h4 id="version-8x-nav">Nav</h4>
|
||||
|
||||
- `getLength` returns `Promise<number>` instead of `<number>`. This method was not previously available in Nav's TypeScript interface, but developers could still access it by casting Nav as `any`. Developers should ensure they `await` their `getLength` call before accessing the returned value.
|
||||
|
||||
<h4 id="version-8x-picker">Picker</h4>
|
||||
|
||||
- `ion-picker` and `ion-picker-column` have been renamed to `ion-picker-legacy` and `ion-picker-legacy-column`, respectively. This change was made to accommodate the new inline picker component while allowing developers to continue to use the legacy picker during this migration period.
|
||||
- Only the component names have been changed. Usages such as `ion-picker` or `IonPicker` should be changed to `ion-picker-legacy` and `IonPickerLegacy`, respectively.
|
||||
- Non-component usages such as `pickerController` or `useIonPicker` remain unchanged. The new picker displays inline with your page content and does not have equivalents for these non-component usages.
|
||||
|
||||
<h4 id="version-8x-progress-bar">Progress bar</h4>
|
||||
|
||||
- The `--buffer-background` CSS variable has been removed. Use `--background` instead.
|
||||
|
||||
<h4 id="version-8x-toast">Toast</h4>
|
||||
|
||||
- `cssClass` has been removed from the `ToastButton` interface. This was previously used to apply a custom class to the toast buttons. Developers can use the "button" shadow part to style the buttons.
|
||||
|
||||
For more information on styling toast buttons, refer to the [Toast Theming documentation](https://ionicframework.com/docs/api/toast#theming).
|
||||
|
||||
<h4 id="version-8x-radio">Radio</h4>
|
||||
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-radio` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy radio syntax, refer to the [Radio documentation](https://ionicframework.com/docs/api/radio#migrating-from-legacy-radio-syntax).
|
||||
|
||||
<h4 id="version-8x-range">Range</h4>
|
||||
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-range` inside of an `ion-item` with an `ion-label`, have been removed. Ionic will also no longer attempt to automatically associate form controls with sibling `<label>` elements as these label elements are now used inside the form control. Developers should provide a label (either visible text or `aria-label`) directly to the form control. For more information on migrating from the legacy range syntax, refer to the [Range documentation](https://ionicframework.com/docs/api/range#migrating-from-legacy-range-syntax).
|
||||
|
||||
<h4 id="version-8x-searchbar">Searchbar</h4>
|
||||
|
||||
- The `autocapitalize` property now defaults to `'off'`.
|
||||
|
||||
<h4 id="version-8x-select">Select</h4>
|
||||
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-select` inside of an `ion-item` with an `ion-label`, have been removed. Ionic will also no longer attempt to automatically associate form controls with sibling `<label>` elements as these label elements are now used inside the form control. Developers should provide a label (either visible text or `aria-label`) directly to the form control. For more information on migrating from the legacy select syntax, refer to the [Select documentation](https://ionicframework.com/docs/api/select#migrating-from-legacy-select-syntax).
|
||||
|
||||
<h4 id="version-8x-textarea">Textarea</h4>
|
||||
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-textarea` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy textarea syntax, refer to the [Textarea documentation](https://ionicframework.com/docs/api/textarea#migrating-from-legacy-textarea-syntax).
|
||||
|
||||
<h4 id="version-8x-toggle">Toggle</h4>
|
||||
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-toggle` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy toggle syntax, refer to the [Toggle documentation](https://ionicframework.com/docs/api/toggle#migrating-from-legacy-toggle-syntax).
|
||||
|
||||
<h2 id="version-8x-framework-specific">Framework Specific</h2>
|
||||
|
||||
<h4 id="version-8x-angular">Angular</h4>
|
||||
|
||||
- The `IonBackButtonDelegate` class has been removed in favor of `IonBackButton`.
|
||||
|
||||
```diff
|
||||
- import { IonBackButtonDelegate } from '@ionic/angular';
|
||||
+ import { IonBackButton } from '@ionic/angular';
|
||||
```
|
||||
72
CHANGELOG.md
@@ -3,6 +3,78 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [8.2.5](https://github.com/ionic-team/ionic-framework/compare/v8.2.4...v8.2.5) (2024-07-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **dependencies:** use latest @stencil/core to remove DOMException errors ([#29685](https://github.com/ionic-team/ionic-framework/issues/29685)) ([d70ea4](https://github.com/ionic-team/ionic/commit/d70ea400a4713bd091af1393e196e10844a190b6)), closes [#29681](https://github.com/ionic-team/ionic/issues/29681)
|
||||
* **vue:** add optional IonicConfig type parameter to IonicVue plugin ([#29637](https://github.com/ionic-team/ionic-framework/issues/29637)) ([90893f4](https://github.com/ionic-team/ionic-framework/commit/90893f46c930dbccd4251fa2f56bdde30b669158)), closes [#29659](https://github.com/ionic-team/ionic-framework/issues/29659)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.2.4](https://github.com/ionic-team/ionic-framework/compare/v8.2.2...v8.2.4) (2024-06-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **angular:** popover arrow navigation with disabled items ([#29662](https://github.com/ionic-team/ionic-framework/issues/29662)) ([ceb41f3](https://github.com/ionic-team/ionic-framework/commit/ceb41f31f382ff1bcf81de2b11680699d33d5077)), closes [#29640](https://github.com/ionic-team/ionic-framework/issues/29640)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 8.2.3
|
||||
|
||||
This version should be skipped. Install 8.2.4 instead.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.2.2](https://github.com/ionic-team/ionic-framework/compare/v8.2.1...v8.2.2) (2024-06-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **refresher:** show when content is fullscreen ([#29608](https://github.com/ionic-team/ionic-framework/issues/29608)) ([5cdfac8](https://github.com/ionic-team/ionic-framework/commit/5cdfac89f5389cb3009427183f7034ba05788bc2)), closes [#18714](https://github.com/ionic-team/ionic-framework/issues/18714)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.2.1](https://github.com/ionic-team/ionic-framework/compare/v8.2.0...v8.2.1) (2024-06-05)
|
||||
|
||||
* **react:** export InputInputEventDetail type ([#29512](https://github.com/ionic-team/ionic-framework/issues/29512)) ([624ceba](https://github.com/ionic-team/ionic-framework/commit/624ceba2e128bb13a3afe4c35883f603f5488d0e)), closes [#29518](https://github.com/ionic-team/ionic-framework/issues/29518)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [8.2.0](https://github.com/ionic-team/ionic-framework/compare/v8.1.3...v8.2.0) (2024-05-22)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **angular:** setting props on a signal works ([#29453](https://github.com/ionic-team/ionic-framework/issues/29453)) ([4640e04](https://github.com/ionic-team/ionic-framework/commit/4640e046ebbd35bf92737368c6262f79a8803a59)), closes [#28876](https://github.com/ionic-team/ionic-framework/issues/28876)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.1.3](https://github.com/ionic-team/ionic-framework/compare/v8.1.2...v8.1.3) (2024-05-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **core:** malformed URIs will not throw exception ([#29486](https://github.com/ionic-team/ionic-framework/issues/29486)) ([4a41983](https://github.com/ionic-team/ionic-framework/commit/4a41983098fe9bf83fdf05ce7ab28c79f414e11b)), closes [#29479](https://github.com/ionic-team/ionic-framework/issues/29479)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.1.2](https://github.com/ionic-team/ionic-framework/compare/v8.1.1...v8.1.2) (2024-05-15)
|
||||
|
||||
|
||||
|
||||
22
README.md
@@ -20,7 +20,7 @@
|
||||
<a href="https://github.com/ionic-team/ionic-framework/blob/main/LICENSE">
|
||||
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Ionic Framework is released under the MIT license." />
|
||||
</a>
|
||||
<a href="https://github.com/ionic-team/ionic/blob/main/docs/CONTRIBUTING.md">
|
||||
<a href="https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md">
|
||||
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" />
|
||||
</a>
|
||||
<a href="https://twitter.com/Ionicframework">
|
||||
@@ -38,7 +38,7 @@
|
||||
Documentation
|
||||
</a>
|
||||
<span> · </span>
|
||||
<a href="https://github.com/ionic-team/ionic/blob/main/docs/CONTRIBUTING.md">Contribute</a>
|
||||
<a href="https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md">Contribute</a>
|
||||
<span> · </span>
|
||||
<a href="https://blog.ionicframework.com/">Blog</a>
|
||||
<br />
|
||||
@@ -63,14 +63,15 @@ Looking for the `ionic-angular` package? Ionic 3 has been moved to the [`ionic-v
|
||||
|
||||
### Getting Started
|
||||
|
||||
Start a new project by following our quick [Getting Started guide](https://ionicframework.com/getting-started/).
|
||||
Start a new project by following our [documentation](https://ionicframework.com/docs/).
|
||||
We would love to hear from you! If you have any feedback or run into issues using our framework, please file
|
||||
an [issue](https://github.com/ionic-team/ionic/issues/new) on this repository.
|
||||
an [issue](https://github.com/ionic-team/ionic-framework/issues/new) on this repository.
|
||||
|
||||
### Migration Guides
|
||||
|
||||
Already have an Ionic app? These guides will help you migrate to the latest versions.
|
||||
|
||||
* [Migrate from v7 to v8](https://ionicframework.com/docs/updating/8-0)
|
||||
* [Migrate from v6 to v7](https://ionicframework.com/docs/updating/7-0)
|
||||
* [Migrate from v5 to v6](https://ionicframework.com/docs/updating/6-0)
|
||||
* [Migrate from v4 to v5](https://ionicframework.com/docs/updating/5-0)
|
||||
@@ -82,21 +83,16 @@ The Ionic Conference App is a full featured Ionic app. It is the perfect startin
|
||||
|
||||
- [Angular Ionic Conference App](https://github.com/ionic-team/ionic-conference-app)
|
||||
- [React Ionic Conference App](https://github.com/ionic-team/ionic-react-conference-app)
|
||||
<!-- TODO(FW-3811): add this when the vue conference app is updated -->
|
||||
<!-- - [Vue Ionic Conference App](https://github.com/ionic-team/ionic-vue-conference-app) -->
|
||||
- [Vue Ionic Conference App](https://github.com/ionic-team/ionic-vue-conference-app)
|
||||
|
||||
### Contributing
|
||||
|
||||
Thanks for your interest in contributing! Read up on our guidelines for
|
||||
[contributing](https://github.com/ionic-team/ionic/blob/main/docs/CONTRIBUTING.md)
|
||||
and then look through our issues with a [help wanted](https://github.com/ionic-team/ionic/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
|
||||
[contributing](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md)
|
||||
and then look through our issues with a [help wanted](https://github.com/ionic-team/ionic-framework/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
|
||||
label.
|
||||
|
||||
Please note that this project is released with a [Contributor Code of Conduct](https://github.com/ionic-team/ionic/blob/main/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
|
||||
|
||||
### Future Goals
|
||||
|
||||
As Ionic Framework components migrate to the web component standard, a goal of ours is to have Ionic Framework easily work within all of the popular frameworks.
|
||||
Please note that this project is released with a [Contributor Code of Conduct](https://github.com/ionic-team/ionic-framework/blob/main/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
|
||||
|
||||
### Earlier Versions
|
||||
|
||||
|
||||
@@ -3,17 +3,15 @@
|
||||
# See documentation at https://stylelint.io/
|
||||
|
||||
ignoreFiles:
|
||||
- src/foundations/*.scss
|
||||
- src/css/ionic/*.scss
|
||||
- src/css/core.scss
|
||||
- src/css/flex-utils.scss
|
||||
- src/css/normalize.scss
|
||||
- src/css/text-alignment.scss
|
||||
- src/css/display.scss
|
||||
- src/themes/mixins.scss
|
||||
- src/themes/functions.color.scss
|
||||
- src/themes/functions.string.scss
|
||||
- src/themes/native.theme.default.scss
|
||||
- src/themes/ionic.mixins.scss
|
||||
- src/themes/ionic.functions.color.scss
|
||||
- src/themes/ionic.functions.string.scss
|
||||
- src/themes/ionic.theme.default.scss
|
||||
- src/css/themes/*.scss
|
||||
|
||||
indentation: 2
|
||||
@@ -25,10 +23,10 @@ rules:
|
||||
at-rule-empty-line-before:
|
||||
- always
|
||||
- except:
|
||||
- blockless-after-blockless
|
||||
- first-nested
|
||||
- blockless-after-blockless
|
||||
- first-nested
|
||||
ignore:
|
||||
- after-comment
|
||||
- after-comment
|
||||
|
||||
block-closing-brace-newline-before:
|
||||
- always
|
||||
@@ -42,13 +40,14 @@ rules:
|
||||
custom-property-empty-line-before:
|
||||
- always
|
||||
- except:
|
||||
- after-comment
|
||||
- after-custom-property
|
||||
- first-nested
|
||||
- after-comment
|
||||
- after-custom-property
|
||||
- first-nested
|
||||
|
||||
declaration-no-important:
|
||||
- true
|
||||
|
||||
|
||||
order/order:
|
||||
- custom-properties
|
||||
- dollar-variables
|
||||
@@ -58,202 +57,203 @@ rules:
|
||||
|
||||
# https://github.com/sasstools/sass-lint/blob/develop/lib/config/property-sort-orders/smacss.yml
|
||||
order/properties-order:
|
||||
|
||||
# Box
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- display
|
||||
- position
|
||||
- top
|
||||
- right
|
||||
- bottom
|
||||
- left
|
||||
- display
|
||||
- position
|
||||
- top
|
||||
- right
|
||||
- bottom
|
||||
- left
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- flex
|
||||
- flex-basis
|
||||
- flex-direction
|
||||
- flex-flow
|
||||
- flex-grow
|
||||
- flex-shrink
|
||||
- flex-wrap
|
||||
- align-content
|
||||
- align-items
|
||||
- align-self
|
||||
- justify-content
|
||||
- order
|
||||
- flex
|
||||
- flex-basis
|
||||
- flex-direction
|
||||
- flex-flow
|
||||
- flex-grow
|
||||
- flex-shrink
|
||||
- flex-wrap
|
||||
- align-content
|
||||
- align-items
|
||||
- align-self
|
||||
- justify-content
|
||||
- order
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- width
|
||||
- min-width
|
||||
- max-width
|
||||
- width
|
||||
- min-width
|
||||
- max-width
|
||||
|
||||
- height
|
||||
- min-height
|
||||
- max-height
|
||||
- height
|
||||
- min-height
|
||||
- max-height
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- margin
|
||||
- margin-top
|
||||
- margin-right
|
||||
- margin-bottom
|
||||
- margin-left
|
||||
- margin
|
||||
- margin-top
|
||||
- margin-right
|
||||
- margin-bottom
|
||||
- margin-left
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- padding
|
||||
- padding-top
|
||||
- padding-right
|
||||
- padding-bottom
|
||||
- padding-left
|
||||
- padding
|
||||
- padding-top
|
||||
- padding-right
|
||||
- padding-bottom
|
||||
- padding-left
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- float
|
||||
- clear
|
||||
- float
|
||||
- clear
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- columns
|
||||
- column-gap
|
||||
- column-fill
|
||||
- column-rule
|
||||
- column-span
|
||||
- column-count
|
||||
- column-width
|
||||
- columns
|
||||
- column-gap
|
||||
- column-fill
|
||||
- column-rule
|
||||
- column-span
|
||||
- column-count
|
||||
- column-width
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- transform
|
||||
- transform-box
|
||||
- transform-origin
|
||||
- transform-style
|
||||
- transform
|
||||
- transform-box
|
||||
- transform-origin
|
||||
- transform-style
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- transition
|
||||
- transition-delay
|
||||
- transition-duration
|
||||
- transition-property
|
||||
- transition-timing-function
|
||||
- transition
|
||||
- transition-delay
|
||||
- transition-duration
|
||||
- transition-property
|
||||
- transition-timing-function
|
||||
|
||||
# Border
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- border
|
||||
- border-top
|
||||
- border-right
|
||||
- border-bottom
|
||||
- border-left
|
||||
- border-width
|
||||
- border-top-width
|
||||
- border-right-width
|
||||
- border-bottom-width
|
||||
- border-left-width
|
||||
- border
|
||||
- border-top
|
||||
- border-right
|
||||
- border-bottom
|
||||
- border-left
|
||||
- border-width
|
||||
- border-top-width
|
||||
- border-right-width
|
||||
- border-bottom-width
|
||||
- border-left-width
|
||||
|
||||
- border-style
|
||||
- border-top-style
|
||||
- border-right-style
|
||||
- border-bottom-style
|
||||
- border-left-style
|
||||
- border-style
|
||||
- border-top-style
|
||||
- border-right-style
|
||||
- border-bottom-style
|
||||
- border-left-style
|
||||
|
||||
- border-radius
|
||||
- border-top-left-radius
|
||||
- border-top-right-radius
|
||||
- border-bottom-left-radius
|
||||
- border-bottom-right-radius
|
||||
- border-radius
|
||||
- border-top-left-radius
|
||||
- border-top-right-radius
|
||||
- border-bottom-left-radius
|
||||
- border-bottom-right-radius
|
||||
|
||||
- border-color
|
||||
- border-top-color
|
||||
- border-right-color
|
||||
- border-bottom-color
|
||||
- border-left-color
|
||||
- border-color
|
||||
- border-top-color
|
||||
- border-right-color
|
||||
- border-bottom-color
|
||||
- border-left-color
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- outline
|
||||
- outline-color
|
||||
- outline-offset
|
||||
- outline-style
|
||||
- outline-width
|
||||
- outline
|
||||
- outline-color
|
||||
- outline-offset
|
||||
- outline-style
|
||||
- outline-width
|
||||
|
||||
# Background
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- background
|
||||
- background-attachment
|
||||
- background-clip
|
||||
- background-color
|
||||
- background-image
|
||||
- background-repeat
|
||||
- background-position
|
||||
- background-size
|
||||
- background
|
||||
- background-attachment
|
||||
- background-clip
|
||||
- background-color
|
||||
- background-image
|
||||
- background-repeat
|
||||
- background-position
|
||||
- background-size
|
||||
|
||||
# Text
|
||||
# Text
|
||||
|
||||
- color
|
||||
- color
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- font
|
||||
- font-family
|
||||
- font-size
|
||||
- font-smoothing
|
||||
- font-style
|
||||
- font-variant
|
||||
- font-weight
|
||||
- font
|
||||
- font-family
|
||||
- font-size
|
||||
- font-smoothing
|
||||
- font-style
|
||||
- font-variant
|
||||
- font-weight
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- letter-spacing
|
||||
- line-height
|
||||
- list-style
|
||||
- letter-spacing
|
||||
- line-height
|
||||
- list-style
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- text-align
|
||||
- text-decoration
|
||||
- text-indent
|
||||
- text-overflow
|
||||
- text-rendering
|
||||
- text-shadow
|
||||
- text-transform
|
||||
- text-wrap
|
||||
- text-align
|
||||
- text-decoration
|
||||
- text-indent
|
||||
- text-overflow
|
||||
- text-rendering
|
||||
- text-shadow
|
||||
- text-transform
|
||||
- text-wrap
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- white-space
|
||||
- word-spacing
|
||||
- white-space
|
||||
- word-spacing
|
||||
|
||||
# Other
|
||||
|
||||
- emptyLineBefore: always
|
||||
properties:
|
||||
- border-collapse
|
||||
- border-spacing
|
||||
- box-shadow
|
||||
- caption-side
|
||||
- contain
|
||||
- content
|
||||
- cursor
|
||||
- direction
|
||||
- empty-cells
|
||||
- object-fit
|
||||
- opacity
|
||||
- overflow
|
||||
- quotes
|
||||
- speak
|
||||
- table-layout
|
||||
- touch-action
|
||||
- user-select
|
||||
- vertical-align
|
||||
- visibility
|
||||
- z-index
|
||||
- border-collapse
|
||||
- border-spacing
|
||||
- box-shadow
|
||||
- caption-side
|
||||
- contain
|
||||
- content
|
||||
- cursor
|
||||
- direction
|
||||
- empty-cells
|
||||
- object-fit
|
||||
- opacity
|
||||
- overflow
|
||||
- quotes
|
||||
- speak
|
||||
- table-layout
|
||||
- touch-action
|
||||
- user-select
|
||||
- vertical-align
|
||||
- visibility
|
||||
- z-index
|
||||
|
||||
property-disallowed-list:
|
||||
- background-position
|
||||
|
||||
@@ -3,6 +3,71 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [8.2.5](https://github.com/ionic-team/ionic-framework/compare/v8.2.4...v8.2.5) (2024-07-03)
|
||||
|
||||
**Note:** Version bump only for package @ionic/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.2.4](https://github.com/ionic-team/ionic-framework/compare/v8.2.2...v8.2.4) (2024-06-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **angular:** popover arrow navigation with disabled items ([#29662](https://github.com/ionic-team/ionic-framework/issues/29662)) ([ceb41f3](https://github.com/ionic-team/ionic-framework/commit/ceb41f31f382ff1bcf81de2b11680699d33d5077)), closes [#29640](https://github.com/ionic-team/ionic-framework/issues/29640)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 8.2.3
|
||||
|
||||
This version should be skipped. Install 8.2.4 instead.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.2.2](https://github.com/ionic-team/ionic-framework/compare/v8.2.1...v8.2.2) (2024-06-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **refresher:** show when content is fullscreen ([#29608](https://github.com/ionic-team/ionic-framework/issues/29608)) ([5cdfac8](https://github.com/ionic-team/ionic-framework/commit/5cdfac89f5389cb3009427183f7034ba05788bc2)), closes [#18714](https://github.com/ionic-team/ionic-framework/issues/18714)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.2.1](https://github.com/ionic-team/ionic-framework/compare/v8.2.0...v8.2.1) (2024-06-05)
|
||||
|
||||
**Note:** Version bump only for package @ionic/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [8.2.0](https://github.com/ionic-team/ionic-framework/compare/v8.1.3...v8.2.0) (2024-05-22)
|
||||
|
||||
**Note:** Version bump only for package @ionic/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.1.3](https://github.com/ionic-team/ionic-framework/compare/v8.1.2...v8.1.3) (2024-05-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **core:** malformed URIs will not throw exception ([#29486](https://github.com/ionic-team/ionic-framework/issues/29486)) ([4a41983](https://github.com/ionic-team/ionic-framework/commit/4a41983098fe9bf83fdf05ce7ab28c79f414e11b)), closes [#29479](https://github.com/ionic-team/ionic-framework/issues/29479)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.1.2](https://github.com/ionic-team/ionic-framework/compare/v8.1.1...v8.1.2) (2024-05-15)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Get Playwright
|
||||
FROM mcr.microsoft.com/playwright:v1.43.1
|
||||
FROM mcr.microsoft.com/playwright:v1.45.0
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /ionic
|
||||
|
||||
564
core/api.txt
1910
core/package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ionic/core",
|
||||
"version": "8.1.2",
|
||||
"version": "8.2.5",
|
||||
"description": "Base components for Ionic",
|
||||
"keywords": [
|
||||
"ionic",
|
||||
@@ -23,6 +23,302 @@
|
||||
"collection:main": "dist/collection/index.js",
|
||||
"collection": "dist/collection/collection-manifest.json",
|
||||
"types": "dist/types/interface.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs.js",
|
||||
"types": "./dist/types/interface.d.ts"
|
||||
},
|
||||
"./components": {
|
||||
"import": "./components/index.js",
|
||||
"types": "./components/index.d.ts"
|
||||
},
|
||||
"./loader": {
|
||||
"import": "./loader/index.js",
|
||||
"require": "./loader/index.cjs.js",
|
||||
"types": "./loader/index.d.ts"
|
||||
},
|
||||
"./components/*": {
|
||||
"import": "./components/*",
|
||||
"types": "./components/*"
|
||||
},
|
||||
"./docs.json": {
|
||||
"import": "./dist/docs.json",
|
||||
"require": "./dist/docs.json"
|
||||
},
|
||||
"./ion-accordion-group": {
|
||||
"import": "./components/ion-accordion-group.js",
|
||||
"types": "./components/ion-accordion-group.d.ts"
|
||||
},
|
||||
"./ion-accordion": {
|
||||
"import": "./components/ion-accordion.js",
|
||||
"types": "./components/ion-accordion.d.ts"
|
||||
},
|
||||
"./ion-avatar": {
|
||||
"import": "./components/ion-avatar.js",
|
||||
"types": "./components/ion-avatar.d.ts"
|
||||
},
|
||||
"./ion-backdrop": {
|
||||
"import": "./components/ion-backdrop.js",
|
||||
"types": "./components/ion-backdrop.d.ts"
|
||||
},
|
||||
"./ion-badge": {
|
||||
"import": "./components/ion-badge.js",
|
||||
"types": "./components/ion-badge.d.ts"
|
||||
},
|
||||
"./ion-breadcrumbs": {
|
||||
"import": "./components/ion-breadcrumbs.js",
|
||||
"types": "./components/ion-breadcrumbs.d.ts"
|
||||
},
|
||||
"./ion-buttons": {
|
||||
"import": "./components/ion-buttons.js",
|
||||
"types": "./components/ion-buttons.d.ts"
|
||||
},
|
||||
"./ion-card-content": {
|
||||
"import": "./components/ion-card-content.js",
|
||||
"types": "./components/ion-card-content.d.ts"
|
||||
},
|
||||
"./ion-card-header": {
|
||||
"import": "./components/ion-card-header.js",
|
||||
"types": "./components/ion-card-header.d.ts"
|
||||
},
|
||||
"./ion-card-subtitle": {
|
||||
"import": "./components/ion-card-subtitle.js",
|
||||
"types": "./components/ion-card-subtitle.d.ts"
|
||||
},
|
||||
"./ion-card-title": {
|
||||
"import": "./components/ion-card-title.js",
|
||||
"types": "./components/ion-card-title.d.ts"
|
||||
},
|
||||
"./ion-checkbox": {
|
||||
"import": "./components/ion-checkbox.js",
|
||||
"types": "./components/ion-checkbox.d.ts"
|
||||
},
|
||||
"./ion-chip": {
|
||||
"import": "./components/ion-chip.js",
|
||||
"types": "./components/ion-chip.d.ts"
|
||||
},
|
||||
"./ion-col": {
|
||||
"import": "./components/ion-col.js",
|
||||
"types": "./components/ion-col.d.ts"
|
||||
},
|
||||
"./ion-content": {
|
||||
"import": "./components/ion-content.js",
|
||||
"types": "./components/ion-content.d.ts"
|
||||
},
|
||||
"./ion-datetime-button": {
|
||||
"import": "./components/ion-datetime-button.js",
|
||||
"types": "./components/ion-datetime-button.d.ts"
|
||||
},
|
||||
"./ion-datetime": {
|
||||
"import": "./components/ion-datetime.js",
|
||||
"types": "./components/ion-datetime.d.ts"
|
||||
},
|
||||
"./ion-fab-list": {
|
||||
"import": "./components/ion-fab-list.js",
|
||||
"types": "./components/ion-fab-list.d.ts"
|
||||
},
|
||||
"./ion-fab": {
|
||||
"import": "./components/ion-fab.js",
|
||||
"types": "./components/ion-fab.d.ts"
|
||||
},
|
||||
"./ion-footer": {
|
||||
"import": "./components/ion-footer.js",
|
||||
"types": "./components/ion-footer.d.ts"
|
||||
},
|
||||
"./ion-grid": {
|
||||
"import": "./components/ion-grid.js",
|
||||
"types": "./components/ion-grid.d.ts"
|
||||
},
|
||||
"./ion-header": {
|
||||
"import": "./components/ion-header.js",
|
||||
"types": "./components/ion-header.d.ts"
|
||||
},
|
||||
"./ion-img": {
|
||||
"import": "./components/ion-img.js",
|
||||
"types": "./components/ion-img.d.ts"
|
||||
},
|
||||
"./ion-infinite-scroll-content": {
|
||||
"import": "./components/ion-infinite-scroll-content.js",
|
||||
"types": "./components/ion-infinite-scroll-content.d.ts"
|
||||
},
|
||||
"./ion-infinite-scroll": {
|
||||
"import": "./components/ion-infinite-scroll.js",
|
||||
"types": "./components/ion-infinite-scroll.d.ts"
|
||||
},
|
||||
"./ion-input-password-toggle": {
|
||||
"import": "./components/ion-input-password-toggle.js",
|
||||
"types": "./components/ion-input-password-toggle.d.ts"
|
||||
},
|
||||
"./ion-input": {
|
||||
"import": "./components/ion-input.js",
|
||||
"types": "./components/ion-input.d.ts"
|
||||
},
|
||||
"./ion-item-divider": {
|
||||
"import": "./components/ion-item-divider.js",
|
||||
"types": "./components/ion-item-divider.d.ts"
|
||||
},
|
||||
"./ion-item-group": {
|
||||
"import": "./components/ion-item-group.js",
|
||||
"types": "./components/ion-item-group.d.ts"
|
||||
},
|
||||
"./ion-item-options": {
|
||||
"import": "./components/ion-item-options.js",
|
||||
"types": "./components/ion-item-options.d.ts"
|
||||
},
|
||||
"./ion-item-sliding": {
|
||||
"import": "./components/ion-item-sliding.js",
|
||||
"types": "./components/ion-item-sliding.d.ts"
|
||||
},
|
||||
"./ion-label": {
|
||||
"import": "./components/ion-label.js",
|
||||
"types": "./components/ion-label.d.ts"
|
||||
},
|
||||
"./ion-list-header": {
|
||||
"import": "./components/ion-list-header.js",
|
||||
"types": "./components/ion-list-header.d.ts"
|
||||
},
|
||||
"./ion-list": {
|
||||
"import": "./components/ion-list.js",
|
||||
"types": "./components/ion-list.d.ts"
|
||||
},
|
||||
"./ion-menu-button": {
|
||||
"import": "./components/ion-menu-button.js",
|
||||
"types": "./components/ion-menu-button.d.ts"
|
||||
},
|
||||
"./ion-menu-toggle": {
|
||||
"import": "./components/ion-menu-toggle.js",
|
||||
"types": "./components/ion-menu-toggle.d.ts"
|
||||
},
|
||||
"./ion-menu": {
|
||||
"import": "./components/ion-menu.js",
|
||||
"types": "./components/ion-menu.d.ts"
|
||||
},
|
||||
"./ion-nav-link": {
|
||||
"import": "./components/ion-nav-link.js",
|
||||
"types": "./components/ion-nav-link.d.ts"
|
||||
},
|
||||
"./ion-nav": {
|
||||
"import": "./components/ion-nav.js",
|
||||
"types": "./components/ion-nav.d.ts"
|
||||
},
|
||||
"./ion-note": {
|
||||
"import": "./components/ion-note.js",
|
||||
"types": "./components/ion-note.d.ts"
|
||||
},
|
||||
"./ion-picker-column-option": {
|
||||
"import": "./components/ion-picker-column-option.js",
|
||||
"types": "./components/ion-picker-column-option.d.ts"
|
||||
},
|
||||
"./ion-picker-column": {
|
||||
"import": "./components/ion-picker-column.js",
|
||||
"types": "./components/ion-picker-column.d.ts"
|
||||
},
|
||||
"./ion-picker": {
|
||||
"import": "./components/ion-picker.js",
|
||||
"types": "./components/ion-picker.d.ts"
|
||||
},
|
||||
"./ion-progress-bar": {
|
||||
"import": "./components/ion-progress-bar.js",
|
||||
"types": "./components/ion-progress-bar.d.ts"
|
||||
},
|
||||
"./ion-radio-group": {
|
||||
"import": "./components/ion-radio-group.js",
|
||||
"types": "./components/ion-radio-group.d.ts"
|
||||
},
|
||||
"./ion-radio": {
|
||||
"import": "./components/ion-radio.js",
|
||||
"types": "./components/ion-radio.d.ts"
|
||||
},
|
||||
"./ion-range": {
|
||||
"import": "./components/ion-range.js",
|
||||
"types": "./components/ion-range.d.ts"
|
||||
},
|
||||
"./ion-refresher-content": {
|
||||
"import": "./components/ion-refresher-content.js",
|
||||
"types": "./components/ion-refresher-content.d.ts"
|
||||
},
|
||||
"./ion-refresher": {
|
||||
"import": "./components/ion-refresher.js",
|
||||
"types": "./components/ion-refresher.d.ts"
|
||||
},
|
||||
"./ion-reorder-group": {
|
||||
"import": "./components/ion-reorder-group.js",
|
||||
"types": "./components/ion-reorder-group.d.ts"
|
||||
},
|
||||
"./ion-reorder": {
|
||||
"import": "./components/ion-reorder.js",
|
||||
"types": "./components/ion-reorder.d.ts"
|
||||
},
|
||||
"./ion-ripple-effect": {
|
||||
"import": "./components/ion-ripple-effect.js",
|
||||
"types": "./components/ion-ripple-effect.d.ts"
|
||||
},
|
||||
"./ion-row": {
|
||||
"import": "./components/ion-row.js",
|
||||
"types": "./components/ion-row.d.ts"
|
||||
},
|
||||
"./ion-searchbar": {
|
||||
"import": "./components/ion-searchbar.js",
|
||||
"types": "./components/ion-searchbar.d.ts"
|
||||
},
|
||||
"./ion-segment-button": {
|
||||
"import": "./components/ion-segment-button.js",
|
||||
"types": "./components/ion-segment-button.d.ts"
|
||||
},
|
||||
"./ion-segment": {
|
||||
"import": "./components/ion-segment.js",
|
||||
"types": "./components/ion-segment.d.ts"
|
||||
},
|
||||
"./ion-select-option": {
|
||||
"import": "./components/ion-select-option.js",
|
||||
"types": "./components/ion-select-option.d.ts"
|
||||
},
|
||||
"./ion-select": {
|
||||
"import": "./components/ion-select.js",
|
||||
"types": "./components/ion-select.d.ts"
|
||||
},
|
||||
"./ion-skeleton-text": {
|
||||
"import": "./components/ion-skeleton-text.js",
|
||||
"types": "./components/ion-skeleton-text.d.ts"
|
||||
},
|
||||
"./ion-spinner": {
|
||||
"import": "./components/ion-spinner.js",
|
||||
"types": "./components/ion-spinner.d.ts"
|
||||
},
|
||||
"./ion-split-pane": {
|
||||
"import": "./components/ion-split-pane.js",
|
||||
"types": "./components/ion-split-pane.d.ts"
|
||||
},
|
||||
"./ion-tab": {
|
||||
"import": "./components/ion-tab.js",
|
||||
"types": "./components/ion-tab.d.ts"
|
||||
},
|
||||
"./ion-text": {
|
||||
"import": "./components/ion-text.js",
|
||||
"types": "./components/ion-text.d.ts"
|
||||
},
|
||||
"./ion-textarea": {
|
||||
"import": "./components/ion-textarea.js",
|
||||
"types": "./components/ion-textarea.d.ts"
|
||||
},
|
||||
"./ion-thumbnail": {
|
||||
"import": "./components/ion-thumbnail.js",
|
||||
"types": "./components/ion-thumbnail.d.ts"
|
||||
},
|
||||
"./ion-title": {
|
||||
"import": "./components/ion-title.js",
|
||||
"types": "./components/ion-title.d.ts"
|
||||
},
|
||||
"./ion-toggle": {
|
||||
"import": "./components/ion-toggle.js",
|
||||
"types": "./components/ion-toggle.d.ts"
|
||||
},
|
||||
"./ion-toolbar": {
|
||||
"import": "./components/ion-toolbar.js",
|
||||
"types": "./components/ion-toolbar.d.ts"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"components/",
|
||||
"css/",
|
||||
@@ -31,19 +327,20 @@
|
||||
"loader/"
|
||||
],
|
||||
"dependencies": {
|
||||
"@stencil/core": "^4.17.2",
|
||||
"@stencil/core": "^4.19.2",
|
||||
"ionicons": "^7.2.2",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@axe-core/playwright": "^4.8.5",
|
||||
"@axe-core/playwright": "^4.9.1",
|
||||
"@capacitor/core": "^6.0.0",
|
||||
"@capacitor/haptics": "^6.0.0",
|
||||
"@capacitor/keyboard": "^6.0.0",
|
||||
"@capacitor/status-bar": "^6.0.0",
|
||||
"@clack/prompts": "^0.7.0",
|
||||
"@ionic/eslint-config": "^0.3.0",
|
||||
"@ionic/prettier-config": "^2.0.0",
|
||||
"@playwright/test": "^1.39.0",
|
||||
"@playwright/test": "^1.45.0",
|
||||
"@rollup/plugin-node-resolve": "^8.4.0",
|
||||
"@rollup/plugin-virtual": "^2.0.3",
|
||||
"@stencil/angular-output-target": "^0.8.4",
|
||||
@@ -64,20 +361,18 @@
|
||||
"fs-extra": "^9.0.1",
|
||||
"jest": "^29.7.0",
|
||||
"jest-cli": "^29.7.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^2.6.1",
|
||||
"rollup": "^2.26.4",
|
||||
"sass": "^1.33.0",
|
||||
"serve": "^14.0.1",
|
||||
"style-dictionary": "^3.9.2",
|
||||
"stylelint": "^13.13.1",
|
||||
"stylelint-order": "^4.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run clean && npm run build.tokens && npm run build.css && stencil build --es5 --docs-json dist/docs.json",
|
||||
"build": "npm run clean && npm run build.css && stencil build --es5 --docs-json dist/docs.json",
|
||||
"build.css": "npm run css.sass && npm run css.minify",
|
||||
"build.debug": "npm run clean && stencil build --debug",
|
||||
"build.docs.json": "stencil build --docs-json dist/docs.json",
|
||||
"build.tokens": "node ./scripts/tokens.js && npm run lint.sass.fix && npm run prettier.tokens",
|
||||
"clean": "node scripts/clean.js",
|
||||
"css.minify": "cleancss -O2 -o ./css/ionic.bundle.css ./css/ionic.bundle.css",
|
||||
"css.sass": "sass --embed-sources --style compressed src/css:./css",
|
||||
@@ -89,8 +384,7 @@
|
||||
"lint.ts": "npm run eslint",
|
||||
"lint.ts.fix": "npm run eslint -- --fix",
|
||||
"prerender.e2e": "node scripts/testing/prerender.js",
|
||||
"prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx,scss}\"",
|
||||
"prettier.tokens": "prettier \"./src/foundations/*.scss\" --write --cache",
|
||||
"prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx}\"",
|
||||
"start": "npm run build.css && stencil build --dev --watch --serve",
|
||||
"test": "npm run test.spec && npm run test.e2e",
|
||||
"test.spec": "stencil test --spec --max-workers=2",
|
||||
@@ -102,7 +396,8 @@
|
||||
"docker.build": "docker build -t ionic-playwright .",
|
||||
"test.e2e.docker": "npm run docker.build && node ./scripts/docker.mjs",
|
||||
"test.e2e.docker.update-snapshots": "npm run test.e2e.docker -- --update-snapshots",
|
||||
"test.e2e.docker.ci": "npm run docker.build && CI=true node ./scripts/docker.mjs"
|
||||
"test.e2e.docker.ci": "npm run docker.build && CI=true node ./scripts/docker.mjs",
|
||||
"test.e2e.script": "node scripts/testing/e2e-script.mjs"
|
||||
},
|
||||
"author": "Ionic Team",
|
||||
"license": "MIT",
|
||||
@@ -111,7 +406,7 @@
|
||||
"url": "git+https://github.com/ionic-team/ionic-framework.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ionic-team/ionic/issues"
|
||||
"url": "https://github.com/ionic-team/ionic-framework/issues"
|
||||
},
|
||||
"homepage": "https://ionicframework.com/",
|
||||
"jest": {
|
||||
|
||||
260
core/scripts/testing/e2e-script.mjs
Normal file
@@ -0,0 +1,260 @@
|
||||
// The purpose of this script is to provide a way run the E2E tests
|
||||
// without having the developer to manually run multiple commands based
|
||||
// on the desired end result.
|
||||
// E.g. update the local ground truths for a specific component or
|
||||
// open the Playwright report after running the E2E tests.
|
||||
|
||||
import {
|
||||
intro,
|
||||
outro,
|
||||
confirm,
|
||||
spinner,
|
||||
isCancel,
|
||||
cancel,
|
||||
text,
|
||||
log,
|
||||
} from '@clack/prompts';
|
||||
import { exec, spawn } from 'child_process';
|
||||
import fs from 'node:fs';
|
||||
import { setTimeout as sleep } from 'node:timers/promises';
|
||||
import util from 'node:util';
|
||||
import color from 'picocolors';
|
||||
|
||||
async function main() {
|
||||
const execAsync = util.promisify(exec);
|
||||
const cleanUpFiles = async () => {
|
||||
// Clean up the local ground truths.
|
||||
const cleanUp = spinner();
|
||||
|
||||
// Inform the user that the local ground truths are being cleaned up.
|
||||
cleanUp.start('Restoring local ground truths');
|
||||
|
||||
// Reset the local ground truths.
|
||||
await execAsync('git reset -- src/**/*-linux.png').catch((error) => {
|
||||
cleanUp.stop('Failed to reset local ground truths');
|
||||
console.error(error);
|
||||
return process.exit(0);
|
||||
});
|
||||
|
||||
// Restore the local ground truths.
|
||||
await execAsync('git restore -- src/**/*-linux.png').catch((error) => {
|
||||
cleanUp.stop('Failed to restore local ground truths');
|
||||
console.error(error);
|
||||
return process.exit(0);
|
||||
});
|
||||
|
||||
// Inform the user that the local ground truths have been cleaned up.
|
||||
cleanUp.stop('Local ground truths have been restored to their original state in order to avoid committing them.');
|
||||
};
|
||||
|
||||
intro(color.inverse(' Update Local Ground Truths'));
|
||||
|
||||
// Ask user for the component name they want to test.
|
||||
const componentValue = await text({
|
||||
message: 'Enter the component or path you want to test (e.g. chip, src/components/chip)',
|
||||
placeholder: 'Empty for all components',
|
||||
});
|
||||
|
||||
// User cancelled the operation with `Ctrl+C` or `CMD+C`.
|
||||
if (isCancel(componentValue)) {
|
||||
cancel('Operation cancelled');
|
||||
return process.exit(0);
|
||||
}
|
||||
|
||||
// Ask user if they want to update their local ground truths.
|
||||
const shouldUpdateTruths = await confirm({
|
||||
message: 'Do you want to update your local ground truths?',
|
||||
});
|
||||
|
||||
// User cancelled the operation with `Ctrl+C` or `CMD+C`.
|
||||
if (isCancel(shouldUpdateTruths)) {
|
||||
cancel('Operation cancelled');
|
||||
return process.exit(0);
|
||||
}
|
||||
|
||||
if (shouldUpdateTruths) {
|
||||
const defaultBaseBranch = 'main';
|
||||
|
||||
// Ask user for the base branch.
|
||||
let baseBranch = await text({
|
||||
message: 'Enter the base branch name:',
|
||||
placeholder: `default: ${defaultBaseBranch}`,
|
||||
})
|
||||
|
||||
// User cancelled the operation with `Ctrl+C` or `CMD+C`.
|
||||
if (isCancel(baseBranch)) {
|
||||
cancel('Operation cancelled');
|
||||
return process.exit(0);
|
||||
}
|
||||
|
||||
// User didn't provide a base branch.
|
||||
if (!baseBranch) {
|
||||
baseBranch = defaultBaseBranch;
|
||||
}
|
||||
|
||||
/**
|
||||
* The provided base branch needs to be fetched.
|
||||
* This ensures that the local base branch is up-to-date with the
|
||||
* remote base branch. Otherwise, there might be errors stating that
|
||||
* certain files don't exist in the local base branch.
|
||||
*/
|
||||
const fetchBaseBranch = spinner();
|
||||
|
||||
// Inform the user that the base branch is being fetched.
|
||||
fetchBaseBranch.start(`Fetching "${baseBranch}" to have the latest changes`);
|
||||
|
||||
// Fetch the base branch.
|
||||
await execAsync(`git fetch origin ${baseBranch}`).catch((error) => {
|
||||
fetchBaseBranch.stop(`Failed to fetch "${baseBranch}"`);
|
||||
console.error(error);
|
||||
return process.exit(0);
|
||||
});
|
||||
|
||||
// Inform the user that the base branch has been fetched.
|
||||
fetchBaseBranch.stop(`Fetched "${baseBranch}"`);
|
||||
|
||||
|
||||
const updateGroundTruth = spinner();
|
||||
|
||||
// Inform the user that the local ground truths are being updated.
|
||||
updateGroundTruth.start('Updating local ground truths');
|
||||
|
||||
// Check if user provided an existing file or directory.
|
||||
const isValidLocation = fs.existsSync(componentValue);
|
||||
|
||||
// User provided an existing file or directory.
|
||||
if (isValidLocation) {
|
||||
const stats = fs.statSync(componentValue);
|
||||
|
||||
// User provided a file as the component.
|
||||
// ex: `componentValue` = `src/components/chip/test/basic/chip.e2e.ts`
|
||||
if (stats.isFile()) {
|
||||
// Update the local ground truths for the provided path.
|
||||
await execAsync(`git checkout origin/${baseBranch} -- ${componentValue}-snapshots/*-linux.png`).catch((error) => {
|
||||
updateGroundTruth.stop('Failed to update local ground truths');
|
||||
console.error(error);
|
||||
return process.exit(0);
|
||||
});
|
||||
}
|
||||
|
||||
// User provided a directory as the component.
|
||||
// ex: `componentValue` = `src/components/chip`
|
||||
if (stats.isDirectory()) {
|
||||
// Update the local ground truths for the provided directory.
|
||||
await execAsync(`git checkout origin/${baseBranch} -- ${componentValue}/test/*/*.e2e.ts-snapshots/*-linux.png`).catch((error) => {
|
||||
updateGroundTruth.stop('Failed to update local ground truths');
|
||||
console.error(error);
|
||||
return process.exit(0);
|
||||
});
|
||||
}
|
||||
}
|
||||
// User provided a component name as the component.
|
||||
// ex: `componentValue` = `chip`
|
||||
else if (componentValue) {
|
||||
// Update the local ground truths for the provided component.
|
||||
await execAsync(`git checkout origin/${baseBranch} -- src/components/${componentValue}/test/*/${componentValue}.e2e.ts-snapshots/*-linux.png`).catch((error) => {
|
||||
updateGroundTruth.stop('Failed to update local ground truths');
|
||||
console.error(error);
|
||||
return process.exit(0);
|
||||
});
|
||||
}
|
||||
// User provided an empty string.
|
||||
else {
|
||||
// Update the local ground truths for all components.
|
||||
await execAsync(`git checkout origin/${baseBranch} -- src/components/*/test/*/*.e2e.ts-snapshots/*-linux.png`).catch((error) => {
|
||||
updateGroundTruth.stop('Failed to update local ground truths');
|
||||
console.error(error);
|
||||
return process.exit(0);
|
||||
});
|
||||
}
|
||||
|
||||
// Inform the user that the local ground truths have been updated.
|
||||
updateGroundTruth.stop('Updated local ground truths');
|
||||
}
|
||||
|
||||
const buildCore = spinner();
|
||||
|
||||
// Inform the user that the core is being built.
|
||||
buildCore.start('Building core');
|
||||
|
||||
/**
|
||||
* Build core
|
||||
* Otherwise, the uncommitted changes will not be reflected in the tests because:
|
||||
* - popping the stash doesn't trigger a re-render even if `npm start` is running
|
||||
* - app is not running the `npm start` command
|
||||
*/
|
||||
await execAsync('npm run build').catch((error) => {
|
||||
// Clean up the local ground truths.
|
||||
cleanUpFiles();
|
||||
|
||||
buildCore.stop('Failed to build core');
|
||||
console.error(error);
|
||||
return process.exit(0);
|
||||
});
|
||||
|
||||
buildCore.stop('Built core');
|
||||
|
||||
const runE2ETests = spinner();
|
||||
|
||||
// Inform the user that the E2E tests are being run.
|
||||
runE2ETests.start('Running E2E tests');
|
||||
|
||||
// User provided a component value.
|
||||
if (componentValue) {
|
||||
await execAsync(`npm run test.e2e.docker.ci ${componentValue}`).catch((error) => {
|
||||
// Clean up the local ground truths.
|
||||
cleanUpFiles();
|
||||
|
||||
runE2ETests.stop('Failed to run E2E tests');
|
||||
console.error(error);
|
||||
return process.exit(0);
|
||||
});
|
||||
} else {
|
||||
await execAsync('npm run test.e2e.docker.ci').catch((error) => {
|
||||
// Clean up the local ground truths.
|
||||
cleanUpFiles();
|
||||
|
||||
runE2ETests.stop('Failed to run E2E tests');
|
||||
console.error(error);
|
||||
return process.exit(0);
|
||||
});
|
||||
}
|
||||
|
||||
runE2ETests.stop('Ran E2E tests');
|
||||
|
||||
// Clean up the local ground truths.
|
||||
await cleanUpFiles();
|
||||
|
||||
// Ask user if they want to open the Playwright report.
|
||||
const shouldOpenReport = await confirm({
|
||||
message: 'Do you want to open the Playwright report?',
|
||||
});
|
||||
|
||||
// User cancelled the operation with `Ctrl+C` or `CMD+C`.
|
||||
if (isCancel(shouldOpenReport)) {
|
||||
cancel('Operation cancelled');
|
||||
return process.exit(0);
|
||||
}
|
||||
|
||||
// User chose to open the Playwright report.
|
||||
if (shouldOpenReport) {
|
||||
// Use spawn to display the server information and the key to quit the server.
|
||||
spawn('npx', ['playwright', 'show-report'], {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
} else {
|
||||
// Inform the user that the Playwright report can be opened by running the following command.
|
||||
log.info('If you change your mind, you can open the Playwright report by running the following command:');
|
||||
log.info(color.bold('npx playwright show-report'));
|
||||
}
|
||||
|
||||
if (shouldOpenReport) {
|
||||
outro("You're all set! Don't forget to quit serving the Playwright report when you're done.");
|
||||
} else {
|
||||
outro("You're all set!");
|
||||
}
|
||||
|
||||
await sleep(1000);
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
@@ -1,197 +0,0 @@
|
||||
/* For generating Design Tokens, we use Style Dictionary for several reasons:
|
||||
- It's prepared to easily generate tokens for multiple types of outputs (CSS, SCSS, iOS, Android, documentation, etc.).
|
||||
- It also works very well out of the box with any kind of Design Tokens formats, like Figma Tokens, as well as APIs to adjust to more custom ones.
|
||||
- It is probably the most well-known and widely used Design Tokens tool. It has also been regularly maintained for a long time.
|
||||
- It can easily scale to different necessities we might have in the future.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const StyleDictionary = require('style-dictionary');
|
||||
|
||||
const { fileHeader } = StyleDictionary.formatHelpers;
|
||||
|
||||
// Empty for as an example of how we can add some extra variables, not from the tokens JSON
|
||||
const customVariables = ``;
|
||||
|
||||
// Prefix for all generated variables
|
||||
const variablesPrefix = 'ionic';
|
||||
|
||||
function hexToRgb(hex) {
|
||||
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
||||
return result
|
||||
? {
|
||||
r: parseInt(result[1], 16),
|
||||
g: parseInt(result[2], 16),
|
||||
b: parseInt(result[3], 16),
|
||||
}
|
||||
: null;
|
||||
}
|
||||
|
||||
// CSS vanilla :root format
|
||||
StyleDictionary.registerFormat({
|
||||
name: 'rootFormat',
|
||||
formatter({ dictionary, file }) {
|
||||
// Add a prefix to all variable names
|
||||
const prefixedVariables = dictionary.allProperties.map((prop) => {
|
||||
const rgb = hexToRgb(prop.value);
|
||||
return ` --${variablesPrefix}-${prop.name}: ${prop.value};${
|
||||
rgb ? `\n --${variablesPrefix}-${prop.name}-rgb: ${rgb.r}, ${rgb.g}, ${rgb.b};` : ``
|
||||
}`;
|
||||
});
|
||||
|
||||
return (
|
||||
fileHeader({ file }) +
|
||||
':root {\n' +
|
||||
prefixedVariables.join('\n') + // Join all prefixed variables with a newline
|
||||
customVariables +
|
||||
'\n}\n'
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
// scss variables format
|
||||
StyleDictionary.registerFormat({
|
||||
name: 'scssVariablesFormat',
|
||||
formatter({ dictionary, file }) {
|
||||
// Add a prefix to all variable names
|
||||
const prefixedVariables = dictionary.allProperties.map((prop) => {
|
||||
const rgb = hexToRgb(prop.value);
|
||||
return `$${variablesPrefix}-${prop.name}: var(--${variablesPrefix}-${prop.name}, ${prop.value});${
|
||||
rgb
|
||||
? `\n$${variablesPrefix}-${prop.name}-rgb: var(--${variablesPrefix}-${prop.name}-rgb, ${rgb.r}, ${rgb.g}, ${rgb.b});`
|
||||
: ``
|
||||
}`;
|
||||
});
|
||||
|
||||
return (
|
||||
fileHeader({ file }) +
|
||||
prefixedVariables.join('\n') + // Join all prefixed variables with a newline
|
||||
customVariables +
|
||||
'\n'
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
// Create utility-classes
|
||||
StyleDictionary.registerFormat({
|
||||
name: 'cssUtilityClassesFormat',
|
||||
formatter({ dictionary, file }) {
|
||||
const utilityClasses = dictionary.allProperties.map((prop) => {
|
||||
let tokenType = prop.attributes.category;
|
||||
const className = `${prop.name}`;
|
||||
let utilityClass = '';
|
||||
|
||||
switch (tokenType) {
|
||||
case 'color':
|
||||
utilityClass = `.${variablesPrefix}-${className} {\n color: $ionic-${prop.name};\n}
|
||||
.${variablesPrefix}-background-${className} {\n background-color: $ionic-${prop.name};\n}`;
|
||||
break;
|
||||
case 'border':
|
||||
const borderAttribute = prop.attributes.type === 'radius' ? 'border-radius' : 'border-width';
|
||||
utilityClass = `.${variablesPrefix}-${className} {\n ${borderAttribute}: $ionic-${prop.name};\n}`;
|
||||
break;
|
||||
case 'font':
|
||||
let fontAttribute;
|
||||
switch (prop.attributes.type) {
|
||||
case 'size':
|
||||
fontAttribute = 'font-size';
|
||||
break;
|
||||
case 'weight':
|
||||
fontAttribute = 'font-weight';
|
||||
break;
|
||||
case 'line-height':
|
||||
fontAttribute = 'line-height';
|
||||
break;
|
||||
case 'letter-spacing':
|
||||
fontAttribute = 'letter-spacing';
|
||||
break;
|
||||
case 'family':
|
||||
return;
|
||||
}
|
||||
utilityClass = `.${variablesPrefix}-${className} {\n ${fontAttribute}: $ionic-${prop.name};\n}`;
|
||||
break;
|
||||
case 'elevation':
|
||||
utilityClass = `.${variablesPrefix}-${className} {\n box-shadow: $ionic-${prop.name};\n}`;
|
||||
break;
|
||||
case 'space':
|
||||
utilityClass = `.${variablesPrefix}-margin-${className} {\n --margin-start: #{$ionic-${prop.name}};\n --margin-end: #{$ionic-${prop.name}};\n --margin-top: #{$ionic-${prop.name}};\n --margin-bottom: #{$ionic-${prop.name}};\n\n @include margin(${prop.value});\n};\n
|
||||
.${variablesPrefix}-padding-${className} {\n --padding-start: #{$ionic-${prop.name}};\n --padding-end: #{$ionic-${prop.name}};\n --padding-top: #{$ionic-${prop.name}};\n --padding-bottom: #{$ionic-${prop.name}};\n\n @include padding(${prop.value});\n};\n`;
|
||||
break;
|
||||
default:
|
||||
utilityClass = `.${variablesPrefix}-${className} {\n ${tokenType}: $ionic-${prop.name};\n}`;
|
||||
}
|
||||
|
||||
return utilityClass;
|
||||
});
|
||||
|
||||
return [
|
||||
fileHeader({ file }),
|
||||
'@import "./ionic.vars";\n@import "../themes/mixins";\n',
|
||||
utilityClasses.join('\n'),
|
||||
].join('\n');
|
||||
},
|
||||
});
|
||||
|
||||
// Make Style Dictionary comply with the $ format on properties from W3C Guidelines
|
||||
const w3cTokenJsonParser = {
|
||||
pattern: /\.json|\.tokens\.json|\.tokens$/,
|
||||
parse({ contents }) {
|
||||
// replace $value with value so that style dictionary recognizes it
|
||||
var preparedContent = (contents || '{}')
|
||||
.replace(/"\$?value":/g, '"value":')
|
||||
// convert $description to comment
|
||||
.replace(/"\$?description":/g, '"comment":');
|
||||
//
|
||||
|
||||
return JSON.parse(preparedContent);
|
||||
},
|
||||
};
|
||||
|
||||
StyleDictionary.registerParser(w3cTokenJsonParser);
|
||||
|
||||
// Generate Tokens
|
||||
StyleDictionary.extend({
|
||||
source: ['./src/foundations/*.json'],
|
||||
platforms: {
|
||||
css: {
|
||||
buildPath: './src/foundations/',
|
||||
transformGroup: 'css',
|
||||
files: [
|
||||
{
|
||||
destination: 'ionic.root.scss',
|
||||
format: 'rootFormat',
|
||||
options: {
|
||||
outputReferences: true,
|
||||
fileHeader: `myFileHeader`,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
scss: {
|
||||
buildPath: './src/foundations/',
|
||||
transformGroup: 'scss',
|
||||
files: [
|
||||
{
|
||||
destination: 'ionic.vars.scss',
|
||||
format: 'scssVariablesFormat',
|
||||
options: {
|
||||
outputReferences: true,
|
||||
fileHeader: `myFileHeader`,
|
||||
},
|
||||
},
|
||||
{
|
||||
destination: 'ionic.utility.scss',
|
||||
format: 'cssUtilityClassesFormat',
|
||||
options: {
|
||||
outputReferences: true,
|
||||
fileHeader: `myFileHeader`,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
fileHeader: {
|
||||
myFileHeader: () => {
|
||||
return [`This is an auto-generated file, please do not change it directly.`, `Ionic Design System`];
|
||||
},
|
||||
},
|
||||
}).buildAllPlatforms();
|
||||
1398
core/src/components.d.ts
vendored
@@ -11,12 +11,7 @@
|
||||
:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),
|
||||
:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded) {
|
||||
@include margin($accordion-md-expanded-margin, 0, $accordion-md-expanded-margin, 0);
|
||||
@include border-radius(
|
||||
$accordion-md-border-radius,
|
||||
$accordion-md-border-radius,
|
||||
$accordion-md-border-radius,
|
||||
$accordion-md-border-radius
|
||||
);
|
||||
@include border-radius($accordion-md-border-radius, $accordion-md-border-radius, $accordion-md-border-radius, $accordion-md-border-radius);
|
||||
}
|
||||
|
||||
:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-previous) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@import "../../themes/native/native.globals";
|
||||
@import "../../themes/ionic.globals";
|
||||
@import "../accordion/accordion.vars";
|
||||
|
||||
// Accordion Group
|
||||
|
||||
@@ -2,20 +2,18 @@ import type { ComponentInterface, EventEmitter } from '@stencil/core';
|
||||
import { Component, Element, Event, Host, Listen, Method, Prop, Watch, h } from '@stencil/core';
|
||||
import { printIonWarning } from '@utils/logging';
|
||||
|
||||
import { getIonTheme } from '../../global/ionic-global';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
|
||||
import type { AccordionGroupChangeEventDetail } from './accordion-group-interface';
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
||||
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-accordion-group',
|
||||
styleUrls: {
|
||||
ios: 'accordion-group.ios.scss',
|
||||
md: 'accordion-group.md.scss',
|
||||
ionic: 'accordion-group.md.scss',
|
||||
},
|
||||
shadow: true,
|
||||
})
|
||||
@@ -280,12 +278,12 @@ export class AccordionGroup implements ComponentInterface {
|
||||
|
||||
render() {
|
||||
const { disabled, readonly, expand } = this;
|
||||
const theme = getIonTheme(this);
|
||||
const mode = getIonMode(this);
|
||||
|
||||
return (
|
||||
<Host
|
||||
class={{
|
||||
[theme]: true,
|
||||
[mode]: true,
|
||||
'accordion-group-disabled': disabled,
|
||||
'accordion-group-readonly': readonly,
|
||||
[`accordion-group-expand-${expand}`]: true,
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
@import "../../themes/native/native.globals.md";
|
||||
@import "../../themes/ionic.globals.md";
|
||||
|
||||
// Accordion
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Border radius applied to the accordion
|
||||
$accordion-md-border-radius: 6px;
|
||||
$accordion-md-border-radius: 6px;
|
||||
|
||||
/// @prop - Box shadow of the accordion
|
||||
$accordion-md-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
|
||||
0px 1px 5px 0px rgba(0, 0, 0, 0.12);
|
||||
$accordion-md-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
|
||||
|
||||
/// @prop - Margin of the expanded accordion
|
||||
$accordion-md-expanded-margin: 16px;
|
||||
$accordion-md-expanded-margin: 16px;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { addEventListener, getElementRoot, raf, removeEventListener, transitionE
|
||||
import { chevronDown } from 'ionicons/icons';
|
||||
|
||||
import { config } from '../../global/config';
|
||||
import { getIonTheme } from '../../global/ionic-global';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
|
||||
const enum AccordionState {
|
||||
Collapsed = 1 << 0,
|
||||
@@ -14,8 +14,7 @@ const enum AccordionState {
|
||||
}
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
||||
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*
|
||||
* @slot header - Content is placed at the top and is used to
|
||||
* expand or collapse the accordion item.
|
||||
@@ -32,7 +31,6 @@ const enum AccordionState {
|
||||
styleUrls: {
|
||||
ios: 'accordion.ios.scss',
|
||||
md: 'accordion.md.scss',
|
||||
ionic: 'accordion.md.scss',
|
||||
},
|
||||
shadow: {
|
||||
delegatesFocus: true,
|
||||
@@ -79,7 +77,7 @@ export class Accordion implements ComponentInterface {
|
||||
* rotated when the accordion is expanded
|
||||
* or collapsed.
|
||||
*/
|
||||
@Prop() toggleIcon?: string;
|
||||
@Prop() toggleIcon = chevronDown;
|
||||
|
||||
/**
|
||||
* The slot inside of `ion-item` to
|
||||
@@ -193,8 +191,7 @@ export class Accordion implements ComponentInterface {
|
||||
return;
|
||||
}
|
||||
|
||||
const { toggleIconSlot } = this;
|
||||
const accordionToggleIcon = this.toggleIcon ?? config.get('accordionToggleIcon', chevronDown);
|
||||
const { toggleIconSlot, toggleIcon } = this;
|
||||
|
||||
/**
|
||||
* Check if there already is a toggle icon.
|
||||
@@ -209,7 +206,7 @@ export class Accordion implements ComponentInterface {
|
||||
iconEl.slot = toggleIconSlot;
|
||||
iconEl.lazy = false;
|
||||
iconEl.classList.add('ion-accordion-toggle-icon');
|
||||
iconEl.icon = accordionToggleIcon;
|
||||
iconEl.icon = toggleIcon;
|
||||
iconEl.setAttribute('aria-hidden', 'true');
|
||||
|
||||
ionItem.appendChild(iconEl);
|
||||
@@ -405,7 +402,7 @@ export class Accordion implements ComponentInterface {
|
||||
|
||||
render() {
|
||||
const { disabled, readonly } = this;
|
||||
const theme = getIonTheme(this);
|
||||
const mode = getIonMode(this);
|
||||
const expanded = this.state === AccordionState.Expanded || this.state === AccordionState.Expanding;
|
||||
const headerPart = expanded ? 'header expanded' : 'header';
|
||||
const contentPart = expanded ? 'content expanded' : 'content';
|
||||
@@ -415,7 +412,7 @@ export class Accordion implements ComponentInterface {
|
||||
return (
|
||||
<Host
|
||||
class={{
|
||||
[theme]: true,
|
||||
[mode]: true,
|
||||
'accordion-expanding': this.state === AccordionState.Expanding,
|
||||
'accordion-expanded': this.state === AccordionState.Expanded,
|
||||
'accordion-collapsing': this.state === AccordionState.Collapsing,
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
@import "../../themes/native/native.globals";
|
||||
@import "../../themes/ionic.globals";
|
||||
|
||||
// Accordion
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Background color of the accordion
|
||||
$accordion-background-color: var(--ion-background-color, #ffffff);
|
||||
$accordion-background-color: var(--ion-background-color, #ffffff);
|
||||
|
||||
/// @prop - Duration of the accordion transition
|
||||
$accordion-transition-duration: 300ms;
|
||||
$accordion-transition-duration: 300ms;
|
||||
|
||||
/// @prop - Timing function of the accordion transition
|
||||
$accordion-transition-easing: cubic-bezier(0.25, 0.8, 0.5, 1);
|
||||
$accordion-transition-easing: cubic-bezier(0.25, 0.8, 0.5, 1);
|
||||
|
||||
/// @prop - Opacity of the disabled accordion
|
||||
$accordion-disabled-opacity: 0.4;
|
||||
$accordion-disabled-opacity: 0.4;
|
||||
|
||||
/// @prop - Margin of the inset accordion
|
||||
$accordion-inset-margin: 16px;
|
||||
$accordion-inset-margin: 16px;
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
import type { OverlayOptions } from '@utils/overlays-interface';
|
||||
import type { AnimationBuilder, LiteralUnion, Mode } from '../../interface';
|
||||
|
||||
import type { LiteralUnion } from '../../interface';
|
||||
|
||||
export interface ActionSheetOptions extends OverlayOptions {
|
||||
export interface ActionSheetOptions {
|
||||
header?: string;
|
||||
subHeader?: string;
|
||||
cssClass?: string | string[];
|
||||
buttons: (ActionSheetButton | string)[];
|
||||
backdropDismiss?: boolean;
|
||||
translucent?: boolean;
|
||||
animated?: boolean;
|
||||
mode?: Mode;
|
||||
keyboardClose?: boolean;
|
||||
id?: string;
|
||||
htmlAttributes?: { [key: string]: any };
|
||||
|
||||
enterAnimation?: AnimationBuilder;
|
||||
leaveAnimation?: AnimationBuilder;
|
||||
}
|
||||
|
||||
export interface ActionSheetButton<T = any> {
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
--backdrop-opacity: var(--ion-backdrop-opacity, 0.4);
|
||||
--button-background: #{$action-sheet-ios-button-background};
|
||||
--button-background-activated: #{$action-sheet-ios-button-background-activated};
|
||||
--button-background-activated-opacity: 0.08;
|
||||
--button-background-activated-opacity: .08;
|
||||
--button-background-hover: currentColor;
|
||||
--button-background-hover-opacity: 0.04;
|
||||
--button-background-hover-opacity: .04;
|
||||
--button-background-focused: currentColor;
|
||||
--button-background-focused-opacity: 0.12;
|
||||
--button-background-focused-opacity: .12;
|
||||
--button-background-selected: #{$action-sheet-ios-button-background-selected};
|
||||
--button-background-selected-opacity: 1;
|
||||
--button-color: #{$action-sheet-ios-button-text-color};
|
||||
@@ -51,14 +51,10 @@
|
||||
// ---------------------------------------------------
|
||||
|
||||
.action-sheet-container {
|
||||
@include padding(
|
||||
$action-sheet-ios-padding-top,
|
||||
$action-sheet-ios-padding-end,
|
||||
$action-sheet-ios-padding-bottom,
|
||||
$action-sheet-ios-padding-start
|
||||
);
|
||||
@include padding($action-sheet-ios-padding-top, $action-sheet-ios-padding-end, $action-sheet-ios-padding-bottom, $action-sheet-ios-padding-start);
|
||||
}
|
||||
|
||||
|
||||
// iOS Action Sheet Group
|
||||
// ---------------------------------------------------
|
||||
|
||||
@@ -75,6 +71,7 @@
|
||||
@include margin(null, null, $action-sheet-ios-group-margin-bottom, null);
|
||||
}
|
||||
|
||||
|
||||
// iOS Translucent Action Sheet
|
||||
// ---------------------------------------------------
|
||||
|
||||
@@ -87,17 +84,9 @@
|
||||
:host(.action-sheet-translucent) .action-sheet-title,
|
||||
:host(.action-sheet-translucent) .action-sheet-button {
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient(
|
||||
0deg,
|
||||
$action-sheet-ios-translucent-background-color,
|
||||
$action-sheet-ios-translucent-background-color 100%
|
||||
),
|
||||
linear-gradient(
|
||||
0deg,
|
||||
$action-sheet-ios-translucent-border-color,
|
||||
$action-sheet-ios-translucent-border-color 50%,
|
||||
$action-sheet-ios-translucent-background-color 50%
|
||||
);
|
||||
background-image:
|
||||
linear-gradient(0deg, $action-sheet-ios-translucent-background-color, $action-sheet-ios-translucent-background-color 100%),
|
||||
linear-gradient(0deg, $action-sheet-ios-translucent-border-color, $action-sheet-ios-translucent-border-color 50%, $action-sheet-ios-translucent-background-color 50%);
|
||||
background-repeat: no-repeat;
|
||||
|
||||
/* stylelint-disable-next-line all */
|
||||
@@ -126,16 +115,12 @@
|
||||
background: $action-sheet-ios-button-background;
|
||||
}
|
||||
|
||||
|
||||
// iOS Action Sheet Title
|
||||
// ---------------------------------------------------
|
||||
|
||||
.action-sheet-title {
|
||||
@include padding(
|
||||
$action-sheet-ios-title-padding-top,
|
||||
$action-sheet-ios-title-padding-end,
|
||||
$action-sheet-ios-title-padding-bottom,
|
||||
$action-sheet-ios-title-padding-start
|
||||
);
|
||||
@include padding($action-sheet-ios-title-padding-top, $action-sheet-ios-title-padding-end, $action-sheet-ios-title-padding-bottom, $action-sheet-ios-title-padding-start);
|
||||
|
||||
color: var(--color, $action-sheet-ios-title-color);
|
||||
|
||||
@@ -150,18 +135,14 @@
|
||||
}
|
||||
|
||||
.action-sheet-sub-title {
|
||||
@include padding(
|
||||
$action-sheet-ios-sub-title-padding-top,
|
||||
$action-sheet-ios-sub-title-padding-end,
|
||||
$action-sheet-ios-sub-title-padding-bottom,
|
||||
$action-sheet-ios-sub-title-padding-start
|
||||
);
|
||||
@include padding($action-sheet-ios-sub-title-padding-top, $action-sheet-ios-sub-title-padding-end, $action-sheet-ios-sub-title-padding-bottom, $action-sheet-ios-sub-title-padding-start);
|
||||
|
||||
font-size: $action-sheet-ios-sub-title-font-size;
|
||||
|
||||
font-weight: $action-sheet-ios-title-font-weight;
|
||||
}
|
||||
|
||||
|
||||
// iOS Action Sheet Buttons
|
||||
// ---------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,163 +1,148 @@
|
||||
@import "../../themes/native/native.globals.ios";
|
||||
@import "../../themes/ionic.globals.ios";
|
||||
|
||||
// iOS Action Sheet
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Text align of the action sheet
|
||||
$action-sheet-ios-text-align: center;
|
||||
$action-sheet-ios-text-align: center;
|
||||
|
||||
/// @prop - Padding top of the action sheet
|
||||
$action-sheet-ios-padding-top: 0;
|
||||
$action-sheet-ios-padding-top: 0;
|
||||
|
||||
/// @prop - Padding end of the action sheet
|
||||
$action-sheet-ios-padding-end: 8px;
|
||||
$action-sheet-ios-padding-end: 8px;
|
||||
|
||||
/// @prop - Padding bottom of the action sheet
|
||||
$action-sheet-ios-padding-bottom: $action-sheet-ios-padding-top;
|
||||
$action-sheet-ios-padding-bottom: $action-sheet-ios-padding-top;
|
||||
|
||||
/// @prop - Padding start of the action sheet
|
||||
$action-sheet-ios-padding-start: $action-sheet-ios-padding-end;
|
||||
$action-sheet-ios-padding-start: $action-sheet-ios-padding-end;
|
||||
|
||||
/// @prop - Top margin of the action sheet button group
|
||||
$action-sheet-ios-group-margin-top: 10px;
|
||||
$action-sheet-ios-group-margin-top: 10px;
|
||||
|
||||
/// @prop - Bottom margin of the action sheet button group
|
||||
$action-sheet-ios-group-margin-bottom: 10px;
|
||||
$action-sheet-ios-group-margin-bottom: 10px;
|
||||
|
||||
/// @prop - Background color of the action sheet
|
||||
$action-sheet-ios-background-color: $overlay-ios-background-color;
|
||||
$action-sheet-ios-background-color: $overlay-ios-background-color;
|
||||
|
||||
/// @prop - Border radius of the action sheet
|
||||
$action-sheet-ios-border-radius: 13px;
|
||||
$action-sheet-ios-border-radius: 13px;
|
||||
|
||||
|
||||
// Action Sheet Title
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the action sheet title
|
||||
$action-sheet-ios-title-padding-top: 14px;
|
||||
$action-sheet-ios-title-padding-top: 14px;
|
||||
|
||||
/// @prop - Padding end of the action sheet title
|
||||
$action-sheet-ios-title-padding-end: 10px;
|
||||
$action-sheet-ios-title-padding-end: 10px;
|
||||
|
||||
/// @prop - Padding bottom of the action sheet title
|
||||
$action-sheet-ios-title-padding-bottom: 13px;
|
||||
$action-sheet-ios-title-padding-bottom: 13px;
|
||||
|
||||
/// @prop - Padding start of the action sheet title
|
||||
$action-sheet-ios-title-padding-start: $action-sheet-ios-title-padding-end;
|
||||
$action-sheet-ios-title-padding-start: $action-sheet-ios-title-padding-end;
|
||||
|
||||
/// @prop - Color of the action sheet title
|
||||
$action-sheet-ios-title-color: $text-color-step-600;
|
||||
$action-sheet-ios-title-color: $text-color-step-600;
|
||||
|
||||
/// @prop - Font size of the action sheet title
|
||||
$action-sheet-ios-title-font-size: dynamic-font-min(1, 13px);
|
||||
$action-sheet-ios-title-font-size: dynamic-font-min(1, 13px);
|
||||
|
||||
/// @prop - Font weight of the action sheet title
|
||||
$action-sheet-ios-title-font-weight: 400;
|
||||
$action-sheet-ios-title-font-weight: 400;
|
||||
|
||||
/// @prop - Font weight of the action sheet title when it has a sub title
|
||||
$action-sheet-ios-title-with-sub-title-font-weight: 600;
|
||||
$action-sheet-ios-title-with-sub-title-font-weight: 600;
|
||||
|
||||
// Action Sheet Subtitle
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Font size of the action sheet sub title
|
||||
$action-sheet-ios-sub-title-font-size: dynamic-font-min(1, 13px);
|
||||
$action-sheet-ios-sub-title-font-size: dynamic-font-min(1, 13px);
|
||||
|
||||
/// @prop - Padding top of the action sheet sub title
|
||||
$action-sheet-ios-sub-title-padding-top: 6px;
|
||||
$action-sheet-ios-sub-title-padding-top: 6px;
|
||||
|
||||
/// @prop - Padding end of the action sheet sub title
|
||||
$action-sheet-ios-sub-title-padding-end: 0;
|
||||
$action-sheet-ios-sub-title-padding-end: 0;
|
||||
|
||||
/// @prop - Padding bottom of the action sheet sub title
|
||||
$action-sheet-ios-sub-title-padding-bottom: 0;
|
||||
$action-sheet-ios-sub-title-padding-bottom: 0;
|
||||
|
||||
/// @prop - Padding start of the action sheet sub title
|
||||
$action-sheet-ios-sub-title-padding-start: $action-sheet-ios-sub-title-padding-end;
|
||||
$action-sheet-ios-sub-title-padding-start: $action-sheet-ios-sub-title-padding-end;
|
||||
|
||||
|
||||
// Action Sheet Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Minimum height of the action sheet button
|
||||
$action-sheet-ios-button-height: 56px;
|
||||
$action-sheet-ios-button-height: 56px;
|
||||
|
||||
/// @prop - Padding of the action sheet button
|
||||
$action-sheet-ios-button-padding: 14px;
|
||||
$action-sheet-ios-button-padding: 14px;
|
||||
|
||||
/// @prop - Text color of the action sheet button
|
||||
$action-sheet-ios-button-text-color: ion-color(primary, base);
|
||||
$action-sheet-ios-button-text-color: ion-color(primary, base);
|
||||
|
||||
/// @prop - Font size of the action sheet button icon
|
||||
$action-sheet-ios-button-icon-font-size: dynamic-font-min(1, 28px);
|
||||
$action-sheet-ios-button-icon-font-size: dynamic-font-min(1, 28px);
|
||||
|
||||
/// @prop - Padding right of the action sheet button icon
|
||||
$action-sheet-ios-button-icon-padding-right: 0.3em;
|
||||
$action-sheet-ios-button-icon-padding-right: .3em;
|
||||
|
||||
/// @prop - Font size of the action sheet button
|
||||
$action-sheet-ios-button-font-size: dynamic-font-min(1, 20px);
|
||||
$action-sheet-ios-button-font-size: dynamic-font-min(1, 20px);
|
||||
|
||||
/// @prop - Border color alpha of the action sheet button
|
||||
$action-sheet-ios-button-border-color-alpha: 0.08;
|
||||
$action-sheet-ios-button-border-color-alpha: .08;
|
||||
|
||||
/// @prop - Border color of the action sheet button
|
||||
$action-sheet-ios-button-border-color: rgba($text-color-rgb, $action-sheet-ios-button-border-color-alpha);
|
||||
$action-sheet-ios-button-border-color: rgba($text-color-rgb, $action-sheet-ios-button-border-color-alpha);
|
||||
|
||||
/// @prop - Background color of the action sheet button
|
||||
$action-sheet-ios-button-background: linear-gradient(
|
||||
0deg,
|
||||
$action-sheet-ios-button-border-color,
|
||||
$action-sheet-ios-button-border-color 50%,
|
||||
transparent 50%
|
||||
)
|
||||
bottom / 100% 1px no-repeat transparent;
|
||||
$action-sheet-ios-button-background: linear-gradient(0deg, $action-sheet-ios-button-border-color, $action-sheet-ios-button-border-color 50%, transparent 50%) bottom / 100% 1px no-repeat transparent;
|
||||
|
||||
/// @prop - Background color of the activated action sheet button
|
||||
$action-sheet-ios-button-background-activated: $text-color;
|
||||
$action-sheet-ios-button-background-activated: $text-color;
|
||||
|
||||
/// @prop - Background color of the selected action sheet button
|
||||
$action-sheet-ios-button-background-selected: var(
|
||||
--ion-color-step-150,
|
||||
var(--ion-background-color-step-150, $background-color)
|
||||
);
|
||||
$action-sheet-ios-button-background-selected: var(--ion-color-step-150, var(--ion-background-color-step-150, $background-color));
|
||||
|
||||
/// @prop - Destructive text color of the action sheet button
|
||||
$action-sheet-ios-button-destructive-text-color: ion-color(danger, base);
|
||||
$action-sheet-ios-button-destructive-text-color: ion-color(danger, base);
|
||||
|
||||
/// @prop - Font weight of the action sheet cancel button
|
||||
$action-sheet-ios-button-cancel-font-weight: 600;
|
||||
$action-sheet-ios-button-cancel-font-weight: 600;
|
||||
|
||||
|
||||
// Action Sheet Translucent
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Background color alpha of the action sheet when translucent
|
||||
$action-sheet-ios-translucent-background-color-alpha: 0.8;
|
||||
$action-sheet-ios-translucent-background-color-alpha: .8;
|
||||
|
||||
/// @prop - Background color of the action sheet when translucent
|
||||
$action-sheet-ios-translucent-background-color: rgba(
|
||||
$background-color-rgb,
|
||||
$action-sheet-ios-translucent-background-color-alpha
|
||||
);
|
||||
$action-sheet-ios-translucent-background-color: rgba($background-color-rgb, $action-sheet-ios-translucent-background-color-alpha);
|
||||
|
||||
/// @prop - Border color alpha of the action sheet when translucent
|
||||
$action-sheet-ios-translucent-border-color-alpha: 0.4;
|
||||
$action-sheet-ios-translucent-border-color-alpha: .4;
|
||||
|
||||
/// @prop - Border color of the action sheet when translucent
|
||||
$action-sheet-ios-translucent-border-color: rgba(
|
||||
$background-color-rgb,
|
||||
$action-sheet-ios-translucent-border-color-alpha
|
||||
);
|
||||
$action-sheet-ios-translucent-border-color: rgba($background-color-rgb, $action-sheet-ios-translucent-border-color-alpha);
|
||||
|
||||
/// @prop - Background color alpha of the activated action sheet when translucent
|
||||
$action-sheet-ios-translucent-background-color-activated-alpha: 0.7;
|
||||
$action-sheet-ios-translucent-background-color-activated-alpha: .7;
|
||||
|
||||
/// @prop - Background color of the activated action sheet when translucent
|
||||
$action-sheet-ios-translucent-background-color-activated: rgba(
|
||||
$background-color-rgb,
|
||||
$action-sheet-ios-translucent-background-color-activated-alpha
|
||||
);
|
||||
$action-sheet-ios-translucent-background-color-activated: rgba($background-color-rgb, $action-sheet-ios-translucent-background-color-activated-alpha);
|
||||
|
||||
/// @prop - Filter of the translucent action-sheet group
|
||||
$action-sheet-ios-group-translucent-filter: saturate(280%) blur(20px);
|
||||
$action-sheet-ios-group-translucent-filter: saturate(280%) blur(20px);
|
||||
|
||||
/// @prop - Filter of the translucent action-sheet button
|
||||
$action-sheet-ios-button-translucent-filter: saturate(120%);
|
||||
$action-sheet-ios-button-translucent-filter: saturate(120%);
|
||||
|
||||
@@ -13,14 +13,15 @@
|
||||
--button-background-activated: transparent;
|
||||
--button-background-activated-opacity: 0;
|
||||
--button-background-hover: currentColor;
|
||||
--button-background-hover-opacity: 0.04;
|
||||
--button-background-hover-opacity: .04;
|
||||
--button-background-focused: currentColor;
|
||||
--button-background-focused-opacity: 0.12;
|
||||
--button-background-focused-opacity: .12;
|
||||
--button-color: #{$action-sheet-md-button-text-color};
|
||||
--button-color-disabled: var(--button-color);
|
||||
--color: #{$action-sheet-md-title-color};
|
||||
}
|
||||
|
||||
|
||||
// Material Design Action Sheet Wrapper
|
||||
// -----------------------------------------
|
||||
|
||||
@@ -29,12 +30,7 @@
|
||||
}
|
||||
|
||||
.action-sheet-title {
|
||||
@include padding(
|
||||
$action-sheet-md-title-padding-top,
|
||||
$action-sheet-md-title-padding-end,
|
||||
$action-sheet-md-title-padding-bottom,
|
||||
$action-sheet-md-title-padding-start
|
||||
);
|
||||
@include padding($action-sheet-md-title-padding-top, $action-sheet-md-title-padding-end, $action-sheet-md-title-padding-bottom, $action-sheet-md-title-padding-start);
|
||||
|
||||
min-height: $action-sheet-md-title-height;
|
||||
|
||||
@@ -46,16 +42,12 @@
|
||||
}
|
||||
|
||||
.action-sheet-sub-title {
|
||||
@include padding(
|
||||
$action-sheet-md-sub-title-padding-top,
|
||||
$action-sheet-md-sub-title-padding-end,
|
||||
$action-sheet-md-sub-title-padding-bottom,
|
||||
$action-sheet-md-sub-title-padding-start
|
||||
);
|
||||
@include padding($action-sheet-md-sub-title-padding-top, $action-sheet-md-sub-title-padding-end, $action-sheet-md-sub-title-padding-bottom, $action-sheet-md-sub-title-padding-start);
|
||||
|
||||
font-size: $action-sheet-md-sub-title-font-size;
|
||||
}
|
||||
|
||||
|
||||
// Material Design Action Sheet Group
|
||||
// -----------------------------------------
|
||||
|
||||
@@ -67,16 +59,12 @@
|
||||
@include padding(null, null, $action-sheet-md-padding-bottom, null);
|
||||
}
|
||||
|
||||
|
||||
// Material Design Action Sheet Buttons
|
||||
// -----------------------------------------
|
||||
|
||||
.action-sheet-button {
|
||||
@include padding(
|
||||
$action-sheet-md-button-padding-top,
|
||||
$action-sheet-md-button-padding-end,
|
||||
$action-sheet-md-button-padding-bottom,
|
||||
$action-sheet-md-button-padding-start
|
||||
);
|
||||
@include padding($action-sheet-md-button-padding-top, $action-sheet-md-button-padding-end, $action-sheet-md-button-padding-bottom, $action-sheet-md-button-padding-start);
|
||||
|
||||
position: relative;
|
||||
|
||||
@@ -91,12 +79,7 @@
|
||||
}
|
||||
|
||||
.action-sheet-icon {
|
||||
@include margin(
|
||||
$action-sheet-md-icon-margin-top,
|
||||
$action-sheet-md-icon-margin-end,
|
||||
$action-sheet-md-icon-margin-bottom,
|
||||
$action-sheet-md-icon-margin-start
|
||||
);
|
||||
@include margin($action-sheet-md-icon-margin-top, $action-sheet-md-icon-margin-end, $action-sheet-md-icon-margin-bottom, $action-sheet-md-icon-margin-start);
|
||||
|
||||
color: var(--color);
|
||||
|
||||
|
||||
@@ -1,100 +1,103 @@
|
||||
@import "../../themes/native/native.globals.md";
|
||||
@import "../../themes/ionic.globals.md";
|
||||
|
||||
// Material Design Action Sheet
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Text align of the action sheet
|
||||
$action-sheet-md-text-align: start;
|
||||
$action-sheet-md-text-align: start;
|
||||
|
||||
/// @prop - Background color of the action sheet
|
||||
$action-sheet-md-background-color: $overlay-md-background-color;
|
||||
$action-sheet-md-background-color: $overlay-md-background-color;
|
||||
|
||||
/// @prop - Padding top of the action sheet
|
||||
$action-sheet-md-padding-top: 0;
|
||||
$action-sheet-md-padding-top: 0;
|
||||
|
||||
/// @prop - Padding bottom of the action sheet
|
||||
$action-sheet-md-padding-bottom: var(--ion-safe-area-bottom);
|
||||
$action-sheet-md-padding-bottom: var(--ion-safe-area-bottom);
|
||||
|
||||
|
||||
// Action Sheet Title
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Height of the action sheet title
|
||||
$action-sheet-md-title-height: 60px;
|
||||
$action-sheet-md-title-height: 60px;
|
||||
|
||||
/// @prop - Color of the action sheet title
|
||||
$action-sheet-md-title-color: rgba($text-color-rgb, 0.54);
|
||||
$action-sheet-md-title-color: rgba($text-color-rgb, 0.54);
|
||||
|
||||
/// @prop - Font size of the action sheet title
|
||||
$action-sheet-md-title-font-size: dynamic-font(16px);
|
||||
$action-sheet-md-title-font-size: dynamic-font(16px);
|
||||
|
||||
/// @prop - Padding top of the action sheet title
|
||||
$action-sheet-md-title-padding-top: 20px;
|
||||
$action-sheet-md-title-padding-top: 20px;
|
||||
|
||||
/// @prop - Padding end of the action sheet title
|
||||
$action-sheet-md-title-padding-end: 16px;
|
||||
$action-sheet-md-title-padding-end: 16px;
|
||||
|
||||
/// @prop - Padding bottom of the action sheet title
|
||||
$action-sheet-md-title-padding-bottom: 17px;
|
||||
$action-sheet-md-title-padding-bottom: 17px;
|
||||
|
||||
/// @prop - Padding start of the action sheet title
|
||||
$action-sheet-md-title-padding-start: $action-sheet-md-title-padding-end;
|
||||
$action-sheet-md-title-padding-start: $action-sheet-md-title-padding-end;
|
||||
|
||||
|
||||
// Action Sheet Subtitle
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Font size of the action sheet sub title
|
||||
$action-sheet-md-sub-title-font-size: dynamic-font(14px);
|
||||
$action-sheet-md-sub-title-font-size: dynamic-font(14px);
|
||||
|
||||
/// @prop - Padding top of the action sheet sub title
|
||||
$action-sheet-md-sub-title-padding-top: 16px;
|
||||
$action-sheet-md-sub-title-padding-top: 16px;
|
||||
|
||||
/// @prop - Padding end of the action sheet sub title
|
||||
$action-sheet-md-sub-title-padding-end: 0;
|
||||
$action-sheet-md-sub-title-padding-end: 0;
|
||||
|
||||
/// @prop - Padding bottom of the action sheet sub title
|
||||
$action-sheet-md-sub-title-padding-bottom: 0;
|
||||
$action-sheet-md-sub-title-padding-bottom: 0;
|
||||
|
||||
/// @prop - Padding start of the action sheet sub title
|
||||
$action-sheet-md-sub-title-padding-start: $action-sheet-md-sub-title-padding-end;
|
||||
$action-sheet-md-sub-title-padding-start: $action-sheet-md-sub-title-padding-end;
|
||||
|
||||
|
||||
// Action Sheet Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Minimum height of the action sheet button
|
||||
$action-sheet-md-button-height: 52px;
|
||||
$action-sheet-md-button-height: 52px;
|
||||
|
||||
/// @prop - Text color of the action sheet button
|
||||
$action-sheet-md-button-text-color: $text-color-step-150;
|
||||
$action-sheet-md-button-text-color: $text-color-step-150;
|
||||
|
||||
/// @prop - Font size of the action sheet button
|
||||
$action-sheet-md-button-font-size: dynamic-font(16px);
|
||||
$action-sheet-md-button-font-size: dynamic-font(16px);
|
||||
|
||||
/// @prop - Padding top of the action sheet button
|
||||
$action-sheet-md-button-padding-top: 12px;
|
||||
$action-sheet-md-button-padding-top: 12px;
|
||||
|
||||
/// @prop - Padding end of the action sheet button
|
||||
$action-sheet-md-button-padding-end: 16px;
|
||||
$action-sheet-md-button-padding-end: 16px;
|
||||
|
||||
/// @prop - Padding bottom of the action sheet button
|
||||
$action-sheet-md-button-padding-bottom: $action-sheet-md-button-padding-top;
|
||||
$action-sheet-md-button-padding-bottom: $action-sheet-md-button-padding-top;
|
||||
|
||||
/// @prop - Padding start of the action sheet button
|
||||
$action-sheet-md-button-padding-start: $action-sheet-md-button-padding-end;
|
||||
$action-sheet-md-button-padding-start: $action-sheet-md-button-padding-end;
|
||||
|
||||
// Action Sheet Icon
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Font size of the icon in the action sheet button
|
||||
$action-sheet-md-icon-font-size: dynamic-font(24px);
|
||||
$action-sheet-md-icon-font-size: dynamic-font(24px);
|
||||
|
||||
/// @prop - Margin top of the icon in the action sheet button
|
||||
$action-sheet-md-icon-margin-top: 0;
|
||||
$action-sheet-md-icon-margin-top: 0;
|
||||
|
||||
/// @prop - Margin end of the icon in the action sheet button
|
||||
$action-sheet-md-icon-margin-end: 32px;
|
||||
$action-sheet-md-icon-margin-end: 32px;
|
||||
|
||||
/// @prop - Margin bottom of the icon in the action sheet button
|
||||
$action-sheet-md-icon-margin-bottom: 0;
|
||||
$action-sheet-md-icon-margin-bottom: 0;
|
||||
|
||||
/// @prop - Margin start of the icon in the action sheet button
|
||||
$action-sheet-md-icon-margin-start: 0;
|
||||
$action-sheet-md-icon-margin-start: 0;
|
||||
|
||||
@@ -173,6 +173,7 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
// Action Sheet: States
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -180,6 +181,7 @@
|
||||
@include button-state();
|
||||
}
|
||||
|
||||
|
||||
// Action Sheet: Selected
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -193,6 +195,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Action Sheet: Activated
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -206,6 +209,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Action Sheet: Focused
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
} from '@utils/overlays';
|
||||
import { getClassMap } from '@utils/theme';
|
||||
|
||||
import { getIonMode, getIonTheme } from '../../global/ionic-global';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import type { AnimationBuilder, CssClassMap, FrameworkDelegate, OverlayInterface } from '../../interface';
|
||||
import type { OverlayEventDetail } from '../../utils/overlays-interface';
|
||||
|
||||
@@ -29,15 +29,13 @@ import { mdEnterAnimation } from './animations/md.enter';
|
||||
import { mdLeaveAnimation } from './animations/md.leave';
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
||||
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-action-sheet',
|
||||
styleUrls: {
|
||||
ios: 'action-sheet.ios.scss',
|
||||
md: 'action-sheet.md.scss',
|
||||
ionic: 'action-sheet.md.scss',
|
||||
},
|
||||
scoped: true,
|
||||
})
|
||||
@@ -107,7 +105,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
|
||||
|
||||
/**
|
||||
* If `true`, the action sheet will be translucent.
|
||||
* Only applies when the theme is `"ios"` and the device supports
|
||||
* Only applies when the mode is `"ios"` and the device supports
|
||||
* [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
|
||||
*/
|
||||
@Prop() translucent = false;
|
||||
@@ -316,7 +314,6 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
|
||||
}
|
||||
|
||||
componentDidLoad() {
|
||||
const mode = getIonMode(this);
|
||||
/**
|
||||
* Only create gesture if:
|
||||
* 1. A gesture does not already exist
|
||||
@@ -325,7 +322,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
|
||||
* 4. A group ref exists
|
||||
*/
|
||||
const { groupEl, wrapperEl } = this;
|
||||
if (!this.gesture && mode === 'ios' && wrapperEl && groupEl) {
|
||||
if (!this.gesture && getIonMode(this) === 'ios' && wrapperEl && groupEl) {
|
||||
readTask(() => {
|
||||
const isScrollable = groupEl.scrollHeight > groupEl.clientHeight;
|
||||
if (!isScrollable) {
|
||||
@@ -359,7 +356,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
|
||||
|
||||
render() {
|
||||
const { header, htmlAttributes, overlayIndex } = this;
|
||||
const theme = getIonTheme(this);
|
||||
const mode = getIonMode(this);
|
||||
const allButtons = this.getButtons();
|
||||
const cancelButton = allButtons.find((b) => b.role === 'cancel');
|
||||
const buttons = allButtons.filter((b) => b.role !== 'cancel');
|
||||
@@ -376,7 +373,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
|
||||
zIndex: `${20000 + this.overlayIndex}`,
|
||||
}}
|
||||
class={{
|
||||
[theme]: true,
|
||||
[mode]: true,
|
||||
...getClassMap(this.cssClass),
|
||||
'overlay-hidden': true,
|
||||
'action-sheet-translucent': this.translucent,
|
||||
@@ -416,7 +413,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
|
||||
{b.icon && <ion-icon icon={b.icon} aria-hidden="true" lazy={false} class="action-sheet-icon" />}
|
||||
{b.text}
|
||||
</span>
|
||||
{theme === 'md' && <ion-ripple-effect></ion-ripple-effect>}
|
||||
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
@@ -440,7 +437,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
|
||||
)}
|
||||
{cancelButton.text}
|
||||
</span>
|
||||
{theme === 'md' && <ion-ripple-effect></ion-ripple-effect>}
|
||||
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@import "../../themes/native/native.globals";
|
||||
@import "../../themes/ionic.globals";
|
||||
|
||||
// Action Sheet
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Width of the action sheet
|
||||
$action-sheet-width: 100%;
|
||||
$action-sheet-width: 100%;
|
||||
|
||||
/// @prop - Maximum width of the action sheet
|
||||
$action-sheet-max-width: 500px;
|
||||
$action-sheet-max-width: 500px;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import type { OverlayOptions } from '@utils/overlays-interface';
|
||||
|
||||
import type { LiteralUnion, TextFieldTypes } from '../../interface';
|
||||
import type { AnimationBuilder, LiteralUnion, Mode, TextFieldTypes } from '../../interface';
|
||||
import type { IonicSafeString } from '../../utils/sanitization';
|
||||
|
||||
export interface AlertOptions extends OverlayOptions {
|
||||
export interface AlertOptions {
|
||||
header?: string;
|
||||
subHeader?: string;
|
||||
message?: string | IonicSafeString;
|
||||
@@ -12,9 +10,15 @@ export interface AlertOptions extends OverlayOptions {
|
||||
buttons?: (AlertButton | string)[];
|
||||
backdropDismiss?: boolean;
|
||||
translucent?: boolean;
|
||||
animated?: boolean;
|
||||
htmlAttributes?: { [key: string]: any };
|
||||
|
||||
mode?: Mode;
|
||||
keyboardClose?: boolean;
|
||||
id?: string;
|
||||
|
||||
enterAnimation?: AnimationBuilder;
|
||||
leaveAnimation?: AnimationBuilder;
|
||||
}
|
||||
|
||||
export interface AlertInput {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
// iOS Translucent Alert
|
||||
// -----------------------------------------
|
||||
|
||||
@@ -37,12 +38,7 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
.alert-head {
|
||||
@include padding(
|
||||
$alert-ios-head-padding-top,
|
||||
$alert-ios-head-padding-end,
|
||||
$alert-ios-head-padding-bottom,
|
||||
$alert-ios-head-padding-start
|
||||
);
|
||||
@include padding($alert-ios-head-padding-top, $alert-ios-head-padding-end, $alert-ios-head-padding-bottom, $alert-ios-head-padding-start);
|
||||
|
||||
text-align: $alert-ios-head-text-align;
|
||||
}
|
||||
@@ -62,17 +58,13 @@
|
||||
font-size: $alert-ios-sub-title-font-size;
|
||||
}
|
||||
|
||||
|
||||
// iOS Alert Message
|
||||
// --------------------------------------------------
|
||||
|
||||
.alert-message,
|
||||
.alert-input-group {
|
||||
@include padding(
|
||||
$alert-ios-message-padding-top,
|
||||
$alert-ios-message-padding-end,
|
||||
$alert-ios-message-padding-bottom,
|
||||
$alert-ios-message-padding-start
|
||||
);
|
||||
@include padding($alert-ios-message-padding-top, $alert-ios-message-padding-end, $alert-ios-message-padding-bottom, $alert-ios-message-padding-start);
|
||||
|
||||
color: $alert-ios-message-text-color;
|
||||
|
||||
@@ -86,26 +78,17 @@
|
||||
}
|
||||
|
||||
.alert-message:empty {
|
||||
@include padding(
|
||||
$alert-ios-message-empty-padding-top,
|
||||
$alert-ios-message-empty-padding-end,
|
||||
$alert-ios-message-empty-padding-bottom,
|
||||
$alert-ios-message-empty-padding-start
|
||||
);
|
||||
@include padding($alert-ios-message-empty-padding-top, $alert-ios-message-empty-padding-end, $alert-ios-message-empty-padding-bottom, $alert-ios-message-empty-padding-start);
|
||||
}
|
||||
|
||||
|
||||
// iOS Alert Input
|
||||
// --------------------------------------------------
|
||||
|
||||
.alert-input {
|
||||
@include border-radius($alert-ios-input-border-radius);
|
||||
@include margin($alert-ios-input-margin-top, null, null, null);
|
||||
@include padding(
|
||||
$alert-ios-input-padding-top,
|
||||
$alert-ios-input-padding-end,
|
||||
$alert-ios-input-padding-bottom,
|
||||
$alert-ios-input-padding-start
|
||||
);
|
||||
@include padding($alert-ios-input-padding-top, $alert-ios-input-padding-end, $alert-ios-input-padding-bottom, $alert-ios-input-padding-start);
|
||||
|
||||
border: $alert-ios-input-border;
|
||||
|
||||
@@ -137,6 +120,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// iOS Alert Radio/Checkbox Group
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -155,16 +139,12 @@
|
||||
min-height: $alert-ios-tappable-height;
|
||||
}
|
||||
|
||||
|
||||
// iOS Alert Radio Label
|
||||
// --------------------------------------------------
|
||||
|
||||
.alert-radio-label {
|
||||
@include padding(
|
||||
$alert-ios-radio-label-padding-top,
|
||||
$alert-ios-radio-label-padding-end,
|
||||
$alert-ios-radio-label-padding-bottom,
|
||||
$alert-ios-radio-label-padding-start
|
||||
);
|
||||
@include padding($alert-ios-radio-label-padding-top, $alert-ios-radio-label-padding-end, $alert-ios-radio-label-padding-bottom, $alert-ios-radio-label-padding-start);
|
||||
|
||||
flex: 1;
|
||||
order: 0;
|
||||
@@ -172,13 +152,15 @@
|
||||
color: $alert-ios-radio-label-text-color;
|
||||
}
|
||||
|
||||
|
||||
// iOS Alert Radio Label: Checked
|
||||
// --------------------------------------------------
|
||||
|
||||
[aria-checked="true"] .alert-radio-label {
|
||||
[aria-checked=true] .alert-radio-label {
|
||||
color: $alert-ios-radio-label-text-color-checked;
|
||||
}
|
||||
|
||||
|
||||
// iOS Alert Radio Checkmark: Unchecked
|
||||
// -----------------------------------------
|
||||
|
||||
@@ -190,10 +172,11 @@
|
||||
min-width: $alert-ios-radio-min-width;
|
||||
}
|
||||
|
||||
|
||||
// iOS Alert Radio Checked
|
||||
// -----------------------------------------
|
||||
|
||||
[aria-checked="true"] .alert-radio-inner {
|
||||
[aria-checked=true] .alert-radio-inner {
|
||||
@include position($alert-ios-radio-icon-top, null, null, $alert-ios-radio-icon-start);
|
||||
|
||||
position: absolute;
|
||||
@@ -210,16 +193,12 @@
|
||||
border-color: $alert-ios-radio-icon-border-color;
|
||||
}
|
||||
|
||||
|
||||
// iOS Alert Checkbox Label
|
||||
// --------------------------------------------------
|
||||
|
||||
.alert-checkbox-label {
|
||||
@include padding(
|
||||
$alert-ios-checkbox-label-padding-top,
|
||||
$alert-ios-checkbox-label-padding-end,
|
||||
$alert-ios-checkbox-label-padding-bottom,
|
||||
$alert-ios-checkbox-label-padding-start
|
||||
);
|
||||
@include padding($alert-ios-checkbox-label-padding-top, $alert-ios-checkbox-label-padding-end, $alert-ios-checkbox-label-padding-bottom, $alert-ios-checkbox-label-padding-start);
|
||||
|
||||
flex: 1;
|
||||
|
||||
@@ -231,12 +210,7 @@
|
||||
|
||||
.alert-checkbox-icon {
|
||||
@include border-radius($alert-ios-checkbox-border-radius);
|
||||
@include margin(
|
||||
$alert-ios-checkbox-margin-top,
|
||||
$alert-ios-checkbox-margin-end,
|
||||
$alert-ios-checkbox-margin-bottom,
|
||||
$alert-ios-checkbox-margin-start
|
||||
);
|
||||
@include margin($alert-ios-checkbox-margin-top, $alert-ios-checkbox-margin-end, $alert-ios-checkbox-margin-bottom, $alert-ios-checkbox-margin-start);
|
||||
|
||||
position: relative;
|
||||
|
||||
@@ -252,19 +226,21 @@
|
||||
contain: strict;
|
||||
}
|
||||
|
||||
|
||||
// iOS Alert Checkbox Outer Circle: Checked
|
||||
// -----------------------------------------
|
||||
|
||||
[aria-checked="true"] .alert-checkbox-icon {
|
||||
[aria-checked=true] .alert-checkbox-icon {
|
||||
border-color: $alert-ios-checkbox-border-color-on;
|
||||
|
||||
background-color: $alert-ios-checkbox-background-color-on;
|
||||
}
|
||||
|
||||
|
||||
// iOS Alert Checkbox Inner Checkmark: Checked
|
||||
// -----------------------------------------
|
||||
|
||||
[aria-checked="true"] .alert-checkbox-inner {
|
||||
[aria-checked=true] .alert-checkbox-inner {
|
||||
@include position($alert-ios-checkbox-icon-top, null, null, $alert-ios-checkbox-icon-start);
|
||||
|
||||
position: absolute;
|
||||
@@ -281,6 +257,7 @@
|
||||
border-color: $alert-ios-checkbox-icon-border-color;
|
||||
}
|
||||
|
||||
|
||||
// iOS Alert Button
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,141 +1,141 @@
|
||||
@use "sass:math";
|
||||
@import "../../themes/native/native.globals.ios";
|
||||
@import "../../themes/ionic.globals.ios";
|
||||
@import "../item/item.ios.vars";
|
||||
|
||||
// iOS Alert
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Font size of the alert
|
||||
$alert-ios-font-size: dynamic-font-min(1, 14px);
|
||||
$alert-ios-font-size: dynamic-font-min(1, 14px);
|
||||
|
||||
/// @prop - Max width of the alert
|
||||
$alert-ios-max-width: dynamic-font-clamp(1, 270px, 1.2);
|
||||
$alert-ios-max-width: dynamic-font-clamp(1, 270px, 1.2);
|
||||
|
||||
/// @prop - Border radius of the alert
|
||||
$alert-ios-border-radius: 13px;
|
||||
$alert-ios-border-radius: 13px;
|
||||
|
||||
/// @prop - Background color of the alert
|
||||
$alert-ios-background-color: $overlay-ios-background-color;
|
||||
$alert-ios-background-color: $overlay-ios-background-color;
|
||||
|
||||
/// @prop - Background color alpha of the alert when translucent
|
||||
$alert-ios-translucent-background-color-alpha: 0.9;
|
||||
$alert-ios-translucent-background-color-alpha: .9;
|
||||
|
||||
/// @prop - Background color of the alert when translucent
|
||||
$alert-ios-translucent-background-color: rgba($background-color-rgb, $alert-ios-translucent-background-color-alpha);
|
||||
$alert-ios-translucent-background-color: rgba($background-color-rgb, $alert-ios-translucent-background-color-alpha);
|
||||
|
||||
/// @prop - Box shadow of the alert
|
||||
$alert-ios-box-shadow: none;
|
||||
$alert-ios-box-shadow: none;
|
||||
|
||||
/// @prop - Padding top of the alert head
|
||||
$alert-ios-head-padding-top: 12px;
|
||||
$alert-ios-head-padding-top: 12px;
|
||||
|
||||
/// @prop - Padding end of the alert head
|
||||
$alert-ios-head-padding-end: 16px;
|
||||
$alert-ios-head-padding-end: 16px;
|
||||
|
||||
/// @prop - Padding bottom of the alert head
|
||||
$alert-ios-head-padding-bottom: 7px;
|
||||
$alert-ios-head-padding-bottom: 7px;
|
||||
|
||||
/// @prop - Padding start of the alert head
|
||||
$alert-ios-head-padding-start: $alert-ios-head-padding-end;
|
||||
$alert-ios-head-padding-start: $alert-ios-head-padding-end;
|
||||
|
||||
/// @prop - Text align of the alert head
|
||||
$alert-ios-head-text-align: center;
|
||||
$alert-ios-head-text-align: center;
|
||||
|
||||
/// @prop - Color of the alert title
|
||||
$alert-ios-title-color: $text-color;
|
||||
$alert-ios-title-color: $text-color;
|
||||
|
||||
/// @prop - Margin top of the alert title
|
||||
$alert-ios-title-margin-top: 8px;
|
||||
$alert-ios-title-margin-top: 8px;
|
||||
|
||||
/// @prop - Font size of the alert title
|
||||
$alert-ios-title-font-size: dynamic-font-min(1, 17px);
|
||||
$alert-ios-title-font-size: dynamic-font-min(1, 17px);
|
||||
|
||||
/// @prop - Font weight of the alert title
|
||||
$alert-ios-title-font-weight: 600;
|
||||
$alert-ios-title-font-weight: 600;
|
||||
|
||||
/// @prop - Font size of the alert sub title
|
||||
$alert-ios-sub-title-font-size: dynamic-font-min(1, 14px);
|
||||
$alert-ios-sub-title-font-size: dynamic-font-min(1, 14px);
|
||||
|
||||
/// @prop - Text color of the alert sub title
|
||||
$alert-ios-sub-title-text-color: $text-color-step-400;
|
||||
$alert-ios-sub-title-text-color: $text-color-step-400;
|
||||
|
||||
/// @prop - Padding top of the alert message
|
||||
$alert-ios-message-padding-top: 0;
|
||||
$alert-ios-message-padding-top: 0;
|
||||
|
||||
/// @prop - Padding end of the alert message
|
||||
$alert-ios-message-padding-end: 16px;
|
||||
$alert-ios-message-padding-end: 16px;
|
||||
|
||||
/// @prop - Padding bottom of the alert message
|
||||
$alert-ios-message-padding-bottom: 21px;
|
||||
$alert-ios-message-padding-bottom: 21px;
|
||||
|
||||
/// @prop - Padding start of the alert message
|
||||
$alert-ios-message-padding-start: $alert-ios-message-padding-end;
|
||||
$alert-ios-message-padding-start: $alert-ios-message-padding-end;
|
||||
|
||||
/// @prop - Font size of the alert message
|
||||
$alert-ios-message-font-size: dynamic-font-min(1, 13px);
|
||||
$alert-ios-message-font-size: dynamic-font-min(1, 13px);
|
||||
|
||||
/// @prop - Text align of the alert message
|
||||
$alert-ios-message-text-align: center;
|
||||
$alert-ios-message-text-align: center;
|
||||
|
||||
/// @prop - Text color of the alert message
|
||||
$alert-ios-message-text-color: $text-color;
|
||||
$alert-ios-message-text-color: $text-color;
|
||||
|
||||
/// @prop - Padding top of the alert empty message
|
||||
$alert-ios-message-empty-padding-top: 0;
|
||||
$alert-ios-message-empty-padding-top: 0;
|
||||
|
||||
/// @prop - Padding end of the alert empty message
|
||||
$alert-ios-message-empty-padding-end: 0;
|
||||
$alert-ios-message-empty-padding-end: 0;
|
||||
|
||||
/// @prop - Padding bottom of the alert empty message
|
||||
$alert-ios-message-empty-padding-bottom: 12px;
|
||||
$alert-ios-message-empty-padding-bottom: 12px;
|
||||
|
||||
/// @prop - Padding start of the alert empty message
|
||||
$alert-ios-message-empty-padding-start: 0;
|
||||
$alert-ios-message-empty-padding-start: 0;
|
||||
|
||||
/// @prop - Maximum height of the alert content
|
||||
$alert-ios-content-max-height: 240px;
|
||||
$alert-ios-content-max-height: 240px;
|
||||
|
||||
/// @prop - Margin top of the alert input
|
||||
$alert-ios-input-margin-top: 10px;
|
||||
$alert-ios-input-margin-top: 10px;
|
||||
|
||||
/// @prop - Padding top on the alert input
|
||||
$alert-ios-input-padding-top: 7px;
|
||||
$alert-ios-input-padding-top: 7px;
|
||||
|
||||
/// @prop - Padding end on the alert input
|
||||
$alert-ios-input-padding-end: $alert-ios-input-padding-top;
|
||||
$alert-ios-input-padding-end: $alert-ios-input-padding-top;
|
||||
|
||||
/// @prop - Padding bottom on the alert input
|
||||
$alert-ios-input-padding-bottom: $alert-ios-input-padding-top;
|
||||
$alert-ios-input-padding-bottom: $alert-ios-input-padding-top;
|
||||
|
||||
/// @prop - Padding start on the alert input
|
||||
$alert-ios-input-padding-start: $alert-ios-input-padding-end;
|
||||
$alert-ios-input-padding-start: $alert-ios-input-padding-end;
|
||||
|
||||
/// @prop - Placeholder Color for input
|
||||
$alert-ios-input-placeholder-color: $placeholder-text-color;
|
||||
$alert-ios-input-placeholder-color: $placeholder-text-color;
|
||||
|
||||
/// @prop - Border color of the alert input
|
||||
$alert-ios-input-border-color: $background-color-step-250;
|
||||
$alert-ios-input-border-color: $background-color-step-250;
|
||||
|
||||
/// @prop - Border of the alert input
|
||||
$alert-ios-input-border: $hairlines-width solid $alert-ios-input-border-color;
|
||||
$alert-ios-input-border: $hairlines-width solid $alert-ios-input-border-color;
|
||||
|
||||
/// @prop - Border radius of the alert input
|
||||
$alert-ios-input-border-radius: 7px;
|
||||
$alert-ios-input-border-radius: 7px;
|
||||
|
||||
/// @prop - Background color of the alert input
|
||||
$alert-ios-input-background-color: $background-color;
|
||||
$alert-ios-input-background-color: $background-color;
|
||||
|
||||
/// @prop - Flex wrap of the alert button group
|
||||
$alert-ios-button-group-flex-wrap: wrap;
|
||||
$alert-ios-button-group-flex-wrap: wrap;
|
||||
|
||||
/// @prop - Flex of the alert button
|
||||
$alert-ios-button-flex: 1 1 auto;
|
||||
$alert-ios-button-flex: 1 1 auto;
|
||||
|
||||
/// @prop - Margin of the alert button
|
||||
$alert-ios-button-margin: 0;
|
||||
$alert-ios-button-margin: 0;
|
||||
|
||||
/// @prop - Min width of the alert button
|
||||
$alert-ios-button-min-width: 50%;
|
||||
$alert-ios-button-min-width: 50%;
|
||||
|
||||
/// @prop - Height of the alert button
|
||||
/**
|
||||
@@ -147,172 +147,172 @@ $alert-ios-button-min-width: 50%;
|
||||
* a hairline (<1px) width, this will cause subpixel rendering
|
||||
* differences across browsers.
|
||||
*/
|
||||
$alert-ios-button-height: dynamic-font-min(1, 44px);
|
||||
$alert-ios-button-height: dynamic-font-min(1, 44px);
|
||||
|
||||
/// @prop - Padding of the alert button
|
||||
$alert-ios-button-padding: 8px;
|
||||
|
||||
/// @prop - Font size of the alert button
|
||||
$alert-ios-button-font-size: dynamic-font-min(1, 17px);
|
||||
$alert-ios-button-font-size: dynamic-font-min(1, 17px);
|
||||
|
||||
/// @prop - Color of the text in the alert button
|
||||
$alert-ios-button-text-color: ion-color(primary, base);
|
||||
$alert-ios-button-text-color: ion-color(primary, base);
|
||||
|
||||
/// @prop - Destructive text color of the alert button
|
||||
$alert-ios-button-destructive-text-color: ion-color(danger, base);
|
||||
$alert-ios-button-destructive-text-color: ion-color(danger, base);
|
||||
|
||||
/// @prop - Background color of the alert button
|
||||
$alert-ios-button-background-color: transparent;
|
||||
$alert-ios-button-background-color: transparent;
|
||||
|
||||
/// @prop - Background color alpha of the alert activated button
|
||||
$alert-ios-button-background-color-alpha-activated: 0.1;
|
||||
$alert-ios-button-background-color-alpha-activated: .1;
|
||||
|
||||
/// @prop - Background color of the alert activated button
|
||||
$alert-ios-button-background-color-activated: rgba($text-color-rgb, $alert-ios-button-background-color-alpha-activated);
|
||||
$alert-ios-button-background-color-activated: rgba($text-color-rgb, $alert-ios-button-background-color-alpha-activated);
|
||||
|
||||
/// @prop - Border width of the alert button
|
||||
$alert-ios-button-border-width: $hairlines-width;
|
||||
$alert-ios-button-border-width: $hairlines-width;
|
||||
|
||||
/// @prop - Border style of the alert button
|
||||
$alert-ios-button-border-style: solid;
|
||||
$alert-ios-button-border-style: solid;
|
||||
|
||||
/// @prop - Border color alpha of the alert button
|
||||
$alert-ios-button-border-color-alpha: 0.2;
|
||||
$alert-ios-button-border-color-alpha: .2;
|
||||
|
||||
/// @prop - Border color of the alert button
|
||||
$alert-ios-button-border-color: rgba($text-color-rgb, $alert-ios-button-border-color-alpha);
|
||||
$alert-ios-button-border-color: rgba($text-color-rgb, $alert-ios-button-border-color-alpha);
|
||||
|
||||
/// @prop - Border radius of the alert button
|
||||
$alert-ios-button-border-radius: 0;
|
||||
$alert-ios-button-border-radius: 0;
|
||||
|
||||
/// @prop - Font weight of the main text on the alert button
|
||||
$alert-ios-button-main-font-weight: bold;
|
||||
$alert-ios-button-main-font-weight: bold;
|
||||
|
||||
/// @prop - Border top of the alert list
|
||||
$alert-ios-list-border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color;
|
||||
$alert-ios-list-border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color;
|
||||
|
||||
/// @prop - Padding top on the label for the radio alert
|
||||
$alert-ios-radio-label-padding-top: 13px;
|
||||
$alert-ios-radio-label-padding-top: 13px;
|
||||
|
||||
/// @prop - Padding end on the label for the radio alert
|
||||
$alert-ios-radio-label-padding-end: $alert-ios-radio-label-padding-top;
|
||||
$alert-ios-radio-label-padding-end: $alert-ios-radio-label-padding-top;
|
||||
|
||||
/// @prop - Padding bottom on the label for the radio alert
|
||||
$alert-ios-radio-label-padding-bottom: $alert-ios-radio-label-padding-top;
|
||||
$alert-ios-radio-label-padding-bottom: $alert-ios-radio-label-padding-top;
|
||||
|
||||
/// @prop - Padding start on the label for the radio alert
|
||||
$alert-ios-radio-label-padding-start: $alert-ios-radio-label-padding-end;
|
||||
$alert-ios-radio-label-padding-start: $alert-ios-radio-label-padding-end;
|
||||
|
||||
/// @prop - Text color of the label for the radio alert
|
||||
$alert-ios-radio-label-text-color: $text-color;
|
||||
$alert-ios-radio-label-text-color: $text-color;
|
||||
|
||||
/// @prop - Text color of the label for the checked radio alert
|
||||
$alert-ios-radio-label-text-color-checked: $alert-ios-button-text-color;
|
||||
$alert-ios-radio-label-text-color-checked: $alert-ios-button-text-color;
|
||||
|
||||
/// @prop - Min width of the radio alert
|
||||
$alert-ios-radio-min-width: 30px;
|
||||
$alert-ios-radio-min-width: 30px;
|
||||
|
||||
/// @prop - Top of the icon in the radio alert
|
||||
$alert-ios-radio-icon-top: -7px;
|
||||
$alert-ios-radio-icon-top: -7px;
|
||||
|
||||
/// @prop - Start of the icon in the radio alert
|
||||
$alert-ios-radio-icon-start: 7px;
|
||||
$alert-ios-radio-icon-start: 7px;
|
||||
|
||||
/// @prop - Width of the icon in the radio alert
|
||||
$alert-ios-radio-icon-width: 6px;
|
||||
$alert-ios-radio-icon-width: 6px;
|
||||
|
||||
/// @prop - Height of the icon in the radio alert
|
||||
$alert-ios-radio-icon-height: 12px;
|
||||
$alert-ios-radio-icon-height: 12px;
|
||||
|
||||
/// @prop - Border width of the icon in the radio alert
|
||||
$alert-ios-radio-icon-border-width: 2px;
|
||||
$alert-ios-radio-icon-border-width: 2px;
|
||||
|
||||
/// @prop - Border style of the icon in the radio alert
|
||||
$alert-ios-radio-icon-border-style: solid;
|
||||
$alert-ios-radio-icon-border-style: solid;
|
||||
|
||||
/// @prop - Border color of the icon in the radio alert
|
||||
$alert-ios-radio-icon-border-color: $alert-ios-button-text-color;
|
||||
$alert-ios-radio-icon-border-color: $alert-ios-button-text-color;
|
||||
|
||||
/// @prop - Transform of the icon in the radio alert
|
||||
$alert-ios-radio-icon-transform: rotate(45deg);
|
||||
$alert-ios-radio-icon-transform: rotate(45deg);
|
||||
|
||||
/// @prop - Padding top of the label for the checkbox in the alert
|
||||
$alert-ios-checkbox-label-padding-top: 13px;
|
||||
$alert-ios-checkbox-label-padding-top: 13px;
|
||||
|
||||
/// @prop - Padding end of the label for the checkbox in the alert
|
||||
$alert-ios-checkbox-label-padding-end: $alert-ios-checkbox-label-padding-top;
|
||||
$alert-ios-checkbox-label-padding-end: $alert-ios-checkbox-label-padding-top;
|
||||
|
||||
/// @prop - Padding bottom of the label for the checkbox in the alert
|
||||
$alert-ios-checkbox-label-padding-bottom: $alert-ios-checkbox-label-padding-top;
|
||||
$alert-ios-checkbox-label-padding-bottom: $alert-ios-checkbox-label-padding-top;
|
||||
|
||||
/// @prop - Padding start of the label for the checkbox in the alert
|
||||
$alert-ios-checkbox-label-padding-start: $alert-ios-checkbox-label-padding-end;
|
||||
$alert-ios-checkbox-label-padding-start: $alert-ios-checkbox-label-padding-end;
|
||||
|
||||
/// @prop - Text color of the label for the checkbox in the alert
|
||||
$alert-ios-checkbox-label-text-color: $text-color;
|
||||
$alert-ios-checkbox-label-text-color: $text-color;
|
||||
|
||||
/// @prop - Margin top of the checkbox in the alert
|
||||
$alert-ios-checkbox-margin-top: 10px;
|
||||
$alert-ios-checkbox-margin-top: 10px;
|
||||
|
||||
/// @prop - Margin end of the checkbox in the alert
|
||||
$alert-ios-checkbox-margin-end: 6px;
|
||||
$alert-ios-checkbox-margin-end: 6px;
|
||||
|
||||
/// @prop - Margin bottom of the checkbox in the alert
|
||||
$alert-ios-checkbox-margin-bottom: 10px;
|
||||
$alert-ios-checkbox-margin-bottom: 10px;
|
||||
|
||||
/// @prop - Margin start of the checkbox in the alert
|
||||
$alert-ios-checkbox-margin-start: 16px;
|
||||
$alert-ios-checkbox-margin-start: 16px;
|
||||
|
||||
/// @prop - Size of the checkbox in the alert
|
||||
$alert-ios-checkbox-size: dynamic-font-max(22px, 2.538);
|
||||
$alert-ios-checkbox-size: dynamic-font-max(22px, 2.538);
|
||||
|
||||
/// @prop - Border width of the checkbox in the alert
|
||||
$alert-ios-checkbox-border-width: dynamic-font(2px);
|
||||
$alert-ios-checkbox-border-width: dynamic-font(2px);
|
||||
|
||||
/// @prop - Border style of the checkbox in the alert
|
||||
$alert-ios-checkbox-border-style: solid;
|
||||
$alert-ios-checkbox-border-style: solid;
|
||||
|
||||
/// @prop - Border radius of the checkbox in the alert
|
||||
$alert-ios-checkbox-border-radius: 50%;
|
||||
$alert-ios-checkbox-border-radius: 50%;
|
||||
|
||||
/// @prop - Border color of the checkbox in the alert when off
|
||||
$alert-ios-checkbox-border-color-off: $item-ios-border-color;
|
||||
$alert-ios-checkbox-border-color-off: $item-ios-border-color;
|
||||
|
||||
/// @prop - Border color of the checkbox in the alert when on
|
||||
$alert-ios-checkbox-border-color-on: ion-color(primary, base);
|
||||
$alert-ios-checkbox-border-color-on: ion-color(primary, base);
|
||||
|
||||
/// @prop - Background color of the checkbox in the alert when off
|
||||
$alert-ios-checkbox-background-color-off: $item-ios-background;
|
||||
$alert-ios-checkbox-background-color-off: $item-ios-background;
|
||||
|
||||
/// @prop - Background color of the checkbox in the alert when on
|
||||
$alert-ios-checkbox-background-color-on: ion-color(primary, base);
|
||||
$alert-ios-checkbox-background-color-on: ion-color(primary, base);
|
||||
|
||||
/// @prop - Top of the icon in the checkbox alert
|
||||
$alert-ios-checkbox-icon-top: calc($alert-ios-checkbox-size / 8);
|
||||
$alert-ios-checkbox-icon-top: calc($alert-ios-checkbox-size / 8);
|
||||
|
||||
/// @prop - Start of the icon in the checkbox alert
|
||||
$alert-ios-checkbox-icon-start: calc($alert-ios-checkbox-size / 3);
|
||||
$alert-ios-checkbox-icon-start: calc($alert-ios-checkbox-size / 3);
|
||||
|
||||
/// @prop - Width of the icon in the checkbox alert
|
||||
$alert-ios-checkbox-icon-width: calc($alert-ios-checkbox-size / 6 + 1px);
|
||||
$alert-ios-checkbox-icon-width: calc($alert-ios-checkbox-size / 6 + 1px);
|
||||
|
||||
/// @prop - Height of the icon in the checkbox alert
|
||||
$alert-ios-checkbox-icon-height: calc($alert-ios-checkbox-size * 0.5);
|
||||
$alert-ios-checkbox-icon-height: calc($alert-ios-checkbox-size * 0.5);
|
||||
|
||||
/// @prop - Border width of the icon in the checkbox alert
|
||||
$alert-ios-checkbox-icon-border-width: $alert-ios-checkbox-border-width;
|
||||
$alert-ios-checkbox-icon-border-width: $alert-ios-checkbox-border-width;
|
||||
|
||||
/// @prop - Border style of the icon in the checkbox alert
|
||||
$alert-ios-checkbox-icon-border-style: $alert-ios-checkbox-border-style;
|
||||
$alert-ios-checkbox-icon-border-style: $alert-ios-checkbox-border-style;
|
||||
|
||||
/// @prop - Border color of the icon in the checkbox alert
|
||||
$alert-ios-checkbox-icon-border-color: $background-color;
|
||||
$alert-ios-checkbox-icon-border-color: $background-color;
|
||||
|
||||
/// @prop - Transform of the icon in the checkbox alert
|
||||
$alert-ios-checkbox-icon-transform: rotate(45deg);
|
||||
$alert-ios-checkbox-icon-transform: rotate(45deg);
|
||||
|
||||
/// @prop - Filter of the translucent alert
|
||||
$alert-ios-translucent-filter: saturate(180%) blur(20px);
|
||||
$alert-ios-translucent-filter: saturate(180%) blur(20px);
|
||||
|
||||
/// @prop - Height of the tappable inputs in the checkbox alert
|
||||
$alert-ios-tappable-height: $item-ios-min-height;
|
||||
$alert-ios-tappable-height: $item-ios-min-height;
|
||||
|
||||
@@ -22,12 +22,7 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
.alert-head {
|
||||
@include padding(
|
||||
$alert-md-head-padding-top,
|
||||
$alert-md-head-padding-end,
|
||||
$alert-md-head-padding-bottom,
|
||||
$alert-md-head-padding-start
|
||||
);
|
||||
@include padding($alert-md-head-padding-top, $alert-md-head-padding-end, $alert-md-head-padding-bottom, $alert-md-head-padding-start);
|
||||
|
||||
text-align: $alert-md-head-text-align;
|
||||
}
|
||||
@@ -45,17 +40,13 @@
|
||||
font-size: $alert-md-sub-title-font-size;
|
||||
}
|
||||
|
||||
|
||||
// Material Design Alert Message
|
||||
// --------------------------------------------------
|
||||
|
||||
.alert-message,
|
||||
.alert-input-group {
|
||||
@include padding(
|
||||
$alert-md-message-padding-top,
|
||||
$alert-md-message-padding-end,
|
||||
$alert-md-message-padding-bottom,
|
||||
$alert-md-message-padding-start
|
||||
);
|
||||
@include padding($alert-md-message-padding-top, $alert-md-message-padding-end, $alert-md-message-padding-bottom, $alert-md-message-padding-start);
|
||||
|
||||
color: $alert-md-message-text-color;
|
||||
}
|
||||
@@ -76,28 +67,19 @@
|
||||
}
|
||||
|
||||
.alert-message:empty {
|
||||
@include padding(
|
||||
$alert-md-message-empty-padding-top,
|
||||
$alert-md-message-empty-padding-end,
|
||||
$alert-md-message-empty-padding-bottom,
|
||||
$alert-md-message-empty-padding-start
|
||||
);
|
||||
@include padding($alert-md-message-empty-padding-top, $alert-md-message-empty-padding-end, $alert-md-message-empty-padding-bottom, $alert-md-message-empty-padding-start);
|
||||
}
|
||||
|
||||
.alert-head + .alert-message {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
|
||||
// Material Design Alert Input
|
||||
// --------------------------------------------------
|
||||
|
||||
.alert-input {
|
||||
@include margin(
|
||||
$alert-md-input-margin-top,
|
||||
$alert-md-input-margin-end,
|
||||
$alert-md-input-margin-bottom,
|
||||
$alert-md-input-margin-start
|
||||
);
|
||||
@include margin($alert-md-input-margin-top, $alert-md-input-margin-end, $alert-md-input-margin-bottom, $alert-md-input-margin-start);
|
||||
|
||||
border-bottom: $alert-md-input-border-width $alert-md-input-border-style $alert-md-input-border-color;
|
||||
|
||||
@@ -118,10 +100,10 @@
|
||||
.alert-input:focus {
|
||||
@include margin(null, null, $alert-md-input-margin-bottom - 1, null);
|
||||
|
||||
border-bottom: $alert-md-input-border-width-focused $alert-md-input-border-style-focused
|
||||
$alert-md-input-border-color-focused;
|
||||
border-bottom: $alert-md-input-border-width-focused $alert-md-input-border-style-focused $alert-md-input-border-color-focused;
|
||||
}
|
||||
|
||||
|
||||
// Material Design Alert Radio/Checkbox Group
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -153,16 +135,12 @@
|
||||
min-height: $alert-md-tappable-height;
|
||||
}
|
||||
|
||||
|
||||
// Material Design Alert Radio
|
||||
// --------------------------------------------------
|
||||
|
||||
.alert-radio-label {
|
||||
@include padding(
|
||||
$alert-md-radio-label-padding-top,
|
||||
$alert-md-radio-label-padding-end,
|
||||
$alert-md-radio-label-padding-bottom,
|
||||
$alert-md-radio-label-padding-start
|
||||
);
|
||||
@include padding($alert-md-radio-label-padding-top, $alert-md-radio-label-padding-end, $alert-md-radio-label-padding-bottom, $alert-md-radio-label-padding-start);
|
||||
|
||||
flex: 1;
|
||||
|
||||
@@ -208,31 +186,28 @@
|
||||
background-color: $alert-md-radio-border-color-on;
|
||||
}
|
||||
|
||||
|
||||
// Material Design Alert Radio Checked
|
||||
// ---------------------------------------------------
|
||||
|
||||
[aria-checked="true"] .alert-radio-label {
|
||||
[aria-checked=true] .alert-radio-label {
|
||||
color: $alert-md-radio-label-text-color-checked;
|
||||
}
|
||||
|
||||
[aria-checked="true"] .alert-radio-icon {
|
||||
[aria-checked=true] .alert-radio-icon {
|
||||
border-color: $alert-md-radio-border-color-on;
|
||||
}
|
||||
|
||||
[aria-checked="true"] .alert-radio-inner {
|
||||
[aria-checked=true] .alert-radio-inner {
|
||||
transform: $alert-md-radio-icon-transform-on;
|
||||
}
|
||||
|
||||
|
||||
// Material Design Alert Checkbox Label
|
||||
// --------------------------------------------------
|
||||
|
||||
.alert-checkbox-label {
|
||||
@include padding(
|
||||
$alert-md-checkbox-label-padding-top,
|
||||
$alert-md-checkbox-label-padding-end,
|
||||
$alert-md-checkbox-label-padding-bottom,
|
||||
$alert-md-checkbox-label-padding-start
|
||||
);
|
||||
@include padding($alert-md-checkbox-label-padding-top, $alert-md-checkbox-label-padding-end, $alert-md-checkbox-label-padding-bottom, $alert-md-checkbox-label-padding-start);
|
||||
|
||||
flex: 1;
|
||||
|
||||
@@ -245,6 +220,7 @@
|
||||
font-size: $alert-md-checkbox-label-font-size;
|
||||
}
|
||||
|
||||
|
||||
// Material Design Alert Checkbox Outline: Unchecked
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -267,13 +243,13 @@
|
||||
// Material Design Alert Checkbox Checkmark: Checked
|
||||
// --------------------------------------------------
|
||||
|
||||
[aria-checked="true"] .alert-checkbox-icon {
|
||||
[aria-checked=true] .alert-checkbox-icon {
|
||||
border-color: $alert-md-checkbox-border-color-on;
|
||||
|
||||
background-color: $alert-md-checkbox-border-color-on;
|
||||
}
|
||||
|
||||
[aria-checked="true"] .alert-checkbox-inner {
|
||||
[aria-checked=true] .alert-checkbox-inner {
|
||||
@include position($alert-md-checkbox-icon-top, null, null, $alert-md-checkbox-icon-start);
|
||||
|
||||
position: absolute;
|
||||
@@ -290,6 +266,7 @@
|
||||
border-color: $alert-md-checkbox-icon-border-color;
|
||||
}
|
||||
|
||||
|
||||
// Material Design Alert Button
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -304,18 +281,8 @@
|
||||
|
||||
.alert-button {
|
||||
@include border-radius($alert-md-button-border-radius);
|
||||
@include margin(
|
||||
$alert-md-button-margin-top,
|
||||
$alert-md-button-margin-end,
|
||||
$alert-md-button-margin-bottom,
|
||||
$alert-md-button-margin-start
|
||||
);
|
||||
@include padding(
|
||||
$alert-md-button-padding-top,
|
||||
$alert-md-button-padding-end,
|
||||
$alert-md-button-padding-bottom,
|
||||
$alert-md-button-padding-start
|
||||
);
|
||||
@include margin($alert-md-button-margin-top, $alert-md-button-margin-end, $alert-md-button-margin-bottom, $alert-md-button-margin-start);
|
||||
@include padding($alert-md-button-padding-top, $alert-md-button-padding-end, $alert-md-button-padding-bottom, $alert-md-button-padding-start);
|
||||
|
||||
// necessary for ripple to work properly
|
||||
position: relative;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
@import "../../themes/native/native.globals.md";
|
||||
@import "../../themes/ionic.globals.md";
|
||||
@import "../item/item.md.vars";
|
||||
|
||||
// Material Design Alert
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Font size of the alert
|
||||
$alert-md-font-size: dynamic-font(14px);
|
||||
$alert-md-font-size: dynamic-font(14px);
|
||||
|
||||
/// @prop - Max width of the alert
|
||||
$alert-md-max-width: 280px;
|
||||
$alert-md-max-width: 280px;
|
||||
|
||||
/// @prop - Max width of the alert on a tablet
|
||||
/**
|
||||
@@ -19,314 +19,313 @@ $alert-md-max-width: 280px;
|
||||
* 3. The height can increase up to 560px.
|
||||
* Source: https://m2.material.io/components/dialogs#behavior
|
||||
*/
|
||||
$alert-md-max-width-tablet: min(calc(100vw - 96px), 560px);
|
||||
$alert-md-max-width-tablet: min(calc(100vw - 96px), 560px);
|
||||
|
||||
/// @prop - Max width of the alert on a tablet
|
||||
$alert-md-max-height-tablet: min(calc(100vh - 96px), 560px);
|
||||
$alert-md-max-height-tablet: min(calc(100vh - 96px), 560px);
|
||||
|
||||
/// @prop - Border radius of the alert
|
||||
$alert-md-border-radius: 4px;
|
||||
$alert-md-border-radius: 4px;
|
||||
|
||||
/// @prop - Background color of the alert
|
||||
$alert-md-background-color: $overlay-md-background-color;
|
||||
$alert-md-background-color: $overlay-md-background-color;
|
||||
|
||||
/// @prop - Box shadow color of the alert
|
||||
$alert-md-box-shadow: 0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14),
|
||||
0 9px 46px 8px rgba(0, 0, 0, 0.12);
|
||||
$alert-md-box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12);
|
||||
|
||||
/// @prop - Padding top of the alert head
|
||||
$alert-md-head-padding-top: 20px;
|
||||
$alert-md-head-padding-top: 20px;
|
||||
|
||||
/// @prop - Padding end of the alert head
|
||||
$alert-md-head-padding-end: 23px;
|
||||
$alert-md-head-padding-end: 23px;
|
||||
|
||||
/// @prop - Padding bottom of the alert head
|
||||
$alert-md-head-padding-bottom: 15px;
|
||||
$alert-md-head-padding-bottom: 15px;
|
||||
|
||||
/// @prop - Padding start of the alert head
|
||||
$alert-md-head-padding-start: $alert-md-head-padding-end;
|
||||
$alert-md-head-padding-start: $alert-md-head-padding-end;
|
||||
|
||||
/// @prop - Text align of the alert head
|
||||
$alert-md-head-text-align: start;
|
||||
$alert-md-head-text-align: start;
|
||||
|
||||
/// @prop - Color of the alert title
|
||||
$alert-md-title-color: $text-color;
|
||||
$alert-md-title-color: $text-color;
|
||||
|
||||
/// @prop - Font size of the alert title
|
||||
$alert-md-title-font-size: dynamic-font(20px);
|
||||
$alert-md-title-font-size: dynamic-font(20px);
|
||||
|
||||
/// @prop - Font weight of the alert title
|
||||
$alert-md-title-font-weight: 500;
|
||||
$alert-md-title-font-weight: 500;
|
||||
|
||||
/// @prop - Font size of the alert sub title
|
||||
$alert-md-sub-title-font-size: dynamic-font(16px);
|
||||
$alert-md-sub-title-font-size: dynamic-font(16px);
|
||||
|
||||
/// @prop - Text color of the alert sub title
|
||||
$alert-md-sub-title-text-color: $text-color;
|
||||
$alert-md-sub-title-text-color: $text-color;
|
||||
|
||||
/// @prop - Padding top of the alert message
|
||||
$alert-md-message-padding-top: 20px;
|
||||
$alert-md-message-padding-top: 20px;
|
||||
|
||||
/// @prop - Padding end of the alert message
|
||||
$alert-md-message-padding-end: 24px;
|
||||
$alert-md-message-padding-end: 24px;
|
||||
|
||||
/// @prop - Padding bottom of the alert message
|
||||
$alert-md-message-padding-bottom: $alert-md-message-padding-top;
|
||||
$alert-md-message-padding-bottom: $alert-md-message-padding-top;
|
||||
|
||||
/// @prop - Padding start of the alert message
|
||||
$alert-md-message-padding-start: $alert-md-message-padding-end;
|
||||
$alert-md-message-padding-start: $alert-md-message-padding-end;
|
||||
|
||||
/// @prop - Font size of the alert message
|
||||
$alert-md-message-font-size: dynamic-font(16px);
|
||||
$alert-md-message-font-size: dynamic-font(16px);
|
||||
|
||||
/// @prop - Text color of the alert message
|
||||
$alert-md-message-text-color: $text-color-step-450;
|
||||
$alert-md-message-text-color: $text-color-step-450;
|
||||
|
||||
/// @prop - Padding top of the alert empty message
|
||||
$alert-md-message-empty-padding-top: 0;
|
||||
$alert-md-message-empty-padding-top: 0;
|
||||
|
||||
/// @prop - Padding end of the alert empty message
|
||||
$alert-md-message-empty-padding-end: $alert-md-message-empty-padding-top;
|
||||
$alert-md-message-empty-padding-end: $alert-md-message-empty-padding-top;
|
||||
|
||||
/// @prop - Padding bottom of the alert empty message
|
||||
$alert-md-message-empty-padding-bottom: $alert-md-message-empty-padding-top;
|
||||
$alert-md-message-empty-padding-bottom: $alert-md-message-empty-padding-top;
|
||||
|
||||
/// @prop - Padding start of the alert empty message
|
||||
$alert-md-message-empty-padding-start: $alert-md-message-empty-padding-end;
|
||||
$alert-md-message-empty-padding-start: $alert-md-message-empty-padding-end;
|
||||
|
||||
/// @prop - Maximum height of the alert content
|
||||
$alert-md-content-max-height: 266px;
|
||||
$alert-md-content-max-height: 266px;
|
||||
|
||||
/// @prop - Border width of the alert input
|
||||
$alert-md-input-border-width: 1px;
|
||||
$alert-md-input-border-width: 1px;
|
||||
|
||||
/// @prop - Border style of the alert input
|
||||
$alert-md-input-border-style: solid;
|
||||
$alert-md-input-border-style: solid;
|
||||
|
||||
/// @prop - Border color of the alert input
|
||||
$alert-md-input-border-color: $background-color-step-150;
|
||||
$alert-md-input-border-color: $background-color-step-150;
|
||||
|
||||
/// @prop - Text color of the alert input
|
||||
$alert-md-input-text-color: $text-color;
|
||||
$alert-md-input-text-color: $text-color;
|
||||
|
||||
/// @prop - Border width of the alert input when focused
|
||||
$alert-md-input-border-width-focused: 2px;
|
||||
$alert-md-input-border-width-focused: 2px;
|
||||
|
||||
/// @prop - Border style of the alert input when focused
|
||||
$alert-md-input-border-style-focused: $alert-md-input-border-style;
|
||||
$alert-md-input-border-style-focused: $alert-md-input-border-style;
|
||||
|
||||
/// @prop - Border color of the alert input when focused
|
||||
$alert-md-input-border-color-focused: ion-color(primary, base);
|
||||
$alert-md-input-border-color-focused: ion-color(primary, base);
|
||||
|
||||
/// @prop - Margin top of the alert input
|
||||
$alert-md-input-margin-top: 5px;
|
||||
$alert-md-input-margin-top: 5px;
|
||||
|
||||
/// @prop - Margin end of the alert input
|
||||
$alert-md-input-margin-end: 0;
|
||||
$alert-md-input-margin-end: 0;
|
||||
|
||||
/// @prop - Margin bottom of the alert input
|
||||
$alert-md-input-margin-bottom: 5px;
|
||||
$alert-md-input-margin-bottom: 5px;
|
||||
|
||||
/// @prop - Margin start of the alert input
|
||||
$alert-md-input-margin-start: 0;
|
||||
$alert-md-input-margin-start: 0;
|
||||
|
||||
/// @prop - Placeholder Color for input
|
||||
$alert-md-input-placeholder-color: $placeholder-text-color;
|
||||
$alert-md-input-placeholder-color: $placeholder-text-color;
|
||||
|
||||
/// @prop - Flex wrap of the alert button group
|
||||
$alert-md-button-group-flex-wrap: wrap-reverse;
|
||||
$alert-md-button-group-flex-wrap: wrap-reverse;
|
||||
|
||||
/// @prop - Justify content of the alert button group
|
||||
$alert-md-button-group-justify-content: flex-end;
|
||||
$alert-md-button-group-justify-content: flex-end;
|
||||
|
||||
/// @prop - Padding top of the alert button
|
||||
$alert-md-button-padding-top: 10px;
|
||||
$alert-md-button-padding-top: 10px;
|
||||
|
||||
/// @prop - Padding end of the alert button
|
||||
$alert-md-button-padding-end: $alert-md-button-padding-top;
|
||||
$alert-md-button-padding-end: $alert-md-button-padding-top;
|
||||
|
||||
/// @prop - Padding bottom of the alert button
|
||||
$alert-md-button-padding-bottom: $alert-md-button-padding-top;
|
||||
$alert-md-button-padding-bottom: $alert-md-button-padding-top;
|
||||
|
||||
/// @prop - Padding start of the alert button
|
||||
$alert-md-button-padding-start: $alert-md-button-padding-end;
|
||||
$alert-md-button-padding-start: $alert-md-button-padding-end;
|
||||
|
||||
/// @prop - Margin top of the alert button
|
||||
$alert-md-button-margin-top: 0;
|
||||
$alert-md-button-margin-top: 0;
|
||||
|
||||
/// @prop - Margin end of the alert button
|
||||
$alert-md-button-margin-end: 8px;
|
||||
$alert-md-button-margin-end: 8px;
|
||||
|
||||
/// @prop - Margin bottom of the alert button
|
||||
$alert-md-button-margin-bottom: 0;
|
||||
$alert-md-button-margin-bottom: 0;
|
||||
|
||||
/// @prop - Margin start of the alert button
|
||||
$alert-md-button-margin-start: 0;
|
||||
$alert-md-button-margin-start: 0;
|
||||
|
||||
/// @prop - Font weight of the alert button
|
||||
$alert-md-button-font-weight: 500;
|
||||
$alert-md-button-font-weight: 500;
|
||||
|
||||
/// @prop - Text color of the alert button
|
||||
$alert-md-button-text-color: ion-color(primary, base);
|
||||
$alert-md-button-text-color: ion-color(primary, base);
|
||||
|
||||
/// @prop - Background color of the alert button
|
||||
$alert-md-button-background-color: transparent;
|
||||
$alert-md-button-background-color: transparent;
|
||||
|
||||
/// @prop - Border radius of the alert button
|
||||
$alert-md-button-border-radius: 2px;
|
||||
$alert-md-button-border-radius: 2px;
|
||||
|
||||
/// @prop - Text transform of the alert button
|
||||
$alert-md-button-text-transform: uppercase;
|
||||
$alert-md-button-text-transform: uppercase;
|
||||
|
||||
/// @prop - Text align of the alert button
|
||||
$alert-md-button-text-align: end;
|
||||
$alert-md-button-text-align: end;
|
||||
|
||||
/// @prop - Border top of the alert list
|
||||
$alert-md-list-border-top: 1px solid $alert-md-input-border-color;
|
||||
$alert-md-list-border-top: 1px solid $alert-md-input-border-color;
|
||||
|
||||
/// @prop - Border bottom of the alert list
|
||||
$alert-md-list-border-bottom: $alert-md-list-border-top;
|
||||
$alert-md-list-border-bottom: $alert-md-list-border-top;
|
||||
|
||||
/// @prop - Top of the alert radio
|
||||
$alert-md-radio-top: 0;
|
||||
$alert-md-radio-top: 0;
|
||||
|
||||
/// @prop - Left of the alert radio
|
||||
$alert-md-radio-left: 26px;
|
||||
$alert-md-radio-left: 26px;
|
||||
|
||||
/// @prop - Width of the alert radio
|
||||
$alert-md-radio-width: 20px;
|
||||
$alert-md-radio-width: 20px;
|
||||
|
||||
/// @prop - Height of the alert radio
|
||||
$alert-md-radio-height: $alert-md-radio-width;
|
||||
$alert-md-radio-height: $alert-md-radio-width;
|
||||
|
||||
/// @prop - Border width of the alert radio
|
||||
$alert-md-radio-border-width: 2px;
|
||||
$alert-md-radio-border-width: 2px;
|
||||
|
||||
/// @prop - Border style of the alert radio
|
||||
$alert-md-radio-border-style: solid;
|
||||
$alert-md-radio-border-style: solid;
|
||||
|
||||
/// @prop - Border radius of the alert radio
|
||||
$alert-md-radio-border-radius: 50%;
|
||||
$alert-md-radio-border-radius: 50%;
|
||||
|
||||
/// @prop - Border color of the alert radio when off
|
||||
$alert-md-radio-border-color-off: $background-color-step-550;
|
||||
$alert-md-radio-border-color-off: $background-color-step-550;
|
||||
|
||||
/// @prop - Border color of the alert radio when on
|
||||
$alert-md-radio-border-color-on: $alert-md-button-text-color;
|
||||
$alert-md-radio-border-color-on: $alert-md-button-text-color;
|
||||
|
||||
/// @prop - Width of the icon in the alert radio
|
||||
$alert-md-radio-icon-width: $alert-md-radio-width * 0.5;
|
||||
$alert-md-radio-icon-width: $alert-md-radio-width * 0.5;
|
||||
|
||||
/// @prop - Height of the icon in the alert radio
|
||||
$alert-md-radio-icon-height: $alert-md-radio-icon-width;
|
||||
$alert-md-radio-icon-height: $alert-md-radio-icon-width;
|
||||
|
||||
/// @prop - Top of the icon in the alert radio
|
||||
$alert-md-radio-icon-top: ($alert-md-radio-width - $alert-md-radio-icon-width - $alert-md-radio-border-width * 2) * 0.5;
|
||||
$alert-md-radio-icon-top: ($alert-md-radio-width - $alert-md-radio-icon-width - $alert-md-radio-border-width * 2) * 0.5;
|
||||
|
||||
/// @prop - Start of the icon in the radio alert
|
||||
$alert-md-radio-icon-start: $alert-md-radio-icon-top;
|
||||
$alert-md-radio-icon-start: $alert-md-radio-icon-top;
|
||||
|
||||
/// @prop - Border radius of the icon in the alert radio
|
||||
$alert-md-radio-icon-border-radius: $alert-md-radio-border-radius;
|
||||
$alert-md-radio-icon-border-radius: $alert-md-radio-border-radius;
|
||||
|
||||
/// @prop - Transform of the icon in the alert radio when off
|
||||
$alert-md-radio-icon-transform-off: scale3d(0, 0, 0);
|
||||
$alert-md-radio-icon-transform-off: scale3d(0, 0, 0);
|
||||
|
||||
/// @prop - Transform of the icon in the alert radio when on
|
||||
$alert-md-radio-icon-transform-on: scale3d(1, 1, 1);
|
||||
$alert-md-radio-icon-transform-on: scale3d(1, 1, 1);
|
||||
|
||||
/// @prop - Transition of the icon in the alert radio
|
||||
$alert-md-radio-icon-transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
$alert-md-radio-icon-transition: transform 280ms cubic-bezier(.4, 0, .2, 1);
|
||||
|
||||
/// @prop - Padding top on the label for the radio alert
|
||||
$alert-md-radio-label-padding-top: 13px;
|
||||
$alert-md-radio-label-padding-top: 13px;
|
||||
|
||||
/// @prop - Padding end on the label for the radio alert
|
||||
$alert-md-radio-label-padding-end: 26px;
|
||||
$alert-md-radio-label-padding-end: 26px;
|
||||
|
||||
/// @prop - Padding bottom on the label for the radio alert
|
||||
$alert-md-radio-label-padding-bottom: $alert-md-radio-label-padding-top;
|
||||
$alert-md-radio-label-padding-bottom: $alert-md-radio-label-padding-top;
|
||||
|
||||
/// @prop - Padding start on the label for the radio alert
|
||||
$alert-md-radio-label-padding-start: $alert-md-radio-label-padding-end + 26px;
|
||||
$alert-md-radio-label-padding-start: $alert-md-radio-label-padding-end + 26px;
|
||||
|
||||
/// @prop - Font size of the label for the radio alert
|
||||
$alert-md-radio-label-font-size: dynamic-font(16px);
|
||||
$alert-md-radio-label-font-size: dynamic-font(16px);
|
||||
|
||||
/// @prop - Text color of the label for the radio alert
|
||||
$alert-md-radio-label-text-color: $text-color-step-150;
|
||||
$alert-md-radio-label-text-color: $text-color-step-150;
|
||||
|
||||
/// @prop - Text color of the label for the checked radio alert
|
||||
$alert-md-radio-label-text-color-checked: $alert-md-radio-label-text-color;
|
||||
$alert-md-radio-label-text-color-checked: $alert-md-radio-label-text-color;
|
||||
|
||||
/// @prop - Top of the checkbox in the alert
|
||||
$alert-md-checkbox-top: 0;
|
||||
$alert-md-checkbox-top: 0;
|
||||
|
||||
/// @prop - Left of the checkbox in the alert
|
||||
$alert-md-checkbox-left: 26px;
|
||||
$alert-md-checkbox-left: 26px;
|
||||
|
||||
/// @prop - Width of the checkbox in the alert
|
||||
$alert-md-checkbox-width: 16px;
|
||||
$alert-md-checkbox-width: 16px;
|
||||
|
||||
/// @prop - Height of the checkbox in the alert
|
||||
$alert-md-checkbox-height: 16px;
|
||||
$alert-md-checkbox-height: 16px;
|
||||
|
||||
/// @prop - Border width of the checkbox in the alert
|
||||
$alert-md-checkbox-border-width: 2px;
|
||||
$alert-md-checkbox-border-width: 2px;
|
||||
|
||||
/// @prop - Border style of the checkbox in the alert
|
||||
$alert-md-checkbox-border-style: solid;
|
||||
$alert-md-checkbox-border-style: solid;
|
||||
|
||||
/// @prop - Border radius of the checkbox in the alert
|
||||
$alert-md-checkbox-border-radius: 2px;
|
||||
$alert-md-checkbox-border-radius: 2px;
|
||||
|
||||
/// @prop - Border color of the checkbox in the alert when off
|
||||
$alert-md-checkbox-border-color-off: $background-color-step-550;
|
||||
$alert-md-checkbox-border-color-off: $background-color-step-550;
|
||||
|
||||
/// @prop - Border color of the checkbox in the alert when on
|
||||
$alert-md-checkbox-border-color-on: $alert-md-button-text-color;
|
||||
$alert-md-checkbox-border-color-on: $alert-md-button-text-color;
|
||||
|
||||
/// @prop - Top of the icon in the checkbox alert
|
||||
$alert-md-checkbox-icon-top: 0;
|
||||
$alert-md-checkbox-icon-top: 0;
|
||||
|
||||
/// @prop - Start of the icon in the checkbox alert
|
||||
$alert-md-checkbox-icon-start: 3px;
|
||||
$alert-md-checkbox-icon-start: 3px;
|
||||
|
||||
/// @prop - Width of the icon in the checkbox alert
|
||||
$alert-md-checkbox-icon-width: 6px;
|
||||
$alert-md-checkbox-icon-width: 6px;
|
||||
|
||||
/// @prop - Height of the icon in the checkbox alert
|
||||
$alert-md-checkbox-icon-height: 10px;
|
||||
$alert-md-checkbox-icon-height: 10px;
|
||||
|
||||
/// @prop - Border width of the icon in the checkbox alert
|
||||
$alert-md-checkbox-icon-border-width: 2px;
|
||||
$alert-md-checkbox-icon-border-width: 2px;
|
||||
|
||||
/// @prop - Border style of the icon in the checkbox alert
|
||||
$alert-md-checkbox-icon-border-style: solid;
|
||||
$alert-md-checkbox-icon-border-style: solid;
|
||||
|
||||
/// @prop - Border color of the icon in the checkbox alert
|
||||
$alert-md-checkbox-icon-border-color: ion-color(primary, contrast);
|
||||
$alert-md-checkbox-icon-border-color: ion-color(primary, contrast);
|
||||
|
||||
/// @prop - Transform of the icon in the checkbox alert
|
||||
$alert-md-checkbox-icon-transform: rotate(45deg);
|
||||
$alert-md-checkbox-icon-transform: rotate(45deg);
|
||||
|
||||
/// @prop - Padding top of the label for the checkbox in the alert
|
||||
$alert-md-checkbox-label-padding-top: 13px;
|
||||
$alert-md-checkbox-label-padding-top: 13px;
|
||||
|
||||
/// @prop - Padding end of the label for the checkbox in the alert
|
||||
$alert-md-checkbox-label-padding-end: $alert-md-checkbox-left;
|
||||
$alert-md-checkbox-label-padding-end: $alert-md-checkbox-left;
|
||||
|
||||
/// @prop - Padding bottom of the label for the checkbox in the alert
|
||||
$alert-md-checkbox-label-padding-bottom: $alert-md-checkbox-label-padding-top;
|
||||
$alert-md-checkbox-label-padding-bottom: $alert-md-checkbox-label-padding-top;
|
||||
|
||||
/// @prop - Padding start of the label for the checkbox in the alert
|
||||
$alert-md-checkbox-label-padding-start: $alert-md-checkbox-label-padding-end + 27px;
|
||||
$alert-md-checkbox-label-padding-start: $alert-md-checkbox-label-padding-end + 27px;
|
||||
|
||||
/// @prop - Text color of the label for the checkbox in the alert
|
||||
$alert-md-checkbox-label-text-color: $text-color-step-150;
|
||||
$alert-md-checkbox-label-text-color: $text-color-step-150;
|
||||
|
||||
/// @prop - Font size of the label for the checkbox in the alert
|
||||
$alert-md-checkbox-label-font-size: dynamic-font(16px);
|
||||
$alert-md-checkbox-label-font-size: dynamic-font(16px);
|
||||
|
||||
/// @prop - Height of the tappable inputs in the checkbox alert
|
||||
$alert-md-tappable-height: $item-md-min-height;
|
||||
$alert-md-tappable-height: $item-md-min-height;
|
||||
|
||||
@@ -198,13 +198,14 @@
|
||||
min-height: inherit;
|
||||
}
|
||||
|
||||
|
||||
// Alert Button: Disabled
|
||||
// --------------------------------------------------
|
||||
.alert-input-disabled,
|
||||
.alert-checkbox-button-disabled .alert-button-inner,
|
||||
.alert-radio-button-disabled .alert-button-inner {
|
||||
cursor: default;
|
||||
opacity: 0.5;
|
||||
opacity: .5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import { sanitizeDOMString } from '@utils/sanitization';
|
||||
import { getClassMap } from '@utils/theme';
|
||||
|
||||
import { config } from '../../global/config';
|
||||
import { getIonMode, getIonTheme } from '../../global/ionic-global';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import type { AnimationBuilder, CssClassMap, OverlayInterface, FrameworkDelegate } from '../../interface';
|
||||
import type { OverlayEventDetail } from '../../utils/overlays-interface';
|
||||
import type { IonicSafeString } from '../../utils/sanitization';
|
||||
@@ -35,15 +35,13 @@ import { mdLeaveAnimation } from './animations/md.leave';
|
||||
// TODO(FW-2832): types
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
||||
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-alert',
|
||||
styleUrls: {
|
||||
ios: 'alert.ios.scss',
|
||||
md: 'alert.md.scss',
|
||||
ionic: 'alert.md.scss',
|
||||
},
|
||||
scoped: true,
|
||||
})
|
||||
@@ -137,7 +135,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
|
||||
|
||||
/**
|
||||
* If `true`, the alert will be translucent.
|
||||
* Only applies when the theme is `"ios"` and the device supports
|
||||
* Only applies when the mode is `"ios"` and the device supports
|
||||
* [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
|
||||
*/
|
||||
@Prop() translucent = false;
|
||||
@@ -343,7 +341,9 @@ export class Alert implements ComponentInterface, OverlayInterface {
|
||||
}
|
||||
|
||||
componentWillLoad() {
|
||||
setOverlayId(this.el);
|
||||
if (!this.htmlAttributes?.id) {
|
||||
setOverlayId(this.el);
|
||||
}
|
||||
this.inputsChanged();
|
||||
this.buttonsChanged();
|
||||
}
|
||||
@@ -535,7 +535,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
|
||||
|
||||
private renderCheckbox() {
|
||||
const inputs = this.processedInputs;
|
||||
const theme = getIonTheme(this);
|
||||
const mode = getIonMode(this);
|
||||
|
||||
if (inputs.length === 0) {
|
||||
return null;
|
||||
@@ -567,7 +567,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
|
||||
</div>
|
||||
<div class="alert-checkbox-label">{i.label}</div>
|
||||
</div>
|
||||
{theme === 'md' && <ion-ripple-effect></ion-ripple-effect>}
|
||||
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
@@ -684,7 +684,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
|
||||
|
||||
private renderAlertButtons() {
|
||||
const buttons = this.processedButtons;
|
||||
const theme = getIonTheme(this);
|
||||
const mode = getIonMode(this);
|
||||
const alertButtonGroupClass = {
|
||||
'alert-button-group': true,
|
||||
'alert-button-group-vertical': buttons.length > 2,
|
||||
@@ -701,7 +701,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
|
||||
onClick={() => this.buttonClick(button)}
|
||||
>
|
||||
<span class="alert-button-inner">{button.text}</span>
|
||||
{theme === 'md' && <ion-ripple-effect></ion-ripple-effect>}
|
||||
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
@@ -723,7 +723,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
|
||||
|
||||
render() {
|
||||
const { overlayIndex, header, subHeader, message, htmlAttributes } = this;
|
||||
const theme = getIonTheme(this);
|
||||
const mode = getIonMode(this);
|
||||
const hdrId = `alert-${overlayIndex}-hdr`;
|
||||
const subHdrId = `alert-${overlayIndex}-sub-hdr`;
|
||||
const msgId = `alert-${overlayIndex}-msg`;
|
||||
@@ -748,7 +748,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
|
||||
}}
|
||||
class={{
|
||||
...getClassMap(this.cssClass),
|
||||
[theme]: true,
|
||||
[mode]: true,
|
||||
'overlay-hidden': true,
|
||||
'alert-translucent': this.translucent,
|
||||
}}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
@import "../../themes/native/native.globals";
|
||||
@import "../../themes/ionic.globals";
|
||||
|
||||
// Alert
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Minimum width of the alert
|
||||
$alert-min-width: 250px;
|
||||
$alert-min-width: 250px;
|
||||
|
||||
/// @prop - Maximum height of the alert
|
||||
$alert-max-height: 90%;
|
||||
$alert-max-height: 90%;
|
||||
|
||||
/// @prop - Line height of the alert button
|
||||
$alert-button-line-height: dynamic-font(20px);
|
||||
$alert-button-line-height: dynamic-font(20px);
|
||||
|
||||
/// @prop - Font size of the alert button
|
||||
$alert-button-font-size: dynamic-font(14px);
|
||||
$alert-button-font-size: dynamic-font(14px);
|
||||
|
||||
/// @prop - Minimum height of a textarea in the alert
|
||||
$alert-input-min-height: 37px;
|
||||
$alert-input-min-height: 37px;
|
||||
|
||||
@@ -2,6 +2,7 @@ import { newSpecPage } from '@stencil/core/testing';
|
||||
|
||||
import { config } from '../../../global/config';
|
||||
import { Alert } from '../alert';
|
||||
import { h } from '@stencil/core';
|
||||
|
||||
describe('alert: custom html', () => {
|
||||
it('should not allow for custom html by default', async () => {
|
||||
@@ -38,4 +39,15 @@ describe('alert: custom html', () => {
|
||||
expect(content.textContent).toContain('Custom Text');
|
||||
expect(content.querySelector('button.custom-html')).toBe(null);
|
||||
});
|
||||
|
||||
it('should not overwrite the id set in htmlAttributes', async () => {
|
||||
const id = 'custom-id';
|
||||
const page = await newSpecPage({
|
||||
components: [Alert],
|
||||
template: () => <ion-alert htmlAttributes={{ id }} overlayIndex={-1}></ion-alert>,
|
||||
});
|
||||
|
||||
const alert = page.body.querySelector('ion-alert')!;
|
||||
expect(alert.id).toBe(id);
|
||||
});
|
||||
});
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
html.plt-mobile ion-app {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,8 @@ import { printIonWarning } from '@utils/logging';
|
||||
import { isPlatform } from '@utils/platform';
|
||||
|
||||
import { config } from '../../global/config';
|
||||
import { getIonTheme } from '../../global/ionic-global';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
||||
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-app',
|
||||
styleUrl: 'app.scss',
|
||||
@@ -82,11 +78,11 @@ export class App implements ComponentInterface {
|
||||
}
|
||||
|
||||
render() {
|
||||
const theme = getIonTheme(this);
|
||||
const mode = getIonMode(this);
|
||||
return (
|
||||
<Host
|
||||
class={{
|
||||
[theme]: true,
|
||||
[mode]: true,
|
||||
'ion-page': true,
|
||||
'force-statusbar-padding': config.getBoolean('_forceStatusbarPadding'),
|
||||
}}
|
||||
|
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -1,6 +1,7 @@
|
||||
@import "./avatar";
|
||||
@import "./avatar.ios.vars";
|
||||
|
||||
|
||||
// iOS Avatar
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
@import "../../themes/native/native.globals.ios";
|
||||
@import "../../themes/ionic.globals.ios";
|
||||
|
||||
|
||||
// iOS Avatar
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Width of the avatar
|
||||
$avatar-ios-width: 48px;
|
||||
$avatar-ios-width: 48px;
|
||||
|
||||
/// @prop - Height of the avatar
|
||||
$avatar-ios-height: $avatar-ios-width;
|
||||
$avatar-ios-height: $avatar-ios-width;
|
||||
|
||||
/// @prop - Border radius of the avatar
|
||||
$avatar-ios-border-radius: 50%;
|
||||
$avatar-ios-border-radius: 50%;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@import "./avatar";
|
||||
@import "./avatar.md.vars";
|
||||
|
||||
|
||||
// Material Design Avatar
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
@import "../../themes/native/native.globals.md";
|
||||
@import "../../themes/ionic.globals.md";
|
||||
|
||||
|
||||
// Material Design Avatar
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Width of the avatar
|
||||
$avatar-md-width: 64px;
|
||||
$avatar-md-width: 64px;
|
||||
|
||||
/// @prop - Height of the avatar
|
||||
$avatar-md-height: $avatar-md-width;
|
||||
$avatar-md-height: $avatar-md-width;
|
||||
|
||||
/// @prop - Border radius of the avatar
|
||||
$avatar-md-border-radius: 50%;
|
||||
$avatar-md-border-radius: 50%;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@import "../../themes/native/native.globals";
|
||||
@import "../../themes/ionic.globals";
|
||||
|
||||
|
||||
// Avatar
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -1,30 +1,20 @@
|
||||
import type { ComponentInterface } from '@stencil/core';
|
||||
import { Component, Host, h } from '@stencil/core';
|
||||
|
||||
import { getIonTheme } from '../../global/ionic-global';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
||||
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-avatar',
|
||||
styleUrls: {
|
||||
ios: 'avatar.ios.scss',
|
||||
md: 'avatar.md.scss',
|
||||
ionic: 'avatar.md.scss',
|
||||
},
|
||||
shadow: true,
|
||||
})
|
||||
export class Avatar implements ComponentInterface {
|
||||
render() {
|
||||
const theme = getIonTheme(this);
|
||||
return (
|
||||
<Host
|
||||
class={{
|
||||
[theme]: true,
|
||||
}}
|
||||
>
|
||||
<Host class={getIonMode(this)}>
|
||||
<slot></slot>
|
||||
</Host>
|
||||
);
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -8,7 +8,7 @@
|
||||
--background-hover: transparent;
|
||||
--background-hover-opacity: 1;
|
||||
--background-focused: currentColor;
|
||||
--background-focused-opacity: 0.1;
|
||||
--background-focused-opacity: .1;
|
||||
--border-radius: 4px;
|
||||
--color: #{$back-button-ios-color};
|
||||
--icon-margin-end: 1px;
|
||||
@@ -46,11 +46,11 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.ion-activated) .button-native {
|
||||
opacity: 0.4;
|
||||
opacity: .4;
|
||||
}
|
||||
|
||||
@media (any-hover: hover) {
|
||||
:host(:hover) {
|
||||
opacity: 0.6;
|
||||
opacity: .6;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@import "../../themes/native/native.globals.ios";
|
||||
@import "../../themes/ionic.globals.ios";
|
||||
|
||||
// iOS Back Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Z index of the back button
|
||||
$back-button-ios-button-z-index: $z-index-toolbar-buttons;
|
||||
$back-button-ios-button-z-index: $z-index-toolbar-buttons;
|
||||
|
||||
/// @prop - Text color of the back button
|
||||
$back-button-ios-color: ion-color(primary, base);
|
||||
$back-button-ios-color: ion-color(primary, base);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
:host {
|
||||
--border-radius: 4px;
|
||||
--background-focused: currentColor;
|
||||
--background-focused-opacity: 0.12;
|
||||
--background-focused-opacity: .12;
|
||||
--background-hover: currentColor;
|
||||
--background-hover-opacity: 0.04;
|
||||
--color: #{$back-button-md-color};
|
||||
@@ -49,11 +49,12 @@
|
||||
}
|
||||
|
||||
ion-icon {
|
||||
line-height: 0.67;
|
||||
line-height: .67;
|
||||
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
|
||||
// Back Button Color: Hover
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -63,6 +64,7 @@ ion-icon {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Back Button Color: Focused
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@import "../../themes/native/native.globals.md";
|
||||
@import "../../themes/ionic.globals.md";
|
||||
|
||||
// Material Design Back Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Text color of the back button
|
||||
$back-button-md-color: currentColor;
|
||||
$back-button-md-color: currentColor;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@import "../../themes/native/native.globals";
|
||||
@import "../../themes/ionic.globals";
|
||||
|
||||
// Back Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
/**
|
||||
/**
|
||||
* @prop --background: Background of the button
|
||||
* @prop --background-focused: Background of the button when focused with the tab key
|
||||
* @prop --background-focused-opacity: Opacity of the button background when focused with the tab key
|
||||
@@ -99,6 +99,7 @@ ion-ripple-effect {
|
||||
color: var(--ripple-color);
|
||||
}
|
||||
|
||||
|
||||
// Back Button with Color
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -106,6 +107,7 @@ ion-ripple-effect {
|
||||
color: current-color(base);
|
||||
}
|
||||
|
||||
|
||||
// Back Button States
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -115,7 +117,7 @@ ion-ripple-effect {
|
||||
|
||||
:host(.back-button-disabled) {
|
||||
cursor: default;
|
||||
opacity: 0.5;
|
||||
opacity: .5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@@ -172,16 +174,12 @@ ion-ripple-effect {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
|
||||
// Back Button Icon
|
||||
// --------------------------------------------------
|
||||
|
||||
ion-icon {
|
||||
@include padding(
|
||||
var(--icon-padding-top),
|
||||
var(--icon-padding-end),
|
||||
var(--icon-padding-bottom),
|
||||
var(--icon-padding-start)
|
||||
);
|
||||
@include padding(var(--icon-padding-top), var(--icon-padding-end), var(--icon-padding-bottom), var(--icon-padding-start));
|
||||
@include margin(var(--icon-margin-top), var(--icon-margin-end), var(--icon-margin-bottom), var(--icon-margin-start));
|
||||
|
||||
display: inherit;
|
||||
@@ -192,6 +190,7 @@ ion-icon {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
// Back Button: Focused
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -205,6 +204,7 @@ ion-icon {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Back Button: Hover
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -224,6 +224,7 @@ ion-icon {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Back Button Color: Focused
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -231,6 +232,7 @@ ion-icon {
|
||||
color: #{current-color(base)};
|
||||
}
|
||||
|
||||
|
||||
// Back Button Color: Hover
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -240,6 +242,7 @@ ion-icon {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Back Button in Toolbar: Global Theming
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -7,12 +7,11 @@ import { createColorClasses, hostContext, openURL } from '@utils/theme';
|
||||
import { arrowBackSharp, chevronBack } from 'ionicons/icons';
|
||||
|
||||
import { config } from '../../global/config';
|
||||
import { getIonTheme } from '../../global/ionic-global';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import type { AnimationBuilder, Color } from '../../interface';
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
||||
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*
|
||||
* @part native - The native HTML button element that wraps all child elements.
|
||||
* @part icon - The back button icon (uses ion-icon).
|
||||
@@ -23,7 +22,6 @@ import type { AnimationBuilder, Color } from '../../interface';
|
||||
styleUrls: {
|
||||
ios: 'back-button.ios.scss',
|
||||
md: 'back-button.md.scss',
|
||||
ionic: 'back-button.md.scss',
|
||||
},
|
||||
shadow: true,
|
||||
})
|
||||
@@ -82,11 +80,11 @@ export class BackButton implements ComponentInterface, ButtonInterface {
|
||||
get backButtonIcon() {
|
||||
const icon = this.icon;
|
||||
if (icon != null) {
|
||||
// Icon is set on the component or by the config.
|
||||
// icon is set on the component or by the config
|
||||
return icon;
|
||||
}
|
||||
|
||||
if (getIonTheme(this) === 'ios') {
|
||||
if (getIonMode(this) === 'ios') {
|
||||
// default ios back button icon
|
||||
return config.get('backButtonIcon', chevronBack);
|
||||
}
|
||||
@@ -96,7 +94,7 @@ export class BackButton implements ComponentInterface, ButtonInterface {
|
||||
}
|
||||
|
||||
get backButtonText() {
|
||||
const defaultBackButtonText = getIonTheme(this) === 'ios' ? 'Back' : null;
|
||||
const defaultBackButtonText = getIonMode(this) === 'ios' ? 'Back' : null;
|
||||
return this.text != null ? this.text : config.get('backButtonText', defaultBackButtonText);
|
||||
}
|
||||
|
||||
@@ -137,14 +135,14 @@ export class BackButton implements ComponentInterface, ButtonInterface {
|
||||
inheritedAttributes,
|
||||
} = this;
|
||||
const showBackButton = defaultHref !== undefined;
|
||||
const theme = getIonTheme(this);
|
||||
const mode = getIonMode(this);
|
||||
const ariaLabel = inheritedAttributes['aria-label'] || backButtonText || 'back';
|
||||
|
||||
return (
|
||||
<Host
|
||||
onClick={this.onClick}
|
||||
class={createColorClasses(color, {
|
||||
[theme]: true,
|
||||
[mode]: true,
|
||||
button: true, // ion-buttons target .button
|
||||
'back-button-disabled': disabled,
|
||||
'back-button-has-icon-only': hasIconOnly,
|
||||
@@ -172,7 +170,7 @@ export class BackButton implements ComponentInterface, ButtonInterface {
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
{theme === 'md' && <ion-ripple-effect type={this.rippleType}></ion-ripple-effect>}
|
||||
{mode === 'md' && <ion-ripple-effect type={this.rippleType}></ion-ripple-effect>}
|
||||
</button>
|
||||
</Host>
|
||||
);
|
||||
|
||||
@@ -1 +1 @@
|
||||
@import "../../themes/native/native.globals.ios";
|
||||
@import "../../themes/ionic.globals.ios";
|
||||
|
||||
@@ -1 +1 @@
|
||||
@import "../../themes/native/native.globals.md";
|
||||
@import "../../themes/ionic.globals.md";
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
|
||||
contain: strict;
|
||||
cursor: pointer;
|
||||
opacity: 0.01;
|
||||
opacity: .01;
|
||||
touch-action: none;
|
||||
z-index: $z-index-backdrop;
|
||||
}
|
||||
|
||||
|
||||
:host(.backdrop-hide) {
|
||||
background: transparent;
|
||||
}
|
||||
@@ -25,3 +26,4 @@
|
||||
:host(.backdrop-no-tappable) {
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
import type { ComponentInterface, EventEmitter } from '@stencil/core';
|
||||
import { Component, Event, Host, Listen, Prop, h } from '@stencil/core';
|
||||
|
||||
import { getIonTheme } from '../../global/ionic-global';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
||||
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-backdrop',
|
||||
styleUrls: {
|
||||
ios: 'backdrop.ios.scss',
|
||||
md: 'backdrop.md.scss',
|
||||
ionic: 'backdrop.md.scss',
|
||||
},
|
||||
shadow: true,
|
||||
})
|
||||
@@ -53,13 +48,13 @@ export class Backdrop implements ComponentInterface {
|
||||
}
|
||||
|
||||
render() {
|
||||
const theme = getIonTheme(this);
|
||||
const mode = getIonMode(this);
|
||||
return (
|
||||
<Host
|
||||
tabindex="-1"
|
||||
aria-hidden="true"
|
||||
class={{
|
||||
[theme]: true,
|
||||
[mode]: true,
|
||||
'backdrop-hide': !this.visible,
|
||||
'backdrop-no-tappable': !this.tappable,
|
||||
}}
|
||||
|
||||
@@ -1 +1 @@
|
||||
@import "../../themes/native/native.globals";
|
||||
@import "../../themes/ionic.globals";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@import "../../themes/native/native.globals.ios";
|
||||
@import "../../themes/ionic.globals.ios";
|
||||
|
||||
// iOS Badge
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Border radius of the badge
|
||||
$badge-ios-border-radius: 10px;
|
||||
$badge-ios-border-radius: 10px;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@import "../../themes/native/native.globals.md";
|
||||
@import "../../themes/ionic.globals.md";
|
||||
|
||||
// Material Design Badge
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Border radius of the badge
|
||||
$badge-md-border-radius: 4px;
|
||||
$badge-md-border-radius: 4px;
|
||||
|
||||
@@ -2,19 +2,17 @@ import type { ComponentInterface } from '@stencil/core';
|
||||
import { Component, Host, Prop, h } from '@stencil/core';
|
||||
import { createColorClasses } from '@utils/theme';
|
||||
|
||||
import { getIonTheme } from '../../global/ionic-global';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import type { Color } from '../../interface';
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
||||
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-badge',
|
||||
styleUrls: {
|
||||
ios: 'badge.ios.scss',
|
||||
md: 'badge.md.scss',
|
||||
ionic: 'badge.md.scss',
|
||||
},
|
||||
shadow: true,
|
||||
})
|
||||
@@ -27,11 +25,11 @@ export class Badge implements ComponentInterface {
|
||||
@Prop({ reflect: true }) color?: Color;
|
||||
|
||||
render() {
|
||||
const theme = getIonTheme(this);
|
||||
const mode = getIonMode(this);
|
||||
return (
|
||||
<Host
|
||||
class={createColorClasses(this.color, {
|
||||
[theme]: true,
|
||||
[mode]: true,
|
||||
})}
|
||||
>
|
||||
<slot></slot>
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
@import "../../themes/native/native.globals";
|
||||
@import "../../themes/ionic.globals";
|
||||
|
||||
// Badge
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the badge
|
||||
$badge-padding-top: 3px;
|
||||
$badge-padding-top: 3px;
|
||||
|
||||
/// @prop - Padding end of the badge
|
||||
$badge-padding-end: 8px;
|
||||
$badge-padding-end: 8px;
|
||||
|
||||
/// @prop - Padding bottom of the badge
|
||||
$badge-padding-bottom: $badge-padding-top;
|
||||
$badge-padding-bottom: $badge-padding-top;
|
||||
|
||||
/// @prop - Padding start of the badge
|
||||
$badge-padding-start: $badge-padding-end;
|
||||
$badge-padding-start: $badge-padding-end;
|
||||
|
||||
/// @prop - Minimum width of the badge
|
||||
$badge-min-width: 10px;
|
||||
$badge-min-width: 10px;
|
||||
|
||||
/// @prop - Baseline font size of the badge
|
||||
$badge-baseline-font-size: 13px;
|
||||
|
||||
/// @prop - Font size of the badge
|
||||
$badge-font-size: dynamic-font($badge-baseline-font-size);
|
||||
$badge-font-size: dynamic-font($badge-baseline-font-size);
|
||||
|
||||
/// @prop - Font weight of the badge
|
||||
$badge-font-weight: bold;
|
||||
$badge-font-weight: bold;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumb: Focused
|
||||
// ------------------------------------------
|
||||
|
||||
@@ -40,7 +41,7 @@
|
||||
|
||||
:host(.in-breadcrumbs-color.ion-focused) .breadcrumb-native,
|
||||
:host(.ion-color.ion-focused) .breadcrumb-native {
|
||||
background: #{current-color(base, 0.1)};
|
||||
background: #{current-color(base, .1)};
|
||||
color: #{current-color(base)};
|
||||
}
|
||||
|
||||
@@ -50,6 +51,7 @@
|
||||
color: $breadcrumb-ios-icon-color-focused;
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumb Separator
|
||||
// ------------------------------------------
|
||||
|
||||
@@ -57,6 +59,7 @@
|
||||
color: $breadcrumb-ios-separator-color;
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumb Slotted Icons
|
||||
// ------------------------------------------
|
||||
|
||||
@@ -78,6 +81,7 @@
|
||||
color: $breadcrumb-ios-icon-color-active;
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumbs Collapsed Indicator
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,37 +1,34 @@
|
||||
@import "../../themes/native/native.globals.ios";
|
||||
@import "../../themes/ionic.globals.ios";
|
||||
|
||||
// iOS Breadcrumb
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Color of the breadcrumb
|
||||
$breadcrumb-ios-color: var(--ion-color-step-850, var(--ion-text-color-step-150, #2d4665));
|
||||
$breadcrumb-ios-color: var(--ion-color-step-850, var(--ion-text-color-step-150, #2d4665));
|
||||
|
||||
/// @prop - Color of the active breadcrumb
|
||||
$breadcrumb-ios-color-active: var(--ion-text-color, #03060b);
|
||||
$breadcrumb-ios-color-active: var(--ion-text-color, #03060b);
|
||||
|
||||
/// @prop - Background color of the focused breadcrumb
|
||||
$breadcrumb-ios-background-focused: var(
|
||||
--ion-color-step-50,
|
||||
var(--ion-background-color-step-50, rgba(233, 237, 243, 0.7))
|
||||
);
|
||||
$breadcrumb-ios-background-focused: var(--ion-color-step-50, var(--ion-background-color-step-50, rgba(233, 237, 243, 0.7)));
|
||||
|
||||
/// @prop - Color of the breadcrumb icon
|
||||
$breadcrumb-ios-icon-color: var(--ion-color-step-400, var(--ion-text-color-step-600, #92a0b3));
|
||||
$breadcrumb-ios-icon-color: var(--ion-color-step-400, var(--ion-text-color-step-600, #92a0b3));
|
||||
|
||||
/// @prop - Color of the breadcrumb icon when active
|
||||
$breadcrumb-ios-icon-color-active: var(--ion-color-step-850, var(--ion-text-color-step-150, #242d39));
|
||||
$breadcrumb-ios-icon-color-active: var(--ion-color-step-850, var(--ion-text-color-step-150, #242d39));
|
||||
|
||||
/// @prop - Color of the breadcrumb icon when focused
|
||||
$breadcrumb-ios-icon-color-focused: var(--ion-color-step-750, var(--ion-text-color-step-250, #445b78));
|
||||
$breadcrumb-ios-icon-color-focused: var(--ion-color-step-750, var(--ion-text-color-step-250, #445b78));
|
||||
|
||||
/// @prop - Color of the breadcrumb separator
|
||||
$breadcrumb-ios-separator-color: $breadcrumb-separator-color;
|
||||
$breadcrumb-ios-separator-color: $breadcrumb-separator-color;
|
||||
|
||||
/// @prop - Color of the breadcrumb indicator
|
||||
$breadcrumb-ios-indicator-color: $breadcrumb-ios-separator-color;
|
||||
$breadcrumb-ios-indicator-color: $breadcrumb-ios-separator-color;
|
||||
|
||||
/// @prop - Background color of the breadcrumb indicator
|
||||
$breadcrumb-ios-indicator-background: var(--ion-color-step-100, var(--ion-background-color-step-100, #e9edf3));
|
||||
$breadcrumb-ios-indicator-background: var(--ion-color-step-100, var(--ion-background-color-step-100, #e9edf3));
|
||||
|
||||
/// @prop - Background color of the breadcrumb indicator when focused
|
||||
$breadcrumb-ios-indicator-background-focused: var(--ion-color-step-150, var(--ion-background-color-step-150, #d9e0ea));
|
||||
$breadcrumb-ios-indicator-background-focused: var(--ion-color-step-150, var(--ion-background-color-step-150, #d9e0ea));
|
||||
|
||||
@@ -20,18 +20,15 @@
|
||||
@include padding(6px, 12px, 6px, 12px);
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumb Separator
|
||||
// ------------------------------------------
|
||||
|
||||
.breadcrumb-separator {
|
||||
@include margin(
|
||||
$breadcrumb-md-separator-margin-top,
|
||||
$breadcrumb-md-separator-margin-end,
|
||||
$breadcrumb-md-separator-margin-bottom,
|
||||
$breadcrumb-md-separator-margin-start
|
||||
);
|
||||
@include margin($breadcrumb-md-separator-margin-top, $breadcrumb-md-separator-margin-end, $breadcrumb-md-separator-margin-bottom, $breadcrumb-md-separator-margin-start);
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumb: Focused
|
||||
// ------------------------------------------
|
||||
|
||||
@@ -41,6 +38,7 @@
|
||||
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumb Separator
|
||||
// ------------------------------------------
|
||||
|
||||
@@ -48,6 +46,7 @@
|
||||
color: $breadcrumb-md-separator-color;
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumb Slotted Icons
|
||||
// ------------------------------------------
|
||||
|
||||
@@ -69,6 +68,7 @@
|
||||
color: $breadcrumb-md-icon-color-active;
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumbs Collapsed Indicator
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
@import "../../themes/native/native.globals.md";
|
||||
@import "../../themes/ionic.globals.md";
|
||||
|
||||
// Material Design Breadcrumb
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Color of the breadcrumb
|
||||
$breadcrumb-md-color: var(--ion-color-step-600, var(--ion-text-color-step-400, #677483));
|
||||
$breadcrumb-md-color: var(--ion-color-step-600, var(--ion-text-color-step-400, #677483));
|
||||
|
||||
/// @prop - Color of the active breadcrumb
|
||||
$breadcrumb-md-color-active: var(--ion-text-color, #03060b);
|
||||
$breadcrumb-md-color-active: var(--ion-text-color, #03060b);
|
||||
|
||||
/// @prop - Color of the focused breadcrumb
|
||||
$breadcrumb-md-color-focused: var(--ion-color-step-800, var(--ion-text-color-step-200, #35404e));
|
||||
$breadcrumb-md-color-focused: var(--ion-color-step-800, var(--ion-text-color-step-200, #35404e));
|
||||
|
||||
/// @prop - Background color of the focused breadcrumb
|
||||
$breadcrumb-md-background-focused: var(--ion-color-step-50, var(--ion-background-color-step-50, #fff));
|
||||
$breadcrumb-md-background-focused: var(--ion-color-step-50, var(--ion-background-color-step-50, #fff));
|
||||
|
||||
/// @prop - Color of the breadcrumb icon
|
||||
$breadcrumb-md-icon-color: var(--ion-color-step-550, var(--ion-text-color-step-450, #7d8894));
|
||||
$breadcrumb-md-icon-color: var(--ion-color-step-550, var(--ion-text-color-step-450, #7d8894));
|
||||
|
||||
/// @prop - Color of the breadcrumb icon when active
|
||||
$breadcrumb-md-icon-color-active: var(--ion-color-step-850, var(--ion-text-color-step-150, #222d3a));
|
||||
$breadcrumb-md-icon-color-active: var(--ion-color-step-850, var(--ion-text-color-step-150, #222d3a));
|
||||
|
||||
/// @prop - Margin top of the breadcrumb separator
|
||||
$breadcrumb-md-separator-margin-top: -1px;
|
||||
$breadcrumb-md-separator-margin-top: -1px;
|
||||
|
||||
/// @prop - Margin end of the breadcrumb separator
|
||||
$breadcrumb-md-separator-margin-end: 10px;
|
||||
$breadcrumb-md-separator-margin-end: 10px;
|
||||
|
||||
/// @prop - Margin bottom of the breadcrumb separator
|
||||
$breadcrumb-md-separator-margin-bottom: null;
|
||||
$breadcrumb-md-separator-margin-bottom: null;
|
||||
|
||||
/// @prop - Margin start of the breadcrumb separator
|
||||
$breadcrumb-md-separator-margin-start: 10px;
|
||||
$breadcrumb-md-separator-margin-start: 10px;
|
||||
|
||||
/// @prop - Color of the breadcrumb separator
|
||||
$breadcrumb-md-separator-color: $breadcrumb-separator-color;
|
||||
$breadcrumb-md-separator-color: $breadcrumb-separator-color;
|
||||
|
||||
/// @prop - Color of the breadcrumb indicator
|
||||
$breadcrumb-md-indicator-color: $breadcrumb-md-separator-color;
|
||||
$breadcrumb-md-indicator-color: $breadcrumb-md-separator-color;
|
||||
|
||||
/// @prop - Background color of the breadcrumb indicator
|
||||
$breadcrumb-md-indicator-background: var(--ion-color-step-100, var(--ion-background-color-step-100, #eef1f3));
|
||||
$breadcrumb-md-indicator-background: var(--ion-color-step-100, var(--ion-background-color-step-100, #eef1f3));
|
||||
|
||||
/// @prop - Background color of the breadcrumb indicator when focused
|
||||
$breadcrumb-md-indicator-background-focused: var(--ion-color-step-150, var(--ion-background-color-step-150, #dfe5e8));
|
||||
$breadcrumb-md-indicator-background-focused: var(--ion-color-step-150, var(--ion-background-color-step-150, #dfe5e8));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
/**
|
||||
/**
|
||||
* @prop --color: Text color of the breadcrumb
|
||||
* @prop --color-active: Text color of the active breadcrumb
|
||||
* @prop --color-hover: Text color of the breadcrumb on hover
|
||||
@@ -43,10 +43,11 @@
|
||||
|
||||
:host(.breadcrumb-disabled) {
|
||||
cursor: default;
|
||||
opacity: 0.5;
|
||||
opacity: .5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumb: Active
|
||||
// ------------------------------------------
|
||||
|
||||
@@ -54,6 +55,7 @@
|
||||
color: var(--color-active);
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumb: Focused
|
||||
// ------------------------------------------
|
||||
|
||||
@@ -65,6 +67,7 @@
|
||||
background: var(--background-focused);
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumb: Hover
|
||||
// ------------------------------------------
|
||||
|
||||
@@ -79,6 +82,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumb Separator
|
||||
// ------------------------------------------
|
||||
|
||||
@@ -86,6 +90,7 @@
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumb: Collapsed
|
||||
// ------------------------------------------
|
||||
|
||||
@@ -93,6 +98,7 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumbs: Color
|
||||
// ------------------------------------------
|
||||
|
||||
@@ -114,13 +120,14 @@
|
||||
|
||||
:host(.in-toolbar-color),
|
||||
:host(.in-toolbar-color) .breadcrumb-separator {
|
||||
color: current-color(contrast, 0.8);
|
||||
color: current-color(contrast, .8);
|
||||
}
|
||||
|
||||
:host(.in-toolbar-color.breadcrumb-active) {
|
||||
color: current-color(contrast);
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumbs: Collapsed Indicator
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -5,16 +5,14 @@ import { inheritAriaAttributes } from '@utils/helpers';
|
||||
import { createColorClasses, hostContext, openURL } from '@utils/theme';
|
||||
import { chevronForwardOutline, ellipsisHorizontal } from 'ionicons/icons';
|
||||
|
||||
import { config } from '../../global/config';
|
||||
import { getIonTheme } from '../../global/ionic-global';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import type { AnimationBuilder, Color } from '../../interface';
|
||||
import type { RouterDirection } from '../router/utils/interface';
|
||||
|
||||
import type { BreadcrumbCollapsedClickEventDetail } from './breadcrumb-interface';
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
||||
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*
|
||||
* @part native - The native HTML anchor or div element that wraps all child elements.
|
||||
* @part separator - The separator element between each breadcrumb.
|
||||
@@ -25,7 +23,6 @@ import type { BreadcrumbCollapsedClickEventDetail } from './breadcrumb-interface
|
||||
styleUrls: {
|
||||
ios: 'breadcrumb.ios.scss',
|
||||
md: 'breadcrumb.md.scss',
|
||||
ionic: 'breadcrumb.md.scss',
|
||||
},
|
||||
shadow: true,
|
||||
})
|
||||
@@ -168,13 +165,10 @@ export class Breadcrumb implements ComponentInterface {
|
||||
const clickable = this.isClickable();
|
||||
const TagType = this.href === undefined ? 'span' : ('a' as any);
|
||||
|
||||
const breadcrumbSeparatorIcon = config.get('breadcrumbSeparatorIcon', chevronForwardOutline);
|
||||
const breadcrumbCollapsedIcon = config.get('breadcrumbCollapsedIcon', ellipsisHorizontal);
|
||||
|
||||
// Links can still be tabbed to when set to disabled if they have an href
|
||||
// in order to truly disable them we can keep it as an anchor but remove the href
|
||||
const href = disabled ? undefined : this.href;
|
||||
const theme = getIonTheme(this);
|
||||
const mode = getIonMode(this);
|
||||
const attrs =
|
||||
TagType === 'span'
|
||||
? {}
|
||||
@@ -194,7 +188,7 @@ export class Breadcrumb implements ComponentInterface {
|
||||
onClick={(ev: Event) => openURL(href, ev, routerDirection, routerAnimation)}
|
||||
aria-disabled={disabled ? 'true' : null}
|
||||
class={createColorClasses(color, {
|
||||
[theme]: true,
|
||||
[mode]: true,
|
||||
'breadcrumb-active': active,
|
||||
'breadcrumb-collapsed': collapsed,
|
||||
'breadcrumb-disabled': disabled,
|
||||
@@ -228,7 +222,7 @@ export class Breadcrumb implements ComponentInterface {
|
||||
'breadcrumbs-collapsed-indicator': true,
|
||||
}}
|
||||
>
|
||||
<ion-icon aria-hidden="true" icon={breadcrumbCollapsedIcon} lazy={false}></ion-icon>
|
||||
<ion-icon aria-hidden="true" icon={ellipsisHorizontal} lazy={false}></ion-icon>
|
||||
</button>
|
||||
)}
|
||||
{showSeparator && (
|
||||
@@ -239,8 +233,8 @@ export class Breadcrumb implements ComponentInterface {
|
||||
*/
|
||||
<span class="breadcrumb-separator" part="separator" aria-hidden="true">
|
||||
<slot name="separator">
|
||||
{theme === 'ios' ? (
|
||||
<ion-icon icon={breadcrumbSeparatorIcon} lazy={false} flip-rtl></ion-icon>
|
||||
{mode === 'ios' ? (
|
||||
<ion-icon icon={chevronForwardOutline} lazy={false} flip-rtl></ion-icon>
|
||||
) : (
|
||||
<span>/</span>
|
||||
)}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
@import "../../themes/native/native.globals";
|
||||
@import "../../themes/ionic.globals";
|
||||
|
||||
// Breadcrumb
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Font weight of the breadcrumb
|
||||
$breadcrumb-font-weight: 400;
|
||||
$breadcrumb-font-weight: 400;
|
||||
|
||||
$breadcrumb-baseline-font-size: 16px;
|
||||
|
||||
/// @prop - Font size of the breadcrumb
|
||||
$breadcrumb-font-size: dynamic-font($breadcrumb-baseline-font-size);
|
||||
$breadcrumb-font-size: dynamic-font($breadcrumb-baseline-font-size);
|
||||
|
||||
/// @prop - Color of the breadcrumb separator
|
||||
$breadcrumb-separator-color: var(--ion-color-step-550, var(--ion-text-color-step-450, #73849a));
|
||||
$breadcrumb-separator-color: var(--ion-color-step-550, var(--ion-text-color-step-450, #73849a));
|
||||
|
||||
@@ -11,3 +11,4 @@
|
||||
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
// Breadcrumbs: In Toolbar
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -2,20 +2,19 @@ import type { ComponentInterface, EventEmitter } from '@stencil/core';
|
||||
import { Component, Element, Event, Host, Listen, Prop, State, Watch, h } from '@stencil/core';
|
||||
import { createColorClasses, hostContext } from '@utils/theme';
|
||||
|
||||
import { getIonTheme } from '../../global/ionic-global';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import type { Color } from '../../interface';
|
||||
import type { BreadcrumbCollapsedClickEventDetail } from '../breadcrumb/breadcrumb-interface';
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
||||
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-breadcrumbs',
|
||||
styleUrls: {
|
||||
ios: 'breadcrumbs.ios.scss',
|
||||
md: 'breadcrumbs.md.scss',
|
||||
ionic: 'breadcrumbs.md.scss',
|
||||
},
|
||||
shadow: true,
|
||||
})
|
||||
@@ -171,12 +170,12 @@ export class Breadcrumbs implements ComponentInterface {
|
||||
|
||||
render() {
|
||||
const { color, collapsed } = this;
|
||||
const theme = getIonTheme(this);
|
||||
const mode = getIonMode(this);
|
||||
|
||||
return (
|
||||
<Host
|
||||
class={createColorClasses(color, {
|
||||
[theme]: true,
|
||||
[mode]: true,
|
||||
'in-toolbar': hostContext('ion-toolbar', this.el),
|
||||
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
||||
'breadcrumbs-collapsed': collapsed,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@import "../../themes/native/native.globals";
|
||||
@import "../../themes/ionic.globals";
|
||||
|
||||
// Breadcrumbs
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,220 +0,0 @@
|
||||
@use "../../themes/ionic/ionic.globals.scss" as globals;
|
||||
@import "./button";
|
||||
@import "./button.ionic.vars";
|
||||
|
||||
// Ionic Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
:host {
|
||||
--padding-bottom: var(--padding-top);
|
||||
--padding-end: #{$button-ionic-padding-end};
|
||||
--padding-start: var(--padding-end);
|
||||
--padding-top: #{$button-ionic-padding-top};
|
||||
// TODO(FW-6187): set this to a design token when it is added
|
||||
--focus-ring-color: #9ec4fd;
|
||||
--focus-ring-width: 2px;
|
||||
|
||||
position: relative;
|
||||
|
||||
min-height: #{$button-ionic-min-height};
|
||||
|
||||
font-size: #{$button-ionic-font-size};
|
||||
|
||||
// Target area
|
||||
&::after {
|
||||
@include position(50%, 0, null, 0);
|
||||
position: absolute;
|
||||
|
||||
height: 100%;
|
||||
min-height: px-to-rem(48);
|
||||
|
||||
transform: translateY(-50%);
|
||||
|
||||
content: "";
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
::slotted(ion-icon[slot="start"]) {
|
||||
@include margin-horizontal(null, px-to-rem(8));
|
||||
}
|
||||
|
||||
::slotted(ion-icon[slot="end"]) {
|
||||
@include margin-horizontal(px-to-rem(8), null);
|
||||
}
|
||||
}
|
||||
|
||||
// Button Sizes
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/* Extra Small and Small Button */
|
||||
:host(.button-xsmall),
|
||||
:host(.button-small) {
|
||||
::slotted(ion-icon[slot="start"]) {
|
||||
@include margin-horizontal(null, px-to-rem(4));
|
||||
}
|
||||
|
||||
::slotted(ion-icon[slot="end"]) {
|
||||
@include margin-horizontal(px-to-rem(4), null);
|
||||
}
|
||||
}
|
||||
|
||||
/* Extra Small Button */
|
||||
:host(.button-xsmall) {
|
||||
--padding-top: #{$button-ionic-xsmall-padding-top};
|
||||
--padding-end: #{$button-ionic-xsmall-padding-end};
|
||||
|
||||
min-height: #{$button-ionic-xsmall-min-height};
|
||||
|
||||
font-size: #{$button-ionic-xsmall-font-size};
|
||||
}
|
||||
|
||||
/* Small Button */
|
||||
:host(.button-small) {
|
||||
--padding-top: #{$button-ionic-small-padding-top};
|
||||
--padding-end: #{$button-ionic-small-padding-end};
|
||||
|
||||
min-height: #{$button-ionic-small-min-height};
|
||||
|
||||
font-size: #{$button-ionic-small-font-size};
|
||||
}
|
||||
|
||||
/* Large Button */
|
||||
:host(.button-large) {
|
||||
--padding-top: #{$button-ionic-large-padding-top};
|
||||
--padding-end: #{$button-ionic-large-padding-end};
|
||||
|
||||
min-height: #{$button-ionic-large-min-height};
|
||||
|
||||
font-size: #{$button-ionic-large-font-size};
|
||||
}
|
||||
|
||||
/* Extra Large Button */
|
||||
:host(.button-xlarge) {
|
||||
--padding-top: #{$button-ionic-xlarge-padding-top};
|
||||
--padding-end: #{$button-ionic-xlarge-padding-end};
|
||||
|
||||
min-height: #{$button-ionic-xlarge-min-height};
|
||||
|
||||
font-size: #{$button-ionic-xlarge-font-size};
|
||||
}
|
||||
|
||||
// Button with Icons
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/* Button containing only an icon */
|
||||
::slotted(ion-icon[slot="start"]),
|
||||
::slotted(ion-icon[slot="end"]),
|
||||
::slotted(ion-icon[slot="icon-only"]) {
|
||||
font-size: px-to-rem(16);
|
||||
}
|
||||
|
||||
:host(.button-xsmall),
|
||||
:host(.button-small),
|
||||
:host(.button-large),
|
||||
:host(.button-xlarge) {
|
||||
::slotted(ion-icon[slot="start"]),
|
||||
::slotted(ion-icon[slot="end"]),
|
||||
::slotted(ion-icon[slot="icon-only"]) {
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
:host(.button-has-icon-only) {
|
||||
--padding-end: var(--padding-top);
|
||||
|
||||
aspect-ratio: 1 / 1;
|
||||
}
|
||||
|
||||
// Button Shapes
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
:host(.button-soft) {
|
||||
--border-radius: #{globals.$ionic-border-radius-rounded-medium};
|
||||
}
|
||||
|
||||
:host(.button-soft.button-xsmall),
|
||||
:host(.button-soft.button-small) {
|
||||
--border-radius: #{globals.$ionic-border-radius-rounded-small};
|
||||
}
|
||||
|
||||
:host(.button-round) {
|
||||
--border-radius: #{globals.$ionic-border-radius-rounded-full};
|
||||
}
|
||||
|
||||
:host(.button-rectangular) {
|
||||
--border-radius: #{globals.$ionic-border-radius-square};
|
||||
}
|
||||
|
||||
// Button Focused
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
// Only show the focus ring when the button is focused
|
||||
:host(.ion-focused) .button-native {
|
||||
outline: var(--focus-ring-width) solid var(--focus-ring-color);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
// Fill Solid Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
:host(.button-solid) {
|
||||
--background-activated: #{ion-color(primary, shade)};
|
||||
}
|
||||
|
||||
:host(.button-solid.ion-color.ion-activated) .button-native::after {
|
||||
background: #{current-color(shade)};
|
||||
}
|
||||
|
||||
// Fill Outline Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-outline) {
|
||||
--border-width: #{$button-ionic-outline-border-width};
|
||||
--border-style: #{$button-ionic-outline-border-style};
|
||||
--background-activated: #e3e3e3;
|
||||
--background-activated-opacity: 1;
|
||||
--background-focused: transparent;
|
||||
--background-hover: transparent;
|
||||
--background-focused-opacity: 0.1;
|
||||
--color-activated: #{ion-color(primary, base)};
|
||||
}
|
||||
|
||||
:host(.button-outline.ion-focused) {
|
||||
--border-color: transparent;
|
||||
}
|
||||
|
||||
// Fill Clear Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-clear) {
|
||||
--background-activated: #e3e3e3;
|
||||
--background-activated-opacity: 1;
|
||||
--background-focused: transparent;
|
||||
--background-hover: transparent;
|
||||
}
|
||||
|
||||
// Button Hover
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-outline),
|
||||
:host(.button-clear) {
|
||||
--background-hover: #121212;
|
||||
--background-hover-opacity: 0.04;
|
||||
}
|
||||
|
||||
// Button: Disabled
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-disabled) {
|
||||
--color: #c9c9c9;
|
||||
--border-color: var(--color);
|
||||
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
:host(.button-solid.button-disabled) {
|
||||
--background: #f5f5f5;
|
||||
}
|
||||
@@ -1,125 +0,0 @@
|
||||
@import "../../themes/native/native.globals.ios";
|
||||
|
||||
// Ionic Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the button
|
||||
$button-ionic-padding-top: px-to-rem(12);
|
||||
|
||||
/// @prop - Padding end of the button
|
||||
$button-ionic-padding-end: px-to-rem(16);
|
||||
|
||||
/// @prop - Padding bottom of the button
|
||||
$button-ionic-padding-bottom: $button-ionic-padding-top;
|
||||
|
||||
/// @prop - Padding start of the button
|
||||
$button-ionic-padding-start: $button-ionic-padding-end;
|
||||
|
||||
/// @prop - Minimum height of the button
|
||||
$button-ionic-min-height: px-to-rem(40);
|
||||
|
||||
/// @prop - Font size of the button text
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ionic-font-size: dynamic-font-max(14px, 3);
|
||||
|
||||
// Ionic Extra Small Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the extra small button
|
||||
$button-ionic-xsmall-padding-top: px-to-rem(4);
|
||||
|
||||
/// @prop - Padding end of the extra small button
|
||||
$button-ionic-xsmall-padding-end: px-to-rem(12);
|
||||
|
||||
/// @prop - Padding bottom of the extra small button
|
||||
$button-ionic-xsmall-padding-bottom: $button-ionic-xsmall-padding-top;
|
||||
|
||||
/// @prop - Padding start of the extra small button
|
||||
$button-ionic-xsmall-padding-start: $button-ionic-xsmall-padding-end;
|
||||
|
||||
/// @prop - Minimum height of the extra small button
|
||||
$button-ionic-xsmall-min-height: px-to-rem(24);
|
||||
|
||||
/// @prop - Font size of the extra small button text
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ionic-xsmall-font-size: dynamic-font-max(12px, 3);
|
||||
|
||||
// Ionic Small Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the small button
|
||||
$button-ionic-small-padding-top: px-to-rem(8);
|
||||
|
||||
/// @prop - Padding end of the small button
|
||||
$button-ionic-small-padding-end: px-to-rem(16);
|
||||
|
||||
/// @prop - Padding bottom of the small button
|
||||
$button-ionic-small-padding-bottom: $button-ionic-small-padding-top;
|
||||
|
||||
/// @prop - Padding start of the small button
|
||||
$button-ionic-small-padding-start: $button-ionic-small-padding-end;
|
||||
|
||||
/// @prop - Minimum height of the small button
|
||||
$button-ionic-small-min-height: px-to-rem(32);
|
||||
|
||||
/// @prop - Font size of the small button text
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ionic-small-font-size: dynamic-font-max(12px, 3);
|
||||
|
||||
// Ionic Large Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the large button
|
||||
$button-ionic-large-padding-top: px-to-rem(16);
|
||||
|
||||
/// @prop - Padding end of the large button
|
||||
$button-ionic-large-padding-end: px-to-rem(24);
|
||||
|
||||
/// @prop - Padding bottom of the large button
|
||||
$button-ionic-large-padding-bottom: $button-ionic-large-padding-top;
|
||||
|
||||
/// @prop - Padding start of the large button
|
||||
$button-ionic-large-padding-start: $button-ionic-large-padding-end;
|
||||
|
||||
/// @prop - Minimum height of the large button
|
||||
$button-ionic-large-min-height: px-to-rem(48);
|
||||
|
||||
/// @prop - Font size of the large button text
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ionic-large-font-size: dynamic-font-max(16px, 3);
|
||||
|
||||
// Ionic Extra Large Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the extra large button
|
||||
$button-ionic-xlarge-padding-top: px-to-rem(16);
|
||||
|
||||
/// @prop - Padding end of the extra large button
|
||||
$button-ionic-xlarge-padding-end: px-to-rem(32);
|
||||
|
||||
/// @prop - Padding bottom of the extra large button
|
||||
$button-ionic-xlarge-padding-bottom: $button-ionic-xlarge-padding-top;
|
||||
|
||||
/// @prop - Padding start of the extra large button
|
||||
$button-ionic-xlarge-padding-start: $button-ionic-xlarge-padding-end;
|
||||
|
||||
/// @prop - Minimum height of the extra large button
|
||||
$button-ionic-xlarge-min-height: px-to-rem(56);
|
||||
|
||||
/// @prop - Font size of the extra large button text
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ionic-xlarge-font-size: dynamic-font-max(20px, 3);
|
||||
|
||||
// Ionic Outline Button
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
/// @prop - Border width of the outline button
|
||||
$button-ionic-outline-border-width: 1px;
|
||||
|
||||
/// @prop - Border style of the outline button
|
||||
$button-ionic-outline-border-style: solid;
|
||||
@@ -2,10 +2,12 @@
|
||||
@import "./button.ios.vars";
|
||||
@import "../toolbar/toolbar.ios.vars";
|
||||
|
||||
|
||||
// iOS Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
--border-radius: #{$button-ios-border-radius};
|
||||
--padding-top: #{$button-ios-padding-top};
|
||||
--padding-bottom: #{$button-ios-padding-bottom};
|
||||
--padding-start: #{$button-ios-padding-start};
|
||||
@@ -22,7 +24,8 @@
|
||||
letter-spacing: #{$button-ios-letter-spacing};
|
||||
}
|
||||
|
||||
// Solid Button
|
||||
|
||||
// iOS Solid Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-solid) {
|
||||
@@ -34,20 +37,23 @@
|
||||
--background-hover-opacity: 1;
|
||||
}
|
||||
|
||||
// Outline Button
|
||||
|
||||
// iOS Outline Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-outline) {
|
||||
--border-radius: #{$button-ios-outline-border-radius};
|
||||
--border-width: #{$button-ios-outline-border-width};
|
||||
--border-style: #{$button-ios-outline-border-style};
|
||||
--background-activated: #{ion-color(primary, base)};
|
||||
--background-focused: #{ion-color(primary, base)};
|
||||
--background-hover: transparent;
|
||||
--background-focused-opacity: 0.1;
|
||||
--background-focused-opacity: .1;
|
||||
--color-activated: #{ion-color(primary, contrast)};
|
||||
}
|
||||
|
||||
// Clear Button
|
||||
|
||||
// iOS Clear Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-clear) {
|
||||
@@ -55,13 +61,14 @@
|
||||
--background-activated-opacity: 0;
|
||||
--background-focused: #{ion-color(primary, base)};
|
||||
--background-hover: transparent;
|
||||
--background-focused-opacity: 0.1;
|
||||
--background-focused-opacity: .1;
|
||||
|
||||
font-size: #{$button-ios-clear-font-size};
|
||||
font-weight: #{$button-ios-clear-font-weight};
|
||||
}
|
||||
|
||||
// Toolbar Buttons
|
||||
|
||||
// iOS Toolbar Buttons
|
||||
// --------------------------------------------------
|
||||
|
||||
/**
|
||||
@@ -74,15 +81,17 @@
|
||||
* can add the different font size/weight in a toolbar
|
||||
* but still let "size"/"strong" override it.
|
||||
*/
|
||||
:host(.in-buttons) {
|
||||
font-size: #{$toolbar-ios-button-font-size};
|
||||
font-weight: 400;
|
||||
}
|
||||
:host(.in-buttons) {
|
||||
font-size: #{$toolbar-ios-button-font-size};
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
// Button Sizes
|
||||
|
||||
// iOS Button Sizes
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-large) {
|
||||
--border-radius: #{$button-ios-large-border-radius};
|
||||
--padding-top: #{$button-ios-large-padding-top};
|
||||
--padding-start: #{$button-ios-large-padding-start};
|
||||
--padding-end: #{$button-ios-large-padding-end};
|
||||
@@ -94,6 +103,7 @@
|
||||
}
|
||||
|
||||
:host(.button-small) {
|
||||
--border-radius: #{$button-ios-small-border-radius};
|
||||
--padding-top: #{$button-ios-small-padding-top};
|
||||
--padding-start: #{$button-ios-small-padding-start};
|
||||
--padding-end: #{$button-ios-small-padding-end};
|
||||
@@ -104,37 +114,26 @@
|
||||
font-size: #{$button-ios-small-font-size};
|
||||
}
|
||||
|
||||
// Button Shapes
|
||||
|
||||
// iOS Round Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-soft) {
|
||||
--border-radius: 6px;
|
||||
}
|
||||
|
||||
:host(.button-soft.button-large) {
|
||||
--border-radius: 8px;
|
||||
}
|
||||
|
||||
:host(.button-soft.button-small) {
|
||||
--border-radius: 4px;
|
||||
}
|
||||
|
||||
:host(.button-round) {
|
||||
--border-radius: 999px;
|
||||
--border-radius: #{$button-ios-round-border-radius};
|
||||
--padding-top: #{$button-ios-round-padding-top};
|
||||
--padding-start: #{$button-ios-round-padding-start};
|
||||
--padding-end: #{$button-ios-round-padding-end};
|
||||
--padding-bottom: #{$button-ios-round-padding-bottom};
|
||||
}
|
||||
|
||||
:host(.button-rectangular) {
|
||||
--border-radius: 0px;
|
||||
}
|
||||
|
||||
// Strong Button
|
||||
// iOS Strong Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-strong) {
|
||||
font-weight: #{$button-ios-strong-font-weight};
|
||||
}
|
||||
|
||||
// Icon Only Button
|
||||
// iOS Icon Only Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-has-icon-only) {
|
||||
@@ -156,7 +155,7 @@
|
||||
*
|
||||
* Since the `ion-button` uses `rem` for the font size, we can't
|
||||
* just pass the desired icon font size in `em` to the `
|
||||
* dynamic-font-clamp`. Instead, we need to adjust the base size
|
||||
* dynamic-font-clamp`. Instead, we need to adjust the base size
|
||||
* to account for the ion-button` font size.
|
||||
*
|
||||
* For example, if the default font size of `ion-button` is 16px
|
||||
@@ -180,7 +179,7 @@
|
||||
*
|
||||
* Since the `ion-button` uses `rem` for the font size, we can't
|
||||
* just pass the desired icon font size in `em` to the `
|
||||
* dynamic-font-clamp`. Instead, we need to adjust the base size
|
||||
* dynamic-font-clamp`. Instead, we need to adjust the base size
|
||||
* to account for the ion-button` font size.
|
||||
*
|
||||
* For example, if the default font size of `ion-button` is 13px
|
||||
@@ -204,7 +203,7 @@
|
||||
*
|
||||
* Since the `ion-button` uses `rem` for the font size, we can't
|
||||
* just pass the desired icon font size in `em` to the `
|
||||
* dynamic-font-clamp`. Instead, we need to adjust the base size
|
||||
* dynamic-font-clamp`. Instead, we need to adjust the base size
|
||||
* to account for the ion-button` font size.
|
||||
*
|
||||
* For example, if the default font size of `ion-button` is 20px
|
||||
@@ -230,6 +229,7 @@
|
||||
background: #{current-color(shade)};
|
||||
}
|
||||
|
||||
|
||||
// iOS Button Hover
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -259,14 +259,14 @@
|
||||
// Solid buttons inside of a toolbar should use a tint of the current
|
||||
// background so use white to tint it, but this should not apply
|
||||
// when activated
|
||||
:host(:hover.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color):not(.ion-activated))
|
||||
.button-native::after {
|
||||
:host(:hover.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color):not(.ion-activated)) .button-native::after {
|
||||
background: #fff;
|
||||
|
||||
opacity: 0.1;
|
||||
opacity: 0.10;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// iOS Button Activated
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -286,6 +286,7 @@
|
||||
background: #{current-color(shade)};
|
||||
}
|
||||
|
||||
|
||||
// Activated Button in Toolbar
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,97 +1,111 @@
|
||||
@import "../../themes/native/native.globals.ios";
|
||||
@import "../../themes/ionic.globals.ios";
|
||||
|
||||
// iOS Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Margin top of the button
|
||||
$button-ios-margin-top: 4px;
|
||||
$button-ios-margin-top: 4px;
|
||||
|
||||
/// @prop - Margin end of the button
|
||||
$button-ios-margin-end: 2px;
|
||||
$button-ios-margin-end: 2px;
|
||||
|
||||
/// @prop - Margin bottom of the button
|
||||
$button-ios-margin-bottom: 4px;
|
||||
$button-ios-margin-bottom: 4px;
|
||||
|
||||
/// @prop - Margin start of the button
|
||||
$button-ios-margin-start: 2px;
|
||||
$button-ios-margin-start: 2px;
|
||||
|
||||
/// @prop - Padding top of the button
|
||||
$button-ios-padding-top: 13px;
|
||||
$button-ios-padding-top: 13px;
|
||||
|
||||
/// @prop - Padding end of the button
|
||||
$button-ios-padding-end: 1em;
|
||||
$button-ios-padding-end: 1em;
|
||||
|
||||
/// @prop - Padding bottom of the button
|
||||
$button-ios-padding-bottom: $button-ios-padding-top;
|
||||
$button-ios-padding-bottom: $button-ios-padding-top;
|
||||
|
||||
/// @prop - Padding start of the button
|
||||
$button-ios-padding-start: $button-ios-padding-end;
|
||||
$button-ios-padding-start: $button-ios-padding-end;
|
||||
|
||||
/// @prop - Minimum height of the button
|
||||
$button-ios-min-height: 3.1em;
|
||||
$button-ios-min-height: 3.1em;
|
||||
|
||||
/// @prop - Border radius of the button
|
||||
$button-ios-border-radius: 14px;
|
||||
|
||||
/// @prop - Font size of the button text
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ios-font-size: dynamic-font-max(16px, 3);
|
||||
$button-ios-font-size: dynamic-font-max(16px, 3);
|
||||
|
||||
/// @prop - Font weight of the button text
|
||||
$button-ios-font-weight: 500;
|
||||
$button-ios-font-weight: 500;
|
||||
|
||||
// iOS Large Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the large button
|
||||
$button-ios-large-padding-top: 17px;
|
||||
$button-ios-large-padding-top: 17px;
|
||||
|
||||
/// @prop - Padding end of the large button
|
||||
$button-ios-large-padding-end: 1em;
|
||||
$button-ios-large-padding-end: 1em;
|
||||
|
||||
/// @prop - Padding bottom of the large button
|
||||
$button-ios-large-padding-bottom: $button-ios-large-padding-top;
|
||||
$button-ios-large-padding-bottom: $button-ios-large-padding-top;
|
||||
|
||||
/// @prop - Padding start of the large button
|
||||
$button-ios-large-padding-start: $button-ios-large-padding-end;
|
||||
$button-ios-large-padding-start: $button-ios-large-padding-end;
|
||||
|
||||
/// @prop - Minimum height of the large button
|
||||
$button-ios-large-min-height: 3.1em;
|
||||
$button-ios-large-min-height: 3.1em;
|
||||
|
||||
/// @prop - Border radius of the large button
|
||||
$button-ios-large-border-radius: 16px;
|
||||
|
||||
/// @prop - Font size of the large button
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ios-large-font-size: dynamic-font-max(20px, 3);
|
||||
$button-ios-large-font-size: dynamic-font-max(20px, 3);
|
||||
|
||||
|
||||
// iOS Small Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the small button
|
||||
$button-ios-small-padding-top: 4px;
|
||||
$button-ios-small-padding-top: 4px;
|
||||
|
||||
/// @prop - Padding end of the small button
|
||||
$button-ios-small-padding-end: 0.9em;
|
||||
$button-ios-small-padding-end: .9em;
|
||||
|
||||
/// @prop - Padding bottom of the small button
|
||||
$button-ios-small-padding-bottom: $button-ios-small-padding-top;
|
||||
$button-ios-small-padding-bottom: $button-ios-small-padding-top;
|
||||
|
||||
/// @prop - Padding start of the small button
|
||||
$button-ios-small-padding-start: $button-ios-small-padding-end;
|
||||
$button-ios-small-padding-start: $button-ios-small-padding-end;
|
||||
|
||||
/// @prop - Minimum height of the small button
|
||||
$button-ios-small-min-height: 2.1em;
|
||||
$button-ios-small-min-height: 2.1em;
|
||||
|
||||
/// @prop - Border radius of the small button
|
||||
$button-ios-small-border-radius: 6px;
|
||||
|
||||
/// @prop - Font size of the small button
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ios-small-font-size: dynamic-font-max(13px, 3);
|
||||
$button-ios-small-font-size: dynamic-font-max(13px, 3);
|
||||
|
||||
|
||||
// iOS Outline Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Border width of the outline button
|
||||
$button-ios-outline-border-width: 1px;
|
||||
$button-ios-outline-border-width: 1px;
|
||||
|
||||
/// @prop - Border style of the outline button
|
||||
$button-ios-outline-border-style: solid;
|
||||
$button-ios-outline-border-style: solid;
|
||||
|
||||
/// @prop - Border radius of the outline button
|
||||
$button-ios-outline-border-radius: $button-ios-border-radius;
|
||||
|
||||
// iOS Clear Button
|
||||
// --------------------------------------------------
|
||||
@@ -99,22 +113,41 @@ $button-ios-outline-border-style: solid;
|
||||
/// @prop - Font size of the clear button
|
||||
/// The maximum font size is calculated by taking the default font size
|
||||
/// and multiplying it by 3, since 310% of the default is the maximum
|
||||
$button-ios-clear-font-size: dynamic-font-max(17px, 3);
|
||||
$button-ios-clear-font-size: dynamic-font-max(17px, 3);
|
||||
|
||||
/// @prop - Font weight of the clear button
|
||||
$button-ios-clear-font-weight: normal;
|
||||
$button-ios-clear-font-weight: normal;
|
||||
|
||||
/// @prop - Letter spacing of the button
|
||||
$button-ios-letter-spacing: 0;
|
||||
$button-ios-letter-spacing: 0;
|
||||
|
||||
/// @prop - Opacity of the activated clear button
|
||||
$button-ios-clear-opacity-activated: 0.4;
|
||||
$button-ios-clear-opacity-activated: .4;
|
||||
|
||||
/// @prop - Opacity of the clear button on hover
|
||||
$button-ios-clear-opacity-hover: 0.6;
|
||||
$button-ios-clear-opacity-hover: .6;
|
||||
|
||||
// iOS Round Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the round button
|
||||
$button-ios-round-padding-top: $button-round-padding-top;
|
||||
|
||||
/// @prop - Padding end of the round button
|
||||
$button-ios-round-padding-end: $button-round-padding-end;
|
||||
|
||||
/// @prop - Padding bottom of the round button
|
||||
$button-ios-round-padding-bottom: $button-round-padding-bottom;
|
||||
|
||||
/// @prop - Padding start of the round button
|
||||
$button-ios-round-padding-start: $button-round-padding-start;
|
||||
|
||||
/// @prop - Border radius of the round button
|
||||
$button-ios-round-border-radius: $button-round-border-radius;
|
||||
|
||||
|
||||
// iOS Decorator Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Font weight of the strong button
|
||||
$button-ios-strong-font-weight: 600;
|
||||
$button-ios-strong-font-weight: 600;
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
--border-radius: #{$button-md-border-radius};
|
||||
--padding-top: #{$button-md-padding-top};
|
||||
--padding-bottom: #{$button-md-padding-bottom};
|
||||
--padding-start: #{$button-md-padding-start};
|
||||
--padding-end: #{$button-md-padding-end};
|
||||
--transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), background-color 15ms linear, color 15ms linear;
|
||||
--transition: box-shadow 280ms cubic-bezier(.4, 0, .2, 1),
|
||||
background-color 15ms linear,
|
||||
color 15ms linear;
|
||||
|
||||
@include margin($button-md-margin-top, $button-md-margin-end, $button-md-margin-bottom, $button-md-margin-start);
|
||||
|
||||
@@ -23,7 +26,7 @@
|
||||
text-transform: #{$button-md-text-transform};
|
||||
}
|
||||
|
||||
// Solid Button
|
||||
// Material Design Solid Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-solid) {
|
||||
@@ -31,8 +34,8 @@
|
||||
--background-hover: #{ion-color(primary, contrast)};
|
||||
--background-focused: #{ion-color(primary, contrast)};
|
||||
--background-activated-opacity: 0;
|
||||
--background-focused-opacity: 0.24;
|
||||
--background-hover-opacity: 0.08;
|
||||
--background-focused-opacity: .24;
|
||||
--background-hover-opacity: .08;
|
||||
--box-shadow: #{$button-md-box-shadow};
|
||||
}
|
||||
|
||||
@@ -40,7 +43,7 @@
|
||||
--box-shadow: #{$button-md-box-shadow-activated};
|
||||
}
|
||||
|
||||
// Outline Button
|
||||
// Material Design Outline Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-outline) {
|
||||
@@ -51,15 +54,16 @@
|
||||
--background-focused: #{ion-color(primary, base)};
|
||||
--background-hover: #{ion-color(primary, base)};
|
||||
--background-activated-opacity: 0;
|
||||
--background-focused-opacity: 0.12;
|
||||
--background-hover-opacity: 0.04;
|
||||
--background-focused-opacity: .12;
|
||||
--background-hover-opacity: .04;
|
||||
}
|
||||
|
||||
:host(.button-outline.ion-activated.ion-color) .button-native {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
// Clear Button
|
||||
|
||||
// Material Design Clear Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-clear) {
|
||||
@@ -67,26 +71,24 @@
|
||||
--background-focused: #{ion-color(primary, base)};
|
||||
--background-hover: #{ion-color(primary, base)};
|
||||
--background-activated-opacity: 0;
|
||||
--background-focused-opacity: 0.12;
|
||||
--background-hover-opacity: 0.04;
|
||||
--background-focused-opacity: .12;
|
||||
--background-hover-opacity: .04;
|
||||
}
|
||||
|
||||
// Button Shapes
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
:host(.button-soft) {
|
||||
--border-radius: 4px;
|
||||
}
|
||||
// Material Design Round Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-round) {
|
||||
--border-radius: 999px;
|
||||
--border-radius: #{$button-md-round-border-radius};
|
||||
--padding-top: #{$button-md-round-padding-top};
|
||||
--padding-start: #{$button-md-round-padding-start};
|
||||
--padding-end: #{$button-md-round-padding-end};
|
||||
--padding-bottom: #{$button-md-round-padding-bottom};
|
||||
}
|
||||
|
||||
:host(.button-rectangular) {
|
||||
--border-radius: 0px;
|
||||
}
|
||||
|
||||
// Button Sizes
|
||||
// Material Design Button Sizes
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-large) {
|
||||
@@ -111,14 +113,14 @@
|
||||
font-size: #{$button-md-small-font-size};
|
||||
}
|
||||
|
||||
// Strong Button
|
||||
// MD strong Button
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.button-strong) {
|
||||
font-weight: #{$button-md-strong-font-weight};
|
||||
}
|
||||
|
||||
// Icon Only Button
|
||||
// MD Icon Only Button
|
||||
//
|
||||
// MD does not specify a small size, these
|
||||
// styles are based on the iOS small size.
|
||||
@@ -147,7 +149,7 @@
|
||||
*
|
||||
* Since the `ion-button` uses `rem` for the font size, we can't
|
||||
* just pass the desired icon font size in `em` to the `
|
||||
* dynamic-font-clamp`. Instead, we need to adjust the base size
|
||||
* dynamic-font-clamp`. Instead, we need to adjust the base size
|
||||
* to account for the ion-button` font size.
|
||||
*
|
||||
* For example, if the default font size of `ion-button` is 14px
|
||||
@@ -172,7 +174,7 @@
|
||||
*
|
||||
* Since the `ion-button` uses `rem` for the font size, we can't
|
||||
* just pass the desired icon font size in `em` to the `
|
||||
* dynamic-font-clamp`. Instead, we need to adjust the base size
|
||||
* dynamic-font-clamp`. Instead, we need to adjust the base size
|
||||
* to account for the ion-button` font size.
|
||||
*
|
||||
* For example, if the default font size of `ion-button` is 13px
|
||||
@@ -197,17 +199,17 @@
|
||||
*
|
||||
* Since the `ion-button` uses `rem` for the font size, we can't
|
||||
* just pass the desired icon font size in `em` to the `
|
||||
* dynamic-font-clamp`. Instead, we need to adjust the base size
|
||||
* dynamic-font-clamp`. Instead, we need to adjust the base size
|
||||
* to account for the ion-button` font size.
|
||||
*
|
||||
* For example, if the default font size of `ion-button` is 20px
|
||||
* (derived from rem) and the default font size of the icon is
|
||||
* 28px, then the base size would need to be increased.
|
||||
*/
|
||||
font-size: dynamic-font-clamp(0.67, 22.4px, 1.92, 1em);
|
||||
font-size: dynamic-font-clamp(0.67, 22.4px, 1.92, 1em);
|
||||
}
|
||||
|
||||
// Button: Hover
|
||||
// Material Design Button: Hover
|
||||
// --------------------------------------------------
|
||||
|
||||
/**
|
||||
@@ -225,6 +227,7 @@
|
||||
background: #{current-color(base)};
|
||||
}
|
||||
|
||||
|
||||
@media (any-hover: hover) {
|
||||
:host(.button-solid.ion-color:hover) .button-native::after {
|
||||
background: #{current-color(contrast)};
|
||||
@@ -236,6 +239,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Activated Button in Toolbar
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,98 +1,119 @@
|
||||
@import "../../themes/native/native.globals.md";
|
||||
@import "../../themes/ionic.globals.md";
|
||||
|
||||
// Material Design Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Margin top of the button
|
||||
$button-md-margin-top: 4px;
|
||||
$button-md-margin-top: 4px;
|
||||
|
||||
/// @prop - Margin end of the button
|
||||
$button-md-margin-end: 2px;
|
||||
$button-md-margin-end: 2px;
|
||||
|
||||
/// @prop - Margin bottom of the button
|
||||
$button-md-margin-bottom: 4px;
|
||||
$button-md-margin-bottom: 4px;
|
||||
|
||||
/// @prop - Margin start of the button
|
||||
$button-md-margin-start: 2px;
|
||||
$button-md-margin-start: 2px;
|
||||
|
||||
/// @prop - Padding top of the button
|
||||
$button-md-padding-top: 8px;
|
||||
$button-md-padding-top: 8px;
|
||||
|
||||
/// @prop - Padding end of the button
|
||||
$button-md-padding-end: 1.1em;
|
||||
$button-md-padding-end: 1.1em;
|
||||
|
||||
/// @prop - Padding bottom of the button
|
||||
$button-md-padding-bottom: $button-md-padding-top;
|
||||
$button-md-padding-bottom: $button-md-padding-top;
|
||||
|
||||
/// @prop - Padding start of the button
|
||||
$button-md-padding-start: 1.1em;
|
||||
$button-md-padding-start: 1.1em;
|
||||
|
||||
/// @prop - Minimum height of the button
|
||||
$button-md-min-height: 36px;
|
||||
$button-md-min-height: 36px;
|
||||
|
||||
/// @prop - Border radius of the button
|
||||
$button-md-border-radius: 4px;
|
||||
|
||||
/// @prop - Font size of the button text
|
||||
$button-md-font-size: dynamic-font(14px);
|
||||
$button-md-font-size: dynamic-font(14px);
|
||||
|
||||
/// @prop - Font weight of the button text
|
||||
$button-md-font-weight: 500;
|
||||
$button-md-font-weight: 500;
|
||||
|
||||
/// @prop - Capitalization of the button text
|
||||
$button-md-text-transform: uppercase;
|
||||
$button-md-text-transform: uppercase;
|
||||
|
||||
$button-md-letter-spacing: 0.06em;
|
||||
$button-md-letter-spacing: 0.06em;
|
||||
|
||||
/// @prop - Box shadow of the button
|
||||
$button-md-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),
|
||||
0 1px 5px 0 rgba(0, 0, 0, 0.12);
|
||||
$button-md-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
|
||||
|
||||
/// @prop - Box shadow of the activated button
|
||||
$button-md-box-shadow-activated: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
||||
0 3px 14px 2px rgba(0, 0, 0, 0.12);
|
||||
$button-md-box-shadow-activated: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12);
|
||||
|
||||
// Material Design Large Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the large button
|
||||
$button-md-large-padding-top: 14px;
|
||||
$button-md-large-padding-top: 14px;
|
||||
|
||||
/// @prop - Padding end of the large button
|
||||
$button-md-large-padding-end: 1em;
|
||||
$button-md-large-padding-end: 1em;
|
||||
|
||||
/// @prop - Padding bottom of the large button
|
||||
$button-md-large-padding-bottom: $button-md-large-padding-top;
|
||||
$button-md-large-padding-bottom: $button-md-large-padding-top;
|
||||
|
||||
/// @prop - Padding start of the large button
|
||||
$button-md-large-padding-start: $button-md-large-padding-end;
|
||||
$button-md-large-padding-start: $button-md-large-padding-end;
|
||||
|
||||
/// @prop - Minimum height of the large button
|
||||
$button-md-large-min-height: 2.8em;
|
||||
$button-md-large-min-height: 2.8em;
|
||||
|
||||
/// @prop - Font size of the large button
|
||||
$button-md-large-font-size: dynamic-font(20px);
|
||||
$button-md-large-font-size: dynamic-font(20px);
|
||||
|
||||
|
||||
// Material Design Small Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the small button
|
||||
$button-md-small-padding-top: 4px;
|
||||
$button-md-small-padding-top: 4px;
|
||||
|
||||
/// @prop - Padding end of the small button
|
||||
$button-md-small-padding-end: 0.9em;
|
||||
$button-md-small-padding-end: .9em;
|
||||
|
||||
/// @prop - Padding bottom of the small button
|
||||
$button-md-small-padding-bottom: $button-md-small-padding-top;
|
||||
$button-md-small-padding-bottom: $button-md-small-padding-top;
|
||||
|
||||
/// @prop - Padding start of the small button
|
||||
$button-md-small-padding-start: $button-md-small-padding-end;
|
||||
$button-md-small-padding-start: $button-md-small-padding-end;
|
||||
|
||||
/// @prop - Minimum height of the small button
|
||||
$button-md-small-min-height: 2.1em;
|
||||
$button-md-small-min-height: 2.1em;
|
||||
|
||||
/// @prop - Font size of the small button
|
||||
$button-md-small-font-size: dynamic-font(13px);
|
||||
$button-md-small-font-size: dynamic-font(13px);
|
||||
|
||||
// Material Design Round Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Padding top of the round button
|
||||
$button-md-round-padding-top: $button-round-padding-top;
|
||||
|
||||
/// @prop - Padding end of the round button
|
||||
$button-md-round-padding-end: $button-round-padding-end;
|
||||
|
||||
/// @prop - Padding bottom of the round button
|
||||
$button-md-round-padding-bottom: $button-round-padding-bottom;
|
||||
|
||||
/// @prop - Padding start of the round button
|
||||
$button-md-round-padding-start: $button-round-padding-start;
|
||||
|
||||
/// @prop - Border radius of the round button
|
||||
$button-md-round-border-radius: $button-round-border-radius;
|
||||
|
||||
|
||||
// Material Design Decorator Button
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Font weight of the strong button
|
||||
$button-md-strong-font-weight: bold;
|
||||
$button-md-strong-font-weight: bold;
|
||||
|
||||