Skip to content

Commit 6a5f2f7

Browse files
Merge branch 'feature-8.5' into ROU-11554
2 parents 69db209 + bbdaec0 commit 6a5f2f7

File tree

181 files changed

+1666
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+1666
-61
lines changed

core/api.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@ ion-checkbox,prop,alignment,"center" | "start" | undefined,undefined,false,false
398398
ion-checkbox,prop,checked,boolean,false,false,false
399399
ion-checkbox,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
400400
ion-checkbox,prop,disabled,boolean,false,false,false
401+
ion-checkbox,prop,errorText,string | undefined,undefined,false,false
402+
ion-checkbox,prop,helperText,string | undefined,undefined,false,false
401403
ion-checkbox,prop,indeterminate,boolean,false,false,false
402404
ion-checkbox,prop,justify,"end" | "space-between" | "start" | undefined,undefined,false,false
403405
ion-checkbox,prop,labelPlacement,"end" | "fixed" | "stacked" | "start",'start',false,false
@@ -431,8 +433,11 @@ ion-checkbox,css-prop,--size,md
431433
ion-checkbox,css-prop,--transition,ios
432434
ion-checkbox,css-prop,--transition,md
433435
ion-checkbox,part,container
436+
ion-checkbox,part,error-text
437+
ion-checkbox,part,helper-text
434438
ion-checkbox,part,label
435439
ion-checkbox,part,mark
440+
ion-checkbox,part,supporting-text
436441

437442
ion-chip,shadow
438443
ion-chip,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
@@ -1623,8 +1628,10 @@ ion-select,prop,cancelText,string,'Cancel',false,false
16231628
ion-select,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
16241629
ion-select,prop,compareWith,((currentValue: any, compareValue: any) => boolean) | null | string | undefined,undefined,false,false
16251630
ion-select,prop,disabled,boolean,false,false,false
1631+
ion-select,prop,errorText,string | undefined,undefined,false,false
16261632
ion-select,prop,expandedIcon,string | undefined,undefined,false,false
16271633
ion-select,prop,fill,"outline" | "solid" | undefined,undefined,false,false
1634+
ion-select,prop,helperText,string | undefined,undefined,false,false
16281635
ion-select,prop,interface,"action-sheet" | "alert" | "modal" | "popover",'alert',false,false
16291636
ion-select,prop,interfaceOptions,any,{},false,false
16301637
ion-select,prop,justify,"end" | "space-between" | "start" | undefined,undefined,false,false
@@ -1679,9 +1686,12 @@ ion-select,css-prop,--placeholder-opacity,md
16791686
ion-select,css-prop,--ripple-color,ios
16801687
ion-select,css-prop,--ripple-color,md
16811688
ion-select,part,container
1689+
ion-select,part,error-text
1690+
ion-select,part,helper-text
16821691
ion-select,part,icon
16831692
ion-select,part,label
16841693
ion-select,part,placeholder
1694+
ion-select,part,supporting-text
16851695
ion-select,part,text
16861696

16871697
ion-select-modal,scoped
@@ -1945,6 +1955,8 @@ ion-toggle,prop,checked,boolean,false,false,false
19451955
ion-toggle,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
19461956
ion-toggle,prop,disabled,boolean,false,false,false
19471957
ion-toggle,prop,enableOnOffLabels,boolean | undefined,config.get('toggleOnOffLabels'),false,false
1958+
ion-toggle,prop,errorText,string | undefined,undefined,false,false
1959+
ion-toggle,prop,helperText,string | undefined,undefined,false,false
19481960
ion-toggle,prop,justify,"end" | "space-between" | "start" | undefined,undefined,false,false
19491961
ion-toggle,prop,labelPlacement,"end" | "fixed" | "stacked" | "start",'start',false,false
19501962
ion-toggle,prop,mode,"ios" | "md",undefined,false,false
@@ -1978,8 +1990,11 @@ ion-toggle,css-prop,--track-background,ios
19781990
ion-toggle,css-prop,--track-background,md
19791991
ion-toggle,css-prop,--track-background-checked,ios
19801992
ion-toggle,css-prop,--track-background-checked,md
1993+
ion-toggle,part,error-text
19811994
ion-toggle,part,handle
1995+
ion-toggle,part,helper-text
19821996
ion-toggle,part,label
1997+
ion-toggle,part,supporting-text
19831998
ion-toggle,part,track
19841999

19852000
ion-toolbar,shadow

core/src/components.d.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,14 @@ export namespace Components {
623623
* If `true`, the user cannot interact with the checkbox.
624624
*/
625625
"disabled": boolean;
626+
/**
627+
* Text that is placed under the checkbox label and displayed when an error is detected.
628+
*/
629+
"errorText"?: string;
630+
/**
631+
* Text that is placed under the checkbox label and displayed when no error is detected.
632+
*/
633+
"helperText"?: string;
626634
/**
627635
* If `true`, the checkbox will visually appear as indeterminate.
628636
*/
@@ -2771,6 +2779,10 @@ export namespace Components {
27712779
* If `true`, the user cannot interact with the select.
27722780
*/
27732781
"disabled": boolean;
2782+
/**
2783+
* Text that is placed under the select and displayed when an error is detected.
2784+
*/
2785+
"errorText"?: string;
27742786
/**
27752787
* The toggle icon to show when the select is open. If defined, the icon rotation behavior in `md` mode will be disabled. If undefined, `toggleIcon` will be used for when the select is both open and closed.
27762788
*/
@@ -2779,6 +2791,10 @@ export namespace Components {
27792791
* The fill for the item. If `"solid"` the item will have a background. If `"outline"` the item will be transparent with a border. Only available in `md` mode.
27802792
*/
27812793
"fill"?: 'outline' | 'solid';
2794+
/**
2795+
* Text that is placed under the select and displayed when no error is detected.
2796+
*/
2797+
"helperText"?: string;
27822798
/**
27832799
* The interface the select should use: `action-sheet`, `popover`, `alert`, or `modal`.
27842800
*/
@@ -3284,6 +3300,14 @@ export namespace Components {
32843300
* Enables the on/off accessibility switch labels within the toggle.
32853301
*/
32863302
"enableOnOffLabels": boolean | undefined;
3303+
/**
3304+
* Text that is placed under the toggle label and displayed when an error is detected.
3305+
*/
3306+
"errorText"?: string;
3307+
/**
3308+
* Text that is placed under the toggle label and displayed when no error is detected.
3309+
*/
3310+
"helperText"?: string;
32873311
/**
32883312
* How to pack the label and toggle within a line. `"start"`: The label and toggle will appear on the left in LTR and on the right in RTL. `"end"`: The label and toggle will appear on the right in LTR and on the left in RTL. `"space-between"`: The label and toggle will appear on opposite ends of the line with space between the two elements. Setting this property will change the toggle `display` to `block`.
32893313
*/
@@ -5427,6 +5451,14 @@ declare namespace LocalJSX {
54275451
* If `true`, the user cannot interact with the checkbox.
54285452
*/
54295453
"disabled"?: boolean;
5454+
/**
5455+
* Text that is placed under the checkbox label and displayed when an error is detected.
5456+
*/
5457+
"errorText"?: string;
5458+
/**
5459+
* Text that is placed under the checkbox label and displayed when no error is detected.
5460+
*/
5461+
"helperText"?: string;
54305462
/**
54315463
* If `true`, the checkbox will visually appear as indeterminate.
54325464
*/
@@ -7608,6 +7640,10 @@ declare namespace LocalJSX {
76087640
* If `true`, the user cannot interact with the select.
76097641
*/
76107642
"disabled"?: boolean;
7643+
/**
7644+
* Text that is placed under the select and displayed when an error is detected.
7645+
*/
7646+
"errorText"?: string;
76117647
/**
76127648
* The toggle icon to show when the select is open. If defined, the icon rotation behavior in `md` mode will be disabled. If undefined, `toggleIcon` will be used for when the select is both open and closed.
76137649
*/
@@ -7616,6 +7652,10 @@ declare namespace LocalJSX {
76167652
* The fill for the item. If `"solid"` the item will have a background. If `"outline"` the item will be transparent with a border. Only available in `md` mode.
76177653
*/
76187654
"fill"?: 'outline' | 'solid';
7655+
/**
7656+
* Text that is placed under the select and displayed when no error is detected.
7657+
*/
7658+
"helperText"?: string;
76197659
/**
76207660
* The interface the select should use: `action-sheet`, `popover`, `alert`, or `modal`.
76217661
*/
@@ -8171,6 +8211,14 @@ declare namespace LocalJSX {
81718211
* Enables the on/off accessibility switch labels within the toggle.
81728212
*/
81738213
"enableOnOffLabels"?: boolean | undefined;
8214+
/**
8215+
* Text that is placed under the toggle label and displayed when an error is detected.
8216+
*/
8217+
"errorText"?: string;
8218+
/**
8219+
* Text that is placed under the toggle label and displayed when no error is detected.
8220+
*/
8221+
"helperText"?: string;
81748222
/**
81758223
* How to pack the label and toggle within a line. `"start"`: The label and toggle will appear on the left in LTR and on the right in RTL. `"end"`: The label and toggle will appear on the right in LTR and on the left in RTL. `"space-between"`: The label and toggle will appear on opposite ends of the line with space between the two elements. Setting this property will change the toggle `display` to `block`.
81768224
*/

core/src/components/checkbox/checkbox.scss

Lines changed: 76 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -148,46 +148,53 @@ input {
148148
opacity: 0;
149149
}
150150

151-
// Justify Content
152-
// ---------------------------------------------
151+
// Checkbox Bottom Content
152+
// ----------------------------------------------------------------
153+
154+
.checkbox-bottom {
155+
@include padding(4px, null, null, null);
156+
157+
display: flex;
153158

154-
:host(.checkbox-justify-space-between) .checkbox-wrapper {
155159
justify-content: space-between;
156-
}
157160

158-
:host(.checkbox-justify-start) .checkbox-wrapper {
159-
justify-content: start;
161+
font-size: dynamic-font(12px);
162+
163+
white-space: normal;
160164
}
161165

162-
:host(.checkbox-justify-end) .checkbox-wrapper {
163-
justify-content: end;
166+
:host(.checkbox-label-placement-stacked) .checkbox-bottom {
167+
font-size: dynamic-font(16px);
164168
}
165169

166-
// Align Items
167-
// ---------------------------------------------
170+
// Checkbox Hint Text
171+
// ----------------------------------------------------------------
168172

169-
:host(.checkbox-alignment-start) .checkbox-wrapper {
170-
align-items: start;
171-
}
173+
/**
174+
* Error text should only be shown when .ion-invalid is
175+
* present on the checkbox. Otherwise the helper text should
176+
* be shown.
177+
*/
178+
.checkbox-bottom .error-text {
179+
display: none;
172180

173-
:host(.checkbox-alignment-center) .checkbox-wrapper {
174-
align-items: center;
181+
color: ion-color(danger, base);
175182
}
176183

177-
// Justify Content & Align Items
178-
// ---------------------------------------------
184+
.checkbox-bottom .helper-text {
185+
display: block;
179186

180-
// The checkbox should be displayed as block when either justify
181-
// or alignment is set; otherwise, these properties will have no
182-
// visible effect.
183-
:host(.checkbox-justify-space-between),
184-
:host(.checkbox-justify-start),
185-
:host(.checkbox-justify-end),
186-
:host(.checkbox-alignment-start),
187-
:host(.checkbox-alignment-center) {
187+
color: $text-color-step-300;
188+
}
189+
190+
:host(.ion-touched.ion-invalid) .checkbox-bottom .error-text {
188191
display: block;
189192
}
190193

194+
:host(.ion-touched.ion-invalid) .checkbox-bottom .helper-text {
195+
display: none;
196+
}
197+
191198
// Label Placement - Start
192199
// ----------------------------------------------------------------
193200

@@ -217,6 +224,8 @@ input {
217224
*/
218225
:host(.checkbox-label-placement-end) .checkbox-wrapper {
219226
flex-direction: row-reverse;
227+
228+
justify-content: start;
220229
}
221230

222231
/**
@@ -260,6 +269,8 @@ input {
260269
*/
261270
:host(.checkbox-label-placement-stacked) .checkbox-wrapper {
262271
flex-direction: column;
272+
273+
text-align: center;
263274
}
264275

265276
:host(.checkbox-label-placement-stacked) .label-text-wrapper {
@@ -287,6 +298,46 @@ input {
287298
@include transform-origin(center, top);
288299
}
289300

301+
// Justify Content
302+
// ---------------------------------------------
303+
304+
:host(.checkbox-justify-space-between) .checkbox-wrapper {
305+
justify-content: space-between;
306+
}
307+
308+
:host(.checkbox-justify-start) .checkbox-wrapper {
309+
justify-content: start;
310+
}
311+
312+
:host(.checkbox-justify-end) .checkbox-wrapper {
313+
justify-content: end;
314+
}
315+
316+
// Align Items
317+
// ---------------------------------------------
318+
319+
:host(.checkbox-alignment-start) .checkbox-wrapper {
320+
align-items: start;
321+
}
322+
323+
:host(.checkbox-alignment-center) .checkbox-wrapper {
324+
align-items: center;
325+
}
326+
327+
// Justify Content & Align Items
328+
// ---------------------------------------------
329+
330+
// The checkbox should be displayed as block when either justify
331+
// or alignment is set; otherwise, these properties will have no
332+
// visible effect.
333+
:host(.checkbox-justify-space-between),
334+
:host(.checkbox-justify-start),
335+
:host(.checkbox-justify-end),
336+
:host(.checkbox-alignment-start),
337+
:host(.checkbox-alignment-center) {
338+
display: block;
339+
}
340+
290341
// Checked / Indeterminate Checkbox
291342
// ---------------------------------------------
292343

0 commit comments

Comments
 (0)