67 Commits

Author SHA1 Message Date
49b91692fc chore(segment): remove unused import
pointerCoord usage was removed on main.
2023-06-01 12:16:24 -04:00
66d959f5bf Merge remote-tracking branch 'origin/main' into sp/sync-feature-7.1-with-main 2023-06-01 12:10:45 -04:00
01f99597f7 fix(segment): remove duplicate ripple effect on pointerup (#27448)
Issue number: resolves #27338

---------

## What is the current behavior?
Segment button on `md` mode shows two ripple effects: once on
pointerdown and again on pointerup

## What is the new behavior?
Segment button on `md` mode only shows a ripple effect on pointerdown

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

---------

Co-authored-by: Brandy Carney <brandy@ionic.io>
2023-05-24 14:44:37 +00:00
ec95ae5cd3 feat(segment, segment-button): update segment value property to accept numbers (#27222)
Issue number: resolves #27221

---------

## What is the current behavior?

The value property of the segment component in Ionic Framework currently
only accepts string values.

## What is the new behavior?

This pull request updates the "value" property of the segment component
to accept a union of string and number types. This allows for more
versatile data input in the segment component, particularly for users
who work with numerical data.

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

## Other information

N/A
2023-05-24 09:07:57 -05:00
0a0345a84a refactor(many): use utils import (#27160) 2023-04-12 13:25:14 -07:00
3e0a905e81 fix(segment): change event fires when clicking (#27010)
resolves #27002
2023-03-23 16:18:43 -04:00
1a8bd6d8c6 chore(deps): update to stencil v3 (#26663) 2023-01-31 18:07:22 -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
c01600191e chore(): sync with main 2023-01-18 09:36:43 -05:00
77ce9e066e fix(segment): nested interactive is not rendered (#26575) 2023-01-09 13:08:01 -05:00
c2e1ad385d chore(many): replace any types and add tech debt tickets (#26293)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-01-06 09:34:55 -06:00
acb12b36ee Merge remote-tracking branch 'origin/main' into chore/sync-7.0-with-main-12-05-22 2022-12-05 11:25:10 -05:00
a2d570b7ad fix(segment): scrolling button into view is more consistent (#26369)
resolves #26368
2022-11-30 10:15:48 -05:00
961e1bddd3 chore(): sync with main 2022-11-21 11:37:08 -05:00
73ea64c02f fix(segment): scrollable segments center button on click (#26285)
resolves #25367
2022-11-16 13:58:03 -05:00
70781e4c9f fix(segment): click event triggers ionChange (#26162) 2022-10-24 15:00:17 -04:00
f1cdf18316 chore(): sync with main: 2022-10-11 11:38:27 -04:00
a03c8afb3d feat(segment): ionChange will only emit from user committed changes (#25934) 2022-09-21 10:33:58 -04:00
ae6aa0cb8e chore(eslint): add strict-boolean-expressions rule (#25768) 2022-08-23 11:50:02 -05:00
5676bab316 lint(eslint): migrate to eslint and prettier (#25046) 2022-04-04 11:12:53 -04:00
2940e73a45 fix(segment): setting dir on ion-segment to enable rtl mode now supported (#24601)
Resolves #23978
2022-01-19 15:23:14 -05:00
b6c53e539b feat(segment): add keyboard navigation, add selectOnFocus property to control selection follow focus behavior (#23590)
resolves #23520
2021-07-20 16:45:17 -04:00
932d3ca62f feat(datetime): add calendar picker (#23416)
resolves #19423

BREAKING CHANGE: The `ion-datetime` component has been revamped to use a new calendar style. As a result, some APIs have been removed. See https://github.com/ionic-team/ionic-framework/blob/master/BREAKING.md for more details.
2021-06-16 15:54:15 -04:00
dc430af906 fix(all): reflect color property as an attribute for vue (#23345)
resolves #23323
2021-05-21 19:26:53 -04:00
91ac340ae7 fix(segment, segment-button): use correct tablist and tab roles for screen readers (#23145)
* fix(segment, segment-button): change aria attributes for segment and segment-button

* add axe test

* Add tests, screen reader doc

* add updated screen reader

* fix(segment-button): move aria tags to host

* verify nvda and talkback behavior

* fix(segment-button): remove outline on focus

* Update core/src/components/segment/test/basic/index.html

Co-authored-by: Liam DeBeasi <liamdebeasi@icloud.com>
2021-04-12 09:20:59 -04:00
65bc99577c feat(segment): add swipeGesture property to allow for disabling of the swipe gesture (#22087)
resolves #22048
2020-11-13 12:38:23 -05:00
dd307b60b6 chore(): revert old segment fix in favor of new one (#22434)
This reverts commit 68afc49e9ed27acffb0b765b7be6b03e8574850d.
2020-11-05 11:38:46 -05:00
04161c9512 fix(segment-button): color property is now reactive if previously undefined (#22405)
resolves #20831
2020-10-30 16:25:52 -04:00
68afc49e9e perf(segment): improve scrolling performance on ios when using segment (#22110)
resolves #22095
2020-09-21 15:39:09 -04: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
17308f247f fix(segment): ensure checked classes get set after not having a value (#21547) 2020-06-16 11:22:17 -04:00
314dbb1a4d fix(segment): allow routerLink to work on segment buttons (#20682)
fixes #20678
2020-03-05 12:38:51 -05:00
0224bed0c9 fix(segment): segment functions properly on android 5 (#20554)
fixes #20466
2020-02-24 13:41:49 -05:00
4d50064764 fix(segment): only emit ionChange when user releases pointer from screen (#20495)
fixes #20500
fixes #20257
2020-02-18 15:11:28 -05:00
7a461c59c5 fix(segment): do not show ripple effect if disabled via config (#20542)
fixes #20533
2020-02-18 14:02:34 -05:00
e8886e98f1 fix(segment): add activated class directly to segment button (#20400)
this gets around a bug with Safari where the ::slotted css selector was not working properly
2020-02-07 12:13:09 -05:00
94159291b2 feat(components): improve button states and add new css properties (#19440)
Before users had to know the exact opacity that the MD/iOS spec called for in order to change the hover or focused background color. This allows them to change the background without having to know the opacity. 

- changes apply to Action Sheet (Buttons), Back Button, Button, FAB Button, Item, Menu Button, Segment Button, Tab Button
- greatly reduces the requirement by users to set the background hover, focused states for dark modes and custom themes, also eliminates the need to know what the hover opacity is for each based on the spec
- updates the MD dark theme per their spec
- adds a component guide for internal use changing Ionic components

references #18279 fixes #20213 fixes #19965

BREAKING CHANGE:

*Activated Class*

The `activated` class that is automatically added to buttons on press has been renamed to `ion-activated`. This will be more consistent with our `ion-focused` class we add and also will reduce conflicts with user's CSS.

*CSS Variables*

The `--background-hover`, `--background-focused` and `--background-activated` CSS variables on components that render native buttons will now have an opacity automatically set. If you are setting any of these like the following:

```
--background-hover: rgba(44, 44, 44, 0.08);
```

You will likely not see a hover state anymore. It should be updated to only set the desired color:

```
--background-hover: rgba(44, 44, 44);
```

If the opacity desired is something other than what the spec asks for, use:

```
--background-hover: rgba(44, 44, 44);
--background-hover-opacity: 1;
```
2020-01-23 16:57:47 -05:00
f896821753 fix(segment): clicking disabled button no longer adds ripple to active button (#20254)
fixes #20253
2020-01-21 16:36:41 -05:00
a5229d90ca refactor(): remove checked property in favor of parent value (#19449)
BREAKING CHANGE:


The following components have been updated to remove the checked or selected properties:

- Radio
- Segment Button
- Select

Developers should set the value property on the respective parent components in order to managed checked/selected status.

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2020-01-17 17:22:26 -05:00
dc66ce48e1 feat(segment): implement iOS 13 segment with animation (#19036)
Changes
Closes #18663

* Converts Segment to shadow
* Enables gesture to swipe between segment buttons
* Adds indicator transition to slide the indicator between buttons
* Updates global theme variables
* Removes activated state, now handled by the gesture
* Updates iOS to latest iOS 13 UI
* Ensures customization is working for the buttons and indicator
* Updates the e2e tests
2020-01-14 11:51:28 -05:00
e27962dcaf feat(title): add support for small title (#19215)
Updates title to include `small` size and updates searchbar and UI to match native.

closes #18898
2019-09-05 17:32:19 -04:00
9751f145e1 fix(segment): don't emit ionChange until didLoad (#19218)
fixes #19204
2019-08-29 09:30:37 +02:00
e82648bda2 refactor(all): update to one (part 3) (#18874) 2019-07-25 20:22:44 +02: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
b40f7d36d5 fix(): update to Stencil One 🎉🎊 2019-06-19 21:33:50 +02:00
e5c8c10029 fix(components): include mode classes on components for use in shadow (#17838)
- removes mode-less component classes from the internal CSS, use element instead
- adds mode specific classes `md` or `ios` for styling inside of shadow components
- adds e2e test that verifies mode classes exist on all ionic components, plus checks for specific classes that the components need for internal styling

fixes #17608
2019-04-16 17:28:21 -04:00
3d656ac312 docs(all): improve type docs for event 2018-12-28 20:38:24 +01:00
256745cd1e feat(segment): adds scrollable and layout props and updates to follow the spec (#16273)
Adds the ability to apply a layout to the segment button in order to better match the Material Design spec, updates the design and UI to match the spec more, and separates the segment button styles back into the proper directory.

- moves the segment button css back into segment-button directory
- updates the design to match the MD spec better
- adds layout property to match MD spec
- adds custom properties for better styling
- allows for overscroll / scrolling tabs via scrollable attribute
- changes the indicator to a div - will need to animate it
- updates e2e tests and add spec test

fixes #16232 fixes #16081
references #14853

BREAKING CHANGES

Segment Button now requires the text to be wrapped in an `ion-label` element for improved styling.

*Old usage:*

 ```html
<ion-segment-button>
  Item One
</ion-segment-button>
```
 *New usage:*

 ```html
<ion-segment-button>
  <ion-label>Item One</ion-label>
</ion-segment-button>
```

Note: this will not technically break your app, but the styles may look wrong.
2018-11-15 12:22:35 -05:00