@ionic/core 8.4.1-dev.11730909308.11b6f07d → 8.4.1-dev.11731604836.1a1f3fcc
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-select-option.js +1 -1
- package/components/ion-select.js +18 -6
- package/components/ion-skeleton-text.js +2 -2
- package/components/ion-split-pane.js +2 -2
- package/components/ion-tab-bar.js +2 -2
- package/components/ion-tab-button.js +2 -2
- package/components/ion-tab.js +2 -2
- package/components/ion-tabs.js +1 -1
- package/components/ion-text.js +2 -2
- package/components/ion-textarea.js +3 -3
- package/components/ion-thumbnail.js +2 -2
- package/components/ion-toast.js +2 -2
- package/components/ion-toggle.js +3 -3
- package/components/item.js +1 -1
- package/components/radio.js +3 -3
- package/components/select-modal.js +3 -3
- package/components/select-popover.js +2 -2
- package/components/spinner.js +1 -1
- package/components/title.js +2 -2
- package/components/toolbar.js +2 -2
- 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-item_8.cjs.entry.js +3 -3
- package/dist/cjs/ion-radio_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-select-modal.cjs.entry.js +3 -3
- package/dist/cjs/ion-select_3.cjs.entry.js +21 -9
- package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +3 -3
- package/dist/cjs/ion-toast.cjs.entry.js +2 -2
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/collection/components/item/item.ionic.css +0 -4
- package/dist/collection/components/radio/radio.ionic.css +6 -0
- package/dist/collection/components/radio/radio.ios.css +6 -6
- package/dist/collection/components/radio/radio.md.css +6 -6
- package/dist/collection/components/select/select.ionic.css +685 -0
- package/dist/collection/components/select/select.ios.css +148 -101
- package/dist/collection/components/select/select.js +16 -4
- package/dist/collection/components/select/select.md.css +140 -215
- package/dist/collection/components/select-modal/select-modal.ionic.css +121 -0
- package/dist/collection/components/select-modal/select-modal.js +3 -3
- package/dist/collection/components/select-option/select-option.js +1 -1
- package/dist/collection/components/select-popover/select-popover.js +2 -2
- package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-pane/split-pane.js +2 -2
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-button/tab-button.js +2 -2
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/text/text.js +2 -2
- package/dist/collection/components/textarea/textarea.js +3 -3
- 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/toggle.js +3 -3
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/docs.json +1 -1
- package/dist/esm/ion-app_8.entry.js +4 -4
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-item_8.entry.js +3 -3
- package/dist/esm/ion-radio_2.entry.js +3 -3
- package/dist/esm/ion-select-modal.entry.js +3 -3
- package/dist/esm/ion-select_3.entry.js +21 -9
- package/dist/esm/ion-spinner.entry.js +1 -1
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +4 -4
- package/dist/esm/ion-tab_2.entry.js +3 -3
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +3 -3
- package/dist/esm/ion-toast.entry.js +2 -2
- package/dist/esm/ion-toggle.entry.js +3 -3
- 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-item_8.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-select-modal.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-spinner.entry.js +1 -1
- package/dist/esm-es5/ion-split-pane.entry.js +1 -1
- package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.entry.js +1 -1
- package/dist/esm-es5/ion-text.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/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-0e80425f.system.entry.js +4 -0
- package/dist/ionic/{p-5e9730c2.entry.js → p-18892506.entry.js} +1 -1
- package/dist/ionic/p-25413edd.entry.js +4 -0
- package/dist/ionic/{p-578a8bdf.entry.js → p-29ca4da2.entry.js} +1 -1
- package/dist/ionic/{p-f83d18c1.entry.js → p-2e4c7fa3.entry.js} +1 -1
- package/dist/ionic/{p-fc8359aa.system.entry.js → p-398b00a5.system.entry.js} +1 -1
- package/dist/ionic/{p-08b2ba53.system.entry.js → p-5684893b.system.entry.js} +1 -1
- package/dist/ionic/{p-211b0fba.system.entry.js → p-5a1979e0.system.entry.js} +1 -1
- package/dist/ionic/{p-430d860e.entry.js → p-67f3ed57.entry.js} +1 -1
- package/dist/ionic/p-6a77b55a.entry.js +4 -0
- package/dist/ionic/{p-055ae36e.system.entry.js → p-787c1bd0.system.entry.js} +1 -1
- package/dist/ionic/{p-1fba8e90.system.entry.js → p-815f649a.system.entry.js} +1 -1
- package/dist/ionic/p-954d0d7c.system.entry.js +4 -0
- package/dist/ionic/p-9ac1a506.system.js +1 -1
- package/dist/ionic/{p-ea0b8c64.system.entry.js → p-a58b94c6.system.entry.js} +1 -1
- package/dist/ionic/p-a98061d0.entry.js +4 -0
- package/dist/ionic/{p-699c1e19.entry.js → p-adc0276b.entry.js} +1 -1
- package/dist/ionic/{p-f09c06e8.entry.js → p-c3ae4bcf.entry.js} +1 -1
- package/dist/ionic/{p-7557a7de.system.entry.js → p-c5226e15.system.entry.js} +1 -1
- package/dist/ionic/{p-ce46d44a.entry.js → p-cad8a848.entry.js} +1 -1
- package/dist/ionic/p-cf3dad24.entry.js +4 -0
- package/dist/ionic/p-df9c6620.system.entry.js +4 -0
- package/dist/ionic/{p-3f1e20d1.system.entry.js → p-ea98a10a.system.entry.js} +1 -1
- package/dist/ionic/{p-2978f27e.entry.js → p-eb4ba253.entry.js} +1 -1
- package/dist/ionic/{p-d7894208.entry.js → p-ee17be82.entry.js} +1 -1
- package/dist/ionic/p-ef60ee95.entry.js +4 -0
- package/dist/ionic/p-f1c1b477.system.entry.js +4 -0
- package/dist/ionic/{p-31fa1052.system.entry.js → p-f25ad420.system.entry.js} +1 -1
- package/dist/ionic/{p-3fc0ba02.system.entry.js → p-fff78cd2.system.entry.js} +1 -1
- package/hydrate/index.js +56 -44
- package/hydrate/index.mjs +56 -44
- package/package.json +1 -1
- package/dist/ionic/p-043483dc.entry.js +0 -4
- package/dist/ionic/p-06ca2619.system.entry.js +0 -4
- package/dist/ionic/p-35362c9f.entry.js +0 -4
- package/dist/ionic/p-458a2899.entry.js +0 -4
- package/dist/ionic/p-4edc0fda.system.entry.js +0 -4
- package/dist/ionic/p-6f941957.entry.js +0 -4
- package/dist/ionic/p-74a20601.system.entry.js +0 -4
- package/dist/ionic/p-a42eccfb.entry.js +0 -4
- package/dist/ionic/p-ce2e8a94.system.entry.js +0 -4
|
@@ -59,6 +59,28 @@
|
|
|
59
59
|
* }
|
|
60
60
|
* }
|
|
61
61
|
*/
|
|
62
|
+
/**
|
|
63
|
+
* A heuristic that applies CSS to tablet
|
|
64
|
+
* viewports.
|
|
65
|
+
*
|
|
66
|
+
* Usage:
|
|
67
|
+
* @include tablet-viewport() {
|
|
68
|
+
* :host {
|
|
69
|
+
* background-color: green;
|
|
70
|
+
* }
|
|
71
|
+
* }
|
|
72
|
+
*/
|
|
73
|
+
/**
|
|
74
|
+
* A heuristic that applies CSS to mobile
|
|
75
|
+
* viewports (i.e. phones, not tablets).
|
|
76
|
+
*
|
|
77
|
+
* Usage:
|
|
78
|
+
* @include mobile-viewport() {
|
|
79
|
+
* :host {
|
|
80
|
+
* background-color: blue;
|
|
81
|
+
* }
|
|
82
|
+
* }
|
|
83
|
+
*/
|
|
62
84
|
:host {
|
|
63
85
|
/**
|
|
64
86
|
* @prop --background: Background of the select
|
|
@@ -87,7 +109,6 @@
|
|
|
87
109
|
--padding-bottom: 0px;
|
|
88
110
|
--padding-start: 0px;
|
|
89
111
|
--placeholder-color: currentColor;
|
|
90
|
-
--placeholder-opacity: var(--ion-placeholder-opacity, 0.6);
|
|
91
112
|
--background: transparent;
|
|
92
113
|
--border-style: solid;
|
|
93
114
|
--highlight-color-focused: var(--ion-color-primary, #0054e9);
|
|
@@ -104,10 +125,8 @@
|
|
|
104
125
|
position: relative;
|
|
105
126
|
width: 100%;
|
|
106
127
|
min-height: 44px;
|
|
107
|
-
font-family: var(--ion-font-family, inherit);
|
|
108
128
|
white-space: nowrap;
|
|
109
129
|
cursor: pointer;
|
|
110
|
-
z-index: 2;
|
|
111
130
|
}
|
|
112
131
|
|
|
113
132
|
/**
|
|
@@ -173,13 +192,6 @@ button {
|
|
|
173
192
|
}
|
|
174
193
|
|
|
175
194
|
.select-icon {
|
|
176
|
-
-webkit-margin-start: 4px;
|
|
177
|
-
margin-inline-start: 4px;
|
|
178
|
-
-webkit-margin-end: 0;
|
|
179
|
-
margin-inline-end: 0;
|
|
180
|
-
margin-top: 0;
|
|
181
|
-
margin-bottom: 0;
|
|
182
|
-
position: relative;
|
|
183
195
|
/**
|
|
184
196
|
* Prevent the icon from shrinking when the label and/or
|
|
185
197
|
* selected item text is long enough to fill the rest of
|
|
@@ -197,17 +209,6 @@ button {
|
|
|
197
209
|
color: inherit;
|
|
198
210
|
}
|
|
199
211
|
|
|
200
|
-
/**
|
|
201
|
-
* The select icon should be centered with
|
|
202
|
-
* the entire container not just the control
|
|
203
|
-
* with floating/stacked labels.
|
|
204
|
-
*/
|
|
205
|
-
:host(.select-label-placement-stacked) .select-icon,
|
|
206
|
-
:host(.select-label-placement-floating) .select-icon {
|
|
207
|
-
position: absolute;
|
|
208
|
-
height: 100%;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
212
|
/**
|
|
212
213
|
* This positions the icon at the correct
|
|
213
214
|
* edge of the component with LTR and RTL
|
|
@@ -234,13 +235,6 @@ button {
|
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
.select-wrapper {
|
|
237
|
-
-webkit-padding-start: var(--padding-start);
|
|
238
|
-
padding-inline-start: var(--padding-start);
|
|
239
|
-
-webkit-padding-end: var(--padding-end);
|
|
240
|
-
padding-inline-end: var(--padding-end);
|
|
241
|
-
padding-top: var(--padding-top);
|
|
242
|
-
padding-bottom: var(--padding-bottom);
|
|
243
|
-
border-radius: var(--border-radius);
|
|
244
238
|
display: flex;
|
|
245
239
|
position: relative;
|
|
246
240
|
flex-grow: 1;
|
|
@@ -398,20 +392,6 @@ button {
|
|
|
398
392
|
flex-direction: row;
|
|
399
393
|
}
|
|
400
394
|
|
|
401
|
-
:host(.select-label-placement-start) .label-text-wrapper {
|
|
402
|
-
/**
|
|
403
|
-
* The margin between the label and
|
|
404
|
-
* the select should be on the end
|
|
405
|
-
* when the label sits at the start.
|
|
406
|
-
*/
|
|
407
|
-
-webkit-margin-start: 0;
|
|
408
|
-
margin-inline-start: 0;
|
|
409
|
-
-webkit-margin-end: 16px;
|
|
410
|
-
margin-inline-end: 16px;
|
|
411
|
-
margin-top: 0;
|
|
412
|
-
margin-bottom: 0;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
395
|
/**
|
|
416
396
|
* Label is on the right of the select in LTR and
|
|
417
397
|
* on the left in RTL.
|
|
@@ -420,34 +400,6 @@ button {
|
|
|
420
400
|
flex-direction: row-reverse;
|
|
421
401
|
}
|
|
422
402
|
|
|
423
|
-
/**
|
|
424
|
-
* The margin between the label and
|
|
425
|
-
* the select should be on the start
|
|
426
|
-
* when the label sits at the end.
|
|
427
|
-
*/
|
|
428
|
-
:host(.select-label-placement-end) .label-text-wrapper {
|
|
429
|
-
-webkit-margin-start: 16px;
|
|
430
|
-
margin-inline-start: 16px;
|
|
431
|
-
-webkit-margin-end: 0;
|
|
432
|
-
margin-inline-end: 0;
|
|
433
|
-
margin-top: 0;
|
|
434
|
-
margin-bottom: 0;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
:host(.select-label-placement-fixed) .label-text-wrapper {
|
|
438
|
-
/**
|
|
439
|
-
* The margin between the label and
|
|
440
|
-
* the select should be on the end
|
|
441
|
-
* when the label sits at the start.
|
|
442
|
-
*/
|
|
443
|
-
-webkit-margin-start: 0;
|
|
444
|
-
margin-inline-start: 0;
|
|
445
|
-
-webkit-margin-end: 16px;
|
|
446
|
-
margin-inline-end: 16px;
|
|
447
|
-
margin-top: 0;
|
|
448
|
-
margin-bottom: 0;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
403
|
/**
|
|
452
404
|
* Label is on the left of the select in LTR and
|
|
453
405
|
* on the right in RTL. Label also has a fixed width.
|
|
@@ -500,29 +452,10 @@ button {
|
|
|
500
452
|
*/
|
|
501
453
|
:host(.select-label-placement-stacked) .native-wrapper,
|
|
502
454
|
:host(.select-label-placement-floating) .native-wrapper {
|
|
503
|
-
margin-left: 0;
|
|
504
|
-
margin-right: 0;
|
|
505
|
-
margin-top: 1px;
|
|
506
|
-
margin-bottom: 0;
|
|
507
455
|
flex-grow: 1;
|
|
508
456
|
width: 100%;
|
|
509
457
|
}
|
|
510
458
|
|
|
511
|
-
/**
|
|
512
|
-
* This makes the label sit over the select
|
|
513
|
-
* when the select is blurred and has no value.
|
|
514
|
-
* The label should not sit over the select if the
|
|
515
|
-
* select has a placeholder.
|
|
516
|
-
* Note: This is different from what ion-input does
|
|
517
|
-
* because the activating the select causes an overlay
|
|
518
|
-
* to appear. This makes it hard to read the placeholder.
|
|
519
|
-
* With ion-input, the input just focuses and the placeholder
|
|
520
|
-
* is still easy to read.
|
|
521
|
-
*/
|
|
522
|
-
:host(.select-label-placement-floating) .label-text-wrapper {
|
|
523
|
-
transform: translateY(100%) scale(1);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
459
|
/**
|
|
527
460
|
* The placeholder should be hidden when the label
|
|
528
461
|
* is on top of the select. This prevents the label
|
|
@@ -550,6 +483,132 @@ button {
|
|
|
550
483
|
opacity: 1;
|
|
551
484
|
}
|
|
552
485
|
|
|
486
|
+
::slotted([slot=start]),
|
|
487
|
+
::slotted([slot=end]) {
|
|
488
|
+
/**
|
|
489
|
+
* Prevent the slots from shrinking when the label and/or
|
|
490
|
+
* selected item text is long enough to fill the rest of
|
|
491
|
+
* the container.
|
|
492
|
+
*/
|
|
493
|
+
flex-shrink: 0;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
::slotted([slot=start]:last-of-type) {
|
|
497
|
+
margin-inline-start: 0;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
::slotted([slot=end]:first-of-type) {
|
|
501
|
+
margin-inline-end: 0;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
:host {
|
|
505
|
+
--placeholder-opacity: var(--ion-placeholder-opacity, 0.6);
|
|
506
|
+
font-family: var(--ion-font-family, inherit);
|
|
507
|
+
z-index: 2;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.select-icon {
|
|
511
|
+
-webkit-margin-start: 4px;
|
|
512
|
+
margin-inline-start: 4px;
|
|
513
|
+
-webkit-margin-end: 0;
|
|
514
|
+
margin-inline-end: 0;
|
|
515
|
+
margin-top: 0;
|
|
516
|
+
margin-bottom: 0;
|
|
517
|
+
position: relative;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* The select icon should be centered with
|
|
522
|
+
* the entire container not just the control
|
|
523
|
+
* with floating/stacked labels.
|
|
524
|
+
*/
|
|
525
|
+
:host(.select-label-placement-stacked) .select-icon,
|
|
526
|
+
:host(.select-label-placement-floating) .select-icon {
|
|
527
|
+
position: absolute;
|
|
528
|
+
height: 100%;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.select-wrapper {
|
|
532
|
+
-webkit-padding-start: var(--padding-start);
|
|
533
|
+
padding-inline-start: var(--padding-start);
|
|
534
|
+
-webkit-padding-end: var(--padding-end);
|
|
535
|
+
padding-inline-end: var(--padding-end);
|
|
536
|
+
padding-top: var(--padding-top);
|
|
537
|
+
padding-bottom: var(--padding-bottom);
|
|
538
|
+
border-radius: var(--border-radius);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
:host(.select-label-placement-start) .label-text-wrapper {
|
|
542
|
+
/**
|
|
543
|
+
* The margin between the label and
|
|
544
|
+
* the select should be on the end
|
|
545
|
+
* when the label sits at the start.
|
|
546
|
+
*/
|
|
547
|
+
-webkit-margin-start: 0;
|
|
548
|
+
margin-inline-start: 0;
|
|
549
|
+
-webkit-margin-end: 16px;
|
|
550
|
+
margin-inline-end: 16px;
|
|
551
|
+
margin-top: 0;
|
|
552
|
+
margin-bottom: 0;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* The margin between the label and
|
|
557
|
+
* the select should be on the start
|
|
558
|
+
* when the label sits at the end.
|
|
559
|
+
*/
|
|
560
|
+
:host(.select-label-placement-end) .label-text-wrapper {
|
|
561
|
+
-webkit-margin-start: 16px;
|
|
562
|
+
margin-inline-start: 16px;
|
|
563
|
+
-webkit-margin-end: 0;
|
|
564
|
+
margin-inline-end: 0;
|
|
565
|
+
margin-top: 0;
|
|
566
|
+
margin-bottom: 0;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
:host(.select-label-placement-fixed) .label-text-wrapper {
|
|
570
|
+
/**
|
|
571
|
+
* The margin between the label and
|
|
572
|
+
* the select should be on the end
|
|
573
|
+
* when the label sits at the start.
|
|
574
|
+
*/
|
|
575
|
+
-webkit-margin-start: 0;
|
|
576
|
+
margin-inline-start: 0;
|
|
577
|
+
-webkit-margin-end: 16px;
|
|
578
|
+
margin-inline-end: 16px;
|
|
579
|
+
margin-top: 0;
|
|
580
|
+
margin-bottom: 0;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Ensures the select does not
|
|
585
|
+
* overlap the label.
|
|
586
|
+
* Also ensure that the native wrapper
|
|
587
|
+
* takes up the remaining available height and width.
|
|
588
|
+
*/
|
|
589
|
+
:host(.select-label-placement-stacked) .native-wrapper,
|
|
590
|
+
:host(.select-label-placement-floating) .native-wrapper {
|
|
591
|
+
margin-left: 0;
|
|
592
|
+
margin-right: 0;
|
|
593
|
+
margin-top: 1px;
|
|
594
|
+
margin-bottom: 0;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* This makes the label sit over the select
|
|
599
|
+
* when the select is blurred and has no value.
|
|
600
|
+
* The label should not sit over the select if the
|
|
601
|
+
* select has a placeholder.
|
|
602
|
+
* Note: This is different from what ion-input does
|
|
603
|
+
* because the activating the select causes an overlay
|
|
604
|
+
* to appear. This makes it hard to read the placeholder.
|
|
605
|
+
* With ion-input, the input just focuses and the placeholder
|
|
606
|
+
* is still easy to read.
|
|
607
|
+
*/
|
|
608
|
+
:host(.select-label-placement-floating) .label-text-wrapper {
|
|
609
|
+
transform: translateY(100%) scale(1);
|
|
610
|
+
}
|
|
611
|
+
|
|
553
612
|
/**
|
|
554
613
|
* This makes the label sit above the input.
|
|
555
614
|
*/
|
|
@@ -562,24 +621,12 @@ button {
|
|
|
562
621
|
max-width: calc(100% / 0.75);
|
|
563
622
|
}
|
|
564
623
|
|
|
565
|
-
::slotted([slot=start]),
|
|
566
|
-
::slotted([slot=end]) {
|
|
567
|
-
/**
|
|
568
|
-
* Prevent the slots from shrinking when the label and/or
|
|
569
|
-
* selected item text is long enough to fill the rest of
|
|
570
|
-
* the container.
|
|
571
|
-
*/
|
|
572
|
-
flex-shrink: 0;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
624
|
::slotted([slot=start]:last-of-type) {
|
|
576
625
|
margin-inline-end: 16px;
|
|
577
|
-
margin-inline-start: 0;
|
|
578
626
|
}
|
|
579
627
|
|
|
580
628
|
::slotted([slot=end]:first-of-type) {
|
|
581
629
|
margin-inline-start: 16px;
|
|
582
|
-
margin-inline-end: 0;
|
|
583
630
|
}
|
|
584
631
|
|
|
585
632
|
/**
|
|
@@ -681,6 +681,8 @@ export class Select {
|
|
|
681
681
|
const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value } = this;
|
|
682
682
|
const theme = getIonTheme(this);
|
|
683
683
|
const hasFloatingOrStackedLabel = labelPlacement === 'floating' || labelPlacement === 'stacked';
|
|
684
|
+
const shouldRenderOuterIcon = theme !== 'ionic' && hasFloatingOrStackedLabel;
|
|
685
|
+
const shouldRenderInnerIcon = theme === 'ionic' || !hasFloatingOrStackedLabel;
|
|
684
686
|
const justifyEnabled = !hasFloatingOrStackedLabel && justify !== undefined;
|
|
685
687
|
const rtl = isRTL(el) ? 'rtl' : 'ltr';
|
|
686
688
|
const inItem = hostContext('ion-item', this.el);
|
|
@@ -706,7 +708,7 @@ export class Select {
|
|
|
706
708
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
707
709
|
*/
|
|
708
710
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
709
|
-
return (h(Host, { key: '
|
|
711
|
+
return (h(Host, { key: '8ca52d1d30334519bc4414eee2cbabac7d83171e', onClick: this.onClick, class: createColorClasses(this.color, {
|
|
710
712
|
[theme]: true,
|
|
711
713
|
'in-item': inItem,
|
|
712
714
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -722,7 +724,17 @@ export class Select {
|
|
|
722
724
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
723
725
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
724
726
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
725
|
-
}) }, h("label", { key: '
|
|
727
|
+
}) }, h("label", { key: '7784a3a2f56d32e37b596067f54b9fc693eadfa9', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: 'f165058bd37a6de108a9e7c33e5f31d569bcab7e', class: "select-wrapper-inner" },
|
|
728
|
+
/**
|
|
729
|
+
* For the ionic theme, we render the outline container here
|
|
730
|
+
* instead of higher up, so it can be positioned relative to
|
|
731
|
+
* the native wrapper instead of the <label> element or the
|
|
732
|
+
* entire component. This allows the label text to be positioned
|
|
733
|
+
* above the outline, while staying within the bounds of the
|
|
734
|
+
* <label> element, ensuring that clicking the label text
|
|
735
|
+
* focuses the select.
|
|
736
|
+
*/
|
|
737
|
+
theme === 'ionic' && fill === 'outline' && h("div", { key: 'fdfe669caabe3fb4af13c2d4dfb957906b1fdf2d', class: "select-outline" }), h("slot", { key: '81e9e8becae3713b0e09ee03e82b379832fc1aaf', name: "start" }), h("div", { key: 'af7e0a7f1cce2eb8707084aa8479df759fe55101', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '04c9148aee3a1dc777565af6bc318313903d3528', name: "end" }), shouldRenderInnerIcon && this.renderSelectIcon()), shouldRenderOuterIcon && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: '56f93a524e779a64706da26e2d90629a55abb70b', class: "select-highlight" }))));
|
|
726
738
|
}
|
|
727
739
|
static get is() { return "ion-select"; }
|
|
728
740
|
static get encapsulation() { return "shadow"; }
|
|
@@ -730,14 +742,14 @@ export class Select {
|
|
|
730
742
|
return {
|
|
731
743
|
"ios": ["select.ios.scss"],
|
|
732
744
|
"md": ["select.md.scss"],
|
|
733
|
-
"ionic": ["select.
|
|
745
|
+
"ionic": ["select.ionic.scss"]
|
|
734
746
|
};
|
|
735
747
|
}
|
|
736
748
|
static get styleUrls() {
|
|
737
749
|
return {
|
|
738
750
|
"ios": ["select.ios.css"],
|
|
739
751
|
"md": ["select.md.css"],
|
|
740
|
-
"ionic": ["select.
|
|
752
|
+
"ionic": ["select.ionic.css"]
|
|
741
753
|
};
|
|
742
754
|
}
|
|
743
755
|
static get properties() {
|