@ionic/core 8.2.3-dev.11724326037.1eacfaff → 8.2.3-dev.11724680612.1b9ef92a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ion-input.js +14 -5
- package/components/ion-textarea.js +30 -7
- package/components/ion-thumbnail.js +2 -2
- package/components/ion-title.js +2 -2
- package/components/ion-toast.js +2 -2
- package/components/ion-toggle.js +14 -11
- package/components/ion-toolbar.js +2 -2
- package/css/ionic/bundle.ionic.css.map +1 -1
- package/css/ionic/global.bundle.ionic.css.map +1 -1
- package/css/ionic/typography.ionic.css.map +1 -1
- package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +14 -5
- package/dist/cjs/ion-textarea.cjs.entry.js +29 -7
- package/dist/cjs/ion-toast.cjs.entry.js +2 -2
- package/dist/cjs/ion-toggle.cjs.entry.js +14 -11
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/input/input.js +14 -5
- package/dist/collection/components/textarea/test/shape/textarea.e2e.js +79 -0
- package/dist/collection/components/textarea/test/size/textarea.e2e.js +123 -0
- package/dist/collection/components/textarea/textarea.ionic.css +801 -0
- package/dist/collection/components/textarea/textarea.ios.css +175 -95
- package/dist/collection/components/textarea/textarea.js +48 -8
- package/dist/collection/components/textarea/textarea.md.css +175 -95
- package/dist/collection/components/thumbnail/thumbnail.js +2 -2
- package/dist/collection/components/title/title.js +2 -2
- package/dist/collection/components/toast/toast.js +2 -2
- package/dist/collection/components/toggle/test/color/toggle.e2e.js +1 -1
- package/dist/collection/components/toggle/test/enable-on-off-labels/toggle.e2e.js +1 -1
- package/dist/collection/components/toggle/test/item/toggle.e2e.js +4 -2
- package/dist/collection/components/toggle/test/label/toggle.e2e.js +29 -0
- package/dist/collection/components/toggle/test/sizes/toggle.e2e.js +1 -1
- package/dist/collection/components/toggle/test/states/toggle.e2e.js +29 -1
- package/dist/collection/components/toggle/toggle.ionic.css +391 -0
- package/dist/collection/components/toggle/toggle.ios.css +163 -138
- package/dist/collection/components/toggle/toggle.js +12 -9
- package/dist/collection/components/toggle/toggle.md.css +163 -138
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/docs.json +47 -5
- package/dist/esm/ion-app_8.entry.js +4 -4
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-input.entry.js +14 -5
- package/dist/esm/ion-textarea.entry.js +29 -7
- package/dist/esm/ion-toast.entry.js +2 -2
- package/dist/esm/ion-toggle.entry.js +14 -11
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
- package/dist/esm-es5/ion-input.entry.js +1 -1
- package/dist/esm-es5/ion-textarea.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/html.html-data.json +22 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-13405b29.entry.js +4 -0
- package/dist/ionic/p-13c363e4.entry.js +4 -0
- package/dist/ionic/p-22711da4.system.entry.js +4 -0
- package/dist/ionic/{p-7dad531c.system.entry.js → p-31692628.system.entry.js} +1 -1
- package/dist/ionic/{p-b4b44bf9.system.entry.js → p-35fde411.system.entry.js} +1 -1
- package/dist/ionic/{p-39a39279.entry.js → p-6e7d4537.entry.js} +1 -1
- package/dist/ionic/p-7b590e46.system.js +1 -1
- package/dist/ionic/{p-f84ea1e9.system.entry.js → p-984e02c3.system.entry.js} +1 -1
- package/dist/ionic/{p-c11fdca2.entry.js → p-a971dec3.entry.js} +1 -1
- package/dist/ionic/p-aad91b75.system.entry.js +4 -0
- package/dist/ionic/{p-201d8768.system.entry.js → p-c2c3807b.system.entry.js} +1 -1
- package/dist/ionic/p-c8453a83.entry.js +4 -0
- package/dist/ionic/p-de8e8567.entry.js +4 -0
- package/dist/types/components/input/input.d.ts +1 -0
- package/dist/types/components/textarea/textarea.d.ts +13 -2
- package/dist/types/components.d.ts +12 -4
- package/hydrate/index.js +66 -31
- package/package.json +1 -1
- package/dist/ionic/p-01ae1aa0.entry.js +0 -4
- package/dist/ionic/p-4346453b.entry.js +0 -4
- package/dist/ionic/p-56c72f65.system.entry.js +0 -4
- package/dist/ionic/p-7ab9c88c.system.entry.js +0 -4
- package/dist/ionic/p-8ac5efa9.entry.js +0 -4
- package/dist/ionic/p-a6bb62ea.entry.js +0 -4
|
@@ -1,3 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a pixels given value into rem
|
|
3
|
+
*
|
|
4
|
+
* @param pixels - Value in pixels to be converted (i.e. px)
|
|
5
|
+
* @param context (optional) - Baseline value
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Convert a font size to a dynamic font size.
|
|
9
|
+
* Fonts that participate in Dynamic Type should use
|
|
10
|
+
* dynamic font sizes.
|
|
11
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
12
|
+
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
13
|
+
* convert to a unit other than $baselineUnit.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Convert a font size to a dynamic font size but impose
|
|
17
|
+
* a maximum font size.
|
|
18
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
19
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
20
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
21
|
+
* convert to a unit other than $baselineUnit.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Convert a font size to a dynamic font size but impose
|
|
25
|
+
* a minimum font size.
|
|
26
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
27
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
28
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
29
|
+
* convert to a unit other than $baselineUnit.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Convert a font size to a dynamic font size but impose
|
|
33
|
+
* maximum and minimum font sizes.
|
|
34
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
35
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
36
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
37
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
38
|
+
* convert to a unit other than $baselineUnit.
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* A heuristic that applies CSS to tablet
|
|
42
|
+
* viewports.
|
|
43
|
+
*
|
|
44
|
+
* Usage:
|
|
45
|
+
* @include tablet-viewport() {
|
|
46
|
+
* :host {
|
|
47
|
+
* background-color: green;
|
|
48
|
+
* }
|
|
49
|
+
* }
|
|
50
|
+
*/
|
|
51
|
+
/**
|
|
52
|
+
* A heuristic that applies CSS to mobile
|
|
53
|
+
* viewports (i.e. phones, not tablets).
|
|
54
|
+
*
|
|
55
|
+
* Usage:
|
|
56
|
+
* @include mobile-viewport() {
|
|
57
|
+
* :host {
|
|
58
|
+
* background-color: blue;
|
|
59
|
+
* }
|
|
60
|
+
* }
|
|
61
|
+
*/
|
|
1
62
|
/**
|
|
2
63
|
* Convert a pixels given value into rem
|
|
3
64
|
*
|
|
@@ -111,27 +172,10 @@
|
|
|
111
172
|
display: block;
|
|
112
173
|
position: relative;
|
|
113
174
|
width: 100%;
|
|
114
|
-
min-height: 44px;
|
|
115
175
|
color: var(--color);
|
|
116
|
-
font-family: var(--ion-font-family, inherit);
|
|
117
|
-
z-index: 2;
|
|
118
176
|
box-sizing: border-box;
|
|
119
177
|
}
|
|
120
178
|
|
|
121
|
-
/**
|
|
122
|
-
* Since the label sits on top of the element,
|
|
123
|
-
* the component needs to be taller otherwise the
|
|
124
|
-
* label will appear too close to the textarea text.
|
|
125
|
-
* Also, floating and stacked labels should not
|
|
126
|
-
* push the label down since it it
|
|
127
|
-
* sits on top of the textarea.
|
|
128
|
-
*/
|
|
129
|
-
:host(.textarea-label-placement-floating),
|
|
130
|
-
:host(.textarea-label-placement-stacked) {
|
|
131
|
-
--padding-top: 0px;
|
|
132
|
-
min-height: 56px;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
179
|
/**
|
|
136
180
|
* When the cols property is set we should
|
|
137
181
|
* respect that width instead of defaulting
|
|
@@ -195,6 +239,7 @@
|
|
|
195
239
|
resize: none;
|
|
196
240
|
appearance: none;
|
|
197
241
|
}
|
|
242
|
+
|
|
198
243
|
.native-textarea::placeholder {
|
|
199
244
|
padding-left: 0;
|
|
200
245
|
padding-right: 0;
|
|
@@ -229,6 +274,7 @@
|
|
|
229
274
|
position: absolute;
|
|
230
275
|
pointer-events: none;
|
|
231
276
|
}
|
|
277
|
+
|
|
232
278
|
.cloned-input {
|
|
233
279
|
inset-inline-start: 0;
|
|
234
280
|
}
|
|
@@ -279,21 +325,10 @@
|
|
|
279
325
|
caret-color: var(--highlight-color);
|
|
280
326
|
}
|
|
281
327
|
|
|
282
|
-
.native-wrapper textarea {
|
|
283
|
-
-webkit-padding-start: 0px;
|
|
284
|
-
padding-inline-start: 0px;
|
|
285
|
-
-webkit-padding-end: 0px;
|
|
286
|
-
padding-inline-end: 0px;
|
|
287
|
-
padding-top: var(--padding-top);
|
|
288
|
-
padding-bottom: var(--padding-bottom);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
328
|
.native-wrapper {
|
|
292
329
|
display: grid;
|
|
293
330
|
min-width: inherit;
|
|
294
331
|
max-width: inherit;
|
|
295
|
-
min-height: inherit;
|
|
296
|
-
max-height: inherit;
|
|
297
332
|
/**
|
|
298
333
|
* This avoids a WebKit bug where
|
|
299
334
|
* the height of the inner textarea
|
|
@@ -303,6 +338,7 @@
|
|
|
303
338
|
*/
|
|
304
339
|
grid-auto-rows: 100%;
|
|
305
340
|
}
|
|
341
|
+
|
|
306
342
|
.native-wrapper::after {
|
|
307
343
|
white-space: pre-wrap;
|
|
308
344
|
content: attr(data-replicated-value) " ";
|
|
@@ -364,21 +400,9 @@
|
|
|
364
400
|
}
|
|
365
401
|
|
|
366
402
|
.textarea-bottom {
|
|
367
|
-
/**
|
|
368
|
-
* The bottom content should take on the start and end
|
|
369
|
-
* padding so it is always aligned with either the label
|
|
370
|
-
* or the start of the textarea.
|
|
371
|
-
*/
|
|
372
|
-
-webkit-padding-start: var(--padding-start);
|
|
373
|
-
padding-inline-start: var(--padding-start);
|
|
374
|
-
-webkit-padding-end: var(--padding-end);
|
|
375
|
-
padding-inline-end: var(--padding-end);
|
|
376
|
-
padding-top: 5px;
|
|
377
|
-
padding-bottom: 0;
|
|
378
403
|
display: flex;
|
|
379
404
|
justify-content: space-between;
|
|
380
405
|
border-top: var(--border-width) var(--border-style) var(--border-color);
|
|
381
|
-
font-size: 0.75rem;
|
|
382
406
|
}
|
|
383
407
|
|
|
384
408
|
/**
|
|
@@ -421,9 +445,7 @@
|
|
|
421
445
|
*/
|
|
422
446
|
-webkit-margin-start: auto;
|
|
423
447
|
margin-inline-start: auto;
|
|
424
|
-
color: var(--ion-color-step-550, var(--ion-text-color-step-450, #737373));
|
|
425
448
|
white-space: nowrap;
|
|
426
|
-
padding-inline-start: 16px;
|
|
427
449
|
}
|
|
428
450
|
|
|
429
451
|
.label-text-wrapper {
|
|
@@ -498,20 +520,6 @@
|
|
|
498
520
|
flex-direction: row;
|
|
499
521
|
}
|
|
500
522
|
|
|
501
|
-
:host(.textarea-label-placement-start) .label-text-wrapper {
|
|
502
|
-
/**
|
|
503
|
-
* The margin between the label and
|
|
504
|
-
* the textarea should be on the end
|
|
505
|
-
* when the label sits at the start.
|
|
506
|
-
*/
|
|
507
|
-
-webkit-margin-start: 0;
|
|
508
|
-
margin-inline-start: 0;
|
|
509
|
-
-webkit-margin-end: 16px;
|
|
510
|
-
margin-inline-end: 16px;
|
|
511
|
-
margin-top: 0;
|
|
512
|
-
margin-bottom: 0;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
523
|
/**
|
|
516
524
|
* Label is on the right of the textarea in LTR and
|
|
517
525
|
* on the left in RTL.
|
|
@@ -520,34 +528,6 @@
|
|
|
520
528
|
flex-direction: row-reverse;
|
|
521
529
|
}
|
|
522
530
|
|
|
523
|
-
/**
|
|
524
|
-
* The margin between the label and
|
|
525
|
-
* the textarea should be on the start
|
|
526
|
-
* when the label sits at the end.
|
|
527
|
-
*/
|
|
528
|
-
:host(.textarea-label-placement-end) .label-text-wrapper {
|
|
529
|
-
-webkit-margin-start: 16px;
|
|
530
|
-
margin-inline-start: 16px;
|
|
531
|
-
-webkit-margin-end: 0;
|
|
532
|
-
margin-inline-end: 0;
|
|
533
|
-
margin-top: 0;
|
|
534
|
-
margin-bottom: 0;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
:host(.textarea-label-placement-fixed) .label-text-wrapper {
|
|
538
|
-
/**
|
|
539
|
-
* The margin between the label and
|
|
540
|
-
* the textarea should be on the end
|
|
541
|
-
* when the label sits at the start.
|
|
542
|
-
*/
|
|
543
|
-
-webkit-margin-start: 0;
|
|
544
|
-
margin-inline-start: 0;
|
|
545
|
-
-webkit-margin-end: 16px;
|
|
546
|
-
margin-inline-end: 16px;
|
|
547
|
-
margin-top: 0;
|
|
548
|
-
margin-bottom: 0;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
531
|
/**
|
|
552
532
|
* Label is on the left of the textarea in LTR and
|
|
553
533
|
* on the right in RTL. Label also has a fixed width.
|
|
@@ -594,6 +574,7 @@
|
|
|
594
574
|
*/
|
|
595
575
|
z-index: 2;
|
|
596
576
|
}
|
|
577
|
+
|
|
597
578
|
:host-context([dir=rtl]):host(.textarea-label-placement-stacked) .label-text-wrapper, :host-context([dir=rtl]).textarea-label-placement-stacked .label-text-wrapper, :host-context([dir=rtl]):host(.textarea-label-placement-floating) .label-text-wrapper, :host-context([dir=rtl]).textarea-label-placement-floating .label-text-wrapper {
|
|
598
579
|
transform-origin: right top;
|
|
599
580
|
}
|
|
@@ -603,7 +584,6 @@
|
|
|
603
584
|
transform-origin: right top;
|
|
604
585
|
}
|
|
605
586
|
}
|
|
606
|
-
|
|
607
587
|
/**
|
|
608
588
|
* Ensures the textarea does not
|
|
609
589
|
* overlap the label.
|
|
@@ -620,13 +600,6 @@
|
|
|
620
600
|
margin-bottom: 0px;
|
|
621
601
|
}
|
|
622
602
|
|
|
623
|
-
:host(.textarea-label-placement-stacked) ::slotted([slot=start]),
|
|
624
|
-
:host(.textarea-label-placement-stacked) ::slotted([slot=end]),
|
|
625
|
-
:host(.textarea-label-placement-floating) ::slotted([slot=start]),
|
|
626
|
-
:host(.textarea-label-placement-floating) ::slotted([slot=end]) {
|
|
627
|
-
margin-top: 8px;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
603
|
/**
|
|
631
604
|
* This makes the label sit over the textarea
|
|
632
605
|
* when the textarea is blurred and has no value.
|
|
@@ -661,15 +634,122 @@
|
|
|
661
634
|
max-width: calc(100% / 0.75);
|
|
662
635
|
}
|
|
663
636
|
|
|
637
|
+
.start-slot-wrapper,
|
|
638
|
+
.end-slot-wrapper {
|
|
639
|
+
display: flex;
|
|
640
|
+
flex-shrink: 0;
|
|
641
|
+
align-self: start;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
:host {
|
|
645
|
+
min-height: 44px;
|
|
646
|
+
font-family: var(--ion-font-family, inherit);
|
|
647
|
+
z-index: 2;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Since the label sits on top of the element,
|
|
652
|
+
* the component needs to be taller otherwise the
|
|
653
|
+
* label will appear too close to the textarea text.
|
|
654
|
+
* Also, floating and stacked labels should not
|
|
655
|
+
* push the label down since it it
|
|
656
|
+
* sits on top of the textarea.
|
|
657
|
+
*/
|
|
658
|
+
:host(.textarea-label-placement-floating),
|
|
659
|
+
:host(.textarea-label-placement-stacked) {
|
|
660
|
+
--padding-top: 0px;
|
|
661
|
+
min-height: 56px;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.native-wrapper {
|
|
665
|
+
min-height: inherit;
|
|
666
|
+
max-height: inherit;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
.native-wrapper textarea {
|
|
670
|
+
-webkit-padding-start: 0px;
|
|
671
|
+
padding-inline-start: 0px;
|
|
672
|
+
-webkit-padding-end: 0px;
|
|
673
|
+
padding-inline-end: 0px;
|
|
674
|
+
padding-top: var(--padding-top);
|
|
675
|
+
padding-bottom: var(--padding-bottom);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.textarea-bottom {
|
|
679
|
+
/**
|
|
680
|
+
* The bottom content should take on the start and end
|
|
681
|
+
* padding so it is always aligned with either the label
|
|
682
|
+
* or the start of the textarea.
|
|
683
|
+
*/
|
|
684
|
+
-webkit-padding-start: var(--padding-start);
|
|
685
|
+
padding-inline-start: var(--padding-start);
|
|
686
|
+
-webkit-padding-end: var(--padding-end);
|
|
687
|
+
padding-inline-end: var(--padding-end);
|
|
688
|
+
padding-top: 5px;
|
|
689
|
+
padding-bottom: 0;
|
|
690
|
+
font-size: 0.75rem;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.textarea-bottom .counter {
|
|
694
|
+
color: var(--ion-color-step-550, var(--ion-text-color-step-450, #737373));
|
|
695
|
+
padding-inline-start: 16px;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
:host(.textarea-label-placement-start) .label-text-wrapper {
|
|
699
|
+
/**
|
|
700
|
+
* The margin between the label and
|
|
701
|
+
* the textarea should be on the end
|
|
702
|
+
* when the label sits at the start.
|
|
703
|
+
*/
|
|
704
|
+
-webkit-margin-start: 0;
|
|
705
|
+
margin-inline-start: 0;
|
|
706
|
+
-webkit-margin-end: 16px;
|
|
707
|
+
margin-inline-end: 16px;
|
|
708
|
+
margin-top: 0;
|
|
709
|
+
margin-bottom: 0;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* The margin between the label and
|
|
714
|
+
* the textarea should be on the start
|
|
715
|
+
* when the label sits at the end.
|
|
716
|
+
*/
|
|
717
|
+
:host(.textarea-label-placement-end) .label-text-wrapper {
|
|
718
|
+
-webkit-margin-start: 16px;
|
|
719
|
+
margin-inline-start: 16px;
|
|
720
|
+
-webkit-margin-end: 0;
|
|
721
|
+
margin-inline-end: 0;
|
|
722
|
+
margin-top: 0;
|
|
723
|
+
margin-bottom: 0;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
:host(.textarea-label-placement-fixed) .label-text-wrapper {
|
|
727
|
+
/**
|
|
728
|
+
* The margin between the label and
|
|
729
|
+
* the textarea should be on the end
|
|
730
|
+
* when the label sits at the start.
|
|
731
|
+
*/
|
|
732
|
+
-webkit-margin-start: 0;
|
|
733
|
+
margin-inline-start: 0;
|
|
734
|
+
-webkit-margin-end: 16px;
|
|
735
|
+
margin-inline-end: 16px;
|
|
736
|
+
margin-top: 0;
|
|
737
|
+
margin-bottom: 0;
|
|
738
|
+
}
|
|
739
|
+
|
|
664
740
|
.start-slot-wrapper,
|
|
665
741
|
.end-slot-wrapper {
|
|
666
742
|
padding-left: 0;
|
|
667
743
|
padding-right: 0;
|
|
668
744
|
padding-top: var(--padding-top);
|
|
669
745
|
padding-bottom: var(--padding-bottom);
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
:host(.textarea-label-placement-stacked) ::slotted([slot=start]),
|
|
749
|
+
:host(.textarea-label-placement-stacked) ::slotted([slot=end]),
|
|
750
|
+
:host(.textarea-label-placement-floating) ::slotted([slot=start]),
|
|
751
|
+
:host(.textarea-label-placement-floating) ::slotted([slot=end]) {
|
|
752
|
+
margin-top: 8px;
|
|
673
753
|
}
|
|
674
754
|
|
|
675
755
|
::slotted([slot=start]),
|
|
@@ -10,9 +10,9 @@ import { getIonTheme } from "../../global/ionic-global";
|
|
|
10
10
|
export class Thumbnail {
|
|
11
11
|
render() {
|
|
12
12
|
const theme = getIonTheme(this);
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '8913b780b1ac6a325126622f992da0d4169b5c8c', class: {
|
|
14
14
|
[theme]: true,
|
|
15
|
-
} }, h("slot", { key: '
|
|
15
|
+
} }, h("slot", { key: '10127c5603bc9b750e060e35f8b7f665befce81a' })));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "ion-thumbnail"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -31,11 +31,11 @@ export class ToolbarTitle {
|
|
|
31
31
|
render() {
|
|
32
32
|
const theme = getIonTheme(this);
|
|
33
33
|
const size = this.getSize();
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: 'f381a740291cd926b40f52a3020fe3905f96fe1f', class: createColorClasses(this.color, {
|
|
35
35
|
[theme]: true,
|
|
36
36
|
[`title-${size}`]: true,
|
|
37
37
|
'title-rtl': document.dir === 'rtl',
|
|
38
|
-
}) }, h("div", { key: '
|
|
38
|
+
}) }, h("div", { key: '01169b8d89fe706b3d6700d60429963be41ccd8d', class: "toolbar-title" }, h("slot", { key: '38222a860da0030c168c3adc8361796e1ba7598f' }))));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "ion-title"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -390,9 +390,9 @@ export class Toast {
|
|
|
390
390
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
391
391
|
printIonWarning('This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
|
|
392
392
|
}
|
|
393
|
-
return (h(Host, Object.assign({ key: '
|
|
393
|
+
return (h(Host, Object.assign({ key: 'c0989bce71160a39841e75a2724e0c2e339424fd', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
394
394
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
395
|
-
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [theme]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '
|
|
395
|
+
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [theme]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '152e56b2ebf42a4db999c77b79bc24c9860c9d5b', class: wrapperClass }, h("div", { key: '366fecd312dd4ef827f5c8bf976ca4c7eb95fff9', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: '996753bdeb68bd6ef273714c11dafe8a9dde3581', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: '23172e800e524666c4dd77fe95ccd34a42184812', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
|
|
396
396
|
}
|
|
397
397
|
static get is() { return "ion-toast"; }
|
|
398
398
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { expect } from "@playwright/test";
|
|
5
5
|
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
6
|
-
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
6
|
+
configs({ directions: ['ltr'], modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, screenshot, config }) => {
|
|
7
7
|
test.describe(title('toggle: color'), () => {
|
|
8
8
|
test('should apply color when checked', async ({ page }) => {
|
|
9
9
|
await page.setContent(`
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { expect } from "@playwright/test";
|
|
5
5
|
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
6
|
-
configs({ palettes: ['light', 'dark'] }).forEach(({ title, screenshot, config }) => {
|
|
6
|
+
configs({ palettes: ['light', 'dark'], modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, screenshot, config }) => {
|
|
7
7
|
test.describe(title('toggle: enable-on-off-labels'), () => {
|
|
8
8
|
test('should not have visual regressions', async ({ page }) => {
|
|
9
9
|
await page.setContent(`
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { expect } from "@playwright/test";
|
|
5
5
|
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
6
|
-
configs().forEach(({ title, screenshot, config }) => {
|
|
6
|
+
configs({ modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, screenshot, config }) => {
|
|
7
7
|
test.describe(title('toggle: item'), () => {
|
|
8
8
|
test('should render correctly in list', async ({ page }) => {
|
|
9
9
|
await page.setContent(`
|
|
@@ -29,7 +29,7 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
|
-
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
32
|
+
configs({ directions: ['ltr'], modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, screenshot, config }) => {
|
|
33
33
|
test.describe(title('toggle: item color contrast'), () => {
|
|
34
34
|
test('label should have correct contrast when used in an item', async ({ page }) => {
|
|
35
35
|
await page.setContent(`
|
|
@@ -73,6 +73,8 @@ configs({ directions: ['ltr'], modes: ['md'] }).forEach(({ title, screenshot, co
|
|
|
73
73
|
await expect(list).toHaveScreenshot(screenshot(`toggle-stacked-label-in-item`));
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
|
+
});
|
|
77
|
+
configs({ directions: ['ltr'], modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, config }) => {
|
|
76
78
|
test.describe(title('toggle: ionChange'), () => {
|
|
77
79
|
test('clicking padded space within item should click the toggle', async ({ page }) => {
|
|
78
80
|
await page.setContent(`
|
|
@@ -118,3 +118,32 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config, screen
|
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
120
|
});
|
|
121
|
+
configs({ modes: ['ionic-md'] }).forEach(({ title, screenshot, config }) => {
|
|
122
|
+
test.describe(title('toggle: start placement'), () => {
|
|
123
|
+
test('should render the label in the start position', async ({ page }) => {
|
|
124
|
+
await page.setContent(`
|
|
125
|
+
<ion-toggle label-placement="start">Label</ion-toggle>
|
|
126
|
+
`, config);
|
|
127
|
+
const toggle = page.locator('ion-toggle');
|
|
128
|
+
await expect(toggle).toHaveScreenshot(screenshot(`toggle-label-start`));
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
test.describe(title('toggle: end placement'), () => {
|
|
132
|
+
test('should render the label in the end position', async ({ page }) => {
|
|
133
|
+
await page.setContent(`
|
|
134
|
+
<ion-toggle label-placement="end">Label</ion-toggle>
|
|
135
|
+
`, config);
|
|
136
|
+
const toggle = page.locator('ion-toggle');
|
|
137
|
+
await expect(toggle).toHaveScreenshot(screenshot(`toggle-label-end`));
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
test.describe(title('toggle: start long label'), () => {
|
|
141
|
+
test('long label should truncate', async ({ page }) => {
|
|
142
|
+
await page.setContent(`
|
|
143
|
+
<ion-toggle label-placement="start">Enable Notifications Enable Notifications Enable Notifications Enable Notifications Enable Notifications Enable Notifications Enable Notifications</ion-toggle>
|
|
144
|
+
`, config);
|
|
145
|
+
const toggle = page.locator('ion-toggle');
|
|
146
|
+
await expect(toggle).toHaveScreenshot(screenshot(`toggle-label-start-long-label`));
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { expect } from "@playwright/test";
|
|
5
5
|
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
6
|
-
configs().forEach(({ title, screenshot, config }) => {
|
|
6
|
+
configs({ modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, screenshot, config }) => {
|
|
7
7
|
test.describe(title('toggle: sizes'), () => {
|
|
8
8
|
test('should not have visual regressions', async ({ page }) => {
|
|
9
9
|
await page.goto(`/src/components/toggle/test/sizes`, config);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { expect } from "@playwright/test";
|
|
5
5
|
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
6
|
-
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
6
|
+
configs({ directions: ['ltr'], modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, screenshot, config }) => {
|
|
7
7
|
test.describe(title('toggle: states'), () => {
|
|
8
8
|
test('should render disabled toggle correctly', async ({ page }) => {
|
|
9
9
|
await page.setContent(`
|
|
@@ -28,3 +28,31 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
|
+
/**
|
|
32
|
+
* Focused and Pressed states are only available in the Ionic theme
|
|
33
|
+
*/
|
|
34
|
+
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ title, screenshot, config }) => {
|
|
35
|
+
test.describe(title('toggle: states'), () => {
|
|
36
|
+
test('should render focused toggle correctly', async ({ page }) => {
|
|
37
|
+
await page.setContent(`
|
|
38
|
+
<ion-toggle class="ion-focused">Label</ion-toggle>
|
|
39
|
+
`, config);
|
|
40
|
+
const toggle = page.locator('ion-toggle');
|
|
41
|
+
await expect(toggle).toHaveScreenshot(screenshot(`toggle-focused`));
|
|
42
|
+
});
|
|
43
|
+
test('should render pressed unchecked toggle correctly', async ({ page }) => {
|
|
44
|
+
await page.setContent(`
|
|
45
|
+
<ion-toggle class="ion-activated">Label</ion-toggle>
|
|
46
|
+
`, config);
|
|
47
|
+
const toggle = page.locator('ion-toggle');
|
|
48
|
+
await expect(toggle).toHaveScreenshot(screenshot(`toggle-unchecked-pressed`));
|
|
49
|
+
});
|
|
50
|
+
test('should render pressed checked toggle correctly', async ({ page }) => {
|
|
51
|
+
await page.setContent(`
|
|
52
|
+
<ion-toggle class="ion-activated" checked>Label</ion-toggle>
|
|
53
|
+
`, config);
|
|
54
|
+
const toggle = page.locator('ion-toggle');
|
|
55
|
+
await expect(toggle).toHaveScreenshot(screenshot(`toggle-checked-pressed`));
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
});
|