87 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
8b834387d4 Merge branch 'main' into chore-update-next-from-main 2024-05-02 16:43:54 -04:00
ca01fe807f docs(core): ionChange will not emit from programmatically changing value (#29407)
Issue number: resolves
https://github.com/ionic-team/ionic-docs/issues/3588

---------

<!-- 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 documentation around `ionChange` not being emitted when
programmatically changing the property associated to the "value" is
either inconsistent or missing from certain components.

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

- Adds the documentation to the missing components.
- Makes the documentation consistent across 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.
-->


## 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-26 20:16:16 +00:00
245a5c6f23 Merge remote-tracking branch 'origin/feature-8.0' into sp/sync-next-with-v8 2024-03-20 21:05:35 -04:00
e8f63560eb chore: sync with main 2024-03-19 14:24:51 -04:00
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
5a42841d52 docs(toggle): remove extra backtick to fix formatting (#29160)
Removes the extra backtick in the `alignment` property description that
is causing formatting issues in the [Toggle
documentation](https://ionicframework.com/docs/api/toggle#properties):

<img width="754" alt="Screenshot 2024-03-13 at 4 45 58 PM"
src="https://github.com/ionic-team/ionic-framework/assets/6577830/d1430baf-c316-41b8-ba9c-c1b196c99d41">
2024-03-13 21:27:34 +00: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
a34188f7db feat(toggle): expose label wrapper as shadow part (#28585) 2023-11-30 14:03:51 -05:00
6438e3e919 fix(item): wrap elements and label contents when the font size increases or the elements do not fit (#28146)
1) Wraps the label text and other content in an item when there is not enough room for everything to fit, instead of truncating the label with an ellipsis. Does not apply to items containing legacy inputs.
2) Passes the legacy property up to item from checkbox, input, radio, range, select, textarea and toggle. Item adds classes for all of these and does not wrap its contents if that class exists. If a developer is using a legacy input without the legacy property on it then they will need to add the legacy property to prevent the wrapping.
3) If a developer does not want the text to wrap for labels in modern items, the `ion-text-nowrap` class can be added to the label.
2023-10-17 14:08:35 -04:00
c70432e693 fix(checkbox, radio, toggle): disabled elements are not interactive (#28294)
Issue number: resolves #28293

---------

<!-- 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. -->

Disabled toggles, radios, and checkboxes can still be enabled by
manually dispatching a click event on them.


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

- Toggles, radios, and checkboxes no longer activate if `disabled` is
set to `true`

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

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

Dev build: `7.4.4-dev.11696545130.1171e7a9`
2023-10-09 21:05:09 +00:00
5b7e422dc0 fix(radio,toggle,checkbox,select): padded space is clickable in items (#28136)
Issue number: Resolves #27169

---------

<!-- 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. -->

Clicking the padded space within an `ion-item` will not pass the click
event to the slotted `ion-radio`, `ion-checkbox`, `ion-select` or
`ion-toggle`.

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

- The padded space at the start of `.item-native` and at the end of
`.item-inner` is clickable to activate a control.
- When the item is clicked, we check if the event is a result of
clicking the control or clicking the item's padded space. If the click
event is on the control, we don't need to do anything and let the
default behavior occur. If the click event is on the padded space, we
manually call the `.click()` method for the interactive element.
- The cursor pointer displays when hovering over the padded space when a
slotted interactive control is present.


## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-09-20 03:27:36 +00:00
e6c7bb60e7 feat(checkbox, radio, toggle, range): stacked labels for form controls (#28075)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2023-09-01 09:30:59 -07:00
10d2c75f8d Merge remote-tracking branch 'origin/main' into chore/sync-with-main-5-3 2023-05-03 13:38:03 -04:00
65245826e3 fix(toggle): swipe gesture applies to knob (#27255)
Issue number: resolves #27254

---------

<!-- Please refer to our contributing documentation for any questions on
submitting a pull request, or let us know here if you need any help:
https://ionicframework.com/docs/building/contributing -->

<!-- Some docs updates need to be made in the `ionic-docs` repo, in a
separate PR. See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation
for details. -->

<!-- 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 swipe gesture is currently applied to the entire `ion-toggle`
element. This was fine for the legacy syntax, but with the modern syntax
it means users can swipe on the label text which is not correct.

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

- The toggle now creates the gesture on the `.toggle-icon` element which
is the container for the knob for both modern and legacy syntaxes.
- Moved `touch-action: none` to the host of the legacy toggle. This was
preventing scrolling from happening on the modern toggle. I double
checked with native iOS and you can scroll when a pointer moves over a
toggle.

The structure of this fix was designed to match what `ion-range` does:
a8749929e0/core/src/components/range/range.tsx (L282-L296)

| Modern | Legacy |
| - | - |
| <video
src="https://user-images.githubusercontent.com/2721089/233431240-11f0c94f-d86b-4975-afd5-e534262a6f16.mov"></video>
| <video
src="https://user-images.githubusercontent.com/2721089/233431275-6c6f7fef-6cc0-4adc-8915-6fd5c3795ade.mov"></video>
|



## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-04-26 14:50:00 +00:00
0a0345a84a refactor(many): use utils import (#27160) 2023-04-12 13:25:14 -07:00
f71d9b1101 fix(toggle): label is announced once on ios (#26937) 2023-03-09 11:37:20 -05:00
67578f6246 chore: format string values in comments with double quotes (#26857) 2023-02-28 21:16:15 -05:00
1457ce7be4 refactor(many): clarify deprecation warning (#26834) 2023-02-21 13:58:22 -05:00
1a8bd6d8c6 chore(deps): update to stencil v3 (#26663) 2023-01-31 18:07:22 -05:00
63f8525284 fix(many): legacy form control does not warn when using aria-labelledby (#26699)
resolves #26698
2023-01-30 16:02:00 -05:00
b78b454e08 revert(): revert base components feature (#26692)
The Ionic Framework team would like to re-evaluate our approach to improving customization options when building mobile applications. We are looking at other solutions that a) make customizing an app UI easier and b) are applicable to a broader set of developers.
2023-01-30 11:52:36 -05:00
18f109c7da feat(base-components): add ability to remove ios and md theme (#26669) 2023-01-24 16:18:35 -05:00
e8fb9e7328 chore(): sync with main 2023-01-23 13:38:16 -05:00
77ccac0590 fix(toggle): on-off icon is not announced by screen readers (#26641) 2023-01-19 12:40:37 -06:00
ec9f8cd5f1 fix(toggle): emitStyles only fires with legacy control (#26507) 2022-12-16 17:04:31 -05:00
b18a193684 chore(): sync with main 2022-12-08 12:39:38 -05:00
1278a292f3 feat(input, toggle): add escape hatch property (#26416) 2022-12-05 13:43:07 -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
714cec4af6 Merge remote-tracking branch 'origin/main' into chore/sync-feature-6-4-with-main 2022-11-21 16:12:09 -05:00
961e1bddd3 chore(): sync with main 2022-11-21 11:37:08 -05:00
0932f89f5d fix(toggle): rtl layout renders correctly in safari (#26315) 2022-11-21 11:33:11 -05:00
43e2b3975d feat(toggle): add toggleOnOffLabels global config option (#26087)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2022-10-31 09:49:15 -05:00
85d3bd99be feat(toggle): ionChange will only emit from user committed changes (#26078)
Co-authored-by: Sean Perkins <sean@ionic.io>
2022-10-10 09:55:58 -05:00
bc0bdc438b feat(toggle): on/off icons for toggle (#25459)
Resolves #20524
2022-07-06 12:39:34 -04:00
5676bab316 lint(eslint): migrate to eslint and prettier (#25046) 2022-04-04 11:12:53 -04:00
f295134624 style(): fix shadowed vars (#24609) 2022-01-20 10:56:33 -06:00
353dbc0537 fix(toggle): setting dir on ion-toggle to enable rtl mode now supported (#24600) 2022-01-19 13:33:47 -05:00
dc430af906 fix(all): reflect color property as an attribute for vue (#23345)
resolves #23323
2021-05-21 19:26:53 -04:00
07868354aa fix(a11y): only preventDefault for the onClick event (#22573) 2020-11-25 16:56:51 -05:00
813611a61b fix(toggle): use a native input to fix a11y issues with axe and screen readers (#22477)
fixes #22011
references #21552
2020-11-12 15:29:05 -05:00
753fd2f910 chore(colorClass): update createColorClasses() for ts4 (#21896)
Change the createColorClasses() fn so the returned type and jsx class property work well with typescript 4
2020-08-10 09:18:41 -05:00
8e11ecc136 fix(picker): haptics now work properly (#21268) 2020-05-11 15:10:19 -04:00
1fbdb2255e fix(toggle): screen readers now announce toggle properly (#21168) 2020-05-08 11:59:04 -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
d2b772f19f feat(toggle): add parts support for handle, track (#20962) 2020-04-23 12:17:17 -04:00
df1bc1e627 refactor(gesture): update Gesture API to latest (#19671) 2019-10-17 14:18:39 -04:00
48a27636c7 fix(all): component reusage (#18963)
Use new stencil APIs to allow ionic elements to be reused once removed from the DOM.

fixes #18843
fixes #17344
fixes #16453
fixes #15879
fixes #15788
fixes #15484
fixes #17890
fixes #16364
2019-08-27 16:29:37 +02:00
03c1d19e07 perf(all): minify better by using arrow functions (#18730) 2019-07-10 10:33:33 -04:00
34dfc3ce98 refactor(all): updating to newest stencil apis (#18578)
* chore(): update ionicons

* refactor(all): updating to newest stencil apis

* fix lint issues

* more changes

* moreee

* fix treeshaking

* fix config

* fix checkbox

* fix stuff

* chore(): update ionicons

* fix linting errors
2019-06-23 11:26:42 +02:00