Compare commits

...

386 Commits

Author SHA1 Message Date
José Rio
e619c72d43 Merge branch 'next' into ROU-11368 2025-07-18 00:03:51 +01:00
José Rio
07d257f7f5 fix(picker-column): fixing tests 2025-07-17 23:29:16 +01:00
José Rio
12ad1ed76c fix(picker-column-option): fixing tests 2025-07-17 23:22:16 +01:00
Brandy Smith
79a12ceca3 chore: merge main into next (#30557) 2025-07-17 14:09:28 -04:00
Brandy Smith
fef3016d13 Merge branch 'main' into chore/merge-main 2025-07-17 13:39:50 -04:00
Marta Carlos
060f554ef8 feat(toggle): change error text color for ionic theme (#30556)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
Error text color was `ion-semantics-danger-800`

## What is the new behavior?
Error text color is now `ion-semantics-danger-900`, following design
guidelines.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2025-07-17 17:06:16 +01:00
José Rio
131de8b8ea fix(picker): manage focus to prevent a11y issues. 2025-07-17 16:49:28 +01:00
José Rio
74710d4cf6 fix(picker): run lint 2025-07-17 16:32:34 +01:00
José Rio
3626302d32 fix(picker-column-option): changed structure in order to remove tabindex="-1"
This is needed in order to prevent A11Y issues, in order to prevent to be possible to navigate through each option item through tab navigation, structure must change into this.
2025-07-17 11:19:47 +01:00
José Rio
c1574ffe1f fix(picker-column): adapt structure to prevent double tab tap on keyboard navigation 2025-07-17 11:16:47 +01:00
Marta Carlos
34fd51067b feat(toggle): add press state for ionic theme (#30550)
Issue number: internal

---------

## What is the current behavior?
- The current toggle, using the ionic theme, is not following the design
for pressed state, as well as the default background color for unchecked
toggles

## What is the new behavior?
For the ionic theme:
- Changes unselected toggle background color to follow the new style:
`ion-primitives-neutral-500
- Changes the toggle background color for pressed states:
`ion-bg-primary-base-press` and `ion-bg-neutral-base-press`, for checked
and unchecked toggles, respectively
- updates the toggle snapshots accordingly

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-07-17 10:56:38 +01:00
José Rio
e50ba30c22 fix(picker): run lint 2025-07-16 16:54:59 +01:00
José Rio
7ba6b9d0c2 fix(datetime): disabled focus trap to prevent issues with focus management. 2025-07-16 16:52:22 +01:00
José Rio
56b8b1de81 fix(picker): rollback aria-hidden to avoid a11y structure issues 2025-07-16 16:51:31 +01:00
José Rio
a1ea905c97 fix(picker-colum): run lint 2025-07-16 15:43:39 +01:00
José Rio
22ce04fc88 fix(overlay): remove unneeded tests 2025-07-16 14:53:42 +01:00
José Rio
fbe3116ed5 fix(piker): remove aria-hidden attribute 2025-07-16 12:23:37 +01:00
José Rio
120fabbc98 fix(overlay): remove aria-hidden attribute 2025-07-16 12:22:01 +01:00
Shane
be6a690812 chore(git): update next from main (#30537) 2025-07-09 15:22:30 -07:00
ShaneK
92b1f4c01f fix(lint): running core lint.fix 2025-07-09 14:10:30 -07:00
ShaneK
7981fe3f9a chore(merge): merging main into next 2025-07-09 14:05:38 -07:00
Brandy Smith
bf4503ea2b chore(git): merge main (#30532) 2025-07-07 11:00:42 -04:00
Brandy Smith
4ea3f6cc35 chore(): revert updated snapshot 2025-07-07 10:27:29 -04:00
ionitron
ccc3eeb56a chore(): add updated snapshots 2025-07-07 14:11:50 +00:00
Brandy Smith
c16397ed5a Merge branch 'main' into chore/update-from-main 2025-07-07 09:46:55 -04:00
João Ferreira
9a053f60cb feat(datetime): add divider to datetime-action-buttons (#30509)
Issue number: internal

---------
## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
Now, the action buttons have a divider for improved readability.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information
[ionic
preview](https://ionic-framework-git-rou-11884-ionic1.vercel.app/src/components/datetime/test/basic?ionic:theme=ionic)
<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-07-02 18:14:43 +01:00
Brandy Smith
f42e39e0d5 fix(toolbar): allow slot to size to content to account for images (#30508)
Sets the `flex-basis` variable to `auto` if the slot contains an img to allow it to calculate the width using the image's intrinsic width.

---------

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
2025-06-26 10:10:55 -04:00
Bernardo Cardoso
33dcf98bd2 fix(tokens): review the generation of utility-classes (#30498)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Currently some utility-classes are not as effective as they could be,
because they don't affect, for example, the --background or --color css
API's.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Changed the way the classes are generated, so that it affects the css
custom properties as well.
- Make the background classes to only be generated for the tokens that
contain 'bg'.
- Update the style for the body background on the ionic theme (this
triggered some snapshots differences).

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-06-24 16:01:32 +01:00
João Ferreira
5458e06742 feat(datetime): add styles for adjacent days for ionic theme (#30492)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the current behavior that you are modifying. -->
Now the adjacent days have proper styles for all their states. 
And the next-prev month buttons have the right height.

## Changes:
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- add styles for the adjacent days;
- add styles for active adjacent day;
- add styles for pressed adjacent day;
- add styles for focused adjacent day;

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
[ionic
preview](https://ionic-framework-git-rou-11702-ionic1.vercel.app/src/components/datetime/test/show-adjacent-days?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2025-06-20 19:08:04 +01:00
Giuliana Silva
708364df82 fix(sheet): fix toolbar not showing contents in ios for ionic theme (#30496)
Issue number: resolves internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
The `ion-toolbar` contents inside the `sheet` were not being displayed
correctly in `iOS`.

## What is the new behavior?
This PR add `z-index` values of the `ion-toolbar`'s `content` and
`background` containers to fix the issue.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information
Before:
<img
src="https://github.com/user-attachments/assets/ac28e3de-9bb3-447d-a6f7-cce40ccd222c"
alt="Sample Image" height="300">

After: 
<img
src="https://github.com/user-attachments/assets/18af1b57-dd70-4783-b0e7-9fffab8402a3"
alt="Sample Image" height="300">

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-06-18 16:02:25 +01:00
Bernardo Cardoso
5da9cc64bd feat(header): add translucent support on ionic theme (#30493)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

When using ionic theme there's no support for translucent prop on the
ion-header.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Add support for translucent prop on Ionic theme
- Adjusted tests to also run for ionic-md 

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Ionic header
fade](https://ionic-framework-git-rou-11911-ionic1.vercel.app/src/components/header/test/fade?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-06-17 14:44:11 +01:00
Brandy Smith
911684f83a feat(input-otp): add styling for the ionic theme (#30465)
Adds styles for the ionic theme, splits the scss files into common and native, and adds the theme to the e2e tests.

---------

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
2025-06-12 17:07:55 -04:00
Maria Hutt
ecfffe9486 chore(git): update next from main (#30478) 2025-06-12 13:53:37 -07:00
Maria Hutt
0b70a997ed chore(package-lock): downgrade ionicons to correct version 2025-06-12 11:39:06 -07:00
Maria Hutt
c5e4f58e65 chore(package-lock): update file 2025-06-11 13:00:24 -07:00
Maria Hutt
839646dc07 chore(playwright): downgrade to correct version 2025-06-11 12:44:46 -07:00
Maria Hutt
3a5ed90c03 chore(package-lock): regenerate 2025-06-11 11:37:23 -07:00
Maria Hutt
a723ad327c chore: sync with main 2025-06-11 11:05:09 -07:00
Bernardo Cardoso
40e610dec0 fix(card): fix tokens on ionic theme (#30441)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Updated typography tokens.
- Added border styles and CSS variables for easier customization.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Ionic theme
card](https://ionic-framework-git-rou-11968-card-ionic1.vercel.app/src/components/card/test/theme-ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
2025-06-09 16:04:03 +01:00
Brandy Smith
b57d1634a1 chore(git): update next from main (#30458) 2025-06-06 11:42:26 -04:00
Brandy Smith
68a523cb1d chore(): add updated snapshots 2025-06-06 09:43:28 -04:00
Brandy Smith
38b3ac4472 chore(): add updated snapshots 2025-06-06 09:24:16 -04:00
Brandy Smith
280cb050f3 fix(core): add missing ionic theme styles for sheet modal 2025-06-05 18:01:33 -04:00
ionitron
92f1975c12 chore(): add updated snapshots 2025-06-05 21:37:01 +00:00
Brandy Smith
4020859d4e chore: remove hydrated rule to hide the body 2025-06-05 17:23:32 -04:00
Brandy Smith
17dc854eae test(select): fix duplicated tests 2025-06-05 12:50:44 -04:00
Brandy Smith
5d719ba6b0 chore: fresh install and lint 2025-06-04 18:03:28 -04:00
Brandy Smith
345bd53831 Merge branch 'main' into chore/update-next-from-main 2025-06-04 16:58:30 -04:00
Bernardo Cardoso
fe964c8fa0 fix(avatar): fix avatar tokens on ionic theme (#30438)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Review background color token and xxsmall size

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Avatar ionic
theme](https://ionic-framework-git-rou-11968-avatar-ionic1.vercel.app/src/components/avatar/test/size?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-05-30 15:35:43 +01:00
Bernardo Cardoso
034d047202 fix(tab-button): fix font-size token on ionic theme (#30439)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Updated typography to use correct token.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Ionic
tab-bar](https://ionic-framework-git-rou-11968-tabs-ionic1.vercel.app/src/components/tab-bar/test/basic?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-05-29 18:50:13 +01:00
Bernardo Cardoso
8e8e8f90cd fix(button): fix tokens usage on ionic theme (#30442)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Review button min-width and size of icons inside.
- Fixed test for ionic theme, with the correct medium size.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Button Ionic
theme](https://ionic-framework-git-rou-11968-button-v2-ionic1.vercel.app/src/components/button/test/theme-ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-05-29 18:36:28 +01:00
Pedro Lourenço
a0d5ad7b8d fix(button): update styling for badge (#30414)
Issue number: internal
---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
Some stylings for the ion-badge when slotted in an ion-button were
missing.

## What is the new behavior?
Updated the styling for the ion-badge when slotted in an ion-button
according to the designs:
- Adjusted badge padding;
- Abandoned the `:has` pseudo-selector for a simple 'button-had-badge'
class;
- Adjusted font-size for icons inside the button;
- Adjusted badge positioning according to button size and badge length.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2025-05-29 16:49:55 +01:00
João Ferreira
8b5215ff03 feat(input): add styles for ionic theme for fill=solid (#30417)
Issue number: Internal

---------

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- add fill solid to ionic theme input;
- move input.outline.scss to input.ionic.scss;
- add fill solid to states page;
- remove highlight styles for ionic theme;
- add tests for ionic solid input;

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
- fill:
https://ionic-framework-git-rou-11889-ionic1.vercel.app/src/components/input/test/fill?ionic:theme=ionic
- states:
https://ionic-framework-git-rou-11889-ionic1.vercel.app/src/components/input/test/states?ionic:theme=ionic

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-05-23 19:10:21 +01:00
João Ferreira
fc4e5ae287 fix(progress-bar, spinner): update colors for ionic theme (#30418)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
The colors were not working on progress bar when the theme was ionic; 
The Spinner with color="medium" should use the contrast variation by
design;

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- Fix Progress-Bar Ionic Colors;
- Change Spinner Medium Color Variation;

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

https://ionic-framework-git-rou-11917-ionic1.vercel.app/src/components/progress-bar/test/basic?ionic:theme=ionic

https://ionic-framework-git-rou-11917-ionic1.vercel.app/src/components/spinner/test/color?ionic:theme=ionic
2025-05-23 17:36:56 +01:00
Giuliana Silva
1877ac5dd1 feat(datetime): fix height when presentation='time' (#30416)
Issue number: resolves #internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
The `datetime` component had a broken display for the `ionic` theme,
because the `height` defined for that component was too small.

![image](https://github.com/user-attachments/assets/9d4c0c0b-8648-4ea9-88f9-9562190d5498)

## What is the new behavior?
The CSS code limiting the `height` was removed. Now, the height is set
automatically.

![image](https://github.com/user-attachments/assets/ad6de967-bba2-47fa-9f12-835e35565c1c)

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-05-21 15:46:30 +01:00
Bernardo Cardoso
f7a2d34305 feat(tokens): create variables fallbacks based on its alias token (#30404)
Issue number:  internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Currently, even if a token used an alias token as its value, when we're
generating the variables we wouldn't respect this connection and were
simply adding the fixed final value.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Now when a token uses an alias token, we keep that relationship by
making sure the alias variable is used as fallback.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2025-05-14 15:21:18 +01:00
Bernardo Cardoso
6a1382fc2c fix(button): ionic theme sizes (#30405)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Adjusted ion-button sizes on Ionic theme to match Figma UI. Now
figma's small | medium | large match ionic's small | default | large.
- Removed xsmall and xlarge sizes, as UX rolled back the decision to
have them.
- Removed xsmall and xlarge tests and their usages.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- [Ionic Theme
Button](https://ionic-framework-git-rou-11903-ionic1.vercel.app/src/components/button/test/theme-ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
2025-05-14 15:08:37 +01:00
Giuliana Silva
7fec492ac7 feat(badge): remove xxsmall, xsmall and xlarge sizes (#30392)
Issue number: resolves internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
The badge presents the `xxsmall`, `xsmall`, and `xlarge`. The user
experience design expects only the `small` and `medium` sizes for badges
with content (number or icon), and `small`, `medium`, and `large` sizes
for empty badges.

## What is the new behavior?
- The badge should support only the sizes mentioned above.
- The `small` and `medium` sizes must be adjusted to the new
requirements for badges with content.
- The size property descriptions must inform that the `large` size is
only available for empty badges.

## Does this introduce a breaking change?

- [x] Yes
- [ ] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-05-07 17:37:07 +01:00
Shane
3b643a75d1 refactor(toolbar): improve slot layout and visibility handling (#30371)
Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
2025-04-30 16:32:41 -07:00
Bernardo Cardoso
b2f6b8c67e fix(link): improve ionic theme links styles and dev experience (#30375)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Adjust link styles to match latest Figma UI and tokens.
- For default link, make it work without the need of adding a class.
- Change `ionic` to `ion` on the class names.
- Adjusted tests to reflect the changes.

## Does this introduce a breaking change?

- [] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- [Ionic
Link](https://ionic-framework-git-rou-11850-ionic1.vercel.app/src/css/test/link/basic?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-04-30 16:22:59 +01:00
Bernardo Cardoso
d3165fc229 fix(modal): fix color tokens on ionic theme (#30379)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Fixed the tokens used on background and text.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- [Ionic Custom
Dialog](https://ionic-framework-git-rou-11900-ionic1.vercel.app/src/components/modal/test/custom-dialog?ionic:theme=ionic)
2025-04-30 14:38:11 +01:00
Bernardo Cardoso
02c138802a fix(tokens): fix usage on components and review scss architecture (#30368)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Added improvements on scss architecture, as identified on past
assessment, on multiple components.

Some of these changes resulted in snapshots differences, all reviewed
and expected:

- Button spinner - pics with no visual differences/false-positive.
- Item slider -  difference due to updated typography token.
- Item - difference as is now using correct disabled styles tokens.
- searchbar: 1px difference on horizontal margin - expected - to start
using a more rounded value from a token.
- Tab/tab-button - difference as is now using correct typography token.
- Spinner/loading - this looks like a false positive, saw no visible
differences.
- Textarea - this looks like a false positive, saw no visible
differences.
- Typography - this looks like a false positive, saw no visible
differences.

## Does this introduce a breaking change?

- [x] Yes
- [ ] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-04-23 18:41:19 +01:00
Bernardo Cardoso
1e7a84f9bd fix(css): improve tokens support on global css ionic files (#30364)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Add tokens usage on global css files for Ionic theme.
- Removed global background an text variables and fixed variables names
used on `body`. This resulted in some changes on test pages colors,
hence the snapshots differences.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-04-16 17:29:58 +01:00
Bernardo Cardoso
7d98a87302 chore(tokens): update design-tokens dependency to 1.2.6 (#30363)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Update tokens dependency to 1.2.6.
This version fixes values of transition tokens.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2025-04-16 12:35:14 +01:00
Bernardo Cardoso
33de8255f4 chore(tokens): update design-tokens dependency to 1.2.5 (#30353)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Update tokens dependency to 1.2.5.
- This version fixes values of some colors, to improve a11y compliance.
- Added new extended colors.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2025-04-14 16:50:39 +01:00
Brandy Smith
07ac3db1ff merge main (#30354) 2025-04-11 16:04:38 -04:00
Brandy Smith
b3917600cc refactor(checkbox): remove unused style 2025-04-11 15:39:40 -04:00
Brandy Smith
56be987881 Merge branch 'main' into merge-main-into-next 2025-04-11 15:33:29 -04:00
Brandy Smith
5da939d330 fix(button): use proper colors for the button states in the ionic theme (#30339)
Issue number: internal

---------

## What is the current behavior?
The focused and hover states are appearing as an overlay of the contrast
color on the buttons.

## What is the new behavior?
- Updates hover and focus states to match Figma designs
- Focus background should not change from the default
- Hover background should be the shade for solid buttons, and use
neutral subtlest for clear and outline buttons
- Updates the clear button to use the new `foreground` variant

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2025-04-11 14:15:14 -04:00
Brandy Smith
2a1addc190 feat(toast): add hue property for the ionic theme (#30333)
Issue number: internal

---------

## What is the current behavior?
The toast component does not support the `hue` property.

## What is the new behavior?
Adds support for the `subtle` hue for the toast. Defaults to `subtle`.

## Does this introduce a breaking change?
- [ ] Yes
- [x] No
2025-04-11 13:52:38 -04:00
Brandy Smith
52fba11db5 feat(item-option): add hue property for the ionic theme (#30332)
Issue number: internal

---------

## What is the current behavior?
The item option component does not support the `hue` property.

## What is the new behavior?
Adds support for the `subtle` hue for the item option. Defaults to
`subtle`.

## Does this introduce a breaking change?
- [ ] Yes
- [x] No
2025-04-11 13:39:14 -04:00
Brandy Smith
b31e0efcbf feat(chip): add hue property for the ionic theme (#30308)
Issue number: internal

---------

## What is the current behavior?
The chip component does not support the `hue` property.

## What is the new behavior?
Adds support for the `bold` and `subtle` hue for the chip. Defaults to
`subtle`.

## Does this introduce a breaking change?
- [ ] Yes
- [x] No
2025-04-11 13:19:32 -04:00
Brandy Smith
a9aa59bc36 feat(badge): add hue property for the ionic theme (#30307)
Issue number: internal

---------

## What is the current behavior?
The badge component does not support the `hue` property.

## What is the new behavior?
Adds support for the `subtle` hue for the badge. Defaults to `subtle`
when the badge contains icon or text. Defaults to `bold` when the badge
is empty or when it is inside of a button or tab button.

## Does this introduce a breaking change?
- [ ] Yes
- [x] No
2025-04-11 13:07:01 -04:00
Brandy Smith
207d4858a6 feat(css): add support for the subtle color map (#30306)
Issue number: internal

---------

## What is the current behavior?
The colors are only available in bold colors.

## What is the new behavior?
Adds support for a `subtle` hue to the colors map, generating all of the
same variants but in more subtle colors. This only applies for the
`ionic` theme. Adds an additional variant, `foreground` to be used by
components when the color is being used for text.

The `ios` and `md` themes do not add the `foreground` variant because
this would be a breaking change, requiring all color overrides,
palettes, and new colors to include this variant. I have added tests to
make sure they still work without it.

## Does this introduce a breaking change?
- [ ] Yes
- [x] No

No changes are made to the existing colors.
2025-04-11 12:32:38 -04:00
Marta Carlos
97f96b4528 fix(input): apply position to .cloned-input only for native themes (#30337)
Issue number: resolves internal

---------

## What is the current behavior?
Using the ionic theme, `ion-input` inside an `ion-accordion` , that
require a scroll to focus, when clicked , it's text would shift

![Screenshot 2025-04-04 at 12 32
22](https://github.com/user-attachments/assets/94152b22-4dcf-47bc-a911-03b4270e6f9f)

After some troubleshooting, we identified this visual bug came from
logic of `addClone`, which creates a clone of the input , in order for
it to be focusable and working on iOS/Android (code
[here](4317da080c/core/src/utils/input-shims/hacks/common.ts (L34))
)

The cloned input has an additional class, `cloned-input` and, for the
ionic theme, the `@position` mixin was causing the cloned input
`inset-inline-start` to be 0, which meant it was not being placed
_exactly_ on top of the "OG" input
 
## What is the new behavior?
There's no longer a visual bug on inputs inside accordions, when using
the ionic theme

To fix it, we split the `cloned-input` class between the `input.native`
and `input.common` scss files, where the `@position` mixin is only used
in `input.native`

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

## Other information

- Bug reproduction
[here](https://github.com/OutSystems/ui-comp-ionic-sandboxes/tree/ROU-11748-bug)
- With this fix
[here](https://github.com/OutSystems/ui-comp-ionic-sandboxes/tree/ROU-11748)
2025-04-07 15:37:41 +01:00
Bernardo Cardoso
9016cc6f06 chore(tokens): update design-tokens dependency to 1.2.4 (#30338)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Update tokens dependency to 1.2.4.
- This version fixes the semantic warning tokens values.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2025-04-04 16:32:11 +01:00
Bernardo Cardoso
54597a312c chore(tokens): update design-tokens dependency to 1.2.3 (#30327)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Update tokens dependency to 1.2.3.
- This version fixes the generation of the z-index tokens.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2025-04-02 09:59:01 +01:00
Pedro Lourenço
8c4bf8bb47 feat(button): add support for badge (#30303)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
The ion-badge is not currently supported when inside the ion-button.

## What is the new behavior?
- The experience of the ion-badge inside the ion-button has been
implemented according to our designs.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: José Rio <jose.rio@hotmail.com>
2025-03-31 16:37:05 +01:00
Marta Carlos
69340bff5a fix(divider): remove safe areas from horizontal padding (#30311)
Issue number: internal

---------
## What is the current behavior?
The horizontal padding of the divider component was being calculated
taking into account safe areas.
However, since this component can be placed inside other components that
already take these areas into account, this is not necessary.

## What is the new behavior?
- Removes the safe areas

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Confirmed with design: the new divider component’s main use case is to
be used inside ion-content (or one of it’s children). As such, the
responsibility of taking into account safe areas will fall on the
developer (as it’s already stated in the
[documentation](https://ionicframework.com/docs/api/content#safe-area-padding)).
This means, the divider component itself will not account for the safe
areas for its' specific padding.

The default spacing also changed from `xxsmall` to `medium`
2025-03-31 13:35:28 +01:00
Bernardo Cardoso
8855618037 feat(badge): add support for number and icons with vertical prop (#30305)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
Currently the vertical prop only works for empty badges.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added styles for badge with numbers or icons to be used as hint
(vertical prop)
- Added new tests for these scenarios and updated snapshots.
- Added best effort styles for ios/md to look decent (not on the scope
of this task and no UI from figma).

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Badge Ionic
Hint](https://ionic-framework-git-rou-11750-ionic1.vercel.app/src/components/badge/test/hint?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2025-03-28 17:16:17 +00:00
Bernardo Cardoso
8f05689f95 chore(tokens): update design-tokens dependency to 1.2.2 (#30319)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Update tokens dependency to 1.2.2.
- Update generated tokens.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2025-03-28 14:56:58 +00:00
Brandy Smith
b57d432675 fix(textarea): use proper design for helper and error text (#30283)
- Updates the common and native stylesheets to separate the bottom content styles
- Fixes an improperly updated counter text color for native
- Adds missing styles for valid/invalid states and screenshot tests for the highlight

---------

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
2025-03-25 11:42:23 -04:00
Brandy Smith
1865e50d7a feat(toggle): add helper and error text to the ionic theme (#30281)
- Adds design for helper and error text to the toggle for the ionic theme
- Updates tests to add screenshots for ionic theme

---------

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
2025-03-25 11:17:14 -04:00
Brandy Smith
7f24ba006f feat(select): add helper and error text to the ionic theme (#30280)
- Adds design for helper and error text to the select for the ionic
theme.
- Updates tests to add screenshots for ionic theme

---------

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
2025-03-25 11:02:38 -04:00
Brandy Smith
7f23c60ffd fix(input): remove css variable and update helper text to use valid highlight in ionic theme (#30272)
- Splits the common and native stylesheets
- Removes the `--text-color-invalid` variable so the customization
across components and themes for helper & error text is consistent.
- Sets the color of the helper text when valid to
`--highlight-color-valid` to ensure customization works the same as
invalid

---------

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
2025-03-25 10:46:25 -04:00
Brandy Smith
f0516e6569 feat(checkbox): add helper and error text to the ionic theme (#30278)
- Adds the common stylesheet for the shared styles
- Adds design for helper and error text to the checkbox for the ionic
theme.
- Updates tests to add screenshots for ionic theme

---------

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
2025-03-25 10:17:46 -04:00
Brandy Smith
e24fcf530a feat(radio-group): add helper and error text to the ionic theme (#30271)
- Adds the common stylesheet for the shared styles
- Adds design for helper and error text to the radio group for the ionic
theme.
- Updates tests to add screenshots for ionic theme

---------

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
2025-03-25 10:05:14 -04:00
Marta Carlos
c37eaabae9 feat(divider): add new ion-divider component (#30270)
Issue number: internal
---------

## What is the new behavior?
- Introduces a new component, `ion-divider` which has two props,
`spacing` and `inset`.
- Adds e2e tests to both `spacing` and `inset` props

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information
- As discussed with the PO, using this new component inside an
`ion-item` is out of scope , for now.

---------

Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
Co-authored-by: Gonçalo M. <goncalo.martins@outsystems.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2025-03-25 09:04:19 +00:00
João Ferreira
02c9d64ca5 feat(avatar): add disabled property (#30284)
Issue number: internal

---------

## What is the current behavior?
Avatar does not have a disabled state for the ionic theme.

## What is the new behavior?
- Added styles for ionic theme disabled state
- Added states e2e test & snapshots

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Preview](https://ionic-framework-git-rou-11728-ionic1.vercel.app/src/components/avatar/test/states?ionic:theme=ionic)

---------

Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2025-03-24 09:57:54 +00:00
José Rio
c5fb051be3 feat(tab-button): support new badge hint features (#30246)
Issue number: internal

## What is the current behavior?
- tab-button with badge only supports status badges (small circle with
specific color), missing cases with text or icon.

## What is the new behavior?
- Added css on tab-button to support new badge hint functionalities such
text and icon
- Added css on badge to support the existence of a icon inside it
- Added support on ionic theme for different position (top and button)
- Added badge test case for this use case
- There's no figma for md/iOS implementation, so just added for now a
best effort on how it looks.

**Theme md:**
<img width="418" alt="md"
src="https://github.com/user-attachments/assets/0281b616-12aa-4107-bf4c-e8fdbe72d7d3"
/>


**Theme iOS:**
<img width="417" alt="ios"
src="https://github.com/user-attachments/assets/6102d874-b608-4527-91fb-4ed8b7e536a0"
/>


**Theme ionic:**
<img width="418" alt="ionic"
src="https://github.com/user-attachments/assets/10f59d57-0c30-4f04-bbe8-de625b93eb46"
/>


### Notes:
- All the styles added are based on the [vertical] attribute in order to
prevent breaking changes and only affect the badge hint with the new
features implemented.
- Also top and bottom position under the context of md/iOS themes are
not exactly the same as ionic theme due the usage of an
`overflow:hidden;` attribute at the `.button-native` context. This
`overflow:hidden;` attribute has been overwritten to `overflow:visible;`
for ionic theme.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information


[Sample](https://ionic-framework-git-rou-11666-ionic1.vercel.app/src/components/badge/test/hint)
2025-03-21 17:44:29 +00:00
Marta Carlos
a7233c296a fix(input): remove z-index target-area for ionic theme (#30261)
Issue number: internal
---------

## What is the current behavior?
Currently, operations associated with gestures aren’t working, for the
ionic theme:
- can’t select the text using double tap
- can’t longpress
- can’t move the cursor to any positions

## What is the new behavior?
- It's now possible to select text using double tap, long press and move
the cursor to different positions
- Adds new tests for double clicks

| Before | Now |
|--------|-----|

|![prev](https://github.com/user-attachments/assets/c1c54710-e534-44bf-9ef9-6ddc990996d9)
|
![now](https://github.com/user-attachments/assets/b10b8696-e0bb-4e99-9d3d-fe5a92d384e8)
|

## Does this introduce a breaking change?
- [ ] Yes
- [x] No

## Notes
Currently, the double click text selection is not working (the text
isn't selected) on the automated tests for:
- ionic theme, on firefox and safari
- md/ios themes, on firefox

as manual tests do not have this problem, we'll be skipping these tests
for now and come back to them at a later date

---------

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2025-03-21 16:11:56 +00:00
Brandy Smith
40932d7b2d chore(): sync main into next (#30277) 2025-03-19 17:15:24 -04:00
Brandy Smith
7713cbe5b5 Merge branch 'main' into chore/sync-main 2025-03-19 16:58:48 -04:00
Brandy Smith
a0fa3b3bdb chore(git): merge main into next (#30269) 2025-03-19 11:35:28 -04:00
ionitron
a7a36fb3a2 chore(): add updated snapshots 2025-03-19 15:00:35 +00:00
Brandy Smith
5dae2dc1dc Merge branch 'next' into chore-merge-main-into-next 2025-03-19 10:47:25 -04:00
Pedro Lourenço
723868df9e refactor(searchbar): update according to design (#30245)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
The searchbar component does not currently match our UX designs for the
ionic theme.

## What is the new behavior?
Updated the searchbar so that it does:
- Adjusted the searchbar input paddings when no leading or trailing
icons are rendered;
- Added an ellipsis text overflow to the searchbar input;
- Updated the background, text and icon colors so that they are reactive
to state changes like having inserted text and being disabled (some
design tokens are still TBD);
- The clear button is now hidden when the searchbar is disabled.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2025-03-19 12:57:08 +00:00
ionitron
e6c131876d chore(): add updated snapshots 2025-03-18 22:36:17 +00:00
Brandy Smith
36fb7ee073 chore: generate vue overlays 2025-03-18 18:16:08 -04:00
Brandy Smith
e0f3008c5c chore(): add updated snapshots 2025-03-18 18:09:44 -04:00
Brandy Smith
5cd85049e0 refactor(): fix incorrect merges 2025-03-18 18:08:51 -04:00
Brandy Smith
b8b5984150 Merge branch 'main' into chore-merge-main-into-next 2025-03-18 18:05:14 -04:00
Bernardo Cardoso
355af73288 chore(tokens): update design-tokens dependency to 1.2.1 (#30260)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Update tokens dependency to 1.2.1.
- Update generated tokens.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2025-03-17 15:46:09 +00:00
Marta Carlos
aa5d109fb1 feat(button): add spinner sizes for ionic theme (#30233) 2025-03-11 16:56:20 +00:00
Maria Hutt
ab81f3de7e feat(searchbar): add sizes for ionic theme (#30211) 2025-03-04 11:23:38 -08:00
Bernardo Cardoso
715cc06c5f refactor(avatar): remove usage of :not() (#30229)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Remove usage of :not() for the badge ionic sizes.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->
2025-03-03 21:04:58 +00:00
Bernardo Cardoso
517d5b99b2 feat(badge): add support for hint feature (#30213)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added new position prop.
- Based on the prop, a new badge-position css class is added on the
host.
- Removed css rule that prevented the badge to be rendered when empty.
- Added common and themes styles to support the position prop and new
scale size (on ios/md defaults to min-width variable, as size is not yet
supported on native themes).
- Added new tests specific for this new feature and added new
screenshots.
- Support to properly work inside Avatar, Button and TabButton will be
added on different tasks (in the meantime the snapshots will appear
wrong for these use-cases)

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- [Ionic Theme
Sample](https://ionic-framework-6n0cn175k-ionic1.vercel.app/src/components/badge/test/hint?ionic:theme=ionic)
- [MD Theme
Sample](https://ionic-framework-6n0cn175k-ionic1.vercel.app/src/components/badge/test/hint?ionic:theme=md)
- [iOS Theme
Sample](https://ionic-framework-6n0cn175k-ionic1.vercel.app/src/components/badge/test/hint?ionic:theme=ios)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Marta Carlos <101343976+OS-martacarlos@users.noreply.github.com>
Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
2025-03-03 18:15:27 +00:00
Maria Hutt
5eab76c0f3 fix(focusVisibleElement): set focus on custom appRootSelector (#30218) 2025-02-27 10:47:26 -08:00
Maria Hutt
fc552ad89f feat(searchbar): add shapes for ionic theme (#30210) 2025-02-25 10:28:18 -08:00
Marta Carlos
a31495091f feat(badge): add icon sizes for ionic theme (#30203)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
Icons inside badges don't have any specific styling.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
According to the design, for the ionic theme, the size of icons inside
badges have specific values. To accommodate those:
- Added new rules for the badge sizes
- Adding a new testing page and screenshot tests

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
2025-02-25 15:56:35 +00:00
Pedro Lourenço
d73faf5962 fix(backdrop): remove blur effect for ionic theme (#30208)
Issue number internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
On the Ionic theme, ion-backdrop has a blur effect whenever it is
visible or hidden.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
On the Ionic theme, ion-backdrop no longer has a blur effect regardless
of its state.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2025-02-24 19:16:17 +00:00
Bernardo Cardoso
f6ce0230d9 chore(deps): update outsystems-design-tokens dependency (#30198)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Update to outsystems-design-tokens 1.2.0.
- Generate variables and utility-classes with updated tokens values. 
- Updated screenshots, after UX/UI review:
  - updated ionic color tokens on links.
  - updated segment label size token to sm.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-02-20 18:19:01 +00:00
João Ferreira
061712318c fix(textarea): update disabled and readonly to match ionic theme (#30187)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
- There was a misalignment between the disabled and readonly state
textarea with the desired designed UX.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- update textarea css vars;
- add styles for disabled textarea;
- add styles for readonly textarea;

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
[textarea
preview](https://ionic-framework-git-rou-11586-ionic1.vercel.app/src/components/textarea/test/basic?ionic:theme=ionic)

---------

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2025-02-13 19:19:35 +00:00
Pedro Lourenço
ae78967b3c feat(progress-bar): add styling for the ionic theme (#30185)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
ion-progress-bar does not currently have any custom styling for the
ionic theme.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
According to the design, the following styling changes were made:
- Added a new shape prop which controls the shape of the progress bar
- Changed the color of the unfilled part of the progress bar and the bar
height to design token values
- Adding a new testing page and screenshot tests

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2025-02-13 16:06:59 +00:00
Bernardo Cardoso
7be7c08cb0 feat(css): add new utility-classes (#30186)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Added new utility-classes related to:
- flex
- position
- size

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2025-02-12 16:14:05 +00:00
Giuliana Silva
839969e3b5 feat(datetime): update weekdays abbreviation for ionic theme (#30172)
Issue number: resolves internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
- Previously for Ionic theme, the weekdays in `ion-datetime` were
displayed in the "narrow" version, such as "M" or "T".

## What is the new behavior?
- Now, the weekdays are displayed in the "short" version: "Mon", "Tue",
etc.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

Before:

![image](https://github.com/user-attachments/assets/f2939274-369c-45c8-86e6-36dabc0cd510)

After:

![image](https://github.com/user-attachments/assets/8dca06e1-bc99-4d78-af79-bef2e5ea3fed)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-01-31 16:17:37 +00:00
João Ferreira
94d28eaafc fix(input): update label padding to align with the outline input in ionic theme (#30152)
Issue number: internal

---------

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
There were a misalignment between the labels' input and the labels'
Textarea.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Updates label text padding to match textarea structure 
- Updates helper and counter text padding to match textarea structure 
- Updates e2e tests snapshots to include changes

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
[input
preview](https://ionic-framework-git-rou-11544-ionic1.vercel.app/src/components/input/test/bottom-content?ionic:theme=ionic)
[textarea
preview](https://ionic-framework-git-rou-11544-ionic1.vercel.app/src/components/textarea/test/basic?ionic:theme=ionic)

---------

Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
2025-01-31 10:25:48 +00:00
Pedro Lourenço
b3e869ef9e test(tab-bar): add snapshot for box shadow (#30134)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
This PR is a follow-up of this one:
https://github.com/ionic-team/ionic-framework/pull/30117

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- This PR adds a snapshot test and modifies the existing one in order to
test the change done in the previous PR.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: Maria Hutt <maria@ionic.io>
2025-01-17 16:06:38 +00:00
Pedro Lourenço
fe0b32ff36 fix(segment-button): protect connectedCallback for when segment-content has not yet been created (#30133)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
When the `connectedCallback` method is called for a segment-button and
its corresponding segment-content has not been created in that instant,
a console error is thrown and the method returns.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- `connectedCallback` will now wait, at most 1 second, for the
corresponding segment-content to be created.
- The new behaviour can be tested in segment-view/basic.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2025-01-16 16:04:56 +00:00
Pedro Lourenço
b0c5555561 feat(tab-bar): make box shadow independent of expand mode (#30117)
Issue number: internal
---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
When the tab bar's expand mode is 'full' on the ionic theme, it does not
have a box shadow to separate it from the rest of the page.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- The tab bar on the ionic theme now has a box shadow independently of
its expand mode.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2025-01-13 18:55:03 +00:00
Brandy Smith
8234064d6b chore(git): update next from main (#30127) 2025-01-09 10:00:27 -05:00
Brandy Carney
6fa6549535 Merge branch 'main' into chore-next-update-from-main 2025-01-09 09:45:28 -05:00
João Ferreira
3f00e696ca fix(select): ensure select sizes are respected when the label is empty (#30087)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
Currently, the experience planned for ionic select has the sizes fixed
and should be respected even when the labels are not presented.
https://stackblitz.com/edit/ku3fqz?file=src%2Fmain.tsx

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- When select is used with Ionic-theme, the select should respect the
height sizes established.
-
https://stackblitz.com/edit/ku3fqz-2vnasdmx?file=package-lock.json,package.json
-
https://ionic-framework-cdtf7hsqy-ionic1.vercel.app/src/components/select/test/size?ionic:theme=ionic

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: Maria Hutt <maria@ionic.io>
2024-12-20 17:05:08 +00:00
Bernardo Cardoso
b7da1e8b68 feat(select): add focus on tab (#30076)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added focus styles on tab for the ion-select, using the --highlight
variable.
- Adjusted highlight tests to work for ionic as well, just for the
outline type.
- Fixed select border-color token used and updated snapshots (this
affected all ionic theme snapshots for select). Although not directly
related to focus task, the incorrect color was making it very hard to
see the differences between the focus colors.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- [Select
focus](https://ionic-framework-git-rou-11445-select-ionic1.vercel.app/src/components/select/test/highlight?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2024-12-17 17:10:57 +00:00
Bernardo Cardoso
30913907fc feat(range): add focus styles to range (#30077)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Add focus styles to ion-range when using Ionic theme.
- Add new focus test for ionic theme.
- Add new snapshots.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- [Range ionic
focus](https://ionic-framework-asncg3yot-ionic1.vercel.app/src/components/range/test/states?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2024-12-13 16:54:38 +00:00
Bernardo Cardoso
8f6f8b4187 chore(deps): update dependency @outsystems-design-tokens to v1.1.2 (#30080)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Update dependency to outsystems-design-tokens to 1.1.2. This brings
changes on the value of some color tokens.
- Generated scss variables from updated tokens

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->
2024-12-12 19:13:53 +00:00
Bernardo Cardoso
4a6bcab7bf feat(segment): add missing focus state on segment for Ionic theme (#30074)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

This is part of a bigger task to add focus styles on all components that
need them on Ionic Theme. A separate PR will be done for each component.

- Added new focus styles for segment on Ionic theme.
- Added new state test and snapshots.
- UI is slightly different from Figma, but t was discussed and aligned
with UX/UI.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- [Ionic Segment
Focus](https://ionic-framework-ixz97yf70-ionic1.vercel.app/src/components/segment/test/a11y?ionic:theme=ionic)
2024-12-12 18:36:50 +00:00
Bernardo Cardoso
fec23e80cc feat(checkbox): add checkbox missing focus on tab (#30075)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added ion-focusable class to ion-checkbox
- Replaced ionic focus styles for focus mixin

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- [Ionic states
sample](https://ionic-framework-my9hzgra2-ionic1.vercel.app/src/components/checkbox/test/states?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-12-12 08:57:59 +00:00
Bernardo Cardoso
85e12dd624 fix(tokens): fixed border generated utilityclasses (#30067)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Now the different border tokens will generate the utility-classes with
the expected CSS attribute for each one!

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-12-10 08:58:48 +00:00
Bernardo Cardoso
805b75a6eb feat(textarea): added highlight and focus styles to ionic theme (#30062)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Fixed highlight validation to include ionic theme
- Added styles on ionic scss partial for focus and highlight
- Added focus state test to textarea

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- Textarea [basic
sample](https://ionic-framework-git-rou-11444-ionic1.vercel.app/src/components/textarea/test/basic?ionic:theme=ionic)
2024-12-09 09:54:29 +00:00
Bernardo Cardoso
826e7e229a feat(tokens): added gap utility-classes (#30063)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added generation of gao utility-classes on the context of the padding
and margin ones.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->
2024-12-09 09:41:17 +00:00
Pedro Lourenço
861b4bfdca feat(tab-button): add the shape property and styles for the ionic theme (#30057)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
Tab button does not have a shape property.


## What is the new behavior?
- Adds support for the shape property in tab button.
- Adds styles for the "soft", "round" and "rectangular" shapes in the
ionic theme
- Defaults the shape to "round" for the ionic theme
- Adds an e2e test for shape with screenshots of all shapes


## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-12-06 11:44:58 +00:00
Maria Hutt
e16c633575 fix(list-header): match background with designs (#30058) 2024-12-03 08:09:35 -08:00
Bernardo Cardoso
f6e041622d fix(input): change focus token used on ionic theme (#30053)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?

- Changed input focus token.
- Replaced some hard values with equivalent token.
- Updated snapshots.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- [Input Ionic
Theme](https://ionic-framework-dprip7ii9-ionic1.vercel.app/src/components/input/test/basic?ionic:theme=ionic)
2024-12-02 19:26:07 +00:00
Bernardo Cardoso
4782a1a5ec feat(css): add new display classes (#30055)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Add new display-contents and display-flex classes.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->
2024-12-02 19:12:16 +00:00
Bernardo Cardoso
60f9e16435 fix(toolbar): updated toolbar token on ionic theme (#30054)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
- Updated toolbar font-size to use new tokens.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- [Toolbar Ionic
Theme](https://ionic-framework-3vljb9d5n-ionic1.vercel.app/src/components/toolbar/test/theme-ionic)
2024-12-02 18:57:59 +00:00
Brandy Carney
1e33a57849 chore(git): update next from main (#30050) 2024-11-27 14:58:50 -05:00
Brandy Carney
b0a2544c15 Merge branch 'main' into chore-update-from-main 2024-11-27 14:13:31 -05:00
Bernardo Cardoso
2f538b3ecb fix(avatar): remove avatar border on ionic theme (#30045)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?

- Removed avatar border with ionic theme, to align with UX/UI design.
- Updated snapshots

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Avatar Ionic
Sample](https://ionic-framework-nimqjtxw7-ionic1.vercel.app/src/components/avatar/test/shape?ionic:theme=ionic)
2024-11-27 16:35:54 +00:00
Maria Hutt
26db1210c1 fix(toast): add initial opacity based on mode (#30042) 2024-11-26 10:47:49 -08:00
Brandy Carney
ff93af7e00 fix(accordion): move styles to inner element to use proper animation (#30032)
Moves the padding to the inner content element so the `offsetHeight` will be calculated properly and the animation will be smooth.
2024-11-22 13:55:18 -05:00
Maria Hutt
5bf48cb57a feat(select): add sizes for ionic theme (#30018)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-11-15 10:52:41 -08:00
Maria Hutt
bc3d30c3d2 feat(select): add shapes for ionic theme (#30016) 2024-11-14 13:26:59 -08:00
Maria Hutt
c3a804dc75 refactor(datetime): update ionic styles for footer buttons (#30014) 2024-11-14 10:53:56 -08:00
Maria Hutt
a1f3fcc23b feat(select-modal): add ionic theme styling (#30007) 2024-11-08 13:51:32 -08:00
Maria Hutt
9e3062963f feat(select): add ionic theme styles (#29989) 2024-11-07 13:33:12 -08:00
José Rio
1b6f07dfb8 fix(segment-view): add missing ionic theme fallback to the segment-view (#30002)
## What is the current behavior?
Segment view does not contains styling once at ionic theme.

## What is the new behavior?
Same default style as md should be added.

## Does this introduce a breaking change?

- [ ] Yes
- [X] No
2024-11-06 16:07:37 +00:00
Pedro Lourenço
c1128dd9a1 feat(range): updating the range pin to always be visible when enabled for ionic theme (#29988)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
The ion-range pin is only shown we the range is being dragged for all
themes.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- This PR updates the range pin so that it is alway visible when it is
enabled for the ionic theme.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-11-05 15:42:42 +00:00
Pedro Lourenço
175dc929a5 feat(range): adding custom styling for ionic theme (#29979)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
No ionic theme custom implementation existed for the ion-range
component.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- Added ionic theme specific styling (based on the ios styling) for the
range according to UX requirements.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information
<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

![image](https://github.com/user-attachments/assets/1b78cba4-0f0f-45d4-abdc-d48cdb917ea2)
2024-11-05 13:03:11 +00:00
Tanner Reits
b046f37d17 Rebase next after 8.4 release (#29997)
Rebase next after v8.4.0 release
2024-11-04 17:53:52 -05:00
Tanner Reits
207743d60e Merge branch 'main' into rebase-next-after-8.4-release 2024-11-04 17:33:10 -05:00
Brandy Carney
0fbc2b27f7 refactor(many): remove *.ionic.vars files (#29983)
- Removes the `*.ionic.vars.scss` files for item, list and input and uses the design tokens directly
- Removes the `tab-bar.ionic.vars.scss` file and moves the variables to the default ionic theme file since this uses global css variables
2024-11-01 11:26:21 -04:00
Brandy Carney
ca091e2773 refactor(scss): properly prefix string imports (#29987) 2024-10-31 14:16:52 -04:00
Brandy Carney
d4ff124737 feat(accordion): add shape styles for the ionic theme (#29973)
- Applies border radius based on the `shape` defined on the parent accordion group
- Adds an e2e test for shape with focused items to show the border radius
- Adds screenshots for the e2e test
2024-10-31 11:35:35 -04:00
Brandy Carney
4f61e0170d chore(git): update next from main (#29986) 2024-10-31 11:18:02 -04:00
Brandy Carney
13293a026b Merge branch 'main' into chore-update-next-main 2024-10-31 10:46:55 -04:00
Brandy Carney
51cb77729a chore(git): update next from main (#29982) 2024-10-30 14:07:59 -04:00
ionitron
379587d47c chore(): add updated snapshots 2024-10-30 17:17:11 +00:00
Brandy Carney
8d2d176fd6 Merge branch 'main' into chore-update-next-from-main 2024-10-30 12:58:29 -04:00
Tanner Reits
4ddc053e99 fix(theme): fix rtl mixin for ionic theme (#29977)
Issue number: resolves internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Unable to use the `rtl` mixin from the ionic theme global import:

```scss
@use "../../themes/ionic/ionic.globals.scss" as globals;

:host {
  @include globals.rtl() {
    ...
  }
}
```

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Allows the `rtl` mixin to be accessed from the global sass import

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-10-30 12:23:23 -04:00
Brandy Carney
a2bf1bb0c2 feat(accordion-group): add the shape property and styles for the ionic theme (#29971)
- Adds support for the `shape` property in accordion group.
- Adds styles for the `"soft"`, `"round"` and `"rectangular"` shapes in the `ionic` theme
- Defaults the shape to `"round"` for the ionic theme
- Adds an e2e test for `shape` with screenshots of all shapes
- Renames the `accordion.e2e.ts` files in other tests to `accordion-group.e2e.ts` which also renames the screenshot folder
2024-10-30 10:37:33 -04:00
Brandy Carney
3306d717ef feat(css): add CSS utility classes to the ionic theme bundle to match other themes (#29974)
The default (iOS/MD) bundle is removed from the tests for the `ionic` theme because it adds global component styles that the `ionic` theme does not need. The missing utility files are imported, and padding/margin classes are generated from the design tokens, as many tests rely on `ion-padding` and `ion-text-center` being available. This change ensures the `ionic` theme includes the same classes offered in our documentation: https://ionicframework.com/docs/layout/css-utilities.
2024-10-30 09:48:32 -04:00
Bernardo Cardoso
a5a7bee25c feat(tokens): update tokens architecture and usage (#29950)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Removed old tokens stored on foundations folder. Now the jsons with
the tokens come from the new dependency:
https://github.com/OutSystems/outsystems-design-tokens.
- The tokens from UX Team completely changed the structure and in some
cases the values. Everything was replaced on the project to use the new
tokens.
- Snapshots updated and differences reviewed with UX Team. A fix was
done on the testing css, to make sure the correct _Inter_ font-family
was actually used. This resulted in some differences on the text for
some componentes, that had snapshots with the native fonts.
- Removed generation of scss file on tokens script, that contained the
:root selector with the custom CSS properties, as they were not used on
the Ionic context.
- Removed generation of html file with tokens preview, as there wasn't a
great value on this (we have storybook on other contexts) and it allowed
to reduce a lot of code and complexity from the tokens script.
- The token command was adapted to use the command available from the
https://github.com/OutSystems/outsystems-design-tokens package, using
the `--config` prop, where we pass the path to our Ionic token script,
where we generate the needed scss variables and utility-classes (by
default the tokens repo tries to be as agnostic as possible, and only
generates the css variables, without the prefix and added details we
need on the Ionic side).
- Removed the token command from the npm run build, as it unnecessarily
added time on that command to run. Besides, it should not be common that
we need to run this command in the future.
- Updated reference to latest version of [Style Dictionary
4.1.3](https://v4.styledictionary.com/version-4/statement/). Version 4
comes with a lot of improvements, but also breaking-changes, so it was
needed to adapt the tokens script. The code on the script is also now
cleaner.
- Changed prefix from ionic to ion. The term ionic was used initially,
to help differentiate from the old ios/md stuff, but I feel with the
current scss architecture, that is no longer needed, and we can use the
same prefix across themes.

This requires to run `npm install ` again.

## Does this introduce a breaking change?

- [x] Yes
- [ ] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2024-10-28 18:17:48 +00:00
Tanner Reits
4d81c8f55f fix(modal): set correct backdrop opacity for ionic theme (#29960)
Issue number: resolves internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

The backdrop opacity is incorrectly set to 0.7

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Sets backdrop opacity to 1

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->


[Preview](https://ionic-framework-pkqwthhvj-ionic1.vercel.app/src/components/modal/test/sheet?ionic:theme=ionic)
2024-10-22 16:30:17 -04:00
Pedro Lourenço
bdb7cd6a21 fix(modal): fix enter animation when the initial breakpoint value is less than the backdrop breakpoint (#29955)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
This PR aims to fix an issue introduced in
https://github.com/ionic-team/ionic-framework/pull/29932 where the enter
animation for ionic theme was in a broken state when the modal's initial
breakpoint value was lesser than the specified backdrop breakpoint.

## What is the new behavior?
- The erroneous behaviour happened because the shouldShowBackdrop
constant had a false value which was being taken into consideration when
computing the backdrop opacity for the ionic theme. This PR fixes this
by always transitioning the backdrop opacity from 0 to 0.7 once the
modal appears, independently of the initial, current or activation
breakpoint.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-10-22 16:03:11 +01:00
Brandy Carney
2d2b081f19 Merge branch 'main' into next (#29957) 2024-10-21 16:38:57 -04:00
Brandy Carney
0eb1c7a81c Merge branch 'main' into chore-update-next-main 2024-10-21 16:13:40 -04:00
Pedro Lourenço
0b18b6e3d2 feat(modal): add static backdrop behaviour when using ionic theme (#29932)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
The modal's backdrop opacity changes dynamically according to the
current breakpoint, independently of what theme is being used.

## What is the new behavior?
- The modal's backdrop opacity is now static once it has finished
entering the screen and while dragging the modal's handle.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-10-18 19:36:27 +01:00
Pedro Lourenço
d8bdf398fc feat(toast): implement new shapes (#29936)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
The shape of the toast component could not be customized.

## What is the new behavior?
- I have introduced a new shape property which determines whether the
toast widget has soft, round or rectangular corners.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-10-18 18:26:08 +01:00
Tanner Reits
15d6104c6f feat(app): move ion-app init logic to initialize function (#29930)
Issue number: resolves internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Some app functionality (like focus management, keyboard utils, and
shimming) are tied to the `ion-app` which requires all Ionic
applications to have a root `ion-app` element.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

`ion-app` specific init functionality is moved to the global
`initialize` function

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

Although it is not expected that this introduces a breaking change,
these changes were introduced on the `next` branch as a precaution.

## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

NOTE: This is **NOT** a recommended pattern for Ionic applications and
was created for a specific internal use case

---------

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-10-16 15:15:54 -04:00
Brandy Carney
5d4a9893ef feat(accordion): add default styles for ionic theme (#29933)
- Updates Accordion to use the Ionic theme styles defined in Figma
- Adds an e2e test to the basic test to check for text content in the `content` slot
- Adds the `ionic` theme to the `multiple` e2e test
- Adds an e2e test for `states` which screenshots disabled, activated & focused
- Updates Item to accommodate the Accordion styles
- Updates the global core scss file to override the Toggle Icon and Items in an Accordion
2024-10-16 12:25:34 -04:00
Brandy Carney
f4766c6738 feat(accordion-group): add default styles for the ionic theme (#29938)
Adds the following:
- An ionic theme file with styles for the Accordion Group
- An e2e test for the `expand` property with screenshots of the default (compact) expand and `"inset"`
- An e2e test for states with screenshots of a disabled Accordion Group
2024-10-16 11:56:18 -04:00
João Ferreira
85ec5f7b2c fix(SafeAreas): fix iOS fallback (#29941)
Issue number: internal

---------
- fix ion-statusbar css var fallback;


## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
- CSS var --ion-statusbar-padding was not working because the Sass
variable was not escaped.


## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->
2024-10-16 11:59:58 +01:00
Maria Hutt
ab61c122e4 refactor(searchbar): update default styles for ionic theme (#29917)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-10-04 16:43:32 -07:00
Maria Hutt
c295a089c2 feat(toast): add the default styles for ionic theme (#29922) 2024-10-04 12:53:57 -07:00
Brandy Carney
61876a5250 feat(segment): add default styles for ionic theme (#29897)
Issue number: internal

---------

## What is the current behavior?
The segment component does not have styles for the `"ionic"` theme and
uses `"md"` styles.

## What is the new behavior?
- Adds styles for both `<ion-segment>` and `<ion-segment-button>` styles
for the `"ionic"` theme
- Adds screenshot tests for the different icon layouts

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-10-02 13:04:31 -04:00
Maria Hutt
9fc0d6242f fix(ionic): use the correct colors in core and playwright (#29898) 2024-10-01 08:03:15 -07:00
Maria Hutt
7002933269 fix(textarea): update background placement for ionic (#29910) 2024-09-27 15:16:28 -07:00
Maria Hutt
2af216737d feat(tab-bar): add expand and shape props for ionic theme (#29888)
Co-authored-by: ionitron <hi@ionicframework.com>
2024-09-25 13:58:12 -07:00
Tanner Reits
bde1d0978d feat(modal): add default ionic theme styles (#29876)
Issue number: resolves internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

No default modal styles for the Ionic theme

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Splits common and native styles into separate stylesheets
- Adds default styles to modals for Ionic theme

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

I only applied some of the global styles to the sheet modal vairation
since it is unclear whether the card variation will be used in the
widgets
2024-09-20 15:26:56 -04:00
Brandy Carney
05cf900fa2 chore(): update next from main (#29881) 2024-09-17 14:38:53 -04:00
ionitron
989c4e7aff chore(): add updated snapshots 2024-09-17 17:46:09 +00:00
Brandy Carney
b248ac5d0e Merge branch 'main' into chore-update-next-from-main 2024-09-17 13:20:23 -04:00
Tanner Reits
a37098ec6e feat(backdrop): ionic theme styles (#29873)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

No Ionic theme styles for the `ion-backdrop` element

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Adds Ionic theme styles for `ion-backdrop` and updates snapshots.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

The backdrop changes were only applied to `ion-modal` for now as all
other components where `ion-backdrop` is used do not yet have dedicated
Ionic theme styles. This is relevant as those components will need to
set `--backdrop-opacity: <value>` for their own implementations.
2024-09-17 09:23:22 -04:00
Tanner Reits
60e6b3143e feat(modal): add shape prop & styling for ionic theme (#29853)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

No shape prop or ionic theme styling

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Adds `shape` prop to `ion-modal`
- Adds styling for shape in ionic theme

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-09-11 22:30:12 -04:00
Brandy Carney
1841b59e44 chore(): update next from main (#29843) 2024-09-06 11:30:04 -04:00
Brandy Carney
bac0143d83 chore(build): generate angular proxies 2024-09-06 11:17:36 -04:00
ionitron
55711c4b32 chore(): add updated snapshots 2024-09-06 14:56:00 +00:00
Brandy Carney
7df08a2330 refactor(checkbox): add justify & align fix for ionic theme 2024-09-06 10:35:56 -04:00
Brandy Carney
93b734c840 Merge branch 'main' into chore-update-from-main-2 2024-09-06 10:25:27 -04:00
Tanner Reits
9a8c49ae7f feat(datetime): add ionic theme styles to time label (#29829)
Issue number: internal
---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

No `ionic` theme styles for the datetime time label

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Adds styles to the time label for the `ionic` theme

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->


[Preview](https://ionic-framework-6m937m00k-ionic1.vercel.app/src/components/datetime/test/basic?ionic:theme=ionic)
2024-09-04 09:08:49 -04:00
Tanner Reits
6aa47d363f feat(datetime): add ionic theme styles to title (#29828)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

There are no dedicated title styles for the `ionic` theme

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Adds `ionic` theme styles for the datetime default title

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Preview
(inline-custom)](https://ionic-framework-c0db80uay-ionic1.vercel.app/src/components/datetime/test/basic?ionic:theme=ionic)
2024-09-03 15:57:36 -04:00
Brandy Carney
78e7edaa06 chore(): sync next with main (#29821) 2024-08-30 15:37:05 -04:00
ionitron
17f7c52fa4 chore(): add updated snapshots 2024-08-30 19:07:35 +00:00
Brandy Carney
e839920162 chore: run build 2024-08-30 14:48:58 -04:00
Brandy Carney
21954f6f57 style: update code order for Sass
Due to https://sass-lang.com/documentation/breaking-changes/mixed-decls/
2024-08-30 14:39:59 -04:00
Tanner Reits
9f1a1942b9 chore(deps): update @types/node to v18 2024-08-30 14:35:04 -04:00
Brandy Carney
526f2b4a63 Merge branch 'main' into chore-sync-next-main 2024-08-30 13:35:59 -04:00
Brandy Carney
a0101bf3fb feat(item, list): add support for lines property in ionic theme (#29816)
- Adds the supported styles for `lines` in both the item and list components
- Splits the tests up in `item/test/lines` and `list/test/lines` so that it isn't taking screenshots of an entire page and instead tests based on the lines property
2024-08-30 10:40:17 -04:00
Brandy Carney
51a86fb0dd feat(datetime): add datetime styles for ionic theme (#29807)
Adds the styles for Datetime in the `ionic` theme for the following (days, months, arrows, weeks):
- Typography
- Colors
- Spacing
- Sizing
- States (selected, pressed, focus, hover)
2024-08-30 10:12:40 -04:00
Maria Hutt
ccf1f65892 feat(radio): add ionic theme styles (#29805)
- Added `ionic` theme styles
- Added `ionic` to the tests
- Updated file structure
- Added a focus ring mixin
2024-08-30 09:56:42 -04:00
José Rio
3656c8deba feat(input-password-toggle): fixed color and icon sizes. (#29808)
Issue number: resolves ROU-4860

---------

## What is the current behavior?
Icon color and sizes are not ok.

## What is the new behavior?
- Fixed Icon color into `neutral-800`
- Set the icon size with `16px`

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

## Other information

This will complete the
[PR](https://github.com/ionic-team/ionic-framework/pull/29787)

[Basic
Preview](https://ionic-framework-p6zymvqpo-ionic1.vercel.app/src/components/input-password-toggle/test/basic?ionic:theme=ionic)

---------

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-08-29 15:25:34 +01:00
Bernardo Cardoso
aded437923 fix(colors): change ionic colors scss imports for ionic dist (#29791)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
When consuming the Ionic Framework and using the Ionic Theme, the color
attribute was still not working as the color css was not present.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Now the ion-color maps are correctly imported on the Ionic `dist`
related folder and not the on the `md/ios` ones.
- Changed the usage of `map.get` to `map-get` to avoid issues with the
usage of `@use` and `@forward`. This seems to have no impact on the
compilation and I believe its a better code convention, as map-gets are
a native scss function that doesn't need to be imported.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <maria@ionic.io>
2024-08-27 08:42:46 +01:00
Giuliana Silva
b9ef92ae7e feat(toggle): add ionic theme styles (#29790)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
- Updated ionic theme styles for the toggle
- Added new states for the toggle (only for ionic theme)

## Does this introduce a breaking change?
- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <maria@ionic.io>
2024-08-26 09:25:38 +01:00
Bernardo Cardoso
4506ccf99c feat(input): change fill default on ionic theme (#29789)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Now the fill option default value is outline when using the Ionic
theme.
- Updated snapshots.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

- [Input Fill
Sample](https://ionic-framework-9fbgwzxss-ionic1.vercel.app/src/components/input/test/fill?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-08-23 17:47:08 +01:00
Brandy Carney
ca4c0a5a8d feat(textarea): add support for the shape property with soft, round and rectangular options (#29788)
- Adds support for `"soft"`, `"round"` and `"rectangular"` shapes in the Ionic theme, with `"round"` as the default
- Adds a `shape` folder and test with examples
- Adds an e2e test with screenshots for all shapes
2024-08-22 18:29:49 -04:00
José Rio
0d67c83c21 feat(input-password-toggle): add ionic theme design (#29787)
Issue number: ROU-4860

---------

## What is the current behavior?
Input Password Toggle does not have styles for the ionic theme.

## What is the new behavior?
- Added color style
- Set margins

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

| Figma Design | Implemented Input Password Toggle |
| --- | --- | 
| ![Figma
Design](https://github.com/user-attachments/assets/285c4766-267b-4c73-b0fc-801b130c6fb2)
| ![Implemented
InputPasswordToggle](https://github.com/user-attachments/assets/a768cbfe-3bf4-4d49-89ce-0b142d29d3b0)
|

- [Basic
Preview](https://ionic-framework-git-rou-4860-ionic1.vercel.app/src/components/input-password-toggle/test/basic?ionic:theme=ionic)

---------

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-08-22 16:23:15 +01:00
Brandy Carney
e539620880 feat(textarea): add small and large sizes for the ionic theme (#29781)
- Adds the `small` and `large` sizes for the `ionic` theme
- Adds tests for the sizes to the existing `size` test
2024-08-21 16:15:05 -04:00
Brandy Carney
b57f4be284 feat(textarea): add ionic theme design with medium size (#29776)
- Adds the typography styles for the default size (medium)
- Adds the styles for the outline fill 
- Adds the styles for the label & helper text
- Adds the spacing for the label, textarea, counter and helper text
2024-08-21 14:55:40 -04:00
Maria Hutt
59ba289233 refactor(spinner): use mode to render default (#29768) 2024-08-13 11:09:39 -07:00
Maria Hutt
32fb17cf6e refactor(button): add ripple effect to ionic theme (#29754)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-08-12 14:30:31 -07:00
Bernardo Cardoso
210f724ae7 feat(card): add ionic theme tokens, update design (#29757)
## What is the new behavior?
- Reviewed tokens used for `ion-card` on Ionic Theme.
- Removed border on ion-card.
- Changed default shape to round.
- Added ionic theme partials for `ion-title`, `ion-subtitle`, `ion-header` and `ion-content`.

## Other information
[Sample Screen](https://ionic-framework-hyyi9k1ti-ionic1.vercel.app/src/components/card/test/theme-ionic)

---------

Co-authored-by: Brandy Carney <brandyscarney@gmail.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2024-08-09 15:21:41 -04:00
Maria Hutt
8fb813686f refactor(item): add slot styles (#29741)
Co-authored-by: ionitron <hi@ionicframework.com>
2024-08-07 12:53:48 -07:00
Maria Hutt
196a7bf1b9 refactor(item, list): use the same background color (#29739) 2024-07-31 08:16:41 -07:00
Maria Hutt
25e765d1f0 feat(core): add ionic colors (#29707)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-07-19 11:37:57 -07:00
Maria Hutt
476a6ac837 test(button): add ionic mode to outline (#29702) 2024-07-11 08:18:32 -07:00
Maria Hutt
79a3fd00de feat(spinner): add size for ionic theme (#29699)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-07-09 12:44:44 -07:00
Maria Hutt
0979172b61 refactor(input): update bg color and label color for ionic (#29698) 2024-07-09 12:32:04 -07:00
Maria Hutt
abe3b3f100 feat(avatar): add xxsmall size (#29697)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-07-09 12:20:22 -07:00
Maria Hutt
a12c1ac319 refactor(item): use correct button sizes (#29691) 2024-07-09 11:35:06 -07:00
Maria Hutt
24221eb693 refactor(badge): update padding for medium size (#29692) 2024-07-09 11:17:56 -07:00
Bernardo Cardoso
c48b33b360 feat(tokens): update primitive json (#29684)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Update primitive json tokens
- Update generated files on foundations folder.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

## Other Information
[Tokens Preview
Sample](https://ionic-framework-fugbxhshx-ionic1.vercel.app/src/foundations/tokens.preview.html)

---------

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-07-03 17:46:28 +01:00
Brandy Carney
7d772be76e fix(checkbox): separate background from svg in order to use proper sizes for ionic theme (#29623)
Issue number: internal

---------

## What is the current behavior?
The checkbox background color and svg are both set to the same size. 

## What is the new behavior?
Moves the background and border to the native wrapper so that we can
change the svg size separately.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

[Preview](https://ionic-framework-git-fix-checkbox-design-ionic1.vercel.app/src/components/checkbox/test/basic?ionic:theme=ionic)
2024-07-03 11:40:34 -04:00
Bernardo Cardoso
b35ace4393 feat(toolbar): add ionic theme styles (#29656)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Added ionic theme scss architecture for
- Toolbar
- Menu Button
- Buttons
- Searchbar
- Title

For the toolbar, it was decided to follow an approach closer to ios
regarding the slots offering and behaviour, as it matches more closely
the UX/UI requirements.

- Added TODO related to z-index task on toolbar an header ionic files.
- Added new ion-title and ion-toolbar tests for ionic theme.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Toolbar Sample
Screen](https://ionic-framework-15lh8i02e-ionic1.vercel.app/src/components/toolbar/test/theme-ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-06-28 22:19:35 +01:00
Bernardo Cardoso
a928ba7379 feat(header): add new divider property (#29675)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Add new divider property on header's Ionic theme
- Added new divider test.
- Added TODO for support on ios/ md in future.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Header divider
sample](https://ionic-framework-a13vvxiyy-ionic1.vercel.app/src/components/header/test/divider?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Giuliana Silva <108938618+OS-giulianasilva@users.noreply.github.com>
2024-06-28 21:01:52 +01:00
Brandy Carney
08fc0b9160 feat(many): default components to Phosphor Icons for ionic theme (#29617)
Issue number: internal

---------

## What is the current behavior?
Icons in the Ionic theme default to Ionicons.

## What is the new behavior?
- Renames the following config properties:
  - `datetimeShowMonthYearIcon` to `datetimeExpandedIcon`
  - `datetimeHideMonthYearIcon` to `datetimeCollapsedIcon`
  - `selectExpandIcon` to `selectExpandedIcon`
- Updates the icons for the `ionic` theme to the following Phosphor
Icons:

| Component | Config | Phosphor Icon | Font Weight |
| ------------------------ | --------------------------- |
----------------- | ----------- |
| Accordion | `accordionToggleIcon` | `CaretDown` | `regular` |
| Back Button | `backButtonIcon` | `CaretLeft` | `regular` |
| Breadcrumb | `breadcrumbSeparatorIcon` | `CaretRight` | `regular` |
| Breadcrumb | `breadcrumbCollapsedIcon` | `DotsThree` | `regular` |
| Checkbox | N/A | `Check` | `bold` |
| Checkbox (indeterminate) | N/A | `Minus` | `bold` |
| Datetime | `datetimeNextIcon` | `CaretRight` | `regular` |
| Datetime | `datetimePreviousIcon` | `CaretLeft` | `regular` |
| Datetime | `datetimeCollapsedIcon` | `CaretDown` | `regular` |
| Datetime | `datetimeExpandedIcon` | `CaretUp` | `regular` |
| Fab Button | `fabButtonCloseIcon` | `X` | `regular` |
| Input | `inputClearIcon` | `X` | `regular` |
| Input Password Toggle | `inputPasswordShowIcon` | `Eye` | `regular` |
| Input Password Toggle | `inputPasswordHideIcon` | `EyeSlash` |
`regular` |
| Item | `itemDetailIcon` | `CaretRight` | `regular` |
| Menu Button | `menuIcon` | `List` | `regular` |
| Reorder | `reorderHandleIcon` | `List` | `regular` |
| Refresher | `refreshingIcon` |  | |
| Refresher (arrow icon) | N/A | `CaretLeft` | `fill` |
| Searchbar | `searchbarCancelIcon` | `ArrowLeft` | `regular` |
| Searchbar | `searchbarClearIcon` | `X` | `regular` |
| Searchbar | `searchbarSearchIcon` | `MagnifyingGlass` | `regular` |
| Select | `selectExpandedIcon` | `CaretDown` | `regular` |
| Select | `selectCollapsedIcon` | `CaretDown` | `regular` |
| Toggle | `toggleCheckedIcon` | `LineVertical` | `regular` |
| Toggle | `toggleUncheckedIcon` | `Circle` | `regular` |

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-06-27 17:53:51 -04:00
Maria Hutt
2a52942a6f fix(badge): add missing shape value (#29641) 2024-06-27 09:02:17 -07:00
Maria Hutt
6d6c637ac4 fix(item-option): expand without shifting icon (#29661) 2024-06-26 16:25:37 -07:00
Maria Hutt
2e1ccf8a42 refactor(tab-bar): update activated styles (#29645) 2024-06-25 12:38:34 -07:00
Maria Hutt
0ebc71d318 feat(list-header): add ionic theme styles to ionic-link and labels (#29613)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-06-25 11:19:57 -07:00
Maria Hutt
c94d04d483 feat(tab-button): add default styles (#29647) 2024-06-25 10:40:06 -07:00
Maria Hutt
327f22ece3 feat(item-option): add disabled styles (#29642) 2024-06-24 16:44:52 -07:00
Maria Hutt
947beb8840 refactor(tab-button): update selected styles (#29646) 2024-06-24 11:46:09 -07:00
Maria Hutt
99791c2764 refactor(tab-button): update focus styles (#29644) 2024-06-24 10:28:15 -07:00
Maria Hutt
94f34e9785 feat(tab-bar): add default styles (#29643) 2024-06-24 09:08:11 -07:00
Maria Hutt
3d94b234a0 feat(item-option): add shapes (#29636) 2024-06-20 11:24:38 -07:00
Maria Hutt
5055bdcc96 feat(item-option): add default styles (#29635) 2024-06-20 11:03:10 -07:00
Maria Hutt
3c7a00e57d feat(list): add shapes (#29622) 2024-06-20 10:46:12 -07:00
Bernardo Cardoso
a3f486bdbf feat(ion-header): add basic UI for ionic theme (#29629)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added new common header partial, to be used by ionic theme and ios/md
- Renamed header.scss to header.native.scss. This inherits the common
created above and its used only on ios and md partial
- Created new partial for ionic theme.
- Added ionic theme to basic e2e tests.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Sample Header
Screen](https://ionic-framework-rcfex2fep-ionic1.vercel.app/src/components/header/test/basic?ionic:theme=ionic)

---------

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <maria@ionic.io>
2024-06-19 08:54:05 +01:00
Bernardo Cardoso
87b3723ba9 fix(typography): improve ionic global typography (#29628)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Updated tokens utilities to no longer add font-family to
utillity-classes. That is something that should only be set at a global
layer, no sense to have that on a utility-class.
- Updated text token JSON as received by UX/UI Team.
- Improved tokens utilities to correctly set font-style to italic with
italic font tokens.
- Adjusted typography Ionic scss to use the new typography classes and
mixins based on tokens.
- Removed old basic typography test, as it was testing utility-classes
that do not exist anymore.
- Added new typography test for ionic display tokens.
- Added a TODO to tackle the Inter font loading scenario, as it envolves
research that impact other contexts as well.

## Does this introduce a breaking change?

- [x] Yes
- [ ] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

[Sample Typography
Screen](https://ionic-framework-e2le05h3a-ionic1.vercel.app/src/css/test/typography/basic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2024-06-18 16:29:34 +01:00
Maria Hutt
dcdc60283e chore(git): sync main (#29632)
Syncing changes from `main` to `next`.
2024-06-18 08:17:10 -07:00
Maria Hutt
6ecae2bd13 Merge remote-tracking branch 'origin/main' into chore-sync-next-with-main 2024-06-17 17:12:42 -07:00
Maria Hutt
1f66f4a24e Merge remote-tracking branch 'origin/main' into chore-sync-next-with-main 2024-06-17 16:57:57 -07:00
Bernardo Cardoso
1b916f531e feat(checkbox): improve disabled state and create disable mixin (#29599)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Improved Checkbox disabled state
- Added more examples on theme-ionic file for disabled checkbox
- Created ionic.mixin for new DS specific mixins, while still forwarding
the globals one.
- Created mixin for the disabled-state, that can be reused on multiple
Ionic Theme components.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
Co-authored-by: Gonçalo M <goncalo.martins@outsystems.com>
2024-06-10 10:38:15 +01:00
rug
00c8d5ec55 feat(item): add styles for focus state in ionic theme (#29595)
Issue number: internal

---------

## What is the new behavior?
- Added scss for the focus state of `ion-item` for the Ionic theme
- Added item with class `ion-focused` to test page
- Added the ionic theme to the test page of item `states`

## Does this introduce a breaking change?
- [ ] Yes
- [x] No

## Other Information


[Preview](https://ionic-framework-git-rou-10782-ionic1.vercel.app/src/components/item/test/theme-ionic?ionic:theme=ionic)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-06-07 16:12:21 +02:00
rug
00a6b2dfbd feat(item): add styles for disabled state in ionic theme (#29583)
Issue number: internal

---------

## What is the new behavior?
- Added scss for the disabled state of `ion-item` for the Ionic theme
- Added disabled elements to test page

## Does this introduce a breaking change?
- [ ] Yes
- [x] No

---------

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Brandy Carney <brandyscarney@gmail.com>
2024-06-06 21:48:12 +02:00
rug
0807e6b037 feat(item): add styles for pressed state in ionic theme (#29586)
Issue number: internal

---------

## What is the new behavior?
- Added scss for the pressed state of `ion-item` for the Ionic theme
- Added item with class `ion-activatable` ([according to
docs](https://github.com/ionic-team/ionic-framework/blob/main/docs/component-guide.md#activated))
to test page

## Does this introduce a breaking change?
- [ ] Yes
- [x] No

---------

Co-authored-by: Bernardo Cardoso <32780808+BenOsodrac@users.noreply.github.com>
2024-06-06 19:12:53 +02:00
Bernardo Cardoso
14d3500b50 refactor(checkbox): use the new tokens (#29564)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- updated ionic.checkbox.scss with ionic tokens and removed references
to checkbox.scss partial
- removed ionic.checkbox.vars.scss file
- update snapshots resulted from slight differences due to the use of
the updated tokens.
- added theme-ionic html file to test basic use-cases with ionic theme.
- border-radius now won't auto scale with `--size`. This was not
possible to do using the gloabls tokens variables and the css calc(), as
it was before. Besides, this is not something we are very interested to
offer on Ionic theme. It should be on developer to also update the
`--border-radius` variable if they want, after changing `--size`.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2024-06-06 07:47:11 +01:00
Brandy Carney
2441b8f125 chore(git): sync main (#29592) 2024-06-05 17:04:57 -04:00
Brandy Carney
f8f83a3700 Merge branch 'main' into chore-sync-main-next 2024-06-05 16:46:41 -04:00
Brandy Carney
17f38bcd04 chore(git): sync with main (#29585) 2024-06-04 17:22:18 -04:00
Brandy Carney
898d7933ac Merge branch 'main' into chore-sync-next-main 2024-06-04 17:02:54 -04:00
Brandy Carney
c2d6b21d6f feat(avatar): use correct styles for icons in ionic theme (#29581)
Issue number: internal

---------

## What is the current behavior?
Avatar icon styles use `1em` width/height which makes them change size
based on the `font-size`

## What is the new behavior?
Updates the `ionic` theme only to:
- Set the `width` / `height` of icons in `ion-avatar` to use the scale
tokens based on the Figma design
- Removes the padding for avatars containing an icon
- Updates the existing screenshots to show the new icon sizes

## Does this introduce a breaking change?
- [ ] Yes
- [x] No

## Other information

[Preview](https://ionic-framework-git-rou-10732-ionic1.vercel.app/src/components/avatar/test/size?ionic:theme=ionic)
2024-06-04 16:50:43 -04:00
Bernardo Cardoso
02f3ad014a refactor(button): use the new tokens (#29561)
Issue number: Internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- On ionic.button.scss all dependencies to button.scss were removed, to
avoid the old native theme values being mixed on the new ionic theme
button.
- ionic.button.vars.scss partial was removed
- All values were changed to use tokens.
- Updated snapshots that bring slight differences due to now we are
totally using the ionic theme tokens.
- Tests with colors where the ionic button was being added also now have
differences, as the current ion-colors aren't affecting the ionic theme
button. This is expected, as the ionic theme should only work with the
colors from the new Design System, which is something being tacked on
this [PR](https://github.com/ionic-team/ionic-framework/pull/29557). in
the future, we should remove the ionic button from these color ctests
and create new ones that add the new set of colors to the ionic button.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->
2024-06-04 20:03:05 +01:00
Maria Hutt
f60a3f2232 feat(badge): add rectangular to ionic theme (#29576)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-06-03 11:33:29 -07:00
rug
1e7e21f5f3 feat(item): add styles for default size in ionic theme (#29559)
Issue number: internal

---------

## What is the new behavior?
- Added scss for the `ion-item` for the Ionic theme
- Added test page

## Does this introduce a breaking change?
- [ ] Yes
- [x] No

---------

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-06-03 18:15:50 +02:00
Maria Hutt
8ac3ae520c feat(badge): add round to the ionic theme (#29574) 2024-05-31 13:05:58 -07:00
Maria Hutt
777521f218 feat(badge): add soft to the ionic theme (#29573)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-05-31 11:47:13 -07:00
Maria Hutt
e9fd407e90 test(badge): match design screenshots (#29572) 2024-05-31 10:27:35 -07:00
Maria Hutt
7d4a704b1c feat(badge): add xxsmall size to ionic theme (#29570)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-05-31 08:58:35 -07:00
Bernardo Cardoso
6246245cac feat(tokens): make font-size use px-to-rem() (#29547)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->



## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

This PR intends to make sure all font-size related tokens are generated
suing the px-to-rem() scss function, so that the fonts correctly scale
in runtime to zoom/A11y preferences.
 
- Added new utility to generate the expected css and scss variable using
the px-to-rem()
- Added @use on generated scss and css foundations files.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-05-31 09:17:31 +01:00
Maria Hutt
59f3d4e988 feat(badge): add xsmall size to ionic theme (#29566) 2024-05-30 08:56:42 -07:00
Brandy Carney
0f4462088a feat(input): add ionic theme styles and size property (#29380)
Issue number: internal

---------

## What is the current behavior?
The input uses `md` styles on the `ionic` theme.

## What is the new behavior?
Adds the following for the `ionic` theme:
- The `--text-color-invalid` CSS variable
- The `size` property with support for the `large` size
- The `outline` fill styles for the input
- The `round` shape styles for the input
- The helper and error text styles
- The `focused`, `disabled` and `hover` styles
- The clear button styles

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

The outline fill & stacked label were the main priority here so some
screenshots may look plain. Floating label will be added in future work.
2024-05-30 11:35:43 -04:00
Brandy Carney
e819f767a1 chore(git): sync next (#29568) 2024-05-30 10:30:56 -04:00
Brandy Carney
f8f4bb67a5 Merge branch 'next' into chore-sync-next-ROU-4848 2024-05-30 10:01:13 -04:00
Brandy Carney
5c84b6acf5 chore(git): sync next (#29536) 2024-05-30 10:00:07 -04:00
Bernardo Cardoso
eb7585ed20 refactor(chip): use the new tokens (#29565)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Replaced old fixed values with new tokens.
- Added theme="ionic" to ionic test page.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->
2024-05-30 07:43:06 +01:00
Maria Hutt
1574d3bffe refactor(input, typography): update to the new tokens (#29543)
Co-authored-by: Brandy Carney <brandyscarney@gmail.com>
2024-05-29 14:48:30 -07:00
Brandy Carney
cfdf4555de fix(avatar): update font styles for ionic theme to match design (#29560)
Issue number: internal

---------

## What is the current behavior?
Avatar styles do not match the Figma design.

## What is the new behavior?
- Updates the font styles (size, weight & line height) to match Figma
design.
- Updates screenshots with new styles.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

[Size
Preview](https://ionic-framework-git-fix-avatar-font-sizes-ionic1.vercel.app/src/components/avatar/test/size?ionic:theme=ionic)
[Shape
Preview](https://ionic-framework-git-fix-avatar-font-sizes-ionic1.vercel.app/src/components/avatar/test/shape?ionic:theme=ionic)
2024-05-29 09:57:51 -04:00
Brandy Carney
2d249d8f68 feat(avatar): add styles for soft shape in ionic theme (#29552)
Issue number: internal

---------

## What is the current behavior?
Avatar does not have styles for the `"soft"` shape in the ionic theme.

## What is the new behavior?
- Adds the styles for the soft shape (border radius)
- The `xsmall` and `small` sizes have a different border radius than the
larger sizes
- Adds e2e tests for the soft shape

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

[Preview](https://ionic-framework-git-rou-10739-ionic1.vercel.app/src/components/avatar/test/shape?ionic:theme=ionic)
2024-05-28 14:28:12 -04:00
Brandy Carney
8ebece3e30 feat(avatar): add styles for rectangular shape in ionic theme (#29551)
Issue number: internal

---------

## What is the current behavior?
Avatar does not have styles for the `"rectangular"` shape in the ionic
theme.

## What is the new behavior?
- Adds the styles for the rectangular shape (border radius)
- Adds e2e test for the rectangular shape

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

[Preview](https://ionic-framework-git-rou-10740-ionic1.vercel.app/src/components/avatar/test/shape?ionic:theme=ionic)
2024-05-28 13:46:06 -04:00
Brandy Carney
d4971581cc feat(avatar): add styles for default (round) shape in ionic theme (#29550)
Issue number: internal

---------

## What is the current behavior?
Avatar does not have styles for the `"round"` shape in the ionic theme.

## What is the new behavior?
- Adds the styles for the default (round) shape (border radius)
- Adds e2e test for the round shape
- Updates the screenshots for the avatar `size` due to the new default
shape

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

[Preview](https://ionic-framework-git-rou-10738-ionic1.vercel.app/src/components/avatar/test/shape?ionic:theme=ionic)
2024-05-28 13:25:54 -04:00
Brandy Carney
01c1b4fef2 feat(avatar): add styles for xlarge size in ionic theme (#29549)
Issue number: internal

---------

## What is the current behavior?
Avatar does not have styles for the `"xlarge"` size in the ionic theme.

## What is the new behavior?
- Adds the styles for the xlarge size (width, height, padding, font size
and line height)
- Adds e2e test for xlarge size to the existing avatar test for sizes

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

[Preview](https://ionic-framework-git-rou-10737-ionic1.vercel.app/src/components/avatar/test/size?ionic:theme=ionic)

---------

Co-authored-by: Giuliana Silva <108938618+OS-giulianasilva@users.noreply.github.com>
2024-05-28 11:37:16 -04:00
Bernardo Cardoso
3b93bb4a9b feat(tokens): add html preview based on design-tokens (#29545)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added new files to scripts/tokens for the html template and css to
style the generated preview
- Added Style Dictionary register for generating html elements for each
main token

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->
2024-05-28 15:57:30 +01:00
Brandy Carney
b4ce7129b2 feat(avatar): add styles for xsmall size in ionic theme (#29548)
Issue number: internal

---------

## What is the current behavior?
Avatar does not have styles for the `"xsmall"` size in the ionic theme.

## What is the new behavior?
- Adds the styles for the xsmall size (width, height, padding, font
size, font weight and line height)
- Adds e2e test for xsmall size to the existing avatar test for sizes

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

[Preview](https://ionic-framework-git-rou-10733-ionic1.vercel.app/src/components/avatar/test/size?ionic:theme=ionic)
2024-05-28 09:48:02 -04:00
Brandy Carney
7f8be3e18c feat(avatar): add styles for large size in ionic theme (#29541)
Issue number: internal

---------

## What is the current behavior?
Avatar does not have styles for the `"large"` size in the ionic theme.

## What is the new behavior?
- Adds the styles for the large size (width, height, padding, font size)
- Adds e2e test for large size to the existing avatar test for sizes

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

[Preview](https://ionic-framework-git-rou-10736-ionic1.vercel.app/src/components/avatar/test/size?ionic:theme=ionic)
2024-05-23 12:44:35 -04:00
Brandy Carney
fea59b73aa feat(avatar): add styles for small size in ionic theme (#29540)
Issue number: internal

---------

## What is the current behavior?
Avatar does not have styles for the `"small"` size in the ionic theme.

## What is the new behavior?
- Adds the styles for the small size (width, height, padding, font size)
- Adds e2e test for small size to the existing avatar test for sizes

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

[Preview](https://ionic-framework-git-rou-10734-ionic1.vercel.app/src/components/avatar/test/size?ionic:theme=ionic)
2024-05-23 12:28:00 -04:00
Brandy Carney
b9af47ae0d feat(avatar): add styles for default (medium) size in ionic theme (#29538)
Issue number: internal

---------

## What is the current behavior?
Avatar does not have any styles in the ionic theme.

## What is the new behavior?
- Adds background, border and font styles for avatar
- Adds the styles for the medium size and defaults the size to medium
- Adds e2e test for avatar sizes

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

[Preview](https://ionic-framework-git-rou-10735-ionic1.vercel.app/src/components/avatar/test/size?ionic:theme=ionic)
2024-05-23 12:12:31 -04:00
Bernardo Cardoso
b21f95cced feat(tokens): add rgba for color tokens with 8 chars (#29542)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->


- Added new method to detect colors with eight characters
- Added logic to generate an rgba when the above is true. This is to
ensure better compatibility with older devices that don't support colors
with more than six characters.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->
2024-05-23 15:19:02 +01:00
Maria Hutt
1c035af1a2 feat(badge): add xlarge size for ionic theme (#29530) 2024-05-22 14:00:43 -07:00
Maria Hutt
258dabfb9e feat(badge): add large size for ionic theme (#29529) 2024-05-22 11:58:09 -07:00
Maria Hutt
15f8c55046 feat(badge): add medium size for ionic theme (#29528) 2024-05-22 11:32:48 -07:00
Maria Hutt
5c0b5c32d0 feat(badge): add small/default size for ionic theme (#29526) 2024-05-22 11:11:37 -07:00
Brandy Carney
4bf7a76104 Merge branch 'next' into chore-sync-next-4848 2024-05-22 14:03:17 -04:00
Bernardo Cardoso
888b0c8284 feat(tokens): update design-tokens (#29533)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Added an update to Design Tokens, requested by UX/UI Team:

- New semantic colors added
- Guidelines token was removed 
- Hover, disabled and pressed tokens now correctly appear on Theme JSON
- Removed _color.styles.tokens.json_ file, as it was now empty.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->
2024-05-22 18:22:57 +01:00
Brandy Carney
7a4843b2db fix(input): adjust colors, padding, fonts & heights for ionic theme (#29520)
Issue number: internal

---------

## What is the current behavior?
Input styles were slightly different from the ionic theme design. 

## What is the new behavior?
Updates the following:
- The font size for input (14px) and labels (12px)
- The font weight, line-height and color for the label
- The padding for the label & helper message
- Removes the label transform in order to set `font-size` directly
- Updates the Sass variables to be referenced from `tokens` where they
were not

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

The underline (undefined) fill looks off from the design but issue
ROU-5151 exists for implementing it so I assume it will be fixed there.

- [Shapes
preview](https://ionic-framework-git-fix-input-placeholder-ionic1.vercel.app/src/components/input/test/shape?ionic:theme=ionic)
- [Fills
preview](https://ionic-framework-git-fix-input-placeholder-ionic1.vercel.app/src/components/input/test/fill?ionic:theme=ionic)

## Image Comparison

| Before | After | UX Design |
| ---| ---| ---|
|
![ionic-before](https://github.com/ionic-team/ionic-framework/assets/6577830/14158641-1118-498a-b970-c277ad505583)
|
![ionic-after](https://github.com/ionic-team/ionic-framework/assets/6577830/fbd1d167-ac3c-4fa7-817d-c5a4ac8b8d3c)
| ![UX
design](https://github.com/ionic-team/ionic-framework/assets/6577830/a3d06503-ce9e-4b15-a1ad-6d11615ec673)
|

> [!NOTE]
> The design is not going to match perfectly because we are not using
the Inter font in our tests.
2024-05-22 11:58:26 -04:00
Bernardo Cardoso
b6325e49be feat(tokens): add new tokens json files (#29525)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added new structure of JSON files that are generated from Figma
Variables
- Adjusted tokens.js script to correctly translate the new JSON format
- Adjusted tokens usage on components and CSS files
- Added html template to auto-generate html preview based on Design
Tokens (wip)
- Updated snapshots, as some tokens values changed, specially colors.

## Does this introduce a breaking change?

- [x] Yes
- [ ] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2024-05-22 16:50:21 +01:00
Maria Hutt
9fd1a53c74 feat(chip): add small size (#29514)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-05-17 12:28:29 -07:00
Brandy Carney
bf8dfdb5b1 feat(input): add styles for counter text on ionic theme (#29516)
Issue number: internal

---------

## What is the current behavior?
The counter text for the ionic theme does not have added styles.

## What is the new behavior?
- Updates the `color` of the counter text to match the design
- Updates the screenshots that were changed with this update

## Does this introduce a breaking change?
- [ ] Yes
- [x] No
2024-05-17 14:40:39 -04:00
Brandy Carney
3f12e5850d feat(button,card,chip): add default shape (#29515) 2024-05-16 15:28:11 -04:00
Brandy Carney
968807f4eb chore(git): sync next (#29513) 2024-05-16 12:26:46 -04:00
Brandy Carney
7f192a4d99 Merge branch 'next' into chore-sync-next 2024-05-16 12:08:04 -04:00
Maria Hutt
916d8a455f chore(git): sync next (#29511) 2024-05-16 08:44:49 -07:00
Maria Hutt
310bde6e91 Merge remote-tracking branch 'origin/next' into chore-sync-rou-4848-with-next 2024-05-15 16:20:21 -07:00
Maria Hutt
588db38e15 chore(git): sync main (#29509) 2024-05-15 14:23:06 -07:00
Maria Hutt
4412246f95 Merge remote-tracking branch 'origin/main' into chore-sync-next-with-main 2024-05-15 14:00:27 -07:00
Brandy Carney
237245f567 chore(git): update from next (#29491) 2024-05-13 14:47:05 -04:00
Brandy Carney
a214b3de4c Merge branch 'next' into chore-fw-6191-next 2024-05-13 13:37:25 -04:00
Brandy Carney
7a7a688601 chore(git): update from next (#29495) 2024-05-13 13:35:01 -04:00
Brandy Carney
8e7be665fa chore(): add updated snapshots (#29496)
Co-authored-by: ionitron <hi@ionicframework.com>
2024-05-13 13:08:38 -04:00
Brandy Carney
24c0bc352a Merge branch 'next' into chore-rou-4848-next 2024-05-13 12:09:39 -04:00
Brandy Carney
ef7a454015 chore(): add updated snapshots (#29492)
Co-authored-by: ionitron <hi@ionicframework.com>
2024-05-13 10:38:02 -04:00
Brandy Carney
edbc1eca1b chore(git): update from main (#29488) 2024-05-10 17:41:36 -04:00
Brandy Carney
b353984216 Merge branch 'main' into chore-update-from-main 2024-05-10 17:29:30 -04:00
Brandy Carney
09935fd07b feat(input): add the readonly styles for the ionic theme (#29483)
Issue number: internal

---------

## What is the current behavior?
There are no custom styles when readonly is added to an input.

## What is the new behavior?
- Applies an `input-readonly` class when the `readonly` property is
`true`
- Styles the class in the `ionic` theme to match the design requirements
for readonly inputs
- Adds screenshot tests for the readonly style for an unset `fill` and
`"outline"` fill

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-05-10 11:38:18 -04:00
Brandy Carney
8515c4efff fix(input): only apply the shape to the outline fill in ionic theme (#29482)
Issue number: internal

---------

## What is the current behavior?
The shape styles are being applied when the `fill` is unset in the
`ionic` theme. This is incorrect per the input UX requirements as shape
should only apply when `fill` is set to `"outline"`. This is made
apparent when looking at the existing styles for `disabled`.

## What is the new behavior?
- Only apply the shape styles to the `"outline"` fill
- Move the use of the `--background` css variable to the native wrapper
since this is what we use to style both the disabled and readonly states

| Before | After |
| ---| ---|
|
![before](https://github.com/ionic-team/ionic-framework/assets/6577830/44b6e7e4-70f4-49d5-844f-a015b7284ed5)
|
![after](https://github.com/ionic-team/ionic-framework/assets/6577830/06ac9431-17f4-4741-8ceb-19b40d8ba7d9)
|

I am not sure why this wasn't caught with the shape additions, but it's
probably because the minimum pixel ratio was not met.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-05-10 10:27:43 -04:00
Maria Hutt
c1bba3b5f0 feat(input): add soft shape for ionic theme (#29477)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

The input component does not support the `soft` shape.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- `soft` has been added to shape, but will only work for the `ionic`
theme.
- Added tests

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->


[Preview](https://ionic-framework-git-fw-6096-ionic1.vercel.app/src/components/input/test/shape?ionic:theme=ionic)
2024-05-09 11:54:00 -07:00
Brandy Carney
75333c0251 feat(input): add rectangular shape for the ionic theme (#29476)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
The input supports an undefined and a `round` shape.

## What is the new behavior?
Adds support for the `rectangular` shape for the `ionic` theme &
screenshot tests for this shape with the outline fill.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-05-09 11:26:52 -04:00
Maria Hutt
e17db2c988 test(input): remove the .only within fill (#29478) 2024-05-09 08:04:15 -07:00
Maria Hutt
a58d9fa2e1 feat(many): expand global config for icons (#29373)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-05-08 16:22:12 -07:00
Maria Hutt
7333376506 fix(input): implement default shape for ionic theme (#29469)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-05-08 13:21:52 -07:00
Brandy Carney
4dae03f2ac feat(button): set default shape to soft for ios and round for md and ionic themes (#29404)
Issue number: internal

---------

## What is the current behavior?
The `shape` property defaults to `"soft"` for `ios` and `"round"` for
the `md` and `ionic` themes.

**Default button size**:

| Property Value | CSS Value (`ionic`) | CSS Value (`ios`) | CSS Value
(`md`) |
| --------------- | ------ | ----------- | ----------- |
| `undefined`     | `8px`  | `14px`      | `4px`      |
| `"round"`       | `999px` | unsupported | unsupported |
| `"rectangular"` | `0px`  | unsupported | unsupported |

**Large button size**:

| Property Value | CSS Value (`ionic`) | CSS Value (`ios`) | CSS Value
(`md`) |
| --------------- | ------ | ----------- | ----------- |
| `undefined`     | `8px`  | `16px`      | `4px`      |

**Small button size**:

| Property Value | CSS Value (`ionic`) | CSS Value (`ios`) | CSS Value
(`md`) |
| --------------- | ------ | ----------- | ----------- |
| `undefined`     | `4px`  | `6px`      | `4px`      |

## What is the new behavior?
The `shape` property defaults to `undefined` which evaluates to the
"Soft" shape for all themes.


**Default button size**:

| Property Value | CSS Value (`ionic`) | CSS Value (`ios`) | CSS Value
(`md`) |
| --------------- | ------- | ------ | -------- |
| `"soft"`        | `8px`   | `6px`   | `4px`   |
| `"round"`       | `999px` | `999px` | `999px` |
| `"rectangular"` | `0px`   | `0px`   | `0px`   |

**Large button size**:

| Property Value | CSS Value (`ionic`) | CSS Value (`ios`) | CSS Value
(`md`) |
| --------------- | ------ | ----------- | ----------- |
| `soft`     | `8px`  | `8px`      | `4px`      |

**Small button size**:

| Property Value | CSS Value (`ionic`) | CSS Value (`ios`) | CSS Value
(`md`) |
| --------------- | ------ | ----------- | ----------- |
| `soft`     | `4px`  | `4px`      | `4px`      |

- Adds support for the `"soft"` shape in the `ionic` theme using the
existing values for `undefined`
- Adds support for the `"rectangular"` and `"round"` shapes in `ios` and
`md` using `0px` and `999px` border radius
- Sets the default shape property to `"round"` for the `ionic` and `md`
themes and `"soft"` for `ios` and updates the `border-radius` to apply
to the shape classes instead of `:host`
- Updates the `"soft"` shape border radius for `ios` in the various
sizes to match the buttons created in SwiftUI (their "rounded" is our
"soft"):

![rounded-ios-buttons](https://github.com/ionic-team/ionic-framework/assets/6577830/230edf21-de68-4c41-9b89-8ea310ce42f2)
- Fixed the icon only buttons in the `"ionic"` theme so that they are
not styled based on the size while always following the proper aspect
ratio. This was broken for the default size due to an incorrect padding
value & I made it so we don't have to specify the padding for each size:

| Before | After |
| ---| ---|
|
![before](https://github.com/ionic-team/ionic-framework/assets/6577830/1e8d1a82-ad58-4372-be69-09175362c810)
|
![after](https://github.com/ionic-team/ionic-framework/assets/6577830/06cf6e22-a606-4ccc-ae4b-df69cf9c1e1e)
|

## Does this introduce a breaking change?

- [x] Yes
- [ ] No

BREAKING CHANGE:

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.

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-05-08 16:05:59 -04:00
Maria Hutt
fd14ddfec7 fix(input): match design for xlarge size (#29446) 2024-05-03 15:04:26 -07:00
Maria Hutt
0e792e6b9d fix(input): use correct padding for large (#29447) 2024-05-03 12:49:44 -07:00
Maria Hutt
2eb1dbd83c fix(input): add focus ring to the clear input button for ionic theme (#29409) 2024-05-03 12:28:37 -07:00
Brandy Carney
c78d2e6ec8 feat(chip): set default shape to soft for ios and md theme and round for ionic theme (#29375)
Issue number: internal

---------

## What is the current behavior?
The `shape` property defaults to `undefined` which evaluates to the
"Soft" shape for the `ionic` theme and the "Round" shape for the
`ios`/`md` themes.

| Property Value | CSS Value (`ionic`) | CSS Value (`ios`) | CSS Value
(`md`) |
| --------------- | ------ | ----------- | ----------- |
| `undefined`     | `4px`  | `16px`      | `16px`      |
| `"round"`       | `999px` | unsupported | unsupported |
| `"rectangular"` | `0px`  | unsupported | unsupported |

## What is the new behavior?
| Property Value | CSS Value (`ionic`) | CSS Value (`ios`) | CSS Value
(`md`) |
| --------------- | ------- | ------ | -------- |
| `"soft"`        | `4px`   | `10px`   | `8px`   |
| `"round"`       | `999px` | `999px` | `999px` |
| `"rectangular"` | `0px`   | `0px`   | `0px`   |

- Sets the default `shape` property to `"soft"` for `ios` and `md`
themes and `"round"` for the ionic theme.
- Updates the `border-radius` to apply to the shape classes instead of
`:host`
- Updates the `ios` theme to use `10px` for `"soft"` as this was taken
from the App Store:

![ios-app-store](https://github.com/ionic-team/ionic-framework/assets/6577830/14008de2-a953-4b27-81da-13dd481c5e39)
- Updates the `md` theme to use `8px` for `"soft"` as this is taken from
the [Material Design 3
guidelines](https://m3.material.io/components/chips/specs#590903f7-2bf5-46ab-9810-d052173f41f1)
& the previous value of `16px` is the equivalent of the `999px` round
shape due to the height being `32px`
- Adds support for the `"round"` and `"rectangular"` shapes in `ios` and
`md` themes

## Does this introduce a breaking change?

- [x] Yes
- [ ] No

BREAKING CHANGE:

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.

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-05-03 14:33:55 -04:00
Brandy Carney
7bbbd4b6b8 feat(card): set round as the default shape for all themes (#29387)
Issue number: internal

---------

## What is the current behavior?
The `shape` property defaults to `undefined` which evaluates to the
"Soft" shape for all themes.

| Property Value | CSS Value (`ionic`) | CSS Value (`ios`) | CSS Value
(`md`) |
| --------------- | ------ | ----------- | ----------- |
| `undefined`     | `4px`  | `8px `      | `4px`      |
| `"round"`       | `16px` | unsupported | unsupported |
| `"rectangular"` | `0px`  | unsupported | unsupported |

## What is the new behavior?
| Property Value | CSS Value (`ionic`) | CSS Value (`ios`) | CSS Value
(`md`) |
| --------------- | ------- | ------ | -------- |
| `"soft"`        | `4px`   | `8px`   | `4px`   |
| `"round"`       | `16px` | `14px` | `12px` |
| `"rectangular"` | `0px`   | `0px`   | `0px`   |

- Adds support for the `"soft"` shape using the existing values for
`undefined`
- Sets the default `shape` property to `"round"` for all themes and
updates the `border-radius` to apply to the shape classes instead of
`:host`
- Adds support for the `"round"` and `"rectangular"` shapes in `ios` and
`md`
- Updates the `ios` theme to use `14px` for `"round"` as this is taken
from the card in the iOS App Store
<img width="400px"
src="https://github.com/ionic-team/ionic-framework/assets/6577830/51f7028c-990d-48b5-b3e0-9909dae7e31c">
- Updates the `md` theme to use `12px` for `"round"` as this is taken
from the [Material Design 3
guidelines](https://m3.material.io/components/cards/specs#daab7734-3b3e-464c-a967-7c7fa14e6478)

## Does this introduce a breaking change?

- [x] Yes
- [ ] No

BREAKING CHANGE:

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.

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-05-03 14:04:30 -04:00
Brandy Carney
5c7a782c42 chore(git): sync with next (#29454) 2024-05-03 12:10:38 -04:00
Brandy Carney
09a0e6e907 Merge branch 'next' into chore-sync-ROU-4848-next 2024-05-03 11:11:49 -04:00
Brandy Carney
7c7c483ab9 chore(git): sync with main (#29445) 2024-05-03 11:02:25 -04:00
Sean Perkins
8acf8f3c96 chore: vue will build successfully 2024-05-02 18:49:42 -04:00
Brandy Carney
ef9b823dcd style: run build, lint, and remove !default Sass variables 2024-05-02 17:30:30 -04:00
Brandy Carney
8b834387d4 Merge branch 'main' into chore-update-next-from-main 2024-05-02 16:43:54 -04:00
Maria Hutt
4a4d447e9d fix(input): match medium size for ionic theme (#29403) 2024-04-30 08:27:34 -07:00
Sean Perkins
e0dfb61157 feat(input): add item highlight for ionic theme (#29395)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

The current border implementation causes layout shift. 

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Matches MD highlight effect for the focus border
- Border implementation does not cause layout shift

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-04-29 10:41:10 -04:00
Brandy Carney
1116cdd44a chore(breaking): archive v8 breaking changes (#29394)
Archives the v8 breaking changes document to prepare for the v9 breaking changes.
2024-04-24 13:10:48 -04:00
Brandy Carney
c855add260 Merge branch 'next' into ROU-4848 2024-04-24 11:13:01 -04:00
Sean Perkins
2b748c7df7 chore: sync with main (#29385)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Syncs the `next` branch with the latest from `main`

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-04-24 09:52:30 -04:00
Sean Perkins
3c435fd182 chore: prettier formatting 2024-04-23 17:46:34 -04:00
Sean Perkins
305ea7b85e chore: update import path for stylesheet 2024-04-23 17:37:58 -04:00
Sean Perkins
dc2db1204f Merge remote-tracking branch 'origin/main' into sp/sync-next-with-main-04-23 2024-04-23 17:34:32 -04:00
Brandy Carney
c6127e91f0 chore(input): lint styles and add TODO for future work 2024-04-23 16:01:12 -04:00
Brandy Carney
d7eb539131 Merge branch 'next' into ROU-4848 2024-04-23 15:35:00 -04:00
Brandy Carney
fa2fabdb0a feat(tabs): add ionic theme for tab bar and tab button (#29359)
Issue number: internal

---------

## What is the current behavior?
Tab bar & tab button use the `md` styles for the `ionic` theme

## What is the new behavior?
Adds the following styles for the `ionic` theme:
- Rectangular, fixed tab bar
- Box shadow with elevation z2
- Selected, activated, and focused states

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information
- A ticket (FW-6186) has been created to track updating the hardcoded
hex values to design tokens
- A ticket (FW-6189) has been created to add badge styles
2024-04-19 14:26:15 -04:00
Bernardo Cardoso
1e757513ce feat(ionic-theme): improve scss architecture for ionic theme (#29345)
Issue number: None

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

This PR follows the architectural changes defined on the _SCSS
Architecture Design Doc_. Due to some of the developments done in the
meantime, not everything that was defined on that document was followed
and some sections were simplified.

Overall, there were two guidelines that supported the work on this PR:
- Have no impact on the current scss partials & CSS architecture for the
`md/iOS` themes.
- Make everything related to the new `Ionic` Theme separated.

Based on these, here're the changes made:

**On Themes folder (private):**
- Renamed current internal scss partials on src/themes, related to
md/iOS, to `native.*.scss` and move them to a new folder, called
`native`. Updated imports on all framework.
- Removed the ionic prefix from the name of the mixins and function
partials on src/themes. Updated imports on all framework.
- Created new folder, named ionic, inside src/themes. This holds the
`ionic.globals.scss`, with all the mixins and functions forwarded, to be
used on other scopes.
- Replaced on already created Ionic theme files, the usage of tokens and
mixins with @use, to instead _@use
"../../themes/ionic/ionic.globals.scss" as globals;_. This ensures an
equal approach is followed everywhere and also makes it easier to change
the files imported or paths, in the future, as its all in the same
global file.
- Updated the foundations `readMe` file, with the new process for using
globals.


![themes](https://github.com/ionic-team/ionic-framework/assets/32780808/1455523c-3ccd-4310-a974-522f9f8ade02)


**On css folder (public):**
- Created new folder, named `ionic`, inside src/css. This holds all the
files related exclusively to Ionic Theme, following the same structure
as exists now for md/iOS, with a core, a bundle, utils, etc. Some files
were a bit duplicated, to eliminate imports from ios or md theme
partials. The only file common to both Themes is the `normalize.scss`.
- No folder structure or renamings were done on the existing output, to
prevent breaking-changes for developers already making imports from this
folder.
- Updated typography and link partials to use globals instead of tokens.
- Changed `font-size` styles on typography to be on `body`, instead of
`html`, to enable correct support of accessibility features on browsers
and devices, related to `font-size`.


![css](https://github.com/ionic-team/ionic-framework/assets/32780808/10bedddc-23c1-4c50-a4e4-77fb7f6c6430)


**Other changes related to global styles new architecture:**
- Updated margin & padding utility-classed generated by token, to
include css variables and padding/margin mixins.
- Updated link test to use new global Ionic bundle, correct
utility-class on ion-content and updated snapshots. The font-size
changed to 16, as its now the default on the body.
- Updated typography snapshots.
- Updated prettier format on all scss files. Later on we should make
sure this is equal for all team members.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: Sean Perkins <sean@ionic.io>
2024-04-18 17:22:24 +01:00
Maria Hutt
930f275b7e fix(input): add focused state for ionic theme (#29342)
Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
2024-04-17 08:27:15 -07:00
Amanda Johnston
ac102cf52a feat(input): add styles for clear action to ionic theme (#29337)
Issue number: Internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

For the `ionic` theme: Adjusted the size of the clear button to match
design specs, and updated the behavior so the button additionally only
shows if the native input *or* any other actions within the `ion-input`
are focused. (See code comments for details.)

The actual icon used has not been modified. The ticket says to "use the
material design clear icon as the reference icon for this feature," and
we've already added a feature allowing the icon to be customized at the
app level. Let me know if the intention was to use a different default
icon with the `ionic` theme.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-04-16 12:42:35 -05:00
Sean Perkins
ea1207174d feat(checkbox): add ionic theme styling (#29335)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Checkbox does not have an ionic theme implementation.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Adds the ionic theme styles and initial features for checkbox. 
- This PR is a combination of all the individual PRs already reviewed.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

We should confirm that the visual styles and behavior function as we
expect with all the changes combined in this PR.

---------

Co-authored-by: João Ferreira <60441552+JoaoFerreira-FrontEnd@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2024-04-16 11:19:33 -04:00
Amanda Johnston
cb71258474 feat(input): add styles for round shape to ionic theme (#29329)
Issue number: Internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Added styles for `shape="round"`, including:
- Increased border radius
- Increased padding when additionally using outline fill and large size
- Horizontal padding also applied to label when using outline fill

I also changed the `$ionic-border-radius-rounded-full` design token from
100% to 999px. `border-radius: 100%` is pretty obviously incorrect for
most browsers (screenshot taken in Chrome):

![image](https://github.com/ionic-team/ionic-framework/assets/90629384/5dc47a65-0446-4e39-9ce3-1c749b6329e7)

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-04-16 09:52:27 -05:00
Maria Hutt
3b0f3af897 fix(input): add disabled state to the ionic theme (#29323)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-04-15 12:49:50 -07:00
Amanda Johnston
6e45fef869 test(input): change size tests to use stacked label placements (#29334)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Some of the size screenshot tests use `label-placement="floating"`.
Because this label placement isn't scope we've gotten to yet, the
screenshots look broken. This is okay in itself, but it causes confusion
when the screenshots are updated for other unrelated features since
reviewers don't expect the appearance to be off.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Tests changed to use `label-placement="stacked"`, which is functionally
the same as `floating` when the input has a value, but has the proper
styling.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-04-15 14:38:11 -05:00
Sean Perkins
62a3e115ef chore(ci): stability for test-core-clean-build (#29338)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

CI will fail randomly due to which stylesheet is processed last by
rollup in Stencil. This leads to random failures.

This is caused by some of the new ionic stylesheets not importing the
same common stylesheet that included the CSS variable documentation.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Temporarily copies and pastes the documentation blocks to the affected
ionic stylesheets
- CI should no longer fail randomly when comparing the generated
`api.txt` output
- Adds a technical debt track to track removing these changes once the
bug in Stencil is resolved and released

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-04-12 16:18:15 -04:00
Sean Perkins
2414b78bef feat(tokens): generate rgb variants of colors (#29331)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

The generated design tokens only generate HEX output of colors. This
prevents us from using the color tokens when we need to manipulate the
alpha channel of the color.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Generate a rgb color token and sass variable for each existing color
token.
- These "rgb" formatted variables are an existing practice to Ionic
Framework. Developers are expected to pass the variable into an `rgb` or
`rgba` function.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-04-12 09:45:02 -04:00
Maria Hutt
67ec7455a8 fix(input): match valid state to ionic design (#29277)
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2024-04-11 12:22:03 -07:00
Brandy Carney
c30d685c32 feat(input): add hover state to the ionic theme (#29313)
Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
The ionic input does not have a hover state.

## What is the new behavior?
Adds a hover state. 

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information
We do not currently have a way to test hover states. See
https://github.com/microsoft/playwright/issues/12077 for more
information.

---------

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
2024-04-11 12:55:44 -04:00
Maria Hutt
96e5b2be57 fix(input) match invalid state to ionic design (#29291)
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
2024-04-11 09:51:42 -07:00
Bernardo Cardoso
95daa05a49 feat(chip): add shape to ionic theme (#29303)
Issue number: None

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added new prop `shape`, only supported on Ionic Theme.
- Added scss for the different shapes.
- Added missing scss for font-weight and line-height.
- Added missing tests for focus state and new tests for shape.
- Added new font weight and line-height design tokens. This change
uncovered an issue on the IOnic Typography tests that resulted on
snapshots differences.
- Added & updated new snapshot baselines.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
Co-authored-by: Sean Perkins <sean@ionic.io>
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
2024-04-11 16:08:20 +01:00
Sean Perkins
3d7b669e37 Merge branch 'sp/ROU-4848-sync' into ROU-4848 2024-04-10 16:12:26 -04:00
Sean Perkins
c6b7dfe398 Merge remote-tracking branch 'origin/next' into sp/ROU-4848-sync 2024-04-10 16:10:46 -04:00
Sean Perkins
a57be0941d feat(css): global link classes for standalone and underline (#29298)
Issue number: Internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

N/A

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Adds two global classes for `.ionic-link` (standalone) and
`.ionic-link-underline` (underline) appearances.
- The global classes apply when directly applied to an anchor element
(`a`) or when used on a parent container that renders a link internally.

**Usage**

Developers will need to import the link global stylesheet at this time
to leverage the following CSS classes.

```html
<!-- Basic Usage -->
<a href="#" class="ionic-link">Standalone</a>
<a href="#" class="ionic-link-underline">Underline</a>

<!-- Nested Usage -->
<div class="ionic-link">
  <a href="#">Standalone</a>
</div>
<div class="ionic-link-underline">
  <a href="#">Underline</a>
</div>
```

**Focus and Activated States**

Developers should apply the `ion-focusable` and `ion-activatable`
classes to the anchor elements to enable proper styling on a mobile
device. For web-only usages, the fallback `:focus` and `:active` pseudo
states will apply correctly.

```html
<!-- Basic Usage -->
<a href="#" class="ionic-link ion-focusable ion-activatable">Standalone</a>
<a href="#" class="ionic-link-underline ion-focusable ion-activatable">Underline</a>
```

### Design Changes

This section is areas of the implementation that are not consistent with
the design and why.

1. Font size: Link font sizing is inherited from its content. This is to
provide visual consistency when using a link within a paragraph or
existing text content. Links should not have an explicit font size, but
can be customized by the developer if a specific font size is desired.
2. Color: `currentColor` was used in place of
`$ionic-color-neutral-900`. This is to provide better visual consistency
when a link is used within content. Text color should be set on the body
or text content, which would apply neutral-900 in places where it is
applied.
3. The text underline offset in the designs is ~3px, but all of the
design implementation is on a 4px grid. We've landed on 2px for the
offset here.

Discussed with Design and these proposed changes were verbally approved.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  4. Update the BREAKING.md file with the breaking change.
5. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-04-10 16:00:03 -04:00
Marcelino
9e7c9a5934 feat(card): Add shape feature to card and style into Ionic theme (#29292)
Issue number: resolves #

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Adds the new shapes to ionic theme card

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: Brandy Carney <brandy@ionic.io>
2024-04-10 18:20:08 +01:00
Bernardo Cardoso
e93941ffa3 docs(design-tokens): add foundations README (#29285)
<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added a new README.md file under core/src/foudantions, with
documentation about Design Tokens.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2024-04-10 17:01:30 +01:00
Sean Perkins
2e9fee8ed8 chore: sync next with feature-8.1 (#29311)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Syncs the `next` branch with `feature-8.1`

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-04-10 11:49:28 -04:00
Sean Perkins
6f42c29250 Merge branch 'next' into sp/sync-next-with-feature-8-1-04-09 2024-04-10 11:34:35 -04:00
José Rio
0decc7770d fix(button): update icon size to the default size (#29255)
Issue number: ROU-4815

---------
## What is the current behavior?
- Ionic theme, Icon size was 14px to the default button size;

## What is the new behavior?
- Ionic theme, Icon size has now 16px to the default button size;

## NOTE:
- Tests related... this a fix on top of [PR of ROU-4815
branch](https://github.com/ionic-team/ionic-framework/pull/29187) and as
was mentioned there, tests will be implemented under a task that will be
then created specifically for it.
2024-04-10 10:45:44 +01:00
Sean Perkins
1674211ce7 fix: bad merge conflict resolution
Removes the duplicate clear icon from rendering.
2024-04-09 16:56:08 -04:00
Sean Perkins
fb445322c3 Merge remote-tracking branch 'origin/feature-8.1' into sp/sync-next-with-feature-8-1-04-09 2024-04-09 15:02:05 -04:00
Amanda Johnston
bb516f0da7 feat(input): add outline appearance for stacked label to ionic theme (#29268)
Issue number: Internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

All changes are specific to the `ionic` theme.
- Styles added for `fill="outline"` plus `labelPlacement="stacked"`.
- Markup rearranged slightly to ensure label sits above outline while
still being clickable to focus the input. See code comments for details.
- The default `labelPlacement` is now `"stacked"`.
- Values for `labelPlacement` besides `"stacked"` and `"floating"`
cannot be used.

Note that per the ticket, I did not account for any other scope,
including styles for helper text, `labelPlacement="floating"`,
`shape="round"`, etc. This means that some states will look broken for
now, and will be addressed in future tickets.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2024-04-09 10:44:13 -05:00
Amanda Johnston
ca59d6c297 chore(): sync with next branch (#29299)
Issue number: resolves #

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

-
-
-

## Does this introduce a breaking change?

- [ ] Yes
- [ ] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
Co-authored-by: Marcelino <brunoapmarcelino@gmail.com>
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandy@ionic.io>
Co-authored-by: Bernardo Cardoso <32780808+BenOsodrac@users.noreply.github.com>
2024-04-08 12:57:23 -05:00
Bernardo Cardoso
7ce115993a feat(Chip): Add styles for icons inside Chip Ionic Theme (#29295)
Issue number: resolves #ROU-4838

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added styles for icons inside Chip (Ionic Theme)
- Fixed an issue related to hover status, after tokens integration

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->
2024-04-08 14:26:24 +01:00
Bernardo Cardoso
77c67f2362 feat(Chip): Add outline support for Chip Ionic Theme (#29284)
Issue number: resolves #ROU-4839

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Added support for outline option on Ionic Theme
- Replaced temporary variables with global variables from Design Tokens
- Removed associated TODO

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-04-08 11:54:19 +01:00
Bernardo Cardoso
a8c06c118e fix(design-tokens): Add missing tokens and update usage on Typography (#29283)
<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Updated missing font tokens on `_designTokens.json`.
- Updated `tokens.js` script for building utility-classes for newly
added font tokens.
- Fixed space token typo.
- Updated ionic.typography file to start using design tokens and remove
duplicated code from the tokens generated files.
- Updated Ionic Typography tests

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-04-05 14:20:12 +01:00
Bernardo Cardoso
19f7be8877 feat(tokens): add design tokens architecture (#29245)
<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Following the Design Doc for the new Ionic Design System, an
architecture for Design Tokens was added.

1. Added new `foundations` folder inside the `src`, to hold all the
tokens related files.
2. On this file, a json with all the tokens for the new Design System
was added. The format followed was the one suggested on the [W3C
draft](https://design-tokens.github.io/community-group/format/).
3. Added a dev dependency for [Styles
Dictionary](https://amzn.github.io/style-dictionary/#/), version 3.9.2.
4. Added a tokens.js script that will take care of transforming the json
tokens into the desired output. For now, three files are being
generated: ionic.vars.css (:root with all CSS Variables); ionic.vars.css
(scss variables for each token) and ionic.utility.css (a new
utility-class for each token)
5. Added the script `npm run build.tokens` to package.json, that will
generate the three files mentioned above.

For now, all these changes bring no impact to the rest of the Framework,
as these variables are not yet being consumed.

The `margin`, `padding` and `border-radius` were removed from the
prohibited properties on lint, to prevent lint errors with the new
utility-classes. This is very open to discussion/feedback if it's seen
as not ok.

The `build` command now includes the `build.tokens` script, to make sure
the files are always generated, in case someone forget to run the
command, after changing the json file!

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
6. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
2024-04-05 09:27:48 +01:00
Maria Hutt
5b62a1eafc fix(input): update error text color for ionic theme (#29270) 2024-04-04 11:14:18 -07:00
Bernardo Cardoso
1c4b6bd8f2 feat(chip): add ionic theme and visual states (#29273)
Issue number: ROU-4840

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the new behavior?

- Added a new Ionic Theme partial, with no dependencies to current
`ios/md` architecture. This is to avoid bleeding of the current Design
System into the work we are doing for the new Ionic Design System and
Theme. For that reason I duplicated part of the basic styles for the
Chip (display, box-sizing, etc) and created provisional scss variables,
that should be replaced later on with the correct global ones from the
new Design System.

- Added styles for info chip type states (default, hover, focus and
disabled)

- No new tests were done on this scope, as there're still other Chip
tasks being developed that would override any baselines defined now for
this theme. Once the initial basic work for the Chip is complete, tests
for the Ionic Theme should be implemented, under the task ROU-4837.

- A new page was created - `chip/tests/theme-ionic` - to check styles
for current implementation. This will also be used and improved in
future Chip Ionic Theme tasks.


## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->
2024-04-04 17:23:47 +01:00
Maria Hutt
3a1e70d6fd fix(input): update helper text color for ionic theme (#29269) 2024-04-04 08:48:21 -07:00
Marcelino
17f5be1edd feat(theme): add new typography styles for the ionic theme (#29212)
Issue number: **ROU-4810**

---------
## Context
All the CSS for typography is temporarily added in the `text.scss` file
because the correct architecture for the new theme implementation isn’t
ready yet. In the future, all these **Sass variables** and **CSS**
created need to be placed at the theme level in terms of architecture.
The typography of an app needs to be divided into `iOS`, `Android (md)`,
and `Ionic` themes.

---------
## What is the new behavior?

- Added new typography styles;

## Does this introduce a breaking change?

- [ ] Yes
- [X] No


## Preview

![image](https://github.com/ionic-team/ionic-framework/assets/25321845/861a13c0-8ebf-43f4-a688-3b51a36d7b06)

---------

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandy@ionic.io>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-04-04 14:21:25 +01:00
Brandy Carney
efdaf38520 fix(button): show correct background for activated button with color (#29222)
Updates the solid buttons with color to use the current color's shade.
2024-04-03 11:48:06 -04:00
Brandy Carney
e9654436a6 feat(input): add the large size for the ionic theme (#29249)
Issue number: internal

---------

## What is the current behavior?
Input does not have a size property.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Adds the `size` property with support for the `"large"` size on the
`"ionic"` theme only
- Adds tests for the size property
- Note: the screenshots will not look right until the fill styles are
added

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-04-03 11:19:09 -04:00
Sean Perkins
b11c630410 fix(core): fallback detection for themes and modes (#29224)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

With the latest changes on `next`, the fallback behavior for detecting
the themes from the Ionic config does not work when using
`ion-router-outlet`.

For example, in a React app with:

```ts
setupIonicReact({
  theme: 'ios'
});
```

and a template of:
```tsx
<IonApp>
    <IonReactRouter>
      <IonRouterOutlet>
         /* All children will apply the default mode for the mode and theme - not expected */
     </IonRouterOutlet>
  </IonReactRouter>
</IonApp>
```

All components rendered inside the `IonRouterOutlet` will apply the
`mode` detection for the `theme`. This is not expected behavior, since
the configuration has specified the `ionic` theme is the default theme.

This problem occurs due to this specific logic:
```ts
const elmMode = (elm as any).mode || elm.getAttribute('mode');
```

The `ion-router-outlet` component has a property defined on the class
for `mode`:
ca0923812a/core/src/components/router-outlet/router-outlet.tsx (L42)

This means that `defaultMode` will always apply over the Ionic config's
theme (`defaultTheme`).

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Specifying the `ionic` theme from the `initialize`/`setupIonicReact`
functions will persist to children components.
- Developers can still use the `mode` to persist the changes to child
nodes. However for in the case of `IonRouterOutlet`, it will require
actually specifying the attribute in the mark-up:
```tsx
<IonRouterOutlet mode="md">
  /* Any children will apply the "md" mode and theme */
</IonRouterOutlet>
```

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-04-02 22:26:14 -04:00
Brandy Carney
4fc3bbbe5f feat(input): add ionic theme (#29247)
Issue number: internal

---------

## What is the new behavior?
Adds the initial files for the Ionic input.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-04-01 15:34:49 -04:00
Sean Perkins
5234224700 chore(playwright): combine test configs for themes and modes (#29206)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Developers are not able to easily add the "ionic" theme to existing test
cases, without running the test against both iOS and MD mode:

```ts
configs({ themes: ['ios', 'md', 'ionic'] })
// Generates 4 test cases
// - iOS theme on iOS mode
// - MD theme on MD mode
// - Ionic theme on iOS mode
// - Ionic theme on MD mode
```

With the separation of `mode` into look and feel, the majority of test
cases do not require testing the mode behavior and instead only need to
test the visual theme that is applied to the component.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Removes the `themes` option from the `configs` test generator object.

```ts
configs({ modes: ['ios', 'md', 'ionic-md'] })
```

- Combines `theme` and `mode` into the existing `modes` test generator
object
- The new options are `ionic-ios` and `ionic-md`, to run the Ionic theme
against the respective mode.
- This path was preferred to avoid deprecating and migrating all
existing tests.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

I do not have a strong preference on the semantics of `ionic-ios` vs.
`ios-ionic` (theme first vs. mode first). If anyone has an opinion or
alternative suggestion, please add a comment.

---------

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2024-03-28 12:52:09 -04:00
Sean Perkins
6d6fd4af1b chore: sync next with feature-8.0 (#29225)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Syncs the `next` branch with the latest from `feature-8.0`.


## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-03-27 10:14:18 -04:00
Sean Perkins
7cfee535ac chore(angular): update component wrappers output 2024-03-27 00:15:06 -04:00
Sean Perkins
167e311474 Merge remote-tracking branch 'origin/feature-8.0' into sp/sync-next-03-27 2024-03-27 00:13:38 -04:00
Liam DeBeasi
7eae6ec591 refactor(button): update focus ring to avoid additional API (#29223) 2024-03-26 13:40:11 -04:00
José Rio
4cf1b9737d feat(button): add ionic theme implementation (#29187)
Issue number: **ROU-4815**

---------

## What is the new behavior?

- Adds an ionic theme style implementation for `ion-button`.
  - Adds a new `rectangular` shape to the button.
  - Adds two new button sizes: `xsmall` and `xlarge`.
  - Adds a new `focus-ring` CSS shadow part for the ionic theme.

## Does this introduce a breaking change?

- [ ] Yes
- [X] No


## Preview


![Screen-Recording-2024-03-20-at-1](https://github.com/ionic-team/ionic-framework/assets/5339917/0defd1b4-abd9-44bc-b0b9-cd29e0b1f24f)

---------

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandy@ionic.io>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
Co-authored-by: Sean Perkins <sean@ionic.io>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: João Ferreira <60441552+JoaoFerreira-FrontEnd@users.noreply.github.com>
Co-authored-by: João Ferreira <joao.manuel.ferreira123@gmail.com>
2024-03-25 22:17:10 -04:00
Sean Perkins
f664329f71 chore: sync with feature-8.0 (#29202)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Syncs the `next` branch with `feature-8.0`

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-03-21 16:45:15 -04:00
Sean Perkins
d73de9194d Merge remote-tracking branch 'origin/feature-8.0' into sp/sync-next-03-21 2024-03-21 16:28:35 -04:00
Sean Perkins
e8169bfddb chore: sync next with feature-8.0 (#29194)
Issue number: Internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

N/A

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Syncs `next` with the latest changes from `feature-8.0`

## Does this introduce a breaking change?

- [ ] Yes
- [ ] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2024-03-21 12:13:34 -04:00
ionitron
e375508647 chore(): add updated snapshots 2024-03-21 04:45:01 +00:00
Sean Perkins
6965205824 chore: use theme for rendering datetime 2024-03-20 21:11:01 -04:00
Sean Perkins
245a5c6f23 Merge remote-tracking branch 'origin/feature-8.0' into sp/sync-next-with-v8 2024-03-20 21:05:35 -04:00
Sean Perkins
284eb8ecaf feat: add ionic theme architecture (#29132)
Issue number: Internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Adds the base architecture to add a new theme configuration to Ionic
Framework components.
- Components can now specify an additional stylesheet for the `ionic`
theme.
- Developers can specify the `theme` and `mode` independently to control
look and feel of a component.

Test infrastructure has been updated to add support for testing the
theme configuration with Playwright.
- Existing `themes` test configuration has been renamed to `palettes`

This PR is just the initial effort to decouple Ionic's architecture to
separate look and feel and allow our dev team to start introducing the
new component appearance to the UI. There will be additional changes
required to completely add support for the Ionic theme. These changes
are targeted against the `next` branch and are not expected to be used
in a production environment at this time.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-03-18 15:45:01 -04:00
Sean Perkins
76b48a6c77 Merge remote-tracking branch 'origin/feature-8.0' into next 2024-03-14 10:34:28 -04:00
Sean Perkins
668ab98f0e Merge remote-tracking branch 'origin/feature-8.0' into next 2024-03-09 15:48:50 -05:00
4236 changed files with 40346 additions and 15168 deletions

View File

@@ -29,4 +29,4 @@ runs:
with:
name: ionic-core
output: core/CoreBuild.zip
paths: core/dist core/components core/css core/hydrate core/loader core/src/components.d.ts
paths: core/dist core/components core/src/foundations core/css core/hydrate core/loader core/src/components.d.ts

View File

@@ -31,4 +31,4 @@ runs:
with:
name: ionic-core
output: core/CoreBuild.zip
paths: core/dist core/components core/css core/hydrate core/loader core/src/components.d.ts core/api.txt
paths: core/dist core/components core/src/foundations core/css core/hydrate core/loader core/src/components.d.ts core/api.txt

View File

@@ -4,290 +4,31 @@ This is a comprehensive list of the breaking changes introduced in the major ver
## Versions
- [Version 8.x](#version-8x)
- [Version 9.x](#version-9x)
- [Version 8.x](./BREAKING_ARCHIVE/v8.md)
- [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 8.x
## Version 9.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)
- [Components](#version-9x-components)
- [Button](#version-9x-button)
- [Card](#version-9x-card)
- [Chip](#version-9x-chip)
<h2 id="version-8x-browser-platform-support">Browser and Platform Support</h2>
<h2 id="version-9x-components">Components</h2>
This section details the desktop browser, JavaScript framework, and mobile platform versions that are supported by Ionic 8.
<h4 id="version-9x-button">Button</h4>
**Minimum Browser Versions**
| Desktop Browser | Supported Versions |
| --------------- | ----------------- |
| Chrome | 89+ |
| Safari | 15+ |
| Firefox | 75+ |
| Edge | 89+ |
- 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 JavaScript Framework Versions**
| Framework | Supported Version |
| --------- | --------------------- |
| Angular | 16+ |
| React | 17+ |
| Vue | 3.0.6+ |
<h4 id="version-9x-card">Card</h4>
**Minimum Mobile Platform Versions**
| Platform | Supported Version |
| -------- | ---------------------- |
| iOS | 15+ |
| Android | 5.1+ with Chromium 89+ |
- 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.
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.
<h4 id="version-9x-chip">Chip</h4>
<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';
```
- 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.

282
BREAKING_ARCHIVE/v8.md Normal file
View File

@@ -0,0 +1,282 @@
# 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';
```

View File

@@ -3,16 +3,19 @@
# 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/ionic.mixins.scss
- src/themes/ionic.functions.color.scss
- src/themes/ionic.functions.string.scss
- src/themes/ionic.theme.default.scss
- src/themes/mixins.scss
- src/themes/functions.color.scss
- src/themes/functions.string.scss
- src/themes/native.theme.default.scss
- src/css/themes/*.scss
- scripts/tokens/*.css
indentation: 2
@@ -23,10 +26,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
@@ -40,14 +43,13 @@ 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
@@ -57,203 +59,202 @@ 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

View File

File diff suppressed because it is too large Load Diff

9327
core/package-lock.json generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -31,6 +31,7 @@
"loader/"
],
"dependencies": {
"@phosphor-icons/core": "^2.1.1",
"@stencil/core": "4.33.1",
"ionicons": "^7.2.2",
"tslib": "^2.1.0"
@@ -52,7 +53,7 @@
"@stencil/sass": "^3.0.9",
"@stencil/vue-output-target": "0.10.8",
"@types/jest": "^29.5.6",
"@types/node": "^14.6.0",
"@types/node": "^18.19.47",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"chalk": "^5.3.0",
@@ -65,10 +66,12 @@
"fs-extra": "^9.0.1",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"prettier": "^2.6.1",
"outsystems-design-tokens": "^1.2.6",
"prettier": "^2.8.8",
"rollup": "^2.26.4",
"sass": "^1.33.0",
"serve": "^14.0.1",
"style-dictionary": "^4.1.3",
"stylelint": "^13.13.1",
"stylelint-order": "^4.1.0"
},
@@ -77,6 +80,7 @@
"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": "npx build.tokens --config scripts/tokens/index.js && 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",
@@ -88,7 +92,8 @@
"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}\"",
"prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx,scss}\"",
"prettier.tokens": "prettier \"./src/foundations/*.{scss, html}\" --write --cache",
"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",

View File

@@ -28,6 +28,32 @@
document.head.appendChild(linkTag);
}
/**
* The `ionic` theme uses a different stylesheet than the `iOS` and `md` themes.
* This is to ensure that the `ionic` theme is loaded when the `ionic:theme=ionic`
* or when the HTML tag has the `theme="ionic"` attribute. This is useful for
* the snapshot tests, where the `ionic` theme is not loaded by default.
*/
const themeQuery = window.location.search.match(/ionic:theme=([a-z]+)/);
const themeAttr = document.documentElement.getAttribute('theme');
if ((themeQuery && themeQuery[1] === 'ionic') || themeAttr === 'ionic') {
const ionicThemeLinkTag = document.querySelector('link[href*="css/ionic/bundle.ionic.css"]');
if (!ionicThemeLinkTag) {
const linkTag = document.createElement('link');
linkTag.setAttribute('rel', 'stylesheet');
linkTag.setAttribute('type', 'text/css');
linkTag.setAttribute('href', '/css/ionic/bundle.ionic.css');
document.head.appendChild(linkTag);
}
const defaultThemeLinkTag = document.querySelector('link[href*="css/ionic.bundle.css"]');
if (defaultThemeLinkTag) {
defaultThemeLinkTag.remove();
}
}
window.Ionic = window.Ionic || {};
window.Ionic.config = window.Ionic.config || {};

View File

@@ -49,6 +49,17 @@ html.ios.ios {
font-family: -apple-system, BlinkMacSystemFont, "iosTestingFont", sans-serif;
}
/* Override above styles for testing scopes */
:root.ionic,
:root.ionic.ios,
:root.ionic.md,
html.ionic,
html.ionic.ios,
html.ionic.md {
--ion-background-color: var(--background);
--ion-font-family: initial;
}
/**
* Button styles should only be applied
* to native buttons that are not part of the

View File

@@ -0,0 +1,201 @@
/* eslint-disable @typescript-eslint/no-var-requires */
// 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.
(async () => {
const {
generateShadowValue,
generateFontSizeValue,
generateFontFamilyValue,
generateTypographyOutput,
generateValue,
generateColorUtilityClasses,
generateDefaultSpaceUtilityClasses,
generateSpaceUtilityClasses,
removeConsecutiveRepeatedWords,
setPrefixValue,
generateRadiusUtilityClasses,
generateBorderUtilityClasses,
generateFontUtilityClasses,
generateShadowUtilityClasses,
generateUtilityClasses
} = require('./utils.js');
const StyleDictionary = (await import('style-dictionary')).default;
// Set the prefix for variables and classes
setPrefixValue('ion');
// Register a custom file header
StyleDictionary.registerFileHeader({
name: 'custom-header',
fileHeader: async (defaultMessages = []) => {
return [...defaultMessages, 'Do not edit directly, this file was auto-generated.'];
},
});
// SCSS variables format
StyleDictionary.registerFormat({
name: 'scssVariablesFormat',
format: async function ({ dictionary, file }) {
console.log('Generating SCSS variables...');
const primitiveProperties = dictionary.allTokens.filter((prop) => prop.path[0] === 'primitives');
const scaleProperties = dictionary.allTokens.filter((prop) => prop.path[0] === 'scale');
const borderProperties = dictionary.allTokens.filter((prop) => prop.path[0] === 'border');
const semanticsProperties = dictionary.allTokens.filter((prop) => prop.path[0] === 'semantics');
const nonPrimitiveScaleBorderSemanticsProperties = dictionary.allTokens.filter(
(prop) => !['primitives', 'scale', 'border', 'semantics'].includes(prop.path[0])
);
const typographyProperties = nonPrimitiveScaleBorderSemanticsProperties.filter((prop) => prop.$type === 'typography');
const otherProperties = nonPrimitiveScaleBorderSemanticsProperties.filter((prop) => prop.$type !== 'typography');
// Order: primitives → semantics → scale → border → other → typography
const sortedProperties = [
...primitiveProperties,
...semanticsProperties,
...scaleProperties,
...borderProperties,
...otherProperties,
...typographyProperties
];
const prefixedVariables = sortedProperties.map((prop) => {
// Remove consecutive repeated words from the token name, like border-border-color
const propName = removeConsecutiveRepeatedWords(prop.name);
switch (prop.$type) {
case 'boxShadow':
return generateShadowValue(prop, propName);
case 'fontFamilies':
return generateFontFamilyValue(prop, propName, 'scss');
case 'fontSizes':
return generateFontSizeValue(prop, propName, 'scss');
case 'typography':
return generateTypographyOutput(prop, propName, true);
default:
return generateValue(prop, propName);
}
});
const fileHeader = await file.options.fileHeader();
return [
`/*\n${fileHeader.join('\n')}\n*/`,
'@use "../themes/functions.sizes" as font;\n',
prefixedVariables.join('\n') + '\n',
].join('\n');
},
});
// Create utility-classes
StyleDictionary.registerFormat({
name: 'cssUtilityClassesFormat',
format: async function ({ dictionary, file }) {
console.log('Generating Utility-Classes...');
// Arrays to store specific utility classes
const typographyUtilityClasses = [];
const otherUtilityClasses = [];
// Generate utility classes for each token
dictionary.allTokens.map((prop) => {
const tokenCategory = prop.attributes.category;
if (prop.$type === 'fontFamilies' || tokenCategory === 'scale' || tokenCategory === 'backdrop') {
// Not creating for the tokens below, as they make no sense to exist as utility-classes.
return;
}
// Remove consecutive repeated words from the token name, like border-border-color
const propName = removeConsecutiveRepeatedWords(prop.name);
if (prop.$type === 'typography') {
// Typography tokens are handled differently, as each might have a different tokenType
return typographyUtilityClasses.push(generateTypographyOutput(prop, propName, false));
} else if (tokenCategory.startsWith('round') || tokenCategory.startsWith('rectangular') || tokenCategory.startsWith('soft')) {
// Generate utility classes for border-radius shape tokens, as they have their own token json file, based on primitive tokens
return otherUtilityClasses.push(generateRadiusUtilityClasses(propName));
}
let utilityClass = '';
switch (tokenCategory) {
case 'color':
case 'primitives':
case 'semantics':
case 'text':
case 'bg':
case 'icon':
case 'state':
utilityClass = generateColorUtilityClasses(prop, propName);
break;
case 'border':
utilityClass = generateBorderUtilityClasses(prop, propName);
break;
case 'font':
utilityClass = generateFontUtilityClasses(prop, propName);
break;
case 'space':
utilityClass = generateSpaceUtilityClasses(prop, propName);
break;
case 'shadow':
case 'elevation':
utilityClass = generateShadowUtilityClasses(propName);
break;
default:
utilityClass = generateUtilityClasses(tokenCategory, propName);
}
return otherUtilityClasses.push(utilityClass);
});
const defaultSpaceUtilityClasses = generateDefaultSpaceUtilityClasses();
otherUtilityClasses.push(defaultSpaceUtilityClasses);
// Concatenate typography utility classes at the beginning
const finalOutput = typographyUtilityClasses.concat(otherUtilityClasses).join('\n');
const fileHeader = await file.options.fileHeader();
return [
`/*\n${fileHeader.join('\n')}\n*/`,
'@import "./ionic.vars";\n@import "../themes/mixins";\n',
finalOutput,
].join('\n');
},
});
})();
// APPLY THE CONFIGURATION
module.exports = {
source: ["node_modules/outsystems-design-tokens/tokens/**/*.json"],
platforms: {
scss: {
transformGroup: "scss",
buildPath: './src/foundations/',
files: [
{
destination: "ionic.vars.scss",
format: "scssVariablesFormat",
options: {
fileHeader: `custom-header`,
},
},
{
destination: "ionic.utility.scss",
format: "cssUtilityClassesFormat",
options: {
fileHeader: `custom-header`
}
}
]
}
}
};

View File

@@ -0,0 +1,335 @@
let variablesPrefix; // Variable that holds the prefix used on all css and scss variables generated
// Set the variable prefix value
function setPrefixValue(prefix) {
variablesPrefix = prefix;
return variablesPrefix;
}
// Generates a valid rgba() color
function getRgbaValue(propValue) {
// Check if its rgba color
const isRgba = hexToRgba(propValue);
// If it is, then compose rgba() color, otherwise use the normal color
if (isRgba !== null) {
return (propValue = `rgba(${isRgba.r}, ${isRgba.g}, ${isRgba.b},${isRgba.a})`);
} else {
return propValue;
}
}
// Translates an hex color value to rgb
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;
}
// Translates an hex color value to rgba
function hexToRgba(hex) {
const result = /^#?([a-f\d]{2})([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),
a: Math.round((parseInt(result[4], 16) * 100) / 255) / 100,
}
: null;
}
// Utility function to remove consecutive repeated words
function removeConsecutiveRepeatedWords(str) {
return str.replace(/(\b\w+\b)(-\1)+/g, '$1');
}
// Generates a reference variable for an alias token type
// (e.g., $ion-border-default: var(--ion-border-default, #d5d5d5) → $ion-border-default: var(--ion-border-default, $ion-primitives-neutral-400))
function getAliasReferenceVariable(prop) {
if (typeof prop.$value === 'string' && prop.$value.startsWith('{') && prop.$value.endsWith('}')) {
// Remove curly braces and replace dots with dashes
let ref = prop.$value.slice(1, -1).replace(/\./g, '-');
// Remove consecutive repeated words (e.g., border-border-radius-0 → border-radius-0)
ref = removeConsecutiveRepeatedWords(ref);
return `$${variablesPrefix}-${ref}`;
}
return null;
}
// Generates a valid box-shadow value from a shadow Design Token structure
function generateShadowValue(prop, propName) {
const cssShadow = prop.$value.map(shadow => {
// Assuming shadow is an object with properties like offsetX, offsetY, blurRadius, spreadRadius, color
const color = getRgbaValue(shadow.color);
return `${shadow.x}px ${shadow.y}px ${shadow.blur}px ${shadow.spread}px ${color}`;
}).join(', ');
return `$${variablesPrefix}-${propName}: var(--${variablesPrefix}-${propName}, ${cssShadow});`;
}
// Generates a valid font-size value from a font-size Design Token structure, while transforming the pixels to rem
function generateFontSizeValue(prop, propName, variableType = 'css') {
return variableType === 'scss'
? `$${variablesPrefix}-${propName}: var(--${variablesPrefix}-${propName}, font.px-to-rem(${parseInt(
prop.$value
)}));`
: `--${propName}: #{font.px-to-rem(${parseInt(prop.$value)})};`;
}
// Generates a valid font-family value from a font-family Design Token structure
function generateFontFamilyValue(prop, propName, variableType = 'css') {
// Remove the last word from the token, as it contains the name of the font, which we don't want to be included on the generated variables
const _propName = propName.split('-').slice(0, -1).join('-');
return variableType === 'scss'
? `$${variablesPrefix}-${_propName}: var(--${variablesPrefix}-${_propName}, "${prop.$value}", sans-serif);`
: `--${variablesPrefix}-${_propName}: "${prop.$value}", sans-serif;`;
}
// Generates a final value, based if the Design Token is of type color or not
function generateValue(prop, propName) {
// Use the original value to detect aliases
const aliasVar = getAliasReferenceVariable({ $value: prop.original.$value });
// Always generate the main variable
let mainValue;
if (aliasVar) {
mainValue = `$${variablesPrefix}-${propName}: var(--${variablesPrefix}-${propName}, ${aliasVar});`;
} else {
mainValue = `$${variablesPrefix}-${propName}: var(--${variablesPrefix}-${propName}, ${prop.$value});`;
}
// Always generate the -rgb variable if it's a color
const rgb = hexToRgb(prop.$value);
let rgbDeclaration = '';
if (rgb) {
rgbDeclaration = `\n$${variablesPrefix}-${propName}-rgb: var(--${variablesPrefix}-${propName}-rgb, ${rgb.r}, ${rgb.g}, ${rgb.b});`;
}
return `${mainValue}${rgbDeclaration}`;
}
// Generates a typography based css utility-class or scss variable from a typography token structure
function generateTypographyOutput(prop, propName, isVariable) {
const typography = prop.original.$value;
// Extract the part after the last dot and trim any extraneous characters
const extractLastPart = (str) => str.split('.').pop().replace(/[^\w-]/g, '');
const _initialWrapper = isVariable ? ': (' : ` {`;
const _endWrapper = isVariable ? ')' : `}`;
const _prefix = isVariable ? '$' : `.`;
const _endChar = isVariable ? ',' : ';';
// This exact format is needed so that it compiles the tokens with the expected lint rules
return `
${_prefix}${variablesPrefix}-${propName}${_initialWrapper}
font-size: $${variablesPrefix}-font-size-${extractLastPart(typography.fontSize)}${_endChar}
font-style: ${prop.attributes.item?.toLowerCase() === 'italic' ? 'italic' : 'normal'}${_endChar}
font-weight: $${variablesPrefix}-font-weight-${extractLastPart(typography.fontWeight)}${_endChar}
letter-spacing: $${variablesPrefix}-font-letter-spacing-${extractLastPart(typography.letterSpacing) || 0}${_endChar}
line-height: $${variablesPrefix}-font-line-height-${extractLastPart(typography.lineHeight)}${_endChar}
text-transform: ${typography.textCase}${_endChar}
text-decoration: ${typography.textDecoration}${_endChar}
${_endWrapper};
`;
}
// Generates a color based css utility-class from a color Design Token structure
function generateColorUtilityClasses(prop, className) {
const isBg = className.includes('bg');
const cssProp = isBg ? 'background-color' : 'color';
return `.${variablesPrefix}-${className} {
--${cssProp}: $${variablesPrefix}-${prop.name};
${cssProp}: $${variablesPrefix}-${prop.name};
}`;
}
// Generates margin and padding utility classes to match the token-agnostic
// utilities provided by the Ionic Framework
function generateDefaultSpaceUtilityClasses() {
const zeroMarginPaddingToken = 'space-0';
const defaultMarginPaddingToken = 'space-400';
const marginPaddingTemplate = (type) => `
.${variablesPrefix}-no-${type} {
--${type}-top: #{$${variablesPrefix}-${zeroMarginPaddingToken}};
--${type}-end: #{$${variablesPrefix}-${zeroMarginPaddingToken}};
--${type}-bottom: #{$${variablesPrefix}-${zeroMarginPaddingToken}};
--${type}-start: #{$${variablesPrefix}-${zeroMarginPaddingToken}};
@include ${type}($${variablesPrefix}-${zeroMarginPaddingToken});
};
.${variablesPrefix}-${type} {
--${type}-top: #{$${variablesPrefix}-${defaultMarginPaddingToken}};
--${type}-end: #{$${variablesPrefix}-${defaultMarginPaddingToken}};
--${type}-bottom: #{$${variablesPrefix}-${defaultMarginPaddingToken}};
--${type}-start: #{$${variablesPrefix}-${defaultMarginPaddingToken}};
@include ${type}($${variablesPrefix}-${defaultMarginPaddingToken});
};
.${variablesPrefix}-${type}-top {
--${type}-top: #{$${variablesPrefix}-${defaultMarginPaddingToken}};
@include ${type}($${variablesPrefix}-${defaultMarginPaddingToken}, null, null, null);
};
.${variablesPrefix}-${type}-end {
--${type}-end: #{$${variablesPrefix}-${defaultMarginPaddingToken}};
@include ${type}(null, $${variablesPrefix}-${defaultMarginPaddingToken}, null, null);
};
.${variablesPrefix}-${type}-bottom {
--${type}-bottom: #{$${variablesPrefix}-${defaultMarginPaddingToken}};
@include ${type}(null, null, $${variablesPrefix}-${defaultMarginPaddingToken}, null);
};
.${variablesPrefix}-${type}-start {
--${type}-start: #{$${variablesPrefix}-${defaultMarginPaddingToken}};
@include ${type}(null, null, null, $${variablesPrefix}-${defaultMarginPaddingToken});
};
.${variablesPrefix}-${type}-vertical {
--${type}-top: #{$${variablesPrefix}-${defaultMarginPaddingToken}};
--${type}-bottom: #{$${variablesPrefix}-${defaultMarginPaddingToken}};
@include ${type}($${variablesPrefix}-${defaultMarginPaddingToken}, null, $${variablesPrefix}-${defaultMarginPaddingToken}, null);
};
.${variablesPrefix}-${type}-horizontal {
--${type}-start: #{$${variablesPrefix}-${defaultMarginPaddingToken}};
--${type}-end: #{$${variablesPrefix}-${defaultMarginPaddingToken}};
@include ${type}(null, $${variablesPrefix}-${defaultMarginPaddingToken}, null, $${variablesPrefix}-${defaultMarginPaddingToken});
};
`;
return `${marginPaddingTemplate('margin')}\n${marginPaddingTemplate('padding')}`;
}
// Generates a margin or padding based css utility-class from a space Design Token structure
function generateSpaceUtilityClasses(prop, className) {
// This exact format is needed so that it compiles the tokens with the expected lint rules
// It will generate classes for margin and padding, for equal sizing on all side and each direction
const marginPaddingTemplate = (type) => `
.${variablesPrefix}-${type}-${className} {
--${type}-top: #{$${variablesPrefix}-${prop.name}};
--${type}-end: #{$${variablesPrefix}-${prop.name}};
--${type}-bottom: #{$${variablesPrefix}-${prop.name}};
--${type}-start: #{$${variablesPrefix}-${prop.name}};
@include ${type}($${variablesPrefix}-${prop.name});
};
.${variablesPrefix}-${type}-top-${className} {
--${type}-top: #{$${variablesPrefix}-${prop.name}};
@include ${type}($${variablesPrefix}-${prop.name}, null, null, null);
};
.${variablesPrefix}-${type}-end-${className} {
--${type}-end: #{$${variablesPrefix}-${prop.name}};
@include ${type}(null, $${variablesPrefix}-${prop.name}, null, null);
};
.${variablesPrefix}-${type}-bottom-${className} {
--${type}-bottom: #{$${variablesPrefix}-${prop.name}};
@include ${type}(null, null, $${variablesPrefix}-${prop.name}, null);
};
.${variablesPrefix}-${type}-start-${className} {
--${type}-start: #{$${variablesPrefix}-${prop.name}};
@include ${type}(null, null, null, $${variablesPrefix}-${prop.name});
};
`;
// Add gap utility classes for gap tokens
const generateGapUtilityClasses = () =>`
.${variablesPrefix}-gap-${prop.name} {
gap: #{$${variablesPrefix}-${prop.name}};
};
`;
return `${generateGapUtilityClasses()}\n${marginPaddingTemplate('margin')}\n${marginPaddingTemplate('padding')}`;
}
// Generates a valid box-shadow value from a shadow Design Token structure
function generateRadiusUtilityClasses(propName) {
return `.${variablesPrefix}-${propName} {
--border-radius: $${variablesPrefix}-${propName};
border-radius: $${variablesPrefix}-${propName};
}`;
}
// Generates a border based css utility-class from a font Design Token structure
function generateBorderUtilityClasses(prop, propName) {
let attribute;
switch (prop.attributes.type) {
case 'border-radius':
case 'border-style':
attribute = prop.attributes.type;
break;
case 'border-size':
attribute = 'border-width';
break;
default:
attribute = 'border-color';
}
return `.${variablesPrefix}-${propName} {
--${attribute}: $${variablesPrefix}-${propName};
${attribute}: $${variablesPrefix}-${propName};
}`;
}
// Generates a font based css utility-class from a font Design Token structure
function generateFontUtilityClasses(prop, propName) {
return `.${variablesPrefix}-${propName} {\n ${prop.attributes.type}: $${variablesPrefix}-${propName};\n}`;
}
// Generates a valid box-shadow value from a shadow Design Token structure
function generateShadowUtilityClasses(propName) {
return `.${variablesPrefix}-${propName} {
--box-shadow: $${variablesPrefix}-${propName};
box-shadow: $${variablesPrefix}-${propName};
}`;
}
// Generates a utility class for a given token category and name
function generateUtilityClasses(tokenCategory, propName){
return `.${variablesPrefix}-${propName} {\n ${tokenCategory}: $${variablesPrefix}-${propName};\n}`;
}
module.exports = {
getRgbaValue,
hexToRgb,
generateShadowValue,
generateFontSizeValue,
generateFontFamilyValue,
generateTypographyOutput,
generateValue,
getAliasReferenceVariable,
setPrefixValue,
generateRadiusUtilityClasses,
generateColorUtilityClasses,
generateDefaultSpaceUtilityClasses,
generateSpaceUtilityClasses,
removeConsecutiveRepeatedWords,
generateBorderUtilityClasses,
generateFontUtilityClasses,
generateShadowUtilityClasses,
generateUtilityClasses
};

1729
core/src/components.d.ts vendored
View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
// Accordion Group: Common
// --------------------------------------------------
:host {
display: block;
}

View File

@@ -0,0 +1,37 @@
@use "../../themes/ionic/ionic.globals.scss" as globals;
@use "./accordion-group.common";
// Ionic Accordion Group
// --------------------------------------------------
:host {
min-width: calc(#{globals.$ion-scale-6200} + #{globals.$ion-space-600});
background-color: globals.$ion-bg-neutral-subtlest-default;
}
// Inset Accordion Group
// --------------------------------------------------
// Shape and padding only apply if the group is inset
:host(.accordion-group-expand-inset) {
@include globals.padding(globals.$ion-space-100);
}
:host(.accordion-group-expand-inset.accordion-group-shape-round) {
--border-radius: #{globals.$ion-border-radius-400};
@include globals.border-radius(globals.$ion-border-radius-400);
}
:host(.accordion-group-expand-inset.accordion-group-shape-soft) {
--border-radius: #{globals.$ion-border-radius-200};
@include globals.border-radius(globals.$ion-border-radius-200);
}
:host(.accordion-group-expand-inset.accordion-group-shape-rectangular) {
--border-radius: #{globals.$ion-border-radius-0};
@include globals.border-radius(globals.$ion-border-radius-0);
}

View File

@@ -1,4 +1,4 @@
@import "./accordion-group";
@import "./accordion-group.native";
// iOS Accordion Group
// --------------------------------------------------

View File

@@ -1,4 +1,4 @@
@import "./accordion-group";
@import "./accordion-group.native";
@import "../accordion/accordion.md.vars";
// Material Design Accordion Group
@@ -11,7 +11,12 @@
: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) {

View File

@@ -1,13 +1,10 @@
@import "../../themes/ionic.globals";
@import "./accordion-group.common";
@import "../../themes/native/native.globals";
@import "../accordion/accordion.vars";
// Accordion Group
// Accordion Group: Native
// --------------------------------------------------
:host {
display: block;
}
:host(.accordion-group-expand-inset) {
@include margin($accordion-inset-margin, $accordion-inset-margin, $accordion-inset-margin, $accordion-inset-margin);
}

View File

@@ -2,18 +2,20 @@ 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 { getIonMode } from '../../global/ionic-global';
import { getIonTheme } from '../../global/ionic-global';
import type { AccordionGroupChangeEventDetail } from './accordion-group-interface';
/**
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
* @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-accordion-group',
styleUrls: {
ios: 'accordion-group.ios.scss',
md: 'accordion-group.md.scss',
ionic: 'accordion-group.ionic.scss',
},
shadow: true,
})
@@ -58,6 +60,16 @@ export class AccordionGroup implements ComponentInterface {
*/
@Prop() expand: 'compact' | 'inset' = 'compact';
/**
* Set to `"soft"` for an accordion group with slightly rounded corners,
* `"round"` for an accordion group with fully rounded corners, or
* `"rectangular"` for an accordion group without rounded corners.
*
* Defaults to `"round"` for the `ionic` theme, undefined for all other themes.
* Only applies when `expand` is set to `"inset"`.
*/
@Prop() shape?: 'soft' | 'round' | 'rectangular';
/**
* Emitted when the value property has changed as a result of a user action such as a click.
*
@@ -276,17 +288,35 @@ export class AccordionGroup implements ComponentInterface {
return Array.from(this.el.querySelectorAll(':scope > ion-accordion')) as HTMLIonAccordionElement[];
}
private getShape(): string | undefined {
const theme = getIonTheme(this);
const { shape } = this;
// TODO(ROU-11328): Remove theme check when shapes are defined for all themes.
if (theme !== 'ionic') {
return undefined;
}
if (shape === undefined) {
return 'round';
}
return shape;
}
render() {
const { disabled, readonly, expand } = this;
const mode = getIonMode(this);
const theme = getIonTheme(this);
const shape = this.getShape();
return (
<Host
class={{
[mode]: true,
[theme]: true,
'accordion-group-disabled': disabled,
'accordion-group-readonly': readonly,
[`accordion-group-expand-${expand}`]: true,
[`accordion-group-shape-${shape}`]: shape !== undefined,
}}
role="presentation"
>

View File

@@ -0,0 +1,162 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
test.describe(title('accordion-group: expand'), () => {
test.describe(title('compact'), () => {
test('should not have visual regressions', async ({ page }) => {
await page.setContent(
`
<style>
/* Background styles to show the border radius */
:root {
--background: #ccc7c7;
}
</style>
<ion-accordion-group>
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-group-expand-compact'));
});
test('should not have visual regressions when expanded', async ({ page }) => {
await page.setContent(
`
<style>
/* Background styles to show the border radius */
:root {
--background: #ccc7c7;
}
</style>
<ion-accordion-group value="first">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-group-expand-compact-expanded'));
});
});
test.describe(title('inset'), () => {
test('should not have visual regressions', async ({ page }) => {
await page.setContent(
`
<style>
/* Background styles to show the border radius */
:root {
--background: #ccc7c7;
}
</style>
<ion-accordion-group expand="inset">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-group-expand-inset'));
});
test('should not have visual regressions when expanded', async ({ page }) => {
await page.setContent(
`
<style>
/* Background styles to show the border radius */
:root {
--background: #ccc7c7;
}
</style>
<ion-accordion-group value="first" expand="inset">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-group-expand-inset-expanded'));
});
});
});
});

View File

@@ -0,0 +1,135 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8" />
<title>Accordion Group - Expand</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
<script src="../../../../../scripts/testing/scripts.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
<style>
.grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-row-gap: 20px;
grid-column-gap: 20px;
}
h2 {
font-size: 12px;
font-weight: normal;
color: #6f7378;
margin-top: 10px;
margin-left: 5px;
}
</style>
</head>
<body>
<ion-app>
<ion-header translucent="true">
<ion-toolbar>
<ion-title>Accordion Group - Expand</ion-title>
</ion-toolbar>
</ion-header>
<ion-content fullscreen="true" color="light">
<div class="grid ion-padding">
<div class="grid-item">
<h2>Default</h2>
<ion-accordion-group>
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
<div class="grid-item">
<h2>Default: Expanded</h2>
<ion-accordion-group value="first">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
<div class="grid-item">
<h2>Inset</h2>
<ion-accordion-group expand="inset">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
<div class="grid-item">
<h2>Inset: Expanded</h2>
<ion-accordion-group value="first" expand="inset">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
</div>
</ion-content>
</ion-app>
</body>
</html>

View File

@@ -0,0 +1,47 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
test.describe(title('accordion-group: shape'), () => {
['round', 'soft', 'rectangular'].forEach((shape) => {
test(`${shape} - should not have visual regressions`, async ({ page }) => {
await page.setContent(
`
<style>
/* Background styles to show the border radius */
:root {
--background: #222;
}
</style>
<ion-accordion-group value="first" expand="inset" shape="${shape}">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot(`accordion-group-shape-${shape}`));
});
});
});
});

View File

@@ -0,0 +1,135 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8" />
<title>Accordion Group - Shape</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
<script src="../../../../../scripts/testing/scripts.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
<style>
.grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-row-gap: 20px;
grid-column-gap: 20px;
}
h2 {
font-size: 12px;
font-weight: normal;
color: #6f7378;
margin-top: 10px;
margin-left: 5px;
}
</style>
</head>
<body>
<ion-app>
<ion-header translucent="true">
<ion-toolbar>
<ion-title>Accordion Group - Shape</ion-title>
</ion-toolbar>
</ion-header>
<ion-content fullscreen="true" color="light">
<div class="grid ion-padding">
<div class="grid-item">
<h2>Default</h2>
<ion-accordion-group expand="inset" value="first">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
<div class="grid-item">
<h2>Round</h2>
<ion-accordion-group expand="inset" value="first" shape="round">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
<div class="grid-item">
<h2>Soft</h2>
<ion-accordion-group expand="inset" value="first" shape="soft">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
<div class="grid-item">
<h2>Rectangular</h2>
<ion-accordion-group expand="inset" value="first" shape="rectangular">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
</div>
</ion-content>
</ion-app>
</body>
</html>

View File

@@ -0,0 +1,38 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
test.describe(title('accordion-group: states'), () => {
test('should render disabled state', async ({ page }) => {
await page.setContent(
`
<ion-accordion-group value="first" disabled="true">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-group-disabled'));
});
});
});

View File

@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8" />
<title>Accordion Group - States</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
<script src="../../../../../scripts/testing/scripts.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
<style>
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-row-gap: 20px;
grid-column-gap: 20px;
}
h2 {
font-size: 12px;
font-weight: normal;
color: #6f7378;
margin-top: 10px;
margin-left: 5px;
}
</style>
</head>
<body>
<ion-app>
<ion-header translucent="true">
<ion-toolbar>
<ion-title>Accordion Group - States</ion-title>
</ion-toolbar>
</ion-header>
<ion-content fullscreen="true" color="light">
<div class="grid ion-padding">
<div class="grid-item">
<h2>Default</h2>
<ion-accordion-group value="first">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
<div class="grid-item">
<h2>Disabled</h2>
<ion-accordion-group value="first" disabled="true">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
</div>
</ion-content>
</ion-app>
</body>
</html>

View File

@@ -1,6 +1,4 @@
@import "./accordion.vars.scss";
// Accordion
// Accordion: Common
// --------------------------------------------------
:host {
@@ -10,8 +8,6 @@
width: 100%;
background-color: $accordion-background-color;
overflow: hidden;
/**
@@ -30,14 +26,6 @@
--border-width: 0px;
}
:host(.accordion-animated) {
transition: all $accordion-transition-duration $accordion-transition-easing;
}
:host(.accordion-animated) #content {
transition: max-height $accordion-transition-duration $accordion-transition-easing;
}
#content {
overflow: hidden;
@@ -72,16 +60,6 @@
pointer-events: none;
}
/**
* We do not set the opacity on the
* host otherwise you would see the
* box-shadow behind it.
*/
:host(.accordion-disabled) #header,
:host(.accordion-disabled) #content {
opacity: $accordion-disabled-opacity;
}
@media (prefers-reduced-motion: reduce) {
:host,
#content {

View File

@@ -0,0 +1,76 @@
@use "../../themes/ionic/ionic.globals.scss" as globals;
@use "./accordion.common";
// Ionic Accordion
// --------------------------------------------------
:host {
position: relative;
}
// The border is added to the ::after element
// to properly inset the border relative to the entire
// accordion, rather than just the header.
:host::after {
@include globals.margin(null, globals.$ion-space-400, null, globals.$ion-space-400);
@include globals.position(null, 0, 0, 0);
display: block;
position: absolute;
height: globals.$ion-border-size-025;
background-color: globals.$ion-border-default;
content: "";
z-index: 3;
}
:host(.accordion-animated) {
transition: all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);
}
:host(.accordion-animated) #content {
transition: max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);
}
// Accordion Header
// --------------------------------------------------
// The border is removed from the item in the header because
// we are adding a border to the ::after element of the accordion.
::slotted(ion-item[slot="header"]) {
--border-radius: inherit;
--color: #{globals.$ion-text-default};
--border-width: #{globals.$ion-border-size-0};
--inner-border-width: #{globals.$ion-scale-0};
--min-height: #{globals.$ion-scale-700};
--padding-top: #{globals.$ion-space-300};
--padding-end: #{globals.$ion-space-400};
--padding-bottom: #{globals.$ion-space-300};
--padding-start: #{globals.$ion-space-400};
@include globals.typography(globals.$ion-heading-h6-medium);
}
// Accordion Content
// --------------------------------------------------
#content-wrapper {
@include globals.padding(null, globals.$ion-space-400, globals.$ion-space-300, globals.$ion-space-400);
@include globals.typography(globals.$ion-body-md-regular);
color: globals.$ion-text-default;
}
// Disabled Accordion
// --------------------------------------------------
:host(.accordion-disabled)::before {
@include globals.border-radius(inherit);
@include globals.disabled-state();
z-index: 2;
}

View File

@@ -1,4 +1,4 @@
@import "./accordion.scss";
@import "./accordion.native";
@import "../item/item.ios.vars";
// iOS Accordion

View File

@@ -1,4 +1,4 @@
@import "./accordion.scss";
@import "./accordion.native";
// Material Design Accordion
// --------------------------------------------------

View File

@@ -1,13 +1,14 @@
@import "../../themes/ionic.globals.md";
@import "../../themes/native/native.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;

View File

@@ -0,0 +1,27 @@
@import "./accordion.common";
@import "./accordion.vars.scss";
// Accordion: Native
// --------------------------------------------------
:host {
background-color: $accordion-background-color;
}
:host(.accordion-animated) {
transition: all $accordion-transition-duration $accordion-transition-easing;
}
:host(.accordion-animated) #content {
transition: max-height $accordion-transition-duration $accordion-transition-easing;
}
/**
* We do not set the opacity on the
* host otherwise you would see the
* box-shadow behind it.
*/
:host(.accordion-disabled) #header,
:host(.accordion-disabled) #content {
opacity: $accordion-disabled-opacity;
}

View File

@@ -1,10 +1,12 @@
import caretDownRegular from '@phosphor-icons/core/assets/regular/caret-down.svg';
import type { ComponentInterface } from '@stencil/core';
import { Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';
import { addEventListener, getElementRoot, raf, removeEventListener, transitionEndAsync } from '@utils/helpers';
import { hostContext } from '@utils/theme';
import { chevronDown } from 'ionicons/icons';
import { config } from '../../global/config';
import { getIonMode } from '../../global/ionic-global';
import { getIonTheme } from '../../global/ionic-global';
const enum AccordionState {
Collapsed = 1 << 0,
@@ -14,7 +16,8 @@ const enum AccordionState {
}
/**
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
* @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.
*
* @slot header - Content is placed at the top and is used to
* expand or collapse the accordion item.
@@ -31,6 +34,7 @@ const enum AccordionState {
styleUrls: {
ios: 'accordion.ios.scss',
md: 'accordion.md.scss',
ionic: 'accordion.ionic.scss',
},
shadow: {
delegatesFocus: true,
@@ -45,7 +49,7 @@ export class Accordion implements ComponentInterface {
private currentRaf: number | undefined;
@Element() el?: HTMLElement;
@Element() el!: HTMLElement;
@State() state: AccordionState = AccordionState.Collapsed;
@State() isNext = false;
@@ -77,7 +81,7 @@ export class Accordion implements ComponentInterface {
* rotated when the accordion is expanded
* or collapsed.
*/
@Prop() toggleIcon = chevronDown;
@Prop() toggleIcon?: string;
/**
* The slot inside of `ion-item` to
@@ -185,13 +189,34 @@ export class Accordion implements ComponentInterface {
button.setAttribute('aria-expanded', `${expanded}`);
};
get accordionToggleIcon() {
// Return the icon if it is explicitly set
if (this.toggleIcon != null) {
return this.toggleIcon;
}
// Determine the theme and map to default icons
const theme = getIonTheme(this);
const defaultIcons = {
ios: chevronDown,
ionic: caretDownRegular,
md: chevronDown,
};
// Get the default icon based on the theme, falling back to 'md' icon if necessary
const defaultIcon = defaultIcons[theme] || defaultIcons.md;
// Return the configured accordion toggle icon or the default icon
return config.get('accordionToggleIcon', defaultIcon);
}
private slotToggleIcon = () => {
const ionItem = this.getSlottedHeaderIonItem();
if (!ionItem) {
return;
}
const { toggleIconSlot, toggleIcon } = this;
const { accordionToggleIcon, toggleIconSlot } = this;
/**
* Check if there already is a toggle icon.
@@ -206,7 +231,7 @@ export class Accordion implements ComponentInterface {
iconEl.slot = toggleIconSlot;
iconEl.lazy = false;
iconEl.classList.add('ion-accordion-toggle-icon');
iconEl.icon = toggleIcon;
iconEl.icon = accordionToggleIcon;
iconEl.setAttribute('aria-hidden', 'true');
ionItem.appendChild(iconEl);
@@ -354,10 +379,6 @@ export class Accordion implements ComponentInterface {
};
private getNextSibling = () => {
if (!this.el) {
return;
}
const nextSibling = this.el.nextElementSibling;
if (nextSibling?.tagName !== 'ION-ACCORDION') {
@@ -368,10 +389,6 @@ export class Accordion implements ComponentInterface {
};
private getPreviousSibling = () => {
if (!this.el) {
return;
}
const previousSibling = this.el.previousElementSibling;
if (previousSibling?.tagName !== 'ION-ACCORDION') {
@@ -402,7 +419,7 @@ export class Accordion implements ComponentInterface {
render() {
const { disabled, readonly } = this;
const mode = getIonMode(this);
const theme = getIonTheme(this);
const expanded = this.state === AccordionState.Expanded || this.state === AccordionState.Expanding;
const headerPart = expanded ? 'header expanded' : 'header';
const contentPart = expanded ? 'content expanded' : 'content';
@@ -412,7 +429,7 @@ export class Accordion implements ComponentInterface {
return (
<Host
class={{
[mode]: true,
[theme]: true,
'accordion-expanding': this.state === AccordionState.Expanding,
'accordion-expanded': this.state === AccordionState.Expanded,
'accordion-collapsing': this.state === AccordionState.Collapsing,
@@ -425,6 +442,8 @@ export class Accordion implements ComponentInterface {
'accordion-readonly': readonly,
'accordion-animated': this.shouldAnimate(),
'in-accordion-group-expand-inset': hostContext('.accordion-group-expand-inset', this.el),
}}
>
<div

View File

@@ -1,19 +1,19 @@
@import "../../themes/ionic.globals";
@import "../../themes/native/native.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;

View File

@@ -12,6 +12,7 @@ configs().forEach(({ config, screenshot, title }) => {
});
});
});
configs({ directions: ['ltr'] }).forEach(({ config, title }) => {
test.describe(title('accordion: ionChange'), () => {
test.beforeEach(async ({ page }) => {
@@ -58,3 +59,39 @@ configs({ directions: ['ltr'] }).forEach(({ config, title }) => {
});
});
});
configs({ modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
test.describe(title('accordion: basic'), () => {
test('should not have visual regressions with text content', async ({ page }) => {
await page.setContent(
`
<ion-accordion-group value="first">
<ion-accordion value="first">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordion = page.locator('ion-accordion-group');
await expect(accordion).toHaveScreenshot(screenshot('accordion-basic-text'));
});
});
});

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,7 +1,7 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';
configs({ directions: ['ltr'] }).forEach(({ config, screenshot, title }) => {
configs({ directions: ['ltr'], modes: ['ionic-md', 'md', 'ios'] }).forEach(({ config, screenshot, title }) => {
test.describe(title('accordion: multiple'), () => {
test('should update value and visually expand items', async ({ page }) => {
await page.goto(`/src/components/accordion/test/multiple`, config);

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,48 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
test.describe(title('accordion: shape'), () => {
['round', 'soft', 'rectangular'].forEach((shape) => {
test(`${shape} - should not have visual regressions`, async ({ page }) => {
await page.setContent(
`
<style>
/* Background styles to show the border radius */
:root {
--background: #222;
}
</style>
<!-- Focused accordion to show the border radius -->
<ion-accordion-group value="first" expand="inset" shape="${shape}">
<ion-accordion value="first">
<ion-item slot="header" class="ion-focused">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot(`accordion-shape-${shape}`));
});
});
});
});

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,135 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8" />
<title>Accordion - Shape</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
<script src="../../../../../scripts/testing/scripts.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
<style>
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
grid-row-gap: 20px;
grid-column-gap: 20px;
}
h2 {
font-size: 12px;
font-weight: normal;
color: #6f7378;
margin-top: 10px;
margin-left: 5px;
}
</style>
</head>
<body>
<ion-app>
<ion-header translucent="true">
<ion-toolbar>
<ion-title>Accordion - Shape</ion-title>
</ion-toolbar>
</ion-header>
<ion-content fullscreen="true" color="light">
<div class="grid ion-padding">
<div class="grid-item">
<h2>Default</h2>
<ion-accordion-group expand="inset" value="first">
<ion-accordion value="first">
<ion-item slot="header" class="ion-focused">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
<div class="grid-item">
<h2>Round</h2>
<ion-accordion-group expand="inset" value="first" shape="round">
<ion-accordion value="first">
<ion-item slot="header" class="ion-focused">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
<div class="grid-item">
<h2>Soft</h2>
<ion-accordion-group expand="inset" value="first" shape="soft">
<ion-accordion value="first">
<ion-item slot="header" class="ion-focused">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
<div class="grid-item">
<h2>Rectangular</h2>
<ion-accordion-group expand="inset" value="first" shape="rectangular">
<ion-accordion value="first">
<ion-item slot="header" class="ion-focused">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
</div>
</div>
</ion-content>
</ion-app>
</body>
</html>

View File

@@ -0,0 +1,198 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
test.describe(title('accordion: states'), () => {
test('should render disabled state', async ({ page }) => {
await page.setContent(
`
<ion-accordion-group value="first">
<ion-accordion value="first" disabled="true">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-states-disabled'));
});
test('should render activated state', async ({ page }) => {
await page.setContent(
`
<ion-accordion-group value="first">
<ion-accordion value="first">
<ion-item slot="header" class="ion-activated">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-states-activated'));
});
test('should render focused state', async ({ page }) => {
await page.setContent(
`
<ion-accordion-group value="first">
<ion-accordion value="first">
<ion-item slot="header" class="ion-focused">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-states-focused'));
});
test('should render disabled state when group is inset', async ({ page }) => {
await page.setContent(
`
<ion-accordion-group value="first" expand="inset">
<ion-accordion value="first" disabled="true">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-states-inset-disabled'));
});
test('should render activated state when group is inset', async ({ page }) => {
await page.setContent(
`
<ion-accordion-group value="first" expand="inset">
<ion-accordion value="first">
<ion-item slot="header" class="ion-activated">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-states-inset-activated'));
});
test('should render focused state when group is inset', async ({ page }) => {
await page.setContent(
`
<ion-accordion-group value="first" expand="inset">
<ion-accordion value="first">
<ion-item slot="header" class="ion-focused">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="second">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
<ion-accordion value="third">
<ion-item slot="header">
<ion-label>Accordion title</ion-label>
</ion-item>
<div slot="content">This is the body of the accordion.</div>
</ion-accordion>
</ion-accordion-group>
`,
config
);
const accordionGroup = page.locator('ion-accordion-group');
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-states-inset-focused'));
});
});
});

Some files were not shown because too many files have changed in this diff Show More