You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs(select): add `modal` interface to `ion-select` docs (#3872)
* docs(select): update select docs for modal interface
* fix(select): point playground to correct demo
* feat(segment): add playground & docs for segment view (#3875)
* feat(segment): add playground & docs for segment view
* fix(segment-view): api import version
* fix(segment-content): usage & common API sections
* Force CI run
import Props from '@ionic-internal/component-api/v8/segment-content/props.md';
6
+
import Events from '@ionic-internal/component-api/v8/segment-content/events.md';
7
+
import Methods from '@ionic-internal/component-api/v8/segment-content/methods.md';
8
+
import Parts from '@ionic-internal/component-api/v8/segment-content/parts.md';
9
+
import CustomProps from '@ionic-internal/component-api/v8/segment-content/custom-props.mdx';
10
+
import Slots from '@ionic-internal/component-api/v8/segment-content/slots.md';
11
+
12
+
<head>
13
+
<title>ion-segment-content: Display control element for swipeable segments</title>
14
+
<metaname="description"content="ion-segment-contents are wrapper elements used to control the display of child elements when using swipeable segments." />
15
+
</head>
16
+
17
+
import EncapsulationPill from '@components/page/api/EncapsulationPill';
18
+
19
+
<EncapsulationPilltype="shadow" />
20
+
21
+
Segment content is a wrapper element used to control the display of child elements when using swipeable segments. Segment content elements are children of a single
22
+
[segment view](./segment-view.md) instance that is linked to a [segment](./segment.md). See our [swipeable segments](./segment.md#swipeable-segments) documentation
23
+
for more information on how to use segment contents.
24
+
25
+
## Usage
26
+
27
+
Each `ion-segment-content` needs a unique `id` attribute. This will be used to link the segment content to a segment button via the button's
import Props from '@ionic-internal/component-api/v8/segment-view/props.md';
6
+
import Events from '@ionic-internal/component-api/v8/segment-view/events.md';
7
+
import Methods from '@ionic-internal/component-api/v8/segment-view/methods.md';
8
+
import Parts from '@ionic-internal/component-api/v8/segment-view/parts.md';
9
+
import CustomProps from '@ionic-internal/component-api/v8/segment-view/custom-props.mdx';
10
+
import Slots from '@ionic-internal/component-api/v8/segment-view/slots.md';
11
+
12
+
<head>
13
+
<title>ion-segment-view: Controller element for swipeable segments</title>
14
+
<metaname="description"content="ion-segment-views are wrapper elements that link a group of segment contents to a segment" />
15
+
</head>
16
+
17
+
import EncapsulationPill from '@components/page/api/EncapsulationPill';
18
+
19
+
<EncapsulationPilltype="shadow" />
20
+
21
+
Segment view is a wrapper element that links a group of [segment contents](./segment-content.md) to a [segment](./segment.md) when using swipeable segments.
22
+
See our [swipeable segments](./segment.md#swipeable-segments) documentation for more information on how to use segment views.
Copy file name to clipboardExpand all lines: docs/api/segment.md
+16
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,22 @@ import Toolbar from '@site/static/usage/v8/toolbar/segments/index.md';
49
49
<Toolbar />
50
50
51
51
52
+
## Swipeable Segments
53
+
54
+
Each [segment button](./segment-button.md) can be associated with a [segment content](./segment-content.md) element that will be displayed
55
+
when the segment is active. With this approach, each segment's content can be swiped or scrolled between and the segment will be updated
56
+
to reflect the currently visible content.
57
+
58
+
:::warning
59
+
If no initial `value` is assigned to the `ion-segment` when using swipeable segments, the segment will default to the value of the first segment button.
60
+
61
+
Segment buttons cannot be disabled when used with swipeable segments.
62
+
:::
63
+
64
+
import Swipeable from '@site/static/usage/v8/segment/swipeable/index.md';
Copy file name to clipboardExpand all lines: docs/api/select.md
+22-10
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ import SingleSelectionExample from '@site/static/usage/v8/select/basic/single-se
70
70
71
71
## Multiple Selection
72
72
73
-
By adding the `multiple` attribute to select, users are able to select multiple options. When multiple options can be selected, the alertor popover overlay presents users with a checkbox styled list of options. The select component's value receives an array of all of the selected option values.
73
+
By adding the `multiple` attribute to select, users are able to select multiple options. When multiple options can be selected, the alert, popover, or modal overlay presents users with a checkbox styled list of options. The select component's value receives an array of all of the selected option values.
74
74
75
75
:::note
76
76
@@ -86,7 +86,7 @@ import MultipleSelectionExample from '@site/static/usage/v8/select/basic/multipl
86
86
87
87
## Interfaces
88
88
89
-
By default, select uses [ion-alert](alert.md) to open up the overlay of options in an alert. The interface can be changed to use [ion-action-sheet](action-sheet.md) or [ion-popover](popover.md)by passing `action-sheet`or `popover`, respectively, to the `interface` property. Read on to the other sections for the limitations of the different interfaces.
89
+
By default, select uses [ion-alert](alert.md) to open up the overlay of options in an alert. The interface can be changed to use [ion-action-sheet](action-sheet.md), [ion-popover](popover.md), or [ion-modal](modal.md)by passing `action-sheet`, `popover`, or `modal`, respectively, to the `interface` property. Read on to the other sections for the limitations of the different interfaces.
90
90
91
91
### Alert
92
92
@@ -107,6 +107,12 @@ import PopoverExample from '@site/static/usage/v8/select/interfaces/popover/inde
107
107
108
108
<PopoverExample />
109
109
110
+
### Modal
111
+
112
+
import ModalExample from '@site/static/usage/v8/select/interfaces/modal/index.md';
113
+
114
+
<ModalExample />
115
+
110
116
## Responding to Interaction
111
117
112
118
The main ways of handling user interaction with the select are the `ionChange`, `ionDismiss`, and `ionCancel` events. See [Events](#events) for more details on these and other events that select fires.
@@ -161,15 +167,19 @@ The alert supports two buttons: `Cancel` and `OK`. Each button's text can be cus
161
167
162
168
The `action-sheet` and `popover` interfaces do not have an `OK` button, clicking on any of the options will automatically close the overlay and select that value. The `popover` interface does not have a `Cancel` button, clicking on the backdrop will close the overlay.
163
169
170
+
The `modal` interface has a single `Close` button in the header. This button is only responsible for dismissing the modal. Any selections made will persist
171
+
after clicking this button or if the modal is dismissed using an alternative method.
172
+
164
173
import ButtonTextExample from '@site/static/usage/v8/select/customization/button-text/index.md';
165
174
166
175
<ButtonTextExample />
167
176
168
177
## Interface Options
169
178
170
-
Since select uses the alert, action sheetand popover interfaces, options can be passed to these components through the `interfaceOptions` property. This can be used to pass a custom header, subheader, css class, and more.
179
+
Since select uses the alert, action sheet, popover, and modal interfaces, options can be passed to these components through the `interfaceOptions` property. This can be used to pass a custom header, subheader, css class, and more.
171
180
172
-
See the [ion-alert docs](alert.md), [ion-action-sheet docs](action-sheet.md), and [ion-popover docs](popover.md) for the properties that each interface accepts.
181
+
See the [ion-alert docs](alert.md), [ion-action-sheet docs](action-sheet.md), [ion-popover docs](popover.md), and [ion-modal docs](modal.md)
182
+
for the properties that each interface accepts.
173
183
174
184
Note: `interfaceOptions` will not override `inputs` or `buttons` with the `alert` interface.
175
185
@@ -207,11 +217,13 @@ import StylingSelectExample from '@site/static/usage/v8/select/customization/sty
207
217
208
218
### Styling Select Interface
209
219
210
-
Customizing the interface dialog should be done by following the Customization section in that interface's documentation:
220
+
Customizing the interface dialog should be done by following the styling sections (CSS shadow parts, CSS custom properties, and slots) in
However, the Select Option does set a class for easier styling and allows for the ability to pass a class to the overlay option, see the [Select Options documentation](select-option.md) for usage examples of customizing options.
217
229
@@ -304,7 +316,7 @@ These keyboard interactions apply to all `ion-select` elements when the followin
304
316
305
317
Single selection keyboard interaction follows the [ARIA implementation patterns of a radio](https://www.w3.org/WAI/ARIA/apg/patterns/radio/).
306
318
307
-
These keyboard interactions apply to `ion-action-sheet`, `ion-alert`, and `ion-popover` elements when the overlay is presented and focused.
319
+
These keyboard interactions apply to `ion-action-sheet`, `ion-alert`, `ion-popover`, and `ion-modal` elements when the overlay is presented and focused.
@@ -321,7 +333,7 @@ These keyboard interactions apply to `ion-action-sheet`, `ion-alert`, and `ion-p
321
333
322
334
Multiple selection keyboard interaction follows the [ARIA implementation patterns of a checkbox](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/).
323
335
324
-
These keyboard interactions apply to `ion-alert`and `ion-popover` elements when the overlay is presented and multiple selection is enabled.
336
+
These keyboard interactions apply to `ion-alert`, `ion-popover`, and `ion-modal` elements when the overlay is presented and multiple selection is enabled.
0 commit comments