19 Commits

Author SHA1 Message Date
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
c72ecedc09 refactor(toggle): remove legacy property and support for legacy syntax (#29037)
BREAKING CHANGE:

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 from toggle. 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).
2024-02-13 17:30:17 -05:00
749df5bdce fix(toggle): set switch icon color correctly (#28812)
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 current behavior?
<!-- Please describe the current behavior that you are modifying. -->
Similar to #28809, in my work for FW-5822, I found that I had unexpected
screenshot diffs. `--ion-color-dark` was not defined in our test
infrastructure, and this toggle icon was therefore displaying in the
wrong color in the tests.

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

- Toggle has the correct icon color even when the --ion-color-dark token
is not defined

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

Introduces style changes if the token is undefined, but it should always
be defined in real-world uses.

<!--
  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>
2024-01-10 16:37:25 -05:00
995a848575 fix(many): update form controls (radio, checkbox, toggle, input, select) to have consistent disabled opacity (#27396)
Issue number: resolves #27184

---------

## What is the current behavior?
The modern form controls do not use the same opacity for their labels
when disabled, resulting in inconsistent UI when using two different
types in the same view (select vs checkbox, for example).

## What is the new behavior?
The checkbox, input, radio, range, select, textarea and toggle labels
have been updated on both modes to use the same opacity as each other
when disabled. The checkbox and radio icons have been updated to use a
different opacity than the label for `md` mode.

- Updates `ios` mode so all form controls use the same opacity of `0.3`
- I could not find any guidelines by Apple for what color these should
be, so I decided to just make them the same as what is most commonly
used & match item
- Updates `md` mode so all form control labels use the same opacity of
`0.38`
- I used the [Material Design 3
documentation](https://m2.material.io/components) to get this number as
well as the opacity of the disabled selection controls in the [Material
Design 2 figma design
kit](https://www.figma.com/community/file/778763161265841481). The
Material Design 2 documentation does not mention the opacity, but this
is also the number used by Material Design 1 so it's safe to assume it
is what the disabled form labels should also use for Material Design 2.
- Updates the `md` range so the slotted elements are also included when
setting the opacity on the label
- Updates the range, radio & checkbox tests to make sure there are
screenshots in the different disabled states
- Updates the item/disabled test to include radio & textarea so you can
see all form controls side by side

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

I downloaded screenshots of the item disabled tests and put them side by
side for `main` and this branch in order to see the differences in the
labels. The grey boxes to the left of each item are just a bigger
version of the label color for that item, so it's easier to see when
they aren't the same.

![iOS before and
after](https://github.com/ionic-team/ionic-framework/assets/6577830/2ce53625-e4e3-4565-a741-a47e27cf0275)
![MD before and
after](https://github.com/ionic-team/ionic-framework/assets/6577830/9cd83cdc-ab45-49bf-a0dc-1d78ba7f43be)

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2023-05-17 14:25:06 +00:00
96147ec1b0 fix(item): ios mode has correct padding (#26511) 2023-01-04 16:54:43 -05:00
c74901c973 feat(toggle): component can be used outside of ion-item (#26357)
resolves #25570, resolves #23213

BREAKING CHANGE:

The `--background` and `--background-checked` variables have been renamed to `--track-background` and `--track-background-checked`, respectively.
2022-11-29 12:54:31 -05:00
0932f89f5d fix(toggle): rtl layout renders correctly in safari (#26315) 2022-11-21 11:33:11 -05:00
bc0bdc438b feat(toggle): on/off icons for toggle (#25459)
Resolves #20524
2022-07-06 12:39:34 -04:00
04ace4c983 feat(toggle): improve customization with css vars and auto-adjust handle width and height (#21050)
- Updates Material Design toggle background & box-shadow to match spec
- Adds the following variables: --handle-box-shadow, --handle-height, --handle-max-height, --handle-transition, --handle-width, --handle-spacing
- Improves customization of toggle by inheriting properties where possible and auto-adjusting the handle height and position based on the width and height of the toggle

Closes #19868, closes #20474
2020-04-29 18:31:34 -04:00
02a46a1007 feat(toggle): add --border-radius and --handle-border-radius variables (#20141) 2020-01-03 12:14:02 -05:00
94e525c10b fix(toggle): change background to use CSS variable (#19012)
fixes #18940
2019-08-12 10:25:59 -04:00
045bc59b75 fix(theming): update components to use the proper colors for dark themes (#18735)
references #18713
2019-07-12 17:31:42 -04:00
2225941efb fix(toggle): do not use the contrast color for toggle inner color (#17798)
fixes #17536
2019-03-15 13:51:12 -04:00
8a4dc74324 fix(toggle): fix box-shadow overflow in toggle (#15955)
Closes #14626
2018-10-22 20:48:54 -05:00
b70bb70991 refactor(toggle): move pointer-events to base CSS
relates to #15129
2018-08-10 20:12:15 +02:00
773c2c2274 fix(toggle): add and document custom properties
references #14850
2018-08-08 11:50:30 -05:00
7a8d5f68d2 chore(stylelint): remove sass-lint/scss-lint in favor of stylelint
- remove scss-lint and sass-lint
- add stylelint and stylelint-order packages and configuration
- update all *.scss files to new syntax

fixes #14805
2018-07-19 15:10:30 -05:00
a7f1f4daa7 refactor(components): update to use shadow DOM and work with css variables
- updates components to use shadow DOM or scoped if they require css variables
- moves global styles to an external stylesheet that needs to be imported
- adds support for additional colors and removes the Sass loops to generate colors for each component
- several property renames, bug fixes, and test updates

Co-authored-by: Manu Mtz.-Almeida <manu.mtza@gmail.com>
Co-authored-by: Adam Bradley <adambradley25@gmail.com>
Co-authored-by: Cam Wiegert <cam@camwiegert.com>
2018-07-09 12:57:21 -04:00
d37623a2ca chore(packages): move the packages to root 2018-03-12 16:02:25 -04:00