Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/checkbox-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/checkbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/radio-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/radio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/select-action-sheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/select-alert-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/select-alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/select-modal-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/select-modal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/select-popover-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/select-popover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/toggle-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/e2e/screenshot.spec.ts-snapshots/toggle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions demo/src/app/index/pages/checkbox/checkbox.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ <h2>checkbox</h2>
<ion-item>
<ion-checkbox justify="space-between">Space Between Label and Control</ion-checkbox>
</ion-item>
<ion-item>
<ion-checkbox helperText="Agree to the terms before continuing">Helper text</ion-checkbox>
</ion-item>
<ion-item>
<ion-checkbox class="ion-invalid ion-touched" errorText="You must agree to the terms to continue">Error text</ion-checkbox>
</ion-item>
</ion-item-group>
</ion-list>

Expand Down
14 changes: 14 additions & 0 deletions demo/src/app/index/pages/radio/radio.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,18 @@ <h2>radio</h2>
</ion-item>
</ion-radio-group>
</ion-list>

<ion-list [inset]="true">
<ion-radio-group helperText="Choose the option that suits you best">
<ion-item><ion-radio value="helper-a">Helper option A</ion-radio></ion-item>
<ion-item><ion-radio value="helper-b">Helper option B</ion-radio></ion-item>
</ion-radio-group>
</ion-list>

<ion-list [inset]="true">
<ion-radio-group class="ion-invalid ion-touched" errorText="Select one option">
<ion-item><ion-radio value="error-a">Error option A</ion-radio></ion-item>
<ion-item><ion-radio value="error-b">Error option B</ion-radio></ion-item>
</ion-radio-group>
</ion-list>
</ion-content>
16 changes: 16 additions & 0 deletions demo/src/app/index/pages/select/select.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ <h2>select</h2>
<ion-select-option value="orange">Orange</ion-select-option>
</ion-select>
</ion-item>

<ion-item>
<ion-select label="Helper text" placeholder="Favorite fruit" helperText="Choose your favorite fruit">
<ion-select-option value="apple">Apple</ion-select-option>
<ion-select-option value="banana">Banana</ion-select-option>
<ion-select-option value="orange">Orange</ion-select-option>
</ion-select>
</ion-item>

<ion-item>
<ion-select class="ion-invalid ion-touched" label="Error text" placeholder="Favorite fruit" errorText="Select one fruit">
<ion-select-option value="apple">Apple</ion-select-option>
<ion-select-option value="banana">Banana</ion-select-option>
<ion-select-option value="orange">Orange</ion-select-option>
</ion-select>
</ion-item>
</ion-item-group>
</ion-list>

Expand Down
4 changes: 4 additions & 0 deletions demo/src/app/index/pages/toggle/toggle.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ <h2>toggle</h2>
<ion-toggle label-placement="end">Label at the End</ion-toggle><br /><br />
<ion-toggle label-placement="fixed">Fixed Width Label</ion-toggle><br /><br />
<ion-toggle label-placement="stacked">Stacked Label</ion-toggle>
<br /><br />
<ion-toggle helperText="Turn this on to receive notifications">Helper text</ion-toggle>
<br /><br />
<ion-toggle class="ion-invalid ion-touched" errorText="Notifications must be enabled">Error text</ion-toggle>
</section>

<ion-toolbar color="primary">
Expand Down
5 changes: 1 addition & 4 deletions src/styles/components/ion-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ion-list.ios:not(.ios26-disabled) {
}

ion-list.list-inset.ios:not(.ios26-disabled) {
@include structured-list.layout(20px);
@include structured-list.layout(20px, 24px);

ion-radio-group,
ion-reorder-group {
Expand All @@ -18,9 +18,6 @@ ion-list.list-inset.ios:not(.ios26-disabled) {
$groups: ion-item-group, ion-reorder-group, ion-accordion-group, ion-radio-group;

:is(#{$groups}):not(:is(#{$groups}) :is(#{$groups})) {
border-radius: 24px;
overflow: hidden;

ion-item {
// To draw lines inside
--inner-padding-end: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/styles/md-ion-list-inset.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@use 'utils/structured-list';

ion-list.list-inset.md {
@include structured-list.layout(8px);
@include structured-list.layout(8px, 16px);

ion-item-group > ion-item {
& > ion-input[labelplacement='floating'] {
Expand Down
30 changes: 29 additions & 1 deletion src/styles/utils/structured-list.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@mixin layout($outer-note-inset) {
@mixin layout($outer-note-inset, $group-border-radius) {
background: transparent;

ion-list-header {
Expand Down Expand Up @@ -58,18 +58,46 @@
$groups: ion-item-group, ion-reorder-group, ion-accordion-group, ion-radio-group;

:is(#{$groups}):not(:is(#{$groups}) :is(#{$groups})) {
border-radius: $group-border-radius;
overflow: hidden;

&:has(> .radio-group-top) {
display: flex;
flex-direction: column;
border-radius: 0;
overflow: visible;

> .radio-group-top {
order: 1;
font-size: 0.9rem;
padding-block-start: 8px;
padding-inline-start: calc(var(--ion-safe-area-left, 0) + 20px);
padding-inline-end: calc(var(--ion-safe-area-right, 0) + 20px);
}

> ion-item:first-of-type {
--border-radius: #{$group-border-radius} #{$group-border-radius} 0 0;
}

> ion-item:last-of-type {
--border-radius: 0 0 #{$group-border-radius} #{$group-border-radius};
}
}

&:not(:first-of-type) {
margin-top: 16px;
}

ion-item {
&:has(ion-input.input-fill-outline),
&:has(ion-textarea.textarea-fill-outline),
&:has(ion-select:is([helpertext]:not([helpertext='']), [errortext]:not([errortext='']))),
&:has(ion-input .input-bottom > :is(.helper-text:not(:empty), .error-text:not(:empty))),
&:has(ion-textarea .textarea-bottom > :is(.helper-text:not(:empty), .error-text:not(:empty))) {
--inner-border-width: 0;
--inner-padding-bottom: 4px;
}
ion-select .select-bottom:not(:has(> :is(.helper-text:not(:empty), .error-text:not(:empty)))),
ion-input .input-bottom:not(:has(> :is(.helper-text:not(:empty), .error-text:not(:empty)))),
ion-textarea .textarea-bottom:not(:has(> :is(.helper-text:not(:empty), .error-text:not(:empty)))) {
display: none;
Expand Down